From 792080e56f85484d796f674b51dc8c64ec705f53 Mon Sep 17 00:00:00 2001 From: Jorgen Date: Mon, 21 Aug 2023 14:14:26 +0200 Subject: [PATCH 001/129] Moved compilation of CUDA to seperate cuda target --- .../cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk | 143 ++++++++++-------- 1 file changed, 79 insertions(+), 64 deletions(-) diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk index 43cee0977e..ba45b3f32d 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk @@ -389,11 +389,19 @@ endif # Build directory "short" tag (defines target and path to the optional build directory) # (Rationale: keep directory names shorter, e.g. do not include random number generator choice) -override DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) +ifneq ($(NVCC),) + override DIRTAG = cuda_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) +else + override DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) +endif # Build lockfile "full" tag (defines full specification of build options that cannot be intermixed) # (Rationale: avoid mixing of CUDA and no-CUDA environment builds with different random number generators) -override TAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) +ifneq ($(NVCC),) + override TAG = cuda_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) +else + override TAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) +endif # Build directory: current directory by default, or build.$(DIRTAG) if USEBUILDDIR==1 ifeq ($(USEBUILDDIR),1) @@ -467,17 +475,6 @@ $(BUILDDIR)/.build.$(TAG): @if [ "$(oldtagsb)" != "" ]; then echo "Cannot build for tag=$(TAG) as old builds exist for other tags:"; echo " $(oldtagsb)"; echo "Please run 'make clean' first\nIf 'make clean' is not enough: run 'make clean USEBUILDDIR=1 AVX=$(AVX) FPTYPE=$(FPTYPE)' or 'make cleanall'"; exit 1; fi @touch $(BUILDDIR)/.build.$(TAG) -# Generic target and build rules: objects from CUDA compilation -ifneq ($(NVCC),) -$(BUILDDIR)/%.o : %.cu *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c $< -o $@ - -$(BUILDDIR)/%_cu.o : %.cc *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c -x cu $< -o $@ -endif - # Generic target and build rules: objects from C++ compilation # (NB do not include CUINC here! add it only for NVTX or curand #679) $(BUILDDIR)/%.o : %.cc *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) @@ -495,22 +492,10 @@ endif # Apply special build flags only to check_sa.o and gcheck_sa.o (NVTX in timermap.h, #679) $(BUILDDIR)/check_sa.o: CXXFLAGS += $(USE_NVTX) $(CUINC) -$(BUILDDIR)/gcheck_sa.o: CXXFLAGS += $(USE_NVTX) $(CUINC) # Apply special build flags only to check_sa and CurandRandomNumberKernel (curand headers, #679) $(BUILDDIR)/check_sa.o: CXXFLAGS += $(CXXFLAGSCURAND) -$(BUILDDIR)/gcheck_sa.o: CXXFLAGS += $(CXXFLAGSCURAND) $(BUILDDIR)/CurandRandomNumberKernel.o: CXXFLAGS += $(CXXFLAGSCURAND) -ifeq ($(RNDGEN),hasCurand) -$(BUILDDIR)/CurandRandomNumberKernel.o: CXXFLAGS += $(CUINC) -endif - -# Avoid "warning: builtin __has_trivial_... is deprecated; use __is_trivially_... instead" in nvcc with icx2023 (#592) -ifneq ($(shell $(CXX) --version | egrep '^(Intel)'),) -ifneq ($(NVCC),) -CUFLAGS += -Xcompiler -Wno-deprecated-builtins -endif -endif # Avoid clang warning "overriding '-ffp-contract=fast' option with '-ffp-contract=on'" (#516) # This patch does remove the warning, but I prefer to keep it disabled for the moment... @@ -544,25 +529,12 @@ MG5AMC_CXXLIB = mg5amc_$(processid_short)_cpp cxx_objects_lib=$(BUILDDIR)/CPPProcess.o $(BUILDDIR)/MatrixElementKernels.o $(BUILDDIR)/BridgeKernels.o $(BUILDDIR)/CrossSectionKernels.o cxx_objects_exe=$(BUILDDIR)/CommonRandomNumberKernel.o $(BUILDDIR)/RamboSamplingKernels.o -ifneq ($(NVCC),) -MG5AMC_CULIB = mg5amc_$(processid_short)_cuda -cu_objects_lib=$(BUILDDIR)/gCPPProcess.o $(BUILDDIR)/gMatrixElementKernels.o $(BUILDDIR)/gBridgeKernels.o $(BUILDDIR)/gCrossSectionKernels.o -cu_objects_exe=$(BUILDDIR)/gCommonRandomNumberKernel.o $(BUILDDIR)/gRamboSamplingKernels.o -endif - # Target (and build rules): C++ and CUDA shared libraries $(LIBDIR)/lib$(MG5AMC_CXXLIB).so: $(BUILDDIR)/fbridge.o $(LIBDIR)/lib$(MG5AMC_CXXLIB).so: cxx_objects_lib += $(BUILDDIR)/fbridge.o $(LIBDIR)/lib$(MG5AMC_CXXLIB).so: $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cxx_objects_lib) $(CXX) -shared -o $@ $(cxx_objects_lib) $(CXXLIBFLAGSRPATH2) -L$(LIBDIR) -l$(MG5AMC_COMMONLIB) -ifneq ($(NVCC),) -$(LIBDIR)/lib$(MG5AMC_CULIB).so: $(BUILDDIR)/fbridge_cu.o -$(LIBDIR)/lib$(MG5AMC_CULIB).so: cu_objects_lib += $(BUILDDIR)/fbridge_cu.o -$(LIBDIR)/lib$(MG5AMC_CULIB).so: $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_objects_lib) - $(NVCC) --shared -o $@ $(cu_objects_lib) $(CULIBFLAGSRPATH2) -L$(LIBDIR) -l$(MG5AMC_COMMONLIB) -endif - #------------------------------------------------------------------------------- # Target (and build rules): Fortran include files @@ -577,18 +549,6 @@ $(cxx_main): LIBFLAGS += $(CXXLIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PAT $(cxx_main): $(BUILDDIR)/check_sa.o $(LIBDIR)/lib$(MG5AMC_CXXLIB).so $(cxx_objects_exe) $(BUILDDIR)/CurandRandomNumberKernel.o $(CXX) -o $@ $(BUILDDIR)/check_sa.o $(OMPFLAGS) -ldl -pthread $(LIBFLAGS) -L$(LIBDIR) -l$(MG5AMC_CXXLIB) $(cxx_objects_exe) $(BUILDDIR)/CurandRandomNumberKernel.o $(CURANDLIBFLAGS) -ifneq ($(NVCC),) -ifneq ($(shell $(CXX) --version | grep ^Intel),) -$(cu_main): LIBFLAGS += -lintlc # compile with icpx and link with nvcc (undefined reference to `_intel_fast_memcpy') -$(cu_main): LIBFLAGS += -lsvml # compile with icpx and link with nvcc (undefined reference to `__svml_cos4_l9') -else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 -$(cu_main): LIBFLAGS += -L$(patsubst %bin/nvc++,%lib,$(subst ccache ,,$(CXX))) -lnvhpcatm -lnvcpumath -lnvc -endif -$(cu_main): LIBFLAGS += $(CULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH -$(cu_main): $(BUILDDIR)/gcheck_sa.o $(LIBDIR)/lib$(MG5AMC_CULIB).so $(cu_objects_exe) $(BUILDDIR)/gCurandRandomNumberKernel.o - $(NVCC) -o $@ $(BUILDDIR)/gcheck_sa.o $(CUARCHFLAGS) $(LIBFLAGS) -L$(LIBDIR) -l$(MG5AMC_CULIB) $(cu_objects_exe) $(BUILDDIR)/gCurandRandomNumberKernel.o $(CURANDLIBFLAGS) -endif - #------------------------------------------------------------------------------- # Generic target and build rules: objects from Fortran compilation @@ -612,19 +572,6 @@ $(fcxx_main): LIBFLAGS += $(CXXLIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PA $(fcxx_main): $(BUILDDIR)/fcheck_sa.o $(BUILDDIR)/fsampler.o $(LIBDIR)/lib$(MG5AMC_CXXLIB).so $(cxx_objects_exe) $(CXX) -o $@ $(BUILDDIR)/fcheck_sa.o $(OMPFLAGS) $(BUILDDIR)/fsampler.o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_CXXLIB) $(cxx_objects_exe) -ifneq ($(NVCC),) -ifneq ($(shell $(CXX) --version | grep ^Intel),) -$(fcu_main): LIBFLAGS += -lintlc # compile with icpx and link with nvcc (undefined reference to `_intel_fast_memcpy') -$(fcu_main): LIBFLAGS += -lsvml # compile with icpx and link with nvcc (undefined reference to `__svml_cos4_l9') -endif -ifeq ($(UNAME_S),Darwin) -$(fcu_main): LIBFLAGS += -L$(shell dirname $(shell $(FC) --print-file-name libgfortran.dylib)) # add path to libgfortran on Mac #375 -endif -$(fcu_main): LIBFLAGS += $(CULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH -$(fcu_main): $(BUILDDIR)/fcheck_sa.o $(BUILDDIR)/fsampler_cu.o $(LIBDIR)/lib$(MG5AMC_CULIB).so $(cu_objects_exe) - $(NVCC) -o $@ $(BUILDDIR)/fcheck_sa.o $(BUILDDIR)/fsampler_cu.o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_CULIB) $(cu_objects_exe) -endif - #------------------------------------------------------------------------------- # Target (and build rules): test objects and test executable @@ -744,6 +691,74 @@ endif #------------------------------------------------------------------------------- +# CUDA Target + +cuda: + + # Generic target and build rules: objects from CUDA compilation + ifneq ($(NVCC),) + $(BUILDDIR)/%.o : %.cu *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) + @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi + $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c $< -o $@ + + $(BUILDDIR)/%_cu.o : %.cc *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) + @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi + $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c -x cu $< -o $@ + endif + + $(BUILDDIR)/gcheck_sa.o: CXXFLAGS += $(USE_NVTX) $(CUINC) + $(BUILDDIR)/gcheck_sa.o: CXXFLAGS += $(CXXFLAGSCURAND) + ifeq ($(RNDGEN),hasCurand) + $(BUILDDIR)/CurandRandomNumberKernel.o: CXXFLAGS += $(CUINC) + endif + + # Avoid "warning: builtin __has_trivial_... is deprecated; use __is_trivially_... instead" in nvcc with icx2023 (#592) + ifneq ($(shell $(CXX) --version | egrep '^(Intel)'),) + ifneq ($(NVCC),) + CUFLAGS += -Xcompiler -Wno-deprecated-builtins + endif + endif + + ifneq ($(NVCC),) + MG5AMC_CULIB = mg5amc_$(processid_short)_cuda + cu_objects_lib=$(BUILDDIR)/gCPPProcess.o $(BUILDDIR)/gMatrixElementKernels.o $(BUILDDIR)/gBridgeKernels.o $(BUILDDIR)/gCrossSectionKernels.o + cu_objects_exe=$(BUILDDIR)/gCommonRandomNumberKernel.o $(BUILDDIR)/gRamboSamplingKernels.o + endif + + ifneq ($(NVCC),) + $(LIBDIR)/lib$(MG5AMC_CULIB).so: $(BUILDDIR)/fbridge_cu.o + $(LIBDIR)/lib$(MG5AMC_CULIB).so: cu_objects_lib += $(BUILDDIR)/fbridge_cu.o + $(LIBDIR)/lib$(MG5AMC_CULIB).so: $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_objects_lib) + $(NVCC) --shared -o $@ $(cu_objects_lib) $(CULIBFLAGSRPATH2) -L$(LIBDIR) -l$(MG5AMC_COMMONLIB) + endif + + ifneq ($(NVCC),) + ifneq ($(shell $(CXX) --version | grep ^Intel),) + $(cu_main): LIBFLAGS += -lintlc # compile with icpx and link with nvcc (undefined reference to `_intel_fast_memcpy') + $(cu_main): LIBFLAGS += -lsvml # compile with icpx and link with nvcc (undefined reference to `__svml_cos4_l9') + else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 + $(cu_main): LIBFLAGS += -L$(patsubst %bin/nvc++,%lib,$(subst ccache ,,$(CXX))) -lnvhpcatm -lnvcpumath -lnvc + endif + $(cu_main): LIBFLAGS += $(CULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH + $(cu_main): $(BUILDDIR)/gcheck_sa.o $(LIBDIR)/lib$(MG5AMC_CULIB).so $(cu_objects_exe) $(BUILDDIR)/gCurandRandomNumberKernel.o + $(NVCC) -o $@ $(BUILDDIR)/gcheck_sa.o $(CUARCHFLAGS) $(LIBFLAGS) -L$(LIBDIR) -l$(MG5AMC_CULIB) $(cu_objects_exe) $(BUILDDIR)/gCurandRandomNumberKernel.o $(CURANDLIBFLAGS) + endif + + ifneq ($(NVCC),) + ifneq ($(shell $(CXX) --version | grep ^Intel),) + $(fcu_main): LIBFLAGS += -lintlc # compile with icpx and link with nvcc (undefined reference to `_intel_fast_memcpy') + $(fcu_main): LIBFLAGS += -lsvml # compile with icpx and link with nvcc (undefined reference to `__svml_cos4_l9') + endif + ifeq ($(UNAME_S),Darwin) + $(fcu_main): LIBFLAGS += -L$(shell dirname $(shell $(FC) --print-file-name libgfortran.dylib)) # add path to libgfortran on Mac #375 + endif + $(fcu_main): LIBFLAGS += $(CULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH + $(fcu_main): $(BUILDDIR)/fcheck_sa.o $(BUILDDIR)/fsampler_cu.o $(LIBDIR)/lib$(MG5AMC_CULIB).so $(cu_objects_exe) + $(NVCC) -o $@ $(BUILDDIR)/fcheck_sa.o $(BUILDDIR)/fsampler_cu.o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_CULIB) $(cu_objects_exe) + endif + +#------------------------------------------------------------------------------- + # Target: clean the builds .PHONY: clean @@ -863,4 +878,4 @@ cmpFGcheck: all.$(TAG) memcheck: all.$(TAG) $(RUNTIME) $(CUDA_HOME)/bin/cuda-memcheck --check-api-memory-access yes --check-deprecated-instr yes --check-device-heap yes --demangle full --language c --leak-check full --racecheck-report all --report-api-errors all --show-backtrace yes --tool memcheck --track-unused-memory yes $(BUILDDIR)/gcheck.exe -p 2 32 2 -#------------------------------------------------------------------------------- +#------------------------------------------------------------------------------- \ No newline at end of file From c945deb624ac13fc93d09a546029325e4f3429dd Mon Sep 17 00:00:00 2001 From: Jorgen Date: Mon, 21 Aug 2023 14:58:47 +0200 Subject: [PATCH 002/129] Fixed indentation in the makefile --- epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk index ba45b3f32d..d7cdbe259d 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk @@ -697,13 +697,13 @@ cuda: # Generic target and build rules: objects from CUDA compilation ifneq ($(NVCC),) - $(BUILDDIR)/%.o : %.cu *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c $< -o $@ + $(BUILDDIR)/%.o : %.cu *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) + @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi + $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c $< -o $@ - $(BUILDDIR)/%_cu.o : %.cc *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c -x cu $< -o $@ + $(BUILDDIR)/%_cu.o : %.cc *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) + @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi + $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c -x cu $< -o $@ endif $(BUILDDIR)/gcheck_sa.o: CXXFLAGS += $(USE_NVTX) $(CUINC) From 36a5fa70216b13235e0fc5cea56b692a14de2186 Mon Sep 17 00:00:00 2001 From: Jorgen Date: Mon, 21 Aug 2023 15:08:59 +0200 Subject: [PATCH 003/129] Removed all unneccessary NVCC ifneq and redid indentation --- .../cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk | 87 ++++++++----------- 1 file changed, 36 insertions(+), 51 deletions(-) diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk index d7cdbe259d..087161f84e 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk @@ -445,14 +445,6 @@ override RUNTIME = cxx_main=$(BUILDDIR)/check.exe fcxx_main=$(BUILDDIR)/fcheck.exe -ifneq ($(NVCC),) -cu_main=$(BUILDDIR)/gcheck.exe -fcu_main=$(BUILDDIR)/fgcheck.exe -else -cu_main= -fcu_main= -endif - testmain=$(BUILDDIR)/runTest.exe ifneq ($(GTESTLIBS),) @@ -485,9 +477,6 @@ $(BUILDDIR)/%.o : %.cc *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) ifeq ($(shell $(CXX) --version | grep ^nvc++),) $(BUILDDIR)/CrossSectionKernels.o: CXXFLAGS := $(filter-out -ffast-math,$(CXXFLAGS)) $(BUILDDIR)/CrossSectionKernels.o: CXXFLAGS += -fno-fast-math -ifneq ($(NVCC),) -$(BUILDDIR)/gCrossSectionKernels.o: CUFLAGS += -Xcompiler -fno-fast-math -endif endif # Apply special build flags only to check_sa.o and gcheck_sa.o (NVTX in timermap.h, #679) @@ -695,17 +684,21 @@ endif cuda: - # Generic target and build rules: objects from CUDA compilation ifneq ($(NVCC),) - $(BUILDDIR)/%.o : %.cu *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c $< -o $@ + + cu_main=$(BUILDDIR)/gcheck.exe + fcu_main=$(BUILDDIR)/fgcheck.exe - $(BUILDDIR)/%_cu.o : %.cc *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c -x cu $< -o $@ - endif + # Generic target and build rules: objects from CUDA compilation + $(BUILDDIR)/%.o : %.cu *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) + @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi + $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c $< -o $@ + $(BUILDDIR)/%_cu.o : %.cc *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) + @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi + $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c -x cu $< -o $@ + + $(BUILDDIR)/gCrossSectionKernels.o: CUFLAGS += -Xcompiler -fno-fast-math $(BUILDDIR)/gcheck_sa.o: CXXFLAGS += $(USE_NVTX) $(CUINC) $(BUILDDIR)/gcheck_sa.o: CXXFLAGS += $(CXXFLAGSCURAND) ifeq ($(RNDGEN),hasCurand) @@ -714,48 +707,40 @@ cuda: # Avoid "warning: builtin __has_trivial_... is deprecated; use __is_trivially_... instead" in nvcc with icx2023 (#592) ifneq ($(shell $(CXX) --version | egrep '^(Intel)'),) - ifneq ($(NVCC),) - CUFLAGS += -Xcompiler -Wno-deprecated-builtins - endif + CUFLAGS += -Xcompiler -Wno-deprecated-builtins endif - ifneq ($(NVCC),) - MG5AMC_CULIB = mg5amc_$(processid_short)_cuda - cu_objects_lib=$(BUILDDIR)/gCPPProcess.o $(BUILDDIR)/gMatrixElementKernels.o $(BUILDDIR)/gBridgeKernels.o $(BUILDDIR)/gCrossSectionKernels.o - cu_objects_exe=$(BUILDDIR)/gCommonRandomNumberKernel.o $(BUILDDIR)/gRamboSamplingKernels.o - endif - - ifneq ($(NVCC),) - $(LIBDIR)/lib$(MG5AMC_CULIB).so: $(BUILDDIR)/fbridge_cu.o - $(LIBDIR)/lib$(MG5AMC_CULIB).so: cu_objects_lib += $(BUILDDIR)/fbridge_cu.o - $(LIBDIR)/lib$(MG5AMC_CULIB).so: $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_objects_lib) - $(NVCC) --shared -o $@ $(cu_objects_lib) $(CULIBFLAGSRPATH2) -L$(LIBDIR) -l$(MG5AMC_COMMONLIB) - endif + MG5AMC_CULIB = mg5amc_$(processid_short)_cuda + cu_objects_lib=$(BUILDDIR)/gCPPProcess.o $(BUILDDIR)/gMatrixElementKernels.o $(BUILDDIR)/gBridgeKernels.o $(BUILDDIR)/gCrossSectionKernels.o + cu_objects_exe=$(BUILDDIR)/gCommonRandomNumberKernel.o $(BUILDDIR)/gRamboSamplingKernels.o + + $(LIBDIR)/lib$(MG5AMC_CULIB).so: $(BUILDDIR)/fbridge_cu.o + $(LIBDIR)/lib$(MG5AMC_CULIB).so: cu_objects_lib += $(BUILDDIR)/fbridge_cu.o + $(LIBDIR)/lib$(MG5AMC_CULIB).so: $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_objects_lib) + $(NVCC) --shared -o $@ $(cu_objects_lib) $(CULIBFLAGSRPATH2) -L$(LIBDIR) -l$(MG5AMC_COMMONLIB) + + ifneq ($(shell $(CXX) --version | grep ^Intel),) + $(cu_main): LIBFLAGS += -lintlc # compile with icpx and link with nvcc (undefined reference to `_intel_fast_memcpy') + $(cu_main): LIBFLAGS += -lsvml # compile with icpx and link with nvcc (undefined reference to `__svml_cos4_l9') + else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 + $(cu_main): LIBFLAGS += -L$(patsubst %bin/nvc++,%lib,$(subst ccache ,,$(CXX))) -lnvhpcatm -lnvcpumath -lnvc + endif + $(cu_main): LIBFLAGS += $(CULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH + $(cu_main): $(BUILDDIR)/gcheck_sa.o $(LIBDIR)/lib$(MG5AMC_CULIB).so $(cu_objects_exe) $(BUILDDIR)/gCurandRandomNumberKernel.o + $(NVCC) -o $@ $(BUILDDIR)/gcheck_sa.o $(CUARCHFLAGS) $(LIBFLAGS) -L$(LIBDIR) -l$(MG5AMC_CULIB) $(cu_objects_exe) $(BUILDDIR)/gCurandRandomNumberKernel.o $(CURANDLIBFLAGS) - ifneq ($(NVCC),) - ifneq ($(shell $(CXX) --version | grep ^Intel),) - $(cu_main): LIBFLAGS += -lintlc # compile with icpx and link with nvcc (undefined reference to `_intel_fast_memcpy') - $(cu_main): LIBFLAGS += -lsvml # compile with icpx and link with nvcc (undefined reference to `__svml_cos4_l9') - else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 - $(cu_main): LIBFLAGS += -L$(patsubst %bin/nvc++,%lib,$(subst ccache ,,$(CXX))) -lnvhpcatm -lnvcpumath -lnvc - endif - $(cu_main): LIBFLAGS += $(CULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH - $(cu_main): $(BUILDDIR)/gcheck_sa.o $(LIBDIR)/lib$(MG5AMC_CULIB).so $(cu_objects_exe) $(BUILDDIR)/gCurandRandomNumberKernel.o - $(NVCC) -o $@ $(BUILDDIR)/gcheck_sa.o $(CUARCHFLAGS) $(LIBFLAGS) -L$(LIBDIR) -l$(MG5AMC_CULIB) $(cu_objects_exe) $(BUILDDIR)/gCurandRandomNumberKernel.o $(CURANDLIBFLAGS) - endif - - ifneq ($(NVCC),) ifneq ($(shell $(CXX) --version | grep ^Intel),) - $(fcu_main): LIBFLAGS += -lintlc # compile with icpx and link with nvcc (undefined reference to `_intel_fast_memcpy') - $(fcu_main): LIBFLAGS += -lsvml # compile with icpx and link with nvcc (undefined reference to `__svml_cos4_l9') + $(fcu_main): LIBFLAGS += -lintlc # compile with icpx and link with nvcc (undefined reference to `_intel_fast_memcpy') + $(fcu_main): LIBFLAGS += -lsvml # compile with icpx and link with nvcc (undefined reference to `__svml_cos4_l9') endif ifeq ($(UNAME_S),Darwin) - $(fcu_main): LIBFLAGS += -L$(shell dirname $(shell $(FC) --print-file-name libgfortran.dylib)) # add path to libgfortran on Mac #375 + $(fcu_main): LIBFLAGS += -L$(shell dirname $(shell $(FC) --print-file-name libgfortran.dylib)) # add path to libgfortran on Mac #375 endif $(fcu_main): LIBFLAGS += $(CULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH $(fcu_main): $(BUILDDIR)/fcheck_sa.o $(BUILDDIR)/fsampler_cu.o $(LIBDIR)/lib$(MG5AMC_CULIB).so $(cu_objects_exe) $(NVCC) -o $@ $(BUILDDIR)/fcheck_sa.o $(BUILDDIR)/fsampler_cu.o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_CULIB) $(cu_objects_exe) - endif + + endif # ifneq ($(NVCC),) #------------------------------------------------------------------------------- From 0b95fb785a488184395854fb2514fba849abbcc8 Mon Sep 17 00:00:00 2001 From: Jorgen Date: Mon, 21 Aug 2023 15:34:30 +0200 Subject: [PATCH 004/129] Convert all spaces to tabs in cudacpp.mk file --- .../cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk | 356 +++++++++--------- 1 file changed, 178 insertions(+), 178 deletions(-) diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk index 087161f84e..6c8711041a 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk @@ -108,53 +108,53 @@ endif # If CXX is not a single word (example "clang++ --gcc-toolchain...") then disable CUDA builds (issue #505) # This is because it is impossible to pass this to "CUFLAGS += -ccbin " below ifneq ($(words $(subst ccache ,,$(CXX))),1) # allow at most "CXX=ccache " from outside - $(warning CUDA builds are not supported for multi-word CXX "$(CXX)") - override CUDA_HOME=disabled + $(warning CUDA builds are not supported for multi-word CXX "$(CXX)") + override CUDA_HOME=disabled endif # If CUDA_HOME is not set, try to set it from the location of nvcc ifndef CUDA_HOME - CUDA_HOME = $(patsubst %bin/nvcc,%,$(shell which nvcc 2>/dev/null)) - $(warning CUDA_HOME was not set: using "$(CUDA_HOME)") + CUDA_HOME = $(patsubst %bin/nvcc,%,$(shell which nvcc 2>/dev/null)) + $(warning CUDA_HOME was not set: using "$(CUDA_HOME)") endif # Set NVCC as $(CUDA_HOME)/bin/nvcc if it exists ifneq ($(wildcard $(CUDA_HOME)/bin/nvcc),) - NVCC = $(CUDA_HOME)/bin/nvcc - USE_NVTX ?=-DUSE_NVTX - # See https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html - # See https://arnon.dk/matching-sm-architectures-arch-and-gencode-for-various-nvidia-cards/ - # Default: use compute capability 70 for V100 (CERN lxbatch, CERN itscrd, Juwels Cluster). - # Embed device code for 70, and PTX for 70+. - # Export MADGRAPH_CUDA_ARCHITECTURE (comma-separated list) to use another value or list of values (see #533). - # Examples: use 60 for P100 (Piz Daint), 80 for A100 (Juwels Booster, NVidia raplab/Curiosity). - MADGRAPH_CUDA_ARCHITECTURE ?= 70 - ###CUARCHFLAGS = -gencode arch=compute_$(MADGRAPH_CUDA_ARCHITECTURE),code=compute_$(MADGRAPH_CUDA_ARCHITECTURE) -gencode arch=compute_$(MADGRAPH_CUDA_ARCHITECTURE),code=sm_$(MADGRAPH_CUDA_ARCHITECTURE) # Older implementation (AV): go back to this one for multi-GPU support #533 - ###CUARCHFLAGS = --gpu-architecture=compute_$(MADGRAPH_CUDA_ARCHITECTURE) --gpu-code=sm_$(MADGRAPH_CUDA_ARCHITECTURE),compute_$(MADGRAPH_CUDA_ARCHITECTURE) # Newer implementation (SH): cannot use this as-is for multi-GPU support #533 - comma:=, - CUARCHFLAGS = $(foreach arch,$(subst $(comma), ,$(MADGRAPH_CUDA_ARCHITECTURE)),-gencode arch=compute_$(arch),code=compute_$(arch) -gencode arch=compute_$(arch),code=sm_$(arch)) - CUINC = -I$(CUDA_HOME)/include/ - CURANDLIBFLAGS = -L$(CUDA_HOME)/lib64/ -lcurand # NB: -lcuda is not needed here! - CUOPTFLAGS = -lineinfo - CUFLAGS = $(foreach opt, $(OPTFLAGS), -Xcompiler $(opt)) $(CUOPTFLAGS) $(INCFLAGS) $(CUINC) $(USE_NVTX) $(CUARCHFLAGS) -use_fast_math - ###CUFLAGS += -Xcompiler -Wall -Xcompiler -Wextra -Xcompiler -Wshadow - ###NVCC_VERSION = $(shell $(NVCC) --version | grep 'Cuda compilation tools' | cut -d' ' -f5 | cut -d, -f1) - CUFLAGS += -std=c++17 # need CUDA >= 11.2 (see #333): this is enforced in mgOnGpuConfig.h - # Without -maxrregcount: baseline throughput: 6.5E8 (16384 32 12) up to 7.3E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 160 # improves throughput: 6.9E8 (16384 32 12) up to 7.7E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 128 # improves throughput: 7.3E8 (16384 32 12) up to 7.6E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 96 # degrades throughput: 4.1E8 (16384 32 12) up to 4.5E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 64 # degrades throughput: 1.7E8 (16384 32 12) flat at 1.7E8 (65536 128 12) + NVCC = $(CUDA_HOME)/bin/nvcc + USE_NVTX ?=-DUSE_NVTX + # See https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html + # See https://arnon.dk/matching-sm-architectures-arch-and-gencode-for-various-nvidia-cards/ + # Default: use compute capability 70 for V100 (CERN lxbatch, CERN itscrd, Juwels Cluster). + # Embed device code for 70, and PTX for 70+. + # Export MADGRAPH_CUDA_ARCHITECTURE (comma-separated list) to use another value or list of values (see #533). + # Examples: use 60 for P100 (Piz Daint), 80 for A100 (Juwels Booster, NVidia raplab/Curiosity). + MADGRAPH_CUDA_ARCHITECTURE ?= 70 + ###CUARCHFLAGS = -gencode arch=compute_$(MADGRAPH_CUDA_ARCHITECTURE),code=compute_$(MADGRAPH_CUDA_ARCHITECTURE) -gencode arch=compute_$(MADGRAPH_CUDA_ARCHITECTURE),code=sm_$(MADGRAPH_CUDA_ARCHITECTURE) # Older implementation (AV): go back to this one for multi-GPU support #533 + ###CUARCHFLAGS = --gpu-architecture=compute_$(MADGRAPH_CUDA_ARCHITECTURE) --gpu-code=sm_$(MADGRAPH_CUDA_ARCHITECTURE),compute_$(MADGRAPH_CUDA_ARCHITECTURE) # Newer implementation (SH): cannot use this as-is for multi-GPU support #533 + comma:=, + CUARCHFLAGS = $(foreach arch,$(subst $(comma), ,$(MADGRAPH_CUDA_ARCHITECTURE)),-gencode arch=compute_$(arch),code=compute_$(arch) -gencode arch=compute_$(arch),code=sm_$(arch)) + CUINC = -I$(CUDA_HOME)/include/ + CURANDLIBFLAGS = -L$(CUDA_HOME)/lib64/ -lcurand # NB: -lcuda is not needed here! + CUOPTFLAGS = -lineinfo + CUFLAGS = $(foreach opt, $(OPTFLAGS), -Xcompiler $(opt)) $(CUOPTFLAGS) $(INCFLAGS) $(CUINC) $(USE_NVTX) $(CUARCHFLAGS) -use_fast_math + ###CUFLAGS += -Xcompiler -Wall -Xcompiler -Wextra -Xcompiler -Wshadow + ###NVCC_VERSION = $(shell $(NVCC) --version | grep 'Cuda compilation tools' | cut -d' ' -f5 | cut -d, -f1) + CUFLAGS += -std=c++17 # need CUDA >= 11.2 (see #333): this is enforced in mgOnGpuConfig.h + # Without -maxrregcount: baseline throughput: 6.5E8 (16384 32 12) up to 7.3E8 (65536 128 12) + ###CUFLAGS+= --maxrregcount 160 # improves throughput: 6.9E8 (16384 32 12) up to 7.7E8 (65536 128 12) + ###CUFLAGS+= --maxrregcount 128 # improves throughput: 7.3E8 (16384 32 12) up to 7.6E8 (65536 128 12) + ###CUFLAGS+= --maxrregcount 96 # degrades throughput: 4.1E8 (16384 32 12) up to 4.5E8 (65536 128 12) + ###CUFLAGS+= --maxrregcount 64 # degrades throughput: 1.7E8 (16384 32 12) flat at 1.7E8 (65536 128 12) else ifneq ($(origin REQUIRE_CUDA),undefined) - # If REQUIRE_CUDA is set but no cuda is found, stop here (e.g. for CI tests on GPU #443) - $(error No cuda installation found (set CUDA_HOME or make nvcc visible in PATH)) + # If REQUIRE_CUDA is set but no cuda is found, stop here (e.g. for CI tests on GPU #443) + $(error No cuda installation found (set CUDA_HOME or make nvcc visible in PATH)) else - # No cuda. Switch cuda compilation off and go to common random numbers in C++ - $(warning CUDA_HOME is not set or is invalid: export CUDA_HOME to compile with cuda) - override NVCC= - override USE_NVTX= - override CUINC= - override CURANDLIBFLAGS= + # No cuda. Switch cuda compilation off and go to common random numbers in C++ + $(warning CUDA_HOME is not set or is invalid: export CUDA_HOME to compile with cuda) + override NVCC= + override USE_NVTX= + override CUINC= + override CURANDLIBFLAGS= endif export NVCC export CUFLAGS @@ -174,15 +174,15 @@ endif # Enable ccache if USECCACHE=1 ifeq ($(USECCACHE)$(shell echo $(CXX) | grep ccache),1) - override CXX:=ccache $(CXX) + override CXX:=ccache $(CXX) endif #ifeq ($(USECCACHE)$(shell echo $(AR) | grep ccache),1) # override AR:=ccache $(AR) #endif ifneq ($(NVCC),) - ifeq ($(USECCACHE)$(shell echo $(NVCC) | grep ccache),1) - override NVCC:=ccache $(NVCC) - endif + ifeq ($(USECCACHE)$(shell echo $(NVCC) | grep ccache),1) + override NVCC:=ccache $(NVCC) + endif endif #------------------------------------------------------------------------------- @@ -191,21 +191,21 @@ endif # PowerPC-specific CXX compiler flags (being reviewed) ifeq ($(UNAME_P),ppc64le) - CXXFLAGS+= -mcpu=power9 -mtune=power9 # gains ~2-3% both for none and sse4 - # Throughput references without the extra flags below: none=1.41-1.42E6, sse4=2.15-2.19E6 - ###CXXFLAGS+= -DNO_WARN_X86_INTRINSICS # no change - ###CXXFLAGS+= -fpeel-loops # no change - ###CXXFLAGS+= -funroll-loops # gains ~1% for none, loses ~1% for sse4 - ###CXXFLAGS+= -ftree-vectorize # no change - ###CXXFLAGS+= -flto # would increase to none=4.08-4.12E6, sse4=4.99-5.03E6! + CXXFLAGS+= -mcpu=power9 -mtune=power9 # gains ~2-3% both for none and sse4 + # Throughput references without the extra flags below: none=1.41-1.42E6, sse4=2.15-2.19E6 + ###CXXFLAGS+= -DNO_WARN_X86_INTRINSICS # no change + ###CXXFLAGS+= -fpeel-loops # no change + ###CXXFLAGS+= -funroll-loops # gains ~1% for none, loses ~1% for sse4 + ###CXXFLAGS+= -ftree-vectorize # no change + ###CXXFLAGS+= -flto # would increase to none=4.08-4.12E6, sse4=4.99-5.03E6! else - ###CXXFLAGS+= -flto # also on Intel this would increase throughputs by a factor 2 to 4... - ######CXXFLAGS+= -fno-semantic-interposition # no benefit (neither alone, nor combined with -flto) + ###CXXFLAGS+= -flto # also on Intel this would increase throughputs by a factor 2 to 4... + ######CXXFLAGS+= -fno-semantic-interposition # no benefit (neither alone, nor combined with -flto) endif # PowerPC-specific CUDA compiler flags (to be reviewed!) ifeq ($(UNAME_P),ppc64le) - CUFLAGS+= -Xcompiler -mno-float128 + CUFLAGS+= -Xcompiler -mno-float128 endif #------------------------------------------------------------------------------- @@ -228,52 +228,52 @@ endif # Set the default AVX (vectorization) choice ifeq ($(AVX),) - ifeq ($(UNAME_P),ppc64le) - ###override AVX = none - override AVX = sse4 - else ifeq ($(UNAME_P),arm) - ###override AVX = none - override AVX = sse4 - else ifeq ($(wildcard /proc/cpuinfo),) - override AVX = none - $(warning Using AVX='$(AVX)' because host SIMD features cannot be read from /proc/cpuinfo) - else ifeq ($(shell grep -m1 -c avx512vl /proc/cpuinfo)$(shell $(CXX) --version | grep ^clang),1) - override AVX = 512y - ###$(info Using AVX='$(AVX)' as no user input exists) - else - override AVX = avx2 - ifneq ($(shell grep -m1 -c avx512vl /proc/cpuinfo),1) - $(warning Using AVX='$(AVX)' because host does not support avx512vl) - else - $(warning Using AVX='$(AVX)' because this is faster than avx512vl for clang) - endif - endif + ifeq ($(UNAME_P),ppc64le) + ###override AVX = none + override AVX = sse4 + else ifeq ($(UNAME_P),arm) + ###override AVX = none + override AVX = sse4 + else ifeq ($(wildcard /proc/cpuinfo),) + override AVX = none + $(warning Using AVX='$(AVX)' because host SIMD features cannot be read from /proc/cpuinfo) + else ifeq ($(shell grep -m1 -c avx512vl /proc/cpuinfo)$(shell $(CXX) --version | grep ^clang),1) + override AVX = 512y + ###$(info Using AVX='$(AVX)' as no user input exists) + else + override AVX = avx2 + ifneq ($(shell grep -m1 -c avx512vl /proc/cpuinfo),1) + $(warning Using AVX='$(AVX)' because host does not support avx512vl) + else + $(warning Using AVX='$(AVX)' because this is faster than avx512vl for clang) + endif + endif else - ###$(info Using AVX='$(AVX)' according to user input) + ###$(info Using AVX='$(AVX)' according to user input) endif # Set the default FPTYPE (floating point type) choice ifeq ($(FPTYPE),) - override FPTYPE = d + override FPTYPE = d endif # Set the default HELINL (inline helicities?) choice ifeq ($(HELINL),) - override HELINL = 0 + override HELINL = 0 endif # Set the default HRDCOD (hardcode cIPD physics parameters?) choice ifeq ($(HRDCOD),) - override HRDCOD = 0 + override HRDCOD = 0 endif # Set the default RNDGEN (random number generator) choice ifeq ($(RNDGEN),) - ifeq ($(NVCC),) - override RNDGEN = hasNoCurand - else ifeq ($(RNDGEN),) - override RNDGEN = hasCurand - endif + ifeq ($(NVCC),) + override RNDGEN = hasNoCurand + else ifeq ($(RNDGEN),) + override RNDGEN = hasCurand + endif endif # Export AVX, FPTYPE, HELINL, HRDCOD, RNDGEN, OMPFLAGS so that it is not necessary to pass them to the src Makefile too @@ -297,45 +297,45 @@ CXXFLAGS += $(OMPFLAGS) # [See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96476] $(info AVX=$(AVX)) ifeq ($(UNAME_P),ppc64le) - ifeq ($(AVX),sse4) - override AVXFLAGS = -D__SSE4_2__ # Power9 VSX with 128 width (VSR registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on PowerPC for the moment) - endif + ifeq ($(AVX),sse4) + override AVXFLAGS = -D__SSE4_2__ # Power9 VSX with 128 width (VSR registers) + else ifneq ($(AVX),none) + $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on PowerPC for the moment) + endif else ifeq ($(UNAME_P),arm) - ifeq ($(AVX),sse4) - override AVXFLAGS = -D__SSE4_2__ # ARM NEON with 128 width (Q/quadword registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on ARM for the moment) - endif + ifeq ($(AVX),sse4) + override AVXFLAGS = -D__SSE4_2__ # ARM NEON with 128 width (Q/quadword registers) + else ifneq ($(AVX),none) + $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on ARM for the moment) + endif else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 - ifeq ($(AVX),none) - override AVXFLAGS = -mno-sse3 # no SIMD - else ifeq ($(AVX),sse4) - override AVXFLAGS = -mno-avx # SSE4.2 with 128 width (xmm registers) - else ifeq ($(AVX),avx2) - override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(AVX),512y) - override AVXFLAGS = -march=skylake -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(AVX),512z) - override AVXFLAGS = -march=skylake -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) - else - $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) - endif + ifeq ($(AVX),none) + override AVXFLAGS = -mno-sse3 # no SIMD + else ifeq ($(AVX),sse4) + override AVXFLAGS = -mno-avx # SSE4.2 with 128 width (xmm registers) + else ifeq ($(AVX),avx2) + override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] + else ifeq ($(AVX),512y) + override AVXFLAGS = -march=skylake -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] + else ifeq ($(AVX),512z) + override AVXFLAGS = -march=skylake -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) + else + $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) + endif else - ifeq ($(AVX),none) - override AVXFLAGS = -march=x86-64 # no SIMD (see #588) - else ifeq ($(AVX),sse4) - override AVXFLAGS = -march=nehalem # SSE4.2 with 128 width (xmm registers) - else ifeq ($(AVX),avx2) - override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(AVX),512y) - override AVXFLAGS = -march=skylake-avx512 -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(AVX),512z) - override AVXFLAGS = -march=skylake-avx512 -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) - else - $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) - endif + ifeq ($(AVX),none) + override AVXFLAGS = -march=x86-64 # no SIMD (see #588) + else ifeq ($(AVX),sse4) + override AVXFLAGS = -march=nehalem # SSE4.2 with 128 width (xmm registers) + else ifeq ($(AVX),avx2) + override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] + else ifeq ($(AVX),512y) + override AVXFLAGS = -march=skylake-avx512 -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] + else ifeq ($(AVX),512z) + override AVXFLAGS = -march=skylake-avx512 -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) + else + $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) + endif endif # For the moment, use AVXFLAGS everywhere: eventually, use them only in encapsulated implementations? CXXFLAGS+= $(AVXFLAGS) @@ -343,44 +343,44 @@ CXXFLAGS+= $(AVXFLAGS) # Set the build flags appropriate to each FPTYPE choice (example: "make FPTYPE=f") $(info FPTYPE=$(FPTYPE)) ifeq ($(FPTYPE),d) - CXXFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_DOUBLE - CUFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_DOUBLE + CXXFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_DOUBLE + CUFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_DOUBLE else ifeq ($(FPTYPE),f) - CXXFLAGS += -DMGONGPU_FPTYPE_FLOAT -DMGONGPU_FPTYPE2_FLOAT - CUFLAGS += -DMGONGPU_FPTYPE_FLOAT -DMGONGPU_FPTYPE2_FLOAT + CXXFLAGS += -DMGONGPU_FPTYPE_FLOAT -DMGONGPU_FPTYPE2_FLOAT + CUFLAGS += -DMGONGPU_FPTYPE_FLOAT -DMGONGPU_FPTYPE2_FLOAT else ifeq ($(FPTYPE),m) - CXXFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_FLOAT - CUFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_FLOAT + CXXFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_FLOAT + CUFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_FLOAT else - $(error Unknown FPTYPE='$(FPTYPE)': only 'd', 'f' and 'm' are supported) + $(error Unknown FPTYPE='$(FPTYPE)': only 'd', 'f' and 'm' are supported) endif # Set the build flags appropriate to each HELINL choice (example: "make HELINL=1") $(info HELINL=$(HELINL)) ifeq ($(HELINL),1) - CXXFLAGS += -DMGONGPU_INLINE_HELAMPS - CUFLAGS += -DMGONGPU_INLINE_HELAMPS + CXXFLAGS += -DMGONGPU_INLINE_HELAMPS + CUFLAGS += -DMGONGPU_INLINE_HELAMPS else ifneq ($(HELINL),0) - $(error Unknown HELINL='$(HELINL)': only '0' and '1' are supported) + $(error Unknown HELINL='$(HELINL)': only '0' and '1' are supported) endif # Set the build flags appropriate to each HRDCOD choice (example: "make HRDCOD=1") $(info HRDCOD=$(HRDCOD)) ifeq ($(HRDCOD),1) - CXXFLAGS += -DMGONGPU_HARDCODE_PARAM - CUFLAGS += -DMGONGPU_HARDCODE_PARAM + CXXFLAGS += -DMGONGPU_HARDCODE_PARAM + CUFLAGS += -DMGONGPU_HARDCODE_PARAM else ifneq ($(HRDCOD),0) - $(error Unknown HRDCOD='$(HRDCOD)': only '0' and '1' are supported) + $(error Unknown HRDCOD='$(HRDCOD)': only '0' and '1' are supported) endif # Set the build flags appropriate to each RNDGEN choice (example: "make RNDGEN=hasNoCurand") $(info RNDGEN=$(RNDGEN)) ifeq ($(RNDGEN),hasNoCurand) - override CXXFLAGSCURAND = -DMGONGPU_HAS_NO_CURAND + override CXXFLAGSCURAND = -DMGONGPU_HAS_NO_CURAND else ifeq ($(RNDGEN),hasCurand) - override CXXFLAGSCURAND = + override CXXFLAGSCURAND = else - $(error Unknown RNDGEN='$(RNDGEN)': only 'hasCurand' and 'hasNoCurand' are supported) + $(error Unknown RNDGEN='$(RNDGEN)': only 'hasCurand' and 'hasNoCurand' are supported) endif #------------------------------------------------------------------------------- @@ -390,30 +390,30 @@ endif # Build directory "short" tag (defines target and path to the optional build directory) # (Rationale: keep directory names shorter, e.g. do not include random number generator choice) ifneq ($(NVCC),) - override DIRTAG = cuda_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) + override DIRTAG = cuda_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) else - override DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) + override DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) endif # Build lockfile "full" tag (defines full specification of build options that cannot be intermixed) # (Rationale: avoid mixing of CUDA and no-CUDA environment builds with different random number generators) ifneq ($(NVCC),) - override TAG = cuda_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) + override TAG = cuda_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) else - override TAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) + override TAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) endif # Build directory: current directory by default, or build.$(DIRTAG) if USEBUILDDIR==1 ifeq ($(USEBUILDDIR),1) - override BUILDDIR = build.$(DIRTAG) - override LIBDIR = ../../lib/$(BUILDDIR) - override LIBDIRRPATH = '$$ORIGIN/../$(LIBDIR)' - $(info Building in BUILDDIR=$(BUILDDIR) for tag=$(TAG) (USEBUILDDIR is set = 1)) + override BUILDDIR = build.$(DIRTAG) + override LIBDIR = ../../lib/$(BUILDDIR) + override LIBDIRRPATH = '$$ORIGIN/../$(LIBDIR)' + $(info Building in BUILDDIR=$(BUILDDIR) for tag=$(TAG) (USEBUILDDIR is set = 1)) else - override BUILDDIR = . - override LIBDIR = ../../lib - override LIBDIRRPATH = '$$ORIGIN/$(LIBDIR)' - $(info Building in BUILDDIR=$(BUILDDIR) for tag=$(TAG) (USEBUILDDIR is not set)) + override BUILDDIR = . + override LIBDIR = ../../lib + override LIBDIRRPATH = '$$ORIGIN/$(LIBDIR)' + $(info Building in BUILDDIR=$(BUILDDIR) for tag=$(TAG) (USEBUILDDIR is not set)) endif ###override INCDIR = ../../include ###$(info Building in BUILDDIR=$(BUILDDIR) for tag=$(TAG)) @@ -422,17 +422,17 @@ endif # Use relative paths with respect to the executables or shared libraries ($ORIGIN on Linux) # On Darwin, building libraries with absolute paths in LIBDIR makes this unnecessary ifeq ($(UNAME_S),Darwin) - override CXXLIBFLAGSRPATH = - override CULIBFLAGSRPATH = - override CXXLIBFLAGSRPATH2 = - override CULIBFLAGSRPATH2 = + override CXXLIBFLAGSRPATH = + override CULIBFLAGSRPATH = + override CXXLIBFLAGSRPATH2 = + override CULIBFLAGSRPATH2 = else - # RPATH to cuda/cpp libs when linking executables - override CXXLIBFLAGSRPATH = -Wl,-rpath,$(LIBDIRRPATH) - override CULIBFLAGSRPATH = -Xlinker -rpath,$(LIBDIRRPATH) - # RPATH to common lib when linking cuda/cpp libs - override CXXLIBFLAGSRPATH2 = -Wl,-rpath,'$$ORIGIN' - override CULIBFLAGSRPATH2 = -Xlinker -rpath,'$$ORIGIN' + # RPATH to cuda/cpp libs when linking executables + override CXXLIBFLAGSRPATH = -Wl,-rpath,$(LIBDIRRPATH) + override CULIBFLAGSRPATH = -Xlinker -rpath,$(LIBDIRRPATH) + # RPATH to common lib when linking cuda/cpp libs + override CXXLIBFLAGSRPATH2 = -Wl,-rpath,'$$ORIGIN' + override CULIBFLAGSRPATH2 = -Xlinker -rpath,'$$ORIGIN' endif # Setting LD_LIBRARY_PATH or DYLD_LIBRARY_PATH in the RUNTIME is no longer necessary (neither on Linux nor on Mac) @@ -684,12 +684,12 @@ endif cuda: - ifneq ($(NVCC),) - - cu_main=$(BUILDDIR)/gcheck.exe - fcu_main=$(BUILDDIR)/fgcheck.exe + ifneq ($(NVCC),) - # Generic target and build rules: objects from CUDA compilation + cu_main=$(BUILDDIR)/gcheck.exe + fcu_main=$(BUILDDIR)/fgcheck.exe + + # Generic target and build rules: objects from CUDA compilation $(BUILDDIR)/%.o : %.cu *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c $< -o $@ @@ -698,17 +698,17 @@ cuda: @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c -x cu $< -o $@ - $(BUILDDIR)/gCrossSectionKernels.o: CUFLAGS += -Xcompiler -fno-fast-math - $(BUILDDIR)/gcheck_sa.o: CXXFLAGS += $(USE_NVTX) $(CUINC) - $(BUILDDIR)/gcheck_sa.o: CXXFLAGS += $(CXXFLAGSCURAND) - ifeq ($(RNDGEN),hasCurand) - $(BUILDDIR)/CurandRandomNumberKernel.o: CXXFLAGS += $(CUINC) - endif + $(BUILDDIR)/gCrossSectionKernels.o: CUFLAGS += -Xcompiler -fno-fast-math + $(BUILDDIR)/gcheck_sa.o: CXXFLAGS += $(USE_NVTX) $(CUINC) + $(BUILDDIR)/gcheck_sa.o: CXXFLAGS += $(CXXFLAGSCURAND) + ifeq ($(RNDGEN),hasCurand) + $(BUILDDIR)/CurandRandomNumberKernel.o: CXXFLAGS += $(CUINC) + endif - # Avoid "warning: builtin __has_trivial_... is deprecated; use __is_trivially_... instead" in nvcc with icx2023 (#592) - ifneq ($(shell $(CXX) --version | egrep '^(Intel)'),) + # Avoid "warning: builtin __has_trivial_... is deprecated; use __is_trivially_... instead" in nvcc with icx2023 (#592) + ifneq ($(shell $(CXX) --version | egrep '^(Intel)'),) CUFLAGS += -Xcompiler -Wno-deprecated-builtins - endif + endif MG5AMC_CULIB = mg5amc_$(processid_short)_cuda cu_objects_lib=$(BUILDDIR)/gCPPProcess.o $(BUILDDIR)/gMatrixElementKernels.o $(BUILDDIR)/gBridgeKernels.o $(BUILDDIR)/gCrossSectionKernels.o @@ -729,16 +729,16 @@ cuda: $(cu_main): $(BUILDDIR)/gcheck_sa.o $(LIBDIR)/lib$(MG5AMC_CULIB).so $(cu_objects_exe) $(BUILDDIR)/gCurandRandomNumberKernel.o $(NVCC) -o $@ $(BUILDDIR)/gcheck_sa.o $(CUARCHFLAGS) $(LIBFLAGS) -L$(LIBDIR) -l$(MG5AMC_CULIB) $(cu_objects_exe) $(BUILDDIR)/gCurandRandomNumberKernel.o $(CURANDLIBFLAGS) - ifneq ($(shell $(CXX) --version | grep ^Intel),) - $(fcu_main): LIBFLAGS += -lintlc # compile with icpx and link with nvcc (undefined reference to `_intel_fast_memcpy') - $(fcu_main): LIBFLAGS += -lsvml # compile with icpx and link with nvcc (undefined reference to `__svml_cos4_l9') - endif - ifeq ($(UNAME_S),Darwin) - $(fcu_main): LIBFLAGS += -L$(shell dirname $(shell $(FC) --print-file-name libgfortran.dylib)) # add path to libgfortran on Mac #375 - endif - $(fcu_main): LIBFLAGS += $(CULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH - $(fcu_main): $(BUILDDIR)/fcheck_sa.o $(BUILDDIR)/fsampler_cu.o $(LIBDIR)/lib$(MG5AMC_CULIB).so $(cu_objects_exe) - $(NVCC) -o $@ $(BUILDDIR)/fcheck_sa.o $(BUILDDIR)/fsampler_cu.o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_CULIB) $(cu_objects_exe) + ifneq ($(shell $(CXX) --version | grep ^Intel),) + $(fcu_main): LIBFLAGS += -lintlc # compile with icpx and link with nvcc (undefined reference to `_intel_fast_memcpy') + $(fcu_main): LIBFLAGS += -lsvml # compile with icpx and link with nvcc (undefined reference to `__svml_cos4_l9') + endif + ifeq ($(UNAME_S),Darwin) + $(fcu_main): LIBFLAGS += -L$(shell dirname $(shell $(FC) --print-file-name libgfortran.dylib)) # add path to libgfortran on Mac #375 + endif + $(fcu_main): LIBFLAGS += $(CULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH + $(fcu_main): $(BUILDDIR)/fcheck_sa.o $(BUILDDIR)/fsampler_cu.o $(LIBDIR)/lib$(MG5AMC_CULIB).so $(cu_objects_exe) + $(NVCC) -o $@ $(BUILDDIR)/fcheck_sa.o $(BUILDDIR)/fsampler_cu.o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_CULIB) $(cu_objects_exe) endif # ifneq ($(NVCC),) From 360d9088ce81c4e169766c75930779aacce85590 Mon Sep 17 00:00:00 2001 From: Jorgen Date: Mon, 21 Aug 2023 15:35:54 +0200 Subject: [PATCH 005/129] Revert "Convert all spaces to tabs in cudacpp.mk file" This reverts commit e38570f68045c88fd11858702e9e55e0e6fbfb1f. --- .../cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk | 356 +++++++++--------- 1 file changed, 178 insertions(+), 178 deletions(-) diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk index 6c8711041a..087161f84e 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk @@ -108,53 +108,53 @@ endif # If CXX is not a single word (example "clang++ --gcc-toolchain...") then disable CUDA builds (issue #505) # This is because it is impossible to pass this to "CUFLAGS += -ccbin " below ifneq ($(words $(subst ccache ,,$(CXX))),1) # allow at most "CXX=ccache " from outside - $(warning CUDA builds are not supported for multi-word CXX "$(CXX)") - override CUDA_HOME=disabled + $(warning CUDA builds are not supported for multi-word CXX "$(CXX)") + override CUDA_HOME=disabled endif # If CUDA_HOME is not set, try to set it from the location of nvcc ifndef CUDA_HOME - CUDA_HOME = $(patsubst %bin/nvcc,%,$(shell which nvcc 2>/dev/null)) - $(warning CUDA_HOME was not set: using "$(CUDA_HOME)") + CUDA_HOME = $(patsubst %bin/nvcc,%,$(shell which nvcc 2>/dev/null)) + $(warning CUDA_HOME was not set: using "$(CUDA_HOME)") endif # Set NVCC as $(CUDA_HOME)/bin/nvcc if it exists ifneq ($(wildcard $(CUDA_HOME)/bin/nvcc),) - NVCC = $(CUDA_HOME)/bin/nvcc - USE_NVTX ?=-DUSE_NVTX - # See https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html - # See https://arnon.dk/matching-sm-architectures-arch-and-gencode-for-various-nvidia-cards/ - # Default: use compute capability 70 for V100 (CERN lxbatch, CERN itscrd, Juwels Cluster). - # Embed device code for 70, and PTX for 70+. - # Export MADGRAPH_CUDA_ARCHITECTURE (comma-separated list) to use another value or list of values (see #533). - # Examples: use 60 for P100 (Piz Daint), 80 for A100 (Juwels Booster, NVidia raplab/Curiosity). - MADGRAPH_CUDA_ARCHITECTURE ?= 70 - ###CUARCHFLAGS = -gencode arch=compute_$(MADGRAPH_CUDA_ARCHITECTURE),code=compute_$(MADGRAPH_CUDA_ARCHITECTURE) -gencode arch=compute_$(MADGRAPH_CUDA_ARCHITECTURE),code=sm_$(MADGRAPH_CUDA_ARCHITECTURE) # Older implementation (AV): go back to this one for multi-GPU support #533 - ###CUARCHFLAGS = --gpu-architecture=compute_$(MADGRAPH_CUDA_ARCHITECTURE) --gpu-code=sm_$(MADGRAPH_CUDA_ARCHITECTURE),compute_$(MADGRAPH_CUDA_ARCHITECTURE) # Newer implementation (SH): cannot use this as-is for multi-GPU support #533 - comma:=, - CUARCHFLAGS = $(foreach arch,$(subst $(comma), ,$(MADGRAPH_CUDA_ARCHITECTURE)),-gencode arch=compute_$(arch),code=compute_$(arch) -gencode arch=compute_$(arch),code=sm_$(arch)) - CUINC = -I$(CUDA_HOME)/include/ - CURANDLIBFLAGS = -L$(CUDA_HOME)/lib64/ -lcurand # NB: -lcuda is not needed here! - CUOPTFLAGS = -lineinfo - CUFLAGS = $(foreach opt, $(OPTFLAGS), -Xcompiler $(opt)) $(CUOPTFLAGS) $(INCFLAGS) $(CUINC) $(USE_NVTX) $(CUARCHFLAGS) -use_fast_math - ###CUFLAGS += -Xcompiler -Wall -Xcompiler -Wextra -Xcompiler -Wshadow - ###NVCC_VERSION = $(shell $(NVCC) --version | grep 'Cuda compilation tools' | cut -d' ' -f5 | cut -d, -f1) - CUFLAGS += -std=c++17 # need CUDA >= 11.2 (see #333): this is enforced in mgOnGpuConfig.h - # Without -maxrregcount: baseline throughput: 6.5E8 (16384 32 12) up to 7.3E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 160 # improves throughput: 6.9E8 (16384 32 12) up to 7.7E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 128 # improves throughput: 7.3E8 (16384 32 12) up to 7.6E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 96 # degrades throughput: 4.1E8 (16384 32 12) up to 4.5E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 64 # degrades throughput: 1.7E8 (16384 32 12) flat at 1.7E8 (65536 128 12) + NVCC = $(CUDA_HOME)/bin/nvcc + USE_NVTX ?=-DUSE_NVTX + # See https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html + # See https://arnon.dk/matching-sm-architectures-arch-and-gencode-for-various-nvidia-cards/ + # Default: use compute capability 70 for V100 (CERN lxbatch, CERN itscrd, Juwels Cluster). + # Embed device code for 70, and PTX for 70+. + # Export MADGRAPH_CUDA_ARCHITECTURE (comma-separated list) to use another value or list of values (see #533). + # Examples: use 60 for P100 (Piz Daint), 80 for A100 (Juwels Booster, NVidia raplab/Curiosity). + MADGRAPH_CUDA_ARCHITECTURE ?= 70 + ###CUARCHFLAGS = -gencode arch=compute_$(MADGRAPH_CUDA_ARCHITECTURE),code=compute_$(MADGRAPH_CUDA_ARCHITECTURE) -gencode arch=compute_$(MADGRAPH_CUDA_ARCHITECTURE),code=sm_$(MADGRAPH_CUDA_ARCHITECTURE) # Older implementation (AV): go back to this one for multi-GPU support #533 + ###CUARCHFLAGS = --gpu-architecture=compute_$(MADGRAPH_CUDA_ARCHITECTURE) --gpu-code=sm_$(MADGRAPH_CUDA_ARCHITECTURE),compute_$(MADGRAPH_CUDA_ARCHITECTURE) # Newer implementation (SH): cannot use this as-is for multi-GPU support #533 + comma:=, + CUARCHFLAGS = $(foreach arch,$(subst $(comma), ,$(MADGRAPH_CUDA_ARCHITECTURE)),-gencode arch=compute_$(arch),code=compute_$(arch) -gencode arch=compute_$(arch),code=sm_$(arch)) + CUINC = -I$(CUDA_HOME)/include/ + CURANDLIBFLAGS = -L$(CUDA_HOME)/lib64/ -lcurand # NB: -lcuda is not needed here! + CUOPTFLAGS = -lineinfo + CUFLAGS = $(foreach opt, $(OPTFLAGS), -Xcompiler $(opt)) $(CUOPTFLAGS) $(INCFLAGS) $(CUINC) $(USE_NVTX) $(CUARCHFLAGS) -use_fast_math + ###CUFLAGS += -Xcompiler -Wall -Xcompiler -Wextra -Xcompiler -Wshadow + ###NVCC_VERSION = $(shell $(NVCC) --version | grep 'Cuda compilation tools' | cut -d' ' -f5 | cut -d, -f1) + CUFLAGS += -std=c++17 # need CUDA >= 11.2 (see #333): this is enforced in mgOnGpuConfig.h + # Without -maxrregcount: baseline throughput: 6.5E8 (16384 32 12) up to 7.3E8 (65536 128 12) + ###CUFLAGS+= --maxrregcount 160 # improves throughput: 6.9E8 (16384 32 12) up to 7.7E8 (65536 128 12) + ###CUFLAGS+= --maxrregcount 128 # improves throughput: 7.3E8 (16384 32 12) up to 7.6E8 (65536 128 12) + ###CUFLAGS+= --maxrregcount 96 # degrades throughput: 4.1E8 (16384 32 12) up to 4.5E8 (65536 128 12) + ###CUFLAGS+= --maxrregcount 64 # degrades throughput: 1.7E8 (16384 32 12) flat at 1.7E8 (65536 128 12) else ifneq ($(origin REQUIRE_CUDA),undefined) - # If REQUIRE_CUDA is set but no cuda is found, stop here (e.g. for CI tests on GPU #443) - $(error No cuda installation found (set CUDA_HOME or make nvcc visible in PATH)) + # If REQUIRE_CUDA is set but no cuda is found, stop here (e.g. for CI tests on GPU #443) + $(error No cuda installation found (set CUDA_HOME or make nvcc visible in PATH)) else - # No cuda. Switch cuda compilation off and go to common random numbers in C++ - $(warning CUDA_HOME is not set or is invalid: export CUDA_HOME to compile with cuda) - override NVCC= - override USE_NVTX= - override CUINC= - override CURANDLIBFLAGS= + # No cuda. Switch cuda compilation off and go to common random numbers in C++ + $(warning CUDA_HOME is not set or is invalid: export CUDA_HOME to compile with cuda) + override NVCC= + override USE_NVTX= + override CUINC= + override CURANDLIBFLAGS= endif export NVCC export CUFLAGS @@ -174,15 +174,15 @@ endif # Enable ccache if USECCACHE=1 ifeq ($(USECCACHE)$(shell echo $(CXX) | grep ccache),1) - override CXX:=ccache $(CXX) + override CXX:=ccache $(CXX) endif #ifeq ($(USECCACHE)$(shell echo $(AR) | grep ccache),1) # override AR:=ccache $(AR) #endif ifneq ($(NVCC),) - ifeq ($(USECCACHE)$(shell echo $(NVCC) | grep ccache),1) - override NVCC:=ccache $(NVCC) - endif + ifeq ($(USECCACHE)$(shell echo $(NVCC) | grep ccache),1) + override NVCC:=ccache $(NVCC) + endif endif #------------------------------------------------------------------------------- @@ -191,21 +191,21 @@ endif # PowerPC-specific CXX compiler flags (being reviewed) ifeq ($(UNAME_P),ppc64le) - CXXFLAGS+= -mcpu=power9 -mtune=power9 # gains ~2-3% both for none and sse4 - # Throughput references without the extra flags below: none=1.41-1.42E6, sse4=2.15-2.19E6 - ###CXXFLAGS+= -DNO_WARN_X86_INTRINSICS # no change - ###CXXFLAGS+= -fpeel-loops # no change - ###CXXFLAGS+= -funroll-loops # gains ~1% for none, loses ~1% for sse4 - ###CXXFLAGS+= -ftree-vectorize # no change - ###CXXFLAGS+= -flto # would increase to none=4.08-4.12E6, sse4=4.99-5.03E6! + CXXFLAGS+= -mcpu=power9 -mtune=power9 # gains ~2-3% both for none and sse4 + # Throughput references without the extra flags below: none=1.41-1.42E6, sse4=2.15-2.19E6 + ###CXXFLAGS+= -DNO_WARN_X86_INTRINSICS # no change + ###CXXFLAGS+= -fpeel-loops # no change + ###CXXFLAGS+= -funroll-loops # gains ~1% for none, loses ~1% for sse4 + ###CXXFLAGS+= -ftree-vectorize # no change + ###CXXFLAGS+= -flto # would increase to none=4.08-4.12E6, sse4=4.99-5.03E6! else - ###CXXFLAGS+= -flto # also on Intel this would increase throughputs by a factor 2 to 4... - ######CXXFLAGS+= -fno-semantic-interposition # no benefit (neither alone, nor combined with -flto) + ###CXXFLAGS+= -flto # also on Intel this would increase throughputs by a factor 2 to 4... + ######CXXFLAGS+= -fno-semantic-interposition # no benefit (neither alone, nor combined with -flto) endif # PowerPC-specific CUDA compiler flags (to be reviewed!) ifeq ($(UNAME_P),ppc64le) - CUFLAGS+= -Xcompiler -mno-float128 + CUFLAGS+= -Xcompiler -mno-float128 endif #------------------------------------------------------------------------------- @@ -228,52 +228,52 @@ endif # Set the default AVX (vectorization) choice ifeq ($(AVX),) - ifeq ($(UNAME_P),ppc64le) - ###override AVX = none - override AVX = sse4 - else ifeq ($(UNAME_P),arm) - ###override AVX = none - override AVX = sse4 - else ifeq ($(wildcard /proc/cpuinfo),) - override AVX = none - $(warning Using AVX='$(AVX)' because host SIMD features cannot be read from /proc/cpuinfo) - else ifeq ($(shell grep -m1 -c avx512vl /proc/cpuinfo)$(shell $(CXX) --version | grep ^clang),1) - override AVX = 512y - ###$(info Using AVX='$(AVX)' as no user input exists) - else - override AVX = avx2 - ifneq ($(shell grep -m1 -c avx512vl /proc/cpuinfo),1) - $(warning Using AVX='$(AVX)' because host does not support avx512vl) - else - $(warning Using AVX='$(AVX)' because this is faster than avx512vl for clang) - endif - endif + ifeq ($(UNAME_P),ppc64le) + ###override AVX = none + override AVX = sse4 + else ifeq ($(UNAME_P),arm) + ###override AVX = none + override AVX = sse4 + else ifeq ($(wildcard /proc/cpuinfo),) + override AVX = none + $(warning Using AVX='$(AVX)' because host SIMD features cannot be read from /proc/cpuinfo) + else ifeq ($(shell grep -m1 -c avx512vl /proc/cpuinfo)$(shell $(CXX) --version | grep ^clang),1) + override AVX = 512y + ###$(info Using AVX='$(AVX)' as no user input exists) + else + override AVX = avx2 + ifneq ($(shell grep -m1 -c avx512vl /proc/cpuinfo),1) + $(warning Using AVX='$(AVX)' because host does not support avx512vl) + else + $(warning Using AVX='$(AVX)' because this is faster than avx512vl for clang) + endif + endif else - ###$(info Using AVX='$(AVX)' according to user input) + ###$(info Using AVX='$(AVX)' according to user input) endif # Set the default FPTYPE (floating point type) choice ifeq ($(FPTYPE),) - override FPTYPE = d + override FPTYPE = d endif # Set the default HELINL (inline helicities?) choice ifeq ($(HELINL),) - override HELINL = 0 + override HELINL = 0 endif # Set the default HRDCOD (hardcode cIPD physics parameters?) choice ifeq ($(HRDCOD),) - override HRDCOD = 0 + override HRDCOD = 0 endif # Set the default RNDGEN (random number generator) choice ifeq ($(RNDGEN),) - ifeq ($(NVCC),) - override RNDGEN = hasNoCurand - else ifeq ($(RNDGEN),) - override RNDGEN = hasCurand - endif + ifeq ($(NVCC),) + override RNDGEN = hasNoCurand + else ifeq ($(RNDGEN),) + override RNDGEN = hasCurand + endif endif # Export AVX, FPTYPE, HELINL, HRDCOD, RNDGEN, OMPFLAGS so that it is not necessary to pass them to the src Makefile too @@ -297,45 +297,45 @@ CXXFLAGS += $(OMPFLAGS) # [See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96476] $(info AVX=$(AVX)) ifeq ($(UNAME_P),ppc64le) - ifeq ($(AVX),sse4) - override AVXFLAGS = -D__SSE4_2__ # Power9 VSX with 128 width (VSR registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on PowerPC for the moment) - endif + ifeq ($(AVX),sse4) + override AVXFLAGS = -D__SSE4_2__ # Power9 VSX with 128 width (VSR registers) + else ifneq ($(AVX),none) + $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on PowerPC for the moment) + endif else ifeq ($(UNAME_P),arm) - ifeq ($(AVX),sse4) - override AVXFLAGS = -D__SSE4_2__ # ARM NEON with 128 width (Q/quadword registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on ARM for the moment) - endif + ifeq ($(AVX),sse4) + override AVXFLAGS = -D__SSE4_2__ # ARM NEON with 128 width (Q/quadword registers) + else ifneq ($(AVX),none) + $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on ARM for the moment) + endif else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 - ifeq ($(AVX),none) - override AVXFLAGS = -mno-sse3 # no SIMD - else ifeq ($(AVX),sse4) - override AVXFLAGS = -mno-avx # SSE4.2 with 128 width (xmm registers) - else ifeq ($(AVX),avx2) - override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(AVX),512y) - override AVXFLAGS = -march=skylake -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(AVX),512z) - override AVXFLAGS = -march=skylake -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) - else - $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) - endif + ifeq ($(AVX),none) + override AVXFLAGS = -mno-sse3 # no SIMD + else ifeq ($(AVX),sse4) + override AVXFLAGS = -mno-avx # SSE4.2 with 128 width (xmm registers) + else ifeq ($(AVX),avx2) + override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] + else ifeq ($(AVX),512y) + override AVXFLAGS = -march=skylake -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] + else ifeq ($(AVX),512z) + override AVXFLAGS = -march=skylake -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) + else + $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) + endif else - ifeq ($(AVX),none) - override AVXFLAGS = -march=x86-64 # no SIMD (see #588) - else ifeq ($(AVX),sse4) - override AVXFLAGS = -march=nehalem # SSE4.2 with 128 width (xmm registers) - else ifeq ($(AVX),avx2) - override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(AVX),512y) - override AVXFLAGS = -march=skylake-avx512 -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(AVX),512z) - override AVXFLAGS = -march=skylake-avx512 -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) - else - $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) - endif + ifeq ($(AVX),none) + override AVXFLAGS = -march=x86-64 # no SIMD (see #588) + else ifeq ($(AVX),sse4) + override AVXFLAGS = -march=nehalem # SSE4.2 with 128 width (xmm registers) + else ifeq ($(AVX),avx2) + override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] + else ifeq ($(AVX),512y) + override AVXFLAGS = -march=skylake-avx512 -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] + else ifeq ($(AVX),512z) + override AVXFLAGS = -march=skylake-avx512 -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) + else + $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) + endif endif # For the moment, use AVXFLAGS everywhere: eventually, use them only in encapsulated implementations? CXXFLAGS+= $(AVXFLAGS) @@ -343,44 +343,44 @@ CXXFLAGS+= $(AVXFLAGS) # Set the build flags appropriate to each FPTYPE choice (example: "make FPTYPE=f") $(info FPTYPE=$(FPTYPE)) ifeq ($(FPTYPE),d) - CXXFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_DOUBLE - CUFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_DOUBLE + CXXFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_DOUBLE + CUFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_DOUBLE else ifeq ($(FPTYPE),f) - CXXFLAGS += -DMGONGPU_FPTYPE_FLOAT -DMGONGPU_FPTYPE2_FLOAT - CUFLAGS += -DMGONGPU_FPTYPE_FLOAT -DMGONGPU_FPTYPE2_FLOAT + CXXFLAGS += -DMGONGPU_FPTYPE_FLOAT -DMGONGPU_FPTYPE2_FLOAT + CUFLAGS += -DMGONGPU_FPTYPE_FLOAT -DMGONGPU_FPTYPE2_FLOAT else ifeq ($(FPTYPE),m) - CXXFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_FLOAT - CUFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_FLOAT + CXXFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_FLOAT + CUFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_FLOAT else - $(error Unknown FPTYPE='$(FPTYPE)': only 'd', 'f' and 'm' are supported) + $(error Unknown FPTYPE='$(FPTYPE)': only 'd', 'f' and 'm' are supported) endif # Set the build flags appropriate to each HELINL choice (example: "make HELINL=1") $(info HELINL=$(HELINL)) ifeq ($(HELINL),1) - CXXFLAGS += -DMGONGPU_INLINE_HELAMPS - CUFLAGS += -DMGONGPU_INLINE_HELAMPS + CXXFLAGS += -DMGONGPU_INLINE_HELAMPS + CUFLAGS += -DMGONGPU_INLINE_HELAMPS else ifneq ($(HELINL),0) - $(error Unknown HELINL='$(HELINL)': only '0' and '1' are supported) + $(error Unknown HELINL='$(HELINL)': only '0' and '1' are supported) endif # Set the build flags appropriate to each HRDCOD choice (example: "make HRDCOD=1") $(info HRDCOD=$(HRDCOD)) ifeq ($(HRDCOD),1) - CXXFLAGS += -DMGONGPU_HARDCODE_PARAM - CUFLAGS += -DMGONGPU_HARDCODE_PARAM + CXXFLAGS += -DMGONGPU_HARDCODE_PARAM + CUFLAGS += -DMGONGPU_HARDCODE_PARAM else ifneq ($(HRDCOD),0) - $(error Unknown HRDCOD='$(HRDCOD)': only '0' and '1' are supported) + $(error Unknown HRDCOD='$(HRDCOD)': only '0' and '1' are supported) endif # Set the build flags appropriate to each RNDGEN choice (example: "make RNDGEN=hasNoCurand") $(info RNDGEN=$(RNDGEN)) ifeq ($(RNDGEN),hasNoCurand) - override CXXFLAGSCURAND = -DMGONGPU_HAS_NO_CURAND + override CXXFLAGSCURAND = -DMGONGPU_HAS_NO_CURAND else ifeq ($(RNDGEN),hasCurand) - override CXXFLAGSCURAND = + override CXXFLAGSCURAND = else - $(error Unknown RNDGEN='$(RNDGEN)': only 'hasCurand' and 'hasNoCurand' are supported) + $(error Unknown RNDGEN='$(RNDGEN)': only 'hasCurand' and 'hasNoCurand' are supported) endif #------------------------------------------------------------------------------- @@ -390,30 +390,30 @@ endif # Build directory "short" tag (defines target and path to the optional build directory) # (Rationale: keep directory names shorter, e.g. do not include random number generator choice) ifneq ($(NVCC),) - override DIRTAG = cuda_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) + override DIRTAG = cuda_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) else - override DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) + override DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) endif # Build lockfile "full" tag (defines full specification of build options that cannot be intermixed) # (Rationale: avoid mixing of CUDA and no-CUDA environment builds with different random number generators) ifneq ($(NVCC),) - override TAG = cuda_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) + override TAG = cuda_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) else - override TAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) + override TAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) endif # Build directory: current directory by default, or build.$(DIRTAG) if USEBUILDDIR==1 ifeq ($(USEBUILDDIR),1) - override BUILDDIR = build.$(DIRTAG) - override LIBDIR = ../../lib/$(BUILDDIR) - override LIBDIRRPATH = '$$ORIGIN/../$(LIBDIR)' - $(info Building in BUILDDIR=$(BUILDDIR) for tag=$(TAG) (USEBUILDDIR is set = 1)) + override BUILDDIR = build.$(DIRTAG) + override LIBDIR = ../../lib/$(BUILDDIR) + override LIBDIRRPATH = '$$ORIGIN/../$(LIBDIR)' + $(info Building in BUILDDIR=$(BUILDDIR) for tag=$(TAG) (USEBUILDDIR is set = 1)) else - override BUILDDIR = . - override LIBDIR = ../../lib - override LIBDIRRPATH = '$$ORIGIN/$(LIBDIR)' - $(info Building in BUILDDIR=$(BUILDDIR) for tag=$(TAG) (USEBUILDDIR is not set)) + override BUILDDIR = . + override LIBDIR = ../../lib + override LIBDIRRPATH = '$$ORIGIN/$(LIBDIR)' + $(info Building in BUILDDIR=$(BUILDDIR) for tag=$(TAG) (USEBUILDDIR is not set)) endif ###override INCDIR = ../../include ###$(info Building in BUILDDIR=$(BUILDDIR) for tag=$(TAG)) @@ -422,17 +422,17 @@ endif # Use relative paths with respect to the executables or shared libraries ($ORIGIN on Linux) # On Darwin, building libraries with absolute paths in LIBDIR makes this unnecessary ifeq ($(UNAME_S),Darwin) - override CXXLIBFLAGSRPATH = - override CULIBFLAGSRPATH = - override CXXLIBFLAGSRPATH2 = - override CULIBFLAGSRPATH2 = + override CXXLIBFLAGSRPATH = + override CULIBFLAGSRPATH = + override CXXLIBFLAGSRPATH2 = + override CULIBFLAGSRPATH2 = else - # RPATH to cuda/cpp libs when linking executables - override CXXLIBFLAGSRPATH = -Wl,-rpath,$(LIBDIRRPATH) - override CULIBFLAGSRPATH = -Xlinker -rpath,$(LIBDIRRPATH) - # RPATH to common lib when linking cuda/cpp libs - override CXXLIBFLAGSRPATH2 = -Wl,-rpath,'$$ORIGIN' - override CULIBFLAGSRPATH2 = -Xlinker -rpath,'$$ORIGIN' + # RPATH to cuda/cpp libs when linking executables + override CXXLIBFLAGSRPATH = -Wl,-rpath,$(LIBDIRRPATH) + override CULIBFLAGSRPATH = -Xlinker -rpath,$(LIBDIRRPATH) + # RPATH to common lib when linking cuda/cpp libs + override CXXLIBFLAGSRPATH2 = -Wl,-rpath,'$$ORIGIN' + override CULIBFLAGSRPATH2 = -Xlinker -rpath,'$$ORIGIN' endif # Setting LD_LIBRARY_PATH or DYLD_LIBRARY_PATH in the RUNTIME is no longer necessary (neither on Linux nor on Mac) @@ -684,12 +684,12 @@ endif cuda: - ifneq ($(NVCC),) + ifneq ($(NVCC),) + + cu_main=$(BUILDDIR)/gcheck.exe + fcu_main=$(BUILDDIR)/fgcheck.exe - cu_main=$(BUILDDIR)/gcheck.exe - fcu_main=$(BUILDDIR)/fgcheck.exe - - # Generic target and build rules: objects from CUDA compilation + # Generic target and build rules: objects from CUDA compilation $(BUILDDIR)/%.o : %.cu *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c $< -o $@ @@ -698,17 +698,17 @@ cuda: @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c -x cu $< -o $@ - $(BUILDDIR)/gCrossSectionKernels.o: CUFLAGS += -Xcompiler -fno-fast-math - $(BUILDDIR)/gcheck_sa.o: CXXFLAGS += $(USE_NVTX) $(CUINC) - $(BUILDDIR)/gcheck_sa.o: CXXFLAGS += $(CXXFLAGSCURAND) - ifeq ($(RNDGEN),hasCurand) - $(BUILDDIR)/CurandRandomNumberKernel.o: CXXFLAGS += $(CUINC) - endif + $(BUILDDIR)/gCrossSectionKernels.o: CUFLAGS += -Xcompiler -fno-fast-math + $(BUILDDIR)/gcheck_sa.o: CXXFLAGS += $(USE_NVTX) $(CUINC) + $(BUILDDIR)/gcheck_sa.o: CXXFLAGS += $(CXXFLAGSCURAND) + ifeq ($(RNDGEN),hasCurand) + $(BUILDDIR)/CurandRandomNumberKernel.o: CXXFLAGS += $(CUINC) + endif - # Avoid "warning: builtin __has_trivial_... is deprecated; use __is_trivially_... instead" in nvcc with icx2023 (#592) - ifneq ($(shell $(CXX) --version | egrep '^(Intel)'),) + # Avoid "warning: builtin __has_trivial_... is deprecated; use __is_trivially_... instead" in nvcc with icx2023 (#592) + ifneq ($(shell $(CXX) --version | egrep '^(Intel)'),) CUFLAGS += -Xcompiler -Wno-deprecated-builtins - endif + endif MG5AMC_CULIB = mg5amc_$(processid_short)_cuda cu_objects_lib=$(BUILDDIR)/gCPPProcess.o $(BUILDDIR)/gMatrixElementKernels.o $(BUILDDIR)/gBridgeKernels.o $(BUILDDIR)/gCrossSectionKernels.o @@ -729,16 +729,16 @@ cuda: $(cu_main): $(BUILDDIR)/gcheck_sa.o $(LIBDIR)/lib$(MG5AMC_CULIB).so $(cu_objects_exe) $(BUILDDIR)/gCurandRandomNumberKernel.o $(NVCC) -o $@ $(BUILDDIR)/gcheck_sa.o $(CUARCHFLAGS) $(LIBFLAGS) -L$(LIBDIR) -l$(MG5AMC_CULIB) $(cu_objects_exe) $(BUILDDIR)/gCurandRandomNumberKernel.o $(CURANDLIBFLAGS) - ifneq ($(shell $(CXX) --version | grep ^Intel),) - $(fcu_main): LIBFLAGS += -lintlc # compile with icpx and link with nvcc (undefined reference to `_intel_fast_memcpy') - $(fcu_main): LIBFLAGS += -lsvml # compile with icpx and link with nvcc (undefined reference to `__svml_cos4_l9') - endif - ifeq ($(UNAME_S),Darwin) - $(fcu_main): LIBFLAGS += -L$(shell dirname $(shell $(FC) --print-file-name libgfortran.dylib)) # add path to libgfortran on Mac #375 - endif - $(fcu_main): LIBFLAGS += $(CULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH - $(fcu_main): $(BUILDDIR)/fcheck_sa.o $(BUILDDIR)/fsampler_cu.o $(LIBDIR)/lib$(MG5AMC_CULIB).so $(cu_objects_exe) - $(NVCC) -o $@ $(BUILDDIR)/fcheck_sa.o $(BUILDDIR)/fsampler_cu.o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_CULIB) $(cu_objects_exe) + ifneq ($(shell $(CXX) --version | grep ^Intel),) + $(fcu_main): LIBFLAGS += -lintlc # compile with icpx and link with nvcc (undefined reference to `_intel_fast_memcpy') + $(fcu_main): LIBFLAGS += -lsvml # compile with icpx and link with nvcc (undefined reference to `__svml_cos4_l9') + endif + ifeq ($(UNAME_S),Darwin) + $(fcu_main): LIBFLAGS += -L$(shell dirname $(shell $(FC) --print-file-name libgfortran.dylib)) # add path to libgfortran on Mac #375 + endif + $(fcu_main): LIBFLAGS += $(CULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH + $(fcu_main): $(BUILDDIR)/fcheck_sa.o $(BUILDDIR)/fsampler_cu.o $(LIBDIR)/lib$(MG5AMC_CULIB).so $(cu_objects_exe) + $(NVCC) -o $@ $(BUILDDIR)/fcheck_sa.o $(BUILDDIR)/fsampler_cu.o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_CULIB) $(cu_objects_exe) endif # ifneq ($(NVCC),) From 575840c4088b750913ebbdc8cdcfdaef2a44bf56 Mon Sep 17 00:00:00 2001 From: Jorgen Date: Mon, 21 Aug 2023 15:37:07 +0200 Subject: [PATCH 006/129] Changed line to be interpreted in bash into spaces --- epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk index 087161f84e..23e8c86b38 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk @@ -691,11 +691,11 @@ cuda: # Generic target and build rules: objects from CUDA compilation $(BUILDDIR)/%.o : %.cu *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi + @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c $< -o $@ $(BUILDDIR)/%_cu.o : %.cc *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi + @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c -x cu $< -o $@ $(BUILDDIR)/gCrossSectionKernels.o: CUFLAGS += -Xcompiler -fno-fast-math From 19911fbff4197272e406bd9b3fe9f089aea2783a Mon Sep 17 00:00:00 2001 From: Jorgen Date: Mon, 21 Aug 2023 15:40:17 +0200 Subject: [PATCH 007/129] Changed indentation again --- epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk index 23e8c86b38..a2347bb537 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk @@ -690,13 +690,13 @@ cuda: fcu_main=$(BUILDDIR)/fgcheck.exe # Generic target and build rules: objects from CUDA compilation - $(BUILDDIR)/%.o : %.cu *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c $< -o $@ + $(BUILDDIR)/%.o : %.cu *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) + @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi + $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c $< -o $@ - $(BUILDDIR)/%_cu.o : %.cc *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c -x cu $< -o $@ + $(BUILDDIR)/%_cu.o : %.cc *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) + @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi + $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c -x cu $< -o $@ $(BUILDDIR)/gCrossSectionKernels.o: CUFLAGS += -Xcompiler -fno-fast-math $(BUILDDIR)/gcheck_sa.o: CXXFLAGS += $(USE_NVTX) $(CUINC) From f4366a982f5e57295e16736c6237cd6b109188d7 Mon Sep 17 00:00:00 2001 From: Jorgen Date: Mon, 21 Aug 2023 15:42:16 +0200 Subject: [PATCH 008/129] Fixed indentation in start of CUDA compilation --- epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk index a2347bb537..2e6e43c157 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk @@ -691,12 +691,12 @@ cuda: # Generic target and build rules: objects from CUDA compilation $(BUILDDIR)/%.o : %.cu *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c $< -o $@ + @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi + $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c $< -o $@ $(BUILDDIR)/%_cu.o : %.cc *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c -x cu $< -o $@ + @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi + $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c -x cu $< -o $@ $(BUILDDIR)/gCrossSectionKernels.o: CUFLAGS += -Xcompiler -fno-fast-math $(BUILDDIR)/gcheck_sa.o: CXXFLAGS += $(USE_NVTX) $(CUINC) @@ -714,9 +714,9 @@ cuda: cu_objects_lib=$(BUILDDIR)/gCPPProcess.o $(BUILDDIR)/gMatrixElementKernels.o $(BUILDDIR)/gBridgeKernels.o $(BUILDDIR)/gCrossSectionKernels.o cu_objects_exe=$(BUILDDIR)/gCommonRandomNumberKernel.o $(BUILDDIR)/gRamboSamplingKernels.o - $(LIBDIR)/lib$(MG5AMC_CULIB).so: $(BUILDDIR)/fbridge_cu.o - $(LIBDIR)/lib$(MG5AMC_CULIB).so: cu_objects_lib += $(BUILDDIR)/fbridge_cu.o - $(LIBDIR)/lib$(MG5AMC_CULIB).so: $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_objects_lib) + $(LIBDIR)/lib$(MG5AMC_CULIB).so: $(BUILDDIR)/fbridge_cu.o + $(LIBDIR)/lib$(MG5AMC_CULIB).so: cu_objects_lib += $(BUILDDIR)/fbridge_cu.o + $(LIBDIR)/lib$(MG5AMC_CULIB).so: $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_objects_lib) $(NVCC) --shared -o $@ $(cu_objects_lib) $(CULIBFLAGSRPATH2) -L$(LIBDIR) -l$(MG5AMC_COMMONLIB) ifneq ($(shell $(CXX) --version | grep ^Intel),) From b8194983e808c0fdb642d15e257471519bacc9f3 Mon Sep 17 00:00:00 2001 From: Jorgen Date: Mon, 21 Aug 2023 15:43:25 +0200 Subject: [PATCH 009/129] Fixed indentation in fcheck compilation --- epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk index 2e6e43c157..9aba68f94d 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk @@ -738,7 +738,7 @@ cuda: endif $(fcu_main): LIBFLAGS += $(CULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH $(fcu_main): $(BUILDDIR)/fcheck_sa.o $(BUILDDIR)/fsampler_cu.o $(LIBDIR)/lib$(MG5AMC_CULIB).so $(cu_objects_exe) - $(NVCC) -o $@ $(BUILDDIR)/fcheck_sa.o $(BUILDDIR)/fsampler_cu.o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_CULIB) $(cu_objects_exe) + $(NVCC) -o $@ $(BUILDDIR)/fcheck_sa.o $(BUILDDIR)/fsampler_cu.o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_CULIB) $(cu_objects_exe) endif # ifneq ($(NVCC),) From 9082da04a1b332f50374876a98f276b25da53903 Mon Sep 17 00:00:00 2001 From: Jorgen Date: Mon, 21 Aug 2023 15:53:55 +0200 Subject: [PATCH 010/129] Changed indentation of ifndef in CUDA compilation --- .../cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk | 102 +++++++++--------- 1 file changed, 51 insertions(+), 51 deletions(-) diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk index 9aba68f94d..802cbacc17 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk @@ -686,59 +686,59 @@ cuda: ifneq ($(NVCC),) - cu_main=$(BUILDDIR)/gcheck.exe - fcu_main=$(BUILDDIR)/fgcheck.exe - - # Generic target and build rules: objects from CUDA compilation - $(BUILDDIR)/%.o : %.cu *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c $< -o $@ - - $(BUILDDIR)/%_cu.o : %.cc *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c -x cu $< -o $@ - - $(BUILDDIR)/gCrossSectionKernels.o: CUFLAGS += -Xcompiler -fno-fast-math - $(BUILDDIR)/gcheck_sa.o: CXXFLAGS += $(USE_NVTX) $(CUINC) - $(BUILDDIR)/gcheck_sa.o: CXXFLAGS += $(CXXFLAGSCURAND) - ifeq ($(RNDGEN),hasCurand) - $(BUILDDIR)/CurandRandomNumberKernel.o: CXXFLAGS += $(CUINC) - endif + cu_main=$(BUILDDIR)/gcheck.exe + fcu_main=$(BUILDDIR)/fgcheck.exe + + # Generic target and build rules: objects from CUDA compilation + $(BUILDDIR)/%.o : %.cu *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) + @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi + $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c $< -o $@ + + $(BUILDDIR)/%_cu.o : %.cc *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) + @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi + $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c -x cu $< -o $@ + + $(BUILDDIR)/gCrossSectionKernels.o: CUFLAGS += -Xcompiler -fno-fast-math + $(BUILDDIR)/gcheck_sa.o: CXXFLAGS += $(USE_NVTX) $(CUINC) + $(BUILDDIR)/gcheck_sa.o: CXXFLAGS += $(CXXFLAGSCURAND) + ifeq ($(RNDGEN),hasCurand) + $(BUILDDIR)/CurandRandomNumberKernel.o: CXXFLAGS += $(CUINC) + endif - # Avoid "warning: builtin __has_trivial_... is deprecated; use __is_trivially_... instead" in nvcc with icx2023 (#592) - ifneq ($(shell $(CXX) --version | egrep '^(Intel)'),) - CUFLAGS += -Xcompiler -Wno-deprecated-builtins - endif + # Avoid "warning: builtin __has_trivial_... is deprecated; use __is_trivially_... instead" in nvcc with icx2023 (#592) + ifneq ($(shell $(CXX) --version | egrep '^(Intel)'),) + CUFLAGS += -Xcompiler -Wno-deprecated-builtins + endif - MG5AMC_CULIB = mg5amc_$(processid_short)_cuda - cu_objects_lib=$(BUILDDIR)/gCPPProcess.o $(BUILDDIR)/gMatrixElementKernels.o $(BUILDDIR)/gBridgeKernels.o $(BUILDDIR)/gCrossSectionKernels.o - cu_objects_exe=$(BUILDDIR)/gCommonRandomNumberKernel.o $(BUILDDIR)/gRamboSamplingKernels.o - - $(LIBDIR)/lib$(MG5AMC_CULIB).so: $(BUILDDIR)/fbridge_cu.o - $(LIBDIR)/lib$(MG5AMC_CULIB).so: cu_objects_lib += $(BUILDDIR)/fbridge_cu.o - $(LIBDIR)/lib$(MG5AMC_CULIB).so: $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_objects_lib) - $(NVCC) --shared -o $@ $(cu_objects_lib) $(CULIBFLAGSRPATH2) -L$(LIBDIR) -l$(MG5AMC_COMMONLIB) - - ifneq ($(shell $(CXX) --version | grep ^Intel),) - $(cu_main): LIBFLAGS += -lintlc # compile with icpx and link with nvcc (undefined reference to `_intel_fast_memcpy') - $(cu_main): LIBFLAGS += -lsvml # compile with icpx and link with nvcc (undefined reference to `__svml_cos4_l9') - else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 - $(cu_main): LIBFLAGS += -L$(patsubst %bin/nvc++,%lib,$(subst ccache ,,$(CXX))) -lnvhpcatm -lnvcpumath -lnvc - endif - $(cu_main): LIBFLAGS += $(CULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH - $(cu_main): $(BUILDDIR)/gcheck_sa.o $(LIBDIR)/lib$(MG5AMC_CULIB).so $(cu_objects_exe) $(BUILDDIR)/gCurandRandomNumberKernel.o - $(NVCC) -o $@ $(BUILDDIR)/gcheck_sa.o $(CUARCHFLAGS) $(LIBFLAGS) -L$(LIBDIR) -l$(MG5AMC_CULIB) $(cu_objects_exe) $(BUILDDIR)/gCurandRandomNumberKernel.o $(CURANDLIBFLAGS) - - ifneq ($(shell $(CXX) --version | grep ^Intel),) - $(fcu_main): LIBFLAGS += -lintlc # compile with icpx and link with nvcc (undefined reference to `_intel_fast_memcpy') - $(fcu_main): LIBFLAGS += -lsvml # compile with icpx and link with nvcc (undefined reference to `__svml_cos4_l9') - endif - ifeq ($(UNAME_S),Darwin) - $(fcu_main): LIBFLAGS += -L$(shell dirname $(shell $(FC) --print-file-name libgfortran.dylib)) # add path to libgfortran on Mac #375 - endif - $(fcu_main): LIBFLAGS += $(CULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH - $(fcu_main): $(BUILDDIR)/fcheck_sa.o $(BUILDDIR)/fsampler_cu.o $(LIBDIR)/lib$(MG5AMC_CULIB).so $(cu_objects_exe) - $(NVCC) -o $@ $(BUILDDIR)/fcheck_sa.o $(BUILDDIR)/fsampler_cu.o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_CULIB) $(cu_objects_exe) + MG5AMC_CULIB = mg5amc_$(processid_short)_cuda + cu_objects_lib=$(BUILDDIR)/gCPPProcess.o $(BUILDDIR)/gMatrixElementKernels.o $(BUILDDIR)/gBridgeKernels.o $(BUILDDIR)/gCrossSectionKernels.o + cu_objects_exe=$(BUILDDIR)/gCommonRandomNumberKernel.o $(BUILDDIR)/gRamboSamplingKernels.o + + $(LIBDIR)/lib$(MG5AMC_CULIB).so: $(BUILDDIR)/fbridge_cu.o + $(LIBDIR)/lib$(MG5AMC_CULIB).so: cu_objects_lib += $(BUILDDIR)/fbridge_cu.o + $(LIBDIR)/lib$(MG5AMC_CULIB).so: $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_objects_lib) + $(NVCC) --shared -o $@ $(cu_objects_lib) $(CULIBFLAGSRPATH2) -L$(LIBDIR) -l$(MG5AMC_COMMONLIB) + + ifneq ($(shell $(CXX) --version | grep ^Intel),) + $(cu_main): LIBFLAGS += -lintlc # compile with icpx and link with nvcc (undefined reference to `_intel_fast_memcpy') + $(cu_main): LIBFLAGS += -lsvml # compile with icpx and link with nvcc (undefined reference to `__svml_cos4_l9') + else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 + $(cu_main): LIBFLAGS += -L$(patsubst %bin/nvc++,%lib,$(subst ccache ,,$(CXX))) -lnvhpcatm -lnvcpumath -lnvc + endif + $(cu_main): LIBFLAGS += $(CULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH + $(cu_main): $(BUILDDIR)/gcheck_sa.o $(LIBDIR)/lib$(MG5AMC_CULIB).so $(cu_objects_exe) $(BUILDDIR)/gCurandRandomNumberKernel.o + $(NVCC) -o $@ $(BUILDDIR)/gcheck_sa.o $(CUARCHFLAGS) $(LIBFLAGS) -L$(LIBDIR) -l$(MG5AMC_CULIB) $(cu_objects_exe) $(BUILDDIR)/gCurandRandomNumberKernel.o $(CURANDLIBFLAGS) + + ifneq ($(shell $(CXX) --version | grep ^Intel),) + $(fcu_main): LIBFLAGS += -lintlc # compile with icpx and link with nvcc (undefined reference to `_intel_fast_memcpy') + $(fcu_main): LIBFLAGS += -lsvml # compile with icpx and link with nvcc (undefined reference to `__svml_cos4_l9') + endif + ifeq ($(UNAME_S),Darwin) + $(fcu_main): LIBFLAGS += -L$(shell dirname $(shell $(FC) --print-file-name libgfortran.dylib)) # add path to libgfortran on Mac #375 + endif + $(fcu_main): LIBFLAGS += $(CULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH + $(fcu_main): $(BUILDDIR)/fcheck_sa.o $(BUILDDIR)/fsampler_cu.o $(LIBDIR)/lib$(MG5AMC_CULIB).so $(cu_objects_exe) + $(NVCC) -o $@ $(BUILDDIR)/fcheck_sa.o $(BUILDDIR)/fsampler_cu.o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_CULIB) $(cu_objects_exe) endif # ifneq ($(NVCC),) From bfd4301c7230bc421db849da11a3e4fbb7a2dd2f Mon Sep 17 00:00:00 2001 From: Jorgen Date: Mon, 21 Aug 2023 15:55:19 +0200 Subject: [PATCH 011/129] Changed indentation back to tabs again for some lines --- epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk index 802cbacc17..f42081ff4b 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk @@ -691,12 +691,12 @@ cuda: # Generic target and build rules: objects from CUDA compilation $(BUILDDIR)/%.o : %.cu *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c $< -o $@ + @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi + $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c $< -o $@ $(BUILDDIR)/%_cu.o : %.cc *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c -x cu $< -o $@ + @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi + $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c -x cu $< -o $@ $(BUILDDIR)/gCrossSectionKernels.o: CUFLAGS += -Xcompiler -fno-fast-math $(BUILDDIR)/gcheck_sa.o: CXXFLAGS += $(USE_NVTX) $(CUINC) @@ -717,7 +717,7 @@ cuda: $(LIBDIR)/lib$(MG5AMC_CULIB).so: $(BUILDDIR)/fbridge_cu.o $(LIBDIR)/lib$(MG5AMC_CULIB).so: cu_objects_lib += $(BUILDDIR)/fbridge_cu.o $(LIBDIR)/lib$(MG5AMC_CULIB).so: $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_objects_lib) - $(NVCC) --shared -o $@ $(cu_objects_lib) $(CULIBFLAGSRPATH2) -L$(LIBDIR) -l$(MG5AMC_COMMONLIB) + $(NVCC) --shared -o $@ $(cu_objects_lib) $(CULIBFLAGSRPATH2) -L$(LIBDIR) -l$(MG5AMC_COMMONLIB) ifneq ($(shell $(CXX) --version | grep ^Intel),) $(cu_main): LIBFLAGS += -lintlc # compile with icpx and link with nvcc (undefined reference to `_intel_fast_memcpy') @@ -727,7 +727,7 @@ cuda: endif $(cu_main): LIBFLAGS += $(CULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH $(cu_main): $(BUILDDIR)/gcheck_sa.o $(LIBDIR)/lib$(MG5AMC_CULIB).so $(cu_objects_exe) $(BUILDDIR)/gCurandRandomNumberKernel.o - $(NVCC) -o $@ $(BUILDDIR)/gcheck_sa.o $(CUARCHFLAGS) $(LIBFLAGS) -L$(LIBDIR) -l$(MG5AMC_CULIB) $(cu_objects_exe) $(BUILDDIR)/gCurandRandomNumberKernel.o $(CURANDLIBFLAGS) + $(NVCC) -o $@ $(BUILDDIR)/gcheck_sa.o $(CUARCHFLAGS) $(LIBFLAGS) -L$(LIBDIR) -l$(MG5AMC_CULIB) $(cu_objects_exe) $(BUILDDIR)/gCurandRandomNumberKernel.o $(CURANDLIBFLAGS) ifneq ($(shell $(CXX) --version | grep ^Intel),) $(fcu_main): LIBFLAGS += -lintlc # compile with icpx and link with nvcc (undefined reference to `_intel_fast_memcpy') @@ -738,7 +738,7 @@ cuda: endif $(fcu_main): LIBFLAGS += $(CULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH $(fcu_main): $(BUILDDIR)/fcheck_sa.o $(BUILDDIR)/fsampler_cu.o $(LIBDIR)/lib$(MG5AMC_CULIB).so $(cu_objects_exe) - $(NVCC) -o $@ $(BUILDDIR)/fcheck_sa.o $(BUILDDIR)/fsampler_cu.o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_CULIB) $(cu_objects_exe) + $(NVCC) -o $@ $(BUILDDIR)/fcheck_sa.o $(BUILDDIR)/fsampler_cu.o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_CULIB) $(cu_objects_exe) endif # ifneq ($(NVCC),) From 529318c44251d0c675b85330ab09971cc4c8edba Mon Sep 17 00:00:00 2001 From: Jorgen Date: Mon, 21 Aug 2023 16:14:51 +0200 Subject: [PATCH 012/129] Changed indentation again to fix endif error --- .../cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk | 101 +++++++++--------- 1 file changed, 48 insertions(+), 53 deletions(-) diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk index f42081ff4b..0212c2d28d 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk @@ -683,64 +683,59 @@ endif # CUDA Target cuda: + cu_main=$(BUILDDIR)/gcheck.exe + fcu_main=$(BUILDDIR)/fgcheck.exe + + # Generic target and build rules: objects from CUDA compilation + $(BUILDDIR)/%.o : %.cu *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) + @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi + $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c $< -o $@ + + $(BUILDDIR)/%_cu.o : %.cc *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) + @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi + $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c -x cu $< -o $@ + + $(BUILDDIR)/gCrossSectionKernels.o: CUFLAGS += -Xcompiler -fno-fast-math + $(BUILDDIR)/gcheck_sa.o: CXXFLAGS += $(USE_NVTX) $(CUINC) + $(BUILDDIR)/gcheck_sa.o: CXXFLAGS += $(CXXFLAGSCURAND) + ifeq ($(RNDGEN),hasCurand) + $(BUILDDIR)/CurandRandomNumberKernel.o: CXXFLAGS += $(CUINC) + endif - ifneq ($(NVCC),) - - cu_main=$(BUILDDIR)/gcheck.exe - fcu_main=$(BUILDDIR)/fgcheck.exe - - # Generic target and build rules: objects from CUDA compilation - $(BUILDDIR)/%.o : %.cu *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c $< -o $@ - - $(BUILDDIR)/%_cu.o : %.cc *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c -x cu $< -o $@ - - $(BUILDDIR)/gCrossSectionKernels.o: CUFLAGS += -Xcompiler -fno-fast-math - $(BUILDDIR)/gcheck_sa.o: CXXFLAGS += $(USE_NVTX) $(CUINC) - $(BUILDDIR)/gcheck_sa.o: CXXFLAGS += $(CXXFLAGSCURAND) - ifeq ($(RNDGEN),hasCurand) - $(BUILDDIR)/CurandRandomNumberKernel.o: CXXFLAGS += $(CUINC) - endif - - # Avoid "warning: builtin __has_trivial_... is deprecated; use __is_trivially_... instead" in nvcc with icx2023 (#592) - ifneq ($(shell $(CXX) --version | egrep '^(Intel)'),) - CUFLAGS += -Xcompiler -Wno-deprecated-builtins - endif - - MG5AMC_CULIB = mg5amc_$(processid_short)_cuda - cu_objects_lib=$(BUILDDIR)/gCPPProcess.o $(BUILDDIR)/gMatrixElementKernels.o $(BUILDDIR)/gBridgeKernels.o $(BUILDDIR)/gCrossSectionKernels.o - cu_objects_exe=$(BUILDDIR)/gCommonRandomNumberKernel.o $(BUILDDIR)/gRamboSamplingKernels.o + # Avoid "warning: builtin __has_trivial_... is deprecated; use __is_trivially_... instead" in nvcc with icx2023 (#592) + ifneq ($(shell $(CXX) --version | egrep '^(Intel)'),) + CUFLAGS += -Xcompiler -Wno-deprecated-builtins + endif - $(LIBDIR)/lib$(MG5AMC_CULIB).so: $(BUILDDIR)/fbridge_cu.o - $(LIBDIR)/lib$(MG5AMC_CULIB).so: cu_objects_lib += $(BUILDDIR)/fbridge_cu.o - $(LIBDIR)/lib$(MG5AMC_CULIB).so: $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_objects_lib) - $(NVCC) --shared -o $@ $(cu_objects_lib) $(CULIBFLAGSRPATH2) -L$(LIBDIR) -l$(MG5AMC_COMMONLIB) + MG5AMC_CULIB = mg5amc_$(processid_short)_cuda + cu_objects_lib=$(BUILDDIR)/gCPPProcess.o $(BUILDDIR)/gMatrixElementKernels.o $(BUILDDIR)/gBridgeKernels.o $(BUILDDIR)/gCrossSectionKernels.o + cu_objects_exe=$(BUILDDIR)/gCommonRandomNumberKernel.o $(BUILDDIR)/gRamboSamplingKernels.o - ifneq ($(shell $(CXX) --version | grep ^Intel),) - $(cu_main): LIBFLAGS += -lintlc # compile with icpx and link with nvcc (undefined reference to `_intel_fast_memcpy') - $(cu_main): LIBFLAGS += -lsvml # compile with icpx and link with nvcc (undefined reference to `__svml_cos4_l9') - else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 - $(cu_main): LIBFLAGS += -L$(patsubst %bin/nvc++,%lib,$(subst ccache ,,$(CXX))) -lnvhpcatm -lnvcpumath -lnvc - endif - $(cu_main): LIBFLAGS += $(CULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH - $(cu_main): $(BUILDDIR)/gcheck_sa.o $(LIBDIR)/lib$(MG5AMC_CULIB).so $(cu_objects_exe) $(BUILDDIR)/gCurandRandomNumberKernel.o - $(NVCC) -o $@ $(BUILDDIR)/gcheck_sa.o $(CUARCHFLAGS) $(LIBFLAGS) -L$(LIBDIR) -l$(MG5AMC_CULIB) $(cu_objects_exe) $(BUILDDIR)/gCurandRandomNumberKernel.o $(CURANDLIBFLAGS) + $(LIBDIR)/lib$(MG5AMC_CULIB).so: $(BUILDDIR)/fbridge_cu.o + $(LIBDIR)/lib$(MG5AMC_CULIB).so: cu_objects_lib += $(BUILDDIR)/fbridge_cu.o + $(LIBDIR)/lib$(MG5AMC_CULIB).so: $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_objects_lib) + $(NVCC) --shared -o $@ $(cu_objects_lib) $(CULIBFLAGSRPATH2) -L$(LIBDIR) -l$(MG5AMC_COMMONLIB) - ifneq ($(shell $(CXX) --version | grep ^Intel),) - $(fcu_main): LIBFLAGS += -lintlc # compile with icpx and link with nvcc (undefined reference to `_intel_fast_memcpy') - $(fcu_main): LIBFLAGS += -lsvml # compile with icpx and link with nvcc (undefined reference to `__svml_cos4_l9') - endif - ifeq ($(UNAME_S),Darwin) - $(fcu_main): LIBFLAGS += -L$(shell dirname $(shell $(FC) --print-file-name libgfortran.dylib)) # add path to libgfortran on Mac #375 - endif - $(fcu_main): LIBFLAGS += $(CULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH - $(fcu_main): $(BUILDDIR)/fcheck_sa.o $(BUILDDIR)/fsampler_cu.o $(LIBDIR)/lib$(MG5AMC_CULIB).so $(cu_objects_exe) - $(NVCC) -o $@ $(BUILDDIR)/fcheck_sa.o $(BUILDDIR)/fsampler_cu.o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_CULIB) $(cu_objects_exe) + ifneq ($(shell $(CXX) --version | grep ^Intel),) + $(cu_main): LIBFLAGS += -lintlc # compile with icpx and link with nvcc (undefined reference to `_intel_fast_memcpy') + $(cu_main): LIBFLAGS += -lsvml # compile with icpx and link with nvcc (undefined reference to `__svml_cos4_l9') + else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 + $(cu_main): LIBFLAGS += -L$(patsubst %bin/nvc++,%lib,$(subst ccache ,,$(CXX))) -lnvhpcatm -lnvcpumath -lnvc + endif + $(cu_main): LIBFLAGS += $(CULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH + $(cu_main): $(BUILDDIR)/gcheck_sa.o $(LIBDIR)/lib$(MG5AMC_CULIB).so $(cu_objects_exe) $(BUILDDIR)/gCurandRandomNumberKernel.o + $(NVCC) -o $@ $(BUILDDIR)/gcheck_sa.o $(CUARCHFLAGS) $(LIBFLAGS) -L$(LIBDIR) -l$(MG5AMC_CULIB) $(cu_objects_exe) $(BUILDDIR)/gCurandRandomNumberKernel.o $(CURANDLIBFLAGS) - endif # ifneq ($(NVCC),) + ifneq ($(shell $(CXX) --version | grep ^Intel),) + $(fcu_main): LIBFLAGS += -lintlc # compile with icpx and link with nvcc (undefined reference to `_intel_fast_memcpy') + $(fcu_main): LIBFLAGS += -lsvml # compile with icpx and link with nvcc (undefined reference to `__svml_cos4_l9') + endif + ifeq ($(UNAME_S),Darwin) + $(fcu_main): LIBFLAGS += -L$(shell dirname $(shell $(FC) --print-file-name libgfortran.dylib)) # add path to libgfortran on Mac #375 + endif + $(fcu_main): LIBFLAGS += $(CULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH + $(fcu_main): $(BUILDDIR)/fcheck_sa.o $(BUILDDIR)/fsampler_cu.o $(LIBDIR)/lib$(MG5AMC_CULIB).so $(cu_objects_exe) + $(NVCC) -o $@ $(BUILDDIR)/fcheck_sa.o $(BUILDDIR)/fsampler_cu.o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_CULIB) $(cu_objects_exe) #------------------------------------------------------------------------------- From fc549cadf698e110060fadaf2fbdb5aceb458cda Mon Sep 17 00:00:00 2001 From: Jorgen Date: Mon, 21 Aug 2023 16:54:02 +0200 Subject: [PATCH 013/129] Revert back cudacpp.mk to original state --- .../cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk | 131 ++++++++++-------- 1 file changed, 72 insertions(+), 59 deletions(-) diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk index 0212c2d28d..84aa07679d 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk @@ -445,6 +445,14 @@ override RUNTIME = cxx_main=$(BUILDDIR)/check.exe fcxx_main=$(BUILDDIR)/fcheck.exe +ifneq ($(NVCC),) +cu_main=$(BUILDDIR)/gcheck.exe +fcu_main=$(BUILDDIR)/fgcheck.exe +else +cu_main= +fcu_main= +endif + testmain=$(BUILDDIR)/runTest.exe ifneq ($(GTESTLIBS),) @@ -467,6 +475,17 @@ $(BUILDDIR)/.build.$(TAG): @if [ "$(oldtagsb)" != "" ]; then echo "Cannot build for tag=$(TAG) as old builds exist for other tags:"; echo " $(oldtagsb)"; echo "Please run 'make clean' first\nIf 'make clean' is not enough: run 'make clean USEBUILDDIR=1 AVX=$(AVX) FPTYPE=$(FPTYPE)' or 'make cleanall'"; exit 1; fi @touch $(BUILDDIR)/.build.$(TAG) +# Generic target and build rules: objects from CUDA compilation +ifneq ($(NVCC),) +$(BUILDDIR)/%.o : %.cu *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) + @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi + $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c $< -o $@ + +$(BUILDDIR)/%_cu.o : %.cc *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) + @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi + $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c -x cu $< -o $@ +endif + # Generic target and build rules: objects from C++ compilation # (NB do not include CUINC here! add it only for NVTX or curand #679) $(BUILDDIR)/%.o : %.cc *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) @@ -477,14 +496,29 @@ $(BUILDDIR)/%.o : %.cc *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) ifeq ($(shell $(CXX) --version | grep ^nvc++),) $(BUILDDIR)/CrossSectionKernels.o: CXXFLAGS := $(filter-out -ffast-math,$(CXXFLAGS)) $(BUILDDIR)/CrossSectionKernels.o: CXXFLAGS += -fno-fast-math +ifneq ($(NVCC),) +$(BUILDDIR)/gCrossSectionKernels.o: CUFLAGS += -Xcompiler -fno-fast-math +endif endif # Apply special build flags only to check_sa.o and gcheck_sa.o (NVTX in timermap.h, #679) $(BUILDDIR)/check_sa.o: CXXFLAGS += $(USE_NVTX) $(CUINC) +$(BUILDDIR)/gcheck_sa.o: CXXFLAGS += $(USE_NVTX) $(CUINC) # Apply special build flags only to check_sa and CurandRandomNumberKernel (curand headers, #679) $(BUILDDIR)/check_sa.o: CXXFLAGS += $(CXXFLAGSCURAND) +$(BUILDDIR)/gcheck_sa.o: CXXFLAGS += $(CXXFLAGSCURAND) $(BUILDDIR)/CurandRandomNumberKernel.o: CXXFLAGS += $(CXXFLAGSCURAND) +ifeq ($(RNDGEN),hasCurand) +$(BUILDDIR)/CurandRandomNumberKernel.o: CXXFLAGS += $(CUINC) +endif + +# Avoid "warning: builtin __has_trivial_... is deprecated; use __is_trivially_... instead" in nvcc with icx2023 (#592) +ifneq ($(shell $(CXX) --version | egrep '^(Intel)'),) +ifneq ($(NVCC),) +CUFLAGS += -Xcompiler -Wno-deprecated-builtins +endif +endif # Avoid clang warning "overriding '-ffp-contract=fast' option with '-ffp-contract=on'" (#516) # This patch does remove the warning, but I prefer to keep it disabled for the moment... @@ -518,12 +552,25 @@ MG5AMC_CXXLIB = mg5amc_$(processid_short)_cpp cxx_objects_lib=$(BUILDDIR)/CPPProcess.o $(BUILDDIR)/MatrixElementKernels.o $(BUILDDIR)/BridgeKernels.o $(BUILDDIR)/CrossSectionKernels.o cxx_objects_exe=$(BUILDDIR)/CommonRandomNumberKernel.o $(BUILDDIR)/RamboSamplingKernels.o +ifneq ($(NVCC),) +MG5AMC_CULIB = mg5amc_$(processid_short)_cuda +cu_objects_lib=$(BUILDDIR)/gCPPProcess.o $(BUILDDIR)/gMatrixElementKernels.o $(BUILDDIR)/gBridgeKernels.o $(BUILDDIR)/gCrossSectionKernels.o +cu_objects_exe=$(BUILDDIR)/gCommonRandomNumberKernel.o $(BUILDDIR)/gRamboSamplingKernels.o +endif + # Target (and build rules): C++ and CUDA shared libraries $(LIBDIR)/lib$(MG5AMC_CXXLIB).so: $(BUILDDIR)/fbridge.o $(LIBDIR)/lib$(MG5AMC_CXXLIB).so: cxx_objects_lib += $(BUILDDIR)/fbridge.o $(LIBDIR)/lib$(MG5AMC_CXXLIB).so: $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cxx_objects_lib) $(CXX) -shared -o $@ $(cxx_objects_lib) $(CXXLIBFLAGSRPATH2) -L$(LIBDIR) -l$(MG5AMC_COMMONLIB) +ifneq ($(NVCC),) +$(LIBDIR)/lib$(MG5AMC_CULIB).so: $(BUILDDIR)/fbridge_cu.o +$(LIBDIR)/lib$(MG5AMC_CULIB).so: cu_objects_lib += $(BUILDDIR)/fbridge_cu.o +$(LIBDIR)/lib$(MG5AMC_CULIB).so: $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_objects_lib) + $(NVCC) --shared -o $@ $(cu_objects_lib) $(CULIBFLAGSRPATH2) -L$(LIBDIR) -l$(MG5AMC_COMMONLIB) +endif + #------------------------------------------------------------------------------- # Target (and build rules): Fortran include files @@ -538,6 +585,18 @@ $(cxx_main): LIBFLAGS += $(CXXLIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PAT $(cxx_main): $(BUILDDIR)/check_sa.o $(LIBDIR)/lib$(MG5AMC_CXXLIB).so $(cxx_objects_exe) $(BUILDDIR)/CurandRandomNumberKernel.o $(CXX) -o $@ $(BUILDDIR)/check_sa.o $(OMPFLAGS) -ldl -pthread $(LIBFLAGS) -L$(LIBDIR) -l$(MG5AMC_CXXLIB) $(cxx_objects_exe) $(BUILDDIR)/CurandRandomNumberKernel.o $(CURANDLIBFLAGS) +ifneq ($(NVCC),) +ifneq ($(shell $(CXX) --version | grep ^Intel),) +$(cu_main): LIBFLAGS += -lintlc # compile with icpx and link with nvcc (undefined reference to `_intel_fast_memcpy') +$(cu_main): LIBFLAGS += -lsvml # compile with icpx and link with nvcc (undefined reference to `__svml_cos4_l9') +else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 +$(cu_main): LIBFLAGS += -L$(patsubst %bin/nvc++,%lib,$(subst ccache ,,$(CXX))) -lnvhpcatm -lnvcpumath -lnvc +endif +$(cu_main): LIBFLAGS += $(CULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH +$(cu_main): $(BUILDDIR)/gcheck_sa.o $(LIBDIR)/lib$(MG5AMC_CULIB).so $(cu_objects_exe) $(BUILDDIR)/gCurandRandomNumberKernel.o + $(NVCC) -o $@ $(BUILDDIR)/gcheck_sa.o $(CUARCHFLAGS) $(LIBFLAGS) -L$(LIBDIR) -l$(MG5AMC_CULIB) $(cu_objects_exe) $(BUILDDIR)/gCurandRandomNumberKernel.o $(CURANDLIBFLAGS) +endif + #------------------------------------------------------------------------------- # Generic target and build rules: objects from Fortran compilation @@ -561,6 +620,19 @@ $(fcxx_main): LIBFLAGS += $(CXXLIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PA $(fcxx_main): $(BUILDDIR)/fcheck_sa.o $(BUILDDIR)/fsampler.o $(LIBDIR)/lib$(MG5AMC_CXXLIB).so $(cxx_objects_exe) $(CXX) -o $@ $(BUILDDIR)/fcheck_sa.o $(OMPFLAGS) $(BUILDDIR)/fsampler.o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_CXXLIB) $(cxx_objects_exe) +ifneq ($(NVCC),) +ifneq ($(shell $(CXX) --version | grep ^Intel),) +$(fcu_main): LIBFLAGS += -lintlc # compile with icpx and link with nvcc (undefined reference to `_intel_fast_memcpy') +$(fcu_main): LIBFLAGS += -lsvml # compile with icpx and link with nvcc (undefined reference to `__svml_cos4_l9') +endif +ifeq ($(UNAME_S),Darwin) +$(fcu_main): LIBFLAGS += -L$(shell dirname $(shell $(FC) --print-file-name libgfortran.dylib)) # add path to libgfortran on Mac #375 +endif +$(fcu_main): LIBFLAGS += $(CULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH +$(fcu_main): $(BUILDDIR)/fcheck_sa.o $(BUILDDIR)/fsampler_cu.o $(LIBDIR)/lib$(MG5AMC_CULIB).so $(cu_objects_exe) + $(NVCC) -o $@ $(BUILDDIR)/fcheck_sa.o $(BUILDDIR)/fsampler_cu.o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_CULIB) $(cu_objects_exe) +endif + #------------------------------------------------------------------------------- # Target (and build rules): test objects and test executable @@ -680,65 +752,6 @@ endif #------------------------------------------------------------------------------- -# CUDA Target - -cuda: - cu_main=$(BUILDDIR)/gcheck.exe - fcu_main=$(BUILDDIR)/fgcheck.exe - - # Generic target and build rules: objects from CUDA compilation - $(BUILDDIR)/%.o : %.cu *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c $< -o $@ - - $(BUILDDIR)/%_cu.o : %.cc *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c -x cu $< -o $@ - - $(BUILDDIR)/gCrossSectionKernels.o: CUFLAGS += -Xcompiler -fno-fast-math - $(BUILDDIR)/gcheck_sa.o: CXXFLAGS += $(USE_NVTX) $(CUINC) - $(BUILDDIR)/gcheck_sa.o: CXXFLAGS += $(CXXFLAGSCURAND) - ifeq ($(RNDGEN),hasCurand) - $(BUILDDIR)/CurandRandomNumberKernel.o: CXXFLAGS += $(CUINC) - endif - - # Avoid "warning: builtin __has_trivial_... is deprecated; use __is_trivially_... instead" in nvcc with icx2023 (#592) - ifneq ($(shell $(CXX) --version | egrep '^(Intel)'),) - CUFLAGS += -Xcompiler -Wno-deprecated-builtins - endif - - MG5AMC_CULIB = mg5amc_$(processid_short)_cuda - cu_objects_lib=$(BUILDDIR)/gCPPProcess.o $(BUILDDIR)/gMatrixElementKernels.o $(BUILDDIR)/gBridgeKernels.o $(BUILDDIR)/gCrossSectionKernels.o - cu_objects_exe=$(BUILDDIR)/gCommonRandomNumberKernel.o $(BUILDDIR)/gRamboSamplingKernels.o - - $(LIBDIR)/lib$(MG5AMC_CULIB).so: $(BUILDDIR)/fbridge_cu.o - $(LIBDIR)/lib$(MG5AMC_CULIB).so: cu_objects_lib += $(BUILDDIR)/fbridge_cu.o - $(LIBDIR)/lib$(MG5AMC_CULIB).so: $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_objects_lib) - $(NVCC) --shared -o $@ $(cu_objects_lib) $(CULIBFLAGSRPATH2) -L$(LIBDIR) -l$(MG5AMC_COMMONLIB) - - ifneq ($(shell $(CXX) --version | grep ^Intel),) - $(cu_main): LIBFLAGS += -lintlc # compile with icpx and link with nvcc (undefined reference to `_intel_fast_memcpy') - $(cu_main): LIBFLAGS += -lsvml # compile with icpx and link with nvcc (undefined reference to `__svml_cos4_l9') - else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 - $(cu_main): LIBFLAGS += -L$(patsubst %bin/nvc++,%lib,$(subst ccache ,,$(CXX))) -lnvhpcatm -lnvcpumath -lnvc - endif - $(cu_main): LIBFLAGS += $(CULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH - $(cu_main): $(BUILDDIR)/gcheck_sa.o $(LIBDIR)/lib$(MG5AMC_CULIB).so $(cu_objects_exe) $(BUILDDIR)/gCurandRandomNumberKernel.o - $(NVCC) -o $@ $(BUILDDIR)/gcheck_sa.o $(CUARCHFLAGS) $(LIBFLAGS) -L$(LIBDIR) -l$(MG5AMC_CULIB) $(cu_objects_exe) $(BUILDDIR)/gCurandRandomNumberKernel.o $(CURANDLIBFLAGS) - - ifneq ($(shell $(CXX) --version | grep ^Intel),) - $(fcu_main): LIBFLAGS += -lintlc # compile with icpx and link with nvcc (undefined reference to `_intel_fast_memcpy') - $(fcu_main): LIBFLAGS += -lsvml # compile with icpx and link with nvcc (undefined reference to `__svml_cos4_l9') - endif - ifeq ($(UNAME_S),Darwin) - $(fcu_main): LIBFLAGS += -L$(shell dirname $(shell $(FC) --print-file-name libgfortran.dylib)) # add path to libgfortran on Mac #375 - endif - $(fcu_main): LIBFLAGS += $(CULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH - $(fcu_main): $(BUILDDIR)/fcheck_sa.o $(BUILDDIR)/fsampler_cu.o $(LIBDIR)/lib$(MG5AMC_CULIB).so $(cu_objects_exe) - $(NVCC) -o $@ $(BUILDDIR)/fcheck_sa.o $(BUILDDIR)/fsampler_cu.o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_CULIB) $(cu_objects_exe) - -#------------------------------------------------------------------------------- - # Target: clean the builds .PHONY: clean From bd0df5424d300172d5cc5e6622779e8e0ef86d89 Mon Sep 17 00:00:00 2001 From: Jorgen Date: Mon, 21 Aug 2023 17:06:03 +0200 Subject: [PATCH 014/129] Added cuda target --- epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk index 84aa07679d..bba2257773 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk @@ -750,6 +750,12 @@ else avxall: avxnone avxsse4 avxavx2 avx512y avx512z endif +# +# CUDA Target +# + +cuda: $(cu_main) + #------------------------------------------------------------------------------- # Target: clean the builds From df98ffae8bbd8e5c23acc201f9ac002c529d513d Mon Sep 17 00:00:00 2001 From: Jorgen Date: Mon, 21 Aug 2023 17:12:25 +0200 Subject: [PATCH 015/129] Added usage target if user doesent speficy target when invoking makefile and added cpp targets --- .../cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk | 22 ++++++++++++------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk index bba2257773..0cc2c9c206 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk @@ -86,6 +86,12 @@ endif #------------------------------------------------------------------------------- +# Target if user does not specify target +usage: + $(error You must specify a target! 'cuda', 'cppnone', 'cppsse4', 'cppavx2', 'cpp512y', 'cpp512z' are the targets currently supported!) + +#------------------------------------------------------------------------------- + #=== Configure the C++ compiler CXXFLAGS = $(OPTFLAGS) -std=c++17 $(INCFLAGS) -Wall -Wshadow -Wextra @@ -719,35 +725,35 @@ endif # Target: build all targets in all AVX modes (each AVX mode in a separate build directory) # Split the avxall target into five separate targets to allow parallel 'make -j avxall' builds # (Hack: add a fbridge.inc dependency to avxall, to ensure it is only copied once for all AVX modes) -avxnone: +cppnone: @echo $(MAKE) USEBUILDDIR=1 AVX=none -f $(CUDACPP_MAKEFILE) -avxsse4: +cppsse4: @echo $(MAKE) USEBUILDDIR=1 AVX=sse4 -f $(CUDACPP_MAKEFILE) -avxavx2: +cppavx2: @echo $(MAKE) USEBUILDDIR=1 AVX=avx2 -f $(CUDACPP_MAKEFILE) -avx512y: +cpp512y: @echo $(MAKE) USEBUILDDIR=1 AVX=512y -f $(CUDACPP_MAKEFILE) -avx512z: +cpp512z: @echo $(MAKE) USEBUILDDIR=1 AVX=512z -f $(CUDACPP_MAKEFILE) ifeq ($(UNAME_P),ppc64le) ###avxall: $(INCDIR)/fbridge.inc avxnone avxsse4 -avxall: avxnone avxsse4 +cppall: cppnone cppsse4 else ifeq ($(UNAME_P),arm) ###avxall: $(INCDIR)/fbridge.inc avxnone avxsse4 -avxall: avxnone avxsse4 +cppall: cppnone cppsse4 else ###avxall: $(INCDIR)/fbridge.inc avxnone avxsse4 avxavx2 avx512y avx512z -avxall: avxnone avxsse4 avxavx2 avx512y avx512z +cppall: cppnone cppsse4 cppavx2 cpp512y cpp512z endif # From f822e93b257cf1e5966b31e94ae50ca4cb430ffb Mon Sep 17 00:00:00 2001 From: Jorgen Date: Mon, 21 Aug 2023 17:14:30 +0200 Subject: [PATCH 016/129] Added .DEFAULT_GOAL so usage target will be run correctly --- epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk index 0cc2c9c206..f95d85abdb 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk @@ -86,6 +86,8 @@ endif #------------------------------------------------------------------------------- +.DEFAULT_GOAL := usage + # Target if user does not specify target usage: $(error You must specify a target! 'cuda', 'cppnone', 'cppsse4', 'cppavx2', 'cpp512y', 'cpp512z' are the targets currently supported!) From 63bb3b57ee6f3a2ffa94d445648c072d8f29221d Mon Sep 17 00:00:00 2001 From: Jorgen Date: Mon, 21 Aug 2023 17:20:04 +0200 Subject: [PATCH 017/129] Added targets to cpp build --- epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk index f95d85abdb..46e954b4f3 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk @@ -729,23 +729,23 @@ endif # (Hack: add a fbridge.inc dependency to avxall, to ensure it is only copied once for all AVX modes) cppnone: @echo - $(MAKE) USEBUILDDIR=1 AVX=none -f $(CUDACPP_MAKEFILE) + $(MAKE) USEBUILDDIR=1 AVX=none -f $(CUDACPP_MAKEFILE) $(cxx_main) cppsse4: @echo - $(MAKE) USEBUILDDIR=1 AVX=sse4 -f $(CUDACPP_MAKEFILE) + $(MAKE) USEBUILDDIR=1 AVX=sse4 -f $(CUDACPP_MAKEFILE) $(cxx_main) cppavx2: @echo - $(MAKE) USEBUILDDIR=1 AVX=avx2 -f $(CUDACPP_MAKEFILE) + $(MAKE) USEBUILDDIR=1 AVX=avx2 -f $(CUDACPP_MAKEFILE) $(cxx_main) cpp512y: @echo - $(MAKE) USEBUILDDIR=1 AVX=512y -f $(CUDACPP_MAKEFILE) + $(MAKE) USEBUILDDIR=1 AVX=512y -f $(CUDACPP_MAKEFILE) $(cxx_main) cpp512z: @echo - $(MAKE) USEBUILDDIR=1 AVX=512z -f $(CUDACPP_MAKEFILE) + $(MAKE) USEBUILDDIR=1 AVX=512z -f $(CUDACPP_MAKEFILE) $(cxx_main) ifeq ($(UNAME_P),ppc64le) ###avxall: $(INCDIR)/fbridge.inc avxnone avxsse4 From b5758b03ebd0827b1601f2861e151bfa1624b0bf Mon Sep 17 00:00:00 2001 From: Jorgen Date: Mon, 21 Aug 2023 17:45:22 +0200 Subject: [PATCH 018/129] Added correct cpp targets --- .../cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk index 46e954b4f3..35be28bd11 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk @@ -728,24 +728,24 @@ endif # Split the avxall target into five separate targets to allow parallel 'make -j avxall' builds # (Hack: add a fbridge.inc dependency to avxall, to ensure it is only copied once for all AVX modes) cppnone: - @echo - $(MAKE) USEBUILDDIR=1 AVX=none -f $(CUDACPP_MAKEFILE) $(cxx_main) + CXXFLAGS += -march=x86-64 + $(cxx_main) cppsse4: - @echo - $(MAKE) USEBUILDDIR=1 AVX=sse4 -f $(CUDACPP_MAKEFILE) $(cxx_main) + CXXFLAGS += -march=nehalem + $(cxx_main) cppavx2: - @echo - $(MAKE) USEBUILDDIR=1 AVX=avx2 -f $(CUDACPP_MAKEFILE) $(cxx_main) + CXXFLAGS += -march=haswell + $(cxx_main) cpp512y: - @echo - $(MAKE) USEBUILDDIR=1 AVX=512y -f $(CUDACPP_MAKEFILE) $(cxx_main) + CXXFLAGS += -march=skylake-avx512 -mprefer-vector-width=256 + $(cxx_main) cpp512z: - @echo - $(MAKE) USEBUILDDIR=1 AVX=512z -f $(CUDACPP_MAKEFILE) $(cxx_main) + CXXFLAGS += -march=skylake-avx512 -DMGONGPU_PVW512 + $(cxx_main) ifeq ($(UNAME_P),ppc64le) ###avxall: $(INCDIR)/fbridge.inc avxnone avxsse4 From eb3a7065692fb47ae96112258de075bda22783df Mon Sep 17 00:00:00 2001 From: Jorgen Date: Tue, 22 Aug 2023 10:49:05 +0200 Subject: [PATCH 019/129] Added $(MAKECMDGOALS) ifeq to CUDA compiler configuration --- .../cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk | 152 +++++++++--------- 1 file changed, 75 insertions(+), 77 deletions(-) diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk index 35be28bd11..181078ffc2 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk @@ -111,70 +111,73 @@ endif #------------------------------------------------------------------------------- -#=== Configure the CUDA compiler - -# If CXX is not a single word (example "clang++ --gcc-toolchain...") then disable CUDA builds (issue #505) -# This is because it is impossible to pass this to "CUFLAGS += -ccbin " below -ifneq ($(words $(subst ccache ,,$(CXX))),1) # allow at most "CXX=ccache " from outside - $(warning CUDA builds are not supported for multi-word CXX "$(CXX)") - override CUDA_HOME=disabled -endif - -# If CUDA_HOME is not set, try to set it from the location of nvcc -ifndef CUDA_HOME - CUDA_HOME = $(patsubst %bin/nvcc,%,$(shell which nvcc 2>/dev/null)) - $(warning CUDA_HOME was not set: using "$(CUDA_HOME)") -endif - -# Set NVCC as $(CUDA_HOME)/bin/nvcc if it exists -ifneq ($(wildcard $(CUDA_HOME)/bin/nvcc),) - NVCC = $(CUDA_HOME)/bin/nvcc - USE_NVTX ?=-DUSE_NVTX - # See https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html - # See https://arnon.dk/matching-sm-architectures-arch-and-gencode-for-various-nvidia-cards/ - # Default: use compute capability 70 for V100 (CERN lxbatch, CERN itscrd, Juwels Cluster). - # Embed device code for 70, and PTX for 70+. - # Export MADGRAPH_CUDA_ARCHITECTURE (comma-separated list) to use another value or list of values (see #533). - # Examples: use 60 for P100 (Piz Daint), 80 for A100 (Juwels Booster, NVidia raplab/Curiosity). - MADGRAPH_CUDA_ARCHITECTURE ?= 70 - ###CUARCHFLAGS = -gencode arch=compute_$(MADGRAPH_CUDA_ARCHITECTURE),code=compute_$(MADGRAPH_CUDA_ARCHITECTURE) -gencode arch=compute_$(MADGRAPH_CUDA_ARCHITECTURE),code=sm_$(MADGRAPH_CUDA_ARCHITECTURE) # Older implementation (AV): go back to this one for multi-GPU support #533 - ###CUARCHFLAGS = --gpu-architecture=compute_$(MADGRAPH_CUDA_ARCHITECTURE) --gpu-code=sm_$(MADGRAPH_CUDA_ARCHITECTURE),compute_$(MADGRAPH_CUDA_ARCHITECTURE) # Newer implementation (SH): cannot use this as-is for multi-GPU support #533 - comma:=, - CUARCHFLAGS = $(foreach arch,$(subst $(comma), ,$(MADGRAPH_CUDA_ARCHITECTURE)),-gencode arch=compute_$(arch),code=compute_$(arch) -gencode arch=compute_$(arch),code=sm_$(arch)) - CUINC = -I$(CUDA_HOME)/include/ - CURANDLIBFLAGS = -L$(CUDA_HOME)/lib64/ -lcurand # NB: -lcuda is not needed here! - CUOPTFLAGS = -lineinfo - CUFLAGS = $(foreach opt, $(OPTFLAGS), -Xcompiler $(opt)) $(CUOPTFLAGS) $(INCFLAGS) $(CUINC) $(USE_NVTX) $(CUARCHFLAGS) -use_fast_math - ###CUFLAGS += -Xcompiler -Wall -Xcompiler -Wextra -Xcompiler -Wshadow - ###NVCC_VERSION = $(shell $(NVCC) --version | grep 'Cuda compilation tools' | cut -d' ' -f5 | cut -d, -f1) - CUFLAGS += -std=c++17 # need CUDA >= 11.2 (see #333): this is enforced in mgOnGpuConfig.h - # Without -maxrregcount: baseline throughput: 6.5E8 (16384 32 12) up to 7.3E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 160 # improves throughput: 6.9E8 (16384 32 12) up to 7.7E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 128 # improves throughput: 7.3E8 (16384 32 12) up to 7.6E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 96 # degrades throughput: 4.1E8 (16384 32 12) up to 4.5E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 64 # degrades throughput: 1.7E8 (16384 32 12) flat at 1.7E8 (65536 128 12) -else ifneq ($(origin REQUIRE_CUDA),undefined) - # If REQUIRE_CUDA is set but no cuda is found, stop here (e.g. for CI tests on GPU #443) - $(error No cuda installation found (set CUDA_HOME or make nvcc visible in PATH)) -else - # No cuda. Switch cuda compilation off and go to common random numbers in C++ - $(warning CUDA_HOME is not set or is invalid: export CUDA_HOME to compile with cuda) - override NVCC= - override USE_NVTX= - override CUINC= - override CURANDLIBFLAGS= -endif -export NVCC -export CUFLAGS +#=== Configure the CUDA compiler for the CUDA target + +ifeq ($(MAKECMDGOALS),cuda) + # If CXX is not a single word (example "clang++ --gcc-toolchain...") then disable CUDA builds (issue #505) + # This is because it is impossible to pass this to "CUFLAGS += -ccbin " below + ifneq ($(words $(subst ccache ,,$(CXX))),1) # allow at most "CXX=ccache " from outside + $(warning CUDA builds are not supported for multi-word CXX "$(CXX)") + override CUDA_HOME=disabled + endif -# Set the host C++ compiler for nvcc via "-ccbin " -# (NB issue #505: this must be a single word, "clang++ --gcc-toolchain..." is not supported) -CUFLAGS += -ccbin $(shell which $(subst ccache ,,$(CXX))) + # If CUDA_HOME is not set, try to set it from the location of nvcc + ifndef CUDA_HOME + CUDA_HOME = $(patsubst %bin/nvcc,%,$(shell which nvcc 2>/dev/null)) + $(warning CUDA_HOME was not set: using "$(CUDA_HOME)") + endif -# Allow newer (unsupported) C++ compilers with older versions of CUDA if ALLOW_UNSUPPORTED_COMPILER_IN_CUDA is set (#504) -ifneq ($(origin ALLOW_UNSUPPORTED_COMPILER_IN_CUDA),undefined) -CUFLAGS += -allow-unsupported-compiler -endif + # Set NVCC as $(CUDA_HOME)/bin/nvcc if it exists + ifneq ($(wildcard $(CUDA_HOME)/bin/nvcc),) + NVCC = $(CUDA_HOME)/bin/nvcc + USE_NVTX ?=-DUSE_NVTX + # See https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html + # See https://arnon.dk/matching-sm-architectures-arch-and-gencode-for-various-nvidia-cards/ + # Default: use compute capability 70 for V100 (CERN lxbatch, CERN itscrd, Juwels Cluster). + # Embed device code for 70, and PTX for 70+. + # Export MADGRAPH_CUDA_ARCHITECTURE (comma-separated list) to use another value or list of values (see #533). + # Examples: use 60 for P100 (Piz Daint), 80 for A100 (Juwels Booster, NVidia raplab/Curiosity). + MADGRAPH_CUDA_ARCHITECTURE ?= 70 + ###CUARCHFLAGS = -gencode arch=compute_$(MADGRAPH_CUDA_ARCHITECTURE),code=compute_$(MADGRAPH_CUDA_ARCHITECTURE) -gencode arch=compute_$(MADGRAPH_CUDA_ARCHITECTURE),code=sm_$(MADGRAPH_CUDA_ARCHITECTURE) # Older implementation (AV): go back to this one for multi-GPU support #533 + ###CUARCHFLAGS = --gpu-architecture=compute_$(MADGRAPH_CUDA_ARCHITECTURE) --gpu-code=sm_$(MADGRAPH_CUDA_ARCHITECTURE),compute_$(MADGRAPH_CUDA_ARCHITECTURE) # Newer implementation (SH): cannot use this as-is for multi-GPU support #533 + comma:=, + CUARCHFLAGS = $(foreach arch,$(subst $(comma), ,$(MADGRAPH_CUDA_ARCHITECTURE)),-gencode arch=compute_$(arch),code=compute_$(arch) -gencode arch=compute_$(arch),code=sm_$(arch)) + CUINC = -I$(CUDA_HOME)/include/ + CURANDLIBFLAGS = -L$(CUDA_HOME)/lib64/ -lcurand # NB: -lcuda is not needed here! + CUOPTFLAGS = -lineinfo + CUFLAGS = $(foreach opt, $(OPTFLAGS), -Xcompiler $(opt)) $(CUOPTFLAGS) $(INCFLAGS) $(CUINC) $(USE_NVTX) $(CUARCHFLAGS) -use_fast_math + ###CUFLAGS += -Xcompiler -Wall -Xcompiler -Wextra -Xcompiler -Wshadow + ###NVCC_VERSION = $(shell $(NVCC) --version | grep 'Cuda compilation tools' | cut -d' ' -f5 | cut -d, -f1) + CUFLAGS += -std=c++17 # need CUDA >= 11.2 (see #333): this is enforced in mgOnGpuConfig.h + # Without -maxrregcount: baseline throughput: 6.5E8 (16384 32 12) up to 7.3E8 (65536 128 12) + ###CUFLAGS+= --maxrregcount 160 # improves throughput: 6.9E8 (16384 32 12) up to 7.7E8 (65536 128 12) + ###CUFLAGS+= --maxrregcount 128 # improves throughput: 7.3E8 (16384 32 12) up to 7.6E8 (65536 128 12) + ###CUFLAGS+= --maxrregcount 96 # degrades throughput: 4.1E8 (16384 32 12) up to 4.5E8 (65536 128 12) + ###CUFLAGS+= --maxrregcount 64 # degrades throughput: 1.7E8 (16384 32 12) flat at 1.7E8 (65536 128 12) + else ifneq ($(origin REQUIRE_CUDA),undefined) + # If REQUIRE_CUDA is set but no cuda is found, stop here (e.g. for CI tests on GPU #443) + $(error No cuda installation found (set CUDA_HOME or make nvcc visible in PATH)) + else + # No cuda. Switch cuda compilation off and go to common random numbers in C++ + $(warning CUDA_HOME is not set or is invalid: export CUDA_HOME to compile with cuda) + override NVCC= + override USE_NVTX= + override CUINC= + override CURANDLIBFLAGS= + endif + export NVCC + export CUFLAGS + + # Set the host C++ compiler for nvcc via "-ccbin " + # (NB issue #505: this must be a single word, "clang++ --gcc-toolchain..." is not supported) + CUFLAGS += -ccbin $(shell which $(subst ccache ,,$(CXX))) + + # Allow newer (unsupported) C++ compilers with older versions of CUDA if ALLOW_UNSUPPORTED_COMPILER_IN_CUDA is set (#504) + ifneq ($(origin ALLOW_UNSUPPORTED_COMPILER_IN_CUDA),undefined) + CUFLAGS += -allow-unsupported-compiler + endif + +endif # ($(MAKECMDGOALS),cuda) #------------------------------------------------------------------------------- @@ -727,25 +730,20 @@ endif # Target: build all targets in all AVX modes (each AVX mode in a separate build directory) # Split the avxall target into five separate targets to allow parallel 'make -j avxall' builds # (Hack: add a fbridge.inc dependency to avxall, to ensure it is only copied once for all AVX modes) -cppnone: - CXXFLAGS += -march=x86-64 - $(cxx_main) +cppnone: CXXFLAGS += -march=x86-64 +cppnone: $(cxx_main) -cppsse4: - CXXFLAGS += -march=nehalem - $(cxx_main) +cppsse4: CXXFLAGS += -march=nehalem +cppsse4: $(cxx_main) -cppavx2: - CXXFLAGS += -march=haswell - $(cxx_main) +cppavx2: CXXFLAGS += -march=haswell +cppavx2: $(cxx_main) -cpp512y: - CXXFLAGS += -march=skylake-avx512 -mprefer-vector-width=256 - $(cxx_main) +cpp512y: CXXFLAGS += -march=skylake-avx512 -mprefer-vector-width=256 +cpp512y: $(cxx_main) -cpp512z: - CXXFLAGS += -march=skylake-avx512 -DMGONGPU_PVW512 - $(cxx_main) +cpp512z: CXXFLAGS += -march=skylake-avx512 -DMGONGPU_PVW512 +cpp512z: $(cxx_main) ifeq ($(UNAME_P),ppc64le) ###avxall: $(INCDIR)/fbridge.inc avxnone avxsse4 From b23ada071e81d435dda66af46c288d01ba73c92e Mon Sep 17 00:00:00 2001 From: Jorgen T Date: Fri, 25 Aug 2023 10:36:14 +0200 Subject: [PATCH 020/129] Removed automatic configuration of AVX level --- .../cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk | 26 ------------------- 1 file changed, 26 deletions(-) diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk index 181078ffc2..daf1dd6fe8 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk @@ -237,32 +237,6 @@ override OMPFLAGS = -fopenmp ###override OMPFLAGS = # disable OpenMP MT (default before #575) endif -# Set the default AVX (vectorization) choice -ifeq ($(AVX),) - ifeq ($(UNAME_P),ppc64le) - ###override AVX = none - override AVX = sse4 - else ifeq ($(UNAME_P),arm) - ###override AVX = none - override AVX = sse4 - else ifeq ($(wildcard /proc/cpuinfo),) - override AVX = none - $(warning Using AVX='$(AVX)' because host SIMD features cannot be read from /proc/cpuinfo) - else ifeq ($(shell grep -m1 -c avx512vl /proc/cpuinfo)$(shell $(CXX) --version | grep ^clang),1) - override AVX = 512y - ###$(info Using AVX='$(AVX)' as no user input exists) - else - override AVX = avx2 - ifneq ($(shell grep -m1 -c avx512vl /proc/cpuinfo),1) - $(warning Using AVX='$(AVX)' because host does not support avx512vl) - else - $(warning Using AVX='$(AVX)' because this is faster than avx512vl for clang) - endif - endif -else - ###$(info Using AVX='$(AVX)' according to user input) -endif - # Set the default FPTYPE (floating point type) choice ifeq ($(FPTYPE),) override FPTYPE = d From 683e641c7c17b66f262d1bc847b38b1c96c22b39 Mon Sep 17 00:00:00 2001 From: Jorgen T Date: Fri, 25 Aug 2023 11:04:33 +0200 Subject: [PATCH 021/129] Fixed correct AVX level depending on C++ compiler --- .../cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk | 37 ++++++++----------- 1 file changed, 15 insertions(+), 22 deletions(-) diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk index daf1dd6fe8..39db3080d0 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk @@ -90,7 +90,7 @@ endif # Target if user does not specify target usage: - $(error You must specify a target! 'cuda', 'cppnone', 'cppsse4', 'cppavx2', 'cpp512y', 'cpp512z' are the targets currently supported!) + $(error Unknown target='$(MAKECMDGOALS)': only 'cppnone', 'cppsse4', 'cppavx2', 'cpp512y', 'cpp512z' and 'cuda' are supported!) #------------------------------------------------------------------------------- @@ -282,44 +282,42 @@ CXXFLAGS += $(OMPFLAGS) # [See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96476] $(info AVX=$(AVX)) ifeq ($(UNAME_P),ppc64le) - ifeq ($(AVX),sse4) + ifeq ($(MAKECMDGOALS),cppsse4) override AVXFLAGS = -D__SSE4_2__ # Power9 VSX with 128 width (VSR registers) - else ifneq ($(AVX),none) + else ifneq ($(MAKECMDGOALS),cppnone) $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on PowerPC for the moment) endif else ifeq ($(UNAME_P),arm) - ifeq ($(AVX),sse4) + ifeq ($(MAKECMDGOALS),cppsse4) override AVXFLAGS = -D__SSE4_2__ # ARM NEON with 128 width (Q/quadword registers) - else ifneq ($(AVX),none) + else ifneq ($(MAKECMDGOALS),cppnone) $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on ARM for the moment) endif else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 - ifeq ($(AVX),none) + ifeq ($(MAKECMDGOALS),cppnone) override AVXFLAGS = -mno-sse3 # no SIMD - else ifeq ($(AVX),sse4) + else ifeq ($(MAKECMDGOALS),cppsse4) override AVXFLAGS = -mno-avx # SSE4.2 with 128 width (xmm registers) - else ifeq ($(AVX),avx2) + else ifeq ($(MAKECMDGOALS),cppavx2) override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(AVX),512y) + else ifeq ($(MAKECMDGOALS),cpp512y) override AVXFLAGS = -march=skylake -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(AVX),512z) + else ifeq ($(MAKECMDGOALS),cpp512z) override AVXFLAGS = -march=skylake -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) else $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) endif else - ifeq ($(AVX),none) + ifeq ($(MAKECMDGOALS),cppnone) override AVXFLAGS = -march=x86-64 # no SIMD (see #588) - else ifeq ($(AVX),sse4) + else ifeq ($(MAKECMDGOALS),cppsse4) override AVXFLAGS = -march=nehalem # SSE4.2 with 128 width (xmm registers) - else ifeq ($(AVX),avx2) + else ifeq ($(MAKECMDGOALS),cppavx2) override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(AVX),512y) + else ifeq ($(MAKECMDGOALS),cpp512y) override AVXFLAGS = -march=skylake-avx512 -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(AVX),512z) + else ifeq ($(MAKECMDGOALS),cpp512z) override AVXFLAGS = -march=skylake-avx512 -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) - else - $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) endif endif # For the moment, use AVXFLAGS everywhere: eventually, use them only in encapsulated implementations? @@ -704,19 +702,14 @@ endif # Target: build all targets in all AVX modes (each AVX mode in a separate build directory) # Split the avxall target into five separate targets to allow parallel 'make -j avxall' builds # (Hack: add a fbridge.inc dependency to avxall, to ensure it is only copied once for all AVX modes) -cppnone: CXXFLAGS += -march=x86-64 cppnone: $(cxx_main) -cppsse4: CXXFLAGS += -march=nehalem cppsse4: $(cxx_main) -cppavx2: CXXFLAGS += -march=haswell cppavx2: $(cxx_main) -cpp512y: CXXFLAGS += -march=skylake-avx512 -mprefer-vector-width=256 cpp512y: $(cxx_main) -cpp512z: CXXFLAGS += -march=skylake-avx512 -DMGONGPU_PVW512 cpp512z: $(cxx_main) ifeq ($(UNAME_P),ppc64le) From fca0b73acb826a4eff05316fd3637b8a026b6293 Mon Sep 17 00:00:00 2001 From: Jorgen T Date: Fri, 25 Aug 2023 15:24:00 +0200 Subject: [PATCH 022/129] Reworked configuration of setting AVX level --- .../cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk | 44 +++++++++++++------ 1 file changed, 30 insertions(+), 14 deletions(-) diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk index 39db3080d0..a8c5d57288 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk @@ -261,6 +261,20 @@ ifeq ($(RNDGEN),) endif endif +# set the correct AVX based on avxcpp target +ifeq ($(MAKECMDGOALS),cppnone) + override AVX = none # no SIMD +else ifeq ($(MAKECMDGOALS),cppsse4) + override AVX = sse4 # SSE4.2 with 128 width (xmm registers) +else ifeq ($(MAKECMDGOALS),cppavx2) + override AVX = avx2 # AVX2 with 256 width (ymm registers) [DEFAULT for clang] +else ifeq ($(MAKECMDGOALS),cpp512y) + override AVX = 512y # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] +else ifeq ($(MAKECMDGOALS),cpp512z) + override AVX = 512z # AVX512 with 512 width (zmm registers) +else ifeq ($(MAKECMDGOALS),cuda) + override AVX = none # no SIMD + # Export AVX, FPTYPE, HELINL, HRDCOD, RNDGEN, OMPFLAGS so that it is not necessary to pass them to the src Makefile too export AVX export FPTYPE @@ -282,42 +296,44 @@ CXXFLAGS += $(OMPFLAGS) # [See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96476] $(info AVX=$(AVX)) ifeq ($(UNAME_P),ppc64le) - ifeq ($(MAKECMDGOALS),cppsse4) + ifeq ($(AVX),sse4) override AVXFLAGS = -D__SSE4_2__ # Power9 VSX with 128 width (VSR registers) - else ifneq ($(MAKECMDGOALS),cppnone) + else ifneq ($(AVX),none) $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on PowerPC for the moment) endif else ifeq ($(UNAME_P),arm) - ifeq ($(MAKECMDGOALS),cppsse4) + ifeq ($(AVX),sse4) override AVXFLAGS = -D__SSE4_2__ # ARM NEON with 128 width (Q/quadword registers) - else ifneq ($(MAKECMDGOALS),cppnone) + else ifneq ($(AVX),none) $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on ARM for the moment) endif else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 - ifeq ($(MAKECMDGOALS),cppnone) + ifeq ($(AVX),none) override AVXFLAGS = -mno-sse3 # no SIMD - else ifeq ($(MAKECMDGOALS),cppsse4) + else ifeq ($(AVX),sse4) override AVXFLAGS = -mno-avx # SSE4.2 with 128 width (xmm registers) - else ifeq ($(MAKECMDGOALS),cppavx2) + else ifeq ($(AVX),avx2) override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(MAKECMDGOALS),cpp512y) + else ifeq ($(AVX),512y) override AVXFLAGS = -march=skylake -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(MAKECMDGOALS),cpp512z) + else ifeq ($(AVX),512z) override AVXFLAGS = -march=skylake -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) else $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) endif else - ifeq ($(MAKECMDGOALS),cppnone) + ifeq ($(AVX),none) override AVXFLAGS = -march=x86-64 # no SIMD (see #588) - else ifeq ($(MAKECMDGOALS),cppsse4) + else ifeq ($(AVX),sse4) override AVXFLAGS = -march=nehalem # SSE4.2 with 128 width (xmm registers) - else ifeq ($(MAKECMDGOALS),cppavx2) + else ifeq ($(AVX),avx2) override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(MAKECMDGOALS),cpp512y) + else ifeq ($(AVX),512y) override AVXFLAGS = -march=skylake-avx512 -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(MAKECMDGOALS),cpp512z) + else ifeq ($(AVX),512z) override AVXFLAGS = -march=skylake-avx512 -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) + else + $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) endif endif # For the moment, use AVXFLAGS everywhere: eventually, use them only in encapsulated implementations? From 489c453390a1b6cdbac39504da50c9decdba363e Mon Sep 17 00:00:00 2001 From: Jorgen T Date: Fri, 25 Aug 2023 15:28:56 +0200 Subject: [PATCH 023/129] Fixed missing endif and removed AVX configuration in cuda compilation --- .../cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk | 87 ++++++++++--------- 1 file changed, 44 insertions(+), 43 deletions(-) diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk index a8c5d57288..4a89c51b4a 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk @@ -272,8 +272,7 @@ else ifeq ($(MAKECMDGOALS),cpp512y) override AVX = 512y # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] else ifeq ($(MAKECMDGOALS),cpp512z) override AVX = 512z # AVX512 with 512 width (zmm registers) -else ifeq ($(MAKECMDGOALS),cuda) - override AVX = none # no SIMD +endif # Export AVX, FPTYPE, HELINL, HRDCOD, RNDGEN, OMPFLAGS so that it is not necessary to pass them to the src Makefile too export AVX @@ -294,50 +293,52 @@ CXXFLAGS += $(OMPFLAGS) # Set the build flags appropriate to each AVX choice (example: "make AVX=none") # [NB MGONGPU_PVW512 is needed because "-mprefer-vector-width=256" is not exposed in a macro] # [See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96476] -$(info AVX=$(AVX)) -ifeq ($(UNAME_P),ppc64le) - ifeq ($(AVX),sse4) - override AVXFLAGS = -D__SSE4_2__ # Power9 VSX with 128 width (VSR registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on PowerPC for the moment) - endif -else ifeq ($(UNAME_P),arm) - ifeq ($(AVX),sse4) - override AVXFLAGS = -D__SSE4_2__ # ARM NEON with 128 width (Q/quadword registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on ARM for the moment) - endif -else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 - ifeq ($(AVX),none) - override AVXFLAGS = -mno-sse3 # no SIMD - else ifeq ($(AVX),sse4) - override AVXFLAGS = -mno-avx # SSE4.2 with 128 width (xmm registers) - else ifeq ($(AVX),avx2) - override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(AVX),512y) - override AVXFLAGS = -march=skylake -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(AVX),512z) - override AVXFLAGS = -march=skylake -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) - else - $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) - endif -else - ifeq ($(AVX),none) - override AVXFLAGS = -march=x86-64 # no SIMD (see #588) - else ifeq ($(AVX),sse4) - override AVXFLAGS = -march=nehalem # SSE4.2 with 128 width (xmm registers) - else ifeq ($(AVX),avx2) - override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(AVX),512y) - override AVXFLAGS = -march=skylake-avx512 -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(AVX),512z) - override AVXFLAGS = -march=skylake-avx512 -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) +ifeq ($(filter cppnone cppsse4 cppavx2 cpp512y cpp512z,$(MAKECMDGOALS)),$(MAKECMDGOALS)) + $(info AVX=$(AVX)) + ifeq ($(UNAME_P),ppc64le) + ifeq ($(AVX),sse4) + override AVXFLAGS = -D__SSE4_2__ # Power9 VSX with 128 width (VSR registers) + else ifneq ($(AVX),none) + $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on PowerPC for the moment) + endif + else ifeq ($(UNAME_P),arm) + ifeq ($(AVX),sse4) + override AVXFLAGS = -D__SSE4_2__ # ARM NEON with 128 width (Q/quadword registers) + else ifneq ($(AVX),none) + $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on ARM for the moment) + endif + else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 + ifeq ($(AVX),none) + override AVXFLAGS = -mno-sse3 # no SIMD + else ifeq ($(AVX),sse4) + override AVXFLAGS = -mno-avx # SSE4.2 with 128 width (xmm registers) + else ifeq ($(AVX),avx2) + override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] + else ifeq ($(AVX),512y) + override AVXFLAGS = -march=skylake -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] + else ifeq ($(AVX),512z) + override AVXFLAGS = -march=skylake -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) + else + $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) + endif else - $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) + ifeq ($(AVX),none) + override AVXFLAGS = -march=x86-64 # no SIMD (see #588) + else ifeq ($(AVX),sse4) + override AVXFLAGS = -march=nehalem # SSE4.2 with 128 width (xmm registers) + else ifeq ($(AVX),avx2) + override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] + else ifeq ($(AVX),512y) + override AVXFLAGS = -march=skylake-avx512 -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] + else ifeq ($(AVX),512z) + override AVXFLAGS = -march=skylake-avx512 -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) + else + $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) + endif endif + # For the moment, use AVXFLAGS everywhere: eventually, use them only in encapsulated implementations? + CXXFLAGS+= $(AVXFLAGS) endif -# For the moment, use AVXFLAGS everywhere: eventually, use them only in encapsulated implementations? -CXXFLAGS+= $(AVXFLAGS) # Set the build flags appropriate to each FPTYPE choice (example: "make FPTYPE=f") $(info FPTYPE=$(FPTYPE)) From 01b7da398cd61cb089c016858a4045a08c99e3ab Mon Sep 17 00:00:00 2001 From: Jorgen T Date: Fri, 25 Aug 2023 15:33:32 +0200 Subject: [PATCH 024/129] Fixed AVX not being properly set --- epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk index 4a89c51b4a..babb4ec552 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk @@ -293,7 +293,7 @@ CXXFLAGS += $(OMPFLAGS) # Set the build flags appropriate to each AVX choice (example: "make AVX=none") # [NB MGONGPU_PVW512 is needed because "-mprefer-vector-width=256" is not exposed in a macro] # [See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96476] -ifeq ($(filter cppnone cppsse4 cppavx2 cpp512y cpp512z,$(MAKECMDGOALS)),$(MAKECMDGOALS)) +ifeq ($(findstring cpp,$(MAKECMDGOALS)),cpp) $(info AVX=$(AVX)) ifeq ($(UNAME_P),ppc64le) ifeq ($(AVX),sse4) From e734f49519585fe7f04be2f376c950d6af708b81 Mon Sep 17 00:00:00 2001 From: Jorgen T Date: Fri, 25 Aug 2023 15:44:49 +0200 Subject: [PATCH 025/129] Fixed cuda compilation in cudacpp_src.mk and fixed trailing whitespace in AVX assignment --- .../cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk | 20 ++--- epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk | 84 ++++++++++--------- 2 files changed, 53 insertions(+), 51 deletions(-) diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk index babb4ec552..5cc00243bc 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk @@ -262,16 +262,16 @@ ifeq ($(RNDGEN),) endif # set the correct AVX based on avxcpp target -ifeq ($(MAKECMDGOALS),cppnone) - override AVX = none # no SIMD -else ifeq ($(MAKECMDGOALS),cppsse4) - override AVX = sse4 # SSE4.2 with 128 width (xmm registers) -else ifeq ($(MAKECMDGOALS),cppavx2) - override AVX = avx2 # AVX2 with 256 width (ymm registers) [DEFAULT for clang] -else ifeq ($(MAKECMDGOALS),cpp512y) - override AVX = 512y # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] -else ifeq ($(MAKECMDGOALS),cpp512z) - override AVX = 512z # AVX512 with 512 width (zmm registers) +ifeq ($(MAKECMDGOALS),cppnone) # no SIMD + override AVX = none +else ifeq ($(MAKECMDGOALS),cppsse4) # SSE4.2 with 128 width (xmm registers) + override AVX = sse4 +else ifeq ($(MAKECMDGOALS),cppavx2) # AVX2 with 256 width (ymm registers) [DEFAULT for clang] + override AVX = avx2 +else ifeq ($(MAKECMDGOALS),cpp512y) # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] + override AVX = 512y +else ifeq ($(MAKECMDGOALS),cpp512z) # AVX512 with 512 width (zmm registers) + override AVX = 512z endif # Export AVX, FPTYPE, HELINL, HRDCOD, RNDGEN, OMPFLAGS so that it is not necessary to pass them to the src Makefile too diff --git a/epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk b/epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk index 554d7a704c..63bc407811 100644 --- a/epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk +++ b/epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk @@ -88,50 +88,52 @@ CXXFLAGS += $(OMPFLAGS) # Set the build flags appropriate to each AVX choice (example: "make AVX=none") # [NB MGONGPU_PVW512 is needed because "-mprefer-vector-width=256" is not exposed in a macro] # [See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96476] -$(info AVX=$(AVX)) -ifeq ($(UNAME_P),ppc64le) - ifeq ($(AVX),sse4) - override AVXFLAGS = -D__SSE4_2__ # Power9 VSX with 128 width (VSR registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on PowerPC for the moment) - endif -else ifeq ($(UNAME_P),arm) - ifeq ($(AVX),sse4) - override AVXFLAGS = -D__SSE4_2__ # ARM NEON with 128 width (Q/quadword registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on ARM for the moment) - endif -else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 - ifeq ($(AVX),none) - override AVXFLAGS = -mno-sse3 # no SIMD - else ifeq ($(AVX),sse4) - override AVXFLAGS = -mno-avx # SSE4.2 with 128 width (xmm registers) - else ifeq ($(AVX),avx2) - override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(AVX),512y) - override AVXFLAGS = -march=skylake -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(AVX),512z) - override AVXFLAGS = -march=skylake -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) +ifeq ($(NVCC),) + $(info AVX=$(AVX)) + ifeq ($(UNAME_P),ppc64le) + ifeq ($(AVX),sse4) + override AVXFLAGS = -D__SSE4_2__ # Power9 VSX with 128 width (VSR registers) + else ifneq ($(AVX),none) + $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on PowerPC for the moment) + endif + else ifeq ($(UNAME_P),arm) + ifeq ($(AVX),sse4) + override AVXFLAGS = -D__SSE4_2__ # ARM NEON with 128 width (Q/quadword registers) + else ifneq ($(AVX),none) + $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on ARM for the moment) + endif + else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 + ifeq ($(AVX),none) + override AVXFLAGS = -mno-sse3 # no SIMD + else ifeq ($(AVX),sse4) + override AVXFLAGS = -mno-avx # SSE4.2 with 128 width (xmm registers) + else ifeq ($(AVX),avx2) + override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] + else ifeq ($(AVX),512y) + override AVXFLAGS = -march=skylake -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] + else ifeq ($(AVX),512z) + override AVXFLAGS = -march=skylake -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) + else + $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) + endif else - $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) - endif -else - ifeq ($(AVX),none) - override AVXFLAGS = -march=x86-64 # no SIMD (see #588) - else ifeq ($(AVX),sse4) - override AVXFLAGS = -march=nehalem # SSE4.2 with 128 width (xmm registers) - else ifeq ($(AVX),avx2) - override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(AVX),512y) - override AVXFLAGS = -march=skylake-avx512 -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(AVX),512z) - override AVXFLAGS = -march=skylake-avx512 -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) + ifeq ($(AVX),none) + override AVXFLAGS = -march=x86-64 # no SIMD (see #588) + else ifeq ($(AVX),sse4) + override AVXFLAGS = -march=nehalem # SSE4.2 with 128 width (xmm registers) + else ifeq ($(AVX),avx2) + override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] + else ifeq ($(AVX),512y) + override AVXFLAGS = -march=skylake-avx512 -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] + else ifeq ($(AVX),512z) + override AVXFLAGS = -march=skylake-avx512 -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) + else ifneq ($(AVX),none) + $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) + endif endif + # For the moment, use AVXFLAGS everywhere: eventually, use them only in encapsulated implementations? + CXXFLAGS+= $(AVXFLAGS) endif -# For the moment, use AVXFLAGS everywhere: eventually, use them only in encapsulated implementations? -CXXFLAGS+= $(AVXFLAGS) # Set the build flags appropriate to each FPTYPE choice (example: "make FPTYPE=f") ###$(info FPTYPE=$(FPTYPE)) From 35d6aee82a2d35c5b291122a8fe1284065cece3b Mon Sep 17 00:00:00 2001 From: Jorgen T Date: Mon, 28 Aug 2023 11:56:42 +0200 Subject: [PATCH 026/129] Added else case in AVX configuration --- epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk index 5cc00243bc..5d39b675c9 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk @@ -272,6 +272,8 @@ else ifeq ($(MAKECMDGOALS),cpp512y) # AVX512 with 256 width (ymm registers) [DEF override AVX = 512y else ifeq ($(MAKECMDGOALS),cpp512z) # AVX512 with 512 width (zmm registers) override AVX = 512z +else + override AVX = none endif # Export AVX, FPTYPE, HELINL, HRDCOD, RNDGEN, OMPFLAGS so that it is not necessary to pass them to the src Makefile too From b611e9e683243303cba72ccd699e478bd49c96f0 Mon Sep 17 00:00:00 2001 From: Jorgen T Date: Mon, 28 Aug 2023 13:31:27 +0200 Subject: [PATCH 027/129] Port changes to BUILDDIRTAG to cudacpp_src.mk --- epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk b/epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk index 63bc407811..9726fbd0e8 100644 --- a/epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk +++ b/epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk @@ -177,11 +177,19 @@ endif # Build directory "short" tag (defines target and path to the optional build directory) # (Rationale: keep directory names shorter, e.g. do not include random number generator choice) -override DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) +ifneq ($(NVCC),) + override DIRTAG = cuda_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) +else + override DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) +endif # Build lockfile "full" tag (defines full specification of build options that cannot be intermixed) # (Rationale: avoid mixing of CUDA and no-CUDA environment builds with different random number generators) -override TAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) +ifneq ($(NVCC),) + override TAG = cuda_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) +else + override TAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) +endif # Build directory: current directory by default, or build.$(DIRTAG) if USEBUILDDIR==1 ###$(info Current directory is $(shell pwd)) From fbdb45af91ed5c3ee44920dc2e1e63c05ac09ab6 Mon Sep 17 00:00:00 2001 From: Jorgen T Date: Mon, 28 Aug 2023 15:30:03 +0200 Subject: [PATCH 028/129] Added build specific clean targets in cudacpp.mk and cudacpp_src.mk --- .../cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk | 27 ++++++++++++++++- epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk | 30 +++++++++++++++++-- 2 files changed, 54 insertions(+), 3 deletions(-) diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk index 5d39b675c9..5bf52c3c5f 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk @@ -755,7 +755,11 @@ cuda: $(cu_main) clean: ifeq ($(USEBUILDDIR),1) - rm -rf $(BUILDDIR) + ifeq ($(shell test $$(words $$(wildcard build.*)) -gt 1; echo $$?), 0) + $(error Multiple BUILDDIR's found! Use 'cleannone', 'cleansse4', 'cleanavx2', 'clean512y','clean512z', 'cleancuda' or 'cleanall'.) + else + rm -rf build.* + endif else rm -f $(BUILDDIR)/.build.* $(BUILDDIR)/*.o $(BUILDDIR)/*.exe rm -f $(LIBDIR)/lib$(MG5AMC_CXXLIB).so $(LIBDIR)/lib$(MG5AMC_CULIB).so @@ -777,6 +781,27 @@ ifneq ($(wildcard $(TESTDIRCOMMON)),) endif $(MAKE) -C $(TESTDIRLOCAL) clean +# Target: clean different builds +cleannone: + rm -rf build.none_* + $(MAKE) -C ../../src cleannone -f $(CUDACPP_SRC_MAKEFILE) + +cleansse4: + rm -rf build.sse4_* + $(MAKE) -C ../../src cleansse4 -f $(CUDACPP_SRC_MAKEFILE) + +cleanavx2: + rm -rf build.avx2_* + $(MAKE) -C ../../src cleanavx2 -f $(CUDACPP_SRC_MAKEFILE) + +clean512y: + rm -rf build.512y_* + $(MAKE) -C ../../src clean512y -f $(CUDACPP_SRC_MAKEFILE) + +clean512z: + rm -rf build.512z_* + $(MAKE) -C ../../src clean512z -f $(CUDACPP_SRC_MAKEFILE) + #------------------------------------------------------------------------------- # Target: show system and compiler information diff --git a/epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk b/epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk index 9726fbd0e8..fd9560c469 100644 --- a/epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk +++ b/epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk @@ -283,8 +283,12 @@ endif clean: ifeq ($(USEBUILDDIR),1) - rm -rf $(LIBDIR) - rm -rf $(BUILDDIR) + ifeq ($(shell test $$(words $$(wildcard build.*)) -gt 1; echo $$?), 0) + $(error Multiple BUILDDIR's found! Use 'cleannone', 'cleansse4', 'cleanavx2', 'clean512y','clean512z', 'cleancuda' or 'cleanall'.) + else + rm -rf $(LIBDIR)/build.* + rm -rf build.* + endif else rm -f $(LIBDIR)/.build.* $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so rm -f $(BUILDDIR)/.build.* $(BUILDDIR)/*.o $(BUILDDIR)/*.exe @@ -297,4 +301,26 @@ cleanall: rm -rf $(LIBDIR)/build.* rm -rf build.* +# Target: clean different builds + +cleannone: + rm -rf $(LIBDIR)/build.none_* + rm -rf build.none_* + +cleansse4: + rm -rf $(LIBDIR)/build.sse4_* + rm -rf build.sse4_* + +cleanavx2: + rm -rf $(LIBDIR)/build.avx2_* + rm -rf build.avx2_* + +clean512y: + rm -rf $(LIBDIR)/build.512y_* + rm -rf build.512y_* + +clean512z: + rm -rf $(LIBDIR)/build.512z_* + rm -rf build.512z_* + #------------------------------------------------------------------------------- From b86bf3cfd9d4f65193fc243745a2ea38f7492b53 Mon Sep 17 00:00:00 2001 From: Jorgen T Date: Mon, 28 Aug 2023 17:08:07 +0200 Subject: [PATCH 029/129] Fixed cleanall with new clean targets --- epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk | 5 +++-- epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk index 5bf52c3c5f..6b5a2ecde8 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk @@ -769,9 +769,10 @@ endif cleanall: @echo - $(MAKE) USEBUILDDIR=0 clean -f $(CUDACPP_MAKEFILE) + rm -f $(BUILDDIR)/.build.* $(BUILDDIR)/*.o $(BUILDDIR)/*.exe + rm -f $(LIBDIR)/lib$(MG5AMC_CXXLIB).so $(LIBDIR)/lib$(MG5AMC_CULIB).so @echo - $(MAKE) USEBUILDDIR=0 -C ../../src cleanall -f $(CUDACPP_SRC_MAKEFILE) + $(MAKE) -C ../../src cleanall -f $(CUDACPP_SRC_MAKEFILE) rm -rf build.* # Target: clean the builds as well as the gtest installation(s) diff --git a/epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk b/epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk index fd9560c469..5ff82b3ae8 100644 --- a/epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk +++ b/epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk @@ -296,7 +296,8 @@ endif cleanall: @echo - $(MAKE) clean -f $(THISMK) + rm -f $(LIBDIR)/.build.* $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so + rm -f $(BUILDDIR)/.build.* $(BUILDDIR)/*.o $(BUILDDIR)/*.exe @echo rm -rf $(LIBDIR)/build.* rm -rf build.* From 8b22e9a83f9e50df3c861e37ee27daf72bd0097e Mon Sep 17 00:00:00 2001 From: Jorgen T Date: Tue, 29 Aug 2023 09:27:51 +0200 Subject: [PATCH 030/129] Fixed indentations in the recipie of the targets --- .../cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk index 6b5a2ecde8..8332f35718 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk @@ -90,7 +90,7 @@ endif # Target if user does not specify target usage: - $(error Unknown target='$(MAKECMDGOALS)': only 'cppnone', 'cppsse4', 'cppavx2', 'cpp512y', 'cpp512z' and 'cuda' are supported!) + $(error Unknown target='$(MAKECMDGOALS)': only 'cppnone', 'cppsse4', 'cppavx2', 'cpp512y', 'cpp512z' and 'cuda' are supported!) #------------------------------------------------------------------------------- @@ -755,11 +755,11 @@ cuda: $(cu_main) clean: ifeq ($(USEBUILDDIR),1) - ifeq ($(shell test $$(words $$(wildcard build.*)) -gt 1; echo $$?), 0) - $(error Multiple BUILDDIR's found! Use 'cleannone', 'cleansse4', 'cleanavx2', 'clean512y','clean512z', 'cleancuda' or 'cleanall'.) - else - rm -rf build.* - endif + ifeq ($(shell test $$(words $$(wildcard build.*)) -gt 1; echo $$?), 0) + $(error Multiple BUILDDIR's found! Use 'cleannone', 'cleansse4', 'cleanavx2', 'clean512y','clean512z', 'cleancuda' or 'cleanall'.) + else + rm -rf build.* + endif else rm -f $(BUILDDIR)/.build.* $(BUILDDIR)/*.o $(BUILDDIR)/*.exe rm -f $(LIBDIR)/lib$(MG5AMC_CXXLIB).so $(LIBDIR)/lib$(MG5AMC_CULIB).so @@ -784,24 +784,24 @@ endif # Target: clean different builds cleannone: - rm -rf build.none_* - $(MAKE) -C ../../src cleannone -f $(CUDACPP_SRC_MAKEFILE) + rm -rf build.none_* + $(MAKE) -C ../../src cleannone -f $(CUDACPP_SRC_MAKEFILE) cleansse4: - rm -rf build.sse4_* - $(MAKE) -C ../../src cleansse4 -f $(CUDACPP_SRC_MAKEFILE) + rm -rf build.sse4_* + $(MAKE) -C ../../src cleansse4 -f $(CUDACPP_SRC_MAKEFILE) cleanavx2: - rm -rf build.avx2_* - $(MAKE) -C ../../src cleanavx2 -f $(CUDACPP_SRC_MAKEFILE) + rm -rf build.avx2_* + $(MAKE) -C ../../src cleanavx2 -f $(CUDACPP_SRC_MAKEFILE) clean512y: - rm -rf build.512y_* - $(MAKE) -C ../../src clean512y -f $(CUDACPP_SRC_MAKEFILE) + rm -rf build.512y_* + $(MAKE) -C ../../src clean512y -f $(CUDACPP_SRC_MAKEFILE) clean512z: - rm -rf build.512z_* - $(MAKE) -C ../../src clean512z -f $(CUDACPP_SRC_MAKEFILE) + rm -rf build.512z_* + $(MAKE) -C ../../src clean512z -f $(CUDACPP_SRC_MAKEFILE) #------------------------------------------------------------------------------- From f81f91fd2fea2ec3297eb61834962c27735572f3 Mon Sep 17 00:00:00 2001 From: Jorgen T Date: Tue, 29 Aug 2023 09:36:40 +0200 Subject: [PATCH 031/129] Redid the detection of multiple BUILDDIRS when user runs clean --- epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk | 10 +++++++--- epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk | 14 +++++++++----- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk index 8332f35718..380c442388 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk @@ -755,10 +755,14 @@ cuda: $(cu_main) clean: ifeq ($(USEBUILDDIR),1) - ifeq ($(shell test $$(words $$(wildcard build.*)) -gt 1; echo $$?), 0) - $(error Multiple BUILDDIR's found! Use 'cleannone', 'cleansse4', 'cleanavx2', 'clean512y','clean512z', 'cleancuda' or 'cleanall'.) - else + BUILD_DIRS := $(wildcard build.*) + NUM_BUILD_DIRS := $(words $(BUILD_DIRS)) + + ifeq ($(NUM_BUILD_DIRS),1) + $(info Only one build directory found.) rm -rf build.* + else + $(error Multiple BUILDDIR's found! Use 'cleannone', 'cleansse4', 'cleanavx2', 'clean512y','clean512z', 'cleancuda' or 'cleanall'.) endif else rm -f $(BUILDDIR)/.build.* $(BUILDDIR)/*.o $(BUILDDIR)/*.exe diff --git a/epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk b/epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk index 5ff82b3ae8..cf84a55d9c 100644 --- a/epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk +++ b/epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk @@ -283,12 +283,16 @@ endif clean: ifeq ($(USEBUILDDIR),1) - ifeq ($(shell test $$(words $$(wildcard build.*)) -gt 1; echo $$?), 0) - $(error Multiple BUILDDIR's found! Use 'cleannone', 'cleansse4', 'cleanavx2', 'clean512y','clean512z', 'cleancuda' or 'cleanall'.) - else - rm -rf $(LIBDIR)/build.* + BUILD_DIRS := $(wildcard build.*) + NUM_BUILD_DIRS := $(words $(BUILD_DIRS)) + + ifeq ($(NUM_BUILD_DIRS),1) + $(info Only one build directory found.) + rm -rf $(LIBDIR)/build.* rm -rf build.* - endif + else + $(error Multiple BUILDDIR's found! Use 'cleannone', 'cleansse4', 'cleanavx2', 'clean512y','clean512z', 'cleancuda' or 'cleanall'.) + endif else rm -f $(LIBDIR)/.build.* $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so rm -f $(BUILDDIR)/.build.* $(BUILDDIR)/*.o $(BUILDDIR)/*.exe From ea4c807060df033a132f37e36c1ae4de13931c10 Mon Sep 17 00:00:00 2001 From: Jorgen T Date: Tue, 29 Aug 2023 09:37:35 +0200 Subject: [PATCH 032/129] Fixed indentation mistake --- epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk | 2 +- epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk index 380c442388..fb89bb874a 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk @@ -762,7 +762,7 @@ ifeq ($(USEBUILDDIR),1) $(info Only one build directory found.) rm -rf build.* else - $(error Multiple BUILDDIR's found! Use 'cleannone', 'cleansse4', 'cleanavx2', 'clean512y','clean512z', 'cleancuda' or 'cleanall'.) + $(error Multiple BUILDDIR's found! Use 'cleannone', 'cleansse4', 'cleanavx2', 'clean512y','clean512z', 'cleancuda' or 'cleanall'.) endif else rm -f $(BUILDDIR)/.build.* $(BUILDDIR)/*.o $(BUILDDIR)/*.exe diff --git a/epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk b/epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk index cf84a55d9c..55aee9d3c3 100644 --- a/epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk +++ b/epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk @@ -291,7 +291,7 @@ ifeq ($(USEBUILDDIR),1) rm -rf $(LIBDIR)/build.* rm -rf build.* else - $(error Multiple BUILDDIR's found! Use 'cleannone', 'cleansse4', 'cleanavx2', 'clean512y','clean512z', 'cleancuda' or 'cleanall'.) + $(error Multiple BUILDDIR's found! Use 'cleannone', 'cleansse4', 'cleanavx2', 'clean512y','clean512z', 'cleancuda' or 'cleanall'.) endif else rm -f $(LIBDIR)/.build.* $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so From b39d75b7f2fde2fc5c65abf89582fa9f895e073b Mon Sep 17 00:00:00 2001 From: Jorgen T Date: Tue, 29 Aug 2023 15:20:05 +0200 Subject: [PATCH 033/129] Fixed intendation again in cudacpp_src.mk cleanall --- epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk b/epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk index 55aee9d3c3..b048a48f6a 100644 --- a/epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk +++ b/epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk @@ -283,7 +283,7 @@ endif clean: ifeq ($(USEBUILDDIR),1) - BUILD_DIRS := $(wildcard build.*) + BUILD_DIRS := $(wildcard build.*) NUM_BUILD_DIRS := $(words $(BUILD_DIRS)) ifeq ($(NUM_BUILD_DIRS),1) From 578e5b487d6e7b104692ec9204a81931b754b209 Mon Sep 17 00:00:00 2001 From: Jorgen T Date: Mon, 4 Sep 2023 16:28:09 +0200 Subject: [PATCH 034/129] First iteration of changes to makefile.mk --- .../cudacpp/gg_tt.mad/SubProcesses/makefile | 56 ++++++++++++------- 1 file changed, 36 insertions(+), 20 deletions(-) diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile index 74db44d848..51b0236d70 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile @@ -9,6 +9,14 @@ FFLAGS+= -cpp # Compile counters with -O3 as in the cudacpp makefile (avoid being "unfair" to Fortran #740) CXXFLAGS = -O3 -Wall -Wshadow -Wextra +# Default goal + +.DEFAULT_GOAL := usage + +# Target if user does not specify target +usage: + $(error Unknown target='$(MAKECMDGOALS)': only 'cppnone', 'cppsse4', 'cppavx2', 'cpp512y', 'cpp512z' and 'cuda' are supported!) + # Enable ccache if USECCACHE=1 ifeq ($(USECCACHE)$(shell echo $(CXX) | grep ccache),1) override CXX:=ccache $(CXX) @@ -48,10 +56,10 @@ CUDACPP_MAKEFILE=cudacpp.mk # NB2 Use '|&' in CUDACPP_BUILDDIR to avoid confusing errors about googletest #507 # NB3 Do not add a comment inlined "CUDACPP_BUILDDIR=$(shell ...) # comment" as otherwise a trailing space is included... # NB4 The variables relevant to the cudacpp Makefile must be explicitly passed to $(shell...) -CUDACPP_MAKEENV:=$(shell echo '$(.VARIABLES)' | tr " " "\n" | egrep "(USEBUILDDIR|AVX|FPTYPE|HELINL|HRDCOD)") +CUDACPP_MAKEENV:=$(shell echo '$(.VARIABLES)' | tr " " "\n" | egrep "(USEBUILDDIR|FPTYPE|HELINL|HRDCOD)") ###$(info CUDACPP_MAKEENV=$(CUDACPP_MAKEENV)) ###$(info $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))")) -CUDACPP_BUILDDIR:=$(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn |& awk '/Building/{print $$3}' | sed s/BUILDDIR=//) +CUDACPP_BUILDDIR:=$(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn $(MAKECMDGOALS) |& awk '/Building/{print $$3}' | sed s/BUILDDIR=//) ifeq ($(CUDACPP_BUILDDIR),) $(error CUDACPP_BUILDDIR='$(CUDACPP_BUILDDIR)' should not be empty!) else @@ -115,8 +123,8 @@ $(LIBS): .libs cd ../../Source; make touch $@ -$(CUDACPP_BUILDDIR)/.cudacpplibs: - $(MAKE) -f $(CUDACPP_MAKEFILE) +$(CUDACPP_BUILDDIR)/.$(MAKECMDGOALS)libs: + $(MAKE) -f $(CUDACPP_MAKEFILE) $(MAKECMDGOALS) touch $@ # On Linux, set rpath to LIBDIR to make it unnecessary to use LD_LIBRARY_PATH @@ -147,9 +155,9 @@ madevent_cuda_link: $(CUDACPP_BUILDDIR)/$(PROG)_cuda # Building $(PROG)_cpp also builds $(PROG)_cuda if $(CUDACPP_CULIB) exists (improved patch for cpp-only builds #503) $(CUDACPP_BUILDDIR)/$(PROG)_cpp: $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(LIBS) $(MATRIX) counters.o ompnumthreads.o $(CUDACPP_BUILDDIR)/.cudacpplibs $(FC) -o $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o -L$(LIBDIR)/$(CUDACPP_BUILDDIR) -l$(CUDACPP_COMMONLIB) -l$(CUDACPP_CXXLIB) $(LIBFLAGSRPATH) $(LDFLAGS) - if [ -f $(LIBDIR)/$(CUDACPP_BUILDDIR)/lib$(CUDACPP_CULIB).* ]; then $(FC) -o $(CUDACPP_BUILDDIR)/$(PROG)_cuda $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o -L$(LIBDIR)/$(CUDACPP_BUILDDIR) -l$(CUDACPP_COMMONLIB) -l$(CUDACPP_CULIB) $(LIBFLAGSRPATH) $(LDFLAGS); fi -$(CUDACPP_BUILDDIR)/$(PROG)_cuda: $(CUDACPP_BUILDDIR)/$(PROG)_cpp +$(CUDACPP_BUILDDIR)/$(PROG)_cuda: $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(LIBS) $(MATRIX) counters.o ompnumthreads.o $(CUDACPP_BUILDDIR)/.cudacpplibs + $(FC) -o $(CUDACPP_BUILDDIR)/$(PROG)_cuda $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o -L$(LIBDIR)/$(CUDACPP_BUILDDIR) -l$(CUDACPP_COMMONLIB) -l$(CUDACPP_CULIB) $(LIBFLAGSRPATH) $(LDFLAGS) counters.o: counters.cc timer.h $(CXX) $(CXXFLAGS) -c $< -o $@ @@ -215,32 +223,37 @@ genps.o: .libs UNAME_P := $(shell uname -p) ifeq ($(UNAME_P),ppc64le) -avxall: avxnone avxsse4 +cppall: cppnone cppsse4 else ifeq ($(UNAME_P),arm) -avxall: avxnone avxsse4 +cppall: cppnone cppsse4 else -avxall: avxnone avxsse4 avxavx2 avx512y avx512z +cppall: cppnone cppsse4 cppavx2 cpp512y cpp512z endif -avxnone: $(PROG)_fortran $(DSIG_cudacpp) +ALL: cppnone cppsse4 cppavx2 cpp512y cpp512z cuda + +cppnone: $(PROG)_fortran $(DSIG_cudacpp) @echo - $(MAKE) USEBUILDDIR=1 AVX=none + $(MAKE) USEBUILDDIR=1 cppnone -avxsse4: $(PROG)_fortran $(DSIG_cudacpp) +cppsse4: $(PROG)_fortran $(DSIG_cudacpp) @echo - $(MAKE) USEBUILDDIR=1 AVX=sse4 + $(MAKE) USEBUILDDIR=1 cppsse4 -avxavx2: $(PROG)_fortran $(DSIG_cudacpp) +cppavx2: $(PROG)_fortran $(DSIG_cudacpp) @echo - $(MAKE) USEBUILDDIR=1 AVX=avx2 + $(MAKE) USEBUILDDIR=1 cppavx2 -avx512y: $(PROG)_fortran $(DSIG_cudacpp) +cpp512y: $(PROG)_fortran $(DSIG_cudacpp) @echo - $(MAKE) USEBUILDDIR=1 AVX=512y + $(MAKE) USEBUILDDIR=1 cpp512y -avx512z: $(PROG)_fortran $(DSIG_cudacpp) +cpp512z: $(PROG)_fortran $(DSIG_cudacpp) @echo - $(MAKE) USEBUILDDIR=1 AVX=512z + $(MAKE) USEBUILDDIR=1 cpp512z + +cuda: + $(CUDACPP_BUILDDIR)/$(PROG)_cuda ###endif @@ -249,7 +262,10 @@ avx512z: $(PROG)_fortran $(DSIG_cudacpp) clean: # Clean builds: fortran in this Pn; cudacpp executables for one AVX in this Pn $(RM) *.o gensym $(PROG) $(PROG)_fortran $(PROG)_forhel $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(CUDACPP_BUILDDIR)/$(PROG)_cuda -cleanavxs: clean # Clean builds: fortran in this Pn; cudacpp for all AVX in this Pn and in src +clean: # Clean builds: fortran in this Pn; cudacpp executables for one AVX in this Pn + $(RM) *.o gensym $(PROG) $(PROG)_fortran $(PROG)_forhel $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(CUDACPP_BUILDDIR)/$(PROG)_cuda + +cleancpp: clean # Clean builds: fortran in this Pn; cudacpp for all AVX in this Pn and in src $(MAKE) -f $(CUDACPP_MAKEFILE) cleanall rm -f $(CUDACPP_BUILDDIR)/.cudacpplibs rm -f .libs From f755f8a6c0e1c953327cc203902c18c0296fc016 Mon Sep 17 00:00:00 2001 From: Jorgen T Date: Mon, 4 Sep 2023 16:45:05 +0200 Subject: [PATCH 035/129] Added more clean targets --- .../cudacpp/gg_tt.mad/SubProcesses/makefile | 26 ++++++++++++++----- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile index 51b0236d70..e9887a9dce 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile @@ -259,21 +259,33 @@ cuda: # Clean (NB: 'make clean' in Source calls 'make clean' in all P*) -clean: # Clean builds: fortran in this Pn; cudacpp executables for one AVX in this Pn - $(RM) *.o gensym $(PROG) $(PROG)_fortran $(PROG)_forhel $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(CUDACPP_BUILDDIR)/$(PROG)_cuda +clean: # Clean builds: fortran in this Pn; cpp executables for one AVX in this Pn + $(RM) *.o gensym $(PROG) $(PROG)_fortran $(PROG)_forhel build.none_*/$(PROG)_cpp -clean: # Clean builds: fortran in this Pn; cudacpp executables for one AVX in this Pn - $(RM) *.o gensym $(PROG) $(PROG)_fortran $(PROG)_forhel $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(CUDACPP_BUILDDIR)/$(PROG)_cuda +cleansse4: # Clean build: fortran in this Pn; cpp executables for cppsse4 in this Pn + $(RM) *.o gensym $(PROG) $(PROG)_fortran $(PROG)_forhel build.sse4_*/$(PROG)_cpp + +cleanavx2: # Clean build: fortran in this Pn; cpp executables for cppavx2 in this Pn + $(RM) *.o gensym $(PROG) $(PROG)_fortran $(PROG)_forhel build.avx2_*/$(PROG)_cpp + +clean512y: # Clean build: fortran in this Pn; cpp executables for cpp512y in this Pn + $(RM) *.o gensym $(PROG) $(PROG)_fortran $(PROG)_forhel build.512y_*/$(PROG)_cpp + +clean512z: # Clean build: fortran in this Pn; cpp executables for cpp512z in this Pn + $(RM) *.o gensym $(PROG) $(PROG)_fortran $(PROG)_forhel build.512z_*/$(PROG)_cpp + +cleancuda: # Clean build: fortran in this Pn; cuda executables in this Pn + $(RM) *.o gensym $(PROG) $(PROG)_fortran $(PROG)_forhel build.cuda_*/$(PROG)_cuda cleancpp: clean # Clean builds: fortran in this Pn; cudacpp for all AVX in this Pn and in src $(MAKE) -f $(CUDACPP_MAKEFILE) cleanall - rm -f $(CUDACPP_BUILDDIR)/.cudacpplibs - rm -f .libs + $(RM) $(CUDACPP_BUILDDIR)/.cudacpplibs + $(RM) .libs cleanall: # Clean builds: fortran in all P* and in Source; cudacpp for all AVX in all P* and in src make -C ../../Source cleanall rm -rf $(LIBDIR)libbias.$(libext) - rm -f ../../Source/*.mod ../../Source/*/*.mod + $(RM) ../../Source/*.mod ../../Source/*/*.mod distclean: cleanall # Clean all fortran and cudacpp builds as well as the googletest installation $(MAKE) -f $(CUDACPP_MAKEFILE) distclean From 38beccc10045b113db9cdd49bbb074db476b5d0d Mon Sep 17 00:00:00 2001 From: Jorgen T Date: Tue, 5 Sep 2023 11:44:47 +0200 Subject: [PATCH 036/129] Removed warning using MAKECMDGOAL --- epochX/cudacpp/gg_tt.mad/SubProcesses/makefile | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile index e9887a9dce..09dc711dac 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile @@ -13,9 +13,15 @@ CXXFLAGS = -O3 -Wall -Wshadow -Wextra .DEFAULT_GOAL := usage +ifndef $(MAKECMDGOAL) + TARGET := undefined +else + TARGET := $(MAKECMDGOAL) +endif + # Target if user does not specify target usage: - $(error Unknown target='$(MAKECMDGOALS)': only 'cppnone', 'cppsse4', 'cppavx2', 'cpp512y', 'cpp512z' and 'cuda' are supported!) + $(error Unknown target='$(TARGET)': only 'cppnone', 'cppsse4', 'cppavx2', 'cpp512y', 'cpp512z' and 'cuda' are supported!) # Enable ccache if USECCACHE=1 ifeq ($(USECCACHE)$(shell echo $(CXX) | grep ccache),1) @@ -59,7 +65,7 @@ CUDACPP_MAKEFILE=cudacpp.mk CUDACPP_MAKEENV:=$(shell echo '$(.VARIABLES)' | tr " " "\n" | egrep "(USEBUILDDIR|FPTYPE|HELINL|HRDCOD)") ###$(info CUDACPP_MAKEENV=$(CUDACPP_MAKEENV)) ###$(info $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))")) -CUDACPP_BUILDDIR:=$(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn $(MAKECMDGOALS) |& awk '/Building/{print $$3}' | sed s/BUILDDIR=//) +CUDACPP_BUILDDIR:=$(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn $(TARGET) |& awk '/Building/{print $$3}' | sed s/BUILDDIR=//) ifeq ($(CUDACPP_BUILDDIR),) $(error CUDACPP_BUILDDIR='$(CUDACPP_BUILDDIR)' should not be empty!) else @@ -123,8 +129,8 @@ $(LIBS): .libs cd ../../Source; make touch $@ -$(CUDACPP_BUILDDIR)/.$(MAKECMDGOALS)libs: - $(MAKE) -f $(CUDACPP_MAKEFILE) $(MAKECMDGOALS) +$(CUDACPP_BUILDDIR)/.$(TARGET)libs: + $(MAKE) -f $(CUDACPP_MAKEFILE) $(TARGET) touch $@ # On Linux, set rpath to LIBDIR to make it unnecessary to use LD_LIBRARY_PATH @@ -284,7 +290,7 @@ cleancpp: clean # Clean builds: fortran in this Pn; cudacpp for all AVX in this cleanall: # Clean builds: fortran in all P* and in Source; cudacpp for all AVX in all P* and in src make -C ../../Source cleanall - rm -rf $(LIBDIR)libbias.$(libext) + $(RM) -r $(LIBDIR)libbias.$(libext) $(RM) ../../Source/*.mod ../../Source/*/*.mod distclean: cleanall # Clean all fortran and cudacpp builds as well as the googletest installation From e7e85e9f8ec0c69957924e02d9397d0ba2b954c9 Mon Sep 17 00:00:00 2001 From: Jorgen T Date: Tue, 5 Sep 2023 16:16:51 +0200 Subject: [PATCH 037/129] Removed recursiveness in target --- epochX/cudacpp/gg_tt.mad/SubProcesses/makefile | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile index 09dc711dac..cc9076cc43 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile @@ -239,27 +239,16 @@ endif ALL: cppnone cppsse4 cppavx2 cpp512y cpp512z cuda cppnone: $(PROG)_fortran $(DSIG_cudacpp) - @echo - $(MAKE) USEBUILDDIR=1 cppnone cppsse4: $(PROG)_fortran $(DSIG_cudacpp) - @echo - $(MAKE) USEBUILDDIR=1 cppsse4 cppavx2: $(PROG)_fortran $(DSIG_cudacpp) - @echo - $(MAKE) USEBUILDDIR=1 cppavx2 cpp512y: $(PROG)_fortran $(DSIG_cudacpp) - @echo - $(MAKE) USEBUILDDIR=1 cpp512y cpp512z: $(PROG)_fortran $(DSIG_cudacpp) - @echo - $(MAKE) USEBUILDDIR=1 cpp512z -cuda: - $(CUDACPP_BUILDDIR)/$(PROG)_cuda +cuda: $(CUDACPP_BUILDDIR)/$(PROG)_cuda ###endif From 97c38e2372b73f81c611e86e4aafa44f407789ac Mon Sep 17 00:00:00 2001 From: Jorgen T Date: Tue, 5 Sep 2023 16:22:29 +0200 Subject: [PATCH 038/129] Fixed cleanall bug --- epochX/cudacpp/gg_tt.mad/Source/makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epochX/cudacpp/gg_tt.mad/Source/makefile b/epochX/cudacpp/gg_tt.mad/Source/makefile index dbe08b846e..dfa319975c 100644 --- a/epochX/cudacpp/gg_tt.mad/Source/makefile +++ b/epochX/cudacpp/gg_tt.mad/Source/makefile @@ -137,4 +137,4 @@ clean: cleanSource for i in `ls -d ../SubProcesses/P*`; do cd $$i; make clean; cd -; done; cleanall: cleanSource - for i in `ls -d ../SubProcesses/P*`; do cd $$i; make cleanavxs; cd -; done; + for i in `ls -d ../SubProcesses/P*`; do cd $$i; make cleancpp; cd -; done; From f2eb850ab7d2d38aad36d85c26a906016890ff93 Mon Sep 17 00:00:00 2001 From: Jorgen T Date: Wed, 6 Sep 2023 11:42:31 +0200 Subject: [PATCH 039/129] Fixed error with clean not detecting the build directories --- epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk | 10 +++++++--- epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk | 10 +++++++--- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk index fb89bb874a..a151cb761f 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk @@ -753,11 +753,11 @@ cuda: $(cu_main) # Target: clean the builds .PHONY: clean +BUILD_DIRS := $(wildcard build.*) +NUM_BUILD_DIRS := $(words $(BUILD_DIRS)) + clean: ifeq ($(USEBUILDDIR),1) - BUILD_DIRS := $(wildcard build.*) - NUM_BUILD_DIRS := $(words $(BUILD_DIRS)) - ifeq ($(NUM_BUILD_DIRS),1) $(info Only one build directory found.) rm -rf build.* @@ -807,6 +807,10 @@ clean512z: rm -rf build.512z_* $(MAKE) -C ../../src clean512z -f $(CUDACPP_SRC_MAKEFILE) +cleancuda: + rm -rf build.cuda_* + $(MAKE) -C ../../src cleancuda -f $(CUDACPP_SRC_MAKEFILE) + #------------------------------------------------------------------------------- # Target: show system and compiler information diff --git a/epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk b/epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk index b048a48f6a..46329af540 100644 --- a/epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk +++ b/epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk @@ -281,11 +281,11 @@ endif # Target: clean the builds .PHONY: clean +BUILD_DIRS := $(wildcard build.*) +NUM_BUILD_DIRS := $(words $(BUILD_DIRS)) + clean: ifeq ($(USEBUILDDIR),1) - BUILD_DIRS := $(wildcard build.*) - NUM_BUILD_DIRS := $(words $(BUILD_DIRS)) - ifeq ($(NUM_BUILD_DIRS),1) $(info Only one build directory found.) rm -rf $(LIBDIR)/build.* @@ -328,4 +328,8 @@ clean512z: rm -rf $(LIBDIR)/build.512z_* rm -rf build.512z_* +cleancuda: + rm -rf $(LIBDIR)/build.cuda_* + rm -rf build.cuda_* + #------------------------------------------------------------------------------- From b41069fe48b2396904f6e3783434e122e7ca80bd Mon Sep 17 00:00:00 2001 From: Jorgen T Date: Wed, 6 Sep 2023 11:43:46 +0200 Subject: [PATCH 040/129] Fixed indentation in clean target --- epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk | 12 ++++++------ epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk | 14 +++++++------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk index a151cb761f..74ad72a262 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk @@ -758,12 +758,12 @@ NUM_BUILD_DIRS := $(words $(BUILD_DIRS)) clean: ifeq ($(USEBUILDDIR),1) - ifeq ($(NUM_BUILD_DIRS),1) - $(info Only one build directory found.) - rm -rf build.* - else - $(error Multiple BUILDDIR's found! Use 'cleannone', 'cleansse4', 'cleanavx2', 'clean512y','clean512z', 'cleancuda' or 'cleanall'.) - endif +ifeq ($(NUM_BUILD_DIRS),1) + $(info Only one build directory found.) + rm -rf build.* +else + $(error Multiple BUILDDIR's found! Use 'cleannone', 'cleansse4', 'cleanavx2', 'clean512y','clean512z', 'cleancuda' or 'cleanall'.) +endif else rm -f $(BUILDDIR)/.build.* $(BUILDDIR)/*.o $(BUILDDIR)/*.exe rm -f $(LIBDIR)/lib$(MG5AMC_CXXLIB).so $(LIBDIR)/lib$(MG5AMC_CULIB).so diff --git a/epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk b/epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk index 46329af540..9259216d01 100644 --- a/epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk +++ b/epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk @@ -286,13 +286,13 @@ NUM_BUILD_DIRS := $(words $(BUILD_DIRS)) clean: ifeq ($(USEBUILDDIR),1) - ifeq ($(NUM_BUILD_DIRS),1) - $(info Only one build directory found.) - rm -rf $(LIBDIR)/build.* - rm -rf build.* - else - $(error Multiple BUILDDIR's found! Use 'cleannone', 'cleansse4', 'cleanavx2', 'clean512y','clean512z', 'cleancuda' or 'cleanall'.) - endif +ifeq ($(NUM_BUILD_DIRS),1) + $(info Only one build directory found.) + rm -rf $(LIBDIR)/build.* + rm -rf build.* +else + $(error Multiple BUILDDIR's found! Use 'cleannone', 'cleansse4', 'cleanavx2', 'clean512y','clean512z', 'cleancuda' or 'cleanall'.) +endif else rm -f $(LIBDIR)/.build.* $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so rm -f $(BUILDDIR)/.build.* $(BUILDDIR)/*.o $(BUILDDIR)/*.exe From f2c9c453713aa0bf67c0f1db0774cced9d45b761 Mon Sep 17 00:00:00 2001 From: Jorgen T Date: Wed, 6 Sep 2023 14:54:02 +0200 Subject: [PATCH 041/129] Fixed edgecase where target is madevent_* and the actual target variable does not get set correctly --- .../cudacpp/gg_tt.mad/SubProcesses/makefile | 40 ++++++++++++++----- 1 file changed, 30 insertions(+), 10 deletions(-) diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile index cc9076cc43..5b8d13d5c7 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile @@ -16,7 +16,11 @@ CXXFLAGS = -O3 -Wall -Wshadow -Wextra ifndef $(MAKECMDGOAL) TARGET := undefined else - TARGET := $(MAKECMDGOAL) + ifneq (,$(findstring madevent_*,$(MAKECMDGOAL))) + TARGET := $(patsubst %_%,%,$(MAKECMDGOAL)) + else + TARGET := $(MAKECMDGOAL) + endif endif # Target if user does not specify target @@ -150,7 +154,23 @@ madevent_fortran_link: $(PROG)_fortran rm -f $(PROG) ln -s $(PROG)_fortran $(PROG) -madevent_cpp_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp +madevent_cppnone_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp + rm -f $(PROG) + ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) + +madevent_cppsse4_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp + rm -f $(PROG) + ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) + +madevent_cppavx2_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp + rm -f $(PROG) + ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) + +madevent_cpp512y_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp + rm -f $(PROG) + ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) + +madevent_cpp512z_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp rm -f $(PROG) ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) @@ -159,10 +179,10 @@ madevent_cuda_link: $(CUDACPP_BUILDDIR)/$(PROG)_cuda ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cuda $(PROG) # Building $(PROG)_cpp also builds $(PROG)_cuda if $(CUDACPP_CULIB) exists (improved patch for cpp-only builds #503) -$(CUDACPP_BUILDDIR)/$(PROG)_cpp: $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(LIBS) $(MATRIX) counters.o ompnumthreads.o $(CUDACPP_BUILDDIR)/.cudacpplibs +$(CUDACPP_BUILDDIR)/$(PROG)_cpp: $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(LIBS) $(MATRIX) counters.o ompnumthreads.o $(CUDACPP_BUILDDIR)/.$(TARGET)libs $(FC) -o $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o -L$(LIBDIR)/$(CUDACPP_BUILDDIR) -l$(CUDACPP_COMMONLIB) -l$(CUDACPP_CXXLIB) $(LIBFLAGSRPATH) $(LDFLAGS) -$(CUDACPP_BUILDDIR)/$(PROG)_cuda: $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(LIBS) $(MATRIX) counters.o ompnumthreads.o $(CUDACPP_BUILDDIR)/.cudacpplibs +$(CUDACPP_BUILDDIR)/$(PROG)_cuda: $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(LIBS) $(MATRIX) counters.o ompnumthreads.o $(CUDACPP_BUILDDIR)/.$(TARGET)libs $(FC) -o $(CUDACPP_BUILDDIR)/$(PROG)_cuda $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o -L$(LIBDIR)/$(CUDACPP_BUILDDIR) -l$(CUDACPP_COMMONLIB) -l$(CUDACPP_CULIB) $(LIBFLAGSRPATH) $(LDFLAGS) counters.o: counters.cc timer.h @@ -238,17 +258,17 @@ endif ALL: cppnone cppsse4 cppavx2 cpp512y cpp512z cuda -cppnone: $(PROG)_fortran $(DSIG_cudacpp) +cppnone: $(CUDACPP_BUILDDIR)/.$(TARGET)libs -cppsse4: $(PROG)_fortran $(DSIG_cudacpp) +cppsse4: $(CUDACPP_BUILDDIR)/.$(TARGET)libs -cppavx2: $(PROG)_fortran $(DSIG_cudacpp) +cppavx2: $(CUDACPP_BUILDDIR)/.$(TARGET)libs -cpp512y: $(PROG)_fortran $(DSIG_cudacpp) +cpp512y: $(CUDACPP_BUILDDIR)/.$(TARGET)libs -cpp512z: $(PROG)_fortran $(DSIG_cudacpp) +cpp512z: $(CUDACPP_BUILDDIR)/.$(TARGET)libs -cuda: $(CUDACPP_BUILDDIR)/$(PROG)_cuda +cuda: $(CUDACPP_BUILDDIR)/.$(TARGET)libs ###endif From db55dccadd7057034d00f65840cdf712af383ece Mon Sep 17 00:00:00 2001 From: Jorgen T Date: Wed, 6 Sep 2023 14:55:44 +0200 Subject: [PATCH 042/129] Fixed cudacpp_src.mk indentation in target --- epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk b/epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk index 9259216d01..5db19f3584 100644 --- a/epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk +++ b/epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk @@ -329,7 +329,7 @@ clean512z: rm -rf build.512z_* cleancuda: - rm -rf $(LIBDIR)/build.cuda_* + rm -rf $(LIBDIR)/build.cuda_* rm -rf build.cuda_* #------------------------------------------------------------------------------- From df702004efbee9dab8f1f9b374f3c0ff44138e1e Mon Sep 17 00:00:00 2001 From: Jorgen T Date: Tue, 12 Sep 2023 09:32:12 +0200 Subject: [PATCH 043/129] Fixed typo in makefile --- .../cudacpp/gg_tt.mad/SubProcesses/makefile | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile index 5b8d13d5c7..eec56bdfff 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile @@ -13,20 +13,22 @@ CXXFLAGS = -O3 -Wall -Wshadow -Wextra .DEFAULT_GOAL := usage -ifndef $(MAKECMDGOAL) +# Target if user does not specify target +usage: + $(error Unknown target='$(TARGET)': only 'cppnone', 'cppsse4', 'cppavx2', 'cpp512y', 'cpp512z' and 'cuda' are supported!) + +# Sets correct target based on MAKECMDGOALS + +ifndef $(MAKECMDGOALS) TARGET := undefined else - ifneq (,$(findstring madevent_*,$(MAKECMDGOAL))) - TARGET := $(patsubst %_%,%,$(MAKECMDGOAL)) + ifneq (,$(findstring madevent_*,$(MAKECMDGOALS))) + TARGET := $(patsubst %_%,%,$(MAKECMDGOALS)) else - TARGET := $(MAKECMDGOAL) + TARGET := $(MAKECMDGOALS) endif endif -# Target if user does not specify target -usage: - $(error Unknown target='$(TARGET)': only 'cppnone', 'cppsse4', 'cppavx2', 'cpp512y', 'cpp512z' and 'cuda' are supported!) - # Enable ccache if USECCACHE=1 ifeq ($(USECCACHE)$(shell echo $(CXX) | grep ccache),1) override CXX:=ccache $(CXX) @@ -270,8 +272,6 @@ cpp512z: $(CUDACPP_BUILDDIR)/.$(TARGET)libs cuda: $(CUDACPP_BUILDDIR)/.$(TARGET)libs -###endif - # Clean (NB: 'make clean' in Source calls 'make clean' in all P*) clean: # Clean builds: fortran in this Pn; cpp executables for one AVX in this Pn From c890fc0bb5cfdc6975bab723ec82984c472ed9ce Mon Sep 17 00:00:00 2001 From: Jorgen T Date: Tue, 12 Sep 2023 18:31:57 +0200 Subject: [PATCH 044/129] make clean and make cleanavx/cuda now correctly cleans --- .../cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk | 8 +++-- .../cudacpp/gg_tt.mad/SubProcesses/makefile | 29 +++++++++++++++++-- epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk | 9 ++++-- 3 files changed, 40 insertions(+), 6 deletions(-) diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk index 74ad72a262..3eeee67a93 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk @@ -765,11 +765,10 @@ else $(error Multiple BUILDDIR's found! Use 'cleannone', 'cleansse4', 'cleanavx2', 'clean512y','clean512z', 'cleancuda' or 'cleanall'.) endif else - rm -f $(BUILDDIR)/.build.* $(BUILDDIR)/*.o $(BUILDDIR)/*.exe + rm -f $(BUILDDIR)/*.o $(BUILDDIR)/*.exe rm -f $(LIBDIR)/lib$(MG5AMC_CXXLIB).so $(LIBDIR)/lib$(MG5AMC_CULIB).so endif $(MAKE) -C ../../src clean -f $(CUDACPP_SRC_MAKEFILE) -### rm -rf $(INCDIR) cleanall: @echo @@ -811,6 +810,11 @@ cleancuda: rm -rf build.cuda_* $(MAKE) -C ../../src cleancuda -f $(CUDACPP_SRC_MAKEFILE) +cleandir: + rm -f $(BUILDDIR)/*.o $(BUILDDIR)/*.exe + rm -f $(LIBDIR)/lib$(MG5AMC_CXXLIB).so $(LIBDIR)/lib$(MG5AMC_CULIB).so + $(MAKE) -C ../../src cleannone -f $(CUDACPP_SRC_MAKEFILE) + #------------------------------------------------------------------------------- # Target: show system and compiler information diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile index eec56bdfff..9440fe176e 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile @@ -19,7 +19,7 @@ usage: # Sets correct target based on MAKECMDGOALS -ifndef $(MAKECMDGOALS) +ifeq ($(MAKECMDGOALS),) TARGET := undefined else ifneq (,$(findstring madevent_*,$(MAKECMDGOALS))) @@ -274,23 +274,48 @@ cuda: $(CUDACPP_BUILDDIR)/.$(TARGET)libs # Clean (NB: 'make clean' in Source calls 'make clean' in all P*) -clean: # Clean builds: fortran in this Pn; cpp executables for one AVX in this Pn +BUILD_DIRS := $(wildcard build.*) +BUILD_TARGET := $(shell echo $(CUDACPP_BUILDDIR) | sed 's/.*\.\(.*\)-.*/\1/') +NUM_BUILD_DIRS := $(words $(BUILD_DIRS)) + +clean: +ifeq ($(USEBUILDDIR),1) +ifeq ($(NUM_BUILD_DIRS),1) + $(info USEBUILDDIR=1 only cleaning build dir.) + $(RM) -r $(BUILD_DIRS) + $(MAKE) -f $(CUDACPP_MAKEFILE) clean$(BUILD_TARGET) +else + $(error Multiple BUILDDIR's found! Use 'cleannone', 'cleansse4', 'cleanavx2', 'clean512y','clean512z', 'cleancuda' or 'cleanall'.) +endif +else + $(info USEBUILDDIR=0 only cleaning build with no dir.) + $(RM) *.o gensym $(PROG) $(PROG)_fortran $(PROG)_forhel ./$(PROG)_* + $(MAKE) -f $(CUDACPP_MAKEFILE) cleandir +endif + +cleannone: # Clean builds: fortran in this Pn; cpp executables for one AVX in this Pn $(RM) *.o gensym $(PROG) $(PROG)_fortran $(PROG)_forhel build.none_*/$(PROG)_cpp + $(MAKE) -f $(CUDACPP_MAKEFILE) cleannone cleansse4: # Clean build: fortran in this Pn; cpp executables for cppsse4 in this Pn $(RM) *.o gensym $(PROG) $(PROG)_fortran $(PROG)_forhel build.sse4_*/$(PROG)_cpp + $(MAKE) -f $(CUDACPP_MAKEFILE) cleansse4 cleanavx2: # Clean build: fortran in this Pn; cpp executables for cppavx2 in this Pn $(RM) *.o gensym $(PROG) $(PROG)_fortran $(PROG)_forhel build.avx2_*/$(PROG)_cpp + $(MAKE) -f $(CUDACPP_MAKEFILE) cleanavx2 clean512y: # Clean build: fortran in this Pn; cpp executables for cpp512y in this Pn $(RM) *.o gensym $(PROG) $(PROG)_fortran $(PROG)_forhel build.512y_*/$(PROG)_cpp + $(MAKE) -f $(CUDACPP_MAKEFILE) clean512y clean512z: # Clean build: fortran in this Pn; cpp executables for cpp512z in this Pn $(RM) *.o gensym $(PROG) $(PROG)_fortran $(PROG)_forhel build.512z_*/$(PROG)_cpp + $(MAKE) -f $(CUDACPP_MAKEFILE) clean512z cleancuda: # Clean build: fortran in this Pn; cuda executables in this Pn $(RM) *.o gensym $(PROG) $(PROG)_fortran $(PROG)_forhel build.cuda_*/$(PROG)_cuda + $(MAKE) -f $(CUDACPP_MAKEFILE) cleancuda cleancpp: clean # Clean builds: fortran in this Pn; cudacpp for all AVX in this Pn and in src $(MAKE) -f $(CUDACPP_MAKEFILE) cleanall diff --git a/epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk b/epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk index 5db19f3584..9e66e230d3 100644 --- a/epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk +++ b/epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk @@ -282,6 +282,7 @@ endif .PHONY: clean BUILD_DIRS := $(wildcard build.*) + NUM_BUILD_DIRS := $(words $(BUILD_DIRS)) clean: @@ -294,8 +295,8 @@ else $(error Multiple BUILDDIR's found! Use 'cleannone', 'cleansse4', 'cleanavx2', 'clean512y','clean512z', 'cleancuda' or 'cleanall'.) endif else - rm -f $(LIBDIR)/.build.* $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so - rm -f $(BUILDDIR)/.build.* $(BUILDDIR)/*.o $(BUILDDIR)/*.exe + rm -f $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so + rm -f $(BUILDDIR)/*.o $(BUILDDIR)/*.exe endif cleanall: @@ -332,4 +333,8 @@ cleancuda: rm -rf $(LIBDIR)/build.cuda_* rm -rf build.cuda_* +cleandir: + rm -f $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so + rm -f $(BUILDDIR)/*.o $(BUILDDIR)/*.exe + #------------------------------------------------------------------------------- From dc77630d7b111264eeef411dc2b64927b7c7b159 Mon Sep 17 00:00:00 2001 From: Jorgen T Date: Wed, 13 Sep 2023 11:20:35 +0200 Subject: [PATCH 045/129] Fixed cleandir in cudacpp.mk calling cleannone in cudacpp_src.mk --- epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk | 2 +- epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk index 3eeee67a93..d6a184150e 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk @@ -813,7 +813,7 @@ cleancuda: cleandir: rm -f $(BUILDDIR)/*.o $(BUILDDIR)/*.exe rm -f $(LIBDIR)/lib$(MG5AMC_CXXLIB).so $(LIBDIR)/lib$(MG5AMC_CULIB).so - $(MAKE) -C ../../src cleannone -f $(CUDACPP_SRC_MAKEFILE) + $(MAKE) -C ../../src cleandir -f $(CUDACPP_SRC_MAKEFILE) #------------------------------------------------------------------------------- diff --git a/epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk b/epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk index 9e66e230d3..5f2307f4de 100644 --- a/epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk +++ b/epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk @@ -334,7 +334,7 @@ cleancuda: rm -rf build.cuda_* cleandir: - rm -f $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so + rm -f $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so rm -f $(BUILDDIR)/*.o $(BUILDDIR)/*.exe #------------------------------------------------------------------------------- From b680caea5896a39b9e0b011b0936532d726cbb69 Mon Sep 17 00:00:00 2001 From: Jorgen T Date: Wed, 13 Sep 2023 18:07:11 +0200 Subject: [PATCH 046/129] Added removing the lockfile in make clean --- epochX/cudacpp/gg_tt.mad/SubProcesses/makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile index 9440fe176e..9a6f0ef470 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile @@ -291,6 +291,7 @@ else $(info USEBUILDDIR=0 only cleaning build with no dir.) $(RM) *.o gensym $(PROG) $(PROG)_fortran $(PROG)_forhel ./$(PROG)_* $(MAKE) -f $(CUDACPP_MAKEFILE) cleandir + $(RM) $(CUDACPP_BUILDDIR)/.*libs endif cleannone: # Clean builds: fortran in this Pn; cpp executables for one AVX in this Pn @@ -319,7 +320,7 @@ cleancuda: # Clean build: fortran in this Pn; cuda executables in this Pn cleancpp: clean # Clean builds: fortran in this Pn; cudacpp for all AVX in this Pn and in src $(MAKE) -f $(CUDACPP_MAKEFILE) cleanall - $(RM) $(CUDACPP_BUILDDIR)/.cudacpplibs + $(RM) $(CUDACPP_BUILDDIR)/.*libs $(RM) .libs cleanall: # Clean builds: fortran in all P* and in Source; cudacpp for all AVX in all P* and in src From 8583d62fd8c415d9a182396601108fd2953d6091 Mon Sep 17 00:00:00 2001 From: Jorgen T Date: Thu, 14 Sep 2023 14:34:01 +0200 Subject: [PATCH 047/129] Fixed syntax in make clean logic, now corectly cleans lockfile --- epochX/cudacpp/gg_tt.mad/SubProcesses/makefile | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile index 9a6f0ef470..c5f18d9d7e 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile @@ -20,13 +20,13 @@ usage: # Sets correct target based on MAKECMDGOALS ifeq ($(MAKECMDGOALS),) - TARGET := undefined + TARGET := undefined else - ifneq (,$(findstring madevent_*,$(MAKECMDGOALS))) - TARGET := $(patsubst %_%,%,$(MAKECMDGOALS)) - else - TARGET := $(MAKECMDGOALS) - endif + ifneq (,$(findstring madevent_*,$(MAKECMDGOALS))) + TARGET := $(patsubst %_%,%,$(MAKECMDGOALS)) + else + TARGET := $(MAKECMDGOALS) + endif endif # Enable ccache if USECCACHE=1 @@ -275,7 +275,7 @@ cuda: $(CUDACPP_BUILDDIR)/.$(TARGET)libs # Clean (NB: 'make clean' in Source calls 'make clean' in all P*) BUILD_DIRS := $(wildcard build.*) -BUILD_TARGET := $(shell echo $(CUDACPP_BUILDDIR) | sed 's/.*\.\(.*\)-.*/\1/') +BUILD_TARGET_DIR := $(shell echo $(CUDACPP_BUILDDIR) | sed 's/.*\.\(.*\)-.*/\1/') NUM_BUILD_DIRS := $(words $(BUILD_DIRS)) clean: @@ -283,7 +283,7 @@ ifeq ($(USEBUILDDIR),1) ifeq ($(NUM_BUILD_DIRS),1) $(info USEBUILDDIR=1 only cleaning build dir.) $(RM) -r $(BUILD_DIRS) - $(MAKE) -f $(CUDACPP_MAKEFILE) clean$(BUILD_TARGET) + $(MAKE) -f $(CUDACPP_MAKEFILE) clean$(BUILD_TARGET_DIR) else $(error Multiple BUILDDIR's found! Use 'cleannone', 'cleansse4', 'cleanavx2', 'clean512y','clean512z', 'cleancuda' or 'cleanall'.) endif From 3826d1628095555ea049cf95d1e3f33268aebb19 Mon Sep 17 00:00:00 2001 From: Jorgen T Date: Thu, 14 Sep 2023 15:11:28 +0200 Subject: [PATCH 048/129] Added ifeq if no directories are found in make clean --- epochX/cudacpp/gg_tt.mad/SubProcesses/makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile index c5f18d9d7e..91c7ed0664 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile @@ -275,7 +275,7 @@ cuda: $(CUDACPP_BUILDDIR)/.$(TARGET)libs # Clean (NB: 'make clean' in Source calls 'make clean' in all P*) BUILD_DIRS := $(wildcard build.*) -BUILD_TARGET_DIR := $(shell echo $(CUDACPP_BUILDDIR) | sed 's/.*\.\(.*\)-.*/\1/') +BUILD_TARGET_DIR := $(shell echo $(BUILD_DIRS) | sed 's/.*\.\(.*\)-.*/\1/') NUM_BUILD_DIRS := $(words $(BUILD_DIRS)) clean: @@ -284,6 +284,8 @@ ifeq ($(NUM_BUILD_DIRS),1) $(info USEBUILDDIR=1 only cleaning build dir.) $(RM) -r $(BUILD_DIRS) $(MAKE) -f $(CUDACPP_MAKEFILE) clean$(BUILD_TARGET_DIR) +else ifeq ($(NUM_BUILD_DIRS),0) + $(error USEBUILDDIR=1, but no build directories are found.) else $(error Multiple BUILDDIR's found! Use 'cleannone', 'cleansse4', 'cleanavx2', 'clean512y','clean512z', 'cleancuda' or 'cleanall'.) endif From ccc49ed366bc665472f5fc3331457b6928376f2f Mon Sep 17 00:00:00 2001 From: Jorgen T Date: Thu, 14 Sep 2023 15:23:42 +0200 Subject: [PATCH 049/129] Fixed extraction of avx level in make clean --- epochX/cudacpp/gg_tt.mad/SubProcesses/makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile index 91c7ed0664..e4106b6625 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile @@ -275,7 +275,7 @@ cuda: $(CUDACPP_BUILDDIR)/.$(TARGET)libs # Clean (NB: 'make clean' in Source calls 'make clean' in all P*) BUILD_DIRS := $(wildcard build.*) -BUILD_TARGET_DIR := $(shell echo $(BUILD_DIRS) | sed 's/.*\.\(.*\)-.*/\1/') +BUILD_TARGET_DIR := $(shell echo $(BUILD_DIRS) | awk -F '[._]' '{print $$2}) NUM_BUILD_DIRS := $(words $(BUILD_DIRS)) clean: From c9af7a8501fd81a2d648cafb0a9a57a7edb593ab Mon Sep 17 00:00:00 2001 From: Jorgen T Date: Thu, 14 Sep 2023 17:02:16 +0200 Subject: [PATCH 050/129] Fixed lib directory not getting properly cleaned --- .../cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk | 2 ++ epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk | 25 ++++++++++--------- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk index d6a184150e..e9e5661581 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk @@ -761,6 +761,8 @@ ifeq ($(USEBUILDDIR),1) ifeq ($(NUM_BUILD_DIRS),1) $(info Only one build directory found.) rm -rf build.* +else ifeq ($(NUM_BUILD_DIRS),0) + $(error USEBUILDDIR=1, but no build directories are found.) else $(error Multiple BUILDDIR's found! Use 'cleannone', 'cleansse4', 'cleanavx2', 'clean512y','clean512z', 'cleancuda' or 'cleanall'.) endif diff --git a/epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk b/epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk index 5f2307f4de..95d897b145 100644 --- a/epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk +++ b/epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk @@ -282,59 +282,60 @@ endif .PHONY: clean BUILD_DIRS := $(wildcard build.*) - NUM_BUILD_DIRS := $(words $(BUILD_DIRS)) clean: ifeq ($(USEBUILDDIR),1) ifeq ($(NUM_BUILD_DIRS),1) $(info Only one build directory found.) - rm -rf $(LIBDIR)/build.* + rm -rf ../lib/build.* rm -rf build.* +else ifeq ($(NUM_BUILD_DIRS),0) + $(error USEBUILDDIR=1, but no build directories are found.) else $(error Multiple BUILDDIR's found! Use 'cleannone', 'cleansse4', 'cleanavx2', 'clean512y','clean512z', 'cleancuda' or 'cleanall'.) endif else - rm -f $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so + rm -f ../lib/lib$(MG5AMC_COMMONLIB).so rm -f $(BUILDDIR)/*.o $(BUILDDIR)/*.exe endif cleanall: @echo - rm -f $(LIBDIR)/.build.* $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so + rm -f ../lib/.build.* ../lib/lib$(MG5AMC_COMMONLIB).so rm -f $(BUILDDIR)/.build.* $(BUILDDIR)/*.o $(BUILDDIR)/*.exe @echo - rm -rf $(LIBDIR)/build.* + rm -rf ../lib/build.* rm -rf build.* # Target: clean different builds cleannone: - rm -rf $(LIBDIR)/build.none_* + rm -rf ../lib/build.none_* rm -rf build.none_* cleansse4: - rm -rf $(LIBDIR)/build.sse4_* + rm -rf ../lib/build.sse4_* rm -rf build.sse4_* cleanavx2: - rm -rf $(LIBDIR)/build.avx2_* + rm -rf ../lib/build.avx2_* rm -rf build.avx2_* clean512y: - rm -rf $(LIBDIR)/build.512y_* + rm -rf ../lib/build.512y_* rm -rf build.512y_* clean512z: - rm -rf $(LIBDIR)/build.512z_* + rm -rf ../lib/build.512z_* rm -rf build.512z_* cleancuda: - rm -rf $(LIBDIR)/build.cuda_* + rm -rf ../lib/build.cuda_* rm -rf build.cuda_* cleandir: - rm -f $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so + rm -f ../lib/lib$(MG5AMC_COMMONLIB).so rm -f $(BUILDDIR)/*.o $(BUILDDIR)/*.exe #------------------------------------------------------------------------------- From dbbb79598e34cc0c50b744d38105d104e73cffad Mon Sep 17 00:00:00 2001 From: Jorgen T Date: Tue, 19 Sep 2023 16:54:55 +0200 Subject: [PATCH 051/129] Reworked targets to allow for compilation using ALL target --- .../cudacpp/gg_tt.mad/SubProcesses/makefile | 26 ++++++++++++++----- 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile index e4106b6625..b3db798f50 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile @@ -71,12 +71,6 @@ CUDACPP_MAKEFILE=cudacpp.mk CUDACPP_MAKEENV:=$(shell echo '$(.VARIABLES)' | tr " " "\n" | egrep "(USEBUILDDIR|FPTYPE|HELINL|HRDCOD)") ###$(info CUDACPP_MAKEENV=$(CUDACPP_MAKEENV)) ###$(info $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))")) -CUDACPP_BUILDDIR:=$(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn $(TARGET) |& awk '/Building/{print $$3}' | sed s/BUILDDIR=//) -ifeq ($(CUDACPP_BUILDDIR),) -$(error CUDACPP_BUILDDIR='$(CUDACPP_BUILDDIR)' should not be empty!) -else -$(info CUDACPP_BUILDDIR='$(CUDACPP_BUILDDIR)') -endif CUDACPP_COMMONLIB=mg5amc_common CUDACPP_CXXLIB=mg5amc_$(processid_short)_cpp CUDACPP_CULIB=mg5amc_$(processid_short)_cuda @@ -156,26 +150,32 @@ madevent_fortran_link: $(PROG)_fortran rm -f $(PROG) ln -s $(PROG)_fortran $(PROG) +madevent_cppnone_link: CUDACPP_BUILDDIR:=$(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn cppnone |& awk '/Building/{print $$3}' | sed s/BUILDDIR=//) madevent_cppnone_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp rm -f $(PROG) ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) +madevent_cppsse4_link: CUDACPP_BUILDDIR:=$(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn cppsse4 |& awk '/Building/{print $$3}' | sed s/BUILDDIR=//) madevent_cppsse4_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp rm -f $(PROG) ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) +madevent_cppavx2_link: CUDACPP_BUILDDIR:=$(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn cppavx2 |& awk '/Building/{print $$3}' | sed s/BUILDDIR=//) madevent_cppavx2_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp rm -f $(PROG) ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) +madevent_cpp512y_link: CUDACPP_BUILDDIR:=$(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn cpp512y |& awk '/Building/{print $$3}' | sed s/BUILDDIR=//) madevent_cpp512y_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp rm -f $(PROG) ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) +madevent_cpp512z_link: CUDACPP_BUILDDIR:=$(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn cpp512z |& awk '/Building/{print $$3}' | sed s/BUILDDIR=//) madevent_cpp512z_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp rm -f $(PROG) ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) +madevent_cuda_link: CUDACPP_BUILDDIR:=$(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn cuda |& awk '/Building/{print $$3}' | sed s/BUILDDIR=//) madevent_cuda_link: $(CUDACPP_BUILDDIR)/$(PROG)_cuda rm -f $(PROG) ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cuda $(PROG) @@ -258,18 +258,32 @@ else cppall: cppnone cppsse4 cppavx2 cpp512y cpp512z endif +ALL: USEBUILDDIR=1 ALL: cppnone cppsse4 cppavx2 cpp512y cpp512z cuda + +cppnone: CUDACPP_BUILDDIR:=$(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn cppnone |& awk '/Building/{print $$3}' | sed s/BUILDDIR=//) +cppnone: TARGET = cppnone cppnone: $(CUDACPP_BUILDDIR)/.$(TARGET)libs +cppsse4: CUDACPP_BUILDDIR:=$(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn cppsse4 |& awk '/Building/{print $$3}' | sed s/BUILDDIR=//) +cppsse4: TARGET = cppsse4 cppsse4: $(CUDACPP_BUILDDIR)/.$(TARGET)libs +cppavx2: CUDACPP_BUILDDIR:=$(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn cppavx2 |& awk '/Building/{print $$3}' | sed s/BUILDDIR=//) +cppavx2: TARGET = cppavx2 cppavx2: $(CUDACPP_BUILDDIR)/.$(TARGET)libs +cpp512y: CUDACPP_BUILDDIR:=$(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn cpp512y |& awk '/Building/{print $$3}' | sed s/BUILDDIR=//) +cpp512y: TARGET = cpp512y cpp512y: $(CUDACPP_BUILDDIR)/.$(TARGET)libs +cpp512z: CUDACPP_BUILDDIR:=$(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn cpp512z |& awk '/Building/{print $$3}' | sed s/BUILDDIR=//) +cpp512z: TARGET = cpp512z cpp512z: $(CUDACPP_BUILDDIR)/.$(TARGET)libs +cuda: CUDACPP_BUILDDIR:=$(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn cpp512z |& awk '/Building/{print $$3}' | sed s/BUILDDIR=//) +cuda: TARGET = cuda cuda: $(CUDACPP_BUILDDIR)/.$(TARGET)libs # Clean (NB: 'make clean' in Source calls 'make clean' in all P*) From bfc773935c97ea51e3293f2b9be7aa98ceee2369 Mon Sep 17 00:00:00 2001 From: Jorgen T Date: Thu, 21 Sep 2023 11:43:46 +0200 Subject: [PATCH 052/129] Absorbed the initial target calling cudacpp.mk into each seperate avx/cuda target --- .../cudacpp/gg_tt.mad/SubProcesses/makefile | 32 ++++++++----------- 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile index b3db798f50..976fcee57b 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile @@ -129,10 +129,6 @@ $(LIBS): .libs cd ../../Source; make touch $@ -$(CUDACPP_BUILDDIR)/.$(TARGET)libs: - $(MAKE) -f $(CUDACPP_MAKEFILE) $(TARGET) - touch $@ - # On Linux, set rpath to LIBDIR to make it unnecessary to use LD_LIBRARY_PATH # Use relative paths with respect to the executables ($ORIGIN on Linux) # On Darwin, building libraries with absolute paths in LIBDIR makes this unnecessary @@ -258,33 +254,33 @@ else cppall: cppnone cppsse4 cppavx2 cpp512y cpp512z endif -ALL: USEBUILDDIR=1 -ALL: cppnone cppsse4 cppavx2 cpp512y cpp512z cuda +all: USEBUILDDIR=1 +all: cppnone cppsse4 cppavx2 cpp512y cpp512z cuda cppnone: CUDACPP_BUILDDIR:=$(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn cppnone |& awk '/Building/{print $$3}' | sed s/BUILDDIR=//) -cppnone: TARGET = cppnone -cppnone: $(CUDACPP_BUILDDIR)/.$(TARGET)libs +cppnone: $(MAKE) -f $(CUDACPP_MAKEFILE) cppnone +cppnone: touch $(CUDACPP_BUILDDIR)/.$(TARGET)libs cppsse4: CUDACPP_BUILDDIR:=$(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn cppsse4 |& awk '/Building/{print $$3}' | sed s/BUILDDIR=//) -cppsse4: TARGET = cppsse4 -cppsse4: $(CUDACPP_BUILDDIR)/.$(TARGET)libs +cppsse4: $(MAKE) -f $(CUDACPP_MAKEFILE) cppsse4 +cppsse4: touch $(CUDACPP_BUILDDIR)/.$(TARGET)libs cppavx2: CUDACPP_BUILDDIR:=$(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn cppavx2 |& awk '/Building/{print $$3}' | sed s/BUILDDIR=//) -cppavx2: TARGET = cppavx2 -cppavx2: $(CUDACPP_BUILDDIR)/.$(TARGET)libs +cppavx2: $(MAKE) -f $(CUDACPP_MAKEFILE) cppavx2 +cppavx2: touch $(CUDACPP_BUILDDIR)/.$(TARGET)libs cpp512y: CUDACPP_BUILDDIR:=$(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn cpp512y |& awk '/Building/{print $$3}' | sed s/BUILDDIR=//) -cpp512y: TARGET = cpp512y -cpp512y: $(CUDACPP_BUILDDIR)/.$(TARGET)libs +cpp512y: $(MAKE) -f $(CUDACPP_MAKEFILE) cpp512y +cpp512y: touch $(CUDACPP_BUILDDIR)/.$(TARGET)libs cpp512z: CUDACPP_BUILDDIR:=$(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn cpp512z |& awk '/Building/{print $$3}' | sed s/BUILDDIR=//) -cpp512z: TARGET = cpp512z -cpp512z: $(CUDACPP_BUILDDIR)/.$(TARGET)libs +cpp512z: $(MAKE) -f $(CUDACPP_MAKEFILE) cpp512z +cpp512z: touch $(CUDACPP_BUILDDIR)/.$(TARGET)libs cuda: CUDACPP_BUILDDIR:=$(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn cpp512z |& awk '/Building/{print $$3}' | sed s/BUILDDIR=//) -cuda: TARGET = cuda -cuda: $(CUDACPP_BUILDDIR)/.$(TARGET)libs +cuda: $(MAKE) -f $(CUDACPP_MAKEFILE) cppnone +cuda: touch $(CUDACPP_BUILDDIR)/.$(TARGET)libs # Clean (NB: 'make clean' in Source calls 'make clean' in all P*) From 4d4866b177b12f75b90eb4df40e62afb1896db3c Mon Sep 17 00:00:00 2001 From: Jorgen T Date: Thu, 21 Sep 2023 13:49:18 +0200 Subject: [PATCH 053/129] Fixed madevent_avx/cuda_link targets --- .../cudacpp/gg_tt.mad/SubProcesses/makefile | 48 +++++++------------ 1 file changed, 18 insertions(+), 30 deletions(-) diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile index 976fcee57b..fdb7798400 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile @@ -17,18 +17,6 @@ CXXFLAGS = -O3 -Wall -Wshadow -Wextra usage: $(error Unknown target='$(TARGET)': only 'cppnone', 'cppsse4', 'cppavx2', 'cpp512y', 'cpp512z' and 'cuda' are supported!) -# Sets correct target based on MAKECMDGOALS - -ifeq ($(MAKECMDGOALS),) - TARGET := undefined -else - ifneq (,$(findstring madevent_*,$(MAKECMDGOALS))) - TARGET := $(patsubst %_%,%,$(MAKECMDGOALS)) - else - TARGET := $(MAKECMDGOALS) - endif -endif - # Enable ccache if USECCACHE=1 ifeq ($(USECCACHE)$(shell echo $(CXX) | grep ccache),1) override CXX:=ccache $(CXX) @@ -140,47 +128,47 @@ else override LIBFLAGSRPATH = -Wl,-rpath,'$$ORIGIN/$(LIBDIR)' endif -.PHONY: madevent_fortran_link madevent_cuda_link madevent_cpp_link +.PHONY: madevent_fortran_link madevent_cuda_link madevent_cppnone_link madevent_cppsse4_link madevent_cppavx2_link madevent_cpp512y_link madevent_cpp512z_link madevent_fortran_link: $(PROG)_fortran rm -f $(PROG) ln -s $(PROG)_fortran $(PROG) madevent_cppnone_link: CUDACPP_BUILDDIR:=$(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn cppnone |& awk '/Building/{print $$3}' | sed s/BUILDDIR=//) -madevent_cppnone_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp +madevent_cppnone_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp cppnone rm -f $(PROG) ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) madevent_cppsse4_link: CUDACPP_BUILDDIR:=$(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn cppsse4 |& awk '/Building/{print $$3}' | sed s/BUILDDIR=//) -madevent_cppsse4_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp +madevent_cppsse4_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp cppsse4 rm -f $(PROG) ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) madevent_cppavx2_link: CUDACPP_BUILDDIR:=$(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn cppavx2 |& awk '/Building/{print $$3}' | sed s/BUILDDIR=//) -madevent_cppavx2_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp +madevent_cppavx2_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp cppavx2 rm -f $(PROG) ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) madevent_cpp512y_link: CUDACPP_BUILDDIR:=$(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn cpp512y |& awk '/Building/{print $$3}' | sed s/BUILDDIR=//) -madevent_cpp512y_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp +madevent_cpp512y_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp cpp512y rm -f $(PROG) ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) madevent_cpp512z_link: CUDACPP_BUILDDIR:=$(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn cpp512z |& awk '/Building/{print $$3}' | sed s/BUILDDIR=//) -madevent_cpp512z_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp +madevent_cpp512z_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp cpp512z rm -f $(PROG) ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) madevent_cuda_link: CUDACPP_BUILDDIR:=$(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn cuda |& awk '/Building/{print $$3}' | sed s/BUILDDIR=//) -madevent_cuda_link: $(CUDACPP_BUILDDIR)/$(PROG)_cuda +madevent_cuda_link: $(CUDACPP_BUILDDIR)/$(PROG)_cuda cuda rm -f $(PROG) ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cuda $(PROG) # Building $(PROG)_cpp also builds $(PROG)_cuda if $(CUDACPP_CULIB) exists (improved patch for cpp-only builds #503) -$(CUDACPP_BUILDDIR)/$(PROG)_cpp: $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(LIBS) $(MATRIX) counters.o ompnumthreads.o $(CUDACPP_BUILDDIR)/.$(TARGET)libs +$(CUDACPP_BUILDDIR)/$(PROG)_cpp: $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(LIBS) $(MATRIX) counters.o ompnumthreads.o $(FC) -o $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o -L$(LIBDIR)/$(CUDACPP_BUILDDIR) -l$(CUDACPP_COMMONLIB) -l$(CUDACPP_CXXLIB) $(LIBFLAGSRPATH) $(LDFLAGS) -$(CUDACPP_BUILDDIR)/$(PROG)_cuda: $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(LIBS) $(MATRIX) counters.o ompnumthreads.o $(CUDACPP_BUILDDIR)/.$(TARGET)libs +$(CUDACPP_BUILDDIR)/$(PROG)_cuda: $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(LIBS) $(MATRIX) counters.o ompnumthreads.o $(FC) -o $(CUDACPP_BUILDDIR)/$(PROG)_cuda $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o -L$(LIBDIR)/$(CUDACPP_BUILDDIR) -l$(CUDACPP_COMMONLIB) -l$(CUDACPP_CULIB) $(LIBFLAGSRPATH) $(LDFLAGS) counters.o: counters.cc timer.h @@ -254,38 +242,38 @@ else cppall: cppnone cppsse4 cppavx2 cpp512y cpp512z endif -all: USEBUILDDIR=1 -all: cppnone cppsse4 cppavx2 cpp512y cpp512z cuda +ALL: USEBUILDDIR=1 +ALL: cppnone cppsse4 cppavx2 cpp512y cpp512z cuda cppnone: CUDACPP_BUILDDIR:=$(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn cppnone |& awk '/Building/{print $$3}' | sed s/BUILDDIR=//) cppnone: $(MAKE) -f $(CUDACPP_MAKEFILE) cppnone -cppnone: touch $(CUDACPP_BUILDDIR)/.$(TARGET)libs +cppnone: touch $(CUDACPP_BUILDDIR)/.cppnonelibs cppsse4: CUDACPP_BUILDDIR:=$(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn cppsse4 |& awk '/Building/{print $$3}' | sed s/BUILDDIR=//) cppsse4: $(MAKE) -f $(CUDACPP_MAKEFILE) cppsse4 -cppsse4: touch $(CUDACPP_BUILDDIR)/.$(TARGET)libs +cppsse4: touch $(CUDACPP_BUILDDIR)/.cppsse4libs cppavx2: CUDACPP_BUILDDIR:=$(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn cppavx2 |& awk '/Building/{print $$3}' | sed s/BUILDDIR=//) cppavx2: $(MAKE) -f $(CUDACPP_MAKEFILE) cppavx2 -cppavx2: touch $(CUDACPP_BUILDDIR)/.$(TARGET)libs +cppavx2: touch $(CUDACPP_BUILDDIR)/.cppavx2libs cpp512y: CUDACPP_BUILDDIR:=$(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn cpp512y |& awk '/Building/{print $$3}' | sed s/BUILDDIR=//) cpp512y: $(MAKE) -f $(CUDACPP_MAKEFILE) cpp512y -cpp512y: touch $(CUDACPP_BUILDDIR)/.$(TARGET)libs +cpp512y: touch $(CUDACPP_BUILDDIR)/.cpp512ylibs cpp512z: CUDACPP_BUILDDIR:=$(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn cpp512z |& awk '/Building/{print $$3}' | sed s/BUILDDIR=//) cpp512z: $(MAKE) -f $(CUDACPP_MAKEFILE) cpp512z -cpp512z: touch $(CUDACPP_BUILDDIR)/.$(TARGET)libs +cpp512z: touch $(CUDACPP_BUILDDIR)/.cpp512zlibs cuda: CUDACPP_BUILDDIR:=$(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn cpp512z |& awk '/Building/{print $$3}' | sed s/BUILDDIR=//) cuda: $(MAKE) -f $(CUDACPP_MAKEFILE) cppnone -cuda: touch $(CUDACPP_BUILDDIR)/.$(TARGET)libs +cuda: touch $(CUDACPP_BUILDDIR)/.cppnonelibs # Clean (NB: 'make clean' in Source calls 'make clean' in all P*) BUILD_DIRS := $(wildcard build.*) -BUILD_TARGET_DIR := $(shell echo $(BUILD_DIRS) | awk -F '[._]' '{print $$2}) +BUILD_TARGET_DIR := $(shell echo $(BUILD_DIRS) | awk -F '[._]' '{print $$2}') NUM_BUILD_DIRS := $(words $(BUILD_DIRS)) clean: From 3fa5b76dccdea352baf854d5c423ce4271355ffc Mon Sep 17 00:00:00 2001 From: Jorgen T Date: Thu, 21 Sep 2023 15:21:53 +0200 Subject: [PATCH 054/129] ALL target now calls the makefile itself for compiling avx/cuda targets --- epochX/cudacpp/gg_tt.mad/SubProcesses/makefile | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile index fdb7798400..5b85eda147 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile @@ -242,9 +242,13 @@ else cppall: cppnone cppsse4 cppavx2 cpp512y cpp512z endif -ALL: USEBUILDDIR=1 -ALL: cppnone cppsse4 cppavx2 cpp512y cpp512z cuda - +ALL: + $(MAKE) USEBUILDDIR=1 cppnone + $(MAKE) USEBUILDDIR=1 cppsse4 + $(MAKE) USEBUILDDIR=1 cppavx2 + $(MAKE) USEBUILDDIR=1 cpp512y + $(MAKE) USEBUILDDIR=1 cpp512z + $(MAKE) USEBUILDDIR=1 cuda cppnone: CUDACPP_BUILDDIR:=$(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn cppnone |& awk '/Building/{print $$3}' | sed s/BUILDDIR=//) cppnone: $(MAKE) -f $(CUDACPP_MAKEFILE) cppnone From 83bacca8cd101e00ebe8add92adfbee4cf0fde98 Mon Sep 17 00:00:00 2001 From: Jorgen T Date: Thu, 21 Sep 2023 17:27:42 +0200 Subject: [PATCH 055/129] Last revision of targets --- .../cudacpp/gg_tt.mad/SubProcesses/makefile | 52 +++++++++++-------- 1 file changed, 29 insertions(+), 23 deletions(-) diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile index 5b85eda147..a0a2415ee8 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile @@ -250,29 +250,35 @@ ALL: $(MAKE) USEBUILDDIR=1 cpp512z $(MAKE) USEBUILDDIR=1 cuda -cppnone: CUDACPP_BUILDDIR:=$(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn cppnone |& awk '/Building/{print $$3}' | sed s/BUILDDIR=//) -cppnone: $(MAKE) -f $(CUDACPP_MAKEFILE) cppnone -cppnone: touch $(CUDACPP_BUILDDIR)/.cppnonelibs - -cppsse4: CUDACPP_BUILDDIR:=$(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn cppsse4 |& awk '/Building/{print $$3}' | sed s/BUILDDIR=//) -cppsse4: $(MAKE) -f $(CUDACPP_MAKEFILE) cppsse4 -cppsse4: touch $(CUDACPP_BUILDDIR)/.cppsse4libs - -cppavx2: CUDACPP_BUILDDIR:=$(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn cppavx2 |& awk '/Building/{print $$3}' | sed s/BUILDDIR=//) -cppavx2: $(MAKE) -f $(CUDACPP_MAKEFILE) cppavx2 -cppavx2: touch $(CUDACPP_BUILDDIR)/.cppavx2libs - -cpp512y: CUDACPP_BUILDDIR:=$(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn cpp512y |& awk '/Building/{print $$3}' | sed s/BUILDDIR=//) -cpp512y: $(MAKE) -f $(CUDACPP_MAKEFILE) cpp512y -cpp512y: touch $(CUDACPP_BUILDDIR)/.cpp512ylibs - -cpp512z: CUDACPP_BUILDDIR:=$(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn cpp512z |& awk '/Building/{print $$3}' | sed s/BUILDDIR=//) -cpp512z: $(MAKE) -f $(CUDACPP_MAKEFILE) cpp512z -cpp512z: touch $(CUDACPP_BUILDDIR)/.cpp512zlibs - -cuda: CUDACPP_BUILDDIR:=$(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn cpp512z |& awk '/Building/{print $$3}' | sed s/BUILDDIR=//) -cuda: $(MAKE) -f $(CUDACPP_MAKEFILE) cppnone -cuda: touch $(CUDACPP_BUILDDIR)/.cppnonelibs +cppnone: + CUDACPP_BUILDDIR = $(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn cppnone |& awk '/Building/{print $$3}' | sed s/BUILDDIR=//) + $(MAKE) -f $(CUDACPP_MAKEFILE) cppnone + touch $(CUDACPP_BUILDDIR)/.cppnonelibs + +cppsse4: + CUDACPP_BUILDDIR = $(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn cppsse4 |& awk '/Building/{print $$3}' | sed s/BUILDDIR=//) + $(MAKE) -f $(CUDACPP_MAKEFILE) cppsse4 + touch $(CUDACPP_BUILDDIR)/.cppsse4libs + +cppavx2: + CUDACPP_BUILDDIR = $(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn cppavx2 |& awk '/Building/{print $$3}' | sed s/BUILDDIR=//) + $(MAKE) -f $(CUDACPP_MAKEFILE) cppavx2 + touch $(CUDACPP_BUILDDIR)/.cppavx2libs + +cpp512y: + CUDACPP_BUILDDIR = $(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn cpp512y |& awk '/Building/{print $$3}' | sed s/BUILDDIR=//) + $(MAKE) -f $(CUDACPP_MAKEFILE) cpp512y + touch $(CUDACPP_BUILDDIR)/.cpp512ylibs + +cpp512z: + CUDACPP_BUILDDIR = $(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn cpp512z |& awk '/Building/{print $$3}' | sed s/BUILDDIR=//) + $(MAKE) -f $(CUDACPP_MAKEFILE) cpp512z + touch $(CUDACPP_BUILDDIR)/.cpp512zlibs + +cuda: + CUDACPP_BUILDDIR = $(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn cpp512z |& awk '/Building/{print $$3}' | sed s/BUILDDIR=//) + $(MAKE) -f $(CUDACPP_MAKEFILE) cppnone + touch $(CUDACPP_BUILDDIR)/.cppnonelibs # Clean (NB: 'make clean' in Source calls 'make clean' in all P*) From f1a270445ebb852fa32b698b15eadf35d238e874 Mon Sep 17 00:00:00 2001 From: Jorgen T Date: Fri, 22 Sep 2023 11:41:43 +0200 Subject: [PATCH 056/129] Did some refactoring of the makefile to remove recurring lines --- .../cudacpp/gg_tt.mad/SubProcesses/makefile | 34 +++++++++++-------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile index a0a2415ee8..125d4b7159 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile @@ -9,8 +9,18 @@ FFLAGS+= -cpp # Compile counters with -O3 as in the cudacpp makefile (avoid being "unfair" to Fortran #740) CXXFLAGS = -O3 -Wall -Wshadow -Wextra -# Default goal +# Sets correct target based on MAKECMDGOALS +ifeq ($(MAKECMDGOALS),) + TARGET := undefined +else + ifneq (,$(findstring madevent_*,$(MAKECMDGOALS))) + TARGET := $(patsubst %_%,%,$(MAKECMDGOALS)) + else + TARGET := $(MAKECMDGOALS) + endif +endif +# Default goal .DEFAULT_GOAL := usage # Target if user does not specify target @@ -59,6 +69,12 @@ CUDACPP_MAKEFILE=cudacpp.mk CUDACPP_MAKEENV:=$(shell echo '$(.VARIABLES)' | tr " " "\n" | egrep "(USEBUILDDIR|FPTYPE|HELINL|HRDCOD)") ###$(info CUDACPP_MAKEENV=$(CUDACPP_MAKEENV)) ###$(info $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))")) +CUDACPP_BUILDDIR:=$(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn $(TARGET) |& awk '/Building/{print $$3}' | sed s/BUILDDIR=//) +ifeq ($(CUDACPP_BUILDDIR),) +$(error CUDACPP_BUILDDIR='$(CUDACPP_BUILDDIR)' should not be empty!) +else +$(info CUDACPP_BUILDDIR='$(CUDACPP_BUILDDIR)') +endif CUDACPP_COMMONLIB=mg5amc_common CUDACPP_CXXLIB=mg5amc_$(processid_short)_cpp CUDACPP_CULIB=mg5amc_$(processid_short)_cuda @@ -134,32 +150,26 @@ madevent_fortran_link: $(PROG)_fortran rm -f $(PROG) ln -s $(PROG)_fortran $(PROG) -madevent_cppnone_link: CUDACPP_BUILDDIR:=$(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn cppnone |& awk '/Building/{print $$3}' | sed s/BUILDDIR=//) madevent_cppnone_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp cppnone rm -f $(PROG) ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) -madevent_cppsse4_link: CUDACPP_BUILDDIR:=$(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn cppsse4 |& awk '/Building/{print $$3}' | sed s/BUILDDIR=//) madevent_cppsse4_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp cppsse4 rm -f $(PROG) ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) -madevent_cppavx2_link: CUDACPP_BUILDDIR:=$(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn cppavx2 |& awk '/Building/{print $$3}' | sed s/BUILDDIR=//) madevent_cppavx2_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp cppavx2 rm -f $(PROG) ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) -madevent_cpp512y_link: CUDACPP_BUILDDIR:=$(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn cpp512y |& awk '/Building/{print $$3}' | sed s/BUILDDIR=//) madevent_cpp512y_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp cpp512y rm -f $(PROG) ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) -madevent_cpp512z_link: CUDACPP_BUILDDIR:=$(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn cpp512z |& awk '/Building/{print $$3}' | sed s/BUILDDIR=//) madevent_cpp512z_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp cpp512z rm -f $(PROG) ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) -madevent_cuda_link: CUDACPP_BUILDDIR:=$(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn cuda |& awk '/Building/{print $$3}' | sed s/BUILDDIR=//) madevent_cuda_link: $(CUDACPP_BUILDDIR)/$(PROG)_cuda cuda rm -f $(PROG) ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cuda $(PROG) @@ -251,34 +261,28 @@ ALL: $(MAKE) USEBUILDDIR=1 cuda cppnone: - CUDACPP_BUILDDIR = $(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn cppnone |& awk '/Building/{print $$3}' | sed s/BUILDDIR=//) $(MAKE) -f $(CUDACPP_MAKEFILE) cppnone touch $(CUDACPP_BUILDDIR)/.cppnonelibs cppsse4: - CUDACPP_BUILDDIR = $(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn cppsse4 |& awk '/Building/{print $$3}' | sed s/BUILDDIR=//) $(MAKE) -f $(CUDACPP_MAKEFILE) cppsse4 touch $(CUDACPP_BUILDDIR)/.cppsse4libs cppavx2: - CUDACPP_BUILDDIR = $(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn cppavx2 |& awk '/Building/{print $$3}' | sed s/BUILDDIR=//) $(MAKE) -f $(CUDACPP_MAKEFILE) cppavx2 touch $(CUDACPP_BUILDDIR)/.cppavx2libs cpp512y: - CUDACPP_BUILDDIR = $(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn cpp512y |& awk '/Building/{print $$3}' | sed s/BUILDDIR=//) $(MAKE) -f $(CUDACPP_MAKEFILE) cpp512y touch $(CUDACPP_BUILDDIR)/.cpp512ylibs cpp512z: - CUDACPP_BUILDDIR = $(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn cpp512z |& awk '/Building/{print $$3}' | sed s/BUILDDIR=//) $(MAKE) -f $(CUDACPP_MAKEFILE) cpp512z touch $(CUDACPP_BUILDDIR)/.cpp512zlibs cuda: - CUDACPP_BUILDDIR = $(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn cpp512z |& awk '/Building/{print $$3}' | sed s/BUILDDIR=//) - $(MAKE) -f $(CUDACPP_MAKEFILE) cppnone - touch $(CUDACPP_BUILDDIR)/.cppnonelibs + $(MAKE) -f $(CUDACPP_MAKEFILE) cuda + touch $(CUDACPP_BUILDDIR)/.cudalibs # Clean (NB: 'make clean' in Source calls 'make clean' in all P*) From 6cc72f79f6efc6aca02122503888bd0bccd46e51 Mon Sep 17 00:00:00 2001 From: Jorgen T Date: Fri, 22 Sep 2023 17:05:57 +0200 Subject: [PATCH 057/129] Code cleanup --- .../cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk | 4 ++-- epochX/cudacpp/gg_tt.mad/SubProcesses/makefile | 17 +++++++++++++---- epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk | 10 +++++----- 3 files changed, 20 insertions(+), 11 deletions(-) diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk index e9e5661581..4ad0be2bac 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk @@ -759,8 +759,8 @@ NUM_BUILD_DIRS := $(words $(BUILD_DIRS)) clean: ifeq ($(USEBUILDDIR),1) ifeq ($(NUM_BUILD_DIRS),1) - $(info Only one build directory found.) - rm -rf build.* + $(info USEBUILDDIR=1, Only one build directory found.) + rm -rf $(BUILD_DIRS) else ifeq ($(NUM_BUILD_DIRS),0) $(error USEBUILDDIR=1, but no build directories are found.) else diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile index 125d4b7159..b74b11b6d4 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile @@ -245,11 +245,20 @@ genps.o: .libs UNAME_P := $(shell uname -p) ifeq ($(UNAME_P),ppc64le) -cppall: cppnone cppsse4 +cppall: + $(MAKE) USEBUILDDIR=1 cppnone + $(MAKE) USEBUILDDIR=1 cppsse4 else ifeq ($(UNAME_P),arm) -cppall: cppnone cppsse4 +cppall: + $(MAKE) USEBUILDDIR=1 cppnone + $(MAKE) USEBUILDDIR=1 cppsse4 else -cppall: cppnone cppsse4 cppavx2 cpp512y cpp512z +cppall: + $(MAKE) USEBUILDDIR=1 cppnone + $(MAKE) USEBUILDDIR=1 cppsse4 + $(MAKE) USEBUILDDIR=1 cppavx2 + $(MAKE) USEBUILDDIR=1 cpp512y + $(MAKE) USEBUILDDIR=1 cpp512z endif ALL: @@ -293,7 +302,7 @@ NUM_BUILD_DIRS := $(words $(BUILD_DIRS)) clean: ifeq ($(USEBUILDDIR),1) ifeq ($(NUM_BUILD_DIRS),1) - $(info USEBUILDDIR=1 only cleaning build dir.) + $(info USEBUILDDIR=1, only cleaning build dir.) $(RM) -r $(BUILD_DIRS) $(MAKE) -f $(CUDACPP_MAKEFILE) clean$(BUILD_TARGET_DIR) else ifeq ($(NUM_BUILD_DIRS),0) diff --git a/epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk b/epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk index 95d897b145..37a3ee9e0a 100644 --- a/epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk +++ b/epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk @@ -287,13 +287,13 @@ NUM_BUILD_DIRS := $(words $(BUILD_DIRS)) clean: ifeq ($(USEBUILDDIR),1) ifeq ($(NUM_BUILD_DIRS),1) - $(info Only one build directory found.) - rm -rf ../lib/build.* - rm -rf build.* + $(info USEBUILDDIR=1, only one src build directory found.) + rm -rf ../lib/$(BUILD_DIRS) + rm -rf $(BUILD_DIRS) else ifeq ($(NUM_BUILD_DIRS),0) - $(error USEBUILDDIR=1, but no build directories are found.) + $(error USEBUILDDIR=1, but no src build directories are found.) else - $(error Multiple BUILDDIR's found! Use 'cleannone', 'cleansse4', 'cleanavx2', 'clean512y','clean512z', 'cleancuda' or 'cleanall'.) + $(error Multiple src BUILDDIR's found! Use 'cleannone', 'cleansse4', 'cleanavx2', 'clean512y','clean512z', 'cleancuda' or 'cleanall'.) endif else rm -f ../lib/lib$(MG5AMC_COMMONLIB).so From cd392613bf76a29bdab4fa5144439f2c8e3ce96f Mon Sep 17 00:00:00 2001 From: Jorgen T Date: Mon, 25 Sep 2023 17:01:30 +0200 Subject: [PATCH 058/129] Reverted change to Source makefile, no patch needed now --- epochX/cudacpp/gg_tt.mad/Source/makefile | 2 +- epochX/cudacpp/gg_tt.mad/SubProcesses/makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/epochX/cudacpp/gg_tt.mad/Source/makefile b/epochX/cudacpp/gg_tt.mad/Source/makefile index dfa319975c..dbe08b846e 100644 --- a/epochX/cudacpp/gg_tt.mad/Source/makefile +++ b/epochX/cudacpp/gg_tt.mad/Source/makefile @@ -137,4 +137,4 @@ clean: cleanSource for i in `ls -d ../SubProcesses/P*`; do cd $$i; make clean; cd -; done; cleanall: cleanSource - for i in `ls -d ../SubProcesses/P*`; do cd $$i; make cleancpp; cd -; done; + for i in `ls -d ../SubProcesses/P*`; do cd $$i; make cleanavxs; cd -; done; diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile index b74b11b6d4..44cf2d7b1b 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile @@ -341,7 +341,7 @@ cleancuda: # Clean build: fortran in this Pn; cuda executables in this Pn $(RM) *.o gensym $(PROG) $(PROG)_fortran $(PROG)_forhel build.cuda_*/$(PROG)_cuda $(MAKE) -f $(CUDACPP_MAKEFILE) cleancuda -cleancpp: clean # Clean builds: fortran in this Pn; cudacpp for all AVX in this Pn and in src +cleanavxs: clean # Clean builds: fortran in this Pn; cudacpp for all AVX in this Pn and in src $(MAKE) -f $(CUDACPP_MAKEFILE) cleanall $(RM) $(CUDACPP_BUILDDIR)/.*libs $(RM) .libs From 7d15b06b514af0e7bad2fc505c18f50fc84fbb8a Mon Sep 17 00:00:00 2001 From: Jorgen T Date: Mon, 25 Sep 2023 17:04:16 +0200 Subject: [PATCH 059/129] Fixed lockfiles not getting cleaned properly --- epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk | 11 +++++++++-- epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk | 8 +++++--- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk index 4ad0be2bac..e11c8a465c 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk @@ -790,31 +790,38 @@ endif # Target: clean different builds cleannone: rm -rf build.none_* + rm -f ../../lib/build.none_*/lib$(MG5AMC_CXXLIB).so $(MAKE) -C ../../src cleannone -f $(CUDACPP_SRC_MAKEFILE) cleansse4: rm -rf build.sse4_* + rm -f ../../lib/build.sse4_*/lib$(MG5AMC_CXXLIB).so $(MAKE) -C ../../src cleansse4 -f $(CUDACPP_SRC_MAKEFILE) cleanavx2: rm -rf build.avx2_* + rm -f ../../lib/build.avx2_*/lib$(MG5AMC_CXXLIB).so $(MAKE) -C ../../src cleanavx2 -f $(CUDACPP_SRC_MAKEFILE) clean512y: rm -rf build.512y_* + rm -f ../../lib/build.512y_*/lib$(MG5AMC_CXXLIB).so $(MAKE) -C ../../src clean512y -f $(CUDACPP_SRC_MAKEFILE) clean512z: rm -rf build.512z_* + rm -f ../../lib/build.512z_*/lib$(MG5AMC_CXXLIB).so $(MAKE) -C ../../src clean512z -f $(CUDACPP_SRC_MAKEFILE) cleancuda: rm -rf build.cuda_* + rm -f ../../lib/build.cuda_*/lib$(MG5AMC_CULIB).so $(MAKE) -C ../../src cleancuda -f $(CUDACPP_SRC_MAKEFILE) cleandir: - rm -f $(BUILDDIR)/*.o $(BUILDDIR)/*.exe - rm -f $(LIBDIR)/lib$(MG5AMC_CXXLIB).so $(LIBDIR)/lib$(MG5AMC_CULIB).so + rm -f ./*.o ./*.exe + rm -f ../../lib/lib$(MG5AMC_CXXLIB).so ../../lib/lib$(MG5AMC_CULIB).so + rm -f ./.build.* $(MAKE) -C ../../src cleandir -f $(CUDACPP_SRC_MAKEFILE) #------------------------------------------------------------------------------- diff --git a/epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk b/epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk index 37a3ee9e0a..056f850c3a 100644 --- a/epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk +++ b/epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk @@ -296,8 +296,8 @@ else $(error Multiple src BUILDDIR's found! Use 'cleannone', 'cleansse4', 'cleanavx2', 'clean512y','clean512z', 'cleancuda' or 'cleanall'.) endif else - rm -f ../lib/lib$(MG5AMC_COMMONLIB).so - rm -f $(BUILDDIR)/*.o $(BUILDDIR)/*.exe + rm -f ../lib/.build.* ../lib/lib$(MG5AMC_COMMONLIB).so + rm -f $(BUILDDIR)/.build.* $(BUILDDIR)/*.o $(BUILDDIR)/*.exe endif cleanall: @@ -335,7 +335,9 @@ cleancuda: rm -rf build.cuda_* cleandir: + rm -f ./*.o ./*.exe rm -f ../lib/lib$(MG5AMC_COMMONLIB).so - rm -f $(BUILDDIR)/*.o $(BUILDDIR)/*.exe + rm -f ../lib/.build.* + rm -f ./.build.* #------------------------------------------------------------------------------- From 752d336090ae39c0fccba67ba9a4eecf3adb2e01 Mon Sep 17 00:00:00 2001 From: Jorgen T Date: Mon, 25 Sep 2023 17:16:36 +0200 Subject: [PATCH 060/129] Fixed indentation --- .../cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk index e11c8a465c..f4279cb898 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk @@ -790,38 +790,38 @@ endif # Target: clean different builds cleannone: rm -rf build.none_* - rm -f ../../lib/build.none_*/lib$(MG5AMC_CXXLIB).so + rm -f ../../lib/build.none_*/lib$(MG5AMC_CXXLIB).so $(MAKE) -C ../../src cleannone -f $(CUDACPP_SRC_MAKEFILE) cleansse4: rm -rf build.sse4_* - rm -f ../../lib/build.sse4_*/lib$(MG5AMC_CXXLIB).so + rm -f ../../lib/build.sse4_*/lib$(MG5AMC_CXXLIB).so $(MAKE) -C ../../src cleansse4 -f $(CUDACPP_SRC_MAKEFILE) cleanavx2: rm -rf build.avx2_* - rm -f ../../lib/build.avx2_*/lib$(MG5AMC_CXXLIB).so + rm -f ../../lib/build.avx2_*/lib$(MG5AMC_CXXLIB).so $(MAKE) -C ../../src cleanavx2 -f $(CUDACPP_SRC_MAKEFILE) clean512y: rm -rf build.512y_* - rm -f ../../lib/build.512y_*/lib$(MG5AMC_CXXLIB).so + rm -f ../../lib/build.512y_*/lib$(MG5AMC_CXXLIB).so $(MAKE) -C ../../src clean512y -f $(CUDACPP_SRC_MAKEFILE) clean512z: rm -rf build.512z_* - rm -f ../../lib/build.512z_*/lib$(MG5AMC_CXXLIB).so + rm -f ../../lib/build.512z_*/lib$(MG5AMC_CXXLIB).so $(MAKE) -C ../../src clean512z -f $(CUDACPP_SRC_MAKEFILE) cleancuda: rm -rf build.cuda_* - rm -f ../../lib/build.cuda_*/lib$(MG5AMC_CULIB).so + rm -f ../../lib/build.cuda_*/lib$(MG5AMC_CULIB).so $(MAKE) -C ../../src cleancuda -f $(CUDACPP_SRC_MAKEFILE) cleandir: rm -f ./*.o ./*.exe rm -f ../../lib/lib$(MG5AMC_CXXLIB).so ../../lib/lib$(MG5AMC_CULIB).so - rm -f ./.build.* + rm -f ./.build.* $(MAKE) -C ../../src cleandir -f $(CUDACPP_SRC_MAKEFILE) #------------------------------------------------------------------------------- @@ -872,11 +872,8 @@ endif # Target: check (run the C++ test executable) # [NB THIS IS WHAT IS USED IN THE GITHUB CI!] -ifneq ($(NVCC),) -check: runTest cmpFcheck cmpFGcheck -else check: runTest cmpFcheck -endif +gcheck: runTest cmpFcheck cmpFGcheck # Target: runTest (run the C++ test executable runTest.exe) runTest: all.$(TAG) From c121b0dda46a43fa85301f914704d8ba3671176a Mon Sep 17 00:00:00 2001 From: Jorgen T Date: Mon, 25 Sep 2023 17:19:13 +0200 Subject: [PATCH 061/129] Fixed indentation in cudacpp_src.mk --- epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk b/epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk index 056f850c3a..9b9e62fb33 100644 --- a/epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk +++ b/epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk @@ -335,9 +335,9 @@ cleancuda: rm -rf build.cuda_* cleandir: - rm -f ./*.o ./*.exe + rm -f ./*.o ./*.exe rm -f ../lib/lib$(MG5AMC_COMMONLIB).so - rm -f ../lib/.build.* - rm -f ./.build.* + rm -f ../lib/.build.* + rm -f ./.build.* #------------------------------------------------------------------------------- From 7511431cee27b1a225163febf259e12ea64e7750 Mon Sep 17 00:00:00 2001 From: Jorgen T Date: Mon, 25 Sep 2023 17:30:28 +0200 Subject: [PATCH 062/129] gCheck and check are now to seperate targets for use in CI --- epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk index f4279cb898..8865a3de99 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk @@ -731,6 +731,8 @@ cpp512y: $(cxx_main) cpp512z: $(cxx_main) +cuda: $(cu_main) + ifeq ($(UNAME_P),ppc64le) ###avxall: $(INCDIR)/fbridge.inc avxnone avxsse4 cppall: cppnone cppsse4 @@ -742,12 +744,6 @@ else cppall: cppnone cppsse4 cppavx2 cpp512y cpp512z endif -# -# CUDA Target -# - -cuda: $(cu_main) - #------------------------------------------------------------------------------- # Target: clean the builds @@ -870,10 +866,10 @@ endif #------------------------------------------------------------------------------- -# Target: check (run the C++ test executable) +# Target: check/gcheck (run the C++ test executable) # [NB THIS IS WHAT IS USED IN THE GITHUB CI!] check: runTest cmpFcheck -gcheck: runTest cmpFcheck cmpFGcheck +gcheck: runTest cmpFGcheck # Target: runTest (run the C++ test executable runTest.exe) runTest: all.$(TAG) From 328c921166e77eacc61954008d13ffc7e92e013c Mon Sep 17 00:00:00 2001 From: Jorgen T Date: Tue, 26 Sep 2023 09:17:29 +0200 Subject: [PATCH 063/129] NVCC now gets properly configured when doing various tests --- epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk index 8865a3de99..e599d65c76 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk @@ -113,7 +113,7 @@ endif #=== Configure the CUDA compiler for the CUDA target -ifeq ($(MAKECMDGOALS),cuda) +ifneq (,$(findstring $(MAKECMDGOALS),cuda-gcheck-runGcheck-runFGcheck-cmpFGcheck-memcheck)) # If CXX is not a single word (example "clang++ --gcc-toolchain...") then disable CUDA builds (issue #505) # This is because it is impossible to pass this to "CUFLAGS += -ccbin " below ifneq ($(words $(subst ccache ,,$(CXX))),1) # allow at most "CXX=ccache " from outside From df045977ca0400a1e9f1938f6cdaac2b929a2f18 Mon Sep 17 00:00:00 2001 From: Jorgen T Date: Wed, 27 Sep 2023 15:10:39 +0200 Subject: [PATCH 064/129] Removed the creation of lockfiles --- .../cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk | 23 +++++--------- .../cudacpp/gg_tt.mad/SubProcesses/makefile | 6 ---- epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk | 30 +++++-------------- 3 files changed, 14 insertions(+), 45 deletions(-) diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk index e599d65c76..f500cd0032 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk @@ -458,9 +458,9 @@ endif testmain=$(BUILDDIR)/runTest.exe ifneq ($(GTESTLIBS),) -all.$(TAG): $(BUILDDIR)/.build.$(TAG) $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_main) $(cxx_main) $(fcu_main) $(fcxx_main) $(testmain) +all.$(TAG): $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_main) $(cxx_main) $(fcu_main) $(fcxx_main) $(testmain) else -all.$(TAG): $(BUILDDIR)/.build.$(TAG) $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_main) $(cxx_main) $(fcu_main) $(fcxx_main) +all.$(TAG): $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_main) $(cxx_main) $(fcu_main) $(fcxx_main) endif # Target (and build options): debug @@ -470,27 +470,20 @@ debug: CUOPTFLAGS = -G debug: MAKEDEBUG := debug debug: all.$(TAG) -# Target: tag-specific build lockfiles -override oldtagsb=`if [ -d $(BUILDDIR) ]; then find $(BUILDDIR) -maxdepth 1 -name '.build.*' ! -name '.build.$(TAG)' -exec echo $(shell pwd)/{} \; ; fi` -$(BUILDDIR)/.build.$(TAG): - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - @if [ "$(oldtagsb)" != "" ]; then echo "Cannot build for tag=$(TAG) as old builds exist for other tags:"; echo " $(oldtagsb)"; echo "Please run 'make clean' first\nIf 'make clean' is not enough: run 'make clean USEBUILDDIR=1 AVX=$(AVX) FPTYPE=$(FPTYPE)' or 'make cleanall'"; exit 1; fi - @touch $(BUILDDIR)/.build.$(TAG) - # Generic target and build rules: objects from CUDA compilation ifneq ($(NVCC),) -$(BUILDDIR)/%.o : %.cu *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) +$(BUILDDIR)/%.o : %.cu *.h ../../src/*.h @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c $< -o $@ -$(BUILDDIR)/%_cu.o : %.cc *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) +$(BUILDDIR)/%_cu.o : %.cc *.h ../../src/*.h @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c -x cu $< -o $@ endif # Generic target and build rules: objects from C++ compilation # (NB do not include CUINC here! add it only for NVTX or curand #679) -$(BUILDDIR)/%.o : %.cc *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) +$(BUILDDIR)/%.o : %.cc *.h ../../src/*.h @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi $(CXX) $(CPPFLAGS) $(CXXFLAGS) -fPIC -c $< -o $@ @@ -542,7 +535,7 @@ endif # Target (and build rules): common (src) library commonlib : $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so -$(LIBDIR)/lib$(MG5AMC_COMMONLIB).so: ../../src/*.h ../../src/*.cc $(BUILDDIR)/.build.$(TAG) +$(LIBDIR)/lib$(MG5AMC_COMMONLIB).so: ../../src/*.h ../../src/*.cc $(MAKE) -C ../../src $(MAKEDEBUG) -f $(CUDACPP_SRC_MAKEFILE) #------------------------------------------------------------------------------- @@ -770,11 +763,10 @@ endif cleanall: @echo - rm -f $(BUILDDIR)/.build.* $(BUILDDIR)/*.o $(BUILDDIR)/*.exe + rm -f $(BUILDDIR)/*.o $(BUILDDIR)/*.exe rm -f $(LIBDIR)/lib$(MG5AMC_CXXLIB).so $(LIBDIR)/lib$(MG5AMC_CULIB).so @echo $(MAKE) -C ../../src cleanall -f $(CUDACPP_SRC_MAKEFILE) - rm -rf build.* # Target: clean the builds as well as the gtest installation(s) distclean: cleanall @@ -817,7 +809,6 @@ cleancuda: cleandir: rm -f ./*.o ./*.exe rm -f ../../lib/lib$(MG5AMC_CXXLIB).so ../../lib/lib$(MG5AMC_CULIB).so - rm -f ./.build.* $(MAKE) -C ../../src cleandir -f $(CUDACPP_SRC_MAKEFILE) #------------------------------------------------------------------------------- diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile index 44cf2d7b1b..d9f0f5d09c 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile @@ -271,27 +271,21 @@ ALL: cppnone: $(MAKE) -f $(CUDACPP_MAKEFILE) cppnone - touch $(CUDACPP_BUILDDIR)/.cppnonelibs cppsse4: $(MAKE) -f $(CUDACPP_MAKEFILE) cppsse4 - touch $(CUDACPP_BUILDDIR)/.cppsse4libs cppavx2: $(MAKE) -f $(CUDACPP_MAKEFILE) cppavx2 - touch $(CUDACPP_BUILDDIR)/.cppavx2libs cpp512y: $(MAKE) -f $(CUDACPP_MAKEFILE) cpp512y - touch $(CUDACPP_BUILDDIR)/.cpp512ylibs cpp512z: $(MAKE) -f $(CUDACPP_MAKEFILE) cpp512z - touch $(CUDACPP_BUILDDIR)/.cpp512zlibs cuda: $(MAKE) -f $(CUDACPP_MAKEFILE) cuda - touch $(CUDACPP_BUILDDIR)/.cudalibs # Clean (NB: 'make clean' in Source calls 'make clean' in all P*) diff --git a/epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk b/epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk index 9b9e62fb33..42fa1b1fd7 100644 --- a/epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk +++ b/epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk @@ -226,35 +226,21 @@ endif MG5AMC_COMMONLIB = mg5amc_common # First target (default goal) -all.$(TAG): $(BUILDDIR)/.build.$(TAG) $(LIBDIR)/.build.$(TAG) $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so +all.$(TAG): $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so # Target (and build options): debug debug: OPTFLAGS = -g -O0 debug: all.$(TAG) -# Target: tag-specific build lockfiles -override oldtagsb=`if [ -d $(BUILDDIR) ]; then find $(BUILDDIR) -maxdepth 1 -name '.build.*' ! -name '.build.$(TAG)' -exec echo $(shell pwd)/{} \; ; fi` -override oldtagsl=`if [ -d $(LIBDIR) ]; then find $(LIBDIR) -maxdepth 1 -name '.build.*' ! -name '.build.$(TAG)' -exec echo $(shell pwd)/{} \; ; fi` - -$(BUILDDIR)/.build.$(TAG): $(LIBDIR)/.build.$(TAG) - -$(LIBDIR)/.build.$(TAG): - @if [ "$(oldtagsl)" != "" ]; then echo -e "Cannot build for tag=$(TAG) as old builds exist in $(LIBDIR) for other tags:\n$(oldtagsl)\nPlease run 'make clean' first\nIf 'make clean' is not enough: run 'make clean USEBUILDDIR=1 AVX=$(AVX) FPTYPE=$(FPTYPE)' or 'make cleanall'"; exit 1; fi - @if [ "$(oldtagsb)" != "" ]; then echo -e "Cannot build for tag=$(TAG) as old builds exist in $(BUILDDIR) for other tags:\n$(oldtagsb)\nPlease run 'make clean' first\nIf 'make clean' is not enough: run 'make clean USEBUILDDIR=1 AVX=$(AVX) FPTYPE=$(FPTYPE)' or 'make cleanall'"; exit 1; fi - @if [ ! -d $(LIBDIR) ]; then echo "mkdir -p $(LIBDIR)"; mkdir -p $(LIBDIR); fi - @touch $(LIBDIR)/.build.$(TAG) - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - @touch $(BUILDDIR)/.build.$(TAG) - #------------------------------------------------------------------------------- # Generic target and build rules: objects from C++ compilation -$(BUILDDIR)/%.o : %.cc *.h $(BUILDDIR)/.build.$(TAG) +$(BUILDDIR)/%.o : %.cc *.h @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi $(CXX) $(CPPFLAGS) $(CXXFLAGS) -fPIC -c $< -o $@ # Generic target and build rules: objects from CUDA compilation -$(BUILDDIR)/%_cu.o : %.cc *.h $(BUILDDIR)/.build.$(TAG) +$(BUILDDIR)/%_cu.o : %.cc *.h @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c -x cu $< -o $@ @@ -296,14 +282,14 @@ else $(error Multiple src BUILDDIR's found! Use 'cleannone', 'cleansse4', 'cleanavx2', 'clean512y','clean512z', 'cleancuda' or 'cleanall'.) endif else - rm -f ../lib/.build.* ../lib/lib$(MG5AMC_COMMONLIB).so - rm -f $(BUILDDIR)/.build.* $(BUILDDIR)/*.o $(BUILDDIR)/*.exe + rm -f ../lib/lib$(MG5AMC_COMMONLIB).so + rm -f $(BUILDDIR)/*.o $(BUILDDIR)/*.exe endif cleanall: @echo - rm -f ../lib/.build.* ../lib/lib$(MG5AMC_COMMONLIB).so - rm -f $(BUILDDIR)/.build.* $(BUILDDIR)/*.o $(BUILDDIR)/*.exe + rm -f ../lib/lib$(MG5AMC_COMMONLIB).so + rm -f $(BUILDDIR)/*.o $(BUILDDIR)/*.exe @echo rm -rf ../lib/build.* rm -rf build.* @@ -337,7 +323,5 @@ cleancuda: cleandir: rm -f ./*.o ./*.exe rm -f ../lib/lib$(MG5AMC_COMMONLIB).so - rm -f ../lib/.build.* - rm -f ./.build.* #------------------------------------------------------------------------------- From 51828efe25c0c62074e60f3c3c3d149783e3ce57 Mon Sep 17 00:00:00 2001 From: Jorgen T Date: Wed, 27 Sep 2023 17:13:57 +0200 Subject: [PATCH 065/129] Added cpp target for testing --- epochX/cudacpp/gg_tt.mad/SubProcesses/makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile index d9f0f5d09c..36a1e90b59 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile @@ -144,12 +144,17 @@ else override LIBFLAGSRPATH = -Wl,-rpath,'$$ORIGIN/$(LIBDIR)' endif -.PHONY: madevent_fortran_link madevent_cuda_link madevent_cppnone_link madevent_cppsse4_link madevent_cppavx2_link madevent_cpp512y_link madevent_cpp512z_link +.PHONY: madevent_fortran_link madevent_cuda_link madevent_cpp_link madevent_cppnone_link madevent_cppsse4_link madevent_cppavx2_link madevent_cpp512y_link madevent_cpp512z_link madevent_fortran_link: $(PROG)_fortran rm -f $(PROG) ln -s $(PROG)_fortran $(PROG) +# Only used for testing, should be removed in the future +madevent_cpp_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp cppavx2 + rm -f $(PROG) + ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) + madevent_cppnone_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp cppnone rm -f $(PROG) ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) From aace762f542a3e03ee45a2360eb3dd1024fa594f Mon Sep 17 00:00:00 2001 From: Jorgen T Date: Wed, 27 Sep 2023 17:38:46 +0200 Subject: [PATCH 066/129] [CODEGEN] Ported changes in gg_tt.mad to codegen --- .../iolibs/template_files/gpu/cudacpp.mk | 393 ++++++++++-------- .../iolibs/template_files/gpu/cudacpp_src.mk | 171 +++++--- 2 files changed, 319 insertions(+), 245 deletions(-) diff --git a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/cudacpp.mk b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/cudacpp.mk index 49a5856085..8b2f12aabc 100644 --- a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/cudacpp.mk +++ b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/cudacpp.mk @@ -1,7 +1,7 @@ # Copyright (C) 2020-2023 CERN and UCLouvain. # Licensed under the GNU Lesser General Public License (version 3 or later). # Created by: S. Roiser (Feb 2020) for the MG5aMC CUDACPP plugin. -# Further modified by: O. Mattelaer, S. Roiser, A. Valassi (2020-2023) for the MG5aMC CUDACPP plugin. +# Further modified by: J. Teig, O. Mattelaer, S. Roiser, A. Valassi (2020-2023) for the MG5aMC CUDACPP plugin. #=== Determine the name of this makefile (https://ftp.gnu.org/old-gnu/Manuals/make-3.80/html_node/make_17.html) #=== NB: different names (e.g. cudacpp.mk and cudacpp_src.mk) are used in the Subprocess and src directories @@ -27,7 +27,6 @@ UNAME_S := $(shell uname -s) UNAME_P := $(shell uname -p) ###$(info UNAME_P='$(UNAME_P)') -include ../../Source/make_opts #------------------------------------------------------------------------------- #=== Configure common compiler flags for C++ and CUDA @@ -87,6 +86,14 @@ endif #------------------------------------------------------------------------------- +.DEFAULT_GOAL := usage + +# Target if user does not specify target +usage: + $(error Unknown target='$(MAKECMDGOALS)': only 'cppnone', 'cppsse4', 'cppavx2', 'cpp512y', 'cpp512z' and 'cuda' are supported!) + +#------------------------------------------------------------------------------- + #=== Configure the C++ compiler CXXFLAGS = $(OPTFLAGS) -std=c++17 $(INCFLAGS) -Wall -Wshadow -Wextra @@ -104,70 +111,73 @@ endif #------------------------------------------------------------------------------- -#=== Configure the CUDA compiler - -# If CXX is not a single word (example "clang++ --gcc-toolchain...") then disable CUDA builds (issue #505) -# This is because it is impossible to pass this to "CUFLAGS += -ccbin " below -ifneq ($(words $(subst ccache ,,$(CXX))),1) # allow at most "CXX=ccache " from outside - $(warning CUDA builds are not supported for multi-word CXX "$(CXX)") - override CUDA_HOME=disabled -endif - -# If CUDA_HOME is not set, try to set it from the location of nvcc -ifndef CUDA_HOME - CUDA_HOME = $(patsubst %%bin/nvcc,%%,$(shell which nvcc 2>/dev/null)) - $(warning CUDA_HOME was not set: using "$(CUDA_HOME)") -endif - -# Set NVCC as $(CUDA_HOME)/bin/nvcc if it exists -ifneq ($(wildcard $(CUDA_HOME)/bin/nvcc),) - NVCC = $(CUDA_HOME)/bin/nvcc - USE_NVTX ?=-DUSE_NVTX - # See https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html - # See https://arnon.dk/matching-sm-architectures-arch-and-gencode-for-various-nvidia-cards/ - # Default: use compute capability 70 for V100 (CERN lxbatch, CERN itscrd, Juwels Cluster). - # Embed device code for 70, and PTX for 70+. - # Export MADGRAPH_CUDA_ARCHITECTURE (comma-separated list) to use another value or list of values (see #533). - # Examples: use 60 for P100 (Piz Daint), 80 for A100 (Juwels Booster, NVidia raplab/Curiosity). - MADGRAPH_CUDA_ARCHITECTURE ?= 70 - ###CUARCHFLAGS = -gencode arch=compute_$(MADGRAPH_CUDA_ARCHITECTURE),code=compute_$(MADGRAPH_CUDA_ARCHITECTURE) -gencode arch=compute_$(MADGRAPH_CUDA_ARCHITECTURE),code=sm_$(MADGRAPH_CUDA_ARCHITECTURE) # Older implementation (AV): go back to this one for multi-GPU support #533 - ###CUARCHFLAGS = --gpu-architecture=compute_$(MADGRAPH_CUDA_ARCHITECTURE) --gpu-code=sm_$(MADGRAPH_CUDA_ARCHITECTURE),compute_$(MADGRAPH_CUDA_ARCHITECTURE) # Newer implementation (SH): cannot use this as-is for multi-GPU support #533 - comma:=, - CUARCHFLAGS = $(foreach arch,$(subst $(comma), ,$(MADGRAPH_CUDA_ARCHITECTURE)),-gencode arch=compute_$(arch),code=compute_$(arch) -gencode arch=compute_$(arch),code=sm_$(arch)) - CUINC = -I$(CUDA_HOME)/include/ - CURANDLIBFLAGS = -L$(CUDA_HOME)/lib64/ -lcurand # NB: -lcuda is not needed here! - CUOPTFLAGS = -lineinfo - CUFLAGS = $(foreach opt, $(OPTFLAGS), -Xcompiler $(opt)) $(CUOPTFLAGS) $(INCFLAGS) $(CUINC) $(USE_NVTX) $(CUARCHFLAGS) -use_fast_math - ###CUFLAGS += -Xcompiler -Wall -Xcompiler -Wextra -Xcompiler -Wshadow - ###NVCC_VERSION = $(shell $(NVCC) --version | grep 'Cuda compilation tools' | cut -d' ' -f5 | cut -d, -f1) - CUFLAGS += -std=c++17 # need CUDA >= 11.2 (see #333): this is enforced in mgOnGpuConfig.h - # Without -maxrregcount: baseline throughput: 6.5E8 (16384 32 12) up to 7.3E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 160 # improves throughput: 6.9E8 (16384 32 12) up to 7.7E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 128 # improves throughput: 7.3E8 (16384 32 12) up to 7.6E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 96 # degrades throughput: 4.1E8 (16384 32 12) up to 4.5E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 64 # degrades throughput: 1.7E8 (16384 32 12) flat at 1.7E8 (65536 128 12) -else ifneq ($(origin REQUIRE_CUDA),undefined) - # If REQUIRE_CUDA is set but no cuda is found, stop here (e.g. for CI tests on GPU #443) - $(error No cuda installation found (set CUDA_HOME or make nvcc visible in PATH)) -else - # No cuda. Switch cuda compilation off and go to common random numbers in C++ - $(warning CUDA_HOME is not set or is invalid: export CUDA_HOME to compile with cuda) - override NVCC= - override USE_NVTX= - override CUINC= - override CURANDLIBFLAGS= -endif -export NVCC -export CUFLAGS +#=== Configure the CUDA compiler for the CUDA target -# Set the host C++ compiler for nvcc via "-ccbin " -# (NB issue #505: this must be a single word, "clang++ --gcc-toolchain..." is not supported) -CUFLAGS += -ccbin $(shell which $(subst ccache ,,$(CXX))) +ifneq (,$(findstring $(MAKECMDGOALS),cuda-gcheck-runGcheck-runFGcheck-cmpFGcheck-memcheck)) + # If CXX is not a single word (example "clang++ --gcc-toolchain...") then disable CUDA builds (issue #505) + # This is because it is impossible to pass this to "CUFLAGS += -ccbin " below + ifneq ($(words $(subst ccache ,,$(CXX))),1) # allow at most "CXX=ccache " from outside + $(warning CUDA builds are not supported for multi-word CXX "$(CXX)") + override CUDA_HOME=disabled + endif -# Allow newer (unsupported) C++ compilers with older versions of CUDA if ALLOW_UNSUPPORTED_COMPILER_IN_CUDA is set (#504) -ifneq ($(origin ALLOW_UNSUPPORTED_COMPILER_IN_CUDA),undefined) -CUFLAGS += -allow-unsupported-compiler -endif + # If CUDA_HOME is not set, try to set it from the location of nvcc + ifndef CUDA_HOME + CUDA_HOME = $(patsubst %%bin/nvcc,%%,$(shell which nvcc 2>/dev/null)) + $(warning CUDA_HOME was not set: using "$(CUDA_HOME)") + endif + + # Set NVCC as $(CUDA_HOME)/bin/nvcc if it exists + ifneq ($(wildcard $(CUDA_HOME)/bin/nvcc),) + NVCC = $(CUDA_HOME)/bin/nvcc + USE_NVTX ?=-DUSE_NVTX + # See https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html + # See https://arnon.dk/matching-sm-architectures-arch-and-gencode-for-various-nvidia-cards/ + # Default: use compute capability 70 for V100 (CERN lxbatch, CERN itscrd, Juwels Cluster). + # Embed device code for 70, and PTX for 70+. + # Export MADGRAPH_CUDA_ARCHITECTURE (comma-separated list) to use another value or list of values (see #533). + # Examples: use 60 for P100 (Piz Daint), 80 for A100 (Juwels Booster, NVidia raplab/Curiosity). + MADGRAPH_CUDA_ARCHITECTURE ?= 70 + ###CUARCHFLAGS = -gencode arch=compute_$(MADGRAPH_CUDA_ARCHITECTURE),code=compute_$(MADGRAPH_CUDA_ARCHITECTURE) -gencode arch=compute_$(MADGRAPH_CUDA_ARCHITECTURE),code=sm_$(MADGRAPH_CUDA_ARCHITECTURE) # Older implementation (AV): go back to this one for multi-GPU support #533 + ###CUARCHFLAGS = --gpu-architecture=compute_$(MADGRAPH_CUDA_ARCHITECTURE) --gpu-code=sm_$(MADGRAPH_CUDA_ARCHITECTURE),compute_$(MADGRAPH_CUDA_ARCHITECTURE) # Newer implementation (SH): cannot use this as-is for multi-GPU support #533 + comma:=, + CUARCHFLAGS = $(foreach arch,$(subst $(comma), ,$(MADGRAPH_CUDA_ARCHITECTURE)),-gencode arch=compute_$(arch),code=compute_$(arch) -gencode arch=compute_$(arch),code=sm_$(arch)) + CUINC = -I$(CUDA_HOME)/include/ + CURANDLIBFLAGS = -L$(CUDA_HOME)/lib64/ -lcurand # NB: -lcuda is not needed here! + CUOPTFLAGS = -lineinfo + CUFLAGS = $(foreach opt, $(OPTFLAGS), -Xcompiler $(opt)) $(CUOPTFLAGS) $(INCFLAGS) $(CUINC) $(USE_NVTX) $(CUARCHFLAGS) -use_fast_math + ###CUFLAGS += -Xcompiler -Wall -Xcompiler -Wextra -Xcompiler -Wshadow + ###NVCC_VERSION = $(shell $(NVCC) --version | grep 'Cuda compilation tools' | cut -d' ' -f5 | cut -d, -f1) + CUFLAGS += -std=c++17 # need CUDA >= 11.2 (see #333): this is enforced in mgOnGpuConfig.h + # Without -maxrregcount: baseline throughput: 6.5E8 (16384 32 12) up to 7.3E8 (65536 128 12) + ###CUFLAGS+= --maxrregcount 160 # improves throughput: 6.9E8 (16384 32 12) up to 7.7E8 (65536 128 12) + ###CUFLAGS+= --maxrregcount 128 # improves throughput: 7.3E8 (16384 32 12) up to 7.6E8 (65536 128 12) + ###CUFLAGS+= --maxrregcount 96 # degrades throughput: 4.1E8 (16384 32 12) up to 4.5E8 (65536 128 12) + ###CUFLAGS+= --maxrregcount 64 # degrades throughput: 1.7E8 (16384 32 12) flat at 1.7E8 (65536 128 12) + else ifneq ($(origin REQUIRE_CUDA),undefined) + # If REQUIRE_CUDA is set but no cuda is found, stop here (e.g. for CI tests on GPU #443) + $(error No cuda installation found (set CUDA_HOME or make nvcc visible in PATH)) + else + # No cuda. Switch cuda compilation off and go to common random numbers in C++ + $(warning CUDA_HOME is not set or is invalid: export CUDA_HOME to compile with cuda) + override NVCC= + override USE_NVTX= + override CUINC= + override CURANDLIBFLAGS= + endif + export NVCC + export CUFLAGS + + # Set the host C++ compiler for nvcc via "-ccbin " + # (NB issue #505: this must be a single word, "clang++ --gcc-toolchain..." is not supported) + CUFLAGS += -ccbin $(shell which $(subst ccache ,,$(CXX))) + + # Allow newer (unsupported) C++ compilers with older versions of CUDA if ALLOW_UNSUPPORTED_COMPILER_IN_CUDA is set (#504) + ifneq ($(origin ALLOW_UNSUPPORTED_COMPILER_IN_CUDA),undefined) + CUFLAGS += -allow-unsupported-compiler + endif + +endif # ($(MAKECMDGOALS),cuda) #------------------------------------------------------------------------------- @@ -221,38 +231,12 @@ else ifneq ($(shell $(CXX) --version | egrep '^(clang)'),) override OMPFLAGS = -fopenmp ###override OMPFLAGS = # disable OpenMP MT on clang (was not ok without or with nvcc before #578) else ifneq ($(shell $(CXX) --version | egrep '^(Apple clang)'),) -override OMPFLAGS = -fopenmp # disable OpenMP MT on Apple clang (builds fail in the CI #578) +override OMPFLAGS = # disable OpenMP MT on Apple clang (builds fail in the CI #578) else override OMPFLAGS = -fopenmp ###override OMPFLAGS = # disable OpenMP MT (default before #575) endif -# Set the default AVX (vectorization) choice -ifeq ($(AVX),) - ifeq ($(UNAME_P),ppc64le) - ###override AVX = none - override AVX = sse4 - else ifeq ($(UNAME_P),arm) - ###override AVX = none - override AVX = sse4 - else ifeq ($(wildcard /proc/cpuinfo),) - override AVX = none - $(warning Using AVX='$(AVX)' because host SIMD features cannot be read from /proc/cpuinfo) - else ifeq ($(shell grep -m1 -c avx512vl /proc/cpuinfo)$(shell $(CXX) --version | grep ^clang),1) - override AVX = 512y - ###$(info Using AVX='$(AVX)' as no user input exists) - else - override AVX = avx2 - ifneq ($(shell grep -m1 -c avx512vl /proc/cpuinfo),1) - $(warning Using AVX='$(AVX)' because host does not support avx512vl) - else - $(warning Using AVX='$(AVX)' because this is faster than avx512vl for clang) - endif - endif -else - ###$(info Using AVX='$(AVX)' according to user input) -endif - # Set the default FPTYPE (floating point type) choice ifeq ($(FPTYPE),) override FPTYPE = d @@ -277,6 +261,21 @@ ifeq ($(RNDGEN),) endif endif +# set the correct AVX based on avxcpp target +ifeq ($(MAKECMDGOALS),cppnone) # no SIMD + override AVX = none +else ifeq ($(MAKECMDGOALS),cppsse4) # SSE4.2 with 128 width (xmm registers) + override AVX = sse4 +else ifeq ($(MAKECMDGOALS),cppavx2) # AVX2 with 256 width (ymm registers) [DEFAULT for clang] + override AVX = avx2 +else ifeq ($(MAKECMDGOALS),cpp512y) # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] + override AVX = 512y +else ifeq ($(MAKECMDGOALS),cpp512z) # AVX512 with 512 width (zmm registers) + override AVX = 512z +else + override AVX = none +endif + # Export AVX, FPTYPE, HELINL, HRDCOD, RNDGEN, OMPFLAGS so that it is not necessary to pass them to the src Makefile too export AVX export FPTYPE @@ -296,50 +295,52 @@ CXXFLAGS += $(OMPFLAGS) # Set the build flags appropriate to each AVX choice (example: "make AVX=none") # [NB MGONGPU_PVW512 is needed because "-mprefer-vector-width=256" is not exposed in a macro] # [See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96476] -$(info AVX=$(AVX)) -ifeq ($(UNAME_P),ppc64le) - ifeq ($(AVX),sse4) - override AVXFLAGS = -D__SSE4_2__ # Power9 VSX with 128 width (VSR registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on PowerPC for the moment) - endif -else ifeq ($(UNAME_P),arm) - ifeq ($(AVX),sse4) - override AVXFLAGS = -D__SSE4_2__ # ARM NEON with 128 width (Q/quadword registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on ARM for the moment) - endif -else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 - ifeq ($(AVX),none) - override AVXFLAGS = -mno-sse3 # no SIMD - else ifeq ($(AVX),sse4) - override AVXFLAGS = -mno-avx # SSE4.2 with 128 width (xmm registers) - else ifeq ($(AVX),avx2) - override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(AVX),512y) - override AVXFLAGS = -march=skylake -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(AVX),512z) - override AVXFLAGS = -march=skylake -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) - else - $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) - endif -else - ifeq ($(AVX),none) - override AVXFLAGS = -march=x86-64 # no SIMD (see #588) - else ifeq ($(AVX),sse4) - override AVXFLAGS = -march=nehalem # SSE4.2 with 128 width (xmm registers) - else ifeq ($(AVX),avx2) - override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(AVX),512y) - override AVXFLAGS = -march=skylake-avx512 -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(AVX),512z) - override AVXFLAGS = -march=skylake-avx512 -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) +ifeq ($(findstring cpp,$(MAKECMDGOALS)),cpp) + $(info AVX=$(AVX)) + ifeq ($(UNAME_P),ppc64le) + ifeq ($(AVX),sse4) + override AVXFLAGS = -D__SSE4_2__ # Power9 VSX with 128 width (VSR registers) + else ifneq ($(AVX),none) + $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on PowerPC for the moment) + endif + else ifeq ($(UNAME_P),arm) + ifeq ($(AVX),sse4) + override AVXFLAGS = -D__SSE4_2__ # ARM NEON with 128 width (Q/quadword registers) + else ifneq ($(AVX),none) + $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on ARM for the moment) + endif + else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 + ifeq ($(AVX),none) + override AVXFLAGS = -mno-sse3 # no SIMD + else ifeq ($(AVX),sse4) + override AVXFLAGS = -mno-avx # SSE4.2 with 128 width (xmm registers) + else ifeq ($(AVX),avx2) + override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] + else ifeq ($(AVX),512y) + override AVXFLAGS = -march=skylake -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] + else ifeq ($(AVX),512z) + override AVXFLAGS = -march=skylake -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) + else + $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) + endif else - $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) + ifeq ($(AVX),none) + override AVXFLAGS = -march=x86-64 # no SIMD (see #588) + else ifeq ($(AVX),sse4) + override AVXFLAGS = -march=nehalem # SSE4.2 with 128 width (xmm registers) + else ifeq ($(AVX),avx2) + override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] + else ifeq ($(AVX),512y) + override AVXFLAGS = -march=skylake-avx512 -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] + else ifeq ($(AVX),512z) + override AVXFLAGS = -march=skylake-avx512 -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) + else + $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) + endif endif + # For the moment, use AVXFLAGS everywhere: eventually, use them only in encapsulated implementations? + CXXFLAGS+= $(AVXFLAGS) endif -# For the moment, use AVXFLAGS everywhere: eventually, use them only in encapsulated implementations? -CXXFLAGS+= $(AVXFLAGS) # Set the build flags appropriate to each FPTYPE choice (example: "make FPTYPE=f") $(info FPTYPE=$(FPTYPE)) @@ -390,11 +391,19 @@ endif # Build directory "short" tag (defines target and path to the optional build directory) # (Rationale: keep directory names shorter, e.g. do not include random number generator choice) -override DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) +ifneq ($(NVCC),) + override DIRTAG = cuda_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) +else + override DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) +endif # Build lockfile "full" tag (defines full specification of build options that cannot be intermixed) # (Rationale: avoid mixing of CUDA and no-CUDA environment builds with different random number generators) -override TAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) +ifneq ($(NVCC),) + override TAG = cuda_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) +else + override TAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) +endif # Build directory: current directory by default, or build.$(DIRTAG) if USEBUILDDIR==1 ifeq ($(USEBUILDDIR),1) @@ -449,9 +458,9 @@ endif testmain=$(BUILDDIR)/runTest.exe ifneq ($(GTESTLIBS),) -all.$(TAG): $(BUILDDIR)/.build.$(TAG) $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_main) $(cxx_main) $(fcu_main) $(fcxx_main) $(testmain) +all.$(TAG): $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_main) $(cxx_main) $(fcu_main) $(fcxx_main) $(testmain) else -all.$(TAG): $(BUILDDIR)/.build.$(TAG) $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_main) $(cxx_main) $(fcu_main) $(fcxx_main) +all.$(TAG): $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_main) $(cxx_main) $(fcu_main) $(fcxx_main) endif # Target (and build options): debug @@ -461,27 +470,20 @@ debug: CUOPTFLAGS = -G debug: MAKEDEBUG := debug debug: all.$(TAG) -# Target: tag-specific build lockfiles -override oldtagsb=`if [ -d $(BUILDDIR) ]; then find $(BUILDDIR) -maxdepth 1 -name '.build.*' ! -name '.build.$(TAG)' -exec echo $(shell pwd)/{} \; ; fi` -$(BUILDDIR)/.build.$(TAG): - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - @if [ "$(oldtagsb)" != "" ]; then echo "Cannot build for tag=$(TAG) as old builds exist for other tags:"; echo " $(oldtagsb)"; echo "Please run 'make clean' first\nIf 'make clean' is not enough: run 'make clean USEBUILDDIR=1 AVX=$(AVX) FPTYPE=$(FPTYPE)' or 'make cleanall'"; exit 1; fi - @touch $(BUILDDIR)/.build.$(TAG) - # Generic target and build rules: objects from CUDA compilation ifneq ($(NVCC),) -$(BUILDDIR)/%%.o : %%.cu *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) +$(BUILDDIR)/%%.o : %%.cu *.h ../../src/*.h @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c $< -o $@ -$(BUILDDIR)/%%_cu.o : %%.cc *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) +$(BUILDDIR)/%%_cu.o : %%.cc *.h ../../src/*.h @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c -x cu $< -o $@ endif # Generic target and build rules: objects from C++ compilation # (NB do not include CUINC here! add it only for NVTX or curand #679) -$(BUILDDIR)/%%.o : %%.cc *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) +$(BUILDDIR)/%%.o : %%.cc *.h ../../src/*.h @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi $(CXX) $(CPPFLAGS) $(CXXFLAGS) -fPIC -c $< -o $@ @@ -533,7 +535,7 @@ endif # Target (and build rules): common (src) library commonlib : $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so -$(LIBDIR)/lib$(MG5AMC_COMMONLIB).so: ../../src/*.h ../../src/*.cc $(BUILDDIR)/.build.$(TAG) +$(LIBDIR)/lib$(MG5AMC_COMMONLIB).so: ../../src/*.h ../../src/*.cc $(MAKE) -C ../../src $(MAKEDEBUG) -f $(CUDACPP_SRC_MAKEFILE) #------------------------------------------------------------------------------- @@ -555,7 +557,7 @@ endif $(LIBDIR)/lib$(MG5AMC_CXXLIB).so: $(BUILDDIR)/fbridge.o $(LIBDIR)/lib$(MG5AMC_CXXLIB).so: cxx_objects_lib += $(BUILDDIR)/fbridge.o $(LIBDIR)/lib$(MG5AMC_CXXLIB).so: $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cxx_objects_lib) - $(CXX) -shared -o $@ $(cxx_objects_lib) $(CXXLIBFLAGSRPATH2) -L$(LIBDIR) -l$(MG5AMC_COMMONLIB) $(LIBFLAGS) -fopenmp + $(CXX) -shared -o $@ $(cxx_objects_lib) $(CXXLIBFLAGSRPATH2) -L$(LIBDIR) -l$(MG5AMC_COMMONLIB) ifneq ($(NVCC),) $(LIBDIR)/lib$(MG5AMC_CULIB).so: $(BUILDDIR)/fbridge_cu.o @@ -712,35 +714,27 @@ endif # Target: build all targets in all AVX modes (each AVX mode in a separate build directory) # Split the avxall target into five separate targets to allow parallel 'make -j avxall' builds # (Hack: add a fbridge.inc dependency to avxall, to ensure it is only copied once for all AVX modes) -avxnone: - @echo - $(MAKE) USEBUILDDIR=1 AVX=none -f $(CUDACPP_MAKEFILE) +cppnone: $(cxx_main) -avxsse4: - @echo - $(MAKE) USEBUILDDIR=1 AVX=sse4 -f $(CUDACPP_MAKEFILE) +cppsse4: $(cxx_main) -avxavx2: - @echo - $(MAKE) USEBUILDDIR=1 AVX=avx2 -f $(CUDACPP_MAKEFILE) +cppavx2: $(cxx_main) -avx512y: - @echo - $(MAKE) USEBUILDDIR=1 AVX=512y -f $(CUDACPP_MAKEFILE) +cpp512y: $(cxx_main) -avx512z: - @echo - $(MAKE) USEBUILDDIR=1 AVX=512z -f $(CUDACPP_MAKEFILE) +cpp512z: $(cxx_main) + +cuda: $(cu_main) ifeq ($(UNAME_P),ppc64le) ###avxall: $(INCDIR)/fbridge.inc avxnone avxsse4 -avxall: avxnone avxsse4 +cppall: cppnone cppsse4 else ifeq ($(UNAME_P),arm) ###avxall: $(INCDIR)/fbridge.inc avxnone avxsse4 -avxall: avxnone avxsse4 +cppall: cppnone cppsse4 else ###avxall: $(INCDIR)/fbridge.inc avxnone avxsse4 avxavx2 avx512y avx512z -avxall: avxnone avxsse4 avxavx2 avx512y avx512z +cppall: cppnone cppsse4 cppavx2 cpp512y cpp512z endif #------------------------------------------------------------------------------- @@ -748,22 +742,32 @@ endif # Target: clean the builds .PHONY: clean +BUILD_DIRS := $(wildcard build.*) +NUM_BUILD_DIRS := $(words $(BUILD_DIRS)) + clean: ifeq ($(USEBUILDDIR),1) - rm -rf $(BUILDDIR) +ifeq ($(NUM_BUILD_DIRS),1) + $(info USEBUILDDIR=1, Only one build directory found.) + rm -rf $(BUILD_DIRS) +else ifeq ($(NUM_BUILD_DIRS),0) + $(error USEBUILDDIR=1, but no build directories are found.) else - rm -f $(BUILDDIR)/.build.* $(BUILDDIR)/*.o $(BUILDDIR)/*.exe + $(error Multiple BUILDDIR's found! Use 'cleannone', 'cleansse4', 'cleanavx2', 'clean512y','clean512z', 'cleancuda' or 'cleanall'.) +endif +else + rm -f $(BUILDDIR)/*.o $(BUILDDIR)/*.exe rm -f $(LIBDIR)/lib$(MG5AMC_CXXLIB).so $(LIBDIR)/lib$(MG5AMC_CULIB).so endif $(MAKE) -C ../../src clean -f $(CUDACPP_SRC_MAKEFILE) -### rm -rf $(INCDIR) cleanall: @echo - $(MAKE) USEBUILDDIR=0 clean -f $(CUDACPP_MAKEFILE) + rm -f $(BUILDDIR)/*.o $(BUILDDIR)/*.exe + rm -f $(LIBDIR)/lib$(MG5AMC_CXXLIB).so $(LIBDIR)/lib$(MG5AMC_CULIB).so @echo - $(MAKE) USEBUILDDIR=0 -C ../../src cleanall -f $(CUDACPP_SRC_MAKEFILE) - rm -rf build.* + $(MAKE) -C ../../src cleanall -f $(CUDACPP_SRC_MAKEFILE) + rm -rf build.* # Target: clean the builds as well as the gtest installation(s) distclean: cleanall @@ -772,6 +776,42 @@ ifneq ($(wildcard $(TESTDIRCOMMON)),) endif $(MAKE) -C $(TESTDIRLOCAL) clean +# Target: clean different builds +cleannone: + rm -rf build.none_* + rm -f ../../lib/build.none_*/lib$(MG5AMC_CXXLIB).so + $(MAKE) -C ../../src cleannone -f $(CUDACPP_SRC_MAKEFILE) + +cleansse4: + rm -rf build.sse4_* + rm -f ../../lib/build.sse4_*/lib$(MG5AMC_CXXLIB).so + $(MAKE) -C ../../src cleansse4 -f $(CUDACPP_SRC_MAKEFILE) + +cleanavx2: + rm -rf build.avx2_* + rm -f ../../lib/build.avx2_*/lib$(MG5AMC_CXXLIB).so + $(MAKE) -C ../../src cleanavx2 -f $(CUDACPP_SRC_MAKEFILE) + +clean512y: + rm -rf build.512y_* + rm -f ../../lib/build.512y_*/lib$(MG5AMC_CXXLIB).so + $(MAKE) -C ../../src clean512y -f $(CUDACPP_SRC_MAKEFILE) + +clean512z: + rm -rf build.512z_* + rm -f ../../lib/build.512z_*/lib$(MG5AMC_CXXLIB).so + $(MAKE) -C ../../src clean512z -f $(CUDACPP_SRC_MAKEFILE) + +cleancuda: + rm -rf build.cuda_* + rm -f ../../lib/build.cuda_*/lib$(MG5AMC_CULIB).so + $(MAKE) -C ../../src cleancuda -f $(CUDACPP_SRC_MAKEFILE) + +cleandir: + rm -f ./*.o ./*.exe + rm -f ../../lib/lib$(MG5AMC_CXXLIB).so ../../lib/lib$(MG5AMC_CULIB).so + $(MAKE) -C ../../src cleandir -f $(CUDACPP_SRC_MAKEFILE) + #------------------------------------------------------------------------------- # Target: show system and compiler information @@ -818,13 +858,10 @@ endif #------------------------------------------------------------------------------- -# Target: check (run the C++ test executable) +# Target: check/gcheck (run the C++ test executable) # [NB THIS IS WHAT IS USED IN THE GITHUB CI!] -ifneq ($(NVCC),) -check: runTest cmpFcheck cmpFGcheck -else check: runTest cmpFcheck -endif +gcheck: runTest cmpFGcheck # Target: runTest (run the C++ test executable runTest.exe) runTest: all.$(TAG) @@ -864,4 +901,4 @@ cmpFGcheck: all.$(TAG) memcheck: all.$(TAG) $(RUNTIME) $(CUDA_HOME)/bin/cuda-memcheck --check-api-memory-access yes --check-deprecated-instr yes --check-device-heap yes --demangle full --language c --leak-check full --racecheck-report all --report-api-errors all --show-backtrace yes --tool memcheck --track-unused-memory yes $(BUILDDIR)/gcheck.exe -p 2 32 2 -#------------------------------------------------------------------------------- +#------------------------------------------------------------------------------- \ No newline at end of file diff --git a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/cudacpp_src.mk b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/cudacpp_src.mk index dac2e47d1d..3a24b15773 100644 --- a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/cudacpp_src.mk +++ b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/cudacpp_src.mk @@ -1,7 +1,7 @@ # Copyright (C) 2020-2023 CERN and UCLouvain. # Licensed under the GNU Lesser General Public License (version 3 or later). # Created by: S. Roiser (Feb 2020) for the MG5aMC CUDACPP plugin. -# Further modified by: O. Mattelaer, S. Roiser, A. Valassi (2020-2023) for the MG5aMC CUDACPP plugin. +# Further modified by: J. Teig, O. Mattelaer, S. Roiser, A. Valassi (2020-2023) for the MG5aMC CUDACPP plugin. #=== Determine the name of this makefile (https://ftp.gnu.org/old-gnu/Manuals/make-3.80/html_node/make_17.html) #=== NB: assume that the same name (e.g. cudacpp.mk, Makefile...) is used in the Subprocess and src directories @@ -88,50 +88,52 @@ CXXFLAGS += $(OMPFLAGS) # Set the build flags appropriate to each AVX choice (example: "make AVX=none") # [NB MGONGPU_PVW512 is needed because "-mprefer-vector-width=256" is not exposed in a macro] # [See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96476] -$(info AVX=$(AVX)) -ifeq ($(UNAME_P),ppc64le) - ifeq ($(AVX),sse4) - override AVXFLAGS = -D__SSE4_2__ # Power9 VSX with 128 width (VSR registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on PowerPC for the moment) - endif -else ifeq ($(UNAME_P),arm) - ifeq ($(AVX),sse4) - override AVXFLAGS = -D__SSE4_2__ # ARM NEON with 128 width (Q/quadword registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on ARM for the moment) - endif -else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 - ifeq ($(AVX),none) - override AVXFLAGS = -mno-sse3 # no SIMD - else ifeq ($(AVX),sse4) - override AVXFLAGS = -mno-avx # SSE4.2 with 128 width (xmm registers) - else ifeq ($(AVX),avx2) - override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(AVX),512y) - override AVXFLAGS = -march=skylake -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(AVX),512z) - override AVXFLAGS = -march=skylake -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) +ifeq ($(NVCC),) + $(info AVX=$(AVX)) + ifeq ($(UNAME_P),ppc64le) + ifeq ($(AVX),sse4) + override AVXFLAGS = -D__SSE4_2__ # Power9 VSX with 128 width (VSR registers) + else ifneq ($(AVX),none) + $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on PowerPC for the moment) + endif + else ifeq ($(UNAME_P),arm) + ifeq ($(AVX),sse4) + override AVXFLAGS = -D__SSE4_2__ # ARM NEON with 128 width (Q/quadword registers) + else ifneq ($(AVX),none) + $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on ARM for the moment) + endif + else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 + ifeq ($(AVX),none) + override AVXFLAGS = -mno-sse3 # no SIMD + else ifeq ($(AVX),sse4) + override AVXFLAGS = -mno-avx # SSE4.2 with 128 width (xmm registers) + else ifeq ($(AVX),avx2) + override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] + else ifeq ($(AVX),512y) + override AVXFLAGS = -march=skylake -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] + else ifeq ($(AVX),512z) + override AVXFLAGS = -march=skylake -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) + else + $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) + endif else - $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) - endif -else - ifeq ($(AVX),none) - override AVXFLAGS = -march=x86-64 # no SIMD (see #588) - else ifeq ($(AVX),sse4) - override AVXFLAGS = -march=nehalem # SSE4.2 with 128 width (xmm registers) - else ifeq ($(AVX),avx2) - override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(AVX),512y) - override AVXFLAGS = -march=skylake-avx512 -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(AVX),512z) - override AVXFLAGS = -march=skylake-avx512 -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) + ifeq ($(AVX),none) + override AVXFLAGS = -march=x86-64 # no SIMD (see #588) + else ifeq ($(AVX),sse4) + override AVXFLAGS = -march=nehalem # SSE4.2 with 128 width (xmm registers) + else ifeq ($(AVX),avx2) + override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] + else ifeq ($(AVX),512y) + override AVXFLAGS = -march=skylake-avx512 -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] + else ifeq ($(AVX),512z) + override AVXFLAGS = -march=skylake-avx512 -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) + else ifneq ($(AVX),none) + $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) + endif endif + # For the moment, use AVXFLAGS everywhere: eventually, use them only in encapsulated implementations? + CXXFLAGS+= $(AVXFLAGS) endif -# For the moment, use AVXFLAGS everywhere: eventually, use them only in encapsulated implementations? -CXXFLAGS+= $(AVXFLAGS) # Set the build flags appropriate to each FPTYPE choice (example: "make FPTYPE=f") ###$(info FPTYPE=$(FPTYPE)) @@ -175,11 +177,19 @@ endif # Build directory "short" tag (defines target and path to the optional build directory) # (Rationale: keep directory names shorter, e.g. do not include random number generator choice) -override DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) +ifneq ($(NVCC),) + override DIRTAG = cuda_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) +else + override DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) +endif # Build lockfile "full" tag (defines full specification of build options that cannot be intermixed) # (Rationale: avoid mixing of CUDA and no-CUDA environment builds with different random number generators) -override TAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) +ifneq ($(NVCC),) + override TAG = cuda_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) +else + override TAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) +endif # Build directory: current directory by default, or build.$(DIRTAG) if USEBUILDDIR==1 ###$(info Current directory is $(shell pwd)) @@ -216,35 +226,21 @@ endif MG5AMC_COMMONLIB = mg5amc_common # First target (default goal) -all.$(TAG): $(BUILDDIR)/.build.$(TAG) $(LIBDIR)/.build.$(TAG) $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so +all.$(TAG): $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so # Target (and build options): debug debug: OPTFLAGS = -g -O0 debug: all.$(TAG) -# Target: tag-specific build lockfiles -override oldtagsb=`if [ -d $(BUILDDIR) ]; then find $(BUILDDIR) -maxdepth 1 -name '.build.*' ! -name '.build.$(TAG)' -exec echo $(shell pwd)/{} \; ; fi` -override oldtagsl=`if [ -d $(LIBDIR) ]; then find $(LIBDIR) -maxdepth 1 -name '.build.*' ! -name '.build.$(TAG)' -exec echo $(shell pwd)/{} \; ; fi` - -$(BUILDDIR)/.build.$(TAG): $(LIBDIR)/.build.$(TAG) - -$(LIBDIR)/.build.$(TAG): - @if [ "$(oldtagsl)" != "" ]; then echo -e "Cannot build for tag=$(TAG) as old builds exist in $(LIBDIR) for other tags:\n$(oldtagsl)\nPlease run 'make clean' first\nIf 'make clean' is not enough: run 'make clean USEBUILDDIR=1 AVX=$(AVX) FPTYPE=$(FPTYPE)' or 'make cleanall'"; exit 1; fi - @if [ "$(oldtagsb)" != "" ]; then echo -e "Cannot build for tag=$(TAG) as old builds exist in $(BUILDDIR) for other tags:\n$(oldtagsb)\nPlease run 'make clean' first\nIf 'make clean' is not enough: run 'make clean USEBUILDDIR=1 AVX=$(AVX) FPTYPE=$(FPTYPE)' or 'make cleanall'"; exit 1; fi - @if [ ! -d $(LIBDIR) ]; then echo "mkdir -p $(LIBDIR)"; mkdir -p $(LIBDIR); fi - @touch $(LIBDIR)/.build.$(TAG) - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - @touch $(BUILDDIR)/.build.$(TAG) - #------------------------------------------------------------------------------- # Generic target and build rules: objects from C++ compilation -$(BUILDDIR)/%%.o : %%.cc *.h $(BUILDDIR)/.build.$(TAG) +$(BUILDDIR)/%%.o : %%.cc *.h @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi $(CXX) $(CPPFLAGS) $(CXXFLAGS) -fPIC -c $< -o $@ # Generic target and build rules: objects from CUDA compilation -$(BUILDDIR)/%%_cu.o : %%.cc *.h $(BUILDDIR)/.build.$(TAG) +$(BUILDDIR)/%%_cu.o : %%.cc *.h @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c -x cu $< -o $@ @@ -271,20 +267,61 @@ endif # Target: clean the builds .PHONY: clean +BUILD_DIRS := $(wildcard build.*) +NUM_BUILD_DIRS := $(words $(BUILD_DIRS)) + clean: ifeq ($(USEBUILDDIR),1) - rm -rf $(LIBDIR) - rm -rf $(BUILDDIR) +ifeq ($(NUM_BUILD_DIRS),1) + $(info USEBUILDDIR=1, only one src build directory found.) + rm -rf ../lib/$(BUILD_DIRS) + rm -rf $(BUILD_DIRS) +else ifeq ($(NUM_BUILD_DIRS),0) + $(error USEBUILDDIR=1, but no src build directories are found.) else - rm -f $(LIBDIR)/.build.* $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so - rm -f $(BUILDDIR)/.build.* $(BUILDDIR)/*.o $(BUILDDIR)/*.exe + $(error Multiple src BUILDDIR's found! Use 'cleannone', 'cleansse4', 'cleanavx2', 'clean512y','clean512z', 'cleancuda' or 'cleanall'.) +endif +else + rm -f ../lib/lib$(MG5AMC_COMMONLIB).so + rm -f $(BUILDDIR)/*.o $(BUILDDIR)/*.exe endif cleanall: @echo - $(MAKE) clean -f $(THISMK) + rm -f ../lib/lib$(MG5AMC_COMMONLIB).so + rm -f $(BUILDDIR)/*.o $(BUILDDIR)/*.exe @echo - rm -rf $(LIBDIR)/build.* + rm -rf ../lib/build.* rm -rf build.* +# Target: clean different builds + +cleannone: + rm -rf ../lib/build.none_* + rm -rf build.none_* + +cleansse4: + rm -rf ../lib/build.sse4_* + rm -rf build.sse4_* + +cleanavx2: + rm -rf ../lib/build.avx2_* + rm -rf build.avx2_* + +clean512y: + rm -rf ../lib/build.512y_* + rm -rf build.512y_* + +clean512z: + rm -rf ../lib/build.512z_* + rm -rf build.512z_* + +cleancuda: + rm -rf ../lib/build.cuda_* + rm -rf build.cuda_* + +cleandir: + rm -f ./*.o ./*.exe + rm -f ../lib/lib$(MG5AMC_COMMONLIB).so + #------------------------------------------------------------------------------- From 66d0191579fe3c4da1b42c3fb5a944e34e1cd184 Mon Sep 17 00:00:00 2001 From: Jorgen T Date: Thu, 28 Sep 2023 08:58:38 +0200 Subject: [PATCH 067/129] [CODEGEN] Added patch to makefile to patch.common in codegen --- .../MG5aMC_patches/PROD/patch.common | 238 ++++++++++++++++++ 1 file changed, 238 insertions(+) diff --git a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common index 8f96dab5ef..18470e9ebf 100644 --- a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common +++ b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common @@ -340,3 +340,241 @@ index a056d3861..b70b548e5 100755 alljobs = misc.glob('ajob*', Pdir) #remove associated results.dat (ensure to not mix with all data) +diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile +index 74db44d84..36a1e90b5 100644 +--- a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile ++++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile +@@ -9,6 +9,24 @@ FFLAGS+= -cpp + # Compile counters with -O3 as in the cudacpp makefile (avoid being "unfair" to Fortran #740) + CXXFLAGS = -O3 -Wall -Wshadow -Wextra + ++# Sets correct target based on MAKECMDGOALS ++ifeq ($(MAKECMDGOALS),) ++ TARGET := undefined ++else ++ ifneq (,$(findstring madevent_*,$(MAKECMDGOALS))) ++ TARGET := $(patsubst %_%,%,$(MAKECMDGOALS)) ++ else ++ TARGET := $(MAKECMDGOALS) ++ endif ++endif ++ ++# Default goal ++.DEFAULT_GOAL := usage ++ ++# Target if user does not specify target ++usage: ++ $(error Unknown target='$(TARGET)': only 'cppnone', 'cppsse4', 'cppavx2', 'cpp512y', 'cpp512z' and 'cuda' are supported!) ++ + # Enable ccache if USECCACHE=1 + ifeq ($(USECCACHE)$(shell echo $(CXX) | grep ccache),1) + override CXX:=ccache $(CXX) +@@ -48,10 +66,10 @@ CUDACPP_MAKEFILE=cudacpp.mk + # NB2 Use '|&' in CUDACPP_BUILDDIR to avoid confusing errors about googletest #507 + # NB3 Do not add a comment inlined "CUDACPP_BUILDDIR=$(shell ...) # comment" as otherwise a trailing space is included... + # NB4 The variables relevant to the cudacpp Makefile must be explicitly passed to $(shell...) +-CUDACPP_MAKEENV:=$(shell echo '$(.VARIABLES)' | tr " " "\n" | egrep "(USEBUILDDIR|AVX|FPTYPE|HELINL|HRDCOD)") ++CUDACPP_MAKEENV:=$(shell echo '$(.VARIABLES)' | tr " " "\n" | egrep "(USEBUILDDIR|FPTYPE|HELINL|HRDCOD)") + ###$(info CUDACPP_MAKEENV=$(CUDACPP_MAKEENV)) + ###$(info $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))")) +-CUDACPP_BUILDDIR:=$(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn |& awk '/Building/{print $$3}' | sed s/BUILDDIR=//) ++CUDACPP_BUILDDIR:=$(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn $(TARGET) |& awk '/Building/{print $$3}' | sed s/BUILDDIR=//) + ifeq ($(CUDACPP_BUILDDIR),) + $(error CUDACPP_BUILDDIR='$(CUDACPP_BUILDDIR)' should not be empty!) + else +@@ -115,10 +133,6 @@ $(LIBS): .libs + cd ../../Source; make + touch $@ + +-$(CUDACPP_BUILDDIR)/.cudacpplibs: +- $(MAKE) -f $(CUDACPP_MAKEFILE) +- touch $@ +- + # On Linux, set rpath to LIBDIR to make it unnecessary to use LD_LIBRARY_PATH + # Use relative paths with respect to the executables ($ORIGIN on Linux) + # On Darwin, building libraries with absolute paths in LIBDIR makes this unnecessary +@@ -130,26 +144,47 @@ else + override LIBFLAGSRPATH = -Wl,-rpath,'$$ORIGIN/$(LIBDIR)' + endif + +-.PHONY: madevent_fortran_link madevent_cuda_link madevent_cpp_link ++.PHONY: madevent_fortran_link madevent_cuda_link madevent_cpp_link madevent_cppnone_link madevent_cppsse4_link madevent_cppavx2_link madevent_cpp512y_link madevent_cpp512z_link + + madevent_fortran_link: $(PROG)_fortran + rm -f $(PROG) + ln -s $(PROG)_fortran $(PROG) + +-madevent_cpp_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp ++# Only used for testing, should be removed in the future ++madevent_cpp_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp cppavx2 ++ rm -f $(PROG) ++ ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) ++ ++madevent_cppnone_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp cppnone ++ rm -f $(PROG) ++ ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) ++ ++madevent_cppsse4_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp cppsse4 ++ rm -f $(PROG) ++ ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) ++ ++madevent_cppavx2_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp cppavx2 ++ rm -f $(PROG) ++ ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) ++ ++madevent_cpp512y_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp cpp512y ++ rm -f $(PROG) ++ ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) ++ ++madevent_cpp512z_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp cpp512z + rm -f $(PROG) + ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) + +-madevent_cuda_link: $(CUDACPP_BUILDDIR)/$(PROG)_cuda ++madevent_cuda_link: $(CUDACPP_BUILDDIR)/$(PROG)_cuda cuda + rm -f $(PROG) + ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cuda $(PROG) + + # Building $(PROG)_cpp also builds $(PROG)_cuda if $(CUDACPP_CULIB) exists (improved patch for cpp-only builds #503) +-$(CUDACPP_BUILDDIR)/$(PROG)_cpp: $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(LIBS) $(MATRIX) counters.o ompnumthreads.o $(CUDACPP_BUILDDIR)/.cudacpplibs ++$(CUDACPP_BUILDDIR)/$(PROG)_cpp: $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(LIBS) $(MATRIX) counters.o ompnumthreads.o + $(FC) -o $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o -L$(LIBDIR)/$(CUDACPP_BUILDDIR) -l$(CUDACPP_COMMONLIB) -l$(CUDACPP_CXXLIB) $(LIBFLAGSRPATH) $(LDFLAGS) +- if [ -f $(LIBDIR)/$(CUDACPP_BUILDDIR)/lib$(CUDACPP_CULIB).* ]; then $(FC) -o $(CUDACPP_BUILDDIR)/$(PROG)_cuda $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o -L$(LIBDIR)/$(CUDACPP_BUILDDIR) -l$(CUDACPP_COMMONLIB) -l$(CUDACPP_CULIB) $(LIBFLAGSRPATH) $(LDFLAGS); fi + +-$(CUDACPP_BUILDDIR)/$(PROG)_cuda: $(CUDACPP_BUILDDIR)/$(PROG)_cpp ++$(CUDACPP_BUILDDIR)/$(PROG)_cuda: $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(LIBS) $(MATRIX) counters.o ompnumthreads.o ++ $(FC) -o $(CUDACPP_BUILDDIR)/$(PROG)_cuda $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o -L$(LIBDIR)/$(CUDACPP_BUILDDIR) -l$(CUDACPP_COMMONLIB) -l$(CUDACPP_CULIB) $(LIBFLAGSRPATH) $(LDFLAGS) + + counters.o: counters.cc timer.h + $(CXX) $(CXXFLAGS) -c $< -o $@ +@@ -215,49 +250,105 @@ genps.o: .libs + + UNAME_P := $(shell uname -p) + ifeq ($(UNAME_P),ppc64le) +-avxall: avxnone avxsse4 ++cppall: ++ $(MAKE) USEBUILDDIR=1 cppnone ++ $(MAKE) USEBUILDDIR=1 cppsse4 + else ifeq ($(UNAME_P),arm) +-avxall: avxnone avxsse4 ++cppall: ++ $(MAKE) USEBUILDDIR=1 cppnone ++ $(MAKE) USEBUILDDIR=1 cppsse4 + else +-avxall: avxnone avxsse4 avxavx2 avx512y avx512z ++cppall: ++ $(MAKE) USEBUILDDIR=1 cppnone ++ $(MAKE) USEBUILDDIR=1 cppsse4 ++ $(MAKE) USEBUILDDIR=1 cppavx2 ++ $(MAKE) USEBUILDDIR=1 cpp512y ++ $(MAKE) USEBUILDDIR=1 cpp512z + endif + +-avxnone: $(PROG)_fortran $(DSIG_cudacpp) +- @echo +- $(MAKE) USEBUILDDIR=1 AVX=none ++ALL: ++ $(MAKE) USEBUILDDIR=1 cppnone ++ $(MAKE) USEBUILDDIR=1 cppsse4 ++ $(MAKE) USEBUILDDIR=1 cppavx2 ++ $(MAKE) USEBUILDDIR=1 cpp512y ++ $(MAKE) USEBUILDDIR=1 cpp512z ++ $(MAKE) USEBUILDDIR=1 cuda + +-avxsse4: $(PROG)_fortran $(DSIG_cudacpp) +- @echo +- $(MAKE) USEBUILDDIR=1 AVX=sse4 ++cppnone: ++ $(MAKE) -f $(CUDACPP_MAKEFILE) cppnone + +-avxavx2: $(PROG)_fortran $(DSIG_cudacpp) +- @echo +- $(MAKE) USEBUILDDIR=1 AVX=avx2 ++cppsse4: ++ $(MAKE) -f $(CUDACPP_MAKEFILE) cppsse4 + +-avx512y: $(PROG)_fortran $(DSIG_cudacpp) +- @echo +- $(MAKE) USEBUILDDIR=1 AVX=512y ++cppavx2: ++ $(MAKE) -f $(CUDACPP_MAKEFILE) cppavx2 + +-avx512z: $(PROG)_fortran $(DSIG_cudacpp) +- @echo +- $(MAKE) USEBUILDDIR=1 AVX=512z ++cpp512y: ++ $(MAKE) -f $(CUDACPP_MAKEFILE) cpp512y + +-###endif ++cpp512z: ++ $(MAKE) -f $(CUDACPP_MAKEFILE) cpp512z ++ ++cuda: ++ $(MAKE) -f $(CUDACPP_MAKEFILE) cuda + + # Clean (NB: 'make clean' in Source calls 'make clean' in all P*) + +-clean: # Clean builds: fortran in this Pn; cudacpp executables for one AVX in this Pn +- $(RM) *.o gensym $(PROG) $(PROG)_fortran $(PROG)_forhel $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(CUDACPP_BUILDDIR)/$(PROG)_cuda ++BUILD_DIRS := $(wildcard build.*) ++BUILD_TARGET_DIR := $(shell echo $(BUILD_DIRS) | awk -F '[._]' '{print $$2}') ++NUM_BUILD_DIRS := $(words $(BUILD_DIRS)) ++ ++clean: ++ifeq ($(USEBUILDDIR),1) ++ifeq ($(NUM_BUILD_DIRS),1) ++ $(info USEBUILDDIR=1, only cleaning build dir.) ++ $(RM) -r $(BUILD_DIRS) ++ $(MAKE) -f $(CUDACPP_MAKEFILE) clean$(BUILD_TARGET_DIR) ++else ifeq ($(NUM_BUILD_DIRS),0) ++ $(error USEBUILDDIR=1, but no build directories are found.) ++else ++ $(error Multiple BUILDDIR's found! Use 'cleannone', 'cleansse4', 'cleanavx2', 'clean512y','clean512z', 'cleancuda' or 'cleanall'.) ++endif ++else ++ $(info USEBUILDDIR=0 only cleaning build with no dir.) ++ $(RM) *.o gensym $(PROG) $(PROG)_fortran $(PROG)_forhel ./$(PROG)_* ++ $(MAKE) -f $(CUDACPP_MAKEFILE) cleandir ++ $(RM) $(CUDACPP_BUILDDIR)/.*libs ++endif ++ ++cleannone: # Clean builds: fortran in this Pn; cpp executables for one AVX in this Pn ++ $(RM) *.o gensym $(PROG) $(PROG)_fortran $(PROG)_forhel build.none_*/$(PROG)_cpp ++ $(MAKE) -f $(CUDACPP_MAKEFILE) cleannone ++ ++cleansse4: # Clean build: fortran in this Pn; cpp executables for cppsse4 in this Pn ++ $(RM) *.o gensym $(PROG) $(PROG)_fortran $(PROG)_forhel build.sse4_*/$(PROG)_cpp ++ $(MAKE) -f $(CUDACPP_MAKEFILE) cleansse4 ++ ++cleanavx2: # Clean build: fortran in this Pn; cpp executables for cppavx2 in this Pn ++ $(RM) *.o gensym $(PROG) $(PROG)_fortran $(PROG)_forhel build.avx2_*/$(PROG)_cpp ++ $(MAKE) -f $(CUDACPP_MAKEFILE) cleanavx2 ++ ++clean512y: # Clean build: fortran in this Pn; cpp executables for cpp512y in this Pn ++ $(RM) *.o gensym $(PROG) $(PROG)_fortran $(PROG)_forhel build.512y_*/$(PROG)_cpp ++ $(MAKE) -f $(CUDACPP_MAKEFILE) clean512y ++ ++clean512z: # Clean build: fortran in this Pn; cpp executables for cpp512z in this Pn ++ $(RM) *.o gensym $(PROG) $(PROG)_fortran $(PROG)_forhel build.512z_*/$(PROG)_cpp ++ $(MAKE) -f $(CUDACPP_MAKEFILE) clean512z ++ ++cleancuda: # Clean build: fortran in this Pn; cuda executables in this Pn ++ $(RM) *.o gensym $(PROG) $(PROG)_fortran $(PROG)_forhel build.cuda_*/$(PROG)_cuda ++ $(MAKE) -f $(CUDACPP_MAKEFILE) cleancuda + + cleanavxs: clean # Clean builds: fortran in this Pn; cudacpp for all AVX in this Pn and in src + $(MAKE) -f $(CUDACPP_MAKEFILE) cleanall +- rm -f $(CUDACPP_BUILDDIR)/.cudacpplibs +- rm -f .libs ++ $(RM) $(CUDACPP_BUILDDIR)/.*libs ++ $(RM) .libs + + cleanall: # Clean builds: fortran in all P* and in Source; cudacpp for all AVX in all P* and in src + make -C ../../Source cleanall +- rm -rf $(LIBDIR)libbias.$(libext) +- rm -f ../../Source/*.mod ../../Source/*/*.mod ++ $(RM) -r $(LIBDIR)libbias.$(libext) ++ $(RM) ../../Source/*.mod ../../Source/*/*.mod + + distclean: cleanall # Clean all fortran and cudacpp builds as well as the googletest installation + $(MAKE) -f $(CUDACPP_MAKEFILE) distclean From 892f21cd69193efb1ca9d6e65e28007c523f8b9d Mon Sep 17 00:00:00 2001 From: Jorgen T Date: Thu, 28 Sep 2023 09:02:32 +0200 Subject: [PATCH 068/129] Readded cleaning of build directories in cleanall --- epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk index f500cd0032..e37937c88c 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk @@ -767,6 +767,7 @@ cleanall: rm -f $(LIBDIR)/lib$(MG5AMC_CXXLIB).so $(LIBDIR)/lib$(MG5AMC_CULIB).so @echo $(MAKE) -C ../../src cleanall -f $(CUDACPP_SRC_MAKEFILE) + rm -rf build.* # Target: clean the builds as well as the gtest installation(s) distclean: cleanall From b0f52b51d4c37045f39eac8e4e91d57136a85f72 Mon Sep 17 00:00:00 2001 From: Jorgen T Date: Thu, 28 Sep 2023 09:06:15 +0200 Subject: [PATCH 069/129] [CODEGEN] Fixed indentation in cudacpp.mk in codegen --- .../madgraph/iolibs/template_files/gpu/cudacpp.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/cudacpp.mk b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/cudacpp.mk index 8b2f12aabc..8e2bfab159 100644 --- a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/cudacpp.mk +++ b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/cudacpp.mk @@ -766,8 +766,8 @@ cleanall: rm -f $(BUILDDIR)/*.o $(BUILDDIR)/*.exe rm -f $(LIBDIR)/lib$(MG5AMC_CXXLIB).so $(LIBDIR)/lib$(MG5AMC_CULIB).so @echo - $(MAKE) -C ../../src cleanall -f $(CUDACPP_SRC_MAKEFILE) - rm -rf build.* + $(MAKE) -C ../../src cleanall -f $(CUDACPP_SRC_MAKEFILE) + rm -rf build.* # Target: clean the builds as well as the gtest installation(s) distclean: cleanall From fd3f74d106973f11b113adeb00b07d66b29894d0 Mon Sep 17 00:00:00 2001 From: Jorgen T Date: Thu, 28 Sep 2023 09:07:32 +0200 Subject: [PATCH 070/129] Fixed indentation in cudacpp.mk in gg_tt.mad --- epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk index e37937c88c..b4cf265525 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk @@ -767,7 +767,7 @@ cleanall: rm -f $(LIBDIR)/lib$(MG5AMC_CXXLIB).so $(LIBDIR)/lib$(MG5AMC_CULIB).so @echo $(MAKE) -C ../../src cleanall -f $(CUDACPP_SRC_MAKEFILE) - rm -rf build.* + rm -rf build.* # Target: clean the builds as well as the gtest installation(s) distclean: cleanall From f48ab5a59103283f09cce770d14bc6162d63c863 Mon Sep 17 00:00:00 2001 From: Jorgen T Date: Thu, 28 Sep 2023 09:13:34 +0200 Subject: [PATCH 071/129] [CODEGEN] Removed prior patch to makefile in patch.common --- .../MG5aMC_patches/PROD/patch.common | 248 ------------------ 1 file changed, 248 deletions(-) diff --git a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common index 18470e9ebf..1b5796567e 100644 --- a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common +++ b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common @@ -38,254 +38,6 @@ index 617f10b93..dbe08b846 100644 +cleanall: cleanSource # THIS IS THE ONE + for i in `ls -d ../SubProcesses/P*`; do cd $$i; make cleanavxs; cd -; done; + -diff --git b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile -index 348c283be..74db44d84 100644 ---- b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile -+++ a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile -@@ -1,6 +1,22 @@ -+SHELL := /bin/bash -+ - include ../../Source/make_opts - FFLAGS+= -w - -+# Enable the C preprocessor https://gcc.gnu.org/onlinedocs/gfortran/Preprocessing-Options.html -+FFLAGS+= -cpp -+ -+# Compile counters with -O3 as in the cudacpp makefile (avoid being "unfair" to Fortran #740) -+CXXFLAGS = -O3 -Wall -Wshadow -Wextra -+ -+# Enable ccache if USECCACHE=1 -+ifeq ($(USECCACHE)$(shell echo $(CXX) | grep ccache),1) -+ override CXX:=ccache $(CXX) -+endif -+ifeq ($(USECCACHE)$(shell echo $(FC) | grep ccache),1) -+ override FC:=ccache $(FC) -+endif -+ - # Load additional dependencies of the bias module, if present - ifeq (,$(wildcard ../bias_dependencies)) - BIASDEPENDENCIES = -@@ -24,7 +40,26 @@ else - MADLOOP_LIB = - endif - --LINKLIBS = $(LINK_MADLOOP_LIB) $(LINK_LOOP_LIBS) -L../../lib/ -ldhelas -ldsample -lmodel -lgeneric -lpdf -lgammaUPC -lcernlib $(llhapdf) -lbias -+LINKLIBS = $(LINK_MADLOOP_LIB) $(LINK_LOOP_LIBS) -L$(LIBDIR) -ldhelas -ldsample -lmodel -lgeneric -lpdf -lcernlib $(llhapdf) -lbias -+ -+processid_short=$(shell basename $(CURDIR) | awk -F_ '{print $$(NF-1)"_"$$NF}') -+CUDACPP_MAKEFILE=cudacpp.mk -+# NB1 Using ":=" below instead of "=" is much faster (it only runs the subprocess once instead of many times) -+# NB2 Use '|&' in CUDACPP_BUILDDIR to avoid confusing errors about googletest #507 -+# NB3 Do not add a comment inlined "CUDACPP_BUILDDIR=$(shell ...) # comment" as otherwise a trailing space is included... -+# NB4 The variables relevant to the cudacpp Makefile must be explicitly passed to $(shell...) -+CUDACPP_MAKEENV:=$(shell echo '$(.VARIABLES)' | tr " " "\n" | egrep "(USEBUILDDIR|AVX|FPTYPE|HELINL|HRDCOD)") -+###$(info CUDACPP_MAKEENV=$(CUDACPP_MAKEENV)) -+###$(info $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))")) -+CUDACPP_BUILDDIR:=$(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn 2>/dev/null | awk '/Building/{print $$3}' | sed s/BUILDDIR=//) -+#ifeq ($(CUDACPP_BUILDDIR),) -+#$(error CUDACPP_BUILDDIR='$(CUDACPP_BUILDDIR)' should not be empty!) -+#else -+$(info CUDACPP_BUILDDIR='$(CUDACPP_BUILDDIR)') -+#endif -+CUDACPP_COMMONLIB=mg5amc_common -+CUDACPP_CXXLIB=mg5amc_$(processid_short)_cpp -+CUDACPP_CULIB=mg5amc_$(processid_short)_cuda - - LIBS = $(LIBDIR)libbias.$(libext) $(LIBDIR)libdhelas.$(libext) $(LIBDIR)libdsample.$(libext) $(LIBDIR)libgeneric.$(libext) $(LIBDIR)libpdf.$(libext) $(LIBDIR)libgammaUPC.$(libext) $(LIBDIR)libmodel.$(libext) $(LIBDIR)libcernlib.$(libext) $(MADLOOP_LIB) $(LOOP_LIBS) - -@@ -43,41 +78,112 @@ ifeq ($(strip $(MATRIX_HEL)),) - endif - - --PROCESS= driver.o myamp.o genps.o unwgt.o setcuts.o get_color.o \ -+PROCESS= myamp.o genps.o unwgt.o setcuts.o get_color.o \ - cuts.o cluster.o reweight.o initcluster.o addmothers.o setscales.o \ -- idenparts.o dummy_fct.o \ -- $(patsubst %.f,%.o,$(wildcard auto_dsig*.f)) \ -+ idenparts.o dummy_fct.o -+ -+DSIG=driver.o $(patsubst %.f, %.o, $(filter-out auto_dsig.f, $(wildcard auto_dsig*.f))) -+DSIG_cudacpp=driver_cudacpp.o $(patsubst %.f, %_cudacpp.o, $(filter-out auto_dsig.f, $(wildcard auto_dsig*.f))) - - SYMMETRY = symmetry.o idenparts.o - - # Binaries - --$(PROG): $(PROCESS) auto_dsig.o $(LIBS) $(MATRIX) -- $(FC) -o $(PROG) $(PROCESS) $(MATRIX) $(LINKLIBS) $(LDFLAGS) $(BIASDEPENDENCIES) -fopenmp -+#LDFLAGS+=-Wl,--no-relax # avoid 'failed to convert GOTPCREL relocation' error #458 (flag not universal -> skip?) - --$(PROG)_forhel: $(PROCESS) auto_dsig.o $(LIBS) $(MATRIX_HEL) -- $(FC) -o $(PROG)_forhel $(PROCESS) $(MATRIX_HEL) $(LINKLIBS) $(LDFLAGS) $(BIASDEPENDENCIES) -fopenmp -+all: $(PROG)_fortran $(CUDACPP_BUILDDIR)/$(PROG)_cpp # also builds $(PROG)_cuda if $(CUDACPP_CULIB) exists (#503) - --gensym: $(SYMMETRY) configs.inc $(LIBS) -- $(FC) -o gensym $(SYMMETRY) -L../../lib/ $(LINKLIBS) $(LDFLAGS) -+ifneq ($(shell $(CXX) --version | egrep '^Intel'),) -+override OMPFLAGS = -fopenmp -+LINKLIBS += -liomp5 # see #578 -+LINKLIBS += -lintlc # undefined reference to `_intel_fast_memcpy' -+else ifneq ($(shell $(CXX) --version | egrep '^clang'),) -+override OMPFLAGS = -fopenmp -+$(CUDACPP_BUILDDIR)/$(PROG)_cpp: LINKLIBS += -L $(shell dirname $(shell $(CXX) -print-file-name=libc++.so)) -lomp # see #604 -+###else ifneq ($(shell $(CXX) --version | egrep '^Apple clang'),) -+###override OMPFLAGS = -fopenmp # OMP is not supported yet by cudacpp for Apple clang -+else -+override OMPFLAGS = -fopenmp -+endif -+ -+$(PROG)_fortran: $(PROCESS) $(DSIG) auto_dsig.o $(LIBS) $(MATRIX) counters.o ompnumthreads.o -+ $(FC) -o $(PROG)_fortran $(PROCESS) $(DSIG) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o $(LDFLAGS) - --$(LIBDIR)libmodel.$(libext): ../../Cards/param_card.dat -- cd ../../Source/MODEL; make -+$(LIBS): .libs - --$(LIBDIR)libgeneric.$(libext): ../../Cards/run_card.dat -+.libs: ../../Cards/param_card.dat ../../Cards/run_card.dat - cd ../../Source; make -+ touch $@ -+ -+$(CUDACPP_BUILDDIR)/.cudacpplibs: -+ $(MAKE) -f $(CUDACPP_MAKEFILE) -+ touch $@ -+ -+# On Linux, set rpath to LIBDIR to make it unnecessary to use LD_LIBRARY_PATH -+# Use relative paths with respect to the executables ($ORIGIN on Linux) -+# On Darwin, building libraries with absolute paths in LIBDIR makes this unnecessary -+ifeq ($(UNAME_S),Darwin) -+ override LIBFLAGSRPATH = -+else ifeq ($(USEBUILDDIR),1) -+ override LIBFLAGSRPATH = -Wl,-rpath,'$$ORIGIN/../$(LIBDIR)/$(CUDACPP_BUILDDIR)' -+else -+ override LIBFLAGSRPATH = -Wl,-rpath,'$$ORIGIN/$(LIBDIR)' -+endif -+ -+.PHONY: madevent_fortran_link madevent_cuda_link madevent_cpp_link -+ -+madevent_fortran_link: $(PROG)_fortran -+ rm -f $(PROG) -+ ln -s $(PROG)_fortran $(PROG) -+ -+madevent_cpp_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp -+ rm -f $(PROG) -+ ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) -+ -+madevent_cuda_link: $(CUDACPP_BUILDDIR)/$(PROG)_cuda -+ rm -f $(PROG) -+ ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cuda $(PROG) - --$(LIBDIR)libpdf.$(libext): -- cd ../../Source/PDF; make -+# Building $(PROG)_cpp also builds $(PROG)_cuda if $(CUDACPP_CULIB) exists (improved patch for cpp-only builds #503) -+$(CUDACPP_BUILDDIR)/$(PROG)_cpp: $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(LIBS) $(MATRIX) counters.o ompnumthreads.o $(CUDACPP_BUILDDIR)/.cudacpplibs -+ $(FC) -o $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o -L$(LIBDIR)/$(CUDACPP_BUILDDIR) -l$(CUDACPP_COMMONLIB) -l$(CUDACPP_CXXLIB) $(LIBFLAGSRPATH) $(LDFLAGS) -+ if [ -f $(LIBDIR)/$(CUDACPP_BUILDDIR)/lib$(CUDACPP_CULIB).* ]; then $(FC) -o $(CUDACPP_BUILDDIR)/$(PROG)_cuda $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o -L$(LIBDIR)/$(CUDACPP_BUILDDIR) -l$(CUDACPP_COMMONLIB) -l$(CUDACPP_CULIB) $(LIBFLAGSRPATH) $(LDFLAGS); fi - --$(LIBDIR)libgammaUPC.$(libext): -- cd ../../Source/PDF/gammaUPC; make -+$(CUDACPP_BUILDDIR)/$(PROG)_cuda: $(CUDACPP_BUILDDIR)/$(PROG)_cpp -+ -+counters.o: counters.cc timer.h -+ $(CXX) $(CXXFLAGS) -c $< -o $@ -+ -+ompnumthreads.o: ompnumthreads.cc ompnumthreads.h -+ $(CXX) -I. $(CXXFLAGS) $(OMPFLAGS) -c $< -o $@ -+ -+$(PROG)_forhel: $(PROCESS) auto_dsig.o $(LIBS) $(MATRIX_HEL) -+ $(FC) -o $(PROG)_forhel $(PROCESS) $(MATRIX_HEL) $(LINKLIBS) $(LDFLAGS) $(BIASDEPENDENCIES) $(OMPFLAGS) -+ -+gensym: $(SYMMETRY) configs.inc $(LIBS) -+ $(FC) -o gensym $(SYMMETRY) -L$(LIBDIR) $(LINKLIBS) $(LDFLAGS) -+ -+###ifeq (,$(wildcard fbridge.inc)) # Pointless: fbridge.inc always exists as this is the cudacpp-modified makefile! -+###$(LIBDIR)libmodel.$(libext): ../../Cards/param_card.dat -+### cd ../../Source/MODEL; make -+### -+###$(LIBDIR)libgeneric.$(libext): ../../Cards/run_card.dat -+### cd ../../Source; make -+### -+###$(LIBDIR)libpdf.$(libext): -+### cd ../../Source/PDF; make -+### -+###$(LIBDIR)libgammaUPC.$(libext): -+### cd ../../Source/PDF/gammaUPC; make -+###endif - - # Add source so that the compiler finds the DiscreteSampler module. - $(MATRIX): %.o: %.f - $(FC) $(FFLAGS) $(MATRIX_FLAG) -c $< -I../../Source/ -I../../Source/PDF/gammaUPC - %.o: %.f - $(FC) $(FFLAGS) -c $< -I../../Source/ -I../../Source/PDF/gammaUPC -+%_cudacpp.o: %.f -+ $(FC) $(FFLAGS) -c -DMG5AMC_MEEXPORTER_CUDACPP $< -I../../Source/ $(OMPFLAGS) -o $@ - - # Dependencies - -@@ -97,5 +203,61 @@ unwgt.o: genps.inc nexternal.inc symswap.inc cluster.inc run.inc message.inc \ - run_config.inc - initcluster.o: message.inc - --clean: -- $(RM) *.o gensym madevent madevent_forhel -+# Extra dependencies on discretesampler.mod -+ -+auto_dsig.o: .libs -+driver.o: .libs -+driver_cudacpp.o: .libs -+$(MATRIX): .libs -+genps.o: .libs -+ -+# Cudacpp avxall targets -+ -+UNAME_P := $(shell uname -p) -+ifeq ($(UNAME_P),ppc64le) -+avxall: avxnone avxsse4 -+else ifeq ($(UNAME_P),arm) -+avxall: avxnone avxsse4 -+else -+avxall: avxnone avxsse4 avxavx2 avx512y avx512z -+endif -+ -+avxnone: $(PROG)_fortran $(DSIG_cudacpp) -+ @echo -+ $(MAKE) USEBUILDDIR=1 AVX=none -+ -+avxsse4: $(PROG)_fortran $(DSIG_cudacpp) -+ @echo -+ $(MAKE) USEBUILDDIR=1 AVX=sse4 -+ -+avxavx2: $(PROG)_fortran $(DSIG_cudacpp) -+ @echo -+ $(MAKE) USEBUILDDIR=1 AVX=avx2 -+ -+avx512y: $(PROG)_fortran $(DSIG_cudacpp) -+ @echo -+ $(MAKE) USEBUILDDIR=1 AVX=512y -+ -+avx512z: $(PROG)_fortran $(DSIG_cudacpp) -+ @echo -+ $(MAKE) USEBUILDDIR=1 AVX=512z -+ -+###endif -+ -+# Clean (NB: 'make clean' in Source calls 'make clean' in all P*) -+ -+clean: # Clean builds: fortran in this Pn; cudacpp executables for one AVX in this Pn -+ $(RM) *.o gensym $(PROG) $(PROG)_fortran $(PROG)_forhel $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(CUDACPP_BUILDDIR)/$(PROG)_cuda -+ -+cleanavxs: clean # Clean builds: fortran in this Pn; cudacpp for all AVX in this Pn and in src -+ $(MAKE) -f $(CUDACPP_MAKEFILE) cleanall -+ rm -f $(CUDACPP_BUILDDIR)/.cudacpplibs -+ rm -f .libs -+ -+cleanall: # Clean builds: fortran in all P* and in Source; cudacpp for all AVX in all P* and in src -+ make -C ../../Source cleanall -+ rm -rf $(LIBDIR)libbias.$(libext) -+ rm -f ../../Source/*.mod ../../Source/*/*.mod -+ -+distclean: cleanall # Clean all fortran and cudacpp builds as well as the googletest installation -+ $(MAKE) -f $(CUDACPP_MAKEFILE) distclean diff --git b/epochX/cudacpp/gg_tt.mad/bin/internal/gen_ximprove.py a/epochX/cudacpp/gg_tt.mad/bin/internal/gen_ximprove.py index 4dd71db86..3b8ec3121 100755 --- b/epochX/cudacpp/gg_tt.mad/bin/internal/gen_ximprove.py From 92bd1e77e4a08d0e1ab8982fa6d77a312f341daf Mon Sep 17 00:00:00 2001 From: Jorgen T Date: Thu, 28 Sep 2023 09:27:42 +0200 Subject: [PATCH 072/129] Revert "[CODEGEN] Removed prior patch to makefile in patch.common" This reverts commit f48ab5a59103283f09cce770d14bc6162d63c863. --- .../MG5aMC_patches/PROD/patch.common | 248 ++++++++++++++++++ 1 file changed, 248 insertions(+) diff --git a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common index 1b5796567e..18470e9ebf 100644 --- a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common +++ b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common @@ -38,6 +38,254 @@ index 617f10b93..dbe08b846 100644 +cleanall: cleanSource # THIS IS THE ONE + for i in `ls -d ../SubProcesses/P*`; do cd $$i; make cleanavxs; cd -; done; + +diff --git b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile +index 348c283be..74db44d84 100644 +--- b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile ++++ a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile +@@ -1,6 +1,22 @@ ++SHELL := /bin/bash ++ + include ../../Source/make_opts + FFLAGS+= -w + ++# Enable the C preprocessor https://gcc.gnu.org/onlinedocs/gfortran/Preprocessing-Options.html ++FFLAGS+= -cpp ++ ++# Compile counters with -O3 as in the cudacpp makefile (avoid being "unfair" to Fortran #740) ++CXXFLAGS = -O3 -Wall -Wshadow -Wextra ++ ++# Enable ccache if USECCACHE=1 ++ifeq ($(USECCACHE)$(shell echo $(CXX) | grep ccache),1) ++ override CXX:=ccache $(CXX) ++endif ++ifeq ($(USECCACHE)$(shell echo $(FC) | grep ccache),1) ++ override FC:=ccache $(FC) ++endif ++ + # Load additional dependencies of the bias module, if present + ifeq (,$(wildcard ../bias_dependencies)) + BIASDEPENDENCIES = +@@ -24,7 +40,26 @@ else + MADLOOP_LIB = + endif + +-LINKLIBS = $(LINK_MADLOOP_LIB) $(LINK_LOOP_LIBS) -L../../lib/ -ldhelas -ldsample -lmodel -lgeneric -lpdf -lgammaUPC -lcernlib $(llhapdf) -lbias ++LINKLIBS = $(LINK_MADLOOP_LIB) $(LINK_LOOP_LIBS) -L$(LIBDIR) -ldhelas -ldsample -lmodel -lgeneric -lpdf -lcernlib $(llhapdf) -lbias ++ ++processid_short=$(shell basename $(CURDIR) | awk -F_ '{print $$(NF-1)"_"$$NF}') ++CUDACPP_MAKEFILE=cudacpp.mk ++# NB1 Using ":=" below instead of "=" is much faster (it only runs the subprocess once instead of many times) ++# NB2 Use '|&' in CUDACPP_BUILDDIR to avoid confusing errors about googletest #507 ++# NB3 Do not add a comment inlined "CUDACPP_BUILDDIR=$(shell ...) # comment" as otherwise a trailing space is included... ++# NB4 The variables relevant to the cudacpp Makefile must be explicitly passed to $(shell...) ++CUDACPP_MAKEENV:=$(shell echo '$(.VARIABLES)' | tr " " "\n" | egrep "(USEBUILDDIR|AVX|FPTYPE|HELINL|HRDCOD)") ++###$(info CUDACPP_MAKEENV=$(CUDACPP_MAKEENV)) ++###$(info $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))")) ++CUDACPP_BUILDDIR:=$(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn 2>/dev/null | awk '/Building/{print $$3}' | sed s/BUILDDIR=//) ++#ifeq ($(CUDACPP_BUILDDIR),) ++#$(error CUDACPP_BUILDDIR='$(CUDACPP_BUILDDIR)' should not be empty!) ++#else ++$(info CUDACPP_BUILDDIR='$(CUDACPP_BUILDDIR)') ++#endif ++CUDACPP_COMMONLIB=mg5amc_common ++CUDACPP_CXXLIB=mg5amc_$(processid_short)_cpp ++CUDACPP_CULIB=mg5amc_$(processid_short)_cuda + + LIBS = $(LIBDIR)libbias.$(libext) $(LIBDIR)libdhelas.$(libext) $(LIBDIR)libdsample.$(libext) $(LIBDIR)libgeneric.$(libext) $(LIBDIR)libpdf.$(libext) $(LIBDIR)libgammaUPC.$(libext) $(LIBDIR)libmodel.$(libext) $(LIBDIR)libcernlib.$(libext) $(MADLOOP_LIB) $(LOOP_LIBS) + +@@ -43,41 +78,112 @@ ifeq ($(strip $(MATRIX_HEL)),) + endif + + +-PROCESS= driver.o myamp.o genps.o unwgt.o setcuts.o get_color.o \ ++PROCESS= myamp.o genps.o unwgt.o setcuts.o get_color.o \ + cuts.o cluster.o reweight.o initcluster.o addmothers.o setscales.o \ +- idenparts.o dummy_fct.o \ +- $(patsubst %.f,%.o,$(wildcard auto_dsig*.f)) \ ++ idenparts.o dummy_fct.o ++ ++DSIG=driver.o $(patsubst %.f, %.o, $(filter-out auto_dsig.f, $(wildcard auto_dsig*.f))) ++DSIG_cudacpp=driver_cudacpp.o $(patsubst %.f, %_cudacpp.o, $(filter-out auto_dsig.f, $(wildcard auto_dsig*.f))) + + SYMMETRY = symmetry.o idenparts.o + + # Binaries + +-$(PROG): $(PROCESS) auto_dsig.o $(LIBS) $(MATRIX) +- $(FC) -o $(PROG) $(PROCESS) $(MATRIX) $(LINKLIBS) $(LDFLAGS) $(BIASDEPENDENCIES) -fopenmp ++#LDFLAGS+=-Wl,--no-relax # avoid 'failed to convert GOTPCREL relocation' error #458 (flag not universal -> skip?) + +-$(PROG)_forhel: $(PROCESS) auto_dsig.o $(LIBS) $(MATRIX_HEL) +- $(FC) -o $(PROG)_forhel $(PROCESS) $(MATRIX_HEL) $(LINKLIBS) $(LDFLAGS) $(BIASDEPENDENCIES) -fopenmp ++all: $(PROG)_fortran $(CUDACPP_BUILDDIR)/$(PROG)_cpp # also builds $(PROG)_cuda if $(CUDACPP_CULIB) exists (#503) + +-gensym: $(SYMMETRY) configs.inc $(LIBS) +- $(FC) -o gensym $(SYMMETRY) -L../../lib/ $(LINKLIBS) $(LDFLAGS) ++ifneq ($(shell $(CXX) --version | egrep '^Intel'),) ++override OMPFLAGS = -fopenmp ++LINKLIBS += -liomp5 # see #578 ++LINKLIBS += -lintlc # undefined reference to `_intel_fast_memcpy' ++else ifneq ($(shell $(CXX) --version | egrep '^clang'),) ++override OMPFLAGS = -fopenmp ++$(CUDACPP_BUILDDIR)/$(PROG)_cpp: LINKLIBS += -L $(shell dirname $(shell $(CXX) -print-file-name=libc++.so)) -lomp # see #604 ++###else ifneq ($(shell $(CXX) --version | egrep '^Apple clang'),) ++###override OMPFLAGS = -fopenmp # OMP is not supported yet by cudacpp for Apple clang ++else ++override OMPFLAGS = -fopenmp ++endif ++ ++$(PROG)_fortran: $(PROCESS) $(DSIG) auto_dsig.o $(LIBS) $(MATRIX) counters.o ompnumthreads.o ++ $(FC) -o $(PROG)_fortran $(PROCESS) $(DSIG) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o $(LDFLAGS) + +-$(LIBDIR)libmodel.$(libext): ../../Cards/param_card.dat +- cd ../../Source/MODEL; make ++$(LIBS): .libs + +-$(LIBDIR)libgeneric.$(libext): ../../Cards/run_card.dat ++.libs: ../../Cards/param_card.dat ../../Cards/run_card.dat + cd ../../Source; make ++ touch $@ ++ ++$(CUDACPP_BUILDDIR)/.cudacpplibs: ++ $(MAKE) -f $(CUDACPP_MAKEFILE) ++ touch $@ ++ ++# On Linux, set rpath to LIBDIR to make it unnecessary to use LD_LIBRARY_PATH ++# Use relative paths with respect to the executables ($ORIGIN on Linux) ++# On Darwin, building libraries with absolute paths in LIBDIR makes this unnecessary ++ifeq ($(UNAME_S),Darwin) ++ override LIBFLAGSRPATH = ++else ifeq ($(USEBUILDDIR),1) ++ override LIBFLAGSRPATH = -Wl,-rpath,'$$ORIGIN/../$(LIBDIR)/$(CUDACPP_BUILDDIR)' ++else ++ override LIBFLAGSRPATH = -Wl,-rpath,'$$ORIGIN/$(LIBDIR)' ++endif ++ ++.PHONY: madevent_fortran_link madevent_cuda_link madevent_cpp_link ++ ++madevent_fortran_link: $(PROG)_fortran ++ rm -f $(PROG) ++ ln -s $(PROG)_fortran $(PROG) ++ ++madevent_cpp_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp ++ rm -f $(PROG) ++ ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) ++ ++madevent_cuda_link: $(CUDACPP_BUILDDIR)/$(PROG)_cuda ++ rm -f $(PROG) ++ ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cuda $(PROG) + +-$(LIBDIR)libpdf.$(libext): +- cd ../../Source/PDF; make ++# Building $(PROG)_cpp also builds $(PROG)_cuda if $(CUDACPP_CULIB) exists (improved patch for cpp-only builds #503) ++$(CUDACPP_BUILDDIR)/$(PROG)_cpp: $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(LIBS) $(MATRIX) counters.o ompnumthreads.o $(CUDACPP_BUILDDIR)/.cudacpplibs ++ $(FC) -o $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o -L$(LIBDIR)/$(CUDACPP_BUILDDIR) -l$(CUDACPP_COMMONLIB) -l$(CUDACPP_CXXLIB) $(LIBFLAGSRPATH) $(LDFLAGS) ++ if [ -f $(LIBDIR)/$(CUDACPP_BUILDDIR)/lib$(CUDACPP_CULIB).* ]; then $(FC) -o $(CUDACPP_BUILDDIR)/$(PROG)_cuda $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o -L$(LIBDIR)/$(CUDACPP_BUILDDIR) -l$(CUDACPP_COMMONLIB) -l$(CUDACPP_CULIB) $(LIBFLAGSRPATH) $(LDFLAGS); fi + +-$(LIBDIR)libgammaUPC.$(libext): +- cd ../../Source/PDF/gammaUPC; make ++$(CUDACPP_BUILDDIR)/$(PROG)_cuda: $(CUDACPP_BUILDDIR)/$(PROG)_cpp ++ ++counters.o: counters.cc timer.h ++ $(CXX) $(CXXFLAGS) -c $< -o $@ ++ ++ompnumthreads.o: ompnumthreads.cc ompnumthreads.h ++ $(CXX) -I. $(CXXFLAGS) $(OMPFLAGS) -c $< -o $@ ++ ++$(PROG)_forhel: $(PROCESS) auto_dsig.o $(LIBS) $(MATRIX_HEL) ++ $(FC) -o $(PROG)_forhel $(PROCESS) $(MATRIX_HEL) $(LINKLIBS) $(LDFLAGS) $(BIASDEPENDENCIES) $(OMPFLAGS) ++ ++gensym: $(SYMMETRY) configs.inc $(LIBS) ++ $(FC) -o gensym $(SYMMETRY) -L$(LIBDIR) $(LINKLIBS) $(LDFLAGS) ++ ++###ifeq (,$(wildcard fbridge.inc)) # Pointless: fbridge.inc always exists as this is the cudacpp-modified makefile! ++###$(LIBDIR)libmodel.$(libext): ../../Cards/param_card.dat ++### cd ../../Source/MODEL; make ++### ++###$(LIBDIR)libgeneric.$(libext): ../../Cards/run_card.dat ++### cd ../../Source; make ++### ++###$(LIBDIR)libpdf.$(libext): ++### cd ../../Source/PDF; make ++### ++###$(LIBDIR)libgammaUPC.$(libext): ++### cd ../../Source/PDF/gammaUPC; make ++###endif + + # Add source so that the compiler finds the DiscreteSampler module. + $(MATRIX): %.o: %.f + $(FC) $(FFLAGS) $(MATRIX_FLAG) -c $< -I../../Source/ -I../../Source/PDF/gammaUPC + %.o: %.f + $(FC) $(FFLAGS) -c $< -I../../Source/ -I../../Source/PDF/gammaUPC ++%_cudacpp.o: %.f ++ $(FC) $(FFLAGS) -c -DMG5AMC_MEEXPORTER_CUDACPP $< -I../../Source/ $(OMPFLAGS) -o $@ + + # Dependencies + +@@ -97,5 +203,61 @@ unwgt.o: genps.inc nexternal.inc symswap.inc cluster.inc run.inc message.inc \ + run_config.inc + initcluster.o: message.inc + +-clean: +- $(RM) *.o gensym madevent madevent_forhel ++# Extra dependencies on discretesampler.mod ++ ++auto_dsig.o: .libs ++driver.o: .libs ++driver_cudacpp.o: .libs ++$(MATRIX): .libs ++genps.o: .libs ++ ++# Cudacpp avxall targets ++ ++UNAME_P := $(shell uname -p) ++ifeq ($(UNAME_P),ppc64le) ++avxall: avxnone avxsse4 ++else ifeq ($(UNAME_P),arm) ++avxall: avxnone avxsse4 ++else ++avxall: avxnone avxsse4 avxavx2 avx512y avx512z ++endif ++ ++avxnone: $(PROG)_fortran $(DSIG_cudacpp) ++ @echo ++ $(MAKE) USEBUILDDIR=1 AVX=none ++ ++avxsse4: $(PROG)_fortran $(DSIG_cudacpp) ++ @echo ++ $(MAKE) USEBUILDDIR=1 AVX=sse4 ++ ++avxavx2: $(PROG)_fortran $(DSIG_cudacpp) ++ @echo ++ $(MAKE) USEBUILDDIR=1 AVX=avx2 ++ ++avx512y: $(PROG)_fortran $(DSIG_cudacpp) ++ @echo ++ $(MAKE) USEBUILDDIR=1 AVX=512y ++ ++avx512z: $(PROG)_fortran $(DSIG_cudacpp) ++ @echo ++ $(MAKE) USEBUILDDIR=1 AVX=512z ++ ++###endif ++ ++# Clean (NB: 'make clean' in Source calls 'make clean' in all P*) ++ ++clean: # Clean builds: fortran in this Pn; cudacpp executables for one AVX in this Pn ++ $(RM) *.o gensym $(PROG) $(PROG)_fortran $(PROG)_forhel $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(CUDACPP_BUILDDIR)/$(PROG)_cuda ++ ++cleanavxs: clean # Clean builds: fortran in this Pn; cudacpp for all AVX in this Pn and in src ++ $(MAKE) -f $(CUDACPP_MAKEFILE) cleanall ++ rm -f $(CUDACPP_BUILDDIR)/.cudacpplibs ++ rm -f .libs ++ ++cleanall: # Clean builds: fortran in all P* and in Source; cudacpp for all AVX in all P* and in src ++ make -C ../../Source cleanall ++ rm -rf $(LIBDIR)libbias.$(libext) ++ rm -f ../../Source/*.mod ../../Source/*/*.mod ++ ++distclean: cleanall # Clean all fortran and cudacpp builds as well as the googletest installation ++ $(MAKE) -f $(CUDACPP_MAKEFILE) distclean diff --git b/epochX/cudacpp/gg_tt.mad/bin/internal/gen_ximprove.py a/epochX/cudacpp/gg_tt.mad/bin/internal/gen_ximprove.py index 4dd71db86..3b8ec3121 100755 --- b/epochX/cudacpp/gg_tt.mad/bin/internal/gen_ximprove.py From dd01050a29d74d154189de9d8c496c8404705611 Mon Sep 17 00:00:00 2001 From: Jorgen T Date: Thu, 28 Sep 2023 09:40:02 +0200 Subject: [PATCH 073/129] [CODEGEN] Fixed patch not applying because string does not exist in file that it is trying to patch --- .../CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common | 8 ++++---- epochX/cudacpp/gg_tt.mad/SubProcesses/makefile | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common index 18470e9ebf..205390bacc 100644 --- a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common +++ b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common @@ -340,10 +340,10 @@ index a056d3861..b70b548e5 100755 alljobs = misc.glob('ajob*', Pdir) #remove associated results.dat (ensure to not mix with all data) -diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile +diff --git b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile index 74db44d84..36a1e90b5 100644 ---- a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile -+++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile +--- b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile ++++ a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile @@ -9,6 +9,24 @@ FFLAGS+= -cpp # Compile counters with -O3 as in the cudacpp makefile (avoid being "unfair" to Fortran #740) CXXFLAGS = -O3 -Wall -Wshadow -Wextra @@ -377,7 +377,7 @@ index 74db44d84..36a1e90b5 100644 +CUDACPP_MAKEENV:=$(shell echo '$(.VARIABLES)' | tr " " "\n" | egrep "(USEBUILDDIR|FPTYPE|HELINL|HRDCOD)") ###$(info CUDACPP_MAKEENV=$(CUDACPP_MAKEENV)) ###$(info $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))")) --CUDACPP_BUILDDIR:=$(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn |& awk '/Building/{print $$3}' | sed s/BUILDDIR=//) +-CUDACPP_BUILDDIR:=$(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn 2>/dev/null |& awk '/Building/{print $$3}' | sed s/BUILDDIR=//) +CUDACPP_BUILDDIR:=$(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn $(TARGET) |& awk '/Building/{print $$3}' | sed s/BUILDDIR=//) ifeq ($(CUDACPP_BUILDDIR),) $(error CUDACPP_BUILDDIR='$(CUDACPP_BUILDDIR)' should not be empty!) diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile index 36a1e90b59..597facb814 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile @@ -69,7 +69,7 @@ CUDACPP_MAKEFILE=cudacpp.mk CUDACPP_MAKEENV:=$(shell echo '$(.VARIABLES)' | tr " " "\n" | egrep "(USEBUILDDIR|FPTYPE|HELINL|HRDCOD)") ###$(info CUDACPP_MAKEENV=$(CUDACPP_MAKEENV)) ###$(info $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))")) -CUDACPP_BUILDDIR:=$(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn $(TARGET) |& awk '/Building/{print $$3}' | sed s/BUILDDIR=//) +CUDACPP_BUILDDIR:=$(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn $(TARGET) 2>/dev/null |& awk '/Building/{print $$3}' | sed s/BUILDDIR=//) ifeq ($(CUDACPP_BUILDDIR),) $(error CUDACPP_BUILDDIR='$(CUDACPP_BUILDDIR)' should not be empty!) else From e75ca3835c2457469e40834cf18ab75433849a1e Mon Sep 17 00:00:00 2001 From: Jorgen T Date: Thu, 28 Sep 2023 09:44:42 +0200 Subject: [PATCH 074/129] [CODEGEN] Fixed mismatch in patch.common --- .../PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common index 205390bacc..8b4116395d 100644 --- a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common +++ b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common @@ -377,8 +377,8 @@ index 74db44d84..36a1e90b5 100644 +CUDACPP_MAKEENV:=$(shell echo '$(.VARIABLES)' | tr " " "\n" | egrep "(USEBUILDDIR|FPTYPE|HELINL|HRDCOD)") ###$(info CUDACPP_MAKEENV=$(CUDACPP_MAKEENV)) ###$(info $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))")) --CUDACPP_BUILDDIR:=$(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn 2>/dev/null |& awk '/Building/{print $$3}' | sed s/BUILDDIR=//) -+CUDACPP_BUILDDIR:=$(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn $(TARGET) |& awk '/Building/{print $$3}' | sed s/BUILDDIR=//) +-CUDACPP_BUILDDIR:=$(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn 2>/dev/null | awk '/Building/{print $$3}' | sed s/BUILDDIR=//) ++CUDACPP_BUILDDIR:=$(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn $(TARGET) 2>/dev/null | awk '/Building/{print $$3}' | sed s/BUILDDIR=//) ifeq ($(CUDACPP_BUILDDIR),) $(error CUDACPP_BUILDDIR='$(CUDACPP_BUILDDIR)' should not be empty!) else From 191e1122c85245620b76418847ab536bdb438478 Mon Sep 17 00:00:00 2001 From: Jorgen T Date: Thu, 28 Sep 2023 11:50:51 +0200 Subject: [PATCH 075/129] Sets correct cppavx dependency for compiling madevent_cpp --- .../cudacpp/gg_tt.mad/SubProcesses/makefile | 23 +++++++++++-------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile index 597facb814..1cabeb5ff4 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile @@ -20,6 +20,11 @@ else endif endif +# Sets correct cppavx target as dependency when compiling Fortran +ifneq (,$(findstring cpp*,$(TARGET))) + CPPTARGET := $(TARGET) +endif + # Default goal .DEFAULT_GOAL := usage @@ -151,39 +156,39 @@ madevent_fortran_link: $(PROG)_fortran ln -s $(PROG)_fortran $(PROG) # Only used for testing, should be removed in the future -madevent_cpp_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp cppavx2 +madevent_cpp_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp rm -f $(PROG) ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) -madevent_cppnone_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp cppnone +madevent_cppnone_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp rm -f $(PROG) ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) -madevent_cppsse4_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp cppsse4 +madevent_cppsse4_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp rm -f $(PROG) ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) -madevent_cppavx2_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp cppavx2 +madevent_cppavx2_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp rm -f $(PROG) ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) -madevent_cpp512y_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp cpp512y +madevent_cpp512y_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp rm -f $(PROG) ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) -madevent_cpp512z_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp cpp512z +madevent_cpp512z_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp rm -f $(PROG) ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) -madevent_cuda_link: $(CUDACPP_BUILDDIR)/$(PROG)_cuda cuda +madevent_cuda_link: $(CUDACPP_BUILDDIR)/$(PROG)_cuda rm -f $(PROG) ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cuda $(PROG) # Building $(PROG)_cpp also builds $(PROG)_cuda if $(CUDACPP_CULIB) exists (improved patch for cpp-only builds #503) -$(CUDACPP_BUILDDIR)/$(PROG)_cpp: $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(LIBS) $(MATRIX) counters.o ompnumthreads.o +$(CUDACPP_BUILDDIR)/$(PROG)_cpp: $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(LIBS) $(MATRIX) counters.o ompnumthreads.o $(CPPTARGET) $(FC) -o $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o -L$(LIBDIR)/$(CUDACPP_BUILDDIR) -l$(CUDACPP_COMMONLIB) -l$(CUDACPP_CXXLIB) $(LIBFLAGSRPATH) $(LDFLAGS) -$(CUDACPP_BUILDDIR)/$(PROG)_cuda: $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(LIBS) $(MATRIX) counters.o ompnumthreads.o +$(CUDACPP_BUILDDIR)/$(PROG)_cuda: $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(LIBS) $(MATRIX) counters.o ompnumthreads.o cuda $(FC) -o $(CUDACPP_BUILDDIR)/$(PROG)_cuda $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o -L$(LIBDIR)/$(CUDACPP_BUILDDIR) -l$(CUDACPP_COMMONLIB) -l$(CUDACPP_CULIB) $(LIBFLAGSRPATH) $(LDFLAGS) counters.o: counters.cc timer.h From 67dd7762242593a5c1b664d4e08e43071a9e4680 Mon Sep 17 00:00:00 2001 From: Jorgen T Date: Thu, 28 Sep 2023 11:55:29 +0200 Subject: [PATCH 076/129] Fixed unneccessary & in CUDACPP_BUILDDIR assignment --- epochX/cudacpp/gg_tt.mad/SubProcesses/makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile index 1cabeb5ff4..8048293272 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile @@ -74,7 +74,7 @@ CUDACPP_MAKEFILE=cudacpp.mk CUDACPP_MAKEENV:=$(shell echo '$(.VARIABLES)' | tr " " "\n" | egrep "(USEBUILDDIR|FPTYPE|HELINL|HRDCOD)") ###$(info CUDACPP_MAKEENV=$(CUDACPP_MAKEENV)) ###$(info $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))")) -CUDACPP_BUILDDIR:=$(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn $(TARGET) 2>/dev/null |& awk '/Building/{print $$3}' | sed s/BUILDDIR=//) +CUDACPP_BUILDDIR:=$(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn $(TARGET) 2>/dev/null | awk '/Building/{print $$3}' | sed s/BUILDDIR=//) ifeq ($(CUDACPP_BUILDDIR),) $(error CUDACPP_BUILDDIR='$(CUDACPP_BUILDDIR)' should not be empty!) else From 9e974c053dd5f242994e74be9100b4fddf8db898 Mon Sep 17 00:00:00 2001 From: Jorgen T Date: Thu, 28 Sep 2023 12:03:06 +0200 Subject: [PATCH 077/129] [CODEGEN] Add the dependency on cppavx target when compiling madevent_cpp in codegen patch --- .../MG5aMC_patches/PROD/patch.common | 51 ++++++++++--------- 1 file changed, 27 insertions(+), 24 deletions(-) diff --git a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common index 8b4116395d..b21e919b8c 100644 --- a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common +++ b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common @@ -82,11 +82,11 @@ index 348c283be..74db44d84 100644 +###$(info CUDACPP_MAKEENV=$(CUDACPP_MAKEENV)) +###$(info $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))")) +CUDACPP_BUILDDIR:=$(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn 2>/dev/null | awk '/Building/{print $$3}' | sed s/BUILDDIR=//) -+#ifeq ($(CUDACPP_BUILDDIR),) -+#$(error CUDACPP_BUILDDIR='$(CUDACPP_BUILDDIR)' should not be empty!) -+#else ++ifeq ($(CUDACPP_BUILDDIR),) ++$(error CUDACPP_BUILDDIR='$(CUDACPP_BUILDDIR)' should not be empty!) ++else +$(info CUDACPP_BUILDDIR='$(CUDACPP_BUILDDIR)') -+#endif ++endif +CUDACPP_COMMONLIB=mg5amc_common +CUDACPP_CXXLIB=mg5amc_$(processid_short)_cpp +CUDACPP_CULIB=mg5amc_$(processid_short)_cuda @@ -341,10 +341,10 @@ index a056d3861..b70b548e5 100755 #remove associated results.dat (ensure to not mix with all data) diff --git b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile -index 74db44d84..36a1e90b5 100644 +index 74db44d84..804829327 100644 --- b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile +++ a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile -@@ -9,6 +9,24 @@ FFLAGS+= -cpp +@@ -9,6 +9,29 @@ FFLAGS+= -cpp # Compile counters with -O3 as in the cudacpp makefile (avoid being "unfair" to Fortran #740) CXXFLAGS = -O3 -Wall -Wshadow -Wextra @@ -359,6 +359,11 @@ index 74db44d84..36a1e90b5 100644 + endif +endif + ++# Sets correct cppavx target as dependency when compiling Fortran ++ifneq (,$(findstring cpp*,$(TARGET))) ++ CPPTARGET := $(TARGET) ++endif ++ +# Default goal +.DEFAULT_GOAL := usage + @@ -369,7 +374,7 @@ index 74db44d84..36a1e90b5 100644 # Enable ccache if USECCACHE=1 ifeq ($(USECCACHE)$(shell echo $(CXX) | grep ccache),1) override CXX:=ccache $(CXX) -@@ -48,10 +66,10 @@ CUDACPP_MAKEFILE=cudacpp.mk +@@ -48,10 +71,10 @@ CUDACPP_MAKEFILE=cudacpp.mk # NB2 Use '|&' in CUDACPP_BUILDDIR to avoid confusing errors about googletest #507 # NB3 Do not add a comment inlined "CUDACPP_BUILDDIR=$(shell ...) # comment" as otherwise a trailing space is included... # NB4 The variables relevant to the cudacpp Makefile must be explicitly passed to $(shell...) @@ -382,7 +387,7 @@ index 74db44d84..36a1e90b5 100644 ifeq ($(CUDACPP_BUILDDIR),) $(error CUDACPP_BUILDDIR='$(CUDACPP_BUILDDIR)' should not be empty!) else -@@ -115,10 +133,6 @@ $(LIBS): .libs +@@ -115,10 +138,6 @@ $(LIBS): .libs cd ../../Source; make touch $@ @@ -393,7 +398,7 @@ index 74db44d84..36a1e90b5 100644 # On Linux, set rpath to LIBDIR to make it unnecessary to use LD_LIBRARY_PATH # Use relative paths with respect to the executables ($ORIGIN on Linux) # On Darwin, building libraries with absolute paths in LIBDIR makes this unnecessary -@@ -130,26 +144,47 @@ else +@@ -130,26 +149,47 @@ else override LIBFLAGSRPATH = -Wl,-rpath,'$$ORIGIN/$(LIBDIR)' endif @@ -404,50 +409,48 @@ index 74db44d84..36a1e90b5 100644 rm -f $(PROG) ln -s $(PROG)_fortran $(PROG) --madevent_cpp_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp +# Only used for testing, should be removed in the future -+madevent_cpp_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp cppavx2 + madevent_cpp_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp + rm -f $(PROG) + ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) + ++madevent_cppnone_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp + rm -f $(PROG) + ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) + -+madevent_cppnone_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp cppnone ++madevent_cppsse4_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp + rm -f $(PROG) + ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) + -+madevent_cppsse4_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp cppsse4 ++madevent_cppavx2_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp + rm -f $(PROG) + ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) + -+madevent_cppavx2_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp cppavx2 ++madevent_cpp512y_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp + rm -f $(PROG) + ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) + -+madevent_cpp512y_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp cpp512y ++madevent_cpp512z_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp + rm -f $(PROG) + ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) + -+madevent_cpp512z_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp cpp512z - rm -f $(PROG) - ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) - --madevent_cuda_link: $(CUDACPP_BUILDDIR)/$(PROG)_cuda -+madevent_cuda_link: $(CUDACPP_BUILDDIR)/$(PROG)_cuda cuda + madevent_cuda_link: $(CUDACPP_BUILDDIR)/$(PROG)_cuda rm -f $(PROG) ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cuda $(PROG) # Building $(PROG)_cpp also builds $(PROG)_cuda if $(CUDACPP_CULIB) exists (improved patch for cpp-only builds #503) -$(CUDACPP_BUILDDIR)/$(PROG)_cpp: $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(LIBS) $(MATRIX) counters.o ompnumthreads.o $(CUDACPP_BUILDDIR)/.cudacpplibs -+$(CUDACPP_BUILDDIR)/$(PROG)_cpp: $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(LIBS) $(MATRIX) counters.o ompnumthreads.o ++$(CUDACPP_BUILDDIR)/$(PROG)_cpp: $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(LIBS) $(MATRIX) counters.o ompnumthreads.o $(CPPTARGET) $(FC) -o $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o -L$(LIBDIR)/$(CUDACPP_BUILDDIR) -l$(CUDACPP_COMMONLIB) -l$(CUDACPP_CXXLIB) $(LIBFLAGSRPATH) $(LDFLAGS) - if [ -f $(LIBDIR)/$(CUDACPP_BUILDDIR)/lib$(CUDACPP_CULIB).* ]; then $(FC) -o $(CUDACPP_BUILDDIR)/$(PROG)_cuda $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o -L$(LIBDIR)/$(CUDACPP_BUILDDIR) -l$(CUDACPP_COMMONLIB) -l$(CUDACPP_CULIB) $(LIBFLAGSRPATH) $(LDFLAGS); fi -$(CUDACPP_BUILDDIR)/$(PROG)_cuda: $(CUDACPP_BUILDDIR)/$(PROG)_cpp -+$(CUDACPP_BUILDDIR)/$(PROG)_cuda: $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(LIBS) $(MATRIX) counters.o ompnumthreads.o ++$(CUDACPP_BUILDDIR)/$(PROG)_cuda: $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(LIBS) $(MATRIX) counters.o ompnumthreads.o cuda + $(FC) -o $(CUDACPP_BUILDDIR)/$(PROG)_cuda $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o -L$(LIBDIR)/$(CUDACPP_BUILDDIR) -l$(CUDACPP_COMMONLIB) -l$(CUDACPP_CULIB) $(LIBFLAGSRPATH) $(LDFLAGS) counters.o: counters.cc timer.h $(CXX) $(CXXFLAGS) -c $< -o $@ -@@ -215,49 +250,105 @@ genps.o: .libs +@@ -215,49 +255,105 @@ genps.o: .libs UNAME_P := $(shell uname -p) ifeq ($(UNAME_P),ppc64le) From 564682a18a4719a99e0f283d72d746bc8182020a Mon Sep 17 00:00:00 2001 From: Jorgen T Date: Thu, 28 Sep 2023 12:16:45 +0200 Subject: [PATCH 078/129] [CODEGEN] Now sets correct target for linking with cppavx target in runcard --- .../CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common | 6 +++++- epochX/cudacpp/gg_tt.mad/SubProcesses/makefile | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common index b21e919b8c..f891e325ff 100644 --- a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common +++ b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common @@ -361,7 +361,11 @@ index 74db44d84..804829327 100644 + +# Sets correct cppavx target as dependency when compiling Fortran +ifneq (,$(findstring cpp*,$(TARGET))) -+ CPPTARGET := $(TARGET) ++ ifeq ($(TARGET),) ++ CPPTARGET := cppavx2 ++ else ++ CPPTARGET := $(TARGET) ++ endif +endif + +# Default goal diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile index 8048293272..7ae599f03e 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile @@ -22,7 +22,11 @@ endif # Sets correct cppavx target as dependency when compiling Fortran ifneq (,$(findstring cpp*,$(TARGET))) - CPPTARGET := $(TARGET) + ifeq ($(TARGET),) + CPPTARGET := cppavx2 + else + CPPTARGET := $(TARGET) + endif endif # Default goal From 6382b5a359713205813e6f47c98dda0cac9e23ac Mon Sep 17 00:00:00 2001 From: Jorgen T Date: Thu, 28 Sep 2023 12:22:58 +0200 Subject: [PATCH 079/129] [CODEGEN] Fixed patch.commen to have correct intervals in git diff --- .../MG5aMC_patches/PROD/patch.common | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common index f891e325ff..0c8ca0cf8b 100644 --- a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common +++ b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common @@ -341,10 +341,10 @@ index a056d3861..b70b548e5 100755 #remove associated results.dat (ensure to not mix with all data) diff --git b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile -index 74db44d84..804829327 100644 +index 74db44d84..7ae599f03 100644 --- b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile +++ a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile -@@ -9,6 +9,29 @@ FFLAGS+= -cpp +@@ -9,6 +9,33 @@ FFLAGS+= -cpp # Compile counters with -O3 as in the cudacpp makefile (avoid being "unfair" to Fortran #740) CXXFLAGS = -O3 -Wall -Wshadow -Wextra @@ -378,7 +378,7 @@ index 74db44d84..804829327 100644 # Enable ccache if USECCACHE=1 ifeq ($(USECCACHE)$(shell echo $(CXX) | grep ccache),1) override CXX:=ccache $(CXX) -@@ -48,10 +71,10 @@ CUDACPP_MAKEFILE=cudacpp.mk +@@ -48,10 +75,10 @@ CUDACPP_MAKEFILE=cudacpp.mk # NB2 Use '|&' in CUDACPP_BUILDDIR to avoid confusing errors about googletest #507 # NB3 Do not add a comment inlined "CUDACPP_BUILDDIR=$(shell ...) # comment" as otherwise a trailing space is included... # NB4 The variables relevant to the cudacpp Makefile must be explicitly passed to $(shell...) @@ -391,7 +391,7 @@ index 74db44d84..804829327 100644 ifeq ($(CUDACPP_BUILDDIR),) $(error CUDACPP_BUILDDIR='$(CUDACPP_BUILDDIR)' should not be empty!) else -@@ -115,10 +138,6 @@ $(LIBS): .libs +@@ -115,10 +142,6 @@ $(LIBS): .libs cd ../../Source; make touch $@ @@ -402,7 +402,7 @@ index 74db44d84..804829327 100644 # On Linux, set rpath to LIBDIR to make it unnecessary to use LD_LIBRARY_PATH # Use relative paths with respect to the executables ($ORIGIN on Linux) # On Darwin, building libraries with absolute paths in LIBDIR makes this unnecessary -@@ -130,26 +149,47 @@ else +@@ -130,26 +153,47 @@ else override LIBFLAGSRPATH = -Wl,-rpath,'$$ORIGIN/$(LIBDIR)' endif @@ -454,7 +454,7 @@ index 74db44d84..804829327 100644 counters.o: counters.cc timer.h $(CXX) $(CXXFLAGS) -c $< -o $@ -@@ -215,49 +255,105 @@ genps.o: .libs +@@ -215,49 +259,105 @@ genps.o: .libs UNAME_P := $(shell uname -p) ifeq ($(UNAME_P),ppc64le) From 6092d6a70656c6c14245a1d9b498b518fe7cb487 Mon Sep 17 00:00:00 2001 From: Jorgen T Date: Thu, 28 Sep 2023 13:32:45 +0200 Subject: [PATCH 080/129] [CODEGEN] Correctly assigns CPPTARGET in compiling madevent_cpp --- .../PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common | 4 ++-- epochX/cudacpp/gg_tt.mad/SubProcesses/makefile | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common index 0c8ca0cf8b..c7807b1a80 100644 --- a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common +++ b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common @@ -353,7 +353,7 @@ index 74db44d84..7ae599f03 100644 + TARGET := undefined +else + ifneq (,$(findstring madevent_*,$(MAKECMDGOALS))) -+ TARGET := $(patsubst %_%,%,$(MAKECMDGOALS)) ++ TARGET := $(patsubst madevent_cpp%,cpp%,$(filter madevent_cpp%,$(MAKECMDGOALS))) + else + TARGET := $(MAKECMDGOALS) + endif @@ -361,7 +361,7 @@ index 74db44d84..7ae599f03 100644 + +# Sets correct cppavx target as dependency when compiling Fortran +ifneq (,$(findstring cpp*,$(TARGET))) -+ ifeq ($(TARGET),) ++ ifeq ($(TARGET),cpp) + CPPTARGET := cppavx2 + else + CPPTARGET := $(TARGET) diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile index 7ae599f03e..bdd165f70c 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile @@ -14,7 +14,7 @@ ifeq ($(MAKECMDGOALS),) TARGET := undefined else ifneq (,$(findstring madevent_*,$(MAKECMDGOALS))) - TARGET := $(patsubst %_%,%,$(MAKECMDGOALS)) + TARGET := $(patsubst madevent_cpp%,cpp%,$(filter madevent_cpp%,$(MAKECMDGOALS))) else TARGET := $(MAKECMDGOALS) endif @@ -22,7 +22,7 @@ endif # Sets correct cppavx target as dependency when compiling Fortran ifneq (,$(findstring cpp*,$(TARGET))) - ifeq ($(TARGET),) + ifeq ($(TARGET),cpp) CPPTARGET := cppavx2 else CPPTARGET := $(TARGET) From bedb79c07f51a9dbc61c6385e537f87e294f6a22 Mon Sep 17 00:00:00 2001 From: Jorgen T Date: Thu, 28 Sep 2023 15:58:14 +0200 Subject: [PATCH 081/129] [CODEGEN] Correctly sets dependencies for madevent_cpp --- .../CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common | 4 ++-- epochX/cudacpp/gg_tt.mad/SubProcesses/makefile | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common index c7807b1a80..bab28d89be 100644 --- a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common +++ b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common @@ -352,7 +352,7 @@ index 74db44d84..7ae599f03 100644 +ifeq ($(MAKECMDGOALS),) + TARGET := undefined +else -+ ifneq (,$(findstring madevent_*,$(MAKECMDGOALS))) ++ ifeq ($(shell grep -q madevent_ <<< $(MAKECMDGOALS)a),) + TARGET := $(patsubst madevent_cpp%,cpp%,$(filter madevent_cpp%,$(MAKECMDGOALS))) + else + TARGET := $(MAKECMDGOALS) @@ -360,7 +360,7 @@ index 74db44d84..7ae599f03 100644 +endif + +# Sets correct cppavx target as dependency when compiling Fortran -+ifneq (,$(findstring cpp*,$(TARGET))) ++ifeq ($(shell grep -q cpp <<< $(MAKECMDGOALS)a),) + ifeq ($(TARGET),cpp) + CPPTARGET := cppavx2 + else diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile index bdd165f70c..27a8c3a83a 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile @@ -13,15 +13,15 @@ CXXFLAGS = -O3 -Wall -Wshadow -Wextra ifeq ($(MAKECMDGOALS),) TARGET := undefined else - ifneq (,$(findstring madevent_*,$(MAKECMDGOALS))) - TARGET := $(patsubst madevent_cpp%,cpp%,$(filter madevent_cpp%,$(MAKECMDGOALS))) + ifeq ($(shell grep -q madevent_ <<< $(MAKECMDGOALS)a),) + TARGET := $(word 2,($(subst _, ,$(MAKECMDGOALS)))) else TARGET := $(MAKECMDGOALS) endif endif # Sets correct cppavx target as dependency when compiling Fortran -ifneq (,$(findstring cpp*,$(TARGET))) +ifeq ($(shell grep -q cpp <<< $(MAKECMDGOALS)a),) ifeq ($(TARGET),cpp) CPPTARGET := cppavx2 else From cf1b21b8d871682797c423bec5f0125fd94cbf8f Mon Sep 17 00:00:00 2001 From: Jorgen T Date: Thu, 28 Sep 2023 16:00:51 +0200 Subject: [PATCH 082/129] [CODEGEN] Correctly sets target if madevent is in $MAKECMDGOALS --- .../PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common index bab28d89be..3cb3541cad 100644 --- a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common +++ b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common @@ -353,7 +353,7 @@ index 74db44d84..7ae599f03 100644 + TARGET := undefined +else + ifeq ($(shell grep -q madevent_ <<< $(MAKECMDGOALS)a),) -+ TARGET := $(patsubst madevent_cpp%,cpp%,$(filter madevent_cpp%,$(MAKECMDGOALS))) ++ TARGET := $(word 2,($(subst _, ,$(MAKECMDGOALS)))) + else + TARGET := $(MAKECMDGOALS) + endif From 75c5be6d71694d2d2e4a6f29bdbe9bbc0795e9af Mon Sep 17 00:00:00 2001 From: Jorgen T Date: Fri, 29 Sep 2023 16:58:31 +0200 Subject: [PATCH 083/129] [CODEGEN] Regenerated all .sa/.mad processes --- .../ee_mumu.mad/Cards/delphes_trigger.dat | 20 + .../cudacpp/ee_mumu.mad/Cards/ident_card.dat | 28 +- .../ee_mumu.mad/Cards/me5_configuration.txt | 4 +- .../cudacpp/ee_mumu.mad/Cards/plot_card.dat | 203 + .../ee_mumu.mad/Cards/proc_card_mg5.dat | 10 +- epochX/cudacpp/ee_mumu.mad/Cards/run_card.dat | 12 +- .../ee_mumu.mad/Source/DHELAS/FFV4_0.f | 8 +- .../ee_mumu.mad/Source/DHELAS/FFV4_3.f | 12 +- .../ee_mumu.mad/Source/DHELAS/aloha_file.inc | 2 +- .../ee_mumu.mad/Source/PDF/pdfwrap_lhapdf.f | 1 + epochX/cudacpp/ee_mumu.mad/Source/make_opts | 12 +- epochX/cudacpp/ee_mumu.mad/Source/makefile | 4 +- .../SubProcesses/MatrixElementKernels.cc | 9 +- .../SubProcesses/P1_epem_mupmum/CPPProcess.cc | 26 +- .../SubProcesses/P1_epem_mupmum/auto_dsig1.f | 20 +- .../SubProcesses/P1_epem_mupmum/counters.cc | 115 +- .../SubProcesses/P1_epem_mupmum/matrix1.f | 2 - .../P1_epem_mupmum/ompnumthreads.cc | 26 +- .../ee_mumu.mad/SubProcesses/counters.cc | 99 + .../ee_mumu.mad/SubProcesses/cudacpp.mk | 386 +- .../ee_mumu.mad/SubProcesses/dummy_fct.f | 10 +- .../cudacpp/ee_mumu.mad/SubProcesses/makefile | 172 +- .../ee_mumu.mad/SubProcesses/ompnumthreads.cc | 25 + .../SubProcesses/proc_characteristics | 2 +- .../cudacpp/ee_mumu.mad/bin/generate_events | 22 +- .../ee_mumu.mad/bin/internal/banner.py | 284 +- .../bin/internal/check_param_card.py | 2 +- .../bin/internal/common_run_interface.py | 11 +- .../ee_mumu.mad/bin/internal/extended_cmd.py | 8 +- .../ee_mumu.mad/bin/internal/gen_ximprove.py | 9 +- .../ee_mumu.mad/bin/internal/launch_plugin.py | 100 + .../bin/internal/madevent_interface.py | 6 +- .../cudacpp/ee_mumu.mad/bin/internal/run_plot | 47 + .../ee_mumu.mad/bin/internal/run_plot_delphes | 46 + .../ee_mumu.mad/bin/internal/run_plot_pgs | 47 + .../ee_mumu.mad/bin/internal/run_plot_pythia | 50 + epochX/cudacpp/ee_mumu.mad/bin/madevent | 26 +- epochX/cudacpp/ee_mumu.mad/src/HelAmps_sm.h | 52 +- epochX/cudacpp/ee_mumu.mad/src/cudacpp_src.mk | 171 +- .../SubProcesses/MatrixElementKernels.cc | 9 +- .../P1_Sigma_sm_epem_mupmum/CPPProcess.cc | 26 +- .../ee_mumu.sa/SubProcesses/cudacpp.mk | 386 +- epochX/cudacpp/ee_mumu.sa/src/HelAmps_sm.h | 52 +- epochX/cudacpp/ee_mumu.sa/src/cudacpp_src.mk | 171 +- .../gg_tt.mad/Cards/delphes_trigger.dat | 20 + .../gg_tt.mad/Cards/me5_configuration.txt | 4 +- epochX/cudacpp/gg_tt.mad/Cards/plot_card.dat | 203 + epochX/cudacpp/gg_tt.mad/Cards/run_card.dat | 12 +- .../gg_tt.mad/Source/DHELAS/aloha_file.inc | 2 +- .../gg_tt.mad/Source/PDF/pdfwrap_lhapdf.f | 1 + epochX/cudacpp/gg_tt.mad/Source/make_opts | 12 +- epochX/cudacpp/gg_tt.mad/Source/makefile | 4 +- .../SubProcesses/MatrixElementKernels.cc | 9 +- .../SubProcesses/P1_gg_ttx/CPPProcess.cc | 15 +- .../SubProcesses/P1_gg_ttx/auto_dsig1.f | 18 +- .../cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk | 2 +- .../gg_tt.mad/SubProcesses/dummy_fct.f | 10 +- .../cudacpp/gg_tt.mad/SubProcesses/makefile | 2 +- epochX/cudacpp/gg_tt.mad/bin/generate_events | 22 +- .../cudacpp/gg_tt.mad/bin/internal/banner.py | 284 +- .../bin/internal/check_param_card.py | 2 +- .../bin/internal/common_run_interface.py | 11 +- .../gg_tt.mad/bin/internal/extended_cmd.py | 8 +- .../gg_tt.mad/bin/internal/gen_ximprove.py | 9 +- .../gg_tt.mad/bin/internal/launch_plugin.py | 100 + .../bin/internal/madevent_interface.py | 6 +- .../cudacpp/gg_tt.mad/bin/internal/run_plot | 47 + .../gg_tt.mad/bin/internal/run_plot_delphes | 46 + .../gg_tt.mad/bin/internal/run_plot_pgs | 47 + .../gg_tt.mad/bin/internal/run_plot_pythia | 50 + epochX/cudacpp/gg_tt.mad/bin/madevent | 26 +- epochX/cudacpp/gg_tt.mad/src/HelAmps_sm.h | 8 + epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk | 2 +- .../SubProcesses/MatrixElementKernels.cc | 9 +- .../P1_Sigma_sm_gg_ttx/CPPProcess.cc | 15 +- .../cudacpp/gg_tt.sa/SubProcesses/cudacpp.mk | 386 +- epochX/cudacpp/gg_tt.sa/src/HelAmps_sm.h | 8 + epochX/cudacpp/gg_tt.sa/src/cudacpp_src.mk | 171 +- .../gg_ttg.mad/Cards/delphes_trigger.dat | 20 + .../gg_ttg.mad/Cards/me5_configuration.txt | 4 +- epochX/cudacpp/gg_ttg.mad/Cards/plot_card.dat | 203 + epochX/cudacpp/gg_ttg.mad/Cards/run_card.dat | 12 +- .../gg_ttg.mad/Source/DHELAS/aloha_file.inc | 2 +- .../gg_ttg.mad/Source/PDF/pdfwrap_lhapdf.f | 1 + epochX/cudacpp/gg_ttg.mad/Source/make_opts | 12 +- epochX/cudacpp/gg_ttg.mad/Source/makefile | 4 +- .../SubProcesses/MatrixElementKernels.cc | 9 +- .../SubProcesses/P1_gg_ttxg/CPPProcess.cc | 65 +- .../SubProcesses/P1_gg_ttxg/auto_dsig1.f | 18 +- .../SubProcesses/P1_gg_ttxg/matrix1.f | 49 +- .../gg_ttg.mad/SubProcesses/cudacpp.mk | 386 +- .../gg_ttg.mad/SubProcesses/dummy_fct.f | 10 +- .../cudacpp/gg_ttg.mad/SubProcesses/makefile | 172 +- epochX/cudacpp/gg_ttg.mad/bin/generate_events | 22 +- .../cudacpp/gg_ttg.mad/bin/internal/banner.py | 284 +- .../bin/internal/check_param_card.py | 2 +- .../bin/internal/common_run_interface.py | 11 +- .../gg_ttg.mad/bin/internal/extended_cmd.py | 8 +- .../gg_ttg.mad/bin/internal/gen_ximprove.py | 9 +- .../gg_ttg.mad/bin/internal/launch_plugin.py | 100 + .../bin/internal/madevent_interface.py | 6 +- .../cudacpp/gg_ttg.mad/bin/internal/run_plot | 47 + .../gg_ttg.mad/bin/internal/run_plot_delphes | 46 + .../gg_ttg.mad/bin/internal/run_plot_pgs | 47 + .../gg_ttg.mad/bin/internal/run_plot_pythia | 50 + epochX/cudacpp/gg_ttg.mad/bin/madevent | 26 +- epochX/cudacpp/gg_ttg.mad/src/HelAmps_sm.h | 18 + epochX/cudacpp/gg_ttg.mad/src/cudacpp_src.mk | 171 +- .../SubProcesses/MatrixElementKernels.cc | 9 +- .../P1_Sigma_sm_gg_ttxg/CPPProcess.cc | 65 +- .../cudacpp/gg_ttg.sa/SubProcesses/cudacpp.mk | 386 +- epochX/cudacpp/gg_ttg.sa/src/HelAmps_sm.h | 18 + epochX/cudacpp/gg_ttg.sa/src/cudacpp_src.mk | 171 +- .../gg_ttgg.mad/Cards/delphes_trigger.dat | 20 + .../gg_ttgg.mad/Cards/me5_configuration.txt | 4 +- .../cudacpp/gg_ttgg.mad/Cards/plot_card.dat | 203 + epochX/cudacpp/gg_ttgg.mad/Cards/run_card.dat | 12 +- .../gg_ttgg.mad/Source/DHELAS/aloha_file.inc | 2 +- .../gg_ttgg.mad/Source/PDF/pdfwrap_lhapdf.f | 1 + epochX/cudacpp/gg_ttgg.mad/Source/make_opts | 12 +- epochX/cudacpp/gg_ttgg.mad/Source/makefile | 4 +- .../SubProcesses/MatrixElementKernels.cc | 9 +- .../SubProcesses/P1_gg_ttxgg/CPPProcess.cc | 435 +- .../SubProcesses/P1_gg_ttxgg/auto_dsig1.f | 18 +- .../SubProcesses/P1_gg_ttxgg/matrix1.f | 638 +- .../gg_ttgg.mad/SubProcesses/cudacpp.mk | 386 +- .../gg_ttgg.mad/SubProcesses/dummy_fct.f | 10 +- .../cudacpp/gg_ttgg.mad/SubProcesses/makefile | 172 +- .../cudacpp/gg_ttgg.mad/bin/generate_events | 22 +- .../gg_ttgg.mad/bin/internal/banner.py | 284 +- .../bin/internal/check_param_card.py | 2 +- .../bin/internal/common_run_interface.py | 11 +- .../gg_ttgg.mad/bin/internal/extended_cmd.py | 8 +- .../gg_ttgg.mad/bin/internal/gen_ximprove.py | 9 +- .../gg_ttgg.mad/bin/internal/launch_plugin.py | 100 + .../bin/internal/madevent_interface.py | 6 +- .../cudacpp/gg_ttgg.mad/bin/internal/run_plot | 47 + .../gg_ttgg.mad/bin/internal/run_plot_delphes | 46 + .../gg_ttgg.mad/bin/internal/run_plot_pgs | 47 + .../gg_ttgg.mad/bin/internal/run_plot_pythia | 50 + epochX/cudacpp/gg_ttgg.mad/bin/madevent | 26 +- epochX/cudacpp/gg_ttgg.mad/src/HelAmps_sm.h | 24 + epochX/cudacpp/gg_ttgg.mad/src/cudacpp_src.mk | 171 +- .../SubProcesses/MatrixElementKernels.cc | 9 +- .../P1_Sigma_sm_gg_ttxgg/CPPProcess.cc | 435 +- .../gg_ttgg.sa/SubProcesses/cudacpp.mk | 386 +- epochX/cudacpp/gg_ttgg.sa/src/HelAmps_sm.h | 24 + epochX/cudacpp/gg_ttgg.sa/src/cudacpp_src.mk | 171 +- .../gg_ttggg.mad/Cards/delphes_trigger.dat | 20 + .../gg_ttggg.mad/Cards/me5_configuration.txt | 4 +- .../cudacpp/gg_ttggg.mad/Cards/plot_card.dat | 203 + .../cudacpp/gg_ttggg.mad/Cards/run_card.dat | 12 +- .../gg_ttggg.mad/Source/DHELAS/aloha_file.inc | 2 +- .../gg_ttggg.mad/Source/PDF/pdfwrap_lhapdf.f | 1 + epochX/cudacpp/gg_ttggg.mad/Source/make_opts | 12 +- epochX/cudacpp/gg_ttggg.mad/Source/makefile | 4 +- .../SubProcesses/MatrixElementKernels.cc | 9 +- .../SubProcesses/P1_gg_ttxggg/CPPProcess.cc | 4551 ++++--- .../SubProcesses/P1_gg_ttxggg/auto_dsig1.f | 18 +- .../SubProcesses/P1_gg_ttxggg/matrix1.f | 10181 ++++++++-------- .../gg_ttggg.mad/SubProcesses/cudacpp.mk | 386 +- .../gg_ttggg.mad/SubProcesses/dummy_fct.f | 10 +- .../gg_ttggg.mad/SubProcesses/makefile | 172 +- .../cudacpp/gg_ttggg.mad/bin/generate_events | 22 +- .../gg_ttggg.mad/bin/internal/banner.py | 284 +- .../bin/internal/check_param_card.py | 2 +- .../bin/internal/common_run_interface.py | 11 +- .../gg_ttggg.mad/bin/internal/extended_cmd.py | 8 +- .../gg_ttggg.mad/bin/internal/gen_ximprove.py | 9 +- .../bin/internal/launch_plugin.py | 100 + .../bin/internal/madevent_interface.py | 6 +- .../gg_ttggg.mad/bin/internal/run_plot | 47 + .../bin/internal/run_plot_delphes | 46 + .../gg_ttggg.mad/bin/internal/run_plot_pgs | 47 + .../gg_ttggg.mad/bin/internal/run_plot_pythia | 50 + epochX/cudacpp/gg_ttggg.mad/bin/madevent | 26 +- epochX/cudacpp/gg_ttggg.mad/src/HelAmps_sm.h | 24 + .../cudacpp/gg_ttggg.mad/src/cudacpp_src.mk | 171 +- .../SubProcesses/MatrixElementKernels.cc | 9 +- .../P1_Sigma_sm_gg_ttxggg/CPPProcess.cc | 4551 ++++--- .../gg_ttggg.sa/SubProcesses/cudacpp.mk | 386 +- epochX/cudacpp/gg_ttggg.sa/src/HelAmps_sm.h | 24 + epochX/cudacpp/gg_ttggg.sa/src/cudacpp_src.mk | 171 +- .../gq_ttq.mad/Cards/delphes_trigger.dat | 20 + .../gq_ttq.mad/Cards/me5_configuration.txt | 4 +- epochX/cudacpp/gq_ttq.mad/Cards/plot_card.dat | 203 + epochX/cudacpp/gq_ttq.mad/Cards/run_card.dat | 10 - .../gq_ttq.mad/Source/DHELAS/aloha_file.inc | 2 +- .../gq_ttq.mad/Source/PDF/pdfwrap_lhapdf.f | 1 + epochX/cudacpp/gq_ttq.mad/Source/make_opts | 12 +- epochX/cudacpp/gq_ttq.mad/Source/makefile | 4 +- .../SubProcesses/MatrixElementKernels.cc | 9 +- .../SubProcesses/P1_gu_ttxu/CPPProcess.cc | 36 +- .../SubProcesses/P1_gu_ttxu/auto_dsig1.f | 24 +- .../SubProcesses/P1_gux_ttxux/CPPProcess.cc | 29 +- .../SubProcesses/P1_gux_ttxux/auto_dsig1.f | 28 +- .../gq_ttq.mad/SubProcesses/cudacpp.mk | 386 +- .../gq_ttq.mad/SubProcesses/dummy_fct.f | 10 +- .../cudacpp/gq_ttq.mad/SubProcesses/makefile | 172 +- epochX/cudacpp/gq_ttq.mad/bin/generate_events | 22 +- .../cudacpp/gq_ttq.mad/bin/internal/banner.py | 284 +- .../bin/internal/check_param_card.py | 2 +- .../bin/internal/common_run_interface.py | 11 +- .../gq_ttq.mad/bin/internal/extended_cmd.py | 8 +- .../gq_ttq.mad/bin/internal/gen_ximprove.py | 9 +- .../gq_ttq.mad/bin/internal/launch_plugin.py | 100 + .../bin/internal/madevent_interface.py | 6 +- .../cudacpp/gq_ttq.mad/bin/internal/run_plot | 47 + .../gq_ttq.mad/bin/internal/run_plot_delphes | 46 + .../gq_ttq.mad/bin/internal/run_plot_pgs | 47 + .../gq_ttq.mad/bin/internal/run_plot_pythia | 50 + epochX/cudacpp/gq_ttq.mad/bin/madevent | 26 +- epochX/cudacpp/gq_ttq.mad/src/HelAmps_sm.h | 10 + .../cudacpp/gq_ttq.mad/src/Parameters_sm.cc | 4 +- epochX/cudacpp/gq_ttq.mad/src/Parameters_sm.h | 18 +- epochX/cudacpp/gq_ttq.mad/src/cudacpp_src.mk | 171 +- .../pp_tt012j.mad/Cards/delphes_trigger.dat | 20 + .../pp_tt012j.mad/Cards/me5_configuration.txt | 4 +- .../cudacpp/pp_tt012j.mad/Cards/plot_card.dat | 203 + .../cudacpp/pp_tt012j.mad/Cards/run_card.dat | 10 - .../Source/DHELAS/aloha_file.inc | 2 +- .../pp_tt012j.mad/Source/PDF/pdfwrap_lhapdf.f | 1 + epochX/cudacpp/pp_tt012j.mad/Source/make_opts | 12 +- epochX/cudacpp/pp_tt012j.mad/Source/makefile | 4 +- .../SubProcesses/MatrixElementKernels.cc | 9 +- .../SubProcesses/P0_gg_ttx/CPPProcess.cc | 15 +- .../SubProcesses/P0_gg_ttx/auto_dsig1.f | 18 +- .../SubProcesses/P0_uux_ttx/CPPProcess.cc | 13 +- .../SubProcesses/P0_uux_ttx/auto_dsig1.f | 34 +- .../SubProcesses/P1_gg_ttxg/CPPProcess.cc | 65 +- .../SubProcesses/P1_gg_ttxg/auto_dsig1.f | 18 +- .../SubProcesses/P1_gg_ttxg/matrix1.f | 49 +- .../SubProcesses/P1_gu_ttxu/CPPProcess.cc | 31 +- .../SubProcesses/P1_gu_ttxu/auto_dsig1.f | 24 +- .../SubProcesses/P1_gux_ttxux/CPPProcess.cc | 31 +- .../SubProcesses/P1_gux_ttxux/auto_dsig1.f | 28 +- .../SubProcesses/P1_uux_ttxg/CPPProcess.cc | 31 +- .../SubProcesses/P1_uux_ttxg/auto_dsig1.f | 34 +- .../SubProcesses/P2_gg_ttxgg/CPPProcess.cc | 435 +- .../SubProcesses/P2_gg_ttxgg/auto_dsig1.f | 18 +- .../SubProcesses/P2_gg_ttxgg/matrix1.f | 638 +- .../SubProcesses/P2_gg_ttxuux/CPPProcess.cc | 148 +- .../SubProcesses/P2_gg_ttxuux/auto_dsig1.f | 18 +- .../SubProcesses/P2_gg_ttxuux/matrix1.f | 61 +- .../SubProcesses/P2_gu_ttxgu/CPPProcess.cc | 143 +- .../SubProcesses/P2_gu_ttxgu/auto_dsig1.f | 24 +- .../SubProcesses/P2_gu_ttxgu/matrix1.f | 84 +- .../SubProcesses/P2_gux_ttxgux/CPPProcess.cc | 143 +- .../SubProcesses/P2_gux_ttxgux/auto_dsig1.f | 28 +- .../SubProcesses/P2_gux_ttxgux/matrix1.f | 92 +- .../SubProcesses/P2_uc_ttxuc/CPPProcess.cc | 45 +- .../SubProcesses/P2_uc_ttxuc/auto_dsig1.f | 26 +- .../SubProcesses/P2_uc_ttxuc/matrix1.f | 10 +- .../SubProcesses/P2_ucx_ttxucx/CPPProcess.cc | 45 +- .../SubProcesses/P2_ucx_ttxucx/auto_dsig1.f | 34 +- .../SubProcesses/P2_ucx_ttxucx/matrix1.f | 14 +- .../SubProcesses/P2_uu_ttxuu/CPPProcess.cc | 71 +- .../SubProcesses/P2_uu_ttxuu/auto_dsig1.f | 30 +- .../SubProcesses/P2_uu_ttxuu/matrix1.f | 30 +- .../SubProcesses/P2_uux_ttxccx/CPPProcess.cc | 45 +- .../SubProcesses/P2_uux_ttxccx/auto_dsig1.f | 34 +- .../SubProcesses/P2_uux_ttxgg/CPPProcess.cc | 143 +- .../SubProcesses/P2_uux_ttxgg/auto_dsig1.f | 34 +- .../SubProcesses/P2_uux_ttxgg/matrix1.f | 78 +- .../SubProcesses/P2_uux_ttxuux/CPPProcess.cc | 73 +- .../SubProcesses/P2_uux_ttxuux/auto_dsig1.f | 34 +- .../SubProcesses/P2_uux_ttxuux/matrix1.f | 24 +- .../P2_uxcx_ttxuxcx/CPPProcess.cc | 45 +- .../SubProcesses/P2_uxcx_ttxuxcx/auto_dsig1.f | 32 +- .../SubProcesses/P2_uxcx_ttxuxcx/matrix1.f | 10 +- .../P2_uxux_ttxuxux/CPPProcess.cc | 71 +- .../SubProcesses/P2_uxux_ttxuxux/auto_dsig1.f | 38 +- .../SubProcesses/P2_uxux_ttxuxux/matrix1.f | 30 +- .../pp_tt012j.mad/SubProcesses/cudacpp.mk | 386 +- .../pp_tt012j.mad/SubProcesses/dummy_fct.f | 10 +- .../pp_tt012j.mad/SubProcesses/makefile | 172 +- .../cudacpp/pp_tt012j.mad/bin/generate_events | 22 +- .../pp_tt012j.mad/bin/internal/banner.py | 284 +- .../bin/internal/check_param_card.py | 2 +- .../bin/internal/common_run_interface.py | 11 +- .../bin/internal/extended_cmd.py | 8 +- .../bin/internal/gen_ximprove.py | 9 +- .../bin/internal/launch_plugin.py | 100 + .../bin/internal/madevent_interface.py | 6 +- .../pp_tt012j.mad/bin/internal/run_plot | 47 + .../bin/internal/run_plot_delphes | 46 + .../pp_tt012j.mad/bin/internal/run_plot_pgs | 47 + .../bin/internal/run_plot_pythia | 50 + epochX/cudacpp/pp_tt012j.mad/bin/madevent | 26 +- epochX/cudacpp/pp_tt012j.mad/src/HelAmps_sm.h | 24 + .../cudacpp/pp_tt012j.mad/src/cudacpp_src.mk | 171 +- 291 files changed, 22861 insertions(+), 16005 deletions(-) create mode 100644 epochX/cudacpp/ee_mumu.mad/Cards/delphes_trigger.dat create mode 100644 epochX/cudacpp/ee_mumu.mad/Cards/plot_card.dat mode change 100644 => 120000 epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum/counters.cc mode change 100644 => 120000 epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum/ompnumthreads.cc create mode 100644 epochX/cudacpp/ee_mumu.mad/SubProcesses/counters.cc create mode 100644 epochX/cudacpp/ee_mumu.mad/SubProcesses/ompnumthreads.cc create mode 100644 epochX/cudacpp/ee_mumu.mad/bin/internal/launch_plugin.py create mode 100755 epochX/cudacpp/ee_mumu.mad/bin/internal/run_plot create mode 100755 epochX/cudacpp/ee_mumu.mad/bin/internal/run_plot_delphes create mode 100755 epochX/cudacpp/ee_mumu.mad/bin/internal/run_plot_pgs create mode 100755 epochX/cudacpp/ee_mumu.mad/bin/internal/run_plot_pythia create mode 100644 epochX/cudacpp/gg_tt.mad/Cards/delphes_trigger.dat create mode 100644 epochX/cudacpp/gg_tt.mad/Cards/plot_card.dat create mode 100644 epochX/cudacpp/gg_tt.mad/bin/internal/launch_plugin.py create mode 100755 epochX/cudacpp/gg_tt.mad/bin/internal/run_plot create mode 100755 epochX/cudacpp/gg_tt.mad/bin/internal/run_plot_delphes create mode 100755 epochX/cudacpp/gg_tt.mad/bin/internal/run_plot_pgs create mode 100755 epochX/cudacpp/gg_tt.mad/bin/internal/run_plot_pythia create mode 100644 epochX/cudacpp/gg_ttg.mad/Cards/delphes_trigger.dat create mode 100644 epochX/cudacpp/gg_ttg.mad/Cards/plot_card.dat create mode 100644 epochX/cudacpp/gg_ttg.mad/bin/internal/launch_plugin.py create mode 100755 epochX/cudacpp/gg_ttg.mad/bin/internal/run_plot create mode 100755 epochX/cudacpp/gg_ttg.mad/bin/internal/run_plot_delphes create mode 100755 epochX/cudacpp/gg_ttg.mad/bin/internal/run_plot_pgs create mode 100755 epochX/cudacpp/gg_ttg.mad/bin/internal/run_plot_pythia create mode 100644 epochX/cudacpp/gg_ttgg.mad/Cards/delphes_trigger.dat create mode 100644 epochX/cudacpp/gg_ttgg.mad/Cards/plot_card.dat create mode 100644 epochX/cudacpp/gg_ttgg.mad/bin/internal/launch_plugin.py create mode 100755 epochX/cudacpp/gg_ttgg.mad/bin/internal/run_plot create mode 100755 epochX/cudacpp/gg_ttgg.mad/bin/internal/run_plot_delphes create mode 100755 epochX/cudacpp/gg_ttgg.mad/bin/internal/run_plot_pgs create mode 100755 epochX/cudacpp/gg_ttgg.mad/bin/internal/run_plot_pythia create mode 100644 epochX/cudacpp/gg_ttggg.mad/Cards/delphes_trigger.dat create mode 100644 epochX/cudacpp/gg_ttggg.mad/Cards/plot_card.dat create mode 100644 epochX/cudacpp/gg_ttggg.mad/bin/internal/launch_plugin.py create mode 100755 epochX/cudacpp/gg_ttggg.mad/bin/internal/run_plot create mode 100755 epochX/cudacpp/gg_ttggg.mad/bin/internal/run_plot_delphes create mode 100755 epochX/cudacpp/gg_ttggg.mad/bin/internal/run_plot_pgs create mode 100755 epochX/cudacpp/gg_ttggg.mad/bin/internal/run_plot_pythia create mode 100644 epochX/cudacpp/gq_ttq.mad/Cards/delphes_trigger.dat create mode 100644 epochX/cudacpp/gq_ttq.mad/Cards/plot_card.dat create mode 100644 epochX/cudacpp/gq_ttq.mad/bin/internal/launch_plugin.py create mode 100755 epochX/cudacpp/gq_ttq.mad/bin/internal/run_plot create mode 100755 epochX/cudacpp/gq_ttq.mad/bin/internal/run_plot_delphes create mode 100755 epochX/cudacpp/gq_ttq.mad/bin/internal/run_plot_pgs create mode 100755 epochX/cudacpp/gq_ttq.mad/bin/internal/run_plot_pythia create mode 100644 epochX/cudacpp/pp_tt012j.mad/Cards/delphes_trigger.dat create mode 100644 epochX/cudacpp/pp_tt012j.mad/Cards/plot_card.dat create mode 100644 epochX/cudacpp/pp_tt012j.mad/bin/internal/launch_plugin.py create mode 100755 epochX/cudacpp/pp_tt012j.mad/bin/internal/run_plot create mode 100755 epochX/cudacpp/pp_tt012j.mad/bin/internal/run_plot_delphes create mode 100755 epochX/cudacpp/pp_tt012j.mad/bin/internal/run_plot_pgs create mode 100755 epochX/cudacpp/pp_tt012j.mad/bin/internal/run_plot_pythia diff --git a/epochX/cudacpp/ee_mumu.mad/Cards/delphes_trigger.dat b/epochX/cudacpp/ee_mumu.mad/Cards/delphes_trigger.dat new file mode 100644 index 0000000000..0aab0677aa --- /dev/null +++ b/epochX/cudacpp/ee_mumu.mad/Cards/delphes_trigger.dat @@ -0,0 +1,20 @@ +#TRIGGER CARD # DO NOT REMOVE THIS IS A TAG! + +# list of trigger algorithms +# trigger_name >> algorithm #comments +Inclusive electron >> ELEC1_PT: '29' +di-electron >> ELEC1_PT: '17' && ELEC2_PT: '17' +Inclusive Photon >> GAMMA1_PT: '80' +di-Photon >> GAMMA1_PT: '40' && GAMMA2_PT: '25' +Inclusive muon >> MUON1_PT: '19' +di-muon >> MUON1_PT: '7' && MUON2_PT: '7' +Taujet and ETmis >> TAU1_PT: '86' && ETMIS_PT: '65' +di-Taujets >> TAU1_PT: '59' && TAU2_PT: '59' +Jet and ETmis >> JET1_PT: '180' && ETMIS_PT: '123' +Taujet and electron >> TAU1_PT: '45' && ELEC1_PT: '19' +Taujet and muon >> TAU1_PT: '40' && ELEC1_PT: '15' +Inclusive b-jet >> Bjet1_PT: '237' +Inclusive 1 jet >> JET1_PT: '657' +Inclusive 3 jets >> JET1_PT: '247' && JET2_PT: '247' && JET3_PT: '247' +Inclusive 4 jets >> JET1_PT: '113' && JET2_PT: '113' && JET3_PT: '113' && JET4_PT: '113' + diff --git a/epochX/cudacpp/ee_mumu.mad/Cards/ident_card.dat b/epochX/cudacpp/ee_mumu.mad/Cards/ident_card.dat index 0ba87b008f..b37758a42a 100644 --- a/epochX/cudacpp/ee_mumu.mad/Cards/ident_card.dat +++ b/epochX/cudacpp/ee_mumu.mad/Cards/ident_card.dat @@ -2,32 +2,32 @@ ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c written by the UFO converter ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc +mass 5 mdl_MB +mass 6 mdl_MT +mass 15 mdl_MTA +mass 23 mdl_MZ +mass 25 mdl_MH +sminputs 1 aEWM1 +sminputs 2 mdl_Gf +sminputs 3 aS +yukawa 5 mdl_ymb +yukawa 6 mdl_ymt +yukawa 15 mdl_ymtau - - +decay 6 mdl_WT decay 23 mdl_WZ + decay 24 mdl_WW + decay 25 mdl_WH -decay 6 mdl_WT -mass 15 mdl_MTA -mass 23 mdl_MZ -mass 25 mdl_MH -mass 5 mdl_MB -mass 6 mdl_MT -sminputs 1 aEWM1 -sminputs 2 mdl_Gf -sminputs 3 aS -yukawa 15 mdl_ymtau -yukawa 5 mdl_ymb -yukawa 6 mdl_ymt diff --git a/epochX/cudacpp/ee_mumu.mad/Cards/me5_configuration.txt b/epochX/cudacpp/ee_mumu.mad/Cards/me5_configuration.txt index 5ca005676e..8a0c1e6345 100644 --- a/epochX/cudacpp/ee_mumu.mad/Cards/me5_configuration.txt +++ b/epochX/cudacpp/ee_mumu.mad/Cards/me5_configuration.txt @@ -234,7 +234,7 @@ # pineappl = pineappl -#mg5_path = /data/avalassi/GPU2023/madgraph4gpuMOD/MG5aMC/mg5amcnlo +mg5_path = /afs/cern.ch/work/j/jteig/madgraph4gpu/MG5aMC/mg5amcnlo # MG5 MAIN DIRECTORY -#mg5_path = /data/avalassi/GPU2023/madgraph4gpuMOD/MG5aMC/mg5amcnlo +mg5_path = /afs/cern.ch/work/j/jteig/madgraph4gpu/MG5aMC/mg5amcnlo diff --git a/epochX/cudacpp/ee_mumu.mad/Cards/plot_card.dat b/epochX/cudacpp/ee_mumu.mad/Cards/plot_card.dat new file mode 100644 index 0000000000..9abe1cc05e --- /dev/null +++ b/epochX/cudacpp/ee_mumu.mad/Cards/plot_card.dat @@ -0,0 +1,203 @@ +#************************************************************************** +# Card for MadAnalysis * +# * +# This file is used to set the classes and options for * +# the MadAnalysis program. * +# * +# * +# Some comments about the classes * +# 1. Plots are for classes of particles. * +# 2. Each particle is identified by its PDG code. * +# 3. Classes names are arbitrary (4 symbols max, no spaces allowed). * +# 4. Particles in the same class will be ordered with the 'ordering * +# function' in the file in_func.f. * +# 5. Classes can be added/edited/removed at will, and given a name * +# that will then appear in the plots. * +# 6. A particle can be put in one class only. Putting a particle in * +# two or more classes can lead to double counting of events. * +# 7. The class name mET is missing Energy and its name is reserved. * +# If used, it must be put last in the classes list below. * +# 8. If events contain particles not belonging to an existing class, * +# a new class will automatically be generated. * +# 9. For LHCO events the PDG code 21 is assigned to a jet (not * +# b-tagged), 5 to a b-tagged jet and 12 to missing ET. * +# * +# * +# Some comments about the cuts * +# 1. In the file kin_func.f the functions on which cuts can be applied * +# are given. * +# 2. The syntax is as follows. * +# etmin 1 3 30d0 * +# means that from the first class the Et of the first three particles * +# has to be greater than 30 GeV. * +# * +# etmissmin 20d0 * +# means that there must be at least 20 GeV of missing Et * +# * +# dRmin 2 1 4 3 3d0 * +# means that the distance between the first particle in the second * +# class and the first three particles in the fourth class has to be * +# greater than 3. * +# * +# ptmax 1 3 10d0 * +# ptmax 1 2 15d0 * +# means that the maximum pt of the third particle in the first class * +# has to smaller than 10 GeV, and the first two particles of this * +# class has to be smaller than 15 GeV * +# 3. The ordering of the particles within a class can be set with the * +# 'ordering function' in the file kin_func.f. * +# 4. For all the 'min' cuts, an event will be thrown away if the particle * +# does not exist. On the other hand, for all the 'max' cuts the cut * +# will be ignored if the particle does not exist * +# (Only dRij is an exception, for which it is the other way around) * +# * +# * +# * +# Some comments about the plotting options * +# 1. In the file kin_func.f the functions can be found that can be * +# plotted. (only for off-line usage) * +# 2. With the plotting options one can set the number of plots for each * +# of these functions. * +# 3. One has to specify for each variable which particles from which * +# class are used to set the plots. Syntax: * +# et 2 4 * +# means that the transverse energy of the first four particles in the * +# second class will be plotted. * +# mij 1 3 * +# mij 2 2 * +# means that for the invariant mass plots the first three particles * +# from the first class and the first two from the second class will be * +# used to plot the invariant mass of two particles. (10 plots) * +# 4. The ordering of the particles in a class can be set with the * +# 'ordering_function'. pt, e and et are valid functions. (For off-line * +# users X1, X2 and X3 can also be used, if defined in kin_func.f.) * +# 5. Max number of plots is 200. * +# * +# * +#************************************************************************** +# Put here your list of classes +#************************************************************************** +# Do NOT put spaces before class names! +# Begin Classes # This is TAG. Do not modify this line +jet 1 -1 2 -2 3 -3 4 -4 21 # Class number 1 +b 5 -5 # Class number 2 +mET 12 -12 14 -14 16 -16 1000022 # Missing ET class, name is reserved +# End Classes # This is TAG. Do not modify this line +#************************************************************************** +ordering_function pt # orders particles in classes according to their pt +normalization xsec # histogram normalization, xsec or number (e.g. 1) +#************************************************************************** +# Put here list of minimum pt for the classes +#************************************************************************** +# Begin Minpts # This is TAG. Do not modify this line +#1 30 +#2 40 +#3 10 +# End Minpts # This is TAG. Do not modify this line +#************************************************************************** +# Cuts on plotted events +#************************************************************************** +# Modify the cuts and remove the pounds/hashes to apply those cuts +# Do NOT put spaces at the beginning of the following lines! +# Begin Cuts # This is TAG. Do not modify this line +#etmin 2 2 40d0 +#etmin 2 1 80d0 +#etmin 1 3 20d0 +#etmax 2 1 200d0 +#ptmin 3 1 0d0 +#etmissmin 20d0 +#etmissmax 80d0 +#etamax 1 1 1d0 +#etamax 2 1 2d0 +#etamin 2 2 1.5d0 +#etamin 2 1 2d0 +#mijmax 2 1 2 2 200d0 +#mijmin 2 1 2 2 100d0 +#X1min 2 1 40d0 +#X1max 2 2 50d0 +#dRijmin 2 1 2 2 0.7d0 +#dRijmax 1 3 2 2 0.7d0 +#XY1min 2 2 2 2 20d0 +#XYZA2max 2 2 2 2 4 1 5 1 40d0 +# End Cuts # This is TAG. Do not modify this line +#************************************************************************** +# Put here the required plots +#************************************************************************** +# Do NOT put spaces at the beginning of the following lines! +# Begin PlotDefs # This is TAG. Do not modify this line +pt 1 4 # plot pt for the first four particles in class 1 +pt 2 4 # plot pt for the first four particles in class 2 +pt 3 4 # plot pt for the first four particles in class 3 +pt 4 4 # plot pt for the first four particles in class 4 +pt 5 4 # etc. +pt 6 4 +pt 7 4 +#e 2 2 +y 1 4 # plot rapidity for the first four particles in class 1 +y 2 4 +y 3 4 +y 4 4 +y 5 4 +y 6 4 +y 7 4 +#eta 2 2 # plot pseudo-rapidity for the first two part in the 2nd class +#mom 4 1 +#costh 5 1 +#phi 2 2 +#delta_eta 2 2 +#delta_eta 4 1 +mij 1 4 # use the first four particles in the 1st class to plot inv. mass +mij 2 2 # use the first two particles from the second class as well +mij 3 1 # etc. +mij 4 1 +mij 5 1 +mij 6 1 +mij 7 1 +#cosij 1 2 +#cosij 2 2 +#cosij 3 1 +#cosij 4 1 +dRij 1 4 +dRij 2 2 +dRij 3 1 +dRij 4 1 +dRij 5 1 +dRij 6 1 +dRij 7 1 +#delta_phi 2 2 +#delta_phi 4 1 +#delta_phi 5 1 +#X1 2 2 # plot X1 (defined in kin_func.f) +#XYZA1 2 2 +#XYZA1 4 1 +#XYZA1 5 1 +# End PlotDefs # This is TAG. Do not modify this line +#************************************************************************** +#************************************************************************** +# Put here the plot ranges +#************************************************************************** +# Do NOT put spaces at the beginning of the following lines! +# Begin PlotRange # This is TAG. Do not modify this line +pt 10 0 500 # bin size, min value, max value +et 10 0 500 # bin size, min value, max value +etmiss 10 0 500 # bin size, min value, max value +ht 20 0 1500 +y 0.2 -5 5 # etc. +mij 20 0 1500 +dRij 0.1 0 5 +#delta_phi 0.1 0 3.1 +#X1 1 0 100 +#XYZA1 1 0 100 +# End PlotRange # This is TAG. Do not modify this line +#************************************************************************** +#************************************************************************** +# Output for plots +#************************************************************************** +# Do NOT put spaces at the beginning of the following lines! +# Begin PlotOutput # This is TAG. Do not modify this line +output topdrawer # set to topdrawer or gnuplot +plot_decayed no # plot (and cut) dec. res.? (Only for LHE events) +# End PlotOutput # This is TAG. Do not modify this line +#************************************************************************** +# +# diff --git a/epochX/cudacpp/ee_mumu.mad/Cards/proc_card_mg5.dat b/epochX/cudacpp/ee_mumu.mad/Cards/proc_card_mg5.dat index b9e01f684b..a685cbcc05 100644 --- a/epochX/cudacpp/ee_mumu.mad/Cards/proc_card_mg5.dat +++ b/epochX/cudacpp/ee_mumu.mad/Cards/proc_card_mg5.dat @@ -35,15 +35,15 @@ set loop_color_flows False set max_npoint_for_channel 0 set default_unset_couplings 99 set max_t_for_channel 99 +set zerowidth_tchannel True set nlo_mixed_expansion True -set stdout_level DEBUG -set zerowidth_tchannel F -generate e+ e- > mu+ mu- +import model sm define p = g u c d s u~ c~ d~ s~ define j = g u c d s u~ c~ d~ s~ define l+ = e+ mu+ define l- = e- mu- define vl = ve vm vt define vl~ = ve~ vm~ vt~ -output madevent ../TMPOUT/CODEGEN_mad_ee_mumu --hel_recycling=False --\ -vector_size=16384 --me_exporter=standalone_cudacpp +generate e+ e- > mu+ mu- +output madevent ee_mumu.mad_gen --hel_recycling=False --vector_size=16\ +384 --me_exporter=standalone_cudacpp diff --git a/epochX/cudacpp/ee_mumu.mad/Cards/run_card.dat b/epochX/cudacpp/ee_mumu.mad/Cards/run_card.dat index 86f6a33258..67c1a4de28 100644 --- a/epochX/cudacpp/ee_mumu.mad/Cards/run_card.dat +++ b/epochX/cudacpp/ee_mumu.mad/Cards/run_card.dat @@ -82,7 +82,7 @@ #********************************************************************* 0 = nhel ! using helicities importance sampling or not. ! 0: sum over helicity, 1: importance sampling - 1 = sde_strategy ! default integration strategy (hep-ph/2021.00773) + 2 = sde_strategy ! default integration strategy (hep-ph/2021.00773) ! 1 is old strategy (using amp square) ! 2 is new strategy (using only the denominator) # To see advanced option for Phase-Space optimization: type "update psoptim" @@ -181,13 +181,3 @@ # systematics = systematics_program ! none, systematics [python], SysCalc [depreceted, C++] ['--mur=0.5,1,2', '--muf=0.5,1,2', '--pdf=errorset'] = systematics_arguments ! see: https://cp3.irmp.ucl.ac.be/projects/madgraph/wiki/Systematics#Systematicspythonmodule - -#********************************************************************* -# Options for the cudacpp plugin -#********************************************************************* - -# Set cudacpp-specific values of non-cudacpp-specific options --O3 -ffast-math -fbounds-check = global_flag ! build flags for Fortran code (for a fair comparison to cudacpp) - -# New cudacpp-specific options (default values are defined in banner.py) -CPP = cudacpp_backend ! valid backends are FORTRAN, CPP, CUDA diff --git a/epochX/cudacpp/ee_mumu.mad/Source/DHELAS/FFV4_0.f b/epochX/cudacpp/ee_mumu.mad/Source/DHELAS/FFV4_0.f index 86144cea09..53829ce13a 100644 --- a/epochX/cudacpp/ee_mumu.mad/Source/DHELAS/FFV4_0.f +++ b/epochX/cudacpp/ee_mumu.mad/Source/DHELAS/FFV4_0.f @@ -9,15 +9,15 @@ SUBROUTINE FFV4_0(F1, F2, V3, COUP,VERTEX) COMPLEX*16 COUP COMPLEX*16 F1(*) COMPLEX*16 F2(*) - COMPLEX*16 TMP1 COMPLEX*16 TMP3 + COMPLEX*16 TMP4 COMPLEX*16 V3(*) COMPLEX*16 VERTEX - TMP1 = (F1(3)*(F2(5)*(V3(3)+V3(6))+F2(6)*(V3(4)+CI*(V3(5)))) + TMP3 = (F1(3)*(F2(5)*(V3(3)+V3(6))+F2(6)*(V3(4)+CI*(V3(5)))) $ +F1(4)*(F2(5)*(V3(4)-CI*(V3(5)))+F2(6)*(V3(3)-V3(6)))) - TMP3 = (F1(5)*(F2(3)*(V3(3)-V3(6))-F2(4)*(V3(4)+CI*(V3(5)))) + TMP4 = (F1(5)*(F2(3)*(V3(3)-V3(6))-F2(4)*(V3(4)+CI*(V3(5)))) $ +F1(6)*(F2(3)*(-V3(4)+CI*(V3(5)))+F2(4)*(V3(3)+V3(6)))) - VERTEX = COUP*(-1D0)*(+CI*(TMP1)+2D0 * CI*(TMP3)) + VERTEX = COUP*(-1D0)*(+CI*(TMP3)+2D0 * CI*(TMP4)) END diff --git a/epochX/cudacpp/ee_mumu.mad/Source/DHELAS/FFV4_3.f b/epochX/cudacpp/ee_mumu.mad/Source/DHELAS/FFV4_3.f index aa18a03673..06573c09ee 100644 --- a/epochX/cudacpp/ee_mumu.mad/Source/DHELAS/FFV4_3.f +++ b/epochX/cudacpp/ee_mumu.mad/Source/DHELAS/FFV4_3.f @@ -13,7 +13,7 @@ SUBROUTINE FFV4_3(F1, F2, COUP, M3, W3,V3) REAL*8 OM3 REAL*8 P3(0:3) COMPLEX*16 TMP2 - COMPLEX*16 TMP4 + COMPLEX*16 TMP5 COMPLEX*16 V3(6) REAL*8 W3 COMPLEX*16 DENOM @@ -27,18 +27,18 @@ SUBROUTINE FFV4_3(F1, F2, COUP, M3, W3,V3) P3(3) = -DIMAG(V3(1)) TMP2 = (F1(3)*(F2(5)*(P3(0)+P3(3))+F2(6)*(P3(1)+CI*(P3(2)))) $ +F1(4)*(F2(5)*(P3(1)-CI*(P3(2)))+F2(6)*(P3(0)-P3(3)))) - TMP4 = (F1(5)*(F2(3)*(P3(0)-P3(3))-F2(4)*(P3(1)+CI*(P3(2)))) + TMP5 = (F1(5)*(F2(3)*(P3(0)-P3(3))-F2(4)*(P3(1)+CI*(P3(2)))) $ +F1(6)*(F2(3)*(-P3(1)+CI*(P3(2)))+F2(4)*(P3(0)+P3(3)))) DENOM = COUP/(P3(0)**2-P3(1)**2-P3(2)**2-P3(3)**2 - M3 * (M3 -CI $ * W3)) - V3(3)= DENOM*(-2D0 * CI)*(OM3*-1D0/2D0 * P3(0)*(TMP2+2D0*(TMP4)) + V3(3)= DENOM*(-2D0 * CI)*(OM3*-1D0/2D0 * P3(0)*(TMP2+2D0*(TMP5)) $ +(+1D0/2D0*(F1(3)*F2(5)+F1(4)*F2(6))+F1(5)*F2(3)+F1(6)*F2(4))) - V3(4)= DENOM*(-2D0 * CI)*(OM3*-1D0/2D0 * P3(1)*(TMP2+2D0*(TMP4)) + V3(4)= DENOM*(-2D0 * CI)*(OM3*-1D0/2D0 * P3(1)*(TMP2+2D0*(TMP5)) $ +(-1D0/2D0*(F1(3)*F2(6)+F1(4)*F2(5))+F1(5)*F2(4)+F1(6)*F2(3))) - V3(5)= DENOM*2D0 * CI*(OM3*1D0/2D0 * P3(2)*(TMP2+2D0*(TMP4))+( + V3(5)= DENOM*2D0 * CI*(OM3*1D0/2D0 * P3(2)*(TMP2+2D0*(TMP5))+( $ +1D0/2D0 * CI*(F1(3)*F2(6))-1D0/2D0 * CI*(F1(4)*F2(5))-CI*(F1(5) $ *F2(4))+CI*(F1(6)*F2(3)))) - V3(6)= DENOM*2D0 * CI*(OM3*1D0/2D0 * P3(3)*(TMP2+2D0*(TMP4))+( + V3(6)= DENOM*2D0 * CI*(OM3*1D0/2D0 * P3(3)*(TMP2+2D0*(TMP5))+( $ +1D0/2D0*(F1(3)*F2(5))-1D0/2D0*(F1(4)*F2(6))-F1(5)*F2(3)+F1(6) $ *F2(4))) END diff --git a/epochX/cudacpp/ee_mumu.mad/Source/DHELAS/aloha_file.inc b/epochX/cudacpp/ee_mumu.mad/Source/DHELAS/aloha_file.inc index 4f385d6435..e58e08d7bd 100644 --- a/epochX/cudacpp/ee_mumu.mad/Source/DHELAS/aloha_file.inc +++ b/epochX/cudacpp/ee_mumu.mad/Source/DHELAS/aloha_file.inc @@ -1 +1 @@ -ALOHARoutine = FFV2_3.o FFV2_0.o FFV4_0.o FFV4_3.o FFV1_0.o FFV1P0_3.o +ALOHARoutine = FFV1_0.o FFV1P0_3.o FFV2_0.o FFV2_3.o FFV4_0.o FFV4_3.o diff --git a/epochX/cudacpp/ee_mumu.mad/Source/PDF/pdfwrap_lhapdf.f b/epochX/cudacpp/ee_mumu.mad/Source/PDF/pdfwrap_lhapdf.f index 0be926e6cd..3f36905346 100644 --- a/epochX/cudacpp/ee_mumu.mad/Source/PDF/pdfwrap_lhapdf.f +++ b/epochX/cudacpp/ee_mumu.mad/Source/PDF/pdfwrap_lhapdf.f @@ -5,6 +5,7 @@ SUBROUTINE PDFWRAP C INCLUDE 'pdf.inc' INCLUDE '../alfas.inc' + INCLUDE '../vector.inc' INCLUDE '../coupl.inc' REAL*8 ZMASS DATA ZMASS/91.188D0/ diff --git a/epochX/cudacpp/ee_mumu.mad/Source/make_opts b/epochX/cudacpp/ee_mumu.mad/Source/make_opts index bd3c24228d..2607530b78 100644 --- a/epochX/cudacpp/ee_mumu.mad/Source/make_opts +++ b/epochX/cudacpp/ee_mumu.mad/Source/make_opts @@ -1,17 +1,11 @@ -pdlabel1= -pdlabel2= -lhapdf= -PYTHIA8_PATH=NotInstalled -MG5AMC_VERSION=3.5.0_lo_vect -GLOBAL_FLAG=-O3 -ffast-math -fbounds-check -ALOHA_FLAG= -MATRIX_FLAG= DEFAULT_CPP_COMPILER=g++ MACFLAG= STDLIB=-lstdc++ STDLIB_FLAG= DEFAULT_F_COMPILER=gfortran -DEFAULT_F2PY_COMPILER=f2py3 +DEFAULT_F2PY_COMPILER=f2py3.9 +MG5AMC_VERSION=SpecifiedByMG5aMCAtRunTime +PYTHIA8_PATH=NotInstalled #end_of_make_opts_variables BIASLIBDIR=../../../lib/ diff --git a/epochX/cudacpp/ee_mumu.mad/Source/makefile b/epochX/cudacpp/ee_mumu.mad/Source/makefile index dbe08b846e..00c73099a0 100644 --- a/epochX/cudacpp/ee_mumu.mad/Source/makefile +++ b/epochX/cudacpp/ee_mumu.mad/Source/makefile @@ -136,5 +136,7 @@ cleanSource: clean: cleanSource for i in `ls -d ../SubProcesses/P*`; do cd $$i; make clean; cd -; done; -cleanall: cleanSource +cleanavx: + for i in `ls -d ../SubProcesses/P*`; do cd $$i; make cleanavxs; cd -; done; +cleanall: cleanSource # THIS IS THE ONE for i in `ls -d ../SubProcesses/P*`; do cd $$i; make cleanavxs; cd -; done; diff --git a/epochX/cudacpp/ee_mumu.mad/SubProcesses/MatrixElementKernels.cc b/epochX/cudacpp/ee_mumu.mad/SubProcesses/MatrixElementKernels.cc index 30257195b6..cfed7d2af5 100644 --- a/epochX/cudacpp/ee_mumu.mad/SubProcesses/MatrixElementKernels.cc +++ b/epochX/cudacpp/ee_mumu.mad/SubProcesses/MatrixElementKernels.cc @@ -112,10 +112,17 @@ namespace mg5amcCpu // See https://community.arm.com/arm-community-blogs/b/operating-systems-blog/posts/runtime-detection-of-cpu-features-on-an-armv8-a-cpu bool ok = true; // this is just an assumption! const std::string tag = "arm neon (128bit as in SSE4.2)"; -#else +#elif defined(__x86_64__) || defined(__i386__) bool known = true; bool ok = __builtin_cpu_supports( "sse4.2" ); const std::string tag = "nehalem (SSE4.2)"; +#else + bool known = false; // __builtin_cpu_supports is not supported + // See https://gcc.gnu.org/onlinedocs/gcc/Basic-PowerPC-Built-in-Functions-Available-on-all-Configurations.html + // See https://stackoverflow.com/q/62783908 + // See https://community.arm.com/arm-community-blogs/b/operating-systems-blog/posts/runtime-detection-of-cpu-features-on-an-armv8-a-cpu + bool ok = true; // this is just an assumption! + const std::string tag = "arm neon (128bit as in SSE4.2)"; #endif #else bool known = true; diff --git a/epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum/CPPProcess.cc b/epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum/CPPProcess.cc index a6d90a2d1a..daa617d9ee 100644 --- a/epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum/CPPProcess.cc +++ b/epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum/CPPProcess.cc @@ -238,25 +238,18 @@ namespace mg5amcCpu // *** DIAGRAM 1 OF 2 *** // Wavefunction(s) for diagram number 1 -#if not( defined __CUDACC__ and defined MGONGPU_TEST_DIVERGENCE ) - opzxxx( momenta, cHel[ihel][0], -1, w_fp[0], 0 ); // NB: opzxxx only uses pz -#else - if( ( blockDim.x * blockIdx.x + threadIdx.x ) % 2 == 0 ) - opzxxx( momenta, cHel[ihel][0], -1, w_fp[0], 0 ); // NB: opzxxx only uses pz - else - oxxxxx( momenta, 0, cHel[ihel][0], -1, w_fp[0], 0 ); -#endif + oxxxxx( momenta, 0., cHel[ihel][0], -1, w_fp[0], 0 ); - imzxxx( momenta, cHel[ihel][1], +1, w_fp[1], 1 ); // NB: imzxxx only uses pz + ixxxxx( momenta, 0., cHel[ihel][1], +1, w_fp[1], 1 ); - ixzxxx( momenta, cHel[ihel][2], -1, w_fp[2], 2 ); + ixxxxx( momenta, 0., cHel[ihel][2], -1, w_fp[2], 2 ); - oxzxxx( momenta, cHel[ihel][3], +1, w_fp[3], 3 ); + oxxxxx( momenta, 0., cHel[ihel][3], +1, w_fp[3], 3 ); - FFV1P0_3( w_fp[1], w_fp[0], COUPs[0], 0., 0., w_fp[4] ); + FFV1P0_3( w_fp[1], w_fp[0], COUPs[0], 1.0, 0., 0., w_fp[4] ); // Amplitude(s) for diagram number 1 - FFV1_0( w_fp[2], w_fp[3], w_fp[4], COUPs[0], &_fp[0] ); + FFV1_0( w_fp[2], w_fp[3], w_fp[4], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -266,10 +259,10 @@ namespace mg5amcCpu // *** DIAGRAM 2 OF 2 *** // Wavefunction(s) for diagram number 2 - FFV2_4_3( w_fp[1], w_fp[0], COUPs[1], COUPs[2], cIPD[0], cIPD[1], w_fp[4] ); + FFV2_4_3( w_fp[1], w_fp[0], COUPs[1], 1.0, COUPs[2], 1.0, cIPD[0], cIPD[1], w_fp[4] ); // Amplitude(s) for diagram number 2 - FFV2_4_0( w_fp[2], w_fp[3], w_fp[4], COUPs[1], COUPs[2], &_fp[0] ); + FFV2_4_0( w_fp[2], w_fp[3], w_fp[4], COUPs[1], 1.0, COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 2 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -791,8 +784,7 @@ namespace mg5amcCpu { // nprocesses>1 was last observed for "mirror processes" in uux_ttx in the 270 branch (see issue #343 and PRs #360 and #396) constexpr int nprocesses = 1; - static_assert( nprocesses == 1, "Assume nprocesses == 1" ); - // process_id corresponds to the index of DSIG1 Fortran functions (must be 1 because cudacpp is unable to handle DSIG2) + static_assert( nprocesses == 1 || nprocesses == 2, "Assume nprocesses == 1 or 2" ); constexpr int process_id = 1; // code generation source: madevent + cudacpp exporter static_assert( process_id == 1, "Assume process_id == 1" ); } diff --git a/epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum/auto_dsig1.f b/epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum/auto_dsig1.f index b836e34865..31e7790d2d 100644 --- a/epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum/auto_dsig1.f +++ b/epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum/auto_dsig1.f @@ -39,6 +39,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C LOCAL VARIABLES C INTEGER I,ITYPE,LP,IPROC + DOUBLE PRECISION QSCALE DOUBLE PRECISION EP1 DOUBLE PRECISION EM2 DOUBLE PRECISION XPQ(-7:7),PD(0:MAXPROC) @@ -129,15 +130,26 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) IF (ABS(LPP(IB(1))).GE.1) THEN !LP=SIGN(1,LPP(IB(1))) - EP1=PDG2PDF(LPP(IB(1)),-11, IB(1),XBK(IB(1)),DSQRT(Q2FACT(IB(1) - $ ))) + IF (DSQRT(Q2FACT(IB(1))).EQ.0D0) THEN + QSCALE=0D0 + DO I=3,NEXTERNAL + QSCALE=QSCALE+DSQRT(MAX(0D0,(PP(0,I)+PP(3,I))*(PP(0,I) + $ -PP(3,I)))) + ENDDO + QSCALE=QSCALE/2D0 + ELSE + QSCALE=DSQRT(Q2FACT(IB(1))) + ENDIF + EP1=PDG2PDF(LPP(IB(1)),-11, IB(1),XBK(IB(1)), QSCALE) IF (PDLABEL.EQ.'dressed') EP1_COMPONENTS(1:4) = $ EE_COMPONENTS(1:4) ENDIF IF (ABS(LPP(IB(2))).GE.1) THEN !LP=SIGN(1,LPP(IB(2))) - EM2=PDG2PDF(LPP(IB(2)),11, IB(2),XBK(IB(2)),DSQRT(Q2FACT(IB(2)) - $ )) + IF (DSQRT(Q2FACT(IB(2))).NE.0D0) THEN + QSCALE=DSQRT(Q2FACT(IB(2))) + ENDIF + EM2=PDG2PDF(LPP(IB(2)),11, IB(2),XBK(IB(2)), QSCALE) IF (PDLABEL.EQ.'dressed') EM2_COMPONENTS(1:4) = $ EE_COMPONENTS(1:4) ENDIF diff --git a/epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum/counters.cc b/epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum/counters.cc deleted file mode 100644 index 71fa817036..0000000000 --- a/epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum/counters.cc +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright (C) 2020-2023 CERN and UCLouvain. -// Licensed under the GNU Lesser General Public License (version 3 or later). -// Created by: A. Valassi (Dec 2022) for the MG5aMC CUDACPP plugin. -// Further modified by: A. Valassi (2022-2023) for the MG5aMC CUDACPP plugin. - -#include "timer.h" -#define TIMERTYPE std::chrono::high_resolution_clock - -#include -#include - -// NB1: The C functions counters_xxx_ in this file are called by Fortran code -// Hence the trailing "_": 'call counters_end()' links to counters_end_ -// See http://www.yolinux.com/TUTORIALS/LinuxTutorialMixingFortranAndC.html - -// NB2: This file also contains C++ code and is built using g++ -// Hence use 'extern "C"' to avoid name mangling by the C++ compiler -// See https://www.geeksforgeeks.org/extern-c-in-c - -extern "C" -{ - // Now: fortran=-1, cudacpp=0 - // Eventually: fortran=-1, cuda=0, cpp/none=1, cpp/sse4=2, etc... - constexpr unsigned int nimplC = 2; - constexpr unsigned int iimplF2C( int iimplF ) { return iimplF + 1; } - const char* iimplC2TXT( int iimplC ) - { - const int iimplF = iimplC - 1; - switch( iimplF ) - { - case -1: return "Fortran"; break; - case +0: return "CudaCpp"; break; - default: assert( false ); break; - } - } - - static mgOnGpu::Timer program_timer; - static float program_totaltime = 0; - static mgOnGpu::Timer matrix1_timer; - static float matrix1_totaltime = 0; - static mgOnGpu::Timer smatrix1_timer; - static float smatrix1_totaltime = 0; - static mgOnGpu::Timer smatrix1multi_timer[nimplC]; - static float smatrix1multi_totaltime[nimplC] = { 0 }; - static int matrix1_counter = 0; - static int smatrix1_counter = 0; - static int smatrix1multi_counter[nimplC] = { 0 }; - - void counters_initialise_() - { - program_timer.Start(); - return; - } - - void counters_matrix1_start_() - { - matrix1_counter++; - matrix1_timer.Start(); - return; - } - - void counters_matrix1_stop_() - { - matrix1_totaltime += matrix1_timer.GetDuration(); - return; - } - - void counters_smatrix1_start_() - { - smatrix1_counter++; - smatrix1_timer.Start(); - return; - } - - void counters_smatrix1_stop_() - { - smatrix1_totaltime += smatrix1_timer.GetDuration(); - return; - } - - void counters_smatrix1multi_start_( const int* iimplF, const int* pnevt ) - { - const unsigned int iimplC = iimplF2C( *iimplF ); - smatrix1multi_counter[iimplC] += *pnevt; - smatrix1multi_timer[iimplC].Start(); - return; - } - - void counters_smatrix1multi_stop_( const int* iimplF ) - { - const unsigned int iimplC = iimplF2C( *iimplF ); - smatrix1multi_totaltime[iimplC] += smatrix1multi_timer[iimplC].GetDuration(); - return; - } - - void counters_finalise_() - { - program_totaltime += program_timer.GetDuration(); - // Write to stdout - float overhead_totaltime = program_totaltime; - for( unsigned int iimplC = 0; iimplC < nimplC; iimplC++ ) overhead_totaltime -= smatrix1multi_totaltime[iimplC]; - printf( " [COUNTERS] PROGRAM TOTAL : %9.4fs\n", program_totaltime ); - printf( " [COUNTERS] Fortran Overhead ( 0 ) : %9.4fs\n", overhead_totaltime ); - for( unsigned int iimplC = 0; iimplC < nimplC; iimplC++ ) - if( smatrix1multi_counter[iimplC] > 0 ) - printf( " [COUNTERS] %7s MEs ( %1d ) : %9.4fs for %8d events => throughput is %8.2E events/s\n", - iimplC2TXT( iimplC ), - iimplC + 1, - smatrix1multi_totaltime[iimplC], - smatrix1multi_counter[iimplC], - smatrix1multi_counter[iimplC] / smatrix1multi_totaltime[iimplC] ); - return; - } -} diff --git a/epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum/counters.cc b/epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum/counters.cc new file mode 120000 index 0000000000..06e29b46f9 --- /dev/null +++ b/epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum/counters.cc @@ -0,0 +1 @@ +../counters.cc \ No newline at end of file diff --git a/epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum/matrix1.f b/epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum/matrix1.f index e00f0e1b64..21e300b33e 100644 --- a/epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum/matrix1.f +++ b/epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum/matrix1.f @@ -410,7 +410,6 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C ---------- C BEGIN CODE C ---------- - call counters_matrix1_start() IF (FIRST) THEN FIRST=.FALSE. IF(ZERO.NE.0D0) FK_ZERO = SIGN(MAX(ABS(ZERO), ABS(ZERO @@ -478,7 +477,6 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) ENDDO ENDDO - call counters_matrix1_stop() END SUBROUTINE PRINT_ZERO_AMP_1() diff --git a/epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum/ompnumthreads.cc b/epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum/ompnumthreads.cc deleted file mode 100644 index 1d004923b9..0000000000 --- a/epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum/ompnumthreads.cc +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (C) 2020-2023 CERN and UCLouvain. -// Licensed under the GNU Lesser General Public License (version 3 or later). -// Created by: A. Valassi (Dec 2022) for the MG5aMC CUDACPP plugin. -// Further modified by: A. Valassi (2022-2023) for the MG5aMC CUDACPP plugin. - -#include - -// NB1: The C function ompnumthreadsNotSetMeansOneThread_ is called by Fortran code -// Hence the trailing "_": 'call xxx()' links to xxx_ -// See http://www.yolinux.com/TUTORIALS/LinuxTutorialMixingFortranAndC.html - -// NB2: This file also contains C++ code and is built using g++ -// Hence use 'extern "C"' to avoid name mangling by the C++ compiler -// See https://www.geeksforgeeks.org/extern-c-in-c - -#ifdef _OPENMP -extern "C" -{ - void ompnumthreads_not_set_means_one_thread_() - { - const int debuglevel = 0; // quiet(-1), info(0), debug(1) - ompnumthreadsNotSetMeansOneThread( debuglevel ); // call the inline C++ function defined in the .h file - } -} -#endif diff --git a/epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum/ompnumthreads.cc b/epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum/ompnumthreads.cc new file mode 120000 index 0000000000..645dc78215 --- /dev/null +++ b/epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum/ompnumthreads.cc @@ -0,0 +1 @@ +../ompnumthreads.cc \ No newline at end of file diff --git a/epochX/cudacpp/ee_mumu.mad/SubProcesses/counters.cc b/epochX/cudacpp/ee_mumu.mad/SubProcesses/counters.cc new file mode 100644 index 0000000000..cd6ecc8acd --- /dev/null +++ b/epochX/cudacpp/ee_mumu.mad/SubProcesses/counters.cc @@ -0,0 +1,99 @@ +// Copyright (C) 2020-2023 CERN and UCLouvain. +// Licensed under the GNU Lesser General Public License (version 3 or later). +// Created by: A. Valassi (Dec 2022) for the MG5aMC CUDACPP plugin. +// Further modified by: A. Valassi (2022-2023) for the MG5aMC CUDACPP plugin. + +#include "timer.h" +#define TIMERTYPE std::chrono::high_resolution_clock + +#include +#include + +// NB1: The C functions counters_xxx_ in this file are called by Fortran code +// Hence the trailing "_": 'call counters_end()' links to counters_end_ +// See http://www.yolinux.com/TUTORIALS/LinuxTutorialMixingFortranAndC.html + +// NB2: This file also contains C++ code and is built using g++ +// Hence use 'extern "C"' to avoid name mangling by the C++ compiler +// See https://www.geeksforgeeks.org/extern-c-in-c + +extern "C" +{ + // Now: fortran=-1, cudacpp=0 + // Eventually: fortran=-1, cuda=0, cpp/none=1, cpp/sse4=2, etc... + constexpr unsigned int nimplC = 2; + constexpr unsigned int iimplF2C( int iimplF ) { return iimplF + 1; } + const char* iimplC2TXT( int iimplC ) + { + const int iimplF = iimplC - 1; + switch( iimplF ) + { + case -1: return "Fortran"; break; + case +0: return "CudaCpp"; break; + default: assert( false ); break; + } + } + + static mgOnGpu::Timer program_timer; + static float program_totaltime = 0; + static mgOnGpu::Timer smatrix1_timer; + static float smatrix1_totaltime = 0; + static mgOnGpu::Timer smatrix1multi_timer[nimplC]; + static float smatrix1multi_totaltime[nimplC] = { 0 }; + static int matrix1_counter = 0; + static int smatrix1_counter = 0; + static int smatrix1multi_counter[nimplC] = { 0 }; + + void counters_initialise_() + { + program_timer.Start(); + return; + } + + void counters_smatrix1_start_() + { + smatrix1_counter++; + smatrix1_timer.Start(); + return; + } + + void counters_smatrix1_stop_() + { + smatrix1_totaltime += smatrix1_timer.GetDuration(); + return; + } + + void counters_smatrix1multi_start_( const int* iimplF, const int* pnevt ) + { + const unsigned int iimplC = iimplF2C( *iimplF ); + smatrix1multi_counter[iimplC] += *pnevt; + smatrix1multi_timer[iimplC].Start(); + return; + } + + void counters_smatrix1multi_stop_( const int* iimplF ) + { + const unsigned int iimplC = iimplF2C( *iimplF ); + smatrix1multi_totaltime[iimplC] += smatrix1multi_timer[iimplC].GetDuration(); + return; + } + + void counters_finalise_() + { + program_totaltime += program_timer.GetDuration(); + // Write to stdout + float overhead_totaltime = program_totaltime; + for( unsigned int iimplC = 0; iimplC < nimplC; iimplC++ ) overhead_totaltime -= smatrix1multi_totaltime[iimplC]; + printf( " [COUNTERS] PROGRAM TOTAL : %9.4fs\n", program_totaltime ); + printf( " [COUNTERS] Fortran Overhead ( 0 ) : %9.4fs\n", overhead_totaltime ); + for( unsigned int iimplC = 0; iimplC < nimplC; iimplC++ ) + if( smatrix1multi_counter[iimplC] > 0 ) + printf( " [COUNTERS] %7s MEs ( %1d ) : %9.4fs for %8d events => throughput is %8.2E events/s\n", + iimplC2TXT( iimplC ), + iimplC + 1, + smatrix1multi_totaltime[iimplC], + smatrix1multi_counter[iimplC], + smatrix1multi_counter[iimplC] / smatrix1multi_totaltime[iimplC] ); + return; + } +} diff --git a/epochX/cudacpp/ee_mumu.mad/SubProcesses/cudacpp.mk b/epochX/cudacpp/ee_mumu.mad/SubProcesses/cudacpp.mk index 43cee0977e..15669185ad 100644 --- a/epochX/cudacpp/ee_mumu.mad/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/ee_mumu.mad/SubProcesses/cudacpp.mk @@ -1,7 +1,7 @@ # Copyright (C) 2020-2023 CERN and UCLouvain. # Licensed under the GNU Lesser General Public License (version 3 or later). # Created by: S. Roiser (Feb 2020) for the MG5aMC CUDACPP plugin. -# Further modified by: O. Mattelaer, S. Roiser, A. Valassi (2020-2023) for the MG5aMC CUDACPP plugin. +# Further modified by: J. Teig, O. Mattelaer, S. Roiser, A. Valassi (2020-2023) for the MG5aMC CUDACPP plugin. #=== Determine the name of this makefile (https://ftp.gnu.org/old-gnu/Manuals/make-3.80/html_node/make_17.html) #=== NB: different names (e.g. cudacpp.mk and cudacpp_src.mk) are used in the Subprocess and src directories @@ -86,6 +86,14 @@ endif #------------------------------------------------------------------------------- +.DEFAULT_GOAL := usage + +# Target if user does not specify target +usage: + $(error Unknown target='$(MAKECMDGOALS)': only 'cppnone', 'cppsse4', 'cppavx2', 'cpp512y', 'cpp512z' and 'cuda' are supported!) + +#------------------------------------------------------------------------------- + #=== Configure the C++ compiler CXXFLAGS = $(OPTFLAGS) -std=c++17 $(INCFLAGS) -Wall -Wshadow -Wextra @@ -103,70 +111,73 @@ endif #------------------------------------------------------------------------------- -#=== Configure the CUDA compiler - -# If CXX is not a single word (example "clang++ --gcc-toolchain...") then disable CUDA builds (issue #505) -# This is because it is impossible to pass this to "CUFLAGS += -ccbin " below -ifneq ($(words $(subst ccache ,,$(CXX))),1) # allow at most "CXX=ccache " from outside - $(warning CUDA builds are not supported for multi-word CXX "$(CXX)") - override CUDA_HOME=disabled -endif - -# If CUDA_HOME is not set, try to set it from the location of nvcc -ifndef CUDA_HOME - CUDA_HOME = $(patsubst %bin/nvcc,%,$(shell which nvcc 2>/dev/null)) - $(warning CUDA_HOME was not set: using "$(CUDA_HOME)") -endif - -# Set NVCC as $(CUDA_HOME)/bin/nvcc if it exists -ifneq ($(wildcard $(CUDA_HOME)/bin/nvcc),) - NVCC = $(CUDA_HOME)/bin/nvcc - USE_NVTX ?=-DUSE_NVTX - # See https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html - # See https://arnon.dk/matching-sm-architectures-arch-and-gencode-for-various-nvidia-cards/ - # Default: use compute capability 70 for V100 (CERN lxbatch, CERN itscrd, Juwels Cluster). - # Embed device code for 70, and PTX for 70+. - # Export MADGRAPH_CUDA_ARCHITECTURE (comma-separated list) to use another value or list of values (see #533). - # Examples: use 60 for P100 (Piz Daint), 80 for A100 (Juwels Booster, NVidia raplab/Curiosity). - MADGRAPH_CUDA_ARCHITECTURE ?= 70 - ###CUARCHFLAGS = -gencode arch=compute_$(MADGRAPH_CUDA_ARCHITECTURE),code=compute_$(MADGRAPH_CUDA_ARCHITECTURE) -gencode arch=compute_$(MADGRAPH_CUDA_ARCHITECTURE),code=sm_$(MADGRAPH_CUDA_ARCHITECTURE) # Older implementation (AV): go back to this one for multi-GPU support #533 - ###CUARCHFLAGS = --gpu-architecture=compute_$(MADGRAPH_CUDA_ARCHITECTURE) --gpu-code=sm_$(MADGRAPH_CUDA_ARCHITECTURE),compute_$(MADGRAPH_CUDA_ARCHITECTURE) # Newer implementation (SH): cannot use this as-is for multi-GPU support #533 - comma:=, - CUARCHFLAGS = $(foreach arch,$(subst $(comma), ,$(MADGRAPH_CUDA_ARCHITECTURE)),-gencode arch=compute_$(arch),code=compute_$(arch) -gencode arch=compute_$(arch),code=sm_$(arch)) - CUINC = -I$(CUDA_HOME)/include/ - CURANDLIBFLAGS = -L$(CUDA_HOME)/lib64/ -lcurand # NB: -lcuda is not needed here! - CUOPTFLAGS = -lineinfo - CUFLAGS = $(foreach opt, $(OPTFLAGS), -Xcompiler $(opt)) $(CUOPTFLAGS) $(INCFLAGS) $(CUINC) $(USE_NVTX) $(CUARCHFLAGS) -use_fast_math - ###CUFLAGS += -Xcompiler -Wall -Xcompiler -Wextra -Xcompiler -Wshadow - ###NVCC_VERSION = $(shell $(NVCC) --version | grep 'Cuda compilation tools' | cut -d' ' -f5 | cut -d, -f1) - CUFLAGS += -std=c++17 # need CUDA >= 11.2 (see #333): this is enforced in mgOnGpuConfig.h - # Without -maxrregcount: baseline throughput: 6.5E8 (16384 32 12) up to 7.3E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 160 # improves throughput: 6.9E8 (16384 32 12) up to 7.7E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 128 # improves throughput: 7.3E8 (16384 32 12) up to 7.6E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 96 # degrades throughput: 4.1E8 (16384 32 12) up to 4.5E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 64 # degrades throughput: 1.7E8 (16384 32 12) flat at 1.7E8 (65536 128 12) -else ifneq ($(origin REQUIRE_CUDA),undefined) - # If REQUIRE_CUDA is set but no cuda is found, stop here (e.g. for CI tests on GPU #443) - $(error No cuda installation found (set CUDA_HOME or make nvcc visible in PATH)) -else - # No cuda. Switch cuda compilation off and go to common random numbers in C++ - $(warning CUDA_HOME is not set or is invalid: export CUDA_HOME to compile with cuda) - override NVCC= - override USE_NVTX= - override CUINC= - override CURANDLIBFLAGS= -endif -export NVCC -export CUFLAGS +#=== Configure the CUDA compiler for the CUDA target -# Set the host C++ compiler for nvcc via "-ccbin " -# (NB issue #505: this must be a single word, "clang++ --gcc-toolchain..." is not supported) -CUFLAGS += -ccbin $(shell which $(subst ccache ,,$(CXX))) +ifneq (,$(findstring $(MAKECMDGOALS),cuda-gcheck-runGcheck-runFGcheck-cmpFGcheck-memcheck)) + # If CXX is not a single word (example "clang++ --gcc-toolchain...") then disable CUDA builds (issue #505) + # This is because it is impossible to pass this to "CUFLAGS += -ccbin " below + ifneq ($(words $(subst ccache ,,$(CXX))),1) # allow at most "CXX=ccache " from outside + $(warning CUDA builds are not supported for multi-word CXX "$(CXX)") + override CUDA_HOME=disabled + endif -# Allow newer (unsupported) C++ compilers with older versions of CUDA if ALLOW_UNSUPPORTED_COMPILER_IN_CUDA is set (#504) -ifneq ($(origin ALLOW_UNSUPPORTED_COMPILER_IN_CUDA),undefined) -CUFLAGS += -allow-unsupported-compiler -endif + # If CUDA_HOME is not set, try to set it from the location of nvcc + ifndef CUDA_HOME + CUDA_HOME = $(patsubst %bin/nvcc,%,$(shell which nvcc 2>/dev/null)) + $(warning CUDA_HOME was not set: using "$(CUDA_HOME)") + endif + + # Set NVCC as $(CUDA_HOME)/bin/nvcc if it exists + ifneq ($(wildcard $(CUDA_HOME)/bin/nvcc),) + NVCC = $(CUDA_HOME)/bin/nvcc + USE_NVTX ?=-DUSE_NVTX + # See https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html + # See https://arnon.dk/matching-sm-architectures-arch-and-gencode-for-various-nvidia-cards/ + # Default: use compute capability 70 for V100 (CERN lxbatch, CERN itscrd, Juwels Cluster). + # Embed device code for 70, and PTX for 70+. + # Export MADGRAPH_CUDA_ARCHITECTURE (comma-separated list) to use another value or list of values (see #533). + # Examples: use 60 for P100 (Piz Daint), 80 for A100 (Juwels Booster, NVidia raplab/Curiosity). + MADGRAPH_CUDA_ARCHITECTURE ?= 70 + ###CUARCHFLAGS = -gencode arch=compute_$(MADGRAPH_CUDA_ARCHITECTURE),code=compute_$(MADGRAPH_CUDA_ARCHITECTURE) -gencode arch=compute_$(MADGRAPH_CUDA_ARCHITECTURE),code=sm_$(MADGRAPH_CUDA_ARCHITECTURE) # Older implementation (AV): go back to this one for multi-GPU support #533 + ###CUARCHFLAGS = --gpu-architecture=compute_$(MADGRAPH_CUDA_ARCHITECTURE) --gpu-code=sm_$(MADGRAPH_CUDA_ARCHITECTURE),compute_$(MADGRAPH_CUDA_ARCHITECTURE) # Newer implementation (SH): cannot use this as-is for multi-GPU support #533 + comma:=, + CUARCHFLAGS = $(foreach arch,$(subst $(comma), ,$(MADGRAPH_CUDA_ARCHITECTURE)),-gencode arch=compute_$(arch),code=compute_$(arch) -gencode arch=compute_$(arch),code=sm_$(arch)) + CUINC = -I$(CUDA_HOME)/include/ + CURANDLIBFLAGS = -L$(CUDA_HOME)/lib64/ -lcurand # NB: -lcuda is not needed here! + CUOPTFLAGS = -lineinfo + CUFLAGS = $(foreach opt, $(OPTFLAGS), -Xcompiler $(opt)) $(CUOPTFLAGS) $(INCFLAGS) $(CUINC) $(USE_NVTX) $(CUARCHFLAGS) -use_fast_math + ###CUFLAGS += -Xcompiler -Wall -Xcompiler -Wextra -Xcompiler -Wshadow + ###NVCC_VERSION = $(shell $(NVCC) --version | grep 'Cuda compilation tools' | cut -d' ' -f5 | cut -d, -f1) + CUFLAGS += -std=c++17 # need CUDA >= 11.2 (see #333): this is enforced in mgOnGpuConfig.h + # Without -maxrregcount: baseline throughput: 6.5E8 (16384 32 12) up to 7.3E8 (65536 128 12) + ###CUFLAGS+= --maxrregcount 160 # improves throughput: 6.9E8 (16384 32 12) up to 7.7E8 (65536 128 12) + ###CUFLAGS+= --maxrregcount 128 # improves throughput: 7.3E8 (16384 32 12) up to 7.6E8 (65536 128 12) + ###CUFLAGS+= --maxrregcount 96 # degrades throughput: 4.1E8 (16384 32 12) up to 4.5E8 (65536 128 12) + ###CUFLAGS+= --maxrregcount 64 # degrades throughput: 1.7E8 (16384 32 12) flat at 1.7E8 (65536 128 12) + else ifneq ($(origin REQUIRE_CUDA),undefined) + # If REQUIRE_CUDA is set but no cuda is found, stop here (e.g. for CI tests on GPU #443) + $(error No cuda installation found (set CUDA_HOME or make nvcc visible in PATH)) + else + # No cuda. Switch cuda compilation off and go to common random numbers in C++ + $(warning CUDA_HOME is not set or is invalid: export CUDA_HOME to compile with cuda) + override NVCC= + override USE_NVTX= + override CUINC= + override CURANDLIBFLAGS= + endif + export NVCC + export CUFLAGS + + # Set the host C++ compiler for nvcc via "-ccbin " + # (NB issue #505: this must be a single word, "clang++ --gcc-toolchain..." is not supported) + CUFLAGS += -ccbin $(shell which $(subst ccache ,,$(CXX))) + + # Allow newer (unsupported) C++ compilers with older versions of CUDA if ALLOW_UNSUPPORTED_COMPILER_IN_CUDA is set (#504) + ifneq ($(origin ALLOW_UNSUPPORTED_COMPILER_IN_CUDA),undefined) + CUFLAGS += -allow-unsupported-compiler + endif + +endif # ($(MAKECMDGOALS),cuda) #------------------------------------------------------------------------------- @@ -226,32 +237,6 @@ override OMPFLAGS = -fopenmp ###override OMPFLAGS = # disable OpenMP MT (default before #575) endif -# Set the default AVX (vectorization) choice -ifeq ($(AVX),) - ifeq ($(UNAME_P),ppc64le) - ###override AVX = none - override AVX = sse4 - else ifeq ($(UNAME_P),arm) - ###override AVX = none - override AVX = sse4 - else ifeq ($(wildcard /proc/cpuinfo),) - override AVX = none - $(warning Using AVX='$(AVX)' because host SIMD features cannot be read from /proc/cpuinfo) - else ifeq ($(shell grep -m1 -c avx512vl /proc/cpuinfo)$(shell $(CXX) --version | grep ^clang),1) - override AVX = 512y - ###$(info Using AVX='$(AVX)' as no user input exists) - else - override AVX = avx2 - ifneq ($(shell grep -m1 -c avx512vl /proc/cpuinfo),1) - $(warning Using AVX='$(AVX)' because host does not support avx512vl) - else - $(warning Using AVX='$(AVX)' because this is faster than avx512vl for clang) - endif - endif -else - ###$(info Using AVX='$(AVX)' according to user input) -endif - # Set the default FPTYPE (floating point type) choice ifeq ($(FPTYPE),) override FPTYPE = d @@ -276,6 +261,21 @@ ifeq ($(RNDGEN),) endif endif +# set the correct AVX based on avxcpp target +ifeq ($(MAKECMDGOALS),cppnone) # no SIMD + override AVX = none +else ifeq ($(MAKECMDGOALS),cppsse4) # SSE4.2 with 128 width (xmm registers) + override AVX = sse4 +else ifeq ($(MAKECMDGOALS),cppavx2) # AVX2 with 256 width (ymm registers) [DEFAULT for clang] + override AVX = avx2 +else ifeq ($(MAKECMDGOALS),cpp512y) # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] + override AVX = 512y +else ifeq ($(MAKECMDGOALS),cpp512z) # AVX512 with 512 width (zmm registers) + override AVX = 512z +else + override AVX = none +endif + # Export AVX, FPTYPE, HELINL, HRDCOD, RNDGEN, OMPFLAGS so that it is not necessary to pass them to the src Makefile too export AVX export FPTYPE @@ -295,50 +295,52 @@ CXXFLAGS += $(OMPFLAGS) # Set the build flags appropriate to each AVX choice (example: "make AVX=none") # [NB MGONGPU_PVW512 is needed because "-mprefer-vector-width=256" is not exposed in a macro] # [See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96476] -$(info AVX=$(AVX)) -ifeq ($(UNAME_P),ppc64le) - ifeq ($(AVX),sse4) - override AVXFLAGS = -D__SSE4_2__ # Power9 VSX with 128 width (VSR registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on PowerPC for the moment) - endif -else ifeq ($(UNAME_P),arm) - ifeq ($(AVX),sse4) - override AVXFLAGS = -D__SSE4_2__ # ARM NEON with 128 width (Q/quadword registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on ARM for the moment) - endif -else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 - ifeq ($(AVX),none) - override AVXFLAGS = -mno-sse3 # no SIMD - else ifeq ($(AVX),sse4) - override AVXFLAGS = -mno-avx # SSE4.2 with 128 width (xmm registers) - else ifeq ($(AVX),avx2) - override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(AVX),512y) - override AVXFLAGS = -march=skylake -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(AVX),512z) - override AVXFLAGS = -march=skylake -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) - else - $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) - endif -else - ifeq ($(AVX),none) - override AVXFLAGS = -march=x86-64 # no SIMD (see #588) - else ifeq ($(AVX),sse4) - override AVXFLAGS = -march=nehalem # SSE4.2 with 128 width (xmm registers) - else ifeq ($(AVX),avx2) - override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(AVX),512y) - override AVXFLAGS = -march=skylake-avx512 -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(AVX),512z) - override AVXFLAGS = -march=skylake-avx512 -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) +ifeq ($(findstring cpp,$(MAKECMDGOALS)),cpp) + $(info AVX=$(AVX)) + ifeq ($(UNAME_P),ppc64le) + ifeq ($(AVX),sse4) + override AVXFLAGS = -D__SSE4_2__ # Power9 VSX with 128 width (VSR registers) + else ifneq ($(AVX),none) + $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on PowerPC for the moment) + endif + else ifeq ($(UNAME_P),arm) + ifeq ($(AVX),sse4) + override AVXFLAGS = -D__SSE4_2__ # ARM NEON with 128 width (Q/quadword registers) + else ifneq ($(AVX),none) + $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on ARM for the moment) + endif + else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 + ifeq ($(AVX),none) + override AVXFLAGS = -mno-sse3 # no SIMD + else ifeq ($(AVX),sse4) + override AVXFLAGS = -mno-avx # SSE4.2 with 128 width (xmm registers) + else ifeq ($(AVX),avx2) + override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] + else ifeq ($(AVX),512y) + override AVXFLAGS = -march=skylake -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] + else ifeq ($(AVX),512z) + override AVXFLAGS = -march=skylake -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) + else + $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) + endif else - $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) + ifeq ($(AVX),none) + override AVXFLAGS = -march=x86-64 # no SIMD (see #588) + else ifeq ($(AVX),sse4) + override AVXFLAGS = -march=nehalem # SSE4.2 with 128 width (xmm registers) + else ifeq ($(AVX),avx2) + override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] + else ifeq ($(AVX),512y) + override AVXFLAGS = -march=skylake-avx512 -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] + else ifeq ($(AVX),512z) + override AVXFLAGS = -march=skylake-avx512 -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) + else + $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) + endif endif + # For the moment, use AVXFLAGS everywhere: eventually, use them only in encapsulated implementations? + CXXFLAGS+= $(AVXFLAGS) endif -# For the moment, use AVXFLAGS everywhere: eventually, use them only in encapsulated implementations? -CXXFLAGS+= $(AVXFLAGS) # Set the build flags appropriate to each FPTYPE choice (example: "make FPTYPE=f") $(info FPTYPE=$(FPTYPE)) @@ -389,11 +391,19 @@ endif # Build directory "short" tag (defines target and path to the optional build directory) # (Rationale: keep directory names shorter, e.g. do not include random number generator choice) -override DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) +ifneq ($(NVCC),) + override DIRTAG = cuda_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) +else + override DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) +endif # Build lockfile "full" tag (defines full specification of build options that cannot be intermixed) # (Rationale: avoid mixing of CUDA and no-CUDA environment builds with different random number generators) -override TAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) +ifneq ($(NVCC),) + override TAG = cuda_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) +else + override TAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) +endif # Build directory: current directory by default, or build.$(DIRTAG) if USEBUILDDIR==1 ifeq ($(USEBUILDDIR),1) @@ -448,9 +458,9 @@ endif testmain=$(BUILDDIR)/runTest.exe ifneq ($(GTESTLIBS),) -all.$(TAG): $(BUILDDIR)/.build.$(TAG) $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_main) $(cxx_main) $(fcu_main) $(fcxx_main) $(testmain) +all.$(TAG): $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_main) $(cxx_main) $(fcu_main) $(fcxx_main) $(testmain) else -all.$(TAG): $(BUILDDIR)/.build.$(TAG) $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_main) $(cxx_main) $(fcu_main) $(fcxx_main) +all.$(TAG): $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_main) $(cxx_main) $(fcu_main) $(fcxx_main) endif # Target (and build options): debug @@ -460,27 +470,20 @@ debug: CUOPTFLAGS = -G debug: MAKEDEBUG := debug debug: all.$(TAG) -# Target: tag-specific build lockfiles -override oldtagsb=`if [ -d $(BUILDDIR) ]; then find $(BUILDDIR) -maxdepth 1 -name '.build.*' ! -name '.build.$(TAG)' -exec echo $(shell pwd)/{} \; ; fi` -$(BUILDDIR)/.build.$(TAG): - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - @if [ "$(oldtagsb)" != "" ]; then echo "Cannot build for tag=$(TAG) as old builds exist for other tags:"; echo " $(oldtagsb)"; echo "Please run 'make clean' first\nIf 'make clean' is not enough: run 'make clean USEBUILDDIR=1 AVX=$(AVX) FPTYPE=$(FPTYPE)' or 'make cleanall'"; exit 1; fi - @touch $(BUILDDIR)/.build.$(TAG) - # Generic target and build rules: objects from CUDA compilation ifneq ($(NVCC),) -$(BUILDDIR)/%.o : %.cu *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) +$(BUILDDIR)/%.o : %.cu *.h ../../src/*.h @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c $< -o $@ -$(BUILDDIR)/%_cu.o : %.cc *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) +$(BUILDDIR)/%_cu.o : %.cc *.h ../../src/*.h @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c -x cu $< -o $@ endif # Generic target and build rules: objects from C++ compilation # (NB do not include CUINC here! add it only for NVTX or curand #679) -$(BUILDDIR)/%.o : %.cc *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) +$(BUILDDIR)/%.o : %.cc *.h ../../src/*.h @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi $(CXX) $(CPPFLAGS) $(CXXFLAGS) -fPIC -c $< -o $@ @@ -532,7 +535,7 @@ endif # Target (and build rules): common (src) library commonlib : $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so -$(LIBDIR)/lib$(MG5AMC_COMMONLIB).so: ../../src/*.h ../../src/*.cc $(BUILDDIR)/.build.$(TAG) +$(LIBDIR)/lib$(MG5AMC_COMMONLIB).so: ../../src/*.h ../../src/*.cc $(MAKE) -C ../../src $(MAKEDEBUG) -f $(CUDACPP_SRC_MAKEFILE) #------------------------------------------------------------------------------- @@ -711,35 +714,27 @@ endif # Target: build all targets in all AVX modes (each AVX mode in a separate build directory) # Split the avxall target into five separate targets to allow parallel 'make -j avxall' builds # (Hack: add a fbridge.inc dependency to avxall, to ensure it is only copied once for all AVX modes) -avxnone: - @echo - $(MAKE) USEBUILDDIR=1 AVX=none -f $(CUDACPP_MAKEFILE) +cppnone: $(cxx_main) -avxsse4: - @echo - $(MAKE) USEBUILDDIR=1 AVX=sse4 -f $(CUDACPP_MAKEFILE) +cppsse4: $(cxx_main) -avxavx2: - @echo - $(MAKE) USEBUILDDIR=1 AVX=avx2 -f $(CUDACPP_MAKEFILE) +cppavx2: $(cxx_main) -avx512y: - @echo - $(MAKE) USEBUILDDIR=1 AVX=512y -f $(CUDACPP_MAKEFILE) +cpp512y: $(cxx_main) -avx512z: - @echo - $(MAKE) USEBUILDDIR=1 AVX=512z -f $(CUDACPP_MAKEFILE) +cpp512z: $(cxx_main) + +cuda: $(cu_main) ifeq ($(UNAME_P),ppc64le) ###avxall: $(INCDIR)/fbridge.inc avxnone avxsse4 -avxall: avxnone avxsse4 +cppall: cppnone cppsse4 else ifeq ($(UNAME_P),arm) ###avxall: $(INCDIR)/fbridge.inc avxnone avxsse4 -avxall: avxnone avxsse4 +cppall: cppnone cppsse4 else ###avxall: $(INCDIR)/fbridge.inc avxnone avxsse4 avxavx2 avx512y avx512z -avxall: avxnone avxsse4 avxavx2 avx512y avx512z +cppall: cppnone cppsse4 cppavx2 cpp512y cpp512z endif #------------------------------------------------------------------------------- @@ -747,21 +742,31 @@ endif # Target: clean the builds .PHONY: clean +BUILD_DIRS := $(wildcard build.*) +NUM_BUILD_DIRS := $(words $(BUILD_DIRS)) + clean: ifeq ($(USEBUILDDIR),1) - rm -rf $(BUILDDIR) +ifeq ($(NUM_BUILD_DIRS),1) + $(info USEBUILDDIR=1, Only one build directory found.) + rm -rf $(BUILD_DIRS) +else ifeq ($(NUM_BUILD_DIRS),0) + $(error USEBUILDDIR=1, but no build directories are found.) else - rm -f $(BUILDDIR)/.build.* $(BUILDDIR)/*.o $(BUILDDIR)/*.exe + $(error Multiple BUILDDIR's found! Use 'cleannone', 'cleansse4', 'cleanavx2', 'clean512y','clean512z', 'cleancuda' or 'cleanall'.) +endif +else + rm -f $(BUILDDIR)/*.o $(BUILDDIR)/*.exe rm -f $(LIBDIR)/lib$(MG5AMC_CXXLIB).so $(LIBDIR)/lib$(MG5AMC_CULIB).so endif $(MAKE) -C ../../src clean -f $(CUDACPP_SRC_MAKEFILE) -### rm -rf $(INCDIR) cleanall: @echo - $(MAKE) USEBUILDDIR=0 clean -f $(CUDACPP_MAKEFILE) + rm -f $(BUILDDIR)/*.o $(BUILDDIR)/*.exe + rm -f $(LIBDIR)/lib$(MG5AMC_CXXLIB).so $(LIBDIR)/lib$(MG5AMC_CULIB).so @echo - $(MAKE) USEBUILDDIR=0 -C ../../src cleanall -f $(CUDACPP_SRC_MAKEFILE) + $(MAKE) -C ../../src cleanall -f $(CUDACPP_SRC_MAKEFILE) rm -rf build.* # Target: clean the builds as well as the gtest installation(s) @@ -771,6 +776,42 @@ ifneq ($(wildcard $(TESTDIRCOMMON)),) endif $(MAKE) -C $(TESTDIRLOCAL) clean +# Target: clean different builds +cleannone: + rm -rf build.none_* + rm -f ../../lib/build.none_*/lib$(MG5AMC_CXXLIB).so + $(MAKE) -C ../../src cleannone -f $(CUDACPP_SRC_MAKEFILE) + +cleansse4: + rm -rf build.sse4_* + rm -f ../../lib/build.sse4_*/lib$(MG5AMC_CXXLIB).so + $(MAKE) -C ../../src cleansse4 -f $(CUDACPP_SRC_MAKEFILE) + +cleanavx2: + rm -rf build.avx2_* + rm -f ../../lib/build.avx2_*/lib$(MG5AMC_CXXLIB).so + $(MAKE) -C ../../src cleanavx2 -f $(CUDACPP_SRC_MAKEFILE) + +clean512y: + rm -rf build.512y_* + rm -f ../../lib/build.512y_*/lib$(MG5AMC_CXXLIB).so + $(MAKE) -C ../../src clean512y -f $(CUDACPP_SRC_MAKEFILE) + +clean512z: + rm -rf build.512z_* + rm -f ../../lib/build.512z_*/lib$(MG5AMC_CXXLIB).so + $(MAKE) -C ../../src clean512z -f $(CUDACPP_SRC_MAKEFILE) + +cleancuda: + rm -rf build.cuda_* + rm -f ../../lib/build.cuda_*/lib$(MG5AMC_CULIB).so + $(MAKE) -C ../../src cleancuda -f $(CUDACPP_SRC_MAKEFILE) + +cleandir: + rm -f ./*.o ./*.exe + rm -f ../../lib/lib$(MG5AMC_CXXLIB).so ../../lib/lib$(MG5AMC_CULIB).so + $(MAKE) -C ../../src cleandir -f $(CUDACPP_SRC_MAKEFILE) + #------------------------------------------------------------------------------- # Target: show system and compiler information @@ -817,13 +858,10 @@ endif #------------------------------------------------------------------------------- -# Target: check (run the C++ test executable) +# Target: check/gcheck (run the C++ test executable) # [NB THIS IS WHAT IS USED IN THE GITHUB CI!] -ifneq ($(NVCC),) -check: runTest cmpFcheck cmpFGcheck -else check: runTest cmpFcheck -endif +gcheck: runTest cmpFGcheck # Target: runTest (run the C++ test executable runTest.exe) runTest: all.$(TAG) @@ -863,4 +901,4 @@ cmpFGcheck: all.$(TAG) memcheck: all.$(TAG) $(RUNTIME) $(CUDA_HOME)/bin/cuda-memcheck --check-api-memory-access yes --check-deprecated-instr yes --check-device-heap yes --demangle full --language c --leak-check full --racecheck-report all --report-api-errors all --show-backtrace yes --tool memcheck --track-unused-memory yes $(BUILDDIR)/gcheck.exe -p 2 32 2 -#------------------------------------------------------------------------------- +#------------------------------------------------------------------------------- \ No newline at end of file diff --git a/epochX/cudacpp/ee_mumu.mad/SubProcesses/dummy_fct.f b/epochX/cudacpp/ee_mumu.mad/SubProcesses/dummy_fct.f index 076cf29d67..4f7a204b8f 100644 --- a/epochX/cudacpp/ee_mumu.mad/SubProcesses/dummy_fct.f +++ b/epochX/cudacpp/ee_mumu.mad/SubProcesses/dummy_fct.f @@ -32,7 +32,7 @@ logical FUNCTION dummy_cuts(P) LOGICAL IS_A_NU(NEXTERNAL),IS_HEAVY(NEXTERNAL) logical do_cuts(nexternal) COMMON /TO_SPECISA/IS_A_J,IS_A_A,IS_A_L,IS_A_B,IS_A_NU,IS_HEAVY, - . IS_A_ONIUM, do_cuts + & IS_A_ONIUM, do_cuts dummy_cuts=.true. @@ -118,15 +118,16 @@ double precision function user_dynamical_scale(P) C ************************************************************ -C default for the library implementing a dummt bias function +C default for the library implementing a dummy bias function C ************************************************************ subroutine bias_wgt_custom(p, original_weight, bias_weight) - implicit none + implicit none C C Parameters C include 'nexternal.inc' -C + +C C Arguments C double precision p(0:3, nexternal) @@ -161,3 +162,4 @@ subroutine bias_wgt_custom(p, original_weight, bias_weight) return end subroutine bias_wgt_custom + diff --git a/epochX/cudacpp/ee_mumu.mad/SubProcesses/makefile b/epochX/cudacpp/ee_mumu.mad/SubProcesses/makefile index 74db44d848..093bc84271 100644 --- a/epochX/cudacpp/ee_mumu.mad/SubProcesses/makefile +++ b/epochX/cudacpp/ee_mumu.mad/SubProcesses/makefile @@ -9,6 +9,33 @@ FFLAGS+= -cpp # Compile counters with -O3 as in the cudacpp makefile (avoid being "unfair" to Fortran #740) CXXFLAGS = -O3 -Wall -Wshadow -Wextra +# Sets correct target based on MAKECMDGOALS +ifeq ($(MAKECMDGOALS),) + TARGET := undefined +else + ifeq ($(shell grep -q madevent_ <<< $(MAKECMDGOALS)a),) + TARGET := $(word 2,($(subst _, ,$(MAKECMDGOALS)))) + else + TARGET := $(MAKECMDGOALS) + endif +endif + +# Sets correct cppavx target as dependency when compiling Fortran +ifeq ($(shell grep -q cpp <<< $(MAKECMDGOALS)a),) + ifeq ($(TARGET),cpp) + CPPTARGET := cppavx2 + else + CPPTARGET := $(TARGET) + endif +endif + +# Default goal +.DEFAULT_GOAL := usage + +# Target if user does not specify target +usage: + $(error Unknown target='$(TARGET)': only 'cppnone', 'cppsse4', 'cppavx2', 'cpp512y', 'cpp512z' and 'cuda' are supported!) + # Enable ccache if USECCACHE=1 ifeq ($(USECCACHE)$(shell echo $(CXX) | grep ccache),1) override CXX:=ccache $(CXX) @@ -48,10 +75,10 @@ CUDACPP_MAKEFILE=cudacpp.mk # NB2 Use '|&' in CUDACPP_BUILDDIR to avoid confusing errors about googletest #507 # NB3 Do not add a comment inlined "CUDACPP_BUILDDIR=$(shell ...) # comment" as otherwise a trailing space is included... # NB4 The variables relevant to the cudacpp Makefile must be explicitly passed to $(shell...) -CUDACPP_MAKEENV:=$(shell echo '$(.VARIABLES)' | tr " " "\n" | egrep "(USEBUILDDIR|AVX|FPTYPE|HELINL|HRDCOD)") +CUDACPP_MAKEENV:=$(shell echo '$(.VARIABLES)' | tr " " "\n" | egrep "(USEBUILDDIR|FPTYPE|HELINL|HRDCOD)") ###$(info CUDACPP_MAKEENV=$(CUDACPP_MAKEENV)) ###$(info $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))")) -CUDACPP_BUILDDIR:=$(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn |& awk '/Building/{print $$3}' | sed s/BUILDDIR=//) +CUDACPP_BUILDDIR:=$(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn $(TARGET) 2>/dev/null | awk '/Building/{print $$3}' | sed s/BUILDDIR=//) ifeq ($(CUDACPP_BUILDDIR),) $(error CUDACPP_BUILDDIR='$(CUDACPP_BUILDDIR)' should not be empty!) else @@ -89,7 +116,7 @@ SYMMETRY = symmetry.o idenparts.o # Binaries -LDFLAGS+=-Wl,--no-relax # avoid 'failed to convert GOTPCREL relocation' error #458 +#LDFLAGS+=-Wl,--no-relax # avoid 'failed to convert GOTPCREL relocation' error #458 (flag not universal -> skip?) all: $(PROG)_fortran $(CUDACPP_BUILDDIR)/$(PROG)_cpp # also builds $(PROG)_cuda if $(CUDACPP_CULIB) exists (#503) @@ -115,10 +142,6 @@ $(LIBS): .libs cd ../../Source; make touch $@ -$(CUDACPP_BUILDDIR)/.cudacpplibs: - $(MAKE) -f $(CUDACPP_MAKEFILE) - touch $@ - # On Linux, set rpath to LIBDIR to make it unnecessary to use LD_LIBRARY_PATH # Use relative paths with respect to the executables ($ORIGIN on Linux) # On Darwin, building libraries with absolute paths in LIBDIR makes this unnecessary @@ -130,26 +153,47 @@ else override LIBFLAGSRPATH = -Wl,-rpath,'$$ORIGIN/$(LIBDIR)' endif -.PHONY: madevent_fortran_link madevent_cuda_link madevent_cpp_link +.PHONY: madevent_fortran_link madevent_cuda_link madevent_cpp_link madevent_cppnone_link madevent_cppsse4_link madevent_cppavx2_link madevent_cpp512y_link madevent_cpp512z_link madevent_fortran_link: $(PROG)_fortran rm -f $(PROG) ln -s $(PROG)_fortran $(PROG) +# Only used for testing, should be removed in the future madevent_cpp_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp rm -f $(PROG) ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) +madevent_cppnone_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp + rm -f $(PROG) + ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) + +madevent_cppsse4_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp + rm -f $(PROG) + ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) + +madevent_cppavx2_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp + rm -f $(PROG) + ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) + +madevent_cpp512y_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp + rm -f $(PROG) + ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) + +madevent_cpp512z_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp + rm -f $(PROG) + ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) + madevent_cuda_link: $(CUDACPP_BUILDDIR)/$(PROG)_cuda rm -f $(PROG) ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cuda $(PROG) # Building $(PROG)_cpp also builds $(PROG)_cuda if $(CUDACPP_CULIB) exists (improved patch for cpp-only builds #503) -$(CUDACPP_BUILDDIR)/$(PROG)_cpp: $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(LIBS) $(MATRIX) counters.o ompnumthreads.o $(CUDACPP_BUILDDIR)/.cudacpplibs +$(CUDACPP_BUILDDIR)/$(PROG)_cpp: $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(LIBS) $(MATRIX) counters.o ompnumthreads.o $(CPPTARGET) $(FC) -o $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o -L$(LIBDIR)/$(CUDACPP_BUILDDIR) -l$(CUDACPP_COMMONLIB) -l$(CUDACPP_CXXLIB) $(LIBFLAGSRPATH) $(LDFLAGS) - if [ -f $(LIBDIR)/$(CUDACPP_BUILDDIR)/lib$(CUDACPP_CULIB).* ]; then $(FC) -o $(CUDACPP_BUILDDIR)/$(PROG)_cuda $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o -L$(LIBDIR)/$(CUDACPP_BUILDDIR) -l$(CUDACPP_COMMONLIB) -l$(CUDACPP_CULIB) $(LIBFLAGSRPATH) $(LDFLAGS); fi -$(CUDACPP_BUILDDIR)/$(PROG)_cuda: $(CUDACPP_BUILDDIR)/$(PROG)_cpp +$(CUDACPP_BUILDDIR)/$(PROG)_cuda: $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(LIBS) $(MATRIX) counters.o ompnumthreads.o cuda + $(FC) -o $(CUDACPP_BUILDDIR)/$(PROG)_cuda $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o -L$(LIBDIR)/$(CUDACPP_BUILDDIR) -l$(CUDACPP_COMMONLIB) -l$(CUDACPP_CULIB) $(LIBFLAGSRPATH) $(LDFLAGS) counters.o: counters.cc timer.h $(CXX) $(CXXFLAGS) -c $< -o $@ @@ -215,49 +259,105 @@ genps.o: .libs UNAME_P := $(shell uname -p) ifeq ($(UNAME_P),ppc64le) -avxall: avxnone avxsse4 +cppall: + $(MAKE) USEBUILDDIR=1 cppnone + $(MAKE) USEBUILDDIR=1 cppsse4 else ifeq ($(UNAME_P),arm) -avxall: avxnone avxsse4 +cppall: + $(MAKE) USEBUILDDIR=1 cppnone + $(MAKE) USEBUILDDIR=1 cppsse4 else -avxall: avxnone avxsse4 avxavx2 avx512y avx512z +cppall: + $(MAKE) USEBUILDDIR=1 cppnone + $(MAKE) USEBUILDDIR=1 cppsse4 + $(MAKE) USEBUILDDIR=1 cppavx2 + $(MAKE) USEBUILDDIR=1 cpp512y + $(MAKE) USEBUILDDIR=1 cpp512z endif -avxnone: $(PROG)_fortran $(DSIG_cudacpp) - @echo - $(MAKE) USEBUILDDIR=1 AVX=none +ALL: + $(MAKE) USEBUILDDIR=1 cppnone + $(MAKE) USEBUILDDIR=1 cppsse4 + $(MAKE) USEBUILDDIR=1 cppavx2 + $(MAKE) USEBUILDDIR=1 cpp512y + $(MAKE) USEBUILDDIR=1 cpp512z + $(MAKE) USEBUILDDIR=1 cuda -avxsse4: $(PROG)_fortran $(DSIG_cudacpp) - @echo - $(MAKE) USEBUILDDIR=1 AVX=sse4 +cppnone: + $(MAKE) -f $(CUDACPP_MAKEFILE) cppnone -avxavx2: $(PROG)_fortran $(DSIG_cudacpp) - @echo - $(MAKE) USEBUILDDIR=1 AVX=avx2 +cppsse4: + $(MAKE) -f $(CUDACPP_MAKEFILE) cppsse4 -avx512y: $(PROG)_fortran $(DSIG_cudacpp) - @echo - $(MAKE) USEBUILDDIR=1 AVX=512y +cppavx2: + $(MAKE) -f $(CUDACPP_MAKEFILE) cppavx2 -avx512z: $(PROG)_fortran $(DSIG_cudacpp) - @echo - $(MAKE) USEBUILDDIR=1 AVX=512z +cpp512y: + $(MAKE) -f $(CUDACPP_MAKEFILE) cpp512y -###endif +cpp512z: + $(MAKE) -f $(CUDACPP_MAKEFILE) cpp512z + +cuda: + $(MAKE) -f $(CUDACPP_MAKEFILE) cuda # Clean (NB: 'make clean' in Source calls 'make clean' in all P*) -clean: # Clean builds: fortran in this Pn; cudacpp executables for one AVX in this Pn - $(RM) *.o gensym $(PROG) $(PROG)_fortran $(PROG)_forhel $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(CUDACPP_BUILDDIR)/$(PROG)_cuda +BUILD_DIRS := $(wildcard build.*) +BUILD_TARGET_DIR := $(shell echo $(BUILD_DIRS) | awk -F '[._]' '{print $$2}') +NUM_BUILD_DIRS := $(words $(BUILD_DIRS)) + +clean: +ifeq ($(USEBUILDDIR),1) +ifeq ($(NUM_BUILD_DIRS),1) + $(info USEBUILDDIR=1, only cleaning build dir.) + $(RM) -r $(BUILD_DIRS) + $(MAKE) -f $(CUDACPP_MAKEFILE) clean$(BUILD_TARGET_DIR) +else ifeq ($(NUM_BUILD_DIRS),0) + $(error USEBUILDDIR=1, but no build directories are found.) +else + $(error Multiple BUILDDIR's found! Use 'cleannone', 'cleansse4', 'cleanavx2', 'clean512y','clean512z', 'cleancuda' or 'cleanall'.) +endif +else + $(info USEBUILDDIR=0 only cleaning build with no dir.) + $(RM) *.o gensym $(PROG) $(PROG)_fortran $(PROG)_forhel ./$(PROG)_* + $(MAKE) -f $(CUDACPP_MAKEFILE) cleandir + $(RM) $(CUDACPP_BUILDDIR)/.*libs +endif + +cleannone: # Clean builds: fortran in this Pn; cpp executables for one AVX in this Pn + $(RM) *.o gensym $(PROG) $(PROG)_fortran $(PROG)_forhel build.none_*/$(PROG)_cpp + $(MAKE) -f $(CUDACPP_MAKEFILE) cleannone + +cleansse4: # Clean build: fortran in this Pn; cpp executables for cppsse4 in this Pn + $(RM) *.o gensym $(PROG) $(PROG)_fortran $(PROG)_forhel build.sse4_*/$(PROG)_cpp + $(MAKE) -f $(CUDACPP_MAKEFILE) cleansse4 + +cleanavx2: # Clean build: fortran in this Pn; cpp executables for cppavx2 in this Pn + $(RM) *.o gensym $(PROG) $(PROG)_fortran $(PROG)_forhel build.avx2_*/$(PROG)_cpp + $(MAKE) -f $(CUDACPP_MAKEFILE) cleanavx2 + +clean512y: # Clean build: fortran in this Pn; cpp executables for cpp512y in this Pn + $(RM) *.o gensym $(PROG) $(PROG)_fortran $(PROG)_forhel build.512y_*/$(PROG)_cpp + $(MAKE) -f $(CUDACPP_MAKEFILE) clean512y + +clean512z: # Clean build: fortran in this Pn; cpp executables for cpp512z in this Pn + $(RM) *.o gensym $(PROG) $(PROG)_fortran $(PROG)_forhel build.512z_*/$(PROG)_cpp + $(MAKE) -f $(CUDACPP_MAKEFILE) clean512z + +cleancuda: # Clean build: fortran in this Pn; cuda executables in this Pn + $(RM) *.o gensym $(PROG) $(PROG)_fortran $(PROG)_forhel build.cuda_*/$(PROG)_cuda + $(MAKE) -f $(CUDACPP_MAKEFILE) cleancuda cleanavxs: clean # Clean builds: fortran in this Pn; cudacpp for all AVX in this Pn and in src $(MAKE) -f $(CUDACPP_MAKEFILE) cleanall - rm -f $(CUDACPP_BUILDDIR)/.cudacpplibs - rm -f .libs + $(RM) $(CUDACPP_BUILDDIR)/.*libs + $(RM) .libs cleanall: # Clean builds: fortran in all P* and in Source; cudacpp for all AVX in all P* and in src make -C ../../Source cleanall - rm -rf $(LIBDIR)libbias.$(libext) - rm -f ../../Source/*.mod ../../Source/*/*.mod + $(RM) -r $(LIBDIR)libbias.$(libext) + $(RM) ../../Source/*.mod ../../Source/*/*.mod distclean: cleanall # Clean all fortran and cudacpp builds as well as the googletest installation $(MAKE) -f $(CUDACPP_MAKEFILE) distclean diff --git a/epochX/cudacpp/ee_mumu.mad/SubProcesses/ompnumthreads.cc b/epochX/cudacpp/ee_mumu.mad/SubProcesses/ompnumthreads.cc new file mode 100644 index 0000000000..1d004923b9 --- /dev/null +++ b/epochX/cudacpp/ee_mumu.mad/SubProcesses/ompnumthreads.cc @@ -0,0 +1,25 @@ +// Copyright (C) 2020-2023 CERN and UCLouvain. +// Licensed under the GNU Lesser General Public License (version 3 or later). +// Created by: A. Valassi (Dec 2022) for the MG5aMC CUDACPP plugin. +// Further modified by: A. Valassi (2022-2023) for the MG5aMC CUDACPP plugin. + +#include + +// NB1: The C function ompnumthreadsNotSetMeansOneThread_ is called by Fortran code +// Hence the trailing "_": 'call xxx()' links to xxx_ +// See http://www.yolinux.com/TUTORIALS/LinuxTutorialMixingFortranAndC.html + +// NB2: This file also contains C++ code and is built using g++ +// Hence use 'extern "C"' to avoid name mangling by the C++ compiler +// See https://www.geeksforgeeks.org/extern-c-in-c + +#ifdef _OPENMP +extern "C" +{ + void ompnumthreads_not_set_means_one_thread_() + { + const int debuglevel = 0; // quiet(-1), info(0), debug(1) + ompnumthreadsNotSetMeansOneThread( debuglevel ); // call the inline C++ function defined in the .h file + } +} +#endif diff --git a/epochX/cudacpp/ee_mumu.mad/SubProcesses/proc_characteristics b/epochX/cudacpp/ee_mumu.mad/SubProcesses/proc_characteristics index 95773bcf0c..12e1ef1648 100644 --- a/epochX/cudacpp/ee_mumu.mad/SubProcesses/proc_characteristics +++ b/epochX/cudacpp/ee_mumu.mad/SubProcesses/proc_characteristics @@ -8,7 +8,7 @@ ninitial = 2 grouped_matrix = True has_loops = False - bias_module = dummy + bias_module = None max_n_matched_jets = 0 colored_pdgs = [1, 2, 3, 4, 5, 6, 21] complex_mass_scheme = False diff --git a/epochX/cudacpp/ee_mumu.mad/bin/generate_events b/epochX/cudacpp/ee_mumu.mad/bin/generate_events index 107313b25d..5577cc66a0 100755 --- a/epochX/cudacpp/ee_mumu.mad/bin/generate_events +++ b/epochX/cudacpp/ee_mumu.mad/bin/generate_events @@ -46,7 +46,7 @@ if __debug__ and (not os.path.exists(pjoin(root_path,'../..', 'bin','create_rele sys.path.append(pjoin(root_path,'bin','internal')) import madevent_interface as ME - +import misc as misc import logging import logging.config @@ -160,17 +160,31 @@ if '__main__' == __name__: # Check that python version is valid set_configuration() - argument = sys.argv + argument = sys.argv + + # check for plugin customization of the launch command + launch_interface = ME.MadEventCmdShell + if os.path.exists(pjoin(root_path, 'bin','internal', 'launch_plugin.py')): + with misc.TMP_variable(sys, 'path', sys.path + [pjoin(root_path, 'bin', 'internal')]): + from importlib import reload + try: + reload('launch_plugin') + except Exception as error: + import launch_plugin + launch_interface = launch_plugin.MEINTERFACE + + + try: if '-h' in argument or '--help' in argument: - launch = ME.MadEventCmdShell(me_dir=root_path, force_run=True) + launch = launch_interface(me_dir=root_path, force_run=True) launch.exec_cmd('help generate_events') sys.exit() elif len(argument) > 1 and argument[1] in ['0', '1', '2']: argument = treat_old_argument(argument) with ME.MadEventCmdShell.RunWebHandling(root_path, ): - launch = ME.MadEventCmdShell(me_dir=root_path, force_run=True) + launch = launch_interface(me_dir=root_path, force_run=True) launch.run_cmd('generate_events %s' % ' '.join(argument[1:])) launch.run_cmd('quit') except ME.MadEventAlreadyRunning as message: diff --git a/epochX/cudacpp/ee_mumu.mad/bin/internal/banner.py b/epochX/cudacpp/ee_mumu.mad/bin/internal/banner.py index 7624b9f557..824815f47b 100755 --- a/epochX/cudacpp/ee_mumu.mad/bin/internal/banner.py +++ b/epochX/cudacpp/ee_mumu.mad/bin/internal/banner.py @@ -537,7 +537,7 @@ def charge_card(self, tag): self.param_card = param_card_reader.ParamCard(param_card) return self.param_card elif tag == 'mgruncard': - self.run_card = RunCard(self[tag]) + self.run_card = RunCard(self[tag], unknown_warning=False) return self.run_card elif tag == 'mg5proccard': proc_card = self[tag].split('\n') @@ -1002,13 +1002,14 @@ def __init__(self, finput=None, **opt): self.allowed_value = {} self.default_setup() + self.plugin_input(finput) # if input is define read that input if isinstance(finput, (file, str, StringIO.StringIO)): self.read(finput, **opt) - self.plugin_input(finput) + def plugin_input(self, finput=None): @@ -2624,6 +2625,7 @@ class RunCard(ConfigFile): default_include_file = 'run_card.inc' default_autodef_file = 'run.inc' donewarning = [] + include_as_parameter = [] def plugin_input(self, finput): @@ -2670,18 +2672,40 @@ def __new__(cls, finput=None, **opt): elif isinstance(finput, cls): target_class = finput.__class__ elif isinstance(finput, str): + path = finput if '\n' not in finput: finput = open(finput).read() if 'req_acc_FO' in finput: target_class = RunCardNLO else: target_class = RunCardLO + if MADEVENT and os.path.exists(pjoin(MEDIR, 'bin','internal', 'launch_plugin.py')): + with misc.TMP_variable(sys, 'path', sys.path + [pjoin(MEDIR, 'bin', 'internal')]): + from importlib import reload + try: + reload('launch_plugin') + except Exception as error: + import launch_plugin + target_class = launch_plugin.RunCard + elif not MADEVENT and os.path.exists(path.replace('run_card.dat', '../bin/internal/launch_plugin.py')): + misc.sprint('try to use plugin class') + pydir = path.replace('run_card.dat', '../bin/internal/') + with misc.TMP_variable(sys, 'path', sys.path + [pydir]): + from importlib import reload + try: + reload('launch_plugin') + except Exception as error: + import launch_plugin + target_class = launch_plugin.RunCard + else: return None target_class.fill_post_set_from_blocks() - - return super(RunCard, cls).__new__(target_class, finput, **opt) + out = super(RunCard, cls).__new__(target_class, finput, **opt) + if not isinstance(out, RunCard): #should not happen but in presence of missmatch of library loaded. + out.__init__(finput, **opt) + return out else: return super(RunCard, cls).__new__(cls, finput, **opt) @@ -2709,7 +2733,7 @@ def __init__(self, *args, **opts): self.system_default = {} self.display_block = [] # set some block to be displayed - + self.fct_mod = {} # {param: (fct_pointer, *argument, **opts)} self.cut_class = {} self.warned=False @@ -2746,7 +2770,7 @@ def get_lepton_densities(cls): def add_param(self, name, value, fortran_name=None, include=True, hidden=False, legacy=False, cut=False, system=False, sys_default=None, - autodef=False, + autodef=False, fct_mod=None, **opts): """ add a parameter to the card. value is the default value and defines the type (int/float/bool/str) of the input. @@ -2760,6 +2784,7 @@ def add_param(self, name, value, fortran_name=None, include=True, If a path (Source/PDF/pdf.inc) the definition will be added within that file Default is False (does not add the definition) entry added in the run_card will automatically have this on True. + fct_mod: defines a function to run if the parameter is modify in the include file options of **opts: - allowed: list of valid options. '*' means anything else should be allowed. empty list means anything possible as well. @@ -2784,8 +2809,12 @@ def add_param(self, name, value, fortran_name=None, include=True, if autodef: self.definition_path[autodef].append(name) self.user_set.add(name) + # function to trigger if a value is modified in the include file + # main target is action to force correct recompilation (like for compilation flag/...) + if fct_mod: + self.fct_mod[name] = fct_mod - def read(self, finput, consistency=True): + def read(self, finput, consistency=True, unknown_warning=True): """Read the input file, this can be a path to a file, a file object, a str with the content of the file.""" @@ -2793,6 +2822,7 @@ def read(self, finput, consistency=True): if "\n" in finput: finput = finput.split('\n') elif os.path.isfile(finput): + self.path = finput finput = open(finput) else: raise Exception("No such file %s" % finput) @@ -2807,7 +2837,7 @@ def read(self, finput, consistency=True): name = name.lower().strip() if name not in self: #looks like an entry added by a user -> add it nicely - self.add_unknown_entry(name, value) + self.add_unknown_entry(name, value, unknown_warning) else: self.set( name, value, user=True) # parameter not set in the run_card can be set to compatiblity value @@ -2819,7 +2849,7 @@ def read(self, finput, consistency=True): logger.warning(str(error)) else: raise - def add_unknown_entry(self, name, value): + def add_unknown_entry(self, name, value, unknow_warning): """function to add an entry to the run_card when the associated parameter does not exists. This is based on the guess_entry_fromname for the various syntax providing input. This then call add_param accordingly. @@ -2858,7 +2888,7 @@ def add_unknown_entry(self, name, value): raise Exception("dictionary need to have at least one entry") default['dict']['__type__'] = default[self.guess_type_from_value(default_value[0])] - if name not in RunCard.donewarning: + if name not in RunCard.donewarning and unknow_warning: logger.warning("Found unexpected entry in run_card: \"%s\" with value \"%s\".\n"+\ " The type was assigned to %s. \n"+\ " The definition of that variable will %sbe automatically added to fortran file %s\n"+\ @@ -2896,7 +2926,16 @@ def valid_line(self, line, tmp): return False else: return True - + + + def reset_simd(self, old_value, new_value, name, *args, **opts): + raise Exception('pass in reset simd') + + def make_clean(self,old_value, new_value, name, dir): + raise Exception('pass make clean for ', dir) + + def make_Ptouch(self,old_value, new_value, name, reset): + raise Exception('pass Ptouch for ', reset) def write(self, output_file, template=None, python_template=False, write_hidden=False, template_options=None, **opt): @@ -3071,6 +3110,77 @@ def write(self, output_file, template=None, python_template=False, else: output_file.write(text) + def get_last_value_include(self, output_dir): + """For paraeter in self.fct_mod + parse the associate inc file to get the value of the previous run. + We return a dictionary {name: old_value} + if inc file does not exist we will return the current value (i.e. set has no change) + """ + + #remember that + # default_include_file is a class variable + # self.includepath is on the form include_path : [list of param ] + out = {} + + # setup inc_to_parse to be like self.includepath (include_path : [list of param ]) + # BUT only containing the parameter that need to be tracked for the fct_mod option + inc_to_parse = {} + for inc_file, params in self.includepath.items(): + if not inc_file: + continue + if any(p in params for p in self.fct_mod): + inc_to_parse[inc_file] = [name for name in self.includepath[inc_file] if name in self.fct_mod] + + # now loop over the files and ask the associate function + for inc_file, params in inc_to_parse.items(): + if inc_file is True: + inc_file = self.default_include_file + out.update(self.get_value_from_include(inc_file, params, output_dir)) + + return out + + def get_value_from_include(self, path, list_of_params, output_dir): + """for a given include file return the current value of the requested parameter + return a dictionary {name: value} + if path does not exists return the current value in self for all parameter""" + + #WARNING DOES NOT HANDLE LIST/DICT so far + + # handle case where file is missing + if not os.path.exists(pjoin(output_dir,path)): + misc.sprint("include file not existing", pjoin(output_dir,path)) + out = {name: self[name] for name in list_of_params} + + with open(pjoin(output_dir,path), 'r') as fsock: + text = fsock.read() + + for name in list_of_params: + misc.sprint(name, name in self.fortran_name) + misc.sprint(self.fortran_name[name] if name in self.fortran_name[name] else name) + to_track = [self.fortran_name[name] if name in self.fortran_name else name for name in list_of_params] + pattern = re.compile(r"\(?(%(names)s)\s?=\s?([^)]*)\)?" % {'names':'|'.join(to_track)}, re.I) + out = dict(pattern.findall(text)) + misc.sprint(out) + for name in list_of_params: + if name in self.fortran_name: + value = out[self.fortran_name[name]] + del out[self.fortran_name[name]] + out[name] = value + + for name, value in out.items(): + try: + out[name] = self.format_variable(value, type(self[name])) + except Exception: + continue + + if len(out) != len(list_of_params): + misc.sprint(list_of_params) + misc.sprint(to_track) + misc.sprint(self.fortran_name) + misc.sprint(text) + raise Exception + return out + def get_default(self, name, default=None, log_level=None): """return self[name] if exist otherwise default. log control if we @@ -3361,71 +3471,93 @@ def write_include_file(self, output_dir, output_file=None): #ensusre that system only parameter are correctly set self.update_system_parameter_for_include() + value_in_old_include = self.get_last_value_include(output_dir) + + if output_dir: self.write_autodef(output_dir, output_file=None) # check/fix status of customised functions self.edit_dummy_fct_from_file(self["custom_fcts"], os.path.dirname(output_dir)) for incname in self.includepath: - if incname is True: - pathinc = self.default_include_file - elif incname is False: - continue - else: - pathinc = incname + self.write_one_include_file(output_dir, incname, output_file) + + for name,value in value_in_old_include.items(): + if value != self[name]: + self.fct_mod[name][0](value, self[name], name, *self.fct_mod[name][1],**self.fct_mod[name][2]) - if output_file: - fsock = output_file + def write_one_include_file(self, output_dir, incname, output_file=None): + """write one include file at the time""" + + misc.sprint(incname) + if incname is True: + pathinc = self.default_include_file + elif incname is False: + return + else: + pathinc = incname + + if output_file: + fsock = output_file + else: + fsock = file_writers.FortranWriter(pjoin(output_dir,pathinc+'.tmp')) + + + for key in self.includepath[incname]: + #define the fortran name + if key in self.fortran_name: + fortran_name = self.fortran_name[key] else: - fsock = file_writers.FortranWriter(pjoin(output_dir,pathinc+'.tmp')) - for key in self.includepath[incname]: - #define the fortran name - if key in self.fortran_name: - fortran_name = self.fortran_name[key] + fortran_name = key + + if incname in self.include_as_parameter: + fsock.writelines('INTEGER %s\n' % fortran_name) + #get the value with warning if the user didn't set it + value = self.get_default(key) + if hasattr(self, 'mod_inc_%s' % key): + value = getattr(self, 'mod_inc_%s' % key)(value) + # Special treatment for strings containing a list of + # strings. Convert it to a list of strings + if isinstance(value, list): + # in case of a list, add the length of the list as 0th + # element in fortran. Only in case of integer or float + # list (not for bool nor string) + targettype = self.list_parameter[key] + if targettype is bool: + pass + elif targettype is int: + line = '%s(%s) = %s \n' % (fortran_name, 0, self.f77_formatting(len(value))) + fsock.writelines(line) + elif targettype is float: + line = '%s(%s) = %s \n' % (fortran_name, 0, self.f77_formatting(float(len(value)))) + fsock.writelines(line) + # output the rest of the list in fortran + for i,v in enumerate(value): + line = '%s(%s) = %s \n' % (fortran_name, i+1, self.f77_formatting(v)) + fsock.writelines(line) + elif isinstance(value, dict): + for fortran_name, onevalue in value.items(): + line = '%s = %s \n' % (fortran_name, self.f77_formatting(onevalue)) + fsock.writelines(line) + elif isinstance(incname,str) and 'compile' in incname: + if incname in self.include_as_parameter: + line = 'PARAMETER (%s=%s)' %( fortran_name, value) else: - fortran_name = key - - #get the value with warning if the user didn't set it - value = self.get_default(key) - if hasattr(self, 'mod_inc_%s' % key): - value = getattr(self, 'mod_inc_%s' % key)(value) - # Special treatment for strings containing a list of - # strings. Convert it to a list of strings - if isinstance(value, list): - # in case of a list, add the length of the list as 0th - # element in fortran. Only in case of integer or float - # list (not for bool nor string) - targettype = self.list_parameter[key] - if targettype is bool: - pass - elif targettype is int: - line = '%s(%s) = %s \n' % (fortran_name, 0, self.f77_formatting(len(value))) - fsock.writelines(line) - elif targettype is float: - line = '%s(%s) = %s \n' % (fortran_name, 0, self.f77_formatting(float(len(value)))) - fsock.writelines(line) - # output the rest of the list in fortran - for i,v in enumerate(value): - line = '%s(%s) = %s \n' % (fortran_name, i+1, self.f77_formatting(v)) - fsock.writelines(line) - elif isinstance(value, dict): - for fortran_name, onevalue in value.items(): - line = '%s = %s \n' % (fortran_name, self.f77_formatting(onevalue)) - fsock.writelines(line) - elif isinstance(incname,str) and 'compile' in incname: line = '%s = %s \n' % (fortran_name, value) - fsock.write(line) + fsock.write(line) + else: + if incname in self.include_as_parameter: + line = 'PARAMETER (%s=%s)' %( fortran_name, self.f77_formatting(value)) else: line = '%s = %s \n' % (fortran_name, self.f77_formatting(value)) - fsock.writelines(line) - if not output_file: - fsock.close() - path = pjoin(output_dir,pathinc) - if not os.path.exists(path) or not filecmp.cmp(path, path+'.tmp'): - files.mv(path+'.tmp', path) - else: - os.remove(path+'.tmp') - + fsock.writelines(line) + if not output_file: + fsock.close() + path = pjoin(output_dir,pathinc) + if not os.path.exists(path) or not filecmp.cmp(path, path+'.tmp'): + files.mv(path+'.tmp', path) + else: + os.remove(path+'.tmp') def write_autodef(self, output_dir, output_file=None): """ Add the definition of variable to run.inc if the variable is set with autodef. @@ -3764,13 +3896,14 @@ def remove_all_cut(self): %(tmin_for_channel)s = tmin_for_channel ! limit the non-singular reach of --some-- channel of integration related to T-channel diagram (value between -1 and 0), -1 is no impact %(survey_splitting)s = survey_splitting ! for loop-induced control how many core are used at survey for the computation of a single iteration. %(survey_nchannel_per_job)s = survey_nchannel_per_job ! control how many Channel are integrated inside a single job on cluster/multicore - %(refine_evt_by_job)s = refine_evt_by_job ! control the maximal number of events for the first iteration of the refine (larger means less jobs) + %(refine_evt_by_job)s = refine_evt_by_job ! control the maximal number of events for the first iteration of the refine (larger means less jobs) #********************************************************************* -# Compilation flag. No automatic re-compilation (need manual "make clean" in Source) +# Compilation flag. #********************************************************************* %(global_flag)s = global_flag ! fortran optimization flag use for the all code. %(aloha_flag)s = aloha_flag ! fortran optimization flag for aloha function. Suggestions: '-ffast-math' %(matrix_flag)s = matrix_flag ! fortran optimization flag for matrix.f function. Suggestions: '-O3' + %(vector_size)s = vector_size ! size designed for SIMD/OpenMP/GPU (number of events in lockstep) """ template_off = '# To see advanced option for Phase-Space optimization: type "update psoptim"' @@ -3926,9 +4059,12 @@ class RunCardLO(RunCard): "get_dummy_x1_x2": pjoin("SubProcesses","dummy_fct.f"), "dummy_boostframe": pjoin("SubProcesses","dummy_fct.f"), "user_dynamical_scale": pjoin("SubProcesses","dummy_fct.f"), + "bias_wgt_custom": pjoin("SubProcesses","dummy_fct.f"), "user_": pjoin("SubProcesses","dummy_fct.f") # all function starting by user will be added to that file } + include_as_parameter = ['vector.inc'] + if MG5DIR: default_run_card = pjoin(MG5DIR, "internal", "default_run_card_lo.dat") @@ -4162,10 +4298,15 @@ def default_setup(self): self.add_param('hel_splitamp', True, hidden=True, include=False, comment='decide if amplitude aloha call can be splitted in two or not when doing helicity per helicity optimization.') self.add_param('hel_zeroamp', True, hidden=True, include=False, comment='decide if zero amplitude can be removed from the computation when doing helicity per helicity optimization.') self.add_param('SDE_strategy', 1, allowed=[1,2], fortran_name="sde_strat", comment="decide how Multi-channel should behaves \"1\" means full single diagram enhanced (hep-ph/0208156), \"2\" use the product of the denominator") - self.add_param('global_flag', '-O', include=False, hidden=True, comment='global fortran compilation flag, suggestion -fbound-check') - self.add_param('aloha_flag', '', include=False, hidden=True, comment='global fortran compilation flag, suggestion: -ffast-math') - self.add_param('matrix_flag', '', include=False, hidden=True, comment='fortran compilation flag for the matrix-element files, suggestion -O3') - + self.add_param('global_flag', '-O', include=False, hidden=True, comment='global fortran compilation flag, suggestion -fbound-check', + fct_mod=(self.make_clean, ('Source'),{})) + self.add_param('aloha_flag', '', include=False, hidden=True, comment='global fortran compilation flag, suggestion: -ffast-math', + fct_mod=(self.make_clean, ('Source/DHELAS'),{})) + self.add_param('matrix_flag', '', include=False, hidden=True, comment='fortran compilation flag for the matrix-element files, suggestion -O3', + fct_mod=(self.make_Ptouch, ('matrix'),{})) + self.add_param('vector_size', 1, include='vector.inc', hidden=True, comment='lockstep size for parralelism run', + fortran_name='VECSIZE_MEMMAX', fct_mod=(self.reset_simd,(),{})) + # parameter allowing to define simple cut via the pdg # Special syntax are related to those. (can not be edit directly) self.add_param('pt_min_pdg',{'__type__':0.}, include=False, cut=True) @@ -4187,8 +4328,7 @@ def default_setup(self): self.add_param('mxxmin4pdg',[-1.], system=True) self.add_param('mxxpart_antipart', [False], system=True) - # CUDACPP parameters - self.add_param('cudacpp_backend', 'CPP', include=False, hidden=False) + def check_validity(self): """ """ diff --git a/epochX/cudacpp/ee_mumu.mad/bin/internal/check_param_card.py b/epochX/cudacpp/ee_mumu.mad/bin/internal/check_param_card.py index fe874a06a4..71089d7480 100755 --- a/epochX/cudacpp/ee_mumu.mad/bin/internal/check_param_card.py +++ b/epochX/cudacpp/ee_mumu.mad/bin/internal/check_param_card.py @@ -85,7 +85,7 @@ def load_str(self, text): self.value= ' '.join(data[len(self.lhacode):]) # check that lhacode are the first entry otherwise return invalid param. if ' '.join([str(i) for i in self.lhacode]) != ' '.join(data[:len(self.lhacode)]): - raise InvalidParam + raise InvalidParam("line was %s" % str(data)) else: self.value = data[-1] diff --git a/epochX/cudacpp/ee_mumu.mad/bin/internal/common_run_interface.py b/epochX/cudacpp/ee_mumu.mad/bin/internal/common_run_interface.py index 5d0187e3fa..14c7f310dc 100755 --- a/epochX/cudacpp/ee_mumu.mad/bin/internal/common_run_interface.py +++ b/epochX/cudacpp/ee_mumu.mad/bin/internal/common_run_interface.py @@ -749,13 +749,15 @@ def writeRunWeb(me_dir): class RunWebHandling(object): - def __init__(self, me_dir, crashifpresent=True, warnifpresent=True): + def __init__(self, me_dir, crashifpresent=True, warnifpresent=True, force_run=False): """raise error if RunWeb already exists me_dir is the directory where the write RunWeb""" self.remove_run_web = True self.me_dir = me_dir - + if force_run: + self.remove_run_web = False + return if crashifpresent or warnifpresent: if os.path.exists(pjoin(me_dir, 'RunWeb')): pid = open(pjoin(me_dir, 'RunWeb')).read() @@ -6574,7 +6576,7 @@ def reask(self, *args, **opt): fail_due_to_format = 0 #parameter to avoid infinite loop def postcmd(self, stop, line): - if line not in [None, '0', 'done', '']: + if line not in [None, '0', 'done', '',0]: ending_question = cmd.OneLinePathCompletion.postcmd(self,stop,line) else: ending_question = True @@ -7533,7 +7535,8 @@ def open_file(self, answer): else: raise if time.time() - start < .5: - self.mother_interface.ask("Are you really that fast? If you are using an editor that returns directly. Please confirm that you have finised to edit the file", 'y') + self.mother_interface.ask("Are you really that fast? If you are using an editor that returns directly. Please confirm that you have finised to edit the file", 'y', + timeout=False) self.reload_card(path) def reload_card(self, path): diff --git a/epochX/cudacpp/ee_mumu.mad/bin/internal/extended_cmd.py b/epochX/cudacpp/ee_mumu.mad/bin/internal/extended_cmd.py index a6a8609dce..2f37070580 100755 --- a/epochX/cudacpp/ee_mumu.mad/bin/internal/extended_cmd.py +++ b/epochX/cudacpp/ee_mumu.mad/bin/internal/extended_cmd.py @@ -1108,9 +1108,12 @@ def ask(self, question, default, choices=[], path_msg=None, if alias: choices += list(alias.keys()) + + question_instance = obj(question, allow_arg=choices, default=default, mother_interface=self, **opt) - + if fct_timeout is None: + fct_timeout = lambda x: question_instance.postcmd(x, default) if x and default else False if first_cmd: if isinstance(first_cmd, str): question_instance.onecmd(first_cmd) @@ -2271,6 +2274,9 @@ def postcmd(self, stop, line): if n: self.default(line) return self.postcmd(stop, line) + elif self.value is None and line: + self.default(line) + return self.postcmd(stop, line) if not self.casesensitive: for ans in self.allow_arg: if ans.lower() == self.value.lower(): diff --git a/epochX/cudacpp/ee_mumu.mad/bin/internal/gen_ximprove.py b/epochX/cudacpp/ee_mumu.mad/bin/internal/gen_ximprove.py index 3b8ec31215..a88d60b282 100755 --- a/epochX/cudacpp/ee_mumu.mad/bin/internal/gen_ximprove.py +++ b/epochX/cudacpp/ee_mumu.mad/bin/internal/gen_ximprove.py @@ -154,10 +154,15 @@ def get_helicity(self, to_submit=True, clean=True): p = misc.Popen(['./gensym'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT, cwd=Pdir) #sym_input = "%(points)d %(iterations)d %(accuracy)f \n" % self.opts + (stdout, _) = p.communicate(''.encode()) stdout = stdout.decode('ascii',errors='ignore') - nb_channel = max([math.floor(float(d)) for d in stdout.split()]) - + try: + nb_channel = max([math.floor(float(d)) for d in stdout.split()]) + except Exception as error: + misc.sprint(stdout, 'no channel or error for %s' % Pdir) + continue + self.cmd.compile(['madevent_forhel'], cwd=Pdir) if not os.path.exists(pjoin(Pdir, 'madevent_forhel')): raise Exception('Error make madevent_forhel not successful') diff --git a/epochX/cudacpp/ee_mumu.mad/bin/internal/launch_plugin.py b/epochX/cudacpp/ee_mumu.mad/bin/internal/launch_plugin.py new file mode 100644 index 0000000000..23271b846e --- /dev/null +++ b/epochX/cudacpp/ee_mumu.mad/bin/internal/launch_plugin.py @@ -0,0 +1,100 @@ + +import logging +import os +import subprocess +pjoin = os.path.join +logger = logging.getLogger('cmdprint') # for stdout + +try: + import madgraph +except ImportError: + import internal.madevent_interface as madevent_interface + import internal.misc as misc + import internal.extended_cmd as extended_cmd + import internal.banner as banner_mod +else: + import madgraph.interface.madevent_interface as madevent_interface + import madgraph.various.misc as misc + import madgraph.interface.extended_cmd as extended_cmd + import madgraph.various.banner as banner_mod + +class CPPMEInterface(madevent_interface.MadEventCmdShell): + + def compile(self, *args, **opts): + """ """ + + import multiprocessing + if not self.options['nb_core'] or self.options['nb_core'] == 'None': + self.options['nb_core'] = multiprocessing.cpu_count() + + if args and args[0][0] == 'madevent' and hasattr(self, 'run_card'): + import pathlib + import os + pjoin = os.path.join + + + + + cudacpp_backend = self.run_card['cudacpp_backend'].upper() # the default value is defined in banner.py + logger.info("Building madevent in madevent_interface.py with '%s' matrix elements"%cudacpp_backend) + if cudacpp_backend == 'FORTRAN': + args[0][0] = 'madevent_fortran_link' + elif cudacpp_backend == 'CPP': + args[0][0] = 'madevent_cpp_link' + elif cudacpp_backend == 'CUDA': + args[0][0] = 'madevent_cuda_link' + else: + raise Exception("Invalid cudacpp_backend='%s': only 'FORTRAN', 'CPP', 'CUDA' are supported") + return misc.compile(nb_core=self.options['nb_core'], *args, **opts) + else: + return misc.compile(nb_core=self.options['nb_core'], *args, **opts) + +class CPPRunCard(banner_mod.RunCardLO): + + def reset_simd(self, old_value, new_value, name): + if not hasattr(self, 'path'): + raise Exception + + if name == "vector_size" and new_value <= int(old_value): + # code can handle the new size -> do not recompile + return + + Sourcedir = pjoin(os.path.dirname(os.path.dirname(self.path)), 'Source') + subprocess.call(['make', 'cleanavx'], cwd=Sourcedir, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) + + def plugin_input(self, finput): + return + + def default_setup(self): + super().default_setup() + self.add_param('cudacpp_backend', 'CPP', include=False, hidden=False) + + + def write_one_include_file(self, output_dir, incname, output_file=None): + """write one include file at the time""" + + if incname == "vector.inc" and 'vector_size' not in self.user_set: + return + super().write_one_include_file(output_dir, incname, output_file) + + + def check_validity(self): + """ensure that PLUGIN information are consistent""" + + super().check_validity() + + if self['SDE_strategy'] != 1: + logger.warning('SDE_strategy different of 1 is not supported with SMD/GPU mode') + self['sde_strategy'] = 1 + + if self['hel_recycling']: + self['hel_recycling'] = False + +class GPURunCard(CPPRunCard): + + def default_setup(self): + super(CPPRunCard, self).default_setup() + self.add_param('cudacpp_backend', 'CUDA', include=False, hidden=False) + +MEINTERFACE = CPPMEInterface +RunCard = CPPRunCard diff --git a/epochX/cudacpp/ee_mumu.mad/bin/internal/madevent_interface.py b/epochX/cudacpp/ee_mumu.mad/bin/internal/madevent_interface.py index 920e07a926..d722702891 100755 --- a/epochX/cudacpp/ee_mumu.mad/bin/internal/madevent_interface.py +++ b/epochX/cudacpp/ee_mumu.mad/bin/internal/madevent_interface.py @@ -3796,9 +3796,11 @@ def do_combine_events(self, line): if self.run_card['bias_module'].lower() not in ['dummy', 'none'] and nb_event: self.correct_bias() - + elif self.run_card['custom_fcts']: + self.correct_bias() + logger.info("combine events done in %s", time.time()-start) - + self.to_store.append('event') diff --git a/epochX/cudacpp/ee_mumu.mad/bin/internal/run_plot b/epochX/cudacpp/ee_mumu.mad/bin/internal/run_plot new file mode 100755 index 0000000000..7deee7ac88 --- /dev/null +++ b/epochX/cudacpp/ee_mumu.mad/bin/internal/run_plot @@ -0,0 +1,47 @@ +#!/bin/bash +# +# This runs MadAnalysis on the unweighted_events.lhe +# +# Usage: run_plot run_name [madir [tddir]] +# where madir is the path to the MadAnalysis package + +main=`pwd` + +if [ "$1" != "" ] +then + run=$1 +else + echo "Usage: run_plot runname [MAdir [tddir]]" + exit +fi + +if [ "$2" != "" ] +then + MAdir=$main/$2 +else + MAdir=$main/../../MadAnalysis +fi + +if [ "$3" != "" ]; then + td=$main/$3 +else + td=$main/../../td +fi + +dirbin=$main/../bin + +if [[ $run != "" && -e ${run}_unweighted_events.lhe.gz ]];then + gunzip -c ${run}_unweighted_events.lhe.gz > unweighted_events.lhe +fi + +if [[ (-x $MAdir/plot_events) && (-e unweighted_events.lhe) && (-e ../Cards/plot_card.dat) ]]; then + echo "Creating Plots" + mkdir $run + cd $run + echo "../unweighted_events.lhe" > events.list + $dirbin/plot $MAdir $td > plot.log + cd .. + $dirbin/plot_page-pl $run parton + mv plots.html ${run}_plots.html +fi + diff --git a/epochX/cudacpp/ee_mumu.mad/bin/internal/run_plot_delphes b/epochX/cudacpp/ee_mumu.mad/bin/internal/run_plot_delphes new file mode 100755 index 0000000000..975f410d0e --- /dev/null +++ b/epochX/cudacpp/ee_mumu.mad/bin/internal/run_plot_delphes @@ -0,0 +1,46 @@ +#!/bin/bash +# +# This runs MadAnalysis on the delphes_events.lhco +# +# Usage: run_plot run_name [madir [tddir]] +# where madir is the path to the MadAnalysis package + +main=`pwd` + +if [ "$1" != "" ] +then + run=$1 +else + echo "Usage: run_plot runname [MAdir [tddir]]" + exit +fi + +if [ "$2" != "" ] +then + MAdir=$main/$2 +else + MAdir=$main/../../MadAnalysis +fi + +if [ "$3" != "" ]; then + td=$main/$3 +else + td=$main/../../td +fi + +dirbin=$main/../bin + +if [[ $run != "" && -e ${run}_delphes_events.lhco.gz ]];then + gunzip -c ${run}_delphes_events.lhco.gz > delphes_events.lhco +fi + +if [[ (-x $MAdir/plot_events) && (-e delphes_events.lhco) && (-e ../Cards/plot_card.dat) ]]; then + echo "Creating Plots" + mkdir ${run}_delphes + cd ${run}_delphes + echo "../delphes_events.lhco" > events.list + $dirbin/plot $MAdir $td > plot.log + cd .. + $dirbin/plot_page-pl ${run}_delphes Delphes + mv plots.html ${run}_plots_delphes.html +fi diff --git a/epochX/cudacpp/ee_mumu.mad/bin/internal/run_plot_pgs b/epochX/cudacpp/ee_mumu.mad/bin/internal/run_plot_pgs new file mode 100755 index 0000000000..e7a36ef344 --- /dev/null +++ b/epochX/cudacpp/ee_mumu.mad/bin/internal/run_plot_pgs @@ -0,0 +1,47 @@ +#!/bin/bash +# +# This runs MadAnalysis on the unweighted_events.lhe +# +# Usage: run_plot run_name [madir [tddir]] +# where madir is the path to the MadAnalysis package + +main=`pwd` + +if [ "$1" != "" ] +then + run=$1 +else + echo "Usage: run_plot runname [MAdir [tddir]]" + exit +fi + +if [ "$2" != "" ] +then + MAdir=$main/$2 +else + MAdir=$main/../../MadAnalysis +fi + +if [ "$3" != "" ]; then + td=$main/$3 +else + td=$main/../../td +fi + +dirbin=$main/../bin + +if [[ $run != "" && -e ${run}_pgs_events.lhco.gz ]];then + gunzip -c ${run}_pgs_events.lhco.gz > pgs_events.lhco +fi + +if [[ (-x $MAdir/plot_events) && (-e pgs_events.lhco) && (-e ../Cards/plot_card.dat) ]]; then + echo "Creating Plots" + mkdir ${run}_pgs + cd ${run}_pgs + echo "../pgs_events.lhco" > events.list + $dirbin/plot $MAdir $td > plot.log + cd .. + $dirbin/plot_page-pl ${run}_pgs PGS + mv plots.html ${run}_plots_pgs.html +fi + diff --git a/epochX/cudacpp/ee_mumu.mad/bin/internal/run_plot_pythia b/epochX/cudacpp/ee_mumu.mad/bin/internal/run_plot_pythia new file mode 100755 index 0000000000..532bfb4b7b --- /dev/null +++ b/epochX/cudacpp/ee_mumu.mad/bin/internal/run_plot_pythia @@ -0,0 +1,50 @@ +#!/bin/bash +# +# This runs MadAnalysis on the unweighted_events.lhe +# +# Usage: run_plot run_name [madir [tddir]] +# where madir is the path to the MadAnalysis package + +main=`pwd` + +if [ "$1" != "" ] +then + run=$1 +else + echo "Usage: run_plot runname [MAdir [tddir]]" + exit +fi + +if [ "$2" != "" ] +then + MAdir=$main/$2 +else + MAdir=$main/../../MadAnalysis +fi + +if [ "$3" != "" ]; then + td=$main/$3 +else + td=$main/../../td +fi + +dirbin=$main/../bin/internal + +if [[ $run != "" && -e ${run}_pythia_events.lhe.gz ]];then + gunzip -c ${run}_pythia_events.lhe.gz > pythia_events.lhe +fi + +if [[ (-x $MAdir/plot_events) && (-e pythia_events.lhe) && (-e ../Cards/plot_card.dat) ]]; then + echo "Creating Plots" + mkdir ${run}_pythia + cd ${run}_pythia + echo "../pythia_events.lhe" > events.list + $dirbin/plot $MAdir $td > plot.log + cd .. + $dirbin/plot_page-pl ${run}_pythia Pythia + mv plots.html ${run}_plots_pythia.html + $dirbin/gen_crossxhtml-pl $run +else + echo "Not creating plots" +fi + diff --git a/epochX/cudacpp/ee_mumu.mad/bin/madevent b/epochX/cudacpp/ee_mumu.mad/bin/madevent index c944aa1faf..dff9711b73 100755 --- a/epochX/cudacpp/ee_mumu.mad/bin/madevent +++ b/epochX/cudacpp/ee_mumu.mad/bin/madevent @@ -32,6 +32,7 @@ except ImportError: import os +pjoin = os.path.join import optparse # Get the directory of the script real path (bin) @@ -160,13 +161,30 @@ except: pass import internal.madevent_interface as cmd_interface +# check for plugin customization of the launch command +launch_interface = cmd_interface.MadEventCmdShell +if os.path.exists(pjoin(root_path, 'bin','internal', 'launch_plugin.py')): + with misc.TMP_variable(sys, 'path', sys.path + [pjoin(root_path, 'bin', 'internal')]): + from importlib import reload + try: + reload('launch_plugin') + except Exception as error: + import launch_plugin + launch_interface = launch_plugin.MEINTERFACE + + +#Source use this executable for compilation always allow it +force_run = False +if (args and args[0] == 'treatcards'): + force_run=True + # Call the cmd interface main loop try: if '-h' in args or '--help' in args: - launch = ME.MadEventCmdShell(me_dir=os.path.dirname(root_path), force_run=True) + launch = launch_interface(me_dir=os.path.dirname(root_path), force_run=True) launch.exec_cmd('help generate_events') sys.exit(0) - with cmd_interface.MadEventCmdShell.RunWebHandling(os.path.dirname(root_path), ): + with cmd_interface.MadEventCmdShell.RunWebHandling(os.path.dirname(root_path), force_run=force_run): if (args and os.path.isfile(args[0])): # They are an input file input_file = args[0] @@ -178,7 +196,7 @@ try: cmd_line.run_cmd('import command ' + input_file) cmd_line.run_cmd('quit') else: - cmd_line = cmd_interface.MadEventCmdShell(force_run=True) + cmd_line = launch_interface(force_run=True) cmd_line.use_rawinput = False cmd_line.haspiping = False cmd_line.run_cmd('import command ' + input_file) @@ -188,7 +206,7 @@ try: if options.web: cmd_line = cmd_interface.MadEventCmd(force_run=True) else: - cmd_line = cmd_interface.MadEventCmdShell(force_run=True) + cmd_line = launch_interface(force_run=True) if not hasattr(cmd_line, 'do_%s' % args[0]): if parser_error: print( parser_error) diff --git a/epochX/cudacpp/ee_mumu.mad/src/HelAmps_sm.h b/epochX/cudacpp/ee_mumu.mad/src/HelAmps_sm.h index 6a8781b113..4e4fd67611 100644 --- a/epochX/cudacpp/ee_mumu.mad/src/HelAmps_sm.h +++ b/epochX/cudacpp/ee_mumu.mad/src/HelAmps_sm.h @@ -863,6 +863,7 @@ namespace mg5amcCpu const fptype allF2[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, fptype allvertexes[] ) ALWAYS_INLINE; //-------------------------------------------------------------------------- @@ -873,6 +874,7 @@ namespace mg5amcCpu FFV1P0_3( const fptype allF1[], const fptype allF2[], const fptype allCOUP[], + const double Ccoeff, const fptype M3, const fptype W3, fptype allV3[] ) ALWAYS_INLINE; @@ -886,6 +888,7 @@ namespace mg5amcCpu const fptype allF2[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, fptype allvertexes[] ) ALWAYS_INLINE; //-------------------------------------------------------------------------- @@ -896,6 +899,7 @@ namespace mg5amcCpu FFV2_3( const fptype allF1[], const fptype allF2[], const fptype allCOUP[], + const double Ccoeff, const fptype M3, const fptype W3, fptype allV3[] ) ALWAYS_INLINE; @@ -909,6 +913,7 @@ namespace mg5amcCpu const fptype allF2[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, fptype allvertexes[] ) ALWAYS_INLINE; //-------------------------------------------------------------------------- @@ -919,6 +924,7 @@ namespace mg5amcCpu FFV4_3( const fptype allF1[], const fptype allF2[], const fptype allCOUP[], + const double Ccoeff, const fptype M3, const fptype W3, fptype allV3[] ) ALWAYS_INLINE; @@ -932,7 +938,9 @@ namespace mg5amcCpu const fptype allF2[], const fptype allV3[], const fptype allCOUP1[], + const double Ccoeff1, const fptype allCOUP2[], + const double Ccoeff2, fptype allvertexes[] ) ALWAYS_INLINE; //-------------------------------------------------------------------------- @@ -943,7 +951,9 @@ namespace mg5amcCpu FFV2_4_3( const fptype allF1[], const fptype allF2[], const fptype allCOUP1[], + const double Ccoeff1, const fptype allCOUP2[], + const double Ccoeff2, const fptype M3, const fptype W3, fptype allV3[] ) ALWAYS_INLINE; @@ -957,6 +967,7 @@ namespace mg5amcCpu const fptype allF2[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, fptype allvertexes[] ) { mgDebug( 0, __FUNCTION__ ); @@ -980,6 +991,7 @@ namespace mg5amcCpu FFV1P0_3( const fptype allF1[], const fptype allF2[], const fptype allCOUP[], + const double Ccoeff, const fptype M3, const fptype W3, fptype allV3[] ) @@ -1011,6 +1023,7 @@ namespace mg5amcCpu const fptype allF2[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, fptype allvertexes[] ) { mgDebug( 0, __FUNCTION__ ); @@ -1034,6 +1047,7 @@ namespace mg5amcCpu FFV2_3( const fptype allF1[], const fptype allF2[], const fptype allCOUP[], + const double Ccoeff, const fptype M3, const fptype W3, fptype allV3[] ) @@ -1067,6 +1081,7 @@ namespace mg5amcCpu const fptype allF2[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, fptype allvertexes[] ) { mgDebug( 0, __FUNCTION__ ); @@ -1078,9 +1093,9 @@ namespace mg5amcCpu const cxtype cI = cxmake( 0., 1. ); constexpr fptype one( 1. ); constexpr fptype two( 2. ); - const cxtype_sv TMP1 = ( F1[2] * ( F2[4] * ( V3[2] + V3[5] ) + F2[5] * ( V3[3] + cI * V3[4] ) ) + F1[3] * ( F2[4] * ( V3[3] - cI * V3[4] ) + F2[5] * ( V3[2] - V3[5] ) ) ); - const cxtype_sv TMP3 = ( F1[4] * ( F2[2] * ( V3[2] - V3[5] ) - F2[3] * ( V3[3] + cI * V3[4] ) ) + F1[5] * ( F2[2] * ( -V3[3] + cI * V3[4] ) + F2[3] * ( V3[2] + V3[5] ) ) ); - ( *vertex ) = COUP * ( -one ) * ( +cI * TMP1 + ( two * cI ) * TMP3 ); + const cxtype_sv TMP3 = ( F1[2] * ( F2[4] * ( V3[2] + V3[5] ) + F2[5] * ( V3[3] + cI * V3[4] ) ) + F1[3] * ( F2[4] * ( V3[3] - cI * V3[4] ) + F2[5] * ( V3[2] - V3[5] ) ) ); + const cxtype_sv TMP4 = ( F1[4] * ( F2[2] * ( V3[2] - V3[5] ) - F2[3] * ( V3[3] + cI * V3[4] ) ) + F1[5] * ( F2[2] * ( -V3[3] + cI * V3[4] ) + F2[3] * ( V3[2] + V3[5] ) ) ); + ( *vertex ) = COUP * ( -one ) * ( +cI * TMP3 + ( two * cI ) * TMP4 ); mgDebug( 1, __FUNCTION__ ); return; } @@ -1093,6 +1108,7 @@ namespace mg5amcCpu FFV4_3( const fptype allF1[], const fptype allF2[], const fptype allCOUP[], + const double Ccoeff, const fptype M3, const fptype W3, fptype allV3[] ) @@ -1110,12 +1126,12 @@ namespace mg5amcCpu constexpr fptype two( 2. ); constexpr fptype half( 1. / 2. ); const cxtype_sv TMP2 = ( F1[2] * ( F2[4] * ( P3[0] + P3[3] ) + F2[5] * ( P3[1] + cI * P3[2] ) ) + F1[3] * ( F2[4] * ( P3[1] - cI * P3[2] ) + F2[5] * ( P3[0] - P3[3] ) ) ); - const cxtype_sv TMP4 = ( F1[4] * ( F2[2] * ( P3[0] - P3[3] ) - F2[3] * ( P3[1] + cI * P3[2] ) ) + F1[5] * ( F2[2] * ( -P3[1] + cI * P3[2] ) + F2[3] * ( P3[0] + P3[3] ) ) ); + const cxtype_sv TMP5 = ( F1[4] * ( F2[2] * ( P3[0] - P3[3] ) - F2[3] * ( P3[1] + cI * P3[2] ) ) + F1[5] * ( F2[2] * ( -P3[1] + cI * P3[2] ) + F2[3] * ( P3[0] + P3[3] ) ) ); const cxtype_sv denom = COUP / ( ( P3[0] * P3[0] ) - ( P3[1] * P3[1] ) - ( P3[2] * P3[2] ) - ( P3[3] * P3[3] ) - M3 * ( M3 - cI * W3 ) ); - V3[2] = denom * ( -two * cI ) * ( OM3 * -half * P3[0] * ( TMP2 + two * TMP4 ) + ( +half * ( F1[2] * F2[4] + F1[3] * F2[5] ) + F1[4] * F2[2] + F1[5] * F2[3] ) ); - V3[3] = denom * ( -two * cI ) * ( OM3 * -half * P3[1] * ( TMP2 + two * TMP4 ) + ( -half * ( F1[2] * F2[5] + F1[3] * F2[4] ) + F1[4] * F2[3] + F1[5] * F2[2] ) ); - V3[4] = denom * ( two * cI ) * ( OM3 * half * P3[2] * ( TMP2 + two * TMP4 ) + ( half * cI * ( F1[2] * F2[5] ) - half * cI * ( F1[3] * F2[4] ) - cI * ( F1[4] * F2[3] ) + cI * ( F1[5] * F2[2] ) ) ); - V3[5] = denom * ( two * cI ) * ( OM3 * half * P3[3] * ( TMP2 + two * TMP4 ) + ( +half * ( F1[2] * F2[4] ) - half * ( F1[3] * F2[5] ) - F1[4] * F2[2] + F1[5] * F2[3] ) ); + V3[2] = denom * ( -two * cI ) * ( OM3 * -half * P3[0] * ( TMP2 + two * TMP5 ) + ( +half * ( F1[2] * F2[4] + F1[3] * F2[5] ) + F1[4] * F2[2] + F1[5] * F2[3] ) ); + V3[3] = denom * ( -two * cI ) * ( OM3 * -half * P3[1] * ( TMP2 + two * TMP5 ) + ( -half * ( F1[2] * F2[5] + F1[3] * F2[4] ) + F1[4] * F2[3] + F1[5] * F2[2] ) ); + V3[4] = denom * ( two * cI ) * ( OM3 * half * P3[2] * ( TMP2 + two * TMP5 ) + ( half * cI * ( F1[2] * F2[5] ) - half * cI * ( F1[3] * F2[4] ) - cI * ( F1[4] * F2[3] ) + cI * ( F1[5] * F2[2] ) ) ); + V3[5] = denom * ( two * cI ) * ( OM3 * half * P3[3] * ( TMP2 + two * TMP5 ) + ( +half * ( F1[2] * F2[4] ) - half * ( F1[3] * F2[5] ) - F1[4] * F2[2] + F1[5] * F2[3] ) ); mgDebug( 1, __FUNCTION__ ); return; } @@ -1129,7 +1145,9 @@ namespace mg5amcCpu const fptype allF2[], const fptype allV3[], const fptype allCOUP1[], + const double Ccoeff1, const fptype allCOUP2[], + const double Ccoeff2, fptype allvertexes[] ) { mgDebug( 0, __FUNCTION__ ); @@ -1142,9 +1160,9 @@ namespace mg5amcCpu const cxtype cI = cxmake( 0., 1. ); constexpr fptype one( 1. ); constexpr fptype two( 2. ); - const cxtype_sv TMP1 = ( F1[2] * ( F2[4] * ( V3[2] + V3[5] ) + F2[5] * ( V3[3] + cI * V3[4] ) ) + F1[3] * ( F2[4] * ( V3[3] - cI * V3[4] ) + F2[5] * ( V3[2] - V3[5] ) ) ); - const cxtype_sv TMP3 = ( F1[4] * ( F2[2] * ( V3[2] - V3[5] ) - F2[3] * ( V3[3] + cI * V3[4] ) ) + F1[5] * ( F2[2] * ( -V3[3] + cI * V3[4] ) + F2[3] * ( V3[2] + V3[5] ) ) ); - ( *vertex ) = ( -one ) * ( COUP2 * ( +cI * TMP1 + ( two * cI ) * TMP3 ) + cI * ( TMP1 * COUP1 ) ); + const cxtype_sv TMP3 = ( F1[2] * ( F2[4] * ( V3[2] + V3[5] ) + F2[5] * ( V3[3] + cI * V3[4] ) ) + F1[3] * ( F2[4] * ( V3[3] - cI * V3[4] ) + F2[5] * ( V3[2] - V3[5] ) ) ); + const cxtype_sv TMP4 = ( F1[4] * ( F2[2] * ( V3[2] - V3[5] ) - F2[3] * ( V3[3] + cI * V3[4] ) ) + F1[5] * ( F2[2] * ( -V3[3] + cI * V3[4] ) + F2[3] * ( V3[2] + V3[5] ) ) ); + ( *vertex ) = ( -one ) * ( Ccoeff2*COUP2 * ( +cI * TMP3 + ( two * cI ) * TMP4 ) + cI * ( TMP3 * Ccoeff1*COUP1 ) ); mgDebug( 1, __FUNCTION__ ); return; } @@ -1157,7 +1175,9 @@ namespace mg5amcCpu FFV2_4_3( const fptype allF1[], const fptype allF2[], const fptype allCOUP1[], + const double Ccoeff1, const fptype allCOUP2[], + const double Ccoeff2, const fptype M3, const fptype W3, fptype allV3[] ) @@ -1177,12 +1197,12 @@ namespace mg5amcCpu constexpr fptype two( 2. ); constexpr fptype half( 1. / 2. ); const cxtype_sv TMP2 = ( F1[2] * ( F2[4] * ( P3[0] + P3[3] ) + F2[5] * ( P3[1] + cI * P3[2] ) ) + F1[3] * ( F2[4] * ( P3[1] - cI * P3[2] ) + F2[5] * ( P3[0] - P3[3] ) ) ); - const cxtype_sv TMP4 = ( F1[4] * ( F2[2] * ( P3[0] - P3[3] ) - F2[3] * ( P3[1] + cI * P3[2] ) ) + F1[5] * ( F2[2] * ( -P3[1] + cI * P3[2] ) + F2[3] * ( P3[0] + P3[3] ) ) ); + const cxtype_sv TMP5 = ( F1[4] * ( F2[2] * ( P3[0] - P3[3] ) - F2[3] * ( P3[1] + cI * P3[2] ) ) + F1[5] * ( F2[2] * ( -P3[1] + cI * P3[2] ) + F2[3] * ( P3[0] + P3[3] ) ) ); const cxtype_sv denom = one / ( ( P3[0] * P3[0] ) - ( P3[1] * P3[1] ) - ( P3[2] * P3[2] ) - ( P3[3] * P3[3] ) - M3 * ( M3 - cI * W3 ) ); - V3[2] = denom * ( -two * cI ) * ( COUP2 * ( OM3 * -half * P3[0] * ( TMP2 + two * TMP4 ) + ( +half * ( F1[2] * F2[4] + F1[3] * F2[5] ) + F1[4] * F2[2] + F1[5] * F2[3] ) ) + half * ( COUP1 * ( F1[2] * F2[4] + F1[3] * F2[5] - P3[0] * OM3 * TMP2 ) ) ); - V3[3] = denom * ( -two * cI ) * ( COUP2 * ( OM3 * -half * P3[1] * ( TMP2 + two * TMP4 ) + ( -half * ( F1[2] * F2[5] + F1[3] * F2[4] ) + F1[4] * F2[3] + F1[5] * F2[2] ) ) - half * ( COUP1 * ( F1[2] * F2[5] + F1[3] * F2[4] + P3[1] * OM3 * TMP2 ) ) ); - V3[4] = denom * cI * ( COUP2 * ( OM3 * P3[2] * ( TMP2 + two * TMP4 ) + ( +cI * ( F1[2] * F2[5] ) - cI * ( F1[3] * F2[4] ) + ( -two * cI ) * ( F1[4] * F2[3] ) + ( two * cI ) * ( F1[5] * F2[2] ) ) ) + COUP1 * ( +cI * ( F1[2] * F2[5] ) - cI * ( F1[3] * F2[4] ) + P3[2] * OM3 * TMP2 ) ); - V3[5] = denom * ( two * cI ) * ( COUP2 * ( OM3 * half * P3[3] * ( TMP2 + two * TMP4 ) + ( +half * ( F1[2] * F2[4] ) - half * ( F1[3] * F2[5] ) - F1[4] * F2[2] + F1[5] * F2[3] ) ) + half * ( COUP1 * ( F1[2] * F2[4] + P3[3] * OM3 * TMP2 - F1[3] * F2[5] ) ) ); + V3[2] = denom * ( -two * cI ) * ( Ccoeff2*COUP2 * ( OM3 * -half * P3[0] * ( TMP2 + two * TMP5 ) + ( +half * ( F1[2] * F2[4] + F1[3] * F2[5] ) + F1[4] * F2[2] + F1[5] * F2[3] ) ) + half * ( Ccoeff1*COUP1 * ( F1[2] * F2[4] + F1[3] * F2[5] - P3[0] * OM3 * TMP2 ) ) ); + V3[3] = denom * ( -two * cI ) * ( Ccoeff2*COUP2 * ( OM3 * -half * P3[1] * ( TMP2 + two * TMP5 ) + ( -half * ( F1[2] * F2[5] + F1[3] * F2[4] ) + F1[4] * F2[3] + F1[5] * F2[2] ) ) - half * ( Ccoeff1*COUP1 * ( F1[2] * F2[5] + F1[3] * F2[4] + P3[1] * OM3 * TMP2 ) ) ); + V3[4] = denom * cI * ( Ccoeff2*COUP2 * ( OM3 * P3[2] * ( TMP2 + two * TMP5 ) + ( +cI * ( F1[2] * F2[5] ) - cI * ( F1[3] * F2[4] ) + ( -two * cI ) * ( F1[4] * F2[3] ) + ( two * cI ) * ( F1[5] * F2[2] ) ) ) + Ccoeff1*COUP1 * ( +cI * ( F1[2] * F2[5] ) - cI * ( F1[3] * F2[4] ) + P3[2] * OM3 * TMP2 ) ); + V3[5] = denom * ( two * cI ) * ( Ccoeff2*COUP2 * ( OM3 * half * P3[3] * ( TMP2 + two * TMP5 ) + ( +half * ( F1[2] * F2[4] ) - half * ( F1[3] * F2[5] ) - F1[4] * F2[2] + F1[5] * F2[3] ) ) + half * ( Ccoeff1*COUP1 * ( F1[2] * F2[4] + P3[3] * OM3 * TMP2 - F1[3] * F2[5] ) ) ); mgDebug( 1, __FUNCTION__ ); return; } diff --git a/epochX/cudacpp/ee_mumu.mad/src/cudacpp_src.mk b/epochX/cudacpp/ee_mumu.mad/src/cudacpp_src.mk index 554d7a704c..750986464e 100644 --- a/epochX/cudacpp/ee_mumu.mad/src/cudacpp_src.mk +++ b/epochX/cudacpp/ee_mumu.mad/src/cudacpp_src.mk @@ -1,7 +1,7 @@ # Copyright (C) 2020-2023 CERN and UCLouvain. # Licensed under the GNU Lesser General Public License (version 3 or later). # Created by: S. Roiser (Feb 2020) for the MG5aMC CUDACPP plugin. -# Further modified by: O. Mattelaer, S. Roiser, A. Valassi (2020-2023) for the MG5aMC CUDACPP plugin. +# Further modified by: J. Teig, O. Mattelaer, S. Roiser, A. Valassi (2020-2023) for the MG5aMC CUDACPP plugin. #=== Determine the name of this makefile (https://ftp.gnu.org/old-gnu/Manuals/make-3.80/html_node/make_17.html) #=== NB: assume that the same name (e.g. cudacpp.mk, Makefile...) is used in the Subprocess and src directories @@ -88,50 +88,52 @@ CXXFLAGS += $(OMPFLAGS) # Set the build flags appropriate to each AVX choice (example: "make AVX=none") # [NB MGONGPU_PVW512 is needed because "-mprefer-vector-width=256" is not exposed in a macro] # [See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96476] -$(info AVX=$(AVX)) -ifeq ($(UNAME_P),ppc64le) - ifeq ($(AVX),sse4) - override AVXFLAGS = -D__SSE4_2__ # Power9 VSX with 128 width (VSR registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on PowerPC for the moment) - endif -else ifeq ($(UNAME_P),arm) - ifeq ($(AVX),sse4) - override AVXFLAGS = -D__SSE4_2__ # ARM NEON with 128 width (Q/quadword registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on ARM for the moment) - endif -else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 - ifeq ($(AVX),none) - override AVXFLAGS = -mno-sse3 # no SIMD - else ifeq ($(AVX),sse4) - override AVXFLAGS = -mno-avx # SSE4.2 with 128 width (xmm registers) - else ifeq ($(AVX),avx2) - override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(AVX),512y) - override AVXFLAGS = -march=skylake -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(AVX),512z) - override AVXFLAGS = -march=skylake -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) +ifeq ($(NVCC),) + $(info AVX=$(AVX)) + ifeq ($(UNAME_P),ppc64le) + ifeq ($(AVX),sse4) + override AVXFLAGS = -D__SSE4_2__ # Power9 VSX with 128 width (VSR registers) + else ifneq ($(AVX),none) + $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on PowerPC for the moment) + endif + else ifeq ($(UNAME_P),arm) + ifeq ($(AVX),sse4) + override AVXFLAGS = -D__SSE4_2__ # ARM NEON with 128 width (Q/quadword registers) + else ifneq ($(AVX),none) + $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on ARM for the moment) + endif + else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 + ifeq ($(AVX),none) + override AVXFLAGS = -mno-sse3 # no SIMD + else ifeq ($(AVX),sse4) + override AVXFLAGS = -mno-avx # SSE4.2 with 128 width (xmm registers) + else ifeq ($(AVX),avx2) + override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] + else ifeq ($(AVX),512y) + override AVXFLAGS = -march=skylake -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] + else ifeq ($(AVX),512z) + override AVXFLAGS = -march=skylake -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) + else + $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) + endif else - $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) - endif -else - ifeq ($(AVX),none) - override AVXFLAGS = -march=x86-64 # no SIMD (see #588) - else ifeq ($(AVX),sse4) - override AVXFLAGS = -march=nehalem # SSE4.2 with 128 width (xmm registers) - else ifeq ($(AVX),avx2) - override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(AVX),512y) - override AVXFLAGS = -march=skylake-avx512 -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(AVX),512z) - override AVXFLAGS = -march=skylake-avx512 -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) + ifeq ($(AVX),none) + override AVXFLAGS = -march=x86-64 # no SIMD (see #588) + else ifeq ($(AVX),sse4) + override AVXFLAGS = -march=nehalem # SSE4.2 with 128 width (xmm registers) + else ifeq ($(AVX),avx2) + override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] + else ifeq ($(AVX),512y) + override AVXFLAGS = -march=skylake-avx512 -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] + else ifeq ($(AVX),512z) + override AVXFLAGS = -march=skylake-avx512 -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) + else ifneq ($(AVX),none) + $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) + endif endif + # For the moment, use AVXFLAGS everywhere: eventually, use them only in encapsulated implementations? + CXXFLAGS+= $(AVXFLAGS) endif -# For the moment, use AVXFLAGS everywhere: eventually, use them only in encapsulated implementations? -CXXFLAGS+= $(AVXFLAGS) # Set the build flags appropriate to each FPTYPE choice (example: "make FPTYPE=f") ###$(info FPTYPE=$(FPTYPE)) @@ -175,11 +177,19 @@ endif # Build directory "short" tag (defines target and path to the optional build directory) # (Rationale: keep directory names shorter, e.g. do not include random number generator choice) -override DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) +ifneq ($(NVCC),) + override DIRTAG = cuda_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) +else + override DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) +endif # Build lockfile "full" tag (defines full specification of build options that cannot be intermixed) # (Rationale: avoid mixing of CUDA and no-CUDA environment builds with different random number generators) -override TAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) +ifneq ($(NVCC),) + override TAG = cuda_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) +else + override TAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) +endif # Build directory: current directory by default, or build.$(DIRTAG) if USEBUILDDIR==1 ###$(info Current directory is $(shell pwd)) @@ -216,35 +226,21 @@ endif MG5AMC_COMMONLIB = mg5amc_common # First target (default goal) -all.$(TAG): $(BUILDDIR)/.build.$(TAG) $(LIBDIR)/.build.$(TAG) $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so +all.$(TAG): $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so # Target (and build options): debug debug: OPTFLAGS = -g -O0 debug: all.$(TAG) -# Target: tag-specific build lockfiles -override oldtagsb=`if [ -d $(BUILDDIR) ]; then find $(BUILDDIR) -maxdepth 1 -name '.build.*' ! -name '.build.$(TAG)' -exec echo $(shell pwd)/{} \; ; fi` -override oldtagsl=`if [ -d $(LIBDIR) ]; then find $(LIBDIR) -maxdepth 1 -name '.build.*' ! -name '.build.$(TAG)' -exec echo $(shell pwd)/{} \; ; fi` - -$(BUILDDIR)/.build.$(TAG): $(LIBDIR)/.build.$(TAG) - -$(LIBDIR)/.build.$(TAG): - @if [ "$(oldtagsl)" != "" ]; then echo -e "Cannot build for tag=$(TAG) as old builds exist in $(LIBDIR) for other tags:\n$(oldtagsl)\nPlease run 'make clean' first\nIf 'make clean' is not enough: run 'make clean USEBUILDDIR=1 AVX=$(AVX) FPTYPE=$(FPTYPE)' or 'make cleanall'"; exit 1; fi - @if [ "$(oldtagsb)" != "" ]; then echo -e "Cannot build for tag=$(TAG) as old builds exist in $(BUILDDIR) for other tags:\n$(oldtagsb)\nPlease run 'make clean' first\nIf 'make clean' is not enough: run 'make clean USEBUILDDIR=1 AVX=$(AVX) FPTYPE=$(FPTYPE)' or 'make cleanall'"; exit 1; fi - @if [ ! -d $(LIBDIR) ]; then echo "mkdir -p $(LIBDIR)"; mkdir -p $(LIBDIR); fi - @touch $(LIBDIR)/.build.$(TAG) - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - @touch $(BUILDDIR)/.build.$(TAG) - #------------------------------------------------------------------------------- # Generic target and build rules: objects from C++ compilation -$(BUILDDIR)/%.o : %.cc *.h $(BUILDDIR)/.build.$(TAG) +$(BUILDDIR)/%.o : %.cc *.h @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi $(CXX) $(CPPFLAGS) $(CXXFLAGS) -fPIC -c $< -o $@ # Generic target and build rules: objects from CUDA compilation -$(BUILDDIR)/%_cu.o : %.cc *.h $(BUILDDIR)/.build.$(TAG) +$(BUILDDIR)/%_cu.o : %.cc *.h @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c -x cu $< -o $@ @@ -271,20 +267,61 @@ endif # Target: clean the builds .PHONY: clean +BUILD_DIRS := $(wildcard build.*) +NUM_BUILD_DIRS := $(words $(BUILD_DIRS)) + clean: ifeq ($(USEBUILDDIR),1) - rm -rf $(LIBDIR) - rm -rf $(BUILDDIR) +ifeq ($(NUM_BUILD_DIRS),1) + $(info USEBUILDDIR=1, only one src build directory found.) + rm -rf ../lib/$(BUILD_DIRS) + rm -rf $(BUILD_DIRS) +else ifeq ($(NUM_BUILD_DIRS),0) + $(error USEBUILDDIR=1, but no src build directories are found.) else - rm -f $(LIBDIR)/.build.* $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so - rm -f $(BUILDDIR)/.build.* $(BUILDDIR)/*.o $(BUILDDIR)/*.exe + $(error Multiple src BUILDDIR's found! Use 'cleannone', 'cleansse4', 'cleanavx2', 'clean512y','clean512z', 'cleancuda' or 'cleanall'.) +endif +else + rm -f ../lib/lib$(MG5AMC_COMMONLIB).so + rm -f $(BUILDDIR)/*.o $(BUILDDIR)/*.exe endif cleanall: @echo - $(MAKE) clean -f $(THISMK) + rm -f ../lib/lib$(MG5AMC_COMMONLIB).so + rm -f $(BUILDDIR)/*.o $(BUILDDIR)/*.exe @echo - rm -rf $(LIBDIR)/build.* + rm -rf ../lib/build.* rm -rf build.* +# Target: clean different builds + +cleannone: + rm -rf ../lib/build.none_* + rm -rf build.none_* + +cleansse4: + rm -rf ../lib/build.sse4_* + rm -rf build.sse4_* + +cleanavx2: + rm -rf ../lib/build.avx2_* + rm -rf build.avx2_* + +clean512y: + rm -rf ../lib/build.512y_* + rm -rf build.512y_* + +clean512z: + rm -rf ../lib/build.512z_* + rm -rf build.512z_* + +cleancuda: + rm -rf ../lib/build.cuda_* + rm -rf build.cuda_* + +cleandir: + rm -f ./*.o ./*.exe + rm -f ../lib/lib$(MG5AMC_COMMONLIB).so + #------------------------------------------------------------------------------- diff --git a/epochX/cudacpp/ee_mumu.sa/SubProcesses/MatrixElementKernels.cc b/epochX/cudacpp/ee_mumu.sa/SubProcesses/MatrixElementKernels.cc index 30257195b6..cfed7d2af5 100644 --- a/epochX/cudacpp/ee_mumu.sa/SubProcesses/MatrixElementKernels.cc +++ b/epochX/cudacpp/ee_mumu.sa/SubProcesses/MatrixElementKernels.cc @@ -112,10 +112,17 @@ namespace mg5amcCpu // See https://community.arm.com/arm-community-blogs/b/operating-systems-blog/posts/runtime-detection-of-cpu-features-on-an-armv8-a-cpu bool ok = true; // this is just an assumption! const std::string tag = "arm neon (128bit as in SSE4.2)"; -#else +#elif defined(__x86_64__) || defined(__i386__) bool known = true; bool ok = __builtin_cpu_supports( "sse4.2" ); const std::string tag = "nehalem (SSE4.2)"; +#else + bool known = false; // __builtin_cpu_supports is not supported + // See https://gcc.gnu.org/onlinedocs/gcc/Basic-PowerPC-Built-in-Functions-Available-on-all-Configurations.html + // See https://stackoverflow.com/q/62783908 + // See https://community.arm.com/arm-community-blogs/b/operating-systems-blog/posts/runtime-detection-of-cpu-features-on-an-armv8-a-cpu + bool ok = true; // this is just an assumption! + const std::string tag = "arm neon (128bit as in SSE4.2)"; #endif #else bool known = true; diff --git a/epochX/cudacpp/ee_mumu.sa/SubProcesses/P1_Sigma_sm_epem_mupmum/CPPProcess.cc b/epochX/cudacpp/ee_mumu.sa/SubProcesses/P1_Sigma_sm_epem_mupmum/CPPProcess.cc index 12a28d3f7a..bad39b6414 100644 --- a/epochX/cudacpp/ee_mumu.sa/SubProcesses/P1_Sigma_sm_epem_mupmum/CPPProcess.cc +++ b/epochX/cudacpp/ee_mumu.sa/SubProcesses/P1_Sigma_sm_epem_mupmum/CPPProcess.cc @@ -238,25 +238,18 @@ namespace mg5amcCpu // *** DIAGRAM 1 OF 2 *** // Wavefunction(s) for diagram number 1 -#if not( defined __CUDACC__ and defined MGONGPU_TEST_DIVERGENCE ) - opzxxx( momenta, cHel[ihel][0], -1, w_fp[0], 0 ); // NB: opzxxx only uses pz -#else - if( ( blockDim.x * blockIdx.x + threadIdx.x ) % 2 == 0 ) - opzxxx( momenta, cHel[ihel][0], -1, w_fp[0], 0 ); // NB: opzxxx only uses pz - else - oxxxxx( momenta, 0, cHel[ihel][0], -1, w_fp[0], 0 ); -#endif + oxxxxx( momenta, 0., cHel[ihel][0], -1, w_fp[0], 0 ); - imzxxx( momenta, cHel[ihel][1], +1, w_fp[1], 1 ); // NB: imzxxx only uses pz + ixxxxx( momenta, 0., cHel[ihel][1], +1, w_fp[1], 1 ); - ixzxxx( momenta, cHel[ihel][2], -1, w_fp[2], 2 ); + ixxxxx( momenta, 0., cHel[ihel][2], -1, w_fp[2], 2 ); - oxzxxx( momenta, cHel[ihel][3], +1, w_fp[3], 3 ); + oxxxxx( momenta, 0., cHel[ihel][3], +1, w_fp[3], 3 ); - FFV1P0_3( w_fp[1], w_fp[0], COUPs[0], 0., 0., w_fp[4] ); + FFV1P0_3( w_fp[1], w_fp[0], COUPs[0], 1.0, 0., 0., w_fp[4] ); // Amplitude(s) for diagram number 1 - FFV1_0( w_fp[2], w_fp[3], w_fp[4], COUPs[0], &_fp[0] ); + FFV1_0( w_fp[2], w_fp[3], w_fp[4], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -265,10 +258,10 @@ namespace mg5amcCpu // *** DIAGRAM 2 OF 2 *** // Wavefunction(s) for diagram number 2 - FFV2_4_3( w_fp[1], w_fp[0], COUPs[1], COUPs[2], cIPD[0], cIPD[1], w_fp[4] ); + FFV2_4_3( w_fp[1], w_fp[0], COUPs[1], 1.0, COUPs[2], 1.0, cIPD[0], cIPD[1], w_fp[4] ); // Amplitude(s) for diagram number 2 - FFV2_4_0( w_fp[2], w_fp[3], w_fp[4], COUPs[1], COUPs[2], &_fp[0] ); + FFV2_4_0( w_fp[2], w_fp[3], w_fp[4], COUPs[1], 1.0, COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -789,8 +782,7 @@ namespace mg5amcCpu { // nprocesses>1 was last observed for "mirror processes" in uux_ttx in the 270 branch (see issue #343 and PRs #360 and #396) constexpr int nprocesses = 1; - static_assert( nprocesses == 1, "Assume nprocesses == 1" ); - // process_id corresponds to the index of DSIG1 Fortran functions (must be 1 because cudacpp is unable to handle DSIG2) + static_assert( nprocesses == 1 || nprocesses == 2, "Assume nprocesses == 1 or 2" ); constexpr int process_id = 1; // code generation source: standalone_cudacpp static_assert( process_id == 1, "Assume process_id == 1" ); } diff --git a/epochX/cudacpp/ee_mumu.sa/SubProcesses/cudacpp.mk b/epochX/cudacpp/ee_mumu.sa/SubProcesses/cudacpp.mk index 43cee0977e..15669185ad 100644 --- a/epochX/cudacpp/ee_mumu.sa/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/ee_mumu.sa/SubProcesses/cudacpp.mk @@ -1,7 +1,7 @@ # Copyright (C) 2020-2023 CERN and UCLouvain. # Licensed under the GNU Lesser General Public License (version 3 or later). # Created by: S. Roiser (Feb 2020) for the MG5aMC CUDACPP plugin. -# Further modified by: O. Mattelaer, S. Roiser, A. Valassi (2020-2023) for the MG5aMC CUDACPP plugin. +# Further modified by: J. Teig, O. Mattelaer, S. Roiser, A. Valassi (2020-2023) for the MG5aMC CUDACPP plugin. #=== Determine the name of this makefile (https://ftp.gnu.org/old-gnu/Manuals/make-3.80/html_node/make_17.html) #=== NB: different names (e.g. cudacpp.mk and cudacpp_src.mk) are used in the Subprocess and src directories @@ -86,6 +86,14 @@ endif #------------------------------------------------------------------------------- +.DEFAULT_GOAL := usage + +# Target if user does not specify target +usage: + $(error Unknown target='$(MAKECMDGOALS)': only 'cppnone', 'cppsse4', 'cppavx2', 'cpp512y', 'cpp512z' and 'cuda' are supported!) + +#------------------------------------------------------------------------------- + #=== Configure the C++ compiler CXXFLAGS = $(OPTFLAGS) -std=c++17 $(INCFLAGS) -Wall -Wshadow -Wextra @@ -103,70 +111,73 @@ endif #------------------------------------------------------------------------------- -#=== Configure the CUDA compiler - -# If CXX is not a single word (example "clang++ --gcc-toolchain...") then disable CUDA builds (issue #505) -# This is because it is impossible to pass this to "CUFLAGS += -ccbin " below -ifneq ($(words $(subst ccache ,,$(CXX))),1) # allow at most "CXX=ccache " from outside - $(warning CUDA builds are not supported for multi-word CXX "$(CXX)") - override CUDA_HOME=disabled -endif - -# If CUDA_HOME is not set, try to set it from the location of nvcc -ifndef CUDA_HOME - CUDA_HOME = $(patsubst %bin/nvcc,%,$(shell which nvcc 2>/dev/null)) - $(warning CUDA_HOME was not set: using "$(CUDA_HOME)") -endif - -# Set NVCC as $(CUDA_HOME)/bin/nvcc if it exists -ifneq ($(wildcard $(CUDA_HOME)/bin/nvcc),) - NVCC = $(CUDA_HOME)/bin/nvcc - USE_NVTX ?=-DUSE_NVTX - # See https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html - # See https://arnon.dk/matching-sm-architectures-arch-and-gencode-for-various-nvidia-cards/ - # Default: use compute capability 70 for V100 (CERN lxbatch, CERN itscrd, Juwels Cluster). - # Embed device code for 70, and PTX for 70+. - # Export MADGRAPH_CUDA_ARCHITECTURE (comma-separated list) to use another value or list of values (see #533). - # Examples: use 60 for P100 (Piz Daint), 80 for A100 (Juwels Booster, NVidia raplab/Curiosity). - MADGRAPH_CUDA_ARCHITECTURE ?= 70 - ###CUARCHFLAGS = -gencode arch=compute_$(MADGRAPH_CUDA_ARCHITECTURE),code=compute_$(MADGRAPH_CUDA_ARCHITECTURE) -gencode arch=compute_$(MADGRAPH_CUDA_ARCHITECTURE),code=sm_$(MADGRAPH_CUDA_ARCHITECTURE) # Older implementation (AV): go back to this one for multi-GPU support #533 - ###CUARCHFLAGS = --gpu-architecture=compute_$(MADGRAPH_CUDA_ARCHITECTURE) --gpu-code=sm_$(MADGRAPH_CUDA_ARCHITECTURE),compute_$(MADGRAPH_CUDA_ARCHITECTURE) # Newer implementation (SH): cannot use this as-is for multi-GPU support #533 - comma:=, - CUARCHFLAGS = $(foreach arch,$(subst $(comma), ,$(MADGRAPH_CUDA_ARCHITECTURE)),-gencode arch=compute_$(arch),code=compute_$(arch) -gencode arch=compute_$(arch),code=sm_$(arch)) - CUINC = -I$(CUDA_HOME)/include/ - CURANDLIBFLAGS = -L$(CUDA_HOME)/lib64/ -lcurand # NB: -lcuda is not needed here! - CUOPTFLAGS = -lineinfo - CUFLAGS = $(foreach opt, $(OPTFLAGS), -Xcompiler $(opt)) $(CUOPTFLAGS) $(INCFLAGS) $(CUINC) $(USE_NVTX) $(CUARCHFLAGS) -use_fast_math - ###CUFLAGS += -Xcompiler -Wall -Xcompiler -Wextra -Xcompiler -Wshadow - ###NVCC_VERSION = $(shell $(NVCC) --version | grep 'Cuda compilation tools' | cut -d' ' -f5 | cut -d, -f1) - CUFLAGS += -std=c++17 # need CUDA >= 11.2 (see #333): this is enforced in mgOnGpuConfig.h - # Without -maxrregcount: baseline throughput: 6.5E8 (16384 32 12) up to 7.3E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 160 # improves throughput: 6.9E8 (16384 32 12) up to 7.7E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 128 # improves throughput: 7.3E8 (16384 32 12) up to 7.6E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 96 # degrades throughput: 4.1E8 (16384 32 12) up to 4.5E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 64 # degrades throughput: 1.7E8 (16384 32 12) flat at 1.7E8 (65536 128 12) -else ifneq ($(origin REQUIRE_CUDA),undefined) - # If REQUIRE_CUDA is set but no cuda is found, stop here (e.g. for CI tests on GPU #443) - $(error No cuda installation found (set CUDA_HOME or make nvcc visible in PATH)) -else - # No cuda. Switch cuda compilation off and go to common random numbers in C++ - $(warning CUDA_HOME is not set or is invalid: export CUDA_HOME to compile with cuda) - override NVCC= - override USE_NVTX= - override CUINC= - override CURANDLIBFLAGS= -endif -export NVCC -export CUFLAGS +#=== Configure the CUDA compiler for the CUDA target -# Set the host C++ compiler for nvcc via "-ccbin " -# (NB issue #505: this must be a single word, "clang++ --gcc-toolchain..." is not supported) -CUFLAGS += -ccbin $(shell which $(subst ccache ,,$(CXX))) +ifneq (,$(findstring $(MAKECMDGOALS),cuda-gcheck-runGcheck-runFGcheck-cmpFGcheck-memcheck)) + # If CXX is not a single word (example "clang++ --gcc-toolchain...") then disable CUDA builds (issue #505) + # This is because it is impossible to pass this to "CUFLAGS += -ccbin " below + ifneq ($(words $(subst ccache ,,$(CXX))),1) # allow at most "CXX=ccache " from outside + $(warning CUDA builds are not supported for multi-word CXX "$(CXX)") + override CUDA_HOME=disabled + endif -# Allow newer (unsupported) C++ compilers with older versions of CUDA if ALLOW_UNSUPPORTED_COMPILER_IN_CUDA is set (#504) -ifneq ($(origin ALLOW_UNSUPPORTED_COMPILER_IN_CUDA),undefined) -CUFLAGS += -allow-unsupported-compiler -endif + # If CUDA_HOME is not set, try to set it from the location of nvcc + ifndef CUDA_HOME + CUDA_HOME = $(patsubst %bin/nvcc,%,$(shell which nvcc 2>/dev/null)) + $(warning CUDA_HOME was not set: using "$(CUDA_HOME)") + endif + + # Set NVCC as $(CUDA_HOME)/bin/nvcc if it exists + ifneq ($(wildcard $(CUDA_HOME)/bin/nvcc),) + NVCC = $(CUDA_HOME)/bin/nvcc + USE_NVTX ?=-DUSE_NVTX + # See https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html + # See https://arnon.dk/matching-sm-architectures-arch-and-gencode-for-various-nvidia-cards/ + # Default: use compute capability 70 for V100 (CERN lxbatch, CERN itscrd, Juwels Cluster). + # Embed device code for 70, and PTX for 70+. + # Export MADGRAPH_CUDA_ARCHITECTURE (comma-separated list) to use another value or list of values (see #533). + # Examples: use 60 for P100 (Piz Daint), 80 for A100 (Juwels Booster, NVidia raplab/Curiosity). + MADGRAPH_CUDA_ARCHITECTURE ?= 70 + ###CUARCHFLAGS = -gencode arch=compute_$(MADGRAPH_CUDA_ARCHITECTURE),code=compute_$(MADGRAPH_CUDA_ARCHITECTURE) -gencode arch=compute_$(MADGRAPH_CUDA_ARCHITECTURE),code=sm_$(MADGRAPH_CUDA_ARCHITECTURE) # Older implementation (AV): go back to this one for multi-GPU support #533 + ###CUARCHFLAGS = --gpu-architecture=compute_$(MADGRAPH_CUDA_ARCHITECTURE) --gpu-code=sm_$(MADGRAPH_CUDA_ARCHITECTURE),compute_$(MADGRAPH_CUDA_ARCHITECTURE) # Newer implementation (SH): cannot use this as-is for multi-GPU support #533 + comma:=, + CUARCHFLAGS = $(foreach arch,$(subst $(comma), ,$(MADGRAPH_CUDA_ARCHITECTURE)),-gencode arch=compute_$(arch),code=compute_$(arch) -gencode arch=compute_$(arch),code=sm_$(arch)) + CUINC = -I$(CUDA_HOME)/include/ + CURANDLIBFLAGS = -L$(CUDA_HOME)/lib64/ -lcurand # NB: -lcuda is not needed here! + CUOPTFLAGS = -lineinfo + CUFLAGS = $(foreach opt, $(OPTFLAGS), -Xcompiler $(opt)) $(CUOPTFLAGS) $(INCFLAGS) $(CUINC) $(USE_NVTX) $(CUARCHFLAGS) -use_fast_math + ###CUFLAGS += -Xcompiler -Wall -Xcompiler -Wextra -Xcompiler -Wshadow + ###NVCC_VERSION = $(shell $(NVCC) --version | grep 'Cuda compilation tools' | cut -d' ' -f5 | cut -d, -f1) + CUFLAGS += -std=c++17 # need CUDA >= 11.2 (see #333): this is enforced in mgOnGpuConfig.h + # Without -maxrregcount: baseline throughput: 6.5E8 (16384 32 12) up to 7.3E8 (65536 128 12) + ###CUFLAGS+= --maxrregcount 160 # improves throughput: 6.9E8 (16384 32 12) up to 7.7E8 (65536 128 12) + ###CUFLAGS+= --maxrregcount 128 # improves throughput: 7.3E8 (16384 32 12) up to 7.6E8 (65536 128 12) + ###CUFLAGS+= --maxrregcount 96 # degrades throughput: 4.1E8 (16384 32 12) up to 4.5E8 (65536 128 12) + ###CUFLAGS+= --maxrregcount 64 # degrades throughput: 1.7E8 (16384 32 12) flat at 1.7E8 (65536 128 12) + else ifneq ($(origin REQUIRE_CUDA),undefined) + # If REQUIRE_CUDA is set but no cuda is found, stop here (e.g. for CI tests on GPU #443) + $(error No cuda installation found (set CUDA_HOME or make nvcc visible in PATH)) + else + # No cuda. Switch cuda compilation off and go to common random numbers in C++ + $(warning CUDA_HOME is not set or is invalid: export CUDA_HOME to compile with cuda) + override NVCC= + override USE_NVTX= + override CUINC= + override CURANDLIBFLAGS= + endif + export NVCC + export CUFLAGS + + # Set the host C++ compiler for nvcc via "-ccbin " + # (NB issue #505: this must be a single word, "clang++ --gcc-toolchain..." is not supported) + CUFLAGS += -ccbin $(shell which $(subst ccache ,,$(CXX))) + + # Allow newer (unsupported) C++ compilers with older versions of CUDA if ALLOW_UNSUPPORTED_COMPILER_IN_CUDA is set (#504) + ifneq ($(origin ALLOW_UNSUPPORTED_COMPILER_IN_CUDA),undefined) + CUFLAGS += -allow-unsupported-compiler + endif + +endif # ($(MAKECMDGOALS),cuda) #------------------------------------------------------------------------------- @@ -226,32 +237,6 @@ override OMPFLAGS = -fopenmp ###override OMPFLAGS = # disable OpenMP MT (default before #575) endif -# Set the default AVX (vectorization) choice -ifeq ($(AVX),) - ifeq ($(UNAME_P),ppc64le) - ###override AVX = none - override AVX = sse4 - else ifeq ($(UNAME_P),arm) - ###override AVX = none - override AVX = sse4 - else ifeq ($(wildcard /proc/cpuinfo),) - override AVX = none - $(warning Using AVX='$(AVX)' because host SIMD features cannot be read from /proc/cpuinfo) - else ifeq ($(shell grep -m1 -c avx512vl /proc/cpuinfo)$(shell $(CXX) --version | grep ^clang),1) - override AVX = 512y - ###$(info Using AVX='$(AVX)' as no user input exists) - else - override AVX = avx2 - ifneq ($(shell grep -m1 -c avx512vl /proc/cpuinfo),1) - $(warning Using AVX='$(AVX)' because host does not support avx512vl) - else - $(warning Using AVX='$(AVX)' because this is faster than avx512vl for clang) - endif - endif -else - ###$(info Using AVX='$(AVX)' according to user input) -endif - # Set the default FPTYPE (floating point type) choice ifeq ($(FPTYPE),) override FPTYPE = d @@ -276,6 +261,21 @@ ifeq ($(RNDGEN),) endif endif +# set the correct AVX based on avxcpp target +ifeq ($(MAKECMDGOALS),cppnone) # no SIMD + override AVX = none +else ifeq ($(MAKECMDGOALS),cppsse4) # SSE4.2 with 128 width (xmm registers) + override AVX = sse4 +else ifeq ($(MAKECMDGOALS),cppavx2) # AVX2 with 256 width (ymm registers) [DEFAULT for clang] + override AVX = avx2 +else ifeq ($(MAKECMDGOALS),cpp512y) # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] + override AVX = 512y +else ifeq ($(MAKECMDGOALS),cpp512z) # AVX512 with 512 width (zmm registers) + override AVX = 512z +else + override AVX = none +endif + # Export AVX, FPTYPE, HELINL, HRDCOD, RNDGEN, OMPFLAGS so that it is not necessary to pass them to the src Makefile too export AVX export FPTYPE @@ -295,50 +295,52 @@ CXXFLAGS += $(OMPFLAGS) # Set the build flags appropriate to each AVX choice (example: "make AVX=none") # [NB MGONGPU_PVW512 is needed because "-mprefer-vector-width=256" is not exposed in a macro] # [See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96476] -$(info AVX=$(AVX)) -ifeq ($(UNAME_P),ppc64le) - ifeq ($(AVX),sse4) - override AVXFLAGS = -D__SSE4_2__ # Power9 VSX with 128 width (VSR registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on PowerPC for the moment) - endif -else ifeq ($(UNAME_P),arm) - ifeq ($(AVX),sse4) - override AVXFLAGS = -D__SSE4_2__ # ARM NEON with 128 width (Q/quadword registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on ARM for the moment) - endif -else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 - ifeq ($(AVX),none) - override AVXFLAGS = -mno-sse3 # no SIMD - else ifeq ($(AVX),sse4) - override AVXFLAGS = -mno-avx # SSE4.2 with 128 width (xmm registers) - else ifeq ($(AVX),avx2) - override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(AVX),512y) - override AVXFLAGS = -march=skylake -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(AVX),512z) - override AVXFLAGS = -march=skylake -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) - else - $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) - endif -else - ifeq ($(AVX),none) - override AVXFLAGS = -march=x86-64 # no SIMD (see #588) - else ifeq ($(AVX),sse4) - override AVXFLAGS = -march=nehalem # SSE4.2 with 128 width (xmm registers) - else ifeq ($(AVX),avx2) - override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(AVX),512y) - override AVXFLAGS = -march=skylake-avx512 -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(AVX),512z) - override AVXFLAGS = -march=skylake-avx512 -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) +ifeq ($(findstring cpp,$(MAKECMDGOALS)),cpp) + $(info AVX=$(AVX)) + ifeq ($(UNAME_P),ppc64le) + ifeq ($(AVX),sse4) + override AVXFLAGS = -D__SSE4_2__ # Power9 VSX with 128 width (VSR registers) + else ifneq ($(AVX),none) + $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on PowerPC for the moment) + endif + else ifeq ($(UNAME_P),arm) + ifeq ($(AVX),sse4) + override AVXFLAGS = -D__SSE4_2__ # ARM NEON with 128 width (Q/quadword registers) + else ifneq ($(AVX),none) + $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on ARM for the moment) + endif + else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 + ifeq ($(AVX),none) + override AVXFLAGS = -mno-sse3 # no SIMD + else ifeq ($(AVX),sse4) + override AVXFLAGS = -mno-avx # SSE4.2 with 128 width (xmm registers) + else ifeq ($(AVX),avx2) + override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] + else ifeq ($(AVX),512y) + override AVXFLAGS = -march=skylake -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] + else ifeq ($(AVX),512z) + override AVXFLAGS = -march=skylake -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) + else + $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) + endif else - $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) + ifeq ($(AVX),none) + override AVXFLAGS = -march=x86-64 # no SIMD (see #588) + else ifeq ($(AVX),sse4) + override AVXFLAGS = -march=nehalem # SSE4.2 with 128 width (xmm registers) + else ifeq ($(AVX),avx2) + override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] + else ifeq ($(AVX),512y) + override AVXFLAGS = -march=skylake-avx512 -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] + else ifeq ($(AVX),512z) + override AVXFLAGS = -march=skylake-avx512 -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) + else + $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) + endif endif + # For the moment, use AVXFLAGS everywhere: eventually, use them only in encapsulated implementations? + CXXFLAGS+= $(AVXFLAGS) endif -# For the moment, use AVXFLAGS everywhere: eventually, use them only in encapsulated implementations? -CXXFLAGS+= $(AVXFLAGS) # Set the build flags appropriate to each FPTYPE choice (example: "make FPTYPE=f") $(info FPTYPE=$(FPTYPE)) @@ -389,11 +391,19 @@ endif # Build directory "short" tag (defines target and path to the optional build directory) # (Rationale: keep directory names shorter, e.g. do not include random number generator choice) -override DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) +ifneq ($(NVCC),) + override DIRTAG = cuda_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) +else + override DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) +endif # Build lockfile "full" tag (defines full specification of build options that cannot be intermixed) # (Rationale: avoid mixing of CUDA and no-CUDA environment builds with different random number generators) -override TAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) +ifneq ($(NVCC),) + override TAG = cuda_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) +else + override TAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) +endif # Build directory: current directory by default, or build.$(DIRTAG) if USEBUILDDIR==1 ifeq ($(USEBUILDDIR),1) @@ -448,9 +458,9 @@ endif testmain=$(BUILDDIR)/runTest.exe ifneq ($(GTESTLIBS),) -all.$(TAG): $(BUILDDIR)/.build.$(TAG) $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_main) $(cxx_main) $(fcu_main) $(fcxx_main) $(testmain) +all.$(TAG): $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_main) $(cxx_main) $(fcu_main) $(fcxx_main) $(testmain) else -all.$(TAG): $(BUILDDIR)/.build.$(TAG) $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_main) $(cxx_main) $(fcu_main) $(fcxx_main) +all.$(TAG): $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_main) $(cxx_main) $(fcu_main) $(fcxx_main) endif # Target (and build options): debug @@ -460,27 +470,20 @@ debug: CUOPTFLAGS = -G debug: MAKEDEBUG := debug debug: all.$(TAG) -# Target: tag-specific build lockfiles -override oldtagsb=`if [ -d $(BUILDDIR) ]; then find $(BUILDDIR) -maxdepth 1 -name '.build.*' ! -name '.build.$(TAG)' -exec echo $(shell pwd)/{} \; ; fi` -$(BUILDDIR)/.build.$(TAG): - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - @if [ "$(oldtagsb)" != "" ]; then echo "Cannot build for tag=$(TAG) as old builds exist for other tags:"; echo " $(oldtagsb)"; echo "Please run 'make clean' first\nIf 'make clean' is not enough: run 'make clean USEBUILDDIR=1 AVX=$(AVX) FPTYPE=$(FPTYPE)' or 'make cleanall'"; exit 1; fi - @touch $(BUILDDIR)/.build.$(TAG) - # Generic target and build rules: objects from CUDA compilation ifneq ($(NVCC),) -$(BUILDDIR)/%.o : %.cu *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) +$(BUILDDIR)/%.o : %.cu *.h ../../src/*.h @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c $< -o $@ -$(BUILDDIR)/%_cu.o : %.cc *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) +$(BUILDDIR)/%_cu.o : %.cc *.h ../../src/*.h @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c -x cu $< -o $@ endif # Generic target and build rules: objects from C++ compilation # (NB do not include CUINC here! add it only for NVTX or curand #679) -$(BUILDDIR)/%.o : %.cc *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) +$(BUILDDIR)/%.o : %.cc *.h ../../src/*.h @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi $(CXX) $(CPPFLAGS) $(CXXFLAGS) -fPIC -c $< -o $@ @@ -532,7 +535,7 @@ endif # Target (and build rules): common (src) library commonlib : $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so -$(LIBDIR)/lib$(MG5AMC_COMMONLIB).so: ../../src/*.h ../../src/*.cc $(BUILDDIR)/.build.$(TAG) +$(LIBDIR)/lib$(MG5AMC_COMMONLIB).so: ../../src/*.h ../../src/*.cc $(MAKE) -C ../../src $(MAKEDEBUG) -f $(CUDACPP_SRC_MAKEFILE) #------------------------------------------------------------------------------- @@ -711,35 +714,27 @@ endif # Target: build all targets in all AVX modes (each AVX mode in a separate build directory) # Split the avxall target into five separate targets to allow parallel 'make -j avxall' builds # (Hack: add a fbridge.inc dependency to avxall, to ensure it is only copied once for all AVX modes) -avxnone: - @echo - $(MAKE) USEBUILDDIR=1 AVX=none -f $(CUDACPP_MAKEFILE) +cppnone: $(cxx_main) -avxsse4: - @echo - $(MAKE) USEBUILDDIR=1 AVX=sse4 -f $(CUDACPP_MAKEFILE) +cppsse4: $(cxx_main) -avxavx2: - @echo - $(MAKE) USEBUILDDIR=1 AVX=avx2 -f $(CUDACPP_MAKEFILE) +cppavx2: $(cxx_main) -avx512y: - @echo - $(MAKE) USEBUILDDIR=1 AVX=512y -f $(CUDACPP_MAKEFILE) +cpp512y: $(cxx_main) -avx512z: - @echo - $(MAKE) USEBUILDDIR=1 AVX=512z -f $(CUDACPP_MAKEFILE) +cpp512z: $(cxx_main) + +cuda: $(cu_main) ifeq ($(UNAME_P),ppc64le) ###avxall: $(INCDIR)/fbridge.inc avxnone avxsse4 -avxall: avxnone avxsse4 +cppall: cppnone cppsse4 else ifeq ($(UNAME_P),arm) ###avxall: $(INCDIR)/fbridge.inc avxnone avxsse4 -avxall: avxnone avxsse4 +cppall: cppnone cppsse4 else ###avxall: $(INCDIR)/fbridge.inc avxnone avxsse4 avxavx2 avx512y avx512z -avxall: avxnone avxsse4 avxavx2 avx512y avx512z +cppall: cppnone cppsse4 cppavx2 cpp512y cpp512z endif #------------------------------------------------------------------------------- @@ -747,21 +742,31 @@ endif # Target: clean the builds .PHONY: clean +BUILD_DIRS := $(wildcard build.*) +NUM_BUILD_DIRS := $(words $(BUILD_DIRS)) + clean: ifeq ($(USEBUILDDIR),1) - rm -rf $(BUILDDIR) +ifeq ($(NUM_BUILD_DIRS),1) + $(info USEBUILDDIR=1, Only one build directory found.) + rm -rf $(BUILD_DIRS) +else ifeq ($(NUM_BUILD_DIRS),0) + $(error USEBUILDDIR=1, but no build directories are found.) else - rm -f $(BUILDDIR)/.build.* $(BUILDDIR)/*.o $(BUILDDIR)/*.exe + $(error Multiple BUILDDIR's found! Use 'cleannone', 'cleansse4', 'cleanavx2', 'clean512y','clean512z', 'cleancuda' or 'cleanall'.) +endif +else + rm -f $(BUILDDIR)/*.o $(BUILDDIR)/*.exe rm -f $(LIBDIR)/lib$(MG5AMC_CXXLIB).so $(LIBDIR)/lib$(MG5AMC_CULIB).so endif $(MAKE) -C ../../src clean -f $(CUDACPP_SRC_MAKEFILE) -### rm -rf $(INCDIR) cleanall: @echo - $(MAKE) USEBUILDDIR=0 clean -f $(CUDACPP_MAKEFILE) + rm -f $(BUILDDIR)/*.o $(BUILDDIR)/*.exe + rm -f $(LIBDIR)/lib$(MG5AMC_CXXLIB).so $(LIBDIR)/lib$(MG5AMC_CULIB).so @echo - $(MAKE) USEBUILDDIR=0 -C ../../src cleanall -f $(CUDACPP_SRC_MAKEFILE) + $(MAKE) -C ../../src cleanall -f $(CUDACPP_SRC_MAKEFILE) rm -rf build.* # Target: clean the builds as well as the gtest installation(s) @@ -771,6 +776,42 @@ ifneq ($(wildcard $(TESTDIRCOMMON)),) endif $(MAKE) -C $(TESTDIRLOCAL) clean +# Target: clean different builds +cleannone: + rm -rf build.none_* + rm -f ../../lib/build.none_*/lib$(MG5AMC_CXXLIB).so + $(MAKE) -C ../../src cleannone -f $(CUDACPP_SRC_MAKEFILE) + +cleansse4: + rm -rf build.sse4_* + rm -f ../../lib/build.sse4_*/lib$(MG5AMC_CXXLIB).so + $(MAKE) -C ../../src cleansse4 -f $(CUDACPP_SRC_MAKEFILE) + +cleanavx2: + rm -rf build.avx2_* + rm -f ../../lib/build.avx2_*/lib$(MG5AMC_CXXLIB).so + $(MAKE) -C ../../src cleanavx2 -f $(CUDACPP_SRC_MAKEFILE) + +clean512y: + rm -rf build.512y_* + rm -f ../../lib/build.512y_*/lib$(MG5AMC_CXXLIB).so + $(MAKE) -C ../../src clean512y -f $(CUDACPP_SRC_MAKEFILE) + +clean512z: + rm -rf build.512z_* + rm -f ../../lib/build.512z_*/lib$(MG5AMC_CXXLIB).so + $(MAKE) -C ../../src clean512z -f $(CUDACPP_SRC_MAKEFILE) + +cleancuda: + rm -rf build.cuda_* + rm -f ../../lib/build.cuda_*/lib$(MG5AMC_CULIB).so + $(MAKE) -C ../../src cleancuda -f $(CUDACPP_SRC_MAKEFILE) + +cleandir: + rm -f ./*.o ./*.exe + rm -f ../../lib/lib$(MG5AMC_CXXLIB).so ../../lib/lib$(MG5AMC_CULIB).so + $(MAKE) -C ../../src cleandir -f $(CUDACPP_SRC_MAKEFILE) + #------------------------------------------------------------------------------- # Target: show system and compiler information @@ -817,13 +858,10 @@ endif #------------------------------------------------------------------------------- -# Target: check (run the C++ test executable) +# Target: check/gcheck (run the C++ test executable) # [NB THIS IS WHAT IS USED IN THE GITHUB CI!] -ifneq ($(NVCC),) -check: runTest cmpFcheck cmpFGcheck -else check: runTest cmpFcheck -endif +gcheck: runTest cmpFGcheck # Target: runTest (run the C++ test executable runTest.exe) runTest: all.$(TAG) @@ -863,4 +901,4 @@ cmpFGcheck: all.$(TAG) memcheck: all.$(TAG) $(RUNTIME) $(CUDA_HOME)/bin/cuda-memcheck --check-api-memory-access yes --check-deprecated-instr yes --check-device-heap yes --demangle full --language c --leak-check full --racecheck-report all --report-api-errors all --show-backtrace yes --tool memcheck --track-unused-memory yes $(BUILDDIR)/gcheck.exe -p 2 32 2 -#------------------------------------------------------------------------------- +#------------------------------------------------------------------------------- \ No newline at end of file diff --git a/epochX/cudacpp/ee_mumu.sa/src/HelAmps_sm.h b/epochX/cudacpp/ee_mumu.sa/src/HelAmps_sm.h index 6a8781b113..4e4fd67611 100644 --- a/epochX/cudacpp/ee_mumu.sa/src/HelAmps_sm.h +++ b/epochX/cudacpp/ee_mumu.sa/src/HelAmps_sm.h @@ -863,6 +863,7 @@ namespace mg5amcCpu const fptype allF2[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, fptype allvertexes[] ) ALWAYS_INLINE; //-------------------------------------------------------------------------- @@ -873,6 +874,7 @@ namespace mg5amcCpu FFV1P0_3( const fptype allF1[], const fptype allF2[], const fptype allCOUP[], + const double Ccoeff, const fptype M3, const fptype W3, fptype allV3[] ) ALWAYS_INLINE; @@ -886,6 +888,7 @@ namespace mg5amcCpu const fptype allF2[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, fptype allvertexes[] ) ALWAYS_INLINE; //-------------------------------------------------------------------------- @@ -896,6 +899,7 @@ namespace mg5amcCpu FFV2_3( const fptype allF1[], const fptype allF2[], const fptype allCOUP[], + const double Ccoeff, const fptype M3, const fptype W3, fptype allV3[] ) ALWAYS_INLINE; @@ -909,6 +913,7 @@ namespace mg5amcCpu const fptype allF2[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, fptype allvertexes[] ) ALWAYS_INLINE; //-------------------------------------------------------------------------- @@ -919,6 +924,7 @@ namespace mg5amcCpu FFV4_3( const fptype allF1[], const fptype allF2[], const fptype allCOUP[], + const double Ccoeff, const fptype M3, const fptype W3, fptype allV3[] ) ALWAYS_INLINE; @@ -932,7 +938,9 @@ namespace mg5amcCpu const fptype allF2[], const fptype allV3[], const fptype allCOUP1[], + const double Ccoeff1, const fptype allCOUP2[], + const double Ccoeff2, fptype allvertexes[] ) ALWAYS_INLINE; //-------------------------------------------------------------------------- @@ -943,7 +951,9 @@ namespace mg5amcCpu FFV2_4_3( const fptype allF1[], const fptype allF2[], const fptype allCOUP1[], + const double Ccoeff1, const fptype allCOUP2[], + const double Ccoeff2, const fptype M3, const fptype W3, fptype allV3[] ) ALWAYS_INLINE; @@ -957,6 +967,7 @@ namespace mg5amcCpu const fptype allF2[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, fptype allvertexes[] ) { mgDebug( 0, __FUNCTION__ ); @@ -980,6 +991,7 @@ namespace mg5amcCpu FFV1P0_3( const fptype allF1[], const fptype allF2[], const fptype allCOUP[], + const double Ccoeff, const fptype M3, const fptype W3, fptype allV3[] ) @@ -1011,6 +1023,7 @@ namespace mg5amcCpu const fptype allF2[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, fptype allvertexes[] ) { mgDebug( 0, __FUNCTION__ ); @@ -1034,6 +1047,7 @@ namespace mg5amcCpu FFV2_3( const fptype allF1[], const fptype allF2[], const fptype allCOUP[], + const double Ccoeff, const fptype M3, const fptype W3, fptype allV3[] ) @@ -1067,6 +1081,7 @@ namespace mg5amcCpu const fptype allF2[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, fptype allvertexes[] ) { mgDebug( 0, __FUNCTION__ ); @@ -1078,9 +1093,9 @@ namespace mg5amcCpu const cxtype cI = cxmake( 0., 1. ); constexpr fptype one( 1. ); constexpr fptype two( 2. ); - const cxtype_sv TMP1 = ( F1[2] * ( F2[4] * ( V3[2] + V3[5] ) + F2[5] * ( V3[3] + cI * V3[4] ) ) + F1[3] * ( F2[4] * ( V3[3] - cI * V3[4] ) + F2[5] * ( V3[2] - V3[5] ) ) ); - const cxtype_sv TMP3 = ( F1[4] * ( F2[2] * ( V3[2] - V3[5] ) - F2[3] * ( V3[3] + cI * V3[4] ) ) + F1[5] * ( F2[2] * ( -V3[3] + cI * V3[4] ) + F2[3] * ( V3[2] + V3[5] ) ) ); - ( *vertex ) = COUP * ( -one ) * ( +cI * TMP1 + ( two * cI ) * TMP3 ); + const cxtype_sv TMP3 = ( F1[2] * ( F2[4] * ( V3[2] + V3[5] ) + F2[5] * ( V3[3] + cI * V3[4] ) ) + F1[3] * ( F2[4] * ( V3[3] - cI * V3[4] ) + F2[5] * ( V3[2] - V3[5] ) ) ); + const cxtype_sv TMP4 = ( F1[4] * ( F2[2] * ( V3[2] - V3[5] ) - F2[3] * ( V3[3] + cI * V3[4] ) ) + F1[5] * ( F2[2] * ( -V3[3] + cI * V3[4] ) + F2[3] * ( V3[2] + V3[5] ) ) ); + ( *vertex ) = COUP * ( -one ) * ( +cI * TMP3 + ( two * cI ) * TMP4 ); mgDebug( 1, __FUNCTION__ ); return; } @@ -1093,6 +1108,7 @@ namespace mg5amcCpu FFV4_3( const fptype allF1[], const fptype allF2[], const fptype allCOUP[], + const double Ccoeff, const fptype M3, const fptype W3, fptype allV3[] ) @@ -1110,12 +1126,12 @@ namespace mg5amcCpu constexpr fptype two( 2. ); constexpr fptype half( 1. / 2. ); const cxtype_sv TMP2 = ( F1[2] * ( F2[4] * ( P3[0] + P3[3] ) + F2[5] * ( P3[1] + cI * P3[2] ) ) + F1[3] * ( F2[4] * ( P3[1] - cI * P3[2] ) + F2[5] * ( P3[0] - P3[3] ) ) ); - const cxtype_sv TMP4 = ( F1[4] * ( F2[2] * ( P3[0] - P3[3] ) - F2[3] * ( P3[1] + cI * P3[2] ) ) + F1[5] * ( F2[2] * ( -P3[1] + cI * P3[2] ) + F2[3] * ( P3[0] + P3[3] ) ) ); + const cxtype_sv TMP5 = ( F1[4] * ( F2[2] * ( P3[0] - P3[3] ) - F2[3] * ( P3[1] + cI * P3[2] ) ) + F1[5] * ( F2[2] * ( -P3[1] + cI * P3[2] ) + F2[3] * ( P3[0] + P3[3] ) ) ); const cxtype_sv denom = COUP / ( ( P3[0] * P3[0] ) - ( P3[1] * P3[1] ) - ( P3[2] * P3[2] ) - ( P3[3] * P3[3] ) - M3 * ( M3 - cI * W3 ) ); - V3[2] = denom * ( -two * cI ) * ( OM3 * -half * P3[0] * ( TMP2 + two * TMP4 ) + ( +half * ( F1[2] * F2[4] + F1[3] * F2[5] ) + F1[4] * F2[2] + F1[5] * F2[3] ) ); - V3[3] = denom * ( -two * cI ) * ( OM3 * -half * P3[1] * ( TMP2 + two * TMP4 ) + ( -half * ( F1[2] * F2[5] + F1[3] * F2[4] ) + F1[4] * F2[3] + F1[5] * F2[2] ) ); - V3[4] = denom * ( two * cI ) * ( OM3 * half * P3[2] * ( TMP2 + two * TMP4 ) + ( half * cI * ( F1[2] * F2[5] ) - half * cI * ( F1[3] * F2[4] ) - cI * ( F1[4] * F2[3] ) + cI * ( F1[5] * F2[2] ) ) ); - V3[5] = denom * ( two * cI ) * ( OM3 * half * P3[3] * ( TMP2 + two * TMP4 ) + ( +half * ( F1[2] * F2[4] ) - half * ( F1[3] * F2[5] ) - F1[4] * F2[2] + F1[5] * F2[3] ) ); + V3[2] = denom * ( -two * cI ) * ( OM3 * -half * P3[0] * ( TMP2 + two * TMP5 ) + ( +half * ( F1[2] * F2[4] + F1[3] * F2[5] ) + F1[4] * F2[2] + F1[5] * F2[3] ) ); + V3[3] = denom * ( -two * cI ) * ( OM3 * -half * P3[1] * ( TMP2 + two * TMP5 ) + ( -half * ( F1[2] * F2[5] + F1[3] * F2[4] ) + F1[4] * F2[3] + F1[5] * F2[2] ) ); + V3[4] = denom * ( two * cI ) * ( OM3 * half * P3[2] * ( TMP2 + two * TMP5 ) + ( half * cI * ( F1[2] * F2[5] ) - half * cI * ( F1[3] * F2[4] ) - cI * ( F1[4] * F2[3] ) + cI * ( F1[5] * F2[2] ) ) ); + V3[5] = denom * ( two * cI ) * ( OM3 * half * P3[3] * ( TMP2 + two * TMP5 ) + ( +half * ( F1[2] * F2[4] ) - half * ( F1[3] * F2[5] ) - F1[4] * F2[2] + F1[5] * F2[3] ) ); mgDebug( 1, __FUNCTION__ ); return; } @@ -1129,7 +1145,9 @@ namespace mg5amcCpu const fptype allF2[], const fptype allV3[], const fptype allCOUP1[], + const double Ccoeff1, const fptype allCOUP2[], + const double Ccoeff2, fptype allvertexes[] ) { mgDebug( 0, __FUNCTION__ ); @@ -1142,9 +1160,9 @@ namespace mg5amcCpu const cxtype cI = cxmake( 0., 1. ); constexpr fptype one( 1. ); constexpr fptype two( 2. ); - const cxtype_sv TMP1 = ( F1[2] * ( F2[4] * ( V3[2] + V3[5] ) + F2[5] * ( V3[3] + cI * V3[4] ) ) + F1[3] * ( F2[4] * ( V3[3] - cI * V3[4] ) + F2[5] * ( V3[2] - V3[5] ) ) ); - const cxtype_sv TMP3 = ( F1[4] * ( F2[2] * ( V3[2] - V3[5] ) - F2[3] * ( V3[3] + cI * V3[4] ) ) + F1[5] * ( F2[2] * ( -V3[3] + cI * V3[4] ) + F2[3] * ( V3[2] + V3[5] ) ) ); - ( *vertex ) = ( -one ) * ( COUP2 * ( +cI * TMP1 + ( two * cI ) * TMP3 ) + cI * ( TMP1 * COUP1 ) ); + const cxtype_sv TMP3 = ( F1[2] * ( F2[4] * ( V3[2] + V3[5] ) + F2[5] * ( V3[3] + cI * V3[4] ) ) + F1[3] * ( F2[4] * ( V3[3] - cI * V3[4] ) + F2[5] * ( V3[2] - V3[5] ) ) ); + const cxtype_sv TMP4 = ( F1[4] * ( F2[2] * ( V3[2] - V3[5] ) - F2[3] * ( V3[3] + cI * V3[4] ) ) + F1[5] * ( F2[2] * ( -V3[3] + cI * V3[4] ) + F2[3] * ( V3[2] + V3[5] ) ) ); + ( *vertex ) = ( -one ) * ( Ccoeff2*COUP2 * ( +cI * TMP3 + ( two * cI ) * TMP4 ) + cI * ( TMP3 * Ccoeff1*COUP1 ) ); mgDebug( 1, __FUNCTION__ ); return; } @@ -1157,7 +1175,9 @@ namespace mg5amcCpu FFV2_4_3( const fptype allF1[], const fptype allF2[], const fptype allCOUP1[], + const double Ccoeff1, const fptype allCOUP2[], + const double Ccoeff2, const fptype M3, const fptype W3, fptype allV3[] ) @@ -1177,12 +1197,12 @@ namespace mg5amcCpu constexpr fptype two( 2. ); constexpr fptype half( 1. / 2. ); const cxtype_sv TMP2 = ( F1[2] * ( F2[4] * ( P3[0] + P3[3] ) + F2[5] * ( P3[1] + cI * P3[2] ) ) + F1[3] * ( F2[4] * ( P3[1] - cI * P3[2] ) + F2[5] * ( P3[0] - P3[3] ) ) ); - const cxtype_sv TMP4 = ( F1[4] * ( F2[2] * ( P3[0] - P3[3] ) - F2[3] * ( P3[1] + cI * P3[2] ) ) + F1[5] * ( F2[2] * ( -P3[1] + cI * P3[2] ) + F2[3] * ( P3[0] + P3[3] ) ) ); + const cxtype_sv TMP5 = ( F1[4] * ( F2[2] * ( P3[0] - P3[3] ) - F2[3] * ( P3[1] + cI * P3[2] ) ) + F1[5] * ( F2[2] * ( -P3[1] + cI * P3[2] ) + F2[3] * ( P3[0] + P3[3] ) ) ); const cxtype_sv denom = one / ( ( P3[0] * P3[0] ) - ( P3[1] * P3[1] ) - ( P3[2] * P3[2] ) - ( P3[3] * P3[3] ) - M3 * ( M3 - cI * W3 ) ); - V3[2] = denom * ( -two * cI ) * ( COUP2 * ( OM3 * -half * P3[0] * ( TMP2 + two * TMP4 ) + ( +half * ( F1[2] * F2[4] + F1[3] * F2[5] ) + F1[4] * F2[2] + F1[5] * F2[3] ) ) + half * ( COUP1 * ( F1[2] * F2[4] + F1[3] * F2[5] - P3[0] * OM3 * TMP2 ) ) ); - V3[3] = denom * ( -two * cI ) * ( COUP2 * ( OM3 * -half * P3[1] * ( TMP2 + two * TMP4 ) + ( -half * ( F1[2] * F2[5] + F1[3] * F2[4] ) + F1[4] * F2[3] + F1[5] * F2[2] ) ) - half * ( COUP1 * ( F1[2] * F2[5] + F1[3] * F2[4] + P3[1] * OM3 * TMP2 ) ) ); - V3[4] = denom * cI * ( COUP2 * ( OM3 * P3[2] * ( TMP2 + two * TMP4 ) + ( +cI * ( F1[2] * F2[5] ) - cI * ( F1[3] * F2[4] ) + ( -two * cI ) * ( F1[4] * F2[3] ) + ( two * cI ) * ( F1[5] * F2[2] ) ) ) + COUP1 * ( +cI * ( F1[2] * F2[5] ) - cI * ( F1[3] * F2[4] ) + P3[2] * OM3 * TMP2 ) ); - V3[5] = denom * ( two * cI ) * ( COUP2 * ( OM3 * half * P3[3] * ( TMP2 + two * TMP4 ) + ( +half * ( F1[2] * F2[4] ) - half * ( F1[3] * F2[5] ) - F1[4] * F2[2] + F1[5] * F2[3] ) ) + half * ( COUP1 * ( F1[2] * F2[4] + P3[3] * OM3 * TMP2 - F1[3] * F2[5] ) ) ); + V3[2] = denom * ( -two * cI ) * ( Ccoeff2*COUP2 * ( OM3 * -half * P3[0] * ( TMP2 + two * TMP5 ) + ( +half * ( F1[2] * F2[4] + F1[3] * F2[5] ) + F1[4] * F2[2] + F1[5] * F2[3] ) ) + half * ( Ccoeff1*COUP1 * ( F1[2] * F2[4] + F1[3] * F2[5] - P3[0] * OM3 * TMP2 ) ) ); + V3[3] = denom * ( -two * cI ) * ( Ccoeff2*COUP2 * ( OM3 * -half * P3[1] * ( TMP2 + two * TMP5 ) + ( -half * ( F1[2] * F2[5] + F1[3] * F2[4] ) + F1[4] * F2[3] + F1[5] * F2[2] ) ) - half * ( Ccoeff1*COUP1 * ( F1[2] * F2[5] + F1[3] * F2[4] + P3[1] * OM3 * TMP2 ) ) ); + V3[4] = denom * cI * ( Ccoeff2*COUP2 * ( OM3 * P3[2] * ( TMP2 + two * TMP5 ) + ( +cI * ( F1[2] * F2[5] ) - cI * ( F1[3] * F2[4] ) + ( -two * cI ) * ( F1[4] * F2[3] ) + ( two * cI ) * ( F1[5] * F2[2] ) ) ) + Ccoeff1*COUP1 * ( +cI * ( F1[2] * F2[5] ) - cI * ( F1[3] * F2[4] ) + P3[2] * OM3 * TMP2 ) ); + V3[5] = denom * ( two * cI ) * ( Ccoeff2*COUP2 * ( OM3 * half * P3[3] * ( TMP2 + two * TMP5 ) + ( +half * ( F1[2] * F2[4] ) - half * ( F1[3] * F2[5] ) - F1[4] * F2[2] + F1[5] * F2[3] ) ) + half * ( Ccoeff1*COUP1 * ( F1[2] * F2[4] + P3[3] * OM3 * TMP2 - F1[3] * F2[5] ) ) ); mgDebug( 1, __FUNCTION__ ); return; } diff --git a/epochX/cudacpp/ee_mumu.sa/src/cudacpp_src.mk b/epochX/cudacpp/ee_mumu.sa/src/cudacpp_src.mk index 554d7a704c..750986464e 100644 --- a/epochX/cudacpp/ee_mumu.sa/src/cudacpp_src.mk +++ b/epochX/cudacpp/ee_mumu.sa/src/cudacpp_src.mk @@ -1,7 +1,7 @@ # Copyright (C) 2020-2023 CERN and UCLouvain. # Licensed under the GNU Lesser General Public License (version 3 or later). # Created by: S. Roiser (Feb 2020) for the MG5aMC CUDACPP plugin. -# Further modified by: O. Mattelaer, S. Roiser, A. Valassi (2020-2023) for the MG5aMC CUDACPP plugin. +# Further modified by: J. Teig, O. Mattelaer, S. Roiser, A. Valassi (2020-2023) for the MG5aMC CUDACPP plugin. #=== Determine the name of this makefile (https://ftp.gnu.org/old-gnu/Manuals/make-3.80/html_node/make_17.html) #=== NB: assume that the same name (e.g. cudacpp.mk, Makefile...) is used in the Subprocess and src directories @@ -88,50 +88,52 @@ CXXFLAGS += $(OMPFLAGS) # Set the build flags appropriate to each AVX choice (example: "make AVX=none") # [NB MGONGPU_PVW512 is needed because "-mprefer-vector-width=256" is not exposed in a macro] # [See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96476] -$(info AVX=$(AVX)) -ifeq ($(UNAME_P),ppc64le) - ifeq ($(AVX),sse4) - override AVXFLAGS = -D__SSE4_2__ # Power9 VSX with 128 width (VSR registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on PowerPC for the moment) - endif -else ifeq ($(UNAME_P),arm) - ifeq ($(AVX),sse4) - override AVXFLAGS = -D__SSE4_2__ # ARM NEON with 128 width (Q/quadword registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on ARM for the moment) - endif -else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 - ifeq ($(AVX),none) - override AVXFLAGS = -mno-sse3 # no SIMD - else ifeq ($(AVX),sse4) - override AVXFLAGS = -mno-avx # SSE4.2 with 128 width (xmm registers) - else ifeq ($(AVX),avx2) - override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(AVX),512y) - override AVXFLAGS = -march=skylake -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(AVX),512z) - override AVXFLAGS = -march=skylake -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) +ifeq ($(NVCC),) + $(info AVX=$(AVX)) + ifeq ($(UNAME_P),ppc64le) + ifeq ($(AVX),sse4) + override AVXFLAGS = -D__SSE4_2__ # Power9 VSX with 128 width (VSR registers) + else ifneq ($(AVX),none) + $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on PowerPC for the moment) + endif + else ifeq ($(UNAME_P),arm) + ifeq ($(AVX),sse4) + override AVXFLAGS = -D__SSE4_2__ # ARM NEON with 128 width (Q/quadword registers) + else ifneq ($(AVX),none) + $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on ARM for the moment) + endif + else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 + ifeq ($(AVX),none) + override AVXFLAGS = -mno-sse3 # no SIMD + else ifeq ($(AVX),sse4) + override AVXFLAGS = -mno-avx # SSE4.2 with 128 width (xmm registers) + else ifeq ($(AVX),avx2) + override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] + else ifeq ($(AVX),512y) + override AVXFLAGS = -march=skylake -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] + else ifeq ($(AVX),512z) + override AVXFLAGS = -march=skylake -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) + else + $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) + endif else - $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) - endif -else - ifeq ($(AVX),none) - override AVXFLAGS = -march=x86-64 # no SIMD (see #588) - else ifeq ($(AVX),sse4) - override AVXFLAGS = -march=nehalem # SSE4.2 with 128 width (xmm registers) - else ifeq ($(AVX),avx2) - override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(AVX),512y) - override AVXFLAGS = -march=skylake-avx512 -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(AVX),512z) - override AVXFLAGS = -march=skylake-avx512 -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) + ifeq ($(AVX),none) + override AVXFLAGS = -march=x86-64 # no SIMD (see #588) + else ifeq ($(AVX),sse4) + override AVXFLAGS = -march=nehalem # SSE4.2 with 128 width (xmm registers) + else ifeq ($(AVX),avx2) + override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] + else ifeq ($(AVX),512y) + override AVXFLAGS = -march=skylake-avx512 -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] + else ifeq ($(AVX),512z) + override AVXFLAGS = -march=skylake-avx512 -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) + else ifneq ($(AVX),none) + $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) + endif endif + # For the moment, use AVXFLAGS everywhere: eventually, use them only in encapsulated implementations? + CXXFLAGS+= $(AVXFLAGS) endif -# For the moment, use AVXFLAGS everywhere: eventually, use them only in encapsulated implementations? -CXXFLAGS+= $(AVXFLAGS) # Set the build flags appropriate to each FPTYPE choice (example: "make FPTYPE=f") ###$(info FPTYPE=$(FPTYPE)) @@ -175,11 +177,19 @@ endif # Build directory "short" tag (defines target and path to the optional build directory) # (Rationale: keep directory names shorter, e.g. do not include random number generator choice) -override DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) +ifneq ($(NVCC),) + override DIRTAG = cuda_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) +else + override DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) +endif # Build lockfile "full" tag (defines full specification of build options that cannot be intermixed) # (Rationale: avoid mixing of CUDA and no-CUDA environment builds with different random number generators) -override TAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) +ifneq ($(NVCC),) + override TAG = cuda_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) +else + override TAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) +endif # Build directory: current directory by default, or build.$(DIRTAG) if USEBUILDDIR==1 ###$(info Current directory is $(shell pwd)) @@ -216,35 +226,21 @@ endif MG5AMC_COMMONLIB = mg5amc_common # First target (default goal) -all.$(TAG): $(BUILDDIR)/.build.$(TAG) $(LIBDIR)/.build.$(TAG) $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so +all.$(TAG): $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so # Target (and build options): debug debug: OPTFLAGS = -g -O0 debug: all.$(TAG) -# Target: tag-specific build lockfiles -override oldtagsb=`if [ -d $(BUILDDIR) ]; then find $(BUILDDIR) -maxdepth 1 -name '.build.*' ! -name '.build.$(TAG)' -exec echo $(shell pwd)/{} \; ; fi` -override oldtagsl=`if [ -d $(LIBDIR) ]; then find $(LIBDIR) -maxdepth 1 -name '.build.*' ! -name '.build.$(TAG)' -exec echo $(shell pwd)/{} \; ; fi` - -$(BUILDDIR)/.build.$(TAG): $(LIBDIR)/.build.$(TAG) - -$(LIBDIR)/.build.$(TAG): - @if [ "$(oldtagsl)" != "" ]; then echo -e "Cannot build for tag=$(TAG) as old builds exist in $(LIBDIR) for other tags:\n$(oldtagsl)\nPlease run 'make clean' first\nIf 'make clean' is not enough: run 'make clean USEBUILDDIR=1 AVX=$(AVX) FPTYPE=$(FPTYPE)' or 'make cleanall'"; exit 1; fi - @if [ "$(oldtagsb)" != "" ]; then echo -e "Cannot build for tag=$(TAG) as old builds exist in $(BUILDDIR) for other tags:\n$(oldtagsb)\nPlease run 'make clean' first\nIf 'make clean' is not enough: run 'make clean USEBUILDDIR=1 AVX=$(AVX) FPTYPE=$(FPTYPE)' or 'make cleanall'"; exit 1; fi - @if [ ! -d $(LIBDIR) ]; then echo "mkdir -p $(LIBDIR)"; mkdir -p $(LIBDIR); fi - @touch $(LIBDIR)/.build.$(TAG) - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - @touch $(BUILDDIR)/.build.$(TAG) - #------------------------------------------------------------------------------- # Generic target and build rules: objects from C++ compilation -$(BUILDDIR)/%.o : %.cc *.h $(BUILDDIR)/.build.$(TAG) +$(BUILDDIR)/%.o : %.cc *.h @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi $(CXX) $(CPPFLAGS) $(CXXFLAGS) -fPIC -c $< -o $@ # Generic target and build rules: objects from CUDA compilation -$(BUILDDIR)/%_cu.o : %.cc *.h $(BUILDDIR)/.build.$(TAG) +$(BUILDDIR)/%_cu.o : %.cc *.h @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c -x cu $< -o $@ @@ -271,20 +267,61 @@ endif # Target: clean the builds .PHONY: clean +BUILD_DIRS := $(wildcard build.*) +NUM_BUILD_DIRS := $(words $(BUILD_DIRS)) + clean: ifeq ($(USEBUILDDIR),1) - rm -rf $(LIBDIR) - rm -rf $(BUILDDIR) +ifeq ($(NUM_BUILD_DIRS),1) + $(info USEBUILDDIR=1, only one src build directory found.) + rm -rf ../lib/$(BUILD_DIRS) + rm -rf $(BUILD_DIRS) +else ifeq ($(NUM_BUILD_DIRS),0) + $(error USEBUILDDIR=1, but no src build directories are found.) else - rm -f $(LIBDIR)/.build.* $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so - rm -f $(BUILDDIR)/.build.* $(BUILDDIR)/*.o $(BUILDDIR)/*.exe + $(error Multiple src BUILDDIR's found! Use 'cleannone', 'cleansse4', 'cleanavx2', 'clean512y','clean512z', 'cleancuda' or 'cleanall'.) +endif +else + rm -f ../lib/lib$(MG5AMC_COMMONLIB).so + rm -f $(BUILDDIR)/*.o $(BUILDDIR)/*.exe endif cleanall: @echo - $(MAKE) clean -f $(THISMK) + rm -f ../lib/lib$(MG5AMC_COMMONLIB).so + rm -f $(BUILDDIR)/*.o $(BUILDDIR)/*.exe @echo - rm -rf $(LIBDIR)/build.* + rm -rf ../lib/build.* rm -rf build.* +# Target: clean different builds + +cleannone: + rm -rf ../lib/build.none_* + rm -rf build.none_* + +cleansse4: + rm -rf ../lib/build.sse4_* + rm -rf build.sse4_* + +cleanavx2: + rm -rf ../lib/build.avx2_* + rm -rf build.avx2_* + +clean512y: + rm -rf ../lib/build.512y_* + rm -rf build.512y_* + +clean512z: + rm -rf ../lib/build.512z_* + rm -rf build.512z_* + +cleancuda: + rm -rf ../lib/build.cuda_* + rm -rf build.cuda_* + +cleandir: + rm -f ./*.o ./*.exe + rm -f ../lib/lib$(MG5AMC_COMMONLIB).so + #------------------------------------------------------------------------------- diff --git a/epochX/cudacpp/gg_tt.mad/Cards/delphes_trigger.dat b/epochX/cudacpp/gg_tt.mad/Cards/delphes_trigger.dat new file mode 100644 index 0000000000..0aab0677aa --- /dev/null +++ b/epochX/cudacpp/gg_tt.mad/Cards/delphes_trigger.dat @@ -0,0 +1,20 @@ +#TRIGGER CARD # DO NOT REMOVE THIS IS A TAG! + +# list of trigger algorithms +# trigger_name >> algorithm #comments +Inclusive electron >> ELEC1_PT: '29' +di-electron >> ELEC1_PT: '17' && ELEC2_PT: '17' +Inclusive Photon >> GAMMA1_PT: '80' +di-Photon >> GAMMA1_PT: '40' && GAMMA2_PT: '25' +Inclusive muon >> MUON1_PT: '19' +di-muon >> MUON1_PT: '7' && MUON2_PT: '7' +Taujet and ETmis >> TAU1_PT: '86' && ETMIS_PT: '65' +di-Taujets >> TAU1_PT: '59' && TAU2_PT: '59' +Jet and ETmis >> JET1_PT: '180' && ETMIS_PT: '123' +Taujet and electron >> TAU1_PT: '45' && ELEC1_PT: '19' +Taujet and muon >> TAU1_PT: '40' && ELEC1_PT: '15' +Inclusive b-jet >> Bjet1_PT: '237' +Inclusive 1 jet >> JET1_PT: '657' +Inclusive 3 jets >> JET1_PT: '247' && JET2_PT: '247' && JET3_PT: '247' +Inclusive 4 jets >> JET1_PT: '113' && JET2_PT: '113' && JET3_PT: '113' && JET4_PT: '113' + diff --git a/epochX/cudacpp/gg_tt.mad/Cards/me5_configuration.txt b/epochX/cudacpp/gg_tt.mad/Cards/me5_configuration.txt index 27acb12a1e..8a0c1e6345 100644 --- a/epochX/cudacpp/gg_tt.mad/Cards/me5_configuration.txt +++ b/epochX/cudacpp/gg_tt.mad/Cards/me5_configuration.txt @@ -234,7 +234,7 @@ # pineappl = pineappl -mg5_path = /data/stephan/madgraph4gpu/MG5aMC/mg5amcnlo +mg5_path = /afs/cern.ch/work/j/jteig/madgraph4gpu/MG5aMC/mg5amcnlo # MG5 MAIN DIRECTORY -mg5_path = /data/stephan/madgraph4gpu/MG5aMC/mg5amcnlo +mg5_path = /afs/cern.ch/work/j/jteig/madgraph4gpu/MG5aMC/mg5amcnlo diff --git a/epochX/cudacpp/gg_tt.mad/Cards/plot_card.dat b/epochX/cudacpp/gg_tt.mad/Cards/plot_card.dat new file mode 100644 index 0000000000..9abe1cc05e --- /dev/null +++ b/epochX/cudacpp/gg_tt.mad/Cards/plot_card.dat @@ -0,0 +1,203 @@ +#************************************************************************** +# Card for MadAnalysis * +# * +# This file is used to set the classes and options for * +# the MadAnalysis program. * +# * +# * +# Some comments about the classes * +# 1. Plots are for classes of particles. * +# 2. Each particle is identified by its PDG code. * +# 3. Classes names are arbitrary (4 symbols max, no spaces allowed). * +# 4. Particles in the same class will be ordered with the 'ordering * +# function' in the file in_func.f. * +# 5. Classes can be added/edited/removed at will, and given a name * +# that will then appear in the plots. * +# 6. A particle can be put in one class only. Putting a particle in * +# two or more classes can lead to double counting of events. * +# 7. The class name mET is missing Energy and its name is reserved. * +# If used, it must be put last in the classes list below. * +# 8. If events contain particles not belonging to an existing class, * +# a new class will automatically be generated. * +# 9. For LHCO events the PDG code 21 is assigned to a jet (not * +# b-tagged), 5 to a b-tagged jet and 12 to missing ET. * +# * +# * +# Some comments about the cuts * +# 1. In the file kin_func.f the functions on which cuts can be applied * +# are given. * +# 2. The syntax is as follows. * +# etmin 1 3 30d0 * +# means that from the first class the Et of the first three particles * +# has to be greater than 30 GeV. * +# * +# etmissmin 20d0 * +# means that there must be at least 20 GeV of missing Et * +# * +# dRmin 2 1 4 3 3d0 * +# means that the distance between the first particle in the second * +# class and the first three particles in the fourth class has to be * +# greater than 3. * +# * +# ptmax 1 3 10d0 * +# ptmax 1 2 15d0 * +# means that the maximum pt of the third particle in the first class * +# has to smaller than 10 GeV, and the first two particles of this * +# class has to be smaller than 15 GeV * +# 3. The ordering of the particles within a class can be set with the * +# 'ordering function' in the file kin_func.f. * +# 4. For all the 'min' cuts, an event will be thrown away if the particle * +# does not exist. On the other hand, for all the 'max' cuts the cut * +# will be ignored if the particle does not exist * +# (Only dRij is an exception, for which it is the other way around) * +# * +# * +# * +# Some comments about the plotting options * +# 1. In the file kin_func.f the functions can be found that can be * +# plotted. (only for off-line usage) * +# 2. With the plotting options one can set the number of plots for each * +# of these functions. * +# 3. One has to specify for each variable which particles from which * +# class are used to set the plots. Syntax: * +# et 2 4 * +# means that the transverse energy of the first four particles in the * +# second class will be plotted. * +# mij 1 3 * +# mij 2 2 * +# means that for the invariant mass plots the first three particles * +# from the first class and the first two from the second class will be * +# used to plot the invariant mass of two particles. (10 plots) * +# 4. The ordering of the particles in a class can be set with the * +# 'ordering_function'. pt, e and et are valid functions. (For off-line * +# users X1, X2 and X3 can also be used, if defined in kin_func.f.) * +# 5. Max number of plots is 200. * +# * +# * +#************************************************************************** +# Put here your list of classes +#************************************************************************** +# Do NOT put spaces before class names! +# Begin Classes # This is TAG. Do not modify this line +jet 1 -1 2 -2 3 -3 4 -4 21 # Class number 1 +b 5 -5 # Class number 2 +mET 12 -12 14 -14 16 -16 1000022 # Missing ET class, name is reserved +# End Classes # This is TAG. Do not modify this line +#************************************************************************** +ordering_function pt # orders particles in classes according to their pt +normalization xsec # histogram normalization, xsec or number (e.g. 1) +#************************************************************************** +# Put here list of minimum pt for the classes +#************************************************************************** +# Begin Minpts # This is TAG. Do not modify this line +#1 30 +#2 40 +#3 10 +# End Minpts # This is TAG. Do not modify this line +#************************************************************************** +# Cuts on plotted events +#************************************************************************** +# Modify the cuts and remove the pounds/hashes to apply those cuts +# Do NOT put spaces at the beginning of the following lines! +# Begin Cuts # This is TAG. Do not modify this line +#etmin 2 2 40d0 +#etmin 2 1 80d0 +#etmin 1 3 20d0 +#etmax 2 1 200d0 +#ptmin 3 1 0d0 +#etmissmin 20d0 +#etmissmax 80d0 +#etamax 1 1 1d0 +#etamax 2 1 2d0 +#etamin 2 2 1.5d0 +#etamin 2 1 2d0 +#mijmax 2 1 2 2 200d0 +#mijmin 2 1 2 2 100d0 +#X1min 2 1 40d0 +#X1max 2 2 50d0 +#dRijmin 2 1 2 2 0.7d0 +#dRijmax 1 3 2 2 0.7d0 +#XY1min 2 2 2 2 20d0 +#XYZA2max 2 2 2 2 4 1 5 1 40d0 +# End Cuts # This is TAG. Do not modify this line +#************************************************************************** +# Put here the required plots +#************************************************************************** +# Do NOT put spaces at the beginning of the following lines! +# Begin PlotDefs # This is TAG. Do not modify this line +pt 1 4 # plot pt for the first four particles in class 1 +pt 2 4 # plot pt for the first four particles in class 2 +pt 3 4 # plot pt for the first four particles in class 3 +pt 4 4 # plot pt for the first four particles in class 4 +pt 5 4 # etc. +pt 6 4 +pt 7 4 +#e 2 2 +y 1 4 # plot rapidity for the first four particles in class 1 +y 2 4 +y 3 4 +y 4 4 +y 5 4 +y 6 4 +y 7 4 +#eta 2 2 # plot pseudo-rapidity for the first two part in the 2nd class +#mom 4 1 +#costh 5 1 +#phi 2 2 +#delta_eta 2 2 +#delta_eta 4 1 +mij 1 4 # use the first four particles in the 1st class to plot inv. mass +mij 2 2 # use the first two particles from the second class as well +mij 3 1 # etc. +mij 4 1 +mij 5 1 +mij 6 1 +mij 7 1 +#cosij 1 2 +#cosij 2 2 +#cosij 3 1 +#cosij 4 1 +dRij 1 4 +dRij 2 2 +dRij 3 1 +dRij 4 1 +dRij 5 1 +dRij 6 1 +dRij 7 1 +#delta_phi 2 2 +#delta_phi 4 1 +#delta_phi 5 1 +#X1 2 2 # plot X1 (defined in kin_func.f) +#XYZA1 2 2 +#XYZA1 4 1 +#XYZA1 5 1 +# End PlotDefs # This is TAG. Do not modify this line +#************************************************************************** +#************************************************************************** +# Put here the plot ranges +#************************************************************************** +# Do NOT put spaces at the beginning of the following lines! +# Begin PlotRange # This is TAG. Do not modify this line +pt 10 0 500 # bin size, min value, max value +et 10 0 500 # bin size, min value, max value +etmiss 10 0 500 # bin size, min value, max value +ht 20 0 1500 +y 0.2 -5 5 # etc. +mij 20 0 1500 +dRij 0.1 0 5 +#delta_phi 0.1 0 3.1 +#X1 1 0 100 +#XYZA1 1 0 100 +# End PlotRange # This is TAG. Do not modify this line +#************************************************************************** +#************************************************************************** +# Output for plots +#************************************************************************** +# Do NOT put spaces at the beginning of the following lines! +# Begin PlotOutput # This is TAG. Do not modify this line +output topdrawer # set to topdrawer or gnuplot +plot_decayed no # plot (and cut) dec. res.? (Only for LHE events) +# End PlotOutput # This is TAG. Do not modify this line +#************************************************************************** +# +# diff --git a/epochX/cudacpp/gg_tt.mad/Cards/run_card.dat b/epochX/cudacpp/gg_tt.mad/Cards/run_card.dat index 80d07f317e..48d84c73f0 100644 --- a/epochX/cudacpp/gg_tt.mad/Cards/run_card.dat +++ b/epochX/cudacpp/gg_tt.mad/Cards/run_card.dat @@ -77,7 +77,7 @@ #********************************************************************* 0 = nhel ! using helicities importance sampling or not. ! 0: sum over helicity, 1: importance sampling - 1 = sde_strategy ! default integration strategy (hep-ph/2021.00773) + 2 = sde_strategy ! default integration strategy (hep-ph/2021.00773) ! 1 is old strategy (using amp square) ! 2 is new strategy (using only the denominator) # To see advanced option for Phase-Space optimization: type "update psoptim" @@ -139,13 +139,3 @@ # systematics = systematics_program ! none, systematics [python], SysCalc [depreceted, C++] ['--mur=0.5,1,2', '--muf=0.5,1,2', '--pdf=errorset'] = systematics_arguments ! see: https://cp3.irmp.ucl.ac.be/projects/madgraph/wiki/Systematics#Systematicspythonmodule - -#********************************************************************* -# Options for the cudacpp plugin -#********************************************************************* - -# Set cudacpp-specific values of non-cudacpp-specific options --O3 -ffast-math -fbounds-check = global_flag ! build flags for Fortran code (for a fair comparison to cudacpp) - -# New cudacpp-specific options (default values are defined in banner.py) -CPP = cudacpp_backend ! valid backends are FORTRAN, CPP, CUDA diff --git a/epochX/cudacpp/gg_tt.mad/Source/DHELAS/aloha_file.inc b/epochX/cudacpp/gg_tt.mad/Source/DHELAS/aloha_file.inc index 3a21194b00..eaf8cc8601 100644 --- a/epochX/cudacpp/gg_tt.mad/Source/DHELAS/aloha_file.inc +++ b/epochX/cudacpp/gg_tt.mad/Source/DHELAS/aloha_file.inc @@ -1 +1 @@ -ALOHARoutine = FFV1_0.o FFV1_1.o FFV1_2.o VVV1P0_1.o +ALOHARoutine = VVV1P0_1.o FFV1_0.o FFV1_1.o FFV1_2.o diff --git a/epochX/cudacpp/gg_tt.mad/Source/PDF/pdfwrap_lhapdf.f b/epochX/cudacpp/gg_tt.mad/Source/PDF/pdfwrap_lhapdf.f index 0be926e6cd..3f36905346 100644 --- a/epochX/cudacpp/gg_tt.mad/Source/PDF/pdfwrap_lhapdf.f +++ b/epochX/cudacpp/gg_tt.mad/Source/PDF/pdfwrap_lhapdf.f @@ -5,6 +5,7 @@ SUBROUTINE PDFWRAP C INCLUDE 'pdf.inc' INCLUDE '../alfas.inc' + INCLUDE '../vector.inc' INCLUDE '../coupl.inc' REAL*8 ZMASS DATA ZMASS/91.188D0/ diff --git a/epochX/cudacpp/gg_tt.mad/Source/make_opts b/epochX/cudacpp/gg_tt.mad/Source/make_opts index bd3c24228d..2607530b78 100644 --- a/epochX/cudacpp/gg_tt.mad/Source/make_opts +++ b/epochX/cudacpp/gg_tt.mad/Source/make_opts @@ -1,17 +1,11 @@ -pdlabel1= -pdlabel2= -lhapdf= -PYTHIA8_PATH=NotInstalled -MG5AMC_VERSION=3.5.0_lo_vect -GLOBAL_FLAG=-O3 -ffast-math -fbounds-check -ALOHA_FLAG= -MATRIX_FLAG= DEFAULT_CPP_COMPILER=g++ MACFLAG= STDLIB=-lstdc++ STDLIB_FLAG= DEFAULT_F_COMPILER=gfortran -DEFAULT_F2PY_COMPILER=f2py3 +DEFAULT_F2PY_COMPILER=f2py3.9 +MG5AMC_VERSION=SpecifiedByMG5aMCAtRunTime +PYTHIA8_PATH=NotInstalled #end_of_make_opts_variables BIASLIBDIR=../../../lib/ diff --git a/epochX/cudacpp/gg_tt.mad/Source/makefile b/epochX/cudacpp/gg_tt.mad/Source/makefile index dbe08b846e..00c73099a0 100644 --- a/epochX/cudacpp/gg_tt.mad/Source/makefile +++ b/epochX/cudacpp/gg_tt.mad/Source/makefile @@ -136,5 +136,7 @@ cleanSource: clean: cleanSource for i in `ls -d ../SubProcesses/P*`; do cd $$i; make clean; cd -; done; -cleanall: cleanSource +cleanavx: + for i in `ls -d ../SubProcesses/P*`; do cd $$i; make cleanavxs; cd -; done; +cleanall: cleanSource # THIS IS THE ONE for i in `ls -d ../SubProcesses/P*`; do cd $$i; make cleanavxs; cd -; done; diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/MatrixElementKernels.cc b/epochX/cudacpp/gg_tt.mad/SubProcesses/MatrixElementKernels.cc index 30257195b6..cfed7d2af5 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/MatrixElementKernels.cc +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/MatrixElementKernels.cc @@ -112,10 +112,17 @@ namespace mg5amcCpu // See https://community.arm.com/arm-community-blogs/b/operating-systems-blog/posts/runtime-detection-of-cpu-features-on-an-armv8-a-cpu bool ok = true; // this is just an assumption! const std::string tag = "arm neon (128bit as in SSE4.2)"; -#else +#elif defined(__x86_64__) || defined(__i386__) bool known = true; bool ok = __builtin_cpu_supports( "sse4.2" ); const std::string tag = "nehalem (SSE4.2)"; +#else + bool known = false; // __builtin_cpu_supports is not supported + // See https://gcc.gnu.org/onlinedocs/gcc/Basic-PowerPC-Built-in-Functions-Available-on-all-Configurations.html + // See https://stackoverflow.com/q/62783908 + // See https://community.arm.com/arm-community-blogs/b/operating-systems-blog/posts/runtime-detection-of-cpu-features-on-an-armv8-a-cpu + bool ok = true; // this is just an assumption! + const std::string tag = "arm neon (128bit as in SSE4.2)"; #endif #else bool known = true; diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/CPPProcess.cc b/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/CPPProcess.cc index 0afa202e07..64558e76af 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/CPPProcess.cc +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/CPPProcess.cc @@ -246,10 +246,10 @@ namespace mg5amcCpu ixxxxx( momenta, cIPD[0], cHel[ihel][3], -1, w_fp[3], 3 ); - VVV1P0_1( w_fp[0], w_fp[1], COUPs[0], 0., 0., w_fp[4] ); + VVV1P0_1( w_fp[0], w_fp[1], COUPs[0], 1.0, 0., 0., w_fp[4] ); // Amplitude(s) for diagram number 1 - FFV1_0( w_fp[3], w_fp[2], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[2], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -260,10 +260,10 @@ namespace mg5amcCpu // *** DIAGRAM 2 OF 3 *** // Wavefunction(s) for diagram number 2 - FFV1_1( w_fp[2], w_fp[0], COUPs[1], cIPD[0], cIPD[1], w_fp[4] ); + FFV1_1( w_fp[2], w_fp[0], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[4] ); // Amplitude(s) for diagram number 2 - FFV1_0( w_fp[3], w_fp[4], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[4], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 2 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -273,10 +273,10 @@ namespace mg5amcCpu // *** DIAGRAM 3 OF 3 *** // Wavefunction(s) for diagram number 3 - FFV1_2( w_fp[3], w_fp[0], COUPs[1], cIPD[0], cIPD[1], w_fp[4] ); + FFV1_2( w_fp[3], w_fp[0], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[4] ); // Amplitude(s) for diagram number 3 - FFV1_0( w_fp[4], w_fp[2], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[4], w_fp[2], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 3 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -799,8 +799,7 @@ namespace mg5amcCpu { // nprocesses>1 was last observed for "mirror processes" in uux_ttx in the 270 branch (see issue #343 and PRs #360 and #396) constexpr int nprocesses = 1; - static_assert( nprocesses == 1, "Assume nprocesses == 1" ); - // process_id corresponds to the index of DSIG1 Fortran functions (must be 1 because cudacpp is unable to handle DSIG2) + static_assert( nprocesses == 1 || nprocesses == 2, "Assume nprocesses == 1 or 2" ); constexpr int process_id = 1; // code generation source: madevent + cudacpp exporter static_assert( process_id == 1, "Assume process_id == 1" ); } diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/auto_dsig1.f b/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/auto_dsig1.f index 3b24a9924c..0b493ae244 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/auto_dsig1.f +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/auto_dsig1.f @@ -39,6 +39,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C LOCAL VARIABLES C INTEGER I,ITYPE,LP,IPROC + DOUBLE PRECISION QSCALE DOUBLE PRECISION G1 DOUBLE PRECISION G2 DOUBLE PRECISION XPQ(-7:7),PD(0:MAXPROC) @@ -126,11 +127,24 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) IF (ABS(LPP(IB(1))).GE.1) THEN !LP=SIGN(1,LPP(IB(1))) - G1=PDG2PDF(LPP(IB(1)),0, IB(1),XBK(IB(1)),DSQRT(Q2FACT(IB(1)))) + IF (DSQRT(Q2FACT(IB(1))).EQ.0D0) THEN + QSCALE=0D0 + DO I=3,NEXTERNAL + QSCALE=QSCALE+DSQRT(MAX(0D0,(PP(0,I)+PP(3,I))*(PP(0,I) + $ -PP(3,I)))) + ENDDO + QSCALE=QSCALE/2D0 + ELSE + QSCALE=DSQRT(Q2FACT(IB(1))) + ENDIF + G1=PDG2PDF(LPP(IB(1)),0, IB(1),XBK(IB(1)), QSCALE) ENDIF IF (ABS(LPP(IB(2))).GE.1) THEN !LP=SIGN(1,LPP(IB(2))) - G2=PDG2PDF(LPP(IB(2)),0, IB(2),XBK(IB(2)),DSQRT(Q2FACT(IB(2)))) + IF (DSQRT(Q2FACT(IB(2))).NE.0D0) THEN + QSCALE=DSQRT(Q2FACT(IB(2))) + ENDIF + G2=PDG2PDF(LPP(IB(2)),0, IB(2),XBK(IB(2)), QSCALE) ENDIF PD(0) = 0D0 IPROC = 0 diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk index b4cf265525..15669185ad 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk @@ -1,7 +1,7 @@ # Copyright (C) 2020-2023 CERN and UCLouvain. # Licensed under the GNU Lesser General Public License (version 3 or later). # Created by: S. Roiser (Feb 2020) for the MG5aMC CUDACPP plugin. -# Further modified by: O. Mattelaer, S. Roiser, A. Valassi (2020-2023) for the MG5aMC CUDACPP plugin. +# Further modified by: J. Teig, O. Mattelaer, S. Roiser, A. Valassi (2020-2023) for the MG5aMC CUDACPP plugin. #=== Determine the name of this makefile (https://ftp.gnu.org/old-gnu/Manuals/make-3.80/html_node/make_17.html) #=== NB: different names (e.g. cudacpp.mk and cudacpp_src.mk) are used in the Subprocess and src directories diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/dummy_fct.f b/epochX/cudacpp/gg_tt.mad/SubProcesses/dummy_fct.f index 076cf29d67..4f7a204b8f 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/dummy_fct.f +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/dummy_fct.f @@ -32,7 +32,7 @@ logical FUNCTION dummy_cuts(P) LOGICAL IS_A_NU(NEXTERNAL),IS_HEAVY(NEXTERNAL) logical do_cuts(nexternal) COMMON /TO_SPECISA/IS_A_J,IS_A_A,IS_A_L,IS_A_B,IS_A_NU,IS_HEAVY, - . IS_A_ONIUM, do_cuts + & IS_A_ONIUM, do_cuts dummy_cuts=.true. @@ -118,15 +118,16 @@ double precision function user_dynamical_scale(P) C ************************************************************ -C default for the library implementing a dummt bias function +C default for the library implementing a dummy bias function C ************************************************************ subroutine bias_wgt_custom(p, original_weight, bias_weight) - implicit none + implicit none C C Parameters C include 'nexternal.inc' -C + +C C Arguments C double precision p(0:3, nexternal) @@ -161,3 +162,4 @@ subroutine bias_wgt_custom(p, original_weight, bias_weight) return end subroutine bias_wgt_custom + diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile index 27a8c3a83a..093bc84271 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile @@ -116,7 +116,7 @@ SYMMETRY = symmetry.o idenparts.o # Binaries -LDFLAGS+=-Wl,--no-relax # avoid 'failed to convert GOTPCREL relocation' error #458 +#LDFLAGS+=-Wl,--no-relax # avoid 'failed to convert GOTPCREL relocation' error #458 (flag not universal -> skip?) all: $(PROG)_fortran $(CUDACPP_BUILDDIR)/$(PROG)_cpp # also builds $(PROG)_cuda if $(CUDACPP_CULIB) exists (#503) diff --git a/epochX/cudacpp/gg_tt.mad/bin/generate_events b/epochX/cudacpp/gg_tt.mad/bin/generate_events index 107313b25d..5577cc66a0 100755 --- a/epochX/cudacpp/gg_tt.mad/bin/generate_events +++ b/epochX/cudacpp/gg_tt.mad/bin/generate_events @@ -46,7 +46,7 @@ if __debug__ and (not os.path.exists(pjoin(root_path,'../..', 'bin','create_rele sys.path.append(pjoin(root_path,'bin','internal')) import madevent_interface as ME - +import misc as misc import logging import logging.config @@ -160,17 +160,31 @@ if '__main__' == __name__: # Check that python version is valid set_configuration() - argument = sys.argv + argument = sys.argv + + # check for plugin customization of the launch command + launch_interface = ME.MadEventCmdShell + if os.path.exists(pjoin(root_path, 'bin','internal', 'launch_plugin.py')): + with misc.TMP_variable(sys, 'path', sys.path + [pjoin(root_path, 'bin', 'internal')]): + from importlib import reload + try: + reload('launch_plugin') + except Exception as error: + import launch_plugin + launch_interface = launch_plugin.MEINTERFACE + + + try: if '-h' in argument or '--help' in argument: - launch = ME.MadEventCmdShell(me_dir=root_path, force_run=True) + launch = launch_interface(me_dir=root_path, force_run=True) launch.exec_cmd('help generate_events') sys.exit() elif len(argument) > 1 and argument[1] in ['0', '1', '2']: argument = treat_old_argument(argument) with ME.MadEventCmdShell.RunWebHandling(root_path, ): - launch = ME.MadEventCmdShell(me_dir=root_path, force_run=True) + launch = launch_interface(me_dir=root_path, force_run=True) launch.run_cmd('generate_events %s' % ' '.join(argument[1:])) launch.run_cmd('quit') except ME.MadEventAlreadyRunning as message: diff --git a/epochX/cudacpp/gg_tt.mad/bin/internal/banner.py b/epochX/cudacpp/gg_tt.mad/bin/internal/banner.py index 7624b9f557..824815f47b 100755 --- a/epochX/cudacpp/gg_tt.mad/bin/internal/banner.py +++ b/epochX/cudacpp/gg_tt.mad/bin/internal/banner.py @@ -537,7 +537,7 @@ def charge_card(self, tag): self.param_card = param_card_reader.ParamCard(param_card) return self.param_card elif tag == 'mgruncard': - self.run_card = RunCard(self[tag]) + self.run_card = RunCard(self[tag], unknown_warning=False) return self.run_card elif tag == 'mg5proccard': proc_card = self[tag].split('\n') @@ -1002,13 +1002,14 @@ def __init__(self, finput=None, **opt): self.allowed_value = {} self.default_setup() + self.plugin_input(finput) # if input is define read that input if isinstance(finput, (file, str, StringIO.StringIO)): self.read(finput, **opt) - self.plugin_input(finput) + def plugin_input(self, finput=None): @@ -2624,6 +2625,7 @@ class RunCard(ConfigFile): default_include_file = 'run_card.inc' default_autodef_file = 'run.inc' donewarning = [] + include_as_parameter = [] def plugin_input(self, finput): @@ -2670,18 +2672,40 @@ def __new__(cls, finput=None, **opt): elif isinstance(finput, cls): target_class = finput.__class__ elif isinstance(finput, str): + path = finput if '\n' not in finput: finput = open(finput).read() if 'req_acc_FO' in finput: target_class = RunCardNLO else: target_class = RunCardLO + if MADEVENT and os.path.exists(pjoin(MEDIR, 'bin','internal', 'launch_plugin.py')): + with misc.TMP_variable(sys, 'path', sys.path + [pjoin(MEDIR, 'bin', 'internal')]): + from importlib import reload + try: + reload('launch_plugin') + except Exception as error: + import launch_plugin + target_class = launch_plugin.RunCard + elif not MADEVENT and os.path.exists(path.replace('run_card.dat', '../bin/internal/launch_plugin.py')): + misc.sprint('try to use plugin class') + pydir = path.replace('run_card.dat', '../bin/internal/') + with misc.TMP_variable(sys, 'path', sys.path + [pydir]): + from importlib import reload + try: + reload('launch_plugin') + except Exception as error: + import launch_plugin + target_class = launch_plugin.RunCard + else: return None target_class.fill_post_set_from_blocks() - - return super(RunCard, cls).__new__(target_class, finput, **opt) + out = super(RunCard, cls).__new__(target_class, finput, **opt) + if not isinstance(out, RunCard): #should not happen but in presence of missmatch of library loaded. + out.__init__(finput, **opt) + return out else: return super(RunCard, cls).__new__(cls, finput, **opt) @@ -2709,7 +2733,7 @@ def __init__(self, *args, **opts): self.system_default = {} self.display_block = [] # set some block to be displayed - + self.fct_mod = {} # {param: (fct_pointer, *argument, **opts)} self.cut_class = {} self.warned=False @@ -2746,7 +2770,7 @@ def get_lepton_densities(cls): def add_param(self, name, value, fortran_name=None, include=True, hidden=False, legacy=False, cut=False, system=False, sys_default=None, - autodef=False, + autodef=False, fct_mod=None, **opts): """ add a parameter to the card. value is the default value and defines the type (int/float/bool/str) of the input. @@ -2760,6 +2784,7 @@ def add_param(self, name, value, fortran_name=None, include=True, If a path (Source/PDF/pdf.inc) the definition will be added within that file Default is False (does not add the definition) entry added in the run_card will automatically have this on True. + fct_mod: defines a function to run if the parameter is modify in the include file options of **opts: - allowed: list of valid options. '*' means anything else should be allowed. empty list means anything possible as well. @@ -2784,8 +2809,12 @@ def add_param(self, name, value, fortran_name=None, include=True, if autodef: self.definition_path[autodef].append(name) self.user_set.add(name) + # function to trigger if a value is modified in the include file + # main target is action to force correct recompilation (like for compilation flag/...) + if fct_mod: + self.fct_mod[name] = fct_mod - def read(self, finput, consistency=True): + def read(self, finput, consistency=True, unknown_warning=True): """Read the input file, this can be a path to a file, a file object, a str with the content of the file.""" @@ -2793,6 +2822,7 @@ def read(self, finput, consistency=True): if "\n" in finput: finput = finput.split('\n') elif os.path.isfile(finput): + self.path = finput finput = open(finput) else: raise Exception("No such file %s" % finput) @@ -2807,7 +2837,7 @@ def read(self, finput, consistency=True): name = name.lower().strip() if name not in self: #looks like an entry added by a user -> add it nicely - self.add_unknown_entry(name, value) + self.add_unknown_entry(name, value, unknown_warning) else: self.set( name, value, user=True) # parameter not set in the run_card can be set to compatiblity value @@ -2819,7 +2849,7 @@ def read(self, finput, consistency=True): logger.warning(str(error)) else: raise - def add_unknown_entry(self, name, value): + def add_unknown_entry(self, name, value, unknow_warning): """function to add an entry to the run_card when the associated parameter does not exists. This is based on the guess_entry_fromname for the various syntax providing input. This then call add_param accordingly. @@ -2858,7 +2888,7 @@ def add_unknown_entry(self, name, value): raise Exception("dictionary need to have at least one entry") default['dict']['__type__'] = default[self.guess_type_from_value(default_value[0])] - if name not in RunCard.donewarning: + if name not in RunCard.donewarning and unknow_warning: logger.warning("Found unexpected entry in run_card: \"%s\" with value \"%s\".\n"+\ " The type was assigned to %s. \n"+\ " The definition of that variable will %sbe automatically added to fortran file %s\n"+\ @@ -2896,7 +2926,16 @@ def valid_line(self, line, tmp): return False else: return True - + + + def reset_simd(self, old_value, new_value, name, *args, **opts): + raise Exception('pass in reset simd') + + def make_clean(self,old_value, new_value, name, dir): + raise Exception('pass make clean for ', dir) + + def make_Ptouch(self,old_value, new_value, name, reset): + raise Exception('pass Ptouch for ', reset) def write(self, output_file, template=None, python_template=False, write_hidden=False, template_options=None, **opt): @@ -3071,6 +3110,77 @@ def write(self, output_file, template=None, python_template=False, else: output_file.write(text) + def get_last_value_include(self, output_dir): + """For paraeter in self.fct_mod + parse the associate inc file to get the value of the previous run. + We return a dictionary {name: old_value} + if inc file does not exist we will return the current value (i.e. set has no change) + """ + + #remember that + # default_include_file is a class variable + # self.includepath is on the form include_path : [list of param ] + out = {} + + # setup inc_to_parse to be like self.includepath (include_path : [list of param ]) + # BUT only containing the parameter that need to be tracked for the fct_mod option + inc_to_parse = {} + for inc_file, params in self.includepath.items(): + if not inc_file: + continue + if any(p in params for p in self.fct_mod): + inc_to_parse[inc_file] = [name for name in self.includepath[inc_file] if name in self.fct_mod] + + # now loop over the files and ask the associate function + for inc_file, params in inc_to_parse.items(): + if inc_file is True: + inc_file = self.default_include_file + out.update(self.get_value_from_include(inc_file, params, output_dir)) + + return out + + def get_value_from_include(self, path, list_of_params, output_dir): + """for a given include file return the current value of the requested parameter + return a dictionary {name: value} + if path does not exists return the current value in self for all parameter""" + + #WARNING DOES NOT HANDLE LIST/DICT so far + + # handle case where file is missing + if not os.path.exists(pjoin(output_dir,path)): + misc.sprint("include file not existing", pjoin(output_dir,path)) + out = {name: self[name] for name in list_of_params} + + with open(pjoin(output_dir,path), 'r') as fsock: + text = fsock.read() + + for name in list_of_params: + misc.sprint(name, name in self.fortran_name) + misc.sprint(self.fortran_name[name] if name in self.fortran_name[name] else name) + to_track = [self.fortran_name[name] if name in self.fortran_name else name for name in list_of_params] + pattern = re.compile(r"\(?(%(names)s)\s?=\s?([^)]*)\)?" % {'names':'|'.join(to_track)}, re.I) + out = dict(pattern.findall(text)) + misc.sprint(out) + for name in list_of_params: + if name in self.fortran_name: + value = out[self.fortran_name[name]] + del out[self.fortran_name[name]] + out[name] = value + + for name, value in out.items(): + try: + out[name] = self.format_variable(value, type(self[name])) + except Exception: + continue + + if len(out) != len(list_of_params): + misc.sprint(list_of_params) + misc.sprint(to_track) + misc.sprint(self.fortran_name) + misc.sprint(text) + raise Exception + return out + def get_default(self, name, default=None, log_level=None): """return self[name] if exist otherwise default. log control if we @@ -3361,71 +3471,93 @@ def write_include_file(self, output_dir, output_file=None): #ensusre that system only parameter are correctly set self.update_system_parameter_for_include() + value_in_old_include = self.get_last_value_include(output_dir) + + if output_dir: self.write_autodef(output_dir, output_file=None) # check/fix status of customised functions self.edit_dummy_fct_from_file(self["custom_fcts"], os.path.dirname(output_dir)) for incname in self.includepath: - if incname is True: - pathinc = self.default_include_file - elif incname is False: - continue - else: - pathinc = incname + self.write_one_include_file(output_dir, incname, output_file) + + for name,value in value_in_old_include.items(): + if value != self[name]: + self.fct_mod[name][0](value, self[name], name, *self.fct_mod[name][1],**self.fct_mod[name][2]) - if output_file: - fsock = output_file + def write_one_include_file(self, output_dir, incname, output_file=None): + """write one include file at the time""" + + misc.sprint(incname) + if incname is True: + pathinc = self.default_include_file + elif incname is False: + return + else: + pathinc = incname + + if output_file: + fsock = output_file + else: + fsock = file_writers.FortranWriter(pjoin(output_dir,pathinc+'.tmp')) + + + for key in self.includepath[incname]: + #define the fortran name + if key in self.fortran_name: + fortran_name = self.fortran_name[key] else: - fsock = file_writers.FortranWriter(pjoin(output_dir,pathinc+'.tmp')) - for key in self.includepath[incname]: - #define the fortran name - if key in self.fortran_name: - fortran_name = self.fortran_name[key] + fortran_name = key + + if incname in self.include_as_parameter: + fsock.writelines('INTEGER %s\n' % fortran_name) + #get the value with warning if the user didn't set it + value = self.get_default(key) + if hasattr(self, 'mod_inc_%s' % key): + value = getattr(self, 'mod_inc_%s' % key)(value) + # Special treatment for strings containing a list of + # strings. Convert it to a list of strings + if isinstance(value, list): + # in case of a list, add the length of the list as 0th + # element in fortran. Only in case of integer or float + # list (not for bool nor string) + targettype = self.list_parameter[key] + if targettype is bool: + pass + elif targettype is int: + line = '%s(%s) = %s \n' % (fortran_name, 0, self.f77_formatting(len(value))) + fsock.writelines(line) + elif targettype is float: + line = '%s(%s) = %s \n' % (fortran_name, 0, self.f77_formatting(float(len(value)))) + fsock.writelines(line) + # output the rest of the list in fortran + for i,v in enumerate(value): + line = '%s(%s) = %s \n' % (fortran_name, i+1, self.f77_formatting(v)) + fsock.writelines(line) + elif isinstance(value, dict): + for fortran_name, onevalue in value.items(): + line = '%s = %s \n' % (fortran_name, self.f77_formatting(onevalue)) + fsock.writelines(line) + elif isinstance(incname,str) and 'compile' in incname: + if incname in self.include_as_parameter: + line = 'PARAMETER (%s=%s)' %( fortran_name, value) else: - fortran_name = key - - #get the value with warning if the user didn't set it - value = self.get_default(key) - if hasattr(self, 'mod_inc_%s' % key): - value = getattr(self, 'mod_inc_%s' % key)(value) - # Special treatment for strings containing a list of - # strings. Convert it to a list of strings - if isinstance(value, list): - # in case of a list, add the length of the list as 0th - # element in fortran. Only in case of integer or float - # list (not for bool nor string) - targettype = self.list_parameter[key] - if targettype is bool: - pass - elif targettype is int: - line = '%s(%s) = %s \n' % (fortran_name, 0, self.f77_formatting(len(value))) - fsock.writelines(line) - elif targettype is float: - line = '%s(%s) = %s \n' % (fortran_name, 0, self.f77_formatting(float(len(value)))) - fsock.writelines(line) - # output the rest of the list in fortran - for i,v in enumerate(value): - line = '%s(%s) = %s \n' % (fortran_name, i+1, self.f77_formatting(v)) - fsock.writelines(line) - elif isinstance(value, dict): - for fortran_name, onevalue in value.items(): - line = '%s = %s \n' % (fortran_name, self.f77_formatting(onevalue)) - fsock.writelines(line) - elif isinstance(incname,str) and 'compile' in incname: line = '%s = %s \n' % (fortran_name, value) - fsock.write(line) + fsock.write(line) + else: + if incname in self.include_as_parameter: + line = 'PARAMETER (%s=%s)' %( fortran_name, self.f77_formatting(value)) else: line = '%s = %s \n' % (fortran_name, self.f77_formatting(value)) - fsock.writelines(line) - if not output_file: - fsock.close() - path = pjoin(output_dir,pathinc) - if not os.path.exists(path) or not filecmp.cmp(path, path+'.tmp'): - files.mv(path+'.tmp', path) - else: - os.remove(path+'.tmp') - + fsock.writelines(line) + if not output_file: + fsock.close() + path = pjoin(output_dir,pathinc) + if not os.path.exists(path) or not filecmp.cmp(path, path+'.tmp'): + files.mv(path+'.tmp', path) + else: + os.remove(path+'.tmp') def write_autodef(self, output_dir, output_file=None): """ Add the definition of variable to run.inc if the variable is set with autodef. @@ -3764,13 +3896,14 @@ def remove_all_cut(self): %(tmin_for_channel)s = tmin_for_channel ! limit the non-singular reach of --some-- channel of integration related to T-channel diagram (value between -1 and 0), -1 is no impact %(survey_splitting)s = survey_splitting ! for loop-induced control how many core are used at survey for the computation of a single iteration. %(survey_nchannel_per_job)s = survey_nchannel_per_job ! control how many Channel are integrated inside a single job on cluster/multicore - %(refine_evt_by_job)s = refine_evt_by_job ! control the maximal number of events for the first iteration of the refine (larger means less jobs) + %(refine_evt_by_job)s = refine_evt_by_job ! control the maximal number of events for the first iteration of the refine (larger means less jobs) #********************************************************************* -# Compilation flag. No automatic re-compilation (need manual "make clean" in Source) +# Compilation flag. #********************************************************************* %(global_flag)s = global_flag ! fortran optimization flag use for the all code. %(aloha_flag)s = aloha_flag ! fortran optimization flag for aloha function. Suggestions: '-ffast-math' %(matrix_flag)s = matrix_flag ! fortran optimization flag for matrix.f function. Suggestions: '-O3' + %(vector_size)s = vector_size ! size designed for SIMD/OpenMP/GPU (number of events in lockstep) """ template_off = '# To see advanced option for Phase-Space optimization: type "update psoptim"' @@ -3926,9 +4059,12 @@ class RunCardLO(RunCard): "get_dummy_x1_x2": pjoin("SubProcesses","dummy_fct.f"), "dummy_boostframe": pjoin("SubProcesses","dummy_fct.f"), "user_dynamical_scale": pjoin("SubProcesses","dummy_fct.f"), + "bias_wgt_custom": pjoin("SubProcesses","dummy_fct.f"), "user_": pjoin("SubProcesses","dummy_fct.f") # all function starting by user will be added to that file } + include_as_parameter = ['vector.inc'] + if MG5DIR: default_run_card = pjoin(MG5DIR, "internal", "default_run_card_lo.dat") @@ -4162,10 +4298,15 @@ def default_setup(self): self.add_param('hel_splitamp', True, hidden=True, include=False, comment='decide if amplitude aloha call can be splitted in two or not when doing helicity per helicity optimization.') self.add_param('hel_zeroamp', True, hidden=True, include=False, comment='decide if zero amplitude can be removed from the computation when doing helicity per helicity optimization.') self.add_param('SDE_strategy', 1, allowed=[1,2], fortran_name="sde_strat", comment="decide how Multi-channel should behaves \"1\" means full single diagram enhanced (hep-ph/0208156), \"2\" use the product of the denominator") - self.add_param('global_flag', '-O', include=False, hidden=True, comment='global fortran compilation flag, suggestion -fbound-check') - self.add_param('aloha_flag', '', include=False, hidden=True, comment='global fortran compilation flag, suggestion: -ffast-math') - self.add_param('matrix_flag', '', include=False, hidden=True, comment='fortran compilation flag for the matrix-element files, suggestion -O3') - + self.add_param('global_flag', '-O', include=False, hidden=True, comment='global fortran compilation flag, suggestion -fbound-check', + fct_mod=(self.make_clean, ('Source'),{})) + self.add_param('aloha_flag', '', include=False, hidden=True, comment='global fortran compilation flag, suggestion: -ffast-math', + fct_mod=(self.make_clean, ('Source/DHELAS'),{})) + self.add_param('matrix_flag', '', include=False, hidden=True, comment='fortran compilation flag for the matrix-element files, suggestion -O3', + fct_mod=(self.make_Ptouch, ('matrix'),{})) + self.add_param('vector_size', 1, include='vector.inc', hidden=True, comment='lockstep size for parralelism run', + fortran_name='VECSIZE_MEMMAX', fct_mod=(self.reset_simd,(),{})) + # parameter allowing to define simple cut via the pdg # Special syntax are related to those. (can not be edit directly) self.add_param('pt_min_pdg',{'__type__':0.}, include=False, cut=True) @@ -4187,8 +4328,7 @@ def default_setup(self): self.add_param('mxxmin4pdg',[-1.], system=True) self.add_param('mxxpart_antipart', [False], system=True) - # CUDACPP parameters - self.add_param('cudacpp_backend', 'CPP', include=False, hidden=False) + def check_validity(self): """ """ diff --git a/epochX/cudacpp/gg_tt.mad/bin/internal/check_param_card.py b/epochX/cudacpp/gg_tt.mad/bin/internal/check_param_card.py index fe874a06a4..71089d7480 100755 --- a/epochX/cudacpp/gg_tt.mad/bin/internal/check_param_card.py +++ b/epochX/cudacpp/gg_tt.mad/bin/internal/check_param_card.py @@ -85,7 +85,7 @@ def load_str(self, text): self.value= ' '.join(data[len(self.lhacode):]) # check that lhacode are the first entry otherwise return invalid param. if ' '.join([str(i) for i in self.lhacode]) != ' '.join(data[:len(self.lhacode)]): - raise InvalidParam + raise InvalidParam("line was %s" % str(data)) else: self.value = data[-1] diff --git a/epochX/cudacpp/gg_tt.mad/bin/internal/common_run_interface.py b/epochX/cudacpp/gg_tt.mad/bin/internal/common_run_interface.py index 5d0187e3fa..14c7f310dc 100755 --- a/epochX/cudacpp/gg_tt.mad/bin/internal/common_run_interface.py +++ b/epochX/cudacpp/gg_tt.mad/bin/internal/common_run_interface.py @@ -749,13 +749,15 @@ def writeRunWeb(me_dir): class RunWebHandling(object): - def __init__(self, me_dir, crashifpresent=True, warnifpresent=True): + def __init__(self, me_dir, crashifpresent=True, warnifpresent=True, force_run=False): """raise error if RunWeb already exists me_dir is the directory where the write RunWeb""" self.remove_run_web = True self.me_dir = me_dir - + if force_run: + self.remove_run_web = False + return if crashifpresent or warnifpresent: if os.path.exists(pjoin(me_dir, 'RunWeb')): pid = open(pjoin(me_dir, 'RunWeb')).read() @@ -6574,7 +6576,7 @@ def reask(self, *args, **opt): fail_due_to_format = 0 #parameter to avoid infinite loop def postcmd(self, stop, line): - if line not in [None, '0', 'done', '']: + if line not in [None, '0', 'done', '',0]: ending_question = cmd.OneLinePathCompletion.postcmd(self,stop,line) else: ending_question = True @@ -7533,7 +7535,8 @@ def open_file(self, answer): else: raise if time.time() - start < .5: - self.mother_interface.ask("Are you really that fast? If you are using an editor that returns directly. Please confirm that you have finised to edit the file", 'y') + self.mother_interface.ask("Are you really that fast? If you are using an editor that returns directly. Please confirm that you have finised to edit the file", 'y', + timeout=False) self.reload_card(path) def reload_card(self, path): diff --git a/epochX/cudacpp/gg_tt.mad/bin/internal/extended_cmd.py b/epochX/cudacpp/gg_tt.mad/bin/internal/extended_cmd.py index a6a8609dce..2f37070580 100755 --- a/epochX/cudacpp/gg_tt.mad/bin/internal/extended_cmd.py +++ b/epochX/cudacpp/gg_tt.mad/bin/internal/extended_cmd.py @@ -1108,9 +1108,12 @@ def ask(self, question, default, choices=[], path_msg=None, if alias: choices += list(alias.keys()) + + question_instance = obj(question, allow_arg=choices, default=default, mother_interface=self, **opt) - + if fct_timeout is None: + fct_timeout = lambda x: question_instance.postcmd(x, default) if x and default else False if first_cmd: if isinstance(first_cmd, str): question_instance.onecmd(first_cmd) @@ -2271,6 +2274,9 @@ def postcmd(self, stop, line): if n: self.default(line) return self.postcmd(stop, line) + elif self.value is None and line: + self.default(line) + return self.postcmd(stop, line) if not self.casesensitive: for ans in self.allow_arg: if ans.lower() == self.value.lower(): diff --git a/epochX/cudacpp/gg_tt.mad/bin/internal/gen_ximprove.py b/epochX/cudacpp/gg_tt.mad/bin/internal/gen_ximprove.py index 3b8ec31215..a88d60b282 100755 --- a/epochX/cudacpp/gg_tt.mad/bin/internal/gen_ximprove.py +++ b/epochX/cudacpp/gg_tt.mad/bin/internal/gen_ximprove.py @@ -154,10 +154,15 @@ def get_helicity(self, to_submit=True, clean=True): p = misc.Popen(['./gensym'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT, cwd=Pdir) #sym_input = "%(points)d %(iterations)d %(accuracy)f \n" % self.opts + (stdout, _) = p.communicate(''.encode()) stdout = stdout.decode('ascii',errors='ignore') - nb_channel = max([math.floor(float(d)) for d in stdout.split()]) - + try: + nb_channel = max([math.floor(float(d)) for d in stdout.split()]) + except Exception as error: + misc.sprint(stdout, 'no channel or error for %s' % Pdir) + continue + self.cmd.compile(['madevent_forhel'], cwd=Pdir) if not os.path.exists(pjoin(Pdir, 'madevent_forhel')): raise Exception('Error make madevent_forhel not successful') diff --git a/epochX/cudacpp/gg_tt.mad/bin/internal/launch_plugin.py b/epochX/cudacpp/gg_tt.mad/bin/internal/launch_plugin.py new file mode 100644 index 0000000000..23271b846e --- /dev/null +++ b/epochX/cudacpp/gg_tt.mad/bin/internal/launch_plugin.py @@ -0,0 +1,100 @@ + +import logging +import os +import subprocess +pjoin = os.path.join +logger = logging.getLogger('cmdprint') # for stdout + +try: + import madgraph +except ImportError: + import internal.madevent_interface as madevent_interface + import internal.misc as misc + import internal.extended_cmd as extended_cmd + import internal.banner as banner_mod +else: + import madgraph.interface.madevent_interface as madevent_interface + import madgraph.various.misc as misc + import madgraph.interface.extended_cmd as extended_cmd + import madgraph.various.banner as banner_mod + +class CPPMEInterface(madevent_interface.MadEventCmdShell): + + def compile(self, *args, **opts): + """ """ + + import multiprocessing + if not self.options['nb_core'] or self.options['nb_core'] == 'None': + self.options['nb_core'] = multiprocessing.cpu_count() + + if args and args[0][0] == 'madevent' and hasattr(self, 'run_card'): + import pathlib + import os + pjoin = os.path.join + + + + + cudacpp_backend = self.run_card['cudacpp_backend'].upper() # the default value is defined in banner.py + logger.info("Building madevent in madevent_interface.py with '%s' matrix elements"%cudacpp_backend) + if cudacpp_backend == 'FORTRAN': + args[0][0] = 'madevent_fortran_link' + elif cudacpp_backend == 'CPP': + args[0][0] = 'madevent_cpp_link' + elif cudacpp_backend == 'CUDA': + args[0][0] = 'madevent_cuda_link' + else: + raise Exception("Invalid cudacpp_backend='%s': only 'FORTRAN', 'CPP', 'CUDA' are supported") + return misc.compile(nb_core=self.options['nb_core'], *args, **opts) + else: + return misc.compile(nb_core=self.options['nb_core'], *args, **opts) + +class CPPRunCard(banner_mod.RunCardLO): + + def reset_simd(self, old_value, new_value, name): + if not hasattr(self, 'path'): + raise Exception + + if name == "vector_size" and new_value <= int(old_value): + # code can handle the new size -> do not recompile + return + + Sourcedir = pjoin(os.path.dirname(os.path.dirname(self.path)), 'Source') + subprocess.call(['make', 'cleanavx'], cwd=Sourcedir, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) + + def plugin_input(self, finput): + return + + def default_setup(self): + super().default_setup() + self.add_param('cudacpp_backend', 'CPP', include=False, hidden=False) + + + def write_one_include_file(self, output_dir, incname, output_file=None): + """write one include file at the time""" + + if incname == "vector.inc" and 'vector_size' not in self.user_set: + return + super().write_one_include_file(output_dir, incname, output_file) + + + def check_validity(self): + """ensure that PLUGIN information are consistent""" + + super().check_validity() + + if self['SDE_strategy'] != 1: + logger.warning('SDE_strategy different of 1 is not supported with SMD/GPU mode') + self['sde_strategy'] = 1 + + if self['hel_recycling']: + self['hel_recycling'] = False + +class GPURunCard(CPPRunCard): + + def default_setup(self): + super(CPPRunCard, self).default_setup() + self.add_param('cudacpp_backend', 'CUDA', include=False, hidden=False) + +MEINTERFACE = CPPMEInterface +RunCard = CPPRunCard diff --git a/epochX/cudacpp/gg_tt.mad/bin/internal/madevent_interface.py b/epochX/cudacpp/gg_tt.mad/bin/internal/madevent_interface.py index 920e07a926..d722702891 100755 --- a/epochX/cudacpp/gg_tt.mad/bin/internal/madevent_interface.py +++ b/epochX/cudacpp/gg_tt.mad/bin/internal/madevent_interface.py @@ -3796,9 +3796,11 @@ def do_combine_events(self, line): if self.run_card['bias_module'].lower() not in ['dummy', 'none'] and nb_event: self.correct_bias() - + elif self.run_card['custom_fcts']: + self.correct_bias() + logger.info("combine events done in %s", time.time()-start) - + self.to_store.append('event') diff --git a/epochX/cudacpp/gg_tt.mad/bin/internal/run_plot b/epochX/cudacpp/gg_tt.mad/bin/internal/run_plot new file mode 100755 index 0000000000..7deee7ac88 --- /dev/null +++ b/epochX/cudacpp/gg_tt.mad/bin/internal/run_plot @@ -0,0 +1,47 @@ +#!/bin/bash +# +# This runs MadAnalysis on the unweighted_events.lhe +# +# Usage: run_plot run_name [madir [tddir]] +# where madir is the path to the MadAnalysis package + +main=`pwd` + +if [ "$1" != "" ] +then + run=$1 +else + echo "Usage: run_plot runname [MAdir [tddir]]" + exit +fi + +if [ "$2" != "" ] +then + MAdir=$main/$2 +else + MAdir=$main/../../MadAnalysis +fi + +if [ "$3" != "" ]; then + td=$main/$3 +else + td=$main/../../td +fi + +dirbin=$main/../bin + +if [[ $run != "" && -e ${run}_unweighted_events.lhe.gz ]];then + gunzip -c ${run}_unweighted_events.lhe.gz > unweighted_events.lhe +fi + +if [[ (-x $MAdir/plot_events) && (-e unweighted_events.lhe) && (-e ../Cards/plot_card.dat) ]]; then + echo "Creating Plots" + mkdir $run + cd $run + echo "../unweighted_events.lhe" > events.list + $dirbin/plot $MAdir $td > plot.log + cd .. + $dirbin/plot_page-pl $run parton + mv plots.html ${run}_plots.html +fi + diff --git a/epochX/cudacpp/gg_tt.mad/bin/internal/run_plot_delphes b/epochX/cudacpp/gg_tt.mad/bin/internal/run_plot_delphes new file mode 100755 index 0000000000..975f410d0e --- /dev/null +++ b/epochX/cudacpp/gg_tt.mad/bin/internal/run_plot_delphes @@ -0,0 +1,46 @@ +#!/bin/bash +# +# This runs MadAnalysis on the delphes_events.lhco +# +# Usage: run_plot run_name [madir [tddir]] +# where madir is the path to the MadAnalysis package + +main=`pwd` + +if [ "$1" != "" ] +then + run=$1 +else + echo "Usage: run_plot runname [MAdir [tddir]]" + exit +fi + +if [ "$2" != "" ] +then + MAdir=$main/$2 +else + MAdir=$main/../../MadAnalysis +fi + +if [ "$3" != "" ]; then + td=$main/$3 +else + td=$main/../../td +fi + +dirbin=$main/../bin + +if [[ $run != "" && -e ${run}_delphes_events.lhco.gz ]];then + gunzip -c ${run}_delphes_events.lhco.gz > delphes_events.lhco +fi + +if [[ (-x $MAdir/plot_events) && (-e delphes_events.lhco) && (-e ../Cards/plot_card.dat) ]]; then + echo "Creating Plots" + mkdir ${run}_delphes + cd ${run}_delphes + echo "../delphes_events.lhco" > events.list + $dirbin/plot $MAdir $td > plot.log + cd .. + $dirbin/plot_page-pl ${run}_delphes Delphes + mv plots.html ${run}_plots_delphes.html +fi diff --git a/epochX/cudacpp/gg_tt.mad/bin/internal/run_plot_pgs b/epochX/cudacpp/gg_tt.mad/bin/internal/run_plot_pgs new file mode 100755 index 0000000000..e7a36ef344 --- /dev/null +++ b/epochX/cudacpp/gg_tt.mad/bin/internal/run_plot_pgs @@ -0,0 +1,47 @@ +#!/bin/bash +# +# This runs MadAnalysis on the unweighted_events.lhe +# +# Usage: run_plot run_name [madir [tddir]] +# where madir is the path to the MadAnalysis package + +main=`pwd` + +if [ "$1" != "" ] +then + run=$1 +else + echo "Usage: run_plot runname [MAdir [tddir]]" + exit +fi + +if [ "$2" != "" ] +then + MAdir=$main/$2 +else + MAdir=$main/../../MadAnalysis +fi + +if [ "$3" != "" ]; then + td=$main/$3 +else + td=$main/../../td +fi + +dirbin=$main/../bin + +if [[ $run != "" && -e ${run}_pgs_events.lhco.gz ]];then + gunzip -c ${run}_pgs_events.lhco.gz > pgs_events.lhco +fi + +if [[ (-x $MAdir/plot_events) && (-e pgs_events.lhco) && (-e ../Cards/plot_card.dat) ]]; then + echo "Creating Plots" + mkdir ${run}_pgs + cd ${run}_pgs + echo "../pgs_events.lhco" > events.list + $dirbin/plot $MAdir $td > plot.log + cd .. + $dirbin/plot_page-pl ${run}_pgs PGS + mv plots.html ${run}_plots_pgs.html +fi + diff --git a/epochX/cudacpp/gg_tt.mad/bin/internal/run_plot_pythia b/epochX/cudacpp/gg_tt.mad/bin/internal/run_plot_pythia new file mode 100755 index 0000000000..532bfb4b7b --- /dev/null +++ b/epochX/cudacpp/gg_tt.mad/bin/internal/run_plot_pythia @@ -0,0 +1,50 @@ +#!/bin/bash +# +# This runs MadAnalysis on the unweighted_events.lhe +# +# Usage: run_plot run_name [madir [tddir]] +# where madir is the path to the MadAnalysis package + +main=`pwd` + +if [ "$1" != "" ] +then + run=$1 +else + echo "Usage: run_plot runname [MAdir [tddir]]" + exit +fi + +if [ "$2" != "" ] +then + MAdir=$main/$2 +else + MAdir=$main/../../MadAnalysis +fi + +if [ "$3" != "" ]; then + td=$main/$3 +else + td=$main/../../td +fi + +dirbin=$main/../bin/internal + +if [[ $run != "" && -e ${run}_pythia_events.lhe.gz ]];then + gunzip -c ${run}_pythia_events.lhe.gz > pythia_events.lhe +fi + +if [[ (-x $MAdir/plot_events) && (-e pythia_events.lhe) && (-e ../Cards/plot_card.dat) ]]; then + echo "Creating Plots" + mkdir ${run}_pythia + cd ${run}_pythia + echo "../pythia_events.lhe" > events.list + $dirbin/plot $MAdir $td > plot.log + cd .. + $dirbin/plot_page-pl ${run}_pythia Pythia + mv plots.html ${run}_plots_pythia.html + $dirbin/gen_crossxhtml-pl $run +else + echo "Not creating plots" +fi + diff --git a/epochX/cudacpp/gg_tt.mad/bin/madevent b/epochX/cudacpp/gg_tt.mad/bin/madevent index c944aa1faf..dff9711b73 100755 --- a/epochX/cudacpp/gg_tt.mad/bin/madevent +++ b/epochX/cudacpp/gg_tt.mad/bin/madevent @@ -32,6 +32,7 @@ except ImportError: import os +pjoin = os.path.join import optparse # Get the directory of the script real path (bin) @@ -160,13 +161,30 @@ except: pass import internal.madevent_interface as cmd_interface +# check for plugin customization of the launch command +launch_interface = cmd_interface.MadEventCmdShell +if os.path.exists(pjoin(root_path, 'bin','internal', 'launch_plugin.py')): + with misc.TMP_variable(sys, 'path', sys.path + [pjoin(root_path, 'bin', 'internal')]): + from importlib import reload + try: + reload('launch_plugin') + except Exception as error: + import launch_plugin + launch_interface = launch_plugin.MEINTERFACE + + +#Source use this executable for compilation always allow it +force_run = False +if (args and args[0] == 'treatcards'): + force_run=True + # Call the cmd interface main loop try: if '-h' in args or '--help' in args: - launch = ME.MadEventCmdShell(me_dir=os.path.dirname(root_path), force_run=True) + launch = launch_interface(me_dir=os.path.dirname(root_path), force_run=True) launch.exec_cmd('help generate_events') sys.exit(0) - with cmd_interface.MadEventCmdShell.RunWebHandling(os.path.dirname(root_path), ): + with cmd_interface.MadEventCmdShell.RunWebHandling(os.path.dirname(root_path), force_run=force_run): if (args and os.path.isfile(args[0])): # They are an input file input_file = args[0] @@ -178,7 +196,7 @@ try: cmd_line.run_cmd('import command ' + input_file) cmd_line.run_cmd('quit') else: - cmd_line = cmd_interface.MadEventCmdShell(force_run=True) + cmd_line = launch_interface(force_run=True) cmd_line.use_rawinput = False cmd_line.haspiping = False cmd_line.run_cmd('import command ' + input_file) @@ -188,7 +206,7 @@ try: if options.web: cmd_line = cmd_interface.MadEventCmd(force_run=True) else: - cmd_line = cmd_interface.MadEventCmdShell(force_run=True) + cmd_line = launch_interface(force_run=True) if not hasattr(cmd_line, 'do_%s' % args[0]): if parser_error: print( parser_error) diff --git a/epochX/cudacpp/gg_tt.mad/src/HelAmps_sm.h b/epochX/cudacpp/gg_tt.mad/src/HelAmps_sm.h index 94bf8aca52..07d0bfa887 100644 --- a/epochX/cudacpp/gg_tt.mad/src/HelAmps_sm.h +++ b/epochX/cudacpp/gg_tt.mad/src/HelAmps_sm.h @@ -862,6 +862,7 @@ namespace mg5amcCpu VVV1P0_1( const fptype allV2[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, const fptype M1, const fptype W1, fptype allV1[] ) ALWAYS_INLINE; @@ -875,6 +876,7 @@ namespace mg5amcCpu const fptype allF2[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, fptype allvertexes[] ) ALWAYS_INLINE; //-------------------------------------------------------------------------- @@ -885,6 +887,7 @@ namespace mg5amcCpu FFV1_1( const fptype allF2[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, const fptype M1, const fptype W1, fptype allF1[] ) ALWAYS_INLINE; @@ -897,6 +900,7 @@ namespace mg5amcCpu FFV1_2( const fptype allF1[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, const fptype M2, const fptype W2, fptype allF2[] ) ALWAYS_INLINE; @@ -909,6 +913,7 @@ namespace mg5amcCpu VVV1P0_1( const fptype allV2[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, const fptype M1, const fptype W1, fptype allV1[] ) @@ -947,6 +952,7 @@ namespace mg5amcCpu const fptype allF2[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, fptype allvertexes[] ) { mgDebug( 0, __FUNCTION__ ); @@ -970,6 +976,7 @@ namespace mg5amcCpu FFV1_1( const fptype allF2[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, const fptype M1, const fptype W1, fptype allF1[] ) @@ -1001,6 +1008,7 @@ namespace mg5amcCpu FFV1_2( const fptype allF1[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, const fptype M2, const fptype W2, fptype allF2[] ) diff --git a/epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk b/epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk index 42fa1b1fd7..750986464e 100644 --- a/epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk +++ b/epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk @@ -1,7 +1,7 @@ # Copyright (C) 2020-2023 CERN and UCLouvain. # Licensed under the GNU Lesser General Public License (version 3 or later). # Created by: S. Roiser (Feb 2020) for the MG5aMC CUDACPP plugin. -# Further modified by: O. Mattelaer, S. Roiser, A. Valassi (2020-2023) for the MG5aMC CUDACPP plugin. +# Further modified by: J. Teig, O. Mattelaer, S. Roiser, A. Valassi (2020-2023) for the MG5aMC CUDACPP plugin. #=== Determine the name of this makefile (https://ftp.gnu.org/old-gnu/Manuals/make-3.80/html_node/make_17.html) #=== NB: assume that the same name (e.g. cudacpp.mk, Makefile...) is used in the Subprocess and src directories diff --git a/epochX/cudacpp/gg_tt.sa/SubProcesses/MatrixElementKernels.cc b/epochX/cudacpp/gg_tt.sa/SubProcesses/MatrixElementKernels.cc index 30257195b6..cfed7d2af5 100644 --- a/epochX/cudacpp/gg_tt.sa/SubProcesses/MatrixElementKernels.cc +++ b/epochX/cudacpp/gg_tt.sa/SubProcesses/MatrixElementKernels.cc @@ -112,10 +112,17 @@ namespace mg5amcCpu // See https://community.arm.com/arm-community-blogs/b/operating-systems-blog/posts/runtime-detection-of-cpu-features-on-an-armv8-a-cpu bool ok = true; // this is just an assumption! const std::string tag = "arm neon (128bit as in SSE4.2)"; -#else +#elif defined(__x86_64__) || defined(__i386__) bool known = true; bool ok = __builtin_cpu_supports( "sse4.2" ); const std::string tag = "nehalem (SSE4.2)"; +#else + bool known = false; // __builtin_cpu_supports is not supported + // See https://gcc.gnu.org/onlinedocs/gcc/Basic-PowerPC-Built-in-Functions-Available-on-all-Configurations.html + // See https://stackoverflow.com/q/62783908 + // See https://community.arm.com/arm-community-blogs/b/operating-systems-blog/posts/runtime-detection-of-cpu-features-on-an-armv8-a-cpu + bool ok = true; // this is just an assumption! + const std::string tag = "arm neon (128bit as in SSE4.2)"; #endif #else bool known = true; diff --git a/epochX/cudacpp/gg_tt.sa/SubProcesses/P1_Sigma_sm_gg_ttx/CPPProcess.cc b/epochX/cudacpp/gg_tt.sa/SubProcesses/P1_Sigma_sm_gg_ttx/CPPProcess.cc index ea42fb3e96..7f253cd296 100644 --- a/epochX/cudacpp/gg_tt.sa/SubProcesses/P1_Sigma_sm_gg_ttx/CPPProcess.cc +++ b/epochX/cudacpp/gg_tt.sa/SubProcesses/P1_Sigma_sm_gg_ttx/CPPProcess.cc @@ -246,10 +246,10 @@ namespace mg5amcCpu ixxxxx( momenta, cIPD[0], cHel[ihel][3], -1, w_fp[3], 3 ); - VVV1P0_1( w_fp[0], w_fp[1], COUPs[0], 0., 0., w_fp[4] ); + VVV1P0_1( w_fp[0], w_fp[1], COUPs[0], 1.0, 0., 0., w_fp[4] ); // Amplitude(s) for diagram number 1 - FFV1_0( w_fp[3], w_fp[2], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[2], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -259,10 +259,10 @@ namespace mg5amcCpu // *** DIAGRAM 2 OF 3 *** // Wavefunction(s) for diagram number 2 - FFV1_1( w_fp[2], w_fp[0], COUPs[1], cIPD[0], cIPD[1], w_fp[4] ); + FFV1_1( w_fp[2], w_fp[0], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[4] ); // Amplitude(s) for diagram number 2 - FFV1_0( w_fp[3], w_fp[4], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[4], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -271,10 +271,10 @@ namespace mg5amcCpu // *** DIAGRAM 3 OF 3 *** // Wavefunction(s) for diagram number 3 - FFV1_2( w_fp[3], w_fp[0], COUPs[1], cIPD[0], cIPD[1], w_fp[4] ); + FFV1_2( w_fp[3], w_fp[0], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[4] ); // Amplitude(s) for diagram number 3 - FFV1_0( w_fp[4], w_fp[2], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[4], w_fp[2], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -796,8 +796,7 @@ namespace mg5amcCpu { // nprocesses>1 was last observed for "mirror processes" in uux_ttx in the 270 branch (see issue #343 and PRs #360 and #396) constexpr int nprocesses = 1; - static_assert( nprocesses == 1, "Assume nprocesses == 1" ); - // process_id corresponds to the index of DSIG1 Fortran functions (must be 1 because cudacpp is unable to handle DSIG2) + static_assert( nprocesses == 1 || nprocesses == 2, "Assume nprocesses == 1 or 2" ); constexpr int process_id = 1; // code generation source: standalone_cudacpp static_assert( process_id == 1, "Assume process_id == 1" ); } diff --git a/epochX/cudacpp/gg_tt.sa/SubProcesses/cudacpp.mk b/epochX/cudacpp/gg_tt.sa/SubProcesses/cudacpp.mk index 43cee0977e..15669185ad 100644 --- a/epochX/cudacpp/gg_tt.sa/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/gg_tt.sa/SubProcesses/cudacpp.mk @@ -1,7 +1,7 @@ # Copyright (C) 2020-2023 CERN and UCLouvain. # Licensed under the GNU Lesser General Public License (version 3 or later). # Created by: S. Roiser (Feb 2020) for the MG5aMC CUDACPP plugin. -# Further modified by: O. Mattelaer, S. Roiser, A. Valassi (2020-2023) for the MG5aMC CUDACPP plugin. +# Further modified by: J. Teig, O. Mattelaer, S. Roiser, A. Valassi (2020-2023) for the MG5aMC CUDACPP plugin. #=== Determine the name of this makefile (https://ftp.gnu.org/old-gnu/Manuals/make-3.80/html_node/make_17.html) #=== NB: different names (e.g. cudacpp.mk and cudacpp_src.mk) are used in the Subprocess and src directories @@ -86,6 +86,14 @@ endif #------------------------------------------------------------------------------- +.DEFAULT_GOAL := usage + +# Target if user does not specify target +usage: + $(error Unknown target='$(MAKECMDGOALS)': only 'cppnone', 'cppsse4', 'cppavx2', 'cpp512y', 'cpp512z' and 'cuda' are supported!) + +#------------------------------------------------------------------------------- + #=== Configure the C++ compiler CXXFLAGS = $(OPTFLAGS) -std=c++17 $(INCFLAGS) -Wall -Wshadow -Wextra @@ -103,70 +111,73 @@ endif #------------------------------------------------------------------------------- -#=== Configure the CUDA compiler - -# If CXX is not a single word (example "clang++ --gcc-toolchain...") then disable CUDA builds (issue #505) -# This is because it is impossible to pass this to "CUFLAGS += -ccbin " below -ifneq ($(words $(subst ccache ,,$(CXX))),1) # allow at most "CXX=ccache " from outside - $(warning CUDA builds are not supported for multi-word CXX "$(CXX)") - override CUDA_HOME=disabled -endif - -# If CUDA_HOME is not set, try to set it from the location of nvcc -ifndef CUDA_HOME - CUDA_HOME = $(patsubst %bin/nvcc,%,$(shell which nvcc 2>/dev/null)) - $(warning CUDA_HOME was not set: using "$(CUDA_HOME)") -endif - -# Set NVCC as $(CUDA_HOME)/bin/nvcc if it exists -ifneq ($(wildcard $(CUDA_HOME)/bin/nvcc),) - NVCC = $(CUDA_HOME)/bin/nvcc - USE_NVTX ?=-DUSE_NVTX - # See https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html - # See https://arnon.dk/matching-sm-architectures-arch-and-gencode-for-various-nvidia-cards/ - # Default: use compute capability 70 for V100 (CERN lxbatch, CERN itscrd, Juwels Cluster). - # Embed device code for 70, and PTX for 70+. - # Export MADGRAPH_CUDA_ARCHITECTURE (comma-separated list) to use another value or list of values (see #533). - # Examples: use 60 for P100 (Piz Daint), 80 for A100 (Juwels Booster, NVidia raplab/Curiosity). - MADGRAPH_CUDA_ARCHITECTURE ?= 70 - ###CUARCHFLAGS = -gencode arch=compute_$(MADGRAPH_CUDA_ARCHITECTURE),code=compute_$(MADGRAPH_CUDA_ARCHITECTURE) -gencode arch=compute_$(MADGRAPH_CUDA_ARCHITECTURE),code=sm_$(MADGRAPH_CUDA_ARCHITECTURE) # Older implementation (AV): go back to this one for multi-GPU support #533 - ###CUARCHFLAGS = --gpu-architecture=compute_$(MADGRAPH_CUDA_ARCHITECTURE) --gpu-code=sm_$(MADGRAPH_CUDA_ARCHITECTURE),compute_$(MADGRAPH_CUDA_ARCHITECTURE) # Newer implementation (SH): cannot use this as-is for multi-GPU support #533 - comma:=, - CUARCHFLAGS = $(foreach arch,$(subst $(comma), ,$(MADGRAPH_CUDA_ARCHITECTURE)),-gencode arch=compute_$(arch),code=compute_$(arch) -gencode arch=compute_$(arch),code=sm_$(arch)) - CUINC = -I$(CUDA_HOME)/include/ - CURANDLIBFLAGS = -L$(CUDA_HOME)/lib64/ -lcurand # NB: -lcuda is not needed here! - CUOPTFLAGS = -lineinfo - CUFLAGS = $(foreach opt, $(OPTFLAGS), -Xcompiler $(opt)) $(CUOPTFLAGS) $(INCFLAGS) $(CUINC) $(USE_NVTX) $(CUARCHFLAGS) -use_fast_math - ###CUFLAGS += -Xcompiler -Wall -Xcompiler -Wextra -Xcompiler -Wshadow - ###NVCC_VERSION = $(shell $(NVCC) --version | grep 'Cuda compilation tools' | cut -d' ' -f5 | cut -d, -f1) - CUFLAGS += -std=c++17 # need CUDA >= 11.2 (see #333): this is enforced in mgOnGpuConfig.h - # Without -maxrregcount: baseline throughput: 6.5E8 (16384 32 12) up to 7.3E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 160 # improves throughput: 6.9E8 (16384 32 12) up to 7.7E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 128 # improves throughput: 7.3E8 (16384 32 12) up to 7.6E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 96 # degrades throughput: 4.1E8 (16384 32 12) up to 4.5E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 64 # degrades throughput: 1.7E8 (16384 32 12) flat at 1.7E8 (65536 128 12) -else ifneq ($(origin REQUIRE_CUDA),undefined) - # If REQUIRE_CUDA is set but no cuda is found, stop here (e.g. for CI tests on GPU #443) - $(error No cuda installation found (set CUDA_HOME or make nvcc visible in PATH)) -else - # No cuda. Switch cuda compilation off and go to common random numbers in C++ - $(warning CUDA_HOME is not set or is invalid: export CUDA_HOME to compile with cuda) - override NVCC= - override USE_NVTX= - override CUINC= - override CURANDLIBFLAGS= -endif -export NVCC -export CUFLAGS +#=== Configure the CUDA compiler for the CUDA target -# Set the host C++ compiler for nvcc via "-ccbin " -# (NB issue #505: this must be a single word, "clang++ --gcc-toolchain..." is not supported) -CUFLAGS += -ccbin $(shell which $(subst ccache ,,$(CXX))) +ifneq (,$(findstring $(MAKECMDGOALS),cuda-gcheck-runGcheck-runFGcheck-cmpFGcheck-memcheck)) + # If CXX is not a single word (example "clang++ --gcc-toolchain...") then disable CUDA builds (issue #505) + # This is because it is impossible to pass this to "CUFLAGS += -ccbin " below + ifneq ($(words $(subst ccache ,,$(CXX))),1) # allow at most "CXX=ccache " from outside + $(warning CUDA builds are not supported for multi-word CXX "$(CXX)") + override CUDA_HOME=disabled + endif -# Allow newer (unsupported) C++ compilers with older versions of CUDA if ALLOW_UNSUPPORTED_COMPILER_IN_CUDA is set (#504) -ifneq ($(origin ALLOW_UNSUPPORTED_COMPILER_IN_CUDA),undefined) -CUFLAGS += -allow-unsupported-compiler -endif + # If CUDA_HOME is not set, try to set it from the location of nvcc + ifndef CUDA_HOME + CUDA_HOME = $(patsubst %bin/nvcc,%,$(shell which nvcc 2>/dev/null)) + $(warning CUDA_HOME was not set: using "$(CUDA_HOME)") + endif + + # Set NVCC as $(CUDA_HOME)/bin/nvcc if it exists + ifneq ($(wildcard $(CUDA_HOME)/bin/nvcc),) + NVCC = $(CUDA_HOME)/bin/nvcc + USE_NVTX ?=-DUSE_NVTX + # See https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html + # See https://arnon.dk/matching-sm-architectures-arch-and-gencode-for-various-nvidia-cards/ + # Default: use compute capability 70 for V100 (CERN lxbatch, CERN itscrd, Juwels Cluster). + # Embed device code for 70, and PTX for 70+. + # Export MADGRAPH_CUDA_ARCHITECTURE (comma-separated list) to use another value or list of values (see #533). + # Examples: use 60 for P100 (Piz Daint), 80 for A100 (Juwels Booster, NVidia raplab/Curiosity). + MADGRAPH_CUDA_ARCHITECTURE ?= 70 + ###CUARCHFLAGS = -gencode arch=compute_$(MADGRAPH_CUDA_ARCHITECTURE),code=compute_$(MADGRAPH_CUDA_ARCHITECTURE) -gencode arch=compute_$(MADGRAPH_CUDA_ARCHITECTURE),code=sm_$(MADGRAPH_CUDA_ARCHITECTURE) # Older implementation (AV): go back to this one for multi-GPU support #533 + ###CUARCHFLAGS = --gpu-architecture=compute_$(MADGRAPH_CUDA_ARCHITECTURE) --gpu-code=sm_$(MADGRAPH_CUDA_ARCHITECTURE),compute_$(MADGRAPH_CUDA_ARCHITECTURE) # Newer implementation (SH): cannot use this as-is for multi-GPU support #533 + comma:=, + CUARCHFLAGS = $(foreach arch,$(subst $(comma), ,$(MADGRAPH_CUDA_ARCHITECTURE)),-gencode arch=compute_$(arch),code=compute_$(arch) -gencode arch=compute_$(arch),code=sm_$(arch)) + CUINC = -I$(CUDA_HOME)/include/ + CURANDLIBFLAGS = -L$(CUDA_HOME)/lib64/ -lcurand # NB: -lcuda is not needed here! + CUOPTFLAGS = -lineinfo + CUFLAGS = $(foreach opt, $(OPTFLAGS), -Xcompiler $(opt)) $(CUOPTFLAGS) $(INCFLAGS) $(CUINC) $(USE_NVTX) $(CUARCHFLAGS) -use_fast_math + ###CUFLAGS += -Xcompiler -Wall -Xcompiler -Wextra -Xcompiler -Wshadow + ###NVCC_VERSION = $(shell $(NVCC) --version | grep 'Cuda compilation tools' | cut -d' ' -f5 | cut -d, -f1) + CUFLAGS += -std=c++17 # need CUDA >= 11.2 (see #333): this is enforced in mgOnGpuConfig.h + # Without -maxrregcount: baseline throughput: 6.5E8 (16384 32 12) up to 7.3E8 (65536 128 12) + ###CUFLAGS+= --maxrregcount 160 # improves throughput: 6.9E8 (16384 32 12) up to 7.7E8 (65536 128 12) + ###CUFLAGS+= --maxrregcount 128 # improves throughput: 7.3E8 (16384 32 12) up to 7.6E8 (65536 128 12) + ###CUFLAGS+= --maxrregcount 96 # degrades throughput: 4.1E8 (16384 32 12) up to 4.5E8 (65536 128 12) + ###CUFLAGS+= --maxrregcount 64 # degrades throughput: 1.7E8 (16384 32 12) flat at 1.7E8 (65536 128 12) + else ifneq ($(origin REQUIRE_CUDA),undefined) + # If REQUIRE_CUDA is set but no cuda is found, stop here (e.g. for CI tests on GPU #443) + $(error No cuda installation found (set CUDA_HOME or make nvcc visible in PATH)) + else + # No cuda. Switch cuda compilation off and go to common random numbers in C++ + $(warning CUDA_HOME is not set or is invalid: export CUDA_HOME to compile with cuda) + override NVCC= + override USE_NVTX= + override CUINC= + override CURANDLIBFLAGS= + endif + export NVCC + export CUFLAGS + + # Set the host C++ compiler for nvcc via "-ccbin " + # (NB issue #505: this must be a single word, "clang++ --gcc-toolchain..." is not supported) + CUFLAGS += -ccbin $(shell which $(subst ccache ,,$(CXX))) + + # Allow newer (unsupported) C++ compilers with older versions of CUDA if ALLOW_UNSUPPORTED_COMPILER_IN_CUDA is set (#504) + ifneq ($(origin ALLOW_UNSUPPORTED_COMPILER_IN_CUDA),undefined) + CUFLAGS += -allow-unsupported-compiler + endif + +endif # ($(MAKECMDGOALS),cuda) #------------------------------------------------------------------------------- @@ -226,32 +237,6 @@ override OMPFLAGS = -fopenmp ###override OMPFLAGS = # disable OpenMP MT (default before #575) endif -# Set the default AVX (vectorization) choice -ifeq ($(AVX),) - ifeq ($(UNAME_P),ppc64le) - ###override AVX = none - override AVX = sse4 - else ifeq ($(UNAME_P),arm) - ###override AVX = none - override AVX = sse4 - else ifeq ($(wildcard /proc/cpuinfo),) - override AVX = none - $(warning Using AVX='$(AVX)' because host SIMD features cannot be read from /proc/cpuinfo) - else ifeq ($(shell grep -m1 -c avx512vl /proc/cpuinfo)$(shell $(CXX) --version | grep ^clang),1) - override AVX = 512y - ###$(info Using AVX='$(AVX)' as no user input exists) - else - override AVX = avx2 - ifneq ($(shell grep -m1 -c avx512vl /proc/cpuinfo),1) - $(warning Using AVX='$(AVX)' because host does not support avx512vl) - else - $(warning Using AVX='$(AVX)' because this is faster than avx512vl for clang) - endif - endif -else - ###$(info Using AVX='$(AVX)' according to user input) -endif - # Set the default FPTYPE (floating point type) choice ifeq ($(FPTYPE),) override FPTYPE = d @@ -276,6 +261,21 @@ ifeq ($(RNDGEN),) endif endif +# set the correct AVX based on avxcpp target +ifeq ($(MAKECMDGOALS),cppnone) # no SIMD + override AVX = none +else ifeq ($(MAKECMDGOALS),cppsse4) # SSE4.2 with 128 width (xmm registers) + override AVX = sse4 +else ifeq ($(MAKECMDGOALS),cppavx2) # AVX2 with 256 width (ymm registers) [DEFAULT for clang] + override AVX = avx2 +else ifeq ($(MAKECMDGOALS),cpp512y) # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] + override AVX = 512y +else ifeq ($(MAKECMDGOALS),cpp512z) # AVX512 with 512 width (zmm registers) + override AVX = 512z +else + override AVX = none +endif + # Export AVX, FPTYPE, HELINL, HRDCOD, RNDGEN, OMPFLAGS so that it is not necessary to pass them to the src Makefile too export AVX export FPTYPE @@ -295,50 +295,52 @@ CXXFLAGS += $(OMPFLAGS) # Set the build flags appropriate to each AVX choice (example: "make AVX=none") # [NB MGONGPU_PVW512 is needed because "-mprefer-vector-width=256" is not exposed in a macro] # [See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96476] -$(info AVX=$(AVX)) -ifeq ($(UNAME_P),ppc64le) - ifeq ($(AVX),sse4) - override AVXFLAGS = -D__SSE4_2__ # Power9 VSX with 128 width (VSR registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on PowerPC for the moment) - endif -else ifeq ($(UNAME_P),arm) - ifeq ($(AVX),sse4) - override AVXFLAGS = -D__SSE4_2__ # ARM NEON with 128 width (Q/quadword registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on ARM for the moment) - endif -else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 - ifeq ($(AVX),none) - override AVXFLAGS = -mno-sse3 # no SIMD - else ifeq ($(AVX),sse4) - override AVXFLAGS = -mno-avx # SSE4.2 with 128 width (xmm registers) - else ifeq ($(AVX),avx2) - override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(AVX),512y) - override AVXFLAGS = -march=skylake -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(AVX),512z) - override AVXFLAGS = -march=skylake -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) - else - $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) - endif -else - ifeq ($(AVX),none) - override AVXFLAGS = -march=x86-64 # no SIMD (see #588) - else ifeq ($(AVX),sse4) - override AVXFLAGS = -march=nehalem # SSE4.2 with 128 width (xmm registers) - else ifeq ($(AVX),avx2) - override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(AVX),512y) - override AVXFLAGS = -march=skylake-avx512 -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(AVX),512z) - override AVXFLAGS = -march=skylake-avx512 -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) +ifeq ($(findstring cpp,$(MAKECMDGOALS)),cpp) + $(info AVX=$(AVX)) + ifeq ($(UNAME_P),ppc64le) + ifeq ($(AVX),sse4) + override AVXFLAGS = -D__SSE4_2__ # Power9 VSX with 128 width (VSR registers) + else ifneq ($(AVX),none) + $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on PowerPC for the moment) + endif + else ifeq ($(UNAME_P),arm) + ifeq ($(AVX),sse4) + override AVXFLAGS = -D__SSE4_2__ # ARM NEON with 128 width (Q/quadword registers) + else ifneq ($(AVX),none) + $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on ARM for the moment) + endif + else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 + ifeq ($(AVX),none) + override AVXFLAGS = -mno-sse3 # no SIMD + else ifeq ($(AVX),sse4) + override AVXFLAGS = -mno-avx # SSE4.2 with 128 width (xmm registers) + else ifeq ($(AVX),avx2) + override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] + else ifeq ($(AVX),512y) + override AVXFLAGS = -march=skylake -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] + else ifeq ($(AVX),512z) + override AVXFLAGS = -march=skylake -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) + else + $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) + endif else - $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) + ifeq ($(AVX),none) + override AVXFLAGS = -march=x86-64 # no SIMD (see #588) + else ifeq ($(AVX),sse4) + override AVXFLAGS = -march=nehalem # SSE4.2 with 128 width (xmm registers) + else ifeq ($(AVX),avx2) + override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] + else ifeq ($(AVX),512y) + override AVXFLAGS = -march=skylake-avx512 -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] + else ifeq ($(AVX),512z) + override AVXFLAGS = -march=skylake-avx512 -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) + else + $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) + endif endif + # For the moment, use AVXFLAGS everywhere: eventually, use them only in encapsulated implementations? + CXXFLAGS+= $(AVXFLAGS) endif -# For the moment, use AVXFLAGS everywhere: eventually, use them only in encapsulated implementations? -CXXFLAGS+= $(AVXFLAGS) # Set the build flags appropriate to each FPTYPE choice (example: "make FPTYPE=f") $(info FPTYPE=$(FPTYPE)) @@ -389,11 +391,19 @@ endif # Build directory "short" tag (defines target and path to the optional build directory) # (Rationale: keep directory names shorter, e.g. do not include random number generator choice) -override DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) +ifneq ($(NVCC),) + override DIRTAG = cuda_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) +else + override DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) +endif # Build lockfile "full" tag (defines full specification of build options that cannot be intermixed) # (Rationale: avoid mixing of CUDA and no-CUDA environment builds with different random number generators) -override TAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) +ifneq ($(NVCC),) + override TAG = cuda_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) +else + override TAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) +endif # Build directory: current directory by default, or build.$(DIRTAG) if USEBUILDDIR==1 ifeq ($(USEBUILDDIR),1) @@ -448,9 +458,9 @@ endif testmain=$(BUILDDIR)/runTest.exe ifneq ($(GTESTLIBS),) -all.$(TAG): $(BUILDDIR)/.build.$(TAG) $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_main) $(cxx_main) $(fcu_main) $(fcxx_main) $(testmain) +all.$(TAG): $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_main) $(cxx_main) $(fcu_main) $(fcxx_main) $(testmain) else -all.$(TAG): $(BUILDDIR)/.build.$(TAG) $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_main) $(cxx_main) $(fcu_main) $(fcxx_main) +all.$(TAG): $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_main) $(cxx_main) $(fcu_main) $(fcxx_main) endif # Target (and build options): debug @@ -460,27 +470,20 @@ debug: CUOPTFLAGS = -G debug: MAKEDEBUG := debug debug: all.$(TAG) -# Target: tag-specific build lockfiles -override oldtagsb=`if [ -d $(BUILDDIR) ]; then find $(BUILDDIR) -maxdepth 1 -name '.build.*' ! -name '.build.$(TAG)' -exec echo $(shell pwd)/{} \; ; fi` -$(BUILDDIR)/.build.$(TAG): - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - @if [ "$(oldtagsb)" != "" ]; then echo "Cannot build for tag=$(TAG) as old builds exist for other tags:"; echo " $(oldtagsb)"; echo "Please run 'make clean' first\nIf 'make clean' is not enough: run 'make clean USEBUILDDIR=1 AVX=$(AVX) FPTYPE=$(FPTYPE)' or 'make cleanall'"; exit 1; fi - @touch $(BUILDDIR)/.build.$(TAG) - # Generic target and build rules: objects from CUDA compilation ifneq ($(NVCC),) -$(BUILDDIR)/%.o : %.cu *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) +$(BUILDDIR)/%.o : %.cu *.h ../../src/*.h @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c $< -o $@ -$(BUILDDIR)/%_cu.o : %.cc *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) +$(BUILDDIR)/%_cu.o : %.cc *.h ../../src/*.h @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c -x cu $< -o $@ endif # Generic target and build rules: objects from C++ compilation # (NB do not include CUINC here! add it only for NVTX or curand #679) -$(BUILDDIR)/%.o : %.cc *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) +$(BUILDDIR)/%.o : %.cc *.h ../../src/*.h @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi $(CXX) $(CPPFLAGS) $(CXXFLAGS) -fPIC -c $< -o $@ @@ -532,7 +535,7 @@ endif # Target (and build rules): common (src) library commonlib : $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so -$(LIBDIR)/lib$(MG5AMC_COMMONLIB).so: ../../src/*.h ../../src/*.cc $(BUILDDIR)/.build.$(TAG) +$(LIBDIR)/lib$(MG5AMC_COMMONLIB).so: ../../src/*.h ../../src/*.cc $(MAKE) -C ../../src $(MAKEDEBUG) -f $(CUDACPP_SRC_MAKEFILE) #------------------------------------------------------------------------------- @@ -711,35 +714,27 @@ endif # Target: build all targets in all AVX modes (each AVX mode in a separate build directory) # Split the avxall target into five separate targets to allow parallel 'make -j avxall' builds # (Hack: add a fbridge.inc dependency to avxall, to ensure it is only copied once for all AVX modes) -avxnone: - @echo - $(MAKE) USEBUILDDIR=1 AVX=none -f $(CUDACPP_MAKEFILE) +cppnone: $(cxx_main) -avxsse4: - @echo - $(MAKE) USEBUILDDIR=1 AVX=sse4 -f $(CUDACPP_MAKEFILE) +cppsse4: $(cxx_main) -avxavx2: - @echo - $(MAKE) USEBUILDDIR=1 AVX=avx2 -f $(CUDACPP_MAKEFILE) +cppavx2: $(cxx_main) -avx512y: - @echo - $(MAKE) USEBUILDDIR=1 AVX=512y -f $(CUDACPP_MAKEFILE) +cpp512y: $(cxx_main) -avx512z: - @echo - $(MAKE) USEBUILDDIR=1 AVX=512z -f $(CUDACPP_MAKEFILE) +cpp512z: $(cxx_main) + +cuda: $(cu_main) ifeq ($(UNAME_P),ppc64le) ###avxall: $(INCDIR)/fbridge.inc avxnone avxsse4 -avxall: avxnone avxsse4 +cppall: cppnone cppsse4 else ifeq ($(UNAME_P),arm) ###avxall: $(INCDIR)/fbridge.inc avxnone avxsse4 -avxall: avxnone avxsse4 +cppall: cppnone cppsse4 else ###avxall: $(INCDIR)/fbridge.inc avxnone avxsse4 avxavx2 avx512y avx512z -avxall: avxnone avxsse4 avxavx2 avx512y avx512z +cppall: cppnone cppsse4 cppavx2 cpp512y cpp512z endif #------------------------------------------------------------------------------- @@ -747,21 +742,31 @@ endif # Target: clean the builds .PHONY: clean +BUILD_DIRS := $(wildcard build.*) +NUM_BUILD_DIRS := $(words $(BUILD_DIRS)) + clean: ifeq ($(USEBUILDDIR),1) - rm -rf $(BUILDDIR) +ifeq ($(NUM_BUILD_DIRS),1) + $(info USEBUILDDIR=1, Only one build directory found.) + rm -rf $(BUILD_DIRS) +else ifeq ($(NUM_BUILD_DIRS),0) + $(error USEBUILDDIR=1, but no build directories are found.) else - rm -f $(BUILDDIR)/.build.* $(BUILDDIR)/*.o $(BUILDDIR)/*.exe + $(error Multiple BUILDDIR's found! Use 'cleannone', 'cleansse4', 'cleanavx2', 'clean512y','clean512z', 'cleancuda' or 'cleanall'.) +endif +else + rm -f $(BUILDDIR)/*.o $(BUILDDIR)/*.exe rm -f $(LIBDIR)/lib$(MG5AMC_CXXLIB).so $(LIBDIR)/lib$(MG5AMC_CULIB).so endif $(MAKE) -C ../../src clean -f $(CUDACPP_SRC_MAKEFILE) -### rm -rf $(INCDIR) cleanall: @echo - $(MAKE) USEBUILDDIR=0 clean -f $(CUDACPP_MAKEFILE) + rm -f $(BUILDDIR)/*.o $(BUILDDIR)/*.exe + rm -f $(LIBDIR)/lib$(MG5AMC_CXXLIB).so $(LIBDIR)/lib$(MG5AMC_CULIB).so @echo - $(MAKE) USEBUILDDIR=0 -C ../../src cleanall -f $(CUDACPP_SRC_MAKEFILE) + $(MAKE) -C ../../src cleanall -f $(CUDACPP_SRC_MAKEFILE) rm -rf build.* # Target: clean the builds as well as the gtest installation(s) @@ -771,6 +776,42 @@ ifneq ($(wildcard $(TESTDIRCOMMON)),) endif $(MAKE) -C $(TESTDIRLOCAL) clean +# Target: clean different builds +cleannone: + rm -rf build.none_* + rm -f ../../lib/build.none_*/lib$(MG5AMC_CXXLIB).so + $(MAKE) -C ../../src cleannone -f $(CUDACPP_SRC_MAKEFILE) + +cleansse4: + rm -rf build.sse4_* + rm -f ../../lib/build.sse4_*/lib$(MG5AMC_CXXLIB).so + $(MAKE) -C ../../src cleansse4 -f $(CUDACPP_SRC_MAKEFILE) + +cleanavx2: + rm -rf build.avx2_* + rm -f ../../lib/build.avx2_*/lib$(MG5AMC_CXXLIB).so + $(MAKE) -C ../../src cleanavx2 -f $(CUDACPP_SRC_MAKEFILE) + +clean512y: + rm -rf build.512y_* + rm -f ../../lib/build.512y_*/lib$(MG5AMC_CXXLIB).so + $(MAKE) -C ../../src clean512y -f $(CUDACPP_SRC_MAKEFILE) + +clean512z: + rm -rf build.512z_* + rm -f ../../lib/build.512z_*/lib$(MG5AMC_CXXLIB).so + $(MAKE) -C ../../src clean512z -f $(CUDACPP_SRC_MAKEFILE) + +cleancuda: + rm -rf build.cuda_* + rm -f ../../lib/build.cuda_*/lib$(MG5AMC_CULIB).so + $(MAKE) -C ../../src cleancuda -f $(CUDACPP_SRC_MAKEFILE) + +cleandir: + rm -f ./*.o ./*.exe + rm -f ../../lib/lib$(MG5AMC_CXXLIB).so ../../lib/lib$(MG5AMC_CULIB).so + $(MAKE) -C ../../src cleandir -f $(CUDACPP_SRC_MAKEFILE) + #------------------------------------------------------------------------------- # Target: show system and compiler information @@ -817,13 +858,10 @@ endif #------------------------------------------------------------------------------- -# Target: check (run the C++ test executable) +# Target: check/gcheck (run the C++ test executable) # [NB THIS IS WHAT IS USED IN THE GITHUB CI!] -ifneq ($(NVCC),) -check: runTest cmpFcheck cmpFGcheck -else check: runTest cmpFcheck -endif +gcheck: runTest cmpFGcheck # Target: runTest (run the C++ test executable runTest.exe) runTest: all.$(TAG) @@ -863,4 +901,4 @@ cmpFGcheck: all.$(TAG) memcheck: all.$(TAG) $(RUNTIME) $(CUDA_HOME)/bin/cuda-memcheck --check-api-memory-access yes --check-deprecated-instr yes --check-device-heap yes --demangle full --language c --leak-check full --racecheck-report all --report-api-errors all --show-backtrace yes --tool memcheck --track-unused-memory yes $(BUILDDIR)/gcheck.exe -p 2 32 2 -#------------------------------------------------------------------------------- +#------------------------------------------------------------------------------- \ No newline at end of file diff --git a/epochX/cudacpp/gg_tt.sa/src/HelAmps_sm.h b/epochX/cudacpp/gg_tt.sa/src/HelAmps_sm.h index 94bf8aca52..07d0bfa887 100644 --- a/epochX/cudacpp/gg_tt.sa/src/HelAmps_sm.h +++ b/epochX/cudacpp/gg_tt.sa/src/HelAmps_sm.h @@ -862,6 +862,7 @@ namespace mg5amcCpu VVV1P0_1( const fptype allV2[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, const fptype M1, const fptype W1, fptype allV1[] ) ALWAYS_INLINE; @@ -875,6 +876,7 @@ namespace mg5amcCpu const fptype allF2[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, fptype allvertexes[] ) ALWAYS_INLINE; //-------------------------------------------------------------------------- @@ -885,6 +887,7 @@ namespace mg5amcCpu FFV1_1( const fptype allF2[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, const fptype M1, const fptype W1, fptype allF1[] ) ALWAYS_INLINE; @@ -897,6 +900,7 @@ namespace mg5amcCpu FFV1_2( const fptype allF1[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, const fptype M2, const fptype W2, fptype allF2[] ) ALWAYS_INLINE; @@ -909,6 +913,7 @@ namespace mg5amcCpu VVV1P0_1( const fptype allV2[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, const fptype M1, const fptype W1, fptype allV1[] ) @@ -947,6 +952,7 @@ namespace mg5amcCpu const fptype allF2[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, fptype allvertexes[] ) { mgDebug( 0, __FUNCTION__ ); @@ -970,6 +976,7 @@ namespace mg5amcCpu FFV1_1( const fptype allF2[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, const fptype M1, const fptype W1, fptype allF1[] ) @@ -1001,6 +1008,7 @@ namespace mg5amcCpu FFV1_2( const fptype allF1[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, const fptype M2, const fptype W2, fptype allF2[] ) diff --git a/epochX/cudacpp/gg_tt.sa/src/cudacpp_src.mk b/epochX/cudacpp/gg_tt.sa/src/cudacpp_src.mk index 554d7a704c..750986464e 100644 --- a/epochX/cudacpp/gg_tt.sa/src/cudacpp_src.mk +++ b/epochX/cudacpp/gg_tt.sa/src/cudacpp_src.mk @@ -1,7 +1,7 @@ # Copyright (C) 2020-2023 CERN and UCLouvain. # Licensed under the GNU Lesser General Public License (version 3 or later). # Created by: S. Roiser (Feb 2020) for the MG5aMC CUDACPP plugin. -# Further modified by: O. Mattelaer, S. Roiser, A. Valassi (2020-2023) for the MG5aMC CUDACPP plugin. +# Further modified by: J. Teig, O. Mattelaer, S. Roiser, A. Valassi (2020-2023) for the MG5aMC CUDACPP plugin. #=== Determine the name of this makefile (https://ftp.gnu.org/old-gnu/Manuals/make-3.80/html_node/make_17.html) #=== NB: assume that the same name (e.g. cudacpp.mk, Makefile...) is used in the Subprocess and src directories @@ -88,50 +88,52 @@ CXXFLAGS += $(OMPFLAGS) # Set the build flags appropriate to each AVX choice (example: "make AVX=none") # [NB MGONGPU_PVW512 is needed because "-mprefer-vector-width=256" is not exposed in a macro] # [See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96476] -$(info AVX=$(AVX)) -ifeq ($(UNAME_P),ppc64le) - ifeq ($(AVX),sse4) - override AVXFLAGS = -D__SSE4_2__ # Power9 VSX with 128 width (VSR registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on PowerPC for the moment) - endif -else ifeq ($(UNAME_P),arm) - ifeq ($(AVX),sse4) - override AVXFLAGS = -D__SSE4_2__ # ARM NEON with 128 width (Q/quadword registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on ARM for the moment) - endif -else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 - ifeq ($(AVX),none) - override AVXFLAGS = -mno-sse3 # no SIMD - else ifeq ($(AVX),sse4) - override AVXFLAGS = -mno-avx # SSE4.2 with 128 width (xmm registers) - else ifeq ($(AVX),avx2) - override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(AVX),512y) - override AVXFLAGS = -march=skylake -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(AVX),512z) - override AVXFLAGS = -march=skylake -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) +ifeq ($(NVCC),) + $(info AVX=$(AVX)) + ifeq ($(UNAME_P),ppc64le) + ifeq ($(AVX),sse4) + override AVXFLAGS = -D__SSE4_2__ # Power9 VSX with 128 width (VSR registers) + else ifneq ($(AVX),none) + $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on PowerPC for the moment) + endif + else ifeq ($(UNAME_P),arm) + ifeq ($(AVX),sse4) + override AVXFLAGS = -D__SSE4_2__ # ARM NEON with 128 width (Q/quadword registers) + else ifneq ($(AVX),none) + $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on ARM for the moment) + endif + else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 + ifeq ($(AVX),none) + override AVXFLAGS = -mno-sse3 # no SIMD + else ifeq ($(AVX),sse4) + override AVXFLAGS = -mno-avx # SSE4.2 with 128 width (xmm registers) + else ifeq ($(AVX),avx2) + override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] + else ifeq ($(AVX),512y) + override AVXFLAGS = -march=skylake -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] + else ifeq ($(AVX),512z) + override AVXFLAGS = -march=skylake -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) + else + $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) + endif else - $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) - endif -else - ifeq ($(AVX),none) - override AVXFLAGS = -march=x86-64 # no SIMD (see #588) - else ifeq ($(AVX),sse4) - override AVXFLAGS = -march=nehalem # SSE4.2 with 128 width (xmm registers) - else ifeq ($(AVX),avx2) - override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(AVX),512y) - override AVXFLAGS = -march=skylake-avx512 -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(AVX),512z) - override AVXFLAGS = -march=skylake-avx512 -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) + ifeq ($(AVX),none) + override AVXFLAGS = -march=x86-64 # no SIMD (see #588) + else ifeq ($(AVX),sse4) + override AVXFLAGS = -march=nehalem # SSE4.2 with 128 width (xmm registers) + else ifeq ($(AVX),avx2) + override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] + else ifeq ($(AVX),512y) + override AVXFLAGS = -march=skylake-avx512 -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] + else ifeq ($(AVX),512z) + override AVXFLAGS = -march=skylake-avx512 -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) + else ifneq ($(AVX),none) + $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) + endif endif + # For the moment, use AVXFLAGS everywhere: eventually, use them only in encapsulated implementations? + CXXFLAGS+= $(AVXFLAGS) endif -# For the moment, use AVXFLAGS everywhere: eventually, use them only in encapsulated implementations? -CXXFLAGS+= $(AVXFLAGS) # Set the build flags appropriate to each FPTYPE choice (example: "make FPTYPE=f") ###$(info FPTYPE=$(FPTYPE)) @@ -175,11 +177,19 @@ endif # Build directory "short" tag (defines target and path to the optional build directory) # (Rationale: keep directory names shorter, e.g. do not include random number generator choice) -override DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) +ifneq ($(NVCC),) + override DIRTAG = cuda_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) +else + override DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) +endif # Build lockfile "full" tag (defines full specification of build options that cannot be intermixed) # (Rationale: avoid mixing of CUDA and no-CUDA environment builds with different random number generators) -override TAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) +ifneq ($(NVCC),) + override TAG = cuda_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) +else + override TAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) +endif # Build directory: current directory by default, or build.$(DIRTAG) if USEBUILDDIR==1 ###$(info Current directory is $(shell pwd)) @@ -216,35 +226,21 @@ endif MG5AMC_COMMONLIB = mg5amc_common # First target (default goal) -all.$(TAG): $(BUILDDIR)/.build.$(TAG) $(LIBDIR)/.build.$(TAG) $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so +all.$(TAG): $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so # Target (and build options): debug debug: OPTFLAGS = -g -O0 debug: all.$(TAG) -# Target: tag-specific build lockfiles -override oldtagsb=`if [ -d $(BUILDDIR) ]; then find $(BUILDDIR) -maxdepth 1 -name '.build.*' ! -name '.build.$(TAG)' -exec echo $(shell pwd)/{} \; ; fi` -override oldtagsl=`if [ -d $(LIBDIR) ]; then find $(LIBDIR) -maxdepth 1 -name '.build.*' ! -name '.build.$(TAG)' -exec echo $(shell pwd)/{} \; ; fi` - -$(BUILDDIR)/.build.$(TAG): $(LIBDIR)/.build.$(TAG) - -$(LIBDIR)/.build.$(TAG): - @if [ "$(oldtagsl)" != "" ]; then echo -e "Cannot build for tag=$(TAG) as old builds exist in $(LIBDIR) for other tags:\n$(oldtagsl)\nPlease run 'make clean' first\nIf 'make clean' is not enough: run 'make clean USEBUILDDIR=1 AVX=$(AVX) FPTYPE=$(FPTYPE)' or 'make cleanall'"; exit 1; fi - @if [ "$(oldtagsb)" != "" ]; then echo -e "Cannot build for tag=$(TAG) as old builds exist in $(BUILDDIR) for other tags:\n$(oldtagsb)\nPlease run 'make clean' first\nIf 'make clean' is not enough: run 'make clean USEBUILDDIR=1 AVX=$(AVX) FPTYPE=$(FPTYPE)' or 'make cleanall'"; exit 1; fi - @if [ ! -d $(LIBDIR) ]; then echo "mkdir -p $(LIBDIR)"; mkdir -p $(LIBDIR); fi - @touch $(LIBDIR)/.build.$(TAG) - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - @touch $(BUILDDIR)/.build.$(TAG) - #------------------------------------------------------------------------------- # Generic target and build rules: objects from C++ compilation -$(BUILDDIR)/%.o : %.cc *.h $(BUILDDIR)/.build.$(TAG) +$(BUILDDIR)/%.o : %.cc *.h @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi $(CXX) $(CPPFLAGS) $(CXXFLAGS) -fPIC -c $< -o $@ # Generic target and build rules: objects from CUDA compilation -$(BUILDDIR)/%_cu.o : %.cc *.h $(BUILDDIR)/.build.$(TAG) +$(BUILDDIR)/%_cu.o : %.cc *.h @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c -x cu $< -o $@ @@ -271,20 +267,61 @@ endif # Target: clean the builds .PHONY: clean +BUILD_DIRS := $(wildcard build.*) +NUM_BUILD_DIRS := $(words $(BUILD_DIRS)) + clean: ifeq ($(USEBUILDDIR),1) - rm -rf $(LIBDIR) - rm -rf $(BUILDDIR) +ifeq ($(NUM_BUILD_DIRS),1) + $(info USEBUILDDIR=1, only one src build directory found.) + rm -rf ../lib/$(BUILD_DIRS) + rm -rf $(BUILD_DIRS) +else ifeq ($(NUM_BUILD_DIRS),0) + $(error USEBUILDDIR=1, but no src build directories are found.) else - rm -f $(LIBDIR)/.build.* $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so - rm -f $(BUILDDIR)/.build.* $(BUILDDIR)/*.o $(BUILDDIR)/*.exe + $(error Multiple src BUILDDIR's found! Use 'cleannone', 'cleansse4', 'cleanavx2', 'clean512y','clean512z', 'cleancuda' or 'cleanall'.) +endif +else + rm -f ../lib/lib$(MG5AMC_COMMONLIB).so + rm -f $(BUILDDIR)/*.o $(BUILDDIR)/*.exe endif cleanall: @echo - $(MAKE) clean -f $(THISMK) + rm -f ../lib/lib$(MG5AMC_COMMONLIB).so + rm -f $(BUILDDIR)/*.o $(BUILDDIR)/*.exe @echo - rm -rf $(LIBDIR)/build.* + rm -rf ../lib/build.* rm -rf build.* +# Target: clean different builds + +cleannone: + rm -rf ../lib/build.none_* + rm -rf build.none_* + +cleansse4: + rm -rf ../lib/build.sse4_* + rm -rf build.sse4_* + +cleanavx2: + rm -rf ../lib/build.avx2_* + rm -rf build.avx2_* + +clean512y: + rm -rf ../lib/build.512y_* + rm -rf build.512y_* + +clean512z: + rm -rf ../lib/build.512z_* + rm -rf build.512z_* + +cleancuda: + rm -rf ../lib/build.cuda_* + rm -rf build.cuda_* + +cleandir: + rm -f ./*.o ./*.exe + rm -f ../lib/lib$(MG5AMC_COMMONLIB).so + #------------------------------------------------------------------------------- diff --git a/epochX/cudacpp/gg_ttg.mad/Cards/delphes_trigger.dat b/epochX/cudacpp/gg_ttg.mad/Cards/delphes_trigger.dat new file mode 100644 index 0000000000..0aab0677aa --- /dev/null +++ b/epochX/cudacpp/gg_ttg.mad/Cards/delphes_trigger.dat @@ -0,0 +1,20 @@ +#TRIGGER CARD # DO NOT REMOVE THIS IS A TAG! + +# list of trigger algorithms +# trigger_name >> algorithm #comments +Inclusive electron >> ELEC1_PT: '29' +di-electron >> ELEC1_PT: '17' && ELEC2_PT: '17' +Inclusive Photon >> GAMMA1_PT: '80' +di-Photon >> GAMMA1_PT: '40' && GAMMA2_PT: '25' +Inclusive muon >> MUON1_PT: '19' +di-muon >> MUON1_PT: '7' && MUON2_PT: '7' +Taujet and ETmis >> TAU1_PT: '86' && ETMIS_PT: '65' +di-Taujets >> TAU1_PT: '59' && TAU2_PT: '59' +Jet and ETmis >> JET1_PT: '180' && ETMIS_PT: '123' +Taujet and electron >> TAU1_PT: '45' && ELEC1_PT: '19' +Taujet and muon >> TAU1_PT: '40' && ELEC1_PT: '15' +Inclusive b-jet >> Bjet1_PT: '237' +Inclusive 1 jet >> JET1_PT: '657' +Inclusive 3 jets >> JET1_PT: '247' && JET2_PT: '247' && JET3_PT: '247' +Inclusive 4 jets >> JET1_PT: '113' && JET2_PT: '113' && JET3_PT: '113' && JET4_PT: '113' + diff --git a/epochX/cudacpp/gg_ttg.mad/Cards/me5_configuration.txt b/epochX/cudacpp/gg_ttg.mad/Cards/me5_configuration.txt index 27acb12a1e..8a0c1e6345 100644 --- a/epochX/cudacpp/gg_ttg.mad/Cards/me5_configuration.txt +++ b/epochX/cudacpp/gg_ttg.mad/Cards/me5_configuration.txt @@ -234,7 +234,7 @@ # pineappl = pineappl -mg5_path = /data/stephan/madgraph4gpu/MG5aMC/mg5amcnlo +mg5_path = /afs/cern.ch/work/j/jteig/madgraph4gpu/MG5aMC/mg5amcnlo # MG5 MAIN DIRECTORY -mg5_path = /data/stephan/madgraph4gpu/MG5aMC/mg5amcnlo +mg5_path = /afs/cern.ch/work/j/jteig/madgraph4gpu/MG5aMC/mg5amcnlo diff --git a/epochX/cudacpp/gg_ttg.mad/Cards/plot_card.dat b/epochX/cudacpp/gg_ttg.mad/Cards/plot_card.dat new file mode 100644 index 0000000000..9abe1cc05e --- /dev/null +++ b/epochX/cudacpp/gg_ttg.mad/Cards/plot_card.dat @@ -0,0 +1,203 @@ +#************************************************************************** +# Card for MadAnalysis * +# * +# This file is used to set the classes and options for * +# the MadAnalysis program. * +# * +# * +# Some comments about the classes * +# 1. Plots are for classes of particles. * +# 2. Each particle is identified by its PDG code. * +# 3. Classes names are arbitrary (4 symbols max, no spaces allowed). * +# 4. Particles in the same class will be ordered with the 'ordering * +# function' in the file in_func.f. * +# 5. Classes can be added/edited/removed at will, and given a name * +# that will then appear in the plots. * +# 6. A particle can be put in one class only. Putting a particle in * +# two or more classes can lead to double counting of events. * +# 7. The class name mET is missing Energy and its name is reserved. * +# If used, it must be put last in the classes list below. * +# 8. If events contain particles not belonging to an existing class, * +# a new class will automatically be generated. * +# 9. For LHCO events the PDG code 21 is assigned to a jet (not * +# b-tagged), 5 to a b-tagged jet and 12 to missing ET. * +# * +# * +# Some comments about the cuts * +# 1. In the file kin_func.f the functions on which cuts can be applied * +# are given. * +# 2. The syntax is as follows. * +# etmin 1 3 30d0 * +# means that from the first class the Et of the first three particles * +# has to be greater than 30 GeV. * +# * +# etmissmin 20d0 * +# means that there must be at least 20 GeV of missing Et * +# * +# dRmin 2 1 4 3 3d0 * +# means that the distance between the first particle in the second * +# class and the first three particles in the fourth class has to be * +# greater than 3. * +# * +# ptmax 1 3 10d0 * +# ptmax 1 2 15d0 * +# means that the maximum pt of the third particle in the first class * +# has to smaller than 10 GeV, and the first two particles of this * +# class has to be smaller than 15 GeV * +# 3. The ordering of the particles within a class can be set with the * +# 'ordering function' in the file kin_func.f. * +# 4. For all the 'min' cuts, an event will be thrown away if the particle * +# does not exist. On the other hand, for all the 'max' cuts the cut * +# will be ignored if the particle does not exist * +# (Only dRij is an exception, for which it is the other way around) * +# * +# * +# * +# Some comments about the plotting options * +# 1. In the file kin_func.f the functions can be found that can be * +# plotted. (only for off-line usage) * +# 2. With the plotting options one can set the number of plots for each * +# of these functions. * +# 3. One has to specify for each variable which particles from which * +# class are used to set the plots. Syntax: * +# et 2 4 * +# means that the transverse energy of the first four particles in the * +# second class will be plotted. * +# mij 1 3 * +# mij 2 2 * +# means that for the invariant mass plots the first three particles * +# from the first class and the first two from the second class will be * +# used to plot the invariant mass of two particles. (10 plots) * +# 4. The ordering of the particles in a class can be set with the * +# 'ordering_function'. pt, e and et are valid functions. (For off-line * +# users X1, X2 and X3 can also be used, if defined in kin_func.f.) * +# 5. Max number of plots is 200. * +# * +# * +#************************************************************************** +# Put here your list of classes +#************************************************************************** +# Do NOT put spaces before class names! +# Begin Classes # This is TAG. Do not modify this line +jet 1 -1 2 -2 3 -3 4 -4 21 # Class number 1 +b 5 -5 # Class number 2 +mET 12 -12 14 -14 16 -16 1000022 # Missing ET class, name is reserved +# End Classes # This is TAG. Do not modify this line +#************************************************************************** +ordering_function pt # orders particles in classes according to their pt +normalization xsec # histogram normalization, xsec or number (e.g. 1) +#************************************************************************** +# Put here list of minimum pt for the classes +#************************************************************************** +# Begin Minpts # This is TAG. Do not modify this line +#1 30 +#2 40 +#3 10 +# End Minpts # This is TAG. Do not modify this line +#************************************************************************** +# Cuts on plotted events +#************************************************************************** +# Modify the cuts and remove the pounds/hashes to apply those cuts +# Do NOT put spaces at the beginning of the following lines! +# Begin Cuts # This is TAG. Do not modify this line +#etmin 2 2 40d0 +#etmin 2 1 80d0 +#etmin 1 3 20d0 +#etmax 2 1 200d0 +#ptmin 3 1 0d0 +#etmissmin 20d0 +#etmissmax 80d0 +#etamax 1 1 1d0 +#etamax 2 1 2d0 +#etamin 2 2 1.5d0 +#etamin 2 1 2d0 +#mijmax 2 1 2 2 200d0 +#mijmin 2 1 2 2 100d0 +#X1min 2 1 40d0 +#X1max 2 2 50d0 +#dRijmin 2 1 2 2 0.7d0 +#dRijmax 1 3 2 2 0.7d0 +#XY1min 2 2 2 2 20d0 +#XYZA2max 2 2 2 2 4 1 5 1 40d0 +# End Cuts # This is TAG. Do not modify this line +#************************************************************************** +# Put here the required plots +#************************************************************************** +# Do NOT put spaces at the beginning of the following lines! +# Begin PlotDefs # This is TAG. Do not modify this line +pt 1 4 # plot pt for the first four particles in class 1 +pt 2 4 # plot pt for the first four particles in class 2 +pt 3 4 # plot pt for the first four particles in class 3 +pt 4 4 # plot pt for the first four particles in class 4 +pt 5 4 # etc. +pt 6 4 +pt 7 4 +#e 2 2 +y 1 4 # plot rapidity for the first four particles in class 1 +y 2 4 +y 3 4 +y 4 4 +y 5 4 +y 6 4 +y 7 4 +#eta 2 2 # plot pseudo-rapidity for the first two part in the 2nd class +#mom 4 1 +#costh 5 1 +#phi 2 2 +#delta_eta 2 2 +#delta_eta 4 1 +mij 1 4 # use the first four particles in the 1st class to plot inv. mass +mij 2 2 # use the first two particles from the second class as well +mij 3 1 # etc. +mij 4 1 +mij 5 1 +mij 6 1 +mij 7 1 +#cosij 1 2 +#cosij 2 2 +#cosij 3 1 +#cosij 4 1 +dRij 1 4 +dRij 2 2 +dRij 3 1 +dRij 4 1 +dRij 5 1 +dRij 6 1 +dRij 7 1 +#delta_phi 2 2 +#delta_phi 4 1 +#delta_phi 5 1 +#X1 2 2 # plot X1 (defined in kin_func.f) +#XYZA1 2 2 +#XYZA1 4 1 +#XYZA1 5 1 +# End PlotDefs # This is TAG. Do not modify this line +#************************************************************************** +#************************************************************************** +# Put here the plot ranges +#************************************************************************** +# Do NOT put spaces at the beginning of the following lines! +# Begin PlotRange # This is TAG. Do not modify this line +pt 10 0 500 # bin size, min value, max value +et 10 0 500 # bin size, min value, max value +etmiss 10 0 500 # bin size, min value, max value +ht 20 0 1500 +y 0.2 -5 5 # etc. +mij 20 0 1500 +dRij 0.1 0 5 +#delta_phi 0.1 0 3.1 +#X1 1 0 100 +#XYZA1 1 0 100 +# End PlotRange # This is TAG. Do not modify this line +#************************************************************************** +#************************************************************************** +# Output for plots +#************************************************************************** +# Do NOT put spaces at the beginning of the following lines! +# Begin PlotOutput # This is TAG. Do not modify this line +output topdrawer # set to topdrawer or gnuplot +plot_decayed no # plot (and cut) dec. res.? (Only for LHE events) +# End PlotOutput # This is TAG. Do not modify this line +#************************************************************************** +# +# diff --git a/epochX/cudacpp/gg_ttg.mad/Cards/run_card.dat b/epochX/cudacpp/gg_ttg.mad/Cards/run_card.dat index a9fbb5a212..1464f610ba 100644 --- a/epochX/cudacpp/gg_ttg.mad/Cards/run_card.dat +++ b/epochX/cudacpp/gg_ttg.mad/Cards/run_card.dat @@ -77,7 +77,7 @@ #********************************************************************* 0 = nhel ! using helicities importance sampling or not. ! 0: sum over helicity, 1: importance sampling - 1 = sde_strategy ! default integration strategy (hep-ph/2021.00773) + 2 = sde_strategy ! default integration strategy (hep-ph/2021.00773) ! 1 is old strategy (using amp square) ! 2 is new strategy (using only the denominator) # To see advanced option for Phase-Space optimization: type "update psoptim" @@ -142,13 +142,3 @@ # systematics = systematics_program ! none, systematics [python], SysCalc [depreceted, C++] ['--mur=0.5,1,2', '--muf=0.5,1,2', '--pdf=errorset'] = systematics_arguments ! see: https://cp3.irmp.ucl.ac.be/projects/madgraph/wiki/Systematics#Systematicspythonmodule - -#********************************************************************* -# Options for the cudacpp plugin -#********************************************************************* - -# Set cudacpp-specific values of non-cudacpp-specific options --O3 -ffast-math -fbounds-check = global_flag ! build flags for Fortran code (for a fair comparison to cudacpp) - -# New cudacpp-specific options (default values are defined in banner.py) -CPP = cudacpp_backend ! valid backends are FORTRAN, CPP, CUDA diff --git a/epochX/cudacpp/gg_ttg.mad/Source/DHELAS/aloha_file.inc b/epochX/cudacpp/gg_ttg.mad/Source/DHELAS/aloha_file.inc index 7639734c1c..9d01a65cec 100644 --- a/epochX/cudacpp/gg_ttg.mad/Source/DHELAS/aloha_file.inc +++ b/epochX/cudacpp/gg_ttg.mad/Source/DHELAS/aloha_file.inc @@ -1 +1 @@ -ALOHARoutine = FFV1P0_3.o FFV1_0.o FFV1_1.o FFV1_2.o VVV1P0_1.o VVV1_0.o VVVV1P0_1.o VVVV3P0_1.o VVVV4P0_1.o +ALOHARoutine = VVV1_0.o VVV1P0_1.o FFV1_0.o FFV1_1.o FFV1_2.o FFV1P0_3.o VVVV1P0_1.o VVVV3P0_1.o VVVV4P0_1.o diff --git a/epochX/cudacpp/gg_ttg.mad/Source/PDF/pdfwrap_lhapdf.f b/epochX/cudacpp/gg_ttg.mad/Source/PDF/pdfwrap_lhapdf.f index 0be926e6cd..3f36905346 100644 --- a/epochX/cudacpp/gg_ttg.mad/Source/PDF/pdfwrap_lhapdf.f +++ b/epochX/cudacpp/gg_ttg.mad/Source/PDF/pdfwrap_lhapdf.f @@ -5,6 +5,7 @@ SUBROUTINE PDFWRAP C INCLUDE 'pdf.inc' INCLUDE '../alfas.inc' + INCLUDE '../vector.inc' INCLUDE '../coupl.inc' REAL*8 ZMASS DATA ZMASS/91.188D0/ diff --git a/epochX/cudacpp/gg_ttg.mad/Source/make_opts b/epochX/cudacpp/gg_ttg.mad/Source/make_opts index bd3c24228d..2607530b78 100644 --- a/epochX/cudacpp/gg_ttg.mad/Source/make_opts +++ b/epochX/cudacpp/gg_ttg.mad/Source/make_opts @@ -1,17 +1,11 @@ -pdlabel1= -pdlabel2= -lhapdf= -PYTHIA8_PATH=NotInstalled -MG5AMC_VERSION=3.5.0_lo_vect -GLOBAL_FLAG=-O3 -ffast-math -fbounds-check -ALOHA_FLAG= -MATRIX_FLAG= DEFAULT_CPP_COMPILER=g++ MACFLAG= STDLIB=-lstdc++ STDLIB_FLAG= DEFAULT_F_COMPILER=gfortran -DEFAULT_F2PY_COMPILER=f2py3 +DEFAULT_F2PY_COMPILER=f2py3.9 +MG5AMC_VERSION=SpecifiedByMG5aMCAtRunTime +PYTHIA8_PATH=NotInstalled #end_of_make_opts_variables BIASLIBDIR=../../../lib/ diff --git a/epochX/cudacpp/gg_ttg.mad/Source/makefile b/epochX/cudacpp/gg_ttg.mad/Source/makefile index dbe08b846e..00c73099a0 100644 --- a/epochX/cudacpp/gg_ttg.mad/Source/makefile +++ b/epochX/cudacpp/gg_ttg.mad/Source/makefile @@ -136,5 +136,7 @@ cleanSource: clean: cleanSource for i in `ls -d ../SubProcesses/P*`; do cd $$i; make clean; cd -; done; -cleanall: cleanSource +cleanavx: + for i in `ls -d ../SubProcesses/P*`; do cd $$i; make cleanavxs; cd -; done; +cleanall: cleanSource # THIS IS THE ONE for i in `ls -d ../SubProcesses/P*`; do cd $$i; make cleanavxs; cd -; done; diff --git a/epochX/cudacpp/gg_ttg.mad/SubProcesses/MatrixElementKernels.cc b/epochX/cudacpp/gg_ttg.mad/SubProcesses/MatrixElementKernels.cc index 30257195b6..cfed7d2af5 100644 --- a/epochX/cudacpp/gg_ttg.mad/SubProcesses/MatrixElementKernels.cc +++ b/epochX/cudacpp/gg_ttg.mad/SubProcesses/MatrixElementKernels.cc @@ -112,10 +112,17 @@ namespace mg5amcCpu // See https://community.arm.com/arm-community-blogs/b/operating-systems-blog/posts/runtime-detection-of-cpu-features-on-an-armv8-a-cpu bool ok = true; // this is just an assumption! const std::string tag = "arm neon (128bit as in SSE4.2)"; -#else +#elif defined(__x86_64__) || defined(__i386__) bool known = true; bool ok = __builtin_cpu_supports( "sse4.2" ); const std::string tag = "nehalem (SSE4.2)"; +#else + bool known = false; // __builtin_cpu_supports is not supported + // See https://gcc.gnu.org/onlinedocs/gcc/Basic-PowerPC-Built-in-Functions-Available-on-all-Configurations.html + // See https://stackoverflow.com/q/62783908 + // See https://community.arm.com/arm-community-blogs/b/operating-systems-blog/posts/runtime-detection-of-cpu-features-on-an-armv8-a-cpu + bool ok = true; // this is just an assumption! + const std::string tag = "arm neon (128bit as in SSE4.2)"; #endif #else bool known = true; diff --git a/epochX/cudacpp/gg_ttg.mad/SubProcesses/P1_gg_ttxg/CPPProcess.cc b/epochX/cudacpp/gg_ttg.mad/SubProcesses/P1_gg_ttxg/CPPProcess.cc index 8cc007dff8..8d5864c1d8 100644 --- a/epochX/cudacpp/gg_ttg.mad/SubProcesses/P1_gg_ttxg/CPPProcess.cc +++ b/epochX/cudacpp/gg_ttg.mad/SubProcesses/P1_gg_ttxg/CPPProcess.cc @@ -248,11 +248,11 @@ namespace mg5amcCpu vxxxxx( momenta, 0., cHel[ihel][4], +1, w_fp[4], 4 ); - VVV1P0_1( w_fp[0], w_fp[1], COUPs[0], 0., 0., w_fp[5] ); - FFV1P0_3( w_fp[3], w_fp[2], COUPs[1], 0., 0., w_fp[6] ); + VVV1P0_1( w_fp[0], w_fp[1], COUPs[0], 1.0, 0., 0., w_fp[5] ); + FFV1P0_3( w_fp[3], w_fp[2], COUPs[1], 1.0, 0., 0., w_fp[6] ); // Amplitude(s) for diagram number 1 - VVV1_0( w_fp[5], w_fp[6], w_fp[4], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[5], w_fp[6], w_fp[4], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -265,10 +265,10 @@ namespace mg5amcCpu // *** DIAGRAM 2 OF 16 *** // Wavefunction(s) for diagram number 2 - FFV1_1( w_fp[2], w_fp[4], COUPs[1], cIPD[0], cIPD[1], w_fp[7] ); + FFV1_1( w_fp[2], w_fp[4], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[7] ); // Amplitude(s) for diagram number 2 - FFV1_0( w_fp[3], w_fp[7], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[7], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 2 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -279,10 +279,10 @@ namespace mg5amcCpu // *** DIAGRAM 3 OF 16 *** // Wavefunction(s) for diagram number 3 - FFV1_2( w_fp[3], w_fp[4], COUPs[1], cIPD[0], cIPD[1], w_fp[8] ); + FFV1_2( w_fp[3], w_fp[4], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[8] ); // Amplitude(s) for diagram number 3 - FFV1_0( w_fp[8], w_fp[2], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[8], w_fp[2], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 3 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -293,11 +293,11 @@ namespace mg5amcCpu // *** DIAGRAM 4 OF 16 *** // Wavefunction(s) for diagram number 4 - FFV1_1( w_fp[2], w_fp[0], COUPs[1], cIPD[0], cIPD[1], w_fp[5] ); - FFV1_2( w_fp[3], w_fp[1], COUPs[1], cIPD[0], cIPD[1], w_fp[9] ); + FFV1_1( w_fp[2], w_fp[0], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[5] ); + FFV1_2( w_fp[3], w_fp[1], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[9] ); // Amplitude(s) for diagram number 4 - FFV1_0( w_fp[9], w_fp[5], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[9], w_fp[5], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 4 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -307,10 +307,10 @@ namespace mg5amcCpu // *** DIAGRAM 5 OF 16 *** // Wavefunction(s) for diagram number 5 - VVV1P0_1( w_fp[1], w_fp[4], COUPs[0], 0., 0., w_fp[10] ); + VVV1P0_1( w_fp[1], w_fp[4], COUPs[0], 1.0, 0., 0., w_fp[10] ); // Amplitude(s) for diagram number 5 - FFV1_0( w_fp[3], w_fp[5], w_fp[10], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[5], w_fp[10], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 5 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -324,7 +324,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 6 - FFV1_0( w_fp[8], w_fp[5], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[8], w_fp[5], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 6 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -334,11 +334,11 @@ namespace mg5amcCpu // *** DIAGRAM 7 OF 16 *** // Wavefunction(s) for diagram number 7 - FFV1_2( w_fp[3], w_fp[0], COUPs[1], cIPD[0], cIPD[1], w_fp[5] ); - FFV1_1( w_fp[2], w_fp[1], COUPs[1], cIPD[0], cIPD[1], w_fp[11] ); + FFV1_2( w_fp[3], w_fp[0], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[5] ); + FFV1_1( w_fp[2], w_fp[1], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[11] ); // Amplitude(s) for diagram number 7 - FFV1_0( w_fp[5], w_fp[11], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[5], w_fp[11], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 7 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -351,7 +351,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 8 - FFV1_0( w_fp[5], w_fp[2], w_fp[10], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[5], w_fp[2], w_fp[10], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 8 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -365,7 +365,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 9 - FFV1_0( w_fp[5], w_fp[7], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[5], w_fp[7], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 9 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -375,10 +375,10 @@ namespace mg5amcCpu // *** DIAGRAM 10 OF 16 *** // Wavefunction(s) for diagram number 10 - VVV1P0_1( w_fp[0], w_fp[4], COUPs[0], 0., 0., w_fp[5] ); + VVV1P0_1( w_fp[0], w_fp[4], COUPs[0], 1.0, 0., 0., w_fp[5] ); // Amplitude(s) for diagram number 10 - FFV1_0( w_fp[3], w_fp[11], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[11], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 10 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -392,7 +392,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 11 - FFV1_0( w_fp[9], w_fp[2], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[9], w_fp[2], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 11 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -406,7 +406,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 12 - VVV1_0( w_fp[5], w_fp[1], w_fp[6], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[5], w_fp[1], w_fp[6], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 12 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -422,7 +422,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 13 - FFV1_0( w_fp[8], w_fp[11], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[8], w_fp[11], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 13 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -435,7 +435,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 14 - FFV1_0( w_fp[9], w_fp[7], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[9], w_fp[7], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 14 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -448,7 +448,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 15 - VVV1_0( w_fp[0], w_fp[10], w_fp[6], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[0], w_fp[10], w_fp[6], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 15 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -461,22 +461,22 @@ namespace mg5amcCpu // *** DIAGRAM 16 OF 16 *** // Wavefunction(s) for diagram number 16 - VVVV1P0_1( w_fp[0], w_fp[1], w_fp[4], COUPs[2], 0., 0., w_fp[10] ); - VVVV3P0_1( w_fp[0], w_fp[1], w_fp[4], COUPs[2], 0., 0., w_fp[6] ); - VVVV4P0_1( w_fp[0], w_fp[1], w_fp[4], COUPs[2], 0., 0., w_fp[9] ); + VVVV1P0_1( w_fp[0], w_fp[1], w_fp[4], COUPs[2], 1.0, 0., 0., w_fp[10] ); + VVVV3P0_1( w_fp[0], w_fp[1], w_fp[4], COUPs[2], 1.0, 0., 0., w_fp[6] ); + VVVV4P0_1( w_fp[0], w_fp[1], w_fp[4], COUPs[2], 1.0, 0., 0., w_fp[9] ); // Amplitude(s) for diagram number 16 - FFV1_0( w_fp[3], w_fp[2], w_fp[10], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[2], w_fp[10], COUPs[1], 1.0, &_fp[0] ); jamp_sv[0] += amp_sv[0]; jamp_sv[1] -= amp_sv[0]; jamp_sv[3] -= amp_sv[0]; jamp_sv[5] += amp_sv[0]; - FFV1_0( w_fp[3], w_fp[2], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[2], w_fp[6], COUPs[1], 1.0, &_fp[0] ); jamp_sv[1] -= amp_sv[0]; jamp_sv[2] += amp_sv[0]; jamp_sv[3] -= amp_sv[0]; jamp_sv[4] += amp_sv[0]; - FFV1_0( w_fp[3], w_fp[2], w_fp[9], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[2], w_fp[9], COUPs[1], 1.0, &_fp[0] ); jamp_sv[0] -= amp_sv[0]; jamp_sv[2] += amp_sv[0]; jamp_sv[4] += amp_sv[0]; @@ -1020,8 +1020,7 @@ namespace mg5amcCpu { // nprocesses>1 was last observed for "mirror processes" in uux_ttx in the 270 branch (see issue #343 and PRs #360 and #396) constexpr int nprocesses = 1; - static_assert( nprocesses == 1, "Assume nprocesses == 1" ); - // process_id corresponds to the index of DSIG1 Fortran functions (must be 1 because cudacpp is unable to handle DSIG2) + static_assert( nprocesses == 1 || nprocesses == 2, "Assume nprocesses == 1 or 2" ); constexpr int process_id = 1; // code generation source: madevent + cudacpp exporter static_assert( process_id == 1, "Assume process_id == 1" ); } diff --git a/epochX/cudacpp/gg_ttg.mad/SubProcesses/P1_gg_ttxg/auto_dsig1.f b/epochX/cudacpp/gg_ttg.mad/SubProcesses/P1_gg_ttxg/auto_dsig1.f index 668cc26192..b8615bc68f 100644 --- a/epochX/cudacpp/gg_ttg.mad/SubProcesses/P1_gg_ttxg/auto_dsig1.f +++ b/epochX/cudacpp/gg_ttg.mad/SubProcesses/P1_gg_ttxg/auto_dsig1.f @@ -39,6 +39,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C LOCAL VARIABLES C INTEGER I,ITYPE,LP,IPROC + DOUBLE PRECISION QSCALE DOUBLE PRECISION G1 DOUBLE PRECISION G2 DOUBLE PRECISION XPQ(-7:7),PD(0:MAXPROC) @@ -126,11 +127,24 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) IF (ABS(LPP(IB(1))).GE.1) THEN !LP=SIGN(1,LPP(IB(1))) - G1=PDG2PDF(LPP(IB(1)),0, IB(1),XBK(IB(1)),DSQRT(Q2FACT(IB(1)))) + IF (DSQRT(Q2FACT(IB(1))).EQ.0D0) THEN + QSCALE=0D0 + DO I=3,NEXTERNAL + QSCALE=QSCALE+DSQRT(MAX(0D0,(PP(0,I)+PP(3,I))*(PP(0,I) + $ -PP(3,I)))) + ENDDO + QSCALE=QSCALE/2D0 + ELSE + QSCALE=DSQRT(Q2FACT(IB(1))) + ENDIF + G1=PDG2PDF(LPP(IB(1)),0, IB(1),XBK(IB(1)), QSCALE) ENDIF IF (ABS(LPP(IB(2))).GE.1) THEN !LP=SIGN(1,LPP(IB(2))) - G2=PDG2PDF(LPP(IB(2)),0, IB(2),XBK(IB(2)),DSQRT(Q2FACT(IB(2)))) + IF (DSQRT(Q2FACT(IB(2))).NE.0D0) THEN + QSCALE=DSQRT(Q2FACT(IB(2))) + ENDIF + G2=PDG2PDF(LPP(IB(2)),0, IB(2),XBK(IB(2)), QSCALE) ENDIF PD(0) = 0D0 IPROC = 0 diff --git a/epochX/cudacpp/gg_ttg.mad/SubProcesses/P1_gg_ttxg/matrix1.f b/epochX/cudacpp/gg_ttg.mad/SubProcesses/P1_gg_ttxg/matrix1.f index 7188daef76..2fc7bcdb89 100644 --- a/epochX/cudacpp/gg_ttg.mad/SubProcesses/P1_gg_ttxg/matrix1.f +++ b/epochX/cudacpp/gg_ttg.mad/SubProcesses/P1_gg_ttxg/matrix1.f @@ -359,7 +359,7 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C LOCAL VARIABLES C INTEGER I,J,M,N - COMPLEX*16 ZTEMP, TMP_JAMP(10) + COMPLEX*16 ZTEMP, TMP_JAMP(9) REAL*8 CF(NCOLOR,NCOLOR) COMPLEX*16 AMP(NGRAPHS), JAMP(NCOLOR,NAMPSO) COMPLEX*16 W(6,NWAVEFUNCS) @@ -508,33 +508,30 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) TMP_JAMP(3) = AMP(15) + AMP(16) ! used 4 times TMP_JAMP(2) = AMP(1) + AMP(18) ! used 4 times TMP_JAMP(1) = AMP(12) - AMP(17) ! used 4 times - TMP_JAMP(10) = TMP_JAMP(3) - TMP_JAMP(2) ! used 2 times - TMP_JAMP(9) = TMP_JAMP(1) + ((-0.000000000000000D+00 + TMP_JAMP(9) = TMP_JAMP(3) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(8) ! used 2 times + TMP_JAMP(8) = TMP_JAMP(3) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(5) ! used 2 times + TMP_JAMP(7) = TMP_JAMP(2) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(2) ! used 2 times + TMP_JAMP(6) = TMP_JAMP(2) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(3) ! used 2 times + TMP_JAMP(5) = TMP_JAMP(1) + ((-0.000000000000000D+00 $ ,1.000000000000000D+00)) * AMP(11) ! used 2 times - TMP_JAMP(8) = TMP_JAMP(2) - TMP_JAMP(1) ! used 2 times - TMP_JAMP(7) = TMP_JAMP(1) + ((0.000000000000000D+00, + TMP_JAMP(4) = TMP_JAMP(1) + ((0.000000000000000D+00, $ -1.000000000000000D+00)) * AMP(10) ! used 2 times - TMP_JAMP(6) = TMP_JAMP(3) - TMP_JAMP(1) ! used 2 times - TMP_JAMP(5) = TMP_JAMP(2) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(3) ! used 2 times - TMP_JAMP(4) = TMP_JAMP(3) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(5) ! used 2 times - JAMP(1,1) = (-1.000000000000000D+00)*AMP(6)+TMP_JAMP(4)+( - $ -1.000000000000000D+00)*TMP_JAMP(5) - JAMP(2,1) = (-1.000000000000000D+00)*AMP(4)+(-1.000000000000000D - $ +00)*TMP_JAMP(4)+TMP_JAMP(9) - JAMP(3,1) = (-1.000000000000000D+00)*AMP(13)+TMP_JAMP(5)+( - $ -1.000000000000000D+00)*TMP_JAMP(7) - JAMP(4,1) = (-1.000000000000000D+00)*AMP(7)+((0.000000000000000D - $ +00,1.000000000000000D+00))*AMP(8)+((0.000000000000000D+00, - $ -1.000000000000000D+00))*AMP(10)+(-1.000000000000000D+00) - $ *TMP_JAMP(6) - JAMP(5,1) = ((0.000000000000000D+00,1.000000000000000D+00)) - $ *AMP(2)+((0.000000000000000D+00,-1.000000000000000D+00))*AMP(11) - $ +(-1.000000000000000D+00)*AMP(14)+TMP_JAMP(8) - JAMP(6,1) = ((0.000000000000000D+00,-1.000000000000000D+00)) - $ *AMP(2)+((0.000000000000000D+00,-1.000000000000000D+00))*AMP(8) - $ +(-1.000000000000000D+00)*AMP(9)+TMP_JAMP(10) + JAMP(1,1) = (-1.000000000000000D+00)*AMP(6)+(-1.000000000000000D + $ +00)*TMP_JAMP(6)+TMP_JAMP(8) + JAMP(2,1) = (-1.000000000000000D+00)*AMP(4)+TMP_JAMP(5)+( + $ -1.000000000000000D+00)*TMP_JAMP(8) + JAMP(3,1) = (-1.000000000000000D+00)*AMP(13)+( + $ -1.000000000000000D+00)*TMP_JAMP(4)+TMP_JAMP(6) + JAMP(4,1) = (-1.000000000000000D+00)*AMP(7)+TMP_JAMP(4)+( + $ -1.000000000000000D+00)*TMP_JAMP(9) + JAMP(5,1) = (-1.000000000000000D+00)*AMP(14)+( + $ -1.000000000000000D+00)*TMP_JAMP(5)+TMP_JAMP(7) + JAMP(6,1) = (-1.000000000000000D+00)*AMP(9)+(-1.000000000000000D + $ +00)*TMP_JAMP(7)+TMP_JAMP(9) IF(INIT_MODE)THEN DO I=1, NGRAPHS diff --git a/epochX/cudacpp/gg_ttg.mad/SubProcesses/cudacpp.mk b/epochX/cudacpp/gg_ttg.mad/SubProcesses/cudacpp.mk index 43cee0977e..15669185ad 100644 --- a/epochX/cudacpp/gg_ttg.mad/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/gg_ttg.mad/SubProcesses/cudacpp.mk @@ -1,7 +1,7 @@ # Copyright (C) 2020-2023 CERN and UCLouvain. # Licensed under the GNU Lesser General Public License (version 3 or later). # Created by: S. Roiser (Feb 2020) for the MG5aMC CUDACPP plugin. -# Further modified by: O. Mattelaer, S. Roiser, A. Valassi (2020-2023) for the MG5aMC CUDACPP plugin. +# Further modified by: J. Teig, O. Mattelaer, S. Roiser, A. Valassi (2020-2023) for the MG5aMC CUDACPP plugin. #=== Determine the name of this makefile (https://ftp.gnu.org/old-gnu/Manuals/make-3.80/html_node/make_17.html) #=== NB: different names (e.g. cudacpp.mk and cudacpp_src.mk) are used in the Subprocess and src directories @@ -86,6 +86,14 @@ endif #------------------------------------------------------------------------------- +.DEFAULT_GOAL := usage + +# Target if user does not specify target +usage: + $(error Unknown target='$(MAKECMDGOALS)': only 'cppnone', 'cppsse4', 'cppavx2', 'cpp512y', 'cpp512z' and 'cuda' are supported!) + +#------------------------------------------------------------------------------- + #=== Configure the C++ compiler CXXFLAGS = $(OPTFLAGS) -std=c++17 $(INCFLAGS) -Wall -Wshadow -Wextra @@ -103,70 +111,73 @@ endif #------------------------------------------------------------------------------- -#=== Configure the CUDA compiler - -# If CXX is not a single word (example "clang++ --gcc-toolchain...") then disable CUDA builds (issue #505) -# This is because it is impossible to pass this to "CUFLAGS += -ccbin " below -ifneq ($(words $(subst ccache ,,$(CXX))),1) # allow at most "CXX=ccache " from outside - $(warning CUDA builds are not supported for multi-word CXX "$(CXX)") - override CUDA_HOME=disabled -endif - -# If CUDA_HOME is not set, try to set it from the location of nvcc -ifndef CUDA_HOME - CUDA_HOME = $(patsubst %bin/nvcc,%,$(shell which nvcc 2>/dev/null)) - $(warning CUDA_HOME was not set: using "$(CUDA_HOME)") -endif - -# Set NVCC as $(CUDA_HOME)/bin/nvcc if it exists -ifneq ($(wildcard $(CUDA_HOME)/bin/nvcc),) - NVCC = $(CUDA_HOME)/bin/nvcc - USE_NVTX ?=-DUSE_NVTX - # See https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html - # See https://arnon.dk/matching-sm-architectures-arch-and-gencode-for-various-nvidia-cards/ - # Default: use compute capability 70 for V100 (CERN lxbatch, CERN itscrd, Juwels Cluster). - # Embed device code for 70, and PTX for 70+. - # Export MADGRAPH_CUDA_ARCHITECTURE (comma-separated list) to use another value or list of values (see #533). - # Examples: use 60 for P100 (Piz Daint), 80 for A100 (Juwels Booster, NVidia raplab/Curiosity). - MADGRAPH_CUDA_ARCHITECTURE ?= 70 - ###CUARCHFLAGS = -gencode arch=compute_$(MADGRAPH_CUDA_ARCHITECTURE),code=compute_$(MADGRAPH_CUDA_ARCHITECTURE) -gencode arch=compute_$(MADGRAPH_CUDA_ARCHITECTURE),code=sm_$(MADGRAPH_CUDA_ARCHITECTURE) # Older implementation (AV): go back to this one for multi-GPU support #533 - ###CUARCHFLAGS = --gpu-architecture=compute_$(MADGRAPH_CUDA_ARCHITECTURE) --gpu-code=sm_$(MADGRAPH_CUDA_ARCHITECTURE),compute_$(MADGRAPH_CUDA_ARCHITECTURE) # Newer implementation (SH): cannot use this as-is for multi-GPU support #533 - comma:=, - CUARCHFLAGS = $(foreach arch,$(subst $(comma), ,$(MADGRAPH_CUDA_ARCHITECTURE)),-gencode arch=compute_$(arch),code=compute_$(arch) -gencode arch=compute_$(arch),code=sm_$(arch)) - CUINC = -I$(CUDA_HOME)/include/ - CURANDLIBFLAGS = -L$(CUDA_HOME)/lib64/ -lcurand # NB: -lcuda is not needed here! - CUOPTFLAGS = -lineinfo - CUFLAGS = $(foreach opt, $(OPTFLAGS), -Xcompiler $(opt)) $(CUOPTFLAGS) $(INCFLAGS) $(CUINC) $(USE_NVTX) $(CUARCHFLAGS) -use_fast_math - ###CUFLAGS += -Xcompiler -Wall -Xcompiler -Wextra -Xcompiler -Wshadow - ###NVCC_VERSION = $(shell $(NVCC) --version | grep 'Cuda compilation tools' | cut -d' ' -f5 | cut -d, -f1) - CUFLAGS += -std=c++17 # need CUDA >= 11.2 (see #333): this is enforced in mgOnGpuConfig.h - # Without -maxrregcount: baseline throughput: 6.5E8 (16384 32 12) up to 7.3E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 160 # improves throughput: 6.9E8 (16384 32 12) up to 7.7E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 128 # improves throughput: 7.3E8 (16384 32 12) up to 7.6E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 96 # degrades throughput: 4.1E8 (16384 32 12) up to 4.5E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 64 # degrades throughput: 1.7E8 (16384 32 12) flat at 1.7E8 (65536 128 12) -else ifneq ($(origin REQUIRE_CUDA),undefined) - # If REQUIRE_CUDA is set but no cuda is found, stop here (e.g. for CI tests on GPU #443) - $(error No cuda installation found (set CUDA_HOME or make nvcc visible in PATH)) -else - # No cuda. Switch cuda compilation off and go to common random numbers in C++ - $(warning CUDA_HOME is not set or is invalid: export CUDA_HOME to compile with cuda) - override NVCC= - override USE_NVTX= - override CUINC= - override CURANDLIBFLAGS= -endif -export NVCC -export CUFLAGS +#=== Configure the CUDA compiler for the CUDA target -# Set the host C++ compiler for nvcc via "-ccbin " -# (NB issue #505: this must be a single word, "clang++ --gcc-toolchain..." is not supported) -CUFLAGS += -ccbin $(shell which $(subst ccache ,,$(CXX))) +ifneq (,$(findstring $(MAKECMDGOALS),cuda-gcheck-runGcheck-runFGcheck-cmpFGcheck-memcheck)) + # If CXX is not a single word (example "clang++ --gcc-toolchain...") then disable CUDA builds (issue #505) + # This is because it is impossible to pass this to "CUFLAGS += -ccbin " below + ifneq ($(words $(subst ccache ,,$(CXX))),1) # allow at most "CXX=ccache " from outside + $(warning CUDA builds are not supported for multi-word CXX "$(CXX)") + override CUDA_HOME=disabled + endif -# Allow newer (unsupported) C++ compilers with older versions of CUDA if ALLOW_UNSUPPORTED_COMPILER_IN_CUDA is set (#504) -ifneq ($(origin ALLOW_UNSUPPORTED_COMPILER_IN_CUDA),undefined) -CUFLAGS += -allow-unsupported-compiler -endif + # If CUDA_HOME is not set, try to set it from the location of nvcc + ifndef CUDA_HOME + CUDA_HOME = $(patsubst %bin/nvcc,%,$(shell which nvcc 2>/dev/null)) + $(warning CUDA_HOME was not set: using "$(CUDA_HOME)") + endif + + # Set NVCC as $(CUDA_HOME)/bin/nvcc if it exists + ifneq ($(wildcard $(CUDA_HOME)/bin/nvcc),) + NVCC = $(CUDA_HOME)/bin/nvcc + USE_NVTX ?=-DUSE_NVTX + # See https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html + # See https://arnon.dk/matching-sm-architectures-arch-and-gencode-for-various-nvidia-cards/ + # Default: use compute capability 70 for V100 (CERN lxbatch, CERN itscrd, Juwels Cluster). + # Embed device code for 70, and PTX for 70+. + # Export MADGRAPH_CUDA_ARCHITECTURE (comma-separated list) to use another value or list of values (see #533). + # Examples: use 60 for P100 (Piz Daint), 80 for A100 (Juwels Booster, NVidia raplab/Curiosity). + MADGRAPH_CUDA_ARCHITECTURE ?= 70 + ###CUARCHFLAGS = -gencode arch=compute_$(MADGRAPH_CUDA_ARCHITECTURE),code=compute_$(MADGRAPH_CUDA_ARCHITECTURE) -gencode arch=compute_$(MADGRAPH_CUDA_ARCHITECTURE),code=sm_$(MADGRAPH_CUDA_ARCHITECTURE) # Older implementation (AV): go back to this one for multi-GPU support #533 + ###CUARCHFLAGS = --gpu-architecture=compute_$(MADGRAPH_CUDA_ARCHITECTURE) --gpu-code=sm_$(MADGRAPH_CUDA_ARCHITECTURE),compute_$(MADGRAPH_CUDA_ARCHITECTURE) # Newer implementation (SH): cannot use this as-is for multi-GPU support #533 + comma:=, + CUARCHFLAGS = $(foreach arch,$(subst $(comma), ,$(MADGRAPH_CUDA_ARCHITECTURE)),-gencode arch=compute_$(arch),code=compute_$(arch) -gencode arch=compute_$(arch),code=sm_$(arch)) + CUINC = -I$(CUDA_HOME)/include/ + CURANDLIBFLAGS = -L$(CUDA_HOME)/lib64/ -lcurand # NB: -lcuda is not needed here! + CUOPTFLAGS = -lineinfo + CUFLAGS = $(foreach opt, $(OPTFLAGS), -Xcompiler $(opt)) $(CUOPTFLAGS) $(INCFLAGS) $(CUINC) $(USE_NVTX) $(CUARCHFLAGS) -use_fast_math + ###CUFLAGS += -Xcompiler -Wall -Xcompiler -Wextra -Xcompiler -Wshadow + ###NVCC_VERSION = $(shell $(NVCC) --version | grep 'Cuda compilation tools' | cut -d' ' -f5 | cut -d, -f1) + CUFLAGS += -std=c++17 # need CUDA >= 11.2 (see #333): this is enforced in mgOnGpuConfig.h + # Without -maxrregcount: baseline throughput: 6.5E8 (16384 32 12) up to 7.3E8 (65536 128 12) + ###CUFLAGS+= --maxrregcount 160 # improves throughput: 6.9E8 (16384 32 12) up to 7.7E8 (65536 128 12) + ###CUFLAGS+= --maxrregcount 128 # improves throughput: 7.3E8 (16384 32 12) up to 7.6E8 (65536 128 12) + ###CUFLAGS+= --maxrregcount 96 # degrades throughput: 4.1E8 (16384 32 12) up to 4.5E8 (65536 128 12) + ###CUFLAGS+= --maxrregcount 64 # degrades throughput: 1.7E8 (16384 32 12) flat at 1.7E8 (65536 128 12) + else ifneq ($(origin REQUIRE_CUDA),undefined) + # If REQUIRE_CUDA is set but no cuda is found, stop here (e.g. for CI tests on GPU #443) + $(error No cuda installation found (set CUDA_HOME or make nvcc visible in PATH)) + else + # No cuda. Switch cuda compilation off and go to common random numbers in C++ + $(warning CUDA_HOME is not set or is invalid: export CUDA_HOME to compile with cuda) + override NVCC= + override USE_NVTX= + override CUINC= + override CURANDLIBFLAGS= + endif + export NVCC + export CUFLAGS + + # Set the host C++ compiler for nvcc via "-ccbin " + # (NB issue #505: this must be a single word, "clang++ --gcc-toolchain..." is not supported) + CUFLAGS += -ccbin $(shell which $(subst ccache ,,$(CXX))) + + # Allow newer (unsupported) C++ compilers with older versions of CUDA if ALLOW_UNSUPPORTED_COMPILER_IN_CUDA is set (#504) + ifneq ($(origin ALLOW_UNSUPPORTED_COMPILER_IN_CUDA),undefined) + CUFLAGS += -allow-unsupported-compiler + endif + +endif # ($(MAKECMDGOALS),cuda) #------------------------------------------------------------------------------- @@ -226,32 +237,6 @@ override OMPFLAGS = -fopenmp ###override OMPFLAGS = # disable OpenMP MT (default before #575) endif -# Set the default AVX (vectorization) choice -ifeq ($(AVX),) - ifeq ($(UNAME_P),ppc64le) - ###override AVX = none - override AVX = sse4 - else ifeq ($(UNAME_P),arm) - ###override AVX = none - override AVX = sse4 - else ifeq ($(wildcard /proc/cpuinfo),) - override AVX = none - $(warning Using AVX='$(AVX)' because host SIMD features cannot be read from /proc/cpuinfo) - else ifeq ($(shell grep -m1 -c avx512vl /proc/cpuinfo)$(shell $(CXX) --version | grep ^clang),1) - override AVX = 512y - ###$(info Using AVX='$(AVX)' as no user input exists) - else - override AVX = avx2 - ifneq ($(shell grep -m1 -c avx512vl /proc/cpuinfo),1) - $(warning Using AVX='$(AVX)' because host does not support avx512vl) - else - $(warning Using AVX='$(AVX)' because this is faster than avx512vl for clang) - endif - endif -else - ###$(info Using AVX='$(AVX)' according to user input) -endif - # Set the default FPTYPE (floating point type) choice ifeq ($(FPTYPE),) override FPTYPE = d @@ -276,6 +261,21 @@ ifeq ($(RNDGEN),) endif endif +# set the correct AVX based on avxcpp target +ifeq ($(MAKECMDGOALS),cppnone) # no SIMD + override AVX = none +else ifeq ($(MAKECMDGOALS),cppsse4) # SSE4.2 with 128 width (xmm registers) + override AVX = sse4 +else ifeq ($(MAKECMDGOALS),cppavx2) # AVX2 with 256 width (ymm registers) [DEFAULT for clang] + override AVX = avx2 +else ifeq ($(MAKECMDGOALS),cpp512y) # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] + override AVX = 512y +else ifeq ($(MAKECMDGOALS),cpp512z) # AVX512 with 512 width (zmm registers) + override AVX = 512z +else + override AVX = none +endif + # Export AVX, FPTYPE, HELINL, HRDCOD, RNDGEN, OMPFLAGS so that it is not necessary to pass them to the src Makefile too export AVX export FPTYPE @@ -295,50 +295,52 @@ CXXFLAGS += $(OMPFLAGS) # Set the build flags appropriate to each AVX choice (example: "make AVX=none") # [NB MGONGPU_PVW512 is needed because "-mprefer-vector-width=256" is not exposed in a macro] # [See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96476] -$(info AVX=$(AVX)) -ifeq ($(UNAME_P),ppc64le) - ifeq ($(AVX),sse4) - override AVXFLAGS = -D__SSE4_2__ # Power9 VSX with 128 width (VSR registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on PowerPC for the moment) - endif -else ifeq ($(UNAME_P),arm) - ifeq ($(AVX),sse4) - override AVXFLAGS = -D__SSE4_2__ # ARM NEON with 128 width (Q/quadword registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on ARM for the moment) - endif -else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 - ifeq ($(AVX),none) - override AVXFLAGS = -mno-sse3 # no SIMD - else ifeq ($(AVX),sse4) - override AVXFLAGS = -mno-avx # SSE4.2 with 128 width (xmm registers) - else ifeq ($(AVX),avx2) - override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(AVX),512y) - override AVXFLAGS = -march=skylake -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(AVX),512z) - override AVXFLAGS = -march=skylake -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) - else - $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) - endif -else - ifeq ($(AVX),none) - override AVXFLAGS = -march=x86-64 # no SIMD (see #588) - else ifeq ($(AVX),sse4) - override AVXFLAGS = -march=nehalem # SSE4.2 with 128 width (xmm registers) - else ifeq ($(AVX),avx2) - override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(AVX),512y) - override AVXFLAGS = -march=skylake-avx512 -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(AVX),512z) - override AVXFLAGS = -march=skylake-avx512 -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) +ifeq ($(findstring cpp,$(MAKECMDGOALS)),cpp) + $(info AVX=$(AVX)) + ifeq ($(UNAME_P),ppc64le) + ifeq ($(AVX),sse4) + override AVXFLAGS = -D__SSE4_2__ # Power9 VSX with 128 width (VSR registers) + else ifneq ($(AVX),none) + $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on PowerPC for the moment) + endif + else ifeq ($(UNAME_P),arm) + ifeq ($(AVX),sse4) + override AVXFLAGS = -D__SSE4_2__ # ARM NEON with 128 width (Q/quadword registers) + else ifneq ($(AVX),none) + $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on ARM for the moment) + endif + else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 + ifeq ($(AVX),none) + override AVXFLAGS = -mno-sse3 # no SIMD + else ifeq ($(AVX),sse4) + override AVXFLAGS = -mno-avx # SSE4.2 with 128 width (xmm registers) + else ifeq ($(AVX),avx2) + override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] + else ifeq ($(AVX),512y) + override AVXFLAGS = -march=skylake -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] + else ifeq ($(AVX),512z) + override AVXFLAGS = -march=skylake -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) + else + $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) + endif else - $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) + ifeq ($(AVX),none) + override AVXFLAGS = -march=x86-64 # no SIMD (see #588) + else ifeq ($(AVX),sse4) + override AVXFLAGS = -march=nehalem # SSE4.2 with 128 width (xmm registers) + else ifeq ($(AVX),avx2) + override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] + else ifeq ($(AVX),512y) + override AVXFLAGS = -march=skylake-avx512 -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] + else ifeq ($(AVX),512z) + override AVXFLAGS = -march=skylake-avx512 -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) + else + $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) + endif endif + # For the moment, use AVXFLAGS everywhere: eventually, use them only in encapsulated implementations? + CXXFLAGS+= $(AVXFLAGS) endif -# For the moment, use AVXFLAGS everywhere: eventually, use them only in encapsulated implementations? -CXXFLAGS+= $(AVXFLAGS) # Set the build flags appropriate to each FPTYPE choice (example: "make FPTYPE=f") $(info FPTYPE=$(FPTYPE)) @@ -389,11 +391,19 @@ endif # Build directory "short" tag (defines target and path to the optional build directory) # (Rationale: keep directory names shorter, e.g. do not include random number generator choice) -override DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) +ifneq ($(NVCC),) + override DIRTAG = cuda_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) +else + override DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) +endif # Build lockfile "full" tag (defines full specification of build options that cannot be intermixed) # (Rationale: avoid mixing of CUDA and no-CUDA environment builds with different random number generators) -override TAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) +ifneq ($(NVCC),) + override TAG = cuda_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) +else + override TAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) +endif # Build directory: current directory by default, or build.$(DIRTAG) if USEBUILDDIR==1 ifeq ($(USEBUILDDIR),1) @@ -448,9 +458,9 @@ endif testmain=$(BUILDDIR)/runTest.exe ifneq ($(GTESTLIBS),) -all.$(TAG): $(BUILDDIR)/.build.$(TAG) $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_main) $(cxx_main) $(fcu_main) $(fcxx_main) $(testmain) +all.$(TAG): $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_main) $(cxx_main) $(fcu_main) $(fcxx_main) $(testmain) else -all.$(TAG): $(BUILDDIR)/.build.$(TAG) $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_main) $(cxx_main) $(fcu_main) $(fcxx_main) +all.$(TAG): $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_main) $(cxx_main) $(fcu_main) $(fcxx_main) endif # Target (and build options): debug @@ -460,27 +470,20 @@ debug: CUOPTFLAGS = -G debug: MAKEDEBUG := debug debug: all.$(TAG) -# Target: tag-specific build lockfiles -override oldtagsb=`if [ -d $(BUILDDIR) ]; then find $(BUILDDIR) -maxdepth 1 -name '.build.*' ! -name '.build.$(TAG)' -exec echo $(shell pwd)/{} \; ; fi` -$(BUILDDIR)/.build.$(TAG): - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - @if [ "$(oldtagsb)" != "" ]; then echo "Cannot build for tag=$(TAG) as old builds exist for other tags:"; echo " $(oldtagsb)"; echo "Please run 'make clean' first\nIf 'make clean' is not enough: run 'make clean USEBUILDDIR=1 AVX=$(AVX) FPTYPE=$(FPTYPE)' or 'make cleanall'"; exit 1; fi - @touch $(BUILDDIR)/.build.$(TAG) - # Generic target and build rules: objects from CUDA compilation ifneq ($(NVCC),) -$(BUILDDIR)/%.o : %.cu *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) +$(BUILDDIR)/%.o : %.cu *.h ../../src/*.h @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c $< -o $@ -$(BUILDDIR)/%_cu.o : %.cc *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) +$(BUILDDIR)/%_cu.o : %.cc *.h ../../src/*.h @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c -x cu $< -o $@ endif # Generic target and build rules: objects from C++ compilation # (NB do not include CUINC here! add it only for NVTX or curand #679) -$(BUILDDIR)/%.o : %.cc *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) +$(BUILDDIR)/%.o : %.cc *.h ../../src/*.h @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi $(CXX) $(CPPFLAGS) $(CXXFLAGS) -fPIC -c $< -o $@ @@ -532,7 +535,7 @@ endif # Target (and build rules): common (src) library commonlib : $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so -$(LIBDIR)/lib$(MG5AMC_COMMONLIB).so: ../../src/*.h ../../src/*.cc $(BUILDDIR)/.build.$(TAG) +$(LIBDIR)/lib$(MG5AMC_COMMONLIB).so: ../../src/*.h ../../src/*.cc $(MAKE) -C ../../src $(MAKEDEBUG) -f $(CUDACPP_SRC_MAKEFILE) #------------------------------------------------------------------------------- @@ -711,35 +714,27 @@ endif # Target: build all targets in all AVX modes (each AVX mode in a separate build directory) # Split the avxall target into five separate targets to allow parallel 'make -j avxall' builds # (Hack: add a fbridge.inc dependency to avxall, to ensure it is only copied once for all AVX modes) -avxnone: - @echo - $(MAKE) USEBUILDDIR=1 AVX=none -f $(CUDACPP_MAKEFILE) +cppnone: $(cxx_main) -avxsse4: - @echo - $(MAKE) USEBUILDDIR=1 AVX=sse4 -f $(CUDACPP_MAKEFILE) +cppsse4: $(cxx_main) -avxavx2: - @echo - $(MAKE) USEBUILDDIR=1 AVX=avx2 -f $(CUDACPP_MAKEFILE) +cppavx2: $(cxx_main) -avx512y: - @echo - $(MAKE) USEBUILDDIR=1 AVX=512y -f $(CUDACPP_MAKEFILE) +cpp512y: $(cxx_main) -avx512z: - @echo - $(MAKE) USEBUILDDIR=1 AVX=512z -f $(CUDACPP_MAKEFILE) +cpp512z: $(cxx_main) + +cuda: $(cu_main) ifeq ($(UNAME_P),ppc64le) ###avxall: $(INCDIR)/fbridge.inc avxnone avxsse4 -avxall: avxnone avxsse4 +cppall: cppnone cppsse4 else ifeq ($(UNAME_P),arm) ###avxall: $(INCDIR)/fbridge.inc avxnone avxsse4 -avxall: avxnone avxsse4 +cppall: cppnone cppsse4 else ###avxall: $(INCDIR)/fbridge.inc avxnone avxsse4 avxavx2 avx512y avx512z -avxall: avxnone avxsse4 avxavx2 avx512y avx512z +cppall: cppnone cppsse4 cppavx2 cpp512y cpp512z endif #------------------------------------------------------------------------------- @@ -747,21 +742,31 @@ endif # Target: clean the builds .PHONY: clean +BUILD_DIRS := $(wildcard build.*) +NUM_BUILD_DIRS := $(words $(BUILD_DIRS)) + clean: ifeq ($(USEBUILDDIR),1) - rm -rf $(BUILDDIR) +ifeq ($(NUM_BUILD_DIRS),1) + $(info USEBUILDDIR=1, Only one build directory found.) + rm -rf $(BUILD_DIRS) +else ifeq ($(NUM_BUILD_DIRS),0) + $(error USEBUILDDIR=1, but no build directories are found.) else - rm -f $(BUILDDIR)/.build.* $(BUILDDIR)/*.o $(BUILDDIR)/*.exe + $(error Multiple BUILDDIR's found! Use 'cleannone', 'cleansse4', 'cleanavx2', 'clean512y','clean512z', 'cleancuda' or 'cleanall'.) +endif +else + rm -f $(BUILDDIR)/*.o $(BUILDDIR)/*.exe rm -f $(LIBDIR)/lib$(MG5AMC_CXXLIB).so $(LIBDIR)/lib$(MG5AMC_CULIB).so endif $(MAKE) -C ../../src clean -f $(CUDACPP_SRC_MAKEFILE) -### rm -rf $(INCDIR) cleanall: @echo - $(MAKE) USEBUILDDIR=0 clean -f $(CUDACPP_MAKEFILE) + rm -f $(BUILDDIR)/*.o $(BUILDDIR)/*.exe + rm -f $(LIBDIR)/lib$(MG5AMC_CXXLIB).so $(LIBDIR)/lib$(MG5AMC_CULIB).so @echo - $(MAKE) USEBUILDDIR=0 -C ../../src cleanall -f $(CUDACPP_SRC_MAKEFILE) + $(MAKE) -C ../../src cleanall -f $(CUDACPP_SRC_MAKEFILE) rm -rf build.* # Target: clean the builds as well as the gtest installation(s) @@ -771,6 +776,42 @@ ifneq ($(wildcard $(TESTDIRCOMMON)),) endif $(MAKE) -C $(TESTDIRLOCAL) clean +# Target: clean different builds +cleannone: + rm -rf build.none_* + rm -f ../../lib/build.none_*/lib$(MG5AMC_CXXLIB).so + $(MAKE) -C ../../src cleannone -f $(CUDACPP_SRC_MAKEFILE) + +cleansse4: + rm -rf build.sse4_* + rm -f ../../lib/build.sse4_*/lib$(MG5AMC_CXXLIB).so + $(MAKE) -C ../../src cleansse4 -f $(CUDACPP_SRC_MAKEFILE) + +cleanavx2: + rm -rf build.avx2_* + rm -f ../../lib/build.avx2_*/lib$(MG5AMC_CXXLIB).so + $(MAKE) -C ../../src cleanavx2 -f $(CUDACPP_SRC_MAKEFILE) + +clean512y: + rm -rf build.512y_* + rm -f ../../lib/build.512y_*/lib$(MG5AMC_CXXLIB).so + $(MAKE) -C ../../src clean512y -f $(CUDACPP_SRC_MAKEFILE) + +clean512z: + rm -rf build.512z_* + rm -f ../../lib/build.512z_*/lib$(MG5AMC_CXXLIB).so + $(MAKE) -C ../../src clean512z -f $(CUDACPP_SRC_MAKEFILE) + +cleancuda: + rm -rf build.cuda_* + rm -f ../../lib/build.cuda_*/lib$(MG5AMC_CULIB).so + $(MAKE) -C ../../src cleancuda -f $(CUDACPP_SRC_MAKEFILE) + +cleandir: + rm -f ./*.o ./*.exe + rm -f ../../lib/lib$(MG5AMC_CXXLIB).so ../../lib/lib$(MG5AMC_CULIB).so + $(MAKE) -C ../../src cleandir -f $(CUDACPP_SRC_MAKEFILE) + #------------------------------------------------------------------------------- # Target: show system and compiler information @@ -817,13 +858,10 @@ endif #------------------------------------------------------------------------------- -# Target: check (run the C++ test executable) +# Target: check/gcheck (run the C++ test executable) # [NB THIS IS WHAT IS USED IN THE GITHUB CI!] -ifneq ($(NVCC),) -check: runTest cmpFcheck cmpFGcheck -else check: runTest cmpFcheck -endif +gcheck: runTest cmpFGcheck # Target: runTest (run the C++ test executable runTest.exe) runTest: all.$(TAG) @@ -863,4 +901,4 @@ cmpFGcheck: all.$(TAG) memcheck: all.$(TAG) $(RUNTIME) $(CUDA_HOME)/bin/cuda-memcheck --check-api-memory-access yes --check-deprecated-instr yes --check-device-heap yes --demangle full --language c --leak-check full --racecheck-report all --report-api-errors all --show-backtrace yes --tool memcheck --track-unused-memory yes $(BUILDDIR)/gcheck.exe -p 2 32 2 -#------------------------------------------------------------------------------- +#------------------------------------------------------------------------------- \ No newline at end of file diff --git a/epochX/cudacpp/gg_ttg.mad/SubProcesses/dummy_fct.f b/epochX/cudacpp/gg_ttg.mad/SubProcesses/dummy_fct.f index 076cf29d67..4f7a204b8f 100644 --- a/epochX/cudacpp/gg_ttg.mad/SubProcesses/dummy_fct.f +++ b/epochX/cudacpp/gg_ttg.mad/SubProcesses/dummy_fct.f @@ -32,7 +32,7 @@ logical FUNCTION dummy_cuts(P) LOGICAL IS_A_NU(NEXTERNAL),IS_HEAVY(NEXTERNAL) logical do_cuts(nexternal) COMMON /TO_SPECISA/IS_A_J,IS_A_A,IS_A_L,IS_A_B,IS_A_NU,IS_HEAVY, - . IS_A_ONIUM, do_cuts + & IS_A_ONIUM, do_cuts dummy_cuts=.true. @@ -118,15 +118,16 @@ double precision function user_dynamical_scale(P) C ************************************************************ -C default for the library implementing a dummt bias function +C default for the library implementing a dummy bias function C ************************************************************ subroutine bias_wgt_custom(p, original_weight, bias_weight) - implicit none + implicit none C C Parameters C include 'nexternal.inc' -C + +C C Arguments C double precision p(0:3, nexternal) @@ -161,3 +162,4 @@ subroutine bias_wgt_custom(p, original_weight, bias_weight) return end subroutine bias_wgt_custom + diff --git a/epochX/cudacpp/gg_ttg.mad/SubProcesses/makefile b/epochX/cudacpp/gg_ttg.mad/SubProcesses/makefile index 74db44d848..093bc84271 100644 --- a/epochX/cudacpp/gg_ttg.mad/SubProcesses/makefile +++ b/epochX/cudacpp/gg_ttg.mad/SubProcesses/makefile @@ -9,6 +9,33 @@ FFLAGS+= -cpp # Compile counters with -O3 as in the cudacpp makefile (avoid being "unfair" to Fortran #740) CXXFLAGS = -O3 -Wall -Wshadow -Wextra +# Sets correct target based on MAKECMDGOALS +ifeq ($(MAKECMDGOALS),) + TARGET := undefined +else + ifeq ($(shell grep -q madevent_ <<< $(MAKECMDGOALS)a),) + TARGET := $(word 2,($(subst _, ,$(MAKECMDGOALS)))) + else + TARGET := $(MAKECMDGOALS) + endif +endif + +# Sets correct cppavx target as dependency when compiling Fortran +ifeq ($(shell grep -q cpp <<< $(MAKECMDGOALS)a),) + ifeq ($(TARGET),cpp) + CPPTARGET := cppavx2 + else + CPPTARGET := $(TARGET) + endif +endif + +# Default goal +.DEFAULT_GOAL := usage + +# Target if user does not specify target +usage: + $(error Unknown target='$(TARGET)': only 'cppnone', 'cppsse4', 'cppavx2', 'cpp512y', 'cpp512z' and 'cuda' are supported!) + # Enable ccache if USECCACHE=1 ifeq ($(USECCACHE)$(shell echo $(CXX) | grep ccache),1) override CXX:=ccache $(CXX) @@ -48,10 +75,10 @@ CUDACPP_MAKEFILE=cudacpp.mk # NB2 Use '|&' in CUDACPP_BUILDDIR to avoid confusing errors about googletest #507 # NB3 Do not add a comment inlined "CUDACPP_BUILDDIR=$(shell ...) # comment" as otherwise a trailing space is included... # NB4 The variables relevant to the cudacpp Makefile must be explicitly passed to $(shell...) -CUDACPP_MAKEENV:=$(shell echo '$(.VARIABLES)' | tr " " "\n" | egrep "(USEBUILDDIR|AVX|FPTYPE|HELINL|HRDCOD)") +CUDACPP_MAKEENV:=$(shell echo '$(.VARIABLES)' | tr " " "\n" | egrep "(USEBUILDDIR|FPTYPE|HELINL|HRDCOD)") ###$(info CUDACPP_MAKEENV=$(CUDACPP_MAKEENV)) ###$(info $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))")) -CUDACPP_BUILDDIR:=$(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn |& awk '/Building/{print $$3}' | sed s/BUILDDIR=//) +CUDACPP_BUILDDIR:=$(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn $(TARGET) 2>/dev/null | awk '/Building/{print $$3}' | sed s/BUILDDIR=//) ifeq ($(CUDACPP_BUILDDIR),) $(error CUDACPP_BUILDDIR='$(CUDACPP_BUILDDIR)' should not be empty!) else @@ -89,7 +116,7 @@ SYMMETRY = symmetry.o idenparts.o # Binaries -LDFLAGS+=-Wl,--no-relax # avoid 'failed to convert GOTPCREL relocation' error #458 +#LDFLAGS+=-Wl,--no-relax # avoid 'failed to convert GOTPCREL relocation' error #458 (flag not universal -> skip?) all: $(PROG)_fortran $(CUDACPP_BUILDDIR)/$(PROG)_cpp # also builds $(PROG)_cuda if $(CUDACPP_CULIB) exists (#503) @@ -115,10 +142,6 @@ $(LIBS): .libs cd ../../Source; make touch $@ -$(CUDACPP_BUILDDIR)/.cudacpplibs: - $(MAKE) -f $(CUDACPP_MAKEFILE) - touch $@ - # On Linux, set rpath to LIBDIR to make it unnecessary to use LD_LIBRARY_PATH # Use relative paths with respect to the executables ($ORIGIN on Linux) # On Darwin, building libraries with absolute paths in LIBDIR makes this unnecessary @@ -130,26 +153,47 @@ else override LIBFLAGSRPATH = -Wl,-rpath,'$$ORIGIN/$(LIBDIR)' endif -.PHONY: madevent_fortran_link madevent_cuda_link madevent_cpp_link +.PHONY: madevent_fortran_link madevent_cuda_link madevent_cpp_link madevent_cppnone_link madevent_cppsse4_link madevent_cppavx2_link madevent_cpp512y_link madevent_cpp512z_link madevent_fortran_link: $(PROG)_fortran rm -f $(PROG) ln -s $(PROG)_fortran $(PROG) +# Only used for testing, should be removed in the future madevent_cpp_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp rm -f $(PROG) ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) +madevent_cppnone_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp + rm -f $(PROG) + ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) + +madevent_cppsse4_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp + rm -f $(PROG) + ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) + +madevent_cppavx2_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp + rm -f $(PROG) + ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) + +madevent_cpp512y_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp + rm -f $(PROG) + ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) + +madevent_cpp512z_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp + rm -f $(PROG) + ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) + madevent_cuda_link: $(CUDACPP_BUILDDIR)/$(PROG)_cuda rm -f $(PROG) ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cuda $(PROG) # Building $(PROG)_cpp also builds $(PROG)_cuda if $(CUDACPP_CULIB) exists (improved patch for cpp-only builds #503) -$(CUDACPP_BUILDDIR)/$(PROG)_cpp: $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(LIBS) $(MATRIX) counters.o ompnumthreads.o $(CUDACPP_BUILDDIR)/.cudacpplibs +$(CUDACPP_BUILDDIR)/$(PROG)_cpp: $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(LIBS) $(MATRIX) counters.o ompnumthreads.o $(CPPTARGET) $(FC) -o $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o -L$(LIBDIR)/$(CUDACPP_BUILDDIR) -l$(CUDACPP_COMMONLIB) -l$(CUDACPP_CXXLIB) $(LIBFLAGSRPATH) $(LDFLAGS) - if [ -f $(LIBDIR)/$(CUDACPP_BUILDDIR)/lib$(CUDACPP_CULIB).* ]; then $(FC) -o $(CUDACPP_BUILDDIR)/$(PROG)_cuda $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o -L$(LIBDIR)/$(CUDACPP_BUILDDIR) -l$(CUDACPP_COMMONLIB) -l$(CUDACPP_CULIB) $(LIBFLAGSRPATH) $(LDFLAGS); fi -$(CUDACPP_BUILDDIR)/$(PROG)_cuda: $(CUDACPP_BUILDDIR)/$(PROG)_cpp +$(CUDACPP_BUILDDIR)/$(PROG)_cuda: $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(LIBS) $(MATRIX) counters.o ompnumthreads.o cuda + $(FC) -o $(CUDACPP_BUILDDIR)/$(PROG)_cuda $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o -L$(LIBDIR)/$(CUDACPP_BUILDDIR) -l$(CUDACPP_COMMONLIB) -l$(CUDACPP_CULIB) $(LIBFLAGSRPATH) $(LDFLAGS) counters.o: counters.cc timer.h $(CXX) $(CXXFLAGS) -c $< -o $@ @@ -215,49 +259,105 @@ genps.o: .libs UNAME_P := $(shell uname -p) ifeq ($(UNAME_P),ppc64le) -avxall: avxnone avxsse4 +cppall: + $(MAKE) USEBUILDDIR=1 cppnone + $(MAKE) USEBUILDDIR=1 cppsse4 else ifeq ($(UNAME_P),arm) -avxall: avxnone avxsse4 +cppall: + $(MAKE) USEBUILDDIR=1 cppnone + $(MAKE) USEBUILDDIR=1 cppsse4 else -avxall: avxnone avxsse4 avxavx2 avx512y avx512z +cppall: + $(MAKE) USEBUILDDIR=1 cppnone + $(MAKE) USEBUILDDIR=1 cppsse4 + $(MAKE) USEBUILDDIR=1 cppavx2 + $(MAKE) USEBUILDDIR=1 cpp512y + $(MAKE) USEBUILDDIR=1 cpp512z endif -avxnone: $(PROG)_fortran $(DSIG_cudacpp) - @echo - $(MAKE) USEBUILDDIR=1 AVX=none +ALL: + $(MAKE) USEBUILDDIR=1 cppnone + $(MAKE) USEBUILDDIR=1 cppsse4 + $(MAKE) USEBUILDDIR=1 cppavx2 + $(MAKE) USEBUILDDIR=1 cpp512y + $(MAKE) USEBUILDDIR=1 cpp512z + $(MAKE) USEBUILDDIR=1 cuda -avxsse4: $(PROG)_fortran $(DSIG_cudacpp) - @echo - $(MAKE) USEBUILDDIR=1 AVX=sse4 +cppnone: + $(MAKE) -f $(CUDACPP_MAKEFILE) cppnone -avxavx2: $(PROG)_fortran $(DSIG_cudacpp) - @echo - $(MAKE) USEBUILDDIR=1 AVX=avx2 +cppsse4: + $(MAKE) -f $(CUDACPP_MAKEFILE) cppsse4 -avx512y: $(PROG)_fortran $(DSIG_cudacpp) - @echo - $(MAKE) USEBUILDDIR=1 AVX=512y +cppavx2: + $(MAKE) -f $(CUDACPP_MAKEFILE) cppavx2 -avx512z: $(PROG)_fortran $(DSIG_cudacpp) - @echo - $(MAKE) USEBUILDDIR=1 AVX=512z +cpp512y: + $(MAKE) -f $(CUDACPP_MAKEFILE) cpp512y -###endif +cpp512z: + $(MAKE) -f $(CUDACPP_MAKEFILE) cpp512z + +cuda: + $(MAKE) -f $(CUDACPP_MAKEFILE) cuda # Clean (NB: 'make clean' in Source calls 'make clean' in all P*) -clean: # Clean builds: fortran in this Pn; cudacpp executables for one AVX in this Pn - $(RM) *.o gensym $(PROG) $(PROG)_fortran $(PROG)_forhel $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(CUDACPP_BUILDDIR)/$(PROG)_cuda +BUILD_DIRS := $(wildcard build.*) +BUILD_TARGET_DIR := $(shell echo $(BUILD_DIRS) | awk -F '[._]' '{print $$2}') +NUM_BUILD_DIRS := $(words $(BUILD_DIRS)) + +clean: +ifeq ($(USEBUILDDIR),1) +ifeq ($(NUM_BUILD_DIRS),1) + $(info USEBUILDDIR=1, only cleaning build dir.) + $(RM) -r $(BUILD_DIRS) + $(MAKE) -f $(CUDACPP_MAKEFILE) clean$(BUILD_TARGET_DIR) +else ifeq ($(NUM_BUILD_DIRS),0) + $(error USEBUILDDIR=1, but no build directories are found.) +else + $(error Multiple BUILDDIR's found! Use 'cleannone', 'cleansse4', 'cleanavx2', 'clean512y','clean512z', 'cleancuda' or 'cleanall'.) +endif +else + $(info USEBUILDDIR=0 only cleaning build with no dir.) + $(RM) *.o gensym $(PROG) $(PROG)_fortran $(PROG)_forhel ./$(PROG)_* + $(MAKE) -f $(CUDACPP_MAKEFILE) cleandir + $(RM) $(CUDACPP_BUILDDIR)/.*libs +endif + +cleannone: # Clean builds: fortran in this Pn; cpp executables for one AVX in this Pn + $(RM) *.o gensym $(PROG) $(PROG)_fortran $(PROG)_forhel build.none_*/$(PROG)_cpp + $(MAKE) -f $(CUDACPP_MAKEFILE) cleannone + +cleansse4: # Clean build: fortran in this Pn; cpp executables for cppsse4 in this Pn + $(RM) *.o gensym $(PROG) $(PROG)_fortran $(PROG)_forhel build.sse4_*/$(PROG)_cpp + $(MAKE) -f $(CUDACPP_MAKEFILE) cleansse4 + +cleanavx2: # Clean build: fortran in this Pn; cpp executables for cppavx2 in this Pn + $(RM) *.o gensym $(PROG) $(PROG)_fortran $(PROG)_forhel build.avx2_*/$(PROG)_cpp + $(MAKE) -f $(CUDACPP_MAKEFILE) cleanavx2 + +clean512y: # Clean build: fortran in this Pn; cpp executables for cpp512y in this Pn + $(RM) *.o gensym $(PROG) $(PROG)_fortran $(PROG)_forhel build.512y_*/$(PROG)_cpp + $(MAKE) -f $(CUDACPP_MAKEFILE) clean512y + +clean512z: # Clean build: fortran in this Pn; cpp executables for cpp512z in this Pn + $(RM) *.o gensym $(PROG) $(PROG)_fortran $(PROG)_forhel build.512z_*/$(PROG)_cpp + $(MAKE) -f $(CUDACPP_MAKEFILE) clean512z + +cleancuda: # Clean build: fortran in this Pn; cuda executables in this Pn + $(RM) *.o gensym $(PROG) $(PROG)_fortran $(PROG)_forhel build.cuda_*/$(PROG)_cuda + $(MAKE) -f $(CUDACPP_MAKEFILE) cleancuda cleanavxs: clean # Clean builds: fortran in this Pn; cudacpp for all AVX in this Pn and in src $(MAKE) -f $(CUDACPP_MAKEFILE) cleanall - rm -f $(CUDACPP_BUILDDIR)/.cudacpplibs - rm -f .libs + $(RM) $(CUDACPP_BUILDDIR)/.*libs + $(RM) .libs cleanall: # Clean builds: fortran in all P* and in Source; cudacpp for all AVX in all P* and in src make -C ../../Source cleanall - rm -rf $(LIBDIR)libbias.$(libext) - rm -f ../../Source/*.mod ../../Source/*/*.mod + $(RM) -r $(LIBDIR)libbias.$(libext) + $(RM) ../../Source/*.mod ../../Source/*/*.mod distclean: cleanall # Clean all fortran and cudacpp builds as well as the googletest installation $(MAKE) -f $(CUDACPP_MAKEFILE) distclean diff --git a/epochX/cudacpp/gg_ttg.mad/bin/generate_events b/epochX/cudacpp/gg_ttg.mad/bin/generate_events index 107313b25d..5577cc66a0 100755 --- a/epochX/cudacpp/gg_ttg.mad/bin/generate_events +++ b/epochX/cudacpp/gg_ttg.mad/bin/generate_events @@ -46,7 +46,7 @@ if __debug__ and (not os.path.exists(pjoin(root_path,'../..', 'bin','create_rele sys.path.append(pjoin(root_path,'bin','internal')) import madevent_interface as ME - +import misc as misc import logging import logging.config @@ -160,17 +160,31 @@ if '__main__' == __name__: # Check that python version is valid set_configuration() - argument = sys.argv + argument = sys.argv + + # check for plugin customization of the launch command + launch_interface = ME.MadEventCmdShell + if os.path.exists(pjoin(root_path, 'bin','internal', 'launch_plugin.py')): + with misc.TMP_variable(sys, 'path', sys.path + [pjoin(root_path, 'bin', 'internal')]): + from importlib import reload + try: + reload('launch_plugin') + except Exception as error: + import launch_plugin + launch_interface = launch_plugin.MEINTERFACE + + + try: if '-h' in argument or '--help' in argument: - launch = ME.MadEventCmdShell(me_dir=root_path, force_run=True) + launch = launch_interface(me_dir=root_path, force_run=True) launch.exec_cmd('help generate_events') sys.exit() elif len(argument) > 1 and argument[1] in ['0', '1', '2']: argument = treat_old_argument(argument) with ME.MadEventCmdShell.RunWebHandling(root_path, ): - launch = ME.MadEventCmdShell(me_dir=root_path, force_run=True) + launch = launch_interface(me_dir=root_path, force_run=True) launch.run_cmd('generate_events %s' % ' '.join(argument[1:])) launch.run_cmd('quit') except ME.MadEventAlreadyRunning as message: diff --git a/epochX/cudacpp/gg_ttg.mad/bin/internal/banner.py b/epochX/cudacpp/gg_ttg.mad/bin/internal/banner.py index 7624b9f557..824815f47b 100755 --- a/epochX/cudacpp/gg_ttg.mad/bin/internal/banner.py +++ b/epochX/cudacpp/gg_ttg.mad/bin/internal/banner.py @@ -537,7 +537,7 @@ def charge_card(self, tag): self.param_card = param_card_reader.ParamCard(param_card) return self.param_card elif tag == 'mgruncard': - self.run_card = RunCard(self[tag]) + self.run_card = RunCard(self[tag], unknown_warning=False) return self.run_card elif tag == 'mg5proccard': proc_card = self[tag].split('\n') @@ -1002,13 +1002,14 @@ def __init__(self, finput=None, **opt): self.allowed_value = {} self.default_setup() + self.plugin_input(finput) # if input is define read that input if isinstance(finput, (file, str, StringIO.StringIO)): self.read(finput, **opt) - self.plugin_input(finput) + def plugin_input(self, finput=None): @@ -2624,6 +2625,7 @@ class RunCard(ConfigFile): default_include_file = 'run_card.inc' default_autodef_file = 'run.inc' donewarning = [] + include_as_parameter = [] def plugin_input(self, finput): @@ -2670,18 +2672,40 @@ def __new__(cls, finput=None, **opt): elif isinstance(finput, cls): target_class = finput.__class__ elif isinstance(finput, str): + path = finput if '\n' not in finput: finput = open(finput).read() if 'req_acc_FO' in finput: target_class = RunCardNLO else: target_class = RunCardLO + if MADEVENT and os.path.exists(pjoin(MEDIR, 'bin','internal', 'launch_plugin.py')): + with misc.TMP_variable(sys, 'path', sys.path + [pjoin(MEDIR, 'bin', 'internal')]): + from importlib import reload + try: + reload('launch_plugin') + except Exception as error: + import launch_plugin + target_class = launch_plugin.RunCard + elif not MADEVENT and os.path.exists(path.replace('run_card.dat', '../bin/internal/launch_plugin.py')): + misc.sprint('try to use plugin class') + pydir = path.replace('run_card.dat', '../bin/internal/') + with misc.TMP_variable(sys, 'path', sys.path + [pydir]): + from importlib import reload + try: + reload('launch_plugin') + except Exception as error: + import launch_plugin + target_class = launch_plugin.RunCard + else: return None target_class.fill_post_set_from_blocks() - - return super(RunCard, cls).__new__(target_class, finput, **opt) + out = super(RunCard, cls).__new__(target_class, finput, **opt) + if not isinstance(out, RunCard): #should not happen but in presence of missmatch of library loaded. + out.__init__(finput, **opt) + return out else: return super(RunCard, cls).__new__(cls, finput, **opt) @@ -2709,7 +2733,7 @@ def __init__(self, *args, **opts): self.system_default = {} self.display_block = [] # set some block to be displayed - + self.fct_mod = {} # {param: (fct_pointer, *argument, **opts)} self.cut_class = {} self.warned=False @@ -2746,7 +2770,7 @@ def get_lepton_densities(cls): def add_param(self, name, value, fortran_name=None, include=True, hidden=False, legacy=False, cut=False, system=False, sys_default=None, - autodef=False, + autodef=False, fct_mod=None, **opts): """ add a parameter to the card. value is the default value and defines the type (int/float/bool/str) of the input. @@ -2760,6 +2784,7 @@ def add_param(self, name, value, fortran_name=None, include=True, If a path (Source/PDF/pdf.inc) the definition will be added within that file Default is False (does not add the definition) entry added in the run_card will automatically have this on True. + fct_mod: defines a function to run if the parameter is modify in the include file options of **opts: - allowed: list of valid options. '*' means anything else should be allowed. empty list means anything possible as well. @@ -2784,8 +2809,12 @@ def add_param(self, name, value, fortran_name=None, include=True, if autodef: self.definition_path[autodef].append(name) self.user_set.add(name) + # function to trigger if a value is modified in the include file + # main target is action to force correct recompilation (like for compilation flag/...) + if fct_mod: + self.fct_mod[name] = fct_mod - def read(self, finput, consistency=True): + def read(self, finput, consistency=True, unknown_warning=True): """Read the input file, this can be a path to a file, a file object, a str with the content of the file.""" @@ -2793,6 +2822,7 @@ def read(self, finput, consistency=True): if "\n" in finput: finput = finput.split('\n') elif os.path.isfile(finput): + self.path = finput finput = open(finput) else: raise Exception("No such file %s" % finput) @@ -2807,7 +2837,7 @@ def read(self, finput, consistency=True): name = name.lower().strip() if name not in self: #looks like an entry added by a user -> add it nicely - self.add_unknown_entry(name, value) + self.add_unknown_entry(name, value, unknown_warning) else: self.set( name, value, user=True) # parameter not set in the run_card can be set to compatiblity value @@ -2819,7 +2849,7 @@ def read(self, finput, consistency=True): logger.warning(str(error)) else: raise - def add_unknown_entry(self, name, value): + def add_unknown_entry(self, name, value, unknow_warning): """function to add an entry to the run_card when the associated parameter does not exists. This is based on the guess_entry_fromname for the various syntax providing input. This then call add_param accordingly. @@ -2858,7 +2888,7 @@ def add_unknown_entry(self, name, value): raise Exception("dictionary need to have at least one entry") default['dict']['__type__'] = default[self.guess_type_from_value(default_value[0])] - if name not in RunCard.donewarning: + if name not in RunCard.donewarning and unknow_warning: logger.warning("Found unexpected entry in run_card: \"%s\" with value \"%s\".\n"+\ " The type was assigned to %s. \n"+\ " The definition of that variable will %sbe automatically added to fortran file %s\n"+\ @@ -2896,7 +2926,16 @@ def valid_line(self, line, tmp): return False else: return True - + + + def reset_simd(self, old_value, new_value, name, *args, **opts): + raise Exception('pass in reset simd') + + def make_clean(self,old_value, new_value, name, dir): + raise Exception('pass make clean for ', dir) + + def make_Ptouch(self,old_value, new_value, name, reset): + raise Exception('pass Ptouch for ', reset) def write(self, output_file, template=None, python_template=False, write_hidden=False, template_options=None, **opt): @@ -3071,6 +3110,77 @@ def write(self, output_file, template=None, python_template=False, else: output_file.write(text) + def get_last_value_include(self, output_dir): + """For paraeter in self.fct_mod + parse the associate inc file to get the value of the previous run. + We return a dictionary {name: old_value} + if inc file does not exist we will return the current value (i.e. set has no change) + """ + + #remember that + # default_include_file is a class variable + # self.includepath is on the form include_path : [list of param ] + out = {} + + # setup inc_to_parse to be like self.includepath (include_path : [list of param ]) + # BUT only containing the parameter that need to be tracked for the fct_mod option + inc_to_parse = {} + for inc_file, params in self.includepath.items(): + if not inc_file: + continue + if any(p in params for p in self.fct_mod): + inc_to_parse[inc_file] = [name for name in self.includepath[inc_file] if name in self.fct_mod] + + # now loop over the files and ask the associate function + for inc_file, params in inc_to_parse.items(): + if inc_file is True: + inc_file = self.default_include_file + out.update(self.get_value_from_include(inc_file, params, output_dir)) + + return out + + def get_value_from_include(self, path, list_of_params, output_dir): + """for a given include file return the current value of the requested parameter + return a dictionary {name: value} + if path does not exists return the current value in self for all parameter""" + + #WARNING DOES NOT HANDLE LIST/DICT so far + + # handle case where file is missing + if not os.path.exists(pjoin(output_dir,path)): + misc.sprint("include file not existing", pjoin(output_dir,path)) + out = {name: self[name] for name in list_of_params} + + with open(pjoin(output_dir,path), 'r') as fsock: + text = fsock.read() + + for name in list_of_params: + misc.sprint(name, name in self.fortran_name) + misc.sprint(self.fortran_name[name] if name in self.fortran_name[name] else name) + to_track = [self.fortran_name[name] if name in self.fortran_name else name for name in list_of_params] + pattern = re.compile(r"\(?(%(names)s)\s?=\s?([^)]*)\)?" % {'names':'|'.join(to_track)}, re.I) + out = dict(pattern.findall(text)) + misc.sprint(out) + for name in list_of_params: + if name in self.fortran_name: + value = out[self.fortran_name[name]] + del out[self.fortran_name[name]] + out[name] = value + + for name, value in out.items(): + try: + out[name] = self.format_variable(value, type(self[name])) + except Exception: + continue + + if len(out) != len(list_of_params): + misc.sprint(list_of_params) + misc.sprint(to_track) + misc.sprint(self.fortran_name) + misc.sprint(text) + raise Exception + return out + def get_default(self, name, default=None, log_level=None): """return self[name] if exist otherwise default. log control if we @@ -3361,71 +3471,93 @@ def write_include_file(self, output_dir, output_file=None): #ensusre that system only parameter are correctly set self.update_system_parameter_for_include() + value_in_old_include = self.get_last_value_include(output_dir) + + if output_dir: self.write_autodef(output_dir, output_file=None) # check/fix status of customised functions self.edit_dummy_fct_from_file(self["custom_fcts"], os.path.dirname(output_dir)) for incname in self.includepath: - if incname is True: - pathinc = self.default_include_file - elif incname is False: - continue - else: - pathinc = incname + self.write_one_include_file(output_dir, incname, output_file) + + for name,value in value_in_old_include.items(): + if value != self[name]: + self.fct_mod[name][0](value, self[name], name, *self.fct_mod[name][1],**self.fct_mod[name][2]) - if output_file: - fsock = output_file + def write_one_include_file(self, output_dir, incname, output_file=None): + """write one include file at the time""" + + misc.sprint(incname) + if incname is True: + pathinc = self.default_include_file + elif incname is False: + return + else: + pathinc = incname + + if output_file: + fsock = output_file + else: + fsock = file_writers.FortranWriter(pjoin(output_dir,pathinc+'.tmp')) + + + for key in self.includepath[incname]: + #define the fortran name + if key in self.fortran_name: + fortran_name = self.fortran_name[key] else: - fsock = file_writers.FortranWriter(pjoin(output_dir,pathinc+'.tmp')) - for key in self.includepath[incname]: - #define the fortran name - if key in self.fortran_name: - fortran_name = self.fortran_name[key] + fortran_name = key + + if incname in self.include_as_parameter: + fsock.writelines('INTEGER %s\n' % fortran_name) + #get the value with warning if the user didn't set it + value = self.get_default(key) + if hasattr(self, 'mod_inc_%s' % key): + value = getattr(self, 'mod_inc_%s' % key)(value) + # Special treatment for strings containing a list of + # strings. Convert it to a list of strings + if isinstance(value, list): + # in case of a list, add the length of the list as 0th + # element in fortran. Only in case of integer or float + # list (not for bool nor string) + targettype = self.list_parameter[key] + if targettype is bool: + pass + elif targettype is int: + line = '%s(%s) = %s \n' % (fortran_name, 0, self.f77_formatting(len(value))) + fsock.writelines(line) + elif targettype is float: + line = '%s(%s) = %s \n' % (fortran_name, 0, self.f77_formatting(float(len(value)))) + fsock.writelines(line) + # output the rest of the list in fortran + for i,v in enumerate(value): + line = '%s(%s) = %s \n' % (fortran_name, i+1, self.f77_formatting(v)) + fsock.writelines(line) + elif isinstance(value, dict): + for fortran_name, onevalue in value.items(): + line = '%s = %s \n' % (fortran_name, self.f77_formatting(onevalue)) + fsock.writelines(line) + elif isinstance(incname,str) and 'compile' in incname: + if incname in self.include_as_parameter: + line = 'PARAMETER (%s=%s)' %( fortran_name, value) else: - fortran_name = key - - #get the value with warning if the user didn't set it - value = self.get_default(key) - if hasattr(self, 'mod_inc_%s' % key): - value = getattr(self, 'mod_inc_%s' % key)(value) - # Special treatment for strings containing a list of - # strings. Convert it to a list of strings - if isinstance(value, list): - # in case of a list, add the length of the list as 0th - # element in fortran. Only in case of integer or float - # list (not for bool nor string) - targettype = self.list_parameter[key] - if targettype is bool: - pass - elif targettype is int: - line = '%s(%s) = %s \n' % (fortran_name, 0, self.f77_formatting(len(value))) - fsock.writelines(line) - elif targettype is float: - line = '%s(%s) = %s \n' % (fortran_name, 0, self.f77_formatting(float(len(value)))) - fsock.writelines(line) - # output the rest of the list in fortran - for i,v in enumerate(value): - line = '%s(%s) = %s \n' % (fortran_name, i+1, self.f77_formatting(v)) - fsock.writelines(line) - elif isinstance(value, dict): - for fortran_name, onevalue in value.items(): - line = '%s = %s \n' % (fortran_name, self.f77_formatting(onevalue)) - fsock.writelines(line) - elif isinstance(incname,str) and 'compile' in incname: line = '%s = %s \n' % (fortran_name, value) - fsock.write(line) + fsock.write(line) + else: + if incname in self.include_as_parameter: + line = 'PARAMETER (%s=%s)' %( fortran_name, self.f77_formatting(value)) else: line = '%s = %s \n' % (fortran_name, self.f77_formatting(value)) - fsock.writelines(line) - if not output_file: - fsock.close() - path = pjoin(output_dir,pathinc) - if not os.path.exists(path) or not filecmp.cmp(path, path+'.tmp'): - files.mv(path+'.tmp', path) - else: - os.remove(path+'.tmp') - + fsock.writelines(line) + if not output_file: + fsock.close() + path = pjoin(output_dir,pathinc) + if not os.path.exists(path) or not filecmp.cmp(path, path+'.tmp'): + files.mv(path+'.tmp', path) + else: + os.remove(path+'.tmp') def write_autodef(self, output_dir, output_file=None): """ Add the definition of variable to run.inc if the variable is set with autodef. @@ -3764,13 +3896,14 @@ def remove_all_cut(self): %(tmin_for_channel)s = tmin_for_channel ! limit the non-singular reach of --some-- channel of integration related to T-channel diagram (value between -1 and 0), -1 is no impact %(survey_splitting)s = survey_splitting ! for loop-induced control how many core are used at survey for the computation of a single iteration. %(survey_nchannel_per_job)s = survey_nchannel_per_job ! control how many Channel are integrated inside a single job on cluster/multicore - %(refine_evt_by_job)s = refine_evt_by_job ! control the maximal number of events for the first iteration of the refine (larger means less jobs) + %(refine_evt_by_job)s = refine_evt_by_job ! control the maximal number of events for the first iteration of the refine (larger means less jobs) #********************************************************************* -# Compilation flag. No automatic re-compilation (need manual "make clean" in Source) +# Compilation flag. #********************************************************************* %(global_flag)s = global_flag ! fortran optimization flag use for the all code. %(aloha_flag)s = aloha_flag ! fortran optimization flag for aloha function. Suggestions: '-ffast-math' %(matrix_flag)s = matrix_flag ! fortran optimization flag for matrix.f function. Suggestions: '-O3' + %(vector_size)s = vector_size ! size designed for SIMD/OpenMP/GPU (number of events in lockstep) """ template_off = '# To see advanced option for Phase-Space optimization: type "update psoptim"' @@ -3926,9 +4059,12 @@ class RunCardLO(RunCard): "get_dummy_x1_x2": pjoin("SubProcesses","dummy_fct.f"), "dummy_boostframe": pjoin("SubProcesses","dummy_fct.f"), "user_dynamical_scale": pjoin("SubProcesses","dummy_fct.f"), + "bias_wgt_custom": pjoin("SubProcesses","dummy_fct.f"), "user_": pjoin("SubProcesses","dummy_fct.f") # all function starting by user will be added to that file } + include_as_parameter = ['vector.inc'] + if MG5DIR: default_run_card = pjoin(MG5DIR, "internal", "default_run_card_lo.dat") @@ -4162,10 +4298,15 @@ def default_setup(self): self.add_param('hel_splitamp', True, hidden=True, include=False, comment='decide if amplitude aloha call can be splitted in two or not when doing helicity per helicity optimization.') self.add_param('hel_zeroamp', True, hidden=True, include=False, comment='decide if zero amplitude can be removed from the computation when doing helicity per helicity optimization.') self.add_param('SDE_strategy', 1, allowed=[1,2], fortran_name="sde_strat", comment="decide how Multi-channel should behaves \"1\" means full single diagram enhanced (hep-ph/0208156), \"2\" use the product of the denominator") - self.add_param('global_flag', '-O', include=False, hidden=True, comment='global fortran compilation flag, suggestion -fbound-check') - self.add_param('aloha_flag', '', include=False, hidden=True, comment='global fortran compilation flag, suggestion: -ffast-math') - self.add_param('matrix_flag', '', include=False, hidden=True, comment='fortran compilation flag for the matrix-element files, suggestion -O3') - + self.add_param('global_flag', '-O', include=False, hidden=True, comment='global fortran compilation flag, suggestion -fbound-check', + fct_mod=(self.make_clean, ('Source'),{})) + self.add_param('aloha_flag', '', include=False, hidden=True, comment='global fortran compilation flag, suggestion: -ffast-math', + fct_mod=(self.make_clean, ('Source/DHELAS'),{})) + self.add_param('matrix_flag', '', include=False, hidden=True, comment='fortran compilation flag for the matrix-element files, suggestion -O3', + fct_mod=(self.make_Ptouch, ('matrix'),{})) + self.add_param('vector_size', 1, include='vector.inc', hidden=True, comment='lockstep size for parralelism run', + fortran_name='VECSIZE_MEMMAX', fct_mod=(self.reset_simd,(),{})) + # parameter allowing to define simple cut via the pdg # Special syntax are related to those. (can not be edit directly) self.add_param('pt_min_pdg',{'__type__':0.}, include=False, cut=True) @@ -4187,8 +4328,7 @@ def default_setup(self): self.add_param('mxxmin4pdg',[-1.], system=True) self.add_param('mxxpart_antipart', [False], system=True) - # CUDACPP parameters - self.add_param('cudacpp_backend', 'CPP', include=False, hidden=False) + def check_validity(self): """ """ diff --git a/epochX/cudacpp/gg_ttg.mad/bin/internal/check_param_card.py b/epochX/cudacpp/gg_ttg.mad/bin/internal/check_param_card.py index fe874a06a4..71089d7480 100755 --- a/epochX/cudacpp/gg_ttg.mad/bin/internal/check_param_card.py +++ b/epochX/cudacpp/gg_ttg.mad/bin/internal/check_param_card.py @@ -85,7 +85,7 @@ def load_str(self, text): self.value= ' '.join(data[len(self.lhacode):]) # check that lhacode are the first entry otherwise return invalid param. if ' '.join([str(i) for i in self.lhacode]) != ' '.join(data[:len(self.lhacode)]): - raise InvalidParam + raise InvalidParam("line was %s" % str(data)) else: self.value = data[-1] diff --git a/epochX/cudacpp/gg_ttg.mad/bin/internal/common_run_interface.py b/epochX/cudacpp/gg_ttg.mad/bin/internal/common_run_interface.py index 5d0187e3fa..14c7f310dc 100755 --- a/epochX/cudacpp/gg_ttg.mad/bin/internal/common_run_interface.py +++ b/epochX/cudacpp/gg_ttg.mad/bin/internal/common_run_interface.py @@ -749,13 +749,15 @@ def writeRunWeb(me_dir): class RunWebHandling(object): - def __init__(self, me_dir, crashifpresent=True, warnifpresent=True): + def __init__(self, me_dir, crashifpresent=True, warnifpresent=True, force_run=False): """raise error if RunWeb already exists me_dir is the directory where the write RunWeb""" self.remove_run_web = True self.me_dir = me_dir - + if force_run: + self.remove_run_web = False + return if crashifpresent or warnifpresent: if os.path.exists(pjoin(me_dir, 'RunWeb')): pid = open(pjoin(me_dir, 'RunWeb')).read() @@ -6574,7 +6576,7 @@ def reask(self, *args, **opt): fail_due_to_format = 0 #parameter to avoid infinite loop def postcmd(self, stop, line): - if line not in [None, '0', 'done', '']: + if line not in [None, '0', 'done', '',0]: ending_question = cmd.OneLinePathCompletion.postcmd(self,stop,line) else: ending_question = True @@ -7533,7 +7535,8 @@ def open_file(self, answer): else: raise if time.time() - start < .5: - self.mother_interface.ask("Are you really that fast? If you are using an editor that returns directly. Please confirm that you have finised to edit the file", 'y') + self.mother_interface.ask("Are you really that fast? If you are using an editor that returns directly. Please confirm that you have finised to edit the file", 'y', + timeout=False) self.reload_card(path) def reload_card(self, path): diff --git a/epochX/cudacpp/gg_ttg.mad/bin/internal/extended_cmd.py b/epochX/cudacpp/gg_ttg.mad/bin/internal/extended_cmd.py index a6a8609dce..2f37070580 100755 --- a/epochX/cudacpp/gg_ttg.mad/bin/internal/extended_cmd.py +++ b/epochX/cudacpp/gg_ttg.mad/bin/internal/extended_cmd.py @@ -1108,9 +1108,12 @@ def ask(self, question, default, choices=[], path_msg=None, if alias: choices += list(alias.keys()) + + question_instance = obj(question, allow_arg=choices, default=default, mother_interface=self, **opt) - + if fct_timeout is None: + fct_timeout = lambda x: question_instance.postcmd(x, default) if x and default else False if first_cmd: if isinstance(first_cmd, str): question_instance.onecmd(first_cmd) @@ -2271,6 +2274,9 @@ def postcmd(self, stop, line): if n: self.default(line) return self.postcmd(stop, line) + elif self.value is None and line: + self.default(line) + return self.postcmd(stop, line) if not self.casesensitive: for ans in self.allow_arg: if ans.lower() == self.value.lower(): diff --git a/epochX/cudacpp/gg_ttg.mad/bin/internal/gen_ximprove.py b/epochX/cudacpp/gg_ttg.mad/bin/internal/gen_ximprove.py index 3b8ec31215..a88d60b282 100755 --- a/epochX/cudacpp/gg_ttg.mad/bin/internal/gen_ximprove.py +++ b/epochX/cudacpp/gg_ttg.mad/bin/internal/gen_ximprove.py @@ -154,10 +154,15 @@ def get_helicity(self, to_submit=True, clean=True): p = misc.Popen(['./gensym'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT, cwd=Pdir) #sym_input = "%(points)d %(iterations)d %(accuracy)f \n" % self.opts + (stdout, _) = p.communicate(''.encode()) stdout = stdout.decode('ascii',errors='ignore') - nb_channel = max([math.floor(float(d)) for d in stdout.split()]) - + try: + nb_channel = max([math.floor(float(d)) for d in stdout.split()]) + except Exception as error: + misc.sprint(stdout, 'no channel or error for %s' % Pdir) + continue + self.cmd.compile(['madevent_forhel'], cwd=Pdir) if not os.path.exists(pjoin(Pdir, 'madevent_forhel')): raise Exception('Error make madevent_forhel not successful') diff --git a/epochX/cudacpp/gg_ttg.mad/bin/internal/launch_plugin.py b/epochX/cudacpp/gg_ttg.mad/bin/internal/launch_plugin.py new file mode 100644 index 0000000000..23271b846e --- /dev/null +++ b/epochX/cudacpp/gg_ttg.mad/bin/internal/launch_plugin.py @@ -0,0 +1,100 @@ + +import logging +import os +import subprocess +pjoin = os.path.join +logger = logging.getLogger('cmdprint') # for stdout + +try: + import madgraph +except ImportError: + import internal.madevent_interface as madevent_interface + import internal.misc as misc + import internal.extended_cmd as extended_cmd + import internal.banner as banner_mod +else: + import madgraph.interface.madevent_interface as madevent_interface + import madgraph.various.misc as misc + import madgraph.interface.extended_cmd as extended_cmd + import madgraph.various.banner as banner_mod + +class CPPMEInterface(madevent_interface.MadEventCmdShell): + + def compile(self, *args, **opts): + """ """ + + import multiprocessing + if not self.options['nb_core'] or self.options['nb_core'] == 'None': + self.options['nb_core'] = multiprocessing.cpu_count() + + if args and args[0][0] == 'madevent' and hasattr(self, 'run_card'): + import pathlib + import os + pjoin = os.path.join + + + + + cudacpp_backend = self.run_card['cudacpp_backend'].upper() # the default value is defined in banner.py + logger.info("Building madevent in madevent_interface.py with '%s' matrix elements"%cudacpp_backend) + if cudacpp_backend == 'FORTRAN': + args[0][0] = 'madevent_fortran_link' + elif cudacpp_backend == 'CPP': + args[0][0] = 'madevent_cpp_link' + elif cudacpp_backend == 'CUDA': + args[0][0] = 'madevent_cuda_link' + else: + raise Exception("Invalid cudacpp_backend='%s': only 'FORTRAN', 'CPP', 'CUDA' are supported") + return misc.compile(nb_core=self.options['nb_core'], *args, **opts) + else: + return misc.compile(nb_core=self.options['nb_core'], *args, **opts) + +class CPPRunCard(banner_mod.RunCardLO): + + def reset_simd(self, old_value, new_value, name): + if not hasattr(self, 'path'): + raise Exception + + if name == "vector_size" and new_value <= int(old_value): + # code can handle the new size -> do not recompile + return + + Sourcedir = pjoin(os.path.dirname(os.path.dirname(self.path)), 'Source') + subprocess.call(['make', 'cleanavx'], cwd=Sourcedir, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) + + def plugin_input(self, finput): + return + + def default_setup(self): + super().default_setup() + self.add_param('cudacpp_backend', 'CPP', include=False, hidden=False) + + + def write_one_include_file(self, output_dir, incname, output_file=None): + """write one include file at the time""" + + if incname == "vector.inc" and 'vector_size' not in self.user_set: + return + super().write_one_include_file(output_dir, incname, output_file) + + + def check_validity(self): + """ensure that PLUGIN information are consistent""" + + super().check_validity() + + if self['SDE_strategy'] != 1: + logger.warning('SDE_strategy different of 1 is not supported with SMD/GPU mode') + self['sde_strategy'] = 1 + + if self['hel_recycling']: + self['hel_recycling'] = False + +class GPURunCard(CPPRunCard): + + def default_setup(self): + super(CPPRunCard, self).default_setup() + self.add_param('cudacpp_backend', 'CUDA', include=False, hidden=False) + +MEINTERFACE = CPPMEInterface +RunCard = CPPRunCard diff --git a/epochX/cudacpp/gg_ttg.mad/bin/internal/madevent_interface.py b/epochX/cudacpp/gg_ttg.mad/bin/internal/madevent_interface.py index 920e07a926..d722702891 100755 --- a/epochX/cudacpp/gg_ttg.mad/bin/internal/madevent_interface.py +++ b/epochX/cudacpp/gg_ttg.mad/bin/internal/madevent_interface.py @@ -3796,9 +3796,11 @@ def do_combine_events(self, line): if self.run_card['bias_module'].lower() not in ['dummy', 'none'] and nb_event: self.correct_bias() - + elif self.run_card['custom_fcts']: + self.correct_bias() + logger.info("combine events done in %s", time.time()-start) - + self.to_store.append('event') diff --git a/epochX/cudacpp/gg_ttg.mad/bin/internal/run_plot b/epochX/cudacpp/gg_ttg.mad/bin/internal/run_plot new file mode 100755 index 0000000000..7deee7ac88 --- /dev/null +++ b/epochX/cudacpp/gg_ttg.mad/bin/internal/run_plot @@ -0,0 +1,47 @@ +#!/bin/bash +# +# This runs MadAnalysis on the unweighted_events.lhe +# +# Usage: run_plot run_name [madir [tddir]] +# where madir is the path to the MadAnalysis package + +main=`pwd` + +if [ "$1" != "" ] +then + run=$1 +else + echo "Usage: run_plot runname [MAdir [tddir]]" + exit +fi + +if [ "$2" != "" ] +then + MAdir=$main/$2 +else + MAdir=$main/../../MadAnalysis +fi + +if [ "$3" != "" ]; then + td=$main/$3 +else + td=$main/../../td +fi + +dirbin=$main/../bin + +if [[ $run != "" && -e ${run}_unweighted_events.lhe.gz ]];then + gunzip -c ${run}_unweighted_events.lhe.gz > unweighted_events.lhe +fi + +if [[ (-x $MAdir/plot_events) && (-e unweighted_events.lhe) && (-e ../Cards/plot_card.dat) ]]; then + echo "Creating Plots" + mkdir $run + cd $run + echo "../unweighted_events.lhe" > events.list + $dirbin/plot $MAdir $td > plot.log + cd .. + $dirbin/plot_page-pl $run parton + mv plots.html ${run}_plots.html +fi + diff --git a/epochX/cudacpp/gg_ttg.mad/bin/internal/run_plot_delphes b/epochX/cudacpp/gg_ttg.mad/bin/internal/run_plot_delphes new file mode 100755 index 0000000000..975f410d0e --- /dev/null +++ b/epochX/cudacpp/gg_ttg.mad/bin/internal/run_plot_delphes @@ -0,0 +1,46 @@ +#!/bin/bash +# +# This runs MadAnalysis on the delphes_events.lhco +# +# Usage: run_plot run_name [madir [tddir]] +# where madir is the path to the MadAnalysis package + +main=`pwd` + +if [ "$1" != "" ] +then + run=$1 +else + echo "Usage: run_plot runname [MAdir [tddir]]" + exit +fi + +if [ "$2" != "" ] +then + MAdir=$main/$2 +else + MAdir=$main/../../MadAnalysis +fi + +if [ "$3" != "" ]; then + td=$main/$3 +else + td=$main/../../td +fi + +dirbin=$main/../bin + +if [[ $run != "" && -e ${run}_delphes_events.lhco.gz ]];then + gunzip -c ${run}_delphes_events.lhco.gz > delphes_events.lhco +fi + +if [[ (-x $MAdir/plot_events) && (-e delphes_events.lhco) && (-e ../Cards/plot_card.dat) ]]; then + echo "Creating Plots" + mkdir ${run}_delphes + cd ${run}_delphes + echo "../delphes_events.lhco" > events.list + $dirbin/plot $MAdir $td > plot.log + cd .. + $dirbin/plot_page-pl ${run}_delphes Delphes + mv plots.html ${run}_plots_delphes.html +fi diff --git a/epochX/cudacpp/gg_ttg.mad/bin/internal/run_plot_pgs b/epochX/cudacpp/gg_ttg.mad/bin/internal/run_plot_pgs new file mode 100755 index 0000000000..e7a36ef344 --- /dev/null +++ b/epochX/cudacpp/gg_ttg.mad/bin/internal/run_plot_pgs @@ -0,0 +1,47 @@ +#!/bin/bash +# +# This runs MadAnalysis on the unweighted_events.lhe +# +# Usage: run_plot run_name [madir [tddir]] +# where madir is the path to the MadAnalysis package + +main=`pwd` + +if [ "$1" != "" ] +then + run=$1 +else + echo "Usage: run_plot runname [MAdir [tddir]]" + exit +fi + +if [ "$2" != "" ] +then + MAdir=$main/$2 +else + MAdir=$main/../../MadAnalysis +fi + +if [ "$3" != "" ]; then + td=$main/$3 +else + td=$main/../../td +fi + +dirbin=$main/../bin + +if [[ $run != "" && -e ${run}_pgs_events.lhco.gz ]];then + gunzip -c ${run}_pgs_events.lhco.gz > pgs_events.lhco +fi + +if [[ (-x $MAdir/plot_events) && (-e pgs_events.lhco) && (-e ../Cards/plot_card.dat) ]]; then + echo "Creating Plots" + mkdir ${run}_pgs + cd ${run}_pgs + echo "../pgs_events.lhco" > events.list + $dirbin/plot $MAdir $td > plot.log + cd .. + $dirbin/plot_page-pl ${run}_pgs PGS + mv plots.html ${run}_plots_pgs.html +fi + diff --git a/epochX/cudacpp/gg_ttg.mad/bin/internal/run_plot_pythia b/epochX/cudacpp/gg_ttg.mad/bin/internal/run_plot_pythia new file mode 100755 index 0000000000..532bfb4b7b --- /dev/null +++ b/epochX/cudacpp/gg_ttg.mad/bin/internal/run_plot_pythia @@ -0,0 +1,50 @@ +#!/bin/bash +# +# This runs MadAnalysis on the unweighted_events.lhe +# +# Usage: run_plot run_name [madir [tddir]] +# where madir is the path to the MadAnalysis package + +main=`pwd` + +if [ "$1" != "" ] +then + run=$1 +else + echo "Usage: run_plot runname [MAdir [tddir]]" + exit +fi + +if [ "$2" != "" ] +then + MAdir=$main/$2 +else + MAdir=$main/../../MadAnalysis +fi + +if [ "$3" != "" ]; then + td=$main/$3 +else + td=$main/../../td +fi + +dirbin=$main/../bin/internal + +if [[ $run != "" && -e ${run}_pythia_events.lhe.gz ]];then + gunzip -c ${run}_pythia_events.lhe.gz > pythia_events.lhe +fi + +if [[ (-x $MAdir/plot_events) && (-e pythia_events.lhe) && (-e ../Cards/plot_card.dat) ]]; then + echo "Creating Plots" + mkdir ${run}_pythia + cd ${run}_pythia + echo "../pythia_events.lhe" > events.list + $dirbin/plot $MAdir $td > plot.log + cd .. + $dirbin/plot_page-pl ${run}_pythia Pythia + mv plots.html ${run}_plots_pythia.html + $dirbin/gen_crossxhtml-pl $run +else + echo "Not creating plots" +fi + diff --git a/epochX/cudacpp/gg_ttg.mad/bin/madevent b/epochX/cudacpp/gg_ttg.mad/bin/madevent index c944aa1faf..dff9711b73 100755 --- a/epochX/cudacpp/gg_ttg.mad/bin/madevent +++ b/epochX/cudacpp/gg_ttg.mad/bin/madevent @@ -32,6 +32,7 @@ except ImportError: import os +pjoin = os.path.join import optparse # Get the directory of the script real path (bin) @@ -160,13 +161,30 @@ except: pass import internal.madevent_interface as cmd_interface +# check for plugin customization of the launch command +launch_interface = cmd_interface.MadEventCmdShell +if os.path.exists(pjoin(root_path, 'bin','internal', 'launch_plugin.py')): + with misc.TMP_variable(sys, 'path', sys.path + [pjoin(root_path, 'bin', 'internal')]): + from importlib import reload + try: + reload('launch_plugin') + except Exception as error: + import launch_plugin + launch_interface = launch_plugin.MEINTERFACE + + +#Source use this executable for compilation always allow it +force_run = False +if (args and args[0] == 'treatcards'): + force_run=True + # Call the cmd interface main loop try: if '-h' in args or '--help' in args: - launch = ME.MadEventCmdShell(me_dir=os.path.dirname(root_path), force_run=True) + launch = launch_interface(me_dir=os.path.dirname(root_path), force_run=True) launch.exec_cmd('help generate_events') sys.exit(0) - with cmd_interface.MadEventCmdShell.RunWebHandling(os.path.dirname(root_path), ): + with cmd_interface.MadEventCmdShell.RunWebHandling(os.path.dirname(root_path), force_run=force_run): if (args and os.path.isfile(args[0])): # They are an input file input_file = args[0] @@ -178,7 +196,7 @@ try: cmd_line.run_cmd('import command ' + input_file) cmd_line.run_cmd('quit') else: - cmd_line = cmd_interface.MadEventCmdShell(force_run=True) + cmd_line = launch_interface(force_run=True) cmd_line.use_rawinput = False cmd_line.haspiping = False cmd_line.run_cmd('import command ' + input_file) @@ -188,7 +206,7 @@ try: if options.web: cmd_line = cmd_interface.MadEventCmd(force_run=True) else: - cmd_line = cmd_interface.MadEventCmdShell(force_run=True) + cmd_line = launch_interface(force_run=True) if not hasattr(cmd_line, 'do_%s' % args[0]): if parser_error: print( parser_error) diff --git a/epochX/cudacpp/gg_ttg.mad/src/HelAmps_sm.h b/epochX/cudacpp/gg_ttg.mad/src/HelAmps_sm.h index 4a326fae62..8995b15c82 100644 --- a/epochX/cudacpp/gg_ttg.mad/src/HelAmps_sm.h +++ b/epochX/cudacpp/gg_ttg.mad/src/HelAmps_sm.h @@ -863,6 +863,7 @@ namespace mg5amcCpu const fptype allV2[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, fptype allvertexes[] ) ALWAYS_INLINE; //-------------------------------------------------------------------------- @@ -873,6 +874,7 @@ namespace mg5amcCpu VVV1P0_1( const fptype allV2[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, const fptype M1, const fptype W1, fptype allV1[] ) ALWAYS_INLINE; @@ -886,6 +888,7 @@ namespace mg5amcCpu const fptype allF2[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, fptype allvertexes[] ) ALWAYS_INLINE; //-------------------------------------------------------------------------- @@ -896,6 +899,7 @@ namespace mg5amcCpu FFV1_1( const fptype allF2[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, const fptype M1, const fptype W1, fptype allF1[] ) ALWAYS_INLINE; @@ -908,6 +912,7 @@ namespace mg5amcCpu FFV1_2( const fptype allF1[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, const fptype M2, const fptype W2, fptype allF2[] ) ALWAYS_INLINE; @@ -920,6 +925,7 @@ namespace mg5amcCpu FFV1P0_3( const fptype allF1[], const fptype allF2[], const fptype allCOUP[], + const double Ccoeff, const fptype M3, const fptype W3, fptype allV3[] ) ALWAYS_INLINE; @@ -933,6 +939,7 @@ namespace mg5amcCpu const fptype allV3[], const fptype allV4[], const fptype allCOUP[], + const double Ccoeff, const fptype M1, const fptype W1, fptype allV1[] ) ALWAYS_INLINE; @@ -946,6 +953,7 @@ namespace mg5amcCpu const fptype allV3[], const fptype allV4[], const fptype allCOUP[], + const double Ccoeff, const fptype M1, const fptype W1, fptype allV1[] ) ALWAYS_INLINE; @@ -959,6 +967,7 @@ namespace mg5amcCpu const fptype allV3[], const fptype allV4[], const fptype allCOUP[], + const double Ccoeff, const fptype M1, const fptype W1, fptype allV1[] ) ALWAYS_INLINE; @@ -972,6 +981,7 @@ namespace mg5amcCpu const fptype allV2[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, fptype allvertexes[] ) { mgDebug( 0, __FUNCTION__ ); @@ -1006,6 +1016,7 @@ namespace mg5amcCpu VVV1P0_1( const fptype allV2[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, const fptype M1, const fptype W1, fptype allV1[] ) @@ -1044,6 +1055,7 @@ namespace mg5amcCpu const fptype allF2[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, fptype allvertexes[] ) { mgDebug( 0, __FUNCTION__ ); @@ -1067,6 +1079,7 @@ namespace mg5amcCpu FFV1_1( const fptype allF2[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, const fptype M1, const fptype W1, fptype allF1[] ) @@ -1098,6 +1111,7 @@ namespace mg5amcCpu FFV1_2( const fptype allF1[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, const fptype M2, const fptype W2, fptype allF2[] ) @@ -1129,6 +1143,7 @@ namespace mg5amcCpu FFV1P0_3( const fptype allF1[], const fptype allF2[], const fptype allCOUP[], + const double Ccoeff, const fptype M3, const fptype W3, fptype allV3[] ) @@ -1160,6 +1175,7 @@ namespace mg5amcCpu const fptype allV3[], const fptype allV4[], const fptype allCOUP[], + const double Ccoeff, const fptype M1, const fptype W1, fptype allV1[] ) @@ -1194,6 +1210,7 @@ namespace mg5amcCpu const fptype allV3[], const fptype allV4[], const fptype allCOUP[], + const double Ccoeff, const fptype M1, const fptype W1, fptype allV1[] ) @@ -1228,6 +1245,7 @@ namespace mg5amcCpu const fptype allV3[], const fptype allV4[], const fptype allCOUP[], + const double Ccoeff, const fptype M1, const fptype W1, fptype allV1[] ) diff --git a/epochX/cudacpp/gg_ttg.mad/src/cudacpp_src.mk b/epochX/cudacpp/gg_ttg.mad/src/cudacpp_src.mk index 554d7a704c..750986464e 100644 --- a/epochX/cudacpp/gg_ttg.mad/src/cudacpp_src.mk +++ b/epochX/cudacpp/gg_ttg.mad/src/cudacpp_src.mk @@ -1,7 +1,7 @@ # Copyright (C) 2020-2023 CERN and UCLouvain. # Licensed under the GNU Lesser General Public License (version 3 or later). # Created by: S. Roiser (Feb 2020) for the MG5aMC CUDACPP plugin. -# Further modified by: O. Mattelaer, S. Roiser, A. Valassi (2020-2023) for the MG5aMC CUDACPP plugin. +# Further modified by: J. Teig, O. Mattelaer, S. Roiser, A. Valassi (2020-2023) for the MG5aMC CUDACPP plugin. #=== Determine the name of this makefile (https://ftp.gnu.org/old-gnu/Manuals/make-3.80/html_node/make_17.html) #=== NB: assume that the same name (e.g. cudacpp.mk, Makefile...) is used in the Subprocess and src directories @@ -88,50 +88,52 @@ CXXFLAGS += $(OMPFLAGS) # Set the build flags appropriate to each AVX choice (example: "make AVX=none") # [NB MGONGPU_PVW512 is needed because "-mprefer-vector-width=256" is not exposed in a macro] # [See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96476] -$(info AVX=$(AVX)) -ifeq ($(UNAME_P),ppc64le) - ifeq ($(AVX),sse4) - override AVXFLAGS = -D__SSE4_2__ # Power9 VSX with 128 width (VSR registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on PowerPC for the moment) - endif -else ifeq ($(UNAME_P),arm) - ifeq ($(AVX),sse4) - override AVXFLAGS = -D__SSE4_2__ # ARM NEON with 128 width (Q/quadword registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on ARM for the moment) - endif -else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 - ifeq ($(AVX),none) - override AVXFLAGS = -mno-sse3 # no SIMD - else ifeq ($(AVX),sse4) - override AVXFLAGS = -mno-avx # SSE4.2 with 128 width (xmm registers) - else ifeq ($(AVX),avx2) - override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(AVX),512y) - override AVXFLAGS = -march=skylake -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(AVX),512z) - override AVXFLAGS = -march=skylake -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) +ifeq ($(NVCC),) + $(info AVX=$(AVX)) + ifeq ($(UNAME_P),ppc64le) + ifeq ($(AVX),sse4) + override AVXFLAGS = -D__SSE4_2__ # Power9 VSX with 128 width (VSR registers) + else ifneq ($(AVX),none) + $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on PowerPC for the moment) + endif + else ifeq ($(UNAME_P),arm) + ifeq ($(AVX),sse4) + override AVXFLAGS = -D__SSE4_2__ # ARM NEON with 128 width (Q/quadword registers) + else ifneq ($(AVX),none) + $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on ARM for the moment) + endif + else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 + ifeq ($(AVX),none) + override AVXFLAGS = -mno-sse3 # no SIMD + else ifeq ($(AVX),sse4) + override AVXFLAGS = -mno-avx # SSE4.2 with 128 width (xmm registers) + else ifeq ($(AVX),avx2) + override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] + else ifeq ($(AVX),512y) + override AVXFLAGS = -march=skylake -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] + else ifeq ($(AVX),512z) + override AVXFLAGS = -march=skylake -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) + else + $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) + endif else - $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) - endif -else - ifeq ($(AVX),none) - override AVXFLAGS = -march=x86-64 # no SIMD (see #588) - else ifeq ($(AVX),sse4) - override AVXFLAGS = -march=nehalem # SSE4.2 with 128 width (xmm registers) - else ifeq ($(AVX),avx2) - override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(AVX),512y) - override AVXFLAGS = -march=skylake-avx512 -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(AVX),512z) - override AVXFLAGS = -march=skylake-avx512 -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) + ifeq ($(AVX),none) + override AVXFLAGS = -march=x86-64 # no SIMD (see #588) + else ifeq ($(AVX),sse4) + override AVXFLAGS = -march=nehalem # SSE4.2 with 128 width (xmm registers) + else ifeq ($(AVX),avx2) + override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] + else ifeq ($(AVX),512y) + override AVXFLAGS = -march=skylake-avx512 -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] + else ifeq ($(AVX),512z) + override AVXFLAGS = -march=skylake-avx512 -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) + else ifneq ($(AVX),none) + $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) + endif endif + # For the moment, use AVXFLAGS everywhere: eventually, use them only in encapsulated implementations? + CXXFLAGS+= $(AVXFLAGS) endif -# For the moment, use AVXFLAGS everywhere: eventually, use them only in encapsulated implementations? -CXXFLAGS+= $(AVXFLAGS) # Set the build flags appropriate to each FPTYPE choice (example: "make FPTYPE=f") ###$(info FPTYPE=$(FPTYPE)) @@ -175,11 +177,19 @@ endif # Build directory "short" tag (defines target and path to the optional build directory) # (Rationale: keep directory names shorter, e.g. do not include random number generator choice) -override DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) +ifneq ($(NVCC),) + override DIRTAG = cuda_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) +else + override DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) +endif # Build lockfile "full" tag (defines full specification of build options that cannot be intermixed) # (Rationale: avoid mixing of CUDA and no-CUDA environment builds with different random number generators) -override TAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) +ifneq ($(NVCC),) + override TAG = cuda_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) +else + override TAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) +endif # Build directory: current directory by default, or build.$(DIRTAG) if USEBUILDDIR==1 ###$(info Current directory is $(shell pwd)) @@ -216,35 +226,21 @@ endif MG5AMC_COMMONLIB = mg5amc_common # First target (default goal) -all.$(TAG): $(BUILDDIR)/.build.$(TAG) $(LIBDIR)/.build.$(TAG) $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so +all.$(TAG): $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so # Target (and build options): debug debug: OPTFLAGS = -g -O0 debug: all.$(TAG) -# Target: tag-specific build lockfiles -override oldtagsb=`if [ -d $(BUILDDIR) ]; then find $(BUILDDIR) -maxdepth 1 -name '.build.*' ! -name '.build.$(TAG)' -exec echo $(shell pwd)/{} \; ; fi` -override oldtagsl=`if [ -d $(LIBDIR) ]; then find $(LIBDIR) -maxdepth 1 -name '.build.*' ! -name '.build.$(TAG)' -exec echo $(shell pwd)/{} \; ; fi` - -$(BUILDDIR)/.build.$(TAG): $(LIBDIR)/.build.$(TAG) - -$(LIBDIR)/.build.$(TAG): - @if [ "$(oldtagsl)" != "" ]; then echo -e "Cannot build for tag=$(TAG) as old builds exist in $(LIBDIR) for other tags:\n$(oldtagsl)\nPlease run 'make clean' first\nIf 'make clean' is not enough: run 'make clean USEBUILDDIR=1 AVX=$(AVX) FPTYPE=$(FPTYPE)' or 'make cleanall'"; exit 1; fi - @if [ "$(oldtagsb)" != "" ]; then echo -e "Cannot build for tag=$(TAG) as old builds exist in $(BUILDDIR) for other tags:\n$(oldtagsb)\nPlease run 'make clean' first\nIf 'make clean' is not enough: run 'make clean USEBUILDDIR=1 AVX=$(AVX) FPTYPE=$(FPTYPE)' or 'make cleanall'"; exit 1; fi - @if [ ! -d $(LIBDIR) ]; then echo "mkdir -p $(LIBDIR)"; mkdir -p $(LIBDIR); fi - @touch $(LIBDIR)/.build.$(TAG) - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - @touch $(BUILDDIR)/.build.$(TAG) - #------------------------------------------------------------------------------- # Generic target and build rules: objects from C++ compilation -$(BUILDDIR)/%.o : %.cc *.h $(BUILDDIR)/.build.$(TAG) +$(BUILDDIR)/%.o : %.cc *.h @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi $(CXX) $(CPPFLAGS) $(CXXFLAGS) -fPIC -c $< -o $@ # Generic target and build rules: objects from CUDA compilation -$(BUILDDIR)/%_cu.o : %.cc *.h $(BUILDDIR)/.build.$(TAG) +$(BUILDDIR)/%_cu.o : %.cc *.h @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c -x cu $< -o $@ @@ -271,20 +267,61 @@ endif # Target: clean the builds .PHONY: clean +BUILD_DIRS := $(wildcard build.*) +NUM_BUILD_DIRS := $(words $(BUILD_DIRS)) + clean: ifeq ($(USEBUILDDIR),1) - rm -rf $(LIBDIR) - rm -rf $(BUILDDIR) +ifeq ($(NUM_BUILD_DIRS),1) + $(info USEBUILDDIR=1, only one src build directory found.) + rm -rf ../lib/$(BUILD_DIRS) + rm -rf $(BUILD_DIRS) +else ifeq ($(NUM_BUILD_DIRS),0) + $(error USEBUILDDIR=1, but no src build directories are found.) else - rm -f $(LIBDIR)/.build.* $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so - rm -f $(BUILDDIR)/.build.* $(BUILDDIR)/*.o $(BUILDDIR)/*.exe + $(error Multiple src BUILDDIR's found! Use 'cleannone', 'cleansse4', 'cleanavx2', 'clean512y','clean512z', 'cleancuda' or 'cleanall'.) +endif +else + rm -f ../lib/lib$(MG5AMC_COMMONLIB).so + rm -f $(BUILDDIR)/*.o $(BUILDDIR)/*.exe endif cleanall: @echo - $(MAKE) clean -f $(THISMK) + rm -f ../lib/lib$(MG5AMC_COMMONLIB).so + rm -f $(BUILDDIR)/*.o $(BUILDDIR)/*.exe @echo - rm -rf $(LIBDIR)/build.* + rm -rf ../lib/build.* rm -rf build.* +# Target: clean different builds + +cleannone: + rm -rf ../lib/build.none_* + rm -rf build.none_* + +cleansse4: + rm -rf ../lib/build.sse4_* + rm -rf build.sse4_* + +cleanavx2: + rm -rf ../lib/build.avx2_* + rm -rf build.avx2_* + +clean512y: + rm -rf ../lib/build.512y_* + rm -rf build.512y_* + +clean512z: + rm -rf ../lib/build.512z_* + rm -rf build.512z_* + +cleancuda: + rm -rf ../lib/build.cuda_* + rm -rf build.cuda_* + +cleandir: + rm -f ./*.o ./*.exe + rm -f ../lib/lib$(MG5AMC_COMMONLIB).so + #------------------------------------------------------------------------------- diff --git a/epochX/cudacpp/gg_ttg.sa/SubProcesses/MatrixElementKernels.cc b/epochX/cudacpp/gg_ttg.sa/SubProcesses/MatrixElementKernels.cc index 30257195b6..cfed7d2af5 100644 --- a/epochX/cudacpp/gg_ttg.sa/SubProcesses/MatrixElementKernels.cc +++ b/epochX/cudacpp/gg_ttg.sa/SubProcesses/MatrixElementKernels.cc @@ -112,10 +112,17 @@ namespace mg5amcCpu // See https://community.arm.com/arm-community-blogs/b/operating-systems-blog/posts/runtime-detection-of-cpu-features-on-an-armv8-a-cpu bool ok = true; // this is just an assumption! const std::string tag = "arm neon (128bit as in SSE4.2)"; -#else +#elif defined(__x86_64__) || defined(__i386__) bool known = true; bool ok = __builtin_cpu_supports( "sse4.2" ); const std::string tag = "nehalem (SSE4.2)"; +#else + bool known = false; // __builtin_cpu_supports is not supported + // See https://gcc.gnu.org/onlinedocs/gcc/Basic-PowerPC-Built-in-Functions-Available-on-all-Configurations.html + // See https://stackoverflow.com/q/62783908 + // See https://community.arm.com/arm-community-blogs/b/operating-systems-blog/posts/runtime-detection-of-cpu-features-on-an-armv8-a-cpu + bool ok = true; // this is just an assumption! + const std::string tag = "arm neon (128bit as in SSE4.2)"; #endif #else bool known = true; diff --git a/epochX/cudacpp/gg_ttg.sa/SubProcesses/P1_Sigma_sm_gg_ttxg/CPPProcess.cc b/epochX/cudacpp/gg_ttg.sa/SubProcesses/P1_Sigma_sm_gg_ttxg/CPPProcess.cc index 6f71af24b1..644126163b 100644 --- a/epochX/cudacpp/gg_ttg.sa/SubProcesses/P1_Sigma_sm_gg_ttxg/CPPProcess.cc +++ b/epochX/cudacpp/gg_ttg.sa/SubProcesses/P1_Sigma_sm_gg_ttxg/CPPProcess.cc @@ -248,11 +248,11 @@ namespace mg5amcCpu vxxxxx( momenta, 0., cHel[ihel][4], +1, w_fp[4], 4 ); - VVV1P0_1( w_fp[0], w_fp[1], COUPs[0], 0., 0., w_fp[5] ); - FFV1P0_3( w_fp[3], w_fp[2], COUPs[1], 0., 0., w_fp[6] ); + VVV1P0_1( w_fp[0], w_fp[1], COUPs[0], 1.0, 0., 0., w_fp[5] ); + FFV1P0_3( w_fp[3], w_fp[2], COUPs[1], 1.0, 0., 0., w_fp[6] ); // Amplitude(s) for diagram number 1 - VVV1_0( w_fp[5], w_fp[6], w_fp[4], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[5], w_fp[6], w_fp[4], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -264,10 +264,10 @@ namespace mg5amcCpu // *** DIAGRAM 2 OF 16 *** // Wavefunction(s) for diagram number 2 - FFV1_1( w_fp[2], w_fp[4], COUPs[1], cIPD[0], cIPD[1], w_fp[7] ); + FFV1_1( w_fp[2], w_fp[4], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[7] ); // Amplitude(s) for diagram number 2 - FFV1_0( w_fp[3], w_fp[7], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[7], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -277,10 +277,10 @@ namespace mg5amcCpu // *** DIAGRAM 3 OF 16 *** // Wavefunction(s) for diagram number 3 - FFV1_2( w_fp[3], w_fp[4], COUPs[1], cIPD[0], cIPD[1], w_fp[8] ); + FFV1_2( w_fp[3], w_fp[4], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[8] ); // Amplitude(s) for diagram number 3 - FFV1_0( w_fp[8], w_fp[2], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[8], w_fp[2], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -290,11 +290,11 @@ namespace mg5amcCpu // *** DIAGRAM 4 OF 16 *** // Wavefunction(s) for diagram number 4 - FFV1_1( w_fp[2], w_fp[0], COUPs[1], cIPD[0], cIPD[1], w_fp[5] ); - FFV1_2( w_fp[3], w_fp[1], COUPs[1], cIPD[0], cIPD[1], w_fp[9] ); + FFV1_1( w_fp[2], w_fp[0], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[5] ); + FFV1_2( w_fp[3], w_fp[1], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[9] ); // Amplitude(s) for diagram number 4 - FFV1_0( w_fp[9], w_fp[5], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[9], w_fp[5], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -303,10 +303,10 @@ namespace mg5amcCpu // *** DIAGRAM 5 OF 16 *** // Wavefunction(s) for diagram number 5 - VVV1P0_1( w_fp[1], w_fp[4], COUPs[0], 0., 0., w_fp[10] ); + VVV1P0_1( w_fp[1], w_fp[4], COUPs[0], 1.0, 0., 0., w_fp[10] ); // Amplitude(s) for diagram number 5 - FFV1_0( w_fp[3], w_fp[5], w_fp[10], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[5], w_fp[10], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -319,7 +319,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 6 - FFV1_0( w_fp[8], w_fp[5], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[8], w_fp[5], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -328,11 +328,11 @@ namespace mg5amcCpu // *** DIAGRAM 7 OF 16 *** // Wavefunction(s) for diagram number 7 - FFV1_2( w_fp[3], w_fp[0], COUPs[1], cIPD[0], cIPD[1], w_fp[5] ); - FFV1_1( w_fp[2], w_fp[1], COUPs[1], cIPD[0], cIPD[1], w_fp[11] ); + FFV1_2( w_fp[3], w_fp[0], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[5] ); + FFV1_1( w_fp[2], w_fp[1], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[11] ); // Amplitude(s) for diagram number 7 - FFV1_0( w_fp[5], w_fp[11], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[5], w_fp[11], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -344,7 +344,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 8 - FFV1_0( w_fp[5], w_fp[2], w_fp[10], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[5], w_fp[2], w_fp[10], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -357,7 +357,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 9 - FFV1_0( w_fp[5], w_fp[7], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[5], w_fp[7], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -366,10 +366,10 @@ namespace mg5amcCpu // *** DIAGRAM 10 OF 16 *** // Wavefunction(s) for diagram number 10 - VVV1P0_1( w_fp[0], w_fp[4], COUPs[0], 0., 0., w_fp[5] ); + VVV1P0_1( w_fp[0], w_fp[4], COUPs[0], 1.0, 0., 0., w_fp[5] ); // Amplitude(s) for diagram number 10 - FFV1_0( w_fp[3], w_fp[11], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[11], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -382,7 +382,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 11 - FFV1_0( w_fp[9], w_fp[2], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[9], w_fp[2], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -395,7 +395,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 12 - VVV1_0( w_fp[5], w_fp[1], w_fp[6], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[5], w_fp[1], w_fp[6], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -410,7 +410,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 13 - FFV1_0( w_fp[8], w_fp[11], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[8], w_fp[11], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -422,7 +422,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 14 - FFV1_0( w_fp[9], w_fp[7], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[9], w_fp[7], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -434,7 +434,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 15 - VVV1_0( w_fp[0], w_fp[10], w_fp[6], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[0], w_fp[10], w_fp[6], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -446,12 +446,12 @@ namespace mg5amcCpu // *** DIAGRAM 16 OF 16 *** // Wavefunction(s) for diagram number 16 - VVVV1P0_1( w_fp[0], w_fp[1], w_fp[4], COUPs[2], 0., 0., w_fp[10] ); - VVVV3P0_1( w_fp[0], w_fp[1], w_fp[4], COUPs[2], 0., 0., w_fp[6] ); - VVVV4P0_1( w_fp[0], w_fp[1], w_fp[4], COUPs[2], 0., 0., w_fp[9] ); + VVVV1P0_1( w_fp[0], w_fp[1], w_fp[4], COUPs[2], 1.0, 0., 0., w_fp[10] ); + VVVV3P0_1( w_fp[0], w_fp[1], w_fp[4], COUPs[2], 1.0, 0., 0., w_fp[6] ); + VVVV4P0_1( w_fp[0], w_fp[1], w_fp[4], COUPs[2], 1.0, 0., 0., w_fp[9] ); // Amplitude(s) for diagram number 16 - FFV1_0( w_fp[3], w_fp[2], w_fp[10], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[2], w_fp[10], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -459,7 +459,7 @@ namespace mg5amcCpu jamp_sv[1] -= amp_sv[0]; jamp_sv[3] -= amp_sv[0]; jamp_sv[5] += amp_sv[0]; - FFV1_0( w_fp[3], w_fp[2], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[2], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -467,7 +467,7 @@ namespace mg5amcCpu jamp_sv[2] += amp_sv[0]; jamp_sv[3] -= amp_sv[0]; jamp_sv[4] += amp_sv[0]; - FFV1_0( w_fp[3], w_fp[2], w_fp[9], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[2], w_fp[9], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1014,8 +1014,7 @@ namespace mg5amcCpu { // nprocesses>1 was last observed for "mirror processes" in uux_ttx in the 270 branch (see issue #343 and PRs #360 and #396) constexpr int nprocesses = 1; - static_assert( nprocesses == 1, "Assume nprocesses == 1" ); - // process_id corresponds to the index of DSIG1 Fortran functions (must be 1 because cudacpp is unable to handle DSIG2) + static_assert( nprocesses == 1 || nprocesses == 2, "Assume nprocesses == 1 or 2" ); constexpr int process_id = 1; // code generation source: standalone_cudacpp static_assert( process_id == 1, "Assume process_id == 1" ); } diff --git a/epochX/cudacpp/gg_ttg.sa/SubProcesses/cudacpp.mk b/epochX/cudacpp/gg_ttg.sa/SubProcesses/cudacpp.mk index 43cee0977e..15669185ad 100644 --- a/epochX/cudacpp/gg_ttg.sa/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/gg_ttg.sa/SubProcesses/cudacpp.mk @@ -1,7 +1,7 @@ # Copyright (C) 2020-2023 CERN and UCLouvain. # Licensed under the GNU Lesser General Public License (version 3 or later). # Created by: S. Roiser (Feb 2020) for the MG5aMC CUDACPP plugin. -# Further modified by: O. Mattelaer, S. Roiser, A. Valassi (2020-2023) for the MG5aMC CUDACPP plugin. +# Further modified by: J. Teig, O. Mattelaer, S. Roiser, A. Valassi (2020-2023) for the MG5aMC CUDACPP plugin. #=== Determine the name of this makefile (https://ftp.gnu.org/old-gnu/Manuals/make-3.80/html_node/make_17.html) #=== NB: different names (e.g. cudacpp.mk and cudacpp_src.mk) are used in the Subprocess and src directories @@ -86,6 +86,14 @@ endif #------------------------------------------------------------------------------- +.DEFAULT_GOAL := usage + +# Target if user does not specify target +usage: + $(error Unknown target='$(MAKECMDGOALS)': only 'cppnone', 'cppsse4', 'cppavx2', 'cpp512y', 'cpp512z' and 'cuda' are supported!) + +#------------------------------------------------------------------------------- + #=== Configure the C++ compiler CXXFLAGS = $(OPTFLAGS) -std=c++17 $(INCFLAGS) -Wall -Wshadow -Wextra @@ -103,70 +111,73 @@ endif #------------------------------------------------------------------------------- -#=== Configure the CUDA compiler - -# If CXX is not a single word (example "clang++ --gcc-toolchain...") then disable CUDA builds (issue #505) -# This is because it is impossible to pass this to "CUFLAGS += -ccbin " below -ifneq ($(words $(subst ccache ,,$(CXX))),1) # allow at most "CXX=ccache " from outside - $(warning CUDA builds are not supported for multi-word CXX "$(CXX)") - override CUDA_HOME=disabled -endif - -# If CUDA_HOME is not set, try to set it from the location of nvcc -ifndef CUDA_HOME - CUDA_HOME = $(patsubst %bin/nvcc,%,$(shell which nvcc 2>/dev/null)) - $(warning CUDA_HOME was not set: using "$(CUDA_HOME)") -endif - -# Set NVCC as $(CUDA_HOME)/bin/nvcc if it exists -ifneq ($(wildcard $(CUDA_HOME)/bin/nvcc),) - NVCC = $(CUDA_HOME)/bin/nvcc - USE_NVTX ?=-DUSE_NVTX - # See https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html - # See https://arnon.dk/matching-sm-architectures-arch-and-gencode-for-various-nvidia-cards/ - # Default: use compute capability 70 for V100 (CERN lxbatch, CERN itscrd, Juwels Cluster). - # Embed device code for 70, and PTX for 70+. - # Export MADGRAPH_CUDA_ARCHITECTURE (comma-separated list) to use another value or list of values (see #533). - # Examples: use 60 for P100 (Piz Daint), 80 for A100 (Juwels Booster, NVidia raplab/Curiosity). - MADGRAPH_CUDA_ARCHITECTURE ?= 70 - ###CUARCHFLAGS = -gencode arch=compute_$(MADGRAPH_CUDA_ARCHITECTURE),code=compute_$(MADGRAPH_CUDA_ARCHITECTURE) -gencode arch=compute_$(MADGRAPH_CUDA_ARCHITECTURE),code=sm_$(MADGRAPH_CUDA_ARCHITECTURE) # Older implementation (AV): go back to this one for multi-GPU support #533 - ###CUARCHFLAGS = --gpu-architecture=compute_$(MADGRAPH_CUDA_ARCHITECTURE) --gpu-code=sm_$(MADGRAPH_CUDA_ARCHITECTURE),compute_$(MADGRAPH_CUDA_ARCHITECTURE) # Newer implementation (SH): cannot use this as-is for multi-GPU support #533 - comma:=, - CUARCHFLAGS = $(foreach arch,$(subst $(comma), ,$(MADGRAPH_CUDA_ARCHITECTURE)),-gencode arch=compute_$(arch),code=compute_$(arch) -gencode arch=compute_$(arch),code=sm_$(arch)) - CUINC = -I$(CUDA_HOME)/include/ - CURANDLIBFLAGS = -L$(CUDA_HOME)/lib64/ -lcurand # NB: -lcuda is not needed here! - CUOPTFLAGS = -lineinfo - CUFLAGS = $(foreach opt, $(OPTFLAGS), -Xcompiler $(opt)) $(CUOPTFLAGS) $(INCFLAGS) $(CUINC) $(USE_NVTX) $(CUARCHFLAGS) -use_fast_math - ###CUFLAGS += -Xcompiler -Wall -Xcompiler -Wextra -Xcompiler -Wshadow - ###NVCC_VERSION = $(shell $(NVCC) --version | grep 'Cuda compilation tools' | cut -d' ' -f5 | cut -d, -f1) - CUFLAGS += -std=c++17 # need CUDA >= 11.2 (see #333): this is enforced in mgOnGpuConfig.h - # Without -maxrregcount: baseline throughput: 6.5E8 (16384 32 12) up to 7.3E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 160 # improves throughput: 6.9E8 (16384 32 12) up to 7.7E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 128 # improves throughput: 7.3E8 (16384 32 12) up to 7.6E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 96 # degrades throughput: 4.1E8 (16384 32 12) up to 4.5E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 64 # degrades throughput: 1.7E8 (16384 32 12) flat at 1.7E8 (65536 128 12) -else ifneq ($(origin REQUIRE_CUDA),undefined) - # If REQUIRE_CUDA is set but no cuda is found, stop here (e.g. for CI tests on GPU #443) - $(error No cuda installation found (set CUDA_HOME or make nvcc visible in PATH)) -else - # No cuda. Switch cuda compilation off and go to common random numbers in C++ - $(warning CUDA_HOME is not set or is invalid: export CUDA_HOME to compile with cuda) - override NVCC= - override USE_NVTX= - override CUINC= - override CURANDLIBFLAGS= -endif -export NVCC -export CUFLAGS +#=== Configure the CUDA compiler for the CUDA target -# Set the host C++ compiler for nvcc via "-ccbin " -# (NB issue #505: this must be a single word, "clang++ --gcc-toolchain..." is not supported) -CUFLAGS += -ccbin $(shell which $(subst ccache ,,$(CXX))) +ifneq (,$(findstring $(MAKECMDGOALS),cuda-gcheck-runGcheck-runFGcheck-cmpFGcheck-memcheck)) + # If CXX is not a single word (example "clang++ --gcc-toolchain...") then disable CUDA builds (issue #505) + # This is because it is impossible to pass this to "CUFLAGS += -ccbin " below + ifneq ($(words $(subst ccache ,,$(CXX))),1) # allow at most "CXX=ccache " from outside + $(warning CUDA builds are not supported for multi-word CXX "$(CXX)") + override CUDA_HOME=disabled + endif -# Allow newer (unsupported) C++ compilers with older versions of CUDA if ALLOW_UNSUPPORTED_COMPILER_IN_CUDA is set (#504) -ifneq ($(origin ALLOW_UNSUPPORTED_COMPILER_IN_CUDA),undefined) -CUFLAGS += -allow-unsupported-compiler -endif + # If CUDA_HOME is not set, try to set it from the location of nvcc + ifndef CUDA_HOME + CUDA_HOME = $(patsubst %bin/nvcc,%,$(shell which nvcc 2>/dev/null)) + $(warning CUDA_HOME was not set: using "$(CUDA_HOME)") + endif + + # Set NVCC as $(CUDA_HOME)/bin/nvcc if it exists + ifneq ($(wildcard $(CUDA_HOME)/bin/nvcc),) + NVCC = $(CUDA_HOME)/bin/nvcc + USE_NVTX ?=-DUSE_NVTX + # See https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html + # See https://arnon.dk/matching-sm-architectures-arch-and-gencode-for-various-nvidia-cards/ + # Default: use compute capability 70 for V100 (CERN lxbatch, CERN itscrd, Juwels Cluster). + # Embed device code for 70, and PTX for 70+. + # Export MADGRAPH_CUDA_ARCHITECTURE (comma-separated list) to use another value or list of values (see #533). + # Examples: use 60 for P100 (Piz Daint), 80 for A100 (Juwels Booster, NVidia raplab/Curiosity). + MADGRAPH_CUDA_ARCHITECTURE ?= 70 + ###CUARCHFLAGS = -gencode arch=compute_$(MADGRAPH_CUDA_ARCHITECTURE),code=compute_$(MADGRAPH_CUDA_ARCHITECTURE) -gencode arch=compute_$(MADGRAPH_CUDA_ARCHITECTURE),code=sm_$(MADGRAPH_CUDA_ARCHITECTURE) # Older implementation (AV): go back to this one for multi-GPU support #533 + ###CUARCHFLAGS = --gpu-architecture=compute_$(MADGRAPH_CUDA_ARCHITECTURE) --gpu-code=sm_$(MADGRAPH_CUDA_ARCHITECTURE),compute_$(MADGRAPH_CUDA_ARCHITECTURE) # Newer implementation (SH): cannot use this as-is for multi-GPU support #533 + comma:=, + CUARCHFLAGS = $(foreach arch,$(subst $(comma), ,$(MADGRAPH_CUDA_ARCHITECTURE)),-gencode arch=compute_$(arch),code=compute_$(arch) -gencode arch=compute_$(arch),code=sm_$(arch)) + CUINC = -I$(CUDA_HOME)/include/ + CURANDLIBFLAGS = -L$(CUDA_HOME)/lib64/ -lcurand # NB: -lcuda is not needed here! + CUOPTFLAGS = -lineinfo + CUFLAGS = $(foreach opt, $(OPTFLAGS), -Xcompiler $(opt)) $(CUOPTFLAGS) $(INCFLAGS) $(CUINC) $(USE_NVTX) $(CUARCHFLAGS) -use_fast_math + ###CUFLAGS += -Xcompiler -Wall -Xcompiler -Wextra -Xcompiler -Wshadow + ###NVCC_VERSION = $(shell $(NVCC) --version | grep 'Cuda compilation tools' | cut -d' ' -f5 | cut -d, -f1) + CUFLAGS += -std=c++17 # need CUDA >= 11.2 (see #333): this is enforced in mgOnGpuConfig.h + # Without -maxrregcount: baseline throughput: 6.5E8 (16384 32 12) up to 7.3E8 (65536 128 12) + ###CUFLAGS+= --maxrregcount 160 # improves throughput: 6.9E8 (16384 32 12) up to 7.7E8 (65536 128 12) + ###CUFLAGS+= --maxrregcount 128 # improves throughput: 7.3E8 (16384 32 12) up to 7.6E8 (65536 128 12) + ###CUFLAGS+= --maxrregcount 96 # degrades throughput: 4.1E8 (16384 32 12) up to 4.5E8 (65536 128 12) + ###CUFLAGS+= --maxrregcount 64 # degrades throughput: 1.7E8 (16384 32 12) flat at 1.7E8 (65536 128 12) + else ifneq ($(origin REQUIRE_CUDA),undefined) + # If REQUIRE_CUDA is set but no cuda is found, stop here (e.g. for CI tests on GPU #443) + $(error No cuda installation found (set CUDA_HOME or make nvcc visible in PATH)) + else + # No cuda. Switch cuda compilation off and go to common random numbers in C++ + $(warning CUDA_HOME is not set or is invalid: export CUDA_HOME to compile with cuda) + override NVCC= + override USE_NVTX= + override CUINC= + override CURANDLIBFLAGS= + endif + export NVCC + export CUFLAGS + + # Set the host C++ compiler for nvcc via "-ccbin " + # (NB issue #505: this must be a single word, "clang++ --gcc-toolchain..." is not supported) + CUFLAGS += -ccbin $(shell which $(subst ccache ,,$(CXX))) + + # Allow newer (unsupported) C++ compilers with older versions of CUDA if ALLOW_UNSUPPORTED_COMPILER_IN_CUDA is set (#504) + ifneq ($(origin ALLOW_UNSUPPORTED_COMPILER_IN_CUDA),undefined) + CUFLAGS += -allow-unsupported-compiler + endif + +endif # ($(MAKECMDGOALS),cuda) #------------------------------------------------------------------------------- @@ -226,32 +237,6 @@ override OMPFLAGS = -fopenmp ###override OMPFLAGS = # disable OpenMP MT (default before #575) endif -# Set the default AVX (vectorization) choice -ifeq ($(AVX),) - ifeq ($(UNAME_P),ppc64le) - ###override AVX = none - override AVX = sse4 - else ifeq ($(UNAME_P),arm) - ###override AVX = none - override AVX = sse4 - else ifeq ($(wildcard /proc/cpuinfo),) - override AVX = none - $(warning Using AVX='$(AVX)' because host SIMD features cannot be read from /proc/cpuinfo) - else ifeq ($(shell grep -m1 -c avx512vl /proc/cpuinfo)$(shell $(CXX) --version | grep ^clang),1) - override AVX = 512y - ###$(info Using AVX='$(AVX)' as no user input exists) - else - override AVX = avx2 - ifneq ($(shell grep -m1 -c avx512vl /proc/cpuinfo),1) - $(warning Using AVX='$(AVX)' because host does not support avx512vl) - else - $(warning Using AVX='$(AVX)' because this is faster than avx512vl for clang) - endif - endif -else - ###$(info Using AVX='$(AVX)' according to user input) -endif - # Set the default FPTYPE (floating point type) choice ifeq ($(FPTYPE),) override FPTYPE = d @@ -276,6 +261,21 @@ ifeq ($(RNDGEN),) endif endif +# set the correct AVX based on avxcpp target +ifeq ($(MAKECMDGOALS),cppnone) # no SIMD + override AVX = none +else ifeq ($(MAKECMDGOALS),cppsse4) # SSE4.2 with 128 width (xmm registers) + override AVX = sse4 +else ifeq ($(MAKECMDGOALS),cppavx2) # AVX2 with 256 width (ymm registers) [DEFAULT for clang] + override AVX = avx2 +else ifeq ($(MAKECMDGOALS),cpp512y) # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] + override AVX = 512y +else ifeq ($(MAKECMDGOALS),cpp512z) # AVX512 with 512 width (zmm registers) + override AVX = 512z +else + override AVX = none +endif + # Export AVX, FPTYPE, HELINL, HRDCOD, RNDGEN, OMPFLAGS so that it is not necessary to pass them to the src Makefile too export AVX export FPTYPE @@ -295,50 +295,52 @@ CXXFLAGS += $(OMPFLAGS) # Set the build flags appropriate to each AVX choice (example: "make AVX=none") # [NB MGONGPU_PVW512 is needed because "-mprefer-vector-width=256" is not exposed in a macro] # [See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96476] -$(info AVX=$(AVX)) -ifeq ($(UNAME_P),ppc64le) - ifeq ($(AVX),sse4) - override AVXFLAGS = -D__SSE4_2__ # Power9 VSX with 128 width (VSR registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on PowerPC for the moment) - endif -else ifeq ($(UNAME_P),arm) - ifeq ($(AVX),sse4) - override AVXFLAGS = -D__SSE4_2__ # ARM NEON with 128 width (Q/quadword registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on ARM for the moment) - endif -else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 - ifeq ($(AVX),none) - override AVXFLAGS = -mno-sse3 # no SIMD - else ifeq ($(AVX),sse4) - override AVXFLAGS = -mno-avx # SSE4.2 with 128 width (xmm registers) - else ifeq ($(AVX),avx2) - override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(AVX),512y) - override AVXFLAGS = -march=skylake -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(AVX),512z) - override AVXFLAGS = -march=skylake -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) - else - $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) - endif -else - ifeq ($(AVX),none) - override AVXFLAGS = -march=x86-64 # no SIMD (see #588) - else ifeq ($(AVX),sse4) - override AVXFLAGS = -march=nehalem # SSE4.2 with 128 width (xmm registers) - else ifeq ($(AVX),avx2) - override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(AVX),512y) - override AVXFLAGS = -march=skylake-avx512 -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(AVX),512z) - override AVXFLAGS = -march=skylake-avx512 -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) +ifeq ($(findstring cpp,$(MAKECMDGOALS)),cpp) + $(info AVX=$(AVX)) + ifeq ($(UNAME_P),ppc64le) + ifeq ($(AVX),sse4) + override AVXFLAGS = -D__SSE4_2__ # Power9 VSX with 128 width (VSR registers) + else ifneq ($(AVX),none) + $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on PowerPC for the moment) + endif + else ifeq ($(UNAME_P),arm) + ifeq ($(AVX),sse4) + override AVXFLAGS = -D__SSE4_2__ # ARM NEON with 128 width (Q/quadword registers) + else ifneq ($(AVX),none) + $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on ARM for the moment) + endif + else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 + ifeq ($(AVX),none) + override AVXFLAGS = -mno-sse3 # no SIMD + else ifeq ($(AVX),sse4) + override AVXFLAGS = -mno-avx # SSE4.2 with 128 width (xmm registers) + else ifeq ($(AVX),avx2) + override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] + else ifeq ($(AVX),512y) + override AVXFLAGS = -march=skylake -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] + else ifeq ($(AVX),512z) + override AVXFLAGS = -march=skylake -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) + else + $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) + endif else - $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) + ifeq ($(AVX),none) + override AVXFLAGS = -march=x86-64 # no SIMD (see #588) + else ifeq ($(AVX),sse4) + override AVXFLAGS = -march=nehalem # SSE4.2 with 128 width (xmm registers) + else ifeq ($(AVX),avx2) + override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] + else ifeq ($(AVX),512y) + override AVXFLAGS = -march=skylake-avx512 -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] + else ifeq ($(AVX),512z) + override AVXFLAGS = -march=skylake-avx512 -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) + else + $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) + endif endif + # For the moment, use AVXFLAGS everywhere: eventually, use them only in encapsulated implementations? + CXXFLAGS+= $(AVXFLAGS) endif -# For the moment, use AVXFLAGS everywhere: eventually, use them only in encapsulated implementations? -CXXFLAGS+= $(AVXFLAGS) # Set the build flags appropriate to each FPTYPE choice (example: "make FPTYPE=f") $(info FPTYPE=$(FPTYPE)) @@ -389,11 +391,19 @@ endif # Build directory "short" tag (defines target and path to the optional build directory) # (Rationale: keep directory names shorter, e.g. do not include random number generator choice) -override DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) +ifneq ($(NVCC),) + override DIRTAG = cuda_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) +else + override DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) +endif # Build lockfile "full" tag (defines full specification of build options that cannot be intermixed) # (Rationale: avoid mixing of CUDA and no-CUDA environment builds with different random number generators) -override TAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) +ifneq ($(NVCC),) + override TAG = cuda_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) +else + override TAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) +endif # Build directory: current directory by default, or build.$(DIRTAG) if USEBUILDDIR==1 ifeq ($(USEBUILDDIR),1) @@ -448,9 +458,9 @@ endif testmain=$(BUILDDIR)/runTest.exe ifneq ($(GTESTLIBS),) -all.$(TAG): $(BUILDDIR)/.build.$(TAG) $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_main) $(cxx_main) $(fcu_main) $(fcxx_main) $(testmain) +all.$(TAG): $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_main) $(cxx_main) $(fcu_main) $(fcxx_main) $(testmain) else -all.$(TAG): $(BUILDDIR)/.build.$(TAG) $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_main) $(cxx_main) $(fcu_main) $(fcxx_main) +all.$(TAG): $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_main) $(cxx_main) $(fcu_main) $(fcxx_main) endif # Target (and build options): debug @@ -460,27 +470,20 @@ debug: CUOPTFLAGS = -G debug: MAKEDEBUG := debug debug: all.$(TAG) -# Target: tag-specific build lockfiles -override oldtagsb=`if [ -d $(BUILDDIR) ]; then find $(BUILDDIR) -maxdepth 1 -name '.build.*' ! -name '.build.$(TAG)' -exec echo $(shell pwd)/{} \; ; fi` -$(BUILDDIR)/.build.$(TAG): - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - @if [ "$(oldtagsb)" != "" ]; then echo "Cannot build for tag=$(TAG) as old builds exist for other tags:"; echo " $(oldtagsb)"; echo "Please run 'make clean' first\nIf 'make clean' is not enough: run 'make clean USEBUILDDIR=1 AVX=$(AVX) FPTYPE=$(FPTYPE)' or 'make cleanall'"; exit 1; fi - @touch $(BUILDDIR)/.build.$(TAG) - # Generic target and build rules: objects from CUDA compilation ifneq ($(NVCC),) -$(BUILDDIR)/%.o : %.cu *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) +$(BUILDDIR)/%.o : %.cu *.h ../../src/*.h @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c $< -o $@ -$(BUILDDIR)/%_cu.o : %.cc *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) +$(BUILDDIR)/%_cu.o : %.cc *.h ../../src/*.h @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c -x cu $< -o $@ endif # Generic target and build rules: objects from C++ compilation # (NB do not include CUINC here! add it only for NVTX or curand #679) -$(BUILDDIR)/%.o : %.cc *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) +$(BUILDDIR)/%.o : %.cc *.h ../../src/*.h @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi $(CXX) $(CPPFLAGS) $(CXXFLAGS) -fPIC -c $< -o $@ @@ -532,7 +535,7 @@ endif # Target (and build rules): common (src) library commonlib : $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so -$(LIBDIR)/lib$(MG5AMC_COMMONLIB).so: ../../src/*.h ../../src/*.cc $(BUILDDIR)/.build.$(TAG) +$(LIBDIR)/lib$(MG5AMC_COMMONLIB).so: ../../src/*.h ../../src/*.cc $(MAKE) -C ../../src $(MAKEDEBUG) -f $(CUDACPP_SRC_MAKEFILE) #------------------------------------------------------------------------------- @@ -711,35 +714,27 @@ endif # Target: build all targets in all AVX modes (each AVX mode in a separate build directory) # Split the avxall target into five separate targets to allow parallel 'make -j avxall' builds # (Hack: add a fbridge.inc dependency to avxall, to ensure it is only copied once for all AVX modes) -avxnone: - @echo - $(MAKE) USEBUILDDIR=1 AVX=none -f $(CUDACPP_MAKEFILE) +cppnone: $(cxx_main) -avxsse4: - @echo - $(MAKE) USEBUILDDIR=1 AVX=sse4 -f $(CUDACPP_MAKEFILE) +cppsse4: $(cxx_main) -avxavx2: - @echo - $(MAKE) USEBUILDDIR=1 AVX=avx2 -f $(CUDACPP_MAKEFILE) +cppavx2: $(cxx_main) -avx512y: - @echo - $(MAKE) USEBUILDDIR=1 AVX=512y -f $(CUDACPP_MAKEFILE) +cpp512y: $(cxx_main) -avx512z: - @echo - $(MAKE) USEBUILDDIR=1 AVX=512z -f $(CUDACPP_MAKEFILE) +cpp512z: $(cxx_main) + +cuda: $(cu_main) ifeq ($(UNAME_P),ppc64le) ###avxall: $(INCDIR)/fbridge.inc avxnone avxsse4 -avxall: avxnone avxsse4 +cppall: cppnone cppsse4 else ifeq ($(UNAME_P),arm) ###avxall: $(INCDIR)/fbridge.inc avxnone avxsse4 -avxall: avxnone avxsse4 +cppall: cppnone cppsse4 else ###avxall: $(INCDIR)/fbridge.inc avxnone avxsse4 avxavx2 avx512y avx512z -avxall: avxnone avxsse4 avxavx2 avx512y avx512z +cppall: cppnone cppsse4 cppavx2 cpp512y cpp512z endif #------------------------------------------------------------------------------- @@ -747,21 +742,31 @@ endif # Target: clean the builds .PHONY: clean +BUILD_DIRS := $(wildcard build.*) +NUM_BUILD_DIRS := $(words $(BUILD_DIRS)) + clean: ifeq ($(USEBUILDDIR),1) - rm -rf $(BUILDDIR) +ifeq ($(NUM_BUILD_DIRS),1) + $(info USEBUILDDIR=1, Only one build directory found.) + rm -rf $(BUILD_DIRS) +else ifeq ($(NUM_BUILD_DIRS),0) + $(error USEBUILDDIR=1, but no build directories are found.) else - rm -f $(BUILDDIR)/.build.* $(BUILDDIR)/*.o $(BUILDDIR)/*.exe + $(error Multiple BUILDDIR's found! Use 'cleannone', 'cleansse4', 'cleanavx2', 'clean512y','clean512z', 'cleancuda' or 'cleanall'.) +endif +else + rm -f $(BUILDDIR)/*.o $(BUILDDIR)/*.exe rm -f $(LIBDIR)/lib$(MG5AMC_CXXLIB).so $(LIBDIR)/lib$(MG5AMC_CULIB).so endif $(MAKE) -C ../../src clean -f $(CUDACPP_SRC_MAKEFILE) -### rm -rf $(INCDIR) cleanall: @echo - $(MAKE) USEBUILDDIR=0 clean -f $(CUDACPP_MAKEFILE) + rm -f $(BUILDDIR)/*.o $(BUILDDIR)/*.exe + rm -f $(LIBDIR)/lib$(MG5AMC_CXXLIB).so $(LIBDIR)/lib$(MG5AMC_CULIB).so @echo - $(MAKE) USEBUILDDIR=0 -C ../../src cleanall -f $(CUDACPP_SRC_MAKEFILE) + $(MAKE) -C ../../src cleanall -f $(CUDACPP_SRC_MAKEFILE) rm -rf build.* # Target: clean the builds as well as the gtest installation(s) @@ -771,6 +776,42 @@ ifneq ($(wildcard $(TESTDIRCOMMON)),) endif $(MAKE) -C $(TESTDIRLOCAL) clean +# Target: clean different builds +cleannone: + rm -rf build.none_* + rm -f ../../lib/build.none_*/lib$(MG5AMC_CXXLIB).so + $(MAKE) -C ../../src cleannone -f $(CUDACPP_SRC_MAKEFILE) + +cleansse4: + rm -rf build.sse4_* + rm -f ../../lib/build.sse4_*/lib$(MG5AMC_CXXLIB).so + $(MAKE) -C ../../src cleansse4 -f $(CUDACPP_SRC_MAKEFILE) + +cleanavx2: + rm -rf build.avx2_* + rm -f ../../lib/build.avx2_*/lib$(MG5AMC_CXXLIB).so + $(MAKE) -C ../../src cleanavx2 -f $(CUDACPP_SRC_MAKEFILE) + +clean512y: + rm -rf build.512y_* + rm -f ../../lib/build.512y_*/lib$(MG5AMC_CXXLIB).so + $(MAKE) -C ../../src clean512y -f $(CUDACPP_SRC_MAKEFILE) + +clean512z: + rm -rf build.512z_* + rm -f ../../lib/build.512z_*/lib$(MG5AMC_CXXLIB).so + $(MAKE) -C ../../src clean512z -f $(CUDACPP_SRC_MAKEFILE) + +cleancuda: + rm -rf build.cuda_* + rm -f ../../lib/build.cuda_*/lib$(MG5AMC_CULIB).so + $(MAKE) -C ../../src cleancuda -f $(CUDACPP_SRC_MAKEFILE) + +cleandir: + rm -f ./*.o ./*.exe + rm -f ../../lib/lib$(MG5AMC_CXXLIB).so ../../lib/lib$(MG5AMC_CULIB).so + $(MAKE) -C ../../src cleandir -f $(CUDACPP_SRC_MAKEFILE) + #------------------------------------------------------------------------------- # Target: show system and compiler information @@ -817,13 +858,10 @@ endif #------------------------------------------------------------------------------- -# Target: check (run the C++ test executable) +# Target: check/gcheck (run the C++ test executable) # [NB THIS IS WHAT IS USED IN THE GITHUB CI!] -ifneq ($(NVCC),) -check: runTest cmpFcheck cmpFGcheck -else check: runTest cmpFcheck -endif +gcheck: runTest cmpFGcheck # Target: runTest (run the C++ test executable runTest.exe) runTest: all.$(TAG) @@ -863,4 +901,4 @@ cmpFGcheck: all.$(TAG) memcheck: all.$(TAG) $(RUNTIME) $(CUDA_HOME)/bin/cuda-memcheck --check-api-memory-access yes --check-deprecated-instr yes --check-device-heap yes --demangle full --language c --leak-check full --racecheck-report all --report-api-errors all --show-backtrace yes --tool memcheck --track-unused-memory yes $(BUILDDIR)/gcheck.exe -p 2 32 2 -#------------------------------------------------------------------------------- +#------------------------------------------------------------------------------- \ No newline at end of file diff --git a/epochX/cudacpp/gg_ttg.sa/src/HelAmps_sm.h b/epochX/cudacpp/gg_ttg.sa/src/HelAmps_sm.h index 4a326fae62..8995b15c82 100644 --- a/epochX/cudacpp/gg_ttg.sa/src/HelAmps_sm.h +++ b/epochX/cudacpp/gg_ttg.sa/src/HelAmps_sm.h @@ -863,6 +863,7 @@ namespace mg5amcCpu const fptype allV2[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, fptype allvertexes[] ) ALWAYS_INLINE; //-------------------------------------------------------------------------- @@ -873,6 +874,7 @@ namespace mg5amcCpu VVV1P0_1( const fptype allV2[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, const fptype M1, const fptype W1, fptype allV1[] ) ALWAYS_INLINE; @@ -886,6 +888,7 @@ namespace mg5amcCpu const fptype allF2[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, fptype allvertexes[] ) ALWAYS_INLINE; //-------------------------------------------------------------------------- @@ -896,6 +899,7 @@ namespace mg5amcCpu FFV1_1( const fptype allF2[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, const fptype M1, const fptype W1, fptype allF1[] ) ALWAYS_INLINE; @@ -908,6 +912,7 @@ namespace mg5amcCpu FFV1_2( const fptype allF1[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, const fptype M2, const fptype W2, fptype allF2[] ) ALWAYS_INLINE; @@ -920,6 +925,7 @@ namespace mg5amcCpu FFV1P0_3( const fptype allF1[], const fptype allF2[], const fptype allCOUP[], + const double Ccoeff, const fptype M3, const fptype W3, fptype allV3[] ) ALWAYS_INLINE; @@ -933,6 +939,7 @@ namespace mg5amcCpu const fptype allV3[], const fptype allV4[], const fptype allCOUP[], + const double Ccoeff, const fptype M1, const fptype W1, fptype allV1[] ) ALWAYS_INLINE; @@ -946,6 +953,7 @@ namespace mg5amcCpu const fptype allV3[], const fptype allV4[], const fptype allCOUP[], + const double Ccoeff, const fptype M1, const fptype W1, fptype allV1[] ) ALWAYS_INLINE; @@ -959,6 +967,7 @@ namespace mg5amcCpu const fptype allV3[], const fptype allV4[], const fptype allCOUP[], + const double Ccoeff, const fptype M1, const fptype W1, fptype allV1[] ) ALWAYS_INLINE; @@ -972,6 +981,7 @@ namespace mg5amcCpu const fptype allV2[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, fptype allvertexes[] ) { mgDebug( 0, __FUNCTION__ ); @@ -1006,6 +1016,7 @@ namespace mg5amcCpu VVV1P0_1( const fptype allV2[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, const fptype M1, const fptype W1, fptype allV1[] ) @@ -1044,6 +1055,7 @@ namespace mg5amcCpu const fptype allF2[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, fptype allvertexes[] ) { mgDebug( 0, __FUNCTION__ ); @@ -1067,6 +1079,7 @@ namespace mg5amcCpu FFV1_1( const fptype allF2[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, const fptype M1, const fptype W1, fptype allF1[] ) @@ -1098,6 +1111,7 @@ namespace mg5amcCpu FFV1_2( const fptype allF1[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, const fptype M2, const fptype W2, fptype allF2[] ) @@ -1129,6 +1143,7 @@ namespace mg5amcCpu FFV1P0_3( const fptype allF1[], const fptype allF2[], const fptype allCOUP[], + const double Ccoeff, const fptype M3, const fptype W3, fptype allV3[] ) @@ -1160,6 +1175,7 @@ namespace mg5amcCpu const fptype allV3[], const fptype allV4[], const fptype allCOUP[], + const double Ccoeff, const fptype M1, const fptype W1, fptype allV1[] ) @@ -1194,6 +1210,7 @@ namespace mg5amcCpu const fptype allV3[], const fptype allV4[], const fptype allCOUP[], + const double Ccoeff, const fptype M1, const fptype W1, fptype allV1[] ) @@ -1228,6 +1245,7 @@ namespace mg5amcCpu const fptype allV3[], const fptype allV4[], const fptype allCOUP[], + const double Ccoeff, const fptype M1, const fptype W1, fptype allV1[] ) diff --git a/epochX/cudacpp/gg_ttg.sa/src/cudacpp_src.mk b/epochX/cudacpp/gg_ttg.sa/src/cudacpp_src.mk index 554d7a704c..750986464e 100644 --- a/epochX/cudacpp/gg_ttg.sa/src/cudacpp_src.mk +++ b/epochX/cudacpp/gg_ttg.sa/src/cudacpp_src.mk @@ -1,7 +1,7 @@ # Copyright (C) 2020-2023 CERN and UCLouvain. # Licensed under the GNU Lesser General Public License (version 3 or later). # Created by: S. Roiser (Feb 2020) for the MG5aMC CUDACPP plugin. -# Further modified by: O. Mattelaer, S. Roiser, A. Valassi (2020-2023) for the MG5aMC CUDACPP plugin. +# Further modified by: J. Teig, O. Mattelaer, S. Roiser, A. Valassi (2020-2023) for the MG5aMC CUDACPP plugin. #=== Determine the name of this makefile (https://ftp.gnu.org/old-gnu/Manuals/make-3.80/html_node/make_17.html) #=== NB: assume that the same name (e.g. cudacpp.mk, Makefile...) is used in the Subprocess and src directories @@ -88,50 +88,52 @@ CXXFLAGS += $(OMPFLAGS) # Set the build flags appropriate to each AVX choice (example: "make AVX=none") # [NB MGONGPU_PVW512 is needed because "-mprefer-vector-width=256" is not exposed in a macro] # [See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96476] -$(info AVX=$(AVX)) -ifeq ($(UNAME_P),ppc64le) - ifeq ($(AVX),sse4) - override AVXFLAGS = -D__SSE4_2__ # Power9 VSX with 128 width (VSR registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on PowerPC for the moment) - endif -else ifeq ($(UNAME_P),arm) - ifeq ($(AVX),sse4) - override AVXFLAGS = -D__SSE4_2__ # ARM NEON with 128 width (Q/quadword registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on ARM for the moment) - endif -else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 - ifeq ($(AVX),none) - override AVXFLAGS = -mno-sse3 # no SIMD - else ifeq ($(AVX),sse4) - override AVXFLAGS = -mno-avx # SSE4.2 with 128 width (xmm registers) - else ifeq ($(AVX),avx2) - override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(AVX),512y) - override AVXFLAGS = -march=skylake -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(AVX),512z) - override AVXFLAGS = -march=skylake -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) +ifeq ($(NVCC),) + $(info AVX=$(AVX)) + ifeq ($(UNAME_P),ppc64le) + ifeq ($(AVX),sse4) + override AVXFLAGS = -D__SSE4_2__ # Power9 VSX with 128 width (VSR registers) + else ifneq ($(AVX),none) + $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on PowerPC for the moment) + endif + else ifeq ($(UNAME_P),arm) + ifeq ($(AVX),sse4) + override AVXFLAGS = -D__SSE4_2__ # ARM NEON with 128 width (Q/quadword registers) + else ifneq ($(AVX),none) + $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on ARM for the moment) + endif + else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 + ifeq ($(AVX),none) + override AVXFLAGS = -mno-sse3 # no SIMD + else ifeq ($(AVX),sse4) + override AVXFLAGS = -mno-avx # SSE4.2 with 128 width (xmm registers) + else ifeq ($(AVX),avx2) + override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] + else ifeq ($(AVX),512y) + override AVXFLAGS = -march=skylake -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] + else ifeq ($(AVX),512z) + override AVXFLAGS = -march=skylake -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) + else + $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) + endif else - $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) - endif -else - ifeq ($(AVX),none) - override AVXFLAGS = -march=x86-64 # no SIMD (see #588) - else ifeq ($(AVX),sse4) - override AVXFLAGS = -march=nehalem # SSE4.2 with 128 width (xmm registers) - else ifeq ($(AVX),avx2) - override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(AVX),512y) - override AVXFLAGS = -march=skylake-avx512 -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(AVX),512z) - override AVXFLAGS = -march=skylake-avx512 -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) + ifeq ($(AVX),none) + override AVXFLAGS = -march=x86-64 # no SIMD (see #588) + else ifeq ($(AVX),sse4) + override AVXFLAGS = -march=nehalem # SSE4.2 with 128 width (xmm registers) + else ifeq ($(AVX),avx2) + override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] + else ifeq ($(AVX),512y) + override AVXFLAGS = -march=skylake-avx512 -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] + else ifeq ($(AVX),512z) + override AVXFLAGS = -march=skylake-avx512 -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) + else ifneq ($(AVX),none) + $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) + endif endif + # For the moment, use AVXFLAGS everywhere: eventually, use them only in encapsulated implementations? + CXXFLAGS+= $(AVXFLAGS) endif -# For the moment, use AVXFLAGS everywhere: eventually, use them only in encapsulated implementations? -CXXFLAGS+= $(AVXFLAGS) # Set the build flags appropriate to each FPTYPE choice (example: "make FPTYPE=f") ###$(info FPTYPE=$(FPTYPE)) @@ -175,11 +177,19 @@ endif # Build directory "short" tag (defines target and path to the optional build directory) # (Rationale: keep directory names shorter, e.g. do not include random number generator choice) -override DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) +ifneq ($(NVCC),) + override DIRTAG = cuda_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) +else + override DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) +endif # Build lockfile "full" tag (defines full specification of build options that cannot be intermixed) # (Rationale: avoid mixing of CUDA and no-CUDA environment builds with different random number generators) -override TAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) +ifneq ($(NVCC),) + override TAG = cuda_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) +else + override TAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) +endif # Build directory: current directory by default, or build.$(DIRTAG) if USEBUILDDIR==1 ###$(info Current directory is $(shell pwd)) @@ -216,35 +226,21 @@ endif MG5AMC_COMMONLIB = mg5amc_common # First target (default goal) -all.$(TAG): $(BUILDDIR)/.build.$(TAG) $(LIBDIR)/.build.$(TAG) $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so +all.$(TAG): $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so # Target (and build options): debug debug: OPTFLAGS = -g -O0 debug: all.$(TAG) -# Target: tag-specific build lockfiles -override oldtagsb=`if [ -d $(BUILDDIR) ]; then find $(BUILDDIR) -maxdepth 1 -name '.build.*' ! -name '.build.$(TAG)' -exec echo $(shell pwd)/{} \; ; fi` -override oldtagsl=`if [ -d $(LIBDIR) ]; then find $(LIBDIR) -maxdepth 1 -name '.build.*' ! -name '.build.$(TAG)' -exec echo $(shell pwd)/{} \; ; fi` - -$(BUILDDIR)/.build.$(TAG): $(LIBDIR)/.build.$(TAG) - -$(LIBDIR)/.build.$(TAG): - @if [ "$(oldtagsl)" != "" ]; then echo -e "Cannot build for tag=$(TAG) as old builds exist in $(LIBDIR) for other tags:\n$(oldtagsl)\nPlease run 'make clean' first\nIf 'make clean' is not enough: run 'make clean USEBUILDDIR=1 AVX=$(AVX) FPTYPE=$(FPTYPE)' or 'make cleanall'"; exit 1; fi - @if [ "$(oldtagsb)" != "" ]; then echo -e "Cannot build for tag=$(TAG) as old builds exist in $(BUILDDIR) for other tags:\n$(oldtagsb)\nPlease run 'make clean' first\nIf 'make clean' is not enough: run 'make clean USEBUILDDIR=1 AVX=$(AVX) FPTYPE=$(FPTYPE)' or 'make cleanall'"; exit 1; fi - @if [ ! -d $(LIBDIR) ]; then echo "mkdir -p $(LIBDIR)"; mkdir -p $(LIBDIR); fi - @touch $(LIBDIR)/.build.$(TAG) - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - @touch $(BUILDDIR)/.build.$(TAG) - #------------------------------------------------------------------------------- # Generic target and build rules: objects from C++ compilation -$(BUILDDIR)/%.o : %.cc *.h $(BUILDDIR)/.build.$(TAG) +$(BUILDDIR)/%.o : %.cc *.h @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi $(CXX) $(CPPFLAGS) $(CXXFLAGS) -fPIC -c $< -o $@ # Generic target and build rules: objects from CUDA compilation -$(BUILDDIR)/%_cu.o : %.cc *.h $(BUILDDIR)/.build.$(TAG) +$(BUILDDIR)/%_cu.o : %.cc *.h @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c -x cu $< -o $@ @@ -271,20 +267,61 @@ endif # Target: clean the builds .PHONY: clean +BUILD_DIRS := $(wildcard build.*) +NUM_BUILD_DIRS := $(words $(BUILD_DIRS)) + clean: ifeq ($(USEBUILDDIR),1) - rm -rf $(LIBDIR) - rm -rf $(BUILDDIR) +ifeq ($(NUM_BUILD_DIRS),1) + $(info USEBUILDDIR=1, only one src build directory found.) + rm -rf ../lib/$(BUILD_DIRS) + rm -rf $(BUILD_DIRS) +else ifeq ($(NUM_BUILD_DIRS),0) + $(error USEBUILDDIR=1, but no src build directories are found.) else - rm -f $(LIBDIR)/.build.* $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so - rm -f $(BUILDDIR)/.build.* $(BUILDDIR)/*.o $(BUILDDIR)/*.exe + $(error Multiple src BUILDDIR's found! Use 'cleannone', 'cleansse4', 'cleanavx2', 'clean512y','clean512z', 'cleancuda' or 'cleanall'.) +endif +else + rm -f ../lib/lib$(MG5AMC_COMMONLIB).so + rm -f $(BUILDDIR)/*.o $(BUILDDIR)/*.exe endif cleanall: @echo - $(MAKE) clean -f $(THISMK) + rm -f ../lib/lib$(MG5AMC_COMMONLIB).so + rm -f $(BUILDDIR)/*.o $(BUILDDIR)/*.exe @echo - rm -rf $(LIBDIR)/build.* + rm -rf ../lib/build.* rm -rf build.* +# Target: clean different builds + +cleannone: + rm -rf ../lib/build.none_* + rm -rf build.none_* + +cleansse4: + rm -rf ../lib/build.sse4_* + rm -rf build.sse4_* + +cleanavx2: + rm -rf ../lib/build.avx2_* + rm -rf build.avx2_* + +clean512y: + rm -rf ../lib/build.512y_* + rm -rf build.512y_* + +clean512z: + rm -rf ../lib/build.512z_* + rm -rf build.512z_* + +cleancuda: + rm -rf ../lib/build.cuda_* + rm -rf build.cuda_* + +cleandir: + rm -f ./*.o ./*.exe + rm -f ../lib/lib$(MG5AMC_COMMONLIB).so + #------------------------------------------------------------------------------- diff --git a/epochX/cudacpp/gg_ttgg.mad/Cards/delphes_trigger.dat b/epochX/cudacpp/gg_ttgg.mad/Cards/delphes_trigger.dat new file mode 100644 index 0000000000..0aab0677aa --- /dev/null +++ b/epochX/cudacpp/gg_ttgg.mad/Cards/delphes_trigger.dat @@ -0,0 +1,20 @@ +#TRIGGER CARD # DO NOT REMOVE THIS IS A TAG! + +# list of trigger algorithms +# trigger_name >> algorithm #comments +Inclusive electron >> ELEC1_PT: '29' +di-electron >> ELEC1_PT: '17' && ELEC2_PT: '17' +Inclusive Photon >> GAMMA1_PT: '80' +di-Photon >> GAMMA1_PT: '40' && GAMMA2_PT: '25' +Inclusive muon >> MUON1_PT: '19' +di-muon >> MUON1_PT: '7' && MUON2_PT: '7' +Taujet and ETmis >> TAU1_PT: '86' && ETMIS_PT: '65' +di-Taujets >> TAU1_PT: '59' && TAU2_PT: '59' +Jet and ETmis >> JET1_PT: '180' && ETMIS_PT: '123' +Taujet and electron >> TAU1_PT: '45' && ELEC1_PT: '19' +Taujet and muon >> TAU1_PT: '40' && ELEC1_PT: '15' +Inclusive b-jet >> Bjet1_PT: '237' +Inclusive 1 jet >> JET1_PT: '657' +Inclusive 3 jets >> JET1_PT: '247' && JET2_PT: '247' && JET3_PT: '247' +Inclusive 4 jets >> JET1_PT: '113' && JET2_PT: '113' && JET3_PT: '113' && JET4_PT: '113' + diff --git a/epochX/cudacpp/gg_ttgg.mad/Cards/me5_configuration.txt b/epochX/cudacpp/gg_ttgg.mad/Cards/me5_configuration.txt index 27acb12a1e..8a0c1e6345 100644 --- a/epochX/cudacpp/gg_ttgg.mad/Cards/me5_configuration.txt +++ b/epochX/cudacpp/gg_ttgg.mad/Cards/me5_configuration.txt @@ -234,7 +234,7 @@ # pineappl = pineappl -mg5_path = /data/stephan/madgraph4gpu/MG5aMC/mg5amcnlo +mg5_path = /afs/cern.ch/work/j/jteig/madgraph4gpu/MG5aMC/mg5amcnlo # MG5 MAIN DIRECTORY -mg5_path = /data/stephan/madgraph4gpu/MG5aMC/mg5amcnlo +mg5_path = /afs/cern.ch/work/j/jteig/madgraph4gpu/MG5aMC/mg5amcnlo diff --git a/epochX/cudacpp/gg_ttgg.mad/Cards/plot_card.dat b/epochX/cudacpp/gg_ttgg.mad/Cards/plot_card.dat new file mode 100644 index 0000000000..9abe1cc05e --- /dev/null +++ b/epochX/cudacpp/gg_ttgg.mad/Cards/plot_card.dat @@ -0,0 +1,203 @@ +#************************************************************************** +# Card for MadAnalysis * +# * +# This file is used to set the classes and options for * +# the MadAnalysis program. * +# * +# * +# Some comments about the classes * +# 1. Plots are for classes of particles. * +# 2. Each particle is identified by its PDG code. * +# 3. Classes names are arbitrary (4 symbols max, no spaces allowed). * +# 4. Particles in the same class will be ordered with the 'ordering * +# function' in the file in_func.f. * +# 5. Classes can be added/edited/removed at will, and given a name * +# that will then appear in the plots. * +# 6. A particle can be put in one class only. Putting a particle in * +# two or more classes can lead to double counting of events. * +# 7. The class name mET is missing Energy and its name is reserved. * +# If used, it must be put last in the classes list below. * +# 8. If events contain particles not belonging to an existing class, * +# a new class will automatically be generated. * +# 9. For LHCO events the PDG code 21 is assigned to a jet (not * +# b-tagged), 5 to a b-tagged jet and 12 to missing ET. * +# * +# * +# Some comments about the cuts * +# 1. In the file kin_func.f the functions on which cuts can be applied * +# are given. * +# 2. The syntax is as follows. * +# etmin 1 3 30d0 * +# means that from the first class the Et of the first three particles * +# has to be greater than 30 GeV. * +# * +# etmissmin 20d0 * +# means that there must be at least 20 GeV of missing Et * +# * +# dRmin 2 1 4 3 3d0 * +# means that the distance between the first particle in the second * +# class and the first three particles in the fourth class has to be * +# greater than 3. * +# * +# ptmax 1 3 10d0 * +# ptmax 1 2 15d0 * +# means that the maximum pt of the third particle in the first class * +# has to smaller than 10 GeV, and the first two particles of this * +# class has to be smaller than 15 GeV * +# 3. The ordering of the particles within a class can be set with the * +# 'ordering function' in the file kin_func.f. * +# 4. For all the 'min' cuts, an event will be thrown away if the particle * +# does not exist. On the other hand, for all the 'max' cuts the cut * +# will be ignored if the particle does not exist * +# (Only dRij is an exception, for which it is the other way around) * +# * +# * +# * +# Some comments about the plotting options * +# 1. In the file kin_func.f the functions can be found that can be * +# plotted. (only for off-line usage) * +# 2. With the plotting options one can set the number of plots for each * +# of these functions. * +# 3. One has to specify for each variable which particles from which * +# class are used to set the plots. Syntax: * +# et 2 4 * +# means that the transverse energy of the first four particles in the * +# second class will be plotted. * +# mij 1 3 * +# mij 2 2 * +# means that for the invariant mass plots the first three particles * +# from the first class and the first two from the second class will be * +# used to plot the invariant mass of two particles. (10 plots) * +# 4. The ordering of the particles in a class can be set with the * +# 'ordering_function'. pt, e and et are valid functions. (For off-line * +# users X1, X2 and X3 can also be used, if defined in kin_func.f.) * +# 5. Max number of plots is 200. * +# * +# * +#************************************************************************** +# Put here your list of classes +#************************************************************************** +# Do NOT put spaces before class names! +# Begin Classes # This is TAG. Do not modify this line +jet 1 -1 2 -2 3 -3 4 -4 21 # Class number 1 +b 5 -5 # Class number 2 +mET 12 -12 14 -14 16 -16 1000022 # Missing ET class, name is reserved +# End Classes # This is TAG. Do not modify this line +#************************************************************************** +ordering_function pt # orders particles in classes according to their pt +normalization xsec # histogram normalization, xsec or number (e.g. 1) +#************************************************************************** +# Put here list of minimum pt for the classes +#************************************************************************** +# Begin Minpts # This is TAG. Do not modify this line +#1 30 +#2 40 +#3 10 +# End Minpts # This is TAG. Do not modify this line +#************************************************************************** +# Cuts on plotted events +#************************************************************************** +# Modify the cuts and remove the pounds/hashes to apply those cuts +# Do NOT put spaces at the beginning of the following lines! +# Begin Cuts # This is TAG. Do not modify this line +#etmin 2 2 40d0 +#etmin 2 1 80d0 +#etmin 1 3 20d0 +#etmax 2 1 200d0 +#ptmin 3 1 0d0 +#etmissmin 20d0 +#etmissmax 80d0 +#etamax 1 1 1d0 +#etamax 2 1 2d0 +#etamin 2 2 1.5d0 +#etamin 2 1 2d0 +#mijmax 2 1 2 2 200d0 +#mijmin 2 1 2 2 100d0 +#X1min 2 1 40d0 +#X1max 2 2 50d0 +#dRijmin 2 1 2 2 0.7d0 +#dRijmax 1 3 2 2 0.7d0 +#XY1min 2 2 2 2 20d0 +#XYZA2max 2 2 2 2 4 1 5 1 40d0 +# End Cuts # This is TAG. Do not modify this line +#************************************************************************** +# Put here the required plots +#************************************************************************** +# Do NOT put spaces at the beginning of the following lines! +# Begin PlotDefs # This is TAG. Do not modify this line +pt 1 4 # plot pt for the first four particles in class 1 +pt 2 4 # plot pt for the first four particles in class 2 +pt 3 4 # plot pt for the first four particles in class 3 +pt 4 4 # plot pt for the first four particles in class 4 +pt 5 4 # etc. +pt 6 4 +pt 7 4 +#e 2 2 +y 1 4 # plot rapidity for the first four particles in class 1 +y 2 4 +y 3 4 +y 4 4 +y 5 4 +y 6 4 +y 7 4 +#eta 2 2 # plot pseudo-rapidity for the first two part in the 2nd class +#mom 4 1 +#costh 5 1 +#phi 2 2 +#delta_eta 2 2 +#delta_eta 4 1 +mij 1 4 # use the first four particles in the 1st class to plot inv. mass +mij 2 2 # use the first two particles from the second class as well +mij 3 1 # etc. +mij 4 1 +mij 5 1 +mij 6 1 +mij 7 1 +#cosij 1 2 +#cosij 2 2 +#cosij 3 1 +#cosij 4 1 +dRij 1 4 +dRij 2 2 +dRij 3 1 +dRij 4 1 +dRij 5 1 +dRij 6 1 +dRij 7 1 +#delta_phi 2 2 +#delta_phi 4 1 +#delta_phi 5 1 +#X1 2 2 # plot X1 (defined in kin_func.f) +#XYZA1 2 2 +#XYZA1 4 1 +#XYZA1 5 1 +# End PlotDefs # This is TAG. Do not modify this line +#************************************************************************** +#************************************************************************** +# Put here the plot ranges +#************************************************************************** +# Do NOT put spaces at the beginning of the following lines! +# Begin PlotRange # This is TAG. Do not modify this line +pt 10 0 500 # bin size, min value, max value +et 10 0 500 # bin size, min value, max value +etmiss 10 0 500 # bin size, min value, max value +ht 20 0 1500 +y 0.2 -5 5 # etc. +mij 20 0 1500 +dRij 0.1 0 5 +#delta_phi 0.1 0 3.1 +#X1 1 0 100 +#XYZA1 1 0 100 +# End PlotRange # This is TAG. Do not modify this line +#************************************************************************** +#************************************************************************** +# Output for plots +#************************************************************************** +# Do NOT put spaces at the beginning of the following lines! +# Begin PlotOutput # This is TAG. Do not modify this line +output topdrawer # set to topdrawer or gnuplot +plot_decayed no # plot (and cut) dec. res.? (Only for LHE events) +# End PlotOutput # This is TAG. Do not modify this line +#************************************************************************** +# +# diff --git a/epochX/cudacpp/gg_ttgg.mad/Cards/run_card.dat b/epochX/cudacpp/gg_ttgg.mad/Cards/run_card.dat index 88d4377d71..26fa7f39dd 100644 --- a/epochX/cudacpp/gg_ttgg.mad/Cards/run_card.dat +++ b/epochX/cudacpp/gg_ttgg.mad/Cards/run_card.dat @@ -77,7 +77,7 @@ #********************************************************************* 0 = nhel ! using helicities importance sampling or not. ! 0: sum over helicity, 1: importance sampling - 1 = sde_strategy ! default integration strategy (hep-ph/2021.00773) + 2 = sde_strategy ! default integration strategy (hep-ph/2021.00773) ! 1 is old strategy (using amp square) ! 2 is new strategy (using only the denominator) # To see advanced option for Phase-Space optimization: type "update psoptim" @@ -167,13 +167,3 @@ # systematics = systematics_program ! none, systematics [python], SysCalc [depreceted, C++] ['--mur=0.5,1,2', '--muf=0.5,1,2', '--pdf=errorset'] = systematics_arguments ! see: https://cp3.irmp.ucl.ac.be/projects/madgraph/wiki/Systematics#Systematicspythonmodule - -#********************************************************************* -# Options for the cudacpp plugin -#********************************************************************* - -# Set cudacpp-specific values of non-cudacpp-specific options --O3 -ffast-math -fbounds-check = global_flag ! build flags for Fortran code (for a fair comparison to cudacpp) - -# New cudacpp-specific options (default values are defined in banner.py) -CPP = cudacpp_backend ! valid backends are FORTRAN, CPP, CUDA diff --git a/epochX/cudacpp/gg_ttgg.mad/Source/DHELAS/aloha_file.inc b/epochX/cudacpp/gg_ttgg.mad/Source/DHELAS/aloha_file.inc index fa0f3d86f5..1b5bf6ec54 100644 --- a/epochX/cudacpp/gg_ttgg.mad/Source/DHELAS/aloha_file.inc +++ b/epochX/cudacpp/gg_ttgg.mad/Source/DHELAS/aloha_file.inc @@ -1 +1 @@ -ALOHARoutine = FFV1P0_3.o FFV1_0.o FFV1_1.o FFV1_2.o VVV1P0_1.o VVV1_0.o VVVV1P0_1.o VVVV1_0.o VVVV3P0_1.o VVVV3_0.o VVVV4P0_1.o VVVV4_0.o +ALOHARoutine = VVV1_0.o VVV1P0_1.o FFV1_0.o FFV1_1.o FFV1_2.o FFV1P0_3.o VVVV1_0.o VVVV1P0_1.o VVVV3_0.o VVVV3P0_1.o VVVV4_0.o VVVV4P0_1.o diff --git a/epochX/cudacpp/gg_ttgg.mad/Source/PDF/pdfwrap_lhapdf.f b/epochX/cudacpp/gg_ttgg.mad/Source/PDF/pdfwrap_lhapdf.f index 0be926e6cd..3f36905346 100644 --- a/epochX/cudacpp/gg_ttgg.mad/Source/PDF/pdfwrap_lhapdf.f +++ b/epochX/cudacpp/gg_ttgg.mad/Source/PDF/pdfwrap_lhapdf.f @@ -5,6 +5,7 @@ SUBROUTINE PDFWRAP C INCLUDE 'pdf.inc' INCLUDE '../alfas.inc' + INCLUDE '../vector.inc' INCLUDE '../coupl.inc' REAL*8 ZMASS DATA ZMASS/91.188D0/ diff --git a/epochX/cudacpp/gg_ttgg.mad/Source/make_opts b/epochX/cudacpp/gg_ttgg.mad/Source/make_opts index bd3c24228d..2607530b78 100644 --- a/epochX/cudacpp/gg_ttgg.mad/Source/make_opts +++ b/epochX/cudacpp/gg_ttgg.mad/Source/make_opts @@ -1,17 +1,11 @@ -pdlabel1= -pdlabel2= -lhapdf= -PYTHIA8_PATH=NotInstalled -MG5AMC_VERSION=3.5.0_lo_vect -GLOBAL_FLAG=-O3 -ffast-math -fbounds-check -ALOHA_FLAG= -MATRIX_FLAG= DEFAULT_CPP_COMPILER=g++ MACFLAG= STDLIB=-lstdc++ STDLIB_FLAG= DEFAULT_F_COMPILER=gfortran -DEFAULT_F2PY_COMPILER=f2py3 +DEFAULT_F2PY_COMPILER=f2py3.9 +MG5AMC_VERSION=SpecifiedByMG5aMCAtRunTime +PYTHIA8_PATH=NotInstalled #end_of_make_opts_variables BIASLIBDIR=../../../lib/ diff --git a/epochX/cudacpp/gg_ttgg.mad/Source/makefile b/epochX/cudacpp/gg_ttgg.mad/Source/makefile index dbe08b846e..00c73099a0 100644 --- a/epochX/cudacpp/gg_ttgg.mad/Source/makefile +++ b/epochX/cudacpp/gg_ttgg.mad/Source/makefile @@ -136,5 +136,7 @@ cleanSource: clean: cleanSource for i in `ls -d ../SubProcesses/P*`; do cd $$i; make clean; cd -; done; -cleanall: cleanSource +cleanavx: + for i in `ls -d ../SubProcesses/P*`; do cd $$i; make cleanavxs; cd -; done; +cleanall: cleanSource # THIS IS THE ONE for i in `ls -d ../SubProcesses/P*`; do cd $$i; make cleanavxs; cd -; done; diff --git a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/MatrixElementKernels.cc b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/MatrixElementKernels.cc index 30257195b6..cfed7d2af5 100644 --- a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/MatrixElementKernels.cc +++ b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/MatrixElementKernels.cc @@ -112,10 +112,17 @@ namespace mg5amcCpu // See https://community.arm.com/arm-community-blogs/b/operating-systems-blog/posts/runtime-detection-of-cpu-features-on-an-armv8-a-cpu bool ok = true; // this is just an assumption! const std::string tag = "arm neon (128bit as in SSE4.2)"; -#else +#elif defined(__x86_64__) || defined(__i386__) bool known = true; bool ok = __builtin_cpu_supports( "sse4.2" ); const std::string tag = "nehalem (SSE4.2)"; +#else + bool known = false; // __builtin_cpu_supports is not supported + // See https://gcc.gnu.org/onlinedocs/gcc/Basic-PowerPC-Built-in-Functions-Available-on-all-Configurations.html + // See https://stackoverflow.com/q/62783908 + // See https://community.arm.com/arm-community-blogs/b/operating-systems-blog/posts/runtime-detection-of-cpu-features-on-an-armv8-a-cpu + bool ok = true; // this is just an assumption! + const std::string tag = "arm neon (128bit as in SSE4.2)"; #endif #else bool known = true; diff --git a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/P1_gg_ttxgg/CPPProcess.cc b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/P1_gg_ttxgg/CPPProcess.cc index 442d769ae3..f4be685ba8 100644 --- a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/P1_gg_ttxgg/CPPProcess.cc +++ b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/P1_gg_ttxgg/CPPProcess.cc @@ -250,11 +250,11 @@ namespace mg5amcCpu vxxxxx( momenta, 0., cHel[ihel][5], +1, w_fp[5], 5 ); - VVV1P0_1( w_fp[0], w_fp[1], COUPs[0], 0., 0., w_fp[6] ); - FFV1P0_3( w_fp[3], w_fp[2], COUPs[1], 0., 0., w_fp[7] ); + VVV1P0_1( w_fp[0], w_fp[1], COUPs[0], 1.0, 0., 0., w_fp[6] ); + FFV1P0_3( w_fp[3], w_fp[2], COUPs[1], 1.0, 0., 0., w_fp[7] ); // Amplitude(s) for diagram number 1 - VVVV1_0( w_fp[6], w_fp[7], w_fp[4], w_fp[5], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[6], w_fp[7], w_fp[4], w_fp[5], COUPs[2], 1.0, &_fp[0] ); jamp_sv[0] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[1] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[6] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -263,7 +263,7 @@ namespace mg5amcCpu jamp_sv[17] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[22] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[23] -= cxtype( 0, 1 ) * amp_sv[0]; - VVVV3_0( w_fp[6], w_fp[7], w_fp[4], w_fp[5], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[6], w_fp[7], w_fp[4], w_fp[5], COUPs[2], 1.0, &_fp[0] ); jamp_sv[0] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[6] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[12] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -272,7 +272,7 @@ namespace mg5amcCpu jamp_sv[20] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[22] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[23] -= cxtype( 0, 1 ) * amp_sv[0]; - VVVV4_0( w_fp[6], w_fp[7], w_fp[4], w_fp[5], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[6], w_fp[7], w_fp[4], w_fp[5], COUPs[2], 1.0, &_fp[0] ); jamp_sv[1] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[7] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[12] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -285,10 +285,10 @@ namespace mg5amcCpu // *** DIAGRAM 2 OF 123 *** // Wavefunction(s) for diagram number 2 - VVV1P0_1( w_fp[6], w_fp[4], COUPs[0], 0., 0., w_fp[8] ); + VVV1P0_1( w_fp[6], w_fp[4], COUPs[0], 1.0, 0., 0., w_fp[8] ); // Amplitude(s) for diagram number 2 - VVV1_0( w_fp[7], w_fp[5], w_fp[8], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[7], w_fp[5], w_fp[8], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 2 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -305,10 +305,10 @@ namespace mg5amcCpu // *** DIAGRAM 3 OF 123 *** // Wavefunction(s) for diagram number 3 - VVV1P0_1( w_fp[6], w_fp[5], COUPs[0], 0., 0., w_fp[9] ); + VVV1P0_1( w_fp[6], w_fp[5], COUPs[0], 1.0, 0., 0., w_fp[9] ); // Amplitude(s) for diagram number 3 - VVV1_0( w_fp[7], w_fp[4], w_fp[9], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[7], w_fp[4], w_fp[9], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 3 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -325,10 +325,10 @@ namespace mg5amcCpu // *** DIAGRAM 4 OF 123 *** // Wavefunction(s) for diagram number 4 - VVV1P0_1( w_fp[4], w_fp[5], COUPs[0], 0., 0., w_fp[10] ); + VVV1P0_1( w_fp[4], w_fp[5], COUPs[0], 1.0, 0., 0., w_fp[10] ); // Amplitude(s) for diagram number 4 - VVV1_0( w_fp[6], w_fp[7], w_fp[10], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[6], w_fp[7], w_fp[10], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 4 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -345,11 +345,11 @@ namespace mg5amcCpu // *** DIAGRAM 5 OF 123 *** // Wavefunction(s) for diagram number 5 - FFV1_1( w_fp[2], w_fp[4], COUPs[1], cIPD[0], cIPD[1], w_fp[11] ); - FFV1_2( w_fp[3], w_fp[6], COUPs[1], cIPD[0], cIPD[1], w_fp[12] ); + FFV1_1( w_fp[2], w_fp[4], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[11] ); + FFV1_2( w_fp[3], w_fp[6], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[12] ); // Amplitude(s) for diagram number 5 - FFV1_0( w_fp[12], w_fp[11], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[12], w_fp[11], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 5 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -363,7 +363,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 6 - FFV1_0( w_fp[3], w_fp[11], w_fp[9], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[11], w_fp[9], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 6 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -376,10 +376,10 @@ namespace mg5amcCpu // *** DIAGRAM 7 OF 123 *** // Wavefunction(s) for diagram number 7 - FFV1_2( w_fp[3], w_fp[5], COUPs[1], cIPD[0], cIPD[1], w_fp[13] ); + FFV1_2( w_fp[3], w_fp[5], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[13] ); // Amplitude(s) for diagram number 7 - FFV1_0( w_fp[13], w_fp[11], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[13], w_fp[11], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 7 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -390,10 +390,10 @@ namespace mg5amcCpu // *** DIAGRAM 8 OF 123 *** // Wavefunction(s) for diagram number 8 - FFV1_1( w_fp[2], w_fp[5], COUPs[1], cIPD[0], cIPD[1], w_fp[14] ); + FFV1_1( w_fp[2], w_fp[5], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[14] ); // Amplitude(s) for diagram number 8 - FFV1_0( w_fp[12], w_fp[14], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[12], w_fp[14], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 8 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -407,7 +407,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 9 - FFV1_0( w_fp[3], w_fp[14], w_fp[8], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[14], w_fp[8], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 9 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -420,10 +420,10 @@ namespace mg5amcCpu // *** DIAGRAM 10 OF 123 *** // Wavefunction(s) for diagram number 10 - FFV1_2( w_fp[3], w_fp[4], COUPs[1], cIPD[0], cIPD[1], w_fp[15] ); + FFV1_2( w_fp[3], w_fp[4], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[15] ); // Amplitude(s) for diagram number 10 - FFV1_0( w_fp[15], w_fp[14], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[15], w_fp[14], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 10 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -434,10 +434,10 @@ namespace mg5amcCpu // *** DIAGRAM 11 OF 123 *** // Wavefunction(s) for diagram number 11 - FFV1_1( w_fp[2], w_fp[6], COUPs[1], cIPD[0], cIPD[1], w_fp[16] ); + FFV1_1( w_fp[2], w_fp[6], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[16] ); // Amplitude(s) for diagram number 11 - FFV1_0( w_fp[15], w_fp[16], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[15], w_fp[16], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 11 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -451,7 +451,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 12 - FFV1_0( w_fp[15], w_fp[2], w_fp[9], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[15], w_fp[2], w_fp[9], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 12 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -467,7 +467,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 13 - FFV1_0( w_fp[13], w_fp[16], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[13], w_fp[16], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 13 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -481,7 +481,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 14 - FFV1_0( w_fp[13], w_fp[2], w_fp[8], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[13], w_fp[2], w_fp[8], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 14 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -497,7 +497,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 15 - FFV1_0( w_fp[3], w_fp[16], w_fp[10], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[16], w_fp[10], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 15 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -513,7 +513,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 16 - FFV1_0( w_fp[12], w_fp[2], w_fp[10], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[12], w_fp[2], w_fp[10], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 16 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -526,12 +526,12 @@ namespace mg5amcCpu // *** DIAGRAM 17 OF 123 *** // Wavefunction(s) for diagram number 17 - FFV1_1( w_fp[2], w_fp[0], COUPs[1], cIPD[0], cIPD[1], w_fp[12] ); - FFV1_2( w_fp[3], w_fp[1], COUPs[1], cIPD[0], cIPD[1], w_fp[16] ); - FFV1_1( w_fp[12], w_fp[4], COUPs[1], cIPD[0], cIPD[1], w_fp[8] ); + FFV1_1( w_fp[2], w_fp[0], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[12] ); + FFV1_2( w_fp[3], w_fp[1], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[16] ); + FFV1_1( w_fp[12], w_fp[4], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[8] ); // Amplitude(s) for diagram number 17 - FFV1_0( w_fp[16], w_fp[8], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[16], w_fp[8], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 17 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -541,10 +541,10 @@ namespace mg5amcCpu // *** DIAGRAM 18 OF 123 *** // Wavefunction(s) for diagram number 18 - FFV1_1( w_fp[12], w_fp[5], COUPs[1], cIPD[0], cIPD[1], w_fp[9] ); + FFV1_1( w_fp[12], w_fp[5], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[9] ); // Amplitude(s) for diagram number 18 - FFV1_0( w_fp[16], w_fp[9], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[16], w_fp[9], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 18 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -557,7 +557,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 19 - FFV1_0( w_fp[16], w_fp[12], w_fp[10], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[16], w_fp[12], w_fp[10], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 19 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -568,11 +568,11 @@ namespace mg5amcCpu // *** DIAGRAM 20 OF 123 *** // Wavefunction(s) for diagram number 20 - VVV1P0_1( w_fp[1], w_fp[4], COUPs[0], 0., 0., w_fp[6] ); - FFV1P0_3( w_fp[3], w_fp[12], COUPs[1], 0., 0., w_fp[17] ); + VVV1P0_1( w_fp[1], w_fp[4], COUPs[0], 1.0, 0., 0., w_fp[6] ); + FFV1P0_3( w_fp[3], w_fp[12], COUPs[1], 1.0, 0., 0., w_fp[17] ); // Amplitude(s) for diagram number 20 - VVV1_0( w_fp[6], w_fp[5], w_fp[17], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[6], w_fp[5], w_fp[17], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 20 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -588,7 +588,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 21 - FFV1_0( w_fp[3], w_fp[9], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[9], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 21 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -602,7 +602,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 22 - FFV1_0( w_fp[13], w_fp[12], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[13], w_fp[12], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 22 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -613,10 +613,10 @@ namespace mg5amcCpu // *** DIAGRAM 23 OF 123 *** // Wavefunction(s) for diagram number 23 - VVV1P0_1( w_fp[1], w_fp[5], COUPs[0], 0., 0., w_fp[18] ); + VVV1P0_1( w_fp[1], w_fp[5], COUPs[0], 1.0, 0., 0., w_fp[18] ); // Amplitude(s) for diagram number 23 - VVV1_0( w_fp[18], w_fp[4], w_fp[17], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[18], w_fp[4], w_fp[17], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 23 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -632,7 +632,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 24 - FFV1_0( w_fp[3], w_fp[8], w_fp[18], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[8], w_fp[18], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 24 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -646,7 +646,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 25 - FFV1_0( w_fp[15], w_fp[12], w_fp[18], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[15], w_fp[12], w_fp[18], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 25 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -657,10 +657,10 @@ namespace mg5amcCpu // *** DIAGRAM 26 OF 123 *** // Wavefunction(s) for diagram number 26 - FFV1_1( w_fp[12], w_fp[1], COUPs[1], cIPD[0], cIPD[1], w_fp[19] ); + FFV1_1( w_fp[12], w_fp[1], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[19] ); // Amplitude(s) for diagram number 26 - FFV1_0( w_fp[15], w_fp[19], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[15], w_fp[19], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 26 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -673,7 +673,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 27 - FFV1_0( w_fp[15], w_fp[9], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[15], w_fp[9], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 27 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -686,7 +686,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 28 - FFV1_0( w_fp[13], w_fp[19], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[13], w_fp[19], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 28 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -699,7 +699,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 29 - FFV1_0( w_fp[13], w_fp[8], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[13], w_fp[8], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 29 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -712,7 +712,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 30 - FFV1_0( w_fp[3], w_fp[19], w_fp[10], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[19], w_fp[10], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 30 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -726,7 +726,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 31 - VVV1_0( w_fp[1], w_fp[10], w_fp[17], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[10], w_fp[17], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 31 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -739,22 +739,22 @@ namespace mg5amcCpu // *** DIAGRAM 32 OF 123 *** // Wavefunction(s) for diagram number 32 - VVVV1P0_1( w_fp[1], w_fp[4], w_fp[5], COUPs[2], 0., 0., w_fp[17] ); - VVVV3P0_1( w_fp[1], w_fp[4], w_fp[5], COUPs[2], 0., 0., w_fp[19] ); - VVVV4P0_1( w_fp[1], w_fp[4], w_fp[5], COUPs[2], 0., 0., w_fp[8] ); + VVVV1P0_1( w_fp[1], w_fp[4], w_fp[5], COUPs[2], 1.0, 0., 0., w_fp[17] ); + VVVV3P0_1( w_fp[1], w_fp[4], w_fp[5], COUPs[2], 1.0, 0., 0., w_fp[19] ); + VVVV4P0_1( w_fp[1], w_fp[4], w_fp[5], COUPs[2], 1.0, 0., 0., w_fp[8] ); // Amplitude(s) for diagram number 32 - FFV1_0( w_fp[3], w_fp[12], w_fp[17], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[12], w_fp[17], COUPs[1], 1.0, &_fp[0] ); jamp_sv[0] += amp_sv[0]; jamp_sv[1] -= amp_sv[0]; jamp_sv[3] -= amp_sv[0]; jamp_sv[5] += amp_sv[0]; - FFV1_0( w_fp[3], w_fp[12], w_fp[19], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[12], w_fp[19], COUPs[1], 1.0, &_fp[0] ); jamp_sv[1] -= amp_sv[0]; jamp_sv[2] += amp_sv[0]; jamp_sv[3] -= amp_sv[0]; jamp_sv[4] += amp_sv[0]; - FFV1_0( w_fp[3], w_fp[12], w_fp[8], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[12], w_fp[8], COUPs[1], 1.0, &_fp[0] ); jamp_sv[0] -= amp_sv[0]; jamp_sv[2] += amp_sv[0]; jamp_sv[4] += amp_sv[0]; @@ -763,12 +763,12 @@ namespace mg5amcCpu // *** DIAGRAM 33 OF 123 *** // Wavefunction(s) for diagram number 33 - FFV1_2( w_fp[3], w_fp[0], COUPs[1], cIPD[0], cIPD[1], w_fp[12] ); - FFV1_1( w_fp[2], w_fp[1], COUPs[1], cIPD[0], cIPD[1], w_fp[9] ); - FFV1_2( w_fp[12], w_fp[4], COUPs[1], cIPD[0], cIPD[1], w_fp[20] ); + FFV1_2( w_fp[3], w_fp[0], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[12] ); + FFV1_1( w_fp[2], w_fp[1], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[9] ); + FFV1_2( w_fp[12], w_fp[4], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[20] ); // Amplitude(s) for diagram number 33 - FFV1_0( w_fp[20], w_fp[9], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[20], w_fp[9], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 33 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -778,10 +778,10 @@ namespace mg5amcCpu // *** DIAGRAM 34 OF 123 *** // Wavefunction(s) for diagram number 34 - FFV1_2( w_fp[12], w_fp[5], COUPs[1], cIPD[0], cIPD[1], w_fp[21] ); + FFV1_2( w_fp[12], w_fp[5], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[21] ); // Amplitude(s) for diagram number 34 - FFV1_0( w_fp[21], w_fp[9], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[21], w_fp[9], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 34 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -794,7 +794,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 35 - FFV1_0( w_fp[12], w_fp[9], w_fp[10], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[12], w_fp[9], w_fp[10], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 35 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -805,10 +805,10 @@ namespace mg5amcCpu // *** DIAGRAM 36 OF 123 *** // Wavefunction(s) for diagram number 36 - FFV1P0_3( w_fp[12], w_fp[2], COUPs[1], 0., 0., w_fp[22] ); + FFV1P0_3( w_fp[12], w_fp[2], COUPs[1], 1.0, 0., 0., w_fp[22] ); // Amplitude(s) for diagram number 36 - VVV1_0( w_fp[6], w_fp[5], w_fp[22], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[6], w_fp[5], w_fp[22], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 36 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -824,7 +824,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 37 - FFV1_0( w_fp[21], w_fp[2], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[21], w_fp[2], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 37 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -838,7 +838,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 38 - FFV1_0( w_fp[12], w_fp[14], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[12], w_fp[14], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 38 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -852,7 +852,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 39 - VVV1_0( w_fp[18], w_fp[4], w_fp[22], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[18], w_fp[4], w_fp[22], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 39 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -868,7 +868,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 40 - FFV1_0( w_fp[20], w_fp[2], w_fp[18], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[20], w_fp[2], w_fp[18], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 40 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -882,7 +882,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 41 - FFV1_0( w_fp[12], w_fp[11], w_fp[18], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[12], w_fp[11], w_fp[18], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 41 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -893,10 +893,10 @@ namespace mg5amcCpu // *** DIAGRAM 42 OF 123 *** // Wavefunction(s) for diagram number 42 - FFV1_2( w_fp[12], w_fp[1], COUPs[1], cIPD[0], cIPD[1], w_fp[23] ); + FFV1_2( w_fp[12], w_fp[1], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[23] ); // Amplitude(s) for diagram number 42 - FFV1_0( w_fp[23], w_fp[11], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[23], w_fp[11], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 42 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -909,7 +909,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 43 - FFV1_0( w_fp[21], w_fp[11], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[21], w_fp[11], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 43 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -922,7 +922,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 44 - FFV1_0( w_fp[23], w_fp[14], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[23], w_fp[14], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 44 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -935,7 +935,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 45 - FFV1_0( w_fp[20], w_fp[14], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[20], w_fp[14], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 45 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -948,7 +948,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 46 - FFV1_0( w_fp[23], w_fp[2], w_fp[10], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[23], w_fp[2], w_fp[10], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 46 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -962,7 +962,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 47 - VVV1_0( w_fp[1], w_fp[10], w_fp[22], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[10], w_fp[22], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 47 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -978,17 +978,17 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 48 - FFV1_0( w_fp[12], w_fp[2], w_fp[17], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[12], w_fp[2], w_fp[17], COUPs[1], 1.0, &_fp[0] ); jamp_sv[9] += amp_sv[0]; jamp_sv[11] -= amp_sv[0]; jamp_sv[17] -= amp_sv[0]; jamp_sv[23] += amp_sv[0]; - FFV1_0( w_fp[12], w_fp[2], w_fp[19], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[12], w_fp[2], w_fp[19], COUPs[1], 1.0, &_fp[0] ); jamp_sv[11] -= amp_sv[0]; jamp_sv[15] += amp_sv[0]; jamp_sv[17] -= amp_sv[0]; jamp_sv[21] += amp_sv[0]; - FFV1_0( w_fp[12], w_fp[2], w_fp[8], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[12], w_fp[2], w_fp[8], COUPs[1], 1.0, &_fp[0] ); jamp_sv[9] -= amp_sv[0]; jamp_sv[15] += amp_sv[0]; jamp_sv[21] += amp_sv[0]; @@ -997,11 +997,11 @@ namespace mg5amcCpu // *** DIAGRAM 49 OF 123 *** // Wavefunction(s) for diagram number 49 - VVV1P0_1( w_fp[0], w_fp[4], COUPs[0], 0., 0., w_fp[12] ); - FFV1_2( w_fp[3], w_fp[12], COUPs[1], cIPD[0], cIPD[1], w_fp[22] ); + VVV1P0_1( w_fp[0], w_fp[4], COUPs[0], 1.0, 0., 0., w_fp[12] ); + FFV1_2( w_fp[3], w_fp[12], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[22] ); // Amplitude(s) for diagram number 49 - FFV1_0( w_fp[22], w_fp[9], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[22], w_fp[9], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 49 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1012,10 +1012,10 @@ namespace mg5amcCpu // *** DIAGRAM 50 OF 123 *** // Wavefunction(s) for diagram number 50 - VVV1P0_1( w_fp[12], w_fp[5], COUPs[0], 0., 0., w_fp[23] ); + VVV1P0_1( w_fp[12], w_fp[5], COUPs[0], 1.0, 0., 0., w_fp[23] ); // Amplitude(s) for diagram number 50 - FFV1_0( w_fp[3], w_fp[9], w_fp[23], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[9], w_fp[23], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 50 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1031,7 +1031,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 51 - FFV1_0( w_fp[13], w_fp[9], w_fp[12], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[13], w_fp[9], w_fp[12], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 51 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1042,10 +1042,10 @@ namespace mg5amcCpu // *** DIAGRAM 52 OF 123 *** // Wavefunction(s) for diagram number 52 - FFV1_1( w_fp[2], w_fp[12], COUPs[1], cIPD[0], cIPD[1], w_fp[20] ); + FFV1_1( w_fp[2], w_fp[12], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[20] ); // Amplitude(s) for diagram number 52 - FFV1_0( w_fp[16], w_fp[20], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[16], w_fp[20], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 52 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1059,7 +1059,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 53 - FFV1_0( w_fp[16], w_fp[2], w_fp[23], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[16], w_fp[2], w_fp[23], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 53 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1075,7 +1075,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 54 - FFV1_0( w_fp[16], w_fp[14], w_fp[12], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[16], w_fp[14], w_fp[12], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 54 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1089,7 +1089,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 55 - FFV1_0( w_fp[3], w_fp[20], w_fp[18], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[20], w_fp[18], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 55 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1105,7 +1105,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 56 - FFV1_0( w_fp[22], w_fp[2], w_fp[18], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[22], w_fp[2], w_fp[18], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 56 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1121,7 +1121,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 57 - VVV1_0( w_fp[12], w_fp[18], w_fp[7], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[12], w_fp[18], w_fp[7], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 57 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1141,7 +1141,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 58 - VVVV1_0( w_fp[12], w_fp[1], w_fp[7], w_fp[5], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[12], w_fp[1], w_fp[7], w_fp[5], COUPs[2], 1.0, &_fp[0] ); jamp_sv[2] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[6] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[8] += cxtype( 0, 1 ) * amp_sv[0]; @@ -1150,7 +1150,7 @@ namespace mg5amcCpu jamp_sv[20] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[21] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[22] += cxtype( 0, 1 ) * amp_sv[0]; - VVVV3_0( w_fp[12], w_fp[1], w_fp[7], w_fp[5], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[12], w_fp[1], w_fp[7], w_fp[5], COUPs[2], 1.0, &_fp[0] ); jamp_sv[2] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[3] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[10] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -1159,7 +1159,7 @@ namespace mg5amcCpu jamp_sv[13] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[20] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[21] -= cxtype( 0, 1 ) * amp_sv[0]; - VVVV4_0( w_fp[12], w_fp[1], w_fp[7], w_fp[5], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[12], w_fp[1], w_fp[7], w_fp[5], COUPs[2], 1.0, &_fp[0] ); jamp_sv[3] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[6] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[8] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -1172,10 +1172,10 @@ namespace mg5amcCpu // *** DIAGRAM 59 OF 123 *** // Wavefunction(s) for diagram number 59 - VVV1P0_1( w_fp[12], w_fp[1], COUPs[0], 0., 0., w_fp[21] ); + VVV1P0_1( w_fp[12], w_fp[1], COUPs[0], 1.0, 0., 0., w_fp[21] ); // Amplitude(s) for diagram number 59 - VVV1_0( w_fp[7], w_fp[5], w_fp[21], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[7], w_fp[5], w_fp[21], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 59 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1195,7 +1195,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 60 - VVV1_0( w_fp[1], w_fp[7], w_fp[23], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[7], w_fp[23], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 60 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1215,7 +1215,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 61 - FFV1_0( w_fp[3], w_fp[14], w_fp[21], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[14], w_fp[21], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 61 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1231,7 +1231,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 62 - FFV1_0( w_fp[22], w_fp[14], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[22], w_fp[14], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 62 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1245,7 +1245,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 63 - FFV1_0( w_fp[13], w_fp[2], w_fp[21], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[13], w_fp[2], w_fp[21], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 63 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1261,7 +1261,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 64 - FFV1_0( w_fp[13], w_fp[20], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[13], w_fp[20], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 64 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1272,11 +1272,11 @@ namespace mg5amcCpu // *** DIAGRAM 65 OF 123 *** // Wavefunction(s) for diagram number 65 - VVV1P0_1( w_fp[0], w_fp[5], COUPs[0], 0., 0., w_fp[20] ); - FFV1_2( w_fp[3], w_fp[20], COUPs[1], cIPD[0], cIPD[1], w_fp[21] ); + VVV1P0_1( w_fp[0], w_fp[5], COUPs[0], 1.0, 0., 0., w_fp[20] ); + FFV1_2( w_fp[3], w_fp[20], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[21] ); // Amplitude(s) for diagram number 65 - FFV1_0( w_fp[21], w_fp[9], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[21], w_fp[9], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 65 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1287,10 +1287,10 @@ namespace mg5amcCpu // *** DIAGRAM 66 OF 123 *** // Wavefunction(s) for diagram number 66 - VVV1P0_1( w_fp[20], w_fp[4], COUPs[0], 0., 0., w_fp[22] ); + VVV1P0_1( w_fp[20], w_fp[4], COUPs[0], 1.0, 0., 0., w_fp[22] ); // Amplitude(s) for diagram number 66 - FFV1_0( w_fp[3], w_fp[9], w_fp[22], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[9], w_fp[22], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 66 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1306,7 +1306,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 67 - FFV1_0( w_fp[15], w_fp[9], w_fp[20], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[15], w_fp[9], w_fp[20], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 67 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1317,10 +1317,10 @@ namespace mg5amcCpu // *** DIAGRAM 68 OF 123 *** // Wavefunction(s) for diagram number 68 - FFV1_1( w_fp[2], w_fp[20], COUPs[1], cIPD[0], cIPD[1], w_fp[23] ); + FFV1_1( w_fp[2], w_fp[20], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[23] ); // Amplitude(s) for diagram number 68 - FFV1_0( w_fp[16], w_fp[23], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[16], w_fp[23], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 68 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1334,7 +1334,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 69 - FFV1_0( w_fp[16], w_fp[2], w_fp[22], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[16], w_fp[2], w_fp[22], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 69 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1350,7 +1350,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 70 - FFV1_0( w_fp[16], w_fp[11], w_fp[20], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[16], w_fp[11], w_fp[20], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 70 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1364,7 +1364,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 71 - FFV1_0( w_fp[3], w_fp[23], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[23], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 71 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1380,7 +1380,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 72 - FFV1_0( w_fp[21], w_fp[2], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[21], w_fp[2], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 72 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1396,7 +1396,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 73 - VVV1_0( w_fp[20], w_fp[6], w_fp[7], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[20], w_fp[6], w_fp[7], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 73 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1416,7 +1416,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 74 - VVVV1_0( w_fp[20], w_fp[1], w_fp[7], w_fp[4], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[20], w_fp[1], w_fp[7], w_fp[4], COUPs[2], 1.0, &_fp[0] ); jamp_sv[4] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[7] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[10] += cxtype( 0, 1 ) * amp_sv[0]; @@ -1425,7 +1425,7 @@ namespace mg5amcCpu jamp_sv[15] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[16] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[18] -= cxtype( 0, 1 ) * amp_sv[0]; - VVVV3_0( w_fp[20], w_fp[1], w_fp[7], w_fp[4], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[20], w_fp[1], w_fp[7], w_fp[4], COUPs[2], 1.0, &_fp[0] ); jamp_sv[4] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[5] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[8] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -1434,7 +1434,7 @@ namespace mg5amcCpu jamp_sv[15] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[18] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[19] += cxtype( 0, 1 ) * amp_sv[0]; - VVVV4_0( w_fp[20], w_fp[1], w_fp[7], w_fp[4], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[20], w_fp[1], w_fp[7], w_fp[4], COUPs[2], 1.0, &_fp[0] ); jamp_sv[5] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[7] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[8] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -1447,10 +1447,10 @@ namespace mg5amcCpu // *** DIAGRAM 75 OF 123 *** // Wavefunction(s) for diagram number 75 - VVV1P0_1( w_fp[20], w_fp[1], COUPs[0], 0., 0., w_fp[12] ); + VVV1P0_1( w_fp[20], w_fp[1], COUPs[0], 1.0, 0., 0., w_fp[12] ); // Amplitude(s) for diagram number 75 - VVV1_0( w_fp[7], w_fp[4], w_fp[12], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[7], w_fp[4], w_fp[12], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 75 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1470,7 +1470,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 76 - VVV1_0( w_fp[1], w_fp[7], w_fp[22], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[7], w_fp[22], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 76 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1490,7 +1490,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 77 - FFV1_0( w_fp[3], w_fp[11], w_fp[12], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[11], w_fp[12], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 77 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1506,7 +1506,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 78 - FFV1_0( w_fp[21], w_fp[11], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[21], w_fp[11], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 78 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1520,7 +1520,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 79 - FFV1_0( w_fp[15], w_fp[2], w_fp[12], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[15], w_fp[2], w_fp[12], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 79 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1536,7 +1536,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 80 - FFV1_0( w_fp[15], w_fp[23], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[15], w_fp[23], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 80 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1547,10 +1547,10 @@ namespace mg5amcCpu // *** DIAGRAM 81 OF 123 *** // Wavefunction(s) for diagram number 81 - FFV1_1( w_fp[9], w_fp[0], COUPs[1], cIPD[0], cIPD[1], w_fp[23] ); + FFV1_1( w_fp[9], w_fp[0], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[23] ); // Amplitude(s) for diagram number 81 - FFV1_0( w_fp[15], w_fp[23], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[15], w_fp[23], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 81 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1560,10 +1560,10 @@ namespace mg5amcCpu // *** DIAGRAM 82 OF 123 *** // Wavefunction(s) for diagram number 82 - FFV1_2( w_fp[15], w_fp[0], COUPs[1], cIPD[0], cIPD[1], w_fp[12] ); + FFV1_2( w_fp[15], w_fp[0], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[12] ); // Amplitude(s) for diagram number 82 - FFV1_0( w_fp[12], w_fp[9], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[12], w_fp[9], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 82 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1576,7 +1576,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 83 - FFV1_0( w_fp[13], w_fp[23], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[13], w_fp[23], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 83 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1586,10 +1586,10 @@ namespace mg5amcCpu // *** DIAGRAM 84 OF 123 *** // Wavefunction(s) for diagram number 84 - FFV1_2( w_fp[13], w_fp[0], COUPs[1], cIPD[0], cIPD[1], w_fp[21] ); + FFV1_2( w_fp[13], w_fp[0], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[21] ); // Amplitude(s) for diagram number 84 - FFV1_0( w_fp[21], w_fp[9], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[21], w_fp[9], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 84 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1602,7 +1602,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 85 - FFV1_0( w_fp[3], w_fp[23], w_fp[10], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[23], w_fp[10], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 85 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1613,10 +1613,10 @@ namespace mg5amcCpu // *** DIAGRAM 86 OF 123 *** // Wavefunction(s) for diagram number 86 - VVV1P0_1( w_fp[0], w_fp[10], COUPs[0], 0., 0., w_fp[23] ); + VVV1P0_1( w_fp[0], w_fp[10], COUPs[0], 1.0, 0., 0., w_fp[23] ); // Amplitude(s) for diagram number 86 - FFV1_0( w_fp[3], w_fp[9], w_fp[23], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[9], w_fp[23], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 86 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1629,10 +1629,10 @@ namespace mg5amcCpu // *** DIAGRAM 87 OF 123 *** // Wavefunction(s) for diagram number 87 - FFV1_2( w_fp[16], w_fp[0], COUPs[1], cIPD[0], cIPD[1], w_fp[22] ); + FFV1_2( w_fp[16], w_fp[0], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[22] ); // Amplitude(s) for diagram number 87 - FFV1_0( w_fp[22], w_fp[11], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[22], w_fp[11], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 87 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1642,10 +1642,10 @@ namespace mg5amcCpu // *** DIAGRAM 88 OF 123 *** // Wavefunction(s) for diagram number 88 - FFV1_1( w_fp[11], w_fp[0], COUPs[1], cIPD[0], cIPD[1], w_fp[20] ); + FFV1_1( w_fp[11], w_fp[0], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[20] ); // Amplitude(s) for diagram number 88 - FFV1_0( w_fp[16], w_fp[20], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[16], w_fp[20], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 88 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1658,7 +1658,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 89 - FFV1_0( w_fp[22], w_fp[14], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[22], w_fp[14], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 89 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1668,10 +1668,10 @@ namespace mg5amcCpu // *** DIAGRAM 90 OF 123 *** // Wavefunction(s) for diagram number 90 - FFV1_1( w_fp[14], w_fp[0], COUPs[1], cIPD[0], cIPD[1], w_fp[24] ); + FFV1_1( w_fp[14], w_fp[0], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[24] ); // Amplitude(s) for diagram number 90 - FFV1_0( w_fp[16], w_fp[24], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[16], w_fp[24], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 90 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1684,7 +1684,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 91 - FFV1_0( w_fp[22], w_fp[2], w_fp[10], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[22], w_fp[2], w_fp[10], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 91 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1698,7 +1698,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 92 - FFV1_0( w_fp[16], w_fp[2], w_fp[23], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[16], w_fp[2], w_fp[23], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 92 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1714,7 +1714,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 93 - VVVV1_0( w_fp[0], w_fp[6], w_fp[7], w_fp[5], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[0], w_fp[6], w_fp[7], w_fp[5], COUPs[2], 1.0, &_fp[0] ); jamp_sv[0] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[2] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[8] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -1723,7 +1723,7 @@ namespace mg5amcCpu jamp_sv[19] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[21] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[23] -= cxtype( 0, 1 ) * amp_sv[0]; - VVVV3_0( w_fp[0], w_fp[6], w_fp[7], w_fp[5], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[0], w_fp[6], w_fp[7], w_fp[5], COUPs[2], 1.0, &_fp[0] ); jamp_sv[0] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[2] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[4] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -1732,7 +1732,7 @@ namespace mg5amcCpu jamp_sv[15] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[21] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[23] -= cxtype( 0, 1 ) * amp_sv[0]; - VVVV4_0( w_fp[0], w_fp[6], w_fp[7], w_fp[5], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[0], w_fp[6], w_fp[7], w_fp[5], COUPs[2], 1.0, &_fp[0] ); jamp_sv[4] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[5] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[8] += cxtype( 0, 1 ) * amp_sv[0]; @@ -1745,10 +1745,10 @@ namespace mg5amcCpu // *** DIAGRAM 94 OF 123 *** // Wavefunction(s) for diagram number 94 - VVV1P0_1( w_fp[0], w_fp[6], COUPs[0], 0., 0., w_fp[22] ); + VVV1P0_1( w_fp[0], w_fp[6], COUPs[0], 1.0, 0., 0., w_fp[22] ); // Amplitude(s) for diagram number 94 - VVV1_0( w_fp[7], w_fp[5], w_fp[22], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[7], w_fp[5], w_fp[22], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 94 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1765,10 +1765,10 @@ namespace mg5amcCpu // *** DIAGRAM 95 OF 123 *** // Wavefunction(s) for diagram number 95 - VVV1P0_1( w_fp[0], w_fp[7], COUPs[0], 0., 0., w_fp[25] ); + VVV1P0_1( w_fp[0], w_fp[7], COUPs[0], 1.0, 0., 0., w_fp[25] ); // Amplitude(s) for diagram number 95 - VVV1_0( w_fp[6], w_fp[5], w_fp[25], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[6], w_fp[5], w_fp[25], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 95 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1788,7 +1788,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 96 - FFV1_0( w_fp[3], w_fp[14], w_fp[22], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[14], w_fp[22], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 96 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1804,7 +1804,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 97 - FFV1_0( w_fp[3], w_fp[24], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[24], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 97 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1818,7 +1818,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 98 - FFV1_0( w_fp[13], w_fp[2], w_fp[22], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[13], w_fp[2], w_fp[22], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 98 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1834,7 +1834,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 99 - FFV1_0( w_fp[21], w_fp[2], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[21], w_fp[2], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 99 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1848,7 +1848,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 100 - VVVV1_0( w_fp[0], w_fp[18], w_fp[7], w_fp[4], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[0], w_fp[18], w_fp[7], w_fp[4], COUPs[2], 1.0, &_fp[0] ); jamp_sv[1] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[4] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[10] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -1857,7 +1857,7 @@ namespace mg5amcCpu jamp_sv[15] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[17] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[20] += cxtype( 0, 1 ) * amp_sv[0]; - VVVV3_0( w_fp[0], w_fp[18], w_fp[7], w_fp[4], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[0], w_fp[18], w_fp[7], w_fp[4], COUPs[2], 1.0, &_fp[0] ); jamp_sv[1] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[2] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[3] += cxtype( 0, 1 ) * amp_sv[0]; @@ -1866,7 +1866,7 @@ namespace mg5amcCpu jamp_sv[15] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[17] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[21] += cxtype( 0, 1 ) * amp_sv[0]; - VVVV4_0( w_fp[0], w_fp[18], w_fp[7], w_fp[4], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[0], w_fp[18], w_fp[7], w_fp[4], COUPs[2], 1.0, &_fp[0] ); jamp_sv[2] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[3] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[10] += cxtype( 0, 1 ) * amp_sv[0]; @@ -1879,10 +1879,10 @@ namespace mg5amcCpu // *** DIAGRAM 101 OF 123 *** // Wavefunction(s) for diagram number 101 - VVV1P0_1( w_fp[0], w_fp[18], COUPs[0], 0., 0., w_fp[6] ); + VVV1P0_1( w_fp[0], w_fp[18], COUPs[0], 1.0, 0., 0., w_fp[6] ); // Amplitude(s) for diagram number 101 - VVV1_0( w_fp[7], w_fp[4], w_fp[6], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[7], w_fp[4], w_fp[6], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 101 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1902,7 +1902,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 102 - VVV1_0( w_fp[18], w_fp[4], w_fp[25], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[18], w_fp[4], w_fp[25], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 102 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1922,7 +1922,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 103 - FFV1_0( w_fp[3], w_fp[11], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[11], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 103 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1938,7 +1938,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 104 - FFV1_0( w_fp[3], w_fp[20], w_fp[18], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[20], w_fp[18], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 104 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1952,7 +1952,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 105 - FFV1_0( w_fp[15], w_fp[2], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[15], w_fp[2], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 105 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1968,7 +1968,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 106 - FFV1_0( w_fp[12], w_fp[2], w_fp[18], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[12], w_fp[2], w_fp[18], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 106 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1982,7 +1982,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 107 - VVVV1_0( w_fp[0], w_fp[1], w_fp[7], w_fp[10], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[0], w_fp[1], w_fp[7], w_fp[10], COUPs[2], 1.0, &_fp[0] ); jamp_sv[0] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[1] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[6] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -1991,7 +1991,7 @@ namespace mg5amcCpu jamp_sv[17] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[22] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[23] -= cxtype( 0, 1 ) * amp_sv[0]; - VVVV3_0( w_fp[0], w_fp[1], w_fp[7], w_fp[10], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[0], w_fp[1], w_fp[7], w_fp[10], COUPs[2], 1.0, &_fp[0] ); jamp_sv[0] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[1] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[3] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -2000,7 +2000,7 @@ namespace mg5amcCpu jamp_sv[11] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[17] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[23] -= cxtype( 0, 1 ) * amp_sv[0]; - VVVV4_0( w_fp[0], w_fp[1], w_fp[7], w_fp[10], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[0], w_fp[1], w_fp[7], w_fp[10], COUPs[2], 1.0, &_fp[0] ); jamp_sv[3] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[5] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[6] += cxtype( 0, 1 ) * amp_sv[0]; @@ -2016,7 +2016,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 108 - VVV1_0( w_fp[1], w_fp[10], w_fp[25], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[10], w_fp[25], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 108 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -2036,7 +2036,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 109 - VVV1_0( w_fp[1], w_fp[7], w_fp[23], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[7], w_fp[23], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 109 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -2056,7 +2056,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 110 - FFV1_0( w_fp[13], w_fp[20], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[13], w_fp[20], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 110 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -2069,7 +2069,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 111 - FFV1_0( w_fp[21], w_fp[11], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[21], w_fp[11], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 111 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -2082,7 +2082,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 112 - FFV1_0( w_fp[15], w_fp[24], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[15], w_fp[24], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 112 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -2095,7 +2095,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 113 - FFV1_0( w_fp[12], w_fp[14], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[12], w_fp[14], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 113 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -2105,12 +2105,12 @@ namespace mg5amcCpu // *** DIAGRAM 114 OF 123 *** // Wavefunction(s) for diagram number 114 - VVVV1P0_1( w_fp[0], w_fp[1], w_fp[4], COUPs[2], 0., 0., w_fp[12] ); - VVVV3P0_1( w_fp[0], w_fp[1], w_fp[4], COUPs[2], 0., 0., w_fp[24] ); - VVVV4P0_1( w_fp[0], w_fp[1], w_fp[4], COUPs[2], 0., 0., w_fp[21] ); + VVVV1P0_1( w_fp[0], w_fp[1], w_fp[4], COUPs[2], 1.0, 0., 0., w_fp[12] ); + VVVV3P0_1( w_fp[0], w_fp[1], w_fp[4], COUPs[2], 1.0, 0., 0., w_fp[24] ); + VVVV4P0_1( w_fp[0], w_fp[1], w_fp[4], COUPs[2], 1.0, 0., 0., w_fp[21] ); // Amplitude(s) for diagram number 114 - VVV1_0( w_fp[12], w_fp[7], w_fp[5], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[12], w_fp[7], w_fp[5], COUPs[0], 1.0, &_fp[0] ); jamp_sv[0] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[2] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[8] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -2119,7 +2119,7 @@ namespace mg5amcCpu jamp_sv[19] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[21] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[23] -= cxtype( 0, 1 ) * amp_sv[0]; - VVV1_0( w_fp[24], w_fp[7], w_fp[5], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[24], w_fp[7], w_fp[5], COUPs[0], 1.0, &_fp[0] ); jamp_sv[2] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[6] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[8] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -2128,7 +2128,7 @@ namespace mg5amcCpu jamp_sv[20] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[21] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[22] -= cxtype( 0, 1 ) * amp_sv[0]; - VVV1_0( w_fp[21], w_fp[7], w_fp[5], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[21], w_fp[7], w_fp[5], COUPs[0], 1.0, &_fp[0] ); jamp_sv[0] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[6] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[12] += cxtype( 0, 1 ) * amp_sv[0]; @@ -2144,17 +2144,17 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 115 - FFV1_0( w_fp[3], w_fp[14], w_fp[12], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[14], w_fp[12], COUPs[1], 1.0, &_fp[0] ); jamp_sv[18] += amp_sv[0]; jamp_sv[19] -= amp_sv[0]; jamp_sv[21] -= amp_sv[0]; jamp_sv[23] += amp_sv[0]; - FFV1_0( w_fp[3], w_fp[14], w_fp[24], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[14], w_fp[24], COUPs[1], 1.0, &_fp[0] ); jamp_sv[19] -= amp_sv[0]; jamp_sv[20] += amp_sv[0]; jamp_sv[21] -= amp_sv[0]; jamp_sv[22] += amp_sv[0]; - FFV1_0( w_fp[3], w_fp[14], w_fp[21], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[14], w_fp[21], COUPs[1], 1.0, &_fp[0] ); jamp_sv[18] -= amp_sv[0]; jamp_sv[20] += amp_sv[0]; jamp_sv[22] += amp_sv[0]; @@ -2166,17 +2166,17 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 116 - FFV1_0( w_fp[13], w_fp[2], w_fp[12], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[13], w_fp[2], w_fp[12], COUPs[1], 1.0, &_fp[0] ); jamp_sv[0] += amp_sv[0]; jamp_sv[2] -= amp_sv[0]; jamp_sv[8] -= amp_sv[0]; jamp_sv[14] += amp_sv[0]; - FFV1_0( w_fp[13], w_fp[2], w_fp[24], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[13], w_fp[2], w_fp[24], COUPs[1], 1.0, &_fp[0] ); jamp_sv[2] -= amp_sv[0]; jamp_sv[6] += amp_sv[0]; jamp_sv[8] -= amp_sv[0]; jamp_sv[12] += amp_sv[0]; - FFV1_0( w_fp[13], w_fp[2], w_fp[21], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[13], w_fp[2], w_fp[21], COUPs[1], 1.0, &_fp[0] ); jamp_sv[0] -= amp_sv[0]; jamp_sv[6] += amp_sv[0]; jamp_sv[12] += amp_sv[0]; @@ -2185,12 +2185,12 @@ namespace mg5amcCpu // *** DIAGRAM 117 OF 123 *** // Wavefunction(s) for diagram number 117 - VVVV1P0_1( w_fp[0], w_fp[1], w_fp[5], COUPs[2], 0., 0., w_fp[21] ); - VVVV3P0_1( w_fp[0], w_fp[1], w_fp[5], COUPs[2], 0., 0., w_fp[13] ); - VVVV4P0_1( w_fp[0], w_fp[1], w_fp[5], COUPs[2], 0., 0., w_fp[24] ); + VVVV1P0_1( w_fp[0], w_fp[1], w_fp[5], COUPs[2], 1.0, 0., 0., w_fp[21] ); + VVVV3P0_1( w_fp[0], w_fp[1], w_fp[5], COUPs[2], 1.0, 0., 0., w_fp[13] ); + VVVV4P0_1( w_fp[0], w_fp[1], w_fp[5], COUPs[2], 1.0, 0., 0., w_fp[24] ); // Amplitude(s) for diagram number 117 - VVV1_0( w_fp[21], w_fp[7], w_fp[4], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[21], w_fp[7], w_fp[4], COUPs[0], 1.0, &_fp[0] ); jamp_sv[1] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[4] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[10] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -2199,7 +2199,7 @@ namespace mg5amcCpu jamp_sv[15] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[17] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[20] += cxtype( 0, 1 ) * amp_sv[0]; - VVV1_0( w_fp[13], w_fp[7], w_fp[4], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[13], w_fp[7], w_fp[4], COUPs[0], 1.0, &_fp[0] ); jamp_sv[4] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[7] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[10] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -2208,7 +2208,7 @@ namespace mg5amcCpu jamp_sv[15] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[16] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[18] += cxtype( 0, 1 ) * amp_sv[0]; - VVV1_0( w_fp[24], w_fp[7], w_fp[4], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[24], w_fp[7], w_fp[4], COUPs[0], 1.0, &_fp[0] ); jamp_sv[1] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[7] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[12] += cxtype( 0, 1 ) * amp_sv[0]; @@ -2224,17 +2224,17 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 118 - FFV1_0( w_fp[3], w_fp[11], w_fp[21], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[11], w_fp[21], COUPs[1], 1.0, &_fp[0] ); jamp_sv[12] += amp_sv[0]; jamp_sv[13] -= amp_sv[0]; jamp_sv[15] -= amp_sv[0]; jamp_sv[17] += amp_sv[0]; - FFV1_0( w_fp[3], w_fp[11], w_fp[13], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[11], w_fp[13], COUPs[1], 1.0, &_fp[0] ); jamp_sv[13] -= amp_sv[0]; jamp_sv[14] += amp_sv[0]; jamp_sv[15] -= amp_sv[0]; jamp_sv[16] += amp_sv[0]; - FFV1_0( w_fp[3], w_fp[11], w_fp[24], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[11], w_fp[24], COUPs[1], 1.0, &_fp[0] ); jamp_sv[12] -= amp_sv[0]; jamp_sv[14] += amp_sv[0]; jamp_sv[16] += amp_sv[0]; @@ -2246,17 +2246,17 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 119 - FFV1_0( w_fp[15], w_fp[2], w_fp[21], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[15], w_fp[2], w_fp[21], COUPs[1], 1.0, &_fp[0] ); jamp_sv[1] += amp_sv[0]; jamp_sv[4] -= amp_sv[0]; jamp_sv[10] -= amp_sv[0]; jamp_sv[20] += amp_sv[0]; - FFV1_0( w_fp[15], w_fp[2], w_fp[13], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[15], w_fp[2], w_fp[13], COUPs[1], 1.0, &_fp[0] ); jamp_sv[4] -= amp_sv[0]; jamp_sv[7] += amp_sv[0]; jamp_sv[10] -= amp_sv[0]; jamp_sv[18] += amp_sv[0]; - FFV1_0( w_fp[15], w_fp[2], w_fp[24], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[15], w_fp[2], w_fp[24], COUPs[1], 1.0, &_fp[0] ); jamp_sv[1] -= amp_sv[0]; jamp_sv[7] += amp_sv[0]; jamp_sv[18] += amp_sv[0]; @@ -2265,22 +2265,22 @@ namespace mg5amcCpu // *** DIAGRAM 120 OF 123 *** // Wavefunction(s) for diagram number 120 - VVVV1P0_1( w_fp[0], w_fp[4], w_fp[5], COUPs[2], 0., 0., w_fp[24] ); - VVVV3P0_1( w_fp[0], w_fp[4], w_fp[5], COUPs[2], 0., 0., w_fp[15] ); - VVVV4P0_1( w_fp[0], w_fp[4], w_fp[5], COUPs[2], 0., 0., w_fp[13] ); + VVVV1P0_1( w_fp[0], w_fp[4], w_fp[5], COUPs[2], 1.0, 0., 0., w_fp[24] ); + VVVV3P0_1( w_fp[0], w_fp[4], w_fp[5], COUPs[2], 1.0, 0., 0., w_fp[15] ); + VVVV4P0_1( w_fp[0], w_fp[4], w_fp[5], COUPs[2], 1.0, 0., 0., w_fp[13] ); // Amplitude(s) for diagram number 120 - FFV1_0( w_fp[3], w_fp[9], w_fp[24], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[9], w_fp[24], COUPs[1], 1.0, &_fp[0] ); jamp_sv[6] += amp_sv[0]; jamp_sv[7] -= amp_sv[0]; jamp_sv[9] -= amp_sv[0]; jamp_sv[11] += amp_sv[0]; - FFV1_0( w_fp[3], w_fp[9], w_fp[15], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[9], w_fp[15], COUPs[1], 1.0, &_fp[0] ); jamp_sv[7] -= amp_sv[0]; jamp_sv[8] += amp_sv[0]; jamp_sv[9] -= amp_sv[0]; jamp_sv[10] += amp_sv[0]; - FFV1_0( w_fp[3], w_fp[9], w_fp[13], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[9], w_fp[13], COUPs[1], 1.0, &_fp[0] ); jamp_sv[6] -= amp_sv[0]; jamp_sv[8] += amp_sv[0]; jamp_sv[10] += amp_sv[0]; @@ -2292,17 +2292,17 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 121 - FFV1_0( w_fp[16], w_fp[2], w_fp[24], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[16], w_fp[2], w_fp[24], COUPs[1], 1.0, &_fp[0] ); jamp_sv[3] += amp_sv[0]; jamp_sv[5] -= amp_sv[0]; jamp_sv[16] -= amp_sv[0]; jamp_sv[22] += amp_sv[0]; - FFV1_0( w_fp[16], w_fp[2], w_fp[15], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[16], w_fp[2], w_fp[15], COUPs[1], 1.0, &_fp[0] ); jamp_sv[5] -= amp_sv[0]; jamp_sv[13] += amp_sv[0]; jamp_sv[16] -= amp_sv[0]; jamp_sv[19] += amp_sv[0]; - FFV1_0( w_fp[16], w_fp[2], w_fp[13], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[16], w_fp[2], w_fp[13], COUPs[1], 1.0, &_fp[0] ); jamp_sv[3] -= amp_sv[0]; jamp_sv[13] += amp_sv[0]; jamp_sv[19] += amp_sv[0]; @@ -2314,7 +2314,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 122 - VVV1_0( w_fp[24], w_fp[1], w_fp[7], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[24], w_fp[1], w_fp[7], COUPs[0], 1.0, &_fp[0] ); jamp_sv[3] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[5] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[6] += cxtype( 0, 1 ) * amp_sv[0]; @@ -2323,7 +2323,7 @@ namespace mg5amcCpu jamp_sv[11] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[16] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[22] -= cxtype( 0, 1 ) * amp_sv[0]; - VVV1_0( w_fp[15], w_fp[1], w_fp[7], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[15], w_fp[1], w_fp[7], COUPs[0], 1.0, &_fp[0] ); jamp_sv[5] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[7] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[8] += cxtype( 0, 1 ) * amp_sv[0]; @@ -2332,7 +2332,7 @@ namespace mg5amcCpu jamp_sv[13] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[16] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[19] -= cxtype( 0, 1 ) * amp_sv[0]; - VVV1_0( w_fp[13], w_fp[1], w_fp[7], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[13], w_fp[1], w_fp[7], COUPs[0], 1.0, &_fp[0] ); jamp_sv[3] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[6] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[8] += cxtype( 0, 1 ) * amp_sv[0]; @@ -2348,7 +2348,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 123 - VVV1_0( w_fp[0], w_fp[17], w_fp[7], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[0], w_fp[17], w_fp[7], COUPs[0], 1.0, &_fp[0] ); jamp_sv[0] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[1] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[3] += cxtype( 0, 1 ) * amp_sv[0]; @@ -2357,7 +2357,7 @@ namespace mg5amcCpu jamp_sv[11] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[17] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[23] += cxtype( 0, 1 ) * amp_sv[0]; - VVV1_0( w_fp[0], w_fp[19], w_fp[7], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[0], w_fp[19], w_fp[7], COUPs[0], 1.0, &_fp[0] ); jamp_sv[1] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[2] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[3] += cxtype( 0, 1 ) * amp_sv[0]; @@ -2366,7 +2366,7 @@ namespace mg5amcCpu jamp_sv[15] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[17] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[21] += cxtype( 0, 1 ) * amp_sv[0]; - VVV1_0( w_fp[0], w_fp[8], w_fp[7], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[0], w_fp[8], w_fp[7], COUPs[0], 1.0, &_fp[0] ); jamp_sv[0] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[2] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[4] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -2966,8 +2966,7 @@ namespace mg5amcCpu { // nprocesses>1 was last observed for "mirror processes" in uux_ttx in the 270 branch (see issue #343 and PRs #360 and #396) constexpr int nprocesses = 1; - static_assert( nprocesses == 1, "Assume nprocesses == 1" ); - // process_id corresponds to the index of DSIG1 Fortran functions (must be 1 because cudacpp is unable to handle DSIG2) + static_assert( nprocesses == 1 || nprocesses == 2, "Assume nprocesses == 1 or 2" ); constexpr int process_id = 1; // code generation source: madevent + cudacpp exporter static_assert( process_id == 1, "Assume process_id == 1" ); } diff --git a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/P1_gg_ttxgg/auto_dsig1.f b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/P1_gg_ttxgg/auto_dsig1.f index d12d34daf6..0fa6436690 100644 --- a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/P1_gg_ttxgg/auto_dsig1.f +++ b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/P1_gg_ttxgg/auto_dsig1.f @@ -39,6 +39,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C LOCAL VARIABLES C INTEGER I,ITYPE,LP,IPROC + DOUBLE PRECISION QSCALE DOUBLE PRECISION G1 DOUBLE PRECISION G2 DOUBLE PRECISION XPQ(-7:7),PD(0:MAXPROC) @@ -126,11 +127,24 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) IF (ABS(LPP(IB(1))).GE.1) THEN !LP=SIGN(1,LPP(IB(1))) - G1=PDG2PDF(LPP(IB(1)),0, IB(1),XBK(IB(1)),DSQRT(Q2FACT(IB(1)))) + IF (DSQRT(Q2FACT(IB(1))).EQ.0D0) THEN + QSCALE=0D0 + DO I=3,NEXTERNAL + QSCALE=QSCALE+DSQRT(MAX(0D0,(PP(0,I)+PP(3,I))*(PP(0,I) + $ -PP(3,I)))) + ENDDO + QSCALE=QSCALE/2D0 + ELSE + QSCALE=DSQRT(Q2FACT(IB(1))) + ENDIF + G1=PDG2PDF(LPP(IB(1)),0, IB(1),XBK(IB(1)), QSCALE) ENDIF IF (ABS(LPP(IB(2))).GE.1) THEN !LP=SIGN(1,LPP(IB(2))) - G2=PDG2PDF(LPP(IB(2)),0, IB(2),XBK(IB(2)),DSQRT(Q2FACT(IB(2)))) + IF (DSQRT(Q2FACT(IB(2))).NE.0D0) THEN + QSCALE=DSQRT(Q2FACT(IB(2))) + ENDIF + G2=PDG2PDF(LPP(IB(2)),0, IB(2),XBK(IB(2)), QSCALE) ENDIF PD(0) = 0D0 IPROC = 0 diff --git a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/P1_gg_ttxgg/matrix1.f b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/P1_gg_ttxgg/matrix1.f index cdf77037f6..4a821fd44d 100644 --- a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/P1_gg_ttxgg/matrix1.f +++ b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/P1_gg_ttxgg/matrix1.f @@ -391,7 +391,7 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C LOCAL VARIABLES C INTEGER I,J,M,N - COMPLEX*16 ZTEMP, TMP_JAMP(163) + COMPLEX*16 ZTEMP, TMP_JAMP(155) REAL*8 CF(NCOLOR,NCOLOR) COMPLEX*16 AMP(NGRAPHS), JAMP(NCOLOR,NAMPSO) COMPLEX*16 W(6,NWAVEFUNCS) @@ -1218,362 +1218,318 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) TMP_JAMP(3) = AMP(84) + AMP(86) ! used 8 times TMP_JAMP(2) = AMP(81) - AMP(83) ! used 8 times TMP_JAMP(1) = AMP(82) + AMP(85) ! used 8 times - TMP_JAMP(30) = TMP_JAMP(11) + AMP(121) ! used 8 times - TMP_JAMP(29) = TMP_JAMP(12) - AMP(132) ! used 8 times + TMP_JAMP(30) = TMP_JAMP(15) - AMP(157) ! used 8 times + TMP_JAMP(29) = TMP_JAMP(14) + AMP(159) ! used 8 times TMP_JAMP(28) = TMP_JAMP(13) + AMP(130) ! used 8 times - TMP_JAMP(27) = TMP_JAMP(14) + AMP(159) ! used 8 times - TMP_JAMP(26) = TMP_JAMP(15) - AMP(157) ! used 8 times - TMP_JAMP(25) = TMP_JAMP(8) - AMP(131) ! used 8 times + TMP_JAMP(27) = TMP_JAMP(12) - AMP(132) ! used 8 times + TMP_JAMP(26) = TMP_JAMP(11) + AMP(121) ! used 8 times + TMP_JAMP(25) = TMP_JAMP(10) + AMP(154) ! used 8 times TMP_JAMP(24) = TMP_JAMP(9) - AMP(156) ! used 8 times - TMP_JAMP(23) = TMP_JAMP(10) + AMP(154) ! used 8 times - TMP_JAMP(22) = TMP_JAMP(6) + AMP(114) ! used 8 times - TMP_JAMP(21) = TMP_JAMP(7) + AMP(158) ! used 8 times - TMP_JAMP(20) = TMP_JAMP(4) - AMP(141) ! used 8 times - TMP_JAMP(19) = TMP_JAMP(5) + AMP(139) ! used 8 times - TMP_JAMP(18) = TMP_JAMP(2) + AMP(105) ! used 8 times - TMP_JAMP(17) = TMP_JAMP(3) - AMP(155) ! used 8 times + TMP_JAMP(23) = TMP_JAMP(8) - AMP(131) ! used 8 times + TMP_JAMP(22) = TMP_JAMP(7) + AMP(158) ! used 8 times + TMP_JAMP(21) = TMP_JAMP(6) + AMP(114) ! used 8 times + TMP_JAMP(20) = TMP_JAMP(5) + AMP(139) ! used 8 times + TMP_JAMP(19) = TMP_JAMP(4) - AMP(141) ! used 8 times + TMP_JAMP(18) = TMP_JAMP(3) - AMP(155) ! used 8 times + TMP_JAMP(17) = TMP_JAMP(2) + AMP(105) ! used 8 times TMP_JAMP(16) = TMP_JAMP(1) - AMP(140) ! used 8 times - TMP_JAMP(90) = AMP(108) + AMP(133) ! used 4 times - TMP_JAMP(89) = AMP(51) + AMP(52) ! used 4 times - TMP_JAMP(88) = AMP(40) - AMP(54) ! used 4 times - TMP_JAMP(87) = AMP(11) - AMP(135) ! used 4 times - TMP_JAMP(86) = TMP_JAMP(26) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(51) ! used 4 times - TMP_JAMP(85) = TMP_JAMP(28) + TMP_JAMP(27) ! used 4 times - TMP_JAMP(84) = TMP_JAMP(29) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(11) ! used 4 times - TMP_JAMP(83) = TMP_JAMP(30) + TMP_JAMP(29) ! used 4 times - TMP_JAMP(82) = AMP(102) + AMP(151) ! used 4 times - TMP_JAMP(81) = AMP(69) - AMP(134) ! used 4 times - TMP_JAMP(80) = AMP(59) - AMP(153) ! used 4 times - TMP_JAMP(79) = TMP_JAMP(23) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(102) ! used 4 times - TMP_JAMP(78) = TMP_JAMP(24) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(59) ! used 4 times - TMP_JAMP(77) = TMP_JAMP(25) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(69) ! used 4 times - TMP_JAMP(76) = TMP_JAMP(29) + TMP_JAMP(25) ! used 4 times - TMP_JAMP(75) = TMP_JAMP(30) - TMP_JAMP(23) ! used 4 times - TMP_JAMP(74) = AMP(43) - AMP(53) ! used 4 times - TMP_JAMP(73) = TMP_JAMP(21) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(43) ! used 4 times - TMP_JAMP(72) = TMP_JAMP(22) + ((0.000000000000000D+00, + TMP_JAMP(80) = TMP_JAMP(30) + TMP_JAMP(29) ! used 4 times + TMP_JAMP(79) = TMP_JAMP(30) - TMP_JAMP(22) ! used 4 times + TMP_JAMP(78) = TMP_JAMP(29) + TMP_JAMP(22) ! used 4 times + TMP_JAMP(77) = TMP_JAMP(28) + TMP_JAMP(27) ! used 4 times + TMP_JAMP(76) = TMP_JAMP(28) - TMP_JAMP(23) ! used 4 times + TMP_JAMP(75) = TMP_JAMP(27) + TMP_JAMP(23) ! used 4 times + TMP_JAMP(74) = TMP_JAMP(27) + TMP_JAMP(19) ! used 4 times + TMP_JAMP(73) = TMP_JAMP(26) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(18) ! used 4 times + TMP_JAMP(72) = TMP_JAMP(26) - TMP_JAMP(25) ! used 4 times + TMP_JAMP(71) = TMP_JAMP(26) - TMP_JAMP(19) ! used 4 times + TMP_JAMP(70) = TMP_JAMP(26) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(17) ! used 4 times + TMP_JAMP(69) = TMP_JAMP(25) + TMP_JAMP(24) ! used 4 times + TMP_JAMP(68) = TMP_JAMP(25) - TMP_JAMP(18) ! used 4 times + TMP_JAMP(67) = TMP_JAMP(24) - TMP_JAMP(23) ! used 4 times + TMP_JAMP(66) = TMP_JAMP(24) + TMP_JAMP(18) ! used 4 times + TMP_JAMP(65) = TMP_JAMP(22) + TMP_JAMP(20) ! used 4 times + TMP_JAMP(64) = TMP_JAMP(21) + ((0.000000000000000D+00, $ -1.000000000000000D+00)) * AMP(62) ! used 4 times - TMP_JAMP(71) = TMP_JAMP(22) + TMP_JAMP(21) ! used 4 times - TMP_JAMP(70) = TMP_JAMP(27) + TMP_JAMP(21) ! used 4 times - TMP_JAMP(69) = TMP_JAMP(28) - TMP_JAMP(25) ! used 4 times - TMP_JAMP(68) = AMP(119) + AMP(145) ! used 4 times - TMP_JAMP(67) = AMP(14) - AMP(147) ! used 4 times - TMP_JAMP(66) = TMP_JAMP(20) + TMP_JAMP(19) ! used 4 times - TMP_JAMP(65) = TMP_JAMP(22) - TMP_JAMP(19) ! used 4 times - TMP_JAMP(64) = TMP_JAMP(29) + TMP_JAMP(20) ! used 4 times - TMP_JAMP(63) = AMP(77) - AMP(152) ! used 4 times - TMP_JAMP(62) = TMP_JAMP(17) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(77) ! used 4 times - TMP_JAMP(61) = TMP_JAMP(18) + ((-0.000000000000000D+00 + TMP_JAMP(63) = TMP_JAMP(21) - TMP_JAMP(20) ! used 4 times + TMP_JAMP(62) = TMP_JAMP(21) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(61) ! used 4 times + TMP_JAMP(61) = TMP_JAMP(20) + TMP_JAMP(19) ! used 4 times + TMP_JAMP(60) = TMP_JAMP(20) - TMP_JAMP(16) ! used 4 times + TMP_JAMP(59) = TMP_JAMP(19) + TMP_JAMP(16) ! used 4 times + TMP_JAMP(58) = TMP_JAMP(18) - TMP_JAMP(16) ! used 4 times + TMP_JAMP(57) = TMP_JAMP(17) + ((-0.000000000000000D+00 $ ,1.000000000000000D+00)) * AMP(79) ! used 4 times - TMP_JAMP(60) = TMP_JAMP(24) + TMP_JAMP(17) ! used 4 times - TMP_JAMP(59) = TMP_JAMP(28) - TMP_JAMP(18) ! used 4 times - TMP_JAMP(58) = AMP(89) - AMP(146) ! used 4 times - TMP_JAMP(57) = TMP_JAMP(20) + TMP_JAMP(16) ! used 4 times - TMP_JAMP(56) = AMP(117) + AMP(142) ! used 4 times - TMP_JAMP(55) = AMP(8) - AMP(144) ! used 4 times - TMP_JAMP(54) = TMP_JAMP(19) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(117) ! used 4 times - TMP_JAMP(53) = TMP_JAMP(20) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(8) ! used 4 times - TMP_JAMP(52) = TMP_JAMP(26) - TMP_JAMP(21) ! used 4 times - TMP_JAMP(51) = TMP_JAMP(30) - TMP_JAMP(20) ! used 4 times - TMP_JAMP(50) = AMP(87) - AMP(143) ! used 4 times - TMP_JAMP(49) = TMP_JAMP(16) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(87) ! used 4 times - TMP_JAMP(48) = TMP_JAMP(23) - TMP_JAMP(17) ! used 4 times - TMP_JAMP(47) = TMP_JAMP(18) + ((0.000000000000000D+00, + TMP_JAMP(56) = TMP_JAMP(17) - TMP_JAMP(16) ! used 4 times + TMP_JAMP(55) = TMP_JAMP(17) + ((0.000000000000000D+00, $ -1.000000000000000D+00)) * AMP(80) ! used 4 times - TMP_JAMP(46) = TMP_JAMP(19) - TMP_JAMP(16) ! used 4 times - TMP_JAMP(45) = TMP_JAMP(27) + TMP_JAMP(18) ! used 4 times - TMP_JAMP(44) = TMP_JAMP(28) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(110) ! used 4 times - TMP_JAMP(43) = TMP_JAMP(29) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(16) ! used 4 times - TMP_JAMP(42) = TMP_JAMP(22) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(61) ! used 4 times - TMP_JAMP(41) = TMP_JAMP(24) - TMP_JAMP(22) ! used 4 times - TMP_JAMP(40) = TMP_JAMP(25) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(71) ! used 4 times - TMP_JAMP(39) = AMP(96) + AMP(148) ! used 4 times - TMP_JAMP(38) = TMP_JAMP(23) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(96) ! used 4 times - TMP_JAMP(37) = TMP_JAMP(24) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(56) ! used 4 times - TMP_JAMP(36) = TMP_JAMP(26) + TMP_JAMP(23) ! used 4 times - TMP_JAMP(35) = TMP_JAMP(17) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(74) ! used 4 times - TMP_JAMP(34) = TMP_JAMP(30) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(17) ! used 4 times - TMP_JAMP(33) = TMP_JAMP(26) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(33) ! used 4 times - TMP_JAMP(32) = TMP_JAMP(27) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(22) ! used 4 times - TMP_JAMP(31) = TMP_JAMP(21) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(25) ! used 4 times - TMP_JAMP(98) = TMP_JAMP(43) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(138) ! used 4 times - TMP_JAMP(97) = TMP_JAMP(44) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(136) ! used 4 times - TMP_JAMP(96) = TMP_JAMP(40) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(137) ! used 4 times - TMP_JAMP(95) = TMP_JAMP(37) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(150) ! used 4 times - TMP_JAMP(94) = TMP_JAMP(35) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(149) ! used 4 times - TMP_JAMP(93) = TMP_JAMP(32) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(36) ! used 4 times - TMP_JAMP(92) = TMP_JAMP(33) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(34) ! used 4 times - TMP_JAMP(91) = TMP_JAMP(31) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(35) ! used 4 times - TMP_JAMP(151) = AMP(18) + ((0.000000000000000D+00, + TMP_JAMP(54) = AMP(108) + AMP(133) ! used 4 times + TMP_JAMP(53) = AMP(51) + AMP(52) ! used 4 times + TMP_JAMP(52) = AMP(40) - AMP(54) ! used 4 times + TMP_JAMP(51) = AMP(11) - AMP(135) ! used 4 times + TMP_JAMP(50) = AMP(102) + AMP(151) ! used 4 times + TMP_JAMP(49) = AMP(69) - AMP(134) ! used 4 times + TMP_JAMP(48) = AMP(59) - AMP(153) ! used 4 times + TMP_JAMP(47) = AMP(43) - AMP(53) ! used 4 times + TMP_JAMP(46) = AMP(119) + AMP(145) ! used 4 times + TMP_JAMP(45) = AMP(14) - AMP(147) ! used 4 times + TMP_JAMP(44) = AMP(77) - AMP(152) ! used 4 times + TMP_JAMP(43) = AMP(89) - AMP(146) ! used 4 times + TMP_JAMP(42) = AMP(117) + AMP(142) ! used 4 times + TMP_JAMP(41) = AMP(8) - AMP(144) ! used 4 times + TMP_JAMP(40) = AMP(87) - AMP(143) ! used 4 times + TMP_JAMP(39) = AMP(110) + AMP(136) ! used 4 times + TMP_JAMP(38) = AMP(16) - AMP(138) ! used 4 times + TMP_JAMP(37) = AMP(71) - AMP(137) ! used 4 times + TMP_JAMP(36) = AMP(96) + AMP(148) ! used 4 times + TMP_JAMP(35) = AMP(56) - AMP(150) ! used 4 times + TMP_JAMP(34) = AMP(74) - AMP(149) ! used 4 times + TMP_JAMP(33) = AMP(33) + AMP(34) ! used 4 times + TMP_JAMP(32) = AMP(22) - AMP(36) ! used 4 times + TMP_JAMP(31) = AMP(25) - AMP(35) ! used 4 times + TMP_JAMP(142) = TMP_JAMP(80) + TMP_JAMP(77) ! used 2 times + TMP_JAMP(141) = TMP_JAMP(80) + TMP_JAMP(68) ! used 2 times + TMP_JAMP(140) = TMP_JAMP(79) - TMP_JAMP(61) ! used 2 times + TMP_JAMP(139) = TMP_JAMP(79) + TMP_JAMP(69) ! used 2 times + TMP_JAMP(138) = TMP_JAMP(78) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(47) ! used 2 times + TMP_JAMP(137) = TMP_JAMP(77) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(39) ! used 2 times + TMP_JAMP(136) = TMP_JAMP(76) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(54) ! used 2 times + TMP_JAMP(135) = TMP_JAMP(76) + TMP_JAMP(66) ! used 2 times + TMP_JAMP(134) = TMP_JAMP(76) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(39) ! used 2 times + TMP_JAMP(133) = TMP_JAMP(75) + TMP_JAMP(61) ! used 2 times + TMP_JAMP(132) = TMP_JAMP(73) + AMP(50) ! used 2 times + TMP_JAMP(131) = TMP_JAMP(70) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(36) ! used 2 times + TMP_JAMP(130) = TMP_JAMP(67) - TMP_JAMP(27) ! used 2 times + TMP_JAMP(129) = TMP_JAMP(61) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(46) ! used 2 times + TMP_JAMP(128) = TMP_JAMP(61) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(41) ! used 2 times + TMP_JAMP(127) = TMP_JAMP(58) - TMP_JAMP(25) ! used 2 times + TMP_JAMP(126) = TMP_JAMP(58) + TMP_JAMP(24) ! used 2 times + TMP_JAMP(125) = TMP_JAMP(58) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(43) ! used 2 times + TMP_JAMP(124) = TMP_JAMP(55) + AMP(111) ! used 2 times + TMP_JAMP(123) = TMP_JAMP(54) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(109) ! used 2 times + TMP_JAMP(122) = TMP_JAMP(53) + ((0.000000000000000D+00, $ -1.000000000000000D+00)) * AMP(50) ! used 2 times - TMP_JAMP(150) = TMP_JAMP(87) + ((0.000000000000000D+00, + TMP_JAMP(121) = TMP_JAMP(53) - TMP_JAMP(47) ! used 2 times + TMP_JAMP(120) = TMP_JAMP(52) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(42) ! used 2 times + TMP_JAMP(119) = TMP_JAMP(52) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(41) ! used 2 times + TMP_JAMP(118) = TMP_JAMP(51) + ((0.000000000000000D+00, $ -1.000000000000000D+00)) * AMP(10) ! used 2 times - TMP_JAMP(149) = TMP_JAMP(90) + TMP_JAMP(88) ! used 2 times - TMP_JAMP(148) = TMP_JAMP(82) - AMP(18) ! used 2 times - TMP_JAMP(147) = TMP_JAMP(74) + ((-0.000000000000000D+00 + TMP_JAMP(117) = TMP_JAMP(51) + TMP_JAMP(49) ! used 2 times + TMP_JAMP(116) = TMP_JAMP(51) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(12) ! used 2 times + TMP_JAMP(115) = TMP_JAMP(50) - TMP_JAMP(44) ! used 2 times + TMP_JAMP(114) = TMP_JAMP(49) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(70) ! used 2 times + TMP_JAMP(113) = TMP_JAMP(48) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(60) ! used 2 times + TMP_JAMP(112) = TMP_JAMP(48) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(58) ! used 2 times + TMP_JAMP(111) = TMP_JAMP(47) + ((-0.000000000000000D+00 $ ,1.000000000000000D+00)) * AMP(44) ! used 2 times - TMP_JAMP(146) = TMP_JAMP(68) + TMP_JAMP(67) ! used 2 times - TMP_JAMP(145) = TMP_JAMP(77) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(134) ! used 2 times - TMP_JAMP(144) = AMP(79) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(109) ! used 2 times - TMP_JAMP(143) = TMP_JAMP(63) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(76) ! used 2 times - TMP_JAMP(142) = TMP_JAMP(90) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(59) ! used 2 times - TMP_JAMP(141) = TMP_JAMP(67) + TMP_JAMP(58) ! used 2 times - TMP_JAMP(140) = AMP(7) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(18) ! used 2 times - TMP_JAMP(139) = TMP_JAMP(54) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(142) ! used 2 times - TMP_JAMP(138) = TMP_JAMP(55) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(51) ! used 2 times - TMP_JAMP(137) = TMP_JAMP(89) - TMP_JAMP(74) ! used 2 times - TMP_JAMP(136) = TMP_JAMP(49) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(143) ! used 2 times - TMP_JAMP(135) = TMP_JAMP(82) - TMP_JAMP(63) ! used 2 times - TMP_JAMP(134) = AMP(41) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(80) ! used 2 times - TMP_JAMP(133) = TMP_JAMP(56) - TMP_JAMP(50) ! used 2 times - TMP_JAMP(132) = TMP_JAMP(88) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(45) ! used 2 times - TMP_JAMP(131) = TMP_JAMP(47) + AMP(111) ! used 2 times - TMP_JAMP(130) = TMP_JAMP(53) - AMP(9) ! used 2 times - TMP_JAMP(129) = TMP_JAMP(98) + TMP_JAMP(97) ! used 2 times - TMP_JAMP(128) = AMP(58) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(61) ! used 2 times - TMP_JAMP(127) = TMP_JAMP(80) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(41) ! used 2 times - TMP_JAMP(126) = TMP_JAMP(42) - AMP(72) ! used 2 times - TMP_JAMP(125) = TMP_JAMP(96) - TMP_JAMP(42) ! used 2 times - TMP_JAMP(124) = TMP_JAMP(98) + TMP_JAMP(96) ! used 2 times - TMP_JAMP(123) = TMP_JAMP(36) - AMP(39) ! used 2 times - TMP_JAMP(122) = TMP_JAMP(89) - TMP_JAMP(39) ! used 2 times - TMP_JAMP(121) = TMP_JAMP(95) - AMP(55) ! used 2 times - TMP_JAMP(120) = TMP_JAMP(58) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(46) ! used 2 times - TMP_JAMP(119) = TMP_JAMP(68) - TMP_JAMP(58) ! used 2 times - TMP_JAMP(118) = TMP_JAMP(94) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(58) ! used 2 times - TMP_JAMP(117) = TMP_JAMP(95) + TMP_JAMP(94) ! used 2 times - TMP_JAMP(116) = TMP_JAMP(94) - AMP(73) ! used 2 times - TMP_JAMP(115) = TMP_JAMP(95) + AMP(57) ! used 2 times - TMP_JAMP(114) = TMP_JAMP(96) - TMP_JAMP(95) ! used 2 times - TMP_JAMP(113) = TMP_JAMP(97) - TMP_JAMP(96) ! used 2 times - TMP_JAMP(112) = TMP_JAMP(38) + AMP(95) ! used 2 times - TMP_JAMP(111) = TMP_JAMP(67) + ((-0.000000000000000D+00 + TMP_JAMP(110) = TMP_JAMP(46) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(120) ! used 2 times + TMP_JAMP(109) = TMP_JAMP(46) - TMP_JAMP(43) ! used 2 times + TMP_JAMP(108) = TMP_JAMP(45) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(12) ! used 2 times + TMP_JAMP(107) = TMP_JAMP(45) + TMP_JAMP(43) ! used 2 times + TMP_JAMP(106) = TMP_JAMP(45) + ((-0.000000000000000D+00 $ ,1.000000000000000D+00)) * AMP(13) ! used 2 times - TMP_JAMP(110) = TMP_JAMP(67) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(34) ! used 2 times - TMP_JAMP(109) = TMP_JAMP(98) + AMP(15) ! used 2 times - TMP_JAMP(108) = TMP_JAMP(98) + TMP_JAMP(34) ! used 2 times - TMP_JAMP(107) = TMP_JAMP(61) - AMP(23) ! used 2 times - TMP_JAMP(106) = TMP_JAMP(93) + TMP_JAMP(92) ! used 2 times - TMP_JAMP(105) = TMP_JAMP(68) + ((-0.000000000000000D+00 + TMP_JAMP(105) = TMP_JAMP(44) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(76) ! used 2 times + TMP_JAMP(104) = TMP_JAMP(42) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(45) ! used 2 times + TMP_JAMP(103) = TMP_JAMP(42) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(118) ! used 2 times + TMP_JAMP(102) = TMP_JAMP(41) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(7) ! used 2 times + TMP_JAMP(101) = TMP_JAMP(40) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(78) ! used 2 times + TMP_JAMP(100) = TMP_JAMP(40) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(88) ! used 2 times + TMP_JAMP(99) = TMP_JAMP(39) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(111) ! used 2 times + TMP_JAMP(98) = TMP_JAMP(39) - TMP_JAMP(37) ! used 2 times + TMP_JAMP(97) = TMP_JAMP(38) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(9) ! used 2 times + TMP_JAMP(96) = TMP_JAMP(38) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(15) ! used 2 times + TMP_JAMP(95) = TMP_JAMP(37) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(72) ! used 2 times + TMP_JAMP(94) = TMP_JAMP(36) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(39) ! used 2 times + TMP_JAMP(93) = TMP_JAMP(35) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(55) ! used 2 times + TMP_JAMP(92) = TMP_JAMP(35) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(57) ! used 2 times + TMP_JAMP(91) = TMP_JAMP(34) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(75) ! used 2 times + TMP_JAMP(90) = TMP_JAMP(34) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(73) ! used 2 times + TMP_JAMP(89) = TMP_JAMP(33) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(21) ! used 2 times + TMP_JAMP(88) = TMP_JAMP(33) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(32) ! used 2 times + TMP_JAMP(87) = TMP_JAMP(32) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(23) ! used 2 times + TMP_JAMP(86) = TMP_JAMP(32) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(24) ! used 2 times + TMP_JAMP(85) = TMP_JAMP(31) + ((-0.000000000000000D+00 $ ,1.000000000000000D+00)) * AMP(27) ! used 2 times - TMP_JAMP(104) = TMP_JAMP(91) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(68) ! used 2 times - TMP_JAMP(103) = TMP_JAMP(93) + TMP_JAMP(91) ! used 2 times - TMP_JAMP(102) = TMP_JAMP(91) - AMP(26) ! used 2 times - TMP_JAMP(101) = TMP_JAMP(92) - TMP_JAMP(91) ! used 2 times - TMP_JAMP(100) = TMP_JAMP(97) + TMP_JAMP(93) ! used 2 times - TMP_JAMP(99) = TMP_JAMP(92) + TMP_JAMP(34) ! used 2 times - TMP_JAMP(163) = TMP_JAMP(149) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(42) ! used 2 times - TMP_JAMP(162) = TMP_JAMP(144) - TMP_JAMP(142) ! used 2 times - TMP_JAMP(161) = TMP_JAMP(140) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(138) ! used 2 times - TMP_JAMP(160) = TMP_JAMP(135) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(48) ! used 2 times - TMP_JAMP(159) = TMP_JAMP(133) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(46) ! used 2 times - TMP_JAMP(158) = TMP_JAMP(134) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(132) ! used 2 times - TMP_JAMP(157) = TMP_JAMP(130) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(144) ! used 2 times - TMP_JAMP(156) = TMP_JAMP(128) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(127) ! used 2 times - TMP_JAMP(155) = TMP_JAMP(123) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(122) ! used 2 times - TMP_JAMP(154) = TMP_JAMP(112) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(148) ! used 2 times - TMP_JAMP(153) = TMP_JAMP(100) + AMP(24) ! used 2 times - TMP_JAMP(152) = TMP_JAMP(99) + AMP(32) ! used 2 times + TMP_JAMP(84) = TMP_JAMP(31) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(26) ! used 2 times + TMP_JAMP(83) = TMP_JAMP(25) + AMP(95) ! used 2 times + TMP_JAMP(82) = AMP(18) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(101) ! used 2 times + TMP_JAMP(81) = AMP(79) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(90) ! used 2 times + TMP_JAMP(155) = TMP_JAMP(131) - TMP_JAMP(83) ! used 2 times + TMP_JAMP(154) = TMP_JAMP(119) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(55) ! used 2 times + TMP_JAMP(153) = TMP_JAMP(114) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(64) ! used 2 times + TMP_JAMP(152) = TMP_JAMP(111) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(64) ! used 2 times + TMP_JAMP(151) = TMP_JAMP(105) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(57) ! used 2 times + TMP_JAMP(150) = TMP_JAMP(103) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(62) ! used 2 times + TMP_JAMP(149) = TMP_JAMP(100) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(55) ! used 2 times + TMP_JAMP(148) = TMP_JAMP(95) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(62) ! used 2 times + TMP_JAMP(147) = TMP_JAMP(94) - TMP_JAMP(53) ! used 2 times + TMP_JAMP(146) = TMP_JAMP(89) - TMP_JAMP(50) ! used 2 times + TMP_JAMP(145) = TMP_JAMP(88) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(70) ! used 2 times + TMP_JAMP(144) = TMP_JAMP(84) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(62) ! used 2 times + TMP_JAMP(143) = TMP_JAMP(81) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(56) ! used 2 times JAMP(1,1) = (-1.000000000000000D+00)*AMP(30) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(109) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(152) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(153) - JAMP(2,1) = ((0.000000000000000D+00,1.000000000000000D+00)) - $ *AMP(27)+(-1.000000000000000D+00)*AMP(28)+((0.000000000000000D - $ +00,1.000000000000000D+00))*TMP_JAMP(66)+((0.000000000000000D - $ +00,1.000000000000000D+00))*TMP_JAMP(104)+TMP_JAMP(111) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(152) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(80) + $ +TMP_JAMP(86)+TMP_JAMP(96)+((0.000000000000000D+00 + $ ,1.000000000000000D+00))*TMP_JAMP(137)+TMP_JAMP(145) + JAMP(2,1) = (-1.000000000000000D+00)*AMP(28) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(79) + $ +TMP_JAMP(85)+TMP_JAMP(106)+((0.000000000000000D+00 + $ ,1.000000000000000D+00))*TMP_JAMP(129)+(-1.000000000000000D+00) + $ *TMP_JAMP(145) JAMP(3,1) = (-1.000000000000000D+00)*AMP(31) - $ +((0.000000000000000D+00,1.000000000000000D+00))*AMP(72) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(102) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(125) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(153) - JAMP(4,1) = (-1.000000000000000D+00)*AMP(19) - $ +((0.000000000000000D+00,1.000000000000000D+00))*AMP(21) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*AMP(26) - $ +AMP(151)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(79)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(101)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(156) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(78) + $ +(-1.000000000000000D+00)*TMP_JAMP(86)+TMP_JAMP(95) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(134) + $ +(-1.000000000000000D+00)*TMP_JAMP(144) + JAMP(4,1) = (-1.000000000000000D+00)*AMP(19)+TMP_JAMP(112) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(139) + $ +TMP_JAMP(144)+(-1.000000000000000D+00)*TMP_JAMP(146) JAMP(5,1) = (-1.000000000000000D+00)*AMP(29) - $ +((0.000000000000000D+00,1.000000000000000D+00))*AMP(90) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(103) - $ +(-1.000000000000000D+00)*TMP_JAMP(105)+((0.000000000000000D+00 - $ ,-1.000000000000000D+00))*TMP_JAMP(107)+TMP_JAMP(120) - JAMP(6,1) = (-1.000000000000000D+00)*AMP(20) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*AMP(21) - $ +((0.000000000000000D+00,1.000000000000000D+00))*AMP(76) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(106) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(107) - $ +(-1.000000000000000D+00)*TMP_JAMP(160) - JAMP(7,1) = ((0.000000000000000D+00,-1.000000000000000D+00)) - $ *AMP(15)+((0.000000000000000D+00,1.000000000000000D+00))*AMP(57) - $ +(-1.000000000000000D+00)*AMP(93)+((0.000000000000000D+00, - $ -1.000000000000000D+00))*TMP_JAMP(108)+((0.000000000000000D+00, - $ -1.000000000000000D+00))*TMP_JAMP(114)+((0.000000000000000D+00 - $ ,1.000000000000000D+00))*TMP_JAMP(154) - JAMP(8,1) = ((0.000000000000000D+00,-1.000000000000000D+00)) - $ *AMP(13)+((0.000000000000000D+00,1.000000000000000D+00))*AMP(75) - $ +(-1.000000000000000D+00)*AMP(91)+((0.000000000000000D+00, - $ -1.000000000000000D+00))*TMP_JAMP(57)+(-1.000000000000000D+00) - $ *TMP_JAMP(110)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(118)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(154) - JAMP(9,1) = (-1.000000000000000D+00)*AMP(94) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(113) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(115) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(116) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(131) - JAMP(10,1) = (-1.000000000000000D+00)*AMP(38) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(116) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(155) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(158) - JAMP(11,1) = ((0.000000000000000D+00,1.000000000000000D+00)) - $ *AMP(55)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *AMP(75)+(-1.000000000000000D+00)*AMP(92)+((0.000000000000000D - $ +00,1.000000000000000D+00))*AMP(120)+((0.000000000000000D+00, - $ -1.000000000000000D+00))*TMP_JAMP(46)+((0.000000000000000D+00 - $ ,1.000000000000000D+00))*TMP_JAMP(72)+((0.000000000000000D+00, - $ -1.000000000000000D+00))*TMP_JAMP(117)+(-1.000000000000000D+00) - $ *TMP_JAMP(119) - JAMP(12,1) = (-1.000000000000000D+00)*AMP(37)+( - $ -1.000000000000000D+00)*AMP(62)+((0.000000000000000D+00, - $ -1.000000000000000D+00))*TMP_JAMP(71)+((0.000000000000000D+00 - $ ,1.000000000000000D+00))*TMP_JAMP(121)+TMP_JAMP(147) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(29) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(65) + $ +(-1.000000000000000D+00)*TMP_JAMP(85)+(-1.000000000000000D+00) + $ *TMP_JAMP(87)+(-1.000000000000000D+00)*TMP_JAMP(109) + $ +TMP_JAMP(143) + JAMP(6,1) = (-1.000000000000000D+00)*AMP(20)+TMP_JAMP(87) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(141) + $ +TMP_JAMP(146)+TMP_JAMP(151) + JAMP(7,1) = (-1.000000000000000D+00)*AMP(93)+( + $ -1.000000000000000D+00)*TMP_JAMP(37)+TMP_JAMP(92)+( + $ -1.000000000000000D+00)*TMP_JAMP(96)+((0.000000000000000D+00 + $ ,1.000000000000000D+00))*TMP_JAMP(130)+((0.000000000000000D+00, + $ -1.000000000000000D+00))*TMP_JAMP(155) + JAMP(8,1) = (-1.000000000000000D+00)*AMP(91) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(19) + $ +TMP_JAMP(91)+(-1.000000000000000D+00)*TMP_JAMP(106) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(125) $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(155) - JAMP(13,1) = ((0.000000000000000D+00,1.000000000000000D+00)) - $ *AMP(118)+(-1.000000000000000D+00)*AMP(126) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(124) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(126) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(139) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(157) - JAMP(14,1) = ((0.000000000000000D+00,1.000000000000000D+00)) - $ *AMP(78)+(-1.000000000000000D+00)*AMP(98)+((0.000000000000000D - $ +00,-1.000000000000000D+00))*AMP(118)+AMP(152) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(62) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(156) - $ +(-1.000000000000000D+00)*TMP_JAMP(159) - JAMP(15,1) = ((0.000000000000000D+00,1.000000000000000D+00)) - $ *AMP(88)+(-1.000000000000000D+00)*AMP(127)+((0.000000000000000D - $ +00,1.000000000000000D+00))*TMP_JAMP(129)+((0.000000000000000D - $ +00,-1.000000000000000D+00))*TMP_JAMP(131)+((0.000000000000000D - $ +00,1.000000000000000D+00))*TMP_JAMP(136)+((0.000000000000000D - $ +00,1.000000000000000D+00))*TMP_JAMP(157) - JAMP(16,1) = ((0.000000000000000D+00,1.000000000000000D+00)) - $ *AMP(45)+(-1.000000000000000D+00)*AMP(47)+AMP(53) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*AMP(88) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(73) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(158) - $ +(-1.000000000000000D+00)*TMP_JAMP(159) - JAMP(17,1) = ((0.000000000000000D+00,-1.000000000000000D+00)) - $ *AMP(78)+(-1.000000000000000D+00)*AMP(97)+((0.000000000000000D - $ +00,1.000000000000000D+00))*AMP(101)+((0.000000000000000D+00 - $ ,1.000000000000000D+00))*TMP_JAMP(136)+(-1.000000000000000D+00) - $ *TMP_JAMP(160)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(161) - JAMP(18,1) = ((0.000000000000000D+00,-1.000000000000000D+00)) - $ *AMP(45)+(-1.000000000000000D+00)*AMP(46)+((0.000000000000000D - $ +00,1.000000000000000D+00))*AMP(50)+((0.000000000000000D+00 - $ ,1.000000000000000D+00))*TMP_JAMP(52)+(-1.000000000000000D+00) - $ *TMP_JAMP(137)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(139)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(161) - JAMP(19,1) = ((0.000000000000000D+00,1.000000000000000D+00)) - $ *AMP(12)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *AMP(90)+(-1.000000000000000D+00)*AMP(128)+(-1.000000000000000D - $ +00)*AMP(135)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(57)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(84)+(-1.000000000000000D+00)*TMP_JAMP(141)+( - $ -1.000000000000000D+00)*TMP_JAMP(162) - JAMP(20,1) = ((0.000000000000000D+00,1.000000000000000D+00)) - $ *AMP(60)+(-1.000000000000000D+00)*AMP(100)+((0.000000000000000D - $ +00,1.000000000000000D+00))*TMP_JAMP(60)+(-1.000000000000000D - $ +00)*TMP_JAMP(80)+(-1.000000000000000D+00)*TMP_JAMP(143) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(145) - $ +TMP_JAMP(162) - JAMP(21,1) = ((0.000000000000000D+00,-1.000000000000000D+00)) - $ *AMP(12)+(-1.000000000000000D+00)*AMP(62)+((0.000000000000000D - $ +00,1.000000000000000D+00))*AMP(70)+((0.000000000000000D+00, - $ -1.000000000000000D+00))*AMP(120)+(-1.000000000000000D+00) - $ *AMP(129)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(64)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(65)+(-1.000000000000000D+00)*TMP_JAMP(87) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(145) - $ +TMP_JAMP(146) + JAMP(9,1) = (-1.000000000000000D+00)*AMP(94)+( + $ -1.000000000000000D+00)*TMP_JAMP(90)+(-1.000000000000000D+00) + $ *TMP_JAMP(92)+(-1.000000000000000D+00)*TMP_JAMP(98) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(124) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(135) + JAMP(10,1) = (-1.000000000000000D+00)*AMP(38)+TMP_JAMP(90) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(141) + $ +(-1.000000000000000D+00)*TMP_JAMP(147)+TMP_JAMP(154) + JAMP(11,1) = AMP(62)+(-1.000000000000000D+00)*AMP(92) + $ +((0.000000000000000D+00,1.000000000000000D+00))*AMP(120) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(63)+( + $ -1.000000000000000D+00)*TMP_JAMP(91)+(-1.000000000000000D+00) + $ *TMP_JAMP(93)+(-1.000000000000000D+00)*TMP_JAMP(109) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(126) + JAMP(12,1) = (-1.000000000000000D+00)*AMP(37)+TMP_JAMP(93) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(139) + $ +TMP_JAMP(147)+TMP_JAMP(152) + JAMP(13,1) = (-1.000000000000000D+00)*AMP(126) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(75) + $ +(-1.000000000000000D+00)*TMP_JAMP(97)+TMP_JAMP(103) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(128) + $ +(-1.000000000000000D+00)*TMP_JAMP(148) + JAMP(14,1) = (-1.000000000000000D+00)*AMP(98) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(20)+( + $ -1.000000000000000D+00)*TMP_JAMP(44)+TMP_JAMP(101)+( + $ -1.000000000000000D+00)*TMP_JAMP(112)+((0.000000000000000D+00 + $ ,1.000000000000000D+00))*TMP_JAMP(126)+(-1.000000000000000D+00) + $ *TMP_JAMP(150) + JAMP(15,1) = (-1.000000000000000D+00)*AMP(127)+( + $ -1.000000000000000D+00)*TMP_JAMP(41)+((0.000000000000000D+00 + $ ,1.000000000000000D+00))*TMP_JAMP(59)+((0.000000000000000D+00 + $ ,1.000000000000000D+00))*TMP_JAMP(77)+TMP_JAMP(97)+TMP_JAMP(99) + $ +(-1.000000000000000D+00)*TMP_JAMP(149) + JAMP(16,1) = (-1.000000000000000D+00)*AMP(47) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(60)+( + $ -1.000000000000000D+00)*TMP_JAMP(104)+(-1.000000000000000D+00) + $ *TMP_JAMP(119)+((0.000000000000000D+00,1.000000000000000D+00)) + $ *TMP_JAMP(138)+TMP_JAMP(149) + JAMP(17,1) = (-1.000000000000000D+00)*AMP(97) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(71) + $ +TMP_JAMP(82)+(-1.000000000000000D+00)*TMP_JAMP(101)+( + $ -1.000000000000000D+00)*TMP_JAMP(102)+(-1.000000000000000D+00) + $ *TMP_JAMP(115)+((0.000000000000000D+00,-1.000000000000000D+00)) + $ *TMP_JAMP(127) + JAMP(18,1) = (-1.000000000000000D+00)*AMP(46)+TMP_JAMP(102) + $ +TMP_JAMP(104)+(-1.000000000000000D+00)*TMP_JAMP(121) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(132) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(140) + JAMP(19,1) = (-1.000000000000000D+00)*AMP(128) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(28) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(74) + $ +(-1.000000000000000D+00)*TMP_JAMP(107)+TMP_JAMP(116) + $ +TMP_JAMP(123)+(-1.000000000000000D+00)*TMP_JAMP(143) + JAMP(20,1) = (-1.000000000000000D+00)*AMP(100)+TMP_JAMP(49)+( + $ -1.000000000000000D+00)*TMP_JAMP(113)+(-1.000000000000000D+00) + $ *TMP_JAMP(123)+((0.000000000000000D+00,1.000000000000000D+00)) + $ *TMP_JAMP(135)+(-1.000000000000000D+00)*TMP_JAMP(151) + JAMP(21,1) = (-1.000000000000000D+00)*AMP(129)+( + $ -1.000000000000000D+00)*TMP_JAMP(51)+TMP_JAMP(108)+TMP_JAMP(110) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(133) + $ +(-1.000000000000000D+00)*TMP_JAMP(153) JAMP(22,1) = (-1.000000000000000D+00)*AMP(49) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*AMP(70) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(69) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(70) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(72) - $ +TMP_JAMP(81)+(-1.000000000000000D+00)*TMP_JAMP(147)+( - $ -1.000000000000000D+00)*TMP_JAMP(163) - JAMP(23,1) = ((0.000000000000000D+00,-1.000000000000000D+00)) - $ *AMP(60)+(-1.000000000000000D+00)*AMP(99)+((0.000000000000000D - $ +00,-1.000000000000000D+00))*AMP(101)+(-1.000000000000000D+00) - $ *AMP(153)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(75)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(76)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(78)+(-1.000000000000000D+00)*TMP_JAMP(81) - $ +TMP_JAMP(148)+(-1.000000000000000D+00)*TMP_JAMP(150) - JAMP(24,1) = (-1.000000000000000D+00)*AMP(48)+AMP(52) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(83) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(85) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(86) - $ +TMP_JAMP(150)+TMP_JAMP(151)+TMP_JAMP(163) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(78) + $ +TMP_JAMP(114)+(-1.000000000000000D+00)*TMP_JAMP(120) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(136) + $ +(-1.000000000000000D+00)*TMP_JAMP(152) + JAMP(23,1) = ((0.000000000000000D+00,1.000000000000000D+00)) + $ *AMP(10)+(-1.000000000000000D+00)*AMP(99)+TMP_JAMP(50) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(72)+( + $ -1.000000000000000D+00)*TMP_JAMP(82)+TMP_JAMP(113)+( + $ -1.000000000000000D+00)*TMP_JAMP(117)+((0.000000000000000D+00, + $ -1.000000000000000D+00))*TMP_JAMP(130) + JAMP(24,1) = (-1.000000000000000D+00)*AMP(48)+TMP_JAMP(54) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(73) + $ +TMP_JAMP(118)+TMP_JAMP(120)+TMP_JAMP(122)+((0.000000000000000D + $ +00,-1.000000000000000D+00))*TMP_JAMP(142) IF(INIT_MODE)THEN DO I=1, NGRAPHS diff --git a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/cudacpp.mk b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/cudacpp.mk index 43cee0977e..15669185ad 100644 --- a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/cudacpp.mk @@ -1,7 +1,7 @@ # Copyright (C) 2020-2023 CERN and UCLouvain. # Licensed under the GNU Lesser General Public License (version 3 or later). # Created by: S. Roiser (Feb 2020) for the MG5aMC CUDACPP plugin. -# Further modified by: O. Mattelaer, S. Roiser, A. Valassi (2020-2023) for the MG5aMC CUDACPP plugin. +# Further modified by: J. Teig, O. Mattelaer, S. Roiser, A. Valassi (2020-2023) for the MG5aMC CUDACPP plugin. #=== Determine the name of this makefile (https://ftp.gnu.org/old-gnu/Manuals/make-3.80/html_node/make_17.html) #=== NB: different names (e.g. cudacpp.mk and cudacpp_src.mk) are used in the Subprocess and src directories @@ -86,6 +86,14 @@ endif #------------------------------------------------------------------------------- +.DEFAULT_GOAL := usage + +# Target if user does not specify target +usage: + $(error Unknown target='$(MAKECMDGOALS)': only 'cppnone', 'cppsse4', 'cppavx2', 'cpp512y', 'cpp512z' and 'cuda' are supported!) + +#------------------------------------------------------------------------------- + #=== Configure the C++ compiler CXXFLAGS = $(OPTFLAGS) -std=c++17 $(INCFLAGS) -Wall -Wshadow -Wextra @@ -103,70 +111,73 @@ endif #------------------------------------------------------------------------------- -#=== Configure the CUDA compiler - -# If CXX is not a single word (example "clang++ --gcc-toolchain...") then disable CUDA builds (issue #505) -# This is because it is impossible to pass this to "CUFLAGS += -ccbin " below -ifneq ($(words $(subst ccache ,,$(CXX))),1) # allow at most "CXX=ccache " from outside - $(warning CUDA builds are not supported for multi-word CXX "$(CXX)") - override CUDA_HOME=disabled -endif - -# If CUDA_HOME is not set, try to set it from the location of nvcc -ifndef CUDA_HOME - CUDA_HOME = $(patsubst %bin/nvcc,%,$(shell which nvcc 2>/dev/null)) - $(warning CUDA_HOME was not set: using "$(CUDA_HOME)") -endif - -# Set NVCC as $(CUDA_HOME)/bin/nvcc if it exists -ifneq ($(wildcard $(CUDA_HOME)/bin/nvcc),) - NVCC = $(CUDA_HOME)/bin/nvcc - USE_NVTX ?=-DUSE_NVTX - # See https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html - # See https://arnon.dk/matching-sm-architectures-arch-and-gencode-for-various-nvidia-cards/ - # Default: use compute capability 70 for V100 (CERN lxbatch, CERN itscrd, Juwels Cluster). - # Embed device code for 70, and PTX for 70+. - # Export MADGRAPH_CUDA_ARCHITECTURE (comma-separated list) to use another value or list of values (see #533). - # Examples: use 60 for P100 (Piz Daint), 80 for A100 (Juwels Booster, NVidia raplab/Curiosity). - MADGRAPH_CUDA_ARCHITECTURE ?= 70 - ###CUARCHFLAGS = -gencode arch=compute_$(MADGRAPH_CUDA_ARCHITECTURE),code=compute_$(MADGRAPH_CUDA_ARCHITECTURE) -gencode arch=compute_$(MADGRAPH_CUDA_ARCHITECTURE),code=sm_$(MADGRAPH_CUDA_ARCHITECTURE) # Older implementation (AV): go back to this one for multi-GPU support #533 - ###CUARCHFLAGS = --gpu-architecture=compute_$(MADGRAPH_CUDA_ARCHITECTURE) --gpu-code=sm_$(MADGRAPH_CUDA_ARCHITECTURE),compute_$(MADGRAPH_CUDA_ARCHITECTURE) # Newer implementation (SH): cannot use this as-is for multi-GPU support #533 - comma:=, - CUARCHFLAGS = $(foreach arch,$(subst $(comma), ,$(MADGRAPH_CUDA_ARCHITECTURE)),-gencode arch=compute_$(arch),code=compute_$(arch) -gencode arch=compute_$(arch),code=sm_$(arch)) - CUINC = -I$(CUDA_HOME)/include/ - CURANDLIBFLAGS = -L$(CUDA_HOME)/lib64/ -lcurand # NB: -lcuda is not needed here! - CUOPTFLAGS = -lineinfo - CUFLAGS = $(foreach opt, $(OPTFLAGS), -Xcompiler $(opt)) $(CUOPTFLAGS) $(INCFLAGS) $(CUINC) $(USE_NVTX) $(CUARCHFLAGS) -use_fast_math - ###CUFLAGS += -Xcompiler -Wall -Xcompiler -Wextra -Xcompiler -Wshadow - ###NVCC_VERSION = $(shell $(NVCC) --version | grep 'Cuda compilation tools' | cut -d' ' -f5 | cut -d, -f1) - CUFLAGS += -std=c++17 # need CUDA >= 11.2 (see #333): this is enforced in mgOnGpuConfig.h - # Without -maxrregcount: baseline throughput: 6.5E8 (16384 32 12) up to 7.3E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 160 # improves throughput: 6.9E8 (16384 32 12) up to 7.7E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 128 # improves throughput: 7.3E8 (16384 32 12) up to 7.6E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 96 # degrades throughput: 4.1E8 (16384 32 12) up to 4.5E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 64 # degrades throughput: 1.7E8 (16384 32 12) flat at 1.7E8 (65536 128 12) -else ifneq ($(origin REQUIRE_CUDA),undefined) - # If REQUIRE_CUDA is set but no cuda is found, stop here (e.g. for CI tests on GPU #443) - $(error No cuda installation found (set CUDA_HOME or make nvcc visible in PATH)) -else - # No cuda. Switch cuda compilation off and go to common random numbers in C++ - $(warning CUDA_HOME is not set or is invalid: export CUDA_HOME to compile with cuda) - override NVCC= - override USE_NVTX= - override CUINC= - override CURANDLIBFLAGS= -endif -export NVCC -export CUFLAGS +#=== Configure the CUDA compiler for the CUDA target -# Set the host C++ compiler for nvcc via "-ccbin " -# (NB issue #505: this must be a single word, "clang++ --gcc-toolchain..." is not supported) -CUFLAGS += -ccbin $(shell which $(subst ccache ,,$(CXX))) +ifneq (,$(findstring $(MAKECMDGOALS),cuda-gcheck-runGcheck-runFGcheck-cmpFGcheck-memcheck)) + # If CXX is not a single word (example "clang++ --gcc-toolchain...") then disable CUDA builds (issue #505) + # This is because it is impossible to pass this to "CUFLAGS += -ccbin " below + ifneq ($(words $(subst ccache ,,$(CXX))),1) # allow at most "CXX=ccache " from outside + $(warning CUDA builds are not supported for multi-word CXX "$(CXX)") + override CUDA_HOME=disabled + endif -# Allow newer (unsupported) C++ compilers with older versions of CUDA if ALLOW_UNSUPPORTED_COMPILER_IN_CUDA is set (#504) -ifneq ($(origin ALLOW_UNSUPPORTED_COMPILER_IN_CUDA),undefined) -CUFLAGS += -allow-unsupported-compiler -endif + # If CUDA_HOME is not set, try to set it from the location of nvcc + ifndef CUDA_HOME + CUDA_HOME = $(patsubst %bin/nvcc,%,$(shell which nvcc 2>/dev/null)) + $(warning CUDA_HOME was not set: using "$(CUDA_HOME)") + endif + + # Set NVCC as $(CUDA_HOME)/bin/nvcc if it exists + ifneq ($(wildcard $(CUDA_HOME)/bin/nvcc),) + NVCC = $(CUDA_HOME)/bin/nvcc + USE_NVTX ?=-DUSE_NVTX + # See https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html + # See https://arnon.dk/matching-sm-architectures-arch-and-gencode-for-various-nvidia-cards/ + # Default: use compute capability 70 for V100 (CERN lxbatch, CERN itscrd, Juwels Cluster). + # Embed device code for 70, and PTX for 70+. + # Export MADGRAPH_CUDA_ARCHITECTURE (comma-separated list) to use another value or list of values (see #533). + # Examples: use 60 for P100 (Piz Daint), 80 for A100 (Juwels Booster, NVidia raplab/Curiosity). + MADGRAPH_CUDA_ARCHITECTURE ?= 70 + ###CUARCHFLAGS = -gencode arch=compute_$(MADGRAPH_CUDA_ARCHITECTURE),code=compute_$(MADGRAPH_CUDA_ARCHITECTURE) -gencode arch=compute_$(MADGRAPH_CUDA_ARCHITECTURE),code=sm_$(MADGRAPH_CUDA_ARCHITECTURE) # Older implementation (AV): go back to this one for multi-GPU support #533 + ###CUARCHFLAGS = --gpu-architecture=compute_$(MADGRAPH_CUDA_ARCHITECTURE) --gpu-code=sm_$(MADGRAPH_CUDA_ARCHITECTURE),compute_$(MADGRAPH_CUDA_ARCHITECTURE) # Newer implementation (SH): cannot use this as-is for multi-GPU support #533 + comma:=, + CUARCHFLAGS = $(foreach arch,$(subst $(comma), ,$(MADGRAPH_CUDA_ARCHITECTURE)),-gencode arch=compute_$(arch),code=compute_$(arch) -gencode arch=compute_$(arch),code=sm_$(arch)) + CUINC = -I$(CUDA_HOME)/include/ + CURANDLIBFLAGS = -L$(CUDA_HOME)/lib64/ -lcurand # NB: -lcuda is not needed here! + CUOPTFLAGS = -lineinfo + CUFLAGS = $(foreach opt, $(OPTFLAGS), -Xcompiler $(opt)) $(CUOPTFLAGS) $(INCFLAGS) $(CUINC) $(USE_NVTX) $(CUARCHFLAGS) -use_fast_math + ###CUFLAGS += -Xcompiler -Wall -Xcompiler -Wextra -Xcompiler -Wshadow + ###NVCC_VERSION = $(shell $(NVCC) --version | grep 'Cuda compilation tools' | cut -d' ' -f5 | cut -d, -f1) + CUFLAGS += -std=c++17 # need CUDA >= 11.2 (see #333): this is enforced in mgOnGpuConfig.h + # Without -maxrregcount: baseline throughput: 6.5E8 (16384 32 12) up to 7.3E8 (65536 128 12) + ###CUFLAGS+= --maxrregcount 160 # improves throughput: 6.9E8 (16384 32 12) up to 7.7E8 (65536 128 12) + ###CUFLAGS+= --maxrregcount 128 # improves throughput: 7.3E8 (16384 32 12) up to 7.6E8 (65536 128 12) + ###CUFLAGS+= --maxrregcount 96 # degrades throughput: 4.1E8 (16384 32 12) up to 4.5E8 (65536 128 12) + ###CUFLAGS+= --maxrregcount 64 # degrades throughput: 1.7E8 (16384 32 12) flat at 1.7E8 (65536 128 12) + else ifneq ($(origin REQUIRE_CUDA),undefined) + # If REQUIRE_CUDA is set but no cuda is found, stop here (e.g. for CI tests on GPU #443) + $(error No cuda installation found (set CUDA_HOME or make nvcc visible in PATH)) + else + # No cuda. Switch cuda compilation off and go to common random numbers in C++ + $(warning CUDA_HOME is not set or is invalid: export CUDA_HOME to compile with cuda) + override NVCC= + override USE_NVTX= + override CUINC= + override CURANDLIBFLAGS= + endif + export NVCC + export CUFLAGS + + # Set the host C++ compiler for nvcc via "-ccbin " + # (NB issue #505: this must be a single word, "clang++ --gcc-toolchain..." is not supported) + CUFLAGS += -ccbin $(shell which $(subst ccache ,,$(CXX))) + + # Allow newer (unsupported) C++ compilers with older versions of CUDA if ALLOW_UNSUPPORTED_COMPILER_IN_CUDA is set (#504) + ifneq ($(origin ALLOW_UNSUPPORTED_COMPILER_IN_CUDA),undefined) + CUFLAGS += -allow-unsupported-compiler + endif + +endif # ($(MAKECMDGOALS),cuda) #------------------------------------------------------------------------------- @@ -226,32 +237,6 @@ override OMPFLAGS = -fopenmp ###override OMPFLAGS = # disable OpenMP MT (default before #575) endif -# Set the default AVX (vectorization) choice -ifeq ($(AVX),) - ifeq ($(UNAME_P),ppc64le) - ###override AVX = none - override AVX = sse4 - else ifeq ($(UNAME_P),arm) - ###override AVX = none - override AVX = sse4 - else ifeq ($(wildcard /proc/cpuinfo),) - override AVX = none - $(warning Using AVX='$(AVX)' because host SIMD features cannot be read from /proc/cpuinfo) - else ifeq ($(shell grep -m1 -c avx512vl /proc/cpuinfo)$(shell $(CXX) --version | grep ^clang),1) - override AVX = 512y - ###$(info Using AVX='$(AVX)' as no user input exists) - else - override AVX = avx2 - ifneq ($(shell grep -m1 -c avx512vl /proc/cpuinfo),1) - $(warning Using AVX='$(AVX)' because host does not support avx512vl) - else - $(warning Using AVX='$(AVX)' because this is faster than avx512vl for clang) - endif - endif -else - ###$(info Using AVX='$(AVX)' according to user input) -endif - # Set the default FPTYPE (floating point type) choice ifeq ($(FPTYPE),) override FPTYPE = d @@ -276,6 +261,21 @@ ifeq ($(RNDGEN),) endif endif +# set the correct AVX based on avxcpp target +ifeq ($(MAKECMDGOALS),cppnone) # no SIMD + override AVX = none +else ifeq ($(MAKECMDGOALS),cppsse4) # SSE4.2 with 128 width (xmm registers) + override AVX = sse4 +else ifeq ($(MAKECMDGOALS),cppavx2) # AVX2 with 256 width (ymm registers) [DEFAULT for clang] + override AVX = avx2 +else ifeq ($(MAKECMDGOALS),cpp512y) # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] + override AVX = 512y +else ifeq ($(MAKECMDGOALS),cpp512z) # AVX512 with 512 width (zmm registers) + override AVX = 512z +else + override AVX = none +endif + # Export AVX, FPTYPE, HELINL, HRDCOD, RNDGEN, OMPFLAGS so that it is not necessary to pass them to the src Makefile too export AVX export FPTYPE @@ -295,50 +295,52 @@ CXXFLAGS += $(OMPFLAGS) # Set the build flags appropriate to each AVX choice (example: "make AVX=none") # [NB MGONGPU_PVW512 is needed because "-mprefer-vector-width=256" is not exposed in a macro] # [See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96476] -$(info AVX=$(AVX)) -ifeq ($(UNAME_P),ppc64le) - ifeq ($(AVX),sse4) - override AVXFLAGS = -D__SSE4_2__ # Power9 VSX with 128 width (VSR registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on PowerPC for the moment) - endif -else ifeq ($(UNAME_P),arm) - ifeq ($(AVX),sse4) - override AVXFLAGS = -D__SSE4_2__ # ARM NEON with 128 width (Q/quadword registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on ARM for the moment) - endif -else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 - ifeq ($(AVX),none) - override AVXFLAGS = -mno-sse3 # no SIMD - else ifeq ($(AVX),sse4) - override AVXFLAGS = -mno-avx # SSE4.2 with 128 width (xmm registers) - else ifeq ($(AVX),avx2) - override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(AVX),512y) - override AVXFLAGS = -march=skylake -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(AVX),512z) - override AVXFLAGS = -march=skylake -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) - else - $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) - endif -else - ifeq ($(AVX),none) - override AVXFLAGS = -march=x86-64 # no SIMD (see #588) - else ifeq ($(AVX),sse4) - override AVXFLAGS = -march=nehalem # SSE4.2 with 128 width (xmm registers) - else ifeq ($(AVX),avx2) - override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(AVX),512y) - override AVXFLAGS = -march=skylake-avx512 -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(AVX),512z) - override AVXFLAGS = -march=skylake-avx512 -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) +ifeq ($(findstring cpp,$(MAKECMDGOALS)),cpp) + $(info AVX=$(AVX)) + ifeq ($(UNAME_P),ppc64le) + ifeq ($(AVX),sse4) + override AVXFLAGS = -D__SSE4_2__ # Power9 VSX with 128 width (VSR registers) + else ifneq ($(AVX),none) + $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on PowerPC for the moment) + endif + else ifeq ($(UNAME_P),arm) + ifeq ($(AVX),sse4) + override AVXFLAGS = -D__SSE4_2__ # ARM NEON with 128 width (Q/quadword registers) + else ifneq ($(AVX),none) + $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on ARM for the moment) + endif + else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 + ifeq ($(AVX),none) + override AVXFLAGS = -mno-sse3 # no SIMD + else ifeq ($(AVX),sse4) + override AVXFLAGS = -mno-avx # SSE4.2 with 128 width (xmm registers) + else ifeq ($(AVX),avx2) + override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] + else ifeq ($(AVX),512y) + override AVXFLAGS = -march=skylake -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] + else ifeq ($(AVX),512z) + override AVXFLAGS = -march=skylake -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) + else + $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) + endif else - $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) + ifeq ($(AVX),none) + override AVXFLAGS = -march=x86-64 # no SIMD (see #588) + else ifeq ($(AVX),sse4) + override AVXFLAGS = -march=nehalem # SSE4.2 with 128 width (xmm registers) + else ifeq ($(AVX),avx2) + override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] + else ifeq ($(AVX),512y) + override AVXFLAGS = -march=skylake-avx512 -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] + else ifeq ($(AVX),512z) + override AVXFLAGS = -march=skylake-avx512 -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) + else + $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) + endif endif + # For the moment, use AVXFLAGS everywhere: eventually, use them only in encapsulated implementations? + CXXFLAGS+= $(AVXFLAGS) endif -# For the moment, use AVXFLAGS everywhere: eventually, use them only in encapsulated implementations? -CXXFLAGS+= $(AVXFLAGS) # Set the build flags appropriate to each FPTYPE choice (example: "make FPTYPE=f") $(info FPTYPE=$(FPTYPE)) @@ -389,11 +391,19 @@ endif # Build directory "short" tag (defines target and path to the optional build directory) # (Rationale: keep directory names shorter, e.g. do not include random number generator choice) -override DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) +ifneq ($(NVCC),) + override DIRTAG = cuda_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) +else + override DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) +endif # Build lockfile "full" tag (defines full specification of build options that cannot be intermixed) # (Rationale: avoid mixing of CUDA and no-CUDA environment builds with different random number generators) -override TAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) +ifneq ($(NVCC),) + override TAG = cuda_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) +else + override TAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) +endif # Build directory: current directory by default, or build.$(DIRTAG) if USEBUILDDIR==1 ifeq ($(USEBUILDDIR),1) @@ -448,9 +458,9 @@ endif testmain=$(BUILDDIR)/runTest.exe ifneq ($(GTESTLIBS),) -all.$(TAG): $(BUILDDIR)/.build.$(TAG) $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_main) $(cxx_main) $(fcu_main) $(fcxx_main) $(testmain) +all.$(TAG): $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_main) $(cxx_main) $(fcu_main) $(fcxx_main) $(testmain) else -all.$(TAG): $(BUILDDIR)/.build.$(TAG) $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_main) $(cxx_main) $(fcu_main) $(fcxx_main) +all.$(TAG): $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_main) $(cxx_main) $(fcu_main) $(fcxx_main) endif # Target (and build options): debug @@ -460,27 +470,20 @@ debug: CUOPTFLAGS = -G debug: MAKEDEBUG := debug debug: all.$(TAG) -# Target: tag-specific build lockfiles -override oldtagsb=`if [ -d $(BUILDDIR) ]; then find $(BUILDDIR) -maxdepth 1 -name '.build.*' ! -name '.build.$(TAG)' -exec echo $(shell pwd)/{} \; ; fi` -$(BUILDDIR)/.build.$(TAG): - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - @if [ "$(oldtagsb)" != "" ]; then echo "Cannot build for tag=$(TAG) as old builds exist for other tags:"; echo " $(oldtagsb)"; echo "Please run 'make clean' first\nIf 'make clean' is not enough: run 'make clean USEBUILDDIR=1 AVX=$(AVX) FPTYPE=$(FPTYPE)' or 'make cleanall'"; exit 1; fi - @touch $(BUILDDIR)/.build.$(TAG) - # Generic target and build rules: objects from CUDA compilation ifneq ($(NVCC),) -$(BUILDDIR)/%.o : %.cu *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) +$(BUILDDIR)/%.o : %.cu *.h ../../src/*.h @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c $< -o $@ -$(BUILDDIR)/%_cu.o : %.cc *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) +$(BUILDDIR)/%_cu.o : %.cc *.h ../../src/*.h @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c -x cu $< -o $@ endif # Generic target and build rules: objects from C++ compilation # (NB do not include CUINC here! add it only for NVTX or curand #679) -$(BUILDDIR)/%.o : %.cc *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) +$(BUILDDIR)/%.o : %.cc *.h ../../src/*.h @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi $(CXX) $(CPPFLAGS) $(CXXFLAGS) -fPIC -c $< -o $@ @@ -532,7 +535,7 @@ endif # Target (and build rules): common (src) library commonlib : $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so -$(LIBDIR)/lib$(MG5AMC_COMMONLIB).so: ../../src/*.h ../../src/*.cc $(BUILDDIR)/.build.$(TAG) +$(LIBDIR)/lib$(MG5AMC_COMMONLIB).so: ../../src/*.h ../../src/*.cc $(MAKE) -C ../../src $(MAKEDEBUG) -f $(CUDACPP_SRC_MAKEFILE) #------------------------------------------------------------------------------- @@ -711,35 +714,27 @@ endif # Target: build all targets in all AVX modes (each AVX mode in a separate build directory) # Split the avxall target into five separate targets to allow parallel 'make -j avxall' builds # (Hack: add a fbridge.inc dependency to avxall, to ensure it is only copied once for all AVX modes) -avxnone: - @echo - $(MAKE) USEBUILDDIR=1 AVX=none -f $(CUDACPP_MAKEFILE) +cppnone: $(cxx_main) -avxsse4: - @echo - $(MAKE) USEBUILDDIR=1 AVX=sse4 -f $(CUDACPP_MAKEFILE) +cppsse4: $(cxx_main) -avxavx2: - @echo - $(MAKE) USEBUILDDIR=1 AVX=avx2 -f $(CUDACPP_MAKEFILE) +cppavx2: $(cxx_main) -avx512y: - @echo - $(MAKE) USEBUILDDIR=1 AVX=512y -f $(CUDACPP_MAKEFILE) +cpp512y: $(cxx_main) -avx512z: - @echo - $(MAKE) USEBUILDDIR=1 AVX=512z -f $(CUDACPP_MAKEFILE) +cpp512z: $(cxx_main) + +cuda: $(cu_main) ifeq ($(UNAME_P),ppc64le) ###avxall: $(INCDIR)/fbridge.inc avxnone avxsse4 -avxall: avxnone avxsse4 +cppall: cppnone cppsse4 else ifeq ($(UNAME_P),arm) ###avxall: $(INCDIR)/fbridge.inc avxnone avxsse4 -avxall: avxnone avxsse4 +cppall: cppnone cppsse4 else ###avxall: $(INCDIR)/fbridge.inc avxnone avxsse4 avxavx2 avx512y avx512z -avxall: avxnone avxsse4 avxavx2 avx512y avx512z +cppall: cppnone cppsse4 cppavx2 cpp512y cpp512z endif #------------------------------------------------------------------------------- @@ -747,21 +742,31 @@ endif # Target: clean the builds .PHONY: clean +BUILD_DIRS := $(wildcard build.*) +NUM_BUILD_DIRS := $(words $(BUILD_DIRS)) + clean: ifeq ($(USEBUILDDIR),1) - rm -rf $(BUILDDIR) +ifeq ($(NUM_BUILD_DIRS),1) + $(info USEBUILDDIR=1, Only one build directory found.) + rm -rf $(BUILD_DIRS) +else ifeq ($(NUM_BUILD_DIRS),0) + $(error USEBUILDDIR=1, but no build directories are found.) else - rm -f $(BUILDDIR)/.build.* $(BUILDDIR)/*.o $(BUILDDIR)/*.exe + $(error Multiple BUILDDIR's found! Use 'cleannone', 'cleansse4', 'cleanavx2', 'clean512y','clean512z', 'cleancuda' or 'cleanall'.) +endif +else + rm -f $(BUILDDIR)/*.o $(BUILDDIR)/*.exe rm -f $(LIBDIR)/lib$(MG5AMC_CXXLIB).so $(LIBDIR)/lib$(MG5AMC_CULIB).so endif $(MAKE) -C ../../src clean -f $(CUDACPP_SRC_MAKEFILE) -### rm -rf $(INCDIR) cleanall: @echo - $(MAKE) USEBUILDDIR=0 clean -f $(CUDACPP_MAKEFILE) + rm -f $(BUILDDIR)/*.o $(BUILDDIR)/*.exe + rm -f $(LIBDIR)/lib$(MG5AMC_CXXLIB).so $(LIBDIR)/lib$(MG5AMC_CULIB).so @echo - $(MAKE) USEBUILDDIR=0 -C ../../src cleanall -f $(CUDACPP_SRC_MAKEFILE) + $(MAKE) -C ../../src cleanall -f $(CUDACPP_SRC_MAKEFILE) rm -rf build.* # Target: clean the builds as well as the gtest installation(s) @@ -771,6 +776,42 @@ ifneq ($(wildcard $(TESTDIRCOMMON)),) endif $(MAKE) -C $(TESTDIRLOCAL) clean +# Target: clean different builds +cleannone: + rm -rf build.none_* + rm -f ../../lib/build.none_*/lib$(MG5AMC_CXXLIB).so + $(MAKE) -C ../../src cleannone -f $(CUDACPP_SRC_MAKEFILE) + +cleansse4: + rm -rf build.sse4_* + rm -f ../../lib/build.sse4_*/lib$(MG5AMC_CXXLIB).so + $(MAKE) -C ../../src cleansse4 -f $(CUDACPP_SRC_MAKEFILE) + +cleanavx2: + rm -rf build.avx2_* + rm -f ../../lib/build.avx2_*/lib$(MG5AMC_CXXLIB).so + $(MAKE) -C ../../src cleanavx2 -f $(CUDACPP_SRC_MAKEFILE) + +clean512y: + rm -rf build.512y_* + rm -f ../../lib/build.512y_*/lib$(MG5AMC_CXXLIB).so + $(MAKE) -C ../../src clean512y -f $(CUDACPP_SRC_MAKEFILE) + +clean512z: + rm -rf build.512z_* + rm -f ../../lib/build.512z_*/lib$(MG5AMC_CXXLIB).so + $(MAKE) -C ../../src clean512z -f $(CUDACPP_SRC_MAKEFILE) + +cleancuda: + rm -rf build.cuda_* + rm -f ../../lib/build.cuda_*/lib$(MG5AMC_CULIB).so + $(MAKE) -C ../../src cleancuda -f $(CUDACPP_SRC_MAKEFILE) + +cleandir: + rm -f ./*.o ./*.exe + rm -f ../../lib/lib$(MG5AMC_CXXLIB).so ../../lib/lib$(MG5AMC_CULIB).so + $(MAKE) -C ../../src cleandir -f $(CUDACPP_SRC_MAKEFILE) + #------------------------------------------------------------------------------- # Target: show system and compiler information @@ -817,13 +858,10 @@ endif #------------------------------------------------------------------------------- -# Target: check (run the C++ test executable) +# Target: check/gcheck (run the C++ test executable) # [NB THIS IS WHAT IS USED IN THE GITHUB CI!] -ifneq ($(NVCC),) -check: runTest cmpFcheck cmpFGcheck -else check: runTest cmpFcheck -endif +gcheck: runTest cmpFGcheck # Target: runTest (run the C++ test executable runTest.exe) runTest: all.$(TAG) @@ -863,4 +901,4 @@ cmpFGcheck: all.$(TAG) memcheck: all.$(TAG) $(RUNTIME) $(CUDA_HOME)/bin/cuda-memcheck --check-api-memory-access yes --check-deprecated-instr yes --check-device-heap yes --demangle full --language c --leak-check full --racecheck-report all --report-api-errors all --show-backtrace yes --tool memcheck --track-unused-memory yes $(BUILDDIR)/gcheck.exe -p 2 32 2 -#------------------------------------------------------------------------------- +#------------------------------------------------------------------------------- \ No newline at end of file diff --git a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/dummy_fct.f b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/dummy_fct.f index 076cf29d67..4f7a204b8f 100644 --- a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/dummy_fct.f +++ b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/dummy_fct.f @@ -32,7 +32,7 @@ logical FUNCTION dummy_cuts(P) LOGICAL IS_A_NU(NEXTERNAL),IS_HEAVY(NEXTERNAL) logical do_cuts(nexternal) COMMON /TO_SPECISA/IS_A_J,IS_A_A,IS_A_L,IS_A_B,IS_A_NU,IS_HEAVY, - . IS_A_ONIUM, do_cuts + & IS_A_ONIUM, do_cuts dummy_cuts=.true. @@ -118,15 +118,16 @@ double precision function user_dynamical_scale(P) C ************************************************************ -C default for the library implementing a dummt bias function +C default for the library implementing a dummy bias function C ************************************************************ subroutine bias_wgt_custom(p, original_weight, bias_weight) - implicit none + implicit none C C Parameters C include 'nexternal.inc' -C + +C C Arguments C double precision p(0:3, nexternal) @@ -161,3 +162,4 @@ subroutine bias_wgt_custom(p, original_weight, bias_weight) return end subroutine bias_wgt_custom + diff --git a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/makefile b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/makefile index 74db44d848..093bc84271 100644 --- a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/makefile +++ b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/makefile @@ -9,6 +9,33 @@ FFLAGS+= -cpp # Compile counters with -O3 as in the cudacpp makefile (avoid being "unfair" to Fortran #740) CXXFLAGS = -O3 -Wall -Wshadow -Wextra +# Sets correct target based on MAKECMDGOALS +ifeq ($(MAKECMDGOALS),) + TARGET := undefined +else + ifeq ($(shell grep -q madevent_ <<< $(MAKECMDGOALS)a),) + TARGET := $(word 2,($(subst _, ,$(MAKECMDGOALS)))) + else + TARGET := $(MAKECMDGOALS) + endif +endif + +# Sets correct cppavx target as dependency when compiling Fortran +ifeq ($(shell grep -q cpp <<< $(MAKECMDGOALS)a),) + ifeq ($(TARGET),cpp) + CPPTARGET := cppavx2 + else + CPPTARGET := $(TARGET) + endif +endif + +# Default goal +.DEFAULT_GOAL := usage + +# Target if user does not specify target +usage: + $(error Unknown target='$(TARGET)': only 'cppnone', 'cppsse4', 'cppavx2', 'cpp512y', 'cpp512z' and 'cuda' are supported!) + # Enable ccache if USECCACHE=1 ifeq ($(USECCACHE)$(shell echo $(CXX) | grep ccache),1) override CXX:=ccache $(CXX) @@ -48,10 +75,10 @@ CUDACPP_MAKEFILE=cudacpp.mk # NB2 Use '|&' in CUDACPP_BUILDDIR to avoid confusing errors about googletest #507 # NB3 Do not add a comment inlined "CUDACPP_BUILDDIR=$(shell ...) # comment" as otherwise a trailing space is included... # NB4 The variables relevant to the cudacpp Makefile must be explicitly passed to $(shell...) -CUDACPP_MAKEENV:=$(shell echo '$(.VARIABLES)' | tr " " "\n" | egrep "(USEBUILDDIR|AVX|FPTYPE|HELINL|HRDCOD)") +CUDACPP_MAKEENV:=$(shell echo '$(.VARIABLES)' | tr " " "\n" | egrep "(USEBUILDDIR|FPTYPE|HELINL|HRDCOD)") ###$(info CUDACPP_MAKEENV=$(CUDACPP_MAKEENV)) ###$(info $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))")) -CUDACPP_BUILDDIR:=$(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn |& awk '/Building/{print $$3}' | sed s/BUILDDIR=//) +CUDACPP_BUILDDIR:=$(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn $(TARGET) 2>/dev/null | awk '/Building/{print $$3}' | sed s/BUILDDIR=//) ifeq ($(CUDACPP_BUILDDIR),) $(error CUDACPP_BUILDDIR='$(CUDACPP_BUILDDIR)' should not be empty!) else @@ -89,7 +116,7 @@ SYMMETRY = symmetry.o idenparts.o # Binaries -LDFLAGS+=-Wl,--no-relax # avoid 'failed to convert GOTPCREL relocation' error #458 +#LDFLAGS+=-Wl,--no-relax # avoid 'failed to convert GOTPCREL relocation' error #458 (flag not universal -> skip?) all: $(PROG)_fortran $(CUDACPP_BUILDDIR)/$(PROG)_cpp # also builds $(PROG)_cuda if $(CUDACPP_CULIB) exists (#503) @@ -115,10 +142,6 @@ $(LIBS): .libs cd ../../Source; make touch $@ -$(CUDACPP_BUILDDIR)/.cudacpplibs: - $(MAKE) -f $(CUDACPP_MAKEFILE) - touch $@ - # On Linux, set rpath to LIBDIR to make it unnecessary to use LD_LIBRARY_PATH # Use relative paths with respect to the executables ($ORIGIN on Linux) # On Darwin, building libraries with absolute paths in LIBDIR makes this unnecessary @@ -130,26 +153,47 @@ else override LIBFLAGSRPATH = -Wl,-rpath,'$$ORIGIN/$(LIBDIR)' endif -.PHONY: madevent_fortran_link madevent_cuda_link madevent_cpp_link +.PHONY: madevent_fortran_link madevent_cuda_link madevent_cpp_link madevent_cppnone_link madevent_cppsse4_link madevent_cppavx2_link madevent_cpp512y_link madevent_cpp512z_link madevent_fortran_link: $(PROG)_fortran rm -f $(PROG) ln -s $(PROG)_fortran $(PROG) +# Only used for testing, should be removed in the future madevent_cpp_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp rm -f $(PROG) ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) +madevent_cppnone_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp + rm -f $(PROG) + ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) + +madevent_cppsse4_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp + rm -f $(PROG) + ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) + +madevent_cppavx2_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp + rm -f $(PROG) + ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) + +madevent_cpp512y_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp + rm -f $(PROG) + ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) + +madevent_cpp512z_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp + rm -f $(PROG) + ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) + madevent_cuda_link: $(CUDACPP_BUILDDIR)/$(PROG)_cuda rm -f $(PROG) ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cuda $(PROG) # Building $(PROG)_cpp also builds $(PROG)_cuda if $(CUDACPP_CULIB) exists (improved patch for cpp-only builds #503) -$(CUDACPP_BUILDDIR)/$(PROG)_cpp: $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(LIBS) $(MATRIX) counters.o ompnumthreads.o $(CUDACPP_BUILDDIR)/.cudacpplibs +$(CUDACPP_BUILDDIR)/$(PROG)_cpp: $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(LIBS) $(MATRIX) counters.o ompnumthreads.o $(CPPTARGET) $(FC) -o $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o -L$(LIBDIR)/$(CUDACPP_BUILDDIR) -l$(CUDACPP_COMMONLIB) -l$(CUDACPP_CXXLIB) $(LIBFLAGSRPATH) $(LDFLAGS) - if [ -f $(LIBDIR)/$(CUDACPP_BUILDDIR)/lib$(CUDACPP_CULIB).* ]; then $(FC) -o $(CUDACPP_BUILDDIR)/$(PROG)_cuda $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o -L$(LIBDIR)/$(CUDACPP_BUILDDIR) -l$(CUDACPP_COMMONLIB) -l$(CUDACPP_CULIB) $(LIBFLAGSRPATH) $(LDFLAGS); fi -$(CUDACPP_BUILDDIR)/$(PROG)_cuda: $(CUDACPP_BUILDDIR)/$(PROG)_cpp +$(CUDACPP_BUILDDIR)/$(PROG)_cuda: $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(LIBS) $(MATRIX) counters.o ompnumthreads.o cuda + $(FC) -o $(CUDACPP_BUILDDIR)/$(PROG)_cuda $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o -L$(LIBDIR)/$(CUDACPP_BUILDDIR) -l$(CUDACPP_COMMONLIB) -l$(CUDACPP_CULIB) $(LIBFLAGSRPATH) $(LDFLAGS) counters.o: counters.cc timer.h $(CXX) $(CXXFLAGS) -c $< -o $@ @@ -215,49 +259,105 @@ genps.o: .libs UNAME_P := $(shell uname -p) ifeq ($(UNAME_P),ppc64le) -avxall: avxnone avxsse4 +cppall: + $(MAKE) USEBUILDDIR=1 cppnone + $(MAKE) USEBUILDDIR=1 cppsse4 else ifeq ($(UNAME_P),arm) -avxall: avxnone avxsse4 +cppall: + $(MAKE) USEBUILDDIR=1 cppnone + $(MAKE) USEBUILDDIR=1 cppsse4 else -avxall: avxnone avxsse4 avxavx2 avx512y avx512z +cppall: + $(MAKE) USEBUILDDIR=1 cppnone + $(MAKE) USEBUILDDIR=1 cppsse4 + $(MAKE) USEBUILDDIR=1 cppavx2 + $(MAKE) USEBUILDDIR=1 cpp512y + $(MAKE) USEBUILDDIR=1 cpp512z endif -avxnone: $(PROG)_fortran $(DSIG_cudacpp) - @echo - $(MAKE) USEBUILDDIR=1 AVX=none +ALL: + $(MAKE) USEBUILDDIR=1 cppnone + $(MAKE) USEBUILDDIR=1 cppsse4 + $(MAKE) USEBUILDDIR=1 cppavx2 + $(MAKE) USEBUILDDIR=1 cpp512y + $(MAKE) USEBUILDDIR=1 cpp512z + $(MAKE) USEBUILDDIR=1 cuda -avxsse4: $(PROG)_fortran $(DSIG_cudacpp) - @echo - $(MAKE) USEBUILDDIR=1 AVX=sse4 +cppnone: + $(MAKE) -f $(CUDACPP_MAKEFILE) cppnone -avxavx2: $(PROG)_fortran $(DSIG_cudacpp) - @echo - $(MAKE) USEBUILDDIR=1 AVX=avx2 +cppsse4: + $(MAKE) -f $(CUDACPP_MAKEFILE) cppsse4 -avx512y: $(PROG)_fortran $(DSIG_cudacpp) - @echo - $(MAKE) USEBUILDDIR=1 AVX=512y +cppavx2: + $(MAKE) -f $(CUDACPP_MAKEFILE) cppavx2 -avx512z: $(PROG)_fortran $(DSIG_cudacpp) - @echo - $(MAKE) USEBUILDDIR=1 AVX=512z +cpp512y: + $(MAKE) -f $(CUDACPP_MAKEFILE) cpp512y -###endif +cpp512z: + $(MAKE) -f $(CUDACPP_MAKEFILE) cpp512z + +cuda: + $(MAKE) -f $(CUDACPP_MAKEFILE) cuda # Clean (NB: 'make clean' in Source calls 'make clean' in all P*) -clean: # Clean builds: fortran in this Pn; cudacpp executables for one AVX in this Pn - $(RM) *.o gensym $(PROG) $(PROG)_fortran $(PROG)_forhel $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(CUDACPP_BUILDDIR)/$(PROG)_cuda +BUILD_DIRS := $(wildcard build.*) +BUILD_TARGET_DIR := $(shell echo $(BUILD_DIRS) | awk -F '[._]' '{print $$2}') +NUM_BUILD_DIRS := $(words $(BUILD_DIRS)) + +clean: +ifeq ($(USEBUILDDIR),1) +ifeq ($(NUM_BUILD_DIRS),1) + $(info USEBUILDDIR=1, only cleaning build dir.) + $(RM) -r $(BUILD_DIRS) + $(MAKE) -f $(CUDACPP_MAKEFILE) clean$(BUILD_TARGET_DIR) +else ifeq ($(NUM_BUILD_DIRS),0) + $(error USEBUILDDIR=1, but no build directories are found.) +else + $(error Multiple BUILDDIR's found! Use 'cleannone', 'cleansse4', 'cleanavx2', 'clean512y','clean512z', 'cleancuda' or 'cleanall'.) +endif +else + $(info USEBUILDDIR=0 only cleaning build with no dir.) + $(RM) *.o gensym $(PROG) $(PROG)_fortran $(PROG)_forhel ./$(PROG)_* + $(MAKE) -f $(CUDACPP_MAKEFILE) cleandir + $(RM) $(CUDACPP_BUILDDIR)/.*libs +endif + +cleannone: # Clean builds: fortran in this Pn; cpp executables for one AVX in this Pn + $(RM) *.o gensym $(PROG) $(PROG)_fortran $(PROG)_forhel build.none_*/$(PROG)_cpp + $(MAKE) -f $(CUDACPP_MAKEFILE) cleannone + +cleansse4: # Clean build: fortran in this Pn; cpp executables for cppsse4 in this Pn + $(RM) *.o gensym $(PROG) $(PROG)_fortran $(PROG)_forhel build.sse4_*/$(PROG)_cpp + $(MAKE) -f $(CUDACPP_MAKEFILE) cleansse4 + +cleanavx2: # Clean build: fortran in this Pn; cpp executables for cppavx2 in this Pn + $(RM) *.o gensym $(PROG) $(PROG)_fortran $(PROG)_forhel build.avx2_*/$(PROG)_cpp + $(MAKE) -f $(CUDACPP_MAKEFILE) cleanavx2 + +clean512y: # Clean build: fortran in this Pn; cpp executables for cpp512y in this Pn + $(RM) *.o gensym $(PROG) $(PROG)_fortran $(PROG)_forhel build.512y_*/$(PROG)_cpp + $(MAKE) -f $(CUDACPP_MAKEFILE) clean512y + +clean512z: # Clean build: fortran in this Pn; cpp executables for cpp512z in this Pn + $(RM) *.o gensym $(PROG) $(PROG)_fortran $(PROG)_forhel build.512z_*/$(PROG)_cpp + $(MAKE) -f $(CUDACPP_MAKEFILE) clean512z + +cleancuda: # Clean build: fortran in this Pn; cuda executables in this Pn + $(RM) *.o gensym $(PROG) $(PROG)_fortran $(PROG)_forhel build.cuda_*/$(PROG)_cuda + $(MAKE) -f $(CUDACPP_MAKEFILE) cleancuda cleanavxs: clean # Clean builds: fortran in this Pn; cudacpp for all AVX in this Pn and in src $(MAKE) -f $(CUDACPP_MAKEFILE) cleanall - rm -f $(CUDACPP_BUILDDIR)/.cudacpplibs - rm -f .libs + $(RM) $(CUDACPP_BUILDDIR)/.*libs + $(RM) .libs cleanall: # Clean builds: fortran in all P* and in Source; cudacpp for all AVX in all P* and in src make -C ../../Source cleanall - rm -rf $(LIBDIR)libbias.$(libext) - rm -f ../../Source/*.mod ../../Source/*/*.mod + $(RM) -r $(LIBDIR)libbias.$(libext) + $(RM) ../../Source/*.mod ../../Source/*/*.mod distclean: cleanall # Clean all fortran and cudacpp builds as well as the googletest installation $(MAKE) -f $(CUDACPP_MAKEFILE) distclean diff --git a/epochX/cudacpp/gg_ttgg.mad/bin/generate_events b/epochX/cudacpp/gg_ttgg.mad/bin/generate_events index 107313b25d..5577cc66a0 100755 --- a/epochX/cudacpp/gg_ttgg.mad/bin/generate_events +++ b/epochX/cudacpp/gg_ttgg.mad/bin/generate_events @@ -46,7 +46,7 @@ if __debug__ and (not os.path.exists(pjoin(root_path,'../..', 'bin','create_rele sys.path.append(pjoin(root_path,'bin','internal')) import madevent_interface as ME - +import misc as misc import logging import logging.config @@ -160,17 +160,31 @@ if '__main__' == __name__: # Check that python version is valid set_configuration() - argument = sys.argv + argument = sys.argv + + # check for plugin customization of the launch command + launch_interface = ME.MadEventCmdShell + if os.path.exists(pjoin(root_path, 'bin','internal', 'launch_plugin.py')): + with misc.TMP_variable(sys, 'path', sys.path + [pjoin(root_path, 'bin', 'internal')]): + from importlib import reload + try: + reload('launch_plugin') + except Exception as error: + import launch_plugin + launch_interface = launch_plugin.MEINTERFACE + + + try: if '-h' in argument or '--help' in argument: - launch = ME.MadEventCmdShell(me_dir=root_path, force_run=True) + launch = launch_interface(me_dir=root_path, force_run=True) launch.exec_cmd('help generate_events') sys.exit() elif len(argument) > 1 and argument[1] in ['0', '1', '2']: argument = treat_old_argument(argument) with ME.MadEventCmdShell.RunWebHandling(root_path, ): - launch = ME.MadEventCmdShell(me_dir=root_path, force_run=True) + launch = launch_interface(me_dir=root_path, force_run=True) launch.run_cmd('generate_events %s' % ' '.join(argument[1:])) launch.run_cmd('quit') except ME.MadEventAlreadyRunning as message: diff --git a/epochX/cudacpp/gg_ttgg.mad/bin/internal/banner.py b/epochX/cudacpp/gg_ttgg.mad/bin/internal/banner.py index 7624b9f557..824815f47b 100755 --- a/epochX/cudacpp/gg_ttgg.mad/bin/internal/banner.py +++ b/epochX/cudacpp/gg_ttgg.mad/bin/internal/banner.py @@ -537,7 +537,7 @@ def charge_card(self, tag): self.param_card = param_card_reader.ParamCard(param_card) return self.param_card elif tag == 'mgruncard': - self.run_card = RunCard(self[tag]) + self.run_card = RunCard(self[tag], unknown_warning=False) return self.run_card elif tag == 'mg5proccard': proc_card = self[tag].split('\n') @@ -1002,13 +1002,14 @@ def __init__(self, finput=None, **opt): self.allowed_value = {} self.default_setup() + self.plugin_input(finput) # if input is define read that input if isinstance(finput, (file, str, StringIO.StringIO)): self.read(finput, **opt) - self.plugin_input(finput) + def plugin_input(self, finput=None): @@ -2624,6 +2625,7 @@ class RunCard(ConfigFile): default_include_file = 'run_card.inc' default_autodef_file = 'run.inc' donewarning = [] + include_as_parameter = [] def plugin_input(self, finput): @@ -2670,18 +2672,40 @@ def __new__(cls, finput=None, **opt): elif isinstance(finput, cls): target_class = finput.__class__ elif isinstance(finput, str): + path = finput if '\n' not in finput: finput = open(finput).read() if 'req_acc_FO' in finput: target_class = RunCardNLO else: target_class = RunCardLO + if MADEVENT and os.path.exists(pjoin(MEDIR, 'bin','internal', 'launch_plugin.py')): + with misc.TMP_variable(sys, 'path', sys.path + [pjoin(MEDIR, 'bin', 'internal')]): + from importlib import reload + try: + reload('launch_plugin') + except Exception as error: + import launch_plugin + target_class = launch_plugin.RunCard + elif not MADEVENT and os.path.exists(path.replace('run_card.dat', '../bin/internal/launch_plugin.py')): + misc.sprint('try to use plugin class') + pydir = path.replace('run_card.dat', '../bin/internal/') + with misc.TMP_variable(sys, 'path', sys.path + [pydir]): + from importlib import reload + try: + reload('launch_plugin') + except Exception as error: + import launch_plugin + target_class = launch_plugin.RunCard + else: return None target_class.fill_post_set_from_blocks() - - return super(RunCard, cls).__new__(target_class, finput, **opt) + out = super(RunCard, cls).__new__(target_class, finput, **opt) + if not isinstance(out, RunCard): #should not happen but in presence of missmatch of library loaded. + out.__init__(finput, **opt) + return out else: return super(RunCard, cls).__new__(cls, finput, **opt) @@ -2709,7 +2733,7 @@ def __init__(self, *args, **opts): self.system_default = {} self.display_block = [] # set some block to be displayed - + self.fct_mod = {} # {param: (fct_pointer, *argument, **opts)} self.cut_class = {} self.warned=False @@ -2746,7 +2770,7 @@ def get_lepton_densities(cls): def add_param(self, name, value, fortran_name=None, include=True, hidden=False, legacy=False, cut=False, system=False, sys_default=None, - autodef=False, + autodef=False, fct_mod=None, **opts): """ add a parameter to the card. value is the default value and defines the type (int/float/bool/str) of the input. @@ -2760,6 +2784,7 @@ def add_param(self, name, value, fortran_name=None, include=True, If a path (Source/PDF/pdf.inc) the definition will be added within that file Default is False (does not add the definition) entry added in the run_card will automatically have this on True. + fct_mod: defines a function to run if the parameter is modify in the include file options of **opts: - allowed: list of valid options. '*' means anything else should be allowed. empty list means anything possible as well. @@ -2784,8 +2809,12 @@ def add_param(self, name, value, fortran_name=None, include=True, if autodef: self.definition_path[autodef].append(name) self.user_set.add(name) + # function to trigger if a value is modified in the include file + # main target is action to force correct recompilation (like for compilation flag/...) + if fct_mod: + self.fct_mod[name] = fct_mod - def read(self, finput, consistency=True): + def read(self, finput, consistency=True, unknown_warning=True): """Read the input file, this can be a path to a file, a file object, a str with the content of the file.""" @@ -2793,6 +2822,7 @@ def read(self, finput, consistency=True): if "\n" in finput: finput = finput.split('\n') elif os.path.isfile(finput): + self.path = finput finput = open(finput) else: raise Exception("No such file %s" % finput) @@ -2807,7 +2837,7 @@ def read(self, finput, consistency=True): name = name.lower().strip() if name not in self: #looks like an entry added by a user -> add it nicely - self.add_unknown_entry(name, value) + self.add_unknown_entry(name, value, unknown_warning) else: self.set( name, value, user=True) # parameter not set in the run_card can be set to compatiblity value @@ -2819,7 +2849,7 @@ def read(self, finput, consistency=True): logger.warning(str(error)) else: raise - def add_unknown_entry(self, name, value): + def add_unknown_entry(self, name, value, unknow_warning): """function to add an entry to the run_card when the associated parameter does not exists. This is based on the guess_entry_fromname for the various syntax providing input. This then call add_param accordingly. @@ -2858,7 +2888,7 @@ def add_unknown_entry(self, name, value): raise Exception("dictionary need to have at least one entry") default['dict']['__type__'] = default[self.guess_type_from_value(default_value[0])] - if name not in RunCard.donewarning: + if name not in RunCard.donewarning and unknow_warning: logger.warning("Found unexpected entry in run_card: \"%s\" with value \"%s\".\n"+\ " The type was assigned to %s. \n"+\ " The definition of that variable will %sbe automatically added to fortran file %s\n"+\ @@ -2896,7 +2926,16 @@ def valid_line(self, line, tmp): return False else: return True - + + + def reset_simd(self, old_value, new_value, name, *args, **opts): + raise Exception('pass in reset simd') + + def make_clean(self,old_value, new_value, name, dir): + raise Exception('pass make clean for ', dir) + + def make_Ptouch(self,old_value, new_value, name, reset): + raise Exception('pass Ptouch for ', reset) def write(self, output_file, template=None, python_template=False, write_hidden=False, template_options=None, **opt): @@ -3071,6 +3110,77 @@ def write(self, output_file, template=None, python_template=False, else: output_file.write(text) + def get_last_value_include(self, output_dir): + """For paraeter in self.fct_mod + parse the associate inc file to get the value of the previous run. + We return a dictionary {name: old_value} + if inc file does not exist we will return the current value (i.e. set has no change) + """ + + #remember that + # default_include_file is a class variable + # self.includepath is on the form include_path : [list of param ] + out = {} + + # setup inc_to_parse to be like self.includepath (include_path : [list of param ]) + # BUT only containing the parameter that need to be tracked for the fct_mod option + inc_to_parse = {} + for inc_file, params in self.includepath.items(): + if not inc_file: + continue + if any(p in params for p in self.fct_mod): + inc_to_parse[inc_file] = [name for name in self.includepath[inc_file] if name in self.fct_mod] + + # now loop over the files and ask the associate function + for inc_file, params in inc_to_parse.items(): + if inc_file is True: + inc_file = self.default_include_file + out.update(self.get_value_from_include(inc_file, params, output_dir)) + + return out + + def get_value_from_include(self, path, list_of_params, output_dir): + """for a given include file return the current value of the requested parameter + return a dictionary {name: value} + if path does not exists return the current value in self for all parameter""" + + #WARNING DOES NOT HANDLE LIST/DICT so far + + # handle case where file is missing + if not os.path.exists(pjoin(output_dir,path)): + misc.sprint("include file not existing", pjoin(output_dir,path)) + out = {name: self[name] for name in list_of_params} + + with open(pjoin(output_dir,path), 'r') as fsock: + text = fsock.read() + + for name in list_of_params: + misc.sprint(name, name in self.fortran_name) + misc.sprint(self.fortran_name[name] if name in self.fortran_name[name] else name) + to_track = [self.fortran_name[name] if name in self.fortran_name else name for name in list_of_params] + pattern = re.compile(r"\(?(%(names)s)\s?=\s?([^)]*)\)?" % {'names':'|'.join(to_track)}, re.I) + out = dict(pattern.findall(text)) + misc.sprint(out) + for name in list_of_params: + if name in self.fortran_name: + value = out[self.fortran_name[name]] + del out[self.fortran_name[name]] + out[name] = value + + for name, value in out.items(): + try: + out[name] = self.format_variable(value, type(self[name])) + except Exception: + continue + + if len(out) != len(list_of_params): + misc.sprint(list_of_params) + misc.sprint(to_track) + misc.sprint(self.fortran_name) + misc.sprint(text) + raise Exception + return out + def get_default(self, name, default=None, log_level=None): """return self[name] if exist otherwise default. log control if we @@ -3361,71 +3471,93 @@ def write_include_file(self, output_dir, output_file=None): #ensusre that system only parameter are correctly set self.update_system_parameter_for_include() + value_in_old_include = self.get_last_value_include(output_dir) + + if output_dir: self.write_autodef(output_dir, output_file=None) # check/fix status of customised functions self.edit_dummy_fct_from_file(self["custom_fcts"], os.path.dirname(output_dir)) for incname in self.includepath: - if incname is True: - pathinc = self.default_include_file - elif incname is False: - continue - else: - pathinc = incname + self.write_one_include_file(output_dir, incname, output_file) + + for name,value in value_in_old_include.items(): + if value != self[name]: + self.fct_mod[name][0](value, self[name], name, *self.fct_mod[name][1],**self.fct_mod[name][2]) - if output_file: - fsock = output_file + def write_one_include_file(self, output_dir, incname, output_file=None): + """write one include file at the time""" + + misc.sprint(incname) + if incname is True: + pathinc = self.default_include_file + elif incname is False: + return + else: + pathinc = incname + + if output_file: + fsock = output_file + else: + fsock = file_writers.FortranWriter(pjoin(output_dir,pathinc+'.tmp')) + + + for key in self.includepath[incname]: + #define the fortran name + if key in self.fortran_name: + fortran_name = self.fortran_name[key] else: - fsock = file_writers.FortranWriter(pjoin(output_dir,pathinc+'.tmp')) - for key in self.includepath[incname]: - #define the fortran name - if key in self.fortran_name: - fortran_name = self.fortran_name[key] + fortran_name = key + + if incname in self.include_as_parameter: + fsock.writelines('INTEGER %s\n' % fortran_name) + #get the value with warning if the user didn't set it + value = self.get_default(key) + if hasattr(self, 'mod_inc_%s' % key): + value = getattr(self, 'mod_inc_%s' % key)(value) + # Special treatment for strings containing a list of + # strings. Convert it to a list of strings + if isinstance(value, list): + # in case of a list, add the length of the list as 0th + # element in fortran. Only in case of integer or float + # list (not for bool nor string) + targettype = self.list_parameter[key] + if targettype is bool: + pass + elif targettype is int: + line = '%s(%s) = %s \n' % (fortran_name, 0, self.f77_formatting(len(value))) + fsock.writelines(line) + elif targettype is float: + line = '%s(%s) = %s \n' % (fortran_name, 0, self.f77_formatting(float(len(value)))) + fsock.writelines(line) + # output the rest of the list in fortran + for i,v in enumerate(value): + line = '%s(%s) = %s \n' % (fortran_name, i+1, self.f77_formatting(v)) + fsock.writelines(line) + elif isinstance(value, dict): + for fortran_name, onevalue in value.items(): + line = '%s = %s \n' % (fortran_name, self.f77_formatting(onevalue)) + fsock.writelines(line) + elif isinstance(incname,str) and 'compile' in incname: + if incname in self.include_as_parameter: + line = 'PARAMETER (%s=%s)' %( fortran_name, value) else: - fortran_name = key - - #get the value with warning if the user didn't set it - value = self.get_default(key) - if hasattr(self, 'mod_inc_%s' % key): - value = getattr(self, 'mod_inc_%s' % key)(value) - # Special treatment for strings containing a list of - # strings. Convert it to a list of strings - if isinstance(value, list): - # in case of a list, add the length of the list as 0th - # element in fortran. Only in case of integer or float - # list (not for bool nor string) - targettype = self.list_parameter[key] - if targettype is bool: - pass - elif targettype is int: - line = '%s(%s) = %s \n' % (fortran_name, 0, self.f77_formatting(len(value))) - fsock.writelines(line) - elif targettype is float: - line = '%s(%s) = %s \n' % (fortran_name, 0, self.f77_formatting(float(len(value)))) - fsock.writelines(line) - # output the rest of the list in fortran - for i,v in enumerate(value): - line = '%s(%s) = %s \n' % (fortran_name, i+1, self.f77_formatting(v)) - fsock.writelines(line) - elif isinstance(value, dict): - for fortran_name, onevalue in value.items(): - line = '%s = %s \n' % (fortran_name, self.f77_formatting(onevalue)) - fsock.writelines(line) - elif isinstance(incname,str) and 'compile' in incname: line = '%s = %s \n' % (fortran_name, value) - fsock.write(line) + fsock.write(line) + else: + if incname in self.include_as_parameter: + line = 'PARAMETER (%s=%s)' %( fortran_name, self.f77_formatting(value)) else: line = '%s = %s \n' % (fortran_name, self.f77_formatting(value)) - fsock.writelines(line) - if not output_file: - fsock.close() - path = pjoin(output_dir,pathinc) - if not os.path.exists(path) or not filecmp.cmp(path, path+'.tmp'): - files.mv(path+'.tmp', path) - else: - os.remove(path+'.tmp') - + fsock.writelines(line) + if not output_file: + fsock.close() + path = pjoin(output_dir,pathinc) + if not os.path.exists(path) or not filecmp.cmp(path, path+'.tmp'): + files.mv(path+'.tmp', path) + else: + os.remove(path+'.tmp') def write_autodef(self, output_dir, output_file=None): """ Add the definition of variable to run.inc if the variable is set with autodef. @@ -3764,13 +3896,14 @@ def remove_all_cut(self): %(tmin_for_channel)s = tmin_for_channel ! limit the non-singular reach of --some-- channel of integration related to T-channel diagram (value between -1 and 0), -1 is no impact %(survey_splitting)s = survey_splitting ! for loop-induced control how many core are used at survey for the computation of a single iteration. %(survey_nchannel_per_job)s = survey_nchannel_per_job ! control how many Channel are integrated inside a single job on cluster/multicore - %(refine_evt_by_job)s = refine_evt_by_job ! control the maximal number of events for the first iteration of the refine (larger means less jobs) + %(refine_evt_by_job)s = refine_evt_by_job ! control the maximal number of events for the first iteration of the refine (larger means less jobs) #********************************************************************* -# Compilation flag. No automatic re-compilation (need manual "make clean" in Source) +# Compilation flag. #********************************************************************* %(global_flag)s = global_flag ! fortran optimization flag use for the all code. %(aloha_flag)s = aloha_flag ! fortran optimization flag for aloha function. Suggestions: '-ffast-math' %(matrix_flag)s = matrix_flag ! fortran optimization flag for matrix.f function. Suggestions: '-O3' + %(vector_size)s = vector_size ! size designed for SIMD/OpenMP/GPU (number of events in lockstep) """ template_off = '# To see advanced option for Phase-Space optimization: type "update psoptim"' @@ -3926,9 +4059,12 @@ class RunCardLO(RunCard): "get_dummy_x1_x2": pjoin("SubProcesses","dummy_fct.f"), "dummy_boostframe": pjoin("SubProcesses","dummy_fct.f"), "user_dynamical_scale": pjoin("SubProcesses","dummy_fct.f"), + "bias_wgt_custom": pjoin("SubProcesses","dummy_fct.f"), "user_": pjoin("SubProcesses","dummy_fct.f") # all function starting by user will be added to that file } + include_as_parameter = ['vector.inc'] + if MG5DIR: default_run_card = pjoin(MG5DIR, "internal", "default_run_card_lo.dat") @@ -4162,10 +4298,15 @@ def default_setup(self): self.add_param('hel_splitamp', True, hidden=True, include=False, comment='decide if amplitude aloha call can be splitted in two or not when doing helicity per helicity optimization.') self.add_param('hel_zeroamp', True, hidden=True, include=False, comment='decide if zero amplitude can be removed from the computation when doing helicity per helicity optimization.') self.add_param('SDE_strategy', 1, allowed=[1,2], fortran_name="sde_strat", comment="decide how Multi-channel should behaves \"1\" means full single diagram enhanced (hep-ph/0208156), \"2\" use the product of the denominator") - self.add_param('global_flag', '-O', include=False, hidden=True, comment='global fortran compilation flag, suggestion -fbound-check') - self.add_param('aloha_flag', '', include=False, hidden=True, comment='global fortran compilation flag, suggestion: -ffast-math') - self.add_param('matrix_flag', '', include=False, hidden=True, comment='fortran compilation flag for the matrix-element files, suggestion -O3') - + self.add_param('global_flag', '-O', include=False, hidden=True, comment='global fortran compilation flag, suggestion -fbound-check', + fct_mod=(self.make_clean, ('Source'),{})) + self.add_param('aloha_flag', '', include=False, hidden=True, comment='global fortran compilation flag, suggestion: -ffast-math', + fct_mod=(self.make_clean, ('Source/DHELAS'),{})) + self.add_param('matrix_flag', '', include=False, hidden=True, comment='fortran compilation flag for the matrix-element files, suggestion -O3', + fct_mod=(self.make_Ptouch, ('matrix'),{})) + self.add_param('vector_size', 1, include='vector.inc', hidden=True, comment='lockstep size for parralelism run', + fortran_name='VECSIZE_MEMMAX', fct_mod=(self.reset_simd,(),{})) + # parameter allowing to define simple cut via the pdg # Special syntax are related to those. (can not be edit directly) self.add_param('pt_min_pdg',{'__type__':0.}, include=False, cut=True) @@ -4187,8 +4328,7 @@ def default_setup(self): self.add_param('mxxmin4pdg',[-1.], system=True) self.add_param('mxxpart_antipart', [False], system=True) - # CUDACPP parameters - self.add_param('cudacpp_backend', 'CPP', include=False, hidden=False) + def check_validity(self): """ """ diff --git a/epochX/cudacpp/gg_ttgg.mad/bin/internal/check_param_card.py b/epochX/cudacpp/gg_ttgg.mad/bin/internal/check_param_card.py index fe874a06a4..71089d7480 100755 --- a/epochX/cudacpp/gg_ttgg.mad/bin/internal/check_param_card.py +++ b/epochX/cudacpp/gg_ttgg.mad/bin/internal/check_param_card.py @@ -85,7 +85,7 @@ def load_str(self, text): self.value= ' '.join(data[len(self.lhacode):]) # check that lhacode are the first entry otherwise return invalid param. if ' '.join([str(i) for i in self.lhacode]) != ' '.join(data[:len(self.lhacode)]): - raise InvalidParam + raise InvalidParam("line was %s" % str(data)) else: self.value = data[-1] diff --git a/epochX/cudacpp/gg_ttgg.mad/bin/internal/common_run_interface.py b/epochX/cudacpp/gg_ttgg.mad/bin/internal/common_run_interface.py index 5d0187e3fa..14c7f310dc 100755 --- a/epochX/cudacpp/gg_ttgg.mad/bin/internal/common_run_interface.py +++ b/epochX/cudacpp/gg_ttgg.mad/bin/internal/common_run_interface.py @@ -749,13 +749,15 @@ def writeRunWeb(me_dir): class RunWebHandling(object): - def __init__(self, me_dir, crashifpresent=True, warnifpresent=True): + def __init__(self, me_dir, crashifpresent=True, warnifpresent=True, force_run=False): """raise error if RunWeb already exists me_dir is the directory where the write RunWeb""" self.remove_run_web = True self.me_dir = me_dir - + if force_run: + self.remove_run_web = False + return if crashifpresent or warnifpresent: if os.path.exists(pjoin(me_dir, 'RunWeb')): pid = open(pjoin(me_dir, 'RunWeb')).read() @@ -6574,7 +6576,7 @@ def reask(self, *args, **opt): fail_due_to_format = 0 #parameter to avoid infinite loop def postcmd(self, stop, line): - if line not in [None, '0', 'done', '']: + if line not in [None, '0', 'done', '',0]: ending_question = cmd.OneLinePathCompletion.postcmd(self,stop,line) else: ending_question = True @@ -7533,7 +7535,8 @@ def open_file(self, answer): else: raise if time.time() - start < .5: - self.mother_interface.ask("Are you really that fast? If you are using an editor that returns directly. Please confirm that you have finised to edit the file", 'y') + self.mother_interface.ask("Are you really that fast? If you are using an editor that returns directly. Please confirm that you have finised to edit the file", 'y', + timeout=False) self.reload_card(path) def reload_card(self, path): diff --git a/epochX/cudacpp/gg_ttgg.mad/bin/internal/extended_cmd.py b/epochX/cudacpp/gg_ttgg.mad/bin/internal/extended_cmd.py index a6a8609dce..2f37070580 100755 --- a/epochX/cudacpp/gg_ttgg.mad/bin/internal/extended_cmd.py +++ b/epochX/cudacpp/gg_ttgg.mad/bin/internal/extended_cmd.py @@ -1108,9 +1108,12 @@ def ask(self, question, default, choices=[], path_msg=None, if alias: choices += list(alias.keys()) + + question_instance = obj(question, allow_arg=choices, default=default, mother_interface=self, **opt) - + if fct_timeout is None: + fct_timeout = lambda x: question_instance.postcmd(x, default) if x and default else False if first_cmd: if isinstance(first_cmd, str): question_instance.onecmd(first_cmd) @@ -2271,6 +2274,9 @@ def postcmd(self, stop, line): if n: self.default(line) return self.postcmd(stop, line) + elif self.value is None and line: + self.default(line) + return self.postcmd(stop, line) if not self.casesensitive: for ans in self.allow_arg: if ans.lower() == self.value.lower(): diff --git a/epochX/cudacpp/gg_ttgg.mad/bin/internal/gen_ximprove.py b/epochX/cudacpp/gg_ttgg.mad/bin/internal/gen_ximprove.py index 3b8ec31215..a88d60b282 100755 --- a/epochX/cudacpp/gg_ttgg.mad/bin/internal/gen_ximprove.py +++ b/epochX/cudacpp/gg_ttgg.mad/bin/internal/gen_ximprove.py @@ -154,10 +154,15 @@ def get_helicity(self, to_submit=True, clean=True): p = misc.Popen(['./gensym'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT, cwd=Pdir) #sym_input = "%(points)d %(iterations)d %(accuracy)f \n" % self.opts + (stdout, _) = p.communicate(''.encode()) stdout = stdout.decode('ascii',errors='ignore') - nb_channel = max([math.floor(float(d)) for d in stdout.split()]) - + try: + nb_channel = max([math.floor(float(d)) for d in stdout.split()]) + except Exception as error: + misc.sprint(stdout, 'no channel or error for %s' % Pdir) + continue + self.cmd.compile(['madevent_forhel'], cwd=Pdir) if not os.path.exists(pjoin(Pdir, 'madevent_forhel')): raise Exception('Error make madevent_forhel not successful') diff --git a/epochX/cudacpp/gg_ttgg.mad/bin/internal/launch_plugin.py b/epochX/cudacpp/gg_ttgg.mad/bin/internal/launch_plugin.py new file mode 100644 index 0000000000..23271b846e --- /dev/null +++ b/epochX/cudacpp/gg_ttgg.mad/bin/internal/launch_plugin.py @@ -0,0 +1,100 @@ + +import logging +import os +import subprocess +pjoin = os.path.join +logger = logging.getLogger('cmdprint') # for stdout + +try: + import madgraph +except ImportError: + import internal.madevent_interface as madevent_interface + import internal.misc as misc + import internal.extended_cmd as extended_cmd + import internal.banner as banner_mod +else: + import madgraph.interface.madevent_interface as madevent_interface + import madgraph.various.misc as misc + import madgraph.interface.extended_cmd as extended_cmd + import madgraph.various.banner as banner_mod + +class CPPMEInterface(madevent_interface.MadEventCmdShell): + + def compile(self, *args, **opts): + """ """ + + import multiprocessing + if not self.options['nb_core'] or self.options['nb_core'] == 'None': + self.options['nb_core'] = multiprocessing.cpu_count() + + if args and args[0][0] == 'madevent' and hasattr(self, 'run_card'): + import pathlib + import os + pjoin = os.path.join + + + + + cudacpp_backend = self.run_card['cudacpp_backend'].upper() # the default value is defined in banner.py + logger.info("Building madevent in madevent_interface.py with '%s' matrix elements"%cudacpp_backend) + if cudacpp_backend == 'FORTRAN': + args[0][0] = 'madevent_fortran_link' + elif cudacpp_backend == 'CPP': + args[0][0] = 'madevent_cpp_link' + elif cudacpp_backend == 'CUDA': + args[0][0] = 'madevent_cuda_link' + else: + raise Exception("Invalid cudacpp_backend='%s': only 'FORTRAN', 'CPP', 'CUDA' are supported") + return misc.compile(nb_core=self.options['nb_core'], *args, **opts) + else: + return misc.compile(nb_core=self.options['nb_core'], *args, **opts) + +class CPPRunCard(banner_mod.RunCardLO): + + def reset_simd(self, old_value, new_value, name): + if not hasattr(self, 'path'): + raise Exception + + if name == "vector_size" and new_value <= int(old_value): + # code can handle the new size -> do not recompile + return + + Sourcedir = pjoin(os.path.dirname(os.path.dirname(self.path)), 'Source') + subprocess.call(['make', 'cleanavx'], cwd=Sourcedir, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) + + def plugin_input(self, finput): + return + + def default_setup(self): + super().default_setup() + self.add_param('cudacpp_backend', 'CPP', include=False, hidden=False) + + + def write_one_include_file(self, output_dir, incname, output_file=None): + """write one include file at the time""" + + if incname == "vector.inc" and 'vector_size' not in self.user_set: + return + super().write_one_include_file(output_dir, incname, output_file) + + + def check_validity(self): + """ensure that PLUGIN information are consistent""" + + super().check_validity() + + if self['SDE_strategy'] != 1: + logger.warning('SDE_strategy different of 1 is not supported with SMD/GPU mode') + self['sde_strategy'] = 1 + + if self['hel_recycling']: + self['hel_recycling'] = False + +class GPURunCard(CPPRunCard): + + def default_setup(self): + super(CPPRunCard, self).default_setup() + self.add_param('cudacpp_backend', 'CUDA', include=False, hidden=False) + +MEINTERFACE = CPPMEInterface +RunCard = CPPRunCard diff --git a/epochX/cudacpp/gg_ttgg.mad/bin/internal/madevent_interface.py b/epochX/cudacpp/gg_ttgg.mad/bin/internal/madevent_interface.py index 920e07a926..d722702891 100755 --- a/epochX/cudacpp/gg_ttgg.mad/bin/internal/madevent_interface.py +++ b/epochX/cudacpp/gg_ttgg.mad/bin/internal/madevent_interface.py @@ -3796,9 +3796,11 @@ def do_combine_events(self, line): if self.run_card['bias_module'].lower() not in ['dummy', 'none'] and nb_event: self.correct_bias() - + elif self.run_card['custom_fcts']: + self.correct_bias() + logger.info("combine events done in %s", time.time()-start) - + self.to_store.append('event') diff --git a/epochX/cudacpp/gg_ttgg.mad/bin/internal/run_plot b/epochX/cudacpp/gg_ttgg.mad/bin/internal/run_plot new file mode 100755 index 0000000000..7deee7ac88 --- /dev/null +++ b/epochX/cudacpp/gg_ttgg.mad/bin/internal/run_plot @@ -0,0 +1,47 @@ +#!/bin/bash +# +# This runs MadAnalysis on the unweighted_events.lhe +# +# Usage: run_plot run_name [madir [tddir]] +# where madir is the path to the MadAnalysis package + +main=`pwd` + +if [ "$1" != "" ] +then + run=$1 +else + echo "Usage: run_plot runname [MAdir [tddir]]" + exit +fi + +if [ "$2" != "" ] +then + MAdir=$main/$2 +else + MAdir=$main/../../MadAnalysis +fi + +if [ "$3" != "" ]; then + td=$main/$3 +else + td=$main/../../td +fi + +dirbin=$main/../bin + +if [[ $run != "" && -e ${run}_unweighted_events.lhe.gz ]];then + gunzip -c ${run}_unweighted_events.lhe.gz > unweighted_events.lhe +fi + +if [[ (-x $MAdir/plot_events) && (-e unweighted_events.lhe) && (-e ../Cards/plot_card.dat) ]]; then + echo "Creating Plots" + mkdir $run + cd $run + echo "../unweighted_events.lhe" > events.list + $dirbin/plot $MAdir $td > plot.log + cd .. + $dirbin/plot_page-pl $run parton + mv plots.html ${run}_plots.html +fi + diff --git a/epochX/cudacpp/gg_ttgg.mad/bin/internal/run_plot_delphes b/epochX/cudacpp/gg_ttgg.mad/bin/internal/run_plot_delphes new file mode 100755 index 0000000000..975f410d0e --- /dev/null +++ b/epochX/cudacpp/gg_ttgg.mad/bin/internal/run_plot_delphes @@ -0,0 +1,46 @@ +#!/bin/bash +# +# This runs MadAnalysis on the delphes_events.lhco +# +# Usage: run_plot run_name [madir [tddir]] +# where madir is the path to the MadAnalysis package + +main=`pwd` + +if [ "$1" != "" ] +then + run=$1 +else + echo "Usage: run_plot runname [MAdir [tddir]]" + exit +fi + +if [ "$2" != "" ] +then + MAdir=$main/$2 +else + MAdir=$main/../../MadAnalysis +fi + +if [ "$3" != "" ]; then + td=$main/$3 +else + td=$main/../../td +fi + +dirbin=$main/../bin + +if [[ $run != "" && -e ${run}_delphes_events.lhco.gz ]];then + gunzip -c ${run}_delphes_events.lhco.gz > delphes_events.lhco +fi + +if [[ (-x $MAdir/plot_events) && (-e delphes_events.lhco) && (-e ../Cards/plot_card.dat) ]]; then + echo "Creating Plots" + mkdir ${run}_delphes + cd ${run}_delphes + echo "../delphes_events.lhco" > events.list + $dirbin/plot $MAdir $td > plot.log + cd .. + $dirbin/plot_page-pl ${run}_delphes Delphes + mv plots.html ${run}_plots_delphes.html +fi diff --git a/epochX/cudacpp/gg_ttgg.mad/bin/internal/run_plot_pgs b/epochX/cudacpp/gg_ttgg.mad/bin/internal/run_plot_pgs new file mode 100755 index 0000000000..e7a36ef344 --- /dev/null +++ b/epochX/cudacpp/gg_ttgg.mad/bin/internal/run_plot_pgs @@ -0,0 +1,47 @@ +#!/bin/bash +# +# This runs MadAnalysis on the unweighted_events.lhe +# +# Usage: run_plot run_name [madir [tddir]] +# where madir is the path to the MadAnalysis package + +main=`pwd` + +if [ "$1" != "" ] +then + run=$1 +else + echo "Usage: run_plot runname [MAdir [tddir]]" + exit +fi + +if [ "$2" != "" ] +then + MAdir=$main/$2 +else + MAdir=$main/../../MadAnalysis +fi + +if [ "$3" != "" ]; then + td=$main/$3 +else + td=$main/../../td +fi + +dirbin=$main/../bin + +if [[ $run != "" && -e ${run}_pgs_events.lhco.gz ]];then + gunzip -c ${run}_pgs_events.lhco.gz > pgs_events.lhco +fi + +if [[ (-x $MAdir/plot_events) && (-e pgs_events.lhco) && (-e ../Cards/plot_card.dat) ]]; then + echo "Creating Plots" + mkdir ${run}_pgs + cd ${run}_pgs + echo "../pgs_events.lhco" > events.list + $dirbin/plot $MAdir $td > plot.log + cd .. + $dirbin/plot_page-pl ${run}_pgs PGS + mv plots.html ${run}_plots_pgs.html +fi + diff --git a/epochX/cudacpp/gg_ttgg.mad/bin/internal/run_plot_pythia b/epochX/cudacpp/gg_ttgg.mad/bin/internal/run_plot_pythia new file mode 100755 index 0000000000..532bfb4b7b --- /dev/null +++ b/epochX/cudacpp/gg_ttgg.mad/bin/internal/run_plot_pythia @@ -0,0 +1,50 @@ +#!/bin/bash +# +# This runs MadAnalysis on the unweighted_events.lhe +# +# Usage: run_plot run_name [madir [tddir]] +# where madir is the path to the MadAnalysis package + +main=`pwd` + +if [ "$1" != "" ] +then + run=$1 +else + echo "Usage: run_plot runname [MAdir [tddir]]" + exit +fi + +if [ "$2" != "" ] +then + MAdir=$main/$2 +else + MAdir=$main/../../MadAnalysis +fi + +if [ "$3" != "" ]; then + td=$main/$3 +else + td=$main/../../td +fi + +dirbin=$main/../bin/internal + +if [[ $run != "" && -e ${run}_pythia_events.lhe.gz ]];then + gunzip -c ${run}_pythia_events.lhe.gz > pythia_events.lhe +fi + +if [[ (-x $MAdir/plot_events) && (-e pythia_events.lhe) && (-e ../Cards/plot_card.dat) ]]; then + echo "Creating Plots" + mkdir ${run}_pythia + cd ${run}_pythia + echo "../pythia_events.lhe" > events.list + $dirbin/plot $MAdir $td > plot.log + cd .. + $dirbin/plot_page-pl ${run}_pythia Pythia + mv plots.html ${run}_plots_pythia.html + $dirbin/gen_crossxhtml-pl $run +else + echo "Not creating plots" +fi + diff --git a/epochX/cudacpp/gg_ttgg.mad/bin/madevent b/epochX/cudacpp/gg_ttgg.mad/bin/madevent index c944aa1faf..dff9711b73 100755 --- a/epochX/cudacpp/gg_ttgg.mad/bin/madevent +++ b/epochX/cudacpp/gg_ttgg.mad/bin/madevent @@ -32,6 +32,7 @@ except ImportError: import os +pjoin = os.path.join import optparse # Get the directory of the script real path (bin) @@ -160,13 +161,30 @@ except: pass import internal.madevent_interface as cmd_interface +# check for plugin customization of the launch command +launch_interface = cmd_interface.MadEventCmdShell +if os.path.exists(pjoin(root_path, 'bin','internal', 'launch_plugin.py')): + with misc.TMP_variable(sys, 'path', sys.path + [pjoin(root_path, 'bin', 'internal')]): + from importlib import reload + try: + reload('launch_plugin') + except Exception as error: + import launch_plugin + launch_interface = launch_plugin.MEINTERFACE + + +#Source use this executable for compilation always allow it +force_run = False +if (args and args[0] == 'treatcards'): + force_run=True + # Call the cmd interface main loop try: if '-h' in args or '--help' in args: - launch = ME.MadEventCmdShell(me_dir=os.path.dirname(root_path), force_run=True) + launch = launch_interface(me_dir=os.path.dirname(root_path), force_run=True) launch.exec_cmd('help generate_events') sys.exit(0) - with cmd_interface.MadEventCmdShell.RunWebHandling(os.path.dirname(root_path), ): + with cmd_interface.MadEventCmdShell.RunWebHandling(os.path.dirname(root_path), force_run=force_run): if (args and os.path.isfile(args[0])): # They are an input file input_file = args[0] @@ -178,7 +196,7 @@ try: cmd_line.run_cmd('import command ' + input_file) cmd_line.run_cmd('quit') else: - cmd_line = cmd_interface.MadEventCmdShell(force_run=True) + cmd_line = launch_interface(force_run=True) cmd_line.use_rawinput = False cmd_line.haspiping = False cmd_line.run_cmd('import command ' + input_file) @@ -188,7 +206,7 @@ try: if options.web: cmd_line = cmd_interface.MadEventCmd(force_run=True) else: - cmd_line = cmd_interface.MadEventCmdShell(force_run=True) + cmd_line = launch_interface(force_run=True) if not hasattr(cmd_line, 'do_%s' % args[0]): if parser_error: print( parser_error) diff --git a/epochX/cudacpp/gg_ttgg.mad/src/HelAmps_sm.h b/epochX/cudacpp/gg_ttgg.mad/src/HelAmps_sm.h index 9cea8bcbe7..9b946c21e1 100644 --- a/epochX/cudacpp/gg_ttgg.mad/src/HelAmps_sm.h +++ b/epochX/cudacpp/gg_ttgg.mad/src/HelAmps_sm.h @@ -863,6 +863,7 @@ namespace mg5amcCpu const fptype allV2[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, fptype allvertexes[] ) ALWAYS_INLINE; //-------------------------------------------------------------------------- @@ -873,6 +874,7 @@ namespace mg5amcCpu VVV1P0_1( const fptype allV2[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, const fptype M1, const fptype W1, fptype allV1[] ) ALWAYS_INLINE; @@ -886,6 +888,7 @@ namespace mg5amcCpu const fptype allF2[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, fptype allvertexes[] ) ALWAYS_INLINE; //-------------------------------------------------------------------------- @@ -896,6 +899,7 @@ namespace mg5amcCpu FFV1_1( const fptype allF2[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, const fptype M1, const fptype W1, fptype allF1[] ) ALWAYS_INLINE; @@ -908,6 +912,7 @@ namespace mg5amcCpu FFV1_2( const fptype allF1[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, const fptype M2, const fptype W2, fptype allF2[] ) ALWAYS_INLINE; @@ -920,6 +925,7 @@ namespace mg5amcCpu FFV1P0_3( const fptype allF1[], const fptype allF2[], const fptype allCOUP[], + const double Ccoeff, const fptype M3, const fptype W3, fptype allV3[] ) ALWAYS_INLINE; @@ -934,6 +940,7 @@ namespace mg5amcCpu const fptype allV3[], const fptype allV4[], const fptype allCOUP[], + const double Ccoeff, fptype allvertexes[] ) ALWAYS_INLINE; //-------------------------------------------------------------------------- @@ -945,6 +952,7 @@ namespace mg5amcCpu const fptype allV3[], const fptype allV4[], const fptype allCOUP[], + const double Ccoeff, const fptype M1, const fptype W1, fptype allV1[] ) ALWAYS_INLINE; @@ -959,6 +967,7 @@ namespace mg5amcCpu const fptype allV3[], const fptype allV4[], const fptype allCOUP[], + const double Ccoeff, fptype allvertexes[] ) ALWAYS_INLINE; //-------------------------------------------------------------------------- @@ -970,6 +979,7 @@ namespace mg5amcCpu const fptype allV3[], const fptype allV4[], const fptype allCOUP[], + const double Ccoeff, const fptype M1, const fptype W1, fptype allV1[] ) ALWAYS_INLINE; @@ -984,6 +994,7 @@ namespace mg5amcCpu const fptype allV3[], const fptype allV4[], const fptype allCOUP[], + const double Ccoeff, fptype allvertexes[] ) ALWAYS_INLINE; //-------------------------------------------------------------------------- @@ -995,6 +1006,7 @@ namespace mg5amcCpu const fptype allV3[], const fptype allV4[], const fptype allCOUP[], + const double Ccoeff, const fptype M1, const fptype W1, fptype allV1[] ) ALWAYS_INLINE; @@ -1008,6 +1020,7 @@ namespace mg5amcCpu const fptype allV2[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, fptype allvertexes[] ) { mgDebug( 0, __FUNCTION__ ); @@ -1042,6 +1055,7 @@ namespace mg5amcCpu VVV1P0_1( const fptype allV2[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, const fptype M1, const fptype W1, fptype allV1[] ) @@ -1080,6 +1094,7 @@ namespace mg5amcCpu const fptype allF2[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, fptype allvertexes[] ) { mgDebug( 0, __FUNCTION__ ); @@ -1103,6 +1118,7 @@ namespace mg5amcCpu FFV1_1( const fptype allF2[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, const fptype M1, const fptype W1, fptype allF1[] ) @@ -1134,6 +1150,7 @@ namespace mg5amcCpu FFV1_2( const fptype allF1[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, const fptype M2, const fptype W2, fptype allF2[] ) @@ -1165,6 +1182,7 @@ namespace mg5amcCpu FFV1P0_3( const fptype allF1[], const fptype allF2[], const fptype allCOUP[], + const double Ccoeff, const fptype M3, const fptype W3, fptype allV3[] ) @@ -1197,6 +1215,7 @@ namespace mg5amcCpu const fptype allV3[], const fptype allV4[], const fptype allCOUP[], + const double Ccoeff, fptype allvertexes[] ) { mgDebug( 0, __FUNCTION__ ); @@ -1225,6 +1244,7 @@ namespace mg5amcCpu const fptype allV3[], const fptype allV4[], const fptype allCOUP[], + const double Ccoeff, const fptype M1, const fptype W1, fptype allV1[] ) @@ -1260,6 +1280,7 @@ namespace mg5amcCpu const fptype allV3[], const fptype allV4[], const fptype allCOUP[], + const double Ccoeff, fptype allvertexes[] ) { mgDebug( 0, __FUNCTION__ ); @@ -1288,6 +1309,7 @@ namespace mg5amcCpu const fptype allV3[], const fptype allV4[], const fptype allCOUP[], + const double Ccoeff, const fptype M1, const fptype W1, fptype allV1[] ) @@ -1323,6 +1345,7 @@ namespace mg5amcCpu const fptype allV3[], const fptype allV4[], const fptype allCOUP[], + const double Ccoeff, fptype allvertexes[] ) { mgDebug( 0, __FUNCTION__ ); @@ -1351,6 +1374,7 @@ namespace mg5amcCpu const fptype allV3[], const fptype allV4[], const fptype allCOUP[], + const double Ccoeff, const fptype M1, const fptype W1, fptype allV1[] ) diff --git a/epochX/cudacpp/gg_ttgg.mad/src/cudacpp_src.mk b/epochX/cudacpp/gg_ttgg.mad/src/cudacpp_src.mk index 554d7a704c..750986464e 100644 --- a/epochX/cudacpp/gg_ttgg.mad/src/cudacpp_src.mk +++ b/epochX/cudacpp/gg_ttgg.mad/src/cudacpp_src.mk @@ -1,7 +1,7 @@ # Copyright (C) 2020-2023 CERN and UCLouvain. # Licensed under the GNU Lesser General Public License (version 3 or later). # Created by: S. Roiser (Feb 2020) for the MG5aMC CUDACPP plugin. -# Further modified by: O. Mattelaer, S. Roiser, A. Valassi (2020-2023) for the MG5aMC CUDACPP plugin. +# Further modified by: J. Teig, O. Mattelaer, S. Roiser, A. Valassi (2020-2023) for the MG5aMC CUDACPP plugin. #=== Determine the name of this makefile (https://ftp.gnu.org/old-gnu/Manuals/make-3.80/html_node/make_17.html) #=== NB: assume that the same name (e.g. cudacpp.mk, Makefile...) is used in the Subprocess and src directories @@ -88,50 +88,52 @@ CXXFLAGS += $(OMPFLAGS) # Set the build flags appropriate to each AVX choice (example: "make AVX=none") # [NB MGONGPU_PVW512 is needed because "-mprefer-vector-width=256" is not exposed in a macro] # [See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96476] -$(info AVX=$(AVX)) -ifeq ($(UNAME_P),ppc64le) - ifeq ($(AVX),sse4) - override AVXFLAGS = -D__SSE4_2__ # Power9 VSX with 128 width (VSR registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on PowerPC for the moment) - endif -else ifeq ($(UNAME_P),arm) - ifeq ($(AVX),sse4) - override AVXFLAGS = -D__SSE4_2__ # ARM NEON with 128 width (Q/quadword registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on ARM for the moment) - endif -else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 - ifeq ($(AVX),none) - override AVXFLAGS = -mno-sse3 # no SIMD - else ifeq ($(AVX),sse4) - override AVXFLAGS = -mno-avx # SSE4.2 with 128 width (xmm registers) - else ifeq ($(AVX),avx2) - override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(AVX),512y) - override AVXFLAGS = -march=skylake -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(AVX),512z) - override AVXFLAGS = -march=skylake -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) +ifeq ($(NVCC),) + $(info AVX=$(AVX)) + ifeq ($(UNAME_P),ppc64le) + ifeq ($(AVX),sse4) + override AVXFLAGS = -D__SSE4_2__ # Power9 VSX with 128 width (VSR registers) + else ifneq ($(AVX),none) + $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on PowerPC for the moment) + endif + else ifeq ($(UNAME_P),arm) + ifeq ($(AVX),sse4) + override AVXFLAGS = -D__SSE4_2__ # ARM NEON with 128 width (Q/quadword registers) + else ifneq ($(AVX),none) + $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on ARM for the moment) + endif + else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 + ifeq ($(AVX),none) + override AVXFLAGS = -mno-sse3 # no SIMD + else ifeq ($(AVX),sse4) + override AVXFLAGS = -mno-avx # SSE4.2 with 128 width (xmm registers) + else ifeq ($(AVX),avx2) + override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] + else ifeq ($(AVX),512y) + override AVXFLAGS = -march=skylake -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] + else ifeq ($(AVX),512z) + override AVXFLAGS = -march=skylake -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) + else + $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) + endif else - $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) - endif -else - ifeq ($(AVX),none) - override AVXFLAGS = -march=x86-64 # no SIMD (see #588) - else ifeq ($(AVX),sse4) - override AVXFLAGS = -march=nehalem # SSE4.2 with 128 width (xmm registers) - else ifeq ($(AVX),avx2) - override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(AVX),512y) - override AVXFLAGS = -march=skylake-avx512 -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(AVX),512z) - override AVXFLAGS = -march=skylake-avx512 -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) + ifeq ($(AVX),none) + override AVXFLAGS = -march=x86-64 # no SIMD (see #588) + else ifeq ($(AVX),sse4) + override AVXFLAGS = -march=nehalem # SSE4.2 with 128 width (xmm registers) + else ifeq ($(AVX),avx2) + override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] + else ifeq ($(AVX),512y) + override AVXFLAGS = -march=skylake-avx512 -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] + else ifeq ($(AVX),512z) + override AVXFLAGS = -march=skylake-avx512 -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) + else ifneq ($(AVX),none) + $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) + endif endif + # For the moment, use AVXFLAGS everywhere: eventually, use them only in encapsulated implementations? + CXXFLAGS+= $(AVXFLAGS) endif -# For the moment, use AVXFLAGS everywhere: eventually, use them only in encapsulated implementations? -CXXFLAGS+= $(AVXFLAGS) # Set the build flags appropriate to each FPTYPE choice (example: "make FPTYPE=f") ###$(info FPTYPE=$(FPTYPE)) @@ -175,11 +177,19 @@ endif # Build directory "short" tag (defines target and path to the optional build directory) # (Rationale: keep directory names shorter, e.g. do not include random number generator choice) -override DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) +ifneq ($(NVCC),) + override DIRTAG = cuda_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) +else + override DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) +endif # Build lockfile "full" tag (defines full specification of build options that cannot be intermixed) # (Rationale: avoid mixing of CUDA and no-CUDA environment builds with different random number generators) -override TAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) +ifneq ($(NVCC),) + override TAG = cuda_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) +else + override TAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) +endif # Build directory: current directory by default, or build.$(DIRTAG) if USEBUILDDIR==1 ###$(info Current directory is $(shell pwd)) @@ -216,35 +226,21 @@ endif MG5AMC_COMMONLIB = mg5amc_common # First target (default goal) -all.$(TAG): $(BUILDDIR)/.build.$(TAG) $(LIBDIR)/.build.$(TAG) $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so +all.$(TAG): $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so # Target (and build options): debug debug: OPTFLAGS = -g -O0 debug: all.$(TAG) -# Target: tag-specific build lockfiles -override oldtagsb=`if [ -d $(BUILDDIR) ]; then find $(BUILDDIR) -maxdepth 1 -name '.build.*' ! -name '.build.$(TAG)' -exec echo $(shell pwd)/{} \; ; fi` -override oldtagsl=`if [ -d $(LIBDIR) ]; then find $(LIBDIR) -maxdepth 1 -name '.build.*' ! -name '.build.$(TAG)' -exec echo $(shell pwd)/{} \; ; fi` - -$(BUILDDIR)/.build.$(TAG): $(LIBDIR)/.build.$(TAG) - -$(LIBDIR)/.build.$(TAG): - @if [ "$(oldtagsl)" != "" ]; then echo -e "Cannot build for tag=$(TAG) as old builds exist in $(LIBDIR) for other tags:\n$(oldtagsl)\nPlease run 'make clean' first\nIf 'make clean' is not enough: run 'make clean USEBUILDDIR=1 AVX=$(AVX) FPTYPE=$(FPTYPE)' or 'make cleanall'"; exit 1; fi - @if [ "$(oldtagsb)" != "" ]; then echo -e "Cannot build for tag=$(TAG) as old builds exist in $(BUILDDIR) for other tags:\n$(oldtagsb)\nPlease run 'make clean' first\nIf 'make clean' is not enough: run 'make clean USEBUILDDIR=1 AVX=$(AVX) FPTYPE=$(FPTYPE)' or 'make cleanall'"; exit 1; fi - @if [ ! -d $(LIBDIR) ]; then echo "mkdir -p $(LIBDIR)"; mkdir -p $(LIBDIR); fi - @touch $(LIBDIR)/.build.$(TAG) - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - @touch $(BUILDDIR)/.build.$(TAG) - #------------------------------------------------------------------------------- # Generic target and build rules: objects from C++ compilation -$(BUILDDIR)/%.o : %.cc *.h $(BUILDDIR)/.build.$(TAG) +$(BUILDDIR)/%.o : %.cc *.h @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi $(CXX) $(CPPFLAGS) $(CXXFLAGS) -fPIC -c $< -o $@ # Generic target and build rules: objects from CUDA compilation -$(BUILDDIR)/%_cu.o : %.cc *.h $(BUILDDIR)/.build.$(TAG) +$(BUILDDIR)/%_cu.o : %.cc *.h @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c -x cu $< -o $@ @@ -271,20 +267,61 @@ endif # Target: clean the builds .PHONY: clean +BUILD_DIRS := $(wildcard build.*) +NUM_BUILD_DIRS := $(words $(BUILD_DIRS)) + clean: ifeq ($(USEBUILDDIR),1) - rm -rf $(LIBDIR) - rm -rf $(BUILDDIR) +ifeq ($(NUM_BUILD_DIRS),1) + $(info USEBUILDDIR=1, only one src build directory found.) + rm -rf ../lib/$(BUILD_DIRS) + rm -rf $(BUILD_DIRS) +else ifeq ($(NUM_BUILD_DIRS),0) + $(error USEBUILDDIR=1, but no src build directories are found.) else - rm -f $(LIBDIR)/.build.* $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so - rm -f $(BUILDDIR)/.build.* $(BUILDDIR)/*.o $(BUILDDIR)/*.exe + $(error Multiple src BUILDDIR's found! Use 'cleannone', 'cleansse4', 'cleanavx2', 'clean512y','clean512z', 'cleancuda' or 'cleanall'.) +endif +else + rm -f ../lib/lib$(MG5AMC_COMMONLIB).so + rm -f $(BUILDDIR)/*.o $(BUILDDIR)/*.exe endif cleanall: @echo - $(MAKE) clean -f $(THISMK) + rm -f ../lib/lib$(MG5AMC_COMMONLIB).so + rm -f $(BUILDDIR)/*.o $(BUILDDIR)/*.exe @echo - rm -rf $(LIBDIR)/build.* + rm -rf ../lib/build.* rm -rf build.* +# Target: clean different builds + +cleannone: + rm -rf ../lib/build.none_* + rm -rf build.none_* + +cleansse4: + rm -rf ../lib/build.sse4_* + rm -rf build.sse4_* + +cleanavx2: + rm -rf ../lib/build.avx2_* + rm -rf build.avx2_* + +clean512y: + rm -rf ../lib/build.512y_* + rm -rf build.512y_* + +clean512z: + rm -rf ../lib/build.512z_* + rm -rf build.512z_* + +cleancuda: + rm -rf ../lib/build.cuda_* + rm -rf build.cuda_* + +cleandir: + rm -f ./*.o ./*.exe + rm -f ../lib/lib$(MG5AMC_COMMONLIB).so + #------------------------------------------------------------------------------- diff --git a/epochX/cudacpp/gg_ttgg.sa/SubProcesses/MatrixElementKernels.cc b/epochX/cudacpp/gg_ttgg.sa/SubProcesses/MatrixElementKernels.cc index 30257195b6..cfed7d2af5 100644 --- a/epochX/cudacpp/gg_ttgg.sa/SubProcesses/MatrixElementKernels.cc +++ b/epochX/cudacpp/gg_ttgg.sa/SubProcesses/MatrixElementKernels.cc @@ -112,10 +112,17 @@ namespace mg5amcCpu // See https://community.arm.com/arm-community-blogs/b/operating-systems-blog/posts/runtime-detection-of-cpu-features-on-an-armv8-a-cpu bool ok = true; // this is just an assumption! const std::string tag = "arm neon (128bit as in SSE4.2)"; -#else +#elif defined(__x86_64__) || defined(__i386__) bool known = true; bool ok = __builtin_cpu_supports( "sse4.2" ); const std::string tag = "nehalem (SSE4.2)"; +#else + bool known = false; // __builtin_cpu_supports is not supported + // See https://gcc.gnu.org/onlinedocs/gcc/Basic-PowerPC-Built-in-Functions-Available-on-all-Configurations.html + // See https://stackoverflow.com/q/62783908 + // See https://community.arm.com/arm-community-blogs/b/operating-systems-blog/posts/runtime-detection-of-cpu-features-on-an-armv8-a-cpu + bool ok = true; // this is just an assumption! + const std::string tag = "arm neon (128bit as in SSE4.2)"; #endif #else bool known = true; diff --git a/epochX/cudacpp/gg_ttgg.sa/SubProcesses/P1_Sigma_sm_gg_ttxgg/CPPProcess.cc b/epochX/cudacpp/gg_ttgg.sa/SubProcesses/P1_Sigma_sm_gg_ttxgg/CPPProcess.cc index 25f123c774..1af74d48ae 100644 --- a/epochX/cudacpp/gg_ttgg.sa/SubProcesses/P1_Sigma_sm_gg_ttxgg/CPPProcess.cc +++ b/epochX/cudacpp/gg_ttgg.sa/SubProcesses/P1_Sigma_sm_gg_ttxgg/CPPProcess.cc @@ -250,11 +250,11 @@ namespace mg5amcCpu vxxxxx( momenta, 0., cHel[ihel][5], +1, w_fp[5], 5 ); - VVV1P0_1( w_fp[0], w_fp[1], COUPs[0], 0., 0., w_fp[6] ); - FFV1P0_3( w_fp[3], w_fp[2], COUPs[1], 0., 0., w_fp[7] ); + VVV1P0_1( w_fp[0], w_fp[1], COUPs[0], 1.0, 0., 0., w_fp[6] ); + FFV1P0_3( w_fp[3], w_fp[2], COUPs[1], 1.0, 0., 0., w_fp[7] ); // Amplitude(s) for diagram number 1 - VVVV1_0( w_fp[6], w_fp[7], w_fp[4], w_fp[5], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[6], w_fp[7], w_fp[4], w_fp[5], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -266,7 +266,7 @@ namespace mg5amcCpu jamp_sv[17] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[22] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[23] -= cxtype( 0, 1 ) * amp_sv[0]; - VVVV3_0( w_fp[6], w_fp[7], w_fp[4], w_fp[5], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[6], w_fp[7], w_fp[4], w_fp[5], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -278,7 +278,7 @@ namespace mg5amcCpu jamp_sv[20] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[22] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[23] -= cxtype( 0, 1 ) * amp_sv[0]; - VVVV4_0( w_fp[6], w_fp[7], w_fp[4], w_fp[5], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[6], w_fp[7], w_fp[4], w_fp[5], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -294,10 +294,10 @@ namespace mg5amcCpu // *** DIAGRAM 2 OF 123 *** // Wavefunction(s) for diagram number 2 - VVV1P0_1( w_fp[6], w_fp[4], COUPs[0], 0., 0., w_fp[8] ); + VVV1P0_1( w_fp[6], w_fp[4], COUPs[0], 1.0, 0., 0., w_fp[8] ); // Amplitude(s) for diagram number 2 - VVV1_0( w_fp[7], w_fp[5], w_fp[8], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[7], w_fp[5], w_fp[8], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -313,10 +313,10 @@ namespace mg5amcCpu // *** DIAGRAM 3 OF 123 *** // Wavefunction(s) for diagram number 3 - VVV1P0_1( w_fp[6], w_fp[5], COUPs[0], 0., 0., w_fp[9] ); + VVV1P0_1( w_fp[6], w_fp[5], COUPs[0], 1.0, 0., 0., w_fp[9] ); // Amplitude(s) for diagram number 3 - VVV1_0( w_fp[7], w_fp[4], w_fp[9], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[7], w_fp[4], w_fp[9], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -332,10 +332,10 @@ namespace mg5amcCpu // *** DIAGRAM 4 OF 123 *** // Wavefunction(s) for diagram number 4 - VVV1P0_1( w_fp[4], w_fp[5], COUPs[0], 0., 0., w_fp[10] ); + VVV1P0_1( w_fp[4], w_fp[5], COUPs[0], 1.0, 0., 0., w_fp[10] ); // Amplitude(s) for diagram number 4 - VVV1_0( w_fp[6], w_fp[7], w_fp[10], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[6], w_fp[7], w_fp[10], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -351,11 +351,11 @@ namespace mg5amcCpu // *** DIAGRAM 5 OF 123 *** // Wavefunction(s) for diagram number 5 - FFV1_1( w_fp[2], w_fp[4], COUPs[1], cIPD[0], cIPD[1], w_fp[11] ); - FFV1_2( w_fp[3], w_fp[6], COUPs[1], cIPD[0], cIPD[1], w_fp[12] ); + FFV1_1( w_fp[2], w_fp[4], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[11] ); + FFV1_2( w_fp[3], w_fp[6], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[12] ); // Amplitude(s) for diagram number 5 - FFV1_0( w_fp[12], w_fp[11], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[12], w_fp[11], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -368,7 +368,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 6 - FFV1_0( w_fp[3], w_fp[11], w_fp[9], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[11], w_fp[9], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -380,10 +380,10 @@ namespace mg5amcCpu // *** DIAGRAM 7 OF 123 *** // Wavefunction(s) for diagram number 7 - FFV1_2( w_fp[3], w_fp[5], COUPs[1], cIPD[0], cIPD[1], w_fp[13] ); + FFV1_2( w_fp[3], w_fp[5], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[13] ); // Amplitude(s) for diagram number 7 - FFV1_0( w_fp[13], w_fp[11], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[13], w_fp[11], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -393,10 +393,10 @@ namespace mg5amcCpu // *** DIAGRAM 8 OF 123 *** // Wavefunction(s) for diagram number 8 - FFV1_1( w_fp[2], w_fp[5], COUPs[1], cIPD[0], cIPD[1], w_fp[14] ); + FFV1_1( w_fp[2], w_fp[5], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[14] ); // Amplitude(s) for diagram number 8 - FFV1_0( w_fp[12], w_fp[14], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[12], w_fp[14], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -409,7 +409,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 9 - FFV1_0( w_fp[3], w_fp[14], w_fp[8], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[14], w_fp[8], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -421,10 +421,10 @@ namespace mg5amcCpu // *** DIAGRAM 10 OF 123 *** // Wavefunction(s) for diagram number 10 - FFV1_2( w_fp[3], w_fp[4], COUPs[1], cIPD[0], cIPD[1], w_fp[15] ); + FFV1_2( w_fp[3], w_fp[4], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[15] ); // Amplitude(s) for diagram number 10 - FFV1_0( w_fp[15], w_fp[14], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[15], w_fp[14], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -434,10 +434,10 @@ namespace mg5amcCpu // *** DIAGRAM 11 OF 123 *** // Wavefunction(s) for diagram number 11 - FFV1_1( w_fp[2], w_fp[6], COUPs[1], cIPD[0], cIPD[1], w_fp[16] ); + FFV1_1( w_fp[2], w_fp[6], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[16] ); // Amplitude(s) for diagram number 11 - FFV1_0( w_fp[15], w_fp[16], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[15], w_fp[16], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -450,7 +450,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 12 - FFV1_0( w_fp[15], w_fp[2], w_fp[9], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[15], w_fp[2], w_fp[9], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -465,7 +465,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 13 - FFV1_0( w_fp[13], w_fp[16], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[13], w_fp[16], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -478,7 +478,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 14 - FFV1_0( w_fp[13], w_fp[2], w_fp[8], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[13], w_fp[2], w_fp[8], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -493,7 +493,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 15 - FFV1_0( w_fp[3], w_fp[16], w_fp[10], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[16], w_fp[10], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -508,7 +508,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 16 - FFV1_0( w_fp[12], w_fp[2], w_fp[10], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[12], w_fp[2], w_fp[10], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -520,12 +520,12 @@ namespace mg5amcCpu // *** DIAGRAM 17 OF 123 *** // Wavefunction(s) for diagram number 17 - FFV1_1( w_fp[2], w_fp[0], COUPs[1], cIPD[0], cIPD[1], w_fp[12] ); - FFV1_2( w_fp[3], w_fp[1], COUPs[1], cIPD[0], cIPD[1], w_fp[16] ); - FFV1_1( w_fp[12], w_fp[4], COUPs[1], cIPD[0], cIPD[1], w_fp[8] ); + FFV1_1( w_fp[2], w_fp[0], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[12] ); + FFV1_2( w_fp[3], w_fp[1], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[16] ); + FFV1_1( w_fp[12], w_fp[4], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[8] ); // Amplitude(s) for diagram number 17 - FFV1_0( w_fp[16], w_fp[8], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[16], w_fp[8], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -534,10 +534,10 @@ namespace mg5amcCpu // *** DIAGRAM 18 OF 123 *** // Wavefunction(s) for diagram number 18 - FFV1_1( w_fp[12], w_fp[5], COUPs[1], cIPD[0], cIPD[1], w_fp[9] ); + FFV1_1( w_fp[12], w_fp[5], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[9] ); // Amplitude(s) for diagram number 18 - FFV1_0( w_fp[16], w_fp[9], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[16], w_fp[9], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -549,7 +549,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 19 - FFV1_0( w_fp[16], w_fp[12], w_fp[10], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[16], w_fp[12], w_fp[10], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -559,11 +559,11 @@ namespace mg5amcCpu // *** DIAGRAM 20 OF 123 *** // Wavefunction(s) for diagram number 20 - VVV1P0_1( w_fp[1], w_fp[4], COUPs[0], 0., 0., w_fp[6] ); - FFV1P0_3( w_fp[3], w_fp[12], COUPs[1], 0., 0., w_fp[17] ); + VVV1P0_1( w_fp[1], w_fp[4], COUPs[0], 1.0, 0., 0., w_fp[6] ); + FFV1P0_3( w_fp[3], w_fp[12], COUPs[1], 1.0, 0., 0., w_fp[17] ); // Amplitude(s) for diagram number 20 - VVV1_0( w_fp[6], w_fp[5], w_fp[17], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[6], w_fp[5], w_fp[17], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -578,7 +578,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 21 - FFV1_0( w_fp[3], w_fp[9], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[9], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -591,7 +591,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 22 - FFV1_0( w_fp[13], w_fp[12], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[13], w_fp[12], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -601,10 +601,10 @@ namespace mg5amcCpu // *** DIAGRAM 23 OF 123 *** // Wavefunction(s) for diagram number 23 - VVV1P0_1( w_fp[1], w_fp[5], COUPs[0], 0., 0., w_fp[18] ); + VVV1P0_1( w_fp[1], w_fp[5], COUPs[0], 1.0, 0., 0., w_fp[18] ); // Amplitude(s) for diagram number 23 - VVV1_0( w_fp[18], w_fp[4], w_fp[17], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[18], w_fp[4], w_fp[17], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -619,7 +619,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 24 - FFV1_0( w_fp[3], w_fp[8], w_fp[18], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[8], w_fp[18], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -632,7 +632,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 25 - FFV1_0( w_fp[15], w_fp[12], w_fp[18], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[15], w_fp[12], w_fp[18], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -642,10 +642,10 @@ namespace mg5amcCpu // *** DIAGRAM 26 OF 123 *** // Wavefunction(s) for diagram number 26 - FFV1_1( w_fp[12], w_fp[1], COUPs[1], cIPD[0], cIPD[1], w_fp[19] ); + FFV1_1( w_fp[12], w_fp[1], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[19] ); // Amplitude(s) for diagram number 26 - FFV1_0( w_fp[15], w_fp[19], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[15], w_fp[19], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -657,7 +657,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 27 - FFV1_0( w_fp[15], w_fp[9], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[15], w_fp[9], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -669,7 +669,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 28 - FFV1_0( w_fp[13], w_fp[19], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[13], w_fp[19], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -681,7 +681,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 29 - FFV1_0( w_fp[13], w_fp[8], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[13], w_fp[8], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -693,7 +693,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 30 - FFV1_0( w_fp[3], w_fp[19], w_fp[10], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[19], w_fp[10], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -706,7 +706,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 31 - VVV1_0( w_fp[1], w_fp[10], w_fp[17], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[10], w_fp[17], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -718,12 +718,12 @@ namespace mg5amcCpu // *** DIAGRAM 32 OF 123 *** // Wavefunction(s) for diagram number 32 - VVVV1P0_1( w_fp[1], w_fp[4], w_fp[5], COUPs[2], 0., 0., w_fp[17] ); - VVVV3P0_1( w_fp[1], w_fp[4], w_fp[5], COUPs[2], 0., 0., w_fp[19] ); - VVVV4P0_1( w_fp[1], w_fp[4], w_fp[5], COUPs[2], 0., 0., w_fp[8] ); + VVVV1P0_1( w_fp[1], w_fp[4], w_fp[5], COUPs[2], 1.0, 0., 0., w_fp[17] ); + VVVV3P0_1( w_fp[1], w_fp[4], w_fp[5], COUPs[2], 1.0, 0., 0., w_fp[19] ); + VVVV4P0_1( w_fp[1], w_fp[4], w_fp[5], COUPs[2], 1.0, 0., 0., w_fp[8] ); // Amplitude(s) for diagram number 32 - FFV1_0( w_fp[3], w_fp[12], w_fp[17], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[12], w_fp[17], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -731,7 +731,7 @@ namespace mg5amcCpu jamp_sv[1] -= amp_sv[0]; jamp_sv[3] -= amp_sv[0]; jamp_sv[5] += amp_sv[0]; - FFV1_0( w_fp[3], w_fp[12], w_fp[19], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[12], w_fp[19], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -739,7 +739,7 @@ namespace mg5amcCpu jamp_sv[2] += amp_sv[0]; jamp_sv[3] -= amp_sv[0]; jamp_sv[4] += amp_sv[0]; - FFV1_0( w_fp[3], w_fp[12], w_fp[8], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[12], w_fp[8], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -751,12 +751,12 @@ namespace mg5amcCpu // *** DIAGRAM 33 OF 123 *** // Wavefunction(s) for diagram number 33 - FFV1_2( w_fp[3], w_fp[0], COUPs[1], cIPD[0], cIPD[1], w_fp[12] ); - FFV1_1( w_fp[2], w_fp[1], COUPs[1], cIPD[0], cIPD[1], w_fp[9] ); - FFV1_2( w_fp[12], w_fp[4], COUPs[1], cIPD[0], cIPD[1], w_fp[20] ); + FFV1_2( w_fp[3], w_fp[0], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[12] ); + FFV1_1( w_fp[2], w_fp[1], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[9] ); + FFV1_2( w_fp[12], w_fp[4], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[20] ); // Amplitude(s) for diagram number 33 - FFV1_0( w_fp[20], w_fp[9], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[20], w_fp[9], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -765,10 +765,10 @@ namespace mg5amcCpu // *** DIAGRAM 34 OF 123 *** // Wavefunction(s) for diagram number 34 - FFV1_2( w_fp[12], w_fp[5], COUPs[1], cIPD[0], cIPD[1], w_fp[21] ); + FFV1_2( w_fp[12], w_fp[5], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[21] ); // Amplitude(s) for diagram number 34 - FFV1_0( w_fp[21], w_fp[9], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[21], w_fp[9], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -780,7 +780,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 35 - FFV1_0( w_fp[12], w_fp[9], w_fp[10], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[12], w_fp[9], w_fp[10], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -790,10 +790,10 @@ namespace mg5amcCpu // *** DIAGRAM 36 OF 123 *** // Wavefunction(s) for diagram number 36 - FFV1P0_3( w_fp[12], w_fp[2], COUPs[1], 0., 0., w_fp[22] ); + FFV1P0_3( w_fp[12], w_fp[2], COUPs[1], 1.0, 0., 0., w_fp[22] ); // Amplitude(s) for diagram number 36 - VVV1_0( w_fp[6], w_fp[5], w_fp[22], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[6], w_fp[5], w_fp[22], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -808,7 +808,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 37 - FFV1_0( w_fp[21], w_fp[2], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[21], w_fp[2], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -821,7 +821,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 38 - FFV1_0( w_fp[12], w_fp[14], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[12], w_fp[14], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -834,7 +834,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 39 - VVV1_0( w_fp[18], w_fp[4], w_fp[22], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[18], w_fp[4], w_fp[22], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -849,7 +849,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 40 - FFV1_0( w_fp[20], w_fp[2], w_fp[18], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[20], w_fp[2], w_fp[18], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -862,7 +862,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 41 - FFV1_0( w_fp[12], w_fp[11], w_fp[18], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[12], w_fp[11], w_fp[18], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -872,10 +872,10 @@ namespace mg5amcCpu // *** DIAGRAM 42 OF 123 *** // Wavefunction(s) for diagram number 42 - FFV1_2( w_fp[12], w_fp[1], COUPs[1], cIPD[0], cIPD[1], w_fp[23] ); + FFV1_2( w_fp[12], w_fp[1], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[23] ); // Amplitude(s) for diagram number 42 - FFV1_0( w_fp[23], w_fp[11], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[23], w_fp[11], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -887,7 +887,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 43 - FFV1_0( w_fp[21], w_fp[11], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[21], w_fp[11], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -899,7 +899,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 44 - FFV1_0( w_fp[23], w_fp[14], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[23], w_fp[14], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -911,7 +911,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 45 - FFV1_0( w_fp[20], w_fp[14], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[20], w_fp[14], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -923,7 +923,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 46 - FFV1_0( w_fp[23], w_fp[2], w_fp[10], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[23], w_fp[2], w_fp[10], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -936,7 +936,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 47 - VVV1_0( w_fp[1], w_fp[10], w_fp[22], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[10], w_fp[22], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -951,7 +951,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 48 - FFV1_0( w_fp[12], w_fp[2], w_fp[17], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[12], w_fp[2], w_fp[17], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -959,7 +959,7 @@ namespace mg5amcCpu jamp_sv[11] -= amp_sv[0]; jamp_sv[17] -= amp_sv[0]; jamp_sv[23] += amp_sv[0]; - FFV1_0( w_fp[12], w_fp[2], w_fp[19], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[12], w_fp[2], w_fp[19], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -967,7 +967,7 @@ namespace mg5amcCpu jamp_sv[15] += amp_sv[0]; jamp_sv[17] -= amp_sv[0]; jamp_sv[21] += amp_sv[0]; - FFV1_0( w_fp[12], w_fp[2], w_fp[8], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[12], w_fp[2], w_fp[8], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -979,11 +979,11 @@ namespace mg5amcCpu // *** DIAGRAM 49 OF 123 *** // Wavefunction(s) for diagram number 49 - VVV1P0_1( w_fp[0], w_fp[4], COUPs[0], 0., 0., w_fp[12] ); - FFV1_2( w_fp[3], w_fp[12], COUPs[1], cIPD[0], cIPD[1], w_fp[22] ); + VVV1P0_1( w_fp[0], w_fp[4], COUPs[0], 1.0, 0., 0., w_fp[12] ); + FFV1_2( w_fp[3], w_fp[12], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[22] ); // Amplitude(s) for diagram number 49 - FFV1_0( w_fp[22], w_fp[9], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[22], w_fp[9], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -993,10 +993,10 @@ namespace mg5amcCpu // *** DIAGRAM 50 OF 123 *** // Wavefunction(s) for diagram number 50 - VVV1P0_1( w_fp[12], w_fp[5], COUPs[0], 0., 0., w_fp[23] ); + VVV1P0_1( w_fp[12], w_fp[5], COUPs[0], 1.0, 0., 0., w_fp[23] ); // Amplitude(s) for diagram number 50 - FFV1_0( w_fp[3], w_fp[9], w_fp[23], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[9], w_fp[23], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1011,7 +1011,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 51 - FFV1_0( w_fp[13], w_fp[9], w_fp[12], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[13], w_fp[9], w_fp[12], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1021,10 +1021,10 @@ namespace mg5amcCpu // *** DIAGRAM 52 OF 123 *** // Wavefunction(s) for diagram number 52 - FFV1_1( w_fp[2], w_fp[12], COUPs[1], cIPD[0], cIPD[1], w_fp[20] ); + FFV1_1( w_fp[2], w_fp[12], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[20] ); // Amplitude(s) for diagram number 52 - FFV1_0( w_fp[16], w_fp[20], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[16], w_fp[20], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1037,7 +1037,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 53 - FFV1_0( w_fp[16], w_fp[2], w_fp[23], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[16], w_fp[2], w_fp[23], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1052,7 +1052,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 54 - FFV1_0( w_fp[16], w_fp[14], w_fp[12], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[16], w_fp[14], w_fp[12], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1065,7 +1065,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 55 - FFV1_0( w_fp[3], w_fp[20], w_fp[18], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[20], w_fp[18], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1080,7 +1080,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 56 - FFV1_0( w_fp[22], w_fp[2], w_fp[18], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[22], w_fp[2], w_fp[18], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1095,7 +1095,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 57 - VVV1_0( w_fp[12], w_fp[18], w_fp[7], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[12], w_fp[18], w_fp[7], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1114,7 +1114,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 58 - VVVV1_0( w_fp[12], w_fp[1], w_fp[7], w_fp[5], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[12], w_fp[1], w_fp[7], w_fp[5], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1126,7 +1126,7 @@ namespace mg5amcCpu jamp_sv[20] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[21] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[22] += cxtype( 0, 1 ) * amp_sv[0]; - VVVV3_0( w_fp[12], w_fp[1], w_fp[7], w_fp[5], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[12], w_fp[1], w_fp[7], w_fp[5], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1138,7 +1138,7 @@ namespace mg5amcCpu jamp_sv[13] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[20] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[21] -= cxtype( 0, 1 ) * amp_sv[0]; - VVVV4_0( w_fp[12], w_fp[1], w_fp[7], w_fp[5], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[12], w_fp[1], w_fp[7], w_fp[5], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1154,10 +1154,10 @@ namespace mg5amcCpu // *** DIAGRAM 59 OF 123 *** // Wavefunction(s) for diagram number 59 - VVV1P0_1( w_fp[12], w_fp[1], COUPs[0], 0., 0., w_fp[21] ); + VVV1P0_1( w_fp[12], w_fp[1], COUPs[0], 1.0, 0., 0., w_fp[21] ); // Amplitude(s) for diagram number 59 - VVV1_0( w_fp[7], w_fp[5], w_fp[21], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[7], w_fp[5], w_fp[21], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1176,7 +1176,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 60 - VVV1_0( w_fp[1], w_fp[7], w_fp[23], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[7], w_fp[23], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1195,7 +1195,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 61 - FFV1_0( w_fp[3], w_fp[14], w_fp[21], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[14], w_fp[21], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1210,7 +1210,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 62 - FFV1_0( w_fp[22], w_fp[14], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[22], w_fp[14], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1223,7 +1223,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 63 - FFV1_0( w_fp[13], w_fp[2], w_fp[21], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[13], w_fp[2], w_fp[21], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1238,7 +1238,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 64 - FFV1_0( w_fp[13], w_fp[20], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[13], w_fp[20], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1248,11 +1248,11 @@ namespace mg5amcCpu // *** DIAGRAM 65 OF 123 *** // Wavefunction(s) for diagram number 65 - VVV1P0_1( w_fp[0], w_fp[5], COUPs[0], 0., 0., w_fp[20] ); - FFV1_2( w_fp[3], w_fp[20], COUPs[1], cIPD[0], cIPD[1], w_fp[21] ); + VVV1P0_1( w_fp[0], w_fp[5], COUPs[0], 1.0, 0., 0., w_fp[20] ); + FFV1_2( w_fp[3], w_fp[20], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[21] ); // Amplitude(s) for diagram number 65 - FFV1_0( w_fp[21], w_fp[9], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[21], w_fp[9], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1262,10 +1262,10 @@ namespace mg5amcCpu // *** DIAGRAM 66 OF 123 *** // Wavefunction(s) for diagram number 66 - VVV1P0_1( w_fp[20], w_fp[4], COUPs[0], 0., 0., w_fp[22] ); + VVV1P0_1( w_fp[20], w_fp[4], COUPs[0], 1.0, 0., 0., w_fp[22] ); // Amplitude(s) for diagram number 66 - FFV1_0( w_fp[3], w_fp[9], w_fp[22], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[9], w_fp[22], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1280,7 +1280,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 67 - FFV1_0( w_fp[15], w_fp[9], w_fp[20], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[15], w_fp[9], w_fp[20], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1290,10 +1290,10 @@ namespace mg5amcCpu // *** DIAGRAM 68 OF 123 *** // Wavefunction(s) for diagram number 68 - FFV1_1( w_fp[2], w_fp[20], COUPs[1], cIPD[0], cIPD[1], w_fp[23] ); + FFV1_1( w_fp[2], w_fp[20], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[23] ); // Amplitude(s) for diagram number 68 - FFV1_0( w_fp[16], w_fp[23], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[16], w_fp[23], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1306,7 +1306,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 69 - FFV1_0( w_fp[16], w_fp[2], w_fp[22], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[16], w_fp[2], w_fp[22], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1321,7 +1321,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 70 - FFV1_0( w_fp[16], w_fp[11], w_fp[20], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[16], w_fp[11], w_fp[20], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1334,7 +1334,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 71 - FFV1_0( w_fp[3], w_fp[23], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[23], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1349,7 +1349,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 72 - FFV1_0( w_fp[21], w_fp[2], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[21], w_fp[2], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1364,7 +1364,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 73 - VVV1_0( w_fp[20], w_fp[6], w_fp[7], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[20], w_fp[6], w_fp[7], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1383,7 +1383,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 74 - VVVV1_0( w_fp[20], w_fp[1], w_fp[7], w_fp[4], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[20], w_fp[1], w_fp[7], w_fp[4], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1395,7 +1395,7 @@ namespace mg5amcCpu jamp_sv[15] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[16] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[18] -= cxtype( 0, 1 ) * amp_sv[0]; - VVVV3_0( w_fp[20], w_fp[1], w_fp[7], w_fp[4], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[20], w_fp[1], w_fp[7], w_fp[4], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1407,7 +1407,7 @@ namespace mg5amcCpu jamp_sv[15] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[18] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[19] += cxtype( 0, 1 ) * amp_sv[0]; - VVVV4_0( w_fp[20], w_fp[1], w_fp[7], w_fp[4], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[20], w_fp[1], w_fp[7], w_fp[4], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1423,10 +1423,10 @@ namespace mg5amcCpu // *** DIAGRAM 75 OF 123 *** // Wavefunction(s) for diagram number 75 - VVV1P0_1( w_fp[20], w_fp[1], COUPs[0], 0., 0., w_fp[12] ); + VVV1P0_1( w_fp[20], w_fp[1], COUPs[0], 1.0, 0., 0., w_fp[12] ); // Amplitude(s) for diagram number 75 - VVV1_0( w_fp[7], w_fp[4], w_fp[12], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[7], w_fp[4], w_fp[12], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1445,7 +1445,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 76 - VVV1_0( w_fp[1], w_fp[7], w_fp[22], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[7], w_fp[22], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1464,7 +1464,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 77 - FFV1_0( w_fp[3], w_fp[11], w_fp[12], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[11], w_fp[12], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1479,7 +1479,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 78 - FFV1_0( w_fp[21], w_fp[11], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[21], w_fp[11], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1492,7 +1492,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 79 - FFV1_0( w_fp[15], w_fp[2], w_fp[12], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[15], w_fp[2], w_fp[12], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1507,7 +1507,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 80 - FFV1_0( w_fp[15], w_fp[23], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[15], w_fp[23], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1517,10 +1517,10 @@ namespace mg5amcCpu // *** DIAGRAM 81 OF 123 *** // Wavefunction(s) for diagram number 81 - FFV1_1( w_fp[9], w_fp[0], COUPs[1], cIPD[0], cIPD[1], w_fp[23] ); + FFV1_1( w_fp[9], w_fp[0], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[23] ); // Amplitude(s) for diagram number 81 - FFV1_0( w_fp[15], w_fp[23], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[15], w_fp[23], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1529,10 +1529,10 @@ namespace mg5amcCpu // *** DIAGRAM 82 OF 123 *** // Wavefunction(s) for diagram number 82 - FFV1_2( w_fp[15], w_fp[0], COUPs[1], cIPD[0], cIPD[1], w_fp[12] ); + FFV1_2( w_fp[15], w_fp[0], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[12] ); // Amplitude(s) for diagram number 82 - FFV1_0( w_fp[12], w_fp[9], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[12], w_fp[9], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1544,7 +1544,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 83 - FFV1_0( w_fp[13], w_fp[23], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[13], w_fp[23], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1553,10 +1553,10 @@ namespace mg5amcCpu // *** DIAGRAM 84 OF 123 *** // Wavefunction(s) for diagram number 84 - FFV1_2( w_fp[13], w_fp[0], COUPs[1], cIPD[0], cIPD[1], w_fp[21] ); + FFV1_2( w_fp[13], w_fp[0], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[21] ); // Amplitude(s) for diagram number 84 - FFV1_0( w_fp[21], w_fp[9], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[21], w_fp[9], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1568,7 +1568,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 85 - FFV1_0( w_fp[3], w_fp[23], w_fp[10], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[23], w_fp[10], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1578,10 +1578,10 @@ namespace mg5amcCpu // *** DIAGRAM 86 OF 123 *** // Wavefunction(s) for diagram number 86 - VVV1P0_1( w_fp[0], w_fp[10], COUPs[0], 0., 0., w_fp[23] ); + VVV1P0_1( w_fp[0], w_fp[10], COUPs[0], 1.0, 0., 0., w_fp[23] ); // Amplitude(s) for diagram number 86 - FFV1_0( w_fp[3], w_fp[9], w_fp[23], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[9], w_fp[23], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1593,10 +1593,10 @@ namespace mg5amcCpu // *** DIAGRAM 87 OF 123 *** // Wavefunction(s) for diagram number 87 - FFV1_2( w_fp[16], w_fp[0], COUPs[1], cIPD[0], cIPD[1], w_fp[22] ); + FFV1_2( w_fp[16], w_fp[0], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[22] ); // Amplitude(s) for diagram number 87 - FFV1_0( w_fp[22], w_fp[11], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[22], w_fp[11], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1605,10 +1605,10 @@ namespace mg5amcCpu // *** DIAGRAM 88 OF 123 *** // Wavefunction(s) for diagram number 88 - FFV1_1( w_fp[11], w_fp[0], COUPs[1], cIPD[0], cIPD[1], w_fp[20] ); + FFV1_1( w_fp[11], w_fp[0], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[20] ); // Amplitude(s) for diagram number 88 - FFV1_0( w_fp[16], w_fp[20], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[16], w_fp[20], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1620,7 +1620,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 89 - FFV1_0( w_fp[22], w_fp[14], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[22], w_fp[14], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1629,10 +1629,10 @@ namespace mg5amcCpu // *** DIAGRAM 90 OF 123 *** // Wavefunction(s) for diagram number 90 - FFV1_1( w_fp[14], w_fp[0], COUPs[1], cIPD[0], cIPD[1], w_fp[24] ); + FFV1_1( w_fp[14], w_fp[0], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[24] ); // Amplitude(s) for diagram number 90 - FFV1_0( w_fp[16], w_fp[24], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[16], w_fp[24], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1644,7 +1644,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 91 - FFV1_0( w_fp[22], w_fp[2], w_fp[10], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[22], w_fp[2], w_fp[10], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1657,7 +1657,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 92 - FFV1_0( w_fp[16], w_fp[2], w_fp[23], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[16], w_fp[2], w_fp[23], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1672,7 +1672,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 93 - VVVV1_0( w_fp[0], w_fp[6], w_fp[7], w_fp[5], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[0], w_fp[6], w_fp[7], w_fp[5], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1684,7 +1684,7 @@ namespace mg5amcCpu jamp_sv[19] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[21] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[23] -= cxtype( 0, 1 ) * amp_sv[0]; - VVVV3_0( w_fp[0], w_fp[6], w_fp[7], w_fp[5], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[0], w_fp[6], w_fp[7], w_fp[5], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1696,7 +1696,7 @@ namespace mg5amcCpu jamp_sv[15] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[21] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[23] -= cxtype( 0, 1 ) * amp_sv[0]; - VVVV4_0( w_fp[0], w_fp[6], w_fp[7], w_fp[5], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[0], w_fp[6], w_fp[7], w_fp[5], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1712,10 +1712,10 @@ namespace mg5amcCpu // *** DIAGRAM 94 OF 123 *** // Wavefunction(s) for diagram number 94 - VVV1P0_1( w_fp[0], w_fp[6], COUPs[0], 0., 0., w_fp[22] ); + VVV1P0_1( w_fp[0], w_fp[6], COUPs[0], 1.0, 0., 0., w_fp[22] ); // Amplitude(s) for diagram number 94 - VVV1_0( w_fp[7], w_fp[5], w_fp[22], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[7], w_fp[5], w_fp[22], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1731,10 +1731,10 @@ namespace mg5amcCpu // *** DIAGRAM 95 OF 123 *** // Wavefunction(s) for diagram number 95 - VVV1P0_1( w_fp[0], w_fp[7], COUPs[0], 0., 0., w_fp[25] ); + VVV1P0_1( w_fp[0], w_fp[7], COUPs[0], 1.0, 0., 0., w_fp[25] ); // Amplitude(s) for diagram number 95 - VVV1_0( w_fp[6], w_fp[5], w_fp[25], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[6], w_fp[5], w_fp[25], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1753,7 +1753,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 96 - FFV1_0( w_fp[3], w_fp[14], w_fp[22], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[14], w_fp[22], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1768,7 +1768,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 97 - FFV1_0( w_fp[3], w_fp[24], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[24], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1781,7 +1781,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 98 - FFV1_0( w_fp[13], w_fp[2], w_fp[22], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[13], w_fp[2], w_fp[22], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1796,7 +1796,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 99 - FFV1_0( w_fp[21], w_fp[2], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[21], w_fp[2], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1809,7 +1809,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 100 - VVVV1_0( w_fp[0], w_fp[18], w_fp[7], w_fp[4], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[0], w_fp[18], w_fp[7], w_fp[4], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1821,7 +1821,7 @@ namespace mg5amcCpu jamp_sv[15] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[17] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[20] += cxtype( 0, 1 ) * amp_sv[0]; - VVVV3_0( w_fp[0], w_fp[18], w_fp[7], w_fp[4], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[0], w_fp[18], w_fp[7], w_fp[4], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1833,7 +1833,7 @@ namespace mg5amcCpu jamp_sv[15] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[17] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[21] += cxtype( 0, 1 ) * amp_sv[0]; - VVVV4_0( w_fp[0], w_fp[18], w_fp[7], w_fp[4], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[0], w_fp[18], w_fp[7], w_fp[4], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1849,10 +1849,10 @@ namespace mg5amcCpu // *** DIAGRAM 101 OF 123 *** // Wavefunction(s) for diagram number 101 - VVV1P0_1( w_fp[0], w_fp[18], COUPs[0], 0., 0., w_fp[6] ); + VVV1P0_1( w_fp[0], w_fp[18], COUPs[0], 1.0, 0., 0., w_fp[6] ); // Amplitude(s) for diagram number 101 - VVV1_0( w_fp[7], w_fp[4], w_fp[6], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[7], w_fp[4], w_fp[6], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1871,7 +1871,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 102 - VVV1_0( w_fp[18], w_fp[4], w_fp[25], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[18], w_fp[4], w_fp[25], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1890,7 +1890,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 103 - FFV1_0( w_fp[3], w_fp[11], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[11], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1905,7 +1905,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 104 - FFV1_0( w_fp[3], w_fp[20], w_fp[18], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[20], w_fp[18], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1918,7 +1918,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 105 - FFV1_0( w_fp[15], w_fp[2], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[15], w_fp[2], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1933,7 +1933,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 106 - FFV1_0( w_fp[12], w_fp[2], w_fp[18], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[12], w_fp[2], w_fp[18], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1946,7 +1946,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 107 - VVVV1_0( w_fp[0], w_fp[1], w_fp[7], w_fp[10], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[0], w_fp[1], w_fp[7], w_fp[10], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1958,7 +1958,7 @@ namespace mg5amcCpu jamp_sv[17] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[22] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[23] -= cxtype( 0, 1 ) * amp_sv[0]; - VVVV3_0( w_fp[0], w_fp[1], w_fp[7], w_fp[10], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[0], w_fp[1], w_fp[7], w_fp[10], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1970,7 +1970,7 @@ namespace mg5amcCpu jamp_sv[11] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[17] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[23] -= cxtype( 0, 1 ) * amp_sv[0]; - VVVV4_0( w_fp[0], w_fp[1], w_fp[7], w_fp[10], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[0], w_fp[1], w_fp[7], w_fp[10], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1989,7 +1989,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 108 - VVV1_0( w_fp[1], w_fp[10], w_fp[25], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[10], w_fp[25], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2008,7 +2008,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 109 - VVV1_0( w_fp[1], w_fp[7], w_fp[23], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[7], w_fp[23], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2027,7 +2027,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 110 - FFV1_0( w_fp[13], w_fp[20], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[13], w_fp[20], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2039,7 +2039,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 111 - FFV1_0( w_fp[21], w_fp[11], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[21], w_fp[11], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2051,7 +2051,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 112 - FFV1_0( w_fp[15], w_fp[24], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[15], w_fp[24], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2063,7 +2063,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 113 - FFV1_0( w_fp[12], w_fp[14], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[12], w_fp[14], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2072,12 +2072,12 @@ namespace mg5amcCpu // *** DIAGRAM 114 OF 123 *** // Wavefunction(s) for diagram number 114 - VVVV1P0_1( w_fp[0], w_fp[1], w_fp[4], COUPs[2], 0., 0., w_fp[12] ); - VVVV3P0_1( w_fp[0], w_fp[1], w_fp[4], COUPs[2], 0., 0., w_fp[24] ); - VVVV4P0_1( w_fp[0], w_fp[1], w_fp[4], COUPs[2], 0., 0., w_fp[21] ); + VVVV1P0_1( w_fp[0], w_fp[1], w_fp[4], COUPs[2], 1.0, 0., 0., w_fp[12] ); + VVVV3P0_1( w_fp[0], w_fp[1], w_fp[4], COUPs[2], 1.0, 0., 0., w_fp[24] ); + VVVV4P0_1( w_fp[0], w_fp[1], w_fp[4], COUPs[2], 1.0, 0., 0., w_fp[21] ); // Amplitude(s) for diagram number 114 - VVV1_0( w_fp[12], w_fp[7], w_fp[5], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[12], w_fp[7], w_fp[5], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2089,7 +2089,7 @@ namespace mg5amcCpu jamp_sv[19] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[21] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[23] -= cxtype( 0, 1 ) * amp_sv[0]; - VVV1_0( w_fp[24], w_fp[7], w_fp[5], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[24], w_fp[7], w_fp[5], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2101,7 +2101,7 @@ namespace mg5amcCpu jamp_sv[20] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[21] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[22] -= cxtype( 0, 1 ) * amp_sv[0]; - VVV1_0( w_fp[21], w_fp[7], w_fp[5], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[21], w_fp[7], w_fp[5], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2120,7 +2120,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 115 - FFV1_0( w_fp[3], w_fp[14], w_fp[12], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[14], w_fp[12], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2128,7 +2128,7 @@ namespace mg5amcCpu jamp_sv[19] -= amp_sv[0]; jamp_sv[21] -= amp_sv[0]; jamp_sv[23] += amp_sv[0]; - FFV1_0( w_fp[3], w_fp[14], w_fp[24], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[14], w_fp[24], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2136,7 +2136,7 @@ namespace mg5amcCpu jamp_sv[20] += amp_sv[0]; jamp_sv[21] -= amp_sv[0]; jamp_sv[22] += amp_sv[0]; - FFV1_0( w_fp[3], w_fp[14], w_fp[21], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[14], w_fp[21], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2151,7 +2151,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 116 - FFV1_0( w_fp[13], w_fp[2], w_fp[12], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[13], w_fp[2], w_fp[12], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2159,7 +2159,7 @@ namespace mg5amcCpu jamp_sv[2] -= amp_sv[0]; jamp_sv[8] -= amp_sv[0]; jamp_sv[14] += amp_sv[0]; - FFV1_0( w_fp[13], w_fp[2], w_fp[24], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[13], w_fp[2], w_fp[24], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2167,7 +2167,7 @@ namespace mg5amcCpu jamp_sv[6] += amp_sv[0]; jamp_sv[8] -= amp_sv[0]; jamp_sv[12] += amp_sv[0]; - FFV1_0( w_fp[13], w_fp[2], w_fp[21], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[13], w_fp[2], w_fp[21], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2179,12 +2179,12 @@ namespace mg5amcCpu // *** DIAGRAM 117 OF 123 *** // Wavefunction(s) for diagram number 117 - VVVV1P0_1( w_fp[0], w_fp[1], w_fp[5], COUPs[2], 0., 0., w_fp[21] ); - VVVV3P0_1( w_fp[0], w_fp[1], w_fp[5], COUPs[2], 0., 0., w_fp[13] ); - VVVV4P0_1( w_fp[0], w_fp[1], w_fp[5], COUPs[2], 0., 0., w_fp[24] ); + VVVV1P0_1( w_fp[0], w_fp[1], w_fp[5], COUPs[2], 1.0, 0., 0., w_fp[21] ); + VVVV3P0_1( w_fp[0], w_fp[1], w_fp[5], COUPs[2], 1.0, 0., 0., w_fp[13] ); + VVVV4P0_1( w_fp[0], w_fp[1], w_fp[5], COUPs[2], 1.0, 0., 0., w_fp[24] ); // Amplitude(s) for diagram number 117 - VVV1_0( w_fp[21], w_fp[7], w_fp[4], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[21], w_fp[7], w_fp[4], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2196,7 +2196,7 @@ namespace mg5amcCpu jamp_sv[15] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[17] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[20] += cxtype( 0, 1 ) * amp_sv[0]; - VVV1_0( w_fp[13], w_fp[7], w_fp[4], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[13], w_fp[7], w_fp[4], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2208,7 +2208,7 @@ namespace mg5amcCpu jamp_sv[15] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[16] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[18] += cxtype( 0, 1 ) * amp_sv[0]; - VVV1_0( w_fp[24], w_fp[7], w_fp[4], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[24], w_fp[7], w_fp[4], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2227,7 +2227,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 118 - FFV1_0( w_fp[3], w_fp[11], w_fp[21], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[11], w_fp[21], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2235,7 +2235,7 @@ namespace mg5amcCpu jamp_sv[13] -= amp_sv[0]; jamp_sv[15] -= amp_sv[0]; jamp_sv[17] += amp_sv[0]; - FFV1_0( w_fp[3], w_fp[11], w_fp[13], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[11], w_fp[13], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2243,7 +2243,7 @@ namespace mg5amcCpu jamp_sv[14] += amp_sv[0]; jamp_sv[15] -= amp_sv[0]; jamp_sv[16] += amp_sv[0]; - FFV1_0( w_fp[3], w_fp[11], w_fp[24], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[11], w_fp[24], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2258,7 +2258,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 119 - FFV1_0( w_fp[15], w_fp[2], w_fp[21], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[15], w_fp[2], w_fp[21], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2266,7 +2266,7 @@ namespace mg5amcCpu jamp_sv[4] -= amp_sv[0]; jamp_sv[10] -= amp_sv[0]; jamp_sv[20] += amp_sv[0]; - FFV1_0( w_fp[15], w_fp[2], w_fp[13], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[15], w_fp[2], w_fp[13], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2274,7 +2274,7 @@ namespace mg5amcCpu jamp_sv[7] += amp_sv[0]; jamp_sv[10] -= amp_sv[0]; jamp_sv[18] += amp_sv[0]; - FFV1_0( w_fp[15], w_fp[2], w_fp[24], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[15], w_fp[2], w_fp[24], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2286,12 +2286,12 @@ namespace mg5amcCpu // *** DIAGRAM 120 OF 123 *** // Wavefunction(s) for diagram number 120 - VVVV1P0_1( w_fp[0], w_fp[4], w_fp[5], COUPs[2], 0., 0., w_fp[24] ); - VVVV3P0_1( w_fp[0], w_fp[4], w_fp[5], COUPs[2], 0., 0., w_fp[15] ); - VVVV4P0_1( w_fp[0], w_fp[4], w_fp[5], COUPs[2], 0., 0., w_fp[13] ); + VVVV1P0_1( w_fp[0], w_fp[4], w_fp[5], COUPs[2], 1.0, 0., 0., w_fp[24] ); + VVVV3P0_1( w_fp[0], w_fp[4], w_fp[5], COUPs[2], 1.0, 0., 0., w_fp[15] ); + VVVV4P0_1( w_fp[0], w_fp[4], w_fp[5], COUPs[2], 1.0, 0., 0., w_fp[13] ); // Amplitude(s) for diagram number 120 - FFV1_0( w_fp[3], w_fp[9], w_fp[24], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[9], w_fp[24], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2299,7 +2299,7 @@ namespace mg5amcCpu jamp_sv[7] -= amp_sv[0]; jamp_sv[9] -= amp_sv[0]; jamp_sv[11] += amp_sv[0]; - FFV1_0( w_fp[3], w_fp[9], w_fp[15], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[9], w_fp[15], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2307,7 +2307,7 @@ namespace mg5amcCpu jamp_sv[8] += amp_sv[0]; jamp_sv[9] -= amp_sv[0]; jamp_sv[10] += amp_sv[0]; - FFV1_0( w_fp[3], w_fp[9], w_fp[13], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[9], w_fp[13], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2322,7 +2322,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 121 - FFV1_0( w_fp[16], w_fp[2], w_fp[24], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[16], w_fp[2], w_fp[24], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2330,7 +2330,7 @@ namespace mg5amcCpu jamp_sv[5] -= amp_sv[0]; jamp_sv[16] -= amp_sv[0]; jamp_sv[22] += amp_sv[0]; - FFV1_0( w_fp[16], w_fp[2], w_fp[15], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[16], w_fp[2], w_fp[15], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2338,7 +2338,7 @@ namespace mg5amcCpu jamp_sv[13] += amp_sv[0]; jamp_sv[16] -= amp_sv[0]; jamp_sv[19] += amp_sv[0]; - FFV1_0( w_fp[16], w_fp[2], w_fp[13], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[16], w_fp[2], w_fp[13], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2353,7 +2353,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 122 - VVV1_0( w_fp[24], w_fp[1], w_fp[7], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[24], w_fp[1], w_fp[7], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2365,7 +2365,7 @@ namespace mg5amcCpu jamp_sv[11] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[16] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[22] -= cxtype( 0, 1 ) * amp_sv[0]; - VVV1_0( w_fp[15], w_fp[1], w_fp[7], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[15], w_fp[1], w_fp[7], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2377,7 +2377,7 @@ namespace mg5amcCpu jamp_sv[13] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[16] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[19] -= cxtype( 0, 1 ) * amp_sv[0]; - VVV1_0( w_fp[13], w_fp[1], w_fp[7], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[13], w_fp[1], w_fp[7], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2396,7 +2396,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 123 - VVV1_0( w_fp[0], w_fp[17], w_fp[7], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[0], w_fp[17], w_fp[7], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2408,7 +2408,7 @@ namespace mg5amcCpu jamp_sv[11] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[17] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[23] += cxtype( 0, 1 ) * amp_sv[0]; - VVV1_0( w_fp[0], w_fp[19], w_fp[7], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[0], w_fp[19], w_fp[7], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2420,7 +2420,7 @@ namespace mg5amcCpu jamp_sv[15] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[17] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[21] += cxtype( 0, 1 ) * amp_sv[0]; - VVV1_0( w_fp[0], w_fp[8], w_fp[7], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[0], w_fp[8], w_fp[7], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -3023,8 +3023,7 @@ namespace mg5amcCpu { // nprocesses>1 was last observed for "mirror processes" in uux_ttx in the 270 branch (see issue #343 and PRs #360 and #396) constexpr int nprocesses = 1; - static_assert( nprocesses == 1, "Assume nprocesses == 1" ); - // process_id corresponds to the index of DSIG1 Fortran functions (must be 1 because cudacpp is unable to handle DSIG2) + static_assert( nprocesses == 1 || nprocesses == 2, "Assume nprocesses == 1 or 2" ); constexpr int process_id = 1; // code generation source: standalone_cudacpp static_assert( process_id == 1, "Assume process_id == 1" ); } diff --git a/epochX/cudacpp/gg_ttgg.sa/SubProcesses/cudacpp.mk b/epochX/cudacpp/gg_ttgg.sa/SubProcesses/cudacpp.mk index 43cee0977e..15669185ad 100644 --- a/epochX/cudacpp/gg_ttgg.sa/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/gg_ttgg.sa/SubProcesses/cudacpp.mk @@ -1,7 +1,7 @@ # Copyright (C) 2020-2023 CERN and UCLouvain. # Licensed under the GNU Lesser General Public License (version 3 or later). # Created by: S. Roiser (Feb 2020) for the MG5aMC CUDACPP plugin. -# Further modified by: O. Mattelaer, S. Roiser, A. Valassi (2020-2023) for the MG5aMC CUDACPP plugin. +# Further modified by: J. Teig, O. Mattelaer, S. Roiser, A. Valassi (2020-2023) for the MG5aMC CUDACPP plugin. #=== Determine the name of this makefile (https://ftp.gnu.org/old-gnu/Manuals/make-3.80/html_node/make_17.html) #=== NB: different names (e.g. cudacpp.mk and cudacpp_src.mk) are used in the Subprocess and src directories @@ -86,6 +86,14 @@ endif #------------------------------------------------------------------------------- +.DEFAULT_GOAL := usage + +# Target if user does not specify target +usage: + $(error Unknown target='$(MAKECMDGOALS)': only 'cppnone', 'cppsse4', 'cppavx2', 'cpp512y', 'cpp512z' and 'cuda' are supported!) + +#------------------------------------------------------------------------------- + #=== Configure the C++ compiler CXXFLAGS = $(OPTFLAGS) -std=c++17 $(INCFLAGS) -Wall -Wshadow -Wextra @@ -103,70 +111,73 @@ endif #------------------------------------------------------------------------------- -#=== Configure the CUDA compiler - -# If CXX is not a single word (example "clang++ --gcc-toolchain...") then disable CUDA builds (issue #505) -# This is because it is impossible to pass this to "CUFLAGS += -ccbin " below -ifneq ($(words $(subst ccache ,,$(CXX))),1) # allow at most "CXX=ccache " from outside - $(warning CUDA builds are not supported for multi-word CXX "$(CXX)") - override CUDA_HOME=disabled -endif - -# If CUDA_HOME is not set, try to set it from the location of nvcc -ifndef CUDA_HOME - CUDA_HOME = $(patsubst %bin/nvcc,%,$(shell which nvcc 2>/dev/null)) - $(warning CUDA_HOME was not set: using "$(CUDA_HOME)") -endif - -# Set NVCC as $(CUDA_HOME)/bin/nvcc if it exists -ifneq ($(wildcard $(CUDA_HOME)/bin/nvcc),) - NVCC = $(CUDA_HOME)/bin/nvcc - USE_NVTX ?=-DUSE_NVTX - # See https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html - # See https://arnon.dk/matching-sm-architectures-arch-and-gencode-for-various-nvidia-cards/ - # Default: use compute capability 70 for V100 (CERN lxbatch, CERN itscrd, Juwels Cluster). - # Embed device code for 70, and PTX for 70+. - # Export MADGRAPH_CUDA_ARCHITECTURE (comma-separated list) to use another value or list of values (see #533). - # Examples: use 60 for P100 (Piz Daint), 80 for A100 (Juwels Booster, NVidia raplab/Curiosity). - MADGRAPH_CUDA_ARCHITECTURE ?= 70 - ###CUARCHFLAGS = -gencode arch=compute_$(MADGRAPH_CUDA_ARCHITECTURE),code=compute_$(MADGRAPH_CUDA_ARCHITECTURE) -gencode arch=compute_$(MADGRAPH_CUDA_ARCHITECTURE),code=sm_$(MADGRAPH_CUDA_ARCHITECTURE) # Older implementation (AV): go back to this one for multi-GPU support #533 - ###CUARCHFLAGS = --gpu-architecture=compute_$(MADGRAPH_CUDA_ARCHITECTURE) --gpu-code=sm_$(MADGRAPH_CUDA_ARCHITECTURE),compute_$(MADGRAPH_CUDA_ARCHITECTURE) # Newer implementation (SH): cannot use this as-is for multi-GPU support #533 - comma:=, - CUARCHFLAGS = $(foreach arch,$(subst $(comma), ,$(MADGRAPH_CUDA_ARCHITECTURE)),-gencode arch=compute_$(arch),code=compute_$(arch) -gencode arch=compute_$(arch),code=sm_$(arch)) - CUINC = -I$(CUDA_HOME)/include/ - CURANDLIBFLAGS = -L$(CUDA_HOME)/lib64/ -lcurand # NB: -lcuda is not needed here! - CUOPTFLAGS = -lineinfo - CUFLAGS = $(foreach opt, $(OPTFLAGS), -Xcompiler $(opt)) $(CUOPTFLAGS) $(INCFLAGS) $(CUINC) $(USE_NVTX) $(CUARCHFLAGS) -use_fast_math - ###CUFLAGS += -Xcompiler -Wall -Xcompiler -Wextra -Xcompiler -Wshadow - ###NVCC_VERSION = $(shell $(NVCC) --version | grep 'Cuda compilation tools' | cut -d' ' -f5 | cut -d, -f1) - CUFLAGS += -std=c++17 # need CUDA >= 11.2 (see #333): this is enforced in mgOnGpuConfig.h - # Without -maxrregcount: baseline throughput: 6.5E8 (16384 32 12) up to 7.3E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 160 # improves throughput: 6.9E8 (16384 32 12) up to 7.7E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 128 # improves throughput: 7.3E8 (16384 32 12) up to 7.6E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 96 # degrades throughput: 4.1E8 (16384 32 12) up to 4.5E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 64 # degrades throughput: 1.7E8 (16384 32 12) flat at 1.7E8 (65536 128 12) -else ifneq ($(origin REQUIRE_CUDA),undefined) - # If REQUIRE_CUDA is set but no cuda is found, stop here (e.g. for CI tests on GPU #443) - $(error No cuda installation found (set CUDA_HOME or make nvcc visible in PATH)) -else - # No cuda. Switch cuda compilation off and go to common random numbers in C++ - $(warning CUDA_HOME is not set or is invalid: export CUDA_HOME to compile with cuda) - override NVCC= - override USE_NVTX= - override CUINC= - override CURANDLIBFLAGS= -endif -export NVCC -export CUFLAGS +#=== Configure the CUDA compiler for the CUDA target -# Set the host C++ compiler for nvcc via "-ccbin " -# (NB issue #505: this must be a single word, "clang++ --gcc-toolchain..." is not supported) -CUFLAGS += -ccbin $(shell which $(subst ccache ,,$(CXX))) +ifneq (,$(findstring $(MAKECMDGOALS),cuda-gcheck-runGcheck-runFGcheck-cmpFGcheck-memcheck)) + # If CXX is not a single word (example "clang++ --gcc-toolchain...") then disable CUDA builds (issue #505) + # This is because it is impossible to pass this to "CUFLAGS += -ccbin " below + ifneq ($(words $(subst ccache ,,$(CXX))),1) # allow at most "CXX=ccache " from outside + $(warning CUDA builds are not supported for multi-word CXX "$(CXX)") + override CUDA_HOME=disabled + endif -# Allow newer (unsupported) C++ compilers with older versions of CUDA if ALLOW_UNSUPPORTED_COMPILER_IN_CUDA is set (#504) -ifneq ($(origin ALLOW_UNSUPPORTED_COMPILER_IN_CUDA),undefined) -CUFLAGS += -allow-unsupported-compiler -endif + # If CUDA_HOME is not set, try to set it from the location of nvcc + ifndef CUDA_HOME + CUDA_HOME = $(patsubst %bin/nvcc,%,$(shell which nvcc 2>/dev/null)) + $(warning CUDA_HOME was not set: using "$(CUDA_HOME)") + endif + + # Set NVCC as $(CUDA_HOME)/bin/nvcc if it exists + ifneq ($(wildcard $(CUDA_HOME)/bin/nvcc),) + NVCC = $(CUDA_HOME)/bin/nvcc + USE_NVTX ?=-DUSE_NVTX + # See https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html + # See https://arnon.dk/matching-sm-architectures-arch-and-gencode-for-various-nvidia-cards/ + # Default: use compute capability 70 for V100 (CERN lxbatch, CERN itscrd, Juwels Cluster). + # Embed device code for 70, and PTX for 70+. + # Export MADGRAPH_CUDA_ARCHITECTURE (comma-separated list) to use another value or list of values (see #533). + # Examples: use 60 for P100 (Piz Daint), 80 for A100 (Juwels Booster, NVidia raplab/Curiosity). + MADGRAPH_CUDA_ARCHITECTURE ?= 70 + ###CUARCHFLAGS = -gencode arch=compute_$(MADGRAPH_CUDA_ARCHITECTURE),code=compute_$(MADGRAPH_CUDA_ARCHITECTURE) -gencode arch=compute_$(MADGRAPH_CUDA_ARCHITECTURE),code=sm_$(MADGRAPH_CUDA_ARCHITECTURE) # Older implementation (AV): go back to this one for multi-GPU support #533 + ###CUARCHFLAGS = --gpu-architecture=compute_$(MADGRAPH_CUDA_ARCHITECTURE) --gpu-code=sm_$(MADGRAPH_CUDA_ARCHITECTURE),compute_$(MADGRAPH_CUDA_ARCHITECTURE) # Newer implementation (SH): cannot use this as-is for multi-GPU support #533 + comma:=, + CUARCHFLAGS = $(foreach arch,$(subst $(comma), ,$(MADGRAPH_CUDA_ARCHITECTURE)),-gencode arch=compute_$(arch),code=compute_$(arch) -gencode arch=compute_$(arch),code=sm_$(arch)) + CUINC = -I$(CUDA_HOME)/include/ + CURANDLIBFLAGS = -L$(CUDA_HOME)/lib64/ -lcurand # NB: -lcuda is not needed here! + CUOPTFLAGS = -lineinfo + CUFLAGS = $(foreach opt, $(OPTFLAGS), -Xcompiler $(opt)) $(CUOPTFLAGS) $(INCFLAGS) $(CUINC) $(USE_NVTX) $(CUARCHFLAGS) -use_fast_math + ###CUFLAGS += -Xcompiler -Wall -Xcompiler -Wextra -Xcompiler -Wshadow + ###NVCC_VERSION = $(shell $(NVCC) --version | grep 'Cuda compilation tools' | cut -d' ' -f5 | cut -d, -f1) + CUFLAGS += -std=c++17 # need CUDA >= 11.2 (see #333): this is enforced in mgOnGpuConfig.h + # Without -maxrregcount: baseline throughput: 6.5E8 (16384 32 12) up to 7.3E8 (65536 128 12) + ###CUFLAGS+= --maxrregcount 160 # improves throughput: 6.9E8 (16384 32 12) up to 7.7E8 (65536 128 12) + ###CUFLAGS+= --maxrregcount 128 # improves throughput: 7.3E8 (16384 32 12) up to 7.6E8 (65536 128 12) + ###CUFLAGS+= --maxrregcount 96 # degrades throughput: 4.1E8 (16384 32 12) up to 4.5E8 (65536 128 12) + ###CUFLAGS+= --maxrregcount 64 # degrades throughput: 1.7E8 (16384 32 12) flat at 1.7E8 (65536 128 12) + else ifneq ($(origin REQUIRE_CUDA),undefined) + # If REQUIRE_CUDA is set but no cuda is found, stop here (e.g. for CI tests on GPU #443) + $(error No cuda installation found (set CUDA_HOME or make nvcc visible in PATH)) + else + # No cuda. Switch cuda compilation off and go to common random numbers in C++ + $(warning CUDA_HOME is not set or is invalid: export CUDA_HOME to compile with cuda) + override NVCC= + override USE_NVTX= + override CUINC= + override CURANDLIBFLAGS= + endif + export NVCC + export CUFLAGS + + # Set the host C++ compiler for nvcc via "-ccbin " + # (NB issue #505: this must be a single word, "clang++ --gcc-toolchain..." is not supported) + CUFLAGS += -ccbin $(shell which $(subst ccache ,,$(CXX))) + + # Allow newer (unsupported) C++ compilers with older versions of CUDA if ALLOW_UNSUPPORTED_COMPILER_IN_CUDA is set (#504) + ifneq ($(origin ALLOW_UNSUPPORTED_COMPILER_IN_CUDA),undefined) + CUFLAGS += -allow-unsupported-compiler + endif + +endif # ($(MAKECMDGOALS),cuda) #------------------------------------------------------------------------------- @@ -226,32 +237,6 @@ override OMPFLAGS = -fopenmp ###override OMPFLAGS = # disable OpenMP MT (default before #575) endif -# Set the default AVX (vectorization) choice -ifeq ($(AVX),) - ifeq ($(UNAME_P),ppc64le) - ###override AVX = none - override AVX = sse4 - else ifeq ($(UNAME_P),arm) - ###override AVX = none - override AVX = sse4 - else ifeq ($(wildcard /proc/cpuinfo),) - override AVX = none - $(warning Using AVX='$(AVX)' because host SIMD features cannot be read from /proc/cpuinfo) - else ifeq ($(shell grep -m1 -c avx512vl /proc/cpuinfo)$(shell $(CXX) --version | grep ^clang),1) - override AVX = 512y - ###$(info Using AVX='$(AVX)' as no user input exists) - else - override AVX = avx2 - ifneq ($(shell grep -m1 -c avx512vl /proc/cpuinfo),1) - $(warning Using AVX='$(AVX)' because host does not support avx512vl) - else - $(warning Using AVX='$(AVX)' because this is faster than avx512vl for clang) - endif - endif -else - ###$(info Using AVX='$(AVX)' according to user input) -endif - # Set the default FPTYPE (floating point type) choice ifeq ($(FPTYPE),) override FPTYPE = d @@ -276,6 +261,21 @@ ifeq ($(RNDGEN),) endif endif +# set the correct AVX based on avxcpp target +ifeq ($(MAKECMDGOALS),cppnone) # no SIMD + override AVX = none +else ifeq ($(MAKECMDGOALS),cppsse4) # SSE4.2 with 128 width (xmm registers) + override AVX = sse4 +else ifeq ($(MAKECMDGOALS),cppavx2) # AVX2 with 256 width (ymm registers) [DEFAULT for clang] + override AVX = avx2 +else ifeq ($(MAKECMDGOALS),cpp512y) # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] + override AVX = 512y +else ifeq ($(MAKECMDGOALS),cpp512z) # AVX512 with 512 width (zmm registers) + override AVX = 512z +else + override AVX = none +endif + # Export AVX, FPTYPE, HELINL, HRDCOD, RNDGEN, OMPFLAGS so that it is not necessary to pass them to the src Makefile too export AVX export FPTYPE @@ -295,50 +295,52 @@ CXXFLAGS += $(OMPFLAGS) # Set the build flags appropriate to each AVX choice (example: "make AVX=none") # [NB MGONGPU_PVW512 is needed because "-mprefer-vector-width=256" is not exposed in a macro] # [See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96476] -$(info AVX=$(AVX)) -ifeq ($(UNAME_P),ppc64le) - ifeq ($(AVX),sse4) - override AVXFLAGS = -D__SSE4_2__ # Power9 VSX with 128 width (VSR registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on PowerPC for the moment) - endif -else ifeq ($(UNAME_P),arm) - ifeq ($(AVX),sse4) - override AVXFLAGS = -D__SSE4_2__ # ARM NEON with 128 width (Q/quadword registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on ARM for the moment) - endif -else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 - ifeq ($(AVX),none) - override AVXFLAGS = -mno-sse3 # no SIMD - else ifeq ($(AVX),sse4) - override AVXFLAGS = -mno-avx # SSE4.2 with 128 width (xmm registers) - else ifeq ($(AVX),avx2) - override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(AVX),512y) - override AVXFLAGS = -march=skylake -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(AVX),512z) - override AVXFLAGS = -march=skylake -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) - else - $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) - endif -else - ifeq ($(AVX),none) - override AVXFLAGS = -march=x86-64 # no SIMD (see #588) - else ifeq ($(AVX),sse4) - override AVXFLAGS = -march=nehalem # SSE4.2 with 128 width (xmm registers) - else ifeq ($(AVX),avx2) - override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(AVX),512y) - override AVXFLAGS = -march=skylake-avx512 -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(AVX),512z) - override AVXFLAGS = -march=skylake-avx512 -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) +ifeq ($(findstring cpp,$(MAKECMDGOALS)),cpp) + $(info AVX=$(AVX)) + ifeq ($(UNAME_P),ppc64le) + ifeq ($(AVX),sse4) + override AVXFLAGS = -D__SSE4_2__ # Power9 VSX with 128 width (VSR registers) + else ifneq ($(AVX),none) + $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on PowerPC for the moment) + endif + else ifeq ($(UNAME_P),arm) + ifeq ($(AVX),sse4) + override AVXFLAGS = -D__SSE4_2__ # ARM NEON with 128 width (Q/quadword registers) + else ifneq ($(AVX),none) + $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on ARM for the moment) + endif + else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 + ifeq ($(AVX),none) + override AVXFLAGS = -mno-sse3 # no SIMD + else ifeq ($(AVX),sse4) + override AVXFLAGS = -mno-avx # SSE4.2 with 128 width (xmm registers) + else ifeq ($(AVX),avx2) + override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] + else ifeq ($(AVX),512y) + override AVXFLAGS = -march=skylake -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] + else ifeq ($(AVX),512z) + override AVXFLAGS = -march=skylake -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) + else + $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) + endif else - $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) + ifeq ($(AVX),none) + override AVXFLAGS = -march=x86-64 # no SIMD (see #588) + else ifeq ($(AVX),sse4) + override AVXFLAGS = -march=nehalem # SSE4.2 with 128 width (xmm registers) + else ifeq ($(AVX),avx2) + override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] + else ifeq ($(AVX),512y) + override AVXFLAGS = -march=skylake-avx512 -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] + else ifeq ($(AVX),512z) + override AVXFLAGS = -march=skylake-avx512 -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) + else + $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) + endif endif + # For the moment, use AVXFLAGS everywhere: eventually, use them only in encapsulated implementations? + CXXFLAGS+= $(AVXFLAGS) endif -# For the moment, use AVXFLAGS everywhere: eventually, use them only in encapsulated implementations? -CXXFLAGS+= $(AVXFLAGS) # Set the build flags appropriate to each FPTYPE choice (example: "make FPTYPE=f") $(info FPTYPE=$(FPTYPE)) @@ -389,11 +391,19 @@ endif # Build directory "short" tag (defines target and path to the optional build directory) # (Rationale: keep directory names shorter, e.g. do not include random number generator choice) -override DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) +ifneq ($(NVCC),) + override DIRTAG = cuda_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) +else + override DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) +endif # Build lockfile "full" tag (defines full specification of build options that cannot be intermixed) # (Rationale: avoid mixing of CUDA and no-CUDA environment builds with different random number generators) -override TAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) +ifneq ($(NVCC),) + override TAG = cuda_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) +else + override TAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) +endif # Build directory: current directory by default, or build.$(DIRTAG) if USEBUILDDIR==1 ifeq ($(USEBUILDDIR),1) @@ -448,9 +458,9 @@ endif testmain=$(BUILDDIR)/runTest.exe ifneq ($(GTESTLIBS),) -all.$(TAG): $(BUILDDIR)/.build.$(TAG) $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_main) $(cxx_main) $(fcu_main) $(fcxx_main) $(testmain) +all.$(TAG): $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_main) $(cxx_main) $(fcu_main) $(fcxx_main) $(testmain) else -all.$(TAG): $(BUILDDIR)/.build.$(TAG) $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_main) $(cxx_main) $(fcu_main) $(fcxx_main) +all.$(TAG): $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_main) $(cxx_main) $(fcu_main) $(fcxx_main) endif # Target (and build options): debug @@ -460,27 +470,20 @@ debug: CUOPTFLAGS = -G debug: MAKEDEBUG := debug debug: all.$(TAG) -# Target: tag-specific build lockfiles -override oldtagsb=`if [ -d $(BUILDDIR) ]; then find $(BUILDDIR) -maxdepth 1 -name '.build.*' ! -name '.build.$(TAG)' -exec echo $(shell pwd)/{} \; ; fi` -$(BUILDDIR)/.build.$(TAG): - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - @if [ "$(oldtagsb)" != "" ]; then echo "Cannot build for tag=$(TAG) as old builds exist for other tags:"; echo " $(oldtagsb)"; echo "Please run 'make clean' first\nIf 'make clean' is not enough: run 'make clean USEBUILDDIR=1 AVX=$(AVX) FPTYPE=$(FPTYPE)' or 'make cleanall'"; exit 1; fi - @touch $(BUILDDIR)/.build.$(TAG) - # Generic target and build rules: objects from CUDA compilation ifneq ($(NVCC),) -$(BUILDDIR)/%.o : %.cu *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) +$(BUILDDIR)/%.o : %.cu *.h ../../src/*.h @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c $< -o $@ -$(BUILDDIR)/%_cu.o : %.cc *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) +$(BUILDDIR)/%_cu.o : %.cc *.h ../../src/*.h @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c -x cu $< -o $@ endif # Generic target and build rules: objects from C++ compilation # (NB do not include CUINC here! add it only for NVTX or curand #679) -$(BUILDDIR)/%.o : %.cc *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) +$(BUILDDIR)/%.o : %.cc *.h ../../src/*.h @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi $(CXX) $(CPPFLAGS) $(CXXFLAGS) -fPIC -c $< -o $@ @@ -532,7 +535,7 @@ endif # Target (and build rules): common (src) library commonlib : $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so -$(LIBDIR)/lib$(MG5AMC_COMMONLIB).so: ../../src/*.h ../../src/*.cc $(BUILDDIR)/.build.$(TAG) +$(LIBDIR)/lib$(MG5AMC_COMMONLIB).so: ../../src/*.h ../../src/*.cc $(MAKE) -C ../../src $(MAKEDEBUG) -f $(CUDACPP_SRC_MAKEFILE) #------------------------------------------------------------------------------- @@ -711,35 +714,27 @@ endif # Target: build all targets in all AVX modes (each AVX mode in a separate build directory) # Split the avxall target into five separate targets to allow parallel 'make -j avxall' builds # (Hack: add a fbridge.inc dependency to avxall, to ensure it is only copied once for all AVX modes) -avxnone: - @echo - $(MAKE) USEBUILDDIR=1 AVX=none -f $(CUDACPP_MAKEFILE) +cppnone: $(cxx_main) -avxsse4: - @echo - $(MAKE) USEBUILDDIR=1 AVX=sse4 -f $(CUDACPP_MAKEFILE) +cppsse4: $(cxx_main) -avxavx2: - @echo - $(MAKE) USEBUILDDIR=1 AVX=avx2 -f $(CUDACPP_MAKEFILE) +cppavx2: $(cxx_main) -avx512y: - @echo - $(MAKE) USEBUILDDIR=1 AVX=512y -f $(CUDACPP_MAKEFILE) +cpp512y: $(cxx_main) -avx512z: - @echo - $(MAKE) USEBUILDDIR=1 AVX=512z -f $(CUDACPP_MAKEFILE) +cpp512z: $(cxx_main) + +cuda: $(cu_main) ifeq ($(UNAME_P),ppc64le) ###avxall: $(INCDIR)/fbridge.inc avxnone avxsse4 -avxall: avxnone avxsse4 +cppall: cppnone cppsse4 else ifeq ($(UNAME_P),arm) ###avxall: $(INCDIR)/fbridge.inc avxnone avxsse4 -avxall: avxnone avxsse4 +cppall: cppnone cppsse4 else ###avxall: $(INCDIR)/fbridge.inc avxnone avxsse4 avxavx2 avx512y avx512z -avxall: avxnone avxsse4 avxavx2 avx512y avx512z +cppall: cppnone cppsse4 cppavx2 cpp512y cpp512z endif #------------------------------------------------------------------------------- @@ -747,21 +742,31 @@ endif # Target: clean the builds .PHONY: clean +BUILD_DIRS := $(wildcard build.*) +NUM_BUILD_DIRS := $(words $(BUILD_DIRS)) + clean: ifeq ($(USEBUILDDIR),1) - rm -rf $(BUILDDIR) +ifeq ($(NUM_BUILD_DIRS),1) + $(info USEBUILDDIR=1, Only one build directory found.) + rm -rf $(BUILD_DIRS) +else ifeq ($(NUM_BUILD_DIRS),0) + $(error USEBUILDDIR=1, but no build directories are found.) else - rm -f $(BUILDDIR)/.build.* $(BUILDDIR)/*.o $(BUILDDIR)/*.exe + $(error Multiple BUILDDIR's found! Use 'cleannone', 'cleansse4', 'cleanavx2', 'clean512y','clean512z', 'cleancuda' or 'cleanall'.) +endif +else + rm -f $(BUILDDIR)/*.o $(BUILDDIR)/*.exe rm -f $(LIBDIR)/lib$(MG5AMC_CXXLIB).so $(LIBDIR)/lib$(MG5AMC_CULIB).so endif $(MAKE) -C ../../src clean -f $(CUDACPP_SRC_MAKEFILE) -### rm -rf $(INCDIR) cleanall: @echo - $(MAKE) USEBUILDDIR=0 clean -f $(CUDACPP_MAKEFILE) + rm -f $(BUILDDIR)/*.o $(BUILDDIR)/*.exe + rm -f $(LIBDIR)/lib$(MG5AMC_CXXLIB).so $(LIBDIR)/lib$(MG5AMC_CULIB).so @echo - $(MAKE) USEBUILDDIR=0 -C ../../src cleanall -f $(CUDACPP_SRC_MAKEFILE) + $(MAKE) -C ../../src cleanall -f $(CUDACPP_SRC_MAKEFILE) rm -rf build.* # Target: clean the builds as well as the gtest installation(s) @@ -771,6 +776,42 @@ ifneq ($(wildcard $(TESTDIRCOMMON)),) endif $(MAKE) -C $(TESTDIRLOCAL) clean +# Target: clean different builds +cleannone: + rm -rf build.none_* + rm -f ../../lib/build.none_*/lib$(MG5AMC_CXXLIB).so + $(MAKE) -C ../../src cleannone -f $(CUDACPP_SRC_MAKEFILE) + +cleansse4: + rm -rf build.sse4_* + rm -f ../../lib/build.sse4_*/lib$(MG5AMC_CXXLIB).so + $(MAKE) -C ../../src cleansse4 -f $(CUDACPP_SRC_MAKEFILE) + +cleanavx2: + rm -rf build.avx2_* + rm -f ../../lib/build.avx2_*/lib$(MG5AMC_CXXLIB).so + $(MAKE) -C ../../src cleanavx2 -f $(CUDACPP_SRC_MAKEFILE) + +clean512y: + rm -rf build.512y_* + rm -f ../../lib/build.512y_*/lib$(MG5AMC_CXXLIB).so + $(MAKE) -C ../../src clean512y -f $(CUDACPP_SRC_MAKEFILE) + +clean512z: + rm -rf build.512z_* + rm -f ../../lib/build.512z_*/lib$(MG5AMC_CXXLIB).so + $(MAKE) -C ../../src clean512z -f $(CUDACPP_SRC_MAKEFILE) + +cleancuda: + rm -rf build.cuda_* + rm -f ../../lib/build.cuda_*/lib$(MG5AMC_CULIB).so + $(MAKE) -C ../../src cleancuda -f $(CUDACPP_SRC_MAKEFILE) + +cleandir: + rm -f ./*.o ./*.exe + rm -f ../../lib/lib$(MG5AMC_CXXLIB).so ../../lib/lib$(MG5AMC_CULIB).so + $(MAKE) -C ../../src cleandir -f $(CUDACPP_SRC_MAKEFILE) + #------------------------------------------------------------------------------- # Target: show system and compiler information @@ -817,13 +858,10 @@ endif #------------------------------------------------------------------------------- -# Target: check (run the C++ test executable) +# Target: check/gcheck (run the C++ test executable) # [NB THIS IS WHAT IS USED IN THE GITHUB CI!] -ifneq ($(NVCC),) -check: runTest cmpFcheck cmpFGcheck -else check: runTest cmpFcheck -endif +gcheck: runTest cmpFGcheck # Target: runTest (run the C++ test executable runTest.exe) runTest: all.$(TAG) @@ -863,4 +901,4 @@ cmpFGcheck: all.$(TAG) memcheck: all.$(TAG) $(RUNTIME) $(CUDA_HOME)/bin/cuda-memcheck --check-api-memory-access yes --check-deprecated-instr yes --check-device-heap yes --demangle full --language c --leak-check full --racecheck-report all --report-api-errors all --show-backtrace yes --tool memcheck --track-unused-memory yes $(BUILDDIR)/gcheck.exe -p 2 32 2 -#------------------------------------------------------------------------------- +#------------------------------------------------------------------------------- \ No newline at end of file diff --git a/epochX/cudacpp/gg_ttgg.sa/src/HelAmps_sm.h b/epochX/cudacpp/gg_ttgg.sa/src/HelAmps_sm.h index 9cea8bcbe7..9b946c21e1 100644 --- a/epochX/cudacpp/gg_ttgg.sa/src/HelAmps_sm.h +++ b/epochX/cudacpp/gg_ttgg.sa/src/HelAmps_sm.h @@ -863,6 +863,7 @@ namespace mg5amcCpu const fptype allV2[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, fptype allvertexes[] ) ALWAYS_INLINE; //-------------------------------------------------------------------------- @@ -873,6 +874,7 @@ namespace mg5amcCpu VVV1P0_1( const fptype allV2[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, const fptype M1, const fptype W1, fptype allV1[] ) ALWAYS_INLINE; @@ -886,6 +888,7 @@ namespace mg5amcCpu const fptype allF2[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, fptype allvertexes[] ) ALWAYS_INLINE; //-------------------------------------------------------------------------- @@ -896,6 +899,7 @@ namespace mg5amcCpu FFV1_1( const fptype allF2[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, const fptype M1, const fptype W1, fptype allF1[] ) ALWAYS_INLINE; @@ -908,6 +912,7 @@ namespace mg5amcCpu FFV1_2( const fptype allF1[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, const fptype M2, const fptype W2, fptype allF2[] ) ALWAYS_INLINE; @@ -920,6 +925,7 @@ namespace mg5amcCpu FFV1P0_3( const fptype allF1[], const fptype allF2[], const fptype allCOUP[], + const double Ccoeff, const fptype M3, const fptype W3, fptype allV3[] ) ALWAYS_INLINE; @@ -934,6 +940,7 @@ namespace mg5amcCpu const fptype allV3[], const fptype allV4[], const fptype allCOUP[], + const double Ccoeff, fptype allvertexes[] ) ALWAYS_INLINE; //-------------------------------------------------------------------------- @@ -945,6 +952,7 @@ namespace mg5amcCpu const fptype allV3[], const fptype allV4[], const fptype allCOUP[], + const double Ccoeff, const fptype M1, const fptype W1, fptype allV1[] ) ALWAYS_INLINE; @@ -959,6 +967,7 @@ namespace mg5amcCpu const fptype allV3[], const fptype allV4[], const fptype allCOUP[], + const double Ccoeff, fptype allvertexes[] ) ALWAYS_INLINE; //-------------------------------------------------------------------------- @@ -970,6 +979,7 @@ namespace mg5amcCpu const fptype allV3[], const fptype allV4[], const fptype allCOUP[], + const double Ccoeff, const fptype M1, const fptype W1, fptype allV1[] ) ALWAYS_INLINE; @@ -984,6 +994,7 @@ namespace mg5amcCpu const fptype allV3[], const fptype allV4[], const fptype allCOUP[], + const double Ccoeff, fptype allvertexes[] ) ALWAYS_INLINE; //-------------------------------------------------------------------------- @@ -995,6 +1006,7 @@ namespace mg5amcCpu const fptype allV3[], const fptype allV4[], const fptype allCOUP[], + const double Ccoeff, const fptype M1, const fptype W1, fptype allV1[] ) ALWAYS_INLINE; @@ -1008,6 +1020,7 @@ namespace mg5amcCpu const fptype allV2[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, fptype allvertexes[] ) { mgDebug( 0, __FUNCTION__ ); @@ -1042,6 +1055,7 @@ namespace mg5amcCpu VVV1P0_1( const fptype allV2[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, const fptype M1, const fptype W1, fptype allV1[] ) @@ -1080,6 +1094,7 @@ namespace mg5amcCpu const fptype allF2[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, fptype allvertexes[] ) { mgDebug( 0, __FUNCTION__ ); @@ -1103,6 +1118,7 @@ namespace mg5amcCpu FFV1_1( const fptype allF2[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, const fptype M1, const fptype W1, fptype allF1[] ) @@ -1134,6 +1150,7 @@ namespace mg5amcCpu FFV1_2( const fptype allF1[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, const fptype M2, const fptype W2, fptype allF2[] ) @@ -1165,6 +1182,7 @@ namespace mg5amcCpu FFV1P0_3( const fptype allF1[], const fptype allF2[], const fptype allCOUP[], + const double Ccoeff, const fptype M3, const fptype W3, fptype allV3[] ) @@ -1197,6 +1215,7 @@ namespace mg5amcCpu const fptype allV3[], const fptype allV4[], const fptype allCOUP[], + const double Ccoeff, fptype allvertexes[] ) { mgDebug( 0, __FUNCTION__ ); @@ -1225,6 +1244,7 @@ namespace mg5amcCpu const fptype allV3[], const fptype allV4[], const fptype allCOUP[], + const double Ccoeff, const fptype M1, const fptype W1, fptype allV1[] ) @@ -1260,6 +1280,7 @@ namespace mg5amcCpu const fptype allV3[], const fptype allV4[], const fptype allCOUP[], + const double Ccoeff, fptype allvertexes[] ) { mgDebug( 0, __FUNCTION__ ); @@ -1288,6 +1309,7 @@ namespace mg5amcCpu const fptype allV3[], const fptype allV4[], const fptype allCOUP[], + const double Ccoeff, const fptype M1, const fptype W1, fptype allV1[] ) @@ -1323,6 +1345,7 @@ namespace mg5amcCpu const fptype allV3[], const fptype allV4[], const fptype allCOUP[], + const double Ccoeff, fptype allvertexes[] ) { mgDebug( 0, __FUNCTION__ ); @@ -1351,6 +1374,7 @@ namespace mg5amcCpu const fptype allV3[], const fptype allV4[], const fptype allCOUP[], + const double Ccoeff, const fptype M1, const fptype W1, fptype allV1[] ) diff --git a/epochX/cudacpp/gg_ttgg.sa/src/cudacpp_src.mk b/epochX/cudacpp/gg_ttgg.sa/src/cudacpp_src.mk index 554d7a704c..750986464e 100644 --- a/epochX/cudacpp/gg_ttgg.sa/src/cudacpp_src.mk +++ b/epochX/cudacpp/gg_ttgg.sa/src/cudacpp_src.mk @@ -1,7 +1,7 @@ # Copyright (C) 2020-2023 CERN and UCLouvain. # Licensed under the GNU Lesser General Public License (version 3 or later). # Created by: S. Roiser (Feb 2020) for the MG5aMC CUDACPP plugin. -# Further modified by: O. Mattelaer, S. Roiser, A. Valassi (2020-2023) for the MG5aMC CUDACPP plugin. +# Further modified by: J. Teig, O. Mattelaer, S. Roiser, A. Valassi (2020-2023) for the MG5aMC CUDACPP plugin. #=== Determine the name of this makefile (https://ftp.gnu.org/old-gnu/Manuals/make-3.80/html_node/make_17.html) #=== NB: assume that the same name (e.g. cudacpp.mk, Makefile...) is used in the Subprocess and src directories @@ -88,50 +88,52 @@ CXXFLAGS += $(OMPFLAGS) # Set the build flags appropriate to each AVX choice (example: "make AVX=none") # [NB MGONGPU_PVW512 is needed because "-mprefer-vector-width=256" is not exposed in a macro] # [See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96476] -$(info AVX=$(AVX)) -ifeq ($(UNAME_P),ppc64le) - ifeq ($(AVX),sse4) - override AVXFLAGS = -D__SSE4_2__ # Power9 VSX with 128 width (VSR registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on PowerPC for the moment) - endif -else ifeq ($(UNAME_P),arm) - ifeq ($(AVX),sse4) - override AVXFLAGS = -D__SSE4_2__ # ARM NEON with 128 width (Q/quadword registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on ARM for the moment) - endif -else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 - ifeq ($(AVX),none) - override AVXFLAGS = -mno-sse3 # no SIMD - else ifeq ($(AVX),sse4) - override AVXFLAGS = -mno-avx # SSE4.2 with 128 width (xmm registers) - else ifeq ($(AVX),avx2) - override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(AVX),512y) - override AVXFLAGS = -march=skylake -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(AVX),512z) - override AVXFLAGS = -march=skylake -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) +ifeq ($(NVCC),) + $(info AVX=$(AVX)) + ifeq ($(UNAME_P),ppc64le) + ifeq ($(AVX),sse4) + override AVXFLAGS = -D__SSE4_2__ # Power9 VSX with 128 width (VSR registers) + else ifneq ($(AVX),none) + $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on PowerPC for the moment) + endif + else ifeq ($(UNAME_P),arm) + ifeq ($(AVX),sse4) + override AVXFLAGS = -D__SSE4_2__ # ARM NEON with 128 width (Q/quadword registers) + else ifneq ($(AVX),none) + $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on ARM for the moment) + endif + else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 + ifeq ($(AVX),none) + override AVXFLAGS = -mno-sse3 # no SIMD + else ifeq ($(AVX),sse4) + override AVXFLAGS = -mno-avx # SSE4.2 with 128 width (xmm registers) + else ifeq ($(AVX),avx2) + override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] + else ifeq ($(AVX),512y) + override AVXFLAGS = -march=skylake -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] + else ifeq ($(AVX),512z) + override AVXFLAGS = -march=skylake -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) + else + $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) + endif else - $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) - endif -else - ifeq ($(AVX),none) - override AVXFLAGS = -march=x86-64 # no SIMD (see #588) - else ifeq ($(AVX),sse4) - override AVXFLAGS = -march=nehalem # SSE4.2 with 128 width (xmm registers) - else ifeq ($(AVX),avx2) - override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(AVX),512y) - override AVXFLAGS = -march=skylake-avx512 -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(AVX),512z) - override AVXFLAGS = -march=skylake-avx512 -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) + ifeq ($(AVX),none) + override AVXFLAGS = -march=x86-64 # no SIMD (see #588) + else ifeq ($(AVX),sse4) + override AVXFLAGS = -march=nehalem # SSE4.2 with 128 width (xmm registers) + else ifeq ($(AVX),avx2) + override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] + else ifeq ($(AVX),512y) + override AVXFLAGS = -march=skylake-avx512 -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] + else ifeq ($(AVX),512z) + override AVXFLAGS = -march=skylake-avx512 -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) + else ifneq ($(AVX),none) + $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) + endif endif + # For the moment, use AVXFLAGS everywhere: eventually, use them only in encapsulated implementations? + CXXFLAGS+= $(AVXFLAGS) endif -# For the moment, use AVXFLAGS everywhere: eventually, use them only in encapsulated implementations? -CXXFLAGS+= $(AVXFLAGS) # Set the build flags appropriate to each FPTYPE choice (example: "make FPTYPE=f") ###$(info FPTYPE=$(FPTYPE)) @@ -175,11 +177,19 @@ endif # Build directory "short" tag (defines target and path to the optional build directory) # (Rationale: keep directory names shorter, e.g. do not include random number generator choice) -override DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) +ifneq ($(NVCC),) + override DIRTAG = cuda_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) +else + override DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) +endif # Build lockfile "full" tag (defines full specification of build options that cannot be intermixed) # (Rationale: avoid mixing of CUDA and no-CUDA environment builds with different random number generators) -override TAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) +ifneq ($(NVCC),) + override TAG = cuda_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) +else + override TAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) +endif # Build directory: current directory by default, or build.$(DIRTAG) if USEBUILDDIR==1 ###$(info Current directory is $(shell pwd)) @@ -216,35 +226,21 @@ endif MG5AMC_COMMONLIB = mg5amc_common # First target (default goal) -all.$(TAG): $(BUILDDIR)/.build.$(TAG) $(LIBDIR)/.build.$(TAG) $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so +all.$(TAG): $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so # Target (and build options): debug debug: OPTFLAGS = -g -O0 debug: all.$(TAG) -# Target: tag-specific build lockfiles -override oldtagsb=`if [ -d $(BUILDDIR) ]; then find $(BUILDDIR) -maxdepth 1 -name '.build.*' ! -name '.build.$(TAG)' -exec echo $(shell pwd)/{} \; ; fi` -override oldtagsl=`if [ -d $(LIBDIR) ]; then find $(LIBDIR) -maxdepth 1 -name '.build.*' ! -name '.build.$(TAG)' -exec echo $(shell pwd)/{} \; ; fi` - -$(BUILDDIR)/.build.$(TAG): $(LIBDIR)/.build.$(TAG) - -$(LIBDIR)/.build.$(TAG): - @if [ "$(oldtagsl)" != "" ]; then echo -e "Cannot build for tag=$(TAG) as old builds exist in $(LIBDIR) for other tags:\n$(oldtagsl)\nPlease run 'make clean' first\nIf 'make clean' is not enough: run 'make clean USEBUILDDIR=1 AVX=$(AVX) FPTYPE=$(FPTYPE)' or 'make cleanall'"; exit 1; fi - @if [ "$(oldtagsb)" != "" ]; then echo -e "Cannot build for tag=$(TAG) as old builds exist in $(BUILDDIR) for other tags:\n$(oldtagsb)\nPlease run 'make clean' first\nIf 'make clean' is not enough: run 'make clean USEBUILDDIR=1 AVX=$(AVX) FPTYPE=$(FPTYPE)' or 'make cleanall'"; exit 1; fi - @if [ ! -d $(LIBDIR) ]; then echo "mkdir -p $(LIBDIR)"; mkdir -p $(LIBDIR); fi - @touch $(LIBDIR)/.build.$(TAG) - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - @touch $(BUILDDIR)/.build.$(TAG) - #------------------------------------------------------------------------------- # Generic target and build rules: objects from C++ compilation -$(BUILDDIR)/%.o : %.cc *.h $(BUILDDIR)/.build.$(TAG) +$(BUILDDIR)/%.o : %.cc *.h @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi $(CXX) $(CPPFLAGS) $(CXXFLAGS) -fPIC -c $< -o $@ # Generic target and build rules: objects from CUDA compilation -$(BUILDDIR)/%_cu.o : %.cc *.h $(BUILDDIR)/.build.$(TAG) +$(BUILDDIR)/%_cu.o : %.cc *.h @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c -x cu $< -o $@ @@ -271,20 +267,61 @@ endif # Target: clean the builds .PHONY: clean +BUILD_DIRS := $(wildcard build.*) +NUM_BUILD_DIRS := $(words $(BUILD_DIRS)) + clean: ifeq ($(USEBUILDDIR),1) - rm -rf $(LIBDIR) - rm -rf $(BUILDDIR) +ifeq ($(NUM_BUILD_DIRS),1) + $(info USEBUILDDIR=1, only one src build directory found.) + rm -rf ../lib/$(BUILD_DIRS) + rm -rf $(BUILD_DIRS) +else ifeq ($(NUM_BUILD_DIRS),0) + $(error USEBUILDDIR=1, but no src build directories are found.) else - rm -f $(LIBDIR)/.build.* $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so - rm -f $(BUILDDIR)/.build.* $(BUILDDIR)/*.o $(BUILDDIR)/*.exe + $(error Multiple src BUILDDIR's found! Use 'cleannone', 'cleansse4', 'cleanavx2', 'clean512y','clean512z', 'cleancuda' or 'cleanall'.) +endif +else + rm -f ../lib/lib$(MG5AMC_COMMONLIB).so + rm -f $(BUILDDIR)/*.o $(BUILDDIR)/*.exe endif cleanall: @echo - $(MAKE) clean -f $(THISMK) + rm -f ../lib/lib$(MG5AMC_COMMONLIB).so + rm -f $(BUILDDIR)/*.o $(BUILDDIR)/*.exe @echo - rm -rf $(LIBDIR)/build.* + rm -rf ../lib/build.* rm -rf build.* +# Target: clean different builds + +cleannone: + rm -rf ../lib/build.none_* + rm -rf build.none_* + +cleansse4: + rm -rf ../lib/build.sse4_* + rm -rf build.sse4_* + +cleanavx2: + rm -rf ../lib/build.avx2_* + rm -rf build.avx2_* + +clean512y: + rm -rf ../lib/build.512y_* + rm -rf build.512y_* + +clean512z: + rm -rf ../lib/build.512z_* + rm -rf build.512z_* + +cleancuda: + rm -rf ../lib/build.cuda_* + rm -rf build.cuda_* + +cleandir: + rm -f ./*.o ./*.exe + rm -f ../lib/lib$(MG5AMC_COMMONLIB).so + #------------------------------------------------------------------------------- diff --git a/epochX/cudacpp/gg_ttggg.mad/Cards/delphes_trigger.dat b/epochX/cudacpp/gg_ttggg.mad/Cards/delphes_trigger.dat new file mode 100644 index 0000000000..0aab0677aa --- /dev/null +++ b/epochX/cudacpp/gg_ttggg.mad/Cards/delphes_trigger.dat @@ -0,0 +1,20 @@ +#TRIGGER CARD # DO NOT REMOVE THIS IS A TAG! + +# list of trigger algorithms +# trigger_name >> algorithm #comments +Inclusive electron >> ELEC1_PT: '29' +di-electron >> ELEC1_PT: '17' && ELEC2_PT: '17' +Inclusive Photon >> GAMMA1_PT: '80' +di-Photon >> GAMMA1_PT: '40' && GAMMA2_PT: '25' +Inclusive muon >> MUON1_PT: '19' +di-muon >> MUON1_PT: '7' && MUON2_PT: '7' +Taujet and ETmis >> TAU1_PT: '86' && ETMIS_PT: '65' +di-Taujets >> TAU1_PT: '59' && TAU2_PT: '59' +Jet and ETmis >> JET1_PT: '180' && ETMIS_PT: '123' +Taujet and electron >> TAU1_PT: '45' && ELEC1_PT: '19' +Taujet and muon >> TAU1_PT: '40' && ELEC1_PT: '15' +Inclusive b-jet >> Bjet1_PT: '237' +Inclusive 1 jet >> JET1_PT: '657' +Inclusive 3 jets >> JET1_PT: '247' && JET2_PT: '247' && JET3_PT: '247' +Inclusive 4 jets >> JET1_PT: '113' && JET2_PT: '113' && JET3_PT: '113' && JET4_PT: '113' + diff --git a/epochX/cudacpp/gg_ttggg.mad/Cards/me5_configuration.txt b/epochX/cudacpp/gg_ttggg.mad/Cards/me5_configuration.txt index 27acb12a1e..8a0c1e6345 100644 --- a/epochX/cudacpp/gg_ttggg.mad/Cards/me5_configuration.txt +++ b/epochX/cudacpp/gg_ttggg.mad/Cards/me5_configuration.txt @@ -234,7 +234,7 @@ # pineappl = pineappl -mg5_path = /data/stephan/madgraph4gpu/MG5aMC/mg5amcnlo +mg5_path = /afs/cern.ch/work/j/jteig/madgraph4gpu/MG5aMC/mg5amcnlo # MG5 MAIN DIRECTORY -mg5_path = /data/stephan/madgraph4gpu/MG5aMC/mg5amcnlo +mg5_path = /afs/cern.ch/work/j/jteig/madgraph4gpu/MG5aMC/mg5amcnlo diff --git a/epochX/cudacpp/gg_ttggg.mad/Cards/plot_card.dat b/epochX/cudacpp/gg_ttggg.mad/Cards/plot_card.dat new file mode 100644 index 0000000000..9abe1cc05e --- /dev/null +++ b/epochX/cudacpp/gg_ttggg.mad/Cards/plot_card.dat @@ -0,0 +1,203 @@ +#************************************************************************** +# Card for MadAnalysis * +# * +# This file is used to set the classes and options for * +# the MadAnalysis program. * +# * +# * +# Some comments about the classes * +# 1. Plots are for classes of particles. * +# 2. Each particle is identified by its PDG code. * +# 3. Classes names are arbitrary (4 symbols max, no spaces allowed). * +# 4. Particles in the same class will be ordered with the 'ordering * +# function' in the file in_func.f. * +# 5. Classes can be added/edited/removed at will, and given a name * +# that will then appear in the plots. * +# 6. A particle can be put in one class only. Putting a particle in * +# two or more classes can lead to double counting of events. * +# 7. The class name mET is missing Energy and its name is reserved. * +# If used, it must be put last in the classes list below. * +# 8. If events contain particles not belonging to an existing class, * +# a new class will automatically be generated. * +# 9. For LHCO events the PDG code 21 is assigned to a jet (not * +# b-tagged), 5 to a b-tagged jet and 12 to missing ET. * +# * +# * +# Some comments about the cuts * +# 1. In the file kin_func.f the functions on which cuts can be applied * +# are given. * +# 2. The syntax is as follows. * +# etmin 1 3 30d0 * +# means that from the first class the Et of the first three particles * +# has to be greater than 30 GeV. * +# * +# etmissmin 20d0 * +# means that there must be at least 20 GeV of missing Et * +# * +# dRmin 2 1 4 3 3d0 * +# means that the distance between the first particle in the second * +# class and the first three particles in the fourth class has to be * +# greater than 3. * +# * +# ptmax 1 3 10d0 * +# ptmax 1 2 15d0 * +# means that the maximum pt of the third particle in the first class * +# has to smaller than 10 GeV, and the first two particles of this * +# class has to be smaller than 15 GeV * +# 3. The ordering of the particles within a class can be set with the * +# 'ordering function' in the file kin_func.f. * +# 4. For all the 'min' cuts, an event will be thrown away if the particle * +# does not exist. On the other hand, for all the 'max' cuts the cut * +# will be ignored if the particle does not exist * +# (Only dRij is an exception, for which it is the other way around) * +# * +# * +# * +# Some comments about the plotting options * +# 1. In the file kin_func.f the functions can be found that can be * +# plotted. (only for off-line usage) * +# 2. With the plotting options one can set the number of plots for each * +# of these functions. * +# 3. One has to specify for each variable which particles from which * +# class are used to set the plots. Syntax: * +# et 2 4 * +# means that the transverse energy of the first four particles in the * +# second class will be plotted. * +# mij 1 3 * +# mij 2 2 * +# means that for the invariant mass plots the first three particles * +# from the first class and the first two from the second class will be * +# used to plot the invariant mass of two particles. (10 plots) * +# 4. The ordering of the particles in a class can be set with the * +# 'ordering_function'. pt, e and et are valid functions. (For off-line * +# users X1, X2 and X3 can also be used, if defined in kin_func.f.) * +# 5. Max number of plots is 200. * +# * +# * +#************************************************************************** +# Put here your list of classes +#************************************************************************** +# Do NOT put spaces before class names! +# Begin Classes # This is TAG. Do not modify this line +jet 1 -1 2 -2 3 -3 4 -4 21 # Class number 1 +b 5 -5 # Class number 2 +mET 12 -12 14 -14 16 -16 1000022 # Missing ET class, name is reserved +# End Classes # This is TAG. Do not modify this line +#************************************************************************** +ordering_function pt # orders particles in classes according to their pt +normalization xsec # histogram normalization, xsec or number (e.g. 1) +#************************************************************************** +# Put here list of minimum pt for the classes +#************************************************************************** +# Begin Minpts # This is TAG. Do not modify this line +#1 30 +#2 40 +#3 10 +# End Minpts # This is TAG. Do not modify this line +#************************************************************************** +# Cuts on plotted events +#************************************************************************** +# Modify the cuts and remove the pounds/hashes to apply those cuts +# Do NOT put spaces at the beginning of the following lines! +# Begin Cuts # This is TAG. Do not modify this line +#etmin 2 2 40d0 +#etmin 2 1 80d0 +#etmin 1 3 20d0 +#etmax 2 1 200d0 +#ptmin 3 1 0d0 +#etmissmin 20d0 +#etmissmax 80d0 +#etamax 1 1 1d0 +#etamax 2 1 2d0 +#etamin 2 2 1.5d0 +#etamin 2 1 2d0 +#mijmax 2 1 2 2 200d0 +#mijmin 2 1 2 2 100d0 +#X1min 2 1 40d0 +#X1max 2 2 50d0 +#dRijmin 2 1 2 2 0.7d0 +#dRijmax 1 3 2 2 0.7d0 +#XY1min 2 2 2 2 20d0 +#XYZA2max 2 2 2 2 4 1 5 1 40d0 +# End Cuts # This is TAG. Do not modify this line +#************************************************************************** +# Put here the required plots +#************************************************************************** +# Do NOT put spaces at the beginning of the following lines! +# Begin PlotDefs # This is TAG. Do not modify this line +pt 1 4 # plot pt for the first four particles in class 1 +pt 2 4 # plot pt for the first four particles in class 2 +pt 3 4 # plot pt for the first four particles in class 3 +pt 4 4 # plot pt for the first four particles in class 4 +pt 5 4 # etc. +pt 6 4 +pt 7 4 +#e 2 2 +y 1 4 # plot rapidity for the first four particles in class 1 +y 2 4 +y 3 4 +y 4 4 +y 5 4 +y 6 4 +y 7 4 +#eta 2 2 # plot pseudo-rapidity for the first two part in the 2nd class +#mom 4 1 +#costh 5 1 +#phi 2 2 +#delta_eta 2 2 +#delta_eta 4 1 +mij 1 4 # use the first four particles in the 1st class to plot inv. mass +mij 2 2 # use the first two particles from the second class as well +mij 3 1 # etc. +mij 4 1 +mij 5 1 +mij 6 1 +mij 7 1 +#cosij 1 2 +#cosij 2 2 +#cosij 3 1 +#cosij 4 1 +dRij 1 4 +dRij 2 2 +dRij 3 1 +dRij 4 1 +dRij 5 1 +dRij 6 1 +dRij 7 1 +#delta_phi 2 2 +#delta_phi 4 1 +#delta_phi 5 1 +#X1 2 2 # plot X1 (defined in kin_func.f) +#XYZA1 2 2 +#XYZA1 4 1 +#XYZA1 5 1 +# End PlotDefs # This is TAG. Do not modify this line +#************************************************************************** +#************************************************************************** +# Put here the plot ranges +#************************************************************************** +# Do NOT put spaces at the beginning of the following lines! +# Begin PlotRange # This is TAG. Do not modify this line +pt 10 0 500 # bin size, min value, max value +et 10 0 500 # bin size, min value, max value +etmiss 10 0 500 # bin size, min value, max value +ht 20 0 1500 +y 0.2 -5 5 # etc. +mij 20 0 1500 +dRij 0.1 0 5 +#delta_phi 0.1 0 3.1 +#X1 1 0 100 +#XYZA1 1 0 100 +# End PlotRange # This is TAG. Do not modify this line +#************************************************************************** +#************************************************************************** +# Output for plots +#************************************************************************** +# Do NOT put spaces at the beginning of the following lines! +# Begin PlotOutput # This is TAG. Do not modify this line +output topdrawer # set to topdrawer or gnuplot +plot_decayed no # plot (and cut) dec. res.? (Only for LHE events) +# End PlotOutput # This is TAG. Do not modify this line +#************************************************************************** +# +# diff --git a/epochX/cudacpp/gg_ttggg.mad/Cards/run_card.dat b/epochX/cudacpp/gg_ttggg.mad/Cards/run_card.dat index 0a6bf20eb9..3714e71997 100644 --- a/epochX/cudacpp/gg_ttggg.mad/Cards/run_card.dat +++ b/epochX/cudacpp/gg_ttggg.mad/Cards/run_card.dat @@ -77,7 +77,7 @@ #********************************************************************* 0 = nhel ! using helicities importance sampling or not. ! 0: sum over helicity, 1: importance sampling - 1 = sde_strategy ! default integration strategy (hep-ph/2021.00773) + 2 = sde_strategy ! default integration strategy (hep-ph/2021.00773) ! 1 is old strategy (using amp square) ! 2 is new strategy (using only the denominator) # To see advanced option for Phase-Space optimization: type "update psoptim" @@ -173,13 +173,3 @@ # systematics = systematics_program ! none, systematics [python], SysCalc [depreceted, C++] ['--mur=0.5,1,2', '--muf=0.5,1,2', '--pdf=errorset'] = systematics_arguments ! see: https://cp3.irmp.ucl.ac.be/projects/madgraph/wiki/Systematics#Systematicspythonmodule - -#********************************************************************* -# Options for the cudacpp plugin -#********************************************************************* - -# Set cudacpp-specific values of non-cudacpp-specific options --O3 -ffast-math -fbounds-check = global_flag ! build flags for Fortran code (for a fair comparison to cudacpp) - -# New cudacpp-specific options (default values are defined in banner.py) -CPP = cudacpp_backend ! valid backends are FORTRAN, CPP, CUDA diff --git a/epochX/cudacpp/gg_ttggg.mad/Source/DHELAS/aloha_file.inc b/epochX/cudacpp/gg_ttggg.mad/Source/DHELAS/aloha_file.inc index fa0f3d86f5..1b5bf6ec54 100644 --- a/epochX/cudacpp/gg_ttggg.mad/Source/DHELAS/aloha_file.inc +++ b/epochX/cudacpp/gg_ttggg.mad/Source/DHELAS/aloha_file.inc @@ -1 +1 @@ -ALOHARoutine = FFV1P0_3.o FFV1_0.o FFV1_1.o FFV1_2.o VVV1P0_1.o VVV1_0.o VVVV1P0_1.o VVVV1_0.o VVVV3P0_1.o VVVV3_0.o VVVV4P0_1.o VVVV4_0.o +ALOHARoutine = VVV1_0.o VVV1P0_1.o FFV1_0.o FFV1_1.o FFV1_2.o FFV1P0_3.o VVVV1_0.o VVVV1P0_1.o VVVV3_0.o VVVV3P0_1.o VVVV4_0.o VVVV4P0_1.o diff --git a/epochX/cudacpp/gg_ttggg.mad/Source/PDF/pdfwrap_lhapdf.f b/epochX/cudacpp/gg_ttggg.mad/Source/PDF/pdfwrap_lhapdf.f index 0be926e6cd..3f36905346 100644 --- a/epochX/cudacpp/gg_ttggg.mad/Source/PDF/pdfwrap_lhapdf.f +++ b/epochX/cudacpp/gg_ttggg.mad/Source/PDF/pdfwrap_lhapdf.f @@ -5,6 +5,7 @@ SUBROUTINE PDFWRAP C INCLUDE 'pdf.inc' INCLUDE '../alfas.inc' + INCLUDE '../vector.inc' INCLUDE '../coupl.inc' REAL*8 ZMASS DATA ZMASS/91.188D0/ diff --git a/epochX/cudacpp/gg_ttggg.mad/Source/make_opts b/epochX/cudacpp/gg_ttggg.mad/Source/make_opts index bd3c24228d..2607530b78 100644 --- a/epochX/cudacpp/gg_ttggg.mad/Source/make_opts +++ b/epochX/cudacpp/gg_ttggg.mad/Source/make_opts @@ -1,17 +1,11 @@ -pdlabel1= -pdlabel2= -lhapdf= -PYTHIA8_PATH=NotInstalled -MG5AMC_VERSION=3.5.0_lo_vect -GLOBAL_FLAG=-O3 -ffast-math -fbounds-check -ALOHA_FLAG= -MATRIX_FLAG= DEFAULT_CPP_COMPILER=g++ MACFLAG= STDLIB=-lstdc++ STDLIB_FLAG= DEFAULT_F_COMPILER=gfortran -DEFAULT_F2PY_COMPILER=f2py3 +DEFAULT_F2PY_COMPILER=f2py3.9 +MG5AMC_VERSION=SpecifiedByMG5aMCAtRunTime +PYTHIA8_PATH=NotInstalled #end_of_make_opts_variables BIASLIBDIR=../../../lib/ diff --git a/epochX/cudacpp/gg_ttggg.mad/Source/makefile b/epochX/cudacpp/gg_ttggg.mad/Source/makefile index dbe08b846e..00c73099a0 100644 --- a/epochX/cudacpp/gg_ttggg.mad/Source/makefile +++ b/epochX/cudacpp/gg_ttggg.mad/Source/makefile @@ -136,5 +136,7 @@ cleanSource: clean: cleanSource for i in `ls -d ../SubProcesses/P*`; do cd $$i; make clean; cd -; done; -cleanall: cleanSource +cleanavx: + for i in `ls -d ../SubProcesses/P*`; do cd $$i; make cleanavxs; cd -; done; +cleanall: cleanSource # THIS IS THE ONE for i in `ls -d ../SubProcesses/P*`; do cd $$i; make cleanavxs; cd -; done; diff --git a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/MatrixElementKernels.cc b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/MatrixElementKernels.cc index 30257195b6..cfed7d2af5 100644 --- a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/MatrixElementKernels.cc +++ b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/MatrixElementKernels.cc @@ -112,10 +112,17 @@ namespace mg5amcCpu // See https://community.arm.com/arm-community-blogs/b/operating-systems-blog/posts/runtime-detection-of-cpu-features-on-an-armv8-a-cpu bool ok = true; // this is just an assumption! const std::string tag = "arm neon (128bit as in SSE4.2)"; -#else +#elif defined(__x86_64__) || defined(__i386__) bool known = true; bool ok = __builtin_cpu_supports( "sse4.2" ); const std::string tag = "nehalem (SSE4.2)"; +#else + bool known = false; // __builtin_cpu_supports is not supported + // See https://gcc.gnu.org/onlinedocs/gcc/Basic-PowerPC-Built-in-Functions-Available-on-all-Configurations.html + // See https://stackoverflow.com/q/62783908 + // See https://community.arm.com/arm-community-blogs/b/operating-systems-blog/posts/runtime-detection-of-cpu-features-on-an-armv8-a-cpu + bool ok = true; // this is just an assumption! + const std::string tag = "arm neon (128bit as in SSE4.2)"; #endif #else bool known = true; diff --git a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/P1_gg_ttxggg/CPPProcess.cc b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/P1_gg_ttxggg/CPPProcess.cc index 18c4db8539..aa215f3c80 100644 --- a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/P1_gg_ttxggg/CPPProcess.cc +++ b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/P1_gg_ttxggg/CPPProcess.cc @@ -252,13 +252,13 @@ namespace mg5amcCpu vxxxxx( momenta, 0., cHel[ihel][6], +1, w_fp[6], 6 ); - VVV1P0_1( w_fp[0], w_fp[1], COUPs[0], 0., 0., w_fp[7] ); - FFV1P0_3( w_fp[3], w_fp[2], COUPs[1], 0., 0., w_fp[8] ); - VVV1P0_1( w_fp[7], w_fp[4], COUPs[0], 0., 0., w_fp[9] ); - VVV1P0_1( w_fp[8], w_fp[5], COUPs[0], 0., 0., w_fp[10] ); + VVV1P0_1( w_fp[0], w_fp[1], COUPs[0], 1.0, 0., 0., w_fp[7] ); + FFV1P0_3( w_fp[3], w_fp[2], COUPs[1], 1.0, 0., 0., w_fp[8] ); + VVV1P0_1( w_fp[7], w_fp[4], COUPs[0], 1.0, 0., 0., w_fp[9] ); + VVV1P0_1( w_fp[8], w_fp[5], COUPs[0], 1.0, 0., 0., w_fp[10] ); // Amplitude(s) for diagram number 1 - VVV1_0( w_fp[9], w_fp[10], w_fp[6], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[9], w_fp[10], w_fp[6], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -283,10 +283,10 @@ namespace mg5amcCpu // *** DIAGRAM 2 OF 1240 *** // Wavefunction(s) for diagram number 2 - VVV1P0_1( w_fp[8], w_fp[6], COUPs[0], 0., 0., w_fp[11] ); + VVV1P0_1( w_fp[8], w_fp[6], COUPs[0], 1.0, 0., 0., w_fp[11] ); // Amplitude(s) for diagram number 2 - VVV1_0( w_fp[9], w_fp[11], w_fp[5], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[9], w_fp[11], w_fp[5], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 2 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -314,7 +314,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 3 - VVVV1_0( w_fp[8], w_fp[5], w_fp[6], w_fp[9], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[8], w_fp[5], w_fp[6], w_fp[9], COUPs[2], 1.0, &_fp[0] ); jamp_sv[1] -= amp_sv[0]; jamp_sv[25] += amp_sv[0]; jamp_sv[49] += amp_sv[0]; @@ -331,7 +331,7 @@ namespace mg5amcCpu jamp_sv[102] -= amp_sv[0]; jamp_sv[108] -= amp_sv[0]; jamp_sv[110] += amp_sv[0]; - VVVV3_0( w_fp[8], w_fp[5], w_fp[6], w_fp[9], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[8], w_fp[5], w_fp[6], w_fp[9], COUPs[2], 1.0, &_fp[0] ); jamp_sv[0] -= amp_sv[0]; jamp_sv[24] += amp_sv[0]; jamp_sv[48] += amp_sv[0]; @@ -348,7 +348,7 @@ namespace mg5amcCpu jamp_sv[116] += amp_sv[0]; jamp_sv[118] += amp_sv[0]; jamp_sv[119] -= amp_sv[0]; - VVVV4_0( w_fp[8], w_fp[5], w_fp[6], w_fp[9], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[8], w_fp[5], w_fp[6], w_fp[9], COUPs[2], 1.0, &_fp[0] ); jamp_sv[0] -= amp_sv[0]; jamp_sv[1] += amp_sv[0]; jamp_sv[24] += amp_sv[0]; @@ -369,11 +369,11 @@ namespace mg5amcCpu // *** DIAGRAM 4 OF 1240 *** // Wavefunction(s) for diagram number 4 - VVV1P0_1( w_fp[7], w_fp[5], COUPs[0], 0., 0., w_fp[12] ); - VVV1P0_1( w_fp[8], w_fp[4], COUPs[0], 0., 0., w_fp[13] ); + VVV1P0_1( w_fp[7], w_fp[5], COUPs[0], 1.0, 0., 0., w_fp[12] ); + VVV1P0_1( w_fp[8], w_fp[4], COUPs[0], 1.0, 0., 0., w_fp[13] ); // Amplitude(s) for diagram number 4 - VVV1_0( w_fp[12], w_fp[13], w_fp[6], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[12], w_fp[13], w_fp[6], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 4 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -401,7 +401,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 5 - VVV1_0( w_fp[12], w_fp[11], w_fp[4], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[12], w_fp[11], w_fp[4], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 5 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -429,7 +429,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 6 - VVVV1_0( w_fp[8], w_fp[4], w_fp[6], w_fp[12], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[8], w_fp[4], w_fp[6], w_fp[12], COUPs[2], 1.0, &_fp[0] ); jamp_sv[3] -= amp_sv[0]; jamp_sv[27] += amp_sv[0]; jamp_sv[48] += amp_sv[0]; @@ -446,7 +446,7 @@ namespace mg5amcCpu jamp_sv[103] -= amp_sv[0]; jamp_sv[114] -= amp_sv[0]; jamp_sv[116] += amp_sv[0]; - VVVV3_0( w_fp[8], w_fp[4], w_fp[6], w_fp[12], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[8], w_fp[4], w_fp[6], w_fp[12], COUPs[2], 1.0, &_fp[0] ); jamp_sv[2] -= amp_sv[0]; jamp_sv[26] += amp_sv[0]; jamp_sv[48] += amp_sv[0]; @@ -463,7 +463,7 @@ namespace mg5amcCpu jamp_sv[113] -= amp_sv[0]; jamp_sv[114] -= amp_sv[0]; jamp_sv[116] += amp_sv[0]; - VVVV4_0( w_fp[8], w_fp[4], w_fp[6], w_fp[12], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[8], w_fp[4], w_fp[6], w_fp[12], COUPs[2], 1.0, &_fp[0] ); jamp_sv[2] -= amp_sv[0]; jamp_sv[3] += amp_sv[0]; jamp_sv[26] += amp_sv[0]; @@ -484,10 +484,10 @@ namespace mg5amcCpu // *** DIAGRAM 7 OF 1240 *** // Wavefunction(s) for diagram number 7 - VVV1P0_1( w_fp[7], w_fp[6], COUPs[0], 0., 0., w_fp[14] ); + VVV1P0_1( w_fp[7], w_fp[6], COUPs[0], 1.0, 0., 0., w_fp[14] ); // Amplitude(s) for diagram number 7 - VVV1_0( w_fp[14], w_fp[13], w_fp[5], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[14], w_fp[13], w_fp[5], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 7 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -515,7 +515,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 8 - VVV1_0( w_fp[14], w_fp[10], w_fp[4], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[14], w_fp[10], w_fp[4], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 8 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -543,7 +543,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 9 - VVVV1_0( w_fp[8], w_fp[4], w_fp[5], w_fp[14], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[8], w_fp[4], w_fp[5], w_fp[14], COUPs[2], 1.0, &_fp[0] ); jamp_sv[5] -= amp_sv[0]; jamp_sv[29] += amp_sv[0]; jamp_sv[49] += amp_sv[0]; @@ -560,7 +560,7 @@ namespace mg5amcCpu jamp_sv[92] += amp_sv[0]; jamp_sv[97] += amp_sv[0]; jamp_sv[103] -= amp_sv[0]; - VVVV3_0( w_fp[8], w_fp[4], w_fp[5], w_fp[14], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[8], w_fp[4], w_fp[5], w_fp[14], COUPs[2], 1.0, &_fp[0] ); jamp_sv[4] -= amp_sv[0]; jamp_sv[28] += amp_sv[0]; jamp_sv[49] += amp_sv[0]; @@ -577,7 +577,7 @@ namespace mg5amcCpu jamp_sv[92] += amp_sv[0]; jamp_sv[96] += amp_sv[0]; jamp_sv[102] -= amp_sv[0]; - VVVV4_0( w_fp[8], w_fp[4], w_fp[5], w_fp[14], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[8], w_fp[4], w_fp[5], w_fp[14], COUPs[2], 1.0, &_fp[0] ); jamp_sv[4] -= amp_sv[0]; jamp_sv[5] += amp_sv[0]; jamp_sv[28] += amp_sv[0]; @@ -598,12 +598,12 @@ namespace mg5amcCpu // *** DIAGRAM 10 OF 1240 *** // Wavefunction(s) for diagram number 10 - VVVV1P0_1( w_fp[7], w_fp[4], w_fp[5], COUPs[2], 0., 0., w_fp[15] ); - VVVV3P0_1( w_fp[7], w_fp[4], w_fp[5], COUPs[2], 0., 0., w_fp[16] ); - VVVV4P0_1( w_fp[7], w_fp[4], w_fp[5], COUPs[2], 0., 0., w_fp[17] ); + VVVV1P0_1( w_fp[7], w_fp[4], w_fp[5], COUPs[2], 1.0, 0., 0., w_fp[15] ); + VVVV3P0_1( w_fp[7], w_fp[4], w_fp[5], COUPs[2], 1.0, 0., 0., w_fp[16] ); + VVVV4P0_1( w_fp[7], w_fp[4], w_fp[5], COUPs[2], 1.0, 0., 0., w_fp[17] ); // Amplitude(s) for diagram number 10 - VVV1_0( w_fp[8], w_fp[6], w_fp[15], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[6], w_fp[15], COUPs[0], 1.0, &_fp[0] ); jamp_sv[0] += amp_sv[0]; jamp_sv[2] -= amp_sv[0]; jamp_sv[24] -= amp_sv[0]; @@ -620,7 +620,7 @@ namespace mg5amcCpu jamp_sv[113] -= amp_sv[0]; jamp_sv[118] -= amp_sv[0]; jamp_sv[119] += amp_sv[0]; - VVV1_0( w_fp[8], w_fp[6], w_fp[16], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[6], w_fp[16], COUPs[0], 1.0, &_fp[0] ); jamp_sv[2] -= amp_sv[0]; jamp_sv[26] += amp_sv[0]; jamp_sv[48] += amp_sv[0]; @@ -637,7 +637,7 @@ namespace mg5amcCpu jamp_sv[113] -= amp_sv[0]; jamp_sv[114] -= amp_sv[0]; jamp_sv[116] += amp_sv[0]; - VVV1_0( w_fp[8], w_fp[6], w_fp[17], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[6], w_fp[17], COUPs[0], 1.0, &_fp[0] ); jamp_sv[0] -= amp_sv[0]; jamp_sv[24] += amp_sv[0]; jamp_sv[48] += amp_sv[0]; @@ -658,12 +658,12 @@ namespace mg5amcCpu // *** DIAGRAM 11 OF 1240 *** // Wavefunction(s) for diagram number 11 - VVVV1P0_1( w_fp[7], w_fp[4], w_fp[6], COUPs[2], 0., 0., w_fp[18] ); - VVVV3P0_1( w_fp[7], w_fp[4], w_fp[6], COUPs[2], 0., 0., w_fp[19] ); - VVVV4P0_1( w_fp[7], w_fp[4], w_fp[6], COUPs[2], 0., 0., w_fp[20] ); + VVVV1P0_1( w_fp[7], w_fp[4], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[18] ); + VVVV3P0_1( w_fp[7], w_fp[4], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[19] ); + VVVV4P0_1( w_fp[7], w_fp[4], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[20] ); // Amplitude(s) for diagram number 11 - VVV1_0( w_fp[8], w_fp[5], w_fp[18], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[5], w_fp[18], COUPs[0], 1.0, &_fp[0] ); jamp_sv[1] += amp_sv[0]; jamp_sv[4] -= amp_sv[0]; jamp_sv[25] -= amp_sv[0]; @@ -680,7 +680,7 @@ namespace mg5amcCpu jamp_sv[95] += amp_sv[0]; jamp_sv[108] += amp_sv[0]; jamp_sv[110] -= amp_sv[0]; - VVV1_0( w_fp[8], w_fp[5], w_fp[19], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[5], w_fp[19], COUPs[0], 1.0, &_fp[0] ); jamp_sv[4] -= amp_sv[0]; jamp_sv[28] += amp_sv[0]; jamp_sv[49] += amp_sv[0]; @@ -697,7 +697,7 @@ namespace mg5amcCpu jamp_sv[92] += amp_sv[0]; jamp_sv[96] += amp_sv[0]; jamp_sv[102] -= amp_sv[0]; - VVV1_0( w_fp[8], w_fp[5], w_fp[20], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[5], w_fp[20], COUPs[0], 1.0, &_fp[0] ); jamp_sv[1] -= amp_sv[0]; jamp_sv[25] += amp_sv[0]; jamp_sv[49] += amp_sv[0]; @@ -718,12 +718,12 @@ namespace mg5amcCpu // *** DIAGRAM 12 OF 1240 *** // Wavefunction(s) for diagram number 12 - VVVV1P0_1( w_fp[7], w_fp[5], w_fp[6], COUPs[2], 0., 0., w_fp[21] ); - VVVV3P0_1( w_fp[7], w_fp[5], w_fp[6], COUPs[2], 0., 0., w_fp[22] ); - VVVV4P0_1( w_fp[7], w_fp[5], w_fp[6], COUPs[2], 0., 0., w_fp[23] ); + VVVV1P0_1( w_fp[7], w_fp[5], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[21] ); + VVVV3P0_1( w_fp[7], w_fp[5], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[22] ); + VVVV4P0_1( w_fp[7], w_fp[5], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[23] ); // Amplitude(s) for diagram number 12 - VVV1_0( w_fp[8], w_fp[4], w_fp[21], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[4], w_fp[21], COUPs[0], 1.0, &_fp[0] ); jamp_sv[3] += amp_sv[0]; jamp_sv[5] -= amp_sv[0]; jamp_sv[27] -= amp_sv[0]; @@ -740,7 +740,7 @@ namespace mg5amcCpu jamp_sv[92] += amp_sv[0]; jamp_sv[114] += amp_sv[0]; jamp_sv[116] -= amp_sv[0]; - VVV1_0( w_fp[8], w_fp[4], w_fp[22], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[4], w_fp[22], COUPs[0], 1.0, &_fp[0] ); jamp_sv[5] -= amp_sv[0]; jamp_sv[29] += amp_sv[0]; jamp_sv[49] += amp_sv[0]; @@ -757,7 +757,7 @@ namespace mg5amcCpu jamp_sv[92] += amp_sv[0]; jamp_sv[97] += amp_sv[0]; jamp_sv[103] -= amp_sv[0]; - VVV1_0( w_fp[8], w_fp[4], w_fp[23], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[4], w_fp[23], COUPs[0], 1.0, &_fp[0] ); jamp_sv[3] -= amp_sv[0]; jamp_sv[27] += amp_sv[0]; jamp_sv[48] += amp_sv[0]; @@ -778,10 +778,10 @@ namespace mg5amcCpu // *** DIAGRAM 13 OF 1240 *** // Wavefunction(s) for diagram number 13 - VVV1P0_1( w_fp[4], w_fp[5], COUPs[0], 0., 0., w_fp[24] ); + VVV1P0_1( w_fp[4], w_fp[5], COUPs[0], 1.0, 0., 0., w_fp[24] ); // Amplitude(s) for diagram number 13 - VVVV1_0( w_fp[7], w_fp[8], w_fp[24], w_fp[6], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[7], w_fp[8], w_fp[24], w_fp[6], COUPs[2], 1.0, &_fp[0] ); jamp_sv[0] += amp_sv[0]; jamp_sv[2] -= amp_sv[0]; jamp_sv[4] -= amp_sv[0]; @@ -798,7 +798,7 @@ namespace mg5amcCpu jamp_sv[113] -= amp_sv[0]; jamp_sv[118] -= amp_sv[0]; jamp_sv[119] += amp_sv[0]; - VVVV3_0( w_fp[7], w_fp[8], w_fp[24], w_fp[6], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[7], w_fp[8], w_fp[24], w_fp[6], COUPs[2], 1.0, &_fp[0] ); jamp_sv[0] += amp_sv[0]; jamp_sv[2] -= amp_sv[0]; jamp_sv[24] -= amp_sv[0]; @@ -815,7 +815,7 @@ namespace mg5amcCpu jamp_sv[113] -= amp_sv[0]; jamp_sv[118] -= amp_sv[0]; jamp_sv[119] += amp_sv[0]; - VVVV4_0( w_fp[7], w_fp[8], w_fp[24], w_fp[6], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[7], w_fp[8], w_fp[24], w_fp[6], COUPs[2], 1.0, &_fp[0] ); jamp_sv[4] += amp_sv[0]; jamp_sv[5] -= amp_sv[0]; jamp_sv[28] -= amp_sv[0]; @@ -836,10 +836,10 @@ namespace mg5amcCpu // *** DIAGRAM 14 OF 1240 *** // Wavefunction(s) for diagram number 14 - VVV1P0_1( w_fp[7], w_fp[8], COUPs[0], 0., 0., w_fp[25] ); + VVV1P0_1( w_fp[7], w_fp[8], COUPs[0], 1.0, 0., 0., w_fp[25] ); // Amplitude(s) for diagram number 14 - VVV1_0( w_fp[24], w_fp[6], w_fp[25], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[24], w_fp[6], w_fp[25], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 14 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -864,10 +864,10 @@ namespace mg5amcCpu // *** DIAGRAM 15 OF 1240 *** // Wavefunction(s) for diagram number 15 - VVV1P0_1( w_fp[7], w_fp[24], COUPs[0], 0., 0., w_fp[26] ); + VVV1P0_1( w_fp[7], w_fp[24], COUPs[0], 1.0, 0., 0., w_fp[26] ); // Amplitude(s) for diagram number 15 - VVV1_0( w_fp[8], w_fp[6], w_fp[26], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[6], w_fp[26], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 15 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -895,7 +895,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 16 - VVV1_0( w_fp[8], w_fp[24], w_fp[14], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[24], w_fp[14], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 16 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -920,10 +920,10 @@ namespace mg5amcCpu // *** DIAGRAM 17 OF 1240 *** // Wavefunction(s) for diagram number 17 - VVV1P0_1( w_fp[4], w_fp[6], COUPs[0], 0., 0., w_fp[27] ); + VVV1P0_1( w_fp[4], w_fp[6], COUPs[0], 1.0, 0., 0., w_fp[27] ); // Amplitude(s) for diagram number 17 - VVVV1_0( w_fp[7], w_fp[8], w_fp[27], w_fp[5], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[7], w_fp[8], w_fp[27], w_fp[5], COUPs[2], 1.0, &_fp[0] ); jamp_sv[1] += amp_sv[0]; jamp_sv[2] -= amp_sv[0]; jamp_sv[3] += amp_sv[0]; @@ -940,7 +940,7 @@ namespace mg5amcCpu jamp_sv[95] += amp_sv[0]; jamp_sv[112] += amp_sv[0]; jamp_sv[113] -= amp_sv[0]; - VVVV3_0( w_fp[7], w_fp[8], w_fp[27], w_fp[5], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[7], w_fp[8], w_fp[27], w_fp[5], COUPs[2], 1.0, &_fp[0] ); jamp_sv[1] += amp_sv[0]; jamp_sv[4] -= amp_sv[0]; jamp_sv[25] -= amp_sv[0]; @@ -957,7 +957,7 @@ namespace mg5amcCpu jamp_sv[95] += amp_sv[0]; jamp_sv[108] += amp_sv[0]; jamp_sv[110] -= amp_sv[0]; - VVVV4_0( w_fp[7], w_fp[8], w_fp[27], w_fp[5], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[7], w_fp[8], w_fp[27], w_fp[5], COUPs[2], 1.0, &_fp[0] ); jamp_sv[2] += amp_sv[0]; jamp_sv[3] -= amp_sv[0]; jamp_sv[26] -= amp_sv[0]; @@ -981,7 +981,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 18 - VVV1_0( w_fp[27], w_fp[5], w_fp[25], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[27], w_fp[5], w_fp[25], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 18 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1006,10 +1006,10 @@ namespace mg5amcCpu // *** DIAGRAM 19 OF 1240 *** // Wavefunction(s) for diagram number 19 - VVV1P0_1( w_fp[7], w_fp[27], COUPs[0], 0., 0., w_fp[28] ); + VVV1P0_1( w_fp[7], w_fp[27], COUPs[0], 1.0, 0., 0., w_fp[28] ); // Amplitude(s) for diagram number 19 - VVV1_0( w_fp[8], w_fp[5], w_fp[28], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[5], w_fp[28], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 19 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1037,7 +1037,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 20 - VVV1_0( w_fp[8], w_fp[27], w_fp[12], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[27], w_fp[12], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 20 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1062,10 +1062,10 @@ namespace mg5amcCpu // *** DIAGRAM 21 OF 1240 *** // Wavefunction(s) for diagram number 21 - VVV1P0_1( w_fp[5], w_fp[6], COUPs[0], 0., 0., w_fp[29] ); + VVV1P0_1( w_fp[5], w_fp[6], COUPs[0], 1.0, 0., 0., w_fp[29] ); // Amplitude(s) for diagram number 21 - VVVV1_0( w_fp[7], w_fp[8], w_fp[4], w_fp[29], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[7], w_fp[8], w_fp[4], w_fp[29], COUPs[2], 1.0, &_fp[0] ); jamp_sv[0] += amp_sv[0]; jamp_sv[1] -= amp_sv[0]; jamp_sv[3] -= amp_sv[0]; @@ -1082,7 +1082,7 @@ namespace mg5amcCpu jamp_sv[95] -= amp_sv[0]; jamp_sv[118] -= amp_sv[0]; jamp_sv[119] += amp_sv[0]; - VVVV3_0( w_fp[7], w_fp[8], w_fp[4], w_fp[29], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[7], w_fp[8], w_fp[4], w_fp[29], COUPs[2], 1.0, &_fp[0] ); jamp_sv[0] += amp_sv[0]; jamp_sv[1] -= amp_sv[0]; jamp_sv[24] -= amp_sv[0]; @@ -1099,7 +1099,7 @@ namespace mg5amcCpu jamp_sv[116] -= amp_sv[0]; jamp_sv[118] -= amp_sv[0]; jamp_sv[119] += amp_sv[0]; - VVVV4_0( w_fp[7], w_fp[8], w_fp[4], w_fp[29], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[7], w_fp[8], w_fp[4], w_fp[29], COUPs[2], 1.0, &_fp[0] ); jamp_sv[3] += amp_sv[0]; jamp_sv[5] -= amp_sv[0]; jamp_sv[27] -= amp_sv[0]; @@ -1123,7 +1123,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 22 - VVV1_0( w_fp[4], w_fp[29], w_fp[25], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[4], w_fp[29], w_fp[25], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 22 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1151,7 +1151,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 23 - VVV1_0( w_fp[8], w_fp[29], w_fp[9], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[29], w_fp[9], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 23 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1176,10 +1176,10 @@ namespace mg5amcCpu // *** DIAGRAM 24 OF 1240 *** // Wavefunction(s) for diagram number 24 - VVV1P0_1( w_fp[7], w_fp[29], COUPs[0], 0., 0., w_fp[25] ); + VVV1P0_1( w_fp[7], w_fp[29], COUPs[0], 1.0, 0., 0., w_fp[25] ); // Amplitude(s) for diagram number 24 - VVV1_0( w_fp[8], w_fp[4], w_fp[25], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[4], w_fp[25], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 24 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1204,12 +1204,12 @@ namespace mg5amcCpu // *** DIAGRAM 25 OF 1240 *** // Wavefunction(s) for diagram number 25 - VVVV1P0_1( w_fp[4], w_fp[5], w_fp[6], COUPs[2], 0., 0., w_fp[30] ); - VVVV3P0_1( w_fp[4], w_fp[5], w_fp[6], COUPs[2], 0., 0., w_fp[31] ); - VVVV4P0_1( w_fp[4], w_fp[5], w_fp[6], COUPs[2], 0., 0., w_fp[32] ); + VVVV1P0_1( w_fp[4], w_fp[5], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[30] ); + VVVV3P0_1( w_fp[4], w_fp[5], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[31] ); + VVVV4P0_1( w_fp[4], w_fp[5], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[32] ); // Amplitude(s) for diagram number 25 - VVV1_0( w_fp[7], w_fp[8], w_fp[30], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[7], w_fp[8], w_fp[30], COUPs[0], 1.0, &_fp[0] ); jamp_sv[0] += amp_sv[0]; jamp_sv[1] -= amp_sv[0]; jamp_sv[3] -= amp_sv[0]; @@ -1226,7 +1226,7 @@ namespace mg5amcCpu jamp_sv[95] -= amp_sv[0]; jamp_sv[118] -= amp_sv[0]; jamp_sv[119] += amp_sv[0]; - VVV1_0( w_fp[7], w_fp[8], w_fp[31], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[7], w_fp[8], w_fp[31], COUPs[0], 1.0, &_fp[0] ); jamp_sv[1] -= amp_sv[0]; jamp_sv[2] += amp_sv[0]; jamp_sv[3] -= amp_sv[0]; @@ -1243,7 +1243,7 @@ namespace mg5amcCpu jamp_sv[95] -= amp_sv[0]; jamp_sv[112] -= amp_sv[0]; jamp_sv[113] += amp_sv[0]; - VVV1_0( w_fp[7], w_fp[8], w_fp[32], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[7], w_fp[8], w_fp[32], COUPs[0], 1.0, &_fp[0] ); jamp_sv[0] -= amp_sv[0]; jamp_sv[2] += amp_sv[0]; jamp_sv[4] += amp_sv[0]; @@ -1264,12 +1264,12 @@ namespace mg5amcCpu // *** DIAGRAM 26 OF 1240 *** // Wavefunction(s) for diagram number 26 - FFV1_1( w_fp[2], w_fp[4], COUPs[1], cIPD[0], cIPD[1], w_fp[33] ); - FFV1_2( w_fp[3], w_fp[7], COUPs[1], cIPD[0], cIPD[1], w_fp[34] ); - FFV1_1( w_fp[33], w_fp[5], COUPs[1], cIPD[0], cIPD[1], w_fp[35] ); + FFV1_1( w_fp[2], w_fp[4], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[33] ); + FFV1_2( w_fp[3], w_fp[7], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[34] ); + FFV1_1( w_fp[33], w_fp[5], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[35] ); // Amplitude(s) for diagram number 26 - FFV1_0( w_fp[34], w_fp[35], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[34], w_fp[35], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 26 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1280,10 +1280,10 @@ namespace mg5amcCpu // *** DIAGRAM 27 OF 1240 *** // Wavefunction(s) for diagram number 27 - FFV1_1( w_fp[33], w_fp[6], COUPs[1], cIPD[0], cIPD[1], w_fp[36] ); + FFV1_1( w_fp[33], w_fp[6], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[36] ); // Amplitude(s) for diagram number 27 - FFV1_0( w_fp[34], w_fp[36], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[34], w_fp[36], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 27 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1294,10 +1294,10 @@ namespace mg5amcCpu // *** DIAGRAM 28 OF 1240 *** // Wavefunction(s) for diagram number 28 - FFV1P0_3( w_fp[3], w_fp[33], COUPs[1], 0., 0., w_fp[37] ); + FFV1P0_3( w_fp[3], w_fp[33], COUPs[1], 1.0, 0., 0., w_fp[37] ); // Amplitude(s) for diagram number 28 - VVV1_0( w_fp[12], w_fp[37], w_fp[6], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[12], w_fp[37], w_fp[6], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 28 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1317,7 +1317,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 29 - FFV1_0( w_fp[3], w_fp[36], w_fp[12], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[36], w_fp[12], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 29 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1333,7 +1333,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 30 - VVV1_0( w_fp[14], w_fp[37], w_fp[5], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[14], w_fp[37], w_fp[5], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 30 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1353,7 +1353,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 31 - FFV1_0( w_fp[3], w_fp[35], w_fp[14], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[35], w_fp[14], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 31 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1369,7 +1369,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 32 - FFV1_0( w_fp[3], w_fp[33], w_fp[21], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[33], w_fp[21], COUPs[1], 1.0, &_fp[0] ); jamp_sv[48] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[49] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[54] += cxtype( 0, 1 ) * amp_sv[0]; @@ -1378,7 +1378,7 @@ namespace mg5amcCpu jamp_sv[65] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[70] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[71] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[33], w_fp[22], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[33], w_fp[22], COUPs[1], 1.0, &_fp[0] ); jamp_sv[49] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[55] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[60] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -1387,7 +1387,7 @@ namespace mg5amcCpu jamp_sv[65] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[66] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[68] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[33], w_fp[23], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[33], w_fp[23], COUPs[1], 1.0, &_fp[0] ); jamp_sv[48] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[54] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[60] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -1400,11 +1400,11 @@ namespace mg5amcCpu // *** DIAGRAM 33 OF 1240 *** // Wavefunction(s) for diagram number 33 - FFV1_2( w_fp[3], w_fp[5], COUPs[1], cIPD[0], cIPD[1], w_fp[38] ); - FFV1_1( w_fp[33], w_fp[7], COUPs[1], cIPD[0], cIPD[1], w_fp[39] ); + FFV1_2( w_fp[3], w_fp[5], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[38] ); + FFV1_1( w_fp[33], w_fp[7], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[39] ); // Amplitude(s) for diagram number 33 - FFV1_0( w_fp[38], w_fp[39], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[39], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 33 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1415,10 +1415,10 @@ namespace mg5amcCpu // *** DIAGRAM 34 OF 1240 *** // Wavefunction(s) for diagram number 34 - FFV1_2( w_fp[38], w_fp[7], COUPs[1], cIPD[0], cIPD[1], w_fp[40] ); + FFV1_2( w_fp[38], w_fp[7], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[40] ); // Amplitude(s) for diagram number 34 - FFV1_0( w_fp[40], w_fp[33], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[40], w_fp[33], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 34 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1432,7 +1432,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 35 - FFV1_0( w_fp[38], w_fp[33], w_fp[14], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[33], w_fp[14], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 35 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1445,10 +1445,10 @@ namespace mg5amcCpu // *** DIAGRAM 36 OF 1240 *** // Wavefunction(s) for diagram number 36 - FFV1_2( w_fp[3], w_fp[6], COUPs[1], cIPD[0], cIPD[1], w_fp[41] ); + FFV1_2( w_fp[3], w_fp[6], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[41] ); // Amplitude(s) for diagram number 36 - FFV1_0( w_fp[41], w_fp[39], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[39], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 36 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1459,10 +1459,10 @@ namespace mg5amcCpu // *** DIAGRAM 37 OF 1240 *** // Wavefunction(s) for diagram number 37 - FFV1_2( w_fp[41], w_fp[7], COUPs[1], cIPD[0], cIPD[1], w_fp[42] ); + FFV1_2( w_fp[41], w_fp[7], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[42] ); // Amplitude(s) for diagram number 37 - FFV1_0( w_fp[42], w_fp[33], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[42], w_fp[33], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 37 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1476,7 +1476,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 38 - FFV1_0( w_fp[41], w_fp[33], w_fp[12], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[33], w_fp[12], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 38 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1492,7 +1492,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 39 - FFV1_0( w_fp[3], w_fp[39], w_fp[29], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[39], w_fp[29], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 39 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1508,7 +1508,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 40 - FFV1_0( w_fp[34], w_fp[33], w_fp[29], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[34], w_fp[33], w_fp[29], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 40 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1524,7 +1524,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 41 - FFV1_0( w_fp[3], w_fp[33], w_fp[25], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[33], w_fp[25], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 41 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1541,11 +1541,11 @@ namespace mg5amcCpu // *** DIAGRAM 42 OF 1240 *** // Wavefunction(s) for diagram number 42 - FFV1_1( w_fp[2], w_fp[5], COUPs[1], cIPD[0], cIPD[1], w_fp[39] ); - FFV1_1( w_fp[39], w_fp[4], COUPs[1], cIPD[0], cIPD[1], w_fp[43] ); + FFV1_1( w_fp[2], w_fp[5], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[39] ); + FFV1_1( w_fp[39], w_fp[4], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[43] ); // Amplitude(s) for diagram number 42 - FFV1_0( w_fp[34], w_fp[43], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[34], w_fp[43], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 42 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1556,10 +1556,10 @@ namespace mg5amcCpu // *** DIAGRAM 43 OF 1240 *** // Wavefunction(s) for diagram number 43 - FFV1_1( w_fp[39], w_fp[6], COUPs[1], cIPD[0], cIPD[1], w_fp[44] ); + FFV1_1( w_fp[39], w_fp[6], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[44] ); // Amplitude(s) for diagram number 43 - FFV1_0( w_fp[34], w_fp[44], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[34], w_fp[44], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 43 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1570,10 +1570,10 @@ namespace mg5amcCpu // *** DIAGRAM 44 OF 1240 *** // Wavefunction(s) for diagram number 44 - FFV1P0_3( w_fp[3], w_fp[39], COUPs[1], 0., 0., w_fp[45] ); + FFV1P0_3( w_fp[3], w_fp[39], COUPs[1], 1.0, 0., 0., w_fp[45] ); // Amplitude(s) for diagram number 44 - VVV1_0( w_fp[9], w_fp[45], w_fp[6], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[9], w_fp[45], w_fp[6], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 44 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1593,7 +1593,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 45 - FFV1_0( w_fp[3], w_fp[44], w_fp[9], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[44], w_fp[9], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 45 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1609,7 +1609,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 46 - VVV1_0( w_fp[14], w_fp[45], w_fp[4], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[14], w_fp[45], w_fp[4], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 46 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1629,7 +1629,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 47 - FFV1_0( w_fp[3], w_fp[43], w_fp[14], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[43], w_fp[14], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 47 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1645,7 +1645,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 48 - FFV1_0( w_fp[3], w_fp[39], w_fp[18], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[39], w_fp[18], COUPs[1], 1.0, &_fp[0] ); jamp_sv[72] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[73] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[78] += cxtype( 0, 1 ) * amp_sv[0]; @@ -1654,7 +1654,7 @@ namespace mg5amcCpu jamp_sv[89] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[94] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[95] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[39], w_fp[19], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[39], w_fp[19], COUPs[1], 1.0, &_fp[0] ); jamp_sv[73] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[79] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[84] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -1663,7 +1663,7 @@ namespace mg5amcCpu jamp_sv[89] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[90] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[92] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[39], w_fp[20], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[39], w_fp[20], COUPs[1], 1.0, &_fp[0] ); jamp_sv[72] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[78] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[84] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -1676,11 +1676,11 @@ namespace mg5amcCpu // *** DIAGRAM 49 OF 1240 *** // Wavefunction(s) for diagram number 49 - FFV1_2( w_fp[3], w_fp[4], COUPs[1], cIPD[0], cIPD[1], w_fp[46] ); - FFV1_1( w_fp[39], w_fp[7], COUPs[1], cIPD[0], cIPD[1], w_fp[47] ); + FFV1_2( w_fp[3], w_fp[4], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[46] ); + FFV1_1( w_fp[39], w_fp[7], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[47] ); // Amplitude(s) for diagram number 49 - FFV1_0( w_fp[46], w_fp[47], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[47], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 49 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1691,10 +1691,10 @@ namespace mg5amcCpu // *** DIAGRAM 50 OF 1240 *** // Wavefunction(s) for diagram number 50 - FFV1_2( w_fp[46], w_fp[7], COUPs[1], cIPD[0], cIPD[1], w_fp[48] ); + FFV1_2( w_fp[46], w_fp[7], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[48] ); // Amplitude(s) for diagram number 50 - FFV1_0( w_fp[48], w_fp[39], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[48], w_fp[39], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 50 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1708,7 +1708,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 51 - FFV1_0( w_fp[46], w_fp[39], w_fp[14], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[39], w_fp[14], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 51 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1724,7 +1724,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 52 - FFV1_0( w_fp[41], w_fp[47], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[47], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 52 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1738,7 +1738,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 53 - FFV1_0( w_fp[42], w_fp[39], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[42], w_fp[39], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 53 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1752,7 +1752,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 54 - FFV1_0( w_fp[41], w_fp[39], w_fp[9], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[39], w_fp[9], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 54 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1768,7 +1768,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 55 - FFV1_0( w_fp[3], w_fp[47], w_fp[27], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[47], w_fp[27], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 55 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1784,7 +1784,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 56 - FFV1_0( w_fp[34], w_fp[39], w_fp[27], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[34], w_fp[39], w_fp[27], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 56 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1800,7 +1800,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 57 - FFV1_0( w_fp[3], w_fp[39], w_fp[28], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[39], w_fp[28], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 57 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1817,11 +1817,11 @@ namespace mg5amcCpu // *** DIAGRAM 58 OF 1240 *** // Wavefunction(s) for diagram number 58 - FFV1_1( w_fp[2], w_fp[6], COUPs[1], cIPD[0], cIPD[1], w_fp[47] ); - FFV1_1( w_fp[47], w_fp[4], COUPs[1], cIPD[0], cIPD[1], w_fp[49] ); + FFV1_1( w_fp[2], w_fp[6], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[47] ); + FFV1_1( w_fp[47], w_fp[4], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[49] ); // Amplitude(s) for diagram number 58 - FFV1_0( w_fp[34], w_fp[49], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[34], w_fp[49], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 58 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1832,10 +1832,10 @@ namespace mg5amcCpu // *** DIAGRAM 59 OF 1240 *** // Wavefunction(s) for diagram number 59 - FFV1_1( w_fp[47], w_fp[5], COUPs[1], cIPD[0], cIPD[1], w_fp[50] ); + FFV1_1( w_fp[47], w_fp[5], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[50] ); // Amplitude(s) for diagram number 59 - FFV1_0( w_fp[34], w_fp[50], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[34], w_fp[50], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 59 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1846,10 +1846,10 @@ namespace mg5amcCpu // *** DIAGRAM 60 OF 1240 *** // Wavefunction(s) for diagram number 60 - FFV1P0_3( w_fp[3], w_fp[47], COUPs[1], 0., 0., w_fp[51] ); + FFV1P0_3( w_fp[3], w_fp[47], COUPs[1], 1.0, 0., 0., w_fp[51] ); // Amplitude(s) for diagram number 60 - VVV1_0( w_fp[9], w_fp[51], w_fp[5], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[9], w_fp[51], w_fp[5], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 60 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1869,7 +1869,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 61 - FFV1_0( w_fp[3], w_fp[50], w_fp[9], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[50], w_fp[9], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 61 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1885,7 +1885,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 62 - VVV1_0( w_fp[12], w_fp[51], w_fp[4], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[12], w_fp[51], w_fp[4], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 62 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1905,7 +1905,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 63 - FFV1_0( w_fp[3], w_fp[49], w_fp[12], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[49], w_fp[12], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 63 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1921,7 +1921,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 64 - FFV1_0( w_fp[3], w_fp[47], w_fp[15], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[47], w_fp[15], COUPs[1], 1.0, &_fp[0] ); jamp_sv[96] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[97] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[102] += cxtype( 0, 1 ) * amp_sv[0]; @@ -1930,7 +1930,7 @@ namespace mg5amcCpu jamp_sv[113] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[118] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[119] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[47], w_fp[16], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[47], w_fp[16], COUPs[1], 1.0, &_fp[0] ); jamp_sv[97] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[103] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[108] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -1939,7 +1939,7 @@ namespace mg5amcCpu jamp_sv[113] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[114] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[116] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[47], w_fp[17], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[47], w_fp[17], COUPs[1], 1.0, &_fp[0] ); jamp_sv[96] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[102] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[108] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -1952,10 +1952,10 @@ namespace mg5amcCpu // *** DIAGRAM 65 OF 1240 *** // Wavefunction(s) for diagram number 65 - FFV1_1( w_fp[47], w_fp[7], COUPs[1], cIPD[0], cIPD[1], w_fp[52] ); + FFV1_1( w_fp[47], w_fp[7], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[52] ); // Amplitude(s) for diagram number 65 - FFV1_0( w_fp[46], w_fp[52], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[52], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 65 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1969,7 +1969,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 66 - FFV1_0( w_fp[48], w_fp[47], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[48], w_fp[47], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 66 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1983,7 +1983,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 67 - FFV1_0( w_fp[46], w_fp[47], w_fp[12], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[47], w_fp[12], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 67 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1999,7 +1999,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 68 - FFV1_0( w_fp[38], w_fp[52], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[52], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 68 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -2013,7 +2013,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 69 - FFV1_0( w_fp[40], w_fp[47], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[40], w_fp[47], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 69 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -2027,7 +2027,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 70 - FFV1_0( w_fp[38], w_fp[47], w_fp[9], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[47], w_fp[9], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 70 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -2043,7 +2043,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 71 - FFV1_0( w_fp[3], w_fp[52], w_fp[24], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[52], w_fp[24], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 71 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -2059,7 +2059,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 72 - FFV1_0( w_fp[34], w_fp[47], w_fp[24], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[34], w_fp[47], w_fp[24], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 72 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -2075,7 +2075,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 73 - FFV1_0( w_fp[3], w_fp[47], w_fp[26], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[47], w_fp[26], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 73 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -2092,11 +2092,11 @@ namespace mg5amcCpu // *** DIAGRAM 74 OF 1240 *** // Wavefunction(s) for diagram number 74 - FFV1_1( w_fp[2], w_fp[7], COUPs[1], cIPD[0], cIPD[1], w_fp[52] ); - FFV1_2( w_fp[46], w_fp[5], COUPs[1], cIPD[0], cIPD[1], w_fp[7] ); + FFV1_1( w_fp[2], w_fp[7], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[52] ); + FFV1_2( w_fp[46], w_fp[5], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[7] ); // Amplitude(s) for diagram number 74 - FFV1_0( w_fp[7], w_fp[52], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[7], w_fp[52], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 74 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -2107,10 +2107,10 @@ namespace mg5amcCpu // *** DIAGRAM 75 OF 1240 *** // Wavefunction(s) for diagram number 75 - FFV1_2( w_fp[46], w_fp[6], COUPs[1], cIPD[0], cIPD[1], w_fp[53] ); + FFV1_2( w_fp[46], w_fp[6], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[53] ); // Amplitude(s) for diagram number 75 - FFV1_0( w_fp[53], w_fp[52], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[53], w_fp[52], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 75 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -2121,10 +2121,10 @@ namespace mg5amcCpu // *** DIAGRAM 76 OF 1240 *** // Wavefunction(s) for diagram number 76 - FFV1P0_3( w_fp[46], w_fp[2], COUPs[1], 0., 0., w_fp[54] ); + FFV1P0_3( w_fp[46], w_fp[2], COUPs[1], 1.0, 0., 0., w_fp[54] ); // Amplitude(s) for diagram number 76 - VVV1_0( w_fp[12], w_fp[54], w_fp[6], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[12], w_fp[54], w_fp[6], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 76 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -2144,7 +2144,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 77 - FFV1_0( w_fp[53], w_fp[2], w_fp[12], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[53], w_fp[2], w_fp[12], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 77 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -2160,7 +2160,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 78 - VVV1_0( w_fp[14], w_fp[54], w_fp[5], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[14], w_fp[54], w_fp[5], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 78 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -2180,7 +2180,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 79 - FFV1_0( w_fp[7], w_fp[2], w_fp[14], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[7], w_fp[2], w_fp[14], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 79 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -2196,7 +2196,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 80 - FFV1_0( w_fp[46], w_fp[2], w_fp[21], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[2], w_fp[21], COUPs[1], 1.0, &_fp[0] ); jamp_sv[3] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[5] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[27] += cxtype( 0, 1 ) * amp_sv[0]; @@ -2205,7 +2205,7 @@ namespace mg5amcCpu jamp_sv[92] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[114] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[116] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[46], w_fp[2], w_fp[22], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[2], w_fp[22], COUPs[1], 1.0, &_fp[0] ); jamp_sv[5] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[29] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[73] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -2214,7 +2214,7 @@ namespace mg5amcCpu jamp_sv[92] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[97] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[103] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[46], w_fp[2], w_fp[23], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[2], w_fp[23], COUPs[1], 1.0, &_fp[0] ); jamp_sv[3] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[27] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[73] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -2230,7 +2230,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 81 - FFV1_0( w_fp[46], w_fp[52], w_fp[29], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[52], w_fp[29], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 81 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -2246,7 +2246,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 82 - FFV1_0( w_fp[48], w_fp[2], w_fp[29], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[48], w_fp[2], w_fp[29], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 82 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -2262,7 +2262,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 83 - FFV1_0( w_fp[46], w_fp[2], w_fp[25], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[2], w_fp[25], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 83 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -2279,10 +2279,10 @@ namespace mg5amcCpu // *** DIAGRAM 84 OF 1240 *** // Wavefunction(s) for diagram number 84 - FFV1_2( w_fp[38], w_fp[4], COUPs[1], cIPD[0], cIPD[1], w_fp[25] ); + FFV1_2( w_fp[38], w_fp[4], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[25] ); // Amplitude(s) for diagram number 84 - FFV1_0( w_fp[25], w_fp[52], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[25], w_fp[52], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 84 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -2293,10 +2293,10 @@ namespace mg5amcCpu // *** DIAGRAM 85 OF 1240 *** // Wavefunction(s) for diagram number 85 - FFV1_2( w_fp[38], w_fp[6], COUPs[1], cIPD[0], cIPD[1], w_fp[48] ); + FFV1_2( w_fp[38], w_fp[6], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[48] ); // Amplitude(s) for diagram number 85 - FFV1_0( w_fp[48], w_fp[52], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[48], w_fp[52], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 85 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -2307,10 +2307,10 @@ namespace mg5amcCpu // *** DIAGRAM 86 OF 1240 *** // Wavefunction(s) for diagram number 86 - FFV1P0_3( w_fp[38], w_fp[2], COUPs[1], 0., 0., w_fp[23] ); + FFV1P0_3( w_fp[38], w_fp[2], COUPs[1], 1.0, 0., 0., w_fp[23] ); // Amplitude(s) for diagram number 86 - VVV1_0( w_fp[9], w_fp[23], w_fp[6], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[9], w_fp[23], w_fp[6], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 86 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -2330,7 +2330,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 87 - FFV1_0( w_fp[48], w_fp[2], w_fp[9], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[48], w_fp[2], w_fp[9], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 87 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -2346,7 +2346,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 88 - VVV1_0( w_fp[14], w_fp[23], w_fp[4], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[14], w_fp[23], w_fp[4], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 88 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -2366,7 +2366,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 89 - FFV1_0( w_fp[25], w_fp[2], w_fp[14], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[25], w_fp[2], w_fp[14], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 89 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -2382,7 +2382,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 90 - FFV1_0( w_fp[38], w_fp[2], w_fp[18], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[2], w_fp[18], COUPs[1], 1.0, &_fp[0] ); jamp_sv[1] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[4] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[25] += cxtype( 0, 1 ) * amp_sv[0]; @@ -2391,7 +2391,7 @@ namespace mg5amcCpu jamp_sv[68] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[108] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[110] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[38], w_fp[2], w_fp[19], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[2], w_fp[19], COUPs[1], 1.0, &_fp[0] ); jamp_sv[4] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[28] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[49] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -2400,7 +2400,7 @@ namespace mg5amcCpu jamp_sv[68] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[96] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[102] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[38], w_fp[2], w_fp[20], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[2], w_fp[20], COUPs[1], 1.0, &_fp[0] ); jamp_sv[1] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[25] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[49] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -2416,7 +2416,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 91 - FFV1_0( w_fp[38], w_fp[52], w_fp[27], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[52], w_fp[27], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 91 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -2432,7 +2432,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 92 - FFV1_0( w_fp[40], w_fp[2], w_fp[27], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[40], w_fp[2], w_fp[27], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 92 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -2448,7 +2448,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 93 - FFV1_0( w_fp[38], w_fp[2], w_fp[28], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[2], w_fp[28], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 93 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -2465,10 +2465,10 @@ namespace mg5amcCpu // *** DIAGRAM 94 OF 1240 *** // Wavefunction(s) for diagram number 94 - FFV1_2( w_fp[41], w_fp[4], COUPs[1], cIPD[0], cIPD[1], w_fp[28] ); + FFV1_2( w_fp[41], w_fp[4], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[28] ); // Amplitude(s) for diagram number 94 - FFV1_0( w_fp[28], w_fp[52], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[28], w_fp[52], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 94 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -2479,10 +2479,10 @@ namespace mg5amcCpu // *** DIAGRAM 95 OF 1240 *** // Wavefunction(s) for diagram number 95 - FFV1_2( w_fp[41], w_fp[5], COUPs[1], cIPD[0], cIPD[1], w_fp[40] ); + FFV1_2( w_fp[41], w_fp[5], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[40] ); // Amplitude(s) for diagram number 95 - FFV1_0( w_fp[40], w_fp[52], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[40], w_fp[52], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 95 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -2493,10 +2493,10 @@ namespace mg5amcCpu // *** DIAGRAM 96 OF 1240 *** // Wavefunction(s) for diagram number 96 - FFV1P0_3( w_fp[41], w_fp[2], COUPs[1], 0., 0., w_fp[20] ); + FFV1P0_3( w_fp[41], w_fp[2], COUPs[1], 1.0, 0., 0., w_fp[20] ); // Amplitude(s) for diagram number 96 - VVV1_0( w_fp[9], w_fp[20], w_fp[5], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[9], w_fp[20], w_fp[5], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 96 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -2516,7 +2516,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 97 - FFV1_0( w_fp[40], w_fp[2], w_fp[9], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[40], w_fp[2], w_fp[9], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 97 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -2532,7 +2532,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 98 - VVV1_0( w_fp[12], w_fp[20], w_fp[4], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[12], w_fp[20], w_fp[4], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 98 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -2552,7 +2552,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 99 - FFV1_0( w_fp[28], w_fp[2], w_fp[12], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[28], w_fp[2], w_fp[12], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 99 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -2568,7 +2568,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 100 - FFV1_0( w_fp[41], w_fp[2], w_fp[15], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[2], w_fp[15], COUPs[1], 1.0, &_fp[0] ); jamp_sv[0] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[2] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[24] += cxtype( 0, 1 ) * amp_sv[0]; @@ -2577,7 +2577,7 @@ namespace mg5amcCpu jamp_sv[62] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[84] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[86] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[41], w_fp[2], w_fp[16], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[2], w_fp[16], COUPs[1], 1.0, &_fp[0] ); jamp_sv[2] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[26] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[48] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -2586,7 +2586,7 @@ namespace mg5amcCpu jamp_sv[62] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[72] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[78] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[41], w_fp[2], w_fp[17], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[2], w_fp[17], COUPs[1], 1.0, &_fp[0] ); jamp_sv[0] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[24] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[48] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -2602,7 +2602,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 101 - FFV1_0( w_fp[41], w_fp[52], w_fp[24], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[52], w_fp[24], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 101 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -2618,7 +2618,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 102 - FFV1_0( w_fp[42], w_fp[2], w_fp[24], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[42], w_fp[2], w_fp[24], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 102 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -2634,7 +2634,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 103 - FFV1_0( w_fp[41], w_fp[2], w_fp[26], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[2], w_fp[26], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 103 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -2651,10 +2651,10 @@ namespace mg5amcCpu // *** DIAGRAM 104 OF 1240 *** // Wavefunction(s) for diagram number 104 - FFV1_2( w_fp[3], w_fp[24], COUPs[1], cIPD[0], cIPD[1], w_fp[26] ); + FFV1_2( w_fp[3], w_fp[24], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[26] ); // Amplitude(s) for diagram number 104 - FFV1_0( w_fp[26], w_fp[52], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[26], w_fp[52], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 104 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -2667,10 +2667,10 @@ namespace mg5amcCpu // *** DIAGRAM 105 OF 1240 *** // Wavefunction(s) for diagram number 105 - VVV1P0_1( w_fp[24], w_fp[6], COUPs[0], 0., 0., w_fp[42] ); + VVV1P0_1( w_fp[24], w_fp[6], COUPs[0], 1.0, 0., 0., w_fp[42] ); // Amplitude(s) for diagram number 105 - FFV1_0( w_fp[3], w_fp[52], w_fp[42], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[52], w_fp[42], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 105 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -2687,10 +2687,10 @@ namespace mg5amcCpu // *** DIAGRAM 106 OF 1240 *** // Wavefunction(s) for diagram number 106 - FFV1_1( w_fp[2], w_fp[24], COUPs[1], cIPD[0], cIPD[1], w_fp[17] ); + FFV1_1( w_fp[2], w_fp[24], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[17] ); // Amplitude(s) for diagram number 106 - FFV1_0( w_fp[34], w_fp[17], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[34], w_fp[17], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 106 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -2706,7 +2706,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 107 - FFV1_0( w_fp[34], w_fp[2], w_fp[42], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[34], w_fp[2], w_fp[42], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 107 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -2726,7 +2726,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 108 - FFV1_0( w_fp[3], w_fp[17], w_fp[14], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[17], w_fp[14], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 108 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -2746,7 +2746,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 109 - FFV1_0( w_fp[26], w_fp[2], w_fp[14], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[26], w_fp[2], w_fp[14], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 109 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -2763,10 +2763,10 @@ namespace mg5amcCpu // *** DIAGRAM 110 OF 1240 *** // Wavefunction(s) for diagram number 110 - FFV1_2( w_fp[3], w_fp[27], COUPs[1], cIPD[0], cIPD[1], w_fp[14] ); + FFV1_2( w_fp[3], w_fp[27], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[14] ); // Amplitude(s) for diagram number 110 - FFV1_0( w_fp[14], w_fp[52], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[14], w_fp[52], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 110 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -2779,10 +2779,10 @@ namespace mg5amcCpu // *** DIAGRAM 111 OF 1240 *** // Wavefunction(s) for diagram number 111 - VVV1P0_1( w_fp[27], w_fp[5], COUPs[0], 0., 0., w_fp[16] ); + VVV1P0_1( w_fp[27], w_fp[5], COUPs[0], 1.0, 0., 0., w_fp[16] ); // Amplitude(s) for diagram number 111 - FFV1_0( w_fp[3], w_fp[52], w_fp[16], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[52], w_fp[16], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 111 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -2799,10 +2799,10 @@ namespace mg5amcCpu // *** DIAGRAM 112 OF 1240 *** // Wavefunction(s) for diagram number 112 - FFV1_1( w_fp[2], w_fp[27], COUPs[1], cIPD[0], cIPD[1], w_fp[15] ); + FFV1_1( w_fp[2], w_fp[27], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[15] ); // Amplitude(s) for diagram number 112 - FFV1_0( w_fp[34], w_fp[15], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[34], w_fp[15], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 112 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -2818,7 +2818,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 113 - FFV1_0( w_fp[34], w_fp[2], w_fp[16], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[34], w_fp[2], w_fp[16], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 113 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -2838,7 +2838,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 114 - FFV1_0( w_fp[3], w_fp[15], w_fp[12], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[15], w_fp[12], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 114 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -2858,7 +2858,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 115 - FFV1_0( w_fp[14], w_fp[2], w_fp[12], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[14], w_fp[2], w_fp[12], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 115 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -2875,10 +2875,10 @@ namespace mg5amcCpu // *** DIAGRAM 116 OF 1240 *** // Wavefunction(s) for diagram number 116 - FFV1_2( w_fp[3], w_fp[29], COUPs[1], cIPD[0], cIPD[1], w_fp[12] ); + FFV1_2( w_fp[3], w_fp[29], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[12] ); // Amplitude(s) for diagram number 116 - FFV1_0( w_fp[12], w_fp[52], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[12], w_fp[52], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 116 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -2891,10 +2891,10 @@ namespace mg5amcCpu // *** DIAGRAM 117 OF 1240 *** // Wavefunction(s) for diagram number 117 - VVV1P0_1( w_fp[4], w_fp[29], COUPs[0], 0., 0., w_fp[19] ); + VVV1P0_1( w_fp[4], w_fp[29], COUPs[0], 1.0, 0., 0., w_fp[19] ); // Amplitude(s) for diagram number 117 - FFV1_0( w_fp[3], w_fp[52], w_fp[19], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[52], w_fp[19], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 117 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -2911,10 +2911,10 @@ namespace mg5amcCpu // *** DIAGRAM 118 OF 1240 *** // Wavefunction(s) for diagram number 118 - FFV1_1( w_fp[2], w_fp[29], COUPs[1], cIPD[0], cIPD[1], w_fp[18] ); + FFV1_1( w_fp[2], w_fp[29], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[18] ); // Amplitude(s) for diagram number 118 - FFV1_0( w_fp[34], w_fp[18], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[34], w_fp[18], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 118 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -2930,7 +2930,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 119 - FFV1_0( w_fp[34], w_fp[2], w_fp[19], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[34], w_fp[2], w_fp[19], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 119 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -2950,7 +2950,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 120 - FFV1_0( w_fp[3], w_fp[18], w_fp[9], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[18], w_fp[9], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 120 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -2970,7 +2970,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 121 - FFV1_0( w_fp[12], w_fp[2], w_fp[9], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[12], w_fp[2], w_fp[9], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 121 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -2990,7 +2990,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 122 - FFV1_0( w_fp[3], w_fp[52], w_fp[30], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[52], w_fp[30], COUPs[1], 1.0, &_fp[0] ); jamp_sv[0] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[1] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[3] += cxtype( 0, 1 ) * amp_sv[0]; @@ -2999,7 +2999,7 @@ namespace mg5amcCpu jamp_sv[25] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[27] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[29] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[52], w_fp[31], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[52], w_fp[31], COUPs[1], 1.0, &_fp[0] ); jamp_sv[1] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[2] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[3] += cxtype( 0, 1 ) * amp_sv[0]; @@ -3008,7 +3008,7 @@ namespace mg5amcCpu jamp_sv[26] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[27] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[28] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[52], w_fp[32], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[52], w_fp[32], COUPs[1], 1.0, &_fp[0] ); jamp_sv[0] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[2] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[4] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -3024,7 +3024,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 123 - FFV1_0( w_fp[34], w_fp[2], w_fp[30], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[34], w_fp[2], w_fp[30], COUPs[1], 1.0, &_fp[0] ); jamp_sv[64] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[65] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[70] += cxtype( 0, 1 ) * amp_sv[0]; @@ -3033,7 +3033,7 @@ namespace mg5amcCpu jamp_sv[95] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[118] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[119] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[34], w_fp[2], w_fp[31], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[34], w_fp[2], w_fp[31], COUPs[1], 1.0, &_fp[0] ); jamp_sv[70] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[71] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[88] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -3042,7 +3042,7 @@ namespace mg5amcCpu jamp_sv[95] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[112] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[113] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[34], w_fp[2], w_fp[32], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[34], w_fp[2], w_fp[32], COUPs[1], 1.0, &_fp[0] ); jamp_sv[64] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[65] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[88] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -3055,13 +3055,13 @@ namespace mg5amcCpu // *** DIAGRAM 124 OF 1240 *** // Wavefunction(s) for diagram number 124 - FFV1_1( w_fp[2], w_fp[0], COUPs[1], cIPD[0], cIPD[1], w_fp[34] ); - FFV1_2( w_fp[3], w_fp[1], COUPs[1], cIPD[0], cIPD[1], w_fp[52] ); - FFV1_1( w_fp[34], w_fp[4], COUPs[1], cIPD[0], cIPD[1], w_fp[9] ); - FFV1_2( w_fp[52], w_fp[5], COUPs[1], cIPD[0], cIPD[1], w_fp[22] ); + FFV1_1( w_fp[2], w_fp[0], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[34] ); + FFV1_2( w_fp[3], w_fp[1], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[52] ); + FFV1_1( w_fp[34], w_fp[4], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[9] ); + FFV1_2( w_fp[52], w_fp[5], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[22] ); // Amplitude(s) for diagram number 124 - FFV1_0( w_fp[22], w_fp[9], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[22], w_fp[9], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 124 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -3071,10 +3071,10 @@ namespace mg5amcCpu // *** DIAGRAM 125 OF 1240 *** // Wavefunction(s) for diagram number 125 - FFV1_2( w_fp[52], w_fp[6], COUPs[1], cIPD[0], cIPD[1], w_fp[21] ); + FFV1_2( w_fp[52], w_fp[6], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[21] ); // Amplitude(s) for diagram number 125 - FFV1_0( w_fp[21], w_fp[9], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[21], w_fp[9], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 125 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -3084,11 +3084,11 @@ namespace mg5amcCpu // *** DIAGRAM 126 OF 1240 *** // Wavefunction(s) for diagram number 126 - FFV1_1( w_fp[34], w_fp[5], COUPs[1], cIPD[0], cIPD[1], w_fp[55] ); - FFV1_2( w_fp[52], w_fp[4], COUPs[1], cIPD[0], cIPD[1], w_fp[56] ); + FFV1_1( w_fp[34], w_fp[5], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[55] ); + FFV1_2( w_fp[52], w_fp[4], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[56] ); // Amplitude(s) for diagram number 126 - FFV1_0( w_fp[56], w_fp[55], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[56], w_fp[55], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 126 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -3101,7 +3101,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 127 - FFV1_0( w_fp[21], w_fp[55], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[21], w_fp[55], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 127 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -3111,10 +3111,10 @@ namespace mg5amcCpu // *** DIAGRAM 128 OF 1240 *** // Wavefunction(s) for diagram number 128 - FFV1_1( w_fp[34], w_fp[6], COUPs[1], cIPD[0], cIPD[1], w_fp[57] ); + FFV1_1( w_fp[34], w_fp[6], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[57] ); // Amplitude(s) for diagram number 128 - FFV1_0( w_fp[56], w_fp[57], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[56], w_fp[57], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 128 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -3127,7 +3127,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 129 - FFV1_0( w_fp[22], w_fp[57], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[22], w_fp[57], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 129 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -3137,10 +3137,10 @@ namespace mg5amcCpu // *** DIAGRAM 130 OF 1240 *** // Wavefunction(s) for diagram number 130 - FFV1P0_3( w_fp[52], w_fp[34], COUPs[1], 0., 0., w_fp[58] ); + FFV1P0_3( w_fp[52], w_fp[34], COUPs[1], 1.0, 0., 0., w_fp[58] ); // Amplitude(s) for diagram number 130 - VVV1_0( w_fp[24], w_fp[6], w_fp[58], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[24], w_fp[6], w_fp[58], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 130 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -3153,10 +3153,10 @@ namespace mg5amcCpu // *** DIAGRAM 131 OF 1240 *** // Wavefunction(s) for diagram number 131 - FFV1_1( w_fp[34], w_fp[24], COUPs[1], cIPD[0], cIPD[1], w_fp[59] ); + FFV1_1( w_fp[34], w_fp[24], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[59] ); // Amplitude(s) for diagram number 131 - FFV1_0( w_fp[52], w_fp[59], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[59], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 131 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -3170,7 +3170,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 132 - FFV1_0( w_fp[52], w_fp[57], w_fp[24], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[57], w_fp[24], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 132 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -3184,7 +3184,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 133 - VVV1_0( w_fp[27], w_fp[5], w_fp[58], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[27], w_fp[5], w_fp[58], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 133 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -3197,10 +3197,10 @@ namespace mg5amcCpu // *** DIAGRAM 134 OF 1240 *** // Wavefunction(s) for diagram number 134 - FFV1_1( w_fp[34], w_fp[27], COUPs[1], cIPD[0], cIPD[1], w_fp[60] ); + FFV1_1( w_fp[34], w_fp[27], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[60] ); // Amplitude(s) for diagram number 134 - FFV1_0( w_fp[52], w_fp[60], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[60], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 134 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -3214,7 +3214,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 135 - FFV1_0( w_fp[52], w_fp[55], w_fp[27], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[55], w_fp[27], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 135 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -3228,7 +3228,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 136 - VVV1_0( w_fp[4], w_fp[29], w_fp[58], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[4], w_fp[29], w_fp[58], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 136 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -3244,7 +3244,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 137 - FFV1_0( w_fp[52], w_fp[9], w_fp[29], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[9], w_fp[29], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 137 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -3255,10 +3255,10 @@ namespace mg5amcCpu // *** DIAGRAM 138 OF 1240 *** // Wavefunction(s) for diagram number 138 - FFV1_1( w_fp[34], w_fp[29], COUPs[1], cIPD[0], cIPD[1], w_fp[58] ); + FFV1_1( w_fp[34], w_fp[29], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[58] ); // Amplitude(s) for diagram number 138 - FFV1_0( w_fp[52], w_fp[58], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[58], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 138 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -3272,17 +3272,17 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 139 - FFV1_0( w_fp[52], w_fp[34], w_fp[30], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[34], w_fp[30], COUPs[1], 1.0, &_fp[0] ); jamp_sv[9] += amp_sv[0]; jamp_sv[11] -= amp_sv[0]; jamp_sv[17] -= amp_sv[0]; jamp_sv[23] += amp_sv[0]; - FFV1_0( w_fp[52], w_fp[34], w_fp[31], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[34], w_fp[31], COUPs[1], 1.0, &_fp[0] ); jamp_sv[11] -= amp_sv[0]; jamp_sv[15] += amp_sv[0]; jamp_sv[17] -= amp_sv[0]; jamp_sv[21] += amp_sv[0]; - FFV1_0( w_fp[52], w_fp[34], w_fp[32], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[34], w_fp[32], COUPs[1], 1.0, &_fp[0] ); jamp_sv[9] -= amp_sv[0]; jamp_sv[15] += amp_sv[0]; jamp_sv[21] += amp_sv[0]; @@ -3291,12 +3291,12 @@ namespace mg5amcCpu // *** DIAGRAM 140 OF 1240 *** // Wavefunction(s) for diagram number 140 - VVV1P0_1( w_fp[1], w_fp[4], COUPs[0], 0., 0., w_fp[61] ); - FFV1P0_3( w_fp[3], w_fp[34], COUPs[1], 0., 0., w_fp[62] ); - VVV1P0_1( w_fp[61], w_fp[5], COUPs[0], 0., 0., w_fp[63] ); + VVV1P0_1( w_fp[1], w_fp[4], COUPs[0], 1.0, 0., 0., w_fp[61] ); + FFV1P0_3( w_fp[3], w_fp[34], COUPs[1], 1.0, 0., 0., w_fp[62] ); + VVV1P0_1( w_fp[61], w_fp[5], COUPs[0], 1.0, 0., 0., w_fp[63] ); // Amplitude(s) for diagram number 140 - VVV1_0( w_fp[62], w_fp[63], w_fp[6], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[62], w_fp[63], w_fp[6], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 140 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -3313,10 +3313,10 @@ namespace mg5amcCpu // *** DIAGRAM 141 OF 1240 *** // Wavefunction(s) for diagram number 141 - VVV1P0_1( w_fp[61], w_fp[6], COUPs[0], 0., 0., w_fp[64] ); + VVV1P0_1( w_fp[61], w_fp[6], COUPs[0], 1.0, 0., 0., w_fp[64] ); // Amplitude(s) for diagram number 141 - VVV1_0( w_fp[62], w_fp[64], w_fp[5], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[62], w_fp[64], w_fp[5], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 141 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -3336,7 +3336,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 142 - VVVV1_0( w_fp[61], w_fp[5], w_fp[6], w_fp[62], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[61], w_fp[5], w_fp[6], w_fp[62], COUPs[2], 1.0, &_fp[0] ); jamp_sv[0] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[6] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[12] += cxtype( 0, 1 ) * amp_sv[0]; @@ -3345,7 +3345,7 @@ namespace mg5amcCpu jamp_sv[20] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[22] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[23] += cxtype( 0, 1 ) * amp_sv[0]; - VVVV3_0( w_fp[61], w_fp[5], w_fp[6], w_fp[62], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[61], w_fp[5], w_fp[6], w_fp[62], COUPs[2], 1.0, &_fp[0] ); jamp_sv[1] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[7] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[12] += cxtype( 0, 1 ) * amp_sv[0]; @@ -3354,7 +3354,7 @@ namespace mg5amcCpu jamp_sv[17] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[18] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[20] -= cxtype( 0, 1 ) * amp_sv[0]; - VVVV4_0( w_fp[61], w_fp[5], w_fp[6], w_fp[62], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[61], w_fp[5], w_fp[6], w_fp[62], COUPs[2], 1.0, &_fp[0] ); jamp_sv[0] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[1] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[6] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -3367,10 +3367,10 @@ namespace mg5amcCpu // *** DIAGRAM 143 OF 1240 *** // Wavefunction(s) for diagram number 143 - FFV1_2( w_fp[3], w_fp[61], COUPs[1], cIPD[0], cIPD[1], w_fp[65] ); + FFV1_2( w_fp[3], w_fp[61], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[65] ); // Amplitude(s) for diagram number 143 - FFV1_0( w_fp[65], w_fp[55], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[65], w_fp[55], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 143 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -3384,7 +3384,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 144 - FFV1_0( w_fp[3], w_fp[55], w_fp[64], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[55], w_fp[64], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 144 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -3400,7 +3400,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 145 - FFV1_0( w_fp[65], w_fp[57], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[65], w_fp[57], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 145 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -3414,7 +3414,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 146 - FFV1_0( w_fp[3], w_fp[57], w_fp[63], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[57], w_fp[63], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 146 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -3427,10 +3427,10 @@ namespace mg5amcCpu // *** DIAGRAM 147 OF 1240 *** // Wavefunction(s) for diagram number 147 - FFV1_1( w_fp[34], w_fp[61], COUPs[1], cIPD[0], cIPD[1], w_fp[66] ); + FFV1_1( w_fp[34], w_fp[61], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[66] ); // Amplitude(s) for diagram number 147 - FFV1_0( w_fp[38], w_fp[66], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[66], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 147 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -3441,10 +3441,10 @@ namespace mg5amcCpu // *** DIAGRAM 148 OF 1240 *** // Wavefunction(s) for diagram number 148 - FFV1P0_3( w_fp[38], w_fp[34], COUPs[1], 0., 0., w_fp[67] ); + FFV1P0_3( w_fp[38], w_fp[34], COUPs[1], 1.0, 0., 0., w_fp[67] ); // Amplitude(s) for diagram number 148 - VVV1_0( w_fp[61], w_fp[6], w_fp[67], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[61], w_fp[6], w_fp[67], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 148 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -3460,7 +3460,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 149 - FFV1_0( w_fp[38], w_fp[57], w_fp[61], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[57], w_fp[61], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 149 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -3474,7 +3474,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 150 - FFV1_0( w_fp[41], w_fp[66], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[66], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 150 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -3485,10 +3485,10 @@ namespace mg5amcCpu // *** DIAGRAM 151 OF 1240 *** // Wavefunction(s) for diagram number 151 - FFV1P0_3( w_fp[41], w_fp[34], COUPs[1], 0., 0., w_fp[68] ); + FFV1P0_3( w_fp[41], w_fp[34], COUPs[1], 1.0, 0., 0., w_fp[68] ); // Amplitude(s) for diagram number 151 - VVV1_0( w_fp[61], w_fp[5], w_fp[68], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[61], w_fp[5], w_fp[68], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 151 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -3504,7 +3504,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 152 - FFV1_0( w_fp[41], w_fp[55], w_fp[61], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[55], w_fp[61], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 152 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -3518,7 +3518,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 153 - FFV1_0( w_fp[3], w_fp[66], w_fp[29], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[66], w_fp[29], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 153 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -3534,7 +3534,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 154 - VVV1_0( w_fp[61], w_fp[29], w_fp[62], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[61], w_fp[29], w_fp[62], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 154 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -3554,7 +3554,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 155 - FFV1_0( w_fp[3], w_fp[58], w_fp[61], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[58], w_fp[61], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 155 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -3567,11 +3567,11 @@ namespace mg5amcCpu // *** DIAGRAM 156 OF 1240 *** // Wavefunction(s) for diagram number 156 - VVV1P0_1( w_fp[1], w_fp[5], COUPs[0], 0., 0., w_fp[66] ); - VVV1P0_1( w_fp[66], w_fp[4], COUPs[0], 0., 0., w_fp[69] ); + VVV1P0_1( w_fp[1], w_fp[5], COUPs[0], 1.0, 0., 0., w_fp[66] ); + VVV1P0_1( w_fp[66], w_fp[4], COUPs[0], 1.0, 0., 0., w_fp[69] ); // Amplitude(s) for diagram number 156 - VVV1_0( w_fp[62], w_fp[69], w_fp[6], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[62], w_fp[69], w_fp[6], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 156 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -3588,10 +3588,10 @@ namespace mg5amcCpu // *** DIAGRAM 157 OF 1240 *** // Wavefunction(s) for diagram number 157 - VVV1P0_1( w_fp[66], w_fp[6], COUPs[0], 0., 0., w_fp[70] ); + VVV1P0_1( w_fp[66], w_fp[6], COUPs[0], 1.0, 0., 0., w_fp[70] ); // Amplitude(s) for diagram number 157 - VVV1_0( w_fp[62], w_fp[70], w_fp[4], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[62], w_fp[70], w_fp[4], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 157 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -3611,7 +3611,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 158 - VVVV1_0( w_fp[66], w_fp[4], w_fp[6], w_fp[62], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[66], w_fp[4], w_fp[6], w_fp[62], COUPs[2], 1.0, &_fp[0] ); jamp_sv[2] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[6] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[8] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -3620,7 +3620,7 @@ namespace mg5amcCpu jamp_sv[20] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[21] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[22] -= cxtype( 0, 1 ) * amp_sv[0]; - VVVV3_0( w_fp[66], w_fp[4], w_fp[6], w_fp[62], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[66], w_fp[4], w_fp[6], w_fp[62], COUPs[2], 1.0, &_fp[0] ); jamp_sv[3] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[6] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[8] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -3629,7 +3629,7 @@ namespace mg5amcCpu jamp_sv[13] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[19] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[22] -= cxtype( 0, 1 ) * amp_sv[0]; - VVVV4_0( w_fp[66], w_fp[4], w_fp[6], w_fp[62], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[66], w_fp[4], w_fp[6], w_fp[62], COUPs[2], 1.0, &_fp[0] ); jamp_sv[2] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[3] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[10] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -3642,10 +3642,10 @@ namespace mg5amcCpu // *** DIAGRAM 159 OF 1240 *** // Wavefunction(s) for diagram number 159 - FFV1_2( w_fp[3], w_fp[66], COUPs[1], cIPD[0], cIPD[1], w_fp[71] ); + FFV1_2( w_fp[3], w_fp[66], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[71] ); // Amplitude(s) for diagram number 159 - FFV1_0( w_fp[71], w_fp[9], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[71], w_fp[9], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 159 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -3659,7 +3659,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 160 - FFV1_0( w_fp[3], w_fp[9], w_fp[70], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[9], w_fp[70], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 160 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -3675,7 +3675,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 161 - FFV1_0( w_fp[71], w_fp[57], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[71], w_fp[57], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 161 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -3689,7 +3689,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 162 - FFV1_0( w_fp[3], w_fp[57], w_fp[69], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[57], w_fp[69], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 162 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -3702,10 +3702,10 @@ namespace mg5amcCpu // *** DIAGRAM 163 OF 1240 *** // Wavefunction(s) for diagram number 163 - FFV1_1( w_fp[34], w_fp[66], COUPs[1], cIPD[0], cIPD[1], w_fp[72] ); + FFV1_1( w_fp[34], w_fp[66], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[72] ); // Amplitude(s) for diagram number 163 - FFV1_0( w_fp[46], w_fp[72], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[72], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 163 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -3716,10 +3716,10 @@ namespace mg5amcCpu // *** DIAGRAM 164 OF 1240 *** // Wavefunction(s) for diagram number 164 - FFV1P0_3( w_fp[46], w_fp[34], COUPs[1], 0., 0., w_fp[73] ); + FFV1P0_3( w_fp[46], w_fp[34], COUPs[1], 1.0, 0., 0., w_fp[73] ); // Amplitude(s) for diagram number 164 - VVV1_0( w_fp[66], w_fp[6], w_fp[73], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[66], w_fp[6], w_fp[73], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 164 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -3735,7 +3735,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 165 - FFV1_0( w_fp[46], w_fp[57], w_fp[66], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[57], w_fp[66], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 165 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -3749,7 +3749,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 166 - FFV1_0( w_fp[41], w_fp[72], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[72], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 166 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -3763,7 +3763,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 167 - VVV1_0( w_fp[66], w_fp[4], w_fp[68], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[66], w_fp[4], w_fp[68], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 167 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -3779,7 +3779,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 168 - FFV1_0( w_fp[41], w_fp[9], w_fp[66], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[9], w_fp[66], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 168 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -3793,7 +3793,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 169 - FFV1_0( w_fp[3], w_fp[72], w_fp[27], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[72], w_fp[27], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 169 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -3809,7 +3809,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 170 - VVV1_0( w_fp[66], w_fp[27], w_fp[62], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[66], w_fp[27], w_fp[62], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 170 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -3829,7 +3829,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 171 - FFV1_0( w_fp[3], w_fp[60], w_fp[66], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[60], w_fp[66], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 171 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -3842,11 +3842,11 @@ namespace mg5amcCpu // *** DIAGRAM 172 OF 1240 *** // Wavefunction(s) for diagram number 172 - VVV1P0_1( w_fp[1], w_fp[6], COUPs[0], 0., 0., w_fp[72] ); - VVV1P0_1( w_fp[72], w_fp[4], COUPs[0], 0., 0., w_fp[74] ); + VVV1P0_1( w_fp[1], w_fp[6], COUPs[0], 1.0, 0., 0., w_fp[72] ); + VVV1P0_1( w_fp[72], w_fp[4], COUPs[0], 1.0, 0., 0., w_fp[74] ); // Amplitude(s) for diagram number 172 - VVV1_0( w_fp[62], w_fp[74], w_fp[5], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[62], w_fp[74], w_fp[5], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 172 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -3863,10 +3863,10 @@ namespace mg5amcCpu // *** DIAGRAM 173 OF 1240 *** // Wavefunction(s) for diagram number 173 - VVV1P0_1( w_fp[72], w_fp[5], COUPs[0], 0., 0., w_fp[75] ); + VVV1P0_1( w_fp[72], w_fp[5], COUPs[0], 1.0, 0., 0., w_fp[75] ); // Amplitude(s) for diagram number 173 - VVV1_0( w_fp[62], w_fp[75], w_fp[4], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[62], w_fp[75], w_fp[4], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 173 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -3886,7 +3886,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 174 - VVVV1_0( w_fp[72], w_fp[4], w_fp[5], w_fp[62], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[72], w_fp[4], w_fp[5], w_fp[62], COUPs[2], 1.0, &_fp[0] ); jamp_sv[4] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[7] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[10] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -3895,7 +3895,7 @@ namespace mg5amcCpu jamp_sv[15] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[16] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[18] += cxtype( 0, 1 ) * amp_sv[0]; - VVVV3_0( w_fp[72], w_fp[4], w_fp[5], w_fp[62], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[72], w_fp[4], w_fp[5], w_fp[62], COUPs[2], 1.0, &_fp[0] ); jamp_sv[5] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[7] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[8] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -3904,7 +3904,7 @@ namespace mg5amcCpu jamp_sv[13] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[16] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[19] += cxtype( 0, 1 ) * amp_sv[0]; - VVVV4_0( w_fp[72], w_fp[4], w_fp[5], w_fp[62], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[72], w_fp[4], w_fp[5], w_fp[62], COUPs[2], 1.0, &_fp[0] ); jamp_sv[4] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[5] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[8] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -3917,10 +3917,10 @@ namespace mg5amcCpu // *** DIAGRAM 175 OF 1240 *** // Wavefunction(s) for diagram number 175 - FFV1_2( w_fp[3], w_fp[72], COUPs[1], cIPD[0], cIPD[1], w_fp[76] ); + FFV1_2( w_fp[3], w_fp[72], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[76] ); // Amplitude(s) for diagram number 175 - FFV1_0( w_fp[76], w_fp[9], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[76], w_fp[9], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 175 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -3934,7 +3934,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 176 - FFV1_0( w_fp[3], w_fp[9], w_fp[75], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[9], w_fp[75], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 176 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -3950,7 +3950,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 177 - FFV1_0( w_fp[76], w_fp[55], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[76], w_fp[55], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 177 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -3964,7 +3964,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 178 - FFV1_0( w_fp[3], w_fp[55], w_fp[74], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[55], w_fp[74], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 178 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -3977,10 +3977,10 @@ namespace mg5amcCpu // *** DIAGRAM 179 OF 1240 *** // Wavefunction(s) for diagram number 179 - FFV1_1( w_fp[34], w_fp[72], COUPs[1], cIPD[0], cIPD[1], w_fp[77] ); + FFV1_1( w_fp[34], w_fp[72], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[77] ); // Amplitude(s) for diagram number 179 - FFV1_0( w_fp[46], w_fp[77], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[77], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 179 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -3994,7 +3994,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 180 - VVV1_0( w_fp[72], w_fp[5], w_fp[73], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[72], w_fp[5], w_fp[73], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 180 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -4010,7 +4010,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 181 - FFV1_0( w_fp[46], w_fp[55], w_fp[72], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[55], w_fp[72], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 181 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -4024,7 +4024,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 182 - FFV1_0( w_fp[38], w_fp[77], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[77], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 182 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -4038,7 +4038,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 183 - VVV1_0( w_fp[72], w_fp[4], w_fp[67], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[72], w_fp[4], w_fp[67], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 183 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -4054,7 +4054,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 184 - FFV1_0( w_fp[38], w_fp[9], w_fp[72], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[9], w_fp[72], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 184 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -4068,7 +4068,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 185 - FFV1_0( w_fp[3], w_fp[77], w_fp[24], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[77], w_fp[24], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 185 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -4084,7 +4084,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 186 - VVV1_0( w_fp[72], w_fp[24], w_fp[62], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[72], w_fp[24], w_fp[62], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 186 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -4104,7 +4104,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 187 - FFV1_0( w_fp[3], w_fp[59], w_fp[72], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[59], w_fp[72], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 187 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -4117,10 +4117,10 @@ namespace mg5amcCpu // *** DIAGRAM 188 OF 1240 *** // Wavefunction(s) for diagram number 188 - FFV1_1( w_fp[34], w_fp[1], COUPs[1], cIPD[0], cIPD[1], w_fp[77] ); + FFV1_1( w_fp[34], w_fp[1], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[77] ); // Amplitude(s) for diagram number 188 - FFV1_0( w_fp[7], w_fp[77], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[7], w_fp[77], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 188 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -4133,7 +4133,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 189 - FFV1_0( w_fp[53], w_fp[77], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[53], w_fp[77], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 189 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -4143,10 +4143,10 @@ namespace mg5amcCpu // *** DIAGRAM 190 OF 1240 *** // Wavefunction(s) for diagram number 190 - FFV1_2( w_fp[46], w_fp[1], COUPs[1], cIPD[0], cIPD[1], w_fp[78] ); + FFV1_2( w_fp[46], w_fp[1], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[78] ); // Amplitude(s) for diagram number 190 - FFV1_0( w_fp[78], w_fp[55], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[78], w_fp[55], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 190 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -4159,7 +4159,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 191 - FFV1_0( w_fp[53], w_fp[55], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[53], w_fp[55], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 191 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -4172,7 +4172,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 192 - FFV1_0( w_fp[78], w_fp[57], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[78], w_fp[57], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 192 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -4185,7 +4185,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 193 - FFV1_0( w_fp[7], w_fp[57], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[7], w_fp[57], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 193 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -4198,7 +4198,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 194 - FFV1_0( w_fp[46], w_fp[77], w_fp[29], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[77], w_fp[29], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 194 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -4212,7 +4212,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 195 - VVV1_0( w_fp[1], w_fp[29], w_fp[73], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[29], w_fp[73], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 195 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -4228,7 +4228,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 196 - FFV1_0( w_fp[46], w_fp[58], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[58], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 196 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -4242,7 +4242,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 197 - FFV1_0( w_fp[25], w_fp[77], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[25], w_fp[77], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 197 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -4255,7 +4255,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 198 - FFV1_0( w_fp[48], w_fp[77], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[48], w_fp[77], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 198 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -4265,10 +4265,10 @@ namespace mg5amcCpu // *** DIAGRAM 199 OF 1240 *** // Wavefunction(s) for diagram number 199 - FFV1_2( w_fp[38], w_fp[1], COUPs[1], cIPD[0], cIPD[1], w_fp[58] ); + FFV1_2( w_fp[38], w_fp[1], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[58] ); // Amplitude(s) for diagram number 199 - FFV1_0( w_fp[58], w_fp[9], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[58], w_fp[9], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 199 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -4281,7 +4281,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 200 - FFV1_0( w_fp[48], w_fp[9], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[48], w_fp[9], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 200 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -4294,7 +4294,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 201 - FFV1_0( w_fp[58], w_fp[57], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[58], w_fp[57], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 201 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -4307,7 +4307,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 202 - FFV1_0( w_fp[25], w_fp[57], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[25], w_fp[57], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 202 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -4320,7 +4320,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 203 - FFV1_0( w_fp[38], w_fp[77], w_fp[27], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[77], w_fp[27], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 203 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -4334,7 +4334,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 204 - VVV1_0( w_fp[1], w_fp[27], w_fp[67], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[27], w_fp[67], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 204 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -4350,7 +4350,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 205 - FFV1_0( w_fp[38], w_fp[60], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[60], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 205 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -4364,7 +4364,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 206 - FFV1_0( w_fp[28], w_fp[77], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[28], w_fp[77], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 206 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -4377,7 +4377,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 207 - FFV1_0( w_fp[40], w_fp[77], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[40], w_fp[77], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 207 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -4387,10 +4387,10 @@ namespace mg5amcCpu // *** DIAGRAM 208 OF 1240 *** // Wavefunction(s) for diagram number 208 - FFV1_2( w_fp[41], w_fp[1], COUPs[1], cIPD[0], cIPD[1], w_fp[60] ); + FFV1_2( w_fp[41], w_fp[1], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[60] ); // Amplitude(s) for diagram number 208 - FFV1_0( w_fp[60], w_fp[9], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[60], w_fp[9], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 208 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -4403,7 +4403,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 209 - FFV1_0( w_fp[40], w_fp[9], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[40], w_fp[9], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 209 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -4416,7 +4416,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 210 - FFV1_0( w_fp[60], w_fp[55], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[60], w_fp[55], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 210 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -4429,7 +4429,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 211 - FFV1_0( w_fp[28], w_fp[55], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[28], w_fp[55], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 211 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -4442,7 +4442,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 212 - FFV1_0( w_fp[41], w_fp[77], w_fp[24], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[77], w_fp[24], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 212 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -4456,7 +4456,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 213 - VVV1_0( w_fp[1], w_fp[24], w_fp[68], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[24], w_fp[68], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 213 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -4472,7 +4472,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 214 - FFV1_0( w_fp[41], w_fp[59], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[59], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 214 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -4486,7 +4486,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 215 - FFV1_0( w_fp[26], w_fp[77], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[26], w_fp[77], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 215 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -4500,7 +4500,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 216 - FFV1_0( w_fp[3], w_fp[77], w_fp[42], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[77], w_fp[42], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 216 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -4513,10 +4513,10 @@ namespace mg5amcCpu // *** DIAGRAM 217 OF 1240 *** // Wavefunction(s) for diagram number 217 - VVV1P0_1( w_fp[1], w_fp[24], COUPs[0], 0., 0., w_fp[59] ); + VVV1P0_1( w_fp[1], w_fp[24], COUPs[0], 1.0, 0., 0., w_fp[59] ); // Amplitude(s) for diagram number 217 - VVV1_0( w_fp[62], w_fp[59], w_fp[6], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[62], w_fp[59], w_fp[6], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 217 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -4536,7 +4536,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 218 - VVV1_0( w_fp[62], w_fp[1], w_fp[42], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[62], w_fp[1], w_fp[42], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 218 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -4556,7 +4556,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 219 - VVVV1_0( w_fp[1], w_fp[24], w_fp[6], w_fp[62], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[1], w_fp[24], w_fp[6], w_fp[62], COUPs[2], 1.0, &_fp[0] ); jamp_sv[0] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[2] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[8] += cxtype( 0, 1 ) * amp_sv[0]; @@ -4565,7 +4565,7 @@ namespace mg5amcCpu jamp_sv[19] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[21] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[23] += cxtype( 0, 1 ) * amp_sv[0]; - VVVV3_0( w_fp[1], w_fp[24], w_fp[6], w_fp[62], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[1], w_fp[24], w_fp[6], w_fp[62], COUPs[2], 1.0, &_fp[0] ); jamp_sv[4] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[5] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[8] += cxtype( 0, 1 ) * amp_sv[0]; @@ -4574,7 +4574,7 @@ namespace mg5amcCpu jamp_sv[15] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[18] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[19] -= cxtype( 0, 1 ) * amp_sv[0]; - VVVV4_0( w_fp[1], w_fp[24], w_fp[6], w_fp[62], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[1], w_fp[24], w_fp[6], w_fp[62], COUPs[2], 1.0, &_fp[0] ); jamp_sv[0] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[2] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[4] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -4590,7 +4590,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 220 - FFV1_0( w_fp[3], w_fp[57], w_fp[59], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[57], w_fp[59], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 220 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -4606,7 +4606,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 221 - FFV1_0( w_fp[26], w_fp[57], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[26], w_fp[57], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 221 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -4620,7 +4620,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 222 - FFV1_0( w_fp[14], w_fp[77], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[14], w_fp[77], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 222 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -4634,7 +4634,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 223 - FFV1_0( w_fp[3], w_fp[77], w_fp[16], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[77], w_fp[16], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 223 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -4647,10 +4647,10 @@ namespace mg5amcCpu // *** DIAGRAM 224 OF 1240 *** // Wavefunction(s) for diagram number 224 - VVV1P0_1( w_fp[1], w_fp[27], COUPs[0], 0., 0., w_fp[68] ); + VVV1P0_1( w_fp[1], w_fp[27], COUPs[0], 1.0, 0., 0., w_fp[68] ); // Amplitude(s) for diagram number 224 - VVV1_0( w_fp[62], w_fp[68], w_fp[5], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[62], w_fp[68], w_fp[5], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 224 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -4670,7 +4670,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 225 - VVV1_0( w_fp[62], w_fp[1], w_fp[16], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[62], w_fp[1], w_fp[16], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 225 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -4690,7 +4690,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 226 - VVVV1_0( w_fp[1], w_fp[27], w_fp[5], w_fp[62], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[1], w_fp[27], w_fp[5], w_fp[62], COUPs[2], 1.0, &_fp[0] ); jamp_sv[1] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[4] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[10] += cxtype( 0, 1 ) * amp_sv[0]; @@ -4699,7 +4699,7 @@ namespace mg5amcCpu jamp_sv[15] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[17] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[20] -= cxtype( 0, 1 ) * amp_sv[0]; - VVVV3_0( w_fp[1], w_fp[27], w_fp[5], w_fp[62], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[1], w_fp[27], w_fp[5], w_fp[62], COUPs[2], 1.0, &_fp[0] ); jamp_sv[2] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[3] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[10] += cxtype( 0, 1 ) * amp_sv[0]; @@ -4708,7 +4708,7 @@ namespace mg5amcCpu jamp_sv[13] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[20] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[21] += cxtype( 0, 1 ) * amp_sv[0]; - VVVV4_0( w_fp[1], w_fp[27], w_fp[5], w_fp[62], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[1], w_fp[27], w_fp[5], w_fp[62], COUPs[2], 1.0, &_fp[0] ); jamp_sv[1] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[2] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[3] += cxtype( 0, 1 ) * amp_sv[0]; @@ -4724,7 +4724,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 227 - FFV1_0( w_fp[3], w_fp[55], w_fp[68], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[55], w_fp[68], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 227 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -4740,7 +4740,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 228 - FFV1_0( w_fp[14], w_fp[55], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[14], w_fp[55], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 228 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -4754,7 +4754,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 229 - FFV1_0( w_fp[12], w_fp[77], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[12], w_fp[77], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 229 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -4768,7 +4768,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 230 - FFV1_0( w_fp[3], w_fp[77], w_fp[19], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[77], w_fp[19], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 230 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -4781,10 +4781,10 @@ namespace mg5amcCpu // *** DIAGRAM 231 OF 1240 *** // Wavefunction(s) for diagram number 231 - VVV1P0_1( w_fp[1], w_fp[29], COUPs[0], 0., 0., w_fp[67] ); + VVV1P0_1( w_fp[1], w_fp[29], COUPs[0], 1.0, 0., 0., w_fp[67] ); // Amplitude(s) for diagram number 231 - VVV1_0( w_fp[62], w_fp[67], w_fp[4], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[62], w_fp[67], w_fp[4], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 231 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -4804,7 +4804,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 232 - VVV1_0( w_fp[62], w_fp[1], w_fp[19], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[62], w_fp[1], w_fp[19], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 232 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -4824,7 +4824,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 233 - VVVV1_0( w_fp[1], w_fp[4], w_fp[29], w_fp[62], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[1], w_fp[4], w_fp[29], w_fp[62], COUPs[2], 1.0, &_fp[0] ); jamp_sv[0] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[1] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[6] += cxtype( 0, 1 ) * amp_sv[0]; @@ -4833,7 +4833,7 @@ namespace mg5amcCpu jamp_sv[17] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[22] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[23] += cxtype( 0, 1 ) * amp_sv[0]; - VVVV3_0( w_fp[1], w_fp[4], w_fp[29], w_fp[62], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[1], w_fp[4], w_fp[29], w_fp[62], COUPs[2], 1.0, &_fp[0] ); jamp_sv[3] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[5] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[6] += cxtype( 0, 1 ) * amp_sv[0]; @@ -4842,7 +4842,7 @@ namespace mg5amcCpu jamp_sv[11] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[16] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[22] -= cxtype( 0, 1 ) * amp_sv[0]; - VVVV4_0( w_fp[1], w_fp[4], w_fp[29], w_fp[62], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[1], w_fp[4], w_fp[29], w_fp[62], COUPs[2], 1.0, &_fp[0] ); jamp_sv[0] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[1] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[3] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -4858,7 +4858,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 234 - FFV1_0( w_fp[3], w_fp[9], w_fp[67], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[9], w_fp[67], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 234 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -4874,7 +4874,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 235 - FFV1_0( w_fp[12], w_fp[9], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[12], w_fp[9], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 235 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -4885,12 +4885,12 @@ namespace mg5amcCpu // *** DIAGRAM 236 OF 1240 *** // Wavefunction(s) for diagram number 236 - VVVV1P0_1( w_fp[1], w_fp[4], w_fp[5], COUPs[2], 0., 0., w_fp[73] ); - VVVV3P0_1( w_fp[1], w_fp[4], w_fp[5], COUPs[2], 0., 0., w_fp[79] ); - VVVV4P0_1( w_fp[1], w_fp[4], w_fp[5], COUPs[2], 0., 0., w_fp[80] ); + VVVV1P0_1( w_fp[1], w_fp[4], w_fp[5], COUPs[2], 1.0, 0., 0., w_fp[73] ); + VVVV3P0_1( w_fp[1], w_fp[4], w_fp[5], COUPs[2], 1.0, 0., 0., w_fp[79] ); + VVVV4P0_1( w_fp[1], w_fp[4], w_fp[5], COUPs[2], 1.0, 0., 0., w_fp[80] ); // Amplitude(s) for diagram number 236 - VVV1_0( w_fp[73], w_fp[6], w_fp[62], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[73], w_fp[6], w_fp[62], COUPs[0], 1.0, &_fp[0] ); jamp_sv[0] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[2] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[8] += cxtype( 0, 1 ) * amp_sv[0]; @@ -4899,7 +4899,7 @@ namespace mg5amcCpu jamp_sv[19] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[21] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[23] += cxtype( 0, 1 ) * amp_sv[0]; - VVV1_0( w_fp[79], w_fp[6], w_fp[62], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[79], w_fp[6], w_fp[62], COUPs[0], 1.0, &_fp[0] ); jamp_sv[2] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[6] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[8] += cxtype( 0, 1 ) * amp_sv[0]; @@ -4908,7 +4908,7 @@ namespace mg5amcCpu jamp_sv[20] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[21] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[22] += cxtype( 0, 1 ) * amp_sv[0]; - VVV1_0( w_fp[80], w_fp[6], w_fp[62], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[80], w_fp[6], w_fp[62], COUPs[0], 1.0, &_fp[0] ); jamp_sv[0] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[6] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[12] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -4924,17 +4924,17 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 237 - FFV1_0( w_fp[3], w_fp[57], w_fp[73], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[57], w_fp[73], COUPs[1], 1.0, &_fp[0] ); jamp_sv[18] += amp_sv[0]; jamp_sv[19] -= amp_sv[0]; jamp_sv[21] -= amp_sv[0]; jamp_sv[23] += amp_sv[0]; - FFV1_0( w_fp[3], w_fp[57], w_fp[79], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[57], w_fp[79], COUPs[1], 1.0, &_fp[0] ); jamp_sv[19] -= amp_sv[0]; jamp_sv[20] += amp_sv[0]; jamp_sv[21] -= amp_sv[0]; jamp_sv[22] += amp_sv[0]; - FFV1_0( w_fp[3], w_fp[57], w_fp[80], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[57], w_fp[80], COUPs[1], 1.0, &_fp[0] ); jamp_sv[18] -= amp_sv[0]; jamp_sv[20] += amp_sv[0]; jamp_sv[22] += amp_sv[0]; @@ -4946,17 +4946,17 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 238 - FFV1_0( w_fp[41], w_fp[34], w_fp[73], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[34], w_fp[73], COUPs[1], 1.0, &_fp[0] ); jamp_sv[0] += amp_sv[0]; jamp_sv[2] -= amp_sv[0]; jamp_sv[8] -= amp_sv[0]; jamp_sv[14] += amp_sv[0]; - FFV1_0( w_fp[41], w_fp[34], w_fp[79], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[34], w_fp[79], COUPs[1], 1.0, &_fp[0] ); jamp_sv[2] -= amp_sv[0]; jamp_sv[6] += amp_sv[0]; jamp_sv[8] -= amp_sv[0]; jamp_sv[12] += amp_sv[0]; - FFV1_0( w_fp[41], w_fp[34], w_fp[80], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[34], w_fp[80], COUPs[1], 1.0, &_fp[0] ); jamp_sv[0] -= amp_sv[0]; jamp_sv[6] += amp_sv[0]; jamp_sv[12] += amp_sv[0]; @@ -4965,12 +4965,12 @@ namespace mg5amcCpu // *** DIAGRAM 239 OF 1240 *** // Wavefunction(s) for diagram number 239 - VVVV1P0_1( w_fp[1], w_fp[4], w_fp[6], COUPs[2], 0., 0., w_fp[57] ); - VVVV3P0_1( w_fp[1], w_fp[4], w_fp[6], COUPs[2], 0., 0., w_fp[81] ); - VVVV4P0_1( w_fp[1], w_fp[4], w_fp[6], COUPs[2], 0., 0., w_fp[82] ); + VVVV1P0_1( w_fp[1], w_fp[4], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[57] ); + VVVV3P0_1( w_fp[1], w_fp[4], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[81] ); + VVVV4P0_1( w_fp[1], w_fp[4], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[82] ); // Amplitude(s) for diagram number 239 - VVV1_0( w_fp[57], w_fp[5], w_fp[62], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[57], w_fp[5], w_fp[62], COUPs[0], 1.0, &_fp[0] ); jamp_sv[1] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[4] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[10] += cxtype( 0, 1 ) * amp_sv[0]; @@ -4979,7 +4979,7 @@ namespace mg5amcCpu jamp_sv[15] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[17] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[20] -= cxtype( 0, 1 ) * amp_sv[0]; - VVV1_0( w_fp[81], w_fp[5], w_fp[62], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[81], w_fp[5], w_fp[62], COUPs[0], 1.0, &_fp[0] ); jamp_sv[4] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[7] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[10] += cxtype( 0, 1 ) * amp_sv[0]; @@ -4988,7 +4988,7 @@ namespace mg5amcCpu jamp_sv[15] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[16] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[18] -= cxtype( 0, 1 ) * amp_sv[0]; - VVV1_0( w_fp[82], w_fp[5], w_fp[62], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[82], w_fp[5], w_fp[62], COUPs[0], 1.0, &_fp[0] ); jamp_sv[1] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[7] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[12] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -5004,17 +5004,17 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 240 - FFV1_0( w_fp[3], w_fp[55], w_fp[57], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[55], w_fp[57], COUPs[1], 1.0, &_fp[0] ); jamp_sv[12] += amp_sv[0]; jamp_sv[13] -= amp_sv[0]; jamp_sv[15] -= amp_sv[0]; jamp_sv[17] += amp_sv[0]; - FFV1_0( w_fp[3], w_fp[55], w_fp[81], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[55], w_fp[81], COUPs[1], 1.0, &_fp[0] ); jamp_sv[13] -= amp_sv[0]; jamp_sv[14] += amp_sv[0]; jamp_sv[15] -= amp_sv[0]; jamp_sv[16] += amp_sv[0]; - FFV1_0( w_fp[3], w_fp[55], w_fp[82], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[55], w_fp[82], COUPs[1], 1.0, &_fp[0] ); jamp_sv[12] -= amp_sv[0]; jamp_sv[14] += amp_sv[0]; jamp_sv[16] += amp_sv[0]; @@ -5026,17 +5026,17 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 241 - FFV1_0( w_fp[38], w_fp[34], w_fp[57], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[34], w_fp[57], COUPs[1], 1.0, &_fp[0] ); jamp_sv[1] += amp_sv[0]; jamp_sv[4] -= amp_sv[0]; jamp_sv[10] -= amp_sv[0]; jamp_sv[20] += amp_sv[0]; - FFV1_0( w_fp[38], w_fp[34], w_fp[81], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[34], w_fp[81], COUPs[1], 1.0, &_fp[0] ); jamp_sv[4] -= amp_sv[0]; jamp_sv[7] += amp_sv[0]; jamp_sv[10] -= amp_sv[0]; jamp_sv[18] += amp_sv[0]; - FFV1_0( w_fp[38], w_fp[34], w_fp[82], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[34], w_fp[82], COUPs[1], 1.0, &_fp[0] ); jamp_sv[1] -= amp_sv[0]; jamp_sv[7] += amp_sv[0]; jamp_sv[18] += amp_sv[0]; @@ -5045,12 +5045,12 @@ namespace mg5amcCpu // *** DIAGRAM 242 OF 1240 *** // Wavefunction(s) for diagram number 242 - VVVV1P0_1( w_fp[1], w_fp[5], w_fp[6], COUPs[2], 0., 0., w_fp[55] ); - VVVV3P0_1( w_fp[1], w_fp[5], w_fp[6], COUPs[2], 0., 0., w_fp[83] ); - VVVV4P0_1( w_fp[1], w_fp[5], w_fp[6], COUPs[2], 0., 0., w_fp[84] ); + VVVV1P0_1( w_fp[1], w_fp[5], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[55] ); + VVVV3P0_1( w_fp[1], w_fp[5], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[83] ); + VVVV4P0_1( w_fp[1], w_fp[5], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[84] ); // Amplitude(s) for diagram number 242 - VVV1_0( w_fp[55], w_fp[4], w_fp[62], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[55], w_fp[4], w_fp[62], COUPs[0], 1.0, &_fp[0] ); jamp_sv[3] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[5] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[6] += cxtype( 0, 1 ) * amp_sv[0]; @@ -5059,7 +5059,7 @@ namespace mg5amcCpu jamp_sv[11] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[16] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[22] -= cxtype( 0, 1 ) * amp_sv[0]; - VVV1_0( w_fp[83], w_fp[4], w_fp[62], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[83], w_fp[4], w_fp[62], COUPs[0], 1.0, &_fp[0] ); jamp_sv[5] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[7] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[8] += cxtype( 0, 1 ) * amp_sv[0]; @@ -5068,7 +5068,7 @@ namespace mg5amcCpu jamp_sv[13] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[16] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[19] -= cxtype( 0, 1 ) * amp_sv[0]; - VVV1_0( w_fp[84], w_fp[4], w_fp[62], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[84], w_fp[4], w_fp[62], COUPs[0], 1.0, &_fp[0] ); jamp_sv[3] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[6] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[8] += cxtype( 0, 1 ) * amp_sv[0]; @@ -5084,17 +5084,17 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 243 - FFV1_0( w_fp[3], w_fp[9], w_fp[55], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[9], w_fp[55], COUPs[1], 1.0, &_fp[0] ); jamp_sv[6] += amp_sv[0]; jamp_sv[7] -= amp_sv[0]; jamp_sv[9] -= amp_sv[0]; jamp_sv[11] += amp_sv[0]; - FFV1_0( w_fp[3], w_fp[9], w_fp[83], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[9], w_fp[83], COUPs[1], 1.0, &_fp[0] ); jamp_sv[7] -= amp_sv[0]; jamp_sv[8] += amp_sv[0]; jamp_sv[9] -= amp_sv[0]; jamp_sv[10] += amp_sv[0]; - FFV1_0( w_fp[3], w_fp[9], w_fp[84], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[9], w_fp[84], COUPs[1], 1.0, &_fp[0] ); jamp_sv[6] -= amp_sv[0]; jamp_sv[8] += amp_sv[0]; jamp_sv[10] += amp_sv[0]; @@ -5106,17 +5106,17 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 244 - FFV1_0( w_fp[46], w_fp[34], w_fp[55], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[34], w_fp[55], COUPs[1], 1.0, &_fp[0] ); jamp_sv[3] += amp_sv[0]; jamp_sv[5] -= amp_sv[0]; jamp_sv[16] -= amp_sv[0]; jamp_sv[22] += amp_sv[0]; - FFV1_0( w_fp[46], w_fp[34], w_fp[83], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[34], w_fp[83], COUPs[1], 1.0, &_fp[0] ); jamp_sv[5] -= amp_sv[0]; jamp_sv[13] += amp_sv[0]; jamp_sv[16] -= amp_sv[0]; jamp_sv[19] += amp_sv[0]; - FFV1_0( w_fp[46], w_fp[34], w_fp[84], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[34], w_fp[84], COUPs[1], 1.0, &_fp[0] ); jamp_sv[3] -= amp_sv[0]; jamp_sv[13] += amp_sv[0]; jamp_sv[19] += amp_sv[0]; @@ -5128,17 +5128,17 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 245 - FFV1_0( w_fp[3], w_fp[77], w_fp[30], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[77], w_fp[30], COUPs[1], 1.0, &_fp[0] ); jamp_sv[0] += amp_sv[0]; jamp_sv[1] -= amp_sv[0]; jamp_sv[3] -= amp_sv[0]; jamp_sv[5] += amp_sv[0]; - FFV1_0( w_fp[3], w_fp[77], w_fp[31], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[77], w_fp[31], COUPs[1], 1.0, &_fp[0] ); jamp_sv[1] -= amp_sv[0]; jamp_sv[2] += amp_sv[0]; jamp_sv[3] -= amp_sv[0]; jamp_sv[4] += amp_sv[0]; - FFV1_0( w_fp[3], w_fp[77], w_fp[32], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[77], w_fp[32], COUPs[1], 1.0, &_fp[0] ); jamp_sv[0] -= amp_sv[0]; jamp_sv[2] += amp_sv[0]; jamp_sv[4] += amp_sv[0]; @@ -5150,7 +5150,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 246 - VVV1_0( w_fp[1], w_fp[30], w_fp[62], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[30], w_fp[62], COUPs[0], 1.0, &_fp[0] ); jamp_sv[0] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[1] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[3] += cxtype( 0, 1 ) * amp_sv[0]; @@ -5159,7 +5159,7 @@ namespace mg5amcCpu jamp_sv[11] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[17] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[23] += cxtype( 0, 1 ) * amp_sv[0]; - VVV1_0( w_fp[1], w_fp[31], w_fp[62], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[31], w_fp[62], COUPs[0], 1.0, &_fp[0] ); jamp_sv[1] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[2] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[3] += cxtype( 0, 1 ) * amp_sv[0]; @@ -5168,7 +5168,7 @@ namespace mg5amcCpu jamp_sv[15] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[17] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[21] += cxtype( 0, 1 ) * amp_sv[0]; - VVV1_0( w_fp[1], w_fp[32], w_fp[62], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[32], w_fp[62], COUPs[0], 1.0, &_fp[0] ); jamp_sv[0] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[2] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[4] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -5181,13 +5181,13 @@ namespace mg5amcCpu // *** DIAGRAM 247 OF 1240 *** // Wavefunction(s) for diagram number 247 - FFV1_2( w_fp[3], w_fp[0], COUPs[1], cIPD[0], cIPD[1], w_fp[62] ); - FFV1_1( w_fp[2], w_fp[1], COUPs[1], cIPD[0], cIPD[1], w_fp[77] ); - FFV1_2( w_fp[62], w_fp[4], COUPs[1], cIPD[0], cIPD[1], w_fp[34] ); - FFV1_1( w_fp[77], w_fp[5], COUPs[1], cIPD[0], cIPD[1], w_fp[9] ); + FFV1_2( w_fp[3], w_fp[0], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[62] ); + FFV1_1( w_fp[2], w_fp[1], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[77] ); + FFV1_2( w_fp[62], w_fp[4], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[34] ); + FFV1_1( w_fp[77], w_fp[5], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[9] ); // Amplitude(s) for diagram number 247 - FFV1_0( w_fp[34], w_fp[9], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[34], w_fp[9], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 247 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -5197,10 +5197,10 @@ namespace mg5amcCpu // *** DIAGRAM 248 OF 1240 *** // Wavefunction(s) for diagram number 248 - FFV1_1( w_fp[77], w_fp[6], COUPs[1], cIPD[0], cIPD[1], w_fp[85] ); + FFV1_1( w_fp[77], w_fp[6], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[85] ); // Amplitude(s) for diagram number 248 - FFV1_0( w_fp[34], w_fp[85], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[34], w_fp[85], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 248 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -5210,11 +5210,11 @@ namespace mg5amcCpu // *** DIAGRAM 249 OF 1240 *** // Wavefunction(s) for diagram number 249 - FFV1_2( w_fp[62], w_fp[5], COUPs[1], cIPD[0], cIPD[1], w_fp[86] ); - FFV1_1( w_fp[77], w_fp[4], COUPs[1], cIPD[0], cIPD[1], w_fp[87] ); + FFV1_2( w_fp[62], w_fp[5], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[86] ); + FFV1_1( w_fp[77], w_fp[4], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[87] ); // Amplitude(s) for diagram number 249 - FFV1_0( w_fp[86], w_fp[87], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[86], w_fp[87], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 249 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -5227,7 +5227,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 250 - FFV1_0( w_fp[86], w_fp[85], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[86], w_fp[85], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 250 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -5237,10 +5237,10 @@ namespace mg5amcCpu // *** DIAGRAM 251 OF 1240 *** // Wavefunction(s) for diagram number 251 - FFV1_2( w_fp[62], w_fp[6], COUPs[1], cIPD[0], cIPD[1], w_fp[88] ); + FFV1_2( w_fp[62], w_fp[6], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[88] ); // Amplitude(s) for diagram number 251 - FFV1_0( w_fp[88], w_fp[87], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[88], w_fp[87], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 251 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -5253,7 +5253,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 252 - FFV1_0( w_fp[88], w_fp[9], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[88], w_fp[9], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 252 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -5263,10 +5263,10 @@ namespace mg5amcCpu // *** DIAGRAM 253 OF 1240 *** // Wavefunction(s) for diagram number 253 - FFV1P0_3( w_fp[62], w_fp[77], COUPs[1], 0., 0., w_fp[89] ); + FFV1P0_3( w_fp[62], w_fp[77], COUPs[1], 1.0, 0., 0., w_fp[89] ); // Amplitude(s) for diagram number 253 - VVV1_0( w_fp[24], w_fp[6], w_fp[89], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[24], w_fp[6], w_fp[89], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 253 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -5279,10 +5279,10 @@ namespace mg5amcCpu // *** DIAGRAM 254 OF 1240 *** // Wavefunction(s) for diagram number 254 - FFV1_2( w_fp[62], w_fp[24], COUPs[1], cIPD[0], cIPD[1], w_fp[90] ); + FFV1_2( w_fp[62], w_fp[24], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[90] ); // Amplitude(s) for diagram number 254 - FFV1_0( w_fp[90], w_fp[77], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[90], w_fp[77], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 254 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -5296,7 +5296,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 255 - FFV1_0( w_fp[88], w_fp[77], w_fp[24], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[88], w_fp[77], w_fp[24], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 255 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -5310,7 +5310,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 256 - VVV1_0( w_fp[27], w_fp[5], w_fp[89], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[27], w_fp[5], w_fp[89], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 256 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -5323,10 +5323,10 @@ namespace mg5amcCpu // *** DIAGRAM 257 OF 1240 *** // Wavefunction(s) for diagram number 257 - FFV1_2( w_fp[62], w_fp[27], COUPs[1], cIPD[0], cIPD[1], w_fp[91] ); + FFV1_2( w_fp[62], w_fp[27], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[91] ); // Amplitude(s) for diagram number 257 - FFV1_0( w_fp[91], w_fp[77], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[91], w_fp[77], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 257 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -5340,7 +5340,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 258 - FFV1_0( w_fp[86], w_fp[77], w_fp[27], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[86], w_fp[77], w_fp[27], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 258 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -5354,7 +5354,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 259 - VVV1_0( w_fp[4], w_fp[29], w_fp[89], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[4], w_fp[29], w_fp[89], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 259 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -5370,7 +5370,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 260 - FFV1_0( w_fp[34], w_fp[77], w_fp[29], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[34], w_fp[77], w_fp[29], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 260 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -5381,10 +5381,10 @@ namespace mg5amcCpu // *** DIAGRAM 261 OF 1240 *** // Wavefunction(s) for diagram number 261 - FFV1_2( w_fp[62], w_fp[29], COUPs[1], cIPD[0], cIPD[1], w_fp[89] ); + FFV1_2( w_fp[62], w_fp[29], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[89] ); // Amplitude(s) for diagram number 261 - FFV1_0( w_fp[89], w_fp[77], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[89], w_fp[77], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 261 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -5398,17 +5398,17 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 262 - FFV1_0( w_fp[62], w_fp[77], w_fp[30], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[62], w_fp[77], w_fp[30], COUPs[1], 1.0, &_fp[0] ); jamp_sv[33] += amp_sv[0]; jamp_sv[35] -= amp_sv[0]; jamp_sv[41] -= amp_sv[0]; jamp_sv[47] += amp_sv[0]; - FFV1_0( w_fp[62], w_fp[77], w_fp[31], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[62], w_fp[77], w_fp[31], COUPs[1], 1.0, &_fp[0] ); jamp_sv[35] -= amp_sv[0]; jamp_sv[39] += amp_sv[0]; jamp_sv[41] -= amp_sv[0]; jamp_sv[45] += amp_sv[0]; - FFV1_0( w_fp[62], w_fp[77], w_fp[32], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[62], w_fp[77], w_fp[32], COUPs[1], 1.0, &_fp[0] ); jamp_sv[33] -= amp_sv[0]; jamp_sv[39] += amp_sv[0]; jamp_sv[45] += amp_sv[0]; @@ -5417,10 +5417,10 @@ namespace mg5amcCpu // *** DIAGRAM 263 OF 1240 *** // Wavefunction(s) for diagram number 263 - FFV1P0_3( w_fp[62], w_fp[2], COUPs[1], 0., 0., w_fp[92] ); + FFV1P0_3( w_fp[62], w_fp[2], COUPs[1], 1.0, 0., 0., w_fp[92] ); // Amplitude(s) for diagram number 263 - VVV1_0( w_fp[92], w_fp[63], w_fp[6], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[92], w_fp[63], w_fp[6], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 263 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -5440,7 +5440,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 264 - VVV1_0( w_fp[92], w_fp[64], w_fp[5], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[92], w_fp[64], w_fp[5], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 264 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -5460,7 +5460,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 265 - VVVV1_0( w_fp[61], w_fp[5], w_fp[6], w_fp[92], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[61], w_fp[5], w_fp[6], w_fp[92], COUPs[2], 1.0, &_fp[0] ); jamp_sv[33] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[57] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[81] += cxtype( 0, 1 ) * amp_sv[0]; @@ -5469,7 +5469,7 @@ namespace mg5amcCpu jamp_sv[111] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[117] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[119] += cxtype( 0, 1 ) * amp_sv[0]; - VVVV3_0( w_fp[61], w_fp[5], w_fp[6], w_fp[92], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[61], w_fp[5], w_fp[6], w_fp[92], COUPs[2], 1.0, &_fp[0] ); jamp_sv[35] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[59] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[81] += cxtype( 0, 1 ) * amp_sv[0]; @@ -5478,7 +5478,7 @@ namespace mg5amcCpu jamp_sv[95] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[105] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[111] -= cxtype( 0, 1 ) * amp_sv[0]; - VVVV4_0( w_fp[61], w_fp[5], w_fp[6], w_fp[92], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[61], w_fp[5], w_fp[6], w_fp[92], COUPs[2], 1.0, &_fp[0] ); jamp_sv[33] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[35] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[57] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -5491,10 +5491,10 @@ namespace mg5amcCpu // *** DIAGRAM 266 OF 1240 *** // Wavefunction(s) for diagram number 266 - FFV1_1( w_fp[2], w_fp[61], COUPs[1], cIPD[0], cIPD[1], w_fp[93] ); + FFV1_1( w_fp[2], w_fp[61], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[93] ); // Amplitude(s) for diagram number 266 - FFV1_0( w_fp[86], w_fp[93], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[86], w_fp[93], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 266 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -5508,7 +5508,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 267 - FFV1_0( w_fp[86], w_fp[2], w_fp[64], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[86], w_fp[2], w_fp[64], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 267 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -5524,7 +5524,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 268 - FFV1_0( w_fp[88], w_fp[93], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[88], w_fp[93], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 268 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -5538,7 +5538,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 269 - FFV1_0( w_fp[88], w_fp[2], w_fp[63], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[88], w_fp[2], w_fp[63], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 269 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -5551,10 +5551,10 @@ namespace mg5amcCpu // *** DIAGRAM 270 OF 1240 *** // Wavefunction(s) for diagram number 270 - FFV1_2( w_fp[62], w_fp[61], COUPs[1], cIPD[0], cIPD[1], w_fp[94] ); + FFV1_2( w_fp[62], w_fp[61], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[94] ); // Amplitude(s) for diagram number 270 - FFV1_0( w_fp[94], w_fp[39], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[94], w_fp[39], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 270 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -5565,10 +5565,10 @@ namespace mg5amcCpu // *** DIAGRAM 271 OF 1240 *** // Wavefunction(s) for diagram number 271 - FFV1P0_3( w_fp[62], w_fp[39], COUPs[1], 0., 0., w_fp[95] ); + FFV1P0_3( w_fp[62], w_fp[39], COUPs[1], 1.0, 0., 0., w_fp[95] ); // Amplitude(s) for diagram number 271 - VVV1_0( w_fp[61], w_fp[6], w_fp[95], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[61], w_fp[6], w_fp[95], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 271 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -5584,7 +5584,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 272 - FFV1_0( w_fp[88], w_fp[39], w_fp[61], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[88], w_fp[39], w_fp[61], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 272 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -5598,7 +5598,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 273 - FFV1_0( w_fp[94], w_fp[47], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[94], w_fp[47], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 273 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -5609,10 +5609,10 @@ namespace mg5amcCpu // *** DIAGRAM 274 OF 1240 *** // Wavefunction(s) for diagram number 274 - FFV1P0_3( w_fp[62], w_fp[47], COUPs[1], 0., 0., w_fp[96] ); + FFV1P0_3( w_fp[62], w_fp[47], COUPs[1], 1.0, 0., 0., w_fp[96] ); // Amplitude(s) for diagram number 274 - VVV1_0( w_fp[61], w_fp[5], w_fp[96], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[61], w_fp[5], w_fp[96], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 274 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -5628,7 +5628,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 275 - FFV1_0( w_fp[86], w_fp[47], w_fp[61], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[86], w_fp[47], w_fp[61], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 275 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -5642,7 +5642,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 276 - FFV1_0( w_fp[94], w_fp[2], w_fp[29], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[94], w_fp[2], w_fp[29], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 276 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -5658,7 +5658,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 277 - VVV1_0( w_fp[61], w_fp[29], w_fp[92], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[61], w_fp[29], w_fp[92], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 277 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -5678,7 +5678,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 278 - FFV1_0( w_fp[89], w_fp[2], w_fp[61], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[89], w_fp[2], w_fp[61], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 278 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -5694,7 +5694,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 279 - VVV1_0( w_fp[92], w_fp[69], w_fp[6], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[92], w_fp[69], w_fp[6], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 279 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -5714,7 +5714,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 280 - VVV1_0( w_fp[92], w_fp[70], w_fp[4], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[92], w_fp[70], w_fp[4], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 280 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -5734,7 +5734,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 281 - VVVV1_0( w_fp[66], w_fp[4], w_fp[6], w_fp[92], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[66], w_fp[4], w_fp[6], w_fp[92], COUPs[2], 1.0, &_fp[0] ); jamp_sv[39] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[57] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[63] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -5743,7 +5743,7 @@ namespace mg5amcCpu jamp_sv[111] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[113] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[117] -= cxtype( 0, 1 ) * amp_sv[0]; - VVVV3_0( w_fp[66], w_fp[4], w_fp[6], w_fp[92], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[66], w_fp[4], w_fp[6], w_fp[92], COUPs[2], 1.0, &_fp[0] ); jamp_sv[41] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[57] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[63] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -5752,7 +5752,7 @@ namespace mg5amcCpu jamp_sv[83] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[107] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[117] -= cxtype( 0, 1 ) * amp_sv[0]; - VVVV4_0( w_fp[66], w_fp[4], w_fp[6], w_fp[92], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[66], w_fp[4], w_fp[6], w_fp[92], COUPs[2], 1.0, &_fp[0] ); jamp_sv[39] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[41] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[69] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -5765,10 +5765,10 @@ namespace mg5amcCpu // *** DIAGRAM 282 OF 1240 *** // Wavefunction(s) for diagram number 282 - FFV1_1( w_fp[2], w_fp[66], COUPs[1], cIPD[0], cIPD[1], w_fp[94] ); + FFV1_1( w_fp[2], w_fp[66], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[94] ); // Amplitude(s) for diagram number 282 - FFV1_0( w_fp[34], w_fp[94], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[34], w_fp[94], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 282 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -5782,7 +5782,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 283 - FFV1_0( w_fp[34], w_fp[2], w_fp[70], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[34], w_fp[2], w_fp[70], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 283 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -5798,7 +5798,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 284 - FFV1_0( w_fp[88], w_fp[94], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[88], w_fp[94], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 284 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -5812,7 +5812,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 285 - FFV1_0( w_fp[88], w_fp[2], w_fp[69], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[88], w_fp[2], w_fp[69], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 285 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -5825,10 +5825,10 @@ namespace mg5amcCpu // *** DIAGRAM 286 OF 1240 *** // Wavefunction(s) for diagram number 286 - FFV1_2( w_fp[62], w_fp[66], COUPs[1], cIPD[0], cIPD[1], w_fp[97] ); + FFV1_2( w_fp[62], w_fp[66], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[97] ); // Amplitude(s) for diagram number 286 - FFV1_0( w_fp[97], w_fp[33], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[97], w_fp[33], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 286 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -5839,10 +5839,10 @@ namespace mg5amcCpu // *** DIAGRAM 287 OF 1240 *** // Wavefunction(s) for diagram number 287 - FFV1P0_3( w_fp[62], w_fp[33], COUPs[1], 0., 0., w_fp[98] ); + FFV1P0_3( w_fp[62], w_fp[33], COUPs[1], 1.0, 0., 0., w_fp[98] ); // Amplitude(s) for diagram number 287 - VVV1_0( w_fp[66], w_fp[6], w_fp[98], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[66], w_fp[6], w_fp[98], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 287 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -5858,7 +5858,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 288 - FFV1_0( w_fp[88], w_fp[33], w_fp[66], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[88], w_fp[33], w_fp[66], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 288 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -5872,7 +5872,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 289 - FFV1_0( w_fp[97], w_fp[47], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[97], w_fp[47], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 289 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -5886,7 +5886,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 290 - VVV1_0( w_fp[66], w_fp[4], w_fp[96], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[66], w_fp[4], w_fp[96], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 290 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -5902,7 +5902,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 291 - FFV1_0( w_fp[34], w_fp[47], w_fp[66], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[34], w_fp[47], w_fp[66], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 291 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -5916,7 +5916,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 292 - FFV1_0( w_fp[97], w_fp[2], w_fp[27], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[97], w_fp[2], w_fp[27], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 292 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -5932,7 +5932,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 293 - VVV1_0( w_fp[66], w_fp[27], w_fp[92], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[66], w_fp[27], w_fp[92], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 293 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -5952,7 +5952,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 294 - FFV1_0( w_fp[91], w_fp[2], w_fp[66], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[91], w_fp[2], w_fp[66], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 294 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -5968,7 +5968,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 295 - VVV1_0( w_fp[92], w_fp[74], w_fp[5], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[92], w_fp[74], w_fp[5], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 295 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -5988,7 +5988,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 296 - VVV1_0( w_fp[92], w_fp[75], w_fp[4], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[92], w_fp[75], w_fp[4], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 296 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -6008,7 +6008,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 297 - VVVV1_0( w_fp[72], w_fp[4], w_fp[5], w_fp[92], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[72], w_fp[4], w_fp[5], w_fp[92], COUPs[2], 1.0, &_fp[0] ); jamp_sv[45] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[59] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[69] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -6017,7 +6017,7 @@ namespace mg5amcCpu jamp_sv[89] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[93] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[105] += cxtype( 0, 1 ) * amp_sv[0]; - VVVV3_0( w_fp[72], w_fp[4], w_fp[5], w_fp[92], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[72], w_fp[4], w_fp[5], w_fp[92], COUPs[2], 1.0, &_fp[0] ); jamp_sv[47] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[59] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[63] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -6026,7 +6026,7 @@ namespace mg5amcCpu jamp_sv[83] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[93] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[107] += cxtype( 0, 1 ) * amp_sv[0]; - VVVV4_0( w_fp[72], w_fp[4], w_fp[5], w_fp[92], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[72], w_fp[4], w_fp[5], w_fp[92], COUPs[2], 1.0, &_fp[0] ); jamp_sv[45] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[47] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[63] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -6039,10 +6039,10 @@ namespace mg5amcCpu // *** DIAGRAM 298 OF 1240 *** // Wavefunction(s) for diagram number 298 - FFV1_1( w_fp[2], w_fp[72], COUPs[1], cIPD[0], cIPD[1], w_fp[97] ); + FFV1_1( w_fp[2], w_fp[72], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[97] ); // Amplitude(s) for diagram number 298 - FFV1_0( w_fp[34], w_fp[97], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[34], w_fp[97], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 298 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -6056,7 +6056,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 299 - FFV1_0( w_fp[34], w_fp[2], w_fp[75], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[34], w_fp[2], w_fp[75], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 299 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -6072,7 +6072,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 300 - FFV1_0( w_fp[86], w_fp[97], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[86], w_fp[97], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 300 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -6086,7 +6086,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 301 - FFV1_0( w_fp[86], w_fp[2], w_fp[74], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[86], w_fp[2], w_fp[74], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 301 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -6099,10 +6099,10 @@ namespace mg5amcCpu // *** DIAGRAM 302 OF 1240 *** // Wavefunction(s) for diagram number 302 - FFV1_2( w_fp[62], w_fp[72], COUPs[1], cIPD[0], cIPD[1], w_fp[99] ); + FFV1_2( w_fp[62], w_fp[72], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[99] ); // Amplitude(s) for diagram number 302 - FFV1_0( w_fp[99], w_fp[33], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[33], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 302 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -6116,7 +6116,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 303 - VVV1_0( w_fp[72], w_fp[5], w_fp[98], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[72], w_fp[5], w_fp[98], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 303 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -6132,7 +6132,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 304 - FFV1_0( w_fp[86], w_fp[33], w_fp[72], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[86], w_fp[33], w_fp[72], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 304 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -6146,7 +6146,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 305 - FFV1_0( w_fp[99], w_fp[39], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[39], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 305 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -6160,7 +6160,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 306 - VVV1_0( w_fp[72], w_fp[4], w_fp[95], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[72], w_fp[4], w_fp[95], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 306 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -6176,7 +6176,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 307 - FFV1_0( w_fp[34], w_fp[39], w_fp[72], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[34], w_fp[39], w_fp[72], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 307 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -6190,7 +6190,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 308 - FFV1_0( w_fp[99], w_fp[2], w_fp[24], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[2], w_fp[24], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 308 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -6206,7 +6206,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 309 - VVV1_0( w_fp[72], w_fp[24], w_fp[92], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[72], w_fp[24], w_fp[92], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 309 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -6226,7 +6226,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 310 - FFV1_0( w_fp[90], w_fp[2], w_fp[72], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[90], w_fp[2], w_fp[72], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 310 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -6239,10 +6239,10 @@ namespace mg5amcCpu // *** DIAGRAM 311 OF 1240 *** // Wavefunction(s) for diagram number 311 - FFV1_2( w_fp[62], w_fp[1], COUPs[1], cIPD[0], cIPD[1], w_fp[99] ); + FFV1_2( w_fp[62], w_fp[1], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[99] ); // Amplitude(s) for diagram number 311 - FFV1_0( w_fp[99], w_fp[35], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[35], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 311 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -6255,7 +6255,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 312 - FFV1_0( w_fp[99], w_fp[36], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[36], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 312 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -6265,10 +6265,10 @@ namespace mg5amcCpu // *** DIAGRAM 313 OF 1240 *** // Wavefunction(s) for diagram number 313 - FFV1_1( w_fp[33], w_fp[1], COUPs[1], cIPD[0], cIPD[1], w_fp[100] ); + FFV1_1( w_fp[33], w_fp[1], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[100] ); // Amplitude(s) for diagram number 313 - FFV1_0( w_fp[86], w_fp[100], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[86], w_fp[100], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 313 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -6281,7 +6281,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 314 - FFV1_0( w_fp[86], w_fp[36], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[86], w_fp[36], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 314 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -6294,7 +6294,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 315 - FFV1_0( w_fp[88], w_fp[100], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[88], w_fp[100], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 315 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -6307,7 +6307,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 316 - FFV1_0( w_fp[88], w_fp[35], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[88], w_fp[35], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 316 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -6320,7 +6320,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 317 - FFV1_0( w_fp[99], w_fp[33], w_fp[29], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[33], w_fp[29], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 317 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -6334,7 +6334,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 318 - VVV1_0( w_fp[1], w_fp[29], w_fp[98], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[29], w_fp[98], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 318 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -6350,7 +6350,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 319 - FFV1_0( w_fp[89], w_fp[33], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[89], w_fp[33], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 319 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -6364,7 +6364,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 320 - FFV1_0( w_fp[99], w_fp[43], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[43], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 320 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -6377,7 +6377,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 321 - FFV1_0( w_fp[99], w_fp[44], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[44], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 321 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -6387,10 +6387,10 @@ namespace mg5amcCpu // *** DIAGRAM 322 OF 1240 *** // Wavefunction(s) for diagram number 322 - FFV1_1( w_fp[39], w_fp[1], COUPs[1], cIPD[0], cIPD[1], w_fp[89] ); + FFV1_1( w_fp[39], w_fp[1], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[89] ); // Amplitude(s) for diagram number 322 - FFV1_0( w_fp[34], w_fp[89], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[34], w_fp[89], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 322 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -6403,7 +6403,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 323 - FFV1_0( w_fp[34], w_fp[44], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[34], w_fp[44], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 323 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -6416,7 +6416,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 324 - FFV1_0( w_fp[88], w_fp[89], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[88], w_fp[89], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 324 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -6429,7 +6429,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 325 - FFV1_0( w_fp[88], w_fp[43], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[88], w_fp[43], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 325 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -6442,7 +6442,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 326 - FFV1_0( w_fp[99], w_fp[39], w_fp[27], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[39], w_fp[27], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 326 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -6456,7 +6456,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 327 - VVV1_0( w_fp[1], w_fp[27], w_fp[95], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[27], w_fp[95], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 327 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -6472,7 +6472,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 328 - FFV1_0( w_fp[91], w_fp[39], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[91], w_fp[39], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 328 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -6486,7 +6486,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 329 - FFV1_0( w_fp[99], w_fp[49], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[49], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 329 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -6499,7 +6499,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 330 - FFV1_0( w_fp[99], w_fp[50], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[50], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 330 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -6509,10 +6509,10 @@ namespace mg5amcCpu // *** DIAGRAM 331 OF 1240 *** // Wavefunction(s) for diagram number 331 - FFV1_1( w_fp[47], w_fp[1], COUPs[1], cIPD[0], cIPD[1], w_fp[91] ); + FFV1_1( w_fp[47], w_fp[1], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[91] ); // Amplitude(s) for diagram number 331 - FFV1_0( w_fp[34], w_fp[91], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[34], w_fp[91], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 331 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -6525,7 +6525,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 332 - FFV1_0( w_fp[34], w_fp[50], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[34], w_fp[50], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 332 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -6538,7 +6538,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 333 - FFV1_0( w_fp[86], w_fp[91], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[86], w_fp[91], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 333 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -6551,7 +6551,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 334 - FFV1_0( w_fp[86], w_fp[49], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[86], w_fp[49], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 334 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -6564,7 +6564,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 335 - FFV1_0( w_fp[99], w_fp[47], w_fp[24], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[47], w_fp[24], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 335 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -6578,7 +6578,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 336 - VVV1_0( w_fp[1], w_fp[24], w_fp[96], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[24], w_fp[96], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 336 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -6594,7 +6594,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 337 - FFV1_0( w_fp[90], w_fp[47], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[90], w_fp[47], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 337 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -6608,7 +6608,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 338 - FFV1_0( w_fp[99], w_fp[17], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[17], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 338 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -6622,7 +6622,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 339 - FFV1_0( w_fp[99], w_fp[2], w_fp[42], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[2], w_fp[42], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 339 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -6638,7 +6638,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 340 - VVV1_0( w_fp[92], w_fp[59], w_fp[6], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[92], w_fp[59], w_fp[6], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 340 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -6658,7 +6658,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 341 - VVV1_0( w_fp[92], w_fp[1], w_fp[42], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[92], w_fp[1], w_fp[42], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 341 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -6678,7 +6678,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 342 - VVVV1_0( w_fp[1], w_fp[24], w_fp[6], w_fp[92], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[1], w_fp[24], w_fp[6], w_fp[92], COUPs[2], 1.0, &_fp[0] ); jamp_sv[33] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[39] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[63] += cxtype( 0, 1 ) * amp_sv[0]; @@ -6687,7 +6687,7 @@ namespace mg5amcCpu jamp_sv[107] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[113] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[119] += cxtype( 0, 1 ) * amp_sv[0]; - VVVV3_0( w_fp[1], w_fp[24], w_fp[6], w_fp[92], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[1], w_fp[24], w_fp[6], w_fp[92], COUPs[2], 1.0, &_fp[0] ); jamp_sv[45] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[47] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[63] += cxtype( 0, 1 ) * amp_sv[0]; @@ -6696,7 +6696,7 @@ namespace mg5amcCpu jamp_sv[89] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[105] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[107] -= cxtype( 0, 1 ) * amp_sv[0]; - VVVV4_0( w_fp[1], w_fp[24], w_fp[6], w_fp[92], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[1], w_fp[24], w_fp[6], w_fp[92], COUPs[2], 1.0, &_fp[0] ); jamp_sv[33] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[39] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[45] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -6712,7 +6712,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 343 - FFV1_0( w_fp[88], w_fp[2], w_fp[59], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[88], w_fp[2], w_fp[59], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 343 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -6728,7 +6728,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 344 - FFV1_0( w_fp[88], w_fp[17], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[88], w_fp[17], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 344 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -6742,7 +6742,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 345 - FFV1_0( w_fp[99], w_fp[15], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[15], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 345 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -6756,7 +6756,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 346 - FFV1_0( w_fp[99], w_fp[2], w_fp[16], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[2], w_fp[16], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 346 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -6772,7 +6772,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 347 - VVV1_0( w_fp[92], w_fp[68], w_fp[5], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[92], w_fp[68], w_fp[5], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 347 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -6792,7 +6792,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 348 - VVV1_0( w_fp[92], w_fp[1], w_fp[16], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[92], w_fp[1], w_fp[16], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 348 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -6812,7 +6812,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 349 - VVVV1_0( w_fp[1], w_fp[27], w_fp[5], w_fp[92], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[1], w_fp[27], w_fp[5], w_fp[92], COUPs[2], 1.0, &_fp[0] ); jamp_sv[35] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[45] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[69] += cxtype( 0, 1 ) * amp_sv[0]; @@ -6821,7 +6821,7 @@ namespace mg5amcCpu jamp_sv[89] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[95] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[111] -= cxtype( 0, 1 ) * amp_sv[0]; - VVVV3_0( w_fp[1], w_fp[27], w_fp[5], w_fp[92], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[1], w_fp[27], w_fp[5], w_fp[92], COUPs[2], 1.0, &_fp[0] ); jamp_sv[39] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[41] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[69] += cxtype( 0, 1 ) * amp_sv[0]; @@ -6830,7 +6830,7 @@ namespace mg5amcCpu jamp_sv[83] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[111] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[113] += cxtype( 0, 1 ) * amp_sv[0]; - VVVV4_0( w_fp[1], w_fp[27], w_fp[5], w_fp[92], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[1], w_fp[27], w_fp[5], w_fp[92], COUPs[2], 1.0, &_fp[0] ); jamp_sv[35] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[39] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[41] += cxtype( 0, 1 ) * amp_sv[0]; @@ -6846,7 +6846,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 350 - FFV1_0( w_fp[86], w_fp[2], w_fp[68], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[86], w_fp[2], w_fp[68], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 350 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -6862,7 +6862,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 351 - FFV1_0( w_fp[86], w_fp[15], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[86], w_fp[15], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 351 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -6876,7 +6876,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 352 - FFV1_0( w_fp[99], w_fp[18], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[18], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 352 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -6890,7 +6890,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 353 - FFV1_0( w_fp[99], w_fp[2], w_fp[19], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[2], w_fp[19], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 353 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -6906,7 +6906,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 354 - VVV1_0( w_fp[92], w_fp[67], w_fp[4], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[92], w_fp[67], w_fp[4], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 354 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -6926,7 +6926,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 355 - VVV1_0( w_fp[92], w_fp[1], w_fp[19], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[92], w_fp[1], w_fp[19], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 355 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -6946,7 +6946,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 356 - VVVV1_0( w_fp[1], w_fp[4], w_fp[29], w_fp[92], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[1], w_fp[4], w_fp[29], w_fp[92], COUPs[2], 1.0, &_fp[0] ); jamp_sv[33] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[35] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[57] += cxtype( 0, 1 ) * amp_sv[0]; @@ -6955,7 +6955,7 @@ namespace mg5amcCpu jamp_sv[95] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[117] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[119] += cxtype( 0, 1 ) * amp_sv[0]; - VVVV3_0( w_fp[1], w_fp[4], w_fp[29], w_fp[92], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[1], w_fp[4], w_fp[29], w_fp[92], COUPs[2], 1.0, &_fp[0] ); jamp_sv[41] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[47] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[57] += cxtype( 0, 1 ) * amp_sv[0]; @@ -6964,7 +6964,7 @@ namespace mg5amcCpu jamp_sv[71] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[93] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[117] -= cxtype( 0, 1 ) * amp_sv[0]; - VVVV4_0( w_fp[1], w_fp[4], w_fp[29], w_fp[92], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[1], w_fp[4], w_fp[29], w_fp[92], COUPs[2], 1.0, &_fp[0] ); jamp_sv[33] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[35] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[41] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -6980,7 +6980,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 357 - FFV1_0( w_fp[34], w_fp[2], w_fp[67], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[34], w_fp[2], w_fp[67], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 357 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -6996,7 +6996,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 358 - FFV1_0( w_fp[34], w_fp[18], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[34], w_fp[18], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 358 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -7010,7 +7010,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 359 - VVV1_0( w_fp[73], w_fp[6], w_fp[92], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[73], w_fp[6], w_fp[92], COUPs[0], 1.0, &_fp[0] ); jamp_sv[33] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[39] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[63] += cxtype( 0, 1 ) * amp_sv[0]; @@ -7019,7 +7019,7 @@ namespace mg5amcCpu jamp_sv[107] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[113] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[119] += cxtype( 0, 1 ) * amp_sv[0]; - VVV1_0( w_fp[79], w_fp[6], w_fp[92], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[79], w_fp[6], w_fp[92], COUPs[0], 1.0, &_fp[0] ); jamp_sv[39] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[57] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[63] += cxtype( 0, 1 ) * amp_sv[0]; @@ -7028,7 +7028,7 @@ namespace mg5amcCpu jamp_sv[111] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[113] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[117] += cxtype( 0, 1 ) * amp_sv[0]; - VVV1_0( w_fp[80], w_fp[6], w_fp[92], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[80], w_fp[6], w_fp[92], COUPs[0], 1.0, &_fp[0] ); jamp_sv[33] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[57] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[81] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -7044,17 +7044,17 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 360 - FFV1_0( w_fp[88], w_fp[2], w_fp[73], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[88], w_fp[2], w_fp[73], COUPs[1], 1.0, &_fp[0] ); jamp_sv[33] += amp_sv[0]; jamp_sv[39] -= amp_sv[0]; jamp_sv[63] -= amp_sv[0]; jamp_sv[87] += amp_sv[0]; - FFV1_0( w_fp[88], w_fp[2], w_fp[79], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[88], w_fp[2], w_fp[79], COUPs[1], 1.0, &_fp[0] ); jamp_sv[39] -= amp_sv[0]; jamp_sv[57] += amp_sv[0]; jamp_sv[63] -= amp_sv[0]; jamp_sv[81] += amp_sv[0]; - FFV1_0( w_fp[88], w_fp[2], w_fp[80], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[88], w_fp[2], w_fp[80], COUPs[1], 1.0, &_fp[0] ); jamp_sv[33] -= amp_sv[0]; jamp_sv[57] += amp_sv[0]; jamp_sv[81] += amp_sv[0]; @@ -7066,17 +7066,17 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 361 - FFV1_0( w_fp[62], w_fp[47], w_fp[73], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[62], w_fp[47], w_fp[73], COUPs[1], 1.0, &_fp[0] ); jamp_sv[105] += amp_sv[0]; jamp_sv[107] -= amp_sv[0]; jamp_sv[113] -= amp_sv[0]; jamp_sv[119] += amp_sv[0]; - FFV1_0( w_fp[62], w_fp[47], w_fp[79], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[62], w_fp[47], w_fp[79], COUPs[1], 1.0, &_fp[0] ); jamp_sv[107] -= amp_sv[0]; jamp_sv[111] += amp_sv[0]; jamp_sv[113] -= amp_sv[0]; jamp_sv[117] += amp_sv[0]; - FFV1_0( w_fp[62], w_fp[47], w_fp[80], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[62], w_fp[47], w_fp[80], COUPs[1], 1.0, &_fp[0] ); jamp_sv[105] -= amp_sv[0]; jamp_sv[111] += amp_sv[0]; jamp_sv[117] += amp_sv[0]; @@ -7088,7 +7088,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 362 - VVV1_0( w_fp[57], w_fp[5], w_fp[92], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[57], w_fp[5], w_fp[92], COUPs[0], 1.0, &_fp[0] ); jamp_sv[35] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[45] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[69] += cxtype( 0, 1 ) * amp_sv[0]; @@ -7097,7 +7097,7 @@ namespace mg5amcCpu jamp_sv[89] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[95] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[111] -= cxtype( 0, 1 ) * amp_sv[0]; - VVV1_0( w_fp[81], w_fp[5], w_fp[92], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[81], w_fp[5], w_fp[92], COUPs[0], 1.0, &_fp[0] ); jamp_sv[45] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[59] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[69] += cxtype( 0, 1 ) * amp_sv[0]; @@ -7106,7 +7106,7 @@ namespace mg5amcCpu jamp_sv[89] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[93] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[105] -= cxtype( 0, 1 ) * amp_sv[0]; - VVV1_0( w_fp[82], w_fp[5], w_fp[92], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[82], w_fp[5], w_fp[92], COUPs[0], 1.0, &_fp[0] ); jamp_sv[35] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[59] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[81] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -7122,17 +7122,17 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 363 - FFV1_0( w_fp[86], w_fp[2], w_fp[57], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[86], w_fp[2], w_fp[57], COUPs[1], 1.0, &_fp[0] ); jamp_sv[35] += amp_sv[0]; jamp_sv[45] -= amp_sv[0]; jamp_sv[69] -= amp_sv[0]; jamp_sv[111] += amp_sv[0]; - FFV1_0( w_fp[86], w_fp[2], w_fp[81], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[86], w_fp[2], w_fp[81], COUPs[1], 1.0, &_fp[0] ); jamp_sv[45] -= amp_sv[0]; jamp_sv[59] += amp_sv[0]; jamp_sv[69] -= amp_sv[0]; jamp_sv[105] += amp_sv[0]; - FFV1_0( w_fp[86], w_fp[2], w_fp[82], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[86], w_fp[2], w_fp[82], COUPs[1], 1.0, &_fp[0] ); jamp_sv[35] -= amp_sv[0]; jamp_sv[59] += amp_sv[0]; jamp_sv[105] += amp_sv[0]; @@ -7144,17 +7144,17 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 364 - FFV1_0( w_fp[62], w_fp[39], w_fp[57], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[62], w_fp[39], w_fp[57], COUPs[1], 1.0, &_fp[0] ); jamp_sv[81] += amp_sv[0]; jamp_sv[83] -= amp_sv[0]; jamp_sv[89] -= amp_sv[0]; jamp_sv[95] += amp_sv[0]; - FFV1_0( w_fp[62], w_fp[39], w_fp[81], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[62], w_fp[39], w_fp[81], COUPs[1], 1.0, &_fp[0] ); jamp_sv[83] -= amp_sv[0]; jamp_sv[87] += amp_sv[0]; jamp_sv[89] -= amp_sv[0]; jamp_sv[93] += amp_sv[0]; - FFV1_0( w_fp[62], w_fp[39], w_fp[82], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[62], w_fp[39], w_fp[82], COUPs[1], 1.0, &_fp[0] ); jamp_sv[81] -= amp_sv[0]; jamp_sv[87] += amp_sv[0]; jamp_sv[93] += amp_sv[0]; @@ -7166,7 +7166,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 365 - VVV1_0( w_fp[55], w_fp[4], w_fp[92], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[55], w_fp[4], w_fp[92], COUPs[0], 1.0, &_fp[0] ); jamp_sv[41] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[47] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[57] += cxtype( 0, 1 ) * amp_sv[0]; @@ -7175,7 +7175,7 @@ namespace mg5amcCpu jamp_sv[71] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[93] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[117] -= cxtype( 0, 1 ) * amp_sv[0]; - VVV1_0( w_fp[83], w_fp[4], w_fp[92], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[83], w_fp[4], w_fp[92], COUPs[0], 1.0, &_fp[0] ); jamp_sv[47] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[59] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[63] += cxtype( 0, 1 ) * amp_sv[0]; @@ -7184,7 +7184,7 @@ namespace mg5amcCpu jamp_sv[83] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[93] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[107] -= cxtype( 0, 1 ) * amp_sv[0]; - VVV1_0( w_fp[84], w_fp[4], w_fp[92], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[84], w_fp[4], w_fp[92], COUPs[0], 1.0, &_fp[0] ); jamp_sv[41] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[57] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[63] += cxtype( 0, 1 ) * amp_sv[0]; @@ -7200,17 +7200,17 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 366 - FFV1_0( w_fp[34], w_fp[2], w_fp[55], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[34], w_fp[2], w_fp[55], COUPs[1], 1.0, &_fp[0] ); jamp_sv[41] += amp_sv[0]; jamp_sv[47] -= amp_sv[0]; jamp_sv[93] -= amp_sv[0]; jamp_sv[117] += amp_sv[0]; - FFV1_0( w_fp[34], w_fp[2], w_fp[83], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[34], w_fp[2], w_fp[83], COUPs[1], 1.0, &_fp[0] ); jamp_sv[47] -= amp_sv[0]; jamp_sv[83] += amp_sv[0]; jamp_sv[93] -= amp_sv[0]; jamp_sv[107] += amp_sv[0]; - FFV1_0( w_fp[34], w_fp[2], w_fp[84], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[34], w_fp[2], w_fp[84], COUPs[1], 1.0, &_fp[0] ); jamp_sv[41] -= amp_sv[0]; jamp_sv[83] += amp_sv[0]; jamp_sv[107] += amp_sv[0]; @@ -7222,17 +7222,17 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 367 - FFV1_0( w_fp[62], w_fp[33], w_fp[55], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[62], w_fp[33], w_fp[55], COUPs[1], 1.0, &_fp[0] ); jamp_sv[57] += amp_sv[0]; jamp_sv[59] -= amp_sv[0]; jamp_sv[65] -= amp_sv[0]; jamp_sv[71] += amp_sv[0]; - FFV1_0( w_fp[62], w_fp[33], w_fp[83], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[62], w_fp[33], w_fp[83], COUPs[1], 1.0, &_fp[0] ); jamp_sv[59] -= amp_sv[0]; jamp_sv[63] += amp_sv[0]; jamp_sv[65] -= amp_sv[0]; jamp_sv[69] += amp_sv[0]; - FFV1_0( w_fp[62], w_fp[33], w_fp[84], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[62], w_fp[33], w_fp[84], COUPs[1], 1.0, &_fp[0] ); jamp_sv[57] -= amp_sv[0]; jamp_sv[63] += amp_sv[0]; jamp_sv[69] += amp_sv[0]; @@ -7244,17 +7244,17 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 368 - FFV1_0( w_fp[99], w_fp[2], w_fp[30], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[2], w_fp[30], COUPs[1], 1.0, &_fp[0] ); jamp_sv[65] += amp_sv[0]; jamp_sv[71] -= amp_sv[0]; jamp_sv[95] -= amp_sv[0]; jamp_sv[119] += amp_sv[0]; - FFV1_0( w_fp[99], w_fp[2], w_fp[31], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[2], w_fp[31], COUPs[1], 1.0, &_fp[0] ); jamp_sv[71] -= amp_sv[0]; jamp_sv[89] += amp_sv[0]; jamp_sv[95] -= amp_sv[0]; jamp_sv[113] += amp_sv[0]; - FFV1_0( w_fp[99], w_fp[2], w_fp[32], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[2], w_fp[32], COUPs[1], 1.0, &_fp[0] ); jamp_sv[65] -= amp_sv[0]; jamp_sv[89] += amp_sv[0]; jamp_sv[113] += amp_sv[0]; @@ -7266,7 +7266,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 369 - VVV1_0( w_fp[1], w_fp[30], w_fp[92], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[30], w_fp[92], COUPs[0], 1.0, &_fp[0] ); jamp_sv[33] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[35] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[41] += cxtype( 0, 1 ) * amp_sv[0]; @@ -7275,7 +7275,7 @@ namespace mg5amcCpu jamp_sv[71] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[95] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[119] += cxtype( 0, 1 ) * amp_sv[0]; - VVV1_0( w_fp[1], w_fp[31], w_fp[92], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[31], w_fp[92], COUPs[0], 1.0, &_fp[0] ); jamp_sv[35] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[39] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[41] += cxtype( 0, 1 ) * amp_sv[0]; @@ -7284,7 +7284,7 @@ namespace mg5amcCpu jamp_sv[89] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[95] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[113] += cxtype( 0, 1 ) * amp_sv[0]; - VVV1_0( w_fp[1], w_fp[32], w_fp[92], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[32], w_fp[92], COUPs[0], 1.0, &_fp[0] ); jamp_sv[33] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[39] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[45] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -7297,11 +7297,11 @@ namespace mg5amcCpu // *** DIAGRAM 370 OF 1240 *** // Wavefunction(s) for diagram number 370 - VVV1P0_1( w_fp[0], w_fp[4], COUPs[0], 0., 0., w_fp[92] ); - FFV1_2( w_fp[3], w_fp[92], COUPs[1], cIPD[0], cIPD[1], w_fp[99] ); + VVV1P0_1( w_fp[0], w_fp[4], COUPs[0], 1.0, 0., 0., w_fp[92] ); + FFV1_2( w_fp[3], w_fp[92], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[99] ); // Amplitude(s) for diagram number 370 - FFV1_0( w_fp[99], w_fp[9], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[9], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 370 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -7315,7 +7315,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 371 - FFV1_0( w_fp[99], w_fp[85], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[85], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 371 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -7326,11 +7326,11 @@ namespace mg5amcCpu // *** DIAGRAM 372 OF 1240 *** // Wavefunction(s) for diagram number 372 - VVV1P0_1( w_fp[92], w_fp[5], COUPs[0], 0., 0., w_fp[62] ); - FFV1P0_3( w_fp[3], w_fp[77], COUPs[1], 0., 0., w_fp[34] ); + VVV1P0_1( w_fp[92], w_fp[5], COUPs[0], 1.0, 0., 0., w_fp[62] ); + FFV1P0_3( w_fp[3], w_fp[77], COUPs[1], 1.0, 0., 0., w_fp[34] ); // Amplitude(s) for diagram number 372 - VVV1_0( w_fp[62], w_fp[34], w_fp[6], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[62], w_fp[34], w_fp[6], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 372 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -7350,7 +7350,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 373 - FFV1_0( w_fp[3], w_fp[85], w_fp[62], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[85], w_fp[62], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 373 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -7363,10 +7363,10 @@ namespace mg5amcCpu // *** DIAGRAM 374 OF 1240 *** // Wavefunction(s) for diagram number 374 - VVV1P0_1( w_fp[92], w_fp[6], COUPs[0], 0., 0., w_fp[86] ); + VVV1P0_1( w_fp[92], w_fp[6], COUPs[0], 1.0, 0., 0., w_fp[86] ); // Amplitude(s) for diagram number 374 - VVV1_0( w_fp[86], w_fp[34], w_fp[5], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[86], w_fp[34], w_fp[5], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 374 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -7386,7 +7386,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 375 - FFV1_0( w_fp[3], w_fp[9], w_fp[86], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[9], w_fp[86], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 375 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -7399,12 +7399,12 @@ namespace mg5amcCpu // *** DIAGRAM 376 OF 1240 *** // Wavefunction(s) for diagram number 376 - VVVV1P0_1( w_fp[92], w_fp[5], w_fp[6], COUPs[2], 0., 0., w_fp[88] ); - VVVV3P0_1( w_fp[92], w_fp[5], w_fp[6], COUPs[2], 0., 0., w_fp[90] ); - VVVV4P0_1( w_fp[92], w_fp[5], w_fp[6], COUPs[2], 0., 0., w_fp[96] ); + VVVV1P0_1( w_fp[92], w_fp[5], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[88] ); + VVVV3P0_1( w_fp[92], w_fp[5], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[90] ); + VVVV4P0_1( w_fp[92], w_fp[5], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[96] ); // Amplitude(s) for diagram number 376 - FFV1_0( w_fp[3], w_fp[77], w_fp[88], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[77], w_fp[88], COUPs[1], 1.0, &_fp[0] ); jamp_sv[24] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[25] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[30] += cxtype( 0, 1 ) * amp_sv[0]; @@ -7413,7 +7413,7 @@ namespace mg5amcCpu jamp_sv[41] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[46] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[47] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[77], w_fp[90], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[77], w_fp[90], COUPs[1], 1.0, &_fp[0] ); jamp_sv[25] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[31] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[36] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -7422,7 +7422,7 @@ namespace mg5amcCpu jamp_sv[41] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[42] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[44] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[77], w_fp[96], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[77], w_fp[96], COUPs[1], 1.0, &_fp[0] ); jamp_sv[24] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[30] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[36] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -7435,10 +7435,10 @@ namespace mg5amcCpu // *** DIAGRAM 377 OF 1240 *** // Wavefunction(s) for diagram number 377 - FFV1_1( w_fp[77], w_fp[92], COUPs[1], cIPD[0], cIPD[1], w_fp[95] ); + FFV1_1( w_fp[77], w_fp[92], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[95] ); // Amplitude(s) for diagram number 377 - FFV1_0( w_fp[38], w_fp[95], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[95], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 377 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -7449,10 +7449,10 @@ namespace mg5amcCpu // *** DIAGRAM 378 OF 1240 *** // Wavefunction(s) for diagram number 378 - FFV1_2( w_fp[38], w_fp[92], COUPs[1], cIPD[0], cIPD[1], w_fp[98] ); + FFV1_2( w_fp[38], w_fp[92], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[98] ); // Amplitude(s) for diagram number 378 - FFV1_0( w_fp[98], w_fp[77], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[98], w_fp[77], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 378 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -7466,7 +7466,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 379 - FFV1_0( w_fp[38], w_fp[77], w_fp[86], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[77], w_fp[86], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 379 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -7482,7 +7482,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 380 - FFV1_0( w_fp[41], w_fp[95], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[95], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 380 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -7493,10 +7493,10 @@ namespace mg5amcCpu // *** DIAGRAM 381 OF 1240 *** // Wavefunction(s) for diagram number 381 - FFV1_2( w_fp[41], w_fp[92], COUPs[1], cIPD[0], cIPD[1], w_fp[101] ); + FFV1_2( w_fp[41], w_fp[92], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[101] ); // Amplitude(s) for diagram number 381 - FFV1_0( w_fp[101], w_fp[77], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[101], w_fp[77], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 381 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -7510,7 +7510,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 382 - FFV1_0( w_fp[41], w_fp[77], w_fp[62], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[77], w_fp[62], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 382 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -7526,7 +7526,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 383 - FFV1_0( w_fp[3], w_fp[95], w_fp[29], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[95], w_fp[29], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 383 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -7542,7 +7542,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 384 - FFV1_0( w_fp[99], w_fp[77], w_fp[29], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[77], w_fp[29], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 384 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -7555,10 +7555,10 @@ namespace mg5amcCpu // *** DIAGRAM 385 OF 1240 *** // Wavefunction(s) for diagram number 385 - VVV1P0_1( w_fp[92], w_fp[29], COUPs[0], 0., 0., w_fp[95] ); + VVV1P0_1( w_fp[92], w_fp[29], COUPs[0], 1.0, 0., 0., w_fp[95] ); // Amplitude(s) for diagram number 385 - FFV1_0( w_fp[3], w_fp[77], w_fp[95], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[77], w_fp[95], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 385 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -7575,10 +7575,10 @@ namespace mg5amcCpu // *** DIAGRAM 386 OF 1240 *** // Wavefunction(s) for diagram number 386 - FFV1_1( w_fp[2], w_fp[92], COUPs[1], cIPD[0], cIPD[1], w_fp[102] ); + FFV1_1( w_fp[2], w_fp[92], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[102] ); // Amplitude(s) for diagram number 386 - FFV1_0( w_fp[22], w_fp[102], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[22], w_fp[102], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 386 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -7592,7 +7592,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 387 - FFV1_0( w_fp[21], w_fp[102], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[21], w_fp[102], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 387 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -7603,10 +7603,10 @@ namespace mg5amcCpu // *** DIAGRAM 388 OF 1240 *** // Wavefunction(s) for diagram number 388 - FFV1P0_3( w_fp[52], w_fp[2], COUPs[1], 0., 0., w_fp[103] ); + FFV1P0_3( w_fp[52], w_fp[2], COUPs[1], 1.0, 0., 0., w_fp[103] ); // Amplitude(s) for diagram number 388 - VVV1_0( w_fp[62], w_fp[103], w_fp[6], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[62], w_fp[103], w_fp[6], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 388 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -7626,7 +7626,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 389 - FFV1_0( w_fp[21], w_fp[2], w_fp[62], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[21], w_fp[2], w_fp[62], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 389 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -7642,7 +7642,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 390 - VVV1_0( w_fp[86], w_fp[103], w_fp[5], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[86], w_fp[103], w_fp[5], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 390 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -7662,7 +7662,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 391 - FFV1_0( w_fp[22], w_fp[2], w_fp[86], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[22], w_fp[2], w_fp[86], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 391 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -7678,7 +7678,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 392 - FFV1_0( w_fp[52], w_fp[2], w_fp[88], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[2], w_fp[88], COUPs[1], 1.0, &_fp[0] ); jamp_sv[9] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[11] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[51] += cxtype( 0, 1 ) * amp_sv[0]; @@ -7687,7 +7687,7 @@ namespace mg5amcCpu jamp_sv[94] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[115] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[118] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[52], w_fp[2], w_fp[90], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[2], w_fp[90], COUPs[1], 1.0, &_fp[0] ); jamp_sv[11] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[53] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[75] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -7696,7 +7696,7 @@ namespace mg5amcCpu jamp_sv[94] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[99] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[109] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[52], w_fp[2], w_fp[96], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[2], w_fp[96], COUPs[1], 1.0, &_fp[0] ); jamp_sv[9] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[51] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[75] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -7709,10 +7709,10 @@ namespace mg5amcCpu // *** DIAGRAM 393 OF 1240 *** // Wavefunction(s) for diagram number 393 - FFV1_2( w_fp[52], w_fp[92], COUPs[1], cIPD[0], cIPD[1], w_fp[104] ); + FFV1_2( w_fp[52], w_fp[92], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[104] ); // Amplitude(s) for diagram number 393 - FFV1_0( w_fp[104], w_fp[39], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[104], w_fp[39], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 393 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -7723,10 +7723,10 @@ namespace mg5amcCpu // *** DIAGRAM 394 OF 1240 *** // Wavefunction(s) for diagram number 394 - FFV1_1( w_fp[39], w_fp[92], COUPs[1], cIPD[0], cIPD[1], w_fp[105] ); + FFV1_1( w_fp[39], w_fp[92], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[105] ); // Amplitude(s) for diagram number 394 - FFV1_0( w_fp[52], w_fp[105], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[105], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 394 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -7740,7 +7740,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 395 - FFV1_0( w_fp[52], w_fp[39], w_fp[86], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[39], w_fp[86], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 395 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -7756,7 +7756,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 396 - FFV1_0( w_fp[104], w_fp[47], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[104], w_fp[47], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 396 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -7767,10 +7767,10 @@ namespace mg5amcCpu // *** DIAGRAM 397 OF 1240 *** // Wavefunction(s) for diagram number 397 - FFV1_1( w_fp[47], w_fp[92], COUPs[1], cIPD[0], cIPD[1], w_fp[106] ); + FFV1_1( w_fp[47], w_fp[92], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[106] ); // Amplitude(s) for diagram number 397 - FFV1_0( w_fp[52], w_fp[106], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[106], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 397 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -7784,7 +7784,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 398 - FFV1_0( w_fp[52], w_fp[47], w_fp[62], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[47], w_fp[62], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 398 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -7800,7 +7800,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 399 - FFV1_0( w_fp[104], w_fp[2], w_fp[29], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[104], w_fp[2], w_fp[29], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 399 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -7816,7 +7816,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 400 - FFV1_0( w_fp[52], w_fp[102], w_fp[29], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[102], w_fp[29], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 400 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -7832,7 +7832,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 401 - FFV1_0( w_fp[52], w_fp[2], w_fp[95], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[2], w_fp[95], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 401 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -7852,7 +7852,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 402 - FFV1_0( w_fp[71], w_fp[102], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[71], w_fp[102], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 402 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -7868,7 +7868,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 403 - FFV1_0( w_fp[3], w_fp[102], w_fp[70], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[102], w_fp[70], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 403 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -7888,7 +7888,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 404 - FFV1_0( w_fp[99], w_fp[94], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[94], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 404 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -7904,7 +7904,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 405 - FFV1_0( w_fp[99], w_fp[2], w_fp[70], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[2], w_fp[70], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 405 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -7924,7 +7924,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 406 - FFV1_0( w_fp[3], w_fp[94], w_fp[86], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[94], w_fp[86], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 406 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -7944,7 +7944,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 407 - FFV1_0( w_fp[71], w_fp[2], w_fp[86], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[71], w_fp[2], w_fp[86], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 407 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -7964,7 +7964,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 408 - VVVV1_0( w_fp[92], w_fp[66], w_fp[8], w_fp[6], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[92], w_fp[66], w_fp[8], w_fp[6], COUPs[2], 1.0, &_fp[0] ); jamp_sv[6] += amp_sv[0]; jamp_sv[8] -= amp_sv[0]; jamp_sv[36] -= amp_sv[0]; @@ -7981,7 +7981,7 @@ namespace mg5amcCpu jamp_sv[109] -= amp_sv[0]; jamp_sv[116] -= amp_sv[0]; jamp_sv[117] += amp_sv[0]; - VVVV3_0( w_fp[92], w_fp[66], w_fp[8], w_fp[6], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[92], w_fp[66], w_fp[8], w_fp[6], COUPs[2], 1.0, &_fp[0] ); jamp_sv[6] += amp_sv[0]; jamp_sv[8] -= amp_sv[0]; jamp_sv[10] -= amp_sv[0]; @@ -7998,7 +7998,7 @@ namespace mg5amcCpu jamp_sv[107] -= amp_sv[0]; jamp_sv[116] -= amp_sv[0]; jamp_sv[117] += amp_sv[0]; - VVVV4_0( w_fp[92], w_fp[66], w_fp[8], w_fp[6], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[92], w_fp[66], w_fp[8], w_fp[6], COUPs[2], 1.0, &_fp[0] ); jamp_sv[10] -= amp_sv[0]; jamp_sv[11] += amp_sv[0]; jamp_sv[36] += amp_sv[0]; @@ -8019,10 +8019,10 @@ namespace mg5amcCpu // *** DIAGRAM 409 OF 1240 *** // Wavefunction(s) for diagram number 409 - VVV1P0_1( w_fp[92], w_fp[66], COUPs[0], 0., 0., w_fp[104] ); + VVV1P0_1( w_fp[92], w_fp[66], COUPs[0], 1.0, 0., 0., w_fp[104] ); // Amplitude(s) for diagram number 409 - VVV1_0( w_fp[8], w_fp[6], w_fp[104], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[6], w_fp[104], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 409 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -8047,10 +8047,10 @@ namespace mg5amcCpu // *** DIAGRAM 410 OF 1240 *** // Wavefunction(s) for diagram number 410 - VVV1P0_1( w_fp[92], w_fp[8], COUPs[0], 0., 0., w_fp[107] ); + VVV1P0_1( w_fp[92], w_fp[8], COUPs[0], 1.0, 0., 0., w_fp[107] ); // Amplitude(s) for diagram number 410 - VVV1_0( w_fp[66], w_fp[6], w_fp[107], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[66], w_fp[6], w_fp[107], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 410 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -8078,7 +8078,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 411 - VVV1_0( w_fp[66], w_fp[8], w_fp[86], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[66], w_fp[8], w_fp[86], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 411 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -8106,7 +8106,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 412 - FFV1_0( w_fp[3], w_fp[47], w_fp[104], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[47], w_fp[104], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 412 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -8126,7 +8126,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 413 - FFV1_0( w_fp[3], w_fp[106], w_fp[66], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[106], w_fp[66], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 413 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -8142,7 +8142,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 414 - FFV1_0( w_fp[99], w_fp[47], w_fp[66], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[47], w_fp[66], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 414 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -8158,7 +8158,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 415 - FFV1_0( w_fp[41], w_fp[2], w_fp[104], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[2], w_fp[104], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 415 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -8178,7 +8178,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 416 - FFV1_0( w_fp[41], w_fp[102], w_fp[66], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[102], w_fp[66], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 416 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -8194,7 +8194,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 417 - FFV1_0( w_fp[101], w_fp[2], w_fp[66], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[101], w_fp[2], w_fp[66], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 417 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -8210,7 +8210,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 418 - FFV1_0( w_fp[76], w_fp[102], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[76], w_fp[102], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 418 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -8226,7 +8226,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 419 - FFV1_0( w_fp[3], w_fp[102], w_fp[75], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[102], w_fp[75], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 419 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -8246,7 +8246,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 420 - FFV1_0( w_fp[99], w_fp[97], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[97], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 420 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -8262,7 +8262,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 421 - FFV1_0( w_fp[99], w_fp[2], w_fp[75], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[2], w_fp[75], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 421 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -8282,7 +8282,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 422 - FFV1_0( w_fp[3], w_fp[97], w_fp[62], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[97], w_fp[62], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 422 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -8302,7 +8302,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 423 - FFV1_0( w_fp[76], w_fp[2], w_fp[62], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[76], w_fp[2], w_fp[62], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 423 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -8322,7 +8322,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 424 - VVVV1_0( w_fp[92], w_fp[72], w_fp[8], w_fp[5], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[92], w_fp[72], w_fp[8], w_fp[5], COUPs[2], 1.0, &_fp[0] ); jamp_sv[7] += amp_sv[0]; jamp_sv[10] -= amp_sv[0]; jamp_sv[42] -= amp_sv[0]; @@ -8339,7 +8339,7 @@ namespace mg5amcCpu jamp_sv[93] += amp_sv[0]; jamp_sv[102] += amp_sv[0]; jamp_sv[104] -= amp_sv[0]; - VVVV3_0( w_fp[92], w_fp[72], w_fp[8], w_fp[5], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[92], w_fp[72], w_fp[8], w_fp[5], COUPs[2], 1.0, &_fp[0] ); jamp_sv[7] += amp_sv[0]; jamp_sv[8] -= amp_sv[0]; jamp_sv[9] += amp_sv[0]; @@ -8356,7 +8356,7 @@ namespace mg5amcCpu jamp_sv[93] += amp_sv[0]; jamp_sv[106] += amp_sv[0]; jamp_sv[107] -= amp_sv[0]; - VVVV4_0( w_fp[92], w_fp[72], w_fp[8], w_fp[5], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[92], w_fp[72], w_fp[8], w_fp[5], COUPs[2], 1.0, &_fp[0] ); jamp_sv[8] -= amp_sv[0]; jamp_sv[9] += amp_sv[0]; jamp_sv[42] += amp_sv[0]; @@ -8377,10 +8377,10 @@ namespace mg5amcCpu // *** DIAGRAM 425 OF 1240 *** // Wavefunction(s) for diagram number 425 - VVV1P0_1( w_fp[92], w_fp[72], COUPs[0], 0., 0., w_fp[104] ); + VVV1P0_1( w_fp[92], w_fp[72], COUPs[0], 1.0, 0., 0., w_fp[104] ); // Amplitude(s) for diagram number 425 - VVV1_0( w_fp[8], w_fp[5], w_fp[104], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[5], w_fp[104], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 425 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -8408,7 +8408,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 426 - VVV1_0( w_fp[72], w_fp[5], w_fp[107], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[72], w_fp[5], w_fp[107], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 426 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -8436,7 +8436,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 427 - VVV1_0( w_fp[72], w_fp[8], w_fp[62], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[72], w_fp[8], w_fp[62], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 427 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -8464,7 +8464,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 428 - FFV1_0( w_fp[3], w_fp[39], w_fp[104], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[39], w_fp[104], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 428 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -8484,7 +8484,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 429 - FFV1_0( w_fp[3], w_fp[105], w_fp[72], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[105], w_fp[72], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 429 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -8500,7 +8500,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 430 - FFV1_0( w_fp[99], w_fp[39], w_fp[72], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[39], w_fp[72], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 430 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -8516,7 +8516,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 431 - FFV1_0( w_fp[38], w_fp[2], w_fp[104], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[2], w_fp[104], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 431 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -8536,7 +8536,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 432 - FFV1_0( w_fp[38], w_fp[102], w_fp[72], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[102], w_fp[72], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 432 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -8552,7 +8552,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 433 - FFV1_0( w_fp[98], w_fp[2], w_fp[72], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[98], w_fp[2], w_fp[72], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 433 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -8565,10 +8565,10 @@ namespace mg5amcCpu // *** DIAGRAM 434 OF 1240 *** // Wavefunction(s) for diagram number 434 - VVV1P0_1( w_fp[92], w_fp[1], COUPs[0], 0., 0., w_fp[104] ); + VVV1P0_1( w_fp[92], w_fp[1], COUPs[0], 1.0, 0., 0., w_fp[104] ); // Amplitude(s) for diagram number 434 - VVV1_0( w_fp[104], w_fp[10], w_fp[6], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[104], w_fp[10], w_fp[6], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 434 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -8596,7 +8596,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 435 - VVV1_0( w_fp[104], w_fp[11], w_fp[5], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[104], w_fp[11], w_fp[5], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 435 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -8624,7 +8624,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 436 - VVVV1_0( w_fp[8], w_fp[5], w_fp[6], w_fp[104], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[8], w_fp[5], w_fp[6], w_fp[104], COUPs[2], 1.0, &_fp[0] ); jamp_sv[7] -= amp_sv[0]; jamp_sv[25] += amp_sv[0]; jamp_sv[31] -= amp_sv[0]; @@ -8641,7 +8641,7 @@ namespace mg5amcCpu jamp_sv[102] -= amp_sv[0]; jamp_sv[104] += amp_sv[0]; jamp_sv[108] -= amp_sv[0]; - VVVV3_0( w_fp[8], w_fp[5], w_fp[6], w_fp[104], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[8], w_fp[5], w_fp[6], w_fp[104], COUPs[2], 1.0, &_fp[0] ); jamp_sv[6] -= amp_sv[0]; jamp_sv[24] += amp_sv[0]; jamp_sv[30] -= amp_sv[0]; @@ -8658,7 +8658,7 @@ namespace mg5amcCpu jamp_sv[116] += amp_sv[0]; jamp_sv[117] -= amp_sv[0]; jamp_sv[118] += amp_sv[0]; - VVVV4_0( w_fp[8], w_fp[5], w_fp[6], w_fp[104], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[8], w_fp[5], w_fp[6], w_fp[104], COUPs[2], 1.0, &_fp[0] ); jamp_sv[6] -= amp_sv[0]; jamp_sv[7] += amp_sv[0]; jamp_sv[24] += amp_sv[0]; @@ -8679,10 +8679,10 @@ namespace mg5amcCpu // *** DIAGRAM 437 OF 1240 *** // Wavefunction(s) for diagram number 437 - VVV1P0_1( w_fp[1], w_fp[8], COUPs[0], 0., 0., w_fp[108] ); + VVV1P0_1( w_fp[1], w_fp[8], COUPs[0], 1.0, 0., 0., w_fp[108] ); // Amplitude(s) for diagram number 437 - VVV1_0( w_fp[62], w_fp[108], w_fp[6], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[62], w_fp[108], w_fp[6], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 437 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -8710,7 +8710,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 438 - VVV1_0( w_fp[62], w_fp[1], w_fp[11], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[62], w_fp[1], w_fp[11], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 438 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -8738,7 +8738,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 439 - VVVV1_0( w_fp[1], w_fp[8], w_fp[6], w_fp[62], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[1], w_fp[8], w_fp[6], w_fp[62], COUPs[2], 1.0, &_fp[0] ); jamp_sv[9] += amp_sv[0]; jamp_sv[24] -= amp_sv[0]; jamp_sv[30] += amp_sv[0]; @@ -8755,7 +8755,7 @@ namespace mg5amcCpu jamp_sv[109] += amp_sv[0]; jamp_sv[115] += amp_sv[0]; jamp_sv[118] -= amp_sv[0]; - VVVV3_0( w_fp[1], w_fp[8], w_fp[6], w_fp[62], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[1], w_fp[8], w_fp[6], w_fp[62], COUPs[2], 1.0, &_fp[0] ); jamp_sv[8] -= amp_sv[0]; jamp_sv[9] += amp_sv[0]; jamp_sv[42] += amp_sv[0]; @@ -8772,7 +8772,7 @@ namespace mg5amcCpu jamp_sv[104] += amp_sv[0]; jamp_sv[106] += amp_sv[0]; jamp_sv[107] -= amp_sv[0]; - VVVV4_0( w_fp[1], w_fp[8], w_fp[6], w_fp[62], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[1], w_fp[8], w_fp[6], w_fp[62], COUPs[2], 1.0, &_fp[0] ); jamp_sv[8] -= amp_sv[0]; jamp_sv[24] += amp_sv[0]; jamp_sv[30] -= amp_sv[0]; @@ -8796,7 +8796,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 440 - VVV1_0( w_fp[86], w_fp[108], w_fp[5], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[86], w_fp[108], w_fp[5], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 440 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -8824,7 +8824,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 441 - VVV1_0( w_fp[86], w_fp[1], w_fp[10], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[86], w_fp[1], w_fp[10], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 441 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -8852,7 +8852,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 442 - VVVV1_0( w_fp[1], w_fp[8], w_fp[5], w_fp[86], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[1], w_fp[8], w_fp[5], w_fp[86], COUPs[2], 1.0, &_fp[0] ); jamp_sv[11] += amp_sv[0]; jamp_sv[25] -= amp_sv[0]; jamp_sv[31] += amp_sv[0]; @@ -8869,7 +8869,7 @@ namespace mg5amcCpu jamp_sv[94] -= amp_sv[0]; jamp_sv[99] -= amp_sv[0]; jamp_sv[109] += amp_sv[0]; - VVVV3_0( w_fp[1], w_fp[8], w_fp[5], w_fp[86], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[1], w_fp[8], w_fp[5], w_fp[86], COUPs[2], 1.0, &_fp[0] ); jamp_sv[10] -= amp_sv[0]; jamp_sv[11] += amp_sv[0]; jamp_sv[36] += amp_sv[0]; @@ -8886,7 +8886,7 @@ namespace mg5amcCpu jamp_sv[99] -= amp_sv[0]; jamp_sv[108] -= amp_sv[0]; jamp_sv[109] += amp_sv[0]; - VVVV4_0( w_fp[1], w_fp[8], w_fp[5], w_fp[86], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[1], w_fp[8], w_fp[5], w_fp[86], COUPs[2], 1.0, &_fp[0] ); jamp_sv[10] -= amp_sv[0]; jamp_sv[25] += amp_sv[0]; jamp_sv[31] -= amp_sv[0]; @@ -8907,12 +8907,12 @@ namespace mg5amcCpu // *** DIAGRAM 443 OF 1240 *** // Wavefunction(s) for diagram number 443 - VVVV1P0_1( w_fp[92], w_fp[1], w_fp[5], COUPs[2], 0., 0., w_fp[109] ); - VVVV3P0_1( w_fp[92], w_fp[1], w_fp[5], COUPs[2], 0., 0., w_fp[110] ); - VVVV4P0_1( w_fp[92], w_fp[1], w_fp[5], COUPs[2], 0., 0., w_fp[111] ); + VVVV1P0_1( w_fp[92], w_fp[1], w_fp[5], COUPs[2], 1.0, 0., 0., w_fp[109] ); + VVVV3P0_1( w_fp[92], w_fp[1], w_fp[5], COUPs[2], 1.0, 0., 0., w_fp[110] ); + VVVV4P0_1( w_fp[92], w_fp[1], w_fp[5], COUPs[2], 1.0, 0., 0., w_fp[111] ); // Amplitude(s) for diagram number 443 - VVV1_0( w_fp[8], w_fp[6], w_fp[109], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[6], w_fp[109], COUPs[0], 1.0, &_fp[0] ); jamp_sv[6] += amp_sv[0]; jamp_sv[8] -= amp_sv[0]; jamp_sv[36] -= amp_sv[0]; @@ -8929,7 +8929,7 @@ namespace mg5amcCpu jamp_sv[109] -= amp_sv[0]; jamp_sv[116] -= amp_sv[0]; jamp_sv[117] += amp_sv[0]; - VVV1_0( w_fp[8], w_fp[6], w_fp[110], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[6], w_fp[110], COUPs[0], 1.0, &_fp[0] ); jamp_sv[8] -= amp_sv[0]; jamp_sv[24] += amp_sv[0]; jamp_sv[30] -= amp_sv[0]; @@ -8946,7 +8946,7 @@ namespace mg5amcCpu jamp_sv[109] -= amp_sv[0]; jamp_sv[115] -= amp_sv[0]; jamp_sv[118] += amp_sv[0]; - VVV1_0( w_fp[8], w_fp[6], w_fp[111], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[6], w_fp[111], COUPs[0], 1.0, &_fp[0] ); jamp_sv[6] -= amp_sv[0]; jamp_sv[24] += amp_sv[0]; jamp_sv[30] -= amp_sv[0]; @@ -8967,12 +8967,12 @@ namespace mg5amcCpu // *** DIAGRAM 444 OF 1240 *** // Wavefunction(s) for diagram number 444 - VVVV1P0_1( w_fp[92], w_fp[1], w_fp[6], COUPs[2], 0., 0., w_fp[112] ); - VVVV3P0_1( w_fp[92], w_fp[1], w_fp[6], COUPs[2], 0., 0., w_fp[113] ); - VVVV4P0_1( w_fp[92], w_fp[1], w_fp[6], COUPs[2], 0., 0., w_fp[114] ); + VVVV1P0_1( w_fp[92], w_fp[1], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[112] ); + VVVV3P0_1( w_fp[92], w_fp[1], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[113] ); + VVVV4P0_1( w_fp[92], w_fp[1], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[114] ); // Amplitude(s) for diagram number 444 - VVV1_0( w_fp[8], w_fp[5], w_fp[112], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[5], w_fp[112], COUPs[0], 1.0, &_fp[0] ); jamp_sv[7] += amp_sv[0]; jamp_sv[10] -= amp_sv[0]; jamp_sv[42] -= amp_sv[0]; @@ -8989,7 +8989,7 @@ namespace mg5amcCpu jamp_sv[93] += amp_sv[0]; jamp_sv[102] += amp_sv[0]; jamp_sv[104] -= amp_sv[0]; - VVV1_0( w_fp[8], w_fp[5], w_fp[113], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[5], w_fp[113], COUPs[0], 1.0, &_fp[0] ); jamp_sv[10] -= amp_sv[0]; jamp_sv[25] += amp_sv[0]; jamp_sv[31] -= amp_sv[0]; @@ -9006,7 +9006,7 @@ namespace mg5amcCpu jamp_sv[94] += amp_sv[0]; jamp_sv[98] += amp_sv[0]; jamp_sv[108] -= amp_sv[0]; - VVV1_0( w_fp[8], w_fp[5], w_fp[114], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[5], w_fp[114], COUPs[0], 1.0, &_fp[0] ); jamp_sv[7] -= amp_sv[0]; jamp_sv[25] += amp_sv[0]; jamp_sv[31] -= amp_sv[0]; @@ -9030,7 +9030,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 445 - VVV1_0( w_fp[1], w_fp[8], w_fp[88], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[8], w_fp[88], COUPs[0], 1.0, &_fp[0] ); jamp_sv[9] -= amp_sv[0]; jamp_sv[11] += amp_sv[0]; jamp_sv[24] += amp_sv[0]; @@ -9047,7 +9047,7 @@ namespace mg5amcCpu jamp_sv[94] -= amp_sv[0]; jamp_sv[115] -= amp_sv[0]; jamp_sv[118] += amp_sv[0]; - VVV1_0( w_fp[1], w_fp[8], w_fp[90], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[8], w_fp[90], COUPs[0], 1.0, &_fp[0] ); jamp_sv[11] += amp_sv[0]; jamp_sv[25] -= amp_sv[0]; jamp_sv[31] += amp_sv[0]; @@ -9064,7 +9064,7 @@ namespace mg5amcCpu jamp_sv[94] -= amp_sv[0]; jamp_sv[99] -= amp_sv[0]; jamp_sv[109] += amp_sv[0]; - VVV1_0( w_fp[1], w_fp[8], w_fp[96], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[8], w_fp[96], COUPs[0], 1.0, &_fp[0] ); jamp_sv[9] += amp_sv[0]; jamp_sv[24] -= amp_sv[0]; jamp_sv[30] += amp_sv[0]; @@ -9088,7 +9088,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 446 - VVVV1_0( w_fp[92], w_fp[1], w_fp[8], w_fp[29], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[92], w_fp[1], w_fp[8], w_fp[29], COUPs[2], 1.0, &_fp[0] ); jamp_sv[6] += amp_sv[0]; jamp_sv[7] -= amp_sv[0]; jamp_sv[24] -= amp_sv[0]; @@ -9105,7 +9105,7 @@ namespace mg5amcCpu jamp_sv[116] -= amp_sv[0]; jamp_sv[117] += amp_sv[0]; jamp_sv[118] -= amp_sv[0]; - VVVV3_0( w_fp[92], w_fp[1], w_fp[8], w_fp[29], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[92], w_fp[1], w_fp[8], w_fp[29], COUPs[2], 1.0, &_fp[0] ); jamp_sv[6] += amp_sv[0]; jamp_sv[7] -= amp_sv[0]; jamp_sv[9] -= amp_sv[0]; @@ -9122,7 +9122,7 @@ namespace mg5amcCpu jamp_sv[93] -= amp_sv[0]; jamp_sv[116] -= amp_sv[0]; jamp_sv[117] += amp_sv[0]; - VVVV4_0( w_fp[92], w_fp[1], w_fp[8], w_fp[29], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[92], w_fp[1], w_fp[8], w_fp[29], COUPs[2], 1.0, &_fp[0] ); jamp_sv[9] -= amp_sv[0]; jamp_sv[11] += amp_sv[0]; jamp_sv[24] += amp_sv[0]; @@ -9146,7 +9146,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 447 - VVV1_0( w_fp[8], w_fp[29], w_fp[104], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[29], w_fp[104], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 447 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -9174,7 +9174,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 448 - VVV1_0( w_fp[1], w_fp[29], w_fp[107], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[29], w_fp[107], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 448 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -9202,7 +9202,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 449 - VVV1_0( w_fp[1], w_fp[8], w_fp[95], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[8], w_fp[95], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 449 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -9230,7 +9230,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 450 - VVV1_0( w_fp[104], w_fp[45], w_fp[6], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[104], w_fp[45], w_fp[6], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 450 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -9250,7 +9250,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 451 - FFV1_0( w_fp[3], w_fp[44], w_fp[104], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[44], w_fp[104], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 451 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -9266,7 +9266,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 452 - FFV1_0( w_fp[99], w_fp[89], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[89], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 452 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -9280,7 +9280,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 453 - FFV1_0( w_fp[99], w_fp[44], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[44], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 453 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -9294,7 +9294,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 454 - FFV1_0( w_fp[3], w_fp[89], w_fp[86], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[89], w_fp[86], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 454 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -9310,7 +9310,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 455 - VVV1_0( w_fp[86], w_fp[1], w_fp[45], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[86], w_fp[1], w_fp[45], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 455 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -9330,7 +9330,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 456 - FFV1_0( w_fp[3], w_fp[39], w_fp[112], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[39], w_fp[112], COUPs[1], 1.0, &_fp[0] ); jamp_sv[74] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[75] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[82] += cxtype( 0, 1 ) * amp_sv[0]; @@ -9339,7 +9339,7 @@ namespace mg5amcCpu jamp_sv[85] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[92] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[93] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[39], w_fp[113], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[39], w_fp[113], COUPs[1], 1.0, &_fp[0] ); jamp_sv[75] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[78] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[80] += cxtype( 0, 1 ) * amp_sv[0]; @@ -9348,7 +9348,7 @@ namespace mg5amcCpu jamp_sv[85] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[91] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[94] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[39], w_fp[114], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[39], w_fp[114], COUPs[1], 1.0, &_fp[0] ); jamp_sv[74] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[78] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[80] += cxtype( 0, 1 ) * amp_sv[0]; @@ -9364,7 +9364,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 457 - FFV1_0( w_fp[41], w_fp[39], w_fp[104], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[39], w_fp[104], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 457 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -9380,7 +9380,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 458 - FFV1_0( w_fp[41], w_fp[105], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[105], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 458 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -9394,7 +9394,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 459 - FFV1_0( w_fp[101], w_fp[39], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[101], w_fp[39], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 459 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -9408,7 +9408,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 460 - VVV1_0( w_fp[104], w_fp[51], w_fp[5], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[104], w_fp[51], w_fp[5], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 460 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -9428,7 +9428,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 461 - FFV1_0( w_fp[3], w_fp[50], w_fp[104], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[50], w_fp[104], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 461 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -9444,7 +9444,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 462 - FFV1_0( w_fp[99], w_fp[91], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[91], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 462 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -9458,7 +9458,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 463 - FFV1_0( w_fp[99], w_fp[50], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[50], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 463 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -9472,7 +9472,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 464 - FFV1_0( w_fp[3], w_fp[91], w_fp[62], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[91], w_fp[62], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 464 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -9488,7 +9488,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 465 - VVV1_0( w_fp[62], w_fp[1], w_fp[51], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[62], w_fp[1], w_fp[51], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 465 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -9508,7 +9508,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 466 - FFV1_0( w_fp[3], w_fp[47], w_fp[109], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[47], w_fp[109], COUPs[1], 1.0, &_fp[0] ); jamp_sv[98] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[99] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[106] += cxtype( 0, 1 ) * amp_sv[0]; @@ -9517,7 +9517,7 @@ namespace mg5amcCpu jamp_sv[109] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[116] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[117] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[47], w_fp[110], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[47], w_fp[110], COUPs[1], 1.0, &_fp[0] ); jamp_sv[99] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[102] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[104] += cxtype( 0, 1 ) * amp_sv[0]; @@ -9526,7 +9526,7 @@ namespace mg5amcCpu jamp_sv[109] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[115] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[118] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[47], w_fp[111], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[47], w_fp[111], COUPs[1], 1.0, &_fp[0] ); jamp_sv[98] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[102] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[104] += cxtype( 0, 1 ) * amp_sv[0]; @@ -9542,7 +9542,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 467 - FFV1_0( w_fp[38], w_fp[47], w_fp[104], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[47], w_fp[104], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 467 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -9558,7 +9558,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 468 - FFV1_0( w_fp[38], w_fp[106], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[106], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 468 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -9572,7 +9572,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 469 - FFV1_0( w_fp[98], w_fp[47], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[98], w_fp[47], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 469 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -9586,7 +9586,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 470 - VVV1_0( w_fp[104], w_fp[23], w_fp[6], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[104], w_fp[23], w_fp[6], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 470 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -9606,7 +9606,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 471 - FFV1_0( w_fp[48], w_fp[2], w_fp[104], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[48], w_fp[2], w_fp[104], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 471 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -9622,7 +9622,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 472 - FFV1_0( w_fp[58], w_fp[102], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[58], w_fp[102], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 472 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -9636,7 +9636,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 473 - FFV1_0( w_fp[48], w_fp[102], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[48], w_fp[102], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 473 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -9650,7 +9650,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 474 - FFV1_0( w_fp[58], w_fp[2], w_fp[86], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[58], w_fp[2], w_fp[86], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 474 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -9666,7 +9666,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 475 - VVV1_0( w_fp[86], w_fp[1], w_fp[23], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[86], w_fp[1], w_fp[23], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 475 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -9686,7 +9686,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 476 - FFV1_0( w_fp[38], w_fp[2], w_fp[112], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[2], w_fp[112], COUPs[1], 1.0, &_fp[0] ); jamp_sv[7] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[10] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[42] += cxtype( 0, 1 ) * amp_sv[0]; @@ -9695,7 +9695,7 @@ namespace mg5amcCpu jamp_sv[52] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[102] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[104] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[38], w_fp[2], w_fp[113], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[2], w_fp[113], COUPs[1], 1.0, &_fp[0] ); jamp_sv[10] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[25] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[31] += cxtype( 0, 1 ) * amp_sv[0]; @@ -9704,7 +9704,7 @@ namespace mg5amcCpu jamp_sv[52] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[98] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[108] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[38], w_fp[2], w_fp[114], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[2], w_fp[114], COUPs[1], 1.0, &_fp[0] ); jamp_sv[7] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[25] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[31] += cxtype( 0, 1 ) * amp_sv[0]; @@ -9720,7 +9720,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 477 - VVV1_0( w_fp[104], w_fp[20], w_fp[5], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[104], w_fp[20], w_fp[5], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 477 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -9740,7 +9740,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 478 - FFV1_0( w_fp[40], w_fp[2], w_fp[104], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[40], w_fp[2], w_fp[104], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 478 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -9756,7 +9756,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 479 - FFV1_0( w_fp[60], w_fp[102], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[60], w_fp[102], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 479 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -9770,7 +9770,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 480 - FFV1_0( w_fp[40], w_fp[102], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[40], w_fp[102], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 480 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -9784,7 +9784,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 481 - FFV1_0( w_fp[60], w_fp[2], w_fp[62], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[60], w_fp[2], w_fp[62], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 481 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -9800,7 +9800,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 482 - VVV1_0( w_fp[62], w_fp[1], w_fp[20], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[62], w_fp[1], w_fp[20], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 482 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -9820,7 +9820,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 483 - FFV1_0( w_fp[41], w_fp[2], w_fp[109], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[2], w_fp[109], COUPs[1], 1.0, &_fp[0] ); jamp_sv[6] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[8] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[36] += cxtype( 0, 1 ) * amp_sv[0]; @@ -9829,7 +9829,7 @@ namespace mg5amcCpu jamp_sv[50] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[78] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[80] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[41], w_fp[2], w_fp[110], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[2], w_fp[110], COUPs[1], 1.0, &_fp[0] ); jamp_sv[8] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[24] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[30] += cxtype( 0, 1 ) * amp_sv[0]; @@ -9838,7 +9838,7 @@ namespace mg5amcCpu jamp_sv[50] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[74] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[84] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[41], w_fp[2], w_fp[111], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[2], w_fp[111], COUPs[1], 1.0, &_fp[0] ); jamp_sv[6] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[24] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[30] += cxtype( 0, 1 ) * amp_sv[0]; @@ -9854,7 +9854,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 484 - FFV1_0( w_fp[3], w_fp[18], w_fp[104], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[18], w_fp[104], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 484 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -9874,7 +9874,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 485 - FFV1_0( w_fp[12], w_fp[2], w_fp[104], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[12], w_fp[2], w_fp[104], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 485 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -9894,7 +9894,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 486 - FFV1_0( w_fp[3], w_fp[102], w_fp[67], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[102], w_fp[67], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 486 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -9914,7 +9914,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 487 - FFV1_0( w_fp[12], w_fp[102], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[12], w_fp[102], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 487 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -9930,7 +9930,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 488 - FFV1_0( w_fp[99], w_fp[2], w_fp[67], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[2], w_fp[67], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 488 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -9950,7 +9950,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 489 - FFV1_0( w_fp[99], w_fp[18], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[18], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 489 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -9966,7 +9966,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 490 - FFV1_0( w_fp[3], w_fp[102], w_fp[55], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[102], w_fp[55], COUPs[1], 1.0, &_fp[0] ); jamp_sv[6] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[7] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[9] += cxtype( 0, 1 ) * amp_sv[0]; @@ -9975,7 +9975,7 @@ namespace mg5amcCpu jamp_sv[49] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[51] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[53] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[102], w_fp[83], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[102], w_fp[83], COUPs[1], 1.0, &_fp[0] ); jamp_sv[7] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[8] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[9] += cxtype( 0, 1 ) * amp_sv[0]; @@ -9984,7 +9984,7 @@ namespace mg5amcCpu jamp_sv[50] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[51] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[52] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[102], w_fp[84], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[102], w_fp[84], COUPs[1], 1.0, &_fp[0] ); jamp_sv[6] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[8] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[10] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -10000,7 +10000,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 491 - FFV1_0( w_fp[99], w_fp[2], w_fp[55], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[2], w_fp[55], COUPs[1], 1.0, &_fp[0] ); jamp_sv[40] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[41] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[46] += cxtype( 0, 1 ) * amp_sv[0]; @@ -10009,7 +10009,7 @@ namespace mg5amcCpu jamp_sv[93] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[116] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[117] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[99], w_fp[2], w_fp[83], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[2], w_fp[83], COUPs[1], 1.0, &_fp[0] ); jamp_sv[46] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[47] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[82] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -10018,7 +10018,7 @@ namespace mg5amcCpu jamp_sv[93] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[106] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[107] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[99], w_fp[2], w_fp[84], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[2], w_fp[84], COUPs[1], 1.0, &_fp[0] ); jamp_sv[40] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[41] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[82] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -10034,7 +10034,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 492 - VVV1_0( w_fp[92], w_fp[55], w_fp[8], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[92], w_fp[55], w_fp[8], COUPs[0], 1.0, &_fp[0] ); jamp_sv[6] -= amp_sv[0]; jamp_sv[7] += amp_sv[0]; jamp_sv[9] += amp_sv[0]; @@ -10051,7 +10051,7 @@ namespace mg5amcCpu jamp_sv[93] += amp_sv[0]; jamp_sv[116] += amp_sv[0]; jamp_sv[117] -= amp_sv[0]; - VVV1_0( w_fp[92], w_fp[83], w_fp[8], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[92], w_fp[83], w_fp[8], COUPs[0], 1.0, &_fp[0] ); jamp_sv[7] += amp_sv[0]; jamp_sv[8] -= amp_sv[0]; jamp_sv[9] += amp_sv[0]; @@ -10068,7 +10068,7 @@ namespace mg5amcCpu jamp_sv[93] += amp_sv[0]; jamp_sv[106] += amp_sv[0]; jamp_sv[107] -= amp_sv[0]; - VVV1_0( w_fp[92], w_fp[84], w_fp[8], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[92], w_fp[84], w_fp[8], COUPs[0], 1.0, &_fp[0] ); jamp_sv[6] += amp_sv[0]; jamp_sv[8] -= amp_sv[0]; jamp_sv[10] -= amp_sv[0]; @@ -10089,11 +10089,11 @@ namespace mg5amcCpu // *** DIAGRAM 493 OF 1240 *** // Wavefunction(s) for diagram number 493 - VVV1P0_1( w_fp[0], w_fp[5], COUPs[0], 0., 0., w_fp[92] ); - FFV1_2( w_fp[3], w_fp[92], COUPs[1], cIPD[0], cIPD[1], w_fp[99] ); + VVV1P0_1( w_fp[0], w_fp[5], COUPs[0], 1.0, 0., 0., w_fp[92] ); + FFV1_2( w_fp[3], w_fp[92], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[99] ); // Amplitude(s) for diagram number 493 - FFV1_0( w_fp[99], w_fp[87], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[87], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 493 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -10107,7 +10107,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 494 - FFV1_0( w_fp[99], w_fp[85], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[85], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 494 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -10118,10 +10118,10 @@ namespace mg5amcCpu // *** DIAGRAM 495 OF 1240 *** // Wavefunction(s) for diagram number 495 - VVV1P0_1( w_fp[92], w_fp[4], COUPs[0], 0., 0., w_fp[102] ); + VVV1P0_1( w_fp[92], w_fp[4], COUPs[0], 1.0, 0., 0., w_fp[102] ); // Amplitude(s) for diagram number 495 - VVV1_0( w_fp[102], w_fp[34], w_fp[6], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[102], w_fp[34], w_fp[6], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 495 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -10141,7 +10141,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 496 - FFV1_0( w_fp[3], w_fp[85], w_fp[102], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[85], w_fp[102], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 496 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -10154,10 +10154,10 @@ namespace mg5amcCpu // *** DIAGRAM 497 OF 1240 *** // Wavefunction(s) for diagram number 497 - VVV1P0_1( w_fp[92], w_fp[6], COUPs[0], 0., 0., w_fp[104] ); + VVV1P0_1( w_fp[92], w_fp[6], COUPs[0], 1.0, 0., 0., w_fp[104] ); // Amplitude(s) for diagram number 497 - VVV1_0( w_fp[104], w_fp[34], w_fp[4], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[104], w_fp[34], w_fp[4], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 497 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -10177,7 +10177,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 498 - FFV1_0( w_fp[3], w_fp[87], w_fp[104], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[87], w_fp[104], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 498 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -10190,12 +10190,12 @@ namespace mg5amcCpu // *** DIAGRAM 499 OF 1240 *** // Wavefunction(s) for diagram number 499 - VVVV1P0_1( w_fp[92], w_fp[4], w_fp[6], COUPs[2], 0., 0., w_fp[111] ); - VVVV3P0_1( w_fp[92], w_fp[4], w_fp[6], COUPs[2], 0., 0., w_fp[110] ); - VVVV4P0_1( w_fp[92], w_fp[4], w_fp[6], COUPs[2], 0., 0., w_fp[109] ); + VVVV1P0_1( w_fp[92], w_fp[4], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[111] ); + VVVV3P0_1( w_fp[92], w_fp[4], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[110] ); + VVVV4P0_1( w_fp[92], w_fp[4], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[109] ); // Amplitude(s) for diagram number 499 - FFV1_0( w_fp[3], w_fp[77], w_fp[111], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[77], w_fp[111], COUPs[1], 1.0, &_fp[0] ); jamp_sv[26] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[27] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[34] += cxtype( 0, 1 ) * amp_sv[0]; @@ -10204,7 +10204,7 @@ namespace mg5amcCpu jamp_sv[37] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[44] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[45] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[77], w_fp[110], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[77], w_fp[110], COUPs[1], 1.0, &_fp[0] ); jamp_sv[27] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[30] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[32] += cxtype( 0, 1 ) * amp_sv[0]; @@ -10213,7 +10213,7 @@ namespace mg5amcCpu jamp_sv[37] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[43] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[46] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[77], w_fp[109], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[77], w_fp[109], COUPs[1], 1.0, &_fp[0] ); jamp_sv[26] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[30] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[32] += cxtype( 0, 1 ) * amp_sv[0]; @@ -10226,10 +10226,10 @@ namespace mg5amcCpu // *** DIAGRAM 500 OF 1240 *** // Wavefunction(s) for diagram number 500 - FFV1_1( w_fp[77], w_fp[92], COUPs[1], cIPD[0], cIPD[1], w_fp[62] ); + FFV1_1( w_fp[77], w_fp[92], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[62] ); // Amplitude(s) for diagram number 500 - FFV1_0( w_fp[46], w_fp[62], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[62], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 500 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -10240,10 +10240,10 @@ namespace mg5amcCpu // *** DIAGRAM 501 OF 1240 *** // Wavefunction(s) for diagram number 501 - FFV1_2( w_fp[46], w_fp[92], COUPs[1], cIPD[0], cIPD[1], w_fp[114] ); + FFV1_2( w_fp[46], w_fp[92], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[114] ); // Amplitude(s) for diagram number 501 - FFV1_0( w_fp[114], w_fp[77], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[114], w_fp[77], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 501 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -10257,7 +10257,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 502 - FFV1_0( w_fp[46], w_fp[77], w_fp[104], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[77], w_fp[104], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 502 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -10273,7 +10273,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 503 - FFV1_0( w_fp[41], w_fp[62], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[62], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 503 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -10284,10 +10284,10 @@ namespace mg5amcCpu // *** DIAGRAM 504 OF 1240 *** // Wavefunction(s) for diagram number 504 - FFV1_2( w_fp[41], w_fp[92], COUPs[1], cIPD[0], cIPD[1], w_fp[113] ); + FFV1_2( w_fp[41], w_fp[92], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[113] ); // Amplitude(s) for diagram number 504 - FFV1_0( w_fp[113], w_fp[77], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[113], w_fp[77], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 504 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -10301,7 +10301,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 505 - FFV1_0( w_fp[41], w_fp[77], w_fp[102], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[77], w_fp[102], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 505 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -10317,7 +10317,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 506 - FFV1_0( w_fp[3], w_fp[62], w_fp[27], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[62], w_fp[27], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 506 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -10333,7 +10333,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 507 - FFV1_0( w_fp[99], w_fp[77], w_fp[27], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[77], w_fp[27], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 507 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -10346,10 +10346,10 @@ namespace mg5amcCpu // *** DIAGRAM 508 OF 1240 *** // Wavefunction(s) for diagram number 508 - VVV1P0_1( w_fp[92], w_fp[27], COUPs[0], 0., 0., w_fp[62] ); + VVV1P0_1( w_fp[92], w_fp[27], COUPs[0], 1.0, 0., 0., w_fp[62] ); // Amplitude(s) for diagram number 508 - FFV1_0( w_fp[3], w_fp[77], w_fp[62], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[77], w_fp[62], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 508 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -10366,10 +10366,10 @@ namespace mg5amcCpu // *** DIAGRAM 509 OF 1240 *** // Wavefunction(s) for diagram number 509 - FFV1_1( w_fp[2], w_fp[92], COUPs[1], cIPD[0], cIPD[1], w_fp[112] ); + FFV1_1( w_fp[2], w_fp[92], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[112] ); // Amplitude(s) for diagram number 509 - FFV1_0( w_fp[56], w_fp[112], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[56], w_fp[112], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 509 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -10383,7 +10383,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 510 - FFV1_0( w_fp[21], w_fp[112], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[21], w_fp[112], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 510 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -10397,7 +10397,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 511 - VVV1_0( w_fp[102], w_fp[103], w_fp[6], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[102], w_fp[103], w_fp[6], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 511 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -10417,7 +10417,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 512 - FFV1_0( w_fp[21], w_fp[2], w_fp[102], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[21], w_fp[2], w_fp[102], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 512 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -10433,7 +10433,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 513 - VVV1_0( w_fp[104], w_fp[103], w_fp[4], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[104], w_fp[103], w_fp[4], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 513 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -10453,7 +10453,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 514 - FFV1_0( w_fp[56], w_fp[2], w_fp[104], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[56], w_fp[2], w_fp[104], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 514 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -10469,7 +10469,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 515 - FFV1_0( w_fp[52], w_fp[2], w_fp[111], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[2], w_fp[111], COUPs[1], 1.0, &_fp[0] ); jamp_sv[15] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[17] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[67] += cxtype( 0, 1 ) * amp_sv[0]; @@ -10478,7 +10478,7 @@ namespace mg5amcCpu jamp_sv[77] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[109] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[112] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[52], w_fp[2], w_fp[110], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[2], w_fp[110], COUPs[1], 1.0, &_fp[0] ); jamp_sv[17] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[51] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[61] += cxtype( 0, 1 ) * amp_sv[0]; @@ -10487,7 +10487,7 @@ namespace mg5amcCpu jamp_sv[77] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[101] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[115] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[52], w_fp[2], w_fp[109], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[2], w_fp[109], COUPs[1], 1.0, &_fp[0] ); jamp_sv[15] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[51] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[61] += cxtype( 0, 1 ) * amp_sv[0]; @@ -10500,10 +10500,10 @@ namespace mg5amcCpu // *** DIAGRAM 516 OF 1240 *** // Wavefunction(s) for diagram number 516 - FFV1_2( w_fp[52], w_fp[92], COUPs[1], cIPD[0], cIPD[1], w_fp[86] ); + FFV1_2( w_fp[52], w_fp[92], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[86] ); // Amplitude(s) for diagram number 516 - FFV1_0( w_fp[86], w_fp[33], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[86], w_fp[33], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 516 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -10514,10 +10514,10 @@ namespace mg5amcCpu // *** DIAGRAM 517 OF 1240 *** // Wavefunction(s) for diagram number 517 - FFV1_1( w_fp[33], w_fp[92], COUPs[1], cIPD[0], cIPD[1], w_fp[98] ); + FFV1_1( w_fp[33], w_fp[92], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[98] ); // Amplitude(s) for diagram number 517 - FFV1_0( w_fp[52], w_fp[98], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[98], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 517 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -10531,7 +10531,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 518 - FFV1_0( w_fp[52], w_fp[33], w_fp[104], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[33], w_fp[104], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 518 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -10547,7 +10547,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 519 - FFV1_0( w_fp[86], w_fp[47], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[86], w_fp[47], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 519 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -10558,10 +10558,10 @@ namespace mg5amcCpu // *** DIAGRAM 520 OF 1240 *** // Wavefunction(s) for diagram number 520 - FFV1_1( w_fp[47], w_fp[92], COUPs[1], cIPD[0], cIPD[1], w_fp[106] ); + FFV1_1( w_fp[47], w_fp[92], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[106] ); // Amplitude(s) for diagram number 520 - FFV1_0( w_fp[52], w_fp[106], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[106], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 520 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -10575,7 +10575,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 521 - FFV1_0( w_fp[52], w_fp[47], w_fp[102], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[47], w_fp[102], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 521 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -10591,7 +10591,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 522 - FFV1_0( w_fp[86], w_fp[2], w_fp[27], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[86], w_fp[2], w_fp[27], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 522 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -10607,7 +10607,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 523 - FFV1_0( w_fp[52], w_fp[112], w_fp[27], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[112], w_fp[27], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 523 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -10623,7 +10623,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 524 - FFV1_0( w_fp[52], w_fp[2], w_fp[62], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[2], w_fp[62], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 524 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -10643,7 +10643,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 525 - FFV1_0( w_fp[65], w_fp[112], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[65], w_fp[112], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 525 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -10659,7 +10659,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 526 - FFV1_0( w_fp[3], w_fp[112], w_fp[64], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[112], w_fp[64], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 526 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -10679,7 +10679,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 527 - FFV1_0( w_fp[99], w_fp[93], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[93], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 527 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -10695,7 +10695,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 528 - FFV1_0( w_fp[99], w_fp[2], w_fp[64], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[2], w_fp[64], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 528 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -10715,7 +10715,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 529 - FFV1_0( w_fp[3], w_fp[93], w_fp[104], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[93], w_fp[104], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 529 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -10735,7 +10735,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 530 - FFV1_0( w_fp[65], w_fp[2], w_fp[104], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[65], w_fp[2], w_fp[104], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 530 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -10755,7 +10755,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 531 - VVVV1_0( w_fp[92], w_fp[61], w_fp[8], w_fp[6], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[92], w_fp[61], w_fp[8], w_fp[6], COUPs[2], 1.0, &_fp[0] ); jamp_sv[12] += amp_sv[0]; jamp_sv[14] -= amp_sv[0]; jamp_sv[30] -= amp_sv[0]; @@ -10772,7 +10772,7 @@ namespace mg5amcCpu jamp_sv[111] += amp_sv[0]; jamp_sv[114] += amp_sv[0]; jamp_sv[115] -= amp_sv[0]; - VVVV3_0( w_fp[92], w_fp[61], w_fp[8], w_fp[6], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[92], w_fp[61], w_fp[8], w_fp[6], COUPs[2], 1.0, &_fp[0] ); jamp_sv[12] += amp_sv[0]; jamp_sv[14] -= amp_sv[0]; jamp_sv[16] -= amp_sv[0]; @@ -10789,7 +10789,7 @@ namespace mg5amcCpu jamp_sv[105] -= amp_sv[0]; jamp_sv[110] -= amp_sv[0]; jamp_sv[111] += amp_sv[0]; - VVVV4_0( w_fp[92], w_fp[61], w_fp[8], w_fp[6], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[92], w_fp[61], w_fp[8], w_fp[6], COUPs[2], 1.0, &_fp[0] ); jamp_sv[16] -= amp_sv[0]; jamp_sv[17] += amp_sv[0]; jamp_sv[30] += amp_sv[0]; @@ -10810,10 +10810,10 @@ namespace mg5amcCpu // *** DIAGRAM 532 OF 1240 *** // Wavefunction(s) for diagram number 532 - VVV1P0_1( w_fp[92], w_fp[61], COUPs[0], 0., 0., w_fp[86] ); + VVV1P0_1( w_fp[92], w_fp[61], COUPs[0], 1.0, 0., 0., w_fp[86] ); // Amplitude(s) for diagram number 532 - VVV1_0( w_fp[8], w_fp[6], w_fp[86], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[6], w_fp[86], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 532 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -10838,10 +10838,10 @@ namespace mg5amcCpu // *** DIAGRAM 533 OF 1240 *** // Wavefunction(s) for diagram number 533 - VVV1P0_1( w_fp[92], w_fp[8], COUPs[0], 0., 0., w_fp[101] ); + VVV1P0_1( w_fp[92], w_fp[8], COUPs[0], 1.0, 0., 0., w_fp[101] ); // Amplitude(s) for diagram number 533 - VVV1_0( w_fp[61], w_fp[6], w_fp[101], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[61], w_fp[6], w_fp[101], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 533 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -10869,7 +10869,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 534 - VVV1_0( w_fp[61], w_fp[8], w_fp[104], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[61], w_fp[8], w_fp[104], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 534 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -10897,7 +10897,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 535 - FFV1_0( w_fp[3], w_fp[47], w_fp[86], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[47], w_fp[86], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 535 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -10917,7 +10917,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 536 - FFV1_0( w_fp[3], w_fp[106], w_fp[61], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[106], w_fp[61], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 536 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -10933,7 +10933,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 537 - FFV1_0( w_fp[99], w_fp[47], w_fp[61], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[47], w_fp[61], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 537 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -10949,7 +10949,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 538 - FFV1_0( w_fp[41], w_fp[2], w_fp[86], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[2], w_fp[86], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 538 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -10969,7 +10969,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 539 - FFV1_0( w_fp[41], w_fp[112], w_fp[61], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[112], w_fp[61], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 539 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -10985,7 +10985,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 540 - FFV1_0( w_fp[113], w_fp[2], w_fp[61], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[113], w_fp[2], w_fp[61], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 540 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -11001,7 +11001,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 541 - FFV1_0( w_fp[76], w_fp[112], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[76], w_fp[112], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 541 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -11017,7 +11017,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 542 - FFV1_0( w_fp[3], w_fp[112], w_fp[74], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[112], w_fp[74], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 542 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -11037,7 +11037,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 543 - FFV1_0( w_fp[99], w_fp[97], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[97], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 543 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -11053,7 +11053,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 544 - FFV1_0( w_fp[99], w_fp[2], w_fp[74], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[2], w_fp[74], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 544 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -11073,7 +11073,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 545 - FFV1_0( w_fp[3], w_fp[97], w_fp[102], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[97], w_fp[102], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 545 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -11093,7 +11093,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 546 - FFV1_0( w_fp[76], w_fp[2], w_fp[102], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[76], w_fp[2], w_fp[102], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 546 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -11113,7 +11113,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 547 - VVVV1_0( w_fp[92], w_fp[72], w_fp[8], w_fp[4], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[92], w_fp[72], w_fp[8], w_fp[4], COUPs[2], 1.0, &_fp[0] ); jamp_sv[13] += amp_sv[0]; jamp_sv[16] -= amp_sv[0]; jamp_sv[43] -= amp_sv[0]; @@ -11130,7 +11130,7 @@ namespace mg5amcCpu jamp_sv[76] += amp_sv[0]; jamp_sv[103] += amp_sv[0]; jamp_sv[106] -= amp_sv[0]; - VVVV3_0( w_fp[92], w_fp[72], w_fp[8], w_fp[4], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[92], w_fp[72], w_fp[8], w_fp[4], COUPs[2], 1.0, &_fp[0] ); jamp_sv[13] += amp_sv[0]; jamp_sv[14] -= amp_sv[0]; jamp_sv[15] += amp_sv[0]; @@ -11147,7 +11147,7 @@ namespace mg5amcCpu jamp_sv[76] += amp_sv[0]; jamp_sv[104] += amp_sv[0]; jamp_sv[105] -= amp_sv[0]; - VVVV4_0( w_fp[92], w_fp[72], w_fp[8], w_fp[4], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[92], w_fp[72], w_fp[8], w_fp[4], COUPs[2], 1.0, &_fp[0] ); jamp_sv[14] -= amp_sv[0]; jamp_sv[15] += amp_sv[0]; jamp_sv[43] += amp_sv[0]; @@ -11168,10 +11168,10 @@ namespace mg5amcCpu // *** DIAGRAM 548 OF 1240 *** // Wavefunction(s) for diagram number 548 - VVV1P0_1( w_fp[92], w_fp[72], COUPs[0], 0., 0., w_fp[86] ); + VVV1P0_1( w_fp[92], w_fp[72], COUPs[0], 1.0, 0., 0., w_fp[86] ); // Amplitude(s) for diagram number 548 - VVV1_0( w_fp[8], w_fp[4], w_fp[86], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[4], w_fp[86], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 548 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -11199,7 +11199,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 549 - VVV1_0( w_fp[72], w_fp[4], w_fp[101], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[72], w_fp[4], w_fp[101], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 549 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -11227,7 +11227,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 550 - VVV1_0( w_fp[72], w_fp[8], w_fp[102], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[72], w_fp[8], w_fp[102], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 550 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -11255,7 +11255,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 551 - FFV1_0( w_fp[3], w_fp[33], w_fp[86], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[33], w_fp[86], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 551 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -11275,7 +11275,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 552 - FFV1_0( w_fp[3], w_fp[98], w_fp[72], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[98], w_fp[72], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 552 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -11291,7 +11291,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 553 - FFV1_0( w_fp[99], w_fp[33], w_fp[72], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[33], w_fp[72], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 553 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -11307,7 +11307,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 554 - FFV1_0( w_fp[46], w_fp[2], w_fp[86], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[2], w_fp[86], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 554 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -11327,7 +11327,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 555 - FFV1_0( w_fp[46], w_fp[112], w_fp[72], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[112], w_fp[72], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 555 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -11343,7 +11343,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 556 - FFV1_0( w_fp[114], w_fp[2], w_fp[72], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[114], w_fp[2], w_fp[72], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 556 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -11356,10 +11356,10 @@ namespace mg5amcCpu // *** DIAGRAM 557 OF 1240 *** // Wavefunction(s) for diagram number 557 - VVV1P0_1( w_fp[92], w_fp[1], COUPs[0], 0., 0., w_fp[86] ); + VVV1P0_1( w_fp[92], w_fp[1], COUPs[0], 1.0, 0., 0., w_fp[86] ); // Amplitude(s) for diagram number 557 - VVV1_0( w_fp[86], w_fp[13], w_fp[6], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[86], w_fp[13], w_fp[6], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 557 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -11387,7 +11387,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 558 - VVV1_0( w_fp[86], w_fp[11], w_fp[4], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[86], w_fp[11], w_fp[4], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 558 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -11415,7 +11415,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 559 - VVVV1_0( w_fp[8], w_fp[4], w_fp[6], w_fp[86], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[8], w_fp[4], w_fp[6], w_fp[86], COUPs[2], 1.0, &_fp[0] ); jamp_sv[13] -= amp_sv[0]; jamp_sv[27] += amp_sv[0]; jamp_sv[37] -= amp_sv[0]; @@ -11432,7 +11432,7 @@ namespace mg5amcCpu jamp_sv[103] -= amp_sv[0]; jamp_sv[106] += amp_sv[0]; jamp_sv[114] -= amp_sv[0]; - VVVV3_0( w_fp[8], w_fp[4], w_fp[6], w_fp[86], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[8], w_fp[4], w_fp[6], w_fp[86], COUPs[2], 1.0, &_fp[0] ); jamp_sv[12] -= amp_sv[0]; jamp_sv[26] += amp_sv[0]; jamp_sv[36] -= amp_sv[0]; @@ -11449,7 +11449,7 @@ namespace mg5amcCpu jamp_sv[111] -= amp_sv[0]; jamp_sv[112] += amp_sv[0]; jamp_sv[114] -= amp_sv[0]; - VVVV4_0( w_fp[8], w_fp[4], w_fp[6], w_fp[86], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[8], w_fp[4], w_fp[6], w_fp[86], COUPs[2], 1.0, &_fp[0] ); jamp_sv[12] -= amp_sv[0]; jamp_sv[13] += amp_sv[0]; jamp_sv[26] += amp_sv[0]; @@ -11473,7 +11473,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 560 - VVV1_0( w_fp[102], w_fp[108], w_fp[6], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[102], w_fp[108], w_fp[6], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 560 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -11501,7 +11501,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 561 - VVV1_0( w_fp[102], w_fp[1], w_fp[11], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[102], w_fp[1], w_fp[11], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 561 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -11529,7 +11529,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 562 - VVVV1_0( w_fp[1], w_fp[8], w_fp[6], w_fp[102], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[1], w_fp[8], w_fp[6], w_fp[102], COUPs[2], 1.0, &_fp[0] ); jamp_sv[15] += amp_sv[0]; jamp_sv[26] -= amp_sv[0]; jamp_sv[30] += amp_sv[0]; @@ -11546,7 +11546,7 @@ namespace mg5amcCpu jamp_sv[109] += amp_sv[0]; jamp_sv[112] -= amp_sv[0]; jamp_sv[115] += amp_sv[0]; - VVVV3_0( w_fp[1], w_fp[8], w_fp[6], w_fp[102], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[1], w_fp[8], w_fp[6], w_fp[102], COUPs[2], 1.0, &_fp[0] ); jamp_sv[14] -= amp_sv[0]; jamp_sv[15] += amp_sv[0]; jamp_sv[43] += amp_sv[0]; @@ -11563,7 +11563,7 @@ namespace mg5amcCpu jamp_sv[104] += amp_sv[0]; jamp_sv[105] -= amp_sv[0]; jamp_sv[106] += amp_sv[0]; - VVVV4_0( w_fp[1], w_fp[8], w_fp[6], w_fp[102], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[1], w_fp[8], w_fp[6], w_fp[102], COUPs[2], 1.0, &_fp[0] ); jamp_sv[14] -= amp_sv[0]; jamp_sv[26] += amp_sv[0]; jamp_sv[30] -= amp_sv[0]; @@ -11587,7 +11587,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 563 - VVV1_0( w_fp[104], w_fp[108], w_fp[4], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[104], w_fp[108], w_fp[4], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 563 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -11615,7 +11615,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 564 - VVV1_0( w_fp[104], w_fp[1], w_fp[13], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[104], w_fp[1], w_fp[13], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 564 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -11643,7 +11643,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 565 - VVVV1_0( w_fp[1], w_fp[8], w_fp[4], w_fp[104], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[1], w_fp[8], w_fp[4], w_fp[104], COUPs[2], 1.0, &_fp[0] ); jamp_sv[17] += amp_sv[0]; jamp_sv[27] -= amp_sv[0]; jamp_sv[30] += amp_sv[0]; @@ -11660,7 +11660,7 @@ namespace mg5amcCpu jamp_sv[77] -= amp_sv[0]; jamp_sv[101] -= amp_sv[0]; jamp_sv[115] += amp_sv[0]; - VVVV3_0( w_fp[1], w_fp[8], w_fp[4], w_fp[104], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[1], w_fp[8], w_fp[4], w_fp[104], COUPs[2], 1.0, &_fp[0] ); jamp_sv[16] -= amp_sv[0]; jamp_sv[17] += amp_sv[0]; jamp_sv[30] += amp_sv[0]; @@ -11677,7 +11677,7 @@ namespace mg5amcCpu jamp_sv[101] -= amp_sv[0]; jamp_sv[114] -= amp_sv[0]; jamp_sv[115] += amp_sv[0]; - VVVV4_0( w_fp[1], w_fp[8], w_fp[4], w_fp[104], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[1], w_fp[8], w_fp[4], w_fp[104], COUPs[2], 1.0, &_fp[0] ); jamp_sv[16] -= amp_sv[0]; jamp_sv[27] += amp_sv[0]; jamp_sv[37] -= amp_sv[0]; @@ -11698,12 +11698,12 @@ namespace mg5amcCpu // *** DIAGRAM 566 OF 1240 *** // Wavefunction(s) for diagram number 566 - VVVV1P0_1( w_fp[92], w_fp[1], w_fp[4], COUPs[2], 0., 0., w_fp[105] ); - VVVV3P0_1( w_fp[92], w_fp[1], w_fp[4], COUPs[2], 0., 0., w_fp[95] ); - VVVV4P0_1( w_fp[92], w_fp[1], w_fp[4], COUPs[2], 0., 0., w_fp[107] ); + VVVV1P0_1( w_fp[92], w_fp[1], w_fp[4], COUPs[2], 1.0, 0., 0., w_fp[105] ); + VVVV3P0_1( w_fp[92], w_fp[1], w_fp[4], COUPs[2], 1.0, 0., 0., w_fp[95] ); + VVVV4P0_1( w_fp[92], w_fp[1], w_fp[4], COUPs[2], 1.0, 0., 0., w_fp[107] ); // Amplitude(s) for diagram number 566 - VVV1_0( w_fp[8], w_fp[6], w_fp[105], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[6], w_fp[105], COUPs[0], 1.0, &_fp[0] ); jamp_sv[12] += amp_sv[0]; jamp_sv[14] -= amp_sv[0]; jamp_sv[30] -= amp_sv[0]; @@ -11720,7 +11720,7 @@ namespace mg5amcCpu jamp_sv[111] += amp_sv[0]; jamp_sv[114] += amp_sv[0]; jamp_sv[115] -= amp_sv[0]; - VVV1_0( w_fp[8], w_fp[6], w_fp[95], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[6], w_fp[95], COUPs[0], 1.0, &_fp[0] ); jamp_sv[14] -= amp_sv[0]; jamp_sv[26] += amp_sv[0]; jamp_sv[30] -= amp_sv[0]; @@ -11737,7 +11737,7 @@ namespace mg5amcCpu jamp_sv[109] -= amp_sv[0]; jamp_sv[112] += amp_sv[0]; jamp_sv[115] -= amp_sv[0]; - VVV1_0( w_fp[8], w_fp[6], w_fp[107], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[6], w_fp[107], COUPs[0], 1.0, &_fp[0] ); jamp_sv[12] -= amp_sv[0]; jamp_sv[26] += amp_sv[0]; jamp_sv[36] -= amp_sv[0]; @@ -11758,12 +11758,12 @@ namespace mg5amcCpu // *** DIAGRAM 567 OF 1240 *** // Wavefunction(s) for diagram number 567 - VVVV1P0_1( w_fp[92], w_fp[1], w_fp[6], COUPs[2], 0., 0., w_fp[96] ); - VVVV3P0_1( w_fp[92], w_fp[1], w_fp[6], COUPs[2], 0., 0., w_fp[90] ); - VVVV4P0_1( w_fp[92], w_fp[1], w_fp[6], COUPs[2], 0., 0., w_fp[88] ); + VVVV1P0_1( w_fp[92], w_fp[1], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[96] ); + VVVV3P0_1( w_fp[92], w_fp[1], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[90] ); + VVVV4P0_1( w_fp[92], w_fp[1], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[88] ); // Amplitude(s) for diagram number 567 - VVV1_0( w_fp[8], w_fp[4], w_fp[96], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[4], w_fp[96], COUPs[0], 1.0, &_fp[0] ); jamp_sv[13] += amp_sv[0]; jamp_sv[16] -= amp_sv[0]; jamp_sv[43] -= amp_sv[0]; @@ -11780,7 +11780,7 @@ namespace mg5amcCpu jamp_sv[76] += amp_sv[0]; jamp_sv[103] += amp_sv[0]; jamp_sv[106] -= amp_sv[0]; - VVV1_0( w_fp[8], w_fp[4], w_fp[90], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[4], w_fp[90], COUPs[0], 1.0, &_fp[0] ); jamp_sv[16] -= amp_sv[0]; jamp_sv[27] += amp_sv[0]; jamp_sv[37] -= amp_sv[0]; @@ -11797,7 +11797,7 @@ namespace mg5amcCpu jamp_sv[76] += amp_sv[0]; jamp_sv[100] += amp_sv[0]; jamp_sv[114] -= amp_sv[0]; - VVV1_0( w_fp[8], w_fp[4], w_fp[88], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[4], w_fp[88], COUPs[0], 1.0, &_fp[0] ); jamp_sv[13] -= amp_sv[0]; jamp_sv[27] += amp_sv[0]; jamp_sv[37] -= amp_sv[0]; @@ -11821,7 +11821,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 568 - VVV1_0( w_fp[1], w_fp[8], w_fp[111], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[8], w_fp[111], COUPs[0], 1.0, &_fp[0] ); jamp_sv[15] -= amp_sv[0]; jamp_sv[17] += amp_sv[0]; jamp_sv[26] += amp_sv[0]; @@ -11838,7 +11838,7 @@ namespace mg5amcCpu jamp_sv[77] -= amp_sv[0]; jamp_sv[109] -= amp_sv[0]; jamp_sv[112] += amp_sv[0]; - VVV1_0( w_fp[1], w_fp[8], w_fp[110], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[8], w_fp[110], COUPs[0], 1.0, &_fp[0] ); jamp_sv[17] += amp_sv[0]; jamp_sv[27] -= amp_sv[0]; jamp_sv[30] += amp_sv[0]; @@ -11855,7 +11855,7 @@ namespace mg5amcCpu jamp_sv[77] -= amp_sv[0]; jamp_sv[101] -= amp_sv[0]; jamp_sv[115] += amp_sv[0]; - VVV1_0( w_fp[1], w_fp[8], w_fp[109], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[8], w_fp[109], COUPs[0], 1.0, &_fp[0] ); jamp_sv[15] += amp_sv[0]; jamp_sv[26] -= amp_sv[0]; jamp_sv[30] += amp_sv[0]; @@ -11879,7 +11879,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 569 - VVVV1_0( w_fp[92], w_fp[1], w_fp[8], w_fp[27], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[92], w_fp[1], w_fp[8], w_fp[27], COUPs[2], 1.0, &_fp[0] ); jamp_sv[12] += amp_sv[0]; jamp_sv[13] -= amp_sv[0]; jamp_sv[26] -= amp_sv[0]; @@ -11896,7 +11896,7 @@ namespace mg5amcCpu jamp_sv[110] -= amp_sv[0]; jamp_sv[111] += amp_sv[0]; jamp_sv[112] -= amp_sv[0]; - VVVV3_0( w_fp[92], w_fp[1], w_fp[8], w_fp[27], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[92], w_fp[1], w_fp[8], w_fp[27], COUPs[2], 1.0, &_fp[0] ); jamp_sv[12] += amp_sv[0]; jamp_sv[13] -= amp_sv[0]; jamp_sv[15] -= amp_sv[0]; @@ -11913,7 +11913,7 @@ namespace mg5amcCpu jamp_sv[77] -= amp_sv[0]; jamp_sv[110] -= amp_sv[0]; jamp_sv[111] += amp_sv[0]; - VVVV4_0( w_fp[92], w_fp[1], w_fp[8], w_fp[27], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[92], w_fp[1], w_fp[8], w_fp[27], COUPs[2], 1.0, &_fp[0] ); jamp_sv[15] -= amp_sv[0]; jamp_sv[17] += amp_sv[0]; jamp_sv[26] += amp_sv[0]; @@ -11937,7 +11937,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 570 - VVV1_0( w_fp[8], w_fp[27], w_fp[86], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[27], w_fp[86], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 570 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -11965,7 +11965,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 571 - VVV1_0( w_fp[1], w_fp[27], w_fp[101], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[27], w_fp[101], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 571 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -11993,7 +11993,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 572 - VVV1_0( w_fp[1], w_fp[8], w_fp[62], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[8], w_fp[62], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 572 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -12021,7 +12021,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 573 - VVV1_0( w_fp[86], w_fp[37], w_fp[6], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[86], w_fp[37], w_fp[6], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 573 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -12041,7 +12041,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 574 - FFV1_0( w_fp[3], w_fp[36], w_fp[86], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[36], w_fp[86], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 574 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -12057,7 +12057,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 575 - FFV1_0( w_fp[99], w_fp[100], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[100], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 575 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -12071,7 +12071,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 576 - FFV1_0( w_fp[99], w_fp[36], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[36], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 576 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -12085,7 +12085,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 577 - FFV1_0( w_fp[3], w_fp[100], w_fp[104], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[100], w_fp[104], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 577 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -12101,7 +12101,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 578 - VVV1_0( w_fp[104], w_fp[1], w_fp[37], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[104], w_fp[1], w_fp[37], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 578 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -12121,7 +12121,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 579 - FFV1_0( w_fp[3], w_fp[33], w_fp[96], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[33], w_fp[96], COUPs[1], 1.0, &_fp[0] ); jamp_sv[50] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[51] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[58] += cxtype( 0, 1 ) * amp_sv[0]; @@ -12130,7 +12130,7 @@ namespace mg5amcCpu jamp_sv[61] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[68] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[69] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[33], w_fp[90], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[33], w_fp[90], COUPs[1], 1.0, &_fp[0] ); jamp_sv[51] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[54] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[56] += cxtype( 0, 1 ) * amp_sv[0]; @@ -12139,7 +12139,7 @@ namespace mg5amcCpu jamp_sv[61] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[67] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[70] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[33], w_fp[88], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[33], w_fp[88], COUPs[1], 1.0, &_fp[0] ); jamp_sv[50] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[54] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[56] += cxtype( 0, 1 ) * amp_sv[0]; @@ -12155,7 +12155,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 580 - FFV1_0( w_fp[41], w_fp[33], w_fp[86], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[33], w_fp[86], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 580 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -12171,7 +12171,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 581 - FFV1_0( w_fp[41], w_fp[98], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[98], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 581 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -12185,7 +12185,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 582 - FFV1_0( w_fp[113], w_fp[33], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[113], w_fp[33], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 582 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -12199,7 +12199,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 583 - VVV1_0( w_fp[86], w_fp[51], w_fp[4], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[86], w_fp[51], w_fp[4], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 583 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -12219,7 +12219,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 584 - FFV1_0( w_fp[3], w_fp[49], w_fp[86], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[49], w_fp[86], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 584 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -12235,7 +12235,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 585 - FFV1_0( w_fp[99], w_fp[91], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[91], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 585 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -12249,7 +12249,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 586 - FFV1_0( w_fp[99], w_fp[49], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[49], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 586 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -12263,7 +12263,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 587 - FFV1_0( w_fp[3], w_fp[91], w_fp[102], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[91], w_fp[102], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 587 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -12279,7 +12279,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 588 - VVV1_0( w_fp[102], w_fp[1], w_fp[51], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[102], w_fp[1], w_fp[51], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 588 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -12299,7 +12299,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 589 - FFV1_0( w_fp[3], w_fp[47], w_fp[105], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[47], w_fp[105], COUPs[1], 1.0, &_fp[0] ); jamp_sv[100] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[101] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[104] += cxtype( 0, 1 ) * amp_sv[0]; @@ -12308,7 +12308,7 @@ namespace mg5amcCpu jamp_sv[111] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[114] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[115] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[47], w_fp[95], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[47], w_fp[95], COUPs[1], 1.0, &_fp[0] ); jamp_sv[101] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[103] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[104] += cxtype( 0, 1 ) * amp_sv[0]; @@ -12317,7 +12317,7 @@ namespace mg5amcCpu jamp_sv[109] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[112] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[115] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[47], w_fp[107], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[47], w_fp[107], COUPs[1], 1.0, &_fp[0] ); jamp_sv[100] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[103] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[106] += cxtype( 0, 1 ) * amp_sv[0]; @@ -12333,7 +12333,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 590 - FFV1_0( w_fp[46], w_fp[47], w_fp[86], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[47], w_fp[86], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 590 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -12349,7 +12349,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 591 - FFV1_0( w_fp[46], w_fp[106], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[106], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 591 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -12363,7 +12363,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 592 - FFV1_0( w_fp[114], w_fp[47], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[114], w_fp[47], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 592 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -12377,7 +12377,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 593 - VVV1_0( w_fp[86], w_fp[54], w_fp[6], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[86], w_fp[54], w_fp[6], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 593 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -12397,7 +12397,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 594 - FFV1_0( w_fp[53], w_fp[2], w_fp[86], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[53], w_fp[2], w_fp[86], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 594 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -12413,7 +12413,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 595 - FFV1_0( w_fp[78], w_fp[112], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[78], w_fp[112], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 595 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -12427,7 +12427,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 596 - FFV1_0( w_fp[53], w_fp[112], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[53], w_fp[112], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 596 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -12441,7 +12441,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 597 - FFV1_0( w_fp[78], w_fp[2], w_fp[104], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[78], w_fp[2], w_fp[104], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 597 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -12457,7 +12457,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 598 - VVV1_0( w_fp[104], w_fp[1], w_fp[54], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[104], w_fp[1], w_fp[54], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 598 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -12477,7 +12477,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 599 - FFV1_0( w_fp[46], w_fp[2], w_fp[96], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[2], w_fp[96], COUPs[1], 1.0, &_fp[0] ); jamp_sv[13] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[16] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[43] += cxtype( 0, 1 ) * amp_sv[0]; @@ -12486,7 +12486,7 @@ namespace mg5amcCpu jamp_sv[76] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[103] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[106] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[46], w_fp[2], w_fp[90], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[2], w_fp[90], COUPs[1], 1.0, &_fp[0] ); jamp_sv[16] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[27] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[37] += cxtype( 0, 1 ) * amp_sv[0]; @@ -12495,7 +12495,7 @@ namespace mg5amcCpu jamp_sv[76] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[100] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[114] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[46], w_fp[2], w_fp[88], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[2], w_fp[88], COUPs[1], 1.0, &_fp[0] ); jamp_sv[13] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[27] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[37] += cxtype( 0, 1 ) * amp_sv[0]; @@ -12511,7 +12511,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 600 - VVV1_0( w_fp[86], w_fp[20], w_fp[4], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[86], w_fp[20], w_fp[4], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 600 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -12531,7 +12531,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 601 - FFV1_0( w_fp[28], w_fp[2], w_fp[86], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[28], w_fp[2], w_fp[86], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 601 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -12547,7 +12547,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 602 - FFV1_0( w_fp[60], w_fp[112], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[60], w_fp[112], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 602 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -12561,7 +12561,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 603 - FFV1_0( w_fp[28], w_fp[112], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[28], w_fp[112], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 603 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -12575,7 +12575,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 604 - FFV1_0( w_fp[60], w_fp[2], w_fp[102], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[60], w_fp[2], w_fp[102], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 604 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -12591,7 +12591,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 605 - VVV1_0( w_fp[102], w_fp[1], w_fp[20], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[102], w_fp[1], w_fp[20], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 605 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -12611,7 +12611,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 606 - FFV1_0( w_fp[41], w_fp[2], w_fp[105], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[2], w_fp[105], COUPs[1], 1.0, &_fp[0] ); jamp_sv[12] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[14] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[30] += cxtype( 0, 1 ) * amp_sv[0]; @@ -12620,7 +12620,7 @@ namespace mg5amcCpu jamp_sv[56] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[72] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[74] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[41], w_fp[2], w_fp[95], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[2], w_fp[95], COUPs[1], 1.0, &_fp[0] ); jamp_sv[14] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[26] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[30] += cxtype( 0, 1 ) * amp_sv[0]; @@ -12629,7 +12629,7 @@ namespace mg5amcCpu jamp_sv[50] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[60] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[74] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[41], w_fp[2], w_fp[107], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[2], w_fp[107], COUPs[1], 1.0, &_fp[0] ); jamp_sv[12] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[26] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[36] += cxtype( 0, 1 ) * amp_sv[0]; @@ -12645,7 +12645,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 607 - FFV1_0( w_fp[3], w_fp[15], w_fp[86], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[15], w_fp[86], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 607 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -12665,7 +12665,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 608 - FFV1_0( w_fp[14], w_fp[2], w_fp[86], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[14], w_fp[2], w_fp[86], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 608 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -12685,7 +12685,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 609 - FFV1_0( w_fp[3], w_fp[112], w_fp[68], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[112], w_fp[68], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 609 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -12705,7 +12705,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 610 - FFV1_0( w_fp[14], w_fp[112], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[14], w_fp[112], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 610 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -12721,7 +12721,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 611 - FFV1_0( w_fp[99], w_fp[2], w_fp[68], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[2], w_fp[68], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 611 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -12741,7 +12741,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 612 - FFV1_0( w_fp[99], w_fp[15], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[15], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 612 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -12757,7 +12757,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 613 - FFV1_0( w_fp[3], w_fp[112], w_fp[57], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[112], w_fp[57], COUPs[1], 1.0, &_fp[0] ); jamp_sv[12] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[13] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[15] += cxtype( 0, 1 ) * amp_sv[0]; @@ -12766,7 +12766,7 @@ namespace mg5amcCpu jamp_sv[73] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[75] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[77] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[112], w_fp[81], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[112], w_fp[81], COUPs[1], 1.0, &_fp[0] ); jamp_sv[13] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[14] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[15] += cxtype( 0, 1 ) * amp_sv[0]; @@ -12775,7 +12775,7 @@ namespace mg5amcCpu jamp_sv[74] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[75] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[76] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[112], w_fp[82], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[112], w_fp[82], COUPs[1], 1.0, &_fp[0] ); jamp_sv[12] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[14] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[16] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -12791,7 +12791,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 614 - FFV1_0( w_fp[99], w_fp[2], w_fp[57], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[2], w_fp[57], COUPs[1], 1.0, &_fp[0] ); jamp_sv[34] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[35] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[44] += cxtype( 0, 1 ) * amp_sv[0]; @@ -12800,7 +12800,7 @@ namespace mg5amcCpu jamp_sv[69] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[110] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[111] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[99], w_fp[2], w_fp[81], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[2], w_fp[81], COUPs[1], 1.0, &_fp[0] ); jamp_sv[44] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[45] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[58] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -12809,7 +12809,7 @@ namespace mg5amcCpu jamp_sv[69] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[104] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[105] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[99], w_fp[2], w_fp[82], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[2], w_fp[82], COUPs[1], 1.0, &_fp[0] ); jamp_sv[34] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[35] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[58] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -12825,7 +12825,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 615 - VVV1_0( w_fp[92], w_fp[57], w_fp[8], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[92], w_fp[57], w_fp[8], COUPs[0], 1.0, &_fp[0] ); jamp_sv[12] -= amp_sv[0]; jamp_sv[13] += amp_sv[0]; jamp_sv[15] += amp_sv[0]; @@ -12842,7 +12842,7 @@ namespace mg5amcCpu jamp_sv[77] += amp_sv[0]; jamp_sv[110] += amp_sv[0]; jamp_sv[111] -= amp_sv[0]; - VVV1_0( w_fp[92], w_fp[81], w_fp[8], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[92], w_fp[81], w_fp[8], COUPs[0], 1.0, &_fp[0] ); jamp_sv[13] += amp_sv[0]; jamp_sv[14] -= amp_sv[0]; jamp_sv[15] += amp_sv[0]; @@ -12859,7 +12859,7 @@ namespace mg5amcCpu jamp_sv[76] += amp_sv[0]; jamp_sv[104] += amp_sv[0]; jamp_sv[105] -= amp_sv[0]; - VVV1_0( w_fp[92], w_fp[82], w_fp[8], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[92], w_fp[82], w_fp[8], COUPs[0], 1.0, &_fp[0] ); jamp_sv[12] += amp_sv[0]; jamp_sv[14] -= amp_sv[0]; jamp_sv[16] -= amp_sv[0]; @@ -12880,11 +12880,11 @@ namespace mg5amcCpu // *** DIAGRAM 616 OF 1240 *** // Wavefunction(s) for diagram number 616 - VVV1P0_1( w_fp[0], w_fp[6], COUPs[0], 0., 0., w_fp[92] ); - FFV1_2( w_fp[3], w_fp[92], COUPs[1], cIPD[0], cIPD[1], w_fp[99] ); + VVV1P0_1( w_fp[0], w_fp[6], COUPs[0], 1.0, 0., 0., w_fp[92] ); + FFV1_2( w_fp[3], w_fp[92], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[99] ); // Amplitude(s) for diagram number 616 - FFV1_0( w_fp[99], w_fp[87], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[87], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 616 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -12898,7 +12898,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 617 - FFV1_0( w_fp[99], w_fp[9], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[9], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 617 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -12909,10 +12909,10 @@ namespace mg5amcCpu // *** DIAGRAM 618 OF 1240 *** // Wavefunction(s) for diagram number 618 - VVV1P0_1( w_fp[92], w_fp[4], COUPs[0], 0., 0., w_fp[112] ); + VVV1P0_1( w_fp[92], w_fp[4], COUPs[0], 1.0, 0., 0., w_fp[112] ); // Amplitude(s) for diagram number 618 - VVV1_0( w_fp[112], w_fp[34], w_fp[5], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[112], w_fp[34], w_fp[5], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 618 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -12932,7 +12932,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 619 - FFV1_0( w_fp[3], w_fp[9], w_fp[112], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[9], w_fp[112], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 619 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -12945,10 +12945,10 @@ namespace mg5amcCpu // *** DIAGRAM 620 OF 1240 *** // Wavefunction(s) for diagram number 620 - VVV1P0_1( w_fp[92], w_fp[5], COUPs[0], 0., 0., w_fp[86] ); + VVV1P0_1( w_fp[92], w_fp[5], COUPs[0], 1.0, 0., 0., w_fp[86] ); // Amplitude(s) for diagram number 620 - VVV1_0( w_fp[86], w_fp[34], w_fp[4], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[86], w_fp[34], w_fp[4], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 620 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -12968,7 +12968,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 621 - FFV1_0( w_fp[3], w_fp[87], w_fp[86], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[87], w_fp[86], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 621 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -12981,12 +12981,12 @@ namespace mg5amcCpu // *** DIAGRAM 622 OF 1240 *** // Wavefunction(s) for diagram number 622 - VVVV1P0_1( w_fp[92], w_fp[4], w_fp[5], COUPs[2], 0., 0., w_fp[107] ); - VVVV3P0_1( w_fp[92], w_fp[4], w_fp[5], COUPs[2], 0., 0., w_fp[95] ); - VVVV4P0_1( w_fp[92], w_fp[4], w_fp[5], COUPs[2], 0., 0., w_fp[105] ); + VVVV1P0_1( w_fp[92], w_fp[4], w_fp[5], COUPs[2], 1.0, 0., 0., w_fp[107] ); + VVVV3P0_1( w_fp[92], w_fp[4], w_fp[5], COUPs[2], 1.0, 0., 0., w_fp[95] ); + VVVV4P0_1( w_fp[92], w_fp[4], w_fp[5], COUPs[2], 1.0, 0., 0., w_fp[105] ); // Amplitude(s) for diagram number 622 - FFV1_0( w_fp[3], w_fp[77], w_fp[107], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[77], w_fp[107], COUPs[1], 1.0, &_fp[0] ); jamp_sv[28] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[29] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[32] += cxtype( 0, 1 ) * amp_sv[0]; @@ -12995,7 +12995,7 @@ namespace mg5amcCpu jamp_sv[39] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[42] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[43] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[77], w_fp[95], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[77], w_fp[95], COUPs[1], 1.0, &_fp[0] ); jamp_sv[29] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[31] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[32] += cxtype( 0, 1 ) * amp_sv[0]; @@ -13004,7 +13004,7 @@ namespace mg5amcCpu jamp_sv[37] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[40] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[43] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[77], w_fp[105], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[77], w_fp[105], COUPs[1], 1.0, &_fp[0] ); jamp_sv[28] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[31] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[34] += cxtype( 0, 1 ) * amp_sv[0]; @@ -13017,10 +13017,10 @@ namespace mg5amcCpu // *** DIAGRAM 623 OF 1240 *** // Wavefunction(s) for diagram number 623 - FFV1_1( w_fp[77], w_fp[92], COUPs[1], cIPD[0], cIPD[1], w_fp[102] ); + FFV1_1( w_fp[77], w_fp[92], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[102] ); // Amplitude(s) for diagram number 623 - FFV1_0( w_fp[46], w_fp[102], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[102], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 623 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -13031,10 +13031,10 @@ namespace mg5amcCpu // *** DIAGRAM 624 OF 1240 *** // Wavefunction(s) for diagram number 624 - FFV1_2( w_fp[46], w_fp[92], COUPs[1], cIPD[0], cIPD[1], w_fp[88] ); + FFV1_2( w_fp[46], w_fp[92], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[88] ); // Amplitude(s) for diagram number 624 - FFV1_0( w_fp[88], w_fp[77], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[88], w_fp[77], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 624 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -13048,7 +13048,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 625 - FFV1_0( w_fp[46], w_fp[77], w_fp[86], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[77], w_fp[86], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 625 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -13064,7 +13064,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 626 - FFV1_0( w_fp[38], w_fp[102], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[102], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 626 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -13075,10 +13075,10 @@ namespace mg5amcCpu // *** DIAGRAM 627 OF 1240 *** // Wavefunction(s) for diagram number 627 - FFV1_2( w_fp[38], w_fp[92], COUPs[1], cIPD[0], cIPD[1], w_fp[90] ); + FFV1_2( w_fp[38], w_fp[92], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[90] ); // Amplitude(s) for diagram number 627 - FFV1_0( w_fp[90], w_fp[77], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[90], w_fp[77], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 627 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -13092,7 +13092,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 628 - FFV1_0( w_fp[38], w_fp[77], w_fp[112], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[77], w_fp[112], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 628 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -13108,7 +13108,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 629 - FFV1_0( w_fp[3], w_fp[102], w_fp[24], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[102], w_fp[24], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 629 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -13124,7 +13124,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 630 - FFV1_0( w_fp[99], w_fp[77], w_fp[24], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[77], w_fp[24], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 630 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -13137,10 +13137,10 @@ namespace mg5amcCpu // *** DIAGRAM 631 OF 1240 *** // Wavefunction(s) for diagram number 631 - VVV1P0_1( w_fp[92], w_fp[24], COUPs[0], 0., 0., w_fp[102] ); + VVV1P0_1( w_fp[92], w_fp[24], COUPs[0], 1.0, 0., 0., w_fp[102] ); // Amplitude(s) for diagram number 631 - FFV1_0( w_fp[3], w_fp[77], w_fp[102], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[77], w_fp[102], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 631 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -13157,10 +13157,10 @@ namespace mg5amcCpu // *** DIAGRAM 632 OF 1240 *** // Wavefunction(s) for diagram number 632 - FFV1_1( w_fp[2], w_fp[92], COUPs[1], cIPD[0], cIPD[1], w_fp[96] ); + FFV1_1( w_fp[2], w_fp[92], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[96] ); // Amplitude(s) for diagram number 632 - FFV1_0( w_fp[56], w_fp[96], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[56], w_fp[96], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 632 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -13174,7 +13174,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 633 - FFV1_0( w_fp[22], w_fp[96], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[22], w_fp[96], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 633 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -13188,7 +13188,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 634 - VVV1_0( w_fp[112], w_fp[103], w_fp[5], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[112], w_fp[103], w_fp[5], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 634 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -13208,7 +13208,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 635 - FFV1_0( w_fp[22], w_fp[2], w_fp[112], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[22], w_fp[2], w_fp[112], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 635 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -13224,7 +13224,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 636 - VVV1_0( w_fp[86], w_fp[103], w_fp[4], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[86], w_fp[103], w_fp[4], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 636 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -13244,7 +13244,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 637 - FFV1_0( w_fp[56], w_fp[2], w_fp[86], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[56], w_fp[2], w_fp[86], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 637 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -13260,7 +13260,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 638 - FFV1_0( w_fp[52], w_fp[2], w_fp[107], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[2], w_fp[107], COUPs[1], 1.0, &_fp[0] ); jamp_sv[21] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[23] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[61] += cxtype( 0, 1 ) * amp_sv[0]; @@ -13269,7 +13269,7 @@ namespace mg5amcCpu jamp_sv[88] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[99] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[101] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[52], w_fp[2], w_fp[95], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[2], w_fp[95], COUPs[1], 1.0, &_fp[0] ); jamp_sv[23] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[53] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[61] += cxtype( 0, 1 ) * amp_sv[0]; @@ -13278,7 +13278,7 @@ namespace mg5amcCpu jamp_sv[77] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[91] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[101] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[52], w_fp[2], w_fp[105], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[2], w_fp[105], COUPs[1], 1.0, &_fp[0] ); jamp_sv[21] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[53] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[67] += cxtype( 0, 1 ) * amp_sv[0]; @@ -13291,10 +13291,10 @@ namespace mg5amcCpu // *** DIAGRAM 639 OF 1240 *** // Wavefunction(s) for diagram number 639 - FFV1_2( w_fp[52], w_fp[92], COUPs[1], cIPD[0], cIPD[1], w_fp[104] ); + FFV1_2( w_fp[52], w_fp[92], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[104] ); // Amplitude(s) for diagram number 639 - FFV1_0( w_fp[104], w_fp[33], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[104], w_fp[33], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 639 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -13305,10 +13305,10 @@ namespace mg5amcCpu // *** DIAGRAM 640 OF 1240 *** // Wavefunction(s) for diagram number 640 - FFV1_1( w_fp[33], w_fp[92], COUPs[1], cIPD[0], cIPD[1], w_fp[114] ); + FFV1_1( w_fp[33], w_fp[92], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[114] ); // Amplitude(s) for diagram number 640 - FFV1_0( w_fp[52], w_fp[114], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[114], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 640 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -13322,7 +13322,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 641 - FFV1_0( w_fp[52], w_fp[33], w_fp[86], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[33], w_fp[86], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 641 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -13338,7 +13338,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 642 - FFV1_0( w_fp[104], w_fp[39], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[104], w_fp[39], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 642 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -13349,10 +13349,10 @@ namespace mg5amcCpu // *** DIAGRAM 643 OF 1240 *** // Wavefunction(s) for diagram number 643 - FFV1_1( w_fp[39], w_fp[92], COUPs[1], cIPD[0], cIPD[1], w_fp[106] ); + FFV1_1( w_fp[39], w_fp[92], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[106] ); // Amplitude(s) for diagram number 643 - FFV1_0( w_fp[52], w_fp[106], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[106], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 643 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -13366,7 +13366,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 644 - FFV1_0( w_fp[52], w_fp[39], w_fp[112], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[39], w_fp[112], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 644 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -13382,7 +13382,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 645 - FFV1_0( w_fp[104], w_fp[2], w_fp[24], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[104], w_fp[2], w_fp[24], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 645 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -13398,7 +13398,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 646 - FFV1_0( w_fp[52], w_fp[96], w_fp[24], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[96], w_fp[24], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 646 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -13414,7 +13414,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 647 - FFV1_0( w_fp[52], w_fp[2], w_fp[102], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[2], w_fp[102], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 647 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -13434,7 +13434,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 648 - FFV1_0( w_fp[65], w_fp[96], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[65], w_fp[96], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 648 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -13450,7 +13450,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 649 - FFV1_0( w_fp[3], w_fp[96], w_fp[63], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[96], w_fp[63], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 649 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -13470,7 +13470,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 650 - FFV1_0( w_fp[99], w_fp[93], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[93], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 650 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -13486,7 +13486,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 651 - FFV1_0( w_fp[99], w_fp[2], w_fp[63], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[2], w_fp[63], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 651 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -13506,7 +13506,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 652 - FFV1_0( w_fp[3], w_fp[93], w_fp[86], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[93], w_fp[86], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 652 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -13526,7 +13526,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 653 - FFV1_0( w_fp[65], w_fp[2], w_fp[86], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[65], w_fp[2], w_fp[86], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 653 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -13546,7 +13546,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 654 - VVVV1_0( w_fp[92], w_fp[61], w_fp[8], w_fp[5], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[92], w_fp[61], w_fp[8], w_fp[5], COUPs[2], 1.0, &_fp[0] ); jamp_sv[18] += amp_sv[0]; jamp_sv[20] -= amp_sv[0]; jamp_sv[31] -= amp_sv[0]; @@ -13563,7 +13563,7 @@ namespace mg5amcCpu jamp_sv[91] -= amp_sv[0]; jamp_sv[96] -= amp_sv[0]; jamp_sv[98] += amp_sv[0]; - VVVV3_0( w_fp[92], w_fp[61], w_fp[8], w_fp[5], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[92], w_fp[61], w_fp[8], w_fp[5], COUPs[2], 1.0, &_fp[0] ); jamp_sv[18] += amp_sv[0]; jamp_sv[20] -= amp_sv[0]; jamp_sv[22] -= amp_sv[0]; @@ -13580,7 +13580,7 @@ namespace mg5amcCpu jamp_sv[98] += amp_sv[0]; jamp_sv[100] += amp_sv[0]; jamp_sv[101] -= amp_sv[0]; - VVVV4_0( w_fp[92], w_fp[61], w_fp[8], w_fp[5], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[92], w_fp[61], w_fp[8], w_fp[5], COUPs[2], 1.0, &_fp[0] ); jamp_sv[22] -= amp_sv[0]; jamp_sv[23] += amp_sv[0]; jamp_sv[31] += amp_sv[0]; @@ -13601,10 +13601,10 @@ namespace mg5amcCpu // *** DIAGRAM 655 OF 1240 *** // Wavefunction(s) for diagram number 655 - VVV1P0_1( w_fp[92], w_fp[61], COUPs[0], 0., 0., w_fp[104] ); + VVV1P0_1( w_fp[92], w_fp[61], COUPs[0], 1.0, 0., 0., w_fp[104] ); // Amplitude(s) for diagram number 655 - VVV1_0( w_fp[8], w_fp[5], w_fp[104], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[5], w_fp[104], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 655 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -13629,10 +13629,10 @@ namespace mg5amcCpu // *** DIAGRAM 656 OF 1240 *** // Wavefunction(s) for diagram number 656 - VVV1P0_1( w_fp[92], w_fp[8], COUPs[0], 0., 0., w_fp[113] ); + VVV1P0_1( w_fp[92], w_fp[8], COUPs[0], 1.0, 0., 0., w_fp[113] ); // Amplitude(s) for diagram number 656 - VVV1_0( w_fp[61], w_fp[5], w_fp[113], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[61], w_fp[5], w_fp[113], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 656 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -13660,7 +13660,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 657 - VVV1_0( w_fp[61], w_fp[8], w_fp[86], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[61], w_fp[8], w_fp[86], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 657 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -13688,7 +13688,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 658 - FFV1_0( w_fp[3], w_fp[39], w_fp[104], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[39], w_fp[104], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 658 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -13708,7 +13708,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 659 - FFV1_0( w_fp[3], w_fp[106], w_fp[61], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[106], w_fp[61], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 659 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -13724,7 +13724,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 660 - FFV1_0( w_fp[99], w_fp[39], w_fp[61], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[39], w_fp[61], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 660 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -13740,7 +13740,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 661 - FFV1_0( w_fp[38], w_fp[2], w_fp[104], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[2], w_fp[104], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 661 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -13760,7 +13760,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 662 - FFV1_0( w_fp[38], w_fp[96], w_fp[61], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[96], w_fp[61], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 662 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -13776,7 +13776,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 663 - FFV1_0( w_fp[90], w_fp[2], w_fp[61], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[90], w_fp[2], w_fp[61], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 663 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -13792,7 +13792,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 664 - FFV1_0( w_fp[71], w_fp[96], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[71], w_fp[96], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 664 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -13808,7 +13808,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 665 - FFV1_0( w_fp[3], w_fp[96], w_fp[69], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[96], w_fp[69], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 665 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -13828,7 +13828,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 666 - FFV1_0( w_fp[99], w_fp[94], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[94], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 666 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -13844,7 +13844,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 667 - FFV1_0( w_fp[99], w_fp[2], w_fp[69], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[2], w_fp[69], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 667 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -13864,7 +13864,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 668 - FFV1_0( w_fp[3], w_fp[94], w_fp[112], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[94], w_fp[112], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 668 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -13884,7 +13884,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 669 - FFV1_0( w_fp[71], w_fp[2], w_fp[112], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[71], w_fp[2], w_fp[112], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 669 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -13904,7 +13904,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 670 - VVVV1_0( w_fp[92], w_fp[66], w_fp[8], w_fp[4], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[92], w_fp[66], w_fp[8], w_fp[4], COUPs[2], 1.0, &_fp[0] ); jamp_sv[19] += amp_sv[0]; jamp_sv[22] -= amp_sv[0]; jamp_sv[37] -= amp_sv[0]; @@ -13921,7 +13921,7 @@ namespace mg5amcCpu jamp_sv[82] -= amp_sv[0]; jamp_sv[97] -= amp_sv[0]; jamp_sv[100] += amp_sv[0]; - VVVV3_0( w_fp[92], w_fp[66], w_fp[8], w_fp[4], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[92], w_fp[66], w_fp[8], w_fp[4], COUPs[2], 1.0, &_fp[0] ); jamp_sv[19] += amp_sv[0]; jamp_sv[20] -= amp_sv[0]; jamp_sv[21] += amp_sv[0]; @@ -13938,7 +13938,7 @@ namespace mg5amcCpu jamp_sv[98] += amp_sv[0]; jamp_sv[99] -= amp_sv[0]; jamp_sv[100] += amp_sv[0]; - VVVV4_0( w_fp[92], w_fp[66], w_fp[8], w_fp[4], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[92], w_fp[66], w_fp[8], w_fp[4], COUPs[2], 1.0, &_fp[0] ); jamp_sv[20] -= amp_sv[0]; jamp_sv[21] += amp_sv[0]; jamp_sv[37] += amp_sv[0]; @@ -13959,10 +13959,10 @@ namespace mg5amcCpu // *** DIAGRAM 671 OF 1240 *** // Wavefunction(s) for diagram number 671 - VVV1P0_1( w_fp[92], w_fp[66], COUPs[0], 0., 0., w_fp[104] ); + VVV1P0_1( w_fp[92], w_fp[66], COUPs[0], 1.0, 0., 0., w_fp[104] ); // Amplitude(s) for diagram number 671 - VVV1_0( w_fp[8], w_fp[4], w_fp[104], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[4], w_fp[104], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 671 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -13990,7 +13990,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 672 - VVV1_0( w_fp[66], w_fp[4], w_fp[113], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[66], w_fp[4], w_fp[113], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 672 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -14018,7 +14018,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 673 - VVV1_0( w_fp[66], w_fp[8], w_fp[112], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[66], w_fp[8], w_fp[112], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 673 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -14046,7 +14046,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 674 - FFV1_0( w_fp[3], w_fp[33], w_fp[104], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[33], w_fp[104], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 674 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -14066,7 +14066,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 675 - FFV1_0( w_fp[3], w_fp[114], w_fp[66], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[114], w_fp[66], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 675 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -14082,7 +14082,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 676 - FFV1_0( w_fp[99], w_fp[33], w_fp[66], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[33], w_fp[66], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 676 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -14098,7 +14098,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 677 - FFV1_0( w_fp[46], w_fp[2], w_fp[104], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[2], w_fp[104], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 677 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -14118,7 +14118,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 678 - FFV1_0( w_fp[46], w_fp[96], w_fp[66], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[96], w_fp[66], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 678 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -14134,7 +14134,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 679 - FFV1_0( w_fp[88], w_fp[2], w_fp[66], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[88], w_fp[2], w_fp[66], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 679 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -14147,10 +14147,10 @@ namespace mg5amcCpu // *** DIAGRAM 680 OF 1240 *** // Wavefunction(s) for diagram number 680 - VVV1P0_1( w_fp[92], w_fp[1], COUPs[0], 0., 0., w_fp[104] ); + VVV1P0_1( w_fp[92], w_fp[1], COUPs[0], 1.0, 0., 0., w_fp[104] ); // Amplitude(s) for diagram number 680 - VVV1_0( w_fp[104], w_fp[13], w_fp[5], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[104], w_fp[13], w_fp[5], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 680 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -14178,7 +14178,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 681 - VVV1_0( w_fp[104], w_fp[10], w_fp[4], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[104], w_fp[10], w_fp[4], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 681 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -14206,7 +14206,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 682 - VVVV1_0( w_fp[8], w_fp[4], w_fp[5], w_fp[104], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[8], w_fp[4], w_fp[5], w_fp[104], COUPs[2], 1.0, &_fp[0] ); jamp_sv[19] -= amp_sv[0]; jamp_sv[29] += amp_sv[0]; jamp_sv[43] -= amp_sv[0]; @@ -14223,7 +14223,7 @@ namespace mg5amcCpu jamp_sv[82] += amp_sv[0]; jamp_sv[90] -= amp_sv[0]; jamp_sv[97] += amp_sv[0]; - VVVV3_0( w_fp[8], w_fp[4], w_fp[5], w_fp[104], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[8], w_fp[4], w_fp[5], w_fp[104], COUPs[2], 1.0, &_fp[0] ); jamp_sv[18] -= amp_sv[0]; jamp_sv[28] += amp_sv[0]; jamp_sv[42] -= amp_sv[0]; @@ -14240,7 +14240,7 @@ namespace mg5amcCpu jamp_sv[88] += amp_sv[0]; jamp_sv[90] -= amp_sv[0]; jamp_sv[96] += amp_sv[0]; - VVVV4_0( w_fp[8], w_fp[4], w_fp[5], w_fp[104], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[8], w_fp[4], w_fp[5], w_fp[104], COUPs[2], 1.0, &_fp[0] ); jamp_sv[18] -= amp_sv[0]; jamp_sv[19] += amp_sv[0]; jamp_sv[28] += amp_sv[0]; @@ -14264,7 +14264,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 683 - VVV1_0( w_fp[112], w_fp[108], w_fp[5], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[112], w_fp[108], w_fp[5], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 683 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -14292,7 +14292,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 684 - VVV1_0( w_fp[112], w_fp[1], w_fp[10], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[112], w_fp[1], w_fp[10], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 684 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -14320,7 +14320,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 685 - VVVV1_0( w_fp[1], w_fp[8], w_fp[5], w_fp[112], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[1], w_fp[8], w_fp[5], w_fp[112], COUPs[2], 1.0, &_fp[0] ); jamp_sv[21] += amp_sv[0]; jamp_sv[28] -= amp_sv[0]; jamp_sv[31] += amp_sv[0]; @@ -14337,7 +14337,7 @@ namespace mg5amcCpu jamp_sv[88] -= amp_sv[0]; jamp_sv[91] += amp_sv[0]; jamp_sv[99] -= amp_sv[0]; - VVVV3_0( w_fp[1], w_fp[8], w_fp[5], w_fp[112], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[1], w_fp[8], w_fp[5], w_fp[112], COUPs[2], 1.0, &_fp[0] ); jamp_sv[20] -= amp_sv[0]; jamp_sv[21] += amp_sv[0]; jamp_sv[37] += amp_sv[0]; @@ -14354,7 +14354,7 @@ namespace mg5amcCpu jamp_sv[82] += amp_sv[0]; jamp_sv[98] += amp_sv[0]; jamp_sv[99] -= amp_sv[0]; - VVVV4_0( w_fp[1], w_fp[8], w_fp[5], w_fp[112], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[1], w_fp[8], w_fp[5], w_fp[112], COUPs[2], 1.0, &_fp[0] ); jamp_sv[20] -= amp_sv[0]; jamp_sv[28] += amp_sv[0]; jamp_sv[31] -= amp_sv[0]; @@ -14378,7 +14378,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 686 - VVV1_0( w_fp[86], w_fp[108], w_fp[4], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[86], w_fp[108], w_fp[4], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 686 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -14406,7 +14406,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 687 - VVV1_0( w_fp[86], w_fp[1], w_fp[13], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[86], w_fp[1], w_fp[13], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 687 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -14434,7 +14434,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 688 - VVVV1_0( w_fp[1], w_fp[8], w_fp[4], w_fp[86], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[1], w_fp[8], w_fp[4], w_fp[86], COUPs[2], 1.0, &_fp[0] ); jamp_sv[23] += amp_sv[0]; jamp_sv[29] -= amp_sv[0]; jamp_sv[31] += amp_sv[0]; @@ -14451,7 +14451,7 @@ namespace mg5amcCpu jamp_sv[77] -= amp_sv[0]; jamp_sv[91] += amp_sv[0]; jamp_sv[101] -= amp_sv[0]; - VVVV3_0( w_fp[1], w_fp[8], w_fp[4], w_fp[86], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[1], w_fp[8], w_fp[4], w_fp[86], COUPs[2], 1.0, &_fp[0] ); jamp_sv[22] -= amp_sv[0]; jamp_sv[23] += amp_sv[0]; jamp_sv[31] += amp_sv[0]; @@ -14468,7 +14468,7 @@ namespace mg5amcCpu jamp_sv[91] += amp_sv[0]; jamp_sv[100] += amp_sv[0]; jamp_sv[101] -= amp_sv[0]; - VVVV4_0( w_fp[1], w_fp[8], w_fp[4], w_fp[86], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[1], w_fp[8], w_fp[4], w_fp[86], COUPs[2], 1.0, &_fp[0] ); jamp_sv[22] -= amp_sv[0]; jamp_sv[29] += amp_sv[0]; jamp_sv[37] -= amp_sv[0]; @@ -14489,12 +14489,12 @@ namespace mg5amcCpu // *** DIAGRAM 689 OF 1240 *** // Wavefunction(s) for diagram number 689 - VVVV1P0_1( w_fp[92], w_fp[1], w_fp[4], COUPs[2], 0., 0., w_fp[98] ); - VVVV3P0_1( w_fp[92], w_fp[1], w_fp[4], COUPs[2], 0., 0., w_fp[62] ); - VVVV4P0_1( w_fp[92], w_fp[1], w_fp[4], COUPs[2], 0., 0., w_fp[101] ); + VVVV1P0_1( w_fp[92], w_fp[1], w_fp[4], COUPs[2], 1.0, 0., 0., w_fp[98] ); + VVVV3P0_1( w_fp[92], w_fp[1], w_fp[4], COUPs[2], 1.0, 0., 0., w_fp[62] ); + VVVV4P0_1( w_fp[92], w_fp[1], w_fp[4], COUPs[2], 1.0, 0., 0., w_fp[101] ); // Amplitude(s) for diagram number 689 - VVV1_0( w_fp[8], w_fp[5], w_fp[98], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[5], w_fp[98], COUPs[0], 1.0, &_fp[0] ); jamp_sv[18] += amp_sv[0]; jamp_sv[20] -= amp_sv[0]; jamp_sv[31] -= amp_sv[0]; @@ -14511,7 +14511,7 @@ namespace mg5amcCpu jamp_sv[91] -= amp_sv[0]; jamp_sv[96] -= amp_sv[0]; jamp_sv[98] += amp_sv[0]; - VVV1_0( w_fp[8], w_fp[5], w_fp[62], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[5], w_fp[62], COUPs[0], 1.0, &_fp[0] ); jamp_sv[20] -= amp_sv[0]; jamp_sv[28] += amp_sv[0]; jamp_sv[31] -= amp_sv[0]; @@ -14528,7 +14528,7 @@ namespace mg5amcCpu jamp_sv[88] += amp_sv[0]; jamp_sv[91] -= amp_sv[0]; jamp_sv[98] += amp_sv[0]; - VVV1_0( w_fp[8], w_fp[5], w_fp[101], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[5], w_fp[101], COUPs[0], 1.0, &_fp[0] ); jamp_sv[18] -= amp_sv[0]; jamp_sv[28] += amp_sv[0]; jamp_sv[42] -= amp_sv[0]; @@ -14549,12 +14549,12 @@ namespace mg5amcCpu // *** DIAGRAM 690 OF 1240 *** // Wavefunction(s) for diagram number 690 - VVVV1P0_1( w_fp[92], w_fp[1], w_fp[5], COUPs[2], 0., 0., w_fp[109] ); - VVVV3P0_1( w_fp[92], w_fp[1], w_fp[5], COUPs[2], 0., 0., w_fp[110] ); - VVVV4P0_1( w_fp[92], w_fp[1], w_fp[5], COUPs[2], 0., 0., w_fp[111] ); + VVVV1P0_1( w_fp[92], w_fp[1], w_fp[5], COUPs[2], 1.0, 0., 0., w_fp[109] ); + VVVV3P0_1( w_fp[92], w_fp[1], w_fp[5], COUPs[2], 1.0, 0., 0., w_fp[110] ); + VVVV4P0_1( w_fp[92], w_fp[1], w_fp[5], COUPs[2], 1.0, 0., 0., w_fp[111] ); // Amplitude(s) for diagram number 690 - VVV1_0( w_fp[8], w_fp[4], w_fp[109], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[4], w_fp[109], COUPs[0], 1.0, &_fp[0] ); jamp_sv[19] += amp_sv[0]; jamp_sv[22] -= amp_sv[0]; jamp_sv[37] -= amp_sv[0]; @@ -14571,7 +14571,7 @@ namespace mg5amcCpu jamp_sv[82] -= amp_sv[0]; jamp_sv[97] -= amp_sv[0]; jamp_sv[100] += amp_sv[0]; - VVV1_0( w_fp[8], w_fp[4], w_fp[110], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[4], w_fp[110], COUPs[0], 1.0, &_fp[0] ); jamp_sv[22] -= amp_sv[0]; jamp_sv[29] += amp_sv[0]; jamp_sv[37] -= amp_sv[0]; @@ -14588,7 +14588,7 @@ namespace mg5amcCpu jamp_sv[76] += amp_sv[0]; jamp_sv[90] -= amp_sv[0]; jamp_sv[100] += amp_sv[0]; - VVV1_0( w_fp[8], w_fp[4], w_fp[111], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[4], w_fp[111], COUPs[0], 1.0, &_fp[0] ); jamp_sv[19] -= amp_sv[0]; jamp_sv[29] += amp_sv[0]; jamp_sv[43] -= amp_sv[0]; @@ -14612,7 +14612,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 691 - VVV1_0( w_fp[1], w_fp[8], w_fp[107], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[8], w_fp[107], COUPs[0], 1.0, &_fp[0] ); jamp_sv[21] -= amp_sv[0]; jamp_sv[23] += amp_sv[0]; jamp_sv[28] += amp_sv[0]; @@ -14629,7 +14629,7 @@ namespace mg5amcCpu jamp_sv[88] += amp_sv[0]; jamp_sv[99] += amp_sv[0]; jamp_sv[101] -= amp_sv[0]; - VVV1_0( w_fp[1], w_fp[8], w_fp[95], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[8], w_fp[95], COUPs[0], 1.0, &_fp[0] ); jamp_sv[23] += amp_sv[0]; jamp_sv[29] -= amp_sv[0]; jamp_sv[31] += amp_sv[0]; @@ -14646,7 +14646,7 @@ namespace mg5amcCpu jamp_sv[77] -= amp_sv[0]; jamp_sv[91] += amp_sv[0]; jamp_sv[101] -= amp_sv[0]; - VVV1_0( w_fp[1], w_fp[8], w_fp[105], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[8], w_fp[105], COUPs[0], 1.0, &_fp[0] ); jamp_sv[21] += amp_sv[0]; jamp_sv[28] -= amp_sv[0]; jamp_sv[31] += amp_sv[0]; @@ -14670,7 +14670,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 692 - VVVV1_0( w_fp[92], w_fp[1], w_fp[8], w_fp[24], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[92], w_fp[1], w_fp[8], w_fp[24], COUPs[2], 1.0, &_fp[0] ); jamp_sv[18] += amp_sv[0]; jamp_sv[19] -= amp_sv[0]; jamp_sv[28] -= amp_sv[0]; @@ -14687,7 +14687,7 @@ namespace mg5amcCpu jamp_sv[88] -= amp_sv[0]; jamp_sv[96] -= amp_sv[0]; jamp_sv[97] += amp_sv[0]; - VVVV3_0( w_fp[92], w_fp[1], w_fp[8], w_fp[24], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[92], w_fp[1], w_fp[8], w_fp[24], COUPs[2], 1.0, &_fp[0] ); jamp_sv[18] += amp_sv[0]; jamp_sv[19] -= amp_sv[0]; jamp_sv[21] -= amp_sv[0]; @@ -14704,7 +14704,7 @@ namespace mg5amcCpu jamp_sv[97] += amp_sv[0]; jamp_sv[99] += amp_sv[0]; jamp_sv[101] -= amp_sv[0]; - VVVV4_0( w_fp[92], w_fp[1], w_fp[8], w_fp[24], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[92], w_fp[1], w_fp[8], w_fp[24], COUPs[2], 1.0, &_fp[0] ); jamp_sv[21] -= amp_sv[0]; jamp_sv[23] += amp_sv[0]; jamp_sv[28] += amp_sv[0]; @@ -14728,7 +14728,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 693 - VVV1_0( w_fp[8], w_fp[24], w_fp[104], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[24], w_fp[104], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 693 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -14756,7 +14756,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 694 - VVV1_0( w_fp[1], w_fp[24], w_fp[113], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[24], w_fp[113], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 694 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -14784,7 +14784,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 695 - VVV1_0( w_fp[1], w_fp[8], w_fp[102], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[8], w_fp[102], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 695 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -14812,7 +14812,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 696 - VVV1_0( w_fp[104], w_fp[37], w_fp[5], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[104], w_fp[37], w_fp[5], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 696 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -14832,7 +14832,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 697 - FFV1_0( w_fp[3], w_fp[35], w_fp[104], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[35], w_fp[104], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 697 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -14848,7 +14848,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 698 - FFV1_0( w_fp[99], w_fp[100], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[100], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 698 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -14862,7 +14862,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 699 - FFV1_0( w_fp[99], w_fp[35], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[35], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 699 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -14876,7 +14876,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 700 - FFV1_0( w_fp[3], w_fp[100], w_fp[86], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[100], w_fp[86], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 700 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -14892,7 +14892,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 701 - VVV1_0( w_fp[86], w_fp[1], w_fp[37], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[86], w_fp[1], w_fp[37], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 701 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -14912,7 +14912,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 702 - FFV1_0( w_fp[3], w_fp[33], w_fp[109], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[33], w_fp[109], COUPs[1], 1.0, &_fp[0] ); jamp_sv[52] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[53] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[56] += cxtype( 0, 1 ) * amp_sv[0]; @@ -14921,7 +14921,7 @@ namespace mg5amcCpu jamp_sv[63] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[66] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[67] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[33], w_fp[110], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[33], w_fp[110], COUPs[1], 1.0, &_fp[0] ); jamp_sv[53] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[55] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[56] += cxtype( 0, 1 ) * amp_sv[0]; @@ -14930,7 +14930,7 @@ namespace mg5amcCpu jamp_sv[61] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[64] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[67] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[33], w_fp[111], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[33], w_fp[111], COUPs[1], 1.0, &_fp[0] ); jamp_sv[52] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[55] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[58] += cxtype( 0, 1 ) * amp_sv[0]; @@ -14946,7 +14946,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 703 - FFV1_0( w_fp[38], w_fp[33], w_fp[104], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[33], w_fp[104], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 703 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -14962,7 +14962,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 704 - FFV1_0( w_fp[38], w_fp[114], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[114], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 704 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -14976,7 +14976,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 705 - FFV1_0( w_fp[90], w_fp[33], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[90], w_fp[33], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 705 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -14990,7 +14990,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 706 - VVV1_0( w_fp[104], w_fp[45], w_fp[4], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[104], w_fp[45], w_fp[4], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 706 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -15010,7 +15010,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 707 - FFV1_0( w_fp[3], w_fp[43], w_fp[104], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[43], w_fp[104], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 707 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -15026,7 +15026,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 708 - FFV1_0( w_fp[99], w_fp[89], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[89], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 708 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -15040,7 +15040,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 709 - FFV1_0( w_fp[99], w_fp[43], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[43], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 709 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -15054,7 +15054,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 710 - FFV1_0( w_fp[3], w_fp[89], w_fp[112], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[89], w_fp[112], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 710 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -15070,7 +15070,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 711 - VVV1_0( w_fp[112], w_fp[1], w_fp[45], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[112], w_fp[1], w_fp[45], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 711 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -15090,7 +15090,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 712 - FFV1_0( w_fp[3], w_fp[39], w_fp[98], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[39], w_fp[98], COUPs[1], 1.0, &_fp[0] ); jamp_sv[76] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[77] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[80] += cxtype( 0, 1 ) * amp_sv[0]; @@ -15099,7 +15099,7 @@ namespace mg5amcCpu jamp_sv[87] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[90] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[91] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[39], w_fp[62], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[39], w_fp[62], COUPs[1], 1.0, &_fp[0] ); jamp_sv[77] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[79] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[80] += cxtype( 0, 1 ) * amp_sv[0]; @@ -15108,7 +15108,7 @@ namespace mg5amcCpu jamp_sv[85] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[88] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[91] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[39], w_fp[101], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[39], w_fp[101], COUPs[1], 1.0, &_fp[0] ); jamp_sv[76] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[79] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[82] += cxtype( 0, 1 ) * amp_sv[0]; @@ -15124,7 +15124,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 713 - FFV1_0( w_fp[46], w_fp[39], w_fp[104], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[39], w_fp[104], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 713 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -15140,7 +15140,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 714 - FFV1_0( w_fp[46], w_fp[106], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[106], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 714 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -15154,7 +15154,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 715 - FFV1_0( w_fp[88], w_fp[39], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[88], w_fp[39], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 715 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -15168,7 +15168,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 716 - VVV1_0( w_fp[104], w_fp[54], w_fp[5], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[104], w_fp[54], w_fp[5], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 716 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -15188,7 +15188,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 717 - FFV1_0( w_fp[7], w_fp[2], w_fp[104], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[7], w_fp[2], w_fp[104], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 717 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -15204,7 +15204,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 718 - FFV1_0( w_fp[78], w_fp[96], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[78], w_fp[96], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 718 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -15218,7 +15218,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 719 - FFV1_0( w_fp[7], w_fp[96], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[7], w_fp[96], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 719 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -15232,7 +15232,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 720 - FFV1_0( w_fp[78], w_fp[2], w_fp[86], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[78], w_fp[2], w_fp[86], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 720 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -15248,7 +15248,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 721 - VVV1_0( w_fp[86], w_fp[1], w_fp[54], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[86], w_fp[1], w_fp[54], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 721 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -15268,7 +15268,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 722 - FFV1_0( w_fp[46], w_fp[2], w_fp[109], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[2], w_fp[109], COUPs[1], 1.0, &_fp[0] ); jamp_sv[19] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[22] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[37] += cxtype( 0, 1 ) * amp_sv[0]; @@ -15277,7 +15277,7 @@ namespace mg5amcCpu jamp_sv[82] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[97] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[100] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[46], w_fp[2], w_fp[110], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[2], w_fp[110], COUPs[1], 1.0, &_fp[0] ); jamp_sv[22] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[29] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[37] += cxtype( 0, 1 ) * amp_sv[0]; @@ -15286,7 +15286,7 @@ namespace mg5amcCpu jamp_sv[76] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[90] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[100] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[46], w_fp[2], w_fp[111], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[2], w_fp[111], COUPs[1], 1.0, &_fp[0] ); jamp_sv[19] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[29] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[43] += cxtype( 0, 1 ) * amp_sv[0]; @@ -15302,7 +15302,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 723 - VVV1_0( w_fp[104], w_fp[23], w_fp[4], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[104], w_fp[23], w_fp[4], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 723 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -15322,7 +15322,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 724 - FFV1_0( w_fp[25], w_fp[2], w_fp[104], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[25], w_fp[2], w_fp[104], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 724 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -15338,7 +15338,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 725 - FFV1_0( w_fp[58], w_fp[96], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[58], w_fp[96], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 725 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -15352,7 +15352,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 726 - FFV1_0( w_fp[25], w_fp[96], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[25], w_fp[96], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 726 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -15366,7 +15366,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 727 - FFV1_0( w_fp[58], w_fp[2], w_fp[112], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[58], w_fp[2], w_fp[112], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 727 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -15382,7 +15382,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 728 - VVV1_0( w_fp[112], w_fp[1], w_fp[23], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[112], w_fp[1], w_fp[23], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 728 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -15402,7 +15402,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 729 - FFV1_0( w_fp[38], w_fp[2], w_fp[98], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[2], w_fp[98], COUPs[1], 1.0, &_fp[0] ); jamp_sv[18] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[20] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[31] += cxtype( 0, 1 ) * amp_sv[0]; @@ -15411,7 +15411,7 @@ namespace mg5amcCpu jamp_sv[58] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[96] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[98] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[38], w_fp[2], w_fp[62], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[2], w_fp[62], COUPs[1], 1.0, &_fp[0] ); jamp_sv[20] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[28] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[31] += cxtype( 0, 1 ) * amp_sv[0]; @@ -15420,7 +15420,7 @@ namespace mg5amcCpu jamp_sv[52] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[66] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[98] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[38], w_fp[2], w_fp[101], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[2], w_fp[101], COUPs[1], 1.0, &_fp[0] ); jamp_sv[18] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[28] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[42] += cxtype( 0, 1 ) * amp_sv[0]; @@ -15436,7 +15436,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 730 - FFV1_0( w_fp[3], w_fp[17], w_fp[104], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[17], w_fp[104], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 730 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -15456,7 +15456,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 731 - FFV1_0( w_fp[26], w_fp[2], w_fp[104], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[26], w_fp[2], w_fp[104], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 731 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -15476,7 +15476,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 732 - FFV1_0( w_fp[3], w_fp[96], w_fp[59], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[96], w_fp[59], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 732 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -15496,7 +15496,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 733 - FFV1_0( w_fp[26], w_fp[96], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[26], w_fp[96], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 733 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -15512,7 +15512,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 734 - FFV1_0( w_fp[99], w_fp[2], w_fp[59], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[2], w_fp[59], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 734 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -15532,7 +15532,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 735 - FFV1_0( w_fp[99], w_fp[17], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[17], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 735 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -15548,7 +15548,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 736 - FFV1_0( w_fp[3], w_fp[96], w_fp[73], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[96], w_fp[73], COUPs[1], 1.0, &_fp[0] ); jamp_sv[18] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[19] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[21] += cxtype( 0, 1 ) * amp_sv[0]; @@ -15557,7 +15557,7 @@ namespace mg5amcCpu jamp_sv[97] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[99] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[101] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[96], w_fp[79], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[96], w_fp[79], COUPs[1], 1.0, &_fp[0] ); jamp_sv[19] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[20] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[21] += cxtype( 0, 1 ) * amp_sv[0]; @@ -15566,7 +15566,7 @@ namespace mg5amcCpu jamp_sv[98] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[99] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[100] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[96], w_fp[80], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[96], w_fp[80], COUPs[1], 1.0, &_fp[0] ); jamp_sv[18] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[20] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[22] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -15582,7 +15582,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 737 - FFV1_0( w_fp[99], w_fp[2], w_fp[73], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[2], w_fp[73], COUPs[1], 1.0, &_fp[0] ); jamp_sv[32] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[33] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[38] += cxtype( 0, 1 ) * amp_sv[0]; @@ -15591,7 +15591,7 @@ namespace mg5amcCpu jamp_sv[63] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[86] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[87] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[99], w_fp[2], w_fp[79], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[2], w_fp[79], COUPs[1], 1.0, &_fp[0] ); jamp_sv[38] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[39] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[56] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -15600,7 +15600,7 @@ namespace mg5amcCpu jamp_sv[63] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[80] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[81] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[99], w_fp[2], w_fp[80], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[2], w_fp[80], COUPs[1], 1.0, &_fp[0] ); jamp_sv[32] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[33] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[56] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -15616,7 +15616,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 738 - VVV1_0( w_fp[92], w_fp[73], w_fp[8], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[92], w_fp[73], w_fp[8], COUPs[0], 1.0, &_fp[0] ); jamp_sv[18] -= amp_sv[0]; jamp_sv[19] += amp_sv[0]; jamp_sv[21] += amp_sv[0]; @@ -15633,7 +15633,7 @@ namespace mg5amcCpu jamp_sv[97] -= amp_sv[0]; jamp_sv[99] -= amp_sv[0]; jamp_sv[101] += amp_sv[0]; - VVV1_0( w_fp[92], w_fp[79], w_fp[8], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[92], w_fp[79], w_fp[8], COUPs[0], 1.0, &_fp[0] ); jamp_sv[19] += amp_sv[0]; jamp_sv[20] -= amp_sv[0]; jamp_sv[21] += amp_sv[0]; @@ -15650,7 +15650,7 @@ namespace mg5amcCpu jamp_sv[98] += amp_sv[0]; jamp_sv[99] -= amp_sv[0]; jamp_sv[100] += amp_sv[0]; - VVV1_0( w_fp[92], w_fp[80], w_fp[8], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[92], w_fp[80], w_fp[8], COUPs[0], 1.0, &_fp[0] ); jamp_sv[18] += amp_sv[0]; jamp_sv[20] -= amp_sv[0]; jamp_sv[22] -= amp_sv[0]; @@ -15671,10 +15671,10 @@ namespace mg5amcCpu // *** DIAGRAM 739 OF 1240 *** // Wavefunction(s) for diagram number 739 - FFV1_1( w_fp[77], w_fp[0], COUPs[1], cIPD[0], cIPD[1], w_fp[92] ); + FFV1_1( w_fp[77], w_fp[0], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[92] ); // Amplitude(s) for diagram number 739 - FFV1_0( w_fp[7], w_fp[92], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[7], w_fp[92], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 739 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -15687,7 +15687,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 740 - FFV1_0( w_fp[53], w_fp[92], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[53], w_fp[92], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 740 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -15697,10 +15697,10 @@ namespace mg5amcCpu // *** DIAGRAM 741 OF 1240 *** // Wavefunction(s) for diagram number 741 - FFV1_2( w_fp[46], w_fp[0], COUPs[1], cIPD[0], cIPD[1], w_fp[99] ); + FFV1_2( w_fp[46], w_fp[0], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[99] ); // Amplitude(s) for diagram number 741 - FFV1_0( w_fp[99], w_fp[9], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[9], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 741 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -15713,7 +15713,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 742 - FFV1_0( w_fp[99], w_fp[85], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[85], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 742 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -15726,7 +15726,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 743 - FFV1_0( w_fp[53], w_fp[9], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[53], w_fp[9], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 743 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -15739,7 +15739,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 744 - FFV1_0( w_fp[7], w_fp[85], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[7], w_fp[85], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 744 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -15752,7 +15752,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 745 - FFV1_0( w_fp[46], w_fp[92], w_fp[29], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[92], w_fp[29], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 745 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -15766,7 +15766,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 746 - FFV1_0( w_fp[99], w_fp[77], w_fp[29], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[77], w_fp[29], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 746 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -15777,10 +15777,10 @@ namespace mg5amcCpu // *** DIAGRAM 747 OF 1240 *** // Wavefunction(s) for diagram number 747 - VVV1P0_1( w_fp[0], w_fp[29], COUPs[0], 0., 0., w_fp[96] ); + VVV1P0_1( w_fp[0], w_fp[29], COUPs[0], 1.0, 0., 0., w_fp[96] ); // Amplitude(s) for diagram number 747 - FFV1_0( w_fp[46], w_fp[77], w_fp[96], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[77], w_fp[96], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 747 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -15796,7 +15796,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 748 - FFV1_0( w_fp[25], w_fp[92], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[25], w_fp[92], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 748 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -15809,7 +15809,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 749 - FFV1_0( w_fp[48], w_fp[92], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[48], w_fp[92], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 749 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -15819,10 +15819,10 @@ namespace mg5amcCpu // *** DIAGRAM 750 OF 1240 *** // Wavefunction(s) for diagram number 750 - FFV1_2( w_fp[38], w_fp[0], COUPs[1], cIPD[0], cIPD[1], w_fp[104] ); + FFV1_2( w_fp[38], w_fp[0], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[104] ); // Amplitude(s) for diagram number 750 - FFV1_0( w_fp[104], w_fp[87], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[104], w_fp[87], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 750 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -15835,7 +15835,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 751 - FFV1_0( w_fp[104], w_fp[85], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[104], w_fp[85], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 751 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -15848,7 +15848,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 752 - FFV1_0( w_fp[48], w_fp[87], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[48], w_fp[87], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 752 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -15861,7 +15861,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 753 - FFV1_0( w_fp[25], w_fp[85], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[25], w_fp[85], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 753 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -15874,7 +15874,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 754 - FFV1_0( w_fp[38], w_fp[92], w_fp[27], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[92], w_fp[27], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 754 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -15888,7 +15888,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 755 - FFV1_0( w_fp[104], w_fp[77], w_fp[27], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[104], w_fp[77], w_fp[27], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 755 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -15899,10 +15899,10 @@ namespace mg5amcCpu // *** DIAGRAM 756 OF 1240 *** // Wavefunction(s) for diagram number 756 - VVV1P0_1( w_fp[0], w_fp[27], COUPs[0], 0., 0., w_fp[101] ); + VVV1P0_1( w_fp[0], w_fp[27], COUPs[0], 1.0, 0., 0., w_fp[101] ); // Amplitude(s) for diagram number 756 - FFV1_0( w_fp[38], w_fp[77], w_fp[101], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[77], w_fp[101], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 756 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -15918,7 +15918,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 757 - FFV1_0( w_fp[28], w_fp[92], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[28], w_fp[92], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 757 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -15931,7 +15931,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 758 - FFV1_0( w_fp[40], w_fp[92], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[40], w_fp[92], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 758 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -15941,10 +15941,10 @@ namespace mg5amcCpu // *** DIAGRAM 759 OF 1240 *** // Wavefunction(s) for diagram number 759 - FFV1_2( w_fp[41], w_fp[0], COUPs[1], cIPD[0], cIPD[1], w_fp[62] ); + FFV1_2( w_fp[41], w_fp[0], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[62] ); // Amplitude(s) for diagram number 759 - FFV1_0( w_fp[62], w_fp[87], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[62], w_fp[87], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 759 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -15957,7 +15957,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 760 - FFV1_0( w_fp[62], w_fp[9], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[62], w_fp[9], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 760 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -15970,7 +15970,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 761 - FFV1_0( w_fp[40], w_fp[87], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[40], w_fp[87], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 761 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -15983,7 +15983,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 762 - FFV1_0( w_fp[28], w_fp[9], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[28], w_fp[9], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 762 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -15996,7 +15996,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 763 - FFV1_0( w_fp[41], w_fp[92], w_fp[24], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[92], w_fp[24], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 763 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -16010,7 +16010,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 764 - FFV1_0( w_fp[62], w_fp[77], w_fp[24], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[62], w_fp[77], w_fp[24], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 764 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -16021,10 +16021,10 @@ namespace mg5amcCpu // *** DIAGRAM 765 OF 1240 *** // Wavefunction(s) for diagram number 765 - VVV1P0_1( w_fp[0], w_fp[24], COUPs[0], 0., 0., w_fp[98] ); + VVV1P0_1( w_fp[0], w_fp[24], COUPs[0], 1.0, 0., 0., w_fp[98] ); // Amplitude(s) for diagram number 765 - FFV1_0( w_fp[41], w_fp[77], w_fp[98], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[77], w_fp[98], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 765 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -16040,7 +16040,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 766 - FFV1_0( w_fp[26], w_fp[92], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[26], w_fp[92], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 766 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -16054,7 +16054,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 767 - FFV1_0( w_fp[3], w_fp[92], w_fp[42], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[92], w_fp[42], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 767 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -16070,7 +16070,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 768 - VVV1_0( w_fp[98], w_fp[34], w_fp[6], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[98], w_fp[34], w_fp[6], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 768 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -16090,7 +16090,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 769 - FFV1_0( w_fp[3], w_fp[85], w_fp[98], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[85], w_fp[98], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 769 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -16106,7 +16106,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 770 - VVV1_0( w_fp[0], w_fp[34], w_fp[42], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[0], w_fp[34], w_fp[42], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 770 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -16126,7 +16126,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 771 - FFV1_0( w_fp[26], w_fp[85], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[26], w_fp[85], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 771 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -16137,12 +16137,12 @@ namespace mg5amcCpu // *** DIAGRAM 772 OF 1240 *** // Wavefunction(s) for diagram number 772 - VVVV1P0_1( w_fp[0], w_fp[24], w_fp[6], COUPs[2], 0., 0., w_fp[85] ); - VVVV3P0_1( w_fp[0], w_fp[24], w_fp[6], COUPs[2], 0., 0., w_fp[112] ); - VVVV4P0_1( w_fp[0], w_fp[24], w_fp[6], COUPs[2], 0., 0., w_fp[111] ); + VVVV1P0_1( w_fp[0], w_fp[24], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[85] ); + VVVV3P0_1( w_fp[0], w_fp[24], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[112] ); + VVVV4P0_1( w_fp[0], w_fp[24], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[111] ); // Amplitude(s) for diagram number 772 - FFV1_0( w_fp[3], w_fp[77], w_fp[85], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[77], w_fp[85], COUPs[1], 1.0, &_fp[0] ); jamp_sv[24] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[26] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[28] += cxtype( 0, 1 ) * amp_sv[0]; @@ -16151,7 +16151,7 @@ namespace mg5amcCpu jamp_sv[39] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[45] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[47] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[77], w_fp[112], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[77], w_fp[112], COUPs[1], 1.0, &_fp[0] ); jamp_sv[28] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[29] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[32] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -16160,7 +16160,7 @@ namespace mg5amcCpu jamp_sv[39] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[42] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[43] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[77], w_fp[111], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[77], w_fp[111], COUPs[1], 1.0, &_fp[0] ); jamp_sv[24] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[26] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[32] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -16176,7 +16176,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 773 - FFV1_0( w_fp[14], w_fp[92], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[14], w_fp[92], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 773 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -16190,7 +16190,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 774 - FFV1_0( w_fp[3], w_fp[92], w_fp[16], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[92], w_fp[16], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 774 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -16206,7 +16206,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 775 - VVV1_0( w_fp[101], w_fp[34], w_fp[5], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[101], w_fp[34], w_fp[5], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 775 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -16226,7 +16226,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 776 - FFV1_0( w_fp[3], w_fp[9], w_fp[101], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[9], w_fp[101], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 776 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -16242,7 +16242,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 777 - VVV1_0( w_fp[0], w_fp[34], w_fp[16], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[0], w_fp[34], w_fp[16], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 777 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -16262,7 +16262,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 778 - FFV1_0( w_fp[14], w_fp[9], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[14], w_fp[9], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 778 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -16273,12 +16273,12 @@ namespace mg5amcCpu // *** DIAGRAM 779 OF 1240 *** // Wavefunction(s) for diagram number 779 - VVVV1P0_1( w_fp[0], w_fp[27], w_fp[5], COUPs[2], 0., 0., w_fp[9] ); - VVVV3P0_1( w_fp[0], w_fp[27], w_fp[5], COUPs[2], 0., 0., w_fp[110] ); - VVVV4P0_1( w_fp[0], w_fp[27], w_fp[5], COUPs[2], 0., 0., w_fp[109] ); + VVVV1P0_1( w_fp[0], w_fp[27], w_fp[5], COUPs[2], 1.0, 0., 0., w_fp[9] ); + VVVV3P0_1( w_fp[0], w_fp[27], w_fp[5], COUPs[2], 1.0, 0., 0., w_fp[110] ); + VVVV4P0_1( w_fp[0], w_fp[27], w_fp[5], COUPs[2], 1.0, 0., 0., w_fp[109] ); // Amplitude(s) for diagram number 779 - FFV1_0( w_fp[3], w_fp[77], w_fp[9], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[77], w_fp[9], COUPs[1], 1.0, &_fp[0] ); jamp_sv[25] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[26] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[27] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -16287,7 +16287,7 @@ namespace mg5amcCpu jamp_sv[39] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[41] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[45] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[77], w_fp[110], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[77], w_fp[110], COUPs[1], 1.0, &_fp[0] ); jamp_sv[26] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[27] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[34] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -16296,7 +16296,7 @@ namespace mg5amcCpu jamp_sv[37] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[44] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[45] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[77], w_fp[109], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[77], w_fp[109], COUPs[1], 1.0, &_fp[0] ); jamp_sv[25] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[28] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[34] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -16312,7 +16312,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 780 - FFV1_0( w_fp[12], w_fp[92], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[12], w_fp[92], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 780 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -16326,7 +16326,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 781 - FFV1_0( w_fp[3], w_fp[92], w_fp[19], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[92], w_fp[19], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 781 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -16342,7 +16342,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 782 - VVV1_0( w_fp[96], w_fp[34], w_fp[4], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[96], w_fp[34], w_fp[4], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 782 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -16362,7 +16362,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 783 - FFV1_0( w_fp[3], w_fp[87], w_fp[96], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[87], w_fp[96], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 783 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -16378,7 +16378,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 784 - VVV1_0( w_fp[0], w_fp[34], w_fp[19], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[0], w_fp[34], w_fp[19], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 784 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -16398,7 +16398,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 785 - FFV1_0( w_fp[12], w_fp[87], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[12], w_fp[87], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 785 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -16409,12 +16409,12 @@ namespace mg5amcCpu // *** DIAGRAM 786 OF 1240 *** // Wavefunction(s) for diagram number 786 - VVVV1P0_1( w_fp[0], w_fp[4], w_fp[29], COUPs[2], 0., 0., w_fp[87] ); - VVVV3P0_1( w_fp[0], w_fp[4], w_fp[29], COUPs[2], 0., 0., w_fp[34] ); - VVVV4P0_1( w_fp[0], w_fp[4], w_fp[29], COUPs[2], 0., 0., w_fp[86] ); + VVVV1P0_1( w_fp[0], w_fp[4], w_fp[29], COUPs[2], 1.0, 0., 0., w_fp[87] ); + VVVV3P0_1( w_fp[0], w_fp[4], w_fp[29], COUPs[2], 1.0, 0., 0., w_fp[34] ); + VVVV4P0_1( w_fp[0], w_fp[4], w_fp[29], COUPs[2], 1.0, 0., 0., w_fp[86] ); // Amplitude(s) for diagram number 786 - FFV1_0( w_fp[3], w_fp[77], w_fp[87], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[77], w_fp[87], COUPs[1], 1.0, &_fp[0] ); jamp_sv[24] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[25] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[27] += cxtype( 0, 1 ) * amp_sv[0]; @@ -16423,7 +16423,7 @@ namespace mg5amcCpu jamp_sv[35] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[41] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[47] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[77], w_fp[34], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[77], w_fp[34], COUPs[1], 1.0, &_fp[0] ); jamp_sv[27] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[29] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[30] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -16432,7 +16432,7 @@ namespace mg5amcCpu jamp_sv[35] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[40] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[46] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[77], w_fp[86], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[77], w_fp[86], COUPs[1], 1.0, &_fp[0] ); jamp_sv[24] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[25] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[30] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -16448,17 +16448,17 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 787 - FFV1_0( w_fp[3], w_fp[92], w_fp[30], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[92], w_fp[30], COUPs[1], 1.0, &_fp[0] ); jamp_sv[24] += amp_sv[0]; jamp_sv[25] -= amp_sv[0]; jamp_sv[27] -= amp_sv[0]; jamp_sv[29] += amp_sv[0]; - FFV1_0( w_fp[3], w_fp[92], w_fp[31], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[92], w_fp[31], COUPs[1], 1.0, &_fp[0] ); jamp_sv[25] -= amp_sv[0]; jamp_sv[26] += amp_sv[0]; jamp_sv[27] -= amp_sv[0]; jamp_sv[28] += amp_sv[0]; - FFV1_0( w_fp[3], w_fp[92], w_fp[32], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[92], w_fp[32], COUPs[1], 1.0, &_fp[0] ); jamp_sv[24] -= amp_sv[0]; jamp_sv[26] += amp_sv[0]; jamp_sv[28] += amp_sv[0]; @@ -16467,12 +16467,12 @@ namespace mg5amcCpu // *** DIAGRAM 788 OF 1240 *** // Wavefunction(s) for diagram number 788 - VVV1P0_1( w_fp[0], w_fp[30], COUPs[0], 0., 0., w_fp[92] ); - VVV1P0_1( w_fp[0], w_fp[31], COUPs[0], 0., 0., w_fp[88] ); - VVV1P0_1( w_fp[0], w_fp[32], COUPs[0], 0., 0., w_fp[106] ); + VVV1P0_1( w_fp[0], w_fp[30], COUPs[0], 1.0, 0., 0., w_fp[92] ); + VVV1P0_1( w_fp[0], w_fp[31], COUPs[0], 1.0, 0., 0., w_fp[88] ); + VVV1P0_1( w_fp[0], w_fp[32], COUPs[0], 1.0, 0., 0., w_fp[106] ); // Amplitude(s) for diagram number 788 - FFV1_0( w_fp[3], w_fp[77], w_fp[92], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[77], w_fp[92], COUPs[1], 1.0, &_fp[0] ); jamp_sv[24] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[25] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[27] += cxtype( 0, 1 ) * amp_sv[0]; @@ -16481,7 +16481,7 @@ namespace mg5amcCpu jamp_sv[35] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[41] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[47] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[77], w_fp[88], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[77], w_fp[88], COUPs[1], 1.0, &_fp[0] ); jamp_sv[25] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[26] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[27] += cxtype( 0, 1 ) * amp_sv[0]; @@ -16490,7 +16490,7 @@ namespace mg5amcCpu jamp_sv[39] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[41] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[45] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[77], w_fp[106], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[77], w_fp[106], COUPs[1], 1.0, &_fp[0] ); jamp_sv[24] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[26] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[28] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -16503,10 +16503,10 @@ namespace mg5amcCpu // *** DIAGRAM 789 OF 1240 *** // Wavefunction(s) for diagram number 789 - FFV1_2( w_fp[52], w_fp[0], COUPs[1], cIPD[0], cIPD[1], w_fp[90] ); + FFV1_2( w_fp[52], w_fp[0], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[90] ); // Amplitude(s) for diagram number 789 - FFV1_0( w_fp[90], w_fp[35], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[90], w_fp[35], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 789 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -16519,7 +16519,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 790 - FFV1_0( w_fp[90], w_fp[36], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[90], w_fp[36], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 790 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -16529,10 +16529,10 @@ namespace mg5amcCpu // *** DIAGRAM 791 OF 1240 *** // Wavefunction(s) for diagram number 791 - FFV1_1( w_fp[33], w_fp[0], COUPs[1], cIPD[0], cIPD[1], w_fp[114] ); + FFV1_1( w_fp[33], w_fp[0], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[114] ); // Amplitude(s) for diagram number 791 - FFV1_0( w_fp[22], w_fp[114], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[22], w_fp[114], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 791 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -16545,7 +16545,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 792 - FFV1_0( w_fp[21], w_fp[114], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[21], w_fp[114], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 792 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -16558,7 +16558,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 793 - FFV1_0( w_fp[22], w_fp[36], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[22], w_fp[36], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 793 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -16571,7 +16571,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 794 - FFV1_0( w_fp[21], w_fp[35], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[21], w_fp[35], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 794 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -16584,7 +16584,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 795 - FFV1_0( w_fp[90], w_fp[33], w_fp[29], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[90], w_fp[33], w_fp[29], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 795 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -16598,7 +16598,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 796 - FFV1_0( w_fp[52], w_fp[114], w_fp[29], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[114], w_fp[29], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 796 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -16612,7 +16612,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 797 - FFV1_0( w_fp[52], w_fp[33], w_fp[96], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[33], w_fp[96], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 797 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -16628,7 +16628,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 798 - FFV1_0( w_fp[90], w_fp[43], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[90], w_fp[43], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 798 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -16641,7 +16641,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 799 - FFV1_0( w_fp[90], w_fp[44], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[90], w_fp[44], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 799 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -16651,10 +16651,10 @@ namespace mg5amcCpu // *** DIAGRAM 800 OF 1240 *** // Wavefunction(s) for diagram number 800 - FFV1_1( w_fp[39], w_fp[0], COUPs[1], cIPD[0], cIPD[1], w_fp[102] ); + FFV1_1( w_fp[39], w_fp[0], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[102] ); // Amplitude(s) for diagram number 800 - FFV1_0( w_fp[56], w_fp[102], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[56], w_fp[102], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 800 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -16667,7 +16667,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 801 - FFV1_0( w_fp[21], w_fp[102], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[21], w_fp[102], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 801 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -16680,7 +16680,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 802 - FFV1_0( w_fp[56], w_fp[44], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[56], w_fp[44], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 802 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -16693,7 +16693,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 803 - FFV1_0( w_fp[21], w_fp[43], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[21], w_fp[43], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 803 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -16706,7 +16706,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 804 - FFV1_0( w_fp[90], w_fp[39], w_fp[27], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[90], w_fp[39], w_fp[27], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 804 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -16720,7 +16720,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 805 - FFV1_0( w_fp[52], w_fp[102], w_fp[27], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[102], w_fp[27], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 805 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -16734,7 +16734,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 806 - FFV1_0( w_fp[52], w_fp[39], w_fp[101], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[39], w_fp[101], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 806 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -16750,7 +16750,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 807 - FFV1_0( w_fp[90], w_fp[49], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[90], w_fp[49], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 807 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -16763,7 +16763,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 808 - FFV1_0( w_fp[90], w_fp[50], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[90], w_fp[50], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 808 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -16773,10 +16773,10 @@ namespace mg5amcCpu // *** DIAGRAM 809 OF 1240 *** // Wavefunction(s) for diagram number 809 - FFV1_1( w_fp[47], w_fp[0], COUPs[1], cIPD[0], cIPD[1], w_fp[113] ); + FFV1_1( w_fp[47], w_fp[0], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[113] ); // Amplitude(s) for diagram number 809 - FFV1_0( w_fp[56], w_fp[113], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[56], w_fp[113], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 809 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -16789,7 +16789,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 810 - FFV1_0( w_fp[22], w_fp[113], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[22], w_fp[113], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 810 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -16802,7 +16802,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 811 - FFV1_0( w_fp[56], w_fp[50], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[56], w_fp[50], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 811 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -16815,7 +16815,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 812 - FFV1_0( w_fp[22], w_fp[49], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[22], w_fp[49], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 812 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -16828,7 +16828,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 813 - FFV1_0( w_fp[90], w_fp[47], w_fp[24], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[90], w_fp[47], w_fp[24], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 813 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -16842,7 +16842,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 814 - FFV1_0( w_fp[52], w_fp[113], w_fp[24], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[113], w_fp[24], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 814 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -16856,7 +16856,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 815 - FFV1_0( w_fp[52], w_fp[47], w_fp[98], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[47], w_fp[98], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 815 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -16872,7 +16872,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 816 - FFV1_0( w_fp[90], w_fp[17], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[90], w_fp[17], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 816 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -16886,7 +16886,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 817 - FFV1_0( w_fp[90], w_fp[2], w_fp[42], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[90], w_fp[2], w_fp[42], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 817 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -16902,7 +16902,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 818 - VVV1_0( w_fp[98], w_fp[103], w_fp[6], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[98], w_fp[103], w_fp[6], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 818 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -16922,7 +16922,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 819 - FFV1_0( w_fp[21], w_fp[2], w_fp[98], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[21], w_fp[2], w_fp[98], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 819 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -16938,7 +16938,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 820 - VVV1_0( w_fp[0], w_fp[103], w_fp[42], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[0], w_fp[103], w_fp[42], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 820 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -16958,7 +16958,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 821 - FFV1_0( w_fp[21], w_fp[17], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[21], w_fp[17], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 821 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -16972,7 +16972,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 822 - FFV1_0( w_fp[52], w_fp[2], w_fp[85], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[2], w_fp[85], COUPs[1], 1.0, &_fp[0] ); jamp_sv[9] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[15] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[21] += cxtype( 0, 1 ) * amp_sv[0]; @@ -16981,7 +16981,7 @@ namespace mg5amcCpu jamp_sv[88] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[112] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[118] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[52], w_fp[2], w_fp[112], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[2], w_fp[112], COUPs[1], 1.0, &_fp[0] ); jamp_sv[21] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[23] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[61] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -16990,7 +16990,7 @@ namespace mg5amcCpu jamp_sv[88] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[99] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[101] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[52], w_fp[2], w_fp[111], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[2], w_fp[111], COUPs[1], 1.0, &_fp[0] ); jamp_sv[9] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[15] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[61] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -17006,7 +17006,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 823 - FFV1_0( w_fp[90], w_fp[15], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[90], w_fp[15], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 823 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -17020,7 +17020,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 824 - FFV1_0( w_fp[90], w_fp[2], w_fp[16], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[90], w_fp[2], w_fp[16], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 824 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -17036,7 +17036,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 825 - VVV1_0( w_fp[101], w_fp[103], w_fp[5], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[101], w_fp[103], w_fp[5], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 825 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -17056,7 +17056,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 826 - FFV1_0( w_fp[22], w_fp[2], w_fp[101], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[22], w_fp[2], w_fp[101], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 826 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -17072,7 +17072,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 827 - VVV1_0( w_fp[0], w_fp[103], w_fp[16], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[0], w_fp[103], w_fp[16], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 827 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -17092,7 +17092,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 828 - FFV1_0( w_fp[22], w_fp[15], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[22], w_fp[15], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 828 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -17106,7 +17106,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 829 - FFV1_0( w_fp[52], w_fp[2], w_fp[9], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[2], w_fp[9], COUPs[1], 1.0, &_fp[0] ); jamp_sv[11] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[15] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[17] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -17115,7 +17115,7 @@ namespace mg5amcCpu jamp_sv[88] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[94] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[112] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[52], w_fp[2], w_fp[110], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[2], w_fp[110], COUPs[1], 1.0, &_fp[0] ); jamp_sv[15] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[17] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[67] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -17124,7 +17124,7 @@ namespace mg5amcCpu jamp_sv[77] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[109] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[112] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[52], w_fp[2], w_fp[109], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[2], w_fp[109], COUPs[1], 1.0, &_fp[0] ); jamp_sv[11] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[21] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[67] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -17140,7 +17140,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 830 - FFV1_0( w_fp[90], w_fp[18], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[90], w_fp[18], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 830 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -17154,7 +17154,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 831 - FFV1_0( w_fp[90], w_fp[2], w_fp[19], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[90], w_fp[2], w_fp[19], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 831 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -17170,7 +17170,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 832 - VVV1_0( w_fp[96], w_fp[103], w_fp[4], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[96], w_fp[103], w_fp[4], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 832 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -17190,7 +17190,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 833 - FFV1_0( w_fp[56], w_fp[2], w_fp[96], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[56], w_fp[2], w_fp[96], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 833 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -17206,7 +17206,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 834 - VVV1_0( w_fp[0], w_fp[103], w_fp[19], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[0], w_fp[103], w_fp[19], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 834 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -17226,7 +17226,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 835 - FFV1_0( w_fp[56], w_fp[18], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[56], w_fp[18], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 835 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -17240,7 +17240,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 836 - FFV1_0( w_fp[52], w_fp[2], w_fp[87], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[2], w_fp[87], COUPs[1], 1.0, &_fp[0] ); jamp_sv[9] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[11] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[17] += cxtype( 0, 1 ) * amp_sv[0]; @@ -17249,7 +17249,7 @@ namespace mg5amcCpu jamp_sv[70] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[94] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[118] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[52], w_fp[2], w_fp[34], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[2], w_fp[34], COUPs[1], 1.0, &_fp[0] ); jamp_sv[17] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[23] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[51] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -17258,7 +17258,7 @@ namespace mg5amcCpu jamp_sv[70] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[91] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[115] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[52], w_fp[2], w_fp[86], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[2], w_fp[86], COUPs[1], 1.0, &_fp[0] ); jamp_sv[9] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[11] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[51] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -17274,17 +17274,17 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 837 - FFV1_0( w_fp[90], w_fp[2], w_fp[30], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[90], w_fp[2], w_fp[30], COUPs[1], 1.0, &_fp[0] ); jamp_sv[64] += amp_sv[0]; jamp_sv[70] -= amp_sv[0]; jamp_sv[94] -= amp_sv[0]; jamp_sv[118] += amp_sv[0]; - FFV1_0( w_fp[90], w_fp[2], w_fp[31], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[90], w_fp[2], w_fp[31], COUPs[1], 1.0, &_fp[0] ); jamp_sv[70] -= amp_sv[0]; jamp_sv[88] += amp_sv[0]; jamp_sv[94] -= amp_sv[0]; jamp_sv[112] += amp_sv[0]; - FFV1_0( w_fp[90], w_fp[2], w_fp[32], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[90], w_fp[2], w_fp[32], COUPs[1], 1.0, &_fp[0] ); jamp_sv[64] -= amp_sv[0]; jamp_sv[88] += amp_sv[0]; jamp_sv[112] += amp_sv[0]; @@ -17296,7 +17296,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 838 - FFV1_0( w_fp[52], w_fp[2], w_fp[92], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[2], w_fp[92], COUPs[1], 1.0, &_fp[0] ); jamp_sv[9] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[11] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[17] += cxtype( 0, 1 ) * amp_sv[0]; @@ -17305,7 +17305,7 @@ namespace mg5amcCpu jamp_sv[70] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[94] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[118] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[52], w_fp[2], w_fp[88], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[2], w_fp[88], COUPs[1], 1.0, &_fp[0] ); jamp_sv[11] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[15] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[17] += cxtype( 0, 1 ) * amp_sv[0]; @@ -17314,7 +17314,7 @@ namespace mg5amcCpu jamp_sv[88] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[94] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[112] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[52], w_fp[2], w_fp[106], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[2], w_fp[106], COUPs[1], 1.0, &_fp[0] ); jamp_sv[9] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[15] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[21] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -17327,10 +17327,10 @@ namespace mg5amcCpu // *** DIAGRAM 839 OF 1240 *** // Wavefunction(s) for diagram number 839 - VVV1P0_1( w_fp[0], w_fp[61], COUPs[0], 0., 0., w_fp[90] ); + VVV1P0_1( w_fp[0], w_fp[61], COUPs[0], 1.0, 0., 0., w_fp[90] ); // Amplitude(s) for diagram number 839 - VVV1_0( w_fp[90], w_fp[10], w_fp[6], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[90], w_fp[10], w_fp[6], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 839 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -17358,7 +17358,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 840 - VVV1_0( w_fp[90], w_fp[11], w_fp[5], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[90], w_fp[11], w_fp[5], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 840 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -17386,7 +17386,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 841 - VVVV1_0( w_fp[8], w_fp[5], w_fp[6], w_fp[90], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[8], w_fp[5], w_fp[6], w_fp[90], COUPs[2], 1.0, &_fp[0] ); jamp_sv[1] -= amp_sv[0]; jamp_sv[7] += amp_sv[0]; jamp_sv[31] += amp_sv[0]; @@ -17403,7 +17403,7 @@ namespace mg5amcCpu jamp_sv[98] -= amp_sv[0]; jamp_sv[104] -= amp_sv[0]; jamp_sv[110] += amp_sv[0]; - VVVV3_0( w_fp[8], w_fp[5], w_fp[6], w_fp[90], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[8], w_fp[5], w_fp[6], w_fp[90], COUPs[2], 1.0, &_fp[0] ); jamp_sv[0] -= amp_sv[0]; jamp_sv[6] += amp_sv[0]; jamp_sv[30] += amp_sv[0]; @@ -17420,7 +17420,7 @@ namespace mg5amcCpu jamp_sv[115] += amp_sv[0]; jamp_sv[117] += amp_sv[0]; jamp_sv[119] -= amp_sv[0]; - VVVV4_0( w_fp[8], w_fp[5], w_fp[6], w_fp[90], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[8], w_fp[5], w_fp[6], w_fp[90], COUPs[2], 1.0, &_fp[0] ); jamp_sv[0] -= amp_sv[0]; jamp_sv[1] += amp_sv[0]; jamp_sv[6] += amp_sv[0]; @@ -17441,10 +17441,10 @@ namespace mg5amcCpu // *** DIAGRAM 842 OF 1240 *** // Wavefunction(s) for diagram number 842 - VVV1P0_1( w_fp[0], w_fp[8], COUPs[0], 0., 0., w_fp[56] ); + VVV1P0_1( w_fp[0], w_fp[8], COUPs[0], 1.0, 0., 0., w_fp[56] ); // Amplitude(s) for diagram number 842 - VVV1_0( w_fp[56], w_fp[63], w_fp[6], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[56], w_fp[63], w_fp[6], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 842 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -17472,7 +17472,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 843 - VVV1_0( w_fp[56], w_fp[64], w_fp[5], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[56], w_fp[64], w_fp[5], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 843 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -17500,7 +17500,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 844 - VVVV1_0( w_fp[61], w_fp[5], w_fp[6], w_fp[56], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[61], w_fp[5], w_fp[6], w_fp[56], COUPs[2], 1.0, &_fp[0] ); jamp_sv[0] += amp_sv[0]; jamp_sv[6] -= amp_sv[0]; jamp_sv[12] -= amp_sv[0]; @@ -17517,7 +17517,7 @@ namespace mg5amcCpu jamp_sv[111] -= amp_sv[0]; jamp_sv[117] -= amp_sv[0]; jamp_sv[119] += amp_sv[0]; - VVVV3_0( w_fp[61], w_fp[5], w_fp[6], w_fp[56], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[61], w_fp[5], w_fp[6], w_fp[56], COUPs[2], 1.0, &_fp[0] ); jamp_sv[1] += amp_sv[0]; jamp_sv[7] -= amp_sv[0]; jamp_sv[12] -= amp_sv[0]; @@ -17534,7 +17534,7 @@ namespace mg5amcCpu jamp_sv[95] += amp_sv[0]; jamp_sv[105] += amp_sv[0]; jamp_sv[111] -= amp_sv[0]; - VVVV4_0( w_fp[61], w_fp[5], w_fp[6], w_fp[56], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[61], w_fp[5], w_fp[6], w_fp[56], COUPs[2], 1.0, &_fp[0] ); jamp_sv[0] -= amp_sv[0]; jamp_sv[1] += amp_sv[0]; jamp_sv[6] += amp_sv[0]; @@ -17558,7 +17558,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 845 - VVV1_0( w_fp[0], w_fp[63], w_fp[11], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[0], w_fp[63], w_fp[11], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 845 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -17586,7 +17586,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 846 - VVV1_0( w_fp[0], w_fp[64], w_fp[10], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[0], w_fp[64], w_fp[10], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 846 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -17611,12 +17611,12 @@ namespace mg5amcCpu // *** DIAGRAM 847 OF 1240 *** // Wavefunction(s) for diagram number 847 - VVVV1P0_1( w_fp[0], w_fp[61], w_fp[5], COUPs[2], 0., 0., w_fp[103] ); - VVVV3P0_1( w_fp[0], w_fp[61], w_fp[5], COUPs[2], 0., 0., w_fp[22] ); - VVVV4P0_1( w_fp[0], w_fp[61], w_fp[5], COUPs[2], 0., 0., w_fp[21] ); + VVVV1P0_1( w_fp[0], w_fp[61], w_fp[5], COUPs[2], 1.0, 0., 0., w_fp[103] ); + VVVV3P0_1( w_fp[0], w_fp[61], w_fp[5], COUPs[2], 1.0, 0., 0., w_fp[22] ); + VVVV4P0_1( w_fp[0], w_fp[61], w_fp[5], COUPs[2], 1.0, 0., 0., w_fp[21] ); // Amplitude(s) for diagram number 847 - VVV1_0( w_fp[8], w_fp[6], w_fp[103], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[6], w_fp[103], COUPs[0], 1.0, &_fp[0] ); jamp_sv[0] += amp_sv[0]; jamp_sv[6] -= amp_sv[0]; jamp_sv[12] -= amp_sv[0]; @@ -17633,7 +17633,7 @@ namespace mg5amcCpu jamp_sv[111] -= amp_sv[0]; jamp_sv[117] -= amp_sv[0]; jamp_sv[119] += amp_sv[0]; - VVV1_0( w_fp[8], w_fp[6], w_fp[22], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[6], w_fp[22], COUPs[0], 1.0, &_fp[0] ); jamp_sv[12] -= amp_sv[0]; jamp_sv[14] += amp_sv[0]; jamp_sv[30] += amp_sv[0]; @@ -17650,7 +17650,7 @@ namespace mg5amcCpu jamp_sv[111] -= amp_sv[0]; jamp_sv[114] -= amp_sv[0]; jamp_sv[115] += amp_sv[0]; - VVV1_0( w_fp[8], w_fp[6], w_fp[21], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[6], w_fp[21], COUPs[0], 1.0, &_fp[0] ); jamp_sv[0] -= amp_sv[0]; jamp_sv[6] += amp_sv[0]; jamp_sv[30] += amp_sv[0]; @@ -17671,12 +17671,12 @@ namespace mg5amcCpu // *** DIAGRAM 848 OF 1240 *** // Wavefunction(s) for diagram number 848 - VVVV1P0_1( w_fp[0], w_fp[61], w_fp[6], COUPs[2], 0., 0., w_fp[105] ); - VVVV3P0_1( w_fp[0], w_fp[61], w_fp[6], COUPs[2], 0., 0., w_fp[95] ); - VVVV4P0_1( w_fp[0], w_fp[61], w_fp[6], COUPs[2], 0., 0., w_fp[107] ); + VVVV1P0_1( w_fp[0], w_fp[61], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[105] ); + VVVV3P0_1( w_fp[0], w_fp[61], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[95] ); + VVVV4P0_1( w_fp[0], w_fp[61], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[107] ); // Amplitude(s) for diagram number 848 - VVV1_0( w_fp[8], w_fp[5], w_fp[105], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[5], w_fp[105], COUPs[0], 1.0, &_fp[0] ); jamp_sv[1] += amp_sv[0]; jamp_sv[7] -= amp_sv[0]; jamp_sv[18] -= amp_sv[0]; @@ -17693,7 +17693,7 @@ namespace mg5amcCpu jamp_sv[95] += amp_sv[0]; jamp_sv[104] += amp_sv[0]; jamp_sv[110] -= amp_sv[0]; - VVV1_0( w_fp[8], w_fp[5], w_fp[95], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[5], w_fp[95], COUPs[0], 1.0, &_fp[0] ); jamp_sv[18] -= amp_sv[0]; jamp_sv[20] += amp_sv[0]; jamp_sv[31] += amp_sv[0]; @@ -17710,7 +17710,7 @@ namespace mg5amcCpu jamp_sv[91] += amp_sv[0]; jamp_sv[96] += amp_sv[0]; jamp_sv[98] -= amp_sv[0]; - VVV1_0( w_fp[8], w_fp[5], w_fp[107], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[5], w_fp[107], COUPs[0], 1.0, &_fp[0] ); jamp_sv[1] -= amp_sv[0]; jamp_sv[7] += amp_sv[0]; jamp_sv[31] += amp_sv[0]; @@ -17731,12 +17731,12 @@ namespace mg5amcCpu // *** DIAGRAM 849 OF 1240 *** // Wavefunction(s) for diagram number 849 - VVVV1P0_1( w_fp[0], w_fp[8], w_fp[5], COUPs[2], 0., 0., w_fp[115] ); - VVVV3P0_1( w_fp[0], w_fp[8], w_fp[5], COUPs[2], 0., 0., w_fp[116] ); - VVVV4P0_1( w_fp[0], w_fp[8], w_fp[5], COUPs[2], 0., 0., w_fp[117] ); + VVVV1P0_1( w_fp[0], w_fp[8], w_fp[5], COUPs[2], 1.0, 0., 0., w_fp[115] ); + VVVV3P0_1( w_fp[0], w_fp[8], w_fp[5], COUPs[2], 1.0, 0., 0., w_fp[116] ); + VVVV4P0_1( w_fp[0], w_fp[8], w_fp[5], COUPs[2], 1.0, 0., 0., w_fp[117] ); // Amplitude(s) for diagram number 849 - VVV1_0( w_fp[61], w_fp[6], w_fp[115], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[61], w_fp[6], w_fp[115], COUPs[0], 1.0, &_fp[0] ); jamp_sv[1] -= amp_sv[0]; jamp_sv[7] += amp_sv[0]; jamp_sv[18] += amp_sv[0]; @@ -17753,7 +17753,7 @@ namespace mg5amcCpu jamp_sv[95] -= amp_sv[0]; jamp_sv[104] -= amp_sv[0]; jamp_sv[110] += amp_sv[0]; - VVV1_0( w_fp[61], w_fp[6], w_fp[116], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[61], w_fp[6], w_fp[116], COUPs[0], 1.0, &_fp[0] ); jamp_sv[12] -= amp_sv[0]; jamp_sv[14] += amp_sv[0]; jamp_sv[16] += amp_sv[0]; @@ -17770,7 +17770,7 @@ namespace mg5amcCpu jamp_sv[105] += amp_sv[0]; jamp_sv[110] += amp_sv[0]; jamp_sv[111] -= amp_sv[0]; - VVV1_0( w_fp[61], w_fp[6], w_fp[117], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[61], w_fp[6], w_fp[117], COUPs[0], 1.0, &_fp[0] ); jamp_sv[1] += amp_sv[0]; jamp_sv[7] -= amp_sv[0]; jamp_sv[12] -= amp_sv[0]; @@ -17791,12 +17791,12 @@ namespace mg5amcCpu // *** DIAGRAM 850 OF 1240 *** // Wavefunction(s) for diagram number 850 - VVVV1P0_1( w_fp[0], w_fp[8], w_fp[6], COUPs[2], 0., 0., w_fp[118] ); - VVVV3P0_1( w_fp[0], w_fp[8], w_fp[6], COUPs[2], 0., 0., w_fp[119] ); - VVVV4P0_1( w_fp[0], w_fp[8], w_fp[6], COUPs[2], 0., 0., w_fp[120] ); + VVVV1P0_1( w_fp[0], w_fp[8], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[118] ); + VVVV3P0_1( w_fp[0], w_fp[8], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[119] ); + VVVV4P0_1( w_fp[0], w_fp[8], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[120] ); // Amplitude(s) for diagram number 850 - VVV1_0( w_fp[61], w_fp[5], w_fp[118], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[61], w_fp[5], w_fp[118], COUPs[0], 1.0, &_fp[0] ); jamp_sv[0] -= amp_sv[0]; jamp_sv[6] += amp_sv[0]; jamp_sv[12] += amp_sv[0]; @@ -17813,7 +17813,7 @@ namespace mg5amcCpu jamp_sv[111] += amp_sv[0]; jamp_sv[117] += amp_sv[0]; jamp_sv[119] -= amp_sv[0]; - VVV1_0( w_fp[61], w_fp[5], w_fp[119], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[61], w_fp[5], w_fp[119], COUPs[0], 1.0, &_fp[0] ); jamp_sv[18] -= amp_sv[0]; jamp_sv[20] += amp_sv[0]; jamp_sv[22] += amp_sv[0]; @@ -17830,7 +17830,7 @@ namespace mg5amcCpu jamp_sv[98] -= amp_sv[0]; jamp_sv[100] -= amp_sv[0]; jamp_sv[101] += amp_sv[0]; - VVV1_0( w_fp[61], w_fp[5], w_fp[120], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[61], w_fp[5], w_fp[120], COUPs[0], 1.0, &_fp[0] ); jamp_sv[0] += amp_sv[0]; jamp_sv[6] -= amp_sv[0]; jamp_sv[12] -= amp_sv[0]; @@ -17854,7 +17854,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 851 - VVVV1_0( w_fp[0], w_fp[61], w_fp[8], w_fp[29], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[0], w_fp[61], w_fp[8], w_fp[29], COUPs[2], 1.0, &_fp[0] ); jamp_sv[0] += amp_sv[0]; jamp_sv[1] -= amp_sv[0]; jamp_sv[6] -= amp_sv[0]; @@ -17871,7 +17871,7 @@ namespace mg5amcCpu jamp_sv[115] -= amp_sv[0]; jamp_sv[117] -= amp_sv[0]; jamp_sv[119] += amp_sv[0]; - VVVV3_0( w_fp[0], w_fp[61], w_fp[8], w_fp[29], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[0], w_fp[61], w_fp[8], w_fp[29], COUPs[2], 1.0, &_fp[0] ); jamp_sv[0] += amp_sv[0]; jamp_sv[1] -= amp_sv[0]; jamp_sv[6] -= amp_sv[0]; @@ -17888,7 +17888,7 @@ namespace mg5amcCpu jamp_sv[95] -= amp_sv[0]; jamp_sv[117] -= amp_sv[0]; jamp_sv[119] += amp_sv[0]; - VVVV4_0( w_fp[0], w_fp[61], w_fp[8], w_fp[29], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[0], w_fp[61], w_fp[8], w_fp[29], COUPs[2], 1.0, &_fp[0] ); jamp_sv[16] -= amp_sv[0]; jamp_sv[17] += amp_sv[0]; jamp_sv[22] += amp_sv[0]; @@ -17912,7 +17912,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 852 - VVV1_0( w_fp[8], w_fp[29], w_fp[90], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[29], w_fp[90], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 852 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -17940,7 +17940,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 853 - VVV1_0( w_fp[61], w_fp[29], w_fp[56], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[61], w_fp[29], w_fp[56], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 853 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -17968,7 +17968,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 854 - VVV1_0( w_fp[61], w_fp[8], w_fp[96], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[61], w_fp[8], w_fp[96], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 854 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -17996,7 +17996,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 855 - VVV1_0( w_fp[90], w_fp[45], w_fp[6], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[90], w_fp[45], w_fp[6], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 855 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -18016,7 +18016,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 856 - FFV1_0( w_fp[3], w_fp[44], w_fp[90], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[44], w_fp[90], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 856 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -18032,7 +18032,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 857 - FFV1_0( w_fp[65], w_fp[102], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[65], w_fp[102], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 857 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -18046,7 +18046,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 858 - FFV1_0( w_fp[3], w_fp[102], w_fp[64], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[102], w_fp[64], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 858 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -18062,7 +18062,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 859 - FFV1_0( w_fp[65], w_fp[44], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[65], w_fp[44], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 859 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -18076,7 +18076,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 860 - VVV1_0( w_fp[0], w_fp[64], w_fp[45], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[0], w_fp[64], w_fp[45], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 860 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -18096,7 +18096,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 861 - FFV1_0( w_fp[3], w_fp[39], w_fp[105], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[39], w_fp[105], COUPs[1], 1.0, &_fp[0] ); jamp_sv[72] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[74] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[76] += cxtype( 0, 1 ) * amp_sv[0]; @@ -18105,7 +18105,7 @@ namespace mg5amcCpu jamp_sv[87] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[93] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[95] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[39], w_fp[95], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[39], w_fp[95], COUPs[1], 1.0, &_fp[0] ); jamp_sv[76] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[77] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[80] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -18114,7 +18114,7 @@ namespace mg5amcCpu jamp_sv[87] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[90] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[91] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[39], w_fp[107], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[39], w_fp[107], COUPs[1], 1.0, &_fp[0] ); jamp_sv[72] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[74] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[80] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -18130,7 +18130,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 862 - FFV1_0( w_fp[41], w_fp[39], w_fp[90], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[39], w_fp[90], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 862 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -18146,7 +18146,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 863 - FFV1_0( w_fp[41], w_fp[102], w_fp[61], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[102], w_fp[61], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 863 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -18160,7 +18160,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 864 - FFV1_0( w_fp[62], w_fp[39], w_fp[61], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[62], w_fp[39], w_fp[61], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 864 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -18174,7 +18174,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 865 - VVV1_0( w_fp[90], w_fp[51], w_fp[5], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[90], w_fp[51], w_fp[5], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 865 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -18194,7 +18194,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 866 - FFV1_0( w_fp[3], w_fp[50], w_fp[90], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[50], w_fp[90], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 866 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -18210,7 +18210,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 867 - FFV1_0( w_fp[65], w_fp[113], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[65], w_fp[113], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 867 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -18224,7 +18224,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 868 - FFV1_0( w_fp[3], w_fp[113], w_fp[63], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[113], w_fp[63], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 868 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -18240,7 +18240,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 869 - FFV1_0( w_fp[65], w_fp[50], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[65], w_fp[50], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 869 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -18254,7 +18254,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 870 - VVV1_0( w_fp[0], w_fp[63], w_fp[51], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[0], w_fp[63], w_fp[51], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 870 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -18274,7 +18274,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 871 - FFV1_0( w_fp[3], w_fp[47], w_fp[103], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[47], w_fp[103], COUPs[1], 1.0, &_fp[0] ); jamp_sv[96] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[98] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[100] += cxtype( 0, 1 ) * amp_sv[0]; @@ -18283,7 +18283,7 @@ namespace mg5amcCpu jamp_sv[111] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[117] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[119] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[47], w_fp[22], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[47], w_fp[22], COUPs[1], 1.0, &_fp[0] ); jamp_sv[100] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[101] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[104] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -18292,7 +18292,7 @@ namespace mg5amcCpu jamp_sv[111] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[114] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[115] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[47], w_fp[21], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[47], w_fp[21], COUPs[1], 1.0, &_fp[0] ); jamp_sv[96] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[98] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[104] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -18308,7 +18308,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 872 - FFV1_0( w_fp[38], w_fp[47], w_fp[90], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[47], w_fp[90], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 872 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -18324,7 +18324,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 873 - FFV1_0( w_fp[38], w_fp[113], w_fp[61], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[113], w_fp[61], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 873 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -18338,7 +18338,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 874 - FFV1_0( w_fp[104], w_fp[47], w_fp[61], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[104], w_fp[47], w_fp[61], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 874 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -18352,7 +18352,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 875 - VVV1_0( w_fp[90], w_fp[23], w_fp[6], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[90], w_fp[23], w_fp[6], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 875 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -18372,7 +18372,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 876 - FFV1_0( w_fp[48], w_fp[2], w_fp[90], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[48], w_fp[2], w_fp[90], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 876 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -18388,7 +18388,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 877 - FFV1_0( w_fp[104], w_fp[93], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[104], w_fp[93], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 877 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -18402,7 +18402,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 878 - FFV1_0( w_fp[104], w_fp[2], w_fp[64], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[104], w_fp[2], w_fp[64], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 878 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -18418,7 +18418,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 879 - FFV1_0( w_fp[48], w_fp[93], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[48], w_fp[93], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 879 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -18432,7 +18432,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 880 - VVV1_0( w_fp[0], w_fp[64], w_fp[23], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[0], w_fp[64], w_fp[23], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 880 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -18452,7 +18452,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 881 - FFV1_0( w_fp[38], w_fp[2], w_fp[105], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[2], w_fp[105], COUPs[1], 1.0, &_fp[0] ); jamp_sv[1] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[7] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[18] += cxtype( 0, 1 ) * amp_sv[0]; @@ -18461,7 +18461,7 @@ namespace mg5amcCpu jamp_sv[58] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[104] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[110] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[38], w_fp[2], w_fp[95], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[2], w_fp[95], COUPs[1], 1.0, &_fp[0] ); jamp_sv[18] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[20] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[31] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -18470,7 +18470,7 @@ namespace mg5amcCpu jamp_sv[58] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[96] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[98] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[38], w_fp[2], w_fp[107], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[2], w_fp[107], COUPs[1], 1.0, &_fp[0] ); jamp_sv[1] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[7] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[31] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -18486,7 +18486,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 882 - VVV1_0( w_fp[90], w_fp[20], w_fp[5], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[90], w_fp[20], w_fp[5], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 882 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -18506,7 +18506,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 883 - FFV1_0( w_fp[40], w_fp[2], w_fp[90], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[40], w_fp[2], w_fp[90], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 883 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -18522,7 +18522,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 884 - FFV1_0( w_fp[62], w_fp[93], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[62], w_fp[93], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 884 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -18536,7 +18536,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 885 - FFV1_0( w_fp[62], w_fp[2], w_fp[63], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[62], w_fp[2], w_fp[63], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 885 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -18552,7 +18552,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 886 - FFV1_0( w_fp[40], w_fp[93], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[40], w_fp[93], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 886 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -18566,7 +18566,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 887 - VVV1_0( w_fp[0], w_fp[63], w_fp[20], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[0], w_fp[63], w_fp[20], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 887 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -18586,7 +18586,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 888 - FFV1_0( w_fp[41], w_fp[2], w_fp[103], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[2], w_fp[103], COUPs[1], 1.0, &_fp[0] ); jamp_sv[0] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[6] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[12] += cxtype( 0, 1 ) * amp_sv[0]; @@ -18595,7 +18595,7 @@ namespace mg5amcCpu jamp_sv[56] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[80] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[86] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[41], w_fp[2], w_fp[22], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[2], w_fp[22], COUPs[1], 1.0, &_fp[0] ); jamp_sv[12] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[14] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[30] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -18604,7 +18604,7 @@ namespace mg5amcCpu jamp_sv[56] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[72] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[74] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[41], w_fp[2], w_fp[21], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[2], w_fp[21], COUPs[1], 1.0, &_fp[0] ); jamp_sv[0] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[6] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[30] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -18620,7 +18620,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 889 - FFV1_0( w_fp[3], w_fp[18], w_fp[90], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[18], w_fp[90], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 889 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -18640,7 +18640,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 890 - FFV1_0( w_fp[12], w_fp[2], w_fp[90], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[12], w_fp[2], w_fp[90], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 890 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -18660,7 +18660,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 891 - FFV1_0( w_fp[3], w_fp[93], w_fp[96], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[93], w_fp[96], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 891 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -18680,7 +18680,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 892 - FFV1_0( w_fp[65], w_fp[2], w_fp[96], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[65], w_fp[2], w_fp[96], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 892 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -18700,7 +18700,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 893 - FFV1_0( w_fp[12], w_fp[93], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[12], w_fp[93], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 893 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -18716,7 +18716,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 894 - FFV1_0( w_fp[65], w_fp[18], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[65], w_fp[18], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 894 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -18729,10 +18729,10 @@ namespace mg5amcCpu // *** DIAGRAM 895 OF 1240 *** // Wavefunction(s) for diagram number 895 - VVV1P0_1( w_fp[0], w_fp[66], COUPs[0], 0., 0., w_fp[65] ); + VVV1P0_1( w_fp[0], w_fp[66], COUPs[0], 1.0, 0., 0., w_fp[65] ); // Amplitude(s) for diagram number 895 - VVV1_0( w_fp[65], w_fp[13], w_fp[6], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[65], w_fp[13], w_fp[6], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 895 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -18760,7 +18760,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 896 - VVV1_0( w_fp[65], w_fp[11], w_fp[4], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[65], w_fp[11], w_fp[4], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 896 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -18788,7 +18788,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 897 - VVVV1_0( w_fp[8], w_fp[4], w_fp[6], w_fp[65], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[8], w_fp[4], w_fp[6], w_fp[65], COUPs[2], 1.0, &_fp[0] ); jamp_sv[3] -= amp_sv[0]; jamp_sv[13] += amp_sv[0]; jamp_sv[37] += amp_sv[0]; @@ -18805,7 +18805,7 @@ namespace mg5amcCpu jamp_sv[100] -= amp_sv[0]; jamp_sv[106] -= amp_sv[0]; jamp_sv[116] += amp_sv[0]; - VVVV3_0( w_fp[8], w_fp[4], w_fp[6], w_fp[65], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[8], w_fp[4], w_fp[6], w_fp[65], COUPs[2], 1.0, &_fp[0] ); jamp_sv[2] -= amp_sv[0]; jamp_sv[12] += amp_sv[0]; jamp_sv[36] += amp_sv[0]; @@ -18822,7 +18822,7 @@ namespace mg5amcCpu jamp_sv[111] += amp_sv[0]; jamp_sv[113] -= amp_sv[0]; jamp_sv[116] += amp_sv[0]; - VVVV4_0( w_fp[8], w_fp[4], w_fp[6], w_fp[65], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[8], w_fp[4], w_fp[6], w_fp[65], COUPs[2], 1.0, &_fp[0] ); jamp_sv[2] -= amp_sv[0]; jamp_sv[3] += amp_sv[0]; jamp_sv[12] += amp_sv[0]; @@ -18846,7 +18846,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 898 - VVV1_0( w_fp[56], w_fp[69], w_fp[6], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[56], w_fp[69], w_fp[6], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 898 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -18874,7 +18874,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 899 - VVV1_0( w_fp[56], w_fp[70], w_fp[4], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[56], w_fp[70], w_fp[4], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 899 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -18902,7 +18902,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 900 - VVVV1_0( w_fp[66], w_fp[4], w_fp[6], w_fp[56], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[66], w_fp[4], w_fp[6], w_fp[56], COUPs[2], 1.0, &_fp[0] ); jamp_sv[2] += amp_sv[0]; jamp_sv[6] -= amp_sv[0]; jamp_sv[8] += amp_sv[0]; @@ -18919,7 +18919,7 @@ namespace mg5amcCpu jamp_sv[111] -= amp_sv[0]; jamp_sv[113] += amp_sv[0]; jamp_sv[117] -= amp_sv[0]; - VVVV3_0( w_fp[66], w_fp[4], w_fp[6], w_fp[56], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[66], w_fp[4], w_fp[6], w_fp[56], COUPs[2], 1.0, &_fp[0] ); jamp_sv[3] += amp_sv[0]; jamp_sv[6] -= amp_sv[0]; jamp_sv[8] += amp_sv[0]; @@ -18936,7 +18936,7 @@ namespace mg5amcCpu jamp_sv[83] += amp_sv[0]; jamp_sv[107] += amp_sv[0]; jamp_sv[117] -= amp_sv[0]; - VVVV4_0( w_fp[66], w_fp[4], w_fp[6], w_fp[56], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[66], w_fp[4], w_fp[6], w_fp[56], COUPs[2], 1.0, &_fp[0] ); jamp_sv[2] -= amp_sv[0]; jamp_sv[3] += amp_sv[0]; jamp_sv[10] += amp_sv[0]; @@ -18960,7 +18960,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 901 - VVV1_0( w_fp[0], w_fp[69], w_fp[11], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[0], w_fp[69], w_fp[11], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 901 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -18988,7 +18988,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 902 - VVV1_0( w_fp[0], w_fp[70], w_fp[13], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[0], w_fp[70], w_fp[13], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 902 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -19013,12 +19013,12 @@ namespace mg5amcCpu // *** DIAGRAM 903 OF 1240 *** // Wavefunction(s) for diagram number 903 - VVVV1P0_1( w_fp[0], w_fp[66], w_fp[4], COUPs[2], 0., 0., w_fp[93] ); - VVVV3P0_1( w_fp[0], w_fp[66], w_fp[4], COUPs[2], 0., 0., w_fp[90] ); - VVVV4P0_1( w_fp[0], w_fp[66], w_fp[4], COUPs[2], 0., 0., w_fp[21] ); + VVVV1P0_1( w_fp[0], w_fp[66], w_fp[4], COUPs[2], 1.0, 0., 0., w_fp[93] ); + VVVV3P0_1( w_fp[0], w_fp[66], w_fp[4], COUPs[2], 1.0, 0., 0., w_fp[90] ); + VVVV4P0_1( w_fp[0], w_fp[66], w_fp[4], COUPs[2], 1.0, 0., 0., w_fp[21] ); // Amplitude(s) for diagram number 903 - VVV1_0( w_fp[8], w_fp[6], w_fp[93], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[6], w_fp[93], COUPs[0], 1.0, &_fp[0] ); jamp_sv[2] += amp_sv[0]; jamp_sv[6] -= amp_sv[0]; jamp_sv[8] += amp_sv[0]; @@ -19035,7 +19035,7 @@ namespace mg5amcCpu jamp_sv[111] -= amp_sv[0]; jamp_sv[113] += amp_sv[0]; jamp_sv[117] -= amp_sv[0]; - VVV1_0( w_fp[8], w_fp[6], w_fp[90], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[6], w_fp[90], COUPs[0], 1.0, &_fp[0] ); jamp_sv[6] -= amp_sv[0]; jamp_sv[8] += amp_sv[0]; jamp_sv[36] += amp_sv[0]; @@ -19052,7 +19052,7 @@ namespace mg5amcCpu jamp_sv[109] += amp_sv[0]; jamp_sv[116] += amp_sv[0]; jamp_sv[117] -= amp_sv[0]; - VVV1_0( w_fp[8], w_fp[6], w_fp[21], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[6], w_fp[21], COUPs[0], 1.0, &_fp[0] ); jamp_sv[2] -= amp_sv[0]; jamp_sv[12] += amp_sv[0]; jamp_sv[36] += amp_sv[0]; @@ -19073,12 +19073,12 @@ namespace mg5amcCpu // *** DIAGRAM 904 OF 1240 *** // Wavefunction(s) for diagram number 904 - VVVV1P0_1( w_fp[0], w_fp[66], w_fp[6], COUPs[2], 0., 0., w_fp[22] ); - VVVV3P0_1( w_fp[0], w_fp[66], w_fp[6], COUPs[2], 0., 0., w_fp[103] ); - VVVV4P0_1( w_fp[0], w_fp[66], w_fp[6], COUPs[2], 0., 0., w_fp[63] ); + VVVV1P0_1( w_fp[0], w_fp[66], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[22] ); + VVVV3P0_1( w_fp[0], w_fp[66], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[103] ); + VVVV4P0_1( w_fp[0], w_fp[66], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[63] ); // Amplitude(s) for diagram number 904 - VVV1_0( w_fp[8], w_fp[4], w_fp[22], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[4], w_fp[22], COUPs[0], 1.0, &_fp[0] ); jamp_sv[3] += amp_sv[0]; jamp_sv[13] -= amp_sv[0]; jamp_sv[19] -= amp_sv[0]; @@ -19095,7 +19095,7 @@ namespace mg5amcCpu jamp_sv[82] += amp_sv[0]; jamp_sv[106] += amp_sv[0]; jamp_sv[116] -= amp_sv[0]; - VVV1_0( w_fp[8], w_fp[4], w_fp[103], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[4], w_fp[103], COUPs[0], 1.0, &_fp[0] ); jamp_sv[19] -= amp_sv[0]; jamp_sv[22] += amp_sv[0]; jamp_sv[37] += amp_sv[0]; @@ -19112,7 +19112,7 @@ namespace mg5amcCpu jamp_sv[82] += amp_sv[0]; jamp_sv[97] += amp_sv[0]; jamp_sv[100] -= amp_sv[0]; - VVV1_0( w_fp[8], w_fp[4], w_fp[63], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[4], w_fp[63], COUPs[0], 1.0, &_fp[0] ); jamp_sv[3] -= amp_sv[0]; jamp_sv[13] += amp_sv[0]; jamp_sv[37] += amp_sv[0]; @@ -19133,12 +19133,12 @@ namespace mg5amcCpu // *** DIAGRAM 905 OF 1240 *** // Wavefunction(s) for diagram number 905 - VVVV1P0_1( w_fp[0], w_fp[8], w_fp[4], COUPs[2], 0., 0., w_fp[107] ); - VVVV3P0_1( w_fp[0], w_fp[8], w_fp[4], COUPs[2], 0., 0., w_fp[95] ); - VVVV4P0_1( w_fp[0], w_fp[8], w_fp[4], COUPs[2], 0., 0., w_fp[105] ); + VVVV1P0_1( w_fp[0], w_fp[8], w_fp[4], COUPs[2], 1.0, 0., 0., w_fp[107] ); + VVVV3P0_1( w_fp[0], w_fp[8], w_fp[4], COUPs[2], 1.0, 0., 0., w_fp[95] ); + VVVV4P0_1( w_fp[0], w_fp[8], w_fp[4], COUPs[2], 1.0, 0., 0., w_fp[105] ); // Amplitude(s) for diagram number 905 - VVV1_0( w_fp[66], w_fp[6], w_fp[107], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[66], w_fp[6], w_fp[107], COUPs[0], 1.0, &_fp[0] ); jamp_sv[3] -= amp_sv[0]; jamp_sv[13] += amp_sv[0]; jamp_sv[19] += amp_sv[0]; @@ -19155,7 +19155,7 @@ namespace mg5amcCpu jamp_sv[82] -= amp_sv[0]; jamp_sv[106] -= amp_sv[0]; jamp_sv[116] += amp_sv[0]; - VVV1_0( w_fp[66], w_fp[6], w_fp[95], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[66], w_fp[6], w_fp[95], COUPs[0], 1.0, &_fp[0] ); jamp_sv[6] -= amp_sv[0]; jamp_sv[8] += amp_sv[0]; jamp_sv[10] += amp_sv[0]; @@ -19172,7 +19172,7 @@ namespace mg5amcCpu jamp_sv[107] += amp_sv[0]; jamp_sv[116] += amp_sv[0]; jamp_sv[117] -= amp_sv[0]; - VVV1_0( w_fp[66], w_fp[6], w_fp[105], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[66], w_fp[6], w_fp[105], COUPs[0], 1.0, &_fp[0] ); jamp_sv[3] += amp_sv[0]; jamp_sv[6] -= amp_sv[0]; jamp_sv[8] += amp_sv[0]; @@ -19196,7 +19196,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 906 - VVV1_0( w_fp[66], w_fp[4], w_fp[118], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[66], w_fp[4], w_fp[118], COUPs[0], 1.0, &_fp[0] ); jamp_sv[2] -= amp_sv[0]; jamp_sv[6] += amp_sv[0]; jamp_sv[8] -= amp_sv[0]; @@ -19213,7 +19213,7 @@ namespace mg5amcCpu jamp_sv[111] += amp_sv[0]; jamp_sv[113] -= amp_sv[0]; jamp_sv[117] += amp_sv[0]; - VVV1_0( w_fp[66], w_fp[4], w_fp[119], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[66], w_fp[4], w_fp[119], COUPs[0], 1.0, &_fp[0] ); jamp_sv[19] -= amp_sv[0]; jamp_sv[20] += amp_sv[0]; jamp_sv[21] -= amp_sv[0]; @@ -19230,7 +19230,7 @@ namespace mg5amcCpu jamp_sv[98] -= amp_sv[0]; jamp_sv[99] += amp_sv[0]; jamp_sv[100] -= amp_sv[0]; - VVV1_0( w_fp[66], w_fp[4], w_fp[120], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[66], w_fp[4], w_fp[120], COUPs[0], 1.0, &_fp[0] ); jamp_sv[2] += amp_sv[0]; jamp_sv[6] -= amp_sv[0]; jamp_sv[8] += amp_sv[0]; @@ -19254,7 +19254,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 907 - VVVV1_0( w_fp[0], w_fp[66], w_fp[8], w_fp[27], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[0], w_fp[66], w_fp[8], w_fp[27], COUPs[2], 1.0, &_fp[0] ); jamp_sv[2] += amp_sv[0]; jamp_sv[3] -= amp_sv[0]; jamp_sv[12] -= amp_sv[0]; @@ -19271,7 +19271,7 @@ namespace mg5amcCpu jamp_sv[109] -= amp_sv[0]; jamp_sv[111] -= amp_sv[0]; jamp_sv[113] += amp_sv[0]; - VVVV3_0( w_fp[0], w_fp[66], w_fp[8], w_fp[27], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[0], w_fp[66], w_fp[8], w_fp[27], COUPs[2], 1.0, &_fp[0] ); jamp_sv[2] += amp_sv[0]; jamp_sv[3] -= amp_sv[0]; jamp_sv[10] -= amp_sv[0]; @@ -19288,7 +19288,7 @@ namespace mg5amcCpu jamp_sv[83] -= amp_sv[0]; jamp_sv[111] -= amp_sv[0]; jamp_sv[113] += amp_sv[0]; - VVVV4_0( w_fp[0], w_fp[66], w_fp[8], w_fp[27], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[0], w_fp[66], w_fp[8], w_fp[27], COUPs[2], 1.0, &_fp[0] ); jamp_sv[10] -= amp_sv[0]; jamp_sv[11] += amp_sv[0]; jamp_sv[20] += amp_sv[0]; @@ -19312,7 +19312,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 908 - VVV1_0( w_fp[8], w_fp[27], w_fp[65], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[27], w_fp[65], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 908 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -19340,7 +19340,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 909 - VVV1_0( w_fp[66], w_fp[27], w_fp[56], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[66], w_fp[27], w_fp[56], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 909 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -19368,7 +19368,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 910 - VVV1_0( w_fp[66], w_fp[8], w_fp[101], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[66], w_fp[8], w_fp[101], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 910 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -19396,7 +19396,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 911 - VVV1_0( w_fp[65], w_fp[37], w_fp[6], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[65], w_fp[37], w_fp[6], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 911 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -19416,7 +19416,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 912 - FFV1_0( w_fp[3], w_fp[36], w_fp[65], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[36], w_fp[65], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 912 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -19432,7 +19432,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 913 - FFV1_0( w_fp[71], w_fp[114], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[71], w_fp[114], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 913 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -19446,7 +19446,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 914 - FFV1_0( w_fp[3], w_fp[114], w_fp[70], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[114], w_fp[70], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 914 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -19462,7 +19462,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 915 - FFV1_0( w_fp[71], w_fp[36], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[71], w_fp[36], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 915 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -19476,7 +19476,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 916 - VVV1_0( w_fp[0], w_fp[70], w_fp[37], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[0], w_fp[70], w_fp[37], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 916 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -19496,7 +19496,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 917 - FFV1_0( w_fp[3], w_fp[33], w_fp[22], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[33], w_fp[22], COUPs[1], 1.0, &_fp[0] ); jamp_sv[48] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[50] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[52] += cxtype( 0, 1 ) * amp_sv[0]; @@ -19505,7 +19505,7 @@ namespace mg5amcCpu jamp_sv[63] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[69] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[71] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[33], w_fp[103], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[33], w_fp[103], COUPs[1], 1.0, &_fp[0] ); jamp_sv[52] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[53] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[56] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -19514,7 +19514,7 @@ namespace mg5amcCpu jamp_sv[63] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[66] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[67] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[33], w_fp[63], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[33], w_fp[63], COUPs[1], 1.0, &_fp[0] ); jamp_sv[48] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[50] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[56] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -19530,7 +19530,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 918 - FFV1_0( w_fp[41], w_fp[33], w_fp[65], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[33], w_fp[65], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 918 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -19546,7 +19546,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 919 - FFV1_0( w_fp[41], w_fp[114], w_fp[66], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[114], w_fp[66], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 919 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -19560,7 +19560,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 920 - FFV1_0( w_fp[62], w_fp[33], w_fp[66], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[62], w_fp[33], w_fp[66], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 920 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -19574,7 +19574,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 921 - VVV1_0( w_fp[65], w_fp[51], w_fp[4], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[65], w_fp[51], w_fp[4], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 921 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -19594,7 +19594,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 922 - FFV1_0( w_fp[3], w_fp[49], w_fp[65], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[49], w_fp[65], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 922 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -19610,7 +19610,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 923 - FFV1_0( w_fp[71], w_fp[113], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[71], w_fp[113], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 923 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -19624,7 +19624,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 924 - FFV1_0( w_fp[3], w_fp[113], w_fp[69], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[113], w_fp[69], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 924 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -19640,7 +19640,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 925 - FFV1_0( w_fp[71], w_fp[49], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[71], w_fp[49], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 925 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -19654,7 +19654,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 926 - VVV1_0( w_fp[0], w_fp[69], w_fp[51], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[0], w_fp[69], w_fp[51], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 926 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -19674,7 +19674,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 927 - FFV1_0( w_fp[3], w_fp[47], w_fp[93], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[47], w_fp[93], COUPs[1], 1.0, &_fp[0] ); jamp_sv[97] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[98] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[99] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -19683,7 +19683,7 @@ namespace mg5amcCpu jamp_sv[111] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[113] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[117] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[47], w_fp[90], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[47], w_fp[90], COUPs[1], 1.0, &_fp[0] ); jamp_sv[98] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[99] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[106] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -19692,7 +19692,7 @@ namespace mg5amcCpu jamp_sv[109] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[116] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[117] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[47], w_fp[21], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[47], w_fp[21], COUPs[1], 1.0, &_fp[0] ); jamp_sv[97] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[100] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[106] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -19708,7 +19708,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 928 - FFV1_0( w_fp[46], w_fp[47], w_fp[65], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[47], w_fp[65], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 928 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -19724,7 +19724,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 929 - FFV1_0( w_fp[46], w_fp[113], w_fp[66], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[113], w_fp[66], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 929 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -19738,7 +19738,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 930 - FFV1_0( w_fp[99], w_fp[47], w_fp[66], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[47], w_fp[66], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 930 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -19752,7 +19752,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 931 - VVV1_0( w_fp[65], w_fp[54], w_fp[6], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[65], w_fp[54], w_fp[6], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 931 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -19772,7 +19772,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 932 - FFV1_0( w_fp[53], w_fp[2], w_fp[65], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[53], w_fp[2], w_fp[65], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 932 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -19788,7 +19788,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 933 - FFV1_0( w_fp[99], w_fp[94], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[94], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 933 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -19802,7 +19802,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 934 - FFV1_0( w_fp[99], w_fp[2], w_fp[70], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[2], w_fp[70], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 934 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -19818,7 +19818,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 935 - FFV1_0( w_fp[53], w_fp[94], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[53], w_fp[94], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 935 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -19832,7 +19832,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 936 - VVV1_0( w_fp[0], w_fp[70], w_fp[54], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[0], w_fp[70], w_fp[54], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 936 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -19852,7 +19852,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 937 - FFV1_0( w_fp[46], w_fp[2], w_fp[22], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[2], w_fp[22], COUPs[1], 1.0, &_fp[0] ); jamp_sv[3] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[13] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[19] += cxtype( 0, 1 ) * amp_sv[0]; @@ -19861,7 +19861,7 @@ namespace mg5amcCpu jamp_sv[82] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[106] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[116] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[46], w_fp[2], w_fp[103], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[2], w_fp[103], COUPs[1], 1.0, &_fp[0] ); jamp_sv[19] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[22] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[37] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -19870,7 +19870,7 @@ namespace mg5amcCpu jamp_sv[82] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[97] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[100] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[46], w_fp[2], w_fp[63], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[2], w_fp[63], COUPs[1], 1.0, &_fp[0] ); jamp_sv[3] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[13] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[37] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -19886,7 +19886,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 938 - VVV1_0( w_fp[65], w_fp[20], w_fp[4], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[65], w_fp[20], w_fp[4], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 938 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -19906,7 +19906,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 939 - FFV1_0( w_fp[28], w_fp[2], w_fp[65], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[28], w_fp[2], w_fp[65], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 939 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -19922,7 +19922,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 940 - FFV1_0( w_fp[62], w_fp[94], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[62], w_fp[94], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 940 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -19936,7 +19936,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 941 - FFV1_0( w_fp[62], w_fp[2], w_fp[69], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[62], w_fp[2], w_fp[69], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 941 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -19952,7 +19952,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 942 - FFV1_0( w_fp[28], w_fp[94], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[28], w_fp[94], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 942 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -19966,7 +19966,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 943 - VVV1_0( w_fp[0], w_fp[69], w_fp[20], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[0], w_fp[69], w_fp[20], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 943 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -19986,7 +19986,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 944 - FFV1_0( w_fp[41], w_fp[2], w_fp[93], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[2], w_fp[93], COUPs[1], 1.0, &_fp[0] ); jamp_sv[2] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[6] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[8] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -19995,7 +19995,7 @@ namespace mg5amcCpu jamp_sv[56] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[62] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[80] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[41], w_fp[2], w_fp[90], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[2], w_fp[90], COUPs[1], 1.0, &_fp[0] ); jamp_sv[6] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[8] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[36] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -20004,7 +20004,7 @@ namespace mg5amcCpu jamp_sv[50] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[78] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[80] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[41], w_fp[2], w_fp[21], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[2], w_fp[21], COUPs[1], 1.0, &_fp[0] ); jamp_sv[2] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[12] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[36] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -20020,7 +20020,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 945 - FFV1_0( w_fp[3], w_fp[15], w_fp[65], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[15], w_fp[65], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 945 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -20040,7 +20040,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 946 - FFV1_0( w_fp[14], w_fp[2], w_fp[65], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[14], w_fp[2], w_fp[65], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 946 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -20060,7 +20060,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 947 - FFV1_0( w_fp[3], w_fp[94], w_fp[101], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[94], w_fp[101], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 947 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -20080,7 +20080,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 948 - FFV1_0( w_fp[71], w_fp[2], w_fp[101], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[71], w_fp[2], w_fp[101], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 948 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -20100,7 +20100,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 949 - FFV1_0( w_fp[14], w_fp[94], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[14], w_fp[94], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 949 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -20116,7 +20116,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 950 - FFV1_0( w_fp[71], w_fp[15], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[71], w_fp[15], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 950 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -20129,10 +20129,10 @@ namespace mg5amcCpu // *** DIAGRAM 951 OF 1240 *** // Wavefunction(s) for diagram number 951 - VVV1P0_1( w_fp[0], w_fp[72], COUPs[0], 0., 0., w_fp[71] ); + VVV1P0_1( w_fp[0], w_fp[72], COUPs[0], 1.0, 0., 0., w_fp[71] ); // Amplitude(s) for diagram number 951 - VVV1_0( w_fp[71], w_fp[13], w_fp[5], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[71], w_fp[13], w_fp[5], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 951 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -20160,7 +20160,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 952 - VVV1_0( w_fp[71], w_fp[10], w_fp[4], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[71], w_fp[10], w_fp[4], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 952 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -20188,7 +20188,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 953 - VVVV1_0( w_fp[8], w_fp[4], w_fp[5], w_fp[71], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[8], w_fp[4], w_fp[5], w_fp[71], COUPs[2], 1.0, &_fp[0] ); jamp_sv[5] -= amp_sv[0]; jamp_sv[19] += amp_sv[0]; jamp_sv[43] += amp_sv[0]; @@ -20205,7 +20205,7 @@ namespace mg5amcCpu jamp_sv[82] -= amp_sv[0]; jamp_sv[92] += amp_sv[0]; jamp_sv[103] -= amp_sv[0]; - VVVV3_0( w_fp[8], w_fp[4], w_fp[5], w_fp[71], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[8], w_fp[4], w_fp[5], w_fp[71], COUPs[2], 1.0, &_fp[0] ); jamp_sv[4] -= amp_sv[0]; jamp_sv[18] += amp_sv[0]; jamp_sv[42] += amp_sv[0]; @@ -20222,7 +20222,7 @@ namespace mg5amcCpu jamp_sv[89] -= amp_sv[0]; jamp_sv[92] += amp_sv[0]; jamp_sv[102] -= amp_sv[0]; - VVVV4_0( w_fp[8], w_fp[4], w_fp[5], w_fp[71], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[8], w_fp[4], w_fp[5], w_fp[71], COUPs[2], 1.0, &_fp[0] ); jamp_sv[4] -= amp_sv[0]; jamp_sv[5] += amp_sv[0]; jamp_sv[18] += amp_sv[0]; @@ -20246,7 +20246,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 954 - VVV1_0( w_fp[56], w_fp[74], w_fp[5], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[56], w_fp[74], w_fp[5], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 954 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -20274,7 +20274,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 955 - VVV1_0( w_fp[56], w_fp[75], w_fp[4], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[56], w_fp[75], w_fp[4], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 955 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -20302,7 +20302,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 956 - VVVV1_0( w_fp[72], w_fp[4], w_fp[5], w_fp[56], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[72], w_fp[4], w_fp[5], w_fp[56], COUPs[2], 1.0, &_fp[0] ); jamp_sv[4] += amp_sv[0]; jamp_sv[7] -= amp_sv[0]; jamp_sv[10] += amp_sv[0]; @@ -20319,7 +20319,7 @@ namespace mg5amcCpu jamp_sv[89] += amp_sv[0]; jamp_sv[93] -= amp_sv[0]; jamp_sv[105] += amp_sv[0]; - VVVV3_0( w_fp[72], w_fp[4], w_fp[5], w_fp[56], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[72], w_fp[4], w_fp[5], w_fp[56], COUPs[2], 1.0, &_fp[0] ); jamp_sv[5] += amp_sv[0]; jamp_sv[7] -= amp_sv[0]; jamp_sv[8] += amp_sv[0]; @@ -20336,7 +20336,7 @@ namespace mg5amcCpu jamp_sv[83] += amp_sv[0]; jamp_sv[93] -= amp_sv[0]; jamp_sv[107] += amp_sv[0]; - VVVV4_0( w_fp[72], w_fp[4], w_fp[5], w_fp[56], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[72], w_fp[4], w_fp[5], w_fp[56], COUPs[2], 1.0, &_fp[0] ); jamp_sv[4] -= amp_sv[0]; jamp_sv[5] += amp_sv[0]; jamp_sv[8] += amp_sv[0]; @@ -20360,7 +20360,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 957 - VVV1_0( w_fp[0], w_fp[74], w_fp[10], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[0], w_fp[74], w_fp[10], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 957 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -20388,7 +20388,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 958 - VVV1_0( w_fp[0], w_fp[75], w_fp[13], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[0], w_fp[75], w_fp[13], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 958 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -20413,12 +20413,12 @@ namespace mg5amcCpu // *** DIAGRAM 959 OF 1240 *** // Wavefunction(s) for diagram number 959 - VVVV1P0_1( w_fp[0], w_fp[72], w_fp[4], COUPs[2], 0., 0., w_fp[94] ); - VVVV3P0_1( w_fp[0], w_fp[72], w_fp[4], COUPs[2], 0., 0., w_fp[65] ); - VVVV4P0_1( w_fp[0], w_fp[72], w_fp[4], COUPs[2], 0., 0., w_fp[21] ); + VVVV1P0_1( w_fp[0], w_fp[72], w_fp[4], COUPs[2], 1.0, 0., 0., w_fp[94] ); + VVVV3P0_1( w_fp[0], w_fp[72], w_fp[4], COUPs[2], 1.0, 0., 0., w_fp[65] ); + VVVV4P0_1( w_fp[0], w_fp[72], w_fp[4], COUPs[2], 1.0, 0., 0., w_fp[21] ); // Amplitude(s) for diagram number 959 - VVV1_0( w_fp[8], w_fp[5], w_fp[94], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[5], w_fp[94], COUPs[0], 1.0, &_fp[0] ); jamp_sv[4] += amp_sv[0]; jamp_sv[7] -= amp_sv[0]; jamp_sv[10] += amp_sv[0]; @@ -20435,7 +20435,7 @@ namespace mg5amcCpu jamp_sv[89] += amp_sv[0]; jamp_sv[93] -= amp_sv[0]; jamp_sv[104] += amp_sv[0]; - VVV1_0( w_fp[8], w_fp[5], w_fp[65], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[5], w_fp[65], COUPs[0], 1.0, &_fp[0] ); jamp_sv[7] -= amp_sv[0]; jamp_sv[10] += amp_sv[0]; jamp_sv[42] += amp_sv[0]; @@ -20452,7 +20452,7 @@ namespace mg5amcCpu jamp_sv[93] -= amp_sv[0]; jamp_sv[102] -= amp_sv[0]; jamp_sv[104] += amp_sv[0]; - VVV1_0( w_fp[8], w_fp[5], w_fp[21], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[5], w_fp[21], COUPs[0], 1.0, &_fp[0] ); jamp_sv[4] -= amp_sv[0]; jamp_sv[18] += amp_sv[0]; jamp_sv[42] += amp_sv[0]; @@ -20473,12 +20473,12 @@ namespace mg5amcCpu // *** DIAGRAM 960 OF 1240 *** // Wavefunction(s) for diagram number 960 - VVVV1P0_1( w_fp[0], w_fp[72], w_fp[5], COUPs[2], 0., 0., w_fp[90] ); - VVVV3P0_1( w_fp[0], w_fp[72], w_fp[5], COUPs[2], 0., 0., w_fp[93] ); - VVVV4P0_1( w_fp[0], w_fp[72], w_fp[5], COUPs[2], 0., 0., w_fp[69] ); + VVVV1P0_1( w_fp[0], w_fp[72], w_fp[5], COUPs[2], 1.0, 0., 0., w_fp[90] ); + VVVV3P0_1( w_fp[0], w_fp[72], w_fp[5], COUPs[2], 1.0, 0., 0., w_fp[93] ); + VVVV4P0_1( w_fp[0], w_fp[72], w_fp[5], COUPs[2], 1.0, 0., 0., w_fp[69] ); // Amplitude(s) for diagram number 960 - VVV1_0( w_fp[8], w_fp[4], w_fp[90], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[4], w_fp[90], COUPs[0], 1.0, &_fp[0] ); jamp_sv[5] += amp_sv[0]; jamp_sv[13] -= amp_sv[0]; jamp_sv[16] += amp_sv[0]; @@ -20495,7 +20495,7 @@ namespace mg5amcCpu jamp_sv[82] += amp_sv[0]; jamp_sv[92] -= amp_sv[0]; jamp_sv[106] += amp_sv[0]; - VVV1_0( w_fp[8], w_fp[4], w_fp[93], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[4], w_fp[93], COUPs[0], 1.0, &_fp[0] ); jamp_sv[13] -= amp_sv[0]; jamp_sv[16] += amp_sv[0]; jamp_sv[43] += amp_sv[0]; @@ -20512,7 +20512,7 @@ namespace mg5amcCpu jamp_sv[76] -= amp_sv[0]; jamp_sv[103] -= amp_sv[0]; jamp_sv[106] += amp_sv[0]; - VVV1_0( w_fp[8], w_fp[4], w_fp[69], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[4], w_fp[69], COUPs[0], 1.0, &_fp[0] ); jamp_sv[5] -= amp_sv[0]; jamp_sv[19] += amp_sv[0]; jamp_sv[43] += amp_sv[0]; @@ -20536,7 +20536,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 961 - VVV1_0( w_fp[72], w_fp[5], w_fp[107], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[72], w_fp[5], w_fp[107], COUPs[0], 1.0, &_fp[0] ); jamp_sv[5] -= amp_sv[0]; jamp_sv[13] += amp_sv[0]; jamp_sv[16] -= amp_sv[0]; @@ -20553,7 +20553,7 @@ namespace mg5amcCpu jamp_sv[82] -= amp_sv[0]; jamp_sv[92] += amp_sv[0]; jamp_sv[106] -= amp_sv[0]; - VVV1_0( w_fp[72], w_fp[5], w_fp[95], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[72], w_fp[5], w_fp[95], COUPs[0], 1.0, &_fp[0] ); jamp_sv[7] -= amp_sv[0]; jamp_sv[8] += amp_sv[0]; jamp_sv[9] -= amp_sv[0]; @@ -20570,7 +20570,7 @@ namespace mg5amcCpu jamp_sv[93] -= amp_sv[0]; jamp_sv[106] -= amp_sv[0]; jamp_sv[107] += amp_sv[0]; - VVV1_0( w_fp[72], w_fp[5], w_fp[105], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[72], w_fp[5], w_fp[105], COUPs[0], 1.0, &_fp[0] ); jamp_sv[5] += amp_sv[0]; jamp_sv[7] -= amp_sv[0]; jamp_sv[8] += amp_sv[0]; @@ -20594,7 +20594,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 962 - VVV1_0( w_fp[72], w_fp[4], w_fp[115], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[72], w_fp[4], w_fp[115], COUPs[0], 1.0, &_fp[0] ); jamp_sv[4] -= amp_sv[0]; jamp_sv[7] += amp_sv[0]; jamp_sv[10] -= amp_sv[0]; @@ -20611,7 +20611,7 @@ namespace mg5amcCpu jamp_sv[89] -= amp_sv[0]; jamp_sv[93] += amp_sv[0]; jamp_sv[104] -= amp_sv[0]; - VVV1_0( w_fp[72], w_fp[4], w_fp[116], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[72], w_fp[4], w_fp[116], COUPs[0], 1.0, &_fp[0] ); jamp_sv[13] -= amp_sv[0]; jamp_sv[14] += amp_sv[0]; jamp_sv[15] -= amp_sv[0]; @@ -20628,7 +20628,7 @@ namespace mg5amcCpu jamp_sv[76] -= amp_sv[0]; jamp_sv[104] -= amp_sv[0]; jamp_sv[105] += amp_sv[0]; - VVV1_0( w_fp[72], w_fp[4], w_fp[117], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[72], w_fp[4], w_fp[117], COUPs[0], 1.0, &_fp[0] ); jamp_sv[4] += amp_sv[0]; jamp_sv[7] -= amp_sv[0]; jamp_sv[10] += amp_sv[0]; @@ -20652,7 +20652,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 963 - VVVV1_0( w_fp[0], w_fp[72], w_fp[8], w_fp[24], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[0], w_fp[72], w_fp[8], w_fp[24], COUPs[2], 1.0, &_fp[0] ); jamp_sv[4] += amp_sv[0]; jamp_sv[5] -= amp_sv[0]; jamp_sv[18] -= amp_sv[0]; @@ -20669,7 +20669,7 @@ namespace mg5amcCpu jamp_sv[89] += amp_sv[0]; jamp_sv[102] += amp_sv[0]; jamp_sv[103] -= amp_sv[0]; - VVVV3_0( w_fp[0], w_fp[72], w_fp[8], w_fp[24], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[0], w_fp[72], w_fp[8], w_fp[24], COUPs[2], 1.0, &_fp[0] ); jamp_sv[4] += amp_sv[0]; jamp_sv[5] -= amp_sv[0]; jamp_sv[8] -= amp_sv[0]; @@ -20686,7 +20686,7 @@ namespace mg5amcCpu jamp_sv[89] += amp_sv[0]; jamp_sv[105] += amp_sv[0]; jamp_sv[107] -= amp_sv[0]; - VVVV4_0( w_fp[0], w_fp[72], w_fp[8], w_fp[24], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[0], w_fp[72], w_fp[8], w_fp[24], COUPs[2], 1.0, &_fp[0] ); jamp_sv[8] -= amp_sv[0]; jamp_sv[9] += amp_sv[0]; jamp_sv[14] += amp_sv[0]; @@ -20710,7 +20710,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 964 - VVV1_0( w_fp[8], w_fp[24], w_fp[71], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[24], w_fp[71], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 964 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -20738,7 +20738,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 965 - VVV1_0( w_fp[72], w_fp[24], w_fp[56], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[72], w_fp[24], w_fp[56], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 965 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -20766,7 +20766,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 966 - VVV1_0( w_fp[72], w_fp[8], w_fp[98], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[72], w_fp[8], w_fp[98], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 966 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -20794,7 +20794,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 967 - VVV1_0( w_fp[71], w_fp[37], w_fp[5], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[71], w_fp[37], w_fp[5], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 967 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -20814,7 +20814,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 968 - FFV1_0( w_fp[3], w_fp[35], w_fp[71], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[35], w_fp[71], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 968 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -20830,7 +20830,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 969 - FFV1_0( w_fp[76], w_fp[114], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[76], w_fp[114], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 969 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -20844,7 +20844,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 970 - FFV1_0( w_fp[3], w_fp[114], w_fp[75], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[114], w_fp[75], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 970 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -20860,7 +20860,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 971 - FFV1_0( w_fp[76], w_fp[35], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[76], w_fp[35], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 971 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -20874,7 +20874,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 972 - VVV1_0( w_fp[0], w_fp[75], w_fp[37], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[0], w_fp[75], w_fp[37], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 972 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -20894,7 +20894,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 973 - FFV1_0( w_fp[3], w_fp[33], w_fp[90], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[33], w_fp[90], COUPs[1], 1.0, &_fp[0] ); jamp_sv[49] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[50] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[51] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -20903,7 +20903,7 @@ namespace mg5amcCpu jamp_sv[63] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[65] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[69] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[33], w_fp[93], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[33], w_fp[93], COUPs[1], 1.0, &_fp[0] ); jamp_sv[50] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[51] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[58] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -20912,7 +20912,7 @@ namespace mg5amcCpu jamp_sv[61] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[68] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[69] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[33], w_fp[69], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[33], w_fp[69], COUPs[1], 1.0, &_fp[0] ); jamp_sv[49] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[52] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[58] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -20928,7 +20928,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 974 - FFV1_0( w_fp[38], w_fp[33], w_fp[71], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[33], w_fp[71], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 974 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -20944,7 +20944,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 975 - FFV1_0( w_fp[38], w_fp[114], w_fp[72], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[114], w_fp[72], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 975 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -20958,7 +20958,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 976 - FFV1_0( w_fp[104], w_fp[33], w_fp[72], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[104], w_fp[33], w_fp[72], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 976 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -20972,7 +20972,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 977 - VVV1_0( w_fp[71], w_fp[45], w_fp[4], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[71], w_fp[45], w_fp[4], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 977 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -20992,7 +20992,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 978 - FFV1_0( w_fp[3], w_fp[43], w_fp[71], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[43], w_fp[71], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 978 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -21008,7 +21008,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 979 - FFV1_0( w_fp[76], w_fp[102], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[76], w_fp[102], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 979 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -21022,7 +21022,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 980 - FFV1_0( w_fp[3], w_fp[102], w_fp[74], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[102], w_fp[74], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 980 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -21038,7 +21038,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 981 - FFV1_0( w_fp[76], w_fp[43], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[76], w_fp[43], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 981 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -21052,7 +21052,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 982 - VVV1_0( w_fp[0], w_fp[74], w_fp[45], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[0], w_fp[74], w_fp[45], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 982 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -21072,7 +21072,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 983 - FFV1_0( w_fp[3], w_fp[39], w_fp[94], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[39], w_fp[94], COUPs[1], 1.0, &_fp[0] ); jamp_sv[73] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[74] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[75] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -21081,7 +21081,7 @@ namespace mg5amcCpu jamp_sv[87] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[89] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[93] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[39], w_fp[65], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[39], w_fp[65], COUPs[1], 1.0, &_fp[0] ); jamp_sv[74] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[75] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[82] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -21090,7 +21090,7 @@ namespace mg5amcCpu jamp_sv[85] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[92] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[93] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[39], w_fp[21], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[39], w_fp[21], COUPs[1], 1.0, &_fp[0] ); jamp_sv[73] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[76] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[82] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -21106,7 +21106,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 984 - FFV1_0( w_fp[46], w_fp[39], w_fp[71], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[39], w_fp[71], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 984 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -21122,7 +21122,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 985 - FFV1_0( w_fp[46], w_fp[102], w_fp[72], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[102], w_fp[72], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 985 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -21136,7 +21136,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 986 - FFV1_0( w_fp[99], w_fp[39], w_fp[72], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[39], w_fp[72], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 986 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -21150,7 +21150,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 987 - VVV1_0( w_fp[71], w_fp[54], w_fp[5], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[71], w_fp[54], w_fp[5], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 987 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -21170,7 +21170,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 988 - FFV1_0( w_fp[7], w_fp[2], w_fp[71], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[7], w_fp[2], w_fp[71], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 988 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -21186,7 +21186,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 989 - FFV1_0( w_fp[99], w_fp[97], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[97], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 989 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -21200,7 +21200,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 990 - FFV1_0( w_fp[99], w_fp[2], w_fp[75], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[2], w_fp[75], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 990 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -21216,7 +21216,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 991 - FFV1_0( w_fp[7], w_fp[97], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[7], w_fp[97], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 991 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -21230,7 +21230,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 992 - VVV1_0( w_fp[0], w_fp[75], w_fp[54], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[0], w_fp[75], w_fp[54], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 992 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -21250,7 +21250,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 993 - FFV1_0( w_fp[46], w_fp[2], w_fp[90], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[2], w_fp[90], COUPs[1], 1.0, &_fp[0] ); jamp_sv[5] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[13] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[16] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -21259,7 +21259,7 @@ namespace mg5amcCpu jamp_sv[82] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[92] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[106] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[46], w_fp[2], w_fp[93], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[2], w_fp[93], COUPs[1], 1.0, &_fp[0] ); jamp_sv[13] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[16] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[43] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -21268,7 +21268,7 @@ namespace mg5amcCpu jamp_sv[76] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[103] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[106] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[46], w_fp[2], w_fp[69], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[2], w_fp[69], COUPs[1], 1.0, &_fp[0] ); jamp_sv[5] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[19] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[43] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -21284,7 +21284,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 994 - VVV1_0( w_fp[71], w_fp[23], w_fp[4], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[71], w_fp[23], w_fp[4], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 994 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -21304,7 +21304,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 995 - FFV1_0( w_fp[25], w_fp[2], w_fp[71], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[25], w_fp[2], w_fp[71], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 995 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -21320,7 +21320,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 996 - FFV1_0( w_fp[104], w_fp[97], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[104], w_fp[97], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 996 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -21334,7 +21334,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 997 - FFV1_0( w_fp[104], w_fp[2], w_fp[74], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[104], w_fp[2], w_fp[74], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 997 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -21350,7 +21350,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 998 - FFV1_0( w_fp[25], w_fp[97], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[25], w_fp[97], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 998 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -21364,7 +21364,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 999 - VVV1_0( w_fp[0], w_fp[74], w_fp[23], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[0], w_fp[74], w_fp[23], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 999 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -21384,7 +21384,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1000 - FFV1_0( w_fp[38], w_fp[2], w_fp[94], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[2], w_fp[94], COUPs[1], 1.0, &_fp[0] ); jamp_sv[4] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[7] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[10] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -21393,7 +21393,7 @@ namespace mg5amcCpu jamp_sv[58] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[68] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[104] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[38], w_fp[2], w_fp[65], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[2], w_fp[65], COUPs[1], 1.0, &_fp[0] ); jamp_sv[7] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[10] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[42] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -21402,7 +21402,7 @@ namespace mg5amcCpu jamp_sv[52] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[102] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[104] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[38], w_fp[2], w_fp[21], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[2], w_fp[21], COUPs[1], 1.0, &_fp[0] ); jamp_sv[4] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[18] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[42] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -21418,7 +21418,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1001 - FFV1_0( w_fp[3], w_fp[17], w_fp[71], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[17], w_fp[71], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1001 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -21438,7 +21438,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1002 - FFV1_0( w_fp[26], w_fp[2], w_fp[71], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[26], w_fp[2], w_fp[71], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1002 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -21458,7 +21458,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1003 - FFV1_0( w_fp[3], w_fp[97], w_fp[98], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[97], w_fp[98], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1003 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -21478,7 +21478,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1004 - FFV1_0( w_fp[76], w_fp[2], w_fp[98], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[76], w_fp[2], w_fp[98], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1004 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -21498,7 +21498,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1005 - FFV1_0( w_fp[26], w_fp[97], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[26], w_fp[97], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1005 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -21514,7 +21514,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1006 - FFV1_0( w_fp[76], w_fp[17], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[76], w_fp[17], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1006 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -21530,7 +21530,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1007 - VVV1_0( w_fp[56], w_fp[59], w_fp[6], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[56], w_fp[59], w_fp[6], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1007 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -21558,7 +21558,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1008 - VVV1_0( w_fp[56], w_fp[1], w_fp[42], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[56], w_fp[1], w_fp[42], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1008 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -21586,7 +21586,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1009 - VVVV1_0( w_fp[1], w_fp[24], w_fp[6], w_fp[56], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[1], w_fp[24], w_fp[6], w_fp[56], COUPs[2], 1.0, &_fp[0] ); jamp_sv[0] += amp_sv[0]; jamp_sv[2] -= amp_sv[0]; jamp_sv[8] -= amp_sv[0]; @@ -21603,7 +21603,7 @@ namespace mg5amcCpu jamp_sv[107] -= amp_sv[0]; jamp_sv[113] -= amp_sv[0]; jamp_sv[119] += amp_sv[0]; - VVVV3_0( w_fp[1], w_fp[24], w_fp[6], w_fp[56], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[1], w_fp[24], w_fp[6], w_fp[56], COUPs[2], 1.0, &_fp[0] ); jamp_sv[4] += amp_sv[0]; jamp_sv[5] -= amp_sv[0]; jamp_sv[8] -= amp_sv[0]; @@ -21620,7 +21620,7 @@ namespace mg5amcCpu jamp_sv[89] += amp_sv[0]; jamp_sv[105] += amp_sv[0]; jamp_sv[107] -= amp_sv[0]; - VVVV4_0( w_fp[1], w_fp[24], w_fp[6], w_fp[56], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[1], w_fp[24], w_fp[6], w_fp[56], COUPs[2], 1.0, &_fp[0] ); jamp_sv[0] -= amp_sv[0]; jamp_sv[2] += amp_sv[0]; jamp_sv[4] += amp_sv[0]; @@ -21644,7 +21644,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1010 - VVV1_0( w_fp[98], w_fp[108], w_fp[6], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[98], w_fp[108], w_fp[6], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1010 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -21672,7 +21672,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1011 - VVV1_0( w_fp[98], w_fp[1], w_fp[11], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[98], w_fp[1], w_fp[11], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1011 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -21700,7 +21700,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1012 - VVVV1_0( w_fp[1], w_fp[8], w_fp[6], w_fp[98], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[1], w_fp[8], w_fp[6], w_fp[98], COUPs[2], 1.0, &_fp[0] ); jamp_sv[9] += amp_sv[0]; jamp_sv[15] -= amp_sv[0]; jamp_sv[24] -= amp_sv[0]; @@ -21717,7 +21717,7 @@ namespace mg5amcCpu jamp_sv[101] += amp_sv[0]; jamp_sv[112] += amp_sv[0]; jamp_sv[118] -= amp_sv[0]; - VVVV3_0( w_fp[1], w_fp[8], w_fp[6], w_fp[98], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[1], w_fp[8], w_fp[6], w_fp[98], COUPs[2], 1.0, &_fp[0] ); jamp_sv[8] -= amp_sv[0]; jamp_sv[9] += amp_sv[0]; jamp_sv[14] += amp_sv[0]; @@ -21734,7 +21734,7 @@ namespace mg5amcCpu jamp_sv[103] += amp_sv[0]; jamp_sv[105] += amp_sv[0]; jamp_sv[107] -= amp_sv[0]; - VVVV4_0( w_fp[1], w_fp[8], w_fp[6], w_fp[98], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[1], w_fp[8], w_fp[6], w_fp[98], COUPs[2], 1.0, &_fp[0] ); jamp_sv[8] -= amp_sv[0]; jamp_sv[14] += amp_sv[0]; jamp_sv[24] += amp_sv[0]; @@ -21758,7 +21758,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1013 - VVV1_0( w_fp[0], w_fp[108], w_fp[42], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[0], w_fp[108], w_fp[42], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1013 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -21786,7 +21786,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1014 - VVV1_0( w_fp[0], w_fp[59], w_fp[11], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[0], w_fp[59], w_fp[11], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1014 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -21811,12 +21811,12 @@ namespace mg5amcCpu // *** DIAGRAM 1015 OF 1240 *** // Wavefunction(s) for diagram number 1015 - VVVV1P0_1( w_fp[0], w_fp[1], w_fp[8], COUPs[2], 0., 0., w_fp[11] ); - VVVV3P0_1( w_fp[0], w_fp[1], w_fp[8], COUPs[2], 0., 0., w_fp[42] ); - VVVV4P0_1( w_fp[0], w_fp[1], w_fp[8], COUPs[2], 0., 0., w_fp[76] ); + VVVV1P0_1( w_fp[0], w_fp[1], w_fp[8], COUPs[2], 1.0, 0., 0., w_fp[11] ); + VVVV3P0_1( w_fp[0], w_fp[1], w_fp[8], COUPs[2], 1.0, 0., 0., w_fp[42] ); + VVVV4P0_1( w_fp[0], w_fp[1], w_fp[8], COUPs[2], 1.0, 0., 0., w_fp[76] ); // Amplitude(s) for diagram number 1015 - VVV1_0( w_fp[24], w_fp[6], w_fp[11], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[24], w_fp[6], w_fp[11], COUPs[0], 1.0, &_fp[0] ); jamp_sv[9] += amp_sv[0]; jamp_sv[15] -= amp_sv[0]; jamp_sv[21] -= amp_sv[0]; @@ -21833,7 +21833,7 @@ namespace mg5amcCpu jamp_sv[88] += amp_sv[0]; jamp_sv[112] += amp_sv[0]; jamp_sv[118] -= amp_sv[0]; - VVV1_0( w_fp[24], w_fp[6], w_fp[42], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[24], w_fp[6], w_fp[42], COUPs[0], 1.0, &_fp[0] ); jamp_sv[0] -= amp_sv[0]; jamp_sv[2] += amp_sv[0]; jamp_sv[4] += amp_sv[0]; @@ -21850,7 +21850,7 @@ namespace mg5amcCpu jamp_sv[89] += amp_sv[0]; jamp_sv[113] += amp_sv[0]; jamp_sv[119] -= amp_sv[0]; - VVV1_0( w_fp[24], w_fp[6], w_fp[76], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[24], w_fp[6], w_fp[76], COUPs[0], 1.0, &_fp[0] ); jamp_sv[0] -= amp_sv[0]; jamp_sv[2] += amp_sv[0]; jamp_sv[4] += amp_sv[0]; @@ -21871,12 +21871,12 @@ namespace mg5amcCpu // *** DIAGRAM 1016 OF 1240 *** // Wavefunction(s) for diagram number 1016 - VVVV1P0_1( w_fp[0], w_fp[1], w_fp[24], COUPs[2], 0., 0., w_fp[97] ); - VVVV3P0_1( w_fp[0], w_fp[1], w_fp[24], COUPs[2], 0., 0., w_fp[71] ); - VVVV4P0_1( w_fp[0], w_fp[1], w_fp[24], COUPs[2], 0., 0., w_fp[21] ); + VVVV1P0_1( w_fp[0], w_fp[1], w_fp[24], COUPs[2], 1.0, 0., 0., w_fp[97] ); + VVVV3P0_1( w_fp[0], w_fp[1], w_fp[24], COUPs[2], 1.0, 0., 0., w_fp[71] ); + VVVV4P0_1( w_fp[0], w_fp[1], w_fp[24], COUPs[2], 1.0, 0., 0., w_fp[21] ); // Amplitude(s) for diagram number 1016 - VVV1_0( w_fp[8], w_fp[6], w_fp[97], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[6], w_fp[97], COUPs[0], 1.0, &_fp[0] ); jamp_sv[0] += amp_sv[0]; jamp_sv[2] -= amp_sv[0]; jamp_sv[8] -= amp_sv[0]; @@ -21893,7 +21893,7 @@ namespace mg5amcCpu jamp_sv[107] -= amp_sv[0]; jamp_sv[113] -= amp_sv[0]; jamp_sv[119] += amp_sv[0]; - VVV1_0( w_fp[8], w_fp[6], w_fp[71], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[6], w_fp[71], COUPs[0], 1.0, &_fp[0] ); jamp_sv[8] -= amp_sv[0]; jamp_sv[14] += amp_sv[0]; jamp_sv[24] += amp_sv[0]; @@ -21910,7 +21910,7 @@ namespace mg5amcCpu jamp_sv[107] -= amp_sv[0]; jamp_sv[112] -= amp_sv[0]; jamp_sv[118] += amp_sv[0]; - VVV1_0( w_fp[8], w_fp[6], w_fp[21], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[6], w_fp[21], COUPs[0], 1.0, &_fp[0] ); jamp_sv[0] -= amp_sv[0]; jamp_sv[2] += amp_sv[0]; jamp_sv[24] += amp_sv[0]; @@ -21934,7 +21934,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1017 - VVV1_0( w_fp[1], w_fp[24], w_fp[118], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[24], w_fp[118], COUPs[0], 1.0, &_fp[0] ); jamp_sv[0] -= amp_sv[0]; jamp_sv[2] += amp_sv[0]; jamp_sv[8] += amp_sv[0]; @@ -21951,7 +21951,7 @@ namespace mg5amcCpu jamp_sv[107] += amp_sv[0]; jamp_sv[113] += amp_sv[0]; jamp_sv[119] -= amp_sv[0]; - VVV1_0( w_fp[1], w_fp[24], w_fp[119], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[24], w_fp[119], COUPs[0], 1.0, &_fp[0] ); jamp_sv[18] -= amp_sv[0]; jamp_sv[19] += amp_sv[0]; jamp_sv[21] += amp_sv[0]; @@ -21968,7 +21968,7 @@ namespace mg5amcCpu jamp_sv[97] -= amp_sv[0]; jamp_sv[99] -= amp_sv[0]; jamp_sv[101] += amp_sv[0]; - VVV1_0( w_fp[1], w_fp[24], w_fp[120], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[24], w_fp[120], COUPs[0], 1.0, &_fp[0] ); jamp_sv[0] += amp_sv[0]; jamp_sv[2] -= amp_sv[0]; jamp_sv[8] -= amp_sv[0]; @@ -21992,7 +21992,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1018 - VVV1_0( w_fp[1], w_fp[8], w_fp[85], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[8], w_fp[85], COUPs[0], 1.0, &_fp[0] ); jamp_sv[9] -= amp_sv[0]; jamp_sv[15] += amp_sv[0]; jamp_sv[21] += amp_sv[0]; @@ -22009,7 +22009,7 @@ namespace mg5amcCpu jamp_sv[88] -= amp_sv[0]; jamp_sv[112] -= amp_sv[0]; jamp_sv[118] += amp_sv[0]; - VVV1_0( w_fp[1], w_fp[8], w_fp[112], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[8], w_fp[112], COUPs[0], 1.0, &_fp[0] ); jamp_sv[21] += amp_sv[0]; jamp_sv[23] -= amp_sv[0]; jamp_sv[28] -= amp_sv[0]; @@ -22026,7 +22026,7 @@ namespace mg5amcCpu jamp_sv[88] -= amp_sv[0]; jamp_sv[99] -= amp_sv[0]; jamp_sv[101] += amp_sv[0]; - VVV1_0( w_fp[1], w_fp[8], w_fp[111], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[8], w_fp[111], COUPs[0], 1.0, &_fp[0] ); jamp_sv[9] += amp_sv[0]; jamp_sv[15] -= amp_sv[0]; jamp_sv[24] -= amp_sv[0]; @@ -22050,7 +22050,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1019 - VVV1_0( w_fp[56], w_fp[68], w_fp[5], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[56], w_fp[68], w_fp[5], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1019 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -22078,7 +22078,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1020 - VVV1_0( w_fp[56], w_fp[1], w_fp[16], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[56], w_fp[1], w_fp[16], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1020 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -22106,7 +22106,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1021 - VVVV1_0( w_fp[1], w_fp[27], w_fp[5], w_fp[56], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[1], w_fp[27], w_fp[5], w_fp[56], COUPs[2], 1.0, &_fp[0] ); jamp_sv[1] += amp_sv[0]; jamp_sv[4] -= amp_sv[0]; jamp_sv[10] -= amp_sv[0]; @@ -22123,7 +22123,7 @@ namespace mg5amcCpu jamp_sv[89] -= amp_sv[0]; jamp_sv[95] += amp_sv[0]; jamp_sv[111] -= amp_sv[0]; - VVVV3_0( w_fp[1], w_fp[27], w_fp[5], w_fp[56], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[1], w_fp[27], w_fp[5], w_fp[56], COUPs[2], 1.0, &_fp[0] ); jamp_sv[2] += amp_sv[0]; jamp_sv[3] -= amp_sv[0]; jamp_sv[10] -= amp_sv[0]; @@ -22140,7 +22140,7 @@ namespace mg5amcCpu jamp_sv[83] -= amp_sv[0]; jamp_sv[111] -= amp_sv[0]; jamp_sv[113] += amp_sv[0]; - VVVV4_0( w_fp[1], w_fp[27], w_fp[5], w_fp[56], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[1], w_fp[27], w_fp[5], w_fp[56], COUPs[2], 1.0, &_fp[0] ); jamp_sv[1] -= amp_sv[0]; jamp_sv[2] += amp_sv[0]; jamp_sv[3] -= amp_sv[0]; @@ -22164,7 +22164,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1022 - VVV1_0( w_fp[101], w_fp[108], w_fp[5], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[101], w_fp[108], w_fp[5], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1022 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -22192,7 +22192,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1023 - VVV1_0( w_fp[101], w_fp[1], w_fp[10], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[101], w_fp[1], w_fp[10], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1023 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -22220,7 +22220,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1024 - VVVV1_0( w_fp[1], w_fp[8], w_fp[5], w_fp[101], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[1], w_fp[8], w_fp[5], w_fp[101], COUPs[2], 1.0, &_fp[0] ); jamp_sv[11] += amp_sv[0]; jamp_sv[21] -= amp_sv[0]; jamp_sv[25] -= amp_sv[0]; @@ -22237,7 +22237,7 @@ namespace mg5amcCpu jamp_sv[88] += amp_sv[0]; jamp_sv[94] -= amp_sv[0]; jamp_sv[109] += amp_sv[0]; - VVVV3_0( w_fp[1], w_fp[8], w_fp[5], w_fp[101], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[1], w_fp[8], w_fp[5], w_fp[101], COUPs[2], 1.0, &_fp[0] ); jamp_sv[10] -= amp_sv[0]; jamp_sv[11] += amp_sv[0]; jamp_sv[20] += amp_sv[0]; @@ -22254,7 +22254,7 @@ namespace mg5amcCpu jamp_sv[83] -= amp_sv[0]; jamp_sv[108] -= amp_sv[0]; jamp_sv[109] += amp_sv[0]; - VVVV4_0( w_fp[1], w_fp[8], w_fp[5], w_fp[101], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[1], w_fp[8], w_fp[5], w_fp[101], COUPs[2], 1.0, &_fp[0] ); jamp_sv[10] -= amp_sv[0]; jamp_sv[20] += amp_sv[0]; jamp_sv[25] += amp_sv[0]; @@ -22278,7 +22278,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1025 - VVV1_0( w_fp[0], w_fp[108], w_fp[16], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[0], w_fp[108], w_fp[16], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1025 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -22306,7 +22306,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1026 - VVV1_0( w_fp[0], w_fp[68], w_fp[10], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[0], w_fp[68], w_fp[10], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1026 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -22334,7 +22334,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1027 - VVV1_0( w_fp[27], w_fp[5], w_fp[11], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[27], w_fp[5], w_fp[11], COUPs[0], 1.0, &_fp[0] ); jamp_sv[11] += amp_sv[0]; jamp_sv[15] -= amp_sv[0]; jamp_sv[17] += amp_sv[0]; @@ -22351,7 +22351,7 @@ namespace mg5amcCpu jamp_sv[88] += amp_sv[0]; jamp_sv[94] -= amp_sv[0]; jamp_sv[112] += amp_sv[0]; - VVV1_0( w_fp[27], w_fp[5], w_fp[42], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[27], w_fp[5], w_fp[42], COUPs[0], 1.0, &_fp[0] ); jamp_sv[1] -= amp_sv[0]; jamp_sv[2] += amp_sv[0]; jamp_sv[3] -= amp_sv[0]; @@ -22368,7 +22368,7 @@ namespace mg5amcCpu jamp_sv[89] += amp_sv[0]; jamp_sv[95] -= amp_sv[0]; jamp_sv[113] += amp_sv[0]; - VVV1_0( w_fp[27], w_fp[5], w_fp[76], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[27], w_fp[5], w_fp[76], COUPs[0], 1.0, &_fp[0] ); jamp_sv[1] -= amp_sv[0]; jamp_sv[2] += amp_sv[0]; jamp_sv[3] -= amp_sv[0]; @@ -22389,12 +22389,12 @@ namespace mg5amcCpu // *** DIAGRAM 1028 OF 1240 *** // Wavefunction(s) for diagram number 1028 - VVVV1P0_1( w_fp[0], w_fp[1], w_fp[27], COUPs[2], 0., 0., w_fp[10] ); - VVVV3P0_1( w_fp[0], w_fp[1], w_fp[27], COUPs[2], 0., 0., w_fp[16] ); - VVVV4P0_1( w_fp[0], w_fp[1], w_fp[27], COUPs[2], 0., 0., w_fp[111] ); + VVVV1P0_1( w_fp[0], w_fp[1], w_fp[27], COUPs[2], 1.0, 0., 0., w_fp[10] ); + VVVV3P0_1( w_fp[0], w_fp[1], w_fp[27], COUPs[2], 1.0, 0., 0., w_fp[16] ); + VVVV4P0_1( w_fp[0], w_fp[1], w_fp[27], COUPs[2], 1.0, 0., 0., w_fp[111] ); // Amplitude(s) for diagram number 1028 - VVV1_0( w_fp[8], w_fp[5], w_fp[10], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[5], w_fp[10], COUPs[0], 1.0, &_fp[0] ); jamp_sv[1] += amp_sv[0]; jamp_sv[4] -= amp_sv[0]; jamp_sv[10] -= amp_sv[0]; @@ -22411,7 +22411,7 @@ namespace mg5amcCpu jamp_sv[89] -= amp_sv[0]; jamp_sv[95] += amp_sv[0]; jamp_sv[110] -= amp_sv[0]; - VVV1_0( w_fp[8], w_fp[5], w_fp[16], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[5], w_fp[16], COUPs[0], 1.0, &_fp[0] ); jamp_sv[10] -= amp_sv[0]; jamp_sv[20] += amp_sv[0]; jamp_sv[25] += amp_sv[0]; @@ -22428,7 +22428,7 @@ namespace mg5amcCpu jamp_sv[88] -= amp_sv[0]; jamp_sv[94] += amp_sv[0]; jamp_sv[108] -= amp_sv[0]; - VVV1_0( w_fp[8], w_fp[5], w_fp[111], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[5], w_fp[111], COUPs[0], 1.0, &_fp[0] ); jamp_sv[1] -= amp_sv[0]; jamp_sv[4] += amp_sv[0]; jamp_sv[25] += amp_sv[0]; @@ -22452,7 +22452,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1029 - VVV1_0( w_fp[1], w_fp[27], w_fp[115], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[27], w_fp[115], COUPs[0], 1.0, &_fp[0] ); jamp_sv[1] -= amp_sv[0]; jamp_sv[4] += amp_sv[0]; jamp_sv[10] += amp_sv[0]; @@ -22469,7 +22469,7 @@ namespace mg5amcCpu jamp_sv[89] += amp_sv[0]; jamp_sv[95] -= amp_sv[0]; jamp_sv[110] += amp_sv[0]; - VVV1_0( w_fp[1], w_fp[27], w_fp[116], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[27], w_fp[116], COUPs[0], 1.0, &_fp[0] ); jamp_sv[12] -= amp_sv[0]; jamp_sv[13] += amp_sv[0]; jamp_sv[15] += amp_sv[0]; @@ -22486,7 +22486,7 @@ namespace mg5amcCpu jamp_sv[77] += amp_sv[0]; jamp_sv[110] += amp_sv[0]; jamp_sv[111] -= amp_sv[0]; - VVV1_0( w_fp[1], w_fp[27], w_fp[117], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[27], w_fp[117], COUPs[0], 1.0, &_fp[0] ); jamp_sv[1] += amp_sv[0]; jamp_sv[4] -= amp_sv[0]; jamp_sv[10] -= amp_sv[0]; @@ -22510,7 +22510,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1030 - VVV1_0( w_fp[1], w_fp[8], w_fp[9], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[8], w_fp[9], COUPs[0], 1.0, &_fp[0] ); jamp_sv[11] -= amp_sv[0]; jamp_sv[15] += amp_sv[0]; jamp_sv[17] -= amp_sv[0]; @@ -22527,7 +22527,7 @@ namespace mg5amcCpu jamp_sv[88] -= amp_sv[0]; jamp_sv[94] += amp_sv[0]; jamp_sv[112] -= amp_sv[0]; - VVV1_0( w_fp[1], w_fp[8], w_fp[110], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[8], w_fp[110], COUPs[0], 1.0, &_fp[0] ); jamp_sv[15] += amp_sv[0]; jamp_sv[17] -= amp_sv[0]; jamp_sv[26] -= amp_sv[0]; @@ -22544,7 +22544,7 @@ namespace mg5amcCpu jamp_sv[77] += amp_sv[0]; jamp_sv[109] += amp_sv[0]; jamp_sv[112] -= amp_sv[0]; - VVV1_0( w_fp[1], w_fp[8], w_fp[109], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[8], w_fp[109], COUPs[0], 1.0, &_fp[0] ); jamp_sv[11] += amp_sv[0]; jamp_sv[21] -= amp_sv[0]; jamp_sv[25] -= amp_sv[0]; @@ -22568,7 +22568,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1031 - VVV1_0( w_fp[56], w_fp[67], w_fp[4], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[56], w_fp[67], w_fp[4], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1031 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -22596,7 +22596,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1032 - VVV1_0( w_fp[56], w_fp[1], w_fp[19], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[56], w_fp[1], w_fp[19], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1032 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -22624,7 +22624,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1033 - VVVV1_0( w_fp[1], w_fp[4], w_fp[29], w_fp[56], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[1], w_fp[4], w_fp[29], w_fp[56], COUPs[2], 1.0, &_fp[0] ); jamp_sv[0] += amp_sv[0]; jamp_sv[1] -= amp_sv[0]; jamp_sv[6] -= amp_sv[0]; @@ -22641,7 +22641,7 @@ namespace mg5amcCpu jamp_sv[95] -= amp_sv[0]; jamp_sv[117] -= amp_sv[0]; jamp_sv[119] += amp_sv[0]; - VVVV3_0( w_fp[1], w_fp[4], w_fp[29], w_fp[56], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[1], w_fp[4], w_fp[29], w_fp[56], COUPs[2], 1.0, &_fp[0] ); jamp_sv[3] += amp_sv[0]; jamp_sv[5] -= amp_sv[0]; jamp_sv[6] -= amp_sv[0]; @@ -22658,7 +22658,7 @@ namespace mg5amcCpu jamp_sv[71] += amp_sv[0]; jamp_sv[93] += amp_sv[0]; jamp_sv[117] -= amp_sv[0]; - VVVV4_0( w_fp[1], w_fp[4], w_fp[29], w_fp[56], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[1], w_fp[4], w_fp[29], w_fp[56], COUPs[2], 1.0, &_fp[0] ); jamp_sv[0] -= amp_sv[0]; jamp_sv[1] += amp_sv[0]; jamp_sv[3] += amp_sv[0]; @@ -22682,7 +22682,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1034 - VVV1_0( w_fp[96], w_fp[108], w_fp[4], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[96], w_fp[108], w_fp[4], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1034 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -22710,7 +22710,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1035 - VVV1_0( w_fp[96], w_fp[1], w_fp[13], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[96], w_fp[1], w_fp[13], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1035 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -22738,7 +22738,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1036 - VVVV1_0( w_fp[1], w_fp[8], w_fp[4], w_fp[96], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[1], w_fp[8], w_fp[4], w_fp[96], COUPs[2], 1.0, &_fp[0] ); jamp_sv[17] += amp_sv[0]; jamp_sv[23] -= amp_sv[0]; jamp_sv[27] -= amp_sv[0]; @@ -22755,7 +22755,7 @@ namespace mg5amcCpu jamp_sv[70] -= amp_sv[0]; jamp_sv[91] -= amp_sv[0]; jamp_sv[115] += amp_sv[0]; - VVVV3_0( w_fp[1], w_fp[8], w_fp[4], w_fp[96], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[1], w_fp[8], w_fp[4], w_fp[96], COUPs[2], 1.0, &_fp[0] ); jamp_sv[16] -= amp_sv[0]; jamp_sv[17] += amp_sv[0]; jamp_sv[22] += amp_sv[0]; @@ -22772,7 +22772,7 @@ namespace mg5amcCpu jamp_sv[91] -= amp_sv[0]; jamp_sv[114] -= amp_sv[0]; jamp_sv[115] += amp_sv[0]; - VVVV4_0( w_fp[1], w_fp[8], w_fp[4], w_fp[96], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[1], w_fp[8], w_fp[4], w_fp[96], COUPs[2], 1.0, &_fp[0] ); jamp_sv[16] -= amp_sv[0]; jamp_sv[22] += amp_sv[0]; jamp_sv[27] += amp_sv[0]; @@ -22796,7 +22796,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1037 - VVV1_0( w_fp[0], w_fp[108], w_fp[19], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[0], w_fp[108], w_fp[19], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1037 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -22824,7 +22824,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1038 - VVV1_0( w_fp[0], w_fp[67], w_fp[13], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[0], w_fp[67], w_fp[13], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1038 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -22852,7 +22852,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1039 - VVV1_0( w_fp[4], w_fp[29], w_fp[11], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[4], w_fp[29], w_fp[11], COUPs[0], 1.0, &_fp[0] ); jamp_sv[9] += amp_sv[0]; jamp_sv[11] -= amp_sv[0]; jamp_sv[17] -= amp_sv[0]; @@ -22869,7 +22869,7 @@ namespace mg5amcCpu jamp_sv[70] += amp_sv[0]; jamp_sv[94] += amp_sv[0]; jamp_sv[118] -= amp_sv[0]; - VVV1_0( w_fp[4], w_fp[29], w_fp[42], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[4], w_fp[29], w_fp[42], COUPs[0], 1.0, &_fp[0] ); jamp_sv[0] -= amp_sv[0]; jamp_sv[1] += amp_sv[0]; jamp_sv[3] += amp_sv[0]; @@ -22886,7 +22886,7 @@ namespace mg5amcCpu jamp_sv[71] += amp_sv[0]; jamp_sv[95] += amp_sv[0]; jamp_sv[119] -= amp_sv[0]; - VVV1_0( w_fp[4], w_fp[29], w_fp[76], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[4], w_fp[29], w_fp[76], COUPs[0], 1.0, &_fp[0] ); jamp_sv[0] -= amp_sv[0]; jamp_sv[1] += amp_sv[0]; jamp_sv[3] += amp_sv[0]; @@ -22907,12 +22907,12 @@ namespace mg5amcCpu // *** DIAGRAM 1040 OF 1240 *** // Wavefunction(s) for diagram number 1040 - VVVV1P0_1( w_fp[0], w_fp[1], w_fp[29], COUPs[2], 0., 0., w_fp[76] ); - VVVV3P0_1( w_fp[0], w_fp[1], w_fp[29], COUPs[2], 0., 0., w_fp[42] ); - VVVV4P0_1( w_fp[0], w_fp[1], w_fp[29], COUPs[2], 0., 0., w_fp[11] ); + VVVV1P0_1( w_fp[0], w_fp[1], w_fp[29], COUPs[2], 1.0, 0., 0., w_fp[76] ); + VVVV3P0_1( w_fp[0], w_fp[1], w_fp[29], COUPs[2], 1.0, 0., 0., w_fp[42] ); + VVVV4P0_1( w_fp[0], w_fp[1], w_fp[29], COUPs[2], 1.0, 0., 0., w_fp[11] ); // Amplitude(s) for diagram number 1040 - VVV1_0( w_fp[8], w_fp[4], w_fp[76], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[4], w_fp[76], COUPs[0], 1.0, &_fp[0] ); jamp_sv[3] += amp_sv[0]; jamp_sv[5] -= amp_sv[0]; jamp_sv[16] -= amp_sv[0]; @@ -22929,7 +22929,7 @@ namespace mg5amcCpu jamp_sv[71] += amp_sv[0]; jamp_sv[92] += amp_sv[0]; jamp_sv[116] -= amp_sv[0]; - VVV1_0( w_fp[8], w_fp[4], w_fp[42], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[4], w_fp[42], COUPs[0], 1.0, &_fp[0] ); jamp_sv[16] -= amp_sv[0]; jamp_sv[22] += amp_sv[0]; jamp_sv[27] += amp_sv[0]; @@ -22946,7 +22946,7 @@ namespace mg5amcCpu jamp_sv[70] += amp_sv[0]; jamp_sv[90] += amp_sv[0]; jamp_sv[114] -= amp_sv[0]; - VVV1_0( w_fp[8], w_fp[4], w_fp[11], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[4], w_fp[11], COUPs[0], 1.0, &_fp[0] ); jamp_sv[3] -= amp_sv[0]; jamp_sv[5] += amp_sv[0]; jamp_sv[27] += amp_sv[0]; @@ -22970,7 +22970,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1041 - VVV1_0( w_fp[1], w_fp[29], w_fp[107], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[29], w_fp[107], COUPs[0], 1.0, &_fp[0] ); jamp_sv[3] -= amp_sv[0]; jamp_sv[5] += amp_sv[0]; jamp_sv[16] += amp_sv[0]; @@ -22987,7 +22987,7 @@ namespace mg5amcCpu jamp_sv[71] -= amp_sv[0]; jamp_sv[92] -= amp_sv[0]; jamp_sv[116] += amp_sv[0]; - VVV1_0( w_fp[1], w_fp[29], w_fp[95], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[29], w_fp[95], COUPs[0], 1.0, &_fp[0] ); jamp_sv[6] -= amp_sv[0]; jamp_sv[7] += amp_sv[0]; jamp_sv[9] += amp_sv[0]; @@ -23004,7 +23004,7 @@ namespace mg5amcCpu jamp_sv[93] += amp_sv[0]; jamp_sv[116] += amp_sv[0]; jamp_sv[117] -= amp_sv[0]; - VVV1_0( w_fp[1], w_fp[29], w_fp[105], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[29], w_fp[105], COUPs[0], 1.0, &_fp[0] ); jamp_sv[3] += amp_sv[0]; jamp_sv[5] -= amp_sv[0]; jamp_sv[6] -= amp_sv[0]; @@ -23028,7 +23028,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1042 - VVV1_0( w_fp[1], w_fp[8], w_fp[87], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[8], w_fp[87], COUPs[0], 1.0, &_fp[0] ); jamp_sv[9] -= amp_sv[0]; jamp_sv[11] += amp_sv[0]; jamp_sv[17] += amp_sv[0]; @@ -23045,7 +23045,7 @@ namespace mg5amcCpu jamp_sv[70] -= amp_sv[0]; jamp_sv[94] -= amp_sv[0]; jamp_sv[118] += amp_sv[0]; - VVV1_0( w_fp[1], w_fp[8], w_fp[34], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[8], w_fp[34], COUPs[0], 1.0, &_fp[0] ); jamp_sv[17] += amp_sv[0]; jamp_sv[23] -= amp_sv[0]; jamp_sv[27] -= amp_sv[0]; @@ -23062,7 +23062,7 @@ namespace mg5amcCpu jamp_sv[70] -= amp_sv[0]; jamp_sv[91] -= amp_sv[0]; jamp_sv[115] += amp_sv[0]; - VVV1_0( w_fp[1], w_fp[8], w_fp[86], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[8], w_fp[86], COUPs[0], 1.0, &_fp[0] ); jamp_sv[9] += amp_sv[0]; jamp_sv[11] -= amp_sv[0]; jamp_sv[24] -= amp_sv[0]; @@ -23086,7 +23086,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1043 - VVVV1_0( w_fp[0], w_fp[1], w_fp[8], w_fp[30], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[0], w_fp[1], w_fp[8], w_fp[30], COUPs[2], 1.0, &_fp[0] ); jamp_sv[0] += amp_sv[0]; jamp_sv[1] -= amp_sv[0]; jamp_sv[3] -= amp_sv[0]; @@ -23103,7 +23103,7 @@ namespace mg5amcCpu jamp_sv[95] -= amp_sv[0]; jamp_sv[118] -= amp_sv[0]; jamp_sv[119] += amp_sv[0]; - VVVV3_0( w_fp[0], w_fp[1], w_fp[8], w_fp[30], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[0], w_fp[1], w_fp[8], w_fp[30], COUPs[2], 1.0, &_fp[0] ); jamp_sv[0] += amp_sv[0]; jamp_sv[1] -= amp_sv[0]; jamp_sv[3] -= amp_sv[0]; @@ -23120,7 +23120,7 @@ namespace mg5amcCpu jamp_sv[71] -= amp_sv[0]; jamp_sv[95] -= amp_sv[0]; jamp_sv[119] += amp_sv[0]; - VVVV4_0( w_fp[0], w_fp[1], w_fp[8], w_fp[30], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[0], w_fp[1], w_fp[8], w_fp[30], COUPs[2], 1.0, &_fp[0] ); jamp_sv[9] -= amp_sv[0]; jamp_sv[11] += amp_sv[0]; jamp_sv[17] += amp_sv[0]; @@ -23137,7 +23137,7 @@ namespace mg5amcCpu jamp_sv[70] -= amp_sv[0]; jamp_sv[94] -= amp_sv[0]; jamp_sv[118] += amp_sv[0]; - VVVV1_0( w_fp[0], w_fp[1], w_fp[8], w_fp[31], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[0], w_fp[1], w_fp[8], w_fp[31], COUPs[2], 1.0, &_fp[0] ); jamp_sv[1] -= amp_sv[0]; jamp_sv[2] += amp_sv[0]; jamp_sv[3] -= amp_sv[0]; @@ -23154,7 +23154,7 @@ namespace mg5amcCpu jamp_sv[95] -= amp_sv[0]; jamp_sv[112] -= amp_sv[0]; jamp_sv[113] += amp_sv[0]; - VVVV3_0( w_fp[0], w_fp[1], w_fp[8], w_fp[31], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[0], w_fp[1], w_fp[8], w_fp[31], COUPs[2], 1.0, &_fp[0] ); jamp_sv[1] -= amp_sv[0]; jamp_sv[2] += amp_sv[0]; jamp_sv[3] -= amp_sv[0]; @@ -23171,7 +23171,7 @@ namespace mg5amcCpu jamp_sv[89] += amp_sv[0]; jamp_sv[95] -= amp_sv[0]; jamp_sv[113] += amp_sv[0]; - VVVV4_0( w_fp[0], w_fp[1], w_fp[8], w_fp[31], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[0], w_fp[1], w_fp[8], w_fp[31], COUPs[2], 1.0, &_fp[0] ); jamp_sv[11] += amp_sv[0]; jamp_sv[15] -= amp_sv[0]; jamp_sv[17] += amp_sv[0]; @@ -23188,7 +23188,7 @@ namespace mg5amcCpu jamp_sv[88] += amp_sv[0]; jamp_sv[94] -= amp_sv[0]; jamp_sv[112] += amp_sv[0]; - VVVV1_0( w_fp[0], w_fp[1], w_fp[8], w_fp[32], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[0], w_fp[1], w_fp[8], w_fp[32], COUPs[2], 1.0, &_fp[0] ); jamp_sv[0] -= amp_sv[0]; jamp_sv[2] += amp_sv[0]; jamp_sv[4] += amp_sv[0]; @@ -23205,7 +23205,7 @@ namespace mg5amcCpu jamp_sv[113] += amp_sv[0]; jamp_sv[118] += amp_sv[0]; jamp_sv[119] -= amp_sv[0]; - VVVV3_0( w_fp[0], w_fp[1], w_fp[8], w_fp[32], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[0], w_fp[1], w_fp[8], w_fp[32], COUPs[2], 1.0, &_fp[0] ); jamp_sv[0] -= amp_sv[0]; jamp_sv[2] += amp_sv[0]; jamp_sv[4] += amp_sv[0]; @@ -23222,7 +23222,7 @@ namespace mg5amcCpu jamp_sv[89] += amp_sv[0]; jamp_sv[113] += amp_sv[0]; jamp_sv[119] -= amp_sv[0]; - VVVV4_0( w_fp[0], w_fp[1], w_fp[8], w_fp[32], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[0], w_fp[1], w_fp[8], w_fp[32], COUPs[2], 1.0, &_fp[0] ); jamp_sv[9] += amp_sv[0]; jamp_sv[15] -= amp_sv[0]; jamp_sv[21] -= amp_sv[0]; @@ -23246,7 +23246,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1044 - VVV1_0( w_fp[1], w_fp[30], w_fp[56], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[30], w_fp[56], COUPs[0], 1.0, &_fp[0] ); jamp_sv[0] += amp_sv[0]; jamp_sv[1] -= amp_sv[0]; jamp_sv[3] -= amp_sv[0]; @@ -23263,7 +23263,7 @@ namespace mg5amcCpu jamp_sv[71] -= amp_sv[0]; jamp_sv[95] -= amp_sv[0]; jamp_sv[119] += amp_sv[0]; - VVV1_0( w_fp[1], w_fp[31], w_fp[56], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[31], w_fp[56], COUPs[0], 1.0, &_fp[0] ); jamp_sv[1] -= amp_sv[0]; jamp_sv[2] += amp_sv[0]; jamp_sv[3] -= amp_sv[0]; @@ -23280,7 +23280,7 @@ namespace mg5amcCpu jamp_sv[89] += amp_sv[0]; jamp_sv[95] -= amp_sv[0]; jamp_sv[113] += amp_sv[0]; - VVV1_0( w_fp[1], w_fp[32], w_fp[56], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[32], w_fp[56], COUPs[0], 1.0, &_fp[0] ); jamp_sv[0] -= amp_sv[0]; jamp_sv[2] += amp_sv[0]; jamp_sv[4] += amp_sv[0]; @@ -23304,7 +23304,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1045 - VVV1_0( w_fp[1], w_fp[8], w_fp[92], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[8], w_fp[92], COUPs[0], 1.0, &_fp[0] ); jamp_sv[9] -= amp_sv[0]; jamp_sv[11] += amp_sv[0]; jamp_sv[17] += amp_sv[0]; @@ -23321,7 +23321,7 @@ namespace mg5amcCpu jamp_sv[70] -= amp_sv[0]; jamp_sv[94] -= amp_sv[0]; jamp_sv[118] += amp_sv[0]; - VVV1_0( w_fp[1], w_fp[8], w_fp[88], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[8], w_fp[88], COUPs[0], 1.0, &_fp[0] ); jamp_sv[11] += amp_sv[0]; jamp_sv[15] -= amp_sv[0]; jamp_sv[17] += amp_sv[0]; @@ -23338,7 +23338,7 @@ namespace mg5amcCpu jamp_sv[88] += amp_sv[0]; jamp_sv[94] -= amp_sv[0]; jamp_sv[112] += amp_sv[0]; - VVV1_0( w_fp[1], w_fp[8], w_fp[106], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[8], w_fp[106], COUPs[0], 1.0, &_fp[0] ); jamp_sv[9] += amp_sv[0]; jamp_sv[15] -= amp_sv[0]; jamp_sv[21] -= amp_sv[0]; @@ -23362,7 +23362,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1046 - FFV1_0( w_fp[58], w_fp[114], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[58], w_fp[114], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1046 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -23375,7 +23375,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1047 - FFV1_0( w_fp[48], w_fp[114], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[48], w_fp[114], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1047 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -23388,7 +23388,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1048 - FFV1_0( w_fp[104], w_fp[100], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[104], w_fp[100], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1048 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -23401,7 +23401,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1049 - FFV1_0( w_fp[104], w_fp[36], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[104], w_fp[36], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1049 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -23414,7 +23414,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1050 - FFV1_0( w_fp[48], w_fp[100], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[48], w_fp[100], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1050 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -23427,7 +23427,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1051 - FFV1_0( w_fp[58], w_fp[36], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[58], w_fp[36], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1051 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -23440,7 +23440,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1052 - FFV1_0( w_fp[60], w_fp[114], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[60], w_fp[114], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1052 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -23453,7 +23453,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1053 - FFV1_0( w_fp[40], w_fp[114], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[40], w_fp[114], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1053 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -23466,7 +23466,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1054 - FFV1_0( w_fp[62], w_fp[100], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[62], w_fp[100], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1054 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -23479,7 +23479,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1055 - FFV1_0( w_fp[62], w_fp[35], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[62], w_fp[35], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1055 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -23492,7 +23492,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1056 - FFV1_0( w_fp[40], w_fp[100], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[40], w_fp[100], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1056 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -23505,7 +23505,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1057 - FFV1_0( w_fp[60], w_fp[35], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[60], w_fp[35], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1057 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -23518,7 +23518,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1058 - FFV1_0( w_fp[3], w_fp[114], w_fp[67], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[114], w_fp[67], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1058 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -23534,7 +23534,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1059 - FFV1_0( w_fp[12], w_fp[114], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[12], w_fp[114], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1059 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -23548,7 +23548,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1060 - FFV1_0( w_fp[3], w_fp[100], w_fp[96], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[100], w_fp[96], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1060 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -23564,7 +23564,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1061 - VVV1_0( w_fp[96], w_fp[1], w_fp[37], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[96], w_fp[1], w_fp[37], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1061 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -23584,7 +23584,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1062 - FFV1_0( w_fp[12], w_fp[100], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[12], w_fp[100], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1062 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -23598,7 +23598,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1063 - VVV1_0( w_fp[0], w_fp[67], w_fp[37], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[0], w_fp[67], w_fp[37], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1063 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -23618,7 +23618,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1064 - FFV1_0( w_fp[3], w_fp[33], w_fp[76], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[33], w_fp[76], COUPs[1], 1.0, &_fp[0] ); jamp_sv[48] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[49] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[51] += cxtype( 0, 1 ) * amp_sv[0]; @@ -23627,7 +23627,7 @@ namespace mg5amcCpu jamp_sv[59] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[65] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[71] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[33], w_fp[42], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[33], w_fp[42], COUPs[1], 1.0, &_fp[0] ); jamp_sv[51] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[53] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[54] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -23636,7 +23636,7 @@ namespace mg5amcCpu jamp_sv[59] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[64] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[70] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[33], w_fp[11], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[33], w_fp[11], COUPs[1], 1.0, &_fp[0] ); jamp_sv[48] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[49] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[54] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -23652,7 +23652,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1065 - FFV1_0( w_fp[78], w_fp[102], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[78], w_fp[102], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1065 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -23665,7 +23665,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1066 - FFV1_0( w_fp[53], w_fp[102], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[53], w_fp[102], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1066 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -23678,7 +23678,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1067 - FFV1_0( w_fp[99], w_fp[89], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[89], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1067 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -23691,7 +23691,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1068 - FFV1_0( w_fp[99], w_fp[44], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[44], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1068 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -23704,7 +23704,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1069 - FFV1_0( w_fp[53], w_fp[89], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[53], w_fp[89], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1069 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -23717,7 +23717,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1070 - FFV1_0( w_fp[78], w_fp[44], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[78], w_fp[44], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1070 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -23730,7 +23730,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1071 - FFV1_0( w_fp[60], w_fp[102], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[60], w_fp[102], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1071 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -23743,7 +23743,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1072 - FFV1_0( w_fp[28], w_fp[102], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[28], w_fp[102], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1072 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -23756,7 +23756,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1073 - FFV1_0( w_fp[62], w_fp[89], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[62], w_fp[89], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1073 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -23769,7 +23769,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1074 - FFV1_0( w_fp[62], w_fp[43], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[62], w_fp[43], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1074 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -23782,7 +23782,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1075 - FFV1_0( w_fp[28], w_fp[89], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[28], w_fp[89], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1075 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -23795,7 +23795,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1076 - FFV1_0( w_fp[60], w_fp[43], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[60], w_fp[43], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1076 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -23808,7 +23808,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1077 - FFV1_0( w_fp[3], w_fp[102], w_fp[68], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[102], w_fp[68], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1077 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -23824,7 +23824,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1078 - FFV1_0( w_fp[14], w_fp[102], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[14], w_fp[102], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1078 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -23838,7 +23838,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1079 - FFV1_0( w_fp[3], w_fp[89], w_fp[101], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[89], w_fp[101], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1079 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -23854,7 +23854,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1080 - VVV1_0( w_fp[101], w_fp[1], w_fp[45], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[101], w_fp[1], w_fp[45], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1080 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -23874,7 +23874,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1081 - FFV1_0( w_fp[14], w_fp[89], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[14], w_fp[89], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1081 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -23888,7 +23888,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1082 - VVV1_0( w_fp[0], w_fp[68], w_fp[45], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[0], w_fp[68], w_fp[45], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1082 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -23908,7 +23908,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1083 - FFV1_0( w_fp[3], w_fp[39], w_fp[10], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[39], w_fp[10], COUPs[1], 1.0, &_fp[0] ); jamp_sv[72] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[73] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[75] += cxtype( 0, 1 ) * amp_sv[0]; @@ -23917,7 +23917,7 @@ namespace mg5amcCpu jamp_sv[83] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[89] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[95] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[39], w_fp[16], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[39], w_fp[16], COUPs[1], 1.0, &_fp[0] ); jamp_sv[75] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[77] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[78] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -23926,7 +23926,7 @@ namespace mg5amcCpu jamp_sv[83] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[88] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[94] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[39], w_fp[111], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[39], w_fp[111], COUPs[1], 1.0, &_fp[0] ); jamp_sv[72] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[73] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[78] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -23942,7 +23942,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1084 - FFV1_0( w_fp[78], w_fp[113], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[78], w_fp[113], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1084 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -23955,7 +23955,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1085 - FFV1_0( w_fp[7], w_fp[113], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[7], w_fp[113], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1085 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -23968,7 +23968,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1086 - FFV1_0( w_fp[99], w_fp[91], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[91], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1086 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -23981,7 +23981,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1087 - FFV1_0( w_fp[99], w_fp[50], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[50], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1087 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -23994,7 +23994,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1088 - FFV1_0( w_fp[7], w_fp[91], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[7], w_fp[91], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1088 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -24007,7 +24007,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1089 - FFV1_0( w_fp[78], w_fp[50], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[78], w_fp[50], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1089 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -24020,7 +24020,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1090 - FFV1_0( w_fp[58], w_fp[113], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[58], w_fp[113], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1090 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -24033,7 +24033,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1091 - FFV1_0( w_fp[25], w_fp[113], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[25], w_fp[113], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1091 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -24046,7 +24046,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1092 - FFV1_0( w_fp[104], w_fp[91], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[104], w_fp[91], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1092 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -24059,7 +24059,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1093 - FFV1_0( w_fp[104], w_fp[49], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[104], w_fp[49], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1093 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -24072,7 +24072,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1094 - FFV1_0( w_fp[25], w_fp[91], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[25], w_fp[91], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1094 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -24085,7 +24085,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1095 - FFV1_0( w_fp[58], w_fp[49], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[58], w_fp[49], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1095 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -24098,7 +24098,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1096 - FFV1_0( w_fp[3], w_fp[113], w_fp[59], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[113], w_fp[59], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1096 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -24114,7 +24114,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1097 - FFV1_0( w_fp[26], w_fp[113], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[26], w_fp[113], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1097 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -24128,7 +24128,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1098 - FFV1_0( w_fp[3], w_fp[91], w_fp[98], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[91], w_fp[98], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1098 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -24144,7 +24144,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1099 - VVV1_0( w_fp[98], w_fp[1], w_fp[51], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[98], w_fp[1], w_fp[51], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1099 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -24164,7 +24164,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1100 - FFV1_0( w_fp[26], w_fp[91], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[26], w_fp[91], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1100 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -24178,7 +24178,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1101 - VVV1_0( w_fp[0], w_fp[59], w_fp[51], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[0], w_fp[59], w_fp[51], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1101 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -24198,7 +24198,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1102 - FFV1_0( w_fp[3], w_fp[47], w_fp[97], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[47], w_fp[97], COUPs[1], 1.0, &_fp[0] ); jamp_sv[96] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[97] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[99] += cxtype( 0, 1 ) * amp_sv[0]; @@ -24207,7 +24207,7 @@ namespace mg5amcCpu jamp_sv[107] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[113] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[119] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[47], w_fp[71], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[47], w_fp[71], COUPs[1], 1.0, &_fp[0] ); jamp_sv[99] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[101] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[102] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -24216,7 +24216,7 @@ namespace mg5amcCpu jamp_sv[107] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[112] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[118] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[47], w_fp[21], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[47], w_fp[21], COUPs[1], 1.0, &_fp[0] ); jamp_sv[96] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[97] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[102] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -24232,7 +24232,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1103 - FFV1_0( w_fp[99], w_fp[2], w_fp[67], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[2], w_fp[67], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1103 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -24248,7 +24248,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1104 - FFV1_0( w_fp[99], w_fp[18], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[18], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1104 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -24262,7 +24262,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1105 - FFV1_0( w_fp[78], w_fp[2], w_fp[96], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[78], w_fp[2], w_fp[96], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1105 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -24278,7 +24278,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1106 - VVV1_0( w_fp[96], w_fp[1], w_fp[54], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[96], w_fp[1], w_fp[54], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1106 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -24298,7 +24298,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1107 - FFV1_0( w_fp[78], w_fp[18], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[78], w_fp[18], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1107 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -24312,7 +24312,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1108 - VVV1_0( w_fp[0], w_fp[67], w_fp[54], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[0], w_fp[67], w_fp[54], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1108 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -24332,7 +24332,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1109 - FFV1_0( w_fp[46], w_fp[2], w_fp[76], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[2], w_fp[76], COUPs[1], 1.0, &_fp[0] ); jamp_sv[3] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[5] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[16] += cxtype( 0, 1 ) * amp_sv[0]; @@ -24341,7 +24341,7 @@ namespace mg5amcCpu jamp_sv[46] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[92] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[116] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[46], w_fp[2], w_fp[42], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[2], w_fp[42], COUPs[1], 1.0, &_fp[0] ); jamp_sv[16] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[22] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[27] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -24350,7 +24350,7 @@ namespace mg5amcCpu jamp_sv[46] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[90] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[114] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[46], w_fp[2], w_fp[11], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[2], w_fp[11], COUPs[1], 1.0, &_fp[0] ); jamp_sv[3] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[5] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[27] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -24366,7 +24366,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1110 - FFV1_0( w_fp[104], w_fp[2], w_fp[68], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[104], w_fp[2], w_fp[68], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1110 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -24382,7 +24382,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1111 - FFV1_0( w_fp[104], w_fp[15], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[104], w_fp[15], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1111 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -24396,7 +24396,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1112 - FFV1_0( w_fp[58], w_fp[2], w_fp[101], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[58], w_fp[2], w_fp[101], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1112 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -24412,7 +24412,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1113 - VVV1_0( w_fp[101], w_fp[1], w_fp[23], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[101], w_fp[1], w_fp[23], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1113 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -24432,7 +24432,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1114 - FFV1_0( w_fp[58], w_fp[15], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[58], w_fp[15], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1114 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -24446,7 +24446,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1115 - VVV1_0( w_fp[0], w_fp[68], w_fp[23], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[0], w_fp[68], w_fp[23], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1115 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -24466,7 +24466,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1116 - FFV1_0( w_fp[38], w_fp[2], w_fp[10], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[2], w_fp[10], COUPs[1], 1.0, &_fp[0] ); jamp_sv[1] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[4] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[10] += cxtype( 0, 1 ) * amp_sv[0]; @@ -24475,7 +24475,7 @@ namespace mg5amcCpu jamp_sv[44] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[68] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[110] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[38], w_fp[2], w_fp[16], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[2], w_fp[16], COUPs[1], 1.0, &_fp[0] ); jamp_sv[10] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[20] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[25] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -24484,7 +24484,7 @@ namespace mg5amcCpu jamp_sv[44] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[66] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[108] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[38], w_fp[2], w_fp[111], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[2], w_fp[111], COUPs[1], 1.0, &_fp[0] ); jamp_sv[1] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[4] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[25] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -24500,7 +24500,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1117 - FFV1_0( w_fp[62], w_fp[2], w_fp[59], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[62], w_fp[2], w_fp[59], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1117 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -24516,7 +24516,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1118 - FFV1_0( w_fp[62], w_fp[17], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[62], w_fp[17], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1118 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -24530,7 +24530,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1119 - FFV1_0( w_fp[60], w_fp[2], w_fp[98], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[60], w_fp[2], w_fp[98], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1119 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -24546,7 +24546,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1120 - VVV1_0( w_fp[98], w_fp[1], w_fp[20], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[98], w_fp[1], w_fp[20], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1120 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -24566,7 +24566,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1121 - FFV1_0( w_fp[60], w_fp[17], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[60], w_fp[17], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1121 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -24580,7 +24580,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1122 - VVV1_0( w_fp[0], w_fp[59], w_fp[20], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[0], w_fp[59], w_fp[20], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1122 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -24600,7 +24600,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1123 - FFV1_0( w_fp[41], w_fp[2], w_fp[97], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[2], w_fp[97], COUPs[1], 1.0, &_fp[0] ); jamp_sv[0] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[2] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[8] += cxtype( 0, 1 ) * amp_sv[0]; @@ -24609,7 +24609,7 @@ namespace mg5amcCpu jamp_sv[38] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[62] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[86] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[41], w_fp[2], w_fp[71], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[2], w_fp[71], COUPs[1], 1.0, &_fp[0] ); jamp_sv[8] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[14] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[24] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -24618,7 +24618,7 @@ namespace mg5amcCpu jamp_sv[38] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[60] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[84] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[41], w_fp[2], w_fp[21], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[2], w_fp[21], COUPs[1], 1.0, &_fp[0] ); jamp_sv[0] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[2] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[24] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -24631,12 +24631,12 @@ namespace mg5amcCpu // *** DIAGRAM 1124 OF 1240 *** // Wavefunction(s) for diagram number 1124 - VVVV1P0_1( w_fp[0], w_fp[1], w_fp[4], COUPs[2], 0., 0., w_fp[21] ); - VVVV3P0_1( w_fp[0], w_fp[1], w_fp[4], COUPs[2], 0., 0., w_fp[71] ); - VVVV4P0_1( w_fp[0], w_fp[1], w_fp[4], COUPs[2], 0., 0., w_fp[97] ); + VVVV1P0_1( w_fp[0], w_fp[1], w_fp[4], COUPs[2], 1.0, 0., 0., w_fp[21] ); + VVVV3P0_1( w_fp[0], w_fp[1], w_fp[4], COUPs[2], 1.0, 0., 0., w_fp[71] ); + VVVV4P0_1( w_fp[0], w_fp[1], w_fp[4], COUPs[2], 1.0, 0., 0., w_fp[97] ); // Amplitude(s) for diagram number 1124 - VVVV1_0( w_fp[21], w_fp[8], w_fp[5], w_fp[6], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[21], w_fp[8], w_fp[5], w_fp[6], COUPs[2], 1.0, &_fp[0] ); jamp_sv[0] += amp_sv[0]; jamp_sv[1] -= amp_sv[0]; jamp_sv[6] -= amp_sv[0]; @@ -24653,7 +24653,7 @@ namespace mg5amcCpu jamp_sv[115] -= amp_sv[0]; jamp_sv[117] -= amp_sv[0]; jamp_sv[119] += amp_sv[0]; - VVVV3_0( w_fp[21], w_fp[8], w_fp[5], w_fp[6], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[21], w_fp[8], w_fp[5], w_fp[6], COUPs[2], 1.0, &_fp[0] ); jamp_sv[0] += amp_sv[0]; jamp_sv[6] -= amp_sv[0]; jamp_sv[30] -= amp_sv[0]; @@ -24670,7 +24670,7 @@ namespace mg5amcCpu jamp_sv[115] -= amp_sv[0]; jamp_sv[117] -= amp_sv[0]; jamp_sv[119] += amp_sv[0]; - VVVV4_0( w_fp[21], w_fp[8], w_fp[5], w_fp[6], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[21], w_fp[8], w_fp[5], w_fp[6], COUPs[2], 1.0, &_fp[0] ); jamp_sv[1] += amp_sv[0]; jamp_sv[7] -= amp_sv[0]; jamp_sv[31] -= amp_sv[0]; @@ -24687,7 +24687,7 @@ namespace mg5amcCpu jamp_sv[98] += amp_sv[0]; jamp_sv[104] += amp_sv[0]; jamp_sv[110] -= amp_sv[0]; - VVVV1_0( w_fp[71], w_fp[8], w_fp[5], w_fp[6], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[71], w_fp[8], w_fp[5], w_fp[6], COUPs[2], 1.0, &_fp[0] ); jamp_sv[6] -= amp_sv[0]; jamp_sv[7] += amp_sv[0]; jamp_sv[24] += amp_sv[0]; @@ -24704,7 +24704,7 @@ namespace mg5amcCpu jamp_sv[116] += amp_sv[0]; jamp_sv[117] -= amp_sv[0]; jamp_sv[118] += amp_sv[0]; - VVVV3_0( w_fp[71], w_fp[8], w_fp[5], w_fp[6], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[71], w_fp[8], w_fp[5], w_fp[6], COUPs[2], 1.0, &_fp[0] ); jamp_sv[6] -= amp_sv[0]; jamp_sv[24] += amp_sv[0]; jamp_sv[30] -= amp_sv[0]; @@ -24721,7 +24721,7 @@ namespace mg5amcCpu jamp_sv[116] += amp_sv[0]; jamp_sv[117] -= amp_sv[0]; jamp_sv[118] += amp_sv[0]; - VVVV4_0( w_fp[71], w_fp[8], w_fp[5], w_fp[6], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[71], w_fp[8], w_fp[5], w_fp[6], COUPs[2], 1.0, &_fp[0] ); jamp_sv[7] -= amp_sv[0]; jamp_sv[25] += amp_sv[0]; jamp_sv[31] -= amp_sv[0]; @@ -24738,7 +24738,7 @@ namespace mg5amcCpu jamp_sv[102] -= amp_sv[0]; jamp_sv[104] += amp_sv[0]; jamp_sv[108] -= amp_sv[0]; - VVVV1_0( w_fp[97], w_fp[8], w_fp[5], w_fp[6], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[97], w_fp[8], w_fp[5], w_fp[6], COUPs[2], 1.0, &_fp[0] ); jamp_sv[0] -= amp_sv[0]; jamp_sv[1] += amp_sv[0]; jamp_sv[24] += amp_sv[0]; @@ -24755,7 +24755,7 @@ namespace mg5amcCpu jamp_sv[116] += amp_sv[0]; jamp_sv[118] += amp_sv[0]; jamp_sv[119] -= amp_sv[0]; - VVVV3_0( w_fp[97], w_fp[8], w_fp[5], w_fp[6], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[97], w_fp[8], w_fp[5], w_fp[6], COUPs[2], 1.0, &_fp[0] ); jamp_sv[0] -= amp_sv[0]; jamp_sv[24] += amp_sv[0]; jamp_sv[48] += amp_sv[0]; @@ -24772,7 +24772,7 @@ namespace mg5amcCpu jamp_sv[116] += amp_sv[0]; jamp_sv[118] += amp_sv[0]; jamp_sv[119] -= amp_sv[0]; - VVVV4_0( w_fp[97], w_fp[8], w_fp[5], w_fp[6], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[97], w_fp[8], w_fp[5], w_fp[6], COUPs[2], 1.0, &_fp[0] ); jamp_sv[1] -= amp_sv[0]; jamp_sv[25] += amp_sv[0]; jamp_sv[49] += amp_sv[0]; @@ -24793,12 +24793,12 @@ namespace mg5amcCpu // *** DIAGRAM 1125 OF 1240 *** // Wavefunction(s) for diagram number 1125 - VVV1P0_1( w_fp[21], w_fp[5], COUPs[0], 0., 0., w_fp[59] ); - VVV1P0_1( w_fp[71], w_fp[5], COUPs[0], 0., 0., w_fp[20] ); - VVV1P0_1( w_fp[97], w_fp[5], COUPs[0], 0., 0., w_fp[60] ); + VVV1P0_1( w_fp[21], w_fp[5], COUPs[0], 1.0, 0., 0., w_fp[59] ); + VVV1P0_1( w_fp[71], w_fp[5], COUPs[0], 1.0, 0., 0., w_fp[20] ); + VVV1P0_1( w_fp[97], w_fp[5], COUPs[0], 1.0, 0., 0., w_fp[60] ); // Amplitude(s) for diagram number 1125 - VVV1_0( w_fp[8], w_fp[6], w_fp[59], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[6], w_fp[59], COUPs[0], 1.0, &_fp[0] ); jamp_sv[0] += amp_sv[0]; jamp_sv[6] -= amp_sv[0]; jamp_sv[30] -= amp_sv[0]; @@ -24815,7 +24815,7 @@ namespace mg5amcCpu jamp_sv[115] -= amp_sv[0]; jamp_sv[117] -= amp_sv[0]; jamp_sv[119] += amp_sv[0]; - VVV1_0( w_fp[8], w_fp[6], w_fp[20], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[6], w_fp[20], COUPs[0], 1.0, &_fp[0] ); jamp_sv[6] -= amp_sv[0]; jamp_sv[24] += amp_sv[0]; jamp_sv[30] -= amp_sv[0]; @@ -24832,7 +24832,7 @@ namespace mg5amcCpu jamp_sv[116] += amp_sv[0]; jamp_sv[117] -= amp_sv[0]; jamp_sv[118] += amp_sv[0]; - VVV1_0( w_fp[8], w_fp[6], w_fp[60], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[6], w_fp[60], COUPs[0], 1.0, &_fp[0] ); jamp_sv[0] -= amp_sv[0]; jamp_sv[24] += amp_sv[0]; jamp_sv[48] += amp_sv[0]; @@ -24853,12 +24853,12 @@ namespace mg5amcCpu // *** DIAGRAM 1126 OF 1240 *** // Wavefunction(s) for diagram number 1126 - VVV1P0_1( w_fp[21], w_fp[6], COUPs[0], 0., 0., w_fp[17] ); - VVV1P0_1( w_fp[71], w_fp[6], COUPs[0], 0., 0., w_fp[98] ); - VVV1P0_1( w_fp[97], w_fp[6], COUPs[0], 0., 0., w_fp[111] ); + VVV1P0_1( w_fp[21], w_fp[6], COUPs[0], 1.0, 0., 0., w_fp[17] ); + VVV1P0_1( w_fp[71], w_fp[6], COUPs[0], 1.0, 0., 0., w_fp[98] ); + VVV1P0_1( w_fp[97], w_fp[6], COUPs[0], 1.0, 0., 0., w_fp[111] ); // Amplitude(s) for diagram number 1126 - VVV1_0( w_fp[8], w_fp[5], w_fp[17], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[5], w_fp[17], COUPs[0], 1.0, &_fp[0] ); jamp_sv[1] += amp_sv[0]; jamp_sv[7] -= amp_sv[0]; jamp_sv[31] -= amp_sv[0]; @@ -24875,7 +24875,7 @@ namespace mg5amcCpu jamp_sv[98] += amp_sv[0]; jamp_sv[104] += amp_sv[0]; jamp_sv[110] -= amp_sv[0]; - VVV1_0( w_fp[8], w_fp[5], w_fp[98], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[5], w_fp[98], COUPs[0], 1.0, &_fp[0] ); jamp_sv[7] -= amp_sv[0]; jamp_sv[25] += amp_sv[0]; jamp_sv[31] -= amp_sv[0]; @@ -24892,7 +24892,7 @@ namespace mg5amcCpu jamp_sv[102] -= amp_sv[0]; jamp_sv[104] += amp_sv[0]; jamp_sv[108] -= amp_sv[0]; - VVV1_0( w_fp[8], w_fp[5], w_fp[111], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[5], w_fp[111], COUPs[0], 1.0, &_fp[0] ); jamp_sv[1] -= amp_sv[0]; jamp_sv[25] += amp_sv[0]; jamp_sv[49] += amp_sv[0]; @@ -24916,7 +24916,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1127 - VVV1_0( w_fp[21], w_fp[8], w_fp[29], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[21], w_fp[8], w_fp[29], COUPs[0], 1.0, &_fp[0] ); jamp_sv[0] += amp_sv[0]; jamp_sv[1] -= amp_sv[0]; jamp_sv[6] -= amp_sv[0]; @@ -24933,7 +24933,7 @@ namespace mg5amcCpu jamp_sv[115] -= amp_sv[0]; jamp_sv[117] -= amp_sv[0]; jamp_sv[119] += amp_sv[0]; - VVV1_0( w_fp[71], w_fp[8], w_fp[29], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[71], w_fp[8], w_fp[29], COUPs[0], 1.0, &_fp[0] ); jamp_sv[6] -= amp_sv[0]; jamp_sv[7] += amp_sv[0]; jamp_sv[24] += amp_sv[0]; @@ -24950,7 +24950,7 @@ namespace mg5amcCpu jamp_sv[116] += amp_sv[0]; jamp_sv[117] -= amp_sv[0]; jamp_sv[118] += amp_sv[0]; - VVV1_0( w_fp[97], w_fp[8], w_fp[29], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[97], w_fp[8], w_fp[29], COUPs[0], 1.0, &_fp[0] ); jamp_sv[0] -= amp_sv[0]; jamp_sv[1] += amp_sv[0]; jamp_sv[24] += amp_sv[0]; @@ -24971,22 +24971,22 @@ namespace mg5amcCpu // *** DIAGRAM 1128 OF 1240 *** // Wavefunction(s) for diagram number 1128 - FFV1_2( w_fp[3], w_fp[21], COUPs[1], cIPD[0], cIPD[1], w_fp[16] ); - FFV1_2( w_fp[3], w_fp[71], COUPs[1], cIPD[0], cIPD[1], w_fp[10] ); - FFV1_2( w_fp[3], w_fp[97], COUPs[1], cIPD[0], cIPD[1], w_fp[68] ); + FFV1_2( w_fp[3], w_fp[21], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[16] ); + FFV1_2( w_fp[3], w_fp[71], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[10] ); + FFV1_2( w_fp[3], w_fp[97], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[68] ); // Amplitude(s) for diagram number 1128 - FFV1_0( w_fp[16], w_fp[39], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[16], w_fp[39], w_fp[6], COUPs[1], 1.0, &_fp[0] ); jamp_sv[90] += amp_sv[0]; jamp_sv[91] -= amp_sv[0]; jamp_sv[93] -= amp_sv[0]; jamp_sv[95] += amp_sv[0]; - FFV1_0( w_fp[10], w_fp[39], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[10], w_fp[39], w_fp[6], COUPs[1], 1.0, &_fp[0] ); jamp_sv[91] -= amp_sv[0]; jamp_sv[92] += amp_sv[0]; jamp_sv[93] -= amp_sv[0]; jamp_sv[94] += amp_sv[0]; - FFV1_0( w_fp[68], w_fp[39], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[68], w_fp[39], w_fp[6], COUPs[1], 1.0, &_fp[0] ); jamp_sv[90] -= amp_sv[0]; jamp_sv[92] += amp_sv[0]; jamp_sv[94] += amp_sv[0]; @@ -24998,7 +24998,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1129 - FFV1_0( w_fp[3], w_fp[39], w_fp[17], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[39], w_fp[17], COUPs[1], 1.0, &_fp[0] ); jamp_sv[72] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[74] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[80] += cxtype( 0, 1 ) * amp_sv[0]; @@ -25007,7 +25007,7 @@ namespace mg5amcCpu jamp_sv[91] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[93] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[95] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[39], w_fp[98], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[39], w_fp[98], COUPs[1], 1.0, &_fp[0] ); jamp_sv[74] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[78] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[80] += cxtype( 0, 1 ) * amp_sv[0]; @@ -25016,7 +25016,7 @@ namespace mg5amcCpu jamp_sv[92] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[93] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[94] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[39], w_fp[111], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[39], w_fp[111], COUPs[1], 1.0, &_fp[0] ); jamp_sv[72] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[78] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[84] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -25032,17 +25032,17 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1130 - FFV1_0( w_fp[41], w_fp[39], w_fp[21], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[39], w_fp[21], COUPs[1], 1.0, &_fp[0] ); jamp_sv[72] += amp_sv[0]; jamp_sv[74] -= amp_sv[0]; jamp_sv[80] -= amp_sv[0]; jamp_sv[86] += amp_sv[0]; - FFV1_0( w_fp[41], w_fp[39], w_fp[71], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[39], w_fp[71], COUPs[1], 1.0, &_fp[0] ); jamp_sv[74] -= amp_sv[0]; jamp_sv[78] += amp_sv[0]; jamp_sv[80] -= amp_sv[0]; jamp_sv[84] += amp_sv[0]; - FFV1_0( w_fp[41], w_fp[39], w_fp[97], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[39], w_fp[97], COUPs[1], 1.0, &_fp[0] ); jamp_sv[72] -= amp_sv[0]; jamp_sv[78] += amp_sv[0]; jamp_sv[84] += amp_sv[0]; @@ -25054,17 +25054,17 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1131 - FFV1_0( w_fp[16], w_fp[47], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[16], w_fp[47], w_fp[5], COUPs[1], 1.0, &_fp[0] ); jamp_sv[114] += amp_sv[0]; jamp_sv[115] -= amp_sv[0]; jamp_sv[117] -= amp_sv[0]; jamp_sv[119] += amp_sv[0]; - FFV1_0( w_fp[10], w_fp[47], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[10], w_fp[47], w_fp[5], COUPs[1], 1.0, &_fp[0] ); jamp_sv[115] -= amp_sv[0]; jamp_sv[116] += amp_sv[0]; jamp_sv[117] -= amp_sv[0]; jamp_sv[118] += amp_sv[0]; - FFV1_0( w_fp[68], w_fp[47], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[68], w_fp[47], w_fp[5], COUPs[1], 1.0, &_fp[0] ); jamp_sv[114] -= amp_sv[0]; jamp_sv[116] += amp_sv[0]; jamp_sv[118] += amp_sv[0]; @@ -25076,7 +25076,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1132 - FFV1_0( w_fp[3], w_fp[47], w_fp[59], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[47], w_fp[59], COUPs[1], 1.0, &_fp[0] ); jamp_sv[96] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[98] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[104] += cxtype( 0, 1 ) * amp_sv[0]; @@ -25085,7 +25085,7 @@ namespace mg5amcCpu jamp_sv[115] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[117] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[119] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[47], w_fp[20], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[47], w_fp[20], COUPs[1], 1.0, &_fp[0] ); jamp_sv[98] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[102] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[104] += cxtype( 0, 1 ) * amp_sv[0]; @@ -25094,7 +25094,7 @@ namespace mg5amcCpu jamp_sv[116] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[117] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[118] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[47], w_fp[60], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[47], w_fp[60], COUPs[1], 1.0, &_fp[0] ); jamp_sv[96] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[102] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[108] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -25110,17 +25110,17 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1133 - FFV1_0( w_fp[38], w_fp[47], w_fp[21], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[47], w_fp[21], COUPs[1], 1.0, &_fp[0] ); jamp_sv[96] += amp_sv[0]; jamp_sv[98] -= amp_sv[0]; jamp_sv[104] -= amp_sv[0]; jamp_sv[110] += amp_sv[0]; - FFV1_0( w_fp[38], w_fp[47], w_fp[71], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[47], w_fp[71], COUPs[1], 1.0, &_fp[0] ); jamp_sv[98] -= amp_sv[0]; jamp_sv[102] += amp_sv[0]; jamp_sv[104] -= amp_sv[0]; jamp_sv[108] += amp_sv[0]; - FFV1_0( w_fp[38], w_fp[47], w_fp[97], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[47], w_fp[97], COUPs[1], 1.0, &_fp[0] ); jamp_sv[96] -= amp_sv[0]; jamp_sv[102] += amp_sv[0]; jamp_sv[108] += amp_sv[0]; @@ -25129,22 +25129,22 @@ namespace mg5amcCpu // *** DIAGRAM 1134 OF 1240 *** // Wavefunction(s) for diagram number 1134 - FFV1_1( w_fp[2], w_fp[21], COUPs[1], cIPD[0], cIPD[1], w_fp[23] ); - FFV1_1( w_fp[2], w_fp[71], COUPs[1], cIPD[0], cIPD[1], w_fp[21] ); - FFV1_1( w_fp[2], w_fp[97], COUPs[1], cIPD[0], cIPD[1], w_fp[71] ); + FFV1_1( w_fp[2], w_fp[21], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[23] ); + FFV1_1( w_fp[2], w_fp[71], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[21] ); + FFV1_1( w_fp[2], w_fp[97], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[71] ); // Amplitude(s) for diagram number 1134 - FFV1_0( w_fp[38], w_fp[23], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[23], w_fp[6], COUPs[1], 1.0, &_fp[0] ); jamp_sv[1] += amp_sv[0]; jamp_sv[7] -= amp_sv[0]; jamp_sv[31] -= amp_sv[0]; jamp_sv[55] += amp_sv[0]; - FFV1_0( w_fp[38], w_fp[21], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[21], w_fp[6], COUPs[1], 1.0, &_fp[0] ); jamp_sv[7] -= amp_sv[0]; jamp_sv[25] += amp_sv[0]; jamp_sv[31] -= amp_sv[0]; jamp_sv[49] += amp_sv[0]; - FFV1_0( w_fp[38], w_fp[71], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[71], w_fp[6], COUPs[1], 1.0, &_fp[0] ); jamp_sv[1] -= amp_sv[0]; jamp_sv[25] += amp_sv[0]; jamp_sv[49] += amp_sv[0]; @@ -25156,7 +25156,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1135 - FFV1_0( w_fp[38], w_fp[2], w_fp[17], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[2], w_fp[17], COUPs[1], 1.0, &_fp[0] ); jamp_sv[1] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[7] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[31] += cxtype( 0, 1 ) * amp_sv[0]; @@ -25165,7 +25165,7 @@ namespace mg5amcCpu jamp_sv[98] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[104] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[110] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[38], w_fp[2], w_fp[98], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[2], w_fp[98], COUPs[1], 1.0, &_fp[0] ); jamp_sv[7] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[25] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[31] += cxtype( 0, 1 ) * amp_sv[0]; @@ -25174,7 +25174,7 @@ namespace mg5amcCpu jamp_sv[102] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[104] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[108] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[38], w_fp[2], w_fp[111], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[2], w_fp[111], COUPs[1], 1.0, &_fp[0] ); jamp_sv[1] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[25] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[49] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -25190,17 +25190,17 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1136 - FFV1_0( w_fp[41], w_fp[23], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[23], w_fp[5], COUPs[1], 1.0, &_fp[0] ); jamp_sv[0] += amp_sv[0]; jamp_sv[6] -= amp_sv[0]; jamp_sv[30] -= amp_sv[0]; jamp_sv[54] += amp_sv[0]; - FFV1_0( w_fp[41], w_fp[21], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[21], w_fp[5], COUPs[1], 1.0, &_fp[0] ); jamp_sv[6] -= amp_sv[0]; jamp_sv[24] += amp_sv[0]; jamp_sv[30] -= amp_sv[0]; jamp_sv[48] += amp_sv[0]; - FFV1_0( w_fp[41], w_fp[71], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[71], w_fp[5], COUPs[1], 1.0, &_fp[0] ); jamp_sv[0] -= amp_sv[0]; jamp_sv[24] += amp_sv[0]; jamp_sv[48] += amp_sv[0]; @@ -25212,7 +25212,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1137 - FFV1_0( w_fp[41], w_fp[2], w_fp[59], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[2], w_fp[59], COUPs[1], 1.0, &_fp[0] ); jamp_sv[0] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[6] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[30] += cxtype( 0, 1 ) * amp_sv[0]; @@ -25221,7 +25221,7 @@ namespace mg5amcCpu jamp_sv[74] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[80] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[86] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[41], w_fp[2], w_fp[20], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[2], w_fp[20], COUPs[1], 1.0, &_fp[0] ); jamp_sv[6] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[24] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[30] += cxtype( 0, 1 ) * amp_sv[0]; @@ -25230,7 +25230,7 @@ namespace mg5amcCpu jamp_sv[78] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[80] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[84] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[41], w_fp[2], w_fp[60], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[2], w_fp[60], COUPs[1], 1.0, &_fp[0] ); jamp_sv[0] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[24] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[48] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -25246,7 +25246,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1138 - FFV1_0( w_fp[3], w_fp[23], w_fp[29], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[23], w_fp[29], COUPs[1], 1.0, &_fp[0] ); jamp_sv[0] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[1] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[6] += cxtype( 0, 1 ) * amp_sv[0]; @@ -25255,7 +25255,7 @@ namespace mg5amcCpu jamp_sv[31] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[54] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[55] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[21], w_fp[29], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[21], w_fp[29], COUPs[1], 1.0, &_fp[0] ); jamp_sv[6] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[7] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[24] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -25264,7 +25264,7 @@ namespace mg5amcCpu jamp_sv[31] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[48] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[49] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[71], w_fp[29], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[71], w_fp[29], COUPs[1], 1.0, &_fp[0] ); jamp_sv[0] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[1] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[24] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -25280,7 +25280,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1139 - FFV1_0( w_fp[16], w_fp[2], w_fp[29], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[16], w_fp[2], w_fp[29], COUPs[1], 1.0, &_fp[0] ); jamp_sv[90] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[91] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[93] += cxtype( 0, 1 ) * amp_sv[0]; @@ -25289,7 +25289,7 @@ namespace mg5amcCpu jamp_sv[115] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[117] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[119] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[10], w_fp[2], w_fp[29], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[10], w_fp[2], w_fp[29], COUPs[1], 1.0, &_fp[0] ); jamp_sv[91] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[92] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[93] += cxtype( 0, 1 ) * amp_sv[0]; @@ -25298,7 +25298,7 @@ namespace mg5amcCpu jamp_sv[116] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[117] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[118] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[68], w_fp[2], w_fp[29], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[68], w_fp[2], w_fp[29], COUPs[1], 1.0, &_fp[0] ); jamp_sv[90] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[92] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[94] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -25311,12 +25311,12 @@ namespace mg5amcCpu // *** DIAGRAM 1140 OF 1240 *** // Wavefunction(s) for diagram number 1140 - VVVV1P0_1( w_fp[0], w_fp[1], w_fp[5], COUPs[2], 0., 0., w_fp[68] ); - VVVV3P0_1( w_fp[0], w_fp[1], w_fp[5], COUPs[2], 0., 0., w_fp[29] ); - VVVV4P0_1( w_fp[0], w_fp[1], w_fp[5], COUPs[2], 0., 0., w_fp[10] ); + VVVV1P0_1( w_fp[0], w_fp[1], w_fp[5], COUPs[2], 1.0, 0., 0., w_fp[68] ); + VVVV3P0_1( w_fp[0], w_fp[1], w_fp[5], COUPs[2], 1.0, 0., 0., w_fp[29] ); + VVVV4P0_1( w_fp[0], w_fp[1], w_fp[5], COUPs[2], 1.0, 0., 0., w_fp[10] ); // Amplitude(s) for diagram number 1140 - VVVV1_0( w_fp[68], w_fp[8], w_fp[4], w_fp[6], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[68], w_fp[8], w_fp[4], w_fp[6], COUPs[2], 1.0, &_fp[0] ); jamp_sv[2] += amp_sv[0]; jamp_sv[3] -= amp_sv[0]; jamp_sv[12] -= amp_sv[0]; @@ -25333,7 +25333,7 @@ namespace mg5amcCpu jamp_sv[109] -= amp_sv[0]; jamp_sv[111] -= amp_sv[0]; jamp_sv[113] += amp_sv[0]; - VVVV3_0( w_fp[68], w_fp[8], w_fp[4], w_fp[6], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[68], w_fp[8], w_fp[4], w_fp[6], COUPs[2], 1.0, &_fp[0] ); jamp_sv[2] += amp_sv[0]; jamp_sv[12] -= amp_sv[0]; jamp_sv[36] -= amp_sv[0]; @@ -25350,7 +25350,7 @@ namespace mg5amcCpu jamp_sv[111] -= amp_sv[0]; jamp_sv[113] += amp_sv[0]; jamp_sv[116] -= amp_sv[0]; - VVVV4_0( w_fp[68], w_fp[8], w_fp[4], w_fp[6], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[68], w_fp[8], w_fp[4], w_fp[6], COUPs[2], 1.0, &_fp[0] ); jamp_sv[3] += amp_sv[0]; jamp_sv[13] -= amp_sv[0]; jamp_sv[37] -= amp_sv[0]; @@ -25367,7 +25367,7 @@ namespace mg5amcCpu jamp_sv[100] += amp_sv[0]; jamp_sv[106] += amp_sv[0]; jamp_sv[116] -= amp_sv[0]; - VVVV1_0( w_fp[29], w_fp[8], w_fp[4], w_fp[6], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[29], w_fp[8], w_fp[4], w_fp[6], COUPs[2], 1.0, &_fp[0] ); jamp_sv[12] -= amp_sv[0]; jamp_sv[13] += amp_sv[0]; jamp_sv[26] += amp_sv[0]; @@ -25384,7 +25384,7 @@ namespace mg5amcCpu jamp_sv[110] += amp_sv[0]; jamp_sv[111] -= amp_sv[0]; jamp_sv[112] += amp_sv[0]; - VVVV3_0( w_fp[29], w_fp[8], w_fp[4], w_fp[6], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[29], w_fp[8], w_fp[4], w_fp[6], COUPs[2], 1.0, &_fp[0] ); jamp_sv[12] -= amp_sv[0]; jamp_sv[26] += amp_sv[0]; jamp_sv[36] -= amp_sv[0]; @@ -25401,7 +25401,7 @@ namespace mg5amcCpu jamp_sv[111] -= amp_sv[0]; jamp_sv[112] += amp_sv[0]; jamp_sv[114] -= amp_sv[0]; - VVVV4_0( w_fp[29], w_fp[8], w_fp[4], w_fp[6], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[29], w_fp[8], w_fp[4], w_fp[6], COUPs[2], 1.0, &_fp[0] ); jamp_sv[13] -= amp_sv[0]; jamp_sv[27] += amp_sv[0]; jamp_sv[37] -= amp_sv[0]; @@ -25418,7 +25418,7 @@ namespace mg5amcCpu jamp_sv[103] -= amp_sv[0]; jamp_sv[106] += amp_sv[0]; jamp_sv[114] -= amp_sv[0]; - VVVV1_0( w_fp[10], w_fp[8], w_fp[4], w_fp[6], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[10], w_fp[8], w_fp[4], w_fp[6], COUPs[2], 1.0, &_fp[0] ); jamp_sv[2] -= amp_sv[0]; jamp_sv[3] += amp_sv[0]; jamp_sv[26] += amp_sv[0]; @@ -25435,7 +25435,7 @@ namespace mg5amcCpu jamp_sv[110] += amp_sv[0]; jamp_sv[112] += amp_sv[0]; jamp_sv[113] -= amp_sv[0]; - VVVV3_0( w_fp[10], w_fp[8], w_fp[4], w_fp[6], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[10], w_fp[8], w_fp[4], w_fp[6], COUPs[2], 1.0, &_fp[0] ); jamp_sv[2] -= amp_sv[0]; jamp_sv[26] += amp_sv[0]; jamp_sv[48] += amp_sv[0]; @@ -25452,7 +25452,7 @@ namespace mg5amcCpu jamp_sv[113] -= amp_sv[0]; jamp_sv[114] -= amp_sv[0]; jamp_sv[116] += amp_sv[0]; - VVVV4_0( w_fp[10], w_fp[8], w_fp[4], w_fp[6], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[10], w_fp[8], w_fp[4], w_fp[6], COUPs[2], 1.0, &_fp[0] ); jamp_sv[3] -= amp_sv[0]; jamp_sv[27] += amp_sv[0]; jamp_sv[48] += amp_sv[0]; @@ -25473,12 +25473,12 @@ namespace mg5amcCpu // *** DIAGRAM 1141 OF 1240 *** // Wavefunction(s) for diagram number 1141 - VVV1P0_1( w_fp[68], w_fp[4], COUPs[0], 0., 0., w_fp[16] ); - VVV1P0_1( w_fp[29], w_fp[4], COUPs[0], 0., 0., w_fp[71] ); - VVV1P0_1( w_fp[10], w_fp[4], COUPs[0], 0., 0., w_fp[21] ); + VVV1P0_1( w_fp[68], w_fp[4], COUPs[0], 1.0, 0., 0., w_fp[16] ); + VVV1P0_1( w_fp[29], w_fp[4], COUPs[0], 1.0, 0., 0., w_fp[71] ); + VVV1P0_1( w_fp[10], w_fp[4], COUPs[0], 1.0, 0., 0., w_fp[21] ); // Amplitude(s) for diagram number 1141 - VVV1_0( w_fp[8], w_fp[6], w_fp[16], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[6], w_fp[16], COUPs[0], 1.0, &_fp[0] ); jamp_sv[2] += amp_sv[0]; jamp_sv[12] -= amp_sv[0]; jamp_sv[36] -= amp_sv[0]; @@ -25495,7 +25495,7 @@ namespace mg5amcCpu jamp_sv[111] -= amp_sv[0]; jamp_sv[113] += amp_sv[0]; jamp_sv[116] -= amp_sv[0]; - VVV1_0( w_fp[8], w_fp[6], w_fp[71], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[6], w_fp[71], COUPs[0], 1.0, &_fp[0] ); jamp_sv[12] -= amp_sv[0]; jamp_sv[26] += amp_sv[0]; jamp_sv[36] -= amp_sv[0]; @@ -25512,7 +25512,7 @@ namespace mg5amcCpu jamp_sv[111] -= amp_sv[0]; jamp_sv[112] += amp_sv[0]; jamp_sv[114] -= amp_sv[0]; - VVV1_0( w_fp[8], w_fp[6], w_fp[21], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[6], w_fp[21], COUPs[0], 1.0, &_fp[0] ); jamp_sv[2] -= amp_sv[0]; jamp_sv[26] += amp_sv[0]; jamp_sv[48] += amp_sv[0]; @@ -25533,12 +25533,12 @@ namespace mg5amcCpu // *** DIAGRAM 1142 OF 1240 *** // Wavefunction(s) for diagram number 1142 - VVV1P0_1( w_fp[68], w_fp[6], COUPs[0], 0., 0., w_fp[23] ); - VVV1P0_1( w_fp[29], w_fp[6], COUPs[0], 0., 0., w_fp[60] ); - VVV1P0_1( w_fp[10], w_fp[6], COUPs[0], 0., 0., w_fp[20] ); + VVV1P0_1( w_fp[68], w_fp[6], COUPs[0], 1.0, 0., 0., w_fp[23] ); + VVV1P0_1( w_fp[29], w_fp[6], COUPs[0], 1.0, 0., 0., w_fp[60] ); + VVV1P0_1( w_fp[10], w_fp[6], COUPs[0], 1.0, 0., 0., w_fp[20] ); // Amplitude(s) for diagram number 1142 - VVV1_0( w_fp[8], w_fp[4], w_fp[23], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[4], w_fp[23], COUPs[0], 1.0, &_fp[0] ); jamp_sv[3] += amp_sv[0]; jamp_sv[13] -= amp_sv[0]; jamp_sv[37] -= amp_sv[0]; @@ -25555,7 +25555,7 @@ namespace mg5amcCpu jamp_sv[100] += amp_sv[0]; jamp_sv[106] += amp_sv[0]; jamp_sv[116] -= amp_sv[0]; - VVV1_0( w_fp[8], w_fp[4], w_fp[60], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[4], w_fp[60], COUPs[0], 1.0, &_fp[0] ); jamp_sv[13] -= amp_sv[0]; jamp_sv[27] += amp_sv[0]; jamp_sv[37] -= amp_sv[0]; @@ -25572,7 +25572,7 @@ namespace mg5amcCpu jamp_sv[103] -= amp_sv[0]; jamp_sv[106] += amp_sv[0]; jamp_sv[114] -= amp_sv[0]; - VVV1_0( w_fp[8], w_fp[4], w_fp[20], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[4], w_fp[20], COUPs[0], 1.0, &_fp[0] ); jamp_sv[3] -= amp_sv[0]; jamp_sv[27] += amp_sv[0]; jamp_sv[48] += amp_sv[0]; @@ -25596,7 +25596,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1143 - VVV1_0( w_fp[68], w_fp[8], w_fp[27], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[68], w_fp[8], w_fp[27], COUPs[0], 1.0, &_fp[0] ); jamp_sv[2] += amp_sv[0]; jamp_sv[3] -= amp_sv[0]; jamp_sv[12] -= amp_sv[0]; @@ -25613,7 +25613,7 @@ namespace mg5amcCpu jamp_sv[109] -= amp_sv[0]; jamp_sv[111] -= amp_sv[0]; jamp_sv[113] += amp_sv[0]; - VVV1_0( w_fp[29], w_fp[8], w_fp[27], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[29], w_fp[8], w_fp[27], COUPs[0], 1.0, &_fp[0] ); jamp_sv[12] -= amp_sv[0]; jamp_sv[13] += amp_sv[0]; jamp_sv[26] += amp_sv[0]; @@ -25630,7 +25630,7 @@ namespace mg5amcCpu jamp_sv[110] += amp_sv[0]; jamp_sv[111] -= amp_sv[0]; jamp_sv[112] += amp_sv[0]; - VVV1_0( w_fp[10], w_fp[8], w_fp[27], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[10], w_fp[8], w_fp[27], COUPs[0], 1.0, &_fp[0] ); jamp_sv[2] -= amp_sv[0]; jamp_sv[3] += amp_sv[0]; jamp_sv[26] += amp_sv[0]; @@ -25651,22 +25651,22 @@ namespace mg5amcCpu // *** DIAGRAM 1144 OF 1240 *** // Wavefunction(s) for diagram number 1144 - FFV1_2( w_fp[3], w_fp[68], COUPs[1], cIPD[0], cIPD[1], w_fp[59] ); - FFV1_2( w_fp[3], w_fp[29], COUPs[1], cIPD[0], cIPD[1], w_fp[111] ); - FFV1_2( w_fp[3], w_fp[10], COUPs[1], cIPD[0], cIPD[1], w_fp[98] ); + FFV1_2( w_fp[3], w_fp[68], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[59] ); + FFV1_2( w_fp[3], w_fp[29], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[111] ); + FFV1_2( w_fp[3], w_fp[10], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[98] ); // Amplitude(s) for diagram number 1144 - FFV1_0( w_fp[59], w_fp[33], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[59], w_fp[33], w_fp[6], COUPs[1], 1.0, &_fp[0] ); jamp_sv[66] += amp_sv[0]; jamp_sv[67] -= amp_sv[0]; jamp_sv[69] -= amp_sv[0]; jamp_sv[71] += amp_sv[0]; - FFV1_0( w_fp[111], w_fp[33], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[111], w_fp[33], w_fp[6], COUPs[1], 1.0, &_fp[0] ); jamp_sv[67] -= amp_sv[0]; jamp_sv[68] += amp_sv[0]; jamp_sv[69] -= amp_sv[0]; jamp_sv[70] += amp_sv[0]; - FFV1_0( w_fp[98], w_fp[33], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[98], w_fp[33], w_fp[6], COUPs[1], 1.0, &_fp[0] ); jamp_sv[66] -= amp_sv[0]; jamp_sv[68] += amp_sv[0]; jamp_sv[70] += amp_sv[0]; @@ -25678,7 +25678,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1145 - FFV1_0( w_fp[3], w_fp[33], w_fp[23], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[33], w_fp[23], COUPs[1], 1.0, &_fp[0] ); jamp_sv[48] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[50] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[56] += cxtype( 0, 1 ) * amp_sv[0]; @@ -25687,7 +25687,7 @@ namespace mg5amcCpu jamp_sv[67] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[69] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[71] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[33], w_fp[60], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[33], w_fp[60], COUPs[1], 1.0, &_fp[0] ); jamp_sv[50] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[54] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[56] += cxtype( 0, 1 ) * amp_sv[0]; @@ -25696,7 +25696,7 @@ namespace mg5amcCpu jamp_sv[68] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[69] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[70] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[33], w_fp[20], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[33], w_fp[20], COUPs[1], 1.0, &_fp[0] ); jamp_sv[48] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[54] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[60] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -25712,17 +25712,17 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1146 - FFV1_0( w_fp[41], w_fp[33], w_fp[68], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[33], w_fp[68], COUPs[1], 1.0, &_fp[0] ); jamp_sv[48] += amp_sv[0]; jamp_sv[50] -= amp_sv[0]; jamp_sv[56] -= amp_sv[0]; jamp_sv[62] += amp_sv[0]; - FFV1_0( w_fp[41], w_fp[33], w_fp[29], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[33], w_fp[29], COUPs[1], 1.0, &_fp[0] ); jamp_sv[50] -= amp_sv[0]; jamp_sv[54] += amp_sv[0]; jamp_sv[56] -= amp_sv[0]; jamp_sv[60] += amp_sv[0]; - FFV1_0( w_fp[41], w_fp[33], w_fp[10], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[33], w_fp[10], COUPs[1], 1.0, &_fp[0] ); jamp_sv[48] -= amp_sv[0]; jamp_sv[54] += amp_sv[0]; jamp_sv[60] += amp_sv[0]; @@ -25734,17 +25734,17 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1147 - FFV1_0( w_fp[59], w_fp[47], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[59], w_fp[47], w_fp[4], COUPs[1], 1.0, &_fp[0] ); jamp_sv[108] += amp_sv[0]; jamp_sv[109] -= amp_sv[0]; jamp_sv[111] -= amp_sv[0]; jamp_sv[113] += amp_sv[0]; - FFV1_0( w_fp[111], w_fp[47], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[111], w_fp[47], w_fp[4], COUPs[1], 1.0, &_fp[0] ); jamp_sv[109] -= amp_sv[0]; jamp_sv[110] += amp_sv[0]; jamp_sv[111] -= amp_sv[0]; jamp_sv[112] += amp_sv[0]; - FFV1_0( w_fp[98], w_fp[47], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[98], w_fp[47], w_fp[4], COUPs[1], 1.0, &_fp[0] ); jamp_sv[108] -= amp_sv[0]; jamp_sv[110] += amp_sv[0]; jamp_sv[112] += amp_sv[0]; @@ -25756,7 +25756,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1148 - FFV1_0( w_fp[3], w_fp[47], w_fp[16], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[47], w_fp[16], COUPs[1], 1.0, &_fp[0] ); jamp_sv[97] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[100] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[106] += cxtype( 0, 1 ) * amp_sv[0]; @@ -25765,7 +25765,7 @@ namespace mg5amcCpu jamp_sv[111] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[113] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[116] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[47], w_fp[71], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[47], w_fp[71], COUPs[1], 1.0, &_fp[0] ); jamp_sv[100] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[103] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[106] += cxtype( 0, 1 ) * amp_sv[0]; @@ -25774,7 +25774,7 @@ namespace mg5amcCpu jamp_sv[111] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[112] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[114] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[47], w_fp[21], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[47], w_fp[21], COUPs[1], 1.0, &_fp[0] ); jamp_sv[97] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[103] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[108] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -25790,17 +25790,17 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1149 - FFV1_0( w_fp[46], w_fp[47], w_fp[68], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[47], w_fp[68], COUPs[1], 1.0, &_fp[0] ); jamp_sv[97] += amp_sv[0]; jamp_sv[100] -= amp_sv[0]; jamp_sv[106] -= amp_sv[0]; jamp_sv[116] += amp_sv[0]; - FFV1_0( w_fp[46], w_fp[47], w_fp[29], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[47], w_fp[29], COUPs[1], 1.0, &_fp[0] ); jamp_sv[100] -= amp_sv[0]; jamp_sv[103] += amp_sv[0]; jamp_sv[106] -= amp_sv[0]; jamp_sv[114] += amp_sv[0]; - FFV1_0( w_fp[46], w_fp[47], w_fp[10], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[47], w_fp[10], COUPs[1], 1.0, &_fp[0] ); jamp_sv[97] -= amp_sv[0]; jamp_sv[103] += amp_sv[0]; jamp_sv[114] += amp_sv[0]; @@ -25809,22 +25809,22 @@ namespace mg5amcCpu // *** DIAGRAM 1150 OF 1240 *** // Wavefunction(s) for diagram number 1150 - FFV1_1( w_fp[2], w_fp[68], COUPs[1], cIPD[0], cIPD[1], w_fp[17] ); - FFV1_1( w_fp[2], w_fp[29], COUPs[1], cIPD[0], cIPD[1], w_fp[68] ); - FFV1_1( w_fp[2], w_fp[10], COUPs[1], cIPD[0], cIPD[1], w_fp[29] ); + FFV1_1( w_fp[2], w_fp[68], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[17] ); + FFV1_1( w_fp[2], w_fp[29], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[68] ); + FFV1_1( w_fp[2], w_fp[10], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[29] ); // Amplitude(s) for diagram number 1150 - FFV1_0( w_fp[46], w_fp[17], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[17], w_fp[6], COUPs[1], 1.0, &_fp[0] ); jamp_sv[3] += amp_sv[0]; jamp_sv[13] -= amp_sv[0]; jamp_sv[37] -= amp_sv[0]; jamp_sv[79] += amp_sv[0]; - FFV1_0( w_fp[46], w_fp[68], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[68], w_fp[6], COUPs[1], 1.0, &_fp[0] ); jamp_sv[13] -= amp_sv[0]; jamp_sv[27] += amp_sv[0]; jamp_sv[37] -= amp_sv[0]; jamp_sv[73] += amp_sv[0]; - FFV1_0( w_fp[46], w_fp[29], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[29], w_fp[6], COUPs[1], 1.0, &_fp[0] ); jamp_sv[3] -= amp_sv[0]; jamp_sv[27] += amp_sv[0]; jamp_sv[73] += amp_sv[0]; @@ -25836,7 +25836,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1151 - FFV1_0( w_fp[46], w_fp[2], w_fp[23], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[2], w_fp[23], COUPs[1], 1.0, &_fp[0] ); jamp_sv[3] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[13] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[37] += cxtype( 0, 1 ) * amp_sv[0]; @@ -25845,7 +25845,7 @@ namespace mg5amcCpu jamp_sv[100] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[106] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[116] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[46], w_fp[2], w_fp[60], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[2], w_fp[60], COUPs[1], 1.0, &_fp[0] ); jamp_sv[13] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[27] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[37] += cxtype( 0, 1 ) * amp_sv[0]; @@ -25854,7 +25854,7 @@ namespace mg5amcCpu jamp_sv[103] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[106] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[114] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[46], w_fp[2], w_fp[20], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[2], w_fp[20], COUPs[1], 1.0, &_fp[0] ); jamp_sv[3] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[27] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[73] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -25870,17 +25870,17 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1152 - FFV1_0( w_fp[41], w_fp[17], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[17], w_fp[4], COUPs[1], 1.0, &_fp[0] ); jamp_sv[2] += amp_sv[0]; jamp_sv[12] -= amp_sv[0]; jamp_sv[36] -= amp_sv[0]; jamp_sv[78] += amp_sv[0]; - FFV1_0( w_fp[41], w_fp[68], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[68], w_fp[4], COUPs[1], 1.0, &_fp[0] ); jamp_sv[12] -= amp_sv[0]; jamp_sv[26] += amp_sv[0]; jamp_sv[36] -= amp_sv[0]; jamp_sv[72] += amp_sv[0]; - FFV1_0( w_fp[41], w_fp[29], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[29], w_fp[4], COUPs[1], 1.0, &_fp[0] ); jamp_sv[2] -= amp_sv[0]; jamp_sv[26] += amp_sv[0]; jamp_sv[72] += amp_sv[0]; @@ -25892,7 +25892,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1153 - FFV1_0( w_fp[41], w_fp[2], w_fp[16], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[2], w_fp[16], COUPs[1], 1.0, &_fp[0] ); jamp_sv[2] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[12] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[36] += cxtype( 0, 1 ) * amp_sv[0]; @@ -25901,7 +25901,7 @@ namespace mg5amcCpu jamp_sv[56] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[62] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[78] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[41], w_fp[2], w_fp[71], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[2], w_fp[71], COUPs[1], 1.0, &_fp[0] ); jamp_sv[12] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[26] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[36] += cxtype( 0, 1 ) * amp_sv[0]; @@ -25910,7 +25910,7 @@ namespace mg5amcCpu jamp_sv[56] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[60] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[72] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[41], w_fp[2], w_fp[21], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[2], w_fp[21], COUPs[1], 1.0, &_fp[0] ); jamp_sv[2] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[26] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[48] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -25926,7 +25926,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1154 - FFV1_0( w_fp[3], w_fp[17], w_fp[27], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[17], w_fp[27], COUPs[1], 1.0, &_fp[0] ); jamp_sv[2] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[3] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[12] += cxtype( 0, 1 ) * amp_sv[0]; @@ -25935,7 +25935,7 @@ namespace mg5amcCpu jamp_sv[37] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[78] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[79] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[68], w_fp[27], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[68], w_fp[27], COUPs[1], 1.0, &_fp[0] ); jamp_sv[12] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[13] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[26] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -25944,7 +25944,7 @@ namespace mg5amcCpu jamp_sv[37] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[72] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[73] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[29], w_fp[27], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[29], w_fp[27], COUPs[1], 1.0, &_fp[0] ); jamp_sv[2] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[3] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[26] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -25960,7 +25960,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1155 - FFV1_0( w_fp[59], w_fp[2], w_fp[27], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[59], w_fp[2], w_fp[27], COUPs[1], 1.0, &_fp[0] ); jamp_sv[66] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[67] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[69] += cxtype( 0, 1 ) * amp_sv[0]; @@ -25969,7 +25969,7 @@ namespace mg5amcCpu jamp_sv[109] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[111] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[113] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[111], w_fp[2], w_fp[27], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[111], w_fp[2], w_fp[27], COUPs[1], 1.0, &_fp[0] ); jamp_sv[67] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[68] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[69] += cxtype( 0, 1 ) * amp_sv[0]; @@ -25978,7 +25978,7 @@ namespace mg5amcCpu jamp_sv[110] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[111] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[112] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[98], w_fp[2], w_fp[27], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[98], w_fp[2], w_fp[27], COUPs[1], 1.0, &_fp[0] ); jamp_sv[66] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[68] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[70] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -25991,12 +25991,12 @@ namespace mg5amcCpu // *** DIAGRAM 1156 OF 1240 *** // Wavefunction(s) for diagram number 1156 - VVVV1P0_1( w_fp[0], w_fp[1], w_fp[6], COUPs[2], 0., 0., w_fp[98] ); - VVVV3P0_1( w_fp[0], w_fp[1], w_fp[6], COUPs[2], 0., 0., w_fp[27] ); - VVVV4P0_1( w_fp[0], w_fp[1], w_fp[6], COUPs[2], 0., 0., w_fp[111] ); + VVVV1P0_1( w_fp[0], w_fp[1], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[98] ); + VVVV3P0_1( w_fp[0], w_fp[1], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[27] ); + VVVV4P0_1( w_fp[0], w_fp[1], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[111] ); // Amplitude(s) for diagram number 1156 - VVVV1_0( w_fp[98], w_fp[8], w_fp[4], w_fp[5], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[98], w_fp[8], w_fp[4], w_fp[5], COUPs[2], 1.0, &_fp[0] ); jamp_sv[4] += amp_sv[0]; jamp_sv[5] -= amp_sv[0]; jamp_sv[18] -= amp_sv[0]; @@ -26013,7 +26013,7 @@ namespace mg5amcCpu jamp_sv[89] += amp_sv[0]; jamp_sv[102] += amp_sv[0]; jamp_sv[103] -= amp_sv[0]; - VVVV3_0( w_fp[98], w_fp[8], w_fp[4], w_fp[5], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[98], w_fp[8], w_fp[4], w_fp[5], COUPs[2], 1.0, &_fp[0] ); jamp_sv[4] += amp_sv[0]; jamp_sv[18] -= amp_sv[0]; jamp_sv[42] -= amp_sv[0]; @@ -26030,7 +26030,7 @@ namespace mg5amcCpu jamp_sv[89] += amp_sv[0]; jamp_sv[92] -= amp_sv[0]; jamp_sv[102] += amp_sv[0]; - VVVV4_0( w_fp[98], w_fp[8], w_fp[4], w_fp[5], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[98], w_fp[8], w_fp[4], w_fp[5], COUPs[2], 1.0, &_fp[0] ); jamp_sv[5] += amp_sv[0]; jamp_sv[19] -= amp_sv[0]; jamp_sv[43] -= amp_sv[0]; @@ -26047,7 +26047,7 @@ namespace mg5amcCpu jamp_sv[82] += amp_sv[0]; jamp_sv[92] -= amp_sv[0]; jamp_sv[103] += amp_sv[0]; - VVVV1_0( w_fp[27], w_fp[8], w_fp[4], w_fp[5], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[27], w_fp[8], w_fp[4], w_fp[5], COUPs[2], 1.0, &_fp[0] ); jamp_sv[18] -= amp_sv[0]; jamp_sv[19] += amp_sv[0]; jamp_sv[28] += amp_sv[0]; @@ -26064,7 +26064,7 @@ namespace mg5amcCpu jamp_sv[88] += amp_sv[0]; jamp_sv[96] += amp_sv[0]; jamp_sv[97] -= amp_sv[0]; - VVVV3_0( w_fp[27], w_fp[8], w_fp[4], w_fp[5], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[27], w_fp[8], w_fp[4], w_fp[5], COUPs[2], 1.0, &_fp[0] ); jamp_sv[18] -= amp_sv[0]; jamp_sv[28] += amp_sv[0]; jamp_sv[42] -= amp_sv[0]; @@ -26081,7 +26081,7 @@ namespace mg5amcCpu jamp_sv[88] += amp_sv[0]; jamp_sv[90] -= amp_sv[0]; jamp_sv[96] += amp_sv[0]; - VVVV4_0( w_fp[27], w_fp[8], w_fp[4], w_fp[5], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[27], w_fp[8], w_fp[4], w_fp[5], COUPs[2], 1.0, &_fp[0] ); jamp_sv[19] -= amp_sv[0]; jamp_sv[29] += amp_sv[0]; jamp_sv[43] -= amp_sv[0]; @@ -26098,7 +26098,7 @@ namespace mg5amcCpu jamp_sv[82] += amp_sv[0]; jamp_sv[90] -= amp_sv[0]; jamp_sv[97] += amp_sv[0]; - VVVV1_0( w_fp[111], w_fp[8], w_fp[4], w_fp[5], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[111], w_fp[8], w_fp[4], w_fp[5], COUPs[2], 1.0, &_fp[0] ); jamp_sv[4] -= amp_sv[0]; jamp_sv[5] += amp_sv[0]; jamp_sv[28] += amp_sv[0]; @@ -26115,7 +26115,7 @@ namespace mg5amcCpu jamp_sv[97] -= amp_sv[0]; jamp_sv[102] -= amp_sv[0]; jamp_sv[103] += amp_sv[0]; - VVVV3_0( w_fp[111], w_fp[8], w_fp[4], w_fp[5], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[111], w_fp[8], w_fp[4], w_fp[5], COUPs[2], 1.0, &_fp[0] ); jamp_sv[4] -= amp_sv[0]; jamp_sv[28] += amp_sv[0]; jamp_sv[49] += amp_sv[0]; @@ -26132,7 +26132,7 @@ namespace mg5amcCpu jamp_sv[92] += amp_sv[0]; jamp_sv[96] += amp_sv[0]; jamp_sv[102] -= amp_sv[0]; - VVVV4_0( w_fp[111], w_fp[8], w_fp[4], w_fp[5], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[111], w_fp[8], w_fp[4], w_fp[5], COUPs[2], 1.0, &_fp[0] ); jamp_sv[5] -= amp_sv[0]; jamp_sv[29] += amp_sv[0]; jamp_sv[49] += amp_sv[0]; @@ -26153,12 +26153,12 @@ namespace mg5amcCpu // *** DIAGRAM 1157 OF 1240 *** // Wavefunction(s) for diagram number 1157 - VVV1P0_1( w_fp[98], w_fp[4], COUPs[0], 0., 0., w_fp[59] ); - VVV1P0_1( w_fp[27], w_fp[4], COUPs[0], 0., 0., w_fp[29] ); - VVV1P0_1( w_fp[111], w_fp[4], COUPs[0], 0., 0., w_fp[68] ); + VVV1P0_1( w_fp[98], w_fp[4], COUPs[0], 1.0, 0., 0., w_fp[59] ); + VVV1P0_1( w_fp[27], w_fp[4], COUPs[0], 1.0, 0., 0., w_fp[29] ); + VVV1P0_1( w_fp[111], w_fp[4], COUPs[0], 1.0, 0., 0., w_fp[68] ); // Amplitude(s) for diagram number 1157 - VVV1_0( w_fp[8], w_fp[5], w_fp[59], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[5], w_fp[59], COUPs[0], 1.0, &_fp[0] ); jamp_sv[4] += amp_sv[0]; jamp_sv[18] -= amp_sv[0]; jamp_sv[42] -= amp_sv[0]; @@ -26175,7 +26175,7 @@ namespace mg5amcCpu jamp_sv[89] += amp_sv[0]; jamp_sv[92] -= amp_sv[0]; jamp_sv[102] += amp_sv[0]; - VVV1_0( w_fp[8], w_fp[5], w_fp[29], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[5], w_fp[29], COUPs[0], 1.0, &_fp[0] ); jamp_sv[18] -= amp_sv[0]; jamp_sv[28] += amp_sv[0]; jamp_sv[42] -= amp_sv[0]; @@ -26192,7 +26192,7 @@ namespace mg5amcCpu jamp_sv[88] += amp_sv[0]; jamp_sv[90] -= amp_sv[0]; jamp_sv[96] += amp_sv[0]; - VVV1_0( w_fp[8], w_fp[5], w_fp[68], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[5], w_fp[68], COUPs[0], 1.0, &_fp[0] ); jamp_sv[4] -= amp_sv[0]; jamp_sv[28] += amp_sv[0]; jamp_sv[49] += amp_sv[0]; @@ -26213,12 +26213,12 @@ namespace mg5amcCpu // *** DIAGRAM 1158 OF 1240 *** // Wavefunction(s) for diagram number 1158 - VVV1P0_1( w_fp[98], w_fp[5], COUPs[0], 0., 0., w_fp[17] ); - VVV1P0_1( w_fp[27], w_fp[5], COUPs[0], 0., 0., w_fp[21] ); - VVV1P0_1( w_fp[111], w_fp[5], COUPs[0], 0., 0., w_fp[71] ); + VVV1P0_1( w_fp[98], w_fp[5], COUPs[0], 1.0, 0., 0., w_fp[17] ); + VVV1P0_1( w_fp[27], w_fp[5], COUPs[0], 1.0, 0., 0., w_fp[21] ); + VVV1P0_1( w_fp[111], w_fp[5], COUPs[0], 1.0, 0., 0., w_fp[71] ); // Amplitude(s) for diagram number 1158 - VVV1_0( w_fp[8], w_fp[4], w_fp[17], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[4], w_fp[17], COUPs[0], 1.0, &_fp[0] ); jamp_sv[5] += amp_sv[0]; jamp_sv[19] -= amp_sv[0]; jamp_sv[43] -= amp_sv[0]; @@ -26235,7 +26235,7 @@ namespace mg5amcCpu jamp_sv[82] += amp_sv[0]; jamp_sv[92] -= amp_sv[0]; jamp_sv[103] += amp_sv[0]; - VVV1_0( w_fp[8], w_fp[4], w_fp[21], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[4], w_fp[21], COUPs[0], 1.0, &_fp[0] ); jamp_sv[19] -= amp_sv[0]; jamp_sv[29] += amp_sv[0]; jamp_sv[43] -= amp_sv[0]; @@ -26252,7 +26252,7 @@ namespace mg5amcCpu jamp_sv[82] += amp_sv[0]; jamp_sv[90] -= amp_sv[0]; jamp_sv[97] += amp_sv[0]; - VVV1_0( w_fp[8], w_fp[4], w_fp[71], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[4], w_fp[71], COUPs[0], 1.0, &_fp[0] ); jamp_sv[5] -= amp_sv[0]; jamp_sv[29] += amp_sv[0]; jamp_sv[49] += amp_sv[0]; @@ -26276,7 +26276,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1159 - VVV1_0( w_fp[98], w_fp[8], w_fp[24], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[98], w_fp[8], w_fp[24], COUPs[0], 1.0, &_fp[0] ); jamp_sv[4] += amp_sv[0]; jamp_sv[5] -= amp_sv[0]; jamp_sv[18] -= amp_sv[0]; @@ -26293,7 +26293,7 @@ namespace mg5amcCpu jamp_sv[89] += amp_sv[0]; jamp_sv[102] += amp_sv[0]; jamp_sv[103] -= amp_sv[0]; - VVV1_0( w_fp[27], w_fp[8], w_fp[24], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[27], w_fp[8], w_fp[24], COUPs[0], 1.0, &_fp[0] ); jamp_sv[18] -= amp_sv[0]; jamp_sv[19] += amp_sv[0]; jamp_sv[28] += amp_sv[0]; @@ -26310,7 +26310,7 @@ namespace mg5amcCpu jamp_sv[88] += amp_sv[0]; jamp_sv[96] += amp_sv[0]; jamp_sv[97] -= amp_sv[0]; - VVV1_0( w_fp[111], w_fp[8], w_fp[24], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[111], w_fp[8], w_fp[24], COUPs[0], 1.0, &_fp[0] ); jamp_sv[4] -= amp_sv[0]; jamp_sv[5] += amp_sv[0]; jamp_sv[28] += amp_sv[0]; @@ -26331,22 +26331,22 @@ namespace mg5amcCpu // *** DIAGRAM 1160 OF 1240 *** // Wavefunction(s) for diagram number 1160 - FFV1_2( w_fp[3], w_fp[98], COUPs[1], cIPD[0], cIPD[1], w_fp[16] ); - FFV1_2( w_fp[3], w_fp[27], COUPs[1], cIPD[0], cIPD[1], w_fp[20] ); - FFV1_2( w_fp[3], w_fp[111], COUPs[1], cIPD[0], cIPD[1], w_fp[60] ); + FFV1_2( w_fp[3], w_fp[98], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[16] ); + FFV1_2( w_fp[3], w_fp[27], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[20] ); + FFV1_2( w_fp[3], w_fp[111], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[60] ); // Amplitude(s) for diagram number 1160 - FFV1_0( w_fp[16], w_fp[33], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[16], w_fp[33], w_fp[5], COUPs[1], 1.0, &_fp[0] ); jamp_sv[60] += amp_sv[0]; jamp_sv[61] -= amp_sv[0]; jamp_sv[63] -= amp_sv[0]; jamp_sv[65] += amp_sv[0]; - FFV1_0( w_fp[20], w_fp[33], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[20], w_fp[33], w_fp[5], COUPs[1], 1.0, &_fp[0] ); jamp_sv[61] -= amp_sv[0]; jamp_sv[62] += amp_sv[0]; jamp_sv[63] -= amp_sv[0]; jamp_sv[64] += amp_sv[0]; - FFV1_0( w_fp[60], w_fp[33], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[60], w_fp[33], w_fp[5], COUPs[1], 1.0, &_fp[0] ); jamp_sv[60] -= amp_sv[0]; jamp_sv[62] += amp_sv[0]; jamp_sv[64] += amp_sv[0]; @@ -26358,7 +26358,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1161 - FFV1_0( w_fp[3], w_fp[33], w_fp[17], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[33], w_fp[17], COUPs[1], 1.0, &_fp[0] ); jamp_sv[49] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[52] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[58] += cxtype( 0, 1 ) * amp_sv[0]; @@ -26367,7 +26367,7 @@ namespace mg5amcCpu jamp_sv[63] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[65] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[68] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[33], w_fp[21], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[33], w_fp[21], COUPs[1], 1.0, &_fp[0] ); jamp_sv[52] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[55] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[58] += cxtype( 0, 1 ) * amp_sv[0]; @@ -26376,7 +26376,7 @@ namespace mg5amcCpu jamp_sv[63] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[64] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[66] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[33], w_fp[71], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[33], w_fp[71], COUPs[1], 1.0, &_fp[0] ); jamp_sv[49] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[55] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[60] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -26392,17 +26392,17 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1162 - FFV1_0( w_fp[38], w_fp[33], w_fp[98], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[33], w_fp[98], COUPs[1], 1.0, &_fp[0] ); jamp_sv[49] += amp_sv[0]; jamp_sv[52] -= amp_sv[0]; jamp_sv[58] -= amp_sv[0]; jamp_sv[68] += amp_sv[0]; - FFV1_0( w_fp[38], w_fp[33], w_fp[27], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[33], w_fp[27], COUPs[1], 1.0, &_fp[0] ); jamp_sv[52] -= amp_sv[0]; jamp_sv[55] += amp_sv[0]; jamp_sv[58] -= amp_sv[0]; jamp_sv[66] += amp_sv[0]; - FFV1_0( w_fp[38], w_fp[33], w_fp[111], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[33], w_fp[111], COUPs[1], 1.0, &_fp[0] ); jamp_sv[49] -= amp_sv[0]; jamp_sv[55] += amp_sv[0]; jamp_sv[66] += amp_sv[0]; @@ -26414,17 +26414,17 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1163 - FFV1_0( w_fp[16], w_fp[39], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[16], w_fp[39], w_fp[4], COUPs[1], 1.0, &_fp[0] ); jamp_sv[84] += amp_sv[0]; jamp_sv[85] -= amp_sv[0]; jamp_sv[87] -= amp_sv[0]; jamp_sv[89] += amp_sv[0]; - FFV1_0( w_fp[20], w_fp[39], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[20], w_fp[39], w_fp[4], COUPs[1], 1.0, &_fp[0] ); jamp_sv[85] -= amp_sv[0]; jamp_sv[86] += amp_sv[0]; jamp_sv[87] -= amp_sv[0]; jamp_sv[88] += amp_sv[0]; - FFV1_0( w_fp[60], w_fp[39], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[60], w_fp[39], w_fp[4], COUPs[1], 1.0, &_fp[0] ); jamp_sv[84] -= amp_sv[0]; jamp_sv[86] += amp_sv[0]; jamp_sv[88] += amp_sv[0]; @@ -26436,7 +26436,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1164 - FFV1_0( w_fp[3], w_fp[39], w_fp[59], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[39], w_fp[59], COUPs[1], 1.0, &_fp[0] ); jamp_sv[73] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[76] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[82] += cxtype( 0, 1 ) * amp_sv[0]; @@ -26445,7 +26445,7 @@ namespace mg5amcCpu jamp_sv[87] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[89] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[92] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[39], w_fp[29], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[39], w_fp[29], COUPs[1], 1.0, &_fp[0] ); jamp_sv[76] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[79] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[82] += cxtype( 0, 1 ) * amp_sv[0]; @@ -26454,7 +26454,7 @@ namespace mg5amcCpu jamp_sv[87] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[88] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[90] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[39], w_fp[68], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[39], w_fp[68], COUPs[1], 1.0, &_fp[0] ); jamp_sv[73] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[79] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[84] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -26470,17 +26470,17 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1165 - FFV1_0( w_fp[46], w_fp[39], w_fp[98], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[39], w_fp[98], COUPs[1], 1.0, &_fp[0] ); jamp_sv[73] += amp_sv[0]; jamp_sv[76] -= amp_sv[0]; jamp_sv[82] -= amp_sv[0]; jamp_sv[92] += amp_sv[0]; - FFV1_0( w_fp[46], w_fp[39], w_fp[27], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[39], w_fp[27], COUPs[1], 1.0, &_fp[0] ); jamp_sv[76] -= amp_sv[0]; jamp_sv[79] += amp_sv[0]; jamp_sv[82] -= amp_sv[0]; jamp_sv[90] += amp_sv[0]; - FFV1_0( w_fp[46], w_fp[39], w_fp[111], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[39], w_fp[111], COUPs[1], 1.0, &_fp[0] ); jamp_sv[73] -= amp_sv[0]; jamp_sv[79] += amp_sv[0]; jamp_sv[90] += amp_sv[0]; @@ -26489,22 +26489,22 @@ namespace mg5amcCpu // *** DIAGRAM 1166 OF 1240 *** // Wavefunction(s) for diagram number 1166 - FFV1_1( w_fp[2], w_fp[98], COUPs[1], cIPD[0], cIPD[1], w_fp[23] ); - FFV1_1( w_fp[2], w_fp[27], COUPs[1], cIPD[0], cIPD[1], w_fp[98] ); - FFV1_1( w_fp[2], w_fp[111], COUPs[1], cIPD[0], cIPD[1], w_fp[27] ); + FFV1_1( w_fp[2], w_fp[98], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[23] ); + FFV1_1( w_fp[2], w_fp[27], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[98] ); + FFV1_1( w_fp[2], w_fp[111], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[27] ); // Amplitude(s) for diagram number 1166 - FFV1_0( w_fp[46], w_fp[23], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[23], w_fp[5], COUPs[1], 1.0, &_fp[0] ); jamp_sv[5] += amp_sv[0]; jamp_sv[19] -= amp_sv[0]; jamp_sv[43] -= amp_sv[0]; jamp_sv[103] += amp_sv[0]; - FFV1_0( w_fp[46], w_fp[98], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[98], w_fp[5], COUPs[1], 1.0, &_fp[0] ); jamp_sv[19] -= amp_sv[0]; jamp_sv[29] += amp_sv[0]; jamp_sv[43] -= amp_sv[0]; jamp_sv[97] += amp_sv[0]; - FFV1_0( w_fp[46], w_fp[27], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[27], w_fp[5], COUPs[1], 1.0, &_fp[0] ); jamp_sv[5] -= amp_sv[0]; jamp_sv[29] += amp_sv[0]; jamp_sv[97] += amp_sv[0]; @@ -26516,7 +26516,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1167 - FFV1_0( w_fp[46], w_fp[2], w_fp[17], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[2], w_fp[17], COUPs[1], 1.0, &_fp[0] ); jamp_sv[5] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[19] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[43] += cxtype( 0, 1 ) * amp_sv[0]; @@ -26525,7 +26525,7 @@ namespace mg5amcCpu jamp_sv[82] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[92] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[103] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[46], w_fp[2], w_fp[21], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[2], w_fp[21], COUPs[1], 1.0, &_fp[0] ); jamp_sv[19] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[29] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[43] += cxtype( 0, 1 ) * amp_sv[0]; @@ -26534,7 +26534,7 @@ namespace mg5amcCpu jamp_sv[82] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[90] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[97] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[46], w_fp[2], w_fp[71], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[2], w_fp[71], COUPs[1], 1.0, &_fp[0] ); jamp_sv[5] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[29] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[73] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -26550,17 +26550,17 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1168 - FFV1_0( w_fp[38], w_fp[23], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[23], w_fp[4], COUPs[1], 1.0, &_fp[0] ); jamp_sv[4] += amp_sv[0]; jamp_sv[18] -= amp_sv[0]; jamp_sv[42] -= amp_sv[0]; jamp_sv[102] += amp_sv[0]; - FFV1_0( w_fp[38], w_fp[98], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[98], w_fp[4], COUPs[1], 1.0, &_fp[0] ); jamp_sv[18] -= amp_sv[0]; jamp_sv[28] += amp_sv[0]; jamp_sv[42] -= amp_sv[0]; jamp_sv[96] += amp_sv[0]; - FFV1_0( w_fp[38], w_fp[27], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[27], w_fp[4], COUPs[1], 1.0, &_fp[0] ); jamp_sv[4] -= amp_sv[0]; jamp_sv[28] += amp_sv[0]; jamp_sv[96] += amp_sv[0]; @@ -26572,7 +26572,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1169 - FFV1_0( w_fp[38], w_fp[2], w_fp[59], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[2], w_fp[59], COUPs[1], 1.0, &_fp[0] ); jamp_sv[4] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[18] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[42] += cxtype( 0, 1 ) * amp_sv[0]; @@ -26581,7 +26581,7 @@ namespace mg5amcCpu jamp_sv[58] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[68] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[102] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[38], w_fp[2], w_fp[29], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[2], w_fp[29], COUPs[1], 1.0, &_fp[0] ); jamp_sv[18] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[28] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[42] += cxtype( 0, 1 ) * amp_sv[0]; @@ -26590,7 +26590,7 @@ namespace mg5amcCpu jamp_sv[58] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[66] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[96] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[38], w_fp[2], w_fp[68], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[2], w_fp[68], COUPs[1], 1.0, &_fp[0] ); jamp_sv[4] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[28] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[49] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -26606,7 +26606,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1170 - FFV1_0( w_fp[3], w_fp[23], w_fp[24], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[23], w_fp[24], COUPs[1], 1.0, &_fp[0] ); jamp_sv[4] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[5] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[18] += cxtype( 0, 1 ) * amp_sv[0]; @@ -26615,7 +26615,7 @@ namespace mg5amcCpu jamp_sv[43] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[102] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[103] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[98], w_fp[24], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[98], w_fp[24], COUPs[1], 1.0, &_fp[0] ); jamp_sv[18] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[19] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[28] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -26624,7 +26624,7 @@ namespace mg5amcCpu jamp_sv[43] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[96] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[97] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[27], w_fp[24], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[27], w_fp[24], COUPs[1], 1.0, &_fp[0] ); jamp_sv[4] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[5] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[28] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -26640,7 +26640,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1171 - FFV1_0( w_fp[16], w_fp[2], w_fp[24], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[16], w_fp[2], w_fp[24], COUPs[1], 1.0, &_fp[0] ); jamp_sv[60] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[61] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[63] += cxtype( 0, 1 ) * amp_sv[0]; @@ -26649,7 +26649,7 @@ namespace mg5amcCpu jamp_sv[85] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[87] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[89] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[20], w_fp[2], w_fp[24], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[20], w_fp[2], w_fp[24], COUPs[1], 1.0, &_fp[0] ); jamp_sv[61] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[62] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[63] += cxtype( 0, 1 ) * amp_sv[0]; @@ -26658,7 +26658,7 @@ namespace mg5amcCpu jamp_sv[86] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[87] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[88] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[60], w_fp[2], w_fp[24], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[60], w_fp[2], w_fp[24], COUPs[1], 1.0, &_fp[0] ); jamp_sv[60] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[62] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[64] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -26671,25 +26671,25 @@ namespace mg5amcCpu // *** DIAGRAM 1172 OF 1240 *** // Wavefunction(s) for diagram number 1172 - VVVV1P0_1( w_fp[0], w_fp[4], w_fp[5], COUPs[2], 0., 0., w_fp[60] ); - VVVV3P0_1( w_fp[0], w_fp[4], w_fp[5], COUPs[2], 0., 0., w_fp[24] ); - VVVV4P0_1( w_fp[0], w_fp[4], w_fp[5], COUPs[2], 0., 0., w_fp[20] ); - FFV1_2( w_fp[3], w_fp[60], COUPs[1], cIPD[0], cIPD[1], w_fp[16] ); - FFV1_2( w_fp[3], w_fp[24], COUPs[1], cIPD[0], cIPD[1], w_fp[27] ); - FFV1_2( w_fp[3], w_fp[20], COUPs[1], cIPD[0], cIPD[1], w_fp[98] ); + VVVV1P0_1( w_fp[0], w_fp[4], w_fp[5], COUPs[2], 1.0, 0., 0., w_fp[60] ); + VVVV3P0_1( w_fp[0], w_fp[4], w_fp[5], COUPs[2], 1.0, 0., 0., w_fp[24] ); + VVVV4P0_1( w_fp[0], w_fp[4], w_fp[5], COUPs[2], 1.0, 0., 0., w_fp[20] ); + FFV1_2( w_fp[3], w_fp[60], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[16] ); + FFV1_2( w_fp[3], w_fp[24], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[27] ); + FFV1_2( w_fp[3], w_fp[20], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[98] ); // Amplitude(s) for diagram number 1172 - FFV1_0( w_fp[16], w_fp[77], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[16], w_fp[77], w_fp[6], COUPs[1], 1.0, &_fp[0] ); jamp_sv[42] += amp_sv[0]; jamp_sv[43] -= amp_sv[0]; jamp_sv[45] -= amp_sv[0]; jamp_sv[47] += amp_sv[0]; - FFV1_0( w_fp[27], w_fp[77], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[27], w_fp[77], w_fp[6], COUPs[1], 1.0, &_fp[0] ); jamp_sv[43] -= amp_sv[0]; jamp_sv[44] += amp_sv[0]; jamp_sv[45] -= amp_sv[0]; jamp_sv[46] += amp_sv[0]; - FFV1_0( w_fp[98], w_fp[77], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[98], w_fp[77], w_fp[6], COUPs[1], 1.0, &_fp[0] ); jamp_sv[42] -= amp_sv[0]; jamp_sv[44] += amp_sv[0]; jamp_sv[46] += amp_sv[0]; @@ -26698,12 +26698,12 @@ namespace mg5amcCpu // *** DIAGRAM 1173 OF 1240 *** // Wavefunction(s) for diagram number 1173 - VVV1P0_1( w_fp[60], w_fp[6], COUPs[0], 0., 0., w_fp[23] ); - VVV1P0_1( w_fp[24], w_fp[6], COUPs[0], 0., 0., w_fp[68] ); - VVV1P0_1( w_fp[20], w_fp[6], COUPs[0], 0., 0., w_fp[29] ); + VVV1P0_1( w_fp[60], w_fp[6], COUPs[0], 1.0, 0., 0., w_fp[23] ); + VVV1P0_1( w_fp[24], w_fp[6], COUPs[0], 1.0, 0., 0., w_fp[68] ); + VVV1P0_1( w_fp[20], w_fp[6], COUPs[0], 1.0, 0., 0., w_fp[29] ); // Amplitude(s) for diagram number 1173 - FFV1_0( w_fp[3], w_fp[77], w_fp[23], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[77], w_fp[23], COUPs[1], 1.0, &_fp[0] ); jamp_sv[24] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[26] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[32] += cxtype( 0, 1 ) * amp_sv[0]; @@ -26712,7 +26712,7 @@ namespace mg5amcCpu jamp_sv[43] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[45] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[47] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[77], w_fp[68], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[77], w_fp[68], COUPs[1], 1.0, &_fp[0] ); jamp_sv[26] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[30] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[32] += cxtype( 0, 1 ) * amp_sv[0]; @@ -26721,7 +26721,7 @@ namespace mg5amcCpu jamp_sv[44] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[45] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[46] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[77], w_fp[29], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[77], w_fp[29], COUPs[1], 1.0, &_fp[0] ); jamp_sv[24] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[30] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[36] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -26737,17 +26737,17 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1174 - FFV1_0( w_fp[41], w_fp[77], w_fp[60], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[77], w_fp[60], COUPs[1], 1.0, &_fp[0] ); jamp_sv[24] += amp_sv[0]; jamp_sv[26] -= amp_sv[0]; jamp_sv[32] -= amp_sv[0]; jamp_sv[38] += amp_sv[0]; - FFV1_0( w_fp[41], w_fp[77], w_fp[24], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[77], w_fp[24], COUPs[1], 1.0, &_fp[0] ); jamp_sv[26] -= amp_sv[0]; jamp_sv[30] += amp_sv[0]; jamp_sv[32] -= amp_sv[0]; jamp_sv[36] += amp_sv[0]; - FFV1_0( w_fp[41], w_fp[77], w_fp[20], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[77], w_fp[20], COUPs[1], 1.0, &_fp[0] ); jamp_sv[24] -= amp_sv[0]; jamp_sv[30] += amp_sv[0]; jamp_sv[36] += amp_sv[0]; @@ -26756,22 +26756,22 @@ namespace mg5amcCpu // *** DIAGRAM 1175 OF 1240 *** // Wavefunction(s) for diagram number 1175 - FFV1_1( w_fp[2], w_fp[60], COUPs[1], cIPD[0], cIPD[1], w_fp[59] ); - FFV1_1( w_fp[2], w_fp[24], COUPs[1], cIPD[0], cIPD[1], w_fp[71] ); - FFV1_1( w_fp[2], w_fp[20], COUPs[1], cIPD[0], cIPD[1], w_fp[21] ); + FFV1_1( w_fp[2], w_fp[60], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[59] ); + FFV1_1( w_fp[2], w_fp[24], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[71] ); + FFV1_1( w_fp[2], w_fp[20], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[21] ); // Amplitude(s) for diagram number 1175 - FFV1_0( w_fp[52], w_fp[59], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[59], w_fp[6], COUPs[1], 1.0, &_fp[0] ); jamp_sv[9] += amp_sv[0]; jamp_sv[15] -= amp_sv[0]; jamp_sv[61] -= amp_sv[0]; jamp_sv[85] += amp_sv[0]; - FFV1_0( w_fp[52], w_fp[71], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[71], w_fp[6], COUPs[1], 1.0, &_fp[0] ); jamp_sv[15] -= amp_sv[0]; jamp_sv[51] += amp_sv[0]; jamp_sv[61] -= amp_sv[0]; jamp_sv[75] += amp_sv[0]; - FFV1_0( w_fp[52], w_fp[21], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[21], w_fp[6], COUPs[1], 1.0, &_fp[0] ); jamp_sv[9] -= amp_sv[0]; jamp_sv[51] += amp_sv[0]; jamp_sv[75] += amp_sv[0]; @@ -26783,7 +26783,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1176 - FFV1_0( w_fp[52], w_fp[2], w_fp[23], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[2], w_fp[23], COUPs[1], 1.0, &_fp[0] ); jamp_sv[9] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[15] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[61] += cxtype( 0, 1 ) * amp_sv[0]; @@ -26792,7 +26792,7 @@ namespace mg5amcCpu jamp_sv[101] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[112] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[118] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[52], w_fp[2], w_fp[68], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[2], w_fp[68], COUPs[1], 1.0, &_fp[0] ); jamp_sv[15] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[51] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[61] += cxtype( 0, 1 ) * amp_sv[0]; @@ -26801,7 +26801,7 @@ namespace mg5amcCpu jamp_sv[109] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[112] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[115] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[52], w_fp[2], w_fp[29], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[2], w_fp[29], COUPs[1], 1.0, &_fp[0] ); jamp_sv[9] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[51] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[75] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -26817,17 +26817,17 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1177 - FFV1_0( w_fp[52], w_fp[47], w_fp[60], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[47], w_fp[60], COUPs[1], 1.0, &_fp[0] ); jamp_sv[99] += amp_sv[0]; jamp_sv[101] -= amp_sv[0]; jamp_sv[112] -= amp_sv[0]; jamp_sv[118] += amp_sv[0]; - FFV1_0( w_fp[52], w_fp[47], w_fp[24], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[47], w_fp[24], COUPs[1], 1.0, &_fp[0] ); jamp_sv[101] -= amp_sv[0]; jamp_sv[109] += amp_sv[0]; jamp_sv[112] -= amp_sv[0]; jamp_sv[115] += amp_sv[0]; - FFV1_0( w_fp[52], w_fp[47], w_fp[20], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[47], w_fp[20], COUPs[1], 1.0, &_fp[0] ); jamp_sv[99] -= amp_sv[0]; jamp_sv[109] += amp_sv[0]; jamp_sv[115] += amp_sv[0]; @@ -26839,7 +26839,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1178 - FFV1_0( w_fp[3], w_fp[59], w_fp[72], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[59], w_fp[72], COUPs[1], 1.0, &_fp[0] ); jamp_sv[8] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[9] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[14] += cxtype( 0, 1 ) * amp_sv[0]; @@ -26848,7 +26848,7 @@ namespace mg5amcCpu jamp_sv[61] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[84] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[85] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[71], w_fp[72], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[71], w_fp[72], COUPs[1], 1.0, &_fp[0] ); jamp_sv[14] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[15] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[50] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -26857,7 +26857,7 @@ namespace mg5amcCpu jamp_sv[61] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[74] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[75] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[21], w_fp[72], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[21], w_fp[72], COUPs[1], 1.0, &_fp[0] ); jamp_sv[8] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[9] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[50] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -26873,7 +26873,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1179 - FFV1_0( w_fp[16], w_fp[2], w_fp[72], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[16], w_fp[2], w_fp[72], COUPs[1], 1.0, &_fp[0] ); jamp_sv[42] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[43] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[45] += cxtype( 0, 1 ) * amp_sv[0]; @@ -26882,7 +26882,7 @@ namespace mg5amcCpu jamp_sv[103] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[105] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[107] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[27], w_fp[2], w_fp[72], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[27], w_fp[2], w_fp[72], COUPs[1], 1.0, &_fp[0] ); jamp_sv[43] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[44] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[45] += cxtype( 0, 1 ) * amp_sv[0]; @@ -26891,7 +26891,7 @@ namespace mg5amcCpu jamp_sv[104] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[105] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[106] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[98], w_fp[2], w_fp[72], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[98], w_fp[2], w_fp[72], COUPs[1], 1.0, &_fp[0] ); jamp_sv[42] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[44] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[46] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -26907,7 +26907,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1180 - VVV1_0( w_fp[60], w_fp[72], w_fp[8], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[60], w_fp[72], w_fp[8], COUPs[0], 1.0, &_fp[0] ); jamp_sv[8] -= amp_sv[0]; jamp_sv[9] += amp_sv[0]; jamp_sv[14] += amp_sv[0]; @@ -26924,7 +26924,7 @@ namespace mg5amcCpu jamp_sv[103] += amp_sv[0]; jamp_sv[105] += amp_sv[0]; jamp_sv[107] -= amp_sv[0]; - VVV1_0( w_fp[24], w_fp[72], w_fp[8], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[24], w_fp[72], w_fp[8], COUPs[0], 1.0, &_fp[0] ); jamp_sv[14] += amp_sv[0]; jamp_sv[15] -= amp_sv[0]; jamp_sv[43] -= amp_sv[0]; @@ -26941,7 +26941,7 @@ namespace mg5amcCpu jamp_sv[104] -= amp_sv[0]; jamp_sv[105] += amp_sv[0]; jamp_sv[106] -= amp_sv[0]; - VVV1_0( w_fp[20], w_fp[72], w_fp[8], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[20], w_fp[72], w_fp[8], COUPs[0], 1.0, &_fp[0] ); jamp_sv[8] += amp_sv[0]; jamp_sv[9] -= amp_sv[0]; jamp_sv[42] -= amp_sv[0]; @@ -26965,7 +26965,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1181 - VVVV1_0( w_fp[60], w_fp[1], w_fp[8], w_fp[6], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[60], w_fp[1], w_fp[8], w_fp[6], COUPs[2], 1.0, &_fp[0] ); jamp_sv[8] += amp_sv[0]; jamp_sv[14] -= amp_sv[0]; jamp_sv[24] -= amp_sv[0]; @@ -26982,7 +26982,7 @@ namespace mg5amcCpu jamp_sv[107] += amp_sv[0]; jamp_sv[112] += amp_sv[0]; jamp_sv[118] -= amp_sv[0]; - VVVV3_0( w_fp[60], w_fp[1], w_fp[8], w_fp[6], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[60], w_fp[1], w_fp[8], w_fp[6], COUPs[2], 1.0, &_fp[0] ); jamp_sv[8] += amp_sv[0]; jamp_sv[9] -= amp_sv[0]; jamp_sv[14] -= amp_sv[0]; @@ -26999,7 +26999,7 @@ namespace mg5amcCpu jamp_sv[103] -= amp_sv[0]; jamp_sv[105] -= amp_sv[0]; jamp_sv[107] += amp_sv[0]; - VVVV4_0( w_fp[60], w_fp[1], w_fp[8], w_fp[6], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[60], w_fp[1], w_fp[8], w_fp[6], COUPs[2], 1.0, &_fp[0] ); jamp_sv[9] -= amp_sv[0]; jamp_sv[15] += amp_sv[0]; jamp_sv[24] += amp_sv[0]; @@ -27016,7 +27016,7 @@ namespace mg5amcCpu jamp_sv[101] -= amp_sv[0]; jamp_sv[112] -= amp_sv[0]; jamp_sv[118] += amp_sv[0]; - VVVV1_0( w_fp[24], w_fp[1], w_fp[8], w_fp[6], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[24], w_fp[1], w_fp[8], w_fp[6], COUPs[2], 1.0, &_fp[0] ); jamp_sv[14] -= amp_sv[0]; jamp_sv[26] += amp_sv[0]; jamp_sv[30] -= amp_sv[0]; @@ -27033,7 +27033,7 @@ namespace mg5amcCpu jamp_sv[109] -= amp_sv[0]; jamp_sv[112] += amp_sv[0]; jamp_sv[115] -= amp_sv[0]; - VVVV3_0( w_fp[24], w_fp[1], w_fp[8], w_fp[6], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[24], w_fp[1], w_fp[8], w_fp[6], COUPs[2], 1.0, &_fp[0] ); jamp_sv[14] -= amp_sv[0]; jamp_sv[15] += amp_sv[0]; jamp_sv[43] += amp_sv[0]; @@ -27050,7 +27050,7 @@ namespace mg5amcCpu jamp_sv[104] += amp_sv[0]; jamp_sv[105] -= amp_sv[0]; jamp_sv[106] += amp_sv[0]; - VVVV4_0( w_fp[24], w_fp[1], w_fp[8], w_fp[6], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[24], w_fp[1], w_fp[8], w_fp[6], COUPs[2], 1.0, &_fp[0] ); jamp_sv[15] += amp_sv[0]; jamp_sv[26] -= amp_sv[0]; jamp_sv[30] += amp_sv[0]; @@ -27067,7 +27067,7 @@ namespace mg5amcCpu jamp_sv[109] += amp_sv[0]; jamp_sv[112] -= amp_sv[0]; jamp_sv[115] += amp_sv[0]; - VVVV1_0( w_fp[20], w_fp[1], w_fp[8], w_fp[6], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[20], w_fp[1], w_fp[8], w_fp[6], COUPs[2], 1.0, &_fp[0] ); jamp_sv[8] -= amp_sv[0]; jamp_sv[24] += amp_sv[0]; jamp_sv[30] -= amp_sv[0]; @@ -27084,7 +27084,7 @@ namespace mg5amcCpu jamp_sv[109] -= amp_sv[0]; jamp_sv[115] -= amp_sv[0]; jamp_sv[118] += amp_sv[0]; - VVVV3_0( w_fp[20], w_fp[1], w_fp[8], w_fp[6], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[20], w_fp[1], w_fp[8], w_fp[6], COUPs[2], 1.0, &_fp[0] ); jamp_sv[8] -= amp_sv[0]; jamp_sv[9] += amp_sv[0]; jamp_sv[42] += amp_sv[0]; @@ -27101,7 +27101,7 @@ namespace mg5amcCpu jamp_sv[104] += amp_sv[0]; jamp_sv[106] += amp_sv[0]; jamp_sv[107] -= amp_sv[0]; - VVVV4_0( w_fp[20], w_fp[1], w_fp[8], w_fp[6], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[20], w_fp[1], w_fp[8], w_fp[6], COUPs[2], 1.0, &_fp[0] ); jamp_sv[9] += amp_sv[0]; jamp_sv[24] -= amp_sv[0]; jamp_sv[30] += amp_sv[0]; @@ -27122,12 +27122,12 @@ namespace mg5amcCpu // *** DIAGRAM 1182 OF 1240 *** // Wavefunction(s) for diagram number 1182 - VVV1P0_1( w_fp[60], w_fp[1], COUPs[0], 0., 0., w_fp[72] ); - VVV1P0_1( w_fp[24], w_fp[1], COUPs[0], 0., 0., w_fp[60] ); - VVV1P0_1( w_fp[20], w_fp[1], COUPs[0], 0., 0., w_fp[24] ); + VVV1P0_1( w_fp[60], w_fp[1], COUPs[0], 1.0, 0., 0., w_fp[72] ); + VVV1P0_1( w_fp[24], w_fp[1], COUPs[0], 1.0, 0., 0., w_fp[60] ); + VVV1P0_1( w_fp[20], w_fp[1], COUPs[0], 1.0, 0., 0., w_fp[24] ); // Amplitude(s) for diagram number 1182 - VVV1_0( w_fp[8], w_fp[6], w_fp[72], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[6], w_fp[72], COUPs[0], 1.0, &_fp[0] ); jamp_sv[8] += amp_sv[0]; jamp_sv[14] -= amp_sv[0]; jamp_sv[24] -= amp_sv[0]; @@ -27144,7 +27144,7 @@ namespace mg5amcCpu jamp_sv[107] += amp_sv[0]; jamp_sv[112] += amp_sv[0]; jamp_sv[118] -= amp_sv[0]; - VVV1_0( w_fp[8], w_fp[6], w_fp[60], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[6], w_fp[60], COUPs[0], 1.0, &_fp[0] ); jamp_sv[14] -= amp_sv[0]; jamp_sv[26] += amp_sv[0]; jamp_sv[30] -= amp_sv[0]; @@ -27161,7 +27161,7 @@ namespace mg5amcCpu jamp_sv[109] -= amp_sv[0]; jamp_sv[112] += amp_sv[0]; jamp_sv[115] -= amp_sv[0]; - VVV1_0( w_fp[8], w_fp[6], w_fp[24], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[6], w_fp[24], COUPs[0], 1.0, &_fp[0] ); jamp_sv[8] -= amp_sv[0]; jamp_sv[24] += amp_sv[0]; jamp_sv[30] -= amp_sv[0]; @@ -27185,7 +27185,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1183 - VVV1_0( w_fp[1], w_fp[8], w_fp[23], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[8], w_fp[23], COUPs[0], 1.0, &_fp[0] ); jamp_sv[9] -= amp_sv[0]; jamp_sv[15] += amp_sv[0]; jamp_sv[24] += amp_sv[0]; @@ -27202,7 +27202,7 @@ namespace mg5amcCpu jamp_sv[101] -= amp_sv[0]; jamp_sv[112] -= amp_sv[0]; jamp_sv[118] += amp_sv[0]; - VVV1_0( w_fp[1], w_fp[8], w_fp[68], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[8], w_fp[68], COUPs[0], 1.0, &_fp[0] ); jamp_sv[15] += amp_sv[0]; jamp_sv[26] -= amp_sv[0]; jamp_sv[30] += amp_sv[0]; @@ -27219,7 +27219,7 @@ namespace mg5amcCpu jamp_sv[109] += amp_sv[0]; jamp_sv[112] -= amp_sv[0]; jamp_sv[115] += amp_sv[0]; - VVV1_0( w_fp[1], w_fp[8], w_fp[29], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[8], w_fp[29], COUPs[0], 1.0, &_fp[0] ); jamp_sv[9] += amp_sv[0]; jamp_sv[24] -= amp_sv[0]; jamp_sv[30] += amp_sv[0]; @@ -27243,7 +27243,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1184 - FFV1_0( w_fp[3], w_fp[47], w_fp[72], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[47], w_fp[72], COUPs[1], 1.0, &_fp[0] ); jamp_sv[99] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[101] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[102] += cxtype( 0, 1 ) * amp_sv[0]; @@ -27252,7 +27252,7 @@ namespace mg5amcCpu jamp_sv[107] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[112] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[118] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[47], w_fp[60], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[47], w_fp[60], COUPs[1], 1.0, &_fp[0] ); jamp_sv[101] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[103] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[104] += cxtype( 0, 1 ) * amp_sv[0]; @@ -27261,7 +27261,7 @@ namespace mg5amcCpu jamp_sv[109] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[112] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[115] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[47], w_fp[24], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[47], w_fp[24], COUPs[1], 1.0, &_fp[0] ); jamp_sv[99] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[102] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[104] += cxtype( 0, 1 ) * amp_sv[0]; @@ -27277,17 +27277,17 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1185 - FFV1_0( w_fp[16], w_fp[47], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[16], w_fp[47], w_fp[1], COUPs[1], 1.0, &_fp[0] ); jamp_sv[102] += amp_sv[0]; jamp_sv[103] -= amp_sv[0]; jamp_sv[105] -= amp_sv[0]; jamp_sv[107] += amp_sv[0]; - FFV1_0( w_fp[27], w_fp[47], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[27], w_fp[47], w_fp[1], COUPs[1], 1.0, &_fp[0] ); jamp_sv[103] -= amp_sv[0]; jamp_sv[104] += amp_sv[0]; jamp_sv[105] -= amp_sv[0]; jamp_sv[106] += amp_sv[0]; - FFV1_0( w_fp[98], w_fp[47], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[98], w_fp[47], w_fp[1], COUPs[1], 1.0, &_fp[0] ); jamp_sv[102] -= amp_sv[0]; jamp_sv[104] += amp_sv[0]; jamp_sv[106] += amp_sv[0]; @@ -27299,7 +27299,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1186 - FFV1_0( w_fp[41], w_fp[2], w_fp[72], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[2], w_fp[72], COUPs[1], 1.0, &_fp[0] ); jamp_sv[8] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[14] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[24] += cxtype( 0, 1 ) * amp_sv[0]; @@ -27308,7 +27308,7 @@ namespace mg5amcCpu jamp_sv[38] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[60] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[84] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[41], w_fp[2], w_fp[60], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[2], w_fp[60], COUPs[1], 1.0, &_fp[0] ); jamp_sv[14] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[26] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[30] += cxtype( 0, 1 ) * amp_sv[0]; @@ -27317,7 +27317,7 @@ namespace mg5amcCpu jamp_sv[50] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[60] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[74] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[41], w_fp[2], w_fp[24], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[2], w_fp[24], COUPs[1], 1.0, &_fp[0] ); jamp_sv[8] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[24] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[30] += cxtype( 0, 1 ) * amp_sv[0]; @@ -27333,17 +27333,17 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1187 - FFV1_0( w_fp[41], w_fp[59], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[59], w_fp[1], COUPs[1], 1.0, &_fp[0] ); jamp_sv[8] += amp_sv[0]; jamp_sv[14] -= amp_sv[0]; jamp_sv[60] -= amp_sv[0]; jamp_sv[84] += amp_sv[0]; - FFV1_0( w_fp[41], w_fp[71], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[71], w_fp[1], COUPs[1], 1.0, &_fp[0] ); jamp_sv[14] -= amp_sv[0]; jamp_sv[50] += amp_sv[0]; jamp_sv[60] -= amp_sv[0]; jamp_sv[74] += amp_sv[0]; - FFV1_0( w_fp[41], w_fp[21], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[21], w_fp[1], COUPs[1], 1.0, &_fp[0] ); jamp_sv[8] -= amp_sv[0]; jamp_sv[50] += amp_sv[0]; jamp_sv[74] += amp_sv[0]; @@ -27352,25 +27352,25 @@ namespace mg5amcCpu // *** DIAGRAM 1188 OF 1240 *** // Wavefunction(s) for diagram number 1188 - VVVV1P0_1( w_fp[0], w_fp[4], w_fp[6], COUPs[2], 0., 0., w_fp[21] ); - VVVV3P0_1( w_fp[0], w_fp[4], w_fp[6], COUPs[2], 0., 0., w_fp[71] ); - VVVV4P0_1( w_fp[0], w_fp[4], w_fp[6], COUPs[2], 0., 0., w_fp[59] ); - FFV1_2( w_fp[3], w_fp[21], COUPs[1], cIPD[0], cIPD[1], w_fp[24] ); - FFV1_2( w_fp[3], w_fp[71], COUPs[1], cIPD[0], cIPD[1], w_fp[60] ); - FFV1_2( w_fp[3], w_fp[59], COUPs[1], cIPD[0], cIPD[1], w_fp[72] ); + VVVV1P0_1( w_fp[0], w_fp[4], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[21] ); + VVVV3P0_1( w_fp[0], w_fp[4], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[71] ); + VVVV4P0_1( w_fp[0], w_fp[4], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[59] ); + FFV1_2( w_fp[3], w_fp[21], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[24] ); + FFV1_2( w_fp[3], w_fp[71], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[60] ); + FFV1_2( w_fp[3], w_fp[59], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[72] ); // Amplitude(s) for diagram number 1188 - FFV1_0( w_fp[24], w_fp[77], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[24], w_fp[77], w_fp[5], COUPs[1], 1.0, &_fp[0] ); jamp_sv[36] += amp_sv[0]; jamp_sv[37] -= amp_sv[0]; jamp_sv[39] -= amp_sv[0]; jamp_sv[41] += amp_sv[0]; - FFV1_0( w_fp[60], w_fp[77], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[60], w_fp[77], w_fp[5], COUPs[1], 1.0, &_fp[0] ); jamp_sv[37] -= amp_sv[0]; jamp_sv[38] += amp_sv[0]; jamp_sv[39] -= amp_sv[0]; jamp_sv[40] += amp_sv[0]; - FFV1_0( w_fp[72], w_fp[77], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[72], w_fp[77], w_fp[5], COUPs[1], 1.0, &_fp[0] ); jamp_sv[36] -= amp_sv[0]; jamp_sv[38] += amp_sv[0]; jamp_sv[40] += amp_sv[0]; @@ -27379,12 +27379,12 @@ namespace mg5amcCpu // *** DIAGRAM 1189 OF 1240 *** // Wavefunction(s) for diagram number 1189 - VVV1P0_1( w_fp[21], w_fp[5], COUPs[0], 0., 0., w_fp[98] ); - VVV1P0_1( w_fp[71], w_fp[5], COUPs[0], 0., 0., w_fp[27] ); - VVV1P0_1( w_fp[59], w_fp[5], COUPs[0], 0., 0., w_fp[16] ); + VVV1P0_1( w_fp[21], w_fp[5], COUPs[0], 1.0, 0., 0., w_fp[98] ); + VVV1P0_1( w_fp[71], w_fp[5], COUPs[0], 1.0, 0., 0., w_fp[27] ); + VVV1P0_1( w_fp[59], w_fp[5], COUPs[0], 1.0, 0., 0., w_fp[16] ); // Amplitude(s) for diagram number 1189 - FFV1_0( w_fp[3], w_fp[77], w_fp[98], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[77], w_fp[98], COUPs[1], 1.0, &_fp[0] ); jamp_sv[25] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[28] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[34] += cxtype( 0, 1 ) * amp_sv[0]; @@ -27393,7 +27393,7 @@ namespace mg5amcCpu jamp_sv[39] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[41] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[44] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[77], w_fp[27], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[77], w_fp[27], COUPs[1], 1.0, &_fp[0] ); jamp_sv[28] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[31] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[34] += cxtype( 0, 1 ) * amp_sv[0]; @@ -27402,7 +27402,7 @@ namespace mg5amcCpu jamp_sv[39] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[40] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[42] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[77], w_fp[16], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[77], w_fp[16], COUPs[1], 1.0, &_fp[0] ); jamp_sv[25] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[31] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[36] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -27418,17 +27418,17 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1190 - FFV1_0( w_fp[38], w_fp[77], w_fp[21], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[77], w_fp[21], COUPs[1], 1.0, &_fp[0] ); jamp_sv[25] += amp_sv[0]; jamp_sv[28] -= amp_sv[0]; jamp_sv[34] -= amp_sv[0]; jamp_sv[44] += amp_sv[0]; - FFV1_0( w_fp[38], w_fp[77], w_fp[71], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[77], w_fp[71], COUPs[1], 1.0, &_fp[0] ); jamp_sv[28] -= amp_sv[0]; jamp_sv[31] += amp_sv[0]; jamp_sv[34] -= amp_sv[0]; jamp_sv[42] += amp_sv[0]; - FFV1_0( w_fp[38], w_fp[77], w_fp[59], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[77], w_fp[59], COUPs[1], 1.0, &_fp[0] ); jamp_sv[25] -= amp_sv[0]; jamp_sv[31] += amp_sv[0]; jamp_sv[42] += amp_sv[0]; @@ -27437,22 +27437,22 @@ namespace mg5amcCpu // *** DIAGRAM 1191 OF 1240 *** // Wavefunction(s) for diagram number 1191 - FFV1_1( w_fp[2], w_fp[21], COUPs[1], cIPD[0], cIPD[1], w_fp[29] ); - FFV1_1( w_fp[2], w_fp[71], COUPs[1], cIPD[0], cIPD[1], w_fp[68] ); - FFV1_1( w_fp[2], w_fp[59], COUPs[1], cIPD[0], cIPD[1], w_fp[23] ); + FFV1_1( w_fp[2], w_fp[21], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[29] ); + FFV1_1( w_fp[2], w_fp[71], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[68] ); + FFV1_1( w_fp[2], w_fp[59], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[23] ); // Amplitude(s) for diagram number 1191 - FFV1_0( w_fp[52], w_fp[29], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[29], w_fp[5], COUPs[1], 1.0, &_fp[0] ); jamp_sv[11] += amp_sv[0]; jamp_sv[21] -= amp_sv[0]; jamp_sv[67] -= amp_sv[0]; jamp_sv[109] += amp_sv[0]; - FFV1_0( w_fp[52], w_fp[68], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[68], w_fp[5], COUPs[1], 1.0, &_fp[0] ); jamp_sv[21] -= amp_sv[0]; jamp_sv[53] += amp_sv[0]; jamp_sv[67] -= amp_sv[0]; jamp_sv[99] += amp_sv[0]; - FFV1_0( w_fp[52], w_fp[23], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[23], w_fp[5], COUPs[1], 1.0, &_fp[0] ); jamp_sv[11] -= amp_sv[0]; jamp_sv[53] += amp_sv[0]; jamp_sv[99] += amp_sv[0]; @@ -27464,7 +27464,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1192 - FFV1_0( w_fp[52], w_fp[2], w_fp[98], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[2], w_fp[98], COUPs[1], 1.0, &_fp[0] ); jamp_sv[11] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[21] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[67] += cxtype( 0, 1 ) * amp_sv[0]; @@ -27473,7 +27473,7 @@ namespace mg5amcCpu jamp_sv[88] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[94] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[109] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[52], w_fp[2], w_fp[27], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[2], w_fp[27], COUPs[1], 1.0, &_fp[0] ); jamp_sv[21] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[53] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[67] += cxtype( 0, 1 ) * amp_sv[0]; @@ -27482,7 +27482,7 @@ namespace mg5amcCpu jamp_sv[88] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[91] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[99] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[52], w_fp[2], w_fp[16], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[2], w_fp[16], COUPs[1], 1.0, &_fp[0] ); jamp_sv[11] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[53] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[75] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -27498,17 +27498,17 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1193 - FFV1_0( w_fp[52], w_fp[39], w_fp[21], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[39], w_fp[21], COUPs[1], 1.0, &_fp[0] ); jamp_sv[75] += amp_sv[0]; jamp_sv[77] -= amp_sv[0]; jamp_sv[88] -= amp_sv[0]; jamp_sv[94] += amp_sv[0]; - FFV1_0( w_fp[52], w_fp[39], w_fp[71], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[39], w_fp[71], COUPs[1], 1.0, &_fp[0] ); jamp_sv[77] -= amp_sv[0]; jamp_sv[85] += amp_sv[0]; jamp_sv[88] -= amp_sv[0]; jamp_sv[91] += amp_sv[0]; - FFV1_0( w_fp[52], w_fp[39], w_fp[59], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[39], w_fp[59], COUPs[1], 1.0, &_fp[0] ); jamp_sv[75] -= amp_sv[0]; jamp_sv[85] += amp_sv[0]; jamp_sv[91] += amp_sv[0]; @@ -27520,7 +27520,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1194 - FFV1_0( w_fp[3], w_fp[29], w_fp[66], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[29], w_fp[66], COUPs[1], 1.0, &_fp[0] ); jamp_sv[10] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[11] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[20] += cxtype( 0, 1 ) * amp_sv[0]; @@ -27529,7 +27529,7 @@ namespace mg5amcCpu jamp_sv[67] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[108] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[109] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[68], w_fp[66], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[68], w_fp[66], COUPs[1], 1.0, &_fp[0] ); jamp_sv[20] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[21] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[52] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -27538,7 +27538,7 @@ namespace mg5amcCpu jamp_sv[67] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[98] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[99] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[23], w_fp[66], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[23], w_fp[66], COUPs[1], 1.0, &_fp[0] ); jamp_sv[10] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[11] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[52] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -27554,7 +27554,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1195 - FFV1_0( w_fp[24], w_fp[2], w_fp[66], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[24], w_fp[2], w_fp[66], COUPs[1], 1.0, &_fp[0] ); jamp_sv[36] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[37] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[39] += cxtype( 0, 1 ) * amp_sv[0]; @@ -27563,7 +27563,7 @@ namespace mg5amcCpu jamp_sv[79] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[81] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[83] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[60], w_fp[2], w_fp[66], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[60], w_fp[2], w_fp[66], COUPs[1], 1.0, &_fp[0] ); jamp_sv[37] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[38] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[39] += cxtype( 0, 1 ) * amp_sv[0]; @@ -27572,7 +27572,7 @@ namespace mg5amcCpu jamp_sv[80] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[81] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[82] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[72], w_fp[2], w_fp[66], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[72], w_fp[2], w_fp[66], COUPs[1], 1.0, &_fp[0] ); jamp_sv[36] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[38] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[40] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -27588,7 +27588,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1196 - VVV1_0( w_fp[21], w_fp[66], w_fp[8], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[21], w_fp[66], w_fp[8], COUPs[0], 1.0, &_fp[0] ); jamp_sv[10] -= amp_sv[0]; jamp_sv[11] += amp_sv[0]; jamp_sv[20] += amp_sv[0]; @@ -27605,7 +27605,7 @@ namespace mg5amcCpu jamp_sv[83] -= amp_sv[0]; jamp_sv[108] -= amp_sv[0]; jamp_sv[109] += amp_sv[0]; - VVV1_0( w_fp[71], w_fp[66], w_fp[8], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[71], w_fp[66], w_fp[8], COUPs[0], 1.0, &_fp[0] ); jamp_sv[20] += amp_sv[0]; jamp_sv[21] -= amp_sv[0]; jamp_sv[37] -= amp_sv[0]; @@ -27622,7 +27622,7 @@ namespace mg5amcCpu jamp_sv[82] -= amp_sv[0]; jamp_sv[98] -= amp_sv[0]; jamp_sv[99] += amp_sv[0]; - VVV1_0( w_fp[59], w_fp[66], w_fp[8], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[59], w_fp[66], w_fp[8], COUPs[0], 1.0, &_fp[0] ); jamp_sv[10] += amp_sv[0]; jamp_sv[11] -= amp_sv[0]; jamp_sv[36] -= amp_sv[0]; @@ -27646,7 +27646,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1197 - VVVV1_0( w_fp[21], w_fp[1], w_fp[8], w_fp[5], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[21], w_fp[1], w_fp[8], w_fp[5], COUPs[2], 1.0, &_fp[0] ); jamp_sv[10] += amp_sv[0]; jamp_sv[20] -= amp_sv[0]; jamp_sv[25] -= amp_sv[0]; @@ -27663,7 +27663,7 @@ namespace mg5amcCpu jamp_sv[88] += amp_sv[0]; jamp_sv[94] -= amp_sv[0]; jamp_sv[108] += amp_sv[0]; - VVVV3_0( w_fp[21], w_fp[1], w_fp[8], w_fp[5], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[21], w_fp[1], w_fp[8], w_fp[5], COUPs[2], 1.0, &_fp[0] ); jamp_sv[10] += amp_sv[0]; jamp_sv[11] -= amp_sv[0]; jamp_sv[20] -= amp_sv[0]; @@ -27680,7 +27680,7 @@ namespace mg5amcCpu jamp_sv[83] += amp_sv[0]; jamp_sv[108] += amp_sv[0]; jamp_sv[109] -= amp_sv[0]; - VVVV4_0( w_fp[21], w_fp[1], w_fp[8], w_fp[5], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[21], w_fp[1], w_fp[8], w_fp[5], COUPs[2], 1.0, &_fp[0] ); jamp_sv[11] -= amp_sv[0]; jamp_sv[21] += amp_sv[0]; jamp_sv[25] += amp_sv[0]; @@ -27697,7 +27697,7 @@ namespace mg5amcCpu jamp_sv[88] -= amp_sv[0]; jamp_sv[94] += amp_sv[0]; jamp_sv[109] -= amp_sv[0]; - VVVV1_0( w_fp[71], w_fp[1], w_fp[8], w_fp[5], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[71], w_fp[1], w_fp[8], w_fp[5], COUPs[2], 1.0, &_fp[0] ); jamp_sv[20] -= amp_sv[0]; jamp_sv[28] += amp_sv[0]; jamp_sv[31] -= amp_sv[0]; @@ -27714,7 +27714,7 @@ namespace mg5amcCpu jamp_sv[88] += amp_sv[0]; jamp_sv[91] -= amp_sv[0]; jamp_sv[98] += amp_sv[0]; - VVVV3_0( w_fp[71], w_fp[1], w_fp[8], w_fp[5], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[71], w_fp[1], w_fp[8], w_fp[5], COUPs[2], 1.0, &_fp[0] ); jamp_sv[20] -= amp_sv[0]; jamp_sv[21] += amp_sv[0]; jamp_sv[37] += amp_sv[0]; @@ -27731,7 +27731,7 @@ namespace mg5amcCpu jamp_sv[82] += amp_sv[0]; jamp_sv[98] += amp_sv[0]; jamp_sv[99] -= amp_sv[0]; - VVVV4_0( w_fp[71], w_fp[1], w_fp[8], w_fp[5], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[71], w_fp[1], w_fp[8], w_fp[5], COUPs[2], 1.0, &_fp[0] ); jamp_sv[21] += amp_sv[0]; jamp_sv[28] -= amp_sv[0]; jamp_sv[31] += amp_sv[0]; @@ -27748,7 +27748,7 @@ namespace mg5amcCpu jamp_sv[88] -= amp_sv[0]; jamp_sv[91] += amp_sv[0]; jamp_sv[99] -= amp_sv[0]; - VVVV1_0( w_fp[59], w_fp[1], w_fp[8], w_fp[5], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[59], w_fp[1], w_fp[8], w_fp[5], COUPs[2], 1.0, &_fp[0] ); jamp_sv[10] -= amp_sv[0]; jamp_sv[25] += amp_sv[0]; jamp_sv[31] -= amp_sv[0]; @@ -27765,7 +27765,7 @@ namespace mg5amcCpu jamp_sv[94] += amp_sv[0]; jamp_sv[98] += amp_sv[0]; jamp_sv[108] -= amp_sv[0]; - VVVV3_0( w_fp[59], w_fp[1], w_fp[8], w_fp[5], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[59], w_fp[1], w_fp[8], w_fp[5], COUPs[2], 1.0, &_fp[0] ); jamp_sv[10] -= amp_sv[0]; jamp_sv[11] += amp_sv[0]; jamp_sv[36] += amp_sv[0]; @@ -27782,7 +27782,7 @@ namespace mg5amcCpu jamp_sv[99] -= amp_sv[0]; jamp_sv[108] -= amp_sv[0]; jamp_sv[109] += amp_sv[0]; - VVVV4_0( w_fp[59], w_fp[1], w_fp[8], w_fp[5], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[59], w_fp[1], w_fp[8], w_fp[5], COUPs[2], 1.0, &_fp[0] ); jamp_sv[11] += amp_sv[0]; jamp_sv[25] -= amp_sv[0]; jamp_sv[31] += amp_sv[0]; @@ -27803,12 +27803,12 @@ namespace mg5amcCpu // *** DIAGRAM 1198 OF 1240 *** // Wavefunction(s) for diagram number 1198 - VVV1P0_1( w_fp[21], w_fp[1], COUPs[0], 0., 0., w_fp[66] ); - VVV1P0_1( w_fp[71], w_fp[1], COUPs[0], 0., 0., w_fp[21] ); - VVV1P0_1( w_fp[59], w_fp[1], COUPs[0], 0., 0., w_fp[71] ); + VVV1P0_1( w_fp[21], w_fp[1], COUPs[0], 1.0, 0., 0., w_fp[66] ); + VVV1P0_1( w_fp[71], w_fp[1], COUPs[0], 1.0, 0., 0., w_fp[21] ); + VVV1P0_1( w_fp[59], w_fp[1], COUPs[0], 1.0, 0., 0., w_fp[71] ); // Amplitude(s) for diagram number 1198 - VVV1_0( w_fp[8], w_fp[5], w_fp[66], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[5], w_fp[66], COUPs[0], 1.0, &_fp[0] ); jamp_sv[10] += amp_sv[0]; jamp_sv[20] -= amp_sv[0]; jamp_sv[25] -= amp_sv[0]; @@ -27825,7 +27825,7 @@ namespace mg5amcCpu jamp_sv[88] += amp_sv[0]; jamp_sv[94] -= amp_sv[0]; jamp_sv[108] += amp_sv[0]; - VVV1_0( w_fp[8], w_fp[5], w_fp[21], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[5], w_fp[21], COUPs[0], 1.0, &_fp[0] ); jamp_sv[20] -= amp_sv[0]; jamp_sv[28] += amp_sv[0]; jamp_sv[31] -= amp_sv[0]; @@ -27842,7 +27842,7 @@ namespace mg5amcCpu jamp_sv[88] += amp_sv[0]; jamp_sv[91] -= amp_sv[0]; jamp_sv[98] += amp_sv[0]; - VVV1_0( w_fp[8], w_fp[5], w_fp[71], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[5], w_fp[71], COUPs[0], 1.0, &_fp[0] ); jamp_sv[10] -= amp_sv[0]; jamp_sv[25] += amp_sv[0]; jamp_sv[31] -= amp_sv[0]; @@ -27866,7 +27866,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1199 - VVV1_0( w_fp[1], w_fp[8], w_fp[98], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[8], w_fp[98], COUPs[0], 1.0, &_fp[0] ); jamp_sv[11] -= amp_sv[0]; jamp_sv[21] += amp_sv[0]; jamp_sv[25] += amp_sv[0]; @@ -27883,7 +27883,7 @@ namespace mg5amcCpu jamp_sv[88] -= amp_sv[0]; jamp_sv[94] += amp_sv[0]; jamp_sv[109] -= amp_sv[0]; - VVV1_0( w_fp[1], w_fp[8], w_fp[27], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[8], w_fp[27], COUPs[0], 1.0, &_fp[0] ); jamp_sv[21] += amp_sv[0]; jamp_sv[28] -= amp_sv[0]; jamp_sv[31] += amp_sv[0]; @@ -27900,7 +27900,7 @@ namespace mg5amcCpu jamp_sv[88] -= amp_sv[0]; jamp_sv[91] += amp_sv[0]; jamp_sv[99] -= amp_sv[0]; - VVV1_0( w_fp[1], w_fp[8], w_fp[16], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[8], w_fp[16], COUPs[0], 1.0, &_fp[0] ); jamp_sv[11] += amp_sv[0]; jamp_sv[25] -= amp_sv[0]; jamp_sv[31] += amp_sv[0]; @@ -27924,7 +27924,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1200 - FFV1_0( w_fp[3], w_fp[39], w_fp[66], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[39], w_fp[66], COUPs[1], 1.0, &_fp[0] ); jamp_sv[75] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[77] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[78] += cxtype( 0, 1 ) * amp_sv[0]; @@ -27933,7 +27933,7 @@ namespace mg5amcCpu jamp_sv[83] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[88] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[94] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[39], w_fp[21], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[39], w_fp[21], COUPs[1], 1.0, &_fp[0] ); jamp_sv[77] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[79] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[80] += cxtype( 0, 1 ) * amp_sv[0]; @@ -27942,7 +27942,7 @@ namespace mg5amcCpu jamp_sv[85] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[88] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[91] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[39], w_fp[71], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[39], w_fp[71], COUPs[1], 1.0, &_fp[0] ); jamp_sv[75] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[78] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[80] += cxtype( 0, 1 ) * amp_sv[0]; @@ -27958,17 +27958,17 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1201 - FFV1_0( w_fp[24], w_fp[39], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[24], w_fp[39], w_fp[1], COUPs[1], 1.0, &_fp[0] ); jamp_sv[78] += amp_sv[0]; jamp_sv[79] -= amp_sv[0]; jamp_sv[81] -= amp_sv[0]; jamp_sv[83] += amp_sv[0]; - FFV1_0( w_fp[60], w_fp[39], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[60], w_fp[39], w_fp[1], COUPs[1], 1.0, &_fp[0] ); jamp_sv[79] -= amp_sv[0]; jamp_sv[80] += amp_sv[0]; jamp_sv[81] -= amp_sv[0]; jamp_sv[82] += amp_sv[0]; - FFV1_0( w_fp[72], w_fp[39], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[72], w_fp[39], w_fp[1], COUPs[1], 1.0, &_fp[0] ); jamp_sv[78] -= amp_sv[0]; jamp_sv[80] += amp_sv[0]; jamp_sv[82] += amp_sv[0]; @@ -27980,7 +27980,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1202 - FFV1_0( w_fp[38], w_fp[2], w_fp[66], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[2], w_fp[66], COUPs[1], 1.0, &_fp[0] ); jamp_sv[10] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[20] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[25] += cxtype( 0, 1 ) * amp_sv[0]; @@ -27989,7 +27989,7 @@ namespace mg5amcCpu jamp_sv[44] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[66] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[108] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[38], w_fp[2], w_fp[21], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[2], w_fp[21], COUPs[1], 1.0, &_fp[0] ); jamp_sv[20] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[28] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[31] += cxtype( 0, 1 ) * amp_sv[0]; @@ -27998,7 +27998,7 @@ namespace mg5amcCpu jamp_sv[52] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[66] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[98] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[38], w_fp[2], w_fp[71], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[2], w_fp[71], COUPs[1], 1.0, &_fp[0] ); jamp_sv[10] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[25] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[31] += cxtype( 0, 1 ) * amp_sv[0]; @@ -28014,17 +28014,17 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1203 - FFV1_0( w_fp[38], w_fp[29], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[29], w_fp[1], COUPs[1], 1.0, &_fp[0] ); jamp_sv[10] += amp_sv[0]; jamp_sv[20] -= amp_sv[0]; jamp_sv[66] -= amp_sv[0]; jamp_sv[108] += amp_sv[0]; - FFV1_0( w_fp[38], w_fp[68], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[68], w_fp[1], COUPs[1], 1.0, &_fp[0] ); jamp_sv[20] -= amp_sv[0]; jamp_sv[52] += amp_sv[0]; jamp_sv[66] -= amp_sv[0]; jamp_sv[98] += amp_sv[0]; - FFV1_0( w_fp[38], w_fp[23], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[23], w_fp[1], COUPs[1], 1.0, &_fp[0] ); jamp_sv[10] -= amp_sv[0]; jamp_sv[52] += amp_sv[0]; jamp_sv[98] += amp_sv[0]; @@ -28033,25 +28033,25 @@ namespace mg5amcCpu // *** DIAGRAM 1204 OF 1240 *** // Wavefunction(s) for diagram number 1204 - VVVV1P0_1( w_fp[0], w_fp[5], w_fp[6], COUPs[2], 0., 0., w_fp[23] ); - VVVV3P0_1( w_fp[0], w_fp[5], w_fp[6], COUPs[2], 0., 0., w_fp[68] ); - VVVV4P0_1( w_fp[0], w_fp[5], w_fp[6], COUPs[2], 0., 0., w_fp[29] ); - FFV1_2( w_fp[3], w_fp[23], COUPs[1], cIPD[0], cIPD[1], w_fp[71] ); - FFV1_2( w_fp[3], w_fp[68], COUPs[1], cIPD[0], cIPD[1], w_fp[21] ); - FFV1_2( w_fp[3], w_fp[29], COUPs[1], cIPD[0], cIPD[1], w_fp[66] ); + VVVV1P0_1( w_fp[0], w_fp[5], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[23] ); + VVVV3P0_1( w_fp[0], w_fp[5], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[68] ); + VVVV4P0_1( w_fp[0], w_fp[5], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[29] ); + FFV1_2( w_fp[3], w_fp[23], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[71] ); + FFV1_2( w_fp[3], w_fp[68], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[21] ); + FFV1_2( w_fp[3], w_fp[29], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[66] ); // Amplitude(s) for diagram number 1204 - FFV1_0( w_fp[71], w_fp[77], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[71], w_fp[77], w_fp[4], COUPs[1], 1.0, &_fp[0] ); jamp_sv[30] += amp_sv[0]; jamp_sv[31] -= amp_sv[0]; jamp_sv[33] -= amp_sv[0]; jamp_sv[35] += amp_sv[0]; - FFV1_0( w_fp[21], w_fp[77], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[21], w_fp[77], w_fp[4], COUPs[1], 1.0, &_fp[0] ); jamp_sv[31] -= amp_sv[0]; jamp_sv[32] += amp_sv[0]; jamp_sv[33] -= amp_sv[0]; jamp_sv[34] += amp_sv[0]; - FFV1_0( w_fp[66], w_fp[77], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[66], w_fp[77], w_fp[4], COUPs[1], 1.0, &_fp[0] ); jamp_sv[30] -= amp_sv[0]; jamp_sv[32] += amp_sv[0]; jamp_sv[34] += amp_sv[0]; @@ -28060,12 +28060,12 @@ namespace mg5amcCpu // *** DIAGRAM 1205 OF 1240 *** // Wavefunction(s) for diagram number 1205 - VVV1P0_1( w_fp[23], w_fp[4], COUPs[0], 0., 0., w_fp[72] ); - VVV1P0_1( w_fp[68], w_fp[4], COUPs[0], 0., 0., w_fp[60] ); - VVV1P0_1( w_fp[29], w_fp[4], COUPs[0], 0., 0., w_fp[24] ); + VVV1P0_1( w_fp[23], w_fp[4], COUPs[0], 1.0, 0., 0., w_fp[72] ); + VVV1P0_1( w_fp[68], w_fp[4], COUPs[0], 1.0, 0., 0., w_fp[60] ); + VVV1P0_1( w_fp[29], w_fp[4], COUPs[0], 1.0, 0., 0., w_fp[24] ); // Amplitude(s) for diagram number 1205 - FFV1_0( w_fp[3], w_fp[77], w_fp[72], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[77], w_fp[72], COUPs[1], 1.0, &_fp[0] ); jamp_sv[27] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[29] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[30] += cxtype( 0, 1 ) * amp_sv[0]; @@ -28074,7 +28074,7 @@ namespace mg5amcCpu jamp_sv[35] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[40] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[46] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[77], w_fp[60], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[77], w_fp[60], COUPs[1], 1.0, &_fp[0] ); jamp_sv[29] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[31] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[32] += cxtype( 0, 1 ) * amp_sv[0]; @@ -28083,7 +28083,7 @@ namespace mg5amcCpu jamp_sv[37] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[40] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[43] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[77], w_fp[24], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[77], w_fp[24], COUPs[1], 1.0, &_fp[0] ); jamp_sv[27] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[30] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[32] += cxtype( 0, 1 ) * amp_sv[0]; @@ -28099,17 +28099,17 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1206 - FFV1_0( w_fp[46], w_fp[77], w_fp[23], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[77], w_fp[23], COUPs[1], 1.0, &_fp[0] ); jamp_sv[27] += amp_sv[0]; jamp_sv[29] -= amp_sv[0]; jamp_sv[40] -= amp_sv[0]; jamp_sv[46] += amp_sv[0]; - FFV1_0( w_fp[46], w_fp[77], w_fp[68], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[77], w_fp[68], COUPs[1], 1.0, &_fp[0] ); jamp_sv[29] -= amp_sv[0]; jamp_sv[37] += amp_sv[0]; jamp_sv[40] -= amp_sv[0]; jamp_sv[43] += amp_sv[0]; - FFV1_0( w_fp[46], w_fp[77], w_fp[29], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[77], w_fp[29], COUPs[1], 1.0, &_fp[0] ); jamp_sv[27] -= amp_sv[0]; jamp_sv[37] += amp_sv[0]; jamp_sv[43] += amp_sv[0]; @@ -28118,22 +28118,22 @@ namespace mg5amcCpu // *** DIAGRAM 1207 OF 1240 *** // Wavefunction(s) for diagram number 1207 - FFV1_1( w_fp[2], w_fp[23], COUPs[1], cIPD[0], cIPD[1], w_fp[77] ); - FFV1_1( w_fp[2], w_fp[68], COUPs[1], cIPD[0], cIPD[1], w_fp[16] ); - FFV1_1( w_fp[2], w_fp[29], COUPs[1], cIPD[0], cIPD[1], w_fp[27] ); + FFV1_1( w_fp[2], w_fp[23], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[77] ); + FFV1_1( w_fp[2], w_fp[68], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[16] ); + FFV1_1( w_fp[2], w_fp[29], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[27] ); // Amplitude(s) for diagram number 1207 - FFV1_0( w_fp[52], w_fp[77], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[77], w_fp[4], COUPs[1], 1.0, &_fp[0] ); jamp_sv[17] += amp_sv[0]; jamp_sv[23] -= amp_sv[0]; jamp_sv[91] -= amp_sv[0]; jamp_sv[115] += amp_sv[0]; - FFV1_0( w_fp[52], w_fp[16], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[16], w_fp[4], COUPs[1], 1.0, &_fp[0] ); jamp_sv[23] -= amp_sv[0]; jamp_sv[77] += amp_sv[0]; jamp_sv[91] -= amp_sv[0]; jamp_sv[101] += amp_sv[0]; - FFV1_0( w_fp[52], w_fp[27], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[27], w_fp[4], COUPs[1], 1.0, &_fp[0] ); jamp_sv[17] -= amp_sv[0]; jamp_sv[77] += amp_sv[0]; jamp_sv[101] += amp_sv[0]; @@ -28145,7 +28145,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1208 - FFV1_0( w_fp[52], w_fp[2], w_fp[72], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[2], w_fp[72], COUPs[1], 1.0, &_fp[0] ); jamp_sv[17] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[23] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[51] += cxtype( 0, 1 ) * amp_sv[0]; @@ -28154,7 +28154,7 @@ namespace mg5amcCpu jamp_sv[70] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[91] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[115] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[52], w_fp[2], w_fp[60], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[2], w_fp[60], COUPs[1], 1.0, &_fp[0] ); jamp_sv[23] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[53] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[61] += cxtype( 0, 1 ) * amp_sv[0]; @@ -28163,7 +28163,7 @@ namespace mg5amcCpu jamp_sv[77] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[91] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[101] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[52], w_fp[2], w_fp[24], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[2], w_fp[24], COUPs[1], 1.0, &_fp[0] ); jamp_sv[17] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[51] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[61] += cxtype( 0, 1 ) * amp_sv[0]; @@ -28179,17 +28179,17 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1209 - FFV1_0( w_fp[52], w_fp[33], w_fp[23], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[33], w_fp[23], COUPs[1], 1.0, &_fp[0] ); jamp_sv[51] += amp_sv[0]; jamp_sv[53] -= amp_sv[0]; jamp_sv[64] -= amp_sv[0]; jamp_sv[70] += amp_sv[0]; - FFV1_0( w_fp[52], w_fp[33], w_fp[68], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[33], w_fp[68], COUPs[1], 1.0, &_fp[0] ); jamp_sv[53] -= amp_sv[0]; jamp_sv[61] += amp_sv[0]; jamp_sv[64] -= amp_sv[0]; jamp_sv[67] += amp_sv[0]; - FFV1_0( w_fp[52], w_fp[33], w_fp[29], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[33], w_fp[29], COUPs[1], 1.0, &_fp[0] ); jamp_sv[51] -= amp_sv[0]; jamp_sv[61] += amp_sv[0]; jamp_sv[67] += amp_sv[0]; @@ -28201,7 +28201,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1210 - FFV1_0( w_fp[3], w_fp[77], w_fp[61], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[77], w_fp[61], COUPs[1], 1.0, &_fp[0] ); jamp_sv[16] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[17] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[22] += cxtype( 0, 1 ) * amp_sv[0]; @@ -28210,7 +28210,7 @@ namespace mg5amcCpu jamp_sv[91] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[114] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[115] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[16], w_fp[61], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[16], w_fp[61], COUPs[1], 1.0, &_fp[0] ); jamp_sv[22] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[23] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[76] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -28219,7 +28219,7 @@ namespace mg5amcCpu jamp_sv[91] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[100] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[101] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[27], w_fp[61], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[27], w_fp[61], COUPs[1], 1.0, &_fp[0] ); jamp_sv[16] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[17] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[76] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -28235,7 +28235,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1211 - FFV1_0( w_fp[71], w_fp[2], w_fp[61], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[71], w_fp[2], w_fp[61], COUPs[1], 1.0, &_fp[0] ); jamp_sv[30] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[31] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[33] += cxtype( 0, 1 ) * amp_sv[0]; @@ -28244,7 +28244,7 @@ namespace mg5amcCpu jamp_sv[55] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[57] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[59] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[21], w_fp[2], w_fp[61], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[21], w_fp[2], w_fp[61], COUPs[1], 1.0, &_fp[0] ); jamp_sv[31] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[32] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[33] += cxtype( 0, 1 ) * amp_sv[0]; @@ -28253,7 +28253,7 @@ namespace mg5amcCpu jamp_sv[56] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[57] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[58] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[66], w_fp[2], w_fp[61], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[66], w_fp[2], w_fp[61], COUPs[1], 1.0, &_fp[0] ); jamp_sv[30] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[32] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[34] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -28269,7 +28269,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1212 - VVV1_0( w_fp[23], w_fp[61], w_fp[8], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[23], w_fp[61], w_fp[8], COUPs[0], 1.0, &_fp[0] ); jamp_sv[16] -= amp_sv[0]; jamp_sv[17] += amp_sv[0]; jamp_sv[22] += amp_sv[0]; @@ -28286,7 +28286,7 @@ namespace mg5amcCpu jamp_sv[91] -= amp_sv[0]; jamp_sv[114] -= amp_sv[0]; jamp_sv[115] += amp_sv[0]; - VVV1_0( w_fp[68], w_fp[61], w_fp[8], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[68], w_fp[61], w_fp[8], COUPs[0], 1.0, &_fp[0] ); jamp_sv[22] += amp_sv[0]; jamp_sv[23] -= amp_sv[0]; jamp_sv[31] -= amp_sv[0]; @@ -28303,7 +28303,7 @@ namespace mg5amcCpu jamp_sv[91] -= amp_sv[0]; jamp_sv[100] -= amp_sv[0]; jamp_sv[101] += amp_sv[0]; - VVV1_0( w_fp[29], w_fp[61], w_fp[8], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[29], w_fp[61], w_fp[8], COUPs[0], 1.0, &_fp[0] ); jamp_sv[16] += amp_sv[0]; jamp_sv[17] -= amp_sv[0]; jamp_sv[30] -= amp_sv[0]; @@ -28327,7 +28327,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1213 - VVVV1_0( w_fp[23], w_fp[1], w_fp[8], w_fp[4], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[23], w_fp[1], w_fp[8], w_fp[4], COUPs[2], 1.0, &_fp[0] ); jamp_sv[16] += amp_sv[0]; jamp_sv[22] -= amp_sv[0]; jamp_sv[27] -= amp_sv[0]; @@ -28344,7 +28344,7 @@ namespace mg5amcCpu jamp_sv[70] -= amp_sv[0]; jamp_sv[90] -= amp_sv[0]; jamp_sv[114] += amp_sv[0]; - VVVV3_0( w_fp[23], w_fp[1], w_fp[8], w_fp[4], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[23], w_fp[1], w_fp[8], w_fp[4], COUPs[2], 1.0, &_fp[0] ); jamp_sv[16] += amp_sv[0]; jamp_sv[17] -= amp_sv[0]; jamp_sv[22] -= amp_sv[0]; @@ -28361,7 +28361,7 @@ namespace mg5amcCpu jamp_sv[91] += amp_sv[0]; jamp_sv[114] += amp_sv[0]; jamp_sv[115] -= amp_sv[0]; - VVVV4_0( w_fp[23], w_fp[1], w_fp[8], w_fp[4], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[23], w_fp[1], w_fp[8], w_fp[4], COUPs[2], 1.0, &_fp[0] ); jamp_sv[17] -= amp_sv[0]; jamp_sv[23] += amp_sv[0]; jamp_sv[27] += amp_sv[0]; @@ -28378,7 +28378,7 @@ namespace mg5amcCpu jamp_sv[70] += amp_sv[0]; jamp_sv[91] += amp_sv[0]; jamp_sv[115] -= amp_sv[0]; - VVVV1_0( w_fp[68], w_fp[1], w_fp[8], w_fp[4], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[68], w_fp[1], w_fp[8], w_fp[4], COUPs[2], 1.0, &_fp[0] ); jamp_sv[22] -= amp_sv[0]; jamp_sv[29] += amp_sv[0]; jamp_sv[37] -= amp_sv[0]; @@ -28395,7 +28395,7 @@ namespace mg5amcCpu jamp_sv[76] += amp_sv[0]; jamp_sv[90] -= amp_sv[0]; jamp_sv[100] += amp_sv[0]; - VVVV3_0( w_fp[68], w_fp[1], w_fp[8], w_fp[4], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[68], w_fp[1], w_fp[8], w_fp[4], COUPs[2], 1.0, &_fp[0] ); jamp_sv[22] -= amp_sv[0]; jamp_sv[23] += amp_sv[0]; jamp_sv[31] += amp_sv[0]; @@ -28412,7 +28412,7 @@ namespace mg5amcCpu jamp_sv[91] += amp_sv[0]; jamp_sv[100] += amp_sv[0]; jamp_sv[101] -= amp_sv[0]; - VVVV4_0( w_fp[68], w_fp[1], w_fp[8], w_fp[4], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[68], w_fp[1], w_fp[8], w_fp[4], COUPs[2], 1.0, &_fp[0] ); jamp_sv[23] += amp_sv[0]; jamp_sv[29] -= amp_sv[0]; jamp_sv[31] += amp_sv[0]; @@ -28429,7 +28429,7 @@ namespace mg5amcCpu jamp_sv[77] -= amp_sv[0]; jamp_sv[91] += amp_sv[0]; jamp_sv[101] -= amp_sv[0]; - VVVV1_0( w_fp[29], w_fp[1], w_fp[8], w_fp[4], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[29], w_fp[1], w_fp[8], w_fp[4], COUPs[2], 1.0, &_fp[0] ); jamp_sv[16] -= amp_sv[0]; jamp_sv[27] += amp_sv[0]; jamp_sv[37] -= amp_sv[0]; @@ -28446,7 +28446,7 @@ namespace mg5amcCpu jamp_sv[76] += amp_sv[0]; jamp_sv[100] += amp_sv[0]; jamp_sv[114] -= amp_sv[0]; - VVVV3_0( w_fp[29], w_fp[1], w_fp[8], w_fp[4], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[29], w_fp[1], w_fp[8], w_fp[4], COUPs[2], 1.0, &_fp[0] ); jamp_sv[16] -= amp_sv[0]; jamp_sv[17] += amp_sv[0]; jamp_sv[30] += amp_sv[0]; @@ -28463,7 +28463,7 @@ namespace mg5amcCpu jamp_sv[101] -= amp_sv[0]; jamp_sv[114] -= amp_sv[0]; jamp_sv[115] += amp_sv[0]; - VVVV4_0( w_fp[29], w_fp[1], w_fp[8], w_fp[4], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[29], w_fp[1], w_fp[8], w_fp[4], COUPs[2], 1.0, &_fp[0] ); jamp_sv[17] += amp_sv[0]; jamp_sv[27] -= amp_sv[0]; jamp_sv[30] += amp_sv[0]; @@ -28484,12 +28484,12 @@ namespace mg5amcCpu // *** DIAGRAM 1214 OF 1240 *** // Wavefunction(s) for diagram number 1214 - VVV1P0_1( w_fp[23], w_fp[1], COUPs[0], 0., 0., w_fp[61] ); - VVV1P0_1( w_fp[68], w_fp[1], COUPs[0], 0., 0., w_fp[23] ); - VVV1P0_1( w_fp[29], w_fp[1], COUPs[0], 0., 0., w_fp[68] ); + VVV1P0_1( w_fp[23], w_fp[1], COUPs[0], 1.0, 0., 0., w_fp[61] ); + VVV1P0_1( w_fp[68], w_fp[1], COUPs[0], 1.0, 0., 0., w_fp[23] ); + VVV1P0_1( w_fp[29], w_fp[1], COUPs[0], 1.0, 0., 0., w_fp[68] ); // Amplitude(s) for diagram number 1214 - VVV1_0( w_fp[8], w_fp[4], w_fp[61], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[4], w_fp[61], COUPs[0], 1.0, &_fp[0] ); jamp_sv[16] += amp_sv[0]; jamp_sv[22] -= amp_sv[0]; jamp_sv[27] -= amp_sv[0]; @@ -28506,7 +28506,7 @@ namespace mg5amcCpu jamp_sv[70] -= amp_sv[0]; jamp_sv[90] -= amp_sv[0]; jamp_sv[114] += amp_sv[0]; - VVV1_0( w_fp[8], w_fp[4], w_fp[23], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[4], w_fp[23], COUPs[0], 1.0, &_fp[0] ); jamp_sv[22] -= amp_sv[0]; jamp_sv[29] += amp_sv[0]; jamp_sv[37] -= amp_sv[0]; @@ -28523,7 +28523,7 @@ namespace mg5amcCpu jamp_sv[76] += amp_sv[0]; jamp_sv[90] -= amp_sv[0]; jamp_sv[100] += amp_sv[0]; - VVV1_0( w_fp[8], w_fp[4], w_fp[68], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[4], w_fp[68], COUPs[0], 1.0, &_fp[0] ); jamp_sv[16] -= amp_sv[0]; jamp_sv[27] += amp_sv[0]; jamp_sv[37] -= amp_sv[0]; @@ -28547,7 +28547,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1215 - VVV1_0( w_fp[1], w_fp[8], w_fp[72], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[8], w_fp[72], COUPs[0], 1.0, &_fp[0] ); jamp_sv[17] -= amp_sv[0]; jamp_sv[23] += amp_sv[0]; jamp_sv[27] += amp_sv[0]; @@ -28564,7 +28564,7 @@ namespace mg5amcCpu jamp_sv[70] += amp_sv[0]; jamp_sv[91] += amp_sv[0]; jamp_sv[115] -= amp_sv[0]; - VVV1_0( w_fp[1], w_fp[8], w_fp[60], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[8], w_fp[60], COUPs[0], 1.0, &_fp[0] ); jamp_sv[23] += amp_sv[0]; jamp_sv[29] -= amp_sv[0]; jamp_sv[31] += amp_sv[0]; @@ -28581,7 +28581,7 @@ namespace mg5amcCpu jamp_sv[77] -= amp_sv[0]; jamp_sv[91] += amp_sv[0]; jamp_sv[101] -= amp_sv[0]; - VVV1_0( w_fp[1], w_fp[8], w_fp[24], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[8], w_fp[24], COUPs[0], 1.0, &_fp[0] ); jamp_sv[17] += amp_sv[0]; jamp_sv[27] -= amp_sv[0]; jamp_sv[30] += amp_sv[0]; @@ -28605,7 +28605,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1216 - FFV1_0( w_fp[3], w_fp[33], w_fp[61], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[33], w_fp[61], COUPs[1], 1.0, &_fp[0] ); jamp_sv[51] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[53] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[54] += cxtype( 0, 1 ) * amp_sv[0]; @@ -28614,7 +28614,7 @@ namespace mg5amcCpu jamp_sv[59] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[64] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[70] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[33], w_fp[23], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[33], w_fp[23], COUPs[1], 1.0, &_fp[0] ); jamp_sv[53] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[55] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[56] += cxtype( 0, 1 ) * amp_sv[0]; @@ -28623,7 +28623,7 @@ namespace mg5amcCpu jamp_sv[61] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[64] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[67] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[33], w_fp[68], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[33], w_fp[68], COUPs[1], 1.0, &_fp[0] ); jamp_sv[51] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[54] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[56] += cxtype( 0, 1 ) * amp_sv[0]; @@ -28639,17 +28639,17 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1217 - FFV1_0( w_fp[71], w_fp[33], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[71], w_fp[33], w_fp[1], COUPs[1], 1.0, &_fp[0] ); jamp_sv[54] += amp_sv[0]; jamp_sv[55] -= amp_sv[0]; jamp_sv[57] -= amp_sv[0]; jamp_sv[59] += amp_sv[0]; - FFV1_0( w_fp[21], w_fp[33], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[21], w_fp[33], w_fp[1], COUPs[1], 1.0, &_fp[0] ); jamp_sv[55] -= amp_sv[0]; jamp_sv[56] += amp_sv[0]; jamp_sv[57] -= amp_sv[0]; jamp_sv[58] += amp_sv[0]; - FFV1_0( w_fp[66], w_fp[33], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[66], w_fp[33], w_fp[1], COUPs[1], 1.0, &_fp[0] ); jamp_sv[54] -= amp_sv[0]; jamp_sv[56] += amp_sv[0]; jamp_sv[58] += amp_sv[0]; @@ -28661,7 +28661,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1218 - FFV1_0( w_fp[46], w_fp[2], w_fp[61], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[2], w_fp[61], COUPs[1], 1.0, &_fp[0] ); jamp_sv[16] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[22] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[27] += cxtype( 0, 1 ) * amp_sv[0]; @@ -28670,7 +28670,7 @@ namespace mg5amcCpu jamp_sv[46] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[90] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[114] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[46], w_fp[2], w_fp[23], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[2], w_fp[23], COUPs[1], 1.0, &_fp[0] ); jamp_sv[22] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[29] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[37] += cxtype( 0, 1 ) * amp_sv[0]; @@ -28679,7 +28679,7 @@ namespace mg5amcCpu jamp_sv[76] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[90] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[100] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[46], w_fp[2], w_fp[68], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[2], w_fp[68], COUPs[1], 1.0, &_fp[0] ); jamp_sv[16] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[27] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[37] += cxtype( 0, 1 ) * amp_sv[0]; @@ -28695,17 +28695,17 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1219 - FFV1_0( w_fp[46], w_fp[77], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[77], w_fp[1], COUPs[1], 1.0, &_fp[0] ); jamp_sv[16] += amp_sv[0]; jamp_sv[22] -= amp_sv[0]; jamp_sv[90] -= amp_sv[0]; jamp_sv[114] += amp_sv[0]; - FFV1_0( w_fp[46], w_fp[16], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[16], w_fp[1], COUPs[1], 1.0, &_fp[0] ); jamp_sv[22] -= amp_sv[0]; jamp_sv[76] += amp_sv[0]; jamp_sv[90] -= amp_sv[0]; jamp_sv[100] += amp_sv[0]; - FFV1_0( w_fp[46], w_fp[27], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[27], w_fp[1], COUPs[1], 1.0, &_fp[0] ); jamp_sv[16] -= amp_sv[0]; jamp_sv[76] += amp_sv[0]; jamp_sv[100] += amp_sv[0]; @@ -28717,7 +28717,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1220 - VVVV1_0( w_fp[0], w_fp[73], w_fp[8], w_fp[6], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[0], w_fp[73], w_fp[8], w_fp[6], COUPs[2], 1.0, &_fp[0] ); jamp_sv[0] += amp_sv[0]; jamp_sv[2] -= amp_sv[0]; jamp_sv[8] -= amp_sv[0]; @@ -28734,7 +28734,7 @@ namespace mg5amcCpu jamp_sv[107] -= amp_sv[0]; jamp_sv[113] -= amp_sv[0]; jamp_sv[119] += amp_sv[0]; - VVVV3_0( w_fp[0], w_fp[73], w_fp[8], w_fp[6], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[0], w_fp[73], w_fp[8], w_fp[6], COUPs[2], 1.0, &_fp[0] ); jamp_sv[0] += amp_sv[0]; jamp_sv[2] -= amp_sv[0]; jamp_sv[8] -= amp_sv[0]; @@ -28751,7 +28751,7 @@ namespace mg5amcCpu jamp_sv[107] -= amp_sv[0]; jamp_sv[113] -= amp_sv[0]; jamp_sv[119] += amp_sv[0]; - VVVV4_0( w_fp[0], w_fp[73], w_fp[8], w_fp[6], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[0], w_fp[73], w_fp[8], w_fp[6], COUPs[2], 1.0, &_fp[0] ); jamp_sv[18] -= amp_sv[0]; jamp_sv[19] += amp_sv[0]; jamp_sv[21] += amp_sv[0]; @@ -28768,7 +28768,7 @@ namespace mg5amcCpu jamp_sv[97] -= amp_sv[0]; jamp_sv[99] -= amp_sv[0]; jamp_sv[101] += amp_sv[0]; - VVVV1_0( w_fp[0], w_fp[79], w_fp[8], w_fp[6], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[0], w_fp[79], w_fp[8], w_fp[6], COUPs[2], 1.0, &_fp[0] ); jamp_sv[2] -= amp_sv[0]; jamp_sv[6] += amp_sv[0]; jamp_sv[8] -= amp_sv[0]; @@ -28785,7 +28785,7 @@ namespace mg5amcCpu jamp_sv[111] += amp_sv[0]; jamp_sv[113] -= amp_sv[0]; jamp_sv[117] += amp_sv[0]; - VVVV3_0( w_fp[0], w_fp[79], w_fp[8], w_fp[6], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[0], w_fp[79], w_fp[8], w_fp[6], COUPs[2], 1.0, &_fp[0] ); jamp_sv[2] -= amp_sv[0]; jamp_sv[6] += amp_sv[0]; jamp_sv[8] -= amp_sv[0]; @@ -28802,7 +28802,7 @@ namespace mg5amcCpu jamp_sv[111] += amp_sv[0]; jamp_sv[113] -= amp_sv[0]; jamp_sv[117] += amp_sv[0]; - VVVV4_0( w_fp[0], w_fp[79], w_fp[8], w_fp[6], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[0], w_fp[79], w_fp[8], w_fp[6], COUPs[2], 1.0, &_fp[0] ); jamp_sv[19] += amp_sv[0]; jamp_sv[20] -= amp_sv[0]; jamp_sv[21] += amp_sv[0]; @@ -28819,7 +28819,7 @@ namespace mg5amcCpu jamp_sv[98] += amp_sv[0]; jamp_sv[99] -= amp_sv[0]; jamp_sv[100] += amp_sv[0]; - VVVV1_0( w_fp[0], w_fp[80], w_fp[8], w_fp[6], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[0], w_fp[80], w_fp[8], w_fp[6], COUPs[2], 1.0, &_fp[0] ); jamp_sv[0] -= amp_sv[0]; jamp_sv[6] += amp_sv[0]; jamp_sv[12] += amp_sv[0]; @@ -28836,7 +28836,7 @@ namespace mg5amcCpu jamp_sv[111] += amp_sv[0]; jamp_sv[117] += amp_sv[0]; jamp_sv[119] -= amp_sv[0]; - VVVV3_0( w_fp[0], w_fp[80], w_fp[8], w_fp[6], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[0], w_fp[80], w_fp[8], w_fp[6], COUPs[2], 1.0, &_fp[0] ); jamp_sv[0] -= amp_sv[0]; jamp_sv[6] += amp_sv[0]; jamp_sv[12] += amp_sv[0]; @@ -28853,7 +28853,7 @@ namespace mg5amcCpu jamp_sv[111] += amp_sv[0]; jamp_sv[117] += amp_sv[0]; jamp_sv[119] -= amp_sv[0]; - VVVV4_0( w_fp[0], w_fp[80], w_fp[8], w_fp[6], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[0], w_fp[80], w_fp[8], w_fp[6], COUPs[2], 1.0, &_fp[0] ); jamp_sv[18] += amp_sv[0]; jamp_sv[20] -= amp_sv[0]; jamp_sv[22] -= amp_sv[0]; @@ -28874,12 +28874,12 @@ namespace mg5amcCpu // *** DIAGRAM 1221 OF 1240 *** // Wavefunction(s) for diagram number 1221 - VVV1P0_1( w_fp[0], w_fp[73], COUPs[0], 0., 0., w_fp[27] ); - VVV1P0_1( w_fp[0], w_fp[79], COUPs[0], 0., 0., w_fp[1] ); - VVV1P0_1( w_fp[0], w_fp[80], COUPs[0], 0., 0., w_fp[16] ); + VVV1P0_1( w_fp[0], w_fp[73], COUPs[0], 1.0, 0., 0., w_fp[27] ); + VVV1P0_1( w_fp[0], w_fp[79], COUPs[0], 1.0, 0., 0., w_fp[1] ); + VVV1P0_1( w_fp[0], w_fp[80], COUPs[0], 1.0, 0., 0., w_fp[16] ); // Amplitude(s) for diagram number 1221 - VVV1_0( w_fp[8], w_fp[6], w_fp[27], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[6], w_fp[27], COUPs[0], 1.0, &_fp[0] ); jamp_sv[0] += amp_sv[0]; jamp_sv[2] -= amp_sv[0]; jamp_sv[8] -= amp_sv[0]; @@ -28896,7 +28896,7 @@ namespace mg5amcCpu jamp_sv[107] -= amp_sv[0]; jamp_sv[113] -= amp_sv[0]; jamp_sv[119] += amp_sv[0]; - VVV1_0( w_fp[8], w_fp[6], w_fp[1], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[6], w_fp[1], COUPs[0], 1.0, &_fp[0] ); jamp_sv[2] -= amp_sv[0]; jamp_sv[6] += amp_sv[0]; jamp_sv[8] -= amp_sv[0]; @@ -28913,7 +28913,7 @@ namespace mg5amcCpu jamp_sv[111] += amp_sv[0]; jamp_sv[113] -= amp_sv[0]; jamp_sv[117] += amp_sv[0]; - VVV1_0( w_fp[8], w_fp[6], w_fp[16], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[6], w_fp[16], COUPs[0], 1.0, &_fp[0] ); jamp_sv[0] -= amp_sv[0]; jamp_sv[6] += amp_sv[0]; jamp_sv[12] += amp_sv[0]; @@ -28937,7 +28937,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1222 - VVV1_0( w_fp[73], w_fp[6], w_fp[56], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[73], w_fp[6], w_fp[56], COUPs[0], 1.0, &_fp[0] ); jamp_sv[0] += amp_sv[0]; jamp_sv[2] -= amp_sv[0]; jamp_sv[8] -= amp_sv[0]; @@ -28954,7 +28954,7 @@ namespace mg5amcCpu jamp_sv[107] -= amp_sv[0]; jamp_sv[113] -= amp_sv[0]; jamp_sv[119] += amp_sv[0]; - VVV1_0( w_fp[79], w_fp[6], w_fp[56], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[79], w_fp[6], w_fp[56], COUPs[0], 1.0, &_fp[0] ); jamp_sv[2] -= amp_sv[0]; jamp_sv[6] += amp_sv[0]; jamp_sv[8] -= amp_sv[0]; @@ -28971,7 +28971,7 @@ namespace mg5amcCpu jamp_sv[111] += amp_sv[0]; jamp_sv[113] -= amp_sv[0]; jamp_sv[117] += amp_sv[0]; - VVV1_0( w_fp[80], w_fp[6], w_fp[56], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[80], w_fp[6], w_fp[56], COUPs[0], 1.0, &_fp[0] ); jamp_sv[0] -= amp_sv[0]; jamp_sv[6] += amp_sv[0]; jamp_sv[12] += amp_sv[0]; @@ -28995,7 +28995,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1223 - FFV1_0( w_fp[3], w_fp[47], w_fp[27], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[47], w_fp[27], COUPs[1], 1.0, &_fp[0] ); jamp_sv[96] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[97] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[99] += cxtype( 0, 1 ) * amp_sv[0]; @@ -29004,7 +29004,7 @@ namespace mg5amcCpu jamp_sv[107] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[113] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[119] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[47], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[47], w_fp[1], COUPs[1], 1.0, &_fp[0] ); jamp_sv[97] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[98] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[99] += cxtype( 0, 1 ) * amp_sv[0]; @@ -29013,7 +29013,7 @@ namespace mg5amcCpu jamp_sv[111] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[113] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[117] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[47], w_fp[16], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[47], w_fp[16], COUPs[1], 1.0, &_fp[0] ); jamp_sv[96] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[98] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[100] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -29029,17 +29029,17 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1224 - FFV1_0( w_fp[3], w_fp[113], w_fp[73], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[113], w_fp[73], COUPs[1], 1.0, &_fp[0] ); jamp_sv[96] += amp_sv[0]; jamp_sv[97] -= amp_sv[0]; jamp_sv[99] -= amp_sv[0]; jamp_sv[101] += amp_sv[0]; - FFV1_0( w_fp[3], w_fp[113], w_fp[79], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[113], w_fp[79], COUPs[1], 1.0, &_fp[0] ); jamp_sv[97] -= amp_sv[0]; jamp_sv[98] += amp_sv[0]; jamp_sv[99] -= amp_sv[0]; jamp_sv[100] += amp_sv[0]; - FFV1_0( w_fp[3], w_fp[113], w_fp[80], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[113], w_fp[80], COUPs[1], 1.0, &_fp[0] ); jamp_sv[96] -= amp_sv[0]; jamp_sv[98] += amp_sv[0]; jamp_sv[100] += amp_sv[0]; @@ -29051,7 +29051,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1225 - FFV1_0( w_fp[41], w_fp[2], w_fp[27], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[2], w_fp[27], COUPs[1], 1.0, &_fp[0] ); jamp_sv[0] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[2] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[8] += cxtype( 0, 1 ) * amp_sv[0]; @@ -29060,7 +29060,7 @@ namespace mg5amcCpu jamp_sv[38] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[62] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[86] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[41], w_fp[2], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[2], w_fp[1], COUPs[1], 1.0, &_fp[0] ); jamp_sv[2] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[6] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[8] += cxtype( 0, 1 ) * amp_sv[0]; @@ -29069,7 +29069,7 @@ namespace mg5amcCpu jamp_sv[56] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[62] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[80] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[41], w_fp[2], w_fp[16], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[2], w_fp[16], COUPs[1], 1.0, &_fp[0] ); jamp_sv[0] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[6] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[12] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -29085,17 +29085,17 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1226 - FFV1_0( w_fp[62], w_fp[2], w_fp[73], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[62], w_fp[2], w_fp[73], COUPs[1], 1.0, &_fp[0] ); jamp_sv[32] += amp_sv[0]; jamp_sv[38] -= amp_sv[0]; jamp_sv[62] -= amp_sv[0]; jamp_sv[86] += amp_sv[0]; - FFV1_0( w_fp[62], w_fp[2], w_fp[79], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[62], w_fp[2], w_fp[79], COUPs[1], 1.0, &_fp[0] ); jamp_sv[38] -= amp_sv[0]; jamp_sv[56] += amp_sv[0]; jamp_sv[62] -= amp_sv[0]; jamp_sv[80] += amp_sv[0]; - FFV1_0( w_fp[62], w_fp[2], w_fp[80], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[62], w_fp[2], w_fp[80], COUPs[1], 1.0, &_fp[0] ); jamp_sv[32] -= amp_sv[0]; jamp_sv[56] += amp_sv[0]; jamp_sv[80] += amp_sv[0]; @@ -29107,7 +29107,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1227 - VVVV1_0( w_fp[0], w_fp[57], w_fp[8], w_fp[5], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[0], w_fp[57], w_fp[8], w_fp[5], COUPs[2], 1.0, &_fp[0] ); jamp_sv[1] += amp_sv[0]; jamp_sv[4] -= amp_sv[0]; jamp_sv[10] -= amp_sv[0]; @@ -29124,7 +29124,7 @@ namespace mg5amcCpu jamp_sv[89] -= amp_sv[0]; jamp_sv[95] += amp_sv[0]; jamp_sv[110] -= amp_sv[0]; - VVVV3_0( w_fp[0], w_fp[57], w_fp[8], w_fp[5], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[0], w_fp[57], w_fp[8], w_fp[5], COUPs[2], 1.0, &_fp[0] ); jamp_sv[1] += amp_sv[0]; jamp_sv[4] -= amp_sv[0]; jamp_sv[10] -= amp_sv[0]; @@ -29141,7 +29141,7 @@ namespace mg5amcCpu jamp_sv[89] -= amp_sv[0]; jamp_sv[95] += amp_sv[0]; jamp_sv[111] -= amp_sv[0]; - VVVV4_0( w_fp[0], w_fp[57], w_fp[8], w_fp[5], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[0], w_fp[57], w_fp[8], w_fp[5], COUPs[2], 1.0, &_fp[0] ); jamp_sv[12] -= amp_sv[0]; jamp_sv[13] += amp_sv[0]; jamp_sv[15] += amp_sv[0]; @@ -29158,7 +29158,7 @@ namespace mg5amcCpu jamp_sv[77] += amp_sv[0]; jamp_sv[110] += amp_sv[0]; jamp_sv[111] -= amp_sv[0]; - VVVV1_0( w_fp[0], w_fp[81], w_fp[8], w_fp[5], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[0], w_fp[81], w_fp[8], w_fp[5], COUPs[2], 1.0, &_fp[0] ); jamp_sv[4] -= amp_sv[0]; jamp_sv[7] += amp_sv[0]; jamp_sv[10] -= amp_sv[0]; @@ -29175,7 +29175,7 @@ namespace mg5amcCpu jamp_sv[89] -= amp_sv[0]; jamp_sv[93] += amp_sv[0]; jamp_sv[104] -= amp_sv[0]; - VVVV3_0( w_fp[0], w_fp[81], w_fp[8], w_fp[5], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[0], w_fp[81], w_fp[8], w_fp[5], COUPs[2], 1.0, &_fp[0] ); jamp_sv[4] -= amp_sv[0]; jamp_sv[7] += amp_sv[0]; jamp_sv[10] -= amp_sv[0]; @@ -29192,7 +29192,7 @@ namespace mg5amcCpu jamp_sv[89] -= amp_sv[0]; jamp_sv[93] += amp_sv[0]; jamp_sv[105] -= amp_sv[0]; - VVVV4_0( w_fp[0], w_fp[81], w_fp[8], w_fp[5], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[0], w_fp[81], w_fp[8], w_fp[5], COUPs[2], 1.0, &_fp[0] ); jamp_sv[13] += amp_sv[0]; jamp_sv[14] -= amp_sv[0]; jamp_sv[15] += amp_sv[0]; @@ -29209,7 +29209,7 @@ namespace mg5amcCpu jamp_sv[76] += amp_sv[0]; jamp_sv[104] += amp_sv[0]; jamp_sv[105] -= amp_sv[0]; - VVVV1_0( w_fp[0], w_fp[82], w_fp[8], w_fp[5], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[0], w_fp[82], w_fp[8], w_fp[5], COUPs[2], 1.0, &_fp[0] ); jamp_sv[1] -= amp_sv[0]; jamp_sv[7] += amp_sv[0]; jamp_sv[18] += amp_sv[0]; @@ -29226,7 +29226,7 @@ namespace mg5amcCpu jamp_sv[95] -= amp_sv[0]; jamp_sv[104] -= amp_sv[0]; jamp_sv[110] += amp_sv[0]; - VVVV3_0( w_fp[0], w_fp[82], w_fp[8], w_fp[5], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[0], w_fp[82], w_fp[8], w_fp[5], COUPs[2], 1.0, &_fp[0] ); jamp_sv[1] -= amp_sv[0]; jamp_sv[7] += amp_sv[0]; jamp_sv[12] += amp_sv[0]; @@ -29243,7 +29243,7 @@ namespace mg5amcCpu jamp_sv[95] -= amp_sv[0]; jamp_sv[105] -= amp_sv[0]; jamp_sv[111] += amp_sv[0]; - VVVV4_0( w_fp[0], w_fp[82], w_fp[8], w_fp[5], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[0], w_fp[82], w_fp[8], w_fp[5], COUPs[2], 1.0, &_fp[0] ); jamp_sv[12] += amp_sv[0]; jamp_sv[14] -= amp_sv[0]; jamp_sv[16] -= amp_sv[0]; @@ -29264,12 +29264,12 @@ namespace mg5amcCpu // *** DIAGRAM 1228 OF 1240 *** // Wavefunction(s) for diagram number 1228 - VVV1P0_1( w_fp[0], w_fp[57], COUPs[0], 0., 0., w_fp[62] ); - VVV1P0_1( w_fp[0], w_fp[81], COUPs[0], 0., 0., w_fp[80] ); - VVV1P0_1( w_fp[0], w_fp[82], COUPs[0], 0., 0., w_fp[79] ); + VVV1P0_1( w_fp[0], w_fp[57], COUPs[0], 1.0, 0., 0., w_fp[62] ); + VVV1P0_1( w_fp[0], w_fp[81], COUPs[0], 1.0, 0., 0., w_fp[80] ); + VVV1P0_1( w_fp[0], w_fp[82], COUPs[0], 1.0, 0., 0., w_fp[79] ); // Amplitude(s) for diagram number 1228 - VVV1_0( w_fp[8], w_fp[5], w_fp[62], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[5], w_fp[62], COUPs[0], 1.0, &_fp[0] ); jamp_sv[1] += amp_sv[0]; jamp_sv[4] -= amp_sv[0]; jamp_sv[10] -= amp_sv[0]; @@ -29286,7 +29286,7 @@ namespace mg5amcCpu jamp_sv[89] -= amp_sv[0]; jamp_sv[95] += amp_sv[0]; jamp_sv[110] -= amp_sv[0]; - VVV1_0( w_fp[8], w_fp[5], w_fp[80], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[5], w_fp[80], COUPs[0], 1.0, &_fp[0] ); jamp_sv[4] -= amp_sv[0]; jamp_sv[7] += amp_sv[0]; jamp_sv[10] -= amp_sv[0]; @@ -29303,7 +29303,7 @@ namespace mg5amcCpu jamp_sv[89] -= amp_sv[0]; jamp_sv[93] += amp_sv[0]; jamp_sv[104] -= amp_sv[0]; - VVV1_0( w_fp[8], w_fp[5], w_fp[79], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[5], w_fp[79], COUPs[0], 1.0, &_fp[0] ); jamp_sv[1] -= amp_sv[0]; jamp_sv[7] += amp_sv[0]; jamp_sv[18] += amp_sv[0]; @@ -29327,7 +29327,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1229 - VVV1_0( w_fp[57], w_fp[5], w_fp[56], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[57], w_fp[5], w_fp[56], COUPs[0], 1.0, &_fp[0] ); jamp_sv[1] += amp_sv[0]; jamp_sv[4] -= amp_sv[0]; jamp_sv[10] -= amp_sv[0]; @@ -29344,7 +29344,7 @@ namespace mg5amcCpu jamp_sv[89] -= amp_sv[0]; jamp_sv[95] += amp_sv[0]; jamp_sv[111] -= amp_sv[0]; - VVV1_0( w_fp[81], w_fp[5], w_fp[56], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[81], w_fp[5], w_fp[56], COUPs[0], 1.0, &_fp[0] ); jamp_sv[4] -= amp_sv[0]; jamp_sv[7] += amp_sv[0]; jamp_sv[10] -= amp_sv[0]; @@ -29361,7 +29361,7 @@ namespace mg5amcCpu jamp_sv[89] -= amp_sv[0]; jamp_sv[93] += amp_sv[0]; jamp_sv[105] -= amp_sv[0]; - VVV1_0( w_fp[82], w_fp[5], w_fp[56], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[82], w_fp[5], w_fp[56], COUPs[0], 1.0, &_fp[0] ); jamp_sv[1] -= amp_sv[0]; jamp_sv[7] += amp_sv[0]; jamp_sv[12] += amp_sv[0]; @@ -29385,7 +29385,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1230 - FFV1_0( w_fp[3], w_fp[39], w_fp[62], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[39], w_fp[62], COUPs[1], 1.0, &_fp[0] ); jamp_sv[72] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[73] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[75] += cxtype( 0, 1 ) * amp_sv[0]; @@ -29394,7 +29394,7 @@ namespace mg5amcCpu jamp_sv[83] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[89] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[95] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[39], w_fp[80], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[39], w_fp[80], COUPs[1], 1.0, &_fp[0] ); jamp_sv[73] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[74] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[75] += cxtype( 0, 1 ) * amp_sv[0]; @@ -29403,7 +29403,7 @@ namespace mg5amcCpu jamp_sv[87] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[89] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[93] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[39], w_fp[79], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[39], w_fp[79], COUPs[1], 1.0, &_fp[0] ); jamp_sv[72] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[74] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[76] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -29419,17 +29419,17 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1231 - FFV1_0( w_fp[3], w_fp[102], w_fp[57], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[102], w_fp[57], COUPs[1], 1.0, &_fp[0] ); jamp_sv[72] += amp_sv[0]; jamp_sv[73] -= amp_sv[0]; jamp_sv[75] -= amp_sv[0]; jamp_sv[77] += amp_sv[0]; - FFV1_0( w_fp[3], w_fp[102], w_fp[81], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[102], w_fp[81], COUPs[1], 1.0, &_fp[0] ); jamp_sv[73] -= amp_sv[0]; jamp_sv[74] += amp_sv[0]; jamp_sv[75] -= amp_sv[0]; jamp_sv[76] += amp_sv[0]; - FFV1_0( w_fp[3], w_fp[102], w_fp[82], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[102], w_fp[82], COUPs[1], 1.0, &_fp[0] ); jamp_sv[72] -= amp_sv[0]; jamp_sv[74] += amp_sv[0]; jamp_sv[76] += amp_sv[0]; @@ -29441,7 +29441,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1232 - FFV1_0( w_fp[38], w_fp[2], w_fp[62], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[2], w_fp[62], COUPs[1], 1.0, &_fp[0] ); jamp_sv[1] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[4] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[10] += cxtype( 0, 1 ) * amp_sv[0]; @@ -29450,7 +29450,7 @@ namespace mg5amcCpu jamp_sv[44] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[68] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[110] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[38], w_fp[2], w_fp[80], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[2], w_fp[80], COUPs[1], 1.0, &_fp[0] ); jamp_sv[4] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[7] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[10] += cxtype( 0, 1 ) * amp_sv[0]; @@ -29459,7 +29459,7 @@ namespace mg5amcCpu jamp_sv[58] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[68] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[104] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[38], w_fp[2], w_fp[79], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[2], w_fp[79], COUPs[1], 1.0, &_fp[0] ); jamp_sv[1] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[7] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[18] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -29475,17 +29475,17 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1233 - FFV1_0( w_fp[104], w_fp[2], w_fp[57], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[104], w_fp[2], w_fp[57], COUPs[1], 1.0, &_fp[0] ); jamp_sv[34] += amp_sv[0]; jamp_sv[44] -= amp_sv[0]; jamp_sv[68] -= amp_sv[0]; jamp_sv[110] += amp_sv[0]; - FFV1_0( w_fp[104], w_fp[2], w_fp[81], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[104], w_fp[2], w_fp[81], COUPs[1], 1.0, &_fp[0] ); jamp_sv[44] -= amp_sv[0]; jamp_sv[58] += amp_sv[0]; jamp_sv[68] -= amp_sv[0]; jamp_sv[104] += amp_sv[0]; - FFV1_0( w_fp[104], w_fp[2], w_fp[82], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[104], w_fp[2], w_fp[82], COUPs[1], 1.0, &_fp[0] ); jamp_sv[34] -= amp_sv[0]; jamp_sv[58] += amp_sv[0]; jamp_sv[104] += amp_sv[0]; @@ -29497,7 +29497,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1234 - VVVV1_0( w_fp[0], w_fp[55], w_fp[8], w_fp[4], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[0], w_fp[55], w_fp[8], w_fp[4], COUPs[2], 1.0, &_fp[0] ); jamp_sv[3] += amp_sv[0]; jamp_sv[5] -= amp_sv[0]; jamp_sv[16] -= amp_sv[0]; @@ -29514,7 +29514,7 @@ namespace mg5amcCpu jamp_sv[71] += amp_sv[0]; jamp_sv[92] += amp_sv[0]; jamp_sv[116] -= amp_sv[0]; - VVVV3_0( w_fp[0], w_fp[55], w_fp[8], w_fp[4], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[0], w_fp[55], w_fp[8], w_fp[4], COUPs[2], 1.0, &_fp[0] ); jamp_sv[3] += amp_sv[0]; jamp_sv[5] -= amp_sv[0]; jamp_sv[6] -= amp_sv[0]; @@ -29531,7 +29531,7 @@ namespace mg5amcCpu jamp_sv[71] += amp_sv[0]; jamp_sv[93] += amp_sv[0]; jamp_sv[117] -= amp_sv[0]; - VVVV4_0( w_fp[0], w_fp[55], w_fp[8], w_fp[4], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[0], w_fp[55], w_fp[8], w_fp[4], COUPs[2], 1.0, &_fp[0] ); jamp_sv[6] -= amp_sv[0]; jamp_sv[7] += amp_sv[0]; jamp_sv[9] += amp_sv[0]; @@ -29548,7 +29548,7 @@ namespace mg5amcCpu jamp_sv[93] += amp_sv[0]; jamp_sv[116] += amp_sv[0]; jamp_sv[117] -= amp_sv[0]; - VVVV1_0( w_fp[0], w_fp[83], w_fp[8], w_fp[4], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[0], w_fp[83], w_fp[8], w_fp[4], COUPs[2], 1.0, &_fp[0] ); jamp_sv[5] -= amp_sv[0]; jamp_sv[13] += amp_sv[0]; jamp_sv[16] -= amp_sv[0]; @@ -29565,7 +29565,7 @@ namespace mg5amcCpu jamp_sv[82] -= amp_sv[0]; jamp_sv[92] += amp_sv[0]; jamp_sv[106] -= amp_sv[0]; - VVVV3_0( w_fp[0], w_fp[83], w_fp[8], w_fp[4], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[0], w_fp[83], w_fp[8], w_fp[4], COUPs[2], 1.0, &_fp[0] ); jamp_sv[5] -= amp_sv[0]; jamp_sv[7] += amp_sv[0]; jamp_sv[8] -= amp_sv[0]; @@ -29582,7 +29582,7 @@ namespace mg5amcCpu jamp_sv[83] -= amp_sv[0]; jamp_sv[93] += amp_sv[0]; jamp_sv[107] -= amp_sv[0]; - VVVV4_0( w_fp[0], w_fp[83], w_fp[8], w_fp[4], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[0], w_fp[83], w_fp[8], w_fp[4], COUPs[2], 1.0, &_fp[0] ); jamp_sv[7] += amp_sv[0]; jamp_sv[8] -= amp_sv[0]; jamp_sv[9] += amp_sv[0]; @@ -29599,7 +29599,7 @@ namespace mg5amcCpu jamp_sv[93] += amp_sv[0]; jamp_sv[106] += amp_sv[0]; jamp_sv[107] -= amp_sv[0]; - VVVV1_0( w_fp[0], w_fp[84], w_fp[8], w_fp[4], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[0], w_fp[84], w_fp[8], w_fp[4], COUPs[2], 1.0, &_fp[0] ); jamp_sv[3] -= amp_sv[0]; jamp_sv[13] += amp_sv[0]; jamp_sv[19] += amp_sv[0]; @@ -29616,7 +29616,7 @@ namespace mg5amcCpu jamp_sv[82] -= amp_sv[0]; jamp_sv[106] -= amp_sv[0]; jamp_sv[116] += amp_sv[0]; - VVVV3_0( w_fp[0], w_fp[84], w_fp[8], w_fp[4], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[0], w_fp[84], w_fp[8], w_fp[4], COUPs[2], 1.0, &_fp[0] ); jamp_sv[3] -= amp_sv[0]; jamp_sv[6] += amp_sv[0]; jamp_sv[8] -= amp_sv[0]; @@ -29633,7 +29633,7 @@ namespace mg5amcCpu jamp_sv[83] -= amp_sv[0]; jamp_sv[107] -= amp_sv[0]; jamp_sv[117] += amp_sv[0]; - VVVV4_0( w_fp[0], w_fp[84], w_fp[8], w_fp[4], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[0], w_fp[84], w_fp[8], w_fp[4], COUPs[2], 1.0, &_fp[0] ); jamp_sv[6] += amp_sv[0]; jamp_sv[8] -= amp_sv[0]; jamp_sv[10] -= amp_sv[0]; @@ -29654,12 +29654,12 @@ namespace mg5amcCpu // *** DIAGRAM 1235 OF 1240 *** // Wavefunction(s) for diagram number 1235 - VVV1P0_1( w_fp[0], w_fp[55], COUPs[0], 0., 0., w_fp[104] ); - VVV1P0_1( w_fp[0], w_fp[83], COUPs[0], 0., 0., w_fp[82] ); - VVV1P0_1( w_fp[0], w_fp[84], COUPs[0], 0., 0., w_fp[81] ); + VVV1P0_1( w_fp[0], w_fp[55], COUPs[0], 1.0, 0., 0., w_fp[104] ); + VVV1P0_1( w_fp[0], w_fp[83], COUPs[0], 1.0, 0., 0., w_fp[82] ); + VVV1P0_1( w_fp[0], w_fp[84], COUPs[0], 1.0, 0., 0., w_fp[81] ); // Amplitude(s) for diagram number 1235 - VVV1_0( w_fp[8], w_fp[4], w_fp[104], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[4], w_fp[104], COUPs[0], 1.0, &_fp[0] ); jamp_sv[3] += amp_sv[0]; jamp_sv[5] -= amp_sv[0]; jamp_sv[16] -= amp_sv[0]; @@ -29676,7 +29676,7 @@ namespace mg5amcCpu jamp_sv[71] += amp_sv[0]; jamp_sv[92] += amp_sv[0]; jamp_sv[116] -= amp_sv[0]; - VVV1_0( w_fp[8], w_fp[4], w_fp[82], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[4], w_fp[82], COUPs[0], 1.0, &_fp[0] ); jamp_sv[5] -= amp_sv[0]; jamp_sv[13] += amp_sv[0]; jamp_sv[16] -= amp_sv[0]; @@ -29693,7 +29693,7 @@ namespace mg5amcCpu jamp_sv[82] -= amp_sv[0]; jamp_sv[92] += amp_sv[0]; jamp_sv[106] -= amp_sv[0]; - VVV1_0( w_fp[8], w_fp[4], w_fp[81], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[4], w_fp[81], COUPs[0], 1.0, &_fp[0] ); jamp_sv[3] -= amp_sv[0]; jamp_sv[13] += amp_sv[0]; jamp_sv[19] += amp_sv[0]; @@ -29717,7 +29717,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1236 - VVV1_0( w_fp[55], w_fp[4], w_fp[56], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[55], w_fp[4], w_fp[56], COUPs[0], 1.0, &_fp[0] ); jamp_sv[3] += amp_sv[0]; jamp_sv[5] -= amp_sv[0]; jamp_sv[6] -= amp_sv[0]; @@ -29734,7 +29734,7 @@ namespace mg5amcCpu jamp_sv[71] += amp_sv[0]; jamp_sv[93] += amp_sv[0]; jamp_sv[117] -= amp_sv[0]; - VVV1_0( w_fp[83], w_fp[4], w_fp[56], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[83], w_fp[4], w_fp[56], COUPs[0], 1.0, &_fp[0] ); jamp_sv[5] -= amp_sv[0]; jamp_sv[7] += amp_sv[0]; jamp_sv[8] -= amp_sv[0]; @@ -29751,7 +29751,7 @@ namespace mg5amcCpu jamp_sv[83] -= amp_sv[0]; jamp_sv[93] += amp_sv[0]; jamp_sv[107] -= amp_sv[0]; - VVV1_0( w_fp[84], w_fp[4], w_fp[56], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[84], w_fp[4], w_fp[56], COUPs[0], 1.0, &_fp[0] ); jamp_sv[3] -= amp_sv[0]; jamp_sv[6] += amp_sv[0]; jamp_sv[8] -= amp_sv[0]; @@ -29775,7 +29775,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1237 - FFV1_0( w_fp[3], w_fp[33], w_fp[104], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[33], w_fp[104], COUPs[1], 1.0, &_fp[0] ); jamp_sv[48] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[49] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[51] += cxtype( 0, 1 ) * amp_sv[0]; @@ -29784,7 +29784,7 @@ namespace mg5amcCpu jamp_sv[59] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[65] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[71] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[33], w_fp[82], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[33], w_fp[82], COUPs[1], 1.0, &_fp[0] ); jamp_sv[49] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[50] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[51] += cxtype( 0, 1 ) * amp_sv[0]; @@ -29793,7 +29793,7 @@ namespace mg5amcCpu jamp_sv[63] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[65] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[69] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[33], w_fp[81], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[33], w_fp[81], COUPs[1], 1.0, &_fp[0] ); jamp_sv[48] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[50] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[52] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -29809,17 +29809,17 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1238 - FFV1_0( w_fp[3], w_fp[114], w_fp[55], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[114], w_fp[55], COUPs[1], 1.0, &_fp[0] ); jamp_sv[48] += amp_sv[0]; jamp_sv[49] -= amp_sv[0]; jamp_sv[51] -= amp_sv[0]; jamp_sv[53] += amp_sv[0]; - FFV1_0( w_fp[3], w_fp[114], w_fp[83], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[114], w_fp[83], COUPs[1], 1.0, &_fp[0] ); jamp_sv[49] -= amp_sv[0]; jamp_sv[50] += amp_sv[0]; jamp_sv[51] -= amp_sv[0]; jamp_sv[52] += amp_sv[0]; - FFV1_0( w_fp[3], w_fp[114], w_fp[84], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[114], w_fp[84], COUPs[1], 1.0, &_fp[0] ); jamp_sv[48] -= amp_sv[0]; jamp_sv[50] += amp_sv[0]; jamp_sv[52] += amp_sv[0]; @@ -29831,7 +29831,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1239 - FFV1_0( w_fp[46], w_fp[2], w_fp[104], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[2], w_fp[104], COUPs[1], 1.0, &_fp[0] ); jamp_sv[3] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[5] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[16] += cxtype( 0, 1 ) * amp_sv[0]; @@ -29840,7 +29840,7 @@ namespace mg5amcCpu jamp_sv[46] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[92] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[116] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[46], w_fp[2], w_fp[82], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[2], w_fp[82], COUPs[1], 1.0, &_fp[0] ); jamp_sv[5] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[13] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[16] += cxtype( 0, 1 ) * amp_sv[0]; @@ -29849,7 +29849,7 @@ namespace mg5amcCpu jamp_sv[82] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[92] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[106] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[46], w_fp[2], w_fp[81], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[2], w_fp[81], COUPs[1], 1.0, &_fp[0] ); jamp_sv[3] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[13] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[19] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -29865,17 +29865,17 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1240 - FFV1_0( w_fp[99], w_fp[2], w_fp[55], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[2], w_fp[55], COUPs[1], 1.0, &_fp[0] ); jamp_sv[40] += amp_sv[0]; jamp_sv[46] -= amp_sv[0]; jamp_sv[92] -= amp_sv[0]; jamp_sv[116] += amp_sv[0]; - FFV1_0( w_fp[99], w_fp[2], w_fp[83], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[2], w_fp[83], COUPs[1], 1.0, &_fp[0] ); jamp_sv[46] -= amp_sv[0]; jamp_sv[82] += amp_sv[0]; jamp_sv[92] -= amp_sv[0]; jamp_sv[106] += amp_sv[0]; - FFV1_0( w_fp[99], w_fp[2], w_fp[84], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[2], w_fp[84], COUPs[1], 1.0, &_fp[0] ); jamp_sv[40] -= amp_sv[0]; jamp_sv[82] += amp_sv[0]; jamp_sv[106] += amp_sv[0]; @@ -30633,8 +30633,7 @@ namespace mg5amcCpu { // nprocesses>1 was last observed for "mirror processes" in uux_ttx in the 270 branch (see issue #343 and PRs #360 and #396) constexpr int nprocesses = 1; - static_assert( nprocesses == 1, "Assume nprocesses == 1" ); - // process_id corresponds to the index of DSIG1 Fortran functions (must be 1 because cudacpp is unable to handle DSIG2) + static_assert( nprocesses == 1 || nprocesses == 2, "Assume nprocesses == 1 or 2" ); constexpr int process_id = 1; // code generation source: madevent + cudacpp exporter static_assert( process_id == 1, "Assume process_id == 1" ); } diff --git a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/P1_gg_ttxggg/auto_dsig1.f b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/P1_gg_ttxggg/auto_dsig1.f index e6d2fc3099..6828f1c252 100644 --- a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/P1_gg_ttxggg/auto_dsig1.f +++ b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/P1_gg_ttxggg/auto_dsig1.f @@ -39,6 +39,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C LOCAL VARIABLES C INTEGER I,ITYPE,LP,IPROC + DOUBLE PRECISION QSCALE DOUBLE PRECISION G1 DOUBLE PRECISION G2 DOUBLE PRECISION XPQ(-7:7),PD(0:MAXPROC) @@ -126,11 +127,24 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) IF (ABS(LPP(IB(1))).GE.1) THEN !LP=SIGN(1,LPP(IB(1))) - G1=PDG2PDF(LPP(IB(1)),0, IB(1),XBK(IB(1)),DSQRT(Q2FACT(IB(1)))) + IF (DSQRT(Q2FACT(IB(1))).EQ.0D0) THEN + QSCALE=0D0 + DO I=3,NEXTERNAL + QSCALE=QSCALE+DSQRT(MAX(0D0,(PP(0,I)+PP(3,I))*(PP(0,I) + $ -PP(3,I)))) + ENDDO + QSCALE=QSCALE/2D0 + ELSE + QSCALE=DSQRT(Q2FACT(IB(1))) + ENDIF + G1=PDG2PDF(LPP(IB(1)),0, IB(1),XBK(IB(1)), QSCALE) ENDIF IF (ABS(LPP(IB(2))).GE.1) THEN !LP=SIGN(1,LPP(IB(2))) - G2=PDG2PDF(LPP(IB(2)),0, IB(2),XBK(IB(2)),DSQRT(Q2FACT(IB(2)))) + IF (DSQRT(Q2FACT(IB(2))).NE.0D0) THEN + QSCALE=DSQRT(Q2FACT(IB(2))) + ENDIF + G2=PDG2PDF(LPP(IB(2)),0, IB(2),XBK(IB(2)), QSCALE) ENDIF PD(0) = 0D0 IPROC = 0 diff --git a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/P1_gg_ttxggg/matrix1.f b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/P1_gg_ttxggg/matrix1.f index 51965a0fe6..dbf975d89a 100644 --- a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/P1_gg_ttxggg/matrix1.f +++ b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/P1_gg_ttxggg/matrix1.f @@ -455,7 +455,7 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C LOCAL VARIABLES C INTEGER I,J,M,N - COMPLEX*16 ZTEMP, TMP_JAMP(2768) + COMPLEX*16 ZTEMP, TMP_JAMP(3030) REAL*8 CF(NCOLOR,NCOLOR) COMPLEX*16 AMP(NGRAPHS), JAMP(NCOLOR,NAMPSO) COMPLEX*16 W(6,NWAVEFUNCS) @@ -13529,5081 +13529,5242 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) JAMP(:,:) = (0D0,0D0) C JAMPs contributing to orders ALL_ORDERS=1 - TMP_JAMP(210) = AMP(1370) - AMP(1382) ! used 16 times - TMP_JAMP(209) = AMP(1358) - AMP(1361) ! used 16 times - TMP_JAMP(208) = AMP(1329) + AMP(1811) ! used 16 times - TMP_JAMP(207) = AMP(1327) - AMP(1810) ! used 16 times - TMP_JAMP(206) = AMP(1322) + AMP(1388) ! used 16 times - TMP_JAMP(205) = AMP(1320) + AMP(1324) ! used 16 times - TMP_JAMP(204) = AMP(1310) - AMP(1313) ! used 16 times - TMP_JAMP(203) = AMP(1309) + AMP(1311) ! used 16 times - TMP_JAMP(202) = AMP(1103) + AMP(1359) ! used 16 times - TMP_JAMP(201) = AMP(1102) + AMP(1486) ! used 16 times - TMP_JAMP(200) = AMP(1098) - AMP(1817) ! used 16 times - TMP_JAMP(199) = AMP(1096) + AMP(1816) ! used 16 times - TMP_JAMP(198) = AMP(1089) - AMP(1487) ! used 16 times - TMP_JAMP(197) = AMP(1085) + AMP(1087) ! used 16 times - TMP_JAMP(196) = AMP(1084) - AMP(1100) ! used 16 times - TMP_JAMP(195) = AMP(1080) + AMP(1082) ! used 16 times - TMP_JAMP(194) = AMP(1079) - AMP(1099) ! used 16 times - TMP_JAMP(193) = AMP(1076) + AMP(1078) ! used 16 times - TMP_JAMP(192) = AMP(45) + AMP(1323) ! used 16 times - TMP_JAMP(191) = AMP(43) - AMP(1371) ! used 16 times - TMP_JAMP(190) = AMP(41) - AMP(1492) ! used 16 times - TMP_JAMP(189) = AMP(37) + AMP(40) ! used 16 times - TMP_JAMP(188) = AMP(29) - AMP(1326) ! used 16 times - TMP_JAMP(187) = AMP(25) + AMP(28) ! used 16 times - TMP_JAMP(186) = AMP(18) + AMP(1493) ! used 16 times - TMP_JAMP(185) = AMP(16) + AMP(26) ! used 16 times - TMP_JAMP(184) = AMP(5) - AMP(38) ! used 16 times - TMP_JAMP(183) = AMP(2) + AMP(4) ! used 16 times - TMP_JAMP(182) = AMP(1378) + AMP(1383) ! used 16 times - TMP_JAMP(181) = AMP(1367) + AMP(1369) ! used 16 times - TMP_JAMP(180) = AMP(1332) - AMP(1677) ! used 16 times - TMP_JAMP(179) = AMP(1330) - AMP(1389) ! used 16 times - TMP_JAMP(178) = AMP(1325) - AMP(1675) ! used 16 times - TMP_JAMP(177) = AMP(1319) + AMP(1321) ! used 16 times - TMP_JAMP(176) = AMP(1315) - AMP(1318) ! used 16 times - TMP_JAMP(175) = AMP(1314) + AMP(1316) ! used 16 times - TMP_JAMP(174) = AMP(579) - AMP(1380) ! used 16 times - TMP_JAMP(173) = AMP(577) - AMP(1489) ! used 16 times - TMP_JAMP(172) = AMP(573) + AMP(1683) ! used 16 times - TMP_JAMP(171) = AMP(571) + AMP(576) ! used 16 times - TMP_JAMP(170) = AMP(567) + AMP(1490) ! used 16 times - TMP_JAMP(169) = AMP(566) + AMP(1681) ! used 16 times - TMP_JAMP(168) = AMP(556) - AMP(559) ! used 16 times - TMP_JAMP(167) = AMP(555) + AMP(557) ! used 16 times - TMP_JAMP(166) = AMP(554) - AMP(574) ! used 16 times - TMP_JAMP(165) = AMP(551) + AMP(553) ! used 16 times - TMP_JAMP(164) = AMP(1377) + AMP(1865) ! used 16 times - TMP_JAMP(163) = AMP(1357) + AMP(1360) ! used 16 times - TMP_JAMP(162) = AMP(1176) - AMP(1814) ! used 16 times - TMP_JAMP(161) = AMP(1174) + AMP(1813) ! used 16 times - TMP_JAMP(160) = AMP(1173) - AMP(1871) ! used 16 times - TMP_JAMP(159) = AMP(1163) + AMP(1165) ! used 16 times - TMP_JAMP(158) = AMP(1159) + AMP(1161) ! used 16 times - TMP_JAMP(157) = AMP(1158) + AMP(1160) ! used 16 times - TMP_JAMP(156) = AMP(636) - AMP(1172) ! used 16 times - TMP_JAMP(155) = AMP(634) + AMP(1376) ! used 16 times - TMP_JAMP(154) = AMP(575) + AMP(578) ! used 16 times - TMP_JAMP(153) = AMP(565) - AMP(1166) ! used 16 times - TMP_JAMP(152) = AMP(521) + AMP(524) ! used 16 times - TMP_JAMP(151) = AMP(520) + AMP(523) ! used 16 times - TMP_JAMP(150) = AMP(1375) - AMP(1864) ! used 16 times - TMP_JAMP(149) = AMP(1368) + AMP(1372) ! used 16 times - TMP_JAMP(148) = AMP(1171) + AMP(1870) ! used 16 times - TMP_JAMP(147) = AMP(1170) - AMP(1542) ! used 16 times - TMP_JAMP(146) = AMP(1167) - AMP(1541) ! used 16 times - TMP_JAMP(145) = AMP(1164) + AMP(1168) ! used 16 times - TMP_JAMP(144) = AMP(1154) + AMP(1156) ! used 16 times - TMP_JAMP(143) = AMP(1153) + AMP(1155) ! used 16 times - TMP_JAMP(142) = AMP(42) - AMP(1374) ! used 16 times - TMP_JAMP(141) = AMP(24) + AMP(1548) ! used 16 times - TMP_JAMP(140) = AMP(22) + AMP(39) ! used 16 times - TMP_JAMP(139) = AMP(17) + AMP(1547) ! used 16 times - TMP_JAMP(138) = AMP(7) + AMP(9) ! used 16 times - TMP_JAMP(137) = AMP(6) + AMP(8) ! used 16 times - TMP_JAMP(136) = AMP(1379) - AMP(1785) ! used 16 times - TMP_JAMP(135) = AMP(1365) + AMP(1780) ! used 16 times - TMP_JAMP(134) = AMP(1362) + AMP(1364) ! used 16 times - TMP_JAMP(133) = AMP(1101) + AMP(1104) ! used 16 times - TMP_JAMP(132) = AMP(732) + AMP(1680) ! used 16 times - TMP_JAMP(131) = AMP(731) + AMP(1791) ! used 16 times - TMP_JAMP(130) = AMP(725) + AMP(1678) ! used 16 times - TMP_JAMP(129) = AMP(724) - AMP(1088) ! used 16 times - TMP_JAMP(128) = AMP(722) - AMP(1782) ! used 16 times - TMP_JAMP(127) = AMP(719) + AMP(721) ! used 16 times - TMP_JAMP(126) = AMP(715) - AMP(718) ! used 16 times - TMP_JAMP(125) = AMP(714) + AMP(716) ! used 16 times - TMP_JAMP(124) = AMP(681) + AMP(684) ! used 16 times - TMP_JAMP(123) = AMP(679) + AMP(682) ! used 16 times - TMP_JAMP(122) = AMP(1373) - AMP(1783) ! used 16 times - TMP_JAMP(121) = AMP(1363) - AMP(1366) ! used 16 times - TMP_JAMP(120) = AMP(729) + AMP(1545) ! used 16 times - TMP_JAMP(119) = AMP(728) + AMP(1789) ! used 16 times - TMP_JAMP(118) = AMP(726) + AMP(1544) ! used 16 times - TMP_JAMP(117) = AMP(720) - AMP(723) ! used 16 times - TMP_JAMP(116) = AMP(710) + AMP(712) ! used 16 times - TMP_JAMP(115) = AMP(709) + AMP(711) ! used 16 times - TMP_JAMP(114) = AMP(1346) + AMP(1385) ! used 16 times - TMP_JAMP(113) = AMP(1334) - AMP(1337) ! used 16 times - TMP_JAMP(112) = AMP(1181) + AMP(1336) ! used 16 times - TMP_JAMP(111) = AMP(1180) + AMP(1540) ! used 16 times - TMP_JAMP(110) = AMP(1162) - AMP(1178) ! used 16 times - TMP_JAMP(109) = AMP(1157) - AMP(1177) ! used 16 times - TMP_JAMP(108) = AMP(44) + AMP(1347) ! used 16 times - TMP_JAMP(107) = AMP(36) - AMP(1546) ! used 16 times - TMP_JAMP(106) = AMP(31) + AMP(34) ! used 16 times - TMP_JAMP(105) = AMP(10) - AMP(33) ! used 16 times - TMP_JAMP(104) = AMP(1354) - AMP(1386) ! used 16 times - TMP_JAMP(103) = AMP(1343) + AMP(1345) ! used 16 times - TMP_JAMP(102) = AMP(738) - AMP(1355) ! used 16 times - TMP_JAMP(101) = AMP(736) - AMP(1543) ! used 16 times - TMP_JAMP(100) = AMP(730) + AMP(735) ! used 16 times - TMP_JAMP(99) = AMP(713) - AMP(733) ! used 16 times - TMP_JAMP(98) = AMP(1353) + AMP(1838) ! used 16 times - TMP_JAMP(97) = AMP(1333) + AMP(1335) ! used 16 times - TMP_JAMP(96) = AMP(1095) - AMP(1844) ! used 16 times - TMP_JAMP(95) = AMP(1081) + AMP(1083) ! used 16 times - TMP_JAMP(94) = AMP(795) - AMP(1094) ! used 16 times - TMP_JAMP(93) = AMP(793) + AMP(1352) ! used 16 times - TMP_JAMP(92) = AMP(734) + AMP(737) ! used 16 times - TMP_JAMP(91) = AMP(680) + AMP(683) ! used 16 times - TMP_JAMP(90) = AMP(1351) - AMP(1837) ! used 16 times - TMP_JAMP(89) = AMP(1344) + AMP(1348) ! used 16 times - TMP_JAMP(88) = AMP(1093) + AMP(1843) ! used 16 times - TMP_JAMP(87) = AMP(1092) - AMP(1488) ! used 16 times - TMP_JAMP(86) = AMP(1086) + AMP(1090) ! used 16 times - TMP_JAMP(85) = AMP(1075) + AMP(1077) ! used 16 times - TMP_JAMP(84) = AMP(35) - AMP(1350) ! used 16 times - TMP_JAMP(83) = AMP(21) + AMP(1494) ! used 16 times - TMP_JAMP(82) = AMP(19) + AMP(32) ! used 16 times - TMP_JAMP(81) = AMP(1) + AMP(3) ! used 16 times - TMP_JAMP(80) = AMP(1356) - AMP(1731) ! used 16 times - TMP_JAMP(79) = AMP(1341) + AMP(1726) ! used 16 times - TMP_JAMP(78) = AMP(1338) + AMP(1340) ! used 16 times - TMP_JAMP(77) = AMP(1179) + AMP(1182) ! used 16 times - TMP_JAMP(76) = AMP(572) + AMP(1737) ! used 16 times - TMP_JAMP(75) = AMP(563) - AMP(1728) ! used 16 times - TMP_JAMP(74) = AMP(560) + AMP(562) ! used 16 times - TMP_JAMP(73) = AMP(522) + AMP(525) ! used 16 times - TMP_JAMP(72) = AMP(1349) - AMP(1729) ! used 16 times - TMP_JAMP(71) = AMP(1339) - AMP(1342) ! used 16 times - TMP_JAMP(70) = AMP(570) + AMP(1491) ! used 16 times - TMP_JAMP(69) = AMP(569) + AMP(1735) ! used 16 times - TMP_JAMP(68) = AMP(561) - AMP(564) ! used 16 times - TMP_JAMP(67) = AMP(550) + AMP(552) ! used 16 times - TMP_JAMP(66) = AMP(1317) + AMP(1672) ! used 16 times - TMP_JAMP(65) = AMP(1259) + AMP(1312) ! used 16 times - TMP_JAMP(64) = AMP(1257) + AMP(1260) ! used 16 times - TMP_JAMP(63) = AMP(1251) - AMP(1868) ! used 16 times - TMP_JAMP(62) = AMP(1240) - AMP(1256) ! used 16 times - TMP_JAMP(61) = AMP(1237) + AMP(1239) ! used 16 times - TMP_JAMP(60) = AMP(635) - AMP(1250) ! used 16 times - TMP_JAMP(59) = AMP(558) - AMP(1674) ! used 16 times - TMP_JAMP(58) = AMP(540) + AMP(543) ! used 16 times - TMP_JAMP(57) = AMP(539) + AMP(542) ! used 16 times - TMP_JAMP(56) = AMP(1249) + AMP(1867) ! used 16 times - TMP_JAMP(55) = AMP(1242) + AMP(1246) ! used 16 times - TMP_JAMP(54) = AMP(727) - AMP(1247) ! used 16 times - TMP_JAMP(53) = AMP(717) - AMP(1673) ! used 16 times - TMP_JAMP(52) = AMP(699) + AMP(702) ! used 16 times - TMP_JAMP(51) = AMP(697) + AMP(700) ! used 16 times - TMP_JAMP(50) = AMP(1254) - AMP(1841) ! used 16 times - TMP_JAMP(49) = AMP(1236) + AMP(1238) ! used 16 times - TMP_JAMP(48) = AMP(794) - AMP(1253) ! used 16 times - TMP_JAMP(47) = AMP(698) + AMP(701) ! used 16 times - TMP_JAMP(46) = AMP(1252) + AMP(1840) ! used 16 times - TMP_JAMP(45) = AMP(1241) + AMP(1243) ! used 16 times - TMP_JAMP(44) = AMP(568) - AMP(1244) ! used 16 times - TMP_JAMP(43) = AMP(538) + AMP(541) ! used 16 times - TMP_JAMP(42) = AMP(1258) + AMP(1594) ! used 16 times - TMP_JAMP(41) = AMP(1248) - AMP(1596) ! used 16 times - TMP_JAMP(40) = AMP(1235) - AMP(1255) ! used 16 times - TMP_JAMP(39) = AMP(1231) + AMP(1233) ! used 16 times - TMP_JAMP(38) = AMP(30) - AMP(1600) ! used 16 times - TMP_JAMP(37) = AMP(23) + AMP(1602) ! used 16 times - TMP_JAMP(36) = AMP(15) - AMP(27) ! used 16 times - TMP_JAMP(35) = AMP(11) + AMP(13) ! used 16 times - TMP_JAMP(34) = AMP(1245) - AMP(1595) ! used 16 times - TMP_JAMP(33) = AMP(1232) + AMP(1234) ! used 16 times - TMP_JAMP(32) = AMP(20) + AMP(1601) ! used 16 times - TMP_JAMP(31) = AMP(12) + AMP(14) ! used 16 times - TMP_JAMP(30) = AMP(954) - AMP(1097) ! used 16 times - TMP_JAMP(29) = AMP(952) + AMP(1328) ! used 16 times - TMP_JAMP(28) = AMP(897) - AMP(1331) ! used 16 times - TMP_JAMP(27) = AMP(893) + AMP(896) ! used 16 times - TMP_JAMP(26) = AMP(890) + AMP(1788) ! used 16 times - TMP_JAMP(25) = AMP(889) + AMP(894) ! used 16 times - TMP_JAMP(24) = AMP(881) - AMP(1781) ! used 16 times - TMP_JAMP(23) = AMP(878) + AMP(880) ! used 16 times - TMP_JAMP(22) = AMP(840) + AMP(843) ! used 16 times - TMP_JAMP(21) = AMP(839) + AMP(842) ! used 16 times - TMP_JAMP(20) = AMP(953) - AMP(1175) ! used 16 times - TMP_JAMP(19) = AMP(887) + AMP(1786) ! used 16 times - TMP_JAMP(18) = AMP(886) - AMP(1169) ! used 16 times - TMP_JAMP(17) = AMP(879) - AMP(882) ! used 16 times - TMP_JAMP(16) = AMP(857) + AMP(860) ! used 16 times - TMP_JAMP(15) = AMP(856) + AMP(859) ! used 16 times - TMP_JAMP(14) = AMP(891) + AMP(1734) ! used 16 times - TMP_JAMP(13) = AMP(876) - AMP(1727) ! used 16 times - TMP_JAMP(12) = AMP(873) + AMP(875) ! used 16 times - TMP_JAMP(11) = AMP(858) + AMP(861) ! used 16 times - TMP_JAMP(10) = AMP(884) + AMP(1732) ! used 16 times - TMP_JAMP(9) = AMP(883) - AMP(1091) ! used 16 times - TMP_JAMP(8) = AMP(874) - AMP(877) ! used 16 times - TMP_JAMP(7) = AMP(838) + AMP(841) ! used 16 times - TMP_JAMP(6) = AMP(895) - AMP(1597) ! used 16 times - TMP_JAMP(5) = AMP(888) + AMP(1599) ! used 16 times - TMP_JAMP(4) = AMP(872) - AMP(892) ! used 16 times - TMP_JAMP(3) = AMP(868) + AMP(870) ! used 16 times - TMP_JAMP(2) = AMP(885) + AMP(1598) ! used 16 times - TMP_JAMP(1) = AMP(869) + AMP(871) ! used 16 times - TMP_JAMP(315) = TMP_JAMP(186) + TMP_JAMP(183) ! used 16 times - TMP_JAMP(314) = TMP_JAMP(188) + TMP_JAMP(185) ! used 16 times - TMP_JAMP(313) = TMP_JAMP(190) - TMP_JAMP(184) ! used 16 times - TMP_JAMP(312) = TMP_JAMP(191) + TMP_JAMP(189) ! used 16 times - TMP_JAMP(311) = TMP_JAMP(192) - TMP_JAMP(187) ! used 16 times - TMP_JAMP(310) = TMP_JAMP(198) + TMP_JAMP(193) ! used 16 times - TMP_JAMP(309) = TMP_JAMP(199) - TMP_JAMP(197) ! used 16 times - TMP_JAMP(308) = TMP_JAMP(200) + TMP_JAMP(195) ! used 16 times - TMP_JAMP(307) = TMP_JAMP(201) - TMP_JAMP(194) ! used 16 times - TMP_JAMP(306) = TMP_JAMP(202) - TMP_JAMP(196) ! used 16 times - TMP_JAMP(305) = TMP_JAMP(206) - TMP_JAMP(204) ! used 16 times - TMP_JAMP(304) = TMP_JAMP(207) - TMP_JAMP(205) ! used 16 times - TMP_JAMP(303) = TMP_JAMP(208) + TMP_JAMP(203) ! used 16 times - TMP_JAMP(302) = TMP_JAMP(210) - TMP_JAMP(209) ! used 16 times - TMP_JAMP(301) = TMP_JAMP(169) - TMP_JAMP(168) ! used 16 times - TMP_JAMP(300) = TMP_JAMP(170) + TMP_JAMP(165) ! used 16 times - TMP_JAMP(299) = TMP_JAMP(172) + TMP_JAMP(167) ! used 16 times - TMP_JAMP(298) = TMP_JAMP(173) - TMP_JAMP(166) ! used 16 times - TMP_JAMP(297) = TMP_JAMP(174) + TMP_JAMP(171) ! used 16 times - TMP_JAMP(296) = TMP_JAMP(178) - TMP_JAMP(176) ! used 16 times - TMP_JAMP(295) = TMP_JAMP(179) - TMP_JAMP(177) ! used 16 times - TMP_JAMP(294) = TMP_JAMP(180) + TMP_JAMP(175) ! used 16 times - TMP_JAMP(293) = TMP_JAMP(182) - TMP_JAMP(181) ! used 16 times - TMP_JAMP(292) = TMP_JAMP(153) + TMP_JAMP(151) ! used 16 times - TMP_JAMP(291) = TMP_JAMP(155) - TMP_JAMP(154) ! used 16 times - TMP_JAMP(290) = TMP_JAMP(156) + TMP_JAMP(152) ! used 16 times - TMP_JAMP(289) = TMP_JAMP(160) + TMP_JAMP(158) ! used 16 times - TMP_JAMP(288) = TMP_JAMP(161) - TMP_JAMP(159) ! used 16 times - TMP_JAMP(287) = TMP_JAMP(162) + TMP_JAMP(157) ! used 16 times - TMP_JAMP(286) = TMP_JAMP(164) + TMP_JAMP(163) ! used 16 times - TMP_JAMP(285) = TMP_JAMP(139) + TMP_JAMP(138) ! used 16 times - TMP_JAMP(284) = TMP_JAMP(141) + TMP_JAMP(137) ! used 16 times - TMP_JAMP(283) = TMP_JAMP(142) + TMP_JAMP(140) ! used 16 times - TMP_JAMP(282) = TMP_JAMP(146) + TMP_JAMP(144) ! used 16 times - TMP_JAMP(281) = TMP_JAMP(147) + TMP_JAMP(143) ! used 16 times - TMP_JAMP(280) = TMP_JAMP(148) - TMP_JAMP(145) ! used 16 times - TMP_JAMP(279) = TMP_JAMP(150) - TMP_JAMP(149) ! used 16 times - TMP_JAMP(278) = TMP_JAMP(128) + TMP_JAMP(124) ! used 16 times - TMP_JAMP(277) = TMP_JAMP(129) + TMP_JAMP(123) ! used 16 times - TMP_JAMP(276) = TMP_JAMP(130) - TMP_JAMP(126) ! used 16 times - TMP_JAMP(275) = TMP_JAMP(131) + TMP_JAMP(127) ! used 16 times - TMP_JAMP(274) = TMP_JAMP(132) + TMP_JAMP(125) ! used 16 times - TMP_JAMP(273) = TMP_JAMP(135) + TMP_JAMP(133) ! used 16 times - TMP_JAMP(272) = TMP_JAMP(136) + TMP_JAMP(134) ! used 16 times - TMP_JAMP(271) = TMP_JAMP(118) + TMP_JAMP(116) ! used 16 times - TMP_JAMP(270) = TMP_JAMP(119) - TMP_JAMP(117) ! used 16 times - TMP_JAMP(269) = TMP_JAMP(120) + TMP_JAMP(115) ! used 16 times - TMP_JAMP(268) = TMP_JAMP(122) - TMP_JAMP(121) ! used 16 times - TMP_JAMP(267) = TMP_JAMP(107) - TMP_JAMP(105) ! used 16 times - TMP_JAMP(266) = TMP_JAMP(108) - TMP_JAMP(106) ! used 16 times - TMP_JAMP(265) = TMP_JAMP(111) - TMP_JAMP(109) ! used 16 times - TMP_JAMP(264) = TMP_JAMP(112) - TMP_JAMP(110) ! used 16 times - TMP_JAMP(263) = TMP_JAMP(114) - TMP_JAMP(113) ! used 16 times - TMP_JAMP(262) = TMP_JAMP(101) - TMP_JAMP(99) ! used 16 times - TMP_JAMP(261) = TMP_JAMP(102) + TMP_JAMP(100) ! used 16 times - TMP_JAMP(260) = TMP_JAMP(104) - TMP_JAMP(103) ! used 16 times - TMP_JAMP(259) = TMP_JAMP(93) - TMP_JAMP(92) ! used 16 times - TMP_JAMP(258) = TMP_JAMP(94) + TMP_JAMP(91) ! used 16 times - TMP_JAMP(257) = TMP_JAMP(96) + TMP_JAMP(95) ! used 16 times - TMP_JAMP(256) = TMP_JAMP(98) + TMP_JAMP(97) ! used 16 times - TMP_JAMP(255) = TMP_JAMP(83) + TMP_JAMP(81) ! used 16 times - TMP_JAMP(254) = TMP_JAMP(84) + TMP_JAMP(82) ! used 16 times - TMP_JAMP(253) = TMP_JAMP(87) + TMP_JAMP(85) ! used 16 times - TMP_JAMP(252) = TMP_JAMP(88) - TMP_JAMP(86) ! used 16 times - TMP_JAMP(251) = TMP_JAMP(90) - TMP_JAMP(89) ! used 16 times - TMP_JAMP(250) = TMP_JAMP(75) + TMP_JAMP(73) ! used 16 times - TMP_JAMP(249) = TMP_JAMP(76) + TMP_JAMP(74) ! used 16 times - TMP_JAMP(248) = TMP_JAMP(79) + TMP_JAMP(77) ! used 16 times - TMP_JAMP(247) = TMP_JAMP(80) + TMP_JAMP(78) ! used 16 times - TMP_JAMP(246) = TMP_JAMP(69) - TMP_JAMP(68) ! used 16 times - TMP_JAMP(245) = TMP_JAMP(70) + TMP_JAMP(67) ! used 16 times - TMP_JAMP(244) = TMP_JAMP(72) - TMP_JAMP(71) ! used 16 times - TMP_JAMP(243) = TMP_JAMP(59) + TMP_JAMP(58) ! used 16 times - TMP_JAMP(242) = TMP_JAMP(60) + TMP_JAMP(57) ! used 16 times - TMP_JAMP(241) = TMP_JAMP(63) + TMP_JAMP(61) ! used 16 times - TMP_JAMP(240) = TMP_JAMP(65) - TMP_JAMP(62) ! used 16 times - TMP_JAMP(239) = TMP_JAMP(66) + TMP_JAMP(64) ! used 16 times - TMP_JAMP(238) = TMP_JAMP(53) + TMP_JAMP(52) ! used 16 times - TMP_JAMP(237) = TMP_JAMP(54) + TMP_JAMP(51) ! used 16 times - TMP_JAMP(236) = TMP_JAMP(56) - TMP_JAMP(55) ! used 16 times - TMP_JAMP(235) = TMP_JAMP(48) + TMP_JAMP(47) ! used 16 times - TMP_JAMP(234) = TMP_JAMP(50) + TMP_JAMP(49) ! used 16 times - TMP_JAMP(233) = TMP_JAMP(44) + TMP_JAMP(43) ! used 16 times - TMP_JAMP(232) = TMP_JAMP(46) - TMP_JAMP(45) ! used 16 times - TMP_JAMP(231) = TMP_JAMP(37) + TMP_JAMP(35) ! used 16 times - TMP_JAMP(230) = TMP_JAMP(38) - TMP_JAMP(36) ! used 16 times - TMP_JAMP(229) = TMP_JAMP(41) + TMP_JAMP(39) ! used 16 times - TMP_JAMP(228) = TMP_JAMP(42) - TMP_JAMP(40) ! used 16 times - TMP_JAMP(227) = TMP_JAMP(32) + TMP_JAMP(31) ! used 16 times - TMP_JAMP(226) = TMP_JAMP(34) + TMP_JAMP(33) ! used 16 times - TMP_JAMP(225) = TMP_JAMP(24) + TMP_JAMP(22) ! used 16 times - TMP_JAMP(224) = TMP_JAMP(26) + TMP_JAMP(23) ! used 16 times - TMP_JAMP(223) = TMP_JAMP(28) + TMP_JAMP(25) ! used 16 times - TMP_JAMP(222) = TMP_JAMP(29) - TMP_JAMP(27) ! used 16 times - TMP_JAMP(221) = TMP_JAMP(30) + TMP_JAMP(21) ! used 16 times - TMP_JAMP(220) = TMP_JAMP(18) + TMP_JAMP(15) ! used 16 times - TMP_JAMP(219) = TMP_JAMP(19) - TMP_JAMP(17) ! used 16 times - TMP_JAMP(218) = TMP_JAMP(20) + TMP_JAMP(16) ! used 16 times - TMP_JAMP(217) = TMP_JAMP(13) + TMP_JAMP(11) ! used 16 times - TMP_JAMP(216) = TMP_JAMP(14) + TMP_JAMP(12) ! used 16 times - TMP_JAMP(215) = TMP_JAMP(9) + TMP_JAMP(7) ! used 16 times - TMP_JAMP(214) = TMP_JAMP(10) - TMP_JAMP(8) ! used 16 times - TMP_JAMP(213) = TMP_JAMP(5) + TMP_JAMP(3) ! used 16 times - TMP_JAMP(212) = TMP_JAMP(6) - TMP_JAMP(4) ! used 16 times - TMP_JAMP(211) = TMP_JAMP(2) + TMP_JAMP(1) ! used 16 times - TMP_JAMP(405) = TMP_JAMP(302) - AMP(1390) ! used 16 times - TMP_JAMP(404) = TMP_JAMP(303) + AMP(1822) ! used 16 times - TMP_JAMP(403) = TMP_JAMP(304) - AMP(1819) ! used 16 times - TMP_JAMP(402) = TMP_JAMP(305) + AMP(1392) ! used 16 times - TMP_JAMP(401) = TMP_JAMP(307) + AMP(1501) ! used 16 times - TMP_JAMP(400) = TMP_JAMP(308) - AMP(1824) ! used 16 times - TMP_JAMP(399) = TMP_JAMP(309) + AMP(1821) ! used 16 times - TMP_JAMP(398) = TMP_JAMP(310) - AMP(1495) ! used 16 times - TMP_JAMP(397) = TMP_JAMP(311) + AMP(1387) ! used 16 times - TMP_JAMP(396) = TMP_JAMP(312) + AMP(1381) ! used 16 times - TMP_JAMP(395) = TMP_JAMP(313) - AMP(1503) ! used 16 times - TMP_JAMP(394) = TMP_JAMP(315) + AMP(1497) ! used 16 times - TMP_JAMP(393) = TMP_JAMP(293) + AMP(1393) ! used 16 times - TMP_JAMP(392) = TMP_JAMP(294) - AMP(1687) ! used 16 times - TMP_JAMP(391) = TMP_JAMP(295) - AMP(1395) ! used 16 times - TMP_JAMP(390) = TMP_JAMP(296) - AMP(1684) ! used 16 times - TMP_JAMP(389) = TMP_JAMP(298) - AMP(1502) ! used 16 times - TMP_JAMP(388) = TMP_JAMP(299) + AMP(1689) ! used 16 times - TMP_JAMP(387) = TMP_JAMP(300) + AMP(1496) ! used 16 times - TMP_JAMP(386) = TMP_JAMP(301) + AMP(1686) ! used 16 times - TMP_JAMP(385) = TMP_JAMP(286) + AMP(1876) ! used 16 times - TMP_JAMP(384) = TMP_JAMP(287) - AMP(1823) ! used 16 times - TMP_JAMP(383) = TMP_JAMP(288) + AMP(1820) ! used 16 times - TMP_JAMP(382) = TMP_JAMP(289) - AMP(1878) ! used 16 times - TMP_JAMP(381) = TMP_JAMP(290) + AMP(1872) ! used 16 times - TMP_JAMP(380) = TMP_JAMP(291) + AMP(1866) ! used 16 times - TMP_JAMP(379) = TMP_JAMP(279) - AMP(1873) ! used 16 times - TMP_JAMP(378) = TMP_JAMP(280) + AMP(1875) ! used 16 times - TMP_JAMP(377) = TMP_JAMP(281) - AMP(1552) ! used 16 times - TMP_JAMP(376) = TMP_JAMP(282) - AMP(1549) ! used 16 times - TMP_JAMP(375) = TMP_JAMP(284) + AMP(1554) ! used 16 times - TMP_JAMP(374) = TMP_JAMP(285) + AMP(1551) ! used 16 times - TMP_JAMP(373) = TMP_JAMP(272) - AMP(1795) ! used 16 times - TMP_JAMP(372) = TMP_JAMP(273) - AMP(1784) ! used 16 times - TMP_JAMP(371) = TMP_JAMP(274) + AMP(1688) ! used 16 times - TMP_JAMP(370) = TMP_JAMP(275) + AMP(1797) ! used 16 times - TMP_JAMP(369) = TMP_JAMP(276) + AMP(1685) ! used 16 times - TMP_JAMP(368) = TMP_JAMP(278) + AMP(1790) ! used 16 times - TMP_JAMP(367) = TMP_JAMP(268) - AMP(1792) ! used 16 times - TMP_JAMP(366) = TMP_JAMP(269) + AMP(1553) ! used 16 times - TMP_JAMP(365) = TMP_JAMP(270) + AMP(1794) ! used 16 times - TMP_JAMP(364) = TMP_JAMP(271) + AMP(1550) ! used 16 times - TMP_JAMP(363) = TMP_JAMP(263) + AMP(1391) ! used 16 times - TMP_JAMP(362) = TMP_JAMP(265) + AMP(1555) ! used 16 times - TMP_JAMP(361) = TMP_JAMP(266) + AMP(1384) ! used 16 times - TMP_JAMP(360) = TMP_JAMP(267) - AMP(1557) ! used 16 times - TMP_JAMP(359) = TMP_JAMP(260) - AMP(1394) ! used 16 times - TMP_JAMP(358) = TMP_JAMP(262) - AMP(1556) ! used 16 times - TMP_JAMP(357) = TMP_JAMP(256) + AMP(1849) ! used 16 times - TMP_JAMP(356) = TMP_JAMP(257) - AMP(1851) ! used 16 times - TMP_JAMP(355) = TMP_JAMP(258) + AMP(1845) ! used 16 times - TMP_JAMP(354) = TMP_JAMP(259) + AMP(1839) ! used 16 times - TMP_JAMP(353) = TMP_JAMP(251) - AMP(1846) ! used 16 times - TMP_JAMP(352) = TMP_JAMP(252) + AMP(1848) ! used 16 times - TMP_JAMP(351) = TMP_JAMP(253) - AMP(1498) ! used 16 times - TMP_JAMP(350) = TMP_JAMP(255) + AMP(1500) ! used 16 times - TMP_JAMP(349) = TMP_JAMP(247) - AMP(1741) ! used 16 times - TMP_JAMP(348) = TMP_JAMP(248) - AMP(1730) ! used 16 times - TMP_JAMP(347) = TMP_JAMP(249) + AMP(1743) ! used 16 times - TMP_JAMP(346) = TMP_JAMP(250) + AMP(1736) ! used 16 times - TMP_JAMP(345) = TMP_JAMP(244) - AMP(1738) ! used 16 times - TMP_JAMP(344) = TMP_JAMP(245) + AMP(1499) ! used 16 times - TMP_JAMP(343) = TMP_JAMP(246) + AMP(1740) ! used 16 times - TMP_JAMP(342) = TMP_JAMP(239) - AMP(1676) ! used 16 times - TMP_JAMP(341) = TMP_JAMP(241) - AMP(1877) ! used 16 times - TMP_JAMP(340) = TMP_JAMP(242) + AMP(1869) ! used 16 times - TMP_JAMP(339) = TMP_JAMP(243) + AMP(1682) ! used 16 times - TMP_JAMP(338) = TMP_JAMP(236) + AMP(1874) ! used 16 times - TMP_JAMP(337) = TMP_JAMP(238) + AMP(1679) ! used 16 times - TMP_JAMP(336) = TMP_JAMP(234) - AMP(1850) ! used 16 times - TMP_JAMP(335) = TMP_JAMP(235) + AMP(1842) ! used 16 times - TMP_JAMP(334) = TMP_JAMP(232) + AMP(1847) ! used 16 times - TMP_JAMP(333) = TMP_JAMP(228) + AMP(1609) ! used 16 times - TMP_JAMP(332) = TMP_JAMP(229) - AMP(1606) ! used 16 times - TMP_JAMP(331) = TMP_JAMP(230) - AMP(1611) ! used 16 times - TMP_JAMP(330) = TMP_JAMP(231) + AMP(1608) ! used 16 times - TMP_JAMP(329) = TMP_JAMP(226) - AMP(1603) ! used 16 times - TMP_JAMP(328) = TMP_JAMP(227) + AMP(1605) ! used 16 times - TMP_JAMP(327) = TMP_JAMP(221) + AMP(1818) ! used 16 times - TMP_JAMP(326) = TMP_JAMP(222) + AMP(1812) ! used 16 times - TMP_JAMP(325) = TMP_JAMP(224) + AMP(1796) ! used 16 times - TMP_JAMP(324) = TMP_JAMP(225) + AMP(1787) ! used 16 times - TMP_JAMP(323) = TMP_JAMP(218) + AMP(1815) ! used 16 times - TMP_JAMP(322) = TMP_JAMP(219) + AMP(1793) ! used 16 times - TMP_JAMP(321) = TMP_JAMP(216) + AMP(1742) ! used 16 times - TMP_JAMP(320) = TMP_JAMP(217) + AMP(1733) ! used 16 times - TMP_JAMP(319) = TMP_JAMP(214) + AMP(1739) ! used 16 times - TMP_JAMP(318) = TMP_JAMP(212) - AMP(1610) ! used 16 times - TMP_JAMP(317) = TMP_JAMP(213) + AMP(1607) ! used 16 times - TMP_JAMP(316) = TMP_JAMP(211) + AMP(1604) ! used 16 times - TMP_JAMP(1030) = AMP(1455) + AMP(1456) ! used 8 times - TMP_JAMP(1029) = AMP(1147) + AMP(1537) ! used 8 times - TMP_JAMP(1028) = AMP(1125) - AMP(1516) ! used 8 times - TMP_JAMP(1027) = AMP(1122) + AMP(1123) ! used 8 times - TMP_JAMP(1026) = AMP(1117) + AMP(1125) ! used 8 times - TMP_JAMP(1025) = AMP(439) - AMP(442) ! used 8 times - TMP_JAMP(1024) = AMP(421) - AMP(424) ! used 8 times - TMP_JAMP(1023) = AMP(420) + AMP(422) ! used 8 times - TMP_JAMP(1022) = AMP(353) + AMP(440) ! used 8 times - TMP_JAMP(1021) = AMP(341) - AMP(353) ! used 8 times - TMP_JAMP(1020) = AMP(339) - AMP(447) ! used 8 times - TMP_JAMP(1019) = AMP(337) + AMP(339) ! used 8 times - TMP_JAMP(1018) = AMP(152) - AMP(1539) ! used 8 times - TMP_JAMP(1017) = AMP(151) + AMP(157) ! used 8 times - TMP_JAMP(1016) = AMP(139) - AMP(159) ! used 8 times - TMP_JAMP(1015) = AMP(99) - AMP(1458) ! used 8 times - TMP_JAMP(1014) = AMP(90) + AMP(1518) ! used 8 times - TMP_JAMP(1013) = AMP(88) + AMP(99) ! used 8 times - TMP_JAMP(1012) = AMP(84) + AMP(90) ! used 8 times - TMP_JAMP(1011) = TMP_JAMP(306) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(341) ! used 8 times - TMP_JAMP(1010) = TMP_JAMP(314) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(88) ! used 8 times - TMP_JAMP(1009) = TMP_JAMP(394) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(84) ! used 8 times - TMP_JAMP(1008) = TMP_JAMP(395) - TMP_JAMP(394) ! used 8 times - TMP_JAMP(1007) = TMP_JAMP(397) - TMP_JAMP(396) ! used 8 times - TMP_JAMP(1006) = TMP_JAMP(398) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1117) ! used 8 times - TMP_JAMP(1005) = TMP_JAMP(400) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(337) ! used 8 times - TMP_JAMP(1004) = TMP_JAMP(400) - TMP_JAMP(399) ! used 8 times - TMP_JAMP(1003) = TMP_JAMP(401) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1147) ! used 8 times - TMP_JAMP(1002) = TMP_JAMP(401) - TMP_JAMP(398) ! used 8 times - TMP_JAMP(1001) = TMP_JAMP(404) - TMP_JAMP(403) ! used 8 times - TMP_JAMP(1000) = TMP_JAMP(405) + TMP_JAMP(402) ! used 8 times - TMP_JAMP(999) = AMP(1457) - AMP(1690) ! used 8 times - TMP_JAMP(998) = AMP(1453) - AMP(1457) ! used 8 times - TMP_JAMP(997) = AMP(1064) - AMP(1066) ! used 8 times - TMP_JAMP(996) = AMP(1046) - AMP(1048) ! used 8 times - TMP_JAMP(995) = AMP(1044) + AMP(1050) ! used 8 times - TMP_JAMP(994) = AMP(622) - AMP(1538) ! used 8 times - TMP_JAMP(993) = AMP(597) - AMP(599) ! used 8 times - TMP_JAMP(992) = AMP(592) + AMP(600) ! used 8 times - TMP_JAMP(991) = AMP(513) - AMP(1068) ! used 8 times - TMP_JAMP(990) = AMP(504) + AMP(1662) ! used 8 times - TMP_JAMP(989) = AMP(502) + AMP(513) ! used 8 times - TMP_JAMP(988) = AMP(498) + AMP(504) ! used 8 times - TMP_JAMP(987) = TMP_JAMP(297) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(502) ! used 8 times - TMP_JAMP(986) = TMP_JAMP(387) + TMP_JAMP(386) ! used 8 times - TMP_JAMP(985) = TMP_JAMP(388) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(498) ! used 8 times - TMP_JAMP(984) = TMP_JAMP(388) - TMP_JAMP(386) ! used 8 times - TMP_JAMP(983) = TMP_JAMP(389) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(622) ! used 8 times - TMP_JAMP(982) = TMP_JAMP(389) - TMP_JAMP(387) ! used 8 times - TMP_JAMP(981) = TMP_JAMP(390) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(1453) ! used 8 times - TMP_JAMP(980) = TMP_JAMP(392) - TMP_JAMP(390) ! used 8 times - TMP_JAMP(979) = TMP_JAMP(393) + TMP_JAMP(391) ! used 8 times - TMP_JAMP(978) = TMP_JAMP(394) + TMP_JAMP(387) ! used 8 times - TMP_JAMP(977) = TMP_JAMP(395) + TMP_JAMP(389) ! used 8 times - TMP_JAMP(976) = TMP_JAMP(396) - TMP_JAMP(393) ! used 8 times - TMP_JAMP(975) = TMP_JAMP(397) + TMP_JAMP(391) ! used 8 times - TMP_JAMP(974) = AMP(1201) - AMP(1826) ! used 8 times - TMP_JAMP(973) = AMP(1200) + AMP(1201) ! used 8 times - TMP_JAMP(972) = AMP(626) + AMP(631) ! used 8 times - TMP_JAMP(971) = AMP(598) - AMP(1202) ! used 8 times - TMP_JAMP(970) = AMP(526) + AMP(598) ! used 8 times - TMP_JAMP(969) = AMP(517) - AMP(633) ! used 8 times - TMP_JAMP(968) = AMP(441) + AMP(463) ! used 8 times - TMP_JAMP(967) = AMP(438) + AMP(441) ! used 8 times - TMP_JAMP(966) = AMP(356) + AMP(358) ! used 8 times - TMP_JAMP(965) = AMP(355) + AMP(357) ! used 8 times - TMP_JAMP(964) = TMP_JAMP(292) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(526) ! used 8 times - TMP_JAMP(963) = TMP_JAMP(380) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(626) ! used 8 times - TMP_JAMP(962) = TMP_JAMP(381) - TMP_JAMP(380) ! used 8 times - TMP_JAMP(961) = TMP_JAMP(383) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(1200) ! used 8 times - TMP_JAMP(960) = TMP_JAMP(384) - TMP_JAMP(383) ! used 8 times - TMP_JAMP(959) = TMP_JAMP(385) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(438) ! used 8 times - TMP_JAMP(958) = TMP_JAMP(385) + TMP_JAMP(380) ! used 8 times - TMP_JAMP(957) = TMP_JAMP(385) + TMP_JAMP(382) ! used 8 times - TMP_JAMP(956) = TMP_JAMP(387) - TMP_JAMP(292) ! used 8 times - TMP_JAMP(955) = TMP_JAMP(398) - TMP_JAMP(387) ! used 8 times - TMP_JAMP(954) = TMP_JAMP(399) + TMP_JAMP(383) ! used 8 times - TMP_JAMP(953) = TMP_JAMP(400) + TMP_JAMP(384) ! used 8 times - TMP_JAMP(952) = TMP_JAMP(401) - TMP_JAMP(389) ! used 8 times - TMP_JAMP(951) = AMP(1464) + AMP(1465) ! used 8 times - TMP_JAMP(950) = AMP(1212) + AMP(1213) ! used 8 times - TMP_JAMP(949) = AMP(1207) + AMP(1215) ! used 8 times - TMP_JAMP(948) = AMP(1203) - AMP(1570) ! used 8 times - TMP_JAMP(947) = AMP(1195) + AMP(1203) ! used 8 times - TMP_JAMP(946) = AMP(111) - AMP(1467) ! used 8 times - TMP_JAMP(945) = AMP(108) + AMP(1581) ! used 8 times - TMP_JAMP(944) = AMP(106) + AMP(111) ! used 8 times - TMP_JAMP(943) = AMP(102) + AMP(108) ! used 8 times - TMP_JAMP(942) = AMP(89) + AMP(1572) ! used 8 times - TMP_JAMP(941) = AMP(86) + AMP(89) ! used 8 times - TMP_JAMP(940) = TMP_JAMP(283) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(106) ! used 8 times - TMP_JAMP(939) = TMP_JAMP(374) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(86) ! used 8 times - TMP_JAMP(938) = TMP_JAMP(375) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(102) ! used 8 times - TMP_JAMP(937) = TMP_JAMP(376) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1195) ! used 8 times - TMP_JAMP(936) = TMP_JAMP(377) + TMP_JAMP(376) ! used 8 times - TMP_JAMP(935) = TMP_JAMP(379) + TMP_JAMP(378) ! used 8 times - TMP_JAMP(934) = TMP_JAMP(380) + TMP_JAMP(379) ! used 8 times - TMP_JAMP(933) = TMP_JAMP(381) - TMP_JAMP(378) ! used 8 times - TMP_JAMP(932) = TMP_JAMP(394) + TMP_JAMP(374) ! used 8 times - TMP_JAMP(931) = TMP_JAMP(395) + TMP_JAMP(283) ! used 8 times - TMP_JAMP(930) = AMP(1150) + AMP(1774) ! used 8 times - TMP_JAMP(929) = AMP(1067) - AMP(1768) ! used 8 times - TMP_JAMP(928) = AMP(1062) + AMP(1067) ! used 8 times - TMP_JAMP(927) = AMP(758) + AMP(1691) ! used 8 times - TMP_JAMP(926) = AMP(757) - AMP(1124) ! used 8 times - TMP_JAMP(925) = AMP(756) - AMP(758) ! used 8 times - TMP_JAMP(924) = AMP(685) + AMP(757) ! used 8 times - TMP_JAMP(923) = AMP(678) - AMP(1776) ! used 8 times - TMP_JAMP(922) = AMP(663) + AMP(1661) ! used 8 times - TMP_JAMP(921) = AMP(659) + AMP(662) ! used 8 times - TMP_JAMP(920) = AMP(657) + AMP(663) ! used 8 times - TMP_JAMP(919) = TMP_JAMP(277) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(685) ! used 8 times - TMP_JAMP(918) = TMP_JAMP(368) + ((0.000000000000000D+00 + TMP_JAMP(15) = AMP(37) + AMP(40) ! used 16 times + TMP_JAMP(14) = AMP(25) + AMP(28) ! used 16 times + TMP_JAMP(13) = AMP(16) + AMP(26) ! used 16 times + TMP_JAMP(12) = AMP(5) - AMP(38) ! used 16 times + TMP_JAMP(11) = AMP(2) + AMP(4) ! used 16 times + TMP_JAMP(10) = AMP(22) + AMP(39) ! used 16 times + TMP_JAMP(9) = AMP(7) + AMP(9) ! used 16 times + TMP_JAMP(8) = AMP(6) + AMP(8) ! used 16 times + TMP_JAMP(7) = AMP(31) + AMP(34) ! used 16 times + TMP_JAMP(6) = AMP(10) - AMP(33) ! used 16 times + TMP_JAMP(5) = AMP(19) + AMP(32) ! used 16 times + TMP_JAMP(4) = AMP(1) + AMP(3) ! used 16 times + TMP_JAMP(3) = AMP(15) - AMP(27) ! used 16 times + TMP_JAMP(2) = AMP(11) + AMP(13) ! used 16 times + TMP_JAMP(1) = AMP(12) + AMP(14) ! used 16 times + TMP_JAMP(30) = TMP_JAMP(15) + AMP(43) ! used 16 times + TMP_JAMP(29) = TMP_JAMP(14) - AMP(45) ! used 16 times + TMP_JAMP(28) = TMP_JAMP(13) + AMP(29) ! used 16 times + TMP_JAMP(27) = TMP_JAMP(12) - AMP(41) ! used 16 times + TMP_JAMP(26) = TMP_JAMP(11) + AMP(18) ! used 16 times + TMP_JAMP(25) = TMP_JAMP(10) + AMP(42) ! used 16 times + TMP_JAMP(24) = TMP_JAMP(9) + AMP(17) ! used 16 times + TMP_JAMP(23) = TMP_JAMP(8) + AMP(24) ! used 16 times + TMP_JAMP(22) = TMP_JAMP(7) - AMP(44) ! used 16 times + TMP_JAMP(21) = TMP_JAMP(6) - AMP(36) ! used 16 times + TMP_JAMP(20) = TMP_JAMP(5) + AMP(35) ! used 16 times + TMP_JAMP(19) = TMP_JAMP(4) + AMP(21) ! used 16 times + TMP_JAMP(18) = TMP_JAMP(3) - AMP(30) ! used 16 times + TMP_JAMP(17) = TMP_JAMP(2) + AMP(23) ! used 16 times + TMP_JAMP(16) = TMP_JAMP(1) + AMP(20) ! used 16 times + TMP_JAMP(113) = TMP_JAMP(30) + TMP_JAMP(29) ! used 8 times + TMP_JAMP(112) = TMP_JAMP(30) - TMP_JAMP(22) ! used 8 times + TMP_JAMP(111) = TMP_JAMP(30) - TMP_JAMP(25) ! used 8 times + TMP_JAMP(110) = TMP_JAMP(29) + TMP_JAMP(28) ! used 8 times + TMP_JAMP(109) = TMP_JAMP(29) + TMP_JAMP(22) ! used 8 times + TMP_JAMP(108) = TMP_JAMP(28) - TMP_JAMP(26) ! used 8 times + TMP_JAMP(107) = TMP_JAMP(28) + TMP_JAMP(24) ! used 8 times + TMP_JAMP(106) = TMP_JAMP(27) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(152) ! used 8 times + TMP_JAMP(105) = TMP_JAMP(27) + TMP_JAMP(26) ! used 8 times + TMP_JAMP(104) = TMP_JAMP(27) - TMP_JAMP(25) ! used 8 times + TMP_JAMP(103) = TMP_JAMP(27) - TMP_JAMP(19) ! used 8 times + TMP_JAMP(102) = TMP_JAMP(27) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(153) ! used 8 times + TMP_JAMP(101) = TMP_JAMP(26) + TMP_JAMP(24) ! used 8 times + TMP_JAMP(100) = TMP_JAMP(26) + TMP_JAMP(19) ! used 8 times + TMP_JAMP(99) = TMP_JAMP(25) - TMP_JAMP(23) ! used 8 times + TMP_JAMP(98) = TMP_JAMP(25) + TMP_JAMP(17) ! used 8 times + TMP_JAMP(97) = TMP_JAMP(24) + TMP_JAMP(23) ! used 8 times + TMP_JAMP(96) = TMP_JAMP(23) + TMP_JAMP(17) ! used 8 times + TMP_JAMP(95) = TMP_JAMP(22) + TMP_JAMP(20) ! used 8 times + TMP_JAMP(94) = TMP_JAMP(21) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(146) ! used 8 times + TMP_JAMP(93) = TMP_JAMP(21) - TMP_JAMP(20) ! used 8 times + TMP_JAMP(92) = TMP_JAMP(21) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(147) ! used 8 times + TMP_JAMP(91) = TMP_JAMP(20) - TMP_JAMP(19) ! used 8 times + TMP_JAMP(90) = TMP_JAMP(20) + TMP_JAMP(16) ! used 8 times + TMP_JAMP(89) = TMP_JAMP(19) + TMP_JAMP(16) ! used 8 times + TMP_JAMP(88) = TMP_JAMP(18) - TMP_JAMP(17) ! used 8 times + TMP_JAMP(87) = TMP_JAMP(18) + TMP_JAMP(16) ! used 8 times + TMP_JAMP(86) = TMP_JAMP(18) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(140) ! used 8 times + TMP_JAMP(85) = TMP_JAMP(17) + TMP_JAMP(16) ! used 8 times + TMP_JAMP(84) = AMP(439) - AMP(442) ! used 8 times + TMP_JAMP(83) = AMP(421) - AMP(424) ! used 8 times + TMP_JAMP(82) = AMP(420) + AMP(422) ! used 8 times + TMP_JAMP(81) = AMP(341) - AMP(353) ! used 8 times + TMP_JAMP(80) = AMP(337) + AMP(339) ! used 8 times + TMP_JAMP(79) = AMP(151) + AMP(157) ! used 8 times + TMP_JAMP(78) = AMP(139) - AMP(159) ! used 8 times + TMP_JAMP(77) = AMP(88) + AMP(99) ! used 8 times + TMP_JAMP(76) = AMP(84) + AMP(90) ! used 8 times + TMP_JAMP(75) = AMP(438) + AMP(441) ! used 8 times + TMP_JAMP(74) = AMP(356) + AMP(358) ! used 8 times + TMP_JAMP(73) = AMP(355) + AMP(357) ! used 8 times + TMP_JAMP(72) = AMP(106) + AMP(111) ! used 8 times + TMP_JAMP(71) = AMP(102) + AMP(108) ! used 8 times + TMP_JAMP(70) = AMP(86) + AMP(89) ! used 8 times + TMP_JAMP(69) = AMP(430) - AMP(433) ! used 8 times + TMP_JAMP(68) = AMP(359) - AMP(371) ! used 8 times + TMP_JAMP(67) = AMP(145) - AMP(158) ! used 8 times + TMP_JAMP(66) = AMP(429) + AMP(431) ! used 8 times + TMP_JAMP(65) = AMP(338) + AMP(340) ! used 8 times + TMP_JAMP(64) = AMP(118) + AMP(123) ! used 8 times + TMP_JAMP(63) = AMP(114) + AMP(120) ! used 8 times + TMP_JAMP(62) = AMP(377) - AMP(389) ! used 8 times + TMP_JAMP(61) = AMP(374) + AMP(376) ! used 8 times + TMP_JAMP(60) = AMP(373) + AMP(375) ! used 8 times + TMP_JAMP(59) = AMP(104) + AMP(107) ! used 8 times + TMP_JAMP(58) = AMP(116) + AMP(119) ! used 8 times + TMP_JAMP(57) = AMP(70) + AMP(81) ! used 8 times + TMP_JAMP(56) = AMP(66) + AMP(72) ! used 8 times + TMP_JAMP(55) = AMP(68) + AMP(71) ! used 8 times + TMP_JAMP(54) = AMP(130) + AMP(135) ! used 8 times + TMP_JAMP(53) = AMP(126) + AMP(132) ! used 8 times + TMP_JAMP(52) = AMP(128) + AMP(131) ! used 8 times + TMP_JAMP(51) = AMP(52) + AMP(63) ! used 8 times + TMP_JAMP(50) = AMP(48) + AMP(54) ! used 8 times + TMP_JAMP(49) = AMP(50) + AMP(53) ! used 8 times + TMP_JAMP(48) = AMP(149) + AMP(154) ! used 8 times + TMP_JAMP(47) = AMP(137) - AMP(156) ! used 8 times + TMP_JAMP(46) = AMP(143) - AMP(155) ! used 8 times + TMP_JAMP(45) = AMP(280) - AMP(283) ! used 8 times + TMP_JAMP(44) = AMP(262) - AMP(265) ! used 8 times + TMP_JAMP(43) = AMP(261) + AMP(263) ! used 8 times + TMP_JAMP(42) = AMP(182) - AMP(194) ! used 8 times + TMP_JAMP(41) = AMP(178) + AMP(180) ! used 8 times + TMP_JAMP(40) = AMP(279) + AMP(282) ! used 8 times + TMP_JAMP(39) = AMP(197) + AMP(199) ! used 8 times + TMP_JAMP(38) = AMP(196) + AMP(198) ! used 8 times + TMP_JAMP(37) = AMP(271) - AMP(274) ! used 8 times + TMP_JAMP(36) = AMP(200) - AMP(212) ! used 8 times + TMP_JAMP(35) = AMP(270) + AMP(272) ! used 8 times + TMP_JAMP(34) = AMP(179) + AMP(181) ! used 8 times + TMP_JAMP(33) = AMP(218) - AMP(230) ! used 8 times + TMP_JAMP(32) = AMP(215) + AMP(217) ! used 8 times + TMP_JAMP(31) = AMP(214) + AMP(216) ! used 8 times + TMP_JAMP(140) = TMP_JAMP(82) + AMP(445) ! used 8 times + TMP_JAMP(139) = TMP_JAMP(81) - AMP(440) ! used 8 times + TMP_JAMP(138) = TMP_JAMP(80) - AMP(447) ! used 8 times + TMP_JAMP(137) = TMP_JAMP(75) + AMP(463) ! used 8 times + TMP_JAMP(136) = TMP_JAMP(74) - AMP(465) ! used 8 times + TMP_JAMP(135) = TMP_JAMP(73) - AMP(446) ! used 8 times + TMP_JAMP(134) = TMP_JAMP(68) - AMP(432) ! used 8 times + TMP_JAMP(133) = TMP_JAMP(66) + AMP(454) ! used 8 times + TMP_JAMP(132) = TMP_JAMP(65) - AMP(456) ! used 8 times + TMP_JAMP(131) = TMP_JAMP(62) - AMP(423) ! used 8 times + TMP_JAMP(130) = TMP_JAMP(61) - AMP(464) ! used 8 times + TMP_JAMP(129) = TMP_JAMP(60) - AMP(455) ! used 8 times + TMP_JAMP(128) = TMP_JAMP(45) + AMP(316) ! used 8 times + TMP_JAMP(127) = TMP_JAMP(44) - AMP(318) ! used 8 times + TMP_JAMP(126) = TMP_JAMP(43) + AMP(286) ! used 8 times + TMP_JAMP(125) = TMP_JAMP(42) - AMP(281) ! used 8 times + TMP_JAMP(124) = TMP_JAMP(41) - AMP(288) ! used 8 times + TMP_JAMP(123) = TMP_JAMP(40) + AMP(304) ! used 8 times + TMP_JAMP(122) = TMP_JAMP(39) - AMP(306) ! used 8 times + TMP_JAMP(121) = TMP_JAMP(38) - AMP(287) ! used 8 times + TMP_JAMP(120) = TMP_JAMP(37) - AMP(317) ! used 8 times + TMP_JAMP(119) = TMP_JAMP(36) - AMP(273) ! used 8 times + TMP_JAMP(118) = TMP_JAMP(35) + AMP(295) ! used 8 times + TMP_JAMP(117) = TMP_JAMP(34) - AMP(297) ! used 8 times + TMP_JAMP(116) = TMP_JAMP(33) - AMP(264) ! used 8 times + TMP_JAMP(115) = TMP_JAMP(32) - AMP(305) ! used 8 times + TMP_JAMP(114) = TMP_JAMP(31) - AMP(296) ! used 8 times + TMP_JAMP(312) = TMP_JAMP(140) + TMP_JAMP(138) ! used 4 times + TMP_JAMP(311) = TMP_JAMP(140) - TMP_JAMP(135) ! used 4 times + TMP_JAMP(310) = TMP_JAMP(139) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(352) ! used 4 times + TMP_JAMP(309) = TMP_JAMP(139) - TMP_JAMP(138) ! used 4 times + TMP_JAMP(308) = TMP_JAMP(139) - TMP_JAMP(137) ! used 4 times + TMP_JAMP(307) = TMP_JAMP(139) + TMP_JAMP(132) ! used 4 times + TMP_JAMP(306) = TMP_JAMP(139) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(354) ! used 4 times + TMP_JAMP(305) = TMP_JAMP(138) + TMP_JAMP(135) ! used 4 times + TMP_JAMP(304) = TMP_JAMP(138) + TMP_JAMP(132) ! used 4 times + TMP_JAMP(303) = TMP_JAMP(137) + TMP_JAMP(136) ! used 4 times + TMP_JAMP(302) = TMP_JAMP(137) - TMP_JAMP(84) ! used 4 times + TMP_JAMP(301) = TMP_JAMP(136) + TMP_JAMP(135) ! used 4 times + TMP_JAMP(300) = TMP_JAMP(136) + TMP_JAMP(130) ! used 4 times + TMP_JAMP(299) = TMP_JAMP(134) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(370) ! used 4 times + TMP_JAMP(298) = TMP_JAMP(134) - TMP_JAMP(133) ! used 4 times + TMP_JAMP(297) = TMP_JAMP(134) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(372) ! used 4 times + TMP_JAMP(296) = TMP_JAMP(133) + TMP_JAMP(132) ! used 4 times + TMP_JAMP(295) = TMP_JAMP(133) - TMP_JAMP(129) ! used 4 times + TMP_JAMP(294) = TMP_JAMP(132) + TMP_JAMP(129) ! used 4 times + TMP_JAMP(293) = TMP_JAMP(131) + TMP_JAMP(130) ! used 4 times + TMP_JAMP(292) = TMP_JAMP(131) - TMP_JAMP(129) ! used 4 times + TMP_JAMP(291) = TMP_JAMP(131) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(388) ! used 4 times + TMP_JAMP(290) = TMP_JAMP(130) + TMP_JAMP(129) ! used 4 times + TMP_JAMP(289) = TMP_JAMP(128) + TMP_JAMP(127) ! used 4 times + TMP_JAMP(288) = TMP_JAMP(128) - TMP_JAMP(120) ! used 4 times + TMP_JAMP(287) = TMP_JAMP(128) - TMP_JAMP(123) ! used 4 times + TMP_JAMP(286) = TMP_JAMP(127) + TMP_JAMP(126) ! used 4 times + TMP_JAMP(285) = TMP_JAMP(127) + TMP_JAMP(120) ! used 4 times + TMP_JAMP(284) = TMP_JAMP(126) + TMP_JAMP(124) ! used 4 times + TMP_JAMP(283) = TMP_JAMP(126) - TMP_JAMP(121) ! used 4 times + TMP_JAMP(282) = TMP_JAMP(125) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(195) ! used 4 times + TMP_JAMP(281) = TMP_JAMP(125) - TMP_JAMP(124) ! used 4 times + TMP_JAMP(280) = TMP_JAMP(125) - TMP_JAMP(123) ! used 4 times + TMP_JAMP(279) = TMP_JAMP(125) + TMP_JAMP(117) ! used 4 times + TMP_JAMP(278) = TMP_JAMP(125) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(193) ! used 4 times + TMP_JAMP(277) = TMP_JAMP(124) + TMP_JAMP(121) ! used 4 times + TMP_JAMP(276) = TMP_JAMP(124) + TMP_JAMP(117) ! used 4 times + TMP_JAMP(275) = TMP_JAMP(123) + TMP_JAMP(122) ! used 4 times + TMP_JAMP(274) = TMP_JAMP(123) - TMP_JAMP(115) ! used 4 times + TMP_JAMP(273) = TMP_JAMP(122) + TMP_JAMP(121) ! used 4 times + TMP_JAMP(272) = TMP_JAMP(122) + TMP_JAMP(115) ! used 4 times + TMP_JAMP(271) = TMP_JAMP(120) + TMP_JAMP(118) ! used 4 times + TMP_JAMP(270) = TMP_JAMP(119) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(213) ! used 4 times + TMP_JAMP(269) = TMP_JAMP(119) - TMP_JAMP(118) ! used 4 times + TMP_JAMP(268) = TMP_JAMP(119) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(211) ! used 4 times + TMP_JAMP(267) = TMP_JAMP(118) + TMP_JAMP(117) ! used 4 times + TMP_JAMP(266) = TMP_JAMP(118) - TMP_JAMP(114) ! used 4 times + TMP_JAMP(265) = TMP_JAMP(117) + TMP_JAMP(114) ! used 4 times + TMP_JAMP(264) = TMP_JAMP(116) + TMP_JAMP(115) ! used 4 times + TMP_JAMP(263) = TMP_JAMP(116) - TMP_JAMP(114) ! used 4 times + TMP_JAMP(262) = TMP_JAMP(116) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(231) ! used 4 times + TMP_JAMP(261) = TMP_JAMP(115) + TMP_JAMP(114) ! used 4 times + TMP_JAMP(260) = TMP_JAMP(112) - TMP_JAMP(91) ! used 4 times + TMP_JAMP(259) = TMP_JAMP(112) - TMP_JAMP(99) ! used 4 times + TMP_JAMP(258) = TMP_JAMP(109) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(67) ! used 4 times + TMP_JAMP(257) = TMP_JAMP(109) + TMP_JAMP(107) ! used 4 times + TMP_JAMP(256) = TMP_JAMP(108) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(54) ! used 4 times + TMP_JAMP(255) = TMP_JAMP(107) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(54) ! used 4 times + TMP_JAMP(254) = TMP_JAMP(102) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(51) ! used 4 times + TMP_JAMP(253) = TMP_JAMP(101) - TMP_JAMP(91) ! used 4 times + TMP_JAMP(252) = TMP_JAMP(97) + TMP_JAMP(26) ! used 4 times + TMP_JAMP(251) = TMP_JAMP(97) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(71) ! used 4 times + TMP_JAMP(250) = TMP_JAMP(91) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(64) ! used 4 times + TMP_JAMP(249) = TMP_JAMP(91) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(56) ! used 4 times + TMP_JAMP(248) = TMP_JAMP(86) + AMP(134) ! used 4 times + TMP_JAMP(247) = TMP_JAMP(85) + TMP_JAMP(25) ! used 4 times + TMP_JAMP(246) = TMP_JAMP(85) + TMP_JAMP(23) ! used 4 times + TMP_JAMP(245) = TMP_JAMP(85) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(58) ! used 4 times + TMP_JAMP(244) = TMP_JAMP(84) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(437) ! used 4 times + TMP_JAMP(243) = TMP_JAMP(84) + TMP_JAMP(83) ! used 4 times + TMP_JAMP(242) = TMP_JAMP(84) - TMP_JAMP(69) ! used 4 times + TMP_JAMP(241) = TMP_JAMP(83) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(419) ! used 4 times + TMP_JAMP(240) = TMP_JAMP(83) + TMP_JAMP(69) ! used 4 times + TMP_JAMP(239) = TMP_JAMP(79) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(437) ! used 4 times + TMP_JAMP(238) = TMP_JAMP(79) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(150) ! used 4 times + TMP_JAMP(237) = TMP_JAMP(79) - TMP_JAMP(67) ! used 4 times + TMP_JAMP(236) = TMP_JAMP(78) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(419) ! used 4 times + TMP_JAMP(235) = TMP_JAMP(78) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(98) ! used 4 times + TMP_JAMP(234) = TMP_JAMP(78) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(138) ! used 4 times + TMP_JAMP(233) = TMP_JAMP(77) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(98) ! used 4 times + TMP_JAMP(232) = TMP_JAMP(77) - TMP_JAMP(76) ! used 4 times + TMP_JAMP(231) = TMP_JAMP(77) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(28) ! used 4 times + TMP_JAMP(230) = TMP_JAMP(76) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(85) ! used 4 times + TMP_JAMP(229) = TMP_JAMP(76) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(96) ! used 4 times + TMP_JAMP(228) = TMP_JAMP(72) - TMP_JAMP(71) ! used 4 times + TMP_JAMP(227) = TMP_JAMP(72) + TMP_JAMP(59) ! used 4 times + TMP_JAMP(226) = TMP_JAMP(71) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(103) ! used 4 times + TMP_JAMP(225) = TMP_JAMP(70) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(93) ! used 4 times + TMP_JAMP(224) = TMP_JAMP(70) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(87) ! used 4 times + TMP_JAMP(223) = TMP_JAMP(69) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(428) ! used 4 times + TMP_JAMP(222) = TMP_JAMP(67) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(428) ! used 4 times + TMP_JAMP(221) = TMP_JAMP(67) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(144) ! used 4 times + TMP_JAMP(220) = TMP_JAMP(64) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(122) ! used 4 times + TMP_JAMP(219) = TMP_JAMP(64) + TMP_JAMP(58) ! used 4 times + TMP_JAMP(218) = TMP_JAMP(63) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(96) ! used 4 times + TMP_JAMP(217) = TMP_JAMP(63) + TMP_JAMP(58) ! used 4 times + TMP_JAMP(216) = TMP_JAMP(63) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(115) ! used 4 times + TMP_JAMP(215) = TMP_JAMP(59) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(105) ! used 4 times + TMP_JAMP(214) = TMP_JAMP(58) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(117) ! used 4 times + TMP_JAMP(213) = TMP_JAMP(57) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(80) ! used 4 times + TMP_JAMP(212) = TMP_JAMP(57) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(79) ! used 4 times + TMP_JAMP(211) = TMP_JAMP(56) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(67) ! used 4 times + TMP_JAMP(210) = TMP_JAMP(55) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(75) ! used 4 times + TMP_JAMP(209) = TMP_JAMP(55) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(69) ! used 4 times + TMP_JAMP(208) = TMP_JAMP(54) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(134) ! used 4 times + TMP_JAMP(207) = TMP_JAMP(54) + TMP_JAMP(52) ! used 4 times + TMP_JAMP(206) = TMP_JAMP(53) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(78) ! used 4 times + TMP_JAMP(205) = TMP_JAMP(53) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(127) ! used 4 times + TMP_JAMP(204) = TMP_JAMP(52) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(129) ! used 4 times + TMP_JAMP(203) = TMP_JAMP(51) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(62) ! used 4 times + TMP_JAMP(202) = TMP_JAMP(50) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(49) ! used 4 times + TMP_JAMP(201) = TMP_JAMP(50) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(60) ! used 4 times + TMP_JAMP(200) = TMP_JAMP(49) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(57) ! used 4 times + TMP_JAMP(199) = TMP_JAMP(49) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(51) ! used 4 times + TMP_JAMP(198) = TMP_JAMP(48) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(109) ! used 4 times + TMP_JAMP(197) = TMP_JAMP(48) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(148) ! used 4 times + TMP_JAMP(196) = TMP_JAMP(47) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(29) ! used 4 times + TMP_JAMP(195) = TMP_JAMP(47) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(133) ! used 4 times + TMP_JAMP(194) = TMP_JAMP(46) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(121) ! used 4 times + TMP_JAMP(193) = TMP_JAMP(46) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(142) ! used 4 times + TMP_JAMP(192) = TMP_JAMP(28) - AMP(97) ! used 4 times + TMP_JAMP(191) = TMP_JAMP(25) - AMP(61) ! used 4 times + TMP_JAMP(190) = AMP(416) + AMP(451) ! used 4 times + TMP_JAMP(189) = AMP(350) - AMP(453) ! used 4 times + TMP_JAMP(188) = AMP(85) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(152) ! used 4 times + TMP_JAMP(187) = AMP(443) + AMP(466) ! used 4 times + TMP_JAMP(186) = AMP(368) - AMP(452) ! used 4 times + TMP_JAMP(185) = AMP(361) - AMP(468) ! used 4 times + TMP_JAMP(184) = AMP(110) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(152) ! used 4 times + TMP_JAMP(183) = AMP(434) + AMP(457) ! used 4 times + TMP_JAMP(182) = AMP(343) - AMP(459) ! used 4 times + TMP_JAMP(181) = AMP(379) - AMP(467) ! used 4 times + TMP_JAMP(180) = AMP(381) - AMP(458) ! used 4 times + TMP_JAMP(179) = AMP(97) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(141) ! used 4 times + TMP_JAMP(178) = AMP(117) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(141) ! used 4 times + TMP_JAMP(177) = AMP(407) + AMP(460) ! used 4 times + TMP_JAMP(176) = AMP(347) - AMP(462) ! used 4 times + TMP_JAMP(175) = AMP(386) - AMP(461) ! used 4 times + TMP_JAMP(174) = AMP(425) + AMP(448) ! used 4 times + TMP_JAMP(173) = AMP(345) - AMP(450) ! used 4 times + TMP_JAMP(172) = AMP(363) - AMP(449) ! used 4 times + TMP_JAMP(171) = AMP(398) + AMP(469) ! used 4 times + TMP_JAMP(170) = AMP(365) - AMP(471) ! used 4 times + TMP_JAMP(169) = AMP(383) - AMP(470) ! used 4 times + TMP_JAMP(168) = AMP(331) + AMP(334) ! used 4 times + TMP_JAMP(167) = AMP(325) - AMP(336) ! used 4 times + TMP_JAMP(166) = AMP(328) - AMP(335) ! used 4 times + TMP_JAMP(165) = AMP(136) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(141) ! used 4 times + TMP_JAMP(164) = AMP(266) + AMP(289) ! used 4 times + TMP_JAMP(163) = AMP(186) - AMP(291) ! used 4 times + TMP_JAMP(162) = AMP(172) + AMP(175) ! used 4 times + TMP_JAMP(161) = AMP(166) - AMP(177) ! used 4 times + TMP_JAMP(160) = AMP(239) + AMP(310) ! used 4 times + TMP_JAMP(159) = AMP(206) - AMP(312) ! used 4 times + TMP_JAMP(158) = AMP(204) - AMP(290) ! used 4 times + TMP_JAMP(157) = AMP(169) - AMP(176) ! used 4 times + TMP_JAMP(156) = AMP(248) + AMP(301) ! used 4 times + TMP_JAMP(155) = AMP(188) - AMP(303) ! used 4 times + TMP_JAMP(154) = AMP(224) - AMP(311) ! used 4 times + TMP_JAMP(153) = AMP(227) - AMP(302) ! used 4 times + TMP_JAMP(152) = AMP(275) + AMP(298) ! used 4 times + TMP_JAMP(151) = AMP(184) - AMP(300) ! used 4 times + TMP_JAMP(150) = AMP(222) - AMP(299) ! used 4 times + TMP_JAMP(149) = AMP(257) + AMP(292) ! used 4 times + TMP_JAMP(148) = AMP(191) - AMP(294) ! used 4 times + TMP_JAMP(147) = AMP(209) - AMP(293) ! used 4 times + TMP_JAMP(146) = AMP(284) + AMP(307) ! used 4 times + TMP_JAMP(145) = AMP(202) - AMP(309) ! used 4 times + TMP_JAMP(144) = AMP(220) - AMP(308) ! used 4 times + TMP_JAMP(143) = AMP(278) + AMP(313) ! used 4 times + TMP_JAMP(142) = AMP(260) - AMP(315) ! used 4 times + TMP_JAMP(141) = AMP(269) - AMP(314) ! used 4 times + TMP_JAMP(324) = TMP_JAMP(254) - TMP_JAMP(191) ! used 4 times + TMP_JAMP(323) = TMP_JAMP(234) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(86) ! used 4 times + TMP_JAMP(322) = TMP_JAMP(224) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(94) ! used 4 times + TMP_JAMP(321) = TMP_JAMP(221) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(94) ! used 4 times + TMP_JAMP(320) = TMP_JAMP(215) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(88) ! used 4 times + TMP_JAMP(319) = TMP_JAMP(212) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(92) ! used 4 times + TMP_JAMP(318) = TMP_JAMP(209) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(86) ! used 4 times + TMP_JAMP(317) = TMP_JAMP(204) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(92) ! used 4 times + TMP_JAMP(316) = TMP_JAMP(198) - TMP_JAMP(72) ! used 4 times + TMP_JAMP(315) = TMP_JAMP(197) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(102) ! used 4 times + TMP_JAMP(314) = TMP_JAMP(196) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(165) ! used 4 times + TMP_JAMP(313) = TMP_JAMP(193) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(92) ! used 4 times + TMP_JAMP(325) = TMP_JAMP(190) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(140) ! used 3 times + TMP_JAMP(531) = TMP_JAMP(325) + TMP_JAMP(189) ! used 2 times + TMP_JAMP(530) = TMP_JAMP(325) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(417) ! used 2 times + TMP_JAMP(529) = TMP_JAMP(324) - TMP_JAMP(245) ! used 2 times + TMP_JAMP(528) = TMP_JAMP(324) + TMP_JAMP(252) ! used 2 times + TMP_JAMP(527) = TMP_JAMP(322) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(253) ! used 2 times + TMP_JAMP(526) = TMP_JAMP(321) + TMP_JAMP(299) ! used 2 times + TMP_JAMP(525) = TMP_JAMP(321) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(259) ! used 2 times + TMP_JAMP(524) = TMP_JAMP(320) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(251) ! used 2 times + TMP_JAMP(523) = TMP_JAMP(320) - TMP_JAMP(314) ! used 2 times + TMP_JAMP(522) = TMP_JAMP(318) + TMP_JAMP(234) ! used 2 times + TMP_JAMP(521) = TMP_JAMP(317) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(249) ! used 2 times + TMP_JAMP(520) = TMP_JAMP(316) + TMP_JAMP(314) ! used 2 times + TMP_JAMP(519) = TMP_JAMP(316) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(160) ! used 2 times + TMP_JAMP(518) = TMP_JAMP(315) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(250) ! used 2 times + TMP_JAMP(517) = TMP_JAMP(315) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(256) ! used 2 times + TMP_JAMP(516) = TMP_JAMP(315) - TMP_JAMP(278) ! used 2 times + TMP_JAMP(515) = TMP_JAMP(314) + TMP_JAMP(214) ! used 2 times + TMP_JAMP(514) = TMP_JAMP(313) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(259) ! used 2 times + TMP_JAMP(513) = TMP_JAMP(313) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(255) ! used 2 times + TMP_JAMP(512) = TMP_JAMP(313) + TMP_JAMP(268) ! used 2 times + TMP_JAMP(511) = TMP_JAMP(312) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(174) ! used 2 times + TMP_JAMP(510) = TMP_JAMP(311) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(174) ! used 2 times + TMP_JAMP(509) = TMP_JAMP(306) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(171) ! used 2 times + TMP_JAMP(508) = TMP_JAMP(305) + TMP_JAMP(296) ! used 2 times + TMP_JAMP(507) = TMP_JAMP(302) - TMP_JAMP(239) ! used 2 times + TMP_JAMP(506) = TMP_JAMP(301) + TMP_JAMP(138) ! used 2 times + TMP_JAMP(505) = TMP_JAMP(296) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(176) ! used 2 times + TMP_JAMP(504) = TMP_JAMP(296) - TMP_JAMP(242) ! used 2 times + TMP_JAMP(503) = TMP_JAMP(293) - AMP(378) ! used 2 times + TMP_JAMP(502) = TMP_JAMP(291) + AMP(418) ! used 2 times + TMP_JAMP(501) = TMP_JAMP(291) - AMP(426) ! used 2 times + TMP_JAMP(500) = TMP_JAMP(290) + TMP_JAMP(136) ! used 2 times + TMP_JAMP(499) = TMP_JAMP(290) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(180) ! used 2 times + TMP_JAMP(498) = TMP_JAMP(288) - TMP_JAMP(267) ! used 2 times + TMP_JAMP(497) = TMP_JAMP(288) - TMP_JAMP(275) ! used 2 times + TMP_JAMP(496) = TMP_JAMP(285) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(157) ! used 2 times + TMP_JAMP(495) = TMP_JAMP(285) + TMP_JAMP(283) ! used 2 times + TMP_JAMP(494) = TMP_JAMP(278) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(146) ! used 2 times + TMP_JAMP(493) = TMP_JAMP(277) + TMP_JAMP(267) ! used 2 times + TMP_JAMP(492) = TMP_JAMP(273) + TMP_JAMP(124) ! used 2 times + TMP_JAMP(491) = TMP_JAMP(267) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(151) ! used 2 times + TMP_JAMP(490) = TMP_JAMP(262) - AMP(258) ! used 2 times + TMP_JAMP(489) = TMP_JAMP(261) - TMP_JAMP(123) ! used 2 times + TMP_JAMP(488) = TMP_JAMP(261) + TMP_JAMP(122) ! used 2 times + TMP_JAMP(487) = TMP_JAMP(261) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(153) ! used 2 times + TMP_JAMP(486) = TMP_JAMP(257) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(233) ! used 2 times + TMP_JAMP(485) = TMP_JAMP(256) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(205) ! used 2 times + TMP_JAMP(484) = TMP_JAMP(255) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(204) ! used 2 times + TMP_JAMP(483) = TMP_JAMP(250) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(216) ! used 2 times + TMP_JAMP(482) = TMP_JAMP(246) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(226) ! used 2 times + TMP_JAMP(481) = TMP_JAMP(246) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(219) ! used 2 times + TMP_JAMP(480) = TMP_JAMP(240) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(167) ! used 2 times + TMP_JAMP(479) = TMP_JAMP(239) - TMP_JAMP(203) ! used 2 times + TMP_JAMP(478) = TMP_JAMP(238) - AMP(436) ! used 2 times + TMP_JAMP(477) = TMP_JAMP(238) + TMP_JAMP(235) ! used 2 times + TMP_JAMP(476) = TMP_JAMP(234) + TMP_JAMP(213) ! used 2 times + TMP_JAMP(475) = TMP_JAMP(232) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(188) ! used 2 times + TMP_JAMP(474) = TMP_JAMP(231) + TMP_JAMP(225) ! used 2 times + TMP_JAMP(473) = TMP_JAMP(230) + TMP_JAMP(228) ! used 2 times + TMP_JAMP(472) = TMP_JAMP(229) - TMP_JAMP(217) ! used 2 times + TMP_JAMP(471) = TMP_JAMP(227) - TMP_JAMP(211) ! used 2 times + TMP_JAMP(470) = TMP_JAMP(226) + AMP(101) ! used 2 times + TMP_JAMP(469) = TMP_JAMP(225) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(184) ! used 2 times + TMP_JAMP(468) = TMP_JAMP(224) + AMP(82) ! used 2 times + TMP_JAMP(467) = TMP_JAMP(223) + AMP(427) ! used 2 times + TMP_JAMP(466) = TMP_JAMP(222) + TMP_JAMP(213) ! used 2 times + TMP_JAMP(465) = TMP_JAMP(220) - TMP_JAMP(218) ! used 2 times + TMP_JAMP(464) = TMP_JAMP(216) - TMP_JAMP(200) ! used 2 times + TMP_JAMP(463) = TMP_JAMP(216) - TMP_JAMP(194) ! used 2 times + TMP_JAMP(462) = TMP_JAMP(214) + TMP_JAMP(194) ! used 2 times + TMP_JAMP(461) = TMP_JAMP(213) - TMP_JAMP(211) ! used 2 times + TMP_JAMP(460) = TMP_JAMP(212) + TMP_JAMP(206) ! used 2 times + TMP_JAMP(459) = TMP_JAMP(210) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(184) ! used 2 times + TMP_JAMP(458) = TMP_JAMP(210) - TMP_JAMP(59) ! used 2 times + TMP_JAMP(457) = TMP_JAMP(208) - TMP_JAMP(206) ! used 2 times + TMP_JAMP(456) = TMP_JAMP(207) - TMP_JAMP(201) ! used 2 times + TMP_JAMP(455) = TMP_JAMP(205) - TMP_JAMP(201) ! used 2 times + TMP_JAMP(454) = TMP_JAMP(205) - TMP_JAMP(195) ! used 2 times + TMP_JAMP(453) = TMP_JAMP(204) + TMP_JAMP(195) ! used 2 times + TMP_JAMP(452) = TMP_JAMP(203) - AMP(397) ! used 2 times + TMP_JAMP(451) = TMP_JAMP(203) - TMP_JAMP(79) ! used 2 times + TMP_JAMP(450) = TMP_JAMP(202) + AMP(47) ! used 2 times + TMP_JAMP(449) = TMP_JAMP(202) + TMP_JAMP(200) ! used 2 times + TMP_JAMP(448) = TMP_JAMP(199) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(113) ! used 2 times + TMP_JAMP(447) = TMP_JAMP(199) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(107) ! used 2 times + TMP_JAMP(446) = TMP_JAMP(195) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(149) ! used 2 times + TMP_JAMP(445) = TMP_JAMP(194) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(156) ! used 2 times + TMP_JAMP(444) = TMP_JAMP(192) + TMP_JAMP(178) ! used 2 times + TMP_JAMP(443) = TMP_JAMP(189) + TMP_JAMP(186) ! used 2 times + TMP_JAMP(442) = TMP_JAMP(189) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(351) ! used 2 times + TMP_JAMP(441) = TMP_JAMP(187) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(332) ! used 2 times + TMP_JAMP(440) = TMP_JAMP(186) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(369) ! used 2 times + TMP_JAMP(439) = TMP_JAMP(186) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(367) ! used 2 times + TMP_JAMP(438) = TMP_JAMP(185) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(369) ! used 2 times + TMP_JAMP(437) = TMP_JAMP(185) + TMP_JAMP(181) ! used 2 times + TMP_JAMP(436) = TMP_JAMP(185) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(360) ! used 2 times + TMP_JAMP(435) = TMP_JAMP(183) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(435) ! used 2 times + TMP_JAMP(434) = TMP_JAMP(183) - TMP_JAMP(180) ! used 2 times + TMP_JAMP(433) = TMP_JAMP(182) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(351) ! used 2 times + TMP_JAMP(432) = TMP_JAMP(182) + TMP_JAMP(180) ! used 2 times + TMP_JAMP(431) = TMP_JAMP(182) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(342) ! used 2 times + TMP_JAMP(430) = TMP_JAMP(181) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(137) ! used 2 times + TMP_JAMP(429) = TMP_JAMP(180) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(380) ! used 2 times + TMP_JAMP(428) = TMP_JAMP(179) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(91) ! used 2 times + TMP_JAMP(427) = TMP_JAMP(177) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(406) ! used 2 times + TMP_JAMP(426) = TMP_JAMP(177) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(408) ! used 2 times + TMP_JAMP(425) = TMP_JAMP(176) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(346) ! used 2 times + TMP_JAMP(424) = TMP_JAMP(175) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(387) ! used 2 times + TMP_JAMP(423) = TMP_JAMP(175) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(385) ! used 2 times + TMP_JAMP(422) = TMP_JAMP(174) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(426) ! used 2 times + TMP_JAMP(421) = TMP_JAMP(174) - TMP_JAMP(172) ! used 2 times + TMP_JAMP(420) = TMP_JAMP(173) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(348) ! used 2 times + TMP_JAMP(419) = TMP_JAMP(173) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(344) ! used 2 times + TMP_JAMP(418) = TMP_JAMP(172) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(362) ! used 2 times + TMP_JAMP(417) = TMP_JAMP(171) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(397) ! used 2 times + TMP_JAMP(416) = TMP_JAMP(171) + TMP_JAMP(170) ! used 2 times + TMP_JAMP(415) = TMP_JAMP(170) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(366) ! used 2 times + TMP_JAMP(414) = TMP_JAMP(169) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(384) ! used 2 times + TMP_JAMP(413) = TMP_JAMP(169) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(382) ! used 2 times + TMP_JAMP(412) = TMP_JAMP(168) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(332) ! used 2 times + TMP_JAMP(411) = TMP_JAMP(168) + TMP_JAMP(167) ! used 2 times + TMP_JAMP(410) = TMP_JAMP(168) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(333) ! used 2 times + TMP_JAMP(409) = TMP_JAMP(167) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(327) ! used 2 times + TMP_JAMP(408) = TMP_JAMP(166) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(330) ! used 2 times + TMP_JAMP(407) = TMP_JAMP(166) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(329) ! used 2 times + TMP_JAMP(406) = TMP_JAMP(164) + TMP_JAMP(163) ! used 2 times + TMP_JAMP(405) = TMP_JAMP(163) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(185) ! used 2 times + TMP_JAMP(404) = TMP_JAMP(163) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(189) ! used 2 times + TMP_JAMP(403) = TMP_JAMP(162) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(174) ! used 2 times + TMP_JAMP(402) = TMP_JAMP(162) - TMP_JAMP(157) ! used 2 times + TMP_JAMP(401) = TMP_JAMP(161) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(168) ! used 2 times + TMP_JAMP(400) = TMP_JAMP(161) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(167) ! used 2 times + TMP_JAMP(399) = TMP_JAMP(160) + TMP_JAMP(159) ! used 2 times + TMP_JAMP(398) = TMP_JAMP(160) - TMP_JAMP(154) ! used 2 times + TMP_JAMP(397) = TMP_JAMP(159) + TMP_JAMP(154) ! used 2 times + TMP_JAMP(396) = TMP_JAMP(159) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(205) ! used 2 times + TMP_JAMP(395) = TMP_JAMP(158) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(207) ! used 2 times + TMP_JAMP(394) = TMP_JAMP(158) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(203) ! used 2 times + TMP_JAMP(393) = TMP_JAMP(157) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(170) ! used 2 times + TMP_JAMP(392) = TMP_JAMP(156) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(249) ! used 2 times + TMP_JAMP(391) = TMP_JAMP(156) - TMP_JAMP(153) ! used 2 times + TMP_JAMP(390) = TMP_JAMP(155) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(189) ! used 2 times + TMP_JAMP(389) = TMP_JAMP(155) + TMP_JAMP(153) ! used 2 times + TMP_JAMP(388) = TMP_JAMP(155) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(187) ! used 2 times + TMP_JAMP(387) = TMP_JAMP(154) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(223) ! used 2 times + TMP_JAMP(386) = TMP_JAMP(153) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(226) ! used 2 times + TMP_JAMP(385) = TMP_JAMP(152) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(171) ! used 2 times + TMP_JAMP(384) = TMP_JAMP(152) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(276) ! used 2 times + TMP_JAMP(383) = TMP_JAMP(151) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(183) ! used 2 times + TMP_JAMP(382) = TMP_JAMP(150) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(225) ! used 2 times + TMP_JAMP(381) = TMP_JAMP(150) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(221) ! used 2 times + TMP_JAMP(380) = TMP_JAMP(149) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(258) ! used 2 times + TMP_JAMP(379) = TMP_JAMP(149) - TMP_JAMP(147) ! used 2 times + TMP_JAMP(378) = TMP_JAMP(148) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(192) ! used 2 times + TMP_JAMP(377) = TMP_JAMP(148) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(190) ! used 2 times + TMP_JAMP(376) = TMP_JAMP(147) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(208) ! used 2 times + TMP_JAMP(375) = TMP_JAMP(146) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(173) ! used 2 times + TMP_JAMP(374) = TMP_JAMP(145) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(201) ! used 2 times + TMP_JAMP(373) = TMP_JAMP(145) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(210) ! used 2 times + TMP_JAMP(372) = TMP_JAMP(144) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(228) ! used 2 times + TMP_JAMP(371) = TMP_JAMP(144) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(219) ! used 2 times + TMP_JAMP(370) = TMP_JAMP(143) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(238) ! used 2 times + TMP_JAMP(369) = TMP_JAMP(143) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(277) ! used 2 times + TMP_JAMP(368) = TMP_JAMP(142) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(127) ! used 2 times + TMP_JAMP(367) = TMP_JAMP(142) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(256) ! used 2 times + TMP_JAMP(366) = TMP_JAMP(141) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(247) ! used 2 times + TMP_JAMP(365) = TMP_JAMP(141) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(268) ! used 2 times + TMP_JAMP(364) = TMP_JAMP(137) + AMP(399) ! used 2 times + TMP_JAMP(363) = TMP_JAMP(136) - AMP(364) ! used 2 times + TMP_JAMP(362) = TMP_JAMP(126) + AMP(267) ! used 2 times + TMP_JAMP(361) = TMP_JAMP(123) + AMP(285) ! used 2 times + TMP_JAMP(360) = TMP_JAMP(113) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(125) ! used 2 times + TMP_JAMP(359) = TMP_JAMP(112) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(113) ! used 2 times + TMP_JAMP(358) = TMP_JAMP(111) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(100) ! used 2 times + TMP_JAMP(357) = TMP_JAMP(110) - TMP_JAMP(105) ! used 2 times + TMP_JAMP(356) = TMP_JAMP(109) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(124) ! used 2 times + TMP_JAMP(355) = TMP_JAMP(108) - TMP_JAMP(89) ! used 2 times + TMP_JAMP(354) = TMP_JAMP(106) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(65) ! used 2 times + TMP_JAMP(353) = TMP_JAMP(104) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(92) ! used 2 times + TMP_JAMP(352) = TMP_JAMP(103) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(74) ! used 2 times + TMP_JAMP(351) = TMP_JAMP(101) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(76) ! used 2 times + TMP_JAMP(350) = TMP_JAMP(100) + TMP_JAMP(87) ! used 2 times + TMP_JAMP(349) = TMP_JAMP(98) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(46) ! used 2 times + TMP_JAMP(348) = TMP_JAMP(96) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(59) ! used 2 times + TMP_JAMP(347) = TMP_JAMP(95) + TMP_JAMP(87) ! used 2 times + TMP_JAMP(346) = TMP_JAMP(93) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(146) ! used 2 times + TMP_JAMP(345) = TMP_JAMP(90) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(64) ! used 2 times + TMP_JAMP(344) = TMP_JAMP(77) - AMP(94) ! used 2 times + TMP_JAMP(343) = TMP_JAMP(76) - AMP(95) ! used 2 times + TMP_JAMP(342) = TMP_JAMP(64) + AMP(112) ! used 2 times + TMP_JAMP(341) = TMP_JAMP(56) - AMP(77) ! used 2 times + TMP_JAMP(340) = TMP_JAMP(52) - AMP(58) ! used 2 times + TMP_JAMP(339) = TMP_JAMP(30) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(83) ! used 2 times + TMP_JAMP(338) = TMP_JAMP(20) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(73) ! used 2 times + TMP_JAMP(337) = TMP_JAMP(19) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(55) ! used 2 times + TMP_JAMP(336) = AMP(349) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(352) ! used 2 times + TMP_JAMP(335) = AMP(352) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(444) ! used 2 times + TMP_JAMP(334) = AMP(378) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(390) ! used 2 times + TMP_JAMP(333) = AMP(380) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(390) ! used 2 times + TMP_JAMP(332) = AMP(56) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(122) ! used 2 times + TMP_JAMP(331) = AMP(326) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(390) ! used 2 times + TMP_JAMP(330) = AMP(185) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(195) ! used 2 times + TMP_JAMP(329) = AMP(195) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(240) ! used 2 times + TMP_JAMP(328) = AMP(223) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(229) ! used 2 times + TMP_JAMP(327) = AMP(226) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(229) ! used 2 times + TMP_JAMP(326) = AMP(229) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(259) ! used 2 times + TMP_JAMP(578) = TMP_JAMP(525) - TMP_JAMP(450) ! used 2 times + TMP_JAMP(577) = TMP_JAMP(519) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(370) ! used 2 times + TMP_JAMP(576) = TMP_JAMP(516) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(369) ! used 2 times + TMP_JAMP(575) = TMP_JAMP(512) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(365) ! used 2 times + TMP_JAMP(574) = TMP_JAMP(509) - TMP_JAMP(364) ! used 2 times + TMP_JAMP(573) = TMP_JAMP(494) - TMP_JAMP(361) ! used 2 times + TMP_JAMP(572) = TMP_JAMP(486) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(468) ! used 2 times + TMP_JAMP(571) = TMP_JAMP(482) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(458) ! used 2 times + TMP_JAMP(570) = TMP_JAMP(481) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(449) ! used 2 times + TMP_JAMP(569) = TMP_JAMP(477) + TMP_JAMP(475) ! used 2 times + TMP_JAMP(568) = TMP_JAMP(474) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(428) ! used 2 times + TMP_JAMP(567) = TMP_JAMP(473) + TMP_JAMP(469) ! used 2 times + TMP_JAMP(566) = TMP_JAMP(472) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(444) ! used 2 times + TMP_JAMP(565) = TMP_JAMP(471) - TMP_JAMP(459) ! used 2 times + TMP_JAMP(564) = TMP_JAMP(465) + TMP_JAMP(343) ! used 2 times + TMP_JAMP(563) = TMP_JAMP(464) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(337) ! used 2 times + TMP_JAMP(562) = TMP_JAMP(460) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(351) ! used 2 times + TMP_JAMP(561) = TMP_JAMP(457) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(355) ! used 2 times + TMP_JAMP(560) = TMP_JAMP(456) - TMP_JAMP(447) ! used 2 times + TMP_JAMP(559) = TMP_JAMP(455) + TMP_JAMP(340) ! used 2 times + TMP_JAMP(558) = TMP_JAMP(446) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(367) ! used 2 times + TMP_JAMP(557) = TMP_JAMP(445) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(366) ! used 2 times + TMP_JAMP(556) = TMP_JAMP(426) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(297) ! used 2 times + TMP_JAMP(555) = TMP_JAMP(418) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(297) ! used 2 times + TMP_JAMP(554) = TMP_JAMP(410) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(306) ! used 2 times + TMP_JAMP(553) = TMP_JAMP(408) + TMP_JAMP(183) ! used 2 times + TMP_JAMP(552) = TMP_JAMP(407) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(297) ! used 2 times + TMP_JAMP(551) = TMP_JAMP(400) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(262) ! used 2 times + TMP_JAMP(550) = TMP_JAMP(394) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(270) ! used 2 times + TMP_JAMP(549) = TMP_JAMP(393) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(270) ! used 2 times + TMP_JAMP(548) = TMP_JAMP(384) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(268) ! used 2 times + TMP_JAMP(547) = TMP_JAMP(381) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(262) ! used 2 times + TMP_JAMP(546) = TMP_JAMP(375) - TMP_JAMP(162) ! used 2 times + TMP_JAMP(545) = TMP_JAMP(368) - TMP_JAMP(326) ! used 2 times + TMP_JAMP(544) = TMP_JAMP(362) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(164) ! used 2 times + TMP_JAMP(543) = TMP_JAMP(357) + TMP_JAMP(339) ! used 2 times + TMP_JAMP(542) = TMP_JAMP(354) - TMP_JAMP(260) ! used 2 times + TMP_JAMP(541) = TMP_JAMP(353) + TMP_JAMP(252) ! used 2 times + TMP_JAMP(540) = TMP_JAMP(352) - TMP_JAMP(247) ! used 2 times + TMP_JAMP(539) = TMP_JAMP(350) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(344) ! used 2 times + TMP_JAMP(538) = TMP_JAMP(349) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(323) ! used 2 times + TMP_JAMP(537) = TMP_JAMP(348) - TMP_JAMP(248) ! used 2 times + TMP_JAMP(536) = TMP_JAMP(347) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(342) ! used 2 times + TMP_JAMP(535) = TMP_JAMP(346) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(332) ! used 2 times + TMP_JAMP(534) = TMP_JAMP(341) + TMP_JAMP(318) ! used 2 times + TMP_JAMP(533) = TMP_JAMP(338) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(319) ! used 2 times + TMP_JAMP(532) = TMP_JAMP(335) - TMP_JAMP(187) ! used 2 times + TMP_JAMP(593) = TMP_JAMP(571) + TMP_JAMP(533) ! used 2 times + TMP_JAMP(592) = TMP_JAMP(570) - TMP_JAMP(535) ! used 2 times + TMP_JAMP(591) = TMP_JAMP(569) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(543) ! used 2 times + TMP_JAMP(590) = TMP_JAMP(568) - TMP_JAMP(524) ! used 2 times + TMP_JAMP(589) = TMP_JAMP(567) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(541) ! used 2 times + TMP_JAMP(588) = TMP_JAMP(566) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(539) ! used 2 times + TMP_JAMP(587) = TMP_JAMP(565) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(540) ! used 2 times + TMP_JAMP(586) = TMP_JAMP(564) + TMP_JAMP(527) ! used 2 times + TMP_JAMP(585) = TMP_JAMP(563) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(529) ! used 2 times + TMP_JAMP(584) = TMP_JAMP(562) + TMP_JAMP(521) ! used 2 times + TMP_JAMP(583) = TMP_JAMP(561) + TMP_JAMP(534) ! used 2 times + TMP_JAMP(582) = TMP_JAMP(560) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(537) ! used 2 times + TMP_JAMP(581) = TMP_JAMP(559) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(528) ! used 2 times + TMP_JAMP(580) = TMP_JAMP(542) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(461) ! used 2 times + TMP_JAMP(579) = TMP_JAMP(538) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(448) ! used 2 times + TMP_JAMP(638) = AMP(571) + AMP(576) ! used 16 times + TMP_JAMP(637) = AMP(556) - AMP(559) ! used 16 times + TMP_JAMP(636) = AMP(555) + AMP(557) ! used 16 times + TMP_JAMP(635) = AMP(554) - AMP(574) ! used 16 times + TMP_JAMP(634) = AMP(551) + AMP(553) ! used 16 times + TMP_JAMP(633) = AMP(575) + AMP(578) ! used 16 times + TMP_JAMP(632) = AMP(521) + AMP(524) ! used 16 times + TMP_JAMP(631) = AMP(520) + AMP(523) ! used 16 times + TMP_JAMP(630) = AMP(719) + AMP(721) ! used 16 times + TMP_JAMP(629) = AMP(715) - AMP(718) ! used 16 times + TMP_JAMP(628) = AMP(714) + AMP(716) ! used 16 times + TMP_JAMP(627) = AMP(681) + AMP(684) ! used 16 times + TMP_JAMP(626) = AMP(679) + AMP(682) ! used 16 times + TMP_JAMP(625) = AMP(720) - AMP(723) ! used 16 times + TMP_JAMP(624) = AMP(710) + AMP(712) ! used 16 times + TMP_JAMP(623) = AMP(709) + AMP(711) ! used 16 times + TMP_JAMP(622) = AMP(730) + AMP(735) ! used 16 times + TMP_JAMP(621) = AMP(713) - AMP(733) ! used 16 times + TMP_JAMP(620) = AMP(734) + AMP(737) ! used 16 times + TMP_JAMP(619) = AMP(680) + AMP(683) ! used 16 times + TMP_JAMP(618) = AMP(560) + AMP(562) ! used 16 times + TMP_JAMP(617) = AMP(522) + AMP(525) ! used 16 times + TMP_JAMP(616) = AMP(561) - AMP(564) ! used 16 times + TMP_JAMP(615) = AMP(550) + AMP(552) ! used 16 times + TMP_JAMP(614) = AMP(540) + AMP(543) ! used 16 times + TMP_JAMP(613) = AMP(539) + AMP(542) ! used 16 times + TMP_JAMP(612) = AMP(699) + AMP(702) ! used 16 times + TMP_JAMP(611) = AMP(697) + AMP(700) ! used 16 times + TMP_JAMP(610) = AMP(698) + AMP(701) ! used 16 times + TMP_JAMP(609) = AMP(538) + AMP(541) ! used 16 times + TMP_JAMP(608) = AMP(893) + AMP(896) ! used 16 times + TMP_JAMP(607) = AMP(889) + AMP(894) ! used 16 times + TMP_JAMP(606) = AMP(878) + AMP(880) ! used 16 times + TMP_JAMP(605) = AMP(840) + AMP(843) ! used 16 times + TMP_JAMP(604) = AMP(839) + AMP(842) ! used 16 times + TMP_JAMP(603) = AMP(879) - AMP(882) ! used 16 times + TMP_JAMP(602) = AMP(857) + AMP(860) ! used 16 times + TMP_JAMP(601) = AMP(856) + AMP(859) ! used 16 times + TMP_JAMP(600) = AMP(873) + AMP(875) ! used 16 times + TMP_JAMP(599) = AMP(858) + AMP(861) ! used 16 times + TMP_JAMP(598) = AMP(874) - AMP(877) ! used 16 times + TMP_JAMP(597) = AMP(838) + AMP(841) ! used 16 times + TMP_JAMP(596) = AMP(872) - AMP(892) ! used 16 times + TMP_JAMP(595) = AMP(868) + AMP(870) ! used 16 times + TMP_JAMP(594) = AMP(869) + AMP(871) ! used 16 times + TMP_JAMP(680) = TMP_JAMP(638) + AMP(579) ! used 16 times + TMP_JAMP(679) = TMP_JAMP(637) - AMP(566) ! used 16 times + TMP_JAMP(678) = TMP_JAMP(636) + AMP(573) ! used 16 times + TMP_JAMP(677) = TMP_JAMP(635) - AMP(577) ! used 16 times + TMP_JAMP(676) = TMP_JAMP(634) + AMP(567) ! used 16 times + TMP_JAMP(675) = TMP_JAMP(633) - AMP(634) ! used 16 times + TMP_JAMP(674) = TMP_JAMP(632) + AMP(636) ! used 16 times + TMP_JAMP(673) = TMP_JAMP(631) + AMP(565) ! used 16 times + TMP_JAMP(672) = TMP_JAMP(630) + AMP(731) ! used 16 times + TMP_JAMP(671) = TMP_JAMP(629) - AMP(725) ! used 16 times + TMP_JAMP(670) = TMP_JAMP(628) + AMP(732) ! used 16 times + TMP_JAMP(669) = TMP_JAMP(627) + AMP(722) ! used 16 times + TMP_JAMP(668) = TMP_JAMP(626) + AMP(724) ! used 16 times + TMP_JAMP(667) = TMP_JAMP(625) - AMP(728) ! used 16 times + TMP_JAMP(666) = TMP_JAMP(624) + AMP(726) ! used 16 times + TMP_JAMP(665) = TMP_JAMP(623) + AMP(729) ! used 16 times + TMP_JAMP(664) = TMP_JAMP(622) + AMP(738) ! used 16 times + TMP_JAMP(663) = TMP_JAMP(621) - AMP(736) ! used 16 times + TMP_JAMP(662) = TMP_JAMP(620) - AMP(793) ! used 16 times + TMP_JAMP(661) = TMP_JAMP(619) + AMP(795) ! used 16 times + TMP_JAMP(660) = TMP_JAMP(618) + AMP(572) ! used 16 times + TMP_JAMP(659) = TMP_JAMP(617) + AMP(563) ! used 16 times + TMP_JAMP(658) = TMP_JAMP(616) - AMP(569) ! used 16 times + TMP_JAMP(657) = TMP_JAMP(615) + AMP(570) ! used 16 times + TMP_JAMP(656) = TMP_JAMP(614) + AMP(558) ! used 16 times + TMP_JAMP(655) = TMP_JAMP(613) + AMP(635) ! used 16 times + TMP_JAMP(654) = TMP_JAMP(612) + AMP(717) ! used 16 times + TMP_JAMP(653) = TMP_JAMP(611) + AMP(727) ! used 16 times + TMP_JAMP(652) = TMP_JAMP(610) + AMP(794) ! used 16 times + TMP_JAMP(651) = TMP_JAMP(609) + AMP(568) ! used 16 times + TMP_JAMP(650) = TMP_JAMP(607) + AMP(897) ! used 16 times + TMP_JAMP(649) = TMP_JAMP(606) + AMP(890) ! used 16 times + TMP_JAMP(648) = TMP_JAMP(605) + AMP(881) ! used 16 times + TMP_JAMP(647) = TMP_JAMP(603) - AMP(887) ! used 16 times + TMP_JAMP(646) = TMP_JAMP(601) + AMP(886) ! used 16 times + TMP_JAMP(645) = TMP_JAMP(600) + AMP(891) ! used 16 times + TMP_JAMP(644) = TMP_JAMP(599) + AMP(876) ! used 16 times + TMP_JAMP(643) = TMP_JAMP(598) - AMP(884) ! used 16 times + TMP_JAMP(642) = TMP_JAMP(597) + AMP(883) ! used 16 times + TMP_JAMP(641) = TMP_JAMP(596) - AMP(895) ! used 16 times + TMP_JAMP(640) = TMP_JAMP(595) + AMP(888) ! used 16 times + TMP_JAMP(639) = TMP_JAMP(594) + AMP(885) ! used 16 times + TMP_JAMP(835) = TMP_JAMP(680) - TMP_JAMP(678) ! used 8 times + TMP_JAMP(834) = TMP_JAMP(680) + TMP_JAMP(660) ! used 8 times + TMP_JAMP(833) = TMP_JAMP(680) + TMP_JAMP(675) ! used 8 times + TMP_JAMP(832) = TMP_JAMP(679) - TMP_JAMP(676) ! used 8 times + TMP_JAMP(831) = TMP_JAMP(679) + TMP_JAMP(678) ! used 8 times + TMP_JAMP(830) = TMP_JAMP(679) + TMP_JAMP(671) ! used 8 times + TMP_JAMP(829) = TMP_JAMP(679) - TMP_JAMP(673) ! used 8 times + TMP_JAMP(828) = TMP_JAMP(678) + TMP_JAMP(670) ! used 8 times + TMP_JAMP(827) = TMP_JAMP(678) + TMP_JAMP(660) ! used 8 times + TMP_JAMP(826) = TMP_JAMP(677) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(622) ! used 8 times + TMP_JAMP(825) = TMP_JAMP(677) + TMP_JAMP(676) ! used 8 times + TMP_JAMP(824) = TMP_JAMP(677) - TMP_JAMP(675) ! used 8 times + TMP_JAMP(823) = TMP_JAMP(677) - TMP_JAMP(657) ! used 8 times + TMP_JAMP(822) = TMP_JAMP(677) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(623) ! used 8 times + TMP_JAMP(821) = TMP_JAMP(676) - TMP_JAMP(673) ! used 8 times + TMP_JAMP(820) = TMP_JAMP(676) + TMP_JAMP(657) ! used 8 times + TMP_JAMP(819) = TMP_JAMP(675) + TMP_JAMP(674) ! used 8 times + TMP_JAMP(818) = TMP_JAMP(675) - TMP_JAMP(655) ! used 8 times + TMP_JAMP(817) = TMP_JAMP(674) + TMP_JAMP(673) ! used 8 times + TMP_JAMP(816) = TMP_JAMP(674) + TMP_JAMP(655) ! used 8 times + TMP_JAMP(815) = TMP_JAMP(672) + TMP_JAMP(670) ! used 8 times + TMP_JAMP(814) = TMP_JAMP(672) + TMP_JAMP(664) ! used 8 times + TMP_JAMP(813) = TMP_JAMP(672) + TMP_JAMP(667) ! used 8 times + TMP_JAMP(812) = TMP_JAMP(671) - TMP_JAMP(668) ! used 8 times + TMP_JAMP(811) = TMP_JAMP(671) + TMP_JAMP(670) ! used 8 times + TMP_JAMP(810) = TMP_JAMP(671) - TMP_JAMP(666) ! used 8 times + TMP_JAMP(809) = TMP_JAMP(670) - TMP_JAMP(664) ! used 8 times + TMP_JAMP(808) = TMP_JAMP(669) + ((0.000000000000000D+00 $ ,1.000000000000000D+00)) * AMP(678) ! used 8 times - TMP_JAMP(917) = TMP_JAMP(369) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(756) ! used 8 times - TMP_JAMP(916) = TMP_JAMP(371) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(657) ! used 8 times - TMP_JAMP(915) = TMP_JAMP(371) - TMP_JAMP(369) ! used 8 times - TMP_JAMP(914) = TMP_JAMP(372) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1150) ! used 8 times - TMP_JAMP(913) = TMP_JAMP(373) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1062) ! used 8 times - TMP_JAMP(912) = TMP_JAMP(373) + TMP_JAMP(370) ! used 8 times - TMP_JAMP(911) = TMP_JAMP(386) + TMP_JAMP(369) ! used 8 times - TMP_JAMP(910) = TMP_JAMP(388) + TMP_JAMP(371) ! used 8 times - TMP_JAMP(909) = TMP_JAMP(398) - TMP_JAMP(277) ! used 8 times - TMP_JAMP(908) = TMP_JAMP(401) - TMP_JAMP(372) ! used 8 times - TMP_JAMP(907) = AMP(1462) - AMP(1466) ! used 8 times - TMP_JAMP(906) = AMP(771) + AMP(1580) ! used 8 times - TMP_JAMP(905) = AMP(768) - AMP(770) ! used 8 times - TMP_JAMP(904) = AMP(763) + AMP(771) ! used 8 times - TMP_JAMP(903) = AMP(751) + AMP(759) ! used 8 times - TMP_JAMP(902) = TMP_JAMP(366) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(763) ! used 8 times - TMP_JAMP(901) = TMP_JAMP(367) + TMP_JAMP(365) ! used 8 times - TMP_JAMP(900) = TMP_JAMP(368) + TMP_JAMP(365) ! used 8 times - TMP_JAMP(899) = TMP_JAMP(372) + TMP_JAMP(367) ! used 8 times - TMP_JAMP(898) = TMP_JAMP(374) + TMP_JAMP(364) ! used 8 times - TMP_JAMP(897) = TMP_JAMP(375) + TMP_JAMP(366) ! used 8 times - TMP_JAMP(896) = AMP(1225) + AMP(1591) ! used 8 times - TMP_JAMP(895) = AMP(430) - AMP(433) ! used 8 times - TMP_JAMP(894) = AMP(371) + AMP(432) ! used 8 times - TMP_JAMP(893) = AMP(359) - AMP(371) ! used 8 times - TMP_JAMP(892) = AMP(146) - AMP(1593) ! used 8 times - TMP_JAMP(891) = AMP(145) - AMP(158) ! used 8 times - TMP_JAMP(890) = TMP_JAMP(264) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(359) ! used 8 times - TMP_JAMP(889) = TMP_JAMP(362) + TMP_JAMP(360) ! used 8 times - TMP_JAMP(888) = TMP_JAMP(363) + TMP_JAMP(361) ! used 8 times - TMP_JAMP(887) = TMP_JAMP(374) + TMP_JAMP(314) ! used 8 times - TMP_JAMP(886) = TMP_JAMP(374) - TMP_JAMP(360) ! used 8 times - TMP_JAMP(885) = TMP_JAMP(376) - TMP_JAMP(362) ! used 8 times - TMP_JAMP(884) = TMP_JAMP(384) + TMP_JAMP(264) ! used 8 times - TMP_JAMP(883) = TMP_JAMP(397) + TMP_JAMP(361) ! used 8 times - TMP_JAMP(882) = TMP_JAMP(402) + TMP_JAMP(363) ! used 8 times - TMP_JAMP(881) = TMP_JAMP(403) - TMP_JAMP(383) ! used 8 times - TMP_JAMP(880) = TMP_JAMP(404) - TMP_JAMP(384) ! used 8 times - TMP_JAMP(879) = AMP(1057) - AMP(1073) ! used 8 times - TMP_JAMP(878) = AMP(1055) - AMP(1057) ! used 8 times - TMP_JAMP(877) = AMP(781) - AMP(1592) ! used 8 times - TMP_JAMP(876) = AMP(672) - AMP(1058) ! used 8 times - TMP_JAMP(875) = AMP(661) + AMP(672) ! used 8 times - TMP_JAMP(874) = TMP_JAMP(261) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(661) ! used 8 times - TMP_JAMP(873) = TMP_JAMP(358) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(781) ! used 8 times - TMP_JAMP(872) = TMP_JAMP(359) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(1055) ! used 8 times - TMP_JAMP(871) = TMP_JAMP(360) + TMP_JAMP(358) ! used 8 times - TMP_JAMP(870) = TMP_JAMP(361) + TMP_JAMP(359) ! used 8 times - TMP_JAMP(869) = TMP_JAMP(364) - TMP_JAMP(358) ! used 8 times - TMP_JAMP(868) = TMP_JAMP(390) - TMP_JAMP(369) ! used 8 times - TMP_JAMP(867) = TMP_JAMP(391) + TMP_JAMP(359) ! used 8 times - TMP_JAMP(866) = TMP_JAMP(392) - TMP_JAMP(371) ! used 8 times - TMP_JAMP(865) = AMP(785) + AMP(790) ! used 8 times - TMP_JAMP(864) = AMP(676) - AMP(792) ! used 8 times - TMP_JAMP(863) = AMP(429) + AMP(431) ! used 8 times - TMP_JAMP(862) = AMP(340) - AMP(456) ! used 8 times - TMP_JAMP(861) = AMP(338) + AMP(340) ! used 8 times - TMP_JAMP(860) = TMP_JAMP(355) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(676) ! used 8 times - TMP_JAMP(859) = TMP_JAMP(355) - TMP_JAMP(354) ! used 8 times - TMP_JAMP(858) = TMP_JAMP(356) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(338) ! used 8 times - TMP_JAMP(857) = TMP_JAMP(357) + TMP_JAMP(354) ! used 8 times - TMP_JAMP(856) = TMP_JAMP(357) + TMP_JAMP(356) ! used 8 times - TMP_JAMP(855) = TMP_JAMP(362) - TMP_JAMP(358) ! used 8 times - TMP_JAMP(854) = TMP_JAMP(376) - TMP_JAMP(364) ! used 8 times - TMP_JAMP(853) = TMP_JAMP(399) + TMP_JAMP(277) ! used 8 times - TMP_JAMP(852) = TMP_JAMP(400) + TMP_JAMP(356) ! used 8 times - TMP_JAMP(851) = AMP(1473) + AMP(1474) ! used 8 times - TMP_JAMP(850) = AMP(1134) + AMP(1135) ! used 8 times - TMP_JAMP(849) = AMP(1129) + AMP(1137) ! used 8 times - TMP_JAMP(848) = AMP(123) - AMP(1476) ! used 8 times - TMP_JAMP(847) = AMP(120) + AMP(1527) ! used 8 times - TMP_JAMP(846) = AMP(118) + AMP(123) ! used 8 times - TMP_JAMP(845) = AMP(114) + AMP(120) ! used 8 times - TMP_JAMP(844) = TMP_JAMP(254) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(118) ! used 8 times - TMP_JAMP(843) = TMP_JAMP(350) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(114) ! used 8 times - TMP_JAMP(842) = TMP_JAMP(351) + TMP_JAMP(350) ! used 8 times - TMP_JAMP(841) = TMP_JAMP(353) + TMP_JAMP(352) ! used 8 times - TMP_JAMP(840) = TMP_JAMP(354) + TMP_JAMP(353) ! used 8 times - TMP_JAMP(839) = TMP_JAMP(355) - TMP_JAMP(352) ! used 8 times - TMP_JAMP(838) = TMP_JAMP(360) + TMP_JAMP(254) ! used 8 times - TMP_JAMP(837) = TMP_JAMP(394) + TMP_JAMP(350) ! used 8 times - TMP_JAMP(836) = TMP_JAMP(398) + TMP_JAMP(351) ! used 8 times - TMP_JAMP(835) = AMP(1228) + AMP(1720) ! used 8 times - TMP_JAMP(834) = AMP(1053) + AMP(1059) ! used 8 times - TMP_JAMP(833) = AMP(519) - AMP(1722) ! used 8 times - TMP_JAMP(832) = AMP(503) + AMP(1716) ! used 8 times - TMP_JAMP(831) = AMP(500) + AMP(503) ! used 8 times - TMP_JAMP(830) = TMP_JAMP(346) + ((0.000000000000000D+00 + TMP_JAMP(807) = TMP_JAMP(669) - TMP_JAMP(668) ! used 8 times + TMP_JAMP(806) = TMP_JAMP(669) - TMP_JAMP(667) ! used 8 times + TMP_JAMP(805) = TMP_JAMP(669) + TMP_JAMP(661) ! used 8 times + TMP_JAMP(804) = TMP_JAMP(669) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(677) ! used 8 times + TMP_JAMP(803) = TMP_JAMP(668) - TMP_JAMP(666) ! used 8 times + TMP_JAMP(802) = TMP_JAMP(668) + TMP_JAMP(661) ! used 8 times + TMP_JAMP(801) = TMP_JAMP(667) - TMP_JAMP(665) ! used 8 times + TMP_JAMP(800) = TMP_JAMP(667) + TMP_JAMP(647) ! used 8 times + TMP_JAMP(799) = TMP_JAMP(667) - TMP_JAMP(653) ! used 8 times + TMP_JAMP(798) = TMP_JAMP(666) + TMP_JAMP(665) ! used 8 times + TMP_JAMP(797) = TMP_JAMP(665) - TMP_JAMP(653) ! used 8 times + TMP_JAMP(796) = TMP_JAMP(664) + TMP_JAMP(662) ! used 8 times + TMP_JAMP(795) = TMP_JAMP(663) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(781) ! used 8 times + TMP_JAMP(794) = TMP_JAMP(663) - TMP_JAMP(662) ! used 8 times + TMP_JAMP(793) = TMP_JAMP(663) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(782) ! used 8 times + TMP_JAMP(792) = TMP_JAMP(662) + TMP_JAMP(661) ! used 8 times + TMP_JAMP(791) = TMP_JAMP(662) - TMP_JAMP(652) ! used 8 times + TMP_JAMP(790) = TMP_JAMP(661) + TMP_JAMP(652) ! used 8 times + TMP_JAMP(789) = TMP_JAMP(660) + TMP_JAMP(658) ! used 8 times + TMP_JAMP(788) = TMP_JAMP(659) + ((0.000000000000000D+00 $ ,1.000000000000000D+00)) * AMP(519) ! used 8 times - TMP_JAMP(829) = TMP_JAMP(347) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(500) ! used 8 times - TMP_JAMP(828) = TMP_JAMP(347) + TMP_JAMP(346) ! used 8 times - TMP_JAMP(827) = TMP_JAMP(348) + TMP_JAMP(346) ! used 8 times - TMP_JAMP(826) = TMP_JAMP(349) - TMP_JAMP(261) ! used 8 times - TMP_JAMP(825) = TMP_JAMP(349) + TMP_JAMP(347) ! used 8 times - TMP_JAMP(824) = TMP_JAMP(349) + TMP_JAMP(348) ! used 8 times - TMP_JAMP(823) = TMP_JAMP(362) - TMP_JAMP(348) ! used 8 times - TMP_JAMP(822) = TMP_JAMP(386) + TMP_JAMP(292) ! used 8 times - TMP_JAMP(821) = TMP_JAMP(388) + TMP_JAMP(347) ! used 8 times - TMP_JAMP(820) = AMP(1471) - AMP(1475) ! used 8 times - TMP_JAMP(819) = AMP(612) + AMP(1526) ! used 8 times - TMP_JAMP(818) = AMP(609) - AMP(611) ! used 8 times - TMP_JAMP(817) = AMP(604) + AMP(612) ! used 8 times - TMP_JAMP(816) = TMP_JAMP(344) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(604) ! used 8 times - TMP_JAMP(815) = TMP_JAMP(345) + TMP_JAMP(343) ! used 8 times - TMP_JAMP(814) = TMP_JAMP(346) + TMP_JAMP(343) ! used 8 times - TMP_JAMP(813) = TMP_JAMP(348) + TMP_JAMP(345) ! used 8 times - TMP_JAMP(812) = TMP_JAMP(350) + TMP_JAMP(344) ! used 8 times - TMP_JAMP(811) = TMP_JAMP(387) + TMP_JAMP(344) ! used 8 times - TMP_JAMP(810) = AMP(1305) + AMP(1669) ! used 8 times - TMP_JAMP(809) = AMP(536) - AMP(1671) ! used 8 times - TMP_JAMP(808) = AMP(535) - AMP(632) ! used 8 times - TMP_JAMP(807) = AMP(389) + AMP(423) ! used 8 times - TMP_JAMP(806) = AMP(377) - AMP(389) ! used 8 times - TMP_JAMP(805) = AMP(374) + AMP(376) ! used 8 times - TMP_JAMP(804) = TMP_JAMP(240) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(377) ! used 8 times - TMP_JAMP(803) = TMP_JAMP(341) - TMP_JAMP(340) ! used 8 times - TMP_JAMP(802) = TMP_JAMP(342) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(1305) ! used 8 times - TMP_JAMP(801) = TMP_JAMP(342) + TMP_JAMP(339) ! used 8 times - TMP_JAMP(800) = TMP_JAMP(381) + TMP_JAMP(340) ! used 8 times - TMP_JAMP(799) = TMP_JAMP(382) + TMP_JAMP(341) ! used 8 times - TMP_JAMP(798) = TMP_JAMP(386) + TMP_JAMP(339) ! used 8 times - TMP_JAMP(797) = TMP_JAMP(390) + TMP_JAMP(342) ! used 8 times - TMP_JAMP(796) = TMP_JAMP(403) - TMP_JAMP(390) ! used 8 times - TMP_JAMP(795) = TMP_JAMP(404) + TMP_JAMP(240) ! used 8 times - TMP_JAMP(794) = AMP(1291) - AMP(1886) ! used 8 times - TMP_JAMP(793) = AMP(1290) + AMP(1291) ! used 8 times - TMP_JAMP(792) = AMP(769) - AMP(1292) ! used 8 times - TMP_JAMP(791) = AMP(706) + AMP(769) ! used 8 times - TMP_JAMP(790) = AMP(695) - AMP(1670) ! used 8 times - TMP_JAMP(789) = TMP_JAMP(237) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(706) ! used 8 times - TMP_JAMP(788) = TMP_JAMP(338) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1290) ! used 8 times - TMP_JAMP(787) = TMP_JAMP(339) + TMP_JAMP(337) ! used 8 times - TMP_JAMP(786) = TMP_JAMP(340) - TMP_JAMP(338) ! used 8 times - TMP_JAMP(785) = TMP_JAMP(369) + TMP_JAMP(337) ! used 8 times - TMP_JAMP(784) = TMP_JAMP(377) - TMP_JAMP(366) ! used 8 times - TMP_JAMP(783) = TMP_JAMP(378) + TMP_JAMP(338) ! used 8 times - TMP_JAMP(782) = AMP(694) - AMP(791) ! used 8 times - TMP_JAMP(781) = AMP(373) + AMP(375) ! used 8 times - TMP_JAMP(780) = TMP_JAMP(342) - TMP_JAMP(337) ! used 8 times - TMP_JAMP(779) = TMP_JAMP(355) + TMP_JAMP(335) ! used 8 times - TMP_JAMP(778) = TMP_JAMP(356) + TMP_JAMP(336) ! used 8 times - TMP_JAMP(777) = AMP(1300) - AMP(1859) ! used 8 times - TMP_JAMP(776) = AMP(1299) + AMP(1300) ! used 8 times - TMP_JAMP(775) = AMP(610) - AMP(1301) ! used 8 times - TMP_JAMP(774) = AMP(547) + AMP(610) ! used 8 times - TMP_JAMP(773) = TMP_JAMP(233) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(547) ! used 8 times - TMP_JAMP(772) = TMP_JAMP(334) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1299) ! used 8 times - TMP_JAMP(771) = TMP_JAMP(335) - TMP_JAMP(334) ! used 8 times - TMP_JAMP(770) = TMP_JAMP(339) - TMP_JAMP(233) ! used 8 times - TMP_JAMP(769) = TMP_JAMP(344) - TMP_JAMP(233) ! used 8 times - TMP_JAMP(768) = TMP_JAMP(351) - TMP_JAMP(344) ! used 8 times - TMP_JAMP(767) = TMP_JAMP(352) + TMP_JAMP(334) ! used 8 times - TMP_JAMP(766) = AMP(1304) + AMP(1642) ! used 8 times - TMP_JAMP(765) = AMP(1285) + AMP(1293) ! used 8 times - TMP_JAMP(764) = AMP(141) - AMP(1644) ! used 8 times - TMP_JAMP(763) = AMP(107) + AMP(1635) ! used 8 times - TMP_JAMP(762) = AMP(104) + AMP(107) ! used 8 times - TMP_JAMP(761) = TMP_JAMP(330) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(104) ! used 8 times - TMP_JAMP(760) = TMP_JAMP(331) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(141) ! used 8 times - TMP_JAMP(759) = TMP_JAMP(331) + TMP_JAMP(314) ! used 8 times - TMP_JAMP(758) = TMP_JAMP(332) - TMP_JAMP(237) ! used 8 times - TMP_JAMP(757) = TMP_JAMP(333) + TMP_JAMP(332) ! used 8 times - TMP_JAMP(756) = TMP_JAMP(342) - TMP_JAMP(333) ! used 8 times - TMP_JAMP(755) = TMP_JAMP(375) + TMP_JAMP(330) ! used 8 times - TMP_JAMP(754) = AMP(1302) - AMP(1639) ! used 8 times - TMP_JAMP(753) = AMP(1294) + AMP(1302) ! used 8 times - TMP_JAMP(752) = AMP(116) + AMP(119) ! used 8 times - TMP_JAMP(751) = TMP_JAMP(329) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(1294) ! used 8 times - TMP_JAMP(750) = TMP_JAMP(329) - TMP_JAMP(233) ! used 8 times - TMP_JAMP(749) = TMP_JAMP(333) - TMP_JAMP(329) ! used 8 times - TMP_JAMP(748) = TMP_JAMP(350) + TMP_JAMP(328) ! used 8 times - TMP_JAMP(747) = AMP(942) + AMP(946) ! used 8 times - TMP_JAMP(746) = AMP(837) - AMP(1775) ! used 8 times - TMP_JAMP(745) = AMP(833) - AMP(948) ! used 8 times - TMP_JAMP(744) = AMP(831) - AMP(1049) ! used 8 times - TMP_JAMP(743) = AMP(821) + AMP(1769) ! used 8 times - TMP_JAMP(742) = AMP(820) + AMP(831) ! used 8 times - TMP_JAMP(741) = AMP(818) + AMP(821) ! used 8 times - TMP_JAMP(740) = TMP_JAMP(223) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(820) ! used 8 times - TMP_JAMP(739) = TMP_JAMP(325) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(818) ! used 8 times - TMP_JAMP(738) = TMP_JAMP(325) + TMP_JAMP(324) ! used 8 times - TMP_JAMP(737) = TMP_JAMP(327) - TMP_JAMP(326) ! used 8 times - TMP_JAMP(736) = TMP_JAMP(368) + TMP_JAMP(324) ! used 8 times - TMP_JAMP(735) = TMP_JAMP(370) + TMP_JAMP(325) ! used 8 times - TMP_JAMP(734) = TMP_JAMP(392) - TMP_JAMP(223) ! used 8 times - TMP_JAMP(733) = TMP_JAMP(399) - TMP_JAMP(327) ! used 8 times - TMP_JAMP(732) = TMP_JAMP(403) + TMP_JAMP(326) ! used 8 times - TMP_JAMP(731) = AMP(929) + AMP(1805) ! used 8 times - TMP_JAMP(730) = AMP(928) - AMP(1214) ! used 8 times - TMP_JAMP(729) = AMP(927) - AMP(929) ! used 8 times - TMP_JAMP(728) = AMP(865) + AMP(928) ! used 8 times - TMP_JAMP(727) = AMP(851) - AMP(947) ! used 8 times - TMP_JAMP(726) = TMP_JAMP(220) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(865) ! used 8 times - TMP_JAMP(725) = TMP_JAMP(322) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(927) ! used 8 times - TMP_JAMP(724) = TMP_JAMP(324) + TMP_JAMP(322) ! used 8 times - TMP_JAMP(723) = TMP_JAMP(327) + TMP_JAMP(323) ! used 8 times - TMP_JAMP(722) = TMP_JAMP(365) + TMP_JAMP(322) ! used 8 times - TMP_JAMP(721) = TMP_JAMP(377) - TMP_JAMP(220) ! used 8 times - TMP_JAMP(720) = TMP_JAMP(383) - TMP_JAMP(323) ! used 8 times - TMP_JAMP(719) = AMP(855) - AMP(1721) ! used 8 times - TMP_JAMP(718) = AMP(816) + AMP(822) ! used 8 times - TMP_JAMP(717) = TMP_JAMP(326) + TMP_JAMP(323) ! used 8 times - TMP_JAMP(716) = TMP_JAMP(346) + TMP_JAMP(320) ! used 8 times - TMP_JAMP(715) = TMP_JAMP(347) + TMP_JAMP(321) ! used 8 times - TMP_JAMP(714) = AMP(938) + AMP(1751) ! used 8 times - TMP_JAMP(713) = AMP(936) - AMP(938) ! used 8 times - TMP_JAMP(712) = AMP(847) + AMP(937) ! used 8 times - TMP_JAMP(711) = TMP_JAMP(319) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(936) ! used 8 times - TMP_JAMP(710) = TMP_JAMP(320) + TMP_JAMP(319) ! used 8 times - TMP_JAMP(709) = TMP_JAMP(343) + TMP_JAMP(319) ! used 8 times - TMP_JAMP(708) = TMP_JAMP(351) - TMP_JAMP(215) ! used 8 times - TMP_JAMP(707) = AMP(941) - AMP(1643) ! used 8 times - TMP_JAMP(706) = AMP(930) + AMP(1634) ! used 8 times - TMP_JAMP(705) = AMP(922) + AMP(930) ! used 8 times - TMP_JAMP(704) = TMP_JAMP(317) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(922) ! used 8 times - TMP_JAMP(703) = TMP_JAMP(330) + TMP_JAMP(317) ! used 8 times - TMP_JAMP(702) = TMP_JAMP(331) + TMP_JAMP(318) ! used 8 times - TMP_JAMP(701) = AMP(939) + AMP(1640) ! used 8 times - TMP_JAMP(700) = AMP(931) + AMP(939) ! used 8 times - TMP_JAMP(699) = TMP_JAMP(316) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(931) ! used 8 times - TMP_JAMP(698) = TMP_JAMP(318) - TMP_JAMP(316) ! used 8 times - TMP_JAMP(697) = TMP_JAMP(328) + TMP_JAMP(316) ! used 8 times - TMP_JAMP(696) = AMP(1435) + AMP(1852) ! used 8 times - TMP_JAMP(695) = AMP(1434) + AMP(1435) ! used 8 times - TMP_JAMP(694) = AMP(1113) - AMP(1507) ! used 8 times - TMP_JAMP(693) = AMP(1111) - AMP(1854) ! used 8 times - TMP_JAMP(692) = AMP(1110) + AMP(1111) ! used 8 times - TMP_JAMP(691) = AMP(1105) + AMP(1113) ! used 8 times - TMP_JAMP(690) = AMP(81) - AMP(1437) ! used 8 times - TMP_JAMP(689) = AMP(72) + AMP(1509) ! used 8 times - TMP_JAMP(688) = AMP(70) + AMP(81) ! used 8 times - TMP_JAMP(687) = AMP(66) + AMP(72) ! used 8 times - TMP_JAMP(686) = TMP_JAMP(254) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(70) ! used 8 times - TMP_JAMP(685) = TMP_JAMP(350) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(66) ! used 8 times - TMP_JAMP(684) = TMP_JAMP(351) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1105) ! used 8 times - TMP_JAMP(683) = TMP_JAMP(352) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(1110) ! used 8 times - TMP_JAMP(682) = TMP_JAMP(353) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(1434) ! used 8 times - TMP_JAMP(681) = TMP_JAMP(356) - TMP_JAMP(352) ! used 8 times - TMP_JAMP(680) = TMP_JAMP(357) - TMP_JAMP(353) ! used 8 times - TMP_JAMP(679) = TMP_JAMP(395) + TMP_JAMP(350) ! used 8 times - TMP_JAMP(678) = TMP_JAMP(396) + TMP_JAMP(361) ! used 8 times - TMP_JAMP(677) = TMP_JAMP(401) + TMP_JAMP(351) ! used 8 times - TMP_JAMP(676) = TMP_JAMP(405) - TMP_JAMP(363) ! used 8 times - TMP_JAMP(675) = AMP(1436) - AMP(1744) ! used 8 times - TMP_JAMP(674) = AMP(1432) - AMP(1436) ! used 8 times - TMP_JAMP(673) = AMP(588) + AMP(1508) ! used 8 times - TMP_JAMP(672) = AMP(587) + AMP(1746) ! used 8 times - TMP_JAMP(671) = AMP(585) - AMP(587) ! used 8 times - TMP_JAMP(670) = AMP(580) + AMP(588) ! used 8 times - TMP_JAMP(669) = TMP_JAMP(343) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(585) ! used 8 times - TMP_JAMP(668) = TMP_JAMP(344) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(580) ! used 8 times - TMP_JAMP(667) = TMP_JAMP(345) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(1432) ! used 8 times - TMP_JAMP(666) = TMP_JAMP(347) - TMP_JAMP(343) ! used 8 times - TMP_JAMP(665) = TMP_JAMP(349) - TMP_JAMP(345) ! used 8 times - TMP_JAMP(664) = TMP_JAMP(389) + TMP_JAMP(344) ! used 8 times - TMP_JAMP(663) = TMP_JAMP(393) - TMP_JAMP(359) ! used 8 times - TMP_JAMP(662) = AMP(1279) - AMP(1853) ! used 8 times - TMP_JAMP(661) = AMP(1278) + AMP(1279) ! used 8 times - TMP_JAMP(660) = AMP(586) - AMP(1280) ! used 8 times - TMP_JAMP(659) = AMP(544) + AMP(586) ! used 8 times - TMP_JAMP(658) = TMP_JAMP(233) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(544) ! used 8 times - TMP_JAMP(657) = TMP_JAMP(334) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(1278) ! used 8 times - TMP_JAMP(656) = TMP_JAMP(336) - TMP_JAMP(334) ! used 8 times - TMP_JAMP(655) = TMP_JAMP(380) + TMP_JAMP(340) ! used 8 times - TMP_JAMP(654) = TMP_JAMP(385) - TMP_JAMP(341) ! used 8 times - TMP_JAMP(653) = AMP(1281) - AMP(1624) ! used 8 times - TMP_JAMP(652) = AMP(1273) + AMP(1281) ! used 8 times - TMP_JAMP(651) = AMP(71) + AMP(1626) ! used 8 times - TMP_JAMP(650) = AMP(68) + AMP(71) ! used 8 times - TMP_JAMP(649) = TMP_JAMP(328) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(68) ! used 8 times - TMP_JAMP(648) = TMP_JAMP(329) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1273) ! used 8 times - TMP_JAMP(647) = TMP_JAMP(330) + TMP_JAMP(283) ! used 8 times - TMP_JAMP(646) = TMP_JAMP(330) + TMP_JAMP(328) ! used 8 times - TMP_JAMP(645) = TMP_JAMP(332) + TMP_JAMP(329) ! used 8 times - TMP_JAMP(644) = TMP_JAMP(379) - TMP_JAMP(338) ! used 8 times - TMP_JAMP(643) = AMP(917) + AMP(1745) ! used 8 times - TMP_JAMP(642) = AMP(916) - AMP(1112) ! used 8 times - TMP_JAMP(641) = AMP(915) - AMP(917) ! used 8 times - TMP_JAMP(640) = AMP(844) + AMP(916) ! used 8 times - TMP_JAMP(639) = TMP_JAMP(215) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(844) ! used 8 times - TMP_JAMP(638) = TMP_JAMP(319) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(915) ! used 8 times - TMP_JAMP(637) = TMP_JAMP(321) - TMP_JAMP(319) ! used 8 times - TMP_JAMP(636) = TMP_JAMP(372) - TMP_JAMP(324) ! used 8 times - TMP_JAMP(635) = TMP_JAMP(373) - TMP_JAMP(325) ! used 8 times - TMP_JAMP(634) = AMP(918) + AMP(1625) ! used 8 times - TMP_JAMP(633) = AMP(910) + AMP(918) ! used 8 times - TMP_JAMP(632) = TMP_JAMP(316) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(910) ! used 8 times - TMP_JAMP(631) = TMP_JAMP(317) + TMP_JAMP(316) ! used 8 times - TMP_JAMP(630) = TMP_JAMP(367) - TMP_JAMP(322) ! used 8 times - TMP_JAMP(629) = AMP(1303) + AMP(1645) ! used 8 times - TMP_JAMP(628) = AMP(140) - AMP(1647) ! used 8 times - TMP_JAMP(627) = TMP_JAMP(328) + TMP_JAMP(254) ! used 8 times - TMP_JAMP(626) = TMP_JAMP(331) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(140) ! used 8 times - TMP_JAMP(625) = TMP_JAMP(333) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1303) ! used 8 times - TMP_JAMP(624) = TMP_JAMP(353) - TMP_JAMP(334) ! used 8 times - TMP_JAMP(623) = TMP_JAMP(357) - TMP_JAMP(336) ! used 8 times - TMP_JAMP(622) = TMP_JAMP(397) + TMP_JAMP(331) ! used 8 times - TMP_JAMP(621) = TMP_JAMP(402) + TMP_JAMP(240) ! used 8 times - TMP_JAMP(620) = AMP(940) - AMP(1646) ! used 8 times - TMP_JAMP(619) = TMP_JAMP(318) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(940) ! used 8 times - TMP_JAMP(618) = TMP_JAMP(345) - TMP_JAMP(319) ! used 8 times - TMP_JAMP(617) = TMP_JAMP(349) - TMP_JAMP(321) ! used 8 times - TMP_JAMP(616) = TMP_JAMP(391) - TMP_JAMP(223) ! used 8 times - TMP_JAMP(615) = AMP(944) + AMP(949) ! used 8 times - TMP_JAMP(614) = AMP(835) - AMP(951) ! used 8 times - TMP_JAMP(613) = TMP_JAMP(326) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(944) ! used 8 times - TMP_JAMP(612) = TMP_JAMP(327) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(835) ! used 8 times - TMP_JAMP(611) = TMP_JAMP(329) - TMP_JAMP(316) ! used 8 times - TMP_JAMP(610) = TMP_JAMP(333) - TMP_JAMP(318) ! used 8 times - TMP_JAMP(609) = TMP_JAMP(352) + TMP_JAMP(215) ! used 8 times - TMP_JAMP(608) = TMP_JAMP(400) - TMP_JAMP(327) ! used 8 times - TMP_JAMP(607) = TMP_JAMP(404) + TMP_JAMP(326) ! used 8 times - TMP_JAMP(606) = AMP(1483) + AMP(1831) ! used 8 times - TMP_JAMP(605) = AMP(1146) - AMP(1531) ! used 8 times - TMP_JAMP(604) = AMP(1144) - AMP(1833) ! used 8 times - TMP_JAMP(603) = AMP(135) - AMP(1485) ! used 8 times - TMP_JAMP(602) = AMP(132) + AMP(1533) ! used 8 times - TMP_JAMP(601) = TMP_JAMP(314) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(130) ! used 8 times - TMP_JAMP(600) = TMP_JAMP(394) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(126) ! used 8 times - TMP_JAMP(599) = TMP_JAMP(398) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(1138) ! used 8 times - TMP_JAMP(598) = TMP_JAMP(399) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1143) ! used 8 times - TMP_JAMP(597) = TMP_JAMP(403) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1482) ! used 8 times - TMP_JAMP(596) = AMP(1306) + AMP(1666) ! used 8 times - TMP_JAMP(595) = AMP(537) - AMP(1668) ! used 8 times - TMP_JAMP(594) = TMP_JAMP(339) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(537) ! used 8 times - TMP_JAMP(593) = TMP_JAMP(342) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1306) ! used 8 times - TMP_JAMP(592) = TMP_JAMP(343) + TMP_JAMP(233) ! used 8 times - TMP_JAMP(591) = TMP_JAMP(388) + TMP_JAMP(339) ! used 8 times - TMP_JAMP(590) = TMP_JAMP(392) + TMP_JAMP(342) ! used 8 times - TMP_JAMP(589) = AMP(1484) - AMP(1696) ! used 8 times - TMP_JAMP(588) = AMP(621) + AMP(1532) ! used 8 times - TMP_JAMP(587) = AMP(620) + AMP(1698) ! used 8 times - TMP_JAMP(586) = TMP_JAMP(386) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(618) ! used 8 times - TMP_JAMP(585) = TMP_JAMP(387) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(613) ! used 8 times - TMP_JAMP(584) = TMP_JAMP(390) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1480) ! used 8 times - TMP_JAMP(583) = AMP(1227) + AMP(1723) ! used 8 times - TMP_JAMP(582) = AMP(518) - AMP(1725) ! used 8 times - TMP_JAMP(581) = TMP_JAMP(346) + ((-0.000000000000000D+00, + TMP_JAMP(787) = TMP_JAMP(659) - TMP_JAMP(658) ! used 8 times + TMP_JAMP(786) = TMP_JAMP(659) + ((-0.000000000000000D+00, $ -1.000000000000000D+00)) * AMP(518) ! used 8 times - TMP_JAMP(580) = TMP_JAMP(348) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(1227) ! used 8 times - TMP_JAMP(579) = TMP_JAMP(353) - TMP_JAMP(345) ! used 8 times - TMP_JAMP(578) = TMP_JAMP(381) + TMP_JAMP(346) ! used 8 times - TMP_JAMP(577) = TMP_JAMP(382) - TMP_JAMP(264) ! used 8 times - TMP_JAMP(576) = AMP(854) - AMP(1724) ! used 8 times - TMP_JAMP(575) = TMP_JAMP(320) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(854) ! used 8 times - TMP_JAMP(574) = TMP_JAMP(332) - TMP_JAMP(317) ! used 8 times - TMP_JAMP(573) = TMP_JAMP(378) + TMP_JAMP(220) ! used 8 times - TMP_JAMP(572) = AMP(853) - AMP(950) ! used 8 times - TMP_JAMP(571) = TMP_JAMP(323) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(853) ! used 8 times - TMP_JAMP(570) = TMP_JAMP(348) - TMP_JAMP(320) ! used 8 times - TMP_JAMP(569) = TMP_JAMP(384) - TMP_JAMP(323) ! used 8 times - TMP_JAMP(568) = AMP(1222) - AMP(1832) ! used 8 times - TMP_JAMP(567) = AMP(619) - AMP(1223) ! used 8 times - TMP_JAMP(566) = TMP_JAMP(292) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(529) ! used 8 times - TMP_JAMP(565) = TMP_JAMP(383) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1221) ! used 8 times - TMP_JAMP(564) = AMP(1226) + AMP(1588) ! used 8 times - TMP_JAMP(563) = AMP(147) - AMP(1590) ! used 8 times - TMP_JAMP(562) = TMP_JAMP(360) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(147) ! used 8 times - TMP_JAMP(561) = TMP_JAMP(362) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(1226) ! used 8 times - TMP_JAMP(560) = TMP_JAMP(375) + TMP_JAMP(360) ! used 8 times - TMP_JAMP(559) = TMP_JAMP(377) + TMP_JAMP(362) ! used 8 times - TMP_JAMP(558) = AMP(1224) - AMP(1585) ! used 8 times - TMP_JAMP(557) = AMP(131) + AMP(1587) ! used 8 times - TMP_JAMP(556) = TMP_JAMP(374) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(128) ! used 8 times - TMP_JAMP(555) = TMP_JAMP(376) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(1216) ! used 8 times - TMP_JAMP(554) = AMP(783) + AMP(787) ! used 8 times - TMP_JAMP(553) = AMP(674) - AMP(789) ! used 8 times - TMP_JAMP(552) = TMP_JAMP(354) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(783) ! used 8 times - TMP_JAMP(551) = TMP_JAMP(355) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(674) ! used 8 times - TMP_JAMP(550) = TMP_JAMP(368) + TMP_JAMP(355) ! used 8 times - TMP_JAMP(549) = TMP_JAMP(370) + TMP_JAMP(261) ! used 8 times - TMP_JAMP(548) = AMP(692) - AMP(788) ! used 8 times - TMP_JAMP(547) = TMP_JAMP(335) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(692) ! used 8 times - TMP_JAMP(546) = TMP_JAMP(365) + TMP_JAMP(237) ! used 8 times - TMP_JAMP(545) = AMP(696) - AMP(1667) ! used 8 times - TMP_JAMP(544) = TMP_JAMP(337) + ((-0.000000000000000D+00 + TMP_JAMP(785) = TMP_JAMP(658) - TMP_JAMP(657) ! used 8 times + TMP_JAMP(784) = TMP_JAMP(658) + TMP_JAMP(643) ! used 8 times + TMP_JAMP(783) = TMP_JAMP(658) - TMP_JAMP(651) ! used 8 times + TMP_JAMP(782) = TMP_JAMP(657) - TMP_JAMP(651) ! used 8 times + TMP_JAMP(781) = TMP_JAMP(656) + TMP_JAMP(655) ! used 8 times + TMP_JAMP(780) = TMP_JAMP(656) - TMP_JAMP(651) ! used 8 times + TMP_JAMP(779) = TMP_JAMP(656) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(537) ! used 8 times + TMP_JAMP(778) = TMP_JAMP(655) + TMP_JAMP(651) ! used 8 times + TMP_JAMP(777) = TMP_JAMP(654) - TMP_JAMP(653) ! used 8 times + TMP_JAMP(776) = TMP_JAMP(654) + TMP_JAMP(652) ! used 8 times + TMP_JAMP(775) = TMP_JAMP(654) + ((-0.000000000000000D+00 $ ,1.000000000000000D+00)) * AMP(696) ! used 8 times - TMP_JAMP(543) = TMP_JAMP(354) + TMP_JAMP(335) ! used 8 times - TMP_JAMP(542) = TMP_JAMP(371) + TMP_JAMP(337) ! used 8 times - TMP_JAMP(541) = AMP(779) + AMP(1697) ! used 8 times - TMP_JAMP(540) = AMP(778) - AMP(1145) ! used 8 times - TMP_JAMP(539) = TMP_JAMP(277) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(688) ! used 8 times - TMP_JAMP(538) = TMP_JAMP(369) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(777) ! used 8 times - TMP_JAMP(537) = AMP(782) - AMP(1589) ! used 8 times - TMP_JAMP(536) = TMP_JAMP(358) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(782) ! used 8 times - TMP_JAMP(535) = TMP_JAMP(366) + TMP_JAMP(358) ! used 8 times - TMP_JAMP(534) = AMP(780) + AMP(1586) ! used 8 times - TMP_JAMP(533) = TMP_JAMP(364) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(772) ! used 8 times - TMP_JAMP(532) = AMP(1414) + AMP(1879) ! used 8 times - TMP_JAMP(531) = AMP(1413) + AMP(1414) ! used 8 times - TMP_JAMP(530) = AMP(1191) - AMP(1561) ! used 8 times - TMP_JAMP(529) = AMP(1189) - AMP(1881) ! used 8 times - TMP_JAMP(528) = AMP(1188) + AMP(1189) ! used 8 times - TMP_JAMP(527) = AMP(63) - AMP(1416) ! used 8 times - TMP_JAMP(526) = AMP(54) + AMP(1563) ! used 8 times - TMP_JAMP(525) = AMP(52) + AMP(63) ! used 8 times - TMP_JAMP(524) = TMP_JAMP(283) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(52) ! used 8 times - TMP_JAMP(523) = TMP_JAMP(375) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(48) ! used 8 times - TMP_JAMP(522) = TMP_JAMP(377) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1183) ! used 8 times - TMP_JAMP(521) = TMP_JAMP(378) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(1188) ! used 8 times - TMP_JAMP(520) = TMP_JAMP(379) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(1413) ! used 8 times - TMP_JAMP(519) = TMP_JAMP(382) - TMP_JAMP(378) ! used 8 times - TMP_JAMP(518) = TMP_JAMP(396) - TMP_JAMP(283) ! used 8 times - TMP_JAMP(517) = TMP_JAMP(405) + TMP_JAMP(385) ! used 8 times - TMP_JAMP(516) = AMP(1415) - AMP(1798) ! used 8 times - TMP_JAMP(515) = AMP(1411) - AMP(1415) ! used 8 times - TMP_JAMP(514) = AMP(747) + AMP(1562) ! used 8 times - TMP_JAMP(513) = AMP(746) + AMP(1800) ! used 8 times - TMP_JAMP(512) = AMP(744) - AMP(746) ! used 8 times - TMP_JAMP(511) = TMP_JAMP(365) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(744) ! used 8 times - TMP_JAMP(510) = TMP_JAMP(366) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(739) ! used 8 times - TMP_JAMP(509) = TMP_JAMP(367) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(1411) ! used 8 times - TMP_JAMP(508) = TMP_JAMP(370) - TMP_JAMP(365) ! used 8 times - TMP_JAMP(507) = TMP_JAMP(393) + TMP_JAMP(373) ! used 8 times - TMP_JAMP(506) = AMP(1267) - AMP(1880) ! used 8 times - TMP_JAMP(505) = AMP(1266) + AMP(1267) ! used 8 times - TMP_JAMP(504) = AMP(745) - AMP(1268) ! used 8 times - TMP_JAMP(503) = TMP_JAMP(237) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(703) ! used 8 times - TMP_JAMP(502) = TMP_JAMP(338) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(1266) ! used 8 times - TMP_JAMP(501) = TMP_JAMP(341) - TMP_JAMP(338) ! used 8 times - TMP_JAMP(500) = AMP(1269) - AMP(1615) ! used 8 times - TMP_JAMP(499) = AMP(53) + AMP(1617) ! used 8 times - TMP_JAMP(498) = TMP_JAMP(330) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(50) ! used 8 times - TMP_JAMP(497) = TMP_JAMP(332) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1261) ! used 8 times - TMP_JAMP(496) = AMP(905) + AMP(1799) ! used 8 times - TMP_JAMP(495) = AMP(904) - AMP(1190) ! used 8 times - TMP_JAMP(494) = AMP(903) - AMP(905) ! used 8 times - TMP_JAMP(493) = TMP_JAMP(220) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(862) ! used 8 times - TMP_JAMP(492) = TMP_JAMP(322) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(903) ! used 8 times - TMP_JAMP(491) = TMP_JAMP(325) - TMP_JAMP(322) ! used 8 times - TMP_JAMP(490) = AMP(906) + AMP(1616) ! used 8 times - TMP_JAMP(489) = TMP_JAMP(317) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(898) ! used 8 times - TMP_JAMP(488) = AMP(1149) + AMP(1777) ! used 8 times - TMP_JAMP(487) = TMP_JAMP(368) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(677) ! used 8 times - TMP_JAMP(486) = TMP_JAMP(372) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(1149) ! used 8 times - TMP_JAMP(485) = TMP_JAMP(372) + TMP_JAMP(306) ! used 8 times - TMP_JAMP(484) = TMP_JAMP(379) - TMP_JAMP(367) ! used 8 times - TMP_JAMP(483) = TMP_JAMP(324) + ((0.000000000000000D+00, + TMP_JAMP(774) = TMP_JAMP(653) + TMP_JAMP(652) ! used 8 times + TMP_JAMP(773) = TMP_JAMP(650) + TMP_JAMP(649) ! used 8 times + TMP_JAMP(772) = TMP_JAMP(650) - TMP_JAMP(645) ! used 8 times + TMP_JAMP(771) = TMP_JAMP(649) + TMP_JAMP(645) ! used 8 times + TMP_JAMP(770) = TMP_JAMP(649) + TMP_JAMP(647) ! used 8 times + TMP_JAMP(769) = TMP_JAMP(648) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(837) ! used 8 times + TMP_JAMP(768) = TMP_JAMP(648) - TMP_JAMP(642) ! used 8 times + TMP_JAMP(767) = TMP_JAMP(648) + ((0.000000000000000D+00, $ -1.000000000000000D+00)) * AMP(836) ! used 8 times - TMP_JAMP(482) = TMP_JAMP(395) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(153) ! used 8 times - TMP_JAMP(481) = TMP_JAMP(401) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(1148) ! used 8 times - TMP_JAMP(480) = AMP(624) + AMP(628) ! used 8 times - TMP_JAMP(479) = TMP_JAMP(380) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(624) ! used 8 times - TMP_JAMP(478) = TMP_JAMP(380) - TMP_JAMP(297) ! used 8 times - TMP_JAMP(477) = TMP_JAMP(381) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(515) ! used 8 times - TMP_JAMP(476) = TMP_JAMP(340) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(533) ! used 8 times - TMP_JAMP(475) = TMP_JAMP(389) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(623) ! used 8 times - TMP_JAMP(474) = AMP(1006) + AMP(1012) ! used 8 times - TMP_JAMP(473) = AMP(1004) - AMP(1006) ! used 8 times - TMP_JAMP(472) = AMP(990) - AMP(1651) ! used 8 times - TMP_JAMP(471) = AMP(988) - AMP(1014) ! used 8 times - TMP_JAMP(470) = AMP(986) - AMP(988) ! used 8 times - TMP_JAMP(469) = AMP(495) - AMP(1008) ! used 8 times - TMP_JAMP(468) = AMP(486) + AMP(1653) ! used 8 times - TMP_JAMP(467) = TMP_JAMP(297) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(484) ! used 8 times - TMP_JAMP(466) = TMP_JAMP(388) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(480) ! used 8 times - TMP_JAMP(465) = TMP_JAMP(391) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(986) ! used 8 times - TMP_JAMP(464) = TMP_JAMP(392) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(984) ! used 8 times - TMP_JAMP(463) = TMP_JAMP(393) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1004) ! used 8 times - TMP_JAMP(462) = TMP_JAMP(402) - TMP_JAMP(391) ! used 8 times - TMP_JAMP(461) = TMP_JAMP(405) - TMP_JAMP(393) ! used 8 times - TMP_JAMP(460) = AMP(1007) - AMP(1759) ! used 8 times - TMP_JAMP(459) = AMP(645) + AMP(1652) ! used 8 times - TMP_JAMP(458) = AMP(644) + AMP(1761) ! used 8 times - TMP_JAMP(457) = TMP_JAMP(370) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(641) ! used 8 times - TMP_JAMP(456) = TMP_JAMP(371) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(639) ! used 8 times - TMP_JAMP(455) = TMP_JAMP(373) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(1002) ! used 8 times - TMP_JAMP(454) = AMP(997) - AMP(1013) ! used 8 times - TMP_JAMP(453) = AMP(995) - AMP(997) ! used 8 times - TMP_JAMP(452) = AMP(654) - AMP(998) ! used 8 times - TMP_JAMP(451) = TMP_JAMP(261) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(643) ! used 8 times - TMP_JAMP(450) = TMP_JAMP(359) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(995) ! used 8 times - TMP_JAMP(449) = TMP_JAMP(363) - TMP_JAMP(359) ! used 8 times - TMP_JAMP(448) = AMP(999) - AMP(1705) ! used 8 times - TMP_JAMP(447) = AMP(485) + AMP(1707) ! used 8 times - TMP_JAMP(446) = TMP_JAMP(347) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(482) ! used 8 times - TMP_JAMP(445) = TMP_JAMP(349) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(993) ! used 8 times - TMP_JAMP(444) = AMP(813) - AMP(989) ! used 8 times - TMP_JAMP(443) = AMP(803) + AMP(1760) ! used 8 times - TMP_JAMP(442) = TMP_JAMP(223) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(802) ! used 8 times - TMP_JAMP(441) = TMP_JAMP(325) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(800) ! used 8 times - TMP_JAMP(440) = AMP(804) + AMP(1706) ! used 8 times - TMP_JAMP(439) = TMP_JAMP(321) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(798) ! used 8 times - TMP_JAMP(438) = TMP_JAMP(396) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(149) ! used 8 times - TMP_JAMP(437) = TMP_JAMP(397) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(137) ! used 8 times - TMP_JAMP(436) = TMP_JAMP(361) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(143) ! used 8 times - TMP_JAMP(435) = AMP(283) - AMP(316) ! used 8 times - TMP_JAMP(434) = AMP(265) + AMP(318) ! used 8 times - TMP_JAMP(433) = AMP(263) + AMP(286) ! used 8 times - TMP_JAMP(432) = AMP(194) + AMP(281) ! used 8 times - TMP_JAMP(431) = AMP(180) - AMP(288) ! used 8 times - TMP_JAMP(430) = TMP_JAMP(306) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(182) ! used 8 times - TMP_JAMP(429) = TMP_JAMP(400) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(178) ! used 8 times - TMP_JAMP(428) = TMP_JAMP(402) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(262) ! used 8 times - TMP_JAMP(427) = TMP_JAMP(404) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(261) ! used 8 times - TMP_JAMP(426) = TMP_JAMP(405) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(280) ! used 8 times - TMP_JAMP(425) = AMP(282) + AMP(304) ! used 8 times - TMP_JAMP(424) = AMP(199) - AMP(306) ! used 8 times - TMP_JAMP(423) = AMP(198) - AMP(287) ! used 8 times - TMP_JAMP(422) = TMP_JAMP(382) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(197) ! used 8 times - TMP_JAMP(421) = TMP_JAMP(384) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(196) ! used 8 times - TMP_JAMP(420) = TMP_JAMP(385) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(279) ! used 8 times - TMP_JAMP(419) = AMP(274) + AMP(317) ! used 8 times - TMP_JAMP(418) = AMP(212) + AMP(273) ! used 8 times - TMP_JAMP(417) = TMP_JAMP(264) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(200) ! used 8 times - TMP_JAMP(416) = TMP_JAMP(363) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(271) ! used 8 times - TMP_JAMP(415) = AMP(272) + AMP(295) ! used 8 times - TMP_JAMP(414) = AMP(181) - AMP(297) ! used 8 times - TMP_JAMP(413) = TMP_JAMP(356) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(179) ! used 8 times - TMP_JAMP(412) = TMP_JAMP(357) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(270) ! used 8 times - TMP_JAMP(411) = AMP(230) + AMP(264) ! used 8 times - TMP_JAMP(410) = AMP(217) - AMP(305) ! used 8 times - TMP_JAMP(409) = TMP_JAMP(240) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(218) ! used 8 times - TMP_JAMP(408) = TMP_JAMP(341) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(215) ! used 8 times - TMP_JAMP(407) = AMP(216) - AMP(296) ! used 8 times - TMP_JAMP(406) = TMP_JAMP(336) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(214) ! used 8 times - TMP_JAMP(1123) = TMP_JAMP(1023) + AMP(445) ! used 8 times - TMP_JAMP(1122) = TMP_JAMP(1024) - AMP(477) ! used 8 times - TMP_JAMP(1121) = TMP_JAMP(1025) + AMP(475) ! used 8 times - TMP_JAMP(1120) = TMP_JAMP(1027) - AMP(1827) ! used 8 times - TMP_JAMP(1119) = TMP_JAMP(1030) + AMP(1825) ! used 8 times - TMP_JAMP(1118) = TMP_JAMP(992) + AMP(1517) ! used 8 times - TMP_JAMP(1117) = TMP_JAMP(993) - AMP(1692) ! used 8 times - TMP_JAMP(1116) = TMP_JAMP(995) - AMP(1660) ! used 8 times - TMP_JAMP(1115) = TMP_JAMP(996) + AMP(1074) ! used 8 times - TMP_JAMP(1114) = TMP_JAMP(997) - AMP(1072) ! used 8 times - TMP_JAMP(1113) = TMP_JAMP(965) - AMP(446) ! used 8 times - TMP_JAMP(1112) = TMP_JAMP(966) - AMP(465) ! used 8 times - TMP_JAMP(1111) = TMP_JAMP(949) - AMP(1579) ! used 8 times - TMP_JAMP(1110) = TMP_JAMP(950) - AMP(1887) ! used 8 times - TMP_JAMP(1109) = TMP_JAMP(951) + AMP(1885) ! used 8 times - TMP_JAMP(1108) = TMP_JAMP(921) + AMP(1770) ! used 8 times - TMP_JAMP(1107) = TMP_JAMP(903) + AMP(1571) ! used 8 times - TMP_JAMP(1106) = TMP_JAMP(905) - AMP(1806) ! used 8 times - TMP_JAMP(1105) = TMP_JAMP(907) + AMP(1804) ! used 8 times - TMP_JAMP(1104) = TMP_JAMP(895) - AMP(476) ! used 8 times - TMP_JAMP(1103) = TMP_JAMP(863) + AMP(454) ! used 8 times - TMP_JAMP(1102) = TMP_JAMP(849) - AMP(1525) ! used 8 times - TMP_JAMP(1101) = TMP_JAMP(850) - AMP(1860) ! used 8 times - TMP_JAMP(1100) = TMP_JAMP(851) + AMP(1858) ! used 8 times - TMP_JAMP(1099) = TMP_JAMP(834) - AMP(1714) ! used 8 times - TMP_JAMP(1098) = TMP_JAMP(818) - AMP(1752) ! used 8 times - TMP_JAMP(1097) = TMP_JAMP(820) + AMP(1750) ! used 8 times - TMP_JAMP(1096) = TMP_JAMP(805) - AMP(464) ! used 8 times - TMP_JAMP(1095) = TMP_JAMP(781) - AMP(455) ! used 8 times - TMP_JAMP(1094) = TMP_JAMP(765) - AMP(1633) ! used 8 times - TMP_JAMP(1093) = TMP_JAMP(752) + AMP(1641) ! used 8 times - TMP_JAMP(1092) = TMP_JAMP(718) + AMP(1715) ! used 8 times - TMP_JAMP(1091) = TMP_JAMP(712) - AMP(1136) ! used 8 times - TMP_JAMP(1090) = TMP_JAMP(602) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(600) ! used 8 times - TMP_JAMP(1089) = TMP_JAMP(603) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(601) ! used 8 times - TMP_JAMP(1088) = TMP_JAMP(604) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(598) ! used 8 times - TMP_JAMP(1087) = TMP_JAMP(605) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(599) ! used 8 times - TMP_JAMP(1086) = TMP_JAMP(606) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(597) ! used 8 times - TMP_JAMP(1085) = TMP_JAMP(587) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(586) ! used 8 times - TMP_JAMP(1084) = TMP_JAMP(588) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(585) ! used 8 times - TMP_JAMP(1083) = TMP_JAMP(589) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(584) ! used 8 times - TMP_JAMP(1082) = TMP_JAMP(567) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(566) ! used 8 times - TMP_JAMP(1081) = TMP_JAMP(568) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(565) ! used 8 times - TMP_JAMP(1080) = TMP_JAMP(557) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(556) ! used 8 times - TMP_JAMP(1079) = TMP_JAMP(558) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(555) ! used 8 times - TMP_JAMP(1078) = TMP_JAMP(540) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(539) ! used 8 times - TMP_JAMP(1077) = TMP_JAMP(541) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(538) ! used 8 times - TMP_JAMP(1076) = TMP_JAMP(534) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(533) ! used 8 times - TMP_JAMP(1075) = TMP_JAMP(526) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(523) ! used 8 times - TMP_JAMP(1074) = TMP_JAMP(530) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(522) ! used 8 times - TMP_JAMP(1073) = TMP_JAMP(514) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(510) ! used 8 times - TMP_JAMP(1072) = TMP_JAMP(504) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(503) ! used 8 times - TMP_JAMP(1071) = TMP_JAMP(499) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(498) ! used 8 times - TMP_JAMP(1070) = TMP_JAMP(500) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(497) ! used 8 times - TMP_JAMP(1069) = TMP_JAMP(495) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(493) ! used 8 times - TMP_JAMP(1068) = TMP_JAMP(490) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(489) ! used 8 times - TMP_JAMP(1067) = TMP_JAMP(487) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1779) ! used 8 times - TMP_JAMP(1066) = TMP_JAMP(483) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1778) ! used 8 times - TMP_JAMP(1065) = TMP_JAMP(481) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(1534) ! used 8 times - TMP_JAMP(1064) = TMP_JAMP(482) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1536) ! used 8 times - TMP_JAMP(1063) = TMP_JAMP(477) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(630) ! used 8 times - TMP_JAMP(1062) = TMP_JAMP(476) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(629) ! used 8 times - TMP_JAMP(1061) = TMP_JAMP(475) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1535) ! used 8 times - TMP_JAMP(1060) = TMP_JAMP(468) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(466) ! used 8 times - TMP_JAMP(1059) = TMP_JAMP(469) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(467) ! used 8 times - TMP_JAMP(1058) = TMP_JAMP(472) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(464) ! used 8 times - TMP_JAMP(1057) = TMP_JAMP(458) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(457) ! used 8 times - TMP_JAMP(1056) = TMP_JAMP(459) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(456) ! used 8 times - TMP_JAMP(1055) = TMP_JAMP(460) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(455) ! used 8 times - TMP_JAMP(1054) = TMP_JAMP(452) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(451) ! used 8 times - TMP_JAMP(1053) = TMP_JAMP(447) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(446) ! used 8 times - TMP_JAMP(1052) = TMP_JAMP(448) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(445) ! used 8 times - TMP_JAMP(1051) = TMP_JAMP(443) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(441) ! used 8 times - TMP_JAMP(1050) = TMP_JAMP(444) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(442) ! used 8 times - TMP_JAMP(1049) = TMP_JAMP(440) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(439) ! used 8 times - TMP_JAMP(1048) = TMP_JAMP(437) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(156) ! used 8 times - TMP_JAMP(1047) = TMP_JAMP(438) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(154) ! used 8 times - TMP_JAMP(1046) = TMP_JAMP(436) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(155) ! used 8 times - TMP_JAMP(1045) = TMP_JAMP(431) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(429) ! used 8 times - TMP_JAMP(1044) = TMP_JAMP(432) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(430) ! used 8 times - TMP_JAMP(1043) = TMP_JAMP(433) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(427) ! used 8 times - TMP_JAMP(1042) = TMP_JAMP(434) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(428) ! used 8 times - TMP_JAMP(1041) = TMP_JAMP(435) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(426) ! used 8 times - TMP_JAMP(1040) = TMP_JAMP(423) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(421) ! used 8 times - TMP_JAMP(1039) = TMP_JAMP(424) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(422) ! used 8 times - TMP_JAMP(1038) = TMP_JAMP(425) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(420) ! used 8 times - TMP_JAMP(1037) = TMP_JAMP(418) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(417) ! used 8 times - TMP_JAMP(1036) = TMP_JAMP(419) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(416) ! used 8 times - TMP_JAMP(1035) = TMP_JAMP(414) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(413) ! used 8 times - TMP_JAMP(1034) = TMP_JAMP(415) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(412) ! used 8 times - TMP_JAMP(1033) = TMP_JAMP(410) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(408) ! used 8 times - TMP_JAMP(1032) = TMP_JAMP(411) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(409) ! used 8 times - TMP_JAMP(1031) = TMP_JAMP(407) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(406) ! used 8 times - TMP_JAMP(1140) = TMP_JAMP(1012) + AMP(1518) ! used 7 times - TMP_JAMP(1139) = TMP_JAMP(1019) - AMP(447) ! used 7 times - TMP_JAMP(1138) = TMP_JAMP(988) + AMP(1662) ! used 7 times - TMP_JAMP(1137) = TMP_JAMP(998) + AMP(1690) ! used 7 times - TMP_JAMP(1136) = TMP_JAMP(947) - AMP(1570) ! used 7 times - TMP_JAMP(1135) = TMP_JAMP(920) + AMP(1661) ! used 7 times - TMP_JAMP(1134) = TMP_JAMP(925) - AMP(1691) ! used 7 times - TMP_JAMP(1133) = TMP_JAMP(861) - AMP(456) ! used 7 times - TMP_JAMP(1132) = TMP_JAMP(845) + AMP(1527) ! used 7 times - TMP_JAMP(1131) = TMP_JAMP(831) + AMP(1716) ! used 7 times - TMP_JAMP(1130) = TMP_JAMP(774) - AMP(1301) ! used 7 times - TMP_JAMP(1129) = TMP_JAMP(753) - AMP(1639) ! used 7 times - TMP_JAMP(1128) = TMP_JAMP(741) + AMP(1769) ! used 7 times - TMP_JAMP(1127) = TMP_JAMP(705) + AMP(1634) ! used 7 times - TMP_JAMP(1126) = TMP_JAMP(700) + AMP(1640) ! used 7 times - TMP_JAMP(1125) = TMP_JAMP(695) + AMP(1852) ! used 7 times - TMP_JAMP(1124) = TMP_JAMP(674) + AMP(1744) ! used 7 times - TMP_JAMP(1158) = TMP_JAMP(1026) - AMP(1516) ! used 6 times - TMP_JAMP(1157) = TMP_JAMP(967) + AMP(463) ! used 6 times - TMP_JAMP(1156) = TMP_JAMP(973) - AMP(1826) ! used 6 times - TMP_JAMP(1155) = TMP_JAMP(941) + AMP(1572) ! used 6 times - TMP_JAMP(1154) = TMP_JAMP(928) - AMP(1768) ! used 6 times - TMP_JAMP(1153) = TMP_JAMP(904) + AMP(1580) ! used 6 times - TMP_JAMP(1152) = TMP_JAMP(943) + AMP(1581) ! used 6 times - TMP_JAMP(1151) = TMP_JAMP(878) + AMP(1073) ! used 6 times - TMP_JAMP(1150) = TMP_JAMP(846) - AMP(1476) ! used 6 times - TMP_JAMP(1149) = TMP_JAMP(817) + AMP(1526) ! used 6 times - TMP_JAMP(1148) = TMP_JAMP(762) + AMP(1635) ! used 6 times - TMP_JAMP(1147) = TMP_JAMP(742) - AMP(1049) ! used 6 times - TMP_JAMP(1146) = TMP_JAMP(728) - AMP(1214) ! used 6 times - TMP_JAMP(1145) = TMP_JAMP(692) - AMP(1854) ! used 6 times - TMP_JAMP(1144) = TMP_JAMP(671) - AMP(1746) ! used 6 times - TMP_JAMP(1143) = TMP_JAMP(650) + AMP(1626) ! used 6 times - TMP_JAMP(1142) = TMP_JAMP(652) - AMP(1624) ! used 6 times - TMP_JAMP(1141) = TMP_JAMP(633) + AMP(1625) ! used 6 times - TMP_JAMP(1168) = TMP_JAMP(1015) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1010) ! used 5 times - TMP_JAMP(1167) = TMP_JAMP(971) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(964) ! used 5 times - TMP_JAMP(1166) = TMP_JAMP(924) - AMP(1124) ! used 5 times - TMP_JAMP(1165) = TMP_JAMP(894) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(890) ! used 5 times - TMP_JAMP(1164) = TMP_JAMP(876) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(874) ! used 5 times - TMP_JAMP(1163) = TMP_JAMP(793) - AMP(1886) ! used 5 times - TMP_JAMP(1162) = TMP_JAMP(776) - AMP(1859) ! used 5 times - TMP_JAMP(1161) = TMP_JAMP(791) - AMP(1292) ! used 5 times - TMP_JAMP(1160) = TMP_JAMP(729) - AMP(1805) ! used 5 times - TMP_JAMP(1159) = TMP_JAMP(713) - AMP(1751) ! used 5 times - TMP_JAMP(1837) = AMP(437) + AMP(472) ! used 4 times - TMP_JAMP(1836) = AMP(419) - AMP(474) ! used 4 times - TMP_JAMP(1835) = AMP(416) + AMP(451) ! used 4 times - TMP_JAMP(1834) = AMP(350) - AMP(453) ! used 4 times - TMP_JAMP(1833) = AMP(85) - AMP(1515) ! used 4 times - TMP_JAMP(1832) = TMP_JAMP(1011) + AMP(352) ! used 4 times - TMP_JAMP(1831) = TMP_JAMP(1018) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(85) ! used 4 times - TMP_JAMP(1830) = TMP_JAMP(1022) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1011) ! used 4 times - TMP_JAMP(1829) = TMP_JAMP(1029) + TMP_JAMP(1022) ! used 4 times - TMP_JAMP(1828) = TMP_JAMP(1119) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(416) ! used 4 times - TMP_JAMP(1827) = TMP_JAMP(1120) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(350) ! used 4 times - TMP_JAMP(1826) = TMP_JAMP(1120) + TMP_JAMP(1119) ! used 4 times - TMP_JAMP(1825) = TMP_JAMP(1121) + TMP_JAMP(1017) ! used 4 times - TMP_JAMP(1824) = TMP_JAMP(1122) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(419) ! used 4 times - TMP_JAMP(1823) = TMP_JAMP(1123) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(416) ! used 4 times - TMP_JAMP(1822) = TMP_JAMP(1123) + TMP_JAMP(1122) ! used 4 times - TMP_JAMP(1821) = TMP_JAMP(1158) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1118) ! used 4 times - TMP_JAMP(1820) = TMP_JAMP(1168) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(98) ! used 4 times - TMP_JAMP(1819) = TMP_JAMP(1168) + TMP_JAMP(1016) ! used 4 times - TMP_JAMP(1818) = AMP(1061) + AMP(1069) ! used 4 times - TMP_JAMP(1817) = AMP(1043) - AMP(1071) ! used 4 times - TMP_JAMP(1816) = AMP(1041) + AMP(1663) ! used 4 times - TMP_JAMP(1815) = AMP(593) - AMP(1514) ! used 4 times - TMP_JAMP(1814) = AMP(510) - AMP(1665) ! used 4 times - TMP_JAMP(1813) = TMP_JAMP(987) + AMP(511) ! used 4 times - TMP_JAMP(1812) = TMP_JAMP(991) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(987) ! used 4 times - TMP_JAMP(1811) = TMP_JAMP(994) - TMP_JAMP(991) ! used 4 times - TMP_JAMP(1810) = TMP_JAMP(1016) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1043) ! used 4 times - TMP_JAMP(1809) = TMP_JAMP(1114) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1061) ! used 4 times - TMP_JAMP(1808) = TMP_JAMP(1114) + TMP_JAMP(1017) ! used 4 times - TMP_JAMP(1807) = TMP_JAMP(1115) + TMP_JAMP(1016) ! used 4 times - TMP_JAMP(1806) = TMP_JAMP(1116) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1041) ! used 4 times - TMP_JAMP(1805) = TMP_JAMP(1116) + TMP_JAMP(1115) ! used 4 times - TMP_JAMP(1804) = TMP_JAMP(1118) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(593) ! used 4 times - TMP_JAMP(1803) = TMP_JAMP(1137) + TMP_JAMP(1116) ! used 4 times - TMP_JAMP(1802) = TMP_JAMP(1137) + TMP_JAMP(1117) ! used 4 times - TMP_JAMP(1801) = TMP_JAMP(1140) + TMP_JAMP(1118) ! used 4 times - TMP_JAMP(1800) = AMP(443) + AMP(466) ! used 4 times - TMP_JAMP(1799) = AMP(368) - AMP(452) ! used 4 times - TMP_JAMP(1798) = AMP(361) - AMP(468) ! used 4 times - TMP_JAMP(1797) = TMP_JAMP(972) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(627) ! used 4 times - TMP_JAMP(1796) = TMP_JAMP(1029) - TMP_JAMP(994) ! used 4 times - TMP_JAMP(1795) = TMP_JAMP(1112) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(361) ! used 4 times - TMP_JAMP(1794) = TMP_JAMP(1112) - TMP_JAMP(969) ! used 4 times - TMP_JAMP(1793) = TMP_JAMP(1139) + TMP_JAMP(1113) ! used 4 times - TMP_JAMP(1792) = TMP_JAMP(1157) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(443) ! used 4 times - TMP_JAMP(1791) = TMP_JAMP(1157) - TMP_JAMP(972) ! used 4 times - TMP_JAMP(1790) = AMP(1459) + AMP(1888) ! used 4 times - TMP_JAMP(1789) = AMP(1210) - AMP(1890) ! used 4 times - TMP_JAMP(1788) = AMP(1204) + AMP(1573) ! used 4 times - TMP_JAMP(1787) = TMP_JAMP(944) - AMP(1467) ! used 4 times - TMP_JAMP(1786) = TMP_JAMP(969) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1210) ! used 4 times - TMP_JAMP(1785) = TMP_JAMP(1018) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(110) ! used 4 times - TMP_JAMP(1784) = TMP_JAMP(1109) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(1459) ! used 4 times - TMP_JAMP(1783) = TMP_JAMP(1111) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1204) ! used 4 times - TMP_JAMP(1782) = TMP_JAMP(1111) - TMP_JAMP(1110) ! used 4 times - TMP_JAMP(1781) = TMP_JAMP(1155) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(93) ! used 4 times - TMP_JAMP(1780) = AMP(1063) + AMP(1765) ! used 4 times - TMP_JAMP(1779) = AMP(669) - AMP(1664) ! used 4 times - TMP_JAMP(1778) = AMP(660) - AMP(1767) ! used 4 times - TMP_JAMP(1777) = TMP_JAMP(930) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(1152) ! used 4 times - TMP_JAMP(1776) = TMP_JAMP(1108) + ((0.000000000000000D+00, + TMP_JAMP(766) = TMP_JAMP(647) - TMP_JAMP(646) ! used 8 times + TMP_JAMP(765) = TMP_JAMP(647) - TMP_JAMP(640) ! used 8 times + TMP_JAMP(764) = TMP_JAMP(646) - TMP_JAMP(640) ! used 8 times + TMP_JAMP(763) = TMP_JAMP(645) + TMP_JAMP(643) ! used 8 times + TMP_JAMP(762) = TMP_JAMP(644) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(855) ! used 8 times + TMP_JAMP(761) = TMP_JAMP(644) - TMP_JAMP(643) ! used 8 times + TMP_JAMP(760) = TMP_JAMP(644) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(854) ! used 8 times + TMP_JAMP(759) = TMP_JAMP(643) - TMP_JAMP(642) ! used 8 times + TMP_JAMP(758) = TMP_JAMP(643) - TMP_JAMP(639) ! used 8 times + TMP_JAMP(757) = TMP_JAMP(642) - TMP_JAMP(639) ! used 8 times + TMP_JAMP(756) = TMP_JAMP(641) - TMP_JAMP(640) ! used 8 times + TMP_JAMP(755) = TMP_JAMP(641) + TMP_JAMP(639) ! used 8 times + TMP_JAMP(754) = TMP_JAMP(641) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(940) ! used 8 times + TMP_JAMP(753) = TMP_JAMP(640) + TMP_JAMP(639) ! used 8 times + TMP_JAMP(752) = TMP_JAMP(608) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(942) ! used 8 times + TMP_JAMP(751) = TMP_JAMP(608) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(944) ! used 8 times + TMP_JAMP(750) = TMP_JAMP(604) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(833) ! used 8 times + TMP_JAMP(749) = TMP_JAMP(604) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(835) ! used 8 times + TMP_JAMP(748) = TMP_JAMP(602) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(851) ! used 8 times + TMP_JAMP(747) = TMP_JAMP(602) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(853) ! used 8 times + TMP_JAMP(746) = AMP(597) - AMP(599) ! used 8 times + TMP_JAMP(745) = AMP(592) + AMP(600) ! used 8 times + TMP_JAMP(744) = AMP(502) + AMP(513) ! used 8 times + TMP_JAMP(743) = AMP(498) + AMP(504) ! used 8 times + TMP_JAMP(742) = AMP(626) + AMP(631) ! used 8 times + TMP_JAMP(741) = AMP(526) + AMP(598) ! used 8 times + TMP_JAMP(740) = AMP(517) - AMP(633) ! used 8 times + TMP_JAMP(739) = AMP(756) - AMP(758) ! used 8 times + TMP_JAMP(738) = AMP(685) + AMP(757) ! used 8 times + TMP_JAMP(737) = AMP(659) + AMP(662) ! used 8 times + TMP_JAMP(736) = AMP(657) + AMP(663) ! used 8 times + TMP_JAMP(735) = AMP(768) - AMP(770) ! used 8 times + TMP_JAMP(734) = AMP(763) + AMP(771) ! used 8 times + TMP_JAMP(733) = AMP(751) + AMP(759) ! used 8 times + TMP_JAMP(732) = AMP(661) + AMP(672) ! used 8 times + TMP_JAMP(731) = AMP(785) + AMP(790) ! used 8 times + TMP_JAMP(730) = AMP(676) - AMP(792) ! used 8 times + TMP_JAMP(729) = AMP(500) + AMP(503) ! used 8 times + TMP_JAMP(728) = AMP(609) - AMP(611) ! used 8 times + TMP_JAMP(727) = AMP(604) + AMP(612) ! used 8 times + TMP_JAMP(726) = AMP(535) - AMP(632) ! used 8 times + TMP_JAMP(725) = AMP(706) + AMP(769) ! used 8 times + TMP_JAMP(724) = AMP(694) - AMP(791) ! used 8 times + TMP_JAMP(723) = AMP(547) + AMP(610) ! used 8 times + TMP_JAMP(722) = AMP(820) + AMP(831) ! used 8 times + TMP_JAMP(721) = AMP(818) + AMP(821) ! used 8 times + TMP_JAMP(720) = AMP(927) - AMP(929) ! used 8 times + TMP_JAMP(719) = AMP(865) + AMP(928) ! used 8 times + TMP_JAMP(718) = AMP(816) + AMP(822) ! used 8 times + TMP_JAMP(717) = AMP(936) - AMP(938) ! used 8 times + TMP_JAMP(716) = AMP(847) + AMP(937) ! used 8 times + TMP_JAMP(715) = AMP(922) + AMP(930) ! used 8 times + TMP_JAMP(714) = AMP(931) + AMP(939) ! used 8 times + TMP_JAMP(713) = AMP(585) - AMP(587) ! used 8 times + TMP_JAMP(712) = AMP(580) + AMP(588) ! used 8 times + TMP_JAMP(711) = AMP(544) + AMP(586) ! used 8 times + TMP_JAMP(710) = AMP(915) - AMP(917) ! used 8 times + TMP_JAMP(709) = AMP(844) + AMP(916) ! used 8 times + TMP_JAMP(708) = AMP(910) + AMP(918) ! used 8 times + TMP_JAMP(707) = AMP(618) - AMP(620) ! used 8 times + TMP_JAMP(706) = AMP(613) + AMP(621) ! used 8 times + TMP_JAMP(705) = AMP(529) + AMP(619) ! used 8 times + TMP_JAMP(704) = AMP(783) + AMP(787) ! used 8 times + TMP_JAMP(703) = AMP(674) - AMP(789) ! used 8 times + TMP_JAMP(702) = AMP(692) - AMP(788) ! used 8 times + TMP_JAMP(701) = AMP(777) - AMP(779) ! used 8 times + TMP_JAMP(700) = AMP(688) + AMP(778) ! used 8 times + TMP_JAMP(699) = AMP(772) + AMP(780) ! used 8 times + TMP_JAMP(698) = AMP(744) - AMP(746) ! used 8 times + TMP_JAMP(697) = AMP(739) + AMP(747) ! used 8 times + TMP_JAMP(696) = AMP(703) + AMP(745) ! used 8 times + TMP_JAMP(695) = AMP(903) - AMP(905) ! used 8 times + TMP_JAMP(694) = AMP(862) + AMP(904) ! used 8 times + TMP_JAMP(693) = AMP(898) + AMP(906) ! used 8 times + TMP_JAMP(692) = AMP(624) + AMP(628) ! used 8 times + TMP_JAMP(691) = AMP(515) - AMP(630) ! used 8 times + TMP_JAMP(690) = AMP(533) - AMP(629) ! used 8 times + TMP_JAMP(689) = AMP(484) + AMP(495) ! used 8 times + TMP_JAMP(688) = AMP(480) + AMP(486) ! used 8 times + TMP_JAMP(687) = AMP(641) + AMP(644) ! used 8 times + TMP_JAMP(686) = AMP(639) + AMP(645) ! used 8 times + TMP_JAMP(685) = AMP(643) + AMP(654) ! used 8 times + TMP_JAMP(684) = AMP(482) + AMP(485) ! used 8 times + TMP_JAMP(683) = AMP(802) + AMP(813) ! used 8 times + TMP_JAMP(682) = AMP(800) + AMP(803) ! used 8 times + TMP_JAMP(681) = AMP(798) + AMP(804) ! used 8 times + TMP_JAMP(1043) = TMP_JAMP(834) + TMP_JAMP(785) ! used 4 times + TMP_JAMP(1042) = TMP_JAMP(834) + TMP_JAMP(819) ! used 4 times + TMP_JAMP(1041) = TMP_JAMP(831) - TMP_JAMP(680) ! used 4 times + TMP_JAMP(1040) = TMP_JAMP(829) + TMP_JAMP(827) ! used 4 times + TMP_JAMP(1039) = TMP_JAMP(829) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(707) ! used 4 times + TMP_JAMP(1038) = TMP_JAMP(827) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(729) ! used 4 times + TMP_JAMP(1037) = TMP_JAMP(822) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(692) ! used 4 times + TMP_JAMP(1036) = TMP_JAMP(821) - TMP_JAMP(785) ! used 4 times + TMP_JAMP(1035) = TMP_JAMP(817) - TMP_JAMP(676) ! used 4 times + TMP_JAMP(1034) = TMP_JAMP(817) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(741) ! used 4 times + TMP_JAMP(1033) = TMP_JAMP(814) + TMP_JAMP(771) ! used 4 times + TMP_JAMP(1032) = TMP_JAMP(814) + TMP_JAMP(792) ! used 4 times + TMP_JAMP(1031) = TMP_JAMP(814) + TMP_JAMP(801) ! used 4 times + TMP_JAMP(1030) = TMP_JAMP(811) + TMP_JAMP(672) ! used 4 times + TMP_JAMP(1029) = TMP_JAMP(810) + TMP_JAMP(809) ! used 4 times + TMP_JAMP(1028) = TMP_JAMP(810) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(701) ! used 4 times + TMP_JAMP(1027) = TMP_JAMP(809) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(732) ! used 4 times + TMP_JAMP(1026) = TMP_JAMP(804) + TMP_JAMP(767) ! used 4 times + TMP_JAMP(1025) = TMP_JAMP(803) + TMP_JAMP(792) ! used 4 times + TMP_JAMP(1024) = TMP_JAMP(798) - TMP_JAMP(668) ! used 4 times + TMP_JAMP(1023) = TMP_JAMP(798) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(734) ! used 4 times + TMP_JAMP(1022) = TMP_JAMP(792) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(731) ! used 4 times + TMP_JAMP(1021) = TMP_JAMP(792) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(703) ! used 4 times + TMP_JAMP(1020) = TMP_JAMP(786) + TMP_JAMP(760) ! used 4 times + TMP_JAMP(1019) = TMP_JAMP(785) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(728) ! used 4 times + TMP_JAMP(1018) = TMP_JAMP(785) + TMP_JAMP(759) ! used 4 times + TMP_JAMP(1017) = TMP_JAMP(785) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(712) ! used 4 times + TMP_JAMP(1016) = TMP_JAMP(779) - AMP(617) ! used 4 times + TMP_JAMP(1015) = TMP_JAMP(779) + TMP_JAMP(775) ! used 4 times + TMP_JAMP(1014) = TMP_JAMP(778) - TMP_JAMP(675) ! used 4 times + TMP_JAMP(1013) = TMP_JAMP(778) + TMP_JAMP(674) ! used 4 times + TMP_JAMP(1012) = TMP_JAMP(778) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(723) ! used 4 times + TMP_JAMP(1011) = TMP_JAMP(775) - AMP(776) ! used 4 times + TMP_JAMP(1010) = TMP_JAMP(774) - TMP_JAMP(665) ! used 4 times + TMP_JAMP(1009) = TMP_JAMP(774) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(724) ! used 4 times + TMP_JAMP(1008) = TMP_JAMP(773) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(721) ! used 4 times + TMP_JAMP(1007) = TMP_JAMP(772) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(718) ! used 4 times + TMP_JAMP(1006) = TMP_JAMP(771) + TMP_JAMP(759) ! used 4 times + TMP_JAMP(1005) = TMP_JAMP(771) + TMP_JAMP(766) ! used 4 times + TMP_JAMP(1004) = TMP_JAMP(769) - AMP(832) ! used 4 times + TMP_JAMP(1003) = TMP_JAMP(769) + AMP(819) ! used 4 times + TMP_JAMP(1002) = TMP_JAMP(766) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(720) ! used 4 times + TMP_JAMP(1001) = TMP_JAMP(759) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(717) ! used 4 times + TMP_JAMP(1000) = TMP_JAMP(753) - TMP_JAMP(646) ! used 4 times + TMP_JAMP(999) = TMP_JAMP(752) + AMP(943) ! used 4 times + TMP_JAMP(998) = TMP_JAMP(751) + TMP_JAMP(749) ! used 4 times + TMP_JAMP(997) = TMP_JAMP(751) - TMP_JAMP(747) ! used 4 times + TMP_JAMP(996) = TMP_JAMP(750) - AMP(832) ! used 4 times + TMP_JAMP(995) = TMP_JAMP(750) + TMP_JAMP(748) ! used 4 times + TMP_JAMP(994) = TMP_JAMP(749) - AMP(834) ! used 4 times + TMP_JAMP(993) = TMP_JAMP(748) - AMP(850) ! used 4 times + TMP_JAMP(992) = TMP_JAMP(747) - AMP(852) ! used 4 times + TMP_JAMP(991) = TMP_JAMP(746) - TMP_JAMP(745) ! used 4 times + TMP_JAMP(990) = TMP_JAMP(746) + TMP_JAMP(739) ! used 4 times + TMP_JAMP(989) = TMP_JAMP(746) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(596) ! used 4 times + TMP_JAMP(988) = TMP_JAMP(745) - TMP_JAMP(741) ! used 4 times + TMP_JAMP(987) = TMP_JAMP(745) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(601) ! used 4 times + TMP_JAMP(986) = TMP_JAMP(744) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(511) ! used 4 times + TMP_JAMP(985) = TMP_JAMP(744) + TMP_JAMP(729) ! used 4 times + TMP_JAMP(984) = TMP_JAMP(743) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(510) ! used 4 times + TMP_JAMP(983) = TMP_JAMP(743) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(499) ! used 4 times + TMP_JAMP(982) = TMP_JAMP(742) - TMP_JAMP(726) ! used 4 times + TMP_JAMP(981) = TMP_JAMP(742) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(494) ! used 4 times + TMP_JAMP(980) = TMP_JAMP(741) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(528) ! used 4 times + TMP_JAMP(979) = TMP_JAMP(741) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(527) ! used 4 times + TMP_JAMP(978) = TMP_JAMP(740) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(528) ! used 4 times + TMP_JAMP(977) = TMP_JAMP(740) + TMP_JAMP(726) ! used 4 times + TMP_JAMP(976) = TMP_JAMP(740) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(516) ! used 4 times + TMP_JAMP(975) = TMP_JAMP(739) - TMP_JAMP(738) ! used 4 times + TMP_JAMP(974) = TMP_JAMP(739) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(755) ! used 4 times + TMP_JAMP(973) = TMP_JAMP(738) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(686) ! used 4 times + TMP_JAMP(972) = TMP_JAMP(738) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(687) ! used 4 times + TMP_JAMP(971) = TMP_JAMP(737) + ((0.000000000000000D+00, $ -1.000000000000000D+00)) * AMP(660) ! used 4 times - TMP_JAMP(1775) = TMP_JAMP(1134) + ((0.000000000000000D+00 + TMP_JAMP(970) = TMP_JAMP(737) + TMP_JAMP(721) ! used 4 times + TMP_JAMP(969) = TMP_JAMP(737) + TMP_JAMP(732) ! used 4 times + TMP_JAMP(968) = TMP_JAMP(736) + ((0.000000000000000D+00 $ ,1.000000000000000D+00)) * AMP(669) ! used 4 times - TMP_JAMP(1774) = TMP_JAMP(1134) + TMP_JAMP(1117) ! used 4 times - TMP_JAMP(1773) = TMP_JAMP(1138) + TMP_JAMP(1135) ! used 4 times - TMP_JAMP(1772) = TMP_JAMP(1154) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(1063) ! used 4 times - TMP_JAMP(1771) = AMP(1461) + AMP(1807) ! used 4 times - TMP_JAMP(1770) = AMP(767) - AMP(1809) ! used 4 times - TMP_JAMP(1769) = AMP(760) - AMP(1574) ! used 4 times - TMP_JAMP(1768) = TMP_JAMP(923) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(767) ! used 4 times - TMP_JAMP(1767) = TMP_JAMP(1105) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1461) ! used 4 times - TMP_JAMP(1766) = TMP_JAMP(1106) + TMP_JAMP(923) ! used 4 times - TMP_JAMP(1765) = TMP_JAMP(1106) + TMP_JAMP(1105) ! used 4 times - TMP_JAMP(1764) = TMP_JAMP(1107) + ((-0.000000000000000D+00, + TMP_JAMP(967) = TMP_JAMP(736) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(658) ! used 4 times + TMP_JAMP(966) = TMP_JAMP(735) - TMP_JAMP(734) ! used 4 times + TMP_JAMP(965) = TMP_JAMP(735) + TMP_JAMP(720) ! used 4 times + TMP_JAMP(964) = TMP_JAMP(735) - TMP_JAMP(725) ! used 4 times + TMP_JAMP(963) = TMP_JAMP(735) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(648) ! used 4 times + TMP_JAMP(962) = TMP_JAMP(734) - TMP_JAMP(725) ! used 4 times + TMP_JAMP(961) = TMP_JAMP(734) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(764) ! used 4 times + TMP_JAMP(960) = TMP_JAMP(733) + ((-0.000000000000000D+00, $ -1.000000000000000D+00)) * AMP(760) ! used 4 times - TMP_JAMP(1763) = AMP(1196) + AMP(1567) ! used 4 times - TMP_JAMP(1762) = AMP(428) - AMP(473) ! used 4 times - TMP_JAMP(1761) = AMP(87) - AMP(1569) ! used 4 times - TMP_JAMP(1760) = TMP_JAMP(892) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(87) ! used 4 times - TMP_JAMP(1759) = TMP_JAMP(896) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(370) ! used 4 times - TMP_JAMP(1758) = TMP_JAMP(1016) + TMP_JAMP(891) ! used 4 times - TMP_JAMP(1757) = TMP_JAMP(1104) + TMP_JAMP(891) ! used 4 times - TMP_JAMP(1756) = TMP_JAMP(1122) + TMP_JAMP(1104) ! used 4 times - TMP_JAMP(1755) = TMP_JAMP(1123) - TMP_JAMP(1113) ! used 4 times - TMP_JAMP(1754) = TMP_JAMP(1136) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1196) ! used 4 times - TMP_JAMP(1753) = TMP_JAMP(1136) - TMP_JAMP(896) ! used 4 times - TMP_JAMP(1752) = AMP(1052) - AMP(1070) ! used 4 times - TMP_JAMP(1751) = AMP(752) - AMP(1568) ! used 4 times - TMP_JAMP(1750) = TMP_JAMP(892) + TMP_JAMP(877) ! used 4 times - TMP_JAMP(1749) = TMP_JAMP(1107) + ((0.000000000000000D+00 + TMP_JAMP(959) = TMP_JAMP(733) + ((0.000000000000000D+00 $ ,1.000000000000000D+00)) * AMP(752) ! used 4 times - TMP_JAMP(1748) = TMP_JAMP(1134) - TMP_JAMP(1107) ! used 4 times - TMP_JAMP(1747) = TMP_JAMP(1151) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1052) ! used 4 times - TMP_JAMP(1746) = TMP_JAMP(1151) + TMP_JAMP(891) ! used 4 times - TMP_JAMP(1745) = AMP(434) + AMP(457) ! used 4 times - TMP_JAMP(1744) = AMP(343) - AMP(459) ! used 4 times - TMP_JAMP(1743) = TMP_JAMP(877) + ((0.000000000000000D+00, + TMP_JAMP(958) = TMP_JAMP(732) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(670) ! used 4 times + TMP_JAMP(957) = TMP_JAMP(731) + ((0.000000000000000D+00, $ -1.000000000000000D+00)) * AMP(786) ! used 4 times - TMP_JAMP(1742) = TMP_JAMP(877) + TMP_JAMP(865) ! used 4 times - TMP_JAMP(1741) = TMP_JAMP(1133) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(343) ! used 4 times - TMP_JAMP(1740) = TMP_JAMP(1133) + TMP_JAMP(1103) ! used 4 times - TMP_JAMP(1739) = TMP_JAMP(1136) - TMP_JAMP(1107) ! used 4 times - TMP_JAMP(1738) = AMP(1468) + AMP(1861) ! used 4 times - TMP_JAMP(1737) = AMP(1132) - AMP(1863) ! used 4 times - TMP_JAMP(1736) = AMP(1126) + AMP(1519) ! used 4 times - TMP_JAMP(1735) = AMP(96) - AMP(1521) ! used 4 times - TMP_JAMP(1734) = TMP_JAMP(1100) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(1468) ! used 4 times - TMP_JAMP(1733) = TMP_JAMP(1100) - TMP_JAMP(865) ! used 4 times - TMP_JAMP(1732) = TMP_JAMP(1102) - TMP_JAMP(1101) ! used 4 times - TMP_JAMP(1731) = TMP_JAMP(1140) - TMP_JAMP(1132) ! used 4 times - TMP_JAMP(1730) = TMP_JAMP(1150) - TMP_JAMP(892) ! used 4 times - TMP_JAMP(1729) = AMP(1054) + AMP(1711) ! used 4 times - TMP_JAMP(1728) = AMP(501) - AMP(1713) ! used 4 times - TMP_JAMP(1727) = TMP_JAMP(896) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1230) ! used 4 times - TMP_JAMP(1726) = TMP_JAMP(896) - TMP_JAMP(835) ! used 4 times - TMP_JAMP(1725) = TMP_JAMP(1131) + ((0.000000000000000D+00, + TMP_JAMP(956) = TMP_JAMP(731) - TMP_JAMP(724) ! used 4 times + TMP_JAMP(955) = TMP_JAMP(730) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(687) ! used 4 times + TMP_JAMP(954) = TMP_JAMP(730) + TMP_JAMP(724) ! used 4 times + TMP_JAMP(953) = TMP_JAMP(730) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(675) ! used 4 times + TMP_JAMP(952) = TMP_JAMP(729) + ((0.000000000000000D+00, $ -1.000000000000000D+00)) * AMP(501) ! used 4 times - TMP_JAMP(1724) = TMP_JAMP(1131) + TMP_JAMP(1099) ! used 4 times - TMP_JAMP(1723) = AMP(1470) + AMP(1753) ! used 4 times - TMP_JAMP(1722) = AMP(608) - AMP(1755) ! used 4 times - TMP_JAMP(1721) = AMP(601) - AMP(1520) ! used 4 times - TMP_JAMP(1720) = TMP_JAMP(835) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1470) ! used 4 times - TMP_JAMP(1719) = TMP_JAMP(1097) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1470) ! used 4 times - TMP_JAMP(1718) = TMP_JAMP(1098) + ((-0.000000000000000D+00 + TMP_JAMP(951) = TMP_JAMP(729) + TMP_JAMP(718) ! used 4 times + TMP_JAMP(950) = TMP_JAMP(728) + ((-0.000000000000000D+00 $ ,1.000000000000000D+00)) * AMP(608) ! used 4 times - TMP_JAMP(1717) = TMP_JAMP(1098) + TMP_JAMP(1097) ! used 4 times - TMP_JAMP(1716) = TMP_JAMP(1149) - TMP_JAMP(1118) ! used 4 times - TMP_JAMP(1715) = AMP(1452) + AMP(1693) ! used 4 times - TMP_JAMP(1714) = AMP(596) - AMP(1695) ! used 4 times - TMP_JAMP(1713) = AMP(379) - AMP(467) ! used 4 times - TMP_JAMP(1712) = TMP_JAMP(806) - AMP(423) ! used 4 times - TMP_JAMP(1711) = TMP_JAMP(969) + TMP_JAMP(808) ! used 4 times - TMP_JAMP(1710) = TMP_JAMP(1096) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(379) ! used 4 times - TMP_JAMP(1709) = TMP_JAMP(1112) + TMP_JAMP(1096) ! used 4 times - TMP_JAMP(1708) = TMP_JAMP(1117) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(596) ! used 4 times - TMP_JAMP(1707) = TMP_JAMP(1117) + TMP_JAMP(809) ! used 4 times - TMP_JAMP(1706) = TMP_JAMP(1137) - TMP_JAMP(1119) ! used 4 times - TMP_JAMP(1705) = AMP(1288) - AMP(1889) ! used 4 times - TMP_JAMP(1704) = AMP(755) - AMP(1694) ! used 4 times - TMP_JAMP(1703) = TMP_JAMP(790) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(708) ! used 4 times - TMP_JAMP(1702) = TMP_JAMP(808) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1288) ! used 4 times - TMP_JAMP(1701) = TMP_JAMP(809) + TMP_JAMP(790) ! used 4 times - TMP_JAMP(1700) = AMP(381) - AMP(458) ! used 4 times - TMP_JAMP(1699) = TMP_JAMP(790) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(693) ! used 4 times - TMP_JAMP(1698) = TMP_JAMP(810) - TMP_JAMP(790) ! used 4 times - TMP_JAMP(1697) = TMP_JAMP(1095) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(381) ! used 4 times - TMP_JAMP(1696) = TMP_JAMP(1095) - TMP_JAMP(782) ! used 4 times - TMP_JAMP(1695) = AMP(1297) - AMP(1862) ! used 4 times - TMP_JAMP(1694) = TMP_JAMP(782) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1297) ! used 4 times - TMP_JAMP(1693) = TMP_JAMP(809) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(549) ! used 4 times - TMP_JAMP(1692) = TMP_JAMP(1130) - TMP_JAMP(809) ! used 4 times - TMP_JAMP(1691) = AMP(1286) + AMP(1630) ! used 4 times - TMP_JAMP(1690) = TMP_JAMP(764) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(97) ! used 4 times - TMP_JAMP(1689) = TMP_JAMP(810) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1307) ! used 4 times - TMP_JAMP(1688) = TMP_JAMP(1094) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(1286) ! used 4 times - TMP_JAMP(1687) = TMP_JAMP(1094) + TMP_JAMP(766) ! used 4 times - TMP_JAMP(1686) = TMP_JAMP(1148) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(105) ! used 4 times - TMP_JAMP(1685) = AMP(1295) + AMP(1636) ! used 4 times - TMP_JAMP(1684) = AMP(117) - AMP(1638) ! used 4 times - TMP_JAMP(1683) = TMP_JAMP(766) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1295) ! used 4 times - TMP_JAMP(1682) = TMP_JAMP(1093) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(117) ! used 4 times - TMP_JAMP(1681) = TMP_JAMP(1129) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(1295) ! used 4 times - TMP_JAMP(1680) = TMP_JAMP(1130) - TMP_JAMP(1129) ! used 4 times - TMP_JAMP(1679) = AMP(1120) - AMP(1830) ! used 4 times - TMP_JAMP(1678) = AMP(819) - AMP(1766) ! used 4 times - TMP_JAMP(1677) = TMP_JAMP(733) + AMP(1120) ! used 4 times - TMP_JAMP(1676) = TMP_JAMP(923) + TMP_JAMP(746) ! used 4 times - TMP_JAMP(1675) = TMP_JAMP(1119) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1450) ! used 4 times - TMP_JAMP(1674) = TMP_JAMP(1120) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(733) ! used 4 times - TMP_JAMP(1673) = TMP_JAMP(1120) - TMP_JAMP(745) ! used 4 times - TMP_JAMP(1672) = TMP_JAMP(1128) + TMP_JAMP(1108) ! used 4 times - TMP_JAMP(1671) = TMP_JAMP(1147) + ((-0.000000000000000D+00 + TMP_JAMP(949) = TMP_JAMP(728) + TMP_JAMP(717) ! used 4 times + TMP_JAMP(948) = TMP_JAMP(728) - TMP_JAMP(723) ! used 4 times + TMP_JAMP(947) = TMP_JAMP(727) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(601) ! used 4 times + TMP_JAMP(946) = TMP_JAMP(727) - TMP_JAMP(723) ! used 4 times + TMP_JAMP(945) = TMP_JAMP(727) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(605) ! used 4 times + TMP_JAMP(944) = TMP_JAMP(726) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(534) ! used 4 times + TMP_JAMP(943) = TMP_JAMP(725) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(708) ! used 4 times + TMP_JAMP(942) = TMP_JAMP(724) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(693) ! used 4 times + TMP_JAMP(941) = TMP_JAMP(723) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(549) ! used 4 times + TMP_JAMP(940) = TMP_JAMP(722) + ((-0.000000000000000D+00 $ ,1.000000000000000D+00)) * AMP(830) ! used 4 times - TMP_JAMP(1670) = TMP_JAMP(1147) - TMP_JAMP(747) ! used 4 times - TMP_JAMP(1669) = AMP(1198) - AMP(1829) ! used 4 times - TMP_JAMP(1668) = AMP(926) - AMP(1808) ! used 4 times - TMP_JAMP(1667) = TMP_JAMP(746) + ((0.000000000000000D+00 + TMP_JAMP(939) = TMP_JAMP(722) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(829) ! used 4 times + TMP_JAMP(938) = TMP_JAMP(721) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(819) ! used 4 times + TMP_JAMP(937) = TMP_JAMP(721) + TMP_JAMP(718) ! used 4 times + TMP_JAMP(936) = TMP_JAMP(720) + ((0.000000000000000D+00 $ ,1.000000000000000D+00)) * AMP(926) ! used 4 times - TMP_JAMP(1666) = TMP_JAMP(1146) + ((-0.000000000000000D+00 + TMP_JAMP(935) = TMP_JAMP(720) - TMP_JAMP(715) ! used 4 times + TMP_JAMP(934) = TMP_JAMP(719) + ((-0.000000000000000D+00 $ ,1.000000000000000D+00)) * AMP(866) ! used 4 times - TMP_JAMP(1665) = TMP_JAMP(1146) + TMP_JAMP(727) ! used 4 times - TMP_JAMP(1664) = AMP(817) - AMP(1712) ! used 4 times - TMP_JAMP(1663) = TMP_JAMP(727) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(850) ! used 4 times - TMP_JAMP(1662) = TMP_JAMP(727) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(717) ! used 4 times - TMP_JAMP(1661) = TMP_JAMP(747) - TMP_JAMP(727) ! used 4 times - TMP_JAMP(1660) = TMP_JAMP(1092) + ((-0.000000000000000D+00, + TMP_JAMP(933) = TMP_JAMP(719) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(867) ! used 4 times + TMP_JAMP(932) = TMP_JAMP(718) + ((-0.000000000000000D+00, $ -1.000000000000000D+00)) * AMP(817) ! used 4 times - TMP_JAMP(1659) = TMP_JAMP(1092) + TMP_JAMP(719) ! used 4 times - TMP_JAMP(1658) = AMP(935) - AMP(1754) ! used 4 times - TMP_JAMP(1657) = TMP_JAMP(719) + ((0.000000000000000D+00 + TMP_JAMP(931) = TMP_JAMP(717) + ((0.000000000000000D+00 $ ,1.000000000000000D+00)) * AMP(935) ! used 4 times - TMP_JAMP(1656) = TMP_JAMP(745) + ((-0.000000000000000D+00 + TMP_JAMP(930) = TMP_JAMP(717) - TMP_JAMP(714) ! used 4 times + TMP_JAMP(929) = TMP_JAMP(716) + ((-0.000000000000000D+00 $ ,1.000000000000000D+00)) * AMP(848) ! used 4 times - TMP_JAMP(1655) = TMP_JAMP(1102) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(708) ! used 4 times - TMP_JAMP(1654) = TMP_JAMP(1102) - TMP_JAMP(1091) ! used 4 times - TMP_JAMP(1653) = AMP(923) - AMP(1631) ! used 4 times - TMP_JAMP(1652) = TMP_JAMP(747) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(943) ! used 4 times - TMP_JAMP(1651) = TMP_JAMP(747) + TMP_JAMP(707) ! used 4 times - TMP_JAMP(1650) = AMP(932) - AMP(1637) ! used 4 times - TMP_JAMP(1649) = TMP_JAMP(707) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(932) ! used 4 times - TMP_JAMP(1648) = TMP_JAMP(1126) + ((-0.000000000000000D+00, + TMP_JAMP(928) = TMP_JAMP(716) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(849) ! used 4 times + TMP_JAMP(927) = TMP_JAMP(715) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(923) ! used 4 times + TMP_JAMP(926) = TMP_JAMP(715) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(646) ! used 4 times + TMP_JAMP(925) = TMP_JAMP(714) + ((-0.000000000000000D+00, $ -1.000000000000000D+00)) * AMP(932) ! used 4 times - TMP_JAMP(1647) = TMP_JAMP(1126) - TMP_JAMP(1091) ! used 4 times - TMP_JAMP(1646) = AMP(1506) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1509) ! used 4 times - TMP_JAMP(1645) = AMP(1504) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1507) ! used 4 times - TMP_JAMP(1644) = AMP(407) + AMP(460) ! used 4 times - TMP_JAMP(1643) = AMP(347) - AMP(462) ! used 4 times - TMP_JAMP(1642) = TMP_JAMP(677) - AMP(1106) ! used 4 times - TMP_JAMP(1641) = TMP_JAMP(679) - AMP(67) ! used 4 times - TMP_JAMP(1640) = TMP_JAMP(690) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(686) ! used 4 times - TMP_JAMP(1639) = TMP_JAMP(891) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(80) ! used 4 times - TMP_JAMP(1638) = TMP_JAMP(1017) - TMP_JAMP(891) ! used 4 times - TMP_JAMP(1637) = TMP_JAMP(1018) + TMP_JAMP(687) ! used 4 times - TMP_JAMP(1636) = TMP_JAMP(1029) + TMP_JAMP(691) ! used 4 times - TMP_JAMP(1635) = TMP_JAMP(1103) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(407) ! used 4 times - TMP_JAMP(1634) = TMP_JAMP(1121) - TMP_JAMP(1104) ! used 4 times - TMP_JAMP(1633) = TMP_JAMP(1125) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(407) ! used 4 times - TMP_JAMP(1632) = TMP_JAMP(1125) + TMP_JAMP(1103) ! used 4 times - TMP_JAMP(1631) = TMP_JAMP(1145) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(347) ! used 4 times - TMP_JAMP(1630) = AMP(1505) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1508) ! used 4 times - TMP_JAMP(1629) = AMP(1032) + AMP(1717) ! used 4 times - TMP_JAMP(1628) = AMP(507) - AMP(1719) ! used 4 times - TMP_JAMP(1627) = TMP_JAMP(664) - AMP(581) ! used 4 times - TMP_JAMP(1626) = TMP_JAMP(994) + TMP_JAMP(670) ! used 4 times - TMP_JAMP(1625) = TMP_JAMP(1099) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1032) ! used 4 times - TMP_JAMP(1624) = TMP_JAMP(1124) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1032) ! used 4 times - TMP_JAMP(1623) = TMP_JAMP(1124) + TMP_JAMP(1099) ! used 4 times - TMP_JAMP(1622) = TMP_JAMP(1144) + ((-0.000000000000000D+00 + TMP_JAMP(924) = TMP_JAMP(714) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(642) ! used 4 times + TMP_JAMP(923) = TMP_JAMP(713) + ((-0.000000000000000D+00 $ ,1.000000000000000D+00)) * AMP(507) ! used 4 times - TMP_JAMP(1621) = AMP(386) - AMP(461) ! used 4 times - TMP_JAMP(1620) = TMP_JAMP(660) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(658) ! used 4 times - TMP_JAMP(1619) = TMP_JAMP(661) - AMP(1853) ! used 4 times - TMP_JAMP(1618) = TMP_JAMP(808) + ((0.000000000000000D+00, + TMP_JAMP(922) = TMP_JAMP(713) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(584) ! used 4 times + TMP_JAMP(921) = TMP_JAMP(712) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(581) ! used 4 times + TMP_JAMP(920) = TMP_JAMP(711) + ((0.000000000000000D+00, $ -1.000000000000000D+00)) * AMP(546) ! used 4 times - TMP_JAMP(1617) = TMP_JAMP(972) - TMP_JAMP(808) ! used 4 times - TMP_JAMP(1616) = TMP_JAMP(1095) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(386) ! used 4 times - TMP_JAMP(1615) = TMP_JAMP(1096) + TMP_JAMP(1095) ! used 4 times - TMP_JAMP(1614) = AMP(1282) + AMP(1627) ! used 4 times - TMP_JAMP(1613) = AMP(75) - AMP(1629) ! used 4 times - TMP_JAMP(1612) = TMP_JAMP(946) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(940) ! used 4 times - TMP_JAMP(1611) = TMP_JAMP(1142) - TMP_JAMP(1094) ! used 4 times - TMP_JAMP(1610) = TMP_JAMP(1143) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(75) ! used 4 times - TMP_JAMP(1609) = AMP(828) - AMP(1718) ! used 4 times - TMP_JAMP(1608) = TMP_JAMP(641) - AMP(1745) ! used 4 times - TMP_JAMP(1607) = TMP_JAMP(642) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(639) ! used 4 times - TMP_JAMP(1606) = TMP_JAMP(746) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(845) ! used 4 times - TMP_JAMP(1605) = TMP_JAMP(930) - TMP_JAMP(746) ! used 4 times - TMP_JAMP(1604) = TMP_JAMP(1092) + ((0.000000000000000D+00 + TMP_JAMP(919) = TMP_JAMP(711) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(545) ! used 4 times + TMP_JAMP(918) = TMP_JAMP(710) + ((0.000000000000000D+00 $ ,1.000000000000000D+00)) * AMP(828) ! used 4 times - TMP_JAMP(1603) = TMP_JAMP(1128) + TMP_JAMP(1092) ! used 4 times - TMP_JAMP(1602) = AMP(919) - AMP(1628) ! used 4 times - TMP_JAMP(1601) = TMP_JAMP(1141) - TMP_JAMP(1127) ! used 4 times - TMP_JAMP(1600) = AMP(1274) + AMP(1621) ! used 4 times - TMP_JAMP(1599) = AMP(69) - AMP(1623) ! used 4 times - TMP_JAMP(1598) = TMP_JAMP(622) + AMP(138) ! used 4 times - TMP_JAMP(1597) = TMP_JAMP(625) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1645) ! used 4 times - TMP_JAMP(1596) = TMP_JAMP(627) - TMP_JAMP(624) ! used 4 times - TMP_JAMP(1595) = TMP_JAMP(1016) - TMP_JAMP(628) ! used 4 times - TMP_JAMP(1594) = TMP_JAMP(1103) - TMP_JAMP(1095) ! used 4 times - TMP_JAMP(1593) = TMP_JAMP(1143) + TMP_JAMP(688) ! used 4 times - TMP_JAMP(1592) = AMP(911) - AMP(1622) ! used 4 times - TMP_JAMP(1591) = TMP_JAMP(619) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(1646) ! used 4 times - TMP_JAMP(1590) = TMP_JAMP(627) - TMP_JAMP(618) ! used 4 times - TMP_JAMP(1589) = TMP_JAMP(1099) - TMP_JAMP(1092) ! used 4 times - TMP_JAMP(1588) = TMP_JAMP(1147) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(616) ! used 4 times - TMP_JAMP(1587) = TMP_JAMP(1147) + TMP_JAMP(1115) ! used 4 times - TMP_JAMP(1586) = TMP_JAMP(607) - AMP(425) ! used 4 times - TMP_JAMP(1585) = TMP_JAMP(608) - AMP(345) ! used 4 times - TMP_JAMP(1584) = TMP_JAMP(609) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(1112) ! used 4 times - TMP_JAMP(1583) = TMP_JAMP(611) + TMP_JAMP(609) ! used 4 times - TMP_JAMP(1582) = TMP_JAMP(611) - TMP_JAMP(610) ! used 4 times - TMP_JAMP(1581) = TMP_JAMP(629) - TMP_JAMP(620) ! used 4 times - TMP_JAMP(1580) = TMP_JAMP(807) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(804) ! used 4 times - TMP_JAMP(1579) = TMP_JAMP(1123) - TMP_JAMP(615) ! used 4 times - TMP_JAMP(1578) = TMP_JAMP(1139) - TMP_JAMP(614) ! used 4 times - TMP_JAMP(1577) = TMP_JAMP(1142) - TMP_JAMP(1141) ! used 4 times - TMP_JAMP(1576) = TMP_JAMP(1145) - TMP_JAMP(640) ! used 4 times - TMP_JAMP(1575) = AMP(1477) + AMP(1834) ! used 4 times - TMP_JAMP(1574) = AMP(1141) - AMP(1836) ! used 4 times - TMP_JAMP(1573) = AMP(1114) + AMP(1510) ! used 4 times - TMP_JAMP(1572) = AMP(949) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1477) ! used 4 times - TMP_JAMP(1571) = AMP(78) - AMP(1512) ! used 4 times - TMP_JAMP(1570) = TMP_JAMP(612) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(951) ! used 4 times - TMP_JAMP(1569) = TMP_JAMP(613) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(949) ! used 4 times - TMP_JAMP(1568) = TMP_JAMP(626) - AMP(134) ! used 4 times - TMP_JAMP(1567) = TMP_JAMP(685) + AMP(78) ! used 4 times - TMP_JAMP(1566) = TMP_JAMP(689) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(685) ! used 4 times - TMP_JAMP(1565) = TMP_JAMP(694) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(684) ! used 4 times - TMP_JAMP(1564) = TMP_JAMP(1086) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(613) ! used 4 times - TMP_JAMP(1563) = TMP_JAMP(1088) - TMP_JAMP(1087) ! used 4 times - TMP_JAMP(1562) = TMP_JAMP(1090) - TMP_JAMP(689) ! used 4 times - TMP_JAMP(1561) = TMP_JAMP(1090) - TMP_JAMP(1089) ! used 4 times - TMP_JAMP(1560) = TMP_JAMP(590) + AMP(1045) ! used 4 times - TMP_JAMP(1559) = TMP_JAMP(591) + AMP(499) ! used 4 times - TMP_JAMP(1558) = TMP_JAMP(611) - TMP_JAMP(592) ! used 4 times - TMP_JAMP(1557) = TMP_JAMP(1116) + TMP_JAMP(596) ! used 4 times - TMP_JAMP(1556) = TMP_JAMP(1138) + TMP_JAMP(595) ! used 4 times - TMP_JAMP(1555) = TMP_JAMP(1144) - TMP_JAMP(659) ! used 4 times - TMP_JAMP(1554) = AMP(1668) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1701) ! used 4 times - TMP_JAMP(1553) = AMP(1666) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1699) ! used 4 times - TMP_JAMP(1552) = AMP(1479) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(1666) ! used 4 times - TMP_JAMP(1551) = AMP(617) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1668) ! used 4 times - TMP_JAMP(1550) = AMP(589) - AMP(1511) ! used 4 times - TMP_JAMP(1549) = TMP_JAMP(593) - AMP(1479) ! used 4 times - TMP_JAMP(1548) = TMP_JAMP(594) - AMP(617) ! used 4 times - TMP_JAMP(1547) = TMP_JAMP(668) + AMP(589) ! used 4 times - TMP_JAMP(1546) = TMP_JAMP(673) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(668) ! used 4 times - TMP_JAMP(1545) = TMP_JAMP(1083) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(593) ! used 4 times - TMP_JAMP(1544) = TMP_JAMP(1084) - TMP_JAMP(673) ! used 4 times - TMP_JAMP(1543) = TMP_JAMP(1085) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(594) ! used 4 times - TMP_JAMP(1542) = TMP_JAMP(1089) - TMP_JAMP(1083) ! used 4 times - TMP_JAMP(1541) = TMP_JAMP(1090) + TMP_JAMP(1084) ! used 4 times - TMP_JAMP(1540) = AMP(1431) + AMP(1747) ! used 4 times - TMP_JAMP(1539) = AMP(584) - AMP(1749) ! used 4 times - TMP_JAMP(1538) = TMP_JAMP(578) - AMP(516) ! used 4 times - TMP_JAMP(1537) = TMP_JAMP(580) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(1723) ! used 4 times - TMP_JAMP(1536) = TMP_JAMP(592) - TMP_JAMP(579) ! used 4 times - TMP_JAMP(1535) = TMP_JAMP(662) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(657) ! used 4 times - TMP_JAMP(1534) = TMP_JAMP(969) - TMP_JAMP(582) ! used 4 times - TMP_JAMP(1533) = TMP_JAMP(1125) - TMP_JAMP(1124) ! used 4 times - TMP_JAMP(1532) = AMP(914) - AMP(1748) ! used 4 times - TMP_JAMP(1531) = TMP_JAMP(575) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1724) ! used 4 times - TMP_JAMP(1530) = TMP_JAMP(643) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(638) ! used 4 times - TMP_JAMP(1529) = TMP_JAMP(1127) - TMP_JAMP(1094) ! used 4 times - TMP_JAMP(1528) = TMP_JAMP(1146) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(573) ! used 4 times - TMP_JAMP(1527) = TMP_JAMP(1146) - TMP_JAMP(1110) ! used 4 times - TMP_JAMP(1526) = TMP_JAMP(569) - AMP(363) ! used 4 times - TMP_JAMP(1525) = TMP_JAMP(583) - TMP_JAMP(576) ! used 4 times - TMP_JAMP(1524) = TMP_JAMP(609) + TMP_JAMP(579) ! used 4 times - TMP_JAMP(1523) = TMP_JAMP(1113) - TMP_JAMP(572) ! used 4 times - TMP_JAMP(1522) = AMP(1219) - AMP(1835) ! used 4 times - TMP_JAMP(1521) = AMP(950) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(1219) ! used 4 times - TMP_JAMP(1520) = AMP(531) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1725) ! used 4 times - TMP_JAMP(1519) = TMP_JAMP(571) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(950) ! used 4 times - TMP_JAMP(1518) = TMP_JAMP(581) + AMP(531) ! used 4 times - TMP_JAMP(1517) = TMP_JAMP(1081) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(571) ! used 4 times - TMP_JAMP(1516) = TMP_JAMP(1082) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(581) ! used 4 times - TMP_JAMP(1515) = TMP_JAMP(1082) - TMP_JAMP(1081) ! used 4 times - TMP_JAMP(1514) = TMP_JAMP(1087) - TMP_JAMP(1084) ! used 4 times - TMP_JAMP(1513) = TMP_JAMP(1088) + TMP_JAMP(1081) ! used 4 times - TMP_JAMP(1512) = TMP_JAMP(559) - AMP(1208) ! used 4 times - TMP_JAMP(1511) = TMP_JAMP(560) - AMP(103) ! used 4 times - TMP_JAMP(1510) = TMP_JAMP(1111) + TMP_JAMP(564) ! used 4 times - TMP_JAMP(1509) = TMP_JAMP(1152) + TMP_JAMP(563) ! used 4 times - TMP_JAMP(1508) = AMP(1584) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(1590) ! used 4 times - TMP_JAMP(1507) = AMP(1582) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(1588) ! used 4 times - TMP_JAMP(1506) = TMP_JAMP(561) + AMP(1217) ! used 4 times - TMP_JAMP(1505) = TMP_JAMP(562) + AMP(129) ! used 4 times - TMP_JAMP(1504) = TMP_JAMP(1080) + TMP_JAMP(1079) ! used 4 times - TMP_JAMP(1503) = TMP_JAMP(1082) - TMP_JAMP(1079) ! used 4 times - TMP_JAMP(1502) = TMP_JAMP(1090) + TMP_JAMP(1080) ! used 4 times - TMP_JAMP(1501) = AMP(1429) + AMP(1855) ! used 4 times - TMP_JAMP(1500) = AMP(1108) - AMP(1857) ! used 4 times - TMP_JAMP(1499) = TMP_JAMP(550) - AMP(673) ! used 4 times - TMP_JAMP(1498) = TMP_JAMP(552) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(787) ! used 4 times - TMP_JAMP(1497) = TMP_JAMP(923) - TMP_JAMP(553) ! used 4 times - TMP_JAMP(1496) = AMP(1276) - AMP(1856) ! used 4 times - TMP_JAMP(1495) = TMP_JAMP(547) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(788) ! used 4 times - TMP_JAMP(1494) = TMP_JAMP(1161) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(546) ! used 4 times - TMP_JAMP(1493) = TMP_JAMP(1161) - TMP_JAMP(1106) ! used 4 times - TMP_JAMP(1492) = TMP_JAMP(542) + AMP(658) ! used 4 times - TMP_JAMP(1491) = TMP_JAMP(554) - TMP_JAMP(548) ! used 4 times - TMP_JAMP(1490) = TMP_JAMP(1135) + TMP_JAMP(545) ! used 4 times - TMP_JAMP(1489) = AMP(1667) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1700) ! used 4 times - TMP_JAMP(1488) = AMP(776) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1667) ! used 4 times - TMP_JAMP(1487) = AMP(689) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(789) ! used 4 times - TMP_JAMP(1486) = TMP_JAMP(544) - AMP(776) ! used 4 times - TMP_JAMP(1485) = TMP_JAMP(551) + AMP(689) ! used 4 times - TMP_JAMP(1484) = TMP_JAMP(1077) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(544) ! used 4 times - TMP_JAMP(1483) = TMP_JAMP(1078) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(551) ! used 4 times - TMP_JAMP(1482) = TMP_JAMP(1085) + TMP_JAMP(1077) ! used 4 times - TMP_JAMP(1481) = TMP_JAMP(1087) - TMP_JAMP(1078) ! used 4 times - TMP_JAMP(1480) = TMP_JAMP(535) - AMP(764) ! used 4 times - TMP_JAMP(1479) = TMP_JAMP(1153) + TMP_JAMP(537) ! used 4 times - TMP_JAMP(1478) = AMP(1583) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(1589) ! used 4 times - TMP_JAMP(1477) = TMP_JAMP(536) + AMP(773) ! used 4 times - TMP_JAMP(1476) = TMP_JAMP(1080) + TMP_JAMP(1076) ! used 4 times - TMP_JAMP(1475) = AMP(471) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1881) ! used 4 times - TMP_JAMP(1474) = AMP(398) + AMP(469) ! used 4 times - TMP_JAMP(1473) = AMP(49) - AMP(1560) ! used 4 times - TMP_JAMP(1472) = TMP_JAMP(518) - AMP(62) ! used 4 times - TMP_JAMP(1471) = TMP_JAMP(519) + AMP(365) ! used 4 times - TMP_JAMP(1470) = TMP_JAMP(532) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(520) ! used 4 times - TMP_JAMP(1469) = TMP_JAMP(892) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(49) ! used 4 times - TMP_JAMP(1468) = TMP_JAMP(896) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1184) ! used 4 times - TMP_JAMP(1467) = TMP_JAMP(1017) - TMP_JAMP(525) ! used 4 times - TMP_JAMP(1466) = TMP_JAMP(1075) + TMP_JAMP(892) ! used 4 times - TMP_JAMP(1465) = TMP_JAMP(1075) + TMP_JAMP(1074) ! used 4 times - TMP_JAMP(1464) = TMP_JAMP(1112) + TMP_JAMP(528) ! used 4 times - TMP_JAMP(1463) = TMP_JAMP(1157) - TMP_JAMP(1121) ! used 4 times - TMP_JAMP(1462) = AMP(1773) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(1800) ! used 4 times - TMP_JAMP(1461) = AMP(1023) + AMP(1771) ! used 4 times - TMP_JAMP(1460) = AMP(740) - AMP(1559) ! used 4 times - TMP_JAMP(1459) = TMP_JAMP(508) - AMP(666) ! used 4 times - TMP_JAMP(1458) = TMP_JAMP(516) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(509) ! used 4 times - TMP_JAMP(1457) = TMP_JAMP(877) + ((0.000000000000000D+00 + TMP_JAMP(917) = TMP_JAMP(710) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(914) ! used 4 times + TMP_JAMP(916) = TMP_JAMP(709) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(845) ! used 4 times + TMP_JAMP(915) = TMP_JAMP(709) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(846) ! used 4 times + TMP_JAMP(914) = TMP_JAMP(708) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(919) ! used 4 times + TMP_JAMP(913) = TMP_JAMP(708) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(911) ! used 4 times + TMP_JAMP(912) = TMP_JAMP(707) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(617) ! used 4 times + TMP_JAMP(911) = TMP_JAMP(707) - TMP_JAMP(706) ! used 4 times + TMP_JAMP(910) = TMP_JAMP(707) + TMP_JAMP(701) ! used 4 times + TMP_JAMP(909) = TMP_JAMP(707) - TMP_JAMP(705) ! used 4 times + TMP_JAMP(908) = TMP_JAMP(706) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(589) ! used 4 times + TMP_JAMP(907) = TMP_JAMP(706) - TMP_JAMP(705) ! used 4 times + TMP_JAMP(906) = TMP_JAMP(705) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(531) ! used 4 times + TMP_JAMP(905) = TMP_JAMP(704) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(671) ! used 4 times + TMP_JAMP(904) = TMP_JAMP(704) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(784) ! used 4 times + TMP_JAMP(903) = TMP_JAMP(703) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(673) ! used 4 times + TMP_JAMP(902) = TMP_JAMP(702) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(707) ! used 4 times + TMP_JAMP(901) = TMP_JAMP(702) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(691) ! used 4 times + TMP_JAMP(900) = TMP_JAMP(701) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(776) ! used 4 times + TMP_JAMP(899) = TMP_JAMP(701) - TMP_JAMP(700) ! used 4 times + TMP_JAMP(898) = TMP_JAMP(701) - TMP_JAMP(699) ! used 4 times + TMP_JAMP(897) = TMP_JAMP(700) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(689) ! used 4 times + TMP_JAMP(896) = TMP_JAMP(700) - TMP_JAMP(699) ! used 4 times + TMP_JAMP(895) = TMP_JAMP(699) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(773) ! used 4 times + TMP_JAMP(894) = TMP_JAMP(698) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(666) ! used 4 times + TMP_JAMP(893) = TMP_JAMP(698) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(743) ! used 4 times + TMP_JAMP(892) = TMP_JAMP(697) + ((0.000000000000000D+00 $ ,1.000000000000000D+00)) * AMP(740) ! used 4 times - TMP_JAMP(1456) = TMP_JAMP(1073) + TMP_JAMP(877) ! used 4 times - TMP_JAMP(1455) = TMP_JAMP(1075) + TMP_JAMP(1073) ! used 4 times - TMP_JAMP(1454) = TMP_JAMP(1108) + TMP_JAMP(512) ! used 4 times - TMP_JAMP(1453) = TMP_JAMP(1154) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(507) ! used 4 times - TMP_JAMP(1452) = TMP_JAMP(1154) - TMP_JAMP(1114) ! used 4 times - TMP_JAMP(1451) = AMP(470) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1880) ! used 4 times - TMP_JAMP(1450) = TMP_JAMP(501) + AMP(383) ! used 4 times - TMP_JAMP(1449) = TMP_JAMP(782) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(543) ! used 4 times - TMP_JAMP(1448) = TMP_JAMP(865) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(543) ! used 4 times - TMP_JAMP(1447) = TMP_JAMP(865) - TMP_JAMP(782) ! used 4 times - TMP_JAMP(1446) = TMP_JAMP(1072) + TMP_JAMP(782) ! used 4 times - TMP_JAMP(1445) = TMP_JAMP(1074) - TMP_JAMP(1073) ! used 4 times - TMP_JAMP(1444) = TMP_JAMP(1096) + TMP_JAMP(505) ! used 4 times - TMP_JAMP(1443) = AMP(1270) + AMP(1618) ! used 4 times - TMP_JAMP(1442) = AMP(57) - AMP(1620) ! used 4 times - TMP_JAMP(1441) = TMP_JAMP(1070) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(1270) ! used 4 times - TMP_JAMP(1440) = TMP_JAMP(1072) - TMP_JAMP(1070) ! used 4 times - TMP_JAMP(1439) = TMP_JAMP(1075) + TMP_JAMP(1071) ! used 4 times - TMP_JAMP(1438) = TMP_JAMP(1093) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(57) ! used 4 times - TMP_JAMP(1437) = TMP_JAMP(1093) - TMP_JAMP(1071) ! used 4 times - TMP_JAMP(1436) = TMP_JAMP(1150) + TMP_JAMP(1093) ! used 4 times - TMP_JAMP(1435) = AMP(1772) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(1799) ! used 4 times - TMP_JAMP(1434) = TMP_JAMP(491) - AMP(825) ! used 4 times - TMP_JAMP(1433) = TMP_JAMP(719) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(570) ! used 4 times - TMP_JAMP(1432) = TMP_JAMP(835) - TMP_JAMP(719) ! used 4 times - TMP_JAMP(1431) = TMP_JAMP(1069) - TMP_JAMP(719) ! used 4 times - TMP_JAMP(1430) = TMP_JAMP(1074) - TMP_JAMP(1069) ! used 4 times - TMP_JAMP(1429) = TMP_JAMP(1128) + TMP_JAMP(494) ! used 4 times - TMP_JAMP(1428) = AMP(907) - AMP(1619) ! used 4 times - TMP_JAMP(1427) = TMP_JAMP(1071) + TMP_JAMP(1068) ! used 4 times - TMP_JAMP(1426) = AMP(1262) + AMP(1612) ! used 4 times - TMP_JAMP(1425) = TMP_JAMP(1070) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1262) ! used 4 times - TMP_JAMP(1424) = TMP_JAMP(1071) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(51) ! used 4 times - TMP_JAMP(1423) = AMP(899) - AMP(1613) ! used 4 times - TMP_JAMP(1422) = TMP_JAMP(1068) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(899) ! used 4 times - TMP_JAMP(1421) = TMP_JAMP(1069) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(864) ! used 4 times - TMP_JAMP(1420) = TMP_JAMP(1070) - TMP_JAMP(1068) ! used 4 times - TMP_JAMP(1419) = AMP(1192) + AMP(1564) ! used 4 times - TMP_JAMP(1418) = AMP(60) - AMP(1566) ! used 4 times - TMP_JAMP(1417) = TMP_JAMP(1074) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(1192) ! used 4 times - TMP_JAMP(1416) = TMP_JAMP(1075) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(60) ! used 4 times - TMP_JAMP(1415) = TMP_JAMP(1079) - TMP_JAMP(1074) ! used 4 times - TMP_JAMP(1414) = TMP_JAMP(1080) - TMP_JAMP(1075) ! used 4 times - TMP_JAMP(1413) = TMP_JAMP(1086) - TMP_JAMP(1081) ! used 4 times - TMP_JAMP(1412) = TMP_JAMP(1089) + TMP_JAMP(1080) ! used 4 times - TMP_JAMP(1411) = TMP_JAMP(1072) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(704) ! used 4 times - TMP_JAMP(1410) = AMP(748) - AMP(1565) ! used 4 times - TMP_JAMP(1409) = TMP_JAMP(1073) + ((-0.000000000000000D+00, + TMP_JAMP(891) = TMP_JAMP(697) + ((-0.000000000000000D+00, $ -1.000000000000000D+00)) * AMP(748) ! used 4 times - TMP_JAMP(1408) = TMP_JAMP(1076) - TMP_JAMP(1073) ! used 4 times - TMP_JAMP(1407) = TMP_JAMP(1083) - TMP_JAMP(1077) ! used 4 times - TMP_JAMP(1406) = AMP(1410) + AMP(1801) ! used 4 times - TMP_JAMP(1405) = AMP(743) - AMP(1803) ! used 4 times - TMP_JAMP(1404) = TMP_JAMP(484) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1798) ! used 4 times - TMP_JAMP(1403) = TMP_JAMP(485) - AMP(354) ! used 4 times - TMP_JAMP(1402) = TMP_JAMP(511) - AMP(743) ! used 4 times - TMP_JAMP(1401) = TMP_JAMP(513) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(511) ! used 4 times - TMP_JAMP(1400) = TMP_JAMP(531) - TMP_JAMP(515) ! used 4 times - TMP_JAMP(1399) = TMP_JAMP(1021) + TMP_JAMP(488) ! used 4 times - TMP_JAMP(1398) = TMP_JAMP(1067) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(513) ! used 4 times - TMP_JAMP(1397) = AMP(902) - AMP(1802) ! used 4 times - TMP_JAMP(1396) = TMP_JAMP(496) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(492) ! used 4 times - TMP_JAMP(1395) = TMP_JAMP(1067) + TMP_JAMP(1066) ! used 4 times - TMP_JAMP(1394) = TMP_JAMP(1091) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(849) ! used 4 times - TMP_JAMP(1393) = TMP_JAMP(1091) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(609) ! used 4 times - TMP_JAMP(1392) = TMP_JAMP(1091) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1066) ! used 4 times - TMP_JAMP(1391) = TMP_JAMP(1101) - TMP_JAMP(1091) ! used 4 times - TMP_JAMP(1390) = TMP_JAMP(1129) - TMP_JAMP(1126) ! used 4 times - TMP_JAMP(1389) = TMP_JAMP(1066) - AMP(834) ! used 4 times - TMP_JAMP(1388) = TMP_JAMP(1067) + AMP(690) ! used 4 times - TMP_JAMP(1387) = TMP_JAMP(1078) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(690) ! used 4 times - TMP_JAMP(1386) = TMP_JAMP(1078) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1067) ! used 4 times - TMP_JAMP(1385) = TMP_JAMP(1079) - TMP_JAMP(1076) ! used 4 times - TMP_JAMP(1384) = TMP_JAMP(1088) - TMP_JAMP(1078) ! used 4 times - TMP_JAMP(1383) = AMP(1130) + AMP(1522) ! used 4 times - TMP_JAMP(1382) = AMP(115) - AMP(1524) ! used 4 times - TMP_JAMP(1381) = TMP_JAMP(486) + AMP(1151) ! used 4 times - TMP_JAMP(1380) = TMP_JAMP(524) - AMP(61) ! used 4 times - TMP_JAMP(1379) = TMP_JAMP(527) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(524) ! used 4 times - TMP_JAMP(1378) = TMP_JAMP(1064) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(527) ! used 4 times - TMP_JAMP(1377) = TMP_JAMP(1102) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(1130) ! used 4 times - TMP_JAMP(1376) = TMP_JAMP(1102) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1065) ! used 4 times - TMP_JAMP(1375) = AMP(1139) + AMP(1528) ! used 4 times - TMP_JAMP(1374) = AMP(127) - AMP(1530) ! used 4 times - TMP_JAMP(1373) = TMP_JAMP(1087) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(1139) ! used 4 times - TMP_JAMP(1372) = TMP_JAMP(1087) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1065) ! used 4 times - TMP_JAMP(1371) = TMP_JAMP(1090) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(127) ! used 4 times - TMP_JAMP(1370) = TMP_JAMP(1090) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1064) ! used 4 times - TMP_JAMP(1369) = AMP(1408) + AMP(1882) ! used 4 times - TMP_JAMP(1368) = AMP(1186) - AMP(1884) ! used 4 times - TMP_JAMP(1367) = TMP_JAMP(478) + AMP(512) ! used 4 times - TMP_JAMP(1366) = TMP_JAMP(521) + AMP(1186) ! used 4 times - TMP_JAMP(1365) = TMP_JAMP(529) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(521) ! used 4 times - TMP_JAMP(1364) = TMP_JAMP(989) - TMP_JAMP(480) ! used 4 times - TMP_JAMP(1363) = TMP_JAMP(1063) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(529) ! used 4 times - TMP_JAMP(1362) = AMP(1264) - AMP(1883) ! used 4 times - TMP_JAMP(1361) = TMP_JAMP(502) + AMP(1264) ! used 4 times - TMP_JAMP(1360) = TMP_JAMP(506) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(502) ! used 4 times - TMP_JAMP(1359) = TMP_JAMP(1062) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(506) ! used 4 times - TMP_JAMP(1358) = TMP_JAMP(1063) + TMP_JAMP(1062) ! used 4 times - TMP_JAMP(1357) = TMP_JAMP(1130) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(592) ! used 4 times - TMP_JAMP(1356) = TMP_JAMP(1130) - TMP_JAMP(1098) ! used 4 times - TMP_JAMP(1355) = TMP_JAMP(1062) - AMP(532) ! used 4 times - TMP_JAMP(1354) = TMP_JAMP(1063) + AMP(530) ! used 4 times - TMP_JAMP(1353) = TMP_JAMP(1082) + ((-0.000000000000000D+00 + TMP_JAMP(890) = TMP_JAMP(696) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(705) ! used 4 times + TMP_JAMP(889) = TMP_JAMP(696) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(704) ! used 4 times + TMP_JAMP(888) = TMP_JAMP(695) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(825) ! used 4 times + TMP_JAMP(887) = TMP_JAMP(695) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(902) ! used 4 times + TMP_JAMP(886) = TMP_JAMP(694) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(863) ! used 4 times + TMP_JAMP(885) = TMP_JAMP(694) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(864) ! used 4 times + TMP_JAMP(884) = TMP_JAMP(693) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(907) ! used 4 times + TMP_JAMP(883) = TMP_JAMP(693) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(899) ! used 4 times + TMP_JAMP(882) = TMP_JAMP(692) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(512) ! used 4 times + TMP_JAMP(881) = TMP_JAMP(691) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(514) ! used 4 times + TMP_JAMP(880) = TMP_JAMP(691) + ((-0.000000000000000D+00 $ ,1.000000000000000D+00)) * AMP(530) ! used 4 times - TMP_JAMP(1352) = TMP_JAMP(1082) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1063) ! used 4 times - TMP_JAMP(1351) = TMP_JAMP(1085) + TMP_JAMP(1082) ! used 4 times - TMP_JAMP(1350) = AMP(625) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(628) ! used 4 times - TMP_JAMP(1349) = AMP(605) - AMP(1523) ! used 4 times - TMP_JAMP(1348) = TMP_JAMP(479) - AMP(625) ! used 4 times - TMP_JAMP(1347) = TMP_JAMP(1061) - TMP_JAMP(479) ! used 4 times - TMP_JAMP(1346) = TMP_JAMP(1064) + TMP_JAMP(1061) ! used 4 times - TMP_JAMP(1345) = AMP(614) - AMP(1529) ! used 4 times - TMP_JAMP(1344) = TMP_JAMP(1084) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(614) ! used 4 times - TMP_JAMP(1343) = TMP_JAMP(1084) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1061) ! used 4 times - TMP_JAMP(1342) = AMP(985) + AMP(1648) ! used 4 times - TMP_JAMP(1341) = AMP(481) - AMP(1650) ! used 4 times - TMP_JAMP(1340) = AMP(336) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1014) ! used 4 times - TMP_JAMP(1339) = AMP(334) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1012) ! used 4 times - TMP_JAMP(1338) = TMP_JAMP(461) + AMP(331) ! used 4 times - TMP_JAMP(1337) = TMP_JAMP(462) + AMP(325) ! used 4 times - TMP_JAMP(1336) = TMP_JAMP(809) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(481) ! used 4 times - TMP_JAMP(1335) = TMP_JAMP(810) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(985) ! used 4 times - TMP_JAMP(1334) = TMP_JAMP(1058) + TMP_JAMP(810) ! used 4 times - TMP_JAMP(1333) = TMP_JAMP(1060) + TMP_JAMP(809) ! used 4 times - TMP_JAMP(1332) = TMP_JAMP(1060) - TMP_JAMP(1059) ! used 4 times - TMP_JAMP(1331) = TMP_JAMP(1121) + TMP_JAMP(473) ! used 4 times - TMP_JAMP(1330) = TMP_JAMP(1122) + TMP_JAMP(470) ! used 4 times - TMP_JAMP(1329) = AMP(963) + AMP(1762) ! used 4 times - TMP_JAMP(1328) = AMP(648) - AMP(1764) ! used 4 times - TMP_JAMP(1327) = AMP(640) - AMP(1649) ! used 4 times - TMP_JAMP(1326) = TMP_JAMP(790) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(640) ! used 4 times - TMP_JAMP(1325) = TMP_JAMP(1056) + TMP_JAMP(790) ! used 4 times - TMP_JAMP(1324) = TMP_JAMP(1059) - TMP_JAMP(1055) ! used 4 times - TMP_JAMP(1323) = TMP_JAMP(1060) + TMP_JAMP(1056) ! used 4 times - TMP_JAMP(1322) = TMP_JAMP(1105) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(963) ! used 4 times - TMP_JAMP(1321) = TMP_JAMP(1105) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(484) ! used 4 times - TMP_JAMP(1320) = TMP_JAMP(1105) + TMP_JAMP(1055) ! used 4 times - TMP_JAMP(1319) = TMP_JAMP(1106) + ((0.000000000000000D+00, + TMP_JAMP(879) = TMP_JAMP(690) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(548) ! used 4 times + TMP_JAMP(878) = TMP_JAMP(690) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(532) ! used 4 times + TMP_JAMP(877) = TMP_JAMP(689) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(494) ! used 4 times + TMP_JAMP(876) = TMP_JAMP(689) - TMP_JAMP(688) ! used 4 times + TMP_JAMP(875) = TMP_JAMP(689) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(493) ! used 4 times + TMP_JAMP(874) = TMP_JAMP(688) + TMP_JAMP(686) ! used 4 times + TMP_JAMP(873) = TMP_JAMP(688) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(492) ! used 4 times + TMP_JAMP(872) = TMP_JAMP(687) + ((0.000000000000000D+00, $ -1.000000000000000D+00)) * AMP(648) ! used 4 times - TMP_JAMP(1318) = TMP_JAMP(1106) + TMP_JAMP(1057) ! used 4 times - TMP_JAMP(1317) = TMP_JAMP(1109) - TMP_JAMP(1105) ! used 4 times - TMP_JAMP(1316) = AMP(335) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1013) ! used 4 times - TMP_JAMP(1315) = TMP_JAMP(449) + AMP(328) ! used 4 times - TMP_JAMP(1314) = TMP_JAMP(865) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(653) ! used 4 times - TMP_JAMP(1313) = TMP_JAMP(1054) - TMP_JAMP(865) ! used 4 times - TMP_JAMP(1312) = TMP_JAMP(1058) - TMP_JAMP(1056) ! used 4 times - TMP_JAMP(1311) = TMP_JAMP(1104) + TMP_JAMP(453) ! used 4 times - TMP_JAMP(1310) = AMP(972) + AMP(1708) ! used 4 times - TMP_JAMP(1309) = AMP(489) - AMP(1710) ! used 4 times - TMP_JAMP(1308) = TMP_JAMP(1054) - TMP_JAMP(1052) ! used 4 times - TMP_JAMP(1307) = TMP_JAMP(1097) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(972) ! used 4 times - TMP_JAMP(1306) = TMP_JAMP(1097) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(579) ! used 4 times - TMP_JAMP(1305) = TMP_JAMP(1097) + TMP_JAMP(1052) ! used 4 times - TMP_JAMP(1304) = TMP_JAMP(1098) + ((0.000000000000000D+00, + TMP_JAMP(871) = TMP_JAMP(687) + TMP_JAMP(686) ! used 4 times + TMP_JAMP(870) = TMP_JAMP(687) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(642) ! used 4 times + TMP_JAMP(869) = TMP_JAMP(686) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(651) ! used 4 times + TMP_JAMP(868) = TMP_JAMP(685) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(653) ! used 4 times + TMP_JAMP(867) = TMP_JAMP(685) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(652) ! used 4 times + TMP_JAMP(866) = TMP_JAMP(684) + ((0.000000000000000D+00, $ -1.000000000000000D+00)) * AMP(489) ! used 4 times - TMP_JAMP(1303) = TMP_JAMP(1098) + TMP_JAMP(1053) ! used 4 times - TMP_JAMP(1302) = TMP_JAMP(1100) - TMP_JAMP(1097) ! used 4 times - TMP_JAMP(1301) = AMP(807) - AMP(1763) ! used 4 times - TMP_JAMP(1300) = TMP_JAMP(707) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(610) ! used 4 times - TMP_JAMP(1299) = TMP_JAMP(766) - TMP_JAMP(707) ! used 4 times - TMP_JAMP(1298) = TMP_JAMP(1050) - TMP_JAMP(707) ! used 4 times - TMP_JAMP(1297) = TMP_JAMP(1051) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(807) ! used 4 times - TMP_JAMP(1296) = TMP_JAMP(1057) + TMP_JAMP(1051) ! used 4 times - TMP_JAMP(1295) = TMP_JAMP(1058) - TMP_JAMP(1050) ! used 4 times - TMP_JAMP(1294) = AMP(810) - AMP(1709) ! used 4 times - TMP_JAMP(1293) = TMP_JAMP(1053) + TMP_JAMP(1049) ! used 4 times - TMP_JAMP(1292) = AMP(994) + AMP(1702) ! used 4 times - TMP_JAMP(1291) = AMP(483) - AMP(1704) ! used 4 times - TMP_JAMP(1290) = TMP_JAMP(1052) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(994) ! used 4 times - TMP_JAMP(1289) = TMP_JAMP(1053) + ((-0.000000000000000D+00 + TMP_JAMP(865) = TMP_JAMP(684) + ((-0.000000000000000D+00 $ ,1.000000000000000D+00)) * AMP(483) ! used 4 times - TMP_JAMP(1288) = TMP_JAMP(1059) + TMP_JAMP(1053) ! used 4 times - TMP_JAMP(1287) = AMP(799) - AMP(1703) ! used 4 times - TMP_JAMP(1286) = TMP_JAMP(1049) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(799) ! used 4 times - TMP_JAMP(1285) = TMP_JAMP(1055) - TMP_JAMP(1051) ! used 4 times - TMP_JAMP(1284) = TMP_JAMP(1050) + ((0.000000000000000D+00, + TMP_JAMP(864) = TMP_JAMP(683) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(650) ! used 4 times + TMP_JAMP(863) = TMP_JAMP(683) + ((0.000000000000000D+00, $ -1.000000000000000D+00)) * AMP(812) ! used 4 times - TMP_JAMP(1283) = TMP_JAMP(1052) - TMP_JAMP(1049) ! used 4 times - TMP_JAMP(1282) = AMP(981) + AMP(1654) ! used 4 times - TMP_JAMP(1281) = AMP(492) - AMP(1656) ! used 4 times - TMP_JAMP(1280) = TMP_JAMP(1058) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(981) ! used 4 times - TMP_JAMP(1279) = TMP_JAMP(1083) - TMP_JAMP(1058) ! used 4 times - TMP_JAMP(1278) = TMP_JAMP(1085) - TMP_JAMP(1060) ! used 4 times - TMP_JAMP(1277) = TMP_JAMP(1086) + TMP_JAMP(1083) ! used 4 times - TMP_JAMP(1276) = TMP_JAMP(1054) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(652) ! used 4 times - TMP_JAMP(1275) = TMP_JAMP(1057) + TMP_JAMP(1054) ! used 4 times - TMP_JAMP(1274) = AMP(651) - AMP(1655) ! used 4 times - TMP_JAMP(1273) = TMP_JAMP(1077) - TMP_JAMP(1056) ! used 4 times - TMP_JAMP(1272) = AMP(642) - AMP(1758) ! used 4 times - TMP_JAMP(1271) = TMP_JAMP(1055) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1003) ! used 4 times - TMP_JAMP(1270) = TMP_JAMP(1067) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1057) ! used 4 times - TMP_JAMP(1269) = AMP(801) - AMP(1757) ! used 4 times - TMP_JAMP(1268) = TMP_JAMP(1066) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1051) ! used 4 times - TMP_JAMP(1267) = TMP_JAMP(1059) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(493) ! used 4 times - TMP_JAMP(1266) = TMP_JAMP(1061) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1059) ! used 4 times - TMP_JAMP(1265) = TMP_JAMP(1065) - TMP_JAMP(1061) ! used 4 times - TMP_JAMP(1264) = AMP(1001) + AMP(1009) ! used 4 times - TMP_JAMP(1263) = AMP(983) - AMP(1011) ! used 4 times - TMP_JAMP(1262) = TMP_JAMP(471) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(465) ! used 4 times - TMP_JAMP(1261) = TMP_JAMP(474) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(463) ! used 4 times - TMP_JAMP(1260) = TMP_JAMP(1048) - TMP_JAMP(1047) ! used 4 times - TMP_JAMP(1259) = AMP(992) - AMP(1010) ! used 4 times - TMP_JAMP(1258) = TMP_JAMP(450) + AMP(992) ! used 4 times - TMP_JAMP(1257) = TMP_JAMP(454) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(450) ! used 4 times - TMP_JAMP(1256) = TMP_JAMP(1046) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(454) ! used 4 times - TMP_JAMP(1255) = TMP_JAMP(1048) + TMP_JAMP(1046) ! used 4 times - TMP_JAMP(1254) = TMP_JAMP(1046) + AMP(142) ! used 4 times - TMP_JAMP(1253) = TMP_JAMP(1047) + TMP_JAMP(1046) ! used 4 times - TMP_JAMP(1252) = TMP_JAMP(1089) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(133) ! used 4 times - TMP_JAMP(1251) = TMP_JAMP(1089) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1048) ! used 4 times - TMP_JAMP(1250) = TMP_JAMP(1064) + AMP(148) ! used 4 times - TMP_JAMP(1249) = TMP_JAMP(1064) + TMP_JAMP(1047) ! used 4 times - TMP_JAMP(1248) = AMP(266) + AMP(289) ! used 4 times - TMP_JAMP(1247) = AMP(186) - AMP(291) ! used 4 times - TMP_JAMP(1246) = AMP(172) + AMP(175) ! used 4 times - TMP_JAMP(1245) = AMP(166) - AMP(177) ! used 4 times - TMP_JAMP(1244) = TMP_JAMP(745) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(186) ! used 4 times - TMP_JAMP(1243) = TMP_JAMP(747) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(266) ! used 4 times - TMP_JAMP(1242) = TMP_JAMP(1043) - TMP_JAMP(747) ! used 4 times - TMP_JAMP(1241) = TMP_JAMP(1044) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(195) ! used 4 times - TMP_JAMP(1240) = TMP_JAMP(1045) - TMP_JAMP(745) ! used 4 times - TMP_JAMP(1239) = TMP_JAMP(1045) + TMP_JAMP(1044) ! used 4 times - TMP_JAMP(1238) = TMP_JAMP(1114) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(172) ! used 4 times - TMP_JAMP(1237) = TMP_JAMP(1114) - TMP_JAMP(1041) ! used 4 times - TMP_JAMP(1236) = TMP_JAMP(1115) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(166) ! used 4 times - TMP_JAMP(1235) = TMP_JAMP(1115) - TMP_JAMP(1042) ! used 4 times - TMP_JAMP(1234) = AMP(239) + AMP(310) ! used 4 times - TMP_JAMP(1233) = AMP(206) - AMP(312) ! used 4 times - TMP_JAMP(1232) = AMP(204) - AMP(290) ! used 4 times - TMP_JAMP(1231) = TMP_JAMP(727) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(204) ! used 4 times - TMP_JAMP(1230) = TMP_JAMP(1040) - TMP_JAMP(727) ! used 4 times - TMP_JAMP(1229) = TMP_JAMP(1045) + TMP_JAMP(1040) ! used 4 times - TMP_JAMP(1228) = TMP_JAMP(1109) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(239) ! used 4 times - TMP_JAMP(1227) = TMP_JAMP(1109) + TMP_JAMP(1038) ! used 4 times - TMP_JAMP(1226) = TMP_JAMP(1110) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(206) ! used 4 times - TMP_JAMP(1225) = TMP_JAMP(1110) + TMP_JAMP(1039) ! used 4 times - TMP_JAMP(1224) = AMP(169) - AMP(176) ! used 4 times - TMP_JAMP(1223) = TMP_JAMP(835) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(213) ! used 4 times - TMP_JAMP(1222) = TMP_JAMP(1036) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(169) ! used 4 times - TMP_JAMP(1221) = TMP_JAMP(1037) - TMP_JAMP(835) ! used 4 times - TMP_JAMP(1220) = TMP_JAMP(1037) + TMP_JAMP(1036) ! used 4 times - TMP_JAMP(1219) = TMP_JAMP(1040) + TMP_JAMP(1037) ! used 4 times - TMP_JAMP(1218) = TMP_JAMP(1042) + TMP_JAMP(1036) ! used 4 times - TMP_JAMP(1217) = TMP_JAMP(1043) - TMP_JAMP(1040) ! used 4 times - TMP_JAMP(1216) = AMP(248) + AMP(301) ! used 4 times - TMP_JAMP(1215) = AMP(188) - AMP(303) ! used 4 times - TMP_JAMP(1214) = TMP_JAMP(1100) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(248) ! used 4 times - TMP_JAMP(1213) = TMP_JAMP(1100) + TMP_JAMP(1034) ! used 4 times - TMP_JAMP(1212) = TMP_JAMP(1101) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(188) ! used 4 times - TMP_JAMP(1211) = TMP_JAMP(1101) + TMP_JAMP(1035) ! used 4 times - TMP_JAMP(1210) = AMP(224) - AMP(311) ! used 4 times - TMP_JAMP(1209) = TMP_JAMP(766) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(229) ! used 4 times - TMP_JAMP(1208) = TMP_JAMP(1032) + TMP_JAMP(766) ! used 4 times - TMP_JAMP(1207) = TMP_JAMP(1033) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(224) ! used 4 times - TMP_JAMP(1206) = TMP_JAMP(1039) + TMP_JAMP(1033) ! used 4 times - TMP_JAMP(1205) = TMP_JAMP(1043) + TMP_JAMP(1032) ! used 4 times - TMP_JAMP(1204) = AMP(227) - AMP(302) ! used 4 times - TMP_JAMP(1203) = TMP_JAMP(1035) + TMP_JAMP(1031) ! used 4 times - TMP_JAMP(1202) = AMP(275) + AMP(298) ! used 4 times - TMP_JAMP(1201) = AMP(184) - AMP(300) ! used 4 times - TMP_JAMP(1200) = TMP_JAMP(1034) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(275) ! used 4 times - TMP_JAMP(1199) = TMP_JAMP(1035) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(184) ! used 4 times - TMP_JAMP(1198) = TMP_JAMP(1041) - TMP_JAMP(1036) ! used 4 times - TMP_JAMP(1197) = TMP_JAMP(1044) - TMP_JAMP(1035) ! used 4 times - TMP_JAMP(1196) = AMP(222) - AMP(299) ! used 4 times - TMP_JAMP(1195) = TMP_JAMP(1031) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(222) ! used 4 times - TMP_JAMP(1194) = TMP_JAMP(1038) - TMP_JAMP(1033) ! used 4 times - TMP_JAMP(1193) = TMP_JAMP(1032) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(231) ! used 4 times - TMP_JAMP(1192) = TMP_JAMP(1034) - TMP_JAMP(1031) ! used 4 times - TMP_JAMP(1191) = TMP_JAMP(1042) + TMP_JAMP(1032) ! used 4 times - TMP_JAMP(1190) = AMP(257) + AMP(292) ! used 4 times - TMP_JAMP(1189) = AMP(191) - AMP(294) ! used 4 times - TMP_JAMP(1188) = TMP_JAMP(1086) + TMP_JAMP(1043) ! used 4 times - TMP_JAMP(1187) = TMP_JAMP(1088) + TMP_JAMP(1045) ! used 4 times - TMP_JAMP(1186) = TMP_JAMP(1037) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(211) ! used 4 times - TMP_JAMP(1185) = TMP_JAMP(1039) - TMP_JAMP(1037) ! used 4 times - TMP_JAMP(1184) = AMP(209) - AMP(293) ! used 4 times - TMP_JAMP(1183) = TMP_JAMP(1081) + TMP_JAMP(1040) ! used 4 times - TMP_JAMP(1182) = AMP(284) + AMP(307) ! used 4 times - TMP_JAMP(1181) = AMP(202) - AMP(309) ! used 4 times - TMP_JAMP(1180) = TMP_JAMP(1038) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(284) ! used 4 times - TMP_JAMP(1179) = TMP_JAMP(1041) + TMP_JAMP(1038) ! used 4 times - TMP_JAMP(1178) = TMP_JAMP(1063) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1039) ! used 4 times - TMP_JAMP(1177) = AMP(220) - AMP(308) ! used 4 times - TMP_JAMP(1176) = TMP_JAMP(1062) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1033) ! used 4 times - TMP_JAMP(1175) = TMP_JAMP(1065) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1044) ! used 4 times - TMP_JAMP(1174) = AMP(278) + AMP(313) ! used 4 times - TMP_JAMP(1173) = AMP(260) - AMP(315) ! used 4 times - TMP_JAMP(1172) = TMP_JAMP(1047) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1041) ! used 4 times - TMP_JAMP(1171) = TMP_JAMP(1048) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1042) ! used 4 times - TMP_JAMP(1170) = AMP(269) - AMP(314) ! used 4 times - TMP_JAMP(1169) = TMP_JAMP(1046) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1036) ! used 4 times - TMP_JAMP(1905) = TMP_JAMP(1821) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1513) ! used 4 times - TMP_JAMP(1904) = TMP_JAMP(1781) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1575) ! used 4 times - TMP_JAMP(1903) = TMP_JAMP(1739) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(854) ! used 4 times - TMP_JAMP(1902) = TMP_JAMP(1735) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1731) ! used 4 times - TMP_JAMP(1901) = TMP_JAMP(1721) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1716) ! used 4 times - TMP_JAMP(1900) = TMP_JAMP(1686) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1632) ! used 4 times - TMP_JAMP(1899) = TMP_JAMP(1675) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1828) ! used 4 times - TMP_JAMP(1898) = TMP_JAMP(1645) - TMP_JAMP(1642) ! used 4 times - TMP_JAMP(1897) = TMP_JAMP(1646) + TMP_JAMP(1641) ! used 4 times - TMP_JAMP(1896) = TMP_JAMP(1630) + TMP_JAMP(1627) ! used 4 times - TMP_JAMP(1895) = TMP_JAMP(1617) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(655) ! used 4 times - TMP_JAMP(1894) = TMP_JAMP(1605) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(636) ! used 4 times - TMP_JAMP(1893) = TMP_JAMP(1593) - AMP(1437) ! used 4 times - TMP_JAMP(1892) = TMP_JAMP(1594) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(623) ! used 4 times - TMP_JAMP(1891) = TMP_JAMP(1598) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1595) ! used 4 times - TMP_JAMP(1890) = TMP_JAMP(1589) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(617) ! used 4 times - TMP_JAMP(1889) = TMP_JAMP(1585) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1578) ! used 4 times - TMP_JAMP(1888) = TMP_JAMP(1586) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1579) ! used 4 times - TMP_JAMP(1887) = TMP_JAMP(1568) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(1647) ! used 4 times - TMP_JAMP(1886) = TMP_JAMP(1573) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1565) ! used 4 times - TMP_JAMP(1885) = TMP_JAMP(1574) - TMP_JAMP(1570) ! used 4 times - TMP_JAMP(1884) = TMP_JAMP(1555) + AMP(1280) ! used 4 times - TMP_JAMP(1883) = TMP_JAMP(1559) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1556) ! used 4 times - TMP_JAMP(1882) = TMP_JAMP(1560) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1557) ! used 4 times - TMP_JAMP(1881) = TMP_JAMP(1538) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1534) ! used 4 times - TMP_JAMP(1880) = TMP_JAMP(1529) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(574) ! used 4 times - TMP_JAMP(1879) = TMP_JAMP(1525) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(570) ! used 4 times - TMP_JAMP(1878) = TMP_JAMP(1526) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1523) ! used 4 times - TMP_JAMP(1877) = TMP_JAMP(1511) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1509) ! used 4 times - TMP_JAMP(1876) = TMP_JAMP(1512) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1510) ! used 4 times - TMP_JAMP(1875) = TMP_JAMP(1507) + TMP_JAMP(1506) ! used 4 times - TMP_JAMP(1874) = TMP_JAMP(1508) - TMP_JAMP(1505) ! used 4 times - TMP_JAMP(1873) = TMP_JAMP(1499) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1497) ! used 4 times - TMP_JAMP(1872) = TMP_JAMP(1491) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(543) ! used 4 times - TMP_JAMP(1871) = TMP_JAMP(1492) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1490) ! used 4 times - TMP_JAMP(1870) = TMP_JAMP(1480) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1479) ! used 4 times - TMP_JAMP(1869) = TMP_JAMP(1478) - TMP_JAMP(1477) ! used 4 times - TMP_JAMP(1868) = TMP_JAMP(1468) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1558) ! used 4 times - TMP_JAMP(1867) = TMP_JAMP(1472) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1467) ! used 4 times - TMP_JAMP(1866) = TMP_JAMP(1475) - TMP_JAMP(1471) ! used 4 times - TMP_JAMP(1865) = TMP_JAMP(1462) + TMP_JAMP(1459) ! used 4 times - TMP_JAMP(1864) = TMP_JAMP(1451) - TMP_JAMP(1450) ! used 4 times - TMP_JAMP(1863) = TMP_JAMP(1435) + TMP_JAMP(1434) ! used 4 times - TMP_JAMP(1862) = TMP_JAMP(1424) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(1614) ! used 4 times - TMP_JAMP(1861) = TMP_JAMP(1403) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1399) ! used 4 times - TMP_JAMP(1860) = TMP_JAMP(1404) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1400) ! used 4 times - TMP_JAMP(1859) = TMP_JAMP(1397) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1396) ! used 4 times - TMP_JAMP(1858) = TMP_JAMP(1381) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(1777) ! used 4 times - TMP_JAMP(1857) = TMP_JAMP(1367) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1364) ! used 4 times - TMP_JAMP(1856) = TMP_JAMP(1339) + TMP_JAMP(1338) ! used 4 times - TMP_JAMP(1855) = TMP_JAMP(1340) - TMP_JAMP(1337) ! used 4 times - TMP_JAMP(1854) = TMP_JAMP(1316) - TMP_JAMP(1315) ! used 4 times - TMP_JAMP(1853) = TMP_JAMP(1281) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1278) ! used 4 times - TMP_JAMP(1852) = TMP_JAMP(1274) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1273) ! used 4 times - TMP_JAMP(1851) = TMP_JAMP(1271) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1756) ! used 4 times - TMP_JAMP(1850) = TMP_JAMP(1272) + TMP_JAMP(1270) ! used 4 times - TMP_JAMP(1849) = TMP_JAMP(1269) + TMP_JAMP(1268) ! used 4 times - TMP_JAMP(1848) = TMP_JAMP(1263) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1262) ! used 4 times - TMP_JAMP(1847) = TMP_JAMP(1264) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1261) ! used 4 times - TMP_JAMP(1846) = TMP_JAMP(1189) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1187) ! used 4 times - TMP_JAMP(1845) = TMP_JAMP(1190) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1188) ! used 4 times - TMP_JAMP(1844) = TMP_JAMP(1184) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1183) ! used 4 times - TMP_JAMP(1843) = TMP_JAMP(1181) + TMP_JAMP(1178) ! used 4 times - TMP_JAMP(1842) = TMP_JAMP(1177) + TMP_JAMP(1176) ! used 4 times - TMP_JAMP(1841) = TMP_JAMP(1175) + AMP(193) ! used 4 times - TMP_JAMP(1840) = TMP_JAMP(1173) - TMP_JAMP(1171) ! used 4 times - TMP_JAMP(1839) = TMP_JAMP(1174) + TMP_JAMP(1172) ! used 4 times - TMP_JAMP(1838) = TMP_JAMP(1170) - TMP_JAMP(1169) ! used 4 times - TMP_JAMP(1928) = TMP_JAMP(1897) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1637) ! used 4 times - TMP_JAMP(1927) = TMP_JAMP(1898) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1636) ! used 4 times - TMP_JAMP(1926) = TMP_JAMP(1896) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1626) ! used 4 times - TMP_JAMP(1925) = TMP_JAMP(1888) - AMP(448) ! used 4 times - TMP_JAMP(1924) = TMP_JAMP(1889) + AMP(450) ! used 4 times - TMP_JAMP(1923) = TMP_JAMP(1882) + AMP(1657) ! used 4 times - TMP_JAMP(1922) = TMP_JAMP(1883) - AMP(1659) ! used 4 times - TMP_JAMP(1921) = TMP_JAMP(1878) + AMP(449) ! used 4 times - TMP_JAMP(1920) = TMP_JAMP(1876) - AMP(1576) ! used 4 times - TMP_JAMP(1919) = TMP_JAMP(1877) + AMP(1578) ! used 4 times - TMP_JAMP(1918) = TMP_JAMP(1871) - AMP(1658) ! used 4 times - TMP_JAMP(1917) = TMP_JAMP(1870) + AMP(1577) ! used 4 times - TMP_JAMP(1916) = TMP_JAMP(1866) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1464) ! used 4 times - TMP_JAMP(1915) = TMP_JAMP(1867) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1416) ! used 4 times - TMP_JAMP(1914) = TMP_JAMP(1865) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1454) ! used 4 times - TMP_JAMP(1913) = TMP_JAMP(1864) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1444) ! used 4 times - TMP_JAMP(1912) = TMP_JAMP(1863) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1429) ! used 4 times - TMP_JAMP(1911) = TMP_JAMP(1860) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(1879) ! used 4 times - TMP_JAMP(1910) = TMP_JAMP(1861) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(440) ! used 4 times - TMP_JAMP(1909) = TMP_JAMP(1857) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1068) ! used 4 times - TMP_JAMP(1908) = TMP_JAMP(1855) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1330) ! used 4 times - TMP_JAMP(1907) = TMP_JAMP(1856) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1331) ! used 4 times - TMP_JAMP(1906) = TMP_JAMP(1854) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1311) ! used 4 times - TMP_JAMP(1989) = TMP_JAMP(1167) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(528) ! used 3 times - TMP_JAMP(1988) = TMP_JAMP(1799) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1156) ! used 3 times - TMP_JAMP(1987) = TMP_JAMP(1827) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(453) ! used 3 times - TMP_JAMP(1986) = TMP_JAMP(1830) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(352) ! used 3 times - TMP_JAMP(1985) = TMP_JAMP(970) - AMP(1202) ! used 3 times - TMP_JAMP(1984) = TMP_JAMP(1166) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(909) ! used 3 times - TMP_JAMP(1983) = TMP_JAMP(1812) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(511) ! used 3 times - TMP_JAMP(1982) = TMP_JAMP(1165) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(370) ! used 3 times - TMP_JAMP(1981) = TMP_JAMP(1164) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(670) ! used 3 times - TMP_JAMP(1980) = TMP_JAMP(893) - AMP(432) ! used 3 times - TMP_JAMP(1979) = TMP_JAMP(1166) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(687) ! used 3 times - TMP_JAMP(1978) = TMP_JAMP(926) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(919) ! used 3 times - TMP_JAMP(1977) = TMP_JAMP(1737) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(864) ! used 3 times - TMP_JAMP(1976) = TMP_JAMP(1902) + TMP_JAMP(837) ! used 3 times - TMP_JAMP(1975) = TMP_JAMP(875) - AMP(1058) ! used 3 times - TMP_JAMP(1974) = TMP_JAMP(833) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(527) ! used 3 times - TMP_JAMP(1973) = TMP_JAMP(792) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(789) ! used 3 times - TMP_JAMP(1972) = TMP_JAMP(1704) - TMP_JAMP(785) ! used 3 times - TMP_JAMP(1971) = TMP_JAMP(1708) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1695) ! used 3 times - TMP_JAMP(1970) = TMP_JAMP(864) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(779) ! used 3 times - TMP_JAMP(1969) = TMP_JAMP(1690) - TMP_JAMP(1013) ! used 3 times - TMP_JAMP(1968) = TMP_JAMP(1669) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1156) ! used 3 times - TMP_JAMP(1967) = TMP_JAMP(833) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(716) ! used 3 times - TMP_JAMP(1966) = TMP_JAMP(1571) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1566) ! used 3 times - TMP_JAMP(1965) = TMP_JAMP(1581) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(610) ! used 3 times - TMP_JAMP(1964) = TMP_JAMP(1553) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1549) ! used 3 times - TMP_JAMP(1963) = TMP_JAMP(1532) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1530) ! used 3 times - TMP_JAMP(1962) = TMP_JAMP(1576) + AMP(1112) ! used 3 times - TMP_JAMP(1961) = TMP_JAMP(1522) - TMP_JAMP(1519) ! used 3 times - TMP_JAMP(1960) = TMP_JAMP(1535) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1496) ! used 3 times - TMP_JAMP(1959) = TMP_JAMP(1489) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1486) ! used 3 times - TMP_JAMP(1958) = TMP_JAMP(1554) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1548) ! used 3 times - TMP_JAMP(1957) = TMP_JAMP(1469) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(1560) ! used 3 times - TMP_JAMP(1956) = TMP_JAMP(1446) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(705) ! used 3 times - TMP_JAMP(1955) = TMP_JAMP(1575) + TMP_JAMP(1569) ! used 3 times - TMP_JAMP(1954) = TMP_JAMP(864) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(675) ! used 3 times - TMP_JAMP(1953) = TMP_JAMP(1405) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1401) ! used 3 times - TMP_JAMP(1952) = TMP_JAMP(1379) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(61) ! used 3 times - TMP_JAMP(1951) = TMP_JAMP(833) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(514) ! used 3 times - TMP_JAMP(1950) = TMP_JAMP(1362) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1360) ! used 3 times - TMP_JAMP(1949) = TMP_JAMP(1368) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1365) ! used 3 times - TMP_JAMP(1948) = TMP_JAMP(1348) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(628) ! used 3 times - TMP_JAMP(1947) = TMP_JAMP(1382) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1132) ! used 3 times - TMP_JAMP(1946) = TMP_JAMP(1336) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(1650) ! used 3 times - TMP_JAMP(1945) = TMP_JAMP(794) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(788) ! used 3 times - TMP_JAMP(1944) = TMP_JAMP(1326) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(1649) ! used 3 times - TMP_JAMP(1943) = TMP_JAMP(1313) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(653) ! used 3 times - TMP_JAMP(1942) = TMP_JAMP(1335) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1648) ! used 3 times - TMP_JAMP(1941) = TMP_JAMP(777) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(772) ! used 3 times - TMP_JAMP(1940) = TMP_JAMP(731) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(725) ! used 3 times - TMP_JAMP(1939) = TMP_JAMP(1319) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1764) ! used 3 times - TMP_JAMP(1938) = TMP_JAMP(714) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(711) ! used 3 times - TMP_JAMP(1937) = TMP_JAMP(1377) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(1522) ! used 3 times - TMP_JAMP(1936) = TMP_JAMP(1373) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(1528) ! used 3 times - TMP_JAMP(1935) = TMP_JAMP(760) + AMP(136) ! used 3 times - TMP_JAMP(1934) = TMP_JAMP(1259) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1257) ! used 3 times - TMP_JAMP(1933) = TMP_JAMP(1231) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(290) ! used 3 times - TMP_JAMP(1932) = TMP_JAMP(1236) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(177) ! used 3 times - TMP_JAMP(1931) = TMP_JAMP(1243) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(289) ! used 3 times - TMP_JAMP(1930) = TMP_JAMP(1226) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(312) ! used 3 times - TMP_JAMP(1929) = TMP_JAMP(1238) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(175) ! used 3 times - TMP_JAMP(1991) = TMP_JAMP(1969) + AMP(1458) ! used 3 times - TMP_JAMP(1990) = TMP_JAMP(1935) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1644) ! used 3 times - TMP_JAMP(2641) = AMP(150) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(436) ! used 2 times - TMP_JAMP(2640) = TMP_JAMP(1831) - AMP(83) ! used 2 times - TMP_JAMP(2639) = TMP_JAMP(1836) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(415) ! used 2 times - TMP_JAMP(2638) = TMP_JAMP(1837) + AMP(150) ! used 2 times - TMP_JAMP(2637) = TMP_JAMP(1905) + AMP(349) ! used 2 times - TMP_JAMP(2636) = AMP(150) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1060) ! used 2 times - TMP_JAMP(2635) = TMP_JAMP(1814) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1802) ! used 2 times - TMP_JAMP(2634) = TMP_JAMP(1815) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1801) ! used 2 times - TMP_JAMP(2633) = TMP_JAMP(1820) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1816) ! used 2 times - TMP_JAMP(2632) = TMP_JAMP(1796) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(1514) ! used 2 times - TMP_JAMP(2631) = TMP_JAMP(1798) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(369) ! used 2 times - TMP_JAMP(2630) = TMP_JAMP(1800) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1791) ! used 2 times - TMP_JAMP(2629) = TMP_JAMP(1804) + TMP_JAMP(1796) ! used 2 times - TMP_JAMP(2628) = TMP_JAMP(1905) - TMP_JAMP(1804) ! used 2 times - TMP_JAMP(2627) = TMP_JAMP(1986) + AMP(444) ! used 2 times - TMP_JAMP(2626) = TMP_JAMP(1987) + TMP_JAMP(1793) ! used 2 times - TMP_JAMP(2625) = TMP_JAMP(1989) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1988) ! used 2 times - TMP_JAMP(2624) = TMP_JAMP(931) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(92) ! used 2 times - TMP_JAMP(2623) = TMP_JAMP(945) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(938) ! used 2 times - TMP_JAMP(2622) = TMP_JAMP(1782) + AMP(1206) ! used 2 times - TMP_JAMP(2621) = TMP_JAMP(1784) - AMP(1460) ! used 2 times - TMP_JAMP(2620) = TMP_JAMP(1785) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(931) ! used 2 times - TMP_JAMP(2619) = TMP_JAMP(1787) - TMP_JAMP(1785) ! used 2 times - TMP_JAMP(2618) = TMP_JAMP(1788) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1786) ! used 2 times - TMP_JAMP(2617) = TMP_JAMP(1833) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1787) ! used 2 times - TMP_JAMP(2616) = TMP_JAMP(1904) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1833) ! used 2 times - TMP_JAMP(2615) = AMP(1065) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1765) ! used 2 times - TMP_JAMP(2614) = TMP_JAMP(1772) - AMP(1065) ! used 2 times - TMP_JAMP(2613) = TMP_JAMP(1774) + TMP_JAMP(1773) ! used 2 times - TMP_JAMP(2612) = TMP_JAMP(1776) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1767) ! used 2 times - TMP_JAMP(2611) = TMP_JAMP(1777) - AMP(1121) ! used 2 times - TMP_JAMP(2610) = TMP_JAMP(1777) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(686) ! used 2 times - TMP_JAMP(2609) = TMP_JAMP(1814) + TMP_JAMP(1779) ! used 2 times - TMP_JAMP(2608) = TMP_JAMP(1983) - TMP_JAMP(1772) ! used 2 times - TMP_JAMP(2607) = TMP_JAMP(1984) - TMP_JAMP(1905) ! used 2 times - TMP_JAMP(2606) = AMP(686) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(761) ! used 2 times - TMP_JAMP(2605) = TMP_JAMP(1152) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(898) ! used 2 times - TMP_JAMP(2604) = TMP_JAMP(1904) - TMP_JAMP(1152) ! used 2 times - TMP_JAMP(2603) = AMP(82) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(144) ! used 2 times - TMP_JAMP(2602) = TMP_JAMP(886) - TMP_JAMP(883) ! used 2 times - TMP_JAMP(2601) = TMP_JAMP(1763) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(367) ! used 2 times - TMP_JAMP(2600) = TMP_JAMP(1820) + TMP_JAMP(1155) ! used 2 times - TMP_JAMP(2599) = TMP_JAMP(1836) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1756) ! used 2 times - TMP_JAMP(2598) = TMP_JAMP(1982) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1762) ! used 2 times - TMP_JAMP(2597) = TMP_JAMP(1988) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1755) ! used 2 times - TMP_JAMP(2596) = TMP_JAMP(1746) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(144) ! used 2 times - TMP_JAMP(2595) = TMP_JAMP(1752) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1746) ! used 2 times - TMP_JAMP(2594) = TMP_JAMP(1761) - TMP_JAMP(869) ! used 2 times - TMP_JAMP(2593) = TMP_JAMP(1779) - TMP_JAMP(1751) ! used 2 times - TMP_JAMP(2592) = TMP_JAMP(1816) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1803) ! used 2 times - TMP_JAMP(2591) = TMP_JAMP(1981) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1752) ! used 2 times - TMP_JAMP(2590) = TMP_JAMP(853) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(351) ! used 2 times - TMP_JAMP(2589) = TMP_JAMP(855) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(435) ! used 2 times - TMP_JAMP(2588) = TMP_JAMP(860) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(792) ! used 2 times - TMP_JAMP(2587) = TMP_JAMP(974) + ((-0.000000000000000D+00 + TMP_JAMP(862) = TMP_JAMP(682) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(807) ! used 4 times + TMP_JAMP(861) = TMP_JAMP(682) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(801) ! used 4 times + TMP_JAMP(860) = TMP_JAMP(681) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(810) ! used 4 times + TMP_JAMP(859) = TMP_JAMP(681) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(799) ! used 4 times + TMP_JAMP(858) = TMP_JAMP(676) - AMP(614) ! used 4 times + TMP_JAMP(857) = TMP_JAMP(675) + AMP(625) ! used 4 times + TMP_JAMP(856) = TMP_JAMP(668) - AMP(690) ! used 4 times + TMP_JAMP(855) = AMP(475) - AMP(477) ! used 4 times + TMP_JAMP(854) = AMP(474) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(477) ! used 4 times + TMP_JAMP(853) = AMP(472) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(475) ! used 4 times + TMP_JAMP(852) = AMP(593) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(622) ! used 4 times + TMP_JAMP(851) = AMP(622) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(627) ! used 4 times + TMP_JAMP(850) = AMP(678) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(686) ! used 4 times + TMP_JAMP(849) = AMP(678) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(767) ! used 4 times + TMP_JAMP(848) = AMP(476) + AMP(477) ! used 4 times + TMP_JAMP(847) = AMP(473) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(476) ! used 4 times + TMP_JAMP(846) = AMP(534) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(536) ! used 4 times + TMP_JAMP(845) = AMP(695) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(708) ! used 4 times + TMP_JAMP(844) = AMP(536) + AMP(695) ! used 4 times + TMP_JAMP(843) = AMP(693) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(695) ! used 4 times + TMP_JAMP(842) = AMP(536) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(549) ! used 4 times + TMP_JAMP(841) = AMP(923) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(941) ! used 4 times + TMP_JAMP(840) = AMP(932) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(941) ! used 4 times + TMP_JAMP(839) = AMP(475) + AMP(476) ! used 4 times + TMP_JAMP(838) = AMP(481) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(536) ! used 4 times + TMP_JAMP(837) = AMP(640) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(695) ! used 4 times + TMP_JAMP(836) = AMP(811) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(941) ! used 4 times + TMP_JAMP(1062) = TMP_JAMP(1037) - TMP_JAMP(857) ! used 4 times + TMP_JAMP(1061) = TMP_JAMP(993) + TMP_JAMP(762) ! used 4 times + TMP_JAMP(1060) = TMP_JAMP(979) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(788) ! used 4 times + TMP_JAMP(1059) = TMP_JAMP(959) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(795) ! used 4 times + TMP_JAMP(1058) = TMP_JAMP(958) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(795) ! used 4 times + TMP_JAMP(1057) = TMP_JAMP(952) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(788) ! used 4 times + TMP_JAMP(1056) = TMP_JAMP(940) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(752) ! used 4 times + TMP_JAMP(1055) = TMP_JAMP(932) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(762) ! used 4 times + TMP_JAMP(1054) = TMP_JAMP(929) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(750) ! used 4 times + TMP_JAMP(1053) = TMP_JAMP(914) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(753) ! used 4 times + TMP_JAMP(1052) = TMP_JAMP(913) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(754) ! used 4 times + TMP_JAMP(1051) = TMP_JAMP(904) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(793) ! used 4 times + TMP_JAMP(1050) = TMP_JAMP(895) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(793) ! used 4 times + TMP_JAMP(1049) = TMP_JAMP(883) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(754) ! used 4 times + TMP_JAMP(1048) = TMP_JAMP(882) - TMP_JAMP(744) ! used 4 times + TMP_JAMP(1047) = TMP_JAMP(875) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(822) ! used 4 times + TMP_JAMP(1046) = TMP_JAMP(867) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(793) ! used 4 times + TMP_JAMP(1045) = TMP_JAMP(864) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(836) ! used 4 times + TMP_JAMP(1044) = TMP_JAMP(863) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(751) ! used 4 times + TMP_JAMP(1065) = TMP_JAMP(944) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(781) ! used 3 times + TMP_JAMP(1064) = TMP_JAMP(943) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(777) ! used 3 times + TMP_JAMP(1063) = TMP_JAMP(893) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(667) ! used 3 times + TMP_JAMP(1304) = TMP_JAMP(1065) + TMP_JAMP(1064) ! used 2 times + TMP_JAMP(1303) = TMP_JAMP(1065) - TMP_JAMP(981) ! used 2 times + TMP_JAMP(1302) = TMP_JAMP(1063) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(804) ! used 2 times + TMP_JAMP(1301) = TMP_JAMP(1063) - TMP_JAMP(896) ! used 2 times + TMP_JAMP(1300) = TMP_JAMP(1062) + TMP_JAMP(1012) ! used 2 times + TMP_JAMP(1299) = TMP_JAMP(1062) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(907) ! used 2 times + TMP_JAMP(1298) = TMP_JAMP(1061) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1054) ! used 2 times + TMP_JAMP(1297) = TMP_JAMP(1059) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1025) ! used 2 times + TMP_JAMP(1296) = TMP_JAMP(1058) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1031) ! used 2 times + TMP_JAMP(1295) = TMP_JAMP(1057) + TMP_JAMP(1055) ! used 2 times + TMP_JAMP(1294) = TMP_JAMP(1056) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(996) ! used 2 times + TMP_JAMP(1293) = TMP_JAMP(1055) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(993) ! used 2 times + TMP_JAMP(1292) = TMP_JAMP(1054) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(999) ! used 2 times + TMP_JAMP(1291) = TMP_JAMP(1053) + TMP_JAMP(933) ! used 2 times + TMP_JAMP(1290) = TMP_JAMP(1052) + TMP_JAMP(939) ! used 2 times + TMP_JAMP(1289) = TMP_JAMP(1050) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1021) ! used 2 times + TMP_JAMP(1288) = TMP_JAMP(1049) - TMP_JAMP(939) ! used 2 times + TMP_JAMP(1287) = TMP_JAMP(1048) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1042) ! used 2 times + TMP_JAMP(1286) = TMP_JAMP(1047) - TMP_JAMP(945) ! used 2 times + TMP_JAMP(1285) = TMP_JAMP(1047) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1041) ! used 2 times + TMP_JAMP(1284) = TMP_JAMP(1046) + TMP_JAMP(895) ! used 2 times + TMP_JAMP(1283) = TMP_JAMP(1045) + TMP_JAMP(925) ! used 2 times + TMP_JAMP(1282) = TMP_JAMP(1044) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(992) ! used 2 times + TMP_JAMP(1281) = TMP_JAMP(1044) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(994) ! used 2 times + TMP_JAMP(1280) = TMP_JAMP(1043) + TMP_JAMP(1006) ! used 2 times + TMP_JAMP(1279) = TMP_JAMP(1041) + TMP_JAMP(1030) ! used 2 times + TMP_JAMP(1278) = TMP_JAMP(1040) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(984) ! used 2 times + TMP_JAMP(1277) = TMP_JAMP(1040) + TMP_JAMP(1029) ! used 2 times + TMP_JAMP(1276) = TMP_JAMP(1035) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(988) ! used 2 times + TMP_JAMP(1275) = TMP_JAMP(1031) + TMP_JAMP(1005) ! used 2 times + TMP_JAMP(1274) = TMP_JAMP(1031) + ((0.000000000000000D+00 $ ,1.000000000000000D+00)) * TMP_JAMP(961) ! used 2 times - TMP_JAMP(2586) = TMP_JAMP(1744) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1740) ! used 2 times - TMP_JAMP(2585) = TMP_JAMP(1745) + TMP_JAMP(1744) ! used 2 times - TMP_JAMP(2584) = TMP_JAMP(1903) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1763) ! used 2 times - TMP_JAMP(2583) = TMP_JAMP(1987) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(853) ! used 2 times - TMP_JAMP(2582) = TMP_JAMP(1987) - TMP_JAMP(1979) ! used 2 times - TMP_JAMP(2581) = AMP(122) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(1469) ! used 2 times - TMP_JAMP(2580) = AMP(95) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(122) ! used 2 times - TMP_JAMP(2579) = TMP_JAMP(939) - TMP_JAMP(838) ! used 2 times - TMP_JAMP(2578) = TMP_JAMP(1158) - AMP(1128) ! used 2 times - TMP_JAMP(2577) = TMP_JAMP(1730) + TMP_JAMP(942) ! used 2 times - TMP_JAMP(2576) = TMP_JAMP(1736) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1732) ! used 2 times - TMP_JAMP(2575) = TMP_JAMP(1976) - TMP_JAMP(1761) ! used 2 times - TMP_JAMP(2574) = AMP(1056) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1230) ! used 2 times - TMP_JAMP(2573) = TMP_JAMP(822) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(509) ! used 2 times - TMP_JAMP(2572) = TMP_JAMP(830) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(1722) ! used 2 times - TMP_JAMP(2571) = TMP_JAMP(1728) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1724) ! used 2 times - TMP_JAMP(2570) = TMP_JAMP(1729) + TMP_JAMP(1728) ! used 2 times - TMP_JAMP(2569) = TMP_JAMP(1985) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1814) ! used 2 times - TMP_JAMP(2568) = AMP(122) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1472) ! used 2 times - TMP_JAMP(2567) = TMP_JAMP(811) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(602) ! used 2 times - TMP_JAMP(2566) = TMP_JAMP(1901) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1167) ! used 2 times - TMP_JAMP(2565) = AMP(378) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(390) ! used 2 times - TMP_JAMP(2564) = TMP_JAMP(795) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(417) ! used 2 times - TMP_JAMP(2563) = TMP_JAMP(795) - AMP(390) ! used 2 times - TMP_JAMP(2562) = TMP_JAMP(798) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(594) ! used 2 times - TMP_JAMP(2561) = TMP_JAMP(798) - AMP(534) ! used 2 times - TMP_JAMP(2560) = TMP_JAMP(1706) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(796) ! used 2 times - TMP_JAMP(2559) = TMP_JAMP(1715) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1712) ! used 2 times - TMP_JAMP(2558) = TMP_JAMP(1798) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1709) ! used 2 times - TMP_JAMP(2557) = TMP_JAMP(1798) + TMP_JAMP(1713) ! used 2 times - TMP_JAMP(2556) = TMP_JAMP(1989) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(800) ! used 2 times - TMP_JAMP(2555) = AMP(534) - AMP(708) ! used 2 times - TMP_JAMP(2554) = TMP_JAMP(1163) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(783) ! used 2 times - TMP_JAMP(2553) = TMP_JAMP(1903) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1769) ! used 2 times - TMP_JAMP(2552) = TMP_JAMP(1972) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(762) ! used 2 times - TMP_JAMP(2551) = TMP_JAMP(1972) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1134) ! used 2 times - TMP_JAMP(2550) = TMP_JAMP(1972) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1971) ! used 2 times - TMP_JAMP(2549) = TMP_JAMP(1973) - TMP_JAMP(1163) ! used 2 times - TMP_JAMP(2548) = AMP(380) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(390) ! used 2 times - TMP_JAMP(2547) = TMP_JAMP(1700) - TMP_JAMP(780) ! used 2 times - TMP_JAMP(2546) = TMP_JAMP(1741) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(778) ! used 2 times - TMP_JAMP(2545) = TMP_JAMP(1979) + TMP_JAMP(1970) ! used 2 times - TMP_JAMP(2544) = AMP(549) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(1296) ! used 2 times - TMP_JAMP(2543) = TMP_JAMP(768) + TMP_JAMP(767) ! used 2 times - TMP_JAMP(2542) = TMP_JAMP(1737) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1162) ! used 2 times - TMP_JAMP(2541) = TMP_JAMP(1971) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1901) ! used 2 times - TMP_JAMP(2540) = TMP_JAMP(759) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1454) ! used 2 times - TMP_JAMP(2539) = TMP_JAMP(1689) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(759) ! used 2 times - TMP_JAMP(2538) = TMP_JAMP(1691) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(1289) ! used 2 times - TMP_JAMP(2537) = TMP_JAMP(1715) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1689) ! used 2 times - TMP_JAMP(2536) = TMP_JAMP(1769) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(906) ! used 2 times - TMP_JAMP(2535) = TMP_JAMP(1900) - AMP(91) ! used 2 times - TMP_JAMP(2534) = TMP_JAMP(1991) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1715) ! used 2 times - TMP_JAMP(2533) = TMP_JAMP(1991) - TMP_JAMP(1904) ! used 2 times - TMP_JAMP(2532) = TMP_JAMP(749) + AMP(1636) ! used 2 times - TMP_JAMP(2531) = TMP_JAMP(1680) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(748) ! used 2 times - TMP_JAMP(2530) = TMP_JAMP(1682) - AMP(94) ! used 2 times - TMP_JAMP(2529) = AMP(1119) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(1830) ! used 2 times - TMP_JAMP(2528) = AMP(830) + AMP(832) ! used 2 times - TMP_JAMP(2527) = AMP(814) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(830) ! used 2 times - TMP_JAMP(2526) = AMP(686) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1119) ! used 2 times - TMP_JAMP(2525) = AMP(686) - AMP(832) ! used 2 times - TMP_JAMP(2524) = TMP_JAMP(1673) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(736) ! used 2 times - TMP_JAMP(2523) = TMP_JAMP(1678) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(814) ! used 2 times - TMP_JAMP(2522) = TMP_JAMP(1778) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1672) ! used 2 times - TMP_JAMP(2521) = TMP_JAMP(1778) + TMP_JAMP(1678) ! used 2 times - TMP_JAMP(2520) = TMP_JAMP(1899) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(734) ! used 2 times - TMP_JAMP(2519) = TMP_JAMP(1978) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1677) ! used 2 times - TMP_JAMP(2518) = AMP(832) - AMP(866) ! used 2 times - TMP_JAMP(2517) = TMP_JAMP(721) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1205) ! used 2 times - TMP_JAMP(2516) = TMP_JAMP(1160) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(722) ! used 2 times - TMP_JAMP(2515) = TMP_JAMP(1770) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1160) ! used 2 times - TMP_JAMP(2514) = TMP_JAMP(1968) + TMP_JAMP(720) ! used 2 times - TMP_JAMP(2513) = TMP_JAMP(1968) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1783) ! used 2 times - TMP_JAMP(2512) = AMP(815) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(850) ! used 2 times - TMP_JAMP(2511) = TMP_JAMP(1664) + TMP_JAMP(717) ! used 2 times - TMP_JAMP(2510) = TMP_JAMP(1725) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(715) ! used 2 times - TMP_JAMP(2509) = TMP_JAMP(1967) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(527) ! used 2 times - TMP_JAMP(2508) = TMP_JAMP(1028) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1006) ! used 2 times - TMP_JAMP(2507) = TMP_JAMP(1159) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(709) ! used 2 times - TMP_JAMP(2506) = TMP_JAMP(1674) - TMP_JAMP(1656) ! used 2 times - TMP_JAMP(2505) = TMP_JAMP(1736) + TMP_JAMP(1679) ! used 2 times - TMP_JAMP(2504) = AMP(925) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(943) ! used 2 times - TMP_JAMP(2503) = TMP_JAMP(1653) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(925) ! used 2 times - TMP_JAMP(2502) = TMP_JAMP(1899) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(702) ! used 2 times - TMP_JAMP(2501) = TMP_JAMP(1900) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1653) ! used 2 times - TMP_JAMP(2500) = AMP(346) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(462) ! used 2 times - TMP_JAMP(2499) = AMP(65) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(80) ! used 2 times - TMP_JAMP(2498) = TMP_JAMP(681) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(346) ! used 2 times - TMP_JAMP(2497) = TMP_JAMP(1133) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(681) ! used 2 times - TMP_JAMP(2496) = TMP_JAMP(1631) + TMP_JAMP(1133) ! used 2 times - TMP_JAMP(2495) = TMP_JAMP(1638) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(678) ! used 2 times - TMP_JAMP(2494) = TMP_JAMP(1837) - TMP_JAMP(1762) ! used 2 times - TMP_JAMP(2493) = TMP_JAMP(1928) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1640) ! used 2 times - TMP_JAMP(2492) = TMP_JAMP(1986) - TMP_JAMP(1631) ! used 2 times - TMP_JAMP(2491) = TMP_JAMP(1986) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1927) ! used 2 times - TMP_JAMP(2490) = TMP_JAMP(666) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(505) ! used 2 times - TMP_JAMP(2489) = TMP_JAMP(1622) + TMP_JAMP(1131) ! used 2 times - TMP_JAMP(2488) = TMP_JAMP(1747) + AMP(1030) ! used 2 times - TMP_JAMP(2487) = TMP_JAMP(1983) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1926) ! used 2 times - TMP_JAMP(2486) = AMP(583) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(627) ! used 2 times - TMP_JAMP(2485) = AMP(546) + ((0.000000000000000D+00, + TMP_JAMP(1273) = TMP_JAMP(1030) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(899) ! used 2 times + TMP_JAMP(1272) = TMP_JAMP(1029) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(968) ! used 2 times + TMP_JAMP(1271) = TMP_JAMP(1022) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(953) ! used 2 times + TMP_JAMP(1270) = TMP_JAMP(1020) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(976) ! used 2 times + TMP_JAMP(1269) = TMP_JAMP(1020) + TMP_JAMP(992) ! used 2 times + TMP_JAMP(1268) = TMP_JAMP(1013) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(976) ! used 2 times + TMP_JAMP(1267) = TMP_JAMP(1013) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(948) ! used 2 times + TMP_JAMP(1266) = TMP_JAMP(1010) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(961) ! used 2 times + TMP_JAMP(1265) = TMP_JAMP(1010) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(956) ! used 2 times + TMP_JAMP(1264) = TMP_JAMP(1006) + TMP_JAMP(1003) ! used 2 times + TMP_JAMP(1263) = TMP_JAMP(1005) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(888) ! used 2 times + TMP_JAMP(1262) = TMP_JAMP(1004) + TMP_JAMP(995) ! used 2 times + TMP_JAMP(1261) = TMP_JAMP(1003) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(937) ! used 2 times + TMP_JAMP(1260) = TMP_JAMP(1000) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(930) ! used 2 times + TMP_JAMP(1259) = TMP_JAMP(998) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(915) ! used 2 times + TMP_JAMP(1258) = TMP_JAMP(997) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(885) ! used 2 times + TMP_JAMP(1257) = TMP_JAMP(994) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(887) ! used 2 times + TMP_JAMP(1256) = TMP_JAMP(994) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(861) ! used 2 times + TMP_JAMP(1255) = TMP_JAMP(992) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(859) ! used 2 times + TMP_JAMP(1254) = TMP_JAMP(991) - TMP_JAMP(986) ! used 2 times + TMP_JAMP(1253) = TMP_JAMP(989) - AMP(594) ! used 2 times + TMP_JAMP(1252) = TMP_JAMP(989) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(679) ! used 2 times + TMP_JAMP(1251) = TMP_JAMP(987) - TMP_JAMP(946) ! used 2 times + TMP_JAMP(1250) = TMP_JAMP(985) + TMP_JAMP(923) ! used 2 times + TMP_JAMP(1249) = TMP_JAMP(984) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(852) ! used 2 times + TMP_JAMP(1248) = TMP_JAMP(984) + TMP_JAMP(968) ! used 2 times + TMP_JAMP(1247) = TMP_JAMP(983) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(779) ! used 2 times + TMP_JAMP(1246) = TMP_JAMP(983) + TMP_JAMP(967) ! used 2 times + TMP_JAMP(1245) = TMP_JAMP(982) + TMP_JAMP(921) ! used 2 times + TMP_JAMP(1244) = TMP_JAMP(981) - TMP_JAMP(876) ! used 2 times + TMP_JAMP(1243) = TMP_JAMP(979) + AMP(509) ! used 2 times + TMP_JAMP(1242) = TMP_JAMP(978) + TMP_JAMP(851) ! used 2 times + TMP_JAMP(1241) = TMP_JAMP(976) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(786) ! used 2 times + TMP_JAMP(1240) = TMP_JAMP(976) - TMP_JAMP(877) ! used 2 times + TMP_JAMP(1239) = TMP_JAMP(975) + TMP_JAMP(971) ! used 2 times + TMP_JAMP(1238) = TMP_JAMP(974) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(830) ! used 2 times + TMP_JAMP(1237) = TMP_JAMP(974) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(671) ! used 2 times + TMP_JAMP(1236) = TMP_JAMP(973) - TMP_JAMP(966) ! used 2 times + TMP_JAMP(1235) = TMP_JAMP(972) + TMP_JAMP(954) ! used 2 times + TMP_JAMP(1234) = TMP_JAMP(969) - TMP_JAMP(905) ! used 2 times + TMP_JAMP(1233) = TMP_JAMP(968) + TMP_JAMP(850) ! used 2 times + TMP_JAMP(1232) = TMP_JAMP(967) + TMP_JAMP(905) ! used 2 times + TMP_JAMP(1231) = TMP_JAMP(967) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(775) ! used 2 times + TMP_JAMP(1230) = TMP_JAMP(963) + TMP_JAMP(871) ! used 2 times + TMP_JAMP(1229) = TMP_JAMP(960) + TMP_JAMP(849) ! used 2 times + TMP_JAMP(1228) = TMP_JAMP(960) - AMP(762) ! used 2 times + TMP_JAMP(1227) = TMP_JAMP(959) - AMP(667) ! used 2 times + TMP_JAMP(1226) = TMP_JAMP(957) + TMP_JAMP(955) ! used 2 times + TMP_JAMP(1225) = TMP_JAMP(953) + TMP_JAMP(890) ! used 2 times + TMP_JAMP(1224) = TMP_JAMP(953) + TMP_JAMP(928) ! used 2 times + TMP_JAMP(1223) = TMP_JAMP(950) - TMP_JAMP(947) ! used 2 times + TMP_JAMP(1222) = TMP_JAMP(945) - TMP_JAMP(879) ! used 2 times + TMP_JAMP(1221) = TMP_JAMP(942) + TMP_JAMP(868) ! used 2 times + TMP_JAMP(1220) = TMP_JAMP(941) - TMP_JAMP(866) ! used 2 times + TMP_JAMP(1219) = TMP_JAMP(939) - TMP_JAMP(918) ! used 2 times + TMP_JAMP(1218) = TMP_JAMP(939) + TMP_JAMP(888) ! used 2 times + TMP_JAMP(1217) = TMP_JAMP(938) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(773) ! used 2 times + TMP_JAMP(1216) = TMP_JAMP(937) + TMP_JAMP(918) ! used 2 times + TMP_JAMP(1215) = TMP_JAMP(936) - TMP_JAMP(934) ! used 2 times + TMP_JAMP(1214) = TMP_JAMP(935) - TMP_JAMP(916) ! used 2 times + TMP_JAMP(1213) = TMP_JAMP(934) - TMP_JAMP(926) ! used 2 times + TMP_JAMP(1212) = TMP_JAMP(933) - TMP_JAMP(926) ! used 2 times + TMP_JAMP(1211) = TMP_JAMP(933) - TMP_JAMP(862) ! used 2 times + TMP_JAMP(1210) = TMP_JAMP(931) - AMP(933) ! used 2 times + TMP_JAMP(1209) = TMP_JAMP(928) - TMP_JAMP(924) ! used 2 times + TMP_JAMP(1208) = TMP_JAMP(927) - TMP_JAMP(862) ! used 2 times + TMP_JAMP(1207) = TMP_JAMP(926) + AMP(921) ! used 2 times + TMP_JAMP(1206) = TMP_JAMP(924) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(840) ! used 2 times + TMP_JAMP(1205) = TMP_JAMP(924) - TMP_JAMP(884) ! used 2 times + TMP_JAMP(1204) = TMP_JAMP(923) + TMP_JAMP(918) ! used 2 times + TMP_JAMP(1203) = TMP_JAMP(923) - TMP_JAMP(919) ! used 2 times + TMP_JAMP(1202) = TMP_JAMP(922) - TMP_JAMP(920) ! used 2 times + TMP_JAMP(1201) = TMP_JAMP(922) + TMP_JAMP(917) ! used 2 times + TMP_JAMP(1200) = TMP_JAMP(922) + TMP_JAMP(908) ! used 2 times + TMP_JAMP(1199) = TMP_JAMP(921) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(826) ! used 2 times + TMP_JAMP(1198) = TMP_JAMP(920) - TMP_JAMP(851) ! used 2 times + TMP_JAMP(1197) = TMP_JAMP(919) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(779) ! used 2 times + TMP_JAMP(1196) = TMP_JAMP(919) + TMP_JAMP(901) ! used 2 times + TMP_JAMP(1195) = TMP_JAMP(917) + AMP(921) ! used 2 times + TMP_JAMP(1194) = TMP_JAMP(917) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(760) ! used 2 times + TMP_JAMP(1193) = TMP_JAMP(916) + AMP(827) ! used 2 times + TMP_JAMP(1192) = TMP_JAMP(915) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(759) ! used 2 times + TMP_JAMP(1191) = TMP_JAMP(912) - TMP_JAMP(908) ! used 2 times + TMP_JAMP(1190) = TMP_JAMP(911) + TMP_JAMP(873) ! used 2 times + TMP_JAMP(1189) = TMP_JAMP(909) - TMP_JAMP(880) ! used 2 times + TMP_JAMP(1188) = TMP_JAMP(908) - TMP_JAMP(906) ! used 2 times + TMP_JAMP(1187) = TMP_JAMP(906) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(786) ! used 2 times + TMP_JAMP(1186) = TMP_JAMP(906) - TMP_JAMP(873) ! used 2 times + TMP_JAMP(1185) = TMP_JAMP(905) - TMP_JAMP(901) ! used 2 times + TMP_JAMP(1184) = TMP_JAMP(904) + TMP_JAMP(897) ! used 2 times + TMP_JAMP(1183) = TMP_JAMP(903) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(808) ! used 2 times + TMP_JAMP(1182) = TMP_JAMP(903) + TMP_JAMP(902) ! used 2 times + TMP_JAMP(1181) = TMP_JAMP(902) + TMP_JAMP(725) ! used 2 times + TMP_JAMP(1180) = TMP_JAMP(901) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(775) ! used 2 times + TMP_JAMP(1179) = TMP_JAMP(900) - TMP_JAMP(897) ! used 2 times + TMP_JAMP(1178) = TMP_JAMP(898) + TMP_JAMP(891) ! used 2 times + TMP_JAMP(1177) = TMP_JAMP(896) + TMP_JAMP(891) ! used 2 times + TMP_JAMP(1176) = TMP_JAMP(894) + TMP_JAMP(737) ! used 2 times + TMP_JAMP(1175) = TMP_JAMP(894) + TMP_JAMP(888) ! used 2 times + TMP_JAMP(1174) = TMP_JAMP(892) - AMP(664) ! used 2 times + TMP_JAMP(1173) = TMP_JAMP(892) - TMP_JAMP(890) ! used 2 times + TMP_JAMP(1172) = TMP_JAMP(891) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(856) ! used 2 times + TMP_JAMP(1171) = TMP_JAMP(889) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(815) ! used 2 times + TMP_JAMP(1170) = TMP_JAMP(889) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(810) ! used 2 times + TMP_JAMP(1169) = TMP_JAMP(887) - TMP_JAMP(884) ! used 2 times + TMP_JAMP(1168) = TMP_JAMP(887) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(767) ! used 2 times + TMP_JAMP(1167) = TMP_JAMP(886) + AMP(824) ! used 2 times + TMP_JAMP(1166) = TMP_JAMP(886) - TMP_JAMP(884) ! used 2 times + TMP_JAMP(1165) = TMP_JAMP(885) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(766) ! used 2 times + TMP_JAMP(1164) = TMP_JAMP(881) - AMP(496) ! used 2 times + TMP_JAMP(1163) = TMP_JAMP(881) + TMP_JAMP(879) ! used 2 times + TMP_JAMP(1162) = TMP_JAMP(880) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(858) ! used 2 times + TMP_JAMP(1161) = TMP_JAMP(878) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(835) ! used 2 times + TMP_JAMP(1160) = TMP_JAMP(878) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(829) ! used 2 times + TMP_JAMP(1159) = TMP_JAMP(877) + TMP_JAMP(865) ! used 2 times + TMP_JAMP(1158) = TMP_JAMP(876) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(838) ! used 2 times + TMP_JAMP(1157) = TMP_JAMP(872) + AMP(646) ! used 2 times + TMP_JAMP(1156) = TMP_JAMP(870) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(804) ! used 2 times + TMP_JAMP(1155) = TMP_JAMP(870) + TMP_JAMP(861) ! used 2 times + TMP_JAMP(1154) = TMP_JAMP(870) + TMP_JAMP(869) ! used 2 times + TMP_JAMP(1153) = TMP_JAMP(869) + AMP(649) ! used 2 times + TMP_JAMP(1152) = TMP_JAMP(868) + AMP(637) ! used 2 times + TMP_JAMP(1151) = TMP_JAMP(866) + AMP(487) ! used 2 times + TMP_JAMP(1150) = TMP_JAMP(865) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(786) ! used 2 times + TMP_JAMP(1149) = TMP_JAMP(865) - AMP(491) ! used 2 times + TMP_JAMP(1148) = TMP_JAMP(862) - AMP(806) ! used 2 times + TMP_JAMP(1147) = TMP_JAMP(861) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(767) ! used 2 times + TMP_JAMP(1146) = TMP_JAMP(860) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(763) ! used 2 times + TMP_JAMP(1145) = TMP_JAMP(860) - AMP(809) ! used 2 times + TMP_JAMP(1144) = TMP_JAMP(859) - AMP(806) ! used 2 times + TMP_JAMP(1143) = TMP_JAMP(859) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(760) ! used 2 times + TMP_JAMP(1142) = TMP_JAMP(858) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(490) ! used 2 times + TMP_JAMP(1141) = TMP_JAMP(856) - TMP_JAMP(804) ! used 2 times + TMP_JAMP(1140) = TMP_JAMP(856) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(650) ! used 2 times + TMP_JAMP(1139) = TMP_JAMP(854) - TMP_JAMP(853) ! used 2 times + TMP_JAMP(1138) = TMP_JAMP(854) + TMP_JAMP(847) ! used 2 times + TMP_JAMP(1137) = TMP_JAMP(849) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(805) ! used 2 times + TMP_JAMP(1136) = TMP_JAMP(843) - TMP_JAMP(802) ! used 2 times + TMP_JAMP(1135) = TMP_JAMP(842) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(820) ! used 2 times + TMP_JAMP(1134) = TMP_JAMP(841) + TMP_JAMP(756) ! used 2 times + TMP_JAMP(1133) = TMP_JAMP(838) + TMP_JAMP(678) ! used 2 times + TMP_JAMP(1132) = TMP_JAMP(838) + TMP_JAMP(789) ! used 2 times + TMP_JAMP(1131) = TMP_JAMP(837) + TMP_JAMP(828) ! used 2 times + TMP_JAMP(1130) = TMP_JAMP(837) + TMP_JAMP(670) ! used 2 times + TMP_JAMP(1129) = TMP_JAMP(833) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(479) ! used 2 times + TMP_JAMP(1128) = TMP_JAMP(832) - TMP_JAMP(782) ! used 2 times + TMP_JAMP(1127) = TMP_JAMP(827) - TMP_JAMP(772) ! used 2 times + TMP_JAMP(1126) = TMP_JAMP(825) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(508) ! used 2 times + TMP_JAMP(1125) = TMP_JAMP(824) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(742) ! used 2 times + TMP_JAMP(1124) = TMP_JAMP(823) + ((0.000000000000000D+00, $ -1.000000000000000D+00)) * AMP(583) ! used 2 times - TMP_JAMP(2484) = TMP_JAMP(654) - AMP(466) ! used 2 times - TMP_JAMP(2483) = TMP_JAMP(1619) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(656) ! used 2 times - TMP_JAMP(2482) = TMP_JAMP(1620) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(546) ! used 2 times - TMP_JAMP(2481) = TMP_JAMP(1713) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(387) ! used 2 times - TMP_JAMP(2480) = TMP_JAMP(1713) - TMP_JAMP(1621) ! used 2 times - TMP_JAMP(2479) = TMP_JAMP(1792) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(654) ! used 2 times - TMP_JAMP(2478) = TMP_JAMP(1895) - TMP_JAMP(1792) ! used 2 times - TMP_JAMP(2477) = TMP_JAMP(1926) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1620) ! used 2 times - TMP_JAMP(2476) = TMP_JAMP(1927) + TMP_JAMP(1926) ! used 2 times - TMP_JAMP(2475) = AMP(110) + AMP(1629) ! used 2 times - TMP_JAMP(2474) = TMP_JAMP(646) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(74) ! used 2 times - TMP_JAMP(2473) = TMP_JAMP(1163) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(644) ! used 2 times - TMP_JAMP(2472) = TMP_JAMP(1610) - TMP_JAMP(1148) ! used 2 times - TMP_JAMP(2471) = TMP_JAMP(1611) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(645) ! used 2 times - TMP_JAMP(2470) = TMP_JAMP(1614) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1611) ! used 2 times - TMP_JAMP(2469) = TMP_JAMP(1705) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1163) ! used 2 times - TMP_JAMP(2468) = TMP_JAMP(1895) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1705) ! used 2 times - TMP_JAMP(2467) = TMP_JAMP(1928) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1612) ! used 2 times - TMP_JAMP(2466) = AMP(1109) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(1152) ! used 2 times - TMP_JAMP(2465) = AMP(845) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(1109) ! used 2 times - TMP_JAMP(2464) = TMP_JAMP(1607) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(845) ! used 2 times - TMP_JAMP(2463) = TMP_JAMP(1608) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(637) ! used 2 times - TMP_JAMP(2462) = TMP_JAMP(1678) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(827) ! used 2 times - TMP_JAMP(2461) = TMP_JAMP(1678) - TMP_JAMP(1609) ! used 2 times - TMP_JAMP(2460) = TMP_JAMP(1927) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1607) ! used 2 times - TMP_JAMP(2459) = TMP_JAMP(1927) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1894) ! used 2 times - TMP_JAMP(2458) = TMP_JAMP(1160) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(630) ! used 2 times - TMP_JAMP(2457) = TMP_JAMP(1601) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(631) ! used 2 times - TMP_JAMP(2456) = TMP_JAMP(1602) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1601) ! used 2 times - TMP_JAMP(2455) = TMP_JAMP(1668) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1160) ! used 2 times - TMP_JAMP(2454) = TMP_JAMP(1894) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1668) ! used 2 times - TMP_JAMP(2453) = TMP_JAMP(621) + AMP(388) ! used 2 times - TMP_JAMP(2452) = TMP_JAMP(653) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(648) ! used 2 times - TMP_JAMP(2451) = TMP_JAMP(1619) - AMP(385) ! used 2 times - TMP_JAMP(2450) = TMP_JAMP(1619) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1596) ! used 2 times - TMP_JAMP(2449) = TMP_JAMP(1619) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1600) ! used 2 times - TMP_JAMP(2448) = TMP_JAMP(1639) + AMP(64) ! used 2 times - TMP_JAMP(2447) = TMP_JAMP(1639) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1599) ! used 2 times - TMP_JAMP(2446) = TMP_JAMP(1712) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(621) ! used 2 times - TMP_JAMP(2445) = TMP_JAMP(1712) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1597) ! used 2 times - TMP_JAMP(2444) = TMP_JAMP(1762) - TMP_JAMP(888) ! used 2 times - TMP_JAMP(2443) = TMP_JAMP(1892) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1621) ! used 2 times - TMP_JAMP(2442) = TMP_JAMP(1893) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1891) ! used 2 times - TMP_JAMP(2441) = TMP_JAMP(616) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1042) ! used 2 times - TMP_JAMP(2440) = TMP_JAMP(616) - AMP(829) ! used 2 times - TMP_JAMP(2439) = TMP_JAMP(634) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(632) ! used 2 times - TMP_JAMP(2438) = TMP_JAMP(1591) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1587) ! used 2 times - TMP_JAMP(2437) = TMP_JAMP(1599) + TMP_JAMP(1592) ! used 2 times - TMP_JAMP(2436) = TMP_JAMP(1608) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1590) ! used 2 times - TMP_JAMP(2435) = TMP_JAMP(1608) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1592) ! used 2 times - TMP_JAMP(2434) = TMP_JAMP(1817) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1587) ! used 2 times - TMP_JAMP(2433) = TMP_JAMP(1890) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1609) ! used 2 times - TMP_JAMP(2432) = TMP_JAMP(1891) + TMP_JAMP(1817) ! used 2 times - TMP_JAMP(2431) = TMP_JAMP(1893) - TMP_JAMP(1608) ! used 2 times - TMP_JAMP(2430) = AMP(846) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(913) ! used 2 times - TMP_JAMP(2429) = AMP(426) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(945) ! used 2 times - TMP_JAMP(2428) = TMP_JAMP(1580) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(388) ! used 2 times - TMP_JAMP(2427) = TMP_JAMP(1592) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(913) ! used 2 times - TMP_JAMP(2426) = TMP_JAMP(1600) - TMP_JAMP(1592) ! used 2 times - TMP_JAMP(2425) = TMP_JAMP(1643) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(348) ! used 2 times - TMP_JAMP(2424) = TMP_JAMP(1925) + TMP_JAMP(1924) ! used 2 times - TMP_JAMP(2423) = TMP_JAMP(649) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(77) ! used 2 times - TMP_JAMP(2422) = TMP_JAMP(651) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(649) ! used 2 times - TMP_JAMP(2421) = TMP_JAMP(1591) + AMP(945) ! used 2 times - TMP_JAMP(2420) = TMP_JAMP(1599) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(651) ! used 2 times - TMP_JAMP(2419) = TMP_JAMP(1607) + AMP(1116) ! used 2 times - TMP_JAMP(2418) = TMP_JAMP(1607) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(846) ! used 2 times - TMP_JAMP(2417) = TMP_JAMP(1886) + TMP_JAMP(1885) ! used 2 times - TMP_JAMP(2416) = TMP_JAMP(1966) - TMP_JAMP(1599) ! used 2 times - TMP_JAMP(2415) = TMP_JAMP(1966) - TMP_JAMP(1887) ! used 2 times - TMP_JAMP(2414) = AMP(1277) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1308) ! used 2 times - TMP_JAMP(2413) = AMP(829) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1047) ! used 2 times - TMP_JAMP(2412) = TMP_JAMP(744) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(740) ! used 2 times - TMP_JAMP(2411) = TMP_JAMP(1577) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1558) ! used 2 times - TMP_JAMP(2410) = TMP_JAMP(1600) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1277) ! used 2 times - TMP_JAMP(2409) = TMP_JAMP(1600) - AMP(545) ! used 2 times - TMP_JAMP(2408) = TMP_JAMP(1628) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(506) ! used 2 times - TMP_JAMP(2407) = TMP_JAMP(1922) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1884) ! used 2 times - TMP_JAMP(2406) = TMP_JAMP(1965) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1923) ! used 2 times - TMP_JAMP(2405) = TMP_JAMP(1550) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1546) ! used 2 times - TMP_JAMP(2404) = TMP_JAMP(1597) - AMP(1308) ! used 2 times - TMP_JAMP(2403) = TMP_JAMP(1620) - AMP(590) ! used 2 times - TMP_JAMP(2402) = TMP_JAMP(1620) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(545) ! used 2 times - TMP_JAMP(2401) = TMP_JAMP(1964) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1887) ! used 2 times - TMP_JAMP(2400) = AMP(360) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(372) ! used 2 times - TMP_JAMP(2399) = TMP_JAMP(1536) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1533) ! used 2 times - TMP_JAMP(2398) = TMP_JAMP(1537) - TMP_JAMP(577) ! used 2 times - TMP_JAMP(2397) = TMP_JAMP(1540) + TMP_JAMP(1539) ! used 2 times - TMP_JAMP(2396) = TMP_JAMP(1884) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1536) ! used 2 times - TMP_JAMP(2395) = TMP_JAMP(1884) - TMP_JAMP(1618) ! used 2 times - TMP_JAMP(2394) = TMP_JAMP(1980) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(577) ! used 2 times - TMP_JAMP(2393) = TMP_JAMP(1980) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1881) ! used 2 times - TMP_JAMP(2392) = TMP_JAMP(573) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1209) ! used 2 times - TMP_JAMP(2391) = TMP_JAMP(573) - AMP(867) ! used 2 times - TMP_JAMP(2390) = TMP_JAMP(1531) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1527) ! used 2 times - TMP_JAMP(2389) = TMP_JAMP(1602) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(921) ! used 2 times - TMP_JAMP(2388) = TMP_JAMP(1602) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1577) ! used 2 times - TMP_JAMP(2387) = TMP_JAMP(1789) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1527) ! used 2 times - TMP_JAMP(2386) = TMP_JAMP(1880) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1602) ! used 2 times - TMP_JAMP(2385) = TMP_JAMP(1880) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1614) ! used 2 times - TMP_JAMP(2384) = TMP_JAMP(1881) - TMP_JAMP(1789) ! used 2 times - TMP_JAMP(2383) = TMP_JAMP(1963) + TMP_JAMP(1539) ! used 2 times - TMP_JAMP(2382) = AMP(372) - AMP(852) ! used 2 times - TMP_JAMP(2381) = AMP(362) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(372) ! used 2 times - TMP_JAMP(2380) = TMP_JAMP(1165) - AMP(362) ! used 2 times - TMP_JAMP(2379) = TMP_JAMP(1879) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1540) ! used 2 times - TMP_JAMP(2378) = TMP_JAMP(1921) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1165) ! used 2 times - TMP_JAMP(2377) = TMP_JAMP(1924) + TMP_JAMP(1921) ! used 2 times - TMP_JAMP(2376) = TMP_JAMP(1962) + TMP_JAMP(1533) ! used 2 times - TMP_JAMP(2375) = TMP_JAMP(1963) - AMP(846) ! used 2 times - TMP_JAMP(2374) = AMP(852) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1218) ! used 2 times - TMP_JAMP(2373) = TMP_JAMP(669) + ((0.000000000000000D+00, + TMP_JAMP(1123) = TMP_JAMP(821) + ((0.000000000000000D+00, $ -1.000000000000000D+00)) * AMP(591) ! used 2 times - TMP_JAMP(2372) = TMP_JAMP(1520) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1516) ! used 2 times - TMP_JAMP(2371) = TMP_JAMP(1539) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(672) ! used 2 times - TMP_JAMP(2370) = TMP_JAMP(1961) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1218) ! used 2 times - TMP_JAMP(2369) = TMP_JAMP(1961) - TMP_JAMP(1531) ! used 2 times - TMP_JAMP(2368) = AMP(1229) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(1433) ! used 2 times - TMP_JAMP(2367) = AMP(1211) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1229) ! used 2 times - TMP_JAMP(2366) = TMP_JAMP(726) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(1211) ! used 2 times - TMP_JAMP(2365) = TMP_JAMP(726) - AMP(867) ! used 2 times - TMP_JAMP(2364) = TMP_JAMP(761) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(73) ! used 2 times - TMP_JAMP(2363) = TMP_JAMP(763) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(761) ! used 2 times - TMP_JAMP(2362) = TMP_JAMP(1540) - AMP(79) ! used 2 times - TMP_JAMP(2361) = TMP_JAMP(1613) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(763) ! used 2 times - TMP_JAMP(2360) = TMP_JAMP(1879) + TMP_JAMP(730) ! used 2 times - TMP_JAMP(2359) = TMP_JAMP(1893) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1613) ! used 2 times - TMP_JAMP(2358) = TMP_JAMP(1919) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1893) ! used 2 times - TMP_JAMP(2357) = TMP_JAMP(1920) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(730) ! used 2 times - TMP_JAMP(2356) = TMP_JAMP(1920) + TMP_JAMP(1919) ! used 2 times - TMP_JAMP(2355) = TMP_JAMP(1518) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1725) ! used 2 times - TMP_JAMP(2354) = TMP_JAMP(1537) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1220) ! used 2 times - TMP_JAMP(2353) = TMP_JAMP(1547) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1544) ! used 2 times - TMP_JAMP(2352) = TMP_JAMP(1640) - AMP(76) ! used 2 times - TMP_JAMP(2351) = TMP_JAMP(1875) - TMP_JAMP(1874) ! used 2 times - TMP_JAMP(2350) = AMP(671) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(1031) ! used 2 times - TMP_JAMP(2349) = TMP_JAMP(549) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(655) ! used 2 times - TMP_JAMP(2348) = TMP_JAMP(1500) + TMP_JAMP(1498) ! used 2 times - TMP_JAMP(2347) = TMP_JAMP(1533) + AMP(1031) ! used 2 times - TMP_JAMP(2346) = TMP_JAMP(1533) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1501) ! used 2 times - TMP_JAMP(2345) = TMP_JAMP(1962) + TMP_JAMP(1606) ! used 2 times - TMP_JAMP(2344) = TMP_JAMP(1975) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(549) ! used 2 times - TMP_JAMP(2343) = TMP_JAMP(1975) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1873) ! used 2 times - TMP_JAMP(2342) = TMP_JAMP(546) + ((0.000000000000000D+00, + TMP_JAMP(1122) = TMP_JAMP(818) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(497) ! used 2 times + TMP_JAMP(1121) = TMP_JAMP(817) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(616) ! used 2 times + TMP_JAMP(1120) = TMP_JAMP(816) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(615) ! used 2 times + TMP_JAMP(1119) = TMP_JAMP(813) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(647) ! used 2 times + TMP_JAMP(1118) = TMP_JAMP(812) - TMP_JAMP(790) ! used 2 times + TMP_JAMP(1117) = TMP_JAMP(807) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(668) ! used 2 times + TMP_JAMP(1116) = TMP_JAMP(806) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(761) ! used 2 times + TMP_JAMP(1115) = TMP_JAMP(803) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(775) ! used 2 times + TMP_JAMP(1114) = TMP_JAMP(799) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(665) ! used 2 times + TMP_JAMP(1113) = TMP_JAMP(798) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(750) ! used 2 times + TMP_JAMP(1112) = TMP_JAMP(797) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(749) ! used 2 times + TMP_JAMP(1111) = TMP_JAMP(796) - TMP_JAMP(776) ! used 2 times + TMP_JAMP(1110) = TMP_JAMP(794) - AMP(786) ! used 2 times + TMP_JAMP(1109) = TMP_JAMP(791) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(656) ! used 2 times + TMP_JAMP(1108) = TMP_JAMP(787) - AMP(608) ! used 2 times + TMP_JAMP(1107) = TMP_JAMP(783) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(506) ! used 2 times + TMP_JAMP(1106) = TMP_JAMP(780) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(603) ! used 2 times + TMP_JAMP(1105) = TMP_JAMP(780) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(488) ! used 2 times + TMP_JAMP(1104) = TMP_JAMP(776) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(753) ! used 2 times + TMP_JAMP(1103) = TMP_JAMP(774) + ((0.000000000000000D+00, $ -1.000000000000000D+00)) * AMP(765) ! used 2 times - TMP_JAMP(2341) = TMP_JAMP(1495) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1493) ! used 2 times - TMP_JAMP(2340) = TMP_JAMP(1614) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1283) ! used 2 times - TMP_JAMP(2339) = TMP_JAMP(1614) - AMP(707) ! used 2 times - TMP_JAMP(2338) = TMP_JAMP(1770) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1493) ! used 2 times - TMP_JAMP(2337) = TMP_JAMP(1873) - TMP_JAMP(1770) ! used 2 times - TMP_JAMP(2336) = TMP_JAMP(1960) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1500) ! used 2 times - TMP_JAMP(2335) = AMP(671) - AMP(691) ! used 2 times - TMP_JAMP(2334) = TMP_JAMP(1164) - AMP(656) ! used 2 times - TMP_JAMP(2333) = TMP_JAMP(1872) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1501) ! used 2 times - TMP_JAMP(2332) = TMP_JAMP(1918) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1164) ! used 2 times - TMP_JAMP(2331) = TMP_JAMP(1922) + TMP_JAMP(1918) ! used 2 times - TMP_JAMP(2330) = TMP_JAMP(1960) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(545) ! used 2 times - TMP_JAMP(2329) = AMP(789) - AMP(1115) ! used 2 times - TMP_JAMP(2328) = AMP(691) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(774) ! used 2 times - TMP_JAMP(2327) = TMP_JAMP(693) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(683) ! used 2 times - TMP_JAMP(2326) = TMP_JAMP(1485) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1481) ! used 2 times - TMP_JAMP(2325) = TMP_JAMP(1886) + TMP_JAMP(1500) ! used 2 times - TMP_JAMP(2324) = TMP_JAMP(1959) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1495) ! used 2 times - TMP_JAMP(2323) = AMP(784) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(1430) ! used 2 times - TMP_JAMP(2322) = AMP(766) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(784) ! used 2 times - TMP_JAMP(2321) = TMP_JAMP(1501) + AMP(79) ! used 2 times - TMP_JAMP(2320) = TMP_JAMP(1872) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(707) ! used 2 times - TMP_JAMP(2319) = TMP_JAMP(1973) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1917) ! used 2 times - TMP_JAMP(2318) = TMP_JAMP(1498) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(775) ! used 2 times - TMP_JAMP(2317) = TMP_JAMP(1874) + TMP_JAMP(1869) ! used 2 times - TMP_JAMP(2316) = AMP(47) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(144) ! used 2 times - TMP_JAMP(2315) = TMP_JAMP(517) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(397) ! used 2 times - TMP_JAMP(2314) = TMP_JAMP(1463) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(517) ! used 2 times - TMP_JAMP(2313) = TMP_JAMP(1470) + TMP_JAMP(1463) ! used 2 times - TMP_JAMP(2312) = TMP_JAMP(1837) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1470) ! used 2 times - TMP_JAMP(2311) = TMP_JAMP(1837) - TMP_JAMP(1474) ! used 2 times - TMP_JAMP(2310) = TMP_JAMP(1868) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(889) ! used 2 times - TMP_JAMP(2309) = TMP_JAMP(1957) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1915) ! used 2 times - TMP_JAMP(2308) = TMP_JAMP(1982) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1916) ! used 2 times - TMP_JAMP(2307) = TMP_JAMP(1452) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(507) ! used 2 times - TMP_JAMP(2306) = TMP_JAMP(1457) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(1559) ! used 2 times - TMP_JAMP(2305) = TMP_JAMP(1461) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1458) ! used 2 times - TMP_JAMP(2304) = TMP_JAMP(1818) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1458) ! used 2 times - TMP_JAMP(2303) = TMP_JAMP(1915) - TMP_JAMP(1818) ! used 2 times - TMP_JAMP(2302) = TMP_JAMP(1957) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(871) ! used 2 times - TMP_JAMP(2301) = TMP_JAMP(1981) + AMP(664) ! used 2 times - TMP_JAMP(2300) = TMP_JAMP(1981) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1914) ! used 2 times - TMP_JAMP(2299) = AMP(742) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(786) ! used 2 times - TMP_JAMP(2298) = TMP_JAMP(1868) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(855) ! used 2 times - TMP_JAMP(2297) = TMP_JAMP(1892) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1700) ! used 2 times - TMP_JAMP(2296) = TMP_JAMP(1892) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1745) ! used 2 times - TMP_JAMP(2295) = TMP_JAMP(1913) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(384) ! used 2 times - TMP_JAMP(2294) = TMP_JAMP(1956) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1913) ! used 2 times - TMP_JAMP(2293) = TMP_JAMP(1162) - AMP(1272) ! used 2 times - TMP_JAMP(2292) = TMP_JAMP(1442) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(56) ! used 2 times - TMP_JAMP(2291) = TMP_JAMP(1460) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1456) ! used 2 times - TMP_JAMP(2290) = TMP_JAMP(1596) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1436) ! used 2 times - TMP_JAMP(2289) = TMP_JAMP(1695) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1162) ! used 2 times - TMP_JAMP(2288) = TMP_JAMP(1695) + TMP_JAMP(1443) ! used 2 times - TMP_JAMP(2287) = AMP(1187) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(1230) ! used 2 times - TMP_JAMP(2286) = AMP(824) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(863) ! used 2 times - TMP_JAMP(2285) = TMP_JAMP(1430) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(570) ! used 2 times - TMP_JAMP(2284) = TMP_JAMP(1868) - TMP_JAMP(1432) ! used 2 times - TMP_JAMP(2283) = TMP_JAMP(1890) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1664) ! used 2 times - TMP_JAMP(2282) = TMP_JAMP(1890) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1729) ! used 2 times - TMP_JAMP(2281) = TMP_JAMP(1912) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(824) ! used 2 times - TMP_JAMP(2280) = TMP_JAMP(1914) + TMP_JAMP(1912) ! used 2 times - TMP_JAMP(2279) = TMP_JAMP(1159) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(863) ! used 2 times - TMP_JAMP(2278) = TMP_JAMP(1590) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1436) ! used 2 times - TMP_JAMP(2277) = TMP_JAMP(1658) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1159) ! used 2 times - TMP_JAMP(2276) = TMP_JAMP(1658) - TMP_JAMP(1428) ! used 2 times - TMP_JAMP(2275) = AMP(382) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(388) ! used 2 times - TMP_JAMP(2274) = TMP_JAMP(1425) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1612) ! used 2 times - TMP_JAMP(2273) = TMP_JAMP(1597) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1425) ! used 2 times - TMP_JAMP(2272) = TMP_JAMP(1862) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1597) ! used 2 times - TMP_JAMP(2271) = TMP_JAMP(1913) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(382) ! used 2 times - TMP_JAMP(2270) = TMP_JAMP(1913) + TMP_JAMP(1474) ! used 2 times - TMP_JAMP(2269) = TMP_JAMP(1915) - TMP_JAMP(1891) ! used 2 times - TMP_JAMP(2268) = AMP(823) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(829) ! used 2 times - TMP_JAMP(2267) = TMP_JAMP(1422) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(1613) ! used 2 times - TMP_JAMP(2266) = TMP_JAMP(1591) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1422) ! used 2 times - TMP_JAMP(2265) = TMP_JAMP(1862) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1591) ! used 2 times - TMP_JAMP(2264) = TMP_JAMP(1912) + ((-0.000000000000000D+00 + TMP_JAMP(1102) = TMP_JAMP(773) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(796) ! used 2 times + TMP_JAMP(1101) = TMP_JAMP(772) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(815) ! used 2 times + TMP_JAMP(1100) = TMP_JAMP(772) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(797) ! used 2 times + TMP_JAMP(1099) = TMP_JAMP(770) + TMP_JAMP(756) ! used 2 times + TMP_JAMP(1098) = TMP_JAMP(769) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(814) ! used 2 times + TMP_JAMP(1097) = TMP_JAMP(768) - AMP(926) ! used 2 times + TMP_JAMP(1096) = TMP_JAMP(766) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(924) ! used 2 times + TMP_JAMP(1095) = TMP_JAMP(765) + ((-0.000000000000000D+00 $ ,1.000000000000000D+00)) * AMP(823) ! used 2 times - TMP_JAMP(2263) = TMP_JAMP(1912) + TMP_JAMP(1461) ! used 2 times - TMP_JAMP(2262) = AMP(901) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(945) ! used 2 times - TMP_JAMP(2261) = TMP_JAMP(1423) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1420) ! used 2 times - TMP_JAMP(2260) = TMP_JAMP(1916) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1421) ! used 2 times - TMP_JAMP(2259) = TMP_JAMP(1921) - TMP_JAMP(1916) ! used 2 times - TMP_JAMP(2258) = TMP_JAMP(1925) - TMP_JAMP(1921) ! used 2 times - TMP_JAMP(2257) = TMP_JAMP(1965) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1426) ! used 2 times - TMP_JAMP(2256) = AMP(59) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(1566) ! used 2 times - TMP_JAMP(2255) = TMP_JAMP(1416) - TMP_JAMP(1412) ! used 2 times - TMP_JAMP(2254) = TMP_JAMP(1419) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1415) ! used 2 times - TMP_JAMP(2253) = TMP_JAMP(1421) + AMP(1194) ! used 2 times - TMP_JAMP(2252) = TMP_JAMP(1887) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1862) ! used 2 times - TMP_JAMP(2251) = TMP_JAMP(1961) - TMP_JAMP(1955) ! used 2 times - TMP_JAMP(2250) = AMP(1265) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(1308) ! used 2 times - TMP_JAMP(2249) = TMP_JAMP(1914) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1411) ! used 2 times - TMP_JAMP(2248) = TMP_JAMP(1918) + TMP_JAMP(1914) ! used 2 times - TMP_JAMP(2247) = TMP_JAMP(1923) - TMP_JAMP(1918) ! used 2 times - TMP_JAMP(2246) = TMP_JAMP(1410) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1408) ! used 2 times - TMP_JAMP(2245) = TMP_JAMP(1411) - AMP(749) ! used 2 times - TMP_JAMP(2244) = TMP_JAMP(1964) + TMP_JAMP(1959) ! used 2 times - TMP_JAMP(2243) = TMP_JAMP(959) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(399) ! used 2 times - TMP_JAMP(2242) = TMP_JAMP(1406) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(968) ! used 2 times - TMP_JAMP(2241) = TMP_JAMP(1911) - TMP_JAMP(1474) ! used 2 times - TMP_JAMP(2240) = TMP_JAMP(1954) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1910) ! used 2 times - TMP_JAMP(2239) = TMP_JAMP(1956) + AMP(741) ! used 2 times - TMP_JAMP(2238) = AMP(849) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(1131) ! used 2 times - TMP_JAMP(2237) = AMP(849) + ((0.000000000000000D+00, + TMP_JAMP(1094) = TMP_JAMP(764) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(901) ! used 2 times + TMP_JAMP(1093) = TMP_JAMP(761) - AMP(935) ! used 2 times + TMP_JAMP(1092) = TMP_JAMP(758) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(826) ! used 2 times + TMP_JAMP(1091) = TMP_JAMP(757) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(913) ! used 2 times + TMP_JAMP(1090) = TMP_JAMP(755) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(934) ! used 2 times + TMP_JAMP(1089) = TMP_JAMP(755) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(808) ! used 2 times + TMP_JAMP(1088) = TMP_JAMP(753) + ((0.000000000000000D+00, $ -1.000000000000000D+00)) * AMP(909) ! used 2 times - TMP_JAMP(2236) = TMP_JAMP(1420) - TMP_JAMP(1390) ! used 2 times - TMP_JAMP(2235) = TMP_JAMP(1443) - TMP_JAMP(1428) ! used 2 times - TMP_JAMP(2234) = TMP_JAMP(1737) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1391) ! used 2 times - TMP_JAMP(2233) = TMP_JAMP(1859) - TMP_JAMP(1428) ! used 2 times - TMP_JAMP(2232) = TMP_JAMP(1953) + TMP_JAMP(1859) ! used 2 times - TMP_JAMP(2231) = TMP_JAMP(1389) + ((-0.000000000000000D+00 + TMP_JAMP(1087) = TMP_JAMP(749) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(912) ! used 2 times + TMP_JAMP(1086) = TMP_JAMP(748) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(925) ! used 2 times + TMP_JAMP(1085) = TMP_JAMP(747) + ((-0.000000000000000D+00 $ ,1.000000000000000D+00)) * AMP(900) ! used 2 times - TMP_JAMP(2230) = TMP_JAMP(1859) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1421) ! used 2 times - TMP_JAMP(2229) = TMP_JAMP(1924) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(344) ! used 2 times - TMP_JAMP(2228) = TMP_JAMP(1924) + TMP_JAMP(1910) ! used 2 times - TMP_JAMP(2227) = TMP_JAMP(1385) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1564) ! used 2 times - TMP_JAMP(2226) = TMP_JAMP(1417) - TMP_JAMP(1409) ! used 2 times - TMP_JAMP(2225) = TMP_JAMP(1885) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1384) ! used 2 times - TMP_JAMP(2224) = TMP_JAMP(1953) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(750) ! used 2 times - TMP_JAMP(2223) = TMP_JAMP(708) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1133) ! used 2 times - TMP_JAMP(2222) = TMP_JAMP(1406) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1412) ! used 2 times - TMP_JAMP(2221) = TMP_JAMP(1458) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1406) ! used 2 times - TMP_JAMP(2220) = TMP_JAMP(1858) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1458) ! used 2 times - TMP_JAMP(2219) = TMP_JAMP(1370) - AMP(58) ! used 2 times - TMP_JAMP(2218) = TMP_JAMP(1374) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1370) ! used 2 times - TMP_JAMP(2217) = TMP_JAMP(1414) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1374) ! used 2 times - TMP_JAMP(2216) = TMP_JAMP(1418) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1414) ! used 2 times - TMP_JAMP(2215) = TMP_JAMP(1858) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1142) ! used 2 times - TMP_JAMP(2214) = TMP_JAMP(1952) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1418) ! used 2 times - TMP_JAMP(2213) = TMP_JAMP(913) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(1022) ! used 2 times - TMP_JAMP(2212) = TMP_JAMP(1369) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(929) ! used 2 times - TMP_JAMP(2211) = TMP_JAMP(1431) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(863) ! used 2 times - TMP_JAMP(2210) = TMP_JAMP(1911) - TMP_JAMP(1461) ! used 2 times - TMP_JAMP(2209) = TMP_JAMP(1951) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1909) ! used 2 times - TMP_JAMP(2208) = AMP(548) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(606) ! used 2 times - TMP_JAMP(2207) = TMP_JAMP(1722) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1356) ! used 2 times - TMP_JAMP(2206) = TMP_JAMP(1950) + TMP_JAMP(1949) ! used 2 times - TMP_JAMP(2205) = TMP_JAMP(1355) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1263) ! used 2 times - TMP_JAMP(2204) = TMP_JAMP(1922) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(497) ! used 2 times - TMP_JAMP(2203) = TMP_JAMP(1922) + TMP_JAMP(1909) ! used 2 times - TMP_JAMP(2202) = TMP_JAMP(1950) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1411) ! used 2 times - TMP_JAMP(2201) = TMP_JAMP(1949) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1193) ! used 2 times - TMP_JAMP(2200) = TMP_JAMP(1958) + TMP_JAMP(1351) ! used 2 times - TMP_JAMP(2199) = AMP(548) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(607) ! used 2 times - TMP_JAMP(2198) = TMP_JAMP(819) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(816) ! used 2 times - TMP_JAMP(2197) = TMP_JAMP(1369) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1409) ! used 2 times - TMP_JAMP(2196) = TMP_JAMP(1470) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1369) ! used 2 times - TMP_JAMP(2195) = TMP_JAMP(1947) + TMP_JAMP(1349) ! used 2 times - TMP_JAMP(2194) = TMP_JAMP(1952) + TMP_JAMP(1470) ! used 2 times - TMP_JAMP(2193) = TMP_JAMP(1952) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1948) ! used 2 times - TMP_JAMP(2192) = TMP_JAMP(1343) + AMP(616) ! used 2 times - TMP_JAMP(2191) = TMP_JAMP(1948) - TMP_JAMP(1345) ! used 2 times - TMP_JAMP(2190) = AMP(479) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(534) ! used 2 times - TMP_JAMP(2189) = AMP(332) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(494) ! used 2 times - TMP_JAMP(2188) = AMP(326) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(390) ! used 2 times - TMP_JAMP(2187) = TMP_JAMP(1580) - AMP(326) ! used 2 times - TMP_JAMP(2186) = TMP_JAMP(1895) + AMP(479) ! used 2 times - TMP_JAMP(2185) = TMP_JAMP(1908) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1580) ! used 2 times - TMP_JAMP(2184) = TMP_JAMP(1908) - TMP_JAMP(1907) ! used 2 times - TMP_JAMP(2183) = TMP_JAMP(1946) + TMP_JAMP(1895) ! used 2 times - TMP_JAMP(2182) = AMP(494) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(962) ! used 2 times - TMP_JAMP(2181) = TMP_JAMP(1317) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(484) ! used 2 times - TMP_JAMP(2180) = TMP_JAMP(1323) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(787) ! used 2 times - TMP_JAMP(2179) = TMP_JAMP(1494) + AMP(647) ! used 2 times - TMP_JAMP(2178) = TMP_JAMP(1790) - TMP_JAMP(1329) ! used 2 times - TMP_JAMP(2177) = TMP_JAMP(1946) + TMP_JAMP(1323) ! used 2 times - TMP_JAMP(2176) = TMP_JAMP(1946) + TMP_JAMP(1944) ! used 2 times - TMP_JAMP(2175) = AMP(638) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(693) ! used 2 times - TMP_JAMP(2174) = TMP_JAMP(1745) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(330) ! used 2 times - TMP_JAMP(2173) = TMP_JAMP(1906) - TMP_JAMP(1745) ! used 2 times - TMP_JAMP(2172) = TMP_JAMP(1942) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(780) ! used 2 times - TMP_JAMP(2171) = TMP_JAMP(1943) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1906) ! used 2 times - TMP_JAMP(2170) = TMP_JAMP(1944) - TMP_JAMP(1449) ! used 2 times - TMP_JAMP(2169) = TMP_JAMP(1302) + AMP(971) ! used 2 times - TMP_JAMP(2168) = TMP_JAMP(1309) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1303) ! used 2 times - TMP_JAMP(2167) = TMP_JAMP(1310) + TMP_JAMP(1309) ! used 2 times - TMP_JAMP(2166) = TMP_JAMP(1357) + AMP(488) ! used 2 times - TMP_JAMP(2165) = TMP_JAMP(1738) - TMP_JAMP(1310) ! used 2 times - TMP_JAMP(2164) = AMP(987) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(1307) ! used 2 times - TMP_JAMP(2163) = TMP_JAMP(1295) - AMP(987) ! used 2 times - TMP_JAMP(2162) = TMP_JAMP(1295) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(811) ! used 2 times - TMP_JAMP(2161) = TMP_JAMP(1653) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(805) ! used 2 times - TMP_JAMP(2160) = TMP_JAMP(1880) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1691) ! used 2 times - TMP_JAMP(2159) = TMP_JAMP(1940) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1301) ! used 2 times - TMP_JAMP(2158) = TMP_JAMP(1942) - TMP_JAMP(1299) ! used 2 times - TMP_JAMP(2157) = AMP(808) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(811) ! used 2 times - TMP_JAMP(2156) = TMP_JAMP(1304) + TMP_JAMP(1293) ! used 2 times - TMP_JAMP(2155) = TMP_JAMP(1685) - TMP_JAMP(1650) ! used 2 times - TMP_JAMP(2154) = TMP_JAMP(1938) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1294) ! used 2 times - TMP_JAMP(2153) = AMP(329) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(372) ! used 2 times - TMP_JAMP(2152) = TMP_JAMP(1288) + AMP(478) ! used 2 times - TMP_JAMP(2151) = TMP_JAMP(1537) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1290) ! used 2 times - TMP_JAMP(2150) = TMP_JAMP(1881) + TMP_JAMP(1291) ! used 2 times - TMP_JAMP(2149) = TMP_JAMP(1906) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(329) ! used 2 times - TMP_JAMP(2148) = TMP_JAMP(1907) + TMP_JAMP(1906) ! used 2 times - TMP_JAMP(2147) = AMP(806) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(867) ! used 2 times - TMP_JAMP(2146) = TMP_JAMP(1301) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1285) ! used 2 times - TMP_JAMP(2145) = TMP_JAMP(1531) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1286) ! used 2 times - TMP_JAMP(2144) = AMP(797) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(852) ! used 2 times - TMP_JAMP(2143) = TMP_JAMP(1284) - AMP(327) ! used 2 times - TMP_JAMP(2142) = TMP_JAMP(1287) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1283) ! used 2 times - TMP_JAMP(2141) = TMP_JAMP(1879) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1292) ! used 2 times - TMP_JAMP(2140) = TMP_JAMP(1925) + TMP_JAMP(1908) ! used 2 times - TMP_JAMP(2139) = AMP(980) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1654) ! used 2 times - TMP_JAMP(2138) = AMP(491) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1704) ! used 2 times - TMP_JAMP(2137) = TMP_JAMP(1277) + AMP(980) ! used 2 times - TMP_JAMP(2136) = TMP_JAMP(1280) - TMP_JAMP(1277) ! used 2 times - TMP_JAMP(2135) = TMP_JAMP(1289) - AMP(491) ! used 2 times - TMP_JAMP(2134) = TMP_JAMP(1853) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1289) ! used 2 times - TMP_JAMP(2133) = TMP_JAMP(1955) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1280) ! used 2 times - TMP_JAMP(2132) = TMP_JAMP(1955) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1284) ! used 2 times - TMP_JAMP(2131) = AMP(996) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(1229) ! used 2 times - TMP_JAMP(2130) = TMP_JAMP(1275) + AMP(646) ! used 2 times - TMP_JAMP(2129) = TMP_JAMP(1939) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1917) ! used 2 times - TMP_JAMP(2128) = TMP_JAMP(1276) - AMP(649) ! used 2 times - TMP_JAMP(2127) = TMP_JAMP(1853) + TMP_JAMP(1852) ! used 2 times - TMP_JAMP(2126) = TMP_JAMP(1869) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1385) ! used 2 times - TMP_JAMP(2125) = TMP_JAMP(1869) + TMP_JAMP(1852) ! used 2 times - TMP_JAMP(2124) = TMP_JAMP(1875) + TMP_JAMP(1869) ! used 2 times - TMP_JAMP(2123) = TMP_JAMP(859) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(637) ! used 2 times - TMP_JAMP(2122) = TMP_JAMP(1851) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1850) ! used 2 times - TMP_JAMP(2121) = TMP_JAMP(1910) - TMP_JAMP(1907) ! used 2 times - TMP_JAMP(2120) = TMP_JAMP(1954) - TMP_JAMP(1943) ! used 2 times - TMP_JAMP(2119) = TMP_JAMP(1294) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1283) ! used 2 times - TMP_JAMP(2118) = TMP_JAMP(1849) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(809) ! used 2 times - TMP_JAMP(2117) = TMP_JAMP(1850) + TMP_JAMP(1849) ! used 2 times - TMP_JAMP(2116) = AMP(796) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(834) ! used 2 times - TMP_JAMP(2115) = TMP_JAMP(1284) + AMP(796) ! used 2 times - TMP_JAMP(2114) = TMP_JAMP(1849) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1284) ! used 2 times - TMP_JAMP(2113) = TMP_JAMP(1851) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1849) ! used 2 times - TMP_JAMP(2112) = TMP_JAMP(1852) - TMP_JAMP(1850) ! used 2 times - TMP_JAMP(2111) = TMP_JAMP(1267) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1265) ! used 2 times - TMP_JAMP(2110) = TMP_JAMP(1294) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1159) ! used 2 times - TMP_JAMP(2109) = TMP_JAMP(1858) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1851) ! used 2 times - TMP_JAMP(2108) = TMP_JAMP(1937) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1349) ! used 2 times - TMP_JAMP(2107) = AMP(490) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(1529) ! used 2 times - TMP_JAMP(2106) = TMP_JAMP(1853) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1344) ! used 2 times - TMP_JAMP(2105) = AMP(109) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(961) ! used 2 times - TMP_JAMP(2104) = TMP_JAMP(647) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(100) ! used 2 times - TMP_JAMP(2103) = TMP_JAMP(1298) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(811) ! used 2 times - TMP_JAMP(2102) = TMP_JAMP(1847) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(961) ! used 2 times - TMP_JAMP(2101) = TMP_JAMP(1848) + TMP_JAMP(1847) ! used 2 times - TMP_JAMP(2100) = TMP_JAMP(1900) + TMP_JAMP(1787) ! used 2 times - TMP_JAMP(2099) = AMP(121) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(970) ! used 2 times - TMP_JAMP(2098) = TMP_JAMP(1436) + AMP(112) ! used 2 times - TMP_JAMP(2097) = TMP_JAMP(1684) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1436) ! used 2 times - TMP_JAMP(2096) = TMP_JAMP(1934) + TMP_JAMP(1848) ! used 2 times - TMP_JAMP(2095) = TMP_JAMP(1990) + TMP_JAMP(1684) ! used 2 times - TMP_JAMP(2094) = AMP(101) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(109) ! used 2 times - TMP_JAMP(2093) = TMP_JAMP(1919) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1612) ! used 2 times - TMP_JAMP(2092) = TMP_JAMP(1934) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(991) ! used 2 times - TMP_JAMP(2091) = AMP(133) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(979) ! used 2 times - TMP_JAMP(2090) = TMP_JAMP(1279) - TMP_JAMP(1251) ! used 2 times - TMP_JAMP(2089) = TMP_JAMP(1848) + TMP_JAMP(1282) ! used 2 times - TMP_JAMP(2088) = TMP_JAMP(1874) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(124) ! used 2 times - TMP_JAMP(2087) = AMP(493) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1000) ! used 2 times - TMP_JAMP(2086) = TMP_JAMP(844) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(113) ! used 2 times - TMP_JAMP(2085) = TMP_JAMP(1249) + AMP(148) ! used 2 times - TMP_JAMP(2084) = TMP_JAMP(1349) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1149) ! used 2 times - TMP_JAMP(2083) = TMP_JAMP(1847) - TMP_JAMP(1266) ! used 2 times - TMP_JAMP(2082) = TMP_JAMP(1947) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(848) ! used 2 times - TMP_JAMP(2081) = TMP_JAMP(1371) + AMP(125) ! used 2 times - TMP_JAMP(2080) = AMP(185) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(291) ! used 2 times - TMP_JAMP(2079) = AMP(174) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(195) ! used 2 times - TMP_JAMP(2078) = TMP_JAMP(1588) - AMP(168) ! used 2 times - TMP_JAMP(2077) = TMP_JAMP(1780) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1453) ! used 2 times - TMP_JAMP(2076) = TMP_JAMP(1894) + TMP_JAMP(1244) ! used 2 times - TMP_JAMP(2075) = TMP_JAMP(1234) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1227) ! used 2 times - TMP_JAMP(2074) = TMP_JAMP(1528) - AMP(207) ! used 2 times - TMP_JAMP(2073) = TMP_JAMP(1771) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1321) ! used 2 times - TMP_JAMP(2072) = TMP_JAMP(1933) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(723) ! used 2 times - TMP_JAMP(2071) = AMP(203) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(850) ! used 2 times - TMP_JAMP(2070) = TMP_JAMP(879) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(872) ! used 2 times - TMP_JAMP(2069) = TMP_JAMP(1221) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(213) ! used 2 times - TMP_JAMP(2068) = TMP_JAMP(1729) + TMP_JAMP(1224) ! used 2 times - TMP_JAMP(2067) = TMP_JAMP(1931) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(717) ! used 2 times - TMP_JAMP(2066) = TMP_JAMP(1933) - TMP_JAMP(1433) ! used 2 times - TMP_JAMP(2065) = TMP_JAMP(1213) + TMP_JAMP(1211) ! used 2 times - TMP_JAMP(2064) = TMP_JAMP(1216) + TMP_JAMP(1215) ! used 2 times - TMP_JAMP(2063) = TMP_JAMP(1240) + AMP(189) ! used 2 times - TMP_JAMP(2062) = TMP_JAMP(1393) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1247) ! used 2 times - TMP_JAMP(2061) = TMP_JAMP(1723) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1306) ! used 2 times - TMP_JAMP(2060) = AMP(267) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(943) ! used 2 times - TMP_JAMP(2059) = TMP_JAMP(1209) + TMP_JAMP(1205) ! used 2 times - TMP_JAMP(2058) = TMP_JAMP(1931) + TMP_JAMP(1300) ! used 2 times - TMP_JAMP(2057) = TMP_JAMP(1945) + ((0.000000000000000D+00 + TMP_JAMP(1084) = TMP_JAMP(745) + AMP(602) ! used 2 times + TMP_JAMP(1083) = TMP_JAMP(742) - AMP(478) ! used 2 times + TMP_JAMP(1082) = TMP_JAMP(738) - AMP(754) ! used 2 times + TMP_JAMP(1081) = TMP_JAMP(731) + AMP(638) ! used 2 times + TMP_JAMP(1080) = TMP_JAMP(726) + AMP(582) ! used 2 times + TMP_JAMP(1079) = TMP_JAMP(720) + AMP(805) ! used 2 times + TMP_JAMP(1078) = TMP_JAMP(712) + AMP(590) ! used 2 times + TMP_JAMP(1077) = TMP_JAMP(703) + AMP(774) ! used 2 times + TMP_JAMP(1076) = TMP_JAMP(662) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(766) ! used 2 times + TMP_JAMP(1075) = TMP_JAMP(661) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(741) ! used 2 times + TMP_JAMP(1074) = TMP_JAMP(657) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(607) ! used 2 times + TMP_JAMP(1073) = AMP(593) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(595) ! used 2 times + TMP_JAMP(1072) = AMP(472) + AMP(473) ! used 2 times + TMP_JAMP(1071) = AMP(505) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(511) ! used 2 times + TMP_JAMP(1070) = AMP(837) + AMP(920) ! used 2 times + TMP_JAMP(1069) = AMP(655) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(660) ! used 2 times + TMP_JAMP(1068) = AMP(742) + AMP(781) ! used 2 times + TMP_JAMP(1067) = AMP(855) + AMP(908) ! used 2 times + TMP_JAMP(1066) = AMP(519) - AMP(606) ! used 2 times + TMP_JAMP(1376) = TMP_JAMP(1298) + ((0.000000000000000D+00 $ ,1.000000000000000D+00)) * TMP_JAMP(1210) ! used 2 times - TMP_JAMP(2056) = TMP_JAMP(1212) + TMP_JAMP(1203) ! used 2 times - TMP_JAMP(2055) = TMP_JAMP(1941) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1204) ! used 2 times - TMP_JAMP(2054) = AMP(183) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(195) ! used 2 times - TMP_JAMP(2053) = AMP(171) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(671) ! used 2 times - TMP_JAMP(2052) = TMP_JAMP(1197) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(914) ! used 2 times - TMP_JAMP(2051) = TMP_JAMP(1498) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1200) ! used 2 times - TMP_JAMP(2050) = TMP_JAMP(1873) + TMP_JAMP(1201) ! used 2 times - TMP_JAMP(2049) = TMP_JAMP(1929) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1224) ! used 2 times - TMP_JAMP(2048) = AMP(225) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(707) ! used 2 times - TMP_JAMP(2047) = TMP_JAMP(1194) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(310) ! used 2 times - TMP_JAMP(2046) = TMP_JAMP(1228) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1210) ! used 2 times - TMP_JAMP(2045) = TMP_JAMP(1495) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1195) ! used 2 times - TMP_JAMP(2044) = AMP(221) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(691) ! used 2 times - TMP_JAMP(2043) = TMP_JAMP(1191) - AMP(167) ! used 2 times - TMP_JAMP(2042) = TMP_JAMP(1196) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1192) ! used 2 times - TMP_JAMP(2041) = TMP_JAMP(1872) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1202) ! used 2 times - TMP_JAMP(2040) = TMP_JAMP(1932) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1923) ! used 2 times - TMP_JAMP(2039) = AMP(192) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(300) ! used 2 times - TMP_JAMP(2038) = TMP_JAMP(1193) + AMP(258) ! used 2 times - TMP_JAMP(2037) = TMP_JAMP(1199) + AMP(192) ! used 2 times - TMP_JAMP(2036) = TMP_JAMP(1483) - TMP_JAMP(1199) ! used 2 times - TMP_JAMP(2035) = TMP_JAMP(1487) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1483) ! used 2 times - TMP_JAMP(2034) = TMP_JAMP(1846) - TMP_JAMP(1487) ! used 2 times - TMP_JAMP(2033) = TMP_JAMP(1846) + TMP_JAMP(1845) ! used 2 times - TMP_JAMP(2032) = AMP(276) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(784) ! used 2 times - TMP_JAMP(2031) = TMP_JAMP(1185) - AMP(205) ! used 2 times - TMP_JAMP(2030) = TMP_JAMP(1930) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1920) ! used 2 times - TMP_JAMP(2029) = TMP_JAMP(1186) - AMP(208) ! used 2 times - TMP_JAMP(2028) = TMP_JAMP(1875) + TMP_JAMP(1844) ! used 2 times - TMP_JAMP(2027) = TMP_JAMP(1182) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1179) ! used 2 times - TMP_JAMP(2026) = TMP_JAMP(1929) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1909) ! used 2 times - TMP_JAMP(2025) = TMP_JAMP(1951) - AMP(201) ! used 2 times - TMP_JAMP(2024) = TMP_JAMP(1951) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1843) ! used 2 times - TMP_JAMP(2023) = AMP(228) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(548) ! used 2 times - TMP_JAMP(2022) = TMP_JAMP(1192) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(301) ! used 2 times - TMP_JAMP(2021) = TMP_JAMP(1214) + TMP_JAMP(1192) ! used 2 times - TMP_JAMP(2020) = TMP_JAMP(1214) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1204) ! used 2 times - TMP_JAMP(2019) = TMP_JAMP(1842) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(228) ! used 2 times - TMP_JAMP(2018) = TMP_JAMP(1843) + TMP_JAMP(1842) ! used 2 times - TMP_JAMP(2017) = TMP_JAMP(1842) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(219) ! used 2 times - TMP_JAMP(2016) = TMP_JAMP(1843) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(210) ! used 2 times - TMP_JAMP(2015) = TMP_JAMP(1844) - TMP_JAMP(1843) ! used 2 times - TMP_JAMP(2014) = TMP_JAMP(1845) - TMP_JAMP(1844) ! used 2 times - TMP_JAMP(2013) = TMP_JAMP(1180) + AMP(285) ! used 2 times - TMP_JAMP(2012) = TMP_JAMP(1204) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1162) ! used 2 times - TMP_JAMP(2011) = TMP_JAMP(1937) + AMP(187) ! used 2 times - TMP_JAMP(2010) = TMP_JAMP(1937) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1841) ! used 2 times - TMP_JAMP(2009) = TMP_JAMP(1841) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(190) ! used 2 times - TMP_JAMP(2008) = TMP_JAMP(1936) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1846) ! used 2 times - TMP_JAMP(2007) = AMP(229) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(259) ! used 2 times - TMP_JAMP(2006) = AMP(109) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(238) ! used 2 times - TMP_JAMP(2005) = TMP_JAMP(1208) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(229) ! used 2 times - TMP_JAMP(2004) = TMP_JAMP(1839) - AMP(109) ! used 2 times - TMP_JAMP(2003) = TMP_JAMP(1990) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(1208) ! used 2 times - TMP_JAMP(2002) = TMP_JAMP(1990) - TMP_JAMP(1840) ! used 2 times - TMP_JAMP(2001) = AMP(121) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(247) ! used 2 times - TMP_JAMP(2000) = TMP_JAMP(1838) + AMP(121) ! used 2 times - TMP_JAMP(1999) = TMP_JAMP(1840) + TMP_JAMP(1838) ! used 2 times - TMP_JAMP(1998) = AMP(142) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(268) ! used 2 times - TMP_JAMP(1997) = TMP_JAMP(1838) - AMP(142) ! used 2 times - TMP_JAMP(1996) = TMP_JAMP(1839) - TMP_JAMP(1838) ! used 2 times - TMP_JAMP(1995) = TMP_JAMP(1252) - AMP(256) ! used 2 times - TMP_JAMP(1994) = TMP_JAMP(1845) + TMP_JAMP(1840) ! used 2 times - TMP_JAMP(1993) = TMP_JAMP(1250) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(277) ! used 2 times - TMP_JAMP(1992) = TMP_JAMP(1841) + TMP_JAMP(1839) ! used 2 times - TMP_JAMP(2744) = TMP_JAMP(2640) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1515) ! used 2 times - TMP_JAMP(2743) = TMP_JAMP(2621) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(1888) ! used 2 times - TMP_JAMP(2742) = TMP_JAMP(2622) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(2618) ! used 2 times - TMP_JAMP(2741) = TMP_JAMP(2602) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(2600) ! used 2 times - TMP_JAMP(2740) = TMP_JAMP(2592) + TMP_JAMP(868) ! used 2 times - TMP_JAMP(2739) = TMP_JAMP(2593) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(667) ! used 2 times - TMP_JAMP(2738) = TMP_JAMP(2578) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(2576) ! used 2 times - TMP_JAMP(2737) = TMP_JAMP(2579) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(2577) ! used 2 times - TMP_JAMP(2736) = TMP_JAMP(2573) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(2569) ! used 2 times - TMP_JAMP(2735) = TMP_JAMP(2567) + TMP_JAMP(2566) ! used 2 times - TMP_JAMP(2734) = TMP_JAMP(2568) - AMP(1753) ! used 2 times - TMP_JAMP(2733) = TMP_JAMP(2560) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(2559) ! used 2 times - TMP_JAMP(2732) = TMP_JAMP(2555) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1287) ! used 2 times - TMP_JAMP(2731) = TMP_JAMP(2545) + AMP(753) ! used 2 times - TMP_JAMP(2730) = TMP_JAMP(2546) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(459) ! used 2 times - TMP_JAMP(2729) = TMP_JAMP(2541) + AMP(603) ! used 2 times - TMP_JAMP(2728) = TMP_JAMP(2536) + TMP_JAMP(902) ! used 2 times - TMP_JAMP(2727) = TMP_JAMP(2530) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1638) ! used 2 times - TMP_JAMP(2726) = TMP_JAMP(2520) + AMP(1040) ! used 2 times - TMP_JAMP(2725) = TMP_JAMP(2524) - TMP_JAMP(2519) ! used 2 times - TMP_JAMP(2724) = TMP_JAMP(2517) + TMP_JAMP(2513) ! used 2 times - TMP_JAMP(2723) = TMP_JAMP(2518) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(924) ! used 2 times - TMP_JAMP(2722) = TMP_JAMP(2509) + AMP(1197) ! used 2 times - TMP_JAMP(2721) = TMP_JAMP(2510) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1713) ! used 2 times - TMP_JAMP(2720) = TMP_JAMP(2505) + ((-0.000000000000000D+00 + TMP_JAMP(1375) = TMP_JAMP(1287) + TMP_JAMP(1164) ! used 2 times + TMP_JAMP(1374) = TMP_JAMP(1286) + TMP_JAMP(1151) ! used 2 times + TMP_JAMP(1373) = TMP_JAMP(1284) - TMP_JAMP(1153) ! used 2 times + TMP_JAMP(1372) = TMP_JAMP(1276) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1242) ! used 2 times + TMP_JAMP(1371) = TMP_JAMP(1267) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1163) ! used 2 times + TMP_JAMP(1370) = TMP_JAMP(1266) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1181) ! used 2 times + TMP_JAMP(1369) = TMP_JAMP(1265) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1173) ! used 2 times + TMP_JAMP(1368) = TMP_JAMP(1260) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1166) ! used 2 times + TMP_JAMP(1367) = TMP_JAMP(1249) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1126) ! used 2 times + TMP_JAMP(1366) = TMP_JAMP(1246) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1015) ! used 2 times + TMP_JAMP(1365) = TMP_JAMP(1245) - TMP_JAMP(1198) ! used 2 times + TMP_JAMP(1364) = TMP_JAMP(1243) - TMP_JAMP(1057) ! used 2 times + TMP_JAMP(1363) = TMP_JAMP(1236) - TMP_JAMP(1229) ! used 2 times + TMP_JAMP(1362) = TMP_JAMP(1234) - TMP_JAMP(1183) ! used 2 times + TMP_JAMP(1361) = TMP_JAMP(1233) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1117) ! used 2 times + TMP_JAMP(1360) = TMP_JAMP(1227) + TMP_JAMP(1058) ! used 2 times + TMP_JAMP(1359) = TMP_JAMP(1226) + TMP_JAMP(1082) ! used 2 times + TMP_JAMP(1358) = TMP_JAMP(1222) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1074) ! used 2 times + TMP_JAMP(1357) = TMP_JAMP(1217) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1098) ! used 2 times + TMP_JAMP(1356) = TMP_JAMP(1215) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1096) ! used 2 times + TMP_JAMP(1355) = TMP_JAMP(1214) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1097) ! used 2 times + TMP_JAMP(1354) = TMP_JAMP(1213) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1134) ! used 2 times + TMP_JAMP(1353) = TMP_JAMP(1208) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1099) ! used 2 times + TMP_JAMP(1352) = TMP_JAMP(1206) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1090) ! used 2 times + TMP_JAMP(1351) = TMP_JAMP(1202) - TMP_JAMP(1080) ! used 2 times + TMP_JAMP(1350) = TMP_JAMP(1199) - TMP_JAMP(1071) ! used 2 times + TMP_JAMP(1349) = TMP_JAMP(1192) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1087) ! used 2 times + TMP_JAMP(1348) = TMP_JAMP(1190) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1142) ! used 2 times + TMP_JAMP(1347) = TMP_JAMP(1189) - TMP_JAMP(1160) ! used 2 times + TMP_JAMP(1346) = TMP_JAMP(1186) - TMP_JAMP(1149) ! used 2 times + TMP_JAMP(1345) = TMP_JAMP(1184) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1115) ! used 2 times + TMP_JAMP(1344) = TMP_JAMP(1182) - TMP_JAMP(1137) ! used 2 times + TMP_JAMP(1343) = TMP_JAMP(1178) - TMP_JAMP(1170) ! used 2 times + TMP_JAMP(1342) = TMP_JAMP(1175) + TMP_JAMP(970) ! used 2 times + TMP_JAMP(1341) = TMP_JAMP(1171) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1114) ! used 2 times + TMP_JAMP(1340) = TMP_JAMP(1165) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1085) ! used 2 times + TMP_JAMP(1339) = TMP_JAMP(1162) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1121) ! used 2 times + TMP_JAMP(1338) = TMP_JAMP(1157) + TMP_JAMP(1046) ! used 2 times + TMP_JAMP(1337) = TMP_JAMP(1154) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1140) ! used 2 times + TMP_JAMP(1336) = TMP_JAMP(1146) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1089) ! used 2 times + TMP_JAMP(1335) = TMP_JAMP(1136) - TMP_JAMP(1104) ! used 2 times + TMP_JAMP(1334) = TMP_JAMP(1135) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1106) ! used 2 times + TMP_JAMP(1333) = TMP_JAMP(1132) + TMP_JAMP(1105) ! used 2 times + TMP_JAMP(1332) = TMP_JAMP(1128) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1078) ! used 2 times + TMP_JAMP(1331) = TMP_JAMP(1125) - TMP_JAMP(1073) ! used 2 times + TMP_JAMP(1330) = TMP_JAMP(1124) + TMP_JAMP(1014) ! used 2 times + TMP_JAMP(1329) = TMP_JAMP(1123) - TMP_JAMP(1017) ! used 2 times + TMP_JAMP(1328) = TMP_JAMP(1122) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1048) ! used 2 times + TMP_JAMP(1327) = TMP_JAMP(1120) + TMP_JAMP(1016) ! used 2 times + TMP_JAMP(1326) = TMP_JAMP(1119) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1064) ! used 2 times + TMP_JAMP(1325) = TMP_JAMP(1118) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1077) ! used 2 times + TMP_JAMP(1324) = TMP_JAMP(1116) + TMP_JAMP(1024) ! used 2 times + TMP_JAMP(1323) = TMP_JAMP(1112) + TMP_JAMP(1011) ! used 2 times + TMP_JAMP(1322) = TMP_JAMP(1111) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1081) ! used 2 times + TMP_JAMP(1321) = TMP_JAMP(1110) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1068) ! used 2 times + TMP_JAMP(1320) = TMP_JAMP(1109) - TMP_JAMP(1027) ! used 2 times + TMP_JAMP(1319) = TMP_JAMP(1108) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1066) ! used 2 times + TMP_JAMP(1318) = TMP_JAMP(1103) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(964) ! used 2 times + TMP_JAMP(1317) = TMP_JAMP(1101) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1056) ! used 2 times + TMP_JAMP(1316) = TMP_JAMP(1094) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1049) ! used 2 times + TMP_JAMP(1315) = TMP_JAMP(1093) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1067) ! used 2 times + TMP_JAMP(1314) = TMP_JAMP(1091) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1052) ! used 2 times + TMP_JAMP(1313) = TMP_JAMP(1086) - TMP_JAMP(999) ! used 2 times + TMP_JAMP(1312) = TMP_JAMP(1084) - TMP_JAMP(1060) ! used 2 times + TMP_JAMP(1311) = TMP_JAMP(1083) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1042) ! used 2 times + TMP_JAMP(1310) = TMP_JAMP(1079) + TMP_JAMP(1045) ! used 2 times + TMP_JAMP(1309) = TMP_JAMP(1076) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1051) ! used 2 times + TMP_JAMP(1308) = TMP_JAMP(1075) + TMP_JAMP(1009) ! used 2 times + TMP_JAMP(1307) = TMP_JAMP(1072) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(839) ! used 2 times + TMP_JAMP(1306) = TMP_JAMP(1070) + TMP_JAMP(1053) ! used 2 times + TMP_JAMP(1305) = TMP_JAMP(1069) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1032) ! used 2 times + TMP_JAMP(1416) = TMP_JAMP(1372) - TMP_JAMP(1331) ! used 2 times + TMP_JAMP(1415) = TMP_JAMP(1371) + TMP_JAMP(1319) ! used 2 times + TMP_JAMP(1414) = TMP_JAMP(1370) - TMP_JAMP(1309) ! used 2 times + TMP_JAMP(1413) = TMP_JAMP(1369) + TMP_JAMP(1321) ! used 2 times + TMP_JAMP(1412) = TMP_JAMP(1368) + TMP_JAMP(1315) ! used 2 times + TMP_JAMP(1411) = TMP_JAMP(1367) + TMP_JAMP(1254) ! used 2 times + TMP_JAMP(1410) = TMP_JAMP(1365) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1330) ! used 2 times + TMP_JAMP(1409) = TMP_JAMP(1363) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1324) ! used 2 times + TMP_JAMP(1408) = TMP_JAMP(1362) + TMP_JAMP(1305) ! used 2 times + TMP_JAMP(1407) = TMP_JAMP(1361) + TMP_JAMP(1239) ! used 2 times + TMP_JAMP(1406) = TMP_JAMP(1359) - TMP_JAMP(1297) ! used 2 times + TMP_JAMP(1405) = TMP_JAMP(1358) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1300) ! used 2 times + TMP_JAMP(1404) = TMP_JAMP(1357) + TMP_JAMP(1294) ! used 2 times + TMP_JAMP(1403) = TMP_JAMP(1356) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1262) ! used 2 times + TMP_JAMP(1402) = TMP_JAMP(1355) + TMP_JAMP(1306) ! used 2 times + TMP_JAMP(1401) = TMP_JAMP(1354) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1313) ! used 2 times + TMP_JAMP(1400) = TMP_JAMP(1353) - TMP_JAMP(1310) ! used 2 times + TMP_JAMP(1399) = TMP_JAMP(1352) - TMP_JAMP(1292) ! used 2 times + TMP_JAMP(1398) = TMP_JAMP(1348) - TMP_JAMP(1285) ! used 2 times + TMP_JAMP(1397) = TMP_JAMP(1347) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1327) ! used 2 times + TMP_JAMP(1396) = TMP_JAMP(1345) - TMP_JAMP(1289) ! used 2 times + TMP_JAMP(1395) = TMP_JAMP(1344) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1318) ! used 2 times + TMP_JAMP(1394) = TMP_JAMP(1343) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1323) ! used 2 times + TMP_JAMP(1393) = TMP_JAMP(1339) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1299) ! used 2 times + TMP_JAMP(1392) = TMP_JAMP(1338) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1274) ! used 2 times + TMP_JAMP(1391) = TMP_JAMP(1337) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1273) ! used 2 times + TMP_JAMP(1390) = TMP_JAMP(1336) - TMP_JAMP(1283) ! used 2 times + TMP_JAMP(1389) = TMP_JAMP(1335) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1235) ! used 2 times + TMP_JAMP(1388) = TMP_JAMP(1334) - TMP_JAMP(1251) ! used 2 times + TMP_JAMP(1387) = TMP_JAMP(1333) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1220) ! used 2 times + TMP_JAMP(1386) = TMP_JAMP(1332) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1191) ! used 2 times + TMP_JAMP(1385) = TMP_JAMP(1328) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1161) ! used 2 times + TMP_JAMP(1384) = TMP_JAMP(1326) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1230) ! used 2 times + TMP_JAMP(1383) = TMP_JAMP(1325) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1179) ! used 2 times + TMP_JAMP(1382) = TMP_JAMP(1322) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1221) ! used 2 times + TMP_JAMP(1381) = TMP_JAMP(1317) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1293) ! used 2 times + TMP_JAMP(1380) = TMP_JAMP(1316) - TMP_JAMP(1258) ! used 2 times + TMP_JAMP(1379) = TMP_JAMP(1314) + TMP_JAMP(1259) ! used 2 times + TMP_JAMP(1378) = TMP_JAMP(1312) + TMP_JAMP(1223) ! used 2 times + TMP_JAMP(1377) = TMP_JAMP(1308) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1225) ! used 2 times + TMP_JAMP(1419) = TMP_JAMP(1180) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(547) ! used 2 times + TMP_JAMP(1418) = TMP_JAMP(1139) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(241) ! used 2 times + TMP_JAMP(1417) = TMP_JAMP(855) + TMP_JAMP(243) ! used 2 times + TMP_JAMP(1479) = AMP(1371) - AMP(1381) ! used 16 times + TMP_JAMP(1478) = AMP(1370) - AMP(1382) ! used 16 times + TMP_JAMP(1477) = AMP(1358) - AMP(1361) ! used 16 times + TMP_JAMP(1476) = AMP(1323) + AMP(1387) ! used 16 times + TMP_JAMP(1475) = AMP(1322) + AMP(1388) ! used 16 times + TMP_JAMP(1474) = AMP(1320) + AMP(1324) ! used 16 times + TMP_JAMP(1473) = AMP(1310) - AMP(1313) ! used 16 times + TMP_JAMP(1472) = AMP(1309) + AMP(1311) ! used 16 times + TMP_JAMP(1471) = AMP(1103) + AMP(1359) ! used 16 times + TMP_JAMP(1470) = AMP(1085) + AMP(1087) ! used 16 times + TMP_JAMP(1469) = AMP(1084) - AMP(1100) ! used 16 times + TMP_JAMP(1468) = AMP(1080) + AMP(1082) ! used 16 times + TMP_JAMP(1467) = AMP(1079) - AMP(1099) ! used 16 times + TMP_JAMP(1466) = AMP(1076) + AMP(1078) ! used 16 times + TMP_JAMP(1465) = AMP(1378) + AMP(1383) ! used 16 times + TMP_JAMP(1464) = AMP(1367) + AMP(1369) ! used 16 times + TMP_JAMP(1463) = AMP(1330) - AMP(1389) ! used 16 times + TMP_JAMP(1462) = AMP(1319) + AMP(1321) ! used 16 times + TMP_JAMP(1461) = AMP(1315) - AMP(1318) ! used 16 times + TMP_JAMP(1460) = AMP(1314) + AMP(1316) ! used 16 times + TMP_JAMP(1459) = AMP(1357) + AMP(1360) ! used 16 times + TMP_JAMP(1458) = AMP(1163) + AMP(1165) ! used 16 times + TMP_JAMP(1457) = AMP(1159) + AMP(1161) ! used 16 times + TMP_JAMP(1456) = AMP(1158) + AMP(1160) ! used 16 times + TMP_JAMP(1455) = AMP(1368) + AMP(1372) ! used 16 times + TMP_JAMP(1454) = AMP(1164) + AMP(1168) ! used 16 times + TMP_JAMP(1453) = AMP(1154) + AMP(1156) ! used 16 times + TMP_JAMP(1452) = AMP(1153) + AMP(1155) ! used 16 times + TMP_JAMP(1451) = AMP(1362) + AMP(1364) ! used 16 times + TMP_JAMP(1450) = AMP(1101) + AMP(1104) ! used 16 times + TMP_JAMP(1449) = AMP(1363) - AMP(1366) ! used 16 times + TMP_JAMP(1448) = AMP(1347) + AMP(1384) ! used 16 times + TMP_JAMP(1447) = AMP(1346) + AMP(1385) ! used 16 times + TMP_JAMP(1446) = AMP(1334) - AMP(1337) ! used 16 times + TMP_JAMP(1445) = AMP(1181) + AMP(1336) ! used 16 times + TMP_JAMP(1444) = AMP(1162) - AMP(1178) ! used 16 times + TMP_JAMP(1443) = AMP(1157) - AMP(1177) ! used 16 times + TMP_JAMP(1442) = AMP(1354) - AMP(1386) ! used 16 times + TMP_JAMP(1441) = AMP(1343) + AMP(1345) ! used 16 times + TMP_JAMP(1440) = AMP(1333) + AMP(1335) ! used 16 times + TMP_JAMP(1439) = AMP(1081) + AMP(1083) ! used 16 times + TMP_JAMP(1438) = AMP(1344) + AMP(1348) ! used 16 times + TMP_JAMP(1437) = AMP(1086) + AMP(1090) ! used 16 times + TMP_JAMP(1436) = AMP(1075) + AMP(1077) ! used 16 times + TMP_JAMP(1435) = AMP(1338) + AMP(1340) ! used 16 times + TMP_JAMP(1434) = AMP(1179) + AMP(1182) ! used 16 times + TMP_JAMP(1433) = AMP(1339) - AMP(1342) ! used 16 times + TMP_JAMP(1432) = AMP(1259) + AMP(1312) ! used 16 times + TMP_JAMP(1431) = AMP(1257) + AMP(1260) ! used 16 times + TMP_JAMP(1430) = AMP(1240) - AMP(1256) ! used 16 times + TMP_JAMP(1429) = AMP(1237) + AMP(1239) ! used 16 times + TMP_JAMP(1428) = AMP(1242) + AMP(1246) ! used 16 times + TMP_JAMP(1427) = AMP(1236) + AMP(1238) ! used 16 times + TMP_JAMP(1426) = AMP(1241) + AMP(1243) ! used 16 times + TMP_JAMP(1425) = AMP(1235) - AMP(1255) ! used 16 times + TMP_JAMP(1424) = AMP(1231) + AMP(1233) ! used 16 times + TMP_JAMP(1423) = AMP(1232) + AMP(1234) ! used 16 times + TMP_JAMP(1422) = AMP(954) - AMP(1097) ! used 16 times + TMP_JAMP(1421) = AMP(952) + AMP(1328) ! used 16 times + TMP_JAMP(1420) = AMP(953) - AMP(1175) ! used 16 times + TMP_JAMP(1524) = TMP_JAMP(1477) + AMP(1390) ! used 16 times + TMP_JAMP(1523) = TMP_JAMP(1474) - AMP(1327) ! used 16 times + TMP_JAMP(1522) = TMP_JAMP(1473) - AMP(1392) ! used 16 times + TMP_JAMP(1521) = TMP_JAMP(1472) + AMP(1329) ! used 16 times + TMP_JAMP(1520) = TMP_JAMP(1471) - TMP_JAMP(1469) ! used 16 times + TMP_JAMP(1519) = TMP_JAMP(1470) - AMP(1096) ! used 16 times + TMP_JAMP(1518) = TMP_JAMP(1468) + AMP(1098) ! used 16 times + TMP_JAMP(1517) = TMP_JAMP(1467) - AMP(1102) ! used 16 times + TMP_JAMP(1516) = TMP_JAMP(1466) + AMP(1089) ! used 16 times + TMP_JAMP(1515) = TMP_JAMP(1464) - AMP(1393) ! used 16 times + TMP_JAMP(1514) = TMP_JAMP(1462) + AMP(1395) ! used 16 times + TMP_JAMP(1513) = TMP_JAMP(1461) - AMP(1325) ! used 16 times + TMP_JAMP(1512) = TMP_JAMP(1460) + AMP(1332) ! used 16 times + TMP_JAMP(1511) = TMP_JAMP(1459) + AMP(1377) ! used 16 times + TMP_JAMP(1510) = TMP_JAMP(1458) - AMP(1174) ! used 16 times + TMP_JAMP(1509) = TMP_JAMP(1457) + AMP(1173) ! used 16 times + TMP_JAMP(1508) = TMP_JAMP(1456) + AMP(1176) ! used 16 times + TMP_JAMP(1507) = TMP_JAMP(1455) - AMP(1375) ! used 16 times + TMP_JAMP(1506) = TMP_JAMP(1454) - AMP(1171) ! used 16 times + TMP_JAMP(1505) = TMP_JAMP(1453) + AMP(1167) ! used 16 times + TMP_JAMP(1504) = TMP_JAMP(1452) + AMP(1170) ! used 16 times + TMP_JAMP(1503) = TMP_JAMP(1451) + AMP(1379) ! used 16 times + TMP_JAMP(1502) = TMP_JAMP(1450) + AMP(1365) ! used 16 times + TMP_JAMP(1501) = TMP_JAMP(1449) - AMP(1373) ! used 16 times + TMP_JAMP(1500) = TMP_JAMP(1446) - AMP(1391) ! used 16 times + TMP_JAMP(1499) = TMP_JAMP(1445) - TMP_JAMP(1444) ! used 16 times + TMP_JAMP(1498) = TMP_JAMP(1443) - AMP(1180) ! used 16 times + TMP_JAMP(1497) = TMP_JAMP(1441) + AMP(1394) ! used 16 times + TMP_JAMP(1496) = TMP_JAMP(1440) + AMP(1353) ! used 16 times + TMP_JAMP(1495) = TMP_JAMP(1439) + AMP(1095) ! used 16 times + TMP_JAMP(1494) = TMP_JAMP(1438) - AMP(1351) ! used 16 times + TMP_JAMP(1493) = TMP_JAMP(1437) - AMP(1093) ! used 16 times + TMP_JAMP(1492) = TMP_JAMP(1436) + AMP(1092) ! used 16 times + TMP_JAMP(1491) = TMP_JAMP(1435) + AMP(1356) ! used 16 times + TMP_JAMP(1490) = TMP_JAMP(1434) + AMP(1341) ! used 16 times + TMP_JAMP(1489) = TMP_JAMP(1433) - AMP(1349) ! used 16 times + TMP_JAMP(1488) = TMP_JAMP(1432) - TMP_JAMP(1430) ! used 16 times + TMP_JAMP(1487) = TMP_JAMP(1431) + AMP(1317) ! used 16 times + TMP_JAMP(1486) = TMP_JAMP(1429) + AMP(1251) ! used 16 times + TMP_JAMP(1485) = TMP_JAMP(1428) - AMP(1249) ! used 16 times + TMP_JAMP(1484) = TMP_JAMP(1427) + AMP(1254) ! used 16 times + TMP_JAMP(1483) = TMP_JAMP(1426) - AMP(1252) ! used 16 times + TMP_JAMP(1482) = TMP_JAMP(1425) - AMP(1258) ! used 16 times + TMP_JAMP(1481) = TMP_JAMP(1424) + AMP(1248) ! used 16 times + TMP_JAMP(1480) = TMP_JAMP(1423) + AMP(1245) ! used 16 times + TMP_JAMP(1530) = TMP_JAMP(1524) - TMP_JAMP(1478) ! used 16 times + TMP_JAMP(1529) = TMP_JAMP(1522) - TMP_JAMP(1475) ! used 16 times + TMP_JAMP(1528) = TMP_JAMP(1515) - TMP_JAMP(1465) ! used 16 times + TMP_JAMP(1527) = TMP_JAMP(1514) - TMP_JAMP(1463) ! used 16 times + TMP_JAMP(1526) = TMP_JAMP(1500) - TMP_JAMP(1447) ! used 16 times + TMP_JAMP(1525) = TMP_JAMP(1497) - TMP_JAMP(1442) ! used 16 times + TMP_JAMP(1708) = TMP_JAMP(1530) + TMP_JAMP(1520) ! used 8 times + TMP_JAMP(1707) = TMP_JAMP(1530) + TMP_JAMP(1529) ! used 8 times + TMP_JAMP(1706) = TMP_JAMP(1530) - TMP_JAMP(1526) ! used 8 times + TMP_JAMP(1705) = TMP_JAMP(1530) - TMP_JAMP(1511) ! used 8 times + TMP_JAMP(1704) = TMP_JAMP(1529) + TMP_JAMP(1521) ! used 8 times + TMP_JAMP(1703) = TMP_JAMP(1529) + TMP_JAMP(1526) ! used 8 times + TMP_JAMP(1702) = TMP_JAMP(1529) - TMP_JAMP(1488) ! used 8 times + TMP_JAMP(1701) = TMP_JAMP(1528) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1072) ! used 8 times + TMP_JAMP(1700) = TMP_JAMP(1528) - TMP_JAMP(1479) ! used 8 times + TMP_JAMP(1699) = TMP_JAMP(1528) - TMP_JAMP(1503) ! used 8 times + TMP_JAMP(1698) = TMP_JAMP(1528) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1012) ! used 8 times + TMP_JAMP(1697) = TMP_JAMP(1527) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1074) ! used 8 times + TMP_JAMP(1696) = TMP_JAMP(1527) - TMP_JAMP(1476) ! used 8 times + TMP_JAMP(1695) = TMP_JAMP(1527) + TMP_JAMP(1512) ! used 8 times + TMP_JAMP(1694) = TMP_JAMP(1527) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1014) ! used 8 times + TMP_JAMP(1693) = TMP_JAMP(1526) - TMP_JAMP(1448) ! used 8 times + TMP_JAMP(1692) = TMP_JAMP(1526) + TMP_JAMP(1496) ! used 8 times + TMP_JAMP(1691) = TMP_JAMP(1525) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1073) ! used 8 times + TMP_JAMP(1690) = TMP_JAMP(1525) + TMP_JAMP(1491) ! used 8 times + TMP_JAMP(1689) = TMP_JAMP(1525) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1013) ! used 8 times + TMP_JAMP(1688) = TMP_JAMP(1523) + TMP_JAMP(1519) ! used 8 times + TMP_JAMP(1687) = TMP_JAMP(1523) + TMP_JAMP(1521) ! used 8 times + TMP_JAMP(1686) = TMP_JAMP(1523) - TMP_JAMP(1510) ! used 8 times + TMP_JAMP(1685) = TMP_JAMP(1523) - TMP_JAMP(1513) ! used 8 times + TMP_JAMP(1684) = TMP_JAMP(1521) + TMP_JAMP(1518) ! used 8 times + TMP_JAMP(1683) = TMP_JAMP(1521) - TMP_JAMP(1508) ! used 8 times + TMP_JAMP(1682) = TMP_JAMP(1521) + TMP_JAMP(1488) ! used 8 times + TMP_JAMP(1681) = TMP_JAMP(1520) + TMP_JAMP(1518) ! used 8 times + TMP_JAMP(1680) = TMP_JAMP(1520) + TMP_JAMP(1511) ! used 8 times + TMP_JAMP(1679) = TMP_JAMP(1520) - TMP_JAMP(1495) ! used 8 times + TMP_JAMP(1678) = TMP_JAMP(1519) + TMP_JAMP(1518) ! used 8 times + TMP_JAMP(1677) = TMP_JAMP(1519) + TMP_JAMP(1510) ! used 8 times + TMP_JAMP(1676) = TMP_JAMP(1518) + TMP_JAMP(1508) ! used 8 times + TMP_JAMP(1675) = TMP_JAMP(1518) + TMP_JAMP(1495) ! used 8 times + TMP_JAMP(1674) = TMP_JAMP(1517) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1147) ! used 8 times + TMP_JAMP(1673) = TMP_JAMP(1517) + TMP_JAMP(1516) ! used 8 times + TMP_JAMP(1672) = TMP_JAMP(1517) - TMP_JAMP(1492) ! used 8 times + TMP_JAMP(1671) = TMP_JAMP(1517) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1148) ! used 8 times + TMP_JAMP(1670) = TMP_JAMP(1516) + TMP_JAMP(1492) ! used 8 times + TMP_JAMP(1669) = TMP_JAMP(1513) - AMP(1326) ! used 8 times + TMP_JAMP(1668) = TMP_JAMP(1513) + TMP_JAMP(1512) ! used 8 times + TMP_JAMP(1667) = TMP_JAMP(1511) + AMP(1376) ! used 8 times + TMP_JAMP(1666) = TMP_JAMP(1511) - TMP_JAMP(1486) ! used 8 times + TMP_JAMP(1665) = TMP_JAMP(1511) + TMP_JAMP(1507) ! used 8 times + TMP_JAMP(1664) = TMP_JAMP(1510) - TMP_JAMP(1505) ! used 8 times + TMP_JAMP(1663) = TMP_JAMP(1509) + TMP_JAMP(1508) ! used 8 times + TMP_JAMP(1662) = TMP_JAMP(1509) + TMP_JAMP(1486) ! used 8 times + TMP_JAMP(1661) = TMP_JAMP(1509) - TMP_JAMP(1499) ! used 8 times + TMP_JAMP(1660) = TMP_JAMP(1509) + TMP_JAMP(1506) ! used 8 times + TMP_JAMP(1659) = TMP_JAMP(1508) + TMP_JAMP(1499) ! used 8 times + TMP_JAMP(1658) = TMP_JAMP(1507) + TMP_JAMP(1506) ! used 8 times + TMP_JAMP(1657) = TMP_JAMP(1507) - TMP_JAMP(1485) ! used 8 times + TMP_JAMP(1656) = TMP_JAMP(1507) - TMP_JAMP(1501) ! used 8 times + TMP_JAMP(1655) = TMP_JAMP(1506) - AMP(1172) ! used 8 times + TMP_JAMP(1654) = TMP_JAMP(1506) - TMP_JAMP(1504) ! used 8 times + TMP_JAMP(1653) = TMP_JAMP(1506) + TMP_JAMP(1485) ! used 8 times + TMP_JAMP(1652) = TMP_JAMP(1505) + TMP_JAMP(1504) ! used 8 times + TMP_JAMP(1651) = TMP_JAMP(1503) + TMP_JAMP(1501) ! used 8 times + TMP_JAMP(1650) = TMP_JAMP(1502) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1150) ! used 8 times + TMP_JAMP(1649) = TMP_JAMP(1502) - TMP_JAMP(1501) ! used 8 times + TMP_JAMP(1648) = TMP_JAMP(1502) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1149) ! used 8 times + TMP_JAMP(1647) = TMP_JAMP(1501) - AMP(1374) ! used 8 times + TMP_JAMP(1646) = TMP_JAMP(1499) + TMP_JAMP(1496) ! used 8 times + TMP_JAMP(1645) = TMP_JAMP(1498) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1225) ! used 8 times + TMP_JAMP(1644) = TMP_JAMP(1498) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1226) ! used 8 times + TMP_JAMP(1643) = TMP_JAMP(1496) + TMP_JAMP(1495) ! used 8 times + TMP_JAMP(1642) = TMP_JAMP(1496) + TMP_JAMP(1494) ! used 8 times + TMP_JAMP(1641) = TMP_JAMP(1496) - TMP_JAMP(1484) ! used 8 times + TMP_JAMP(1640) = TMP_JAMP(1495) + AMP(1094) ! used 8 times + TMP_JAMP(1639) = TMP_JAMP(1495) + TMP_JAMP(1484) ! used 8 times + TMP_JAMP(1638) = TMP_JAMP(1495) + TMP_JAMP(1493) ! used 8 times + TMP_JAMP(1637) = TMP_JAMP(1494) - AMP(1350) ! used 8 times + TMP_JAMP(1636) = TMP_JAMP(1494) + TMP_JAMP(1493) ! used 8 times + TMP_JAMP(1635) = TMP_JAMP(1494) - TMP_JAMP(1483) ! used 8 times + TMP_JAMP(1634) = TMP_JAMP(1494) - TMP_JAMP(1489) ! used 8 times + TMP_JAMP(1633) = TMP_JAMP(1493) - AMP(1094) ! used 8 times + TMP_JAMP(1632) = TMP_JAMP(1493) - TMP_JAMP(1492) ! used 8 times + TMP_JAMP(1631) = TMP_JAMP(1493) + TMP_JAMP(1483) ! used 8 times + TMP_JAMP(1630) = TMP_JAMP(1491) + TMP_JAMP(1489) ! used 8 times + TMP_JAMP(1629) = TMP_JAMP(1490) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1228) ! used 8 times + TMP_JAMP(1628) = TMP_JAMP(1490) - TMP_JAMP(1489) ! used 8 times + TMP_JAMP(1627) = TMP_JAMP(1490) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1227) ! used 8 times + TMP_JAMP(1626) = TMP_JAMP(1489) - AMP(1350) ! used 8 times + TMP_JAMP(1625) = TMP_JAMP(1488) - TMP_JAMP(1486) ! used 8 times + TMP_JAMP(1624) = TMP_JAMP(1488) + TMP_JAMP(1484) ! used 8 times + TMP_JAMP(1623) = TMP_JAMP(1487) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1305) ! used 8 times + TMP_JAMP(1622) = TMP_JAMP(1487) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1306) ! used 8 times + TMP_JAMP(1621) = TMP_JAMP(1486) + AMP(1250) ! used 8 times + TMP_JAMP(1620) = TMP_JAMP(1486) + TMP_JAMP(1485) ! used 8 times + TMP_JAMP(1619) = TMP_JAMP(1485) - AMP(1250) ! used 8 times + TMP_JAMP(1618) = TMP_JAMP(1485) - TMP_JAMP(1481) ! used 8 times + TMP_JAMP(1617) = TMP_JAMP(1484) + TMP_JAMP(1483) ! used 8 times + TMP_JAMP(1616) = TMP_JAMP(1483) - TMP_JAMP(1480) ! used 8 times + TMP_JAMP(1615) = TMP_JAMP(1482) - TMP_JAMP(1481) ! used 8 times + TMP_JAMP(1614) = TMP_JAMP(1482) + TMP_JAMP(1480) ! used 8 times + TMP_JAMP(1613) = TMP_JAMP(1482) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1303) ! used 8 times + TMP_JAMP(1612) = TMP_JAMP(1481) + TMP_JAMP(1480) ! used 8 times + TMP_JAMP(1611) = TMP_JAMP(1479) + TMP_JAMP(1476) ! used 8 times + TMP_JAMP(1610) = TMP_JAMP(1479) - TMP_JAMP(1448) ! used 8 times + TMP_JAMP(1609) = TMP_JAMP(1479) - AMP(1374) ! used 8 times + TMP_JAMP(1608) = TMP_JAMP(1476) + AMP(1326) ! used 8 times + TMP_JAMP(1607) = TMP_JAMP(1476) + TMP_JAMP(1448) ! used 8 times + TMP_JAMP(1606) = TMP_JAMP(1448) + AMP(1350) ! used 8 times + TMP_JAMP(1605) = TMP_JAMP(1422) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(948) ! used 8 times + TMP_JAMP(1604) = TMP_JAMP(1422) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(951) ! used 8 times + TMP_JAMP(1603) = TMP_JAMP(1421) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(946) ! used 8 times + TMP_JAMP(1602) = TMP_JAMP(1421) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(949) ! used 8 times + TMP_JAMP(1601) = TMP_JAMP(1420) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(947) ! used 8 times + TMP_JAMP(1600) = TMP_JAMP(1420) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(950) ! used 8 times + TMP_JAMP(1599) = AMP(1122) + AMP(1123) ! used 8 times + TMP_JAMP(1598) = AMP(1117) + AMP(1125) ! used 8 times + TMP_JAMP(1597) = AMP(1068) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1380) ! used 8 times + TMP_JAMP(1596) = AMP(1064) - AMP(1066) ! used 8 times + TMP_JAMP(1595) = AMP(1046) - AMP(1048) ! used 8 times + TMP_JAMP(1594) = AMP(1044) + AMP(1050) ! used 8 times + TMP_JAMP(1593) = AMP(1200) + AMP(1201) ! used 8 times + TMP_JAMP(1592) = AMP(1172) + AMP(1376) ! used 8 times + TMP_JAMP(1591) = AMP(1166) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1202) ! used 8 times + TMP_JAMP(1590) = AMP(1166) + AMP(1172) ! used 8 times + TMP_JAMP(1589) = AMP(1212) + AMP(1213) ! used 8 times + TMP_JAMP(1588) = AMP(1207) + AMP(1215) ! used 8 times + TMP_JAMP(1587) = AMP(1195) + AMP(1203) ! used 8 times + TMP_JAMP(1586) = AMP(1088) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1124) ! used 8 times + TMP_JAMP(1585) = AMP(1062) + AMP(1067) ! used 8 times + TMP_JAMP(1584) = AMP(1058) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1355) ! used 8 times + TMP_JAMP(1583) = AMP(1055) - AMP(1057) ! used 8 times + TMP_JAMP(1582) = AMP(1094) + AMP(1352) ! used 8 times + TMP_JAMP(1581) = AMP(1088) + AMP(1094) ! used 8 times + TMP_JAMP(1580) = AMP(1134) + AMP(1135) ! used 8 times + TMP_JAMP(1579) = AMP(1129) + AMP(1137) ! used 8 times + TMP_JAMP(1578) = AMP(1053) + AMP(1059) ! used 8 times + TMP_JAMP(1577) = AMP(1172) + AMP(1250) ! used 8 times + TMP_JAMP(1576) = AMP(1290) + AMP(1291) ! used 8 times + TMP_JAMP(1575) = AMP(1247) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1292) ! used 8 times + TMP_JAMP(1574) = AMP(1094) + AMP(1253) ! used 8 times + TMP_JAMP(1573) = AMP(1299) + AMP(1300) ! used 8 times + TMP_JAMP(1572) = AMP(1244) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1301) ! used 8 times + TMP_JAMP(1571) = AMP(1285) + AMP(1293) ! used 8 times + TMP_JAMP(1570) = AMP(1294) + AMP(1302) ! used 8 times + TMP_JAMP(1569) = AMP(1049) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1331) ! used 8 times + TMP_JAMP(1568) = AMP(1169) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1214) ! used 8 times + TMP_JAMP(1567) = AMP(1091) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1136) ! used 8 times + TMP_JAMP(1566) = AMP(1110) + AMP(1111) ! used 8 times + TMP_JAMP(1565) = AMP(1105) + AMP(1113) ! used 8 times + TMP_JAMP(1564) = AMP(1278) + AMP(1279) ! used 8 times + TMP_JAMP(1563) = AMP(1250) - AMP(1376) ! used 8 times + TMP_JAMP(1562) = AMP(1244) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1280) ! used 8 times + TMP_JAMP(1561) = AMP(1244) + AMP(1250) ! used 8 times + TMP_JAMP(1560) = AMP(1273) + AMP(1281) ! used 8 times + TMP_JAMP(1559) = AMP(1091) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1112) ! used 8 times + TMP_JAMP(1558) = AMP(1143) + AMP(1144) ! used 8 times + TMP_JAMP(1557) = AMP(1138) + AMP(1146) ! used 8 times + TMP_JAMP(1556) = AMP(1221) + AMP(1222) ! used 8 times + TMP_JAMP(1555) = AMP(1166) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1223) ! used 8 times + TMP_JAMP(1554) = AMP(1216) + AMP(1224) ! used 8 times + TMP_JAMP(1553) = AMP(1352) + AMP(1355) ! used 8 times + TMP_JAMP(1552) = AMP(1247) + AMP(1253) ! used 8 times + TMP_JAMP(1551) = AMP(1253) - AMP(1352) ! used 8 times + TMP_JAMP(1550) = AMP(1088) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1145) ! used 8 times + TMP_JAMP(1549) = AMP(1413) + AMP(1414) ! used 8 times + TMP_JAMP(1548) = AMP(1374) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1416) ! used 8 times + TMP_JAMP(1547) = AMP(1188) + AMP(1189) ! used 8 times + TMP_JAMP(1546) = AMP(1183) + AMP(1191) ! used 8 times + TMP_JAMP(1545) = AMP(1411) - AMP(1415) ! used 8 times + TMP_JAMP(1544) = AMP(1266) + AMP(1267) ! used 8 times + TMP_JAMP(1543) = AMP(1247) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1268) ! used 8 times + TMP_JAMP(1542) = AMP(1261) + AMP(1269) ! used 8 times + TMP_JAMP(1541) = AMP(1169) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1190) ! used 8 times + TMP_JAMP(1540) = AMP(1376) + AMP(1380) ! used 8 times + TMP_JAMP(1539) = AMP(1008) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1380) ! used 8 times + TMP_JAMP(1538) = AMP(1004) - AMP(1006) ! used 8 times + TMP_JAMP(1537) = AMP(986) - AMP(988) ! used 8 times + TMP_JAMP(1536) = AMP(984) + AMP(990) ! used 8 times + TMP_JAMP(1535) = AMP(1002) + AMP(1007) ! used 8 times + TMP_JAMP(1534) = AMP(998) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1355) ! used 8 times + TMP_JAMP(1533) = AMP(995) - AMP(997) ! used 8 times + TMP_JAMP(1532) = AMP(993) + AMP(999) ! used 8 times + TMP_JAMP(1531) = AMP(989) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1331) ! used 8 times + TMP_JAMP(1711) = TMP_JAMP(1698) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1538) ! used 8 times + TMP_JAMP(1710) = TMP_JAMP(1694) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1537) ! used 8 times + TMP_JAMP(1709) = TMP_JAMP(1689) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1533) ! used 8 times + TMP_JAMP(1712) = TMP_JAMP(1691) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1583) ! used 6 times + TMP_JAMP(1714) = TMP_JAMP(1697) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1595) ! used 5 times + TMP_JAMP(1713) = TMP_JAMP(1557) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1516) ! used 5 times + TMP_JAMP(1843) = TMP_JAMP(1711) + TMP_JAMP(1710) ! used 4 times + TMP_JAMP(1842) = TMP_JAMP(1711) - TMP_JAMP(1709) ! used 4 times + TMP_JAMP(1841) = TMP_JAMP(1710) + TMP_JAMP(1709) ! used 4 times + TMP_JAMP(1840) = TMP_JAMP(1710) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1531) ! used 4 times + TMP_JAMP(1839) = TMP_JAMP(1709) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1534) ! used 4 times + TMP_JAMP(1838) = TMP_JAMP(1703) - TMP_JAMP(1659) ! used 4 times + TMP_JAMP(1837) = TMP_JAMP(1701) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1596) ! used 4 times + TMP_JAMP(1836) = TMP_JAMP(1685) + TMP_JAMP(1521) ! used 4 times + TMP_JAMP(1835) = TMP_JAMP(1679) - TMP_JAMP(1632) ! used 4 times + TMP_JAMP(1834) = TMP_JAMP(1673) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1598) ! used 4 times + TMP_JAMP(1833) = TMP_JAMP(1671) - AMP(1139) ! used 4 times + TMP_JAMP(1832) = TMP_JAMP(1668) - AMP(1041) ! used 4 times + TMP_JAMP(1831) = TMP_JAMP(1664) + TMP_JAMP(1659) ! used 4 times + TMP_JAMP(1830) = TMP_JAMP(1661) + TMP_JAMP(1654) ! used 4 times + TMP_JAMP(1829) = TMP_JAMP(1651) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1585) ! used 4 times + TMP_JAMP(1828) = TMP_JAMP(1648) + AMP(1151) ! used 4 times + TMP_JAMP(1827) = TMP_JAMP(1648) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1535) ! used 4 times + TMP_JAMP(1826) = TMP_JAMP(1645) + AMP(1184) ! used 4 times + TMP_JAMP(1825) = TMP_JAMP(1642) - TMP_JAMP(1606) ! used 4 times + TMP_JAMP(1824) = TMP_JAMP(1635) + TMP_JAMP(1551) ! used 4 times + TMP_JAMP(1823) = TMP_JAMP(1630) - TMP_JAMP(1606) ! used 4 times + TMP_JAMP(1822) = TMP_JAMP(1629) + AMP(1230) ! used 4 times + TMP_JAMP(1821) = TMP_JAMP(1627) + AMP(1229) ! used 4 times + TMP_JAMP(1820) = TMP_JAMP(1627) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1532) ! used 4 times + TMP_JAMP(1819) = TMP_JAMP(1623) + AMP(1307) ! used 4 times + TMP_JAMP(1818) = TMP_JAMP(1623) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1536) ! used 4 times + TMP_JAMP(1817) = TMP_JAMP(1620) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1576) ! used 4 times + TMP_JAMP(1816) = TMP_JAMP(1617) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1573) ! used 4 times + TMP_JAMP(1815) = TMP_JAMP(1615) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1571) ! used 4 times + TMP_JAMP(1814) = TMP_JAMP(1614) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1570) ! used 4 times + TMP_JAMP(1813) = TMP_JAMP(1613) + AMP(1308) ! used 4 times + TMP_JAMP(1812) = TMP_JAMP(1612) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1571) ! used 4 times + TMP_JAMP(1811) = TMP_JAMP(1612) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1570) ! used 4 times + TMP_JAMP(1810) = TMP_JAMP(1607) + AMP(1326) ! used 4 times + TMP_JAMP(1809) = TMP_JAMP(1605) - TMP_JAMP(1603) ! used 4 times + TMP_JAMP(1808) = TMP_JAMP(1605) + TMP_JAMP(1601) ! used 4 times + TMP_JAMP(1807) = TMP_JAMP(1604) - TMP_JAMP(1559) ! used 4 times + TMP_JAMP(1806) = TMP_JAMP(1604) - AMP(1141) ! used 4 times + TMP_JAMP(1805) = TMP_JAMP(1604) + TMP_JAMP(1600) ! used 4 times + TMP_JAMP(1804) = TMP_JAMP(1603) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1569) ! used 4 times + TMP_JAMP(1803) = TMP_JAMP(1603) + TMP_JAMP(1601) ! used 4 times + TMP_JAMP(1802) = TMP_JAMP(1602) - AMP(945) ! used 4 times + TMP_JAMP(1801) = TMP_JAMP(1602) + TMP_JAMP(1600) ! used 4 times + TMP_JAMP(1800) = TMP_JAMP(1602) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1531) ! used 4 times + TMP_JAMP(1799) = TMP_JAMP(1600) - AMP(1219) ! used 4 times + TMP_JAMP(1798) = TMP_JAMP(1600) - TMP_JAMP(1541) ! used 4 times + TMP_JAMP(1797) = TMP_JAMP(1599) - TMP_JAMP(1598) ! used 4 times + TMP_JAMP(1796) = TMP_JAMP(1599) + TMP_JAMP(1593) ! used 4 times + TMP_JAMP(1795) = TMP_JAMP(1599) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1120) ! used 4 times + TMP_JAMP(1794) = TMP_JAMP(1598) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1118) ! used 4 times + TMP_JAMP(1793) = TMP_JAMP(1598) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1126) ! used 4 times + TMP_JAMP(1792) = TMP_JAMP(1596) - AMP(1072) ! used 4 times + TMP_JAMP(1791) = TMP_JAMP(1596) - TMP_JAMP(1585) ! used 4 times + TMP_JAMP(1790) = TMP_JAMP(1594) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1041) ! used 4 times + TMP_JAMP(1789) = TMP_JAMP(1594) + TMP_JAMP(1569) ! used 4 times + TMP_JAMP(1788) = TMP_JAMP(1594) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1045) ! used 4 times + TMP_JAMP(1787) = TMP_JAMP(1593) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1198) ! used 4 times + TMP_JAMP(1786) = TMP_JAMP(1589) - TMP_JAMP(1588) ! used 4 times + TMP_JAMP(1785) = TMP_JAMP(1589) + TMP_JAMP(1576) ! used 4 times + TMP_JAMP(1784) = TMP_JAMP(1589) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1568) ! used 4 times + TMP_JAMP(1783) = TMP_JAMP(1588) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1568) ! used 4 times + TMP_JAMP(1782) = TMP_JAMP(1588) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1208) ! used 4 times + TMP_JAMP(1781) = TMP_JAMP(1587) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1204) ! used 4 times + TMP_JAMP(1780) = TMP_JAMP(1587) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1196) ! used 4 times + TMP_JAMP(1779) = TMP_JAMP(1585) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1063) ! used 4 times + TMP_JAMP(1778) = TMP_JAMP(1580) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1132) ! used 4 times + TMP_JAMP(1777) = TMP_JAMP(1580) + TMP_JAMP(1573) ! used 4 times + TMP_JAMP(1776) = TMP_JAMP(1580) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1567) ! used 4 times + TMP_JAMP(1775) = TMP_JAMP(1579) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1126) ! used 4 times + TMP_JAMP(1774) = TMP_JAMP(1579) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1567) ! used 4 times + TMP_JAMP(1773) = TMP_JAMP(1579) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1130) ! used 4 times + TMP_JAMP(1772) = TMP_JAMP(1578) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1054) ! used 4 times + TMP_JAMP(1771) = TMP_JAMP(1578) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1032) ! used 4 times + TMP_JAMP(1770) = TMP_JAMP(1576) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1288) ! used 4 times + TMP_JAMP(1769) = TMP_JAMP(1576) - TMP_JAMP(1571) ! used 4 times + TMP_JAMP(1768) = TMP_JAMP(1573) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1297) ! used 4 times + TMP_JAMP(1767) = TMP_JAMP(1573) - TMP_JAMP(1570) ! used 4 times + TMP_JAMP(1766) = TMP_JAMP(1566) + TMP_JAMP(1564) ! used 4 times + TMP_JAMP(1765) = TMP_JAMP(1566) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1559) ! used 4 times + TMP_JAMP(1764) = TMP_JAMP(1566) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1108) ! used 4 times + TMP_JAMP(1763) = TMP_JAMP(1565) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1106) ! used 4 times + TMP_JAMP(1762) = TMP_JAMP(1565) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1559) ! used 4 times + TMP_JAMP(1761) = TMP_JAMP(1565) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1114) ! used 4 times + TMP_JAMP(1760) = TMP_JAMP(1564) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1276) ! used 4 times + TMP_JAMP(1759) = TMP_JAMP(1561) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1280) ! used 4 times + TMP_JAMP(1758) = TMP_JAMP(1561) + AMP(1172) ! used 4 times + TMP_JAMP(1757) = TMP_JAMP(1561) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1301) ! used 4 times + TMP_JAMP(1756) = TMP_JAMP(1560) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1282) ! used 4 times + TMP_JAMP(1755) = TMP_JAMP(1560) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1274) ! used 4 times + TMP_JAMP(1754) = TMP_JAMP(1558) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1141) ! used 4 times + TMP_JAMP(1753) = TMP_JAMP(1558) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1550) ! used 4 times + TMP_JAMP(1752) = TMP_JAMP(1556) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1555) ! used 4 times + TMP_JAMP(1751) = TMP_JAMP(1556) - TMP_JAMP(1554) ! used 4 times + TMP_JAMP(1750) = TMP_JAMP(1555) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1554) ! used 4 times + TMP_JAMP(1749) = TMP_JAMP(1554) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1217) ! used 4 times + TMP_JAMP(1748) = TMP_JAMP(1549) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1548) ! used 4 times + TMP_JAMP(1747) = TMP_JAMP(1549) - TMP_JAMP(1544) ! used 4 times + TMP_JAMP(1746) = TMP_JAMP(1549) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1408) ! used 4 times + TMP_JAMP(1745) = TMP_JAMP(1547) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1541) ! used 4 times + TMP_JAMP(1744) = TMP_JAMP(1547) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1186) ! used 4 times + TMP_JAMP(1743) = TMP_JAMP(1546) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1184) ! used 4 times + TMP_JAMP(1742) = TMP_JAMP(1546) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1541) ! used 4 times + TMP_JAMP(1741) = TMP_JAMP(1546) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1192) ! used 4 times + TMP_JAMP(1740) = TMP_JAMP(1545) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1023) ! used 4 times + TMP_JAMP(1739) = TMP_JAMP(1545) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1410) ! used 4 times + TMP_JAMP(1738) = TMP_JAMP(1544) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1543) ! used 4 times + TMP_JAMP(1737) = TMP_JAMP(1544) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1264) ! used 4 times + TMP_JAMP(1736) = TMP_JAMP(1542) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1270) ! used 4 times + TMP_JAMP(1735) = TMP_JAMP(1542) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1262) ! used 4 times + TMP_JAMP(1734) = TMP_JAMP(1540) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1068) ! used 4 times + TMP_JAMP(1733) = TMP_JAMP(1539) + TMP_JAMP(1535) ! used 4 times + TMP_JAMP(1732) = TMP_JAMP(1536) + TMP_JAMP(1531) ! used 4 times + TMP_JAMP(1731) = TMP_JAMP(1536) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(981) ! used 4 times + TMP_JAMP(1730) = TMP_JAMP(1535) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(963) ! used 4 times + TMP_JAMP(1729) = TMP_JAMP(1534) + TMP_JAMP(1532) ! used 4 times + TMP_JAMP(1728) = TMP_JAMP(1532) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(972) ! used 4 times + TMP_JAMP(1727) = TMP_JAMP(1512) + AMP(985) ! used 4 times + TMP_JAMP(1726) = TMP_JAMP(1503) + AMP(1003) ! used 4 times + TMP_JAMP(1725) = TMP_JAMP(1491) + AMP(994) ! used 4 times + TMP_JAMP(1724) = AMP(1118) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1147) ! used 4 times + TMP_JAMP(1723) = AMP(1061) + AMP(1069) ! used 4 times + TMP_JAMP(1722) = AMP(1043) - AMP(1071) ! used 4 times + TMP_JAMP(1721) = AMP(1147) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1152) ! used 4 times + TMP_JAMP(1720) = AMP(1052) - AMP(1070) ! used 4 times + TMP_JAMP(1719) = AMP(1286) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1304) ! used 4 times + TMP_JAMP(1718) = AMP(1295) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1304) ! used 4 times + TMP_JAMP(1717) = AMP(1001) + AMP(1009) ! used 4 times + TMP_JAMP(1716) = AMP(983) - AMP(1011) ! used 4 times + TMP_JAMP(1715) = AMP(992) - AMP(1010) ! used 4 times + TMP_JAMP(1857) = TMP_JAMP(1833) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1713) ! used 4 times + TMP_JAMP(1856) = TMP_JAMP(1813) + TMP_JAMP(1622) ! used 4 times + TMP_JAMP(1855) = TMP_JAMP(1788) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1622) ! used 4 times + TMP_JAMP(1854) = TMP_JAMP(1782) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1644) ! used 4 times + TMP_JAMP(1853) = TMP_JAMP(1781) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1652) ! used 4 times + TMP_JAMP(1852) = TMP_JAMP(1780) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1645) ! used 4 times + TMP_JAMP(1851) = TMP_JAMP(1779) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1650) ! used 4 times + TMP_JAMP(1850) = TMP_JAMP(1773) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1671) ! used 4 times + TMP_JAMP(1849) = TMP_JAMP(1749) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1644) ! used 4 times + TMP_JAMP(1848) = TMP_JAMP(1741) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1652) ! used 4 times + TMP_JAMP(1847) = TMP_JAMP(1731) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1668) ! used 4 times + TMP_JAMP(1846) = TMP_JAMP(1730) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1651) ! used 4 times + TMP_JAMP(1845) = TMP_JAMP(1721) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1650) ! used 4 times + TMP_JAMP(1844) = TMP_JAMP(1720) - TMP_JAMP(1712) ! used 4 times + TMP_JAMP(1862) = TMP_JAMP(1722) - TMP_JAMP(1714) ! used 3 times + TMP_JAMP(1861) = TMP_JAMP(1670) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1557) ! used 3 times + TMP_JAMP(1860) = TMP_JAMP(1631) - TMP_JAMP(1574) ! used 3 times + TMP_JAMP(1859) = TMP_JAMP(1608) + TMP_JAMP(1479) ! used 3 times + TMP_JAMP(1858) = TMP_JAMP(1595) + AMP(1074) ! used 3 times + TMP_JAMP(1863) = TMP_JAMP(1861) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1761) ! used 3 times + TMP_JAMP(2077) = TMP_JAMP(1863) - TMP_JAMP(1807) ! used 2 times + TMP_JAMP(2076) = TMP_JAMP(1862) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1790) ! used 2 times + TMP_JAMP(2075) = TMP_JAMP(1857) + TMP_JAMP(1828) ! used 2 times + TMP_JAMP(2074) = TMP_JAMP(1857) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1558) ! used 2 times + TMP_JAMP(2073) = TMP_JAMP(1856) - TMP_JAMP(1669) ! used 2 times + TMP_JAMP(2072) = TMP_JAMP(1855) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1695) ! used 2 times + TMP_JAMP(2071) = TMP_JAMP(1854) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1568) ! used 2 times + TMP_JAMP(2070) = TMP_JAMP(1853) + TMP_JAMP(1786) ! used 2 times + TMP_JAMP(2069) = TMP_JAMP(1852) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1831) ! used 2 times + TMP_JAMP(2068) = TMP_JAMP(1852) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1591) ! used 2 times + TMP_JAMP(2067) = TMP_JAMP(1850) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1567) ! used 2 times + TMP_JAMP(2066) = TMP_JAMP(1849) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1555) ! used 2 times + TMP_JAMP(2065) = TMP_JAMP(1848) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1750) ! used 2 times + TMP_JAMP(2064) = TMP_JAMP(1846) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1711) ! used 2 times + TMP_JAMP(2063) = TMP_JAMP(1845) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1647) ! used 2 times + TMP_JAMP(2062) = TMP_JAMP(1844) - TMP_JAMP(1823) ! used 2 times + TMP_JAMP(2061) = TMP_JAMP(1840) - TMP_JAMP(1716) ! used 2 times + TMP_JAMP(2060) = TMP_JAMP(1839) + TMP_JAMP(1710) ! used 2 times + TMP_JAMP(2059) = TMP_JAMP(1839) - TMP_JAMP(1711) ! used 2 times + TMP_JAMP(2058) = TMP_JAMP(1838) + TMP_JAMP(1521) ! used 2 times + TMP_JAMP(2057) = TMP_JAMP(1837) + TMP_JAMP(1734) ! used 2 times + TMP_JAMP(2056) = TMP_JAMP(1836) + TMP_JAMP(1623) ! used 2 times + TMP_JAMP(2055) = TMP_JAMP(1836) + TMP_JAMP(1622) ! used 2 times + TMP_JAMP(2054) = TMP_JAMP(1835) - TMP_JAMP(1825) ! used 2 times + TMP_JAMP(2053) = TMP_JAMP(1835) + TMP_JAMP(1666) ! used 2 times + TMP_JAMP(2052) = TMP_JAMP(1831) + TMP_JAMP(1810) ! used 2 times + TMP_JAMP(2051) = TMP_JAMP(1831) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1556) ! used 2 times + TMP_JAMP(2050) = TMP_JAMP(1830) + TMP_JAMP(1665) ! used 2 times + TMP_JAMP(2049) = TMP_JAMP(1830) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1743) ! used 2 times + TMP_JAMP(2048) = TMP_JAMP(1830) - TMP_JAMP(1641) ! used 2 times + TMP_JAMP(2047) = TMP_JAMP(1828) - TMP_JAMP(1567) ! used 2 times + TMP_JAMP(2046) = TMP_JAMP(1828) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1733) ! used 2 times + TMP_JAMP(2045) = TMP_JAMP(1827) + TMP_JAMP(1726) ! used 2 times + TMP_JAMP(2044) = TMP_JAMP(1825) - TMP_JAMP(1476) ! used 2 times + TMP_JAMP(2043) = TMP_JAMP(1824) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1760) ! used 2 times + TMP_JAMP(2042) = TMP_JAMP(1824) - AMP(1350) ! used 2 times + TMP_JAMP(2041) = TMP_JAMP(1823) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1728) ! used 2 times + TMP_JAMP(2040) = TMP_JAMP(1822) + TMP_JAMP(1591) ! used 2 times + TMP_JAMP(2039) = TMP_JAMP(1822) - TMP_JAMP(1626) ! used 2 times + TMP_JAMP(2038) = TMP_JAMP(1822) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1742) ! used 2 times + TMP_JAMP(2037) = TMP_JAMP(1821) - TMP_JAMP(1626) ! used 2 times + TMP_JAMP(2036) = TMP_JAMP(1821) + TMP_JAMP(1555) ! used 2 times + TMP_JAMP(2035) = TMP_JAMP(1821) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1729) ! used 2 times + TMP_JAMP(2034) = TMP_JAMP(1820) + TMP_JAMP(1725) ! used 2 times + TMP_JAMP(2033) = TMP_JAMP(1819) - TMP_JAMP(1669) ! used 2 times + TMP_JAMP(2032) = TMP_JAMP(1819) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1732) ! used 2 times + TMP_JAMP(2031) = TMP_JAMP(1818) + TMP_JAMP(1727) ! used 2 times + TMP_JAMP(2030) = TMP_JAMP(1815) + TMP_JAMP(1719) ! used 2 times + TMP_JAMP(2029) = TMP_JAMP(1814) - TMP_JAMP(1718) ! used 2 times + TMP_JAMP(2028) = TMP_JAMP(1813) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1569) ! used 2 times + TMP_JAMP(2027) = TMP_JAMP(1812) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1760) ! used 2 times + TMP_JAMP(2026) = TMP_JAMP(1811) + TMP_JAMP(1757) ! used 2 times + TMP_JAMP(2025) = TMP_JAMP(1809) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1795) ! used 2 times + TMP_JAMP(2024) = TMP_JAMP(1808) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1795) ! used 2 times + TMP_JAMP(2023) = TMP_JAMP(1805) - TMP_JAMP(1676) ! used 2 times + TMP_JAMP(2022) = TMP_JAMP(1803) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1787) ! used 2 times + TMP_JAMP(2021) = TMP_JAMP(1800) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(980) ! used 2 times + TMP_JAMP(2020) = TMP_JAMP(1799) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1218) ! used 2 times + TMP_JAMP(2019) = TMP_JAMP(1798) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1751) ! used 2 times + TMP_JAMP(2018) = TMP_JAMP(1795) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1688) ! used 2 times + TMP_JAMP(2017) = TMP_JAMP(1794) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1673) ! used 2 times + TMP_JAMP(2016) = TMP_JAMP(1793) - TMP_JAMP(1774) ! used 2 times + TMP_JAMP(2015) = TMP_JAMP(1792) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1699) ! used 2 times + TMP_JAMP(2014) = TMP_JAMP(1789) - AMP(1040) ! used 2 times + TMP_JAMP(2013) = TMP_JAMP(1787) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1677) ! used 2 times + TMP_JAMP(2012) = TMP_JAMP(1787) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1686) ! used 2 times + TMP_JAMP(2011) = TMP_JAMP(1784) + TMP_JAMP(1769) ! used 2 times + TMP_JAMP(2010) = TMP_JAMP(1784) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1658) ! used 2 times + TMP_JAMP(2009) = TMP_JAMP(1783) - AMP(1205) ! used 2 times + TMP_JAMP(2008) = TMP_JAMP(1779) + TMP_JAMP(1597) ! used 2 times + TMP_JAMP(2007) = TMP_JAMP(1778) - TMP_JAMP(1775) ! used 2 times + TMP_JAMP(2006) = TMP_JAMP(1776) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1636) ! used 2 times + TMP_JAMP(2005) = TMP_JAMP(1776) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1518) ! used 2 times + TMP_JAMP(2004) = TMP_JAMP(1772) + TMP_JAMP(1584) ! used 2 times + TMP_JAMP(2003) = TMP_JAMP(1771) + AMP(1030) ! used 2 times + TMP_JAMP(2002) = TMP_JAMP(1769) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1719) ! used 2 times + TMP_JAMP(2001) = TMP_JAMP(1767) + TMP_JAMP(1736) ! used 2 times + TMP_JAMP(2000) = TMP_JAMP(1767) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1718) ! used 2 times + TMP_JAMP(1999) = TMP_JAMP(1765) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1638) ! used 2 times + TMP_JAMP(1998) = TMP_JAMP(1764) + TMP_JAMP(1760) ! used 2 times + TMP_JAMP(1997) = TMP_JAMP(1763) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1674) ! used 2 times + TMP_JAMP(1996) = TMP_JAMP(1762) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1672) ! used 2 times + TMP_JAMP(1995) = TMP_JAMP(1758) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1280) ! used 2 times + TMP_JAMP(1994) = TMP_JAMP(1757) + AMP(1172) ! used 2 times + TMP_JAMP(1993) = TMP_JAMP(1756) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1612) ! used 2 times + TMP_JAMP(1992) = TMP_JAMP(1756) + AMP(1283) ! used 2 times + TMP_JAMP(1991) = TMP_JAMP(1755) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1562) ! used 2 times + TMP_JAMP(1990) = TMP_JAMP(1754) - AMP(1116) ! used 2 times + TMP_JAMP(1989) = TMP_JAMP(1753) + AMP(1140) ! used 2 times + TMP_JAMP(1988) = TMP_JAMP(1752) + AMP(1218) ! used 2 times + TMP_JAMP(1987) = TMP_JAMP(1752) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1677) ! used 2 times + TMP_JAMP(1986) = TMP_JAMP(1746) + TMP_JAMP(1744) ! used 2 times + TMP_JAMP(1985) = TMP_JAMP(1746) - TMP_JAMP(1737) ! used 2 times + TMP_JAMP(1984) = TMP_JAMP(1745) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1660) ! used 2 times + TMP_JAMP(1983) = TMP_JAMP(1744) - AMP(1193) ! used 2 times + TMP_JAMP(1982) = TMP_JAMP(1740) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1723) ! used 2 times + TMP_JAMP(1981) = TMP_JAMP(1740) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1734) ! used 2 times + TMP_JAMP(1980) = TMP_JAMP(1739) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1548) ! used 2 times + TMP_JAMP(1979) = TMP_JAMP(1738) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1620) ! used 2 times + TMP_JAMP(1978) = TMP_JAMP(1737) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1653) ! used 2 times + TMP_JAMP(1977) = TMP_JAMP(1736) + AMP(1271) ! used 2 times + TMP_JAMP(1976) = TMP_JAMP(1735) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1625) ! used 2 times + TMP_JAMP(1975) = TMP_JAMP(1735) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1543) ! used 2 times + TMP_JAMP(1974) = TMP_JAMP(1734) - TMP_JAMP(1705) ! used 2 times + TMP_JAMP(1973) = TMP_JAMP(1728) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1630) ! used 2 times + TMP_JAMP(1972) = TMP_JAMP(1727) - TMP_JAMP(1529) ! used 2 times + TMP_JAMP(1971) = TMP_JAMP(1727) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(987) ! used 2 times + TMP_JAMP(1970) = TMP_JAMP(1726) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1005) ! used 2 times + TMP_JAMP(1969) = TMP_JAMP(1725) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(996) ! used 2 times + TMP_JAMP(1968) = TMP_JAMP(1723) - TMP_JAMP(1700) ! used 2 times + TMP_JAMP(1967) = TMP_JAMP(1717) - TMP_JAMP(1711) ! used 2 times + TMP_JAMP(1966) = TMP_JAMP(1717) + TMP_JAMP(1716) ! used 2 times + TMP_JAMP(1965) = TMP_JAMP(1716) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(979) ! used 2 times + TMP_JAMP(1964) = TMP_JAMP(1715) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(970) ! used 2 times + TMP_JAMP(1963) = TMP_JAMP(1715) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(991) ! used 2 times + TMP_JAMP(1962) = TMP_JAMP(1712) - TMP_JAMP(1692) ! used 2 times + TMP_JAMP(1961) = TMP_JAMP(1707) + TMP_JAMP(1687) ! used 2 times + TMP_JAMP(1960) = TMP_JAMP(1706) - TMP_JAMP(1479) ! used 2 times + TMP_JAMP(1959) = TMP_JAMP(1705) - TMP_JAMP(1526) ! used 2 times + TMP_JAMP(1958) = TMP_JAMP(1703) + TMP_JAMP(1687) ! used 2 times + TMP_JAMP(1957) = TMP_JAMP(1702) - TMP_JAMP(1476) ! used 2 times + TMP_JAMP(1956) = TMP_JAMP(1701) - TMP_JAMP(1651) ! used 2 times + TMP_JAMP(1955) = TMP_JAMP(1692) - TMP_JAMP(1624) ! used 2 times + TMP_JAMP(1954) = TMP_JAMP(1690) + TMP_JAMP(1629) ! used 2 times + TMP_JAMP(1953) = TMP_JAMP(1688) - AMP(1326) ! used 2 times + TMP_JAMP(1952) = TMP_JAMP(1686) - AMP(1326) ! used 2 times + TMP_JAMP(1951) = TMP_JAMP(1681) + TMP_JAMP(1530) ! used 2 times + TMP_JAMP(1950) = TMP_JAMP(1680) + TMP_JAMP(1656) ! used 2 times + TMP_JAMP(1949) = TMP_JAMP(1678) + TMP_JAMP(1520) ! used 2 times + TMP_JAMP(1948) = TMP_JAMP(1678) + TMP_JAMP(1643) ! used 2 times + TMP_JAMP(1947) = TMP_JAMP(1677) + TMP_JAMP(1663) ! used 2 times + TMP_JAMP(1946) = TMP_JAMP(1675) + TMP_JAMP(1624) ! used 2 times + TMP_JAMP(1945) = TMP_JAMP(1670) + ((-0.000000000000000D+00 $ ,1.000000000000000D+00)) * AMP(1127) ! used 2 times - TMP_JAMP(2719) = TMP_JAMP(2508) - TMP_JAMP(2506) ! used 2 times - TMP_JAMP(2718) = TMP_JAMP(2502) - AMP(1451) ! used 2 times - TMP_JAMP(2717) = TMP_JAMP(2499) + TMP_JAMP(2495) ! used 2 times - TMP_JAMP(2716) = TMP_JAMP(2487) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(1719) ! used 2 times - TMP_JAMP(2715) = TMP_JAMP(2488) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(1070) ! used 2 times - TMP_JAMP(2714) = TMP_JAMP(2490) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(2489) ! used 2 times - TMP_JAMP(2713) = TMP_JAMP(2472) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(2467) ! used 2 times - TMP_JAMP(2712) = TMP_JAMP(2475) - TMP_JAMP(2474) ! used 2 times - TMP_JAMP(2711) = TMP_JAMP(2413) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(2412) ! used 2 times - TMP_JAMP(2710) = TMP_JAMP(2395) - AMP(582) ! used 2 times - TMP_JAMP(2709) = TMP_JAMP(2375) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(912) ! used 2 times - TMP_JAMP(2708) = TMP_JAMP(2373) - TMP_JAMP(2371) ! used 2 times - TMP_JAMP(2707) = TMP_JAMP(2353) - AMP(1511) ! used 2 times - TMP_JAMP(2706) = TMP_JAMP(2345) + AMP(1107) ! used 2 times - TMP_JAMP(2705) = TMP_JAMP(2330) + AMP(1275) ! used 2 times - TMP_JAMP(2704) = TMP_JAMP(2326) - TMP_JAMP(2325) ! used 2 times - TMP_JAMP(2703) = TMP_JAMP(2329) + TMP_JAMP(2327) ! used 2 times - TMP_JAMP(2702) = TMP_JAMP(2308) + AMP(364) ! used 2 times - TMP_JAMP(2701) = TMP_JAMP(2307) + AMP(1021) ! used 2 times - TMP_JAMP(2700) = TMP_JAMP(2287) - TMP_JAMP(2285) ! used 2 times - TMP_JAMP(2699) = TMP_JAMP(2269) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(46) ! used 2 times - TMP_JAMP(2698) = TMP_JAMP(2261) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(2257) ! used 2 times - TMP_JAMP(2697) = TMP_JAMP(2256) - TMP_JAMP(2255) ! used 2 times - TMP_JAMP(2696) = TMP_JAMP(2244) - TMP_JAMP(1407) ! used 2 times - TMP_JAMP(2695) = TMP_JAMP(2243) - TMP_JAMP(2242) ! used 2 times - TMP_JAMP(2694) = TMP_JAMP(2236) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(2235) ! used 2 times - TMP_JAMP(2693) = TMP_JAMP(2231) - TMP_JAMP(2230) ! used 2 times - TMP_JAMP(2692) = TMP_JAMP(2225) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1140) ! used 2 times - TMP_JAMP(2691) = TMP_JAMP(2227) - TMP_JAMP(2226) ! used 2 times - TMP_JAMP(2690) = TMP_JAMP(2211) - AMP(1185) ! used 2 times - TMP_JAMP(2689) = TMP_JAMP(2213) + TMP_JAMP(2212) ! used 2 times - TMP_JAMP(2688) = TMP_JAMP(2205) - TMP_JAMP(2202) ! used 2 times - TMP_JAMP(2687) = TMP_JAMP(2200) + AMP(615) ! used 2 times - TMP_JAMP(2686) = TMP_JAMP(2192) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(2191) ! used 2 times - TMP_JAMP(2685) = TMP_JAMP(2182) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(2181) ! used 2 times - TMP_JAMP(2684) = TMP_JAMP(2175) + TMP_JAMP(2170) ! used 2 times - TMP_JAMP(2683) = TMP_JAMP(2169) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(2165) ! used 2 times - TMP_JAMP(2682) = TMP_JAMP(2155) + ((-0.000000000000000D+00 + TMP_JAMP(1944) = TMP_JAMP(1668) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1039) ! used 2 times + TMP_JAMP(1943) = TMP_JAMP(1663) - TMP_JAMP(1625) ! used 2 times + TMP_JAMP(1942) = TMP_JAMP(1663) + TMP_JAMP(1518) ! used 2 times + TMP_JAMP(1941) = TMP_JAMP(1661) + TMP_JAMP(1526) ! used 2 times + TMP_JAMP(1940) = TMP_JAMP(1661) + AMP(1172) ! used 2 times + TMP_JAMP(1939) = TMP_JAMP(1658) - TMP_JAMP(1592) ! used 2 times + TMP_JAMP(1938) = TMP_JAMP(1657) - AMP(1376) ! used 2 times + TMP_JAMP(1937) = TMP_JAMP(1653) - TMP_JAMP(1577) ! used 2 times + TMP_JAMP(1936) = TMP_JAMP(1649) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1150) ! used 2 times + TMP_JAMP(1935) = TMP_JAMP(1648) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1549) ! used 2 times + TMP_JAMP(1934) = TMP_JAMP(1645) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1547) ! used 2 times + TMP_JAMP(1933) = TMP_JAMP(1643) + TMP_JAMP(1582) ! used 2 times + TMP_JAMP(1932) = TMP_JAMP(1637) + TMP_JAMP(1632) ! used 2 times + TMP_JAMP(1931) = TMP_JAMP(1634) + TMP_JAMP(1627) ! used 2 times + TMP_JAMP(1930) = TMP_JAMP(1630) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1031) ! used 2 times + TMP_JAMP(1929) = TMP_JAMP(1628) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1228) ! used 2 times + TMP_JAMP(1928) = TMP_JAMP(1624) + TMP_JAMP(1616) ! used 2 times + TMP_JAMP(1927) = TMP_JAMP(1620) + TMP_JAMP(1551) ! used 2 times + TMP_JAMP(1926) = TMP_JAMP(1620) + TMP_JAMP(1615) ! used 2 times + TMP_JAMP(1925) = TMP_JAMP(1618) + TMP_JAMP(1613) ! used 2 times + TMP_JAMP(1924) = TMP_JAMP(1617) - AMP(1376) ! used 2 times + TMP_JAMP(1923) = TMP_JAMP(1617) - TMP_JAMP(1614) ! used 2 times + TMP_JAMP(1922) = TMP_JAMP(1613) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1564) ! used 2 times + TMP_JAMP(1921) = TMP_JAMP(1612) + TMP_JAMP(1543) ! used 2 times + TMP_JAMP(1920) = TMP_JAMP(1611) - TMP_JAMP(1548) ! used 2 times + TMP_JAMP(1919) = TMP_JAMP(1609) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(961) ! used 2 times + TMP_JAMP(1918) = TMP_JAMP(1609) - TMP_JAMP(1530) ! used 2 times + TMP_JAMP(1917) = TMP_JAMP(1598) - AMP(1128) ! used 2 times + TMP_JAMP(1916) = TMP_JAMP(1597) + AMP(1060) ! used 2 times + TMP_JAMP(1915) = TMP_JAMP(1592) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1539) ! used 2 times + TMP_JAMP(1914) = TMP_JAMP(1591) + TMP_JAMP(1577) ! used 2 times + TMP_JAMP(1913) = TMP_JAMP(1591) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1197) ! used 2 times + TMP_JAMP(1912) = TMP_JAMP(1590) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1202) ! used 2 times + TMP_JAMP(1911) = TMP_JAMP(1586) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1121) ! used 2 times + TMP_JAMP(1910) = TMP_JAMP(1586) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1119) ! used 2 times + TMP_JAMP(1909) = TMP_JAMP(1584) + AMP(1051) ! used 2 times + TMP_JAMP(1908) = TMP_JAMP(1583) + AMP(1073) ! used 2 times + TMP_JAMP(1907) = TMP_JAMP(1577) + TMP_JAMP(1510) ! used 2 times + TMP_JAMP(1906) = TMP_JAMP(1575) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1287) ! used 2 times + TMP_JAMP(1905) = TMP_JAMP(1575) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1289) ! used 2 times + TMP_JAMP(1904) = TMP_JAMP(1574) + TMP_JAMP(1519) ! used 2 times + TMP_JAMP(1903) = TMP_JAMP(1572) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1296) ! used 2 times + TMP_JAMP(1902) = TMP_JAMP(1572) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1298) ! used 2 times + TMP_JAMP(1901) = TMP_JAMP(1569) + AMP(1042) ! used 2 times + TMP_JAMP(1900) = TMP_JAMP(1563) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1539) ! used 2 times + TMP_JAMP(1899) = TMP_JAMP(1562) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1275) ! used 2 times + TMP_JAMP(1898) = TMP_JAMP(1559) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1107) ! used 2 times + TMP_JAMP(1897) = TMP_JAMP(1553) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1058) ! used 2 times + TMP_JAMP(1896) = TMP_JAMP(1551) - TMP_JAMP(1529) ! used 2 times + TMP_JAMP(1895) = TMP_JAMP(1550) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1115) ! used 2 times + TMP_JAMP(1894) = TMP_JAMP(1550) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1142) ! used 2 times + TMP_JAMP(1893) = TMP_JAMP(1548) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1021) ! used 2 times + TMP_JAMP(1892) = TMP_JAMP(1548) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1409) ! used 2 times + TMP_JAMP(1891) = TMP_JAMP(1543) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1263) ! used 2 times + TMP_JAMP(1890) = TMP_JAMP(1541) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1185) ! used 2 times + TMP_JAMP(1889) = TMP_JAMP(1539) - AMP(962) ! used 2 times + TMP_JAMP(1888) = TMP_JAMP(1539) + AMP(1000) ! used 2 times + TMP_JAMP(1887) = TMP_JAMP(1534) - AMP(971) ! used 2 times + TMP_JAMP(1886) = TMP_JAMP(1512) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1047) ! used 2 times + TMP_JAMP(1885) = TMP_JAMP(1507) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1022) ! used 2 times + TMP_JAMP(1884) = TMP_JAMP(1505) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1199) ! used 2 times + TMP_JAMP(1883) = TMP_JAMP(1505) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1220) ! used 2 times + TMP_JAMP(1882) = TMP_JAMP(1504) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1211) ! used 2 times + TMP_JAMP(1881) = TMP_JAMP(1504) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1187) ! used 2 times + TMP_JAMP(1880) = TMP_JAMP(1503) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1065) ! used 2 times + TMP_JAMP(1879) = TMP_JAMP(1501) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1412) ! used 2 times + TMP_JAMP(1878) = TMP_JAMP(1492) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1133) ! used 2 times + TMP_JAMP(1877) = TMP_JAMP(1491) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1056) ! used 2 times + TMP_JAMP(1876) = TMP_JAMP(1481) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1265) ! used 2 times + TMP_JAMP(1875) = TMP_JAMP(1480) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1277) ! used 2 times + TMP_JAMP(1874) = TMP_JAMP(1476) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(982) ! used 2 times + TMP_JAMP(1873) = AMP(1374) + AMP(1376) ! used 2 times + TMP_JAMP(1872) = AMP(1206) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1210) ! used 2 times + TMP_JAMP(1871) = AMP(1124) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1352) ! used 2 times + TMP_JAMP(1870) = AMP(1284) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1288) ! used 2 times + TMP_JAMP(1869) = AMP(1106) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1109) ! used 2 times + TMP_JAMP(1868) = AMP(1209) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1210) ! used 2 times + TMP_JAMP(1867) = AMP(1094) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1292) ! used 2 times + TMP_JAMP(1866) = AMP(1272) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1297) ! used 2 times + TMP_JAMP(1865) = AMP(1194) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1219) ! used 2 times + TMP_JAMP(1864) = AMP(1131) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1132) ! used 2 times + TMP_JAMP(2141) = TMP_JAMP(2077) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1990) ! used 2 times + TMP_JAMP(2140) = TMP_JAMP(2076) - TMP_JAMP(1944) ! used 2 times + TMP_JAMP(2139) = TMP_JAMP(2072) + TMP_JAMP(1858) ! used 2 times + TMP_JAMP(2138) = TMP_JAMP(2071) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1882) ! used 2 times + TMP_JAMP(2137) = TMP_JAMP(2070) - TMP_JAMP(1872) ! used 2 times + TMP_JAMP(2136) = TMP_JAMP(2065) - TMP_JAMP(1983) ! used 2 times + TMP_JAMP(2135) = TMP_JAMP(2062) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(2003) ! used 2 times + TMP_JAMP(2134) = TMP_JAMP(2054) + TMP_JAMP(1960) ! used 2 times + TMP_JAMP(2133) = TMP_JAMP(2053) - TMP_JAMP(1924) ! used 2 times + TMP_JAMP(2132) = TMP_JAMP(2051) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1849) ! used 2 times + TMP_JAMP(2131) = TMP_JAMP(2048) + TMP_JAMP(1927) ! used 2 times + TMP_JAMP(2130) = TMP_JAMP(2046) + TMP_JAMP(1970) ! used 2 times + TMP_JAMP(2129) = TMP_JAMP(2041) - TMP_JAMP(1964) ! used 2 times + TMP_JAMP(2128) = TMP_JAMP(2035) + TMP_JAMP(1969) ! used 2 times + TMP_JAMP(2127) = TMP_JAMP(2032) + TMP_JAMP(1971) ! used 2 times + TMP_JAMP(2126) = TMP_JAMP(2030) - TMP_JAMP(1905) ! used 2 times + TMP_JAMP(2125) = TMP_JAMP(2029) + TMP_JAMP(1902) ! used 2 times + TMP_JAMP(2124) = TMP_JAMP(2024) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(2013) ! used 2 times + TMP_JAMP(2123) = TMP_JAMP(2021) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1847) ! used 2 times + TMP_JAMP(2122) = TMP_JAMP(2017) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1911) ! used 2 times + TMP_JAMP(2121) = TMP_JAMP(2016) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1945) ! used 2 times + TMP_JAMP(2120) = TMP_JAMP(2015) - TMP_JAMP(1851) ! used 2 times + TMP_JAMP(2119) = TMP_JAMP(2014) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1832) ! used 2 times + TMP_JAMP(2118) = TMP_JAMP(2009) - TMP_JAMP(1853) ! used 2 times + TMP_JAMP(2117) = TMP_JAMP(2007) + TMP_JAMP(1917) ! used 2 times + TMP_JAMP(2116) = TMP_JAMP(2004) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1877) ! used 2 times + TMP_JAMP(2115) = TMP_JAMP(2002) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1926) ! used 2 times + TMP_JAMP(2114) = TMP_JAMP(2000) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1923) ! used 2 times + TMP_JAMP(2113) = TMP_JAMP(1996) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1869) ! used 2 times + TMP_JAMP(2112) = TMP_JAMP(1993) - TMP_JAMP(1870) ! used 2 times + TMP_JAMP(2111) = TMP_JAMP(1991) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1875) ! used 2 times + TMP_JAMP(2110) = TMP_JAMP(1989) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1806) ! used 2 times + TMP_JAMP(2109) = TMP_JAMP(1982) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1956) ! used 2 times + TMP_JAMP(2108) = TMP_JAMP(1980) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1879) ! used 2 times + TMP_JAMP(2107) = TMP_JAMP(1976) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1925) ! used 2 times + TMP_JAMP(2106) = TMP_JAMP(1975) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1876) ! used 2 times + TMP_JAMP(2105) = TMP_JAMP(1973) + TMP_JAMP(1887) ! used 2 times + TMP_JAMP(2104) = TMP_JAMP(1965) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1847) ! used 2 times + TMP_JAMP(2103) = TMP_JAMP(1955) - TMP_JAMP(1896) ! used 2 times + TMP_JAMP(2102) = TMP_JAMP(1951) + TMP_JAMP(1704) ! used 2 times + TMP_JAMP(2101) = TMP_JAMP(1949) - TMP_JAMP(1859) ! used 2 times + TMP_JAMP(2100) = TMP_JAMP(1946) + TMP_JAMP(1904) ! used 2 times + TMP_JAMP(2099) = TMP_JAMP(1943) + TMP_JAMP(1907) ! used 2 times + TMP_JAMP(2098) = TMP_JAMP(1942) + TMP_JAMP(1680) ! used 2 times + TMP_JAMP(2097) = TMP_JAMP(1935) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1739) ! used 2 times + TMP_JAMP(2096) = TMP_JAMP(1931) + TMP_JAMP(1646) ! used 2 times + TMP_JAMP(2095) = TMP_JAMP(1930) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1771) ! used 2 times + TMP_JAMP(2094) = TMP_JAMP(1922) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1755) ! used 2 times + TMP_JAMP(2093) = TMP_JAMP(1921) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1866) ! used 2 times + TMP_JAMP(2092) = TMP_JAMP(1916) + TMP_JAMP(1792) ! used 2 times + TMP_JAMP(2091) = TMP_JAMP(1909) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1844) ! used 2 times + TMP_JAMP(2090) = TMP_JAMP(1908) + TMP_JAMP(1772) ! used 2 times + TMP_JAMP(2089) = TMP_JAMP(1906) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1770) ! used 2 times + TMP_JAMP(2088) = TMP_JAMP(1903) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1768) ! used 2 times + TMP_JAMP(2087) = TMP_JAMP(1893) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1791) ! used 2 times + TMP_JAMP(2086) = TMP_JAMP(1889) + TMP_JAMP(1846) ! used 2 times + TMP_JAMP(2085) = TMP_JAMP(1888) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1717) ! used 2 times + TMP_JAMP(2084) = TMP_JAMP(1886) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1855) ! used 2 times + TMP_JAMP(2083) = TMP_JAMP(1885) - TMP_JAMP(1829) ! used 2 times + TMP_JAMP(2082) = TMP_JAMP(1881) - TMP_JAMP(1826) ! used 2 times + TMP_JAMP(2081) = TMP_JAMP(1880) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1845) ! used 2 times + TMP_JAMP(2080) = TMP_JAMP(1871) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1581) ! used 2 times + TMP_JAMP(2079) = TMP_JAMP(1867) + TMP_JAMP(1552) ! used 2 times + TMP_JAMP(2078) = TMP_JAMP(1865) - TMP_JAMP(1848) ! used 2 times + TMP_JAMP(2153) = TMP_JAMP(2109) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(2087) ! used 2 times + TMP_JAMP(2152) = TMP_JAMP(2101) + TMP_JAMP(1961) ! used 2 times + TMP_JAMP(2151) = TMP_JAMP(2097) + TMP_JAMP(1950) ! used 2 times + TMP_JAMP(2150) = TMP_JAMP(2094) - TMP_JAMP(1928) ! used 2 times + TMP_JAMP(2149) = TMP_JAMP(2093) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(2001) ! used 2 times + TMP_JAMP(2148) = TMP_JAMP(2092) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1968) ! used 2 times + TMP_JAMP(2147) = TMP_JAMP(2090) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1954) ! used 2 times + TMP_JAMP(2146) = TMP_JAMP(2084) + TMP_JAMP(2028) ! used 2 times + TMP_JAMP(2145) = TMP_JAMP(2083) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1981) ! used 2 times + TMP_JAMP(2144) = TMP_JAMP(2082) - TMP_JAMP(2038) ! used 2 times + TMP_JAMP(2143) = TMP_JAMP(2081) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(2008) ! used 2 times + TMP_JAMP(2142) = TMP_JAMP(2078) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(2019) ! used 2 times + TMP_JAMP(2225) = AMP(1817) + AMP(1824) ! used 16 times + TMP_JAMP(2224) = AMP(1811) + AMP(1822) ! used 16 times + TMP_JAMP(2223) = AMP(1816) + AMP(1821) ! used 16 times + TMP_JAMP(2222) = AMP(1810) + AMP(1819) ! used 16 times + TMP_JAMP(2221) = AMP(1493) + AMP(1497) ! used 16 times + TMP_JAMP(2220) = AMP(1487) + AMP(1495) ! used 16 times + TMP_JAMP(2219) = AMP(1492) + AMP(1503) ! used 16 times + TMP_JAMP(2218) = AMP(1486) + AMP(1501) ! used 16 times + TMP_JAMP(2217) = AMP(1683) + AMP(1689) ! used 16 times + TMP_JAMP(2216) = AMP(1677) + AMP(1687) ! used 16 times + TMP_JAMP(2215) = AMP(1681) + AMP(1686) ! used 16 times + TMP_JAMP(2214) = AMP(1675) + AMP(1684) ! used 16 times + TMP_JAMP(2213) = AMP(1490) + AMP(1496) ! used 16 times + TMP_JAMP(2212) = AMP(1489) + AMP(1502) ! used 16 times + TMP_JAMP(2211) = AMP(1871) + AMP(1878) ! used 16 times + TMP_JAMP(2210) = AMP(1865) + AMP(1876) ! used 16 times + TMP_JAMP(2209) = AMP(1814) + AMP(1823) ! used 16 times + TMP_JAMP(2208) = AMP(1813) + AMP(1820) ! used 16 times + TMP_JAMP(2207) = AMP(1870) + AMP(1875) ! used 16 times + TMP_JAMP(2206) = AMP(1864) + AMP(1873) ! used 16 times + TMP_JAMP(2205) = AMP(1548) + AMP(1554) ! used 16 times + TMP_JAMP(2204) = AMP(1542) + AMP(1552) ! used 16 times + TMP_JAMP(2203) = AMP(1547) + AMP(1551) ! used 16 times + TMP_JAMP(2202) = AMP(1541) + AMP(1549) ! used 16 times + TMP_JAMP(2201) = AMP(1791) + AMP(1797) ! used 16 times + TMP_JAMP(2200) = AMP(1785) + AMP(1795) ! used 16 times + TMP_JAMP(2199) = AMP(1782) - AMP(1790) ! used 16 times + TMP_JAMP(2198) = AMP(1780) - AMP(1784) ! used 16 times + TMP_JAMP(2197) = AMP(1680) + AMP(1688) ! used 16 times + TMP_JAMP(2196) = AMP(1678) + AMP(1685) ! used 16 times + TMP_JAMP(2195) = AMP(1789) + AMP(1794) ! used 16 times + TMP_JAMP(2194) = AMP(1783) + AMP(1792) ! used 16 times + TMP_JAMP(2193) = AMP(1545) + AMP(1553) ! used 16 times + TMP_JAMP(2192) = AMP(1544) + AMP(1550) ! used 16 times + TMP_JAMP(2191) = AMP(1546) + AMP(1557) ! used 16 times + TMP_JAMP(2190) = AMP(1540) + AMP(1555) ! used 16 times + TMP_JAMP(2189) = AMP(1543) + AMP(1556) ! used 16 times + TMP_JAMP(2188) = AMP(1844) + AMP(1851) ! used 16 times + TMP_JAMP(2187) = AMP(1838) + AMP(1849) ! used 16 times + TMP_JAMP(2186) = AMP(1843) + AMP(1848) ! used 16 times + TMP_JAMP(2185) = AMP(1837) + AMP(1846) ! used 16 times + TMP_JAMP(2184) = AMP(1494) + AMP(1500) ! used 16 times + TMP_JAMP(2183) = AMP(1488) + AMP(1498) ! used 16 times + TMP_JAMP(2182) = AMP(1737) + AMP(1743) ! used 16 times + TMP_JAMP(2181) = AMP(1731) + AMP(1741) ! used 16 times + TMP_JAMP(2180) = AMP(1728) - AMP(1736) ! used 16 times + TMP_JAMP(2179) = AMP(1726) - AMP(1730) ! used 16 times + TMP_JAMP(2178) = AMP(1735) + AMP(1740) ! used 16 times + TMP_JAMP(2177) = AMP(1729) + AMP(1738) ! used 16 times + TMP_JAMP(2176) = AMP(1491) + AMP(1499) ! used 16 times + TMP_JAMP(2175) = AMP(1868) + AMP(1877) ! used 16 times + TMP_JAMP(2174) = AMP(1674) - AMP(1682) ! used 16 times + TMP_JAMP(2173) = AMP(1672) - AMP(1676) ! used 16 times + TMP_JAMP(2172) = AMP(1867) + AMP(1874) ! used 16 times + TMP_JAMP(2171) = AMP(1673) - AMP(1679) ! used 16 times + TMP_JAMP(2170) = AMP(1841) + AMP(1850) ! used 16 times + TMP_JAMP(2169) = AMP(1840) + AMP(1847) ! used 16 times + TMP_JAMP(2168) = AMP(1602) + AMP(1608) ! used 16 times + TMP_JAMP(2167) = AMP(1596) + AMP(1606) ! used 16 times + TMP_JAMP(2166) = AMP(1600) + AMP(1611) ! used 16 times + TMP_JAMP(2165) = AMP(1594) + AMP(1609) ! used 16 times + TMP_JAMP(2164) = AMP(1601) + AMP(1605) ! used 16 times + TMP_JAMP(2163) = AMP(1595) + AMP(1603) ! used 16 times + TMP_JAMP(2162) = AMP(1788) + AMP(1796) ! used 16 times + TMP_JAMP(2161) = AMP(1781) - AMP(1787) ! used 16 times + TMP_JAMP(2160) = AMP(1786) + AMP(1793) ! used 16 times + TMP_JAMP(2159) = AMP(1734) + AMP(1742) ! used 16 times + TMP_JAMP(2158) = AMP(1727) - AMP(1733) ! used 16 times + TMP_JAMP(2157) = AMP(1732) + AMP(1739) ! used 16 times + TMP_JAMP(2156) = AMP(1599) + AMP(1607) ! used 16 times + TMP_JAMP(2155) = AMP(1597) + AMP(1610) ! used 16 times + TMP_JAMP(2154) = AMP(1598) + AMP(1604) ! used 16 times + TMP_JAMP(2380) = TMP_JAMP(2225) - TMP_JAMP(2224) ! used 8 times + TMP_JAMP(2379) = TMP_JAMP(2225) + TMP_JAMP(2209) ! used 8 times + TMP_JAMP(2378) = TMP_JAMP(2224) + TMP_JAMP(2209) ! used 8 times + TMP_JAMP(2377) = TMP_JAMP(2223) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1827) ! used 8 times + TMP_JAMP(2376) = TMP_JAMP(2223) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1833) ! used 8 times + TMP_JAMP(2375) = TMP_JAMP(2222) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1825) ! used 8 times + TMP_JAMP(2374) = TMP_JAMP(2222) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1831) ! used 8 times + TMP_JAMP(2373) = TMP_JAMP(2221) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1518) ! used 8 times + TMP_JAMP(2372) = TMP_JAMP(2221) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1533) ! used 8 times + TMP_JAMP(2371) = TMP_JAMP(2220) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1516) ! used 8 times + TMP_JAMP(2370) = TMP_JAMP(2220) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1531) ! used 8 times + TMP_JAMP(2369) = TMP_JAMP(2219) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1539) ! used 8 times + TMP_JAMP(2368) = TMP_JAMP(2219) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1536) ! used 8 times + TMP_JAMP(2367) = TMP_JAMP(2218) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1537) ! used 8 times + TMP_JAMP(2366) = TMP_JAMP(2218) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1534) ! used 8 times + TMP_JAMP(2365) = TMP_JAMP(2217) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1662) ! used 8 times + TMP_JAMP(2364) = TMP_JAMP(2217) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1653) ! used 8 times + TMP_JAMP(2363) = TMP_JAMP(2216) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1660) ! used 8 times + TMP_JAMP(2362) = TMP_JAMP(2216) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1651) ! used 8 times + TMP_JAMP(2361) = TMP_JAMP(2215) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1692) ! used 8 times + TMP_JAMP(2360) = TMP_JAMP(2215) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1698) ! used 8 times + TMP_JAMP(2359) = TMP_JAMP(2214) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1690) ! used 8 times + TMP_JAMP(2358) = TMP_JAMP(2214) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1696) ! used 8 times + TMP_JAMP(2357) = TMP_JAMP(2213) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1517) ! used 8 times + TMP_JAMP(2356) = TMP_JAMP(2213) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1532) ! used 8 times + TMP_JAMP(2355) = TMP_JAMP(2212) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1538) ! used 8 times + TMP_JAMP(2354) = TMP_JAMP(2212) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1535) ! used 8 times + TMP_JAMP(2353) = TMP_JAMP(2211) - TMP_JAMP(2210) ! used 8 times + TMP_JAMP(2352) = TMP_JAMP(2211) + TMP_JAMP(2175) ! used 8 times + TMP_JAMP(2351) = TMP_JAMP(2210) + TMP_JAMP(2175) ! used 8 times + TMP_JAMP(2350) = TMP_JAMP(2208) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1826) ! used 8 times + TMP_JAMP(2349) = TMP_JAMP(2208) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1832) ! used 8 times + TMP_JAMP(2348) = TMP_JAMP(2207) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1887) ! used 8 times + TMP_JAMP(2347) = TMP_JAMP(2207) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1881) ! used 8 times + TMP_JAMP(2346) = TMP_JAMP(2206) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1885) ! used 8 times + TMP_JAMP(2345) = TMP_JAMP(2206) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1879) ! used 8 times + TMP_JAMP(2344) = TMP_JAMP(2205) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1581) ! used 8 times + TMP_JAMP(2343) = TMP_JAMP(2205) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1563) ! used 8 times + TMP_JAMP(2342) = TMP_JAMP(2204) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1579) ! used 8 times + TMP_JAMP(2341) = TMP_JAMP(2204) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1561) ! used 8 times + TMP_JAMP(2340) = TMP_JAMP(2203) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1572) ! used 8 times + TMP_JAMP(2339) = TMP_JAMP(2203) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1587) ! used 8 times + TMP_JAMP(2338) = TMP_JAMP(2202) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1570) ! used 8 times + TMP_JAMP(2337) = TMP_JAMP(2202) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1585) ! used 8 times + TMP_JAMP(2336) = TMP_JAMP(2201) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1770) ! used 8 times + TMP_JAMP(2335) = TMP_JAMP(2201) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1761) ! used 8 times + TMP_JAMP(2334) = TMP_JAMP(2200) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1768) ! used 8 times + TMP_JAMP(2333) = TMP_JAMP(2200) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1759) ! used 8 times + TMP_JAMP(2332) = TMP_JAMP(2199) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1776) ! used 8 times + TMP_JAMP(2331) = TMP_JAMP(2199) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1779) ! used 8 times + TMP_JAMP(2330) = TMP_JAMP(2198) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1774) ! used 8 times + TMP_JAMP(2329) = TMP_JAMP(2198) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1777) ! used 8 times + TMP_JAMP(2328) = TMP_JAMP(2197) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1661) ! used 8 times + TMP_JAMP(2327) = TMP_JAMP(2197) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1652) ! used 8 times + TMP_JAMP(2326) = TMP_JAMP(2196) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1691) ! used 8 times + TMP_JAMP(2325) = TMP_JAMP(2196) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1697) ! used 8 times + TMP_JAMP(2324) = TMP_JAMP(2195) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1806) ! used 8 times + TMP_JAMP(2323) = TMP_JAMP(2195) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1800) ! used 8 times + TMP_JAMP(2322) = TMP_JAMP(2194) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1804) ! used 8 times + TMP_JAMP(2321) = TMP_JAMP(2194) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1798) ! used 8 times + TMP_JAMP(2320) = TMP_JAMP(2193) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1580) ! used 8 times + TMP_JAMP(2319) = TMP_JAMP(2193) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1562) ! used 8 times + TMP_JAMP(2318) = TMP_JAMP(2192) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1571) ! used 8 times + TMP_JAMP(2317) = TMP_JAMP(2192) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1586) ! used 8 times + TMP_JAMP(2316) = TMP_JAMP(2191) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1593) ! used 8 times + TMP_JAMP(2315) = TMP_JAMP(2191) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1590) ! used 8 times + TMP_JAMP(2314) = TMP_JAMP(2190) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1591) ! used 8 times + TMP_JAMP(2313) = TMP_JAMP(2190) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1588) ! used 8 times + TMP_JAMP(2312) = TMP_JAMP(2189) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1592) ! used 8 times + TMP_JAMP(2311) = TMP_JAMP(2189) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1589) ! used 8 times + TMP_JAMP(2310) = TMP_JAMP(2188) - TMP_JAMP(2187) ! used 8 times + TMP_JAMP(2309) = TMP_JAMP(2188) + TMP_JAMP(2170) ! used 8 times + TMP_JAMP(2308) = TMP_JAMP(2187) + TMP_JAMP(2170) ! used 8 times + TMP_JAMP(2307) = TMP_JAMP(2186) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1860) ! used 8 times + TMP_JAMP(2306) = TMP_JAMP(2186) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1854) ! used 8 times + TMP_JAMP(2305) = TMP_JAMP(2185) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1858) ! used 8 times + TMP_JAMP(2304) = TMP_JAMP(2185) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1852) ! used 8 times + TMP_JAMP(2303) = TMP_JAMP(2184) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1527) ! used 8 times + TMP_JAMP(2302) = TMP_JAMP(2184) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1509) ! used 8 times + TMP_JAMP(2301) = TMP_JAMP(2183) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1525) ! used 8 times + TMP_JAMP(2300) = TMP_JAMP(2183) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1507) ! used 8 times + TMP_JAMP(2299) = TMP_JAMP(2182) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1716) ! used 8 times + TMP_JAMP(2298) = TMP_JAMP(2182) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1707) ! used 8 times + TMP_JAMP(2297) = TMP_JAMP(2181) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1714) ! used 8 times + TMP_JAMP(2296) = TMP_JAMP(2181) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1705) ! used 8 times + TMP_JAMP(2295) = TMP_JAMP(2180) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1722) ! used 8 times + TMP_JAMP(2294) = TMP_JAMP(2180) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1725) ! used 8 times + TMP_JAMP(2293) = TMP_JAMP(2179) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1720) ! used 8 times + TMP_JAMP(2292) = TMP_JAMP(2179) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1723) ! used 8 times + TMP_JAMP(2291) = TMP_JAMP(2178) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1752) ! used 8 times + TMP_JAMP(2290) = TMP_JAMP(2178) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1746) ! used 8 times + TMP_JAMP(2289) = TMP_JAMP(2177) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1750) ! used 8 times + TMP_JAMP(2288) = TMP_JAMP(2177) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1744) ! used 8 times + TMP_JAMP(2287) = TMP_JAMP(2176) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1526) ! used 8 times + TMP_JAMP(2286) = TMP_JAMP(2176) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1508) ! used 8 times + TMP_JAMP(2285) = TMP_JAMP(2175) + TMP_JAMP(2170) ! used 8 times + TMP_JAMP(2284) = TMP_JAMP(2174) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1671) ! used 8 times + TMP_JAMP(2283) = TMP_JAMP(2174) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1668) ! used 8 times + TMP_JAMP(2282) = TMP_JAMP(2173) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1669) ! used 8 times + TMP_JAMP(2281) = TMP_JAMP(2173) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1666) ! used 8 times + TMP_JAMP(2280) = TMP_JAMP(2172) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1886) ! used 8 times + TMP_JAMP(2279) = TMP_JAMP(2172) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1880) ! used 8 times + TMP_JAMP(2278) = TMP_JAMP(2171) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1670) ! used 8 times + TMP_JAMP(2277) = TMP_JAMP(2171) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1667) ! used 8 times + TMP_JAMP(2276) = TMP_JAMP(2169) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1859) ! used 8 times + TMP_JAMP(2275) = TMP_JAMP(2169) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1853) ! used 8 times + TMP_JAMP(2274) = TMP_JAMP(2168) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1635) ! used 8 times + TMP_JAMP(2273) = TMP_JAMP(2168) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1617) ! used 8 times + TMP_JAMP(2272) = TMP_JAMP(2167) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1633) ! used 8 times + TMP_JAMP(2271) = TMP_JAMP(2167) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1615) ! used 8 times + TMP_JAMP(2270) = TMP_JAMP(2166) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1644) ! used 8 times + TMP_JAMP(2269) = TMP_JAMP(2166) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1647) ! used 8 times + TMP_JAMP(2268) = TMP_JAMP(2165) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1642) ! used 8 times + TMP_JAMP(2267) = TMP_JAMP(2165) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1645) ! used 8 times + TMP_JAMP(2266) = TMP_JAMP(2164) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1641) ! used 8 times + TMP_JAMP(2265) = TMP_JAMP(2164) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1626) ! used 8 times + TMP_JAMP(2264) = TMP_JAMP(2163) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1639) ! used 8 times + TMP_JAMP(2263) = TMP_JAMP(2163) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1624) ! used 8 times + TMP_JAMP(2262) = TMP_JAMP(2162) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1769) ! used 8 times + TMP_JAMP(2261) = TMP_JAMP(2162) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1760) ! used 8 times + TMP_JAMP(2260) = TMP_JAMP(2161) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1775) ! used 8 times + TMP_JAMP(2259) = TMP_JAMP(2161) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1778) ! used 8 times + TMP_JAMP(2258) = TMP_JAMP(2160) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1805) ! used 8 times + TMP_JAMP(2257) = TMP_JAMP(2160) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1799) ! used 8 times + TMP_JAMP(2256) = TMP_JAMP(2159) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1715) ! used 8 times + TMP_JAMP(2255) = TMP_JAMP(2159) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1706) ! used 8 times + TMP_JAMP(2254) = TMP_JAMP(2158) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1721) ! used 8 times + TMP_JAMP(2253) = TMP_JAMP(2158) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1724) ! used 8 times + TMP_JAMP(2252) = TMP_JAMP(2157) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1751) ! used 8 times + TMP_JAMP(2251) = TMP_JAMP(2157) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1745) ! used 8 times + TMP_JAMP(2250) = TMP_JAMP(2156) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1634) ! used 8 times + TMP_JAMP(2249) = TMP_JAMP(2156) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1616) ! used 8 times + TMP_JAMP(2248) = TMP_JAMP(2155) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1643) ! used 8 times + TMP_JAMP(2247) = TMP_JAMP(2155) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1646) ! used 8 times + TMP_JAMP(2246) = TMP_JAMP(2154) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1640) ! used 8 times + TMP_JAMP(2245) = TMP_JAMP(2154) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1625) ! used 8 times + TMP_JAMP(2244) = AMP(1455) + AMP(1456) ! used 8 times + TMP_JAMP(2243) = AMP(1453) - AMP(1457) ! used 8 times + TMP_JAMP(2242) = AMP(1866) - AMP(1872) ! used 8 times + TMP_JAMP(2241) = AMP(1464) + AMP(1465) ! used 8 times + TMP_JAMP(2240) = AMP(1462) - AMP(1466) ! used 8 times + TMP_JAMP(2239) = AMP(1839) - AMP(1845) ! used 8 times + TMP_JAMP(2238) = AMP(1473) + AMP(1474) ! used 8 times + TMP_JAMP(2237) = AMP(1471) - AMP(1475) ! used 8 times + TMP_JAMP(2236) = AMP(1869) + AMP(1872) ! used 8 times + TMP_JAMP(2235) = AMP(1842) + AMP(1845) ! used 8 times + TMP_JAMP(2234) = AMP(1812) - AMP(1818) ! used 8 times + TMP_JAMP(2233) = AMP(1815) + AMP(1818) ! used 8 times + TMP_JAMP(2232) = AMP(1812) + AMP(1815) ! used 8 times + TMP_JAMP(2231) = AMP(1434) + AMP(1435) ! used 8 times + TMP_JAMP(2230) = AMP(1432) - AMP(1436) ! used 8 times + TMP_JAMP(2229) = AMP(1866) + AMP(1869) ! used 8 times + TMP_JAMP(2228) = AMP(1482) + AMP(1483) ! used 8 times + TMP_JAMP(2227) = AMP(1480) - AMP(1484) ! used 8 times + TMP_JAMP(2226) = AMP(1839) + AMP(1842) ! used 8 times + TMP_JAMP(2390) = TMP_JAMP(2375) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(2244) ! used 8 times + TMP_JAMP(2389) = TMP_JAMP(2374) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(2228) ! used 8 times + TMP_JAMP(2388) = TMP_JAMP(2359) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(2243) ! used 8 times + TMP_JAMP(2387) = TMP_JAMP(2358) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(2227) ! used 8 times + TMP_JAMP(2386) = TMP_JAMP(2346) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(2241) ! used 8 times + TMP_JAMP(2385) = TMP_JAMP(2322) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(2240) ! used 8 times + TMP_JAMP(2384) = TMP_JAMP(2305) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(2238) ! used 8 times + TMP_JAMP(2383) = TMP_JAMP(2304) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(2231) ! used 8 times + TMP_JAMP(2382) = TMP_JAMP(2289) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(2237) ! used 8 times + TMP_JAMP(2381) = TMP_JAMP(2288) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(2230) ! used 8 times + TMP_JAMP(2671) = TMP_JAMP(2390) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1458) ! used 4 times + TMP_JAMP(2670) = TMP_JAMP(2390) - TMP_JAMP(2377) ! used 4 times + TMP_JAMP(2669) = TMP_JAMP(2390) - TMP_JAMP(2388) ! used 4 times + TMP_JAMP(2668) = TMP_JAMP(2389) - TMP_JAMP(2376) ! used 4 times + TMP_JAMP(2667) = TMP_JAMP(2389) + TMP_JAMP(2349) ! used 4 times + TMP_JAMP(2666) = TMP_JAMP(2389) - TMP_JAMP(2387) ! used 4 times + TMP_JAMP(2665) = TMP_JAMP(2388) - AMP(1663) ! used 4 times + TMP_JAMP(2664) = TMP_JAMP(2388) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1458) ! used 4 times + TMP_JAMP(2663) = TMP_JAMP(2388) - TMP_JAMP(2282) ! used 4 times + TMP_JAMP(2662) = TMP_JAMP(2387) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1485) ! used 4 times + TMP_JAMP(2661) = TMP_JAMP(2387) - TMP_JAMP(2360) ! used 4 times + TMP_JAMP(2660) = TMP_JAMP(2387) + TMP_JAMP(2325) ! used 4 times + TMP_JAMP(2659) = TMP_JAMP(2386) - TMP_JAMP(2348) ! used 4 times + TMP_JAMP(2658) = TMP_JAMP(2386) - TMP_JAMP(2385) ! used 4 times + TMP_JAMP(2657) = TMP_JAMP(2385) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1467) ! used 4 times + TMP_JAMP(2656) = TMP_JAMP(2385) - AMP(1762) ! used 4 times + TMP_JAMP(2655) = TMP_JAMP(2384) - TMP_JAMP(2307) ! used 4 times + TMP_JAMP(2654) = TMP_JAMP(2384) + TMP_JAMP(2276) ! used 4 times + TMP_JAMP(2653) = TMP_JAMP(2384) - TMP_JAMP(2382) ! used 4 times + TMP_JAMP(2652) = TMP_JAMP(2383) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1437) ! used 4 times + TMP_JAMP(2651) = TMP_JAMP(2383) - TMP_JAMP(2306) ! used 4 times + TMP_JAMP(2650) = TMP_JAMP(2383) + TMP_JAMP(2275) ! used 4 times + TMP_JAMP(2649) = TMP_JAMP(2383) - TMP_JAMP(2381) ! used 4 times + TMP_JAMP(2648) = TMP_JAMP(2382) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1476) ! used 4 times + TMP_JAMP(2647) = TMP_JAMP(2382) - AMP(1708) ! used 4 times + TMP_JAMP(2646) = TMP_JAMP(2381) - AMP(1717) ! used 4 times + TMP_JAMP(2645) = TMP_JAMP(2381) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1437) ! used 4 times + TMP_JAMP(2644) = TMP_JAMP(2380) + TMP_JAMP(2309) ! used 4 times + TMP_JAMP(2643) = TMP_JAMP(2380) - TMP_JAMP(2234) ! used 4 times + TMP_JAMP(2642) = TMP_JAMP(2379) + TMP_JAMP(2233) ! used 4 times + TMP_JAMP(2641) = TMP_JAMP(2378) + TMP_JAMP(2352) ! used 4 times + TMP_JAMP(2640) = TMP_JAMP(2378) + TMP_JAMP(2232) ! used 4 times + TMP_JAMP(2639) = TMP_JAMP(2377) + TMP_JAMP(2350) ! used 4 times + TMP_JAMP(2638) = TMP_JAMP(2377) - AMP(1830) ! used 4 times + TMP_JAMP(2637) = TMP_JAMP(2376) - AMP(1836) ! used 4 times + TMP_JAMP(2636) = TMP_JAMP(2376) + TMP_JAMP(2349) ! used 4 times + TMP_JAMP(2635) = TMP_JAMP(2373) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1458) ! used 4 times + TMP_JAMP(2634) = TMP_JAMP(2373) - TMP_JAMP(2371) ! used 4 times + TMP_JAMP(2633) = TMP_JAMP(2373) + TMP_JAMP(2357) ! used 4 times + TMP_JAMP(2632) = TMP_JAMP(2373) - AMP(1521) ! used 4 times + TMP_JAMP(2631) = TMP_JAMP(2372) - TMP_JAMP(2370) ! used 4 times + TMP_JAMP(2630) = TMP_JAMP(2372) + TMP_JAMP(2356) ! used 4 times + TMP_JAMP(2629) = TMP_JAMP(2371) + AMP(1513) ! used 4 times + TMP_JAMP(2628) = TMP_JAMP(2371) + TMP_JAMP(2357) ! used 4 times + TMP_JAMP(2627) = TMP_JAMP(2370) + TMP_JAMP(2356) ! used 4 times + TMP_JAMP(2626) = TMP_JAMP(2369) + AMP(1515) ! used 4 times + TMP_JAMP(2625) = TMP_JAMP(2369) + TMP_JAMP(2355) ! used 4 times + TMP_JAMP(2624) = TMP_JAMP(2369) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1467) ! used 4 times + TMP_JAMP(2623) = TMP_JAMP(2369) - AMP(1506) ! used 4 times + TMP_JAMP(2622) = TMP_JAMP(2368) - TMP_JAMP(2366) ! used 4 times + TMP_JAMP(2621) = TMP_JAMP(2368) + AMP(1530) ! used 4 times + TMP_JAMP(2620) = TMP_JAMP(2368) + TMP_JAMP(2354) ! used 4 times + TMP_JAMP(2619) = TMP_JAMP(2367) + AMP(1513) ! used 4 times + TMP_JAMP(2618) = TMP_JAMP(2367) + TMP_JAMP(2355) ! used 4 times + TMP_JAMP(2617) = TMP_JAMP(2367) - TMP_JAMP(2330) ! used 4 times + TMP_JAMP(2616) = TMP_JAMP(2366) + AMP(1528) ! used 4 times + TMP_JAMP(2615) = TMP_JAMP(2366) + TMP_JAMP(2354) ! used 4 times + TMP_JAMP(2614) = TMP_JAMP(2365) + AMP(1665) ! used 4 times + TMP_JAMP(2613) = TMP_JAMP(2365) - TMP_JAMP(2363) ! used 4 times + TMP_JAMP(2612) = TMP_JAMP(2365) + TMP_JAMP(2328) ! used 4 times + TMP_JAMP(2611) = TMP_JAMP(2365) + TMP_JAMP(2299) ! used 4 times + TMP_JAMP(2610) = TMP_JAMP(2364) - TMP_JAMP(2362) ! used 4 times + TMP_JAMP(2609) = TMP_JAMP(2364) + TMP_JAMP(2327) ! used 4 times + TMP_JAMP(2608) = TMP_JAMP(2364) + TMP_JAMP(2298) ! used 4 times + TMP_JAMP(2607) = TMP_JAMP(2363) + AMP(1663) ! used 4 times + TMP_JAMP(2606) = TMP_JAMP(2363) + TMP_JAMP(2328) ! used 4 times + TMP_JAMP(2605) = TMP_JAMP(2362) + TMP_JAMP(2327) ! used 4 times + TMP_JAMP(2604) = TMP_JAMP(2362) + AMP(1654) ! used 4 times + TMP_JAMP(2603) = TMP_JAMP(2361) - AMP(1665) ! used 4 times + TMP_JAMP(2602) = TMP_JAMP(2361) + TMP_JAMP(2357) ! used 4 times + TMP_JAMP(2601) = TMP_JAMP(2361) + TMP_JAMP(2326) ! used 4 times + TMP_JAMP(2600) = TMP_JAMP(2361) + AMP(1695) ! used 4 times + TMP_JAMP(2599) = TMP_JAMP(2360) + TMP_JAMP(2356) ! used 4 times + TMP_JAMP(2598) = TMP_JAMP(2360) + TMP_JAMP(2325) ! used 4 times + TMP_JAMP(2597) = TMP_JAMP(2360) - AMP(1656) ! used 4 times + TMP_JAMP(2596) = TMP_JAMP(2355) + AMP(1514) ! used 4 times + TMP_JAMP(2595) = TMP_JAMP(2354) + AMP(1529) ! used 4 times + TMP_JAMP(2594) = TMP_JAMP(2353) - TMP_JAMP(2242) ! used 4 times + TMP_JAMP(2593) = TMP_JAMP(2350) - TMP_JAMP(2338) ! used 4 times + TMP_JAMP(2592) = TMP_JAMP(2350) - AMP(1829) ! used 4 times + TMP_JAMP(2591) = TMP_JAMP(2349) - AMP(1835) ! used 4 times + TMP_JAMP(2590) = TMP_JAMP(2349) - TMP_JAMP(2337) ! used 4 times + TMP_JAMP(2589) = TMP_JAMP(2348) - AMP(1890) ! used 4 times + TMP_JAMP(2588) = TMP_JAMP(2348) + TMP_JAMP(2280) ! used 4 times + TMP_JAMP(2587) = TMP_JAMP(2347) - TMP_JAMP(2345) ! used 4 times + TMP_JAMP(2586) = TMP_JAMP(2347) + TMP_JAMP(2279) ! used 4 times + TMP_JAMP(2585) = TMP_JAMP(2347) - AMP(1884) ! used 4 times + TMP_JAMP(2584) = TMP_JAMP(2345) + TMP_JAMP(2279) ! used 4 times + TMP_JAMP(2583) = TMP_JAMP(2345) - AMP(1882) ! used 4 times + TMP_JAMP(2582) = TMP_JAMP(2344) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1467) ! used 4 times + TMP_JAMP(2581) = TMP_JAMP(2344) - TMP_JAMP(2342) ! used 4 times + TMP_JAMP(2580) = TMP_JAMP(2344) + TMP_JAMP(2320) ! used 4 times + TMP_JAMP(2579) = TMP_JAMP(2343) - TMP_JAMP(2341) ! used 4 times + TMP_JAMP(2578) = TMP_JAMP(2343) + TMP_JAMP(2319) ! used 4 times + TMP_JAMP(2577) = TMP_JAMP(2343) - AMP(1566) ! used 4 times + TMP_JAMP(2576) = TMP_JAMP(2342) + TMP_JAMP(2320) ! used 4 times + TMP_JAMP(2575) = TMP_JAMP(2341) + TMP_JAMP(2319) ! used 4 times + TMP_JAMP(2574) = TMP_JAMP(2340) - AMP(1575) ! used 4 times + TMP_JAMP(2573) = TMP_JAMP(2340) - TMP_JAMP(2338) ! used 4 times + TMP_JAMP(2572) = TMP_JAMP(2340) + TMP_JAMP(2318) ! used 4 times + TMP_JAMP(2571) = TMP_JAMP(2340) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1458) ! used 4 times + TMP_JAMP(2570) = TMP_JAMP(2339) - TMP_JAMP(2337) ! used 4 times + TMP_JAMP(2569) = TMP_JAMP(2339) + TMP_JAMP(2317) ! used 4 times + TMP_JAMP(2568) = TMP_JAMP(2339) - AMP(1566) ! used 4 times + TMP_JAMP(2567) = TMP_JAMP(2339) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1485) ! used 4 times + TMP_JAMP(2566) = TMP_JAMP(2338) - AMP(1573) ! used 4 times + TMP_JAMP(2565) = TMP_JAMP(2338) + TMP_JAMP(2318) ! used 4 times + TMP_JAMP(2564) = TMP_JAMP(2337) - AMP(1564) ! used 4 times + TMP_JAMP(2563) = TMP_JAMP(2337) + TMP_JAMP(2317) ! used 4 times + TMP_JAMP(2562) = TMP_JAMP(2336) + TMP_JAMP(2328) ! used 4 times + TMP_JAMP(2561) = TMP_JAMP(2336) - TMP_JAMP(2334) ! used 4 times + TMP_JAMP(2560) = TMP_JAMP(2336) + TMP_JAMP(2262) ! used 4 times + TMP_JAMP(2559) = TMP_JAMP(2336) + AMP(1773) ! used 4 times + TMP_JAMP(2558) = TMP_JAMP(2335) + TMP_JAMP(2327) ! used 4 times + TMP_JAMP(2557) = TMP_JAMP(2335) - TMP_JAMP(2333) ! used 4 times + TMP_JAMP(2556) = TMP_JAMP(2335) + TMP_JAMP(2261) ! used 4 times + TMP_JAMP(2555) = TMP_JAMP(2334) + TMP_JAMP(2262) ! used 4 times + TMP_JAMP(2554) = TMP_JAMP(2333) + AMP(1762) ! used 4 times + TMP_JAMP(2553) = TMP_JAMP(2333) + TMP_JAMP(2261) ! used 4 times + TMP_JAMP(2552) = TMP_JAMP(2332) + AMP(1767) ! used 4 times + TMP_JAMP(2551) = TMP_JAMP(2332) - TMP_JAMP(2330) ! used 4 times + TMP_JAMP(2550) = TMP_JAMP(2332) - AMP(1809) ! used 4 times + TMP_JAMP(2549) = TMP_JAMP(2332) + TMP_JAMP(2260) ! used 4 times + TMP_JAMP(2548) = TMP_JAMP(2331) - TMP_JAMP(2329) ! used 4 times + TMP_JAMP(2547) = TMP_JAMP(2331) + TMP_JAMP(2259) ! used 4 times + TMP_JAMP(2546) = TMP_JAMP(2331) + AMP(1758) ! used 4 times + TMP_JAMP(2545) = TMP_JAMP(2330) + AMP(1765) ! used 4 times + TMP_JAMP(2544) = TMP_JAMP(2330) + TMP_JAMP(2260) ! used 4 times + TMP_JAMP(2543) = TMP_JAMP(2329) + TMP_JAMP(2259) ! used 4 times + TMP_JAMP(2542) = TMP_JAMP(2329) + AMP(1756) ! used 4 times + TMP_JAMP(2541) = TMP_JAMP(2328) + AMP(1664) ! used 4 times + TMP_JAMP(2540) = TMP_JAMP(2326) - AMP(1664) ! used 4 times + TMP_JAMP(2539) = TMP_JAMP(2326) + TMP_JAMP(2318) ! used 4 times + TMP_JAMP(2538) = TMP_JAMP(2325) - AMP(1655) ! used 4 times + TMP_JAMP(2537) = TMP_JAMP(2324) + AMP(1809) ! used 4 times + TMP_JAMP(2536) = TMP_JAMP(2324) + TMP_JAMP(2320) ! used 4 times + TMP_JAMP(2535) = TMP_JAMP(2324) - AMP(1764) ! used 4 times + TMP_JAMP(2534) = TMP_JAMP(2323) - AMP(1773) ! used 4 times + TMP_JAMP(2533) = TMP_JAMP(2323) + TMP_JAMP(2319) ! used 4 times + TMP_JAMP(2532) = TMP_JAMP(2323) + AMP(1803) ! used 4 times + TMP_JAMP(2531) = TMP_JAMP(2321) - AMP(1771) ! used 4 times + TMP_JAMP(2530) = TMP_JAMP(2321) + AMP(1801) ! used 4 times + TMP_JAMP(2529) = TMP_JAMP(2318) - AMP(1574) ! used 4 times + TMP_JAMP(2528) = TMP_JAMP(2317) - AMP(1565) ! used 4 times + TMP_JAMP(2527) = TMP_JAMP(2316) + AMP(1569) ! used 4 times + TMP_JAMP(2526) = TMP_JAMP(2316) - AMP(1560) ! used 4 times + TMP_JAMP(2525) = TMP_JAMP(2315) - AMP(1578) ! used 4 times + TMP_JAMP(2524) = TMP_JAMP(2315) + AMP(1584) ! used 4 times + TMP_JAMP(2523) = TMP_JAMP(2314) + AMP(1567) ! used 4 times + TMP_JAMP(2522) = TMP_JAMP(2314) - AMP(1558) ! used 4 times + TMP_JAMP(2521) = TMP_JAMP(2313) - AMP(1576) ! used 4 times + TMP_JAMP(2520) = TMP_JAMP(2313) + AMP(1582) ! used 4 times + TMP_JAMP(2519) = TMP_JAMP(2312) + AMP(1568) ! used 4 times + TMP_JAMP(2518) = TMP_JAMP(2312) - AMP(1559) ! used 4 times + TMP_JAMP(2517) = TMP_JAMP(2311) - AMP(1577) ! used 4 times + TMP_JAMP(2516) = TMP_JAMP(2311) + AMP(1583) ! used 4 times + TMP_JAMP(2515) = TMP_JAMP(2310) - TMP_JAMP(2239) ! used 4 times + TMP_JAMP(2514) = TMP_JAMP(2307) - AMP(1863) ! used 4 times + TMP_JAMP(2513) = TMP_JAMP(2307) + TMP_JAMP(2276) ! used 4 times + TMP_JAMP(2512) = TMP_JAMP(2306) + TMP_JAMP(2275) ! used 4 times + TMP_JAMP(2511) = TMP_JAMP(2306) - AMP(1857) ! used 4 times + TMP_JAMP(2510) = TMP_JAMP(2303) - AMP(1521) ! used 4 times + TMP_JAMP(2509) = TMP_JAMP(2303) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1476) ! used 4 times + TMP_JAMP(2508) = TMP_JAMP(2303) + AMP(1524) ! used 4 times + TMP_JAMP(2507) = TMP_JAMP(2302) + AMP(1506) ! used 4 times + TMP_JAMP(2506) = TMP_JAMP(2302) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1437) ! used 4 times + TMP_JAMP(2505) = TMP_JAMP(2302) - AMP(1512) ! used 4 times + TMP_JAMP(2504) = TMP_JAMP(2301) - AMP(1519) ! used 4 times + TMP_JAMP(2503) = TMP_JAMP(2301) + AMP(1522) ! used 4 times + TMP_JAMP(2502) = TMP_JAMP(2300) + AMP(1504) ! used 4 times + TMP_JAMP(2501) = TMP_JAMP(2300) - AMP(1510) ! used 4 times + TMP_JAMP(2500) = TMP_JAMP(2299) - TMP_JAMP(2297) ! used 4 times + TMP_JAMP(2499) = TMP_JAMP(2299) + TMP_JAMP(2256) ! used 4 times + TMP_JAMP(2498) = TMP_JAMP(2298) - TMP_JAMP(2296) ! used 4 times + TMP_JAMP(2497) = TMP_JAMP(2298) + TMP_JAMP(2255) ! used 4 times + TMP_JAMP(2496) = TMP_JAMP(2297) + AMP(1717) ! used 4 times + TMP_JAMP(2495) = TMP_JAMP(2297) + TMP_JAMP(2256) ! used 4 times + TMP_JAMP(2494) = TMP_JAMP(2296) + AMP(1708) ! used 4 times + TMP_JAMP(2493) = TMP_JAMP(2296) + TMP_JAMP(2255) ! used 4 times + TMP_JAMP(2492) = TMP_JAMP(2295) + AMP(1713) ! used 4 times + TMP_JAMP(2491) = TMP_JAMP(2295) - TMP_JAMP(2293) ! used 4 times + TMP_JAMP(2490) = TMP_JAMP(2295) + TMP_JAMP(2254) ! used 4 times + TMP_JAMP(2489) = TMP_JAMP(2294) - TMP_JAMP(2292) ! used 4 times + TMP_JAMP(2488) = TMP_JAMP(2294) + TMP_JAMP(2253) ! used 4 times + TMP_JAMP(2487) = TMP_JAMP(2294) + AMP(1704) ! used 4 times + TMP_JAMP(2486) = TMP_JAMP(2293) + AMP(1711) ! used 4 times + TMP_JAMP(2485) = TMP_JAMP(2293) + TMP_JAMP(2254) ! used 4 times + TMP_JAMP(2484) = TMP_JAMP(2292) + TMP_JAMP(2253) ! used 4 times + TMP_JAMP(2483) = TMP_JAMP(2292) + AMP(1702) ! used 4 times + TMP_JAMP(2482) = TMP_JAMP(2291) + AMP(1755) ! used 4 times + TMP_JAMP(2481) = TMP_JAMP(2291) - AMP(1710) ! used 4 times + TMP_JAMP(2480) = TMP_JAMP(2290) - AMP(1719) ! used 4 times + TMP_JAMP(2479) = TMP_JAMP(2290) + AMP(1749) ! used 4 times + TMP_JAMP(2478) = TMP_JAMP(2287) - AMP(1520) ! used 4 times + TMP_JAMP(2477) = TMP_JAMP(2287) + AMP(1523) ! used 4 times + TMP_JAMP(2476) = TMP_JAMP(2286) + AMP(1505) ! used 4 times + TMP_JAMP(2475) = TMP_JAMP(2286) - AMP(1511) ! used 4 times + TMP_JAMP(2474) = TMP_JAMP(2284) - AMP(1695) ! used 4 times + TMP_JAMP(2473) = TMP_JAMP(2284) - TMP_JAMP(2282) ! used 4 times + TMP_JAMP(2472) = TMP_JAMP(2284) + AMP(1650) ! used 4 times + TMP_JAMP(2471) = TMP_JAMP(2283) + AMP(1659) ! used 4 times + TMP_JAMP(2470) = TMP_JAMP(2283) - AMP(1701) ! used 4 times + TMP_JAMP(2469) = TMP_JAMP(2282) + AMP(1648) ! used 4 times + TMP_JAMP(2468) = TMP_JAMP(2281) + AMP(1657) ! used 4 times + TMP_JAMP(2467) = TMP_JAMP(2281) - TMP_JAMP(2267) ! used 4 times + TMP_JAMP(2466) = TMP_JAMP(2280) - AMP(1889) ! used 4 times + TMP_JAMP(2465) = TMP_JAMP(2280) - TMP_JAMP(2272) ! used 4 times + TMP_JAMP(2464) = TMP_JAMP(2279) - AMP(1883) ! used 4 times + TMP_JAMP(2463) = TMP_JAMP(2278) - AMP(1694) ! used 4 times + TMP_JAMP(2462) = TMP_JAMP(2278) + AMP(1649) ! used 4 times + TMP_JAMP(2461) = TMP_JAMP(2277) + AMP(1658) ! used 4 times + TMP_JAMP(2460) = TMP_JAMP(2277) - AMP(1700) ! used 4 times + TMP_JAMP(2459) = TMP_JAMP(2276) - AMP(1862) ! used 4 times + TMP_JAMP(2458) = TMP_JAMP(2275) - AMP(1856) ! used 4 times + TMP_JAMP(2457) = TMP_JAMP(2274) - TMP_JAMP(2272) ! used 4 times + TMP_JAMP(2456) = TMP_JAMP(2274) + TMP_JAMP(2250) ! used 4 times + TMP_JAMP(2455) = TMP_JAMP(2274) - AMP(1629) ! used 4 times + TMP_JAMP(2454) = TMP_JAMP(2274) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1467) ! used 4 times + TMP_JAMP(2453) = TMP_JAMP(2273) - TMP_JAMP(2271) ! used 4 times + TMP_JAMP(2452) = TMP_JAMP(2273) + TMP_JAMP(2249) ! used 4 times + TMP_JAMP(2451) = TMP_JAMP(2272) + TMP_JAMP(2250) ! used 4 times + TMP_JAMP(2450) = TMP_JAMP(2271) + TMP_JAMP(2249) ! used 4 times + TMP_JAMP(2449) = TMP_JAMP(2270) - AMP(1632) ! used 4 times + TMP_JAMP(2448) = TMP_JAMP(2270) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1458) ! used 4 times + TMP_JAMP(2447) = TMP_JAMP(2270) - TMP_JAMP(2268) ! used 4 times + TMP_JAMP(2446) = TMP_JAMP(2270) + AMP(1638) ! used 4 times + TMP_JAMP(2445) = TMP_JAMP(2270) + TMP_JAMP(2248) ! used 4 times + TMP_JAMP(2444) = TMP_JAMP(2269) - TMP_JAMP(2267) ! used 4 times + TMP_JAMP(2443) = TMP_JAMP(2269) + TMP_JAMP(2247) ! used 4 times + TMP_JAMP(2442) = TMP_JAMP(2269) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1485) ! used 4 times + TMP_JAMP(2441) = TMP_JAMP(2269) - AMP(1614) ! used 4 times + TMP_JAMP(2440) = TMP_JAMP(2268) - AMP(1630) ! used 4 times + TMP_JAMP(2439) = TMP_JAMP(2268) + TMP_JAMP(2248) ! used 4 times + TMP_JAMP(2438) = TMP_JAMP(2267) + TMP_JAMP(2247) ! used 4 times + TMP_JAMP(2437) = TMP_JAMP(2267) - AMP(1612) ! used 4 times + TMP_JAMP(2436) = TMP_JAMP(2266) + AMP(1638) ! used 4 times + TMP_JAMP(2435) = TMP_JAMP(2266) - AMP(1620) ! used 4 times + TMP_JAMP(2434) = TMP_JAMP(2266) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1476) ! used 4 times + TMP_JAMP(2433) = TMP_JAMP(2265) - AMP(1629) ! used 4 times + TMP_JAMP(2432) = TMP_JAMP(2265) + AMP(1623) ! used 4 times + TMP_JAMP(2431) = TMP_JAMP(2265) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1437) ! used 4 times + TMP_JAMP(2430) = TMP_JAMP(2264) + AMP(1636) ! used 4 times + TMP_JAMP(2429) = TMP_JAMP(2264) - AMP(1618) ! used 4 times + TMP_JAMP(2428) = TMP_JAMP(2263) - AMP(1627) ! used 4 times + TMP_JAMP(2427) = TMP_JAMP(2263) + AMP(1621) ! used 4 times + TMP_JAMP(2426) = TMP_JAMP(2262) + TMP_JAMP(2256) ! used 4 times + TMP_JAMP(2425) = TMP_JAMP(2262) + AMP(1772) ! used 4 times + TMP_JAMP(2424) = TMP_JAMP(2261) + TMP_JAMP(2255) ! used 4 times + TMP_JAMP(2423) = TMP_JAMP(2260) + AMP(1766) ! used 4 times + TMP_JAMP(2422) = TMP_JAMP(2260) - AMP(1808) ! used 4 times + TMP_JAMP(2421) = TMP_JAMP(2259) + AMP(1757) ! used 4 times + TMP_JAMP(2420) = TMP_JAMP(2258) + AMP(1808) ! used 4 times + TMP_JAMP(2419) = TMP_JAMP(2258) + TMP_JAMP(2250) ! used 4 times + TMP_JAMP(2418) = TMP_JAMP(2258) - AMP(1763) ! used 4 times + TMP_JAMP(2417) = TMP_JAMP(2257) - AMP(1772) ! used 4 times + TMP_JAMP(2416) = TMP_JAMP(2257) + TMP_JAMP(2249) ! used 4 times + TMP_JAMP(2415) = TMP_JAMP(2257) + AMP(1802) ! used 4 times + TMP_JAMP(2414) = TMP_JAMP(2254) + AMP(1712) ! used 4 times + TMP_JAMP(2413) = TMP_JAMP(2253) + AMP(1703) ! used 4 times + TMP_JAMP(2412) = TMP_JAMP(2252) + AMP(1754) ! used 4 times + TMP_JAMP(2411) = TMP_JAMP(2252) - AMP(1709) ! used 4 times + TMP_JAMP(2410) = TMP_JAMP(2251) - AMP(1718) ! used 4 times + TMP_JAMP(2409) = TMP_JAMP(2251) + AMP(1748) ! used 4 times + TMP_JAMP(2408) = TMP_JAMP(2248) - AMP(1631) ! used 4 times + TMP_JAMP(2407) = TMP_JAMP(2247) - AMP(1613) ! used 4 times + TMP_JAMP(2406) = TMP_JAMP(2246) + AMP(1637) ! used 4 times + TMP_JAMP(2405) = TMP_JAMP(2246) - AMP(1619) ! used 4 times + TMP_JAMP(2404) = TMP_JAMP(2245) - AMP(1628) ! used 4 times + TMP_JAMP(2403) = TMP_JAMP(2245) + AMP(1622) ! used 4 times + TMP_JAMP(2402) = TMP_JAMP(2211) + TMP_JAMP(2187) ! used 4 times + TMP_JAMP(2401) = TMP_JAMP(2210) + TMP_JAMP(2188) ! used 4 times + TMP_JAMP(2400) = AMP(1459) + AMP(1888) ! used 4 times + TMP_JAMP(2399) = AMP(1461) + AMP(1807) ! used 4 times + TMP_JAMP(2398) = AMP(1468) + AMP(1861) ! used 4 times + TMP_JAMP(2397) = AMP(1470) + AMP(1753) ! used 4 times + TMP_JAMP(2396) = AMP(1452) + AMP(1693) ! used 4 times + TMP_JAMP(2395) = AMP(1450) + AMP(1828) ! used 4 times + TMP_JAMP(2394) = AMP(1477) + AMP(1834) ! used 4 times + TMP_JAMP(2393) = AMP(1479) + AMP(1699) ! used 4 times + TMP_JAMP(2392) = AMP(1431) + AMP(1747) ! used 4 times + TMP_JAMP(2391) = AMP(1429) + AMP(1855) ! used 4 times + TMP_JAMP(2673) = TMP_JAMP(2402) + TMP_JAMP(2285) ! used 4 times + TMP_JAMP(2672) = TMP_JAMP(2401) + TMP_JAMP(2285) ! used 4 times + TMP_JAMP(2675) = TMP_JAMP(2531) - TMP_JAMP(2334) ! used 3 times + TMP_JAMP(2674) = TMP_JAMP(2393) - TMP_JAMP(2281) ! used 3 times + TMP_JAMP(2881) = TMP_JAMP(2674) + TMP_JAMP(2660) ! used 2 times + TMP_JAMP(2880) = TMP_JAMP(2673) + TMP_JAMP(2236) ! used 2 times + TMP_JAMP(2879) = TMP_JAMP(2672) + TMP_JAMP(2235) ! used 2 times + TMP_JAMP(2878) = TMP_JAMP(2666) + TMP_JAMP(2604) ! used 2 times + TMP_JAMP(2877) = TMP_JAMP(2658) + TMP_JAMP(2554) ! used 2 times + TMP_JAMP(2876) = TMP_JAMP(2658) - TMP_JAMP(2399) ! used 2 times + TMP_JAMP(2875) = TMP_JAMP(2653) + TMP_JAMP(2494) ! used 2 times + TMP_JAMP(2874) = TMP_JAMP(2649) + TMP_JAMP(2496) ! used 2 times + TMP_JAMP(2873) = TMP_JAMP(2643) + TMP_JAMP(2309) ! used 2 times + TMP_JAMP(2872) = TMP_JAMP(2642) + TMP_JAMP(2310) ! used 2 times + TMP_JAMP(2871) = TMP_JAMP(2642) + TMP_JAMP(2353) ! used 2 times + TMP_JAMP(2870) = TMP_JAMP(2641) + TMP_JAMP(2236) ! used 2 times + TMP_JAMP(2869) = TMP_JAMP(2640) + TMP_JAMP(2352) ! used 2 times + TMP_JAMP(2868) = TMP_JAMP(2638) + TMP_JAMP(2234) ! used 2 times + TMP_JAMP(2867) = TMP_JAMP(2638) - TMP_JAMP(2233) ! used 2 times + TMP_JAMP(2866) = TMP_JAMP(2638) - TMP_JAMP(2504) ! used 2 times + TMP_JAMP(2865) = TMP_JAMP(2630) + TMP_JAMP(2621) ! used 2 times + TMP_JAMP(2864) = TMP_JAMP(2627) + TMP_JAMP(2501) ! used 2 times + TMP_JAMP(2863) = TMP_JAMP(2627) + TMP_JAMP(2616) ! used 2 times + TMP_JAMP(2862) = TMP_JAMP(2623) - TMP_JAMP(2506) ! used 2 times + TMP_JAMP(2861) = TMP_JAMP(2621) - TMP_JAMP(2616) ! used 2 times + TMP_JAMP(2860) = TMP_JAMP(2621) + TMP_JAMP(2595) ! used 2 times + TMP_JAMP(2859) = TMP_JAMP(2620) - TMP_JAMP(2508) ! used 2 times + TMP_JAMP(2858) = TMP_JAMP(2619) + TMP_JAMP(2596) ! used 2 times + TMP_JAMP(2857) = TMP_JAMP(2618) - TMP_JAMP(2502) ! used 2 times + TMP_JAMP(2856) = TMP_JAMP(2617) + TMP_JAMP(2399) ! used 2 times + TMP_JAMP(2855) = TMP_JAMP(2616) + TMP_JAMP(2595) ! used 2 times + TMP_JAMP(2854) = TMP_JAMP(2615) - TMP_JAMP(2503) ! used 2 times + TMP_JAMP(2853) = TMP_JAMP(2612) + TMP_JAMP(2561) ! used 2 times + TMP_JAMP(2852) = TMP_JAMP(2607) - TMP_JAMP(2388) ! used 2 times + TMP_JAMP(2851) = TMP_JAMP(2604) - TMP_JAMP(2364) ! used 2 times + TMP_JAMP(2850) = TMP_JAMP(2603) - TMP_JAMP(2365) ! used 2 times + TMP_JAMP(2849) = TMP_JAMP(2602) + TMP_JAMP(2596) ! used 2 times + TMP_JAMP(2848) = TMP_JAMP(2600) - TMP_JAMP(2473) ! used 2 times + TMP_JAMP(2847) = TMP_JAMP(2597) - TMP_JAMP(2364) ! used 2 times + TMP_JAMP(2846) = TMP_JAMP(2597) + TMP_JAMP(2538) ! used 2 times + TMP_JAMP(2845) = TMP_JAMP(2597) + TMP_JAMP(2595) ! used 2 times + TMP_JAMP(2844) = TMP_JAMP(2594) + TMP_JAMP(2379) ! used 2 times + TMP_JAMP(2843) = TMP_JAMP(2592) - TMP_JAMP(2233) ! used 2 times + TMP_JAMP(2842) = TMP_JAMP(2592) - TMP_JAMP(2566) ! used 2 times + TMP_JAMP(2841) = TMP_JAMP(2592) - TMP_JAMP(2232) ! used 2 times + TMP_JAMP(2840) = TMP_JAMP(2591) - TMP_JAMP(2233) ! used 2 times + TMP_JAMP(2839) = TMP_JAMP(2591) - TMP_JAMP(2564) ! used 2 times + TMP_JAMP(2838) = TMP_JAMP(2587) + TMP_JAMP(2353) ! used 2 times + TMP_JAMP(2837) = TMP_JAMP(2585) - TMP_JAMP(2564) ! used 2 times + TMP_JAMP(2836) = TMP_JAMP(2583) - TMP_JAMP(2242) ! used 2 times + TMP_JAMP(2835) = TMP_JAMP(2580) - TMP_JAMP(2525) ! used 2 times + TMP_JAMP(2834) = TMP_JAMP(2577) + TMP_JAMP(2567) ! used 2 times + TMP_JAMP(2833) = TMP_JAMP(2576) - TMP_JAMP(2521) ! used 2 times + TMP_JAMP(2832) = TMP_JAMP(2575) + TMP_JAMP(2564) ! used 2 times + TMP_JAMP(2831) = TMP_JAMP(2574) - TMP_JAMP(2566) ! used 2 times + TMP_JAMP(2830) = TMP_JAMP(2574) + TMP_JAMP(2529) ! used 2 times + TMP_JAMP(2829) = TMP_JAMP(2567) + TMP_JAMP(2389) ! used 2 times + TMP_JAMP(2828) = TMP_JAMP(2566) + TMP_JAMP(2529) ! used 2 times + TMP_JAMP(2827) = TMP_JAMP(2564) + TMP_JAMP(2528) ! used 2 times + TMP_JAMP(2826) = TMP_JAMP(2559) - TMP_JAMP(2533) ! used 2 times + TMP_JAMP(2825) = TMP_JAMP(2557) + TMP_JAMP(2542) ! used 2 times + TMP_JAMP(2824) = TMP_JAMP(2554) + TMP_JAMP(2535) ! used 2 times + TMP_JAMP(2823) = TMP_JAMP(2552) - TMP_JAMP(2545) ! used 2 times + TMP_JAMP(2822) = TMP_JAMP(2552) + TMP_JAMP(2423) ! used 2 times + TMP_JAMP(2821) = TMP_JAMP(2548) + TMP_JAMP(2530) ! used 2 times + TMP_JAMP(2820) = TMP_JAMP(2547) - TMP_JAMP(2415) ! used 2 times + TMP_JAMP(2819) = TMP_JAMP(2547) - TMP_JAMP(2532) ! used 2 times + TMP_JAMP(2818) = TMP_JAMP(2546) - TMP_JAMP(2542) ! used 2 times + TMP_JAMP(2817) = TMP_JAMP(2546) + TMP_JAMP(2421) ! used 2 times + TMP_JAMP(2816) = TMP_JAMP(2546) + TMP_JAMP(2538) ! used 2 times + TMP_JAMP(2815) = TMP_JAMP(2545) + TMP_JAMP(2423) ! used 2 times + TMP_JAMP(2814) = TMP_JAMP(2543) - TMP_JAMP(2530) ! used 2 times + TMP_JAMP(2813) = TMP_JAMP(2542) + TMP_JAMP(2421) ! used 2 times + TMP_JAMP(2812) = TMP_JAMP(2541) - TMP_JAMP(2539) ! used 2 times + TMP_JAMP(2811) = TMP_JAMP(2538) - TMP_JAMP(2327) ! used 2 times + TMP_JAMP(2810) = TMP_JAMP(2537) + TMP_JAMP(2235) ! used 2 times + TMP_JAMP(2809) = TMP_JAMP(2536) + TMP_JAMP(2529) ! used 2 times + TMP_JAMP(2808) = TMP_JAMP(2532) - TMP_JAMP(2530) ! used 2 times + TMP_JAMP(2807) = TMP_JAMP(2532) + TMP_JAMP(2528) ! used 2 times + TMP_JAMP(2806) = TMP_JAMP(2530) + TMP_JAMP(2415) ! used 2 times + TMP_JAMP(2805) = TMP_JAMP(2528) - TMP_JAMP(2460) ! used 2 times + TMP_JAMP(2804) = TMP_JAMP(2527) - TMP_JAMP(2523) ! used 2 times + TMP_JAMP(2803) = TMP_JAMP(2527) + TMP_JAMP(2519) ! used 2 times + TMP_JAMP(2802) = TMP_JAMP(2527) + TMP_JAMP(2509) ! used 2 times + TMP_JAMP(2801) = TMP_JAMP(2526) - TMP_JAMP(2522) ! used 2 times + TMP_JAMP(2800) = TMP_JAMP(2526) + TMP_JAMP(2518) ! used 2 times + TMP_JAMP(2799) = TMP_JAMP(2525) - TMP_JAMP(2521) ! used 2 times + TMP_JAMP(2798) = TMP_JAMP(2525) + TMP_JAMP(2517) ! used 2 times + TMP_JAMP(2797) = TMP_JAMP(2524) - TMP_JAMP(2520) ! used 2 times + TMP_JAMP(2796) = TMP_JAMP(2524) + TMP_JAMP(2516) ! used 2 times + TMP_JAMP(2795) = TMP_JAMP(2523) + TMP_JAMP(2519) ! used 2 times + TMP_JAMP(2794) = TMP_JAMP(2522) + TMP_JAMP(2518) ! used 2 times + TMP_JAMP(2793) = TMP_JAMP(2521) + TMP_JAMP(2517) ! used 2 times + TMP_JAMP(2792) = TMP_JAMP(2520) + TMP_JAMP(2516) ! used 2 times + TMP_JAMP(2791) = TMP_JAMP(2518) + TMP_JAMP(2226) ! used 2 times + TMP_JAMP(2790) = TMP_JAMP(2517) + TMP_JAMP(2226) ! used 2 times + TMP_JAMP(2789) = TMP_JAMP(2517) + TMP_JAMP(2335) ! used 2 times + TMP_JAMP(2788) = TMP_JAMP(2515) + TMP_JAMP(2379) ! used 2 times + TMP_JAMP(2787) = TMP_JAMP(2514) - TMP_JAMP(2504) ! used 2 times + TMP_JAMP(2786) = TMP_JAMP(2511) + TMP_JAMP(2239) ! used 2 times + TMP_JAMP(2785) = TMP_JAMP(2510) + TMP_JAMP(2436) ! used 2 times + TMP_JAMP(2784) = TMP_JAMP(2508) - TMP_JAMP(2503) ! used 2 times + TMP_JAMP(2783) = TMP_JAMP(2508) + TMP_JAMP(2477) ! used 2 times + TMP_JAMP(2782) = TMP_JAMP(2505) - TMP_JAMP(2501) ! used 2 times + TMP_JAMP(2781) = TMP_JAMP(2504) + TMP_JAMP(2478) ! used 2 times + TMP_JAMP(2780) = TMP_JAMP(2501) + TMP_JAMP(2475) ! used 2 times + TMP_JAMP(2779) = TMP_JAMP(2496) + TMP_JAMP(2480) ! used 2 times + TMP_JAMP(2778) = TMP_JAMP(2494) + TMP_JAMP(2481) ! used 2 times + TMP_JAMP(2777) = TMP_JAMP(2492) - TMP_JAMP(2486) ! used 2 times + TMP_JAMP(2776) = TMP_JAMP(2492) + TMP_JAMP(2414) ! used 2 times + TMP_JAMP(2775) = TMP_JAMP(2491) + TMP_JAMP(2397) ! used 2 times + TMP_JAMP(2774) = TMP_JAMP(2490) - TMP_JAMP(2482) ! used 2 times + TMP_JAMP(2773) = TMP_JAMP(2488) - TMP_JAMP(2409) ! used 2 times + TMP_JAMP(2772) = TMP_JAMP(2488) - TMP_JAMP(2479) ! used 2 times + TMP_JAMP(2771) = TMP_JAMP(2487) - TMP_JAMP(2483) ! used 2 times + TMP_JAMP(2770) = TMP_JAMP(2487) + TMP_JAMP(2413) ! used 2 times + TMP_JAMP(2769) = TMP_JAMP(2486) + TMP_JAMP(2414) ! used 2 times + TMP_JAMP(2768) = TMP_JAMP(2485) - TMP_JAMP(2397) ! used 2 times + TMP_JAMP(2767) = TMP_JAMP(2483) + TMP_JAMP(2413) ! used 2 times + TMP_JAMP(2766) = TMP_JAMP(2482) + TMP_JAMP(2478) ! used 2 times + TMP_JAMP(2765) = TMP_JAMP(2482) + TMP_JAMP(2412) ! used 2 times + TMP_JAMP(2764) = TMP_JAMP(2482) + TMP_JAMP(2236) ! used 2 times + TMP_JAMP(2763) = TMP_JAMP(2481) + TMP_JAMP(2477) ! used 2 times + TMP_JAMP(2762) = TMP_JAMP(2480) + TMP_JAMP(2476) ! used 2 times + TMP_JAMP(2761) = TMP_JAMP(2479) - TMP_JAMP(2392) ! used 2 times + TMP_JAMP(2760) = TMP_JAMP(2479) + TMP_JAMP(2475) ! used 2 times + TMP_JAMP(2759) = TMP_JAMP(2477) - TMP_JAMP(2229) ! used 2 times + TMP_JAMP(2758) = TMP_JAMP(2477) - TMP_JAMP(2298) ! used 2 times + TMP_JAMP(2757) = TMP_JAMP(2476) - TMP_JAMP(2299) ! used 2 times + TMP_JAMP(2756) = TMP_JAMP(2476) - TMP_JAMP(2229) ! used 2 times + TMP_JAMP(2755) = TMP_JAMP(2475) - TMP_JAMP(2470) ! used 2 times + TMP_JAMP(2754) = TMP_JAMP(2474) + TMP_JAMP(2463) ! used 2 times + TMP_JAMP(2753) = TMP_JAMP(2473) + TMP_JAMP(2396) ! used 2 times + TMP_JAMP(2752) = TMP_JAMP(2472) - TMP_JAMP(2469) ! used 2 times + TMP_JAMP(2751) = TMP_JAMP(2472) + TMP_JAMP(2462) ! used 2 times + TMP_JAMP(2750) = TMP_JAMP(2471) - TMP_JAMP(2468) ! used 2 times + TMP_JAMP(2749) = TMP_JAMP(2471) + TMP_JAMP(2461) ! used 2 times + TMP_JAMP(2748) = TMP_JAMP(2470) + TMP_JAMP(2460) ! used 2 times + TMP_JAMP(2747) = TMP_JAMP(2470) - TMP_JAMP(2236) ! used 2 times + TMP_JAMP(2746) = TMP_JAMP(2469) + TMP_JAMP(2462) ! used 2 times + TMP_JAMP(2745) = TMP_JAMP(2468) + TMP_JAMP(2461) ! used 2 times + TMP_JAMP(2744) = TMP_JAMP(2466) - TMP_JAMP(2236) ! used 2 times + TMP_JAMP(2743) = TMP_JAMP(2465) + TMP_JAMP(2386) ! used 2 times + TMP_JAMP(2742) = TMP_JAMP(2464) - TMP_JAMP(2236) ! used 2 times + TMP_JAMP(2741) = TMP_JAMP(2464) - TMP_JAMP(2229) ! used 2 times + TMP_JAMP(2740) = TMP_JAMP(2463) - TMP_JAMP(2235) ! used 2 times + TMP_JAMP(2739) = TMP_JAMP(2463) - TMP_JAMP(2326) ! used 2 times + TMP_JAMP(2738) = TMP_JAMP(2460) - TMP_JAMP(2235) ! used 2 times + TMP_JAMP(2737) = TMP_JAMP(2459) - TMP_JAMP(2235) ! used 2 times + TMP_JAMP(2736) = TMP_JAMP(2458) - TMP_JAMP(2235) ! used 2 times + TMP_JAMP(2735) = TMP_JAMP(2458) - TMP_JAMP(2226) ! used 2 times + TMP_JAMP(2734) = TMP_JAMP(2455) + TMP_JAMP(2431) ! used 2 times + TMP_JAMP(2733) = TMP_JAMP(2454) + TMP_JAMP(2433) ! used 2 times + TMP_JAMP(2732) = TMP_JAMP(2454) - TMP_JAMP(2449) ! used 2 times + TMP_JAMP(2731) = TMP_JAMP(2453) - TMP_JAMP(2429) ! used 2 times + TMP_JAMP(2730) = TMP_JAMP(2451) - TMP_JAMP(2440) ! used 2 times + TMP_JAMP(2729) = TMP_JAMP(2450) + TMP_JAMP(2429) ! used 2 times + TMP_JAMP(2728) = TMP_JAMP(2448) - AMP(1632) ! used 2 times + TMP_JAMP(2727) = TMP_JAMP(2445) + TMP_JAMP(2406) ! used 2 times + TMP_JAMP(2726) = TMP_JAMP(2442) + TMP_JAMP(2432) ! used 2 times + TMP_JAMP(2725) = TMP_JAMP(2441) - TMP_JAMP(2437) ! used 2 times + TMP_JAMP(2724) = TMP_JAMP(2441) + TMP_JAMP(2407) ! used 2 times + TMP_JAMP(2723) = TMP_JAMP(2440) + TMP_JAMP(2408) ! used 2 times + TMP_JAMP(2722) = TMP_JAMP(2439) + TMP_JAMP(2430) ! used 2 times + TMP_JAMP(2721) = TMP_JAMP(2438) + TMP_JAMP(2427) ! used 2 times + TMP_JAMP(2720) = TMP_JAMP(2437) + TMP_JAMP(2407) ! used 2 times + TMP_JAMP(2719) = TMP_JAMP(2434) - AMP(1620) ! used 2 times + TMP_JAMP(2718) = TMP_JAMP(2431) + AMP(1623) ! used 2 times + TMP_JAMP(2717) = TMP_JAMP(2430) + TMP_JAMP(2406) ! used 2 times + TMP_JAMP(2716) = TMP_JAMP(2428) + TMP_JAMP(2272) ! used 2 times + TMP_JAMP(2715) = TMP_JAMP(2427) + TMP_JAMP(2403) ! used 2 times + TMP_JAMP(2714) = TMP_JAMP(2426) + TMP_JAMP(2299) ! used 2 times + TMP_JAMP(2713) = TMP_JAMP(2424) + TMP_JAMP(2298) ! used 2 times + TMP_JAMP(2712) = TMP_JAMP(2424) + TMP_JAMP(2335) ! used 2 times + TMP_JAMP(2711) = TMP_JAMP(2423) + TMP_JAMP(2410) ! used 2 times + TMP_JAMP(2710) = TMP_JAMP(2421) + TMP_JAMP(2411) ! used 2 times + TMP_JAMP(2709) = TMP_JAMP(2419) + TMP_JAMP(2404) ! used 2 times + TMP_JAMP(2708) = TMP_JAMP(2418) - TMP_JAMP(2408) ! used 2 times + TMP_JAMP(2707) = TMP_JAMP(2418) + TMP_JAMP(2413) ! used 2 times + TMP_JAMP(2706) = TMP_JAMP(2417) + TMP_JAMP(2414) ! used 2 times + TMP_JAMP(2705) = TMP_JAMP(2416) - TMP_JAMP(2407) ! used 2 times + TMP_JAMP(2704) = TMP_JAMP(2415) + TMP_JAMP(2405) ! used 2 times + TMP_JAMP(2703) = TMP_JAMP(2412) + TMP_JAMP(2397) ! used 2 times + TMP_JAMP(2702) = TMP_JAMP(2412) + TMP_JAMP(2405) ! used 2 times + TMP_JAMP(2701) = TMP_JAMP(2411) + TMP_JAMP(2406) ! used 2 times + TMP_JAMP(2700) = TMP_JAMP(2410) + TMP_JAMP(2403) ! used 2 times + TMP_JAMP(2699) = TMP_JAMP(2409) + TMP_JAMP(2404) ! used 2 times + TMP_JAMP(2698) = TMP_JAMP(2409) + TMP_JAMP(2392) ! used 2 times + TMP_JAMP(2697) = TMP_JAMP(2400) + TMP_JAMP(2242) ! used 2 times + TMP_JAMP(2696) = TMP_JAMP(2400) + TMP_JAMP(2229) ! used 2 times + TMP_JAMP(2695) = TMP_JAMP(2398) + TMP_JAMP(2239) ! used 2 times + TMP_JAMP(2694) = TMP_JAMP(2398) + TMP_JAMP(2226) ! used 2 times + TMP_JAMP(2693) = TMP_JAMP(2396) + TMP_JAMP(2326) ! used 2 times + TMP_JAMP(2692) = TMP_JAMP(2396) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1454) ! used 2 times + TMP_JAMP(2691) = TMP_JAMP(2395) - TMP_JAMP(2390) ! used 2 times + TMP_JAMP(2690) = TMP_JAMP(2395) + TMP_JAMP(2232) ! used 2 times + TMP_JAMP(2689) = TMP_JAMP(2395) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1451) ! used 2 times + TMP_JAMP(2688) = TMP_JAMP(2394) + TMP_JAMP(2234) ! used 2 times + TMP_JAMP(2687) = TMP_JAMP(2394) + TMP_JAMP(2232) ! used 2 times + TMP_JAMP(2686) = TMP_JAMP(2392) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1433) ! used 2 times + TMP_JAMP(2685) = TMP_JAMP(2391) + TMP_JAMP(2239) ! used 2 times + TMP_JAMP(2684) = TMP_JAMP(2391) + TMP_JAMP(2226) ! used 2 times + TMP_JAMP(2683) = TMP_JAMP(2391) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1430) ! used 2 times + TMP_JAMP(2682) = TMP_JAMP(2389) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1478) ! used 2 times + TMP_JAMP(2681) = TMP_JAMP(2386) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1460) ! used 2 times + TMP_JAMP(2680) = TMP_JAMP(2385) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1463) ! used 2 times + TMP_JAMP(2679) = TMP_JAMP(2384) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1469) ! used 2 times + TMP_JAMP(2678) = TMP_JAMP(2382) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(1472) ! used 2 times + TMP_JAMP(2677) = TMP_JAMP(2351) + TMP_JAMP(2229) ! used 2 times + TMP_JAMP(2676) = TMP_JAMP(2308) + TMP_JAMP(2226) ! used 2 times + TMP_JAMP(2911) = TMP_JAMP(2861) + TMP_JAMP(2631) ! used 2 times + TMP_JAMP(2910) = TMP_JAMP(2856) + TMP_JAMP(2680) ! used 2 times + TMP_JAMP(2909) = TMP_JAMP(2840) + TMP_JAMP(2637) ! used 2 times + TMP_JAMP(2908) = TMP_JAMP(2831) + TMP_JAMP(2581) ! used 2 times + TMP_JAMP(2907) = TMP_JAMP(2802) + TMP_JAMP(2632) ! used 2 times + TMP_JAMP(2906) = TMP_JAMP(2801) - TMP_JAMP(2579) ! used 2 times + TMP_JAMP(2905) = TMP_JAMP(2799) - TMP_JAMP(2581) ! used 2 times + TMP_JAMP(2904) = TMP_JAMP(2792) + TMP_JAMP(2563) ! used 2 times + TMP_JAMP(2903) = TMP_JAMP(2784) - TMP_JAMP(2622) ! used 2 times + TMP_JAMP(2902) = TMP_JAMP(2782) + TMP_JAMP(2631) ! used 2 times + TMP_JAMP(2901) = TMP_JAMP(2781) + TMP_JAMP(2628) ! used 2 times + TMP_JAMP(2900) = TMP_JAMP(2777) - TMP_JAMP(2500) ! used 2 times + TMP_JAMP(2899) = TMP_JAMP(2771) - TMP_JAMP(2498) ! used 2 times + TMP_JAMP(2898) = TMP_JAMP(2754) - TMP_JAMP(2601) ! used 2 times + TMP_JAMP(2897) = TMP_JAMP(2752) - TMP_JAMP(2610) ! used 2 times + TMP_JAMP(2896) = TMP_JAMP(2750) - TMP_JAMP(2613) ! used 2 times + TMP_JAMP(2895) = TMP_JAMP(2748) - TMP_JAMP(2598) ! used 2 times + TMP_JAMP(2894) = TMP_JAMP(2746) - TMP_JAMP(2605) ! used 2 times + TMP_JAMP(2893) = TMP_JAMP(2744) + TMP_JAMP(2589) ! used 2 times + TMP_JAMP(2892) = TMP_JAMP(2742) + TMP_JAMP(2585) ! used 2 times + TMP_JAMP(2891) = TMP_JAMP(2741) + TMP_JAMP(2583) ! used 2 times + TMP_JAMP(2890) = TMP_JAMP(2737) + TMP_JAMP(2514) ! used 2 times + TMP_JAMP(2889) = TMP_JAMP(2736) + TMP_JAMP(2511) ! used 2 times + TMP_JAMP(2888) = TMP_JAMP(2733) + TMP_JAMP(2507) ! used 2 times + TMP_JAMP(2887) = TMP_JAMP(2725) - TMP_JAMP(2453) ! used 2 times + TMP_JAMP(2886) = TMP_JAMP(2709) - TMP_JAMP(2422) ! used 2 times + TMP_JAMP(2885) = TMP_JAMP(2705) - TMP_JAMP(2425) ! used 2 times + TMP_JAMP(2884) = TMP_JAMP(2697) + TMP_JAMP(2589) ! used 2 times + TMP_JAMP(2883) = TMP_JAMP(2694) - TMP_JAMP(2459) ! used 2 times + TMP_JAMP(2882) = TMP_JAMP(2688) + TMP_JAMP(2637) ! used 2 times + TMP_JAMP(2941) = TMP_JAMP(2910) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(2063) ! used 2 times + TMP_JAMP(2940) = TMP_JAMP(2903) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1850) ! used 2 times + TMP_JAMP(2939) = TMP_JAMP(2893) - TMP_JAMP(1653) ! used 2 times + TMP_JAMP(2938) = TMP_JAMP(2891) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1985) ! used 2 times + TMP_JAMP(2937) = TMP_JAMP(2890) - TMP_JAMP(1860) ! used 2 times + TMP_JAMP(2936) = TMP_JAMP(2889) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1998) ! used 2 times + TMP_JAMP(2935) = TMP_JAMP(2878) - TMP_JAMP(2123) ! used 2 times + TMP_JAMP(2934) = TMP_JAMP(2876) + TMP_JAMP(1936) ! used 2 times + TMP_JAMP(2933) = TMP_JAMP(2852) + TMP_JAMP(2140) ! used 2 times + TMP_JAMP(2932) = TMP_JAMP(2716) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1992) ! used 2 times + TMP_JAMP(2931) = TMP_JAMP(2696) - TMP_JAMP(1657) ! used 2 times + TMP_JAMP(2930) = TMP_JAMP(2692) - TMP_JAMP(2033) ! used 2 times + TMP_JAMP(2929) = TMP_JAMP(2682) - TMP_JAMP(1802) ! used 2 times + TMP_JAMP(2928) = TMP_JAMP(2681) - TMP_JAMP(1873) ! used 2 times + TMP_JAMP(2927) = TMP_JAMP(2676) + TMP_JAMP(2103) ! used 2 times + TMP_JAMP(2926) = TMP_JAMP(2675) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(2153) ! used 2 times + TMP_JAMP(2925) = TMP_JAMP(2673) - TMP_JAMP(2131) ! used 2 times + TMP_JAMP(2924) = TMP_JAMP(2672) + TMP_JAMP(2133) ! used 2 times + TMP_JAMP(2923) = TMP_JAMP(2653) + TMP_JAMP(1929) ! used 2 times + TMP_JAMP(2922) = TMP_JAMP(2649) + TMP_JAMP(2096) ! used 2 times + TMP_JAMP(2921) = TMP_JAMP(2644) - TMP_JAMP(2100) ! used 2 times + TMP_JAMP(2920) = TMP_JAMP(2643) - TMP_JAMP(2102) ! used 2 times + TMP_JAMP(2919) = TMP_JAMP(2640) + TMP_JAMP(2058) ! used 2 times + TMP_JAMP(2918) = TMP_JAMP(2639) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1796) ! used 2 times + TMP_JAMP(2917) = TMP_JAMP(2428) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(2112) ! used 2 times + TMP_JAMP(2916) = TMP_JAMP(2380) - TMP_JAMP(2152) ! used 2 times + TMP_JAMP(2915) = TMP_JAMP(2378) + TMP_JAMP(1958) ! used 2 times + TMP_JAMP(2914) = TMP_JAMP(2351) + TMP_JAMP(1665) ! used 2 times + TMP_JAMP(2913) = TMP_JAMP(2310) + TMP_JAMP(2134) ! used 2 times + TMP_JAMP(2912) = TMP_JAMP(2073) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(1483) ! used 2 times + TMP_JAMP(3030) = TMP_JAMP(2935) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1044) ! used 2 times + TMP_JAMP(3029) = TMP_JAMP(2934) - TMP_JAMP(329) ! used 2 times + TMP_JAMP(3028) = TMP_JAMP(2926) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(451) ! used 2 times + TMP_JAMP(3027) = TMP_JAMP(2907) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(586) ! used 2 times + TMP_JAMP(3026) = TMP_JAMP(2898) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1238) ! used 2 times + TMP_JAMP(3025) = TMP_JAMP(2894) - TMP_JAMP(1130) ! used 2 times + TMP_JAMP(3024) = TMP_JAMP(2888) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(587) ! used 2 times + TMP_JAMP(3023) = TMP_JAMP(2886) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1402) ! used 2 times + TMP_JAMP(3022) = TMP_JAMP(2885) - TMP_JAMP(1095) ! used 2 times + TMP_JAMP(3021) = TMP_JAMP(2862) + TMP_JAMP(580) ! used 2 times + TMP_JAMP(3020) = TMP_JAMP(2850) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1364) ! used 2 times + TMP_JAMP(3019) = TMP_JAMP(2849) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1411) ! used 2 times + TMP_JAMP(3018) = TMP_JAMP(2845) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1398) ! used 2 times + TMP_JAMP(3017) = TMP_JAMP(2834) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(582) ! used 2 times + TMP_JAMP(3016) = TMP_JAMP(2826) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1174) ! used 2 times + TMP_JAMP(3015) = TMP_JAMP(2812) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1360) ! used 2 times + TMP_JAMP(3014) = TMP_JAMP(2809) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1409) ! used 2 times + TMP_JAMP(3013) = TMP_JAMP(2807) + TMP_JAMP(1113) ! used 2 times + TMP_JAMP(3012) = TMP_JAMP(2785) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(588) ! used 2 times + TMP_JAMP(3011) = TMP_JAMP(2760) + TMP_JAMP(1329) ! used 2 times + TMP_JAMP(3010) = TMP_JAMP(2751) - TMP_JAMP(1131) ! used 2 times + TMP_JAMP(3009) = TMP_JAMP(2749) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1366) ! used 2 times + TMP_JAMP(3008) = TMP_JAMP(2734) + TMP_JAMP(593) ! used 2 times + TMP_JAMP(3007) = TMP_JAMP(2732) - TMP_JAMP(358) ! used 2 times + TMP_JAMP(3006) = TMP_JAMP(2728) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(590) ! used 2 times + TMP_JAMP(3005) = TMP_JAMP(2726) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(583) ! used 2 times + TMP_JAMP(3004) = TMP_JAMP(2719) + TMP_JAMP(592) ! used 2 times + TMP_JAMP(3003) = TMP_JAMP(2718) + TMP_JAMP(345) ! used 2 times + TMP_JAMP(3002) = TMP_JAMP(2711) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1193) ! used 2 times + TMP_JAMP(3001) = TMP_JAMP(2710) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1145) ! used 2 times + TMP_JAMP(3000) = TMP_JAMP(2708) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1400) ! used 2 times + TMP_JAMP(2999) = TMP_JAMP(2706) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1167) ! used 2 times + TMP_JAMP(2998) = TMP_JAMP(2704) + TMP_JAMP(1088) ! used 2 times + TMP_JAMP(2997) = TMP_JAMP(2702) + TMP_JAMP(1412) ! used 2 times + TMP_JAMP(2996) = TMP_JAMP(2701) + ((-0.000000000000000D+00 $ ,1.000000000000000D+00)) * TMP_JAMP(1390) ! used 2 times - TMP_JAMP(2681) = TMP_JAMP(2156) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1710) ! used 2 times - TMP_JAMP(2680) = TMP_JAMP(2151) + AMP(1702) ! used 2 times - TMP_JAMP(2679) = TMP_JAMP(2152) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(2150) ! used 2 times - TMP_JAMP(2678) = TMP_JAMP(2145) - AMP(1703) ! used 2 times - TMP_JAMP(2677) = TMP_JAMP(2142) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(2141) ! used 2 times - TMP_JAMP(2676) = TMP_JAMP(2130) + TMP_JAMP(2129) ! used 2 times - TMP_JAMP(2675) = TMP_JAMP(2121) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(333) ! used 2 times - TMP_JAMP(2674) = TMP_JAMP(2123) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(2120) ! used 2 times - TMP_JAMP(2673) = TMP_JAMP(2112) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(650) ! used 2 times - TMP_JAMP(2672) = TMP_JAMP(2111) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(2109) ! used 2 times - TMP_JAMP(2671) = TMP_JAMP(2107) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(2106) ! used 2 times - TMP_JAMP(2670) = TMP_JAMP(2103) - AMP(982) ! used 2 times - TMP_JAMP(2669) = TMP_JAMP(2104) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(2100) ! used 2 times - TMP_JAMP(2668) = TMP_JAMP(2091) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(2090) ! used 2 times - TMP_JAMP(2667) = TMP_JAMP(2086) + TMP_JAMP(2082) ! used 2 times - TMP_JAMP(2666) = TMP_JAMP(2087) - TMP_JAMP(2085) ! used 2 times - TMP_JAMP(2665) = TMP_JAMP(2081) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1530) ! used 2 times - TMP_JAMP(2664) = TMP_JAMP(2080) + TMP_JAMP(2076) ! used 2 times - TMP_JAMP(2663) = TMP_JAMP(2073) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(240) ! used 2 times - TMP_JAMP(2662) = TMP_JAMP(2068) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(170) ! used 2 times - TMP_JAMP(2661) = TMP_JAMP(2071) + TMP_JAMP(2066) ! used 2 times - TMP_JAMP(2660) = TMP_JAMP(2061) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(249) ! used 2 times - TMP_JAMP(2659) = TMP_JAMP(2063) - TMP_JAMP(2062) ! used 2 times - TMP_JAMP(2658) = TMP_JAMP(2065) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(2064) ! used 2 times - TMP_JAMP(2657) = TMP_JAMP(2060) + TMP_JAMP(2059) ! used 2 times - TMP_JAMP(2656) = TMP_JAMP(2056) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(303) ! used 2 times - TMP_JAMP(2655) = TMP_JAMP(2050) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1774) ! used 2 times - TMP_JAMP(2654) = TMP_JAMP(2051) - AMP(298) ! used 2 times - TMP_JAMP(2653) = TMP_JAMP(2054) + TMP_JAMP(2052) ! used 2 times - TMP_JAMP(2652) = TMP_JAMP(2045) - AMP(299) ! used 2 times - TMP_JAMP(2651) = TMP_JAMP(2047) + TMP_JAMP(2046) ! used 2 times - TMP_JAMP(2650) = TMP_JAMP(2042) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(2041) ! used 2 times - TMP_JAMP(2649) = TMP_JAMP(2043) - TMP_JAMP(2040) ! used 2 times - TMP_JAMP(2648) = TMP_JAMP(2031) + TMP_JAMP(2030) ! used 2 times - TMP_JAMP(2647) = TMP_JAMP(2029) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(2028) ! used 2 times - TMP_JAMP(2646) = TMP_JAMP(2027) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(2026) ! used 2 times - TMP_JAMP(2645) = TMP_JAMP(2017) - AMP(532) ! used 2 times - TMP_JAMP(2644) = TMP_JAMP(2013) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(307) ! used 2 times - TMP_JAMP(2643) = TMP_JAMP(1995) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(1994) ! used 2 times - TMP_JAMP(2642) = TMP_JAMP(1993) + TMP_JAMP(1992) ! used 2 times - TMP_JAMP(2768) = TMP_JAMP(2742) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(1890) ! used 2 times - TMP_JAMP(2767) = TMP_JAMP(2737) + TMP_JAMP(2575) ! used 2 times - TMP_JAMP(2766) = TMP_JAMP(2724) + AMP(1573) ! used 2 times - TMP_JAMP(2765) = TMP_JAMP(2720) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(2719) ! used 2 times - TMP_JAMP(2764) = TMP_JAMP(2717) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(2493) ! used 2 times - TMP_JAMP(2763) = TMP_JAMP(2716) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(2714) ! used 2 times - TMP_JAMP(2762) = TMP_JAMP(2713) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(2712) ! used 2 times - TMP_JAMP(2761) = TMP_JAMP(2704) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(2703) ! used 2 times - TMP_JAMP(2760) = TMP_JAMP(2700) - TMP_JAMP(2284) ! used 2 times - TMP_JAMP(2759) = TMP_JAMP(2697) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(2252) ! used 2 times - TMP_JAMP(2758) = TMP_JAMP(2695) - TMP_JAMP(2241) ! used 2 times - TMP_JAMP(2757) = TMP_JAMP(2691) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(1565) ! used 2 times - TMP_JAMP(2756) = TMP_JAMP(2689) + TMP_JAMP(2210) ! used 2 times - TMP_JAMP(2755) = TMP_JAMP(2685) + TMP_JAMP(2178) ! used 2 times - TMP_JAMP(2754) = TMP_JAMP(2676) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(652) ! used 2 times - TMP_JAMP(2753) = TMP_JAMP(2672) + AMP(1005) ! used 2 times - TMP_JAMP(2752) = TMP_JAMP(2668) - TMP_JAMP(2089) ! used 2 times - TMP_JAMP(2751) = TMP_JAMP(2666) + TMP_JAMP(2083) ! used 2 times - TMP_JAMP(2750) = TMP_JAMP(2659) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(848) ! used 2 times - TMP_JAMP(2749) = TMP_JAMP(2657) - TMP_JAMP(2058) ! used 2 times - TMP_JAMP(2748) = TMP_JAMP(2655) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(2653) ! used 2 times - TMP_JAMP(2747) = TMP_JAMP(2649) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(231) ! used 2 times - TMP_JAMP(2746) = TMP_JAMP(2648) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(211) ! used 2 times - TMP_JAMP(2745) = TMP_JAMP(2646) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(173) ! used 2 times - JAMP(1,1) = ((0.000000000000000D+00,1.000000000000000D+00)) - $ *AMP(190)+(-1.000000000000000D+00)*AMP(251) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(2008) - $ +TMP_JAMP(2642)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(2643)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(2665) - JAMP(2,1) = (-1.000000000000000D+00)*AMP(242) - $ +((0.000000000000000D+00,1.000000000000000D+00))*AMP(247)+( - $ -1.000000000000000D+00)*TMP_JAMP(841)+(-1.000000000000000D+00) - $ *TMP_JAMP(842)+TMP_JAMP(2000)+((0.000000000000000D+00 - $ ,1.000000000000000D+00))*TMP_JAMP(2011)+(-1.000000000000000D+00) - $ *TMP_JAMP(2642)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(2658)+TMP_JAMP(2667) - JAMP(3,1) = (-1.000000000000000D+00)*AMP(250) - $ +((0.000000000000000D+00,1.000000000000000D+00))*AMP(268) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(1504) - $ +(-1.000000000000000D+00)*TMP_JAMP(1997)+(-1.000000000000000D - $ +00)*TMP_JAMP(2088)+((0.000000000000000D+00,1.000000000000000D - $ +00))*TMP_JAMP(2643)+((0.000000000000000D+00, - $ -1.000000000000000D+00))*TMP_JAMP(2647) - JAMP(4,1) = ((0.000000000000000D+00,1.000000000000000D+00)) - $ *AMP(101)+(-1.000000000000000D+00)*AMP(233)+( - $ -1.000000000000000D+00)*TMP_JAMP(935)+(-1.000000000000000D+00) - $ *TMP_JAMP(1996)+(-1.000000000000000D+00)*TMP_JAMP(1998) - $ +TMP_JAMP(2006)+TMP_JAMP(2075)+(-1.000000000000000D+00) - $ *TMP_JAMP(2093)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(2746) - JAMP(5,1) = ((0.000000000000000D+00,1.000000000000000D+00)) - $ *AMP(112)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *AMP(226)+(-1.000000000000000D+00)*AMP(241)+( - $ -1.000000000000000D+00)*AMP(301)+(-1.000000000000000D+00) - $ *TMP_JAMP(1596)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(1681)+(-1.000000000000000D+00)*TMP_JAMP(1999)+( - $ -1.000000000000000D+00)*TMP_JAMP(2001)+TMP_JAMP(2003) - $ +TMP_JAMP(2007)+TMP_JAMP(2012)+((0.000000000000000D+00 - $ ,1.000000000000000D+00))*TMP_JAMP(2021)+TMP_JAMP(2097) - $ +TMP_JAMP(2532) - JAMP(6,1) = ((0.000000000000000D+00,1.000000000000000D+00)) - $ *AMP(223)+(-1.000000000000000D+00)*AMP(232) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*AMP(238) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*AMP(259) - $ +AMP(1630)+(-1.000000000000000D+00)*TMP_JAMP(757) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(1688) - $ +(-1.000000000000000D+00)*TMP_JAMP(2002)+TMP_JAMP(2004) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(2005) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(2473) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(2651) - $ +(-1.000000000000000D+00)*TMP_JAMP(2669) - JAMP(7,1) = ((0.000000000000000D+00,1.000000000000000D+00)) - $ *AMP(210)+(-1.000000000000000D+00)*AMP(253) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(1353) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(2008) - $ +(-1.000000000000000D+00)*TMP_JAMP(2009)+(-1.000000000000000D - $ +00)*TMP_JAMP(2015)+((0.000000000000000D+00,1.000000000000000D - $ +00))*TMP_JAMP(2644)+((0.000000000000000D+00,1.000000000000000D - $ +00))*TMP_JAMP(2686) - JAMP(8,1) = ((0.000000000000000D+00,-1.000000000000000D+00)) - $ *AMP(187)+(-1.000000000000000D+00)*AMP(244)+TMP_JAMP(773) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(775) - $ +(-1.000000000000000D+00)*TMP_JAMP(1347)+(-1.000000000000000D - $ +00)*TMP_JAMP(1350)+((0.000000000000000D+00,-1.000000000000000D - $ +00))*TMP_JAMP(2010)+(-1.000000000000000D+00)*TMP_JAMP(2012) - $ +TMP_JAMP(2019)+TMP_JAMP(2084)+TMP_JAMP(2199)+TMP_JAMP(2543) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(2644) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(2656) - JAMP(9,1) = (-1.000000000000000D+00)*AMP(252)+( - $ -1.000000000000000D+00)*AMP(530)+AMP(1699)+((0.000000000000000D - $ +00,1.000000000000000D+00))*TMP_JAMP(1545)+TMP_JAMP(1552)+( - $ -1.000000000000000D+00)*TMP_JAMP(2014)+(-1.000000000000000D+00) - $ *TMP_JAMP(2016)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(2038)+(-1.000000000000000D+00)*TMP_JAMP(2645) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(2687) - JAMP(10,1) = (-1.000000000000000D+00)*AMP(161)+( - $ -1.000000000000000D+00)*TMP_JAMP(979)+TMP_JAMP(2204) - $ +TMP_JAMP(2645)+(-1.000000000000000D+00)*TMP_JAMP(2745) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(2747) - JAMP(11,1) = (-1.000000000000000D+00)*AMP(243) - $ +((0.000000000000000D+00,1.000000000000000D+00))*AMP(606)+( - $ -1.000000000000000D+00)*TMP_JAMP(592)+(-1.000000000000000D+00) - $ *TMP_JAMP(827)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(1941)+(-1.000000000000000D+00)*TMP_JAMP(2018) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(2020) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(2022) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(2023) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(2025) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(2069) - $ +TMP_JAMP(2207)+TMP_JAMP(2660) + TMP_JAMP(2995) = TMP_JAMP(2700) - TMP_JAMP(1092) ! used 2 times + TMP_JAMP(2994) = TMP_JAMP(2668) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(284) ! used 2 times + TMP_JAMP(2993) = TMP_JAMP(2663) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1237) ! used 2 times + TMP_JAMP(2992) = TMP_JAMP(2626) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(591) ! used 2 times + TMP_JAMP(2991) = TMP_JAMP(2571) + TMP_JAMP(572) ! used 2 times + TMP_JAMP(2990) = TMP_JAMP(2568) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(581) ! used 2 times + TMP_JAMP(2989) = TMP_JAMP(2540) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1407) ! used 2 times + TMP_JAMP(2988) = TMP_JAMP(2534) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1341) ! used 2 times + TMP_JAMP(2987) = TMP_JAMP(2484) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1194) ! used 2 times + TMP_JAMP(2986) = TMP_JAMP(2435) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(585) ! used 2 times + TMP_JAMP(2985) = TMP_JAMP(2434) + TMP_JAMP(536) ! used 2 times + TMP_JAMP(2984) = TMP_JAMP(2420) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1403) ! used 2 times + TMP_JAMP(2983) = TMP_JAMP(2151) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(574) ! used 2 times + TMP_JAMP(2982) = TMP_JAMP(2150) - TMP_JAMP(423) ! used 2 times + TMP_JAMP(2981) = TMP_JAMP(2147) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(549) ! used 2 times + TMP_JAMP(2980) = TMP_JAMP(2132) + TMP_JAMP(376) ! used 2 times + TMP_JAMP(2979) = TMP_JAMP(2115) + TMP_JAMP(264) ! used 2 times + TMP_JAMP(2978) = TMP_JAMP(2114) - TMP_JAMP(263) ! used 2 times + TMP_JAMP(2977) = TMP_JAMP(2111) - TMP_JAMP(1197) ! used 2 times + TMP_JAMP(2976) = TMP_JAMP(2110) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1026) ! used 2 times + TMP_JAMP(2975) = TMP_JAMP(2107) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(413) ! used 2 times + TMP_JAMP(2974) = TMP_JAMP(2098) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(492) ! used 2 times + TMP_JAMP(2973) = TMP_JAMP(2080) - TMP_JAMP(1406) ! used 2 times + TMP_JAMP(2972) = TMP_JAMP(2079) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1395) ! used 2 times + TMP_JAMP(2971) = TMP_JAMP(2074) - TMP_JAMP(377) ! used 2 times + TMP_JAMP(2970) = TMP_JAMP(2056) + TMP_JAMP(530) ! used 2 times + TMP_JAMP(2969) = TMP_JAMP(2045) - TMP_JAMP(554) ! used 2 times + TMP_JAMP(2968) = TMP_JAMP(2034) + TMP_JAMP(552) ! used 2 times + TMP_JAMP(2967) = TMP_JAMP(1999) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(420) ! used 2 times + TMP_JAMP(2966) = TMP_JAMP(1997) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(425) ! used 2 times + TMP_JAMP(2965) = TMP_JAMP(1995) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1351) ! used 2 times + TMP_JAMP(2964) = TMP_JAMP(1984) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(415) ! used 2 times + TMP_JAMP(2963) = TMP_JAMP(1957) + TMP_JAMP(545) ! used 2 times + TMP_JAMP(2962) = TMP_JAMP(1940) - TMP_JAMP(374) ! used 2 times + TMP_JAMP(2961) = TMP_JAMP(1934) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(363) ! used 2 times + TMP_JAMP(2960) = TMP_JAMP(1918) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(577) ! used 2 times + TMP_JAMP(2959) = TMP_JAMP(1912) - TMP_JAMP(1416) ! used 2 times + TMP_JAMP(2958) = TMP_JAMP(1897) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1408) ! used 2 times + TMP_JAMP(2957) = TMP_JAMP(1878) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(928) ! used 2 times + TMP_JAMP(2956) = TMP_JAMP(1864) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1026) ! used 2 times + TMP_JAMP(2955) = TMP_JAMP(1854) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(396) ! used 2 times + TMP_JAMP(2954) = TMP_JAMP(1843) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(1417) ! used 2 times + TMP_JAMP(2953) = TMP_JAMP(1810) - TMP_JAMP(356) ! used 2 times + TMP_JAMP(2952) = TMP_JAMP(1803) - TMP_JAMP(1381) ! used 2 times + TMP_JAMP(2951) = TMP_JAMP(1800) - TMP_JAMP(409) ! used 2 times + TMP_JAMP(2950) = TMP_JAMP(1759) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1410) ! used 2 times + TMP_JAMP(2949) = TMP_JAMP(1757) - TMP_JAMP(372) ! used 2 times + TMP_JAMP(2948) = TMP_JAMP(1753) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(378) ! used 2 times + TMP_JAMP(2947) = TMP_JAMP(1714) + TMP_JAMP(401) ! used 2 times + TMP_JAMP(2946) = TMP_JAMP(1682) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(544) ! used 2 times + TMP_JAMP(2945) = TMP_JAMP(1610) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(578) ! used 2 times + TMP_JAMP(2944) = TMP_JAMP(1586) + TMP_JAMP(1389) ! used 2 times + TMP_JAMP(2943) = TMP_JAMP(1584) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(1320) ! used 2 times + TMP_JAMP(2942) = TMP_JAMP(1575) - TMP_JAMP(1414) ! used 2 times + JAMP(1,1) = (-1.000000000000000D+00)*AMP(251) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(289) + $ +TMP_JAMP(360)+TMP_JAMP(485)+((0.000000000000000D+00, + $ -1.000000000000000D+00))*TMP_JAMP(558)+((0.000000000000000D+00, + $ -1.000000000000000D+00))*TMP_JAMP(576)+((0.000000000000000D+00 + $ ,1.000000000000000D+00))*AMP(1489)+(-1.000000000000000D+00) + $ *TMP_JAMP(2911)+(-1.000000000000000D+00)*TMP_JAMP(2916)+( + $ -1.000000000000000D+00)*TMP_JAMP(2971)+TMP_JAMP(2994) + JAMP(2,1) = (-1.000000000000000D+00)*AMP(242)+( + $ -1.000000000000000D+00)*TMP_JAMP(359)+TMP_JAMP(388) + $ +TMP_JAMP(483)+((0.000000000000000D+00,1.000000000000000D+00)) + $ *TMP_JAMP(498)+((0.000000000000000D+00,-1.000000000000000D+00)) + $ *TMP_JAMP(557)+((0.000000000000000D+00,1.000000000000000D+00)) + $ *TMP_JAMP(576)+((0.000000000000000D+00,-1.000000000000000D+00)) + $ *TMP_JAMP(1580)+((0.000000000000000D+00,1.000000000000000D+00)) + $ *AMP(1480)+TMP_JAMP(2655)+(-1.000000000000000D+00) + $ *TMP_JAMP(2913)+(-1.000000000000000D+00)*TMP_JAMP(2940) + JAMP(3,1) = (-1.000000000000000D+00)*AMP(250)+( + $ -1.000000000000000D+00)*TMP_JAMP(484)+((0.000000000000000D+00 + $ ,1.000000000000000D+00))*TMP_JAMP(495)+((0.000000000000000D+00 + $ ,1.000000000000000D+00))*TMP_JAMP(558)+((0.000000000000000D+00 + $ ,1.000000000000000D+00))*TMP_JAMP(575)+(-1.000000000000000D+00) + $ *TMP_JAMP(2590)+(-1.000000000000000D+00)*TMP_JAMP(2797)+( + $ -1.000000000000000D+00)*TMP_JAMP(2829)+(-1.000000000000000D+00) + $ *TMP_JAMP(2915)+TMP_JAMP(2953)+TMP_JAMP(2980) + JAMP(4,1) = (-1.000000000000000D+00)*AMP(233)+( + $ -1.000000000000000D+00)*TMP_JAMP(259)+((0.000000000000000D+00 + $ ,1.000000000000000D+00))*TMP_JAMP(470)+((0.000000000000000D+00 + $ ,1.000000000000000D+00))*TMP_JAMP(497)+((0.000000000000000D+00, + $ -1.000000000000000D+00))*TMP_JAMP(575)+((0.000000000000000D+00, + $ -1.000000000000000D+00))*TMP_JAMP(1589)+TMP_JAMP(1693) + $ +TMP_JAMP(2050)+((0.000000000000000D+00,1.000000000000000D+00)) + $ *AMP(1471)+(-1.000000000000000D+00)*TMP_JAMP(2353) + $ +TMP_JAMP(2659)+TMP_JAMP(2905)+((0.000000000000000D+00 + $ ,1.000000000000000D+00))*TMP_JAMP(2955)+TMP_JAMP(2960) + JAMP(5,1) = (-1.000000000000000D+00)*AMP(241) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(271) + $ +TMP_JAMP(386)+((0.000000000000000D+00,1.000000000000000D+00)) + $ *TMP_JAMP(515)+((0.000000000000000D+00,1.000000000000000D+00)) + $ *TMP_JAMP(557)+(-1.000000000000000D+00)*TMP_JAMP(1526)+( + $ -1.000000000000000D+00)*TMP_JAMP(1825)+TMP_JAMP(2268)+( + $ -1.000000000000000D+00)*TMP_JAMP(2308)+TMP_JAMP(2430)+( + $ -1.000000000000000D+00)*TMP_JAMP(2446)+(-1.000000000000000D+00) + $ *TMP_JAMP(2654)+(-1.000000000000000D+00)*TMP_JAMP(2963) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(2978) + $ +(-1.000000000000000D+00)*TMP_JAMP(2985) + JAMP(6,1) = (-1.000000000000000D+00)*AMP(232) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(287) + $ +TMP_JAMP(387)+((0.000000000000000D+00,1.000000000000000D+00)) + $ *TMP_JAMP(523)+(-1.000000000000000D+00)*TMP_JAMP(2440)+( + $ -1.000000000000000D+00)*TMP_JAMP(2743)+(-1.000000000000000D+00) + $ *TMP_JAMP(2914)+(-1.000000000000000D+00)*TMP_JAMP(2960) + $ +TMP_JAMP(2963)+((0.000000000000000D+00,-1.000000000000000D+00)) + $ *TMP_JAMP(2979)+(-1.000000000000000D+00)*TMP_JAMP(3007) + JAMP(7,1) = (-1.000000000000000D+00)*AMP(253)+( + $ -1.000000000000000D+00)*TMP_JAMP(147)+TMP_JAMP(373) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(573) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(1393) + $ +(-1.000000000000000D+00)*TMP_JAMP(1592)+((0.000000000000000D + $ +00,1.000000000000000D+00))*TMP_JAMP(1987)+(-1.000000000000000D + $ +00)*TMP_JAMP(2627)+TMP_JAMP(2636)+TMP_JAMP(2844)+( + $ -1.000000000000000D+00)*TMP_JAMP(2855)+TMP_JAMP(2971)+( + $ -1.000000000000000D+00)*TMP_JAMP(2974) + JAMP(8,1) = (-1.000000000000000D+00)*AMP(244) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(117) + $ +(-1.000000000000000D+00)*TMP_JAMP(388)+((0.000000000000000D+00 + $ ,1.000000000000000D+00))*TMP_JAMP(487)+((0.000000000000000D+00 + $ ,1.000000000000000D+00))*TMP_JAMP(573)+((0.000000000000000D+00 + $ ,1.000000000000000D+00))*TMP_JAMP(1405)+((0.000000000000000D+00 + $ ,1.000000000000000D+00))*TMP_JAMP(1777)+((0.000000000000000D+00 + $ ,-1.000000000000000D+00))*TMP_JAMP(1850)+TMP_JAMP(2513)+( + $ -1.000000000000000D+00)*TMP_JAMP(2759)+TMP_JAMP(2854) + $ +TMP_JAMP(2924)+(-1.000000000000000D+00)*TMP_JAMP(2949) + JAMP(9,1) = (-1.000000000000000D+00)*AMP(252) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(272) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(283) + $ +(-1.000000000000000D+00)*TMP_JAMP(371)+(-1.000000000000000D+00) + $ *TMP_JAMP(373)+(-1.000000000000000D+00)*TMP_JAMP(379) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(490) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(1397) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(1752) + $ +(-1.000000000000000D+00)*TMP_JAMP(2055)+TMP_JAMP(2099)+( + $ -1.000000000000000D+00)*TMP_JAMP(2641)+TMP_JAMP(2661)+( + $ -1.000000000000000D+00)*TMP_JAMP(2667)+TMP_JAMP(2674) + $ +TMP_JAMP(2747) + JAMP(10,1) = (-1.000000000000000D+00)*AMP(161) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(274) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(289) + $ +TMP_JAMP(371)+(-1.000000000000000D+00)*TMP_JAMP(546) + $ +TMP_JAMP(551)+((0.000000000000000D+00,1.000000000000000D+00)) + $ *TMP_JAMP(1247)+(-1.000000000000000D+00)*TMP_JAMP(1385)+( + $ -1.000000000000000D+00)*TMP_JAMP(1621)+(-1.000000000000000D+00) + $ *TMP_JAMP(1702)+TMP_JAMP(1837)+TMP_JAMP(1974) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(2139) + $ +TMP_JAMP(2677)+(-1.000000000000000D+00)*TMP_JAMP(2896) + JAMP(11,1) = AMP(213)+(-1.000000000000000D+00)*AMP(243) + $ +((0.000000000000000D+00,1.000000000000000D+00))*AMP(249) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(269) + $ +(-1.000000000000000D+00)*TMP_JAMP(391)+((0.000000000000000D+00 + $ ,-1.000000000000000D+00))*TMP_JAMP(488)+(-1.000000000000000D+00) + $ *TMP_JAMP(1415)+TMP_JAMP(1486)+(-1.000000000000000D+00) + $ *TMP_JAMP(1642)+TMP_JAMP(1816)+(-1.000000000000000D+00) + $ *TMP_JAMP(2276)+(-1.000000000000000D+00)*TMP_JAMP(2673)+( + $ -1.000000000000000D+00)*TMP_JAMP(2764)+TMP_JAMP(2775)+( + $ -1.000000000000000D+00)*TMP_JAMP(2923)+TMP_JAMP(2949) + $ +TMP_JAMP(2962) JAMP(12,1) = (-1.000000000000000D+00)*AMP(160) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*AMP(201) - $ +((0.000000000000000D+00,1.000000000000000D+00))*AMP(496) - $ +TMP_JAMP(663)+TMP_JAMP(824)+TMP_JAMP(828)+((0.000000000000000D - $ +00,1.000000000000000D+00))*TMP_JAMP(1151)+((0.000000000000000D - $ +00,-1.000000000000000D+00))*TMP_JAMP(1220) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(1223) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(2024) - $ +TMP_JAMP(2571)+TMP_JAMP(2662)+TMP_JAMP(2745) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(497) + $ +TMP_JAMP(546)+((0.000000000000000D+00,1.000000000000000D+00)) + $ *TMP_JAMP(1057)+((0.000000000000000D+00,-1.000000000000000D+00)) + $ *TMP_JAMP(1375)+TMP_JAMP(1959)+(-1.000000000000000D+00) + $ *TMP_JAMP(2057)+TMP_JAMP(2594)+(-1.000000000000000D+00) + $ *TMP_JAMP(2900)+(-1.000000000000000D+00)*TMP_JAMP(2962) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(2981) JAMP(13,1) = (-1.000000000000000D+00)*AMP(255) - $ +((0.000000000000000D+00,1.000000000000000D+00))*AMP(775) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(2032) - $ +(-1.000000000000000D+00)*TMP_JAMP(2034)+((0.000000000000000D - $ +00,-1.000000000000000D+00))*TMP_JAMP(2036) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(2039) - $ +(-1.000000000000000D+00)*TMP_JAMP(2126)+((0.000000000000000D - $ +00,1.000000000000000D+00))*TMP_JAMP(2647)+(-1.000000000000000D - $ +00)*TMP_JAMP(2654) - JAMP(14,1) = (-1.000000000000000D+00)*AMP(235)+AMP(311) - $ +((0.000000000000000D+00,1.000000000000000D+00))*AMP(766) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(1207) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(2032) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(2048) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(2319) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(2554) - $ +TMP_JAMP(2650)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(2746) - JAMP(15,1) = (-1.000000000000000D+00)*AMP(254)+AMP(300) - $ +((0.000000000000000D+00,1.000000000000000D+00))*AMP(774) - $ +TMP_JAMP(2033)+(-1.000000000000000D+00)*TMP_JAMP(2035) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(2037) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(2038) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(2044) - $ +(-1.000000000000000D+00)*TMP_JAMP(2652)+((0.000000000000000D - $ +00,1.000000000000000D+00))*TMP_JAMP(2696) - JAMP(16,1) = (-1.000000000000000D+00)*AMP(163)+AMP(176) - $ +((0.000000000000000D+00,1.000000000000000D+00))*AMP(656) - $ +TMP_JAMP(867)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(1151)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(1222)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(2044)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(2053)+TMP_JAMP(2332)+TMP_JAMP(2650) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(2747) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(277) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(491) + $ +TMP_JAMP(548)+((0.000000000000000D+00,-1.000000000000000D+00)) + $ *TMP_JAMP(1396)+(-1.000000000000000D+00)*TMP_JAMP(1678)+( + $ -1.000000000000000D+00)*TMP_JAMP(1933)+TMP_JAMP(2636) + $ +TMP_JAMP(2788)+(-1.000000000000000D+00)*TMP_JAMP(2904) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(2948) + $ +(-1.000000000000000D+00)*TMP_JAMP(2980) + JAMP(14,1) = (-1.000000000000000D+00)*AMP(235) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(118) + $ +(-1.000000000000000D+00)*TMP_JAMP(154)+TMP_JAMP(382) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(488) + $ +(-1.000000000000000D+00)*TMP_JAMP(548)+((0.000000000000000D+00 + $ ,1.000000000000000D+00))*TMP_JAMP(1785)+TMP_JAMP(2588) + $ +TMP_JAMP(2790)+(-1.000000000000000D+00)*TMP_JAMP(2833) + $ +TMP_JAMP(2925)+(-1.000000000000000D+00)*TMP_JAMP(2942) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(2955) + JAMP(15,1) = (-1.000000000000000D+00)*AMP(254)+( + $ -1.000000000000000D+00)*TMP_JAMP(151)+((0.000000000000000D+00, + $ -1.000000000000000D+00))*TMP_JAMP(265)+TMP_JAMP(380) + $ +TMP_JAMP(1383)+((0.000000000000000D+00,1.000000000000000D+00)) + $ *TMP_JAMP(1419)+TMP_JAMP(2055)+TMP_JAMP(2738)+( + $ -1.000000000000000D+00)*TMP_JAMP(2881)+(-1.000000000000000D+00) + $ *TMP_JAMP(2921)+((0.000000000000000D+00,-1.000000000000000D+00)) + $ *TMP_JAMP(2948)+TMP_JAMP(2994) + JAMP(16,1) = (-1.000000000000000D+00)*AMP(163) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(266) + $ +(-1.000000000000000D+00)*TMP_JAMP(385)+(-1.000000000000000D+00) + $ *TMP_JAMP(400)+((0.000000000000000D+00,-1.000000000000000D+00)) + $ *TMP_JAMP(496)+((0.000000000000000D+00,1.000000000000000D+00)) + $ *TMP_JAMP(1232)+((0.000000000000000D+00,-1.000000000000000D+00)) + $ *TMP_JAMP(1419)+(-1.000000000000000D+00)*TMP_JAMP(1712) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(2139) + $ +TMP_JAMP(2606)+(-1.000000000000000D+00)*TMP_JAMP(2745) + $ +TMP_JAMP(2927)+((0.000000000000000D+00,1.000000000000000D+00)) + $ *TMP_JAMP(2943) JAMP(17,1) = (-1.000000000000000D+00)*AMP(234) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(1945) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(2048) - $ +TMP_JAMP(2338)+(-1.000000000000000D+00)*TMP_JAMP(2342) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(2651) - $ +(-1.000000000000000D+00)*TMP_JAMP(2652)+TMP_JAMP(2663)+( - $ -1.000000000000000D+00)*TMP_JAMP(2748) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(279) + $ +(-1.000000000000000D+00)*TMP_JAMP(382)+(-1.000000000000000D+00) + $ *TMP_JAMP(383)+(-1.000000000000000D+00)*TMP_JAMP(398) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(489) + $ +TMP_JAMP(667)+(-1.000000000000000D+00)*TMP_JAMP(1520) + $ +TMP_JAMP(1639)+(-1.000000000000000D+00)*TMP_JAMP(1665) + $ +TMP_JAMP(1817)+(-1.000000000000000D+00)*TMP_JAMP(2280) + $ +TMP_JAMP(2551)+(-1.000000000000000D+00)*TMP_JAMP(2672)+( + $ -1.000000000000000D+00)*TMP_JAMP(2810)+TMP_JAMP(2972)+( + $ -1.000000000000000D+00)*TMP_JAMP(3029) JAMP(18,1) = (-1.000000000000000D+00)*AMP(162) $ +((0.000000000000000D+00,1.000000000000000D+00))*AMP(174) - $ +((0.000000000000000D+00,1.000000000000000D+00))*AMP(655) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(1198) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(2049) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(2053) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(2070) - $ +TMP_JAMP(2077)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(2344)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(2612)+(-1.000000000000000D+00)*TMP_JAMP(2654) - $ +TMP_JAMP(2748) - JAMP(19,1) = ((0.000000000000000D+00,-1.000000000000000D+00)) - $ *AMP(226)+(-1.000000000000000D+00)*AMP(246) - $ +((0.000000000000000D+00,1.000000000000000D+00))*AMP(934) - $ +TMP_JAMP(611)+TMP_JAMP(737)+((0.000000000000000D+00 - $ ,1.000000000000000D+00))*TMP_JAMP(2055)+((0.000000000000000D+00 - $ ,1.000000000000000D+00))*TMP_JAMP(2656)+(-1.000000000000000D+00) - $ *TMP_JAMP(2682)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(2749)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(2750) - JAMP(20,1) = ((0.000000000000000D+00,-1.000000000000000D+00)) - $ *AMP(223)+(-1.000000000000000D+00)*AMP(237)+AMP(866) - $ +TMP_JAMP(717)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(1206)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(1230)+TMP_JAMP(1232)+((0.000000000000000D+00 - $ ,1.000000000000000D+00))*TMP_JAMP(1930)+((0.000000000000000D+00 - $ ,1.000000000000000D+00))*TMP_JAMP(2057)+((0.000000000000000D+00 - $ ,-1.000000000000000D+00))*TMP_JAMP(2074)+((0.000000000000000D - $ +00,1.000000000000000D+00))*TMP_JAMP(2160)+TMP_JAMP(2503) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(2749) - JAMP(21,1) = (-1.000000000000000D+00)*AMP(245) - $ +((0.000000000000000D+00,1.000000000000000D+00))*AMP(933)+( - $ -1.000000000000000D+00)*TMP_JAMP(723)+((0.000000000000000D+00, - $ -1.000000000000000D+00))*TMP_JAMP(1219)+((0.000000000000000D+00 - $ ,1.000000000000000D+00))*TMP_JAMP(1223)+TMP_JAMP(1658) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(1938) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(2658) - $ +(-1.000000000000000D+00)*TMP_JAMP(2660)+((0.000000000000000D - $ +00,1.000000000000000D+00))*TMP_JAMP(2661)+((0.000000000000000D - $ +00,-1.000000000000000D+00))*TMP_JAMP(2750) - JAMP(22,1) = (-1.000000000000000D+00)*AMP(165) - $ +((0.000000000000000D+00,1.000000000000000D+00))*AMP(815) - $ +AMP(830)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(1217)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(1218)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(1932)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(2067)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(2069)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(2070)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(2078)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(2283)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(2661)+(-1.000000000000000D+00)*TMP_JAMP(2662) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(282) + $ +TMP_JAMP(383)+TMP_JAMP(385)+(-1.000000000000000D+00) + $ *TMP_JAMP(402)+((0.000000000000000D+00,-1.000000000000000D+00)) + $ *TMP_JAMP(498)+(-1.000000000000000D+00)*TMP_JAMP(1640) + $ +TMP_JAMP(1708)+TMP_JAMP(1962)+((0.000000000000000D+00, + $ -1.000000000000000D+00))*TMP_JAMP(2120)+TMP_JAMP(2515) + $ +TMP_JAMP(2561)+(-1.000000000000000D+00)*TMP_JAMP(2823)+( + $ -1.000000000000000D+00)*TMP_JAMP(2958) + JAMP(19,1) = (-1.000000000000000D+00)*AMP(246) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(276) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(327) + $ +(-1.000000000000000D+00)*TMP_JAMP(389)+TMP_JAMP(404) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(1399) + $ +(-1.000000000000000D+00)*TMP_JAMP(1638)+TMP_JAMP(1809) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(2005) + $ +(-1.000000000000000D+00)*TMP_JAMP(2439)+TMP_JAMP(2513)+( + $ -1.000000000000000D+00)*TMP_JAMP(2717)+TMP_JAMP(2873)+( + $ -1.000000000000000D+00)*TMP_JAMP(2946)+((0.000000000000000D+00 + $ ,1.000000000000000D+00))*TMP_JAMP(2978) + JAMP(20,1) = (-1.000000000000000D+00)*AMP(237) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(273) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(328) + $ +TMP_JAMP(395)+(-1.000000000000000D+00)*TMP_JAMP(397) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(1401) + $ +(-1.000000000000000D+00)*TMP_JAMP(1508)+(-1.000000000000000D + $ +00)*TMP_JAMP(1660)+((0.000000000000000D+00,1.000000000000000D + $ +00))*TMP_JAMP(1784)+TMP_JAMP(1803)+(-1.000000000000000D+00) + $ *TMP_JAMP(2451)+TMP_JAMP(2588)+TMP_JAMP(2723)+TMP_JAMP(2869) + $ +TMP_JAMP(2946)+((0.000000000000000D+00,1.000000000000000D+00)) + $ *TMP_JAMP(2979) + JAMP(21,1) = (-1.000000000000000D+00)*AMP(245)+( + $ -1.000000000000000D+00)*TMP_JAMP(163)+TMP_JAMP(390) + $ +TMP_JAMP(392)+((0.000000000000000D+00,-1.000000000000000D+00)) + $ *TMP_JAMP(493)+(-1.000000000000000D+00)*TMP_JAMP(550) + $ +TMP_JAMP(759)+(-1.000000000000000D+00)*TMP_JAMP(1376) + $ +TMP_JAMP(1636)+TMP_JAMP(1643)+TMP_JAMP(1659)+( + $ -1.000000000000000D+00)*TMP_JAMP(1808)+((0.000000000000000D+00, + $ -1.000000000000000D+00))*TMP_JAMP(2005)+(-1.000000000000000D+00) + $ *TMP_JAMP(2307)+TMP_JAMP(2485)+(-1.000000000000000D+00) + $ *TMP_JAMP(2703)+(-1.000000000000000D+00)*TMP_JAMP(2872) + $ +TMP_JAMP(2923) + JAMP(22,1) = (-1.000000000000000D+00)*AMP(165)+( + $ -1.000000000000000D+00)*TMP_JAMP(164)+TMP_JAMP(394) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(495) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(1569) + $ +TMP_JAMP(2495)+(-1.000000000000000D+00)*TMP_JAMP(2769) + $ +TMP_JAMP(2919)+(-1.000000000000000D+00)*TMP_JAMP(2947) + $ +TMP_JAMP(2952)+((0.000000000000000D+00,-1.000000000000000D+00)) + $ *TMP_JAMP(2981) JAMP(23,1) = (-1.000000000000000D+00)*AMP(236) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(1225) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(1229) - $ +TMP_JAMP(1233)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(1241)+TMP_JAMP(1668)+((0.000000000000000D+00 - $ ,1.000000000000000D+00))*TMP_JAMP(1940)+((0.000000000000000D+00 - $ ,1.000000000000000D+00))*TMP_JAMP(2072)+((0.000000000000000D+00 - $ ,1.000000000000000D+00))*TMP_JAMP(2074)+TMP_JAMP(2075)+( - $ -1.000000000000000D+00)*TMP_JAMP(2663)+((0.000000000000000D+00 - $ ,1.000000000000000D+00))*TMP_JAMP(2664)+TMP_JAMP(2723) - JAMP(24,1) = (-1.000000000000000D+00)*AMP(164)+TMP_JAMP(737) - $ +TMP_JAMP(739)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(743)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(1235)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(1237)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(1239)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(1242)+TMP_JAMP(1245)+TMP_JAMP(1246)+TMP_JAMP(1248)+( - $ -1.000000000000000D+00)*TMP_JAMP(2077)+((0.000000000000000D+00 - $ ,1.000000000000000D+00))*TMP_JAMP(2078)+((0.000000000000000D+00 - $ ,-1.000000000000000D+00))*TMP_JAMP(2079)+TMP_JAMP(2523)+( - $ -1.000000000000000D+00)*TMP_JAMP(2528)+((0.000000000000000D+00, - $ -1.000000000000000D+00))*TMP_JAMP(2664) - JAMP(25,1) = (-1.000000000000000D+00)*AMP(974) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(2665) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(2671) - $ +TMP_JAMP(2751)+(-1.000000000000000D+00)*TMP_JAMP(2752) - JAMP(26,1) = ((0.000000000000000D+00,1.000000000000000D+00)) - $ *AMP(487)+(-1.000000000000000D+00)*AMP(965)+( - $ -1.000000000000000D+00)*AMP(1010)+TMP_JAMP(812)+TMP_JAMP(815) - $ +TMP_JAMP(1256)+TMP_JAMP(1258)+((0.000000000000000D+00 - $ ,1.000000000000000D+00))*TMP_JAMP(1303)+((0.000000000000000D+00 - $ ,1.000000000000000D+00))*TMP_JAMP(1305)+(-1.000000000000000D+00) - $ *TMP_JAMP(2084)+(-1.000000000000000D+00)*TMP_JAMP(2099) - $ +TMP_JAMP(2167)+(-1.000000000000000D+00)*TMP_JAMP(2667)+( - $ -1.000000000000000D+00)*TMP_JAMP(2751) - JAMP(27,1) = (-1.000000000000000D+00)*AMP(973)+( - $ -1.000000000000000D+00)*TMP_JAMP(1254)+((0.000000000000000D+00, - $ -1.000000000000000D+00))*TMP_JAMP(1476)+TMP_JAMP(2088)+( - $ -1.000000000000000D+00)*TMP_JAMP(2092)+TMP_JAMP(2125) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(2128) - $ +TMP_JAMP(2752) - JAMP(28,1) = AMP(142)+(-1.000000000000000D+00)*AMP(956) - $ +TMP_JAMP(901)+TMP_JAMP(1253)+((0.000000000000000D+00 - $ ,1.000000000000000D+00))*TMP_JAMP(1320)+TMP_JAMP(1329) - $ +TMP_JAMP(2092)+TMP_JAMP(2093)+((0.000000000000000D+00, - $ -1.000000000000000D+00))*TMP_JAMP(2094)+(-1.000000000000000D+00) - $ *TMP_JAMP(2102)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(2754) - JAMP(29,1) = ((0.000000000000000D+00,1.000000000000000D+00)) - $ *AMP(808)+(-1.000000000000000D+00)*AMP(964)+AMP(1637)+( - $ -1.000000000000000D+00)*AMP(1708)+(-1.000000000000000D+00) - $ *TMP_JAMP(698)+(-1.000000000000000D+00)*TMP_JAMP(1255) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(1283) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(1307) - $ +TMP_JAMP(1590)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(1648)+(-1.000000000000000D+00)*TMP_JAMP(2095)+( - $ -1.000000000000000D+00)*TMP_JAMP(2096)+((0.000000000000000D+00, - $ -1.000000000000000D+00))*TMP_JAMP(2098)+TMP_JAMP(2099) - $ +TMP_JAMP(2110)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(2670) - JAMP(30,1) = AMP(136)+(-1.000000000000000D+00)*AMP(955)+( - $ -1.000000000000000D+00)*AMP(1762)+TMP_JAMP(702)+TMP_JAMP(704) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(706) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(764) - $ +TMP_JAMP(1260)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(1322)+TMP_JAMP(2101)+TMP_JAMP(2105)+TMP_JAMP(2146)+( - $ -1.000000000000000D+00)*TMP_JAMP(2161)+((0.000000000000000D+00 - $ ,1.000000000000000D+00))*TMP_JAMP(2458)+TMP_JAMP(2669) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(2670) - JAMP(31,1) = (-1.000000000000000D+00)*AMP(977) - $ +((0.000000000000000D+00,1.000000000000000D+00))*AMP(1142) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(1387) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(1936) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(2671) - $ +(-1.000000000000000D+00)*TMP_JAMP(2673)+((0.000000000000000D - $ +00,1.000000000000000D+00))*TMP_JAMP(2753) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(280) + $ +(-1.000000000000000D+00)*TMP_JAMP(395)+TMP_JAMP(399)+( + $ -1.000000000000000D+00)*TMP_JAMP(405)+(-1.000000000000000D+00) + $ *TMP_JAMP(1808)+((0.000000000000000D+00,-1.000000000000000D+00)) + $ *TMP_JAMP(2010)+(-1.000000000000000D+00)*TMP_JAMP(2348) + $ +TMP_JAMP(2544)+(-1.000000000000000D+00)*TMP_JAMP(2871) + $ +TMP_JAMP(2974)+(-1.000000000000000D+00)*TMP_JAMP(2984) + $ +TMP_JAMP(3029) + JAMP(24,1) = (-1.000000000000000D+00)*AMP(164) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(128) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(281) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(286) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(330) + $ +TMP_JAMP(403)+TMP_JAMP(406)+((0.000000000000000D+00 + $ ,1.000000000000000D+00))*TMP_JAMP(1404)+TMP_JAMP(1605)+( + $ -1.000000000000000D+00)*TMP_JAMP(1804)+((0.000000000000000D+00 + $ ,1.000000000000000D+00))*TMP_JAMP(2120)+TMP_JAMP(2555)+( + $ -1.000000000000000D+00)*TMP_JAMP(2815)+TMP_JAMP(2920) + $ +TMP_JAMP(2947) + JAMP(25,1) = (-1.000000000000000D+00)*TMP_JAMP(360) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(454) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(517) + $ +(-1.000000000000000D+00)*AMP(976)+(-1.000000000000000D+00) + $ *TMP_JAMP(1843)+TMP_JAMP(1859)+((0.000000000000000D+00 + $ ,1.000000000000000D+00))*TMP_JAMP(2085)+TMP_JAMP(2104)+( + $ -1.000000000000000D+00)*TMP_JAMP(2662)+TMP_JAMP(2851) + $ +TMP_JAMP(2865)+TMP_JAMP(3018) + JAMP(26,1) = TMP_JAMP(359)+((0.000000000000000D+00, + $ -1.000000000000000D+00))*TMP_JAMP(463)+((0.000000000000000D+00, + $ -1.000000000000000D+00))*TMP_JAMP(518)+(-1.000000000000000D+00) + $ *TMP_JAMP(834)+(-1.000000000000000D+00)*TMP_JAMP(1019) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(1374) + $ +(-1.000000000000000D+00)*AMP(967)+(-1.000000000000000D+00) + $ *TMP_JAMP(1479)+TMP_JAMP(1842)+((0.000000000000000D+00, + $ -1.000000000000000D+00))*TMP_JAMP(2085)+(-1.000000000000000D+00) + $ *TMP_JAMP(2129)+(-1.000000000000000D+00)*TMP_JAMP(2648) + $ +TMP_JAMP(2758)+TMP_JAMP(2778)+(-1.000000000000000D+00) + $ *TMP_JAMP(2859) + JAMP(27,1) = ((0.000000000000000D+00,-1.000000000000000D+00)) + $ *TMP_JAMP(453)+((0.000000000000000D+00,-1.000000000000000D+00)) + $ *TMP_JAMP(513)+(-1.000000000000000D+00)*TMP_JAMP(809)+( + $ -1.000000000000000D+00)*TMP_JAMP(1028)+((0.000000000000000D+00, + $ -1.000000000000000D+00))*TMP_JAMP(1373)+(-1.000000000000000D+00) + $ *AMP(975)+(-1.000000000000000D+00)*TMP_JAMP(1963)+TMP_JAMP(2060) + $ +(-1.000000000000000D+00)*TMP_JAMP(2104)+TMP_JAMP(2317) + $ +TMP_JAMP(2387)+TMP_JAMP(2567)+(-1.000000000000000D+00) + $ *TMP_JAMP(2604)+TMP_JAMP(2796)+TMP_JAMP(2811)+( + $ -1.000000000000000D+00)*TMP_JAMP(2953) + JAMP(28,1) = ((0.000000000000000D+00,-1.000000000000000D+00)) + $ *TMP_JAMP(316)+((0.000000000000000D+00,-1.000000000000000D+00)) + $ *TMP_JAMP(470)+((0.000000000000000D+00,1.000000000000000D+00)) + $ *TMP_JAMP(514)+((0.000000000000000D+00,1.000000000000000D+00)) + $ *TMP_JAMP(735)+((0.000000000000000D+00,1.000000000000000D+00)) + $ *TMP_JAMP(1392)+(-1.000000000000000D+00)*AMP(958)+TMP_JAMP(1448) + $ +(-1.000000000000000D+00)*TMP_JAMP(1839)+((0.000000000000000D + $ +00,1.000000000000000D+00))*TMP_JAMP(1846)+(-1.000000000000000D + $ +00)*TMP_JAMP(1919)+TMP_JAMP(1963)+(-1.000000000000000D+00) + $ *TMP_JAMP(1967)+(-1.000000000000000D+00)*TMP_JAMP(2657)+( + $ -1.000000000000000D+00)*TMP_JAMP(2789)+TMP_JAMP(2824) + $ +TMP_JAMP(2835) + JAMP(29,1) = ((0.000000000000000D+00,-1.000000000000000D+00)) + $ *TMP_JAMP(314)+((0.000000000000000D+00,-1.000000000000000D+00)) + $ *TMP_JAMP(462)+((0.000000000000000D+00,1.000000000000000D+00)) + $ *TMP_JAMP(717)+(-1.000000000000000D+00)*AMP(966)+TMP_JAMP(1709) + $ +(-1.000000000000000D+00)*TMP_JAMP(1874)+TMP_JAMP(2061) + $ +TMP_JAMP(2129)+AMP(1642)+TMP_JAMP(2445)+(-1.000000000000000D + $ +00)*TMP_JAMP(2493)+TMP_JAMP(2647)+TMP_JAMP(2985)+TMP_JAMP(2996) + JAMP(30,1) = ((0.000000000000000D+00,-1.000000000000000D+00)) + $ *TMP_JAMP(320)+((0.000000000000000D+00,1.000000000000000D+00)) + $ *TMP_JAMP(520)+(-1.000000000000000D+00)*AMP(957)+( + $ -1.000000000000000D+00)*TMP_JAMP(1840)+TMP_JAMP(1874) + $ +TMP_JAMP(1919)+TMP_JAMP(1966)+((0.000000000000000D+00, + $ -1.000000000000000D+00))*TMP_JAMP(2064)+TMP_JAMP(2250)+( + $ -1.000000000000000D+00)*TMP_JAMP(2553)+TMP_JAMP(2656) + $ +TMP_JAMP(3000)+TMP_JAMP(3007) + JAMP(31,1) = TMP_JAMP(804)+((0.000000000000000D+00, + $ -1.000000000000000D+00))*TMP_JAMP(1391)+(-1.000000000000000D+00) + $ *AMP(979)+TMP_JAMP(1857)+TMP_JAMP(1894)+TMP_JAMP(2130) + $ +TMP_JAMP(2609)+(-1.000000000000000D+00)*TMP_JAMP(2816) + $ +TMP_JAMP(2825)+(-1.000000000000000D+00)*TMP_JAMP(2863)+( + $ -1.000000000000000D+00)*TMP_JAMP(3018) JAMP(32,1) = ((0.000000000000000D+00,-1.000000000000000D+00)) - $ *AMP(487)+(-1.000000000000000D+00)*AMP(968)+( - $ -1.000000000000000D+00)*TMP_JAMP(709)+((0.000000000000000D+00 - $ ,1.000000000000000D+00))*TMP_JAMP(1394)+((0.000000000000000D+00 - $ ,-1.000000000000000D+00))*TMP_JAMP(2108)+(-1.000000000000000D - $ +00)*TMP_JAMP(2110)+TMP_JAMP(2118)+((0.000000000000000D+00 - $ ,1.000000000000000D+00))*TMP_JAMP(2198)+TMP_JAMP(2223) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(2681) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(2753) - JAMP(33,1) = (-1.000000000000000D+00)*AMP(690)+( - $ -1.000000000000000D+00)*AMP(975)+(-1.000000000000000D+00) - $ *AMP(1654)+(-1.000000000000000D+00)*TMP_JAMP(2114) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(2116) - $ +TMP_JAMP(2133)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(2137)+TMP_JAMP(2673)+TMP_JAMP(2692) - JAMP(34,1) = (-1.000000000000000D+00)*AMP(323) - $ +((0.000000000000000D+00,1.000000000000000D+00))*AMP(327)+( - $ -1.000000000000000D+00)*AMP(834)+((0.000000000000000D+00 - $ ,1.000000000000000D+00))*TMP_JAMP(2113)+((0.000000000000000D+00 - $ ,-1.000000000000000D+00))*TMP_JAMP(2115)+(-1.000000000000000D - $ +00)*TMP_JAMP(2140)+(-1.000000000000000D+00)*TMP_JAMP(2229)+( - $ -1.000000000000000D+00)*TMP_JAMP(2675) - JAMP(35,1) = ((0.000000000000000D+00,-1.000000000000000D+00)) - $ *AMP(809)+(-1.000000000000000D+00)*AMP(966)+TMP_JAMP(1524) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(1938) - $ +(-1.000000000000000D+00)*TMP_JAMP(2117)+TMP_JAMP(2119) - $ +TMP_JAMP(2234)+(-1.000000000000000D+00)*TMP_JAMP(2238)+( - $ -1.000000000000000D+00)*TMP_JAMP(2674)+((0.000000000000000D+00 - $ ,1.000000000000000D+00))*TMP_JAMP(2683) - JAMP(36,1) = (-1.000000000000000D+00)*AMP(321) - $ +((0.000000000000000D+00,1.000000000000000D+00))*AMP(330) - $ +((0.000000000000000D+00,1.000000000000000D+00))*AMP(342)+( - $ -1.000000000000000D+00)*TMP_JAMP(856)+((0.000000000000000D+00, - $ -1.000000000000000D+00))*TMP_JAMP(2122)+(-1.000000000000000D+00) - $ *TMP_JAMP(2173)+TMP_JAMP(2586)+TMP_JAMP(2674)+TMP_JAMP(2675) - JAMP(37,1) = (-1.000000000000000D+00)*AMP(978) - $ +((0.000000000000000D+00,1.000000000000000D+00))*AMP(1220)+( - $ -1.000000000000000D+00)*AMP(1704)+((0.000000000000000D+00, - $ -1.000000000000000D+00))*TMP_JAMP(1385)+(-1.000000000000000D+00) - $ *TMP_JAMP(2124)+(-1.000000000000000D+00)*TMP_JAMP(2127) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(2128) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(2131) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(2135) - $ +TMP_JAMP(2372)+TMP_JAMP(2680) - JAMP(38,1) = (-1.000000000000000D+00)*AMP(959)+AMP(1763) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(1297) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(2131) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(2147) - $ +TMP_JAMP(2357)+(-1.000000000000000D+00)*TMP_JAMP(2366) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(2516) - $ +TMP_JAMP(2677)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(2754) - JAMP(39,1) = (-1.000000000000000D+00)*AMP(976) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(1515) - $ +(-1.000000000000000D+00)*TMP_JAMP(2132)+TMP_JAMP(2134) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(2136) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(2138) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(2139) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(2144) - $ +(-1.000000000000000D+00)*TMP_JAMP(2355)+TMP_JAMP(2370)+( - $ -1.000000000000000D+00)*TMP_JAMP(2678) - JAMP(40,1) = (-1.000000000000000D+00)*AMP(324)+TMP_JAMP(2140) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(2143) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(2144) - $ +TMP_JAMP(2149)+(-1.000000000000000D+00)*TMP_JAMP(2378) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(2381) - $ +TMP_JAMP(2677) - JAMP(41,1) = ((0.000000000000000D+00,-1.000000000000000D+00)) - $ *AMP(631)+(-1.000000000000000D+00)*AMP(957)+TMP_JAMP(963) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(1940) - $ +TMP_JAMP(2146)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(2147)+TMP_JAMP(2387)+TMP_JAMP(2392)+( - $ -1.000000000000000D+00)*TMP_JAMP(2678)+((0.000000000000000D+00 - $ ,1.000000000000000D+00))*TMP_JAMP(2679)+TMP_JAMP(2755) - JAMP(42,1) = (-1.000000000000000D+00)*AMP(319) - $ +((0.000000000000000D+00,1.000000000000000D+00))*AMP(360)+( - $ -1.000000000000000D+00)*AMP(468)+(-1.000000000000000D+00) - $ *TMP_JAMP(958)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(1795)+(-1.000000000000000D+00)*TMP_JAMP(2148) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(2153) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(2189) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(2394) - $ +TMP_JAMP(2630)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(2679)+TMP_JAMP(2680) - JAMP(43,1) = AMP(549)+(-1.000000000000000D+00)*AMP(969) - $ +((0.000000000000000D+00,1.000000000000000D+00))*AMP(1298) - $ +AMP(1307)+TMP_JAMP(801)+((0.000000000000000D+00, - $ -1.000000000000000D+00))*TMP_JAMP(1333)+TMP_JAMP(1341) - $ +TMP_JAMP(1582)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(2154)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(2157)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(2158)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(2163)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(2166)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(2681)+(-1.000000000000000D+00)*TMP_JAMP(2682) - JAMP(44,1) = AMP(708)+(-1.000000000000000D+00)*AMP(960) - $ +((0.000000000000000D+00,1.000000000000000D+00))*AMP(1289) - $ +TMP_JAMP(610)+(-1.000000000000000D+00)*TMP_JAMP(780) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(1296) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(1325) - $ +TMP_JAMP(1327)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(1939)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(2158)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(2159)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(2160)+TMP_JAMP(2161)+((0.000000000000000D+00 - $ ,1.000000000000000D+00))*TMP_JAMP(2162)+((0.000000000000000D+00 - $ ,-1.000000000000000D+00))*TMP_JAMP(2164)+((0.000000000000000D - $ +00,1.000000000000000D+00))*TMP_JAMP(2179) - JAMP(45,1) = (-1.000000000000000D+00)*AMP(967)+( - $ -1.000000000000000D+00)*TMP_JAMP(579)+(-1.000000000000000D+00) - $ *TMP_JAMP(787)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(1308)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(1314)+TMP_JAMP(1695)+((0.000000000000000D+00 - $ ,1.000000000000000D+00))*TMP_JAMP(1941)+((0.000000000000000D+00 - $ ,-1.000000000000000D+00))*TMP_JAMP(2166)+TMP_JAMP(2168) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(2177) - $ +(-1.000000000000000D+00)*TMP_JAMP(2544)+((0.000000000000000D - $ +00,-1.000000000000000D+00))*TMP_JAMP(2683) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(2684) + $ *TMP_JAMP(949)+((0.000000000000000D+00,-1.000000000000000D+00)) + $ *TMP_JAMP(1147)+TMP_JAMP(1280)+((0.000000000000000D+00, + $ -1.000000000000000D+00))*TMP_JAMP(1374)+(-1.000000000000000D+00) + $ *AMP(970)+((0.000000000000000D+00,-1.000000000000000D+00)) + $ *TMP_JAMP(2067)+(-1.000000000000000D+00)*TMP_JAMP(2130) + $ +TMP_JAMP(2333)+(-1.000000000000000D+00)*TMP_JAMP(2542) + $ +TMP_JAMP(2713)+(-1.000000000000000D+00)*TMP_JAMP(2763) + $ +TMP_JAMP(2854)+TMP_JAMP(2957)+(-1.000000000000000D+00) + $ *TMP_JAMP(3001) + JAMP(33,1) = (-1.000000000000000D+00)*TMP_JAMP(1102)+( + $ -1.000000000000000D+00)*TMP_JAMP(1256)+((0.000000000000000D+00 + $ ,1.000000000000000D+00))*TMP_JAMP(1391)+(-1.000000000000000D+00) + $ *AMP(977)+(-1.000000000000000D+00)*TMP_JAMP(1688)+( + $ -1.000000000000000D+00)*TMP_JAMP(2556)+TMP_JAMP(2811) + $ +TMP_JAMP(2817)+TMP_JAMP(2882)+((0.000000000000000D+00 + $ ,1.000000000000000D+00))*TMP_JAMP(2976)+(-1.000000000000000D+00) + $ *TMP_JAMP(3030) + JAMP(34,1) = (-1.000000000000000D+00)*AMP(323)+TMP_JAMP(419) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(511) + $ +TMP_JAMP(1102)+((0.000000000000000D+00,-1.000000000000000D+00)) + $ *TMP_JAMP(1147)+((0.000000000000000D+00,-1.000000000000000D+00)) + $ *TMP_JAMP(1281)+TMP_JAMP(1604)+TMP_JAMP(2553)+( + $ -1.000000000000000D+00)*TMP_JAMP(2813)+TMP_JAMP(2920)+( + $ -1.000000000000000D+00)*TMP_JAMP(2951)+TMP_JAMP(2954)+( + $ -1.000000000000000D+00)*TMP_JAMP(2969) + JAMP(35,1) = (-1.000000000000000D+00)*TMP_JAMP(1001)+( + $ -1.000000000000000D+00)*TMP_JAMP(1022)+(-1.000000000000000D+00) + $ *TMP_JAMP(1033)+((0.000000000000000D+00,1.000000000000000D+00)) + $ *TMP_JAMP(1152)+((0.000000000000000D+00,1.000000000000000D+00)) + $ *TMP_JAMP(1155)+((0.000000000000000D+00,-1.000000000000000D+00)) + $ *TMP_JAMP(1224)+(-1.000000000000000D+00)*AMP(968)+TMP_JAMP(1582) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(2006) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(2105) + $ +TMP_JAMP(2514)+TMP_JAMP(2546)+TMP_JAMP(2695)+( + $ -1.000000000000000D+00)*TMP_JAMP(2712)+(-1.000000000000000D+00) + $ *TMP_JAMP(2875)+((0.000000000000000D+00,1.000000000000000D+00)) + $ *TMP_JAMP(2956)+TMP_JAMP(3001) + JAMP(36,1) = (-1.000000000000000D+00)*AMP(321)+TMP_JAMP(431) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(504) + $ +TMP_JAMP(553)+TMP_JAMP(814)+((0.000000000000000D+00 + $ ,1.000000000000000D+00))*TMP_JAMP(839)+((0.000000000000000D+00, + $ -1.000000000000000D+00))*TMP_JAMP(1152)+((0.000000000000000D+00 + $ ,-1.000000000000000D+00))*TMP_JAMP(1156)+TMP_JAMP(1271) + $ +TMP_JAMP(1520)+TMP_JAMP(1706)+(-1.000000000000000D+00) + $ *TMP_JAMP(1933)+TMP_JAMP(2059)+TMP_JAMP(2515)+TMP_JAMP(2557)+( + $ -1.000000000000000D+00)*TMP_JAMP(2818)+TMP_JAMP(2969) + JAMP(37,1) = TMP_JAMP(786)+((0.000000000000000D+00, + $ -1.000000000000000D+00))*TMP_JAMP(910)+TMP_JAMP(1277) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(1346) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(1373) + $ +(-1.000000000000000D+00)*AMP(980)+TMP_JAMP(1883) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(2066) + $ +TMP_JAMP(2128)+TMP_JAMP(2609)+(-1.000000000000000D+00) + $ *TMP_JAMP(2846)+(-1.000000000000000D+00)*TMP_JAMP(2899)+( + $ -1.000000000000000D+00)*TMP_JAMP(2904) + JAMP(38,1) = ((0.000000000000000D+00,1.000000000000000D+00)) + $ *TMP_JAMP(933)+((0.000000000000000D+00,-1.000000000000000D+00)) + $ *TMP_JAMP(965)+TMP_JAMP(1005)+((0.000000000000000D+00, + $ -1.000000000000000D+00))*TMP_JAMP(1143)+((0.000000000000000D+00 + $ ,-1.000000000000000D+00))*TMP_JAMP(1148)+((0.000000000000000D + $ +00,-1.000000000000000D+00))*TMP_JAMP(1392)+( + $ -1.000000000000000D+00)*AMP(961)+(-1.000000000000000D+00) + $ *TMP_JAMP(2128)+((0.000000000000000D+00,-1.000000000000000D+00)) + $ *TMP_JAMP(2138)+TMP_JAMP(2296)+(-1.000000000000000D+00) + $ *TMP_JAMP(2483)+(-1.000000000000000D+00)*TMP_JAMP(2535)+( + $ -1.000000000000000D+00)*TMP_JAMP(2576)+(-1.000000000000000D+00) + $ *TMP_JAMP(2707)+TMP_JAMP(2712)+TMP_JAMP(2793) + JAMP(39,1) = (-1.000000000000000D+00)*TMP_JAMP(827)+( + $ -1.000000000000000D+00)*TMP_JAMP(1020)+(-1.000000000000000D+00) + $ *TMP_JAMP(1039)+TMP_JAMP(1100)+(-1.000000000000000D+00) + $ *TMP_JAMP(1255)+((0.000000000000000D+00,-1.000000000000000D+00)) + $ *TMP_JAMP(1346)+(-1.000000000000000D+00)*AMP(978)+TMP_JAMP(1686) + $ +(-1.000000000000000D+00)*TMP_JAMP(1799)+((0.000000000000000D + $ +00,1.000000000000000D+00))*TMP_JAMP(1988)+(-1.000000000000000D + $ +00)*TMP_JAMP(2497)+TMP_JAMP(2591)+(-1.000000000000000D+00) + $ *TMP_JAMP(2687)+TMP_JAMP(2770)+TMP_JAMP(2847)+TMP_JAMP(3030) + JAMP(40,1) = (-1.000000000000000D+00)*AMP(324) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(240) + $ +TMP_JAMP(418)+((0.000000000000000D+00,1.000000000000000D+00)) + $ *TMP_JAMP(510)+((0.000000000000000D+00,-1.000000000000000D+00)) + $ *TMP_JAMP(848)+(-1.000000000000000D+00)*TMP_JAMP(1100) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(1143) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(1282) + $ +TMP_JAMP(1600)+(-1.000000000000000D+00)*TMP_JAMP(1841) + $ +TMP_JAMP(2493)+(-1.000000000000000D+00)*TMP_JAMP(2767) + $ +TMP_JAMP(2919)+TMP_JAMP(2951)+(-1.000000000000000D+00) + $ *TMP_JAMP(2968) + JAMP(41,1) = (-1.000000000000000D+00)*TMP_JAMP(771)+( + $ -1.000000000000000D+00)*TMP_JAMP(1002)+((0.000000000000000D+00 + $ ,1.000000000000000D+00))*TMP_JAMP(1144)+((0.000000000000000D+00 + $ ,1.000000000000000D+00))*TMP_JAMP(1159)+((0.000000000000000D+00 + $ ,-1.000000000000000D+00))*TMP_JAMP(1211)+(-1.000000000000000D + $ +00)*TMP_JAMP(1270)+((0.000000000000000D+00,-1.000000000000000D + $ +00))*TMP_JAMP(1311)+(-1.000000000000000D+00)*AMP(959) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(1784) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(1868) + $ +(-1.000000000000000D+00)*TMP_JAMP(1939)+((0.000000000000000D + $ +00,-1.000000000000000D+00))*TMP_JAMP(2086)+TMP_JAMP(2487) + $ +TMP_JAMP(2707)+(-1.000000000000000D+00)*TMP_JAMP(2713)+( + $ -1.000000000000000D+00)*TMP_JAMP(2877)+TMP_JAMP(2884) + JAMP(42,1) = (-1.000000000000000D+00)*AMP(319)+TMP_JAMP(187) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(242) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(303) + $ +(-1.000000000000000D+00)*TMP_JAMP(412)+TMP_JAMP(436) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(839) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(1150) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(1240) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(1311) + $ +TMP_JAMP(1705)+(-1.000000000000000D+00)*TMP_JAMP(1842)+( + $ -1.000000000000000D+00)*TMP_JAMP(1915)+(-1.000000000000000D+00) + $ *TMP_JAMP(1941)+TMP_JAMP(2594)+(-1.000000000000000D+00) + $ *TMP_JAMP(2899)+TMP_JAMP(2968) + JAMP(43,1) = TMP_JAMP(678)+((0.000000000000000D+00, + $ -1.000000000000000D+00))*TMP_JAMP(688)+((0.000000000000000D+00, + $ -1.000000000000000D+00))*TMP_JAMP(949)+TMP_JAMP(1387)+( + $ -1.000000000000000D+00)*AMP(971)+TMP_JAMP(2125)+TMP_JAMP(2127) + $ +(-1.000000000000000D+00)*TMP_JAMP(2481)+TMP_JAMP(2497)+( + $ -1.000000000000000D+00)*TMP_JAMP(2722)+(-1.000000000000000D+00) + $ *TMP_JAMP(2897)+(-1.000000000000000D+00)*TMP_JAMP(2996) + JAMP(44,1) = TMP_JAMP(1384)+(-1.000000000000000D+00)*AMP(962)+( + $ -1.000000000000000D+00)*TMP_JAMP(2126)+(-1.000000000000000D+00) + $ *TMP_JAMP(2127)+(-1.000000000000000D+00)*TMP_JAMP(2535) + $ +TMP_JAMP(2556)+(-1.000000000000000D+00)*TMP_JAMP(2730)+( + $ -1.000000000000000D+00)*TMP_JAMP(3000)+(-1.000000000000000D+00) + $ *TMP_JAMP(3025) + JAMP(45,1) = ((0.000000000000000D+00,1.000000000000000D+00)) + $ *TMP_JAMP(728)+((0.000000000000000D+00,1.000000000000000D+00)) + $ *TMP_JAMP(874)+TMP_JAMP(1382)+(-1.000000000000000D+00) + $ *TMP_JAMP(1387)+(-1.000000000000000D+00)*AMP(969)+TMP_JAMP(1824) + $ +(-1.000000000000000D+00)*TMP_JAMP(2088)+((0.000000000000000D + $ +00,1.000000000000000D+00))*TMP_JAMP(2105)+(-1.000000000000000D + $ +00)*TMP_JAMP(2327)+(-1.000000000000000D+00)*TMP_JAMP(2608) + $ +TMP_JAMP(2653)+TMP_JAMP(2778)+(-1.000000000000000D+00) + $ *TMP_JAMP(2883)+TMP_JAMP(3010) JAMP(46,1) = (-1.000000000000000D+00)*AMP(322) - $ +((0.000000000000000D+00,1.000000000000000D+00))*AMP(380) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(1312) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(2171) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(2172) - $ +(-1.000000000000000D+00)*TMP_JAMP(2174)+TMP_JAMP(2185) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(2188) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(2297) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(2684) - JAMP(47,1) = (-1.000000000000000D+00)*AMP(958) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(1318) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(1324) - $ +TMP_JAMP(1328)+TMP_JAMP(1705)+((0.000000000000000D+00 - $ ,1.000000000000000D+00))*TMP_JAMP(1945)+((0.000000000000000D+00 - $ ,1.000000000000000D+00))*TMP_JAMP(2176)+((0.000000000000000D+00 - $ ,-1.000000000000000D+00))*TMP_JAMP(2179)+((0.000000000000000D - $ +00,1.000000000000000D+00))*TMP_JAMP(2180)+((0.000000000000000D - $ +00,1.000000000000000D+00))*TMP_JAMP(2186)+TMP_JAMP(2732)+( - $ -1.000000000000000D+00)*TMP_JAMP(2755) - JAMP(48,1) = (-1.000000000000000D+00)*AMP(320)+( - $ -1.000000000000000D+00)*AMP(466)+(-1.000000000000000D+00) - $ *AMP(467)+TMP_JAMP(801)+((0.000000000000000D+00, - $ -1.000000000000000D+00))*TMP_JAMP(1332)+((0.000000000000000D+00 - $ ,-1.000000000000000D+00))*TMP_JAMP(1334)+TMP_JAMP(1342) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(1710) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(2183) - $ +(-1.000000000000000D+00)*TMP_JAMP(2184)+((0.000000000000000D - $ +00,1.000000000000000D+00))*TMP_JAMP(2187)+((0.000000000000000D - $ +00,-1.000000000000000D+00))*TMP_JAMP(2189) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(2190) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(2479) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(2565) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(133) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(292) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(331) + $ +TMP_JAMP(429)+((0.000000000000000D+00,1.000000000000000D+00)) + $ *TMP_JAMP(480)+(-1.000000000000000D+00)*TMP_JAMP(553) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(686) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(848) + $ +(-1.000000000000000D+00)*TMP_JAMP(1382)+(-1.000000000000000D + $ +00)*TMP_JAMP(2031)+(-1.000000000000000D+00)*TMP_JAMP(2060) + $ +TMP_JAMP(2927)+(-1.000000000000000D+00)*TMP_JAMP(3025) + JAMP(47,1) = TMP_JAMP(1129)+((0.000000000000000D+00, + $ -1.000000000000000D+00))*TMP_JAMP(1158)+((0.000000000000000D+00 + $ ,-1.000000000000000D+00))*TMP_JAMP(1303)+(-1.000000000000000D + $ +00)*TMP_JAMP(1384)+(-1.000000000000000D+00)*AMP(960) + $ +TMP_JAMP(1563)+((0.000000000000000D+00,1.000000000000000D+00)) + $ *TMP_JAMP(2086)+(-1.000000000000000D+00)*TMP_JAMP(2089)+( + $ -1.000000000000000D+00)*TMP_JAMP(2364)+TMP_JAMP(2466)+( + $ -1.000000000000000D+00)*TMP_JAMP(2558)+TMP_JAMP(2658) + $ +TMP_JAMP(2824)+(-1.000000000000000D+00)*TMP_JAMP(2931) + $ +TMP_JAMP(3010) + JAMP(48,1) = (-1.000000000000000D+00)*AMP(320) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(331) + $ +TMP_JAMP(411)+TMP_JAMP(430)+(-1.000000000000000D+00) + $ *TMP_JAMP(441)+((0.000000000000000D+00,-1.000000000000000D+00)) + $ *TMP_JAMP(503)+((0.000000000000000D+00,1.000000000000000D+00)) + $ *TMP_JAMP(1065)+(-1.000000000000000D+00)*TMP_JAMP(1129) + $ +TMP_JAMP(1133)+((0.000000000000000D+00,-1.000000000000000D+00)) + $ *TMP_JAMP(1244)+TMP_JAMP(1625)+(-1.000000000000000D+00) + $ *TMP_JAMP(1705)+TMP_JAMP(1818)+(-1.000000000000000D+00) + $ *TMP_JAMP(1900)+TMP_JAMP(1972)+TMP_JAMP(2677)+( + $ -1.000000000000000D+00)*TMP_JAMP(2897)+TMP_JAMP(2954) JAMP(49,1) = ((0.000000000000000D+00,1.000000000000000D+00)) - $ *AMP(58)+(-1.000000000000000D+00)*AMP(530)+(-1.000000000000000D - $ +00)*AMP(1403)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(1352)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(2194)+TMP_JAMP(2197)+TMP_JAMP(2201)+TMP_JAMP(2216)+( - $ -1.000000000000000D+00)*TMP_JAMP(2218)+TMP_JAMP(2254) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(2686) - JAMP(50,1) = ((0.000000000000000D+00,1.000000000000000D+00)) - $ *AMP(55)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *AMP(1271)+(-1.000000000000000D+00)*AMP(1397) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*AMP(1409) - $ +AMP(1618)+(-1.000000000000000D+00)*AMP(1883)+TMP_JAMP(750) - $ +TMP_JAMP(1346)+(-1.000000000000000D+00)*TMP_JAMP(1359) - $ +TMP_JAMP(1361)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(1437)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(1441)+TMP_JAMP(1442)+((0.000000000000000D+00 - $ ,1.000000000000000D+00))*TMP_JAMP(2193)+(-1.000000000000000D+00) - $ *TMP_JAMP(2195)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(2196)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(2198)+(-1.000000000000000D+00)*TMP_JAMP(2199) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(2531) + $ *TMP_JAMP(1393)+(-1.000000000000000D+00)*AMP(1405) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(1746) + $ +TMP_JAMP(1892)+(-1.000000000000000D+00)*TMP_JAMP(1939) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(2136) + $ +TMP_JAMP(2579)+TMP_JAMP(2630)+(-1.000000000000000D+00) + $ *TMP_JAMP(2836)+TMP_JAMP(2837)+TMP_JAMP(2860)+TMP_JAMP(2990) + JAMP(50,1) = ((0.000000000000000D+00,-1.000000000000000D+00)) + $ *TMP_JAMP(1405)+(-1.000000000000000D+00)*AMP(1399)+( + $ -1.000000000000000D+00)*TMP_JAMP(1892)+TMP_JAMP(1938) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(1977) + $ +TMP_JAMP(2026)+(-1.000000000000000D+00)*TMP_JAMP(2620) + $ +TMP_JAMP(2731)+TMP_JAMP(2783)+TMP_JAMP(2938)+TMP_JAMP(2986) JAMP(51,1) = ((0.000000000000000D+00,1.000000000000000D+00)) - $ *AMP(749)+(-1.000000000000000D+00)*AMP(1402)+AMP(1700) - $ +TMP_JAMP(1354)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(1484)+(-1.000000000000000D+00)*TMP_JAMP(1488)+( - $ -1.000000000000000D+00)*TMP_JAMP(2201)+((0.000000000000000D+00, - $ -1.000000000000000D+00))*TMP_JAMP(2687)+TMP_JAMP(2688) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(2757) + $ *TMP_JAMP(1394)+((0.000000000000000D+00,1.000000000000000D+00)) + $ *TMP_JAMP(1397)+(-1.000000000000000D+00)*AMP(1404) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(1737) + $ +TMP_JAMP(1891)+TMP_JAMP(1937)+((0.000000000000000D+00, + $ -1.000000000000000D+00))*TMP_JAMP(2136)+TMP_JAMP(2575) + $ +TMP_JAMP(2827)+(-1.000000000000000D+00)*TMP_JAMP(2892)+( + $ -1.000000000000000D+00)*TMP_JAMP(2895) JAMP(52,1) = ((0.000000000000000D+00,-1.000000000000000D+00)) - $ *AMP(497)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *AMP(665)+(-1.000000000000000D+00)*AMP(1018)+( - $ -1.000000000000000D+00)*TMP_JAMP(2203)+(-1.000000000000000D+00) - $ *TMP_JAMP(2248)+(-1.000000000000000D+00)*TMP_JAMP(2688)+( - $ -1.000000000000000D+00)*TMP_JAMP(2756) - JAMP(53,1) = (-1.000000000000000D+00)*AMP(514) - $ +((0.000000000000000D+00,1.000000000000000D+00))*AMP(908) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*AMP(1271)+( - $ -1.000000000000000D+00)*AMP(1396)+TMP_JAMP(710)+TMP_JAMP(1358) - $ +(-1.000000000000000D+00)*TMP_JAMP(1558)+(-1.000000000000000D - $ +00)*TMP_JAMP(2206)+(-1.000000000000000D+00)*TMP_JAMP(2207) - $ +TMP_JAMP(2208)+(-1.000000000000000D+00)*TMP_JAMP(2277) - $ +TMP_JAMP(2572)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(2690)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(2694) + $ *TMP_JAMP(1176)+TMP_JAMP(1385)+(-1.000000000000000D+00) + $ *AMP(1020)+(-1.000000000000000D+00)*TMP_JAMP(1619)+( + $ -1.000000000000000D+00)*TMP_JAMP(1891)+TMP_JAMP(2145)+( + $ -1.000000000000000D+00)*TMP_JAMP(2531)+(-1.000000000000000D+00) + $ *TMP_JAMP(2853)+TMP_JAMP(2938)+TMP_JAMP(2988)+TMP_JAMP(3009) + JAMP(53,1) = TMP_JAMP(1415)+(-1.000000000000000D+00)*AMP(1398) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(1744) + $ +(-1.000000000000000D+00)*TMP_JAMP(1811)+TMP_JAMP(1890) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(1977) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(1978) + $ +(-1.000000000000000D+00)*TMP_JAMP(1994)+TMP_JAMP(2729)+( + $ -1.000000000000000D+00)*TMP_JAMP(2774)+(-1.000000000000000D+00) + $ *TMP_JAMP(2892)+TMP_JAMP(2997) JAMP(54,1) = ((0.000000000000000D+00,-1.000000000000000D+00)) - $ *AMP(496)+(-1.000000000000000D+00)*AMP(1017)+AMP(1712)+( - $ -1.000000000000000D+00)*AMP(1884)+(-1.000000000000000D+00) - $ *TMP_JAMP(716)+(-1.000000000000000D+00)*TMP_JAMP(1363) - $ +TMP_JAMP(1366)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(1660)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(2209)+(-1.000000000000000D+00)*TMP_JAMP(2281) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(2690) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(2721) - $ +TMP_JAMP(2756) - JAMP(55,1) = (-1.000000000000000D+00)*AMP(690)+( - $ -1.000000000000000D+00)*AMP(1406)+((0.000000000000000D+00 - $ ,1.000000000000000D+00))*AMP(1412)+((0.000000000000000D+00 - $ ,1.000000000000000D+00))*TMP_JAMP(1372)+TMP_JAMP(1375) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(1386) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(2214) - $ +(-1.000000000000000D+00)*TMP_JAMP(2215)+((0.000000000000000D - $ +00,1.000000000000000D+00))*TMP_JAMP(2217)+((0.000000000000000D - $ +00,1.000000000000000D+00))*TMP_JAMP(2219)+((0.000000000000000D - $ +00,-1.000000000000000D+00))*TMP_JAMP(2221)+TMP_JAMP(2224)+( - $ -1.000000000000000D+00)*TMP_JAMP(2246) - JAMP(56,1) = ((0.000000000000000D+00,-1.000000000000000D+00)) - $ *AMP(55)+(-1.000000000000000D+00)*AMP(1400)+AMP(1620)+( - $ -1.000000000000000D+00)*TMP_JAMP(697)+(-1.000000000000000D+00) - $ *TMP_JAMP(843)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(847)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(1126)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(1376)+(-1.000000000000000D+00)*TMP_JAMP(1378)+( - $ -1.000000000000000D+00)*TMP_JAMP(1380)+TMP_JAMP(1382) - $ +TMP_JAMP(1383)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(1392)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(1427)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(1438)+TMP_JAMP(2220)+(-1.000000000000000D+00) - $ *TMP_JAMP(2222)+(-1.000000000000000D+00)*TMP_JAMP(2223) - $ +TMP_JAMP(2233)+(-1.000000000000000D+00)*TMP_JAMP(2237) + $ *TMP_JAMP(721)+(-1.000000000000000D+00)*TMP_JAMP(1263) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(1295) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(1375) + $ +(-1.000000000000000D+00)*AMP(1019)+(-1.000000000000000D+00) + $ *TMP_JAMP(1655)+(-1.000000000000000D+00)*TMP_JAMP(1890) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(1986) + $ +(-1.000000000000000D+00)*TMP_JAMP(2145)+TMP_JAMP(2492) + $ +TMP_JAMP(2585)+TMP_JAMP(2675)+(-1.000000000000000D+00) + $ *TMP_JAMP(2714)+(-1.000000000000000D+00)*TMP_JAMP(2836) + $ +TMP_JAMP(2999) + JAMP(55,1) = ((0.000000000000000D+00,1.000000000000000D+00)) + $ *TMP_JAMP(1063)+TMP_JAMP(1141)+((0.000000000000000D+00, + $ -1.000000000000000D+00))*TMP_JAMP(1177)+(-1.000000000000000D+00) + $ *AMP(1408)+(-1.000000000000000D+00)*TMP_JAMP(1894)+( + $ -1.000000000000000D+00)*TMP_JAMP(2075)+((0.000000000000000D+00 + $ ,1.000000000000000D+00))*TMP_JAMP(2108)+(-1.000000000000000D+00) + $ *TMP_JAMP(2578)+TMP_JAMP(2821)+(-1.000000000000000D+00) + $ *TMP_JAMP(2911)+(-1.000000000000000D+00)*TMP_JAMP(2990)+( + $ -1.000000000000000D+00)*TMP_JAMP(3013) + JAMP(56,1) = TMP_JAMP(647)+((0.000000000000000D+00 + $ ,1.000000000000000D+00))*TMP_JAMP(1168)+((0.000000000000000D+00 + $ ,1.000000000000000D+00))*TMP_JAMP(1205)+(-1.000000000000000D+00) + $ *AMP(1402)+TMP_JAMP(2047)+((0.000000000000000D+00, + $ -1.000000000000000D+00))*TMP_JAMP(2108)+(-1.000000000000000D+00) + $ *TMP_JAMP(2452)+TMP_JAMP(2814)+(-1.000000000000000D+00) + $ *TMP_JAMP(2940)+(-1.000000000000000D+00)*TMP_JAMP(2957)+( + $ -1.000000000000000D+00)*TMP_JAMP(2986)+(-1.000000000000000D+00) + $ *TMP_JAMP(2998) JAMP(57,1) = ((0.000000000000000D+00,1.000000000000000D+00)) - $ *AMP(1194)+(-1.000000000000000D+00)*AMP(1404)+AMP(1835) - $ +TMP_JAMP(1388)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(1517)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(1521)+(-1.000000000000000D+00)*TMP_JAMP(2224)+( - $ -1.000000000000000D+00)*TMP_JAMP(2692)+TMP_JAMP(2693) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(2757) - JAMP(58,1) = ((0.000000000000000D+00,-1.000000000000000D+00)) - $ *AMP(344)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *AMP(366)+(-1.000000000000000D+00)*AMP(395)+TMP_JAMP(2228) - $ +TMP_JAMP(2259)+(-1.000000000000000D+00)*TMP_JAMP(2693) - $ +TMP_JAMP(2758) - JAMP(59,1) = (-1.000000000000000D+00)*AMP(675) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*AMP(1131) - $ +((0.000000000000000D+00,1.000000000000000D+00))*AMP(1272)+( - $ -1.000000000000000D+00)*AMP(1398)+TMP_JAMP(771)+TMP_JAMP(1395) - $ +(-1.000000000000000D+00)*TMP_JAMP(1583)+(-1.000000000000000D - $ +00)*TMP_JAMP(2232)+(-1.000000000000000D+00)*TMP_JAMP(2234) - $ +TMP_JAMP(2237)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(2239)+(-1.000000000000000D+00)*TMP_JAMP(2289) - $ +TMP_JAMP(2588)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(2694) - JAMP(60,1) = ((0.000000000000000D+00,-1.000000000000000D+00)) - $ *AMP(342)+(-1.000000000000000D+00)*AMP(393)+AMP(458)+( - $ -1.000000000000000D+00)*AMP(1803)+(-1.000000000000000D+00) - $ *TMP_JAMP(779)+(-1.000000000000000D+00)*TMP_JAMP(1398)+( - $ -1.000000000000000D+00)*TMP_JAMP(1402)+((0.000000000000000D+00 - $ ,1.000000000000000D+00))*TMP_JAMP(1697)+((0.000000000000000D+00 - $ ,-1.000000000000000D+00))*TMP_JAMP(2239)+((0.000000000000000D - $ +00,-1.000000000000000D+00))*TMP_JAMP(2240)+( - $ -1.000000000000000D+00)*TMP_JAMP(2295)+((0.000000000000000D+00 - $ ,1.000000000000000D+00))*TMP_JAMP(2730)+(-1.000000000000000D+00) - $ *TMP_JAMP(2758) - JAMP(61,1) = (-1.000000000000000D+00)*AMP(1407) - $ +((0.000000000000000D+00,1.000000000000000D+00))*AMP(1481) - $ +AMP(1612)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(2245)+(-1.000000000000000D+00)*TMP_JAMP(2246) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(2250) - $ +(-1.000000000000000D+00)*TMP_JAMP(2273)+((0.000000000000000D - $ +00,1.000000000000000D+00))*TMP_JAMP(2696)+((0.000000000000000D - $ +00,1.000000000000000D+00))*TMP_JAMP(2759) - JAMP(62,1) = ((0.000000000000000D+00,-1.000000000000000D+00)) - $ *AMP(665)+(-1.000000000000000D+00)*AMP(1020)+( - $ -1.000000000000000D+00)*TMP_JAMP(2247)+TMP_JAMP(2249) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(2250) - $ +TMP_JAMP(2264)+TMP_JAMP(2698)+TMP_JAMP(2711) - JAMP(63,1) = (-1.000000000000000D+00)*AMP(1405) - $ +((0.000000000000000D+00,1.000000000000000D+00))*AMP(1478) - $ +AMP(1613)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(1413)+TMP_JAMP(2251)+((0.000000000000000D+00, - $ -1.000000000000000D+00))*TMP_JAMP(2253)+TMP_JAMP(2254) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(2262) - $ +TMP_JAMP(2266)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(2759) - JAMP(64,1) = ((0.000000000000000D+00,-1.000000000000000D+00)) - $ *AMP(366)+(-1.000000000000000D+00)*AMP(396) - $ +((0.000000000000000D+00,1.000000000000000D+00))*AMP(426) - $ +TMP_JAMP(2258)+TMP_JAMP(2260)+((0.000000000000000D+00, - $ -1.000000000000000D+00))*TMP_JAMP(2262)+TMP_JAMP(2271) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(2428) - $ +TMP_JAMP(2698) - JAMP(65,1) = (-1.000000000000000D+00)*AMP(1015)+( - $ -1.000000000000000D+00)*TMP_JAMP(2263)+((0.000000000000000D+00 - $ ,1.000000000000000D+00))*TMP_JAMP(2265)+((0.000000000000000D+00 - $ ,1.000000000000000D+00))*TMP_JAMP(2267)+((0.000000000000000D+00 - $ ,-1.000000000000000D+00))*TMP_JAMP(2268)+TMP_JAMP(2304) - $ +TMP_JAMP(2434)+TMP_JAMP(2441)+(-1.000000000000000D+00) - $ *TMP_JAMP(2699)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(2701) + $ *TMP_JAMP(1172)+TMP_JAMP(1257)+((0.000000000000000D+00, + $ -1.000000000000000D+00))*TMP_JAMP(1301)+((0.000000000000000D+00 + $ ,1.000000000000000D+00))*TMP_JAMP(1340)+(-1.000000000000000D+00) + $ *AMP(1406)+TMP_JAMP(1677)+((0.000000000000000D+00 + $ ,1.000000000000000D+00))*TMP_JAMP(2142)+(-1.000000000000000D+00) + $ *TMP_JAMP(2820)+TMP_JAMP(2832)+(-1.000000000000000D+00) + $ *TMP_JAMP(2909)+((0.000000000000000D+00,-1.000000000000000D+00)) + $ *TMP_JAMP(2976)+TMP_JAMP(3013) + JAMP(58,1) = (-1.000000000000000D+00)*AMP(395)+( + $ -1.000000000000000D+00)*TMP_JAMP(172)+(-1.000000000000000D+00) + $ *TMP_JAMP(419)+((0.000000000000000D+00,1.000000000000000D+00)) + $ *TMP_JAMP(506)+(-1.000000000000000D+00)*TMP_JAMP(994) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(1168) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(1340) + $ +(-1.000000000000000D+00)*TMP_JAMP(2023)+TMP_JAMP(2543)+( + $ -1.000000000000000D+00)*TMP_JAMP(2642)+(-1.000000000000000D+00) + $ *TMP_JAMP(2806)+(-1.000000000000000D+00)*TMP_JAMP(2838) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(2964) + $ +TMP_JAMP(2983) + JAMP(59,1) = (-1.000000000000000D+00)*TMP_JAMP(800) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(893) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(1169) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(1209) + $ +TMP_JAMP(1377)+(-1.000000000000000D+00)*AMP(1400) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(1776) + $ +(-1.000000000000000D+00)*TMP_JAMP(2149)+TMP_JAMP(2729)+( + $ -1.000000000000000D+00)*TMP_JAMP(2819)+(-1.000000000000000D+00) + $ *TMP_JAMP(2937)+((0.000000000000000D+00,-1.000000000000000D+00)) + $ *TMP_JAMP(2956)+TMP_JAMP(2998) + JAMP(60,1) = (-1.000000000000000D+00)*AMP(393) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(132) + $ +TMP_JAMP(414)+(-1.000000000000000D+00)*TMP_JAMP(431) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(499) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(1302) + $ +(-1.000000000000000D+00)*TMP_JAMP(1377)+TMP_JAMP(1574) + $ +TMP_JAMP(1639)+((0.000000000000000D+00,1.000000000000000D+00)) + $ *TMP_JAMP(1979)+TMP_JAMP(2548)+(-1.000000000000000D+00) + $ *TMP_JAMP(2584)+(-1.000000000000000D+00)*TMP_JAMP(2808)+( + $ -1.000000000000000D+00)*TMP_JAMP(2879)+(-1.000000000000000D+00) + $ *TMP_JAMP(2983) + JAMP(61,1) = ((0.000000000000000D+00,-1.000000000000000D+00)) + $ *TMP_JAMP(1394)+(-1.000000000000000D+00)*AMP(1409) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(2106) + $ +(-1.000000000000000D+00)*TMP_JAMP(2319)+(-1.000000000000000D + $ +00)*TMP_JAMP(2805)+(-1.000000000000000D+00)*TMP_JAMP(2881) + $ +TMP_JAMP(2887)+TMP_JAMP(2912)+(-1.000000000000000D+00) + $ *TMP_JAMP(3017) + JAMP(62,1) = TMP_JAMP(773)+((0.000000000000000D+00 + $ ,1.000000000000000D+00))*TMP_JAMP(1231)+((0.000000000000000D+00 + $ ,-1.000000000000000D+00))*TMP_JAMP(1288)+((0.000000000000000D + $ +00,1.000000000000000D+00))*TMP_JAMP(1342)+(-1.000000000000000D + $ +00)*AMP(1022)+((0.000000000000000D+00,1.000000000000000D+00)) + $ *TMP_JAMP(2106)+(-1.000000000000000D+00)*TMP_JAMP(2146)+( + $ -1.000000000000000D+00)*TMP_JAMP(2271)+TMP_JAMP(2363) + $ +TMP_JAMP(2437)+TMP_JAMP(2562)+(-1.000000000000000D+00) + $ *TMP_JAMP(2745)+(-1.000000000000000D+00)*TMP_JAMP(2988)+( + $ -1.000000000000000D+00)*TMP_JAMP(3022) + JAMP(63,1) = (-1.000000000000000D+00)*TMP_JAMP(1380)+( + $ -1.000000000000000D+00)*AMP(1407)+TMP_JAMP(1952) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(2142) + $ +(-1.000000000000000D+00)*TMP_JAMP(2341)+TMP_JAMP(2452)+( + $ -1.000000000000000D+00)*TMP_JAMP(2687)+(-1.000000000000000D+00) + $ *TMP_JAMP(2724)+TMP_JAMP(2839)+TMP_JAMP(2929)+TMP_JAMP(3017) + JAMP(64,1) = (-1.000000000000000D+00)*AMP(396) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(300) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(311) + $ +(-1.000000000000000D+00)*TMP_JAMP(421)+((0.000000000000000D+00 + $ ,-1.000000000000000D+00))*TMP_JAMP(501)+TMP_JAMP(1380)+( + $ -1.000000000000000D+00)*AMP(947)+((0.000000000000000D+00, + $ -1.000000000000000D+00))*TMP_JAMP(1544)+TMP_JAMP(1683) + $ +TMP_JAMP(1801)+(-1.000000000000000D+00)*TMP_JAMP(2450) + $ +TMP_JAMP(2586)+TMP_JAMP(2720)+TMP_JAMP(2869) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(2964) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(2975) + JAMP(65,1) = TMP_JAMP(579)+(-1.000000000000000D+00) + $ *TMP_JAMP(1008)+((0.000000000000000D+00,1.000000000000000D+00)) + $ *TMP_JAMP(1049)+((0.000000000000000D+00,-1.000000000000000D+00)) + $ *TMP_JAMP(1218)+(-1.000000000000000D+00)*AMP(1017) + $ +TMP_JAMP(1611)+TMP_JAMP(1862)+((0.000000000000000D+00 + $ ,1.000000000000000D+00))*TMP_JAMP(1901)+TMP_JAMP(2273)+( + $ -1.000000000000000D+00)*TMP_JAMP(2441)+TMP_JAMP(3022) + $ +TMP_JAMP(3028) JAMP(66,1) = (-1.000000000000000D+00)*AMP(391) - $ +((0.000000000000000D+00,1.000000000000000D+00))*AMP(397) - $ +((0.000000000000000D+00,1.000000000000000D+00))*AMP(418)+( - $ -1.000000000000000D+00)*AMP(474)+((0.000000000000000D+00 - $ ,1.000000000000000D+00))*TMP_JAMP(1824)+(-1.000000000000000D+00) - $ *TMP_JAMP(2270)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(2272)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(2274)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(2275)+TMP_JAMP(2312)+((0.000000000000000D+00, - $ -1.000000000000000D+00))*TMP_JAMP(2314)+((0.000000000000000D+00 - $ ,1.000000000000000D+00))*TMP_JAMP(2446)+TMP_JAMP(2699) - JAMP(67,1) = ((0.000000000000000D+00,-1.000000000000000D+00)) - $ *AMP(908)+(-1.000000000000000D+00)*AMP(1401)+( - $ -1.000000000000000D+00)*TMP_JAMP(699)+((0.000000000000000D+00 - $ ,1.000000000000000D+00))*TMP_JAMP(701)+(-1.000000000000000D+00) - $ *TMP_JAMP(889)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(1427)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(1466)+TMP_JAMP(1473)+((0.000000000000000D+00 - $ ,1.000000000000000D+00))*TMP_JAMP(1719)+TMP_JAMP(2276)+( - $ -1.000000000000000D+00)*TMP_JAMP(2278)+((0.000000000000000D+00, - $ -1.000000000000000D+00))*TMP_JAMP(2279)+(-1.000000000000000D+00) - $ *TMP_JAMP(2292)+TMP_JAMP(2734)+((0.000000000000000D+00 - $ ,1.000000000000000D+00))*TMP_JAMP(2760) - JAMP(68,1) = (-1.000000000000000D+00)*AMP(1019) - $ +((0.000000000000000D+00,1.000000000000000D+00))*AMP(1056) - $ +TMP_JAMP(855)+TMP_JAMP(1664)+TMP_JAMP(2280) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(2282) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(2286) - $ +TMP_JAMP(2291)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(2301)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(2760) - JAMP(69,1) = (-1.000000000000000D+00)*AMP(705)+( - $ -1.000000000000000D+00)*AMP(1399)+(-1.000000000000000D+00) - $ *AMP(1861)+(-1.000000000000000D+00)*TMP_JAMP(543)+TMP_JAMP(751) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(754) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(1439) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(1440) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(1447) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(1734) - $ +TMP_JAMP(2288)+TMP_JAMP(2290)+(-1.000000000000000D+00) - $ *TMP_JAMP(2291)+TMP_JAMP(2292)+((0.000000000000000D+00 - $ ,1.000000000000000D+00))*TMP_JAMP(2293)+((0.000000000000000D+00 - $ ,1.000000000000000D+00))*TMP_JAMP(2299)+((0.000000000000000D+00 - $ ,1.000000000000000D+00))*TMP_JAMP(2302)+(-1.000000000000000D+00) - $ *TMP_JAMP(2581) - JAMP(70,1) = ((0.000000000000000D+00,-1.000000000000000D+00)) - $ *AMP(384)+(-1.000000000000000D+00)*AMP(394) - $ +((0.000000000000000D+00,1.000000000000000D+00))*AMP(435) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(1445) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(1448) - $ +TMP_JAMP(1700)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(2294)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(2296)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(2298)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(2299)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(2306)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(2702) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(130) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(302) + $ +(-1.000000000000000D+00)*TMP_JAMP(417)+((0.000000000000000D+00 + $ ,1.000000000000000D+00))*TMP_JAMP(479)+((0.000000000000000D+00 + $ ,1.000000000000000D+00))*TMP_JAMP(502)+(-1.000000000000000D+00) + $ *TMP_JAMP(579)+(-1.000000000000000D+00)*TMP_JAMP(1418) + $ +TMP_JAMP(1707)+((0.000000000000000D+00,-1.000000000000000D+00)) + $ *TMP_JAMP(1747)+(-1.000000000000000D+00)*TMP_JAMP(1920)+( + $ -1.000000000000000D+00)*TMP_JAMP(2584)+TMP_JAMP(2887)+( + $ -1.000000000000000D+00)*TMP_JAMP(2914)+((0.000000000000000D+00, + $ -1.000000000000000D+00))*TMP_JAMP(2975) + JAMP(67,1) = (-1.000000000000000D+00)*AMP(1403)+( + $ -1.000000000000000D+00)*TMP_JAMP(1626)+(-1.000000000000000D+00) + $ *TMP_JAMP(2144)+(-1.000000000000000D+00)*TMP_JAMP(2452)+( + $ -1.000000000000000D+00)*TMP_JAMP(2678)+TMP_JAMP(2768) + $ +TMP_JAMP(2906)+(-1.000000000000000D+00)*TMP_JAMP(2997)+( + $ -1.000000000000000D+00)*TMP_JAMP(3004) + JAMP(68,1) = ((0.000000000000000D+00,1.000000000000000D+00)) + $ *TMP_JAMP(1055)+((0.000000000000000D+00,1.000000000000000D+00)) + $ *TMP_JAMP(1058)+TMP_JAMP(1275)+((0.000000000000000D+00 + $ ,1.000000000000000D+00))*TMP_JAMP(1342)+(-1.000000000000000D+00) + $ *AMP(1021)+((0.000000000000000D+00,-1.000000000000000D+00)) + $ *TMP_JAMP(2116)+TMP_JAMP(2144)+TMP_JAMP(2297)+( + $ -1.000000000000000D+00)*TMP_JAMP(2341)+TMP_JAMP(2426)+( + $ -1.000000000000000D+00)*TMP_JAMP(2486)+TMP_JAMP(2794)+( + $ -1.000000000000000D+00)*TMP_JAMP(2999)+TMP_JAMP(3016) + JAMP(69,1) = (-1.000000000000000D+00)*TMP_JAMP(1413)+( + $ -1.000000000000000D+00)*AMP(1401)+TMP_JAMP(2042)+TMP_JAMP(2149) + $ +TMP_JAMP(2578)+TMP_JAMP(2679)+TMP_JAMP(2731)+( + $ -1.000000000000000D+00)*TMP_JAMP(2800)+(-1.000000000000000D+00) + $ *TMP_JAMP(2883)+TMP_JAMP(3004) + JAMP(70,1) = AMP(370)+(-1.000000000000000D+00)*AMP(394) + $ +((0.000000000000000D+00,1.000000000000000D+00))*AMP(435)+( + $ -1.000000000000000D+00)*TMP_JAMP(170)+((0.000000000000000D+00, + $ -1.000000000000000D+00))*TMP_JAMP(290)+((0.000000000000000D+00, + $ -1.000000000000000D+00))*TMP_JAMP(298)+(-1.000000000000000D+00) + $ *TMP_JAMP(414)+(-1.000000000000000D+00)*TMP_JAMP(434) + $ +TMP_JAMP(1413)+((0.000000000000000D+00,-1.000000000000000D+00)) + $ *TMP_JAMP(1738)+((0.000000000000000D+00,1.000000000000000D+00)) + $ *TMP_JAMP(1743)+TMP_JAMP(2522)+(-1.000000000000000D+00) + $ *TMP_JAMP(2575)+TMP_JAMP(2586)+TMP_JAMP(2791)+TMP_JAMP(2925)+( + $ -1.000000000000000D+00)*TMP_JAMP(2961) JAMP(71,1) = ((0.000000000000000D+00,-1.000000000000000D+00)) - $ *AMP(664)+(-1.000000000000000D+00)*AMP(1016) - $ +((0.000000000000000D+00,1.000000000000000D+00))*AMP(1051) - $ +TMP_JAMP(870)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(1455)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(2300)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(2302)+TMP_JAMP(2303)+TMP_JAMP(2305) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(2306) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(2316) - $ +TMP_JAMP(2595)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(2701) + $ *TMP_JAMP(1176)+((0.000000000000000D+00,-1.000000000000000D+00)) + $ *TMP_JAMP(1296)+(-1.000000000000000D+00)*AMP(1018) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(2091) + $ +TMP_JAMP(2343)+(-1.000000000000000D+00)*TMP_JAMP(2800)+( + $ -1.000000000000000D+00)*TMP_JAMP(2945)+(-1.000000000000000D+00) + $ *TMP_JAMP(3016)+(-1.000000000000000D+00)*TMP_JAMP(3028) JAMP(72,1) = (-1.000000000000000D+00)*AMP(392) - $ +((0.000000000000000D+00,1.000000000000000D+00))*AMP(427) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(1465) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(1757) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(2309) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(2310) - $ +(-1.000000000000000D+00)*TMP_JAMP(2311)+((0.000000000000000D - $ +00,1.000000000000000D+00))*TMP_JAMP(2313)+TMP_JAMP(2315) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(2316) - $ +TMP_JAMP(2444)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(2702) - JAMP(73,1) = (-1.000000000000000D+00)*AMP(1424)+( - $ -1.000000000000000D+00)*AMP(1512)+TMP_JAMP(682) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(696) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(1476) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(1562) - $ +TMP_JAMP(1567)+TMP_JAMP(2317)+TMP_JAMP(2318)+TMP_JAMP(2321)+( - $ -1.000000000000000D+00)*TMP_JAMP(2323)+((0.000000000000000D+00, - $ -1.000000000000000D+00))*TMP_JAMP(2352)+(-1.000000000000000D+00) - $ *TMP_JAMP(2761) - JAMP(74,1) = (-1.000000000000000D+00)*AMP(1418) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*AMP(1430) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(1125) - $ +TMP_JAMP(1496)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(2319)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(2320)+(-1.000000000000000D+00)*TMP_JAMP(2321) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(2322) - $ +TMP_JAMP(2340)+TMP_JAMP(2358)+TMP_JAMP(2361)+TMP_JAMP(2364) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(2450) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(2471) - JAMP(75,1) = (-1.000000000000000D+00)*AMP(1423) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(1482) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(1958) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(2324) - $ +(-1.000000000000000D+00)*TMP_JAMP(2328)+((0.000000000000000D - $ +00,-1.000000000000000D+00))*TMP_JAMP(2403) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(2705) - $ +TMP_JAMP(2707)+TMP_JAMP(2761) - JAMP(76,1) = (-1.000000000000000D+00)*AMP(1027)+AMP(1717)+( - $ -1.000000000000000D+00)*TMP_JAMP(825)+((0.000000000000000D+00, - $ -1.000000000000000D+00))*TMP_JAMP(1131)+((0.000000000000000D+00 - $ ,-1.000000000000000D+00))*TMP_JAMP(1625)+(-1.000000000000000D - $ +00)*TMP_JAMP(2331)+((0.000000000000000D+00,-1.000000000000000D - $ +00))*TMP_JAMP(2333)+((0.000000000000000D+00,1.000000000000000D - $ +00))*TMP_JAMP(2334)+(-1.000000000000000D+00)*TMP_JAMP(2335) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(2347) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(2396) - $ +TMP_JAMP(2408)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(2705) - JAMP(77,1) = ((0.000000000000000D+00,1.000000000000000D+00)) - $ *AMP(920)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *AMP(1283)+(-1.000000000000000D+00)*AMP(1417)+TMP_JAMP(724) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(1577) - $ +(-1.000000000000000D+00)*TMP_JAMP(1583)+((0.000000000000000D - $ +00,1.000000000000000D+00))*TMP_JAMP(2336)+TMP_JAMP(2337)+( - $ -1.000000000000000D+00)*TMP_JAMP(2339)+TMP_JAMP(2341) - $ +TMP_JAMP(2342)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(2386)+(-1.000000000000000D+00)*TMP_JAMP(2455) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(2706) - JAMP(78,1) = (-1.000000000000000D+00)*AMP(1026)+( - $ -1.000000000000000D+00)*TMP_JAMP(738)+TMP_JAMP(1524) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(1530) - $ +(-1.000000000000000D+00)*TMP_JAMP(1629)+((0.000000000000000D - $ +00,-1.000000000000000D+00))*TMP_JAMP(2343) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(2346) - $ +TMP_JAMP(2348)+(-1.000000000000000D+00)*TMP_JAMP(2349) - $ +TMP_JAMP(2350)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(2433)+(-1.000000000000000D+00)*TMP_JAMP(2462)+( - $ -1.000000000000000D+00)*TMP_JAMP(2522)+((0.000000000000000D+00, - $ -1.000000000000000D+00))*TMP_JAMP(2706) - JAMP(79,1) = (-1.000000000000000D+00)*AMP(1427)+( - $ -1.000000000000000D+00)*TMP_JAMP(667)+((0.000000000000000D+00, - $ -1.000000000000000D+00))*TMP_JAMP(675)+((0.000000000000000D+00 - $ ,1.000000000000000D+00))*TMP_JAMP(1502)+((0.000000000000000D+00 - $ ,-1.000000000000000D+00))*TMP_JAMP(1503)+(-1.000000000000000D - $ +00)*TMP_JAMP(1966)+TMP_JAMP(2351)+((0.000000000000000D+00 - $ ,1.000000000000000D+00))*TMP_JAMP(2352)+(-1.000000000000000D+00) - $ *TMP_JAMP(2354)+(-1.000000000000000D+00)*TMP_JAMP(2355) - $ +TMP_JAMP(2362)+(-1.000000000000000D+00)*TMP_JAMP(2368)+( - $ -1.000000000000000D+00)*TMP_JAMP(2707)+(-1.000000000000000D+00) - $ *TMP_JAMP(2708) - JAMP(80,1) = ((0.000000000000000D+00,-1.000000000000000D+00)) - $ *AMP(73)+(-1.000000000000000D+00)*AMP(1421) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*AMP(1433) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(1124) - $ +TMP_JAMP(1532)+(-1.000000000000000D+00)*TMP_JAMP(2356) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(2359) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(2360) - $ +(-1.000000000000000D+00)*TMP_JAMP(2362)+((0.000000000000000D - $ +00,1.000000000000000D+00))*TMP_JAMP(2363)+TMP_JAMP(2365) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(2367) - $ +(-1.000000000000000D+00)*TMP_JAMP(2389)+((0.000000000000000D - $ +00,1.000000000000000D+00))*TMP_JAMP(2436)+((0.000000000000000D - $ +00,-1.000000000000000D+00))*TMP_JAMP(2457) - JAMP(81,1) = (-1.000000000000000D+00)*AMP(1425) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(1513) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(1514) - $ +(-1.000000000000000D+00)*TMP_JAMP(2369)+TMP_JAMP(2372)+( - $ -1.000000000000000D+00)*TMP_JAMP(2374)+TMP_JAMP(2405)+( - $ -1.000000000000000D+00)*TMP_JAMP(2417)+((0.000000000000000D+00 - $ ,1.000000000000000D+00))*TMP_JAMP(2419)+TMP_JAMP(2708)+( - $ -1.000000000000000D+00)*TMP_JAMP(2709) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(299) + $ +TMP_JAMP(416)+((0.000000000000000D+00,1.000000000000000D+00)) + $ *TMP_JAMP(452)+((0.000000000000000D+00,1.000000000000000D+00)) + $ *TMP_JAMP(467)+((0.000000000000000D+00,1.000000000000000D+00)) + $ *TMP_JAMP(507)+(-1.000000000000000D+00)*TMP_JAMP(1307) + $ +TMP_JAMP(1665)+(-1.000000000000000D+00)*TMP_JAMP(1706) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(1748) + $ +TMP_JAMP(2049)+(-1.000000000000000D+00)*TMP_JAMP(2838) + $ +TMP_JAMP(2906)+TMP_JAMP(2945)+TMP_JAMP(2961) + JAMP(73,1) = ((0.000000000000000D+00,-1.000000000000000D+00)) + $ *TMP_JAMP(584)+((0.000000000000000D+00,1.000000000000000D+00)) + $ *TMP_JAMP(1396)+TMP_JAMP(1582)+((0.000000000000000D+00, + $ -1.000000000000000D+00))*TMP_JAMP(1713)+((0.000000000000000D+00 + $ ,1.000000000000000D+00))*TMP_JAMP(1761)+((0.000000000000000D+00 + $ ,-1.000000000000000D+00))*TMP_JAMP(1764)+TMP_JAMP(1895)+( + $ -1.000000000000000D+00)*TMP_JAMP(1932)+(-1.000000000000000D+00) + $ *AMP(1428)+TMP_JAMP(2569)+(-1.000000000000000D+00) + $ *TMP_JAMP(2652)+TMP_JAMP(2683)+TMP_JAMP(2786)+TMP_JAMP(2796) + $ +TMP_JAMP(2902) + JAMP(74,1) = TMP_JAMP(2027)+TMP_JAMP(2042)+(-1.000000000000000D + $ +00)*AMP(1422)+TMP_JAMP(2383)+TMP_JAMP(2580)+( + $ -1.000000000000000D+00)*TMP_JAMP(2683)+TMP_JAMP(2735)+( + $ -1.000000000000000D+00)*TMP_JAMP(2798)+(-1.000000000000000D+00) + $ *TMP_JAMP(2932)+TMP_JAMP(2942)+TMP_JAMP(3008) + JAMP(75,1) = TMP_JAMP(1015)+((0.000000000000000D+00, + $ -1.000000000000000D+00))*TMP_JAMP(1196)+(-1.000000000000000D+00) + $ *TMP_JAMP(1383)+(-1.000000000000000D+00)*TMP_JAMP(1386) + $ +TMP_JAMP(1860)+(-1.000000000000000D+00)*TMP_JAMP(1863)+( + $ -1.000000000000000D+00)*TMP_JAMP(1895)+TMP_JAMP(1899)+( + $ -1.000000000000000D+00)*AMP(1427)+TMP_JAMP(2627)+TMP_JAMP(2780) + $ +(-1.000000000000000D+00)*TMP_JAMP(2895)+(-1.000000000000000D + $ +00)*TMP_JAMP(2936) + JAMP(76,1) = (-1.000000000000000D+00)*TMP_JAMP(1038)+( + $ -1.000000000000000D+00)*TMP_JAMP(1107)+((0.000000000000000D+00, + $ -1.000000000000000D+00))*TMP_JAMP(1185)+((0.000000000000000D+00 + $ ,-1.000000000000000D+00))*TMP_JAMP(1203)+(-1.000000000000000D + $ +00)*AMP(1029)+(-1.000000000000000D+00)*TMP_JAMP(1899) + $ +TMP_JAMP(2043)+(-1.000000000000000D+00)*TMP_JAMP(2095)+( + $ -1.000000000000000D+00)*TMP_JAMP(2328)+TMP_JAMP(2458)+( + $ -1.000000000000000D+00)*TMP_JAMP(2611)+TMP_JAMP(2649)+( + $ -1.000000000000000D+00)*TMP_JAMP(2684)+TMP_JAMP(2779) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(2943) + $ +TMP_JAMP(3009) + JAMP(77,1) = (-1.000000000000000D+00)*TMP_JAMP(800) + $ +TMP_JAMP(1631)+(-1.000000000000000D+00)*TMP_JAMP(1812) + $ +TMP_JAMP(1898)+(-1.000000000000000D+00)*AMP(1421)+( + $ -1.000000000000000D+00)*TMP_JAMP(2332)+TMP_JAMP(2537) + $ +TMP_JAMP(2932)+(-1.000000000000000D+00)*TMP_JAMP(2936)+( + $ -1.000000000000000D+00)*TMP_JAMP(2972)+TMP_JAMP(3023) + JAMP(78,1) = ((0.000000000000000D+00,-1.000000000000000D+00)) + $ *TMP_JAMP(1216)+(-1.000000000000000D+00)*TMP_JAMP(1264)+( + $ -1.000000000000000D+00)*AMP(1028)+(-1.000000000000000D+00) + $ *TMP_JAMP(1494)+(-1.000000000000000D+00)*TMP_JAMP(1633) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(1764) + $ +(-1.000000000000000D+00)*TMP_JAMP(1898)+TMP_JAMP(2095)+( + $ -1.000000000000000D+00)*TMP_JAMP(2336)+(-1.000000000000000D+00) + $ *TMP_JAMP(2426)+TMP_JAMP(2511)+TMP_JAMP(2552)+TMP_JAMP(2685)+( + $ -1.000000000000000D+00)*TMP_JAMP(2874)+TMP_JAMP(2958) + $ +TMP_JAMP(3002) + JAMP(79,1) = ((0.000000000000000D+00,1.000000000000000D+00)) + $ *TMP_JAMP(584)+((0.000000000000000D+00,-1.000000000000000D+00)) + $ *TMP_JAMP(1187)+((0.000000000000000D+00,1.000000000000000D+00)) + $ *TMP_JAMP(1200)+TMP_JAMP(1626)+((0.000000000000000D+00 + $ ,1.000000000000000D+00))*TMP_JAMP(1849)+(-1.000000000000000D+00) + $ *TMP_JAMP(1883)+(-1.000000000000000D+00)*TMP_JAMP(2036)+( + $ -1.000000000000000D+00)*AMP(1431)+TMP_JAMP(2489)+( + $ -1.000000000000000D+00)*TMP_JAMP(2505)+(-1.000000000000000D+00) + $ *TMP_JAMP(2570)+(-1.000000000000000D+00)*TMP_JAMP(2630) + $ +TMP_JAMP(2645)+TMP_JAMP(2686)+(-1.000000000000000D+00) + $ *TMP_JAMP(2797)+(-1.000000000000000D+00)*TMP_JAMP(3011) + JAMP(80,1) = TMP_JAMP(643)+((0.000000000000000D+00 + $ ,1.000000000000000D+00))*TMP_JAMP(1207)+((0.000000000000000D+00 + $ ,-1.000000000000000D+00))*TMP_JAMP(1291)+TMP_JAMP(2037) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(2138) + $ +(-1.000000000000000D+00)*AMP(1425)+(-1.000000000000000D+00) + $ *TMP_JAMP(2250)+(-1.000000000000000D+00)*TMP_JAMP(2381)+( + $ -1.000000000000000D+00)*TMP_JAMP(2686)+(-1.000000000000000D+00) + $ *TMP_JAMP(2699)+TMP_JAMP(2905)+TMP_JAMP(2987)+( + $ -1.000000000000000D+00)*TMP_JAMP(3008) + JAMP(81,1) = ((0.000000000000000D+00,-1.000000000000000D+00)) + $ *TMP_JAMP(1188)+((0.000000000000000D+00,-1.000000000000000D+00)) + $ *TMP_JAMP(1201)+TMP_JAMP(1269)+((0.000000000000000D+00 + $ ,1.000000000000000D+00))*TMP_JAMP(1349)+((0.000000000000000D+00 + $ ,-1.000000000000000D+00))*TMP_JAMP(1987)+TMP_JAMP(2020)+( + $ -1.000000000000000D+00)*TMP_JAMP(2141)+(-1.000000000000000D+00) + $ *AMP(1429)+(-1.000000000000000D+00)*TMP_JAMP(2773) + $ +TMP_JAMP(2864)+(-1.000000000000000D+00)*TMP_JAMP(2909) + $ +TMP_JAMP(3011) JAMP(82,1) = (-1.000000000000000D+00)*AMP(404) - $ +((0.000000000000000D+00,1.000000000000000D+00))*AMP(408) - $ +AMP(460)+TMP_JAMP(856)+((0.000000000000000D+00 - $ ,1.000000000000000D+00))*TMP_JAMP(1133)+(-1.000000000000000D+00) - $ *TMP_JAMP(1524)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(1635)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(2376)+TMP_JAMP(2377)+((0.000000000000000D+00, - $ -1.000000000000000D+00))*TMP_JAMP(2379)+((0.000000000000000D+00 - $ ,1.000000000000000D+00))*TMP_JAMP(2380)+(-1.000000000000000D+00) - $ *TMP_JAMP(2382)+TMP_JAMP(2425)+TMP_JAMP(2709) - JAMP(83,1) = ((0.000000000000000D+00,-1.000000000000000D+00)) - $ *AMP(921)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *AMP(1209)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *AMP(1284)+(-1.000000000000000D+00)*AMP(1419)+TMP_JAMP(786)+( - $ -1.000000000000000D+00)*TMP_JAMP(1558)+(-1.000000000000000D+00) - $ *TMP_JAMP(2383)+TMP_JAMP(2384)+((0.000000000000000D+00, - $ -1.000000000000000D+00))*TMP_JAMP(2385)+TMP_JAMP(2388) - $ +TMP_JAMP(2390)+(-1.000000000000000D+00)*TMP_JAMP(2391)+( - $ -1.000000000000000D+00)*TMP_JAMP(2469)+((0.000000000000000D+00, - $ -1.000000000000000D+00))*TMP_JAMP(2710) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(305) + $ +TMP_JAMP(426)+((0.000000000000000D+00,1.000000000000000D+00)) + $ *TMP_JAMP(505)+(-1.000000000000000D+00)*TMP_JAMP(555)+( + $ -1.000000000000000D+00)*TMP_JAMP(992)+((0.000000000000000D+00, + $ -1.000000000000000D+00))*TMP_JAMP(1349)+(-1.000000000000000D+00) + $ *TMP_JAMP(2023)+(-1.000000000000000D+00)*TMP_JAMP(2306)+( + $ -1.000000000000000D+00)*TMP_JAMP(2698)+(-1.000000000000000D+00) + $ *TMP_JAMP(2872)+TMP_JAMP(2922)+((0.000000000000000D+00 + $ ,1.000000000000000D+00))*TMP_JAMP(2967)+TMP_JAMP(2987) + JAMP(83,1) = (-1.000000000000000D+00)*TMP_JAMP(784) + $ +TMP_JAMP(1020)+((0.000000000000000D+00,1.000000000000000D+00)) + $ *TMP_JAMP(1053)+((0.000000000000000D+00,-1.000000000000000D+00)) + $ *TMP_JAMP(1195)+((0.000000000000000D+00,1.000000000000000D+00)) + $ *TMP_JAMP(1212)+TMP_JAMP(1268)+((0.000000000000000D+00, + $ -1.000000000000000D+00))*TMP_JAMP(1868)+((0.000000000000000D+00 + $ ,-1.000000000000000D+00))*TMP_JAMP(2011)+(-1.000000000000000D + $ +00)*AMP(1423)+TMP_JAMP(2451)+TMP_JAMP(2699)+( + $ -1.000000000000000D+00)*TMP_JAMP(2772)+TMP_JAMP(2917)+( + $ -1.000000000000000D+00)*TMP_JAMP(2939)+(-1.000000000000000D+00) + $ *TMP_JAMP(2965) JAMP(84,1) = (-1.000000000000000D+00)*AMP(402) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*AMP(408) - $ +TMP_JAMP(803)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(1535)+(-1.000000000000000D+00)*TMP_JAMP(1644) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(2393) - $ +TMP_JAMP(2397)+(-1.000000000000000D+00)*TMP_JAMP(2398)+( - $ -1.000000000000000D+00)*TMP_JAMP(2399)+((0.000000000000000D+00, - $ -1.000000000000000D+00))*TMP_JAMP(2400)+((0.000000000000000D+00 - $ ,-1.000000000000000D+00))*TMP_JAMP(2443)+(-1.000000000000000D - $ +00)*TMP_JAMP(2481)+(-1.000000000000000D+00)*TMP_JAMP(2558) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(2710) - JAMP(85,1) = ((0.000000000000000D+00,1.000000000000000D+00)) - $ *AMP(77)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *AMP(590)+(-1.000000000000000D+00)*AMP(1428) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*AMP(1481)+( - $ -1.000000000000000D+00)*AMP(1701)+((0.000000000000000D+00 - $ ,1.000000000000000D+00))*TMP_JAMP(1541)+((0.000000000000000D+00 - $ ,-1.000000000000000D+00))*TMP_JAMP(1542)+((0.000000000000000D - $ +00,1.000000000000000D+00))*TMP_JAMP(1543)+TMP_JAMP(1551) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(2401) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(2402) - $ +TMP_JAMP(2404)+(-1.000000000000000D+00)*TMP_JAMP(2405) - $ +TMP_JAMP(2410)+(-1.000000000000000D+00)*TMP_JAMP(2416) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(2422) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(2452) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(133) + $ +(-1.000000000000000D+00)*TMP_JAMP(181)+TMP_JAMP(424)+( + $ -1.000000000000000D+00)*TMP_JAMP(436)+((0.000000000000000D+00 + $ ,1.000000000000000D+00))*TMP_JAMP(500)+(-1.000000000000000D+00) + $ *TMP_JAMP(556)+TMP_JAMP(658)+(-1.000000000000000D+00) + $ *TMP_JAMP(1013)+((0.000000000000000D+00,-1.000000000000000D+00)) + $ *TMP_JAMP(1241)+((0.000000000000000D+00,1.000000000000000D+00)) + $ *TMP_JAMP(1564)+TMP_JAMP(1617)+TMP_JAMP(1662)+( + $ -1.000000000000000D+00)*TMP_JAMP(2275)+TMP_JAMP(2489)+( + $ -1.000000000000000D+00)*TMP_JAMP(2761)+(-1.000000000000000D+00) + $ *TMP_JAMP(2880)+(-1.000000000000000D+00)*TMP_JAMP(2922) + $ +TMP_JAMP(2965) + JAMP(85,1) = TMP_JAMP(1386)+(-1.000000000000000D+00)*AMP(1432)+( + $ -1.000000000000000D+00)*TMP_JAMP(2372)+TMP_JAMP(2387) + $ +TMP_JAMP(2393)+TMP_JAMP(2427)+(-1.000000000000000D+00) + $ *TMP_JAMP(2467)+(-1.000000000000000D+00)*TMP_JAMP(2505)+( + $ -1.000000000000000D+00)*TMP_JAMP(2599)+(-1.000000000000000D+00) + $ *TMP_JAMP(2755)+(-1.000000000000000D+00)*TMP_JAMP(2912) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(2977) + $ +(-1.000000000000000D+00)*TMP_JAMP(3005) JAMP(86,1) = ((0.000000000000000D+00,1.000000000000000D+00)) - $ *AMP(826)+(-1.000000000000000D+00)*AMP(1029)+AMP(1718) - $ +TMP_JAMP(637)+TMP_JAMP(829)+((0.000000000000000D+00 - $ ,1.000000000000000D+00))*TMP_JAMP(832)+((0.000000000000000D+00 - $ ,1.000000000000000D+00))*TMP_JAMP(1604)+((0.000000000000000D+00 - $ ,-1.000000000000000D+00))*TMP_JAMP(2406)+TMP_JAMP(2407)+( - $ -1.000000000000000D+00)*TMP_JAMP(2408)+(-1.000000000000000D+00) - $ *TMP_JAMP(2409)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(2411)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(2414)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(2435)+(-1.000000000000000D+00)*TMP_JAMP(2711) - JAMP(87,1) = ((0.000000000000000D+00,-1.000000000000000D+00)) - $ *AMP(1116)+(-1.000000000000000D+00)*AMP(1426) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*AMP(1478) - $ +AMP(1834)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(1561)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(1563)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(1564)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(1572)+TMP_JAMP(2415)+TMP_JAMP(2417) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(2418) - $ +(-1.000000000000000D+00)*TMP_JAMP(2420)+(-1.000000000000000D - $ +00)*TMP_JAMP(2421)+TMP_JAMP(2423)+(-1.000000000000000D+00) - $ *TMP_JAMP(2427)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(2439) - JAMP(88,1) = (-1.000000000000000D+00)*AMP(405)+AMP(461)+( - $ -1.000000000000000D+00)*TMP_JAMP(656)+(-1.000000000000000D+00) - $ *TMP_JAMP(858)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(862)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(1576)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(1577)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(1581)+TMP_JAMP(1582)+TMP_JAMP(1584) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(1616) - $ +(-1.000000000000000D+00)*TMP_JAMP(2424)+(-1.000000000000000D - $ +00)*TMP_JAMP(2425)+(-1.000000000000000D+00)*TMP_JAMP(2426) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(2428) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(2429) - $ +TMP_JAMP(2430)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(2451) - JAMP(89,1) = ((0.000000000000000D+00,-1.000000000000000D+00)) - $ *AMP(826)+(-1.000000000000000D+00)*AMP(1024) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*AMP(1042)+( - $ -1.000000000000000D+00)*AMP(1717)+(-1.000000000000000D+00) - $ *TMP_JAMP(870)+TMP_JAMP(1590)+((0.000000000000000D+00 - $ ,1.000000000000000D+00))*TMP_JAMP(1624)+((0.000000000000000D+00 - $ ,1.000000000000000D+00))*TMP_JAMP(2431)+(-1.000000000000000D+00) - $ *TMP_JAMP(2432)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(2433)+(-1.000000000000000D+00)*TMP_JAMP(2437)+( - $ -1.000000000000000D+00)*TMP_JAMP(2438)+((0.000000000000000D+00 - $ ,1.000000000000000D+00))*TMP_JAMP(2439)+(-1.000000000000000D+00) - $ *TMP_JAMP(2440)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(2448)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(2715) - JAMP(90,1) = ((0.000000000000000D+00,-1.000000000000000D+00)) - $ *AMP(64)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *AMP(385)+(-1.000000000000000D+00)*AMP(400) - $ +((0.000000000000000D+00,1.000000000000000D+00))*AMP(406) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*AMP(418)+( - $ -1.000000000000000D+00)*AMP(460)+(-1.000000000000000D+00) - $ *TMP_JAMP(1596)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(1633)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(2442)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(2443)+(-1.000000000000000D+00)*TMP_JAMP(2444) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(2445) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(2447) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(2449) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(2452) - $ +TMP_JAMP(2453)+(-1.000000000000000D+00)*TMP_JAMP(2599) - JAMP(91,1) = ((0.000000000000000D+00,-1.000000000000000D+00)) - $ *AMP(920)+AMP(1152)+(-1.000000000000000D+00)*AMP(1422) - $ +((0.000000000000000D+00,1.000000000000000D+00))*AMP(1463)+( - $ -1.000000000000000D+00)*AMP(1807)+(-1.000000000000000D+00) - $ *TMP_JAMP(631)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(1767)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(2454)+(-1.000000000000000D+00)*TMP_JAMP(2456) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(2458) - $ +TMP_JAMP(2460)+(-1.000000000000000D+00)*TMP_JAMP(2465) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(2762) - JAMP(92,1) = ((0.000000000000000D+00,-1.000000000000000D+00)) - $ *AMP(827)+(-1.000000000000000D+00)*AMP(1028)+( - $ -1.000000000000000D+00)*AMP(1765)+(-1.000000000000000D+00) - $ *TMP_JAMP(635)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(1603)+(-1.000000000000000D+00)*TMP_JAMP(2459) - $ +TMP_JAMP(2461)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(2463)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(2464)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(2466)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(2614)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(2763) - JAMP(93,1) = AMP(627)+((0.000000000000000D+00, - $ -1.000000000000000D+00))*AMP(1284)+(-1.000000000000000D+00) - $ *AMP(1420)+TMP_JAMP(645)+((0.000000000000000D+00 - $ ,1.000000000000000D+00))*TMP_JAMP(2468)+TMP_JAMP(2470) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(2473) - $ +TMP_JAMP(2477)+(-1.000000000000000D+00)*TMP_JAMP(2485) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(2743) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(2762) - JAMP(94,1) = ((0.000000000000000D+00,-1.000000000000000D+00)) - $ *AMP(387)+(-1.000000000000000D+00)*AMP(403) - $ +((0.000000000000000D+00,1.000000000000000D+00))*AMP(444) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(1615) - $ +(-1.000000000000000D+00)*TMP_JAMP(2476)+((0.000000000000000D - $ +00,-1.000000000000000D+00))*TMP_JAMP(2478)+TMP_JAMP(2480) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(2482) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(2483) - $ +TMP_JAMP(2484)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(2486)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(2492)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(2497)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(2500) - JAMP(95,1) = (-1.000000000000000D+00)*AMP(1025)+( - $ -1.000000000000000D+00)*AMP(1069)+(-1.000000000000000D+00) - $ *TMP_JAMP(663)+(-1.000000000000000D+00)*TMP_JAMP(665) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(1623) - $ +TMP_JAMP(1629)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(1809)+TMP_JAMP(2636)+((0.000000000000000D+00, - $ -1.000000000000000D+00))*TMP_JAMP(2715)+((0.000000000000000D+00 - $ ,-1.000000000000000D+00))*TMP_JAMP(2763)+((0.000000000000000D - $ +00,1.000000000000000D+00))*TMP_JAMP(2764) - JAMP(96,1) = (-1.000000000000000D+00)*AMP(401) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*AMP(406)+( - $ -1.000000000000000D+00)*AMP(462)+TMP_JAMP(676)+TMP_JAMP(680) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(1632) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(1634) - $ +TMP_JAMP(1644)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(2491)+(-1.000000000000000D+00)*TMP_JAMP(2494) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(2496) - $ +TMP_JAMP(2498)+(-1.000000000000000D+00)*TMP_JAMP(2641) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(2764) + $ *TMP_JAMP(951)+((0.000000000000000D+00,1.000000000000000D+00)) + $ *TMP_JAMP(983)+TMP_JAMP(1107)+TMP_JAMP(1127) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(1204) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(1290) + $ +(-1.000000000000000D+00)*AMP(1031)+TMP_JAMP(2146)+( + $ -1.000000000000000D+00)*TMP_JAMP(2480)+TMP_JAMP(2499)+( + $ -1.000000000000000D+00)*TMP_JAMP(2721)+(-1.000000000000000D+00) + $ *TMP_JAMP(2896)+((0.000000000000000D+00,1.000000000000000D+00)) + $ *TMP_JAMP(2977)+(-1.000000000000000D+00)*TMP_JAMP(2995) + JAMP(87,1) = (-1.000000000000000D+00)*TMP_JAMP(1379)+( + $ -1.000000000000000D+00)*TMP_JAMP(1953)+TMP_JAMP(2141)+( + $ -1.000000000000000D+00)*AMP(1430)+TMP_JAMP(2247)+TMP_JAMP(2403) + $ +TMP_JAMP(2882)+TMP_JAMP(2902)+(-1.000000000000000D+00) + $ *TMP_JAMP(2929)+TMP_JAMP(3005) + JAMP(88,1) = (-1.000000000000000D+00)*AMP(405)+( + $ -1.000000000000000D+00)*TMP_JAMP(176)+((0.000000000000000D+00 + $ ,1.000000000000000D+00))*TMP_JAMP(291)+((0.000000000000000D+00, + $ -1.000000000000000D+00))*TMP_JAMP(294)+((0.000000000000000D+00, + $ -1.000000000000000D+00))*TMP_JAMP(312)+TMP_JAMP(422) + $ +TMP_JAMP(1379)+TMP_JAMP(1604)+(-1.000000000000000D+00) + $ *TMP_JAMP(1684)+(-1.000000000000000D+00)*TMP_JAMP(1802)+( + $ -1.000000000000000D+00)*TMP_JAMP(2438)+TMP_JAMP(2512)+( + $ -1.000000000000000D+00)*TMP_JAMP(2715)+TMP_JAMP(2873) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(2967) + $ +TMP_JAMP(2982) + JAMP(89,1) = TMP_JAMP(258)+((0.000000000000000D+00 + $ ,1.000000000000000D+00))*TMP_JAMP(318)+((0.000000000000000D+00 + $ ,1.000000000000000D+00))*TMP_JAMP(476)+TMP_JAMP(1007) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(1052) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(1219) + $ +(-1.000000000000000D+00)*AMP(1026)+TMP_JAMP(1696)+( + $ -1.000000000000000D+00)*TMP_JAMP(1722)+((0.000000000000000D+00 + $ ,1.000000000000000D+00))*TMP_JAMP(1858)+((0.000000000000000D+00 + $ ,-1.000000000000000D+00))*TMP_JAMP(1901)+(-1.000000000000000D + $ +00)*TMP_JAMP(2135)+TMP_JAMP(2443)+(-1.000000000000000D+00) + $ *TMP_JAMP(2495)+TMP_JAMP(2646)+TMP_JAMP(2995)+TMP_JAMP(3003) + JAMP(90,1) = (-1.000000000000000D+00)*AMP(400)+( + $ -1.000000000000000D+00)*AMP(419)+(-1.000000000000000D+00) + $ *TMP_JAMP(109)+((0.000000000000000D+00,-1.000000000000000D+00)) + $ *TMP_JAMP(240)+((0.000000000000000D+00,-1.000000000000000D+00)) + $ *TMP_JAMP(295)+(-1.000000000000000D+00)*TMP_JAMP(427) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(466) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(502) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(522) + $ +TMP_JAMP(1138)+(-1.000000000000000D+00)*TMP_JAMP(1703)+( + $ -1.000000000000000D+00)*TMP_JAMP(2044)+(-1.000000000000000D+00) + $ *TMP_JAMP(2308)+TMP_JAMP(2427)+(-1.000000000000000D+00) + $ *TMP_JAMP(2444)+(-1.000000000000000D+00)*TMP_JAMP(2650)+( + $ -1.000000000000000D+00)*TMP_JAMP(2982)+(-1.000000000000000D+00) + $ *TMP_JAMP(3003) + JAMP(91,1) = TMP_JAMP(647)+((0.000000000000000D+00, + $ -1.000000000000000D+00))*TMP_JAMP(2113)+(-1.000000000000000D+00) + $ *AMP(1426)+TMP_JAMP(2369)+TMP_JAMP(2502)+(-1.000000000000000D + $ +00)*TMP_JAMP(2941)+(-1.000000000000000D+00)*TMP_JAMP(3023)+( + $ -1.000000000000000D+00)*TMP_JAMP(3024) + JAMP(92,1) = ((0.000000000000000D+00,1.000000000000000D+00)) + $ *TMP_JAMP(985)+((0.000000000000000D+00,1.000000000000000D+00)) + $ *TMP_JAMP(1204)+TMP_JAMP(1261)+TMP_JAMP(1280) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(1350) + $ +(-1.000000000000000D+00)*AMP(1030)+((0.000000000000000D+00 + $ ,1.000000000000000D+00))*TMP_JAMP(2113)+(-1.000000000000000D+00) + $ *TMP_JAMP(2143)+TMP_JAMP(2334)+(-1.000000000000000D+00) + $ *TMP_JAMP(2545)+TMP_JAMP(2714)+(-1.000000000000000D+00) + $ *TMP_JAMP(2762)+TMP_JAMP(2857)+(-1.000000000000000D+00) + $ *TMP_JAMP(3002) + JAMP(93,1) = ((0.000000000000000D+00,1.000000000000000D+00)) + $ *TMP_JAMP(1769)+(-1.000000000000000D+00)*AMP(1424)+( + $ -1.000000000000000D+00)*AMP(1893)+TMP_JAMP(2465)+TMP_JAMP(2476) + $ +(-1.000000000000000D+00)*TMP_JAMP(2625)+(-1.000000000000000D + $ +00)*TMP_JAMP(2917)+TMP_JAMP(2928)+(-1.000000000000000D+00) + $ *TMP_JAMP(2931)+TMP_JAMP(2950)+TMP_JAMP(3024) + JAMP(94,1) = (-1.000000000000000D+00)*AMP(403) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(290) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(307) + $ +(-1.000000000000000D+00)*TMP_JAMP(424)+TMP_JAMP(430) + $ +TMP_JAMP(532)+((0.000000000000000D+00,-1.000000000000000D+00)) + $ *TMP_JAMP(1766)+TMP_JAMP(2512)+(-1.000000000000000D+00) + $ *TMP_JAMP(2756)+TMP_JAMP(2857)+TMP_JAMP(2924)+( + $ -1.000000000000000D+00)*TMP_JAMP(2950)+((0.000000000000000D+00 + $ ,1.000000000000000D+00))*TMP_JAMP(2966) + JAMP(95,1) = AMP(150)+((0.000000000000000D+00,1.000000000000000D + $ +00))*TMP_JAMP(237)+(-1.000000000000000D+00)*TMP_JAMP(1043) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(1250) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(1350) + $ +(-1.000000000000000D+00)*AMP(1027)+TMP_JAMP(2135) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(2148) + $ +(-1.000000000000000D+00)*TMP_JAMP(2355)+(-1.000000000000000D + $ +00)*TMP_JAMP(2381)+TMP_JAMP(2757)+TMP_JAMP(2779)+( + $ -1.000000000000000D+00)*TMP_JAMP(3021) + JAMP(96,1) = (-1.000000000000000D+00)*AMP(401)+( + $ -1.000000000000000D+00)*AMP(437)+((0.000000000000000D+00 + $ ,1.000000000000000D+00))*TMP_JAMP(222)+((0.000000000000000D+00 + $ ,1.000000000000000D+00))*TMP_JAMP(310)+TMP_JAMP(427) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(478) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(504) + $ +(-1.000000000000000D+00)*TMP_JAMP(1307)+((0.000000000000000D + $ +00,1.000000000000000D+00))*TMP_JAMP(1566)+(-1.000000000000000D + $ +00)*TMP_JAMP(2367)+TMP_JAMP(2502)+TMP_JAMP(2651)+( + $ -1.000000000000000D+00)*TMP_JAMP(2913)+((0.000000000000000D+00, + $ -1.000000000000000D+00))*TMP_JAMP(2966)+TMP_JAMP(3021) JAMP(97,1) = ((0.000000000000000D+00,-1.000000000000000D+00)) - $ *AMP(934)+(-1.000000000000000D+00)*AMP(1445)+AMP(1637) - $ +TMP_JAMP(697)+TMP_JAMP(732)+((0.000000000000000D+00, - $ -1.000000000000000D+00))*TMP_JAMP(1168)+((0.000000000000000D+00 - $ ,-1.000000000000000D+00))*TMP_JAMP(1647)+((0.000000000000000D - $ +00,1.000000000000000D+00))*TMP_JAMP(1649)+((0.000000000000000D - $ +00,1.000000000000000D+00))*TMP_JAMP(1652)+((0.000000000000000D - $ +00,-1.000000000000000D+00))*TMP_JAMP(1655) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(1690) - $ +TMP_JAMP(1976)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(2718)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(2727)+TMP_JAMP(2765) + $ *TMP_JAMP(1399)+(-1.000000000000000D+00)*TMP_JAMP(1953)+( + $ -1.000000000000000D+00)*TMP_JAMP(2025)+((0.000000000000000D+00 + $ ,1.000000000000000D+00))*TMP_JAMP(2121)+(-1.000000000000000D+00) + $ *AMP(1449)+TMP_JAMP(2234)+TMP_JAMP(2634)+(-1.000000000000000D + $ +00)*TMP_JAMP(2671)+TMP_JAMP(2689)+TMP_JAMP(2727)+TMP_JAMP(2866) + $ +TMP_JAMP(3012) JAMP(98,1) = ((0.000000000000000D+00,1.000000000000000D+00)) - $ *AMP(91)+(-1.000000000000000D+00)*AMP(1439)+TMP_JAMP(703)+( - $ -1.000000000000000D+00)*TMP_JAMP(881)+TMP_JAMP(887) - $ +TMP_JAMP(937)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(948)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(1127)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(1651)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(1662)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(1666)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(2501)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(2504)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(2533)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(2623)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(2718)+TMP_JAMP(2766) - JAMP(99,1) = ((0.000000000000000D+00,-1.000000000000000D+00)) - $ *AMP(933)+(-1.000000000000000D+00)*AMP(1444)+AMP(1754)+AMP(1755) - $ +(-1.000000000000000D+00)*TMP_JAMP(708)+((0.000000000000000D+00 - $ ,1.000000000000000D+00))*TMP_JAMP(1654)+((0.000000000000000D+00 - $ ,1.000000000000000D+00))*TMP_JAMP(1657)+((0.000000000000000D+00 - $ ,-1.000000000000000D+00))*TMP_JAMP(1663)+((0.000000000000000D - $ +00,1.000000000000000D+00))*TMP_JAMP(1718)+((0.000000000000000D - $ +00,1.000000000000000D+00))*TMP_JAMP(2507)+(-1.000000000000000D - $ +00)*TMP_JAMP(2514)+((0.000000000000000D+00,1.000000000000000D - $ +00))*TMP_JAMP(2722)+TMP_JAMP(2735)+(-1.000000000000000D+00) - $ *TMP_JAMP(2765) - JAMP(100,1) = (-1.000000000000000D+00)*AMP(1036)+AMP(1663)+( - $ -1.000000000000000D+00)*TMP_JAMP(796)+(-1.000000000000000D+00) - $ *TMP_JAMP(985)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(990)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(1659)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(1661)+TMP_JAMP(1669)+((0.000000000000000D+00 - $ ,1.000000000000000D+00))*TMP_JAMP(1671)+((0.000000000000000D+00 - $ ,-1.000000000000000D+00))*TMP_JAMP(1802)+((0.000000000000000D - $ +00,-1.000000000000000D+00))*TMP_JAMP(1806)+( - $ -1.000000000000000D+00)*TMP_JAMP(2511)+((0.000000000000000D+00, - $ -1.000000000000000D+00))*TMP_JAMP(2512)+((0.000000000000000D+00 - $ ,-1.000000000000000D+00))*TMP_JAMP(2587)+((0.000000000000000D - $ +00,-1.000000000000000D+00))*TMP_JAMP(2721) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(2722) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(2726) - $ +TMP_JAMP(2736) - JAMP(101,1) = ((0.000000000000000D+00,1.000000000000000D+00)) - $ *AMP(761)+(-1.000000000000000D+00)*AMP(1438)+AMP(1808)+AMP(1830) - $ +(-1.000000000000000D+00)*TMP_JAMP(720)+TMP_JAMP(722) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(1665) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(1667) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(1766) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(1903) - $ +(-1.000000000000000D+00)*TMP_JAMP(2515)+TMP_JAMP(2526)+( - $ -1.000000000000000D+00)*TMP_JAMP(2723)+((0.000000000000000D+00 - $ ,1.000000000000000D+00))*TMP_JAMP(2725)+TMP_JAMP(2728)+( - $ -1.000000000000000D+00)*TMP_JAMP(2766) - JAMP(102,1) = ((0.000000000000000D+00,1.000000000000000D+00)) - $ *AMP(668)+(-1.000000000000000D+00)*AMP(1035)+( - $ -1.000000000000000D+00)*AMP(1664)+TMP_JAMP(732)+( - $ -1.000000000000000D+00)*TMP_JAMP(735)+(-1.000000000000000D+00) - $ *TMP_JAMP(916)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(922)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(1670)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(1672)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(1676)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(1775)+(-1.000000000000000D+00)*TMP_JAMP(2521)+( - $ -1.000000000000000D+00)*TMP_JAMP(2525)+((0.000000000000000D+00, - $ -1.000000000000000D+00))*TMP_JAMP(2527)+((0.000000000000000D+00 - $ ,-1.000000000000000D+00))*TMP_JAMP(2529)+((0.000000000000000D - $ +00,-1.000000000000000D+00))*TMP_JAMP(2725) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(2726) - $ +(-1.000000000000000D+00)*TMP_JAMP(2740) - JAMP(103,1) = ((0.000000000000000D+00,-1.000000000000000D+00)) - $ *AMP(1298)+(-1.000000000000000D+00)*AMP(1448) - $ +((0.000000000000000D+00,1.000000000000000D+00))*AMP(1454)+( - $ -1.000000000000000D+00)*TMP_JAMP(769)+(-1.000000000000000D+00) - $ *TMP_JAMP(797)+(-1.000000000000000D+00)*TMP_JAMP(798)+( - $ -1.000000000000000D+00)*TMP_JAMP(978)+((0.000000000000000D+00 - $ ,1.000000000000000D+00))*TMP_JAMP(1137)+((0.000000000000000D+00 - $ ,-1.000000000000000D+00))*TMP_JAMP(1683)+((0.000000000000000D - $ +00,1.000000000000000D+00))*TMP_JAMP(1693)+(-1.000000000000000D - $ +00)*TMP_JAMP(1902)+((0.000000000000000D+00,-1.000000000000000D - $ +00))*TMP_JAMP(2531)+TMP_JAMP(2532)+((0.000000000000000D+00, - $ -1.000000000000000D+00))*TMP_JAMP(2534)+((0.000000000000000D+00 - $ ,1.000000000000000D+00))*TMP_JAMP(2539)+((0.000000000000000D+00 - $ ,1.000000000000000D+00))*TMP_JAMP(2727)+((0.000000000000000D+00 - $ ,1.000000000000000D+00))*TMP_JAMP(2729) - JAMP(104,1) = (-1.000000000000000D+00)*AMP(1442)+( - $ -1.000000000000000D+00)*TMP_JAMP(755)+TMP_JAMP(756)+( - $ -1.000000000000000D+00)*TMP_JAMP(758)+TMP_JAMP(981) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(999) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(1161) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(1687) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(1703) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(1748) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(2533) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(2535) - $ +(-1.000000000000000D+00)*TMP_JAMP(2537)+TMP_JAMP(2538)+( - $ -1.000000000000000D+00)*TMP_JAMP(2540)+TMP_JAMP(2552) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(2605) - $ +(-1.000000000000000D+00)*TMP_JAMP(2728) - JAMP(105,1) = (-1.000000000000000D+00)*AMP(1446)+AMP(1862) - $ +TMP_JAMP(770)+(-1.000000000000000D+00)*TMP_JAMP(909) - $ +TMP_JAMP(986)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(1692)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(1694)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(1699)+(-1.000000000000000D+00)*TMP_JAMP(2542)+( - $ -1.000000000000000D+00)*TMP_JAMP(2543)+TMP_JAMP(2544)+( - $ -1.000000000000000D+00)*TMP_JAMP(2551)+((0.000000000000000D+00, - $ -1.000000000000000D+00))*TMP_JAMP(2729)+((0.000000000000000D+00 - $ ,1.000000000000000D+00))*TMP_JAMP(2731)+((0.000000000000000D+00 - $ ,-1.000000000000000D+00))*TMP_JAMP(2738) - JAMP(106,1) = ((0.000000000000000D+00,1.000000000000000D+00)) - $ *AMP(351)+(-1.000000000000000D+00)*AMP(413)+AMP(451)+AMP(693)+( - $ -1.000000000000000D+00)*TMP_JAMP(917)+((0.000000000000000D+00, - $ -1.000000000000000D+00))*TMP_JAMP(927)+TMP_JAMP(1005) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(1020) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(1696) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(1698) - $ +TMP_JAMP(1704)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(1823)+(-1.000000000000000D+00)*TMP_JAMP(2547) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(2548) - $ +TMP_JAMP(2564)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(2583)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(2730)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(2731)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(2733) + $ *TMP_JAMP(1401)+TMP_JAMP(1952)+(-1.000000000000000D+00) + $ *TMP_JAMP(2022)+((0.000000000000000D+00,-1.000000000000000D+00)) + $ *TMP_JAMP(2118)+(-1.000000000000000D+00)*AMP(1443) + $ +TMP_JAMP(2390)+(-1.000000000000000D+00)*TMP_JAMP(2408) + $ +TMP_JAMP(2456)+(-1.000000000000000D+00)*TMP_JAMP(2689) + $ +TMP_JAMP(2841)+TMP_JAMP(2908)+(-1.000000000000000D+00) + $ *TMP_JAMP(3006) + JAMP(99,1) = TMP_JAMP(821)+(-1.000000000000000D+00) + $ *TMP_JAMP(1018)+TMP_JAMP(1376)+((0.000000000000000D+00 + $ ,1.000000000000000D+00))*TMP_JAMP(1378)+TMP_JAMP(1913) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(2121) + $ +TMP_JAMP(2124)+(-1.000000000000000D+00)*AMP(1448)+( + $ -1.000000000000000D+00)*TMP_JAMP(2490)+(-1.000000000000000D+00) + $ *TMP_JAMP(2638)+TMP_JAMP(2765)+(-1.000000000000000D+00) + $ *TMP_JAMP(2843)+TMP_JAMP(2901) + JAMP(100,1) = ((0.000000000000000D+00,-1.000000000000000D+00)) + $ *TMP_JAMP(746)+(-1.000000000000000D+00)*TMP_JAMP(1278)+( + $ -1.000000000000000D+00)*AMP(1038)+(-1.000000000000000D+00) + $ *TMP_JAMP(1913)+((0.000000000000000D+00,-1.000000000000000D+00)) + $ *TMP_JAMP(2012)+((0.000000000000000D+00,-1.000000000000000D+00)) + $ *TMP_JAMP(2119)+(-1.000000000000000D+00)*TMP_JAMP(2499) + $ +TMP_JAMP(2592)+TMP_JAMP(2607)+TMP_JAMP(2669)+( + $ -1.000000000000000D+00)*TMP_JAMP(2690)+TMP_JAMP(2776)+( + $ -1.000000000000000D+00)*TMP_JAMP(2952)+TMP_JAMP(3020) + JAMP(101,1) = TMP_JAMP(1910)+((0.000000000000000D+00 + $ ,1.000000000000000D+00))*TMP_JAMP(2118)+TMP_JAMP(2124)+( + $ -1.000000000000000D+00)*AMP(1442)+AMP(1813)+TMP_JAMP(2342)+( + $ -1.000000000000000D+00)*TMP_JAMP(2549)+(-1.000000000000000D+00) + $ *TMP_JAMP(2842)+(-1.000000000000000D+00)*TMP_JAMP(2867) + $ +TMP_JAMP(2984)+TMP_JAMP(3014) + JAMP(102,1) = (-1.000000000000000D+00)*TMP_JAMP(1030) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(1404) + $ +(-1.000000000000000D+00)*AMP(1037)+(-1.000000000000000D+00) + $ *TMP_JAMP(1809)+(-1.000000000000000D+00)*TMP_JAMP(1910) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(2018) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(2119) + $ +(-1.000000000000000D+00)*TMP_JAMP(2560)+(-1.000000000000000D + $ +00)*TMP_JAMP(2606)+TMP_JAMP(2665)+TMP_JAMP(2691)+TMP_JAMP(2822) + $ +TMP_JAMP(2868)+TMP_JAMP(2989) + JAMP(103,1) = ((0.000000000000000D+00,1.000000000000000D+00)) + $ *TMP_JAMP(1252)+((0.000000000000000D+00,1.000000000000000D+00)) + $ *TMP_JAMP(1388)+(-1.000000000000000D+00)*TMP_JAMP(2125)+( + $ -1.000000000000000D+00)*AMP(1452)+TMP_JAMP(2430)+( + $ -1.000000000000000D+00)*TMP_JAMP(2447)+(-1.000000000000000D+00) + $ *TMP_JAMP(2478)+(-1.000000000000000D+00)*TMP_JAMP(2633) + $ +TMP_JAMP(2664)+(-1.000000000000000D+00)*TMP_JAMP(2848) + $ +TMP_JAMP(2930)+(-1.000000000000000D+00)*TMP_JAMP(3012) + JAMP(104,1) = (-1.000000000000000D+00)*TMP_JAMP(777)+( + $ -1.000000000000000D+00)*TMP_JAMP(798)+((0.000000000000000D+00 + $ ,1.000000000000000D+00))*TMP_JAMP(845)+((0.000000000000000D+00 + $ ,1.000000000000000D+00))*TMP_JAMP(962)+((0.000000000000000D+00, + $ -1.000000000000000D+00))*TMP_JAMP(1228)+TMP_JAMP(2126)+( + $ -1.000000000000000D+00)*AMP(1446)+(-1.000000000000000D+00) + $ *TMP_JAMP(2440)+(-1.000000000000000D+00)*TMP_JAMP(2457)+( + $ -1.000000000000000D+00)*TMP_JAMP(2580)+TMP_JAMP(2739)+( + $ -1.000000000000000D+00)*TMP_JAMP(2830)+(-1.000000000000000D+00) + $ *TMP_JAMP(2930)+(-1.000000000000000D+00)*TMP_JAMP(2993) + $ +TMP_JAMP(3006) + JAMP(105,1) = ((0.000000000000000D+00,-1.000000000000000D+00)) + $ *TMP_JAMP(989)+((0.000000000000000D+00,-1.000000000000000D+00)) + $ *TMP_JAMP(1388)+(-1.000000000000000D+00)*TMP_JAMP(1670) + $ +TMP_JAMP(2088)+((0.000000000000000D+00,-1.000000000000000D+00)) + $ *TMP_JAMP(2117)+(-1.000000000000000D+00)*AMP(1450) + $ +TMP_JAMP(2901)+(-1.000000000000000D+00)*TMP_JAMP(2937)+( + $ -1.000000000000000D+00)*TMP_JAMP(2944)+(-1.000000000000000D+00) + $ *TMP_JAMP(3026) + JAMP(106,1) = (-1.000000000000000D+00)*AMP(413) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(292) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(304) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(333) + $ +(-1.000000000000000D+00)*TMP_JAMP(432)+TMP_JAMP(442) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(1599) + $ +TMP_JAMP(2670)+(-1.000000000000000D+00)*TMP_JAMP(2693) + $ +TMP_JAMP(2740)+(-1.000000000000000D+00)*TMP_JAMP(2921) + $ +TMP_JAMP(2944)+TMP_JAMP(2970)+(-1.000000000000000D+00) + $ *TMP_JAMP(2993) JAMP(107,1) = ((0.000000000000000D+00,-1.000000000000000D+00)) - $ *AMP(762)+(-1.000000000000000D+00)*AMP(1440)+AMP(1889)+( - $ -1.000000000000000D+00)*TMP_JAMP(783)+(-1.000000000000000D+00) - $ *TMP_JAMP(784)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(1134)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(1153)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(1701)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(1702)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(2549)+(-1.000000000000000D+00)*TMP_JAMP(2550) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(2553) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(2556) - $ +TMP_JAMP(2562)+(-1.000000000000000D+00)*TMP_JAMP(2732) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(2768) - JAMP(108,1) = ((0.000000000000000D+00,1.000000000000000D+00)) - $ *AMP(369)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *AMP(378)+(-1.000000000000000D+00)*AMP(411) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*AMP(417) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*AMP(594) - $ +((0.000000000000000D+00,1.000000000000000D+00))*AMP(1669) - $ +TMP_JAMP(799)+(-1.000000000000000D+00)*TMP_JAMP(802) - $ +TMP_JAMP(960)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(1707)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(1709)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(1711)+TMP_JAMP(1714)+(-1.000000000000000D+00) - $ *TMP_JAMP(1835)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(2556)+(-1.000000000000000D+00)*TMP_JAMP(2557)+( - $ -1.000000000000000D+00)*TMP_JAMP(2561)+(-1.000000000000000D+00) - $ *TMP_JAMP(2563)+TMP_JAMP(2597)+((0.000000000000000D+00 - $ ,1.000000000000000D+00))*TMP_JAMP(2733) - JAMP(109,1) = ((0.000000000000000D+00,1.000000000000000D+00)) - $ *AMP(95)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *AMP(1199)+(-1.000000000000000D+00)*AMP(1449)+AMP(1567)+( - $ -1.000000000000000D+00)*TMP_JAMP(813)+(-1.000000000000000D+00) - $ *TMP_JAMP(814)+(-1.000000000000000D+00)*TMP_JAMP(885) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(1717) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(1720) - $ +TMP_JAMP(1722)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(1727)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(1754)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(1974)+(-1.000000000000000D+00)*TMP_JAMP(2734)+( - $ -1.000000000000000D+00)*TMP_JAMP(2735)+(-1.000000000000000D+00) - $ *TMP_JAMP(2767) - JAMP(110,1) = AMP(527)+(-1.000000000000000D+00)*AMP(670)+( - $ -1.000000000000000D+00)*AMP(1038)+((0.000000000000000D+00, - $ -1.000000000000000D+00))*AMP(1199)+((0.000000000000000D+00, - $ -1.000000000000000D+00))*AMP(1592)+TMP_JAMP(821)+( - $ -1.000000000000000D+00)*TMP_JAMP(823)+TMP_JAMP(826) - $ +TMP_JAMP(873)+TMP_JAMP(915)+((0.000000000000000D+00 - $ ,1.000000000000000D+00))*TMP_JAMP(1724)+((0.000000000000000D+00 - $ ,-1.000000000000000D+00))*TMP_JAMP(1726)+((0.000000000000000D - $ +00,-1.000000000000000D+00))*TMP_JAMP(1975)+TMP_JAMP(2570) - $ +TMP_JAMP(2572)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(2574)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(2584)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(2613)+(-1.000000000000000D+00)*TMP_JAMP(2736)+( - $ -1.000000000000000D+00)*TMP_JAMP(2739) - JAMP(111,1) = (-1.000000000000000D+00)*AMP(687) - $ +((0.000000000000000D+00,1.000000000000000D+00))*AMP(754)+( - $ -1.000000000000000D+00)*AMP(1447)+((0.000000000000000D+00, - $ -1.000000000000000D+00))*AMP(1469)+AMP(1568)+TMP_JAMP(836)+( - $ -1.000000000000000D+00)*TMP_JAMP(839)+TMP_JAMP(840) - $ +TMP_JAMP(869)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(1733)+TMP_JAMP(1738)+((0.000000000000000D+00, - $ -1.000000000000000D+00))*TMP_JAMP(1743)+((0.000000000000000D+00 - $ ,1.000000000000000D+00))*TMP_JAMP(1749)+TMP_JAMP(1977) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(1978) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(2580) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(2738) - $ +TMP_JAMP(2767) - JAMP(112,1) = ((0.000000000000000D+00,1.000000000000000D+00)) - $ *AMP(367)+(-1.000000000000000D+00)*AMP(414) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*AMP(754) - $ +AMP(786)+(-1.000000000000000D+00)*TMP_JAMP(852)+( - $ -1.000000000000000D+00)*TMP_JAMP(857)+(-1.000000000000000D+00) - $ *TMP_JAMP(884)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(1740)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(1742)+TMP_JAMP(1751)+((0.000000000000000D+00, - $ -1.000000000000000D+00))*TMP_JAMP(1759)+((0.000000000000000D+00 - $ ,-1.000000000000000D+00))*TMP_JAMP(1793)+(-1.000000000000000D - $ +00)*TMP_JAMP(1799)+((0.000000000000000D+00,1.000000000000000D - $ +00))*TMP_JAMP(1980)+((0.000000000000000D+00, - $ -1.000000000000000D+00))*TMP_JAMP(2582)+((0.000000000000000D+00 - $ ,1.000000000000000D+00))*TMP_JAMP(2584)+TMP_JAMP(2585) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(2587) - $ +TMP_JAMP(2588)+(-1.000000000000000D+00)*TMP_JAMP(2589) - $ +TMP_JAMP(2590) + $ *TMP_JAMP(844)+((0.000000000000000D+00,1.000000000000000D+00)) + $ *TMP_JAMP(978)+TMP_JAMP(1023)+TMP_JAMP(1034) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(1228) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(1253) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(1304) + $ +(-1.000000000000000D+00)*TMP_JAMP(1914)+TMP_JAMP(2089) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(2137) + $ +(-1.000000000000000D+00)*AMP(1444)+TMP_JAMP(2576) + $ +TMP_JAMP(2828)+(-1.000000000000000D+00)*TMP_JAMP(2939)+( + $ -1.000000000000000D+00)*TMP_JAMP(3026) + JAMP(108,1) = (-1.000000000000000D+00)*AMP(411) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(293) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(301) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(334) + $ +(-1.000000000000000D+00)*TMP_JAMP(437)+TMP_JAMP(440) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*AMP(596)+( + $ -1.000000000000000D+00)*TMP_JAMP(781)+(-1.000000000000000D+00) + $ *TMP_JAMP(817)+TMP_JAMP(846)+((0.000000000000000D+00, + $ -1.000000000000000D+00))*TMP_JAMP(977)+((0.000000000000000D+00, + $ -1.000000000000000D+00))*TMP_JAMP(980)+((0.000000000000000D+00 + $ ,1.000000000000000D+00))*TMP_JAMP(1252)+TMP_JAMP(1591) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(1593) + $ +TMP_JAMP(2099)+(-1.000000000000000D+00)*TMP_JAMP(2350)+( + $ -1.000000000000000D+00)*TMP_JAMP(2600)+(-1.000000000000000D+00) + $ *TMP_JAMP(2669)+TMP_JAMP(2753)+(-1.000000000000000D+00) + $ *TMP_JAMP(2870)+(-1.000000000000000D+00)*TMP_JAMP(2970) + JAMP(109,1) = (-1.000000000000000D+00)*TMP_JAMP(1036) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(1378) + $ +(-1.000000000000000D+00)*TMP_JAMP(1884)+(-1.000000000000000D + $ +00)*TMP_JAMP(2039)+((0.000000000000000D+00,-1.000000000000000D + $ +00))*TMP_JAMP(2068)+(-1.000000000000000D+00)*AMP(1453)+( + $ -1.000000000000000D+00)*TMP_JAMP(2357)+TMP_JAMP(2523)+( + $ -1.000000000000000D+00)*TMP_JAMP(2573)+TMP_JAMP(2678)+( + $ -1.000000000000000D+00)*TMP_JAMP(2766)+TMP_JAMP(2775)+( + $ -1.000000000000000D+00)*TMP_JAMP(3027) + JAMP(110,1) = ((0.000000000000000D+00,1.000000000000000D+00)) + $ *TMP_JAMP(990)+((0.000000000000000D+00,1.000000000000000D+00)) + $ *TMP_JAMP(1248)+TMP_JAMP(1277)+(-1.000000000000000D+00) + $ *AMP(1040)+((0.000000000000000D+00,1.000000000000000D+00)) + $ *TMP_JAMP(1852)+TMP_JAMP(1884)+TMP_JAMP(2040) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(2116) + $ +(-1.000000000000000D+00)*TMP_JAMP(2338)+(-1.000000000000000D + $ +00)*TMP_JAMP(2795)+(-1.000000000000000D+00)*TMP_JAMP(2900) + $ +TMP_JAMP(3015)+(-1.000000000000000D+00)*TMP_JAMP(3020) + JAMP(111,1) = TMP_JAMP(1516)+(-1.000000000000000D+00) + $ *TMP_JAMP(1932)+((0.000000000000000D+00,1.000000000000000D+00)) + $ *TMP_JAMP(2117)+(-1.000000000000000D+00)*AMP(1451)+( + $ -1.000000000000000D+00)*TMP_JAMP(2371)+TMP_JAMP(2519) + $ +TMP_JAMP(2572)+(-1.000000000000000D+00)*TMP_JAMP(2679) + $ +TMP_JAMP(2695)+TMP_JAMP(2787)+((0.000000000000000D+00 + $ ,1.000000000000000D+00))*TMP_JAMP(2973)+TMP_JAMP(3027) + JAMP(112,1) = (-1.000000000000000D+00)*AMP(414)+( + $ -1.000000000000000D+00)*TMP_JAMP(189)+((0.000000000000000D+00 + $ ,1.000000000000000D+00))*TMP_JAMP(299)+TMP_JAMP(433) + $ +TMP_JAMP(435)+(-1.000000000000000D+00)*TMP_JAMP(439) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(508) + $ +(-1.000000000000000D+00)*TMP_JAMP(1948)+((0.000000000000000D + $ +00,1.000000000000000D+00))*TMP_JAMP(2069)+(-1.000000000000000D + $ +00)*TMP_JAMP(2565)+TMP_JAMP(2788)+(-1.000000000000000D+00) + $ *TMP_JAMP(2795)+TMP_JAMP(2918)+((0.000000000000000D+00, + $ -1.000000000000000D+00))*TMP_JAMP(2973) JAMP(113,1) = ((0.000000000000000D+00,1.000000000000000D+00)) - $ *AMP(82)+(-1.000000000000000D+00)*AMP(1033) - $ +((0.000000000000000D+00,1.000000000000000D+00))*AMP(1039) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*AMP(1051) - $ +TMP_JAMP(866)+(-1.000000000000000D+00)*TMP_JAMP(867) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(1135) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(1748) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(1750) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(1807) - $ +(-1.000000000000000D+00)*TMP_JAMP(1817)+((0.000000000000000D - $ +00,1.000000000000000D+00))*TMP_JAMP(2591)+(-1.000000000000000D - $ +00)*TMP_JAMP(2594)+((0.000000000000000D+00,1.000000000000000D - $ +00))*TMP_JAMP(2596)+TMP_JAMP(2739)+(-1.000000000000000D+00) - $ *TMP_JAMP(2740)+TMP_JAMP(2741) + $ *TMP_JAMP(78)+((0.000000000000000D+00,1.000000000000000D+00)) + $ *TMP_JAMP(321)+((0.000000000000000D+00,-1.000000000000000D+00)) + $ *TMP_JAMP(739)+(-1.000000000000000D+00)*TMP_JAMP(1272)+( + $ -1.000000000000000D+00)*AMP(1035)+(-1.000000000000000D+00) + $ *TMP_JAMP(1810)+((0.000000000000000D+00,-1.000000000000000D+00)) + $ *TMP_JAMP(2091)+TMP_JAMP(2803)+(-1.000000000000000D+00) + $ *TMP_JAMP(2933)+TMP_JAMP(2991)+(-1.000000000000000D+00) + $ *TMP_JAMP(3015) JAMP(114,1) = (-1.000000000000000D+00)*AMP(409) $ +((0.000000000000000D+00,1.000000000000000D+00))*AMP(415) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*AMP(427)+( - $ -1.000000000000000D+00)*AMP(451)+(-1.000000000000000D+00) - $ *AMP(1569)+(-1.000000000000000D+00)*TMP_JAMP(880)+TMP_JAMP(881) - $ +TMP_JAMP(882)+(-1.000000000000000D+00)*TMP_JAMP(885) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(1753) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(1758) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(1760) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(1828) - $ +TMP_JAMP(2597)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(2598)+(-1.000000000000000D+00)*TMP_JAMP(2599) - $ +TMP_JAMP(2601)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(2603)+(-1.000000000000000D+00)*TMP_JAMP(2741) - JAMP(115,1) = ((0.000000000000000D+00,1.000000000000000D+00)) - $ *AMP(92)+(-1.000000000000000D+00)*AMP(1443) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*AMP(1463) - $ +((0.000000000000000D+00,1.000000000000000D+00))*AMP(1537) - $ +AMP(1574)+(-1.000000000000000D+00)*AMP(1809)+( - $ -1.000000000000000D+00)*TMP_JAMP(897)+(-1.000000000000000D+00) - $ *TMP_JAMP(898)+(-1.000000000000000D+00)*TMP_JAMP(899)+( - $ -1.000000000000000D+00)*TMP_JAMP(900)+TMP_JAMP(1003)+( - $ -1.000000000000000D+00)*TMP_JAMP(1009)+((0.000000000000000D+00, - $ -1.000000000000000D+00))*TMP_JAMP(1014)+((0.000000000000000D+00 - $ ,1.000000000000000D+00))*TMP_JAMP(1153)+((0.000000000000000D+00 - $ ,-1.000000000000000D+00))*TMP_JAMP(1764)+((0.000000000000000D - $ +00,-1.000000000000000D+00))*TMP_JAMP(1765) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(1768) - $ +TMP_JAMP(1771)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(2604)+(-1.000000000000000D+00)*TMP_JAMP(2606) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(2607) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(2611) - $ +TMP_JAMP(2617)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(2620) - JAMP(116,1) = ((0.000000000000000D+00,1.000000000000000D+00)) - $ *AMP(508)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *AMP(668)+(-1.000000000000000D+00)*AMP(1037) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*AMP(1121)+( - $ -1.000000000000000D+00)*AMP(1514)+((0.000000000000000D+00, - $ -1.000000000000000D+00))*AMP(1776)+(-1.000000000000000D+00) - $ *TMP_JAMP(908)+TMP_JAMP(910)+(-1.000000000000000D+00) - $ *TMP_JAMP(911)+TMP_JAMP(912)+TMP_JAMP(918)+TMP_JAMP(982) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(2607) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(2608) - $ +(-1.000000000000000D+00)*TMP_JAMP(2609)+((0.000000000000000D - $ +00,1.000000000000000D+00))*TMP_JAMP(2610)+((0.000000000000000D - $ +00,1.000000000000000D+00))*TMP_JAMP(2612)+((0.000000000000000D - $ +00,1.000000000000000D+00))*TMP_JAMP(2613)+((0.000000000000000D - $ +00,-1.000000000000000D+00))*TMP_JAMP(2615) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(2629) - JAMP(117,1) = (-1.000000000000000D+00)*AMP(528) - $ +((0.000000000000000D+00,1.000000000000000D+00))*AMP(595)+( - $ -1.000000000000000D+00)*AMP(1441)+((0.000000000000000D+00 - $ ,1.000000000000000D+00))*AMP(1538)+TMP_JAMP(932)+( - $ -1.000000000000000D+00)*TMP_JAMP(933)+TMP_JAMP(934) - $ +TMP_JAMP(936)+TMP_JAMP(956)+(-1.000000000000000D+00) - $ *TMP_JAMP(983)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(1136)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(1797)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(1985)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(2616)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(2619)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(2623)+(-1.000000000000000D+00)*TMP_JAMP(2624)+( - $ -1.000000000000000D+00)*TMP_JAMP(2634)+((0.000000000000000D+00 - $ ,1.000000000000000D+00))*TMP_JAMP(2743)+((0.000000000000000D+00 - $ ,-1.000000000000000D+00))*TMP_JAMP(2768) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(83) + $ +(-1.000000000000000D+00)*TMP_JAMP(190)+((0.000000000000000D+00 + $ ,-1.000000000000000D+00))*TMP_JAMP(236)+((0.000000000000000D+00 + $ ,-1.000000000000000D+00))*TMP_JAMP(311)+TMP_JAMP(439) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(467) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(526) + $ +TMP_JAMP(1138)+((0.000000000000000D+00,1.000000000000000D+00)) + $ *TMP_JAMP(1593)+((0.000000000000000D+00,-1.000000000000000D+00)) + $ *TMP_JAMP(1852)+TMP_JAMP(2052)+(-1.000000000000000D+00) + $ *TMP_JAMP(2390)+(-1.000000000000000D+00)*TMP_JAMP(2593)+( + $ -1.000000000000000D+00)*TMP_JAMP(2804)+(-1.000000000000000D+00) + $ *TMP_JAMP(2915)+(-1.000000000000000D+00)*TMP_JAMP(2991) + JAMP(115,1) = ((0.000000000000000D+00,-1.000000000000000D+00)) + $ *TMP_JAMP(589)+((0.000000000000000D+00,-1.000000000000000D+00)) + $ *TMP_JAMP(2122)+(-1.000000000000000D+00)*AMP(1447)+( + $ -1.000000000000000D+00)*TMP_JAMP(2373)+TMP_JAMP(2550)+( + $ -1.000000000000000D+00)*TMP_JAMP(2574)+(-1.000000000000000D+00) + $ *TMP_JAMP(2582)+(-1.000000000000000D+00)*TMP_JAMP(2626) + $ +TMP_JAMP(2629)+TMP_JAMP(2941)+(-1.000000000000000D+00) + $ *TMP_JAMP(3014) + JAMP(116,1) = TMP_JAMP(1279)+(-1.000000000000000D+00)*AMP(1039) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(2122) + $ +TMP_JAMP(2143)+AMP(1669)+(-1.000000000000000D+00) + $ *TMP_JAMP(2371)+(-1.000000000000000D+00)*TMP_JAMP(2619)+( + $ -1.000000000000000D+00)*TMP_JAMP(2823)+TMP_JAMP(2853)+( + $ -1.000000000000000D+00)*TMP_JAMP(2989)+(-1.000000000000000D+00) + $ *TMP_JAMP(3019) + JAMP(117,1) = ((0.000000000000000D+00,1.000000000000000D+00)) + $ *TMP_JAMP(589)+(-1.000000000000000D+00)*TMP_JAMP(1658) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(2137) + $ +(-1.000000000000000D+00)*AMP(1445)+AMP(1519)+TMP_JAMP(2596) + $ +TMP_JAMP(2624)+TMP_JAMP(2633)+TMP_JAMP(2884)+TMP_JAMP(2908)+( + $ -1.000000000000000D+00)*TMP_JAMP(2928)+TMP_JAMP(2959) JAMP(118,1) = ((0.000000000000000D+00,1.000000000000000D+00)) $ *AMP(349)+(-1.000000000000000D+00)*AMP(412) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*AMP(595) - $ +AMP(627)+(-1.000000000000000D+00)*TMP_JAMP(952)+( - $ -1.000000000000000D+00)*TMP_JAMP(953)+TMP_JAMP(954) - $ +TMP_JAMP(955)+(-1.000000000000000D+00)*TMP_JAMP(957) - $ +TMP_JAMP(962)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(1794)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(2625)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(2626)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(2627)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(2628)+TMP_JAMP(2630)+TMP_JAMP(2631) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(2632) - JAMP(119,1) = ((0.000000000000000D+00,-1.000000000000000D+00)) - $ *AMP(508)+(-1.000000000000000D+00)*AMP(1034) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*AMP(1039)+( - $ -1.000000000000000D+00)*AMP(1071)+TMP_JAMP(975)+( - $ -1.000000000000000D+00)*TMP_JAMP(976)+(-1.000000000000000D+00) - $ *TMP_JAMP(977)+TMP_JAMP(978)+(-1.000000000000000D+00) - $ *TMP_JAMP(980)+(-1.000000000000000D+00)*TMP_JAMP(984) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(1138) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(1805) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(1808) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(1810) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(1811) - $ +TMP_JAMP(1813)+TMP_JAMP(1818)+((0.000000000000000D+00, - $ -1.000000000000000D+00))*TMP_JAMP(2633)+(-1.000000000000000D+00) - $ *TMP_JAMP(2634)+TMP_JAMP(2635)+(-1.000000000000000D+00) - $ *TMP_JAMP(2636)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(2744) - JAMP(120,1) = AMP(98)+(-1.000000000000000D+00)*AMP(410) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*AMP(436)+( - $ -1.000000000000000D+00)*TMP_JAMP(1000)+TMP_JAMP(1001) - $ +TMP_JAMP(1002)+TMP_JAMP(1004)+(-1.000000000000000D+00) - $ *TMP_JAMP(1007)+TMP_JAMP(1008)+((0.000000000000000D+00 - $ ,1.000000000000000D+00))*TMP_JAMP(1139)+((0.000000000000000D+00 - $ ,-1.000000000000000D+00))*TMP_JAMP(1140)+((0.000000000000000D - $ +00,1.000000000000000D+00))*TMP_JAMP(1819)+((0.000000000000000D - $ +00,1.000000000000000D+00))*TMP_JAMP(1822)+((0.000000000000000D - $ +00,1.000000000000000D+00))*TMP_JAMP(1825)+((0.000000000000000D - $ +00,1.000000000000000D+00))*TMP_JAMP(1826)+((0.000000000000000D - $ +00,1.000000000000000D+00))*TMP_JAMP(1829)+TMP_JAMP(1832) - $ +TMP_JAMP(1834)+TMP_JAMP(1835)+((0.000000000000000D+00, - $ -1.000000000000000D+00))*TMP_JAMP(2637)+TMP_JAMP(2638) - $ +TMP_JAMP(2639)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(2744) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(308) + $ +TMP_JAMP(438)+(-1.000000000000000D+00)*TMP_JAMP(443) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(506) + $ +(-1.000000000000000D+00)*TMP_JAMP(532)+(-1.000000000000000D+00) + $ *TMP_JAMP(1667)+(-1.000000000000000D+00)*TMP_JAMP(1681)+( + $ -1.000000000000000D+00)*TMP_JAMP(1724)+TMP_JAMP(1834)+( + $ -1.000000000000000D+00)*TMP_JAMP(1947)+(-1.000000000000000D+00) + $ *TMP_JAMP(2628)+TMP_JAMP(2844)+(-1.000000000000000D+00) + $ *TMP_JAMP(2858)+TMP_JAMP(2918)+(-1.000000000000000D+00) + $ *TMP_JAMP(2959) + JAMP(119,1) = (-1.000000000000000D+00)*TMP_JAMP(1041)+( + $ -1.000000000000000D+00)*AMP(1036)+TMP_JAMP(1608) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(2148) + $ +(-1.000000000000000D+00)*TMP_JAMP(2614)+TMP_JAMP(2635) + $ +TMP_JAMP(2933)+TMP_JAMP(2992)+TMP_JAMP(3019) + JAMP(120,1) = (-1.000000000000000D+00)*AMP(410) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*AMP(415) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*AMP(436) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(244) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(309) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(336) + $ +TMP_JAMP(531)+(-1.000000000000000D+00)*TMP_JAMP(1418)+( + $ -1.000000000000000D+00)*TMP_JAMP(1673)+TMP_JAMP(1724) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(1797) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*AMP(1462) + $ +TMP_JAMP(2619)+(-1.000000000000000D+00)*TMP_JAMP(2634) + $ +TMP_JAMP(2670)+(-1.000000000000000D+00)*TMP_JAMP(2916)+( + $ -1.000000000000000D+00)*TMP_JAMP(2992) IF(INIT_MODE)THEN DO I=1, NGRAPHS diff --git a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/cudacpp.mk b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/cudacpp.mk index 43cee0977e..15669185ad 100644 --- a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/cudacpp.mk @@ -1,7 +1,7 @@ # Copyright (C) 2020-2023 CERN and UCLouvain. # Licensed under the GNU Lesser General Public License (version 3 or later). # Created by: S. Roiser (Feb 2020) for the MG5aMC CUDACPP plugin. -# Further modified by: O. Mattelaer, S. Roiser, A. Valassi (2020-2023) for the MG5aMC CUDACPP plugin. +# Further modified by: J. Teig, O. Mattelaer, S. Roiser, A. Valassi (2020-2023) for the MG5aMC CUDACPP plugin. #=== Determine the name of this makefile (https://ftp.gnu.org/old-gnu/Manuals/make-3.80/html_node/make_17.html) #=== NB: different names (e.g. cudacpp.mk and cudacpp_src.mk) are used in the Subprocess and src directories @@ -86,6 +86,14 @@ endif #------------------------------------------------------------------------------- +.DEFAULT_GOAL := usage + +# Target if user does not specify target +usage: + $(error Unknown target='$(MAKECMDGOALS)': only 'cppnone', 'cppsse4', 'cppavx2', 'cpp512y', 'cpp512z' and 'cuda' are supported!) + +#------------------------------------------------------------------------------- + #=== Configure the C++ compiler CXXFLAGS = $(OPTFLAGS) -std=c++17 $(INCFLAGS) -Wall -Wshadow -Wextra @@ -103,70 +111,73 @@ endif #------------------------------------------------------------------------------- -#=== Configure the CUDA compiler - -# If CXX is not a single word (example "clang++ --gcc-toolchain...") then disable CUDA builds (issue #505) -# This is because it is impossible to pass this to "CUFLAGS += -ccbin " below -ifneq ($(words $(subst ccache ,,$(CXX))),1) # allow at most "CXX=ccache " from outside - $(warning CUDA builds are not supported for multi-word CXX "$(CXX)") - override CUDA_HOME=disabled -endif - -# If CUDA_HOME is not set, try to set it from the location of nvcc -ifndef CUDA_HOME - CUDA_HOME = $(patsubst %bin/nvcc,%,$(shell which nvcc 2>/dev/null)) - $(warning CUDA_HOME was not set: using "$(CUDA_HOME)") -endif - -# Set NVCC as $(CUDA_HOME)/bin/nvcc if it exists -ifneq ($(wildcard $(CUDA_HOME)/bin/nvcc),) - NVCC = $(CUDA_HOME)/bin/nvcc - USE_NVTX ?=-DUSE_NVTX - # See https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html - # See https://arnon.dk/matching-sm-architectures-arch-and-gencode-for-various-nvidia-cards/ - # Default: use compute capability 70 for V100 (CERN lxbatch, CERN itscrd, Juwels Cluster). - # Embed device code for 70, and PTX for 70+. - # Export MADGRAPH_CUDA_ARCHITECTURE (comma-separated list) to use another value or list of values (see #533). - # Examples: use 60 for P100 (Piz Daint), 80 for A100 (Juwels Booster, NVidia raplab/Curiosity). - MADGRAPH_CUDA_ARCHITECTURE ?= 70 - ###CUARCHFLAGS = -gencode arch=compute_$(MADGRAPH_CUDA_ARCHITECTURE),code=compute_$(MADGRAPH_CUDA_ARCHITECTURE) -gencode arch=compute_$(MADGRAPH_CUDA_ARCHITECTURE),code=sm_$(MADGRAPH_CUDA_ARCHITECTURE) # Older implementation (AV): go back to this one for multi-GPU support #533 - ###CUARCHFLAGS = --gpu-architecture=compute_$(MADGRAPH_CUDA_ARCHITECTURE) --gpu-code=sm_$(MADGRAPH_CUDA_ARCHITECTURE),compute_$(MADGRAPH_CUDA_ARCHITECTURE) # Newer implementation (SH): cannot use this as-is for multi-GPU support #533 - comma:=, - CUARCHFLAGS = $(foreach arch,$(subst $(comma), ,$(MADGRAPH_CUDA_ARCHITECTURE)),-gencode arch=compute_$(arch),code=compute_$(arch) -gencode arch=compute_$(arch),code=sm_$(arch)) - CUINC = -I$(CUDA_HOME)/include/ - CURANDLIBFLAGS = -L$(CUDA_HOME)/lib64/ -lcurand # NB: -lcuda is not needed here! - CUOPTFLAGS = -lineinfo - CUFLAGS = $(foreach opt, $(OPTFLAGS), -Xcompiler $(opt)) $(CUOPTFLAGS) $(INCFLAGS) $(CUINC) $(USE_NVTX) $(CUARCHFLAGS) -use_fast_math - ###CUFLAGS += -Xcompiler -Wall -Xcompiler -Wextra -Xcompiler -Wshadow - ###NVCC_VERSION = $(shell $(NVCC) --version | grep 'Cuda compilation tools' | cut -d' ' -f5 | cut -d, -f1) - CUFLAGS += -std=c++17 # need CUDA >= 11.2 (see #333): this is enforced in mgOnGpuConfig.h - # Without -maxrregcount: baseline throughput: 6.5E8 (16384 32 12) up to 7.3E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 160 # improves throughput: 6.9E8 (16384 32 12) up to 7.7E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 128 # improves throughput: 7.3E8 (16384 32 12) up to 7.6E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 96 # degrades throughput: 4.1E8 (16384 32 12) up to 4.5E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 64 # degrades throughput: 1.7E8 (16384 32 12) flat at 1.7E8 (65536 128 12) -else ifneq ($(origin REQUIRE_CUDA),undefined) - # If REQUIRE_CUDA is set but no cuda is found, stop here (e.g. for CI tests on GPU #443) - $(error No cuda installation found (set CUDA_HOME or make nvcc visible in PATH)) -else - # No cuda. Switch cuda compilation off and go to common random numbers in C++ - $(warning CUDA_HOME is not set or is invalid: export CUDA_HOME to compile with cuda) - override NVCC= - override USE_NVTX= - override CUINC= - override CURANDLIBFLAGS= -endif -export NVCC -export CUFLAGS +#=== Configure the CUDA compiler for the CUDA target -# Set the host C++ compiler for nvcc via "-ccbin " -# (NB issue #505: this must be a single word, "clang++ --gcc-toolchain..." is not supported) -CUFLAGS += -ccbin $(shell which $(subst ccache ,,$(CXX))) +ifneq (,$(findstring $(MAKECMDGOALS),cuda-gcheck-runGcheck-runFGcheck-cmpFGcheck-memcheck)) + # If CXX is not a single word (example "clang++ --gcc-toolchain...") then disable CUDA builds (issue #505) + # This is because it is impossible to pass this to "CUFLAGS += -ccbin " below + ifneq ($(words $(subst ccache ,,$(CXX))),1) # allow at most "CXX=ccache " from outside + $(warning CUDA builds are not supported for multi-word CXX "$(CXX)") + override CUDA_HOME=disabled + endif -# Allow newer (unsupported) C++ compilers with older versions of CUDA if ALLOW_UNSUPPORTED_COMPILER_IN_CUDA is set (#504) -ifneq ($(origin ALLOW_UNSUPPORTED_COMPILER_IN_CUDA),undefined) -CUFLAGS += -allow-unsupported-compiler -endif + # If CUDA_HOME is not set, try to set it from the location of nvcc + ifndef CUDA_HOME + CUDA_HOME = $(patsubst %bin/nvcc,%,$(shell which nvcc 2>/dev/null)) + $(warning CUDA_HOME was not set: using "$(CUDA_HOME)") + endif + + # Set NVCC as $(CUDA_HOME)/bin/nvcc if it exists + ifneq ($(wildcard $(CUDA_HOME)/bin/nvcc),) + NVCC = $(CUDA_HOME)/bin/nvcc + USE_NVTX ?=-DUSE_NVTX + # See https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html + # See https://arnon.dk/matching-sm-architectures-arch-and-gencode-for-various-nvidia-cards/ + # Default: use compute capability 70 for V100 (CERN lxbatch, CERN itscrd, Juwels Cluster). + # Embed device code for 70, and PTX for 70+. + # Export MADGRAPH_CUDA_ARCHITECTURE (comma-separated list) to use another value or list of values (see #533). + # Examples: use 60 for P100 (Piz Daint), 80 for A100 (Juwels Booster, NVidia raplab/Curiosity). + MADGRAPH_CUDA_ARCHITECTURE ?= 70 + ###CUARCHFLAGS = -gencode arch=compute_$(MADGRAPH_CUDA_ARCHITECTURE),code=compute_$(MADGRAPH_CUDA_ARCHITECTURE) -gencode arch=compute_$(MADGRAPH_CUDA_ARCHITECTURE),code=sm_$(MADGRAPH_CUDA_ARCHITECTURE) # Older implementation (AV): go back to this one for multi-GPU support #533 + ###CUARCHFLAGS = --gpu-architecture=compute_$(MADGRAPH_CUDA_ARCHITECTURE) --gpu-code=sm_$(MADGRAPH_CUDA_ARCHITECTURE),compute_$(MADGRAPH_CUDA_ARCHITECTURE) # Newer implementation (SH): cannot use this as-is for multi-GPU support #533 + comma:=, + CUARCHFLAGS = $(foreach arch,$(subst $(comma), ,$(MADGRAPH_CUDA_ARCHITECTURE)),-gencode arch=compute_$(arch),code=compute_$(arch) -gencode arch=compute_$(arch),code=sm_$(arch)) + CUINC = -I$(CUDA_HOME)/include/ + CURANDLIBFLAGS = -L$(CUDA_HOME)/lib64/ -lcurand # NB: -lcuda is not needed here! + CUOPTFLAGS = -lineinfo + CUFLAGS = $(foreach opt, $(OPTFLAGS), -Xcompiler $(opt)) $(CUOPTFLAGS) $(INCFLAGS) $(CUINC) $(USE_NVTX) $(CUARCHFLAGS) -use_fast_math + ###CUFLAGS += -Xcompiler -Wall -Xcompiler -Wextra -Xcompiler -Wshadow + ###NVCC_VERSION = $(shell $(NVCC) --version | grep 'Cuda compilation tools' | cut -d' ' -f5 | cut -d, -f1) + CUFLAGS += -std=c++17 # need CUDA >= 11.2 (see #333): this is enforced in mgOnGpuConfig.h + # Without -maxrregcount: baseline throughput: 6.5E8 (16384 32 12) up to 7.3E8 (65536 128 12) + ###CUFLAGS+= --maxrregcount 160 # improves throughput: 6.9E8 (16384 32 12) up to 7.7E8 (65536 128 12) + ###CUFLAGS+= --maxrregcount 128 # improves throughput: 7.3E8 (16384 32 12) up to 7.6E8 (65536 128 12) + ###CUFLAGS+= --maxrregcount 96 # degrades throughput: 4.1E8 (16384 32 12) up to 4.5E8 (65536 128 12) + ###CUFLAGS+= --maxrregcount 64 # degrades throughput: 1.7E8 (16384 32 12) flat at 1.7E8 (65536 128 12) + else ifneq ($(origin REQUIRE_CUDA),undefined) + # If REQUIRE_CUDA is set but no cuda is found, stop here (e.g. for CI tests on GPU #443) + $(error No cuda installation found (set CUDA_HOME or make nvcc visible in PATH)) + else + # No cuda. Switch cuda compilation off and go to common random numbers in C++ + $(warning CUDA_HOME is not set or is invalid: export CUDA_HOME to compile with cuda) + override NVCC= + override USE_NVTX= + override CUINC= + override CURANDLIBFLAGS= + endif + export NVCC + export CUFLAGS + + # Set the host C++ compiler for nvcc via "-ccbin " + # (NB issue #505: this must be a single word, "clang++ --gcc-toolchain..." is not supported) + CUFLAGS += -ccbin $(shell which $(subst ccache ,,$(CXX))) + + # Allow newer (unsupported) C++ compilers with older versions of CUDA if ALLOW_UNSUPPORTED_COMPILER_IN_CUDA is set (#504) + ifneq ($(origin ALLOW_UNSUPPORTED_COMPILER_IN_CUDA),undefined) + CUFLAGS += -allow-unsupported-compiler + endif + +endif # ($(MAKECMDGOALS),cuda) #------------------------------------------------------------------------------- @@ -226,32 +237,6 @@ override OMPFLAGS = -fopenmp ###override OMPFLAGS = # disable OpenMP MT (default before #575) endif -# Set the default AVX (vectorization) choice -ifeq ($(AVX),) - ifeq ($(UNAME_P),ppc64le) - ###override AVX = none - override AVX = sse4 - else ifeq ($(UNAME_P),arm) - ###override AVX = none - override AVX = sse4 - else ifeq ($(wildcard /proc/cpuinfo),) - override AVX = none - $(warning Using AVX='$(AVX)' because host SIMD features cannot be read from /proc/cpuinfo) - else ifeq ($(shell grep -m1 -c avx512vl /proc/cpuinfo)$(shell $(CXX) --version | grep ^clang),1) - override AVX = 512y - ###$(info Using AVX='$(AVX)' as no user input exists) - else - override AVX = avx2 - ifneq ($(shell grep -m1 -c avx512vl /proc/cpuinfo),1) - $(warning Using AVX='$(AVX)' because host does not support avx512vl) - else - $(warning Using AVX='$(AVX)' because this is faster than avx512vl for clang) - endif - endif -else - ###$(info Using AVX='$(AVX)' according to user input) -endif - # Set the default FPTYPE (floating point type) choice ifeq ($(FPTYPE),) override FPTYPE = d @@ -276,6 +261,21 @@ ifeq ($(RNDGEN),) endif endif +# set the correct AVX based on avxcpp target +ifeq ($(MAKECMDGOALS),cppnone) # no SIMD + override AVX = none +else ifeq ($(MAKECMDGOALS),cppsse4) # SSE4.2 with 128 width (xmm registers) + override AVX = sse4 +else ifeq ($(MAKECMDGOALS),cppavx2) # AVX2 with 256 width (ymm registers) [DEFAULT for clang] + override AVX = avx2 +else ifeq ($(MAKECMDGOALS),cpp512y) # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] + override AVX = 512y +else ifeq ($(MAKECMDGOALS),cpp512z) # AVX512 with 512 width (zmm registers) + override AVX = 512z +else + override AVX = none +endif + # Export AVX, FPTYPE, HELINL, HRDCOD, RNDGEN, OMPFLAGS so that it is not necessary to pass them to the src Makefile too export AVX export FPTYPE @@ -295,50 +295,52 @@ CXXFLAGS += $(OMPFLAGS) # Set the build flags appropriate to each AVX choice (example: "make AVX=none") # [NB MGONGPU_PVW512 is needed because "-mprefer-vector-width=256" is not exposed in a macro] # [See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96476] -$(info AVX=$(AVX)) -ifeq ($(UNAME_P),ppc64le) - ifeq ($(AVX),sse4) - override AVXFLAGS = -D__SSE4_2__ # Power9 VSX with 128 width (VSR registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on PowerPC for the moment) - endif -else ifeq ($(UNAME_P),arm) - ifeq ($(AVX),sse4) - override AVXFLAGS = -D__SSE4_2__ # ARM NEON with 128 width (Q/quadword registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on ARM for the moment) - endif -else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 - ifeq ($(AVX),none) - override AVXFLAGS = -mno-sse3 # no SIMD - else ifeq ($(AVX),sse4) - override AVXFLAGS = -mno-avx # SSE4.2 with 128 width (xmm registers) - else ifeq ($(AVX),avx2) - override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(AVX),512y) - override AVXFLAGS = -march=skylake -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(AVX),512z) - override AVXFLAGS = -march=skylake -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) - else - $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) - endif -else - ifeq ($(AVX),none) - override AVXFLAGS = -march=x86-64 # no SIMD (see #588) - else ifeq ($(AVX),sse4) - override AVXFLAGS = -march=nehalem # SSE4.2 with 128 width (xmm registers) - else ifeq ($(AVX),avx2) - override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(AVX),512y) - override AVXFLAGS = -march=skylake-avx512 -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(AVX),512z) - override AVXFLAGS = -march=skylake-avx512 -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) +ifeq ($(findstring cpp,$(MAKECMDGOALS)),cpp) + $(info AVX=$(AVX)) + ifeq ($(UNAME_P),ppc64le) + ifeq ($(AVX),sse4) + override AVXFLAGS = -D__SSE4_2__ # Power9 VSX with 128 width (VSR registers) + else ifneq ($(AVX),none) + $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on PowerPC for the moment) + endif + else ifeq ($(UNAME_P),arm) + ifeq ($(AVX),sse4) + override AVXFLAGS = -D__SSE4_2__ # ARM NEON with 128 width (Q/quadword registers) + else ifneq ($(AVX),none) + $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on ARM for the moment) + endif + else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 + ifeq ($(AVX),none) + override AVXFLAGS = -mno-sse3 # no SIMD + else ifeq ($(AVX),sse4) + override AVXFLAGS = -mno-avx # SSE4.2 with 128 width (xmm registers) + else ifeq ($(AVX),avx2) + override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] + else ifeq ($(AVX),512y) + override AVXFLAGS = -march=skylake -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] + else ifeq ($(AVX),512z) + override AVXFLAGS = -march=skylake -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) + else + $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) + endif else - $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) + ifeq ($(AVX),none) + override AVXFLAGS = -march=x86-64 # no SIMD (see #588) + else ifeq ($(AVX),sse4) + override AVXFLAGS = -march=nehalem # SSE4.2 with 128 width (xmm registers) + else ifeq ($(AVX),avx2) + override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] + else ifeq ($(AVX),512y) + override AVXFLAGS = -march=skylake-avx512 -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] + else ifeq ($(AVX),512z) + override AVXFLAGS = -march=skylake-avx512 -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) + else + $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) + endif endif + # For the moment, use AVXFLAGS everywhere: eventually, use them only in encapsulated implementations? + CXXFLAGS+= $(AVXFLAGS) endif -# For the moment, use AVXFLAGS everywhere: eventually, use them only in encapsulated implementations? -CXXFLAGS+= $(AVXFLAGS) # Set the build flags appropriate to each FPTYPE choice (example: "make FPTYPE=f") $(info FPTYPE=$(FPTYPE)) @@ -389,11 +391,19 @@ endif # Build directory "short" tag (defines target and path to the optional build directory) # (Rationale: keep directory names shorter, e.g. do not include random number generator choice) -override DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) +ifneq ($(NVCC),) + override DIRTAG = cuda_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) +else + override DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) +endif # Build lockfile "full" tag (defines full specification of build options that cannot be intermixed) # (Rationale: avoid mixing of CUDA and no-CUDA environment builds with different random number generators) -override TAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) +ifneq ($(NVCC),) + override TAG = cuda_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) +else + override TAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) +endif # Build directory: current directory by default, or build.$(DIRTAG) if USEBUILDDIR==1 ifeq ($(USEBUILDDIR),1) @@ -448,9 +458,9 @@ endif testmain=$(BUILDDIR)/runTest.exe ifneq ($(GTESTLIBS),) -all.$(TAG): $(BUILDDIR)/.build.$(TAG) $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_main) $(cxx_main) $(fcu_main) $(fcxx_main) $(testmain) +all.$(TAG): $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_main) $(cxx_main) $(fcu_main) $(fcxx_main) $(testmain) else -all.$(TAG): $(BUILDDIR)/.build.$(TAG) $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_main) $(cxx_main) $(fcu_main) $(fcxx_main) +all.$(TAG): $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_main) $(cxx_main) $(fcu_main) $(fcxx_main) endif # Target (and build options): debug @@ -460,27 +470,20 @@ debug: CUOPTFLAGS = -G debug: MAKEDEBUG := debug debug: all.$(TAG) -# Target: tag-specific build lockfiles -override oldtagsb=`if [ -d $(BUILDDIR) ]; then find $(BUILDDIR) -maxdepth 1 -name '.build.*' ! -name '.build.$(TAG)' -exec echo $(shell pwd)/{} \; ; fi` -$(BUILDDIR)/.build.$(TAG): - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - @if [ "$(oldtagsb)" != "" ]; then echo "Cannot build for tag=$(TAG) as old builds exist for other tags:"; echo " $(oldtagsb)"; echo "Please run 'make clean' first\nIf 'make clean' is not enough: run 'make clean USEBUILDDIR=1 AVX=$(AVX) FPTYPE=$(FPTYPE)' or 'make cleanall'"; exit 1; fi - @touch $(BUILDDIR)/.build.$(TAG) - # Generic target and build rules: objects from CUDA compilation ifneq ($(NVCC),) -$(BUILDDIR)/%.o : %.cu *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) +$(BUILDDIR)/%.o : %.cu *.h ../../src/*.h @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c $< -o $@ -$(BUILDDIR)/%_cu.o : %.cc *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) +$(BUILDDIR)/%_cu.o : %.cc *.h ../../src/*.h @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c -x cu $< -o $@ endif # Generic target and build rules: objects from C++ compilation # (NB do not include CUINC here! add it only for NVTX or curand #679) -$(BUILDDIR)/%.o : %.cc *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) +$(BUILDDIR)/%.o : %.cc *.h ../../src/*.h @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi $(CXX) $(CPPFLAGS) $(CXXFLAGS) -fPIC -c $< -o $@ @@ -532,7 +535,7 @@ endif # Target (and build rules): common (src) library commonlib : $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so -$(LIBDIR)/lib$(MG5AMC_COMMONLIB).so: ../../src/*.h ../../src/*.cc $(BUILDDIR)/.build.$(TAG) +$(LIBDIR)/lib$(MG5AMC_COMMONLIB).so: ../../src/*.h ../../src/*.cc $(MAKE) -C ../../src $(MAKEDEBUG) -f $(CUDACPP_SRC_MAKEFILE) #------------------------------------------------------------------------------- @@ -711,35 +714,27 @@ endif # Target: build all targets in all AVX modes (each AVX mode in a separate build directory) # Split the avxall target into five separate targets to allow parallel 'make -j avxall' builds # (Hack: add a fbridge.inc dependency to avxall, to ensure it is only copied once for all AVX modes) -avxnone: - @echo - $(MAKE) USEBUILDDIR=1 AVX=none -f $(CUDACPP_MAKEFILE) +cppnone: $(cxx_main) -avxsse4: - @echo - $(MAKE) USEBUILDDIR=1 AVX=sse4 -f $(CUDACPP_MAKEFILE) +cppsse4: $(cxx_main) -avxavx2: - @echo - $(MAKE) USEBUILDDIR=1 AVX=avx2 -f $(CUDACPP_MAKEFILE) +cppavx2: $(cxx_main) -avx512y: - @echo - $(MAKE) USEBUILDDIR=1 AVX=512y -f $(CUDACPP_MAKEFILE) +cpp512y: $(cxx_main) -avx512z: - @echo - $(MAKE) USEBUILDDIR=1 AVX=512z -f $(CUDACPP_MAKEFILE) +cpp512z: $(cxx_main) + +cuda: $(cu_main) ifeq ($(UNAME_P),ppc64le) ###avxall: $(INCDIR)/fbridge.inc avxnone avxsse4 -avxall: avxnone avxsse4 +cppall: cppnone cppsse4 else ifeq ($(UNAME_P),arm) ###avxall: $(INCDIR)/fbridge.inc avxnone avxsse4 -avxall: avxnone avxsse4 +cppall: cppnone cppsse4 else ###avxall: $(INCDIR)/fbridge.inc avxnone avxsse4 avxavx2 avx512y avx512z -avxall: avxnone avxsse4 avxavx2 avx512y avx512z +cppall: cppnone cppsse4 cppavx2 cpp512y cpp512z endif #------------------------------------------------------------------------------- @@ -747,21 +742,31 @@ endif # Target: clean the builds .PHONY: clean +BUILD_DIRS := $(wildcard build.*) +NUM_BUILD_DIRS := $(words $(BUILD_DIRS)) + clean: ifeq ($(USEBUILDDIR),1) - rm -rf $(BUILDDIR) +ifeq ($(NUM_BUILD_DIRS),1) + $(info USEBUILDDIR=1, Only one build directory found.) + rm -rf $(BUILD_DIRS) +else ifeq ($(NUM_BUILD_DIRS),0) + $(error USEBUILDDIR=1, but no build directories are found.) else - rm -f $(BUILDDIR)/.build.* $(BUILDDIR)/*.o $(BUILDDIR)/*.exe + $(error Multiple BUILDDIR's found! Use 'cleannone', 'cleansse4', 'cleanavx2', 'clean512y','clean512z', 'cleancuda' or 'cleanall'.) +endif +else + rm -f $(BUILDDIR)/*.o $(BUILDDIR)/*.exe rm -f $(LIBDIR)/lib$(MG5AMC_CXXLIB).so $(LIBDIR)/lib$(MG5AMC_CULIB).so endif $(MAKE) -C ../../src clean -f $(CUDACPP_SRC_MAKEFILE) -### rm -rf $(INCDIR) cleanall: @echo - $(MAKE) USEBUILDDIR=0 clean -f $(CUDACPP_MAKEFILE) + rm -f $(BUILDDIR)/*.o $(BUILDDIR)/*.exe + rm -f $(LIBDIR)/lib$(MG5AMC_CXXLIB).so $(LIBDIR)/lib$(MG5AMC_CULIB).so @echo - $(MAKE) USEBUILDDIR=0 -C ../../src cleanall -f $(CUDACPP_SRC_MAKEFILE) + $(MAKE) -C ../../src cleanall -f $(CUDACPP_SRC_MAKEFILE) rm -rf build.* # Target: clean the builds as well as the gtest installation(s) @@ -771,6 +776,42 @@ ifneq ($(wildcard $(TESTDIRCOMMON)),) endif $(MAKE) -C $(TESTDIRLOCAL) clean +# Target: clean different builds +cleannone: + rm -rf build.none_* + rm -f ../../lib/build.none_*/lib$(MG5AMC_CXXLIB).so + $(MAKE) -C ../../src cleannone -f $(CUDACPP_SRC_MAKEFILE) + +cleansse4: + rm -rf build.sse4_* + rm -f ../../lib/build.sse4_*/lib$(MG5AMC_CXXLIB).so + $(MAKE) -C ../../src cleansse4 -f $(CUDACPP_SRC_MAKEFILE) + +cleanavx2: + rm -rf build.avx2_* + rm -f ../../lib/build.avx2_*/lib$(MG5AMC_CXXLIB).so + $(MAKE) -C ../../src cleanavx2 -f $(CUDACPP_SRC_MAKEFILE) + +clean512y: + rm -rf build.512y_* + rm -f ../../lib/build.512y_*/lib$(MG5AMC_CXXLIB).so + $(MAKE) -C ../../src clean512y -f $(CUDACPP_SRC_MAKEFILE) + +clean512z: + rm -rf build.512z_* + rm -f ../../lib/build.512z_*/lib$(MG5AMC_CXXLIB).so + $(MAKE) -C ../../src clean512z -f $(CUDACPP_SRC_MAKEFILE) + +cleancuda: + rm -rf build.cuda_* + rm -f ../../lib/build.cuda_*/lib$(MG5AMC_CULIB).so + $(MAKE) -C ../../src cleancuda -f $(CUDACPP_SRC_MAKEFILE) + +cleandir: + rm -f ./*.o ./*.exe + rm -f ../../lib/lib$(MG5AMC_CXXLIB).so ../../lib/lib$(MG5AMC_CULIB).so + $(MAKE) -C ../../src cleandir -f $(CUDACPP_SRC_MAKEFILE) + #------------------------------------------------------------------------------- # Target: show system and compiler information @@ -817,13 +858,10 @@ endif #------------------------------------------------------------------------------- -# Target: check (run the C++ test executable) +# Target: check/gcheck (run the C++ test executable) # [NB THIS IS WHAT IS USED IN THE GITHUB CI!] -ifneq ($(NVCC),) -check: runTest cmpFcheck cmpFGcheck -else check: runTest cmpFcheck -endif +gcheck: runTest cmpFGcheck # Target: runTest (run the C++ test executable runTest.exe) runTest: all.$(TAG) @@ -863,4 +901,4 @@ cmpFGcheck: all.$(TAG) memcheck: all.$(TAG) $(RUNTIME) $(CUDA_HOME)/bin/cuda-memcheck --check-api-memory-access yes --check-deprecated-instr yes --check-device-heap yes --demangle full --language c --leak-check full --racecheck-report all --report-api-errors all --show-backtrace yes --tool memcheck --track-unused-memory yes $(BUILDDIR)/gcheck.exe -p 2 32 2 -#------------------------------------------------------------------------------- +#------------------------------------------------------------------------------- \ No newline at end of file diff --git a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/dummy_fct.f b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/dummy_fct.f index 076cf29d67..4f7a204b8f 100644 --- a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/dummy_fct.f +++ b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/dummy_fct.f @@ -32,7 +32,7 @@ logical FUNCTION dummy_cuts(P) LOGICAL IS_A_NU(NEXTERNAL),IS_HEAVY(NEXTERNAL) logical do_cuts(nexternal) COMMON /TO_SPECISA/IS_A_J,IS_A_A,IS_A_L,IS_A_B,IS_A_NU,IS_HEAVY, - . IS_A_ONIUM, do_cuts + & IS_A_ONIUM, do_cuts dummy_cuts=.true. @@ -118,15 +118,16 @@ double precision function user_dynamical_scale(P) C ************************************************************ -C default for the library implementing a dummt bias function +C default for the library implementing a dummy bias function C ************************************************************ subroutine bias_wgt_custom(p, original_weight, bias_weight) - implicit none + implicit none C C Parameters C include 'nexternal.inc' -C + +C C Arguments C double precision p(0:3, nexternal) @@ -161,3 +162,4 @@ subroutine bias_wgt_custom(p, original_weight, bias_weight) return end subroutine bias_wgt_custom + diff --git a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/makefile b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/makefile index 74db44d848..093bc84271 100644 --- a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/makefile +++ b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/makefile @@ -9,6 +9,33 @@ FFLAGS+= -cpp # Compile counters with -O3 as in the cudacpp makefile (avoid being "unfair" to Fortran #740) CXXFLAGS = -O3 -Wall -Wshadow -Wextra +# Sets correct target based on MAKECMDGOALS +ifeq ($(MAKECMDGOALS),) + TARGET := undefined +else + ifeq ($(shell grep -q madevent_ <<< $(MAKECMDGOALS)a),) + TARGET := $(word 2,($(subst _, ,$(MAKECMDGOALS)))) + else + TARGET := $(MAKECMDGOALS) + endif +endif + +# Sets correct cppavx target as dependency when compiling Fortran +ifeq ($(shell grep -q cpp <<< $(MAKECMDGOALS)a),) + ifeq ($(TARGET),cpp) + CPPTARGET := cppavx2 + else + CPPTARGET := $(TARGET) + endif +endif + +# Default goal +.DEFAULT_GOAL := usage + +# Target if user does not specify target +usage: + $(error Unknown target='$(TARGET)': only 'cppnone', 'cppsse4', 'cppavx2', 'cpp512y', 'cpp512z' and 'cuda' are supported!) + # Enable ccache if USECCACHE=1 ifeq ($(USECCACHE)$(shell echo $(CXX) | grep ccache),1) override CXX:=ccache $(CXX) @@ -48,10 +75,10 @@ CUDACPP_MAKEFILE=cudacpp.mk # NB2 Use '|&' in CUDACPP_BUILDDIR to avoid confusing errors about googletest #507 # NB3 Do not add a comment inlined "CUDACPP_BUILDDIR=$(shell ...) # comment" as otherwise a trailing space is included... # NB4 The variables relevant to the cudacpp Makefile must be explicitly passed to $(shell...) -CUDACPP_MAKEENV:=$(shell echo '$(.VARIABLES)' | tr " " "\n" | egrep "(USEBUILDDIR|AVX|FPTYPE|HELINL|HRDCOD)") +CUDACPP_MAKEENV:=$(shell echo '$(.VARIABLES)' | tr " " "\n" | egrep "(USEBUILDDIR|FPTYPE|HELINL|HRDCOD)") ###$(info CUDACPP_MAKEENV=$(CUDACPP_MAKEENV)) ###$(info $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))")) -CUDACPP_BUILDDIR:=$(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn |& awk '/Building/{print $$3}' | sed s/BUILDDIR=//) +CUDACPP_BUILDDIR:=$(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn $(TARGET) 2>/dev/null | awk '/Building/{print $$3}' | sed s/BUILDDIR=//) ifeq ($(CUDACPP_BUILDDIR),) $(error CUDACPP_BUILDDIR='$(CUDACPP_BUILDDIR)' should not be empty!) else @@ -89,7 +116,7 @@ SYMMETRY = symmetry.o idenparts.o # Binaries -LDFLAGS+=-Wl,--no-relax # avoid 'failed to convert GOTPCREL relocation' error #458 +#LDFLAGS+=-Wl,--no-relax # avoid 'failed to convert GOTPCREL relocation' error #458 (flag not universal -> skip?) all: $(PROG)_fortran $(CUDACPP_BUILDDIR)/$(PROG)_cpp # also builds $(PROG)_cuda if $(CUDACPP_CULIB) exists (#503) @@ -115,10 +142,6 @@ $(LIBS): .libs cd ../../Source; make touch $@ -$(CUDACPP_BUILDDIR)/.cudacpplibs: - $(MAKE) -f $(CUDACPP_MAKEFILE) - touch $@ - # On Linux, set rpath to LIBDIR to make it unnecessary to use LD_LIBRARY_PATH # Use relative paths with respect to the executables ($ORIGIN on Linux) # On Darwin, building libraries with absolute paths in LIBDIR makes this unnecessary @@ -130,26 +153,47 @@ else override LIBFLAGSRPATH = -Wl,-rpath,'$$ORIGIN/$(LIBDIR)' endif -.PHONY: madevent_fortran_link madevent_cuda_link madevent_cpp_link +.PHONY: madevent_fortran_link madevent_cuda_link madevent_cpp_link madevent_cppnone_link madevent_cppsse4_link madevent_cppavx2_link madevent_cpp512y_link madevent_cpp512z_link madevent_fortran_link: $(PROG)_fortran rm -f $(PROG) ln -s $(PROG)_fortran $(PROG) +# Only used for testing, should be removed in the future madevent_cpp_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp rm -f $(PROG) ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) +madevent_cppnone_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp + rm -f $(PROG) + ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) + +madevent_cppsse4_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp + rm -f $(PROG) + ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) + +madevent_cppavx2_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp + rm -f $(PROG) + ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) + +madevent_cpp512y_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp + rm -f $(PROG) + ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) + +madevent_cpp512z_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp + rm -f $(PROG) + ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) + madevent_cuda_link: $(CUDACPP_BUILDDIR)/$(PROG)_cuda rm -f $(PROG) ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cuda $(PROG) # Building $(PROG)_cpp also builds $(PROG)_cuda if $(CUDACPP_CULIB) exists (improved patch for cpp-only builds #503) -$(CUDACPP_BUILDDIR)/$(PROG)_cpp: $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(LIBS) $(MATRIX) counters.o ompnumthreads.o $(CUDACPP_BUILDDIR)/.cudacpplibs +$(CUDACPP_BUILDDIR)/$(PROG)_cpp: $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(LIBS) $(MATRIX) counters.o ompnumthreads.o $(CPPTARGET) $(FC) -o $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o -L$(LIBDIR)/$(CUDACPP_BUILDDIR) -l$(CUDACPP_COMMONLIB) -l$(CUDACPP_CXXLIB) $(LIBFLAGSRPATH) $(LDFLAGS) - if [ -f $(LIBDIR)/$(CUDACPP_BUILDDIR)/lib$(CUDACPP_CULIB).* ]; then $(FC) -o $(CUDACPP_BUILDDIR)/$(PROG)_cuda $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o -L$(LIBDIR)/$(CUDACPP_BUILDDIR) -l$(CUDACPP_COMMONLIB) -l$(CUDACPP_CULIB) $(LIBFLAGSRPATH) $(LDFLAGS); fi -$(CUDACPP_BUILDDIR)/$(PROG)_cuda: $(CUDACPP_BUILDDIR)/$(PROG)_cpp +$(CUDACPP_BUILDDIR)/$(PROG)_cuda: $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(LIBS) $(MATRIX) counters.o ompnumthreads.o cuda + $(FC) -o $(CUDACPP_BUILDDIR)/$(PROG)_cuda $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o -L$(LIBDIR)/$(CUDACPP_BUILDDIR) -l$(CUDACPP_COMMONLIB) -l$(CUDACPP_CULIB) $(LIBFLAGSRPATH) $(LDFLAGS) counters.o: counters.cc timer.h $(CXX) $(CXXFLAGS) -c $< -o $@ @@ -215,49 +259,105 @@ genps.o: .libs UNAME_P := $(shell uname -p) ifeq ($(UNAME_P),ppc64le) -avxall: avxnone avxsse4 +cppall: + $(MAKE) USEBUILDDIR=1 cppnone + $(MAKE) USEBUILDDIR=1 cppsse4 else ifeq ($(UNAME_P),arm) -avxall: avxnone avxsse4 +cppall: + $(MAKE) USEBUILDDIR=1 cppnone + $(MAKE) USEBUILDDIR=1 cppsse4 else -avxall: avxnone avxsse4 avxavx2 avx512y avx512z +cppall: + $(MAKE) USEBUILDDIR=1 cppnone + $(MAKE) USEBUILDDIR=1 cppsse4 + $(MAKE) USEBUILDDIR=1 cppavx2 + $(MAKE) USEBUILDDIR=1 cpp512y + $(MAKE) USEBUILDDIR=1 cpp512z endif -avxnone: $(PROG)_fortran $(DSIG_cudacpp) - @echo - $(MAKE) USEBUILDDIR=1 AVX=none +ALL: + $(MAKE) USEBUILDDIR=1 cppnone + $(MAKE) USEBUILDDIR=1 cppsse4 + $(MAKE) USEBUILDDIR=1 cppavx2 + $(MAKE) USEBUILDDIR=1 cpp512y + $(MAKE) USEBUILDDIR=1 cpp512z + $(MAKE) USEBUILDDIR=1 cuda -avxsse4: $(PROG)_fortran $(DSIG_cudacpp) - @echo - $(MAKE) USEBUILDDIR=1 AVX=sse4 +cppnone: + $(MAKE) -f $(CUDACPP_MAKEFILE) cppnone -avxavx2: $(PROG)_fortran $(DSIG_cudacpp) - @echo - $(MAKE) USEBUILDDIR=1 AVX=avx2 +cppsse4: + $(MAKE) -f $(CUDACPP_MAKEFILE) cppsse4 -avx512y: $(PROG)_fortran $(DSIG_cudacpp) - @echo - $(MAKE) USEBUILDDIR=1 AVX=512y +cppavx2: + $(MAKE) -f $(CUDACPP_MAKEFILE) cppavx2 -avx512z: $(PROG)_fortran $(DSIG_cudacpp) - @echo - $(MAKE) USEBUILDDIR=1 AVX=512z +cpp512y: + $(MAKE) -f $(CUDACPP_MAKEFILE) cpp512y -###endif +cpp512z: + $(MAKE) -f $(CUDACPP_MAKEFILE) cpp512z + +cuda: + $(MAKE) -f $(CUDACPP_MAKEFILE) cuda # Clean (NB: 'make clean' in Source calls 'make clean' in all P*) -clean: # Clean builds: fortran in this Pn; cudacpp executables for one AVX in this Pn - $(RM) *.o gensym $(PROG) $(PROG)_fortran $(PROG)_forhel $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(CUDACPP_BUILDDIR)/$(PROG)_cuda +BUILD_DIRS := $(wildcard build.*) +BUILD_TARGET_DIR := $(shell echo $(BUILD_DIRS) | awk -F '[._]' '{print $$2}') +NUM_BUILD_DIRS := $(words $(BUILD_DIRS)) + +clean: +ifeq ($(USEBUILDDIR),1) +ifeq ($(NUM_BUILD_DIRS),1) + $(info USEBUILDDIR=1, only cleaning build dir.) + $(RM) -r $(BUILD_DIRS) + $(MAKE) -f $(CUDACPP_MAKEFILE) clean$(BUILD_TARGET_DIR) +else ifeq ($(NUM_BUILD_DIRS),0) + $(error USEBUILDDIR=1, but no build directories are found.) +else + $(error Multiple BUILDDIR's found! Use 'cleannone', 'cleansse4', 'cleanavx2', 'clean512y','clean512z', 'cleancuda' or 'cleanall'.) +endif +else + $(info USEBUILDDIR=0 only cleaning build with no dir.) + $(RM) *.o gensym $(PROG) $(PROG)_fortran $(PROG)_forhel ./$(PROG)_* + $(MAKE) -f $(CUDACPP_MAKEFILE) cleandir + $(RM) $(CUDACPP_BUILDDIR)/.*libs +endif + +cleannone: # Clean builds: fortran in this Pn; cpp executables for one AVX in this Pn + $(RM) *.o gensym $(PROG) $(PROG)_fortran $(PROG)_forhel build.none_*/$(PROG)_cpp + $(MAKE) -f $(CUDACPP_MAKEFILE) cleannone + +cleansse4: # Clean build: fortran in this Pn; cpp executables for cppsse4 in this Pn + $(RM) *.o gensym $(PROG) $(PROG)_fortran $(PROG)_forhel build.sse4_*/$(PROG)_cpp + $(MAKE) -f $(CUDACPP_MAKEFILE) cleansse4 + +cleanavx2: # Clean build: fortran in this Pn; cpp executables for cppavx2 in this Pn + $(RM) *.o gensym $(PROG) $(PROG)_fortran $(PROG)_forhel build.avx2_*/$(PROG)_cpp + $(MAKE) -f $(CUDACPP_MAKEFILE) cleanavx2 + +clean512y: # Clean build: fortran in this Pn; cpp executables for cpp512y in this Pn + $(RM) *.o gensym $(PROG) $(PROG)_fortran $(PROG)_forhel build.512y_*/$(PROG)_cpp + $(MAKE) -f $(CUDACPP_MAKEFILE) clean512y + +clean512z: # Clean build: fortran in this Pn; cpp executables for cpp512z in this Pn + $(RM) *.o gensym $(PROG) $(PROG)_fortran $(PROG)_forhel build.512z_*/$(PROG)_cpp + $(MAKE) -f $(CUDACPP_MAKEFILE) clean512z + +cleancuda: # Clean build: fortran in this Pn; cuda executables in this Pn + $(RM) *.o gensym $(PROG) $(PROG)_fortran $(PROG)_forhel build.cuda_*/$(PROG)_cuda + $(MAKE) -f $(CUDACPP_MAKEFILE) cleancuda cleanavxs: clean # Clean builds: fortran in this Pn; cudacpp for all AVX in this Pn and in src $(MAKE) -f $(CUDACPP_MAKEFILE) cleanall - rm -f $(CUDACPP_BUILDDIR)/.cudacpplibs - rm -f .libs + $(RM) $(CUDACPP_BUILDDIR)/.*libs + $(RM) .libs cleanall: # Clean builds: fortran in all P* and in Source; cudacpp for all AVX in all P* and in src make -C ../../Source cleanall - rm -rf $(LIBDIR)libbias.$(libext) - rm -f ../../Source/*.mod ../../Source/*/*.mod + $(RM) -r $(LIBDIR)libbias.$(libext) + $(RM) ../../Source/*.mod ../../Source/*/*.mod distclean: cleanall # Clean all fortran and cudacpp builds as well as the googletest installation $(MAKE) -f $(CUDACPP_MAKEFILE) distclean diff --git a/epochX/cudacpp/gg_ttggg.mad/bin/generate_events b/epochX/cudacpp/gg_ttggg.mad/bin/generate_events index 107313b25d..5577cc66a0 100755 --- a/epochX/cudacpp/gg_ttggg.mad/bin/generate_events +++ b/epochX/cudacpp/gg_ttggg.mad/bin/generate_events @@ -46,7 +46,7 @@ if __debug__ and (not os.path.exists(pjoin(root_path,'../..', 'bin','create_rele sys.path.append(pjoin(root_path,'bin','internal')) import madevent_interface as ME - +import misc as misc import logging import logging.config @@ -160,17 +160,31 @@ if '__main__' == __name__: # Check that python version is valid set_configuration() - argument = sys.argv + argument = sys.argv + + # check for plugin customization of the launch command + launch_interface = ME.MadEventCmdShell + if os.path.exists(pjoin(root_path, 'bin','internal', 'launch_plugin.py')): + with misc.TMP_variable(sys, 'path', sys.path + [pjoin(root_path, 'bin', 'internal')]): + from importlib import reload + try: + reload('launch_plugin') + except Exception as error: + import launch_plugin + launch_interface = launch_plugin.MEINTERFACE + + + try: if '-h' in argument or '--help' in argument: - launch = ME.MadEventCmdShell(me_dir=root_path, force_run=True) + launch = launch_interface(me_dir=root_path, force_run=True) launch.exec_cmd('help generate_events') sys.exit() elif len(argument) > 1 and argument[1] in ['0', '1', '2']: argument = treat_old_argument(argument) with ME.MadEventCmdShell.RunWebHandling(root_path, ): - launch = ME.MadEventCmdShell(me_dir=root_path, force_run=True) + launch = launch_interface(me_dir=root_path, force_run=True) launch.run_cmd('generate_events %s' % ' '.join(argument[1:])) launch.run_cmd('quit') except ME.MadEventAlreadyRunning as message: diff --git a/epochX/cudacpp/gg_ttggg.mad/bin/internal/banner.py b/epochX/cudacpp/gg_ttggg.mad/bin/internal/banner.py index 7624b9f557..824815f47b 100755 --- a/epochX/cudacpp/gg_ttggg.mad/bin/internal/banner.py +++ b/epochX/cudacpp/gg_ttggg.mad/bin/internal/banner.py @@ -537,7 +537,7 @@ def charge_card(self, tag): self.param_card = param_card_reader.ParamCard(param_card) return self.param_card elif tag == 'mgruncard': - self.run_card = RunCard(self[tag]) + self.run_card = RunCard(self[tag], unknown_warning=False) return self.run_card elif tag == 'mg5proccard': proc_card = self[tag].split('\n') @@ -1002,13 +1002,14 @@ def __init__(self, finput=None, **opt): self.allowed_value = {} self.default_setup() + self.plugin_input(finput) # if input is define read that input if isinstance(finput, (file, str, StringIO.StringIO)): self.read(finput, **opt) - self.plugin_input(finput) + def plugin_input(self, finput=None): @@ -2624,6 +2625,7 @@ class RunCard(ConfigFile): default_include_file = 'run_card.inc' default_autodef_file = 'run.inc' donewarning = [] + include_as_parameter = [] def plugin_input(self, finput): @@ -2670,18 +2672,40 @@ def __new__(cls, finput=None, **opt): elif isinstance(finput, cls): target_class = finput.__class__ elif isinstance(finput, str): + path = finput if '\n' not in finput: finput = open(finput).read() if 'req_acc_FO' in finput: target_class = RunCardNLO else: target_class = RunCardLO + if MADEVENT and os.path.exists(pjoin(MEDIR, 'bin','internal', 'launch_plugin.py')): + with misc.TMP_variable(sys, 'path', sys.path + [pjoin(MEDIR, 'bin', 'internal')]): + from importlib import reload + try: + reload('launch_plugin') + except Exception as error: + import launch_plugin + target_class = launch_plugin.RunCard + elif not MADEVENT and os.path.exists(path.replace('run_card.dat', '../bin/internal/launch_plugin.py')): + misc.sprint('try to use plugin class') + pydir = path.replace('run_card.dat', '../bin/internal/') + with misc.TMP_variable(sys, 'path', sys.path + [pydir]): + from importlib import reload + try: + reload('launch_plugin') + except Exception as error: + import launch_plugin + target_class = launch_plugin.RunCard + else: return None target_class.fill_post_set_from_blocks() - - return super(RunCard, cls).__new__(target_class, finput, **opt) + out = super(RunCard, cls).__new__(target_class, finput, **opt) + if not isinstance(out, RunCard): #should not happen but in presence of missmatch of library loaded. + out.__init__(finput, **opt) + return out else: return super(RunCard, cls).__new__(cls, finput, **opt) @@ -2709,7 +2733,7 @@ def __init__(self, *args, **opts): self.system_default = {} self.display_block = [] # set some block to be displayed - + self.fct_mod = {} # {param: (fct_pointer, *argument, **opts)} self.cut_class = {} self.warned=False @@ -2746,7 +2770,7 @@ def get_lepton_densities(cls): def add_param(self, name, value, fortran_name=None, include=True, hidden=False, legacy=False, cut=False, system=False, sys_default=None, - autodef=False, + autodef=False, fct_mod=None, **opts): """ add a parameter to the card. value is the default value and defines the type (int/float/bool/str) of the input. @@ -2760,6 +2784,7 @@ def add_param(self, name, value, fortran_name=None, include=True, If a path (Source/PDF/pdf.inc) the definition will be added within that file Default is False (does not add the definition) entry added in the run_card will automatically have this on True. + fct_mod: defines a function to run if the parameter is modify in the include file options of **opts: - allowed: list of valid options. '*' means anything else should be allowed. empty list means anything possible as well. @@ -2784,8 +2809,12 @@ def add_param(self, name, value, fortran_name=None, include=True, if autodef: self.definition_path[autodef].append(name) self.user_set.add(name) + # function to trigger if a value is modified in the include file + # main target is action to force correct recompilation (like for compilation flag/...) + if fct_mod: + self.fct_mod[name] = fct_mod - def read(self, finput, consistency=True): + def read(self, finput, consistency=True, unknown_warning=True): """Read the input file, this can be a path to a file, a file object, a str with the content of the file.""" @@ -2793,6 +2822,7 @@ def read(self, finput, consistency=True): if "\n" in finput: finput = finput.split('\n') elif os.path.isfile(finput): + self.path = finput finput = open(finput) else: raise Exception("No such file %s" % finput) @@ -2807,7 +2837,7 @@ def read(self, finput, consistency=True): name = name.lower().strip() if name not in self: #looks like an entry added by a user -> add it nicely - self.add_unknown_entry(name, value) + self.add_unknown_entry(name, value, unknown_warning) else: self.set( name, value, user=True) # parameter not set in the run_card can be set to compatiblity value @@ -2819,7 +2849,7 @@ def read(self, finput, consistency=True): logger.warning(str(error)) else: raise - def add_unknown_entry(self, name, value): + def add_unknown_entry(self, name, value, unknow_warning): """function to add an entry to the run_card when the associated parameter does not exists. This is based on the guess_entry_fromname for the various syntax providing input. This then call add_param accordingly. @@ -2858,7 +2888,7 @@ def add_unknown_entry(self, name, value): raise Exception("dictionary need to have at least one entry") default['dict']['__type__'] = default[self.guess_type_from_value(default_value[0])] - if name not in RunCard.donewarning: + if name not in RunCard.donewarning and unknow_warning: logger.warning("Found unexpected entry in run_card: \"%s\" with value \"%s\".\n"+\ " The type was assigned to %s. \n"+\ " The definition of that variable will %sbe automatically added to fortran file %s\n"+\ @@ -2896,7 +2926,16 @@ def valid_line(self, line, tmp): return False else: return True - + + + def reset_simd(self, old_value, new_value, name, *args, **opts): + raise Exception('pass in reset simd') + + def make_clean(self,old_value, new_value, name, dir): + raise Exception('pass make clean for ', dir) + + def make_Ptouch(self,old_value, new_value, name, reset): + raise Exception('pass Ptouch for ', reset) def write(self, output_file, template=None, python_template=False, write_hidden=False, template_options=None, **opt): @@ -3071,6 +3110,77 @@ def write(self, output_file, template=None, python_template=False, else: output_file.write(text) + def get_last_value_include(self, output_dir): + """For paraeter in self.fct_mod + parse the associate inc file to get the value of the previous run. + We return a dictionary {name: old_value} + if inc file does not exist we will return the current value (i.e. set has no change) + """ + + #remember that + # default_include_file is a class variable + # self.includepath is on the form include_path : [list of param ] + out = {} + + # setup inc_to_parse to be like self.includepath (include_path : [list of param ]) + # BUT only containing the parameter that need to be tracked for the fct_mod option + inc_to_parse = {} + for inc_file, params in self.includepath.items(): + if not inc_file: + continue + if any(p in params for p in self.fct_mod): + inc_to_parse[inc_file] = [name for name in self.includepath[inc_file] if name in self.fct_mod] + + # now loop over the files and ask the associate function + for inc_file, params in inc_to_parse.items(): + if inc_file is True: + inc_file = self.default_include_file + out.update(self.get_value_from_include(inc_file, params, output_dir)) + + return out + + def get_value_from_include(self, path, list_of_params, output_dir): + """for a given include file return the current value of the requested parameter + return a dictionary {name: value} + if path does not exists return the current value in self for all parameter""" + + #WARNING DOES NOT HANDLE LIST/DICT so far + + # handle case where file is missing + if not os.path.exists(pjoin(output_dir,path)): + misc.sprint("include file not existing", pjoin(output_dir,path)) + out = {name: self[name] for name in list_of_params} + + with open(pjoin(output_dir,path), 'r') as fsock: + text = fsock.read() + + for name in list_of_params: + misc.sprint(name, name in self.fortran_name) + misc.sprint(self.fortran_name[name] if name in self.fortran_name[name] else name) + to_track = [self.fortran_name[name] if name in self.fortran_name else name for name in list_of_params] + pattern = re.compile(r"\(?(%(names)s)\s?=\s?([^)]*)\)?" % {'names':'|'.join(to_track)}, re.I) + out = dict(pattern.findall(text)) + misc.sprint(out) + for name in list_of_params: + if name in self.fortran_name: + value = out[self.fortran_name[name]] + del out[self.fortran_name[name]] + out[name] = value + + for name, value in out.items(): + try: + out[name] = self.format_variable(value, type(self[name])) + except Exception: + continue + + if len(out) != len(list_of_params): + misc.sprint(list_of_params) + misc.sprint(to_track) + misc.sprint(self.fortran_name) + misc.sprint(text) + raise Exception + return out + def get_default(self, name, default=None, log_level=None): """return self[name] if exist otherwise default. log control if we @@ -3361,71 +3471,93 @@ def write_include_file(self, output_dir, output_file=None): #ensusre that system only parameter are correctly set self.update_system_parameter_for_include() + value_in_old_include = self.get_last_value_include(output_dir) + + if output_dir: self.write_autodef(output_dir, output_file=None) # check/fix status of customised functions self.edit_dummy_fct_from_file(self["custom_fcts"], os.path.dirname(output_dir)) for incname in self.includepath: - if incname is True: - pathinc = self.default_include_file - elif incname is False: - continue - else: - pathinc = incname + self.write_one_include_file(output_dir, incname, output_file) + + for name,value in value_in_old_include.items(): + if value != self[name]: + self.fct_mod[name][0](value, self[name], name, *self.fct_mod[name][1],**self.fct_mod[name][2]) - if output_file: - fsock = output_file + def write_one_include_file(self, output_dir, incname, output_file=None): + """write one include file at the time""" + + misc.sprint(incname) + if incname is True: + pathinc = self.default_include_file + elif incname is False: + return + else: + pathinc = incname + + if output_file: + fsock = output_file + else: + fsock = file_writers.FortranWriter(pjoin(output_dir,pathinc+'.tmp')) + + + for key in self.includepath[incname]: + #define the fortran name + if key in self.fortran_name: + fortran_name = self.fortran_name[key] else: - fsock = file_writers.FortranWriter(pjoin(output_dir,pathinc+'.tmp')) - for key in self.includepath[incname]: - #define the fortran name - if key in self.fortran_name: - fortran_name = self.fortran_name[key] + fortran_name = key + + if incname in self.include_as_parameter: + fsock.writelines('INTEGER %s\n' % fortran_name) + #get the value with warning if the user didn't set it + value = self.get_default(key) + if hasattr(self, 'mod_inc_%s' % key): + value = getattr(self, 'mod_inc_%s' % key)(value) + # Special treatment for strings containing a list of + # strings. Convert it to a list of strings + if isinstance(value, list): + # in case of a list, add the length of the list as 0th + # element in fortran. Only in case of integer or float + # list (not for bool nor string) + targettype = self.list_parameter[key] + if targettype is bool: + pass + elif targettype is int: + line = '%s(%s) = %s \n' % (fortran_name, 0, self.f77_formatting(len(value))) + fsock.writelines(line) + elif targettype is float: + line = '%s(%s) = %s \n' % (fortran_name, 0, self.f77_formatting(float(len(value)))) + fsock.writelines(line) + # output the rest of the list in fortran + for i,v in enumerate(value): + line = '%s(%s) = %s \n' % (fortran_name, i+1, self.f77_formatting(v)) + fsock.writelines(line) + elif isinstance(value, dict): + for fortran_name, onevalue in value.items(): + line = '%s = %s \n' % (fortran_name, self.f77_formatting(onevalue)) + fsock.writelines(line) + elif isinstance(incname,str) and 'compile' in incname: + if incname in self.include_as_parameter: + line = 'PARAMETER (%s=%s)' %( fortran_name, value) else: - fortran_name = key - - #get the value with warning if the user didn't set it - value = self.get_default(key) - if hasattr(self, 'mod_inc_%s' % key): - value = getattr(self, 'mod_inc_%s' % key)(value) - # Special treatment for strings containing a list of - # strings. Convert it to a list of strings - if isinstance(value, list): - # in case of a list, add the length of the list as 0th - # element in fortran. Only in case of integer or float - # list (not for bool nor string) - targettype = self.list_parameter[key] - if targettype is bool: - pass - elif targettype is int: - line = '%s(%s) = %s \n' % (fortran_name, 0, self.f77_formatting(len(value))) - fsock.writelines(line) - elif targettype is float: - line = '%s(%s) = %s \n' % (fortran_name, 0, self.f77_formatting(float(len(value)))) - fsock.writelines(line) - # output the rest of the list in fortran - for i,v in enumerate(value): - line = '%s(%s) = %s \n' % (fortran_name, i+1, self.f77_formatting(v)) - fsock.writelines(line) - elif isinstance(value, dict): - for fortran_name, onevalue in value.items(): - line = '%s = %s \n' % (fortran_name, self.f77_formatting(onevalue)) - fsock.writelines(line) - elif isinstance(incname,str) and 'compile' in incname: line = '%s = %s \n' % (fortran_name, value) - fsock.write(line) + fsock.write(line) + else: + if incname in self.include_as_parameter: + line = 'PARAMETER (%s=%s)' %( fortran_name, self.f77_formatting(value)) else: line = '%s = %s \n' % (fortran_name, self.f77_formatting(value)) - fsock.writelines(line) - if not output_file: - fsock.close() - path = pjoin(output_dir,pathinc) - if not os.path.exists(path) or not filecmp.cmp(path, path+'.tmp'): - files.mv(path+'.tmp', path) - else: - os.remove(path+'.tmp') - + fsock.writelines(line) + if not output_file: + fsock.close() + path = pjoin(output_dir,pathinc) + if not os.path.exists(path) or not filecmp.cmp(path, path+'.tmp'): + files.mv(path+'.tmp', path) + else: + os.remove(path+'.tmp') def write_autodef(self, output_dir, output_file=None): """ Add the definition of variable to run.inc if the variable is set with autodef. @@ -3764,13 +3896,14 @@ def remove_all_cut(self): %(tmin_for_channel)s = tmin_for_channel ! limit the non-singular reach of --some-- channel of integration related to T-channel diagram (value between -1 and 0), -1 is no impact %(survey_splitting)s = survey_splitting ! for loop-induced control how many core are used at survey for the computation of a single iteration. %(survey_nchannel_per_job)s = survey_nchannel_per_job ! control how many Channel are integrated inside a single job on cluster/multicore - %(refine_evt_by_job)s = refine_evt_by_job ! control the maximal number of events for the first iteration of the refine (larger means less jobs) + %(refine_evt_by_job)s = refine_evt_by_job ! control the maximal number of events for the first iteration of the refine (larger means less jobs) #********************************************************************* -# Compilation flag. No automatic re-compilation (need manual "make clean" in Source) +# Compilation flag. #********************************************************************* %(global_flag)s = global_flag ! fortran optimization flag use for the all code. %(aloha_flag)s = aloha_flag ! fortran optimization flag for aloha function. Suggestions: '-ffast-math' %(matrix_flag)s = matrix_flag ! fortran optimization flag for matrix.f function. Suggestions: '-O3' + %(vector_size)s = vector_size ! size designed for SIMD/OpenMP/GPU (number of events in lockstep) """ template_off = '# To see advanced option for Phase-Space optimization: type "update psoptim"' @@ -3926,9 +4059,12 @@ class RunCardLO(RunCard): "get_dummy_x1_x2": pjoin("SubProcesses","dummy_fct.f"), "dummy_boostframe": pjoin("SubProcesses","dummy_fct.f"), "user_dynamical_scale": pjoin("SubProcesses","dummy_fct.f"), + "bias_wgt_custom": pjoin("SubProcesses","dummy_fct.f"), "user_": pjoin("SubProcesses","dummy_fct.f") # all function starting by user will be added to that file } + include_as_parameter = ['vector.inc'] + if MG5DIR: default_run_card = pjoin(MG5DIR, "internal", "default_run_card_lo.dat") @@ -4162,10 +4298,15 @@ def default_setup(self): self.add_param('hel_splitamp', True, hidden=True, include=False, comment='decide if amplitude aloha call can be splitted in two or not when doing helicity per helicity optimization.') self.add_param('hel_zeroamp', True, hidden=True, include=False, comment='decide if zero amplitude can be removed from the computation when doing helicity per helicity optimization.') self.add_param('SDE_strategy', 1, allowed=[1,2], fortran_name="sde_strat", comment="decide how Multi-channel should behaves \"1\" means full single diagram enhanced (hep-ph/0208156), \"2\" use the product of the denominator") - self.add_param('global_flag', '-O', include=False, hidden=True, comment='global fortran compilation flag, suggestion -fbound-check') - self.add_param('aloha_flag', '', include=False, hidden=True, comment='global fortran compilation flag, suggestion: -ffast-math') - self.add_param('matrix_flag', '', include=False, hidden=True, comment='fortran compilation flag for the matrix-element files, suggestion -O3') - + self.add_param('global_flag', '-O', include=False, hidden=True, comment='global fortran compilation flag, suggestion -fbound-check', + fct_mod=(self.make_clean, ('Source'),{})) + self.add_param('aloha_flag', '', include=False, hidden=True, comment='global fortran compilation flag, suggestion: -ffast-math', + fct_mod=(self.make_clean, ('Source/DHELAS'),{})) + self.add_param('matrix_flag', '', include=False, hidden=True, comment='fortran compilation flag for the matrix-element files, suggestion -O3', + fct_mod=(self.make_Ptouch, ('matrix'),{})) + self.add_param('vector_size', 1, include='vector.inc', hidden=True, comment='lockstep size for parralelism run', + fortran_name='VECSIZE_MEMMAX', fct_mod=(self.reset_simd,(),{})) + # parameter allowing to define simple cut via the pdg # Special syntax are related to those. (can not be edit directly) self.add_param('pt_min_pdg',{'__type__':0.}, include=False, cut=True) @@ -4187,8 +4328,7 @@ def default_setup(self): self.add_param('mxxmin4pdg',[-1.], system=True) self.add_param('mxxpart_antipart', [False], system=True) - # CUDACPP parameters - self.add_param('cudacpp_backend', 'CPP', include=False, hidden=False) + def check_validity(self): """ """ diff --git a/epochX/cudacpp/gg_ttggg.mad/bin/internal/check_param_card.py b/epochX/cudacpp/gg_ttggg.mad/bin/internal/check_param_card.py index fe874a06a4..71089d7480 100755 --- a/epochX/cudacpp/gg_ttggg.mad/bin/internal/check_param_card.py +++ b/epochX/cudacpp/gg_ttggg.mad/bin/internal/check_param_card.py @@ -85,7 +85,7 @@ def load_str(self, text): self.value= ' '.join(data[len(self.lhacode):]) # check that lhacode are the first entry otherwise return invalid param. if ' '.join([str(i) for i in self.lhacode]) != ' '.join(data[:len(self.lhacode)]): - raise InvalidParam + raise InvalidParam("line was %s" % str(data)) else: self.value = data[-1] diff --git a/epochX/cudacpp/gg_ttggg.mad/bin/internal/common_run_interface.py b/epochX/cudacpp/gg_ttggg.mad/bin/internal/common_run_interface.py index 5d0187e3fa..14c7f310dc 100755 --- a/epochX/cudacpp/gg_ttggg.mad/bin/internal/common_run_interface.py +++ b/epochX/cudacpp/gg_ttggg.mad/bin/internal/common_run_interface.py @@ -749,13 +749,15 @@ def writeRunWeb(me_dir): class RunWebHandling(object): - def __init__(self, me_dir, crashifpresent=True, warnifpresent=True): + def __init__(self, me_dir, crashifpresent=True, warnifpresent=True, force_run=False): """raise error if RunWeb already exists me_dir is the directory where the write RunWeb""" self.remove_run_web = True self.me_dir = me_dir - + if force_run: + self.remove_run_web = False + return if crashifpresent or warnifpresent: if os.path.exists(pjoin(me_dir, 'RunWeb')): pid = open(pjoin(me_dir, 'RunWeb')).read() @@ -6574,7 +6576,7 @@ def reask(self, *args, **opt): fail_due_to_format = 0 #parameter to avoid infinite loop def postcmd(self, stop, line): - if line not in [None, '0', 'done', '']: + if line not in [None, '0', 'done', '',0]: ending_question = cmd.OneLinePathCompletion.postcmd(self,stop,line) else: ending_question = True @@ -7533,7 +7535,8 @@ def open_file(self, answer): else: raise if time.time() - start < .5: - self.mother_interface.ask("Are you really that fast? If you are using an editor that returns directly. Please confirm that you have finised to edit the file", 'y') + self.mother_interface.ask("Are you really that fast? If you are using an editor that returns directly. Please confirm that you have finised to edit the file", 'y', + timeout=False) self.reload_card(path) def reload_card(self, path): diff --git a/epochX/cudacpp/gg_ttggg.mad/bin/internal/extended_cmd.py b/epochX/cudacpp/gg_ttggg.mad/bin/internal/extended_cmd.py index a6a8609dce..2f37070580 100755 --- a/epochX/cudacpp/gg_ttggg.mad/bin/internal/extended_cmd.py +++ b/epochX/cudacpp/gg_ttggg.mad/bin/internal/extended_cmd.py @@ -1108,9 +1108,12 @@ def ask(self, question, default, choices=[], path_msg=None, if alias: choices += list(alias.keys()) + + question_instance = obj(question, allow_arg=choices, default=default, mother_interface=self, **opt) - + if fct_timeout is None: + fct_timeout = lambda x: question_instance.postcmd(x, default) if x and default else False if first_cmd: if isinstance(first_cmd, str): question_instance.onecmd(first_cmd) @@ -2271,6 +2274,9 @@ def postcmd(self, stop, line): if n: self.default(line) return self.postcmd(stop, line) + elif self.value is None and line: + self.default(line) + return self.postcmd(stop, line) if not self.casesensitive: for ans in self.allow_arg: if ans.lower() == self.value.lower(): diff --git a/epochX/cudacpp/gg_ttggg.mad/bin/internal/gen_ximprove.py b/epochX/cudacpp/gg_ttggg.mad/bin/internal/gen_ximprove.py index 3b8ec31215..a88d60b282 100755 --- a/epochX/cudacpp/gg_ttggg.mad/bin/internal/gen_ximprove.py +++ b/epochX/cudacpp/gg_ttggg.mad/bin/internal/gen_ximprove.py @@ -154,10 +154,15 @@ def get_helicity(self, to_submit=True, clean=True): p = misc.Popen(['./gensym'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT, cwd=Pdir) #sym_input = "%(points)d %(iterations)d %(accuracy)f \n" % self.opts + (stdout, _) = p.communicate(''.encode()) stdout = stdout.decode('ascii',errors='ignore') - nb_channel = max([math.floor(float(d)) for d in stdout.split()]) - + try: + nb_channel = max([math.floor(float(d)) for d in stdout.split()]) + except Exception as error: + misc.sprint(stdout, 'no channel or error for %s' % Pdir) + continue + self.cmd.compile(['madevent_forhel'], cwd=Pdir) if not os.path.exists(pjoin(Pdir, 'madevent_forhel')): raise Exception('Error make madevent_forhel not successful') diff --git a/epochX/cudacpp/gg_ttggg.mad/bin/internal/launch_plugin.py b/epochX/cudacpp/gg_ttggg.mad/bin/internal/launch_plugin.py new file mode 100644 index 0000000000..23271b846e --- /dev/null +++ b/epochX/cudacpp/gg_ttggg.mad/bin/internal/launch_plugin.py @@ -0,0 +1,100 @@ + +import logging +import os +import subprocess +pjoin = os.path.join +logger = logging.getLogger('cmdprint') # for stdout + +try: + import madgraph +except ImportError: + import internal.madevent_interface as madevent_interface + import internal.misc as misc + import internal.extended_cmd as extended_cmd + import internal.banner as banner_mod +else: + import madgraph.interface.madevent_interface as madevent_interface + import madgraph.various.misc as misc + import madgraph.interface.extended_cmd as extended_cmd + import madgraph.various.banner as banner_mod + +class CPPMEInterface(madevent_interface.MadEventCmdShell): + + def compile(self, *args, **opts): + """ """ + + import multiprocessing + if not self.options['nb_core'] or self.options['nb_core'] == 'None': + self.options['nb_core'] = multiprocessing.cpu_count() + + if args and args[0][0] == 'madevent' and hasattr(self, 'run_card'): + import pathlib + import os + pjoin = os.path.join + + + + + cudacpp_backend = self.run_card['cudacpp_backend'].upper() # the default value is defined in banner.py + logger.info("Building madevent in madevent_interface.py with '%s' matrix elements"%cudacpp_backend) + if cudacpp_backend == 'FORTRAN': + args[0][0] = 'madevent_fortran_link' + elif cudacpp_backend == 'CPP': + args[0][0] = 'madevent_cpp_link' + elif cudacpp_backend == 'CUDA': + args[0][0] = 'madevent_cuda_link' + else: + raise Exception("Invalid cudacpp_backend='%s': only 'FORTRAN', 'CPP', 'CUDA' are supported") + return misc.compile(nb_core=self.options['nb_core'], *args, **opts) + else: + return misc.compile(nb_core=self.options['nb_core'], *args, **opts) + +class CPPRunCard(banner_mod.RunCardLO): + + def reset_simd(self, old_value, new_value, name): + if not hasattr(self, 'path'): + raise Exception + + if name == "vector_size" and new_value <= int(old_value): + # code can handle the new size -> do not recompile + return + + Sourcedir = pjoin(os.path.dirname(os.path.dirname(self.path)), 'Source') + subprocess.call(['make', 'cleanavx'], cwd=Sourcedir, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) + + def plugin_input(self, finput): + return + + def default_setup(self): + super().default_setup() + self.add_param('cudacpp_backend', 'CPP', include=False, hidden=False) + + + def write_one_include_file(self, output_dir, incname, output_file=None): + """write one include file at the time""" + + if incname == "vector.inc" and 'vector_size' not in self.user_set: + return + super().write_one_include_file(output_dir, incname, output_file) + + + def check_validity(self): + """ensure that PLUGIN information are consistent""" + + super().check_validity() + + if self['SDE_strategy'] != 1: + logger.warning('SDE_strategy different of 1 is not supported with SMD/GPU mode') + self['sde_strategy'] = 1 + + if self['hel_recycling']: + self['hel_recycling'] = False + +class GPURunCard(CPPRunCard): + + def default_setup(self): + super(CPPRunCard, self).default_setup() + self.add_param('cudacpp_backend', 'CUDA', include=False, hidden=False) + +MEINTERFACE = CPPMEInterface +RunCard = CPPRunCard diff --git a/epochX/cudacpp/gg_ttggg.mad/bin/internal/madevent_interface.py b/epochX/cudacpp/gg_ttggg.mad/bin/internal/madevent_interface.py index 920e07a926..d722702891 100755 --- a/epochX/cudacpp/gg_ttggg.mad/bin/internal/madevent_interface.py +++ b/epochX/cudacpp/gg_ttggg.mad/bin/internal/madevent_interface.py @@ -3796,9 +3796,11 @@ def do_combine_events(self, line): if self.run_card['bias_module'].lower() not in ['dummy', 'none'] and nb_event: self.correct_bias() - + elif self.run_card['custom_fcts']: + self.correct_bias() + logger.info("combine events done in %s", time.time()-start) - + self.to_store.append('event') diff --git a/epochX/cudacpp/gg_ttggg.mad/bin/internal/run_plot b/epochX/cudacpp/gg_ttggg.mad/bin/internal/run_plot new file mode 100755 index 0000000000..7deee7ac88 --- /dev/null +++ b/epochX/cudacpp/gg_ttggg.mad/bin/internal/run_plot @@ -0,0 +1,47 @@ +#!/bin/bash +# +# This runs MadAnalysis on the unweighted_events.lhe +# +# Usage: run_plot run_name [madir [tddir]] +# where madir is the path to the MadAnalysis package + +main=`pwd` + +if [ "$1" != "" ] +then + run=$1 +else + echo "Usage: run_plot runname [MAdir [tddir]]" + exit +fi + +if [ "$2" != "" ] +then + MAdir=$main/$2 +else + MAdir=$main/../../MadAnalysis +fi + +if [ "$3" != "" ]; then + td=$main/$3 +else + td=$main/../../td +fi + +dirbin=$main/../bin + +if [[ $run != "" && -e ${run}_unweighted_events.lhe.gz ]];then + gunzip -c ${run}_unweighted_events.lhe.gz > unweighted_events.lhe +fi + +if [[ (-x $MAdir/plot_events) && (-e unweighted_events.lhe) && (-e ../Cards/plot_card.dat) ]]; then + echo "Creating Plots" + mkdir $run + cd $run + echo "../unweighted_events.lhe" > events.list + $dirbin/plot $MAdir $td > plot.log + cd .. + $dirbin/plot_page-pl $run parton + mv plots.html ${run}_plots.html +fi + diff --git a/epochX/cudacpp/gg_ttggg.mad/bin/internal/run_plot_delphes b/epochX/cudacpp/gg_ttggg.mad/bin/internal/run_plot_delphes new file mode 100755 index 0000000000..975f410d0e --- /dev/null +++ b/epochX/cudacpp/gg_ttggg.mad/bin/internal/run_plot_delphes @@ -0,0 +1,46 @@ +#!/bin/bash +# +# This runs MadAnalysis on the delphes_events.lhco +# +# Usage: run_plot run_name [madir [tddir]] +# where madir is the path to the MadAnalysis package + +main=`pwd` + +if [ "$1" != "" ] +then + run=$1 +else + echo "Usage: run_plot runname [MAdir [tddir]]" + exit +fi + +if [ "$2" != "" ] +then + MAdir=$main/$2 +else + MAdir=$main/../../MadAnalysis +fi + +if [ "$3" != "" ]; then + td=$main/$3 +else + td=$main/../../td +fi + +dirbin=$main/../bin + +if [[ $run != "" && -e ${run}_delphes_events.lhco.gz ]];then + gunzip -c ${run}_delphes_events.lhco.gz > delphes_events.lhco +fi + +if [[ (-x $MAdir/plot_events) && (-e delphes_events.lhco) && (-e ../Cards/plot_card.dat) ]]; then + echo "Creating Plots" + mkdir ${run}_delphes + cd ${run}_delphes + echo "../delphes_events.lhco" > events.list + $dirbin/plot $MAdir $td > plot.log + cd .. + $dirbin/plot_page-pl ${run}_delphes Delphes + mv plots.html ${run}_plots_delphes.html +fi diff --git a/epochX/cudacpp/gg_ttggg.mad/bin/internal/run_plot_pgs b/epochX/cudacpp/gg_ttggg.mad/bin/internal/run_plot_pgs new file mode 100755 index 0000000000..e7a36ef344 --- /dev/null +++ b/epochX/cudacpp/gg_ttggg.mad/bin/internal/run_plot_pgs @@ -0,0 +1,47 @@ +#!/bin/bash +# +# This runs MadAnalysis on the unweighted_events.lhe +# +# Usage: run_plot run_name [madir [tddir]] +# where madir is the path to the MadAnalysis package + +main=`pwd` + +if [ "$1" != "" ] +then + run=$1 +else + echo "Usage: run_plot runname [MAdir [tddir]]" + exit +fi + +if [ "$2" != "" ] +then + MAdir=$main/$2 +else + MAdir=$main/../../MadAnalysis +fi + +if [ "$3" != "" ]; then + td=$main/$3 +else + td=$main/../../td +fi + +dirbin=$main/../bin + +if [[ $run != "" && -e ${run}_pgs_events.lhco.gz ]];then + gunzip -c ${run}_pgs_events.lhco.gz > pgs_events.lhco +fi + +if [[ (-x $MAdir/plot_events) && (-e pgs_events.lhco) && (-e ../Cards/plot_card.dat) ]]; then + echo "Creating Plots" + mkdir ${run}_pgs + cd ${run}_pgs + echo "../pgs_events.lhco" > events.list + $dirbin/plot $MAdir $td > plot.log + cd .. + $dirbin/plot_page-pl ${run}_pgs PGS + mv plots.html ${run}_plots_pgs.html +fi + diff --git a/epochX/cudacpp/gg_ttggg.mad/bin/internal/run_plot_pythia b/epochX/cudacpp/gg_ttggg.mad/bin/internal/run_plot_pythia new file mode 100755 index 0000000000..532bfb4b7b --- /dev/null +++ b/epochX/cudacpp/gg_ttggg.mad/bin/internal/run_plot_pythia @@ -0,0 +1,50 @@ +#!/bin/bash +# +# This runs MadAnalysis on the unweighted_events.lhe +# +# Usage: run_plot run_name [madir [tddir]] +# where madir is the path to the MadAnalysis package + +main=`pwd` + +if [ "$1" != "" ] +then + run=$1 +else + echo "Usage: run_plot runname [MAdir [tddir]]" + exit +fi + +if [ "$2" != "" ] +then + MAdir=$main/$2 +else + MAdir=$main/../../MadAnalysis +fi + +if [ "$3" != "" ]; then + td=$main/$3 +else + td=$main/../../td +fi + +dirbin=$main/../bin/internal + +if [[ $run != "" && -e ${run}_pythia_events.lhe.gz ]];then + gunzip -c ${run}_pythia_events.lhe.gz > pythia_events.lhe +fi + +if [[ (-x $MAdir/plot_events) && (-e pythia_events.lhe) && (-e ../Cards/plot_card.dat) ]]; then + echo "Creating Plots" + mkdir ${run}_pythia + cd ${run}_pythia + echo "../pythia_events.lhe" > events.list + $dirbin/plot $MAdir $td > plot.log + cd .. + $dirbin/plot_page-pl ${run}_pythia Pythia + mv plots.html ${run}_plots_pythia.html + $dirbin/gen_crossxhtml-pl $run +else + echo "Not creating plots" +fi + diff --git a/epochX/cudacpp/gg_ttggg.mad/bin/madevent b/epochX/cudacpp/gg_ttggg.mad/bin/madevent index c944aa1faf..dff9711b73 100755 --- a/epochX/cudacpp/gg_ttggg.mad/bin/madevent +++ b/epochX/cudacpp/gg_ttggg.mad/bin/madevent @@ -32,6 +32,7 @@ except ImportError: import os +pjoin = os.path.join import optparse # Get the directory of the script real path (bin) @@ -160,13 +161,30 @@ except: pass import internal.madevent_interface as cmd_interface +# check for plugin customization of the launch command +launch_interface = cmd_interface.MadEventCmdShell +if os.path.exists(pjoin(root_path, 'bin','internal', 'launch_plugin.py')): + with misc.TMP_variable(sys, 'path', sys.path + [pjoin(root_path, 'bin', 'internal')]): + from importlib import reload + try: + reload('launch_plugin') + except Exception as error: + import launch_plugin + launch_interface = launch_plugin.MEINTERFACE + + +#Source use this executable for compilation always allow it +force_run = False +if (args and args[0] == 'treatcards'): + force_run=True + # Call the cmd interface main loop try: if '-h' in args or '--help' in args: - launch = ME.MadEventCmdShell(me_dir=os.path.dirname(root_path), force_run=True) + launch = launch_interface(me_dir=os.path.dirname(root_path), force_run=True) launch.exec_cmd('help generate_events') sys.exit(0) - with cmd_interface.MadEventCmdShell.RunWebHandling(os.path.dirname(root_path), ): + with cmd_interface.MadEventCmdShell.RunWebHandling(os.path.dirname(root_path), force_run=force_run): if (args and os.path.isfile(args[0])): # They are an input file input_file = args[0] @@ -178,7 +196,7 @@ try: cmd_line.run_cmd('import command ' + input_file) cmd_line.run_cmd('quit') else: - cmd_line = cmd_interface.MadEventCmdShell(force_run=True) + cmd_line = launch_interface(force_run=True) cmd_line.use_rawinput = False cmd_line.haspiping = False cmd_line.run_cmd('import command ' + input_file) @@ -188,7 +206,7 @@ try: if options.web: cmd_line = cmd_interface.MadEventCmd(force_run=True) else: - cmd_line = cmd_interface.MadEventCmdShell(force_run=True) + cmd_line = launch_interface(force_run=True) if not hasattr(cmd_line, 'do_%s' % args[0]): if parser_error: print( parser_error) diff --git a/epochX/cudacpp/gg_ttggg.mad/src/HelAmps_sm.h b/epochX/cudacpp/gg_ttggg.mad/src/HelAmps_sm.h index 9cea8bcbe7..9b946c21e1 100644 --- a/epochX/cudacpp/gg_ttggg.mad/src/HelAmps_sm.h +++ b/epochX/cudacpp/gg_ttggg.mad/src/HelAmps_sm.h @@ -863,6 +863,7 @@ namespace mg5amcCpu const fptype allV2[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, fptype allvertexes[] ) ALWAYS_INLINE; //-------------------------------------------------------------------------- @@ -873,6 +874,7 @@ namespace mg5amcCpu VVV1P0_1( const fptype allV2[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, const fptype M1, const fptype W1, fptype allV1[] ) ALWAYS_INLINE; @@ -886,6 +888,7 @@ namespace mg5amcCpu const fptype allF2[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, fptype allvertexes[] ) ALWAYS_INLINE; //-------------------------------------------------------------------------- @@ -896,6 +899,7 @@ namespace mg5amcCpu FFV1_1( const fptype allF2[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, const fptype M1, const fptype W1, fptype allF1[] ) ALWAYS_INLINE; @@ -908,6 +912,7 @@ namespace mg5amcCpu FFV1_2( const fptype allF1[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, const fptype M2, const fptype W2, fptype allF2[] ) ALWAYS_INLINE; @@ -920,6 +925,7 @@ namespace mg5amcCpu FFV1P0_3( const fptype allF1[], const fptype allF2[], const fptype allCOUP[], + const double Ccoeff, const fptype M3, const fptype W3, fptype allV3[] ) ALWAYS_INLINE; @@ -934,6 +940,7 @@ namespace mg5amcCpu const fptype allV3[], const fptype allV4[], const fptype allCOUP[], + const double Ccoeff, fptype allvertexes[] ) ALWAYS_INLINE; //-------------------------------------------------------------------------- @@ -945,6 +952,7 @@ namespace mg5amcCpu const fptype allV3[], const fptype allV4[], const fptype allCOUP[], + const double Ccoeff, const fptype M1, const fptype W1, fptype allV1[] ) ALWAYS_INLINE; @@ -959,6 +967,7 @@ namespace mg5amcCpu const fptype allV3[], const fptype allV4[], const fptype allCOUP[], + const double Ccoeff, fptype allvertexes[] ) ALWAYS_INLINE; //-------------------------------------------------------------------------- @@ -970,6 +979,7 @@ namespace mg5amcCpu const fptype allV3[], const fptype allV4[], const fptype allCOUP[], + const double Ccoeff, const fptype M1, const fptype W1, fptype allV1[] ) ALWAYS_INLINE; @@ -984,6 +994,7 @@ namespace mg5amcCpu const fptype allV3[], const fptype allV4[], const fptype allCOUP[], + const double Ccoeff, fptype allvertexes[] ) ALWAYS_INLINE; //-------------------------------------------------------------------------- @@ -995,6 +1006,7 @@ namespace mg5amcCpu const fptype allV3[], const fptype allV4[], const fptype allCOUP[], + const double Ccoeff, const fptype M1, const fptype W1, fptype allV1[] ) ALWAYS_INLINE; @@ -1008,6 +1020,7 @@ namespace mg5amcCpu const fptype allV2[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, fptype allvertexes[] ) { mgDebug( 0, __FUNCTION__ ); @@ -1042,6 +1055,7 @@ namespace mg5amcCpu VVV1P0_1( const fptype allV2[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, const fptype M1, const fptype W1, fptype allV1[] ) @@ -1080,6 +1094,7 @@ namespace mg5amcCpu const fptype allF2[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, fptype allvertexes[] ) { mgDebug( 0, __FUNCTION__ ); @@ -1103,6 +1118,7 @@ namespace mg5amcCpu FFV1_1( const fptype allF2[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, const fptype M1, const fptype W1, fptype allF1[] ) @@ -1134,6 +1150,7 @@ namespace mg5amcCpu FFV1_2( const fptype allF1[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, const fptype M2, const fptype W2, fptype allF2[] ) @@ -1165,6 +1182,7 @@ namespace mg5amcCpu FFV1P0_3( const fptype allF1[], const fptype allF2[], const fptype allCOUP[], + const double Ccoeff, const fptype M3, const fptype W3, fptype allV3[] ) @@ -1197,6 +1215,7 @@ namespace mg5amcCpu const fptype allV3[], const fptype allV4[], const fptype allCOUP[], + const double Ccoeff, fptype allvertexes[] ) { mgDebug( 0, __FUNCTION__ ); @@ -1225,6 +1244,7 @@ namespace mg5amcCpu const fptype allV3[], const fptype allV4[], const fptype allCOUP[], + const double Ccoeff, const fptype M1, const fptype W1, fptype allV1[] ) @@ -1260,6 +1280,7 @@ namespace mg5amcCpu const fptype allV3[], const fptype allV4[], const fptype allCOUP[], + const double Ccoeff, fptype allvertexes[] ) { mgDebug( 0, __FUNCTION__ ); @@ -1288,6 +1309,7 @@ namespace mg5amcCpu const fptype allV3[], const fptype allV4[], const fptype allCOUP[], + const double Ccoeff, const fptype M1, const fptype W1, fptype allV1[] ) @@ -1323,6 +1345,7 @@ namespace mg5amcCpu const fptype allV3[], const fptype allV4[], const fptype allCOUP[], + const double Ccoeff, fptype allvertexes[] ) { mgDebug( 0, __FUNCTION__ ); @@ -1351,6 +1374,7 @@ namespace mg5amcCpu const fptype allV3[], const fptype allV4[], const fptype allCOUP[], + const double Ccoeff, const fptype M1, const fptype W1, fptype allV1[] ) diff --git a/epochX/cudacpp/gg_ttggg.mad/src/cudacpp_src.mk b/epochX/cudacpp/gg_ttggg.mad/src/cudacpp_src.mk index 554d7a704c..750986464e 100644 --- a/epochX/cudacpp/gg_ttggg.mad/src/cudacpp_src.mk +++ b/epochX/cudacpp/gg_ttggg.mad/src/cudacpp_src.mk @@ -1,7 +1,7 @@ # Copyright (C) 2020-2023 CERN and UCLouvain. # Licensed under the GNU Lesser General Public License (version 3 or later). # Created by: S. Roiser (Feb 2020) for the MG5aMC CUDACPP plugin. -# Further modified by: O. Mattelaer, S. Roiser, A. Valassi (2020-2023) for the MG5aMC CUDACPP plugin. +# Further modified by: J. Teig, O. Mattelaer, S. Roiser, A. Valassi (2020-2023) for the MG5aMC CUDACPP plugin. #=== Determine the name of this makefile (https://ftp.gnu.org/old-gnu/Manuals/make-3.80/html_node/make_17.html) #=== NB: assume that the same name (e.g. cudacpp.mk, Makefile...) is used in the Subprocess and src directories @@ -88,50 +88,52 @@ CXXFLAGS += $(OMPFLAGS) # Set the build flags appropriate to each AVX choice (example: "make AVX=none") # [NB MGONGPU_PVW512 is needed because "-mprefer-vector-width=256" is not exposed in a macro] # [See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96476] -$(info AVX=$(AVX)) -ifeq ($(UNAME_P),ppc64le) - ifeq ($(AVX),sse4) - override AVXFLAGS = -D__SSE4_2__ # Power9 VSX with 128 width (VSR registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on PowerPC for the moment) - endif -else ifeq ($(UNAME_P),arm) - ifeq ($(AVX),sse4) - override AVXFLAGS = -D__SSE4_2__ # ARM NEON with 128 width (Q/quadword registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on ARM for the moment) - endif -else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 - ifeq ($(AVX),none) - override AVXFLAGS = -mno-sse3 # no SIMD - else ifeq ($(AVX),sse4) - override AVXFLAGS = -mno-avx # SSE4.2 with 128 width (xmm registers) - else ifeq ($(AVX),avx2) - override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(AVX),512y) - override AVXFLAGS = -march=skylake -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(AVX),512z) - override AVXFLAGS = -march=skylake -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) +ifeq ($(NVCC),) + $(info AVX=$(AVX)) + ifeq ($(UNAME_P),ppc64le) + ifeq ($(AVX),sse4) + override AVXFLAGS = -D__SSE4_2__ # Power9 VSX with 128 width (VSR registers) + else ifneq ($(AVX),none) + $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on PowerPC for the moment) + endif + else ifeq ($(UNAME_P),arm) + ifeq ($(AVX),sse4) + override AVXFLAGS = -D__SSE4_2__ # ARM NEON with 128 width (Q/quadword registers) + else ifneq ($(AVX),none) + $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on ARM for the moment) + endif + else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 + ifeq ($(AVX),none) + override AVXFLAGS = -mno-sse3 # no SIMD + else ifeq ($(AVX),sse4) + override AVXFLAGS = -mno-avx # SSE4.2 with 128 width (xmm registers) + else ifeq ($(AVX),avx2) + override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] + else ifeq ($(AVX),512y) + override AVXFLAGS = -march=skylake -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] + else ifeq ($(AVX),512z) + override AVXFLAGS = -march=skylake -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) + else + $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) + endif else - $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) - endif -else - ifeq ($(AVX),none) - override AVXFLAGS = -march=x86-64 # no SIMD (see #588) - else ifeq ($(AVX),sse4) - override AVXFLAGS = -march=nehalem # SSE4.2 with 128 width (xmm registers) - else ifeq ($(AVX),avx2) - override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(AVX),512y) - override AVXFLAGS = -march=skylake-avx512 -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(AVX),512z) - override AVXFLAGS = -march=skylake-avx512 -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) + ifeq ($(AVX),none) + override AVXFLAGS = -march=x86-64 # no SIMD (see #588) + else ifeq ($(AVX),sse4) + override AVXFLAGS = -march=nehalem # SSE4.2 with 128 width (xmm registers) + else ifeq ($(AVX),avx2) + override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] + else ifeq ($(AVX),512y) + override AVXFLAGS = -march=skylake-avx512 -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] + else ifeq ($(AVX),512z) + override AVXFLAGS = -march=skylake-avx512 -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) + else ifneq ($(AVX),none) + $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) + endif endif + # For the moment, use AVXFLAGS everywhere: eventually, use them only in encapsulated implementations? + CXXFLAGS+= $(AVXFLAGS) endif -# For the moment, use AVXFLAGS everywhere: eventually, use them only in encapsulated implementations? -CXXFLAGS+= $(AVXFLAGS) # Set the build flags appropriate to each FPTYPE choice (example: "make FPTYPE=f") ###$(info FPTYPE=$(FPTYPE)) @@ -175,11 +177,19 @@ endif # Build directory "short" tag (defines target and path to the optional build directory) # (Rationale: keep directory names shorter, e.g. do not include random number generator choice) -override DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) +ifneq ($(NVCC),) + override DIRTAG = cuda_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) +else + override DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) +endif # Build lockfile "full" tag (defines full specification of build options that cannot be intermixed) # (Rationale: avoid mixing of CUDA and no-CUDA environment builds with different random number generators) -override TAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) +ifneq ($(NVCC),) + override TAG = cuda_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) +else + override TAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) +endif # Build directory: current directory by default, or build.$(DIRTAG) if USEBUILDDIR==1 ###$(info Current directory is $(shell pwd)) @@ -216,35 +226,21 @@ endif MG5AMC_COMMONLIB = mg5amc_common # First target (default goal) -all.$(TAG): $(BUILDDIR)/.build.$(TAG) $(LIBDIR)/.build.$(TAG) $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so +all.$(TAG): $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so # Target (and build options): debug debug: OPTFLAGS = -g -O0 debug: all.$(TAG) -# Target: tag-specific build lockfiles -override oldtagsb=`if [ -d $(BUILDDIR) ]; then find $(BUILDDIR) -maxdepth 1 -name '.build.*' ! -name '.build.$(TAG)' -exec echo $(shell pwd)/{} \; ; fi` -override oldtagsl=`if [ -d $(LIBDIR) ]; then find $(LIBDIR) -maxdepth 1 -name '.build.*' ! -name '.build.$(TAG)' -exec echo $(shell pwd)/{} \; ; fi` - -$(BUILDDIR)/.build.$(TAG): $(LIBDIR)/.build.$(TAG) - -$(LIBDIR)/.build.$(TAG): - @if [ "$(oldtagsl)" != "" ]; then echo -e "Cannot build for tag=$(TAG) as old builds exist in $(LIBDIR) for other tags:\n$(oldtagsl)\nPlease run 'make clean' first\nIf 'make clean' is not enough: run 'make clean USEBUILDDIR=1 AVX=$(AVX) FPTYPE=$(FPTYPE)' or 'make cleanall'"; exit 1; fi - @if [ "$(oldtagsb)" != "" ]; then echo -e "Cannot build for tag=$(TAG) as old builds exist in $(BUILDDIR) for other tags:\n$(oldtagsb)\nPlease run 'make clean' first\nIf 'make clean' is not enough: run 'make clean USEBUILDDIR=1 AVX=$(AVX) FPTYPE=$(FPTYPE)' or 'make cleanall'"; exit 1; fi - @if [ ! -d $(LIBDIR) ]; then echo "mkdir -p $(LIBDIR)"; mkdir -p $(LIBDIR); fi - @touch $(LIBDIR)/.build.$(TAG) - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - @touch $(BUILDDIR)/.build.$(TAG) - #------------------------------------------------------------------------------- # Generic target and build rules: objects from C++ compilation -$(BUILDDIR)/%.o : %.cc *.h $(BUILDDIR)/.build.$(TAG) +$(BUILDDIR)/%.o : %.cc *.h @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi $(CXX) $(CPPFLAGS) $(CXXFLAGS) -fPIC -c $< -o $@ # Generic target and build rules: objects from CUDA compilation -$(BUILDDIR)/%_cu.o : %.cc *.h $(BUILDDIR)/.build.$(TAG) +$(BUILDDIR)/%_cu.o : %.cc *.h @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c -x cu $< -o $@ @@ -271,20 +267,61 @@ endif # Target: clean the builds .PHONY: clean +BUILD_DIRS := $(wildcard build.*) +NUM_BUILD_DIRS := $(words $(BUILD_DIRS)) + clean: ifeq ($(USEBUILDDIR),1) - rm -rf $(LIBDIR) - rm -rf $(BUILDDIR) +ifeq ($(NUM_BUILD_DIRS),1) + $(info USEBUILDDIR=1, only one src build directory found.) + rm -rf ../lib/$(BUILD_DIRS) + rm -rf $(BUILD_DIRS) +else ifeq ($(NUM_BUILD_DIRS),0) + $(error USEBUILDDIR=1, but no src build directories are found.) else - rm -f $(LIBDIR)/.build.* $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so - rm -f $(BUILDDIR)/.build.* $(BUILDDIR)/*.o $(BUILDDIR)/*.exe + $(error Multiple src BUILDDIR's found! Use 'cleannone', 'cleansse4', 'cleanavx2', 'clean512y','clean512z', 'cleancuda' or 'cleanall'.) +endif +else + rm -f ../lib/lib$(MG5AMC_COMMONLIB).so + rm -f $(BUILDDIR)/*.o $(BUILDDIR)/*.exe endif cleanall: @echo - $(MAKE) clean -f $(THISMK) + rm -f ../lib/lib$(MG5AMC_COMMONLIB).so + rm -f $(BUILDDIR)/*.o $(BUILDDIR)/*.exe @echo - rm -rf $(LIBDIR)/build.* + rm -rf ../lib/build.* rm -rf build.* +# Target: clean different builds + +cleannone: + rm -rf ../lib/build.none_* + rm -rf build.none_* + +cleansse4: + rm -rf ../lib/build.sse4_* + rm -rf build.sse4_* + +cleanavx2: + rm -rf ../lib/build.avx2_* + rm -rf build.avx2_* + +clean512y: + rm -rf ../lib/build.512y_* + rm -rf build.512y_* + +clean512z: + rm -rf ../lib/build.512z_* + rm -rf build.512z_* + +cleancuda: + rm -rf ../lib/build.cuda_* + rm -rf build.cuda_* + +cleandir: + rm -f ./*.o ./*.exe + rm -f ../lib/lib$(MG5AMC_COMMONLIB).so + #------------------------------------------------------------------------------- diff --git a/epochX/cudacpp/gg_ttggg.sa/SubProcesses/MatrixElementKernels.cc b/epochX/cudacpp/gg_ttggg.sa/SubProcesses/MatrixElementKernels.cc index 30257195b6..cfed7d2af5 100644 --- a/epochX/cudacpp/gg_ttggg.sa/SubProcesses/MatrixElementKernels.cc +++ b/epochX/cudacpp/gg_ttggg.sa/SubProcesses/MatrixElementKernels.cc @@ -112,10 +112,17 @@ namespace mg5amcCpu // See https://community.arm.com/arm-community-blogs/b/operating-systems-blog/posts/runtime-detection-of-cpu-features-on-an-armv8-a-cpu bool ok = true; // this is just an assumption! const std::string tag = "arm neon (128bit as in SSE4.2)"; -#else +#elif defined(__x86_64__) || defined(__i386__) bool known = true; bool ok = __builtin_cpu_supports( "sse4.2" ); const std::string tag = "nehalem (SSE4.2)"; +#else + bool known = false; // __builtin_cpu_supports is not supported + // See https://gcc.gnu.org/onlinedocs/gcc/Basic-PowerPC-Built-in-Functions-Available-on-all-Configurations.html + // See https://stackoverflow.com/q/62783908 + // See https://community.arm.com/arm-community-blogs/b/operating-systems-blog/posts/runtime-detection-of-cpu-features-on-an-armv8-a-cpu + bool ok = true; // this is just an assumption! + const std::string tag = "arm neon (128bit as in SSE4.2)"; #endif #else bool known = true; diff --git a/epochX/cudacpp/gg_ttggg.sa/SubProcesses/P1_Sigma_sm_gg_ttxggg/CPPProcess.cc b/epochX/cudacpp/gg_ttggg.sa/SubProcesses/P1_Sigma_sm_gg_ttxggg/CPPProcess.cc index 36675814b4..f8f15a6103 100644 --- a/epochX/cudacpp/gg_ttggg.sa/SubProcesses/P1_Sigma_sm_gg_ttxggg/CPPProcess.cc +++ b/epochX/cudacpp/gg_ttggg.sa/SubProcesses/P1_Sigma_sm_gg_ttxggg/CPPProcess.cc @@ -252,13 +252,13 @@ namespace mg5amcCpu vxxxxx( momenta, 0., cHel[ihel][6], +1, w_fp[6], 6 ); - VVV1P0_1( w_fp[0], w_fp[1], COUPs[0], 0., 0., w_fp[7] ); - FFV1P0_3( w_fp[3], w_fp[2], COUPs[1], 0., 0., w_fp[8] ); - VVV1P0_1( w_fp[7], w_fp[4], COUPs[0], 0., 0., w_fp[9] ); - VVV1P0_1( w_fp[8], w_fp[5], COUPs[0], 0., 0., w_fp[10] ); + VVV1P0_1( w_fp[0], w_fp[1], COUPs[0], 1.0, 0., 0., w_fp[7] ); + FFV1P0_3( w_fp[3], w_fp[2], COUPs[1], 1.0, 0., 0., w_fp[8] ); + VVV1P0_1( w_fp[7], w_fp[4], COUPs[0], 1.0, 0., 0., w_fp[9] ); + VVV1P0_1( w_fp[8], w_fp[5], COUPs[0], 1.0, 0., 0., w_fp[10] ); // Amplitude(s) for diagram number 1 - VVV1_0( w_fp[9], w_fp[10], w_fp[6], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[9], w_fp[10], w_fp[6], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -282,10 +282,10 @@ namespace mg5amcCpu // *** DIAGRAM 2 OF 1240 *** // Wavefunction(s) for diagram number 2 - VVV1P0_1( w_fp[8], w_fp[6], COUPs[0], 0., 0., w_fp[11] ); + VVV1P0_1( w_fp[8], w_fp[6], COUPs[0], 1.0, 0., 0., w_fp[11] ); // Amplitude(s) for diagram number 2 - VVV1_0( w_fp[9], w_fp[11], w_fp[5], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[9], w_fp[11], w_fp[5], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -312,7 +312,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 3 - VVVV1_0( w_fp[8], w_fp[5], w_fp[6], w_fp[9], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[8], w_fp[5], w_fp[6], w_fp[9], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -332,7 +332,7 @@ namespace mg5amcCpu jamp_sv[102] -= amp_sv[0]; jamp_sv[108] -= amp_sv[0]; jamp_sv[110] += amp_sv[0]; - VVVV3_0( w_fp[8], w_fp[5], w_fp[6], w_fp[9], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[8], w_fp[5], w_fp[6], w_fp[9], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -352,7 +352,7 @@ namespace mg5amcCpu jamp_sv[116] += amp_sv[0]; jamp_sv[118] += amp_sv[0]; jamp_sv[119] -= amp_sv[0]; - VVVV4_0( w_fp[8], w_fp[5], w_fp[6], w_fp[9], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[8], w_fp[5], w_fp[6], w_fp[9], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -376,11 +376,11 @@ namespace mg5amcCpu // *** DIAGRAM 4 OF 1240 *** // Wavefunction(s) for diagram number 4 - VVV1P0_1( w_fp[7], w_fp[5], COUPs[0], 0., 0., w_fp[12] ); - VVV1P0_1( w_fp[8], w_fp[4], COUPs[0], 0., 0., w_fp[13] ); + VVV1P0_1( w_fp[7], w_fp[5], COUPs[0], 1.0, 0., 0., w_fp[12] ); + VVV1P0_1( w_fp[8], w_fp[4], COUPs[0], 1.0, 0., 0., w_fp[13] ); // Amplitude(s) for diagram number 4 - VVV1_0( w_fp[12], w_fp[13], w_fp[6], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[12], w_fp[13], w_fp[6], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -407,7 +407,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 5 - VVV1_0( w_fp[12], w_fp[11], w_fp[4], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[12], w_fp[11], w_fp[4], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -434,7 +434,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 6 - VVVV1_0( w_fp[8], w_fp[4], w_fp[6], w_fp[12], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[8], w_fp[4], w_fp[6], w_fp[12], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -454,7 +454,7 @@ namespace mg5amcCpu jamp_sv[103] -= amp_sv[0]; jamp_sv[114] -= amp_sv[0]; jamp_sv[116] += amp_sv[0]; - VVVV3_0( w_fp[8], w_fp[4], w_fp[6], w_fp[12], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[8], w_fp[4], w_fp[6], w_fp[12], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -474,7 +474,7 @@ namespace mg5amcCpu jamp_sv[113] -= amp_sv[0]; jamp_sv[114] -= amp_sv[0]; jamp_sv[116] += amp_sv[0]; - VVVV4_0( w_fp[8], w_fp[4], w_fp[6], w_fp[12], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[8], w_fp[4], w_fp[6], w_fp[12], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -498,10 +498,10 @@ namespace mg5amcCpu // *** DIAGRAM 7 OF 1240 *** // Wavefunction(s) for diagram number 7 - VVV1P0_1( w_fp[7], w_fp[6], COUPs[0], 0., 0., w_fp[14] ); + VVV1P0_1( w_fp[7], w_fp[6], COUPs[0], 1.0, 0., 0., w_fp[14] ); // Amplitude(s) for diagram number 7 - VVV1_0( w_fp[14], w_fp[13], w_fp[5], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[14], w_fp[13], w_fp[5], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -528,7 +528,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 8 - VVV1_0( w_fp[14], w_fp[10], w_fp[4], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[14], w_fp[10], w_fp[4], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -555,7 +555,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 9 - VVVV1_0( w_fp[8], w_fp[4], w_fp[5], w_fp[14], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[8], w_fp[4], w_fp[5], w_fp[14], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -575,7 +575,7 @@ namespace mg5amcCpu jamp_sv[92] += amp_sv[0]; jamp_sv[97] += amp_sv[0]; jamp_sv[103] -= amp_sv[0]; - VVVV3_0( w_fp[8], w_fp[4], w_fp[5], w_fp[14], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[8], w_fp[4], w_fp[5], w_fp[14], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -595,7 +595,7 @@ namespace mg5amcCpu jamp_sv[92] += amp_sv[0]; jamp_sv[96] += amp_sv[0]; jamp_sv[102] -= amp_sv[0]; - VVVV4_0( w_fp[8], w_fp[4], w_fp[5], w_fp[14], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[8], w_fp[4], w_fp[5], w_fp[14], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -619,12 +619,12 @@ namespace mg5amcCpu // *** DIAGRAM 10 OF 1240 *** // Wavefunction(s) for diagram number 10 - VVVV1P0_1( w_fp[7], w_fp[4], w_fp[5], COUPs[2], 0., 0., w_fp[15] ); - VVVV3P0_1( w_fp[7], w_fp[4], w_fp[5], COUPs[2], 0., 0., w_fp[16] ); - VVVV4P0_1( w_fp[7], w_fp[4], w_fp[5], COUPs[2], 0., 0., w_fp[17] ); + VVVV1P0_1( w_fp[7], w_fp[4], w_fp[5], COUPs[2], 1.0, 0., 0., w_fp[15] ); + VVVV3P0_1( w_fp[7], w_fp[4], w_fp[5], COUPs[2], 1.0, 0., 0., w_fp[16] ); + VVVV4P0_1( w_fp[7], w_fp[4], w_fp[5], COUPs[2], 1.0, 0., 0., w_fp[17] ); // Amplitude(s) for diagram number 10 - VVV1_0( w_fp[8], w_fp[6], w_fp[15], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[6], w_fp[15], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -644,7 +644,7 @@ namespace mg5amcCpu jamp_sv[113] -= amp_sv[0]; jamp_sv[118] -= amp_sv[0]; jamp_sv[119] += amp_sv[0]; - VVV1_0( w_fp[8], w_fp[6], w_fp[16], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[6], w_fp[16], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -664,7 +664,7 @@ namespace mg5amcCpu jamp_sv[113] -= amp_sv[0]; jamp_sv[114] -= amp_sv[0]; jamp_sv[116] += amp_sv[0]; - VVV1_0( w_fp[8], w_fp[6], w_fp[17], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[6], w_fp[17], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -688,12 +688,12 @@ namespace mg5amcCpu // *** DIAGRAM 11 OF 1240 *** // Wavefunction(s) for diagram number 11 - VVVV1P0_1( w_fp[7], w_fp[4], w_fp[6], COUPs[2], 0., 0., w_fp[18] ); - VVVV3P0_1( w_fp[7], w_fp[4], w_fp[6], COUPs[2], 0., 0., w_fp[19] ); - VVVV4P0_1( w_fp[7], w_fp[4], w_fp[6], COUPs[2], 0., 0., w_fp[20] ); + VVVV1P0_1( w_fp[7], w_fp[4], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[18] ); + VVVV3P0_1( w_fp[7], w_fp[4], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[19] ); + VVVV4P0_1( w_fp[7], w_fp[4], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[20] ); // Amplitude(s) for diagram number 11 - VVV1_0( w_fp[8], w_fp[5], w_fp[18], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[5], w_fp[18], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -713,7 +713,7 @@ namespace mg5amcCpu jamp_sv[95] += amp_sv[0]; jamp_sv[108] += amp_sv[0]; jamp_sv[110] -= amp_sv[0]; - VVV1_0( w_fp[8], w_fp[5], w_fp[19], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[5], w_fp[19], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -733,7 +733,7 @@ namespace mg5amcCpu jamp_sv[92] += amp_sv[0]; jamp_sv[96] += amp_sv[0]; jamp_sv[102] -= amp_sv[0]; - VVV1_0( w_fp[8], w_fp[5], w_fp[20], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[5], w_fp[20], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -757,12 +757,12 @@ namespace mg5amcCpu // *** DIAGRAM 12 OF 1240 *** // Wavefunction(s) for diagram number 12 - VVVV1P0_1( w_fp[7], w_fp[5], w_fp[6], COUPs[2], 0., 0., w_fp[21] ); - VVVV3P0_1( w_fp[7], w_fp[5], w_fp[6], COUPs[2], 0., 0., w_fp[22] ); - VVVV4P0_1( w_fp[7], w_fp[5], w_fp[6], COUPs[2], 0., 0., w_fp[23] ); + VVVV1P0_1( w_fp[7], w_fp[5], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[21] ); + VVVV3P0_1( w_fp[7], w_fp[5], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[22] ); + VVVV4P0_1( w_fp[7], w_fp[5], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[23] ); // Amplitude(s) for diagram number 12 - VVV1_0( w_fp[8], w_fp[4], w_fp[21], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[4], w_fp[21], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -782,7 +782,7 @@ namespace mg5amcCpu jamp_sv[92] += amp_sv[0]; jamp_sv[114] += amp_sv[0]; jamp_sv[116] -= amp_sv[0]; - VVV1_0( w_fp[8], w_fp[4], w_fp[22], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[4], w_fp[22], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -802,7 +802,7 @@ namespace mg5amcCpu jamp_sv[92] += amp_sv[0]; jamp_sv[97] += amp_sv[0]; jamp_sv[103] -= amp_sv[0]; - VVV1_0( w_fp[8], w_fp[4], w_fp[23], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[4], w_fp[23], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -826,10 +826,10 @@ namespace mg5amcCpu // *** DIAGRAM 13 OF 1240 *** // Wavefunction(s) for diagram number 13 - VVV1P0_1( w_fp[4], w_fp[5], COUPs[0], 0., 0., w_fp[24] ); + VVV1P0_1( w_fp[4], w_fp[5], COUPs[0], 1.0, 0., 0., w_fp[24] ); // Amplitude(s) for diagram number 13 - VVVV1_0( w_fp[7], w_fp[8], w_fp[24], w_fp[6], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[7], w_fp[8], w_fp[24], w_fp[6], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -849,7 +849,7 @@ namespace mg5amcCpu jamp_sv[113] -= amp_sv[0]; jamp_sv[118] -= amp_sv[0]; jamp_sv[119] += amp_sv[0]; - VVVV3_0( w_fp[7], w_fp[8], w_fp[24], w_fp[6], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[7], w_fp[8], w_fp[24], w_fp[6], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -869,7 +869,7 @@ namespace mg5amcCpu jamp_sv[113] -= amp_sv[0]; jamp_sv[118] -= amp_sv[0]; jamp_sv[119] += amp_sv[0]; - VVVV4_0( w_fp[7], w_fp[8], w_fp[24], w_fp[6], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[7], w_fp[8], w_fp[24], w_fp[6], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -893,10 +893,10 @@ namespace mg5amcCpu // *** DIAGRAM 14 OF 1240 *** // Wavefunction(s) for diagram number 14 - VVV1P0_1( w_fp[7], w_fp[8], COUPs[0], 0., 0., w_fp[25] ); + VVV1P0_1( w_fp[7], w_fp[8], COUPs[0], 1.0, 0., 0., w_fp[25] ); // Amplitude(s) for diagram number 14 - VVV1_0( w_fp[24], w_fp[6], w_fp[25], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[24], w_fp[6], w_fp[25], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -920,10 +920,10 @@ namespace mg5amcCpu // *** DIAGRAM 15 OF 1240 *** // Wavefunction(s) for diagram number 15 - VVV1P0_1( w_fp[7], w_fp[24], COUPs[0], 0., 0., w_fp[26] ); + VVV1P0_1( w_fp[7], w_fp[24], COUPs[0], 1.0, 0., 0., w_fp[26] ); // Amplitude(s) for diagram number 15 - VVV1_0( w_fp[8], w_fp[6], w_fp[26], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[6], w_fp[26], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -950,7 +950,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 16 - VVV1_0( w_fp[8], w_fp[24], w_fp[14], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[24], w_fp[14], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -974,10 +974,10 @@ namespace mg5amcCpu // *** DIAGRAM 17 OF 1240 *** // Wavefunction(s) for diagram number 17 - VVV1P0_1( w_fp[4], w_fp[6], COUPs[0], 0., 0., w_fp[27] ); + VVV1P0_1( w_fp[4], w_fp[6], COUPs[0], 1.0, 0., 0., w_fp[27] ); // Amplitude(s) for diagram number 17 - VVVV1_0( w_fp[7], w_fp[8], w_fp[27], w_fp[5], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[7], w_fp[8], w_fp[27], w_fp[5], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -997,7 +997,7 @@ namespace mg5amcCpu jamp_sv[95] += amp_sv[0]; jamp_sv[112] += amp_sv[0]; jamp_sv[113] -= amp_sv[0]; - VVVV3_0( w_fp[7], w_fp[8], w_fp[27], w_fp[5], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[7], w_fp[8], w_fp[27], w_fp[5], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1017,7 +1017,7 @@ namespace mg5amcCpu jamp_sv[95] += amp_sv[0]; jamp_sv[108] += amp_sv[0]; jamp_sv[110] -= amp_sv[0]; - VVVV4_0( w_fp[7], w_fp[8], w_fp[27], w_fp[5], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[7], w_fp[8], w_fp[27], w_fp[5], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1044,7 +1044,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 18 - VVV1_0( w_fp[27], w_fp[5], w_fp[25], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[27], w_fp[5], w_fp[25], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1068,10 +1068,10 @@ namespace mg5amcCpu // *** DIAGRAM 19 OF 1240 *** // Wavefunction(s) for diagram number 19 - VVV1P0_1( w_fp[7], w_fp[27], COUPs[0], 0., 0., w_fp[28] ); + VVV1P0_1( w_fp[7], w_fp[27], COUPs[0], 1.0, 0., 0., w_fp[28] ); // Amplitude(s) for diagram number 19 - VVV1_0( w_fp[8], w_fp[5], w_fp[28], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[5], w_fp[28], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1098,7 +1098,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 20 - VVV1_0( w_fp[8], w_fp[27], w_fp[12], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[27], w_fp[12], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1122,10 +1122,10 @@ namespace mg5amcCpu // *** DIAGRAM 21 OF 1240 *** // Wavefunction(s) for diagram number 21 - VVV1P0_1( w_fp[5], w_fp[6], COUPs[0], 0., 0., w_fp[29] ); + VVV1P0_1( w_fp[5], w_fp[6], COUPs[0], 1.0, 0., 0., w_fp[29] ); // Amplitude(s) for diagram number 21 - VVVV1_0( w_fp[7], w_fp[8], w_fp[4], w_fp[29], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[7], w_fp[8], w_fp[4], w_fp[29], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1145,7 +1145,7 @@ namespace mg5amcCpu jamp_sv[95] -= amp_sv[0]; jamp_sv[118] -= amp_sv[0]; jamp_sv[119] += amp_sv[0]; - VVVV3_0( w_fp[7], w_fp[8], w_fp[4], w_fp[29], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[7], w_fp[8], w_fp[4], w_fp[29], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1165,7 +1165,7 @@ namespace mg5amcCpu jamp_sv[116] -= amp_sv[0]; jamp_sv[118] -= amp_sv[0]; jamp_sv[119] += amp_sv[0]; - VVVV4_0( w_fp[7], w_fp[8], w_fp[4], w_fp[29], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[7], w_fp[8], w_fp[4], w_fp[29], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1192,7 +1192,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 22 - VVV1_0( w_fp[4], w_fp[29], w_fp[25], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[4], w_fp[29], w_fp[25], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1219,7 +1219,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 23 - VVV1_0( w_fp[8], w_fp[29], w_fp[9], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[29], w_fp[9], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1243,10 +1243,10 @@ namespace mg5amcCpu // *** DIAGRAM 24 OF 1240 *** // Wavefunction(s) for diagram number 24 - VVV1P0_1( w_fp[7], w_fp[29], COUPs[0], 0., 0., w_fp[25] ); + VVV1P0_1( w_fp[7], w_fp[29], COUPs[0], 1.0, 0., 0., w_fp[25] ); // Amplitude(s) for diagram number 24 - VVV1_0( w_fp[8], w_fp[4], w_fp[25], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[4], w_fp[25], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1270,12 +1270,12 @@ namespace mg5amcCpu // *** DIAGRAM 25 OF 1240 *** // Wavefunction(s) for diagram number 25 - VVVV1P0_1( w_fp[4], w_fp[5], w_fp[6], COUPs[2], 0., 0., w_fp[30] ); - VVVV3P0_1( w_fp[4], w_fp[5], w_fp[6], COUPs[2], 0., 0., w_fp[31] ); - VVVV4P0_1( w_fp[4], w_fp[5], w_fp[6], COUPs[2], 0., 0., w_fp[32] ); + VVVV1P0_1( w_fp[4], w_fp[5], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[30] ); + VVVV3P0_1( w_fp[4], w_fp[5], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[31] ); + VVVV4P0_1( w_fp[4], w_fp[5], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[32] ); // Amplitude(s) for diagram number 25 - VVV1_0( w_fp[7], w_fp[8], w_fp[30], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[7], w_fp[8], w_fp[30], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1295,7 +1295,7 @@ namespace mg5amcCpu jamp_sv[95] -= amp_sv[0]; jamp_sv[118] -= amp_sv[0]; jamp_sv[119] += amp_sv[0]; - VVV1_0( w_fp[7], w_fp[8], w_fp[31], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[7], w_fp[8], w_fp[31], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1315,7 +1315,7 @@ namespace mg5amcCpu jamp_sv[95] -= amp_sv[0]; jamp_sv[112] -= amp_sv[0]; jamp_sv[113] += amp_sv[0]; - VVV1_0( w_fp[7], w_fp[8], w_fp[32], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[7], w_fp[8], w_fp[32], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1339,12 +1339,12 @@ namespace mg5amcCpu // *** DIAGRAM 26 OF 1240 *** // Wavefunction(s) for diagram number 26 - FFV1_1( w_fp[2], w_fp[4], COUPs[1], cIPD[0], cIPD[1], w_fp[33] ); - FFV1_2( w_fp[3], w_fp[7], COUPs[1], cIPD[0], cIPD[1], w_fp[34] ); - FFV1_1( w_fp[33], w_fp[5], COUPs[1], cIPD[0], cIPD[1], w_fp[35] ); + FFV1_1( w_fp[2], w_fp[4], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[33] ); + FFV1_2( w_fp[3], w_fp[7], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[34] ); + FFV1_1( w_fp[33], w_fp[5], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[35] ); // Amplitude(s) for diagram number 26 - FFV1_0( w_fp[34], w_fp[35], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[34], w_fp[35], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1354,10 +1354,10 @@ namespace mg5amcCpu // *** DIAGRAM 27 OF 1240 *** // Wavefunction(s) for diagram number 27 - FFV1_1( w_fp[33], w_fp[6], COUPs[1], cIPD[0], cIPD[1], w_fp[36] ); + FFV1_1( w_fp[33], w_fp[6], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[36] ); // Amplitude(s) for diagram number 27 - FFV1_0( w_fp[34], w_fp[36], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[34], w_fp[36], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1367,10 +1367,10 @@ namespace mg5amcCpu // *** DIAGRAM 28 OF 1240 *** // Wavefunction(s) for diagram number 28 - FFV1P0_3( w_fp[3], w_fp[33], COUPs[1], 0., 0., w_fp[37] ); + FFV1P0_3( w_fp[3], w_fp[33], COUPs[1], 1.0, 0., 0., w_fp[37] ); // Amplitude(s) for diagram number 28 - VVV1_0( w_fp[12], w_fp[37], w_fp[6], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[12], w_fp[37], w_fp[6], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1389,7 +1389,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 29 - FFV1_0( w_fp[3], w_fp[36], w_fp[12], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[36], w_fp[12], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1404,7 +1404,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 30 - VVV1_0( w_fp[14], w_fp[37], w_fp[5], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[14], w_fp[37], w_fp[5], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1423,7 +1423,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 31 - FFV1_0( w_fp[3], w_fp[35], w_fp[14], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[35], w_fp[14], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1438,7 +1438,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 32 - FFV1_0( w_fp[3], w_fp[33], w_fp[21], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[33], w_fp[21], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1450,7 +1450,7 @@ namespace mg5amcCpu jamp_sv[65] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[70] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[71] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[33], w_fp[22], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[33], w_fp[22], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1462,7 +1462,7 @@ namespace mg5amcCpu jamp_sv[65] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[66] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[68] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[33], w_fp[23], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[33], w_fp[23], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1478,11 +1478,11 @@ namespace mg5amcCpu // *** DIAGRAM 33 OF 1240 *** // Wavefunction(s) for diagram number 33 - FFV1_2( w_fp[3], w_fp[5], COUPs[1], cIPD[0], cIPD[1], w_fp[38] ); - FFV1_1( w_fp[33], w_fp[7], COUPs[1], cIPD[0], cIPD[1], w_fp[39] ); + FFV1_2( w_fp[3], w_fp[5], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[38] ); + FFV1_1( w_fp[33], w_fp[7], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[39] ); // Amplitude(s) for diagram number 33 - FFV1_0( w_fp[38], w_fp[39], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[39], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1492,10 +1492,10 @@ namespace mg5amcCpu // *** DIAGRAM 34 OF 1240 *** // Wavefunction(s) for diagram number 34 - FFV1_2( w_fp[38], w_fp[7], COUPs[1], cIPD[0], cIPD[1], w_fp[40] ); + FFV1_2( w_fp[38], w_fp[7], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[40] ); // Amplitude(s) for diagram number 34 - FFV1_0( w_fp[40], w_fp[33], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[40], w_fp[33], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1508,7 +1508,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 35 - FFV1_0( w_fp[38], w_fp[33], w_fp[14], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[33], w_fp[14], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1520,10 +1520,10 @@ namespace mg5amcCpu // *** DIAGRAM 36 OF 1240 *** // Wavefunction(s) for diagram number 36 - FFV1_2( w_fp[3], w_fp[6], COUPs[1], cIPD[0], cIPD[1], w_fp[41] ); + FFV1_2( w_fp[3], w_fp[6], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[41] ); // Amplitude(s) for diagram number 36 - FFV1_0( w_fp[41], w_fp[39], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[39], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1533,10 +1533,10 @@ namespace mg5amcCpu // *** DIAGRAM 37 OF 1240 *** // Wavefunction(s) for diagram number 37 - FFV1_2( w_fp[41], w_fp[7], COUPs[1], cIPD[0], cIPD[1], w_fp[42] ); + FFV1_2( w_fp[41], w_fp[7], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[42] ); // Amplitude(s) for diagram number 37 - FFV1_0( w_fp[42], w_fp[33], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[42], w_fp[33], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1549,7 +1549,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 38 - FFV1_0( w_fp[41], w_fp[33], w_fp[12], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[33], w_fp[12], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1564,7 +1564,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 39 - FFV1_0( w_fp[3], w_fp[39], w_fp[29], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[39], w_fp[29], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1579,7 +1579,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 40 - FFV1_0( w_fp[34], w_fp[33], w_fp[29], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[34], w_fp[33], w_fp[29], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1594,7 +1594,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 41 - FFV1_0( w_fp[3], w_fp[33], w_fp[25], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[33], w_fp[25], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1610,11 +1610,11 @@ namespace mg5amcCpu // *** DIAGRAM 42 OF 1240 *** // Wavefunction(s) for diagram number 42 - FFV1_1( w_fp[2], w_fp[5], COUPs[1], cIPD[0], cIPD[1], w_fp[39] ); - FFV1_1( w_fp[39], w_fp[4], COUPs[1], cIPD[0], cIPD[1], w_fp[43] ); + FFV1_1( w_fp[2], w_fp[5], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[39] ); + FFV1_1( w_fp[39], w_fp[4], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[43] ); // Amplitude(s) for diagram number 42 - FFV1_0( w_fp[34], w_fp[43], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[34], w_fp[43], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1624,10 +1624,10 @@ namespace mg5amcCpu // *** DIAGRAM 43 OF 1240 *** // Wavefunction(s) for diagram number 43 - FFV1_1( w_fp[39], w_fp[6], COUPs[1], cIPD[0], cIPD[1], w_fp[44] ); + FFV1_1( w_fp[39], w_fp[6], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[44] ); // Amplitude(s) for diagram number 43 - FFV1_0( w_fp[34], w_fp[44], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[34], w_fp[44], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1637,10 +1637,10 @@ namespace mg5amcCpu // *** DIAGRAM 44 OF 1240 *** // Wavefunction(s) for diagram number 44 - FFV1P0_3( w_fp[3], w_fp[39], COUPs[1], 0., 0., w_fp[45] ); + FFV1P0_3( w_fp[3], w_fp[39], COUPs[1], 1.0, 0., 0., w_fp[45] ); // Amplitude(s) for diagram number 44 - VVV1_0( w_fp[9], w_fp[45], w_fp[6], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[9], w_fp[45], w_fp[6], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1659,7 +1659,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 45 - FFV1_0( w_fp[3], w_fp[44], w_fp[9], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[44], w_fp[9], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1674,7 +1674,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 46 - VVV1_0( w_fp[14], w_fp[45], w_fp[4], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[14], w_fp[45], w_fp[4], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1693,7 +1693,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 47 - FFV1_0( w_fp[3], w_fp[43], w_fp[14], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[43], w_fp[14], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1708,7 +1708,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 48 - FFV1_0( w_fp[3], w_fp[39], w_fp[18], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[39], w_fp[18], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1720,7 +1720,7 @@ namespace mg5amcCpu jamp_sv[89] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[94] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[95] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[39], w_fp[19], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[39], w_fp[19], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1732,7 +1732,7 @@ namespace mg5amcCpu jamp_sv[89] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[90] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[92] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[39], w_fp[20], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[39], w_fp[20], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1748,11 +1748,11 @@ namespace mg5amcCpu // *** DIAGRAM 49 OF 1240 *** // Wavefunction(s) for diagram number 49 - FFV1_2( w_fp[3], w_fp[4], COUPs[1], cIPD[0], cIPD[1], w_fp[46] ); - FFV1_1( w_fp[39], w_fp[7], COUPs[1], cIPD[0], cIPD[1], w_fp[47] ); + FFV1_2( w_fp[3], w_fp[4], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[46] ); + FFV1_1( w_fp[39], w_fp[7], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[47] ); // Amplitude(s) for diagram number 49 - FFV1_0( w_fp[46], w_fp[47], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[47], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1762,10 +1762,10 @@ namespace mg5amcCpu // *** DIAGRAM 50 OF 1240 *** // Wavefunction(s) for diagram number 50 - FFV1_2( w_fp[46], w_fp[7], COUPs[1], cIPD[0], cIPD[1], w_fp[48] ); + FFV1_2( w_fp[46], w_fp[7], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[48] ); // Amplitude(s) for diagram number 50 - FFV1_0( w_fp[48], w_fp[39], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[48], w_fp[39], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1778,7 +1778,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 51 - FFV1_0( w_fp[46], w_fp[39], w_fp[14], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[39], w_fp[14], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1793,7 +1793,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 52 - FFV1_0( w_fp[41], w_fp[47], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[47], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1806,7 +1806,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 53 - FFV1_0( w_fp[42], w_fp[39], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[42], w_fp[39], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1819,7 +1819,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 54 - FFV1_0( w_fp[41], w_fp[39], w_fp[9], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[39], w_fp[9], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1834,7 +1834,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 55 - FFV1_0( w_fp[3], w_fp[47], w_fp[27], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[47], w_fp[27], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1849,7 +1849,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 56 - FFV1_0( w_fp[34], w_fp[39], w_fp[27], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[34], w_fp[39], w_fp[27], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1864,7 +1864,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 57 - FFV1_0( w_fp[3], w_fp[39], w_fp[28], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[39], w_fp[28], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1880,11 +1880,11 @@ namespace mg5amcCpu // *** DIAGRAM 58 OF 1240 *** // Wavefunction(s) for diagram number 58 - FFV1_1( w_fp[2], w_fp[6], COUPs[1], cIPD[0], cIPD[1], w_fp[47] ); - FFV1_1( w_fp[47], w_fp[4], COUPs[1], cIPD[0], cIPD[1], w_fp[49] ); + FFV1_1( w_fp[2], w_fp[6], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[47] ); + FFV1_1( w_fp[47], w_fp[4], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[49] ); // Amplitude(s) for diagram number 58 - FFV1_0( w_fp[34], w_fp[49], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[34], w_fp[49], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1894,10 +1894,10 @@ namespace mg5amcCpu // *** DIAGRAM 59 OF 1240 *** // Wavefunction(s) for diagram number 59 - FFV1_1( w_fp[47], w_fp[5], COUPs[1], cIPD[0], cIPD[1], w_fp[50] ); + FFV1_1( w_fp[47], w_fp[5], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[50] ); // Amplitude(s) for diagram number 59 - FFV1_0( w_fp[34], w_fp[50], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[34], w_fp[50], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1907,10 +1907,10 @@ namespace mg5amcCpu // *** DIAGRAM 60 OF 1240 *** // Wavefunction(s) for diagram number 60 - FFV1P0_3( w_fp[3], w_fp[47], COUPs[1], 0., 0., w_fp[51] ); + FFV1P0_3( w_fp[3], w_fp[47], COUPs[1], 1.0, 0., 0., w_fp[51] ); // Amplitude(s) for diagram number 60 - VVV1_0( w_fp[9], w_fp[51], w_fp[5], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[9], w_fp[51], w_fp[5], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1929,7 +1929,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 61 - FFV1_0( w_fp[3], w_fp[50], w_fp[9], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[50], w_fp[9], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1944,7 +1944,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 62 - VVV1_0( w_fp[12], w_fp[51], w_fp[4], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[12], w_fp[51], w_fp[4], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1963,7 +1963,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 63 - FFV1_0( w_fp[3], w_fp[49], w_fp[12], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[49], w_fp[12], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1978,7 +1978,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 64 - FFV1_0( w_fp[3], w_fp[47], w_fp[15], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[47], w_fp[15], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -1990,7 +1990,7 @@ namespace mg5amcCpu jamp_sv[113] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[118] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[119] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[47], w_fp[16], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[47], w_fp[16], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2002,7 +2002,7 @@ namespace mg5amcCpu jamp_sv[113] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[114] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[116] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[47], w_fp[17], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[47], w_fp[17], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2018,10 +2018,10 @@ namespace mg5amcCpu // *** DIAGRAM 65 OF 1240 *** // Wavefunction(s) for diagram number 65 - FFV1_1( w_fp[47], w_fp[7], COUPs[1], cIPD[0], cIPD[1], w_fp[52] ); + FFV1_1( w_fp[47], w_fp[7], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[52] ); // Amplitude(s) for diagram number 65 - FFV1_0( w_fp[46], w_fp[52], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[52], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2034,7 +2034,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 66 - FFV1_0( w_fp[48], w_fp[47], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[48], w_fp[47], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2047,7 +2047,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 67 - FFV1_0( w_fp[46], w_fp[47], w_fp[12], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[47], w_fp[12], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2062,7 +2062,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 68 - FFV1_0( w_fp[38], w_fp[52], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[52], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2075,7 +2075,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 69 - FFV1_0( w_fp[40], w_fp[47], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[40], w_fp[47], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2088,7 +2088,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 70 - FFV1_0( w_fp[38], w_fp[47], w_fp[9], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[47], w_fp[9], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2103,7 +2103,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 71 - FFV1_0( w_fp[3], w_fp[52], w_fp[24], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[52], w_fp[24], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2118,7 +2118,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 72 - FFV1_0( w_fp[34], w_fp[47], w_fp[24], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[34], w_fp[47], w_fp[24], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2133,7 +2133,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 73 - FFV1_0( w_fp[3], w_fp[47], w_fp[26], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[47], w_fp[26], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2149,11 +2149,11 @@ namespace mg5amcCpu // *** DIAGRAM 74 OF 1240 *** // Wavefunction(s) for diagram number 74 - FFV1_1( w_fp[2], w_fp[7], COUPs[1], cIPD[0], cIPD[1], w_fp[52] ); - FFV1_2( w_fp[46], w_fp[5], COUPs[1], cIPD[0], cIPD[1], w_fp[7] ); + FFV1_1( w_fp[2], w_fp[7], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[52] ); + FFV1_2( w_fp[46], w_fp[5], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[7] ); // Amplitude(s) for diagram number 74 - FFV1_0( w_fp[7], w_fp[52], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[7], w_fp[52], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2163,10 +2163,10 @@ namespace mg5amcCpu // *** DIAGRAM 75 OF 1240 *** // Wavefunction(s) for diagram number 75 - FFV1_2( w_fp[46], w_fp[6], COUPs[1], cIPD[0], cIPD[1], w_fp[53] ); + FFV1_2( w_fp[46], w_fp[6], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[53] ); // Amplitude(s) for diagram number 75 - FFV1_0( w_fp[53], w_fp[52], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[53], w_fp[52], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2176,10 +2176,10 @@ namespace mg5amcCpu // *** DIAGRAM 76 OF 1240 *** // Wavefunction(s) for diagram number 76 - FFV1P0_3( w_fp[46], w_fp[2], COUPs[1], 0., 0., w_fp[54] ); + FFV1P0_3( w_fp[46], w_fp[2], COUPs[1], 1.0, 0., 0., w_fp[54] ); // Amplitude(s) for diagram number 76 - VVV1_0( w_fp[12], w_fp[54], w_fp[6], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[12], w_fp[54], w_fp[6], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2198,7 +2198,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 77 - FFV1_0( w_fp[53], w_fp[2], w_fp[12], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[53], w_fp[2], w_fp[12], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2213,7 +2213,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 78 - VVV1_0( w_fp[14], w_fp[54], w_fp[5], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[14], w_fp[54], w_fp[5], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2232,7 +2232,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 79 - FFV1_0( w_fp[7], w_fp[2], w_fp[14], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[7], w_fp[2], w_fp[14], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2247,7 +2247,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 80 - FFV1_0( w_fp[46], w_fp[2], w_fp[21], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[2], w_fp[21], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2259,7 +2259,7 @@ namespace mg5amcCpu jamp_sv[92] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[114] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[116] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[46], w_fp[2], w_fp[22], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[2], w_fp[22], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2271,7 +2271,7 @@ namespace mg5amcCpu jamp_sv[92] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[97] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[103] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[46], w_fp[2], w_fp[23], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[2], w_fp[23], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2290,7 +2290,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 81 - FFV1_0( w_fp[46], w_fp[52], w_fp[29], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[52], w_fp[29], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2305,7 +2305,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 82 - FFV1_0( w_fp[48], w_fp[2], w_fp[29], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[48], w_fp[2], w_fp[29], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2320,7 +2320,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 83 - FFV1_0( w_fp[46], w_fp[2], w_fp[25], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[2], w_fp[25], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2336,10 +2336,10 @@ namespace mg5amcCpu // *** DIAGRAM 84 OF 1240 *** // Wavefunction(s) for diagram number 84 - FFV1_2( w_fp[38], w_fp[4], COUPs[1], cIPD[0], cIPD[1], w_fp[25] ); + FFV1_2( w_fp[38], w_fp[4], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[25] ); // Amplitude(s) for diagram number 84 - FFV1_0( w_fp[25], w_fp[52], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[25], w_fp[52], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2349,10 +2349,10 @@ namespace mg5amcCpu // *** DIAGRAM 85 OF 1240 *** // Wavefunction(s) for diagram number 85 - FFV1_2( w_fp[38], w_fp[6], COUPs[1], cIPD[0], cIPD[1], w_fp[48] ); + FFV1_2( w_fp[38], w_fp[6], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[48] ); // Amplitude(s) for diagram number 85 - FFV1_0( w_fp[48], w_fp[52], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[48], w_fp[52], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2362,10 +2362,10 @@ namespace mg5amcCpu // *** DIAGRAM 86 OF 1240 *** // Wavefunction(s) for diagram number 86 - FFV1P0_3( w_fp[38], w_fp[2], COUPs[1], 0., 0., w_fp[23] ); + FFV1P0_3( w_fp[38], w_fp[2], COUPs[1], 1.0, 0., 0., w_fp[23] ); // Amplitude(s) for diagram number 86 - VVV1_0( w_fp[9], w_fp[23], w_fp[6], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[9], w_fp[23], w_fp[6], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2384,7 +2384,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 87 - FFV1_0( w_fp[48], w_fp[2], w_fp[9], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[48], w_fp[2], w_fp[9], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2399,7 +2399,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 88 - VVV1_0( w_fp[14], w_fp[23], w_fp[4], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[14], w_fp[23], w_fp[4], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2418,7 +2418,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 89 - FFV1_0( w_fp[25], w_fp[2], w_fp[14], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[25], w_fp[2], w_fp[14], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2433,7 +2433,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 90 - FFV1_0( w_fp[38], w_fp[2], w_fp[18], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[2], w_fp[18], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2445,7 +2445,7 @@ namespace mg5amcCpu jamp_sv[68] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[108] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[110] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[38], w_fp[2], w_fp[19], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[2], w_fp[19], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2457,7 +2457,7 @@ namespace mg5amcCpu jamp_sv[68] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[96] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[102] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[38], w_fp[2], w_fp[20], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[2], w_fp[20], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2476,7 +2476,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 91 - FFV1_0( w_fp[38], w_fp[52], w_fp[27], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[52], w_fp[27], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2491,7 +2491,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 92 - FFV1_0( w_fp[40], w_fp[2], w_fp[27], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[40], w_fp[2], w_fp[27], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2506,7 +2506,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 93 - FFV1_0( w_fp[38], w_fp[2], w_fp[28], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[2], w_fp[28], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2522,10 +2522,10 @@ namespace mg5amcCpu // *** DIAGRAM 94 OF 1240 *** // Wavefunction(s) for diagram number 94 - FFV1_2( w_fp[41], w_fp[4], COUPs[1], cIPD[0], cIPD[1], w_fp[28] ); + FFV1_2( w_fp[41], w_fp[4], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[28] ); // Amplitude(s) for diagram number 94 - FFV1_0( w_fp[28], w_fp[52], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[28], w_fp[52], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2535,10 +2535,10 @@ namespace mg5amcCpu // *** DIAGRAM 95 OF 1240 *** // Wavefunction(s) for diagram number 95 - FFV1_2( w_fp[41], w_fp[5], COUPs[1], cIPD[0], cIPD[1], w_fp[40] ); + FFV1_2( w_fp[41], w_fp[5], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[40] ); // Amplitude(s) for diagram number 95 - FFV1_0( w_fp[40], w_fp[52], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[40], w_fp[52], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2548,10 +2548,10 @@ namespace mg5amcCpu // *** DIAGRAM 96 OF 1240 *** // Wavefunction(s) for diagram number 96 - FFV1P0_3( w_fp[41], w_fp[2], COUPs[1], 0., 0., w_fp[20] ); + FFV1P0_3( w_fp[41], w_fp[2], COUPs[1], 1.0, 0., 0., w_fp[20] ); // Amplitude(s) for diagram number 96 - VVV1_0( w_fp[9], w_fp[20], w_fp[5], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[9], w_fp[20], w_fp[5], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2570,7 +2570,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 97 - FFV1_0( w_fp[40], w_fp[2], w_fp[9], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[40], w_fp[2], w_fp[9], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2585,7 +2585,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 98 - VVV1_0( w_fp[12], w_fp[20], w_fp[4], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[12], w_fp[20], w_fp[4], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2604,7 +2604,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 99 - FFV1_0( w_fp[28], w_fp[2], w_fp[12], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[28], w_fp[2], w_fp[12], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2619,7 +2619,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 100 - FFV1_0( w_fp[41], w_fp[2], w_fp[15], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[2], w_fp[15], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2631,7 +2631,7 @@ namespace mg5amcCpu jamp_sv[62] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[84] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[86] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[41], w_fp[2], w_fp[16], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[2], w_fp[16], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2643,7 +2643,7 @@ namespace mg5amcCpu jamp_sv[62] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[72] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[78] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[41], w_fp[2], w_fp[17], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[2], w_fp[17], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2662,7 +2662,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 101 - FFV1_0( w_fp[41], w_fp[52], w_fp[24], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[52], w_fp[24], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2677,7 +2677,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 102 - FFV1_0( w_fp[42], w_fp[2], w_fp[24], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[42], w_fp[2], w_fp[24], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2692,7 +2692,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 103 - FFV1_0( w_fp[41], w_fp[2], w_fp[26], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[2], w_fp[26], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2708,10 +2708,10 @@ namespace mg5amcCpu // *** DIAGRAM 104 OF 1240 *** // Wavefunction(s) for diagram number 104 - FFV1_2( w_fp[3], w_fp[24], COUPs[1], cIPD[0], cIPD[1], w_fp[26] ); + FFV1_2( w_fp[3], w_fp[24], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[26] ); // Amplitude(s) for diagram number 104 - FFV1_0( w_fp[26], w_fp[52], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[26], w_fp[52], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2723,10 +2723,10 @@ namespace mg5amcCpu // *** DIAGRAM 105 OF 1240 *** // Wavefunction(s) for diagram number 105 - VVV1P0_1( w_fp[24], w_fp[6], COUPs[0], 0., 0., w_fp[42] ); + VVV1P0_1( w_fp[24], w_fp[6], COUPs[0], 1.0, 0., 0., w_fp[42] ); // Amplitude(s) for diagram number 105 - FFV1_0( w_fp[3], w_fp[52], w_fp[42], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[52], w_fp[42], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2742,10 +2742,10 @@ namespace mg5amcCpu // *** DIAGRAM 106 OF 1240 *** // Wavefunction(s) for diagram number 106 - FFV1_1( w_fp[2], w_fp[24], COUPs[1], cIPD[0], cIPD[1], w_fp[17] ); + FFV1_1( w_fp[2], w_fp[24], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[17] ); // Amplitude(s) for diagram number 106 - FFV1_0( w_fp[34], w_fp[17], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[34], w_fp[17], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2760,7 +2760,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 107 - FFV1_0( w_fp[34], w_fp[2], w_fp[42], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[34], w_fp[2], w_fp[42], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2779,7 +2779,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 108 - FFV1_0( w_fp[3], w_fp[17], w_fp[14], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[17], w_fp[14], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2798,7 +2798,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 109 - FFV1_0( w_fp[26], w_fp[2], w_fp[14], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[26], w_fp[2], w_fp[14], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2814,10 +2814,10 @@ namespace mg5amcCpu // *** DIAGRAM 110 OF 1240 *** // Wavefunction(s) for diagram number 110 - FFV1_2( w_fp[3], w_fp[27], COUPs[1], cIPD[0], cIPD[1], w_fp[14] ); + FFV1_2( w_fp[3], w_fp[27], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[14] ); // Amplitude(s) for diagram number 110 - FFV1_0( w_fp[14], w_fp[52], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[14], w_fp[52], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2829,10 +2829,10 @@ namespace mg5amcCpu // *** DIAGRAM 111 OF 1240 *** // Wavefunction(s) for diagram number 111 - VVV1P0_1( w_fp[27], w_fp[5], COUPs[0], 0., 0., w_fp[16] ); + VVV1P0_1( w_fp[27], w_fp[5], COUPs[0], 1.0, 0., 0., w_fp[16] ); // Amplitude(s) for diagram number 111 - FFV1_0( w_fp[3], w_fp[52], w_fp[16], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[52], w_fp[16], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2848,10 +2848,10 @@ namespace mg5amcCpu // *** DIAGRAM 112 OF 1240 *** // Wavefunction(s) for diagram number 112 - FFV1_1( w_fp[2], w_fp[27], COUPs[1], cIPD[0], cIPD[1], w_fp[15] ); + FFV1_1( w_fp[2], w_fp[27], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[15] ); // Amplitude(s) for diagram number 112 - FFV1_0( w_fp[34], w_fp[15], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[34], w_fp[15], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2866,7 +2866,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 113 - FFV1_0( w_fp[34], w_fp[2], w_fp[16], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[34], w_fp[2], w_fp[16], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2885,7 +2885,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 114 - FFV1_0( w_fp[3], w_fp[15], w_fp[12], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[15], w_fp[12], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2904,7 +2904,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 115 - FFV1_0( w_fp[14], w_fp[2], w_fp[12], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[14], w_fp[2], w_fp[12], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2920,10 +2920,10 @@ namespace mg5amcCpu // *** DIAGRAM 116 OF 1240 *** // Wavefunction(s) for diagram number 116 - FFV1_2( w_fp[3], w_fp[29], COUPs[1], cIPD[0], cIPD[1], w_fp[12] ); + FFV1_2( w_fp[3], w_fp[29], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[12] ); // Amplitude(s) for diagram number 116 - FFV1_0( w_fp[12], w_fp[52], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[12], w_fp[52], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2935,10 +2935,10 @@ namespace mg5amcCpu // *** DIAGRAM 117 OF 1240 *** // Wavefunction(s) for diagram number 117 - VVV1P0_1( w_fp[4], w_fp[29], COUPs[0], 0., 0., w_fp[19] ); + VVV1P0_1( w_fp[4], w_fp[29], COUPs[0], 1.0, 0., 0., w_fp[19] ); // Amplitude(s) for diagram number 117 - FFV1_0( w_fp[3], w_fp[52], w_fp[19], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[52], w_fp[19], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2954,10 +2954,10 @@ namespace mg5amcCpu // *** DIAGRAM 118 OF 1240 *** // Wavefunction(s) for diagram number 118 - FFV1_1( w_fp[2], w_fp[29], COUPs[1], cIPD[0], cIPD[1], w_fp[18] ); + FFV1_1( w_fp[2], w_fp[29], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[18] ); // Amplitude(s) for diagram number 118 - FFV1_0( w_fp[34], w_fp[18], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[34], w_fp[18], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2972,7 +2972,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 119 - FFV1_0( w_fp[34], w_fp[2], w_fp[19], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[34], w_fp[2], w_fp[19], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -2991,7 +2991,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 120 - FFV1_0( w_fp[3], w_fp[18], w_fp[9], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[18], w_fp[9], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -3010,7 +3010,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 121 - FFV1_0( w_fp[12], w_fp[2], w_fp[9], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[12], w_fp[2], w_fp[9], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -3029,7 +3029,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 122 - FFV1_0( w_fp[3], w_fp[52], w_fp[30], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[52], w_fp[30], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -3041,7 +3041,7 @@ namespace mg5amcCpu jamp_sv[25] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[27] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[29] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[52], w_fp[31], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[52], w_fp[31], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -3053,7 +3053,7 @@ namespace mg5amcCpu jamp_sv[26] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[27] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[28] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[52], w_fp[32], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[52], w_fp[32], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -3072,7 +3072,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 123 - FFV1_0( w_fp[34], w_fp[2], w_fp[30], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[34], w_fp[2], w_fp[30], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -3084,7 +3084,7 @@ namespace mg5amcCpu jamp_sv[95] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[118] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[119] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[34], w_fp[2], w_fp[31], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[34], w_fp[2], w_fp[31], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -3096,7 +3096,7 @@ namespace mg5amcCpu jamp_sv[95] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[112] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[113] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[34], w_fp[2], w_fp[32], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[34], w_fp[2], w_fp[32], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -3112,13 +3112,13 @@ namespace mg5amcCpu // *** DIAGRAM 124 OF 1240 *** // Wavefunction(s) for diagram number 124 - FFV1_1( w_fp[2], w_fp[0], COUPs[1], cIPD[0], cIPD[1], w_fp[34] ); - FFV1_2( w_fp[3], w_fp[1], COUPs[1], cIPD[0], cIPD[1], w_fp[52] ); - FFV1_1( w_fp[34], w_fp[4], COUPs[1], cIPD[0], cIPD[1], w_fp[9] ); - FFV1_2( w_fp[52], w_fp[5], COUPs[1], cIPD[0], cIPD[1], w_fp[22] ); + FFV1_1( w_fp[2], w_fp[0], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[34] ); + FFV1_2( w_fp[3], w_fp[1], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[52] ); + FFV1_1( w_fp[34], w_fp[4], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[9] ); + FFV1_2( w_fp[52], w_fp[5], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[22] ); // Amplitude(s) for diagram number 124 - FFV1_0( w_fp[22], w_fp[9], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[22], w_fp[9], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -3127,10 +3127,10 @@ namespace mg5amcCpu // *** DIAGRAM 125 OF 1240 *** // Wavefunction(s) for diagram number 125 - FFV1_2( w_fp[52], w_fp[6], COUPs[1], cIPD[0], cIPD[1], w_fp[21] ); + FFV1_2( w_fp[52], w_fp[6], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[21] ); // Amplitude(s) for diagram number 125 - FFV1_0( w_fp[21], w_fp[9], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[21], w_fp[9], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -3139,11 +3139,11 @@ namespace mg5amcCpu // *** DIAGRAM 126 OF 1240 *** // Wavefunction(s) for diagram number 126 - FFV1_1( w_fp[34], w_fp[5], COUPs[1], cIPD[0], cIPD[1], w_fp[55] ); - FFV1_2( w_fp[52], w_fp[4], COUPs[1], cIPD[0], cIPD[1], w_fp[56] ); + FFV1_1( w_fp[34], w_fp[5], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[55] ); + FFV1_2( w_fp[52], w_fp[4], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[56] ); // Amplitude(s) for diagram number 126 - FFV1_0( w_fp[56], w_fp[55], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[56], w_fp[55], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -3155,7 +3155,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 127 - FFV1_0( w_fp[21], w_fp[55], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[21], w_fp[55], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -3164,10 +3164,10 @@ namespace mg5amcCpu // *** DIAGRAM 128 OF 1240 *** // Wavefunction(s) for diagram number 128 - FFV1_1( w_fp[34], w_fp[6], COUPs[1], cIPD[0], cIPD[1], w_fp[57] ); + FFV1_1( w_fp[34], w_fp[6], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[57] ); // Amplitude(s) for diagram number 128 - FFV1_0( w_fp[56], w_fp[57], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[56], w_fp[57], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -3179,7 +3179,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 129 - FFV1_0( w_fp[22], w_fp[57], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[22], w_fp[57], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -3188,10 +3188,10 @@ namespace mg5amcCpu // *** DIAGRAM 130 OF 1240 *** // Wavefunction(s) for diagram number 130 - FFV1P0_3( w_fp[52], w_fp[34], COUPs[1], 0., 0., w_fp[58] ); + FFV1P0_3( w_fp[52], w_fp[34], COUPs[1], 1.0, 0., 0., w_fp[58] ); // Amplitude(s) for diagram number 130 - VVV1_0( w_fp[24], w_fp[6], w_fp[58], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[24], w_fp[6], w_fp[58], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -3203,10 +3203,10 @@ namespace mg5amcCpu // *** DIAGRAM 131 OF 1240 *** // Wavefunction(s) for diagram number 131 - FFV1_1( w_fp[34], w_fp[24], COUPs[1], cIPD[0], cIPD[1], w_fp[59] ); + FFV1_1( w_fp[34], w_fp[24], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[59] ); // Amplitude(s) for diagram number 131 - FFV1_0( w_fp[52], w_fp[59], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[59], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -3219,7 +3219,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 132 - FFV1_0( w_fp[52], w_fp[57], w_fp[24], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[57], w_fp[24], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -3232,7 +3232,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 133 - VVV1_0( w_fp[27], w_fp[5], w_fp[58], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[27], w_fp[5], w_fp[58], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -3244,10 +3244,10 @@ namespace mg5amcCpu // *** DIAGRAM 134 OF 1240 *** // Wavefunction(s) for diagram number 134 - FFV1_1( w_fp[34], w_fp[27], COUPs[1], cIPD[0], cIPD[1], w_fp[60] ); + FFV1_1( w_fp[34], w_fp[27], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[60] ); // Amplitude(s) for diagram number 134 - FFV1_0( w_fp[52], w_fp[60], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[60], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -3260,7 +3260,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 135 - FFV1_0( w_fp[52], w_fp[55], w_fp[27], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[55], w_fp[27], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -3273,7 +3273,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 136 - VVV1_0( w_fp[4], w_fp[29], w_fp[58], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[4], w_fp[29], w_fp[58], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -3288,7 +3288,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 137 - FFV1_0( w_fp[52], w_fp[9], w_fp[29], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[9], w_fp[29], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -3298,10 +3298,10 @@ namespace mg5amcCpu // *** DIAGRAM 138 OF 1240 *** // Wavefunction(s) for diagram number 138 - FFV1_1( w_fp[34], w_fp[29], COUPs[1], cIPD[0], cIPD[1], w_fp[58] ); + FFV1_1( w_fp[34], w_fp[29], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[58] ); // Amplitude(s) for diagram number 138 - FFV1_0( w_fp[52], w_fp[58], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[58], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -3314,7 +3314,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 139 - FFV1_0( w_fp[52], w_fp[34], w_fp[30], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[34], w_fp[30], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -3322,7 +3322,7 @@ namespace mg5amcCpu jamp_sv[11] -= amp_sv[0]; jamp_sv[17] -= amp_sv[0]; jamp_sv[23] += amp_sv[0]; - FFV1_0( w_fp[52], w_fp[34], w_fp[31], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[34], w_fp[31], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -3330,7 +3330,7 @@ namespace mg5amcCpu jamp_sv[15] += amp_sv[0]; jamp_sv[17] -= amp_sv[0]; jamp_sv[21] += amp_sv[0]; - FFV1_0( w_fp[52], w_fp[34], w_fp[32], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[34], w_fp[32], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -3342,12 +3342,12 @@ namespace mg5amcCpu // *** DIAGRAM 140 OF 1240 *** // Wavefunction(s) for diagram number 140 - VVV1P0_1( w_fp[1], w_fp[4], COUPs[0], 0., 0., w_fp[61] ); - FFV1P0_3( w_fp[3], w_fp[34], COUPs[1], 0., 0., w_fp[62] ); - VVV1P0_1( w_fp[61], w_fp[5], COUPs[0], 0., 0., w_fp[63] ); + VVV1P0_1( w_fp[1], w_fp[4], COUPs[0], 1.0, 0., 0., w_fp[61] ); + FFV1P0_3( w_fp[3], w_fp[34], COUPs[1], 1.0, 0., 0., w_fp[62] ); + VVV1P0_1( w_fp[61], w_fp[5], COUPs[0], 1.0, 0., 0., w_fp[63] ); // Amplitude(s) for diagram number 140 - VVV1_0( w_fp[62], w_fp[63], w_fp[6], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[62], w_fp[63], w_fp[6], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -3363,10 +3363,10 @@ namespace mg5amcCpu // *** DIAGRAM 141 OF 1240 *** // Wavefunction(s) for diagram number 141 - VVV1P0_1( w_fp[61], w_fp[6], COUPs[0], 0., 0., w_fp[64] ); + VVV1P0_1( w_fp[61], w_fp[6], COUPs[0], 1.0, 0., 0., w_fp[64] ); // Amplitude(s) for diagram number 141 - VVV1_0( w_fp[62], w_fp[64], w_fp[5], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[62], w_fp[64], w_fp[5], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -3385,7 +3385,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 142 - VVVV1_0( w_fp[61], w_fp[5], w_fp[6], w_fp[62], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[61], w_fp[5], w_fp[6], w_fp[62], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -3397,7 +3397,7 @@ namespace mg5amcCpu jamp_sv[20] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[22] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[23] += cxtype( 0, 1 ) * amp_sv[0]; - VVVV3_0( w_fp[61], w_fp[5], w_fp[6], w_fp[62], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[61], w_fp[5], w_fp[6], w_fp[62], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -3409,7 +3409,7 @@ namespace mg5amcCpu jamp_sv[17] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[18] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[20] -= cxtype( 0, 1 ) * amp_sv[0]; - VVVV4_0( w_fp[61], w_fp[5], w_fp[6], w_fp[62], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[61], w_fp[5], w_fp[6], w_fp[62], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -3425,10 +3425,10 @@ namespace mg5amcCpu // *** DIAGRAM 143 OF 1240 *** // Wavefunction(s) for diagram number 143 - FFV1_2( w_fp[3], w_fp[61], COUPs[1], cIPD[0], cIPD[1], w_fp[65] ); + FFV1_2( w_fp[3], w_fp[61], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[65] ); // Amplitude(s) for diagram number 143 - FFV1_0( w_fp[65], w_fp[55], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[65], w_fp[55], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -3441,7 +3441,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 144 - FFV1_0( w_fp[3], w_fp[55], w_fp[64], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[55], w_fp[64], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -3456,7 +3456,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 145 - FFV1_0( w_fp[65], w_fp[57], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[65], w_fp[57], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -3469,7 +3469,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 146 - FFV1_0( w_fp[3], w_fp[57], w_fp[63], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[57], w_fp[63], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -3481,10 +3481,10 @@ namespace mg5amcCpu // *** DIAGRAM 147 OF 1240 *** // Wavefunction(s) for diagram number 147 - FFV1_1( w_fp[34], w_fp[61], COUPs[1], cIPD[0], cIPD[1], w_fp[66] ); + FFV1_1( w_fp[34], w_fp[61], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[66] ); // Amplitude(s) for diagram number 147 - FFV1_0( w_fp[38], w_fp[66], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[66], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -3494,10 +3494,10 @@ namespace mg5amcCpu // *** DIAGRAM 148 OF 1240 *** // Wavefunction(s) for diagram number 148 - FFV1P0_3( w_fp[38], w_fp[34], COUPs[1], 0., 0., w_fp[67] ); + FFV1P0_3( w_fp[38], w_fp[34], COUPs[1], 1.0, 0., 0., w_fp[67] ); // Amplitude(s) for diagram number 148 - VVV1_0( w_fp[61], w_fp[6], w_fp[67], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[61], w_fp[6], w_fp[67], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -3512,7 +3512,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 149 - FFV1_0( w_fp[38], w_fp[57], w_fp[61], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[57], w_fp[61], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -3525,7 +3525,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 150 - FFV1_0( w_fp[41], w_fp[66], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[66], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -3535,10 +3535,10 @@ namespace mg5amcCpu // *** DIAGRAM 151 OF 1240 *** // Wavefunction(s) for diagram number 151 - FFV1P0_3( w_fp[41], w_fp[34], COUPs[1], 0., 0., w_fp[68] ); + FFV1P0_3( w_fp[41], w_fp[34], COUPs[1], 1.0, 0., 0., w_fp[68] ); // Amplitude(s) for diagram number 151 - VVV1_0( w_fp[61], w_fp[5], w_fp[68], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[61], w_fp[5], w_fp[68], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -3553,7 +3553,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 152 - FFV1_0( w_fp[41], w_fp[55], w_fp[61], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[55], w_fp[61], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -3566,7 +3566,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 153 - FFV1_0( w_fp[3], w_fp[66], w_fp[29], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[66], w_fp[29], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -3581,7 +3581,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 154 - VVV1_0( w_fp[61], w_fp[29], w_fp[62], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[61], w_fp[29], w_fp[62], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -3600,7 +3600,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 155 - FFV1_0( w_fp[3], w_fp[58], w_fp[61], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[58], w_fp[61], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -3612,11 +3612,11 @@ namespace mg5amcCpu // *** DIAGRAM 156 OF 1240 *** // Wavefunction(s) for diagram number 156 - VVV1P0_1( w_fp[1], w_fp[5], COUPs[0], 0., 0., w_fp[66] ); - VVV1P0_1( w_fp[66], w_fp[4], COUPs[0], 0., 0., w_fp[69] ); + VVV1P0_1( w_fp[1], w_fp[5], COUPs[0], 1.0, 0., 0., w_fp[66] ); + VVV1P0_1( w_fp[66], w_fp[4], COUPs[0], 1.0, 0., 0., w_fp[69] ); // Amplitude(s) for diagram number 156 - VVV1_0( w_fp[62], w_fp[69], w_fp[6], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[62], w_fp[69], w_fp[6], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -3632,10 +3632,10 @@ namespace mg5amcCpu // *** DIAGRAM 157 OF 1240 *** // Wavefunction(s) for diagram number 157 - VVV1P0_1( w_fp[66], w_fp[6], COUPs[0], 0., 0., w_fp[70] ); + VVV1P0_1( w_fp[66], w_fp[6], COUPs[0], 1.0, 0., 0., w_fp[70] ); // Amplitude(s) for diagram number 157 - VVV1_0( w_fp[62], w_fp[70], w_fp[4], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[62], w_fp[70], w_fp[4], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -3654,7 +3654,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 158 - VVVV1_0( w_fp[66], w_fp[4], w_fp[6], w_fp[62], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[66], w_fp[4], w_fp[6], w_fp[62], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -3666,7 +3666,7 @@ namespace mg5amcCpu jamp_sv[20] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[21] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[22] -= cxtype( 0, 1 ) * amp_sv[0]; - VVVV3_0( w_fp[66], w_fp[4], w_fp[6], w_fp[62], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[66], w_fp[4], w_fp[6], w_fp[62], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -3678,7 +3678,7 @@ namespace mg5amcCpu jamp_sv[13] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[19] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[22] -= cxtype( 0, 1 ) * amp_sv[0]; - VVVV4_0( w_fp[66], w_fp[4], w_fp[6], w_fp[62], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[66], w_fp[4], w_fp[6], w_fp[62], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -3694,10 +3694,10 @@ namespace mg5amcCpu // *** DIAGRAM 159 OF 1240 *** // Wavefunction(s) for diagram number 159 - FFV1_2( w_fp[3], w_fp[66], COUPs[1], cIPD[0], cIPD[1], w_fp[71] ); + FFV1_2( w_fp[3], w_fp[66], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[71] ); // Amplitude(s) for diagram number 159 - FFV1_0( w_fp[71], w_fp[9], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[71], w_fp[9], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -3710,7 +3710,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 160 - FFV1_0( w_fp[3], w_fp[9], w_fp[70], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[9], w_fp[70], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -3725,7 +3725,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 161 - FFV1_0( w_fp[71], w_fp[57], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[71], w_fp[57], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -3738,7 +3738,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 162 - FFV1_0( w_fp[3], w_fp[57], w_fp[69], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[57], w_fp[69], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -3750,10 +3750,10 @@ namespace mg5amcCpu // *** DIAGRAM 163 OF 1240 *** // Wavefunction(s) for diagram number 163 - FFV1_1( w_fp[34], w_fp[66], COUPs[1], cIPD[0], cIPD[1], w_fp[72] ); + FFV1_1( w_fp[34], w_fp[66], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[72] ); // Amplitude(s) for diagram number 163 - FFV1_0( w_fp[46], w_fp[72], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[72], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -3763,10 +3763,10 @@ namespace mg5amcCpu // *** DIAGRAM 164 OF 1240 *** // Wavefunction(s) for diagram number 164 - FFV1P0_3( w_fp[46], w_fp[34], COUPs[1], 0., 0., w_fp[73] ); + FFV1P0_3( w_fp[46], w_fp[34], COUPs[1], 1.0, 0., 0., w_fp[73] ); // Amplitude(s) for diagram number 164 - VVV1_0( w_fp[66], w_fp[6], w_fp[73], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[66], w_fp[6], w_fp[73], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -3781,7 +3781,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 165 - FFV1_0( w_fp[46], w_fp[57], w_fp[66], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[57], w_fp[66], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -3794,7 +3794,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 166 - FFV1_0( w_fp[41], w_fp[72], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[72], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -3807,7 +3807,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 167 - VVV1_0( w_fp[66], w_fp[4], w_fp[68], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[66], w_fp[4], w_fp[68], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -3822,7 +3822,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 168 - FFV1_0( w_fp[41], w_fp[9], w_fp[66], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[9], w_fp[66], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -3835,7 +3835,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 169 - FFV1_0( w_fp[3], w_fp[72], w_fp[27], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[72], w_fp[27], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -3850,7 +3850,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 170 - VVV1_0( w_fp[66], w_fp[27], w_fp[62], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[66], w_fp[27], w_fp[62], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -3869,7 +3869,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 171 - FFV1_0( w_fp[3], w_fp[60], w_fp[66], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[60], w_fp[66], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -3881,11 +3881,11 @@ namespace mg5amcCpu // *** DIAGRAM 172 OF 1240 *** // Wavefunction(s) for diagram number 172 - VVV1P0_1( w_fp[1], w_fp[6], COUPs[0], 0., 0., w_fp[72] ); - VVV1P0_1( w_fp[72], w_fp[4], COUPs[0], 0., 0., w_fp[74] ); + VVV1P0_1( w_fp[1], w_fp[6], COUPs[0], 1.0, 0., 0., w_fp[72] ); + VVV1P0_1( w_fp[72], w_fp[4], COUPs[0], 1.0, 0., 0., w_fp[74] ); // Amplitude(s) for diagram number 172 - VVV1_0( w_fp[62], w_fp[74], w_fp[5], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[62], w_fp[74], w_fp[5], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -3901,10 +3901,10 @@ namespace mg5amcCpu // *** DIAGRAM 173 OF 1240 *** // Wavefunction(s) for diagram number 173 - VVV1P0_1( w_fp[72], w_fp[5], COUPs[0], 0., 0., w_fp[75] ); + VVV1P0_1( w_fp[72], w_fp[5], COUPs[0], 1.0, 0., 0., w_fp[75] ); // Amplitude(s) for diagram number 173 - VVV1_0( w_fp[62], w_fp[75], w_fp[4], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[62], w_fp[75], w_fp[4], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -3923,7 +3923,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 174 - VVVV1_0( w_fp[72], w_fp[4], w_fp[5], w_fp[62], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[72], w_fp[4], w_fp[5], w_fp[62], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -3935,7 +3935,7 @@ namespace mg5amcCpu jamp_sv[15] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[16] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[18] += cxtype( 0, 1 ) * amp_sv[0]; - VVVV3_0( w_fp[72], w_fp[4], w_fp[5], w_fp[62], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[72], w_fp[4], w_fp[5], w_fp[62], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -3947,7 +3947,7 @@ namespace mg5amcCpu jamp_sv[13] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[16] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[19] += cxtype( 0, 1 ) * amp_sv[0]; - VVVV4_0( w_fp[72], w_fp[4], w_fp[5], w_fp[62], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[72], w_fp[4], w_fp[5], w_fp[62], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -3963,10 +3963,10 @@ namespace mg5amcCpu // *** DIAGRAM 175 OF 1240 *** // Wavefunction(s) for diagram number 175 - FFV1_2( w_fp[3], w_fp[72], COUPs[1], cIPD[0], cIPD[1], w_fp[76] ); + FFV1_2( w_fp[3], w_fp[72], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[76] ); // Amplitude(s) for diagram number 175 - FFV1_0( w_fp[76], w_fp[9], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[76], w_fp[9], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -3979,7 +3979,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 176 - FFV1_0( w_fp[3], w_fp[9], w_fp[75], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[9], w_fp[75], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -3994,7 +3994,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 177 - FFV1_0( w_fp[76], w_fp[55], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[76], w_fp[55], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -4007,7 +4007,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 178 - FFV1_0( w_fp[3], w_fp[55], w_fp[74], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[55], w_fp[74], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -4019,10 +4019,10 @@ namespace mg5amcCpu // *** DIAGRAM 179 OF 1240 *** // Wavefunction(s) for diagram number 179 - FFV1_1( w_fp[34], w_fp[72], COUPs[1], cIPD[0], cIPD[1], w_fp[77] ); + FFV1_1( w_fp[34], w_fp[72], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[77] ); // Amplitude(s) for diagram number 179 - FFV1_0( w_fp[46], w_fp[77], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[77], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -4035,7 +4035,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 180 - VVV1_0( w_fp[72], w_fp[5], w_fp[73], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[72], w_fp[5], w_fp[73], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -4050,7 +4050,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 181 - FFV1_0( w_fp[46], w_fp[55], w_fp[72], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[55], w_fp[72], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -4063,7 +4063,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 182 - FFV1_0( w_fp[38], w_fp[77], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[77], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -4076,7 +4076,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 183 - VVV1_0( w_fp[72], w_fp[4], w_fp[67], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[72], w_fp[4], w_fp[67], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -4091,7 +4091,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 184 - FFV1_0( w_fp[38], w_fp[9], w_fp[72], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[9], w_fp[72], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -4104,7 +4104,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 185 - FFV1_0( w_fp[3], w_fp[77], w_fp[24], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[77], w_fp[24], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -4119,7 +4119,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 186 - VVV1_0( w_fp[72], w_fp[24], w_fp[62], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[72], w_fp[24], w_fp[62], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -4138,7 +4138,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 187 - FFV1_0( w_fp[3], w_fp[59], w_fp[72], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[59], w_fp[72], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -4150,10 +4150,10 @@ namespace mg5amcCpu // *** DIAGRAM 188 OF 1240 *** // Wavefunction(s) for diagram number 188 - FFV1_1( w_fp[34], w_fp[1], COUPs[1], cIPD[0], cIPD[1], w_fp[77] ); + FFV1_1( w_fp[34], w_fp[1], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[77] ); // Amplitude(s) for diagram number 188 - FFV1_0( w_fp[7], w_fp[77], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[7], w_fp[77], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -4165,7 +4165,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 189 - FFV1_0( w_fp[53], w_fp[77], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[53], w_fp[77], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -4174,10 +4174,10 @@ namespace mg5amcCpu // *** DIAGRAM 190 OF 1240 *** // Wavefunction(s) for diagram number 190 - FFV1_2( w_fp[46], w_fp[1], COUPs[1], cIPD[0], cIPD[1], w_fp[78] ); + FFV1_2( w_fp[46], w_fp[1], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[78] ); // Amplitude(s) for diagram number 190 - FFV1_0( w_fp[78], w_fp[55], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[78], w_fp[55], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -4189,7 +4189,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 191 - FFV1_0( w_fp[53], w_fp[55], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[53], w_fp[55], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -4201,7 +4201,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 192 - FFV1_0( w_fp[78], w_fp[57], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[78], w_fp[57], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -4213,7 +4213,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 193 - FFV1_0( w_fp[7], w_fp[57], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[7], w_fp[57], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -4225,7 +4225,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 194 - FFV1_0( w_fp[46], w_fp[77], w_fp[29], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[77], w_fp[29], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -4238,7 +4238,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 195 - VVV1_0( w_fp[1], w_fp[29], w_fp[73], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[29], w_fp[73], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -4253,7 +4253,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 196 - FFV1_0( w_fp[46], w_fp[58], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[58], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -4266,7 +4266,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 197 - FFV1_0( w_fp[25], w_fp[77], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[25], w_fp[77], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -4278,7 +4278,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 198 - FFV1_0( w_fp[48], w_fp[77], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[48], w_fp[77], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -4287,10 +4287,10 @@ namespace mg5amcCpu // *** DIAGRAM 199 OF 1240 *** // Wavefunction(s) for diagram number 199 - FFV1_2( w_fp[38], w_fp[1], COUPs[1], cIPD[0], cIPD[1], w_fp[58] ); + FFV1_2( w_fp[38], w_fp[1], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[58] ); // Amplitude(s) for diagram number 199 - FFV1_0( w_fp[58], w_fp[9], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[58], w_fp[9], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -4302,7 +4302,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 200 - FFV1_0( w_fp[48], w_fp[9], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[48], w_fp[9], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -4314,7 +4314,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 201 - FFV1_0( w_fp[58], w_fp[57], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[58], w_fp[57], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -4326,7 +4326,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 202 - FFV1_0( w_fp[25], w_fp[57], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[25], w_fp[57], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -4338,7 +4338,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 203 - FFV1_0( w_fp[38], w_fp[77], w_fp[27], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[77], w_fp[27], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -4351,7 +4351,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 204 - VVV1_0( w_fp[1], w_fp[27], w_fp[67], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[27], w_fp[67], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -4366,7 +4366,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 205 - FFV1_0( w_fp[38], w_fp[60], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[60], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -4379,7 +4379,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 206 - FFV1_0( w_fp[28], w_fp[77], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[28], w_fp[77], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -4391,7 +4391,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 207 - FFV1_0( w_fp[40], w_fp[77], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[40], w_fp[77], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -4400,10 +4400,10 @@ namespace mg5amcCpu // *** DIAGRAM 208 OF 1240 *** // Wavefunction(s) for diagram number 208 - FFV1_2( w_fp[41], w_fp[1], COUPs[1], cIPD[0], cIPD[1], w_fp[60] ); + FFV1_2( w_fp[41], w_fp[1], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[60] ); // Amplitude(s) for diagram number 208 - FFV1_0( w_fp[60], w_fp[9], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[60], w_fp[9], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -4415,7 +4415,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 209 - FFV1_0( w_fp[40], w_fp[9], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[40], w_fp[9], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -4427,7 +4427,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 210 - FFV1_0( w_fp[60], w_fp[55], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[60], w_fp[55], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -4439,7 +4439,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 211 - FFV1_0( w_fp[28], w_fp[55], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[28], w_fp[55], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -4451,7 +4451,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 212 - FFV1_0( w_fp[41], w_fp[77], w_fp[24], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[77], w_fp[24], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -4464,7 +4464,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 213 - VVV1_0( w_fp[1], w_fp[24], w_fp[68], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[24], w_fp[68], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -4479,7 +4479,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 214 - FFV1_0( w_fp[41], w_fp[59], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[59], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -4492,7 +4492,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 215 - FFV1_0( w_fp[26], w_fp[77], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[26], w_fp[77], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -4505,7 +4505,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 216 - FFV1_0( w_fp[3], w_fp[77], w_fp[42], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[77], w_fp[42], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -4517,10 +4517,10 @@ namespace mg5amcCpu // *** DIAGRAM 217 OF 1240 *** // Wavefunction(s) for diagram number 217 - VVV1P0_1( w_fp[1], w_fp[24], COUPs[0], 0., 0., w_fp[59] ); + VVV1P0_1( w_fp[1], w_fp[24], COUPs[0], 1.0, 0., 0., w_fp[59] ); // Amplitude(s) for diagram number 217 - VVV1_0( w_fp[62], w_fp[59], w_fp[6], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[62], w_fp[59], w_fp[6], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -4539,7 +4539,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 218 - VVV1_0( w_fp[62], w_fp[1], w_fp[42], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[62], w_fp[1], w_fp[42], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -4558,7 +4558,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 219 - VVVV1_0( w_fp[1], w_fp[24], w_fp[6], w_fp[62], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[1], w_fp[24], w_fp[6], w_fp[62], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -4570,7 +4570,7 @@ namespace mg5amcCpu jamp_sv[19] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[21] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[23] += cxtype( 0, 1 ) * amp_sv[0]; - VVVV3_0( w_fp[1], w_fp[24], w_fp[6], w_fp[62], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[1], w_fp[24], w_fp[6], w_fp[62], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -4582,7 +4582,7 @@ namespace mg5amcCpu jamp_sv[15] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[18] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[19] -= cxtype( 0, 1 ) * amp_sv[0]; - VVVV4_0( w_fp[1], w_fp[24], w_fp[6], w_fp[62], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[1], w_fp[24], w_fp[6], w_fp[62], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -4601,7 +4601,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 220 - FFV1_0( w_fp[3], w_fp[57], w_fp[59], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[57], w_fp[59], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -4616,7 +4616,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 221 - FFV1_0( w_fp[26], w_fp[57], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[26], w_fp[57], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -4629,7 +4629,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 222 - FFV1_0( w_fp[14], w_fp[77], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[14], w_fp[77], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -4642,7 +4642,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 223 - FFV1_0( w_fp[3], w_fp[77], w_fp[16], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[77], w_fp[16], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -4654,10 +4654,10 @@ namespace mg5amcCpu // *** DIAGRAM 224 OF 1240 *** // Wavefunction(s) for diagram number 224 - VVV1P0_1( w_fp[1], w_fp[27], COUPs[0], 0., 0., w_fp[68] ); + VVV1P0_1( w_fp[1], w_fp[27], COUPs[0], 1.0, 0., 0., w_fp[68] ); // Amplitude(s) for diagram number 224 - VVV1_0( w_fp[62], w_fp[68], w_fp[5], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[62], w_fp[68], w_fp[5], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -4676,7 +4676,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 225 - VVV1_0( w_fp[62], w_fp[1], w_fp[16], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[62], w_fp[1], w_fp[16], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -4695,7 +4695,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 226 - VVVV1_0( w_fp[1], w_fp[27], w_fp[5], w_fp[62], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[1], w_fp[27], w_fp[5], w_fp[62], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -4707,7 +4707,7 @@ namespace mg5amcCpu jamp_sv[15] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[17] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[20] -= cxtype( 0, 1 ) * amp_sv[0]; - VVVV3_0( w_fp[1], w_fp[27], w_fp[5], w_fp[62], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[1], w_fp[27], w_fp[5], w_fp[62], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -4719,7 +4719,7 @@ namespace mg5amcCpu jamp_sv[13] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[20] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[21] += cxtype( 0, 1 ) * amp_sv[0]; - VVVV4_0( w_fp[1], w_fp[27], w_fp[5], w_fp[62], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[1], w_fp[27], w_fp[5], w_fp[62], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -4738,7 +4738,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 227 - FFV1_0( w_fp[3], w_fp[55], w_fp[68], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[55], w_fp[68], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -4753,7 +4753,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 228 - FFV1_0( w_fp[14], w_fp[55], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[14], w_fp[55], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -4766,7 +4766,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 229 - FFV1_0( w_fp[12], w_fp[77], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[12], w_fp[77], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -4779,7 +4779,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 230 - FFV1_0( w_fp[3], w_fp[77], w_fp[19], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[77], w_fp[19], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -4791,10 +4791,10 @@ namespace mg5amcCpu // *** DIAGRAM 231 OF 1240 *** // Wavefunction(s) for diagram number 231 - VVV1P0_1( w_fp[1], w_fp[29], COUPs[0], 0., 0., w_fp[67] ); + VVV1P0_1( w_fp[1], w_fp[29], COUPs[0], 1.0, 0., 0., w_fp[67] ); // Amplitude(s) for diagram number 231 - VVV1_0( w_fp[62], w_fp[67], w_fp[4], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[62], w_fp[67], w_fp[4], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -4813,7 +4813,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 232 - VVV1_0( w_fp[62], w_fp[1], w_fp[19], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[62], w_fp[1], w_fp[19], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -4832,7 +4832,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 233 - VVVV1_0( w_fp[1], w_fp[4], w_fp[29], w_fp[62], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[1], w_fp[4], w_fp[29], w_fp[62], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -4844,7 +4844,7 @@ namespace mg5amcCpu jamp_sv[17] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[22] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[23] += cxtype( 0, 1 ) * amp_sv[0]; - VVVV3_0( w_fp[1], w_fp[4], w_fp[29], w_fp[62], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[1], w_fp[4], w_fp[29], w_fp[62], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -4856,7 +4856,7 @@ namespace mg5amcCpu jamp_sv[11] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[16] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[22] -= cxtype( 0, 1 ) * amp_sv[0]; - VVVV4_0( w_fp[1], w_fp[4], w_fp[29], w_fp[62], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[1], w_fp[4], w_fp[29], w_fp[62], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -4875,7 +4875,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 234 - FFV1_0( w_fp[3], w_fp[9], w_fp[67], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[9], w_fp[67], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -4890,7 +4890,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 235 - FFV1_0( w_fp[12], w_fp[9], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[12], w_fp[9], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -4900,12 +4900,12 @@ namespace mg5amcCpu // *** DIAGRAM 236 OF 1240 *** // Wavefunction(s) for diagram number 236 - VVVV1P0_1( w_fp[1], w_fp[4], w_fp[5], COUPs[2], 0., 0., w_fp[73] ); - VVVV3P0_1( w_fp[1], w_fp[4], w_fp[5], COUPs[2], 0., 0., w_fp[79] ); - VVVV4P0_1( w_fp[1], w_fp[4], w_fp[5], COUPs[2], 0., 0., w_fp[80] ); + VVVV1P0_1( w_fp[1], w_fp[4], w_fp[5], COUPs[2], 1.0, 0., 0., w_fp[73] ); + VVVV3P0_1( w_fp[1], w_fp[4], w_fp[5], COUPs[2], 1.0, 0., 0., w_fp[79] ); + VVVV4P0_1( w_fp[1], w_fp[4], w_fp[5], COUPs[2], 1.0, 0., 0., w_fp[80] ); // Amplitude(s) for diagram number 236 - VVV1_0( w_fp[73], w_fp[6], w_fp[62], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[73], w_fp[6], w_fp[62], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -4917,7 +4917,7 @@ namespace mg5amcCpu jamp_sv[19] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[21] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[23] += cxtype( 0, 1 ) * amp_sv[0]; - VVV1_0( w_fp[79], w_fp[6], w_fp[62], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[79], w_fp[6], w_fp[62], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -4929,7 +4929,7 @@ namespace mg5amcCpu jamp_sv[20] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[21] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[22] += cxtype( 0, 1 ) * amp_sv[0]; - VVV1_0( w_fp[80], w_fp[6], w_fp[62], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[80], w_fp[6], w_fp[62], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -4948,7 +4948,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 237 - FFV1_0( w_fp[3], w_fp[57], w_fp[73], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[57], w_fp[73], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -4956,7 +4956,7 @@ namespace mg5amcCpu jamp_sv[19] -= amp_sv[0]; jamp_sv[21] -= amp_sv[0]; jamp_sv[23] += amp_sv[0]; - FFV1_0( w_fp[3], w_fp[57], w_fp[79], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[57], w_fp[79], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -4964,7 +4964,7 @@ namespace mg5amcCpu jamp_sv[20] += amp_sv[0]; jamp_sv[21] -= amp_sv[0]; jamp_sv[22] += amp_sv[0]; - FFV1_0( w_fp[3], w_fp[57], w_fp[80], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[57], w_fp[80], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -4979,7 +4979,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 238 - FFV1_0( w_fp[41], w_fp[34], w_fp[73], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[34], w_fp[73], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -4987,7 +4987,7 @@ namespace mg5amcCpu jamp_sv[2] -= amp_sv[0]; jamp_sv[8] -= amp_sv[0]; jamp_sv[14] += amp_sv[0]; - FFV1_0( w_fp[41], w_fp[34], w_fp[79], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[34], w_fp[79], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -4995,7 +4995,7 @@ namespace mg5amcCpu jamp_sv[6] += amp_sv[0]; jamp_sv[8] -= amp_sv[0]; jamp_sv[12] += amp_sv[0]; - FFV1_0( w_fp[41], w_fp[34], w_fp[80], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[34], w_fp[80], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -5007,12 +5007,12 @@ namespace mg5amcCpu // *** DIAGRAM 239 OF 1240 *** // Wavefunction(s) for diagram number 239 - VVVV1P0_1( w_fp[1], w_fp[4], w_fp[6], COUPs[2], 0., 0., w_fp[57] ); - VVVV3P0_1( w_fp[1], w_fp[4], w_fp[6], COUPs[2], 0., 0., w_fp[81] ); - VVVV4P0_1( w_fp[1], w_fp[4], w_fp[6], COUPs[2], 0., 0., w_fp[82] ); + VVVV1P0_1( w_fp[1], w_fp[4], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[57] ); + VVVV3P0_1( w_fp[1], w_fp[4], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[81] ); + VVVV4P0_1( w_fp[1], w_fp[4], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[82] ); // Amplitude(s) for diagram number 239 - VVV1_0( w_fp[57], w_fp[5], w_fp[62], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[57], w_fp[5], w_fp[62], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -5024,7 +5024,7 @@ namespace mg5amcCpu jamp_sv[15] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[17] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[20] -= cxtype( 0, 1 ) * amp_sv[0]; - VVV1_0( w_fp[81], w_fp[5], w_fp[62], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[81], w_fp[5], w_fp[62], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -5036,7 +5036,7 @@ namespace mg5amcCpu jamp_sv[15] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[16] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[18] -= cxtype( 0, 1 ) * amp_sv[0]; - VVV1_0( w_fp[82], w_fp[5], w_fp[62], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[82], w_fp[5], w_fp[62], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -5055,7 +5055,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 240 - FFV1_0( w_fp[3], w_fp[55], w_fp[57], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[55], w_fp[57], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -5063,7 +5063,7 @@ namespace mg5amcCpu jamp_sv[13] -= amp_sv[0]; jamp_sv[15] -= amp_sv[0]; jamp_sv[17] += amp_sv[0]; - FFV1_0( w_fp[3], w_fp[55], w_fp[81], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[55], w_fp[81], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -5071,7 +5071,7 @@ namespace mg5amcCpu jamp_sv[14] += amp_sv[0]; jamp_sv[15] -= amp_sv[0]; jamp_sv[16] += amp_sv[0]; - FFV1_0( w_fp[3], w_fp[55], w_fp[82], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[55], w_fp[82], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -5086,7 +5086,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 241 - FFV1_0( w_fp[38], w_fp[34], w_fp[57], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[34], w_fp[57], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -5094,7 +5094,7 @@ namespace mg5amcCpu jamp_sv[4] -= amp_sv[0]; jamp_sv[10] -= amp_sv[0]; jamp_sv[20] += amp_sv[0]; - FFV1_0( w_fp[38], w_fp[34], w_fp[81], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[34], w_fp[81], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -5102,7 +5102,7 @@ namespace mg5amcCpu jamp_sv[7] += amp_sv[0]; jamp_sv[10] -= amp_sv[0]; jamp_sv[18] += amp_sv[0]; - FFV1_0( w_fp[38], w_fp[34], w_fp[82], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[34], w_fp[82], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -5114,12 +5114,12 @@ namespace mg5amcCpu // *** DIAGRAM 242 OF 1240 *** // Wavefunction(s) for diagram number 242 - VVVV1P0_1( w_fp[1], w_fp[5], w_fp[6], COUPs[2], 0., 0., w_fp[55] ); - VVVV3P0_1( w_fp[1], w_fp[5], w_fp[6], COUPs[2], 0., 0., w_fp[83] ); - VVVV4P0_1( w_fp[1], w_fp[5], w_fp[6], COUPs[2], 0., 0., w_fp[84] ); + VVVV1P0_1( w_fp[1], w_fp[5], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[55] ); + VVVV3P0_1( w_fp[1], w_fp[5], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[83] ); + VVVV4P0_1( w_fp[1], w_fp[5], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[84] ); // Amplitude(s) for diagram number 242 - VVV1_0( w_fp[55], w_fp[4], w_fp[62], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[55], w_fp[4], w_fp[62], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -5131,7 +5131,7 @@ namespace mg5amcCpu jamp_sv[11] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[16] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[22] -= cxtype( 0, 1 ) * amp_sv[0]; - VVV1_0( w_fp[83], w_fp[4], w_fp[62], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[83], w_fp[4], w_fp[62], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -5143,7 +5143,7 @@ namespace mg5amcCpu jamp_sv[13] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[16] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[19] -= cxtype( 0, 1 ) * amp_sv[0]; - VVV1_0( w_fp[84], w_fp[4], w_fp[62], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[84], w_fp[4], w_fp[62], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -5162,7 +5162,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 243 - FFV1_0( w_fp[3], w_fp[9], w_fp[55], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[9], w_fp[55], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -5170,7 +5170,7 @@ namespace mg5amcCpu jamp_sv[7] -= amp_sv[0]; jamp_sv[9] -= amp_sv[0]; jamp_sv[11] += amp_sv[0]; - FFV1_0( w_fp[3], w_fp[9], w_fp[83], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[9], w_fp[83], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -5178,7 +5178,7 @@ namespace mg5amcCpu jamp_sv[8] += amp_sv[0]; jamp_sv[9] -= amp_sv[0]; jamp_sv[10] += amp_sv[0]; - FFV1_0( w_fp[3], w_fp[9], w_fp[84], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[9], w_fp[84], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -5193,7 +5193,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 244 - FFV1_0( w_fp[46], w_fp[34], w_fp[55], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[34], w_fp[55], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -5201,7 +5201,7 @@ namespace mg5amcCpu jamp_sv[5] -= amp_sv[0]; jamp_sv[16] -= amp_sv[0]; jamp_sv[22] += amp_sv[0]; - FFV1_0( w_fp[46], w_fp[34], w_fp[83], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[34], w_fp[83], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -5209,7 +5209,7 @@ namespace mg5amcCpu jamp_sv[13] += amp_sv[0]; jamp_sv[16] -= amp_sv[0]; jamp_sv[19] += amp_sv[0]; - FFV1_0( w_fp[46], w_fp[34], w_fp[84], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[34], w_fp[84], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -5224,7 +5224,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 245 - FFV1_0( w_fp[3], w_fp[77], w_fp[30], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[77], w_fp[30], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -5232,7 +5232,7 @@ namespace mg5amcCpu jamp_sv[1] -= amp_sv[0]; jamp_sv[3] -= amp_sv[0]; jamp_sv[5] += amp_sv[0]; - FFV1_0( w_fp[3], w_fp[77], w_fp[31], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[77], w_fp[31], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -5240,7 +5240,7 @@ namespace mg5amcCpu jamp_sv[2] += amp_sv[0]; jamp_sv[3] -= amp_sv[0]; jamp_sv[4] += amp_sv[0]; - FFV1_0( w_fp[3], w_fp[77], w_fp[32], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[77], w_fp[32], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -5255,7 +5255,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 246 - VVV1_0( w_fp[1], w_fp[30], w_fp[62], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[30], w_fp[62], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -5267,7 +5267,7 @@ namespace mg5amcCpu jamp_sv[11] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[17] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[23] += cxtype( 0, 1 ) * amp_sv[0]; - VVV1_0( w_fp[1], w_fp[31], w_fp[62], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[31], w_fp[62], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -5279,7 +5279,7 @@ namespace mg5amcCpu jamp_sv[15] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[17] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[21] += cxtype( 0, 1 ) * amp_sv[0]; - VVV1_0( w_fp[1], w_fp[32], w_fp[62], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[32], w_fp[62], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -5295,13 +5295,13 @@ namespace mg5amcCpu // *** DIAGRAM 247 OF 1240 *** // Wavefunction(s) for diagram number 247 - FFV1_2( w_fp[3], w_fp[0], COUPs[1], cIPD[0], cIPD[1], w_fp[62] ); - FFV1_1( w_fp[2], w_fp[1], COUPs[1], cIPD[0], cIPD[1], w_fp[77] ); - FFV1_2( w_fp[62], w_fp[4], COUPs[1], cIPD[0], cIPD[1], w_fp[34] ); - FFV1_1( w_fp[77], w_fp[5], COUPs[1], cIPD[0], cIPD[1], w_fp[9] ); + FFV1_2( w_fp[3], w_fp[0], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[62] ); + FFV1_1( w_fp[2], w_fp[1], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[77] ); + FFV1_2( w_fp[62], w_fp[4], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[34] ); + FFV1_1( w_fp[77], w_fp[5], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[9] ); // Amplitude(s) for diagram number 247 - FFV1_0( w_fp[34], w_fp[9], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[34], w_fp[9], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -5310,10 +5310,10 @@ namespace mg5amcCpu // *** DIAGRAM 248 OF 1240 *** // Wavefunction(s) for diagram number 248 - FFV1_1( w_fp[77], w_fp[6], COUPs[1], cIPD[0], cIPD[1], w_fp[85] ); + FFV1_1( w_fp[77], w_fp[6], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[85] ); // Amplitude(s) for diagram number 248 - FFV1_0( w_fp[34], w_fp[85], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[34], w_fp[85], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -5322,11 +5322,11 @@ namespace mg5amcCpu // *** DIAGRAM 249 OF 1240 *** // Wavefunction(s) for diagram number 249 - FFV1_2( w_fp[62], w_fp[5], COUPs[1], cIPD[0], cIPD[1], w_fp[86] ); - FFV1_1( w_fp[77], w_fp[4], COUPs[1], cIPD[0], cIPD[1], w_fp[87] ); + FFV1_2( w_fp[62], w_fp[5], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[86] ); + FFV1_1( w_fp[77], w_fp[4], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[87] ); // Amplitude(s) for diagram number 249 - FFV1_0( w_fp[86], w_fp[87], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[86], w_fp[87], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -5338,7 +5338,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 250 - FFV1_0( w_fp[86], w_fp[85], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[86], w_fp[85], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -5347,10 +5347,10 @@ namespace mg5amcCpu // *** DIAGRAM 251 OF 1240 *** // Wavefunction(s) for diagram number 251 - FFV1_2( w_fp[62], w_fp[6], COUPs[1], cIPD[0], cIPD[1], w_fp[88] ); + FFV1_2( w_fp[62], w_fp[6], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[88] ); // Amplitude(s) for diagram number 251 - FFV1_0( w_fp[88], w_fp[87], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[88], w_fp[87], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -5362,7 +5362,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 252 - FFV1_0( w_fp[88], w_fp[9], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[88], w_fp[9], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -5371,10 +5371,10 @@ namespace mg5amcCpu // *** DIAGRAM 253 OF 1240 *** // Wavefunction(s) for diagram number 253 - FFV1P0_3( w_fp[62], w_fp[77], COUPs[1], 0., 0., w_fp[89] ); + FFV1P0_3( w_fp[62], w_fp[77], COUPs[1], 1.0, 0., 0., w_fp[89] ); // Amplitude(s) for diagram number 253 - VVV1_0( w_fp[24], w_fp[6], w_fp[89], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[24], w_fp[6], w_fp[89], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -5386,10 +5386,10 @@ namespace mg5amcCpu // *** DIAGRAM 254 OF 1240 *** // Wavefunction(s) for diagram number 254 - FFV1_2( w_fp[62], w_fp[24], COUPs[1], cIPD[0], cIPD[1], w_fp[90] ); + FFV1_2( w_fp[62], w_fp[24], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[90] ); // Amplitude(s) for diagram number 254 - FFV1_0( w_fp[90], w_fp[77], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[90], w_fp[77], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -5402,7 +5402,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 255 - FFV1_0( w_fp[88], w_fp[77], w_fp[24], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[88], w_fp[77], w_fp[24], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -5415,7 +5415,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 256 - VVV1_0( w_fp[27], w_fp[5], w_fp[89], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[27], w_fp[5], w_fp[89], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -5427,10 +5427,10 @@ namespace mg5amcCpu // *** DIAGRAM 257 OF 1240 *** // Wavefunction(s) for diagram number 257 - FFV1_2( w_fp[62], w_fp[27], COUPs[1], cIPD[0], cIPD[1], w_fp[91] ); + FFV1_2( w_fp[62], w_fp[27], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[91] ); // Amplitude(s) for diagram number 257 - FFV1_0( w_fp[91], w_fp[77], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[91], w_fp[77], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -5443,7 +5443,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 258 - FFV1_0( w_fp[86], w_fp[77], w_fp[27], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[86], w_fp[77], w_fp[27], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -5456,7 +5456,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 259 - VVV1_0( w_fp[4], w_fp[29], w_fp[89], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[4], w_fp[29], w_fp[89], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -5471,7 +5471,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 260 - FFV1_0( w_fp[34], w_fp[77], w_fp[29], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[34], w_fp[77], w_fp[29], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -5481,10 +5481,10 @@ namespace mg5amcCpu // *** DIAGRAM 261 OF 1240 *** // Wavefunction(s) for diagram number 261 - FFV1_2( w_fp[62], w_fp[29], COUPs[1], cIPD[0], cIPD[1], w_fp[89] ); + FFV1_2( w_fp[62], w_fp[29], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[89] ); // Amplitude(s) for diagram number 261 - FFV1_0( w_fp[89], w_fp[77], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[89], w_fp[77], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -5497,7 +5497,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 262 - FFV1_0( w_fp[62], w_fp[77], w_fp[30], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[62], w_fp[77], w_fp[30], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -5505,7 +5505,7 @@ namespace mg5amcCpu jamp_sv[35] -= amp_sv[0]; jamp_sv[41] -= amp_sv[0]; jamp_sv[47] += amp_sv[0]; - FFV1_0( w_fp[62], w_fp[77], w_fp[31], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[62], w_fp[77], w_fp[31], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -5513,7 +5513,7 @@ namespace mg5amcCpu jamp_sv[39] += amp_sv[0]; jamp_sv[41] -= amp_sv[0]; jamp_sv[45] += amp_sv[0]; - FFV1_0( w_fp[62], w_fp[77], w_fp[32], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[62], w_fp[77], w_fp[32], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -5525,10 +5525,10 @@ namespace mg5amcCpu // *** DIAGRAM 263 OF 1240 *** // Wavefunction(s) for diagram number 263 - FFV1P0_3( w_fp[62], w_fp[2], COUPs[1], 0., 0., w_fp[92] ); + FFV1P0_3( w_fp[62], w_fp[2], COUPs[1], 1.0, 0., 0., w_fp[92] ); // Amplitude(s) for diagram number 263 - VVV1_0( w_fp[92], w_fp[63], w_fp[6], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[92], w_fp[63], w_fp[6], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -5547,7 +5547,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 264 - VVV1_0( w_fp[92], w_fp[64], w_fp[5], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[92], w_fp[64], w_fp[5], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -5566,7 +5566,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 265 - VVVV1_0( w_fp[61], w_fp[5], w_fp[6], w_fp[92], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[61], w_fp[5], w_fp[6], w_fp[92], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -5578,7 +5578,7 @@ namespace mg5amcCpu jamp_sv[111] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[117] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[119] += cxtype( 0, 1 ) * amp_sv[0]; - VVVV3_0( w_fp[61], w_fp[5], w_fp[6], w_fp[92], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[61], w_fp[5], w_fp[6], w_fp[92], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -5590,7 +5590,7 @@ namespace mg5amcCpu jamp_sv[95] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[105] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[111] -= cxtype( 0, 1 ) * amp_sv[0]; - VVVV4_0( w_fp[61], w_fp[5], w_fp[6], w_fp[92], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[61], w_fp[5], w_fp[6], w_fp[92], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -5606,10 +5606,10 @@ namespace mg5amcCpu // *** DIAGRAM 266 OF 1240 *** // Wavefunction(s) for diagram number 266 - FFV1_1( w_fp[2], w_fp[61], COUPs[1], cIPD[0], cIPD[1], w_fp[93] ); + FFV1_1( w_fp[2], w_fp[61], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[93] ); // Amplitude(s) for diagram number 266 - FFV1_0( w_fp[86], w_fp[93], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[86], w_fp[93], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -5622,7 +5622,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 267 - FFV1_0( w_fp[86], w_fp[2], w_fp[64], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[86], w_fp[2], w_fp[64], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -5637,7 +5637,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 268 - FFV1_0( w_fp[88], w_fp[93], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[88], w_fp[93], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -5650,7 +5650,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 269 - FFV1_0( w_fp[88], w_fp[2], w_fp[63], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[88], w_fp[2], w_fp[63], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -5662,10 +5662,10 @@ namespace mg5amcCpu // *** DIAGRAM 270 OF 1240 *** // Wavefunction(s) for diagram number 270 - FFV1_2( w_fp[62], w_fp[61], COUPs[1], cIPD[0], cIPD[1], w_fp[94] ); + FFV1_2( w_fp[62], w_fp[61], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[94] ); // Amplitude(s) for diagram number 270 - FFV1_0( w_fp[94], w_fp[39], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[94], w_fp[39], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -5675,10 +5675,10 @@ namespace mg5amcCpu // *** DIAGRAM 271 OF 1240 *** // Wavefunction(s) for diagram number 271 - FFV1P0_3( w_fp[62], w_fp[39], COUPs[1], 0., 0., w_fp[95] ); + FFV1P0_3( w_fp[62], w_fp[39], COUPs[1], 1.0, 0., 0., w_fp[95] ); // Amplitude(s) for diagram number 271 - VVV1_0( w_fp[61], w_fp[6], w_fp[95], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[61], w_fp[6], w_fp[95], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -5693,7 +5693,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 272 - FFV1_0( w_fp[88], w_fp[39], w_fp[61], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[88], w_fp[39], w_fp[61], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -5706,7 +5706,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 273 - FFV1_0( w_fp[94], w_fp[47], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[94], w_fp[47], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -5716,10 +5716,10 @@ namespace mg5amcCpu // *** DIAGRAM 274 OF 1240 *** // Wavefunction(s) for diagram number 274 - FFV1P0_3( w_fp[62], w_fp[47], COUPs[1], 0., 0., w_fp[96] ); + FFV1P0_3( w_fp[62], w_fp[47], COUPs[1], 1.0, 0., 0., w_fp[96] ); // Amplitude(s) for diagram number 274 - VVV1_0( w_fp[61], w_fp[5], w_fp[96], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[61], w_fp[5], w_fp[96], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -5734,7 +5734,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 275 - FFV1_0( w_fp[86], w_fp[47], w_fp[61], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[86], w_fp[47], w_fp[61], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -5747,7 +5747,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 276 - FFV1_0( w_fp[94], w_fp[2], w_fp[29], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[94], w_fp[2], w_fp[29], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -5762,7 +5762,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 277 - VVV1_0( w_fp[61], w_fp[29], w_fp[92], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[61], w_fp[29], w_fp[92], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -5781,7 +5781,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 278 - FFV1_0( w_fp[89], w_fp[2], w_fp[61], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[89], w_fp[2], w_fp[61], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -5796,7 +5796,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 279 - VVV1_0( w_fp[92], w_fp[69], w_fp[6], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[92], w_fp[69], w_fp[6], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -5815,7 +5815,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 280 - VVV1_0( w_fp[92], w_fp[70], w_fp[4], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[92], w_fp[70], w_fp[4], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -5834,7 +5834,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 281 - VVVV1_0( w_fp[66], w_fp[4], w_fp[6], w_fp[92], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[66], w_fp[4], w_fp[6], w_fp[92], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -5846,7 +5846,7 @@ namespace mg5amcCpu jamp_sv[111] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[113] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[117] -= cxtype( 0, 1 ) * amp_sv[0]; - VVVV3_0( w_fp[66], w_fp[4], w_fp[6], w_fp[92], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[66], w_fp[4], w_fp[6], w_fp[92], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -5858,7 +5858,7 @@ namespace mg5amcCpu jamp_sv[83] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[107] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[117] -= cxtype( 0, 1 ) * amp_sv[0]; - VVVV4_0( w_fp[66], w_fp[4], w_fp[6], w_fp[92], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[66], w_fp[4], w_fp[6], w_fp[92], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -5874,10 +5874,10 @@ namespace mg5amcCpu // *** DIAGRAM 282 OF 1240 *** // Wavefunction(s) for diagram number 282 - FFV1_1( w_fp[2], w_fp[66], COUPs[1], cIPD[0], cIPD[1], w_fp[94] ); + FFV1_1( w_fp[2], w_fp[66], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[94] ); // Amplitude(s) for diagram number 282 - FFV1_0( w_fp[34], w_fp[94], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[34], w_fp[94], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -5890,7 +5890,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 283 - FFV1_0( w_fp[34], w_fp[2], w_fp[70], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[34], w_fp[2], w_fp[70], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -5905,7 +5905,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 284 - FFV1_0( w_fp[88], w_fp[94], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[88], w_fp[94], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -5918,7 +5918,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 285 - FFV1_0( w_fp[88], w_fp[2], w_fp[69], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[88], w_fp[2], w_fp[69], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -5930,10 +5930,10 @@ namespace mg5amcCpu // *** DIAGRAM 286 OF 1240 *** // Wavefunction(s) for diagram number 286 - FFV1_2( w_fp[62], w_fp[66], COUPs[1], cIPD[0], cIPD[1], w_fp[97] ); + FFV1_2( w_fp[62], w_fp[66], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[97] ); // Amplitude(s) for diagram number 286 - FFV1_0( w_fp[97], w_fp[33], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[97], w_fp[33], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -5943,10 +5943,10 @@ namespace mg5amcCpu // *** DIAGRAM 287 OF 1240 *** // Wavefunction(s) for diagram number 287 - FFV1P0_3( w_fp[62], w_fp[33], COUPs[1], 0., 0., w_fp[98] ); + FFV1P0_3( w_fp[62], w_fp[33], COUPs[1], 1.0, 0., 0., w_fp[98] ); // Amplitude(s) for diagram number 287 - VVV1_0( w_fp[66], w_fp[6], w_fp[98], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[66], w_fp[6], w_fp[98], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -5961,7 +5961,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 288 - FFV1_0( w_fp[88], w_fp[33], w_fp[66], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[88], w_fp[33], w_fp[66], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -5974,7 +5974,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 289 - FFV1_0( w_fp[97], w_fp[47], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[97], w_fp[47], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -5987,7 +5987,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 290 - VVV1_0( w_fp[66], w_fp[4], w_fp[96], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[66], w_fp[4], w_fp[96], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -6002,7 +6002,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 291 - FFV1_0( w_fp[34], w_fp[47], w_fp[66], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[34], w_fp[47], w_fp[66], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -6015,7 +6015,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 292 - FFV1_0( w_fp[97], w_fp[2], w_fp[27], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[97], w_fp[2], w_fp[27], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -6030,7 +6030,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 293 - VVV1_0( w_fp[66], w_fp[27], w_fp[92], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[66], w_fp[27], w_fp[92], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -6049,7 +6049,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 294 - FFV1_0( w_fp[91], w_fp[2], w_fp[66], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[91], w_fp[2], w_fp[66], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -6064,7 +6064,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 295 - VVV1_0( w_fp[92], w_fp[74], w_fp[5], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[92], w_fp[74], w_fp[5], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -6083,7 +6083,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 296 - VVV1_0( w_fp[92], w_fp[75], w_fp[4], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[92], w_fp[75], w_fp[4], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -6102,7 +6102,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 297 - VVVV1_0( w_fp[72], w_fp[4], w_fp[5], w_fp[92], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[72], w_fp[4], w_fp[5], w_fp[92], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -6114,7 +6114,7 @@ namespace mg5amcCpu jamp_sv[89] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[93] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[105] += cxtype( 0, 1 ) * amp_sv[0]; - VVVV3_0( w_fp[72], w_fp[4], w_fp[5], w_fp[92], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[72], w_fp[4], w_fp[5], w_fp[92], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -6126,7 +6126,7 @@ namespace mg5amcCpu jamp_sv[83] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[93] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[107] += cxtype( 0, 1 ) * amp_sv[0]; - VVVV4_0( w_fp[72], w_fp[4], w_fp[5], w_fp[92], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[72], w_fp[4], w_fp[5], w_fp[92], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -6142,10 +6142,10 @@ namespace mg5amcCpu // *** DIAGRAM 298 OF 1240 *** // Wavefunction(s) for diagram number 298 - FFV1_1( w_fp[2], w_fp[72], COUPs[1], cIPD[0], cIPD[1], w_fp[97] ); + FFV1_1( w_fp[2], w_fp[72], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[97] ); // Amplitude(s) for diagram number 298 - FFV1_0( w_fp[34], w_fp[97], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[34], w_fp[97], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -6158,7 +6158,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 299 - FFV1_0( w_fp[34], w_fp[2], w_fp[75], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[34], w_fp[2], w_fp[75], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -6173,7 +6173,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 300 - FFV1_0( w_fp[86], w_fp[97], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[86], w_fp[97], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -6186,7 +6186,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 301 - FFV1_0( w_fp[86], w_fp[2], w_fp[74], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[86], w_fp[2], w_fp[74], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -6198,10 +6198,10 @@ namespace mg5amcCpu // *** DIAGRAM 302 OF 1240 *** // Wavefunction(s) for diagram number 302 - FFV1_2( w_fp[62], w_fp[72], COUPs[1], cIPD[0], cIPD[1], w_fp[99] ); + FFV1_2( w_fp[62], w_fp[72], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[99] ); // Amplitude(s) for diagram number 302 - FFV1_0( w_fp[99], w_fp[33], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[33], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -6214,7 +6214,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 303 - VVV1_0( w_fp[72], w_fp[5], w_fp[98], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[72], w_fp[5], w_fp[98], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -6229,7 +6229,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 304 - FFV1_0( w_fp[86], w_fp[33], w_fp[72], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[86], w_fp[33], w_fp[72], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -6242,7 +6242,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 305 - FFV1_0( w_fp[99], w_fp[39], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[39], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -6255,7 +6255,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 306 - VVV1_0( w_fp[72], w_fp[4], w_fp[95], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[72], w_fp[4], w_fp[95], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -6270,7 +6270,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 307 - FFV1_0( w_fp[34], w_fp[39], w_fp[72], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[34], w_fp[39], w_fp[72], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -6283,7 +6283,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 308 - FFV1_0( w_fp[99], w_fp[2], w_fp[24], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[2], w_fp[24], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -6298,7 +6298,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 309 - VVV1_0( w_fp[72], w_fp[24], w_fp[92], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[72], w_fp[24], w_fp[92], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -6317,7 +6317,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 310 - FFV1_0( w_fp[90], w_fp[2], w_fp[72], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[90], w_fp[2], w_fp[72], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -6329,10 +6329,10 @@ namespace mg5amcCpu // *** DIAGRAM 311 OF 1240 *** // Wavefunction(s) for diagram number 311 - FFV1_2( w_fp[62], w_fp[1], COUPs[1], cIPD[0], cIPD[1], w_fp[99] ); + FFV1_2( w_fp[62], w_fp[1], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[99] ); // Amplitude(s) for diagram number 311 - FFV1_0( w_fp[99], w_fp[35], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[35], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -6344,7 +6344,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 312 - FFV1_0( w_fp[99], w_fp[36], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[36], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -6353,10 +6353,10 @@ namespace mg5amcCpu // *** DIAGRAM 313 OF 1240 *** // Wavefunction(s) for diagram number 313 - FFV1_1( w_fp[33], w_fp[1], COUPs[1], cIPD[0], cIPD[1], w_fp[100] ); + FFV1_1( w_fp[33], w_fp[1], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[100] ); // Amplitude(s) for diagram number 313 - FFV1_0( w_fp[86], w_fp[100], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[86], w_fp[100], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -6368,7 +6368,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 314 - FFV1_0( w_fp[86], w_fp[36], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[86], w_fp[36], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -6380,7 +6380,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 315 - FFV1_0( w_fp[88], w_fp[100], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[88], w_fp[100], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -6392,7 +6392,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 316 - FFV1_0( w_fp[88], w_fp[35], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[88], w_fp[35], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -6404,7 +6404,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 317 - FFV1_0( w_fp[99], w_fp[33], w_fp[29], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[33], w_fp[29], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -6417,7 +6417,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 318 - VVV1_0( w_fp[1], w_fp[29], w_fp[98], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[29], w_fp[98], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -6432,7 +6432,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 319 - FFV1_0( w_fp[89], w_fp[33], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[89], w_fp[33], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -6445,7 +6445,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 320 - FFV1_0( w_fp[99], w_fp[43], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[43], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -6457,7 +6457,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 321 - FFV1_0( w_fp[99], w_fp[44], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[44], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -6466,10 +6466,10 @@ namespace mg5amcCpu // *** DIAGRAM 322 OF 1240 *** // Wavefunction(s) for diagram number 322 - FFV1_1( w_fp[39], w_fp[1], COUPs[1], cIPD[0], cIPD[1], w_fp[89] ); + FFV1_1( w_fp[39], w_fp[1], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[89] ); // Amplitude(s) for diagram number 322 - FFV1_0( w_fp[34], w_fp[89], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[34], w_fp[89], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -6481,7 +6481,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 323 - FFV1_0( w_fp[34], w_fp[44], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[34], w_fp[44], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -6493,7 +6493,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 324 - FFV1_0( w_fp[88], w_fp[89], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[88], w_fp[89], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -6505,7 +6505,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 325 - FFV1_0( w_fp[88], w_fp[43], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[88], w_fp[43], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -6517,7 +6517,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 326 - FFV1_0( w_fp[99], w_fp[39], w_fp[27], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[39], w_fp[27], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -6530,7 +6530,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 327 - VVV1_0( w_fp[1], w_fp[27], w_fp[95], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[27], w_fp[95], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -6545,7 +6545,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 328 - FFV1_0( w_fp[91], w_fp[39], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[91], w_fp[39], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -6558,7 +6558,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 329 - FFV1_0( w_fp[99], w_fp[49], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[49], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -6570,7 +6570,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 330 - FFV1_0( w_fp[99], w_fp[50], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[50], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -6579,10 +6579,10 @@ namespace mg5amcCpu // *** DIAGRAM 331 OF 1240 *** // Wavefunction(s) for diagram number 331 - FFV1_1( w_fp[47], w_fp[1], COUPs[1], cIPD[0], cIPD[1], w_fp[91] ); + FFV1_1( w_fp[47], w_fp[1], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[91] ); // Amplitude(s) for diagram number 331 - FFV1_0( w_fp[34], w_fp[91], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[34], w_fp[91], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -6594,7 +6594,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 332 - FFV1_0( w_fp[34], w_fp[50], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[34], w_fp[50], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -6606,7 +6606,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 333 - FFV1_0( w_fp[86], w_fp[91], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[86], w_fp[91], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -6618,7 +6618,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 334 - FFV1_0( w_fp[86], w_fp[49], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[86], w_fp[49], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -6630,7 +6630,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 335 - FFV1_0( w_fp[99], w_fp[47], w_fp[24], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[47], w_fp[24], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -6643,7 +6643,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 336 - VVV1_0( w_fp[1], w_fp[24], w_fp[96], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[24], w_fp[96], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -6658,7 +6658,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 337 - FFV1_0( w_fp[90], w_fp[47], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[90], w_fp[47], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -6671,7 +6671,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 338 - FFV1_0( w_fp[99], w_fp[17], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[17], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -6684,7 +6684,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 339 - FFV1_0( w_fp[99], w_fp[2], w_fp[42], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[2], w_fp[42], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -6699,7 +6699,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 340 - VVV1_0( w_fp[92], w_fp[59], w_fp[6], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[92], w_fp[59], w_fp[6], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -6718,7 +6718,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 341 - VVV1_0( w_fp[92], w_fp[1], w_fp[42], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[92], w_fp[1], w_fp[42], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -6737,7 +6737,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 342 - VVVV1_0( w_fp[1], w_fp[24], w_fp[6], w_fp[92], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[1], w_fp[24], w_fp[6], w_fp[92], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -6749,7 +6749,7 @@ namespace mg5amcCpu jamp_sv[107] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[113] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[119] += cxtype( 0, 1 ) * amp_sv[0]; - VVVV3_0( w_fp[1], w_fp[24], w_fp[6], w_fp[92], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[1], w_fp[24], w_fp[6], w_fp[92], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -6761,7 +6761,7 @@ namespace mg5amcCpu jamp_sv[89] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[105] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[107] -= cxtype( 0, 1 ) * amp_sv[0]; - VVVV4_0( w_fp[1], w_fp[24], w_fp[6], w_fp[92], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[1], w_fp[24], w_fp[6], w_fp[92], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -6780,7 +6780,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 343 - FFV1_0( w_fp[88], w_fp[2], w_fp[59], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[88], w_fp[2], w_fp[59], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -6795,7 +6795,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 344 - FFV1_0( w_fp[88], w_fp[17], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[88], w_fp[17], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -6808,7 +6808,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 345 - FFV1_0( w_fp[99], w_fp[15], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[15], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -6821,7 +6821,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 346 - FFV1_0( w_fp[99], w_fp[2], w_fp[16], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[2], w_fp[16], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -6836,7 +6836,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 347 - VVV1_0( w_fp[92], w_fp[68], w_fp[5], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[92], w_fp[68], w_fp[5], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -6855,7 +6855,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 348 - VVV1_0( w_fp[92], w_fp[1], w_fp[16], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[92], w_fp[1], w_fp[16], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -6874,7 +6874,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 349 - VVVV1_0( w_fp[1], w_fp[27], w_fp[5], w_fp[92], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[1], w_fp[27], w_fp[5], w_fp[92], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -6886,7 +6886,7 @@ namespace mg5amcCpu jamp_sv[89] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[95] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[111] -= cxtype( 0, 1 ) * amp_sv[0]; - VVVV3_0( w_fp[1], w_fp[27], w_fp[5], w_fp[92], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[1], w_fp[27], w_fp[5], w_fp[92], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -6898,7 +6898,7 @@ namespace mg5amcCpu jamp_sv[83] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[111] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[113] += cxtype( 0, 1 ) * amp_sv[0]; - VVVV4_0( w_fp[1], w_fp[27], w_fp[5], w_fp[92], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[1], w_fp[27], w_fp[5], w_fp[92], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -6917,7 +6917,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 350 - FFV1_0( w_fp[86], w_fp[2], w_fp[68], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[86], w_fp[2], w_fp[68], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -6932,7 +6932,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 351 - FFV1_0( w_fp[86], w_fp[15], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[86], w_fp[15], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -6945,7 +6945,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 352 - FFV1_0( w_fp[99], w_fp[18], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[18], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -6958,7 +6958,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 353 - FFV1_0( w_fp[99], w_fp[2], w_fp[19], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[2], w_fp[19], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -6973,7 +6973,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 354 - VVV1_0( w_fp[92], w_fp[67], w_fp[4], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[92], w_fp[67], w_fp[4], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -6992,7 +6992,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 355 - VVV1_0( w_fp[92], w_fp[1], w_fp[19], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[92], w_fp[1], w_fp[19], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -7011,7 +7011,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 356 - VVVV1_0( w_fp[1], w_fp[4], w_fp[29], w_fp[92], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[1], w_fp[4], w_fp[29], w_fp[92], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -7023,7 +7023,7 @@ namespace mg5amcCpu jamp_sv[95] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[117] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[119] += cxtype( 0, 1 ) * amp_sv[0]; - VVVV3_0( w_fp[1], w_fp[4], w_fp[29], w_fp[92], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[1], w_fp[4], w_fp[29], w_fp[92], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -7035,7 +7035,7 @@ namespace mg5amcCpu jamp_sv[71] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[93] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[117] -= cxtype( 0, 1 ) * amp_sv[0]; - VVVV4_0( w_fp[1], w_fp[4], w_fp[29], w_fp[92], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[1], w_fp[4], w_fp[29], w_fp[92], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -7054,7 +7054,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 357 - FFV1_0( w_fp[34], w_fp[2], w_fp[67], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[34], w_fp[2], w_fp[67], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -7069,7 +7069,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 358 - FFV1_0( w_fp[34], w_fp[18], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[34], w_fp[18], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -7082,7 +7082,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 359 - VVV1_0( w_fp[73], w_fp[6], w_fp[92], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[73], w_fp[6], w_fp[92], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -7094,7 +7094,7 @@ namespace mg5amcCpu jamp_sv[107] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[113] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[119] += cxtype( 0, 1 ) * amp_sv[0]; - VVV1_0( w_fp[79], w_fp[6], w_fp[92], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[79], w_fp[6], w_fp[92], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -7106,7 +7106,7 @@ namespace mg5amcCpu jamp_sv[111] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[113] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[117] += cxtype( 0, 1 ) * amp_sv[0]; - VVV1_0( w_fp[80], w_fp[6], w_fp[92], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[80], w_fp[6], w_fp[92], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -7125,7 +7125,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 360 - FFV1_0( w_fp[88], w_fp[2], w_fp[73], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[88], w_fp[2], w_fp[73], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -7133,7 +7133,7 @@ namespace mg5amcCpu jamp_sv[39] -= amp_sv[0]; jamp_sv[63] -= amp_sv[0]; jamp_sv[87] += amp_sv[0]; - FFV1_0( w_fp[88], w_fp[2], w_fp[79], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[88], w_fp[2], w_fp[79], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -7141,7 +7141,7 @@ namespace mg5amcCpu jamp_sv[57] += amp_sv[0]; jamp_sv[63] -= amp_sv[0]; jamp_sv[81] += amp_sv[0]; - FFV1_0( w_fp[88], w_fp[2], w_fp[80], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[88], w_fp[2], w_fp[80], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -7156,7 +7156,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 361 - FFV1_0( w_fp[62], w_fp[47], w_fp[73], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[62], w_fp[47], w_fp[73], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -7164,7 +7164,7 @@ namespace mg5amcCpu jamp_sv[107] -= amp_sv[0]; jamp_sv[113] -= amp_sv[0]; jamp_sv[119] += amp_sv[0]; - FFV1_0( w_fp[62], w_fp[47], w_fp[79], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[62], w_fp[47], w_fp[79], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -7172,7 +7172,7 @@ namespace mg5amcCpu jamp_sv[111] += amp_sv[0]; jamp_sv[113] -= amp_sv[0]; jamp_sv[117] += amp_sv[0]; - FFV1_0( w_fp[62], w_fp[47], w_fp[80], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[62], w_fp[47], w_fp[80], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -7187,7 +7187,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 362 - VVV1_0( w_fp[57], w_fp[5], w_fp[92], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[57], w_fp[5], w_fp[92], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -7199,7 +7199,7 @@ namespace mg5amcCpu jamp_sv[89] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[95] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[111] -= cxtype( 0, 1 ) * amp_sv[0]; - VVV1_0( w_fp[81], w_fp[5], w_fp[92], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[81], w_fp[5], w_fp[92], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -7211,7 +7211,7 @@ namespace mg5amcCpu jamp_sv[89] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[93] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[105] -= cxtype( 0, 1 ) * amp_sv[0]; - VVV1_0( w_fp[82], w_fp[5], w_fp[92], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[82], w_fp[5], w_fp[92], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -7230,7 +7230,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 363 - FFV1_0( w_fp[86], w_fp[2], w_fp[57], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[86], w_fp[2], w_fp[57], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -7238,7 +7238,7 @@ namespace mg5amcCpu jamp_sv[45] -= amp_sv[0]; jamp_sv[69] -= amp_sv[0]; jamp_sv[111] += amp_sv[0]; - FFV1_0( w_fp[86], w_fp[2], w_fp[81], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[86], w_fp[2], w_fp[81], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -7246,7 +7246,7 @@ namespace mg5amcCpu jamp_sv[59] += amp_sv[0]; jamp_sv[69] -= amp_sv[0]; jamp_sv[105] += amp_sv[0]; - FFV1_0( w_fp[86], w_fp[2], w_fp[82], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[86], w_fp[2], w_fp[82], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -7261,7 +7261,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 364 - FFV1_0( w_fp[62], w_fp[39], w_fp[57], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[62], w_fp[39], w_fp[57], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -7269,7 +7269,7 @@ namespace mg5amcCpu jamp_sv[83] -= amp_sv[0]; jamp_sv[89] -= amp_sv[0]; jamp_sv[95] += amp_sv[0]; - FFV1_0( w_fp[62], w_fp[39], w_fp[81], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[62], w_fp[39], w_fp[81], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -7277,7 +7277,7 @@ namespace mg5amcCpu jamp_sv[87] += amp_sv[0]; jamp_sv[89] -= amp_sv[0]; jamp_sv[93] += amp_sv[0]; - FFV1_0( w_fp[62], w_fp[39], w_fp[82], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[62], w_fp[39], w_fp[82], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -7292,7 +7292,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 365 - VVV1_0( w_fp[55], w_fp[4], w_fp[92], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[55], w_fp[4], w_fp[92], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -7304,7 +7304,7 @@ namespace mg5amcCpu jamp_sv[71] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[93] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[117] -= cxtype( 0, 1 ) * amp_sv[0]; - VVV1_0( w_fp[83], w_fp[4], w_fp[92], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[83], w_fp[4], w_fp[92], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -7316,7 +7316,7 @@ namespace mg5amcCpu jamp_sv[83] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[93] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[107] -= cxtype( 0, 1 ) * amp_sv[0]; - VVV1_0( w_fp[84], w_fp[4], w_fp[92], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[84], w_fp[4], w_fp[92], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -7335,7 +7335,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 366 - FFV1_0( w_fp[34], w_fp[2], w_fp[55], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[34], w_fp[2], w_fp[55], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -7343,7 +7343,7 @@ namespace mg5amcCpu jamp_sv[47] -= amp_sv[0]; jamp_sv[93] -= amp_sv[0]; jamp_sv[117] += amp_sv[0]; - FFV1_0( w_fp[34], w_fp[2], w_fp[83], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[34], w_fp[2], w_fp[83], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -7351,7 +7351,7 @@ namespace mg5amcCpu jamp_sv[83] += amp_sv[0]; jamp_sv[93] -= amp_sv[0]; jamp_sv[107] += amp_sv[0]; - FFV1_0( w_fp[34], w_fp[2], w_fp[84], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[34], w_fp[2], w_fp[84], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -7366,7 +7366,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 367 - FFV1_0( w_fp[62], w_fp[33], w_fp[55], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[62], w_fp[33], w_fp[55], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -7374,7 +7374,7 @@ namespace mg5amcCpu jamp_sv[59] -= amp_sv[0]; jamp_sv[65] -= amp_sv[0]; jamp_sv[71] += amp_sv[0]; - FFV1_0( w_fp[62], w_fp[33], w_fp[83], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[62], w_fp[33], w_fp[83], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -7382,7 +7382,7 @@ namespace mg5amcCpu jamp_sv[63] += amp_sv[0]; jamp_sv[65] -= amp_sv[0]; jamp_sv[69] += amp_sv[0]; - FFV1_0( w_fp[62], w_fp[33], w_fp[84], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[62], w_fp[33], w_fp[84], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -7397,7 +7397,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 368 - FFV1_0( w_fp[99], w_fp[2], w_fp[30], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[2], w_fp[30], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -7405,7 +7405,7 @@ namespace mg5amcCpu jamp_sv[71] -= amp_sv[0]; jamp_sv[95] -= amp_sv[0]; jamp_sv[119] += amp_sv[0]; - FFV1_0( w_fp[99], w_fp[2], w_fp[31], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[2], w_fp[31], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -7413,7 +7413,7 @@ namespace mg5amcCpu jamp_sv[89] += amp_sv[0]; jamp_sv[95] -= amp_sv[0]; jamp_sv[113] += amp_sv[0]; - FFV1_0( w_fp[99], w_fp[2], w_fp[32], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[2], w_fp[32], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -7428,7 +7428,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 369 - VVV1_0( w_fp[1], w_fp[30], w_fp[92], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[30], w_fp[92], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -7440,7 +7440,7 @@ namespace mg5amcCpu jamp_sv[71] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[95] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[119] += cxtype( 0, 1 ) * amp_sv[0]; - VVV1_0( w_fp[1], w_fp[31], w_fp[92], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[31], w_fp[92], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -7452,7 +7452,7 @@ namespace mg5amcCpu jamp_sv[89] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[95] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[113] += cxtype( 0, 1 ) * amp_sv[0]; - VVV1_0( w_fp[1], w_fp[32], w_fp[92], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[32], w_fp[92], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -7468,11 +7468,11 @@ namespace mg5amcCpu // *** DIAGRAM 370 OF 1240 *** // Wavefunction(s) for diagram number 370 - VVV1P0_1( w_fp[0], w_fp[4], COUPs[0], 0., 0., w_fp[92] ); - FFV1_2( w_fp[3], w_fp[92], COUPs[1], cIPD[0], cIPD[1], w_fp[99] ); + VVV1P0_1( w_fp[0], w_fp[4], COUPs[0], 1.0, 0., 0., w_fp[92] ); + FFV1_2( w_fp[3], w_fp[92], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[99] ); // Amplitude(s) for diagram number 370 - FFV1_0( w_fp[99], w_fp[9], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[9], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -7485,7 +7485,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 371 - FFV1_0( w_fp[99], w_fp[85], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[85], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -7495,11 +7495,11 @@ namespace mg5amcCpu // *** DIAGRAM 372 OF 1240 *** // Wavefunction(s) for diagram number 372 - VVV1P0_1( w_fp[92], w_fp[5], COUPs[0], 0., 0., w_fp[62] ); - FFV1P0_3( w_fp[3], w_fp[77], COUPs[1], 0., 0., w_fp[34] ); + VVV1P0_1( w_fp[92], w_fp[5], COUPs[0], 1.0, 0., 0., w_fp[62] ); + FFV1P0_3( w_fp[3], w_fp[77], COUPs[1], 1.0, 0., 0., w_fp[34] ); // Amplitude(s) for diagram number 372 - VVV1_0( w_fp[62], w_fp[34], w_fp[6], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[62], w_fp[34], w_fp[6], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -7518,7 +7518,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 373 - FFV1_0( w_fp[3], w_fp[85], w_fp[62], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[85], w_fp[62], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -7530,10 +7530,10 @@ namespace mg5amcCpu // *** DIAGRAM 374 OF 1240 *** // Wavefunction(s) for diagram number 374 - VVV1P0_1( w_fp[92], w_fp[6], COUPs[0], 0., 0., w_fp[86] ); + VVV1P0_1( w_fp[92], w_fp[6], COUPs[0], 1.0, 0., 0., w_fp[86] ); // Amplitude(s) for diagram number 374 - VVV1_0( w_fp[86], w_fp[34], w_fp[5], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[86], w_fp[34], w_fp[5], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -7552,7 +7552,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 375 - FFV1_0( w_fp[3], w_fp[9], w_fp[86], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[9], w_fp[86], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -7564,12 +7564,12 @@ namespace mg5amcCpu // *** DIAGRAM 376 OF 1240 *** // Wavefunction(s) for diagram number 376 - VVVV1P0_1( w_fp[92], w_fp[5], w_fp[6], COUPs[2], 0., 0., w_fp[88] ); - VVVV3P0_1( w_fp[92], w_fp[5], w_fp[6], COUPs[2], 0., 0., w_fp[90] ); - VVVV4P0_1( w_fp[92], w_fp[5], w_fp[6], COUPs[2], 0., 0., w_fp[96] ); + VVVV1P0_1( w_fp[92], w_fp[5], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[88] ); + VVVV3P0_1( w_fp[92], w_fp[5], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[90] ); + VVVV4P0_1( w_fp[92], w_fp[5], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[96] ); // Amplitude(s) for diagram number 376 - FFV1_0( w_fp[3], w_fp[77], w_fp[88], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[77], w_fp[88], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -7581,7 +7581,7 @@ namespace mg5amcCpu jamp_sv[41] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[46] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[47] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[77], w_fp[90], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[77], w_fp[90], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -7593,7 +7593,7 @@ namespace mg5amcCpu jamp_sv[41] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[42] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[44] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[77], w_fp[96], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[77], w_fp[96], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -7609,10 +7609,10 @@ namespace mg5amcCpu // *** DIAGRAM 377 OF 1240 *** // Wavefunction(s) for diagram number 377 - FFV1_1( w_fp[77], w_fp[92], COUPs[1], cIPD[0], cIPD[1], w_fp[95] ); + FFV1_1( w_fp[77], w_fp[92], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[95] ); // Amplitude(s) for diagram number 377 - FFV1_0( w_fp[38], w_fp[95], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[95], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -7622,10 +7622,10 @@ namespace mg5amcCpu // *** DIAGRAM 378 OF 1240 *** // Wavefunction(s) for diagram number 378 - FFV1_2( w_fp[38], w_fp[92], COUPs[1], cIPD[0], cIPD[1], w_fp[98] ); + FFV1_2( w_fp[38], w_fp[92], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[98] ); // Amplitude(s) for diagram number 378 - FFV1_0( w_fp[98], w_fp[77], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[98], w_fp[77], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -7638,7 +7638,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 379 - FFV1_0( w_fp[38], w_fp[77], w_fp[86], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[77], w_fp[86], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -7653,7 +7653,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 380 - FFV1_0( w_fp[41], w_fp[95], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[95], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -7663,10 +7663,10 @@ namespace mg5amcCpu // *** DIAGRAM 381 OF 1240 *** // Wavefunction(s) for diagram number 381 - FFV1_2( w_fp[41], w_fp[92], COUPs[1], cIPD[0], cIPD[1], w_fp[101] ); + FFV1_2( w_fp[41], w_fp[92], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[101] ); // Amplitude(s) for diagram number 381 - FFV1_0( w_fp[101], w_fp[77], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[101], w_fp[77], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -7679,7 +7679,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 382 - FFV1_0( w_fp[41], w_fp[77], w_fp[62], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[77], w_fp[62], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -7694,7 +7694,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 383 - FFV1_0( w_fp[3], w_fp[95], w_fp[29], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[95], w_fp[29], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -7709,7 +7709,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 384 - FFV1_0( w_fp[99], w_fp[77], w_fp[29], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[77], w_fp[29], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -7721,10 +7721,10 @@ namespace mg5amcCpu // *** DIAGRAM 385 OF 1240 *** // Wavefunction(s) for diagram number 385 - VVV1P0_1( w_fp[92], w_fp[29], COUPs[0], 0., 0., w_fp[95] ); + VVV1P0_1( w_fp[92], w_fp[29], COUPs[0], 1.0, 0., 0., w_fp[95] ); // Amplitude(s) for diagram number 385 - FFV1_0( w_fp[3], w_fp[77], w_fp[95], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[77], w_fp[95], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -7740,10 +7740,10 @@ namespace mg5amcCpu // *** DIAGRAM 386 OF 1240 *** // Wavefunction(s) for diagram number 386 - FFV1_1( w_fp[2], w_fp[92], COUPs[1], cIPD[0], cIPD[1], w_fp[102] ); + FFV1_1( w_fp[2], w_fp[92], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[102] ); // Amplitude(s) for diagram number 386 - FFV1_0( w_fp[22], w_fp[102], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[22], w_fp[102], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -7756,7 +7756,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 387 - FFV1_0( w_fp[21], w_fp[102], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[21], w_fp[102], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -7766,10 +7766,10 @@ namespace mg5amcCpu // *** DIAGRAM 388 OF 1240 *** // Wavefunction(s) for diagram number 388 - FFV1P0_3( w_fp[52], w_fp[2], COUPs[1], 0., 0., w_fp[103] ); + FFV1P0_3( w_fp[52], w_fp[2], COUPs[1], 1.0, 0., 0., w_fp[103] ); // Amplitude(s) for diagram number 388 - VVV1_0( w_fp[62], w_fp[103], w_fp[6], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[62], w_fp[103], w_fp[6], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -7788,7 +7788,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 389 - FFV1_0( w_fp[21], w_fp[2], w_fp[62], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[21], w_fp[2], w_fp[62], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -7803,7 +7803,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 390 - VVV1_0( w_fp[86], w_fp[103], w_fp[5], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[86], w_fp[103], w_fp[5], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -7822,7 +7822,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 391 - FFV1_0( w_fp[22], w_fp[2], w_fp[86], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[22], w_fp[2], w_fp[86], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -7837,7 +7837,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 392 - FFV1_0( w_fp[52], w_fp[2], w_fp[88], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[2], w_fp[88], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -7849,7 +7849,7 @@ namespace mg5amcCpu jamp_sv[94] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[115] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[118] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[52], w_fp[2], w_fp[90], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[2], w_fp[90], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -7861,7 +7861,7 @@ namespace mg5amcCpu jamp_sv[94] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[99] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[109] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[52], w_fp[2], w_fp[96], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[2], w_fp[96], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -7877,10 +7877,10 @@ namespace mg5amcCpu // *** DIAGRAM 393 OF 1240 *** // Wavefunction(s) for diagram number 393 - FFV1_2( w_fp[52], w_fp[92], COUPs[1], cIPD[0], cIPD[1], w_fp[104] ); + FFV1_2( w_fp[52], w_fp[92], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[104] ); // Amplitude(s) for diagram number 393 - FFV1_0( w_fp[104], w_fp[39], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[104], w_fp[39], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -7890,10 +7890,10 @@ namespace mg5amcCpu // *** DIAGRAM 394 OF 1240 *** // Wavefunction(s) for diagram number 394 - FFV1_1( w_fp[39], w_fp[92], COUPs[1], cIPD[0], cIPD[1], w_fp[105] ); + FFV1_1( w_fp[39], w_fp[92], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[105] ); // Amplitude(s) for diagram number 394 - FFV1_0( w_fp[52], w_fp[105], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[105], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -7906,7 +7906,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 395 - FFV1_0( w_fp[52], w_fp[39], w_fp[86], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[39], w_fp[86], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -7921,7 +7921,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 396 - FFV1_0( w_fp[104], w_fp[47], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[104], w_fp[47], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -7931,10 +7931,10 @@ namespace mg5amcCpu // *** DIAGRAM 397 OF 1240 *** // Wavefunction(s) for diagram number 397 - FFV1_1( w_fp[47], w_fp[92], COUPs[1], cIPD[0], cIPD[1], w_fp[106] ); + FFV1_1( w_fp[47], w_fp[92], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[106] ); // Amplitude(s) for diagram number 397 - FFV1_0( w_fp[52], w_fp[106], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[106], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -7947,7 +7947,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 398 - FFV1_0( w_fp[52], w_fp[47], w_fp[62], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[47], w_fp[62], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -7962,7 +7962,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 399 - FFV1_0( w_fp[104], w_fp[2], w_fp[29], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[104], w_fp[2], w_fp[29], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -7977,7 +7977,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 400 - FFV1_0( w_fp[52], w_fp[102], w_fp[29], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[102], w_fp[29], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -7992,7 +7992,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 401 - FFV1_0( w_fp[52], w_fp[2], w_fp[95], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[2], w_fp[95], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -8011,7 +8011,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 402 - FFV1_0( w_fp[71], w_fp[102], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[71], w_fp[102], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -8026,7 +8026,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 403 - FFV1_0( w_fp[3], w_fp[102], w_fp[70], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[102], w_fp[70], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -8045,7 +8045,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 404 - FFV1_0( w_fp[99], w_fp[94], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[94], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -8060,7 +8060,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 405 - FFV1_0( w_fp[99], w_fp[2], w_fp[70], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[2], w_fp[70], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -8079,7 +8079,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 406 - FFV1_0( w_fp[3], w_fp[94], w_fp[86], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[94], w_fp[86], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -8098,7 +8098,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 407 - FFV1_0( w_fp[71], w_fp[2], w_fp[86], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[71], w_fp[2], w_fp[86], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -8117,7 +8117,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 408 - VVVV1_0( w_fp[92], w_fp[66], w_fp[8], w_fp[6], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[92], w_fp[66], w_fp[8], w_fp[6], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -8137,7 +8137,7 @@ namespace mg5amcCpu jamp_sv[109] -= amp_sv[0]; jamp_sv[116] -= amp_sv[0]; jamp_sv[117] += amp_sv[0]; - VVVV3_0( w_fp[92], w_fp[66], w_fp[8], w_fp[6], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[92], w_fp[66], w_fp[8], w_fp[6], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -8157,7 +8157,7 @@ namespace mg5amcCpu jamp_sv[107] -= amp_sv[0]; jamp_sv[116] -= amp_sv[0]; jamp_sv[117] += amp_sv[0]; - VVVV4_0( w_fp[92], w_fp[66], w_fp[8], w_fp[6], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[92], w_fp[66], w_fp[8], w_fp[6], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -8181,10 +8181,10 @@ namespace mg5amcCpu // *** DIAGRAM 409 OF 1240 *** // Wavefunction(s) for diagram number 409 - VVV1P0_1( w_fp[92], w_fp[66], COUPs[0], 0., 0., w_fp[104] ); + VVV1P0_1( w_fp[92], w_fp[66], COUPs[0], 1.0, 0., 0., w_fp[104] ); // Amplitude(s) for diagram number 409 - VVV1_0( w_fp[8], w_fp[6], w_fp[104], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[6], w_fp[104], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -8208,10 +8208,10 @@ namespace mg5amcCpu // *** DIAGRAM 410 OF 1240 *** // Wavefunction(s) for diagram number 410 - VVV1P0_1( w_fp[92], w_fp[8], COUPs[0], 0., 0., w_fp[107] ); + VVV1P0_1( w_fp[92], w_fp[8], COUPs[0], 1.0, 0., 0., w_fp[107] ); // Amplitude(s) for diagram number 410 - VVV1_0( w_fp[66], w_fp[6], w_fp[107], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[66], w_fp[6], w_fp[107], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -8238,7 +8238,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 411 - VVV1_0( w_fp[66], w_fp[8], w_fp[86], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[66], w_fp[8], w_fp[86], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -8265,7 +8265,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 412 - FFV1_0( w_fp[3], w_fp[47], w_fp[104], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[47], w_fp[104], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -8284,7 +8284,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 413 - FFV1_0( w_fp[3], w_fp[106], w_fp[66], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[106], w_fp[66], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -8299,7 +8299,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 414 - FFV1_0( w_fp[99], w_fp[47], w_fp[66], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[47], w_fp[66], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -8314,7 +8314,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 415 - FFV1_0( w_fp[41], w_fp[2], w_fp[104], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[2], w_fp[104], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -8333,7 +8333,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 416 - FFV1_0( w_fp[41], w_fp[102], w_fp[66], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[102], w_fp[66], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -8348,7 +8348,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 417 - FFV1_0( w_fp[101], w_fp[2], w_fp[66], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[101], w_fp[2], w_fp[66], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -8363,7 +8363,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 418 - FFV1_0( w_fp[76], w_fp[102], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[76], w_fp[102], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -8378,7 +8378,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 419 - FFV1_0( w_fp[3], w_fp[102], w_fp[75], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[102], w_fp[75], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -8397,7 +8397,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 420 - FFV1_0( w_fp[99], w_fp[97], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[97], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -8412,7 +8412,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 421 - FFV1_0( w_fp[99], w_fp[2], w_fp[75], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[2], w_fp[75], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -8431,7 +8431,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 422 - FFV1_0( w_fp[3], w_fp[97], w_fp[62], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[97], w_fp[62], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -8450,7 +8450,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 423 - FFV1_0( w_fp[76], w_fp[2], w_fp[62], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[76], w_fp[2], w_fp[62], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -8469,7 +8469,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 424 - VVVV1_0( w_fp[92], w_fp[72], w_fp[8], w_fp[5], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[92], w_fp[72], w_fp[8], w_fp[5], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -8489,7 +8489,7 @@ namespace mg5amcCpu jamp_sv[93] += amp_sv[0]; jamp_sv[102] += amp_sv[0]; jamp_sv[104] -= amp_sv[0]; - VVVV3_0( w_fp[92], w_fp[72], w_fp[8], w_fp[5], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[92], w_fp[72], w_fp[8], w_fp[5], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -8509,7 +8509,7 @@ namespace mg5amcCpu jamp_sv[93] += amp_sv[0]; jamp_sv[106] += amp_sv[0]; jamp_sv[107] -= amp_sv[0]; - VVVV4_0( w_fp[92], w_fp[72], w_fp[8], w_fp[5], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[92], w_fp[72], w_fp[8], w_fp[5], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -8533,10 +8533,10 @@ namespace mg5amcCpu // *** DIAGRAM 425 OF 1240 *** // Wavefunction(s) for diagram number 425 - VVV1P0_1( w_fp[92], w_fp[72], COUPs[0], 0., 0., w_fp[104] ); + VVV1P0_1( w_fp[92], w_fp[72], COUPs[0], 1.0, 0., 0., w_fp[104] ); // Amplitude(s) for diagram number 425 - VVV1_0( w_fp[8], w_fp[5], w_fp[104], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[5], w_fp[104], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -8563,7 +8563,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 426 - VVV1_0( w_fp[72], w_fp[5], w_fp[107], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[72], w_fp[5], w_fp[107], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -8590,7 +8590,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 427 - VVV1_0( w_fp[72], w_fp[8], w_fp[62], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[72], w_fp[8], w_fp[62], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -8617,7 +8617,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 428 - FFV1_0( w_fp[3], w_fp[39], w_fp[104], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[39], w_fp[104], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -8636,7 +8636,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 429 - FFV1_0( w_fp[3], w_fp[105], w_fp[72], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[105], w_fp[72], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -8651,7 +8651,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 430 - FFV1_0( w_fp[99], w_fp[39], w_fp[72], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[39], w_fp[72], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -8666,7 +8666,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 431 - FFV1_0( w_fp[38], w_fp[2], w_fp[104], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[2], w_fp[104], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -8685,7 +8685,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 432 - FFV1_0( w_fp[38], w_fp[102], w_fp[72], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[102], w_fp[72], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -8700,7 +8700,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 433 - FFV1_0( w_fp[98], w_fp[2], w_fp[72], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[98], w_fp[2], w_fp[72], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -8712,10 +8712,10 @@ namespace mg5amcCpu // *** DIAGRAM 434 OF 1240 *** // Wavefunction(s) for diagram number 434 - VVV1P0_1( w_fp[92], w_fp[1], COUPs[0], 0., 0., w_fp[104] ); + VVV1P0_1( w_fp[92], w_fp[1], COUPs[0], 1.0, 0., 0., w_fp[104] ); // Amplitude(s) for diagram number 434 - VVV1_0( w_fp[104], w_fp[10], w_fp[6], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[104], w_fp[10], w_fp[6], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -8742,7 +8742,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 435 - VVV1_0( w_fp[104], w_fp[11], w_fp[5], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[104], w_fp[11], w_fp[5], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -8769,7 +8769,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 436 - VVVV1_0( w_fp[8], w_fp[5], w_fp[6], w_fp[104], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[8], w_fp[5], w_fp[6], w_fp[104], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -8789,7 +8789,7 @@ namespace mg5amcCpu jamp_sv[102] -= amp_sv[0]; jamp_sv[104] += amp_sv[0]; jamp_sv[108] -= amp_sv[0]; - VVVV3_0( w_fp[8], w_fp[5], w_fp[6], w_fp[104], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[8], w_fp[5], w_fp[6], w_fp[104], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -8809,7 +8809,7 @@ namespace mg5amcCpu jamp_sv[116] += amp_sv[0]; jamp_sv[117] -= amp_sv[0]; jamp_sv[118] += amp_sv[0]; - VVVV4_0( w_fp[8], w_fp[5], w_fp[6], w_fp[104], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[8], w_fp[5], w_fp[6], w_fp[104], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -8833,10 +8833,10 @@ namespace mg5amcCpu // *** DIAGRAM 437 OF 1240 *** // Wavefunction(s) for diagram number 437 - VVV1P0_1( w_fp[1], w_fp[8], COUPs[0], 0., 0., w_fp[108] ); + VVV1P0_1( w_fp[1], w_fp[8], COUPs[0], 1.0, 0., 0., w_fp[108] ); // Amplitude(s) for diagram number 437 - VVV1_0( w_fp[62], w_fp[108], w_fp[6], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[62], w_fp[108], w_fp[6], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -8863,7 +8863,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 438 - VVV1_0( w_fp[62], w_fp[1], w_fp[11], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[62], w_fp[1], w_fp[11], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -8890,7 +8890,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 439 - VVVV1_0( w_fp[1], w_fp[8], w_fp[6], w_fp[62], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[1], w_fp[8], w_fp[6], w_fp[62], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -8910,7 +8910,7 @@ namespace mg5amcCpu jamp_sv[109] += amp_sv[0]; jamp_sv[115] += amp_sv[0]; jamp_sv[118] -= amp_sv[0]; - VVVV3_0( w_fp[1], w_fp[8], w_fp[6], w_fp[62], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[1], w_fp[8], w_fp[6], w_fp[62], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -8930,7 +8930,7 @@ namespace mg5amcCpu jamp_sv[104] += amp_sv[0]; jamp_sv[106] += amp_sv[0]; jamp_sv[107] -= amp_sv[0]; - VVVV4_0( w_fp[1], w_fp[8], w_fp[6], w_fp[62], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[1], w_fp[8], w_fp[6], w_fp[62], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -8957,7 +8957,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 440 - VVV1_0( w_fp[86], w_fp[108], w_fp[5], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[86], w_fp[108], w_fp[5], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -8984,7 +8984,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 441 - VVV1_0( w_fp[86], w_fp[1], w_fp[10], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[86], w_fp[1], w_fp[10], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -9011,7 +9011,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 442 - VVVV1_0( w_fp[1], w_fp[8], w_fp[5], w_fp[86], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[1], w_fp[8], w_fp[5], w_fp[86], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -9031,7 +9031,7 @@ namespace mg5amcCpu jamp_sv[94] -= amp_sv[0]; jamp_sv[99] -= amp_sv[0]; jamp_sv[109] += amp_sv[0]; - VVVV3_0( w_fp[1], w_fp[8], w_fp[5], w_fp[86], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[1], w_fp[8], w_fp[5], w_fp[86], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -9051,7 +9051,7 @@ namespace mg5amcCpu jamp_sv[99] -= amp_sv[0]; jamp_sv[108] -= amp_sv[0]; jamp_sv[109] += amp_sv[0]; - VVVV4_0( w_fp[1], w_fp[8], w_fp[5], w_fp[86], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[1], w_fp[8], w_fp[5], w_fp[86], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -9075,12 +9075,12 @@ namespace mg5amcCpu // *** DIAGRAM 443 OF 1240 *** // Wavefunction(s) for diagram number 443 - VVVV1P0_1( w_fp[92], w_fp[1], w_fp[5], COUPs[2], 0., 0., w_fp[109] ); - VVVV3P0_1( w_fp[92], w_fp[1], w_fp[5], COUPs[2], 0., 0., w_fp[110] ); - VVVV4P0_1( w_fp[92], w_fp[1], w_fp[5], COUPs[2], 0., 0., w_fp[111] ); + VVVV1P0_1( w_fp[92], w_fp[1], w_fp[5], COUPs[2], 1.0, 0., 0., w_fp[109] ); + VVVV3P0_1( w_fp[92], w_fp[1], w_fp[5], COUPs[2], 1.0, 0., 0., w_fp[110] ); + VVVV4P0_1( w_fp[92], w_fp[1], w_fp[5], COUPs[2], 1.0, 0., 0., w_fp[111] ); // Amplitude(s) for diagram number 443 - VVV1_0( w_fp[8], w_fp[6], w_fp[109], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[6], w_fp[109], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -9100,7 +9100,7 @@ namespace mg5amcCpu jamp_sv[109] -= amp_sv[0]; jamp_sv[116] -= amp_sv[0]; jamp_sv[117] += amp_sv[0]; - VVV1_0( w_fp[8], w_fp[6], w_fp[110], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[6], w_fp[110], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -9120,7 +9120,7 @@ namespace mg5amcCpu jamp_sv[109] -= amp_sv[0]; jamp_sv[115] -= amp_sv[0]; jamp_sv[118] += amp_sv[0]; - VVV1_0( w_fp[8], w_fp[6], w_fp[111], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[6], w_fp[111], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -9144,12 +9144,12 @@ namespace mg5amcCpu // *** DIAGRAM 444 OF 1240 *** // Wavefunction(s) for diagram number 444 - VVVV1P0_1( w_fp[92], w_fp[1], w_fp[6], COUPs[2], 0., 0., w_fp[112] ); - VVVV3P0_1( w_fp[92], w_fp[1], w_fp[6], COUPs[2], 0., 0., w_fp[113] ); - VVVV4P0_1( w_fp[92], w_fp[1], w_fp[6], COUPs[2], 0., 0., w_fp[114] ); + VVVV1P0_1( w_fp[92], w_fp[1], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[112] ); + VVVV3P0_1( w_fp[92], w_fp[1], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[113] ); + VVVV4P0_1( w_fp[92], w_fp[1], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[114] ); // Amplitude(s) for diagram number 444 - VVV1_0( w_fp[8], w_fp[5], w_fp[112], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[5], w_fp[112], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -9169,7 +9169,7 @@ namespace mg5amcCpu jamp_sv[93] += amp_sv[0]; jamp_sv[102] += amp_sv[0]; jamp_sv[104] -= amp_sv[0]; - VVV1_0( w_fp[8], w_fp[5], w_fp[113], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[5], w_fp[113], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -9189,7 +9189,7 @@ namespace mg5amcCpu jamp_sv[94] += amp_sv[0]; jamp_sv[98] += amp_sv[0]; jamp_sv[108] -= amp_sv[0]; - VVV1_0( w_fp[8], w_fp[5], w_fp[114], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[5], w_fp[114], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -9216,7 +9216,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 445 - VVV1_0( w_fp[1], w_fp[8], w_fp[88], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[8], w_fp[88], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -9236,7 +9236,7 @@ namespace mg5amcCpu jamp_sv[94] -= amp_sv[0]; jamp_sv[115] -= amp_sv[0]; jamp_sv[118] += amp_sv[0]; - VVV1_0( w_fp[1], w_fp[8], w_fp[90], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[8], w_fp[90], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -9256,7 +9256,7 @@ namespace mg5amcCpu jamp_sv[94] -= amp_sv[0]; jamp_sv[99] -= amp_sv[0]; jamp_sv[109] += amp_sv[0]; - VVV1_0( w_fp[1], w_fp[8], w_fp[96], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[8], w_fp[96], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -9283,7 +9283,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 446 - VVVV1_0( w_fp[92], w_fp[1], w_fp[8], w_fp[29], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[92], w_fp[1], w_fp[8], w_fp[29], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -9303,7 +9303,7 @@ namespace mg5amcCpu jamp_sv[116] -= amp_sv[0]; jamp_sv[117] += amp_sv[0]; jamp_sv[118] -= amp_sv[0]; - VVVV3_0( w_fp[92], w_fp[1], w_fp[8], w_fp[29], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[92], w_fp[1], w_fp[8], w_fp[29], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -9323,7 +9323,7 @@ namespace mg5amcCpu jamp_sv[93] -= amp_sv[0]; jamp_sv[116] -= amp_sv[0]; jamp_sv[117] += amp_sv[0]; - VVVV4_0( w_fp[92], w_fp[1], w_fp[8], w_fp[29], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[92], w_fp[1], w_fp[8], w_fp[29], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -9350,7 +9350,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 447 - VVV1_0( w_fp[8], w_fp[29], w_fp[104], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[29], w_fp[104], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -9377,7 +9377,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 448 - VVV1_0( w_fp[1], w_fp[29], w_fp[107], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[29], w_fp[107], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -9404,7 +9404,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 449 - VVV1_0( w_fp[1], w_fp[8], w_fp[95], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[8], w_fp[95], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -9431,7 +9431,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 450 - VVV1_0( w_fp[104], w_fp[45], w_fp[6], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[104], w_fp[45], w_fp[6], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -9450,7 +9450,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 451 - FFV1_0( w_fp[3], w_fp[44], w_fp[104], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[44], w_fp[104], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -9465,7 +9465,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 452 - FFV1_0( w_fp[99], w_fp[89], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[89], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -9478,7 +9478,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 453 - FFV1_0( w_fp[99], w_fp[44], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[44], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -9491,7 +9491,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 454 - FFV1_0( w_fp[3], w_fp[89], w_fp[86], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[89], w_fp[86], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -9506,7 +9506,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 455 - VVV1_0( w_fp[86], w_fp[1], w_fp[45], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[86], w_fp[1], w_fp[45], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -9525,7 +9525,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 456 - FFV1_0( w_fp[3], w_fp[39], w_fp[112], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[39], w_fp[112], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -9537,7 +9537,7 @@ namespace mg5amcCpu jamp_sv[85] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[92] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[93] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[39], w_fp[113], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[39], w_fp[113], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -9549,7 +9549,7 @@ namespace mg5amcCpu jamp_sv[85] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[91] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[94] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[39], w_fp[114], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[39], w_fp[114], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -9568,7 +9568,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 457 - FFV1_0( w_fp[41], w_fp[39], w_fp[104], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[39], w_fp[104], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -9583,7 +9583,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 458 - FFV1_0( w_fp[41], w_fp[105], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[105], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -9596,7 +9596,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 459 - FFV1_0( w_fp[101], w_fp[39], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[101], w_fp[39], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -9609,7 +9609,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 460 - VVV1_0( w_fp[104], w_fp[51], w_fp[5], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[104], w_fp[51], w_fp[5], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -9628,7 +9628,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 461 - FFV1_0( w_fp[3], w_fp[50], w_fp[104], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[50], w_fp[104], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -9643,7 +9643,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 462 - FFV1_0( w_fp[99], w_fp[91], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[91], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -9656,7 +9656,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 463 - FFV1_0( w_fp[99], w_fp[50], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[50], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -9669,7 +9669,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 464 - FFV1_0( w_fp[3], w_fp[91], w_fp[62], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[91], w_fp[62], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -9684,7 +9684,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 465 - VVV1_0( w_fp[62], w_fp[1], w_fp[51], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[62], w_fp[1], w_fp[51], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -9703,7 +9703,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 466 - FFV1_0( w_fp[3], w_fp[47], w_fp[109], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[47], w_fp[109], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -9715,7 +9715,7 @@ namespace mg5amcCpu jamp_sv[109] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[116] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[117] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[47], w_fp[110], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[47], w_fp[110], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -9727,7 +9727,7 @@ namespace mg5amcCpu jamp_sv[109] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[115] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[118] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[47], w_fp[111], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[47], w_fp[111], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -9746,7 +9746,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 467 - FFV1_0( w_fp[38], w_fp[47], w_fp[104], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[47], w_fp[104], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -9761,7 +9761,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 468 - FFV1_0( w_fp[38], w_fp[106], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[106], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -9774,7 +9774,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 469 - FFV1_0( w_fp[98], w_fp[47], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[98], w_fp[47], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -9787,7 +9787,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 470 - VVV1_0( w_fp[104], w_fp[23], w_fp[6], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[104], w_fp[23], w_fp[6], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -9806,7 +9806,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 471 - FFV1_0( w_fp[48], w_fp[2], w_fp[104], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[48], w_fp[2], w_fp[104], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -9821,7 +9821,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 472 - FFV1_0( w_fp[58], w_fp[102], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[58], w_fp[102], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -9834,7 +9834,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 473 - FFV1_0( w_fp[48], w_fp[102], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[48], w_fp[102], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -9847,7 +9847,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 474 - FFV1_0( w_fp[58], w_fp[2], w_fp[86], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[58], w_fp[2], w_fp[86], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -9862,7 +9862,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 475 - VVV1_0( w_fp[86], w_fp[1], w_fp[23], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[86], w_fp[1], w_fp[23], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -9881,7 +9881,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 476 - FFV1_0( w_fp[38], w_fp[2], w_fp[112], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[2], w_fp[112], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -9893,7 +9893,7 @@ namespace mg5amcCpu jamp_sv[52] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[102] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[104] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[38], w_fp[2], w_fp[113], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[2], w_fp[113], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -9905,7 +9905,7 @@ namespace mg5amcCpu jamp_sv[52] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[98] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[108] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[38], w_fp[2], w_fp[114], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[2], w_fp[114], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -9924,7 +9924,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 477 - VVV1_0( w_fp[104], w_fp[20], w_fp[5], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[104], w_fp[20], w_fp[5], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -9943,7 +9943,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 478 - FFV1_0( w_fp[40], w_fp[2], w_fp[104], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[40], w_fp[2], w_fp[104], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -9958,7 +9958,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 479 - FFV1_0( w_fp[60], w_fp[102], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[60], w_fp[102], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -9971,7 +9971,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 480 - FFV1_0( w_fp[40], w_fp[102], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[40], w_fp[102], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -9984,7 +9984,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 481 - FFV1_0( w_fp[60], w_fp[2], w_fp[62], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[60], w_fp[2], w_fp[62], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -9999,7 +9999,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 482 - VVV1_0( w_fp[62], w_fp[1], w_fp[20], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[62], w_fp[1], w_fp[20], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -10018,7 +10018,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 483 - FFV1_0( w_fp[41], w_fp[2], w_fp[109], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[2], w_fp[109], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -10030,7 +10030,7 @@ namespace mg5amcCpu jamp_sv[50] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[78] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[80] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[41], w_fp[2], w_fp[110], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[2], w_fp[110], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -10042,7 +10042,7 @@ namespace mg5amcCpu jamp_sv[50] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[74] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[84] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[41], w_fp[2], w_fp[111], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[2], w_fp[111], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -10061,7 +10061,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 484 - FFV1_0( w_fp[3], w_fp[18], w_fp[104], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[18], w_fp[104], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -10080,7 +10080,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 485 - FFV1_0( w_fp[12], w_fp[2], w_fp[104], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[12], w_fp[2], w_fp[104], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -10099,7 +10099,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 486 - FFV1_0( w_fp[3], w_fp[102], w_fp[67], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[102], w_fp[67], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -10118,7 +10118,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 487 - FFV1_0( w_fp[12], w_fp[102], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[12], w_fp[102], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -10133,7 +10133,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 488 - FFV1_0( w_fp[99], w_fp[2], w_fp[67], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[2], w_fp[67], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -10152,7 +10152,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 489 - FFV1_0( w_fp[99], w_fp[18], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[18], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -10167,7 +10167,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 490 - FFV1_0( w_fp[3], w_fp[102], w_fp[55], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[102], w_fp[55], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -10179,7 +10179,7 @@ namespace mg5amcCpu jamp_sv[49] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[51] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[53] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[102], w_fp[83], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[102], w_fp[83], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -10191,7 +10191,7 @@ namespace mg5amcCpu jamp_sv[50] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[51] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[52] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[102], w_fp[84], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[102], w_fp[84], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -10210,7 +10210,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 491 - FFV1_0( w_fp[99], w_fp[2], w_fp[55], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[2], w_fp[55], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -10222,7 +10222,7 @@ namespace mg5amcCpu jamp_sv[93] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[116] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[117] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[99], w_fp[2], w_fp[83], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[2], w_fp[83], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -10234,7 +10234,7 @@ namespace mg5amcCpu jamp_sv[93] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[106] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[107] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[99], w_fp[2], w_fp[84], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[2], w_fp[84], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -10253,7 +10253,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 492 - VVV1_0( w_fp[92], w_fp[55], w_fp[8], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[92], w_fp[55], w_fp[8], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -10273,7 +10273,7 @@ namespace mg5amcCpu jamp_sv[93] += amp_sv[0]; jamp_sv[116] += amp_sv[0]; jamp_sv[117] -= amp_sv[0]; - VVV1_0( w_fp[92], w_fp[83], w_fp[8], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[92], w_fp[83], w_fp[8], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -10293,7 +10293,7 @@ namespace mg5amcCpu jamp_sv[93] += amp_sv[0]; jamp_sv[106] += amp_sv[0]; jamp_sv[107] -= amp_sv[0]; - VVV1_0( w_fp[92], w_fp[84], w_fp[8], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[92], w_fp[84], w_fp[8], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -10317,11 +10317,11 @@ namespace mg5amcCpu // *** DIAGRAM 493 OF 1240 *** // Wavefunction(s) for diagram number 493 - VVV1P0_1( w_fp[0], w_fp[5], COUPs[0], 0., 0., w_fp[92] ); - FFV1_2( w_fp[3], w_fp[92], COUPs[1], cIPD[0], cIPD[1], w_fp[99] ); + VVV1P0_1( w_fp[0], w_fp[5], COUPs[0], 1.0, 0., 0., w_fp[92] ); + FFV1_2( w_fp[3], w_fp[92], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[99] ); // Amplitude(s) for diagram number 493 - FFV1_0( w_fp[99], w_fp[87], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[87], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -10334,7 +10334,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 494 - FFV1_0( w_fp[99], w_fp[85], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[85], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -10344,10 +10344,10 @@ namespace mg5amcCpu // *** DIAGRAM 495 OF 1240 *** // Wavefunction(s) for diagram number 495 - VVV1P0_1( w_fp[92], w_fp[4], COUPs[0], 0., 0., w_fp[102] ); + VVV1P0_1( w_fp[92], w_fp[4], COUPs[0], 1.0, 0., 0., w_fp[102] ); // Amplitude(s) for diagram number 495 - VVV1_0( w_fp[102], w_fp[34], w_fp[6], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[102], w_fp[34], w_fp[6], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -10366,7 +10366,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 496 - FFV1_0( w_fp[3], w_fp[85], w_fp[102], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[85], w_fp[102], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -10378,10 +10378,10 @@ namespace mg5amcCpu // *** DIAGRAM 497 OF 1240 *** // Wavefunction(s) for diagram number 497 - VVV1P0_1( w_fp[92], w_fp[6], COUPs[0], 0., 0., w_fp[104] ); + VVV1P0_1( w_fp[92], w_fp[6], COUPs[0], 1.0, 0., 0., w_fp[104] ); // Amplitude(s) for diagram number 497 - VVV1_0( w_fp[104], w_fp[34], w_fp[4], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[104], w_fp[34], w_fp[4], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -10400,7 +10400,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 498 - FFV1_0( w_fp[3], w_fp[87], w_fp[104], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[87], w_fp[104], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -10412,12 +10412,12 @@ namespace mg5amcCpu // *** DIAGRAM 499 OF 1240 *** // Wavefunction(s) for diagram number 499 - VVVV1P0_1( w_fp[92], w_fp[4], w_fp[6], COUPs[2], 0., 0., w_fp[111] ); - VVVV3P0_1( w_fp[92], w_fp[4], w_fp[6], COUPs[2], 0., 0., w_fp[110] ); - VVVV4P0_1( w_fp[92], w_fp[4], w_fp[6], COUPs[2], 0., 0., w_fp[109] ); + VVVV1P0_1( w_fp[92], w_fp[4], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[111] ); + VVVV3P0_1( w_fp[92], w_fp[4], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[110] ); + VVVV4P0_1( w_fp[92], w_fp[4], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[109] ); // Amplitude(s) for diagram number 499 - FFV1_0( w_fp[3], w_fp[77], w_fp[111], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[77], w_fp[111], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -10429,7 +10429,7 @@ namespace mg5amcCpu jamp_sv[37] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[44] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[45] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[77], w_fp[110], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[77], w_fp[110], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -10441,7 +10441,7 @@ namespace mg5amcCpu jamp_sv[37] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[43] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[46] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[77], w_fp[109], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[77], w_fp[109], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -10457,10 +10457,10 @@ namespace mg5amcCpu // *** DIAGRAM 500 OF 1240 *** // Wavefunction(s) for diagram number 500 - FFV1_1( w_fp[77], w_fp[92], COUPs[1], cIPD[0], cIPD[1], w_fp[62] ); + FFV1_1( w_fp[77], w_fp[92], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[62] ); // Amplitude(s) for diagram number 500 - FFV1_0( w_fp[46], w_fp[62], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[62], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -10470,10 +10470,10 @@ namespace mg5amcCpu // *** DIAGRAM 501 OF 1240 *** // Wavefunction(s) for diagram number 501 - FFV1_2( w_fp[46], w_fp[92], COUPs[1], cIPD[0], cIPD[1], w_fp[114] ); + FFV1_2( w_fp[46], w_fp[92], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[114] ); // Amplitude(s) for diagram number 501 - FFV1_0( w_fp[114], w_fp[77], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[114], w_fp[77], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -10486,7 +10486,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 502 - FFV1_0( w_fp[46], w_fp[77], w_fp[104], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[77], w_fp[104], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -10501,7 +10501,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 503 - FFV1_0( w_fp[41], w_fp[62], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[62], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -10511,10 +10511,10 @@ namespace mg5amcCpu // *** DIAGRAM 504 OF 1240 *** // Wavefunction(s) for diagram number 504 - FFV1_2( w_fp[41], w_fp[92], COUPs[1], cIPD[0], cIPD[1], w_fp[113] ); + FFV1_2( w_fp[41], w_fp[92], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[113] ); // Amplitude(s) for diagram number 504 - FFV1_0( w_fp[113], w_fp[77], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[113], w_fp[77], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -10527,7 +10527,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 505 - FFV1_0( w_fp[41], w_fp[77], w_fp[102], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[77], w_fp[102], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -10542,7 +10542,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 506 - FFV1_0( w_fp[3], w_fp[62], w_fp[27], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[62], w_fp[27], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -10557,7 +10557,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 507 - FFV1_0( w_fp[99], w_fp[77], w_fp[27], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[77], w_fp[27], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -10569,10 +10569,10 @@ namespace mg5amcCpu // *** DIAGRAM 508 OF 1240 *** // Wavefunction(s) for diagram number 508 - VVV1P0_1( w_fp[92], w_fp[27], COUPs[0], 0., 0., w_fp[62] ); + VVV1P0_1( w_fp[92], w_fp[27], COUPs[0], 1.0, 0., 0., w_fp[62] ); // Amplitude(s) for diagram number 508 - FFV1_0( w_fp[3], w_fp[77], w_fp[62], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[77], w_fp[62], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -10588,10 +10588,10 @@ namespace mg5amcCpu // *** DIAGRAM 509 OF 1240 *** // Wavefunction(s) for diagram number 509 - FFV1_1( w_fp[2], w_fp[92], COUPs[1], cIPD[0], cIPD[1], w_fp[112] ); + FFV1_1( w_fp[2], w_fp[92], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[112] ); // Amplitude(s) for diagram number 509 - FFV1_0( w_fp[56], w_fp[112], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[56], w_fp[112], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -10604,7 +10604,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 510 - FFV1_0( w_fp[21], w_fp[112], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[21], w_fp[112], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -10617,7 +10617,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 511 - VVV1_0( w_fp[102], w_fp[103], w_fp[6], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[102], w_fp[103], w_fp[6], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -10636,7 +10636,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 512 - FFV1_0( w_fp[21], w_fp[2], w_fp[102], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[21], w_fp[2], w_fp[102], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -10651,7 +10651,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 513 - VVV1_0( w_fp[104], w_fp[103], w_fp[4], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[104], w_fp[103], w_fp[4], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -10670,7 +10670,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 514 - FFV1_0( w_fp[56], w_fp[2], w_fp[104], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[56], w_fp[2], w_fp[104], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -10685,7 +10685,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 515 - FFV1_0( w_fp[52], w_fp[2], w_fp[111], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[2], w_fp[111], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -10697,7 +10697,7 @@ namespace mg5amcCpu jamp_sv[77] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[109] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[112] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[52], w_fp[2], w_fp[110], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[2], w_fp[110], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -10709,7 +10709,7 @@ namespace mg5amcCpu jamp_sv[77] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[101] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[115] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[52], w_fp[2], w_fp[109], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[2], w_fp[109], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -10725,10 +10725,10 @@ namespace mg5amcCpu // *** DIAGRAM 516 OF 1240 *** // Wavefunction(s) for diagram number 516 - FFV1_2( w_fp[52], w_fp[92], COUPs[1], cIPD[0], cIPD[1], w_fp[86] ); + FFV1_2( w_fp[52], w_fp[92], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[86] ); // Amplitude(s) for diagram number 516 - FFV1_0( w_fp[86], w_fp[33], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[86], w_fp[33], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -10738,10 +10738,10 @@ namespace mg5amcCpu // *** DIAGRAM 517 OF 1240 *** // Wavefunction(s) for diagram number 517 - FFV1_1( w_fp[33], w_fp[92], COUPs[1], cIPD[0], cIPD[1], w_fp[98] ); + FFV1_1( w_fp[33], w_fp[92], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[98] ); // Amplitude(s) for diagram number 517 - FFV1_0( w_fp[52], w_fp[98], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[98], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -10754,7 +10754,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 518 - FFV1_0( w_fp[52], w_fp[33], w_fp[104], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[33], w_fp[104], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -10769,7 +10769,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 519 - FFV1_0( w_fp[86], w_fp[47], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[86], w_fp[47], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -10779,10 +10779,10 @@ namespace mg5amcCpu // *** DIAGRAM 520 OF 1240 *** // Wavefunction(s) for diagram number 520 - FFV1_1( w_fp[47], w_fp[92], COUPs[1], cIPD[0], cIPD[1], w_fp[106] ); + FFV1_1( w_fp[47], w_fp[92], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[106] ); // Amplitude(s) for diagram number 520 - FFV1_0( w_fp[52], w_fp[106], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[106], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -10795,7 +10795,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 521 - FFV1_0( w_fp[52], w_fp[47], w_fp[102], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[47], w_fp[102], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -10810,7 +10810,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 522 - FFV1_0( w_fp[86], w_fp[2], w_fp[27], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[86], w_fp[2], w_fp[27], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -10825,7 +10825,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 523 - FFV1_0( w_fp[52], w_fp[112], w_fp[27], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[112], w_fp[27], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -10840,7 +10840,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 524 - FFV1_0( w_fp[52], w_fp[2], w_fp[62], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[2], w_fp[62], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -10859,7 +10859,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 525 - FFV1_0( w_fp[65], w_fp[112], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[65], w_fp[112], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -10874,7 +10874,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 526 - FFV1_0( w_fp[3], w_fp[112], w_fp[64], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[112], w_fp[64], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -10893,7 +10893,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 527 - FFV1_0( w_fp[99], w_fp[93], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[93], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -10908,7 +10908,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 528 - FFV1_0( w_fp[99], w_fp[2], w_fp[64], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[2], w_fp[64], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -10927,7 +10927,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 529 - FFV1_0( w_fp[3], w_fp[93], w_fp[104], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[93], w_fp[104], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -10946,7 +10946,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 530 - FFV1_0( w_fp[65], w_fp[2], w_fp[104], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[65], w_fp[2], w_fp[104], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -10965,7 +10965,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 531 - VVVV1_0( w_fp[92], w_fp[61], w_fp[8], w_fp[6], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[92], w_fp[61], w_fp[8], w_fp[6], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -10985,7 +10985,7 @@ namespace mg5amcCpu jamp_sv[111] += amp_sv[0]; jamp_sv[114] += amp_sv[0]; jamp_sv[115] -= amp_sv[0]; - VVVV3_0( w_fp[92], w_fp[61], w_fp[8], w_fp[6], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[92], w_fp[61], w_fp[8], w_fp[6], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -11005,7 +11005,7 @@ namespace mg5amcCpu jamp_sv[105] -= amp_sv[0]; jamp_sv[110] -= amp_sv[0]; jamp_sv[111] += amp_sv[0]; - VVVV4_0( w_fp[92], w_fp[61], w_fp[8], w_fp[6], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[92], w_fp[61], w_fp[8], w_fp[6], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -11029,10 +11029,10 @@ namespace mg5amcCpu // *** DIAGRAM 532 OF 1240 *** // Wavefunction(s) for diagram number 532 - VVV1P0_1( w_fp[92], w_fp[61], COUPs[0], 0., 0., w_fp[86] ); + VVV1P0_1( w_fp[92], w_fp[61], COUPs[0], 1.0, 0., 0., w_fp[86] ); // Amplitude(s) for diagram number 532 - VVV1_0( w_fp[8], w_fp[6], w_fp[86], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[6], w_fp[86], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -11056,10 +11056,10 @@ namespace mg5amcCpu // *** DIAGRAM 533 OF 1240 *** // Wavefunction(s) for diagram number 533 - VVV1P0_1( w_fp[92], w_fp[8], COUPs[0], 0., 0., w_fp[101] ); + VVV1P0_1( w_fp[92], w_fp[8], COUPs[0], 1.0, 0., 0., w_fp[101] ); // Amplitude(s) for diagram number 533 - VVV1_0( w_fp[61], w_fp[6], w_fp[101], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[61], w_fp[6], w_fp[101], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -11086,7 +11086,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 534 - VVV1_0( w_fp[61], w_fp[8], w_fp[104], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[61], w_fp[8], w_fp[104], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -11113,7 +11113,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 535 - FFV1_0( w_fp[3], w_fp[47], w_fp[86], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[47], w_fp[86], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -11132,7 +11132,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 536 - FFV1_0( w_fp[3], w_fp[106], w_fp[61], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[106], w_fp[61], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -11147,7 +11147,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 537 - FFV1_0( w_fp[99], w_fp[47], w_fp[61], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[47], w_fp[61], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -11162,7 +11162,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 538 - FFV1_0( w_fp[41], w_fp[2], w_fp[86], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[2], w_fp[86], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -11181,7 +11181,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 539 - FFV1_0( w_fp[41], w_fp[112], w_fp[61], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[112], w_fp[61], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -11196,7 +11196,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 540 - FFV1_0( w_fp[113], w_fp[2], w_fp[61], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[113], w_fp[2], w_fp[61], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -11211,7 +11211,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 541 - FFV1_0( w_fp[76], w_fp[112], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[76], w_fp[112], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -11226,7 +11226,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 542 - FFV1_0( w_fp[3], w_fp[112], w_fp[74], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[112], w_fp[74], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -11245,7 +11245,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 543 - FFV1_0( w_fp[99], w_fp[97], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[97], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -11260,7 +11260,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 544 - FFV1_0( w_fp[99], w_fp[2], w_fp[74], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[2], w_fp[74], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -11279,7 +11279,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 545 - FFV1_0( w_fp[3], w_fp[97], w_fp[102], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[97], w_fp[102], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -11298,7 +11298,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 546 - FFV1_0( w_fp[76], w_fp[2], w_fp[102], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[76], w_fp[2], w_fp[102], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -11317,7 +11317,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 547 - VVVV1_0( w_fp[92], w_fp[72], w_fp[8], w_fp[4], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[92], w_fp[72], w_fp[8], w_fp[4], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -11337,7 +11337,7 @@ namespace mg5amcCpu jamp_sv[76] += amp_sv[0]; jamp_sv[103] += amp_sv[0]; jamp_sv[106] -= amp_sv[0]; - VVVV3_0( w_fp[92], w_fp[72], w_fp[8], w_fp[4], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[92], w_fp[72], w_fp[8], w_fp[4], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -11357,7 +11357,7 @@ namespace mg5amcCpu jamp_sv[76] += amp_sv[0]; jamp_sv[104] += amp_sv[0]; jamp_sv[105] -= amp_sv[0]; - VVVV4_0( w_fp[92], w_fp[72], w_fp[8], w_fp[4], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[92], w_fp[72], w_fp[8], w_fp[4], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -11381,10 +11381,10 @@ namespace mg5amcCpu // *** DIAGRAM 548 OF 1240 *** // Wavefunction(s) for diagram number 548 - VVV1P0_1( w_fp[92], w_fp[72], COUPs[0], 0., 0., w_fp[86] ); + VVV1P0_1( w_fp[92], w_fp[72], COUPs[0], 1.0, 0., 0., w_fp[86] ); // Amplitude(s) for diagram number 548 - VVV1_0( w_fp[8], w_fp[4], w_fp[86], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[4], w_fp[86], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -11411,7 +11411,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 549 - VVV1_0( w_fp[72], w_fp[4], w_fp[101], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[72], w_fp[4], w_fp[101], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -11438,7 +11438,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 550 - VVV1_0( w_fp[72], w_fp[8], w_fp[102], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[72], w_fp[8], w_fp[102], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -11465,7 +11465,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 551 - FFV1_0( w_fp[3], w_fp[33], w_fp[86], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[33], w_fp[86], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -11484,7 +11484,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 552 - FFV1_0( w_fp[3], w_fp[98], w_fp[72], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[98], w_fp[72], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -11499,7 +11499,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 553 - FFV1_0( w_fp[99], w_fp[33], w_fp[72], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[33], w_fp[72], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -11514,7 +11514,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 554 - FFV1_0( w_fp[46], w_fp[2], w_fp[86], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[2], w_fp[86], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -11533,7 +11533,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 555 - FFV1_0( w_fp[46], w_fp[112], w_fp[72], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[112], w_fp[72], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -11548,7 +11548,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 556 - FFV1_0( w_fp[114], w_fp[2], w_fp[72], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[114], w_fp[2], w_fp[72], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -11560,10 +11560,10 @@ namespace mg5amcCpu // *** DIAGRAM 557 OF 1240 *** // Wavefunction(s) for diagram number 557 - VVV1P0_1( w_fp[92], w_fp[1], COUPs[0], 0., 0., w_fp[86] ); + VVV1P0_1( w_fp[92], w_fp[1], COUPs[0], 1.0, 0., 0., w_fp[86] ); // Amplitude(s) for diagram number 557 - VVV1_0( w_fp[86], w_fp[13], w_fp[6], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[86], w_fp[13], w_fp[6], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -11590,7 +11590,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 558 - VVV1_0( w_fp[86], w_fp[11], w_fp[4], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[86], w_fp[11], w_fp[4], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -11617,7 +11617,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 559 - VVVV1_0( w_fp[8], w_fp[4], w_fp[6], w_fp[86], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[8], w_fp[4], w_fp[6], w_fp[86], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -11637,7 +11637,7 @@ namespace mg5amcCpu jamp_sv[103] -= amp_sv[0]; jamp_sv[106] += amp_sv[0]; jamp_sv[114] -= amp_sv[0]; - VVVV3_0( w_fp[8], w_fp[4], w_fp[6], w_fp[86], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[8], w_fp[4], w_fp[6], w_fp[86], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -11657,7 +11657,7 @@ namespace mg5amcCpu jamp_sv[111] -= amp_sv[0]; jamp_sv[112] += amp_sv[0]; jamp_sv[114] -= amp_sv[0]; - VVVV4_0( w_fp[8], w_fp[4], w_fp[6], w_fp[86], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[8], w_fp[4], w_fp[6], w_fp[86], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -11684,7 +11684,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 560 - VVV1_0( w_fp[102], w_fp[108], w_fp[6], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[102], w_fp[108], w_fp[6], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -11711,7 +11711,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 561 - VVV1_0( w_fp[102], w_fp[1], w_fp[11], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[102], w_fp[1], w_fp[11], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -11738,7 +11738,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 562 - VVVV1_0( w_fp[1], w_fp[8], w_fp[6], w_fp[102], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[1], w_fp[8], w_fp[6], w_fp[102], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -11758,7 +11758,7 @@ namespace mg5amcCpu jamp_sv[109] += amp_sv[0]; jamp_sv[112] -= amp_sv[0]; jamp_sv[115] += amp_sv[0]; - VVVV3_0( w_fp[1], w_fp[8], w_fp[6], w_fp[102], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[1], w_fp[8], w_fp[6], w_fp[102], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -11778,7 +11778,7 @@ namespace mg5amcCpu jamp_sv[104] += amp_sv[0]; jamp_sv[105] -= amp_sv[0]; jamp_sv[106] += amp_sv[0]; - VVVV4_0( w_fp[1], w_fp[8], w_fp[6], w_fp[102], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[1], w_fp[8], w_fp[6], w_fp[102], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -11805,7 +11805,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 563 - VVV1_0( w_fp[104], w_fp[108], w_fp[4], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[104], w_fp[108], w_fp[4], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -11832,7 +11832,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 564 - VVV1_0( w_fp[104], w_fp[1], w_fp[13], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[104], w_fp[1], w_fp[13], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -11859,7 +11859,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 565 - VVVV1_0( w_fp[1], w_fp[8], w_fp[4], w_fp[104], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[1], w_fp[8], w_fp[4], w_fp[104], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -11879,7 +11879,7 @@ namespace mg5amcCpu jamp_sv[77] -= amp_sv[0]; jamp_sv[101] -= amp_sv[0]; jamp_sv[115] += amp_sv[0]; - VVVV3_0( w_fp[1], w_fp[8], w_fp[4], w_fp[104], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[1], w_fp[8], w_fp[4], w_fp[104], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -11899,7 +11899,7 @@ namespace mg5amcCpu jamp_sv[101] -= amp_sv[0]; jamp_sv[114] -= amp_sv[0]; jamp_sv[115] += amp_sv[0]; - VVVV4_0( w_fp[1], w_fp[8], w_fp[4], w_fp[104], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[1], w_fp[8], w_fp[4], w_fp[104], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -11923,12 +11923,12 @@ namespace mg5amcCpu // *** DIAGRAM 566 OF 1240 *** // Wavefunction(s) for diagram number 566 - VVVV1P0_1( w_fp[92], w_fp[1], w_fp[4], COUPs[2], 0., 0., w_fp[105] ); - VVVV3P0_1( w_fp[92], w_fp[1], w_fp[4], COUPs[2], 0., 0., w_fp[95] ); - VVVV4P0_1( w_fp[92], w_fp[1], w_fp[4], COUPs[2], 0., 0., w_fp[107] ); + VVVV1P0_1( w_fp[92], w_fp[1], w_fp[4], COUPs[2], 1.0, 0., 0., w_fp[105] ); + VVVV3P0_1( w_fp[92], w_fp[1], w_fp[4], COUPs[2], 1.0, 0., 0., w_fp[95] ); + VVVV4P0_1( w_fp[92], w_fp[1], w_fp[4], COUPs[2], 1.0, 0., 0., w_fp[107] ); // Amplitude(s) for diagram number 566 - VVV1_0( w_fp[8], w_fp[6], w_fp[105], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[6], w_fp[105], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -11948,7 +11948,7 @@ namespace mg5amcCpu jamp_sv[111] += amp_sv[0]; jamp_sv[114] += amp_sv[0]; jamp_sv[115] -= amp_sv[0]; - VVV1_0( w_fp[8], w_fp[6], w_fp[95], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[6], w_fp[95], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -11968,7 +11968,7 @@ namespace mg5amcCpu jamp_sv[109] -= amp_sv[0]; jamp_sv[112] += amp_sv[0]; jamp_sv[115] -= amp_sv[0]; - VVV1_0( w_fp[8], w_fp[6], w_fp[107], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[6], w_fp[107], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -11992,12 +11992,12 @@ namespace mg5amcCpu // *** DIAGRAM 567 OF 1240 *** // Wavefunction(s) for diagram number 567 - VVVV1P0_1( w_fp[92], w_fp[1], w_fp[6], COUPs[2], 0., 0., w_fp[96] ); - VVVV3P0_1( w_fp[92], w_fp[1], w_fp[6], COUPs[2], 0., 0., w_fp[90] ); - VVVV4P0_1( w_fp[92], w_fp[1], w_fp[6], COUPs[2], 0., 0., w_fp[88] ); + VVVV1P0_1( w_fp[92], w_fp[1], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[96] ); + VVVV3P0_1( w_fp[92], w_fp[1], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[90] ); + VVVV4P0_1( w_fp[92], w_fp[1], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[88] ); // Amplitude(s) for diagram number 567 - VVV1_0( w_fp[8], w_fp[4], w_fp[96], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[4], w_fp[96], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -12017,7 +12017,7 @@ namespace mg5amcCpu jamp_sv[76] += amp_sv[0]; jamp_sv[103] += amp_sv[0]; jamp_sv[106] -= amp_sv[0]; - VVV1_0( w_fp[8], w_fp[4], w_fp[90], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[4], w_fp[90], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -12037,7 +12037,7 @@ namespace mg5amcCpu jamp_sv[76] += amp_sv[0]; jamp_sv[100] += amp_sv[0]; jamp_sv[114] -= amp_sv[0]; - VVV1_0( w_fp[8], w_fp[4], w_fp[88], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[4], w_fp[88], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -12064,7 +12064,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 568 - VVV1_0( w_fp[1], w_fp[8], w_fp[111], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[8], w_fp[111], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -12084,7 +12084,7 @@ namespace mg5amcCpu jamp_sv[77] -= amp_sv[0]; jamp_sv[109] -= amp_sv[0]; jamp_sv[112] += amp_sv[0]; - VVV1_0( w_fp[1], w_fp[8], w_fp[110], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[8], w_fp[110], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -12104,7 +12104,7 @@ namespace mg5amcCpu jamp_sv[77] -= amp_sv[0]; jamp_sv[101] -= amp_sv[0]; jamp_sv[115] += amp_sv[0]; - VVV1_0( w_fp[1], w_fp[8], w_fp[109], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[8], w_fp[109], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -12131,7 +12131,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 569 - VVVV1_0( w_fp[92], w_fp[1], w_fp[8], w_fp[27], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[92], w_fp[1], w_fp[8], w_fp[27], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -12151,7 +12151,7 @@ namespace mg5amcCpu jamp_sv[110] -= amp_sv[0]; jamp_sv[111] += amp_sv[0]; jamp_sv[112] -= amp_sv[0]; - VVVV3_0( w_fp[92], w_fp[1], w_fp[8], w_fp[27], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[92], w_fp[1], w_fp[8], w_fp[27], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -12171,7 +12171,7 @@ namespace mg5amcCpu jamp_sv[77] -= amp_sv[0]; jamp_sv[110] -= amp_sv[0]; jamp_sv[111] += amp_sv[0]; - VVVV4_0( w_fp[92], w_fp[1], w_fp[8], w_fp[27], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[92], w_fp[1], w_fp[8], w_fp[27], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -12198,7 +12198,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 570 - VVV1_0( w_fp[8], w_fp[27], w_fp[86], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[27], w_fp[86], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -12225,7 +12225,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 571 - VVV1_0( w_fp[1], w_fp[27], w_fp[101], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[27], w_fp[101], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -12252,7 +12252,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 572 - VVV1_0( w_fp[1], w_fp[8], w_fp[62], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[8], w_fp[62], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -12279,7 +12279,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 573 - VVV1_0( w_fp[86], w_fp[37], w_fp[6], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[86], w_fp[37], w_fp[6], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -12298,7 +12298,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 574 - FFV1_0( w_fp[3], w_fp[36], w_fp[86], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[36], w_fp[86], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -12313,7 +12313,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 575 - FFV1_0( w_fp[99], w_fp[100], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[100], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -12326,7 +12326,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 576 - FFV1_0( w_fp[99], w_fp[36], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[36], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -12339,7 +12339,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 577 - FFV1_0( w_fp[3], w_fp[100], w_fp[104], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[100], w_fp[104], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -12354,7 +12354,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 578 - VVV1_0( w_fp[104], w_fp[1], w_fp[37], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[104], w_fp[1], w_fp[37], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -12373,7 +12373,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 579 - FFV1_0( w_fp[3], w_fp[33], w_fp[96], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[33], w_fp[96], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -12385,7 +12385,7 @@ namespace mg5amcCpu jamp_sv[61] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[68] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[69] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[33], w_fp[90], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[33], w_fp[90], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -12397,7 +12397,7 @@ namespace mg5amcCpu jamp_sv[61] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[67] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[70] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[33], w_fp[88], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[33], w_fp[88], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -12416,7 +12416,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 580 - FFV1_0( w_fp[41], w_fp[33], w_fp[86], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[33], w_fp[86], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -12431,7 +12431,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 581 - FFV1_0( w_fp[41], w_fp[98], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[98], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -12444,7 +12444,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 582 - FFV1_0( w_fp[113], w_fp[33], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[113], w_fp[33], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -12457,7 +12457,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 583 - VVV1_0( w_fp[86], w_fp[51], w_fp[4], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[86], w_fp[51], w_fp[4], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -12476,7 +12476,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 584 - FFV1_0( w_fp[3], w_fp[49], w_fp[86], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[49], w_fp[86], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -12491,7 +12491,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 585 - FFV1_0( w_fp[99], w_fp[91], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[91], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -12504,7 +12504,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 586 - FFV1_0( w_fp[99], w_fp[49], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[49], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -12517,7 +12517,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 587 - FFV1_0( w_fp[3], w_fp[91], w_fp[102], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[91], w_fp[102], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -12532,7 +12532,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 588 - VVV1_0( w_fp[102], w_fp[1], w_fp[51], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[102], w_fp[1], w_fp[51], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -12551,7 +12551,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 589 - FFV1_0( w_fp[3], w_fp[47], w_fp[105], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[47], w_fp[105], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -12563,7 +12563,7 @@ namespace mg5amcCpu jamp_sv[111] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[114] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[115] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[47], w_fp[95], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[47], w_fp[95], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -12575,7 +12575,7 @@ namespace mg5amcCpu jamp_sv[109] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[112] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[115] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[47], w_fp[107], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[47], w_fp[107], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -12594,7 +12594,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 590 - FFV1_0( w_fp[46], w_fp[47], w_fp[86], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[47], w_fp[86], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -12609,7 +12609,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 591 - FFV1_0( w_fp[46], w_fp[106], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[106], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -12622,7 +12622,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 592 - FFV1_0( w_fp[114], w_fp[47], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[114], w_fp[47], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -12635,7 +12635,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 593 - VVV1_0( w_fp[86], w_fp[54], w_fp[6], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[86], w_fp[54], w_fp[6], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -12654,7 +12654,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 594 - FFV1_0( w_fp[53], w_fp[2], w_fp[86], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[53], w_fp[2], w_fp[86], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -12669,7 +12669,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 595 - FFV1_0( w_fp[78], w_fp[112], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[78], w_fp[112], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -12682,7 +12682,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 596 - FFV1_0( w_fp[53], w_fp[112], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[53], w_fp[112], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -12695,7 +12695,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 597 - FFV1_0( w_fp[78], w_fp[2], w_fp[104], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[78], w_fp[2], w_fp[104], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -12710,7 +12710,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 598 - VVV1_0( w_fp[104], w_fp[1], w_fp[54], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[104], w_fp[1], w_fp[54], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -12729,7 +12729,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 599 - FFV1_0( w_fp[46], w_fp[2], w_fp[96], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[2], w_fp[96], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -12741,7 +12741,7 @@ namespace mg5amcCpu jamp_sv[76] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[103] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[106] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[46], w_fp[2], w_fp[90], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[2], w_fp[90], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -12753,7 +12753,7 @@ namespace mg5amcCpu jamp_sv[76] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[100] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[114] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[46], w_fp[2], w_fp[88], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[2], w_fp[88], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -12772,7 +12772,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 600 - VVV1_0( w_fp[86], w_fp[20], w_fp[4], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[86], w_fp[20], w_fp[4], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -12791,7 +12791,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 601 - FFV1_0( w_fp[28], w_fp[2], w_fp[86], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[28], w_fp[2], w_fp[86], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -12806,7 +12806,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 602 - FFV1_0( w_fp[60], w_fp[112], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[60], w_fp[112], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -12819,7 +12819,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 603 - FFV1_0( w_fp[28], w_fp[112], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[28], w_fp[112], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -12832,7 +12832,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 604 - FFV1_0( w_fp[60], w_fp[2], w_fp[102], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[60], w_fp[2], w_fp[102], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -12847,7 +12847,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 605 - VVV1_0( w_fp[102], w_fp[1], w_fp[20], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[102], w_fp[1], w_fp[20], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -12866,7 +12866,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 606 - FFV1_0( w_fp[41], w_fp[2], w_fp[105], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[2], w_fp[105], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -12878,7 +12878,7 @@ namespace mg5amcCpu jamp_sv[56] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[72] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[74] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[41], w_fp[2], w_fp[95], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[2], w_fp[95], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -12890,7 +12890,7 @@ namespace mg5amcCpu jamp_sv[50] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[60] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[74] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[41], w_fp[2], w_fp[107], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[2], w_fp[107], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -12909,7 +12909,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 607 - FFV1_0( w_fp[3], w_fp[15], w_fp[86], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[15], w_fp[86], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -12928,7 +12928,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 608 - FFV1_0( w_fp[14], w_fp[2], w_fp[86], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[14], w_fp[2], w_fp[86], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -12947,7 +12947,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 609 - FFV1_0( w_fp[3], w_fp[112], w_fp[68], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[112], w_fp[68], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -12966,7 +12966,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 610 - FFV1_0( w_fp[14], w_fp[112], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[14], w_fp[112], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -12981,7 +12981,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 611 - FFV1_0( w_fp[99], w_fp[2], w_fp[68], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[2], w_fp[68], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -13000,7 +13000,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 612 - FFV1_0( w_fp[99], w_fp[15], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[15], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -13015,7 +13015,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 613 - FFV1_0( w_fp[3], w_fp[112], w_fp[57], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[112], w_fp[57], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -13027,7 +13027,7 @@ namespace mg5amcCpu jamp_sv[73] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[75] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[77] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[112], w_fp[81], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[112], w_fp[81], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -13039,7 +13039,7 @@ namespace mg5amcCpu jamp_sv[74] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[75] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[76] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[112], w_fp[82], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[112], w_fp[82], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -13058,7 +13058,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 614 - FFV1_0( w_fp[99], w_fp[2], w_fp[57], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[2], w_fp[57], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -13070,7 +13070,7 @@ namespace mg5amcCpu jamp_sv[69] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[110] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[111] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[99], w_fp[2], w_fp[81], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[2], w_fp[81], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -13082,7 +13082,7 @@ namespace mg5amcCpu jamp_sv[69] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[104] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[105] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[99], w_fp[2], w_fp[82], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[2], w_fp[82], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -13101,7 +13101,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 615 - VVV1_0( w_fp[92], w_fp[57], w_fp[8], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[92], w_fp[57], w_fp[8], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -13121,7 +13121,7 @@ namespace mg5amcCpu jamp_sv[77] += amp_sv[0]; jamp_sv[110] += amp_sv[0]; jamp_sv[111] -= amp_sv[0]; - VVV1_0( w_fp[92], w_fp[81], w_fp[8], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[92], w_fp[81], w_fp[8], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -13141,7 +13141,7 @@ namespace mg5amcCpu jamp_sv[76] += amp_sv[0]; jamp_sv[104] += amp_sv[0]; jamp_sv[105] -= amp_sv[0]; - VVV1_0( w_fp[92], w_fp[82], w_fp[8], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[92], w_fp[82], w_fp[8], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -13165,11 +13165,11 @@ namespace mg5amcCpu // *** DIAGRAM 616 OF 1240 *** // Wavefunction(s) for diagram number 616 - VVV1P0_1( w_fp[0], w_fp[6], COUPs[0], 0., 0., w_fp[92] ); - FFV1_2( w_fp[3], w_fp[92], COUPs[1], cIPD[0], cIPD[1], w_fp[99] ); + VVV1P0_1( w_fp[0], w_fp[6], COUPs[0], 1.0, 0., 0., w_fp[92] ); + FFV1_2( w_fp[3], w_fp[92], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[99] ); // Amplitude(s) for diagram number 616 - FFV1_0( w_fp[99], w_fp[87], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[87], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -13182,7 +13182,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 617 - FFV1_0( w_fp[99], w_fp[9], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[9], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -13192,10 +13192,10 @@ namespace mg5amcCpu // *** DIAGRAM 618 OF 1240 *** // Wavefunction(s) for diagram number 618 - VVV1P0_1( w_fp[92], w_fp[4], COUPs[0], 0., 0., w_fp[112] ); + VVV1P0_1( w_fp[92], w_fp[4], COUPs[0], 1.0, 0., 0., w_fp[112] ); // Amplitude(s) for diagram number 618 - VVV1_0( w_fp[112], w_fp[34], w_fp[5], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[112], w_fp[34], w_fp[5], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -13214,7 +13214,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 619 - FFV1_0( w_fp[3], w_fp[9], w_fp[112], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[9], w_fp[112], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -13226,10 +13226,10 @@ namespace mg5amcCpu // *** DIAGRAM 620 OF 1240 *** // Wavefunction(s) for diagram number 620 - VVV1P0_1( w_fp[92], w_fp[5], COUPs[0], 0., 0., w_fp[86] ); + VVV1P0_1( w_fp[92], w_fp[5], COUPs[0], 1.0, 0., 0., w_fp[86] ); // Amplitude(s) for diagram number 620 - VVV1_0( w_fp[86], w_fp[34], w_fp[4], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[86], w_fp[34], w_fp[4], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -13248,7 +13248,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 621 - FFV1_0( w_fp[3], w_fp[87], w_fp[86], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[87], w_fp[86], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -13260,12 +13260,12 @@ namespace mg5amcCpu // *** DIAGRAM 622 OF 1240 *** // Wavefunction(s) for diagram number 622 - VVVV1P0_1( w_fp[92], w_fp[4], w_fp[5], COUPs[2], 0., 0., w_fp[107] ); - VVVV3P0_1( w_fp[92], w_fp[4], w_fp[5], COUPs[2], 0., 0., w_fp[95] ); - VVVV4P0_1( w_fp[92], w_fp[4], w_fp[5], COUPs[2], 0., 0., w_fp[105] ); + VVVV1P0_1( w_fp[92], w_fp[4], w_fp[5], COUPs[2], 1.0, 0., 0., w_fp[107] ); + VVVV3P0_1( w_fp[92], w_fp[4], w_fp[5], COUPs[2], 1.0, 0., 0., w_fp[95] ); + VVVV4P0_1( w_fp[92], w_fp[4], w_fp[5], COUPs[2], 1.0, 0., 0., w_fp[105] ); // Amplitude(s) for diagram number 622 - FFV1_0( w_fp[3], w_fp[77], w_fp[107], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[77], w_fp[107], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -13277,7 +13277,7 @@ namespace mg5amcCpu jamp_sv[39] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[42] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[43] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[77], w_fp[95], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[77], w_fp[95], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -13289,7 +13289,7 @@ namespace mg5amcCpu jamp_sv[37] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[40] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[43] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[77], w_fp[105], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[77], w_fp[105], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -13305,10 +13305,10 @@ namespace mg5amcCpu // *** DIAGRAM 623 OF 1240 *** // Wavefunction(s) for diagram number 623 - FFV1_1( w_fp[77], w_fp[92], COUPs[1], cIPD[0], cIPD[1], w_fp[102] ); + FFV1_1( w_fp[77], w_fp[92], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[102] ); // Amplitude(s) for diagram number 623 - FFV1_0( w_fp[46], w_fp[102], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[102], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -13318,10 +13318,10 @@ namespace mg5amcCpu // *** DIAGRAM 624 OF 1240 *** // Wavefunction(s) for diagram number 624 - FFV1_2( w_fp[46], w_fp[92], COUPs[1], cIPD[0], cIPD[1], w_fp[88] ); + FFV1_2( w_fp[46], w_fp[92], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[88] ); // Amplitude(s) for diagram number 624 - FFV1_0( w_fp[88], w_fp[77], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[88], w_fp[77], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -13334,7 +13334,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 625 - FFV1_0( w_fp[46], w_fp[77], w_fp[86], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[77], w_fp[86], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -13349,7 +13349,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 626 - FFV1_0( w_fp[38], w_fp[102], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[102], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -13359,10 +13359,10 @@ namespace mg5amcCpu // *** DIAGRAM 627 OF 1240 *** // Wavefunction(s) for diagram number 627 - FFV1_2( w_fp[38], w_fp[92], COUPs[1], cIPD[0], cIPD[1], w_fp[90] ); + FFV1_2( w_fp[38], w_fp[92], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[90] ); // Amplitude(s) for diagram number 627 - FFV1_0( w_fp[90], w_fp[77], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[90], w_fp[77], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -13375,7 +13375,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 628 - FFV1_0( w_fp[38], w_fp[77], w_fp[112], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[77], w_fp[112], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -13390,7 +13390,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 629 - FFV1_0( w_fp[3], w_fp[102], w_fp[24], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[102], w_fp[24], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -13405,7 +13405,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 630 - FFV1_0( w_fp[99], w_fp[77], w_fp[24], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[77], w_fp[24], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -13417,10 +13417,10 @@ namespace mg5amcCpu // *** DIAGRAM 631 OF 1240 *** // Wavefunction(s) for diagram number 631 - VVV1P0_1( w_fp[92], w_fp[24], COUPs[0], 0., 0., w_fp[102] ); + VVV1P0_1( w_fp[92], w_fp[24], COUPs[0], 1.0, 0., 0., w_fp[102] ); // Amplitude(s) for diagram number 631 - FFV1_0( w_fp[3], w_fp[77], w_fp[102], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[77], w_fp[102], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -13436,10 +13436,10 @@ namespace mg5amcCpu // *** DIAGRAM 632 OF 1240 *** // Wavefunction(s) for diagram number 632 - FFV1_1( w_fp[2], w_fp[92], COUPs[1], cIPD[0], cIPD[1], w_fp[96] ); + FFV1_1( w_fp[2], w_fp[92], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[96] ); // Amplitude(s) for diagram number 632 - FFV1_0( w_fp[56], w_fp[96], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[56], w_fp[96], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -13452,7 +13452,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 633 - FFV1_0( w_fp[22], w_fp[96], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[22], w_fp[96], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -13465,7 +13465,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 634 - VVV1_0( w_fp[112], w_fp[103], w_fp[5], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[112], w_fp[103], w_fp[5], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -13484,7 +13484,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 635 - FFV1_0( w_fp[22], w_fp[2], w_fp[112], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[22], w_fp[2], w_fp[112], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -13499,7 +13499,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 636 - VVV1_0( w_fp[86], w_fp[103], w_fp[4], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[86], w_fp[103], w_fp[4], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -13518,7 +13518,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 637 - FFV1_0( w_fp[56], w_fp[2], w_fp[86], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[56], w_fp[2], w_fp[86], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -13533,7 +13533,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 638 - FFV1_0( w_fp[52], w_fp[2], w_fp[107], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[2], w_fp[107], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -13545,7 +13545,7 @@ namespace mg5amcCpu jamp_sv[88] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[99] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[101] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[52], w_fp[2], w_fp[95], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[2], w_fp[95], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -13557,7 +13557,7 @@ namespace mg5amcCpu jamp_sv[77] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[91] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[101] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[52], w_fp[2], w_fp[105], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[2], w_fp[105], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -13573,10 +13573,10 @@ namespace mg5amcCpu // *** DIAGRAM 639 OF 1240 *** // Wavefunction(s) for diagram number 639 - FFV1_2( w_fp[52], w_fp[92], COUPs[1], cIPD[0], cIPD[1], w_fp[104] ); + FFV1_2( w_fp[52], w_fp[92], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[104] ); // Amplitude(s) for diagram number 639 - FFV1_0( w_fp[104], w_fp[33], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[104], w_fp[33], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -13586,10 +13586,10 @@ namespace mg5amcCpu // *** DIAGRAM 640 OF 1240 *** // Wavefunction(s) for diagram number 640 - FFV1_1( w_fp[33], w_fp[92], COUPs[1], cIPD[0], cIPD[1], w_fp[114] ); + FFV1_1( w_fp[33], w_fp[92], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[114] ); // Amplitude(s) for diagram number 640 - FFV1_0( w_fp[52], w_fp[114], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[114], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -13602,7 +13602,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 641 - FFV1_0( w_fp[52], w_fp[33], w_fp[86], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[33], w_fp[86], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -13617,7 +13617,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 642 - FFV1_0( w_fp[104], w_fp[39], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[104], w_fp[39], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -13627,10 +13627,10 @@ namespace mg5amcCpu // *** DIAGRAM 643 OF 1240 *** // Wavefunction(s) for diagram number 643 - FFV1_1( w_fp[39], w_fp[92], COUPs[1], cIPD[0], cIPD[1], w_fp[106] ); + FFV1_1( w_fp[39], w_fp[92], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[106] ); // Amplitude(s) for diagram number 643 - FFV1_0( w_fp[52], w_fp[106], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[106], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -13643,7 +13643,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 644 - FFV1_0( w_fp[52], w_fp[39], w_fp[112], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[39], w_fp[112], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -13658,7 +13658,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 645 - FFV1_0( w_fp[104], w_fp[2], w_fp[24], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[104], w_fp[2], w_fp[24], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -13673,7 +13673,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 646 - FFV1_0( w_fp[52], w_fp[96], w_fp[24], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[96], w_fp[24], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -13688,7 +13688,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 647 - FFV1_0( w_fp[52], w_fp[2], w_fp[102], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[2], w_fp[102], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -13707,7 +13707,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 648 - FFV1_0( w_fp[65], w_fp[96], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[65], w_fp[96], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -13722,7 +13722,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 649 - FFV1_0( w_fp[3], w_fp[96], w_fp[63], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[96], w_fp[63], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -13741,7 +13741,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 650 - FFV1_0( w_fp[99], w_fp[93], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[93], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -13756,7 +13756,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 651 - FFV1_0( w_fp[99], w_fp[2], w_fp[63], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[2], w_fp[63], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -13775,7 +13775,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 652 - FFV1_0( w_fp[3], w_fp[93], w_fp[86], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[93], w_fp[86], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -13794,7 +13794,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 653 - FFV1_0( w_fp[65], w_fp[2], w_fp[86], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[65], w_fp[2], w_fp[86], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -13813,7 +13813,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 654 - VVVV1_0( w_fp[92], w_fp[61], w_fp[8], w_fp[5], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[92], w_fp[61], w_fp[8], w_fp[5], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -13833,7 +13833,7 @@ namespace mg5amcCpu jamp_sv[91] -= amp_sv[0]; jamp_sv[96] -= amp_sv[0]; jamp_sv[98] += amp_sv[0]; - VVVV3_0( w_fp[92], w_fp[61], w_fp[8], w_fp[5], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[92], w_fp[61], w_fp[8], w_fp[5], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -13853,7 +13853,7 @@ namespace mg5amcCpu jamp_sv[98] += amp_sv[0]; jamp_sv[100] += amp_sv[0]; jamp_sv[101] -= amp_sv[0]; - VVVV4_0( w_fp[92], w_fp[61], w_fp[8], w_fp[5], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[92], w_fp[61], w_fp[8], w_fp[5], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -13877,10 +13877,10 @@ namespace mg5amcCpu // *** DIAGRAM 655 OF 1240 *** // Wavefunction(s) for diagram number 655 - VVV1P0_1( w_fp[92], w_fp[61], COUPs[0], 0., 0., w_fp[104] ); + VVV1P0_1( w_fp[92], w_fp[61], COUPs[0], 1.0, 0., 0., w_fp[104] ); // Amplitude(s) for diagram number 655 - VVV1_0( w_fp[8], w_fp[5], w_fp[104], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[5], w_fp[104], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -13904,10 +13904,10 @@ namespace mg5amcCpu // *** DIAGRAM 656 OF 1240 *** // Wavefunction(s) for diagram number 656 - VVV1P0_1( w_fp[92], w_fp[8], COUPs[0], 0., 0., w_fp[113] ); + VVV1P0_1( w_fp[92], w_fp[8], COUPs[0], 1.0, 0., 0., w_fp[113] ); // Amplitude(s) for diagram number 656 - VVV1_0( w_fp[61], w_fp[5], w_fp[113], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[61], w_fp[5], w_fp[113], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -13934,7 +13934,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 657 - VVV1_0( w_fp[61], w_fp[8], w_fp[86], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[61], w_fp[8], w_fp[86], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -13961,7 +13961,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 658 - FFV1_0( w_fp[3], w_fp[39], w_fp[104], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[39], w_fp[104], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -13980,7 +13980,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 659 - FFV1_0( w_fp[3], w_fp[106], w_fp[61], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[106], w_fp[61], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -13995,7 +13995,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 660 - FFV1_0( w_fp[99], w_fp[39], w_fp[61], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[39], w_fp[61], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -14010,7 +14010,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 661 - FFV1_0( w_fp[38], w_fp[2], w_fp[104], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[2], w_fp[104], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -14029,7 +14029,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 662 - FFV1_0( w_fp[38], w_fp[96], w_fp[61], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[96], w_fp[61], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -14044,7 +14044,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 663 - FFV1_0( w_fp[90], w_fp[2], w_fp[61], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[90], w_fp[2], w_fp[61], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -14059,7 +14059,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 664 - FFV1_0( w_fp[71], w_fp[96], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[71], w_fp[96], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -14074,7 +14074,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 665 - FFV1_0( w_fp[3], w_fp[96], w_fp[69], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[96], w_fp[69], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -14093,7 +14093,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 666 - FFV1_0( w_fp[99], w_fp[94], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[94], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -14108,7 +14108,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 667 - FFV1_0( w_fp[99], w_fp[2], w_fp[69], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[2], w_fp[69], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -14127,7 +14127,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 668 - FFV1_0( w_fp[3], w_fp[94], w_fp[112], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[94], w_fp[112], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -14146,7 +14146,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 669 - FFV1_0( w_fp[71], w_fp[2], w_fp[112], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[71], w_fp[2], w_fp[112], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -14165,7 +14165,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 670 - VVVV1_0( w_fp[92], w_fp[66], w_fp[8], w_fp[4], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[92], w_fp[66], w_fp[8], w_fp[4], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -14185,7 +14185,7 @@ namespace mg5amcCpu jamp_sv[82] -= amp_sv[0]; jamp_sv[97] -= amp_sv[0]; jamp_sv[100] += amp_sv[0]; - VVVV3_0( w_fp[92], w_fp[66], w_fp[8], w_fp[4], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[92], w_fp[66], w_fp[8], w_fp[4], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -14205,7 +14205,7 @@ namespace mg5amcCpu jamp_sv[98] += amp_sv[0]; jamp_sv[99] -= amp_sv[0]; jamp_sv[100] += amp_sv[0]; - VVVV4_0( w_fp[92], w_fp[66], w_fp[8], w_fp[4], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[92], w_fp[66], w_fp[8], w_fp[4], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -14229,10 +14229,10 @@ namespace mg5amcCpu // *** DIAGRAM 671 OF 1240 *** // Wavefunction(s) for diagram number 671 - VVV1P0_1( w_fp[92], w_fp[66], COUPs[0], 0., 0., w_fp[104] ); + VVV1P0_1( w_fp[92], w_fp[66], COUPs[0], 1.0, 0., 0., w_fp[104] ); // Amplitude(s) for diagram number 671 - VVV1_0( w_fp[8], w_fp[4], w_fp[104], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[4], w_fp[104], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -14259,7 +14259,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 672 - VVV1_0( w_fp[66], w_fp[4], w_fp[113], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[66], w_fp[4], w_fp[113], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -14286,7 +14286,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 673 - VVV1_0( w_fp[66], w_fp[8], w_fp[112], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[66], w_fp[8], w_fp[112], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -14313,7 +14313,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 674 - FFV1_0( w_fp[3], w_fp[33], w_fp[104], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[33], w_fp[104], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -14332,7 +14332,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 675 - FFV1_0( w_fp[3], w_fp[114], w_fp[66], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[114], w_fp[66], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -14347,7 +14347,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 676 - FFV1_0( w_fp[99], w_fp[33], w_fp[66], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[33], w_fp[66], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -14362,7 +14362,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 677 - FFV1_0( w_fp[46], w_fp[2], w_fp[104], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[2], w_fp[104], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -14381,7 +14381,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 678 - FFV1_0( w_fp[46], w_fp[96], w_fp[66], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[96], w_fp[66], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -14396,7 +14396,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 679 - FFV1_0( w_fp[88], w_fp[2], w_fp[66], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[88], w_fp[2], w_fp[66], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -14408,10 +14408,10 @@ namespace mg5amcCpu // *** DIAGRAM 680 OF 1240 *** // Wavefunction(s) for diagram number 680 - VVV1P0_1( w_fp[92], w_fp[1], COUPs[0], 0., 0., w_fp[104] ); + VVV1P0_1( w_fp[92], w_fp[1], COUPs[0], 1.0, 0., 0., w_fp[104] ); // Amplitude(s) for diagram number 680 - VVV1_0( w_fp[104], w_fp[13], w_fp[5], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[104], w_fp[13], w_fp[5], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -14438,7 +14438,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 681 - VVV1_0( w_fp[104], w_fp[10], w_fp[4], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[104], w_fp[10], w_fp[4], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -14465,7 +14465,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 682 - VVVV1_0( w_fp[8], w_fp[4], w_fp[5], w_fp[104], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[8], w_fp[4], w_fp[5], w_fp[104], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -14485,7 +14485,7 @@ namespace mg5amcCpu jamp_sv[82] += amp_sv[0]; jamp_sv[90] -= amp_sv[0]; jamp_sv[97] += amp_sv[0]; - VVVV3_0( w_fp[8], w_fp[4], w_fp[5], w_fp[104], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[8], w_fp[4], w_fp[5], w_fp[104], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -14505,7 +14505,7 @@ namespace mg5amcCpu jamp_sv[88] += amp_sv[0]; jamp_sv[90] -= amp_sv[0]; jamp_sv[96] += amp_sv[0]; - VVVV4_0( w_fp[8], w_fp[4], w_fp[5], w_fp[104], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[8], w_fp[4], w_fp[5], w_fp[104], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -14532,7 +14532,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 683 - VVV1_0( w_fp[112], w_fp[108], w_fp[5], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[112], w_fp[108], w_fp[5], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -14559,7 +14559,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 684 - VVV1_0( w_fp[112], w_fp[1], w_fp[10], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[112], w_fp[1], w_fp[10], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -14586,7 +14586,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 685 - VVVV1_0( w_fp[1], w_fp[8], w_fp[5], w_fp[112], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[1], w_fp[8], w_fp[5], w_fp[112], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -14606,7 +14606,7 @@ namespace mg5amcCpu jamp_sv[88] -= amp_sv[0]; jamp_sv[91] += amp_sv[0]; jamp_sv[99] -= amp_sv[0]; - VVVV3_0( w_fp[1], w_fp[8], w_fp[5], w_fp[112], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[1], w_fp[8], w_fp[5], w_fp[112], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -14626,7 +14626,7 @@ namespace mg5amcCpu jamp_sv[82] += amp_sv[0]; jamp_sv[98] += amp_sv[0]; jamp_sv[99] -= amp_sv[0]; - VVVV4_0( w_fp[1], w_fp[8], w_fp[5], w_fp[112], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[1], w_fp[8], w_fp[5], w_fp[112], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -14653,7 +14653,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 686 - VVV1_0( w_fp[86], w_fp[108], w_fp[4], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[86], w_fp[108], w_fp[4], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -14680,7 +14680,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 687 - VVV1_0( w_fp[86], w_fp[1], w_fp[13], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[86], w_fp[1], w_fp[13], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -14707,7 +14707,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 688 - VVVV1_0( w_fp[1], w_fp[8], w_fp[4], w_fp[86], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[1], w_fp[8], w_fp[4], w_fp[86], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -14727,7 +14727,7 @@ namespace mg5amcCpu jamp_sv[77] -= amp_sv[0]; jamp_sv[91] += amp_sv[0]; jamp_sv[101] -= amp_sv[0]; - VVVV3_0( w_fp[1], w_fp[8], w_fp[4], w_fp[86], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[1], w_fp[8], w_fp[4], w_fp[86], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -14747,7 +14747,7 @@ namespace mg5amcCpu jamp_sv[91] += amp_sv[0]; jamp_sv[100] += amp_sv[0]; jamp_sv[101] -= amp_sv[0]; - VVVV4_0( w_fp[1], w_fp[8], w_fp[4], w_fp[86], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[1], w_fp[8], w_fp[4], w_fp[86], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -14771,12 +14771,12 @@ namespace mg5amcCpu // *** DIAGRAM 689 OF 1240 *** // Wavefunction(s) for diagram number 689 - VVVV1P0_1( w_fp[92], w_fp[1], w_fp[4], COUPs[2], 0., 0., w_fp[98] ); - VVVV3P0_1( w_fp[92], w_fp[1], w_fp[4], COUPs[2], 0., 0., w_fp[62] ); - VVVV4P0_1( w_fp[92], w_fp[1], w_fp[4], COUPs[2], 0., 0., w_fp[101] ); + VVVV1P0_1( w_fp[92], w_fp[1], w_fp[4], COUPs[2], 1.0, 0., 0., w_fp[98] ); + VVVV3P0_1( w_fp[92], w_fp[1], w_fp[4], COUPs[2], 1.0, 0., 0., w_fp[62] ); + VVVV4P0_1( w_fp[92], w_fp[1], w_fp[4], COUPs[2], 1.0, 0., 0., w_fp[101] ); // Amplitude(s) for diagram number 689 - VVV1_0( w_fp[8], w_fp[5], w_fp[98], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[5], w_fp[98], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -14796,7 +14796,7 @@ namespace mg5amcCpu jamp_sv[91] -= amp_sv[0]; jamp_sv[96] -= amp_sv[0]; jamp_sv[98] += amp_sv[0]; - VVV1_0( w_fp[8], w_fp[5], w_fp[62], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[5], w_fp[62], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -14816,7 +14816,7 @@ namespace mg5amcCpu jamp_sv[88] += amp_sv[0]; jamp_sv[91] -= amp_sv[0]; jamp_sv[98] += amp_sv[0]; - VVV1_0( w_fp[8], w_fp[5], w_fp[101], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[5], w_fp[101], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -14840,12 +14840,12 @@ namespace mg5amcCpu // *** DIAGRAM 690 OF 1240 *** // Wavefunction(s) for diagram number 690 - VVVV1P0_1( w_fp[92], w_fp[1], w_fp[5], COUPs[2], 0., 0., w_fp[109] ); - VVVV3P0_1( w_fp[92], w_fp[1], w_fp[5], COUPs[2], 0., 0., w_fp[110] ); - VVVV4P0_1( w_fp[92], w_fp[1], w_fp[5], COUPs[2], 0., 0., w_fp[111] ); + VVVV1P0_1( w_fp[92], w_fp[1], w_fp[5], COUPs[2], 1.0, 0., 0., w_fp[109] ); + VVVV3P0_1( w_fp[92], w_fp[1], w_fp[5], COUPs[2], 1.0, 0., 0., w_fp[110] ); + VVVV4P0_1( w_fp[92], w_fp[1], w_fp[5], COUPs[2], 1.0, 0., 0., w_fp[111] ); // Amplitude(s) for diagram number 690 - VVV1_0( w_fp[8], w_fp[4], w_fp[109], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[4], w_fp[109], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -14865,7 +14865,7 @@ namespace mg5amcCpu jamp_sv[82] -= amp_sv[0]; jamp_sv[97] -= amp_sv[0]; jamp_sv[100] += amp_sv[0]; - VVV1_0( w_fp[8], w_fp[4], w_fp[110], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[4], w_fp[110], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -14885,7 +14885,7 @@ namespace mg5amcCpu jamp_sv[76] += amp_sv[0]; jamp_sv[90] -= amp_sv[0]; jamp_sv[100] += amp_sv[0]; - VVV1_0( w_fp[8], w_fp[4], w_fp[111], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[4], w_fp[111], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -14912,7 +14912,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 691 - VVV1_0( w_fp[1], w_fp[8], w_fp[107], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[8], w_fp[107], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -14932,7 +14932,7 @@ namespace mg5amcCpu jamp_sv[88] += amp_sv[0]; jamp_sv[99] += amp_sv[0]; jamp_sv[101] -= amp_sv[0]; - VVV1_0( w_fp[1], w_fp[8], w_fp[95], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[8], w_fp[95], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -14952,7 +14952,7 @@ namespace mg5amcCpu jamp_sv[77] -= amp_sv[0]; jamp_sv[91] += amp_sv[0]; jamp_sv[101] -= amp_sv[0]; - VVV1_0( w_fp[1], w_fp[8], w_fp[105], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[8], w_fp[105], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -14979,7 +14979,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 692 - VVVV1_0( w_fp[92], w_fp[1], w_fp[8], w_fp[24], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[92], w_fp[1], w_fp[8], w_fp[24], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -14999,7 +14999,7 @@ namespace mg5amcCpu jamp_sv[88] -= amp_sv[0]; jamp_sv[96] -= amp_sv[0]; jamp_sv[97] += amp_sv[0]; - VVVV3_0( w_fp[92], w_fp[1], w_fp[8], w_fp[24], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[92], w_fp[1], w_fp[8], w_fp[24], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -15019,7 +15019,7 @@ namespace mg5amcCpu jamp_sv[97] += amp_sv[0]; jamp_sv[99] += amp_sv[0]; jamp_sv[101] -= amp_sv[0]; - VVVV4_0( w_fp[92], w_fp[1], w_fp[8], w_fp[24], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[92], w_fp[1], w_fp[8], w_fp[24], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -15046,7 +15046,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 693 - VVV1_0( w_fp[8], w_fp[24], w_fp[104], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[24], w_fp[104], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -15073,7 +15073,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 694 - VVV1_0( w_fp[1], w_fp[24], w_fp[113], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[24], w_fp[113], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -15100,7 +15100,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 695 - VVV1_0( w_fp[1], w_fp[8], w_fp[102], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[8], w_fp[102], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -15127,7 +15127,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 696 - VVV1_0( w_fp[104], w_fp[37], w_fp[5], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[104], w_fp[37], w_fp[5], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -15146,7 +15146,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 697 - FFV1_0( w_fp[3], w_fp[35], w_fp[104], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[35], w_fp[104], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -15161,7 +15161,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 698 - FFV1_0( w_fp[99], w_fp[100], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[100], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -15174,7 +15174,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 699 - FFV1_0( w_fp[99], w_fp[35], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[35], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -15187,7 +15187,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 700 - FFV1_0( w_fp[3], w_fp[100], w_fp[86], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[100], w_fp[86], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -15202,7 +15202,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 701 - VVV1_0( w_fp[86], w_fp[1], w_fp[37], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[86], w_fp[1], w_fp[37], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -15221,7 +15221,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 702 - FFV1_0( w_fp[3], w_fp[33], w_fp[109], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[33], w_fp[109], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -15233,7 +15233,7 @@ namespace mg5amcCpu jamp_sv[63] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[66] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[67] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[33], w_fp[110], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[33], w_fp[110], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -15245,7 +15245,7 @@ namespace mg5amcCpu jamp_sv[61] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[64] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[67] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[33], w_fp[111], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[33], w_fp[111], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -15264,7 +15264,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 703 - FFV1_0( w_fp[38], w_fp[33], w_fp[104], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[33], w_fp[104], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -15279,7 +15279,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 704 - FFV1_0( w_fp[38], w_fp[114], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[114], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -15292,7 +15292,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 705 - FFV1_0( w_fp[90], w_fp[33], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[90], w_fp[33], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -15305,7 +15305,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 706 - VVV1_0( w_fp[104], w_fp[45], w_fp[4], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[104], w_fp[45], w_fp[4], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -15324,7 +15324,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 707 - FFV1_0( w_fp[3], w_fp[43], w_fp[104], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[43], w_fp[104], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -15339,7 +15339,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 708 - FFV1_0( w_fp[99], w_fp[89], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[89], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -15352,7 +15352,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 709 - FFV1_0( w_fp[99], w_fp[43], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[43], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -15365,7 +15365,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 710 - FFV1_0( w_fp[3], w_fp[89], w_fp[112], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[89], w_fp[112], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -15380,7 +15380,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 711 - VVV1_0( w_fp[112], w_fp[1], w_fp[45], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[112], w_fp[1], w_fp[45], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -15399,7 +15399,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 712 - FFV1_0( w_fp[3], w_fp[39], w_fp[98], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[39], w_fp[98], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -15411,7 +15411,7 @@ namespace mg5amcCpu jamp_sv[87] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[90] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[91] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[39], w_fp[62], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[39], w_fp[62], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -15423,7 +15423,7 @@ namespace mg5amcCpu jamp_sv[85] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[88] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[91] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[39], w_fp[101], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[39], w_fp[101], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -15442,7 +15442,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 713 - FFV1_0( w_fp[46], w_fp[39], w_fp[104], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[39], w_fp[104], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -15457,7 +15457,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 714 - FFV1_0( w_fp[46], w_fp[106], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[106], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -15470,7 +15470,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 715 - FFV1_0( w_fp[88], w_fp[39], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[88], w_fp[39], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -15483,7 +15483,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 716 - VVV1_0( w_fp[104], w_fp[54], w_fp[5], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[104], w_fp[54], w_fp[5], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -15502,7 +15502,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 717 - FFV1_0( w_fp[7], w_fp[2], w_fp[104], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[7], w_fp[2], w_fp[104], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -15517,7 +15517,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 718 - FFV1_0( w_fp[78], w_fp[96], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[78], w_fp[96], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -15530,7 +15530,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 719 - FFV1_0( w_fp[7], w_fp[96], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[7], w_fp[96], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -15543,7 +15543,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 720 - FFV1_0( w_fp[78], w_fp[2], w_fp[86], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[78], w_fp[2], w_fp[86], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -15558,7 +15558,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 721 - VVV1_0( w_fp[86], w_fp[1], w_fp[54], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[86], w_fp[1], w_fp[54], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -15577,7 +15577,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 722 - FFV1_0( w_fp[46], w_fp[2], w_fp[109], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[2], w_fp[109], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -15589,7 +15589,7 @@ namespace mg5amcCpu jamp_sv[82] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[97] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[100] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[46], w_fp[2], w_fp[110], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[2], w_fp[110], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -15601,7 +15601,7 @@ namespace mg5amcCpu jamp_sv[76] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[90] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[100] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[46], w_fp[2], w_fp[111], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[2], w_fp[111], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -15620,7 +15620,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 723 - VVV1_0( w_fp[104], w_fp[23], w_fp[4], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[104], w_fp[23], w_fp[4], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -15639,7 +15639,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 724 - FFV1_0( w_fp[25], w_fp[2], w_fp[104], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[25], w_fp[2], w_fp[104], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -15654,7 +15654,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 725 - FFV1_0( w_fp[58], w_fp[96], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[58], w_fp[96], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -15667,7 +15667,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 726 - FFV1_0( w_fp[25], w_fp[96], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[25], w_fp[96], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -15680,7 +15680,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 727 - FFV1_0( w_fp[58], w_fp[2], w_fp[112], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[58], w_fp[2], w_fp[112], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -15695,7 +15695,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 728 - VVV1_0( w_fp[112], w_fp[1], w_fp[23], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[112], w_fp[1], w_fp[23], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -15714,7 +15714,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 729 - FFV1_0( w_fp[38], w_fp[2], w_fp[98], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[2], w_fp[98], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -15726,7 +15726,7 @@ namespace mg5amcCpu jamp_sv[58] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[96] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[98] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[38], w_fp[2], w_fp[62], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[2], w_fp[62], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -15738,7 +15738,7 @@ namespace mg5amcCpu jamp_sv[52] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[66] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[98] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[38], w_fp[2], w_fp[101], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[2], w_fp[101], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -15757,7 +15757,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 730 - FFV1_0( w_fp[3], w_fp[17], w_fp[104], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[17], w_fp[104], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -15776,7 +15776,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 731 - FFV1_0( w_fp[26], w_fp[2], w_fp[104], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[26], w_fp[2], w_fp[104], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -15795,7 +15795,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 732 - FFV1_0( w_fp[3], w_fp[96], w_fp[59], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[96], w_fp[59], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -15814,7 +15814,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 733 - FFV1_0( w_fp[26], w_fp[96], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[26], w_fp[96], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -15829,7 +15829,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 734 - FFV1_0( w_fp[99], w_fp[2], w_fp[59], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[2], w_fp[59], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -15848,7 +15848,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 735 - FFV1_0( w_fp[99], w_fp[17], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[17], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -15863,7 +15863,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 736 - FFV1_0( w_fp[3], w_fp[96], w_fp[73], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[96], w_fp[73], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -15875,7 +15875,7 @@ namespace mg5amcCpu jamp_sv[97] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[99] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[101] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[96], w_fp[79], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[96], w_fp[79], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -15887,7 +15887,7 @@ namespace mg5amcCpu jamp_sv[98] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[99] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[100] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[96], w_fp[80], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[96], w_fp[80], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -15906,7 +15906,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 737 - FFV1_0( w_fp[99], w_fp[2], w_fp[73], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[2], w_fp[73], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -15918,7 +15918,7 @@ namespace mg5amcCpu jamp_sv[63] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[86] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[87] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[99], w_fp[2], w_fp[79], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[2], w_fp[79], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -15930,7 +15930,7 @@ namespace mg5amcCpu jamp_sv[63] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[80] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[81] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[99], w_fp[2], w_fp[80], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[2], w_fp[80], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -15949,7 +15949,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 738 - VVV1_0( w_fp[92], w_fp[73], w_fp[8], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[92], w_fp[73], w_fp[8], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -15969,7 +15969,7 @@ namespace mg5amcCpu jamp_sv[97] -= amp_sv[0]; jamp_sv[99] -= amp_sv[0]; jamp_sv[101] += amp_sv[0]; - VVV1_0( w_fp[92], w_fp[79], w_fp[8], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[92], w_fp[79], w_fp[8], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -15989,7 +15989,7 @@ namespace mg5amcCpu jamp_sv[98] += amp_sv[0]; jamp_sv[99] -= amp_sv[0]; jamp_sv[100] += amp_sv[0]; - VVV1_0( w_fp[92], w_fp[80], w_fp[8], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[92], w_fp[80], w_fp[8], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -16013,10 +16013,10 @@ namespace mg5amcCpu // *** DIAGRAM 739 OF 1240 *** // Wavefunction(s) for diagram number 739 - FFV1_1( w_fp[77], w_fp[0], COUPs[1], cIPD[0], cIPD[1], w_fp[92] ); + FFV1_1( w_fp[77], w_fp[0], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[92] ); // Amplitude(s) for diagram number 739 - FFV1_0( w_fp[7], w_fp[92], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[7], w_fp[92], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -16028,7 +16028,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 740 - FFV1_0( w_fp[53], w_fp[92], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[53], w_fp[92], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -16037,10 +16037,10 @@ namespace mg5amcCpu // *** DIAGRAM 741 OF 1240 *** // Wavefunction(s) for diagram number 741 - FFV1_2( w_fp[46], w_fp[0], COUPs[1], cIPD[0], cIPD[1], w_fp[99] ); + FFV1_2( w_fp[46], w_fp[0], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[99] ); // Amplitude(s) for diagram number 741 - FFV1_0( w_fp[99], w_fp[9], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[9], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -16052,7 +16052,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 742 - FFV1_0( w_fp[99], w_fp[85], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[85], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -16064,7 +16064,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 743 - FFV1_0( w_fp[53], w_fp[9], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[53], w_fp[9], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -16076,7 +16076,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 744 - FFV1_0( w_fp[7], w_fp[85], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[7], w_fp[85], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -16088,7 +16088,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 745 - FFV1_0( w_fp[46], w_fp[92], w_fp[29], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[92], w_fp[29], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -16101,7 +16101,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 746 - FFV1_0( w_fp[99], w_fp[77], w_fp[29], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[77], w_fp[29], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -16111,10 +16111,10 @@ namespace mg5amcCpu // *** DIAGRAM 747 OF 1240 *** // Wavefunction(s) for diagram number 747 - VVV1P0_1( w_fp[0], w_fp[29], COUPs[0], 0., 0., w_fp[96] ); + VVV1P0_1( w_fp[0], w_fp[29], COUPs[0], 1.0, 0., 0., w_fp[96] ); // Amplitude(s) for diagram number 747 - FFV1_0( w_fp[46], w_fp[77], w_fp[96], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[77], w_fp[96], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -16129,7 +16129,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 748 - FFV1_0( w_fp[25], w_fp[92], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[25], w_fp[92], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -16141,7 +16141,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 749 - FFV1_0( w_fp[48], w_fp[92], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[48], w_fp[92], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -16150,10 +16150,10 @@ namespace mg5amcCpu // *** DIAGRAM 750 OF 1240 *** // Wavefunction(s) for diagram number 750 - FFV1_2( w_fp[38], w_fp[0], COUPs[1], cIPD[0], cIPD[1], w_fp[104] ); + FFV1_2( w_fp[38], w_fp[0], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[104] ); // Amplitude(s) for diagram number 750 - FFV1_0( w_fp[104], w_fp[87], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[104], w_fp[87], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -16165,7 +16165,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 751 - FFV1_0( w_fp[104], w_fp[85], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[104], w_fp[85], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -16177,7 +16177,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 752 - FFV1_0( w_fp[48], w_fp[87], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[48], w_fp[87], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -16189,7 +16189,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 753 - FFV1_0( w_fp[25], w_fp[85], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[25], w_fp[85], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -16201,7 +16201,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 754 - FFV1_0( w_fp[38], w_fp[92], w_fp[27], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[92], w_fp[27], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -16214,7 +16214,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 755 - FFV1_0( w_fp[104], w_fp[77], w_fp[27], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[104], w_fp[77], w_fp[27], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -16224,10 +16224,10 @@ namespace mg5amcCpu // *** DIAGRAM 756 OF 1240 *** // Wavefunction(s) for diagram number 756 - VVV1P0_1( w_fp[0], w_fp[27], COUPs[0], 0., 0., w_fp[101] ); + VVV1P0_1( w_fp[0], w_fp[27], COUPs[0], 1.0, 0., 0., w_fp[101] ); // Amplitude(s) for diagram number 756 - FFV1_0( w_fp[38], w_fp[77], w_fp[101], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[77], w_fp[101], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -16242,7 +16242,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 757 - FFV1_0( w_fp[28], w_fp[92], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[28], w_fp[92], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -16254,7 +16254,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 758 - FFV1_0( w_fp[40], w_fp[92], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[40], w_fp[92], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -16263,10 +16263,10 @@ namespace mg5amcCpu // *** DIAGRAM 759 OF 1240 *** // Wavefunction(s) for diagram number 759 - FFV1_2( w_fp[41], w_fp[0], COUPs[1], cIPD[0], cIPD[1], w_fp[62] ); + FFV1_2( w_fp[41], w_fp[0], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[62] ); // Amplitude(s) for diagram number 759 - FFV1_0( w_fp[62], w_fp[87], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[62], w_fp[87], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -16278,7 +16278,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 760 - FFV1_0( w_fp[62], w_fp[9], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[62], w_fp[9], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -16290,7 +16290,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 761 - FFV1_0( w_fp[40], w_fp[87], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[40], w_fp[87], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -16302,7 +16302,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 762 - FFV1_0( w_fp[28], w_fp[9], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[28], w_fp[9], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -16314,7 +16314,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 763 - FFV1_0( w_fp[41], w_fp[92], w_fp[24], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[92], w_fp[24], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -16327,7 +16327,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 764 - FFV1_0( w_fp[62], w_fp[77], w_fp[24], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[62], w_fp[77], w_fp[24], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -16337,10 +16337,10 @@ namespace mg5amcCpu // *** DIAGRAM 765 OF 1240 *** // Wavefunction(s) for diagram number 765 - VVV1P0_1( w_fp[0], w_fp[24], COUPs[0], 0., 0., w_fp[98] ); + VVV1P0_1( w_fp[0], w_fp[24], COUPs[0], 1.0, 0., 0., w_fp[98] ); // Amplitude(s) for diagram number 765 - FFV1_0( w_fp[41], w_fp[77], w_fp[98], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[77], w_fp[98], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -16355,7 +16355,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 766 - FFV1_0( w_fp[26], w_fp[92], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[26], w_fp[92], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -16368,7 +16368,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 767 - FFV1_0( w_fp[3], w_fp[92], w_fp[42], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[92], w_fp[42], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -16383,7 +16383,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 768 - VVV1_0( w_fp[98], w_fp[34], w_fp[6], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[98], w_fp[34], w_fp[6], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -16402,7 +16402,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 769 - FFV1_0( w_fp[3], w_fp[85], w_fp[98], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[85], w_fp[98], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -16417,7 +16417,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 770 - VVV1_0( w_fp[0], w_fp[34], w_fp[42], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[0], w_fp[34], w_fp[42], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -16436,7 +16436,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 771 - FFV1_0( w_fp[26], w_fp[85], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[26], w_fp[85], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -16446,12 +16446,12 @@ namespace mg5amcCpu // *** DIAGRAM 772 OF 1240 *** // Wavefunction(s) for diagram number 772 - VVVV1P0_1( w_fp[0], w_fp[24], w_fp[6], COUPs[2], 0., 0., w_fp[85] ); - VVVV3P0_1( w_fp[0], w_fp[24], w_fp[6], COUPs[2], 0., 0., w_fp[112] ); - VVVV4P0_1( w_fp[0], w_fp[24], w_fp[6], COUPs[2], 0., 0., w_fp[111] ); + VVVV1P0_1( w_fp[0], w_fp[24], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[85] ); + VVVV3P0_1( w_fp[0], w_fp[24], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[112] ); + VVVV4P0_1( w_fp[0], w_fp[24], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[111] ); // Amplitude(s) for diagram number 772 - FFV1_0( w_fp[3], w_fp[77], w_fp[85], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[77], w_fp[85], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -16463,7 +16463,7 @@ namespace mg5amcCpu jamp_sv[39] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[45] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[47] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[77], w_fp[112], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[77], w_fp[112], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -16475,7 +16475,7 @@ namespace mg5amcCpu jamp_sv[39] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[42] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[43] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[77], w_fp[111], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[77], w_fp[111], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -16494,7 +16494,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 773 - FFV1_0( w_fp[14], w_fp[92], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[14], w_fp[92], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -16507,7 +16507,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 774 - FFV1_0( w_fp[3], w_fp[92], w_fp[16], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[92], w_fp[16], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -16522,7 +16522,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 775 - VVV1_0( w_fp[101], w_fp[34], w_fp[5], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[101], w_fp[34], w_fp[5], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -16541,7 +16541,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 776 - FFV1_0( w_fp[3], w_fp[9], w_fp[101], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[9], w_fp[101], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -16556,7 +16556,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 777 - VVV1_0( w_fp[0], w_fp[34], w_fp[16], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[0], w_fp[34], w_fp[16], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -16575,7 +16575,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 778 - FFV1_0( w_fp[14], w_fp[9], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[14], w_fp[9], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -16585,12 +16585,12 @@ namespace mg5amcCpu // *** DIAGRAM 779 OF 1240 *** // Wavefunction(s) for diagram number 779 - VVVV1P0_1( w_fp[0], w_fp[27], w_fp[5], COUPs[2], 0., 0., w_fp[9] ); - VVVV3P0_1( w_fp[0], w_fp[27], w_fp[5], COUPs[2], 0., 0., w_fp[110] ); - VVVV4P0_1( w_fp[0], w_fp[27], w_fp[5], COUPs[2], 0., 0., w_fp[109] ); + VVVV1P0_1( w_fp[0], w_fp[27], w_fp[5], COUPs[2], 1.0, 0., 0., w_fp[9] ); + VVVV3P0_1( w_fp[0], w_fp[27], w_fp[5], COUPs[2], 1.0, 0., 0., w_fp[110] ); + VVVV4P0_1( w_fp[0], w_fp[27], w_fp[5], COUPs[2], 1.0, 0., 0., w_fp[109] ); // Amplitude(s) for diagram number 779 - FFV1_0( w_fp[3], w_fp[77], w_fp[9], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[77], w_fp[9], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -16602,7 +16602,7 @@ namespace mg5amcCpu jamp_sv[39] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[41] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[45] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[77], w_fp[110], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[77], w_fp[110], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -16614,7 +16614,7 @@ namespace mg5amcCpu jamp_sv[37] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[44] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[45] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[77], w_fp[109], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[77], w_fp[109], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -16633,7 +16633,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 780 - FFV1_0( w_fp[12], w_fp[92], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[12], w_fp[92], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -16646,7 +16646,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 781 - FFV1_0( w_fp[3], w_fp[92], w_fp[19], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[92], w_fp[19], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -16661,7 +16661,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 782 - VVV1_0( w_fp[96], w_fp[34], w_fp[4], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[96], w_fp[34], w_fp[4], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -16680,7 +16680,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 783 - FFV1_0( w_fp[3], w_fp[87], w_fp[96], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[87], w_fp[96], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -16695,7 +16695,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 784 - VVV1_0( w_fp[0], w_fp[34], w_fp[19], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[0], w_fp[34], w_fp[19], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -16714,7 +16714,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 785 - FFV1_0( w_fp[12], w_fp[87], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[12], w_fp[87], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -16724,12 +16724,12 @@ namespace mg5amcCpu // *** DIAGRAM 786 OF 1240 *** // Wavefunction(s) for diagram number 786 - VVVV1P0_1( w_fp[0], w_fp[4], w_fp[29], COUPs[2], 0., 0., w_fp[87] ); - VVVV3P0_1( w_fp[0], w_fp[4], w_fp[29], COUPs[2], 0., 0., w_fp[34] ); - VVVV4P0_1( w_fp[0], w_fp[4], w_fp[29], COUPs[2], 0., 0., w_fp[86] ); + VVVV1P0_1( w_fp[0], w_fp[4], w_fp[29], COUPs[2], 1.0, 0., 0., w_fp[87] ); + VVVV3P0_1( w_fp[0], w_fp[4], w_fp[29], COUPs[2], 1.0, 0., 0., w_fp[34] ); + VVVV4P0_1( w_fp[0], w_fp[4], w_fp[29], COUPs[2], 1.0, 0., 0., w_fp[86] ); // Amplitude(s) for diagram number 786 - FFV1_0( w_fp[3], w_fp[77], w_fp[87], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[77], w_fp[87], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -16741,7 +16741,7 @@ namespace mg5amcCpu jamp_sv[35] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[41] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[47] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[77], w_fp[34], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[77], w_fp[34], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -16753,7 +16753,7 @@ namespace mg5amcCpu jamp_sv[35] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[40] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[46] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[77], w_fp[86], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[77], w_fp[86], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -16772,7 +16772,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 787 - FFV1_0( w_fp[3], w_fp[92], w_fp[30], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[92], w_fp[30], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -16780,7 +16780,7 @@ namespace mg5amcCpu jamp_sv[25] -= amp_sv[0]; jamp_sv[27] -= amp_sv[0]; jamp_sv[29] += amp_sv[0]; - FFV1_0( w_fp[3], w_fp[92], w_fp[31], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[92], w_fp[31], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -16788,7 +16788,7 @@ namespace mg5amcCpu jamp_sv[26] += amp_sv[0]; jamp_sv[27] -= amp_sv[0]; jamp_sv[28] += amp_sv[0]; - FFV1_0( w_fp[3], w_fp[92], w_fp[32], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[92], w_fp[32], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -16800,12 +16800,12 @@ namespace mg5amcCpu // *** DIAGRAM 788 OF 1240 *** // Wavefunction(s) for diagram number 788 - VVV1P0_1( w_fp[0], w_fp[30], COUPs[0], 0., 0., w_fp[92] ); - VVV1P0_1( w_fp[0], w_fp[31], COUPs[0], 0., 0., w_fp[88] ); - VVV1P0_1( w_fp[0], w_fp[32], COUPs[0], 0., 0., w_fp[106] ); + VVV1P0_1( w_fp[0], w_fp[30], COUPs[0], 1.0, 0., 0., w_fp[92] ); + VVV1P0_1( w_fp[0], w_fp[31], COUPs[0], 1.0, 0., 0., w_fp[88] ); + VVV1P0_1( w_fp[0], w_fp[32], COUPs[0], 1.0, 0., 0., w_fp[106] ); // Amplitude(s) for diagram number 788 - FFV1_0( w_fp[3], w_fp[77], w_fp[92], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[77], w_fp[92], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -16817,7 +16817,7 @@ namespace mg5amcCpu jamp_sv[35] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[41] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[47] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[77], w_fp[88], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[77], w_fp[88], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -16829,7 +16829,7 @@ namespace mg5amcCpu jamp_sv[39] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[41] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[45] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[77], w_fp[106], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[77], w_fp[106], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -16845,10 +16845,10 @@ namespace mg5amcCpu // *** DIAGRAM 789 OF 1240 *** // Wavefunction(s) for diagram number 789 - FFV1_2( w_fp[52], w_fp[0], COUPs[1], cIPD[0], cIPD[1], w_fp[90] ); + FFV1_2( w_fp[52], w_fp[0], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[90] ); // Amplitude(s) for diagram number 789 - FFV1_0( w_fp[90], w_fp[35], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[90], w_fp[35], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -16860,7 +16860,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 790 - FFV1_0( w_fp[90], w_fp[36], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[90], w_fp[36], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -16869,10 +16869,10 @@ namespace mg5amcCpu // *** DIAGRAM 791 OF 1240 *** // Wavefunction(s) for diagram number 791 - FFV1_1( w_fp[33], w_fp[0], COUPs[1], cIPD[0], cIPD[1], w_fp[114] ); + FFV1_1( w_fp[33], w_fp[0], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[114] ); // Amplitude(s) for diagram number 791 - FFV1_0( w_fp[22], w_fp[114], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[22], w_fp[114], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -16884,7 +16884,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 792 - FFV1_0( w_fp[21], w_fp[114], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[21], w_fp[114], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -16896,7 +16896,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 793 - FFV1_0( w_fp[22], w_fp[36], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[22], w_fp[36], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -16908,7 +16908,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 794 - FFV1_0( w_fp[21], w_fp[35], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[21], w_fp[35], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -16920,7 +16920,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 795 - FFV1_0( w_fp[90], w_fp[33], w_fp[29], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[90], w_fp[33], w_fp[29], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -16933,7 +16933,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 796 - FFV1_0( w_fp[52], w_fp[114], w_fp[29], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[114], w_fp[29], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -16946,7 +16946,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 797 - FFV1_0( w_fp[52], w_fp[33], w_fp[96], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[33], w_fp[96], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -16961,7 +16961,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 798 - FFV1_0( w_fp[90], w_fp[43], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[90], w_fp[43], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -16973,7 +16973,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 799 - FFV1_0( w_fp[90], w_fp[44], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[90], w_fp[44], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -16982,10 +16982,10 @@ namespace mg5amcCpu // *** DIAGRAM 800 OF 1240 *** // Wavefunction(s) for diagram number 800 - FFV1_1( w_fp[39], w_fp[0], COUPs[1], cIPD[0], cIPD[1], w_fp[102] ); + FFV1_1( w_fp[39], w_fp[0], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[102] ); // Amplitude(s) for diagram number 800 - FFV1_0( w_fp[56], w_fp[102], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[56], w_fp[102], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -16997,7 +16997,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 801 - FFV1_0( w_fp[21], w_fp[102], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[21], w_fp[102], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -17009,7 +17009,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 802 - FFV1_0( w_fp[56], w_fp[44], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[56], w_fp[44], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -17021,7 +17021,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 803 - FFV1_0( w_fp[21], w_fp[43], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[21], w_fp[43], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -17033,7 +17033,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 804 - FFV1_0( w_fp[90], w_fp[39], w_fp[27], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[90], w_fp[39], w_fp[27], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -17046,7 +17046,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 805 - FFV1_0( w_fp[52], w_fp[102], w_fp[27], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[102], w_fp[27], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -17059,7 +17059,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 806 - FFV1_0( w_fp[52], w_fp[39], w_fp[101], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[39], w_fp[101], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -17074,7 +17074,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 807 - FFV1_0( w_fp[90], w_fp[49], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[90], w_fp[49], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -17086,7 +17086,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 808 - FFV1_0( w_fp[90], w_fp[50], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[90], w_fp[50], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -17095,10 +17095,10 @@ namespace mg5amcCpu // *** DIAGRAM 809 OF 1240 *** // Wavefunction(s) for diagram number 809 - FFV1_1( w_fp[47], w_fp[0], COUPs[1], cIPD[0], cIPD[1], w_fp[113] ); + FFV1_1( w_fp[47], w_fp[0], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[113] ); // Amplitude(s) for diagram number 809 - FFV1_0( w_fp[56], w_fp[113], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[56], w_fp[113], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -17110,7 +17110,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 810 - FFV1_0( w_fp[22], w_fp[113], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[22], w_fp[113], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -17122,7 +17122,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 811 - FFV1_0( w_fp[56], w_fp[50], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[56], w_fp[50], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -17134,7 +17134,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 812 - FFV1_0( w_fp[22], w_fp[49], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[22], w_fp[49], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -17146,7 +17146,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 813 - FFV1_0( w_fp[90], w_fp[47], w_fp[24], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[90], w_fp[47], w_fp[24], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -17159,7 +17159,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 814 - FFV1_0( w_fp[52], w_fp[113], w_fp[24], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[113], w_fp[24], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -17172,7 +17172,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 815 - FFV1_0( w_fp[52], w_fp[47], w_fp[98], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[47], w_fp[98], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -17187,7 +17187,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 816 - FFV1_0( w_fp[90], w_fp[17], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[90], w_fp[17], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -17200,7 +17200,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 817 - FFV1_0( w_fp[90], w_fp[2], w_fp[42], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[90], w_fp[2], w_fp[42], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -17215,7 +17215,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 818 - VVV1_0( w_fp[98], w_fp[103], w_fp[6], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[98], w_fp[103], w_fp[6], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -17234,7 +17234,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 819 - FFV1_0( w_fp[21], w_fp[2], w_fp[98], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[21], w_fp[2], w_fp[98], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -17249,7 +17249,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 820 - VVV1_0( w_fp[0], w_fp[103], w_fp[42], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[0], w_fp[103], w_fp[42], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -17268,7 +17268,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 821 - FFV1_0( w_fp[21], w_fp[17], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[21], w_fp[17], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -17281,7 +17281,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 822 - FFV1_0( w_fp[52], w_fp[2], w_fp[85], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[2], w_fp[85], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -17293,7 +17293,7 @@ namespace mg5amcCpu jamp_sv[88] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[112] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[118] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[52], w_fp[2], w_fp[112], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[2], w_fp[112], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -17305,7 +17305,7 @@ namespace mg5amcCpu jamp_sv[88] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[99] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[101] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[52], w_fp[2], w_fp[111], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[2], w_fp[111], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -17324,7 +17324,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 823 - FFV1_0( w_fp[90], w_fp[15], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[90], w_fp[15], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -17337,7 +17337,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 824 - FFV1_0( w_fp[90], w_fp[2], w_fp[16], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[90], w_fp[2], w_fp[16], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -17352,7 +17352,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 825 - VVV1_0( w_fp[101], w_fp[103], w_fp[5], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[101], w_fp[103], w_fp[5], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -17371,7 +17371,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 826 - FFV1_0( w_fp[22], w_fp[2], w_fp[101], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[22], w_fp[2], w_fp[101], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -17386,7 +17386,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 827 - VVV1_0( w_fp[0], w_fp[103], w_fp[16], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[0], w_fp[103], w_fp[16], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -17405,7 +17405,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 828 - FFV1_0( w_fp[22], w_fp[15], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[22], w_fp[15], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -17418,7 +17418,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 829 - FFV1_0( w_fp[52], w_fp[2], w_fp[9], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[2], w_fp[9], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -17430,7 +17430,7 @@ namespace mg5amcCpu jamp_sv[88] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[94] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[112] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[52], w_fp[2], w_fp[110], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[2], w_fp[110], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -17442,7 +17442,7 @@ namespace mg5amcCpu jamp_sv[77] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[109] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[112] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[52], w_fp[2], w_fp[109], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[2], w_fp[109], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -17461,7 +17461,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 830 - FFV1_0( w_fp[90], w_fp[18], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[90], w_fp[18], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -17474,7 +17474,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 831 - FFV1_0( w_fp[90], w_fp[2], w_fp[19], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[90], w_fp[2], w_fp[19], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -17489,7 +17489,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 832 - VVV1_0( w_fp[96], w_fp[103], w_fp[4], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[96], w_fp[103], w_fp[4], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -17508,7 +17508,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 833 - FFV1_0( w_fp[56], w_fp[2], w_fp[96], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[56], w_fp[2], w_fp[96], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -17523,7 +17523,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 834 - VVV1_0( w_fp[0], w_fp[103], w_fp[19], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[0], w_fp[103], w_fp[19], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -17542,7 +17542,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 835 - FFV1_0( w_fp[56], w_fp[18], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[56], w_fp[18], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -17555,7 +17555,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 836 - FFV1_0( w_fp[52], w_fp[2], w_fp[87], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[2], w_fp[87], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -17567,7 +17567,7 @@ namespace mg5amcCpu jamp_sv[70] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[94] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[118] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[52], w_fp[2], w_fp[34], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[2], w_fp[34], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -17579,7 +17579,7 @@ namespace mg5amcCpu jamp_sv[70] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[91] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[115] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[52], w_fp[2], w_fp[86], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[2], w_fp[86], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -17598,7 +17598,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 837 - FFV1_0( w_fp[90], w_fp[2], w_fp[30], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[90], w_fp[2], w_fp[30], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -17606,7 +17606,7 @@ namespace mg5amcCpu jamp_sv[70] -= amp_sv[0]; jamp_sv[94] -= amp_sv[0]; jamp_sv[118] += amp_sv[0]; - FFV1_0( w_fp[90], w_fp[2], w_fp[31], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[90], w_fp[2], w_fp[31], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -17614,7 +17614,7 @@ namespace mg5amcCpu jamp_sv[88] += amp_sv[0]; jamp_sv[94] -= amp_sv[0]; jamp_sv[112] += amp_sv[0]; - FFV1_0( w_fp[90], w_fp[2], w_fp[32], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[90], w_fp[2], w_fp[32], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -17629,7 +17629,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 838 - FFV1_0( w_fp[52], w_fp[2], w_fp[92], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[2], w_fp[92], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -17641,7 +17641,7 @@ namespace mg5amcCpu jamp_sv[70] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[94] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[118] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[52], w_fp[2], w_fp[88], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[2], w_fp[88], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -17653,7 +17653,7 @@ namespace mg5amcCpu jamp_sv[88] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[94] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[112] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[52], w_fp[2], w_fp[106], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[2], w_fp[106], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -17669,10 +17669,10 @@ namespace mg5amcCpu // *** DIAGRAM 839 OF 1240 *** // Wavefunction(s) for diagram number 839 - VVV1P0_1( w_fp[0], w_fp[61], COUPs[0], 0., 0., w_fp[90] ); + VVV1P0_1( w_fp[0], w_fp[61], COUPs[0], 1.0, 0., 0., w_fp[90] ); // Amplitude(s) for diagram number 839 - VVV1_0( w_fp[90], w_fp[10], w_fp[6], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[90], w_fp[10], w_fp[6], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -17699,7 +17699,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 840 - VVV1_0( w_fp[90], w_fp[11], w_fp[5], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[90], w_fp[11], w_fp[5], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -17726,7 +17726,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 841 - VVVV1_0( w_fp[8], w_fp[5], w_fp[6], w_fp[90], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[8], w_fp[5], w_fp[6], w_fp[90], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -17746,7 +17746,7 @@ namespace mg5amcCpu jamp_sv[98] -= amp_sv[0]; jamp_sv[104] -= amp_sv[0]; jamp_sv[110] += amp_sv[0]; - VVVV3_0( w_fp[8], w_fp[5], w_fp[6], w_fp[90], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[8], w_fp[5], w_fp[6], w_fp[90], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -17766,7 +17766,7 @@ namespace mg5amcCpu jamp_sv[115] += amp_sv[0]; jamp_sv[117] += amp_sv[0]; jamp_sv[119] -= amp_sv[0]; - VVVV4_0( w_fp[8], w_fp[5], w_fp[6], w_fp[90], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[8], w_fp[5], w_fp[6], w_fp[90], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -17790,10 +17790,10 @@ namespace mg5amcCpu // *** DIAGRAM 842 OF 1240 *** // Wavefunction(s) for diagram number 842 - VVV1P0_1( w_fp[0], w_fp[8], COUPs[0], 0., 0., w_fp[56] ); + VVV1P0_1( w_fp[0], w_fp[8], COUPs[0], 1.0, 0., 0., w_fp[56] ); // Amplitude(s) for diagram number 842 - VVV1_0( w_fp[56], w_fp[63], w_fp[6], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[56], w_fp[63], w_fp[6], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -17820,7 +17820,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 843 - VVV1_0( w_fp[56], w_fp[64], w_fp[5], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[56], w_fp[64], w_fp[5], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -17847,7 +17847,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 844 - VVVV1_0( w_fp[61], w_fp[5], w_fp[6], w_fp[56], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[61], w_fp[5], w_fp[6], w_fp[56], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -17867,7 +17867,7 @@ namespace mg5amcCpu jamp_sv[111] -= amp_sv[0]; jamp_sv[117] -= amp_sv[0]; jamp_sv[119] += amp_sv[0]; - VVVV3_0( w_fp[61], w_fp[5], w_fp[6], w_fp[56], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[61], w_fp[5], w_fp[6], w_fp[56], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -17887,7 +17887,7 @@ namespace mg5amcCpu jamp_sv[95] += amp_sv[0]; jamp_sv[105] += amp_sv[0]; jamp_sv[111] -= amp_sv[0]; - VVVV4_0( w_fp[61], w_fp[5], w_fp[6], w_fp[56], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[61], w_fp[5], w_fp[6], w_fp[56], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -17914,7 +17914,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 845 - VVV1_0( w_fp[0], w_fp[63], w_fp[11], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[0], w_fp[63], w_fp[11], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -17941,7 +17941,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 846 - VVV1_0( w_fp[0], w_fp[64], w_fp[10], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[0], w_fp[64], w_fp[10], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -17965,12 +17965,12 @@ namespace mg5amcCpu // *** DIAGRAM 847 OF 1240 *** // Wavefunction(s) for diagram number 847 - VVVV1P0_1( w_fp[0], w_fp[61], w_fp[5], COUPs[2], 0., 0., w_fp[103] ); - VVVV3P0_1( w_fp[0], w_fp[61], w_fp[5], COUPs[2], 0., 0., w_fp[22] ); - VVVV4P0_1( w_fp[0], w_fp[61], w_fp[5], COUPs[2], 0., 0., w_fp[21] ); + VVVV1P0_1( w_fp[0], w_fp[61], w_fp[5], COUPs[2], 1.0, 0., 0., w_fp[103] ); + VVVV3P0_1( w_fp[0], w_fp[61], w_fp[5], COUPs[2], 1.0, 0., 0., w_fp[22] ); + VVVV4P0_1( w_fp[0], w_fp[61], w_fp[5], COUPs[2], 1.0, 0., 0., w_fp[21] ); // Amplitude(s) for diagram number 847 - VVV1_0( w_fp[8], w_fp[6], w_fp[103], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[6], w_fp[103], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -17990,7 +17990,7 @@ namespace mg5amcCpu jamp_sv[111] -= amp_sv[0]; jamp_sv[117] -= amp_sv[0]; jamp_sv[119] += amp_sv[0]; - VVV1_0( w_fp[8], w_fp[6], w_fp[22], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[6], w_fp[22], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -18010,7 +18010,7 @@ namespace mg5amcCpu jamp_sv[111] -= amp_sv[0]; jamp_sv[114] -= amp_sv[0]; jamp_sv[115] += amp_sv[0]; - VVV1_0( w_fp[8], w_fp[6], w_fp[21], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[6], w_fp[21], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -18034,12 +18034,12 @@ namespace mg5amcCpu // *** DIAGRAM 848 OF 1240 *** // Wavefunction(s) for diagram number 848 - VVVV1P0_1( w_fp[0], w_fp[61], w_fp[6], COUPs[2], 0., 0., w_fp[105] ); - VVVV3P0_1( w_fp[0], w_fp[61], w_fp[6], COUPs[2], 0., 0., w_fp[95] ); - VVVV4P0_1( w_fp[0], w_fp[61], w_fp[6], COUPs[2], 0., 0., w_fp[107] ); + VVVV1P0_1( w_fp[0], w_fp[61], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[105] ); + VVVV3P0_1( w_fp[0], w_fp[61], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[95] ); + VVVV4P0_1( w_fp[0], w_fp[61], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[107] ); // Amplitude(s) for diagram number 848 - VVV1_0( w_fp[8], w_fp[5], w_fp[105], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[5], w_fp[105], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -18059,7 +18059,7 @@ namespace mg5amcCpu jamp_sv[95] += amp_sv[0]; jamp_sv[104] += amp_sv[0]; jamp_sv[110] -= amp_sv[0]; - VVV1_0( w_fp[8], w_fp[5], w_fp[95], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[5], w_fp[95], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -18079,7 +18079,7 @@ namespace mg5amcCpu jamp_sv[91] += amp_sv[0]; jamp_sv[96] += amp_sv[0]; jamp_sv[98] -= amp_sv[0]; - VVV1_0( w_fp[8], w_fp[5], w_fp[107], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[5], w_fp[107], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -18103,12 +18103,12 @@ namespace mg5amcCpu // *** DIAGRAM 849 OF 1240 *** // Wavefunction(s) for diagram number 849 - VVVV1P0_1( w_fp[0], w_fp[8], w_fp[5], COUPs[2], 0., 0., w_fp[115] ); - VVVV3P0_1( w_fp[0], w_fp[8], w_fp[5], COUPs[2], 0., 0., w_fp[116] ); - VVVV4P0_1( w_fp[0], w_fp[8], w_fp[5], COUPs[2], 0., 0., w_fp[117] ); + VVVV1P0_1( w_fp[0], w_fp[8], w_fp[5], COUPs[2], 1.0, 0., 0., w_fp[115] ); + VVVV3P0_1( w_fp[0], w_fp[8], w_fp[5], COUPs[2], 1.0, 0., 0., w_fp[116] ); + VVVV4P0_1( w_fp[0], w_fp[8], w_fp[5], COUPs[2], 1.0, 0., 0., w_fp[117] ); // Amplitude(s) for diagram number 849 - VVV1_0( w_fp[61], w_fp[6], w_fp[115], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[61], w_fp[6], w_fp[115], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -18128,7 +18128,7 @@ namespace mg5amcCpu jamp_sv[95] -= amp_sv[0]; jamp_sv[104] -= amp_sv[0]; jamp_sv[110] += amp_sv[0]; - VVV1_0( w_fp[61], w_fp[6], w_fp[116], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[61], w_fp[6], w_fp[116], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -18148,7 +18148,7 @@ namespace mg5amcCpu jamp_sv[105] += amp_sv[0]; jamp_sv[110] += amp_sv[0]; jamp_sv[111] -= amp_sv[0]; - VVV1_0( w_fp[61], w_fp[6], w_fp[117], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[61], w_fp[6], w_fp[117], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -18172,12 +18172,12 @@ namespace mg5amcCpu // *** DIAGRAM 850 OF 1240 *** // Wavefunction(s) for diagram number 850 - VVVV1P0_1( w_fp[0], w_fp[8], w_fp[6], COUPs[2], 0., 0., w_fp[118] ); - VVVV3P0_1( w_fp[0], w_fp[8], w_fp[6], COUPs[2], 0., 0., w_fp[119] ); - VVVV4P0_1( w_fp[0], w_fp[8], w_fp[6], COUPs[2], 0., 0., w_fp[120] ); + VVVV1P0_1( w_fp[0], w_fp[8], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[118] ); + VVVV3P0_1( w_fp[0], w_fp[8], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[119] ); + VVVV4P0_1( w_fp[0], w_fp[8], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[120] ); // Amplitude(s) for diagram number 850 - VVV1_0( w_fp[61], w_fp[5], w_fp[118], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[61], w_fp[5], w_fp[118], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -18197,7 +18197,7 @@ namespace mg5amcCpu jamp_sv[111] += amp_sv[0]; jamp_sv[117] += amp_sv[0]; jamp_sv[119] -= amp_sv[0]; - VVV1_0( w_fp[61], w_fp[5], w_fp[119], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[61], w_fp[5], w_fp[119], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -18217,7 +18217,7 @@ namespace mg5amcCpu jamp_sv[98] -= amp_sv[0]; jamp_sv[100] -= amp_sv[0]; jamp_sv[101] += amp_sv[0]; - VVV1_0( w_fp[61], w_fp[5], w_fp[120], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[61], w_fp[5], w_fp[120], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -18244,7 +18244,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 851 - VVVV1_0( w_fp[0], w_fp[61], w_fp[8], w_fp[29], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[0], w_fp[61], w_fp[8], w_fp[29], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -18264,7 +18264,7 @@ namespace mg5amcCpu jamp_sv[115] -= amp_sv[0]; jamp_sv[117] -= amp_sv[0]; jamp_sv[119] += amp_sv[0]; - VVVV3_0( w_fp[0], w_fp[61], w_fp[8], w_fp[29], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[0], w_fp[61], w_fp[8], w_fp[29], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -18284,7 +18284,7 @@ namespace mg5amcCpu jamp_sv[95] -= amp_sv[0]; jamp_sv[117] -= amp_sv[0]; jamp_sv[119] += amp_sv[0]; - VVVV4_0( w_fp[0], w_fp[61], w_fp[8], w_fp[29], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[0], w_fp[61], w_fp[8], w_fp[29], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -18311,7 +18311,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 852 - VVV1_0( w_fp[8], w_fp[29], w_fp[90], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[29], w_fp[90], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -18338,7 +18338,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 853 - VVV1_0( w_fp[61], w_fp[29], w_fp[56], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[61], w_fp[29], w_fp[56], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -18365,7 +18365,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 854 - VVV1_0( w_fp[61], w_fp[8], w_fp[96], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[61], w_fp[8], w_fp[96], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -18392,7 +18392,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 855 - VVV1_0( w_fp[90], w_fp[45], w_fp[6], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[90], w_fp[45], w_fp[6], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -18411,7 +18411,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 856 - FFV1_0( w_fp[3], w_fp[44], w_fp[90], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[44], w_fp[90], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -18426,7 +18426,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 857 - FFV1_0( w_fp[65], w_fp[102], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[65], w_fp[102], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -18439,7 +18439,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 858 - FFV1_0( w_fp[3], w_fp[102], w_fp[64], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[102], w_fp[64], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -18454,7 +18454,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 859 - FFV1_0( w_fp[65], w_fp[44], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[65], w_fp[44], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -18467,7 +18467,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 860 - VVV1_0( w_fp[0], w_fp[64], w_fp[45], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[0], w_fp[64], w_fp[45], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -18486,7 +18486,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 861 - FFV1_0( w_fp[3], w_fp[39], w_fp[105], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[39], w_fp[105], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -18498,7 +18498,7 @@ namespace mg5amcCpu jamp_sv[87] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[93] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[95] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[39], w_fp[95], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[39], w_fp[95], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -18510,7 +18510,7 @@ namespace mg5amcCpu jamp_sv[87] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[90] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[91] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[39], w_fp[107], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[39], w_fp[107], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -18529,7 +18529,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 862 - FFV1_0( w_fp[41], w_fp[39], w_fp[90], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[39], w_fp[90], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -18544,7 +18544,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 863 - FFV1_0( w_fp[41], w_fp[102], w_fp[61], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[102], w_fp[61], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -18557,7 +18557,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 864 - FFV1_0( w_fp[62], w_fp[39], w_fp[61], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[62], w_fp[39], w_fp[61], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -18570,7 +18570,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 865 - VVV1_0( w_fp[90], w_fp[51], w_fp[5], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[90], w_fp[51], w_fp[5], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -18589,7 +18589,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 866 - FFV1_0( w_fp[3], w_fp[50], w_fp[90], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[50], w_fp[90], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -18604,7 +18604,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 867 - FFV1_0( w_fp[65], w_fp[113], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[65], w_fp[113], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -18617,7 +18617,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 868 - FFV1_0( w_fp[3], w_fp[113], w_fp[63], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[113], w_fp[63], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -18632,7 +18632,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 869 - FFV1_0( w_fp[65], w_fp[50], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[65], w_fp[50], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -18645,7 +18645,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 870 - VVV1_0( w_fp[0], w_fp[63], w_fp[51], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[0], w_fp[63], w_fp[51], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -18664,7 +18664,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 871 - FFV1_0( w_fp[3], w_fp[47], w_fp[103], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[47], w_fp[103], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -18676,7 +18676,7 @@ namespace mg5amcCpu jamp_sv[111] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[117] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[119] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[47], w_fp[22], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[47], w_fp[22], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -18688,7 +18688,7 @@ namespace mg5amcCpu jamp_sv[111] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[114] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[115] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[47], w_fp[21], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[47], w_fp[21], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -18707,7 +18707,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 872 - FFV1_0( w_fp[38], w_fp[47], w_fp[90], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[47], w_fp[90], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -18722,7 +18722,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 873 - FFV1_0( w_fp[38], w_fp[113], w_fp[61], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[113], w_fp[61], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -18735,7 +18735,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 874 - FFV1_0( w_fp[104], w_fp[47], w_fp[61], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[104], w_fp[47], w_fp[61], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -18748,7 +18748,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 875 - VVV1_0( w_fp[90], w_fp[23], w_fp[6], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[90], w_fp[23], w_fp[6], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -18767,7 +18767,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 876 - FFV1_0( w_fp[48], w_fp[2], w_fp[90], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[48], w_fp[2], w_fp[90], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -18782,7 +18782,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 877 - FFV1_0( w_fp[104], w_fp[93], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[104], w_fp[93], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -18795,7 +18795,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 878 - FFV1_0( w_fp[104], w_fp[2], w_fp[64], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[104], w_fp[2], w_fp[64], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -18810,7 +18810,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 879 - FFV1_0( w_fp[48], w_fp[93], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[48], w_fp[93], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -18823,7 +18823,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 880 - VVV1_0( w_fp[0], w_fp[64], w_fp[23], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[0], w_fp[64], w_fp[23], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -18842,7 +18842,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 881 - FFV1_0( w_fp[38], w_fp[2], w_fp[105], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[2], w_fp[105], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -18854,7 +18854,7 @@ namespace mg5amcCpu jamp_sv[58] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[104] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[110] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[38], w_fp[2], w_fp[95], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[2], w_fp[95], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -18866,7 +18866,7 @@ namespace mg5amcCpu jamp_sv[58] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[96] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[98] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[38], w_fp[2], w_fp[107], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[2], w_fp[107], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -18885,7 +18885,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 882 - VVV1_0( w_fp[90], w_fp[20], w_fp[5], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[90], w_fp[20], w_fp[5], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -18904,7 +18904,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 883 - FFV1_0( w_fp[40], w_fp[2], w_fp[90], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[40], w_fp[2], w_fp[90], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -18919,7 +18919,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 884 - FFV1_0( w_fp[62], w_fp[93], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[62], w_fp[93], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -18932,7 +18932,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 885 - FFV1_0( w_fp[62], w_fp[2], w_fp[63], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[62], w_fp[2], w_fp[63], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -18947,7 +18947,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 886 - FFV1_0( w_fp[40], w_fp[93], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[40], w_fp[93], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -18960,7 +18960,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 887 - VVV1_0( w_fp[0], w_fp[63], w_fp[20], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[0], w_fp[63], w_fp[20], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -18979,7 +18979,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 888 - FFV1_0( w_fp[41], w_fp[2], w_fp[103], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[2], w_fp[103], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -18991,7 +18991,7 @@ namespace mg5amcCpu jamp_sv[56] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[80] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[86] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[41], w_fp[2], w_fp[22], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[2], w_fp[22], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -19003,7 +19003,7 @@ namespace mg5amcCpu jamp_sv[56] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[72] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[74] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[41], w_fp[2], w_fp[21], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[2], w_fp[21], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -19022,7 +19022,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 889 - FFV1_0( w_fp[3], w_fp[18], w_fp[90], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[18], w_fp[90], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -19041,7 +19041,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 890 - FFV1_0( w_fp[12], w_fp[2], w_fp[90], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[12], w_fp[2], w_fp[90], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -19060,7 +19060,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 891 - FFV1_0( w_fp[3], w_fp[93], w_fp[96], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[93], w_fp[96], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -19079,7 +19079,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 892 - FFV1_0( w_fp[65], w_fp[2], w_fp[96], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[65], w_fp[2], w_fp[96], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -19098,7 +19098,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 893 - FFV1_0( w_fp[12], w_fp[93], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[12], w_fp[93], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -19113,7 +19113,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 894 - FFV1_0( w_fp[65], w_fp[18], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[65], w_fp[18], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -19125,10 +19125,10 @@ namespace mg5amcCpu // *** DIAGRAM 895 OF 1240 *** // Wavefunction(s) for diagram number 895 - VVV1P0_1( w_fp[0], w_fp[66], COUPs[0], 0., 0., w_fp[65] ); + VVV1P0_1( w_fp[0], w_fp[66], COUPs[0], 1.0, 0., 0., w_fp[65] ); // Amplitude(s) for diagram number 895 - VVV1_0( w_fp[65], w_fp[13], w_fp[6], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[65], w_fp[13], w_fp[6], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -19155,7 +19155,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 896 - VVV1_0( w_fp[65], w_fp[11], w_fp[4], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[65], w_fp[11], w_fp[4], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -19182,7 +19182,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 897 - VVVV1_0( w_fp[8], w_fp[4], w_fp[6], w_fp[65], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[8], w_fp[4], w_fp[6], w_fp[65], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -19202,7 +19202,7 @@ namespace mg5amcCpu jamp_sv[100] -= amp_sv[0]; jamp_sv[106] -= amp_sv[0]; jamp_sv[116] += amp_sv[0]; - VVVV3_0( w_fp[8], w_fp[4], w_fp[6], w_fp[65], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[8], w_fp[4], w_fp[6], w_fp[65], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -19222,7 +19222,7 @@ namespace mg5amcCpu jamp_sv[111] += amp_sv[0]; jamp_sv[113] -= amp_sv[0]; jamp_sv[116] += amp_sv[0]; - VVVV4_0( w_fp[8], w_fp[4], w_fp[6], w_fp[65], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[8], w_fp[4], w_fp[6], w_fp[65], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -19249,7 +19249,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 898 - VVV1_0( w_fp[56], w_fp[69], w_fp[6], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[56], w_fp[69], w_fp[6], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -19276,7 +19276,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 899 - VVV1_0( w_fp[56], w_fp[70], w_fp[4], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[56], w_fp[70], w_fp[4], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -19303,7 +19303,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 900 - VVVV1_0( w_fp[66], w_fp[4], w_fp[6], w_fp[56], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[66], w_fp[4], w_fp[6], w_fp[56], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -19323,7 +19323,7 @@ namespace mg5amcCpu jamp_sv[111] -= amp_sv[0]; jamp_sv[113] += amp_sv[0]; jamp_sv[117] -= amp_sv[0]; - VVVV3_0( w_fp[66], w_fp[4], w_fp[6], w_fp[56], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[66], w_fp[4], w_fp[6], w_fp[56], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -19343,7 +19343,7 @@ namespace mg5amcCpu jamp_sv[83] += amp_sv[0]; jamp_sv[107] += amp_sv[0]; jamp_sv[117] -= amp_sv[0]; - VVVV4_0( w_fp[66], w_fp[4], w_fp[6], w_fp[56], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[66], w_fp[4], w_fp[6], w_fp[56], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -19370,7 +19370,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 901 - VVV1_0( w_fp[0], w_fp[69], w_fp[11], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[0], w_fp[69], w_fp[11], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -19397,7 +19397,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 902 - VVV1_0( w_fp[0], w_fp[70], w_fp[13], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[0], w_fp[70], w_fp[13], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -19421,12 +19421,12 @@ namespace mg5amcCpu // *** DIAGRAM 903 OF 1240 *** // Wavefunction(s) for diagram number 903 - VVVV1P0_1( w_fp[0], w_fp[66], w_fp[4], COUPs[2], 0., 0., w_fp[93] ); - VVVV3P0_1( w_fp[0], w_fp[66], w_fp[4], COUPs[2], 0., 0., w_fp[90] ); - VVVV4P0_1( w_fp[0], w_fp[66], w_fp[4], COUPs[2], 0., 0., w_fp[21] ); + VVVV1P0_1( w_fp[0], w_fp[66], w_fp[4], COUPs[2], 1.0, 0., 0., w_fp[93] ); + VVVV3P0_1( w_fp[0], w_fp[66], w_fp[4], COUPs[2], 1.0, 0., 0., w_fp[90] ); + VVVV4P0_1( w_fp[0], w_fp[66], w_fp[4], COUPs[2], 1.0, 0., 0., w_fp[21] ); // Amplitude(s) for diagram number 903 - VVV1_0( w_fp[8], w_fp[6], w_fp[93], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[6], w_fp[93], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -19446,7 +19446,7 @@ namespace mg5amcCpu jamp_sv[111] -= amp_sv[0]; jamp_sv[113] += amp_sv[0]; jamp_sv[117] -= amp_sv[0]; - VVV1_0( w_fp[8], w_fp[6], w_fp[90], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[6], w_fp[90], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -19466,7 +19466,7 @@ namespace mg5amcCpu jamp_sv[109] += amp_sv[0]; jamp_sv[116] += amp_sv[0]; jamp_sv[117] -= amp_sv[0]; - VVV1_0( w_fp[8], w_fp[6], w_fp[21], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[6], w_fp[21], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -19490,12 +19490,12 @@ namespace mg5amcCpu // *** DIAGRAM 904 OF 1240 *** // Wavefunction(s) for diagram number 904 - VVVV1P0_1( w_fp[0], w_fp[66], w_fp[6], COUPs[2], 0., 0., w_fp[22] ); - VVVV3P0_1( w_fp[0], w_fp[66], w_fp[6], COUPs[2], 0., 0., w_fp[103] ); - VVVV4P0_1( w_fp[0], w_fp[66], w_fp[6], COUPs[2], 0., 0., w_fp[63] ); + VVVV1P0_1( w_fp[0], w_fp[66], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[22] ); + VVVV3P0_1( w_fp[0], w_fp[66], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[103] ); + VVVV4P0_1( w_fp[0], w_fp[66], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[63] ); // Amplitude(s) for diagram number 904 - VVV1_0( w_fp[8], w_fp[4], w_fp[22], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[4], w_fp[22], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -19515,7 +19515,7 @@ namespace mg5amcCpu jamp_sv[82] += amp_sv[0]; jamp_sv[106] += amp_sv[0]; jamp_sv[116] -= amp_sv[0]; - VVV1_0( w_fp[8], w_fp[4], w_fp[103], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[4], w_fp[103], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -19535,7 +19535,7 @@ namespace mg5amcCpu jamp_sv[82] += amp_sv[0]; jamp_sv[97] += amp_sv[0]; jamp_sv[100] -= amp_sv[0]; - VVV1_0( w_fp[8], w_fp[4], w_fp[63], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[4], w_fp[63], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -19559,12 +19559,12 @@ namespace mg5amcCpu // *** DIAGRAM 905 OF 1240 *** // Wavefunction(s) for diagram number 905 - VVVV1P0_1( w_fp[0], w_fp[8], w_fp[4], COUPs[2], 0., 0., w_fp[107] ); - VVVV3P0_1( w_fp[0], w_fp[8], w_fp[4], COUPs[2], 0., 0., w_fp[95] ); - VVVV4P0_1( w_fp[0], w_fp[8], w_fp[4], COUPs[2], 0., 0., w_fp[105] ); + VVVV1P0_1( w_fp[0], w_fp[8], w_fp[4], COUPs[2], 1.0, 0., 0., w_fp[107] ); + VVVV3P0_1( w_fp[0], w_fp[8], w_fp[4], COUPs[2], 1.0, 0., 0., w_fp[95] ); + VVVV4P0_1( w_fp[0], w_fp[8], w_fp[4], COUPs[2], 1.0, 0., 0., w_fp[105] ); // Amplitude(s) for diagram number 905 - VVV1_0( w_fp[66], w_fp[6], w_fp[107], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[66], w_fp[6], w_fp[107], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -19584,7 +19584,7 @@ namespace mg5amcCpu jamp_sv[82] -= amp_sv[0]; jamp_sv[106] -= amp_sv[0]; jamp_sv[116] += amp_sv[0]; - VVV1_0( w_fp[66], w_fp[6], w_fp[95], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[66], w_fp[6], w_fp[95], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -19604,7 +19604,7 @@ namespace mg5amcCpu jamp_sv[107] += amp_sv[0]; jamp_sv[116] += amp_sv[0]; jamp_sv[117] -= amp_sv[0]; - VVV1_0( w_fp[66], w_fp[6], w_fp[105], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[66], w_fp[6], w_fp[105], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -19631,7 +19631,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 906 - VVV1_0( w_fp[66], w_fp[4], w_fp[118], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[66], w_fp[4], w_fp[118], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -19651,7 +19651,7 @@ namespace mg5amcCpu jamp_sv[111] += amp_sv[0]; jamp_sv[113] -= amp_sv[0]; jamp_sv[117] += amp_sv[0]; - VVV1_0( w_fp[66], w_fp[4], w_fp[119], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[66], w_fp[4], w_fp[119], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -19671,7 +19671,7 @@ namespace mg5amcCpu jamp_sv[98] -= amp_sv[0]; jamp_sv[99] += amp_sv[0]; jamp_sv[100] -= amp_sv[0]; - VVV1_0( w_fp[66], w_fp[4], w_fp[120], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[66], w_fp[4], w_fp[120], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -19698,7 +19698,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 907 - VVVV1_0( w_fp[0], w_fp[66], w_fp[8], w_fp[27], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[0], w_fp[66], w_fp[8], w_fp[27], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -19718,7 +19718,7 @@ namespace mg5amcCpu jamp_sv[109] -= amp_sv[0]; jamp_sv[111] -= amp_sv[0]; jamp_sv[113] += amp_sv[0]; - VVVV3_0( w_fp[0], w_fp[66], w_fp[8], w_fp[27], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[0], w_fp[66], w_fp[8], w_fp[27], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -19738,7 +19738,7 @@ namespace mg5amcCpu jamp_sv[83] -= amp_sv[0]; jamp_sv[111] -= amp_sv[0]; jamp_sv[113] += amp_sv[0]; - VVVV4_0( w_fp[0], w_fp[66], w_fp[8], w_fp[27], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[0], w_fp[66], w_fp[8], w_fp[27], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -19765,7 +19765,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 908 - VVV1_0( w_fp[8], w_fp[27], w_fp[65], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[27], w_fp[65], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -19792,7 +19792,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 909 - VVV1_0( w_fp[66], w_fp[27], w_fp[56], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[66], w_fp[27], w_fp[56], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -19819,7 +19819,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 910 - VVV1_0( w_fp[66], w_fp[8], w_fp[101], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[66], w_fp[8], w_fp[101], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -19846,7 +19846,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 911 - VVV1_0( w_fp[65], w_fp[37], w_fp[6], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[65], w_fp[37], w_fp[6], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -19865,7 +19865,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 912 - FFV1_0( w_fp[3], w_fp[36], w_fp[65], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[36], w_fp[65], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -19880,7 +19880,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 913 - FFV1_0( w_fp[71], w_fp[114], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[71], w_fp[114], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -19893,7 +19893,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 914 - FFV1_0( w_fp[3], w_fp[114], w_fp[70], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[114], w_fp[70], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -19908,7 +19908,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 915 - FFV1_0( w_fp[71], w_fp[36], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[71], w_fp[36], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -19921,7 +19921,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 916 - VVV1_0( w_fp[0], w_fp[70], w_fp[37], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[0], w_fp[70], w_fp[37], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -19940,7 +19940,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 917 - FFV1_0( w_fp[3], w_fp[33], w_fp[22], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[33], w_fp[22], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -19952,7 +19952,7 @@ namespace mg5amcCpu jamp_sv[63] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[69] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[71] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[33], w_fp[103], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[33], w_fp[103], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -19964,7 +19964,7 @@ namespace mg5amcCpu jamp_sv[63] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[66] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[67] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[33], w_fp[63], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[33], w_fp[63], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -19983,7 +19983,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 918 - FFV1_0( w_fp[41], w_fp[33], w_fp[65], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[33], w_fp[65], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -19998,7 +19998,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 919 - FFV1_0( w_fp[41], w_fp[114], w_fp[66], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[114], w_fp[66], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -20011,7 +20011,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 920 - FFV1_0( w_fp[62], w_fp[33], w_fp[66], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[62], w_fp[33], w_fp[66], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -20024,7 +20024,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 921 - VVV1_0( w_fp[65], w_fp[51], w_fp[4], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[65], w_fp[51], w_fp[4], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -20043,7 +20043,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 922 - FFV1_0( w_fp[3], w_fp[49], w_fp[65], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[49], w_fp[65], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -20058,7 +20058,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 923 - FFV1_0( w_fp[71], w_fp[113], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[71], w_fp[113], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -20071,7 +20071,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 924 - FFV1_0( w_fp[3], w_fp[113], w_fp[69], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[113], w_fp[69], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -20086,7 +20086,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 925 - FFV1_0( w_fp[71], w_fp[49], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[71], w_fp[49], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -20099,7 +20099,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 926 - VVV1_0( w_fp[0], w_fp[69], w_fp[51], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[0], w_fp[69], w_fp[51], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -20118,7 +20118,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 927 - FFV1_0( w_fp[3], w_fp[47], w_fp[93], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[47], w_fp[93], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -20130,7 +20130,7 @@ namespace mg5amcCpu jamp_sv[111] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[113] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[117] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[47], w_fp[90], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[47], w_fp[90], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -20142,7 +20142,7 @@ namespace mg5amcCpu jamp_sv[109] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[116] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[117] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[47], w_fp[21], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[47], w_fp[21], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -20161,7 +20161,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 928 - FFV1_0( w_fp[46], w_fp[47], w_fp[65], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[47], w_fp[65], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -20176,7 +20176,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 929 - FFV1_0( w_fp[46], w_fp[113], w_fp[66], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[113], w_fp[66], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -20189,7 +20189,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 930 - FFV1_0( w_fp[99], w_fp[47], w_fp[66], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[47], w_fp[66], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -20202,7 +20202,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 931 - VVV1_0( w_fp[65], w_fp[54], w_fp[6], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[65], w_fp[54], w_fp[6], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -20221,7 +20221,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 932 - FFV1_0( w_fp[53], w_fp[2], w_fp[65], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[53], w_fp[2], w_fp[65], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -20236,7 +20236,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 933 - FFV1_0( w_fp[99], w_fp[94], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[94], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -20249,7 +20249,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 934 - FFV1_0( w_fp[99], w_fp[2], w_fp[70], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[2], w_fp[70], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -20264,7 +20264,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 935 - FFV1_0( w_fp[53], w_fp[94], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[53], w_fp[94], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -20277,7 +20277,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 936 - VVV1_0( w_fp[0], w_fp[70], w_fp[54], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[0], w_fp[70], w_fp[54], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -20296,7 +20296,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 937 - FFV1_0( w_fp[46], w_fp[2], w_fp[22], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[2], w_fp[22], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -20308,7 +20308,7 @@ namespace mg5amcCpu jamp_sv[82] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[106] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[116] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[46], w_fp[2], w_fp[103], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[2], w_fp[103], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -20320,7 +20320,7 @@ namespace mg5amcCpu jamp_sv[82] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[97] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[100] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[46], w_fp[2], w_fp[63], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[2], w_fp[63], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -20339,7 +20339,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 938 - VVV1_0( w_fp[65], w_fp[20], w_fp[4], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[65], w_fp[20], w_fp[4], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -20358,7 +20358,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 939 - FFV1_0( w_fp[28], w_fp[2], w_fp[65], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[28], w_fp[2], w_fp[65], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -20373,7 +20373,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 940 - FFV1_0( w_fp[62], w_fp[94], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[62], w_fp[94], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -20386,7 +20386,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 941 - FFV1_0( w_fp[62], w_fp[2], w_fp[69], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[62], w_fp[2], w_fp[69], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -20401,7 +20401,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 942 - FFV1_0( w_fp[28], w_fp[94], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[28], w_fp[94], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -20414,7 +20414,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 943 - VVV1_0( w_fp[0], w_fp[69], w_fp[20], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[0], w_fp[69], w_fp[20], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -20433,7 +20433,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 944 - FFV1_0( w_fp[41], w_fp[2], w_fp[93], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[2], w_fp[93], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -20445,7 +20445,7 @@ namespace mg5amcCpu jamp_sv[56] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[62] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[80] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[41], w_fp[2], w_fp[90], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[2], w_fp[90], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -20457,7 +20457,7 @@ namespace mg5amcCpu jamp_sv[50] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[78] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[80] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[41], w_fp[2], w_fp[21], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[2], w_fp[21], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -20476,7 +20476,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 945 - FFV1_0( w_fp[3], w_fp[15], w_fp[65], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[15], w_fp[65], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -20495,7 +20495,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 946 - FFV1_0( w_fp[14], w_fp[2], w_fp[65], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[14], w_fp[2], w_fp[65], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -20514,7 +20514,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 947 - FFV1_0( w_fp[3], w_fp[94], w_fp[101], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[94], w_fp[101], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -20533,7 +20533,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 948 - FFV1_0( w_fp[71], w_fp[2], w_fp[101], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[71], w_fp[2], w_fp[101], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -20552,7 +20552,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 949 - FFV1_0( w_fp[14], w_fp[94], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[14], w_fp[94], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -20567,7 +20567,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 950 - FFV1_0( w_fp[71], w_fp[15], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[71], w_fp[15], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -20579,10 +20579,10 @@ namespace mg5amcCpu // *** DIAGRAM 951 OF 1240 *** // Wavefunction(s) for diagram number 951 - VVV1P0_1( w_fp[0], w_fp[72], COUPs[0], 0., 0., w_fp[71] ); + VVV1P0_1( w_fp[0], w_fp[72], COUPs[0], 1.0, 0., 0., w_fp[71] ); // Amplitude(s) for diagram number 951 - VVV1_0( w_fp[71], w_fp[13], w_fp[5], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[71], w_fp[13], w_fp[5], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -20609,7 +20609,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 952 - VVV1_0( w_fp[71], w_fp[10], w_fp[4], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[71], w_fp[10], w_fp[4], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -20636,7 +20636,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 953 - VVVV1_0( w_fp[8], w_fp[4], w_fp[5], w_fp[71], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[8], w_fp[4], w_fp[5], w_fp[71], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -20656,7 +20656,7 @@ namespace mg5amcCpu jamp_sv[82] -= amp_sv[0]; jamp_sv[92] += amp_sv[0]; jamp_sv[103] -= amp_sv[0]; - VVVV3_0( w_fp[8], w_fp[4], w_fp[5], w_fp[71], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[8], w_fp[4], w_fp[5], w_fp[71], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -20676,7 +20676,7 @@ namespace mg5amcCpu jamp_sv[89] -= amp_sv[0]; jamp_sv[92] += amp_sv[0]; jamp_sv[102] -= amp_sv[0]; - VVVV4_0( w_fp[8], w_fp[4], w_fp[5], w_fp[71], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[8], w_fp[4], w_fp[5], w_fp[71], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -20703,7 +20703,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 954 - VVV1_0( w_fp[56], w_fp[74], w_fp[5], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[56], w_fp[74], w_fp[5], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -20730,7 +20730,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 955 - VVV1_0( w_fp[56], w_fp[75], w_fp[4], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[56], w_fp[75], w_fp[4], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -20757,7 +20757,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 956 - VVVV1_0( w_fp[72], w_fp[4], w_fp[5], w_fp[56], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[72], w_fp[4], w_fp[5], w_fp[56], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -20777,7 +20777,7 @@ namespace mg5amcCpu jamp_sv[89] += amp_sv[0]; jamp_sv[93] -= amp_sv[0]; jamp_sv[105] += amp_sv[0]; - VVVV3_0( w_fp[72], w_fp[4], w_fp[5], w_fp[56], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[72], w_fp[4], w_fp[5], w_fp[56], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -20797,7 +20797,7 @@ namespace mg5amcCpu jamp_sv[83] += amp_sv[0]; jamp_sv[93] -= amp_sv[0]; jamp_sv[107] += amp_sv[0]; - VVVV4_0( w_fp[72], w_fp[4], w_fp[5], w_fp[56], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[72], w_fp[4], w_fp[5], w_fp[56], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -20824,7 +20824,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 957 - VVV1_0( w_fp[0], w_fp[74], w_fp[10], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[0], w_fp[74], w_fp[10], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -20851,7 +20851,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 958 - VVV1_0( w_fp[0], w_fp[75], w_fp[13], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[0], w_fp[75], w_fp[13], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -20875,12 +20875,12 @@ namespace mg5amcCpu // *** DIAGRAM 959 OF 1240 *** // Wavefunction(s) for diagram number 959 - VVVV1P0_1( w_fp[0], w_fp[72], w_fp[4], COUPs[2], 0., 0., w_fp[94] ); - VVVV3P0_1( w_fp[0], w_fp[72], w_fp[4], COUPs[2], 0., 0., w_fp[65] ); - VVVV4P0_1( w_fp[0], w_fp[72], w_fp[4], COUPs[2], 0., 0., w_fp[21] ); + VVVV1P0_1( w_fp[0], w_fp[72], w_fp[4], COUPs[2], 1.0, 0., 0., w_fp[94] ); + VVVV3P0_1( w_fp[0], w_fp[72], w_fp[4], COUPs[2], 1.0, 0., 0., w_fp[65] ); + VVVV4P0_1( w_fp[0], w_fp[72], w_fp[4], COUPs[2], 1.0, 0., 0., w_fp[21] ); // Amplitude(s) for diagram number 959 - VVV1_0( w_fp[8], w_fp[5], w_fp[94], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[5], w_fp[94], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -20900,7 +20900,7 @@ namespace mg5amcCpu jamp_sv[89] += amp_sv[0]; jamp_sv[93] -= amp_sv[0]; jamp_sv[104] += amp_sv[0]; - VVV1_0( w_fp[8], w_fp[5], w_fp[65], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[5], w_fp[65], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -20920,7 +20920,7 @@ namespace mg5amcCpu jamp_sv[93] -= amp_sv[0]; jamp_sv[102] -= amp_sv[0]; jamp_sv[104] += amp_sv[0]; - VVV1_0( w_fp[8], w_fp[5], w_fp[21], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[5], w_fp[21], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -20944,12 +20944,12 @@ namespace mg5amcCpu // *** DIAGRAM 960 OF 1240 *** // Wavefunction(s) for diagram number 960 - VVVV1P0_1( w_fp[0], w_fp[72], w_fp[5], COUPs[2], 0., 0., w_fp[90] ); - VVVV3P0_1( w_fp[0], w_fp[72], w_fp[5], COUPs[2], 0., 0., w_fp[93] ); - VVVV4P0_1( w_fp[0], w_fp[72], w_fp[5], COUPs[2], 0., 0., w_fp[69] ); + VVVV1P0_1( w_fp[0], w_fp[72], w_fp[5], COUPs[2], 1.0, 0., 0., w_fp[90] ); + VVVV3P0_1( w_fp[0], w_fp[72], w_fp[5], COUPs[2], 1.0, 0., 0., w_fp[93] ); + VVVV4P0_1( w_fp[0], w_fp[72], w_fp[5], COUPs[2], 1.0, 0., 0., w_fp[69] ); // Amplitude(s) for diagram number 960 - VVV1_0( w_fp[8], w_fp[4], w_fp[90], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[4], w_fp[90], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -20969,7 +20969,7 @@ namespace mg5amcCpu jamp_sv[82] += amp_sv[0]; jamp_sv[92] -= amp_sv[0]; jamp_sv[106] += amp_sv[0]; - VVV1_0( w_fp[8], w_fp[4], w_fp[93], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[4], w_fp[93], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -20989,7 +20989,7 @@ namespace mg5amcCpu jamp_sv[76] -= amp_sv[0]; jamp_sv[103] -= amp_sv[0]; jamp_sv[106] += amp_sv[0]; - VVV1_0( w_fp[8], w_fp[4], w_fp[69], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[4], w_fp[69], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -21016,7 +21016,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 961 - VVV1_0( w_fp[72], w_fp[5], w_fp[107], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[72], w_fp[5], w_fp[107], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -21036,7 +21036,7 @@ namespace mg5amcCpu jamp_sv[82] -= amp_sv[0]; jamp_sv[92] += amp_sv[0]; jamp_sv[106] -= amp_sv[0]; - VVV1_0( w_fp[72], w_fp[5], w_fp[95], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[72], w_fp[5], w_fp[95], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -21056,7 +21056,7 @@ namespace mg5amcCpu jamp_sv[93] -= amp_sv[0]; jamp_sv[106] -= amp_sv[0]; jamp_sv[107] += amp_sv[0]; - VVV1_0( w_fp[72], w_fp[5], w_fp[105], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[72], w_fp[5], w_fp[105], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -21083,7 +21083,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 962 - VVV1_0( w_fp[72], w_fp[4], w_fp[115], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[72], w_fp[4], w_fp[115], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -21103,7 +21103,7 @@ namespace mg5amcCpu jamp_sv[89] -= amp_sv[0]; jamp_sv[93] += amp_sv[0]; jamp_sv[104] -= amp_sv[0]; - VVV1_0( w_fp[72], w_fp[4], w_fp[116], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[72], w_fp[4], w_fp[116], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -21123,7 +21123,7 @@ namespace mg5amcCpu jamp_sv[76] -= amp_sv[0]; jamp_sv[104] -= amp_sv[0]; jamp_sv[105] += amp_sv[0]; - VVV1_0( w_fp[72], w_fp[4], w_fp[117], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[72], w_fp[4], w_fp[117], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -21150,7 +21150,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 963 - VVVV1_0( w_fp[0], w_fp[72], w_fp[8], w_fp[24], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[0], w_fp[72], w_fp[8], w_fp[24], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -21170,7 +21170,7 @@ namespace mg5amcCpu jamp_sv[89] += amp_sv[0]; jamp_sv[102] += amp_sv[0]; jamp_sv[103] -= amp_sv[0]; - VVVV3_0( w_fp[0], w_fp[72], w_fp[8], w_fp[24], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[0], w_fp[72], w_fp[8], w_fp[24], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -21190,7 +21190,7 @@ namespace mg5amcCpu jamp_sv[89] += amp_sv[0]; jamp_sv[105] += amp_sv[0]; jamp_sv[107] -= amp_sv[0]; - VVVV4_0( w_fp[0], w_fp[72], w_fp[8], w_fp[24], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[0], w_fp[72], w_fp[8], w_fp[24], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -21217,7 +21217,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 964 - VVV1_0( w_fp[8], w_fp[24], w_fp[71], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[24], w_fp[71], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -21244,7 +21244,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 965 - VVV1_0( w_fp[72], w_fp[24], w_fp[56], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[72], w_fp[24], w_fp[56], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -21271,7 +21271,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 966 - VVV1_0( w_fp[72], w_fp[8], w_fp[98], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[72], w_fp[8], w_fp[98], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -21298,7 +21298,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 967 - VVV1_0( w_fp[71], w_fp[37], w_fp[5], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[71], w_fp[37], w_fp[5], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -21317,7 +21317,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 968 - FFV1_0( w_fp[3], w_fp[35], w_fp[71], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[35], w_fp[71], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -21332,7 +21332,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 969 - FFV1_0( w_fp[76], w_fp[114], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[76], w_fp[114], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -21345,7 +21345,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 970 - FFV1_0( w_fp[3], w_fp[114], w_fp[75], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[114], w_fp[75], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -21360,7 +21360,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 971 - FFV1_0( w_fp[76], w_fp[35], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[76], w_fp[35], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -21373,7 +21373,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 972 - VVV1_0( w_fp[0], w_fp[75], w_fp[37], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[0], w_fp[75], w_fp[37], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -21392,7 +21392,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 973 - FFV1_0( w_fp[3], w_fp[33], w_fp[90], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[33], w_fp[90], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -21404,7 +21404,7 @@ namespace mg5amcCpu jamp_sv[63] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[65] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[69] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[33], w_fp[93], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[33], w_fp[93], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -21416,7 +21416,7 @@ namespace mg5amcCpu jamp_sv[61] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[68] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[69] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[33], w_fp[69], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[33], w_fp[69], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -21435,7 +21435,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 974 - FFV1_0( w_fp[38], w_fp[33], w_fp[71], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[33], w_fp[71], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -21450,7 +21450,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 975 - FFV1_0( w_fp[38], w_fp[114], w_fp[72], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[114], w_fp[72], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -21463,7 +21463,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 976 - FFV1_0( w_fp[104], w_fp[33], w_fp[72], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[104], w_fp[33], w_fp[72], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -21476,7 +21476,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 977 - VVV1_0( w_fp[71], w_fp[45], w_fp[4], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[71], w_fp[45], w_fp[4], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -21495,7 +21495,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 978 - FFV1_0( w_fp[3], w_fp[43], w_fp[71], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[43], w_fp[71], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -21510,7 +21510,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 979 - FFV1_0( w_fp[76], w_fp[102], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[76], w_fp[102], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -21523,7 +21523,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 980 - FFV1_0( w_fp[3], w_fp[102], w_fp[74], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[102], w_fp[74], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -21538,7 +21538,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 981 - FFV1_0( w_fp[76], w_fp[43], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[76], w_fp[43], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -21551,7 +21551,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 982 - VVV1_0( w_fp[0], w_fp[74], w_fp[45], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[0], w_fp[74], w_fp[45], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -21570,7 +21570,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 983 - FFV1_0( w_fp[3], w_fp[39], w_fp[94], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[39], w_fp[94], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -21582,7 +21582,7 @@ namespace mg5amcCpu jamp_sv[87] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[89] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[93] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[39], w_fp[65], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[39], w_fp[65], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -21594,7 +21594,7 @@ namespace mg5amcCpu jamp_sv[85] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[92] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[93] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[39], w_fp[21], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[39], w_fp[21], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -21613,7 +21613,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 984 - FFV1_0( w_fp[46], w_fp[39], w_fp[71], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[39], w_fp[71], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -21628,7 +21628,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 985 - FFV1_0( w_fp[46], w_fp[102], w_fp[72], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[102], w_fp[72], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -21641,7 +21641,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 986 - FFV1_0( w_fp[99], w_fp[39], w_fp[72], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[39], w_fp[72], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -21654,7 +21654,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 987 - VVV1_0( w_fp[71], w_fp[54], w_fp[5], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[71], w_fp[54], w_fp[5], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -21673,7 +21673,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 988 - FFV1_0( w_fp[7], w_fp[2], w_fp[71], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[7], w_fp[2], w_fp[71], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -21688,7 +21688,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 989 - FFV1_0( w_fp[99], w_fp[97], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[97], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -21701,7 +21701,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 990 - FFV1_0( w_fp[99], w_fp[2], w_fp[75], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[2], w_fp[75], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -21716,7 +21716,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 991 - FFV1_0( w_fp[7], w_fp[97], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[7], w_fp[97], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -21729,7 +21729,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 992 - VVV1_0( w_fp[0], w_fp[75], w_fp[54], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[0], w_fp[75], w_fp[54], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -21748,7 +21748,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 993 - FFV1_0( w_fp[46], w_fp[2], w_fp[90], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[2], w_fp[90], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -21760,7 +21760,7 @@ namespace mg5amcCpu jamp_sv[82] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[92] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[106] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[46], w_fp[2], w_fp[93], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[2], w_fp[93], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -21772,7 +21772,7 @@ namespace mg5amcCpu jamp_sv[76] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[103] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[106] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[46], w_fp[2], w_fp[69], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[2], w_fp[69], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -21791,7 +21791,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 994 - VVV1_0( w_fp[71], w_fp[23], w_fp[4], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[71], w_fp[23], w_fp[4], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -21810,7 +21810,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 995 - FFV1_0( w_fp[25], w_fp[2], w_fp[71], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[25], w_fp[2], w_fp[71], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -21825,7 +21825,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 996 - FFV1_0( w_fp[104], w_fp[97], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[104], w_fp[97], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -21838,7 +21838,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 997 - FFV1_0( w_fp[104], w_fp[2], w_fp[74], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[104], w_fp[2], w_fp[74], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -21853,7 +21853,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 998 - FFV1_0( w_fp[25], w_fp[97], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[25], w_fp[97], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -21866,7 +21866,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 999 - VVV1_0( w_fp[0], w_fp[74], w_fp[23], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[0], w_fp[74], w_fp[23], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -21885,7 +21885,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1000 - FFV1_0( w_fp[38], w_fp[2], w_fp[94], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[2], w_fp[94], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -21897,7 +21897,7 @@ namespace mg5amcCpu jamp_sv[58] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[68] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[104] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[38], w_fp[2], w_fp[65], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[2], w_fp[65], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -21909,7 +21909,7 @@ namespace mg5amcCpu jamp_sv[52] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[102] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[104] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[38], w_fp[2], w_fp[21], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[2], w_fp[21], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -21928,7 +21928,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1001 - FFV1_0( w_fp[3], w_fp[17], w_fp[71], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[17], w_fp[71], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -21947,7 +21947,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1002 - FFV1_0( w_fp[26], w_fp[2], w_fp[71], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[26], w_fp[2], w_fp[71], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -21966,7 +21966,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1003 - FFV1_0( w_fp[3], w_fp[97], w_fp[98], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[97], w_fp[98], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -21985,7 +21985,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1004 - FFV1_0( w_fp[76], w_fp[2], w_fp[98], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[76], w_fp[2], w_fp[98], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -22004,7 +22004,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1005 - FFV1_0( w_fp[26], w_fp[97], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[26], w_fp[97], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -22019,7 +22019,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1006 - FFV1_0( w_fp[76], w_fp[17], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[76], w_fp[17], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -22034,7 +22034,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1007 - VVV1_0( w_fp[56], w_fp[59], w_fp[6], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[56], w_fp[59], w_fp[6], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -22061,7 +22061,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1008 - VVV1_0( w_fp[56], w_fp[1], w_fp[42], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[56], w_fp[1], w_fp[42], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -22088,7 +22088,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1009 - VVVV1_0( w_fp[1], w_fp[24], w_fp[6], w_fp[56], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[1], w_fp[24], w_fp[6], w_fp[56], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -22108,7 +22108,7 @@ namespace mg5amcCpu jamp_sv[107] -= amp_sv[0]; jamp_sv[113] -= amp_sv[0]; jamp_sv[119] += amp_sv[0]; - VVVV3_0( w_fp[1], w_fp[24], w_fp[6], w_fp[56], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[1], w_fp[24], w_fp[6], w_fp[56], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -22128,7 +22128,7 @@ namespace mg5amcCpu jamp_sv[89] += amp_sv[0]; jamp_sv[105] += amp_sv[0]; jamp_sv[107] -= amp_sv[0]; - VVVV4_0( w_fp[1], w_fp[24], w_fp[6], w_fp[56], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[1], w_fp[24], w_fp[6], w_fp[56], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -22155,7 +22155,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1010 - VVV1_0( w_fp[98], w_fp[108], w_fp[6], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[98], w_fp[108], w_fp[6], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -22182,7 +22182,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1011 - VVV1_0( w_fp[98], w_fp[1], w_fp[11], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[98], w_fp[1], w_fp[11], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -22209,7 +22209,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1012 - VVVV1_0( w_fp[1], w_fp[8], w_fp[6], w_fp[98], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[1], w_fp[8], w_fp[6], w_fp[98], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -22229,7 +22229,7 @@ namespace mg5amcCpu jamp_sv[101] += amp_sv[0]; jamp_sv[112] += amp_sv[0]; jamp_sv[118] -= amp_sv[0]; - VVVV3_0( w_fp[1], w_fp[8], w_fp[6], w_fp[98], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[1], w_fp[8], w_fp[6], w_fp[98], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -22249,7 +22249,7 @@ namespace mg5amcCpu jamp_sv[103] += amp_sv[0]; jamp_sv[105] += amp_sv[0]; jamp_sv[107] -= amp_sv[0]; - VVVV4_0( w_fp[1], w_fp[8], w_fp[6], w_fp[98], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[1], w_fp[8], w_fp[6], w_fp[98], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -22276,7 +22276,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1013 - VVV1_0( w_fp[0], w_fp[108], w_fp[42], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[0], w_fp[108], w_fp[42], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -22303,7 +22303,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1014 - VVV1_0( w_fp[0], w_fp[59], w_fp[11], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[0], w_fp[59], w_fp[11], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -22327,12 +22327,12 @@ namespace mg5amcCpu // *** DIAGRAM 1015 OF 1240 *** // Wavefunction(s) for diagram number 1015 - VVVV1P0_1( w_fp[0], w_fp[1], w_fp[8], COUPs[2], 0., 0., w_fp[11] ); - VVVV3P0_1( w_fp[0], w_fp[1], w_fp[8], COUPs[2], 0., 0., w_fp[42] ); - VVVV4P0_1( w_fp[0], w_fp[1], w_fp[8], COUPs[2], 0., 0., w_fp[76] ); + VVVV1P0_1( w_fp[0], w_fp[1], w_fp[8], COUPs[2], 1.0, 0., 0., w_fp[11] ); + VVVV3P0_1( w_fp[0], w_fp[1], w_fp[8], COUPs[2], 1.0, 0., 0., w_fp[42] ); + VVVV4P0_1( w_fp[0], w_fp[1], w_fp[8], COUPs[2], 1.0, 0., 0., w_fp[76] ); // Amplitude(s) for diagram number 1015 - VVV1_0( w_fp[24], w_fp[6], w_fp[11], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[24], w_fp[6], w_fp[11], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -22352,7 +22352,7 @@ namespace mg5amcCpu jamp_sv[88] += amp_sv[0]; jamp_sv[112] += amp_sv[0]; jamp_sv[118] -= amp_sv[0]; - VVV1_0( w_fp[24], w_fp[6], w_fp[42], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[24], w_fp[6], w_fp[42], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -22372,7 +22372,7 @@ namespace mg5amcCpu jamp_sv[89] += amp_sv[0]; jamp_sv[113] += amp_sv[0]; jamp_sv[119] -= amp_sv[0]; - VVV1_0( w_fp[24], w_fp[6], w_fp[76], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[24], w_fp[6], w_fp[76], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -22396,12 +22396,12 @@ namespace mg5amcCpu // *** DIAGRAM 1016 OF 1240 *** // Wavefunction(s) for diagram number 1016 - VVVV1P0_1( w_fp[0], w_fp[1], w_fp[24], COUPs[2], 0., 0., w_fp[97] ); - VVVV3P0_1( w_fp[0], w_fp[1], w_fp[24], COUPs[2], 0., 0., w_fp[71] ); - VVVV4P0_1( w_fp[0], w_fp[1], w_fp[24], COUPs[2], 0., 0., w_fp[21] ); + VVVV1P0_1( w_fp[0], w_fp[1], w_fp[24], COUPs[2], 1.0, 0., 0., w_fp[97] ); + VVVV3P0_1( w_fp[0], w_fp[1], w_fp[24], COUPs[2], 1.0, 0., 0., w_fp[71] ); + VVVV4P0_1( w_fp[0], w_fp[1], w_fp[24], COUPs[2], 1.0, 0., 0., w_fp[21] ); // Amplitude(s) for diagram number 1016 - VVV1_0( w_fp[8], w_fp[6], w_fp[97], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[6], w_fp[97], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -22421,7 +22421,7 @@ namespace mg5amcCpu jamp_sv[107] -= amp_sv[0]; jamp_sv[113] -= amp_sv[0]; jamp_sv[119] += amp_sv[0]; - VVV1_0( w_fp[8], w_fp[6], w_fp[71], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[6], w_fp[71], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -22441,7 +22441,7 @@ namespace mg5amcCpu jamp_sv[107] -= amp_sv[0]; jamp_sv[112] -= amp_sv[0]; jamp_sv[118] += amp_sv[0]; - VVV1_0( w_fp[8], w_fp[6], w_fp[21], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[6], w_fp[21], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -22468,7 +22468,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1017 - VVV1_0( w_fp[1], w_fp[24], w_fp[118], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[24], w_fp[118], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -22488,7 +22488,7 @@ namespace mg5amcCpu jamp_sv[107] += amp_sv[0]; jamp_sv[113] += amp_sv[0]; jamp_sv[119] -= amp_sv[0]; - VVV1_0( w_fp[1], w_fp[24], w_fp[119], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[24], w_fp[119], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -22508,7 +22508,7 @@ namespace mg5amcCpu jamp_sv[97] -= amp_sv[0]; jamp_sv[99] -= amp_sv[0]; jamp_sv[101] += amp_sv[0]; - VVV1_0( w_fp[1], w_fp[24], w_fp[120], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[24], w_fp[120], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -22535,7 +22535,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1018 - VVV1_0( w_fp[1], w_fp[8], w_fp[85], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[8], w_fp[85], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -22555,7 +22555,7 @@ namespace mg5amcCpu jamp_sv[88] -= amp_sv[0]; jamp_sv[112] -= amp_sv[0]; jamp_sv[118] += amp_sv[0]; - VVV1_0( w_fp[1], w_fp[8], w_fp[112], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[8], w_fp[112], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -22575,7 +22575,7 @@ namespace mg5amcCpu jamp_sv[88] -= amp_sv[0]; jamp_sv[99] -= amp_sv[0]; jamp_sv[101] += amp_sv[0]; - VVV1_0( w_fp[1], w_fp[8], w_fp[111], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[8], w_fp[111], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -22602,7 +22602,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1019 - VVV1_0( w_fp[56], w_fp[68], w_fp[5], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[56], w_fp[68], w_fp[5], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -22629,7 +22629,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1020 - VVV1_0( w_fp[56], w_fp[1], w_fp[16], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[56], w_fp[1], w_fp[16], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -22656,7 +22656,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1021 - VVVV1_0( w_fp[1], w_fp[27], w_fp[5], w_fp[56], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[1], w_fp[27], w_fp[5], w_fp[56], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -22676,7 +22676,7 @@ namespace mg5amcCpu jamp_sv[89] -= amp_sv[0]; jamp_sv[95] += amp_sv[0]; jamp_sv[111] -= amp_sv[0]; - VVVV3_0( w_fp[1], w_fp[27], w_fp[5], w_fp[56], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[1], w_fp[27], w_fp[5], w_fp[56], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -22696,7 +22696,7 @@ namespace mg5amcCpu jamp_sv[83] -= amp_sv[0]; jamp_sv[111] -= amp_sv[0]; jamp_sv[113] += amp_sv[0]; - VVVV4_0( w_fp[1], w_fp[27], w_fp[5], w_fp[56], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[1], w_fp[27], w_fp[5], w_fp[56], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -22723,7 +22723,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1022 - VVV1_0( w_fp[101], w_fp[108], w_fp[5], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[101], w_fp[108], w_fp[5], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -22750,7 +22750,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1023 - VVV1_0( w_fp[101], w_fp[1], w_fp[10], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[101], w_fp[1], w_fp[10], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -22777,7 +22777,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1024 - VVVV1_0( w_fp[1], w_fp[8], w_fp[5], w_fp[101], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[1], w_fp[8], w_fp[5], w_fp[101], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -22797,7 +22797,7 @@ namespace mg5amcCpu jamp_sv[88] += amp_sv[0]; jamp_sv[94] -= amp_sv[0]; jamp_sv[109] += amp_sv[0]; - VVVV3_0( w_fp[1], w_fp[8], w_fp[5], w_fp[101], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[1], w_fp[8], w_fp[5], w_fp[101], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -22817,7 +22817,7 @@ namespace mg5amcCpu jamp_sv[83] -= amp_sv[0]; jamp_sv[108] -= amp_sv[0]; jamp_sv[109] += amp_sv[0]; - VVVV4_0( w_fp[1], w_fp[8], w_fp[5], w_fp[101], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[1], w_fp[8], w_fp[5], w_fp[101], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -22844,7 +22844,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1025 - VVV1_0( w_fp[0], w_fp[108], w_fp[16], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[0], w_fp[108], w_fp[16], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -22871,7 +22871,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1026 - VVV1_0( w_fp[0], w_fp[68], w_fp[10], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[0], w_fp[68], w_fp[10], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -22898,7 +22898,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1027 - VVV1_0( w_fp[27], w_fp[5], w_fp[11], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[27], w_fp[5], w_fp[11], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -22918,7 +22918,7 @@ namespace mg5amcCpu jamp_sv[88] += amp_sv[0]; jamp_sv[94] -= amp_sv[0]; jamp_sv[112] += amp_sv[0]; - VVV1_0( w_fp[27], w_fp[5], w_fp[42], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[27], w_fp[5], w_fp[42], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -22938,7 +22938,7 @@ namespace mg5amcCpu jamp_sv[89] += amp_sv[0]; jamp_sv[95] -= amp_sv[0]; jamp_sv[113] += amp_sv[0]; - VVV1_0( w_fp[27], w_fp[5], w_fp[76], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[27], w_fp[5], w_fp[76], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -22962,12 +22962,12 @@ namespace mg5amcCpu // *** DIAGRAM 1028 OF 1240 *** // Wavefunction(s) for diagram number 1028 - VVVV1P0_1( w_fp[0], w_fp[1], w_fp[27], COUPs[2], 0., 0., w_fp[10] ); - VVVV3P0_1( w_fp[0], w_fp[1], w_fp[27], COUPs[2], 0., 0., w_fp[16] ); - VVVV4P0_1( w_fp[0], w_fp[1], w_fp[27], COUPs[2], 0., 0., w_fp[111] ); + VVVV1P0_1( w_fp[0], w_fp[1], w_fp[27], COUPs[2], 1.0, 0., 0., w_fp[10] ); + VVVV3P0_1( w_fp[0], w_fp[1], w_fp[27], COUPs[2], 1.0, 0., 0., w_fp[16] ); + VVVV4P0_1( w_fp[0], w_fp[1], w_fp[27], COUPs[2], 1.0, 0., 0., w_fp[111] ); // Amplitude(s) for diagram number 1028 - VVV1_0( w_fp[8], w_fp[5], w_fp[10], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[5], w_fp[10], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -22987,7 +22987,7 @@ namespace mg5amcCpu jamp_sv[89] -= amp_sv[0]; jamp_sv[95] += amp_sv[0]; jamp_sv[110] -= amp_sv[0]; - VVV1_0( w_fp[8], w_fp[5], w_fp[16], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[5], w_fp[16], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -23007,7 +23007,7 @@ namespace mg5amcCpu jamp_sv[88] -= amp_sv[0]; jamp_sv[94] += amp_sv[0]; jamp_sv[108] -= amp_sv[0]; - VVV1_0( w_fp[8], w_fp[5], w_fp[111], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[5], w_fp[111], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -23034,7 +23034,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1029 - VVV1_0( w_fp[1], w_fp[27], w_fp[115], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[27], w_fp[115], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -23054,7 +23054,7 @@ namespace mg5amcCpu jamp_sv[89] += amp_sv[0]; jamp_sv[95] -= amp_sv[0]; jamp_sv[110] += amp_sv[0]; - VVV1_0( w_fp[1], w_fp[27], w_fp[116], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[27], w_fp[116], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -23074,7 +23074,7 @@ namespace mg5amcCpu jamp_sv[77] += amp_sv[0]; jamp_sv[110] += amp_sv[0]; jamp_sv[111] -= amp_sv[0]; - VVV1_0( w_fp[1], w_fp[27], w_fp[117], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[27], w_fp[117], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -23101,7 +23101,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1030 - VVV1_0( w_fp[1], w_fp[8], w_fp[9], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[8], w_fp[9], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -23121,7 +23121,7 @@ namespace mg5amcCpu jamp_sv[88] -= amp_sv[0]; jamp_sv[94] += amp_sv[0]; jamp_sv[112] -= amp_sv[0]; - VVV1_0( w_fp[1], w_fp[8], w_fp[110], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[8], w_fp[110], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -23141,7 +23141,7 @@ namespace mg5amcCpu jamp_sv[77] += amp_sv[0]; jamp_sv[109] += amp_sv[0]; jamp_sv[112] -= amp_sv[0]; - VVV1_0( w_fp[1], w_fp[8], w_fp[109], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[8], w_fp[109], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -23168,7 +23168,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1031 - VVV1_0( w_fp[56], w_fp[67], w_fp[4], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[56], w_fp[67], w_fp[4], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -23195,7 +23195,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1032 - VVV1_0( w_fp[56], w_fp[1], w_fp[19], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[56], w_fp[1], w_fp[19], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -23222,7 +23222,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1033 - VVVV1_0( w_fp[1], w_fp[4], w_fp[29], w_fp[56], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[1], w_fp[4], w_fp[29], w_fp[56], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -23242,7 +23242,7 @@ namespace mg5amcCpu jamp_sv[95] -= amp_sv[0]; jamp_sv[117] -= amp_sv[0]; jamp_sv[119] += amp_sv[0]; - VVVV3_0( w_fp[1], w_fp[4], w_fp[29], w_fp[56], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[1], w_fp[4], w_fp[29], w_fp[56], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -23262,7 +23262,7 @@ namespace mg5amcCpu jamp_sv[71] += amp_sv[0]; jamp_sv[93] += amp_sv[0]; jamp_sv[117] -= amp_sv[0]; - VVVV4_0( w_fp[1], w_fp[4], w_fp[29], w_fp[56], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[1], w_fp[4], w_fp[29], w_fp[56], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -23289,7 +23289,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1034 - VVV1_0( w_fp[96], w_fp[108], w_fp[4], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[96], w_fp[108], w_fp[4], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -23316,7 +23316,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1035 - VVV1_0( w_fp[96], w_fp[1], w_fp[13], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[96], w_fp[1], w_fp[13], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -23343,7 +23343,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1036 - VVVV1_0( w_fp[1], w_fp[8], w_fp[4], w_fp[96], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[1], w_fp[8], w_fp[4], w_fp[96], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -23363,7 +23363,7 @@ namespace mg5amcCpu jamp_sv[70] -= amp_sv[0]; jamp_sv[91] -= amp_sv[0]; jamp_sv[115] += amp_sv[0]; - VVVV3_0( w_fp[1], w_fp[8], w_fp[4], w_fp[96], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[1], w_fp[8], w_fp[4], w_fp[96], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -23383,7 +23383,7 @@ namespace mg5amcCpu jamp_sv[91] -= amp_sv[0]; jamp_sv[114] -= amp_sv[0]; jamp_sv[115] += amp_sv[0]; - VVVV4_0( w_fp[1], w_fp[8], w_fp[4], w_fp[96], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[1], w_fp[8], w_fp[4], w_fp[96], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -23410,7 +23410,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1037 - VVV1_0( w_fp[0], w_fp[108], w_fp[19], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[0], w_fp[108], w_fp[19], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -23437,7 +23437,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1038 - VVV1_0( w_fp[0], w_fp[67], w_fp[13], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[0], w_fp[67], w_fp[13], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -23464,7 +23464,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1039 - VVV1_0( w_fp[4], w_fp[29], w_fp[11], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[4], w_fp[29], w_fp[11], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -23484,7 +23484,7 @@ namespace mg5amcCpu jamp_sv[70] += amp_sv[0]; jamp_sv[94] += amp_sv[0]; jamp_sv[118] -= amp_sv[0]; - VVV1_0( w_fp[4], w_fp[29], w_fp[42], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[4], w_fp[29], w_fp[42], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -23504,7 +23504,7 @@ namespace mg5amcCpu jamp_sv[71] += amp_sv[0]; jamp_sv[95] += amp_sv[0]; jamp_sv[119] -= amp_sv[0]; - VVV1_0( w_fp[4], w_fp[29], w_fp[76], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[4], w_fp[29], w_fp[76], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -23528,12 +23528,12 @@ namespace mg5amcCpu // *** DIAGRAM 1040 OF 1240 *** // Wavefunction(s) for diagram number 1040 - VVVV1P0_1( w_fp[0], w_fp[1], w_fp[29], COUPs[2], 0., 0., w_fp[76] ); - VVVV3P0_1( w_fp[0], w_fp[1], w_fp[29], COUPs[2], 0., 0., w_fp[42] ); - VVVV4P0_1( w_fp[0], w_fp[1], w_fp[29], COUPs[2], 0., 0., w_fp[11] ); + VVVV1P0_1( w_fp[0], w_fp[1], w_fp[29], COUPs[2], 1.0, 0., 0., w_fp[76] ); + VVVV3P0_1( w_fp[0], w_fp[1], w_fp[29], COUPs[2], 1.0, 0., 0., w_fp[42] ); + VVVV4P0_1( w_fp[0], w_fp[1], w_fp[29], COUPs[2], 1.0, 0., 0., w_fp[11] ); // Amplitude(s) for diagram number 1040 - VVV1_0( w_fp[8], w_fp[4], w_fp[76], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[4], w_fp[76], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -23553,7 +23553,7 @@ namespace mg5amcCpu jamp_sv[71] += amp_sv[0]; jamp_sv[92] += amp_sv[0]; jamp_sv[116] -= amp_sv[0]; - VVV1_0( w_fp[8], w_fp[4], w_fp[42], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[4], w_fp[42], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -23573,7 +23573,7 @@ namespace mg5amcCpu jamp_sv[70] += amp_sv[0]; jamp_sv[90] += amp_sv[0]; jamp_sv[114] -= amp_sv[0]; - VVV1_0( w_fp[8], w_fp[4], w_fp[11], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[4], w_fp[11], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -23600,7 +23600,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1041 - VVV1_0( w_fp[1], w_fp[29], w_fp[107], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[29], w_fp[107], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -23620,7 +23620,7 @@ namespace mg5amcCpu jamp_sv[71] -= amp_sv[0]; jamp_sv[92] -= amp_sv[0]; jamp_sv[116] += amp_sv[0]; - VVV1_0( w_fp[1], w_fp[29], w_fp[95], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[29], w_fp[95], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -23640,7 +23640,7 @@ namespace mg5amcCpu jamp_sv[93] += amp_sv[0]; jamp_sv[116] += amp_sv[0]; jamp_sv[117] -= amp_sv[0]; - VVV1_0( w_fp[1], w_fp[29], w_fp[105], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[29], w_fp[105], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -23667,7 +23667,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1042 - VVV1_0( w_fp[1], w_fp[8], w_fp[87], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[8], w_fp[87], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -23687,7 +23687,7 @@ namespace mg5amcCpu jamp_sv[70] -= amp_sv[0]; jamp_sv[94] -= amp_sv[0]; jamp_sv[118] += amp_sv[0]; - VVV1_0( w_fp[1], w_fp[8], w_fp[34], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[8], w_fp[34], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -23707,7 +23707,7 @@ namespace mg5amcCpu jamp_sv[70] -= amp_sv[0]; jamp_sv[91] -= amp_sv[0]; jamp_sv[115] += amp_sv[0]; - VVV1_0( w_fp[1], w_fp[8], w_fp[86], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[8], w_fp[86], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -23734,7 +23734,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1043 - VVVV1_0( w_fp[0], w_fp[1], w_fp[8], w_fp[30], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[0], w_fp[1], w_fp[8], w_fp[30], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -23754,7 +23754,7 @@ namespace mg5amcCpu jamp_sv[95] -= amp_sv[0]; jamp_sv[118] -= amp_sv[0]; jamp_sv[119] += amp_sv[0]; - VVVV3_0( w_fp[0], w_fp[1], w_fp[8], w_fp[30], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[0], w_fp[1], w_fp[8], w_fp[30], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -23774,7 +23774,7 @@ namespace mg5amcCpu jamp_sv[71] -= amp_sv[0]; jamp_sv[95] -= amp_sv[0]; jamp_sv[119] += amp_sv[0]; - VVVV4_0( w_fp[0], w_fp[1], w_fp[8], w_fp[30], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[0], w_fp[1], w_fp[8], w_fp[30], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -23794,7 +23794,7 @@ namespace mg5amcCpu jamp_sv[70] -= amp_sv[0]; jamp_sv[94] -= amp_sv[0]; jamp_sv[118] += amp_sv[0]; - VVVV1_0( w_fp[0], w_fp[1], w_fp[8], w_fp[31], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[0], w_fp[1], w_fp[8], w_fp[31], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -23814,7 +23814,7 @@ namespace mg5amcCpu jamp_sv[95] -= amp_sv[0]; jamp_sv[112] -= amp_sv[0]; jamp_sv[113] += amp_sv[0]; - VVVV3_0( w_fp[0], w_fp[1], w_fp[8], w_fp[31], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[0], w_fp[1], w_fp[8], w_fp[31], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -23834,7 +23834,7 @@ namespace mg5amcCpu jamp_sv[89] += amp_sv[0]; jamp_sv[95] -= amp_sv[0]; jamp_sv[113] += amp_sv[0]; - VVVV4_0( w_fp[0], w_fp[1], w_fp[8], w_fp[31], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[0], w_fp[1], w_fp[8], w_fp[31], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -23854,7 +23854,7 @@ namespace mg5amcCpu jamp_sv[88] += amp_sv[0]; jamp_sv[94] -= amp_sv[0]; jamp_sv[112] += amp_sv[0]; - VVVV1_0( w_fp[0], w_fp[1], w_fp[8], w_fp[32], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[0], w_fp[1], w_fp[8], w_fp[32], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -23874,7 +23874,7 @@ namespace mg5amcCpu jamp_sv[113] += amp_sv[0]; jamp_sv[118] += amp_sv[0]; jamp_sv[119] -= amp_sv[0]; - VVVV3_0( w_fp[0], w_fp[1], w_fp[8], w_fp[32], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[0], w_fp[1], w_fp[8], w_fp[32], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -23894,7 +23894,7 @@ namespace mg5amcCpu jamp_sv[89] += amp_sv[0]; jamp_sv[113] += amp_sv[0]; jamp_sv[119] -= amp_sv[0]; - VVVV4_0( w_fp[0], w_fp[1], w_fp[8], w_fp[32], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[0], w_fp[1], w_fp[8], w_fp[32], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -23921,7 +23921,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1044 - VVV1_0( w_fp[1], w_fp[30], w_fp[56], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[30], w_fp[56], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -23941,7 +23941,7 @@ namespace mg5amcCpu jamp_sv[71] -= amp_sv[0]; jamp_sv[95] -= amp_sv[0]; jamp_sv[119] += amp_sv[0]; - VVV1_0( w_fp[1], w_fp[31], w_fp[56], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[31], w_fp[56], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -23961,7 +23961,7 @@ namespace mg5amcCpu jamp_sv[89] += amp_sv[0]; jamp_sv[95] -= amp_sv[0]; jamp_sv[113] += amp_sv[0]; - VVV1_0( w_fp[1], w_fp[32], w_fp[56], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[32], w_fp[56], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -23988,7 +23988,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1045 - VVV1_0( w_fp[1], w_fp[8], w_fp[92], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[8], w_fp[92], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -24008,7 +24008,7 @@ namespace mg5amcCpu jamp_sv[70] -= amp_sv[0]; jamp_sv[94] -= amp_sv[0]; jamp_sv[118] += amp_sv[0]; - VVV1_0( w_fp[1], w_fp[8], w_fp[88], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[8], w_fp[88], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -24028,7 +24028,7 @@ namespace mg5amcCpu jamp_sv[88] += amp_sv[0]; jamp_sv[94] -= amp_sv[0]; jamp_sv[112] += amp_sv[0]; - VVV1_0( w_fp[1], w_fp[8], w_fp[106], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[8], w_fp[106], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -24055,7 +24055,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1046 - FFV1_0( w_fp[58], w_fp[114], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[58], w_fp[114], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -24067,7 +24067,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1047 - FFV1_0( w_fp[48], w_fp[114], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[48], w_fp[114], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -24079,7 +24079,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1048 - FFV1_0( w_fp[104], w_fp[100], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[104], w_fp[100], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -24091,7 +24091,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1049 - FFV1_0( w_fp[104], w_fp[36], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[104], w_fp[36], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -24103,7 +24103,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1050 - FFV1_0( w_fp[48], w_fp[100], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[48], w_fp[100], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -24115,7 +24115,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1051 - FFV1_0( w_fp[58], w_fp[36], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[58], w_fp[36], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -24127,7 +24127,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1052 - FFV1_0( w_fp[60], w_fp[114], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[60], w_fp[114], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -24139,7 +24139,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1053 - FFV1_0( w_fp[40], w_fp[114], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[40], w_fp[114], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -24151,7 +24151,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1054 - FFV1_0( w_fp[62], w_fp[100], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[62], w_fp[100], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -24163,7 +24163,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1055 - FFV1_0( w_fp[62], w_fp[35], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[62], w_fp[35], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -24175,7 +24175,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1056 - FFV1_0( w_fp[40], w_fp[100], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[40], w_fp[100], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -24187,7 +24187,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1057 - FFV1_0( w_fp[60], w_fp[35], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[60], w_fp[35], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -24199,7 +24199,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1058 - FFV1_0( w_fp[3], w_fp[114], w_fp[67], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[114], w_fp[67], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -24214,7 +24214,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1059 - FFV1_0( w_fp[12], w_fp[114], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[12], w_fp[114], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -24227,7 +24227,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1060 - FFV1_0( w_fp[3], w_fp[100], w_fp[96], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[100], w_fp[96], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -24242,7 +24242,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1061 - VVV1_0( w_fp[96], w_fp[1], w_fp[37], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[96], w_fp[1], w_fp[37], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -24261,7 +24261,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1062 - FFV1_0( w_fp[12], w_fp[100], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[12], w_fp[100], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -24274,7 +24274,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1063 - VVV1_0( w_fp[0], w_fp[67], w_fp[37], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[0], w_fp[67], w_fp[37], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -24293,7 +24293,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1064 - FFV1_0( w_fp[3], w_fp[33], w_fp[76], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[33], w_fp[76], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -24305,7 +24305,7 @@ namespace mg5amcCpu jamp_sv[59] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[65] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[71] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[33], w_fp[42], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[33], w_fp[42], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -24317,7 +24317,7 @@ namespace mg5amcCpu jamp_sv[59] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[64] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[70] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[33], w_fp[11], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[33], w_fp[11], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -24336,7 +24336,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1065 - FFV1_0( w_fp[78], w_fp[102], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[78], w_fp[102], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -24348,7 +24348,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1066 - FFV1_0( w_fp[53], w_fp[102], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[53], w_fp[102], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -24360,7 +24360,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1067 - FFV1_0( w_fp[99], w_fp[89], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[89], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -24372,7 +24372,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1068 - FFV1_0( w_fp[99], w_fp[44], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[44], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -24384,7 +24384,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1069 - FFV1_0( w_fp[53], w_fp[89], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[53], w_fp[89], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -24396,7 +24396,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1070 - FFV1_0( w_fp[78], w_fp[44], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[78], w_fp[44], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -24408,7 +24408,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1071 - FFV1_0( w_fp[60], w_fp[102], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[60], w_fp[102], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -24420,7 +24420,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1072 - FFV1_0( w_fp[28], w_fp[102], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[28], w_fp[102], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -24432,7 +24432,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1073 - FFV1_0( w_fp[62], w_fp[89], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[62], w_fp[89], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -24444,7 +24444,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1074 - FFV1_0( w_fp[62], w_fp[43], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[62], w_fp[43], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -24456,7 +24456,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1075 - FFV1_0( w_fp[28], w_fp[89], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[28], w_fp[89], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -24468,7 +24468,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1076 - FFV1_0( w_fp[60], w_fp[43], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[60], w_fp[43], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -24480,7 +24480,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1077 - FFV1_0( w_fp[3], w_fp[102], w_fp[68], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[102], w_fp[68], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -24495,7 +24495,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1078 - FFV1_0( w_fp[14], w_fp[102], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[14], w_fp[102], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -24508,7 +24508,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1079 - FFV1_0( w_fp[3], w_fp[89], w_fp[101], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[89], w_fp[101], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -24523,7 +24523,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1080 - VVV1_0( w_fp[101], w_fp[1], w_fp[45], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[101], w_fp[1], w_fp[45], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -24542,7 +24542,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1081 - FFV1_0( w_fp[14], w_fp[89], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[14], w_fp[89], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -24555,7 +24555,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1082 - VVV1_0( w_fp[0], w_fp[68], w_fp[45], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[0], w_fp[68], w_fp[45], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -24574,7 +24574,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1083 - FFV1_0( w_fp[3], w_fp[39], w_fp[10], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[39], w_fp[10], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -24586,7 +24586,7 @@ namespace mg5amcCpu jamp_sv[83] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[89] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[95] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[39], w_fp[16], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[39], w_fp[16], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -24598,7 +24598,7 @@ namespace mg5amcCpu jamp_sv[83] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[88] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[94] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[39], w_fp[111], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[39], w_fp[111], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -24617,7 +24617,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1084 - FFV1_0( w_fp[78], w_fp[113], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[78], w_fp[113], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -24629,7 +24629,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1085 - FFV1_0( w_fp[7], w_fp[113], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[7], w_fp[113], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -24641,7 +24641,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1086 - FFV1_0( w_fp[99], w_fp[91], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[91], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -24653,7 +24653,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1087 - FFV1_0( w_fp[99], w_fp[50], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[50], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -24665,7 +24665,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1088 - FFV1_0( w_fp[7], w_fp[91], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[7], w_fp[91], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -24677,7 +24677,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1089 - FFV1_0( w_fp[78], w_fp[50], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[78], w_fp[50], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -24689,7 +24689,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1090 - FFV1_0( w_fp[58], w_fp[113], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[58], w_fp[113], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -24701,7 +24701,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1091 - FFV1_0( w_fp[25], w_fp[113], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[25], w_fp[113], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -24713,7 +24713,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1092 - FFV1_0( w_fp[104], w_fp[91], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[104], w_fp[91], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -24725,7 +24725,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1093 - FFV1_0( w_fp[104], w_fp[49], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[104], w_fp[49], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -24737,7 +24737,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1094 - FFV1_0( w_fp[25], w_fp[91], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[25], w_fp[91], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -24749,7 +24749,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1095 - FFV1_0( w_fp[58], w_fp[49], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[58], w_fp[49], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -24761,7 +24761,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1096 - FFV1_0( w_fp[3], w_fp[113], w_fp[59], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[113], w_fp[59], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -24776,7 +24776,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1097 - FFV1_0( w_fp[26], w_fp[113], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[26], w_fp[113], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -24789,7 +24789,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1098 - FFV1_0( w_fp[3], w_fp[91], w_fp[98], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[91], w_fp[98], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -24804,7 +24804,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1099 - VVV1_0( w_fp[98], w_fp[1], w_fp[51], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[98], w_fp[1], w_fp[51], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -24823,7 +24823,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1100 - FFV1_0( w_fp[26], w_fp[91], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[26], w_fp[91], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -24836,7 +24836,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1101 - VVV1_0( w_fp[0], w_fp[59], w_fp[51], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[0], w_fp[59], w_fp[51], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -24855,7 +24855,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1102 - FFV1_0( w_fp[3], w_fp[47], w_fp[97], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[47], w_fp[97], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -24867,7 +24867,7 @@ namespace mg5amcCpu jamp_sv[107] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[113] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[119] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[47], w_fp[71], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[47], w_fp[71], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -24879,7 +24879,7 @@ namespace mg5amcCpu jamp_sv[107] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[112] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[118] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[47], w_fp[21], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[47], w_fp[21], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -24898,7 +24898,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1103 - FFV1_0( w_fp[99], w_fp[2], w_fp[67], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[2], w_fp[67], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -24913,7 +24913,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1104 - FFV1_0( w_fp[99], w_fp[18], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[18], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -24926,7 +24926,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1105 - FFV1_0( w_fp[78], w_fp[2], w_fp[96], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[78], w_fp[2], w_fp[96], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -24941,7 +24941,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1106 - VVV1_0( w_fp[96], w_fp[1], w_fp[54], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[96], w_fp[1], w_fp[54], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -24960,7 +24960,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1107 - FFV1_0( w_fp[78], w_fp[18], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[78], w_fp[18], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -24973,7 +24973,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1108 - VVV1_0( w_fp[0], w_fp[67], w_fp[54], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[0], w_fp[67], w_fp[54], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -24992,7 +24992,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1109 - FFV1_0( w_fp[46], w_fp[2], w_fp[76], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[2], w_fp[76], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -25004,7 +25004,7 @@ namespace mg5amcCpu jamp_sv[46] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[92] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[116] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[46], w_fp[2], w_fp[42], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[2], w_fp[42], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -25016,7 +25016,7 @@ namespace mg5amcCpu jamp_sv[46] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[90] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[114] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[46], w_fp[2], w_fp[11], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[2], w_fp[11], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -25035,7 +25035,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1110 - FFV1_0( w_fp[104], w_fp[2], w_fp[68], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[104], w_fp[2], w_fp[68], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -25050,7 +25050,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1111 - FFV1_0( w_fp[104], w_fp[15], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[104], w_fp[15], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -25063,7 +25063,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1112 - FFV1_0( w_fp[58], w_fp[2], w_fp[101], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[58], w_fp[2], w_fp[101], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -25078,7 +25078,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1113 - VVV1_0( w_fp[101], w_fp[1], w_fp[23], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[101], w_fp[1], w_fp[23], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -25097,7 +25097,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1114 - FFV1_0( w_fp[58], w_fp[15], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[58], w_fp[15], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -25110,7 +25110,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1115 - VVV1_0( w_fp[0], w_fp[68], w_fp[23], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[0], w_fp[68], w_fp[23], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -25129,7 +25129,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1116 - FFV1_0( w_fp[38], w_fp[2], w_fp[10], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[2], w_fp[10], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -25141,7 +25141,7 @@ namespace mg5amcCpu jamp_sv[44] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[68] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[110] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[38], w_fp[2], w_fp[16], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[2], w_fp[16], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -25153,7 +25153,7 @@ namespace mg5amcCpu jamp_sv[44] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[66] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[108] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[38], w_fp[2], w_fp[111], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[2], w_fp[111], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -25172,7 +25172,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1117 - FFV1_0( w_fp[62], w_fp[2], w_fp[59], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[62], w_fp[2], w_fp[59], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -25187,7 +25187,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1118 - FFV1_0( w_fp[62], w_fp[17], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[62], w_fp[17], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -25200,7 +25200,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1119 - FFV1_0( w_fp[60], w_fp[2], w_fp[98], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[60], w_fp[2], w_fp[98], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -25215,7 +25215,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1120 - VVV1_0( w_fp[98], w_fp[1], w_fp[20], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[98], w_fp[1], w_fp[20], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -25234,7 +25234,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1121 - FFV1_0( w_fp[60], w_fp[17], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[60], w_fp[17], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -25247,7 +25247,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1122 - VVV1_0( w_fp[0], w_fp[59], w_fp[20], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[0], w_fp[59], w_fp[20], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -25266,7 +25266,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1123 - FFV1_0( w_fp[41], w_fp[2], w_fp[97], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[2], w_fp[97], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -25278,7 +25278,7 @@ namespace mg5amcCpu jamp_sv[38] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[62] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[86] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[41], w_fp[2], w_fp[71], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[2], w_fp[71], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -25290,7 +25290,7 @@ namespace mg5amcCpu jamp_sv[38] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[60] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[84] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[41], w_fp[2], w_fp[21], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[2], w_fp[21], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -25306,12 +25306,12 @@ namespace mg5amcCpu // *** DIAGRAM 1124 OF 1240 *** // Wavefunction(s) for diagram number 1124 - VVVV1P0_1( w_fp[0], w_fp[1], w_fp[4], COUPs[2], 0., 0., w_fp[21] ); - VVVV3P0_1( w_fp[0], w_fp[1], w_fp[4], COUPs[2], 0., 0., w_fp[71] ); - VVVV4P0_1( w_fp[0], w_fp[1], w_fp[4], COUPs[2], 0., 0., w_fp[97] ); + VVVV1P0_1( w_fp[0], w_fp[1], w_fp[4], COUPs[2], 1.0, 0., 0., w_fp[21] ); + VVVV3P0_1( w_fp[0], w_fp[1], w_fp[4], COUPs[2], 1.0, 0., 0., w_fp[71] ); + VVVV4P0_1( w_fp[0], w_fp[1], w_fp[4], COUPs[2], 1.0, 0., 0., w_fp[97] ); // Amplitude(s) for diagram number 1124 - VVVV1_0( w_fp[21], w_fp[8], w_fp[5], w_fp[6], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[21], w_fp[8], w_fp[5], w_fp[6], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -25331,7 +25331,7 @@ namespace mg5amcCpu jamp_sv[115] -= amp_sv[0]; jamp_sv[117] -= amp_sv[0]; jamp_sv[119] += amp_sv[0]; - VVVV3_0( w_fp[21], w_fp[8], w_fp[5], w_fp[6], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[21], w_fp[8], w_fp[5], w_fp[6], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -25351,7 +25351,7 @@ namespace mg5amcCpu jamp_sv[115] -= amp_sv[0]; jamp_sv[117] -= amp_sv[0]; jamp_sv[119] += amp_sv[0]; - VVVV4_0( w_fp[21], w_fp[8], w_fp[5], w_fp[6], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[21], w_fp[8], w_fp[5], w_fp[6], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -25371,7 +25371,7 @@ namespace mg5amcCpu jamp_sv[98] += amp_sv[0]; jamp_sv[104] += amp_sv[0]; jamp_sv[110] -= amp_sv[0]; - VVVV1_0( w_fp[71], w_fp[8], w_fp[5], w_fp[6], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[71], w_fp[8], w_fp[5], w_fp[6], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -25391,7 +25391,7 @@ namespace mg5amcCpu jamp_sv[116] += amp_sv[0]; jamp_sv[117] -= amp_sv[0]; jamp_sv[118] += amp_sv[0]; - VVVV3_0( w_fp[71], w_fp[8], w_fp[5], w_fp[6], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[71], w_fp[8], w_fp[5], w_fp[6], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -25411,7 +25411,7 @@ namespace mg5amcCpu jamp_sv[116] += amp_sv[0]; jamp_sv[117] -= amp_sv[0]; jamp_sv[118] += amp_sv[0]; - VVVV4_0( w_fp[71], w_fp[8], w_fp[5], w_fp[6], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[71], w_fp[8], w_fp[5], w_fp[6], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -25431,7 +25431,7 @@ namespace mg5amcCpu jamp_sv[102] -= amp_sv[0]; jamp_sv[104] += amp_sv[0]; jamp_sv[108] -= amp_sv[0]; - VVVV1_0( w_fp[97], w_fp[8], w_fp[5], w_fp[6], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[97], w_fp[8], w_fp[5], w_fp[6], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -25451,7 +25451,7 @@ namespace mg5amcCpu jamp_sv[116] += amp_sv[0]; jamp_sv[118] += amp_sv[0]; jamp_sv[119] -= amp_sv[0]; - VVVV3_0( w_fp[97], w_fp[8], w_fp[5], w_fp[6], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[97], w_fp[8], w_fp[5], w_fp[6], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -25471,7 +25471,7 @@ namespace mg5amcCpu jamp_sv[116] += amp_sv[0]; jamp_sv[118] += amp_sv[0]; jamp_sv[119] -= amp_sv[0]; - VVVV4_0( w_fp[97], w_fp[8], w_fp[5], w_fp[6], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[97], w_fp[8], w_fp[5], w_fp[6], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -25495,12 +25495,12 @@ namespace mg5amcCpu // *** DIAGRAM 1125 OF 1240 *** // Wavefunction(s) for diagram number 1125 - VVV1P0_1( w_fp[21], w_fp[5], COUPs[0], 0., 0., w_fp[59] ); - VVV1P0_1( w_fp[71], w_fp[5], COUPs[0], 0., 0., w_fp[20] ); - VVV1P0_1( w_fp[97], w_fp[5], COUPs[0], 0., 0., w_fp[60] ); + VVV1P0_1( w_fp[21], w_fp[5], COUPs[0], 1.0, 0., 0., w_fp[59] ); + VVV1P0_1( w_fp[71], w_fp[5], COUPs[0], 1.0, 0., 0., w_fp[20] ); + VVV1P0_1( w_fp[97], w_fp[5], COUPs[0], 1.0, 0., 0., w_fp[60] ); // Amplitude(s) for diagram number 1125 - VVV1_0( w_fp[8], w_fp[6], w_fp[59], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[6], w_fp[59], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -25520,7 +25520,7 @@ namespace mg5amcCpu jamp_sv[115] -= amp_sv[0]; jamp_sv[117] -= amp_sv[0]; jamp_sv[119] += amp_sv[0]; - VVV1_0( w_fp[8], w_fp[6], w_fp[20], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[6], w_fp[20], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -25540,7 +25540,7 @@ namespace mg5amcCpu jamp_sv[116] += amp_sv[0]; jamp_sv[117] -= amp_sv[0]; jamp_sv[118] += amp_sv[0]; - VVV1_0( w_fp[8], w_fp[6], w_fp[60], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[6], w_fp[60], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -25564,12 +25564,12 @@ namespace mg5amcCpu // *** DIAGRAM 1126 OF 1240 *** // Wavefunction(s) for diagram number 1126 - VVV1P0_1( w_fp[21], w_fp[6], COUPs[0], 0., 0., w_fp[17] ); - VVV1P0_1( w_fp[71], w_fp[6], COUPs[0], 0., 0., w_fp[98] ); - VVV1P0_1( w_fp[97], w_fp[6], COUPs[0], 0., 0., w_fp[111] ); + VVV1P0_1( w_fp[21], w_fp[6], COUPs[0], 1.0, 0., 0., w_fp[17] ); + VVV1P0_1( w_fp[71], w_fp[6], COUPs[0], 1.0, 0., 0., w_fp[98] ); + VVV1P0_1( w_fp[97], w_fp[6], COUPs[0], 1.0, 0., 0., w_fp[111] ); // Amplitude(s) for diagram number 1126 - VVV1_0( w_fp[8], w_fp[5], w_fp[17], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[5], w_fp[17], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -25589,7 +25589,7 @@ namespace mg5amcCpu jamp_sv[98] += amp_sv[0]; jamp_sv[104] += amp_sv[0]; jamp_sv[110] -= amp_sv[0]; - VVV1_0( w_fp[8], w_fp[5], w_fp[98], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[5], w_fp[98], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -25609,7 +25609,7 @@ namespace mg5amcCpu jamp_sv[102] -= amp_sv[0]; jamp_sv[104] += amp_sv[0]; jamp_sv[108] -= amp_sv[0]; - VVV1_0( w_fp[8], w_fp[5], w_fp[111], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[5], w_fp[111], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -25636,7 +25636,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1127 - VVV1_0( w_fp[21], w_fp[8], w_fp[29], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[21], w_fp[8], w_fp[29], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -25656,7 +25656,7 @@ namespace mg5amcCpu jamp_sv[115] -= amp_sv[0]; jamp_sv[117] -= amp_sv[0]; jamp_sv[119] += amp_sv[0]; - VVV1_0( w_fp[71], w_fp[8], w_fp[29], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[71], w_fp[8], w_fp[29], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -25676,7 +25676,7 @@ namespace mg5amcCpu jamp_sv[116] += amp_sv[0]; jamp_sv[117] -= amp_sv[0]; jamp_sv[118] += amp_sv[0]; - VVV1_0( w_fp[97], w_fp[8], w_fp[29], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[97], w_fp[8], w_fp[29], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -25700,12 +25700,12 @@ namespace mg5amcCpu // *** DIAGRAM 1128 OF 1240 *** // Wavefunction(s) for diagram number 1128 - FFV1_2( w_fp[3], w_fp[21], COUPs[1], cIPD[0], cIPD[1], w_fp[16] ); - FFV1_2( w_fp[3], w_fp[71], COUPs[1], cIPD[0], cIPD[1], w_fp[10] ); - FFV1_2( w_fp[3], w_fp[97], COUPs[1], cIPD[0], cIPD[1], w_fp[68] ); + FFV1_2( w_fp[3], w_fp[21], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[16] ); + FFV1_2( w_fp[3], w_fp[71], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[10] ); + FFV1_2( w_fp[3], w_fp[97], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[68] ); // Amplitude(s) for diagram number 1128 - FFV1_0( w_fp[16], w_fp[39], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[16], w_fp[39], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -25713,7 +25713,7 @@ namespace mg5amcCpu jamp_sv[91] -= amp_sv[0]; jamp_sv[93] -= amp_sv[0]; jamp_sv[95] += amp_sv[0]; - FFV1_0( w_fp[10], w_fp[39], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[10], w_fp[39], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -25721,7 +25721,7 @@ namespace mg5amcCpu jamp_sv[92] += amp_sv[0]; jamp_sv[93] -= amp_sv[0]; jamp_sv[94] += amp_sv[0]; - FFV1_0( w_fp[68], w_fp[39], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[68], w_fp[39], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -25736,7 +25736,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1129 - FFV1_0( w_fp[3], w_fp[39], w_fp[17], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[39], w_fp[17], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -25748,7 +25748,7 @@ namespace mg5amcCpu jamp_sv[91] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[93] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[95] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[39], w_fp[98], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[39], w_fp[98], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -25760,7 +25760,7 @@ namespace mg5amcCpu jamp_sv[92] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[93] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[94] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[39], w_fp[111], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[39], w_fp[111], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -25779,7 +25779,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1130 - FFV1_0( w_fp[41], w_fp[39], w_fp[21], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[39], w_fp[21], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -25787,7 +25787,7 @@ namespace mg5amcCpu jamp_sv[74] -= amp_sv[0]; jamp_sv[80] -= amp_sv[0]; jamp_sv[86] += amp_sv[0]; - FFV1_0( w_fp[41], w_fp[39], w_fp[71], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[39], w_fp[71], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -25795,7 +25795,7 @@ namespace mg5amcCpu jamp_sv[78] += amp_sv[0]; jamp_sv[80] -= amp_sv[0]; jamp_sv[84] += amp_sv[0]; - FFV1_0( w_fp[41], w_fp[39], w_fp[97], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[39], w_fp[97], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -25810,7 +25810,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1131 - FFV1_0( w_fp[16], w_fp[47], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[16], w_fp[47], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -25818,7 +25818,7 @@ namespace mg5amcCpu jamp_sv[115] -= amp_sv[0]; jamp_sv[117] -= amp_sv[0]; jamp_sv[119] += amp_sv[0]; - FFV1_0( w_fp[10], w_fp[47], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[10], w_fp[47], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -25826,7 +25826,7 @@ namespace mg5amcCpu jamp_sv[116] += amp_sv[0]; jamp_sv[117] -= amp_sv[0]; jamp_sv[118] += amp_sv[0]; - FFV1_0( w_fp[68], w_fp[47], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[68], w_fp[47], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -25841,7 +25841,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1132 - FFV1_0( w_fp[3], w_fp[47], w_fp[59], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[47], w_fp[59], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -25853,7 +25853,7 @@ namespace mg5amcCpu jamp_sv[115] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[117] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[119] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[47], w_fp[20], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[47], w_fp[20], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -25865,7 +25865,7 @@ namespace mg5amcCpu jamp_sv[116] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[117] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[118] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[47], w_fp[60], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[47], w_fp[60], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -25884,7 +25884,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1133 - FFV1_0( w_fp[38], w_fp[47], w_fp[21], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[47], w_fp[21], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -25892,7 +25892,7 @@ namespace mg5amcCpu jamp_sv[98] -= amp_sv[0]; jamp_sv[104] -= amp_sv[0]; jamp_sv[110] += amp_sv[0]; - FFV1_0( w_fp[38], w_fp[47], w_fp[71], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[47], w_fp[71], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -25900,7 +25900,7 @@ namespace mg5amcCpu jamp_sv[102] += amp_sv[0]; jamp_sv[104] -= amp_sv[0]; jamp_sv[108] += amp_sv[0]; - FFV1_0( w_fp[38], w_fp[47], w_fp[97], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[47], w_fp[97], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -25912,12 +25912,12 @@ namespace mg5amcCpu // *** DIAGRAM 1134 OF 1240 *** // Wavefunction(s) for diagram number 1134 - FFV1_1( w_fp[2], w_fp[21], COUPs[1], cIPD[0], cIPD[1], w_fp[23] ); - FFV1_1( w_fp[2], w_fp[71], COUPs[1], cIPD[0], cIPD[1], w_fp[21] ); - FFV1_1( w_fp[2], w_fp[97], COUPs[1], cIPD[0], cIPD[1], w_fp[71] ); + FFV1_1( w_fp[2], w_fp[21], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[23] ); + FFV1_1( w_fp[2], w_fp[71], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[21] ); + FFV1_1( w_fp[2], w_fp[97], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[71] ); // Amplitude(s) for diagram number 1134 - FFV1_0( w_fp[38], w_fp[23], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[23], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -25925,7 +25925,7 @@ namespace mg5amcCpu jamp_sv[7] -= amp_sv[0]; jamp_sv[31] -= amp_sv[0]; jamp_sv[55] += amp_sv[0]; - FFV1_0( w_fp[38], w_fp[21], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[21], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -25933,7 +25933,7 @@ namespace mg5amcCpu jamp_sv[25] += amp_sv[0]; jamp_sv[31] -= amp_sv[0]; jamp_sv[49] += amp_sv[0]; - FFV1_0( w_fp[38], w_fp[71], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[71], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -25948,7 +25948,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1135 - FFV1_0( w_fp[38], w_fp[2], w_fp[17], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[2], w_fp[17], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -25960,7 +25960,7 @@ namespace mg5amcCpu jamp_sv[98] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[104] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[110] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[38], w_fp[2], w_fp[98], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[2], w_fp[98], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -25972,7 +25972,7 @@ namespace mg5amcCpu jamp_sv[102] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[104] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[108] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[38], w_fp[2], w_fp[111], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[2], w_fp[111], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -25991,7 +25991,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1136 - FFV1_0( w_fp[41], w_fp[23], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[23], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -25999,7 +25999,7 @@ namespace mg5amcCpu jamp_sv[6] -= amp_sv[0]; jamp_sv[30] -= amp_sv[0]; jamp_sv[54] += amp_sv[0]; - FFV1_0( w_fp[41], w_fp[21], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[21], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -26007,7 +26007,7 @@ namespace mg5amcCpu jamp_sv[24] += amp_sv[0]; jamp_sv[30] -= amp_sv[0]; jamp_sv[48] += amp_sv[0]; - FFV1_0( w_fp[41], w_fp[71], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[71], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -26022,7 +26022,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1137 - FFV1_0( w_fp[41], w_fp[2], w_fp[59], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[2], w_fp[59], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -26034,7 +26034,7 @@ namespace mg5amcCpu jamp_sv[74] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[80] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[86] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[41], w_fp[2], w_fp[20], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[2], w_fp[20], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -26046,7 +26046,7 @@ namespace mg5amcCpu jamp_sv[78] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[80] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[84] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[41], w_fp[2], w_fp[60], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[2], w_fp[60], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -26065,7 +26065,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1138 - FFV1_0( w_fp[3], w_fp[23], w_fp[29], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[23], w_fp[29], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -26077,7 +26077,7 @@ namespace mg5amcCpu jamp_sv[31] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[54] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[55] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[21], w_fp[29], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[21], w_fp[29], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -26089,7 +26089,7 @@ namespace mg5amcCpu jamp_sv[31] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[48] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[49] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[71], w_fp[29], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[71], w_fp[29], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -26108,7 +26108,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1139 - FFV1_0( w_fp[16], w_fp[2], w_fp[29], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[16], w_fp[2], w_fp[29], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -26120,7 +26120,7 @@ namespace mg5amcCpu jamp_sv[115] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[117] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[119] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[10], w_fp[2], w_fp[29], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[10], w_fp[2], w_fp[29], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -26132,7 +26132,7 @@ namespace mg5amcCpu jamp_sv[116] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[117] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[118] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[68], w_fp[2], w_fp[29], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[68], w_fp[2], w_fp[29], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -26148,12 +26148,12 @@ namespace mg5amcCpu // *** DIAGRAM 1140 OF 1240 *** // Wavefunction(s) for diagram number 1140 - VVVV1P0_1( w_fp[0], w_fp[1], w_fp[5], COUPs[2], 0., 0., w_fp[68] ); - VVVV3P0_1( w_fp[0], w_fp[1], w_fp[5], COUPs[2], 0., 0., w_fp[29] ); - VVVV4P0_1( w_fp[0], w_fp[1], w_fp[5], COUPs[2], 0., 0., w_fp[10] ); + VVVV1P0_1( w_fp[0], w_fp[1], w_fp[5], COUPs[2], 1.0, 0., 0., w_fp[68] ); + VVVV3P0_1( w_fp[0], w_fp[1], w_fp[5], COUPs[2], 1.0, 0., 0., w_fp[29] ); + VVVV4P0_1( w_fp[0], w_fp[1], w_fp[5], COUPs[2], 1.0, 0., 0., w_fp[10] ); // Amplitude(s) for diagram number 1140 - VVVV1_0( w_fp[68], w_fp[8], w_fp[4], w_fp[6], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[68], w_fp[8], w_fp[4], w_fp[6], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -26173,7 +26173,7 @@ namespace mg5amcCpu jamp_sv[109] -= amp_sv[0]; jamp_sv[111] -= amp_sv[0]; jamp_sv[113] += amp_sv[0]; - VVVV3_0( w_fp[68], w_fp[8], w_fp[4], w_fp[6], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[68], w_fp[8], w_fp[4], w_fp[6], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -26193,7 +26193,7 @@ namespace mg5amcCpu jamp_sv[111] -= amp_sv[0]; jamp_sv[113] += amp_sv[0]; jamp_sv[116] -= amp_sv[0]; - VVVV4_0( w_fp[68], w_fp[8], w_fp[4], w_fp[6], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[68], w_fp[8], w_fp[4], w_fp[6], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -26213,7 +26213,7 @@ namespace mg5amcCpu jamp_sv[100] += amp_sv[0]; jamp_sv[106] += amp_sv[0]; jamp_sv[116] -= amp_sv[0]; - VVVV1_0( w_fp[29], w_fp[8], w_fp[4], w_fp[6], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[29], w_fp[8], w_fp[4], w_fp[6], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -26233,7 +26233,7 @@ namespace mg5amcCpu jamp_sv[110] += amp_sv[0]; jamp_sv[111] -= amp_sv[0]; jamp_sv[112] += amp_sv[0]; - VVVV3_0( w_fp[29], w_fp[8], w_fp[4], w_fp[6], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[29], w_fp[8], w_fp[4], w_fp[6], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -26253,7 +26253,7 @@ namespace mg5amcCpu jamp_sv[111] -= amp_sv[0]; jamp_sv[112] += amp_sv[0]; jamp_sv[114] -= amp_sv[0]; - VVVV4_0( w_fp[29], w_fp[8], w_fp[4], w_fp[6], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[29], w_fp[8], w_fp[4], w_fp[6], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -26273,7 +26273,7 @@ namespace mg5amcCpu jamp_sv[103] -= amp_sv[0]; jamp_sv[106] += amp_sv[0]; jamp_sv[114] -= amp_sv[0]; - VVVV1_0( w_fp[10], w_fp[8], w_fp[4], w_fp[6], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[10], w_fp[8], w_fp[4], w_fp[6], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -26293,7 +26293,7 @@ namespace mg5amcCpu jamp_sv[110] += amp_sv[0]; jamp_sv[112] += amp_sv[0]; jamp_sv[113] -= amp_sv[0]; - VVVV3_0( w_fp[10], w_fp[8], w_fp[4], w_fp[6], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[10], w_fp[8], w_fp[4], w_fp[6], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -26313,7 +26313,7 @@ namespace mg5amcCpu jamp_sv[113] -= amp_sv[0]; jamp_sv[114] -= amp_sv[0]; jamp_sv[116] += amp_sv[0]; - VVVV4_0( w_fp[10], w_fp[8], w_fp[4], w_fp[6], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[10], w_fp[8], w_fp[4], w_fp[6], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -26337,12 +26337,12 @@ namespace mg5amcCpu // *** DIAGRAM 1141 OF 1240 *** // Wavefunction(s) for diagram number 1141 - VVV1P0_1( w_fp[68], w_fp[4], COUPs[0], 0., 0., w_fp[16] ); - VVV1P0_1( w_fp[29], w_fp[4], COUPs[0], 0., 0., w_fp[71] ); - VVV1P0_1( w_fp[10], w_fp[4], COUPs[0], 0., 0., w_fp[21] ); + VVV1P0_1( w_fp[68], w_fp[4], COUPs[0], 1.0, 0., 0., w_fp[16] ); + VVV1P0_1( w_fp[29], w_fp[4], COUPs[0], 1.0, 0., 0., w_fp[71] ); + VVV1P0_1( w_fp[10], w_fp[4], COUPs[0], 1.0, 0., 0., w_fp[21] ); // Amplitude(s) for diagram number 1141 - VVV1_0( w_fp[8], w_fp[6], w_fp[16], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[6], w_fp[16], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -26362,7 +26362,7 @@ namespace mg5amcCpu jamp_sv[111] -= amp_sv[0]; jamp_sv[113] += amp_sv[0]; jamp_sv[116] -= amp_sv[0]; - VVV1_0( w_fp[8], w_fp[6], w_fp[71], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[6], w_fp[71], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -26382,7 +26382,7 @@ namespace mg5amcCpu jamp_sv[111] -= amp_sv[0]; jamp_sv[112] += amp_sv[0]; jamp_sv[114] -= amp_sv[0]; - VVV1_0( w_fp[8], w_fp[6], w_fp[21], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[6], w_fp[21], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -26406,12 +26406,12 @@ namespace mg5amcCpu // *** DIAGRAM 1142 OF 1240 *** // Wavefunction(s) for diagram number 1142 - VVV1P0_1( w_fp[68], w_fp[6], COUPs[0], 0., 0., w_fp[23] ); - VVV1P0_1( w_fp[29], w_fp[6], COUPs[0], 0., 0., w_fp[60] ); - VVV1P0_1( w_fp[10], w_fp[6], COUPs[0], 0., 0., w_fp[20] ); + VVV1P0_1( w_fp[68], w_fp[6], COUPs[0], 1.0, 0., 0., w_fp[23] ); + VVV1P0_1( w_fp[29], w_fp[6], COUPs[0], 1.0, 0., 0., w_fp[60] ); + VVV1P0_1( w_fp[10], w_fp[6], COUPs[0], 1.0, 0., 0., w_fp[20] ); // Amplitude(s) for diagram number 1142 - VVV1_0( w_fp[8], w_fp[4], w_fp[23], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[4], w_fp[23], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -26431,7 +26431,7 @@ namespace mg5amcCpu jamp_sv[100] += amp_sv[0]; jamp_sv[106] += amp_sv[0]; jamp_sv[116] -= amp_sv[0]; - VVV1_0( w_fp[8], w_fp[4], w_fp[60], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[4], w_fp[60], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -26451,7 +26451,7 @@ namespace mg5amcCpu jamp_sv[103] -= amp_sv[0]; jamp_sv[106] += amp_sv[0]; jamp_sv[114] -= amp_sv[0]; - VVV1_0( w_fp[8], w_fp[4], w_fp[20], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[4], w_fp[20], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -26478,7 +26478,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1143 - VVV1_0( w_fp[68], w_fp[8], w_fp[27], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[68], w_fp[8], w_fp[27], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -26498,7 +26498,7 @@ namespace mg5amcCpu jamp_sv[109] -= amp_sv[0]; jamp_sv[111] -= amp_sv[0]; jamp_sv[113] += amp_sv[0]; - VVV1_0( w_fp[29], w_fp[8], w_fp[27], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[29], w_fp[8], w_fp[27], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -26518,7 +26518,7 @@ namespace mg5amcCpu jamp_sv[110] += amp_sv[0]; jamp_sv[111] -= amp_sv[0]; jamp_sv[112] += amp_sv[0]; - VVV1_0( w_fp[10], w_fp[8], w_fp[27], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[10], w_fp[8], w_fp[27], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -26542,12 +26542,12 @@ namespace mg5amcCpu // *** DIAGRAM 1144 OF 1240 *** // Wavefunction(s) for diagram number 1144 - FFV1_2( w_fp[3], w_fp[68], COUPs[1], cIPD[0], cIPD[1], w_fp[59] ); - FFV1_2( w_fp[3], w_fp[29], COUPs[1], cIPD[0], cIPD[1], w_fp[111] ); - FFV1_2( w_fp[3], w_fp[10], COUPs[1], cIPD[0], cIPD[1], w_fp[98] ); + FFV1_2( w_fp[3], w_fp[68], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[59] ); + FFV1_2( w_fp[3], w_fp[29], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[111] ); + FFV1_2( w_fp[3], w_fp[10], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[98] ); // Amplitude(s) for diagram number 1144 - FFV1_0( w_fp[59], w_fp[33], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[59], w_fp[33], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -26555,7 +26555,7 @@ namespace mg5amcCpu jamp_sv[67] -= amp_sv[0]; jamp_sv[69] -= amp_sv[0]; jamp_sv[71] += amp_sv[0]; - FFV1_0( w_fp[111], w_fp[33], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[111], w_fp[33], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -26563,7 +26563,7 @@ namespace mg5amcCpu jamp_sv[68] += amp_sv[0]; jamp_sv[69] -= amp_sv[0]; jamp_sv[70] += amp_sv[0]; - FFV1_0( w_fp[98], w_fp[33], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[98], w_fp[33], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -26578,7 +26578,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1145 - FFV1_0( w_fp[3], w_fp[33], w_fp[23], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[33], w_fp[23], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -26590,7 +26590,7 @@ namespace mg5amcCpu jamp_sv[67] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[69] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[71] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[33], w_fp[60], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[33], w_fp[60], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -26602,7 +26602,7 @@ namespace mg5amcCpu jamp_sv[68] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[69] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[70] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[33], w_fp[20], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[33], w_fp[20], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -26621,7 +26621,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1146 - FFV1_0( w_fp[41], w_fp[33], w_fp[68], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[33], w_fp[68], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -26629,7 +26629,7 @@ namespace mg5amcCpu jamp_sv[50] -= amp_sv[0]; jamp_sv[56] -= amp_sv[0]; jamp_sv[62] += amp_sv[0]; - FFV1_0( w_fp[41], w_fp[33], w_fp[29], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[33], w_fp[29], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -26637,7 +26637,7 @@ namespace mg5amcCpu jamp_sv[54] += amp_sv[0]; jamp_sv[56] -= amp_sv[0]; jamp_sv[60] += amp_sv[0]; - FFV1_0( w_fp[41], w_fp[33], w_fp[10], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[33], w_fp[10], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -26652,7 +26652,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1147 - FFV1_0( w_fp[59], w_fp[47], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[59], w_fp[47], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -26660,7 +26660,7 @@ namespace mg5amcCpu jamp_sv[109] -= amp_sv[0]; jamp_sv[111] -= amp_sv[0]; jamp_sv[113] += amp_sv[0]; - FFV1_0( w_fp[111], w_fp[47], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[111], w_fp[47], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -26668,7 +26668,7 @@ namespace mg5amcCpu jamp_sv[110] += amp_sv[0]; jamp_sv[111] -= amp_sv[0]; jamp_sv[112] += amp_sv[0]; - FFV1_0( w_fp[98], w_fp[47], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[98], w_fp[47], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -26683,7 +26683,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1148 - FFV1_0( w_fp[3], w_fp[47], w_fp[16], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[47], w_fp[16], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -26695,7 +26695,7 @@ namespace mg5amcCpu jamp_sv[111] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[113] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[116] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[47], w_fp[71], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[47], w_fp[71], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -26707,7 +26707,7 @@ namespace mg5amcCpu jamp_sv[111] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[112] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[114] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[47], w_fp[21], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[47], w_fp[21], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -26726,7 +26726,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1149 - FFV1_0( w_fp[46], w_fp[47], w_fp[68], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[47], w_fp[68], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -26734,7 +26734,7 @@ namespace mg5amcCpu jamp_sv[100] -= amp_sv[0]; jamp_sv[106] -= amp_sv[0]; jamp_sv[116] += amp_sv[0]; - FFV1_0( w_fp[46], w_fp[47], w_fp[29], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[47], w_fp[29], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -26742,7 +26742,7 @@ namespace mg5amcCpu jamp_sv[103] += amp_sv[0]; jamp_sv[106] -= amp_sv[0]; jamp_sv[114] += amp_sv[0]; - FFV1_0( w_fp[46], w_fp[47], w_fp[10], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[47], w_fp[10], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -26754,12 +26754,12 @@ namespace mg5amcCpu // *** DIAGRAM 1150 OF 1240 *** // Wavefunction(s) for diagram number 1150 - FFV1_1( w_fp[2], w_fp[68], COUPs[1], cIPD[0], cIPD[1], w_fp[17] ); - FFV1_1( w_fp[2], w_fp[29], COUPs[1], cIPD[0], cIPD[1], w_fp[68] ); - FFV1_1( w_fp[2], w_fp[10], COUPs[1], cIPD[0], cIPD[1], w_fp[29] ); + FFV1_1( w_fp[2], w_fp[68], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[17] ); + FFV1_1( w_fp[2], w_fp[29], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[68] ); + FFV1_1( w_fp[2], w_fp[10], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[29] ); // Amplitude(s) for diagram number 1150 - FFV1_0( w_fp[46], w_fp[17], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[17], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -26767,7 +26767,7 @@ namespace mg5amcCpu jamp_sv[13] -= amp_sv[0]; jamp_sv[37] -= amp_sv[0]; jamp_sv[79] += amp_sv[0]; - FFV1_0( w_fp[46], w_fp[68], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[68], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -26775,7 +26775,7 @@ namespace mg5amcCpu jamp_sv[27] += amp_sv[0]; jamp_sv[37] -= amp_sv[0]; jamp_sv[73] += amp_sv[0]; - FFV1_0( w_fp[46], w_fp[29], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[29], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -26790,7 +26790,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1151 - FFV1_0( w_fp[46], w_fp[2], w_fp[23], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[2], w_fp[23], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -26802,7 +26802,7 @@ namespace mg5amcCpu jamp_sv[100] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[106] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[116] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[46], w_fp[2], w_fp[60], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[2], w_fp[60], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -26814,7 +26814,7 @@ namespace mg5amcCpu jamp_sv[103] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[106] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[114] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[46], w_fp[2], w_fp[20], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[2], w_fp[20], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -26833,7 +26833,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1152 - FFV1_0( w_fp[41], w_fp[17], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[17], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -26841,7 +26841,7 @@ namespace mg5amcCpu jamp_sv[12] -= amp_sv[0]; jamp_sv[36] -= amp_sv[0]; jamp_sv[78] += amp_sv[0]; - FFV1_0( w_fp[41], w_fp[68], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[68], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -26849,7 +26849,7 @@ namespace mg5amcCpu jamp_sv[26] += amp_sv[0]; jamp_sv[36] -= amp_sv[0]; jamp_sv[72] += amp_sv[0]; - FFV1_0( w_fp[41], w_fp[29], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[29], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -26864,7 +26864,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1153 - FFV1_0( w_fp[41], w_fp[2], w_fp[16], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[2], w_fp[16], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -26876,7 +26876,7 @@ namespace mg5amcCpu jamp_sv[56] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[62] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[78] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[41], w_fp[2], w_fp[71], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[2], w_fp[71], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -26888,7 +26888,7 @@ namespace mg5amcCpu jamp_sv[56] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[60] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[72] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[41], w_fp[2], w_fp[21], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[2], w_fp[21], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -26907,7 +26907,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1154 - FFV1_0( w_fp[3], w_fp[17], w_fp[27], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[17], w_fp[27], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -26919,7 +26919,7 @@ namespace mg5amcCpu jamp_sv[37] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[78] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[79] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[68], w_fp[27], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[68], w_fp[27], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -26931,7 +26931,7 @@ namespace mg5amcCpu jamp_sv[37] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[72] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[73] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[29], w_fp[27], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[29], w_fp[27], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -26950,7 +26950,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1155 - FFV1_0( w_fp[59], w_fp[2], w_fp[27], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[59], w_fp[2], w_fp[27], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -26962,7 +26962,7 @@ namespace mg5amcCpu jamp_sv[109] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[111] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[113] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[111], w_fp[2], w_fp[27], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[111], w_fp[2], w_fp[27], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -26974,7 +26974,7 @@ namespace mg5amcCpu jamp_sv[110] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[111] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[112] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[98], w_fp[2], w_fp[27], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[98], w_fp[2], w_fp[27], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -26990,12 +26990,12 @@ namespace mg5amcCpu // *** DIAGRAM 1156 OF 1240 *** // Wavefunction(s) for diagram number 1156 - VVVV1P0_1( w_fp[0], w_fp[1], w_fp[6], COUPs[2], 0., 0., w_fp[98] ); - VVVV3P0_1( w_fp[0], w_fp[1], w_fp[6], COUPs[2], 0., 0., w_fp[27] ); - VVVV4P0_1( w_fp[0], w_fp[1], w_fp[6], COUPs[2], 0., 0., w_fp[111] ); + VVVV1P0_1( w_fp[0], w_fp[1], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[98] ); + VVVV3P0_1( w_fp[0], w_fp[1], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[27] ); + VVVV4P0_1( w_fp[0], w_fp[1], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[111] ); // Amplitude(s) for diagram number 1156 - VVVV1_0( w_fp[98], w_fp[8], w_fp[4], w_fp[5], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[98], w_fp[8], w_fp[4], w_fp[5], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -27015,7 +27015,7 @@ namespace mg5amcCpu jamp_sv[89] += amp_sv[0]; jamp_sv[102] += amp_sv[0]; jamp_sv[103] -= amp_sv[0]; - VVVV3_0( w_fp[98], w_fp[8], w_fp[4], w_fp[5], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[98], w_fp[8], w_fp[4], w_fp[5], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -27035,7 +27035,7 @@ namespace mg5amcCpu jamp_sv[89] += amp_sv[0]; jamp_sv[92] -= amp_sv[0]; jamp_sv[102] += amp_sv[0]; - VVVV4_0( w_fp[98], w_fp[8], w_fp[4], w_fp[5], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[98], w_fp[8], w_fp[4], w_fp[5], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -27055,7 +27055,7 @@ namespace mg5amcCpu jamp_sv[82] += amp_sv[0]; jamp_sv[92] -= amp_sv[0]; jamp_sv[103] += amp_sv[0]; - VVVV1_0( w_fp[27], w_fp[8], w_fp[4], w_fp[5], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[27], w_fp[8], w_fp[4], w_fp[5], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -27075,7 +27075,7 @@ namespace mg5amcCpu jamp_sv[88] += amp_sv[0]; jamp_sv[96] += amp_sv[0]; jamp_sv[97] -= amp_sv[0]; - VVVV3_0( w_fp[27], w_fp[8], w_fp[4], w_fp[5], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[27], w_fp[8], w_fp[4], w_fp[5], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -27095,7 +27095,7 @@ namespace mg5amcCpu jamp_sv[88] += amp_sv[0]; jamp_sv[90] -= amp_sv[0]; jamp_sv[96] += amp_sv[0]; - VVVV4_0( w_fp[27], w_fp[8], w_fp[4], w_fp[5], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[27], w_fp[8], w_fp[4], w_fp[5], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -27115,7 +27115,7 @@ namespace mg5amcCpu jamp_sv[82] += amp_sv[0]; jamp_sv[90] -= amp_sv[0]; jamp_sv[97] += amp_sv[0]; - VVVV1_0( w_fp[111], w_fp[8], w_fp[4], w_fp[5], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[111], w_fp[8], w_fp[4], w_fp[5], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -27135,7 +27135,7 @@ namespace mg5amcCpu jamp_sv[97] -= amp_sv[0]; jamp_sv[102] -= amp_sv[0]; jamp_sv[103] += amp_sv[0]; - VVVV3_0( w_fp[111], w_fp[8], w_fp[4], w_fp[5], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[111], w_fp[8], w_fp[4], w_fp[5], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -27155,7 +27155,7 @@ namespace mg5amcCpu jamp_sv[92] += amp_sv[0]; jamp_sv[96] += amp_sv[0]; jamp_sv[102] -= amp_sv[0]; - VVVV4_0( w_fp[111], w_fp[8], w_fp[4], w_fp[5], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[111], w_fp[8], w_fp[4], w_fp[5], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -27179,12 +27179,12 @@ namespace mg5amcCpu // *** DIAGRAM 1157 OF 1240 *** // Wavefunction(s) for diagram number 1157 - VVV1P0_1( w_fp[98], w_fp[4], COUPs[0], 0., 0., w_fp[59] ); - VVV1P0_1( w_fp[27], w_fp[4], COUPs[0], 0., 0., w_fp[29] ); - VVV1P0_1( w_fp[111], w_fp[4], COUPs[0], 0., 0., w_fp[68] ); + VVV1P0_1( w_fp[98], w_fp[4], COUPs[0], 1.0, 0., 0., w_fp[59] ); + VVV1P0_1( w_fp[27], w_fp[4], COUPs[0], 1.0, 0., 0., w_fp[29] ); + VVV1P0_1( w_fp[111], w_fp[4], COUPs[0], 1.0, 0., 0., w_fp[68] ); // Amplitude(s) for diagram number 1157 - VVV1_0( w_fp[8], w_fp[5], w_fp[59], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[5], w_fp[59], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -27204,7 +27204,7 @@ namespace mg5amcCpu jamp_sv[89] += amp_sv[0]; jamp_sv[92] -= amp_sv[0]; jamp_sv[102] += amp_sv[0]; - VVV1_0( w_fp[8], w_fp[5], w_fp[29], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[5], w_fp[29], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -27224,7 +27224,7 @@ namespace mg5amcCpu jamp_sv[88] += amp_sv[0]; jamp_sv[90] -= amp_sv[0]; jamp_sv[96] += amp_sv[0]; - VVV1_0( w_fp[8], w_fp[5], w_fp[68], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[5], w_fp[68], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -27248,12 +27248,12 @@ namespace mg5amcCpu // *** DIAGRAM 1158 OF 1240 *** // Wavefunction(s) for diagram number 1158 - VVV1P0_1( w_fp[98], w_fp[5], COUPs[0], 0., 0., w_fp[17] ); - VVV1P0_1( w_fp[27], w_fp[5], COUPs[0], 0., 0., w_fp[21] ); - VVV1P0_1( w_fp[111], w_fp[5], COUPs[0], 0., 0., w_fp[71] ); + VVV1P0_1( w_fp[98], w_fp[5], COUPs[0], 1.0, 0., 0., w_fp[17] ); + VVV1P0_1( w_fp[27], w_fp[5], COUPs[0], 1.0, 0., 0., w_fp[21] ); + VVV1P0_1( w_fp[111], w_fp[5], COUPs[0], 1.0, 0., 0., w_fp[71] ); // Amplitude(s) for diagram number 1158 - VVV1_0( w_fp[8], w_fp[4], w_fp[17], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[4], w_fp[17], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -27273,7 +27273,7 @@ namespace mg5amcCpu jamp_sv[82] += amp_sv[0]; jamp_sv[92] -= amp_sv[0]; jamp_sv[103] += amp_sv[0]; - VVV1_0( w_fp[8], w_fp[4], w_fp[21], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[4], w_fp[21], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -27293,7 +27293,7 @@ namespace mg5amcCpu jamp_sv[82] += amp_sv[0]; jamp_sv[90] -= amp_sv[0]; jamp_sv[97] += amp_sv[0]; - VVV1_0( w_fp[8], w_fp[4], w_fp[71], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[4], w_fp[71], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -27320,7 +27320,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1159 - VVV1_0( w_fp[98], w_fp[8], w_fp[24], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[98], w_fp[8], w_fp[24], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -27340,7 +27340,7 @@ namespace mg5amcCpu jamp_sv[89] += amp_sv[0]; jamp_sv[102] += amp_sv[0]; jamp_sv[103] -= amp_sv[0]; - VVV1_0( w_fp[27], w_fp[8], w_fp[24], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[27], w_fp[8], w_fp[24], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -27360,7 +27360,7 @@ namespace mg5amcCpu jamp_sv[88] += amp_sv[0]; jamp_sv[96] += amp_sv[0]; jamp_sv[97] -= amp_sv[0]; - VVV1_0( w_fp[111], w_fp[8], w_fp[24], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[111], w_fp[8], w_fp[24], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -27384,12 +27384,12 @@ namespace mg5amcCpu // *** DIAGRAM 1160 OF 1240 *** // Wavefunction(s) for diagram number 1160 - FFV1_2( w_fp[3], w_fp[98], COUPs[1], cIPD[0], cIPD[1], w_fp[16] ); - FFV1_2( w_fp[3], w_fp[27], COUPs[1], cIPD[0], cIPD[1], w_fp[20] ); - FFV1_2( w_fp[3], w_fp[111], COUPs[1], cIPD[0], cIPD[1], w_fp[60] ); + FFV1_2( w_fp[3], w_fp[98], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[16] ); + FFV1_2( w_fp[3], w_fp[27], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[20] ); + FFV1_2( w_fp[3], w_fp[111], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[60] ); // Amplitude(s) for diagram number 1160 - FFV1_0( w_fp[16], w_fp[33], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[16], w_fp[33], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -27397,7 +27397,7 @@ namespace mg5amcCpu jamp_sv[61] -= amp_sv[0]; jamp_sv[63] -= amp_sv[0]; jamp_sv[65] += amp_sv[0]; - FFV1_0( w_fp[20], w_fp[33], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[20], w_fp[33], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -27405,7 +27405,7 @@ namespace mg5amcCpu jamp_sv[62] += amp_sv[0]; jamp_sv[63] -= amp_sv[0]; jamp_sv[64] += amp_sv[0]; - FFV1_0( w_fp[60], w_fp[33], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[60], w_fp[33], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -27420,7 +27420,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1161 - FFV1_0( w_fp[3], w_fp[33], w_fp[17], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[33], w_fp[17], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -27432,7 +27432,7 @@ namespace mg5amcCpu jamp_sv[63] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[65] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[68] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[33], w_fp[21], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[33], w_fp[21], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -27444,7 +27444,7 @@ namespace mg5amcCpu jamp_sv[63] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[64] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[66] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[33], w_fp[71], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[33], w_fp[71], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -27463,7 +27463,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1162 - FFV1_0( w_fp[38], w_fp[33], w_fp[98], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[33], w_fp[98], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -27471,7 +27471,7 @@ namespace mg5amcCpu jamp_sv[52] -= amp_sv[0]; jamp_sv[58] -= amp_sv[0]; jamp_sv[68] += amp_sv[0]; - FFV1_0( w_fp[38], w_fp[33], w_fp[27], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[33], w_fp[27], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -27479,7 +27479,7 @@ namespace mg5amcCpu jamp_sv[55] += amp_sv[0]; jamp_sv[58] -= amp_sv[0]; jamp_sv[66] += amp_sv[0]; - FFV1_0( w_fp[38], w_fp[33], w_fp[111], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[33], w_fp[111], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -27494,7 +27494,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1163 - FFV1_0( w_fp[16], w_fp[39], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[16], w_fp[39], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -27502,7 +27502,7 @@ namespace mg5amcCpu jamp_sv[85] -= amp_sv[0]; jamp_sv[87] -= amp_sv[0]; jamp_sv[89] += amp_sv[0]; - FFV1_0( w_fp[20], w_fp[39], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[20], w_fp[39], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -27510,7 +27510,7 @@ namespace mg5amcCpu jamp_sv[86] += amp_sv[0]; jamp_sv[87] -= amp_sv[0]; jamp_sv[88] += amp_sv[0]; - FFV1_0( w_fp[60], w_fp[39], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[60], w_fp[39], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -27525,7 +27525,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1164 - FFV1_0( w_fp[3], w_fp[39], w_fp[59], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[39], w_fp[59], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -27537,7 +27537,7 @@ namespace mg5amcCpu jamp_sv[87] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[89] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[92] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[39], w_fp[29], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[39], w_fp[29], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -27549,7 +27549,7 @@ namespace mg5amcCpu jamp_sv[87] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[88] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[90] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[39], w_fp[68], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[39], w_fp[68], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -27568,7 +27568,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1165 - FFV1_0( w_fp[46], w_fp[39], w_fp[98], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[39], w_fp[98], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -27576,7 +27576,7 @@ namespace mg5amcCpu jamp_sv[76] -= amp_sv[0]; jamp_sv[82] -= amp_sv[0]; jamp_sv[92] += amp_sv[0]; - FFV1_0( w_fp[46], w_fp[39], w_fp[27], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[39], w_fp[27], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -27584,7 +27584,7 @@ namespace mg5amcCpu jamp_sv[79] += amp_sv[0]; jamp_sv[82] -= amp_sv[0]; jamp_sv[90] += amp_sv[0]; - FFV1_0( w_fp[46], w_fp[39], w_fp[111], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[39], w_fp[111], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -27596,12 +27596,12 @@ namespace mg5amcCpu // *** DIAGRAM 1166 OF 1240 *** // Wavefunction(s) for diagram number 1166 - FFV1_1( w_fp[2], w_fp[98], COUPs[1], cIPD[0], cIPD[1], w_fp[23] ); - FFV1_1( w_fp[2], w_fp[27], COUPs[1], cIPD[0], cIPD[1], w_fp[98] ); - FFV1_1( w_fp[2], w_fp[111], COUPs[1], cIPD[0], cIPD[1], w_fp[27] ); + FFV1_1( w_fp[2], w_fp[98], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[23] ); + FFV1_1( w_fp[2], w_fp[27], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[98] ); + FFV1_1( w_fp[2], w_fp[111], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[27] ); // Amplitude(s) for diagram number 1166 - FFV1_0( w_fp[46], w_fp[23], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[23], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -27609,7 +27609,7 @@ namespace mg5amcCpu jamp_sv[19] -= amp_sv[0]; jamp_sv[43] -= amp_sv[0]; jamp_sv[103] += amp_sv[0]; - FFV1_0( w_fp[46], w_fp[98], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[98], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -27617,7 +27617,7 @@ namespace mg5amcCpu jamp_sv[29] += amp_sv[0]; jamp_sv[43] -= amp_sv[0]; jamp_sv[97] += amp_sv[0]; - FFV1_0( w_fp[46], w_fp[27], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[27], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -27632,7 +27632,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1167 - FFV1_0( w_fp[46], w_fp[2], w_fp[17], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[2], w_fp[17], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -27644,7 +27644,7 @@ namespace mg5amcCpu jamp_sv[82] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[92] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[103] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[46], w_fp[2], w_fp[21], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[2], w_fp[21], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -27656,7 +27656,7 @@ namespace mg5amcCpu jamp_sv[82] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[90] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[97] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[46], w_fp[2], w_fp[71], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[2], w_fp[71], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -27675,7 +27675,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1168 - FFV1_0( w_fp[38], w_fp[23], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[23], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -27683,7 +27683,7 @@ namespace mg5amcCpu jamp_sv[18] -= amp_sv[0]; jamp_sv[42] -= amp_sv[0]; jamp_sv[102] += amp_sv[0]; - FFV1_0( w_fp[38], w_fp[98], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[98], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -27691,7 +27691,7 @@ namespace mg5amcCpu jamp_sv[28] += amp_sv[0]; jamp_sv[42] -= amp_sv[0]; jamp_sv[96] += amp_sv[0]; - FFV1_0( w_fp[38], w_fp[27], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[27], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -27706,7 +27706,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1169 - FFV1_0( w_fp[38], w_fp[2], w_fp[59], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[2], w_fp[59], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -27718,7 +27718,7 @@ namespace mg5amcCpu jamp_sv[58] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[68] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[102] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[38], w_fp[2], w_fp[29], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[2], w_fp[29], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -27730,7 +27730,7 @@ namespace mg5amcCpu jamp_sv[58] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[66] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[96] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[38], w_fp[2], w_fp[68], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[2], w_fp[68], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -27749,7 +27749,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1170 - FFV1_0( w_fp[3], w_fp[23], w_fp[24], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[23], w_fp[24], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -27761,7 +27761,7 @@ namespace mg5amcCpu jamp_sv[43] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[102] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[103] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[98], w_fp[24], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[98], w_fp[24], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -27773,7 +27773,7 @@ namespace mg5amcCpu jamp_sv[43] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[96] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[97] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[27], w_fp[24], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[27], w_fp[24], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -27792,7 +27792,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1171 - FFV1_0( w_fp[16], w_fp[2], w_fp[24], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[16], w_fp[2], w_fp[24], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -27804,7 +27804,7 @@ namespace mg5amcCpu jamp_sv[85] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[87] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[89] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[20], w_fp[2], w_fp[24], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[20], w_fp[2], w_fp[24], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -27816,7 +27816,7 @@ namespace mg5amcCpu jamp_sv[86] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[87] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[88] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[60], w_fp[2], w_fp[24], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[60], w_fp[2], w_fp[24], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -27832,15 +27832,15 @@ namespace mg5amcCpu // *** DIAGRAM 1172 OF 1240 *** // Wavefunction(s) for diagram number 1172 - VVVV1P0_1( w_fp[0], w_fp[4], w_fp[5], COUPs[2], 0., 0., w_fp[60] ); - VVVV3P0_1( w_fp[0], w_fp[4], w_fp[5], COUPs[2], 0., 0., w_fp[24] ); - VVVV4P0_1( w_fp[0], w_fp[4], w_fp[5], COUPs[2], 0., 0., w_fp[20] ); - FFV1_2( w_fp[3], w_fp[60], COUPs[1], cIPD[0], cIPD[1], w_fp[16] ); - FFV1_2( w_fp[3], w_fp[24], COUPs[1], cIPD[0], cIPD[1], w_fp[27] ); - FFV1_2( w_fp[3], w_fp[20], COUPs[1], cIPD[0], cIPD[1], w_fp[98] ); + VVVV1P0_1( w_fp[0], w_fp[4], w_fp[5], COUPs[2], 1.0, 0., 0., w_fp[60] ); + VVVV3P0_1( w_fp[0], w_fp[4], w_fp[5], COUPs[2], 1.0, 0., 0., w_fp[24] ); + VVVV4P0_1( w_fp[0], w_fp[4], w_fp[5], COUPs[2], 1.0, 0., 0., w_fp[20] ); + FFV1_2( w_fp[3], w_fp[60], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[16] ); + FFV1_2( w_fp[3], w_fp[24], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[27] ); + FFV1_2( w_fp[3], w_fp[20], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[98] ); // Amplitude(s) for diagram number 1172 - FFV1_0( w_fp[16], w_fp[77], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[16], w_fp[77], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -27848,7 +27848,7 @@ namespace mg5amcCpu jamp_sv[43] -= amp_sv[0]; jamp_sv[45] -= amp_sv[0]; jamp_sv[47] += amp_sv[0]; - FFV1_0( w_fp[27], w_fp[77], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[27], w_fp[77], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -27856,7 +27856,7 @@ namespace mg5amcCpu jamp_sv[44] += amp_sv[0]; jamp_sv[45] -= amp_sv[0]; jamp_sv[46] += amp_sv[0]; - FFV1_0( w_fp[98], w_fp[77], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[98], w_fp[77], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -27868,12 +27868,12 @@ namespace mg5amcCpu // *** DIAGRAM 1173 OF 1240 *** // Wavefunction(s) for diagram number 1173 - VVV1P0_1( w_fp[60], w_fp[6], COUPs[0], 0., 0., w_fp[23] ); - VVV1P0_1( w_fp[24], w_fp[6], COUPs[0], 0., 0., w_fp[68] ); - VVV1P0_1( w_fp[20], w_fp[6], COUPs[0], 0., 0., w_fp[29] ); + VVV1P0_1( w_fp[60], w_fp[6], COUPs[0], 1.0, 0., 0., w_fp[23] ); + VVV1P0_1( w_fp[24], w_fp[6], COUPs[0], 1.0, 0., 0., w_fp[68] ); + VVV1P0_1( w_fp[20], w_fp[6], COUPs[0], 1.0, 0., 0., w_fp[29] ); // Amplitude(s) for diagram number 1173 - FFV1_0( w_fp[3], w_fp[77], w_fp[23], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[77], w_fp[23], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -27885,7 +27885,7 @@ namespace mg5amcCpu jamp_sv[43] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[45] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[47] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[77], w_fp[68], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[77], w_fp[68], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -27897,7 +27897,7 @@ namespace mg5amcCpu jamp_sv[44] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[45] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[46] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[77], w_fp[29], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[77], w_fp[29], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -27916,7 +27916,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1174 - FFV1_0( w_fp[41], w_fp[77], w_fp[60], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[77], w_fp[60], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -27924,7 +27924,7 @@ namespace mg5amcCpu jamp_sv[26] -= amp_sv[0]; jamp_sv[32] -= amp_sv[0]; jamp_sv[38] += amp_sv[0]; - FFV1_0( w_fp[41], w_fp[77], w_fp[24], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[77], w_fp[24], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -27932,7 +27932,7 @@ namespace mg5amcCpu jamp_sv[30] += amp_sv[0]; jamp_sv[32] -= amp_sv[0]; jamp_sv[36] += amp_sv[0]; - FFV1_0( w_fp[41], w_fp[77], w_fp[20], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[77], w_fp[20], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -27944,12 +27944,12 @@ namespace mg5amcCpu // *** DIAGRAM 1175 OF 1240 *** // Wavefunction(s) for diagram number 1175 - FFV1_1( w_fp[2], w_fp[60], COUPs[1], cIPD[0], cIPD[1], w_fp[59] ); - FFV1_1( w_fp[2], w_fp[24], COUPs[1], cIPD[0], cIPD[1], w_fp[71] ); - FFV1_1( w_fp[2], w_fp[20], COUPs[1], cIPD[0], cIPD[1], w_fp[21] ); + FFV1_1( w_fp[2], w_fp[60], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[59] ); + FFV1_1( w_fp[2], w_fp[24], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[71] ); + FFV1_1( w_fp[2], w_fp[20], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[21] ); // Amplitude(s) for diagram number 1175 - FFV1_0( w_fp[52], w_fp[59], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[59], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -27957,7 +27957,7 @@ namespace mg5amcCpu jamp_sv[15] -= amp_sv[0]; jamp_sv[61] -= amp_sv[0]; jamp_sv[85] += amp_sv[0]; - FFV1_0( w_fp[52], w_fp[71], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[71], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -27965,7 +27965,7 @@ namespace mg5amcCpu jamp_sv[51] += amp_sv[0]; jamp_sv[61] -= amp_sv[0]; jamp_sv[75] += amp_sv[0]; - FFV1_0( w_fp[52], w_fp[21], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[21], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -27980,7 +27980,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1176 - FFV1_0( w_fp[52], w_fp[2], w_fp[23], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[2], w_fp[23], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -27992,7 +27992,7 @@ namespace mg5amcCpu jamp_sv[101] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[112] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[118] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[52], w_fp[2], w_fp[68], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[2], w_fp[68], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -28004,7 +28004,7 @@ namespace mg5amcCpu jamp_sv[109] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[112] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[115] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[52], w_fp[2], w_fp[29], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[2], w_fp[29], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -28023,7 +28023,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1177 - FFV1_0( w_fp[52], w_fp[47], w_fp[60], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[47], w_fp[60], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -28031,7 +28031,7 @@ namespace mg5amcCpu jamp_sv[101] -= amp_sv[0]; jamp_sv[112] -= amp_sv[0]; jamp_sv[118] += amp_sv[0]; - FFV1_0( w_fp[52], w_fp[47], w_fp[24], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[47], w_fp[24], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -28039,7 +28039,7 @@ namespace mg5amcCpu jamp_sv[109] += amp_sv[0]; jamp_sv[112] -= amp_sv[0]; jamp_sv[115] += amp_sv[0]; - FFV1_0( w_fp[52], w_fp[47], w_fp[20], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[47], w_fp[20], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -28054,7 +28054,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1178 - FFV1_0( w_fp[3], w_fp[59], w_fp[72], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[59], w_fp[72], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -28066,7 +28066,7 @@ namespace mg5amcCpu jamp_sv[61] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[84] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[85] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[71], w_fp[72], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[71], w_fp[72], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -28078,7 +28078,7 @@ namespace mg5amcCpu jamp_sv[61] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[74] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[75] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[21], w_fp[72], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[21], w_fp[72], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -28097,7 +28097,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1179 - FFV1_0( w_fp[16], w_fp[2], w_fp[72], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[16], w_fp[2], w_fp[72], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -28109,7 +28109,7 @@ namespace mg5amcCpu jamp_sv[103] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[105] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[107] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[27], w_fp[2], w_fp[72], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[27], w_fp[2], w_fp[72], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -28121,7 +28121,7 @@ namespace mg5amcCpu jamp_sv[104] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[105] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[106] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[98], w_fp[2], w_fp[72], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[98], w_fp[2], w_fp[72], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -28140,7 +28140,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1180 - VVV1_0( w_fp[60], w_fp[72], w_fp[8], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[60], w_fp[72], w_fp[8], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -28160,7 +28160,7 @@ namespace mg5amcCpu jamp_sv[103] += amp_sv[0]; jamp_sv[105] += amp_sv[0]; jamp_sv[107] -= amp_sv[0]; - VVV1_0( w_fp[24], w_fp[72], w_fp[8], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[24], w_fp[72], w_fp[8], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -28180,7 +28180,7 @@ namespace mg5amcCpu jamp_sv[104] -= amp_sv[0]; jamp_sv[105] += amp_sv[0]; jamp_sv[106] -= amp_sv[0]; - VVV1_0( w_fp[20], w_fp[72], w_fp[8], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[20], w_fp[72], w_fp[8], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -28207,7 +28207,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1181 - VVVV1_0( w_fp[60], w_fp[1], w_fp[8], w_fp[6], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[60], w_fp[1], w_fp[8], w_fp[6], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -28227,7 +28227,7 @@ namespace mg5amcCpu jamp_sv[107] += amp_sv[0]; jamp_sv[112] += amp_sv[0]; jamp_sv[118] -= amp_sv[0]; - VVVV3_0( w_fp[60], w_fp[1], w_fp[8], w_fp[6], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[60], w_fp[1], w_fp[8], w_fp[6], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -28247,7 +28247,7 @@ namespace mg5amcCpu jamp_sv[103] -= amp_sv[0]; jamp_sv[105] -= amp_sv[0]; jamp_sv[107] += amp_sv[0]; - VVVV4_0( w_fp[60], w_fp[1], w_fp[8], w_fp[6], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[60], w_fp[1], w_fp[8], w_fp[6], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -28267,7 +28267,7 @@ namespace mg5amcCpu jamp_sv[101] -= amp_sv[0]; jamp_sv[112] -= amp_sv[0]; jamp_sv[118] += amp_sv[0]; - VVVV1_0( w_fp[24], w_fp[1], w_fp[8], w_fp[6], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[24], w_fp[1], w_fp[8], w_fp[6], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -28287,7 +28287,7 @@ namespace mg5amcCpu jamp_sv[109] -= amp_sv[0]; jamp_sv[112] += amp_sv[0]; jamp_sv[115] -= amp_sv[0]; - VVVV3_0( w_fp[24], w_fp[1], w_fp[8], w_fp[6], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[24], w_fp[1], w_fp[8], w_fp[6], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -28307,7 +28307,7 @@ namespace mg5amcCpu jamp_sv[104] += amp_sv[0]; jamp_sv[105] -= amp_sv[0]; jamp_sv[106] += amp_sv[0]; - VVVV4_0( w_fp[24], w_fp[1], w_fp[8], w_fp[6], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[24], w_fp[1], w_fp[8], w_fp[6], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -28327,7 +28327,7 @@ namespace mg5amcCpu jamp_sv[109] += amp_sv[0]; jamp_sv[112] -= amp_sv[0]; jamp_sv[115] += amp_sv[0]; - VVVV1_0( w_fp[20], w_fp[1], w_fp[8], w_fp[6], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[20], w_fp[1], w_fp[8], w_fp[6], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -28347,7 +28347,7 @@ namespace mg5amcCpu jamp_sv[109] -= amp_sv[0]; jamp_sv[115] -= amp_sv[0]; jamp_sv[118] += amp_sv[0]; - VVVV3_0( w_fp[20], w_fp[1], w_fp[8], w_fp[6], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[20], w_fp[1], w_fp[8], w_fp[6], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -28367,7 +28367,7 @@ namespace mg5amcCpu jamp_sv[104] += amp_sv[0]; jamp_sv[106] += amp_sv[0]; jamp_sv[107] -= amp_sv[0]; - VVVV4_0( w_fp[20], w_fp[1], w_fp[8], w_fp[6], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[20], w_fp[1], w_fp[8], w_fp[6], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -28391,12 +28391,12 @@ namespace mg5amcCpu // *** DIAGRAM 1182 OF 1240 *** // Wavefunction(s) for diagram number 1182 - VVV1P0_1( w_fp[60], w_fp[1], COUPs[0], 0., 0., w_fp[72] ); - VVV1P0_1( w_fp[24], w_fp[1], COUPs[0], 0., 0., w_fp[60] ); - VVV1P0_1( w_fp[20], w_fp[1], COUPs[0], 0., 0., w_fp[24] ); + VVV1P0_1( w_fp[60], w_fp[1], COUPs[0], 1.0, 0., 0., w_fp[72] ); + VVV1P0_1( w_fp[24], w_fp[1], COUPs[0], 1.0, 0., 0., w_fp[60] ); + VVV1P0_1( w_fp[20], w_fp[1], COUPs[0], 1.0, 0., 0., w_fp[24] ); // Amplitude(s) for diagram number 1182 - VVV1_0( w_fp[8], w_fp[6], w_fp[72], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[6], w_fp[72], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -28416,7 +28416,7 @@ namespace mg5amcCpu jamp_sv[107] += amp_sv[0]; jamp_sv[112] += amp_sv[0]; jamp_sv[118] -= amp_sv[0]; - VVV1_0( w_fp[8], w_fp[6], w_fp[60], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[6], w_fp[60], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -28436,7 +28436,7 @@ namespace mg5amcCpu jamp_sv[109] -= amp_sv[0]; jamp_sv[112] += amp_sv[0]; jamp_sv[115] -= amp_sv[0]; - VVV1_0( w_fp[8], w_fp[6], w_fp[24], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[6], w_fp[24], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -28463,7 +28463,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1183 - VVV1_0( w_fp[1], w_fp[8], w_fp[23], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[8], w_fp[23], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -28483,7 +28483,7 @@ namespace mg5amcCpu jamp_sv[101] -= amp_sv[0]; jamp_sv[112] -= amp_sv[0]; jamp_sv[118] += amp_sv[0]; - VVV1_0( w_fp[1], w_fp[8], w_fp[68], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[8], w_fp[68], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -28503,7 +28503,7 @@ namespace mg5amcCpu jamp_sv[109] += amp_sv[0]; jamp_sv[112] -= amp_sv[0]; jamp_sv[115] += amp_sv[0]; - VVV1_0( w_fp[1], w_fp[8], w_fp[29], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[8], w_fp[29], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -28530,7 +28530,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1184 - FFV1_0( w_fp[3], w_fp[47], w_fp[72], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[47], w_fp[72], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -28542,7 +28542,7 @@ namespace mg5amcCpu jamp_sv[107] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[112] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[118] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[47], w_fp[60], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[47], w_fp[60], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -28554,7 +28554,7 @@ namespace mg5amcCpu jamp_sv[109] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[112] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[115] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[47], w_fp[24], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[47], w_fp[24], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -28573,7 +28573,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1185 - FFV1_0( w_fp[16], w_fp[47], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[16], w_fp[47], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -28581,7 +28581,7 @@ namespace mg5amcCpu jamp_sv[103] -= amp_sv[0]; jamp_sv[105] -= amp_sv[0]; jamp_sv[107] += amp_sv[0]; - FFV1_0( w_fp[27], w_fp[47], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[27], w_fp[47], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -28589,7 +28589,7 @@ namespace mg5amcCpu jamp_sv[104] += amp_sv[0]; jamp_sv[105] -= amp_sv[0]; jamp_sv[106] += amp_sv[0]; - FFV1_0( w_fp[98], w_fp[47], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[98], w_fp[47], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -28604,7 +28604,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1186 - FFV1_0( w_fp[41], w_fp[2], w_fp[72], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[2], w_fp[72], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -28616,7 +28616,7 @@ namespace mg5amcCpu jamp_sv[38] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[60] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[84] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[41], w_fp[2], w_fp[60], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[2], w_fp[60], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -28628,7 +28628,7 @@ namespace mg5amcCpu jamp_sv[50] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[60] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[74] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[41], w_fp[2], w_fp[24], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[2], w_fp[24], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -28647,7 +28647,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1187 - FFV1_0( w_fp[41], w_fp[59], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[59], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -28655,7 +28655,7 @@ namespace mg5amcCpu jamp_sv[14] -= amp_sv[0]; jamp_sv[60] -= amp_sv[0]; jamp_sv[84] += amp_sv[0]; - FFV1_0( w_fp[41], w_fp[71], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[71], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -28663,7 +28663,7 @@ namespace mg5amcCpu jamp_sv[50] += amp_sv[0]; jamp_sv[60] -= amp_sv[0]; jamp_sv[74] += amp_sv[0]; - FFV1_0( w_fp[41], w_fp[21], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[21], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -28675,15 +28675,15 @@ namespace mg5amcCpu // *** DIAGRAM 1188 OF 1240 *** // Wavefunction(s) for diagram number 1188 - VVVV1P0_1( w_fp[0], w_fp[4], w_fp[6], COUPs[2], 0., 0., w_fp[21] ); - VVVV3P0_1( w_fp[0], w_fp[4], w_fp[6], COUPs[2], 0., 0., w_fp[71] ); - VVVV4P0_1( w_fp[0], w_fp[4], w_fp[6], COUPs[2], 0., 0., w_fp[59] ); - FFV1_2( w_fp[3], w_fp[21], COUPs[1], cIPD[0], cIPD[1], w_fp[24] ); - FFV1_2( w_fp[3], w_fp[71], COUPs[1], cIPD[0], cIPD[1], w_fp[60] ); - FFV1_2( w_fp[3], w_fp[59], COUPs[1], cIPD[0], cIPD[1], w_fp[72] ); + VVVV1P0_1( w_fp[0], w_fp[4], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[21] ); + VVVV3P0_1( w_fp[0], w_fp[4], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[71] ); + VVVV4P0_1( w_fp[0], w_fp[4], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[59] ); + FFV1_2( w_fp[3], w_fp[21], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[24] ); + FFV1_2( w_fp[3], w_fp[71], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[60] ); + FFV1_2( w_fp[3], w_fp[59], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[72] ); // Amplitude(s) for diagram number 1188 - FFV1_0( w_fp[24], w_fp[77], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[24], w_fp[77], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -28691,7 +28691,7 @@ namespace mg5amcCpu jamp_sv[37] -= amp_sv[0]; jamp_sv[39] -= amp_sv[0]; jamp_sv[41] += amp_sv[0]; - FFV1_0( w_fp[60], w_fp[77], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[60], w_fp[77], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -28699,7 +28699,7 @@ namespace mg5amcCpu jamp_sv[38] += amp_sv[0]; jamp_sv[39] -= amp_sv[0]; jamp_sv[40] += amp_sv[0]; - FFV1_0( w_fp[72], w_fp[77], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[72], w_fp[77], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -28711,12 +28711,12 @@ namespace mg5amcCpu // *** DIAGRAM 1189 OF 1240 *** // Wavefunction(s) for diagram number 1189 - VVV1P0_1( w_fp[21], w_fp[5], COUPs[0], 0., 0., w_fp[98] ); - VVV1P0_1( w_fp[71], w_fp[5], COUPs[0], 0., 0., w_fp[27] ); - VVV1P0_1( w_fp[59], w_fp[5], COUPs[0], 0., 0., w_fp[16] ); + VVV1P0_1( w_fp[21], w_fp[5], COUPs[0], 1.0, 0., 0., w_fp[98] ); + VVV1P0_1( w_fp[71], w_fp[5], COUPs[0], 1.0, 0., 0., w_fp[27] ); + VVV1P0_1( w_fp[59], w_fp[5], COUPs[0], 1.0, 0., 0., w_fp[16] ); // Amplitude(s) for diagram number 1189 - FFV1_0( w_fp[3], w_fp[77], w_fp[98], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[77], w_fp[98], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -28728,7 +28728,7 @@ namespace mg5amcCpu jamp_sv[39] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[41] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[44] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[77], w_fp[27], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[77], w_fp[27], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -28740,7 +28740,7 @@ namespace mg5amcCpu jamp_sv[39] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[40] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[42] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[77], w_fp[16], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[77], w_fp[16], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -28759,7 +28759,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1190 - FFV1_0( w_fp[38], w_fp[77], w_fp[21], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[77], w_fp[21], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -28767,7 +28767,7 @@ namespace mg5amcCpu jamp_sv[28] -= amp_sv[0]; jamp_sv[34] -= amp_sv[0]; jamp_sv[44] += amp_sv[0]; - FFV1_0( w_fp[38], w_fp[77], w_fp[71], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[77], w_fp[71], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -28775,7 +28775,7 @@ namespace mg5amcCpu jamp_sv[31] += amp_sv[0]; jamp_sv[34] -= amp_sv[0]; jamp_sv[42] += amp_sv[0]; - FFV1_0( w_fp[38], w_fp[77], w_fp[59], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[77], w_fp[59], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -28787,12 +28787,12 @@ namespace mg5amcCpu // *** DIAGRAM 1191 OF 1240 *** // Wavefunction(s) for diagram number 1191 - FFV1_1( w_fp[2], w_fp[21], COUPs[1], cIPD[0], cIPD[1], w_fp[29] ); - FFV1_1( w_fp[2], w_fp[71], COUPs[1], cIPD[0], cIPD[1], w_fp[68] ); - FFV1_1( w_fp[2], w_fp[59], COUPs[1], cIPD[0], cIPD[1], w_fp[23] ); + FFV1_1( w_fp[2], w_fp[21], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[29] ); + FFV1_1( w_fp[2], w_fp[71], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[68] ); + FFV1_1( w_fp[2], w_fp[59], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[23] ); // Amplitude(s) for diagram number 1191 - FFV1_0( w_fp[52], w_fp[29], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[29], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -28800,7 +28800,7 @@ namespace mg5amcCpu jamp_sv[21] -= amp_sv[0]; jamp_sv[67] -= amp_sv[0]; jamp_sv[109] += amp_sv[0]; - FFV1_0( w_fp[52], w_fp[68], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[68], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -28808,7 +28808,7 @@ namespace mg5amcCpu jamp_sv[53] += amp_sv[0]; jamp_sv[67] -= amp_sv[0]; jamp_sv[99] += amp_sv[0]; - FFV1_0( w_fp[52], w_fp[23], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[23], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -28823,7 +28823,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1192 - FFV1_0( w_fp[52], w_fp[2], w_fp[98], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[2], w_fp[98], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -28835,7 +28835,7 @@ namespace mg5amcCpu jamp_sv[88] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[94] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[109] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[52], w_fp[2], w_fp[27], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[2], w_fp[27], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -28847,7 +28847,7 @@ namespace mg5amcCpu jamp_sv[88] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[91] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[99] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[52], w_fp[2], w_fp[16], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[2], w_fp[16], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -28866,7 +28866,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1193 - FFV1_0( w_fp[52], w_fp[39], w_fp[21], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[39], w_fp[21], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -28874,7 +28874,7 @@ namespace mg5amcCpu jamp_sv[77] -= amp_sv[0]; jamp_sv[88] -= amp_sv[0]; jamp_sv[94] += amp_sv[0]; - FFV1_0( w_fp[52], w_fp[39], w_fp[71], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[39], w_fp[71], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -28882,7 +28882,7 @@ namespace mg5amcCpu jamp_sv[85] += amp_sv[0]; jamp_sv[88] -= amp_sv[0]; jamp_sv[91] += amp_sv[0]; - FFV1_0( w_fp[52], w_fp[39], w_fp[59], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[39], w_fp[59], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -28897,7 +28897,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1194 - FFV1_0( w_fp[3], w_fp[29], w_fp[66], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[29], w_fp[66], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -28909,7 +28909,7 @@ namespace mg5amcCpu jamp_sv[67] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[108] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[109] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[68], w_fp[66], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[68], w_fp[66], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -28921,7 +28921,7 @@ namespace mg5amcCpu jamp_sv[67] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[98] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[99] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[23], w_fp[66], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[23], w_fp[66], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -28940,7 +28940,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1195 - FFV1_0( w_fp[24], w_fp[2], w_fp[66], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[24], w_fp[2], w_fp[66], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -28952,7 +28952,7 @@ namespace mg5amcCpu jamp_sv[79] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[81] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[83] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[60], w_fp[2], w_fp[66], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[60], w_fp[2], w_fp[66], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -28964,7 +28964,7 @@ namespace mg5amcCpu jamp_sv[80] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[81] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[82] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[72], w_fp[2], w_fp[66], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[72], w_fp[2], w_fp[66], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -28983,7 +28983,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1196 - VVV1_0( w_fp[21], w_fp[66], w_fp[8], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[21], w_fp[66], w_fp[8], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -29003,7 +29003,7 @@ namespace mg5amcCpu jamp_sv[83] -= amp_sv[0]; jamp_sv[108] -= amp_sv[0]; jamp_sv[109] += amp_sv[0]; - VVV1_0( w_fp[71], w_fp[66], w_fp[8], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[71], w_fp[66], w_fp[8], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -29023,7 +29023,7 @@ namespace mg5amcCpu jamp_sv[82] -= amp_sv[0]; jamp_sv[98] -= amp_sv[0]; jamp_sv[99] += amp_sv[0]; - VVV1_0( w_fp[59], w_fp[66], w_fp[8], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[59], w_fp[66], w_fp[8], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -29050,7 +29050,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1197 - VVVV1_0( w_fp[21], w_fp[1], w_fp[8], w_fp[5], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[21], w_fp[1], w_fp[8], w_fp[5], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -29070,7 +29070,7 @@ namespace mg5amcCpu jamp_sv[88] += amp_sv[0]; jamp_sv[94] -= amp_sv[0]; jamp_sv[108] += amp_sv[0]; - VVVV3_0( w_fp[21], w_fp[1], w_fp[8], w_fp[5], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[21], w_fp[1], w_fp[8], w_fp[5], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -29090,7 +29090,7 @@ namespace mg5amcCpu jamp_sv[83] += amp_sv[0]; jamp_sv[108] += amp_sv[0]; jamp_sv[109] -= amp_sv[0]; - VVVV4_0( w_fp[21], w_fp[1], w_fp[8], w_fp[5], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[21], w_fp[1], w_fp[8], w_fp[5], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -29110,7 +29110,7 @@ namespace mg5amcCpu jamp_sv[88] -= amp_sv[0]; jamp_sv[94] += amp_sv[0]; jamp_sv[109] -= amp_sv[0]; - VVVV1_0( w_fp[71], w_fp[1], w_fp[8], w_fp[5], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[71], w_fp[1], w_fp[8], w_fp[5], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -29130,7 +29130,7 @@ namespace mg5amcCpu jamp_sv[88] += amp_sv[0]; jamp_sv[91] -= amp_sv[0]; jamp_sv[98] += amp_sv[0]; - VVVV3_0( w_fp[71], w_fp[1], w_fp[8], w_fp[5], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[71], w_fp[1], w_fp[8], w_fp[5], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -29150,7 +29150,7 @@ namespace mg5amcCpu jamp_sv[82] += amp_sv[0]; jamp_sv[98] += amp_sv[0]; jamp_sv[99] -= amp_sv[0]; - VVVV4_0( w_fp[71], w_fp[1], w_fp[8], w_fp[5], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[71], w_fp[1], w_fp[8], w_fp[5], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -29170,7 +29170,7 @@ namespace mg5amcCpu jamp_sv[88] -= amp_sv[0]; jamp_sv[91] += amp_sv[0]; jamp_sv[99] -= amp_sv[0]; - VVVV1_0( w_fp[59], w_fp[1], w_fp[8], w_fp[5], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[59], w_fp[1], w_fp[8], w_fp[5], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -29190,7 +29190,7 @@ namespace mg5amcCpu jamp_sv[94] += amp_sv[0]; jamp_sv[98] += amp_sv[0]; jamp_sv[108] -= amp_sv[0]; - VVVV3_0( w_fp[59], w_fp[1], w_fp[8], w_fp[5], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[59], w_fp[1], w_fp[8], w_fp[5], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -29210,7 +29210,7 @@ namespace mg5amcCpu jamp_sv[99] -= amp_sv[0]; jamp_sv[108] -= amp_sv[0]; jamp_sv[109] += amp_sv[0]; - VVVV4_0( w_fp[59], w_fp[1], w_fp[8], w_fp[5], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[59], w_fp[1], w_fp[8], w_fp[5], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -29234,12 +29234,12 @@ namespace mg5amcCpu // *** DIAGRAM 1198 OF 1240 *** // Wavefunction(s) for diagram number 1198 - VVV1P0_1( w_fp[21], w_fp[1], COUPs[0], 0., 0., w_fp[66] ); - VVV1P0_1( w_fp[71], w_fp[1], COUPs[0], 0., 0., w_fp[21] ); - VVV1P0_1( w_fp[59], w_fp[1], COUPs[0], 0., 0., w_fp[71] ); + VVV1P0_1( w_fp[21], w_fp[1], COUPs[0], 1.0, 0., 0., w_fp[66] ); + VVV1P0_1( w_fp[71], w_fp[1], COUPs[0], 1.0, 0., 0., w_fp[21] ); + VVV1P0_1( w_fp[59], w_fp[1], COUPs[0], 1.0, 0., 0., w_fp[71] ); // Amplitude(s) for diagram number 1198 - VVV1_0( w_fp[8], w_fp[5], w_fp[66], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[5], w_fp[66], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -29259,7 +29259,7 @@ namespace mg5amcCpu jamp_sv[88] += amp_sv[0]; jamp_sv[94] -= amp_sv[0]; jamp_sv[108] += amp_sv[0]; - VVV1_0( w_fp[8], w_fp[5], w_fp[21], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[5], w_fp[21], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -29279,7 +29279,7 @@ namespace mg5amcCpu jamp_sv[88] += amp_sv[0]; jamp_sv[91] -= amp_sv[0]; jamp_sv[98] += amp_sv[0]; - VVV1_0( w_fp[8], w_fp[5], w_fp[71], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[5], w_fp[71], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -29306,7 +29306,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1199 - VVV1_0( w_fp[1], w_fp[8], w_fp[98], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[8], w_fp[98], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -29326,7 +29326,7 @@ namespace mg5amcCpu jamp_sv[88] -= amp_sv[0]; jamp_sv[94] += amp_sv[0]; jamp_sv[109] -= amp_sv[0]; - VVV1_0( w_fp[1], w_fp[8], w_fp[27], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[8], w_fp[27], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -29346,7 +29346,7 @@ namespace mg5amcCpu jamp_sv[88] -= amp_sv[0]; jamp_sv[91] += amp_sv[0]; jamp_sv[99] -= amp_sv[0]; - VVV1_0( w_fp[1], w_fp[8], w_fp[16], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[8], w_fp[16], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -29373,7 +29373,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1200 - FFV1_0( w_fp[3], w_fp[39], w_fp[66], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[39], w_fp[66], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -29385,7 +29385,7 @@ namespace mg5amcCpu jamp_sv[83] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[88] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[94] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[39], w_fp[21], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[39], w_fp[21], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -29397,7 +29397,7 @@ namespace mg5amcCpu jamp_sv[85] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[88] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[91] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[39], w_fp[71], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[39], w_fp[71], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -29416,7 +29416,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1201 - FFV1_0( w_fp[24], w_fp[39], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[24], w_fp[39], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -29424,7 +29424,7 @@ namespace mg5amcCpu jamp_sv[79] -= amp_sv[0]; jamp_sv[81] -= amp_sv[0]; jamp_sv[83] += amp_sv[0]; - FFV1_0( w_fp[60], w_fp[39], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[60], w_fp[39], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -29432,7 +29432,7 @@ namespace mg5amcCpu jamp_sv[80] += amp_sv[0]; jamp_sv[81] -= amp_sv[0]; jamp_sv[82] += amp_sv[0]; - FFV1_0( w_fp[72], w_fp[39], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[72], w_fp[39], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -29447,7 +29447,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1202 - FFV1_0( w_fp[38], w_fp[2], w_fp[66], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[2], w_fp[66], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -29459,7 +29459,7 @@ namespace mg5amcCpu jamp_sv[44] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[66] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[108] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[38], w_fp[2], w_fp[21], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[2], w_fp[21], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -29471,7 +29471,7 @@ namespace mg5amcCpu jamp_sv[52] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[66] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[98] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[38], w_fp[2], w_fp[71], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[2], w_fp[71], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -29490,7 +29490,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1203 - FFV1_0( w_fp[38], w_fp[29], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[29], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -29498,7 +29498,7 @@ namespace mg5amcCpu jamp_sv[20] -= amp_sv[0]; jamp_sv[66] -= amp_sv[0]; jamp_sv[108] += amp_sv[0]; - FFV1_0( w_fp[38], w_fp[68], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[68], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -29506,7 +29506,7 @@ namespace mg5amcCpu jamp_sv[52] += amp_sv[0]; jamp_sv[66] -= amp_sv[0]; jamp_sv[98] += amp_sv[0]; - FFV1_0( w_fp[38], w_fp[23], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[23], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -29518,15 +29518,15 @@ namespace mg5amcCpu // *** DIAGRAM 1204 OF 1240 *** // Wavefunction(s) for diagram number 1204 - VVVV1P0_1( w_fp[0], w_fp[5], w_fp[6], COUPs[2], 0., 0., w_fp[23] ); - VVVV3P0_1( w_fp[0], w_fp[5], w_fp[6], COUPs[2], 0., 0., w_fp[68] ); - VVVV4P0_1( w_fp[0], w_fp[5], w_fp[6], COUPs[2], 0., 0., w_fp[29] ); - FFV1_2( w_fp[3], w_fp[23], COUPs[1], cIPD[0], cIPD[1], w_fp[71] ); - FFV1_2( w_fp[3], w_fp[68], COUPs[1], cIPD[0], cIPD[1], w_fp[21] ); - FFV1_2( w_fp[3], w_fp[29], COUPs[1], cIPD[0], cIPD[1], w_fp[66] ); + VVVV1P0_1( w_fp[0], w_fp[5], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[23] ); + VVVV3P0_1( w_fp[0], w_fp[5], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[68] ); + VVVV4P0_1( w_fp[0], w_fp[5], w_fp[6], COUPs[2], 1.0, 0., 0., w_fp[29] ); + FFV1_2( w_fp[3], w_fp[23], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[71] ); + FFV1_2( w_fp[3], w_fp[68], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[21] ); + FFV1_2( w_fp[3], w_fp[29], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[66] ); // Amplitude(s) for diagram number 1204 - FFV1_0( w_fp[71], w_fp[77], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[71], w_fp[77], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -29534,7 +29534,7 @@ namespace mg5amcCpu jamp_sv[31] -= amp_sv[0]; jamp_sv[33] -= amp_sv[0]; jamp_sv[35] += amp_sv[0]; - FFV1_0( w_fp[21], w_fp[77], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[21], w_fp[77], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -29542,7 +29542,7 @@ namespace mg5amcCpu jamp_sv[32] += amp_sv[0]; jamp_sv[33] -= amp_sv[0]; jamp_sv[34] += amp_sv[0]; - FFV1_0( w_fp[66], w_fp[77], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[66], w_fp[77], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -29554,12 +29554,12 @@ namespace mg5amcCpu // *** DIAGRAM 1205 OF 1240 *** // Wavefunction(s) for diagram number 1205 - VVV1P0_1( w_fp[23], w_fp[4], COUPs[0], 0., 0., w_fp[72] ); - VVV1P0_1( w_fp[68], w_fp[4], COUPs[0], 0., 0., w_fp[60] ); - VVV1P0_1( w_fp[29], w_fp[4], COUPs[0], 0., 0., w_fp[24] ); + VVV1P0_1( w_fp[23], w_fp[4], COUPs[0], 1.0, 0., 0., w_fp[72] ); + VVV1P0_1( w_fp[68], w_fp[4], COUPs[0], 1.0, 0., 0., w_fp[60] ); + VVV1P0_1( w_fp[29], w_fp[4], COUPs[0], 1.0, 0., 0., w_fp[24] ); // Amplitude(s) for diagram number 1205 - FFV1_0( w_fp[3], w_fp[77], w_fp[72], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[77], w_fp[72], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -29571,7 +29571,7 @@ namespace mg5amcCpu jamp_sv[35] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[40] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[46] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[77], w_fp[60], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[77], w_fp[60], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -29583,7 +29583,7 @@ namespace mg5amcCpu jamp_sv[37] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[40] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[43] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[77], w_fp[24], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[77], w_fp[24], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -29602,7 +29602,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1206 - FFV1_0( w_fp[46], w_fp[77], w_fp[23], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[77], w_fp[23], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -29610,7 +29610,7 @@ namespace mg5amcCpu jamp_sv[29] -= amp_sv[0]; jamp_sv[40] -= amp_sv[0]; jamp_sv[46] += amp_sv[0]; - FFV1_0( w_fp[46], w_fp[77], w_fp[68], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[77], w_fp[68], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -29618,7 +29618,7 @@ namespace mg5amcCpu jamp_sv[37] += amp_sv[0]; jamp_sv[40] -= amp_sv[0]; jamp_sv[43] += amp_sv[0]; - FFV1_0( w_fp[46], w_fp[77], w_fp[29], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[77], w_fp[29], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -29630,12 +29630,12 @@ namespace mg5amcCpu // *** DIAGRAM 1207 OF 1240 *** // Wavefunction(s) for diagram number 1207 - FFV1_1( w_fp[2], w_fp[23], COUPs[1], cIPD[0], cIPD[1], w_fp[77] ); - FFV1_1( w_fp[2], w_fp[68], COUPs[1], cIPD[0], cIPD[1], w_fp[16] ); - FFV1_1( w_fp[2], w_fp[29], COUPs[1], cIPD[0], cIPD[1], w_fp[27] ); + FFV1_1( w_fp[2], w_fp[23], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[77] ); + FFV1_1( w_fp[2], w_fp[68], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[16] ); + FFV1_1( w_fp[2], w_fp[29], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[27] ); // Amplitude(s) for diagram number 1207 - FFV1_0( w_fp[52], w_fp[77], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[77], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -29643,7 +29643,7 @@ namespace mg5amcCpu jamp_sv[23] -= amp_sv[0]; jamp_sv[91] -= amp_sv[0]; jamp_sv[115] += amp_sv[0]; - FFV1_0( w_fp[52], w_fp[16], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[16], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -29651,7 +29651,7 @@ namespace mg5amcCpu jamp_sv[77] += amp_sv[0]; jamp_sv[91] -= amp_sv[0]; jamp_sv[101] += amp_sv[0]; - FFV1_0( w_fp[52], w_fp[27], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[27], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -29666,7 +29666,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1208 - FFV1_0( w_fp[52], w_fp[2], w_fp[72], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[2], w_fp[72], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -29678,7 +29678,7 @@ namespace mg5amcCpu jamp_sv[70] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[91] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[115] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[52], w_fp[2], w_fp[60], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[2], w_fp[60], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -29690,7 +29690,7 @@ namespace mg5amcCpu jamp_sv[77] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[91] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[101] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[52], w_fp[2], w_fp[24], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[2], w_fp[24], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -29709,7 +29709,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1209 - FFV1_0( w_fp[52], w_fp[33], w_fp[23], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[33], w_fp[23], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -29717,7 +29717,7 @@ namespace mg5amcCpu jamp_sv[53] -= amp_sv[0]; jamp_sv[64] -= amp_sv[0]; jamp_sv[70] += amp_sv[0]; - FFV1_0( w_fp[52], w_fp[33], w_fp[68], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[33], w_fp[68], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -29725,7 +29725,7 @@ namespace mg5amcCpu jamp_sv[61] += amp_sv[0]; jamp_sv[64] -= amp_sv[0]; jamp_sv[67] += amp_sv[0]; - FFV1_0( w_fp[52], w_fp[33], w_fp[29], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[52], w_fp[33], w_fp[29], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -29740,7 +29740,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1210 - FFV1_0( w_fp[3], w_fp[77], w_fp[61], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[77], w_fp[61], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -29752,7 +29752,7 @@ namespace mg5amcCpu jamp_sv[91] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[114] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[115] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[16], w_fp[61], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[16], w_fp[61], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -29764,7 +29764,7 @@ namespace mg5amcCpu jamp_sv[91] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[100] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[101] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[27], w_fp[61], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[27], w_fp[61], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -29783,7 +29783,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1211 - FFV1_0( w_fp[71], w_fp[2], w_fp[61], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[71], w_fp[2], w_fp[61], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -29795,7 +29795,7 @@ namespace mg5amcCpu jamp_sv[55] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[57] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[59] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[21], w_fp[2], w_fp[61], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[21], w_fp[2], w_fp[61], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -29807,7 +29807,7 @@ namespace mg5amcCpu jamp_sv[56] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[57] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[58] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[66], w_fp[2], w_fp[61], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[66], w_fp[2], w_fp[61], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -29826,7 +29826,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1212 - VVV1_0( w_fp[23], w_fp[61], w_fp[8], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[23], w_fp[61], w_fp[8], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -29846,7 +29846,7 @@ namespace mg5amcCpu jamp_sv[91] -= amp_sv[0]; jamp_sv[114] -= amp_sv[0]; jamp_sv[115] += amp_sv[0]; - VVV1_0( w_fp[68], w_fp[61], w_fp[8], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[68], w_fp[61], w_fp[8], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -29866,7 +29866,7 @@ namespace mg5amcCpu jamp_sv[91] -= amp_sv[0]; jamp_sv[100] -= amp_sv[0]; jamp_sv[101] += amp_sv[0]; - VVV1_0( w_fp[29], w_fp[61], w_fp[8], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[29], w_fp[61], w_fp[8], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -29893,7 +29893,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1213 - VVVV1_0( w_fp[23], w_fp[1], w_fp[8], w_fp[4], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[23], w_fp[1], w_fp[8], w_fp[4], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -29913,7 +29913,7 @@ namespace mg5amcCpu jamp_sv[70] -= amp_sv[0]; jamp_sv[90] -= amp_sv[0]; jamp_sv[114] += amp_sv[0]; - VVVV3_0( w_fp[23], w_fp[1], w_fp[8], w_fp[4], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[23], w_fp[1], w_fp[8], w_fp[4], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -29933,7 +29933,7 @@ namespace mg5amcCpu jamp_sv[91] += amp_sv[0]; jamp_sv[114] += amp_sv[0]; jamp_sv[115] -= amp_sv[0]; - VVVV4_0( w_fp[23], w_fp[1], w_fp[8], w_fp[4], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[23], w_fp[1], w_fp[8], w_fp[4], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -29953,7 +29953,7 @@ namespace mg5amcCpu jamp_sv[70] += amp_sv[0]; jamp_sv[91] += amp_sv[0]; jamp_sv[115] -= amp_sv[0]; - VVVV1_0( w_fp[68], w_fp[1], w_fp[8], w_fp[4], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[68], w_fp[1], w_fp[8], w_fp[4], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -29973,7 +29973,7 @@ namespace mg5amcCpu jamp_sv[76] += amp_sv[0]; jamp_sv[90] -= amp_sv[0]; jamp_sv[100] += amp_sv[0]; - VVVV3_0( w_fp[68], w_fp[1], w_fp[8], w_fp[4], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[68], w_fp[1], w_fp[8], w_fp[4], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -29993,7 +29993,7 @@ namespace mg5amcCpu jamp_sv[91] += amp_sv[0]; jamp_sv[100] += amp_sv[0]; jamp_sv[101] -= amp_sv[0]; - VVVV4_0( w_fp[68], w_fp[1], w_fp[8], w_fp[4], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[68], w_fp[1], w_fp[8], w_fp[4], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -30013,7 +30013,7 @@ namespace mg5amcCpu jamp_sv[77] -= amp_sv[0]; jamp_sv[91] += amp_sv[0]; jamp_sv[101] -= amp_sv[0]; - VVVV1_0( w_fp[29], w_fp[1], w_fp[8], w_fp[4], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[29], w_fp[1], w_fp[8], w_fp[4], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -30033,7 +30033,7 @@ namespace mg5amcCpu jamp_sv[76] += amp_sv[0]; jamp_sv[100] += amp_sv[0]; jamp_sv[114] -= amp_sv[0]; - VVVV3_0( w_fp[29], w_fp[1], w_fp[8], w_fp[4], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[29], w_fp[1], w_fp[8], w_fp[4], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -30053,7 +30053,7 @@ namespace mg5amcCpu jamp_sv[101] -= amp_sv[0]; jamp_sv[114] -= amp_sv[0]; jamp_sv[115] += amp_sv[0]; - VVVV4_0( w_fp[29], w_fp[1], w_fp[8], w_fp[4], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[29], w_fp[1], w_fp[8], w_fp[4], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -30077,12 +30077,12 @@ namespace mg5amcCpu // *** DIAGRAM 1214 OF 1240 *** // Wavefunction(s) for diagram number 1214 - VVV1P0_1( w_fp[23], w_fp[1], COUPs[0], 0., 0., w_fp[61] ); - VVV1P0_1( w_fp[68], w_fp[1], COUPs[0], 0., 0., w_fp[23] ); - VVV1P0_1( w_fp[29], w_fp[1], COUPs[0], 0., 0., w_fp[68] ); + VVV1P0_1( w_fp[23], w_fp[1], COUPs[0], 1.0, 0., 0., w_fp[61] ); + VVV1P0_1( w_fp[68], w_fp[1], COUPs[0], 1.0, 0., 0., w_fp[23] ); + VVV1P0_1( w_fp[29], w_fp[1], COUPs[0], 1.0, 0., 0., w_fp[68] ); // Amplitude(s) for diagram number 1214 - VVV1_0( w_fp[8], w_fp[4], w_fp[61], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[4], w_fp[61], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -30102,7 +30102,7 @@ namespace mg5amcCpu jamp_sv[70] -= amp_sv[0]; jamp_sv[90] -= amp_sv[0]; jamp_sv[114] += amp_sv[0]; - VVV1_0( w_fp[8], w_fp[4], w_fp[23], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[4], w_fp[23], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -30122,7 +30122,7 @@ namespace mg5amcCpu jamp_sv[76] += amp_sv[0]; jamp_sv[90] -= amp_sv[0]; jamp_sv[100] += amp_sv[0]; - VVV1_0( w_fp[8], w_fp[4], w_fp[68], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[4], w_fp[68], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -30149,7 +30149,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1215 - VVV1_0( w_fp[1], w_fp[8], w_fp[72], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[8], w_fp[72], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -30169,7 +30169,7 @@ namespace mg5amcCpu jamp_sv[70] += amp_sv[0]; jamp_sv[91] += amp_sv[0]; jamp_sv[115] -= amp_sv[0]; - VVV1_0( w_fp[1], w_fp[8], w_fp[60], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[8], w_fp[60], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -30189,7 +30189,7 @@ namespace mg5amcCpu jamp_sv[77] -= amp_sv[0]; jamp_sv[91] += amp_sv[0]; jamp_sv[101] -= amp_sv[0]; - VVV1_0( w_fp[1], w_fp[8], w_fp[24], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[8], w_fp[24], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -30216,7 +30216,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1216 - FFV1_0( w_fp[3], w_fp[33], w_fp[61], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[33], w_fp[61], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -30228,7 +30228,7 @@ namespace mg5amcCpu jamp_sv[59] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[64] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[70] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[33], w_fp[23], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[33], w_fp[23], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -30240,7 +30240,7 @@ namespace mg5amcCpu jamp_sv[61] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[64] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[67] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[33], w_fp[68], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[33], w_fp[68], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -30259,7 +30259,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1217 - FFV1_0( w_fp[71], w_fp[33], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[71], w_fp[33], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -30267,7 +30267,7 @@ namespace mg5amcCpu jamp_sv[55] -= amp_sv[0]; jamp_sv[57] -= amp_sv[0]; jamp_sv[59] += amp_sv[0]; - FFV1_0( w_fp[21], w_fp[33], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[21], w_fp[33], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -30275,7 +30275,7 @@ namespace mg5amcCpu jamp_sv[56] += amp_sv[0]; jamp_sv[57] -= amp_sv[0]; jamp_sv[58] += amp_sv[0]; - FFV1_0( w_fp[66], w_fp[33], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[66], w_fp[33], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -30290,7 +30290,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1218 - FFV1_0( w_fp[46], w_fp[2], w_fp[61], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[2], w_fp[61], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -30302,7 +30302,7 @@ namespace mg5amcCpu jamp_sv[46] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[90] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[114] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[46], w_fp[2], w_fp[23], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[2], w_fp[23], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -30314,7 +30314,7 @@ namespace mg5amcCpu jamp_sv[76] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[90] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[100] -= cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[46], w_fp[2], w_fp[68], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[2], w_fp[68], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -30333,7 +30333,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1219 - FFV1_0( w_fp[46], w_fp[77], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[77], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -30341,7 +30341,7 @@ namespace mg5amcCpu jamp_sv[22] -= amp_sv[0]; jamp_sv[90] -= amp_sv[0]; jamp_sv[114] += amp_sv[0]; - FFV1_0( w_fp[46], w_fp[16], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[16], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -30349,7 +30349,7 @@ namespace mg5amcCpu jamp_sv[76] += amp_sv[0]; jamp_sv[90] -= amp_sv[0]; jamp_sv[100] += amp_sv[0]; - FFV1_0( w_fp[46], w_fp[27], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[27], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -30364,7 +30364,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1220 - VVVV1_0( w_fp[0], w_fp[73], w_fp[8], w_fp[6], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[0], w_fp[73], w_fp[8], w_fp[6], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -30384,7 +30384,7 @@ namespace mg5amcCpu jamp_sv[107] -= amp_sv[0]; jamp_sv[113] -= amp_sv[0]; jamp_sv[119] += amp_sv[0]; - VVVV3_0( w_fp[0], w_fp[73], w_fp[8], w_fp[6], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[0], w_fp[73], w_fp[8], w_fp[6], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -30404,7 +30404,7 @@ namespace mg5amcCpu jamp_sv[107] -= amp_sv[0]; jamp_sv[113] -= amp_sv[0]; jamp_sv[119] += amp_sv[0]; - VVVV4_0( w_fp[0], w_fp[73], w_fp[8], w_fp[6], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[0], w_fp[73], w_fp[8], w_fp[6], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -30424,7 +30424,7 @@ namespace mg5amcCpu jamp_sv[97] -= amp_sv[0]; jamp_sv[99] -= amp_sv[0]; jamp_sv[101] += amp_sv[0]; - VVVV1_0( w_fp[0], w_fp[79], w_fp[8], w_fp[6], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[0], w_fp[79], w_fp[8], w_fp[6], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -30444,7 +30444,7 @@ namespace mg5amcCpu jamp_sv[111] += amp_sv[0]; jamp_sv[113] -= amp_sv[0]; jamp_sv[117] += amp_sv[0]; - VVVV3_0( w_fp[0], w_fp[79], w_fp[8], w_fp[6], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[0], w_fp[79], w_fp[8], w_fp[6], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -30464,7 +30464,7 @@ namespace mg5amcCpu jamp_sv[111] += amp_sv[0]; jamp_sv[113] -= amp_sv[0]; jamp_sv[117] += amp_sv[0]; - VVVV4_0( w_fp[0], w_fp[79], w_fp[8], w_fp[6], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[0], w_fp[79], w_fp[8], w_fp[6], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -30484,7 +30484,7 @@ namespace mg5amcCpu jamp_sv[98] += amp_sv[0]; jamp_sv[99] -= amp_sv[0]; jamp_sv[100] += amp_sv[0]; - VVVV1_0( w_fp[0], w_fp[80], w_fp[8], w_fp[6], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[0], w_fp[80], w_fp[8], w_fp[6], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -30504,7 +30504,7 @@ namespace mg5amcCpu jamp_sv[111] += amp_sv[0]; jamp_sv[117] += amp_sv[0]; jamp_sv[119] -= amp_sv[0]; - VVVV3_0( w_fp[0], w_fp[80], w_fp[8], w_fp[6], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[0], w_fp[80], w_fp[8], w_fp[6], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -30524,7 +30524,7 @@ namespace mg5amcCpu jamp_sv[111] += amp_sv[0]; jamp_sv[117] += amp_sv[0]; jamp_sv[119] -= amp_sv[0]; - VVVV4_0( w_fp[0], w_fp[80], w_fp[8], w_fp[6], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[0], w_fp[80], w_fp[8], w_fp[6], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -30548,12 +30548,12 @@ namespace mg5amcCpu // *** DIAGRAM 1221 OF 1240 *** // Wavefunction(s) for diagram number 1221 - VVV1P0_1( w_fp[0], w_fp[73], COUPs[0], 0., 0., w_fp[27] ); - VVV1P0_1( w_fp[0], w_fp[79], COUPs[0], 0., 0., w_fp[1] ); - VVV1P0_1( w_fp[0], w_fp[80], COUPs[0], 0., 0., w_fp[16] ); + VVV1P0_1( w_fp[0], w_fp[73], COUPs[0], 1.0, 0., 0., w_fp[27] ); + VVV1P0_1( w_fp[0], w_fp[79], COUPs[0], 1.0, 0., 0., w_fp[1] ); + VVV1P0_1( w_fp[0], w_fp[80], COUPs[0], 1.0, 0., 0., w_fp[16] ); // Amplitude(s) for diagram number 1221 - VVV1_0( w_fp[8], w_fp[6], w_fp[27], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[6], w_fp[27], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -30573,7 +30573,7 @@ namespace mg5amcCpu jamp_sv[107] -= amp_sv[0]; jamp_sv[113] -= amp_sv[0]; jamp_sv[119] += amp_sv[0]; - VVV1_0( w_fp[8], w_fp[6], w_fp[1], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[6], w_fp[1], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -30593,7 +30593,7 @@ namespace mg5amcCpu jamp_sv[111] += amp_sv[0]; jamp_sv[113] -= amp_sv[0]; jamp_sv[117] += amp_sv[0]; - VVV1_0( w_fp[8], w_fp[6], w_fp[16], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[6], w_fp[16], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -30620,7 +30620,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1222 - VVV1_0( w_fp[73], w_fp[6], w_fp[56], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[73], w_fp[6], w_fp[56], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -30640,7 +30640,7 @@ namespace mg5amcCpu jamp_sv[107] -= amp_sv[0]; jamp_sv[113] -= amp_sv[0]; jamp_sv[119] += amp_sv[0]; - VVV1_0( w_fp[79], w_fp[6], w_fp[56], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[79], w_fp[6], w_fp[56], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -30660,7 +30660,7 @@ namespace mg5amcCpu jamp_sv[111] += amp_sv[0]; jamp_sv[113] -= amp_sv[0]; jamp_sv[117] += amp_sv[0]; - VVV1_0( w_fp[80], w_fp[6], w_fp[56], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[80], w_fp[6], w_fp[56], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -30687,7 +30687,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1223 - FFV1_0( w_fp[3], w_fp[47], w_fp[27], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[47], w_fp[27], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -30699,7 +30699,7 @@ namespace mg5amcCpu jamp_sv[107] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[113] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[119] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[47], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[47], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -30711,7 +30711,7 @@ namespace mg5amcCpu jamp_sv[111] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[113] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[117] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[47], w_fp[16], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[47], w_fp[16], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -30730,7 +30730,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1224 - FFV1_0( w_fp[3], w_fp[113], w_fp[73], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[113], w_fp[73], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -30738,7 +30738,7 @@ namespace mg5amcCpu jamp_sv[97] -= amp_sv[0]; jamp_sv[99] -= amp_sv[0]; jamp_sv[101] += amp_sv[0]; - FFV1_0( w_fp[3], w_fp[113], w_fp[79], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[113], w_fp[79], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -30746,7 +30746,7 @@ namespace mg5amcCpu jamp_sv[98] += amp_sv[0]; jamp_sv[99] -= amp_sv[0]; jamp_sv[100] += amp_sv[0]; - FFV1_0( w_fp[3], w_fp[113], w_fp[80], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[113], w_fp[80], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -30761,7 +30761,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1225 - FFV1_0( w_fp[41], w_fp[2], w_fp[27], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[2], w_fp[27], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -30773,7 +30773,7 @@ namespace mg5amcCpu jamp_sv[38] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[62] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[86] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[41], w_fp[2], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[2], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -30785,7 +30785,7 @@ namespace mg5amcCpu jamp_sv[56] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[62] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[80] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[41], w_fp[2], w_fp[16], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[41], w_fp[2], w_fp[16], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -30804,7 +30804,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1226 - FFV1_0( w_fp[62], w_fp[2], w_fp[73], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[62], w_fp[2], w_fp[73], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -30812,7 +30812,7 @@ namespace mg5amcCpu jamp_sv[38] -= amp_sv[0]; jamp_sv[62] -= amp_sv[0]; jamp_sv[86] += amp_sv[0]; - FFV1_0( w_fp[62], w_fp[2], w_fp[79], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[62], w_fp[2], w_fp[79], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -30820,7 +30820,7 @@ namespace mg5amcCpu jamp_sv[56] += amp_sv[0]; jamp_sv[62] -= amp_sv[0]; jamp_sv[80] += amp_sv[0]; - FFV1_0( w_fp[62], w_fp[2], w_fp[80], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[62], w_fp[2], w_fp[80], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -30835,7 +30835,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1227 - VVVV1_0( w_fp[0], w_fp[57], w_fp[8], w_fp[5], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[0], w_fp[57], w_fp[8], w_fp[5], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -30855,7 +30855,7 @@ namespace mg5amcCpu jamp_sv[89] -= amp_sv[0]; jamp_sv[95] += amp_sv[0]; jamp_sv[110] -= amp_sv[0]; - VVVV3_0( w_fp[0], w_fp[57], w_fp[8], w_fp[5], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[0], w_fp[57], w_fp[8], w_fp[5], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -30875,7 +30875,7 @@ namespace mg5amcCpu jamp_sv[89] -= amp_sv[0]; jamp_sv[95] += amp_sv[0]; jamp_sv[111] -= amp_sv[0]; - VVVV4_0( w_fp[0], w_fp[57], w_fp[8], w_fp[5], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[0], w_fp[57], w_fp[8], w_fp[5], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -30895,7 +30895,7 @@ namespace mg5amcCpu jamp_sv[77] += amp_sv[0]; jamp_sv[110] += amp_sv[0]; jamp_sv[111] -= amp_sv[0]; - VVVV1_0( w_fp[0], w_fp[81], w_fp[8], w_fp[5], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[0], w_fp[81], w_fp[8], w_fp[5], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -30915,7 +30915,7 @@ namespace mg5amcCpu jamp_sv[89] -= amp_sv[0]; jamp_sv[93] += amp_sv[0]; jamp_sv[104] -= amp_sv[0]; - VVVV3_0( w_fp[0], w_fp[81], w_fp[8], w_fp[5], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[0], w_fp[81], w_fp[8], w_fp[5], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -30935,7 +30935,7 @@ namespace mg5amcCpu jamp_sv[89] -= amp_sv[0]; jamp_sv[93] += amp_sv[0]; jamp_sv[105] -= amp_sv[0]; - VVVV4_0( w_fp[0], w_fp[81], w_fp[8], w_fp[5], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[0], w_fp[81], w_fp[8], w_fp[5], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -30955,7 +30955,7 @@ namespace mg5amcCpu jamp_sv[76] += amp_sv[0]; jamp_sv[104] += amp_sv[0]; jamp_sv[105] -= amp_sv[0]; - VVVV1_0( w_fp[0], w_fp[82], w_fp[8], w_fp[5], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[0], w_fp[82], w_fp[8], w_fp[5], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -30975,7 +30975,7 @@ namespace mg5amcCpu jamp_sv[95] -= amp_sv[0]; jamp_sv[104] -= amp_sv[0]; jamp_sv[110] += amp_sv[0]; - VVVV3_0( w_fp[0], w_fp[82], w_fp[8], w_fp[5], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[0], w_fp[82], w_fp[8], w_fp[5], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -30995,7 +30995,7 @@ namespace mg5amcCpu jamp_sv[95] -= amp_sv[0]; jamp_sv[105] -= amp_sv[0]; jamp_sv[111] += amp_sv[0]; - VVVV4_0( w_fp[0], w_fp[82], w_fp[8], w_fp[5], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[0], w_fp[82], w_fp[8], w_fp[5], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -31019,12 +31019,12 @@ namespace mg5amcCpu // *** DIAGRAM 1228 OF 1240 *** // Wavefunction(s) for diagram number 1228 - VVV1P0_1( w_fp[0], w_fp[57], COUPs[0], 0., 0., w_fp[62] ); - VVV1P0_1( w_fp[0], w_fp[81], COUPs[0], 0., 0., w_fp[80] ); - VVV1P0_1( w_fp[0], w_fp[82], COUPs[0], 0., 0., w_fp[79] ); + VVV1P0_1( w_fp[0], w_fp[57], COUPs[0], 1.0, 0., 0., w_fp[62] ); + VVV1P0_1( w_fp[0], w_fp[81], COUPs[0], 1.0, 0., 0., w_fp[80] ); + VVV1P0_1( w_fp[0], w_fp[82], COUPs[0], 1.0, 0., 0., w_fp[79] ); // Amplitude(s) for diagram number 1228 - VVV1_0( w_fp[8], w_fp[5], w_fp[62], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[5], w_fp[62], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -31044,7 +31044,7 @@ namespace mg5amcCpu jamp_sv[89] -= amp_sv[0]; jamp_sv[95] += amp_sv[0]; jamp_sv[110] -= amp_sv[0]; - VVV1_0( w_fp[8], w_fp[5], w_fp[80], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[5], w_fp[80], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -31064,7 +31064,7 @@ namespace mg5amcCpu jamp_sv[89] -= amp_sv[0]; jamp_sv[93] += amp_sv[0]; jamp_sv[104] -= amp_sv[0]; - VVV1_0( w_fp[8], w_fp[5], w_fp[79], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[5], w_fp[79], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -31091,7 +31091,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1229 - VVV1_0( w_fp[57], w_fp[5], w_fp[56], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[57], w_fp[5], w_fp[56], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -31111,7 +31111,7 @@ namespace mg5amcCpu jamp_sv[89] -= amp_sv[0]; jamp_sv[95] += amp_sv[0]; jamp_sv[111] -= amp_sv[0]; - VVV1_0( w_fp[81], w_fp[5], w_fp[56], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[81], w_fp[5], w_fp[56], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -31131,7 +31131,7 @@ namespace mg5amcCpu jamp_sv[89] -= amp_sv[0]; jamp_sv[93] += amp_sv[0]; jamp_sv[105] -= amp_sv[0]; - VVV1_0( w_fp[82], w_fp[5], w_fp[56], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[82], w_fp[5], w_fp[56], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -31158,7 +31158,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1230 - FFV1_0( w_fp[3], w_fp[39], w_fp[62], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[39], w_fp[62], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -31170,7 +31170,7 @@ namespace mg5amcCpu jamp_sv[83] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[89] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[95] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[39], w_fp[80], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[39], w_fp[80], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -31182,7 +31182,7 @@ namespace mg5amcCpu jamp_sv[87] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[89] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[93] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[39], w_fp[79], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[39], w_fp[79], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -31201,7 +31201,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1231 - FFV1_0( w_fp[3], w_fp[102], w_fp[57], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[102], w_fp[57], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -31209,7 +31209,7 @@ namespace mg5amcCpu jamp_sv[73] -= amp_sv[0]; jamp_sv[75] -= amp_sv[0]; jamp_sv[77] += amp_sv[0]; - FFV1_0( w_fp[3], w_fp[102], w_fp[81], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[102], w_fp[81], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -31217,7 +31217,7 @@ namespace mg5amcCpu jamp_sv[74] += amp_sv[0]; jamp_sv[75] -= amp_sv[0]; jamp_sv[76] += amp_sv[0]; - FFV1_0( w_fp[3], w_fp[102], w_fp[82], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[102], w_fp[82], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -31232,7 +31232,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1232 - FFV1_0( w_fp[38], w_fp[2], w_fp[62], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[2], w_fp[62], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -31244,7 +31244,7 @@ namespace mg5amcCpu jamp_sv[44] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[68] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[110] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[38], w_fp[2], w_fp[80], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[2], w_fp[80], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -31256,7 +31256,7 @@ namespace mg5amcCpu jamp_sv[58] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[68] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[104] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[38], w_fp[2], w_fp[79], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[38], w_fp[2], w_fp[79], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -31275,7 +31275,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1233 - FFV1_0( w_fp[104], w_fp[2], w_fp[57], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[104], w_fp[2], w_fp[57], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -31283,7 +31283,7 @@ namespace mg5amcCpu jamp_sv[44] -= amp_sv[0]; jamp_sv[68] -= amp_sv[0]; jamp_sv[110] += amp_sv[0]; - FFV1_0( w_fp[104], w_fp[2], w_fp[81], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[104], w_fp[2], w_fp[81], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -31291,7 +31291,7 @@ namespace mg5amcCpu jamp_sv[58] += amp_sv[0]; jamp_sv[68] -= amp_sv[0]; jamp_sv[104] += amp_sv[0]; - FFV1_0( w_fp[104], w_fp[2], w_fp[82], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[104], w_fp[2], w_fp[82], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -31306,7 +31306,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1234 - VVVV1_0( w_fp[0], w_fp[55], w_fp[8], w_fp[4], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[0], w_fp[55], w_fp[8], w_fp[4], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -31326,7 +31326,7 @@ namespace mg5amcCpu jamp_sv[71] += amp_sv[0]; jamp_sv[92] += amp_sv[0]; jamp_sv[116] -= amp_sv[0]; - VVVV3_0( w_fp[0], w_fp[55], w_fp[8], w_fp[4], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[0], w_fp[55], w_fp[8], w_fp[4], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -31346,7 +31346,7 @@ namespace mg5amcCpu jamp_sv[71] += amp_sv[0]; jamp_sv[93] += amp_sv[0]; jamp_sv[117] -= amp_sv[0]; - VVVV4_0( w_fp[0], w_fp[55], w_fp[8], w_fp[4], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[0], w_fp[55], w_fp[8], w_fp[4], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -31366,7 +31366,7 @@ namespace mg5amcCpu jamp_sv[93] += amp_sv[0]; jamp_sv[116] += amp_sv[0]; jamp_sv[117] -= amp_sv[0]; - VVVV1_0( w_fp[0], w_fp[83], w_fp[8], w_fp[4], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[0], w_fp[83], w_fp[8], w_fp[4], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -31386,7 +31386,7 @@ namespace mg5amcCpu jamp_sv[82] -= amp_sv[0]; jamp_sv[92] += amp_sv[0]; jamp_sv[106] -= amp_sv[0]; - VVVV3_0( w_fp[0], w_fp[83], w_fp[8], w_fp[4], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[0], w_fp[83], w_fp[8], w_fp[4], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -31406,7 +31406,7 @@ namespace mg5amcCpu jamp_sv[83] -= amp_sv[0]; jamp_sv[93] += amp_sv[0]; jamp_sv[107] -= amp_sv[0]; - VVVV4_0( w_fp[0], w_fp[83], w_fp[8], w_fp[4], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[0], w_fp[83], w_fp[8], w_fp[4], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -31426,7 +31426,7 @@ namespace mg5amcCpu jamp_sv[93] += amp_sv[0]; jamp_sv[106] += amp_sv[0]; jamp_sv[107] -= amp_sv[0]; - VVVV1_0( w_fp[0], w_fp[84], w_fp[8], w_fp[4], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[0], w_fp[84], w_fp[8], w_fp[4], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -31446,7 +31446,7 @@ namespace mg5amcCpu jamp_sv[82] -= amp_sv[0]; jamp_sv[106] -= amp_sv[0]; jamp_sv[116] += amp_sv[0]; - VVVV3_0( w_fp[0], w_fp[84], w_fp[8], w_fp[4], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[0], w_fp[84], w_fp[8], w_fp[4], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -31466,7 +31466,7 @@ namespace mg5amcCpu jamp_sv[83] -= amp_sv[0]; jamp_sv[107] -= amp_sv[0]; jamp_sv[117] += amp_sv[0]; - VVVV4_0( w_fp[0], w_fp[84], w_fp[8], w_fp[4], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[0], w_fp[84], w_fp[8], w_fp[4], COUPs[2], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -31490,12 +31490,12 @@ namespace mg5amcCpu // *** DIAGRAM 1235 OF 1240 *** // Wavefunction(s) for diagram number 1235 - VVV1P0_1( w_fp[0], w_fp[55], COUPs[0], 0., 0., w_fp[104] ); - VVV1P0_1( w_fp[0], w_fp[83], COUPs[0], 0., 0., w_fp[82] ); - VVV1P0_1( w_fp[0], w_fp[84], COUPs[0], 0., 0., w_fp[81] ); + VVV1P0_1( w_fp[0], w_fp[55], COUPs[0], 1.0, 0., 0., w_fp[104] ); + VVV1P0_1( w_fp[0], w_fp[83], COUPs[0], 1.0, 0., 0., w_fp[82] ); + VVV1P0_1( w_fp[0], w_fp[84], COUPs[0], 1.0, 0., 0., w_fp[81] ); // Amplitude(s) for diagram number 1235 - VVV1_0( w_fp[8], w_fp[4], w_fp[104], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[4], w_fp[104], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -31515,7 +31515,7 @@ namespace mg5amcCpu jamp_sv[71] += amp_sv[0]; jamp_sv[92] += amp_sv[0]; jamp_sv[116] -= amp_sv[0]; - VVV1_0( w_fp[8], w_fp[4], w_fp[82], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[4], w_fp[82], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -31535,7 +31535,7 @@ namespace mg5amcCpu jamp_sv[82] -= amp_sv[0]; jamp_sv[92] += amp_sv[0]; jamp_sv[106] -= amp_sv[0]; - VVV1_0( w_fp[8], w_fp[4], w_fp[81], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[8], w_fp[4], w_fp[81], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -31562,7 +31562,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1236 - VVV1_0( w_fp[55], w_fp[4], w_fp[56], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[55], w_fp[4], w_fp[56], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -31582,7 +31582,7 @@ namespace mg5amcCpu jamp_sv[71] += amp_sv[0]; jamp_sv[93] += amp_sv[0]; jamp_sv[117] -= amp_sv[0]; - VVV1_0( w_fp[83], w_fp[4], w_fp[56], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[83], w_fp[4], w_fp[56], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -31602,7 +31602,7 @@ namespace mg5amcCpu jamp_sv[83] -= amp_sv[0]; jamp_sv[93] += amp_sv[0]; jamp_sv[107] -= amp_sv[0]; - VVV1_0( w_fp[84], w_fp[4], w_fp[56], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[84], w_fp[4], w_fp[56], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -31629,7 +31629,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1237 - FFV1_0( w_fp[3], w_fp[33], w_fp[104], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[33], w_fp[104], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -31641,7 +31641,7 @@ namespace mg5amcCpu jamp_sv[59] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[65] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[71] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[33], w_fp[82], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[33], w_fp[82], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -31653,7 +31653,7 @@ namespace mg5amcCpu jamp_sv[63] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[65] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[69] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[3], w_fp[33], w_fp[81], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[33], w_fp[81], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -31672,7 +31672,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1238 - FFV1_0( w_fp[3], w_fp[114], w_fp[55], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[114], w_fp[55], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -31680,7 +31680,7 @@ namespace mg5amcCpu jamp_sv[49] -= amp_sv[0]; jamp_sv[51] -= amp_sv[0]; jamp_sv[53] += amp_sv[0]; - FFV1_0( w_fp[3], w_fp[114], w_fp[83], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[114], w_fp[83], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -31688,7 +31688,7 @@ namespace mg5amcCpu jamp_sv[50] += amp_sv[0]; jamp_sv[51] -= amp_sv[0]; jamp_sv[52] += amp_sv[0]; - FFV1_0( w_fp[3], w_fp[114], w_fp[84], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[114], w_fp[84], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -31703,7 +31703,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1239 - FFV1_0( w_fp[46], w_fp[2], w_fp[104], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[2], w_fp[104], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -31715,7 +31715,7 @@ namespace mg5amcCpu jamp_sv[46] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[92] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[116] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[46], w_fp[2], w_fp[82], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[2], w_fp[82], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -31727,7 +31727,7 @@ namespace mg5amcCpu jamp_sv[82] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[92] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[106] += cxtype( 0, 1 ) * amp_sv[0]; - FFV1_0( w_fp[46], w_fp[2], w_fp[81], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[46], w_fp[2], w_fp[81], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -31746,7 +31746,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 1240 - FFV1_0( w_fp[99], w_fp[2], w_fp[55], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[2], w_fp[55], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -31754,7 +31754,7 @@ namespace mg5amcCpu jamp_sv[46] -= amp_sv[0]; jamp_sv[92] -= amp_sv[0]; jamp_sv[116] += amp_sv[0]; - FFV1_0( w_fp[99], w_fp[2], w_fp[83], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[2], w_fp[83], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -31762,7 +31762,7 @@ namespace mg5amcCpu jamp_sv[82] += amp_sv[0]; jamp_sv[92] -= amp_sv[0]; jamp_sv[106] += amp_sv[0]; - FFV1_0( w_fp[99], w_fp[2], w_fp[84], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[99], w_fp[2], w_fp[84], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Here the code base generated with multichannel support updates numerators_sv and denominators_sv (#473) #endif @@ -32523,8 +32523,7 @@ namespace mg5amcCpu { // nprocesses>1 was last observed for "mirror processes" in uux_ttx in the 270 branch (see issue #343 and PRs #360 and #396) constexpr int nprocesses = 1; - static_assert( nprocesses == 1, "Assume nprocesses == 1" ); - // process_id corresponds to the index of DSIG1 Fortran functions (must be 1 because cudacpp is unable to handle DSIG2) + static_assert( nprocesses == 1 || nprocesses == 2, "Assume nprocesses == 1 or 2" ); constexpr int process_id = 1; // code generation source: standalone_cudacpp static_assert( process_id == 1, "Assume process_id == 1" ); } diff --git a/epochX/cudacpp/gg_ttggg.sa/SubProcesses/cudacpp.mk b/epochX/cudacpp/gg_ttggg.sa/SubProcesses/cudacpp.mk index 43cee0977e..15669185ad 100644 --- a/epochX/cudacpp/gg_ttggg.sa/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/gg_ttggg.sa/SubProcesses/cudacpp.mk @@ -1,7 +1,7 @@ # Copyright (C) 2020-2023 CERN and UCLouvain. # Licensed under the GNU Lesser General Public License (version 3 or later). # Created by: S. Roiser (Feb 2020) for the MG5aMC CUDACPP plugin. -# Further modified by: O. Mattelaer, S. Roiser, A. Valassi (2020-2023) for the MG5aMC CUDACPP plugin. +# Further modified by: J. Teig, O. Mattelaer, S. Roiser, A. Valassi (2020-2023) for the MG5aMC CUDACPP plugin. #=== Determine the name of this makefile (https://ftp.gnu.org/old-gnu/Manuals/make-3.80/html_node/make_17.html) #=== NB: different names (e.g. cudacpp.mk and cudacpp_src.mk) are used in the Subprocess and src directories @@ -86,6 +86,14 @@ endif #------------------------------------------------------------------------------- +.DEFAULT_GOAL := usage + +# Target if user does not specify target +usage: + $(error Unknown target='$(MAKECMDGOALS)': only 'cppnone', 'cppsse4', 'cppavx2', 'cpp512y', 'cpp512z' and 'cuda' are supported!) + +#------------------------------------------------------------------------------- + #=== Configure the C++ compiler CXXFLAGS = $(OPTFLAGS) -std=c++17 $(INCFLAGS) -Wall -Wshadow -Wextra @@ -103,70 +111,73 @@ endif #------------------------------------------------------------------------------- -#=== Configure the CUDA compiler - -# If CXX is not a single word (example "clang++ --gcc-toolchain...") then disable CUDA builds (issue #505) -# This is because it is impossible to pass this to "CUFLAGS += -ccbin " below -ifneq ($(words $(subst ccache ,,$(CXX))),1) # allow at most "CXX=ccache " from outside - $(warning CUDA builds are not supported for multi-word CXX "$(CXX)") - override CUDA_HOME=disabled -endif - -# If CUDA_HOME is not set, try to set it from the location of nvcc -ifndef CUDA_HOME - CUDA_HOME = $(patsubst %bin/nvcc,%,$(shell which nvcc 2>/dev/null)) - $(warning CUDA_HOME was not set: using "$(CUDA_HOME)") -endif - -# Set NVCC as $(CUDA_HOME)/bin/nvcc if it exists -ifneq ($(wildcard $(CUDA_HOME)/bin/nvcc),) - NVCC = $(CUDA_HOME)/bin/nvcc - USE_NVTX ?=-DUSE_NVTX - # See https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html - # See https://arnon.dk/matching-sm-architectures-arch-and-gencode-for-various-nvidia-cards/ - # Default: use compute capability 70 for V100 (CERN lxbatch, CERN itscrd, Juwels Cluster). - # Embed device code for 70, and PTX for 70+. - # Export MADGRAPH_CUDA_ARCHITECTURE (comma-separated list) to use another value or list of values (see #533). - # Examples: use 60 for P100 (Piz Daint), 80 for A100 (Juwels Booster, NVidia raplab/Curiosity). - MADGRAPH_CUDA_ARCHITECTURE ?= 70 - ###CUARCHFLAGS = -gencode arch=compute_$(MADGRAPH_CUDA_ARCHITECTURE),code=compute_$(MADGRAPH_CUDA_ARCHITECTURE) -gencode arch=compute_$(MADGRAPH_CUDA_ARCHITECTURE),code=sm_$(MADGRAPH_CUDA_ARCHITECTURE) # Older implementation (AV): go back to this one for multi-GPU support #533 - ###CUARCHFLAGS = --gpu-architecture=compute_$(MADGRAPH_CUDA_ARCHITECTURE) --gpu-code=sm_$(MADGRAPH_CUDA_ARCHITECTURE),compute_$(MADGRAPH_CUDA_ARCHITECTURE) # Newer implementation (SH): cannot use this as-is for multi-GPU support #533 - comma:=, - CUARCHFLAGS = $(foreach arch,$(subst $(comma), ,$(MADGRAPH_CUDA_ARCHITECTURE)),-gencode arch=compute_$(arch),code=compute_$(arch) -gencode arch=compute_$(arch),code=sm_$(arch)) - CUINC = -I$(CUDA_HOME)/include/ - CURANDLIBFLAGS = -L$(CUDA_HOME)/lib64/ -lcurand # NB: -lcuda is not needed here! - CUOPTFLAGS = -lineinfo - CUFLAGS = $(foreach opt, $(OPTFLAGS), -Xcompiler $(opt)) $(CUOPTFLAGS) $(INCFLAGS) $(CUINC) $(USE_NVTX) $(CUARCHFLAGS) -use_fast_math - ###CUFLAGS += -Xcompiler -Wall -Xcompiler -Wextra -Xcompiler -Wshadow - ###NVCC_VERSION = $(shell $(NVCC) --version | grep 'Cuda compilation tools' | cut -d' ' -f5 | cut -d, -f1) - CUFLAGS += -std=c++17 # need CUDA >= 11.2 (see #333): this is enforced in mgOnGpuConfig.h - # Without -maxrregcount: baseline throughput: 6.5E8 (16384 32 12) up to 7.3E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 160 # improves throughput: 6.9E8 (16384 32 12) up to 7.7E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 128 # improves throughput: 7.3E8 (16384 32 12) up to 7.6E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 96 # degrades throughput: 4.1E8 (16384 32 12) up to 4.5E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 64 # degrades throughput: 1.7E8 (16384 32 12) flat at 1.7E8 (65536 128 12) -else ifneq ($(origin REQUIRE_CUDA),undefined) - # If REQUIRE_CUDA is set but no cuda is found, stop here (e.g. for CI tests on GPU #443) - $(error No cuda installation found (set CUDA_HOME or make nvcc visible in PATH)) -else - # No cuda. Switch cuda compilation off and go to common random numbers in C++ - $(warning CUDA_HOME is not set or is invalid: export CUDA_HOME to compile with cuda) - override NVCC= - override USE_NVTX= - override CUINC= - override CURANDLIBFLAGS= -endif -export NVCC -export CUFLAGS +#=== Configure the CUDA compiler for the CUDA target -# Set the host C++ compiler for nvcc via "-ccbin " -# (NB issue #505: this must be a single word, "clang++ --gcc-toolchain..." is not supported) -CUFLAGS += -ccbin $(shell which $(subst ccache ,,$(CXX))) +ifneq (,$(findstring $(MAKECMDGOALS),cuda-gcheck-runGcheck-runFGcheck-cmpFGcheck-memcheck)) + # If CXX is not a single word (example "clang++ --gcc-toolchain...") then disable CUDA builds (issue #505) + # This is because it is impossible to pass this to "CUFLAGS += -ccbin " below + ifneq ($(words $(subst ccache ,,$(CXX))),1) # allow at most "CXX=ccache " from outside + $(warning CUDA builds are not supported for multi-word CXX "$(CXX)") + override CUDA_HOME=disabled + endif -# Allow newer (unsupported) C++ compilers with older versions of CUDA if ALLOW_UNSUPPORTED_COMPILER_IN_CUDA is set (#504) -ifneq ($(origin ALLOW_UNSUPPORTED_COMPILER_IN_CUDA),undefined) -CUFLAGS += -allow-unsupported-compiler -endif + # If CUDA_HOME is not set, try to set it from the location of nvcc + ifndef CUDA_HOME + CUDA_HOME = $(patsubst %bin/nvcc,%,$(shell which nvcc 2>/dev/null)) + $(warning CUDA_HOME was not set: using "$(CUDA_HOME)") + endif + + # Set NVCC as $(CUDA_HOME)/bin/nvcc if it exists + ifneq ($(wildcard $(CUDA_HOME)/bin/nvcc),) + NVCC = $(CUDA_HOME)/bin/nvcc + USE_NVTX ?=-DUSE_NVTX + # See https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html + # See https://arnon.dk/matching-sm-architectures-arch-and-gencode-for-various-nvidia-cards/ + # Default: use compute capability 70 for V100 (CERN lxbatch, CERN itscrd, Juwels Cluster). + # Embed device code for 70, and PTX for 70+. + # Export MADGRAPH_CUDA_ARCHITECTURE (comma-separated list) to use another value or list of values (see #533). + # Examples: use 60 for P100 (Piz Daint), 80 for A100 (Juwels Booster, NVidia raplab/Curiosity). + MADGRAPH_CUDA_ARCHITECTURE ?= 70 + ###CUARCHFLAGS = -gencode arch=compute_$(MADGRAPH_CUDA_ARCHITECTURE),code=compute_$(MADGRAPH_CUDA_ARCHITECTURE) -gencode arch=compute_$(MADGRAPH_CUDA_ARCHITECTURE),code=sm_$(MADGRAPH_CUDA_ARCHITECTURE) # Older implementation (AV): go back to this one for multi-GPU support #533 + ###CUARCHFLAGS = --gpu-architecture=compute_$(MADGRAPH_CUDA_ARCHITECTURE) --gpu-code=sm_$(MADGRAPH_CUDA_ARCHITECTURE),compute_$(MADGRAPH_CUDA_ARCHITECTURE) # Newer implementation (SH): cannot use this as-is for multi-GPU support #533 + comma:=, + CUARCHFLAGS = $(foreach arch,$(subst $(comma), ,$(MADGRAPH_CUDA_ARCHITECTURE)),-gencode arch=compute_$(arch),code=compute_$(arch) -gencode arch=compute_$(arch),code=sm_$(arch)) + CUINC = -I$(CUDA_HOME)/include/ + CURANDLIBFLAGS = -L$(CUDA_HOME)/lib64/ -lcurand # NB: -lcuda is not needed here! + CUOPTFLAGS = -lineinfo + CUFLAGS = $(foreach opt, $(OPTFLAGS), -Xcompiler $(opt)) $(CUOPTFLAGS) $(INCFLAGS) $(CUINC) $(USE_NVTX) $(CUARCHFLAGS) -use_fast_math + ###CUFLAGS += -Xcompiler -Wall -Xcompiler -Wextra -Xcompiler -Wshadow + ###NVCC_VERSION = $(shell $(NVCC) --version | grep 'Cuda compilation tools' | cut -d' ' -f5 | cut -d, -f1) + CUFLAGS += -std=c++17 # need CUDA >= 11.2 (see #333): this is enforced in mgOnGpuConfig.h + # Without -maxrregcount: baseline throughput: 6.5E8 (16384 32 12) up to 7.3E8 (65536 128 12) + ###CUFLAGS+= --maxrregcount 160 # improves throughput: 6.9E8 (16384 32 12) up to 7.7E8 (65536 128 12) + ###CUFLAGS+= --maxrregcount 128 # improves throughput: 7.3E8 (16384 32 12) up to 7.6E8 (65536 128 12) + ###CUFLAGS+= --maxrregcount 96 # degrades throughput: 4.1E8 (16384 32 12) up to 4.5E8 (65536 128 12) + ###CUFLAGS+= --maxrregcount 64 # degrades throughput: 1.7E8 (16384 32 12) flat at 1.7E8 (65536 128 12) + else ifneq ($(origin REQUIRE_CUDA),undefined) + # If REQUIRE_CUDA is set but no cuda is found, stop here (e.g. for CI tests on GPU #443) + $(error No cuda installation found (set CUDA_HOME or make nvcc visible in PATH)) + else + # No cuda. Switch cuda compilation off and go to common random numbers in C++ + $(warning CUDA_HOME is not set or is invalid: export CUDA_HOME to compile with cuda) + override NVCC= + override USE_NVTX= + override CUINC= + override CURANDLIBFLAGS= + endif + export NVCC + export CUFLAGS + + # Set the host C++ compiler for nvcc via "-ccbin " + # (NB issue #505: this must be a single word, "clang++ --gcc-toolchain..." is not supported) + CUFLAGS += -ccbin $(shell which $(subst ccache ,,$(CXX))) + + # Allow newer (unsupported) C++ compilers with older versions of CUDA if ALLOW_UNSUPPORTED_COMPILER_IN_CUDA is set (#504) + ifneq ($(origin ALLOW_UNSUPPORTED_COMPILER_IN_CUDA),undefined) + CUFLAGS += -allow-unsupported-compiler + endif + +endif # ($(MAKECMDGOALS),cuda) #------------------------------------------------------------------------------- @@ -226,32 +237,6 @@ override OMPFLAGS = -fopenmp ###override OMPFLAGS = # disable OpenMP MT (default before #575) endif -# Set the default AVX (vectorization) choice -ifeq ($(AVX),) - ifeq ($(UNAME_P),ppc64le) - ###override AVX = none - override AVX = sse4 - else ifeq ($(UNAME_P),arm) - ###override AVX = none - override AVX = sse4 - else ifeq ($(wildcard /proc/cpuinfo),) - override AVX = none - $(warning Using AVX='$(AVX)' because host SIMD features cannot be read from /proc/cpuinfo) - else ifeq ($(shell grep -m1 -c avx512vl /proc/cpuinfo)$(shell $(CXX) --version | grep ^clang),1) - override AVX = 512y - ###$(info Using AVX='$(AVX)' as no user input exists) - else - override AVX = avx2 - ifneq ($(shell grep -m1 -c avx512vl /proc/cpuinfo),1) - $(warning Using AVX='$(AVX)' because host does not support avx512vl) - else - $(warning Using AVX='$(AVX)' because this is faster than avx512vl for clang) - endif - endif -else - ###$(info Using AVX='$(AVX)' according to user input) -endif - # Set the default FPTYPE (floating point type) choice ifeq ($(FPTYPE),) override FPTYPE = d @@ -276,6 +261,21 @@ ifeq ($(RNDGEN),) endif endif +# set the correct AVX based on avxcpp target +ifeq ($(MAKECMDGOALS),cppnone) # no SIMD + override AVX = none +else ifeq ($(MAKECMDGOALS),cppsse4) # SSE4.2 with 128 width (xmm registers) + override AVX = sse4 +else ifeq ($(MAKECMDGOALS),cppavx2) # AVX2 with 256 width (ymm registers) [DEFAULT for clang] + override AVX = avx2 +else ifeq ($(MAKECMDGOALS),cpp512y) # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] + override AVX = 512y +else ifeq ($(MAKECMDGOALS),cpp512z) # AVX512 with 512 width (zmm registers) + override AVX = 512z +else + override AVX = none +endif + # Export AVX, FPTYPE, HELINL, HRDCOD, RNDGEN, OMPFLAGS so that it is not necessary to pass them to the src Makefile too export AVX export FPTYPE @@ -295,50 +295,52 @@ CXXFLAGS += $(OMPFLAGS) # Set the build flags appropriate to each AVX choice (example: "make AVX=none") # [NB MGONGPU_PVW512 is needed because "-mprefer-vector-width=256" is not exposed in a macro] # [See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96476] -$(info AVX=$(AVX)) -ifeq ($(UNAME_P),ppc64le) - ifeq ($(AVX),sse4) - override AVXFLAGS = -D__SSE4_2__ # Power9 VSX with 128 width (VSR registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on PowerPC for the moment) - endif -else ifeq ($(UNAME_P),arm) - ifeq ($(AVX),sse4) - override AVXFLAGS = -D__SSE4_2__ # ARM NEON with 128 width (Q/quadword registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on ARM for the moment) - endif -else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 - ifeq ($(AVX),none) - override AVXFLAGS = -mno-sse3 # no SIMD - else ifeq ($(AVX),sse4) - override AVXFLAGS = -mno-avx # SSE4.2 with 128 width (xmm registers) - else ifeq ($(AVX),avx2) - override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(AVX),512y) - override AVXFLAGS = -march=skylake -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(AVX),512z) - override AVXFLAGS = -march=skylake -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) - else - $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) - endif -else - ifeq ($(AVX),none) - override AVXFLAGS = -march=x86-64 # no SIMD (see #588) - else ifeq ($(AVX),sse4) - override AVXFLAGS = -march=nehalem # SSE4.2 with 128 width (xmm registers) - else ifeq ($(AVX),avx2) - override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(AVX),512y) - override AVXFLAGS = -march=skylake-avx512 -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(AVX),512z) - override AVXFLAGS = -march=skylake-avx512 -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) +ifeq ($(findstring cpp,$(MAKECMDGOALS)),cpp) + $(info AVX=$(AVX)) + ifeq ($(UNAME_P),ppc64le) + ifeq ($(AVX),sse4) + override AVXFLAGS = -D__SSE4_2__ # Power9 VSX with 128 width (VSR registers) + else ifneq ($(AVX),none) + $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on PowerPC for the moment) + endif + else ifeq ($(UNAME_P),arm) + ifeq ($(AVX),sse4) + override AVXFLAGS = -D__SSE4_2__ # ARM NEON with 128 width (Q/quadword registers) + else ifneq ($(AVX),none) + $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on ARM for the moment) + endif + else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 + ifeq ($(AVX),none) + override AVXFLAGS = -mno-sse3 # no SIMD + else ifeq ($(AVX),sse4) + override AVXFLAGS = -mno-avx # SSE4.2 with 128 width (xmm registers) + else ifeq ($(AVX),avx2) + override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] + else ifeq ($(AVX),512y) + override AVXFLAGS = -march=skylake -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] + else ifeq ($(AVX),512z) + override AVXFLAGS = -march=skylake -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) + else + $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) + endif else - $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) + ifeq ($(AVX),none) + override AVXFLAGS = -march=x86-64 # no SIMD (see #588) + else ifeq ($(AVX),sse4) + override AVXFLAGS = -march=nehalem # SSE4.2 with 128 width (xmm registers) + else ifeq ($(AVX),avx2) + override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] + else ifeq ($(AVX),512y) + override AVXFLAGS = -march=skylake-avx512 -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] + else ifeq ($(AVX),512z) + override AVXFLAGS = -march=skylake-avx512 -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) + else + $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) + endif endif + # For the moment, use AVXFLAGS everywhere: eventually, use them only in encapsulated implementations? + CXXFLAGS+= $(AVXFLAGS) endif -# For the moment, use AVXFLAGS everywhere: eventually, use them only in encapsulated implementations? -CXXFLAGS+= $(AVXFLAGS) # Set the build flags appropriate to each FPTYPE choice (example: "make FPTYPE=f") $(info FPTYPE=$(FPTYPE)) @@ -389,11 +391,19 @@ endif # Build directory "short" tag (defines target and path to the optional build directory) # (Rationale: keep directory names shorter, e.g. do not include random number generator choice) -override DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) +ifneq ($(NVCC),) + override DIRTAG = cuda_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) +else + override DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) +endif # Build lockfile "full" tag (defines full specification of build options that cannot be intermixed) # (Rationale: avoid mixing of CUDA and no-CUDA environment builds with different random number generators) -override TAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) +ifneq ($(NVCC),) + override TAG = cuda_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) +else + override TAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) +endif # Build directory: current directory by default, or build.$(DIRTAG) if USEBUILDDIR==1 ifeq ($(USEBUILDDIR),1) @@ -448,9 +458,9 @@ endif testmain=$(BUILDDIR)/runTest.exe ifneq ($(GTESTLIBS),) -all.$(TAG): $(BUILDDIR)/.build.$(TAG) $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_main) $(cxx_main) $(fcu_main) $(fcxx_main) $(testmain) +all.$(TAG): $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_main) $(cxx_main) $(fcu_main) $(fcxx_main) $(testmain) else -all.$(TAG): $(BUILDDIR)/.build.$(TAG) $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_main) $(cxx_main) $(fcu_main) $(fcxx_main) +all.$(TAG): $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_main) $(cxx_main) $(fcu_main) $(fcxx_main) endif # Target (and build options): debug @@ -460,27 +470,20 @@ debug: CUOPTFLAGS = -G debug: MAKEDEBUG := debug debug: all.$(TAG) -# Target: tag-specific build lockfiles -override oldtagsb=`if [ -d $(BUILDDIR) ]; then find $(BUILDDIR) -maxdepth 1 -name '.build.*' ! -name '.build.$(TAG)' -exec echo $(shell pwd)/{} \; ; fi` -$(BUILDDIR)/.build.$(TAG): - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - @if [ "$(oldtagsb)" != "" ]; then echo "Cannot build for tag=$(TAG) as old builds exist for other tags:"; echo " $(oldtagsb)"; echo "Please run 'make clean' first\nIf 'make clean' is not enough: run 'make clean USEBUILDDIR=1 AVX=$(AVX) FPTYPE=$(FPTYPE)' or 'make cleanall'"; exit 1; fi - @touch $(BUILDDIR)/.build.$(TAG) - # Generic target and build rules: objects from CUDA compilation ifneq ($(NVCC),) -$(BUILDDIR)/%.o : %.cu *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) +$(BUILDDIR)/%.o : %.cu *.h ../../src/*.h @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c $< -o $@ -$(BUILDDIR)/%_cu.o : %.cc *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) +$(BUILDDIR)/%_cu.o : %.cc *.h ../../src/*.h @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c -x cu $< -o $@ endif # Generic target and build rules: objects from C++ compilation # (NB do not include CUINC here! add it only for NVTX or curand #679) -$(BUILDDIR)/%.o : %.cc *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) +$(BUILDDIR)/%.o : %.cc *.h ../../src/*.h @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi $(CXX) $(CPPFLAGS) $(CXXFLAGS) -fPIC -c $< -o $@ @@ -532,7 +535,7 @@ endif # Target (and build rules): common (src) library commonlib : $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so -$(LIBDIR)/lib$(MG5AMC_COMMONLIB).so: ../../src/*.h ../../src/*.cc $(BUILDDIR)/.build.$(TAG) +$(LIBDIR)/lib$(MG5AMC_COMMONLIB).so: ../../src/*.h ../../src/*.cc $(MAKE) -C ../../src $(MAKEDEBUG) -f $(CUDACPP_SRC_MAKEFILE) #------------------------------------------------------------------------------- @@ -711,35 +714,27 @@ endif # Target: build all targets in all AVX modes (each AVX mode in a separate build directory) # Split the avxall target into five separate targets to allow parallel 'make -j avxall' builds # (Hack: add a fbridge.inc dependency to avxall, to ensure it is only copied once for all AVX modes) -avxnone: - @echo - $(MAKE) USEBUILDDIR=1 AVX=none -f $(CUDACPP_MAKEFILE) +cppnone: $(cxx_main) -avxsse4: - @echo - $(MAKE) USEBUILDDIR=1 AVX=sse4 -f $(CUDACPP_MAKEFILE) +cppsse4: $(cxx_main) -avxavx2: - @echo - $(MAKE) USEBUILDDIR=1 AVX=avx2 -f $(CUDACPP_MAKEFILE) +cppavx2: $(cxx_main) -avx512y: - @echo - $(MAKE) USEBUILDDIR=1 AVX=512y -f $(CUDACPP_MAKEFILE) +cpp512y: $(cxx_main) -avx512z: - @echo - $(MAKE) USEBUILDDIR=1 AVX=512z -f $(CUDACPP_MAKEFILE) +cpp512z: $(cxx_main) + +cuda: $(cu_main) ifeq ($(UNAME_P),ppc64le) ###avxall: $(INCDIR)/fbridge.inc avxnone avxsse4 -avxall: avxnone avxsse4 +cppall: cppnone cppsse4 else ifeq ($(UNAME_P),arm) ###avxall: $(INCDIR)/fbridge.inc avxnone avxsse4 -avxall: avxnone avxsse4 +cppall: cppnone cppsse4 else ###avxall: $(INCDIR)/fbridge.inc avxnone avxsse4 avxavx2 avx512y avx512z -avxall: avxnone avxsse4 avxavx2 avx512y avx512z +cppall: cppnone cppsse4 cppavx2 cpp512y cpp512z endif #------------------------------------------------------------------------------- @@ -747,21 +742,31 @@ endif # Target: clean the builds .PHONY: clean +BUILD_DIRS := $(wildcard build.*) +NUM_BUILD_DIRS := $(words $(BUILD_DIRS)) + clean: ifeq ($(USEBUILDDIR),1) - rm -rf $(BUILDDIR) +ifeq ($(NUM_BUILD_DIRS),1) + $(info USEBUILDDIR=1, Only one build directory found.) + rm -rf $(BUILD_DIRS) +else ifeq ($(NUM_BUILD_DIRS),0) + $(error USEBUILDDIR=1, but no build directories are found.) else - rm -f $(BUILDDIR)/.build.* $(BUILDDIR)/*.o $(BUILDDIR)/*.exe + $(error Multiple BUILDDIR's found! Use 'cleannone', 'cleansse4', 'cleanavx2', 'clean512y','clean512z', 'cleancuda' or 'cleanall'.) +endif +else + rm -f $(BUILDDIR)/*.o $(BUILDDIR)/*.exe rm -f $(LIBDIR)/lib$(MG5AMC_CXXLIB).so $(LIBDIR)/lib$(MG5AMC_CULIB).so endif $(MAKE) -C ../../src clean -f $(CUDACPP_SRC_MAKEFILE) -### rm -rf $(INCDIR) cleanall: @echo - $(MAKE) USEBUILDDIR=0 clean -f $(CUDACPP_MAKEFILE) + rm -f $(BUILDDIR)/*.o $(BUILDDIR)/*.exe + rm -f $(LIBDIR)/lib$(MG5AMC_CXXLIB).so $(LIBDIR)/lib$(MG5AMC_CULIB).so @echo - $(MAKE) USEBUILDDIR=0 -C ../../src cleanall -f $(CUDACPP_SRC_MAKEFILE) + $(MAKE) -C ../../src cleanall -f $(CUDACPP_SRC_MAKEFILE) rm -rf build.* # Target: clean the builds as well as the gtest installation(s) @@ -771,6 +776,42 @@ ifneq ($(wildcard $(TESTDIRCOMMON)),) endif $(MAKE) -C $(TESTDIRLOCAL) clean +# Target: clean different builds +cleannone: + rm -rf build.none_* + rm -f ../../lib/build.none_*/lib$(MG5AMC_CXXLIB).so + $(MAKE) -C ../../src cleannone -f $(CUDACPP_SRC_MAKEFILE) + +cleansse4: + rm -rf build.sse4_* + rm -f ../../lib/build.sse4_*/lib$(MG5AMC_CXXLIB).so + $(MAKE) -C ../../src cleansse4 -f $(CUDACPP_SRC_MAKEFILE) + +cleanavx2: + rm -rf build.avx2_* + rm -f ../../lib/build.avx2_*/lib$(MG5AMC_CXXLIB).so + $(MAKE) -C ../../src cleanavx2 -f $(CUDACPP_SRC_MAKEFILE) + +clean512y: + rm -rf build.512y_* + rm -f ../../lib/build.512y_*/lib$(MG5AMC_CXXLIB).so + $(MAKE) -C ../../src clean512y -f $(CUDACPP_SRC_MAKEFILE) + +clean512z: + rm -rf build.512z_* + rm -f ../../lib/build.512z_*/lib$(MG5AMC_CXXLIB).so + $(MAKE) -C ../../src clean512z -f $(CUDACPP_SRC_MAKEFILE) + +cleancuda: + rm -rf build.cuda_* + rm -f ../../lib/build.cuda_*/lib$(MG5AMC_CULIB).so + $(MAKE) -C ../../src cleancuda -f $(CUDACPP_SRC_MAKEFILE) + +cleandir: + rm -f ./*.o ./*.exe + rm -f ../../lib/lib$(MG5AMC_CXXLIB).so ../../lib/lib$(MG5AMC_CULIB).so + $(MAKE) -C ../../src cleandir -f $(CUDACPP_SRC_MAKEFILE) + #------------------------------------------------------------------------------- # Target: show system and compiler information @@ -817,13 +858,10 @@ endif #------------------------------------------------------------------------------- -# Target: check (run the C++ test executable) +# Target: check/gcheck (run the C++ test executable) # [NB THIS IS WHAT IS USED IN THE GITHUB CI!] -ifneq ($(NVCC),) -check: runTest cmpFcheck cmpFGcheck -else check: runTest cmpFcheck -endif +gcheck: runTest cmpFGcheck # Target: runTest (run the C++ test executable runTest.exe) runTest: all.$(TAG) @@ -863,4 +901,4 @@ cmpFGcheck: all.$(TAG) memcheck: all.$(TAG) $(RUNTIME) $(CUDA_HOME)/bin/cuda-memcheck --check-api-memory-access yes --check-deprecated-instr yes --check-device-heap yes --demangle full --language c --leak-check full --racecheck-report all --report-api-errors all --show-backtrace yes --tool memcheck --track-unused-memory yes $(BUILDDIR)/gcheck.exe -p 2 32 2 -#------------------------------------------------------------------------------- +#------------------------------------------------------------------------------- \ No newline at end of file diff --git a/epochX/cudacpp/gg_ttggg.sa/src/HelAmps_sm.h b/epochX/cudacpp/gg_ttggg.sa/src/HelAmps_sm.h index 9cea8bcbe7..9b946c21e1 100644 --- a/epochX/cudacpp/gg_ttggg.sa/src/HelAmps_sm.h +++ b/epochX/cudacpp/gg_ttggg.sa/src/HelAmps_sm.h @@ -863,6 +863,7 @@ namespace mg5amcCpu const fptype allV2[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, fptype allvertexes[] ) ALWAYS_INLINE; //-------------------------------------------------------------------------- @@ -873,6 +874,7 @@ namespace mg5amcCpu VVV1P0_1( const fptype allV2[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, const fptype M1, const fptype W1, fptype allV1[] ) ALWAYS_INLINE; @@ -886,6 +888,7 @@ namespace mg5amcCpu const fptype allF2[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, fptype allvertexes[] ) ALWAYS_INLINE; //-------------------------------------------------------------------------- @@ -896,6 +899,7 @@ namespace mg5amcCpu FFV1_1( const fptype allF2[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, const fptype M1, const fptype W1, fptype allF1[] ) ALWAYS_INLINE; @@ -908,6 +912,7 @@ namespace mg5amcCpu FFV1_2( const fptype allF1[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, const fptype M2, const fptype W2, fptype allF2[] ) ALWAYS_INLINE; @@ -920,6 +925,7 @@ namespace mg5amcCpu FFV1P0_3( const fptype allF1[], const fptype allF2[], const fptype allCOUP[], + const double Ccoeff, const fptype M3, const fptype W3, fptype allV3[] ) ALWAYS_INLINE; @@ -934,6 +940,7 @@ namespace mg5amcCpu const fptype allV3[], const fptype allV4[], const fptype allCOUP[], + const double Ccoeff, fptype allvertexes[] ) ALWAYS_INLINE; //-------------------------------------------------------------------------- @@ -945,6 +952,7 @@ namespace mg5amcCpu const fptype allV3[], const fptype allV4[], const fptype allCOUP[], + const double Ccoeff, const fptype M1, const fptype W1, fptype allV1[] ) ALWAYS_INLINE; @@ -959,6 +967,7 @@ namespace mg5amcCpu const fptype allV3[], const fptype allV4[], const fptype allCOUP[], + const double Ccoeff, fptype allvertexes[] ) ALWAYS_INLINE; //-------------------------------------------------------------------------- @@ -970,6 +979,7 @@ namespace mg5amcCpu const fptype allV3[], const fptype allV4[], const fptype allCOUP[], + const double Ccoeff, const fptype M1, const fptype W1, fptype allV1[] ) ALWAYS_INLINE; @@ -984,6 +994,7 @@ namespace mg5amcCpu const fptype allV3[], const fptype allV4[], const fptype allCOUP[], + const double Ccoeff, fptype allvertexes[] ) ALWAYS_INLINE; //-------------------------------------------------------------------------- @@ -995,6 +1006,7 @@ namespace mg5amcCpu const fptype allV3[], const fptype allV4[], const fptype allCOUP[], + const double Ccoeff, const fptype M1, const fptype W1, fptype allV1[] ) ALWAYS_INLINE; @@ -1008,6 +1020,7 @@ namespace mg5amcCpu const fptype allV2[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, fptype allvertexes[] ) { mgDebug( 0, __FUNCTION__ ); @@ -1042,6 +1055,7 @@ namespace mg5amcCpu VVV1P0_1( const fptype allV2[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, const fptype M1, const fptype W1, fptype allV1[] ) @@ -1080,6 +1094,7 @@ namespace mg5amcCpu const fptype allF2[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, fptype allvertexes[] ) { mgDebug( 0, __FUNCTION__ ); @@ -1103,6 +1118,7 @@ namespace mg5amcCpu FFV1_1( const fptype allF2[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, const fptype M1, const fptype W1, fptype allF1[] ) @@ -1134,6 +1150,7 @@ namespace mg5amcCpu FFV1_2( const fptype allF1[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, const fptype M2, const fptype W2, fptype allF2[] ) @@ -1165,6 +1182,7 @@ namespace mg5amcCpu FFV1P0_3( const fptype allF1[], const fptype allF2[], const fptype allCOUP[], + const double Ccoeff, const fptype M3, const fptype W3, fptype allV3[] ) @@ -1197,6 +1215,7 @@ namespace mg5amcCpu const fptype allV3[], const fptype allV4[], const fptype allCOUP[], + const double Ccoeff, fptype allvertexes[] ) { mgDebug( 0, __FUNCTION__ ); @@ -1225,6 +1244,7 @@ namespace mg5amcCpu const fptype allV3[], const fptype allV4[], const fptype allCOUP[], + const double Ccoeff, const fptype M1, const fptype W1, fptype allV1[] ) @@ -1260,6 +1280,7 @@ namespace mg5amcCpu const fptype allV3[], const fptype allV4[], const fptype allCOUP[], + const double Ccoeff, fptype allvertexes[] ) { mgDebug( 0, __FUNCTION__ ); @@ -1288,6 +1309,7 @@ namespace mg5amcCpu const fptype allV3[], const fptype allV4[], const fptype allCOUP[], + const double Ccoeff, const fptype M1, const fptype W1, fptype allV1[] ) @@ -1323,6 +1345,7 @@ namespace mg5amcCpu const fptype allV3[], const fptype allV4[], const fptype allCOUP[], + const double Ccoeff, fptype allvertexes[] ) { mgDebug( 0, __FUNCTION__ ); @@ -1351,6 +1374,7 @@ namespace mg5amcCpu const fptype allV3[], const fptype allV4[], const fptype allCOUP[], + const double Ccoeff, const fptype M1, const fptype W1, fptype allV1[] ) diff --git a/epochX/cudacpp/gg_ttggg.sa/src/cudacpp_src.mk b/epochX/cudacpp/gg_ttggg.sa/src/cudacpp_src.mk index 554d7a704c..750986464e 100644 --- a/epochX/cudacpp/gg_ttggg.sa/src/cudacpp_src.mk +++ b/epochX/cudacpp/gg_ttggg.sa/src/cudacpp_src.mk @@ -1,7 +1,7 @@ # Copyright (C) 2020-2023 CERN and UCLouvain. # Licensed under the GNU Lesser General Public License (version 3 or later). # Created by: S. Roiser (Feb 2020) for the MG5aMC CUDACPP plugin. -# Further modified by: O. Mattelaer, S. Roiser, A. Valassi (2020-2023) for the MG5aMC CUDACPP plugin. +# Further modified by: J. Teig, O. Mattelaer, S. Roiser, A. Valassi (2020-2023) for the MG5aMC CUDACPP plugin. #=== Determine the name of this makefile (https://ftp.gnu.org/old-gnu/Manuals/make-3.80/html_node/make_17.html) #=== NB: assume that the same name (e.g. cudacpp.mk, Makefile...) is used in the Subprocess and src directories @@ -88,50 +88,52 @@ CXXFLAGS += $(OMPFLAGS) # Set the build flags appropriate to each AVX choice (example: "make AVX=none") # [NB MGONGPU_PVW512 is needed because "-mprefer-vector-width=256" is not exposed in a macro] # [See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96476] -$(info AVX=$(AVX)) -ifeq ($(UNAME_P),ppc64le) - ifeq ($(AVX),sse4) - override AVXFLAGS = -D__SSE4_2__ # Power9 VSX with 128 width (VSR registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on PowerPC for the moment) - endif -else ifeq ($(UNAME_P),arm) - ifeq ($(AVX),sse4) - override AVXFLAGS = -D__SSE4_2__ # ARM NEON with 128 width (Q/quadword registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on ARM for the moment) - endif -else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 - ifeq ($(AVX),none) - override AVXFLAGS = -mno-sse3 # no SIMD - else ifeq ($(AVX),sse4) - override AVXFLAGS = -mno-avx # SSE4.2 with 128 width (xmm registers) - else ifeq ($(AVX),avx2) - override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(AVX),512y) - override AVXFLAGS = -march=skylake -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(AVX),512z) - override AVXFLAGS = -march=skylake -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) +ifeq ($(NVCC),) + $(info AVX=$(AVX)) + ifeq ($(UNAME_P),ppc64le) + ifeq ($(AVX),sse4) + override AVXFLAGS = -D__SSE4_2__ # Power9 VSX with 128 width (VSR registers) + else ifneq ($(AVX),none) + $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on PowerPC for the moment) + endif + else ifeq ($(UNAME_P),arm) + ifeq ($(AVX),sse4) + override AVXFLAGS = -D__SSE4_2__ # ARM NEON with 128 width (Q/quadword registers) + else ifneq ($(AVX),none) + $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on ARM for the moment) + endif + else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 + ifeq ($(AVX),none) + override AVXFLAGS = -mno-sse3 # no SIMD + else ifeq ($(AVX),sse4) + override AVXFLAGS = -mno-avx # SSE4.2 with 128 width (xmm registers) + else ifeq ($(AVX),avx2) + override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] + else ifeq ($(AVX),512y) + override AVXFLAGS = -march=skylake -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] + else ifeq ($(AVX),512z) + override AVXFLAGS = -march=skylake -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) + else + $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) + endif else - $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) - endif -else - ifeq ($(AVX),none) - override AVXFLAGS = -march=x86-64 # no SIMD (see #588) - else ifeq ($(AVX),sse4) - override AVXFLAGS = -march=nehalem # SSE4.2 with 128 width (xmm registers) - else ifeq ($(AVX),avx2) - override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(AVX),512y) - override AVXFLAGS = -march=skylake-avx512 -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(AVX),512z) - override AVXFLAGS = -march=skylake-avx512 -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) + ifeq ($(AVX),none) + override AVXFLAGS = -march=x86-64 # no SIMD (see #588) + else ifeq ($(AVX),sse4) + override AVXFLAGS = -march=nehalem # SSE4.2 with 128 width (xmm registers) + else ifeq ($(AVX),avx2) + override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] + else ifeq ($(AVX),512y) + override AVXFLAGS = -march=skylake-avx512 -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] + else ifeq ($(AVX),512z) + override AVXFLAGS = -march=skylake-avx512 -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) + else ifneq ($(AVX),none) + $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) + endif endif + # For the moment, use AVXFLAGS everywhere: eventually, use them only in encapsulated implementations? + CXXFLAGS+= $(AVXFLAGS) endif -# For the moment, use AVXFLAGS everywhere: eventually, use them only in encapsulated implementations? -CXXFLAGS+= $(AVXFLAGS) # Set the build flags appropriate to each FPTYPE choice (example: "make FPTYPE=f") ###$(info FPTYPE=$(FPTYPE)) @@ -175,11 +177,19 @@ endif # Build directory "short" tag (defines target and path to the optional build directory) # (Rationale: keep directory names shorter, e.g. do not include random number generator choice) -override DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) +ifneq ($(NVCC),) + override DIRTAG = cuda_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) +else + override DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) +endif # Build lockfile "full" tag (defines full specification of build options that cannot be intermixed) # (Rationale: avoid mixing of CUDA and no-CUDA environment builds with different random number generators) -override TAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) +ifneq ($(NVCC),) + override TAG = cuda_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) +else + override TAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) +endif # Build directory: current directory by default, or build.$(DIRTAG) if USEBUILDDIR==1 ###$(info Current directory is $(shell pwd)) @@ -216,35 +226,21 @@ endif MG5AMC_COMMONLIB = mg5amc_common # First target (default goal) -all.$(TAG): $(BUILDDIR)/.build.$(TAG) $(LIBDIR)/.build.$(TAG) $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so +all.$(TAG): $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so # Target (and build options): debug debug: OPTFLAGS = -g -O0 debug: all.$(TAG) -# Target: tag-specific build lockfiles -override oldtagsb=`if [ -d $(BUILDDIR) ]; then find $(BUILDDIR) -maxdepth 1 -name '.build.*' ! -name '.build.$(TAG)' -exec echo $(shell pwd)/{} \; ; fi` -override oldtagsl=`if [ -d $(LIBDIR) ]; then find $(LIBDIR) -maxdepth 1 -name '.build.*' ! -name '.build.$(TAG)' -exec echo $(shell pwd)/{} \; ; fi` - -$(BUILDDIR)/.build.$(TAG): $(LIBDIR)/.build.$(TAG) - -$(LIBDIR)/.build.$(TAG): - @if [ "$(oldtagsl)" != "" ]; then echo -e "Cannot build for tag=$(TAG) as old builds exist in $(LIBDIR) for other tags:\n$(oldtagsl)\nPlease run 'make clean' first\nIf 'make clean' is not enough: run 'make clean USEBUILDDIR=1 AVX=$(AVX) FPTYPE=$(FPTYPE)' or 'make cleanall'"; exit 1; fi - @if [ "$(oldtagsb)" != "" ]; then echo -e "Cannot build for tag=$(TAG) as old builds exist in $(BUILDDIR) for other tags:\n$(oldtagsb)\nPlease run 'make clean' first\nIf 'make clean' is not enough: run 'make clean USEBUILDDIR=1 AVX=$(AVX) FPTYPE=$(FPTYPE)' or 'make cleanall'"; exit 1; fi - @if [ ! -d $(LIBDIR) ]; then echo "mkdir -p $(LIBDIR)"; mkdir -p $(LIBDIR); fi - @touch $(LIBDIR)/.build.$(TAG) - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - @touch $(BUILDDIR)/.build.$(TAG) - #------------------------------------------------------------------------------- # Generic target and build rules: objects from C++ compilation -$(BUILDDIR)/%.o : %.cc *.h $(BUILDDIR)/.build.$(TAG) +$(BUILDDIR)/%.o : %.cc *.h @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi $(CXX) $(CPPFLAGS) $(CXXFLAGS) -fPIC -c $< -o $@ # Generic target and build rules: objects from CUDA compilation -$(BUILDDIR)/%_cu.o : %.cc *.h $(BUILDDIR)/.build.$(TAG) +$(BUILDDIR)/%_cu.o : %.cc *.h @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c -x cu $< -o $@ @@ -271,20 +267,61 @@ endif # Target: clean the builds .PHONY: clean +BUILD_DIRS := $(wildcard build.*) +NUM_BUILD_DIRS := $(words $(BUILD_DIRS)) + clean: ifeq ($(USEBUILDDIR),1) - rm -rf $(LIBDIR) - rm -rf $(BUILDDIR) +ifeq ($(NUM_BUILD_DIRS),1) + $(info USEBUILDDIR=1, only one src build directory found.) + rm -rf ../lib/$(BUILD_DIRS) + rm -rf $(BUILD_DIRS) +else ifeq ($(NUM_BUILD_DIRS),0) + $(error USEBUILDDIR=1, but no src build directories are found.) else - rm -f $(LIBDIR)/.build.* $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so - rm -f $(BUILDDIR)/.build.* $(BUILDDIR)/*.o $(BUILDDIR)/*.exe + $(error Multiple src BUILDDIR's found! Use 'cleannone', 'cleansse4', 'cleanavx2', 'clean512y','clean512z', 'cleancuda' or 'cleanall'.) +endif +else + rm -f ../lib/lib$(MG5AMC_COMMONLIB).so + rm -f $(BUILDDIR)/*.o $(BUILDDIR)/*.exe endif cleanall: @echo - $(MAKE) clean -f $(THISMK) + rm -f ../lib/lib$(MG5AMC_COMMONLIB).so + rm -f $(BUILDDIR)/*.o $(BUILDDIR)/*.exe @echo - rm -rf $(LIBDIR)/build.* + rm -rf ../lib/build.* rm -rf build.* +# Target: clean different builds + +cleannone: + rm -rf ../lib/build.none_* + rm -rf build.none_* + +cleansse4: + rm -rf ../lib/build.sse4_* + rm -rf build.sse4_* + +cleanavx2: + rm -rf ../lib/build.avx2_* + rm -rf build.avx2_* + +clean512y: + rm -rf ../lib/build.512y_* + rm -rf build.512y_* + +clean512z: + rm -rf ../lib/build.512z_* + rm -rf build.512z_* + +cleancuda: + rm -rf ../lib/build.cuda_* + rm -rf build.cuda_* + +cleandir: + rm -f ./*.o ./*.exe + rm -f ../lib/lib$(MG5AMC_COMMONLIB).so + #------------------------------------------------------------------------------- diff --git a/epochX/cudacpp/gq_ttq.mad/Cards/delphes_trigger.dat b/epochX/cudacpp/gq_ttq.mad/Cards/delphes_trigger.dat new file mode 100644 index 0000000000..0aab0677aa --- /dev/null +++ b/epochX/cudacpp/gq_ttq.mad/Cards/delphes_trigger.dat @@ -0,0 +1,20 @@ +#TRIGGER CARD # DO NOT REMOVE THIS IS A TAG! + +# list of trigger algorithms +# trigger_name >> algorithm #comments +Inclusive electron >> ELEC1_PT: '29' +di-electron >> ELEC1_PT: '17' && ELEC2_PT: '17' +Inclusive Photon >> GAMMA1_PT: '80' +di-Photon >> GAMMA1_PT: '40' && GAMMA2_PT: '25' +Inclusive muon >> MUON1_PT: '19' +di-muon >> MUON1_PT: '7' && MUON2_PT: '7' +Taujet and ETmis >> TAU1_PT: '86' && ETMIS_PT: '65' +di-Taujets >> TAU1_PT: '59' && TAU2_PT: '59' +Jet and ETmis >> JET1_PT: '180' && ETMIS_PT: '123' +Taujet and electron >> TAU1_PT: '45' && ELEC1_PT: '19' +Taujet and muon >> TAU1_PT: '40' && ELEC1_PT: '15' +Inclusive b-jet >> Bjet1_PT: '237' +Inclusive 1 jet >> JET1_PT: '657' +Inclusive 3 jets >> JET1_PT: '247' && JET2_PT: '247' && JET3_PT: '247' +Inclusive 4 jets >> JET1_PT: '113' && JET2_PT: '113' && JET3_PT: '113' && JET4_PT: '113' + diff --git a/epochX/cudacpp/gq_ttq.mad/Cards/me5_configuration.txt b/epochX/cudacpp/gq_ttq.mad/Cards/me5_configuration.txt index 27acb12a1e..8a0c1e6345 100644 --- a/epochX/cudacpp/gq_ttq.mad/Cards/me5_configuration.txt +++ b/epochX/cudacpp/gq_ttq.mad/Cards/me5_configuration.txt @@ -234,7 +234,7 @@ # pineappl = pineappl -mg5_path = /data/stephan/madgraph4gpu/MG5aMC/mg5amcnlo +mg5_path = /afs/cern.ch/work/j/jteig/madgraph4gpu/MG5aMC/mg5amcnlo # MG5 MAIN DIRECTORY -mg5_path = /data/stephan/madgraph4gpu/MG5aMC/mg5amcnlo +mg5_path = /afs/cern.ch/work/j/jteig/madgraph4gpu/MG5aMC/mg5amcnlo diff --git a/epochX/cudacpp/gq_ttq.mad/Cards/plot_card.dat b/epochX/cudacpp/gq_ttq.mad/Cards/plot_card.dat new file mode 100644 index 0000000000..9abe1cc05e --- /dev/null +++ b/epochX/cudacpp/gq_ttq.mad/Cards/plot_card.dat @@ -0,0 +1,203 @@ +#************************************************************************** +# Card for MadAnalysis * +# * +# This file is used to set the classes and options for * +# the MadAnalysis program. * +# * +# * +# Some comments about the classes * +# 1. Plots are for classes of particles. * +# 2. Each particle is identified by its PDG code. * +# 3. Classes names are arbitrary (4 symbols max, no spaces allowed). * +# 4. Particles in the same class will be ordered with the 'ordering * +# function' in the file in_func.f. * +# 5. Classes can be added/edited/removed at will, and given a name * +# that will then appear in the plots. * +# 6. A particle can be put in one class only. Putting a particle in * +# two or more classes can lead to double counting of events. * +# 7. The class name mET is missing Energy and its name is reserved. * +# If used, it must be put last in the classes list below. * +# 8. If events contain particles not belonging to an existing class, * +# a new class will automatically be generated. * +# 9. For LHCO events the PDG code 21 is assigned to a jet (not * +# b-tagged), 5 to a b-tagged jet and 12 to missing ET. * +# * +# * +# Some comments about the cuts * +# 1. In the file kin_func.f the functions on which cuts can be applied * +# are given. * +# 2. The syntax is as follows. * +# etmin 1 3 30d0 * +# means that from the first class the Et of the first three particles * +# has to be greater than 30 GeV. * +# * +# etmissmin 20d0 * +# means that there must be at least 20 GeV of missing Et * +# * +# dRmin 2 1 4 3 3d0 * +# means that the distance between the first particle in the second * +# class and the first three particles in the fourth class has to be * +# greater than 3. * +# * +# ptmax 1 3 10d0 * +# ptmax 1 2 15d0 * +# means that the maximum pt of the third particle in the first class * +# has to smaller than 10 GeV, and the first two particles of this * +# class has to be smaller than 15 GeV * +# 3. The ordering of the particles within a class can be set with the * +# 'ordering function' in the file kin_func.f. * +# 4. For all the 'min' cuts, an event will be thrown away if the particle * +# does not exist. On the other hand, for all the 'max' cuts the cut * +# will be ignored if the particle does not exist * +# (Only dRij is an exception, for which it is the other way around) * +# * +# * +# * +# Some comments about the plotting options * +# 1. In the file kin_func.f the functions can be found that can be * +# plotted. (only for off-line usage) * +# 2. With the plotting options one can set the number of plots for each * +# of these functions. * +# 3. One has to specify for each variable which particles from which * +# class are used to set the plots. Syntax: * +# et 2 4 * +# means that the transverse energy of the first four particles in the * +# second class will be plotted. * +# mij 1 3 * +# mij 2 2 * +# means that for the invariant mass plots the first three particles * +# from the first class and the first two from the second class will be * +# used to plot the invariant mass of two particles. (10 plots) * +# 4. The ordering of the particles in a class can be set with the * +# 'ordering_function'. pt, e and et are valid functions. (For off-line * +# users X1, X2 and X3 can also be used, if defined in kin_func.f.) * +# 5. Max number of plots is 200. * +# * +# * +#************************************************************************** +# Put here your list of classes +#************************************************************************** +# Do NOT put spaces before class names! +# Begin Classes # This is TAG. Do not modify this line +jet 1 -1 2 -2 3 -3 4 -4 21 # Class number 1 +b 5 -5 # Class number 2 +mET 12 -12 14 -14 16 -16 1000022 # Missing ET class, name is reserved +# End Classes # This is TAG. Do not modify this line +#************************************************************************** +ordering_function pt # orders particles in classes according to their pt +normalization xsec # histogram normalization, xsec or number (e.g. 1) +#************************************************************************** +# Put here list of minimum pt for the classes +#************************************************************************** +# Begin Minpts # This is TAG. Do not modify this line +#1 30 +#2 40 +#3 10 +# End Minpts # This is TAG. Do not modify this line +#************************************************************************** +# Cuts on plotted events +#************************************************************************** +# Modify the cuts and remove the pounds/hashes to apply those cuts +# Do NOT put spaces at the beginning of the following lines! +# Begin Cuts # This is TAG. Do not modify this line +#etmin 2 2 40d0 +#etmin 2 1 80d0 +#etmin 1 3 20d0 +#etmax 2 1 200d0 +#ptmin 3 1 0d0 +#etmissmin 20d0 +#etmissmax 80d0 +#etamax 1 1 1d0 +#etamax 2 1 2d0 +#etamin 2 2 1.5d0 +#etamin 2 1 2d0 +#mijmax 2 1 2 2 200d0 +#mijmin 2 1 2 2 100d0 +#X1min 2 1 40d0 +#X1max 2 2 50d0 +#dRijmin 2 1 2 2 0.7d0 +#dRijmax 1 3 2 2 0.7d0 +#XY1min 2 2 2 2 20d0 +#XYZA2max 2 2 2 2 4 1 5 1 40d0 +# End Cuts # This is TAG. Do not modify this line +#************************************************************************** +# Put here the required plots +#************************************************************************** +# Do NOT put spaces at the beginning of the following lines! +# Begin PlotDefs # This is TAG. Do not modify this line +pt 1 4 # plot pt for the first four particles in class 1 +pt 2 4 # plot pt for the first four particles in class 2 +pt 3 4 # plot pt for the first four particles in class 3 +pt 4 4 # plot pt for the first four particles in class 4 +pt 5 4 # etc. +pt 6 4 +pt 7 4 +#e 2 2 +y 1 4 # plot rapidity for the first four particles in class 1 +y 2 4 +y 3 4 +y 4 4 +y 5 4 +y 6 4 +y 7 4 +#eta 2 2 # plot pseudo-rapidity for the first two part in the 2nd class +#mom 4 1 +#costh 5 1 +#phi 2 2 +#delta_eta 2 2 +#delta_eta 4 1 +mij 1 4 # use the first four particles in the 1st class to plot inv. mass +mij 2 2 # use the first two particles from the second class as well +mij 3 1 # etc. +mij 4 1 +mij 5 1 +mij 6 1 +mij 7 1 +#cosij 1 2 +#cosij 2 2 +#cosij 3 1 +#cosij 4 1 +dRij 1 4 +dRij 2 2 +dRij 3 1 +dRij 4 1 +dRij 5 1 +dRij 6 1 +dRij 7 1 +#delta_phi 2 2 +#delta_phi 4 1 +#delta_phi 5 1 +#X1 2 2 # plot X1 (defined in kin_func.f) +#XYZA1 2 2 +#XYZA1 4 1 +#XYZA1 5 1 +# End PlotDefs # This is TAG. Do not modify this line +#************************************************************************** +#************************************************************************** +# Put here the plot ranges +#************************************************************************** +# Do NOT put spaces at the beginning of the following lines! +# Begin PlotRange # This is TAG. Do not modify this line +pt 10 0 500 # bin size, min value, max value +et 10 0 500 # bin size, min value, max value +etmiss 10 0 500 # bin size, min value, max value +ht 20 0 1500 +y 0.2 -5 5 # etc. +mij 20 0 1500 +dRij 0.1 0 5 +#delta_phi 0.1 0 3.1 +#X1 1 0 100 +#XYZA1 1 0 100 +# End PlotRange # This is TAG. Do not modify this line +#************************************************************************** +#************************************************************************** +# Output for plots +#************************************************************************** +# Do NOT put spaces at the beginning of the following lines! +# Begin PlotOutput # This is TAG. Do not modify this line +output topdrawer # set to topdrawer or gnuplot +plot_decayed no # plot (and cut) dec. res.? (Only for LHE events) +# End PlotOutput # This is TAG. Do not modify this line +#************************************************************************** +# +# diff --git a/epochX/cudacpp/gq_ttq.mad/Cards/run_card.dat b/epochX/cudacpp/gq_ttq.mad/Cards/run_card.dat index 69e6fa2bf2..4c99f39248 100644 --- a/epochX/cudacpp/gq_ttq.mad/Cards/run_card.dat +++ b/epochX/cudacpp/gq_ttq.mad/Cards/run_card.dat @@ -144,13 +144,3 @@ # systematics = systematics_program ! none, systematics [python], SysCalc [depreceted, C++] ['--mur=0.5,1,2', '--muf=0.5,1,2', '--pdf=errorset'] = systematics_arguments ! see: https://cp3.irmp.ucl.ac.be/projects/madgraph/wiki/Systematics#Systematicspythonmodule - -#********************************************************************* -# Options for the cudacpp plugin -#********************************************************************* - -# Set cudacpp-specific values of non-cudacpp-specific options --O3 -ffast-math -fbounds-check = global_flag ! build flags for Fortran code (for a fair comparison to cudacpp) - -# New cudacpp-specific options (default values are defined in banner.py) -CPP = cudacpp_backend ! valid backends are FORTRAN, CPP, CUDA diff --git a/epochX/cudacpp/gq_ttq.mad/Source/DHELAS/aloha_file.inc b/epochX/cudacpp/gq_ttq.mad/Source/DHELAS/aloha_file.inc index dccc9da9d2..17f6a8b497 100644 --- a/epochX/cudacpp/gq_ttq.mad/Source/DHELAS/aloha_file.inc +++ b/epochX/cudacpp/gq_ttq.mad/Source/DHELAS/aloha_file.inc @@ -1 +1 @@ -ALOHARoutine = FFV1P0_3.o FFV1_0.o FFV1_1.o FFV1_2.o VVV1_0.o +ALOHARoutine = FFV1_0.o FFV1_1.o FFV1_2.o FFV1P0_3.o VVV1_0.o diff --git a/epochX/cudacpp/gq_ttq.mad/Source/PDF/pdfwrap_lhapdf.f b/epochX/cudacpp/gq_ttq.mad/Source/PDF/pdfwrap_lhapdf.f index 0be926e6cd..3f36905346 100644 --- a/epochX/cudacpp/gq_ttq.mad/Source/PDF/pdfwrap_lhapdf.f +++ b/epochX/cudacpp/gq_ttq.mad/Source/PDF/pdfwrap_lhapdf.f @@ -5,6 +5,7 @@ SUBROUTINE PDFWRAP C INCLUDE 'pdf.inc' INCLUDE '../alfas.inc' + INCLUDE '../vector.inc' INCLUDE '../coupl.inc' REAL*8 ZMASS DATA ZMASS/91.188D0/ diff --git a/epochX/cudacpp/gq_ttq.mad/Source/make_opts b/epochX/cudacpp/gq_ttq.mad/Source/make_opts index bd3c24228d..2607530b78 100644 --- a/epochX/cudacpp/gq_ttq.mad/Source/make_opts +++ b/epochX/cudacpp/gq_ttq.mad/Source/make_opts @@ -1,17 +1,11 @@ -pdlabel1= -pdlabel2= -lhapdf= -PYTHIA8_PATH=NotInstalled -MG5AMC_VERSION=3.5.0_lo_vect -GLOBAL_FLAG=-O3 -ffast-math -fbounds-check -ALOHA_FLAG= -MATRIX_FLAG= DEFAULT_CPP_COMPILER=g++ MACFLAG= STDLIB=-lstdc++ STDLIB_FLAG= DEFAULT_F_COMPILER=gfortran -DEFAULT_F2PY_COMPILER=f2py3 +DEFAULT_F2PY_COMPILER=f2py3.9 +MG5AMC_VERSION=SpecifiedByMG5aMCAtRunTime +PYTHIA8_PATH=NotInstalled #end_of_make_opts_variables BIASLIBDIR=../../../lib/ diff --git a/epochX/cudacpp/gq_ttq.mad/Source/makefile b/epochX/cudacpp/gq_ttq.mad/Source/makefile index dbe08b846e..00c73099a0 100644 --- a/epochX/cudacpp/gq_ttq.mad/Source/makefile +++ b/epochX/cudacpp/gq_ttq.mad/Source/makefile @@ -136,5 +136,7 @@ cleanSource: clean: cleanSource for i in `ls -d ../SubProcesses/P*`; do cd $$i; make clean; cd -; done; -cleanall: cleanSource +cleanavx: + for i in `ls -d ../SubProcesses/P*`; do cd $$i; make cleanavxs; cd -; done; +cleanall: cleanSource # THIS IS THE ONE for i in `ls -d ../SubProcesses/P*`; do cd $$i; make cleanavxs; cd -; done; diff --git a/epochX/cudacpp/gq_ttq.mad/SubProcesses/MatrixElementKernels.cc b/epochX/cudacpp/gq_ttq.mad/SubProcesses/MatrixElementKernels.cc index 30257195b6..cfed7d2af5 100644 --- a/epochX/cudacpp/gq_ttq.mad/SubProcesses/MatrixElementKernels.cc +++ b/epochX/cudacpp/gq_ttq.mad/SubProcesses/MatrixElementKernels.cc @@ -112,10 +112,17 @@ namespace mg5amcCpu // See https://community.arm.com/arm-community-blogs/b/operating-systems-blog/posts/runtime-detection-of-cpu-features-on-an-armv8-a-cpu bool ok = true; // this is just an assumption! const std::string tag = "arm neon (128bit as in SSE4.2)"; -#else +#elif defined(__x86_64__) || defined(__i386__) bool known = true; bool ok = __builtin_cpu_supports( "sse4.2" ); const std::string tag = "nehalem (SSE4.2)"; +#else + bool known = false; // __builtin_cpu_supports is not supported + // See https://gcc.gnu.org/onlinedocs/gcc/Basic-PowerPC-Built-in-Functions-Available-on-all-Configurations.html + // See https://stackoverflow.com/q/62783908 + // See https://community.arm.com/arm-community-blogs/b/operating-systems-blog/posts/runtime-detection-of-cpu-features-on-an-armv8-a-cpu + bool ok = true; // this is just an assumption! + const std::string tag = "arm neon (128bit as in SSE4.2)"; #endif #else bool known = true; diff --git a/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gu_ttxu/CPPProcess.cc b/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gu_ttxu/CPPProcess.cc index 47666e308a..641d230037 100644 --- a/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gu_ttxu/CPPProcess.cc +++ b/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gu_ttxu/CPPProcess.cc @@ -243,26 +243,19 @@ namespace mg5amcCpu // Wavefunction(s) for diagram number 1 vxxxxx( momenta, 0., cHel[ihel][0], -1, w_fp[0], 0 ); -#if not( defined __CUDACC__ and defined MGONGPU_TEST_DIVERGENCE ) - imzxxx( momenta, cHel[ihel][1], +1, w_fp[1], 1 ); // NB: imzxxx only uses pz -#else - if( ( blockDim.x * blockIdx.x + threadIdx.x ) % 2 == 0 ) - imzxxx( momenta, cHel[ihel][1], +1, w_fp[1], 1 ); // NB: imzxxx only uses pz - else - ixxxxx( momenta, 0, cHel[ihel][1], +1, w_fp[1], 1 ); -#endif + ixxxxx( momenta, 0., cHel[ihel][1], +1, w_fp[1], 1 ); oxxxxx( momenta, cIPD[0], cHel[ihel][2], +1, w_fp[2], 2 ); ixxxxx( momenta, cIPD[0], cHel[ihel][3], -1, w_fp[3], 3 ); - oxzxxx( momenta, cHel[ihel][4], +1, w_fp[4], 4 ); + oxxxxx( momenta, 0., cHel[ihel][4], +1, w_fp[4], 4 ); - FFV1_2( w_fp[1], w_fp[0], COUPs[0], 0., 0., w_fp[5] ); - FFV1P0_3( w_fp[3], w_fp[2], COUPs[0], 0., 0., w_fp[6] ); + FFV1_2( w_fp[1], w_fp[0], COUPs[0], 1.0, 0., 0., w_fp[5] ); + FFV1P0_3( w_fp[3], w_fp[2], COUPs[0], 1.0, 0., 0., w_fp[6] ); // Amplitude(s) for diagram number 1 - FFV1_0( w_fp[5], w_fp[4], w_fp[6], COUPs[0], &_fp[0] ); + FFV1_0( w_fp[5], w_fp[4], w_fp[6], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -273,11 +266,11 @@ namespace mg5amcCpu // *** DIAGRAM 2 OF 5 *** // Wavefunction(s) for diagram number 2 - FFV1_1( w_fp[2], w_fp[0], COUPs[0], cIPD[0], cIPD[1], w_fp[5] ); - FFV1P0_3( w_fp[1], w_fp[4], COUPs[0], 0., 0., w_fp[7] ); + FFV1_1( w_fp[2], w_fp[0], COUPs[0], 1.0, cIPD[0], cIPD[1], w_fp[5] ); + FFV1P0_3( w_fp[1], w_fp[4], COUPs[0], 1.0, 0., 0., w_fp[7] ); // Amplitude(s) for diagram number 2 - FFV1_0( w_fp[3], w_fp[5], w_fp[7], COUPs[0], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[5], w_fp[7], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 2 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -288,10 +281,10 @@ namespace mg5amcCpu // *** DIAGRAM 3 OF 5 *** // Wavefunction(s) for diagram number 3 - FFV1_2( w_fp[3], w_fp[0], COUPs[0], cIPD[0], cIPD[1], w_fp[5] ); + FFV1_2( w_fp[3], w_fp[0], COUPs[0], 1.0, cIPD[0], cIPD[1], w_fp[5] ); // Amplitude(s) for diagram number 3 - FFV1_0( w_fp[5], w_fp[2], w_fp[7], COUPs[0], &_fp[0] ); + FFV1_0( w_fp[5], w_fp[2], w_fp[7], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 3 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -302,10 +295,10 @@ namespace mg5amcCpu // *** DIAGRAM 4 OF 5 *** // Wavefunction(s) for diagram number 4 - FFV1_1( w_fp[4], w_fp[0], COUPs[0], 0., 0., w_fp[5] ); + FFV1_1( w_fp[4], w_fp[0], COUPs[0], 1.0, 0., 0., w_fp[5] ); // Amplitude(s) for diagram number 4 - FFV1_0( w_fp[1], w_fp[5], w_fp[6], COUPs[0], &_fp[0] ); + FFV1_0( w_fp[1], w_fp[5], w_fp[6], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 4 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -319,7 +312,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 5 - VVV1_0( w_fp[0], w_fp[7], w_fp[6], COUPs[1], &_fp[0] ); + VVV1_0( w_fp[0], w_fp[7], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 5 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -863,8 +856,7 @@ namespace mg5amcCpu { // nprocesses>1 was last observed for "mirror processes" in uux_ttx in the 270 branch (see issue #343 and PRs #360 and #396) constexpr int nprocesses = 1; - static_assert( nprocesses == 1, "Assume nprocesses == 1" ); - // process_id corresponds to the index of DSIG1 Fortran functions (must be 1 because cudacpp is unable to handle DSIG2) + static_assert( nprocesses == 1 || nprocesses == 2, "Assume nprocesses == 1 or 2" ); constexpr int process_id = 1; // code generation source: madevent + cudacpp exporter static_assert( process_id == 1, "Assume process_id == 1" ); } diff --git a/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gu_ttxu/auto_dsig1.f b/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gu_ttxu/auto_dsig1.f index ca1b7c1dc5..81ab70f6d1 100644 --- a/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gu_ttxu/auto_dsig1.f +++ b/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gu_ttxu/auto_dsig1.f @@ -42,6 +42,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C LOCAL VARIABLES C INTEGER I,ITYPE,LP,IPROC + DOUBLE PRECISION QSCALE DOUBLE PRECISION G1 DOUBLE PRECISION D2,U2,S2,C2 DOUBLE PRECISION XPQ(-7:7),PD(0:MAXPROC) @@ -129,14 +130,27 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) IF (ABS(LPP(IB(1))).GE.1) THEN !LP=SIGN(1,LPP(IB(1))) - G1=PDG2PDF(LPP(IB(1)),0, IB(1),XBK(IB(1)),DSQRT(Q2FACT(IB(1)))) + IF (DSQRT(Q2FACT(IB(1))).EQ.0D0) THEN + QSCALE=0D0 + DO I=3,NEXTERNAL + QSCALE=QSCALE+DSQRT(MAX(0D0,(PP(0,I)+PP(3,I))*(PP(0,I) + $ -PP(3,I)))) + ENDDO + QSCALE=QSCALE/2D0 + ELSE + QSCALE=DSQRT(Q2FACT(IB(1))) + ENDIF + G1=PDG2PDF(LPP(IB(1)),0, IB(1),XBK(IB(1)), QSCALE) ENDIF IF (ABS(LPP(IB(2))).GE.1) THEN !LP=SIGN(1,LPP(IB(2))) - D2=PDG2PDF(LPP(IB(2)),1, IB(2),XBK(IB(2)),DSQRT(Q2FACT(IB(2)))) - U2=PDG2PDF(LPP(IB(2)),2, IB(2),XBK(IB(2)),DSQRT(Q2FACT(IB(2)))) - S2=PDG2PDF(LPP(IB(2)),3, IB(2),XBK(IB(2)),DSQRT(Q2FACT(IB(2)))) - C2=PDG2PDF(LPP(IB(2)),4, IB(2),XBK(IB(2)),DSQRT(Q2FACT(IB(2)))) + IF (DSQRT(Q2FACT(IB(2))).NE.0D0) THEN + QSCALE=DSQRT(Q2FACT(IB(2))) + ENDIF + D2=PDG2PDF(LPP(IB(2)),1, IB(2),XBK(IB(2)), QSCALE) + U2=PDG2PDF(LPP(IB(2)),2, IB(2),XBK(IB(2)), QSCALE) + S2=PDG2PDF(LPP(IB(2)),3, IB(2),XBK(IB(2)), QSCALE) + C2=PDG2PDF(LPP(IB(2)),4, IB(2),XBK(IB(2)), QSCALE) ENDIF PD(0) = 0D0 IPROC = 0 diff --git a/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gux_ttxux/CPPProcess.cc b/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gux_ttxux/CPPProcess.cc index 04a5cc423c..97f543efe3 100644 --- a/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gux_ttxux/CPPProcess.cc +++ b/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gux_ttxux/CPPProcess.cc @@ -243,19 +243,19 @@ namespace mg5amcCpu // Wavefunction(s) for diagram number 1 vxxxxx( momenta, 0., cHel[ihel][0], -1, w_fp[0], 0 ); - omzxxx( momenta, cHel[ihel][1], -1, w_fp[1], 1 ); // NB: omzxxx only uses pz + oxxxxx( momenta, 0., cHel[ihel][1], -1, w_fp[1], 1 ); oxxxxx( momenta, cIPD[0], cHel[ihel][2], +1, w_fp[2], 2 ); ixxxxx( momenta, cIPD[0], cHel[ihel][3], -1, w_fp[3], 3 ); - ixzxxx( momenta, cHel[ihel][4], -1, w_fp[4], 4 ); + ixxxxx( momenta, 0., cHel[ihel][4], -1, w_fp[4], 4 ); - FFV1_2( w_fp[4], w_fp[0], COUPs[0], 0., 0., w_fp[5] ); - FFV1P0_3( w_fp[3], w_fp[2], COUPs[0], 0., 0., w_fp[6] ); + FFV1_2( w_fp[4], w_fp[0], COUPs[0], 1.0, 0., 0., w_fp[5] ); + FFV1P0_3( w_fp[3], w_fp[2], COUPs[0], 1.0, 0., 0., w_fp[6] ); // Amplitude(s) for diagram number 1 - FFV1_0( w_fp[5], w_fp[1], w_fp[6], COUPs[0], &_fp[0] ); + FFV1_0( w_fp[5], w_fp[1], w_fp[6], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -266,11 +266,11 @@ namespace mg5amcCpu // *** DIAGRAM 2 OF 5 *** // Wavefunction(s) for diagram number 2 - FFV1_1( w_fp[2], w_fp[0], COUPs[0], cIPD[0], cIPD[1], w_fp[5] ); - FFV1P0_3( w_fp[4], w_fp[1], COUPs[0], 0., 0., w_fp[7] ); + FFV1_1( w_fp[2], w_fp[0], COUPs[0], 1.0, cIPD[0], cIPD[1], w_fp[5] ); + FFV1P0_3( w_fp[4], w_fp[1], COUPs[0], 1.0, 0., 0., w_fp[7] ); // Amplitude(s) for diagram number 2 - FFV1_0( w_fp[3], w_fp[5], w_fp[7], COUPs[0], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[5], w_fp[7], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 2 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -281,10 +281,10 @@ namespace mg5amcCpu // *** DIAGRAM 3 OF 5 *** // Wavefunction(s) for diagram number 3 - FFV1_2( w_fp[3], w_fp[0], COUPs[0], cIPD[0], cIPD[1], w_fp[5] ); + FFV1_2( w_fp[3], w_fp[0], COUPs[0], 1.0, cIPD[0], cIPD[1], w_fp[5] ); // Amplitude(s) for diagram number 3 - FFV1_0( w_fp[5], w_fp[2], w_fp[7], COUPs[0], &_fp[0] ); + FFV1_0( w_fp[5], w_fp[2], w_fp[7], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 3 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -295,10 +295,10 @@ namespace mg5amcCpu // *** DIAGRAM 4 OF 5 *** // Wavefunction(s) for diagram number 4 - FFV1_1( w_fp[1], w_fp[0], COUPs[0], 0., 0., w_fp[5] ); + FFV1_1( w_fp[1], w_fp[0], COUPs[0], 1.0, 0., 0., w_fp[5] ); // Amplitude(s) for diagram number 4 - FFV1_0( w_fp[4], w_fp[5], w_fp[6], COUPs[0], &_fp[0] ); + FFV1_0( w_fp[4], w_fp[5], w_fp[6], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 4 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -312,7 +312,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 5 - VVV1_0( w_fp[0], w_fp[7], w_fp[6], COUPs[1], &_fp[0] ); + VVV1_0( w_fp[0], w_fp[7], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 5 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -856,8 +856,7 @@ namespace mg5amcCpu { // nprocesses>1 was last observed for "mirror processes" in uux_ttx in the 270 branch (see issue #343 and PRs #360 and #396) constexpr int nprocesses = 1; - static_assert( nprocesses == 1, "Assume nprocesses == 1" ); - // process_id corresponds to the index of DSIG1 Fortran functions (must be 1 because cudacpp is unable to handle DSIG2) + static_assert( nprocesses == 1 || nprocesses == 2, "Assume nprocesses == 1 or 2" ); constexpr int process_id = 1; // code generation source: madevent + cudacpp exporter static_assert( process_id == 1, "Assume process_id == 1" ); } diff --git a/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gux_ttxux/auto_dsig1.f b/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gux_ttxux/auto_dsig1.f index 33e638e237..b58c5d70bd 100644 --- a/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gux_ttxux/auto_dsig1.f +++ b/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gux_ttxux/auto_dsig1.f @@ -42,6 +42,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C LOCAL VARIABLES C INTEGER I,ITYPE,LP,IPROC + DOUBLE PRECISION QSCALE DOUBLE PRECISION G1 DOUBLE PRECISION CX2,SX2,UX2,DX2 DOUBLE PRECISION XPQ(-7:7),PD(0:MAXPROC) @@ -129,18 +130,27 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) IF (ABS(LPP(IB(1))).GE.1) THEN !LP=SIGN(1,LPP(IB(1))) - G1=PDG2PDF(LPP(IB(1)),0, IB(1),XBK(IB(1)),DSQRT(Q2FACT(IB(1)))) + IF (DSQRT(Q2FACT(IB(1))).EQ.0D0) THEN + QSCALE=0D0 + DO I=3,NEXTERNAL + QSCALE=QSCALE+DSQRT(MAX(0D0,(PP(0,I)+PP(3,I))*(PP(0,I) + $ -PP(3,I)))) + ENDDO + QSCALE=QSCALE/2D0 + ELSE + QSCALE=DSQRT(Q2FACT(IB(1))) + ENDIF + G1=PDG2PDF(LPP(IB(1)),0, IB(1),XBK(IB(1)), QSCALE) ENDIF IF (ABS(LPP(IB(2))).GE.1) THEN !LP=SIGN(1,LPP(IB(2))) - CX2=PDG2PDF(LPP(IB(2)),-4, IB(2),XBK(IB(2)),DSQRT(Q2FACT(IB(2)) - $ )) - SX2=PDG2PDF(LPP(IB(2)),-3, IB(2),XBK(IB(2)),DSQRT(Q2FACT(IB(2)) - $ )) - UX2=PDG2PDF(LPP(IB(2)),-2, IB(2),XBK(IB(2)),DSQRT(Q2FACT(IB(2)) - $ )) - DX2=PDG2PDF(LPP(IB(2)),-1, IB(2),XBK(IB(2)),DSQRT(Q2FACT(IB(2)) - $ )) + IF (DSQRT(Q2FACT(IB(2))).NE.0D0) THEN + QSCALE=DSQRT(Q2FACT(IB(2))) + ENDIF + CX2=PDG2PDF(LPP(IB(2)),-4, IB(2),XBK(IB(2)), QSCALE) + SX2=PDG2PDF(LPP(IB(2)),-3, IB(2),XBK(IB(2)), QSCALE) + UX2=PDG2PDF(LPP(IB(2)),-2, IB(2),XBK(IB(2)), QSCALE) + DX2=PDG2PDF(LPP(IB(2)),-1, IB(2),XBK(IB(2)), QSCALE) ENDIF PD(0) = 0D0 IPROC = 0 diff --git a/epochX/cudacpp/gq_ttq.mad/SubProcesses/cudacpp.mk b/epochX/cudacpp/gq_ttq.mad/SubProcesses/cudacpp.mk index 43cee0977e..15669185ad 100644 --- a/epochX/cudacpp/gq_ttq.mad/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/gq_ttq.mad/SubProcesses/cudacpp.mk @@ -1,7 +1,7 @@ # Copyright (C) 2020-2023 CERN and UCLouvain. # Licensed under the GNU Lesser General Public License (version 3 or later). # Created by: S. Roiser (Feb 2020) for the MG5aMC CUDACPP plugin. -# Further modified by: O. Mattelaer, S. Roiser, A. Valassi (2020-2023) for the MG5aMC CUDACPP plugin. +# Further modified by: J. Teig, O. Mattelaer, S. Roiser, A. Valassi (2020-2023) for the MG5aMC CUDACPP plugin. #=== Determine the name of this makefile (https://ftp.gnu.org/old-gnu/Manuals/make-3.80/html_node/make_17.html) #=== NB: different names (e.g. cudacpp.mk and cudacpp_src.mk) are used in the Subprocess and src directories @@ -86,6 +86,14 @@ endif #------------------------------------------------------------------------------- +.DEFAULT_GOAL := usage + +# Target if user does not specify target +usage: + $(error Unknown target='$(MAKECMDGOALS)': only 'cppnone', 'cppsse4', 'cppavx2', 'cpp512y', 'cpp512z' and 'cuda' are supported!) + +#------------------------------------------------------------------------------- + #=== Configure the C++ compiler CXXFLAGS = $(OPTFLAGS) -std=c++17 $(INCFLAGS) -Wall -Wshadow -Wextra @@ -103,70 +111,73 @@ endif #------------------------------------------------------------------------------- -#=== Configure the CUDA compiler - -# If CXX is not a single word (example "clang++ --gcc-toolchain...") then disable CUDA builds (issue #505) -# This is because it is impossible to pass this to "CUFLAGS += -ccbin " below -ifneq ($(words $(subst ccache ,,$(CXX))),1) # allow at most "CXX=ccache " from outside - $(warning CUDA builds are not supported for multi-word CXX "$(CXX)") - override CUDA_HOME=disabled -endif - -# If CUDA_HOME is not set, try to set it from the location of nvcc -ifndef CUDA_HOME - CUDA_HOME = $(patsubst %bin/nvcc,%,$(shell which nvcc 2>/dev/null)) - $(warning CUDA_HOME was not set: using "$(CUDA_HOME)") -endif - -# Set NVCC as $(CUDA_HOME)/bin/nvcc if it exists -ifneq ($(wildcard $(CUDA_HOME)/bin/nvcc),) - NVCC = $(CUDA_HOME)/bin/nvcc - USE_NVTX ?=-DUSE_NVTX - # See https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html - # See https://arnon.dk/matching-sm-architectures-arch-and-gencode-for-various-nvidia-cards/ - # Default: use compute capability 70 for V100 (CERN lxbatch, CERN itscrd, Juwels Cluster). - # Embed device code for 70, and PTX for 70+. - # Export MADGRAPH_CUDA_ARCHITECTURE (comma-separated list) to use another value or list of values (see #533). - # Examples: use 60 for P100 (Piz Daint), 80 for A100 (Juwels Booster, NVidia raplab/Curiosity). - MADGRAPH_CUDA_ARCHITECTURE ?= 70 - ###CUARCHFLAGS = -gencode arch=compute_$(MADGRAPH_CUDA_ARCHITECTURE),code=compute_$(MADGRAPH_CUDA_ARCHITECTURE) -gencode arch=compute_$(MADGRAPH_CUDA_ARCHITECTURE),code=sm_$(MADGRAPH_CUDA_ARCHITECTURE) # Older implementation (AV): go back to this one for multi-GPU support #533 - ###CUARCHFLAGS = --gpu-architecture=compute_$(MADGRAPH_CUDA_ARCHITECTURE) --gpu-code=sm_$(MADGRAPH_CUDA_ARCHITECTURE),compute_$(MADGRAPH_CUDA_ARCHITECTURE) # Newer implementation (SH): cannot use this as-is for multi-GPU support #533 - comma:=, - CUARCHFLAGS = $(foreach arch,$(subst $(comma), ,$(MADGRAPH_CUDA_ARCHITECTURE)),-gencode arch=compute_$(arch),code=compute_$(arch) -gencode arch=compute_$(arch),code=sm_$(arch)) - CUINC = -I$(CUDA_HOME)/include/ - CURANDLIBFLAGS = -L$(CUDA_HOME)/lib64/ -lcurand # NB: -lcuda is not needed here! - CUOPTFLAGS = -lineinfo - CUFLAGS = $(foreach opt, $(OPTFLAGS), -Xcompiler $(opt)) $(CUOPTFLAGS) $(INCFLAGS) $(CUINC) $(USE_NVTX) $(CUARCHFLAGS) -use_fast_math - ###CUFLAGS += -Xcompiler -Wall -Xcompiler -Wextra -Xcompiler -Wshadow - ###NVCC_VERSION = $(shell $(NVCC) --version | grep 'Cuda compilation tools' | cut -d' ' -f5 | cut -d, -f1) - CUFLAGS += -std=c++17 # need CUDA >= 11.2 (see #333): this is enforced in mgOnGpuConfig.h - # Without -maxrregcount: baseline throughput: 6.5E8 (16384 32 12) up to 7.3E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 160 # improves throughput: 6.9E8 (16384 32 12) up to 7.7E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 128 # improves throughput: 7.3E8 (16384 32 12) up to 7.6E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 96 # degrades throughput: 4.1E8 (16384 32 12) up to 4.5E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 64 # degrades throughput: 1.7E8 (16384 32 12) flat at 1.7E8 (65536 128 12) -else ifneq ($(origin REQUIRE_CUDA),undefined) - # If REQUIRE_CUDA is set but no cuda is found, stop here (e.g. for CI tests on GPU #443) - $(error No cuda installation found (set CUDA_HOME or make nvcc visible in PATH)) -else - # No cuda. Switch cuda compilation off and go to common random numbers in C++ - $(warning CUDA_HOME is not set or is invalid: export CUDA_HOME to compile with cuda) - override NVCC= - override USE_NVTX= - override CUINC= - override CURANDLIBFLAGS= -endif -export NVCC -export CUFLAGS +#=== Configure the CUDA compiler for the CUDA target -# Set the host C++ compiler for nvcc via "-ccbin " -# (NB issue #505: this must be a single word, "clang++ --gcc-toolchain..." is not supported) -CUFLAGS += -ccbin $(shell which $(subst ccache ,,$(CXX))) +ifneq (,$(findstring $(MAKECMDGOALS),cuda-gcheck-runGcheck-runFGcheck-cmpFGcheck-memcheck)) + # If CXX is not a single word (example "clang++ --gcc-toolchain...") then disable CUDA builds (issue #505) + # This is because it is impossible to pass this to "CUFLAGS += -ccbin " below + ifneq ($(words $(subst ccache ,,$(CXX))),1) # allow at most "CXX=ccache " from outside + $(warning CUDA builds are not supported for multi-word CXX "$(CXX)") + override CUDA_HOME=disabled + endif -# Allow newer (unsupported) C++ compilers with older versions of CUDA if ALLOW_UNSUPPORTED_COMPILER_IN_CUDA is set (#504) -ifneq ($(origin ALLOW_UNSUPPORTED_COMPILER_IN_CUDA),undefined) -CUFLAGS += -allow-unsupported-compiler -endif + # If CUDA_HOME is not set, try to set it from the location of nvcc + ifndef CUDA_HOME + CUDA_HOME = $(patsubst %bin/nvcc,%,$(shell which nvcc 2>/dev/null)) + $(warning CUDA_HOME was not set: using "$(CUDA_HOME)") + endif + + # Set NVCC as $(CUDA_HOME)/bin/nvcc if it exists + ifneq ($(wildcard $(CUDA_HOME)/bin/nvcc),) + NVCC = $(CUDA_HOME)/bin/nvcc + USE_NVTX ?=-DUSE_NVTX + # See https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html + # See https://arnon.dk/matching-sm-architectures-arch-and-gencode-for-various-nvidia-cards/ + # Default: use compute capability 70 for V100 (CERN lxbatch, CERN itscrd, Juwels Cluster). + # Embed device code for 70, and PTX for 70+. + # Export MADGRAPH_CUDA_ARCHITECTURE (comma-separated list) to use another value or list of values (see #533). + # Examples: use 60 for P100 (Piz Daint), 80 for A100 (Juwels Booster, NVidia raplab/Curiosity). + MADGRAPH_CUDA_ARCHITECTURE ?= 70 + ###CUARCHFLAGS = -gencode arch=compute_$(MADGRAPH_CUDA_ARCHITECTURE),code=compute_$(MADGRAPH_CUDA_ARCHITECTURE) -gencode arch=compute_$(MADGRAPH_CUDA_ARCHITECTURE),code=sm_$(MADGRAPH_CUDA_ARCHITECTURE) # Older implementation (AV): go back to this one for multi-GPU support #533 + ###CUARCHFLAGS = --gpu-architecture=compute_$(MADGRAPH_CUDA_ARCHITECTURE) --gpu-code=sm_$(MADGRAPH_CUDA_ARCHITECTURE),compute_$(MADGRAPH_CUDA_ARCHITECTURE) # Newer implementation (SH): cannot use this as-is for multi-GPU support #533 + comma:=, + CUARCHFLAGS = $(foreach arch,$(subst $(comma), ,$(MADGRAPH_CUDA_ARCHITECTURE)),-gencode arch=compute_$(arch),code=compute_$(arch) -gencode arch=compute_$(arch),code=sm_$(arch)) + CUINC = -I$(CUDA_HOME)/include/ + CURANDLIBFLAGS = -L$(CUDA_HOME)/lib64/ -lcurand # NB: -lcuda is not needed here! + CUOPTFLAGS = -lineinfo + CUFLAGS = $(foreach opt, $(OPTFLAGS), -Xcompiler $(opt)) $(CUOPTFLAGS) $(INCFLAGS) $(CUINC) $(USE_NVTX) $(CUARCHFLAGS) -use_fast_math + ###CUFLAGS += -Xcompiler -Wall -Xcompiler -Wextra -Xcompiler -Wshadow + ###NVCC_VERSION = $(shell $(NVCC) --version | grep 'Cuda compilation tools' | cut -d' ' -f5 | cut -d, -f1) + CUFLAGS += -std=c++17 # need CUDA >= 11.2 (see #333): this is enforced in mgOnGpuConfig.h + # Without -maxrregcount: baseline throughput: 6.5E8 (16384 32 12) up to 7.3E8 (65536 128 12) + ###CUFLAGS+= --maxrregcount 160 # improves throughput: 6.9E8 (16384 32 12) up to 7.7E8 (65536 128 12) + ###CUFLAGS+= --maxrregcount 128 # improves throughput: 7.3E8 (16384 32 12) up to 7.6E8 (65536 128 12) + ###CUFLAGS+= --maxrregcount 96 # degrades throughput: 4.1E8 (16384 32 12) up to 4.5E8 (65536 128 12) + ###CUFLAGS+= --maxrregcount 64 # degrades throughput: 1.7E8 (16384 32 12) flat at 1.7E8 (65536 128 12) + else ifneq ($(origin REQUIRE_CUDA),undefined) + # If REQUIRE_CUDA is set but no cuda is found, stop here (e.g. for CI tests on GPU #443) + $(error No cuda installation found (set CUDA_HOME or make nvcc visible in PATH)) + else + # No cuda. Switch cuda compilation off and go to common random numbers in C++ + $(warning CUDA_HOME is not set or is invalid: export CUDA_HOME to compile with cuda) + override NVCC= + override USE_NVTX= + override CUINC= + override CURANDLIBFLAGS= + endif + export NVCC + export CUFLAGS + + # Set the host C++ compiler for nvcc via "-ccbin " + # (NB issue #505: this must be a single word, "clang++ --gcc-toolchain..." is not supported) + CUFLAGS += -ccbin $(shell which $(subst ccache ,,$(CXX))) + + # Allow newer (unsupported) C++ compilers with older versions of CUDA if ALLOW_UNSUPPORTED_COMPILER_IN_CUDA is set (#504) + ifneq ($(origin ALLOW_UNSUPPORTED_COMPILER_IN_CUDA),undefined) + CUFLAGS += -allow-unsupported-compiler + endif + +endif # ($(MAKECMDGOALS),cuda) #------------------------------------------------------------------------------- @@ -226,32 +237,6 @@ override OMPFLAGS = -fopenmp ###override OMPFLAGS = # disable OpenMP MT (default before #575) endif -# Set the default AVX (vectorization) choice -ifeq ($(AVX),) - ifeq ($(UNAME_P),ppc64le) - ###override AVX = none - override AVX = sse4 - else ifeq ($(UNAME_P),arm) - ###override AVX = none - override AVX = sse4 - else ifeq ($(wildcard /proc/cpuinfo),) - override AVX = none - $(warning Using AVX='$(AVX)' because host SIMD features cannot be read from /proc/cpuinfo) - else ifeq ($(shell grep -m1 -c avx512vl /proc/cpuinfo)$(shell $(CXX) --version | grep ^clang),1) - override AVX = 512y - ###$(info Using AVX='$(AVX)' as no user input exists) - else - override AVX = avx2 - ifneq ($(shell grep -m1 -c avx512vl /proc/cpuinfo),1) - $(warning Using AVX='$(AVX)' because host does not support avx512vl) - else - $(warning Using AVX='$(AVX)' because this is faster than avx512vl for clang) - endif - endif -else - ###$(info Using AVX='$(AVX)' according to user input) -endif - # Set the default FPTYPE (floating point type) choice ifeq ($(FPTYPE),) override FPTYPE = d @@ -276,6 +261,21 @@ ifeq ($(RNDGEN),) endif endif +# set the correct AVX based on avxcpp target +ifeq ($(MAKECMDGOALS),cppnone) # no SIMD + override AVX = none +else ifeq ($(MAKECMDGOALS),cppsse4) # SSE4.2 with 128 width (xmm registers) + override AVX = sse4 +else ifeq ($(MAKECMDGOALS),cppavx2) # AVX2 with 256 width (ymm registers) [DEFAULT for clang] + override AVX = avx2 +else ifeq ($(MAKECMDGOALS),cpp512y) # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] + override AVX = 512y +else ifeq ($(MAKECMDGOALS),cpp512z) # AVX512 with 512 width (zmm registers) + override AVX = 512z +else + override AVX = none +endif + # Export AVX, FPTYPE, HELINL, HRDCOD, RNDGEN, OMPFLAGS so that it is not necessary to pass them to the src Makefile too export AVX export FPTYPE @@ -295,50 +295,52 @@ CXXFLAGS += $(OMPFLAGS) # Set the build flags appropriate to each AVX choice (example: "make AVX=none") # [NB MGONGPU_PVW512 is needed because "-mprefer-vector-width=256" is not exposed in a macro] # [See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96476] -$(info AVX=$(AVX)) -ifeq ($(UNAME_P),ppc64le) - ifeq ($(AVX),sse4) - override AVXFLAGS = -D__SSE4_2__ # Power9 VSX with 128 width (VSR registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on PowerPC for the moment) - endif -else ifeq ($(UNAME_P),arm) - ifeq ($(AVX),sse4) - override AVXFLAGS = -D__SSE4_2__ # ARM NEON with 128 width (Q/quadword registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on ARM for the moment) - endif -else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 - ifeq ($(AVX),none) - override AVXFLAGS = -mno-sse3 # no SIMD - else ifeq ($(AVX),sse4) - override AVXFLAGS = -mno-avx # SSE4.2 with 128 width (xmm registers) - else ifeq ($(AVX),avx2) - override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(AVX),512y) - override AVXFLAGS = -march=skylake -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(AVX),512z) - override AVXFLAGS = -march=skylake -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) - else - $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) - endif -else - ifeq ($(AVX),none) - override AVXFLAGS = -march=x86-64 # no SIMD (see #588) - else ifeq ($(AVX),sse4) - override AVXFLAGS = -march=nehalem # SSE4.2 with 128 width (xmm registers) - else ifeq ($(AVX),avx2) - override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(AVX),512y) - override AVXFLAGS = -march=skylake-avx512 -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(AVX),512z) - override AVXFLAGS = -march=skylake-avx512 -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) +ifeq ($(findstring cpp,$(MAKECMDGOALS)),cpp) + $(info AVX=$(AVX)) + ifeq ($(UNAME_P),ppc64le) + ifeq ($(AVX),sse4) + override AVXFLAGS = -D__SSE4_2__ # Power9 VSX with 128 width (VSR registers) + else ifneq ($(AVX),none) + $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on PowerPC for the moment) + endif + else ifeq ($(UNAME_P),arm) + ifeq ($(AVX),sse4) + override AVXFLAGS = -D__SSE4_2__ # ARM NEON with 128 width (Q/quadword registers) + else ifneq ($(AVX),none) + $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on ARM for the moment) + endif + else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 + ifeq ($(AVX),none) + override AVXFLAGS = -mno-sse3 # no SIMD + else ifeq ($(AVX),sse4) + override AVXFLAGS = -mno-avx # SSE4.2 with 128 width (xmm registers) + else ifeq ($(AVX),avx2) + override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] + else ifeq ($(AVX),512y) + override AVXFLAGS = -march=skylake -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] + else ifeq ($(AVX),512z) + override AVXFLAGS = -march=skylake -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) + else + $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) + endif else - $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) + ifeq ($(AVX),none) + override AVXFLAGS = -march=x86-64 # no SIMD (see #588) + else ifeq ($(AVX),sse4) + override AVXFLAGS = -march=nehalem # SSE4.2 with 128 width (xmm registers) + else ifeq ($(AVX),avx2) + override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] + else ifeq ($(AVX),512y) + override AVXFLAGS = -march=skylake-avx512 -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] + else ifeq ($(AVX),512z) + override AVXFLAGS = -march=skylake-avx512 -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) + else + $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) + endif endif + # For the moment, use AVXFLAGS everywhere: eventually, use them only in encapsulated implementations? + CXXFLAGS+= $(AVXFLAGS) endif -# For the moment, use AVXFLAGS everywhere: eventually, use them only in encapsulated implementations? -CXXFLAGS+= $(AVXFLAGS) # Set the build flags appropriate to each FPTYPE choice (example: "make FPTYPE=f") $(info FPTYPE=$(FPTYPE)) @@ -389,11 +391,19 @@ endif # Build directory "short" tag (defines target and path to the optional build directory) # (Rationale: keep directory names shorter, e.g. do not include random number generator choice) -override DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) +ifneq ($(NVCC),) + override DIRTAG = cuda_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) +else + override DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) +endif # Build lockfile "full" tag (defines full specification of build options that cannot be intermixed) # (Rationale: avoid mixing of CUDA and no-CUDA environment builds with different random number generators) -override TAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) +ifneq ($(NVCC),) + override TAG = cuda_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) +else + override TAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) +endif # Build directory: current directory by default, or build.$(DIRTAG) if USEBUILDDIR==1 ifeq ($(USEBUILDDIR),1) @@ -448,9 +458,9 @@ endif testmain=$(BUILDDIR)/runTest.exe ifneq ($(GTESTLIBS),) -all.$(TAG): $(BUILDDIR)/.build.$(TAG) $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_main) $(cxx_main) $(fcu_main) $(fcxx_main) $(testmain) +all.$(TAG): $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_main) $(cxx_main) $(fcu_main) $(fcxx_main) $(testmain) else -all.$(TAG): $(BUILDDIR)/.build.$(TAG) $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_main) $(cxx_main) $(fcu_main) $(fcxx_main) +all.$(TAG): $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_main) $(cxx_main) $(fcu_main) $(fcxx_main) endif # Target (and build options): debug @@ -460,27 +470,20 @@ debug: CUOPTFLAGS = -G debug: MAKEDEBUG := debug debug: all.$(TAG) -# Target: tag-specific build lockfiles -override oldtagsb=`if [ -d $(BUILDDIR) ]; then find $(BUILDDIR) -maxdepth 1 -name '.build.*' ! -name '.build.$(TAG)' -exec echo $(shell pwd)/{} \; ; fi` -$(BUILDDIR)/.build.$(TAG): - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - @if [ "$(oldtagsb)" != "" ]; then echo "Cannot build for tag=$(TAG) as old builds exist for other tags:"; echo " $(oldtagsb)"; echo "Please run 'make clean' first\nIf 'make clean' is not enough: run 'make clean USEBUILDDIR=1 AVX=$(AVX) FPTYPE=$(FPTYPE)' or 'make cleanall'"; exit 1; fi - @touch $(BUILDDIR)/.build.$(TAG) - # Generic target and build rules: objects from CUDA compilation ifneq ($(NVCC),) -$(BUILDDIR)/%.o : %.cu *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) +$(BUILDDIR)/%.o : %.cu *.h ../../src/*.h @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c $< -o $@ -$(BUILDDIR)/%_cu.o : %.cc *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) +$(BUILDDIR)/%_cu.o : %.cc *.h ../../src/*.h @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c -x cu $< -o $@ endif # Generic target and build rules: objects from C++ compilation # (NB do not include CUINC here! add it only for NVTX or curand #679) -$(BUILDDIR)/%.o : %.cc *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) +$(BUILDDIR)/%.o : %.cc *.h ../../src/*.h @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi $(CXX) $(CPPFLAGS) $(CXXFLAGS) -fPIC -c $< -o $@ @@ -532,7 +535,7 @@ endif # Target (and build rules): common (src) library commonlib : $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so -$(LIBDIR)/lib$(MG5AMC_COMMONLIB).so: ../../src/*.h ../../src/*.cc $(BUILDDIR)/.build.$(TAG) +$(LIBDIR)/lib$(MG5AMC_COMMONLIB).so: ../../src/*.h ../../src/*.cc $(MAKE) -C ../../src $(MAKEDEBUG) -f $(CUDACPP_SRC_MAKEFILE) #------------------------------------------------------------------------------- @@ -711,35 +714,27 @@ endif # Target: build all targets in all AVX modes (each AVX mode in a separate build directory) # Split the avxall target into five separate targets to allow parallel 'make -j avxall' builds # (Hack: add a fbridge.inc dependency to avxall, to ensure it is only copied once for all AVX modes) -avxnone: - @echo - $(MAKE) USEBUILDDIR=1 AVX=none -f $(CUDACPP_MAKEFILE) +cppnone: $(cxx_main) -avxsse4: - @echo - $(MAKE) USEBUILDDIR=1 AVX=sse4 -f $(CUDACPP_MAKEFILE) +cppsse4: $(cxx_main) -avxavx2: - @echo - $(MAKE) USEBUILDDIR=1 AVX=avx2 -f $(CUDACPP_MAKEFILE) +cppavx2: $(cxx_main) -avx512y: - @echo - $(MAKE) USEBUILDDIR=1 AVX=512y -f $(CUDACPP_MAKEFILE) +cpp512y: $(cxx_main) -avx512z: - @echo - $(MAKE) USEBUILDDIR=1 AVX=512z -f $(CUDACPP_MAKEFILE) +cpp512z: $(cxx_main) + +cuda: $(cu_main) ifeq ($(UNAME_P),ppc64le) ###avxall: $(INCDIR)/fbridge.inc avxnone avxsse4 -avxall: avxnone avxsse4 +cppall: cppnone cppsse4 else ifeq ($(UNAME_P),arm) ###avxall: $(INCDIR)/fbridge.inc avxnone avxsse4 -avxall: avxnone avxsse4 +cppall: cppnone cppsse4 else ###avxall: $(INCDIR)/fbridge.inc avxnone avxsse4 avxavx2 avx512y avx512z -avxall: avxnone avxsse4 avxavx2 avx512y avx512z +cppall: cppnone cppsse4 cppavx2 cpp512y cpp512z endif #------------------------------------------------------------------------------- @@ -747,21 +742,31 @@ endif # Target: clean the builds .PHONY: clean +BUILD_DIRS := $(wildcard build.*) +NUM_BUILD_DIRS := $(words $(BUILD_DIRS)) + clean: ifeq ($(USEBUILDDIR),1) - rm -rf $(BUILDDIR) +ifeq ($(NUM_BUILD_DIRS),1) + $(info USEBUILDDIR=1, Only one build directory found.) + rm -rf $(BUILD_DIRS) +else ifeq ($(NUM_BUILD_DIRS),0) + $(error USEBUILDDIR=1, but no build directories are found.) else - rm -f $(BUILDDIR)/.build.* $(BUILDDIR)/*.o $(BUILDDIR)/*.exe + $(error Multiple BUILDDIR's found! Use 'cleannone', 'cleansse4', 'cleanavx2', 'clean512y','clean512z', 'cleancuda' or 'cleanall'.) +endif +else + rm -f $(BUILDDIR)/*.o $(BUILDDIR)/*.exe rm -f $(LIBDIR)/lib$(MG5AMC_CXXLIB).so $(LIBDIR)/lib$(MG5AMC_CULIB).so endif $(MAKE) -C ../../src clean -f $(CUDACPP_SRC_MAKEFILE) -### rm -rf $(INCDIR) cleanall: @echo - $(MAKE) USEBUILDDIR=0 clean -f $(CUDACPP_MAKEFILE) + rm -f $(BUILDDIR)/*.o $(BUILDDIR)/*.exe + rm -f $(LIBDIR)/lib$(MG5AMC_CXXLIB).so $(LIBDIR)/lib$(MG5AMC_CULIB).so @echo - $(MAKE) USEBUILDDIR=0 -C ../../src cleanall -f $(CUDACPP_SRC_MAKEFILE) + $(MAKE) -C ../../src cleanall -f $(CUDACPP_SRC_MAKEFILE) rm -rf build.* # Target: clean the builds as well as the gtest installation(s) @@ -771,6 +776,42 @@ ifneq ($(wildcard $(TESTDIRCOMMON)),) endif $(MAKE) -C $(TESTDIRLOCAL) clean +# Target: clean different builds +cleannone: + rm -rf build.none_* + rm -f ../../lib/build.none_*/lib$(MG5AMC_CXXLIB).so + $(MAKE) -C ../../src cleannone -f $(CUDACPP_SRC_MAKEFILE) + +cleansse4: + rm -rf build.sse4_* + rm -f ../../lib/build.sse4_*/lib$(MG5AMC_CXXLIB).so + $(MAKE) -C ../../src cleansse4 -f $(CUDACPP_SRC_MAKEFILE) + +cleanavx2: + rm -rf build.avx2_* + rm -f ../../lib/build.avx2_*/lib$(MG5AMC_CXXLIB).so + $(MAKE) -C ../../src cleanavx2 -f $(CUDACPP_SRC_MAKEFILE) + +clean512y: + rm -rf build.512y_* + rm -f ../../lib/build.512y_*/lib$(MG5AMC_CXXLIB).so + $(MAKE) -C ../../src clean512y -f $(CUDACPP_SRC_MAKEFILE) + +clean512z: + rm -rf build.512z_* + rm -f ../../lib/build.512z_*/lib$(MG5AMC_CXXLIB).so + $(MAKE) -C ../../src clean512z -f $(CUDACPP_SRC_MAKEFILE) + +cleancuda: + rm -rf build.cuda_* + rm -f ../../lib/build.cuda_*/lib$(MG5AMC_CULIB).so + $(MAKE) -C ../../src cleancuda -f $(CUDACPP_SRC_MAKEFILE) + +cleandir: + rm -f ./*.o ./*.exe + rm -f ../../lib/lib$(MG5AMC_CXXLIB).so ../../lib/lib$(MG5AMC_CULIB).so + $(MAKE) -C ../../src cleandir -f $(CUDACPP_SRC_MAKEFILE) + #------------------------------------------------------------------------------- # Target: show system and compiler information @@ -817,13 +858,10 @@ endif #------------------------------------------------------------------------------- -# Target: check (run the C++ test executable) +# Target: check/gcheck (run the C++ test executable) # [NB THIS IS WHAT IS USED IN THE GITHUB CI!] -ifneq ($(NVCC),) -check: runTest cmpFcheck cmpFGcheck -else check: runTest cmpFcheck -endif +gcheck: runTest cmpFGcheck # Target: runTest (run the C++ test executable runTest.exe) runTest: all.$(TAG) @@ -863,4 +901,4 @@ cmpFGcheck: all.$(TAG) memcheck: all.$(TAG) $(RUNTIME) $(CUDA_HOME)/bin/cuda-memcheck --check-api-memory-access yes --check-deprecated-instr yes --check-device-heap yes --demangle full --language c --leak-check full --racecheck-report all --report-api-errors all --show-backtrace yes --tool memcheck --track-unused-memory yes $(BUILDDIR)/gcheck.exe -p 2 32 2 -#------------------------------------------------------------------------------- +#------------------------------------------------------------------------------- \ No newline at end of file diff --git a/epochX/cudacpp/gq_ttq.mad/SubProcesses/dummy_fct.f b/epochX/cudacpp/gq_ttq.mad/SubProcesses/dummy_fct.f index 076cf29d67..4f7a204b8f 100644 --- a/epochX/cudacpp/gq_ttq.mad/SubProcesses/dummy_fct.f +++ b/epochX/cudacpp/gq_ttq.mad/SubProcesses/dummy_fct.f @@ -32,7 +32,7 @@ logical FUNCTION dummy_cuts(P) LOGICAL IS_A_NU(NEXTERNAL),IS_HEAVY(NEXTERNAL) logical do_cuts(nexternal) COMMON /TO_SPECISA/IS_A_J,IS_A_A,IS_A_L,IS_A_B,IS_A_NU,IS_HEAVY, - . IS_A_ONIUM, do_cuts + & IS_A_ONIUM, do_cuts dummy_cuts=.true. @@ -118,15 +118,16 @@ double precision function user_dynamical_scale(P) C ************************************************************ -C default for the library implementing a dummt bias function +C default for the library implementing a dummy bias function C ************************************************************ subroutine bias_wgt_custom(p, original_weight, bias_weight) - implicit none + implicit none C C Parameters C include 'nexternal.inc' -C + +C C Arguments C double precision p(0:3, nexternal) @@ -161,3 +162,4 @@ subroutine bias_wgt_custom(p, original_weight, bias_weight) return end subroutine bias_wgt_custom + diff --git a/epochX/cudacpp/gq_ttq.mad/SubProcesses/makefile b/epochX/cudacpp/gq_ttq.mad/SubProcesses/makefile index 74db44d848..093bc84271 100644 --- a/epochX/cudacpp/gq_ttq.mad/SubProcesses/makefile +++ b/epochX/cudacpp/gq_ttq.mad/SubProcesses/makefile @@ -9,6 +9,33 @@ FFLAGS+= -cpp # Compile counters with -O3 as in the cudacpp makefile (avoid being "unfair" to Fortran #740) CXXFLAGS = -O3 -Wall -Wshadow -Wextra +# Sets correct target based on MAKECMDGOALS +ifeq ($(MAKECMDGOALS),) + TARGET := undefined +else + ifeq ($(shell grep -q madevent_ <<< $(MAKECMDGOALS)a),) + TARGET := $(word 2,($(subst _, ,$(MAKECMDGOALS)))) + else + TARGET := $(MAKECMDGOALS) + endif +endif + +# Sets correct cppavx target as dependency when compiling Fortran +ifeq ($(shell grep -q cpp <<< $(MAKECMDGOALS)a),) + ifeq ($(TARGET),cpp) + CPPTARGET := cppavx2 + else + CPPTARGET := $(TARGET) + endif +endif + +# Default goal +.DEFAULT_GOAL := usage + +# Target if user does not specify target +usage: + $(error Unknown target='$(TARGET)': only 'cppnone', 'cppsse4', 'cppavx2', 'cpp512y', 'cpp512z' and 'cuda' are supported!) + # Enable ccache if USECCACHE=1 ifeq ($(USECCACHE)$(shell echo $(CXX) | grep ccache),1) override CXX:=ccache $(CXX) @@ -48,10 +75,10 @@ CUDACPP_MAKEFILE=cudacpp.mk # NB2 Use '|&' in CUDACPP_BUILDDIR to avoid confusing errors about googletest #507 # NB3 Do not add a comment inlined "CUDACPP_BUILDDIR=$(shell ...) # comment" as otherwise a trailing space is included... # NB4 The variables relevant to the cudacpp Makefile must be explicitly passed to $(shell...) -CUDACPP_MAKEENV:=$(shell echo '$(.VARIABLES)' | tr " " "\n" | egrep "(USEBUILDDIR|AVX|FPTYPE|HELINL|HRDCOD)") +CUDACPP_MAKEENV:=$(shell echo '$(.VARIABLES)' | tr " " "\n" | egrep "(USEBUILDDIR|FPTYPE|HELINL|HRDCOD)") ###$(info CUDACPP_MAKEENV=$(CUDACPP_MAKEENV)) ###$(info $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))")) -CUDACPP_BUILDDIR:=$(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn |& awk '/Building/{print $$3}' | sed s/BUILDDIR=//) +CUDACPP_BUILDDIR:=$(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn $(TARGET) 2>/dev/null | awk '/Building/{print $$3}' | sed s/BUILDDIR=//) ifeq ($(CUDACPP_BUILDDIR),) $(error CUDACPP_BUILDDIR='$(CUDACPP_BUILDDIR)' should not be empty!) else @@ -89,7 +116,7 @@ SYMMETRY = symmetry.o idenparts.o # Binaries -LDFLAGS+=-Wl,--no-relax # avoid 'failed to convert GOTPCREL relocation' error #458 +#LDFLAGS+=-Wl,--no-relax # avoid 'failed to convert GOTPCREL relocation' error #458 (flag not universal -> skip?) all: $(PROG)_fortran $(CUDACPP_BUILDDIR)/$(PROG)_cpp # also builds $(PROG)_cuda if $(CUDACPP_CULIB) exists (#503) @@ -115,10 +142,6 @@ $(LIBS): .libs cd ../../Source; make touch $@ -$(CUDACPP_BUILDDIR)/.cudacpplibs: - $(MAKE) -f $(CUDACPP_MAKEFILE) - touch $@ - # On Linux, set rpath to LIBDIR to make it unnecessary to use LD_LIBRARY_PATH # Use relative paths with respect to the executables ($ORIGIN on Linux) # On Darwin, building libraries with absolute paths in LIBDIR makes this unnecessary @@ -130,26 +153,47 @@ else override LIBFLAGSRPATH = -Wl,-rpath,'$$ORIGIN/$(LIBDIR)' endif -.PHONY: madevent_fortran_link madevent_cuda_link madevent_cpp_link +.PHONY: madevent_fortran_link madevent_cuda_link madevent_cpp_link madevent_cppnone_link madevent_cppsse4_link madevent_cppavx2_link madevent_cpp512y_link madevent_cpp512z_link madevent_fortran_link: $(PROG)_fortran rm -f $(PROG) ln -s $(PROG)_fortran $(PROG) +# Only used for testing, should be removed in the future madevent_cpp_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp rm -f $(PROG) ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) +madevent_cppnone_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp + rm -f $(PROG) + ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) + +madevent_cppsse4_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp + rm -f $(PROG) + ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) + +madevent_cppavx2_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp + rm -f $(PROG) + ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) + +madevent_cpp512y_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp + rm -f $(PROG) + ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) + +madevent_cpp512z_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp + rm -f $(PROG) + ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) + madevent_cuda_link: $(CUDACPP_BUILDDIR)/$(PROG)_cuda rm -f $(PROG) ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cuda $(PROG) # Building $(PROG)_cpp also builds $(PROG)_cuda if $(CUDACPP_CULIB) exists (improved patch for cpp-only builds #503) -$(CUDACPP_BUILDDIR)/$(PROG)_cpp: $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(LIBS) $(MATRIX) counters.o ompnumthreads.o $(CUDACPP_BUILDDIR)/.cudacpplibs +$(CUDACPP_BUILDDIR)/$(PROG)_cpp: $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(LIBS) $(MATRIX) counters.o ompnumthreads.o $(CPPTARGET) $(FC) -o $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o -L$(LIBDIR)/$(CUDACPP_BUILDDIR) -l$(CUDACPP_COMMONLIB) -l$(CUDACPP_CXXLIB) $(LIBFLAGSRPATH) $(LDFLAGS) - if [ -f $(LIBDIR)/$(CUDACPP_BUILDDIR)/lib$(CUDACPP_CULIB).* ]; then $(FC) -o $(CUDACPP_BUILDDIR)/$(PROG)_cuda $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o -L$(LIBDIR)/$(CUDACPP_BUILDDIR) -l$(CUDACPP_COMMONLIB) -l$(CUDACPP_CULIB) $(LIBFLAGSRPATH) $(LDFLAGS); fi -$(CUDACPP_BUILDDIR)/$(PROG)_cuda: $(CUDACPP_BUILDDIR)/$(PROG)_cpp +$(CUDACPP_BUILDDIR)/$(PROG)_cuda: $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(LIBS) $(MATRIX) counters.o ompnumthreads.o cuda + $(FC) -o $(CUDACPP_BUILDDIR)/$(PROG)_cuda $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o -L$(LIBDIR)/$(CUDACPP_BUILDDIR) -l$(CUDACPP_COMMONLIB) -l$(CUDACPP_CULIB) $(LIBFLAGSRPATH) $(LDFLAGS) counters.o: counters.cc timer.h $(CXX) $(CXXFLAGS) -c $< -o $@ @@ -215,49 +259,105 @@ genps.o: .libs UNAME_P := $(shell uname -p) ifeq ($(UNAME_P),ppc64le) -avxall: avxnone avxsse4 +cppall: + $(MAKE) USEBUILDDIR=1 cppnone + $(MAKE) USEBUILDDIR=1 cppsse4 else ifeq ($(UNAME_P),arm) -avxall: avxnone avxsse4 +cppall: + $(MAKE) USEBUILDDIR=1 cppnone + $(MAKE) USEBUILDDIR=1 cppsse4 else -avxall: avxnone avxsse4 avxavx2 avx512y avx512z +cppall: + $(MAKE) USEBUILDDIR=1 cppnone + $(MAKE) USEBUILDDIR=1 cppsse4 + $(MAKE) USEBUILDDIR=1 cppavx2 + $(MAKE) USEBUILDDIR=1 cpp512y + $(MAKE) USEBUILDDIR=1 cpp512z endif -avxnone: $(PROG)_fortran $(DSIG_cudacpp) - @echo - $(MAKE) USEBUILDDIR=1 AVX=none +ALL: + $(MAKE) USEBUILDDIR=1 cppnone + $(MAKE) USEBUILDDIR=1 cppsse4 + $(MAKE) USEBUILDDIR=1 cppavx2 + $(MAKE) USEBUILDDIR=1 cpp512y + $(MAKE) USEBUILDDIR=1 cpp512z + $(MAKE) USEBUILDDIR=1 cuda -avxsse4: $(PROG)_fortran $(DSIG_cudacpp) - @echo - $(MAKE) USEBUILDDIR=1 AVX=sse4 +cppnone: + $(MAKE) -f $(CUDACPP_MAKEFILE) cppnone -avxavx2: $(PROG)_fortran $(DSIG_cudacpp) - @echo - $(MAKE) USEBUILDDIR=1 AVX=avx2 +cppsse4: + $(MAKE) -f $(CUDACPP_MAKEFILE) cppsse4 -avx512y: $(PROG)_fortran $(DSIG_cudacpp) - @echo - $(MAKE) USEBUILDDIR=1 AVX=512y +cppavx2: + $(MAKE) -f $(CUDACPP_MAKEFILE) cppavx2 -avx512z: $(PROG)_fortran $(DSIG_cudacpp) - @echo - $(MAKE) USEBUILDDIR=1 AVX=512z +cpp512y: + $(MAKE) -f $(CUDACPP_MAKEFILE) cpp512y -###endif +cpp512z: + $(MAKE) -f $(CUDACPP_MAKEFILE) cpp512z + +cuda: + $(MAKE) -f $(CUDACPP_MAKEFILE) cuda # Clean (NB: 'make clean' in Source calls 'make clean' in all P*) -clean: # Clean builds: fortran in this Pn; cudacpp executables for one AVX in this Pn - $(RM) *.o gensym $(PROG) $(PROG)_fortran $(PROG)_forhel $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(CUDACPP_BUILDDIR)/$(PROG)_cuda +BUILD_DIRS := $(wildcard build.*) +BUILD_TARGET_DIR := $(shell echo $(BUILD_DIRS) | awk -F '[._]' '{print $$2}') +NUM_BUILD_DIRS := $(words $(BUILD_DIRS)) + +clean: +ifeq ($(USEBUILDDIR),1) +ifeq ($(NUM_BUILD_DIRS),1) + $(info USEBUILDDIR=1, only cleaning build dir.) + $(RM) -r $(BUILD_DIRS) + $(MAKE) -f $(CUDACPP_MAKEFILE) clean$(BUILD_TARGET_DIR) +else ifeq ($(NUM_BUILD_DIRS),0) + $(error USEBUILDDIR=1, but no build directories are found.) +else + $(error Multiple BUILDDIR's found! Use 'cleannone', 'cleansse4', 'cleanavx2', 'clean512y','clean512z', 'cleancuda' or 'cleanall'.) +endif +else + $(info USEBUILDDIR=0 only cleaning build with no dir.) + $(RM) *.o gensym $(PROG) $(PROG)_fortran $(PROG)_forhel ./$(PROG)_* + $(MAKE) -f $(CUDACPP_MAKEFILE) cleandir + $(RM) $(CUDACPP_BUILDDIR)/.*libs +endif + +cleannone: # Clean builds: fortran in this Pn; cpp executables for one AVX in this Pn + $(RM) *.o gensym $(PROG) $(PROG)_fortran $(PROG)_forhel build.none_*/$(PROG)_cpp + $(MAKE) -f $(CUDACPP_MAKEFILE) cleannone + +cleansse4: # Clean build: fortran in this Pn; cpp executables for cppsse4 in this Pn + $(RM) *.o gensym $(PROG) $(PROG)_fortran $(PROG)_forhel build.sse4_*/$(PROG)_cpp + $(MAKE) -f $(CUDACPP_MAKEFILE) cleansse4 + +cleanavx2: # Clean build: fortran in this Pn; cpp executables for cppavx2 in this Pn + $(RM) *.o gensym $(PROG) $(PROG)_fortran $(PROG)_forhel build.avx2_*/$(PROG)_cpp + $(MAKE) -f $(CUDACPP_MAKEFILE) cleanavx2 + +clean512y: # Clean build: fortran in this Pn; cpp executables for cpp512y in this Pn + $(RM) *.o gensym $(PROG) $(PROG)_fortran $(PROG)_forhel build.512y_*/$(PROG)_cpp + $(MAKE) -f $(CUDACPP_MAKEFILE) clean512y + +clean512z: # Clean build: fortran in this Pn; cpp executables for cpp512z in this Pn + $(RM) *.o gensym $(PROG) $(PROG)_fortran $(PROG)_forhel build.512z_*/$(PROG)_cpp + $(MAKE) -f $(CUDACPP_MAKEFILE) clean512z + +cleancuda: # Clean build: fortran in this Pn; cuda executables in this Pn + $(RM) *.o gensym $(PROG) $(PROG)_fortran $(PROG)_forhel build.cuda_*/$(PROG)_cuda + $(MAKE) -f $(CUDACPP_MAKEFILE) cleancuda cleanavxs: clean # Clean builds: fortran in this Pn; cudacpp for all AVX in this Pn and in src $(MAKE) -f $(CUDACPP_MAKEFILE) cleanall - rm -f $(CUDACPP_BUILDDIR)/.cudacpplibs - rm -f .libs + $(RM) $(CUDACPP_BUILDDIR)/.*libs + $(RM) .libs cleanall: # Clean builds: fortran in all P* and in Source; cudacpp for all AVX in all P* and in src make -C ../../Source cleanall - rm -rf $(LIBDIR)libbias.$(libext) - rm -f ../../Source/*.mod ../../Source/*/*.mod + $(RM) -r $(LIBDIR)libbias.$(libext) + $(RM) ../../Source/*.mod ../../Source/*/*.mod distclean: cleanall # Clean all fortran and cudacpp builds as well as the googletest installation $(MAKE) -f $(CUDACPP_MAKEFILE) distclean diff --git a/epochX/cudacpp/gq_ttq.mad/bin/generate_events b/epochX/cudacpp/gq_ttq.mad/bin/generate_events index 107313b25d..5577cc66a0 100755 --- a/epochX/cudacpp/gq_ttq.mad/bin/generate_events +++ b/epochX/cudacpp/gq_ttq.mad/bin/generate_events @@ -46,7 +46,7 @@ if __debug__ and (not os.path.exists(pjoin(root_path,'../..', 'bin','create_rele sys.path.append(pjoin(root_path,'bin','internal')) import madevent_interface as ME - +import misc as misc import logging import logging.config @@ -160,17 +160,31 @@ if '__main__' == __name__: # Check that python version is valid set_configuration() - argument = sys.argv + argument = sys.argv + + # check for plugin customization of the launch command + launch_interface = ME.MadEventCmdShell + if os.path.exists(pjoin(root_path, 'bin','internal', 'launch_plugin.py')): + with misc.TMP_variable(sys, 'path', sys.path + [pjoin(root_path, 'bin', 'internal')]): + from importlib import reload + try: + reload('launch_plugin') + except Exception as error: + import launch_plugin + launch_interface = launch_plugin.MEINTERFACE + + + try: if '-h' in argument or '--help' in argument: - launch = ME.MadEventCmdShell(me_dir=root_path, force_run=True) + launch = launch_interface(me_dir=root_path, force_run=True) launch.exec_cmd('help generate_events') sys.exit() elif len(argument) > 1 and argument[1] in ['0', '1', '2']: argument = treat_old_argument(argument) with ME.MadEventCmdShell.RunWebHandling(root_path, ): - launch = ME.MadEventCmdShell(me_dir=root_path, force_run=True) + launch = launch_interface(me_dir=root_path, force_run=True) launch.run_cmd('generate_events %s' % ' '.join(argument[1:])) launch.run_cmd('quit') except ME.MadEventAlreadyRunning as message: diff --git a/epochX/cudacpp/gq_ttq.mad/bin/internal/banner.py b/epochX/cudacpp/gq_ttq.mad/bin/internal/banner.py index 7624b9f557..824815f47b 100755 --- a/epochX/cudacpp/gq_ttq.mad/bin/internal/banner.py +++ b/epochX/cudacpp/gq_ttq.mad/bin/internal/banner.py @@ -537,7 +537,7 @@ def charge_card(self, tag): self.param_card = param_card_reader.ParamCard(param_card) return self.param_card elif tag == 'mgruncard': - self.run_card = RunCard(self[tag]) + self.run_card = RunCard(self[tag], unknown_warning=False) return self.run_card elif tag == 'mg5proccard': proc_card = self[tag].split('\n') @@ -1002,13 +1002,14 @@ def __init__(self, finput=None, **opt): self.allowed_value = {} self.default_setup() + self.plugin_input(finput) # if input is define read that input if isinstance(finput, (file, str, StringIO.StringIO)): self.read(finput, **opt) - self.plugin_input(finput) + def plugin_input(self, finput=None): @@ -2624,6 +2625,7 @@ class RunCard(ConfigFile): default_include_file = 'run_card.inc' default_autodef_file = 'run.inc' donewarning = [] + include_as_parameter = [] def plugin_input(self, finput): @@ -2670,18 +2672,40 @@ def __new__(cls, finput=None, **opt): elif isinstance(finput, cls): target_class = finput.__class__ elif isinstance(finput, str): + path = finput if '\n' not in finput: finput = open(finput).read() if 'req_acc_FO' in finput: target_class = RunCardNLO else: target_class = RunCardLO + if MADEVENT and os.path.exists(pjoin(MEDIR, 'bin','internal', 'launch_plugin.py')): + with misc.TMP_variable(sys, 'path', sys.path + [pjoin(MEDIR, 'bin', 'internal')]): + from importlib import reload + try: + reload('launch_plugin') + except Exception as error: + import launch_plugin + target_class = launch_plugin.RunCard + elif not MADEVENT and os.path.exists(path.replace('run_card.dat', '../bin/internal/launch_plugin.py')): + misc.sprint('try to use plugin class') + pydir = path.replace('run_card.dat', '../bin/internal/') + with misc.TMP_variable(sys, 'path', sys.path + [pydir]): + from importlib import reload + try: + reload('launch_plugin') + except Exception as error: + import launch_plugin + target_class = launch_plugin.RunCard + else: return None target_class.fill_post_set_from_blocks() - - return super(RunCard, cls).__new__(target_class, finput, **opt) + out = super(RunCard, cls).__new__(target_class, finput, **opt) + if not isinstance(out, RunCard): #should not happen but in presence of missmatch of library loaded. + out.__init__(finput, **opt) + return out else: return super(RunCard, cls).__new__(cls, finput, **opt) @@ -2709,7 +2733,7 @@ def __init__(self, *args, **opts): self.system_default = {} self.display_block = [] # set some block to be displayed - + self.fct_mod = {} # {param: (fct_pointer, *argument, **opts)} self.cut_class = {} self.warned=False @@ -2746,7 +2770,7 @@ def get_lepton_densities(cls): def add_param(self, name, value, fortran_name=None, include=True, hidden=False, legacy=False, cut=False, system=False, sys_default=None, - autodef=False, + autodef=False, fct_mod=None, **opts): """ add a parameter to the card. value is the default value and defines the type (int/float/bool/str) of the input. @@ -2760,6 +2784,7 @@ def add_param(self, name, value, fortran_name=None, include=True, If a path (Source/PDF/pdf.inc) the definition will be added within that file Default is False (does not add the definition) entry added in the run_card will automatically have this on True. + fct_mod: defines a function to run if the parameter is modify in the include file options of **opts: - allowed: list of valid options. '*' means anything else should be allowed. empty list means anything possible as well. @@ -2784,8 +2809,12 @@ def add_param(self, name, value, fortran_name=None, include=True, if autodef: self.definition_path[autodef].append(name) self.user_set.add(name) + # function to trigger if a value is modified in the include file + # main target is action to force correct recompilation (like for compilation flag/...) + if fct_mod: + self.fct_mod[name] = fct_mod - def read(self, finput, consistency=True): + def read(self, finput, consistency=True, unknown_warning=True): """Read the input file, this can be a path to a file, a file object, a str with the content of the file.""" @@ -2793,6 +2822,7 @@ def read(self, finput, consistency=True): if "\n" in finput: finput = finput.split('\n') elif os.path.isfile(finput): + self.path = finput finput = open(finput) else: raise Exception("No such file %s" % finput) @@ -2807,7 +2837,7 @@ def read(self, finput, consistency=True): name = name.lower().strip() if name not in self: #looks like an entry added by a user -> add it nicely - self.add_unknown_entry(name, value) + self.add_unknown_entry(name, value, unknown_warning) else: self.set( name, value, user=True) # parameter not set in the run_card can be set to compatiblity value @@ -2819,7 +2849,7 @@ def read(self, finput, consistency=True): logger.warning(str(error)) else: raise - def add_unknown_entry(self, name, value): + def add_unknown_entry(self, name, value, unknow_warning): """function to add an entry to the run_card when the associated parameter does not exists. This is based on the guess_entry_fromname for the various syntax providing input. This then call add_param accordingly. @@ -2858,7 +2888,7 @@ def add_unknown_entry(self, name, value): raise Exception("dictionary need to have at least one entry") default['dict']['__type__'] = default[self.guess_type_from_value(default_value[0])] - if name not in RunCard.donewarning: + if name not in RunCard.donewarning and unknow_warning: logger.warning("Found unexpected entry in run_card: \"%s\" with value \"%s\".\n"+\ " The type was assigned to %s. \n"+\ " The definition of that variable will %sbe automatically added to fortran file %s\n"+\ @@ -2896,7 +2926,16 @@ def valid_line(self, line, tmp): return False else: return True - + + + def reset_simd(self, old_value, new_value, name, *args, **opts): + raise Exception('pass in reset simd') + + def make_clean(self,old_value, new_value, name, dir): + raise Exception('pass make clean for ', dir) + + def make_Ptouch(self,old_value, new_value, name, reset): + raise Exception('pass Ptouch for ', reset) def write(self, output_file, template=None, python_template=False, write_hidden=False, template_options=None, **opt): @@ -3071,6 +3110,77 @@ def write(self, output_file, template=None, python_template=False, else: output_file.write(text) + def get_last_value_include(self, output_dir): + """For paraeter in self.fct_mod + parse the associate inc file to get the value of the previous run. + We return a dictionary {name: old_value} + if inc file does not exist we will return the current value (i.e. set has no change) + """ + + #remember that + # default_include_file is a class variable + # self.includepath is on the form include_path : [list of param ] + out = {} + + # setup inc_to_parse to be like self.includepath (include_path : [list of param ]) + # BUT only containing the parameter that need to be tracked for the fct_mod option + inc_to_parse = {} + for inc_file, params in self.includepath.items(): + if not inc_file: + continue + if any(p in params for p in self.fct_mod): + inc_to_parse[inc_file] = [name for name in self.includepath[inc_file] if name in self.fct_mod] + + # now loop over the files and ask the associate function + for inc_file, params in inc_to_parse.items(): + if inc_file is True: + inc_file = self.default_include_file + out.update(self.get_value_from_include(inc_file, params, output_dir)) + + return out + + def get_value_from_include(self, path, list_of_params, output_dir): + """for a given include file return the current value of the requested parameter + return a dictionary {name: value} + if path does not exists return the current value in self for all parameter""" + + #WARNING DOES NOT HANDLE LIST/DICT so far + + # handle case where file is missing + if not os.path.exists(pjoin(output_dir,path)): + misc.sprint("include file not existing", pjoin(output_dir,path)) + out = {name: self[name] for name in list_of_params} + + with open(pjoin(output_dir,path), 'r') as fsock: + text = fsock.read() + + for name in list_of_params: + misc.sprint(name, name in self.fortran_name) + misc.sprint(self.fortran_name[name] if name in self.fortran_name[name] else name) + to_track = [self.fortran_name[name] if name in self.fortran_name else name for name in list_of_params] + pattern = re.compile(r"\(?(%(names)s)\s?=\s?([^)]*)\)?" % {'names':'|'.join(to_track)}, re.I) + out = dict(pattern.findall(text)) + misc.sprint(out) + for name in list_of_params: + if name in self.fortran_name: + value = out[self.fortran_name[name]] + del out[self.fortran_name[name]] + out[name] = value + + for name, value in out.items(): + try: + out[name] = self.format_variable(value, type(self[name])) + except Exception: + continue + + if len(out) != len(list_of_params): + misc.sprint(list_of_params) + misc.sprint(to_track) + misc.sprint(self.fortran_name) + misc.sprint(text) + raise Exception + return out + def get_default(self, name, default=None, log_level=None): """return self[name] if exist otherwise default. log control if we @@ -3361,71 +3471,93 @@ def write_include_file(self, output_dir, output_file=None): #ensusre that system only parameter are correctly set self.update_system_parameter_for_include() + value_in_old_include = self.get_last_value_include(output_dir) + + if output_dir: self.write_autodef(output_dir, output_file=None) # check/fix status of customised functions self.edit_dummy_fct_from_file(self["custom_fcts"], os.path.dirname(output_dir)) for incname in self.includepath: - if incname is True: - pathinc = self.default_include_file - elif incname is False: - continue - else: - pathinc = incname + self.write_one_include_file(output_dir, incname, output_file) + + for name,value in value_in_old_include.items(): + if value != self[name]: + self.fct_mod[name][0](value, self[name], name, *self.fct_mod[name][1],**self.fct_mod[name][2]) - if output_file: - fsock = output_file + def write_one_include_file(self, output_dir, incname, output_file=None): + """write one include file at the time""" + + misc.sprint(incname) + if incname is True: + pathinc = self.default_include_file + elif incname is False: + return + else: + pathinc = incname + + if output_file: + fsock = output_file + else: + fsock = file_writers.FortranWriter(pjoin(output_dir,pathinc+'.tmp')) + + + for key in self.includepath[incname]: + #define the fortran name + if key in self.fortran_name: + fortran_name = self.fortran_name[key] else: - fsock = file_writers.FortranWriter(pjoin(output_dir,pathinc+'.tmp')) - for key in self.includepath[incname]: - #define the fortran name - if key in self.fortran_name: - fortran_name = self.fortran_name[key] + fortran_name = key + + if incname in self.include_as_parameter: + fsock.writelines('INTEGER %s\n' % fortran_name) + #get the value with warning if the user didn't set it + value = self.get_default(key) + if hasattr(self, 'mod_inc_%s' % key): + value = getattr(self, 'mod_inc_%s' % key)(value) + # Special treatment for strings containing a list of + # strings. Convert it to a list of strings + if isinstance(value, list): + # in case of a list, add the length of the list as 0th + # element in fortran. Only in case of integer or float + # list (not for bool nor string) + targettype = self.list_parameter[key] + if targettype is bool: + pass + elif targettype is int: + line = '%s(%s) = %s \n' % (fortran_name, 0, self.f77_formatting(len(value))) + fsock.writelines(line) + elif targettype is float: + line = '%s(%s) = %s \n' % (fortran_name, 0, self.f77_formatting(float(len(value)))) + fsock.writelines(line) + # output the rest of the list in fortran + for i,v in enumerate(value): + line = '%s(%s) = %s \n' % (fortran_name, i+1, self.f77_formatting(v)) + fsock.writelines(line) + elif isinstance(value, dict): + for fortran_name, onevalue in value.items(): + line = '%s = %s \n' % (fortran_name, self.f77_formatting(onevalue)) + fsock.writelines(line) + elif isinstance(incname,str) and 'compile' in incname: + if incname in self.include_as_parameter: + line = 'PARAMETER (%s=%s)' %( fortran_name, value) else: - fortran_name = key - - #get the value with warning if the user didn't set it - value = self.get_default(key) - if hasattr(self, 'mod_inc_%s' % key): - value = getattr(self, 'mod_inc_%s' % key)(value) - # Special treatment for strings containing a list of - # strings. Convert it to a list of strings - if isinstance(value, list): - # in case of a list, add the length of the list as 0th - # element in fortran. Only in case of integer or float - # list (not for bool nor string) - targettype = self.list_parameter[key] - if targettype is bool: - pass - elif targettype is int: - line = '%s(%s) = %s \n' % (fortran_name, 0, self.f77_formatting(len(value))) - fsock.writelines(line) - elif targettype is float: - line = '%s(%s) = %s \n' % (fortran_name, 0, self.f77_formatting(float(len(value)))) - fsock.writelines(line) - # output the rest of the list in fortran - for i,v in enumerate(value): - line = '%s(%s) = %s \n' % (fortran_name, i+1, self.f77_formatting(v)) - fsock.writelines(line) - elif isinstance(value, dict): - for fortran_name, onevalue in value.items(): - line = '%s = %s \n' % (fortran_name, self.f77_formatting(onevalue)) - fsock.writelines(line) - elif isinstance(incname,str) and 'compile' in incname: line = '%s = %s \n' % (fortran_name, value) - fsock.write(line) + fsock.write(line) + else: + if incname in self.include_as_parameter: + line = 'PARAMETER (%s=%s)' %( fortran_name, self.f77_formatting(value)) else: line = '%s = %s \n' % (fortran_name, self.f77_formatting(value)) - fsock.writelines(line) - if not output_file: - fsock.close() - path = pjoin(output_dir,pathinc) - if not os.path.exists(path) or not filecmp.cmp(path, path+'.tmp'): - files.mv(path+'.tmp', path) - else: - os.remove(path+'.tmp') - + fsock.writelines(line) + if not output_file: + fsock.close() + path = pjoin(output_dir,pathinc) + if not os.path.exists(path) or not filecmp.cmp(path, path+'.tmp'): + files.mv(path+'.tmp', path) + else: + os.remove(path+'.tmp') def write_autodef(self, output_dir, output_file=None): """ Add the definition of variable to run.inc if the variable is set with autodef. @@ -3764,13 +3896,14 @@ def remove_all_cut(self): %(tmin_for_channel)s = tmin_for_channel ! limit the non-singular reach of --some-- channel of integration related to T-channel diagram (value between -1 and 0), -1 is no impact %(survey_splitting)s = survey_splitting ! for loop-induced control how many core are used at survey for the computation of a single iteration. %(survey_nchannel_per_job)s = survey_nchannel_per_job ! control how many Channel are integrated inside a single job on cluster/multicore - %(refine_evt_by_job)s = refine_evt_by_job ! control the maximal number of events for the first iteration of the refine (larger means less jobs) + %(refine_evt_by_job)s = refine_evt_by_job ! control the maximal number of events for the first iteration of the refine (larger means less jobs) #********************************************************************* -# Compilation flag. No automatic re-compilation (need manual "make clean" in Source) +# Compilation flag. #********************************************************************* %(global_flag)s = global_flag ! fortran optimization flag use for the all code. %(aloha_flag)s = aloha_flag ! fortran optimization flag for aloha function. Suggestions: '-ffast-math' %(matrix_flag)s = matrix_flag ! fortran optimization flag for matrix.f function. Suggestions: '-O3' + %(vector_size)s = vector_size ! size designed for SIMD/OpenMP/GPU (number of events in lockstep) """ template_off = '# To see advanced option for Phase-Space optimization: type "update psoptim"' @@ -3926,9 +4059,12 @@ class RunCardLO(RunCard): "get_dummy_x1_x2": pjoin("SubProcesses","dummy_fct.f"), "dummy_boostframe": pjoin("SubProcesses","dummy_fct.f"), "user_dynamical_scale": pjoin("SubProcesses","dummy_fct.f"), + "bias_wgt_custom": pjoin("SubProcesses","dummy_fct.f"), "user_": pjoin("SubProcesses","dummy_fct.f") # all function starting by user will be added to that file } + include_as_parameter = ['vector.inc'] + if MG5DIR: default_run_card = pjoin(MG5DIR, "internal", "default_run_card_lo.dat") @@ -4162,10 +4298,15 @@ def default_setup(self): self.add_param('hel_splitamp', True, hidden=True, include=False, comment='decide if amplitude aloha call can be splitted in two or not when doing helicity per helicity optimization.') self.add_param('hel_zeroamp', True, hidden=True, include=False, comment='decide if zero amplitude can be removed from the computation when doing helicity per helicity optimization.') self.add_param('SDE_strategy', 1, allowed=[1,2], fortran_name="sde_strat", comment="decide how Multi-channel should behaves \"1\" means full single diagram enhanced (hep-ph/0208156), \"2\" use the product of the denominator") - self.add_param('global_flag', '-O', include=False, hidden=True, comment='global fortran compilation flag, suggestion -fbound-check') - self.add_param('aloha_flag', '', include=False, hidden=True, comment='global fortran compilation flag, suggestion: -ffast-math') - self.add_param('matrix_flag', '', include=False, hidden=True, comment='fortran compilation flag for the matrix-element files, suggestion -O3') - + self.add_param('global_flag', '-O', include=False, hidden=True, comment='global fortran compilation flag, suggestion -fbound-check', + fct_mod=(self.make_clean, ('Source'),{})) + self.add_param('aloha_flag', '', include=False, hidden=True, comment='global fortran compilation flag, suggestion: -ffast-math', + fct_mod=(self.make_clean, ('Source/DHELAS'),{})) + self.add_param('matrix_flag', '', include=False, hidden=True, comment='fortran compilation flag for the matrix-element files, suggestion -O3', + fct_mod=(self.make_Ptouch, ('matrix'),{})) + self.add_param('vector_size', 1, include='vector.inc', hidden=True, comment='lockstep size for parralelism run', + fortran_name='VECSIZE_MEMMAX', fct_mod=(self.reset_simd,(),{})) + # parameter allowing to define simple cut via the pdg # Special syntax are related to those. (can not be edit directly) self.add_param('pt_min_pdg',{'__type__':0.}, include=False, cut=True) @@ -4187,8 +4328,7 @@ def default_setup(self): self.add_param('mxxmin4pdg',[-1.], system=True) self.add_param('mxxpart_antipart', [False], system=True) - # CUDACPP parameters - self.add_param('cudacpp_backend', 'CPP', include=False, hidden=False) + def check_validity(self): """ """ diff --git a/epochX/cudacpp/gq_ttq.mad/bin/internal/check_param_card.py b/epochX/cudacpp/gq_ttq.mad/bin/internal/check_param_card.py index fe874a06a4..71089d7480 100755 --- a/epochX/cudacpp/gq_ttq.mad/bin/internal/check_param_card.py +++ b/epochX/cudacpp/gq_ttq.mad/bin/internal/check_param_card.py @@ -85,7 +85,7 @@ def load_str(self, text): self.value= ' '.join(data[len(self.lhacode):]) # check that lhacode are the first entry otherwise return invalid param. if ' '.join([str(i) for i in self.lhacode]) != ' '.join(data[:len(self.lhacode)]): - raise InvalidParam + raise InvalidParam("line was %s" % str(data)) else: self.value = data[-1] diff --git a/epochX/cudacpp/gq_ttq.mad/bin/internal/common_run_interface.py b/epochX/cudacpp/gq_ttq.mad/bin/internal/common_run_interface.py index 5d0187e3fa..14c7f310dc 100755 --- a/epochX/cudacpp/gq_ttq.mad/bin/internal/common_run_interface.py +++ b/epochX/cudacpp/gq_ttq.mad/bin/internal/common_run_interface.py @@ -749,13 +749,15 @@ def writeRunWeb(me_dir): class RunWebHandling(object): - def __init__(self, me_dir, crashifpresent=True, warnifpresent=True): + def __init__(self, me_dir, crashifpresent=True, warnifpresent=True, force_run=False): """raise error if RunWeb already exists me_dir is the directory where the write RunWeb""" self.remove_run_web = True self.me_dir = me_dir - + if force_run: + self.remove_run_web = False + return if crashifpresent or warnifpresent: if os.path.exists(pjoin(me_dir, 'RunWeb')): pid = open(pjoin(me_dir, 'RunWeb')).read() @@ -6574,7 +6576,7 @@ def reask(self, *args, **opt): fail_due_to_format = 0 #parameter to avoid infinite loop def postcmd(self, stop, line): - if line not in [None, '0', 'done', '']: + if line not in [None, '0', 'done', '',0]: ending_question = cmd.OneLinePathCompletion.postcmd(self,stop,line) else: ending_question = True @@ -7533,7 +7535,8 @@ def open_file(self, answer): else: raise if time.time() - start < .5: - self.mother_interface.ask("Are you really that fast? If you are using an editor that returns directly. Please confirm that you have finised to edit the file", 'y') + self.mother_interface.ask("Are you really that fast? If you are using an editor that returns directly. Please confirm that you have finised to edit the file", 'y', + timeout=False) self.reload_card(path) def reload_card(self, path): diff --git a/epochX/cudacpp/gq_ttq.mad/bin/internal/extended_cmd.py b/epochX/cudacpp/gq_ttq.mad/bin/internal/extended_cmd.py index a6a8609dce..2f37070580 100755 --- a/epochX/cudacpp/gq_ttq.mad/bin/internal/extended_cmd.py +++ b/epochX/cudacpp/gq_ttq.mad/bin/internal/extended_cmd.py @@ -1108,9 +1108,12 @@ def ask(self, question, default, choices=[], path_msg=None, if alias: choices += list(alias.keys()) + + question_instance = obj(question, allow_arg=choices, default=default, mother_interface=self, **opt) - + if fct_timeout is None: + fct_timeout = lambda x: question_instance.postcmd(x, default) if x and default else False if first_cmd: if isinstance(first_cmd, str): question_instance.onecmd(first_cmd) @@ -2271,6 +2274,9 @@ def postcmd(self, stop, line): if n: self.default(line) return self.postcmd(stop, line) + elif self.value is None and line: + self.default(line) + return self.postcmd(stop, line) if not self.casesensitive: for ans in self.allow_arg: if ans.lower() == self.value.lower(): diff --git a/epochX/cudacpp/gq_ttq.mad/bin/internal/gen_ximprove.py b/epochX/cudacpp/gq_ttq.mad/bin/internal/gen_ximprove.py index 3b8ec31215..a88d60b282 100755 --- a/epochX/cudacpp/gq_ttq.mad/bin/internal/gen_ximprove.py +++ b/epochX/cudacpp/gq_ttq.mad/bin/internal/gen_ximprove.py @@ -154,10 +154,15 @@ def get_helicity(self, to_submit=True, clean=True): p = misc.Popen(['./gensym'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT, cwd=Pdir) #sym_input = "%(points)d %(iterations)d %(accuracy)f \n" % self.opts + (stdout, _) = p.communicate(''.encode()) stdout = stdout.decode('ascii',errors='ignore') - nb_channel = max([math.floor(float(d)) for d in stdout.split()]) - + try: + nb_channel = max([math.floor(float(d)) for d in stdout.split()]) + except Exception as error: + misc.sprint(stdout, 'no channel or error for %s' % Pdir) + continue + self.cmd.compile(['madevent_forhel'], cwd=Pdir) if not os.path.exists(pjoin(Pdir, 'madevent_forhel')): raise Exception('Error make madevent_forhel not successful') diff --git a/epochX/cudacpp/gq_ttq.mad/bin/internal/launch_plugin.py b/epochX/cudacpp/gq_ttq.mad/bin/internal/launch_plugin.py new file mode 100644 index 0000000000..23271b846e --- /dev/null +++ b/epochX/cudacpp/gq_ttq.mad/bin/internal/launch_plugin.py @@ -0,0 +1,100 @@ + +import logging +import os +import subprocess +pjoin = os.path.join +logger = logging.getLogger('cmdprint') # for stdout + +try: + import madgraph +except ImportError: + import internal.madevent_interface as madevent_interface + import internal.misc as misc + import internal.extended_cmd as extended_cmd + import internal.banner as banner_mod +else: + import madgraph.interface.madevent_interface as madevent_interface + import madgraph.various.misc as misc + import madgraph.interface.extended_cmd as extended_cmd + import madgraph.various.banner as banner_mod + +class CPPMEInterface(madevent_interface.MadEventCmdShell): + + def compile(self, *args, **opts): + """ """ + + import multiprocessing + if not self.options['nb_core'] or self.options['nb_core'] == 'None': + self.options['nb_core'] = multiprocessing.cpu_count() + + if args and args[0][0] == 'madevent' and hasattr(self, 'run_card'): + import pathlib + import os + pjoin = os.path.join + + + + + cudacpp_backend = self.run_card['cudacpp_backend'].upper() # the default value is defined in banner.py + logger.info("Building madevent in madevent_interface.py with '%s' matrix elements"%cudacpp_backend) + if cudacpp_backend == 'FORTRAN': + args[0][0] = 'madevent_fortran_link' + elif cudacpp_backend == 'CPP': + args[0][0] = 'madevent_cpp_link' + elif cudacpp_backend == 'CUDA': + args[0][0] = 'madevent_cuda_link' + else: + raise Exception("Invalid cudacpp_backend='%s': only 'FORTRAN', 'CPP', 'CUDA' are supported") + return misc.compile(nb_core=self.options['nb_core'], *args, **opts) + else: + return misc.compile(nb_core=self.options['nb_core'], *args, **opts) + +class CPPRunCard(banner_mod.RunCardLO): + + def reset_simd(self, old_value, new_value, name): + if not hasattr(self, 'path'): + raise Exception + + if name == "vector_size" and new_value <= int(old_value): + # code can handle the new size -> do not recompile + return + + Sourcedir = pjoin(os.path.dirname(os.path.dirname(self.path)), 'Source') + subprocess.call(['make', 'cleanavx'], cwd=Sourcedir, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) + + def plugin_input(self, finput): + return + + def default_setup(self): + super().default_setup() + self.add_param('cudacpp_backend', 'CPP', include=False, hidden=False) + + + def write_one_include_file(self, output_dir, incname, output_file=None): + """write one include file at the time""" + + if incname == "vector.inc" and 'vector_size' not in self.user_set: + return + super().write_one_include_file(output_dir, incname, output_file) + + + def check_validity(self): + """ensure that PLUGIN information are consistent""" + + super().check_validity() + + if self['SDE_strategy'] != 1: + logger.warning('SDE_strategy different of 1 is not supported with SMD/GPU mode') + self['sde_strategy'] = 1 + + if self['hel_recycling']: + self['hel_recycling'] = False + +class GPURunCard(CPPRunCard): + + def default_setup(self): + super(CPPRunCard, self).default_setup() + self.add_param('cudacpp_backend', 'CUDA', include=False, hidden=False) + +MEINTERFACE = CPPMEInterface +RunCard = CPPRunCard diff --git a/epochX/cudacpp/gq_ttq.mad/bin/internal/madevent_interface.py b/epochX/cudacpp/gq_ttq.mad/bin/internal/madevent_interface.py index 920e07a926..d722702891 100755 --- a/epochX/cudacpp/gq_ttq.mad/bin/internal/madevent_interface.py +++ b/epochX/cudacpp/gq_ttq.mad/bin/internal/madevent_interface.py @@ -3796,9 +3796,11 @@ def do_combine_events(self, line): if self.run_card['bias_module'].lower() not in ['dummy', 'none'] and nb_event: self.correct_bias() - + elif self.run_card['custom_fcts']: + self.correct_bias() + logger.info("combine events done in %s", time.time()-start) - + self.to_store.append('event') diff --git a/epochX/cudacpp/gq_ttq.mad/bin/internal/run_plot b/epochX/cudacpp/gq_ttq.mad/bin/internal/run_plot new file mode 100755 index 0000000000..7deee7ac88 --- /dev/null +++ b/epochX/cudacpp/gq_ttq.mad/bin/internal/run_plot @@ -0,0 +1,47 @@ +#!/bin/bash +# +# This runs MadAnalysis on the unweighted_events.lhe +# +# Usage: run_plot run_name [madir [tddir]] +# where madir is the path to the MadAnalysis package + +main=`pwd` + +if [ "$1" != "" ] +then + run=$1 +else + echo "Usage: run_plot runname [MAdir [tddir]]" + exit +fi + +if [ "$2" != "" ] +then + MAdir=$main/$2 +else + MAdir=$main/../../MadAnalysis +fi + +if [ "$3" != "" ]; then + td=$main/$3 +else + td=$main/../../td +fi + +dirbin=$main/../bin + +if [[ $run != "" && -e ${run}_unweighted_events.lhe.gz ]];then + gunzip -c ${run}_unweighted_events.lhe.gz > unweighted_events.lhe +fi + +if [[ (-x $MAdir/plot_events) && (-e unweighted_events.lhe) && (-e ../Cards/plot_card.dat) ]]; then + echo "Creating Plots" + mkdir $run + cd $run + echo "../unweighted_events.lhe" > events.list + $dirbin/plot $MAdir $td > plot.log + cd .. + $dirbin/plot_page-pl $run parton + mv plots.html ${run}_plots.html +fi + diff --git a/epochX/cudacpp/gq_ttq.mad/bin/internal/run_plot_delphes b/epochX/cudacpp/gq_ttq.mad/bin/internal/run_plot_delphes new file mode 100755 index 0000000000..975f410d0e --- /dev/null +++ b/epochX/cudacpp/gq_ttq.mad/bin/internal/run_plot_delphes @@ -0,0 +1,46 @@ +#!/bin/bash +# +# This runs MadAnalysis on the delphes_events.lhco +# +# Usage: run_plot run_name [madir [tddir]] +# where madir is the path to the MadAnalysis package + +main=`pwd` + +if [ "$1" != "" ] +then + run=$1 +else + echo "Usage: run_plot runname [MAdir [tddir]]" + exit +fi + +if [ "$2" != "" ] +then + MAdir=$main/$2 +else + MAdir=$main/../../MadAnalysis +fi + +if [ "$3" != "" ]; then + td=$main/$3 +else + td=$main/../../td +fi + +dirbin=$main/../bin + +if [[ $run != "" && -e ${run}_delphes_events.lhco.gz ]];then + gunzip -c ${run}_delphes_events.lhco.gz > delphes_events.lhco +fi + +if [[ (-x $MAdir/plot_events) && (-e delphes_events.lhco) && (-e ../Cards/plot_card.dat) ]]; then + echo "Creating Plots" + mkdir ${run}_delphes + cd ${run}_delphes + echo "../delphes_events.lhco" > events.list + $dirbin/plot $MAdir $td > plot.log + cd .. + $dirbin/plot_page-pl ${run}_delphes Delphes + mv plots.html ${run}_plots_delphes.html +fi diff --git a/epochX/cudacpp/gq_ttq.mad/bin/internal/run_plot_pgs b/epochX/cudacpp/gq_ttq.mad/bin/internal/run_plot_pgs new file mode 100755 index 0000000000..e7a36ef344 --- /dev/null +++ b/epochX/cudacpp/gq_ttq.mad/bin/internal/run_plot_pgs @@ -0,0 +1,47 @@ +#!/bin/bash +# +# This runs MadAnalysis on the unweighted_events.lhe +# +# Usage: run_plot run_name [madir [tddir]] +# where madir is the path to the MadAnalysis package + +main=`pwd` + +if [ "$1" != "" ] +then + run=$1 +else + echo "Usage: run_plot runname [MAdir [tddir]]" + exit +fi + +if [ "$2" != "" ] +then + MAdir=$main/$2 +else + MAdir=$main/../../MadAnalysis +fi + +if [ "$3" != "" ]; then + td=$main/$3 +else + td=$main/../../td +fi + +dirbin=$main/../bin + +if [[ $run != "" && -e ${run}_pgs_events.lhco.gz ]];then + gunzip -c ${run}_pgs_events.lhco.gz > pgs_events.lhco +fi + +if [[ (-x $MAdir/plot_events) && (-e pgs_events.lhco) && (-e ../Cards/plot_card.dat) ]]; then + echo "Creating Plots" + mkdir ${run}_pgs + cd ${run}_pgs + echo "../pgs_events.lhco" > events.list + $dirbin/plot $MAdir $td > plot.log + cd .. + $dirbin/plot_page-pl ${run}_pgs PGS + mv plots.html ${run}_plots_pgs.html +fi + diff --git a/epochX/cudacpp/gq_ttq.mad/bin/internal/run_plot_pythia b/epochX/cudacpp/gq_ttq.mad/bin/internal/run_plot_pythia new file mode 100755 index 0000000000..532bfb4b7b --- /dev/null +++ b/epochX/cudacpp/gq_ttq.mad/bin/internal/run_plot_pythia @@ -0,0 +1,50 @@ +#!/bin/bash +# +# This runs MadAnalysis on the unweighted_events.lhe +# +# Usage: run_plot run_name [madir [tddir]] +# where madir is the path to the MadAnalysis package + +main=`pwd` + +if [ "$1" != "" ] +then + run=$1 +else + echo "Usage: run_plot runname [MAdir [tddir]]" + exit +fi + +if [ "$2" != "" ] +then + MAdir=$main/$2 +else + MAdir=$main/../../MadAnalysis +fi + +if [ "$3" != "" ]; then + td=$main/$3 +else + td=$main/../../td +fi + +dirbin=$main/../bin/internal + +if [[ $run != "" && -e ${run}_pythia_events.lhe.gz ]];then + gunzip -c ${run}_pythia_events.lhe.gz > pythia_events.lhe +fi + +if [[ (-x $MAdir/plot_events) && (-e pythia_events.lhe) && (-e ../Cards/plot_card.dat) ]]; then + echo "Creating Plots" + mkdir ${run}_pythia + cd ${run}_pythia + echo "../pythia_events.lhe" > events.list + $dirbin/plot $MAdir $td > plot.log + cd .. + $dirbin/plot_page-pl ${run}_pythia Pythia + mv plots.html ${run}_plots_pythia.html + $dirbin/gen_crossxhtml-pl $run +else + echo "Not creating plots" +fi + diff --git a/epochX/cudacpp/gq_ttq.mad/bin/madevent b/epochX/cudacpp/gq_ttq.mad/bin/madevent index c944aa1faf..dff9711b73 100755 --- a/epochX/cudacpp/gq_ttq.mad/bin/madevent +++ b/epochX/cudacpp/gq_ttq.mad/bin/madevent @@ -32,6 +32,7 @@ except ImportError: import os +pjoin = os.path.join import optparse # Get the directory of the script real path (bin) @@ -160,13 +161,30 @@ except: pass import internal.madevent_interface as cmd_interface +# check for plugin customization of the launch command +launch_interface = cmd_interface.MadEventCmdShell +if os.path.exists(pjoin(root_path, 'bin','internal', 'launch_plugin.py')): + with misc.TMP_variable(sys, 'path', sys.path + [pjoin(root_path, 'bin', 'internal')]): + from importlib import reload + try: + reload('launch_plugin') + except Exception as error: + import launch_plugin + launch_interface = launch_plugin.MEINTERFACE + + +#Source use this executable for compilation always allow it +force_run = False +if (args and args[0] == 'treatcards'): + force_run=True + # Call the cmd interface main loop try: if '-h' in args or '--help' in args: - launch = ME.MadEventCmdShell(me_dir=os.path.dirname(root_path), force_run=True) + launch = launch_interface(me_dir=os.path.dirname(root_path), force_run=True) launch.exec_cmd('help generate_events') sys.exit(0) - with cmd_interface.MadEventCmdShell.RunWebHandling(os.path.dirname(root_path), ): + with cmd_interface.MadEventCmdShell.RunWebHandling(os.path.dirname(root_path), force_run=force_run): if (args and os.path.isfile(args[0])): # They are an input file input_file = args[0] @@ -178,7 +196,7 @@ try: cmd_line.run_cmd('import command ' + input_file) cmd_line.run_cmd('quit') else: - cmd_line = cmd_interface.MadEventCmdShell(force_run=True) + cmd_line = launch_interface(force_run=True) cmd_line.use_rawinput = False cmd_line.haspiping = False cmd_line.run_cmd('import command ' + input_file) @@ -188,7 +206,7 @@ try: if options.web: cmd_line = cmd_interface.MadEventCmd(force_run=True) else: - cmd_line = cmd_interface.MadEventCmdShell(force_run=True) + cmd_line = launch_interface(force_run=True) if not hasattr(cmd_line, 'do_%s' % args[0]): if parser_error: print( parser_error) diff --git a/epochX/cudacpp/gq_ttq.mad/src/HelAmps_sm.h b/epochX/cudacpp/gq_ttq.mad/src/HelAmps_sm.h index 901400d447..0dd5f20f71 100644 --- a/epochX/cudacpp/gq_ttq.mad/src/HelAmps_sm.h +++ b/epochX/cudacpp/gq_ttq.mad/src/HelAmps_sm.h @@ -863,6 +863,7 @@ namespace mg5amcCpu const fptype allF2[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, fptype allvertexes[] ) ALWAYS_INLINE; //-------------------------------------------------------------------------- @@ -873,6 +874,7 @@ namespace mg5amcCpu FFV1_1( const fptype allF2[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, const fptype M1, const fptype W1, fptype allF1[] ) ALWAYS_INLINE; @@ -885,6 +887,7 @@ namespace mg5amcCpu FFV1_2( const fptype allF1[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, const fptype M2, const fptype W2, fptype allF2[] ) ALWAYS_INLINE; @@ -897,6 +900,7 @@ namespace mg5amcCpu FFV1P0_3( const fptype allF1[], const fptype allF2[], const fptype allCOUP[], + const double Ccoeff, const fptype M3, const fptype W3, fptype allV3[] ) ALWAYS_INLINE; @@ -910,6 +914,7 @@ namespace mg5amcCpu const fptype allV2[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, fptype allvertexes[] ) ALWAYS_INLINE; //========================================================================== @@ -921,6 +926,7 @@ namespace mg5amcCpu const fptype allF2[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, fptype allvertexes[] ) { mgDebug( 0, __FUNCTION__ ); @@ -944,6 +950,7 @@ namespace mg5amcCpu FFV1_1( const fptype allF2[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, const fptype M1, const fptype W1, fptype allF1[] ) @@ -975,6 +982,7 @@ namespace mg5amcCpu FFV1_2( const fptype allF1[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, const fptype M2, const fptype W2, fptype allF2[] ) @@ -1006,6 +1014,7 @@ namespace mg5amcCpu FFV1P0_3( const fptype allF1[], const fptype allF2[], const fptype allCOUP[], + const double Ccoeff, const fptype M3, const fptype W3, fptype allV3[] ) @@ -1037,6 +1046,7 @@ namespace mg5amcCpu const fptype allV2[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, fptype allvertexes[] ) { mgDebug( 0, __FUNCTION__ ); diff --git a/epochX/cudacpp/gq_ttq.mad/src/Parameters_sm.cc b/epochX/cudacpp/gq_ttq.mad/src/Parameters_sm.cc index d5eda63ee0..3452d1e8da 100644 --- a/epochX/cudacpp/gq_ttq.mad/src/Parameters_sm.cc +++ b/epochX/cudacpp/gq_ttq.mad/src/Parameters_sm.cc @@ -111,8 +111,8 @@ Parameters_sm::setDependentParameters() // now computed event-by-event (running void Parameters_sm::setDependentCouplings() // now computed event-by-event (running alphas #373) { - GC_11 = mdl_complexi * G; GC_10 = -G; + GC_11 = mdl_complexi * G; } */ @@ -195,7 +195,7 @@ void Parameters_sm::printDependentCouplings() // now computed event-by-event (running alphas #373) { std::cout << "sm model couplings dependent on event kinematics:" << std::endl; - std::cout << std::setw( 20 ) << "GC_11 = " << std::setiosflags( std::ios::scientific ) << std::setw( 10 ) << GC_11 << std::endl; std::cout << std::setw( 20 ) << "GC_10 = " << std::setiosflags( std::ios::scientific ) << std::setw( 10 ) << GC_10 << std::endl; + std::cout << std::setw( 20 ) << "GC_11 = " << std::setiosflags( std::ios::scientific ) << std::setw( 10 ) << GC_11 << std::endl; } */ diff --git a/epochX/cudacpp/gq_ttq.mad/src/Parameters_sm.h b/epochX/cudacpp/gq_ttq.mad/src/Parameters_sm.h index 0c77cf58f0..4f6f322ed9 100644 --- a/epochX/cudacpp/gq_ttq.mad/src/Parameters_sm.h +++ b/epochX/cudacpp/gq_ttq.mad/src/Parameters_sm.h @@ -54,7 +54,7 @@ namespace mg5amcCpu //double mdl_sqrt__aS, G, mdl_G__exp__2; // now computed event-by-event (running alphas #373) // Model couplings dependent on aS - //cxsmpl GC_11, GC_10; // now computed event-by-event (running alphas #373) + //cxsmpl GC_10, GC_11; // now computed event-by-event (running alphas #373) // Set parameters that are unchanged during the run void setIndependentParameters( SLHAReader& slha ); @@ -194,8 +194,8 @@ namespace mg5amcCpu //constexpr double mdl_G__exp__2 = ( ( G ) * ( G ) ); // now computed event-by-event (running alphas #373) // Model couplings dependent on aS - //constexpr cxsmpl GC_11 = mdl_complexi * G; // now computed event-by-event (running alphas #373) //constexpr cxsmpl GC_10 = -G; // now computed event-by-event (running alphas #373) + //constexpr cxsmpl GC_11 = mdl_complexi * G; // now computed event-by-event (running alphas #373) // Print parameters that are unchanged during the run void printIndependentParameters(); @@ -226,12 +226,12 @@ namespace mg5amcCpu namespace Parameters_sm_dependentCouplings { constexpr size_t ndcoup = 2; // #couplings that vary event by event because they depend on the running alphas QCD - constexpr size_t idcoup_GC_11 = 0; - constexpr size_t idcoup_GC_10 = 1; + constexpr size_t idcoup_GC_10 = 0; + constexpr size_t idcoup_GC_11 = 1; struct DependentCouplings_sv { - cxtype_sv GC_11; cxtype_sv GC_10; + cxtype_sv GC_11; }; #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-variable" // e.g. <> @@ -257,8 +257,8 @@ namespace mg5amcCpu //const fptype_sv G = 2. * mdl_sqrt__aS * constexpr_sqrt( M_PI ); const fptype_sv mdl_G__exp__2 = ( ( G ) * ( G ) ); // Model couplings dependent on aS - out.GC_11 = cI * G; out.GC_10 = -G; + out.GC_11 = cI * G; } // End SM implementation - no special handling of vectors of floats as in EFT (#439) return out; @@ -293,12 +293,12 @@ namespace mg5amcCpu using namespace Parameters_sm_dependentCouplings; const fptype_sv& gs_sv = G_ACCESS::kernelAccessConst( gs ); DependentCouplings_sv couplings_sv = computeDependentCouplings_fromG( gs_sv ); - fptype* GC_11s = C_ACCESS::idcoupAccessBuffer( couplings, idcoup_GC_11 ); fptype* GC_10s = C_ACCESS::idcoupAccessBuffer( couplings, idcoup_GC_10 ); - cxtype_sv_ref GC_11s_sv = C_ACCESS::kernelAccess( GC_11s ); + fptype* GC_11s = C_ACCESS::idcoupAccessBuffer( couplings, idcoup_GC_11 ); cxtype_sv_ref GC_10s_sv = C_ACCESS::kernelAccess( GC_10s ); - GC_11s_sv = couplings_sv.GC_11; + cxtype_sv_ref GC_11s_sv = C_ACCESS::kernelAccess( GC_11s ); GC_10s_sv = couplings_sv.GC_10; + GC_11s_sv = couplings_sv.GC_11; mgDebug( 1, __FUNCTION__ ); return; } diff --git a/epochX/cudacpp/gq_ttq.mad/src/cudacpp_src.mk b/epochX/cudacpp/gq_ttq.mad/src/cudacpp_src.mk index 554d7a704c..750986464e 100644 --- a/epochX/cudacpp/gq_ttq.mad/src/cudacpp_src.mk +++ b/epochX/cudacpp/gq_ttq.mad/src/cudacpp_src.mk @@ -1,7 +1,7 @@ # Copyright (C) 2020-2023 CERN and UCLouvain. # Licensed under the GNU Lesser General Public License (version 3 or later). # Created by: S. Roiser (Feb 2020) for the MG5aMC CUDACPP plugin. -# Further modified by: O. Mattelaer, S. Roiser, A. Valassi (2020-2023) for the MG5aMC CUDACPP plugin. +# Further modified by: J. Teig, O. Mattelaer, S. Roiser, A. Valassi (2020-2023) for the MG5aMC CUDACPP plugin. #=== Determine the name of this makefile (https://ftp.gnu.org/old-gnu/Manuals/make-3.80/html_node/make_17.html) #=== NB: assume that the same name (e.g. cudacpp.mk, Makefile...) is used in the Subprocess and src directories @@ -88,50 +88,52 @@ CXXFLAGS += $(OMPFLAGS) # Set the build flags appropriate to each AVX choice (example: "make AVX=none") # [NB MGONGPU_PVW512 is needed because "-mprefer-vector-width=256" is not exposed in a macro] # [See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96476] -$(info AVX=$(AVX)) -ifeq ($(UNAME_P),ppc64le) - ifeq ($(AVX),sse4) - override AVXFLAGS = -D__SSE4_2__ # Power9 VSX with 128 width (VSR registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on PowerPC for the moment) - endif -else ifeq ($(UNAME_P),arm) - ifeq ($(AVX),sse4) - override AVXFLAGS = -D__SSE4_2__ # ARM NEON with 128 width (Q/quadword registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on ARM for the moment) - endif -else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 - ifeq ($(AVX),none) - override AVXFLAGS = -mno-sse3 # no SIMD - else ifeq ($(AVX),sse4) - override AVXFLAGS = -mno-avx # SSE4.2 with 128 width (xmm registers) - else ifeq ($(AVX),avx2) - override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(AVX),512y) - override AVXFLAGS = -march=skylake -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(AVX),512z) - override AVXFLAGS = -march=skylake -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) +ifeq ($(NVCC),) + $(info AVX=$(AVX)) + ifeq ($(UNAME_P),ppc64le) + ifeq ($(AVX),sse4) + override AVXFLAGS = -D__SSE4_2__ # Power9 VSX with 128 width (VSR registers) + else ifneq ($(AVX),none) + $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on PowerPC for the moment) + endif + else ifeq ($(UNAME_P),arm) + ifeq ($(AVX),sse4) + override AVXFLAGS = -D__SSE4_2__ # ARM NEON with 128 width (Q/quadword registers) + else ifneq ($(AVX),none) + $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on ARM for the moment) + endif + else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 + ifeq ($(AVX),none) + override AVXFLAGS = -mno-sse3 # no SIMD + else ifeq ($(AVX),sse4) + override AVXFLAGS = -mno-avx # SSE4.2 with 128 width (xmm registers) + else ifeq ($(AVX),avx2) + override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] + else ifeq ($(AVX),512y) + override AVXFLAGS = -march=skylake -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] + else ifeq ($(AVX),512z) + override AVXFLAGS = -march=skylake -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) + else + $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) + endif else - $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) - endif -else - ifeq ($(AVX),none) - override AVXFLAGS = -march=x86-64 # no SIMD (see #588) - else ifeq ($(AVX),sse4) - override AVXFLAGS = -march=nehalem # SSE4.2 with 128 width (xmm registers) - else ifeq ($(AVX),avx2) - override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(AVX),512y) - override AVXFLAGS = -march=skylake-avx512 -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(AVX),512z) - override AVXFLAGS = -march=skylake-avx512 -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) + ifeq ($(AVX),none) + override AVXFLAGS = -march=x86-64 # no SIMD (see #588) + else ifeq ($(AVX),sse4) + override AVXFLAGS = -march=nehalem # SSE4.2 with 128 width (xmm registers) + else ifeq ($(AVX),avx2) + override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] + else ifeq ($(AVX),512y) + override AVXFLAGS = -march=skylake-avx512 -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] + else ifeq ($(AVX),512z) + override AVXFLAGS = -march=skylake-avx512 -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) + else ifneq ($(AVX),none) + $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) + endif endif + # For the moment, use AVXFLAGS everywhere: eventually, use them only in encapsulated implementations? + CXXFLAGS+= $(AVXFLAGS) endif -# For the moment, use AVXFLAGS everywhere: eventually, use them only in encapsulated implementations? -CXXFLAGS+= $(AVXFLAGS) # Set the build flags appropriate to each FPTYPE choice (example: "make FPTYPE=f") ###$(info FPTYPE=$(FPTYPE)) @@ -175,11 +177,19 @@ endif # Build directory "short" tag (defines target and path to the optional build directory) # (Rationale: keep directory names shorter, e.g. do not include random number generator choice) -override DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) +ifneq ($(NVCC),) + override DIRTAG = cuda_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) +else + override DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) +endif # Build lockfile "full" tag (defines full specification of build options that cannot be intermixed) # (Rationale: avoid mixing of CUDA and no-CUDA environment builds with different random number generators) -override TAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) +ifneq ($(NVCC),) + override TAG = cuda_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) +else + override TAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) +endif # Build directory: current directory by default, or build.$(DIRTAG) if USEBUILDDIR==1 ###$(info Current directory is $(shell pwd)) @@ -216,35 +226,21 @@ endif MG5AMC_COMMONLIB = mg5amc_common # First target (default goal) -all.$(TAG): $(BUILDDIR)/.build.$(TAG) $(LIBDIR)/.build.$(TAG) $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so +all.$(TAG): $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so # Target (and build options): debug debug: OPTFLAGS = -g -O0 debug: all.$(TAG) -# Target: tag-specific build lockfiles -override oldtagsb=`if [ -d $(BUILDDIR) ]; then find $(BUILDDIR) -maxdepth 1 -name '.build.*' ! -name '.build.$(TAG)' -exec echo $(shell pwd)/{} \; ; fi` -override oldtagsl=`if [ -d $(LIBDIR) ]; then find $(LIBDIR) -maxdepth 1 -name '.build.*' ! -name '.build.$(TAG)' -exec echo $(shell pwd)/{} \; ; fi` - -$(BUILDDIR)/.build.$(TAG): $(LIBDIR)/.build.$(TAG) - -$(LIBDIR)/.build.$(TAG): - @if [ "$(oldtagsl)" != "" ]; then echo -e "Cannot build for tag=$(TAG) as old builds exist in $(LIBDIR) for other tags:\n$(oldtagsl)\nPlease run 'make clean' first\nIf 'make clean' is not enough: run 'make clean USEBUILDDIR=1 AVX=$(AVX) FPTYPE=$(FPTYPE)' or 'make cleanall'"; exit 1; fi - @if [ "$(oldtagsb)" != "" ]; then echo -e "Cannot build for tag=$(TAG) as old builds exist in $(BUILDDIR) for other tags:\n$(oldtagsb)\nPlease run 'make clean' first\nIf 'make clean' is not enough: run 'make clean USEBUILDDIR=1 AVX=$(AVX) FPTYPE=$(FPTYPE)' or 'make cleanall'"; exit 1; fi - @if [ ! -d $(LIBDIR) ]; then echo "mkdir -p $(LIBDIR)"; mkdir -p $(LIBDIR); fi - @touch $(LIBDIR)/.build.$(TAG) - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - @touch $(BUILDDIR)/.build.$(TAG) - #------------------------------------------------------------------------------- # Generic target and build rules: objects from C++ compilation -$(BUILDDIR)/%.o : %.cc *.h $(BUILDDIR)/.build.$(TAG) +$(BUILDDIR)/%.o : %.cc *.h @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi $(CXX) $(CPPFLAGS) $(CXXFLAGS) -fPIC -c $< -o $@ # Generic target and build rules: objects from CUDA compilation -$(BUILDDIR)/%_cu.o : %.cc *.h $(BUILDDIR)/.build.$(TAG) +$(BUILDDIR)/%_cu.o : %.cc *.h @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c -x cu $< -o $@ @@ -271,20 +267,61 @@ endif # Target: clean the builds .PHONY: clean +BUILD_DIRS := $(wildcard build.*) +NUM_BUILD_DIRS := $(words $(BUILD_DIRS)) + clean: ifeq ($(USEBUILDDIR),1) - rm -rf $(LIBDIR) - rm -rf $(BUILDDIR) +ifeq ($(NUM_BUILD_DIRS),1) + $(info USEBUILDDIR=1, only one src build directory found.) + rm -rf ../lib/$(BUILD_DIRS) + rm -rf $(BUILD_DIRS) +else ifeq ($(NUM_BUILD_DIRS),0) + $(error USEBUILDDIR=1, but no src build directories are found.) else - rm -f $(LIBDIR)/.build.* $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so - rm -f $(BUILDDIR)/.build.* $(BUILDDIR)/*.o $(BUILDDIR)/*.exe + $(error Multiple src BUILDDIR's found! Use 'cleannone', 'cleansse4', 'cleanavx2', 'clean512y','clean512z', 'cleancuda' or 'cleanall'.) +endif +else + rm -f ../lib/lib$(MG5AMC_COMMONLIB).so + rm -f $(BUILDDIR)/*.o $(BUILDDIR)/*.exe endif cleanall: @echo - $(MAKE) clean -f $(THISMK) + rm -f ../lib/lib$(MG5AMC_COMMONLIB).so + rm -f $(BUILDDIR)/*.o $(BUILDDIR)/*.exe @echo - rm -rf $(LIBDIR)/build.* + rm -rf ../lib/build.* rm -rf build.* +# Target: clean different builds + +cleannone: + rm -rf ../lib/build.none_* + rm -rf build.none_* + +cleansse4: + rm -rf ../lib/build.sse4_* + rm -rf build.sse4_* + +cleanavx2: + rm -rf ../lib/build.avx2_* + rm -rf build.avx2_* + +clean512y: + rm -rf ../lib/build.512y_* + rm -rf build.512y_* + +clean512z: + rm -rf ../lib/build.512z_* + rm -rf build.512z_* + +cleancuda: + rm -rf ../lib/build.cuda_* + rm -rf build.cuda_* + +cleandir: + rm -f ./*.o ./*.exe + rm -f ../lib/lib$(MG5AMC_COMMONLIB).so + #------------------------------------------------------------------------------- diff --git a/epochX/cudacpp/pp_tt012j.mad/Cards/delphes_trigger.dat b/epochX/cudacpp/pp_tt012j.mad/Cards/delphes_trigger.dat new file mode 100644 index 0000000000..0aab0677aa --- /dev/null +++ b/epochX/cudacpp/pp_tt012j.mad/Cards/delphes_trigger.dat @@ -0,0 +1,20 @@ +#TRIGGER CARD # DO NOT REMOVE THIS IS A TAG! + +# list of trigger algorithms +# trigger_name >> algorithm #comments +Inclusive electron >> ELEC1_PT: '29' +di-electron >> ELEC1_PT: '17' && ELEC2_PT: '17' +Inclusive Photon >> GAMMA1_PT: '80' +di-Photon >> GAMMA1_PT: '40' && GAMMA2_PT: '25' +Inclusive muon >> MUON1_PT: '19' +di-muon >> MUON1_PT: '7' && MUON2_PT: '7' +Taujet and ETmis >> TAU1_PT: '86' && ETMIS_PT: '65' +di-Taujets >> TAU1_PT: '59' && TAU2_PT: '59' +Jet and ETmis >> JET1_PT: '180' && ETMIS_PT: '123' +Taujet and electron >> TAU1_PT: '45' && ELEC1_PT: '19' +Taujet and muon >> TAU1_PT: '40' && ELEC1_PT: '15' +Inclusive b-jet >> Bjet1_PT: '237' +Inclusive 1 jet >> JET1_PT: '657' +Inclusive 3 jets >> JET1_PT: '247' && JET2_PT: '247' && JET3_PT: '247' +Inclusive 4 jets >> JET1_PT: '113' && JET2_PT: '113' && JET3_PT: '113' && JET4_PT: '113' + diff --git a/epochX/cudacpp/pp_tt012j.mad/Cards/me5_configuration.txt b/epochX/cudacpp/pp_tt012j.mad/Cards/me5_configuration.txt index 27acb12a1e..8a0c1e6345 100644 --- a/epochX/cudacpp/pp_tt012j.mad/Cards/me5_configuration.txt +++ b/epochX/cudacpp/pp_tt012j.mad/Cards/me5_configuration.txt @@ -234,7 +234,7 @@ # pineappl = pineappl -mg5_path = /data/stephan/madgraph4gpu/MG5aMC/mg5amcnlo +mg5_path = /afs/cern.ch/work/j/jteig/madgraph4gpu/MG5aMC/mg5amcnlo # MG5 MAIN DIRECTORY -mg5_path = /data/stephan/madgraph4gpu/MG5aMC/mg5amcnlo +mg5_path = /afs/cern.ch/work/j/jteig/madgraph4gpu/MG5aMC/mg5amcnlo diff --git a/epochX/cudacpp/pp_tt012j.mad/Cards/plot_card.dat b/epochX/cudacpp/pp_tt012j.mad/Cards/plot_card.dat new file mode 100644 index 0000000000..9abe1cc05e --- /dev/null +++ b/epochX/cudacpp/pp_tt012j.mad/Cards/plot_card.dat @@ -0,0 +1,203 @@ +#************************************************************************** +# Card for MadAnalysis * +# * +# This file is used to set the classes and options for * +# the MadAnalysis program. * +# * +# * +# Some comments about the classes * +# 1. Plots are for classes of particles. * +# 2. Each particle is identified by its PDG code. * +# 3. Classes names are arbitrary (4 symbols max, no spaces allowed). * +# 4. Particles in the same class will be ordered with the 'ordering * +# function' in the file in_func.f. * +# 5. Classes can be added/edited/removed at will, and given a name * +# that will then appear in the plots. * +# 6. A particle can be put in one class only. Putting a particle in * +# two or more classes can lead to double counting of events. * +# 7. The class name mET is missing Energy and its name is reserved. * +# If used, it must be put last in the classes list below. * +# 8. If events contain particles not belonging to an existing class, * +# a new class will automatically be generated. * +# 9. For LHCO events the PDG code 21 is assigned to a jet (not * +# b-tagged), 5 to a b-tagged jet and 12 to missing ET. * +# * +# * +# Some comments about the cuts * +# 1. In the file kin_func.f the functions on which cuts can be applied * +# are given. * +# 2. The syntax is as follows. * +# etmin 1 3 30d0 * +# means that from the first class the Et of the first three particles * +# has to be greater than 30 GeV. * +# * +# etmissmin 20d0 * +# means that there must be at least 20 GeV of missing Et * +# * +# dRmin 2 1 4 3 3d0 * +# means that the distance between the first particle in the second * +# class and the first three particles in the fourth class has to be * +# greater than 3. * +# * +# ptmax 1 3 10d0 * +# ptmax 1 2 15d0 * +# means that the maximum pt of the third particle in the first class * +# has to smaller than 10 GeV, and the first two particles of this * +# class has to be smaller than 15 GeV * +# 3. The ordering of the particles within a class can be set with the * +# 'ordering function' in the file kin_func.f. * +# 4. For all the 'min' cuts, an event will be thrown away if the particle * +# does not exist. On the other hand, for all the 'max' cuts the cut * +# will be ignored if the particle does not exist * +# (Only dRij is an exception, for which it is the other way around) * +# * +# * +# * +# Some comments about the plotting options * +# 1. In the file kin_func.f the functions can be found that can be * +# plotted. (only for off-line usage) * +# 2. With the plotting options one can set the number of plots for each * +# of these functions. * +# 3. One has to specify for each variable which particles from which * +# class are used to set the plots. Syntax: * +# et 2 4 * +# means that the transverse energy of the first four particles in the * +# second class will be plotted. * +# mij 1 3 * +# mij 2 2 * +# means that for the invariant mass plots the first three particles * +# from the first class and the first two from the second class will be * +# used to plot the invariant mass of two particles. (10 plots) * +# 4. The ordering of the particles in a class can be set with the * +# 'ordering_function'. pt, e and et are valid functions. (For off-line * +# users X1, X2 and X3 can also be used, if defined in kin_func.f.) * +# 5. Max number of plots is 200. * +# * +# * +#************************************************************************** +# Put here your list of classes +#************************************************************************** +# Do NOT put spaces before class names! +# Begin Classes # This is TAG. Do not modify this line +jet 1 -1 2 -2 3 -3 4 -4 21 # Class number 1 +b 5 -5 # Class number 2 +mET 12 -12 14 -14 16 -16 1000022 # Missing ET class, name is reserved +# End Classes # This is TAG. Do not modify this line +#************************************************************************** +ordering_function pt # orders particles in classes according to their pt +normalization xsec # histogram normalization, xsec or number (e.g. 1) +#************************************************************************** +# Put here list of minimum pt for the classes +#************************************************************************** +# Begin Minpts # This is TAG. Do not modify this line +#1 30 +#2 40 +#3 10 +# End Minpts # This is TAG. Do not modify this line +#************************************************************************** +# Cuts on plotted events +#************************************************************************** +# Modify the cuts and remove the pounds/hashes to apply those cuts +# Do NOT put spaces at the beginning of the following lines! +# Begin Cuts # This is TAG. Do not modify this line +#etmin 2 2 40d0 +#etmin 2 1 80d0 +#etmin 1 3 20d0 +#etmax 2 1 200d0 +#ptmin 3 1 0d0 +#etmissmin 20d0 +#etmissmax 80d0 +#etamax 1 1 1d0 +#etamax 2 1 2d0 +#etamin 2 2 1.5d0 +#etamin 2 1 2d0 +#mijmax 2 1 2 2 200d0 +#mijmin 2 1 2 2 100d0 +#X1min 2 1 40d0 +#X1max 2 2 50d0 +#dRijmin 2 1 2 2 0.7d0 +#dRijmax 1 3 2 2 0.7d0 +#XY1min 2 2 2 2 20d0 +#XYZA2max 2 2 2 2 4 1 5 1 40d0 +# End Cuts # This is TAG. Do not modify this line +#************************************************************************** +# Put here the required plots +#************************************************************************** +# Do NOT put spaces at the beginning of the following lines! +# Begin PlotDefs # This is TAG. Do not modify this line +pt 1 4 # plot pt for the first four particles in class 1 +pt 2 4 # plot pt for the first four particles in class 2 +pt 3 4 # plot pt for the first four particles in class 3 +pt 4 4 # plot pt for the first four particles in class 4 +pt 5 4 # etc. +pt 6 4 +pt 7 4 +#e 2 2 +y 1 4 # plot rapidity for the first four particles in class 1 +y 2 4 +y 3 4 +y 4 4 +y 5 4 +y 6 4 +y 7 4 +#eta 2 2 # plot pseudo-rapidity for the first two part in the 2nd class +#mom 4 1 +#costh 5 1 +#phi 2 2 +#delta_eta 2 2 +#delta_eta 4 1 +mij 1 4 # use the first four particles in the 1st class to plot inv. mass +mij 2 2 # use the first two particles from the second class as well +mij 3 1 # etc. +mij 4 1 +mij 5 1 +mij 6 1 +mij 7 1 +#cosij 1 2 +#cosij 2 2 +#cosij 3 1 +#cosij 4 1 +dRij 1 4 +dRij 2 2 +dRij 3 1 +dRij 4 1 +dRij 5 1 +dRij 6 1 +dRij 7 1 +#delta_phi 2 2 +#delta_phi 4 1 +#delta_phi 5 1 +#X1 2 2 # plot X1 (defined in kin_func.f) +#XYZA1 2 2 +#XYZA1 4 1 +#XYZA1 5 1 +# End PlotDefs # This is TAG. Do not modify this line +#************************************************************************** +#************************************************************************** +# Put here the plot ranges +#************************************************************************** +# Do NOT put spaces at the beginning of the following lines! +# Begin PlotRange # This is TAG. Do not modify this line +pt 10 0 500 # bin size, min value, max value +et 10 0 500 # bin size, min value, max value +etmiss 10 0 500 # bin size, min value, max value +ht 20 0 1500 +y 0.2 -5 5 # etc. +mij 20 0 1500 +dRij 0.1 0 5 +#delta_phi 0.1 0 3.1 +#X1 1 0 100 +#XYZA1 1 0 100 +# End PlotRange # This is TAG. Do not modify this line +#************************************************************************** +#************************************************************************** +# Output for plots +#************************************************************************** +# Do NOT put spaces at the beginning of the following lines! +# Begin PlotOutput # This is TAG. Do not modify this line +output topdrawer # set to topdrawer or gnuplot +plot_decayed no # plot (and cut) dec. res.? (Only for LHE events) +# End PlotOutput # This is TAG. Do not modify this line +#************************************************************************** +# +# diff --git a/epochX/cudacpp/pp_tt012j.mad/Cards/run_card.dat b/epochX/cudacpp/pp_tt012j.mad/Cards/run_card.dat index f4ca7c0b5d..58e12c11d7 100644 --- a/epochX/cudacpp/pp_tt012j.mad/Cards/run_card.dat +++ b/epochX/cudacpp/pp_tt012j.mad/Cards/run_card.dat @@ -185,13 +185,3 @@ # systematics = systematics_program ! none, systematics [python], SysCalc [depreceted, C++] ['--mur=0.5,1,2', '--muf=0.5,1,2', '--pdf=errorset', '--alps=0.5,1,2'] = systematics_arguments ! see: https://cp3.irmp.ucl.ac.be/projects/madgraph/wiki/Systematics#Systematicspythonmodule - -#********************************************************************* -# Options for the cudacpp plugin -#********************************************************************* - -# Set cudacpp-specific values of non-cudacpp-specific options --O3 -ffast-math -fbounds-check = global_flag ! build flags for Fortran code (for a fair comparison to cudacpp) - -# New cudacpp-specific options (default values are defined in banner.py) -CPP = cudacpp_backend ! valid backends are FORTRAN, CPP, CUDA diff --git a/epochX/cudacpp/pp_tt012j.mad/Source/DHELAS/aloha_file.inc b/epochX/cudacpp/pp_tt012j.mad/Source/DHELAS/aloha_file.inc index fa0f3d86f5..1b5bf6ec54 100644 --- a/epochX/cudacpp/pp_tt012j.mad/Source/DHELAS/aloha_file.inc +++ b/epochX/cudacpp/pp_tt012j.mad/Source/DHELAS/aloha_file.inc @@ -1 +1 @@ -ALOHARoutine = FFV1P0_3.o FFV1_0.o FFV1_1.o FFV1_2.o VVV1P0_1.o VVV1_0.o VVVV1P0_1.o VVVV1_0.o VVVV3P0_1.o VVVV3_0.o VVVV4P0_1.o VVVV4_0.o +ALOHARoutine = VVV1_0.o VVV1P0_1.o FFV1_0.o FFV1_1.o FFV1_2.o FFV1P0_3.o VVVV1_0.o VVVV1P0_1.o VVVV3_0.o VVVV3P0_1.o VVVV4_0.o VVVV4P0_1.o diff --git a/epochX/cudacpp/pp_tt012j.mad/Source/PDF/pdfwrap_lhapdf.f b/epochX/cudacpp/pp_tt012j.mad/Source/PDF/pdfwrap_lhapdf.f index 0be926e6cd..3f36905346 100644 --- a/epochX/cudacpp/pp_tt012j.mad/Source/PDF/pdfwrap_lhapdf.f +++ b/epochX/cudacpp/pp_tt012j.mad/Source/PDF/pdfwrap_lhapdf.f @@ -5,6 +5,7 @@ SUBROUTINE PDFWRAP C INCLUDE 'pdf.inc' INCLUDE '../alfas.inc' + INCLUDE '../vector.inc' INCLUDE '../coupl.inc' REAL*8 ZMASS DATA ZMASS/91.188D0/ diff --git a/epochX/cudacpp/pp_tt012j.mad/Source/make_opts b/epochX/cudacpp/pp_tt012j.mad/Source/make_opts index bd3c24228d..2607530b78 100644 --- a/epochX/cudacpp/pp_tt012j.mad/Source/make_opts +++ b/epochX/cudacpp/pp_tt012j.mad/Source/make_opts @@ -1,17 +1,11 @@ -pdlabel1= -pdlabel2= -lhapdf= -PYTHIA8_PATH=NotInstalled -MG5AMC_VERSION=3.5.0_lo_vect -GLOBAL_FLAG=-O3 -ffast-math -fbounds-check -ALOHA_FLAG= -MATRIX_FLAG= DEFAULT_CPP_COMPILER=g++ MACFLAG= STDLIB=-lstdc++ STDLIB_FLAG= DEFAULT_F_COMPILER=gfortran -DEFAULT_F2PY_COMPILER=f2py3 +DEFAULT_F2PY_COMPILER=f2py3.9 +MG5AMC_VERSION=SpecifiedByMG5aMCAtRunTime +PYTHIA8_PATH=NotInstalled #end_of_make_opts_variables BIASLIBDIR=../../../lib/ diff --git a/epochX/cudacpp/pp_tt012j.mad/Source/makefile b/epochX/cudacpp/pp_tt012j.mad/Source/makefile index dbe08b846e..00c73099a0 100644 --- a/epochX/cudacpp/pp_tt012j.mad/Source/makefile +++ b/epochX/cudacpp/pp_tt012j.mad/Source/makefile @@ -136,5 +136,7 @@ cleanSource: clean: cleanSource for i in `ls -d ../SubProcesses/P*`; do cd $$i; make clean; cd -; done; -cleanall: cleanSource +cleanavx: + for i in `ls -d ../SubProcesses/P*`; do cd $$i; make cleanavxs; cd -; done; +cleanall: cleanSource # THIS IS THE ONE for i in `ls -d ../SubProcesses/P*`; do cd $$i; make cleanavxs; cd -; done; diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/MatrixElementKernels.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/MatrixElementKernels.cc index 30257195b6..cfed7d2af5 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/MatrixElementKernels.cc +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/MatrixElementKernels.cc @@ -112,10 +112,17 @@ namespace mg5amcCpu // See https://community.arm.com/arm-community-blogs/b/operating-systems-blog/posts/runtime-detection-of-cpu-features-on-an-armv8-a-cpu bool ok = true; // this is just an assumption! const std::string tag = "arm neon (128bit as in SSE4.2)"; -#else +#elif defined(__x86_64__) || defined(__i386__) bool known = true; bool ok = __builtin_cpu_supports( "sse4.2" ); const std::string tag = "nehalem (SSE4.2)"; +#else + bool known = false; // __builtin_cpu_supports is not supported + // See https://gcc.gnu.org/onlinedocs/gcc/Basic-PowerPC-Built-in-Functions-Available-on-all-Configurations.html + // See https://stackoverflow.com/q/62783908 + // See https://community.arm.com/arm-community-blogs/b/operating-systems-blog/posts/runtime-detection-of-cpu-features-on-an-armv8-a-cpu + bool ok = true; // this is just an assumption! + const std::string tag = "arm neon (128bit as in SSE4.2)"; #endif #else bool known = true; diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_gg_ttx/CPPProcess.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_gg_ttx/CPPProcess.cc index 44f313bf0a..7717d11f6b 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_gg_ttx/CPPProcess.cc +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_gg_ttx/CPPProcess.cc @@ -246,10 +246,10 @@ namespace mg5amcCpu ixxxxx( momenta, cIPD[0], cHel[ihel][3], -1, w_fp[3], 3 ); - VVV1P0_1( w_fp[0], w_fp[1], COUPs[0], 0., 0., w_fp[4] ); + VVV1P0_1( w_fp[0], w_fp[1], COUPs[0], 1.0, 0., 0., w_fp[4] ); // Amplitude(s) for diagram number 1 - FFV1_0( w_fp[3], w_fp[2], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[2], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -260,10 +260,10 @@ namespace mg5amcCpu // *** DIAGRAM 2 OF 3 *** // Wavefunction(s) for diagram number 2 - FFV1_1( w_fp[2], w_fp[0], COUPs[1], cIPD[0], cIPD[1], w_fp[4] ); + FFV1_1( w_fp[2], w_fp[0], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[4] ); // Amplitude(s) for diagram number 2 - FFV1_0( w_fp[3], w_fp[4], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[4], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 2 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -273,10 +273,10 @@ namespace mg5amcCpu // *** DIAGRAM 3 OF 3 *** // Wavefunction(s) for diagram number 3 - FFV1_2( w_fp[3], w_fp[0], COUPs[1], cIPD[0], cIPD[1], w_fp[4] ); + FFV1_2( w_fp[3], w_fp[0], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[4] ); // Amplitude(s) for diagram number 3 - FFV1_0( w_fp[4], w_fp[2], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[4], w_fp[2], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 3 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -799,8 +799,7 @@ namespace mg5amcCpu { // nprocesses>1 was last observed for "mirror processes" in uux_ttx in the 270 branch (see issue #343 and PRs #360 and #396) constexpr int nprocesses = 1; - static_assert( nprocesses == 1, "Assume nprocesses == 1" ); - // process_id corresponds to the index of DSIG1 Fortran functions (must be 1 because cudacpp is unable to handle DSIG2) + static_assert( nprocesses == 1 || nprocesses == 2, "Assume nprocesses == 1 or 2" ); constexpr int process_id = 1; // code generation source: madevent + cudacpp exporter static_assert( process_id == 1, "Assume process_id == 1" ); } diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_gg_ttx/auto_dsig1.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_gg_ttx/auto_dsig1.f index b68450743c..ee723193db 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_gg_ttx/auto_dsig1.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_gg_ttx/auto_dsig1.f @@ -39,6 +39,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C LOCAL VARIABLES C INTEGER I,ITYPE,LP,IPROC + DOUBLE PRECISION QSCALE DOUBLE PRECISION G1 DOUBLE PRECISION G2 DOUBLE PRECISION XPQ(-7:7),PD(0:MAXPROC) @@ -126,11 +127,24 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) IF (ABS(LPP(IB(1))).GE.1) THEN !LP=SIGN(1,LPP(IB(1))) - G1=PDG2PDF(LPP(IB(1)),0, IB(1),XBK(IB(1)),DSQRT(Q2FACT(IB(1)))) + IF (DSQRT(Q2FACT(IB(1))).EQ.0D0) THEN + QSCALE=0D0 + DO I=3,NEXTERNAL + QSCALE=QSCALE+DSQRT(MAX(0D0,(PP(0,I)+PP(3,I))*(PP(0,I) + $ -PP(3,I)))) + ENDDO + QSCALE=QSCALE/2D0 + ELSE + QSCALE=DSQRT(Q2FACT(IB(1))) + ENDIF + G1=PDG2PDF(LPP(IB(1)),0, IB(1),XBK(IB(1)), QSCALE) ENDIF IF (ABS(LPP(IB(2))).GE.1) THEN !LP=SIGN(1,LPP(IB(2))) - G2=PDG2PDF(LPP(IB(2)),0, IB(2),XBK(IB(2)),DSQRT(Q2FACT(IB(2)))) + IF (DSQRT(Q2FACT(IB(2))).NE.0D0) THEN + QSCALE=DSQRT(Q2FACT(IB(2))) + ENDIF + G2=PDG2PDF(LPP(IB(2)),0, IB(2),XBK(IB(2)), QSCALE) ENDIF PD(0) = 0D0 IPROC = 0 diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_uux_ttx/CPPProcess.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_uux_ttx/CPPProcess.cc index 89ce64642c..5d1e4fd6b3 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_uux_ttx/CPPProcess.cc +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_uux_ttx/CPPProcess.cc @@ -241,18 +241,18 @@ namespace mg5amcCpu // *** DIAGRAM 1 OF 1 *** // Wavefunction(s) for diagram number 1 - ipzxxx( momenta, cHel[ihel][0], +1, w_fp[0], 0 ); // NB: ipzxxx only uses pz + ixxxxx( momenta, 0., cHel[ihel][0], +1, w_fp[0], 0 ); - omzxxx( momenta, cHel[ihel][1], -1, w_fp[1], 1 ); // NB: omzxxx only uses pz + oxxxxx( momenta, 0., cHel[ihel][1], -1, w_fp[1], 1 ); oxxxxx( momenta, cIPD[0], cHel[ihel][2], +1, w_fp[2], 2 ); ixxxxx( momenta, cIPD[0], cHel[ihel][3], -1, w_fp[3], 3 ); - FFV1P0_3( w_fp[0], w_fp[1], COUPs[1], 0., 0., w_fp[4] ); + FFV1P0_3( w_fp[0], w_fp[1], COUPs[1], 1.0, 0., 0., w_fp[4] ); // Amplitude(s) for diagram number 1 - FFV1_0( w_fp[3], w_fp[2], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[2], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -776,14 +776,13 @@ namespace mg5amcCpu { // nprocesses>1 was last observed for "mirror processes" in uux_ttx in the 270 branch (see issue #343 and PRs #360 and #396) constexpr int nprocesses = 2; - static_assert( nprocesses == 1, "Assume nprocesses == 1" ); - // process_id corresponds to the index of DSIG1 Fortran functions (must be 1 because cudacpp is unable to handle DSIG2) + static_assert( nprocesses == 1 || nprocesses == 2, "Assume nprocesses == 1 or 2" ); constexpr int process_id = 1; // code generation source: madevent + cudacpp exporter static_assert( process_id == 1, "Assume process_id == 1" ); } // Denominators: spins, colors and identical particles - constexpr int helcolDenominators[1] = { 36,36 }; // assume nprocesses == 1 (#272 and #343) + constexpr int helcolDenominators[1] = { 36 }; // assume nprocesses == 1 (#272 and #343) #ifdef __CUDACC__ // Remember: in CUDA this is a kernel for one event, in c++ this processes n events diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_uux_ttx/auto_dsig1.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_uux_ttx/auto_dsig1.f index 8310241f21..f205954b28 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_uux_ttx/auto_dsig1.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_uux_ttx/auto_dsig1.f @@ -42,6 +42,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C LOCAL VARIABLES C INTEGER I,ITYPE,LP,IPROC + DOUBLE PRECISION QSCALE DOUBLE PRECISION D1,U1,S1,C1 DOUBLE PRECISION CX2,SX2,UX2,DX2 DOUBLE PRECISION XPQ(-7:7),PD(0:MAXPROC) @@ -129,21 +130,30 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) IF (ABS(LPP(IB(1))).GE.1) THEN !LP=SIGN(1,LPP(IB(1))) - D1=PDG2PDF(LPP(IB(1)),1, IB(1),XBK(IB(1)),DSQRT(Q2FACT(IB(1)))) - U1=PDG2PDF(LPP(IB(1)),2, IB(1),XBK(IB(1)),DSQRT(Q2FACT(IB(1)))) - S1=PDG2PDF(LPP(IB(1)),3, IB(1),XBK(IB(1)),DSQRT(Q2FACT(IB(1)))) - C1=PDG2PDF(LPP(IB(1)),4, IB(1),XBK(IB(1)),DSQRT(Q2FACT(IB(1)))) + IF (DSQRT(Q2FACT(IB(1))).EQ.0D0) THEN + QSCALE=0D0 + DO I=3,NEXTERNAL + QSCALE=QSCALE+DSQRT(MAX(0D0,(PP(0,I)+PP(3,I))*(PP(0,I) + $ -PP(3,I)))) + ENDDO + QSCALE=QSCALE/2D0 + ELSE + QSCALE=DSQRT(Q2FACT(IB(1))) + ENDIF + D1=PDG2PDF(LPP(IB(1)),1, IB(1),XBK(IB(1)), QSCALE) + U1=PDG2PDF(LPP(IB(1)),2, IB(1),XBK(IB(1)), QSCALE) + S1=PDG2PDF(LPP(IB(1)),3, IB(1),XBK(IB(1)), QSCALE) + C1=PDG2PDF(LPP(IB(1)),4, IB(1),XBK(IB(1)), QSCALE) ENDIF IF (ABS(LPP(IB(2))).GE.1) THEN !LP=SIGN(1,LPP(IB(2))) - CX2=PDG2PDF(LPP(IB(2)),-4, IB(2),XBK(IB(2)),DSQRT(Q2FACT(IB(2)) - $ )) - SX2=PDG2PDF(LPP(IB(2)),-3, IB(2),XBK(IB(2)),DSQRT(Q2FACT(IB(2)) - $ )) - UX2=PDG2PDF(LPP(IB(2)),-2, IB(2),XBK(IB(2)),DSQRT(Q2FACT(IB(2)) - $ )) - DX2=PDG2PDF(LPP(IB(2)),-1, IB(2),XBK(IB(2)),DSQRT(Q2FACT(IB(2)) - $ )) + IF (DSQRT(Q2FACT(IB(2))).NE.0D0) THEN + QSCALE=DSQRT(Q2FACT(IB(2))) + ENDIF + CX2=PDG2PDF(LPP(IB(2)),-4, IB(2),XBK(IB(2)), QSCALE) + SX2=PDG2PDF(LPP(IB(2)),-3, IB(2),XBK(IB(2)), QSCALE) + UX2=PDG2PDF(LPP(IB(2)),-2, IB(2),XBK(IB(2)), QSCALE) + DX2=PDG2PDF(LPP(IB(2)),-1, IB(2),XBK(IB(2)), QSCALE) ENDIF PD(0) = 0D0 IPROC = 0 diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gg_ttxg/CPPProcess.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gg_ttxg/CPPProcess.cc index 8cc007dff8..8d5864c1d8 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gg_ttxg/CPPProcess.cc +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gg_ttxg/CPPProcess.cc @@ -248,11 +248,11 @@ namespace mg5amcCpu vxxxxx( momenta, 0., cHel[ihel][4], +1, w_fp[4], 4 ); - VVV1P0_1( w_fp[0], w_fp[1], COUPs[0], 0., 0., w_fp[5] ); - FFV1P0_3( w_fp[3], w_fp[2], COUPs[1], 0., 0., w_fp[6] ); + VVV1P0_1( w_fp[0], w_fp[1], COUPs[0], 1.0, 0., 0., w_fp[5] ); + FFV1P0_3( w_fp[3], w_fp[2], COUPs[1], 1.0, 0., 0., w_fp[6] ); // Amplitude(s) for diagram number 1 - VVV1_0( w_fp[5], w_fp[6], w_fp[4], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[5], w_fp[6], w_fp[4], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -265,10 +265,10 @@ namespace mg5amcCpu // *** DIAGRAM 2 OF 16 *** // Wavefunction(s) for diagram number 2 - FFV1_1( w_fp[2], w_fp[4], COUPs[1], cIPD[0], cIPD[1], w_fp[7] ); + FFV1_1( w_fp[2], w_fp[4], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[7] ); // Amplitude(s) for diagram number 2 - FFV1_0( w_fp[3], w_fp[7], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[7], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 2 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -279,10 +279,10 @@ namespace mg5amcCpu // *** DIAGRAM 3 OF 16 *** // Wavefunction(s) for diagram number 3 - FFV1_2( w_fp[3], w_fp[4], COUPs[1], cIPD[0], cIPD[1], w_fp[8] ); + FFV1_2( w_fp[3], w_fp[4], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[8] ); // Amplitude(s) for diagram number 3 - FFV1_0( w_fp[8], w_fp[2], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[8], w_fp[2], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 3 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -293,11 +293,11 @@ namespace mg5amcCpu // *** DIAGRAM 4 OF 16 *** // Wavefunction(s) for diagram number 4 - FFV1_1( w_fp[2], w_fp[0], COUPs[1], cIPD[0], cIPD[1], w_fp[5] ); - FFV1_2( w_fp[3], w_fp[1], COUPs[1], cIPD[0], cIPD[1], w_fp[9] ); + FFV1_1( w_fp[2], w_fp[0], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[5] ); + FFV1_2( w_fp[3], w_fp[1], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[9] ); // Amplitude(s) for diagram number 4 - FFV1_0( w_fp[9], w_fp[5], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[9], w_fp[5], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 4 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -307,10 +307,10 @@ namespace mg5amcCpu // *** DIAGRAM 5 OF 16 *** // Wavefunction(s) for diagram number 5 - VVV1P0_1( w_fp[1], w_fp[4], COUPs[0], 0., 0., w_fp[10] ); + VVV1P0_1( w_fp[1], w_fp[4], COUPs[0], 1.0, 0., 0., w_fp[10] ); // Amplitude(s) for diagram number 5 - FFV1_0( w_fp[3], w_fp[5], w_fp[10], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[5], w_fp[10], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 5 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -324,7 +324,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 6 - FFV1_0( w_fp[8], w_fp[5], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[8], w_fp[5], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 6 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -334,11 +334,11 @@ namespace mg5amcCpu // *** DIAGRAM 7 OF 16 *** // Wavefunction(s) for diagram number 7 - FFV1_2( w_fp[3], w_fp[0], COUPs[1], cIPD[0], cIPD[1], w_fp[5] ); - FFV1_1( w_fp[2], w_fp[1], COUPs[1], cIPD[0], cIPD[1], w_fp[11] ); + FFV1_2( w_fp[3], w_fp[0], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[5] ); + FFV1_1( w_fp[2], w_fp[1], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[11] ); // Amplitude(s) for diagram number 7 - FFV1_0( w_fp[5], w_fp[11], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[5], w_fp[11], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 7 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -351,7 +351,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 8 - FFV1_0( w_fp[5], w_fp[2], w_fp[10], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[5], w_fp[2], w_fp[10], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 8 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -365,7 +365,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 9 - FFV1_0( w_fp[5], w_fp[7], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[5], w_fp[7], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 9 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -375,10 +375,10 @@ namespace mg5amcCpu // *** DIAGRAM 10 OF 16 *** // Wavefunction(s) for diagram number 10 - VVV1P0_1( w_fp[0], w_fp[4], COUPs[0], 0., 0., w_fp[5] ); + VVV1P0_1( w_fp[0], w_fp[4], COUPs[0], 1.0, 0., 0., w_fp[5] ); // Amplitude(s) for diagram number 10 - FFV1_0( w_fp[3], w_fp[11], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[11], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 10 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -392,7 +392,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 11 - FFV1_0( w_fp[9], w_fp[2], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[9], w_fp[2], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 11 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -406,7 +406,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 12 - VVV1_0( w_fp[5], w_fp[1], w_fp[6], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[5], w_fp[1], w_fp[6], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 12 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -422,7 +422,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 13 - FFV1_0( w_fp[8], w_fp[11], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[8], w_fp[11], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 13 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -435,7 +435,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 14 - FFV1_0( w_fp[9], w_fp[7], w_fp[0], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[9], w_fp[7], w_fp[0], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 14 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -448,7 +448,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 15 - VVV1_0( w_fp[0], w_fp[10], w_fp[6], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[0], w_fp[10], w_fp[6], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 15 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -461,22 +461,22 @@ namespace mg5amcCpu // *** DIAGRAM 16 OF 16 *** // Wavefunction(s) for diagram number 16 - VVVV1P0_1( w_fp[0], w_fp[1], w_fp[4], COUPs[2], 0., 0., w_fp[10] ); - VVVV3P0_1( w_fp[0], w_fp[1], w_fp[4], COUPs[2], 0., 0., w_fp[6] ); - VVVV4P0_1( w_fp[0], w_fp[1], w_fp[4], COUPs[2], 0., 0., w_fp[9] ); + VVVV1P0_1( w_fp[0], w_fp[1], w_fp[4], COUPs[2], 1.0, 0., 0., w_fp[10] ); + VVVV3P0_1( w_fp[0], w_fp[1], w_fp[4], COUPs[2], 1.0, 0., 0., w_fp[6] ); + VVVV4P0_1( w_fp[0], w_fp[1], w_fp[4], COUPs[2], 1.0, 0., 0., w_fp[9] ); // Amplitude(s) for diagram number 16 - FFV1_0( w_fp[3], w_fp[2], w_fp[10], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[2], w_fp[10], COUPs[1], 1.0, &_fp[0] ); jamp_sv[0] += amp_sv[0]; jamp_sv[1] -= amp_sv[0]; jamp_sv[3] -= amp_sv[0]; jamp_sv[5] += amp_sv[0]; - FFV1_0( w_fp[3], w_fp[2], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[2], w_fp[6], COUPs[1], 1.0, &_fp[0] ); jamp_sv[1] -= amp_sv[0]; jamp_sv[2] += amp_sv[0]; jamp_sv[3] -= amp_sv[0]; jamp_sv[4] += amp_sv[0]; - FFV1_0( w_fp[3], w_fp[2], w_fp[9], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[2], w_fp[9], COUPs[1], 1.0, &_fp[0] ); jamp_sv[0] -= amp_sv[0]; jamp_sv[2] += amp_sv[0]; jamp_sv[4] += amp_sv[0]; @@ -1020,8 +1020,7 @@ namespace mg5amcCpu { // nprocesses>1 was last observed for "mirror processes" in uux_ttx in the 270 branch (see issue #343 and PRs #360 and #396) constexpr int nprocesses = 1; - static_assert( nprocesses == 1, "Assume nprocesses == 1" ); - // process_id corresponds to the index of DSIG1 Fortran functions (must be 1 because cudacpp is unable to handle DSIG2) + static_assert( nprocesses == 1 || nprocesses == 2, "Assume nprocesses == 1 or 2" ); constexpr int process_id = 1; // code generation source: madevent + cudacpp exporter static_assert( process_id == 1, "Assume process_id == 1" ); } diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gg_ttxg/auto_dsig1.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gg_ttxg/auto_dsig1.f index 668cc26192..b8615bc68f 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gg_ttxg/auto_dsig1.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gg_ttxg/auto_dsig1.f @@ -39,6 +39,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C LOCAL VARIABLES C INTEGER I,ITYPE,LP,IPROC + DOUBLE PRECISION QSCALE DOUBLE PRECISION G1 DOUBLE PRECISION G2 DOUBLE PRECISION XPQ(-7:7),PD(0:MAXPROC) @@ -126,11 +127,24 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) IF (ABS(LPP(IB(1))).GE.1) THEN !LP=SIGN(1,LPP(IB(1))) - G1=PDG2PDF(LPP(IB(1)),0, IB(1),XBK(IB(1)),DSQRT(Q2FACT(IB(1)))) + IF (DSQRT(Q2FACT(IB(1))).EQ.0D0) THEN + QSCALE=0D0 + DO I=3,NEXTERNAL + QSCALE=QSCALE+DSQRT(MAX(0D0,(PP(0,I)+PP(3,I))*(PP(0,I) + $ -PP(3,I)))) + ENDDO + QSCALE=QSCALE/2D0 + ELSE + QSCALE=DSQRT(Q2FACT(IB(1))) + ENDIF + G1=PDG2PDF(LPP(IB(1)),0, IB(1),XBK(IB(1)), QSCALE) ENDIF IF (ABS(LPP(IB(2))).GE.1) THEN !LP=SIGN(1,LPP(IB(2))) - G2=PDG2PDF(LPP(IB(2)),0, IB(2),XBK(IB(2)),DSQRT(Q2FACT(IB(2)))) + IF (DSQRT(Q2FACT(IB(2))).NE.0D0) THEN + QSCALE=DSQRT(Q2FACT(IB(2))) + ENDIF + G2=PDG2PDF(LPP(IB(2)),0, IB(2),XBK(IB(2)), QSCALE) ENDIF PD(0) = 0D0 IPROC = 0 diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gg_ttxg/matrix1.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gg_ttxg/matrix1.f index 7188daef76..2fc7bcdb89 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gg_ttxg/matrix1.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gg_ttxg/matrix1.f @@ -359,7 +359,7 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C LOCAL VARIABLES C INTEGER I,J,M,N - COMPLEX*16 ZTEMP, TMP_JAMP(10) + COMPLEX*16 ZTEMP, TMP_JAMP(9) REAL*8 CF(NCOLOR,NCOLOR) COMPLEX*16 AMP(NGRAPHS), JAMP(NCOLOR,NAMPSO) COMPLEX*16 W(6,NWAVEFUNCS) @@ -508,33 +508,30 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) TMP_JAMP(3) = AMP(15) + AMP(16) ! used 4 times TMP_JAMP(2) = AMP(1) + AMP(18) ! used 4 times TMP_JAMP(1) = AMP(12) - AMP(17) ! used 4 times - TMP_JAMP(10) = TMP_JAMP(3) - TMP_JAMP(2) ! used 2 times - TMP_JAMP(9) = TMP_JAMP(1) + ((-0.000000000000000D+00 + TMP_JAMP(9) = TMP_JAMP(3) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(8) ! used 2 times + TMP_JAMP(8) = TMP_JAMP(3) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(5) ! used 2 times + TMP_JAMP(7) = TMP_JAMP(2) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(2) ! used 2 times + TMP_JAMP(6) = TMP_JAMP(2) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(3) ! used 2 times + TMP_JAMP(5) = TMP_JAMP(1) + ((-0.000000000000000D+00 $ ,1.000000000000000D+00)) * AMP(11) ! used 2 times - TMP_JAMP(8) = TMP_JAMP(2) - TMP_JAMP(1) ! used 2 times - TMP_JAMP(7) = TMP_JAMP(1) + ((0.000000000000000D+00, + TMP_JAMP(4) = TMP_JAMP(1) + ((0.000000000000000D+00, $ -1.000000000000000D+00)) * AMP(10) ! used 2 times - TMP_JAMP(6) = TMP_JAMP(3) - TMP_JAMP(1) ! used 2 times - TMP_JAMP(5) = TMP_JAMP(2) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(3) ! used 2 times - TMP_JAMP(4) = TMP_JAMP(3) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(5) ! used 2 times - JAMP(1,1) = (-1.000000000000000D+00)*AMP(6)+TMP_JAMP(4)+( - $ -1.000000000000000D+00)*TMP_JAMP(5) - JAMP(2,1) = (-1.000000000000000D+00)*AMP(4)+(-1.000000000000000D - $ +00)*TMP_JAMP(4)+TMP_JAMP(9) - JAMP(3,1) = (-1.000000000000000D+00)*AMP(13)+TMP_JAMP(5)+( - $ -1.000000000000000D+00)*TMP_JAMP(7) - JAMP(4,1) = (-1.000000000000000D+00)*AMP(7)+((0.000000000000000D - $ +00,1.000000000000000D+00))*AMP(8)+((0.000000000000000D+00, - $ -1.000000000000000D+00))*AMP(10)+(-1.000000000000000D+00) - $ *TMP_JAMP(6) - JAMP(5,1) = ((0.000000000000000D+00,1.000000000000000D+00)) - $ *AMP(2)+((0.000000000000000D+00,-1.000000000000000D+00))*AMP(11) - $ +(-1.000000000000000D+00)*AMP(14)+TMP_JAMP(8) - JAMP(6,1) = ((0.000000000000000D+00,-1.000000000000000D+00)) - $ *AMP(2)+((0.000000000000000D+00,-1.000000000000000D+00))*AMP(8) - $ +(-1.000000000000000D+00)*AMP(9)+TMP_JAMP(10) + JAMP(1,1) = (-1.000000000000000D+00)*AMP(6)+(-1.000000000000000D + $ +00)*TMP_JAMP(6)+TMP_JAMP(8) + JAMP(2,1) = (-1.000000000000000D+00)*AMP(4)+TMP_JAMP(5)+( + $ -1.000000000000000D+00)*TMP_JAMP(8) + JAMP(3,1) = (-1.000000000000000D+00)*AMP(13)+( + $ -1.000000000000000D+00)*TMP_JAMP(4)+TMP_JAMP(6) + JAMP(4,1) = (-1.000000000000000D+00)*AMP(7)+TMP_JAMP(4)+( + $ -1.000000000000000D+00)*TMP_JAMP(9) + JAMP(5,1) = (-1.000000000000000D+00)*AMP(14)+( + $ -1.000000000000000D+00)*TMP_JAMP(5)+TMP_JAMP(7) + JAMP(6,1) = (-1.000000000000000D+00)*AMP(9)+(-1.000000000000000D + $ +00)*TMP_JAMP(7)+TMP_JAMP(9) IF(INIT_MODE)THEN DO I=1, NGRAPHS diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gu_ttxu/CPPProcess.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gu_ttxu/CPPProcess.cc index 2d43c24604..631f5dc2bd 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gu_ttxu/CPPProcess.cc +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gu_ttxu/CPPProcess.cc @@ -243,19 +243,19 @@ namespace mg5amcCpu // Wavefunction(s) for diagram number 1 vxxxxx( momenta, 0., cHel[ihel][0], -1, w_fp[0], 0 ); - imzxxx( momenta, cHel[ihel][1], +1, w_fp[1], 1 ); // NB: imzxxx only uses pz + ixxxxx( momenta, 0., cHel[ihel][1], +1, w_fp[1], 1 ); oxxxxx( momenta, cIPD[0], cHel[ihel][2], +1, w_fp[2], 2 ); ixxxxx( momenta, cIPD[0], cHel[ihel][3], -1, w_fp[3], 3 ); - oxzxxx( momenta, cHel[ihel][4], +1, w_fp[4], 4 ); + oxxxxx( momenta, 0., cHel[ihel][4], +1, w_fp[4], 4 ); - FFV1_2( w_fp[1], w_fp[0], COUPs[1], 0., 0., w_fp[5] ); - FFV1P0_3( w_fp[3], w_fp[2], COUPs[1], 0., 0., w_fp[6] ); + FFV1_2( w_fp[1], w_fp[0], COUPs[1], 1.0, 0., 0., w_fp[5] ); + FFV1P0_3( w_fp[3], w_fp[2], COUPs[1], 1.0, 0., 0., w_fp[6] ); // Amplitude(s) for diagram number 1 - FFV1_0( w_fp[5], w_fp[4], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[5], w_fp[4], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -266,11 +266,11 @@ namespace mg5amcCpu // *** DIAGRAM 2 OF 5 *** // Wavefunction(s) for diagram number 2 - FFV1_1( w_fp[2], w_fp[0], COUPs[1], cIPD[0], cIPD[1], w_fp[5] ); - FFV1P0_3( w_fp[1], w_fp[4], COUPs[1], 0., 0., w_fp[7] ); + FFV1_1( w_fp[2], w_fp[0], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[5] ); + FFV1P0_3( w_fp[1], w_fp[4], COUPs[1], 1.0, 0., 0., w_fp[7] ); // Amplitude(s) for diagram number 2 - FFV1_0( w_fp[3], w_fp[5], w_fp[7], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[5], w_fp[7], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 2 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -281,10 +281,10 @@ namespace mg5amcCpu // *** DIAGRAM 3 OF 5 *** // Wavefunction(s) for diagram number 3 - FFV1_2( w_fp[3], w_fp[0], COUPs[1], cIPD[0], cIPD[1], w_fp[5] ); + FFV1_2( w_fp[3], w_fp[0], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[5] ); // Amplitude(s) for diagram number 3 - FFV1_0( w_fp[5], w_fp[2], w_fp[7], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[5], w_fp[2], w_fp[7], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 3 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -295,10 +295,10 @@ namespace mg5amcCpu // *** DIAGRAM 4 OF 5 *** // Wavefunction(s) for diagram number 4 - FFV1_1( w_fp[4], w_fp[0], COUPs[1], 0., 0., w_fp[5] ); + FFV1_1( w_fp[4], w_fp[0], COUPs[1], 1.0, 0., 0., w_fp[5] ); // Amplitude(s) for diagram number 4 - FFV1_0( w_fp[1], w_fp[5], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[1], w_fp[5], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 4 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -312,7 +312,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 5 - VVV1_0( w_fp[0], w_fp[7], w_fp[6], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[0], w_fp[7], w_fp[6], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 5 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -856,14 +856,13 @@ namespace mg5amcCpu { // nprocesses>1 was last observed for "mirror processes" in uux_ttx in the 270 branch (see issue #343 and PRs #360 and #396) constexpr int nprocesses = 2; - static_assert( nprocesses == 1, "Assume nprocesses == 1" ); - // process_id corresponds to the index of DSIG1 Fortran functions (must be 1 because cudacpp is unable to handle DSIG2) + static_assert( nprocesses == 1 || nprocesses == 2, "Assume nprocesses == 1 or 2" ); constexpr int process_id = 1; // code generation source: madevent + cudacpp exporter static_assert( process_id == 1, "Assume process_id == 1" ); } // Denominators: spins, colors and identical particles - constexpr int helcolDenominators[1] = { 96,96 }; // assume nprocesses == 1 (#272 and #343) + constexpr int helcolDenominators[1] = { 96 }; // assume nprocesses == 1 (#272 and #343) #ifdef __CUDACC__ // Remember: in CUDA this is a kernel for one event, in c++ this processes n events diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gu_ttxu/auto_dsig1.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gu_ttxu/auto_dsig1.f index ca1b7c1dc5..81ab70f6d1 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gu_ttxu/auto_dsig1.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gu_ttxu/auto_dsig1.f @@ -42,6 +42,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C LOCAL VARIABLES C INTEGER I,ITYPE,LP,IPROC + DOUBLE PRECISION QSCALE DOUBLE PRECISION G1 DOUBLE PRECISION D2,U2,S2,C2 DOUBLE PRECISION XPQ(-7:7),PD(0:MAXPROC) @@ -129,14 +130,27 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) IF (ABS(LPP(IB(1))).GE.1) THEN !LP=SIGN(1,LPP(IB(1))) - G1=PDG2PDF(LPP(IB(1)),0, IB(1),XBK(IB(1)),DSQRT(Q2FACT(IB(1)))) + IF (DSQRT(Q2FACT(IB(1))).EQ.0D0) THEN + QSCALE=0D0 + DO I=3,NEXTERNAL + QSCALE=QSCALE+DSQRT(MAX(0D0,(PP(0,I)+PP(3,I))*(PP(0,I) + $ -PP(3,I)))) + ENDDO + QSCALE=QSCALE/2D0 + ELSE + QSCALE=DSQRT(Q2FACT(IB(1))) + ENDIF + G1=PDG2PDF(LPP(IB(1)),0, IB(1),XBK(IB(1)), QSCALE) ENDIF IF (ABS(LPP(IB(2))).GE.1) THEN !LP=SIGN(1,LPP(IB(2))) - D2=PDG2PDF(LPP(IB(2)),1, IB(2),XBK(IB(2)),DSQRT(Q2FACT(IB(2)))) - U2=PDG2PDF(LPP(IB(2)),2, IB(2),XBK(IB(2)),DSQRT(Q2FACT(IB(2)))) - S2=PDG2PDF(LPP(IB(2)),3, IB(2),XBK(IB(2)),DSQRT(Q2FACT(IB(2)))) - C2=PDG2PDF(LPP(IB(2)),4, IB(2),XBK(IB(2)),DSQRT(Q2FACT(IB(2)))) + IF (DSQRT(Q2FACT(IB(2))).NE.0D0) THEN + QSCALE=DSQRT(Q2FACT(IB(2))) + ENDIF + D2=PDG2PDF(LPP(IB(2)),1, IB(2),XBK(IB(2)), QSCALE) + U2=PDG2PDF(LPP(IB(2)),2, IB(2),XBK(IB(2)), QSCALE) + S2=PDG2PDF(LPP(IB(2)),3, IB(2),XBK(IB(2)), QSCALE) + C2=PDG2PDF(LPP(IB(2)),4, IB(2),XBK(IB(2)), QSCALE) ENDIF PD(0) = 0D0 IPROC = 0 diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gux_ttxux/CPPProcess.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gux_ttxux/CPPProcess.cc index a676bbeb6e..621b151226 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gux_ttxux/CPPProcess.cc +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gux_ttxux/CPPProcess.cc @@ -243,19 +243,19 @@ namespace mg5amcCpu // Wavefunction(s) for diagram number 1 vxxxxx( momenta, 0., cHel[ihel][0], -1, w_fp[0], 0 ); - omzxxx( momenta, cHel[ihel][1], -1, w_fp[1], 1 ); // NB: omzxxx only uses pz + oxxxxx( momenta, 0., cHel[ihel][1], -1, w_fp[1], 1 ); oxxxxx( momenta, cIPD[0], cHel[ihel][2], +1, w_fp[2], 2 ); ixxxxx( momenta, cIPD[0], cHel[ihel][3], -1, w_fp[3], 3 ); - ixzxxx( momenta, cHel[ihel][4], -1, w_fp[4], 4 ); + ixxxxx( momenta, 0., cHel[ihel][4], -1, w_fp[4], 4 ); - FFV1_2( w_fp[4], w_fp[0], COUPs[1], 0., 0., w_fp[5] ); - FFV1P0_3( w_fp[3], w_fp[2], COUPs[1], 0., 0., w_fp[6] ); + FFV1_2( w_fp[4], w_fp[0], COUPs[1], 1.0, 0., 0., w_fp[5] ); + FFV1P0_3( w_fp[3], w_fp[2], COUPs[1], 1.0, 0., 0., w_fp[6] ); // Amplitude(s) for diagram number 1 - FFV1_0( w_fp[5], w_fp[1], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[5], w_fp[1], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -266,11 +266,11 @@ namespace mg5amcCpu // *** DIAGRAM 2 OF 5 *** // Wavefunction(s) for diagram number 2 - FFV1_1( w_fp[2], w_fp[0], COUPs[1], cIPD[0], cIPD[1], w_fp[5] ); - FFV1P0_3( w_fp[4], w_fp[1], COUPs[1], 0., 0., w_fp[7] ); + FFV1_1( w_fp[2], w_fp[0], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[5] ); + FFV1P0_3( w_fp[4], w_fp[1], COUPs[1], 1.0, 0., 0., w_fp[7] ); // Amplitude(s) for diagram number 2 - FFV1_0( w_fp[3], w_fp[5], w_fp[7], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[5], w_fp[7], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 2 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -281,10 +281,10 @@ namespace mg5amcCpu // *** DIAGRAM 3 OF 5 *** // Wavefunction(s) for diagram number 3 - FFV1_2( w_fp[3], w_fp[0], COUPs[1], cIPD[0], cIPD[1], w_fp[5] ); + FFV1_2( w_fp[3], w_fp[0], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[5] ); // Amplitude(s) for diagram number 3 - FFV1_0( w_fp[5], w_fp[2], w_fp[7], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[5], w_fp[2], w_fp[7], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 3 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -295,10 +295,10 @@ namespace mg5amcCpu // *** DIAGRAM 4 OF 5 *** // Wavefunction(s) for diagram number 4 - FFV1_1( w_fp[1], w_fp[0], COUPs[1], 0., 0., w_fp[5] ); + FFV1_1( w_fp[1], w_fp[0], COUPs[1], 1.0, 0., 0., w_fp[5] ); // Amplitude(s) for diagram number 4 - FFV1_0( w_fp[4], w_fp[5], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[4], w_fp[5], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 4 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -312,7 +312,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 5 - VVV1_0( w_fp[0], w_fp[7], w_fp[6], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[0], w_fp[7], w_fp[6], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 5 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -856,14 +856,13 @@ namespace mg5amcCpu { // nprocesses>1 was last observed for "mirror processes" in uux_ttx in the 270 branch (see issue #343 and PRs #360 and #396) constexpr int nprocesses = 2; - static_assert( nprocesses == 1, "Assume nprocesses == 1" ); - // process_id corresponds to the index of DSIG1 Fortran functions (must be 1 because cudacpp is unable to handle DSIG2) + static_assert( nprocesses == 1 || nprocesses == 2, "Assume nprocesses == 1 or 2" ); constexpr int process_id = 1; // code generation source: madevent + cudacpp exporter static_assert( process_id == 1, "Assume process_id == 1" ); } // Denominators: spins, colors and identical particles - constexpr int helcolDenominators[1] = { 96,96 }; // assume nprocesses == 1 (#272 and #343) + constexpr int helcolDenominators[1] = { 96 }; // assume nprocesses == 1 (#272 and #343) #ifdef __CUDACC__ // Remember: in CUDA this is a kernel for one event, in c++ this processes n events diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gux_ttxux/auto_dsig1.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gux_ttxux/auto_dsig1.f index 33e638e237..b58c5d70bd 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gux_ttxux/auto_dsig1.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gux_ttxux/auto_dsig1.f @@ -42,6 +42,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C LOCAL VARIABLES C INTEGER I,ITYPE,LP,IPROC + DOUBLE PRECISION QSCALE DOUBLE PRECISION G1 DOUBLE PRECISION CX2,SX2,UX2,DX2 DOUBLE PRECISION XPQ(-7:7),PD(0:MAXPROC) @@ -129,18 +130,27 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) IF (ABS(LPP(IB(1))).GE.1) THEN !LP=SIGN(1,LPP(IB(1))) - G1=PDG2PDF(LPP(IB(1)),0, IB(1),XBK(IB(1)),DSQRT(Q2FACT(IB(1)))) + IF (DSQRT(Q2FACT(IB(1))).EQ.0D0) THEN + QSCALE=0D0 + DO I=3,NEXTERNAL + QSCALE=QSCALE+DSQRT(MAX(0D0,(PP(0,I)+PP(3,I))*(PP(0,I) + $ -PP(3,I)))) + ENDDO + QSCALE=QSCALE/2D0 + ELSE + QSCALE=DSQRT(Q2FACT(IB(1))) + ENDIF + G1=PDG2PDF(LPP(IB(1)),0, IB(1),XBK(IB(1)), QSCALE) ENDIF IF (ABS(LPP(IB(2))).GE.1) THEN !LP=SIGN(1,LPP(IB(2))) - CX2=PDG2PDF(LPP(IB(2)),-4, IB(2),XBK(IB(2)),DSQRT(Q2FACT(IB(2)) - $ )) - SX2=PDG2PDF(LPP(IB(2)),-3, IB(2),XBK(IB(2)),DSQRT(Q2FACT(IB(2)) - $ )) - UX2=PDG2PDF(LPP(IB(2)),-2, IB(2),XBK(IB(2)),DSQRT(Q2FACT(IB(2)) - $ )) - DX2=PDG2PDF(LPP(IB(2)),-1, IB(2),XBK(IB(2)),DSQRT(Q2FACT(IB(2)) - $ )) + IF (DSQRT(Q2FACT(IB(2))).NE.0D0) THEN + QSCALE=DSQRT(Q2FACT(IB(2))) + ENDIF + CX2=PDG2PDF(LPP(IB(2)),-4, IB(2),XBK(IB(2)), QSCALE) + SX2=PDG2PDF(LPP(IB(2)),-3, IB(2),XBK(IB(2)), QSCALE) + UX2=PDG2PDF(LPP(IB(2)),-2, IB(2),XBK(IB(2)), QSCALE) + DX2=PDG2PDF(LPP(IB(2)),-1, IB(2),XBK(IB(2)), QSCALE) ENDIF PD(0) = 0D0 IPROC = 0 diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_uux_ttxg/CPPProcess.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_uux_ttxg/CPPProcess.cc index 7edb26013e..ce7f4421dc 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_uux_ttxg/CPPProcess.cc +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_uux_ttxg/CPPProcess.cc @@ -241,9 +241,9 @@ namespace mg5amcCpu // *** DIAGRAM 1 OF 5 *** // Wavefunction(s) for diagram number 1 - ipzxxx( momenta, cHel[ihel][0], +1, w_fp[0], 0 ); // NB: ipzxxx only uses pz + ixxxxx( momenta, 0., cHel[ihel][0], +1, w_fp[0], 0 ); - omzxxx( momenta, cHel[ihel][1], -1, w_fp[1], 1 ); // NB: omzxxx only uses pz + oxxxxx( momenta, 0., cHel[ihel][1], -1, w_fp[1], 1 ); oxxxxx( momenta, cIPD[0], cHel[ihel][2], +1, w_fp[2], 2 ); @@ -251,11 +251,11 @@ namespace mg5amcCpu vxxxxx( momenta, 0., cHel[ihel][4], +1, w_fp[4], 4 ); - FFV1_2( w_fp[0], w_fp[4], COUPs[1], 0., 0., w_fp[5] ); - FFV1P0_3( w_fp[3], w_fp[2], COUPs[1], 0., 0., w_fp[6] ); + FFV1_2( w_fp[0], w_fp[4], COUPs[1], 1.0, 0., 0., w_fp[5] ); + FFV1P0_3( w_fp[3], w_fp[2], COUPs[1], 1.0, 0., 0., w_fp[6] ); // Amplitude(s) for diagram number 1 - FFV1_0( w_fp[5], w_fp[1], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[5], w_fp[1], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -266,11 +266,11 @@ namespace mg5amcCpu // *** DIAGRAM 2 OF 5 *** // Wavefunction(s) for diagram number 2 - FFV1_1( w_fp[2], w_fp[4], COUPs[1], cIPD[0], cIPD[1], w_fp[5] ); - FFV1P0_3( w_fp[0], w_fp[1], COUPs[1], 0., 0., w_fp[7] ); + FFV1_1( w_fp[2], w_fp[4], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[5] ); + FFV1P0_3( w_fp[0], w_fp[1], COUPs[1], 1.0, 0., 0., w_fp[7] ); // Amplitude(s) for diagram number 2 - FFV1_0( w_fp[3], w_fp[5], w_fp[7], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[5], w_fp[7], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 2 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -281,10 +281,10 @@ namespace mg5amcCpu // *** DIAGRAM 3 OF 5 *** // Wavefunction(s) for diagram number 3 - FFV1_2( w_fp[3], w_fp[4], COUPs[1], cIPD[0], cIPD[1], w_fp[5] ); + FFV1_2( w_fp[3], w_fp[4], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[5] ); // Amplitude(s) for diagram number 3 - FFV1_0( w_fp[5], w_fp[2], w_fp[7], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[5], w_fp[2], w_fp[7], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 3 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -295,10 +295,10 @@ namespace mg5amcCpu // *** DIAGRAM 4 OF 5 *** // Wavefunction(s) for diagram number 4 - FFV1_1( w_fp[1], w_fp[4], COUPs[1], 0., 0., w_fp[5] ); + FFV1_1( w_fp[1], w_fp[4], COUPs[1], 1.0, 0., 0., w_fp[5] ); // Amplitude(s) for diagram number 4 - FFV1_0( w_fp[0], w_fp[5], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[0], w_fp[5], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 4 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -312,7 +312,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 5 - VVV1_0( w_fp[4], w_fp[7], w_fp[6], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[4], w_fp[7], w_fp[6], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 5 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -856,14 +856,13 @@ namespace mg5amcCpu { // nprocesses>1 was last observed for "mirror processes" in uux_ttx in the 270 branch (see issue #343 and PRs #360 and #396) constexpr int nprocesses = 2; - static_assert( nprocesses == 1, "Assume nprocesses == 1" ); - // process_id corresponds to the index of DSIG1 Fortran functions (must be 1 because cudacpp is unable to handle DSIG2) + static_assert( nprocesses == 1 || nprocesses == 2, "Assume nprocesses == 1 or 2" ); constexpr int process_id = 1; // code generation source: madevent + cudacpp exporter static_assert( process_id == 1, "Assume process_id == 1" ); } // Denominators: spins, colors and identical particles - constexpr int helcolDenominators[1] = { 36,36 }; // assume nprocesses == 1 (#272 and #343) + constexpr int helcolDenominators[1] = { 36 }; // assume nprocesses == 1 (#272 and #343) #ifdef __CUDACC__ // Remember: in CUDA this is a kernel for one event, in c++ this processes n events diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_uux_ttxg/auto_dsig1.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_uux_ttxg/auto_dsig1.f index f2902c7183..d85b1143a0 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_uux_ttxg/auto_dsig1.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_uux_ttxg/auto_dsig1.f @@ -42,6 +42,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C LOCAL VARIABLES C INTEGER I,ITYPE,LP,IPROC + DOUBLE PRECISION QSCALE DOUBLE PRECISION D1,U1,S1,C1 DOUBLE PRECISION CX2,SX2,UX2,DX2 DOUBLE PRECISION XPQ(-7:7),PD(0:MAXPROC) @@ -129,21 +130,30 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) IF (ABS(LPP(IB(1))).GE.1) THEN !LP=SIGN(1,LPP(IB(1))) - D1=PDG2PDF(LPP(IB(1)),1, IB(1),XBK(IB(1)),DSQRT(Q2FACT(IB(1)))) - U1=PDG2PDF(LPP(IB(1)),2, IB(1),XBK(IB(1)),DSQRT(Q2FACT(IB(1)))) - S1=PDG2PDF(LPP(IB(1)),3, IB(1),XBK(IB(1)),DSQRT(Q2FACT(IB(1)))) - C1=PDG2PDF(LPP(IB(1)),4, IB(1),XBK(IB(1)),DSQRT(Q2FACT(IB(1)))) + IF (DSQRT(Q2FACT(IB(1))).EQ.0D0) THEN + QSCALE=0D0 + DO I=3,NEXTERNAL + QSCALE=QSCALE+DSQRT(MAX(0D0,(PP(0,I)+PP(3,I))*(PP(0,I) + $ -PP(3,I)))) + ENDDO + QSCALE=QSCALE/2D0 + ELSE + QSCALE=DSQRT(Q2FACT(IB(1))) + ENDIF + D1=PDG2PDF(LPP(IB(1)),1, IB(1),XBK(IB(1)), QSCALE) + U1=PDG2PDF(LPP(IB(1)),2, IB(1),XBK(IB(1)), QSCALE) + S1=PDG2PDF(LPP(IB(1)),3, IB(1),XBK(IB(1)), QSCALE) + C1=PDG2PDF(LPP(IB(1)),4, IB(1),XBK(IB(1)), QSCALE) ENDIF IF (ABS(LPP(IB(2))).GE.1) THEN !LP=SIGN(1,LPP(IB(2))) - CX2=PDG2PDF(LPP(IB(2)),-4, IB(2),XBK(IB(2)),DSQRT(Q2FACT(IB(2)) - $ )) - SX2=PDG2PDF(LPP(IB(2)),-3, IB(2),XBK(IB(2)),DSQRT(Q2FACT(IB(2)) - $ )) - UX2=PDG2PDF(LPP(IB(2)),-2, IB(2),XBK(IB(2)),DSQRT(Q2FACT(IB(2)) - $ )) - DX2=PDG2PDF(LPP(IB(2)),-1, IB(2),XBK(IB(2)),DSQRT(Q2FACT(IB(2)) - $ )) + IF (DSQRT(Q2FACT(IB(2))).NE.0D0) THEN + QSCALE=DSQRT(Q2FACT(IB(2))) + ENDIF + CX2=PDG2PDF(LPP(IB(2)),-4, IB(2),XBK(IB(2)), QSCALE) + SX2=PDG2PDF(LPP(IB(2)),-3, IB(2),XBK(IB(2)), QSCALE) + UX2=PDG2PDF(LPP(IB(2)),-2, IB(2),XBK(IB(2)), QSCALE) + DX2=PDG2PDF(LPP(IB(2)),-1, IB(2),XBK(IB(2)), QSCALE) ENDIF PD(0) = 0D0 IPROC = 0 diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxgg/CPPProcess.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxgg/CPPProcess.cc index f1e1f21142..c99d25f125 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxgg/CPPProcess.cc +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxgg/CPPProcess.cc @@ -250,11 +250,11 @@ namespace mg5amcCpu vxxxxx( momenta, 0., cHel[ihel][5], +1, w_fp[5], 5 ); - VVV1P0_1( w_fp[0], w_fp[1], COUPs[0], 0., 0., w_fp[6] ); - FFV1P0_3( w_fp[3], w_fp[2], COUPs[1], 0., 0., w_fp[7] ); + VVV1P0_1( w_fp[0], w_fp[1], COUPs[0], 1.0, 0., 0., w_fp[6] ); + FFV1P0_3( w_fp[3], w_fp[2], COUPs[1], 1.0, 0., 0., w_fp[7] ); // Amplitude(s) for diagram number 1 - VVVV1_0( w_fp[6], w_fp[7], w_fp[4], w_fp[5], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[6], w_fp[7], w_fp[4], w_fp[5], COUPs[2], 1.0, &_fp[0] ); jamp_sv[0] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[1] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[6] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -263,7 +263,7 @@ namespace mg5amcCpu jamp_sv[17] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[22] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[23] -= cxtype( 0, 1 ) * amp_sv[0]; - VVVV3_0( w_fp[6], w_fp[7], w_fp[4], w_fp[5], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[6], w_fp[7], w_fp[4], w_fp[5], COUPs[2], 1.0, &_fp[0] ); jamp_sv[0] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[6] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[12] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -272,7 +272,7 @@ namespace mg5amcCpu jamp_sv[20] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[22] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[23] -= cxtype( 0, 1 ) * amp_sv[0]; - VVVV4_0( w_fp[6], w_fp[7], w_fp[4], w_fp[5], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[6], w_fp[7], w_fp[4], w_fp[5], COUPs[2], 1.0, &_fp[0] ); jamp_sv[1] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[7] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[12] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -285,10 +285,10 @@ namespace mg5amcCpu // *** DIAGRAM 2 OF 123 *** // Wavefunction(s) for diagram number 2 - VVV1P0_1( w_fp[6], w_fp[4], COUPs[0], 0., 0., w_fp[8] ); + VVV1P0_1( w_fp[6], w_fp[4], COUPs[0], 1.0, 0., 0., w_fp[8] ); // Amplitude(s) for diagram number 2 - VVV1_0( w_fp[7], w_fp[5], w_fp[8], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[7], w_fp[5], w_fp[8], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 2 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -305,10 +305,10 @@ namespace mg5amcCpu // *** DIAGRAM 3 OF 123 *** // Wavefunction(s) for diagram number 3 - VVV1P0_1( w_fp[6], w_fp[5], COUPs[0], 0., 0., w_fp[9] ); + VVV1P0_1( w_fp[6], w_fp[5], COUPs[0], 1.0, 0., 0., w_fp[9] ); // Amplitude(s) for diagram number 3 - VVV1_0( w_fp[7], w_fp[4], w_fp[9], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[7], w_fp[4], w_fp[9], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 3 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -325,10 +325,10 @@ namespace mg5amcCpu // *** DIAGRAM 4 OF 123 *** // Wavefunction(s) for diagram number 4 - VVV1P0_1( w_fp[4], w_fp[5], COUPs[0], 0., 0., w_fp[10] ); + VVV1P0_1( w_fp[4], w_fp[5], COUPs[0], 1.0, 0., 0., w_fp[10] ); // Amplitude(s) for diagram number 4 - VVV1_0( w_fp[6], w_fp[7], w_fp[10], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[6], w_fp[7], w_fp[10], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 4 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -345,11 +345,11 @@ namespace mg5amcCpu // *** DIAGRAM 5 OF 123 *** // Wavefunction(s) for diagram number 5 - FFV1_1( w_fp[2], w_fp[4], COUPs[1], cIPD[0], cIPD[1], w_fp[11] ); - FFV1_2( w_fp[3], w_fp[6], COUPs[1], cIPD[0], cIPD[1], w_fp[12] ); + FFV1_1( w_fp[2], w_fp[4], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[11] ); + FFV1_2( w_fp[3], w_fp[6], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[12] ); // Amplitude(s) for diagram number 5 - FFV1_0( w_fp[12], w_fp[11], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[12], w_fp[11], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 5 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -363,7 +363,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 6 - FFV1_0( w_fp[3], w_fp[11], w_fp[9], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[11], w_fp[9], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 6 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -376,10 +376,10 @@ namespace mg5amcCpu // *** DIAGRAM 7 OF 123 *** // Wavefunction(s) for diagram number 7 - FFV1_2( w_fp[3], w_fp[5], COUPs[1], cIPD[0], cIPD[1], w_fp[13] ); + FFV1_2( w_fp[3], w_fp[5], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[13] ); // Amplitude(s) for diagram number 7 - FFV1_0( w_fp[13], w_fp[11], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[13], w_fp[11], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 7 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -390,10 +390,10 @@ namespace mg5amcCpu // *** DIAGRAM 8 OF 123 *** // Wavefunction(s) for diagram number 8 - FFV1_1( w_fp[2], w_fp[5], COUPs[1], cIPD[0], cIPD[1], w_fp[14] ); + FFV1_1( w_fp[2], w_fp[5], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[14] ); // Amplitude(s) for diagram number 8 - FFV1_0( w_fp[12], w_fp[14], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[12], w_fp[14], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 8 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -407,7 +407,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 9 - FFV1_0( w_fp[3], w_fp[14], w_fp[8], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[14], w_fp[8], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 9 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -420,10 +420,10 @@ namespace mg5amcCpu // *** DIAGRAM 10 OF 123 *** // Wavefunction(s) for diagram number 10 - FFV1_2( w_fp[3], w_fp[4], COUPs[1], cIPD[0], cIPD[1], w_fp[15] ); + FFV1_2( w_fp[3], w_fp[4], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[15] ); // Amplitude(s) for diagram number 10 - FFV1_0( w_fp[15], w_fp[14], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[15], w_fp[14], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 10 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -434,10 +434,10 @@ namespace mg5amcCpu // *** DIAGRAM 11 OF 123 *** // Wavefunction(s) for diagram number 11 - FFV1_1( w_fp[2], w_fp[6], COUPs[1], cIPD[0], cIPD[1], w_fp[16] ); + FFV1_1( w_fp[2], w_fp[6], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[16] ); // Amplitude(s) for diagram number 11 - FFV1_0( w_fp[15], w_fp[16], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[15], w_fp[16], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 11 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -451,7 +451,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 12 - FFV1_0( w_fp[15], w_fp[2], w_fp[9], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[15], w_fp[2], w_fp[9], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 12 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -467,7 +467,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 13 - FFV1_0( w_fp[13], w_fp[16], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[13], w_fp[16], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 13 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -481,7 +481,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 14 - FFV1_0( w_fp[13], w_fp[2], w_fp[8], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[13], w_fp[2], w_fp[8], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 14 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -497,7 +497,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 15 - FFV1_0( w_fp[3], w_fp[16], w_fp[10], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[16], w_fp[10], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 15 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -513,7 +513,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 16 - FFV1_0( w_fp[12], w_fp[2], w_fp[10], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[12], w_fp[2], w_fp[10], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 16 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -526,12 +526,12 @@ namespace mg5amcCpu // *** DIAGRAM 17 OF 123 *** // Wavefunction(s) for diagram number 17 - FFV1_1( w_fp[2], w_fp[0], COUPs[1], cIPD[0], cIPD[1], w_fp[12] ); - FFV1_2( w_fp[3], w_fp[1], COUPs[1], cIPD[0], cIPD[1], w_fp[16] ); - FFV1_1( w_fp[12], w_fp[4], COUPs[1], cIPD[0], cIPD[1], w_fp[8] ); + FFV1_1( w_fp[2], w_fp[0], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[12] ); + FFV1_2( w_fp[3], w_fp[1], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[16] ); + FFV1_1( w_fp[12], w_fp[4], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[8] ); // Amplitude(s) for diagram number 17 - FFV1_0( w_fp[16], w_fp[8], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[16], w_fp[8], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 17 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -541,10 +541,10 @@ namespace mg5amcCpu // *** DIAGRAM 18 OF 123 *** // Wavefunction(s) for diagram number 18 - FFV1_1( w_fp[12], w_fp[5], COUPs[1], cIPD[0], cIPD[1], w_fp[9] ); + FFV1_1( w_fp[12], w_fp[5], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[9] ); // Amplitude(s) for diagram number 18 - FFV1_0( w_fp[16], w_fp[9], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[16], w_fp[9], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 18 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -557,7 +557,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 19 - FFV1_0( w_fp[16], w_fp[12], w_fp[10], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[16], w_fp[12], w_fp[10], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 19 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -568,11 +568,11 @@ namespace mg5amcCpu // *** DIAGRAM 20 OF 123 *** // Wavefunction(s) for diagram number 20 - VVV1P0_1( w_fp[1], w_fp[4], COUPs[0], 0., 0., w_fp[6] ); - FFV1P0_3( w_fp[3], w_fp[12], COUPs[1], 0., 0., w_fp[17] ); + VVV1P0_1( w_fp[1], w_fp[4], COUPs[0], 1.0, 0., 0., w_fp[6] ); + FFV1P0_3( w_fp[3], w_fp[12], COUPs[1], 1.0, 0., 0., w_fp[17] ); // Amplitude(s) for diagram number 20 - VVV1_0( w_fp[6], w_fp[5], w_fp[17], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[6], w_fp[5], w_fp[17], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 20 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -588,7 +588,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 21 - FFV1_0( w_fp[3], w_fp[9], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[9], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 21 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -602,7 +602,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 22 - FFV1_0( w_fp[13], w_fp[12], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[13], w_fp[12], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 22 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -613,10 +613,10 @@ namespace mg5amcCpu // *** DIAGRAM 23 OF 123 *** // Wavefunction(s) for diagram number 23 - VVV1P0_1( w_fp[1], w_fp[5], COUPs[0], 0., 0., w_fp[18] ); + VVV1P0_1( w_fp[1], w_fp[5], COUPs[0], 1.0, 0., 0., w_fp[18] ); // Amplitude(s) for diagram number 23 - VVV1_0( w_fp[18], w_fp[4], w_fp[17], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[18], w_fp[4], w_fp[17], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 23 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -632,7 +632,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 24 - FFV1_0( w_fp[3], w_fp[8], w_fp[18], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[8], w_fp[18], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 24 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -646,7 +646,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 25 - FFV1_0( w_fp[15], w_fp[12], w_fp[18], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[15], w_fp[12], w_fp[18], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 25 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -657,10 +657,10 @@ namespace mg5amcCpu // *** DIAGRAM 26 OF 123 *** // Wavefunction(s) for diagram number 26 - FFV1_1( w_fp[12], w_fp[1], COUPs[1], cIPD[0], cIPD[1], w_fp[19] ); + FFV1_1( w_fp[12], w_fp[1], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[19] ); // Amplitude(s) for diagram number 26 - FFV1_0( w_fp[15], w_fp[19], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[15], w_fp[19], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 26 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -673,7 +673,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 27 - FFV1_0( w_fp[15], w_fp[9], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[15], w_fp[9], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 27 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -686,7 +686,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 28 - FFV1_0( w_fp[13], w_fp[19], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[13], w_fp[19], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 28 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -699,7 +699,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 29 - FFV1_0( w_fp[13], w_fp[8], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[13], w_fp[8], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 29 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -712,7 +712,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 30 - FFV1_0( w_fp[3], w_fp[19], w_fp[10], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[19], w_fp[10], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 30 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -726,7 +726,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 31 - VVV1_0( w_fp[1], w_fp[10], w_fp[17], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[10], w_fp[17], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 31 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -739,22 +739,22 @@ namespace mg5amcCpu // *** DIAGRAM 32 OF 123 *** // Wavefunction(s) for diagram number 32 - VVVV1P0_1( w_fp[1], w_fp[4], w_fp[5], COUPs[2], 0., 0., w_fp[17] ); - VVVV3P0_1( w_fp[1], w_fp[4], w_fp[5], COUPs[2], 0., 0., w_fp[19] ); - VVVV4P0_1( w_fp[1], w_fp[4], w_fp[5], COUPs[2], 0., 0., w_fp[8] ); + VVVV1P0_1( w_fp[1], w_fp[4], w_fp[5], COUPs[2], 1.0, 0., 0., w_fp[17] ); + VVVV3P0_1( w_fp[1], w_fp[4], w_fp[5], COUPs[2], 1.0, 0., 0., w_fp[19] ); + VVVV4P0_1( w_fp[1], w_fp[4], w_fp[5], COUPs[2], 1.0, 0., 0., w_fp[8] ); // Amplitude(s) for diagram number 32 - FFV1_0( w_fp[3], w_fp[12], w_fp[17], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[12], w_fp[17], COUPs[1], 1.0, &_fp[0] ); jamp_sv[0] += amp_sv[0]; jamp_sv[1] -= amp_sv[0]; jamp_sv[3] -= amp_sv[0]; jamp_sv[5] += amp_sv[0]; - FFV1_0( w_fp[3], w_fp[12], w_fp[19], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[12], w_fp[19], COUPs[1], 1.0, &_fp[0] ); jamp_sv[1] -= amp_sv[0]; jamp_sv[2] += amp_sv[0]; jamp_sv[3] -= amp_sv[0]; jamp_sv[4] += amp_sv[0]; - FFV1_0( w_fp[3], w_fp[12], w_fp[8], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[12], w_fp[8], COUPs[1], 1.0, &_fp[0] ); jamp_sv[0] -= amp_sv[0]; jamp_sv[2] += amp_sv[0]; jamp_sv[4] += amp_sv[0]; @@ -763,12 +763,12 @@ namespace mg5amcCpu // *** DIAGRAM 33 OF 123 *** // Wavefunction(s) for diagram number 33 - FFV1_2( w_fp[3], w_fp[0], COUPs[1], cIPD[0], cIPD[1], w_fp[12] ); - FFV1_1( w_fp[2], w_fp[1], COUPs[1], cIPD[0], cIPD[1], w_fp[9] ); - FFV1_2( w_fp[12], w_fp[4], COUPs[1], cIPD[0], cIPD[1], w_fp[20] ); + FFV1_2( w_fp[3], w_fp[0], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[12] ); + FFV1_1( w_fp[2], w_fp[1], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[9] ); + FFV1_2( w_fp[12], w_fp[4], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[20] ); // Amplitude(s) for diagram number 33 - FFV1_0( w_fp[20], w_fp[9], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[20], w_fp[9], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 33 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -778,10 +778,10 @@ namespace mg5amcCpu // *** DIAGRAM 34 OF 123 *** // Wavefunction(s) for diagram number 34 - FFV1_2( w_fp[12], w_fp[5], COUPs[1], cIPD[0], cIPD[1], w_fp[21] ); + FFV1_2( w_fp[12], w_fp[5], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[21] ); // Amplitude(s) for diagram number 34 - FFV1_0( w_fp[21], w_fp[9], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[21], w_fp[9], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 34 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -794,7 +794,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 35 - FFV1_0( w_fp[12], w_fp[9], w_fp[10], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[12], w_fp[9], w_fp[10], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 35 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -805,10 +805,10 @@ namespace mg5amcCpu // *** DIAGRAM 36 OF 123 *** // Wavefunction(s) for diagram number 36 - FFV1P0_3( w_fp[12], w_fp[2], COUPs[1], 0., 0., w_fp[22] ); + FFV1P0_3( w_fp[12], w_fp[2], COUPs[1], 1.0, 0., 0., w_fp[22] ); // Amplitude(s) for diagram number 36 - VVV1_0( w_fp[6], w_fp[5], w_fp[22], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[6], w_fp[5], w_fp[22], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 36 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -824,7 +824,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 37 - FFV1_0( w_fp[21], w_fp[2], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[21], w_fp[2], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 37 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -838,7 +838,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 38 - FFV1_0( w_fp[12], w_fp[14], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[12], w_fp[14], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 38 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -852,7 +852,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 39 - VVV1_0( w_fp[18], w_fp[4], w_fp[22], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[18], w_fp[4], w_fp[22], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 39 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -868,7 +868,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 40 - FFV1_0( w_fp[20], w_fp[2], w_fp[18], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[20], w_fp[2], w_fp[18], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 40 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -882,7 +882,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 41 - FFV1_0( w_fp[12], w_fp[11], w_fp[18], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[12], w_fp[11], w_fp[18], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 41 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -893,10 +893,10 @@ namespace mg5amcCpu // *** DIAGRAM 42 OF 123 *** // Wavefunction(s) for diagram number 42 - FFV1_2( w_fp[12], w_fp[1], COUPs[1], cIPD[0], cIPD[1], w_fp[23] ); + FFV1_2( w_fp[12], w_fp[1], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[23] ); // Amplitude(s) for diagram number 42 - FFV1_0( w_fp[23], w_fp[11], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[23], w_fp[11], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 42 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -909,7 +909,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 43 - FFV1_0( w_fp[21], w_fp[11], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[21], w_fp[11], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 43 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -922,7 +922,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 44 - FFV1_0( w_fp[23], w_fp[14], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[23], w_fp[14], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 44 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -935,7 +935,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 45 - FFV1_0( w_fp[20], w_fp[14], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[20], w_fp[14], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 45 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -948,7 +948,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 46 - FFV1_0( w_fp[23], w_fp[2], w_fp[10], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[23], w_fp[2], w_fp[10], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 46 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -962,7 +962,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 47 - VVV1_0( w_fp[1], w_fp[10], w_fp[22], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[10], w_fp[22], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 47 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -978,17 +978,17 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 48 - FFV1_0( w_fp[12], w_fp[2], w_fp[17], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[12], w_fp[2], w_fp[17], COUPs[1], 1.0, &_fp[0] ); jamp_sv[9] += amp_sv[0]; jamp_sv[11] -= amp_sv[0]; jamp_sv[17] -= amp_sv[0]; jamp_sv[23] += amp_sv[0]; - FFV1_0( w_fp[12], w_fp[2], w_fp[19], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[12], w_fp[2], w_fp[19], COUPs[1], 1.0, &_fp[0] ); jamp_sv[11] -= amp_sv[0]; jamp_sv[15] += amp_sv[0]; jamp_sv[17] -= amp_sv[0]; jamp_sv[21] += amp_sv[0]; - FFV1_0( w_fp[12], w_fp[2], w_fp[8], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[12], w_fp[2], w_fp[8], COUPs[1], 1.0, &_fp[0] ); jamp_sv[9] -= amp_sv[0]; jamp_sv[15] += amp_sv[0]; jamp_sv[21] += amp_sv[0]; @@ -997,11 +997,11 @@ namespace mg5amcCpu // *** DIAGRAM 49 OF 123 *** // Wavefunction(s) for diagram number 49 - VVV1P0_1( w_fp[0], w_fp[4], COUPs[0], 0., 0., w_fp[12] ); - FFV1_2( w_fp[3], w_fp[12], COUPs[1], cIPD[0], cIPD[1], w_fp[22] ); + VVV1P0_1( w_fp[0], w_fp[4], COUPs[0], 1.0, 0., 0., w_fp[12] ); + FFV1_2( w_fp[3], w_fp[12], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[22] ); // Amplitude(s) for diagram number 49 - FFV1_0( w_fp[22], w_fp[9], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[22], w_fp[9], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 49 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1012,10 +1012,10 @@ namespace mg5amcCpu // *** DIAGRAM 50 OF 123 *** // Wavefunction(s) for diagram number 50 - VVV1P0_1( w_fp[12], w_fp[5], COUPs[0], 0., 0., w_fp[23] ); + VVV1P0_1( w_fp[12], w_fp[5], COUPs[0], 1.0, 0., 0., w_fp[23] ); // Amplitude(s) for diagram number 50 - FFV1_0( w_fp[3], w_fp[9], w_fp[23], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[9], w_fp[23], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 50 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1031,7 +1031,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 51 - FFV1_0( w_fp[13], w_fp[9], w_fp[12], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[13], w_fp[9], w_fp[12], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 51 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1042,10 +1042,10 @@ namespace mg5amcCpu // *** DIAGRAM 52 OF 123 *** // Wavefunction(s) for diagram number 52 - FFV1_1( w_fp[2], w_fp[12], COUPs[1], cIPD[0], cIPD[1], w_fp[20] ); + FFV1_1( w_fp[2], w_fp[12], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[20] ); // Amplitude(s) for diagram number 52 - FFV1_0( w_fp[16], w_fp[20], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[16], w_fp[20], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 52 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1059,7 +1059,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 53 - FFV1_0( w_fp[16], w_fp[2], w_fp[23], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[16], w_fp[2], w_fp[23], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 53 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1075,7 +1075,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 54 - FFV1_0( w_fp[16], w_fp[14], w_fp[12], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[16], w_fp[14], w_fp[12], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 54 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1089,7 +1089,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 55 - FFV1_0( w_fp[3], w_fp[20], w_fp[18], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[20], w_fp[18], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 55 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1105,7 +1105,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 56 - FFV1_0( w_fp[22], w_fp[2], w_fp[18], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[22], w_fp[2], w_fp[18], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 56 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1121,7 +1121,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 57 - VVV1_0( w_fp[12], w_fp[18], w_fp[7], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[12], w_fp[18], w_fp[7], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 57 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1141,7 +1141,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 58 - VVVV1_0( w_fp[12], w_fp[1], w_fp[7], w_fp[5], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[12], w_fp[1], w_fp[7], w_fp[5], COUPs[2], 1.0, &_fp[0] ); jamp_sv[2] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[6] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[8] += cxtype( 0, 1 ) * amp_sv[0]; @@ -1150,7 +1150,7 @@ namespace mg5amcCpu jamp_sv[20] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[21] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[22] += cxtype( 0, 1 ) * amp_sv[0]; - VVVV3_0( w_fp[12], w_fp[1], w_fp[7], w_fp[5], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[12], w_fp[1], w_fp[7], w_fp[5], COUPs[2], 1.0, &_fp[0] ); jamp_sv[2] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[3] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[10] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -1159,7 +1159,7 @@ namespace mg5amcCpu jamp_sv[13] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[20] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[21] -= cxtype( 0, 1 ) * amp_sv[0]; - VVVV4_0( w_fp[12], w_fp[1], w_fp[7], w_fp[5], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[12], w_fp[1], w_fp[7], w_fp[5], COUPs[2], 1.0, &_fp[0] ); jamp_sv[3] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[6] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[8] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -1172,10 +1172,10 @@ namespace mg5amcCpu // *** DIAGRAM 59 OF 123 *** // Wavefunction(s) for diagram number 59 - VVV1P0_1( w_fp[12], w_fp[1], COUPs[0], 0., 0., w_fp[21] ); + VVV1P0_1( w_fp[12], w_fp[1], COUPs[0], 1.0, 0., 0., w_fp[21] ); // Amplitude(s) for diagram number 59 - VVV1_0( w_fp[7], w_fp[5], w_fp[21], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[7], w_fp[5], w_fp[21], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 59 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1195,7 +1195,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 60 - VVV1_0( w_fp[1], w_fp[7], w_fp[23], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[7], w_fp[23], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 60 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1215,7 +1215,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 61 - FFV1_0( w_fp[3], w_fp[14], w_fp[21], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[14], w_fp[21], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 61 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1231,7 +1231,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 62 - FFV1_0( w_fp[22], w_fp[14], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[22], w_fp[14], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 62 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1245,7 +1245,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 63 - FFV1_0( w_fp[13], w_fp[2], w_fp[21], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[13], w_fp[2], w_fp[21], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 63 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1261,7 +1261,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 64 - FFV1_0( w_fp[13], w_fp[20], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[13], w_fp[20], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 64 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1272,11 +1272,11 @@ namespace mg5amcCpu // *** DIAGRAM 65 OF 123 *** // Wavefunction(s) for diagram number 65 - VVV1P0_1( w_fp[0], w_fp[5], COUPs[0], 0., 0., w_fp[20] ); - FFV1_2( w_fp[3], w_fp[20], COUPs[1], cIPD[0], cIPD[1], w_fp[21] ); + VVV1P0_1( w_fp[0], w_fp[5], COUPs[0], 1.0, 0., 0., w_fp[20] ); + FFV1_2( w_fp[3], w_fp[20], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[21] ); // Amplitude(s) for diagram number 65 - FFV1_0( w_fp[21], w_fp[9], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[21], w_fp[9], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 65 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1287,10 +1287,10 @@ namespace mg5amcCpu // *** DIAGRAM 66 OF 123 *** // Wavefunction(s) for diagram number 66 - VVV1P0_1( w_fp[20], w_fp[4], COUPs[0], 0., 0., w_fp[22] ); + VVV1P0_1( w_fp[20], w_fp[4], COUPs[0], 1.0, 0., 0., w_fp[22] ); // Amplitude(s) for diagram number 66 - FFV1_0( w_fp[3], w_fp[9], w_fp[22], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[9], w_fp[22], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 66 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1306,7 +1306,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 67 - FFV1_0( w_fp[15], w_fp[9], w_fp[20], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[15], w_fp[9], w_fp[20], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 67 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1317,10 +1317,10 @@ namespace mg5amcCpu // *** DIAGRAM 68 OF 123 *** // Wavefunction(s) for diagram number 68 - FFV1_1( w_fp[2], w_fp[20], COUPs[1], cIPD[0], cIPD[1], w_fp[23] ); + FFV1_1( w_fp[2], w_fp[20], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[23] ); // Amplitude(s) for diagram number 68 - FFV1_0( w_fp[16], w_fp[23], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[16], w_fp[23], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 68 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1334,7 +1334,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 69 - FFV1_0( w_fp[16], w_fp[2], w_fp[22], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[16], w_fp[2], w_fp[22], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 69 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1350,7 +1350,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 70 - FFV1_0( w_fp[16], w_fp[11], w_fp[20], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[16], w_fp[11], w_fp[20], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 70 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1364,7 +1364,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 71 - FFV1_0( w_fp[3], w_fp[23], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[23], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 71 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1380,7 +1380,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 72 - FFV1_0( w_fp[21], w_fp[2], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[21], w_fp[2], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 72 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1396,7 +1396,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 73 - VVV1_0( w_fp[20], w_fp[6], w_fp[7], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[20], w_fp[6], w_fp[7], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 73 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1416,7 +1416,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 74 - VVVV1_0( w_fp[20], w_fp[1], w_fp[7], w_fp[4], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[20], w_fp[1], w_fp[7], w_fp[4], COUPs[2], 1.0, &_fp[0] ); jamp_sv[4] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[7] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[10] += cxtype( 0, 1 ) * amp_sv[0]; @@ -1425,7 +1425,7 @@ namespace mg5amcCpu jamp_sv[15] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[16] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[18] -= cxtype( 0, 1 ) * amp_sv[0]; - VVVV3_0( w_fp[20], w_fp[1], w_fp[7], w_fp[4], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[20], w_fp[1], w_fp[7], w_fp[4], COUPs[2], 1.0, &_fp[0] ); jamp_sv[4] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[5] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[8] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -1434,7 +1434,7 @@ namespace mg5amcCpu jamp_sv[15] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[18] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[19] += cxtype( 0, 1 ) * amp_sv[0]; - VVVV4_0( w_fp[20], w_fp[1], w_fp[7], w_fp[4], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[20], w_fp[1], w_fp[7], w_fp[4], COUPs[2], 1.0, &_fp[0] ); jamp_sv[5] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[7] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[8] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -1447,10 +1447,10 @@ namespace mg5amcCpu // *** DIAGRAM 75 OF 123 *** // Wavefunction(s) for diagram number 75 - VVV1P0_1( w_fp[20], w_fp[1], COUPs[0], 0., 0., w_fp[12] ); + VVV1P0_1( w_fp[20], w_fp[1], COUPs[0], 1.0, 0., 0., w_fp[12] ); // Amplitude(s) for diagram number 75 - VVV1_0( w_fp[7], w_fp[4], w_fp[12], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[7], w_fp[4], w_fp[12], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 75 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1470,7 +1470,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 76 - VVV1_0( w_fp[1], w_fp[7], w_fp[22], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[7], w_fp[22], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 76 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1490,7 +1490,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 77 - FFV1_0( w_fp[3], w_fp[11], w_fp[12], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[11], w_fp[12], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 77 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1506,7 +1506,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 78 - FFV1_0( w_fp[21], w_fp[11], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[21], w_fp[11], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 78 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1520,7 +1520,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 79 - FFV1_0( w_fp[15], w_fp[2], w_fp[12], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[15], w_fp[2], w_fp[12], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 79 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1536,7 +1536,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 80 - FFV1_0( w_fp[15], w_fp[23], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[15], w_fp[23], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 80 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1547,10 +1547,10 @@ namespace mg5amcCpu // *** DIAGRAM 81 OF 123 *** // Wavefunction(s) for diagram number 81 - FFV1_1( w_fp[9], w_fp[0], COUPs[1], cIPD[0], cIPD[1], w_fp[23] ); + FFV1_1( w_fp[9], w_fp[0], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[23] ); // Amplitude(s) for diagram number 81 - FFV1_0( w_fp[15], w_fp[23], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[15], w_fp[23], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 81 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1560,10 +1560,10 @@ namespace mg5amcCpu // *** DIAGRAM 82 OF 123 *** // Wavefunction(s) for diagram number 82 - FFV1_2( w_fp[15], w_fp[0], COUPs[1], cIPD[0], cIPD[1], w_fp[12] ); + FFV1_2( w_fp[15], w_fp[0], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[12] ); // Amplitude(s) for diagram number 82 - FFV1_0( w_fp[12], w_fp[9], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[12], w_fp[9], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 82 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1576,7 +1576,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 83 - FFV1_0( w_fp[13], w_fp[23], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[13], w_fp[23], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 83 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1586,10 +1586,10 @@ namespace mg5amcCpu // *** DIAGRAM 84 OF 123 *** // Wavefunction(s) for diagram number 84 - FFV1_2( w_fp[13], w_fp[0], COUPs[1], cIPD[0], cIPD[1], w_fp[21] ); + FFV1_2( w_fp[13], w_fp[0], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[21] ); // Amplitude(s) for diagram number 84 - FFV1_0( w_fp[21], w_fp[9], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[21], w_fp[9], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 84 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1602,7 +1602,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 85 - FFV1_0( w_fp[3], w_fp[23], w_fp[10], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[23], w_fp[10], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 85 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1613,10 +1613,10 @@ namespace mg5amcCpu // *** DIAGRAM 86 OF 123 *** // Wavefunction(s) for diagram number 86 - VVV1P0_1( w_fp[0], w_fp[10], COUPs[0], 0., 0., w_fp[23] ); + VVV1P0_1( w_fp[0], w_fp[10], COUPs[0], 1.0, 0., 0., w_fp[23] ); // Amplitude(s) for diagram number 86 - FFV1_0( w_fp[3], w_fp[9], w_fp[23], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[9], w_fp[23], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 86 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1629,10 +1629,10 @@ namespace mg5amcCpu // *** DIAGRAM 87 OF 123 *** // Wavefunction(s) for diagram number 87 - FFV1_2( w_fp[16], w_fp[0], COUPs[1], cIPD[0], cIPD[1], w_fp[22] ); + FFV1_2( w_fp[16], w_fp[0], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[22] ); // Amplitude(s) for diagram number 87 - FFV1_0( w_fp[22], w_fp[11], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[22], w_fp[11], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 87 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1642,10 +1642,10 @@ namespace mg5amcCpu // *** DIAGRAM 88 OF 123 *** // Wavefunction(s) for diagram number 88 - FFV1_1( w_fp[11], w_fp[0], COUPs[1], cIPD[0], cIPD[1], w_fp[20] ); + FFV1_1( w_fp[11], w_fp[0], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[20] ); // Amplitude(s) for diagram number 88 - FFV1_0( w_fp[16], w_fp[20], w_fp[5], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[16], w_fp[20], w_fp[5], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 88 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1658,7 +1658,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 89 - FFV1_0( w_fp[22], w_fp[14], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[22], w_fp[14], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 89 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1668,10 +1668,10 @@ namespace mg5amcCpu // *** DIAGRAM 90 OF 123 *** // Wavefunction(s) for diagram number 90 - FFV1_1( w_fp[14], w_fp[0], COUPs[1], cIPD[0], cIPD[1], w_fp[24] ); + FFV1_1( w_fp[14], w_fp[0], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[24] ); // Amplitude(s) for diagram number 90 - FFV1_0( w_fp[16], w_fp[24], w_fp[4], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[16], w_fp[24], w_fp[4], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 90 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1684,7 +1684,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 91 - FFV1_0( w_fp[22], w_fp[2], w_fp[10], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[22], w_fp[2], w_fp[10], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 91 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1698,7 +1698,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 92 - FFV1_0( w_fp[16], w_fp[2], w_fp[23], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[16], w_fp[2], w_fp[23], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 92 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1714,7 +1714,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 93 - VVVV1_0( w_fp[0], w_fp[6], w_fp[7], w_fp[5], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[0], w_fp[6], w_fp[7], w_fp[5], COUPs[2], 1.0, &_fp[0] ); jamp_sv[0] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[2] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[8] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -1723,7 +1723,7 @@ namespace mg5amcCpu jamp_sv[19] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[21] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[23] -= cxtype( 0, 1 ) * amp_sv[0]; - VVVV3_0( w_fp[0], w_fp[6], w_fp[7], w_fp[5], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[0], w_fp[6], w_fp[7], w_fp[5], COUPs[2], 1.0, &_fp[0] ); jamp_sv[0] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[2] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[4] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -1732,7 +1732,7 @@ namespace mg5amcCpu jamp_sv[15] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[21] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[23] -= cxtype( 0, 1 ) * amp_sv[0]; - VVVV4_0( w_fp[0], w_fp[6], w_fp[7], w_fp[5], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[0], w_fp[6], w_fp[7], w_fp[5], COUPs[2], 1.0, &_fp[0] ); jamp_sv[4] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[5] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[8] += cxtype( 0, 1 ) * amp_sv[0]; @@ -1745,10 +1745,10 @@ namespace mg5amcCpu // *** DIAGRAM 94 OF 123 *** // Wavefunction(s) for diagram number 94 - VVV1P0_1( w_fp[0], w_fp[6], COUPs[0], 0., 0., w_fp[22] ); + VVV1P0_1( w_fp[0], w_fp[6], COUPs[0], 1.0, 0., 0., w_fp[22] ); // Amplitude(s) for diagram number 94 - VVV1_0( w_fp[7], w_fp[5], w_fp[22], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[7], w_fp[5], w_fp[22], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 94 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1765,10 +1765,10 @@ namespace mg5amcCpu // *** DIAGRAM 95 OF 123 *** // Wavefunction(s) for diagram number 95 - VVV1P0_1( w_fp[0], w_fp[7], COUPs[0], 0., 0., w_fp[25] ); + VVV1P0_1( w_fp[0], w_fp[7], COUPs[0], 1.0, 0., 0., w_fp[25] ); // Amplitude(s) for diagram number 95 - VVV1_0( w_fp[6], w_fp[5], w_fp[25], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[6], w_fp[5], w_fp[25], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 95 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1788,7 +1788,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 96 - FFV1_0( w_fp[3], w_fp[14], w_fp[22], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[14], w_fp[22], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 96 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1804,7 +1804,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 97 - FFV1_0( w_fp[3], w_fp[24], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[24], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 97 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1818,7 +1818,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 98 - FFV1_0( w_fp[13], w_fp[2], w_fp[22], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[13], w_fp[2], w_fp[22], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 98 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1834,7 +1834,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 99 - FFV1_0( w_fp[21], w_fp[2], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[21], w_fp[2], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 99 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1848,7 +1848,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 100 - VVVV1_0( w_fp[0], w_fp[18], w_fp[7], w_fp[4], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[0], w_fp[18], w_fp[7], w_fp[4], COUPs[2], 1.0, &_fp[0] ); jamp_sv[1] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[4] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[10] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -1857,7 +1857,7 @@ namespace mg5amcCpu jamp_sv[15] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[17] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[20] += cxtype( 0, 1 ) * amp_sv[0]; - VVVV3_0( w_fp[0], w_fp[18], w_fp[7], w_fp[4], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[0], w_fp[18], w_fp[7], w_fp[4], COUPs[2], 1.0, &_fp[0] ); jamp_sv[1] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[2] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[3] += cxtype( 0, 1 ) * amp_sv[0]; @@ -1866,7 +1866,7 @@ namespace mg5amcCpu jamp_sv[15] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[17] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[21] += cxtype( 0, 1 ) * amp_sv[0]; - VVVV4_0( w_fp[0], w_fp[18], w_fp[7], w_fp[4], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[0], w_fp[18], w_fp[7], w_fp[4], COUPs[2], 1.0, &_fp[0] ); jamp_sv[2] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[3] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[10] += cxtype( 0, 1 ) * amp_sv[0]; @@ -1879,10 +1879,10 @@ namespace mg5amcCpu // *** DIAGRAM 101 OF 123 *** // Wavefunction(s) for diagram number 101 - VVV1P0_1( w_fp[0], w_fp[18], COUPs[0], 0., 0., w_fp[6] ); + VVV1P0_1( w_fp[0], w_fp[18], COUPs[0], 1.0, 0., 0., w_fp[6] ); // Amplitude(s) for diagram number 101 - VVV1_0( w_fp[7], w_fp[4], w_fp[6], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[7], w_fp[4], w_fp[6], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 101 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1902,7 +1902,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 102 - VVV1_0( w_fp[18], w_fp[4], w_fp[25], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[18], w_fp[4], w_fp[25], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 102 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1922,7 +1922,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 103 - FFV1_0( w_fp[3], w_fp[11], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[11], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 103 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1938,7 +1938,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 104 - FFV1_0( w_fp[3], w_fp[20], w_fp[18], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[20], w_fp[18], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 104 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1952,7 +1952,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 105 - FFV1_0( w_fp[15], w_fp[2], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[15], w_fp[2], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 105 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1968,7 +1968,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 106 - FFV1_0( w_fp[12], w_fp[2], w_fp[18], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[12], w_fp[2], w_fp[18], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 106 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1982,7 +1982,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 107 - VVVV1_0( w_fp[0], w_fp[1], w_fp[7], w_fp[10], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[0], w_fp[1], w_fp[7], w_fp[10], COUPs[2], 1.0, &_fp[0] ); jamp_sv[0] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[1] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[6] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -1991,7 +1991,7 @@ namespace mg5amcCpu jamp_sv[17] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[22] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[23] -= cxtype( 0, 1 ) * amp_sv[0]; - VVVV3_0( w_fp[0], w_fp[1], w_fp[7], w_fp[10], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[0], w_fp[1], w_fp[7], w_fp[10], COUPs[2], 1.0, &_fp[0] ); jamp_sv[0] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[1] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[3] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -2000,7 +2000,7 @@ namespace mg5amcCpu jamp_sv[11] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[17] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[23] -= cxtype( 0, 1 ) * amp_sv[0]; - VVVV4_0( w_fp[0], w_fp[1], w_fp[7], w_fp[10], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[0], w_fp[1], w_fp[7], w_fp[10], COUPs[2], 1.0, &_fp[0] ); jamp_sv[3] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[5] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[6] += cxtype( 0, 1 ) * amp_sv[0]; @@ -2016,7 +2016,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 108 - VVV1_0( w_fp[1], w_fp[10], w_fp[25], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[10], w_fp[25], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 108 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -2036,7 +2036,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 109 - VVV1_0( w_fp[1], w_fp[7], w_fp[23], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[7], w_fp[23], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 109 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -2056,7 +2056,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 110 - FFV1_0( w_fp[13], w_fp[20], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[13], w_fp[20], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 110 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -2069,7 +2069,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 111 - FFV1_0( w_fp[21], w_fp[11], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[21], w_fp[11], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 111 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -2082,7 +2082,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 112 - FFV1_0( w_fp[15], w_fp[24], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[15], w_fp[24], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 112 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -2095,7 +2095,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 113 - FFV1_0( w_fp[12], w_fp[14], w_fp[1], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[12], w_fp[14], w_fp[1], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 113 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -2105,12 +2105,12 @@ namespace mg5amcCpu // *** DIAGRAM 114 OF 123 *** // Wavefunction(s) for diagram number 114 - VVVV1P0_1( w_fp[0], w_fp[1], w_fp[4], COUPs[2], 0., 0., w_fp[12] ); - VVVV3P0_1( w_fp[0], w_fp[1], w_fp[4], COUPs[2], 0., 0., w_fp[24] ); - VVVV4P0_1( w_fp[0], w_fp[1], w_fp[4], COUPs[2], 0., 0., w_fp[21] ); + VVVV1P0_1( w_fp[0], w_fp[1], w_fp[4], COUPs[2], 1.0, 0., 0., w_fp[12] ); + VVVV3P0_1( w_fp[0], w_fp[1], w_fp[4], COUPs[2], 1.0, 0., 0., w_fp[24] ); + VVVV4P0_1( w_fp[0], w_fp[1], w_fp[4], COUPs[2], 1.0, 0., 0., w_fp[21] ); // Amplitude(s) for diagram number 114 - VVV1_0( w_fp[12], w_fp[7], w_fp[5], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[12], w_fp[7], w_fp[5], COUPs[0], 1.0, &_fp[0] ); jamp_sv[0] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[2] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[8] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -2119,7 +2119,7 @@ namespace mg5amcCpu jamp_sv[19] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[21] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[23] -= cxtype( 0, 1 ) * amp_sv[0]; - VVV1_0( w_fp[24], w_fp[7], w_fp[5], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[24], w_fp[7], w_fp[5], COUPs[0], 1.0, &_fp[0] ); jamp_sv[2] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[6] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[8] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -2128,7 +2128,7 @@ namespace mg5amcCpu jamp_sv[20] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[21] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[22] -= cxtype( 0, 1 ) * amp_sv[0]; - VVV1_0( w_fp[21], w_fp[7], w_fp[5], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[21], w_fp[7], w_fp[5], COUPs[0], 1.0, &_fp[0] ); jamp_sv[0] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[6] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[12] += cxtype( 0, 1 ) * amp_sv[0]; @@ -2144,17 +2144,17 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 115 - FFV1_0( w_fp[3], w_fp[14], w_fp[12], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[14], w_fp[12], COUPs[1], 1.0, &_fp[0] ); jamp_sv[18] += amp_sv[0]; jamp_sv[19] -= amp_sv[0]; jamp_sv[21] -= amp_sv[0]; jamp_sv[23] += amp_sv[0]; - FFV1_0( w_fp[3], w_fp[14], w_fp[24], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[14], w_fp[24], COUPs[1], 1.0, &_fp[0] ); jamp_sv[19] -= amp_sv[0]; jamp_sv[20] += amp_sv[0]; jamp_sv[21] -= amp_sv[0]; jamp_sv[22] += amp_sv[0]; - FFV1_0( w_fp[3], w_fp[14], w_fp[21], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[14], w_fp[21], COUPs[1], 1.0, &_fp[0] ); jamp_sv[18] -= amp_sv[0]; jamp_sv[20] += amp_sv[0]; jamp_sv[22] += amp_sv[0]; @@ -2166,17 +2166,17 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 116 - FFV1_0( w_fp[13], w_fp[2], w_fp[12], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[13], w_fp[2], w_fp[12], COUPs[1], 1.0, &_fp[0] ); jamp_sv[0] += amp_sv[0]; jamp_sv[2] -= amp_sv[0]; jamp_sv[8] -= amp_sv[0]; jamp_sv[14] += amp_sv[0]; - FFV1_0( w_fp[13], w_fp[2], w_fp[24], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[13], w_fp[2], w_fp[24], COUPs[1], 1.0, &_fp[0] ); jamp_sv[2] -= amp_sv[0]; jamp_sv[6] += amp_sv[0]; jamp_sv[8] -= amp_sv[0]; jamp_sv[12] += amp_sv[0]; - FFV1_0( w_fp[13], w_fp[2], w_fp[21], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[13], w_fp[2], w_fp[21], COUPs[1], 1.0, &_fp[0] ); jamp_sv[0] -= amp_sv[0]; jamp_sv[6] += amp_sv[0]; jamp_sv[12] += amp_sv[0]; @@ -2185,12 +2185,12 @@ namespace mg5amcCpu // *** DIAGRAM 117 OF 123 *** // Wavefunction(s) for diagram number 117 - VVVV1P0_1( w_fp[0], w_fp[1], w_fp[5], COUPs[2], 0., 0., w_fp[21] ); - VVVV3P0_1( w_fp[0], w_fp[1], w_fp[5], COUPs[2], 0., 0., w_fp[13] ); - VVVV4P0_1( w_fp[0], w_fp[1], w_fp[5], COUPs[2], 0., 0., w_fp[24] ); + VVVV1P0_1( w_fp[0], w_fp[1], w_fp[5], COUPs[2], 1.0, 0., 0., w_fp[21] ); + VVVV3P0_1( w_fp[0], w_fp[1], w_fp[5], COUPs[2], 1.0, 0., 0., w_fp[13] ); + VVVV4P0_1( w_fp[0], w_fp[1], w_fp[5], COUPs[2], 1.0, 0., 0., w_fp[24] ); // Amplitude(s) for diagram number 117 - VVV1_0( w_fp[21], w_fp[7], w_fp[4], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[21], w_fp[7], w_fp[4], COUPs[0], 1.0, &_fp[0] ); jamp_sv[1] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[4] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[10] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -2199,7 +2199,7 @@ namespace mg5amcCpu jamp_sv[15] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[17] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[20] += cxtype( 0, 1 ) * amp_sv[0]; - VVV1_0( w_fp[13], w_fp[7], w_fp[4], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[13], w_fp[7], w_fp[4], COUPs[0], 1.0, &_fp[0] ); jamp_sv[4] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[7] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[10] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -2208,7 +2208,7 @@ namespace mg5amcCpu jamp_sv[15] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[16] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[18] += cxtype( 0, 1 ) * amp_sv[0]; - VVV1_0( w_fp[24], w_fp[7], w_fp[4], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[24], w_fp[7], w_fp[4], COUPs[0], 1.0, &_fp[0] ); jamp_sv[1] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[7] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[12] += cxtype( 0, 1 ) * amp_sv[0]; @@ -2224,17 +2224,17 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 118 - FFV1_0( w_fp[3], w_fp[11], w_fp[21], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[11], w_fp[21], COUPs[1], 1.0, &_fp[0] ); jamp_sv[12] += amp_sv[0]; jamp_sv[13] -= amp_sv[0]; jamp_sv[15] -= amp_sv[0]; jamp_sv[17] += amp_sv[0]; - FFV1_0( w_fp[3], w_fp[11], w_fp[13], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[11], w_fp[13], COUPs[1], 1.0, &_fp[0] ); jamp_sv[13] -= amp_sv[0]; jamp_sv[14] += amp_sv[0]; jamp_sv[15] -= amp_sv[0]; jamp_sv[16] += amp_sv[0]; - FFV1_0( w_fp[3], w_fp[11], w_fp[24], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[11], w_fp[24], COUPs[1], 1.0, &_fp[0] ); jamp_sv[12] -= amp_sv[0]; jamp_sv[14] += amp_sv[0]; jamp_sv[16] += amp_sv[0]; @@ -2246,17 +2246,17 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 119 - FFV1_0( w_fp[15], w_fp[2], w_fp[21], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[15], w_fp[2], w_fp[21], COUPs[1], 1.0, &_fp[0] ); jamp_sv[1] += amp_sv[0]; jamp_sv[4] -= amp_sv[0]; jamp_sv[10] -= amp_sv[0]; jamp_sv[20] += amp_sv[0]; - FFV1_0( w_fp[15], w_fp[2], w_fp[13], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[15], w_fp[2], w_fp[13], COUPs[1], 1.0, &_fp[0] ); jamp_sv[4] -= amp_sv[0]; jamp_sv[7] += amp_sv[0]; jamp_sv[10] -= amp_sv[0]; jamp_sv[18] += amp_sv[0]; - FFV1_0( w_fp[15], w_fp[2], w_fp[24], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[15], w_fp[2], w_fp[24], COUPs[1], 1.0, &_fp[0] ); jamp_sv[1] -= amp_sv[0]; jamp_sv[7] += amp_sv[0]; jamp_sv[18] += amp_sv[0]; @@ -2265,22 +2265,22 @@ namespace mg5amcCpu // *** DIAGRAM 120 OF 123 *** // Wavefunction(s) for diagram number 120 - VVVV1P0_1( w_fp[0], w_fp[4], w_fp[5], COUPs[2], 0., 0., w_fp[24] ); - VVVV3P0_1( w_fp[0], w_fp[4], w_fp[5], COUPs[2], 0., 0., w_fp[15] ); - VVVV4P0_1( w_fp[0], w_fp[4], w_fp[5], COUPs[2], 0., 0., w_fp[13] ); + VVVV1P0_1( w_fp[0], w_fp[4], w_fp[5], COUPs[2], 1.0, 0., 0., w_fp[24] ); + VVVV3P0_1( w_fp[0], w_fp[4], w_fp[5], COUPs[2], 1.0, 0., 0., w_fp[15] ); + VVVV4P0_1( w_fp[0], w_fp[4], w_fp[5], COUPs[2], 1.0, 0., 0., w_fp[13] ); // Amplitude(s) for diagram number 120 - FFV1_0( w_fp[3], w_fp[9], w_fp[24], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[9], w_fp[24], COUPs[1], 1.0, &_fp[0] ); jamp_sv[6] += amp_sv[0]; jamp_sv[7] -= amp_sv[0]; jamp_sv[9] -= amp_sv[0]; jamp_sv[11] += amp_sv[0]; - FFV1_0( w_fp[3], w_fp[9], w_fp[15], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[9], w_fp[15], COUPs[1], 1.0, &_fp[0] ); jamp_sv[7] -= amp_sv[0]; jamp_sv[8] += amp_sv[0]; jamp_sv[9] -= amp_sv[0]; jamp_sv[10] += amp_sv[0]; - FFV1_0( w_fp[3], w_fp[9], w_fp[13], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[9], w_fp[13], COUPs[1], 1.0, &_fp[0] ); jamp_sv[6] -= amp_sv[0]; jamp_sv[8] += amp_sv[0]; jamp_sv[10] += amp_sv[0]; @@ -2292,17 +2292,17 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 121 - FFV1_0( w_fp[16], w_fp[2], w_fp[24], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[16], w_fp[2], w_fp[24], COUPs[1], 1.0, &_fp[0] ); jamp_sv[3] += amp_sv[0]; jamp_sv[5] -= amp_sv[0]; jamp_sv[16] -= amp_sv[0]; jamp_sv[22] += amp_sv[0]; - FFV1_0( w_fp[16], w_fp[2], w_fp[15], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[16], w_fp[2], w_fp[15], COUPs[1], 1.0, &_fp[0] ); jamp_sv[5] -= amp_sv[0]; jamp_sv[13] += amp_sv[0]; jamp_sv[16] -= amp_sv[0]; jamp_sv[19] += amp_sv[0]; - FFV1_0( w_fp[16], w_fp[2], w_fp[13], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[16], w_fp[2], w_fp[13], COUPs[1], 1.0, &_fp[0] ); jamp_sv[3] -= amp_sv[0]; jamp_sv[13] += amp_sv[0]; jamp_sv[19] += amp_sv[0]; @@ -2314,7 +2314,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 122 - VVV1_0( w_fp[24], w_fp[1], w_fp[7], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[24], w_fp[1], w_fp[7], COUPs[0], 1.0, &_fp[0] ); jamp_sv[3] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[5] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[6] += cxtype( 0, 1 ) * amp_sv[0]; @@ -2323,7 +2323,7 @@ namespace mg5amcCpu jamp_sv[11] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[16] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[22] -= cxtype( 0, 1 ) * amp_sv[0]; - VVV1_0( w_fp[15], w_fp[1], w_fp[7], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[15], w_fp[1], w_fp[7], COUPs[0], 1.0, &_fp[0] ); jamp_sv[5] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[7] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[8] += cxtype( 0, 1 ) * amp_sv[0]; @@ -2332,7 +2332,7 @@ namespace mg5amcCpu jamp_sv[13] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[16] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[19] -= cxtype( 0, 1 ) * amp_sv[0]; - VVV1_0( w_fp[13], w_fp[1], w_fp[7], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[13], w_fp[1], w_fp[7], COUPs[0], 1.0, &_fp[0] ); jamp_sv[3] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[6] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[8] += cxtype( 0, 1 ) * amp_sv[0]; @@ -2348,7 +2348,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 123 - VVV1_0( w_fp[0], w_fp[17], w_fp[7], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[0], w_fp[17], w_fp[7], COUPs[0], 1.0, &_fp[0] ); jamp_sv[0] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[1] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[3] += cxtype( 0, 1 ) * amp_sv[0]; @@ -2357,7 +2357,7 @@ namespace mg5amcCpu jamp_sv[11] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[17] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[23] += cxtype( 0, 1 ) * amp_sv[0]; - VVV1_0( w_fp[0], w_fp[19], w_fp[7], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[0], w_fp[19], w_fp[7], COUPs[0], 1.0, &_fp[0] ); jamp_sv[1] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[2] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[3] += cxtype( 0, 1 ) * amp_sv[0]; @@ -2366,7 +2366,7 @@ namespace mg5amcCpu jamp_sv[15] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[17] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[21] += cxtype( 0, 1 ) * amp_sv[0]; - VVV1_0( w_fp[0], w_fp[8], w_fp[7], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[0], w_fp[8], w_fp[7], COUPs[0], 1.0, &_fp[0] ); jamp_sv[0] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[2] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[4] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -2966,8 +2966,7 @@ namespace mg5amcCpu { // nprocesses>1 was last observed for "mirror processes" in uux_ttx in the 270 branch (see issue #343 and PRs #360 and #396) constexpr int nprocesses = 1; - static_assert( nprocesses == 1, "Assume nprocesses == 1" ); - // process_id corresponds to the index of DSIG1 Fortran functions (must be 1 because cudacpp is unable to handle DSIG2) + static_assert( nprocesses == 1 || nprocesses == 2, "Assume nprocesses == 1 or 2" ); constexpr int process_id = 1; // code generation source: madevent + cudacpp exporter static_assert( process_id == 1, "Assume process_id == 1" ); } diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxgg/auto_dsig1.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxgg/auto_dsig1.f index 3f0b6e29c5..4d2e1b4f8c 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxgg/auto_dsig1.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxgg/auto_dsig1.f @@ -39,6 +39,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C LOCAL VARIABLES C INTEGER I,ITYPE,LP,IPROC + DOUBLE PRECISION QSCALE DOUBLE PRECISION G1 DOUBLE PRECISION G2 DOUBLE PRECISION XPQ(-7:7),PD(0:MAXPROC) @@ -126,11 +127,24 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) IF (ABS(LPP(IB(1))).GE.1) THEN !LP=SIGN(1,LPP(IB(1))) - G1=PDG2PDF(LPP(IB(1)),0, IB(1),XBK(IB(1)),DSQRT(Q2FACT(IB(1)))) + IF (DSQRT(Q2FACT(IB(1))).EQ.0D0) THEN + QSCALE=0D0 + DO I=3,NEXTERNAL + QSCALE=QSCALE+DSQRT(MAX(0D0,(PP(0,I)+PP(3,I))*(PP(0,I) + $ -PP(3,I)))) + ENDDO + QSCALE=QSCALE/2D0 + ELSE + QSCALE=DSQRT(Q2FACT(IB(1))) + ENDIF + G1=PDG2PDF(LPP(IB(1)),0, IB(1),XBK(IB(1)), QSCALE) ENDIF IF (ABS(LPP(IB(2))).GE.1) THEN !LP=SIGN(1,LPP(IB(2))) - G2=PDG2PDF(LPP(IB(2)),0, IB(2),XBK(IB(2)),DSQRT(Q2FACT(IB(2)))) + IF (DSQRT(Q2FACT(IB(2))).NE.0D0) THEN + QSCALE=DSQRT(Q2FACT(IB(2))) + ENDIF + G2=PDG2PDF(LPP(IB(2)),0, IB(2),XBK(IB(2)), QSCALE) ENDIF PD(0) = 0D0 IPROC = 0 diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxgg/matrix1.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxgg/matrix1.f index 2f7edac864..89b2ef87b4 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxgg/matrix1.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxgg/matrix1.f @@ -391,7 +391,7 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C LOCAL VARIABLES C INTEGER I,J,M,N - COMPLEX*16 ZTEMP, TMP_JAMP(163) + COMPLEX*16 ZTEMP, TMP_JAMP(155) REAL*8 CF(NCOLOR,NCOLOR) COMPLEX*16 AMP(NGRAPHS), JAMP(NCOLOR,NAMPSO) COMPLEX*16 W(6,NWAVEFUNCS) @@ -1218,362 +1218,318 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) TMP_JAMP(3) = AMP(84) + AMP(86) ! used 8 times TMP_JAMP(2) = AMP(81) - AMP(83) ! used 8 times TMP_JAMP(1) = AMP(82) + AMP(85) ! used 8 times - TMP_JAMP(30) = TMP_JAMP(11) + AMP(121) ! used 8 times - TMP_JAMP(29) = TMP_JAMP(12) - AMP(132) ! used 8 times + TMP_JAMP(30) = TMP_JAMP(15) - AMP(157) ! used 8 times + TMP_JAMP(29) = TMP_JAMP(14) + AMP(159) ! used 8 times TMP_JAMP(28) = TMP_JAMP(13) + AMP(130) ! used 8 times - TMP_JAMP(27) = TMP_JAMP(14) + AMP(159) ! used 8 times - TMP_JAMP(26) = TMP_JAMP(15) - AMP(157) ! used 8 times - TMP_JAMP(25) = TMP_JAMP(8) - AMP(131) ! used 8 times + TMP_JAMP(27) = TMP_JAMP(12) - AMP(132) ! used 8 times + TMP_JAMP(26) = TMP_JAMP(11) + AMP(121) ! used 8 times + TMP_JAMP(25) = TMP_JAMP(10) + AMP(154) ! used 8 times TMP_JAMP(24) = TMP_JAMP(9) - AMP(156) ! used 8 times - TMP_JAMP(23) = TMP_JAMP(10) + AMP(154) ! used 8 times - TMP_JAMP(22) = TMP_JAMP(6) + AMP(114) ! used 8 times - TMP_JAMP(21) = TMP_JAMP(7) + AMP(158) ! used 8 times - TMP_JAMP(20) = TMP_JAMP(4) - AMP(141) ! used 8 times - TMP_JAMP(19) = TMP_JAMP(5) + AMP(139) ! used 8 times - TMP_JAMP(18) = TMP_JAMP(2) + AMP(105) ! used 8 times - TMP_JAMP(17) = TMP_JAMP(3) - AMP(155) ! used 8 times + TMP_JAMP(23) = TMP_JAMP(8) - AMP(131) ! used 8 times + TMP_JAMP(22) = TMP_JAMP(7) + AMP(158) ! used 8 times + TMP_JAMP(21) = TMP_JAMP(6) + AMP(114) ! used 8 times + TMP_JAMP(20) = TMP_JAMP(5) + AMP(139) ! used 8 times + TMP_JAMP(19) = TMP_JAMP(4) - AMP(141) ! used 8 times + TMP_JAMP(18) = TMP_JAMP(3) - AMP(155) ! used 8 times + TMP_JAMP(17) = TMP_JAMP(2) + AMP(105) ! used 8 times TMP_JAMP(16) = TMP_JAMP(1) - AMP(140) ! used 8 times - TMP_JAMP(90) = AMP(108) + AMP(133) ! used 4 times - TMP_JAMP(89) = AMP(51) + AMP(52) ! used 4 times - TMP_JAMP(88) = AMP(40) - AMP(54) ! used 4 times - TMP_JAMP(87) = AMP(11) - AMP(135) ! used 4 times - TMP_JAMP(86) = TMP_JAMP(26) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(51) ! used 4 times - TMP_JAMP(85) = TMP_JAMP(28) + TMP_JAMP(27) ! used 4 times - TMP_JAMP(84) = TMP_JAMP(29) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(11) ! used 4 times - TMP_JAMP(83) = TMP_JAMP(30) + TMP_JAMP(29) ! used 4 times - TMP_JAMP(82) = AMP(102) + AMP(151) ! used 4 times - TMP_JAMP(81) = AMP(69) - AMP(134) ! used 4 times - TMP_JAMP(80) = AMP(59) - AMP(153) ! used 4 times - TMP_JAMP(79) = TMP_JAMP(23) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(102) ! used 4 times - TMP_JAMP(78) = TMP_JAMP(24) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(59) ! used 4 times - TMP_JAMP(77) = TMP_JAMP(25) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(69) ! used 4 times - TMP_JAMP(76) = TMP_JAMP(29) + TMP_JAMP(25) ! used 4 times - TMP_JAMP(75) = TMP_JAMP(30) - TMP_JAMP(23) ! used 4 times - TMP_JAMP(74) = AMP(43) - AMP(53) ! used 4 times - TMP_JAMP(73) = TMP_JAMP(21) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(43) ! used 4 times - TMP_JAMP(72) = TMP_JAMP(22) + ((0.000000000000000D+00, + TMP_JAMP(80) = TMP_JAMP(30) + TMP_JAMP(29) ! used 4 times + TMP_JAMP(79) = TMP_JAMP(30) - TMP_JAMP(22) ! used 4 times + TMP_JAMP(78) = TMP_JAMP(29) + TMP_JAMP(22) ! used 4 times + TMP_JAMP(77) = TMP_JAMP(28) + TMP_JAMP(27) ! used 4 times + TMP_JAMP(76) = TMP_JAMP(28) - TMP_JAMP(23) ! used 4 times + TMP_JAMP(75) = TMP_JAMP(27) + TMP_JAMP(23) ! used 4 times + TMP_JAMP(74) = TMP_JAMP(27) + TMP_JAMP(19) ! used 4 times + TMP_JAMP(73) = TMP_JAMP(26) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(18) ! used 4 times + TMP_JAMP(72) = TMP_JAMP(26) - TMP_JAMP(25) ! used 4 times + TMP_JAMP(71) = TMP_JAMP(26) - TMP_JAMP(19) ! used 4 times + TMP_JAMP(70) = TMP_JAMP(26) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(17) ! used 4 times + TMP_JAMP(69) = TMP_JAMP(25) + TMP_JAMP(24) ! used 4 times + TMP_JAMP(68) = TMP_JAMP(25) - TMP_JAMP(18) ! used 4 times + TMP_JAMP(67) = TMP_JAMP(24) - TMP_JAMP(23) ! used 4 times + TMP_JAMP(66) = TMP_JAMP(24) + TMP_JAMP(18) ! used 4 times + TMP_JAMP(65) = TMP_JAMP(22) + TMP_JAMP(20) ! used 4 times + TMP_JAMP(64) = TMP_JAMP(21) + ((0.000000000000000D+00, $ -1.000000000000000D+00)) * AMP(62) ! used 4 times - TMP_JAMP(71) = TMP_JAMP(22) + TMP_JAMP(21) ! used 4 times - TMP_JAMP(70) = TMP_JAMP(27) + TMP_JAMP(21) ! used 4 times - TMP_JAMP(69) = TMP_JAMP(28) - TMP_JAMP(25) ! used 4 times - TMP_JAMP(68) = AMP(119) + AMP(145) ! used 4 times - TMP_JAMP(67) = AMP(14) - AMP(147) ! used 4 times - TMP_JAMP(66) = TMP_JAMP(20) + TMP_JAMP(19) ! used 4 times - TMP_JAMP(65) = TMP_JAMP(22) - TMP_JAMP(19) ! used 4 times - TMP_JAMP(64) = TMP_JAMP(29) + TMP_JAMP(20) ! used 4 times - TMP_JAMP(63) = AMP(77) - AMP(152) ! used 4 times - TMP_JAMP(62) = TMP_JAMP(17) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(77) ! used 4 times - TMP_JAMP(61) = TMP_JAMP(18) + ((-0.000000000000000D+00 + TMP_JAMP(63) = TMP_JAMP(21) - TMP_JAMP(20) ! used 4 times + TMP_JAMP(62) = TMP_JAMP(21) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(61) ! used 4 times + TMP_JAMP(61) = TMP_JAMP(20) + TMP_JAMP(19) ! used 4 times + TMP_JAMP(60) = TMP_JAMP(20) - TMP_JAMP(16) ! used 4 times + TMP_JAMP(59) = TMP_JAMP(19) + TMP_JAMP(16) ! used 4 times + TMP_JAMP(58) = TMP_JAMP(18) - TMP_JAMP(16) ! used 4 times + TMP_JAMP(57) = TMP_JAMP(17) + ((-0.000000000000000D+00 $ ,1.000000000000000D+00)) * AMP(79) ! used 4 times - TMP_JAMP(60) = TMP_JAMP(24) + TMP_JAMP(17) ! used 4 times - TMP_JAMP(59) = TMP_JAMP(28) - TMP_JAMP(18) ! used 4 times - TMP_JAMP(58) = AMP(89) - AMP(146) ! used 4 times - TMP_JAMP(57) = TMP_JAMP(20) + TMP_JAMP(16) ! used 4 times - TMP_JAMP(56) = AMP(117) + AMP(142) ! used 4 times - TMP_JAMP(55) = AMP(8) - AMP(144) ! used 4 times - TMP_JAMP(54) = TMP_JAMP(19) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(117) ! used 4 times - TMP_JAMP(53) = TMP_JAMP(20) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(8) ! used 4 times - TMP_JAMP(52) = TMP_JAMP(26) - TMP_JAMP(21) ! used 4 times - TMP_JAMP(51) = TMP_JAMP(30) - TMP_JAMP(20) ! used 4 times - TMP_JAMP(50) = AMP(87) - AMP(143) ! used 4 times - TMP_JAMP(49) = TMP_JAMP(16) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(87) ! used 4 times - TMP_JAMP(48) = TMP_JAMP(23) - TMP_JAMP(17) ! used 4 times - TMP_JAMP(47) = TMP_JAMP(18) + ((0.000000000000000D+00, + TMP_JAMP(56) = TMP_JAMP(17) - TMP_JAMP(16) ! used 4 times + TMP_JAMP(55) = TMP_JAMP(17) + ((0.000000000000000D+00, $ -1.000000000000000D+00)) * AMP(80) ! used 4 times - TMP_JAMP(46) = TMP_JAMP(19) - TMP_JAMP(16) ! used 4 times - TMP_JAMP(45) = TMP_JAMP(27) + TMP_JAMP(18) ! used 4 times - TMP_JAMP(44) = TMP_JAMP(28) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(110) ! used 4 times - TMP_JAMP(43) = TMP_JAMP(29) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(16) ! used 4 times - TMP_JAMP(42) = TMP_JAMP(22) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(61) ! used 4 times - TMP_JAMP(41) = TMP_JAMP(24) - TMP_JAMP(22) ! used 4 times - TMP_JAMP(40) = TMP_JAMP(25) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(71) ! used 4 times - TMP_JAMP(39) = AMP(96) + AMP(148) ! used 4 times - TMP_JAMP(38) = TMP_JAMP(23) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(96) ! used 4 times - TMP_JAMP(37) = TMP_JAMP(24) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(56) ! used 4 times - TMP_JAMP(36) = TMP_JAMP(26) + TMP_JAMP(23) ! used 4 times - TMP_JAMP(35) = TMP_JAMP(17) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(74) ! used 4 times - TMP_JAMP(34) = TMP_JAMP(30) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(17) ! used 4 times - TMP_JAMP(33) = TMP_JAMP(26) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(33) ! used 4 times - TMP_JAMP(32) = TMP_JAMP(27) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(22) ! used 4 times - TMP_JAMP(31) = TMP_JAMP(21) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(25) ! used 4 times - TMP_JAMP(98) = TMP_JAMP(43) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(138) ! used 4 times - TMP_JAMP(97) = TMP_JAMP(44) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(136) ! used 4 times - TMP_JAMP(96) = TMP_JAMP(40) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(137) ! used 4 times - TMP_JAMP(95) = TMP_JAMP(37) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(150) ! used 4 times - TMP_JAMP(94) = TMP_JAMP(35) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(149) ! used 4 times - TMP_JAMP(93) = TMP_JAMP(32) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(36) ! used 4 times - TMP_JAMP(92) = TMP_JAMP(33) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(34) ! used 4 times - TMP_JAMP(91) = TMP_JAMP(31) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(35) ! used 4 times - TMP_JAMP(151) = AMP(18) + ((0.000000000000000D+00, + TMP_JAMP(54) = AMP(108) + AMP(133) ! used 4 times + TMP_JAMP(53) = AMP(51) + AMP(52) ! used 4 times + TMP_JAMP(52) = AMP(40) - AMP(54) ! used 4 times + TMP_JAMP(51) = AMP(11) - AMP(135) ! used 4 times + TMP_JAMP(50) = AMP(102) + AMP(151) ! used 4 times + TMP_JAMP(49) = AMP(69) - AMP(134) ! used 4 times + TMP_JAMP(48) = AMP(59) - AMP(153) ! used 4 times + TMP_JAMP(47) = AMP(43) - AMP(53) ! used 4 times + TMP_JAMP(46) = AMP(119) + AMP(145) ! used 4 times + TMP_JAMP(45) = AMP(14) - AMP(147) ! used 4 times + TMP_JAMP(44) = AMP(77) - AMP(152) ! used 4 times + TMP_JAMP(43) = AMP(89) - AMP(146) ! used 4 times + TMP_JAMP(42) = AMP(117) + AMP(142) ! used 4 times + TMP_JAMP(41) = AMP(8) - AMP(144) ! used 4 times + TMP_JAMP(40) = AMP(87) - AMP(143) ! used 4 times + TMP_JAMP(39) = AMP(110) + AMP(136) ! used 4 times + TMP_JAMP(38) = AMP(16) - AMP(138) ! used 4 times + TMP_JAMP(37) = AMP(71) - AMP(137) ! used 4 times + TMP_JAMP(36) = AMP(96) + AMP(148) ! used 4 times + TMP_JAMP(35) = AMP(56) - AMP(150) ! used 4 times + TMP_JAMP(34) = AMP(74) - AMP(149) ! used 4 times + TMP_JAMP(33) = AMP(33) + AMP(34) ! used 4 times + TMP_JAMP(32) = AMP(22) - AMP(36) ! used 4 times + TMP_JAMP(31) = AMP(25) - AMP(35) ! used 4 times + TMP_JAMP(142) = TMP_JAMP(80) + TMP_JAMP(77) ! used 2 times + TMP_JAMP(141) = TMP_JAMP(80) + TMP_JAMP(68) ! used 2 times + TMP_JAMP(140) = TMP_JAMP(79) - TMP_JAMP(61) ! used 2 times + TMP_JAMP(139) = TMP_JAMP(79) + TMP_JAMP(69) ! used 2 times + TMP_JAMP(138) = TMP_JAMP(78) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(47) ! used 2 times + TMP_JAMP(137) = TMP_JAMP(77) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(39) ! used 2 times + TMP_JAMP(136) = TMP_JAMP(76) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(54) ! used 2 times + TMP_JAMP(135) = TMP_JAMP(76) + TMP_JAMP(66) ! used 2 times + TMP_JAMP(134) = TMP_JAMP(76) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(39) ! used 2 times + TMP_JAMP(133) = TMP_JAMP(75) + TMP_JAMP(61) ! used 2 times + TMP_JAMP(132) = TMP_JAMP(73) + AMP(50) ! used 2 times + TMP_JAMP(131) = TMP_JAMP(70) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(36) ! used 2 times + TMP_JAMP(130) = TMP_JAMP(67) - TMP_JAMP(27) ! used 2 times + TMP_JAMP(129) = TMP_JAMP(61) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(46) ! used 2 times + TMP_JAMP(128) = TMP_JAMP(61) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(41) ! used 2 times + TMP_JAMP(127) = TMP_JAMP(58) - TMP_JAMP(25) ! used 2 times + TMP_JAMP(126) = TMP_JAMP(58) + TMP_JAMP(24) ! used 2 times + TMP_JAMP(125) = TMP_JAMP(58) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(43) ! used 2 times + TMP_JAMP(124) = TMP_JAMP(55) + AMP(111) ! used 2 times + TMP_JAMP(123) = TMP_JAMP(54) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(109) ! used 2 times + TMP_JAMP(122) = TMP_JAMP(53) + ((0.000000000000000D+00, $ -1.000000000000000D+00)) * AMP(50) ! used 2 times - TMP_JAMP(150) = TMP_JAMP(87) + ((0.000000000000000D+00, + TMP_JAMP(121) = TMP_JAMP(53) - TMP_JAMP(47) ! used 2 times + TMP_JAMP(120) = TMP_JAMP(52) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(42) ! used 2 times + TMP_JAMP(119) = TMP_JAMP(52) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(41) ! used 2 times + TMP_JAMP(118) = TMP_JAMP(51) + ((0.000000000000000D+00, $ -1.000000000000000D+00)) * AMP(10) ! used 2 times - TMP_JAMP(149) = TMP_JAMP(90) + TMP_JAMP(88) ! used 2 times - TMP_JAMP(148) = TMP_JAMP(82) - AMP(18) ! used 2 times - TMP_JAMP(147) = TMP_JAMP(74) + ((-0.000000000000000D+00 + TMP_JAMP(117) = TMP_JAMP(51) + TMP_JAMP(49) ! used 2 times + TMP_JAMP(116) = TMP_JAMP(51) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(12) ! used 2 times + TMP_JAMP(115) = TMP_JAMP(50) - TMP_JAMP(44) ! used 2 times + TMP_JAMP(114) = TMP_JAMP(49) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(70) ! used 2 times + TMP_JAMP(113) = TMP_JAMP(48) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(60) ! used 2 times + TMP_JAMP(112) = TMP_JAMP(48) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(58) ! used 2 times + TMP_JAMP(111) = TMP_JAMP(47) + ((-0.000000000000000D+00 $ ,1.000000000000000D+00)) * AMP(44) ! used 2 times - TMP_JAMP(146) = TMP_JAMP(68) + TMP_JAMP(67) ! used 2 times - TMP_JAMP(145) = TMP_JAMP(77) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(134) ! used 2 times - TMP_JAMP(144) = AMP(79) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(109) ! used 2 times - TMP_JAMP(143) = TMP_JAMP(63) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(76) ! used 2 times - TMP_JAMP(142) = TMP_JAMP(90) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(59) ! used 2 times - TMP_JAMP(141) = TMP_JAMP(67) + TMP_JAMP(58) ! used 2 times - TMP_JAMP(140) = AMP(7) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(18) ! used 2 times - TMP_JAMP(139) = TMP_JAMP(54) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(142) ! used 2 times - TMP_JAMP(138) = TMP_JAMP(55) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(51) ! used 2 times - TMP_JAMP(137) = TMP_JAMP(89) - TMP_JAMP(74) ! used 2 times - TMP_JAMP(136) = TMP_JAMP(49) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(143) ! used 2 times - TMP_JAMP(135) = TMP_JAMP(82) - TMP_JAMP(63) ! used 2 times - TMP_JAMP(134) = AMP(41) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(80) ! used 2 times - TMP_JAMP(133) = TMP_JAMP(56) - TMP_JAMP(50) ! used 2 times - TMP_JAMP(132) = TMP_JAMP(88) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(45) ! used 2 times - TMP_JAMP(131) = TMP_JAMP(47) + AMP(111) ! used 2 times - TMP_JAMP(130) = TMP_JAMP(53) - AMP(9) ! used 2 times - TMP_JAMP(129) = TMP_JAMP(98) + TMP_JAMP(97) ! used 2 times - TMP_JAMP(128) = AMP(58) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(61) ! used 2 times - TMP_JAMP(127) = TMP_JAMP(80) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(41) ! used 2 times - TMP_JAMP(126) = TMP_JAMP(42) - AMP(72) ! used 2 times - TMP_JAMP(125) = TMP_JAMP(96) - TMP_JAMP(42) ! used 2 times - TMP_JAMP(124) = TMP_JAMP(98) + TMP_JAMP(96) ! used 2 times - TMP_JAMP(123) = TMP_JAMP(36) - AMP(39) ! used 2 times - TMP_JAMP(122) = TMP_JAMP(89) - TMP_JAMP(39) ! used 2 times - TMP_JAMP(121) = TMP_JAMP(95) - AMP(55) ! used 2 times - TMP_JAMP(120) = TMP_JAMP(58) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(46) ! used 2 times - TMP_JAMP(119) = TMP_JAMP(68) - TMP_JAMP(58) ! used 2 times - TMP_JAMP(118) = TMP_JAMP(94) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(58) ! used 2 times - TMP_JAMP(117) = TMP_JAMP(95) + TMP_JAMP(94) ! used 2 times - TMP_JAMP(116) = TMP_JAMP(94) - AMP(73) ! used 2 times - TMP_JAMP(115) = TMP_JAMP(95) + AMP(57) ! used 2 times - TMP_JAMP(114) = TMP_JAMP(96) - TMP_JAMP(95) ! used 2 times - TMP_JAMP(113) = TMP_JAMP(97) - TMP_JAMP(96) ! used 2 times - TMP_JAMP(112) = TMP_JAMP(38) + AMP(95) ! used 2 times - TMP_JAMP(111) = TMP_JAMP(67) + ((-0.000000000000000D+00 + TMP_JAMP(110) = TMP_JAMP(46) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(120) ! used 2 times + TMP_JAMP(109) = TMP_JAMP(46) - TMP_JAMP(43) ! used 2 times + TMP_JAMP(108) = TMP_JAMP(45) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(12) ! used 2 times + TMP_JAMP(107) = TMP_JAMP(45) + TMP_JAMP(43) ! used 2 times + TMP_JAMP(106) = TMP_JAMP(45) + ((-0.000000000000000D+00 $ ,1.000000000000000D+00)) * AMP(13) ! used 2 times - TMP_JAMP(110) = TMP_JAMP(67) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(34) ! used 2 times - TMP_JAMP(109) = TMP_JAMP(98) + AMP(15) ! used 2 times - TMP_JAMP(108) = TMP_JAMP(98) + TMP_JAMP(34) ! used 2 times - TMP_JAMP(107) = TMP_JAMP(61) - AMP(23) ! used 2 times - TMP_JAMP(106) = TMP_JAMP(93) + TMP_JAMP(92) ! used 2 times - TMP_JAMP(105) = TMP_JAMP(68) + ((-0.000000000000000D+00 + TMP_JAMP(105) = TMP_JAMP(44) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(76) ! used 2 times + TMP_JAMP(104) = TMP_JAMP(42) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(45) ! used 2 times + TMP_JAMP(103) = TMP_JAMP(42) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(118) ! used 2 times + TMP_JAMP(102) = TMP_JAMP(41) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(7) ! used 2 times + TMP_JAMP(101) = TMP_JAMP(40) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(78) ! used 2 times + TMP_JAMP(100) = TMP_JAMP(40) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(88) ! used 2 times + TMP_JAMP(99) = TMP_JAMP(39) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(111) ! used 2 times + TMP_JAMP(98) = TMP_JAMP(39) - TMP_JAMP(37) ! used 2 times + TMP_JAMP(97) = TMP_JAMP(38) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(9) ! used 2 times + TMP_JAMP(96) = TMP_JAMP(38) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(15) ! used 2 times + TMP_JAMP(95) = TMP_JAMP(37) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(72) ! used 2 times + TMP_JAMP(94) = TMP_JAMP(36) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(39) ! used 2 times + TMP_JAMP(93) = TMP_JAMP(35) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(55) ! used 2 times + TMP_JAMP(92) = TMP_JAMP(35) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(57) ! used 2 times + TMP_JAMP(91) = TMP_JAMP(34) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(75) ! used 2 times + TMP_JAMP(90) = TMP_JAMP(34) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(73) ! used 2 times + TMP_JAMP(89) = TMP_JAMP(33) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(21) ! used 2 times + TMP_JAMP(88) = TMP_JAMP(33) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(32) ! used 2 times + TMP_JAMP(87) = TMP_JAMP(32) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(23) ! used 2 times + TMP_JAMP(86) = TMP_JAMP(32) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(24) ! used 2 times + TMP_JAMP(85) = TMP_JAMP(31) + ((-0.000000000000000D+00 $ ,1.000000000000000D+00)) * AMP(27) ! used 2 times - TMP_JAMP(104) = TMP_JAMP(91) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(68) ! used 2 times - TMP_JAMP(103) = TMP_JAMP(93) + TMP_JAMP(91) ! used 2 times - TMP_JAMP(102) = TMP_JAMP(91) - AMP(26) ! used 2 times - TMP_JAMP(101) = TMP_JAMP(92) - TMP_JAMP(91) ! used 2 times - TMP_JAMP(100) = TMP_JAMP(97) + TMP_JAMP(93) ! used 2 times - TMP_JAMP(99) = TMP_JAMP(92) + TMP_JAMP(34) ! used 2 times - TMP_JAMP(163) = TMP_JAMP(149) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(42) ! used 2 times - TMP_JAMP(162) = TMP_JAMP(144) - TMP_JAMP(142) ! used 2 times - TMP_JAMP(161) = TMP_JAMP(140) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(138) ! used 2 times - TMP_JAMP(160) = TMP_JAMP(135) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(48) ! used 2 times - TMP_JAMP(159) = TMP_JAMP(133) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(46) ! used 2 times - TMP_JAMP(158) = TMP_JAMP(134) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(132) ! used 2 times - TMP_JAMP(157) = TMP_JAMP(130) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(144) ! used 2 times - TMP_JAMP(156) = TMP_JAMP(128) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * TMP_JAMP(127) ! used 2 times - TMP_JAMP(155) = TMP_JAMP(123) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * TMP_JAMP(122) ! used 2 times - TMP_JAMP(154) = TMP_JAMP(112) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(148) ! used 2 times - TMP_JAMP(153) = TMP_JAMP(100) + AMP(24) ! used 2 times - TMP_JAMP(152) = TMP_JAMP(99) + AMP(32) ! used 2 times + TMP_JAMP(84) = TMP_JAMP(31) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(26) ! used 2 times + TMP_JAMP(83) = TMP_JAMP(25) + AMP(95) ! used 2 times + TMP_JAMP(82) = AMP(18) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(101) ! used 2 times + TMP_JAMP(81) = AMP(79) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(90) ! used 2 times + TMP_JAMP(155) = TMP_JAMP(131) - TMP_JAMP(83) ! used 2 times + TMP_JAMP(154) = TMP_JAMP(119) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(55) ! used 2 times + TMP_JAMP(153) = TMP_JAMP(114) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(64) ! used 2 times + TMP_JAMP(152) = TMP_JAMP(111) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(64) ! used 2 times + TMP_JAMP(151) = TMP_JAMP(105) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(57) ! used 2 times + TMP_JAMP(150) = TMP_JAMP(103) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(62) ! used 2 times + TMP_JAMP(149) = TMP_JAMP(100) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(55) ! used 2 times + TMP_JAMP(148) = TMP_JAMP(95) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(62) ! used 2 times + TMP_JAMP(147) = TMP_JAMP(94) - TMP_JAMP(53) ! used 2 times + TMP_JAMP(146) = TMP_JAMP(89) - TMP_JAMP(50) ! used 2 times + TMP_JAMP(145) = TMP_JAMP(88) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(70) ! used 2 times + TMP_JAMP(144) = TMP_JAMP(84) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * TMP_JAMP(62) ! used 2 times + TMP_JAMP(143) = TMP_JAMP(81) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * TMP_JAMP(56) ! used 2 times JAMP(1,1) = (-1.000000000000000D+00)*AMP(30) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(109) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(152) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(153) - JAMP(2,1) = ((0.000000000000000D+00,1.000000000000000D+00)) - $ *AMP(27)+(-1.000000000000000D+00)*AMP(28)+((0.000000000000000D - $ +00,1.000000000000000D+00))*TMP_JAMP(66)+((0.000000000000000D - $ +00,1.000000000000000D+00))*TMP_JAMP(104)+TMP_JAMP(111) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(152) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(80) + $ +TMP_JAMP(86)+TMP_JAMP(96)+((0.000000000000000D+00 + $ ,1.000000000000000D+00))*TMP_JAMP(137)+TMP_JAMP(145) + JAMP(2,1) = (-1.000000000000000D+00)*AMP(28) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(79) + $ +TMP_JAMP(85)+TMP_JAMP(106)+((0.000000000000000D+00 + $ ,1.000000000000000D+00))*TMP_JAMP(129)+(-1.000000000000000D+00) + $ *TMP_JAMP(145) JAMP(3,1) = (-1.000000000000000D+00)*AMP(31) - $ +((0.000000000000000D+00,1.000000000000000D+00))*AMP(72) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(102) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(125) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(153) - JAMP(4,1) = (-1.000000000000000D+00)*AMP(19) - $ +((0.000000000000000D+00,1.000000000000000D+00))*AMP(21) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*AMP(26) - $ +AMP(151)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(79)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(101)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(156) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(78) + $ +(-1.000000000000000D+00)*TMP_JAMP(86)+TMP_JAMP(95) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(134) + $ +(-1.000000000000000D+00)*TMP_JAMP(144) + JAMP(4,1) = (-1.000000000000000D+00)*AMP(19)+TMP_JAMP(112) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(139) + $ +TMP_JAMP(144)+(-1.000000000000000D+00)*TMP_JAMP(146) JAMP(5,1) = (-1.000000000000000D+00)*AMP(29) - $ +((0.000000000000000D+00,1.000000000000000D+00))*AMP(90) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(103) - $ +(-1.000000000000000D+00)*TMP_JAMP(105)+((0.000000000000000D+00 - $ ,-1.000000000000000D+00))*TMP_JAMP(107)+TMP_JAMP(120) - JAMP(6,1) = (-1.000000000000000D+00)*AMP(20) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*AMP(21) - $ +((0.000000000000000D+00,1.000000000000000D+00))*AMP(76) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(106) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(107) - $ +(-1.000000000000000D+00)*TMP_JAMP(160) - JAMP(7,1) = ((0.000000000000000D+00,-1.000000000000000D+00)) - $ *AMP(15)+((0.000000000000000D+00,1.000000000000000D+00))*AMP(57) - $ +(-1.000000000000000D+00)*AMP(93)+((0.000000000000000D+00, - $ -1.000000000000000D+00))*TMP_JAMP(108)+((0.000000000000000D+00, - $ -1.000000000000000D+00))*TMP_JAMP(114)+((0.000000000000000D+00 - $ ,1.000000000000000D+00))*TMP_JAMP(154) - JAMP(8,1) = ((0.000000000000000D+00,-1.000000000000000D+00)) - $ *AMP(13)+((0.000000000000000D+00,1.000000000000000D+00))*AMP(75) - $ +(-1.000000000000000D+00)*AMP(91)+((0.000000000000000D+00, - $ -1.000000000000000D+00))*TMP_JAMP(57)+(-1.000000000000000D+00) - $ *TMP_JAMP(110)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(118)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(154) - JAMP(9,1) = (-1.000000000000000D+00)*AMP(94) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(113) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(115) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(116) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(131) - JAMP(10,1) = (-1.000000000000000D+00)*AMP(38) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(116) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(155) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(158) - JAMP(11,1) = ((0.000000000000000D+00,1.000000000000000D+00)) - $ *AMP(55)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *AMP(75)+(-1.000000000000000D+00)*AMP(92)+((0.000000000000000D - $ +00,1.000000000000000D+00))*AMP(120)+((0.000000000000000D+00, - $ -1.000000000000000D+00))*TMP_JAMP(46)+((0.000000000000000D+00 - $ ,1.000000000000000D+00))*TMP_JAMP(72)+((0.000000000000000D+00, - $ -1.000000000000000D+00))*TMP_JAMP(117)+(-1.000000000000000D+00) - $ *TMP_JAMP(119) - JAMP(12,1) = (-1.000000000000000D+00)*AMP(37)+( - $ -1.000000000000000D+00)*AMP(62)+((0.000000000000000D+00, - $ -1.000000000000000D+00))*TMP_JAMP(71)+((0.000000000000000D+00 - $ ,1.000000000000000D+00))*TMP_JAMP(121)+TMP_JAMP(147) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(29) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(65) + $ +(-1.000000000000000D+00)*TMP_JAMP(85)+(-1.000000000000000D+00) + $ *TMP_JAMP(87)+(-1.000000000000000D+00)*TMP_JAMP(109) + $ +TMP_JAMP(143) + JAMP(6,1) = (-1.000000000000000D+00)*AMP(20)+TMP_JAMP(87) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(141) + $ +TMP_JAMP(146)+TMP_JAMP(151) + JAMP(7,1) = (-1.000000000000000D+00)*AMP(93)+( + $ -1.000000000000000D+00)*TMP_JAMP(37)+TMP_JAMP(92)+( + $ -1.000000000000000D+00)*TMP_JAMP(96)+((0.000000000000000D+00 + $ ,1.000000000000000D+00))*TMP_JAMP(130)+((0.000000000000000D+00, + $ -1.000000000000000D+00))*TMP_JAMP(155) + JAMP(8,1) = (-1.000000000000000D+00)*AMP(91) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(19) + $ +TMP_JAMP(91)+(-1.000000000000000D+00)*TMP_JAMP(106) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(125) $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(155) - JAMP(13,1) = ((0.000000000000000D+00,1.000000000000000D+00)) - $ *AMP(118)+(-1.000000000000000D+00)*AMP(126) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(124) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(126) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(139) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(157) - JAMP(14,1) = ((0.000000000000000D+00,1.000000000000000D+00)) - $ *AMP(78)+(-1.000000000000000D+00)*AMP(98)+((0.000000000000000D - $ +00,-1.000000000000000D+00))*AMP(118)+AMP(152) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(62) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(156) - $ +(-1.000000000000000D+00)*TMP_JAMP(159) - JAMP(15,1) = ((0.000000000000000D+00,1.000000000000000D+00)) - $ *AMP(88)+(-1.000000000000000D+00)*AMP(127)+((0.000000000000000D - $ +00,1.000000000000000D+00))*TMP_JAMP(129)+((0.000000000000000D - $ +00,-1.000000000000000D+00))*TMP_JAMP(131)+((0.000000000000000D - $ +00,1.000000000000000D+00))*TMP_JAMP(136)+((0.000000000000000D - $ +00,1.000000000000000D+00))*TMP_JAMP(157) - JAMP(16,1) = ((0.000000000000000D+00,1.000000000000000D+00)) - $ *AMP(45)+(-1.000000000000000D+00)*AMP(47)+AMP(53) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*AMP(88) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(73) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(158) - $ +(-1.000000000000000D+00)*TMP_JAMP(159) - JAMP(17,1) = ((0.000000000000000D+00,-1.000000000000000D+00)) - $ *AMP(78)+(-1.000000000000000D+00)*AMP(97)+((0.000000000000000D - $ +00,1.000000000000000D+00))*AMP(101)+((0.000000000000000D+00 - $ ,1.000000000000000D+00))*TMP_JAMP(136)+(-1.000000000000000D+00) - $ *TMP_JAMP(160)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(161) - JAMP(18,1) = ((0.000000000000000D+00,-1.000000000000000D+00)) - $ *AMP(45)+(-1.000000000000000D+00)*AMP(46)+((0.000000000000000D - $ +00,1.000000000000000D+00))*AMP(50)+((0.000000000000000D+00 - $ ,1.000000000000000D+00))*TMP_JAMP(52)+(-1.000000000000000D+00) - $ *TMP_JAMP(137)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(139)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(161) - JAMP(19,1) = ((0.000000000000000D+00,1.000000000000000D+00)) - $ *AMP(12)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *AMP(90)+(-1.000000000000000D+00)*AMP(128)+(-1.000000000000000D - $ +00)*AMP(135)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(57)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(84)+(-1.000000000000000D+00)*TMP_JAMP(141)+( - $ -1.000000000000000D+00)*TMP_JAMP(162) - JAMP(20,1) = ((0.000000000000000D+00,1.000000000000000D+00)) - $ *AMP(60)+(-1.000000000000000D+00)*AMP(100)+((0.000000000000000D - $ +00,1.000000000000000D+00))*TMP_JAMP(60)+(-1.000000000000000D - $ +00)*TMP_JAMP(80)+(-1.000000000000000D+00)*TMP_JAMP(143) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(145) - $ +TMP_JAMP(162) - JAMP(21,1) = ((0.000000000000000D+00,-1.000000000000000D+00)) - $ *AMP(12)+(-1.000000000000000D+00)*AMP(62)+((0.000000000000000D - $ +00,1.000000000000000D+00))*AMP(70)+((0.000000000000000D+00, - $ -1.000000000000000D+00))*AMP(120)+(-1.000000000000000D+00) - $ *AMP(129)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(64)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(65)+(-1.000000000000000D+00)*TMP_JAMP(87) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(145) - $ +TMP_JAMP(146) + JAMP(9,1) = (-1.000000000000000D+00)*AMP(94)+( + $ -1.000000000000000D+00)*TMP_JAMP(90)+(-1.000000000000000D+00) + $ *TMP_JAMP(92)+(-1.000000000000000D+00)*TMP_JAMP(98) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(124) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(135) + JAMP(10,1) = (-1.000000000000000D+00)*AMP(38)+TMP_JAMP(90) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(141) + $ +(-1.000000000000000D+00)*TMP_JAMP(147)+TMP_JAMP(154) + JAMP(11,1) = AMP(62)+(-1.000000000000000D+00)*AMP(92) + $ +((0.000000000000000D+00,1.000000000000000D+00))*AMP(120) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(63)+( + $ -1.000000000000000D+00)*TMP_JAMP(91)+(-1.000000000000000D+00) + $ *TMP_JAMP(93)+(-1.000000000000000D+00)*TMP_JAMP(109) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(126) + JAMP(12,1) = (-1.000000000000000D+00)*AMP(37)+TMP_JAMP(93) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(139) + $ +TMP_JAMP(147)+TMP_JAMP(152) + JAMP(13,1) = (-1.000000000000000D+00)*AMP(126) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(75) + $ +(-1.000000000000000D+00)*TMP_JAMP(97)+TMP_JAMP(103) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(128) + $ +(-1.000000000000000D+00)*TMP_JAMP(148) + JAMP(14,1) = (-1.000000000000000D+00)*AMP(98) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(20)+( + $ -1.000000000000000D+00)*TMP_JAMP(44)+TMP_JAMP(101)+( + $ -1.000000000000000D+00)*TMP_JAMP(112)+((0.000000000000000D+00 + $ ,1.000000000000000D+00))*TMP_JAMP(126)+(-1.000000000000000D+00) + $ *TMP_JAMP(150) + JAMP(15,1) = (-1.000000000000000D+00)*AMP(127)+( + $ -1.000000000000000D+00)*TMP_JAMP(41)+((0.000000000000000D+00 + $ ,1.000000000000000D+00))*TMP_JAMP(59)+((0.000000000000000D+00 + $ ,1.000000000000000D+00))*TMP_JAMP(77)+TMP_JAMP(97)+TMP_JAMP(99) + $ +(-1.000000000000000D+00)*TMP_JAMP(149) + JAMP(16,1) = (-1.000000000000000D+00)*AMP(47) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(60)+( + $ -1.000000000000000D+00)*TMP_JAMP(104)+(-1.000000000000000D+00) + $ *TMP_JAMP(119)+((0.000000000000000D+00,1.000000000000000D+00)) + $ *TMP_JAMP(138)+TMP_JAMP(149) + JAMP(17,1) = (-1.000000000000000D+00)*AMP(97) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(71) + $ +TMP_JAMP(82)+(-1.000000000000000D+00)*TMP_JAMP(101)+( + $ -1.000000000000000D+00)*TMP_JAMP(102)+(-1.000000000000000D+00) + $ *TMP_JAMP(115)+((0.000000000000000D+00,-1.000000000000000D+00)) + $ *TMP_JAMP(127) + JAMP(18,1) = (-1.000000000000000D+00)*AMP(46)+TMP_JAMP(102) + $ +TMP_JAMP(104)+(-1.000000000000000D+00)*TMP_JAMP(121) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(132) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(140) + JAMP(19,1) = (-1.000000000000000D+00)*AMP(128) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(28) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(74) + $ +(-1.000000000000000D+00)*TMP_JAMP(107)+TMP_JAMP(116) + $ +TMP_JAMP(123)+(-1.000000000000000D+00)*TMP_JAMP(143) + JAMP(20,1) = (-1.000000000000000D+00)*AMP(100)+TMP_JAMP(49)+( + $ -1.000000000000000D+00)*TMP_JAMP(113)+(-1.000000000000000D+00) + $ *TMP_JAMP(123)+((0.000000000000000D+00,1.000000000000000D+00)) + $ *TMP_JAMP(135)+(-1.000000000000000D+00)*TMP_JAMP(151) + JAMP(21,1) = (-1.000000000000000D+00)*AMP(129)+( + $ -1.000000000000000D+00)*TMP_JAMP(51)+TMP_JAMP(108)+TMP_JAMP(110) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(133) + $ +(-1.000000000000000D+00)*TMP_JAMP(153) JAMP(22,1) = (-1.000000000000000D+00)*AMP(49) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*AMP(70) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(69) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(70) - $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(72) - $ +TMP_JAMP(81)+(-1.000000000000000D+00)*TMP_JAMP(147)+( - $ -1.000000000000000D+00)*TMP_JAMP(163) - JAMP(23,1) = ((0.000000000000000D+00,-1.000000000000000D+00)) - $ *AMP(60)+(-1.000000000000000D+00)*AMP(99)+((0.000000000000000D - $ +00,-1.000000000000000D+00))*AMP(101)+(-1.000000000000000D+00) - $ *AMP(153)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(75)+((0.000000000000000D+00,1.000000000000000D+00)) - $ *TMP_JAMP(76)+((0.000000000000000D+00,-1.000000000000000D+00)) - $ *TMP_JAMP(78)+(-1.000000000000000D+00)*TMP_JAMP(81) - $ +TMP_JAMP(148)+(-1.000000000000000D+00)*TMP_JAMP(150) - JAMP(24,1) = (-1.000000000000000D+00)*AMP(48)+AMP(52) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(83) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(85) - $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(86) - $ +TMP_JAMP(150)+TMP_JAMP(151)+TMP_JAMP(163) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(78) + $ +TMP_JAMP(114)+(-1.000000000000000D+00)*TMP_JAMP(120) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(136) + $ +(-1.000000000000000D+00)*TMP_JAMP(152) + JAMP(23,1) = ((0.000000000000000D+00,1.000000000000000D+00)) + $ *AMP(10)+(-1.000000000000000D+00)*AMP(99)+TMP_JAMP(50) + $ +((0.000000000000000D+00,1.000000000000000D+00))*TMP_JAMP(72)+( + $ -1.000000000000000D+00)*TMP_JAMP(82)+TMP_JAMP(113)+( + $ -1.000000000000000D+00)*TMP_JAMP(117)+((0.000000000000000D+00, + $ -1.000000000000000D+00))*TMP_JAMP(130) + JAMP(24,1) = (-1.000000000000000D+00)*AMP(48)+TMP_JAMP(54) + $ +((0.000000000000000D+00,-1.000000000000000D+00))*TMP_JAMP(73) + $ +TMP_JAMP(118)+TMP_JAMP(120)+TMP_JAMP(122)+((0.000000000000000D + $ +00,-1.000000000000000D+00))*TMP_JAMP(142) IF(INIT_MODE)THEN DO I=1, NGRAPHS diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxuux/CPPProcess.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxuux/CPPProcess.cc index e5e62a0af2..edb75e58f0 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxuux/CPPProcess.cc +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxuux/CPPProcess.cc @@ -249,23 +249,16 @@ namespace mg5amcCpu ixxxxx( momenta, cIPD[0], cHel[ihel][3], -1, w_fp[3], 3 ); -#if not( defined __CUDACC__ and defined MGONGPU_TEST_DIVERGENCE ) - oxzxxx( momenta, cHel[ihel][4], +1, w_fp[4], 4 ); -#else - if( ( blockDim.x * blockIdx.x + threadIdx.x ) % 2 == 0 ) - oxzxxx( momenta, cHel[ihel][4], +1, w_fp[4], 4 ); - else - oxxxxx( momenta, 0, cHel[ihel][4], +1, w_fp[4], 4 ) -#endif + oxxxxx( momenta, 0., cHel[ihel][4], +1, w_fp[4], 4 ); - ixzxxx( momenta, cHel[ihel][5], -1, w_fp[5], 5 ); + ixxxxx( momenta, 0., cHel[ihel][5], -1, w_fp[5], 5 ); - VVV1P0_1( w_fp[0], w_fp[1], COUPs[0], 0., 0., w_fp[6] ); - FFV1P0_3( w_fp[3], w_fp[2], COUPs[1], 0., 0., w_fp[7] ); - FFV1_1( w_fp[4], w_fp[6], COUPs[1], 0., 0., w_fp[8] ); + VVV1P0_1( w_fp[0], w_fp[1], COUPs[0], 1.0, 0., 0., w_fp[6] ); + FFV1P0_3( w_fp[3], w_fp[2], COUPs[1], 1.0, 0., 0., w_fp[7] ); + FFV1_1( w_fp[4], w_fp[6], COUPs[1], 1.0, 0., 0., w_fp[8] ); // Amplitude(s) for diagram number 1 - FFV1_0( w_fp[5], w_fp[8], w_fp[7], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[5], w_fp[8], w_fp[7], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -278,10 +271,10 @@ namespace mg5amcCpu // *** DIAGRAM 2 OF 36 *** // Wavefunction(s) for diagram number 2 - FFV1_2( w_fp[5], w_fp[6], COUPs[1], 0., 0., w_fp[8] ); + FFV1_2( w_fp[5], w_fp[6], COUPs[1], 1.0, 0., 0., w_fp[8] ); // Amplitude(s) for diagram number 2 - FFV1_0( w_fp[8], w_fp[4], w_fp[7], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[8], w_fp[4], w_fp[7], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 2 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -294,10 +287,10 @@ namespace mg5amcCpu // *** DIAGRAM 3 OF 36 *** // Wavefunction(s) for diagram number 3 - FFV1P0_3( w_fp[5], w_fp[4], COUPs[1], 0., 0., w_fp[8] ); + FFV1P0_3( w_fp[5], w_fp[4], COUPs[1], 1.0, 0., 0., w_fp[8] ); // Amplitude(s) for diagram number 3 - VVV1_0( w_fp[6], w_fp[7], w_fp[8], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[6], w_fp[7], w_fp[8], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 3 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -310,10 +303,10 @@ namespace mg5amcCpu // *** DIAGRAM 4 OF 36 *** // Wavefunction(s) for diagram number 4 - FFV1_1( w_fp[2], w_fp[6], COUPs[1], cIPD[0], cIPD[1], w_fp[9] ); + FFV1_1( w_fp[2], w_fp[6], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[9] ); // Amplitude(s) for diagram number 4 - FFV1_0( w_fp[3], w_fp[9], w_fp[8], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[9], w_fp[8], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 4 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -326,10 +319,10 @@ namespace mg5amcCpu // *** DIAGRAM 5 OF 36 *** // Wavefunction(s) for diagram number 5 - FFV1_2( w_fp[3], w_fp[6], COUPs[1], cIPD[0], cIPD[1], w_fp[9] ); + FFV1_2( w_fp[3], w_fp[6], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[9] ); // Amplitude(s) for diagram number 5 - FFV1_0( w_fp[9], w_fp[2], w_fp[8], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[9], w_fp[2], w_fp[8], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 5 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -342,11 +335,11 @@ namespace mg5amcCpu // *** DIAGRAM 6 OF 36 *** // Wavefunction(s) for diagram number 6 - FFV1_1( w_fp[2], w_fp[0], COUPs[1], cIPD[0], cIPD[1], w_fp[9] ); - FFV1_2( w_fp[3], w_fp[1], COUPs[1], cIPD[0], cIPD[1], w_fp[6] ); + FFV1_1( w_fp[2], w_fp[0], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[9] ); + FFV1_2( w_fp[3], w_fp[1], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[6] ); // Amplitude(s) for diagram number 6 - FFV1_0( w_fp[6], w_fp[9], w_fp[8], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[6], w_fp[9], w_fp[8], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 6 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -357,11 +350,11 @@ namespace mg5amcCpu // *** DIAGRAM 7 OF 36 *** // Wavefunction(s) for diagram number 7 - FFV1_1( w_fp[4], w_fp[1], COUPs[1], 0., 0., w_fp[10] ); - FFV1P0_3( w_fp[3], w_fp[9], COUPs[1], 0., 0., w_fp[11] ); + FFV1_1( w_fp[4], w_fp[1], COUPs[1], 1.0, 0., 0., w_fp[10] ); + FFV1P0_3( w_fp[3], w_fp[9], COUPs[1], 1.0, 0., 0., w_fp[11] ); // Amplitude(s) for diagram number 7 - FFV1_0( w_fp[5], w_fp[10], w_fp[11], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[5], w_fp[10], w_fp[11], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 7 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -372,10 +365,10 @@ namespace mg5amcCpu // *** DIAGRAM 8 OF 36 *** // Wavefunction(s) for diagram number 8 - FFV1_2( w_fp[5], w_fp[1], COUPs[1], 0., 0., w_fp[12] ); + FFV1_2( w_fp[5], w_fp[1], COUPs[1], 1.0, 0., 0., w_fp[12] ); // Amplitude(s) for diagram number 8 - FFV1_0( w_fp[12], w_fp[4], w_fp[11], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[12], w_fp[4], w_fp[11], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 8 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -386,10 +379,10 @@ namespace mg5amcCpu // *** DIAGRAM 9 OF 36 *** // Wavefunction(s) for diagram number 9 - FFV1_1( w_fp[9], w_fp[1], COUPs[1], cIPD[0], cIPD[1], w_fp[13] ); + FFV1_1( w_fp[9], w_fp[1], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[13] ); // Amplitude(s) for diagram number 9 - FFV1_0( w_fp[3], w_fp[13], w_fp[8], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[13], w_fp[8], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 9 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -403,7 +396,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 10 - VVV1_0( w_fp[1], w_fp[8], w_fp[11], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[8], w_fp[11], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 10 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -414,11 +407,11 @@ namespace mg5amcCpu // *** DIAGRAM 11 OF 36 *** // Wavefunction(s) for diagram number 11 - FFV1_2( w_fp[3], w_fp[0], COUPs[1], cIPD[0], cIPD[1], w_fp[11] ); - FFV1_1( w_fp[2], w_fp[1], COUPs[1], cIPD[0], cIPD[1], w_fp[13] ); + FFV1_2( w_fp[3], w_fp[0], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[11] ); + FFV1_1( w_fp[2], w_fp[1], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[13] ); // Amplitude(s) for diagram number 11 - FFV1_0( w_fp[11], w_fp[13], w_fp[8], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[11], w_fp[13], w_fp[8], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 11 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -429,10 +422,10 @@ namespace mg5amcCpu // *** DIAGRAM 12 OF 36 *** // Wavefunction(s) for diagram number 12 - FFV1P0_3( w_fp[11], w_fp[2], COUPs[1], 0., 0., w_fp[9] ); + FFV1P0_3( w_fp[11], w_fp[2], COUPs[1], 1.0, 0., 0., w_fp[9] ); // Amplitude(s) for diagram number 12 - FFV1_0( w_fp[5], w_fp[10], w_fp[9], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[5], w_fp[10], w_fp[9], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 12 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -446,7 +439,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 13 - FFV1_0( w_fp[12], w_fp[4], w_fp[9], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[12], w_fp[4], w_fp[9], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 13 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -457,10 +450,10 @@ namespace mg5amcCpu // *** DIAGRAM 14 OF 36 *** // Wavefunction(s) for diagram number 14 - FFV1_2( w_fp[11], w_fp[1], COUPs[1], cIPD[0], cIPD[1], w_fp[14] ); + FFV1_2( w_fp[11], w_fp[1], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[14] ); // Amplitude(s) for diagram number 14 - FFV1_0( w_fp[14], w_fp[2], w_fp[8], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[14], w_fp[2], w_fp[8], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 14 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -474,7 +467,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 15 - VVV1_0( w_fp[1], w_fp[8], w_fp[9], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[8], w_fp[9], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 15 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -485,11 +478,11 @@ namespace mg5amcCpu // *** DIAGRAM 16 OF 36 *** // Wavefunction(s) for diagram number 16 - FFV1_1( w_fp[4], w_fp[0], COUPs[1], 0., 0., w_fp[9] ); - FFV1P0_3( w_fp[5], w_fp[9], COUPs[1], 0., 0., w_fp[14] ); + FFV1_1( w_fp[4], w_fp[0], COUPs[1], 1.0, 0., 0., w_fp[9] ); + FFV1P0_3( w_fp[5], w_fp[9], COUPs[1], 1.0, 0., 0., w_fp[14] ); // Amplitude(s) for diagram number 16 - FFV1_0( w_fp[3], w_fp[13], w_fp[14], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[13], w_fp[14], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 16 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -503,7 +496,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 17 - FFV1_0( w_fp[6], w_fp[2], w_fp[14], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[6], w_fp[2], w_fp[14], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 17 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -517,7 +510,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 18 - FFV1_0( w_fp[12], w_fp[9], w_fp[7], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[12], w_fp[9], w_fp[7], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 18 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -528,10 +521,10 @@ namespace mg5amcCpu // *** DIAGRAM 19 OF 36 *** // Wavefunction(s) for diagram number 19 - FFV1_1( w_fp[9], w_fp[1], COUPs[1], 0., 0., w_fp[11] ); + FFV1_1( w_fp[9], w_fp[1], COUPs[1], 1.0, 0., 0., w_fp[11] ); // Amplitude(s) for diagram number 19 - FFV1_0( w_fp[5], w_fp[11], w_fp[7], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[5], w_fp[11], w_fp[7], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 19 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -545,7 +538,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 20 - VVV1_0( w_fp[1], w_fp[7], w_fp[14], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[7], w_fp[14], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 20 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -556,11 +549,11 @@ namespace mg5amcCpu // *** DIAGRAM 21 OF 36 *** // Wavefunction(s) for diagram number 21 - FFV1_2( w_fp[5], w_fp[0], COUPs[1], 0., 0., w_fp[14] ); - FFV1P0_3( w_fp[14], w_fp[4], COUPs[1], 0., 0., w_fp[11] ); + FFV1_2( w_fp[5], w_fp[0], COUPs[1], 1.0, 0., 0., w_fp[14] ); + FFV1P0_3( w_fp[14], w_fp[4], COUPs[1], 1.0, 0., 0., w_fp[11] ); // Amplitude(s) for diagram number 21 - FFV1_0( w_fp[3], w_fp[13], w_fp[11], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[13], w_fp[11], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 21 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -574,7 +567,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 22 - FFV1_0( w_fp[6], w_fp[2], w_fp[11], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[6], w_fp[2], w_fp[11], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 22 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -588,7 +581,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 23 - FFV1_0( w_fp[14], w_fp[10], w_fp[7], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[14], w_fp[10], w_fp[7], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 23 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -599,10 +592,10 @@ namespace mg5amcCpu // *** DIAGRAM 24 OF 36 *** // Wavefunction(s) for diagram number 24 - FFV1_2( w_fp[14], w_fp[1], COUPs[1], 0., 0., w_fp[9] ); + FFV1_2( w_fp[14], w_fp[1], COUPs[1], 1.0, 0., 0., w_fp[9] ); // Amplitude(s) for diagram number 24 - FFV1_0( w_fp[9], w_fp[4], w_fp[7], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[9], w_fp[4], w_fp[7], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 24 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -616,7 +609,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 25 - VVV1_0( w_fp[1], w_fp[7], w_fp[11], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[7], w_fp[11], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 25 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -627,10 +620,10 @@ namespace mg5amcCpu // *** DIAGRAM 26 OF 36 *** // Wavefunction(s) for diagram number 26 - FFV1_1( w_fp[13], w_fp[0], COUPs[1], cIPD[0], cIPD[1], w_fp[11] ); + FFV1_1( w_fp[13], w_fp[0], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[11] ); // Amplitude(s) for diagram number 26 - FFV1_0( w_fp[3], w_fp[11], w_fp[8], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[11], w_fp[8], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 26 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -641,10 +634,10 @@ namespace mg5amcCpu // *** DIAGRAM 27 OF 36 *** // Wavefunction(s) for diagram number 27 - VVV1P0_1( w_fp[0], w_fp[8], COUPs[0], 0., 0., w_fp[11] ); + VVV1P0_1( w_fp[0], w_fp[8], COUPs[0], 1.0, 0., 0., w_fp[11] ); // Amplitude(s) for diagram number 27 - FFV1_0( w_fp[3], w_fp[13], w_fp[11], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[13], w_fp[11], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 27 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -655,10 +648,10 @@ namespace mg5amcCpu // *** DIAGRAM 28 OF 36 *** // Wavefunction(s) for diagram number 28 - FFV1_2( w_fp[6], w_fp[0], COUPs[1], cIPD[0], cIPD[1], w_fp[13] ); + FFV1_2( w_fp[6], w_fp[0], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[13] ); // Amplitude(s) for diagram number 28 - FFV1_0( w_fp[13], w_fp[2], w_fp[8], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[13], w_fp[2], w_fp[8], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 28 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -672,7 +665,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 29 - FFV1_0( w_fp[6], w_fp[2], w_fp[11], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[6], w_fp[2], w_fp[11], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 29 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -683,10 +676,10 @@ namespace mg5amcCpu // *** DIAGRAM 30 OF 36 *** // Wavefunction(s) for diagram number 30 - FFV1_1( w_fp[10], w_fp[0], COUPs[1], 0., 0., w_fp[6] ); + FFV1_1( w_fp[10], w_fp[0], COUPs[1], 1.0, 0., 0., w_fp[6] ); // Amplitude(s) for diagram number 30 - FFV1_0( w_fp[5], w_fp[6], w_fp[7], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[5], w_fp[6], w_fp[7], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 30 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -697,10 +690,10 @@ namespace mg5amcCpu // *** DIAGRAM 31 OF 36 *** // Wavefunction(s) for diagram number 31 - VVV1P0_1( w_fp[0], w_fp[7], COUPs[0], 0., 0., w_fp[6] ); + VVV1P0_1( w_fp[0], w_fp[7], COUPs[0], 1.0, 0., 0., w_fp[6] ); // Amplitude(s) for diagram number 31 - FFV1_0( w_fp[5], w_fp[10], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[5], w_fp[10], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 31 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -711,10 +704,10 @@ namespace mg5amcCpu // *** DIAGRAM 32 OF 36 *** // Wavefunction(s) for diagram number 32 - FFV1_2( w_fp[12], w_fp[0], COUPs[1], 0., 0., w_fp[10] ); + FFV1_2( w_fp[12], w_fp[0], COUPs[1], 1.0, 0., 0., w_fp[10] ); // Amplitude(s) for diagram number 32 - FFV1_0( w_fp[10], w_fp[4], w_fp[7], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[10], w_fp[4], w_fp[7], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 32 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -728,7 +721,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 33 - FFV1_0( w_fp[12], w_fp[4], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[12], w_fp[4], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 33 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -742,17 +735,17 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 34 - VVVV1_0( w_fp[0], w_fp[1], w_fp[7], w_fp[8], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[0], w_fp[1], w_fp[7], w_fp[8], COUPs[2], 1.0, &_fp[0] ); jamp_sv[1] += 1. / 2. * amp_sv[0]; jamp_sv[2] -= 1. / 2. * amp_sv[0]; jamp_sv[9] -= 1. / 2. * amp_sv[0]; jamp_sv[10] += 1. / 2. * amp_sv[0]; - VVVV3_0( w_fp[0], w_fp[1], w_fp[7], w_fp[8], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[0], w_fp[1], w_fp[7], w_fp[8], COUPs[2], 1.0, &_fp[0] ); jamp_sv[1] += 1. / 2. * amp_sv[0]; jamp_sv[5] -= 1. / 2. * amp_sv[0]; jamp_sv[6] -= 1. / 2. * amp_sv[0]; jamp_sv[10] += 1. / 2. * amp_sv[0]; - VVVV4_0( w_fp[0], w_fp[1], w_fp[7], w_fp[8], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[0], w_fp[1], w_fp[7], w_fp[8], COUPs[2], 1.0, &_fp[0] ); jamp_sv[2] += 1. / 2. * amp_sv[0]; jamp_sv[5] -= 1. / 2. * amp_sv[0]; jamp_sv[6] -= 1. / 2. * amp_sv[0]; @@ -764,7 +757,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 35 - VVV1_0( w_fp[1], w_fp[8], w_fp[6], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[8], w_fp[6], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 35 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -780,7 +773,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 36 - VVV1_0( w_fp[1], w_fp[7], w_fp[11], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[1], w_fp[7], w_fp[11], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 36 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1368,8 +1361,7 @@ namespace mg5amcCpu { // nprocesses>1 was last observed for "mirror processes" in uux_ttx in the 270 branch (see issue #343 and PRs #360 and #396) constexpr int nprocesses = 1; - static_assert( nprocesses == 1, "Assume nprocesses == 1" ); - // process_id corresponds to the index of DSIG1 Fortran functions (must be 1 because cudacpp is unable to handle DSIG2) + static_assert( nprocesses == 1 || nprocesses == 2, "Assume nprocesses == 1 or 2" ); constexpr int process_id = 1; // code generation source: madevent + cudacpp exporter static_assert( process_id == 1, "Assume process_id == 1" ); } diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxuux/auto_dsig1.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxuux/auto_dsig1.f index 67decfd0d7..67adf83921 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxuux/auto_dsig1.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxuux/auto_dsig1.f @@ -42,6 +42,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C LOCAL VARIABLES C INTEGER I,ITYPE,LP,IPROC + DOUBLE PRECISION QSCALE DOUBLE PRECISION G1 DOUBLE PRECISION G2 DOUBLE PRECISION XPQ(-7:7),PD(0:MAXPROC) @@ -129,11 +130,24 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) IF (ABS(LPP(IB(1))).GE.1) THEN !LP=SIGN(1,LPP(IB(1))) - G1=PDG2PDF(LPP(IB(1)),0, IB(1),XBK(IB(1)),DSQRT(Q2FACT(IB(1)))) + IF (DSQRT(Q2FACT(IB(1))).EQ.0D0) THEN + QSCALE=0D0 + DO I=3,NEXTERNAL + QSCALE=QSCALE+DSQRT(MAX(0D0,(PP(0,I)+PP(3,I))*(PP(0,I) + $ -PP(3,I)))) + ENDDO + QSCALE=QSCALE/2D0 + ELSE + QSCALE=DSQRT(Q2FACT(IB(1))) + ENDIF + G1=PDG2PDF(LPP(IB(1)),0, IB(1),XBK(IB(1)), QSCALE) ENDIF IF (ABS(LPP(IB(2))).GE.1) THEN !LP=SIGN(1,LPP(IB(2))) - G2=PDG2PDF(LPP(IB(2)),0, IB(2),XBK(IB(2)),DSQRT(Q2FACT(IB(2)))) + IF (DSQRT(Q2FACT(IB(2))).NE.0D0) THEN + QSCALE=DSQRT(Q2FACT(IB(2))) + ENDIF + G2=PDG2PDF(LPP(IB(2)),0, IB(2),XBK(IB(2)), QSCALE) ENDIF PD(0) = 0D0 IPROC = 0 diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxuux/matrix1.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxuux/matrix1.f index d599711adb..f44b687bc5 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxuux/matrix1.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxuux/matrix1.f @@ -397,7 +397,7 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C LOCAL VARIABLES C INTEGER I,J,M,N - COMPLEX*16 ZTEMP, TMP_JAMP(16) + COMPLEX*16 ZTEMP, TMP_JAMP(17) REAL*8 CF(NCOLOR,NCOLOR) COMPLEX*16 AMP(NGRAPHS), JAMP(NCOLOR,NAMPSO) COMPLEX*16 W(6,NWAVEFUNCS) @@ -668,17 +668,21 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) TMP_JAMP(3) = AMP(35) + AMP(37) ! used 4 times TMP_JAMP(2) = AMP(3) + AMP(34) ! used 4 times TMP_JAMP(1) = AMP(36) + AMP(38) ! used 4 times - TMP_JAMP(16) = AMP(1) + AMP(2) ! used 2 times - TMP_JAMP(15) = AMP(1) + AMP(5) ! used 2 times - TMP_JAMP(14) = TMP_JAMP(3) + TMP_JAMP(2) ! used 2 times - TMP_JAMP(13) = AMP(2) + AMP(4) ! used 2 times - TMP_JAMP(12) = TMP_JAMP(2) - TMP_JAMP(1) ! used 2 times - TMP_JAMP(11) = AMP(4) + AMP(5) ! used 2 times - TMP_JAMP(10) = TMP_JAMP(3) + TMP_JAMP(1) ! used 2 times - TMP_JAMP(9) = TMP_JAMP(1) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(29) ! used 2 times - TMP_JAMP(8) = TMP_JAMP(3) + ((-0.000000000000000D+00, + TMP_JAMP(17) = TMP_JAMP(3) + TMP_JAMP(2) ! used 2 times + TMP_JAMP(16) = TMP_JAMP(3) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(33) ! used 2 times + TMP_JAMP(15) = TMP_JAMP(3) + ((-0.000000000000000D+00, $ -1.000000000000000D+00)) * AMP(10) ! used 2 times + TMP_JAMP(14) = TMP_JAMP(1) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(25) ! used 2 times + TMP_JAMP(13) = TMP_JAMP(1) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(20) ! used 2 times + TMP_JAMP(12) = TMP_JAMP(1) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(29) ! used 2 times + TMP_JAMP(11) = AMP(1) + AMP(2) ! used 2 times + TMP_JAMP(10) = AMP(1) + AMP(5) ! used 2 times + TMP_JAMP(9) = AMP(2) + AMP(4) ! used 2 times + TMP_JAMP(8) = AMP(4) + AMP(5) ! used 2 times TMP_JAMP(7) = AMP(2) + ((0.000000000000000D+00 $ ,1.000000000000000D+00)) * AMP(32) ! used 2 times TMP_JAMP(6) = AMP(1) + ((0.000000000000000D+00 @@ -694,12 +698,12 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) $ +00,5.000000000000000D-01))*AMP(33)+(5.000000000000000D-01) $ *TMP_JAMP(2)+((0.000000000000000D+00,-5.000000000000000D-01)) $ *TMP_JAMP(4)+((0.000000000000000D+00,-5.000000000000000D-01)) - $ *TMP_JAMP(7)+(5.000000000000000D-01)*TMP_JAMP(8) + $ *TMP_JAMP(7)+(5.000000000000000D-01)*TMP_JAMP(15) JAMP(3,1) = (5.000000000000000D-01)*AMP(17)+((0.000000000000000D $ +00,-5.000000000000000D-01))*AMP(20)+(-5.000000000000000D-01) $ *TMP_JAMP(2)+((0.000000000000000D+00,-5.000000000000000D-01)) $ *TMP_JAMP(5)+((0.000000000000000D+00,-5.000000000000000D-01)) - $ *TMP_JAMP(6)+(5.000000000000000D-01)*TMP_JAMP(9) + $ *TMP_JAMP(6)+(5.000000000000000D-01)*TMP_JAMP(12) JAMP(4,1) = (-1.666666666666667D-01)*AMP(18) $ +((0.000000000000000D+00,1.666666666666667D-01))*TMP_JAMP(6) $ +((0.000000000000000D+00,1.666666666666667D-01))*TMP_JAMP(7) @@ -710,36 +714,35 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) $ -01)*AMP(7)+(5.000000000000000D-01)*AMP(22)+(5.000000000000000D $ -01)*AMP(23)+((0.000000000000000D+00,-5.000000000000000D-01)) $ *AMP(25)+((0.000000000000000D+00,5.000000000000000D-01))*AMP(31) - $ +(-5.000000000000000D-01)*TMP_JAMP(8)+(-5.000000000000000D-01) - $ *TMP_JAMP(9) + $ +(-5.000000000000000D-01)*TMP_JAMP(12)+(-5.000000000000000D-01) + $ *TMP_JAMP(15) JAMP(7,1) = (5.000000000000000D-01)*AMP(11)+(5.000000000000000D $ -01)*AMP(13)+((0.000000000000000D+00,-5.000000000000000D-01)) $ *AMP(15)+(5.000000000000000D-01)*AMP(16)+(5.000000000000000D-01) - $ *AMP(18)+((0.000000000000000D+00,5.000000000000000D-01))*AMP(20) - $ +((0.000000000000000D+00,5.000000000000000D-01))*AMP(27) - $ +((0.000000000000000D+00,-5.000000000000000D-01))*AMP(33)+( - $ -5.000000000000000D-01)*TMP_JAMP(10) + $ *AMP(18)+((0.000000000000000D+00,5.000000000000000D-01))*AMP(27) + $ +(-5.000000000000000D-01)*TMP_JAMP(13)+(-5.000000000000000D-01) + $ *TMP_JAMP(16) JAMP(8,1) = (-1.666666666666667D-01)*AMP(16)+( $ -1.666666666666667D-01)*AMP(17)+(-1.666666666666667D-01)*AMP(21) $ +(-1.666666666666667D-01)*AMP(22) JAMP(9,1) = (-1.666666666666667D-01)*AMP(11)+( $ -1.666666666666667D-01)*AMP(14)+(-1.666666666666667D-01)*AMP(26) - $ +((0.000000000000000D+00,-1.666666666666667D-01))*TMP_JAMP(11) + $ +((0.000000000000000D+00,-1.666666666666667D-01))*TMP_JAMP(8) JAMP(10,1) = (5.000000000000000D-01)*AMP(21)+(5.000000000000000D - $ -01)*AMP(24)+((0.000000000000000D+00,5.000000000000000D-01)) - $ *AMP(25)+(5.000000000000000D-01)*AMP(26)+((0.000000000000000D - $ +00,-5.000000000000000D-01))*AMP(27)+(-5.000000000000000D-01) - $ *TMP_JAMP(12)+((0.000000000000000D+00,5.000000000000000D-01)) - $ *TMP_JAMP(13) + $ -01)*AMP(24)+(5.000000000000000D-01)*AMP(26) + $ +((0.000000000000000D+00,-5.000000000000000D-01))*AMP(27)+( + $ -5.000000000000000D-01)*TMP_JAMP(2)+((0.000000000000000D+00 + $ ,5.000000000000000D-01))*TMP_JAMP(9)+(5.000000000000000D-01) + $ *TMP_JAMP(14) JAMP(11,1) = (5.000000000000000D-01)*AMP(12)+(5.000000000000000D $ -01)*AMP(14)+((0.000000000000000D+00,5.000000000000000D-01)) $ *AMP(15)+(5.000000000000000D-01)*AMP(30)+((0.000000000000000D - $ +00,-5.000000000000000D-01))*AMP(31)+(5.000000000000000D-01) - $ *TMP_JAMP(14)+((0.000000000000000D+00,5.000000000000000D-01)) - $ *TMP_JAMP(15) + $ +00,-5.000000000000000D-01))*AMP(31)+((0.000000000000000D+00 + $ ,5.000000000000000D-01))*TMP_JAMP(10)+(5.000000000000000D-01) + $ *TMP_JAMP(17) JAMP(12,1) = (-1.666666666666667D-01)*AMP(23)+( $ -1.666666666666667D-01)*AMP(24)+(-1.666666666666667D-01)*AMP(30) - $ +((0.000000000000000D+00,-1.666666666666667D-01))*TMP_JAMP(16) + $ +((0.000000000000000D+00,-1.666666666666667D-01))*TMP_JAMP(11) IF(INIT_MODE)THEN DO I=1, NGRAPHS diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gu_ttxgu/CPPProcess.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gu_ttxgu/CPPProcess.cc index 59c382aca4..4e5b97a517 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gu_ttxgu/CPPProcess.cc +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gu_ttxgu/CPPProcess.cc @@ -243,7 +243,7 @@ namespace mg5amcCpu // Wavefunction(s) for diagram number 1 vxxxxx( momenta, 0., cHel[ihel][0], -1, w_fp[0], 0 ); - imzxxx( momenta, cHel[ihel][1], +1, w_fp[1], 1 ); // NB: imzxxx only uses pz + ixxxxx( momenta, 0., cHel[ihel][1], +1, w_fp[1], 1 ); oxxxxx( momenta, cIPD[0], cHel[ihel][2], +1, w_fp[2], 2 ); @@ -251,14 +251,14 @@ namespace mg5amcCpu vxxxxx( momenta, 0., cHel[ihel][4], +1, w_fp[4], 4 ); - oxzxxx( momenta, cHel[ihel][5], +1, w_fp[5], 5 ); + oxxxxx( momenta, 0., cHel[ihel][5], +1, w_fp[5], 5 ); - VVV1P0_1( w_fp[0], w_fp[4], COUPs[0], 0., 0., w_fp[6] ); - FFV1P0_3( w_fp[3], w_fp[2], COUPs[1], 0., 0., w_fp[7] ); - FFV1_1( w_fp[5], w_fp[6], COUPs[1], 0., 0., w_fp[8] ); + VVV1P0_1( w_fp[0], w_fp[4], COUPs[0], 1.0, 0., 0., w_fp[6] ); + FFV1P0_3( w_fp[3], w_fp[2], COUPs[1], 1.0, 0., 0., w_fp[7] ); + FFV1_1( w_fp[5], w_fp[6], COUPs[1], 1.0, 0., 0., w_fp[8] ); // Amplitude(s) for diagram number 1 - FFV1_0( w_fp[1], w_fp[8], w_fp[7], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[1], w_fp[8], w_fp[7], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -271,10 +271,10 @@ namespace mg5amcCpu // *** DIAGRAM 2 OF 36 *** // Wavefunction(s) for diagram number 2 - FFV1_2( w_fp[1], w_fp[6], COUPs[1], 0., 0., w_fp[8] ); + FFV1_2( w_fp[1], w_fp[6], COUPs[1], 1.0, 0., 0., w_fp[8] ); // Amplitude(s) for diagram number 2 - FFV1_0( w_fp[8], w_fp[5], w_fp[7], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[8], w_fp[5], w_fp[7], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 2 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -287,10 +287,10 @@ namespace mg5amcCpu // *** DIAGRAM 3 OF 36 *** // Wavefunction(s) for diagram number 3 - FFV1P0_3( w_fp[1], w_fp[5], COUPs[1], 0., 0., w_fp[8] ); + FFV1P0_3( w_fp[1], w_fp[5], COUPs[1], 1.0, 0., 0., w_fp[8] ); // Amplitude(s) for diagram number 3 - VVV1_0( w_fp[6], w_fp[7], w_fp[8], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[6], w_fp[7], w_fp[8], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 3 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -303,10 +303,10 @@ namespace mg5amcCpu // *** DIAGRAM 4 OF 36 *** // Wavefunction(s) for diagram number 4 - FFV1_1( w_fp[2], w_fp[6], COUPs[1], cIPD[0], cIPD[1], w_fp[9] ); + FFV1_1( w_fp[2], w_fp[6], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[9] ); // Amplitude(s) for diagram number 4 - FFV1_0( w_fp[3], w_fp[9], w_fp[8], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[9], w_fp[8], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 4 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -319,10 +319,10 @@ namespace mg5amcCpu // *** DIAGRAM 5 OF 36 *** // Wavefunction(s) for diagram number 5 - FFV1_2( w_fp[3], w_fp[6], COUPs[1], cIPD[0], cIPD[1], w_fp[9] ); + FFV1_2( w_fp[3], w_fp[6], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[9] ); // Amplitude(s) for diagram number 5 - FFV1_0( w_fp[9], w_fp[2], w_fp[8], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[9], w_fp[2], w_fp[8], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 5 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -335,11 +335,11 @@ namespace mg5amcCpu // *** DIAGRAM 6 OF 36 *** // Wavefunction(s) for diagram number 6 - FFV1_1( w_fp[2], w_fp[0], COUPs[1], cIPD[0], cIPD[1], w_fp[9] ); - FFV1_2( w_fp[3], w_fp[4], COUPs[1], cIPD[0], cIPD[1], w_fp[6] ); + FFV1_1( w_fp[2], w_fp[0], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[9] ); + FFV1_2( w_fp[3], w_fp[4], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[6] ); // Amplitude(s) for diagram number 6 - FFV1_0( w_fp[6], w_fp[9], w_fp[8], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[6], w_fp[9], w_fp[8], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 6 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -350,11 +350,11 @@ namespace mg5amcCpu // *** DIAGRAM 7 OF 36 *** // Wavefunction(s) for diagram number 7 - FFV1_1( w_fp[5], w_fp[4], COUPs[1], 0., 0., w_fp[10] ); - FFV1P0_3( w_fp[3], w_fp[9], COUPs[1], 0., 0., w_fp[11] ); + FFV1_1( w_fp[5], w_fp[4], COUPs[1], 1.0, 0., 0., w_fp[10] ); + FFV1P0_3( w_fp[3], w_fp[9], COUPs[1], 1.0, 0., 0., w_fp[11] ); // Amplitude(s) for diagram number 7 - FFV1_0( w_fp[1], w_fp[10], w_fp[11], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[1], w_fp[10], w_fp[11], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 7 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -365,10 +365,10 @@ namespace mg5amcCpu // *** DIAGRAM 8 OF 36 *** // Wavefunction(s) for diagram number 8 - FFV1_2( w_fp[1], w_fp[4], COUPs[1], 0., 0., w_fp[12] ); + FFV1_2( w_fp[1], w_fp[4], COUPs[1], 1.0, 0., 0., w_fp[12] ); // Amplitude(s) for diagram number 8 - FFV1_0( w_fp[12], w_fp[5], w_fp[11], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[12], w_fp[5], w_fp[11], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 8 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -379,10 +379,10 @@ namespace mg5amcCpu // *** DIAGRAM 9 OF 36 *** // Wavefunction(s) for diagram number 9 - FFV1_1( w_fp[9], w_fp[4], COUPs[1], cIPD[0], cIPD[1], w_fp[13] ); + FFV1_1( w_fp[9], w_fp[4], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[13] ); // Amplitude(s) for diagram number 9 - FFV1_0( w_fp[3], w_fp[13], w_fp[8], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[13], w_fp[8], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 9 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -396,7 +396,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 10 - VVV1_0( w_fp[4], w_fp[8], w_fp[11], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[4], w_fp[8], w_fp[11], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 10 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -407,11 +407,11 @@ namespace mg5amcCpu // *** DIAGRAM 11 OF 36 *** // Wavefunction(s) for diagram number 11 - FFV1_2( w_fp[3], w_fp[0], COUPs[1], cIPD[0], cIPD[1], w_fp[11] ); - FFV1_1( w_fp[2], w_fp[4], COUPs[1], cIPD[0], cIPD[1], w_fp[13] ); + FFV1_2( w_fp[3], w_fp[0], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[11] ); + FFV1_1( w_fp[2], w_fp[4], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[13] ); // Amplitude(s) for diagram number 11 - FFV1_0( w_fp[11], w_fp[13], w_fp[8], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[11], w_fp[13], w_fp[8], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 11 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -422,10 +422,10 @@ namespace mg5amcCpu // *** DIAGRAM 12 OF 36 *** // Wavefunction(s) for diagram number 12 - FFV1P0_3( w_fp[11], w_fp[2], COUPs[1], 0., 0., w_fp[9] ); + FFV1P0_3( w_fp[11], w_fp[2], COUPs[1], 1.0, 0., 0., w_fp[9] ); // Amplitude(s) for diagram number 12 - FFV1_0( w_fp[1], w_fp[10], w_fp[9], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[1], w_fp[10], w_fp[9], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 12 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -439,7 +439,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 13 - FFV1_0( w_fp[12], w_fp[5], w_fp[9], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[12], w_fp[5], w_fp[9], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 13 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -450,10 +450,10 @@ namespace mg5amcCpu // *** DIAGRAM 14 OF 36 *** // Wavefunction(s) for diagram number 14 - FFV1_2( w_fp[11], w_fp[4], COUPs[1], cIPD[0], cIPD[1], w_fp[14] ); + FFV1_2( w_fp[11], w_fp[4], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[14] ); // Amplitude(s) for diagram number 14 - FFV1_0( w_fp[14], w_fp[2], w_fp[8], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[14], w_fp[2], w_fp[8], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 14 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -467,7 +467,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 15 - VVV1_0( w_fp[4], w_fp[8], w_fp[9], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[4], w_fp[8], w_fp[9], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 15 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -478,11 +478,11 @@ namespace mg5amcCpu // *** DIAGRAM 16 OF 36 *** // Wavefunction(s) for diagram number 16 - FFV1_1( w_fp[5], w_fp[0], COUPs[1], 0., 0., w_fp[9] ); - FFV1P0_3( w_fp[1], w_fp[9], COUPs[1], 0., 0., w_fp[14] ); + FFV1_1( w_fp[5], w_fp[0], COUPs[1], 1.0, 0., 0., w_fp[9] ); + FFV1P0_3( w_fp[1], w_fp[9], COUPs[1], 1.0, 0., 0., w_fp[14] ); // Amplitude(s) for diagram number 16 - FFV1_0( w_fp[3], w_fp[13], w_fp[14], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[13], w_fp[14], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 16 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -496,7 +496,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 17 - FFV1_0( w_fp[6], w_fp[2], w_fp[14], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[6], w_fp[2], w_fp[14], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 17 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -510,7 +510,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 18 - FFV1_0( w_fp[12], w_fp[9], w_fp[7], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[12], w_fp[9], w_fp[7], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 18 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -521,10 +521,10 @@ namespace mg5amcCpu // *** DIAGRAM 19 OF 36 *** // Wavefunction(s) for diagram number 19 - FFV1_1( w_fp[9], w_fp[4], COUPs[1], 0., 0., w_fp[11] ); + FFV1_1( w_fp[9], w_fp[4], COUPs[1], 1.0, 0., 0., w_fp[11] ); // Amplitude(s) for diagram number 19 - FFV1_0( w_fp[1], w_fp[11], w_fp[7], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[1], w_fp[11], w_fp[7], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 19 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -538,7 +538,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 20 - VVV1_0( w_fp[4], w_fp[7], w_fp[14], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[4], w_fp[7], w_fp[14], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 20 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -549,11 +549,11 @@ namespace mg5amcCpu // *** DIAGRAM 21 OF 36 *** // Wavefunction(s) for diagram number 21 - FFV1_2( w_fp[1], w_fp[0], COUPs[1], 0., 0., w_fp[14] ); - FFV1P0_3( w_fp[14], w_fp[5], COUPs[1], 0., 0., w_fp[11] ); + FFV1_2( w_fp[1], w_fp[0], COUPs[1], 1.0, 0., 0., w_fp[14] ); + FFV1P0_3( w_fp[14], w_fp[5], COUPs[1], 1.0, 0., 0., w_fp[11] ); // Amplitude(s) for diagram number 21 - FFV1_0( w_fp[3], w_fp[13], w_fp[11], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[13], w_fp[11], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 21 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -567,7 +567,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 22 - FFV1_0( w_fp[6], w_fp[2], w_fp[11], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[6], w_fp[2], w_fp[11], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 22 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -581,7 +581,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 23 - FFV1_0( w_fp[14], w_fp[10], w_fp[7], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[14], w_fp[10], w_fp[7], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 23 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -592,10 +592,10 @@ namespace mg5amcCpu // *** DIAGRAM 24 OF 36 *** // Wavefunction(s) for diagram number 24 - FFV1_2( w_fp[14], w_fp[4], COUPs[1], 0., 0., w_fp[9] ); + FFV1_2( w_fp[14], w_fp[4], COUPs[1], 1.0, 0., 0., w_fp[9] ); // Amplitude(s) for diagram number 24 - FFV1_0( w_fp[9], w_fp[5], w_fp[7], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[9], w_fp[5], w_fp[7], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 24 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -609,7 +609,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 25 - VVV1_0( w_fp[4], w_fp[7], w_fp[11], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[4], w_fp[7], w_fp[11], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 25 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -620,10 +620,10 @@ namespace mg5amcCpu // *** DIAGRAM 26 OF 36 *** // Wavefunction(s) for diagram number 26 - FFV1_1( w_fp[13], w_fp[0], COUPs[1], cIPD[0], cIPD[1], w_fp[11] ); + FFV1_1( w_fp[13], w_fp[0], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[11] ); // Amplitude(s) for diagram number 26 - FFV1_0( w_fp[3], w_fp[11], w_fp[8], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[11], w_fp[8], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 26 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -634,10 +634,10 @@ namespace mg5amcCpu // *** DIAGRAM 27 OF 36 *** // Wavefunction(s) for diagram number 27 - VVV1P0_1( w_fp[0], w_fp[8], COUPs[0], 0., 0., w_fp[11] ); + VVV1P0_1( w_fp[0], w_fp[8], COUPs[0], 1.0, 0., 0., w_fp[11] ); // Amplitude(s) for diagram number 27 - FFV1_0( w_fp[3], w_fp[13], w_fp[11], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[13], w_fp[11], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 27 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -648,10 +648,10 @@ namespace mg5amcCpu // *** DIAGRAM 28 OF 36 *** // Wavefunction(s) for diagram number 28 - FFV1_2( w_fp[6], w_fp[0], COUPs[1], cIPD[0], cIPD[1], w_fp[13] ); + FFV1_2( w_fp[6], w_fp[0], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[13] ); // Amplitude(s) for diagram number 28 - FFV1_0( w_fp[13], w_fp[2], w_fp[8], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[13], w_fp[2], w_fp[8], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 28 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -665,7 +665,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 29 - FFV1_0( w_fp[6], w_fp[2], w_fp[11], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[6], w_fp[2], w_fp[11], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 29 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -676,10 +676,10 @@ namespace mg5amcCpu // *** DIAGRAM 30 OF 36 *** // Wavefunction(s) for diagram number 30 - FFV1_1( w_fp[10], w_fp[0], COUPs[1], 0., 0., w_fp[6] ); + FFV1_1( w_fp[10], w_fp[0], COUPs[1], 1.0, 0., 0., w_fp[6] ); // Amplitude(s) for diagram number 30 - FFV1_0( w_fp[1], w_fp[6], w_fp[7], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[1], w_fp[6], w_fp[7], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 30 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -690,10 +690,10 @@ namespace mg5amcCpu // *** DIAGRAM 31 OF 36 *** // Wavefunction(s) for diagram number 31 - VVV1P0_1( w_fp[0], w_fp[7], COUPs[0], 0., 0., w_fp[6] ); + VVV1P0_1( w_fp[0], w_fp[7], COUPs[0], 1.0, 0., 0., w_fp[6] ); // Amplitude(s) for diagram number 31 - FFV1_0( w_fp[1], w_fp[10], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[1], w_fp[10], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 31 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -704,10 +704,10 @@ namespace mg5amcCpu // *** DIAGRAM 32 OF 36 *** // Wavefunction(s) for diagram number 32 - FFV1_2( w_fp[12], w_fp[0], COUPs[1], 0., 0., w_fp[10] ); + FFV1_2( w_fp[12], w_fp[0], COUPs[1], 1.0, 0., 0., w_fp[10] ); // Amplitude(s) for diagram number 32 - FFV1_0( w_fp[10], w_fp[5], w_fp[7], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[10], w_fp[5], w_fp[7], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 32 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -721,7 +721,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 33 - FFV1_0( w_fp[12], w_fp[5], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[12], w_fp[5], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 33 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -735,17 +735,17 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 34 - VVVV1_0( w_fp[0], w_fp[4], w_fp[7], w_fp[8], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[0], w_fp[4], w_fp[7], w_fp[8], COUPs[2], 1.0, &_fp[0] ); jamp_sv[2] -= 1. / 2. * amp_sv[0]; jamp_sv[5] += 1. / 2. * amp_sv[0]; jamp_sv[8] -= 1. / 2. * amp_sv[0]; jamp_sv[10] += 1. / 2. * amp_sv[0]; - VVVV3_0( w_fp[0], w_fp[4], w_fp[7], w_fp[8], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[0], w_fp[4], w_fp[7], w_fp[8], COUPs[2], 1.0, &_fp[0] ); jamp_sv[0] += 1. / 2. * amp_sv[0]; jamp_sv[2] -= 1. / 2. * amp_sv[0]; jamp_sv[7] += 1. / 2. * amp_sv[0]; jamp_sv[8] -= 1. / 2. * amp_sv[0]; - VVVV4_0( w_fp[0], w_fp[4], w_fp[7], w_fp[8], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[0], w_fp[4], w_fp[7], w_fp[8], COUPs[2], 1.0, &_fp[0] ); jamp_sv[0] += 1. / 2. * amp_sv[0]; jamp_sv[5] -= 1. / 2. * amp_sv[0]; jamp_sv[7] += 1. / 2. * amp_sv[0]; @@ -757,7 +757,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 35 - VVV1_0( w_fp[4], w_fp[8], w_fp[6], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[4], w_fp[8], w_fp[6], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 35 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -773,7 +773,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 36 - VVV1_0( w_fp[4], w_fp[7], w_fp[11], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[4], w_fp[7], w_fp[11], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 36 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1361,14 +1361,13 @@ namespace mg5amcCpu { // nprocesses>1 was last observed for "mirror processes" in uux_ttx in the 270 branch (see issue #343 and PRs #360 and #396) constexpr int nprocesses = 2; - static_assert( nprocesses == 1, "Assume nprocesses == 1" ); - // process_id corresponds to the index of DSIG1 Fortran functions (must be 1 because cudacpp is unable to handle DSIG2) + static_assert( nprocesses == 1 || nprocesses == 2, "Assume nprocesses == 1 or 2" ); constexpr int process_id = 1; // code generation source: madevent + cudacpp exporter static_assert( process_id == 1, "Assume process_id == 1" ); } // Denominators: spins, colors and identical particles - constexpr int helcolDenominators[1] = { 96,96 }; // assume nprocesses == 1 (#272 and #343) + constexpr int helcolDenominators[1] = { 96 }; // assume nprocesses == 1 (#272 and #343) #ifdef __CUDACC__ // Remember: in CUDA this is a kernel for one event, in c++ this processes n events diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gu_ttxgu/auto_dsig1.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gu_ttxgu/auto_dsig1.f index 58e83991fd..83a2a24681 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gu_ttxgu/auto_dsig1.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gu_ttxgu/auto_dsig1.f @@ -42,6 +42,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C LOCAL VARIABLES C INTEGER I,ITYPE,LP,IPROC + DOUBLE PRECISION QSCALE DOUBLE PRECISION G1 DOUBLE PRECISION D2,U2,S2,C2 DOUBLE PRECISION XPQ(-7:7),PD(0:MAXPROC) @@ -129,14 +130,27 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) IF (ABS(LPP(IB(1))).GE.1) THEN !LP=SIGN(1,LPP(IB(1))) - G1=PDG2PDF(LPP(IB(1)),0, IB(1),XBK(IB(1)),DSQRT(Q2FACT(IB(1)))) + IF (DSQRT(Q2FACT(IB(1))).EQ.0D0) THEN + QSCALE=0D0 + DO I=3,NEXTERNAL + QSCALE=QSCALE+DSQRT(MAX(0D0,(PP(0,I)+PP(3,I))*(PP(0,I) + $ -PP(3,I)))) + ENDDO + QSCALE=QSCALE/2D0 + ELSE + QSCALE=DSQRT(Q2FACT(IB(1))) + ENDIF + G1=PDG2PDF(LPP(IB(1)),0, IB(1),XBK(IB(1)), QSCALE) ENDIF IF (ABS(LPP(IB(2))).GE.1) THEN !LP=SIGN(1,LPP(IB(2))) - D2=PDG2PDF(LPP(IB(2)),1, IB(2),XBK(IB(2)),DSQRT(Q2FACT(IB(2)))) - U2=PDG2PDF(LPP(IB(2)),2, IB(2),XBK(IB(2)),DSQRT(Q2FACT(IB(2)))) - S2=PDG2PDF(LPP(IB(2)),3, IB(2),XBK(IB(2)),DSQRT(Q2FACT(IB(2)))) - C2=PDG2PDF(LPP(IB(2)),4, IB(2),XBK(IB(2)),DSQRT(Q2FACT(IB(2)))) + IF (DSQRT(Q2FACT(IB(2))).NE.0D0) THEN + QSCALE=DSQRT(Q2FACT(IB(2))) + ENDIF + D2=PDG2PDF(LPP(IB(2)),1, IB(2),XBK(IB(2)), QSCALE) + U2=PDG2PDF(LPP(IB(2)),2, IB(2),XBK(IB(2)), QSCALE) + S2=PDG2PDF(LPP(IB(2)),3, IB(2),XBK(IB(2)), QSCALE) + C2=PDG2PDF(LPP(IB(2)),4, IB(2),XBK(IB(2)), QSCALE) ENDIF PD(0) = 0D0 IPROC = 0 diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gu_ttxgu/matrix1.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gu_ttxgu/matrix1.f index 7508bec3da..0bd6789c09 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gu_ttxgu/matrix1.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gu_ttxgu/matrix1.f @@ -397,7 +397,7 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C LOCAL VARIABLES C INTEGER I,J,M,N - COMPLEX*16 ZTEMP, TMP_JAMP(16) + COMPLEX*16 ZTEMP, TMP_JAMP(17) REAL*8 CF(NCOLOR,NCOLOR) COMPLEX*16 AMP(NGRAPHS), JAMP(NCOLOR,NAMPSO) COMPLEX*16 W(6,NWAVEFUNCS) @@ -668,51 +668,55 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) TMP_JAMP(3) = AMP(36) + AMP(38) ! used 4 times TMP_JAMP(2) = AMP(3) + AMP(34) ! used 4 times TMP_JAMP(1) = AMP(35) + AMP(37) ! used 4 times - TMP_JAMP(16) = AMP(4) + AMP(5) ! used 2 times - TMP_JAMP(15) = AMP(2) + AMP(4) ! used 2 times - TMP_JAMP(14) = TMP_JAMP(3) - TMP_JAMP(2) ! used 2 times - TMP_JAMP(13) = AMP(1) + AMP(2) ! used 2 times - TMP_JAMP(12) = AMP(1) + AMP(5) ! used 2 times - TMP_JAMP(11) = TMP_JAMP(2) + TMP_JAMP(1) ! used 2 times - TMP_JAMP(10) = TMP_JAMP(3) + TMP_JAMP(1) ! used 2 times - TMP_JAMP(9) = AMP(5) + ((0.000000000000000D+00 + TMP_JAMP(17) = TMP_JAMP(3) - TMP_JAMP(2) ! used 2 times + TMP_JAMP(16) = TMP_JAMP(3) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(20) ! used 2 times + TMP_JAMP(15) = TMP_JAMP(3) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(29) ! used 2 times + TMP_JAMP(14) = TMP_JAMP(1) + ((-0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(15) ! used 2 times + TMP_JAMP(13) = TMP_JAMP(1) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(33) ! used 2 times + TMP_JAMP(12) = TMP_JAMP(1) + ((-0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(10) ! used 2 times + TMP_JAMP(11) = AMP(4) + AMP(5) ! used 2 times + TMP_JAMP(10) = AMP(2) + AMP(4) ! used 2 times + TMP_JAMP(9) = AMP(1) + AMP(2) ! used 2 times + TMP_JAMP(8) = AMP(1) + AMP(5) ! used 2 times + TMP_JAMP(7) = AMP(5) + ((0.000000000000000D+00 $ ,1.000000000000000D+00)) * AMP(28) ! used 2 times - TMP_JAMP(8) = AMP(1) + ((0.000000000000000D+00 + TMP_JAMP(6) = AMP(1) + ((0.000000000000000D+00 $ ,1.000000000000000D+00)) * AMP(19) ! used 2 times - TMP_JAMP(7) = TMP_JAMP(3) + ((-0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(29) ! used 2 times - TMP_JAMP(6) = AMP(2) + ((-0.000000000000000D+00 + TMP_JAMP(5) = AMP(2) + ((-0.000000000000000D+00 $ ,1.000000000000000D+00)) * AMP(32) ! used 2 times - TMP_JAMP(5) = AMP(4) + ((-0.000000000000000D+00 + TMP_JAMP(4) = AMP(4) + ((-0.000000000000000D+00 $ ,1.000000000000000D+00)) * AMP(9) ! used 2 times - TMP_JAMP(4) = TMP_JAMP(1) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(10) ! used 2 times JAMP(1,1) = (-5.000000000000000D-01)*AMP(6)+(-5.000000000000000D $ -01)*AMP(7)+(-5.000000000000000D-01)*AMP(22)+( $ -5.000000000000000D-01)*AMP(23)+((0.000000000000000D+00 $ ,5.000000000000000D-01))*AMP(25)+((0.000000000000000D+00, $ -5.000000000000000D-01))*AMP(31)+(5.000000000000000D-01) - $ *TMP_JAMP(4)+(5.000000000000000D-01)*TMP_JAMP(7) + $ *TMP_JAMP(12)+(5.000000000000000D-01)*TMP_JAMP(15) JAMP(2,1) = (1.666666666666667D-01)*AMP(7)+(1.666666666666667D $ -01)*AMP(8)+(1.666666666666667D-01)*AMP(12)+(1.666666666666667D $ -01)*AMP(13) JAMP(3,1) = (-5.000000000000000D-01)*AMP(8)+((0.000000000000000D $ +00,-5.000000000000000D-01))*AMP(33)+(-5.000000000000000D-01) - $ *TMP_JAMP(2)+(-5.000000000000000D-01)*TMP_JAMP(4) - $ +((0.000000000000000D+00,5.000000000000000D-01))*TMP_JAMP(5) - $ +((0.000000000000000D+00,5.000000000000000D-01))*TMP_JAMP(6) + $ *TMP_JAMP(2)+((0.000000000000000D+00,5.000000000000000D-01)) + $ *TMP_JAMP(4)+((0.000000000000000D+00,5.000000000000000D-01)) + $ *TMP_JAMP(5)+(-5.000000000000000D-01)*TMP_JAMP(12) JAMP(4,1) = (1.666666666666667D-01)*AMP(6)+((0.000000000000000D - $ +00,-1.666666666666667D-01))*TMP_JAMP(5)+((0.000000000000000D - $ +00,-1.666666666666667D-01))*TMP_JAMP(9) + $ +00,-1.666666666666667D-01))*TMP_JAMP(4)+((0.000000000000000D + $ +00,-1.666666666666667D-01))*TMP_JAMP(7) JAMP(5,1) = (1.666666666666667D-01)*AMP(18)+((0.000000000000000D - $ +00,-1.666666666666667D-01))*TMP_JAMP(6)+((0.000000000000000D - $ +00,-1.666666666666667D-01))*TMP_JAMP(8) + $ +00,-1.666666666666667D-01))*TMP_JAMP(5)+((0.000000000000000D + $ +00,-1.666666666666667D-01))*TMP_JAMP(6) JAMP(6,1) = (-5.000000000000000D-01)*AMP(17) $ +((0.000000000000000D+00,5.000000000000000D-01))*AMP(20) - $ +(5.000000000000000D-01)*TMP_JAMP(2)+(-5.000000000000000D-01) - $ *TMP_JAMP(7)+((0.000000000000000D+00,5.000000000000000D-01)) - $ *TMP_JAMP(8)+((0.000000000000000D+00,5.000000000000000D-01)) - $ *TMP_JAMP(9) + $ +(5.000000000000000D-01)*TMP_JAMP(2)+((0.000000000000000D+00 + $ ,5.000000000000000D-01))*TMP_JAMP(6)+((0.000000000000000D+00 + $ ,5.000000000000000D-01))*TMP_JAMP(7)+(-5.000000000000000D-01) + $ *TMP_JAMP(15) JAMP(7,1) = (1.666666666666667D-01)*AMP(16)+(1.666666666666667D $ -01)*AMP(17)+(1.666666666666667D-01)*AMP(21) $ +(1.666666666666667D-01)*AMP(22) @@ -720,28 +724,26 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) $ -5.000000000000000D-01)*AMP(13)+((0.000000000000000D+00 $ ,5.000000000000000D-01))*AMP(15)+(-5.000000000000000D-01) $ *AMP(16)+(-5.000000000000000D-01)*AMP(18)+((0.000000000000000D - $ +00,-5.000000000000000D-01))*AMP(20)+((0.000000000000000D+00, - $ -5.000000000000000D-01))*AMP(27)+((0.000000000000000D+00 - $ ,5.000000000000000D-01))*AMP(33)+(5.000000000000000D-01) - $ *TMP_JAMP(10) + $ +00,-5.000000000000000D-01))*AMP(27)+(5.000000000000000D-01) + $ *TMP_JAMP(13)+(5.000000000000000D-01)*TMP_JAMP(16) JAMP(9,1) = (-5.000000000000000D-01)*AMP(12)+( - $ -5.000000000000000D-01)*AMP(14)+((0.000000000000000D+00, - $ -5.000000000000000D-01))*AMP(15)+(-5.000000000000000D-01) - $ *AMP(30)+((0.000000000000000D+00,5.000000000000000D-01))*AMP(31) - $ +(-5.000000000000000D-01)*TMP_JAMP(11)+((0.000000000000000D+00, - $ -5.000000000000000D-01))*TMP_JAMP(12) + $ -5.000000000000000D-01)*AMP(14)+(-5.000000000000000D-01)*AMP(30) + $ +((0.000000000000000D+00,5.000000000000000D-01))*AMP(31)+( + $ -5.000000000000000D-01)*TMP_JAMP(2)+((0.000000000000000D+00, + $ -5.000000000000000D-01))*TMP_JAMP(8)+(-5.000000000000000D-01) + $ *TMP_JAMP(14) JAMP(10,1) = (1.666666666666667D-01)*AMP(23)+(1.666666666666667D $ -01)*AMP(24)+(1.666666666666667D-01)*AMP(30) - $ +((0.000000000000000D+00,1.666666666666667D-01))*TMP_JAMP(13) + $ +((0.000000000000000D+00,1.666666666666667D-01))*TMP_JAMP(9) JAMP(11,1) = (-5.000000000000000D-01)*AMP(21)+( $ -5.000000000000000D-01)*AMP(24)+((0.000000000000000D+00, $ -5.000000000000000D-01))*AMP(25)+(-5.000000000000000D-01) $ *AMP(26)+((0.000000000000000D+00,5.000000000000000D-01))*AMP(27) - $ +(-5.000000000000000D-01)*TMP_JAMP(14)+((0.000000000000000D+00, - $ -5.000000000000000D-01))*TMP_JAMP(15) + $ +((0.000000000000000D+00,-5.000000000000000D-01))*TMP_JAMP(10) + $ +(-5.000000000000000D-01)*TMP_JAMP(17) JAMP(12,1) = (1.666666666666667D-01)*AMP(11)+(1.666666666666667D $ -01)*AMP(14)+(1.666666666666667D-01)*AMP(26) - $ +((0.000000000000000D+00,1.666666666666667D-01))*TMP_JAMP(16) + $ +((0.000000000000000D+00,1.666666666666667D-01))*TMP_JAMP(11) IF(INIT_MODE)THEN DO I=1, NGRAPHS diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gux_ttxgux/CPPProcess.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gux_ttxgux/CPPProcess.cc index 607cb95cfd..a32372d31f 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gux_ttxgux/CPPProcess.cc +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gux_ttxgux/CPPProcess.cc @@ -243,7 +243,7 @@ namespace mg5amcCpu // Wavefunction(s) for diagram number 1 vxxxxx( momenta, 0., cHel[ihel][0], -1, w_fp[0], 0 ); - omzxxx( momenta, cHel[ihel][1], -1, w_fp[1], 1 ); // NB: omzxxx only uses pz + oxxxxx( momenta, 0., cHel[ihel][1], -1, w_fp[1], 1 ); oxxxxx( momenta, cIPD[0], cHel[ihel][2], +1, w_fp[2], 2 ); @@ -251,14 +251,14 @@ namespace mg5amcCpu vxxxxx( momenta, 0., cHel[ihel][4], +1, w_fp[4], 4 ); - ixzxxx( momenta, cHel[ihel][5], -1, w_fp[5], 5 ); + ixxxxx( momenta, 0., cHel[ihel][5], -1, w_fp[5], 5 ); - VVV1P0_1( w_fp[0], w_fp[4], COUPs[0], 0., 0., w_fp[6] ); - FFV1P0_3( w_fp[3], w_fp[2], COUPs[1], 0., 0., w_fp[7] ); - FFV1_1( w_fp[1], w_fp[6], COUPs[1], 0., 0., w_fp[8] ); + VVV1P0_1( w_fp[0], w_fp[4], COUPs[0], 1.0, 0., 0., w_fp[6] ); + FFV1P0_3( w_fp[3], w_fp[2], COUPs[1], 1.0, 0., 0., w_fp[7] ); + FFV1_1( w_fp[1], w_fp[6], COUPs[1], 1.0, 0., 0., w_fp[8] ); // Amplitude(s) for diagram number 1 - FFV1_0( w_fp[5], w_fp[8], w_fp[7], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[5], w_fp[8], w_fp[7], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -271,10 +271,10 @@ namespace mg5amcCpu // *** DIAGRAM 2 OF 36 *** // Wavefunction(s) for diagram number 2 - FFV1_2( w_fp[5], w_fp[6], COUPs[1], 0., 0., w_fp[8] ); + FFV1_2( w_fp[5], w_fp[6], COUPs[1], 1.0, 0., 0., w_fp[8] ); // Amplitude(s) for diagram number 2 - FFV1_0( w_fp[8], w_fp[1], w_fp[7], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[8], w_fp[1], w_fp[7], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 2 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -287,10 +287,10 @@ namespace mg5amcCpu // *** DIAGRAM 3 OF 36 *** // Wavefunction(s) for diagram number 3 - FFV1P0_3( w_fp[5], w_fp[1], COUPs[1], 0., 0., w_fp[8] ); + FFV1P0_3( w_fp[5], w_fp[1], COUPs[1], 1.0, 0., 0., w_fp[8] ); // Amplitude(s) for diagram number 3 - VVV1_0( w_fp[6], w_fp[7], w_fp[8], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[6], w_fp[7], w_fp[8], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 3 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -303,10 +303,10 @@ namespace mg5amcCpu // *** DIAGRAM 4 OF 36 *** // Wavefunction(s) for diagram number 4 - FFV1_1( w_fp[2], w_fp[6], COUPs[1], cIPD[0], cIPD[1], w_fp[9] ); + FFV1_1( w_fp[2], w_fp[6], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[9] ); // Amplitude(s) for diagram number 4 - FFV1_0( w_fp[3], w_fp[9], w_fp[8], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[9], w_fp[8], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 4 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -319,10 +319,10 @@ namespace mg5amcCpu // *** DIAGRAM 5 OF 36 *** // Wavefunction(s) for diagram number 5 - FFV1_2( w_fp[3], w_fp[6], COUPs[1], cIPD[0], cIPD[1], w_fp[9] ); + FFV1_2( w_fp[3], w_fp[6], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[9] ); // Amplitude(s) for diagram number 5 - FFV1_0( w_fp[9], w_fp[2], w_fp[8], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[9], w_fp[2], w_fp[8], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 5 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -335,11 +335,11 @@ namespace mg5amcCpu // *** DIAGRAM 6 OF 36 *** // Wavefunction(s) for diagram number 6 - FFV1_1( w_fp[2], w_fp[0], COUPs[1], cIPD[0], cIPD[1], w_fp[9] ); - FFV1_2( w_fp[3], w_fp[4], COUPs[1], cIPD[0], cIPD[1], w_fp[6] ); + FFV1_1( w_fp[2], w_fp[0], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[9] ); + FFV1_2( w_fp[3], w_fp[4], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[6] ); // Amplitude(s) for diagram number 6 - FFV1_0( w_fp[6], w_fp[9], w_fp[8], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[6], w_fp[9], w_fp[8], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 6 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -350,11 +350,11 @@ namespace mg5amcCpu // *** DIAGRAM 7 OF 36 *** // Wavefunction(s) for diagram number 7 - FFV1_1( w_fp[1], w_fp[4], COUPs[1], 0., 0., w_fp[10] ); - FFV1P0_3( w_fp[3], w_fp[9], COUPs[1], 0., 0., w_fp[11] ); + FFV1_1( w_fp[1], w_fp[4], COUPs[1], 1.0, 0., 0., w_fp[10] ); + FFV1P0_3( w_fp[3], w_fp[9], COUPs[1], 1.0, 0., 0., w_fp[11] ); // Amplitude(s) for diagram number 7 - FFV1_0( w_fp[5], w_fp[10], w_fp[11], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[5], w_fp[10], w_fp[11], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 7 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -365,10 +365,10 @@ namespace mg5amcCpu // *** DIAGRAM 8 OF 36 *** // Wavefunction(s) for diagram number 8 - FFV1_2( w_fp[5], w_fp[4], COUPs[1], 0., 0., w_fp[12] ); + FFV1_2( w_fp[5], w_fp[4], COUPs[1], 1.0, 0., 0., w_fp[12] ); // Amplitude(s) for diagram number 8 - FFV1_0( w_fp[12], w_fp[1], w_fp[11], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[12], w_fp[1], w_fp[11], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 8 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -379,10 +379,10 @@ namespace mg5amcCpu // *** DIAGRAM 9 OF 36 *** // Wavefunction(s) for diagram number 9 - FFV1_1( w_fp[9], w_fp[4], COUPs[1], cIPD[0], cIPD[1], w_fp[13] ); + FFV1_1( w_fp[9], w_fp[4], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[13] ); // Amplitude(s) for diagram number 9 - FFV1_0( w_fp[3], w_fp[13], w_fp[8], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[13], w_fp[8], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 9 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -396,7 +396,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 10 - VVV1_0( w_fp[4], w_fp[8], w_fp[11], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[4], w_fp[8], w_fp[11], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 10 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -407,11 +407,11 @@ namespace mg5amcCpu // *** DIAGRAM 11 OF 36 *** // Wavefunction(s) for diagram number 11 - FFV1_2( w_fp[3], w_fp[0], COUPs[1], cIPD[0], cIPD[1], w_fp[11] ); - FFV1_1( w_fp[2], w_fp[4], COUPs[1], cIPD[0], cIPD[1], w_fp[13] ); + FFV1_2( w_fp[3], w_fp[0], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[11] ); + FFV1_1( w_fp[2], w_fp[4], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[13] ); // Amplitude(s) for diagram number 11 - FFV1_0( w_fp[11], w_fp[13], w_fp[8], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[11], w_fp[13], w_fp[8], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 11 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -422,10 +422,10 @@ namespace mg5amcCpu // *** DIAGRAM 12 OF 36 *** // Wavefunction(s) for diagram number 12 - FFV1P0_3( w_fp[11], w_fp[2], COUPs[1], 0., 0., w_fp[9] ); + FFV1P0_3( w_fp[11], w_fp[2], COUPs[1], 1.0, 0., 0., w_fp[9] ); // Amplitude(s) for diagram number 12 - FFV1_0( w_fp[5], w_fp[10], w_fp[9], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[5], w_fp[10], w_fp[9], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 12 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -439,7 +439,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 13 - FFV1_0( w_fp[12], w_fp[1], w_fp[9], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[12], w_fp[1], w_fp[9], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 13 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -450,10 +450,10 @@ namespace mg5amcCpu // *** DIAGRAM 14 OF 36 *** // Wavefunction(s) for diagram number 14 - FFV1_2( w_fp[11], w_fp[4], COUPs[1], cIPD[0], cIPD[1], w_fp[14] ); + FFV1_2( w_fp[11], w_fp[4], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[14] ); // Amplitude(s) for diagram number 14 - FFV1_0( w_fp[14], w_fp[2], w_fp[8], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[14], w_fp[2], w_fp[8], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 14 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -467,7 +467,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 15 - VVV1_0( w_fp[4], w_fp[8], w_fp[9], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[4], w_fp[8], w_fp[9], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 15 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -478,11 +478,11 @@ namespace mg5amcCpu // *** DIAGRAM 16 OF 36 *** // Wavefunction(s) for diagram number 16 - FFV1_1( w_fp[1], w_fp[0], COUPs[1], 0., 0., w_fp[9] ); - FFV1P0_3( w_fp[5], w_fp[9], COUPs[1], 0., 0., w_fp[14] ); + FFV1_1( w_fp[1], w_fp[0], COUPs[1], 1.0, 0., 0., w_fp[9] ); + FFV1P0_3( w_fp[5], w_fp[9], COUPs[1], 1.0, 0., 0., w_fp[14] ); // Amplitude(s) for diagram number 16 - FFV1_0( w_fp[3], w_fp[13], w_fp[14], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[13], w_fp[14], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 16 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -496,7 +496,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 17 - FFV1_0( w_fp[6], w_fp[2], w_fp[14], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[6], w_fp[2], w_fp[14], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 17 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -510,7 +510,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 18 - FFV1_0( w_fp[12], w_fp[9], w_fp[7], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[12], w_fp[9], w_fp[7], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 18 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -521,10 +521,10 @@ namespace mg5amcCpu // *** DIAGRAM 19 OF 36 *** // Wavefunction(s) for diagram number 19 - FFV1_1( w_fp[9], w_fp[4], COUPs[1], 0., 0., w_fp[11] ); + FFV1_1( w_fp[9], w_fp[4], COUPs[1], 1.0, 0., 0., w_fp[11] ); // Amplitude(s) for diagram number 19 - FFV1_0( w_fp[5], w_fp[11], w_fp[7], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[5], w_fp[11], w_fp[7], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 19 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -538,7 +538,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 20 - VVV1_0( w_fp[4], w_fp[7], w_fp[14], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[4], w_fp[7], w_fp[14], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 20 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -549,11 +549,11 @@ namespace mg5amcCpu // *** DIAGRAM 21 OF 36 *** // Wavefunction(s) for diagram number 21 - FFV1_2( w_fp[5], w_fp[0], COUPs[1], 0., 0., w_fp[14] ); - FFV1P0_3( w_fp[14], w_fp[1], COUPs[1], 0., 0., w_fp[11] ); + FFV1_2( w_fp[5], w_fp[0], COUPs[1], 1.0, 0., 0., w_fp[14] ); + FFV1P0_3( w_fp[14], w_fp[1], COUPs[1], 1.0, 0., 0., w_fp[11] ); // Amplitude(s) for diagram number 21 - FFV1_0( w_fp[3], w_fp[13], w_fp[11], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[13], w_fp[11], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 21 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -567,7 +567,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 22 - FFV1_0( w_fp[6], w_fp[2], w_fp[11], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[6], w_fp[2], w_fp[11], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 22 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -581,7 +581,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 23 - FFV1_0( w_fp[14], w_fp[10], w_fp[7], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[14], w_fp[10], w_fp[7], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 23 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -592,10 +592,10 @@ namespace mg5amcCpu // *** DIAGRAM 24 OF 36 *** // Wavefunction(s) for diagram number 24 - FFV1_2( w_fp[14], w_fp[4], COUPs[1], 0., 0., w_fp[9] ); + FFV1_2( w_fp[14], w_fp[4], COUPs[1], 1.0, 0., 0., w_fp[9] ); // Amplitude(s) for diagram number 24 - FFV1_0( w_fp[9], w_fp[1], w_fp[7], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[9], w_fp[1], w_fp[7], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 24 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -609,7 +609,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 25 - VVV1_0( w_fp[4], w_fp[7], w_fp[11], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[4], w_fp[7], w_fp[11], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 25 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -620,10 +620,10 @@ namespace mg5amcCpu // *** DIAGRAM 26 OF 36 *** // Wavefunction(s) for diagram number 26 - FFV1_1( w_fp[13], w_fp[0], COUPs[1], cIPD[0], cIPD[1], w_fp[11] ); + FFV1_1( w_fp[13], w_fp[0], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[11] ); // Amplitude(s) for diagram number 26 - FFV1_0( w_fp[3], w_fp[11], w_fp[8], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[11], w_fp[8], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 26 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -634,10 +634,10 @@ namespace mg5amcCpu // *** DIAGRAM 27 OF 36 *** // Wavefunction(s) for diagram number 27 - VVV1P0_1( w_fp[0], w_fp[8], COUPs[0], 0., 0., w_fp[11] ); + VVV1P0_1( w_fp[0], w_fp[8], COUPs[0], 1.0, 0., 0., w_fp[11] ); // Amplitude(s) for diagram number 27 - FFV1_0( w_fp[3], w_fp[13], w_fp[11], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[13], w_fp[11], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 27 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -648,10 +648,10 @@ namespace mg5amcCpu // *** DIAGRAM 28 OF 36 *** // Wavefunction(s) for diagram number 28 - FFV1_2( w_fp[6], w_fp[0], COUPs[1], cIPD[0], cIPD[1], w_fp[13] ); + FFV1_2( w_fp[6], w_fp[0], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[13] ); // Amplitude(s) for diagram number 28 - FFV1_0( w_fp[13], w_fp[2], w_fp[8], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[13], w_fp[2], w_fp[8], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 28 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -665,7 +665,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 29 - FFV1_0( w_fp[6], w_fp[2], w_fp[11], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[6], w_fp[2], w_fp[11], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 29 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -676,10 +676,10 @@ namespace mg5amcCpu // *** DIAGRAM 30 OF 36 *** // Wavefunction(s) for diagram number 30 - FFV1_1( w_fp[10], w_fp[0], COUPs[1], 0., 0., w_fp[6] ); + FFV1_1( w_fp[10], w_fp[0], COUPs[1], 1.0, 0., 0., w_fp[6] ); // Amplitude(s) for diagram number 30 - FFV1_0( w_fp[5], w_fp[6], w_fp[7], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[5], w_fp[6], w_fp[7], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 30 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -690,10 +690,10 @@ namespace mg5amcCpu // *** DIAGRAM 31 OF 36 *** // Wavefunction(s) for diagram number 31 - VVV1P0_1( w_fp[0], w_fp[7], COUPs[0], 0., 0., w_fp[6] ); + VVV1P0_1( w_fp[0], w_fp[7], COUPs[0], 1.0, 0., 0., w_fp[6] ); // Amplitude(s) for diagram number 31 - FFV1_0( w_fp[5], w_fp[10], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[5], w_fp[10], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 31 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -704,10 +704,10 @@ namespace mg5amcCpu // *** DIAGRAM 32 OF 36 *** // Wavefunction(s) for diagram number 32 - FFV1_2( w_fp[12], w_fp[0], COUPs[1], 0., 0., w_fp[10] ); + FFV1_2( w_fp[12], w_fp[0], COUPs[1], 1.0, 0., 0., w_fp[10] ); // Amplitude(s) for diagram number 32 - FFV1_0( w_fp[10], w_fp[1], w_fp[7], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[10], w_fp[1], w_fp[7], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 32 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -721,7 +721,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 33 - FFV1_0( w_fp[12], w_fp[1], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[12], w_fp[1], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 33 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -735,17 +735,17 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 34 - VVVV1_0( w_fp[0], w_fp[4], w_fp[7], w_fp[8], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[0], w_fp[4], w_fp[7], w_fp[8], COUPs[2], 1.0, &_fp[0] ); jamp_sv[4] -= 1. / 2. * amp_sv[0]; jamp_sv[7] += 1. / 2. * amp_sv[0]; jamp_sv[8] -= 1. / 2. * amp_sv[0]; jamp_sv[11] += 1. / 2. * amp_sv[0]; - VVVV3_0( w_fp[0], w_fp[4], w_fp[7], w_fp[8], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[0], w_fp[4], w_fp[7], w_fp[8], COUPs[2], 1.0, &_fp[0] ); jamp_sv[0] -= 1. / 2. * amp_sv[0]; jamp_sv[3] -= 1. / 2. * amp_sv[0]; jamp_sv[7] += 1. / 2. * amp_sv[0]; jamp_sv[11] += 1. / 2. * amp_sv[0]; - VVVV4_0( w_fp[0], w_fp[4], w_fp[7], w_fp[8], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[0], w_fp[4], w_fp[7], w_fp[8], COUPs[2], 1.0, &_fp[0] ); jamp_sv[0] -= 1. / 2. * amp_sv[0]; jamp_sv[3] -= 1. / 2. * amp_sv[0]; jamp_sv[4] += 1. / 2. * amp_sv[0]; @@ -757,7 +757,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 35 - VVV1_0( w_fp[4], w_fp[8], w_fp[6], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[4], w_fp[8], w_fp[6], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 35 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -773,7 +773,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 36 - VVV1_0( w_fp[4], w_fp[7], w_fp[11], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[4], w_fp[7], w_fp[11], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 36 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1361,14 +1361,13 @@ namespace mg5amcCpu { // nprocesses>1 was last observed for "mirror processes" in uux_ttx in the 270 branch (see issue #343 and PRs #360 and #396) constexpr int nprocesses = 2; - static_assert( nprocesses == 1, "Assume nprocesses == 1" ); - // process_id corresponds to the index of DSIG1 Fortran functions (must be 1 because cudacpp is unable to handle DSIG2) + static_assert( nprocesses == 1 || nprocesses == 2, "Assume nprocesses == 1 or 2" ); constexpr int process_id = 1; // code generation source: madevent + cudacpp exporter static_assert( process_id == 1, "Assume process_id == 1" ); } // Denominators: spins, colors and identical particles - constexpr int helcolDenominators[1] = { 96,96 }; // assume nprocesses == 1 (#272 and #343) + constexpr int helcolDenominators[1] = { 96 }; // assume nprocesses == 1 (#272 and #343) #ifdef __CUDACC__ // Remember: in CUDA this is a kernel for one event, in c++ this processes n events diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gux_ttxgux/auto_dsig1.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gux_ttxgux/auto_dsig1.f index 56e24ed83e..8cb3f9af60 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gux_ttxgux/auto_dsig1.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gux_ttxgux/auto_dsig1.f @@ -42,6 +42,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C LOCAL VARIABLES C INTEGER I,ITYPE,LP,IPROC + DOUBLE PRECISION QSCALE DOUBLE PRECISION G1 DOUBLE PRECISION CX2,SX2,UX2,DX2 DOUBLE PRECISION XPQ(-7:7),PD(0:MAXPROC) @@ -129,18 +130,27 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) IF (ABS(LPP(IB(1))).GE.1) THEN !LP=SIGN(1,LPP(IB(1))) - G1=PDG2PDF(LPP(IB(1)),0, IB(1),XBK(IB(1)),DSQRT(Q2FACT(IB(1)))) + IF (DSQRT(Q2FACT(IB(1))).EQ.0D0) THEN + QSCALE=0D0 + DO I=3,NEXTERNAL + QSCALE=QSCALE+DSQRT(MAX(0D0,(PP(0,I)+PP(3,I))*(PP(0,I) + $ -PP(3,I)))) + ENDDO + QSCALE=QSCALE/2D0 + ELSE + QSCALE=DSQRT(Q2FACT(IB(1))) + ENDIF + G1=PDG2PDF(LPP(IB(1)),0, IB(1),XBK(IB(1)), QSCALE) ENDIF IF (ABS(LPP(IB(2))).GE.1) THEN !LP=SIGN(1,LPP(IB(2))) - CX2=PDG2PDF(LPP(IB(2)),-4, IB(2),XBK(IB(2)),DSQRT(Q2FACT(IB(2)) - $ )) - SX2=PDG2PDF(LPP(IB(2)),-3, IB(2),XBK(IB(2)),DSQRT(Q2FACT(IB(2)) - $ )) - UX2=PDG2PDF(LPP(IB(2)),-2, IB(2),XBK(IB(2)),DSQRT(Q2FACT(IB(2)) - $ )) - DX2=PDG2PDF(LPP(IB(2)),-1, IB(2),XBK(IB(2)),DSQRT(Q2FACT(IB(2)) - $ )) + IF (DSQRT(Q2FACT(IB(2))).NE.0D0) THEN + QSCALE=DSQRT(Q2FACT(IB(2))) + ENDIF + CX2=PDG2PDF(LPP(IB(2)),-4, IB(2),XBK(IB(2)), QSCALE) + SX2=PDG2PDF(LPP(IB(2)),-3, IB(2),XBK(IB(2)), QSCALE) + UX2=PDG2PDF(LPP(IB(2)),-2, IB(2),XBK(IB(2)), QSCALE) + DX2=PDG2PDF(LPP(IB(2)),-1, IB(2),XBK(IB(2)), QSCALE) ENDIF PD(0) = 0D0 IPROC = 0 diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gux_ttxgux/matrix1.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gux_ttxgux/matrix1.f index d1e36d2d51..704f8e6b46 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gux_ttxgux/matrix1.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gux_ttxgux/matrix1.f @@ -397,7 +397,7 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C LOCAL VARIABLES C INTEGER I,J,M,N - COMPLEX*16 ZTEMP, TMP_JAMP(16) + COMPLEX*16 ZTEMP, TMP_JAMP(17) REAL*8 CF(NCOLOR,NCOLOR) COMPLEX*16 AMP(NGRAPHS), JAMP(NCOLOR,NAMPSO) COMPLEX*16 W(6,NWAVEFUNCS) @@ -666,32 +666,35 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) TMP_JAMP(3) = AMP(35) + AMP(37) ! used 4 times TMP_JAMP(2) = AMP(3) + AMP(34) ! used 4 times TMP_JAMP(1) = AMP(36) + AMP(38) ! used 4 times - TMP_JAMP(16) = AMP(1) + AMP(5) ! used 2 times - TMP_JAMP(15) = TMP_JAMP(3) + TMP_JAMP(2) ! used 2 times - TMP_JAMP(14) = AMP(1) + AMP(2) ! used 2 times - TMP_JAMP(13) = AMP(4) + AMP(5) ! used 2 times - TMP_JAMP(12) = AMP(2) + AMP(4) ! used 2 times - TMP_JAMP(11) = TMP_JAMP(2) - TMP_JAMP(1) ! used 2 times - TMP_JAMP(10) = AMP(4) + ((-0.000000000000000D+00 + TMP_JAMP(17) = TMP_JAMP(3) + TMP_JAMP(2) ! used 2 times + TMP_JAMP(16) = TMP_JAMP(3) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(33) ! used 2 times + TMP_JAMP(15) = TMP_JAMP(3) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(10) ! used 2 times + TMP_JAMP(14) = TMP_JAMP(1) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(25) ! used 2 times + TMP_JAMP(13) = TMP_JAMP(1) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(29) ! used 2 times + TMP_JAMP(12) = TMP_JAMP(1) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(20) ! used 2 times + TMP_JAMP(11) = AMP(1) + AMP(5) ! used 2 times + TMP_JAMP(10) = AMP(1) + AMP(2) ! used 2 times + TMP_JAMP(9) = AMP(4) + AMP(5) ! used 2 times + TMP_JAMP(8) = AMP(2) + AMP(4) ! used 2 times + TMP_JAMP(7) = AMP(4) + ((-0.000000000000000D+00 $ ,1.000000000000000D+00)) * AMP(9) ! used 2 times - TMP_JAMP(9) = AMP(2) + ((-0.000000000000000D+00 + TMP_JAMP(6) = AMP(2) + ((-0.000000000000000D+00 $ ,1.000000000000000D+00)) * AMP(32) ! used 2 times - TMP_JAMP(8) = TMP_JAMP(3) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(10) ! used 2 times - TMP_JAMP(7) = AMP(5) + ((0.000000000000000D+00 + TMP_JAMP(5) = AMP(5) + ((0.000000000000000D+00 $ ,1.000000000000000D+00)) * AMP(28) ! used 2 times - TMP_JAMP(6) = AMP(1) + ((0.000000000000000D+00 + TMP_JAMP(4) = AMP(1) + ((0.000000000000000D+00 $ ,1.000000000000000D+00)) * AMP(19) ! used 2 times - TMP_JAMP(5) = TMP_JAMP(1) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(20) ! used 2 times - TMP_JAMP(4) = TMP_JAMP(3) + TMP_JAMP(1) ! used 2 times JAMP(1,1) = (5.000000000000000D-01)*AMP(11)+(5.000000000000000D $ -01)*AMP(13)+((0.000000000000000D+00,-5.000000000000000D-01)) $ *AMP(15)+(5.000000000000000D-01)*AMP(16)+(5.000000000000000D-01) - $ *AMP(18)+((0.000000000000000D+00,5.000000000000000D-01))*AMP(20) - $ +((0.000000000000000D+00,5.000000000000000D-01))*AMP(27) - $ +((0.000000000000000D+00,-5.000000000000000D-01))*AMP(33)+( - $ -5.000000000000000D-01)*TMP_JAMP(4) + $ *AMP(18)+((0.000000000000000D+00,5.000000000000000D-01))*AMP(27) + $ +(-5.000000000000000D-01)*TMP_JAMP(12)+(-5.000000000000000D-01) + $ *TMP_JAMP(16) JAMP(2,1) = (-1.666666666666667D-01)*AMP(16)+( $ -1.666666666666667D-01)*AMP(17)+(-1.666666666666667D-01)*AMP(21) $ +(-1.666666666666667D-01)*AMP(22) @@ -699,46 +702,45 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) $ -01)*AMP(8)+(-1.666666666666667D-01)*AMP(12)+( $ -1.666666666666667D-01)*AMP(13) JAMP(4,1) = (5.000000000000000D-01)*AMP(6)+(5.000000000000000D - $ -01)*AMP(7)+((0.000000000000000D+00,5.000000000000000D-01)) - $ *AMP(10)+(5.000000000000000D-01)*AMP(22)+(5.000000000000000D-01) - $ *AMP(23)+((0.000000000000000D+00,-5.000000000000000D-01)) - $ *AMP(25)+((0.000000000000000D+00,-5.000000000000000D-01)) - $ *AMP(29)+((0.000000000000000D+00,5.000000000000000D-01))*AMP(31) - $ +(-5.000000000000000D-01)*TMP_JAMP(4) + $ -01)*AMP(7)+(5.000000000000000D-01)*AMP(22)+(5.000000000000000D + $ -01)*AMP(23)+((0.000000000000000D+00,-5.000000000000000D-01)) + $ *AMP(25)+((0.000000000000000D+00,5.000000000000000D-01))*AMP(31) + $ +(-5.000000000000000D-01)*TMP_JAMP(13)+(-5.000000000000000D-01) + $ *TMP_JAMP(15) JAMP(5,1) = (5.000000000000000D-01)*AMP(17)+((0.000000000000000D $ +00,5.000000000000000D-01))*AMP(29)+(-5.000000000000000D-01) - $ *TMP_JAMP(2)+(5.000000000000000D-01)*TMP_JAMP(5) - $ +((0.000000000000000D+00,-5.000000000000000D-01))*TMP_JAMP(6) - $ +((0.000000000000000D+00,-5.000000000000000D-01))*TMP_JAMP(7) + $ *TMP_JAMP(2)+((0.000000000000000D+00,-5.000000000000000D-01)) + $ *TMP_JAMP(4)+((0.000000000000000D+00,-5.000000000000000D-01)) + $ *TMP_JAMP(5)+(5.000000000000000D-01)*TMP_JAMP(12) JAMP(6,1) = (-1.666666666666667D-01)*AMP(18) + $ +((0.000000000000000D+00,1.666666666666667D-01))*TMP_JAMP(4) $ +((0.000000000000000D+00,1.666666666666667D-01))*TMP_JAMP(6) - $ +((0.000000000000000D+00,1.666666666666667D-01))*TMP_JAMP(9) JAMP(7,1) = (-1.666666666666667D-01)*AMP(6)+((0.000000000000000D - $ +00,1.666666666666667D-01))*TMP_JAMP(7)+((0.000000000000000D+00 - $ ,1.666666666666667D-01))*TMP_JAMP(10) + $ +00,1.666666666666667D-01))*TMP_JAMP(5)+((0.000000000000000D+00 + $ ,1.666666666666667D-01))*TMP_JAMP(7) JAMP(8,1) = (5.000000000000000D-01)*AMP(8)+((0.000000000000000D $ +00,5.000000000000000D-01))*AMP(33)+(5.000000000000000D-01) - $ *TMP_JAMP(2)+(5.000000000000000D-01)*TMP_JAMP(8) - $ +((0.000000000000000D+00,-5.000000000000000D-01))*TMP_JAMP(9) - $ +((0.000000000000000D+00,-5.000000000000000D-01))*TMP_JAMP(10) + $ *TMP_JAMP(2)+((0.000000000000000D+00,-5.000000000000000D-01)) + $ *TMP_JAMP(6)+((0.000000000000000D+00,-5.000000000000000D-01)) + $ *TMP_JAMP(7)+(5.000000000000000D-01)*TMP_JAMP(15) JAMP(9,1) = (5.000000000000000D-01)*AMP(21)+(5.000000000000000D - $ -01)*AMP(24)+((0.000000000000000D+00,5.000000000000000D-01)) - $ *AMP(25)+(5.000000000000000D-01)*AMP(26)+((0.000000000000000D - $ +00,-5.000000000000000D-01))*AMP(27)+(-5.000000000000000D-01) - $ *TMP_JAMP(11)+((0.000000000000000D+00,5.000000000000000D-01)) - $ *TMP_JAMP(12) + $ -01)*AMP(24)+(5.000000000000000D-01)*AMP(26) + $ +((0.000000000000000D+00,-5.000000000000000D-01))*AMP(27)+( + $ -5.000000000000000D-01)*TMP_JAMP(2)+((0.000000000000000D+00 + $ ,5.000000000000000D-01))*TMP_JAMP(8)+(5.000000000000000D-01) + $ *TMP_JAMP(14) JAMP(10,1) = (-1.666666666666667D-01)*AMP(11)+( $ -1.666666666666667D-01)*AMP(14)+(-1.666666666666667D-01)*AMP(26) - $ +((0.000000000000000D+00,-1.666666666666667D-01))*TMP_JAMP(13) + $ +((0.000000000000000D+00,-1.666666666666667D-01))*TMP_JAMP(9) JAMP(11,1) = (-1.666666666666667D-01)*AMP(23)+( $ -1.666666666666667D-01)*AMP(24)+(-1.666666666666667D-01)*AMP(30) - $ +((0.000000000000000D+00,-1.666666666666667D-01))*TMP_JAMP(14) + $ +((0.000000000000000D+00,-1.666666666666667D-01))*TMP_JAMP(10) JAMP(12,1) = (5.000000000000000D-01)*AMP(12)+(5.000000000000000D $ -01)*AMP(14)+((0.000000000000000D+00,5.000000000000000D-01)) $ *AMP(15)+(5.000000000000000D-01)*AMP(30)+((0.000000000000000D - $ +00,-5.000000000000000D-01))*AMP(31)+(5.000000000000000D-01) - $ *TMP_JAMP(15)+((0.000000000000000D+00,5.000000000000000D-01)) - $ *TMP_JAMP(16) + $ +00,-5.000000000000000D-01))*AMP(31)+((0.000000000000000D+00 + $ ,5.000000000000000D-01))*TMP_JAMP(11)+(5.000000000000000D-01) + $ *TMP_JAMP(17) IF(INIT_MODE)THEN DO I=1, NGRAPHS diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uc_ttxuc/CPPProcess.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uc_ttxuc/CPPProcess.cc index 0ac5734c21..835cdc1f93 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uc_ttxuc/CPPProcess.cc +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uc_ttxuc/CPPProcess.cc @@ -243,24 +243,24 @@ namespace mg5amcCpu // *** DIAGRAM 1 OF 7 *** // Wavefunction(s) for diagram number 1 - ipzxxx( momenta, cHel[ihel][0], +1, w_fp[0], 0 ); // NB: ipzxxx only uses pz + ixxxxx( momenta, 0., cHel[ihel][0], +1, w_fp[0], 0 ); - imzxxx( momenta, cHel[ihel][1], +1, w_fp[1], 1 ); // NB: imzxxx only uses pz + ixxxxx( momenta, 0., cHel[ihel][1], +1, w_fp[1], 1 ); oxxxxx( momenta, cIPD[0], cHel[ihel][2], +1, w_fp[2], 2 ); ixxxxx( momenta, cIPD[0], cHel[ihel][3], -1, w_fp[3], 3 ); - oxzxxx( momenta, cHel[ihel][4], +1, w_fp[4], 4 ); + oxxxxx( momenta, 0., cHel[ihel][4], +1, w_fp[4], 4 ); - oxzxxx( momenta, cHel[ihel][5], +1, w_fp[5], 5 ); + oxxxxx( momenta, 0., cHel[ihel][5], +1, w_fp[5], 5 ); - FFV1P0_3( w_fp[0], w_fp[4], COUPs[1], 0., 0., w_fp[6] ); - FFV1P0_3( w_fp[1], w_fp[5], COUPs[1], 0., 0., w_fp[7] ); - FFV1_1( w_fp[2], w_fp[6], COUPs[1], cIPD[0], cIPD[1], w_fp[8] ); + FFV1P0_3( w_fp[0], w_fp[4], COUPs[1], 1.0, 0., 0., w_fp[6] ); + FFV1P0_3( w_fp[1], w_fp[5], COUPs[1], 1.0, 0., 0., w_fp[7] ); + FFV1_1( w_fp[2], w_fp[6], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[8] ); // Amplitude(s) for diagram number 1 - FFV1_0( w_fp[3], w_fp[8], w_fp[7], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[8], w_fp[7], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -273,10 +273,10 @@ namespace mg5amcCpu // *** DIAGRAM 2 OF 7 *** // Wavefunction(s) for diagram number 2 - FFV1_2( w_fp[3], w_fp[6], COUPs[1], cIPD[0], cIPD[1], w_fp[8] ); + FFV1_2( w_fp[3], w_fp[6], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[8] ); // Amplitude(s) for diagram number 2 - FFV1_0( w_fp[8], w_fp[2], w_fp[7], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[8], w_fp[2], w_fp[7], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 2 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -289,10 +289,10 @@ namespace mg5amcCpu // *** DIAGRAM 3 OF 7 *** // Wavefunction(s) for diagram number 3 - FFV1P0_3( w_fp[3], w_fp[2], COUPs[1], 0., 0., w_fp[8] ); + FFV1P0_3( w_fp[3], w_fp[2], COUPs[1], 1.0, 0., 0., w_fp[8] ); // Amplitude(s) for diagram number 3 - VVV1_0( w_fp[6], w_fp[7], w_fp[8], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[6], w_fp[7], w_fp[8], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 3 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -303,10 +303,10 @@ namespace mg5amcCpu // *** DIAGRAM 4 OF 7 *** // Wavefunction(s) for diagram number 4 - FFV1_2( w_fp[1], w_fp[6], COUPs[1], 0., 0., w_fp[3] ); + FFV1_2( w_fp[1], w_fp[6], COUPs[1], 1.0, 0., 0., w_fp[3] ); // Amplitude(s) for diagram number 4 - FFV1_0( w_fp[3], w_fp[5], w_fp[8], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[5], w_fp[8], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 4 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -319,10 +319,10 @@ namespace mg5amcCpu // *** DIAGRAM 5 OF 7 *** // Wavefunction(s) for diagram number 5 - FFV1_1( w_fp[5], w_fp[6], COUPs[1], 0., 0., w_fp[3] ); + FFV1_1( w_fp[5], w_fp[6], COUPs[1], 1.0, 0., 0., w_fp[3] ); // Amplitude(s) for diagram number 5 - FFV1_0( w_fp[1], w_fp[3], w_fp[8], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[1], w_fp[3], w_fp[8], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 5 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -335,10 +335,10 @@ namespace mg5amcCpu // *** DIAGRAM 6 OF 7 *** // Wavefunction(s) for diagram number 6 - FFV1_2( w_fp[0], w_fp[7], COUPs[1], 0., 0., w_fp[3] ); + FFV1_2( w_fp[0], w_fp[7], COUPs[1], 1.0, 0., 0., w_fp[3] ); // Amplitude(s) for diagram number 6 - FFV1_0( w_fp[3], w_fp[4], w_fp[8], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[4], w_fp[8], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 6 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -351,10 +351,10 @@ namespace mg5amcCpu // *** DIAGRAM 7 OF 7 *** // Wavefunction(s) for diagram number 7 - FFV1_2( w_fp[0], w_fp[8], COUPs[1], 0., 0., w_fp[3] ); + FFV1_2( w_fp[0], w_fp[8], COUPs[1], 1.0, 0., 0., w_fp[3] ); // Amplitude(s) for diagram number 7 - FFV1_0( w_fp[3], w_fp[4], w_fp[7], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[4], w_fp[7], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 7 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -936,14 +936,13 @@ namespace mg5amcCpu { // nprocesses>1 was last observed for "mirror processes" in uux_ttx in the 270 branch (see issue #343 and PRs #360 and #396) constexpr int nprocesses = 2; - static_assert( nprocesses == 1, "Assume nprocesses == 1" ); - // process_id corresponds to the index of DSIG1 Fortran functions (must be 1 because cudacpp is unable to handle DSIG2) + static_assert( nprocesses == 1 || nprocesses == 2, "Assume nprocesses == 1 or 2" ); constexpr int process_id = 1; // code generation source: madevent + cudacpp exporter static_assert( process_id == 1, "Assume process_id == 1" ); } // Denominators: spins, colors and identical particles - constexpr int helcolDenominators[1] = { 36,36 }; // assume nprocesses == 1 (#272 and #343) + constexpr int helcolDenominators[1] = { 36 }; // assume nprocesses == 1 (#272 and #343) #ifdef __CUDACC__ // Remember: in CUDA this is a kernel for one event, in c++ this processes n events diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uc_ttxuc/auto_dsig1.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uc_ttxuc/auto_dsig1.f index c68a9f5a67..3488dfd2e6 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uc_ttxuc/auto_dsig1.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uc_ttxuc/auto_dsig1.f @@ -44,6 +44,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C LOCAL VARIABLES C INTEGER I,ITYPE,LP,IPROC + DOUBLE PRECISION QSCALE DOUBLE PRECISION D1,U1,C1 DOUBLE PRECISION D2,S2,C2 DOUBLE PRECISION XPQ(-7:7),PD(0:MAXPROC) @@ -131,15 +132,28 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) IF (ABS(LPP(IB(1))).GE.1) THEN !LP=SIGN(1,LPP(IB(1))) - D1=PDG2PDF(LPP(IB(1)),1, IB(1),XBK(IB(1)),DSQRT(Q2FACT(IB(1)))) - U1=PDG2PDF(LPP(IB(1)),2, IB(1),XBK(IB(1)),DSQRT(Q2FACT(IB(1)))) - C1=PDG2PDF(LPP(IB(1)),4, IB(1),XBK(IB(1)),DSQRT(Q2FACT(IB(1)))) + IF (DSQRT(Q2FACT(IB(1))).EQ.0D0) THEN + QSCALE=0D0 + DO I=3,NEXTERNAL + QSCALE=QSCALE+DSQRT(MAX(0D0,(PP(0,I)+PP(3,I))*(PP(0,I) + $ -PP(3,I)))) + ENDDO + QSCALE=QSCALE/2D0 + ELSE + QSCALE=DSQRT(Q2FACT(IB(1))) + ENDIF + D1=PDG2PDF(LPP(IB(1)),1, IB(1),XBK(IB(1)), QSCALE) + U1=PDG2PDF(LPP(IB(1)),2, IB(1),XBK(IB(1)), QSCALE) + C1=PDG2PDF(LPP(IB(1)),4, IB(1),XBK(IB(1)), QSCALE) ENDIF IF (ABS(LPP(IB(2))).GE.1) THEN !LP=SIGN(1,LPP(IB(2))) - D2=PDG2PDF(LPP(IB(2)),1, IB(2),XBK(IB(2)),DSQRT(Q2FACT(IB(2)))) - S2=PDG2PDF(LPP(IB(2)),3, IB(2),XBK(IB(2)),DSQRT(Q2FACT(IB(2)))) - C2=PDG2PDF(LPP(IB(2)),4, IB(2),XBK(IB(2)),DSQRT(Q2FACT(IB(2)))) + IF (DSQRT(Q2FACT(IB(2))).NE.0D0) THEN + QSCALE=DSQRT(Q2FACT(IB(2))) + ENDIF + D2=PDG2PDF(LPP(IB(2)),1, IB(2),XBK(IB(2)), QSCALE) + S2=PDG2PDF(LPP(IB(2)),3, IB(2),XBK(IB(2)), QSCALE) + C2=PDG2PDF(LPP(IB(2)),4, IB(2),XBK(IB(2)), QSCALE) ENDIF PD(0) = 0D0 IPROC = 0 diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uc_ttxuc/matrix1.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uc_ttxuc/matrix1.f index 4508401458..b2a0e5cd20 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uc_ttxuc/matrix1.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uc_ttxuc/matrix1.f @@ -523,17 +523,17 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) TMP_JAMP(2) = AMP(1) + AMP(4) ! used 3 times TMP_JAMP(1) = AMP(1) + AMP(2) ! used 3 times TMP_JAMP(8) = TMP_JAMP(5) + TMP_JAMP(4) ! used 2 times - TMP_JAMP(7) = TMP_JAMP(4) + TMP_JAMP(1) ! used 2 times - TMP_JAMP(6) = TMP_JAMP(5) + TMP_JAMP(1) ! used 2 times + TMP_JAMP(7) = TMP_JAMP(5) + TMP_JAMP(1) ! used 2 times + TMP_JAMP(6) = TMP_JAMP(4) + TMP_JAMP(1) ! used 2 times JAMP(1,1) = ((0.000000000000000D+00,-2.500000000000000D-01)) $ *AMP(3)+(2.500000000000000D-01)*AMP(7)+(2.500000000000000D-01) $ *TMP_JAMP(2) - JAMP(2,1) = (-8.333333333333333D-02)*TMP_JAMP(6) - JAMP(3,1) = (-8.333333333333333D-02)*TMP_JAMP(7) + JAMP(2,1) = (-8.333333333333333D-02)*TMP_JAMP(7) + JAMP(3,1) = (-8.333333333333333D-02)*TMP_JAMP(6) JAMP(4,1) = ((0.000000000000000D+00,2.500000000000000D-01)) $ *AMP(3)+(2.500000000000000D-01)*AMP(6)+(2.500000000000000D-01) $ *TMP_JAMP(3) - JAMP(5,1) = (2.777777777777778D-02)*TMP_JAMP(4) + JAMP(5,1) = (2.777777777777778D-02)*TMP_JAMP(5) $ +(2.777777777777778D-02)*TMP_JAMP(6) JAMP(6,1) = (-8.333333333333333D-02)*TMP_JAMP(8) diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_ucx_ttxucx/CPPProcess.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_ucx_ttxucx/CPPProcess.cc index 5d8331468c..f4be832f2c 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_ucx_ttxucx/CPPProcess.cc +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_ucx_ttxucx/CPPProcess.cc @@ -249,24 +249,24 @@ namespace mg5amcCpu // *** DIAGRAM 1 OF 7 *** // Wavefunction(s) for diagram number 1 - ipzxxx( momenta, cHel[ihel][0], +1, w_fp[0], 0 ); // NB: ipzxxx only uses pz + ixxxxx( momenta, 0., cHel[ihel][0], +1, w_fp[0], 0 ); - omzxxx( momenta, cHel[ihel][1], -1, w_fp[1], 1 ); // NB: omzxxx only uses pz + oxxxxx( momenta, 0., cHel[ihel][1], -1, w_fp[1], 1 ); oxxxxx( momenta, cIPD[0], cHel[ihel][2], +1, w_fp[2], 2 ); ixxxxx( momenta, cIPD[0], cHel[ihel][3], -1, w_fp[3], 3 ); - oxzxxx( momenta, cHel[ihel][4], +1, w_fp[4], 4 ); + oxxxxx( momenta, 0., cHel[ihel][4], +1, w_fp[4], 4 ); - ixzxxx( momenta, cHel[ihel][5], -1, w_fp[5], 5 ); + ixxxxx( momenta, 0., cHel[ihel][5], -1, w_fp[5], 5 ); - FFV1P0_3( w_fp[0], w_fp[4], COUPs[1], 0., 0., w_fp[6] ); - FFV1P0_3( w_fp[5], w_fp[1], COUPs[1], 0., 0., w_fp[7] ); - FFV1_1( w_fp[2], w_fp[6], COUPs[1], cIPD[0], cIPD[1], w_fp[8] ); + FFV1P0_3( w_fp[0], w_fp[4], COUPs[1], 1.0, 0., 0., w_fp[6] ); + FFV1P0_3( w_fp[5], w_fp[1], COUPs[1], 1.0, 0., 0., w_fp[7] ); + FFV1_1( w_fp[2], w_fp[6], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[8] ); // Amplitude(s) for diagram number 1 - FFV1_0( w_fp[3], w_fp[8], w_fp[7], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[8], w_fp[7], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -279,10 +279,10 @@ namespace mg5amcCpu // *** DIAGRAM 2 OF 7 *** // Wavefunction(s) for diagram number 2 - FFV1_2( w_fp[3], w_fp[6], COUPs[1], cIPD[0], cIPD[1], w_fp[8] ); + FFV1_2( w_fp[3], w_fp[6], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[8] ); // Amplitude(s) for diagram number 2 - FFV1_0( w_fp[8], w_fp[2], w_fp[7], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[8], w_fp[2], w_fp[7], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 2 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -295,10 +295,10 @@ namespace mg5amcCpu // *** DIAGRAM 3 OF 7 *** // Wavefunction(s) for diagram number 3 - FFV1P0_3( w_fp[3], w_fp[2], COUPs[1], 0., 0., w_fp[8] ); + FFV1P0_3( w_fp[3], w_fp[2], COUPs[1], 1.0, 0., 0., w_fp[8] ); // Amplitude(s) for diagram number 3 - VVV1_0( w_fp[6], w_fp[7], w_fp[8], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[6], w_fp[7], w_fp[8], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 3 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -309,10 +309,10 @@ namespace mg5amcCpu // *** DIAGRAM 4 OF 7 *** // Wavefunction(s) for diagram number 4 - FFV1_2( w_fp[5], w_fp[6], COUPs[1], 0., 0., w_fp[3] ); + FFV1_2( w_fp[5], w_fp[6], COUPs[1], 1.0, 0., 0., w_fp[3] ); // Amplitude(s) for diagram number 4 - FFV1_0( w_fp[3], w_fp[1], w_fp[8], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[1], w_fp[8], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 4 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -325,10 +325,10 @@ namespace mg5amcCpu // *** DIAGRAM 5 OF 7 *** // Wavefunction(s) for diagram number 5 - FFV1_1( w_fp[1], w_fp[6], COUPs[1], 0., 0., w_fp[3] ); + FFV1_1( w_fp[1], w_fp[6], COUPs[1], 1.0, 0., 0., w_fp[3] ); // Amplitude(s) for diagram number 5 - FFV1_0( w_fp[5], w_fp[3], w_fp[8], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[5], w_fp[3], w_fp[8], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 5 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -341,10 +341,10 @@ namespace mg5amcCpu // *** DIAGRAM 6 OF 7 *** // Wavefunction(s) for diagram number 6 - FFV1_2( w_fp[0], w_fp[7], COUPs[1], 0., 0., w_fp[3] ); + FFV1_2( w_fp[0], w_fp[7], COUPs[1], 1.0, 0., 0., w_fp[3] ); // Amplitude(s) for diagram number 6 - FFV1_0( w_fp[3], w_fp[4], w_fp[8], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[4], w_fp[8], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 6 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -357,10 +357,10 @@ namespace mg5amcCpu // *** DIAGRAM 7 OF 7 *** // Wavefunction(s) for diagram number 7 - FFV1_2( w_fp[0], w_fp[8], COUPs[1], 0., 0., w_fp[3] ); + FFV1_2( w_fp[0], w_fp[8], COUPs[1], 1.0, 0., 0., w_fp[3] ); // Amplitude(s) for diagram number 7 - FFV1_0( w_fp[3], w_fp[4], w_fp[7], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[4], w_fp[7], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 7 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -942,14 +942,13 @@ namespace mg5amcCpu { // nprocesses>1 was last observed for "mirror processes" in uux_ttx in the 270 branch (see issue #343 and PRs #360 and #396) constexpr int nprocesses = 2; - static_assert( nprocesses == 1, "Assume nprocesses == 1" ); - // process_id corresponds to the index of DSIG1 Fortran functions (must be 1 because cudacpp is unable to handle DSIG2) + static_assert( nprocesses == 1 || nprocesses == 2, "Assume nprocesses == 1 or 2" ); constexpr int process_id = 1; // code generation source: madevent + cudacpp exporter static_assert( process_id == 1, "Assume process_id == 1" ); } // Denominators: spins, colors and identical particles - constexpr int helcolDenominators[1] = { 36,36 }; // assume nprocesses == 1 (#272 and #343) + constexpr int helcolDenominators[1] = { 36 }; // assume nprocesses == 1 (#272 and #343) #ifdef __CUDACC__ // Remember: in CUDA this is a kernel for one event, in c++ this processes n events diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_ucx_ttxucx/auto_dsig1.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_ucx_ttxucx/auto_dsig1.f index 1044310fc4..0b6e873ee4 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_ucx_ttxucx/auto_dsig1.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_ucx_ttxucx/auto_dsig1.f @@ -50,6 +50,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C LOCAL VARIABLES C INTEGER I,ITYPE,LP,IPROC + DOUBLE PRECISION QSCALE DOUBLE PRECISION D1,U1,S1,C1 DOUBLE PRECISION CX2,SX2,UX2,DX2 DOUBLE PRECISION XPQ(-7:7),PD(0:MAXPROC) @@ -137,21 +138,30 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) IF (ABS(LPP(IB(1))).GE.1) THEN !LP=SIGN(1,LPP(IB(1))) - D1=PDG2PDF(LPP(IB(1)),1, IB(1),XBK(IB(1)),DSQRT(Q2FACT(IB(1)))) - U1=PDG2PDF(LPP(IB(1)),2, IB(1),XBK(IB(1)),DSQRT(Q2FACT(IB(1)))) - S1=PDG2PDF(LPP(IB(1)),3, IB(1),XBK(IB(1)),DSQRT(Q2FACT(IB(1)))) - C1=PDG2PDF(LPP(IB(1)),4, IB(1),XBK(IB(1)),DSQRT(Q2FACT(IB(1)))) + IF (DSQRT(Q2FACT(IB(1))).EQ.0D0) THEN + QSCALE=0D0 + DO I=3,NEXTERNAL + QSCALE=QSCALE+DSQRT(MAX(0D0,(PP(0,I)+PP(3,I))*(PP(0,I) + $ -PP(3,I)))) + ENDDO + QSCALE=QSCALE/2D0 + ELSE + QSCALE=DSQRT(Q2FACT(IB(1))) + ENDIF + D1=PDG2PDF(LPP(IB(1)),1, IB(1),XBK(IB(1)), QSCALE) + U1=PDG2PDF(LPP(IB(1)),2, IB(1),XBK(IB(1)), QSCALE) + S1=PDG2PDF(LPP(IB(1)),3, IB(1),XBK(IB(1)), QSCALE) + C1=PDG2PDF(LPP(IB(1)),4, IB(1),XBK(IB(1)), QSCALE) ENDIF IF (ABS(LPP(IB(2))).GE.1) THEN !LP=SIGN(1,LPP(IB(2))) - CX2=PDG2PDF(LPP(IB(2)),-4, IB(2),XBK(IB(2)),DSQRT(Q2FACT(IB(2)) - $ )) - SX2=PDG2PDF(LPP(IB(2)),-3, IB(2),XBK(IB(2)),DSQRT(Q2FACT(IB(2)) - $ )) - UX2=PDG2PDF(LPP(IB(2)),-2, IB(2),XBK(IB(2)),DSQRT(Q2FACT(IB(2)) - $ )) - DX2=PDG2PDF(LPP(IB(2)),-1, IB(2),XBK(IB(2)),DSQRT(Q2FACT(IB(2)) - $ )) + IF (DSQRT(Q2FACT(IB(2))).NE.0D0) THEN + QSCALE=DSQRT(Q2FACT(IB(2))) + ENDIF + CX2=PDG2PDF(LPP(IB(2)),-4, IB(2),XBK(IB(2)), QSCALE) + SX2=PDG2PDF(LPP(IB(2)),-3, IB(2),XBK(IB(2)), QSCALE) + UX2=PDG2PDF(LPP(IB(2)),-2, IB(2),XBK(IB(2)), QSCALE) + DX2=PDG2PDF(LPP(IB(2)),-1, IB(2),XBK(IB(2)), QSCALE) ENDIF PD(0) = 0D0 IPROC = 0 diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_ucx_ttxucx/matrix1.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_ucx_ttxucx/matrix1.f index f444d0a2c6..e0e291950c 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_ucx_ttxucx/matrix1.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_ucx_ttxucx/matrix1.f @@ -534,19 +534,19 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) TMP_JAMP(3) = AMP(2) + AMP(5) ! used 3 times TMP_JAMP(2) = AMP(1) + AMP(4) ! used 3 times TMP_JAMP(1) = AMP(1) + AMP(2) ! used 3 times - TMP_JAMP(8) = TMP_JAMP(4) + TMP_JAMP(1) ! used 2 times - TMP_JAMP(7) = TMP_JAMP(5) + TMP_JAMP(1) ! used 2 times - TMP_JAMP(6) = TMP_JAMP(5) + TMP_JAMP(4) ! used 2 times - JAMP(1,1) = (8.333333333333333D-02)*TMP_JAMP(6) + TMP_JAMP(8) = TMP_JAMP(5) + TMP_JAMP(1) ! used 2 times + TMP_JAMP(7) = TMP_JAMP(5) + TMP_JAMP(4) ! used 2 times + TMP_JAMP(6) = TMP_JAMP(4) + TMP_JAMP(1) ! used 2 times + JAMP(1,1) = (8.333333333333333D-02)*TMP_JAMP(7) JAMP(2,1) = ((0.000000000000000D+00,-2.500000000000000D-01)) $ *AMP(3)+(-2.500000000000000D-01)*AMP(6)+(-2.500000000000000D-01) $ *TMP_JAMP(3) JAMP(3,1) = ((0.000000000000000D+00,2.500000000000000D-01)) $ *AMP(3)+(-2.500000000000000D-01)*AMP(7)+(-2.500000000000000D-01) $ *TMP_JAMP(2) - JAMP(4,1) = (8.333333333333333D-02)*TMP_JAMP(8) - JAMP(5,1) = (8.333333333333333D-02)*TMP_JAMP(7) - JAMP(6,1) = (-2.777777777777778D-02)*TMP_JAMP(1)+( + JAMP(4,1) = (8.333333333333333D-02)*TMP_JAMP(6) + JAMP(5,1) = (8.333333333333333D-02)*TMP_JAMP(8) + JAMP(6,1) = (-2.777777777777778D-02)*TMP_JAMP(5)+( $ -2.777777777777778D-02)*TMP_JAMP(6) IF(INIT_MODE)THEN diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uu_ttxuu/CPPProcess.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uu_ttxuu/CPPProcess.cc index d5d7e9e858..c3bfa3dc44 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uu_ttxuu/CPPProcess.cc +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uu_ttxuu/CPPProcess.cc @@ -241,24 +241,24 @@ namespace mg5amcCpu // *** DIAGRAM 1 OF 14 *** // Wavefunction(s) for diagram number 1 - ipzxxx( momenta, cHel[ihel][0], +1, w_fp[0], 0 ); // NB: ipzxxx only uses pz + ixxxxx( momenta, 0., cHel[ihel][0], +1, w_fp[0], 0 ); - imzxxx( momenta, cHel[ihel][1], +1, w_fp[1], 1 ); // NB: imzxxx only uses pz + ixxxxx( momenta, 0., cHel[ihel][1], +1, w_fp[1], 1 ); oxxxxx( momenta, cIPD[0], cHel[ihel][2], +1, w_fp[2], 2 ); ixxxxx( momenta, cIPD[0], cHel[ihel][3], -1, w_fp[3], 3 ); - oxzxxx( momenta, cHel[ihel][4], +1, w_fp[4], 4 ); + oxxxxx( momenta, 0., cHel[ihel][4], +1, w_fp[4], 4 ); - oxzxxx( momenta, cHel[ihel][5], +1, w_fp[5], 5 ); + oxxxxx( momenta, 0., cHel[ihel][5], +1, w_fp[5], 5 ); - FFV1P0_3( w_fp[0], w_fp[4], COUPs[1], 0., 0., w_fp[6] ); - FFV1P0_3( w_fp[1], w_fp[5], COUPs[1], 0., 0., w_fp[7] ); - FFV1_1( w_fp[2], w_fp[6], COUPs[1], cIPD[0], cIPD[1], w_fp[8] ); + FFV1P0_3( w_fp[0], w_fp[4], COUPs[1], 1.0, 0., 0., w_fp[6] ); + FFV1P0_3( w_fp[1], w_fp[5], COUPs[1], 1.0, 0., 0., w_fp[7] ); + FFV1_1( w_fp[2], w_fp[6], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[8] ); // Amplitude(s) for diagram number 1 - FFV1_0( w_fp[3], w_fp[8], w_fp[7], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[8], w_fp[7], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -271,10 +271,10 @@ namespace mg5amcCpu // *** DIAGRAM 2 OF 14 *** // Wavefunction(s) for diagram number 2 - FFV1_2( w_fp[3], w_fp[6], COUPs[1], cIPD[0], cIPD[1], w_fp[8] ); + FFV1_2( w_fp[3], w_fp[6], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[8] ); // Amplitude(s) for diagram number 2 - FFV1_0( w_fp[8], w_fp[2], w_fp[7], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[8], w_fp[2], w_fp[7], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 2 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -287,10 +287,10 @@ namespace mg5amcCpu // *** DIAGRAM 3 OF 14 *** // Wavefunction(s) for diagram number 3 - FFV1P0_3( w_fp[3], w_fp[2], COUPs[1], 0., 0., w_fp[8] ); + FFV1P0_3( w_fp[3], w_fp[2], COUPs[1], 1.0, 0., 0., w_fp[8] ); // Amplitude(s) for diagram number 3 - VVV1_0( w_fp[6], w_fp[7], w_fp[8], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[6], w_fp[7], w_fp[8], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 3 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -301,10 +301,10 @@ namespace mg5amcCpu // *** DIAGRAM 4 OF 14 *** // Wavefunction(s) for diagram number 4 - FFV1_2( w_fp[1], w_fp[6], COUPs[1], 0., 0., w_fp[9] ); + FFV1_2( w_fp[1], w_fp[6], COUPs[1], 1.0, 0., 0., w_fp[9] ); // Amplitude(s) for diagram number 4 - FFV1_0( w_fp[9], w_fp[5], w_fp[8], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[9], w_fp[5], w_fp[8], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 4 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -317,10 +317,10 @@ namespace mg5amcCpu // *** DIAGRAM 5 OF 14 *** // Wavefunction(s) for diagram number 5 - FFV1_1( w_fp[5], w_fp[6], COUPs[1], 0., 0., w_fp[9] ); + FFV1_1( w_fp[5], w_fp[6], COUPs[1], 1.0, 0., 0., w_fp[9] ); // Amplitude(s) for diagram number 5 - FFV1_0( w_fp[1], w_fp[9], w_fp[8], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[1], w_fp[9], w_fp[8], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 5 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -333,12 +333,12 @@ namespace mg5amcCpu // *** DIAGRAM 6 OF 14 *** // Wavefunction(s) for diagram number 6 - FFV1P0_3( w_fp[0], w_fp[5], COUPs[1], 0., 0., w_fp[9] ); - FFV1P0_3( w_fp[1], w_fp[4], COUPs[1], 0., 0., w_fp[6] ); - FFV1_1( w_fp[2], w_fp[9], COUPs[1], cIPD[0], cIPD[1], w_fp[10] ); + FFV1P0_3( w_fp[0], w_fp[5], COUPs[1], 1.0, 0., 0., w_fp[9] ); + FFV1P0_3( w_fp[1], w_fp[4], COUPs[1], 1.0, 0., 0., w_fp[6] ); + FFV1_1( w_fp[2], w_fp[9], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[10] ); // Amplitude(s) for diagram number 6 - FFV1_0( w_fp[3], w_fp[10], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[10], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 6 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -351,10 +351,10 @@ namespace mg5amcCpu // *** DIAGRAM 7 OF 14 *** // Wavefunction(s) for diagram number 7 - FFV1_2( w_fp[3], w_fp[9], COUPs[1], cIPD[0], cIPD[1], w_fp[10] ); + FFV1_2( w_fp[3], w_fp[9], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[10] ); // Amplitude(s) for diagram number 7 - FFV1_0( w_fp[10], w_fp[2], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[10], w_fp[2], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 7 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -370,7 +370,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 8 - VVV1_0( w_fp[9], w_fp[6], w_fp[8], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[9], w_fp[6], w_fp[8], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 8 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -381,10 +381,10 @@ namespace mg5amcCpu // *** DIAGRAM 9 OF 14 *** // Wavefunction(s) for diagram number 9 - FFV1_2( w_fp[1], w_fp[9], COUPs[1], 0., 0., w_fp[10] ); + FFV1_2( w_fp[1], w_fp[9], COUPs[1], 1.0, 0., 0., w_fp[10] ); // Amplitude(s) for diagram number 9 - FFV1_0( w_fp[10], w_fp[4], w_fp[8], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[10], w_fp[4], w_fp[8], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 9 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -397,10 +397,10 @@ namespace mg5amcCpu // *** DIAGRAM 10 OF 14 *** // Wavefunction(s) for diagram number 10 - FFV1_1( w_fp[4], w_fp[9], COUPs[1], 0., 0., w_fp[10] ); + FFV1_1( w_fp[4], w_fp[9], COUPs[1], 1.0, 0., 0., w_fp[10] ); // Amplitude(s) for diagram number 10 - FFV1_0( w_fp[1], w_fp[10], w_fp[8], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[1], w_fp[10], w_fp[8], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 10 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -413,10 +413,10 @@ namespace mg5amcCpu // *** DIAGRAM 11 OF 14 *** // Wavefunction(s) for diagram number 11 - FFV1_2( w_fp[0], w_fp[6], COUPs[1], 0., 0., w_fp[10] ); + FFV1_2( w_fp[0], w_fp[6], COUPs[1], 1.0, 0., 0., w_fp[10] ); // Amplitude(s) for diagram number 11 - FFV1_0( w_fp[10], w_fp[5], w_fp[8], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[10], w_fp[5], w_fp[8], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 11 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -429,10 +429,10 @@ namespace mg5amcCpu // *** DIAGRAM 12 OF 14 *** // Wavefunction(s) for diagram number 12 - FFV1_2( w_fp[0], w_fp[8], COUPs[1], 0., 0., w_fp[10] ); + FFV1_2( w_fp[0], w_fp[8], COUPs[1], 1.0, 0., 0., w_fp[10] ); // Amplitude(s) for diagram number 12 - FFV1_0( w_fp[10], w_fp[5], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[10], w_fp[5], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 12 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -445,10 +445,10 @@ namespace mg5amcCpu // *** DIAGRAM 13 OF 14 *** // Wavefunction(s) for diagram number 13 - FFV1_2( w_fp[0], w_fp[7], COUPs[1], 0., 0., w_fp[6] ); + FFV1_2( w_fp[0], w_fp[7], COUPs[1], 1.0, 0., 0., w_fp[6] ); // Amplitude(s) for diagram number 13 - FFV1_0( w_fp[6], w_fp[4], w_fp[8], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[6], w_fp[4], w_fp[8], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 13 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -464,7 +464,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 14 - FFV1_0( w_fp[10], w_fp[4], w_fp[7], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[10], w_fp[4], w_fp[7], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 14 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1046,8 +1046,7 @@ namespace mg5amcCpu { // nprocesses>1 was last observed for "mirror processes" in uux_ttx in the 270 branch (see issue #343 and PRs #360 and #396) constexpr int nprocesses = 1; - static_assert( nprocesses == 1, "Assume nprocesses == 1" ); - // process_id corresponds to the index of DSIG1 Fortran functions (must be 1 because cudacpp is unable to handle DSIG2) + static_assert( nprocesses == 1 || nprocesses == 2, "Assume nprocesses == 1 or 2" ); constexpr int process_id = 1; // code generation source: madevent + cudacpp exporter static_assert( process_id == 1, "Assume process_id == 1" ); } diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uu_ttxuu/auto_dsig1.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uu_ttxuu/auto_dsig1.f index 25de63622f..5ed7bc881f 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uu_ttxuu/auto_dsig1.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uu_ttxuu/auto_dsig1.f @@ -42,6 +42,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C LOCAL VARIABLES C INTEGER I,ITYPE,LP,IPROC + DOUBLE PRECISION QSCALE DOUBLE PRECISION D1,U1,S1,C1 DOUBLE PRECISION D2,U2,S2,C2 DOUBLE PRECISION XPQ(-7:7),PD(0:MAXPROC) @@ -129,17 +130,30 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) IF (ABS(LPP(IB(1))).GE.1) THEN !LP=SIGN(1,LPP(IB(1))) - D1=PDG2PDF(LPP(IB(1)),1, IB(1),XBK(IB(1)),DSQRT(Q2FACT(IB(1)))) - U1=PDG2PDF(LPP(IB(1)),2, IB(1),XBK(IB(1)),DSQRT(Q2FACT(IB(1)))) - S1=PDG2PDF(LPP(IB(1)),3, IB(1),XBK(IB(1)),DSQRT(Q2FACT(IB(1)))) - C1=PDG2PDF(LPP(IB(1)),4, IB(1),XBK(IB(1)),DSQRT(Q2FACT(IB(1)))) + IF (DSQRT(Q2FACT(IB(1))).EQ.0D0) THEN + QSCALE=0D0 + DO I=3,NEXTERNAL + QSCALE=QSCALE+DSQRT(MAX(0D0,(PP(0,I)+PP(3,I))*(PP(0,I) + $ -PP(3,I)))) + ENDDO + QSCALE=QSCALE/2D0 + ELSE + QSCALE=DSQRT(Q2FACT(IB(1))) + ENDIF + D1=PDG2PDF(LPP(IB(1)),1, IB(1),XBK(IB(1)), QSCALE) + U1=PDG2PDF(LPP(IB(1)),2, IB(1),XBK(IB(1)), QSCALE) + S1=PDG2PDF(LPP(IB(1)),3, IB(1),XBK(IB(1)), QSCALE) + C1=PDG2PDF(LPP(IB(1)),4, IB(1),XBK(IB(1)), QSCALE) ENDIF IF (ABS(LPP(IB(2))).GE.1) THEN !LP=SIGN(1,LPP(IB(2))) - D2=PDG2PDF(LPP(IB(2)),1, IB(2),XBK(IB(2)),DSQRT(Q2FACT(IB(2)))) - U2=PDG2PDF(LPP(IB(2)),2, IB(2),XBK(IB(2)),DSQRT(Q2FACT(IB(2)))) - S2=PDG2PDF(LPP(IB(2)),3, IB(2),XBK(IB(2)),DSQRT(Q2FACT(IB(2)))) - C2=PDG2PDF(LPP(IB(2)),4, IB(2),XBK(IB(2)),DSQRT(Q2FACT(IB(2)))) + IF (DSQRT(Q2FACT(IB(2))).NE.0D0) THEN + QSCALE=DSQRT(Q2FACT(IB(2))) + ENDIF + D2=PDG2PDF(LPP(IB(2)),1, IB(2),XBK(IB(2)), QSCALE) + U2=PDG2PDF(LPP(IB(2)),2, IB(2),XBK(IB(2)), QSCALE) + S2=PDG2PDF(LPP(IB(2)),3, IB(2),XBK(IB(2)), QSCALE) + C2=PDG2PDF(LPP(IB(2)),4, IB(2),XBK(IB(2)), QSCALE) ENDIF PD(0) = 0D0 IPROC = 0 diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uu_ttxuu/matrix1.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uu_ttxuu/matrix1.f index 0834ca2262..4c7a020ed9 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uu_ttxuu/matrix1.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uu_ttxuu/matrix1.f @@ -544,30 +544,30 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) TMP_JAMP(3) = AMP(2) + AMP(5) ! used 3 times TMP_JAMP(2) = AMP(1) + AMP(4) ! used 3 times TMP_JAMP(1) = AMP(1) + AMP(2) ! used 3 times - TMP_JAMP(16) = TMP_JAMP(8) + TMP_JAMP(5) ! used 2 times - TMP_JAMP(15) = TMP_JAMP(9) + TMP_JAMP(5) ! used 2 times - TMP_JAMP(14) = TMP_JAMP(9) + TMP_JAMP(8) ! used 2 times - TMP_JAMP(13) = TMP_JAMP(10) + TMP_JAMP(4) ! used 2 times - TMP_JAMP(12) = TMP_JAMP(4) + TMP_JAMP(1) ! used 2 times - TMP_JAMP(11) = TMP_JAMP(10) + TMP_JAMP(1) ! used 2 times + TMP_JAMP(16) = TMP_JAMP(10) + TMP_JAMP(4) ! used 2 times + TMP_JAMP(15) = TMP_JAMP(10) + TMP_JAMP(1) ! used 2 times + TMP_JAMP(14) = TMP_JAMP(9) + TMP_JAMP(5) ! used 2 times + TMP_JAMP(13) = TMP_JAMP(9) + TMP_JAMP(8) ! used 2 times + TMP_JAMP(12) = TMP_JAMP(8) + TMP_JAMP(5) ! used 2 times + TMP_JAMP(11) = TMP_JAMP(4) + TMP_JAMP(1) ! used 2 times JAMP(1,1) = ((0.000000000000000D+00,-2.500000000000000D-01)) $ *AMP(3)+(2.500000000000000D-01)*AMP(14)+(2.500000000000000D-01) - $ *TMP_JAMP(2)+(8.333333333333333D-02)*TMP_JAMP(15) + $ *TMP_JAMP(2)+(8.333333333333333D-02)*TMP_JAMP(14) JAMP(2,1) = ((0.000000000000000D+00,2.500000000000000D-01)) $ *AMP(8)+(-2.500000000000000D-01)*AMP(12)+(-2.500000000000000D - $ -01)*TMP_JAMP(6)+(-8.333333333333333D-02)*TMP_JAMP(11) + $ -01)*TMP_JAMP(6)+(-8.333333333333333D-02)*TMP_JAMP(15) JAMP(3,1) = ((0.000000000000000D+00,-2.500000000000000D-01)) $ *AMP(8)+(-2.500000000000000D-01)*AMP(11)+(-2.500000000000000D - $ -01)*TMP_JAMP(7)+(-8.333333333333333D-02)*TMP_JAMP(12) + $ -01)*TMP_JAMP(7)+(-8.333333333333333D-02)*TMP_JAMP(11) JAMP(4,1) = ((0.000000000000000D+00,2.500000000000000D-01)) $ *AMP(3)+(2.500000000000000D-01)*AMP(13)+(2.500000000000000D-01) - $ *TMP_JAMP(3)+(8.333333333333333D-02)*TMP_JAMP(16) - JAMP(5,1) = (2.777777777777778D-02)*TMP_JAMP(4) + $ *TMP_JAMP(3)+(8.333333333333333D-02)*TMP_JAMP(12) + JAMP(5,1) = (2.777777777777778D-02)*TMP_JAMP(10) $ +(2.777777777777778D-02)*TMP_JAMP(11)+(8.333333333333333D-02) - $ *TMP_JAMP(14) - JAMP(6,1) = (-2.777777777777778D-02)*TMP_JAMP(5)+( - $ -8.333333333333333D-02)*TMP_JAMP(13)+(-2.777777777777778D-02) - $ *TMP_JAMP(14) + $ *TMP_JAMP(13) + JAMP(6,1) = (-2.777777777777778D-02)*TMP_JAMP(9)+( + $ -2.777777777777778D-02)*TMP_JAMP(12)+(-8.333333333333333D-02) + $ *TMP_JAMP(16) IF(INIT_MODE)THEN DO I=1, NGRAPHS diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxccx/CPPProcess.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxccx/CPPProcess.cc index 58687f7276..85b486c900 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxccx/CPPProcess.cc +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxccx/CPPProcess.cc @@ -249,24 +249,24 @@ namespace mg5amcCpu // *** DIAGRAM 1 OF 7 *** // Wavefunction(s) for diagram number 1 - ipzxxx( momenta, cHel[ihel][0], +1, w_fp[0], 0 ); // NB: ipzxxx only uses pz + ixxxxx( momenta, 0., cHel[ihel][0], +1, w_fp[0], 0 ); - omzxxx( momenta, cHel[ihel][1], -1, w_fp[1], 1 ); // NB: omzxxx only uses pz + oxxxxx( momenta, 0., cHel[ihel][1], -1, w_fp[1], 1 ); oxxxxx( momenta, cIPD[0], cHel[ihel][2], +1, w_fp[2], 2 ); ixxxxx( momenta, cIPD[0], cHel[ihel][3], -1, w_fp[3], 3 ); - oxzxxx( momenta, cHel[ihel][4], +1, w_fp[4], 4 ); + oxxxxx( momenta, 0., cHel[ihel][4], +1, w_fp[4], 4 ); - ixzxxx( momenta, cHel[ihel][5], -1, w_fp[5], 5 ); + ixxxxx( momenta, 0., cHel[ihel][5], -1, w_fp[5], 5 ); - FFV1P0_3( w_fp[0], w_fp[1], COUPs[1], 0., 0., w_fp[6] ); - FFV1P0_3( w_fp[5], w_fp[4], COUPs[1], 0., 0., w_fp[7] ); - FFV1_1( w_fp[2], w_fp[6], COUPs[1], cIPD[0], cIPD[1], w_fp[8] ); + FFV1P0_3( w_fp[0], w_fp[1], COUPs[1], 1.0, 0., 0., w_fp[6] ); + FFV1P0_3( w_fp[5], w_fp[4], COUPs[1], 1.0, 0., 0., w_fp[7] ); + FFV1_1( w_fp[2], w_fp[6], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[8] ); // Amplitude(s) for diagram number 1 - FFV1_0( w_fp[3], w_fp[8], w_fp[7], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[8], w_fp[7], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -279,10 +279,10 @@ namespace mg5amcCpu // *** DIAGRAM 2 OF 7 *** // Wavefunction(s) for diagram number 2 - FFV1_2( w_fp[3], w_fp[6], COUPs[1], cIPD[0], cIPD[1], w_fp[8] ); + FFV1_2( w_fp[3], w_fp[6], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[8] ); // Amplitude(s) for diagram number 2 - FFV1_0( w_fp[8], w_fp[2], w_fp[7], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[8], w_fp[2], w_fp[7], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 2 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -295,10 +295,10 @@ namespace mg5amcCpu // *** DIAGRAM 3 OF 7 *** // Wavefunction(s) for diagram number 3 - FFV1P0_3( w_fp[3], w_fp[2], COUPs[1], 0., 0., w_fp[8] ); + FFV1P0_3( w_fp[3], w_fp[2], COUPs[1], 1.0, 0., 0., w_fp[8] ); // Amplitude(s) for diagram number 3 - VVV1_0( w_fp[6], w_fp[7], w_fp[8], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[6], w_fp[7], w_fp[8], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 3 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -309,10 +309,10 @@ namespace mg5amcCpu // *** DIAGRAM 4 OF 7 *** // Wavefunction(s) for diagram number 4 - FFV1_2( w_fp[5], w_fp[6], COUPs[1], 0., 0., w_fp[3] ); + FFV1_2( w_fp[5], w_fp[6], COUPs[1], 1.0, 0., 0., w_fp[3] ); // Amplitude(s) for diagram number 4 - FFV1_0( w_fp[3], w_fp[4], w_fp[8], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[4], w_fp[8], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 4 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -325,10 +325,10 @@ namespace mg5amcCpu // *** DIAGRAM 5 OF 7 *** // Wavefunction(s) for diagram number 5 - FFV1_1( w_fp[4], w_fp[6], COUPs[1], 0., 0., w_fp[3] ); + FFV1_1( w_fp[4], w_fp[6], COUPs[1], 1.0, 0., 0., w_fp[3] ); // Amplitude(s) for diagram number 5 - FFV1_0( w_fp[5], w_fp[3], w_fp[8], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[5], w_fp[3], w_fp[8], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 5 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -341,10 +341,10 @@ namespace mg5amcCpu // *** DIAGRAM 6 OF 7 *** // Wavefunction(s) for diagram number 6 - FFV1_2( w_fp[0], w_fp[7], COUPs[1], 0., 0., w_fp[3] ); + FFV1_2( w_fp[0], w_fp[7], COUPs[1], 1.0, 0., 0., w_fp[3] ); // Amplitude(s) for diagram number 6 - FFV1_0( w_fp[3], w_fp[1], w_fp[8], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[1], w_fp[8], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 6 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -357,10 +357,10 @@ namespace mg5amcCpu // *** DIAGRAM 7 OF 7 *** // Wavefunction(s) for diagram number 7 - FFV1_2( w_fp[0], w_fp[8], COUPs[1], 0., 0., w_fp[3] ); + FFV1_2( w_fp[0], w_fp[8], COUPs[1], 1.0, 0., 0., w_fp[3] ); // Amplitude(s) for diagram number 7 - FFV1_0( w_fp[3], w_fp[1], w_fp[7], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[1], w_fp[7], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 7 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -942,14 +942,13 @@ namespace mg5amcCpu { // nprocesses>1 was last observed for "mirror processes" in uux_ttx in the 270 branch (see issue #343 and PRs #360 and #396) constexpr int nprocesses = 2; - static_assert( nprocesses == 1, "Assume nprocesses == 1" ); - // process_id corresponds to the index of DSIG1 Fortran functions (must be 1 because cudacpp is unable to handle DSIG2) + static_assert( nprocesses == 1 || nprocesses == 2, "Assume nprocesses == 1 or 2" ); constexpr int process_id = 1; // code generation source: madevent + cudacpp exporter static_assert( process_id == 1, "Assume process_id == 1" ); } // Denominators: spins, colors and identical particles - constexpr int helcolDenominators[1] = { 36,36 }; // assume nprocesses == 1 (#272 and #343) + constexpr int helcolDenominators[1] = { 36 }; // assume nprocesses == 1 (#272 and #343) #ifdef __CUDACC__ // Remember: in CUDA this is a kernel for one event, in c++ this processes n events diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxccx/auto_dsig1.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxccx/auto_dsig1.f index 300733b34c..a32595dce6 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxccx/auto_dsig1.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxccx/auto_dsig1.f @@ -50,6 +50,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C LOCAL VARIABLES C INTEGER I,ITYPE,LP,IPROC + DOUBLE PRECISION QSCALE DOUBLE PRECISION D1,U1,S1,C1 DOUBLE PRECISION CX2,SX2,UX2,DX2 DOUBLE PRECISION XPQ(-7:7),PD(0:MAXPROC) @@ -137,21 +138,30 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) IF (ABS(LPP(IB(1))).GE.1) THEN !LP=SIGN(1,LPP(IB(1))) - D1=PDG2PDF(LPP(IB(1)),1, IB(1),XBK(IB(1)),DSQRT(Q2FACT(IB(1)))) - U1=PDG2PDF(LPP(IB(1)),2, IB(1),XBK(IB(1)),DSQRT(Q2FACT(IB(1)))) - S1=PDG2PDF(LPP(IB(1)),3, IB(1),XBK(IB(1)),DSQRT(Q2FACT(IB(1)))) - C1=PDG2PDF(LPP(IB(1)),4, IB(1),XBK(IB(1)),DSQRT(Q2FACT(IB(1)))) + IF (DSQRT(Q2FACT(IB(1))).EQ.0D0) THEN + QSCALE=0D0 + DO I=3,NEXTERNAL + QSCALE=QSCALE+DSQRT(MAX(0D0,(PP(0,I)+PP(3,I))*(PP(0,I) + $ -PP(3,I)))) + ENDDO + QSCALE=QSCALE/2D0 + ELSE + QSCALE=DSQRT(Q2FACT(IB(1))) + ENDIF + D1=PDG2PDF(LPP(IB(1)),1, IB(1),XBK(IB(1)), QSCALE) + U1=PDG2PDF(LPP(IB(1)),2, IB(1),XBK(IB(1)), QSCALE) + S1=PDG2PDF(LPP(IB(1)),3, IB(1),XBK(IB(1)), QSCALE) + C1=PDG2PDF(LPP(IB(1)),4, IB(1),XBK(IB(1)), QSCALE) ENDIF IF (ABS(LPP(IB(2))).GE.1) THEN !LP=SIGN(1,LPP(IB(2))) - CX2=PDG2PDF(LPP(IB(2)),-4, IB(2),XBK(IB(2)),DSQRT(Q2FACT(IB(2)) - $ )) - SX2=PDG2PDF(LPP(IB(2)),-3, IB(2),XBK(IB(2)),DSQRT(Q2FACT(IB(2)) - $ )) - UX2=PDG2PDF(LPP(IB(2)),-2, IB(2),XBK(IB(2)),DSQRT(Q2FACT(IB(2)) - $ )) - DX2=PDG2PDF(LPP(IB(2)),-1, IB(2),XBK(IB(2)),DSQRT(Q2FACT(IB(2)) - $ )) + IF (DSQRT(Q2FACT(IB(2))).NE.0D0) THEN + QSCALE=DSQRT(Q2FACT(IB(2))) + ENDIF + CX2=PDG2PDF(LPP(IB(2)),-4, IB(2),XBK(IB(2)), QSCALE) + SX2=PDG2PDF(LPP(IB(2)),-3, IB(2),XBK(IB(2)), QSCALE) + UX2=PDG2PDF(LPP(IB(2)),-2, IB(2),XBK(IB(2)), QSCALE) + DX2=PDG2PDF(LPP(IB(2)),-1, IB(2),XBK(IB(2)), QSCALE) ENDIF PD(0) = 0D0 IPROC = 0 diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxgg/CPPProcess.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxgg/CPPProcess.cc index 0622603ad2..a9312c5aa5 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxgg/CPPProcess.cc +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxgg/CPPProcess.cc @@ -241,9 +241,9 @@ namespace mg5amcCpu // *** DIAGRAM 1 OF 36 *** // Wavefunction(s) for diagram number 1 - ipzxxx( momenta, cHel[ihel][0], +1, w_fp[0], 0 ); // NB: ipzxxx only uses pz + ixxxxx( momenta, 0., cHel[ihel][0], +1, w_fp[0], 0 ); - omzxxx( momenta, cHel[ihel][1], -1, w_fp[1], 1 ); // NB: omzxxx only uses pz + oxxxxx( momenta, 0., cHel[ihel][1], -1, w_fp[1], 1 ); oxxxxx( momenta, cIPD[0], cHel[ihel][2], +1, w_fp[2], 2 ); @@ -253,12 +253,12 @@ namespace mg5amcCpu vxxxxx( momenta, 0., cHel[ihel][5], +1, w_fp[5], 5 ); - VVV1P0_1( w_fp[4], w_fp[5], COUPs[0], 0., 0., w_fp[6] ); - FFV1P0_3( w_fp[3], w_fp[2], COUPs[1], 0., 0., w_fp[7] ); - FFV1_1( w_fp[1], w_fp[6], COUPs[1], 0., 0., w_fp[8] ); + VVV1P0_1( w_fp[4], w_fp[5], COUPs[0], 1.0, 0., 0., w_fp[6] ); + FFV1P0_3( w_fp[3], w_fp[2], COUPs[1], 1.0, 0., 0., w_fp[7] ); + FFV1_1( w_fp[1], w_fp[6], COUPs[1], 1.0, 0., 0., w_fp[8] ); // Amplitude(s) for diagram number 1 - FFV1_0( w_fp[0], w_fp[8], w_fp[7], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[0], w_fp[8], w_fp[7], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -271,10 +271,10 @@ namespace mg5amcCpu // *** DIAGRAM 2 OF 36 *** // Wavefunction(s) for diagram number 2 - FFV1_2( w_fp[0], w_fp[6], COUPs[1], 0., 0., w_fp[8] ); + FFV1_2( w_fp[0], w_fp[6], COUPs[1], 1.0, 0., 0., w_fp[8] ); // Amplitude(s) for diagram number 2 - FFV1_0( w_fp[8], w_fp[1], w_fp[7], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[8], w_fp[1], w_fp[7], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 2 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -287,10 +287,10 @@ namespace mg5amcCpu // *** DIAGRAM 3 OF 36 *** // Wavefunction(s) for diagram number 3 - FFV1P0_3( w_fp[0], w_fp[1], COUPs[1], 0., 0., w_fp[8] ); + FFV1P0_3( w_fp[0], w_fp[1], COUPs[1], 1.0, 0., 0., w_fp[8] ); // Amplitude(s) for diagram number 3 - VVV1_0( w_fp[6], w_fp[7], w_fp[8], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[6], w_fp[7], w_fp[8], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 3 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -303,10 +303,10 @@ namespace mg5amcCpu // *** DIAGRAM 4 OF 36 *** // Wavefunction(s) for diagram number 4 - FFV1_1( w_fp[2], w_fp[6], COUPs[1], cIPD[0], cIPD[1], w_fp[9] ); + FFV1_1( w_fp[2], w_fp[6], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[9] ); // Amplitude(s) for diagram number 4 - FFV1_0( w_fp[3], w_fp[9], w_fp[8], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[9], w_fp[8], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 4 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -319,10 +319,10 @@ namespace mg5amcCpu // *** DIAGRAM 5 OF 36 *** // Wavefunction(s) for diagram number 5 - FFV1_2( w_fp[3], w_fp[6], COUPs[1], cIPD[0], cIPD[1], w_fp[9] ); + FFV1_2( w_fp[3], w_fp[6], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[9] ); // Amplitude(s) for diagram number 5 - FFV1_0( w_fp[9], w_fp[2], w_fp[8], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[9], w_fp[2], w_fp[8], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 5 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -335,11 +335,11 @@ namespace mg5amcCpu // *** DIAGRAM 6 OF 36 *** // Wavefunction(s) for diagram number 6 - FFV1_1( w_fp[2], w_fp[4], COUPs[1], cIPD[0], cIPD[1], w_fp[9] ); - FFV1_2( w_fp[3], w_fp[5], COUPs[1], cIPD[0], cIPD[1], w_fp[6] ); + FFV1_1( w_fp[2], w_fp[4], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[9] ); + FFV1_2( w_fp[3], w_fp[5], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[6] ); // Amplitude(s) for diagram number 6 - FFV1_0( w_fp[6], w_fp[9], w_fp[8], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[6], w_fp[9], w_fp[8], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 6 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -350,11 +350,11 @@ namespace mg5amcCpu // *** DIAGRAM 7 OF 36 *** // Wavefunction(s) for diagram number 7 - FFV1_1( w_fp[1], w_fp[5], COUPs[1], 0., 0., w_fp[10] ); - FFV1P0_3( w_fp[3], w_fp[9], COUPs[1], 0., 0., w_fp[11] ); + FFV1_1( w_fp[1], w_fp[5], COUPs[1], 1.0, 0., 0., w_fp[10] ); + FFV1P0_3( w_fp[3], w_fp[9], COUPs[1], 1.0, 0., 0., w_fp[11] ); // Amplitude(s) for diagram number 7 - FFV1_0( w_fp[0], w_fp[10], w_fp[11], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[0], w_fp[10], w_fp[11], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 7 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -365,10 +365,10 @@ namespace mg5amcCpu // *** DIAGRAM 8 OF 36 *** // Wavefunction(s) for diagram number 8 - FFV1_2( w_fp[0], w_fp[5], COUPs[1], 0., 0., w_fp[12] ); + FFV1_2( w_fp[0], w_fp[5], COUPs[1], 1.0, 0., 0., w_fp[12] ); // Amplitude(s) for diagram number 8 - FFV1_0( w_fp[12], w_fp[1], w_fp[11], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[12], w_fp[1], w_fp[11], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 8 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -379,10 +379,10 @@ namespace mg5amcCpu // *** DIAGRAM 9 OF 36 *** // Wavefunction(s) for diagram number 9 - FFV1_1( w_fp[9], w_fp[5], COUPs[1], cIPD[0], cIPD[1], w_fp[13] ); + FFV1_1( w_fp[9], w_fp[5], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[13] ); // Amplitude(s) for diagram number 9 - FFV1_0( w_fp[3], w_fp[13], w_fp[8], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[13], w_fp[8], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 9 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -396,7 +396,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 10 - VVV1_0( w_fp[5], w_fp[8], w_fp[11], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[5], w_fp[8], w_fp[11], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 10 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -407,11 +407,11 @@ namespace mg5amcCpu // *** DIAGRAM 11 OF 36 *** // Wavefunction(s) for diagram number 11 - FFV1_2( w_fp[3], w_fp[4], COUPs[1], cIPD[0], cIPD[1], w_fp[11] ); - FFV1_1( w_fp[2], w_fp[5], COUPs[1], cIPD[0], cIPD[1], w_fp[13] ); + FFV1_2( w_fp[3], w_fp[4], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[11] ); + FFV1_1( w_fp[2], w_fp[5], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[13] ); // Amplitude(s) for diagram number 11 - FFV1_0( w_fp[11], w_fp[13], w_fp[8], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[11], w_fp[13], w_fp[8], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 11 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -422,10 +422,10 @@ namespace mg5amcCpu // *** DIAGRAM 12 OF 36 *** // Wavefunction(s) for diagram number 12 - FFV1P0_3( w_fp[11], w_fp[2], COUPs[1], 0., 0., w_fp[9] ); + FFV1P0_3( w_fp[11], w_fp[2], COUPs[1], 1.0, 0., 0., w_fp[9] ); // Amplitude(s) for diagram number 12 - FFV1_0( w_fp[0], w_fp[10], w_fp[9], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[0], w_fp[10], w_fp[9], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 12 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -439,7 +439,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 13 - FFV1_0( w_fp[12], w_fp[1], w_fp[9], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[12], w_fp[1], w_fp[9], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 13 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -450,10 +450,10 @@ namespace mg5amcCpu // *** DIAGRAM 14 OF 36 *** // Wavefunction(s) for diagram number 14 - FFV1_2( w_fp[11], w_fp[5], COUPs[1], cIPD[0], cIPD[1], w_fp[14] ); + FFV1_2( w_fp[11], w_fp[5], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[14] ); // Amplitude(s) for diagram number 14 - FFV1_0( w_fp[14], w_fp[2], w_fp[8], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[14], w_fp[2], w_fp[8], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 14 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -467,7 +467,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 15 - VVV1_0( w_fp[5], w_fp[8], w_fp[9], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[5], w_fp[8], w_fp[9], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 15 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -478,11 +478,11 @@ namespace mg5amcCpu // *** DIAGRAM 16 OF 36 *** // Wavefunction(s) for diagram number 16 - FFV1_1( w_fp[1], w_fp[4], COUPs[1], 0., 0., w_fp[9] ); - FFV1P0_3( w_fp[0], w_fp[9], COUPs[1], 0., 0., w_fp[14] ); + FFV1_1( w_fp[1], w_fp[4], COUPs[1], 1.0, 0., 0., w_fp[9] ); + FFV1P0_3( w_fp[0], w_fp[9], COUPs[1], 1.0, 0., 0., w_fp[14] ); // Amplitude(s) for diagram number 16 - FFV1_0( w_fp[3], w_fp[13], w_fp[14], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[13], w_fp[14], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 16 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -496,7 +496,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 17 - FFV1_0( w_fp[6], w_fp[2], w_fp[14], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[6], w_fp[2], w_fp[14], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 17 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -510,7 +510,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 18 - FFV1_0( w_fp[12], w_fp[9], w_fp[7], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[12], w_fp[9], w_fp[7], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 18 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -521,10 +521,10 @@ namespace mg5amcCpu // *** DIAGRAM 19 OF 36 *** // Wavefunction(s) for diagram number 19 - FFV1_1( w_fp[9], w_fp[5], COUPs[1], 0., 0., w_fp[11] ); + FFV1_1( w_fp[9], w_fp[5], COUPs[1], 1.0, 0., 0., w_fp[11] ); // Amplitude(s) for diagram number 19 - FFV1_0( w_fp[0], w_fp[11], w_fp[7], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[0], w_fp[11], w_fp[7], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 19 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -538,7 +538,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 20 - VVV1_0( w_fp[5], w_fp[7], w_fp[14], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[5], w_fp[7], w_fp[14], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 20 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -549,11 +549,11 @@ namespace mg5amcCpu // *** DIAGRAM 21 OF 36 *** // Wavefunction(s) for diagram number 21 - FFV1_2( w_fp[0], w_fp[4], COUPs[1], 0., 0., w_fp[14] ); - FFV1P0_3( w_fp[14], w_fp[1], COUPs[1], 0., 0., w_fp[11] ); + FFV1_2( w_fp[0], w_fp[4], COUPs[1], 1.0, 0., 0., w_fp[14] ); + FFV1P0_3( w_fp[14], w_fp[1], COUPs[1], 1.0, 0., 0., w_fp[11] ); // Amplitude(s) for diagram number 21 - FFV1_0( w_fp[3], w_fp[13], w_fp[11], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[13], w_fp[11], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 21 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -567,7 +567,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 22 - FFV1_0( w_fp[6], w_fp[2], w_fp[11], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[6], w_fp[2], w_fp[11], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 22 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -581,7 +581,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 23 - FFV1_0( w_fp[14], w_fp[10], w_fp[7], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[14], w_fp[10], w_fp[7], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 23 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -592,10 +592,10 @@ namespace mg5amcCpu // *** DIAGRAM 24 OF 36 *** // Wavefunction(s) for diagram number 24 - FFV1_2( w_fp[14], w_fp[5], COUPs[1], 0., 0., w_fp[9] ); + FFV1_2( w_fp[14], w_fp[5], COUPs[1], 1.0, 0., 0., w_fp[9] ); // Amplitude(s) for diagram number 24 - FFV1_0( w_fp[9], w_fp[1], w_fp[7], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[9], w_fp[1], w_fp[7], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 24 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -609,7 +609,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 25 - VVV1_0( w_fp[5], w_fp[7], w_fp[11], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[5], w_fp[7], w_fp[11], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 25 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -620,10 +620,10 @@ namespace mg5amcCpu // *** DIAGRAM 26 OF 36 *** // Wavefunction(s) for diagram number 26 - FFV1_1( w_fp[13], w_fp[4], COUPs[1], cIPD[0], cIPD[1], w_fp[11] ); + FFV1_1( w_fp[13], w_fp[4], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[11] ); // Amplitude(s) for diagram number 26 - FFV1_0( w_fp[3], w_fp[11], w_fp[8], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[11], w_fp[8], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 26 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -634,10 +634,10 @@ namespace mg5amcCpu // *** DIAGRAM 27 OF 36 *** // Wavefunction(s) for diagram number 27 - VVV1P0_1( w_fp[4], w_fp[8], COUPs[0], 0., 0., w_fp[11] ); + VVV1P0_1( w_fp[4], w_fp[8], COUPs[0], 1.0, 0., 0., w_fp[11] ); // Amplitude(s) for diagram number 27 - FFV1_0( w_fp[3], w_fp[13], w_fp[11], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[13], w_fp[11], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 27 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -648,10 +648,10 @@ namespace mg5amcCpu // *** DIAGRAM 28 OF 36 *** // Wavefunction(s) for diagram number 28 - FFV1_2( w_fp[6], w_fp[4], COUPs[1], cIPD[0], cIPD[1], w_fp[13] ); + FFV1_2( w_fp[6], w_fp[4], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[13] ); // Amplitude(s) for diagram number 28 - FFV1_0( w_fp[13], w_fp[2], w_fp[8], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[13], w_fp[2], w_fp[8], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 28 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -665,7 +665,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 29 - FFV1_0( w_fp[6], w_fp[2], w_fp[11], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[6], w_fp[2], w_fp[11], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 29 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -676,10 +676,10 @@ namespace mg5amcCpu // *** DIAGRAM 30 OF 36 *** // Wavefunction(s) for diagram number 30 - FFV1_1( w_fp[10], w_fp[4], COUPs[1], 0., 0., w_fp[6] ); + FFV1_1( w_fp[10], w_fp[4], COUPs[1], 1.0, 0., 0., w_fp[6] ); // Amplitude(s) for diagram number 30 - FFV1_0( w_fp[0], w_fp[6], w_fp[7], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[0], w_fp[6], w_fp[7], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 30 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -690,10 +690,10 @@ namespace mg5amcCpu // *** DIAGRAM 31 OF 36 *** // Wavefunction(s) for diagram number 31 - VVV1P0_1( w_fp[4], w_fp[7], COUPs[0], 0., 0., w_fp[6] ); + VVV1P0_1( w_fp[4], w_fp[7], COUPs[0], 1.0, 0., 0., w_fp[6] ); // Amplitude(s) for diagram number 31 - FFV1_0( w_fp[0], w_fp[10], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[0], w_fp[10], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 31 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -704,10 +704,10 @@ namespace mg5amcCpu // *** DIAGRAM 32 OF 36 *** // Wavefunction(s) for diagram number 32 - FFV1_2( w_fp[12], w_fp[4], COUPs[1], 0., 0., w_fp[10] ); + FFV1_2( w_fp[12], w_fp[4], COUPs[1], 1.0, 0., 0., w_fp[10] ); // Amplitude(s) for diagram number 32 - FFV1_0( w_fp[10], w_fp[1], w_fp[7], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[10], w_fp[1], w_fp[7], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 32 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -721,7 +721,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 33 - FFV1_0( w_fp[12], w_fp[1], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[12], w_fp[1], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 33 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -735,17 +735,17 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 34 - VVVV1_0( w_fp[4], w_fp[5], w_fp[7], w_fp[8], COUPs[2], &_fp[0] ); + VVVV1_0( w_fp[4], w_fp[5], w_fp[7], w_fp[8], COUPs[2], 1.0, &_fp[0] ); jamp_sv[2] -= 1. / 2. * amp_sv[0]; jamp_sv[3] += 1. / 2. * amp_sv[0]; jamp_sv[4] += 1. / 2. * amp_sv[0]; jamp_sv[5] -= 1. / 2. * amp_sv[0]; - VVVV3_0( w_fp[4], w_fp[5], w_fp[7], w_fp[8], COUPs[2], &_fp[0] ); + VVVV3_0( w_fp[4], w_fp[5], w_fp[7], w_fp[8], COUPs[2], 1.0, &_fp[0] ); jamp_sv[2] -= 1. / 2. * amp_sv[0]; jamp_sv[5] -= 1. / 2. * amp_sv[0]; jamp_sv[9] += 1. / 2. * amp_sv[0]; jamp_sv[10] += 1. / 2. * amp_sv[0]; - VVVV4_0( w_fp[4], w_fp[5], w_fp[7], w_fp[8], COUPs[2], &_fp[0] ); + VVVV4_0( w_fp[4], w_fp[5], w_fp[7], w_fp[8], COUPs[2], 1.0, &_fp[0] ); jamp_sv[3] -= 1. / 2. * amp_sv[0]; jamp_sv[4] -= 1. / 2. * amp_sv[0]; jamp_sv[9] += 1. / 2. * amp_sv[0]; @@ -757,7 +757,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 35 - VVV1_0( w_fp[5], w_fp[8], w_fp[6], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[5], w_fp[8], w_fp[6], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 35 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -773,7 +773,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 36 - VVV1_0( w_fp[5], w_fp[7], w_fp[11], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[5], w_fp[7], w_fp[11], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 36 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1361,14 +1361,13 @@ namespace mg5amcCpu { // nprocesses>1 was last observed for "mirror processes" in uux_ttx in the 270 branch (see issue #343 and PRs #360 and #396) constexpr int nprocesses = 2; - static_assert( nprocesses == 1, "Assume nprocesses == 1" ); - // process_id corresponds to the index of DSIG1 Fortran functions (must be 1 because cudacpp is unable to handle DSIG2) + static_assert( nprocesses == 1 || nprocesses == 2, "Assume nprocesses == 1 or 2" ); constexpr int process_id = 1; // code generation source: madevent + cudacpp exporter static_assert( process_id == 1, "Assume process_id == 1" ); } // Denominators: spins, colors and identical particles - constexpr int helcolDenominators[1] = { 72,72 }; // assume nprocesses == 1 (#272 and #343) + constexpr int helcolDenominators[1] = { 72 }; // assume nprocesses == 1 (#272 and #343) #ifdef __CUDACC__ // Remember: in CUDA this is a kernel for one event, in c++ this processes n events diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxgg/auto_dsig1.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxgg/auto_dsig1.f index c9d97c2911..baaee299a2 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxgg/auto_dsig1.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxgg/auto_dsig1.f @@ -42,6 +42,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C LOCAL VARIABLES C INTEGER I,ITYPE,LP,IPROC + DOUBLE PRECISION QSCALE DOUBLE PRECISION D1,U1,S1,C1 DOUBLE PRECISION CX2,SX2,UX2,DX2 DOUBLE PRECISION XPQ(-7:7),PD(0:MAXPROC) @@ -129,21 +130,30 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) IF (ABS(LPP(IB(1))).GE.1) THEN !LP=SIGN(1,LPP(IB(1))) - D1=PDG2PDF(LPP(IB(1)),1, IB(1),XBK(IB(1)),DSQRT(Q2FACT(IB(1)))) - U1=PDG2PDF(LPP(IB(1)),2, IB(1),XBK(IB(1)),DSQRT(Q2FACT(IB(1)))) - S1=PDG2PDF(LPP(IB(1)),3, IB(1),XBK(IB(1)),DSQRT(Q2FACT(IB(1)))) - C1=PDG2PDF(LPP(IB(1)),4, IB(1),XBK(IB(1)),DSQRT(Q2FACT(IB(1)))) + IF (DSQRT(Q2FACT(IB(1))).EQ.0D0) THEN + QSCALE=0D0 + DO I=3,NEXTERNAL + QSCALE=QSCALE+DSQRT(MAX(0D0,(PP(0,I)+PP(3,I))*(PP(0,I) + $ -PP(3,I)))) + ENDDO + QSCALE=QSCALE/2D0 + ELSE + QSCALE=DSQRT(Q2FACT(IB(1))) + ENDIF + D1=PDG2PDF(LPP(IB(1)),1, IB(1),XBK(IB(1)), QSCALE) + U1=PDG2PDF(LPP(IB(1)),2, IB(1),XBK(IB(1)), QSCALE) + S1=PDG2PDF(LPP(IB(1)),3, IB(1),XBK(IB(1)), QSCALE) + C1=PDG2PDF(LPP(IB(1)),4, IB(1),XBK(IB(1)), QSCALE) ENDIF IF (ABS(LPP(IB(2))).GE.1) THEN !LP=SIGN(1,LPP(IB(2))) - CX2=PDG2PDF(LPP(IB(2)),-4, IB(2),XBK(IB(2)),DSQRT(Q2FACT(IB(2)) - $ )) - SX2=PDG2PDF(LPP(IB(2)),-3, IB(2),XBK(IB(2)),DSQRT(Q2FACT(IB(2)) - $ )) - UX2=PDG2PDF(LPP(IB(2)),-2, IB(2),XBK(IB(2)),DSQRT(Q2FACT(IB(2)) - $ )) - DX2=PDG2PDF(LPP(IB(2)),-1, IB(2),XBK(IB(2)),DSQRT(Q2FACT(IB(2)) - $ )) + IF (DSQRT(Q2FACT(IB(2))).NE.0D0) THEN + QSCALE=DSQRT(Q2FACT(IB(2))) + ENDIF + CX2=PDG2PDF(LPP(IB(2)),-4, IB(2),XBK(IB(2)), QSCALE) + SX2=PDG2PDF(LPP(IB(2)),-3, IB(2),XBK(IB(2)), QSCALE) + UX2=PDG2PDF(LPP(IB(2)),-2, IB(2),XBK(IB(2)), QSCALE) + DX2=PDG2PDF(LPP(IB(2)),-1, IB(2),XBK(IB(2)), QSCALE) ENDIF PD(0) = 0D0 IPROC = 0 diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxgg/matrix1.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxgg/matrix1.f index 80fb12abe5..a843f4656a 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxgg/matrix1.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxgg/matrix1.f @@ -397,7 +397,7 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C LOCAL VARIABLES C INTEGER I,J,M,N - COMPLEX*16 ZTEMP, TMP_JAMP(19) + COMPLEX*16 ZTEMP, TMP_JAMP(17) REAL*8 CF(NCOLOR,NCOLOR) COMPLEX*16 AMP(NGRAPHS), JAMP(NCOLOR,NAMPSO) COMPLEX*16 W(6,NWAVEFUNCS) @@ -668,29 +668,25 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) TMP_JAMP(3) = AMP(36) + AMP(38) ! used 4 times TMP_JAMP(2) = AMP(35) + AMP(37) ! used 4 times TMP_JAMP(1) = AMP(3) + AMP(34) ! used 4 times - TMP_JAMP(19) = TMP_JAMP(3) + TMP_JAMP(2) ! used 2 times - TMP_JAMP(18) = TMP_JAMP(2) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(33) ! used 2 times - TMP_JAMP(17) = TMP_JAMP(2) + ((0.000000000000000D+00 - $ ,1.000000000000000D+00)) * AMP(15) ! used 2 times + TMP_JAMP(17) = TMP_JAMP(3) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(25) ! used 2 times TMP_JAMP(16) = TMP_JAMP(3) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(27) ! used 2 times - TMP_JAMP(15) = TMP_JAMP(3) + ((0.000000000000000D+00, $ -1.000000000000000D+00)) * AMP(20) ! used 2 times - TMP_JAMP(14) = AMP(1) + AMP(2) ! used 2 times - TMP_JAMP(13) = AMP(2) + ((-0.000000000000000D+00 + TMP_JAMP(15) = TMP_JAMP(3) - TMP_JAMP(1) ! used 2 times + TMP_JAMP(14) = TMP_JAMP(2) + ((0.000000000000000D+00, + $ -1.000000000000000D+00)) * AMP(10) ! used 2 times + TMP_JAMP(13) = TMP_JAMP(2) + ((0.000000000000000D+00 + $ ,1.000000000000000D+00)) * AMP(15) ! used 2 times + TMP_JAMP(12) = TMP_JAMP(2) + TMP_JAMP(1) ! used 2 times + TMP_JAMP(11) = AMP(1) + AMP(2) ! used 2 times + TMP_JAMP(10) = AMP(2) + ((-0.000000000000000D+00 $ ,1.000000000000000D+00)) * AMP(32) ! used 2 times - TMP_JAMP(12) = AMP(1) + ((-0.000000000000000D+00 + TMP_JAMP(9) = AMP(1) + ((-0.000000000000000D+00 $ ,1.000000000000000D+00)) * AMP(19) ! used 2 times - TMP_JAMP(11) = AMP(1) + AMP(5) ! used 2 times - TMP_JAMP(10) = TMP_JAMP(2) + TMP_JAMP(1) ! used 2 times - TMP_JAMP(9) = AMP(5) + ((0.000000000000000D+00 + TMP_JAMP(8) = AMP(1) + AMP(5) ! used 2 times + TMP_JAMP(7) = AMP(5) + ((0.000000000000000D+00 $ ,1.000000000000000D+00)) * AMP(28) ! used 2 times - TMP_JAMP(8) = TMP_JAMP(3) - TMP_JAMP(1) ! used 2 times - TMP_JAMP(7) = AMP(4) + ((-0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(26) ! used 2 times - TMP_JAMP(6) = TMP_JAMP(1) + ((0.000000000000000D+00, - $ -1.000000000000000D+00)) * AMP(2) ! used 2 times + TMP_JAMP(6) = AMP(2) + AMP(4) ! used 2 times TMP_JAMP(5) = AMP(4) + ((0.000000000000000D+00 $ ,1.000000000000000D+00)) * AMP(9) ! used 2 times TMP_JAMP(4) = AMP(4) + AMP(5) ! used 2 times @@ -701,33 +697,35 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) $ -01)*AMP(14)+(1.666666666666667D-01)*AMP(26) $ +((0.000000000000000D+00,1.666666666666667D-01))*TMP_JAMP(4) JAMP(3,1) = (-5.000000000000000D-01)*AMP(8)+((0.000000000000000D - $ +00,5.000000000000000D-01))*AMP(10)+(-5.000000000000000D-01) - $ *AMP(32)+((0.000000000000000D+00,5.000000000000000D-01)) - $ *TMP_JAMP(5)+(-5.000000000000000D-01)*TMP_JAMP(6)+( - $ -5.000000000000000D-01)*TMP_JAMP(18) + $ +00,5.000000000000000D-01))*AMP(10)+((0.000000000000000D+00, + $ -5.000000000000000D-01))*AMP(33)+((0.000000000000000D+00 + $ ,5.000000000000000D-01))*TMP_JAMP(5)+((0.000000000000000D+00 + $ ,5.000000000000000D-01))*TMP_JAMP(10)+(-5.000000000000000D-01) + $ *TMP_JAMP(12) JAMP(4,1) = (-5.000000000000000D-01)*AMP(21)+( $ -5.000000000000000D-01)*AMP(24)+((0.000000000000000D+00, - $ -5.000000000000000D-01))*AMP(25)+(5.000000000000000D-01) - $ *TMP_JAMP(6)+((0.000000000000000D+00,-5.000000000000000D-01)) - $ *TMP_JAMP(7)+(-5.000000000000000D-01)*TMP_JAMP(16) + $ -5.000000000000000D-01))*AMP(25)+(-5.000000000000000D-01) + $ *AMP(26)+((0.000000000000000D+00,5.000000000000000D-01))*AMP(27) + $ +((0.000000000000000D+00,-5.000000000000000D-01))*TMP_JAMP(6)+( + $ -5.000000000000000D-01)*TMP_JAMP(15) JAMP(5,1) = (-5.000000000000000D-01)*AMP(17) $ +((0.000000000000000D+00,5.000000000000000D-01))*AMP(20) - $ +((0.000000000000000D+00,-5.000000000000000D-01))*AMP(29)+( - $ -5.000000000000000D-01)*TMP_JAMP(8)+((0.000000000000000D+00 - $ ,5.000000000000000D-01))*TMP_JAMP(9)+((0.000000000000000D+00 - $ ,5.000000000000000D-01))*TMP_JAMP(12) + $ +((0.000000000000000D+00,-5.000000000000000D-01))*AMP(29) + $ +((0.000000000000000D+00,5.000000000000000D-01))*TMP_JAMP(7) + $ +((0.000000000000000D+00,5.000000000000000D-01))*TMP_JAMP(9)+( + $ -5.000000000000000D-01)*TMP_JAMP(15) JAMP(6,1) = (-5.000000000000000D-01)*AMP(12)+( $ -5.000000000000000D-01)*AMP(14)+((0.000000000000000D+00, $ -5.000000000000000D-01))*AMP(15)+(-5.000000000000000D-01) $ *AMP(30)+((0.000000000000000D+00,5.000000000000000D-01))*AMP(31) - $ +(-5.000000000000000D-01)*TMP_JAMP(10)+((0.000000000000000D+00, - $ -5.000000000000000D-01))*TMP_JAMP(11) + $ +((0.000000000000000D+00,-5.000000000000000D-01))*TMP_JAMP(8)+( + $ -5.000000000000000D-01)*TMP_JAMP(12) JAMP(7,1) = (1.666666666666667D-01)*AMP(18)+((0.000000000000000D - $ +00,-1.666666666666667D-01))*TMP_JAMP(12)+((0.000000000000000D - $ +00,-1.666666666666667D-01))*TMP_JAMP(13) + $ +00,-1.666666666666667D-01))*TMP_JAMP(9)+((0.000000000000000D + $ +00,-1.666666666666667D-01))*TMP_JAMP(10) JAMP(8,1) = (1.666666666666667D-01)*AMP(23)+(1.666666666666667D $ -01)*AMP(24)+(1.666666666666667D-01)*AMP(30) - $ +((0.000000000000000D+00,1.666666666666667D-01))*TMP_JAMP(14) + $ +((0.000000000000000D+00,1.666666666666667D-01))*TMP_JAMP(11) JAMP(9,1) = (1.666666666666667D-01)*AMP(16)+(1.666666666666667D $ -01)*AMP(17)+(1.666666666666667D-01)*AMP(21) $ +(1.666666666666667D-01)*AMP(22) @@ -736,15 +734,13 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) $ +(-5.000000000000000D-01)*AMP(18)+((0.000000000000000D+00, $ -5.000000000000000D-01))*AMP(27)+((0.000000000000000D+00 $ ,5.000000000000000D-01))*AMP(33)+(5.000000000000000D-01) - $ *TMP_JAMP(15)+(5.000000000000000D-01)*TMP_JAMP(17) + $ *TMP_JAMP(13)+(5.000000000000000D-01)*TMP_JAMP(16) JAMP(11,1) = (-5.000000000000000D-01)*AMP(6)+( - $ -5.000000000000000D-01)*AMP(7)+((0.000000000000000D+00, - $ -5.000000000000000D-01))*AMP(10)+(-5.000000000000000D-01) - $ *AMP(22)+(-5.000000000000000D-01)*AMP(23)+((0.000000000000000D - $ +00,5.000000000000000D-01))*AMP(25)+((0.000000000000000D+00 + $ -5.000000000000000D-01)*AMP(7)+(-5.000000000000000D-01)*AMP(22) + $ +(-5.000000000000000D-01)*AMP(23)+((0.000000000000000D+00 $ ,5.000000000000000D-01))*AMP(29)+((0.000000000000000D+00, $ -5.000000000000000D-01))*AMP(31)+(5.000000000000000D-01) - $ *TMP_JAMP(19) + $ *TMP_JAMP(14)+(5.000000000000000D-01)*TMP_JAMP(17) JAMP(12,1) = (1.666666666666667D-01)*AMP(7)+(1.666666666666667D $ -01)*AMP(8)+(1.666666666666667D-01)*AMP(12)+(1.666666666666667D $ -01)*AMP(13) diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxuux/CPPProcess.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxuux/CPPProcess.cc index 5bf4c02337..c5c1f27856 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxuux/CPPProcess.cc +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxuux/CPPProcess.cc @@ -241,24 +241,24 @@ namespace mg5amcCpu // *** DIAGRAM 1 OF 14 *** // Wavefunction(s) for diagram number 1 - ipzxxx( momenta, cHel[ihel][0], +1, w_fp[0], 0 ); // NB: ipzxxx only uses pz + ixxxxx( momenta, 0., cHel[ihel][0], +1, w_fp[0], 0 ); - omzxxx( momenta, cHel[ihel][1], -1, w_fp[1], 1 ); // NB: omzxxx only uses pz + oxxxxx( momenta, 0., cHel[ihel][1], -1, w_fp[1], 1 ); oxxxxx( momenta, cIPD[0], cHel[ihel][2], +1, w_fp[2], 2 ); ixxxxx( momenta, cIPD[0], cHel[ihel][3], -1, w_fp[3], 3 ); - oxzxxx( momenta, cHel[ihel][4], +1, w_fp[4], 4 ); + oxxxxx( momenta, 0., cHel[ihel][4], +1, w_fp[4], 4 ); - ixzxxx( momenta, cHel[ihel][5], -1, w_fp[5], 5 ); + ixxxxx( momenta, 0., cHel[ihel][5], -1, w_fp[5], 5 ); - FFV1P0_3( w_fp[0], w_fp[1], COUPs[1], 0., 0., w_fp[6] ); - FFV1P0_3( w_fp[5], w_fp[4], COUPs[1], 0., 0., w_fp[7] ); - FFV1_1( w_fp[2], w_fp[6], COUPs[1], cIPD[0], cIPD[1], w_fp[8] ); + FFV1P0_3( w_fp[0], w_fp[1], COUPs[1], 1.0, 0., 0., w_fp[6] ); + FFV1P0_3( w_fp[5], w_fp[4], COUPs[1], 1.0, 0., 0., w_fp[7] ); + FFV1_1( w_fp[2], w_fp[6], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[8] ); // Amplitude(s) for diagram number 1 - FFV1_0( w_fp[3], w_fp[8], w_fp[7], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[8], w_fp[7], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -271,10 +271,10 @@ namespace mg5amcCpu // *** DIAGRAM 2 OF 14 *** // Wavefunction(s) for diagram number 2 - FFV1_2( w_fp[3], w_fp[6], COUPs[1], cIPD[0], cIPD[1], w_fp[8] ); + FFV1_2( w_fp[3], w_fp[6], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[8] ); // Amplitude(s) for diagram number 2 - FFV1_0( w_fp[8], w_fp[2], w_fp[7], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[8], w_fp[2], w_fp[7], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 2 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -287,10 +287,10 @@ namespace mg5amcCpu // *** DIAGRAM 3 OF 14 *** // Wavefunction(s) for diagram number 3 - FFV1P0_3( w_fp[3], w_fp[2], COUPs[1], 0., 0., w_fp[8] ); + FFV1P0_3( w_fp[3], w_fp[2], COUPs[1], 1.0, 0., 0., w_fp[8] ); // Amplitude(s) for diagram number 3 - VVV1_0( w_fp[6], w_fp[7], w_fp[8], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[6], w_fp[7], w_fp[8], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 3 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -301,10 +301,10 @@ namespace mg5amcCpu // *** DIAGRAM 4 OF 14 *** // Wavefunction(s) for diagram number 4 - FFV1_2( w_fp[5], w_fp[6], COUPs[1], 0., 0., w_fp[9] ); + FFV1_2( w_fp[5], w_fp[6], COUPs[1], 1.0, 0., 0., w_fp[9] ); // Amplitude(s) for diagram number 4 - FFV1_0( w_fp[9], w_fp[4], w_fp[8], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[9], w_fp[4], w_fp[8], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 4 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -317,10 +317,10 @@ namespace mg5amcCpu // *** DIAGRAM 5 OF 14 *** // Wavefunction(s) for diagram number 5 - FFV1_1( w_fp[4], w_fp[6], COUPs[1], 0., 0., w_fp[9] ); + FFV1_1( w_fp[4], w_fp[6], COUPs[1], 1.0, 0., 0., w_fp[9] ); // Amplitude(s) for diagram number 5 - FFV1_0( w_fp[5], w_fp[9], w_fp[8], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[5], w_fp[9], w_fp[8], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 5 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -333,12 +333,12 @@ namespace mg5amcCpu // *** DIAGRAM 6 OF 14 *** // Wavefunction(s) for diagram number 6 - FFV1P0_3( w_fp[0], w_fp[4], COUPs[1], 0., 0., w_fp[9] ); - FFV1P0_3( w_fp[5], w_fp[1], COUPs[1], 0., 0., w_fp[6] ); - FFV1_1( w_fp[2], w_fp[9], COUPs[1], cIPD[0], cIPD[1], w_fp[10] ); + FFV1P0_3( w_fp[0], w_fp[4], COUPs[1], 1.0, 0., 0., w_fp[9] ); + FFV1P0_3( w_fp[5], w_fp[1], COUPs[1], 1.0, 0., 0., w_fp[6] ); + FFV1_1( w_fp[2], w_fp[9], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[10] ); // Amplitude(s) for diagram number 6 - FFV1_0( w_fp[3], w_fp[10], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[10], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 6 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -351,10 +351,10 @@ namespace mg5amcCpu // *** DIAGRAM 7 OF 14 *** // Wavefunction(s) for diagram number 7 - FFV1_2( w_fp[3], w_fp[9], COUPs[1], cIPD[0], cIPD[1], w_fp[10] ); + FFV1_2( w_fp[3], w_fp[9], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[10] ); // Amplitude(s) for diagram number 7 - FFV1_0( w_fp[10], w_fp[2], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[10], w_fp[2], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 7 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -370,7 +370,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 8 - VVV1_0( w_fp[9], w_fp[6], w_fp[8], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[9], w_fp[6], w_fp[8], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 8 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -381,10 +381,10 @@ namespace mg5amcCpu // *** DIAGRAM 9 OF 14 *** // Wavefunction(s) for diagram number 9 - FFV1_2( w_fp[5], w_fp[9], COUPs[1], 0., 0., w_fp[10] ); + FFV1_2( w_fp[5], w_fp[9], COUPs[1], 1.0, 0., 0., w_fp[10] ); // Amplitude(s) for diagram number 9 - FFV1_0( w_fp[10], w_fp[1], w_fp[8], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[10], w_fp[1], w_fp[8], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 9 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -397,10 +397,10 @@ namespace mg5amcCpu // *** DIAGRAM 10 OF 14 *** // Wavefunction(s) for diagram number 10 - FFV1_1( w_fp[1], w_fp[9], COUPs[1], 0., 0., w_fp[10] ); + FFV1_1( w_fp[1], w_fp[9], COUPs[1], 1.0, 0., 0., w_fp[10] ); // Amplitude(s) for diagram number 10 - FFV1_0( w_fp[5], w_fp[10], w_fp[8], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[5], w_fp[10], w_fp[8], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 10 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -413,10 +413,10 @@ namespace mg5amcCpu // *** DIAGRAM 11 OF 14 *** // Wavefunction(s) for diagram number 11 - FFV1_2( w_fp[0], w_fp[6], COUPs[1], 0., 0., w_fp[10] ); + FFV1_2( w_fp[0], w_fp[6], COUPs[1], 1.0, 0., 0., w_fp[10] ); // Amplitude(s) for diagram number 11 - FFV1_0( w_fp[10], w_fp[4], w_fp[8], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[10], w_fp[4], w_fp[8], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 11 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -429,10 +429,10 @@ namespace mg5amcCpu // *** DIAGRAM 12 OF 14 *** // Wavefunction(s) for diagram number 12 - FFV1_2( w_fp[0], w_fp[8], COUPs[1], 0., 0., w_fp[10] ); + FFV1_2( w_fp[0], w_fp[8], COUPs[1], 1.0, 0., 0., w_fp[10] ); // Amplitude(s) for diagram number 12 - FFV1_0( w_fp[10], w_fp[4], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[10], w_fp[4], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 12 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -445,10 +445,10 @@ namespace mg5amcCpu // *** DIAGRAM 13 OF 14 *** // Wavefunction(s) for diagram number 13 - FFV1_2( w_fp[0], w_fp[7], COUPs[1], 0., 0., w_fp[6] ); + FFV1_2( w_fp[0], w_fp[7], COUPs[1], 1.0, 0., 0., w_fp[6] ); // Amplitude(s) for diagram number 13 - FFV1_0( w_fp[6], w_fp[1], w_fp[8], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[6], w_fp[1], w_fp[8], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 13 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -464,7 +464,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 14 - FFV1_0( w_fp[10], w_fp[1], w_fp[7], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[10], w_fp[1], w_fp[7], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 14 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1046,14 +1046,13 @@ namespace mg5amcCpu { // nprocesses>1 was last observed for "mirror processes" in uux_ttx in the 270 branch (see issue #343 and PRs #360 and #396) constexpr int nprocesses = 2; - static_assert( nprocesses == 1, "Assume nprocesses == 1" ); - // process_id corresponds to the index of DSIG1 Fortran functions (must be 1 because cudacpp is unable to handle DSIG2) + static_assert( nprocesses == 1 || nprocesses == 2, "Assume nprocesses == 1 or 2" ); constexpr int process_id = 1; // code generation source: madevent + cudacpp exporter static_assert( process_id == 1, "Assume process_id == 1" ); } // Denominators: spins, colors and identical particles - constexpr int helcolDenominators[1] = { 36,36 }; // assume nprocesses == 1 (#272 and #343) + constexpr int helcolDenominators[1] = { 36 }; // assume nprocesses == 1 (#272 and #343) #ifdef __CUDACC__ // Remember: in CUDA this is a kernel for one event, in c++ this processes n events diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxuux/auto_dsig1.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxuux/auto_dsig1.f index c3b97a2a87..c2206e8d5e 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxuux/auto_dsig1.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxuux/auto_dsig1.f @@ -42,6 +42,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C LOCAL VARIABLES C INTEGER I,ITYPE,LP,IPROC + DOUBLE PRECISION QSCALE DOUBLE PRECISION D1,U1,S1,C1 DOUBLE PRECISION CX2,SX2,UX2,DX2 DOUBLE PRECISION XPQ(-7:7),PD(0:MAXPROC) @@ -129,21 +130,30 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) IF (ABS(LPP(IB(1))).GE.1) THEN !LP=SIGN(1,LPP(IB(1))) - D1=PDG2PDF(LPP(IB(1)),1, IB(1),XBK(IB(1)),DSQRT(Q2FACT(IB(1)))) - U1=PDG2PDF(LPP(IB(1)),2, IB(1),XBK(IB(1)),DSQRT(Q2FACT(IB(1)))) - S1=PDG2PDF(LPP(IB(1)),3, IB(1),XBK(IB(1)),DSQRT(Q2FACT(IB(1)))) - C1=PDG2PDF(LPP(IB(1)),4, IB(1),XBK(IB(1)),DSQRT(Q2FACT(IB(1)))) + IF (DSQRT(Q2FACT(IB(1))).EQ.0D0) THEN + QSCALE=0D0 + DO I=3,NEXTERNAL + QSCALE=QSCALE+DSQRT(MAX(0D0,(PP(0,I)+PP(3,I))*(PP(0,I) + $ -PP(3,I)))) + ENDDO + QSCALE=QSCALE/2D0 + ELSE + QSCALE=DSQRT(Q2FACT(IB(1))) + ENDIF + D1=PDG2PDF(LPP(IB(1)),1, IB(1),XBK(IB(1)), QSCALE) + U1=PDG2PDF(LPP(IB(1)),2, IB(1),XBK(IB(1)), QSCALE) + S1=PDG2PDF(LPP(IB(1)),3, IB(1),XBK(IB(1)), QSCALE) + C1=PDG2PDF(LPP(IB(1)),4, IB(1),XBK(IB(1)), QSCALE) ENDIF IF (ABS(LPP(IB(2))).GE.1) THEN !LP=SIGN(1,LPP(IB(2))) - CX2=PDG2PDF(LPP(IB(2)),-4, IB(2),XBK(IB(2)),DSQRT(Q2FACT(IB(2)) - $ )) - SX2=PDG2PDF(LPP(IB(2)),-3, IB(2),XBK(IB(2)),DSQRT(Q2FACT(IB(2)) - $ )) - UX2=PDG2PDF(LPP(IB(2)),-2, IB(2),XBK(IB(2)),DSQRT(Q2FACT(IB(2)) - $ )) - DX2=PDG2PDF(LPP(IB(2)),-1, IB(2),XBK(IB(2)),DSQRT(Q2FACT(IB(2)) - $ )) + IF (DSQRT(Q2FACT(IB(2))).NE.0D0) THEN + QSCALE=DSQRT(Q2FACT(IB(2))) + ENDIF + CX2=PDG2PDF(LPP(IB(2)),-4, IB(2),XBK(IB(2)), QSCALE) + SX2=PDG2PDF(LPP(IB(2)),-3, IB(2),XBK(IB(2)), QSCALE) + UX2=PDG2PDF(LPP(IB(2)),-2, IB(2),XBK(IB(2)), QSCALE) + DX2=PDG2PDF(LPP(IB(2)),-1, IB(2),XBK(IB(2)), QSCALE) ENDIF PD(0) = 0D0 IPROC = 0 diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxuux/matrix1.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxuux/matrix1.f index 4f193a2ce6..0385cc9e9a 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxuux/matrix1.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxuux/matrix1.f @@ -544,30 +544,30 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) TMP_JAMP(3) = AMP(1) + AMP(4) ! used 3 times TMP_JAMP(2) = AMP(2) + AMP(5) ! used 3 times TMP_JAMP(1) = AMP(1) + AMP(2) ! used 3 times - TMP_JAMP(16) = TMP_JAMP(8) + TMP_JAMP(5) ! used 2 times - TMP_JAMP(15) = TMP_JAMP(9) + TMP_JAMP(5) ! used 2 times - TMP_JAMP(14) = TMP_JAMP(9) + TMP_JAMP(8) ! used 2 times - TMP_JAMP(13) = TMP_JAMP(10) + TMP_JAMP(4) ! used 2 times - TMP_JAMP(12) = TMP_JAMP(10) + TMP_JAMP(1) ! used 2 times + TMP_JAMP(16) = TMP_JAMP(10) + TMP_JAMP(4) ! used 2 times + TMP_JAMP(15) = TMP_JAMP(10) + TMP_JAMP(1) ! used 2 times + TMP_JAMP(14) = TMP_JAMP(9) + TMP_JAMP(5) ! used 2 times + TMP_JAMP(13) = TMP_JAMP(9) + TMP_JAMP(8) ! used 2 times + TMP_JAMP(12) = TMP_JAMP(8) + TMP_JAMP(5) ! used 2 times TMP_JAMP(11) = TMP_JAMP(4) + TMP_JAMP(1) ! used 2 times JAMP(1,1) = (2.777777777777778D-02)*TMP_JAMP(10) $ +(2.777777777777778D-02)*TMP_JAMP(11)+(8.333333333333333D-02) - $ *TMP_JAMP(14) + $ *TMP_JAMP(13) JAMP(2,1) = ((0.000000000000000D+00,-2.500000000000000D-01)) $ *AMP(8)+(-2.500000000000000D-01)*AMP(11)+(-2.500000000000000D $ -01)*TMP_JAMP(7)+(-8.333333333333333D-02)*TMP_JAMP(11) JAMP(3,1) = ((0.000000000000000D+00,2.500000000000000D-01)) $ *AMP(8)+(-2.500000000000000D-01)*AMP(12)+(-2.500000000000000D - $ -01)*TMP_JAMP(6)+(-8.333333333333333D-02)*TMP_JAMP(12) + $ -01)*TMP_JAMP(6)+(-8.333333333333333D-02)*TMP_JAMP(15) JAMP(4,1) = ((0.000000000000000D+00,2.500000000000000D-01)) $ *AMP(3)+(2.500000000000000D-01)*AMP(13)+(2.500000000000000D-01) - $ *TMP_JAMP(2)+(8.333333333333333D-02)*TMP_JAMP(16) + $ *TMP_JAMP(2)+(8.333333333333333D-02)*TMP_JAMP(12) JAMP(5,1) = ((0.000000000000000D+00,-2.500000000000000D-01)) $ *AMP(3)+(2.500000000000000D-01)*AMP(14)+(2.500000000000000D-01) - $ *TMP_JAMP(3)+(8.333333333333333D-02)*TMP_JAMP(15) - JAMP(6,1) = (-2.777777777777778D-02)*TMP_JAMP(5)+( - $ -8.333333333333333D-02)*TMP_JAMP(13)+(-2.777777777777778D-02) - $ *TMP_JAMP(14) + $ *TMP_JAMP(3)+(8.333333333333333D-02)*TMP_JAMP(14) + JAMP(6,1) = (-2.777777777777778D-02)*TMP_JAMP(9)+( + $ -2.777777777777778D-02)*TMP_JAMP(12)+(-8.333333333333333D-02) + $ *TMP_JAMP(16) IF(INIT_MODE)THEN DO I=1, NGRAPHS diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxcx_ttxuxcx/CPPProcess.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxcx_ttxuxcx/CPPProcess.cc index 739b5a1bb2..5c2471b60d 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxcx_ttxuxcx/CPPProcess.cc +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxcx_ttxuxcx/CPPProcess.cc @@ -243,24 +243,24 @@ namespace mg5amcCpu // *** DIAGRAM 1 OF 7 *** // Wavefunction(s) for diagram number 1 - opzxxx( momenta, cHel[ihel][0], -1, w_fp[0], 0 ); // NB: opzxxx only uses pz + oxxxxx( momenta, 0., cHel[ihel][0], -1, w_fp[0], 0 ); - omzxxx( momenta, cHel[ihel][1], -1, w_fp[1], 1 ); // NB: omzxxx only uses pz + oxxxxx( momenta, 0., cHel[ihel][1], -1, w_fp[1], 1 ); oxxxxx( momenta, cIPD[0], cHel[ihel][2], +1, w_fp[2], 2 ); ixxxxx( momenta, cIPD[0], cHel[ihel][3], -1, w_fp[3], 3 ); - ixzxxx( momenta, cHel[ihel][4], -1, w_fp[4], 4 ); + ixxxxx( momenta, 0., cHel[ihel][4], -1, w_fp[4], 4 ); - ixzxxx( momenta, cHel[ihel][5], -1, w_fp[5], 5 ); + ixxxxx( momenta, 0., cHel[ihel][5], -1, w_fp[5], 5 ); - FFV1P0_3( w_fp[4], w_fp[0], COUPs[1], 0., 0., w_fp[6] ); - FFV1P0_3( w_fp[5], w_fp[1], COUPs[1], 0., 0., w_fp[7] ); - FFV1_1( w_fp[2], w_fp[6], COUPs[1], cIPD[0], cIPD[1], w_fp[8] ); + FFV1P0_3( w_fp[4], w_fp[0], COUPs[1], 1.0, 0., 0., w_fp[6] ); + FFV1P0_3( w_fp[5], w_fp[1], COUPs[1], 1.0, 0., 0., w_fp[7] ); + FFV1_1( w_fp[2], w_fp[6], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[8] ); // Amplitude(s) for diagram number 1 - FFV1_0( w_fp[3], w_fp[8], w_fp[7], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[8], w_fp[7], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -273,10 +273,10 @@ namespace mg5amcCpu // *** DIAGRAM 2 OF 7 *** // Wavefunction(s) for diagram number 2 - FFV1_2( w_fp[3], w_fp[6], COUPs[1], cIPD[0], cIPD[1], w_fp[8] ); + FFV1_2( w_fp[3], w_fp[6], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[8] ); // Amplitude(s) for diagram number 2 - FFV1_0( w_fp[8], w_fp[2], w_fp[7], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[8], w_fp[2], w_fp[7], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 2 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -289,10 +289,10 @@ namespace mg5amcCpu // *** DIAGRAM 3 OF 7 *** // Wavefunction(s) for diagram number 3 - FFV1P0_3( w_fp[3], w_fp[2], COUPs[1], 0., 0., w_fp[8] ); + FFV1P0_3( w_fp[3], w_fp[2], COUPs[1], 1.0, 0., 0., w_fp[8] ); // Amplitude(s) for diagram number 3 - VVV1_0( w_fp[6], w_fp[7], w_fp[8], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[6], w_fp[7], w_fp[8], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 3 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -303,10 +303,10 @@ namespace mg5amcCpu // *** DIAGRAM 4 OF 7 *** // Wavefunction(s) for diagram number 4 - FFV1_2( w_fp[5], w_fp[6], COUPs[1], 0., 0., w_fp[3] ); + FFV1_2( w_fp[5], w_fp[6], COUPs[1], 1.0, 0., 0., w_fp[3] ); // Amplitude(s) for diagram number 4 - FFV1_0( w_fp[3], w_fp[1], w_fp[8], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[1], w_fp[8], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 4 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -319,10 +319,10 @@ namespace mg5amcCpu // *** DIAGRAM 5 OF 7 *** // Wavefunction(s) for diagram number 5 - FFV1_1( w_fp[1], w_fp[6], COUPs[1], 0., 0., w_fp[3] ); + FFV1_1( w_fp[1], w_fp[6], COUPs[1], 1.0, 0., 0., w_fp[3] ); // Amplitude(s) for diagram number 5 - FFV1_0( w_fp[5], w_fp[3], w_fp[8], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[5], w_fp[3], w_fp[8], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 5 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -335,10 +335,10 @@ namespace mg5amcCpu // *** DIAGRAM 6 OF 7 *** // Wavefunction(s) for diagram number 6 - FFV1_2( w_fp[4], w_fp[7], COUPs[1], 0., 0., w_fp[3] ); + FFV1_2( w_fp[4], w_fp[7], COUPs[1], 1.0, 0., 0., w_fp[3] ); // Amplitude(s) for diagram number 6 - FFV1_0( w_fp[3], w_fp[0], w_fp[8], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[0], w_fp[8], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 6 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -351,10 +351,10 @@ namespace mg5amcCpu // *** DIAGRAM 7 OF 7 *** // Wavefunction(s) for diagram number 7 - FFV1_2( w_fp[4], w_fp[8], COUPs[1], 0., 0., w_fp[3] ); + FFV1_2( w_fp[4], w_fp[8], COUPs[1], 1.0, 0., 0., w_fp[3] ); // Amplitude(s) for diagram number 7 - FFV1_0( w_fp[3], w_fp[0], w_fp[7], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[0], w_fp[7], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 7 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -936,14 +936,13 @@ namespace mg5amcCpu { // nprocesses>1 was last observed for "mirror processes" in uux_ttx in the 270 branch (see issue #343 and PRs #360 and #396) constexpr int nprocesses = 2; - static_assert( nprocesses == 1, "Assume nprocesses == 1" ); - // process_id corresponds to the index of DSIG1 Fortran functions (must be 1 because cudacpp is unable to handle DSIG2) + static_assert( nprocesses == 1 || nprocesses == 2, "Assume nprocesses == 1 or 2" ); constexpr int process_id = 1; // code generation source: madevent + cudacpp exporter static_assert( process_id == 1, "Assume process_id == 1" ); } // Denominators: spins, colors and identical particles - constexpr int helcolDenominators[1] = { 36,36 }; // assume nprocesses == 1 (#272 and #343) + constexpr int helcolDenominators[1] = { 36 }; // assume nprocesses == 1 (#272 and #343) #ifdef __CUDACC__ // Remember: in CUDA this is a kernel for one event, in c++ this processes n events diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxcx_ttxuxcx/auto_dsig1.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxcx_ttxuxcx/auto_dsig1.f index adb807b78c..e92ee65fd7 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxcx_ttxuxcx/auto_dsig1.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxcx_ttxuxcx/auto_dsig1.f @@ -44,6 +44,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C LOCAL VARIABLES C INTEGER I,ITYPE,LP,IPROC + DOUBLE PRECISION QSCALE DOUBLE PRECISION CX1,UX1,DX1 DOUBLE PRECISION CX2,SX2,DX2 DOUBLE PRECISION XPQ(-7:7),PD(0:MAXPROC) @@ -131,21 +132,28 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) IF (ABS(LPP(IB(1))).GE.1) THEN !LP=SIGN(1,LPP(IB(1))) - CX1=PDG2PDF(LPP(IB(1)),-4, IB(1),XBK(IB(1)),DSQRT(Q2FACT(IB(1)) - $ )) - UX1=PDG2PDF(LPP(IB(1)),-2, IB(1),XBK(IB(1)),DSQRT(Q2FACT(IB(1)) - $ )) - DX1=PDG2PDF(LPP(IB(1)),-1, IB(1),XBK(IB(1)),DSQRT(Q2FACT(IB(1)) - $ )) + IF (DSQRT(Q2FACT(IB(1))).EQ.0D0) THEN + QSCALE=0D0 + DO I=3,NEXTERNAL + QSCALE=QSCALE+DSQRT(MAX(0D0,(PP(0,I)+PP(3,I))*(PP(0,I) + $ -PP(3,I)))) + ENDDO + QSCALE=QSCALE/2D0 + ELSE + QSCALE=DSQRT(Q2FACT(IB(1))) + ENDIF + CX1=PDG2PDF(LPP(IB(1)),-4, IB(1),XBK(IB(1)), QSCALE) + UX1=PDG2PDF(LPP(IB(1)),-2, IB(1),XBK(IB(1)), QSCALE) + DX1=PDG2PDF(LPP(IB(1)),-1, IB(1),XBK(IB(1)), QSCALE) ENDIF IF (ABS(LPP(IB(2))).GE.1) THEN !LP=SIGN(1,LPP(IB(2))) - CX2=PDG2PDF(LPP(IB(2)),-4, IB(2),XBK(IB(2)),DSQRT(Q2FACT(IB(2)) - $ )) - SX2=PDG2PDF(LPP(IB(2)),-3, IB(2),XBK(IB(2)),DSQRT(Q2FACT(IB(2)) - $ )) - DX2=PDG2PDF(LPP(IB(2)),-1, IB(2),XBK(IB(2)),DSQRT(Q2FACT(IB(2)) - $ )) + IF (DSQRT(Q2FACT(IB(2))).NE.0D0) THEN + QSCALE=DSQRT(Q2FACT(IB(2))) + ENDIF + CX2=PDG2PDF(LPP(IB(2)),-4, IB(2),XBK(IB(2)), QSCALE) + SX2=PDG2PDF(LPP(IB(2)),-3, IB(2),XBK(IB(2)), QSCALE) + DX2=PDG2PDF(LPP(IB(2)),-1, IB(2),XBK(IB(2)), QSCALE) ENDIF PD(0) = 0D0 IPROC = 0 diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxcx_ttxuxcx/matrix1.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxcx_ttxuxcx/matrix1.f index b856b0ec12..114c0a9384 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxcx_ttxuxcx/matrix1.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxcx_ttxuxcx/matrix1.f @@ -523,14 +523,14 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) TMP_JAMP(2) = AMP(2) + AMP(5) ! used 3 times TMP_JAMP(1) = AMP(1) + AMP(2) ! used 3 times TMP_JAMP(8) = TMP_JAMP(5) + TMP_JAMP(4) ! used 2 times - TMP_JAMP(7) = TMP_JAMP(4) + TMP_JAMP(1) ! used 2 times - TMP_JAMP(6) = TMP_JAMP(5) + TMP_JAMP(1) ! used 2 times + TMP_JAMP(7) = TMP_JAMP(5) + TMP_JAMP(1) ! used 2 times + TMP_JAMP(6) = TMP_JAMP(4) + TMP_JAMP(1) ! used 2 times JAMP(1,1) = ((0.000000000000000D+00,2.500000000000000D-01)) $ *AMP(3)+(2.500000000000000D-01)*AMP(6)+(2.500000000000000D-01) $ *TMP_JAMP(2) - JAMP(2,1) = (-8.333333333333333D-02)*TMP_JAMP(6) - JAMP(3,1) = (-8.333333333333333D-02)*TMP_JAMP(7) - JAMP(4,1) = (2.777777777777778D-02)*TMP_JAMP(4) + JAMP(2,1) = (-8.333333333333333D-02)*TMP_JAMP(7) + JAMP(3,1) = (-8.333333333333333D-02)*TMP_JAMP(6) + JAMP(4,1) = (2.777777777777778D-02)*TMP_JAMP(5) $ +(2.777777777777778D-02)*TMP_JAMP(6) JAMP(5,1) = ((0.000000000000000D+00,-2.500000000000000D-01)) $ *AMP(3)+(2.500000000000000D-01)*AMP(7)+(2.500000000000000D-01) diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxux_ttxuxux/CPPProcess.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxux_ttxuxux/CPPProcess.cc index 129dd8551a..336545444a 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxux_ttxuxux/CPPProcess.cc +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxux_ttxuxux/CPPProcess.cc @@ -241,24 +241,24 @@ namespace mg5amcCpu // *** DIAGRAM 1 OF 14 *** // Wavefunction(s) for diagram number 1 - opzxxx( momenta, cHel[ihel][0], -1, w_fp[0], 0 ); // NB: opzxxx only uses pz + oxxxxx( momenta, 0., cHel[ihel][0], -1, w_fp[0], 0 ); - omzxxx( momenta, cHel[ihel][1], -1, w_fp[1], 1 ); // NB: omzxxx only uses pz + oxxxxx( momenta, 0., cHel[ihel][1], -1, w_fp[1], 1 ); oxxxxx( momenta, cIPD[0], cHel[ihel][2], +1, w_fp[2], 2 ); ixxxxx( momenta, cIPD[0], cHel[ihel][3], -1, w_fp[3], 3 ); - ixzxxx( momenta, cHel[ihel][4], -1, w_fp[4], 4 ); + ixxxxx( momenta, 0., cHel[ihel][4], -1, w_fp[4], 4 ); - ixzxxx( momenta, cHel[ihel][5], -1, w_fp[5], 5 ); + ixxxxx( momenta, 0., cHel[ihel][5], -1, w_fp[5], 5 ); - FFV1P0_3( w_fp[4], w_fp[0], COUPs[1], 0., 0., w_fp[6] ); - FFV1P0_3( w_fp[5], w_fp[1], COUPs[1], 0., 0., w_fp[7] ); - FFV1_1( w_fp[2], w_fp[6], COUPs[1], cIPD[0], cIPD[1], w_fp[8] ); + FFV1P0_3( w_fp[4], w_fp[0], COUPs[1], 1.0, 0., 0., w_fp[6] ); + FFV1P0_3( w_fp[5], w_fp[1], COUPs[1], 1.0, 0., 0., w_fp[7] ); + FFV1_1( w_fp[2], w_fp[6], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[8] ); // Amplitude(s) for diagram number 1 - FFV1_0( w_fp[3], w_fp[8], w_fp[7], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[8], w_fp[7], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 1 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -271,10 +271,10 @@ namespace mg5amcCpu // *** DIAGRAM 2 OF 14 *** // Wavefunction(s) for diagram number 2 - FFV1_2( w_fp[3], w_fp[6], COUPs[1], cIPD[0], cIPD[1], w_fp[8] ); + FFV1_2( w_fp[3], w_fp[6], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[8] ); // Amplitude(s) for diagram number 2 - FFV1_0( w_fp[8], w_fp[2], w_fp[7], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[8], w_fp[2], w_fp[7], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 2 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -287,10 +287,10 @@ namespace mg5amcCpu // *** DIAGRAM 3 OF 14 *** // Wavefunction(s) for diagram number 3 - FFV1P0_3( w_fp[3], w_fp[2], COUPs[1], 0., 0., w_fp[8] ); + FFV1P0_3( w_fp[3], w_fp[2], COUPs[1], 1.0, 0., 0., w_fp[8] ); // Amplitude(s) for diagram number 3 - VVV1_0( w_fp[6], w_fp[7], w_fp[8], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[6], w_fp[7], w_fp[8], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 3 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -301,10 +301,10 @@ namespace mg5amcCpu // *** DIAGRAM 4 OF 14 *** // Wavefunction(s) for diagram number 4 - FFV1_2( w_fp[5], w_fp[6], COUPs[1], 0., 0., w_fp[9] ); + FFV1_2( w_fp[5], w_fp[6], COUPs[1], 1.0, 0., 0., w_fp[9] ); // Amplitude(s) for diagram number 4 - FFV1_0( w_fp[9], w_fp[1], w_fp[8], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[9], w_fp[1], w_fp[8], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 4 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -317,10 +317,10 @@ namespace mg5amcCpu // *** DIAGRAM 5 OF 14 *** // Wavefunction(s) for diagram number 5 - FFV1_1( w_fp[1], w_fp[6], COUPs[1], 0., 0., w_fp[9] ); + FFV1_1( w_fp[1], w_fp[6], COUPs[1], 1.0, 0., 0., w_fp[9] ); // Amplitude(s) for diagram number 5 - FFV1_0( w_fp[5], w_fp[9], w_fp[8], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[5], w_fp[9], w_fp[8], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 5 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -333,12 +333,12 @@ namespace mg5amcCpu // *** DIAGRAM 6 OF 14 *** // Wavefunction(s) for diagram number 6 - FFV1P0_3( w_fp[4], w_fp[1], COUPs[1], 0., 0., w_fp[9] ); - FFV1P0_3( w_fp[5], w_fp[0], COUPs[1], 0., 0., w_fp[6] ); - FFV1_1( w_fp[2], w_fp[9], COUPs[1], cIPD[0], cIPD[1], w_fp[10] ); + FFV1P0_3( w_fp[4], w_fp[1], COUPs[1], 1.0, 0., 0., w_fp[9] ); + FFV1P0_3( w_fp[5], w_fp[0], COUPs[1], 1.0, 0., 0., w_fp[6] ); + FFV1_1( w_fp[2], w_fp[9], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[10] ); // Amplitude(s) for diagram number 6 - FFV1_0( w_fp[3], w_fp[10], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[3], w_fp[10], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 6 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -351,10 +351,10 @@ namespace mg5amcCpu // *** DIAGRAM 7 OF 14 *** // Wavefunction(s) for diagram number 7 - FFV1_2( w_fp[3], w_fp[9], COUPs[1], cIPD[0], cIPD[1], w_fp[10] ); + FFV1_2( w_fp[3], w_fp[9], COUPs[1], 1.0, cIPD[0], cIPD[1], w_fp[10] ); // Amplitude(s) for diagram number 7 - FFV1_0( w_fp[10], w_fp[2], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[10], w_fp[2], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 7 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -370,7 +370,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 8 - VVV1_0( w_fp[9], w_fp[6], w_fp[8], COUPs[0], &_fp[0] ); + VVV1_0( w_fp[9], w_fp[6], w_fp[8], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 8 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -381,10 +381,10 @@ namespace mg5amcCpu // *** DIAGRAM 9 OF 14 *** // Wavefunction(s) for diagram number 9 - FFV1_2( w_fp[5], w_fp[9], COUPs[1], 0., 0., w_fp[10] ); + FFV1_2( w_fp[5], w_fp[9], COUPs[1], 1.0, 0., 0., w_fp[10] ); // Amplitude(s) for diagram number 9 - FFV1_0( w_fp[10], w_fp[0], w_fp[8], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[10], w_fp[0], w_fp[8], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 9 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -397,10 +397,10 @@ namespace mg5amcCpu // *** DIAGRAM 10 OF 14 *** // Wavefunction(s) for diagram number 10 - FFV1_1( w_fp[0], w_fp[9], COUPs[1], 0., 0., w_fp[10] ); + FFV1_1( w_fp[0], w_fp[9], COUPs[1], 1.0, 0., 0., w_fp[10] ); // Amplitude(s) for diagram number 10 - FFV1_0( w_fp[5], w_fp[10], w_fp[8], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[5], w_fp[10], w_fp[8], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 10 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -413,10 +413,10 @@ namespace mg5amcCpu // *** DIAGRAM 11 OF 14 *** // Wavefunction(s) for diagram number 11 - FFV1_2( w_fp[4], w_fp[6], COUPs[1], 0., 0., w_fp[10] ); + FFV1_2( w_fp[4], w_fp[6], COUPs[1], 1.0, 0., 0., w_fp[10] ); // Amplitude(s) for diagram number 11 - FFV1_0( w_fp[10], w_fp[1], w_fp[8], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[10], w_fp[1], w_fp[8], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 11 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -429,10 +429,10 @@ namespace mg5amcCpu // *** DIAGRAM 12 OF 14 *** // Wavefunction(s) for diagram number 12 - FFV1_2( w_fp[4], w_fp[8], COUPs[1], 0., 0., w_fp[10] ); + FFV1_2( w_fp[4], w_fp[8], COUPs[1], 1.0, 0., 0., w_fp[10] ); // Amplitude(s) for diagram number 12 - FFV1_0( w_fp[10], w_fp[1], w_fp[6], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[10], w_fp[1], w_fp[6], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 12 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -445,10 +445,10 @@ namespace mg5amcCpu // *** DIAGRAM 13 OF 14 *** // Wavefunction(s) for diagram number 13 - FFV1_2( w_fp[4], w_fp[7], COUPs[1], 0., 0., w_fp[6] ); + FFV1_2( w_fp[4], w_fp[7], COUPs[1], 1.0, 0., 0., w_fp[6] ); // Amplitude(s) for diagram number 13 - FFV1_0( w_fp[6], w_fp[0], w_fp[8], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[6], w_fp[0], w_fp[8], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 13 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -464,7 +464,7 @@ namespace mg5amcCpu // (none) // Amplitude(s) for diagram number 14 - FFV1_0( w_fp[10], w_fp[0], w_fp[7], COUPs[1], &_fp[0] ); + FFV1_0( w_fp[10], w_fp[0], w_fp[7], COUPs[1], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( channelId == 14 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); @@ -1046,8 +1046,7 @@ namespace mg5amcCpu { // nprocesses>1 was last observed for "mirror processes" in uux_ttx in the 270 branch (see issue #343 and PRs #360 and #396) constexpr int nprocesses = 1; - static_assert( nprocesses == 1, "Assume nprocesses == 1" ); - // process_id corresponds to the index of DSIG1 Fortran functions (must be 1 because cudacpp is unable to handle DSIG2) + static_assert( nprocesses == 1 || nprocesses == 2, "Assume nprocesses == 1 or 2" ); constexpr int process_id = 1; // code generation source: madevent + cudacpp exporter static_assert( process_id == 1, "Assume process_id == 1" ); } diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxux_ttxuxux/auto_dsig1.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxux_ttxuxux/auto_dsig1.f index 68d329862c..cad7f4197d 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxux_ttxuxux/auto_dsig1.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxux_ttxuxux/auto_dsig1.f @@ -42,6 +42,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C LOCAL VARIABLES C INTEGER I,ITYPE,LP,IPROC + DOUBLE PRECISION QSCALE DOUBLE PRECISION CX1,SX1,UX1,DX1 DOUBLE PRECISION CX2,SX2,UX2,DX2 DOUBLE PRECISION XPQ(-7:7),PD(0:MAXPROC) @@ -129,25 +130,30 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) IF (ABS(LPP(IB(1))).GE.1) THEN !LP=SIGN(1,LPP(IB(1))) - CX1=PDG2PDF(LPP(IB(1)),-4, IB(1),XBK(IB(1)),DSQRT(Q2FACT(IB(1)) - $ )) - SX1=PDG2PDF(LPP(IB(1)),-3, IB(1),XBK(IB(1)),DSQRT(Q2FACT(IB(1)) - $ )) - UX1=PDG2PDF(LPP(IB(1)),-2, IB(1),XBK(IB(1)),DSQRT(Q2FACT(IB(1)) - $ )) - DX1=PDG2PDF(LPP(IB(1)),-1, IB(1),XBK(IB(1)),DSQRT(Q2FACT(IB(1)) - $ )) + IF (DSQRT(Q2FACT(IB(1))).EQ.0D0) THEN + QSCALE=0D0 + DO I=3,NEXTERNAL + QSCALE=QSCALE+DSQRT(MAX(0D0,(PP(0,I)+PP(3,I))*(PP(0,I) + $ -PP(3,I)))) + ENDDO + QSCALE=QSCALE/2D0 + ELSE + QSCALE=DSQRT(Q2FACT(IB(1))) + ENDIF + CX1=PDG2PDF(LPP(IB(1)),-4, IB(1),XBK(IB(1)), QSCALE) + SX1=PDG2PDF(LPP(IB(1)),-3, IB(1),XBK(IB(1)), QSCALE) + UX1=PDG2PDF(LPP(IB(1)),-2, IB(1),XBK(IB(1)), QSCALE) + DX1=PDG2PDF(LPP(IB(1)),-1, IB(1),XBK(IB(1)), QSCALE) ENDIF IF (ABS(LPP(IB(2))).GE.1) THEN !LP=SIGN(1,LPP(IB(2))) - CX2=PDG2PDF(LPP(IB(2)),-4, IB(2),XBK(IB(2)),DSQRT(Q2FACT(IB(2)) - $ )) - SX2=PDG2PDF(LPP(IB(2)),-3, IB(2),XBK(IB(2)),DSQRT(Q2FACT(IB(2)) - $ )) - UX2=PDG2PDF(LPP(IB(2)),-2, IB(2),XBK(IB(2)),DSQRT(Q2FACT(IB(2)) - $ )) - DX2=PDG2PDF(LPP(IB(2)),-1, IB(2),XBK(IB(2)),DSQRT(Q2FACT(IB(2)) - $ )) + IF (DSQRT(Q2FACT(IB(2))).NE.0D0) THEN + QSCALE=DSQRT(Q2FACT(IB(2))) + ENDIF + CX2=PDG2PDF(LPP(IB(2)),-4, IB(2),XBK(IB(2)), QSCALE) + SX2=PDG2PDF(LPP(IB(2)),-3, IB(2),XBK(IB(2)), QSCALE) + UX2=PDG2PDF(LPP(IB(2)),-2, IB(2),XBK(IB(2)), QSCALE) + DX2=PDG2PDF(LPP(IB(2)),-1, IB(2),XBK(IB(2)), QSCALE) ENDIF PD(0) = 0D0 IPROC = 0 diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxux_ttxuxux/matrix1.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxux_ttxuxux/matrix1.f index b71e9c09c0..7897026c9e 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxux_ttxuxux/matrix1.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxux_ttxuxux/matrix1.f @@ -544,30 +544,30 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) TMP_JAMP(3) = AMP(1) + AMP(4) ! used 3 times TMP_JAMP(2) = AMP(2) + AMP(5) ! used 3 times TMP_JAMP(1) = AMP(1) + AMP(2) ! used 3 times - TMP_JAMP(16) = TMP_JAMP(8) + TMP_JAMP(5) ! used 2 times - TMP_JAMP(15) = TMP_JAMP(9) + TMP_JAMP(5) ! used 2 times - TMP_JAMP(14) = TMP_JAMP(9) + TMP_JAMP(8) ! used 2 times - TMP_JAMP(13) = TMP_JAMP(10) + TMP_JAMP(4) ! used 2 times - TMP_JAMP(12) = TMP_JAMP(4) + TMP_JAMP(1) ! used 2 times - TMP_JAMP(11) = TMP_JAMP(10) + TMP_JAMP(1) ! used 2 times + TMP_JAMP(16) = TMP_JAMP(10) + TMP_JAMP(4) ! used 2 times + TMP_JAMP(15) = TMP_JAMP(10) + TMP_JAMP(1) ! used 2 times + TMP_JAMP(14) = TMP_JAMP(9) + TMP_JAMP(5) ! used 2 times + TMP_JAMP(13) = TMP_JAMP(9) + TMP_JAMP(8) ! used 2 times + TMP_JAMP(12) = TMP_JAMP(8) + TMP_JAMP(5) ! used 2 times + TMP_JAMP(11) = TMP_JAMP(4) + TMP_JAMP(1) ! used 2 times JAMP(1,1) = ((0.000000000000000D+00,2.500000000000000D-01)) $ *AMP(3)+(2.500000000000000D-01)*AMP(13)+(2.500000000000000D-01) - $ *TMP_JAMP(2)+(8.333333333333333D-02)*TMP_JAMP(16) + $ *TMP_JAMP(2)+(8.333333333333333D-02)*TMP_JAMP(12) JAMP(2,1) = ((0.000000000000000D+00,2.500000000000000D-01)) $ *AMP(8)+(-2.500000000000000D-01)*AMP(12)+(-2.500000000000000D - $ -01)*TMP_JAMP(6)+(-8.333333333333333D-02)*TMP_JAMP(11) + $ -01)*TMP_JAMP(6)+(-8.333333333333333D-02)*TMP_JAMP(15) JAMP(3,1) = ((0.000000000000000D+00,-2.500000000000000D-01)) $ *AMP(8)+(-2.500000000000000D-01)*AMP(11)+(-2.500000000000000D - $ -01)*TMP_JAMP(7)+(-8.333333333333333D-02)*TMP_JAMP(12) - JAMP(4,1) = (2.777777777777778D-02)*TMP_JAMP(4) + $ -01)*TMP_JAMP(7)+(-8.333333333333333D-02)*TMP_JAMP(11) + JAMP(4,1) = (2.777777777777778D-02)*TMP_JAMP(10) $ +(2.777777777777778D-02)*TMP_JAMP(11)+(8.333333333333333D-02) - $ *TMP_JAMP(14) + $ *TMP_JAMP(13) JAMP(5,1) = ((0.000000000000000D+00,-2.500000000000000D-01)) $ *AMP(3)+(2.500000000000000D-01)*AMP(14)+(2.500000000000000D-01) - $ *TMP_JAMP(3)+(8.333333333333333D-02)*TMP_JAMP(15) - JAMP(6,1) = (-2.777777777777778D-02)*TMP_JAMP(5)+( - $ -8.333333333333333D-02)*TMP_JAMP(13)+(-2.777777777777778D-02) - $ *TMP_JAMP(14) + $ *TMP_JAMP(3)+(8.333333333333333D-02)*TMP_JAMP(14) + JAMP(6,1) = (-2.777777777777778D-02)*TMP_JAMP(9)+( + $ -2.777777777777778D-02)*TMP_JAMP(12)+(-8.333333333333333D-02) + $ *TMP_JAMP(16) IF(INIT_MODE)THEN DO I=1, NGRAPHS diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/cudacpp.mk b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/cudacpp.mk index 43cee0977e..15669185ad 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/cudacpp.mk @@ -1,7 +1,7 @@ # Copyright (C) 2020-2023 CERN and UCLouvain. # Licensed under the GNU Lesser General Public License (version 3 or later). # Created by: S. Roiser (Feb 2020) for the MG5aMC CUDACPP plugin. -# Further modified by: O. Mattelaer, S. Roiser, A. Valassi (2020-2023) for the MG5aMC CUDACPP plugin. +# Further modified by: J. Teig, O. Mattelaer, S. Roiser, A. Valassi (2020-2023) for the MG5aMC CUDACPP plugin. #=== Determine the name of this makefile (https://ftp.gnu.org/old-gnu/Manuals/make-3.80/html_node/make_17.html) #=== NB: different names (e.g. cudacpp.mk and cudacpp_src.mk) are used in the Subprocess and src directories @@ -86,6 +86,14 @@ endif #------------------------------------------------------------------------------- +.DEFAULT_GOAL := usage + +# Target if user does not specify target +usage: + $(error Unknown target='$(MAKECMDGOALS)': only 'cppnone', 'cppsse4', 'cppavx2', 'cpp512y', 'cpp512z' and 'cuda' are supported!) + +#------------------------------------------------------------------------------- + #=== Configure the C++ compiler CXXFLAGS = $(OPTFLAGS) -std=c++17 $(INCFLAGS) -Wall -Wshadow -Wextra @@ -103,70 +111,73 @@ endif #------------------------------------------------------------------------------- -#=== Configure the CUDA compiler - -# If CXX is not a single word (example "clang++ --gcc-toolchain...") then disable CUDA builds (issue #505) -# This is because it is impossible to pass this to "CUFLAGS += -ccbin " below -ifneq ($(words $(subst ccache ,,$(CXX))),1) # allow at most "CXX=ccache " from outside - $(warning CUDA builds are not supported for multi-word CXX "$(CXX)") - override CUDA_HOME=disabled -endif - -# If CUDA_HOME is not set, try to set it from the location of nvcc -ifndef CUDA_HOME - CUDA_HOME = $(patsubst %bin/nvcc,%,$(shell which nvcc 2>/dev/null)) - $(warning CUDA_HOME was not set: using "$(CUDA_HOME)") -endif - -# Set NVCC as $(CUDA_HOME)/bin/nvcc if it exists -ifneq ($(wildcard $(CUDA_HOME)/bin/nvcc),) - NVCC = $(CUDA_HOME)/bin/nvcc - USE_NVTX ?=-DUSE_NVTX - # See https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html - # See https://arnon.dk/matching-sm-architectures-arch-and-gencode-for-various-nvidia-cards/ - # Default: use compute capability 70 for V100 (CERN lxbatch, CERN itscrd, Juwels Cluster). - # Embed device code for 70, and PTX for 70+. - # Export MADGRAPH_CUDA_ARCHITECTURE (comma-separated list) to use another value or list of values (see #533). - # Examples: use 60 for P100 (Piz Daint), 80 for A100 (Juwels Booster, NVidia raplab/Curiosity). - MADGRAPH_CUDA_ARCHITECTURE ?= 70 - ###CUARCHFLAGS = -gencode arch=compute_$(MADGRAPH_CUDA_ARCHITECTURE),code=compute_$(MADGRAPH_CUDA_ARCHITECTURE) -gencode arch=compute_$(MADGRAPH_CUDA_ARCHITECTURE),code=sm_$(MADGRAPH_CUDA_ARCHITECTURE) # Older implementation (AV): go back to this one for multi-GPU support #533 - ###CUARCHFLAGS = --gpu-architecture=compute_$(MADGRAPH_CUDA_ARCHITECTURE) --gpu-code=sm_$(MADGRAPH_CUDA_ARCHITECTURE),compute_$(MADGRAPH_CUDA_ARCHITECTURE) # Newer implementation (SH): cannot use this as-is for multi-GPU support #533 - comma:=, - CUARCHFLAGS = $(foreach arch,$(subst $(comma), ,$(MADGRAPH_CUDA_ARCHITECTURE)),-gencode arch=compute_$(arch),code=compute_$(arch) -gencode arch=compute_$(arch),code=sm_$(arch)) - CUINC = -I$(CUDA_HOME)/include/ - CURANDLIBFLAGS = -L$(CUDA_HOME)/lib64/ -lcurand # NB: -lcuda is not needed here! - CUOPTFLAGS = -lineinfo - CUFLAGS = $(foreach opt, $(OPTFLAGS), -Xcompiler $(opt)) $(CUOPTFLAGS) $(INCFLAGS) $(CUINC) $(USE_NVTX) $(CUARCHFLAGS) -use_fast_math - ###CUFLAGS += -Xcompiler -Wall -Xcompiler -Wextra -Xcompiler -Wshadow - ###NVCC_VERSION = $(shell $(NVCC) --version | grep 'Cuda compilation tools' | cut -d' ' -f5 | cut -d, -f1) - CUFLAGS += -std=c++17 # need CUDA >= 11.2 (see #333): this is enforced in mgOnGpuConfig.h - # Without -maxrregcount: baseline throughput: 6.5E8 (16384 32 12) up to 7.3E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 160 # improves throughput: 6.9E8 (16384 32 12) up to 7.7E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 128 # improves throughput: 7.3E8 (16384 32 12) up to 7.6E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 96 # degrades throughput: 4.1E8 (16384 32 12) up to 4.5E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 64 # degrades throughput: 1.7E8 (16384 32 12) flat at 1.7E8 (65536 128 12) -else ifneq ($(origin REQUIRE_CUDA),undefined) - # If REQUIRE_CUDA is set but no cuda is found, stop here (e.g. for CI tests on GPU #443) - $(error No cuda installation found (set CUDA_HOME or make nvcc visible in PATH)) -else - # No cuda. Switch cuda compilation off and go to common random numbers in C++ - $(warning CUDA_HOME is not set or is invalid: export CUDA_HOME to compile with cuda) - override NVCC= - override USE_NVTX= - override CUINC= - override CURANDLIBFLAGS= -endif -export NVCC -export CUFLAGS +#=== Configure the CUDA compiler for the CUDA target -# Set the host C++ compiler for nvcc via "-ccbin " -# (NB issue #505: this must be a single word, "clang++ --gcc-toolchain..." is not supported) -CUFLAGS += -ccbin $(shell which $(subst ccache ,,$(CXX))) +ifneq (,$(findstring $(MAKECMDGOALS),cuda-gcheck-runGcheck-runFGcheck-cmpFGcheck-memcheck)) + # If CXX is not a single word (example "clang++ --gcc-toolchain...") then disable CUDA builds (issue #505) + # This is because it is impossible to pass this to "CUFLAGS += -ccbin " below + ifneq ($(words $(subst ccache ,,$(CXX))),1) # allow at most "CXX=ccache " from outside + $(warning CUDA builds are not supported for multi-word CXX "$(CXX)") + override CUDA_HOME=disabled + endif -# Allow newer (unsupported) C++ compilers with older versions of CUDA if ALLOW_UNSUPPORTED_COMPILER_IN_CUDA is set (#504) -ifneq ($(origin ALLOW_UNSUPPORTED_COMPILER_IN_CUDA),undefined) -CUFLAGS += -allow-unsupported-compiler -endif + # If CUDA_HOME is not set, try to set it from the location of nvcc + ifndef CUDA_HOME + CUDA_HOME = $(patsubst %bin/nvcc,%,$(shell which nvcc 2>/dev/null)) + $(warning CUDA_HOME was not set: using "$(CUDA_HOME)") + endif + + # Set NVCC as $(CUDA_HOME)/bin/nvcc if it exists + ifneq ($(wildcard $(CUDA_HOME)/bin/nvcc),) + NVCC = $(CUDA_HOME)/bin/nvcc + USE_NVTX ?=-DUSE_NVTX + # See https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html + # See https://arnon.dk/matching-sm-architectures-arch-and-gencode-for-various-nvidia-cards/ + # Default: use compute capability 70 for V100 (CERN lxbatch, CERN itscrd, Juwels Cluster). + # Embed device code for 70, and PTX for 70+. + # Export MADGRAPH_CUDA_ARCHITECTURE (comma-separated list) to use another value or list of values (see #533). + # Examples: use 60 for P100 (Piz Daint), 80 for A100 (Juwels Booster, NVidia raplab/Curiosity). + MADGRAPH_CUDA_ARCHITECTURE ?= 70 + ###CUARCHFLAGS = -gencode arch=compute_$(MADGRAPH_CUDA_ARCHITECTURE),code=compute_$(MADGRAPH_CUDA_ARCHITECTURE) -gencode arch=compute_$(MADGRAPH_CUDA_ARCHITECTURE),code=sm_$(MADGRAPH_CUDA_ARCHITECTURE) # Older implementation (AV): go back to this one for multi-GPU support #533 + ###CUARCHFLAGS = --gpu-architecture=compute_$(MADGRAPH_CUDA_ARCHITECTURE) --gpu-code=sm_$(MADGRAPH_CUDA_ARCHITECTURE),compute_$(MADGRAPH_CUDA_ARCHITECTURE) # Newer implementation (SH): cannot use this as-is for multi-GPU support #533 + comma:=, + CUARCHFLAGS = $(foreach arch,$(subst $(comma), ,$(MADGRAPH_CUDA_ARCHITECTURE)),-gencode arch=compute_$(arch),code=compute_$(arch) -gencode arch=compute_$(arch),code=sm_$(arch)) + CUINC = -I$(CUDA_HOME)/include/ + CURANDLIBFLAGS = -L$(CUDA_HOME)/lib64/ -lcurand # NB: -lcuda is not needed here! + CUOPTFLAGS = -lineinfo + CUFLAGS = $(foreach opt, $(OPTFLAGS), -Xcompiler $(opt)) $(CUOPTFLAGS) $(INCFLAGS) $(CUINC) $(USE_NVTX) $(CUARCHFLAGS) -use_fast_math + ###CUFLAGS += -Xcompiler -Wall -Xcompiler -Wextra -Xcompiler -Wshadow + ###NVCC_VERSION = $(shell $(NVCC) --version | grep 'Cuda compilation tools' | cut -d' ' -f5 | cut -d, -f1) + CUFLAGS += -std=c++17 # need CUDA >= 11.2 (see #333): this is enforced in mgOnGpuConfig.h + # Without -maxrregcount: baseline throughput: 6.5E8 (16384 32 12) up to 7.3E8 (65536 128 12) + ###CUFLAGS+= --maxrregcount 160 # improves throughput: 6.9E8 (16384 32 12) up to 7.7E8 (65536 128 12) + ###CUFLAGS+= --maxrregcount 128 # improves throughput: 7.3E8 (16384 32 12) up to 7.6E8 (65536 128 12) + ###CUFLAGS+= --maxrregcount 96 # degrades throughput: 4.1E8 (16384 32 12) up to 4.5E8 (65536 128 12) + ###CUFLAGS+= --maxrregcount 64 # degrades throughput: 1.7E8 (16384 32 12) flat at 1.7E8 (65536 128 12) + else ifneq ($(origin REQUIRE_CUDA),undefined) + # If REQUIRE_CUDA is set but no cuda is found, stop here (e.g. for CI tests on GPU #443) + $(error No cuda installation found (set CUDA_HOME or make nvcc visible in PATH)) + else + # No cuda. Switch cuda compilation off and go to common random numbers in C++ + $(warning CUDA_HOME is not set or is invalid: export CUDA_HOME to compile with cuda) + override NVCC= + override USE_NVTX= + override CUINC= + override CURANDLIBFLAGS= + endif + export NVCC + export CUFLAGS + + # Set the host C++ compiler for nvcc via "-ccbin " + # (NB issue #505: this must be a single word, "clang++ --gcc-toolchain..." is not supported) + CUFLAGS += -ccbin $(shell which $(subst ccache ,,$(CXX))) + + # Allow newer (unsupported) C++ compilers with older versions of CUDA if ALLOW_UNSUPPORTED_COMPILER_IN_CUDA is set (#504) + ifneq ($(origin ALLOW_UNSUPPORTED_COMPILER_IN_CUDA),undefined) + CUFLAGS += -allow-unsupported-compiler + endif + +endif # ($(MAKECMDGOALS),cuda) #------------------------------------------------------------------------------- @@ -226,32 +237,6 @@ override OMPFLAGS = -fopenmp ###override OMPFLAGS = # disable OpenMP MT (default before #575) endif -# Set the default AVX (vectorization) choice -ifeq ($(AVX),) - ifeq ($(UNAME_P),ppc64le) - ###override AVX = none - override AVX = sse4 - else ifeq ($(UNAME_P),arm) - ###override AVX = none - override AVX = sse4 - else ifeq ($(wildcard /proc/cpuinfo),) - override AVX = none - $(warning Using AVX='$(AVX)' because host SIMD features cannot be read from /proc/cpuinfo) - else ifeq ($(shell grep -m1 -c avx512vl /proc/cpuinfo)$(shell $(CXX) --version | grep ^clang),1) - override AVX = 512y - ###$(info Using AVX='$(AVX)' as no user input exists) - else - override AVX = avx2 - ifneq ($(shell grep -m1 -c avx512vl /proc/cpuinfo),1) - $(warning Using AVX='$(AVX)' because host does not support avx512vl) - else - $(warning Using AVX='$(AVX)' because this is faster than avx512vl for clang) - endif - endif -else - ###$(info Using AVX='$(AVX)' according to user input) -endif - # Set the default FPTYPE (floating point type) choice ifeq ($(FPTYPE),) override FPTYPE = d @@ -276,6 +261,21 @@ ifeq ($(RNDGEN),) endif endif +# set the correct AVX based on avxcpp target +ifeq ($(MAKECMDGOALS),cppnone) # no SIMD + override AVX = none +else ifeq ($(MAKECMDGOALS),cppsse4) # SSE4.2 with 128 width (xmm registers) + override AVX = sse4 +else ifeq ($(MAKECMDGOALS),cppavx2) # AVX2 with 256 width (ymm registers) [DEFAULT for clang] + override AVX = avx2 +else ifeq ($(MAKECMDGOALS),cpp512y) # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] + override AVX = 512y +else ifeq ($(MAKECMDGOALS),cpp512z) # AVX512 with 512 width (zmm registers) + override AVX = 512z +else + override AVX = none +endif + # Export AVX, FPTYPE, HELINL, HRDCOD, RNDGEN, OMPFLAGS so that it is not necessary to pass them to the src Makefile too export AVX export FPTYPE @@ -295,50 +295,52 @@ CXXFLAGS += $(OMPFLAGS) # Set the build flags appropriate to each AVX choice (example: "make AVX=none") # [NB MGONGPU_PVW512 is needed because "-mprefer-vector-width=256" is not exposed in a macro] # [See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96476] -$(info AVX=$(AVX)) -ifeq ($(UNAME_P),ppc64le) - ifeq ($(AVX),sse4) - override AVXFLAGS = -D__SSE4_2__ # Power9 VSX with 128 width (VSR registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on PowerPC for the moment) - endif -else ifeq ($(UNAME_P),arm) - ifeq ($(AVX),sse4) - override AVXFLAGS = -D__SSE4_2__ # ARM NEON with 128 width (Q/quadword registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on ARM for the moment) - endif -else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 - ifeq ($(AVX),none) - override AVXFLAGS = -mno-sse3 # no SIMD - else ifeq ($(AVX),sse4) - override AVXFLAGS = -mno-avx # SSE4.2 with 128 width (xmm registers) - else ifeq ($(AVX),avx2) - override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(AVX),512y) - override AVXFLAGS = -march=skylake -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(AVX),512z) - override AVXFLAGS = -march=skylake -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) - else - $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) - endif -else - ifeq ($(AVX),none) - override AVXFLAGS = -march=x86-64 # no SIMD (see #588) - else ifeq ($(AVX),sse4) - override AVXFLAGS = -march=nehalem # SSE4.2 with 128 width (xmm registers) - else ifeq ($(AVX),avx2) - override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(AVX),512y) - override AVXFLAGS = -march=skylake-avx512 -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(AVX),512z) - override AVXFLAGS = -march=skylake-avx512 -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) +ifeq ($(findstring cpp,$(MAKECMDGOALS)),cpp) + $(info AVX=$(AVX)) + ifeq ($(UNAME_P),ppc64le) + ifeq ($(AVX),sse4) + override AVXFLAGS = -D__SSE4_2__ # Power9 VSX with 128 width (VSR registers) + else ifneq ($(AVX),none) + $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on PowerPC for the moment) + endif + else ifeq ($(UNAME_P),arm) + ifeq ($(AVX),sse4) + override AVXFLAGS = -D__SSE4_2__ # ARM NEON with 128 width (Q/quadword registers) + else ifneq ($(AVX),none) + $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on ARM for the moment) + endif + else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 + ifeq ($(AVX),none) + override AVXFLAGS = -mno-sse3 # no SIMD + else ifeq ($(AVX),sse4) + override AVXFLAGS = -mno-avx # SSE4.2 with 128 width (xmm registers) + else ifeq ($(AVX),avx2) + override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] + else ifeq ($(AVX),512y) + override AVXFLAGS = -march=skylake -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] + else ifeq ($(AVX),512z) + override AVXFLAGS = -march=skylake -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) + else + $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) + endif else - $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) + ifeq ($(AVX),none) + override AVXFLAGS = -march=x86-64 # no SIMD (see #588) + else ifeq ($(AVX),sse4) + override AVXFLAGS = -march=nehalem # SSE4.2 with 128 width (xmm registers) + else ifeq ($(AVX),avx2) + override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] + else ifeq ($(AVX),512y) + override AVXFLAGS = -march=skylake-avx512 -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] + else ifeq ($(AVX),512z) + override AVXFLAGS = -march=skylake-avx512 -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) + else + $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) + endif endif + # For the moment, use AVXFLAGS everywhere: eventually, use them only in encapsulated implementations? + CXXFLAGS+= $(AVXFLAGS) endif -# For the moment, use AVXFLAGS everywhere: eventually, use them only in encapsulated implementations? -CXXFLAGS+= $(AVXFLAGS) # Set the build flags appropriate to each FPTYPE choice (example: "make FPTYPE=f") $(info FPTYPE=$(FPTYPE)) @@ -389,11 +391,19 @@ endif # Build directory "short" tag (defines target and path to the optional build directory) # (Rationale: keep directory names shorter, e.g. do not include random number generator choice) -override DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) +ifneq ($(NVCC),) + override DIRTAG = cuda_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) +else + override DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) +endif # Build lockfile "full" tag (defines full specification of build options that cannot be intermixed) # (Rationale: avoid mixing of CUDA and no-CUDA environment builds with different random number generators) -override TAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) +ifneq ($(NVCC),) + override TAG = cuda_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) +else + override TAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) +endif # Build directory: current directory by default, or build.$(DIRTAG) if USEBUILDDIR==1 ifeq ($(USEBUILDDIR),1) @@ -448,9 +458,9 @@ endif testmain=$(BUILDDIR)/runTest.exe ifneq ($(GTESTLIBS),) -all.$(TAG): $(BUILDDIR)/.build.$(TAG) $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_main) $(cxx_main) $(fcu_main) $(fcxx_main) $(testmain) +all.$(TAG): $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_main) $(cxx_main) $(fcu_main) $(fcxx_main) $(testmain) else -all.$(TAG): $(BUILDDIR)/.build.$(TAG) $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_main) $(cxx_main) $(fcu_main) $(fcxx_main) +all.$(TAG): $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_main) $(cxx_main) $(fcu_main) $(fcxx_main) endif # Target (and build options): debug @@ -460,27 +470,20 @@ debug: CUOPTFLAGS = -G debug: MAKEDEBUG := debug debug: all.$(TAG) -# Target: tag-specific build lockfiles -override oldtagsb=`if [ -d $(BUILDDIR) ]; then find $(BUILDDIR) -maxdepth 1 -name '.build.*' ! -name '.build.$(TAG)' -exec echo $(shell pwd)/{} \; ; fi` -$(BUILDDIR)/.build.$(TAG): - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - @if [ "$(oldtagsb)" != "" ]; then echo "Cannot build for tag=$(TAG) as old builds exist for other tags:"; echo " $(oldtagsb)"; echo "Please run 'make clean' first\nIf 'make clean' is not enough: run 'make clean USEBUILDDIR=1 AVX=$(AVX) FPTYPE=$(FPTYPE)' or 'make cleanall'"; exit 1; fi - @touch $(BUILDDIR)/.build.$(TAG) - # Generic target and build rules: objects from CUDA compilation ifneq ($(NVCC),) -$(BUILDDIR)/%.o : %.cu *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) +$(BUILDDIR)/%.o : %.cu *.h ../../src/*.h @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c $< -o $@ -$(BUILDDIR)/%_cu.o : %.cc *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) +$(BUILDDIR)/%_cu.o : %.cc *.h ../../src/*.h @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c -x cu $< -o $@ endif # Generic target and build rules: objects from C++ compilation # (NB do not include CUINC here! add it only for NVTX or curand #679) -$(BUILDDIR)/%.o : %.cc *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) +$(BUILDDIR)/%.o : %.cc *.h ../../src/*.h @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi $(CXX) $(CPPFLAGS) $(CXXFLAGS) -fPIC -c $< -o $@ @@ -532,7 +535,7 @@ endif # Target (and build rules): common (src) library commonlib : $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so -$(LIBDIR)/lib$(MG5AMC_COMMONLIB).so: ../../src/*.h ../../src/*.cc $(BUILDDIR)/.build.$(TAG) +$(LIBDIR)/lib$(MG5AMC_COMMONLIB).so: ../../src/*.h ../../src/*.cc $(MAKE) -C ../../src $(MAKEDEBUG) -f $(CUDACPP_SRC_MAKEFILE) #------------------------------------------------------------------------------- @@ -711,35 +714,27 @@ endif # Target: build all targets in all AVX modes (each AVX mode in a separate build directory) # Split the avxall target into five separate targets to allow parallel 'make -j avxall' builds # (Hack: add a fbridge.inc dependency to avxall, to ensure it is only copied once for all AVX modes) -avxnone: - @echo - $(MAKE) USEBUILDDIR=1 AVX=none -f $(CUDACPP_MAKEFILE) +cppnone: $(cxx_main) -avxsse4: - @echo - $(MAKE) USEBUILDDIR=1 AVX=sse4 -f $(CUDACPP_MAKEFILE) +cppsse4: $(cxx_main) -avxavx2: - @echo - $(MAKE) USEBUILDDIR=1 AVX=avx2 -f $(CUDACPP_MAKEFILE) +cppavx2: $(cxx_main) -avx512y: - @echo - $(MAKE) USEBUILDDIR=1 AVX=512y -f $(CUDACPP_MAKEFILE) +cpp512y: $(cxx_main) -avx512z: - @echo - $(MAKE) USEBUILDDIR=1 AVX=512z -f $(CUDACPP_MAKEFILE) +cpp512z: $(cxx_main) + +cuda: $(cu_main) ifeq ($(UNAME_P),ppc64le) ###avxall: $(INCDIR)/fbridge.inc avxnone avxsse4 -avxall: avxnone avxsse4 +cppall: cppnone cppsse4 else ifeq ($(UNAME_P),arm) ###avxall: $(INCDIR)/fbridge.inc avxnone avxsse4 -avxall: avxnone avxsse4 +cppall: cppnone cppsse4 else ###avxall: $(INCDIR)/fbridge.inc avxnone avxsse4 avxavx2 avx512y avx512z -avxall: avxnone avxsse4 avxavx2 avx512y avx512z +cppall: cppnone cppsse4 cppavx2 cpp512y cpp512z endif #------------------------------------------------------------------------------- @@ -747,21 +742,31 @@ endif # Target: clean the builds .PHONY: clean +BUILD_DIRS := $(wildcard build.*) +NUM_BUILD_DIRS := $(words $(BUILD_DIRS)) + clean: ifeq ($(USEBUILDDIR),1) - rm -rf $(BUILDDIR) +ifeq ($(NUM_BUILD_DIRS),1) + $(info USEBUILDDIR=1, Only one build directory found.) + rm -rf $(BUILD_DIRS) +else ifeq ($(NUM_BUILD_DIRS),0) + $(error USEBUILDDIR=1, but no build directories are found.) else - rm -f $(BUILDDIR)/.build.* $(BUILDDIR)/*.o $(BUILDDIR)/*.exe + $(error Multiple BUILDDIR's found! Use 'cleannone', 'cleansse4', 'cleanavx2', 'clean512y','clean512z', 'cleancuda' or 'cleanall'.) +endif +else + rm -f $(BUILDDIR)/*.o $(BUILDDIR)/*.exe rm -f $(LIBDIR)/lib$(MG5AMC_CXXLIB).so $(LIBDIR)/lib$(MG5AMC_CULIB).so endif $(MAKE) -C ../../src clean -f $(CUDACPP_SRC_MAKEFILE) -### rm -rf $(INCDIR) cleanall: @echo - $(MAKE) USEBUILDDIR=0 clean -f $(CUDACPP_MAKEFILE) + rm -f $(BUILDDIR)/*.o $(BUILDDIR)/*.exe + rm -f $(LIBDIR)/lib$(MG5AMC_CXXLIB).so $(LIBDIR)/lib$(MG5AMC_CULIB).so @echo - $(MAKE) USEBUILDDIR=0 -C ../../src cleanall -f $(CUDACPP_SRC_MAKEFILE) + $(MAKE) -C ../../src cleanall -f $(CUDACPP_SRC_MAKEFILE) rm -rf build.* # Target: clean the builds as well as the gtest installation(s) @@ -771,6 +776,42 @@ ifneq ($(wildcard $(TESTDIRCOMMON)),) endif $(MAKE) -C $(TESTDIRLOCAL) clean +# Target: clean different builds +cleannone: + rm -rf build.none_* + rm -f ../../lib/build.none_*/lib$(MG5AMC_CXXLIB).so + $(MAKE) -C ../../src cleannone -f $(CUDACPP_SRC_MAKEFILE) + +cleansse4: + rm -rf build.sse4_* + rm -f ../../lib/build.sse4_*/lib$(MG5AMC_CXXLIB).so + $(MAKE) -C ../../src cleansse4 -f $(CUDACPP_SRC_MAKEFILE) + +cleanavx2: + rm -rf build.avx2_* + rm -f ../../lib/build.avx2_*/lib$(MG5AMC_CXXLIB).so + $(MAKE) -C ../../src cleanavx2 -f $(CUDACPP_SRC_MAKEFILE) + +clean512y: + rm -rf build.512y_* + rm -f ../../lib/build.512y_*/lib$(MG5AMC_CXXLIB).so + $(MAKE) -C ../../src clean512y -f $(CUDACPP_SRC_MAKEFILE) + +clean512z: + rm -rf build.512z_* + rm -f ../../lib/build.512z_*/lib$(MG5AMC_CXXLIB).so + $(MAKE) -C ../../src clean512z -f $(CUDACPP_SRC_MAKEFILE) + +cleancuda: + rm -rf build.cuda_* + rm -f ../../lib/build.cuda_*/lib$(MG5AMC_CULIB).so + $(MAKE) -C ../../src cleancuda -f $(CUDACPP_SRC_MAKEFILE) + +cleandir: + rm -f ./*.o ./*.exe + rm -f ../../lib/lib$(MG5AMC_CXXLIB).so ../../lib/lib$(MG5AMC_CULIB).so + $(MAKE) -C ../../src cleandir -f $(CUDACPP_SRC_MAKEFILE) + #------------------------------------------------------------------------------- # Target: show system and compiler information @@ -817,13 +858,10 @@ endif #------------------------------------------------------------------------------- -# Target: check (run the C++ test executable) +# Target: check/gcheck (run the C++ test executable) # [NB THIS IS WHAT IS USED IN THE GITHUB CI!] -ifneq ($(NVCC),) -check: runTest cmpFcheck cmpFGcheck -else check: runTest cmpFcheck -endif +gcheck: runTest cmpFGcheck # Target: runTest (run the C++ test executable runTest.exe) runTest: all.$(TAG) @@ -863,4 +901,4 @@ cmpFGcheck: all.$(TAG) memcheck: all.$(TAG) $(RUNTIME) $(CUDA_HOME)/bin/cuda-memcheck --check-api-memory-access yes --check-deprecated-instr yes --check-device-heap yes --demangle full --language c --leak-check full --racecheck-report all --report-api-errors all --show-backtrace yes --tool memcheck --track-unused-memory yes $(BUILDDIR)/gcheck.exe -p 2 32 2 -#------------------------------------------------------------------------------- +#------------------------------------------------------------------------------- \ No newline at end of file diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/dummy_fct.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/dummy_fct.f index 076cf29d67..4f7a204b8f 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/dummy_fct.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/dummy_fct.f @@ -32,7 +32,7 @@ logical FUNCTION dummy_cuts(P) LOGICAL IS_A_NU(NEXTERNAL),IS_HEAVY(NEXTERNAL) logical do_cuts(nexternal) COMMON /TO_SPECISA/IS_A_J,IS_A_A,IS_A_L,IS_A_B,IS_A_NU,IS_HEAVY, - . IS_A_ONIUM, do_cuts + & IS_A_ONIUM, do_cuts dummy_cuts=.true. @@ -118,15 +118,16 @@ double precision function user_dynamical_scale(P) C ************************************************************ -C default for the library implementing a dummt bias function +C default for the library implementing a dummy bias function C ************************************************************ subroutine bias_wgt_custom(p, original_weight, bias_weight) - implicit none + implicit none C C Parameters C include 'nexternal.inc' -C + +C C Arguments C double precision p(0:3, nexternal) @@ -161,3 +162,4 @@ subroutine bias_wgt_custom(p, original_weight, bias_weight) return end subroutine bias_wgt_custom + diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/makefile b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/makefile index 74db44d848..093bc84271 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/makefile +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/makefile @@ -9,6 +9,33 @@ FFLAGS+= -cpp # Compile counters with -O3 as in the cudacpp makefile (avoid being "unfair" to Fortran #740) CXXFLAGS = -O3 -Wall -Wshadow -Wextra +# Sets correct target based on MAKECMDGOALS +ifeq ($(MAKECMDGOALS),) + TARGET := undefined +else + ifeq ($(shell grep -q madevent_ <<< $(MAKECMDGOALS)a),) + TARGET := $(word 2,($(subst _, ,$(MAKECMDGOALS)))) + else + TARGET := $(MAKECMDGOALS) + endif +endif + +# Sets correct cppavx target as dependency when compiling Fortran +ifeq ($(shell grep -q cpp <<< $(MAKECMDGOALS)a),) + ifeq ($(TARGET),cpp) + CPPTARGET := cppavx2 + else + CPPTARGET := $(TARGET) + endif +endif + +# Default goal +.DEFAULT_GOAL := usage + +# Target if user does not specify target +usage: + $(error Unknown target='$(TARGET)': only 'cppnone', 'cppsse4', 'cppavx2', 'cpp512y', 'cpp512z' and 'cuda' are supported!) + # Enable ccache if USECCACHE=1 ifeq ($(USECCACHE)$(shell echo $(CXX) | grep ccache),1) override CXX:=ccache $(CXX) @@ -48,10 +75,10 @@ CUDACPP_MAKEFILE=cudacpp.mk # NB2 Use '|&' in CUDACPP_BUILDDIR to avoid confusing errors about googletest #507 # NB3 Do not add a comment inlined "CUDACPP_BUILDDIR=$(shell ...) # comment" as otherwise a trailing space is included... # NB4 The variables relevant to the cudacpp Makefile must be explicitly passed to $(shell...) -CUDACPP_MAKEENV:=$(shell echo '$(.VARIABLES)' | tr " " "\n" | egrep "(USEBUILDDIR|AVX|FPTYPE|HELINL|HRDCOD)") +CUDACPP_MAKEENV:=$(shell echo '$(.VARIABLES)' | tr " " "\n" | egrep "(USEBUILDDIR|FPTYPE|HELINL|HRDCOD)") ###$(info CUDACPP_MAKEENV=$(CUDACPP_MAKEENV)) ###$(info $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))")) -CUDACPP_BUILDDIR:=$(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn |& awk '/Building/{print $$3}' | sed s/BUILDDIR=//) +CUDACPP_BUILDDIR:=$(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn $(TARGET) 2>/dev/null | awk '/Building/{print $$3}' | sed s/BUILDDIR=//) ifeq ($(CUDACPP_BUILDDIR),) $(error CUDACPP_BUILDDIR='$(CUDACPP_BUILDDIR)' should not be empty!) else @@ -89,7 +116,7 @@ SYMMETRY = symmetry.o idenparts.o # Binaries -LDFLAGS+=-Wl,--no-relax # avoid 'failed to convert GOTPCREL relocation' error #458 +#LDFLAGS+=-Wl,--no-relax # avoid 'failed to convert GOTPCREL relocation' error #458 (flag not universal -> skip?) all: $(PROG)_fortran $(CUDACPP_BUILDDIR)/$(PROG)_cpp # also builds $(PROG)_cuda if $(CUDACPP_CULIB) exists (#503) @@ -115,10 +142,6 @@ $(LIBS): .libs cd ../../Source; make touch $@ -$(CUDACPP_BUILDDIR)/.cudacpplibs: - $(MAKE) -f $(CUDACPP_MAKEFILE) - touch $@ - # On Linux, set rpath to LIBDIR to make it unnecessary to use LD_LIBRARY_PATH # Use relative paths with respect to the executables ($ORIGIN on Linux) # On Darwin, building libraries with absolute paths in LIBDIR makes this unnecessary @@ -130,26 +153,47 @@ else override LIBFLAGSRPATH = -Wl,-rpath,'$$ORIGIN/$(LIBDIR)' endif -.PHONY: madevent_fortran_link madevent_cuda_link madevent_cpp_link +.PHONY: madevent_fortran_link madevent_cuda_link madevent_cpp_link madevent_cppnone_link madevent_cppsse4_link madevent_cppavx2_link madevent_cpp512y_link madevent_cpp512z_link madevent_fortran_link: $(PROG)_fortran rm -f $(PROG) ln -s $(PROG)_fortran $(PROG) +# Only used for testing, should be removed in the future madevent_cpp_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp rm -f $(PROG) ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) +madevent_cppnone_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp + rm -f $(PROG) + ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) + +madevent_cppsse4_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp + rm -f $(PROG) + ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) + +madevent_cppavx2_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp + rm -f $(PROG) + ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) + +madevent_cpp512y_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp + rm -f $(PROG) + ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) + +madevent_cpp512z_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp + rm -f $(PROG) + ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) + madevent_cuda_link: $(CUDACPP_BUILDDIR)/$(PROG)_cuda rm -f $(PROG) ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cuda $(PROG) # Building $(PROG)_cpp also builds $(PROG)_cuda if $(CUDACPP_CULIB) exists (improved patch for cpp-only builds #503) -$(CUDACPP_BUILDDIR)/$(PROG)_cpp: $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(LIBS) $(MATRIX) counters.o ompnumthreads.o $(CUDACPP_BUILDDIR)/.cudacpplibs +$(CUDACPP_BUILDDIR)/$(PROG)_cpp: $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(LIBS) $(MATRIX) counters.o ompnumthreads.o $(CPPTARGET) $(FC) -o $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o -L$(LIBDIR)/$(CUDACPP_BUILDDIR) -l$(CUDACPP_COMMONLIB) -l$(CUDACPP_CXXLIB) $(LIBFLAGSRPATH) $(LDFLAGS) - if [ -f $(LIBDIR)/$(CUDACPP_BUILDDIR)/lib$(CUDACPP_CULIB).* ]; then $(FC) -o $(CUDACPP_BUILDDIR)/$(PROG)_cuda $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o -L$(LIBDIR)/$(CUDACPP_BUILDDIR) -l$(CUDACPP_COMMONLIB) -l$(CUDACPP_CULIB) $(LIBFLAGSRPATH) $(LDFLAGS); fi -$(CUDACPP_BUILDDIR)/$(PROG)_cuda: $(CUDACPP_BUILDDIR)/$(PROG)_cpp +$(CUDACPP_BUILDDIR)/$(PROG)_cuda: $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(LIBS) $(MATRIX) counters.o ompnumthreads.o cuda + $(FC) -o $(CUDACPP_BUILDDIR)/$(PROG)_cuda $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o -L$(LIBDIR)/$(CUDACPP_BUILDDIR) -l$(CUDACPP_COMMONLIB) -l$(CUDACPP_CULIB) $(LIBFLAGSRPATH) $(LDFLAGS) counters.o: counters.cc timer.h $(CXX) $(CXXFLAGS) -c $< -o $@ @@ -215,49 +259,105 @@ genps.o: .libs UNAME_P := $(shell uname -p) ifeq ($(UNAME_P),ppc64le) -avxall: avxnone avxsse4 +cppall: + $(MAKE) USEBUILDDIR=1 cppnone + $(MAKE) USEBUILDDIR=1 cppsse4 else ifeq ($(UNAME_P),arm) -avxall: avxnone avxsse4 +cppall: + $(MAKE) USEBUILDDIR=1 cppnone + $(MAKE) USEBUILDDIR=1 cppsse4 else -avxall: avxnone avxsse4 avxavx2 avx512y avx512z +cppall: + $(MAKE) USEBUILDDIR=1 cppnone + $(MAKE) USEBUILDDIR=1 cppsse4 + $(MAKE) USEBUILDDIR=1 cppavx2 + $(MAKE) USEBUILDDIR=1 cpp512y + $(MAKE) USEBUILDDIR=1 cpp512z endif -avxnone: $(PROG)_fortran $(DSIG_cudacpp) - @echo - $(MAKE) USEBUILDDIR=1 AVX=none +ALL: + $(MAKE) USEBUILDDIR=1 cppnone + $(MAKE) USEBUILDDIR=1 cppsse4 + $(MAKE) USEBUILDDIR=1 cppavx2 + $(MAKE) USEBUILDDIR=1 cpp512y + $(MAKE) USEBUILDDIR=1 cpp512z + $(MAKE) USEBUILDDIR=1 cuda -avxsse4: $(PROG)_fortran $(DSIG_cudacpp) - @echo - $(MAKE) USEBUILDDIR=1 AVX=sse4 +cppnone: + $(MAKE) -f $(CUDACPP_MAKEFILE) cppnone -avxavx2: $(PROG)_fortran $(DSIG_cudacpp) - @echo - $(MAKE) USEBUILDDIR=1 AVX=avx2 +cppsse4: + $(MAKE) -f $(CUDACPP_MAKEFILE) cppsse4 -avx512y: $(PROG)_fortran $(DSIG_cudacpp) - @echo - $(MAKE) USEBUILDDIR=1 AVX=512y +cppavx2: + $(MAKE) -f $(CUDACPP_MAKEFILE) cppavx2 -avx512z: $(PROG)_fortran $(DSIG_cudacpp) - @echo - $(MAKE) USEBUILDDIR=1 AVX=512z +cpp512y: + $(MAKE) -f $(CUDACPP_MAKEFILE) cpp512y -###endif +cpp512z: + $(MAKE) -f $(CUDACPP_MAKEFILE) cpp512z + +cuda: + $(MAKE) -f $(CUDACPP_MAKEFILE) cuda # Clean (NB: 'make clean' in Source calls 'make clean' in all P*) -clean: # Clean builds: fortran in this Pn; cudacpp executables for one AVX in this Pn - $(RM) *.o gensym $(PROG) $(PROG)_fortran $(PROG)_forhel $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(CUDACPP_BUILDDIR)/$(PROG)_cuda +BUILD_DIRS := $(wildcard build.*) +BUILD_TARGET_DIR := $(shell echo $(BUILD_DIRS) | awk -F '[._]' '{print $$2}') +NUM_BUILD_DIRS := $(words $(BUILD_DIRS)) + +clean: +ifeq ($(USEBUILDDIR),1) +ifeq ($(NUM_BUILD_DIRS),1) + $(info USEBUILDDIR=1, only cleaning build dir.) + $(RM) -r $(BUILD_DIRS) + $(MAKE) -f $(CUDACPP_MAKEFILE) clean$(BUILD_TARGET_DIR) +else ifeq ($(NUM_BUILD_DIRS),0) + $(error USEBUILDDIR=1, but no build directories are found.) +else + $(error Multiple BUILDDIR's found! Use 'cleannone', 'cleansse4', 'cleanavx2', 'clean512y','clean512z', 'cleancuda' or 'cleanall'.) +endif +else + $(info USEBUILDDIR=0 only cleaning build with no dir.) + $(RM) *.o gensym $(PROG) $(PROG)_fortran $(PROG)_forhel ./$(PROG)_* + $(MAKE) -f $(CUDACPP_MAKEFILE) cleandir + $(RM) $(CUDACPP_BUILDDIR)/.*libs +endif + +cleannone: # Clean builds: fortran in this Pn; cpp executables for one AVX in this Pn + $(RM) *.o gensym $(PROG) $(PROG)_fortran $(PROG)_forhel build.none_*/$(PROG)_cpp + $(MAKE) -f $(CUDACPP_MAKEFILE) cleannone + +cleansse4: # Clean build: fortran in this Pn; cpp executables for cppsse4 in this Pn + $(RM) *.o gensym $(PROG) $(PROG)_fortran $(PROG)_forhel build.sse4_*/$(PROG)_cpp + $(MAKE) -f $(CUDACPP_MAKEFILE) cleansse4 + +cleanavx2: # Clean build: fortran in this Pn; cpp executables for cppavx2 in this Pn + $(RM) *.o gensym $(PROG) $(PROG)_fortran $(PROG)_forhel build.avx2_*/$(PROG)_cpp + $(MAKE) -f $(CUDACPP_MAKEFILE) cleanavx2 + +clean512y: # Clean build: fortran in this Pn; cpp executables for cpp512y in this Pn + $(RM) *.o gensym $(PROG) $(PROG)_fortran $(PROG)_forhel build.512y_*/$(PROG)_cpp + $(MAKE) -f $(CUDACPP_MAKEFILE) clean512y + +clean512z: # Clean build: fortran in this Pn; cpp executables for cpp512z in this Pn + $(RM) *.o gensym $(PROG) $(PROG)_fortran $(PROG)_forhel build.512z_*/$(PROG)_cpp + $(MAKE) -f $(CUDACPP_MAKEFILE) clean512z + +cleancuda: # Clean build: fortran in this Pn; cuda executables in this Pn + $(RM) *.o gensym $(PROG) $(PROG)_fortran $(PROG)_forhel build.cuda_*/$(PROG)_cuda + $(MAKE) -f $(CUDACPP_MAKEFILE) cleancuda cleanavxs: clean # Clean builds: fortran in this Pn; cudacpp for all AVX in this Pn and in src $(MAKE) -f $(CUDACPP_MAKEFILE) cleanall - rm -f $(CUDACPP_BUILDDIR)/.cudacpplibs - rm -f .libs + $(RM) $(CUDACPP_BUILDDIR)/.*libs + $(RM) .libs cleanall: # Clean builds: fortran in all P* and in Source; cudacpp for all AVX in all P* and in src make -C ../../Source cleanall - rm -rf $(LIBDIR)libbias.$(libext) - rm -f ../../Source/*.mod ../../Source/*/*.mod + $(RM) -r $(LIBDIR)libbias.$(libext) + $(RM) ../../Source/*.mod ../../Source/*/*.mod distclean: cleanall # Clean all fortran and cudacpp builds as well as the googletest installation $(MAKE) -f $(CUDACPP_MAKEFILE) distclean diff --git a/epochX/cudacpp/pp_tt012j.mad/bin/generate_events b/epochX/cudacpp/pp_tt012j.mad/bin/generate_events index 107313b25d..5577cc66a0 100755 --- a/epochX/cudacpp/pp_tt012j.mad/bin/generate_events +++ b/epochX/cudacpp/pp_tt012j.mad/bin/generate_events @@ -46,7 +46,7 @@ if __debug__ and (not os.path.exists(pjoin(root_path,'../..', 'bin','create_rele sys.path.append(pjoin(root_path,'bin','internal')) import madevent_interface as ME - +import misc as misc import logging import logging.config @@ -160,17 +160,31 @@ if '__main__' == __name__: # Check that python version is valid set_configuration() - argument = sys.argv + argument = sys.argv + + # check for plugin customization of the launch command + launch_interface = ME.MadEventCmdShell + if os.path.exists(pjoin(root_path, 'bin','internal', 'launch_plugin.py')): + with misc.TMP_variable(sys, 'path', sys.path + [pjoin(root_path, 'bin', 'internal')]): + from importlib import reload + try: + reload('launch_plugin') + except Exception as error: + import launch_plugin + launch_interface = launch_plugin.MEINTERFACE + + + try: if '-h' in argument or '--help' in argument: - launch = ME.MadEventCmdShell(me_dir=root_path, force_run=True) + launch = launch_interface(me_dir=root_path, force_run=True) launch.exec_cmd('help generate_events') sys.exit() elif len(argument) > 1 and argument[1] in ['0', '1', '2']: argument = treat_old_argument(argument) with ME.MadEventCmdShell.RunWebHandling(root_path, ): - launch = ME.MadEventCmdShell(me_dir=root_path, force_run=True) + launch = launch_interface(me_dir=root_path, force_run=True) launch.run_cmd('generate_events %s' % ' '.join(argument[1:])) launch.run_cmd('quit') except ME.MadEventAlreadyRunning as message: diff --git a/epochX/cudacpp/pp_tt012j.mad/bin/internal/banner.py b/epochX/cudacpp/pp_tt012j.mad/bin/internal/banner.py index 7624b9f557..824815f47b 100755 --- a/epochX/cudacpp/pp_tt012j.mad/bin/internal/banner.py +++ b/epochX/cudacpp/pp_tt012j.mad/bin/internal/banner.py @@ -537,7 +537,7 @@ def charge_card(self, tag): self.param_card = param_card_reader.ParamCard(param_card) return self.param_card elif tag == 'mgruncard': - self.run_card = RunCard(self[tag]) + self.run_card = RunCard(self[tag], unknown_warning=False) return self.run_card elif tag == 'mg5proccard': proc_card = self[tag].split('\n') @@ -1002,13 +1002,14 @@ def __init__(self, finput=None, **opt): self.allowed_value = {} self.default_setup() + self.plugin_input(finput) # if input is define read that input if isinstance(finput, (file, str, StringIO.StringIO)): self.read(finput, **opt) - self.plugin_input(finput) + def plugin_input(self, finput=None): @@ -2624,6 +2625,7 @@ class RunCard(ConfigFile): default_include_file = 'run_card.inc' default_autodef_file = 'run.inc' donewarning = [] + include_as_parameter = [] def plugin_input(self, finput): @@ -2670,18 +2672,40 @@ def __new__(cls, finput=None, **opt): elif isinstance(finput, cls): target_class = finput.__class__ elif isinstance(finput, str): + path = finput if '\n' not in finput: finput = open(finput).read() if 'req_acc_FO' in finput: target_class = RunCardNLO else: target_class = RunCardLO + if MADEVENT and os.path.exists(pjoin(MEDIR, 'bin','internal', 'launch_plugin.py')): + with misc.TMP_variable(sys, 'path', sys.path + [pjoin(MEDIR, 'bin', 'internal')]): + from importlib import reload + try: + reload('launch_plugin') + except Exception as error: + import launch_plugin + target_class = launch_plugin.RunCard + elif not MADEVENT and os.path.exists(path.replace('run_card.dat', '../bin/internal/launch_plugin.py')): + misc.sprint('try to use plugin class') + pydir = path.replace('run_card.dat', '../bin/internal/') + with misc.TMP_variable(sys, 'path', sys.path + [pydir]): + from importlib import reload + try: + reload('launch_plugin') + except Exception as error: + import launch_plugin + target_class = launch_plugin.RunCard + else: return None target_class.fill_post_set_from_blocks() - - return super(RunCard, cls).__new__(target_class, finput, **opt) + out = super(RunCard, cls).__new__(target_class, finput, **opt) + if not isinstance(out, RunCard): #should not happen but in presence of missmatch of library loaded. + out.__init__(finput, **opt) + return out else: return super(RunCard, cls).__new__(cls, finput, **opt) @@ -2709,7 +2733,7 @@ def __init__(self, *args, **opts): self.system_default = {} self.display_block = [] # set some block to be displayed - + self.fct_mod = {} # {param: (fct_pointer, *argument, **opts)} self.cut_class = {} self.warned=False @@ -2746,7 +2770,7 @@ def get_lepton_densities(cls): def add_param(self, name, value, fortran_name=None, include=True, hidden=False, legacy=False, cut=False, system=False, sys_default=None, - autodef=False, + autodef=False, fct_mod=None, **opts): """ add a parameter to the card. value is the default value and defines the type (int/float/bool/str) of the input. @@ -2760,6 +2784,7 @@ def add_param(self, name, value, fortran_name=None, include=True, If a path (Source/PDF/pdf.inc) the definition will be added within that file Default is False (does not add the definition) entry added in the run_card will automatically have this on True. + fct_mod: defines a function to run if the parameter is modify in the include file options of **opts: - allowed: list of valid options. '*' means anything else should be allowed. empty list means anything possible as well. @@ -2784,8 +2809,12 @@ def add_param(self, name, value, fortran_name=None, include=True, if autodef: self.definition_path[autodef].append(name) self.user_set.add(name) + # function to trigger if a value is modified in the include file + # main target is action to force correct recompilation (like for compilation flag/...) + if fct_mod: + self.fct_mod[name] = fct_mod - def read(self, finput, consistency=True): + def read(self, finput, consistency=True, unknown_warning=True): """Read the input file, this can be a path to a file, a file object, a str with the content of the file.""" @@ -2793,6 +2822,7 @@ def read(self, finput, consistency=True): if "\n" in finput: finput = finput.split('\n') elif os.path.isfile(finput): + self.path = finput finput = open(finput) else: raise Exception("No such file %s" % finput) @@ -2807,7 +2837,7 @@ def read(self, finput, consistency=True): name = name.lower().strip() if name not in self: #looks like an entry added by a user -> add it nicely - self.add_unknown_entry(name, value) + self.add_unknown_entry(name, value, unknown_warning) else: self.set( name, value, user=True) # parameter not set in the run_card can be set to compatiblity value @@ -2819,7 +2849,7 @@ def read(self, finput, consistency=True): logger.warning(str(error)) else: raise - def add_unknown_entry(self, name, value): + def add_unknown_entry(self, name, value, unknow_warning): """function to add an entry to the run_card when the associated parameter does not exists. This is based on the guess_entry_fromname for the various syntax providing input. This then call add_param accordingly. @@ -2858,7 +2888,7 @@ def add_unknown_entry(self, name, value): raise Exception("dictionary need to have at least one entry") default['dict']['__type__'] = default[self.guess_type_from_value(default_value[0])] - if name not in RunCard.donewarning: + if name not in RunCard.donewarning and unknow_warning: logger.warning("Found unexpected entry in run_card: \"%s\" with value \"%s\".\n"+\ " The type was assigned to %s. \n"+\ " The definition of that variable will %sbe automatically added to fortran file %s\n"+\ @@ -2896,7 +2926,16 @@ def valid_line(self, line, tmp): return False else: return True - + + + def reset_simd(self, old_value, new_value, name, *args, **opts): + raise Exception('pass in reset simd') + + def make_clean(self,old_value, new_value, name, dir): + raise Exception('pass make clean for ', dir) + + def make_Ptouch(self,old_value, new_value, name, reset): + raise Exception('pass Ptouch for ', reset) def write(self, output_file, template=None, python_template=False, write_hidden=False, template_options=None, **opt): @@ -3071,6 +3110,77 @@ def write(self, output_file, template=None, python_template=False, else: output_file.write(text) + def get_last_value_include(self, output_dir): + """For paraeter in self.fct_mod + parse the associate inc file to get the value of the previous run. + We return a dictionary {name: old_value} + if inc file does not exist we will return the current value (i.e. set has no change) + """ + + #remember that + # default_include_file is a class variable + # self.includepath is on the form include_path : [list of param ] + out = {} + + # setup inc_to_parse to be like self.includepath (include_path : [list of param ]) + # BUT only containing the parameter that need to be tracked for the fct_mod option + inc_to_parse = {} + for inc_file, params in self.includepath.items(): + if not inc_file: + continue + if any(p in params for p in self.fct_mod): + inc_to_parse[inc_file] = [name for name in self.includepath[inc_file] if name in self.fct_mod] + + # now loop over the files and ask the associate function + for inc_file, params in inc_to_parse.items(): + if inc_file is True: + inc_file = self.default_include_file + out.update(self.get_value_from_include(inc_file, params, output_dir)) + + return out + + def get_value_from_include(self, path, list_of_params, output_dir): + """for a given include file return the current value of the requested parameter + return a dictionary {name: value} + if path does not exists return the current value in self for all parameter""" + + #WARNING DOES NOT HANDLE LIST/DICT so far + + # handle case where file is missing + if not os.path.exists(pjoin(output_dir,path)): + misc.sprint("include file not existing", pjoin(output_dir,path)) + out = {name: self[name] for name in list_of_params} + + with open(pjoin(output_dir,path), 'r') as fsock: + text = fsock.read() + + for name in list_of_params: + misc.sprint(name, name in self.fortran_name) + misc.sprint(self.fortran_name[name] if name in self.fortran_name[name] else name) + to_track = [self.fortran_name[name] if name in self.fortran_name else name for name in list_of_params] + pattern = re.compile(r"\(?(%(names)s)\s?=\s?([^)]*)\)?" % {'names':'|'.join(to_track)}, re.I) + out = dict(pattern.findall(text)) + misc.sprint(out) + for name in list_of_params: + if name in self.fortran_name: + value = out[self.fortran_name[name]] + del out[self.fortran_name[name]] + out[name] = value + + for name, value in out.items(): + try: + out[name] = self.format_variable(value, type(self[name])) + except Exception: + continue + + if len(out) != len(list_of_params): + misc.sprint(list_of_params) + misc.sprint(to_track) + misc.sprint(self.fortran_name) + misc.sprint(text) + raise Exception + return out + def get_default(self, name, default=None, log_level=None): """return self[name] if exist otherwise default. log control if we @@ -3361,71 +3471,93 @@ def write_include_file(self, output_dir, output_file=None): #ensusre that system only parameter are correctly set self.update_system_parameter_for_include() + value_in_old_include = self.get_last_value_include(output_dir) + + if output_dir: self.write_autodef(output_dir, output_file=None) # check/fix status of customised functions self.edit_dummy_fct_from_file(self["custom_fcts"], os.path.dirname(output_dir)) for incname in self.includepath: - if incname is True: - pathinc = self.default_include_file - elif incname is False: - continue - else: - pathinc = incname + self.write_one_include_file(output_dir, incname, output_file) + + for name,value in value_in_old_include.items(): + if value != self[name]: + self.fct_mod[name][0](value, self[name], name, *self.fct_mod[name][1],**self.fct_mod[name][2]) - if output_file: - fsock = output_file + def write_one_include_file(self, output_dir, incname, output_file=None): + """write one include file at the time""" + + misc.sprint(incname) + if incname is True: + pathinc = self.default_include_file + elif incname is False: + return + else: + pathinc = incname + + if output_file: + fsock = output_file + else: + fsock = file_writers.FortranWriter(pjoin(output_dir,pathinc+'.tmp')) + + + for key in self.includepath[incname]: + #define the fortran name + if key in self.fortran_name: + fortran_name = self.fortran_name[key] else: - fsock = file_writers.FortranWriter(pjoin(output_dir,pathinc+'.tmp')) - for key in self.includepath[incname]: - #define the fortran name - if key in self.fortran_name: - fortran_name = self.fortran_name[key] + fortran_name = key + + if incname in self.include_as_parameter: + fsock.writelines('INTEGER %s\n' % fortran_name) + #get the value with warning if the user didn't set it + value = self.get_default(key) + if hasattr(self, 'mod_inc_%s' % key): + value = getattr(self, 'mod_inc_%s' % key)(value) + # Special treatment for strings containing a list of + # strings. Convert it to a list of strings + if isinstance(value, list): + # in case of a list, add the length of the list as 0th + # element in fortran. Only in case of integer or float + # list (not for bool nor string) + targettype = self.list_parameter[key] + if targettype is bool: + pass + elif targettype is int: + line = '%s(%s) = %s \n' % (fortran_name, 0, self.f77_formatting(len(value))) + fsock.writelines(line) + elif targettype is float: + line = '%s(%s) = %s \n' % (fortran_name, 0, self.f77_formatting(float(len(value)))) + fsock.writelines(line) + # output the rest of the list in fortran + for i,v in enumerate(value): + line = '%s(%s) = %s \n' % (fortran_name, i+1, self.f77_formatting(v)) + fsock.writelines(line) + elif isinstance(value, dict): + for fortran_name, onevalue in value.items(): + line = '%s = %s \n' % (fortran_name, self.f77_formatting(onevalue)) + fsock.writelines(line) + elif isinstance(incname,str) and 'compile' in incname: + if incname in self.include_as_parameter: + line = 'PARAMETER (%s=%s)' %( fortran_name, value) else: - fortran_name = key - - #get the value with warning if the user didn't set it - value = self.get_default(key) - if hasattr(self, 'mod_inc_%s' % key): - value = getattr(self, 'mod_inc_%s' % key)(value) - # Special treatment for strings containing a list of - # strings. Convert it to a list of strings - if isinstance(value, list): - # in case of a list, add the length of the list as 0th - # element in fortran. Only in case of integer or float - # list (not for bool nor string) - targettype = self.list_parameter[key] - if targettype is bool: - pass - elif targettype is int: - line = '%s(%s) = %s \n' % (fortran_name, 0, self.f77_formatting(len(value))) - fsock.writelines(line) - elif targettype is float: - line = '%s(%s) = %s \n' % (fortran_name, 0, self.f77_formatting(float(len(value)))) - fsock.writelines(line) - # output the rest of the list in fortran - for i,v in enumerate(value): - line = '%s(%s) = %s \n' % (fortran_name, i+1, self.f77_formatting(v)) - fsock.writelines(line) - elif isinstance(value, dict): - for fortran_name, onevalue in value.items(): - line = '%s = %s \n' % (fortran_name, self.f77_formatting(onevalue)) - fsock.writelines(line) - elif isinstance(incname,str) and 'compile' in incname: line = '%s = %s \n' % (fortran_name, value) - fsock.write(line) + fsock.write(line) + else: + if incname in self.include_as_parameter: + line = 'PARAMETER (%s=%s)' %( fortran_name, self.f77_formatting(value)) else: line = '%s = %s \n' % (fortran_name, self.f77_formatting(value)) - fsock.writelines(line) - if not output_file: - fsock.close() - path = pjoin(output_dir,pathinc) - if not os.path.exists(path) or not filecmp.cmp(path, path+'.tmp'): - files.mv(path+'.tmp', path) - else: - os.remove(path+'.tmp') - + fsock.writelines(line) + if not output_file: + fsock.close() + path = pjoin(output_dir,pathinc) + if not os.path.exists(path) or not filecmp.cmp(path, path+'.tmp'): + files.mv(path+'.tmp', path) + else: + os.remove(path+'.tmp') def write_autodef(self, output_dir, output_file=None): """ Add the definition of variable to run.inc if the variable is set with autodef. @@ -3764,13 +3896,14 @@ def remove_all_cut(self): %(tmin_for_channel)s = tmin_for_channel ! limit the non-singular reach of --some-- channel of integration related to T-channel diagram (value between -1 and 0), -1 is no impact %(survey_splitting)s = survey_splitting ! for loop-induced control how many core are used at survey for the computation of a single iteration. %(survey_nchannel_per_job)s = survey_nchannel_per_job ! control how many Channel are integrated inside a single job on cluster/multicore - %(refine_evt_by_job)s = refine_evt_by_job ! control the maximal number of events for the first iteration of the refine (larger means less jobs) + %(refine_evt_by_job)s = refine_evt_by_job ! control the maximal number of events for the first iteration of the refine (larger means less jobs) #********************************************************************* -# Compilation flag. No automatic re-compilation (need manual "make clean" in Source) +# Compilation flag. #********************************************************************* %(global_flag)s = global_flag ! fortran optimization flag use for the all code. %(aloha_flag)s = aloha_flag ! fortran optimization flag for aloha function. Suggestions: '-ffast-math' %(matrix_flag)s = matrix_flag ! fortran optimization flag for matrix.f function. Suggestions: '-O3' + %(vector_size)s = vector_size ! size designed for SIMD/OpenMP/GPU (number of events in lockstep) """ template_off = '# To see advanced option for Phase-Space optimization: type "update psoptim"' @@ -3926,9 +4059,12 @@ class RunCardLO(RunCard): "get_dummy_x1_x2": pjoin("SubProcesses","dummy_fct.f"), "dummy_boostframe": pjoin("SubProcesses","dummy_fct.f"), "user_dynamical_scale": pjoin("SubProcesses","dummy_fct.f"), + "bias_wgt_custom": pjoin("SubProcesses","dummy_fct.f"), "user_": pjoin("SubProcesses","dummy_fct.f") # all function starting by user will be added to that file } + include_as_parameter = ['vector.inc'] + if MG5DIR: default_run_card = pjoin(MG5DIR, "internal", "default_run_card_lo.dat") @@ -4162,10 +4298,15 @@ def default_setup(self): self.add_param('hel_splitamp', True, hidden=True, include=False, comment='decide if amplitude aloha call can be splitted in two or not when doing helicity per helicity optimization.') self.add_param('hel_zeroamp', True, hidden=True, include=False, comment='decide if zero amplitude can be removed from the computation when doing helicity per helicity optimization.') self.add_param('SDE_strategy', 1, allowed=[1,2], fortran_name="sde_strat", comment="decide how Multi-channel should behaves \"1\" means full single diagram enhanced (hep-ph/0208156), \"2\" use the product of the denominator") - self.add_param('global_flag', '-O', include=False, hidden=True, comment='global fortran compilation flag, suggestion -fbound-check') - self.add_param('aloha_flag', '', include=False, hidden=True, comment='global fortran compilation flag, suggestion: -ffast-math') - self.add_param('matrix_flag', '', include=False, hidden=True, comment='fortran compilation flag for the matrix-element files, suggestion -O3') - + self.add_param('global_flag', '-O', include=False, hidden=True, comment='global fortran compilation flag, suggestion -fbound-check', + fct_mod=(self.make_clean, ('Source'),{})) + self.add_param('aloha_flag', '', include=False, hidden=True, comment='global fortran compilation flag, suggestion: -ffast-math', + fct_mod=(self.make_clean, ('Source/DHELAS'),{})) + self.add_param('matrix_flag', '', include=False, hidden=True, comment='fortran compilation flag for the matrix-element files, suggestion -O3', + fct_mod=(self.make_Ptouch, ('matrix'),{})) + self.add_param('vector_size', 1, include='vector.inc', hidden=True, comment='lockstep size for parralelism run', + fortran_name='VECSIZE_MEMMAX', fct_mod=(self.reset_simd,(),{})) + # parameter allowing to define simple cut via the pdg # Special syntax are related to those. (can not be edit directly) self.add_param('pt_min_pdg',{'__type__':0.}, include=False, cut=True) @@ -4187,8 +4328,7 @@ def default_setup(self): self.add_param('mxxmin4pdg',[-1.], system=True) self.add_param('mxxpart_antipart', [False], system=True) - # CUDACPP parameters - self.add_param('cudacpp_backend', 'CPP', include=False, hidden=False) + def check_validity(self): """ """ diff --git a/epochX/cudacpp/pp_tt012j.mad/bin/internal/check_param_card.py b/epochX/cudacpp/pp_tt012j.mad/bin/internal/check_param_card.py index fe874a06a4..71089d7480 100755 --- a/epochX/cudacpp/pp_tt012j.mad/bin/internal/check_param_card.py +++ b/epochX/cudacpp/pp_tt012j.mad/bin/internal/check_param_card.py @@ -85,7 +85,7 @@ def load_str(self, text): self.value= ' '.join(data[len(self.lhacode):]) # check that lhacode are the first entry otherwise return invalid param. if ' '.join([str(i) for i in self.lhacode]) != ' '.join(data[:len(self.lhacode)]): - raise InvalidParam + raise InvalidParam("line was %s" % str(data)) else: self.value = data[-1] diff --git a/epochX/cudacpp/pp_tt012j.mad/bin/internal/common_run_interface.py b/epochX/cudacpp/pp_tt012j.mad/bin/internal/common_run_interface.py index 5d0187e3fa..14c7f310dc 100755 --- a/epochX/cudacpp/pp_tt012j.mad/bin/internal/common_run_interface.py +++ b/epochX/cudacpp/pp_tt012j.mad/bin/internal/common_run_interface.py @@ -749,13 +749,15 @@ def writeRunWeb(me_dir): class RunWebHandling(object): - def __init__(self, me_dir, crashifpresent=True, warnifpresent=True): + def __init__(self, me_dir, crashifpresent=True, warnifpresent=True, force_run=False): """raise error if RunWeb already exists me_dir is the directory where the write RunWeb""" self.remove_run_web = True self.me_dir = me_dir - + if force_run: + self.remove_run_web = False + return if crashifpresent or warnifpresent: if os.path.exists(pjoin(me_dir, 'RunWeb')): pid = open(pjoin(me_dir, 'RunWeb')).read() @@ -6574,7 +6576,7 @@ def reask(self, *args, **opt): fail_due_to_format = 0 #parameter to avoid infinite loop def postcmd(self, stop, line): - if line not in [None, '0', 'done', '']: + if line not in [None, '0', 'done', '',0]: ending_question = cmd.OneLinePathCompletion.postcmd(self,stop,line) else: ending_question = True @@ -7533,7 +7535,8 @@ def open_file(self, answer): else: raise if time.time() - start < .5: - self.mother_interface.ask("Are you really that fast? If you are using an editor that returns directly. Please confirm that you have finised to edit the file", 'y') + self.mother_interface.ask("Are you really that fast? If you are using an editor that returns directly. Please confirm that you have finised to edit the file", 'y', + timeout=False) self.reload_card(path) def reload_card(self, path): diff --git a/epochX/cudacpp/pp_tt012j.mad/bin/internal/extended_cmd.py b/epochX/cudacpp/pp_tt012j.mad/bin/internal/extended_cmd.py index a6a8609dce..2f37070580 100755 --- a/epochX/cudacpp/pp_tt012j.mad/bin/internal/extended_cmd.py +++ b/epochX/cudacpp/pp_tt012j.mad/bin/internal/extended_cmd.py @@ -1108,9 +1108,12 @@ def ask(self, question, default, choices=[], path_msg=None, if alias: choices += list(alias.keys()) + + question_instance = obj(question, allow_arg=choices, default=default, mother_interface=self, **opt) - + if fct_timeout is None: + fct_timeout = lambda x: question_instance.postcmd(x, default) if x and default else False if first_cmd: if isinstance(first_cmd, str): question_instance.onecmd(first_cmd) @@ -2271,6 +2274,9 @@ def postcmd(self, stop, line): if n: self.default(line) return self.postcmd(stop, line) + elif self.value is None and line: + self.default(line) + return self.postcmd(stop, line) if not self.casesensitive: for ans in self.allow_arg: if ans.lower() == self.value.lower(): diff --git a/epochX/cudacpp/pp_tt012j.mad/bin/internal/gen_ximprove.py b/epochX/cudacpp/pp_tt012j.mad/bin/internal/gen_ximprove.py index 3b8ec31215..a88d60b282 100755 --- a/epochX/cudacpp/pp_tt012j.mad/bin/internal/gen_ximprove.py +++ b/epochX/cudacpp/pp_tt012j.mad/bin/internal/gen_ximprove.py @@ -154,10 +154,15 @@ def get_helicity(self, to_submit=True, clean=True): p = misc.Popen(['./gensym'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT, cwd=Pdir) #sym_input = "%(points)d %(iterations)d %(accuracy)f \n" % self.opts + (stdout, _) = p.communicate(''.encode()) stdout = stdout.decode('ascii',errors='ignore') - nb_channel = max([math.floor(float(d)) for d in stdout.split()]) - + try: + nb_channel = max([math.floor(float(d)) for d in stdout.split()]) + except Exception as error: + misc.sprint(stdout, 'no channel or error for %s' % Pdir) + continue + self.cmd.compile(['madevent_forhel'], cwd=Pdir) if not os.path.exists(pjoin(Pdir, 'madevent_forhel')): raise Exception('Error make madevent_forhel not successful') diff --git a/epochX/cudacpp/pp_tt012j.mad/bin/internal/launch_plugin.py b/epochX/cudacpp/pp_tt012j.mad/bin/internal/launch_plugin.py new file mode 100644 index 0000000000..23271b846e --- /dev/null +++ b/epochX/cudacpp/pp_tt012j.mad/bin/internal/launch_plugin.py @@ -0,0 +1,100 @@ + +import logging +import os +import subprocess +pjoin = os.path.join +logger = logging.getLogger('cmdprint') # for stdout + +try: + import madgraph +except ImportError: + import internal.madevent_interface as madevent_interface + import internal.misc as misc + import internal.extended_cmd as extended_cmd + import internal.banner as banner_mod +else: + import madgraph.interface.madevent_interface as madevent_interface + import madgraph.various.misc as misc + import madgraph.interface.extended_cmd as extended_cmd + import madgraph.various.banner as banner_mod + +class CPPMEInterface(madevent_interface.MadEventCmdShell): + + def compile(self, *args, **opts): + """ """ + + import multiprocessing + if not self.options['nb_core'] or self.options['nb_core'] == 'None': + self.options['nb_core'] = multiprocessing.cpu_count() + + if args and args[0][0] == 'madevent' and hasattr(self, 'run_card'): + import pathlib + import os + pjoin = os.path.join + + + + + cudacpp_backend = self.run_card['cudacpp_backend'].upper() # the default value is defined in banner.py + logger.info("Building madevent in madevent_interface.py with '%s' matrix elements"%cudacpp_backend) + if cudacpp_backend == 'FORTRAN': + args[0][0] = 'madevent_fortran_link' + elif cudacpp_backend == 'CPP': + args[0][0] = 'madevent_cpp_link' + elif cudacpp_backend == 'CUDA': + args[0][0] = 'madevent_cuda_link' + else: + raise Exception("Invalid cudacpp_backend='%s': only 'FORTRAN', 'CPP', 'CUDA' are supported") + return misc.compile(nb_core=self.options['nb_core'], *args, **opts) + else: + return misc.compile(nb_core=self.options['nb_core'], *args, **opts) + +class CPPRunCard(banner_mod.RunCardLO): + + def reset_simd(self, old_value, new_value, name): + if not hasattr(self, 'path'): + raise Exception + + if name == "vector_size" and new_value <= int(old_value): + # code can handle the new size -> do not recompile + return + + Sourcedir = pjoin(os.path.dirname(os.path.dirname(self.path)), 'Source') + subprocess.call(['make', 'cleanavx'], cwd=Sourcedir, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) + + def plugin_input(self, finput): + return + + def default_setup(self): + super().default_setup() + self.add_param('cudacpp_backend', 'CPP', include=False, hidden=False) + + + def write_one_include_file(self, output_dir, incname, output_file=None): + """write one include file at the time""" + + if incname == "vector.inc" and 'vector_size' not in self.user_set: + return + super().write_one_include_file(output_dir, incname, output_file) + + + def check_validity(self): + """ensure that PLUGIN information are consistent""" + + super().check_validity() + + if self['SDE_strategy'] != 1: + logger.warning('SDE_strategy different of 1 is not supported with SMD/GPU mode') + self['sde_strategy'] = 1 + + if self['hel_recycling']: + self['hel_recycling'] = False + +class GPURunCard(CPPRunCard): + + def default_setup(self): + super(CPPRunCard, self).default_setup() + self.add_param('cudacpp_backend', 'CUDA', include=False, hidden=False) + +MEINTERFACE = CPPMEInterface +RunCard = CPPRunCard diff --git a/epochX/cudacpp/pp_tt012j.mad/bin/internal/madevent_interface.py b/epochX/cudacpp/pp_tt012j.mad/bin/internal/madevent_interface.py index 920e07a926..d722702891 100755 --- a/epochX/cudacpp/pp_tt012j.mad/bin/internal/madevent_interface.py +++ b/epochX/cudacpp/pp_tt012j.mad/bin/internal/madevent_interface.py @@ -3796,9 +3796,11 @@ def do_combine_events(self, line): if self.run_card['bias_module'].lower() not in ['dummy', 'none'] and nb_event: self.correct_bias() - + elif self.run_card['custom_fcts']: + self.correct_bias() + logger.info("combine events done in %s", time.time()-start) - + self.to_store.append('event') diff --git a/epochX/cudacpp/pp_tt012j.mad/bin/internal/run_plot b/epochX/cudacpp/pp_tt012j.mad/bin/internal/run_plot new file mode 100755 index 0000000000..7deee7ac88 --- /dev/null +++ b/epochX/cudacpp/pp_tt012j.mad/bin/internal/run_plot @@ -0,0 +1,47 @@ +#!/bin/bash +# +# This runs MadAnalysis on the unweighted_events.lhe +# +# Usage: run_plot run_name [madir [tddir]] +# where madir is the path to the MadAnalysis package + +main=`pwd` + +if [ "$1" != "" ] +then + run=$1 +else + echo "Usage: run_plot runname [MAdir [tddir]]" + exit +fi + +if [ "$2" != "" ] +then + MAdir=$main/$2 +else + MAdir=$main/../../MadAnalysis +fi + +if [ "$3" != "" ]; then + td=$main/$3 +else + td=$main/../../td +fi + +dirbin=$main/../bin + +if [[ $run != "" && -e ${run}_unweighted_events.lhe.gz ]];then + gunzip -c ${run}_unweighted_events.lhe.gz > unweighted_events.lhe +fi + +if [[ (-x $MAdir/plot_events) && (-e unweighted_events.lhe) && (-e ../Cards/plot_card.dat) ]]; then + echo "Creating Plots" + mkdir $run + cd $run + echo "../unweighted_events.lhe" > events.list + $dirbin/plot $MAdir $td > plot.log + cd .. + $dirbin/plot_page-pl $run parton + mv plots.html ${run}_plots.html +fi + diff --git a/epochX/cudacpp/pp_tt012j.mad/bin/internal/run_plot_delphes b/epochX/cudacpp/pp_tt012j.mad/bin/internal/run_plot_delphes new file mode 100755 index 0000000000..975f410d0e --- /dev/null +++ b/epochX/cudacpp/pp_tt012j.mad/bin/internal/run_plot_delphes @@ -0,0 +1,46 @@ +#!/bin/bash +# +# This runs MadAnalysis on the delphes_events.lhco +# +# Usage: run_plot run_name [madir [tddir]] +# where madir is the path to the MadAnalysis package + +main=`pwd` + +if [ "$1" != "" ] +then + run=$1 +else + echo "Usage: run_plot runname [MAdir [tddir]]" + exit +fi + +if [ "$2" != "" ] +then + MAdir=$main/$2 +else + MAdir=$main/../../MadAnalysis +fi + +if [ "$3" != "" ]; then + td=$main/$3 +else + td=$main/../../td +fi + +dirbin=$main/../bin + +if [[ $run != "" && -e ${run}_delphes_events.lhco.gz ]];then + gunzip -c ${run}_delphes_events.lhco.gz > delphes_events.lhco +fi + +if [[ (-x $MAdir/plot_events) && (-e delphes_events.lhco) && (-e ../Cards/plot_card.dat) ]]; then + echo "Creating Plots" + mkdir ${run}_delphes + cd ${run}_delphes + echo "../delphes_events.lhco" > events.list + $dirbin/plot $MAdir $td > plot.log + cd .. + $dirbin/plot_page-pl ${run}_delphes Delphes + mv plots.html ${run}_plots_delphes.html +fi diff --git a/epochX/cudacpp/pp_tt012j.mad/bin/internal/run_plot_pgs b/epochX/cudacpp/pp_tt012j.mad/bin/internal/run_plot_pgs new file mode 100755 index 0000000000..e7a36ef344 --- /dev/null +++ b/epochX/cudacpp/pp_tt012j.mad/bin/internal/run_plot_pgs @@ -0,0 +1,47 @@ +#!/bin/bash +# +# This runs MadAnalysis on the unweighted_events.lhe +# +# Usage: run_plot run_name [madir [tddir]] +# where madir is the path to the MadAnalysis package + +main=`pwd` + +if [ "$1" != "" ] +then + run=$1 +else + echo "Usage: run_plot runname [MAdir [tddir]]" + exit +fi + +if [ "$2" != "" ] +then + MAdir=$main/$2 +else + MAdir=$main/../../MadAnalysis +fi + +if [ "$3" != "" ]; then + td=$main/$3 +else + td=$main/../../td +fi + +dirbin=$main/../bin + +if [[ $run != "" && -e ${run}_pgs_events.lhco.gz ]];then + gunzip -c ${run}_pgs_events.lhco.gz > pgs_events.lhco +fi + +if [[ (-x $MAdir/plot_events) && (-e pgs_events.lhco) && (-e ../Cards/plot_card.dat) ]]; then + echo "Creating Plots" + mkdir ${run}_pgs + cd ${run}_pgs + echo "../pgs_events.lhco" > events.list + $dirbin/plot $MAdir $td > plot.log + cd .. + $dirbin/plot_page-pl ${run}_pgs PGS + mv plots.html ${run}_plots_pgs.html +fi + diff --git a/epochX/cudacpp/pp_tt012j.mad/bin/internal/run_plot_pythia b/epochX/cudacpp/pp_tt012j.mad/bin/internal/run_plot_pythia new file mode 100755 index 0000000000..532bfb4b7b --- /dev/null +++ b/epochX/cudacpp/pp_tt012j.mad/bin/internal/run_plot_pythia @@ -0,0 +1,50 @@ +#!/bin/bash +# +# This runs MadAnalysis on the unweighted_events.lhe +# +# Usage: run_plot run_name [madir [tddir]] +# where madir is the path to the MadAnalysis package + +main=`pwd` + +if [ "$1" != "" ] +then + run=$1 +else + echo "Usage: run_plot runname [MAdir [tddir]]" + exit +fi + +if [ "$2" != "" ] +then + MAdir=$main/$2 +else + MAdir=$main/../../MadAnalysis +fi + +if [ "$3" != "" ]; then + td=$main/$3 +else + td=$main/../../td +fi + +dirbin=$main/../bin/internal + +if [[ $run != "" && -e ${run}_pythia_events.lhe.gz ]];then + gunzip -c ${run}_pythia_events.lhe.gz > pythia_events.lhe +fi + +if [[ (-x $MAdir/plot_events) && (-e pythia_events.lhe) && (-e ../Cards/plot_card.dat) ]]; then + echo "Creating Plots" + mkdir ${run}_pythia + cd ${run}_pythia + echo "../pythia_events.lhe" > events.list + $dirbin/plot $MAdir $td > plot.log + cd .. + $dirbin/plot_page-pl ${run}_pythia Pythia + mv plots.html ${run}_plots_pythia.html + $dirbin/gen_crossxhtml-pl $run +else + echo "Not creating plots" +fi + diff --git a/epochX/cudacpp/pp_tt012j.mad/bin/madevent b/epochX/cudacpp/pp_tt012j.mad/bin/madevent index c944aa1faf..dff9711b73 100755 --- a/epochX/cudacpp/pp_tt012j.mad/bin/madevent +++ b/epochX/cudacpp/pp_tt012j.mad/bin/madevent @@ -32,6 +32,7 @@ except ImportError: import os +pjoin = os.path.join import optparse # Get the directory of the script real path (bin) @@ -160,13 +161,30 @@ except: pass import internal.madevent_interface as cmd_interface +# check for plugin customization of the launch command +launch_interface = cmd_interface.MadEventCmdShell +if os.path.exists(pjoin(root_path, 'bin','internal', 'launch_plugin.py')): + with misc.TMP_variable(sys, 'path', sys.path + [pjoin(root_path, 'bin', 'internal')]): + from importlib import reload + try: + reload('launch_plugin') + except Exception as error: + import launch_plugin + launch_interface = launch_plugin.MEINTERFACE + + +#Source use this executable for compilation always allow it +force_run = False +if (args and args[0] == 'treatcards'): + force_run=True + # Call the cmd interface main loop try: if '-h' in args or '--help' in args: - launch = ME.MadEventCmdShell(me_dir=os.path.dirname(root_path), force_run=True) + launch = launch_interface(me_dir=os.path.dirname(root_path), force_run=True) launch.exec_cmd('help generate_events') sys.exit(0) - with cmd_interface.MadEventCmdShell.RunWebHandling(os.path.dirname(root_path), ): + with cmd_interface.MadEventCmdShell.RunWebHandling(os.path.dirname(root_path), force_run=force_run): if (args and os.path.isfile(args[0])): # They are an input file input_file = args[0] @@ -178,7 +196,7 @@ try: cmd_line.run_cmd('import command ' + input_file) cmd_line.run_cmd('quit') else: - cmd_line = cmd_interface.MadEventCmdShell(force_run=True) + cmd_line = launch_interface(force_run=True) cmd_line.use_rawinput = False cmd_line.haspiping = False cmd_line.run_cmd('import command ' + input_file) @@ -188,7 +206,7 @@ try: if options.web: cmd_line = cmd_interface.MadEventCmd(force_run=True) else: - cmd_line = cmd_interface.MadEventCmdShell(force_run=True) + cmd_line = launch_interface(force_run=True) if not hasattr(cmd_line, 'do_%s' % args[0]): if parser_error: print( parser_error) diff --git a/epochX/cudacpp/pp_tt012j.mad/src/HelAmps_sm.h b/epochX/cudacpp/pp_tt012j.mad/src/HelAmps_sm.h index 9cea8bcbe7..9b946c21e1 100644 --- a/epochX/cudacpp/pp_tt012j.mad/src/HelAmps_sm.h +++ b/epochX/cudacpp/pp_tt012j.mad/src/HelAmps_sm.h @@ -863,6 +863,7 @@ namespace mg5amcCpu const fptype allV2[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, fptype allvertexes[] ) ALWAYS_INLINE; //-------------------------------------------------------------------------- @@ -873,6 +874,7 @@ namespace mg5amcCpu VVV1P0_1( const fptype allV2[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, const fptype M1, const fptype W1, fptype allV1[] ) ALWAYS_INLINE; @@ -886,6 +888,7 @@ namespace mg5amcCpu const fptype allF2[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, fptype allvertexes[] ) ALWAYS_INLINE; //-------------------------------------------------------------------------- @@ -896,6 +899,7 @@ namespace mg5amcCpu FFV1_1( const fptype allF2[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, const fptype M1, const fptype W1, fptype allF1[] ) ALWAYS_INLINE; @@ -908,6 +912,7 @@ namespace mg5amcCpu FFV1_2( const fptype allF1[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, const fptype M2, const fptype W2, fptype allF2[] ) ALWAYS_INLINE; @@ -920,6 +925,7 @@ namespace mg5amcCpu FFV1P0_3( const fptype allF1[], const fptype allF2[], const fptype allCOUP[], + const double Ccoeff, const fptype M3, const fptype W3, fptype allV3[] ) ALWAYS_INLINE; @@ -934,6 +940,7 @@ namespace mg5amcCpu const fptype allV3[], const fptype allV4[], const fptype allCOUP[], + const double Ccoeff, fptype allvertexes[] ) ALWAYS_INLINE; //-------------------------------------------------------------------------- @@ -945,6 +952,7 @@ namespace mg5amcCpu const fptype allV3[], const fptype allV4[], const fptype allCOUP[], + const double Ccoeff, const fptype M1, const fptype W1, fptype allV1[] ) ALWAYS_INLINE; @@ -959,6 +967,7 @@ namespace mg5amcCpu const fptype allV3[], const fptype allV4[], const fptype allCOUP[], + const double Ccoeff, fptype allvertexes[] ) ALWAYS_INLINE; //-------------------------------------------------------------------------- @@ -970,6 +979,7 @@ namespace mg5amcCpu const fptype allV3[], const fptype allV4[], const fptype allCOUP[], + const double Ccoeff, const fptype M1, const fptype W1, fptype allV1[] ) ALWAYS_INLINE; @@ -984,6 +994,7 @@ namespace mg5amcCpu const fptype allV3[], const fptype allV4[], const fptype allCOUP[], + const double Ccoeff, fptype allvertexes[] ) ALWAYS_INLINE; //-------------------------------------------------------------------------- @@ -995,6 +1006,7 @@ namespace mg5amcCpu const fptype allV3[], const fptype allV4[], const fptype allCOUP[], + const double Ccoeff, const fptype M1, const fptype W1, fptype allV1[] ) ALWAYS_INLINE; @@ -1008,6 +1020,7 @@ namespace mg5amcCpu const fptype allV2[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, fptype allvertexes[] ) { mgDebug( 0, __FUNCTION__ ); @@ -1042,6 +1055,7 @@ namespace mg5amcCpu VVV1P0_1( const fptype allV2[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, const fptype M1, const fptype W1, fptype allV1[] ) @@ -1080,6 +1094,7 @@ namespace mg5amcCpu const fptype allF2[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, fptype allvertexes[] ) { mgDebug( 0, __FUNCTION__ ); @@ -1103,6 +1118,7 @@ namespace mg5amcCpu FFV1_1( const fptype allF2[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, const fptype M1, const fptype W1, fptype allF1[] ) @@ -1134,6 +1150,7 @@ namespace mg5amcCpu FFV1_2( const fptype allF1[], const fptype allV3[], const fptype allCOUP[], + const double Ccoeff, const fptype M2, const fptype W2, fptype allF2[] ) @@ -1165,6 +1182,7 @@ namespace mg5amcCpu FFV1P0_3( const fptype allF1[], const fptype allF2[], const fptype allCOUP[], + const double Ccoeff, const fptype M3, const fptype W3, fptype allV3[] ) @@ -1197,6 +1215,7 @@ namespace mg5amcCpu const fptype allV3[], const fptype allV4[], const fptype allCOUP[], + const double Ccoeff, fptype allvertexes[] ) { mgDebug( 0, __FUNCTION__ ); @@ -1225,6 +1244,7 @@ namespace mg5amcCpu const fptype allV3[], const fptype allV4[], const fptype allCOUP[], + const double Ccoeff, const fptype M1, const fptype W1, fptype allV1[] ) @@ -1260,6 +1280,7 @@ namespace mg5amcCpu const fptype allV3[], const fptype allV4[], const fptype allCOUP[], + const double Ccoeff, fptype allvertexes[] ) { mgDebug( 0, __FUNCTION__ ); @@ -1288,6 +1309,7 @@ namespace mg5amcCpu const fptype allV3[], const fptype allV4[], const fptype allCOUP[], + const double Ccoeff, const fptype M1, const fptype W1, fptype allV1[] ) @@ -1323,6 +1345,7 @@ namespace mg5amcCpu const fptype allV3[], const fptype allV4[], const fptype allCOUP[], + const double Ccoeff, fptype allvertexes[] ) { mgDebug( 0, __FUNCTION__ ); @@ -1351,6 +1374,7 @@ namespace mg5amcCpu const fptype allV3[], const fptype allV4[], const fptype allCOUP[], + const double Ccoeff, const fptype M1, const fptype W1, fptype allV1[] ) diff --git a/epochX/cudacpp/pp_tt012j.mad/src/cudacpp_src.mk b/epochX/cudacpp/pp_tt012j.mad/src/cudacpp_src.mk index 554d7a704c..750986464e 100644 --- a/epochX/cudacpp/pp_tt012j.mad/src/cudacpp_src.mk +++ b/epochX/cudacpp/pp_tt012j.mad/src/cudacpp_src.mk @@ -1,7 +1,7 @@ # Copyright (C) 2020-2023 CERN and UCLouvain. # Licensed under the GNU Lesser General Public License (version 3 or later). # Created by: S. Roiser (Feb 2020) for the MG5aMC CUDACPP plugin. -# Further modified by: O. Mattelaer, S. Roiser, A. Valassi (2020-2023) for the MG5aMC CUDACPP plugin. +# Further modified by: J. Teig, O. Mattelaer, S. Roiser, A. Valassi (2020-2023) for the MG5aMC CUDACPP plugin. #=== Determine the name of this makefile (https://ftp.gnu.org/old-gnu/Manuals/make-3.80/html_node/make_17.html) #=== NB: assume that the same name (e.g. cudacpp.mk, Makefile...) is used in the Subprocess and src directories @@ -88,50 +88,52 @@ CXXFLAGS += $(OMPFLAGS) # Set the build flags appropriate to each AVX choice (example: "make AVX=none") # [NB MGONGPU_PVW512 is needed because "-mprefer-vector-width=256" is not exposed in a macro] # [See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96476] -$(info AVX=$(AVX)) -ifeq ($(UNAME_P),ppc64le) - ifeq ($(AVX),sse4) - override AVXFLAGS = -D__SSE4_2__ # Power9 VSX with 128 width (VSR registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on PowerPC for the moment) - endif -else ifeq ($(UNAME_P),arm) - ifeq ($(AVX),sse4) - override AVXFLAGS = -D__SSE4_2__ # ARM NEON with 128 width (Q/quadword registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on ARM for the moment) - endif -else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 - ifeq ($(AVX),none) - override AVXFLAGS = -mno-sse3 # no SIMD - else ifeq ($(AVX),sse4) - override AVXFLAGS = -mno-avx # SSE4.2 with 128 width (xmm registers) - else ifeq ($(AVX),avx2) - override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(AVX),512y) - override AVXFLAGS = -march=skylake -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(AVX),512z) - override AVXFLAGS = -march=skylake -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) +ifeq ($(NVCC),) + $(info AVX=$(AVX)) + ifeq ($(UNAME_P),ppc64le) + ifeq ($(AVX),sse4) + override AVXFLAGS = -D__SSE4_2__ # Power9 VSX with 128 width (VSR registers) + else ifneq ($(AVX),none) + $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on PowerPC for the moment) + endif + else ifeq ($(UNAME_P),arm) + ifeq ($(AVX),sse4) + override AVXFLAGS = -D__SSE4_2__ # ARM NEON with 128 width (Q/quadword registers) + else ifneq ($(AVX),none) + $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on ARM for the moment) + endif + else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 + ifeq ($(AVX),none) + override AVXFLAGS = -mno-sse3 # no SIMD + else ifeq ($(AVX),sse4) + override AVXFLAGS = -mno-avx # SSE4.2 with 128 width (xmm registers) + else ifeq ($(AVX),avx2) + override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] + else ifeq ($(AVX),512y) + override AVXFLAGS = -march=skylake -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] + else ifeq ($(AVX),512z) + override AVXFLAGS = -march=skylake -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) + else + $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) + endif else - $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) - endif -else - ifeq ($(AVX),none) - override AVXFLAGS = -march=x86-64 # no SIMD (see #588) - else ifeq ($(AVX),sse4) - override AVXFLAGS = -march=nehalem # SSE4.2 with 128 width (xmm registers) - else ifeq ($(AVX),avx2) - override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(AVX),512y) - override AVXFLAGS = -march=skylake-avx512 -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(AVX),512z) - override AVXFLAGS = -march=skylake-avx512 -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) + ifeq ($(AVX),none) + override AVXFLAGS = -march=x86-64 # no SIMD (see #588) + else ifeq ($(AVX),sse4) + override AVXFLAGS = -march=nehalem # SSE4.2 with 128 width (xmm registers) + else ifeq ($(AVX),avx2) + override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] + else ifeq ($(AVX),512y) + override AVXFLAGS = -march=skylake-avx512 -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] + else ifeq ($(AVX),512z) + override AVXFLAGS = -march=skylake-avx512 -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) + else ifneq ($(AVX),none) + $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) + endif endif + # For the moment, use AVXFLAGS everywhere: eventually, use them only in encapsulated implementations? + CXXFLAGS+= $(AVXFLAGS) endif -# For the moment, use AVXFLAGS everywhere: eventually, use them only in encapsulated implementations? -CXXFLAGS+= $(AVXFLAGS) # Set the build flags appropriate to each FPTYPE choice (example: "make FPTYPE=f") ###$(info FPTYPE=$(FPTYPE)) @@ -175,11 +177,19 @@ endif # Build directory "short" tag (defines target and path to the optional build directory) # (Rationale: keep directory names shorter, e.g. do not include random number generator choice) -override DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) +ifneq ($(NVCC),) + override DIRTAG = cuda_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) +else + override DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) +endif # Build lockfile "full" tag (defines full specification of build options that cannot be intermixed) # (Rationale: avoid mixing of CUDA and no-CUDA environment builds with different random number generators) -override TAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) +ifneq ($(NVCC),) + override TAG = cuda_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) +else + override TAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) +endif # Build directory: current directory by default, or build.$(DIRTAG) if USEBUILDDIR==1 ###$(info Current directory is $(shell pwd)) @@ -216,35 +226,21 @@ endif MG5AMC_COMMONLIB = mg5amc_common # First target (default goal) -all.$(TAG): $(BUILDDIR)/.build.$(TAG) $(LIBDIR)/.build.$(TAG) $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so +all.$(TAG): $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so # Target (and build options): debug debug: OPTFLAGS = -g -O0 debug: all.$(TAG) -# Target: tag-specific build lockfiles -override oldtagsb=`if [ -d $(BUILDDIR) ]; then find $(BUILDDIR) -maxdepth 1 -name '.build.*' ! -name '.build.$(TAG)' -exec echo $(shell pwd)/{} \; ; fi` -override oldtagsl=`if [ -d $(LIBDIR) ]; then find $(LIBDIR) -maxdepth 1 -name '.build.*' ! -name '.build.$(TAG)' -exec echo $(shell pwd)/{} \; ; fi` - -$(BUILDDIR)/.build.$(TAG): $(LIBDIR)/.build.$(TAG) - -$(LIBDIR)/.build.$(TAG): - @if [ "$(oldtagsl)" != "" ]; then echo -e "Cannot build for tag=$(TAG) as old builds exist in $(LIBDIR) for other tags:\n$(oldtagsl)\nPlease run 'make clean' first\nIf 'make clean' is not enough: run 'make clean USEBUILDDIR=1 AVX=$(AVX) FPTYPE=$(FPTYPE)' or 'make cleanall'"; exit 1; fi - @if [ "$(oldtagsb)" != "" ]; then echo -e "Cannot build for tag=$(TAG) as old builds exist in $(BUILDDIR) for other tags:\n$(oldtagsb)\nPlease run 'make clean' first\nIf 'make clean' is not enough: run 'make clean USEBUILDDIR=1 AVX=$(AVX) FPTYPE=$(FPTYPE)' or 'make cleanall'"; exit 1; fi - @if [ ! -d $(LIBDIR) ]; then echo "mkdir -p $(LIBDIR)"; mkdir -p $(LIBDIR); fi - @touch $(LIBDIR)/.build.$(TAG) - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - @touch $(BUILDDIR)/.build.$(TAG) - #------------------------------------------------------------------------------- # Generic target and build rules: objects from C++ compilation -$(BUILDDIR)/%.o : %.cc *.h $(BUILDDIR)/.build.$(TAG) +$(BUILDDIR)/%.o : %.cc *.h @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi $(CXX) $(CPPFLAGS) $(CXXFLAGS) -fPIC -c $< -o $@ # Generic target and build rules: objects from CUDA compilation -$(BUILDDIR)/%_cu.o : %.cc *.h $(BUILDDIR)/.build.$(TAG) +$(BUILDDIR)/%_cu.o : %.cc *.h @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c -x cu $< -o $@ @@ -271,20 +267,61 @@ endif # Target: clean the builds .PHONY: clean +BUILD_DIRS := $(wildcard build.*) +NUM_BUILD_DIRS := $(words $(BUILD_DIRS)) + clean: ifeq ($(USEBUILDDIR),1) - rm -rf $(LIBDIR) - rm -rf $(BUILDDIR) +ifeq ($(NUM_BUILD_DIRS),1) + $(info USEBUILDDIR=1, only one src build directory found.) + rm -rf ../lib/$(BUILD_DIRS) + rm -rf $(BUILD_DIRS) +else ifeq ($(NUM_BUILD_DIRS),0) + $(error USEBUILDDIR=1, but no src build directories are found.) else - rm -f $(LIBDIR)/.build.* $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so - rm -f $(BUILDDIR)/.build.* $(BUILDDIR)/*.o $(BUILDDIR)/*.exe + $(error Multiple src BUILDDIR's found! Use 'cleannone', 'cleansse4', 'cleanavx2', 'clean512y','clean512z', 'cleancuda' or 'cleanall'.) +endif +else + rm -f ../lib/lib$(MG5AMC_COMMONLIB).so + rm -f $(BUILDDIR)/*.o $(BUILDDIR)/*.exe endif cleanall: @echo - $(MAKE) clean -f $(THISMK) + rm -f ../lib/lib$(MG5AMC_COMMONLIB).so + rm -f $(BUILDDIR)/*.o $(BUILDDIR)/*.exe @echo - rm -rf $(LIBDIR)/build.* + rm -rf ../lib/build.* rm -rf build.* +# Target: clean different builds + +cleannone: + rm -rf ../lib/build.none_* + rm -rf build.none_* + +cleansse4: + rm -rf ../lib/build.sse4_* + rm -rf build.sse4_* + +cleanavx2: + rm -rf ../lib/build.avx2_* + rm -rf build.avx2_* + +clean512y: + rm -rf ../lib/build.512y_* + rm -rf build.512y_* + +clean512z: + rm -rf ../lib/build.512z_* + rm -rf build.512z_* + +cleancuda: + rm -rf ../lib/build.cuda_* + rm -rf build.cuda_* + +cleandir: + rm -f ./*.o ./*.exe + rm -f ../lib/lib$(MG5AMC_COMMONLIB).so + #------------------------------------------------------------------------------- From 8368afc8c84f788a371a9f9990b9600a6973303e Mon Sep 17 00:00:00 2001 From: Stephan Hageboeck Date: Fri, 18 Aug 2023 09:47:03 +0200 Subject: [PATCH 084/129] Add reference file for uux->ttgg tests. --- .../ref/dump_CPUTest.Sigma_sm_uux_ttxgg.txt | 4608 +++++++++++++++++ .../ref/dump_CPUTest.Sigma_sm_uux_ttxgg.txt | 4608 +++++++++++++++++ 2 files changed, 9216 insertions(+) create mode 100644 epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/test/ref/dump_CPUTest.Sigma_sm_uux_ttxgg.txt create mode 100644 epochX/cudacpp/pp_tt012j.mad/test/ref/dump_CPUTest.Sigma_sm_uux_ttxgg.txt diff --git a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/test/ref/dump_CPUTest.Sigma_sm_uux_ttxgg.txt b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/test/ref/dump_CPUTest.Sigma_sm_uux_ttxgg.txt new file mode 100644 index 0000000000..e9f7ef1a82 --- /dev/null +++ b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/test/ref/dump_CPUTest.Sigma_sm_uux_ttxgg.txt @@ -0,0 +1,4608 @@ +Event 0 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.045233209356227e+02 6.877986897204741e+01 -1.905381248013139e+02 2.818406336784428e+01 + 3 5.474933604313477e+02 -4.596225360107564e+02 3.030720946352398e+01 2.959350894402091e+02 + 4 5.014688717565996e+02 4.188441856206844e+02 2.572754903817050e+02 -9.924666020293004e+01 + 5 2.465144468764297e+02 -2.800151858197538e+01 -9.704457504391526e+01 -2.248724926051234e+02 + ME 1.898303560024237e-08 + +Event 1 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.008083996490003e+02 7.883320272753284e+01 -1.779144499629306e+02 -4.955590793941928e+01 + 3 5.095915127572659e+02 1.945100505575215e+01 4.232835353003264e+02 2.830834100052795e+02 + 4 5.330731110420373e+02 -3.351807593152422e+02 -3.437684940301842e+02 -2.316117933377168e+02 + 5 2.565269765516967e+02 2.368965515319572e+02 9.839940869278838e+01 -1.915708728143429e+00 + ME 8.597009272127998e-09 + +Event 2 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.874993553150719e+02 -3.353676580361334e+02 -1.808823320939806e+02 -7.046890271033257e+01 + 3 3.626455728935598e+02 2.056734411127569e+02 -1.625327830620692e+02 2.505859963969135e+02 + 4 5.314718876693757e+02 3.681440252065139e+01 3.745048277115113e+02 -3.753041448887398e+02 + 5 2.183831841219925e+02 9.287981440272506e+01 -3.108971255546150e+01 1.951870512021589e+02 + ME 3.711549380646671e-08 + +Event 3 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.366452034215279e+02 1.646792644528339e+02 4.079517915654560e+02 -4.601882122104464e+02 + 3 2.850611318540120e+02 -1.410564077018440e+02 2.241470575148821e+01 2.466992495047679e+02 + 4 5.100787565257925e+02 3.619333890962012e+01 -4.480337270250971e+02 2.411144116917793e+02 + 5 6.821490819866779e+01 -5.981619566060999e+01 1.766722970815293e+01 -2.762544898610076e+01 + ME 7.154822305576670e-07 + +Event 4 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.502637187052808e+02 5.534999170445879e+01 -2.382039909598248e+02 -5.317110126115482e+01 + 3 6.306127670141703e+02 9.222569406819532e+01 6.223439713329586e+02 -4.306813927289475e+01 + 4 3.012500630459575e+02 -1.662164166936457e+01 -2.533227164825486e+02 -1.621817586145584e+02 + 5 3.178734512345914e+02 -1.309540441032896e+02 -1.308172638905854e+02 2.584209991486079e+02 + ME 8.571663806697150e-08 + +Event 5 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.543595875307082e+02 1.177423500857260e+02 2.021351892259652e+02 -9.988445345330558e+01 + 3 1.672353472875774e+02 -4.643301969933537e+01 1.390571194439707e+02 -8.046585360227670e+01 + 4 4.148863440715187e+02 5.705637783937733e+01 -5.963382698230392e+01 -4.065944600266038e+02 + 5 6.635187211101955e+02 -1.283657082257680e+02 -2.815584816876321e+02 5.869447670821860e+02 + ME 3.541618749615125e-06 + +Event 6 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.600736528022404e+02 3.737322990662495e+02 2.536668813098301e+02 -8.743596493432509e+01 + 3 2.003131692770116e+02 1.425583968826074e+02 -7.419927099902716e+01 -1.195698015691029e+02 + 4 6.919589874187652e+02 -6.251541860981462e+02 -2.582872915825600e+02 1.458669218175010e+02 + 5 1.476541905019823e+02 1.088634901492892e+02 7.881968127175713e+01 6.113884468592695e+01 + ME 4.103844163554172e-07 + +Event 7 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.145629825968214e+02 1.959037730784686e+02 -1.819514480286372e+02 -3.168246341329452e+02 + 3 2.635019328107883e+02 -5.865118337121913e+01 -1.151155589842043e+02 -2.296556451819355e+02 + 4 5.280293449698496e+02 -2.518410835847975e+02 3.981394172424513e+01 4.623915092348713e+02 + 5 2.939057396225401e+02 1.145884938775480e+02 2.572530652885964e+02 8.408877008000950e+01 + ME 1.226132418997979e-07 + +Event 8 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.397378022805042e+02 -1.487288937969701e+01 -1.160009939420407e+02 6.289570909312075e+02 + 3 1.834286250976932e+02 1.635491119298312e+02 -6.096802297516525e+01 -5.639723988541734e+01 + 4 4.991547965706248e+02 -8.664012365698299e+01 3.208151079475728e+01 -4.905300975243927e+02 + 5 1.776787760511781e+02 -6.203609889315122e+01 1.448875061224487e+02 -8.202975352139767e+01 + ME 2.518310683770126e-07 + +Event 9 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.768693845261535e+02 -4.456674718007656e+02 1.636141522680622e+02 -4.489235630560713e+01 + 3 2.612786207802826e+02 8.184621745013861e+01 2.479930738231251e+02 8.194492156890165e+00 + 4 3.368713959814187e+02 3.479928867591725e+01 -2.732232778405869e+02 -1.939597571254548e+02 + 5 4.249805987121456e+02 3.290219656747095e+02 -1.383839482506003e+02 2.306576212741717e+02 + ME 3.938758863012469e-09 + +Event 10 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.488350171096896e+02 -1.831887653712691e+02 -5.102545779713487e+02 -8.545184554369901e+01 + 3 7.035065238815303e+02 4.041792774985642e+01 6.809284192215310e+02 1.721171349887872e+02 + 4 1.751828801954048e+02 1.268400499588020e+02 -1.091761136932150e+02 -5.178049284095648e+01 + 5 7.247557881337549e+01 1.593078766261062e+01 -6.149772755696730e+01 -3.488479660413173e+01 + ME 7.960158180756801e-07 + +Event 11 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.269658880944947e+02 -2.185431515300268e+02 5.206117424428275e+01 3.228063528112231e+01 + 3 1.005856529182378e+02 -4.644479827572638e+01 -7.508984239583356e+01 4.818578478227943e+01 + 4 4.675628274246620e+02 -2.703728833735590e+02 -2.515742362338795e+02 2.867471101666977e+02 + 5 7.048856315626057e+02 5.353608331793122e+02 2.746029043854304e+02 -3.672135302300995e+02 + ME 2.405423484837008e-07 + +Event 12 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.837700766590144e+02 1.296958544175530e+02 -7.540996840916678e+01 2.408687991801600e+02 + 3 2.628002397813191e+02 -8.376084481590414e+01 -1.663098735764636e+02 -1.854430178136278e+02 + 4 5.190623657100422e+02 -3.621783241410699e+02 1.519752457270119e+02 -3.393466158739261e+02 + 5 4.343673178496245e+02 3.162433145394211e+02 8.974459625861842e+01 2.839208345073940e+02 + ME 7.433768457129216e-08 + +Event 13 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.995598257201647e+02 -5.586644429775192e+02 1.101534889159592e+02 -1.877025137014794e+02 + 3 5.937134122752477e+02 5.346076236572911e+02 -1.031605262004245e+02 2.367450326344228e+02 + 4 1.647592826022760e+02 -7.925301245804906e+01 1.680176709576468e+01 -1.434652635392995e+02 + 5 1.419674794023117e+02 1.033098317782771e+02 -2.379472981129927e+01 9.442274460635609e+01 + ME 1.145126864768706e-06 + +Event 14 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.028779021236546e+02 1.164750571227171e+02 -2.225368001532149e+02 1.692511661426708e+02 + 3 5.030384766013229e+02 -4.515737850621545e+02 -1.020261550868047e+02 -1.967726842430677e+02 + 4 3.063971056395570e+02 2.430825837173773e+02 1.431329210018300e+01 -1.859708942464840e+02 + 5 3.876865156354651e+02 9.201614422206016e+01 3.102496631398366e+02 2.134924123468809e+02 + ME 2.645321854133857e-09 + +Event 15 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.241250378461693e+02 -1.805033431240864e+02 1.231079432807119e+02 -4.995007519281845e+01 + 3 3.844614260046683e+02 1.307728483313577e+02 -9.608556196200369e+01 -3.485349552158186e+02 + 4 4.110760119555223e+02 5.739270654525845e+01 -3.965776976049418e+02 9.173709502175154e+01 + 5 4.803375241936400e+02 -7.662211752529799e+00 3.695553162862337e+02 3.067479353868856e+02 + ME 5.022011105281753e-09 + +Event 16 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.001054877319223e+02 -1.430620362533657e+01 7.855291304039666e+01 -6.038113169479623e+01 + 3 4.093088791607984e+02 -1.119992820429624e+02 3.757454087335235e+02 -1.174959880055799e+02 + 4 7.087543950175984e+02 1.089443267851879e+02 -6.992154166158715e+02 3.951869538303891e+01 + 5 2.818312380896809e+02 1.736115888311106e+01 2.449170948419514e+02 1.383584243173372e+02 + ME 6.080589976989418e-06 + +Event 17 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.581631210613618e+02 -1.069713793286924e+02 -1.856462517995979e+02 -1.440166319333314e+02 + 3 4.806574857692274e+02 -3.871036291743680e+02 -8.927922635205840e+01 2.705764561967766e+02 + 4 4.638994968983050e+02 4.586966534295722e+02 -1.433077824478446e+01 -6.778460112673157e+01 + 5 2.972798962711066e+02 3.537835507348831e+01 2.892562563964409e+02 -5.877522313671356e+01 + ME 4.768457986390018e-09 + +Event 18 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.259069939880740e+02 6.694234146427497e+01 1.047108042274209e+02 -2.017279188511186e+01 + 3 4.274507013081181e+02 1.554527732937734e+02 -2.433805370458512e+02 -3.151419545400927e+02 + 4 3.505784003274900e+02 -2.628862848704467e+02 -8.012897055127387e+01 -2.176588249568330e+02 + 5 5.960639043763177e+02 4.049117011239836e+01 2.187987033697040e+02 5.529735713820376e+02 + ME 3.633613596998657e-08 + +Event 19 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.489050407799418e+02 -2.155159091310213e+02 -1.094654413984134e+02 -5.936269347447438e+01 + 3 2.600997784564499e+02 1.488424657388715e+02 1.507021889641061e+02 -1.509525269324567e+02 + 4 5.901199044754460e+02 3.182370400099771e+02 -2.814956777202155e+02 4.095447123924745e+02 + 5 4.008752762881623e+02 -2.515635966178273e+02 2.402589301545227e+02 -1.992294919855434e+02 + ME 6.950715264269408e-09 + +Event 20 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.908334513331024e+02 8.808928417538735e+01 2.991337054415237e+02 -5.018400855815297e+02 + 3 1.401706268696378e+02 -9.583159895522556e+01 -7.965314127488557e+01 6.418322494044027e+01 + 4 2.982536537656620e+02 1.120939357246564e+02 1.793074392675402e+02 2.103307723126631e+02 + 5 4.707422680315980e+02 -1.043516209448182e+02 -3.987880034341784e+02 2.273260883284264e+02 + ME 2.894377224286436e-07 + +Event 21 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.112413366700984e+02 2.716995006725958e+02 6.188924638009126e+01 3.024376621768124e+02 + 3 5.662415611998294e+02 -3.715892650272579e+02 2.050688206350350e+02 -3.748302316381090e+02 + 4 2.225653804612988e+02 -8.369496880497042e+01 -6.444146815856185e+01 1.959025215717929e+02 + 5 2.999517216687734e+02 1.835847331596327e+02 -2.025165988565645e+02 -1.235099521104963e+02 + ME 1.436903184170180e-08 + +Event 22 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.464950628793005e+02 1.637062818694535e+02 -3.617598874126118e+02 2.041760963268814e+02 + 3 4.190330476761976e+02 3.863780321676090e+02 1.621746205431056e+02 3.221099009750422e-01 + 4 6.041993534847936e+02 -5.473292470825340e+02 1.815948543536370e+02 -1.803076895525813e+02 + 5 3.027253595970840e+01 -2.755066954528329e+00 1.799041251586903e+01 -2.419051667527518e+01 + ME 3.727890024956625e-07 + +Event 23 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.340268758838264e+02 -9.885820280056214e+00 -1.281457206036256e+02 3.800195136498373e+01 + 3 1.460676733919085e+02 -1.207605538086376e+02 -7.761120113030877e+01 2.700287601473496e+01 + 4 5.791378930647284e+02 -2.550511254140081e+02 -3.011940406439271e+01 -5.190784566010291e+02 + 5 6.407675576595367e+02 3.856974995027019e+02 2.358763257983270e+02 4.540736292213105e+02 + ME 1.192489531875888e-06 + +Event 24 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.120994118474102e+02 -3.999484487477040e+02 -1.288251570508291e+02 4.450966268565517e+02 + 3 5.928222484883795e+02 4.242577382365043e+02 3.619492402961907e+01 -4.124724443205316e+02 + 4 1.136153476517902e+02 1.506354321291778e+01 -7.760365615106858e+01 -8.160397931410229e+01 + 5 1.814629920124191e+02 -3.937283270171845e+01 1.702338891722784e+02 4.897979677808213e+01 + ME 1.285510078979376e-07 + +Event 25 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.186484166765788e+02 2.332076299066254e+02 3.412653877230308e+02 6.647280106472095e+01 + 3 2.684644304712756e+02 7.897452755298143e+01 -5.206738710801169e+01 2.512472121751683e+02 + 4 5.018698799968644e+02 -3.665172118365466e+01 -2.251847766938088e+02 -4.470143668023453e+02 + 5 3.110172728552824e+02 -2.755304362759526e+02 -6.401322392121017e+01 1.292943535624560e+02 + ME 1.901918976141090e-08 + +Event 26 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.880157450735950e+02 -5.340609759213479e+02 -1.800693671113295e+02 1.676794963032682e+02 + 3 1.698935524482946e+02 9.424850332356012e+00 1.535211800024927e+02 -7.215426979989711e+01 + 4 3.316905961662700e+02 1.799651549092350e+02 -1.445567114258025e+02 -2.381901588760289e+02 + 5 4.104001063118405e+02 3.446709706797568e+02 1.711048985346393e+02 1.426649323726578e+02 + ME 6.020987949018286e-09 + +Event 27 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.260721948247595e+02 2.432868311106053e+02 -5.770296458017678e+01 3.449918852518222e+02 + 3 1.015574395166651e+02 -5.186955072304988e-01 -6.316674902066286e+01 7.952110596761376e+01 + 4 6.802443988998606e+02 -1.254022800835581e+02 1.115720726787119e+01 -6.684925034063277e+02 + 5 2.921259667587150e+02 -1.173658555198167e+02 1.097125063329686e+02 2.439795121868918e+02 + ME 1.967149883536404e-05 + +Event 28 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.577687888188209e+02 -4.408525315058863e+00 -6.157352186961897e+02 2.313233341145691e+02 + 3 4.217509083163121e+02 -2.657091410126092e+01 3.668529733823863e+02 -2.063654794532260e+02 + 4 2.768898842003987e+02 1.707159504683327e+02 2.175125744448075e+02 -1.457230889722216e+01 + 5 1.435904186644676e+02 -1.397365110520128e+02 3.136967086899622e+01 -1.038554576412053e+01 + ME 3.085488584291408e-08 + +Event 29 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.691757511791561e+02 7.936049457942595e+01 -4.578381871568865e+02 6.489985959561209e+01 + 3 4.168196707014676e+02 3.402072588652903e+02 1.817843664063917e+02 -1.579623468718793e+02 + 4 3.259562817662209e+02 -2.464919493866710e+02 1.791142676162754e+02 -1.157898771339882e+02 + 5 2.880482963531553e+02 -1.730758040580453e+02 9.693955313421930e+01 2.088523644102555e+02 + ME 4.895947955324834e-09 + +Event 30 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.587646316076485e+02 2.500214437920706e+02 6.280817637543875e+01 2.243981273456414e+01 + 3 1.696814728620085e+02 -9.470121197275456e+01 -1.406091650320610e+02 7.248820076297696e+00 + 4 5.864710833492851e+02 -2.932689801956460e+02 4.208355310058186e+02 2.843221635802257e+02 + 5 4.850828121810579e+02 1.379487483763299e+02 -3.430345423491963e+02 -3.140107963910876e+02 + ME 7.481478658057845e-09 + +Event 31 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.510064466785172e+02 -1.763911466206437e+02 1.762664757402212e+02 -2.864488083675499e+01 + 3 1.634676601057650e+02 -1.528515845674027e+02 -1.917706779920085e+01 5.468371847554744e+01 + 4 6.544233617606191e+02 5.127258688558928e+02 -1.829185292592408e+02 3.632119649428913e+02 + 5 4.311025314550986e+02 -1.834831376678465e+02 2.582912131822037e+01 -3.892508025816840e+02 + ME 1.609213533429697e-07 + +Event 32 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.730232054084494e+02 2.432605335138694e+02 1.715636199034402e+02 -2.248033561434742e+02 + 3 2.362205628011194e+02 -4.367709384711757e+01 7.672087287982943e+01 2.191035678114456e+02 + 4 4.054383297542172e+02 -2.205824977775273e+02 1.234567003875169e+02 3.169890282605115e+02 + 5 4.853179020362142e+02 2.099905811077544e+01 -3.717411931707865e+02 -3.112892399284830e+02 + ME 3.487765415465164e-08 + +Event 33 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.747910883673144e+02 5.323539820562518e+02 8.641425442309121e+01 1.987878509563276e+02 + 3 1.584581085429429e+02 -1.118080933695560e+02 1.076607709535321e+02 -3.189170452896511e+01 + 4 4.953900627949081e+02 -4.939048969940529e+02 2.681611008765802e+01 -2.738910880265214e+01 + 5 2.713607402948348e+02 7.335900830735730e+01 -2.208911354642813e+02 -1.395070376247104e+02 + ME 1.458819422095788e-07 + +Event 34 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.310199002368670e+02 -1.157285499049388e+02 -6.166178457504553e+02 -6.764206926102779e+01 + 3 4.817608951852553e+02 -3.997907691000606e+01 4.373161358964807e+02 1.981157005986480e+02 + 4 2.860765236279268e+02 1.674393784787844e+02 1.106820450243557e+02 -2.038463068463706e+02 + 5 1.011426809499510e+02 -1.173175166383970e+01 6.861966482961880e+01 7.337267550875022e+01 + ME 1.247261192066612e-07 + +Event 35 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.652617461959501e+02 4.544204650188408e+02 3.037117635510197e+01 -9.512163314500258e+01 + 3 2.394629598395643e+02 -1.805063362629201e+02 -1.540296017189006e+02 3.216913891261685e+01 + 4 3.655637126606654e+02 -1.682977929708781e+02 -3.352014704439824e+01 -3.227833338905570e+02 + 5 4.297115813038207e+02 -1.056163357850426e+02 1.571785724081969e+02 3.857358281229427e+02 + ME 4.574122987290013e-08 + +Event 36 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.499192045006146e+02 -3.325790315669839e+02 7.774434570915018e+01 -2.928724894056954e+02 + 3 2.295207781400161e+02 7.258784260898673e+01 9.894250089353637e+00 2.175152788163185e+02 + 4 4.830584025161939e+02 3.898488694796316e+02 1.934726951777060e+02 2.095986532104270e+02 + 5 3.375016148431750e+02 -1.298576805216344e+02 -2.811112909762098e+02 -1.342414426210501e+02 + ME 1.863783967042743e-08 + +Event 37 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.644647330879737e+02 4.258097602950139e+02 -2.901560281802422e+02 -4.195341569715645e+02 + 3 3.705058926630717e+00 -8.486098469472709e-01 5.377443871237387e-01 -3.566252087498443e+00 + 4 4.717811915619315e+02 -4.461616916387519e+02 8.922603813628874e+01 1.247235011701669e+02 + 5 3.600490164234641e+02 2.120054119068520e+01 2.003922456568298e+02 2.983769078888961e+02 + ME 4.970165437072497e-04 + +Event 38 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.320658071316812e+02 -5.229898031006179e+01 -7.533526820906631e+01 -3.191506137992071e+02 + 3 5.173086194760924e+02 2.914536896664749e+02 -2.771354642533742e+02 3.253596302818245e+02 + 4 1.139748976757842e+02 3.760489884644618e+01 -1.069643132300276e+02 1.160967605846844e+01 + 5 5.366506757164423e+02 -2.767596082028593e+02 4.594350456924680e+02 -1.781869254108562e+01 + ME 2.355143823559904e-05 + +Event 39 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.580369915970425e+02 9.859906083728804e+01 -2.937981802807958e+02 -1.793079524660254e+02 + 3 3.008057137260953e+02 -1.290389675776721e+02 -4.755272039058874e+01 -2.675289910275308e+02 + 4 1.563788184394283e+02 -8.740572256111449e+01 -9.464096594244925e+00 -1.293251924248945e+02 + 5 6.847784762374331e+02 1.178456293014986e+02 3.508149972656293e+02 5.761621359184506e+02 + ME 2.607935206775021e-07 + +Event 40 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.061905838966051e+02 -8.306017888269724e+01 -5.398586008655030e+01 -3.824883923718052e+01 + 3 3.775395017070495e+02 1.945243896057245e+02 3.099826314852029e+02 -9.277448666113087e+01 + 4 4.073176242310425e+02 -2.719044333335594e+02 2.932534467128884e+02 -7.731779959225287e+01 + 5 6.089522901653033e+02 1.604402226105321e+02 -5.492502181115411e+02 2.083411254905642e+02 + ME 8.520573534311801e-09 + +Event 41 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.139380311935496e+02 -4.604569970586491e+02 -8.651738563141195e+01 2.112496053258770e+02 + 3 3.779489592837219e+02 3.440308282843344e+02 -8.249656237966933e+01 1.329756451730190e+02 + 4 4.970454597046420e+02 1.909761039695885e+02 1.692120849403949e+02 -4.265554911564500e+02 + 5 1.110675498180860e+02 -7.454993519527386e+01 -1.981369293135298e-01 8.233024065755386e+01 + ME 3.869995609536364e-08 + +Event 42 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.173779439151573e+02 3.630558430598339e+02 -9.842883754866893e+00 2.056645825764505e+02 + 3 4.387025788534138e+02 -3.367242411299441e+02 -8.622807709247308e+00 2.810736297045815e+02 + 4 3.848566002764389e+02 -2.376531184093808e+01 2.151853038720266e+02 -3.181903482617680e+02 + 5 2.590628769549898e+02 -2.566290088951960e+00 -1.967196124079123e+02 -1.685478640192640e+02 + ME 1.597303371265191e-08 + +Event 43 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.285774523262414e+02 3.003415161273636e+02 -7.585251142778557e+01 -1.095651056569458e+02 + 3 6.443551136010930e+02 -4.262554242356605e+02 -3.793660967414875e+02 2.993011700222419e+02 + 4 1.194081536546638e+02 7.683021647299904e+01 7.417483351494982e+01 -5.341834019283430e+01 + 5 4.076592804180017e+02 4.908369163529784e+01 3.810437746543233e+02 -1.363177241724618e+02 + ME 3.026979878382822e-06 + +Event 44 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.344278629651235e+02 -3.630184907012124e+02 -2.117651291203815e+02 1.100030618577765e+02 + 3 3.783362210634242e+02 -2.139207812824499e+02 2.214425529500993e+02 2.198622096837037e+02 + 4 2.731070100083523e+02 2.386736268129995e+02 7.781587548733641e+01 -1.075501199523767e+02 + 5 4.141289059631004e+02 3.382656451706628e+02 -8.749329931705431e+01 -2.223151515891035e+02 + ME 3.545945960117813e-08 + +Event 45 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.489710523078153e+02 -1.087275227839727e+01 -1.135937836198698e+01 -2.484740080338036e+02 + 3 5.496834214369441e+02 3.652599963991979e+02 -1.627221171722717e+02 3.771717266923071e+02 + 4 3.590003089931698e+02 -3.273342096749050e+02 -3.092057510665313e+01 1.441438693416079e+02 + 5 3.423452172620712e+02 -2.705303444589567e+01 2.050020706409118e+02 -2.728415880001114e+02 + ME 1.625279533498255e-07 + +Event 46 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.597985691912828e+02 -2.306727818104758e+02 7.603141863539261e+01 9.222032132856626e+01 + 3 7.002947929838682e+02 4.239737553652563e+02 1.188001021383240e+01 -5.572413455578469e+02 + 4 2.992434877229013e+02 -1.661439730366823e+02 1.360103548958277e+01 2.485112814376109e+02 + 5 2.406631501019480e+02 -2.715700051809825e+01 -1.015124643388078e+02 2.165097427916698e+02 + ME 7.228768445607493e-05 + +Event 47 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.018388784182160e+02 8.642536924923879e+00 -7.368701360758435e+01 1.877084532518992e+02 + 3 6.387534662808699e+02 -2.318851129196157e+02 1.997708430514635e+02 -5.606486380600520e+02 + 4 2.649820787300668e+02 1.788659005461101e+02 -1.950823496502483e+02 -1.285956938916121e+01 + 5 3.944255765708474e+02 4.437667544858174e+01 6.899852020636911e+01 3.857997541973140e+02 + ME 1.657302302888816e-07 + +Event 48 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.027019167519019e+02 -6.158689118671300e+01 4.178205606243037e+02 -2.726577544460905e+02 + 3 5.743238667714223e+02 3.184605495288456e+02 -1.749486635874764e+02 4.447738160526316e+02 + 4 3.758842972635484e+02 -2.607694178749530e+02 -2.399878564004706e+02 -1.252762723374896e+02 + 5 4.708991921312748e+01 3.895759532820393e+00 -2.884040636356643e+00 -4.683978926905154e+01 + ME 1.102336819899130e-05 + +Event 49 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.764648203352889e+02 2.738178952147450e+01 -3.157099897407809e+02 -3.558035483207228e+02 + 3 4.895961256288140e+02 -3.256740061063620e+02 3.286155635585780e+02 1.601643511036614e+02 + 4 1.166509262431076e+02 1.759755750888453e+01 3.782228425839705e+01 -1.089368595865212e+02 + 5 4.172881277927893e+02 2.806946590760029e+02 -5.072785807619410e+01 3.045760568035827e+02 + ME 2.756786236908775e-07 + +Event 50 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.289894155958067e+02 4.693347168027174e+02 -2.050228258252127e+02 -1.323645205738705e+02 + 3 3.157727461963105e+02 1.138825334157519e+02 2.859620904593798e+02 -7.049027339478296e+01 + 4 5.977725833195261e+02 -5.754593992719119e+02 -5.502927305745786e+01 1.521522929990794e+02 + 5 5.746525488835675e+01 -7.757850946557383e+00 -2.590999157670939e+01 5.070250096957403e+01 + ME 2.051616582639857e-07 + +Event 51 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.219327715020971e+02 5.984785298499144e+01 -4.338034317791259e+01 2.092618823041012e+02 + 3 3.719694454596721e+02 2.481003316167899e+02 6.684163406846992e+01 -2.689603869759851e+02 + 4 5.038009677439173e+02 -3.561225019008228e+02 3.408324299472030e+02 -1.040453431725397e+02 + 5 4.022968152943129e+02 4.817431729904136e+01 -3.642937208377602e+02 1.637438478444239e+02 + ME 2.408810354087823e-09 + +Event 52 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.643797726078950e+02 -1.708128057115347e+02 -2.017258340575681e+02 5.132001844727701e+00 + 3 1.082614026075099e+02 8.023457653018266e+01 -7.166510600964263e+01 -1.212668974594046e+01 + 4 5.888736361086693e+02 1.251923882116535e+02 2.277230615162053e+02 -5.284328079249005e+02 + 5 5.384851886759253e+02 -3.461415903030148e+01 4.566787855100542e+01 5.354274958261134e+02 + ME 2.387497787736484e-06 + +Event 53 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.236225962870593e+02 -8.655229351820063e+01 -2.025655916342637e+02 3.850905273783228e+01 + 3 3.598708704269264e+02 -3.246728222408169e+01 3.017281195636015e+02 -1.934245610863019e+02 + 4 4.959901518772787e+02 3.780916831344547e+02 2.233019308120418e+02 2.306277468116429e+02 + 5 4.205163814087348e+02 -2.590721073921725e+02 -3.224644587413796e+02 -7.571223846317311e+01 + ME 2.419493379402845e-08 + +Event 54 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.833324108095402e+02 3.689695429376331e+02 -9.184861439378331e+01 -4.867284248315899e+01 + 3 1.733517466553474e+02 -1.283859018369739e+02 1.142418318268169e+02 2.273086313407226e+01 + 4 5.882352328920327e+02 -5.696191122096893e+02 -1.438232518530712e+02 -2.948946332840464e+01 + 5 3.550806096430796e+02 3.290354711090303e+02 1.214300344200377e+02 5.543144267749134e+01 + ME 4.116554511041948e-08 + +Event 55 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.230627174531745e+02 4.559332054335223e+00 -3.968535050007001e+02 -1.465215716498505e+02 + 3 3.495042365247249e+02 -1.042339596976066e+02 -8.990135550403504e+01 -3.212572789417006e+02 + 4 2.159564078947226e+02 -5.070199742482322e+01 1.962132698937685e+02 7.461119410329923e+01 + 5 5.114766381273783e+02 1.503766250680946e+02 2.905415906109667e+02 3.931676564882520e+02 + ME 6.540453144473672e-08 + +Event 56 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.301047227118418e+02 -1.540011276808692e+02 1.679727819701612e+02 3.189013334119058e+01 + 3 8.914969805191234e+01 6.109731064089875e+01 -5.747680497126689e+01 -3.018615883963399e+01 + 4 6.600518622851478e+02 5.103775210112311e+02 -4.083637358386221e+02 -9.177312354086116e+01 + 5 5.206937169510982e+02 -4.174737039712605e+02 2.978677588397278e+02 9.006914903930456e+01 + ME 1.210838577412805e-07 + +Event 57 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.428929101034774e+02 4.260395144351128e+02 1.172634949350701e+02 -2.989539622472088e+01 + 3 2.959829527779269e+02 -1.135559932551681e+02 -1.425261047989344e+02 -2.332321894203626e+02 + 4 4.151099697755375e+02 -1.242288834014612e+01 -6.521586552925592e+01 4.097668236150967e+02 + 5 3.460141673430585e+02 -3.000606328397987e+02 9.047847539312014e+01 -1.466392379700132e+02 + ME 9.614686222852469e-08 + +Event 58 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.357156983149213e+02 -5.877712383564347e+01 2.922019789681372e+02 3.178229427822562e+02 + 3 3.319248809135800e+02 -2.788588871424606e+01 2.781385476596402e+02 -1.789845023623471e+02 + 4 1.585962071308597e+02 -2.424722381792027e+01 -7.876980550994809e+01 1.354996191630928e+02 + 5 5.737632136406385e+02 1.109102363678097e+02 -4.915707211178297e+02 -2.743380595830020e+02 + ME 1.713629333536021e-08 + +Event 59 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.336459069578588e+02 -1.992843481885649e+01 5.107665464174289e+02 -1.532917041439581e+02 + 3 1.581511369245755e+02 -9.743817802085908e+01 -5.863052068271143e+01 -1.099092608426849e+02 + 4 5.888078775864332e+02 2.639198311142280e+02 -3.515067392327601e+02 3.917704069048988e+02 + 5 2.193950785311320e+02 -1.465532182745123e+02 -1.006292865019573e+02 -1.285694419182557e+02 + ME 1.432379604105286e-08 + +Event 60 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.398861408394455e+02 9.292985018883907e+01 -1.755261709518740e+02 2.758209473364647e+02 + 3 4.495621192790998e+02 1.515758570389179e+02 -3.450839350786029e+02 -2.450468045176262e+02 + 4 5.587170539667186e+02 -2.339829412606645e+02 4.760297086658421e+02 -1.755347431700375e+02 + 5 1.518346859147359e+02 -1.052276596709245e+01 4.458039736463480e+01 1.447606003511990e+02 + ME 4.482931149984433e-08 + +Event 61 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.175194209979107e+01 5.998402058062320e+01 -1.454594179391587e+01 -1.906621464091413e+00 + 3 3.885205042949810e+02 2.010533504306213e+02 -3.301647653931597e+02 3.894817365587326e+01 + 4 4.121877137292707e+02 -1.873608925987552e+02 -2.415372201761172e+02 -2.765038490573954e+02 + 5 6.375398398759568e+02 -7.367647841248923e+01 5.862479273631928e+02 2.394622968656136e+02 + ME 4.915053968402902e-07 + +Event 62 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.423805753542258e+02 -2.842742526400005e+02 1.403994964620940e+02 1.292307589509954e+02 + 3 3.730016642701108e+02 -6.375176338198228e+01 3.556485890785658e+02 9.262847996370058e+01 + 4 1.869146245818500e+02 1.512767776127116e+02 -3.521592858368063e+01 1.039819783023830e+02 + 5 5.977031357938134e+02 1.967492384092712e+02 -4.608321569569791e+02 -3.258412172170790e+02 + ME 2.893684790840834e-08 + +Event 63 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.204233175784373e+02 -1.250932662423830e+01 -4.690369092824184e+02 -2.251406759285211e+02 + 3 1.393553568983892e+02 8.467826532496937e+01 1.098936348220459e+02 -1.314898868469838e+01 + 4 2.210675038562465e+02 -1.091496397100441e+02 -1.833244208077437e+02 -5.787360493268422e+01 + 5 6.191538216669275e+02 3.698070100931304e+01 5.424676952681161e+02 2.961632695459037e+02 + ME 3.491281245214703e-04 + +Event 64 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.285187126492506e+02 5.115930460477169e+02 2.913679691486133e+02 -2.200296205970973e+02 + 3 3.530874069984857e+02 -5.757495613833130e+01 -3.215266291557357e+02 1.340763519429640e+02 + 4 2.198421555599027e+02 -1.613778626189666e+02 6.174872575212309e+01 1.359222339639379e+02 + 5 2.985517247923617e+02 -2.926402272904187e+02 -3.159006574500087e+01 -4.996896530980440e+01 + ME 1.979059982852776e-08 + +Event 65 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.733821832722187e+02 2.303260106007256e+02 -1.646059812172811e+00 1.472584036940988e+02 + 3 1.394921625216098e+02 -9.684562217110874e+01 4.145751137329393e+01 -9.143447720624461e+01 + 4 5.102700480977414e+02 3.604369604937132e+02 -2.998931993418235e+02 -2.013076960383036e+02 + 5 5.768556061084298e+02 -4.939173489233301e+02 2.600817477807025e+02 1.454837695504496e+02 + ME 8.572020790384727e-09 + +Event 66 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.544462431538033e+02 -3.753345008667602e+02 -2.512516495498346e+02 5.017976658168838e+01 + 3 3.165563250580395e+02 1.103952965289289e+02 -2.325997113597451e+02 -1.841688348062842e+02 + 4 3.684879093534597e+02 6.572067686856805e+01 2.241075105812514e+02 2.850262368146047e+02 + 5 3.605095224346970e+02 1.992185274692630e+02 2.597438503283283e+02 -1.510371685900090e+02 + ME 4.525957563721070e-09 + +Event 67 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.440190035555440e+02 2.253514126547281e+02 -1.260243593843257e+00 -9.359715111499492e+01 + 3 3.825895783887988e+02 -2.104023034558342e+02 -1.413119979724069e+02 -2.865947930811799e+02 + 4 4.876346193001705e+02 -2.655995372194987e+02 -1.506557767336876e+02 3.801936936688713e+02 + 5 3.857567987554873e+02 2.506504280206046e+02 2.932280182999377e+02 -1.749472696344974e-03 + ME 1.150513790624041e-08 + +Event 68 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.035832133728723e+02 -2.971861821973761e+02 1.881283924203020e+02 -4.905107303024299e+02 + 3 4.910040511213285e+02 6.999750717015637e+01 6.653935986886803e+01 4.814123396795738e+02 + 4 1.379763939873843e+02 1.378874442733864e+02 -2.922008491766640e+00 -3.999984486182564e+00 + 5 2.674363415184150e+02 8.930123075383302e+01 -2.517457437974033e+02 1.309837510903859e+01 + ME 6.064279967849539e-08 + +Event 69 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.030381868442192e+02 2.272305877240548e+02 1.124384392229261e+01 3.326854611056926e+02 + 3 4.200661478070355e+02 -7.160564158348362e+01 3.787564442608000e+02 -1.669483649448990e+02 + 4 3.799818119209206e+02 1.049459036478361e+02 -3.642939882503813e+02 -2.573761494148145e+01 + 5 2.969138534278247e+02 -2.605708497884073e+02 -2.570629993271116e+01 -1.399994812193121e+02 + ME 2.211041372363260e-09 + +Event 70 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.167686328179870e+02 -7.473352909257774e+00 2.955788092743162e+01 2.146138878198537e+02 + 3 4.902322685632545e+02 6.433192499326780e+01 -2.241342640720430e+02 -4.312225785325012e+02 + 4 4.524638474271014e+02 1.238344991848497e+02 4.320121481028072e+02 5.247908089678295e+01 + 5 3.405352511916566e+02 -1.806930712688595e+02 -2.374357649581957e+02 1.641296098158646e+02 + ME 2.145303282455767e-09 + +Event 71 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.536202816327036e+02 -2.094555017497595e+02 -3.528962486096462e+02 -1.932976730654783e+02 + 3 4.830671392542954e+02 -1.130399763251615e+02 4.195776068459593e+02 -2.110224078460706e+02 + 4 1.227243866738444e+02 7.580385517780422e+01 7.042433585630756e+01 6.599593581313735e+01 + 5 4.405881924391570e+02 2.466916228971166e+02 -1.371056940926206e+02 3.383241450984115e+02 + ME 4.416701015699929e-08 + +Event 72 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.855461065651830e+02 -6.960662796769586e+01 6.543639335521402e+02 -1.921879913933703e+02 + 3 1.544820687132741e+02 -4.432993363636479e+01 -1.101873255905340e+02 9.878420833784055e+01 + 4 1.673033372364589e+02 6.926279643044643e+01 -5.591621839923215e+01 1.416560912951512e+02 + 5 4.926684874850837e+02 4.467376517361423e+01 -4.882603895623742e+02 -4.825230823962126e+01 + ME 2.086075467222067e-07 + +Event 73 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.670906658704047e+01 -5.458408693475392e+00 -1.816753288898089e+01 1.880214778193577e+01 + 3 6.242100951925029e+02 -5.543116507793766e+02 2.403203993953238e+02 1.569169920210937e+02 + 4 4.464355243035053e+02 1.923986431943475e+02 -3.808569523700174e+02 -1.312837434282788e+02 + 5 4.026453139169509e+02 3.673714162785045e+02 1.587040858636744e+02 -4.443539637475057e+01 + ME 8.777250890020343e-07 + +Event 74 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.507575031696209e+02 -1.392071235576032e+02 -5.787209256044109e+01 -1.497178419166269e-01 + 3 6.125489314065023e+02 6.060714876125714e+02 -8.678795919437113e+01 1.901040265772213e+01 + 4 3.363511975714606e+02 -2.665860722445908e+02 -1.847740056381793e+02 8.900876941841000e+01 + 5 4.003423678524160e+02 -2.002782918103776e+02 3.294340573929915e+02 -1.078694542342155e+02 + ME 6.869043601345221e-09 + +Event 75 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.949609689268429e+01 2.952198203772742e+01 1.197957151721274e+01 -2.334275289215887e+01 + 3 4.190786176726720e+02 1.383393001415919e+02 -2.870901836423846e+02 2.721550151714166e+02 + 4 4.516269609304361e+02 -4.017945448128341e+02 -2.062213189338416e+02 -9.073120168421993e-01 + 5 5.897983245042075e+02 2.339332626335147e+02 4.813319310590135e+02 -2.479049502624155e+02 + ME 8.853913575949025e-08 + +Event 76 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.715950956231771e+02 -5.685992331526851e+02 -4.378901164006464e+01 3.870901520619992e+01 + 3 2.332327857868956e+02 1.165329531079328e+02 -1.925039496033650e+02 -6.131747379797535e+01 + 4 3.244822622272624e+02 1.227113072274079e+02 2.628412386324302e+02 -1.454137436861878e+02 + 5 3.706898563626654e+02 3.293549728173440e+02 -2.654827738900063e+01 1.680222022779628e+02 + ME 4.126838594121268e-09 + +Event 77 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.469171932013445e+02 6.704141444804748e+01 -6.996151281265823e+01 -2.271099640530980e+02 + 3 6.144793631549346e+02 -4.733339087492144e+02 9.433660898623472e+01 3.803163193664752e+02 + 4 1.021761213297807e+02 -9.029119947808269e+01 1.069887339263507e+01 4.661537487713156e+01 + 5 5.364273223139397e+02 4.965836937792496e+02 -3.507396956621158e+01 -1.998217301905086e+02 + ME 4.136635199465815e-08 + +Event 78 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.967497774816142e+02 -2.697858484391465e+02 6.318686962407354e+02 1.158352239764816e+02 + 3 6.532937684360132e+01 -1.968556360581410e+00 -5.408995210783415e+01 -3.658318391830724e+01 + 4 6.825170260279165e+02 3.242089958026899e+02 -5.955481599371366e+02 -7.772005567479931e+01 + 5 5.540381964686841e+01 -5.245459100296188e+01 1.776941580423527e+01 -1.531984383375085e+00 + ME 6.912778750585067e-04 + +Event 79 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.067690710988118e+02 -2.411523221575334e+02 7.258473255078884e+01 -1.751692812721097e+02 + 3 4.341993133670206e+02 -2.152390662369684e+02 -1.744359138858042e+02 3.343251412033717e+02 + 4 4.316885855045250e+02 4.064167724737121e+02 -7.391084315808240e+00 1.453472179974050e+02 + 5 3.273430300296425e+02 4.997461592078958e+01 1.092422656508236e+02 -3.045030779286670e+02 + ME 2.227839851987215e-08 + +Event 80 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.542875433020407e+01 3.027762979867648e+01 3.286699452335474e+01 -8.172975270371369e+00 + 3 4.747123602854808e+02 -4.741886647646233e+02 -1.797507628065839e+01 -1.318453068032191e+01 + 4 5.041118878446803e+02 2.786633966721448e+02 2.426995114610604e+02 -3.428883986926841e+02 + 5 4.757469975396346e+02 1.652476382938020e+02 -2.575914297037568e+02 3.642459046433773e+02 + ME 1.116306319253378e-07 + +Event 81 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.864116929519442e+02 3.277381135111354e+02 3.711141341299856e+02 3.142303327686207e+02 + 3 3.685765254538676e+02 -3.416666086612904e+02 -1.007529100226153e+02 -9.466485495426969e+01 + 4 2.326234951979822e+02 1.494507175101483e+02 8.025952299133930e+00 -1.780835692688112e+02 + 5 3.123882863962061e+02 -1.355222223599932e+02 -2.783871764065043e+02 -4.148190854553969e+01 + ME 3.152071526461638e-08 + +Event 82 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.427639687834170e+02 9.380520328619333e+00 1.408494872006385e+02 3.123468682248003e+02 + 3 6.478929207969744e+02 -1.321126375113856e+02 -3.734561186667144e+02 -5.126812023655760e+02 + 4 3.203811193174650e+02 -1.134795021127586e+01 1.346301271349556e+02 2.904995946791318e+02 + 5 1.889619911021435e+02 1.340800673940422e+02 9.797650433112027e+01 -9.016526053835608e+01 + ME 2.747443919603630e-08 + +Event 83 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.062422362872099e+02 5.909870990240152e+01 2.721577348549549e+02 1.273648975686913e+02 + 3 2.466716629423465e+02 -1.034354582623313e+02 -1.868503752330573e+02 1.234299499638147e+02 + 4 4.906943885930805e+02 5.161889116502462e+01 3.651680763098555e+02 -3.236800103741192e+02 + 5 4.563917121773633e+02 -7.282142805094902e+00 -4.504754359317530e+02 7.288516284161318e+01 + ME 1.920224543422507e-07 + +Event 84 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.336579016443923e+02 -7.328260784589015e+01 1.067078727201235e+02 -3.327948255056634e+01 + 3 6.164528201146906e+02 -4.207287356636679e+02 6.823455463559316e+01 4.453599173341587e+02 + 4 1.467908941354667e+02 -2.567468685241225e+01 -7.754572458221436e+01 -1.219632635474294e+02 + 5 6.030983841054509e+02 5.196860303619703e+02 -9.739670277350224e+01 -2.901171712361628e+02 + ME 1.643582175604126e-07 + +Event 85 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.358447951050334e+02 -1.672088219728145e+02 2.854579619038340e+02 5.785056818489144e+01 + 3 4.684481782024459e+02 3.813275907644369e+02 3.444658097706862e+01 -2.699007173795044e+02 + 4 4.650926385624549e+02 -3.110546686540760e+02 -1.387147979935619e+02 3.167244233889999e+02 + 5 2.306143881300662e+02 9.693589986245354e+01 -1.811897448873403e+02 -1.046742741943870e+02 + ME 9.887674833666381e-09 + +Event 86 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.346862187327210e+02 -1.105019805657391e+02 -2.067698421018028e+02 1.063794864187420e+01 + 3 5.058624304519142e+02 -4.262206430615211e+02 2.700548789916521e+02 3.609881305175244e+01 + 4 6.480280992696387e+02 6.454938193212064e+02 -5.106895467449713e+01 -2.588645455826063e+01 + 5 1.114232515457259e+02 -1.087711956939464e+02 -1.221608221535224e+01 -2.085030713536592e+01 + ME 2.641123684843117e-06 + +Event 87 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.728899334305389e+02 4.659191099288730e+02 -3.129457850944554e+01 -7.459840145031788e+01 + 3 4.494169400629929e+02 -7.010118226273974e+01 1.008358429699955e+02 4.323118585390417e+02 + 4 2.844458559289022e+01 -7.098330388355530e+00 -9.888008676198389e+00 2.570866468077313e+01 + 5 5.492485409135775e+02 -3.887195972777775e+02 -5.965325578435169e+01 -3.834221217694970e+02 + ME 1.836555389995247e-06 + +Event 88 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.984878614180078e+02 -8.577726579355432e+01 4.910354340013712e+02 -4.075685116146667e+00 + 3 4.609805056931717e+02 2.129284200140233e+02 -3.890221250310136e+02 1.258026264265515e+02 + 4 2.969828717410932e+02 -2.479988381372320e+02 1.094380361139229e+02 -1.213207263483756e+02 + 5 2.435487611477276e+02 1.208476839167630e+02 -2.114513450842809e+02 -4.062149620292672e-01 + ME 1.560041010039522e-08 + +Event 89 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.726870008116494e+02 1.539765893236600e+02 -3.662906941914419e+02 2.560377667948945e+02 + 3 4.594378962938944e+02 -1.479060782129439e+02 4.245625574332342e+02 9.462350344590699e+01 + 4 1.718353569329646e+02 -3.298783981694858e+01 -1.660422757461218e+02 2.948143452309455e+01 + 5 3.960397459614920e+02 2.691732870623245e+01 1.077704125043293e+02 -3.801427047638961e+02 + ME 5.286447740137126e-06 + +Event 90 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.474695652900048e+02 -9.333174748729691e+01 1.132426971448449e+02 1.457906516726571e+01 + 3 3.251565719826368e+02 2.585053334584991e+02 -2.175136337350804e+00 -1.972233699613811e+02 + 4 5.790098794634628e+02 6.564529205760056e+01 -4.580486422816988e+02 3.480439303462398e+02 + 5 4.483639832638958e+02 -2.308188780288028e+02 3.469810814742048e+02 -1.653996255521244e+02 + ME 2.792655563627604e-08 + +Event 91 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.820899052888924e+02 -1.808581415393254e+02 -3.203199804488937e+02 1.033350786898440e+02 + 3 9.295446296256250e+01 -2.298114143078748e+01 3.555880655718099e+01 8.275246582081725e+01 + 4 4.336620114613530e+02 8.456554310968218e+01 -2.782844067212398e+02 -3.216662837150926e+02 + 5 5.912936202871920e+02 1.192737398604308e+02 5.630455806129527e+02 1.355787392044315e+02 + ME 5.474348862057168e-08 + +Event 92 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.270593439871326e+02 5.052201207875458e+02 3.779850976205829e+01 1.453115766046592e+02 + 3 2.463043854963669e+02 1.231304177150150e+02 -3.773893720068454e+01 -2.099536214668173e+02 + 4 6.690437393076164e+02 -6.594864940642268e+02 8.207385292371921e+00 1.123820629827311e+02 + 5 5.759253120888415e+01 3.113595556166609e+01 -8.266957853745721e+00 -4.774001812057302e+01 + ME 2.727158601392794e-07 + +Event 93 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.200017882248953e+02 -1.560830085677291e+02 -1.325663041349294e+02 8.040557360409322e+01 + 3 6.407281865953230e+02 1.823233391623666e+02 6.142037882279666e+02 -6.672002760070171e+00 + 4 8.521385755377797e+01 4.383951335035405e+01 5.404958342950359e+01 4.917459831556157e+01 + 5 5.540561676260040e+02 -7.007984394499131e+01 -5.356870675225409e+02 -1.229081691595850e+02 + ME 7.673177869532113e-06 + +Event 94 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.370935815124155e+02 5.275516558105982e+02 1.000073439779119e+02 1.254180624206741e+01 + 3 5.057716473607446e+02 -3.633458733842592e+02 -1.608969609488800e+02 -3.128848087172752e+02 + 4 9.454406003253547e+01 -6.967807726468104e+01 4.085645048107038e+01 -4.913547893549688e+01 + 5 3.625907110943047e+02 -9.452770516165788e+01 2.003316648989775e+01 3.494784814107046e+02 + ME 4.167919088307122e-05 + +Event 95 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.256779780037450e+02 -3.004969003882455e+02 9.471368436356252e+00 1.252120257547474e+02 + 3 2.582480939333944e+02 -2.012383405486748e+02 7.138897109957118e+01 1.452543394146680e+02 + 4 5.694131298692070e+02 2.847102884863675e+02 8.193724006527485e+01 -4.862691156015786e+02 + 5 3.466607981936535e+02 2.170249524505529e+02 -1.627975796012024e+02 2.158027504321630e+02 + ME 1.143568282052127e-06 + +Event 96 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.766185052317254e+02 4.233490188089946e+02 1.329496801040323e+01 -2.185498836155904e+02 + 3 7.890873879535889e+01 -4.740418313873944e+01 4.641498695348351e+01 4.272097219552690e+01 + 4 4.792869803542939e+02 -2.336105143624531e+02 3.831040160425885e+02 1.684442044372186e+02 + 5 4.651857756186217e+02 -1.423343213078020e+02 -4.428139710064752e+02 7.384706982844790e+00 + ME 1.367682751699699e-08 + +Event 97 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.454191314938116e+02 -2.198423252847823e+02 -1.067171314055373e+02 -2.261318157911461e+01 + 3 6.283883510117278e+02 4.722599592005207e+02 -1.937207663271801e+02 -3.664897206154230e+02 + 4 1.620781893868624e+02 -7.571987944222909e+01 -4.595113060672451e+01 1.357362623919699e+02 + 5 4.641143281075982e+02 -1.766977544735093e+02 3.463890283394419e+02 2.533666398025679e+02 + ME 7.206430297766959e-08 + +Event 98 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.982747694543484e+02 4.799793179522203e+02 -1.370111687864804e+01 -1.330784716217580e+02 + 3 5.240661916116436e+02 -3.125813856230740e+02 1.929132879729713e+02 3.737950158519350e+02 + 4 2.943287261583366e+02 -2.480543997855068e+02 -1.355691835838943e+02 -8.197200895084490e+01 + 5 1.833303127756715e+02 8.065646745636053e+01 -4.364298751042897e+01 -1.587445352793322e+02 + ME 9.545426588767261e-08 + +Event 99 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.112057021621225e+02 -2.049393130332368e+02 -2.328035275724479e+01 -4.545054207331780e+01 + 3 5.066243223503690e+02 -2.358079378948771e+02 -4.471534870778939e+02 3.341525724599697e+01 + 4 4.653239426414497e+02 4.182795598186354e+02 1.760198094306579e+02 -1.028863845283059e+02 + 5 3.168460328460582e+02 2.246769110947843e+01 2.944140304044810e+02 1.149216693556268e+02 + ME 1.139669243722759e-08 + +Event 100 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.261030820391055e+02 -1.819121811113251e+01 6.012879360431594e+01 1.093416437734688e+02 + 3 4.769048092319793e+02 -2.259295543204739e+02 1.301569921137044e+02 -3.993159037116550e+02 + 4 5.269499564110497e+02 2.313940015147070e+02 1.423959739422059e+02 4.515046613598465e+02 + 5 3.700421523178656e+02 1.272677091689939e+01 -3.326817596602262e+02 -1.615304014216603e+02 + ME 2.536413678333058e-07 + +Event 101 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.071082658590780e+02 -2.306343931636616e+02 -1.906219995172719e+02 -2.760582730527242e+02 + 3 7.055902937697466e+02 3.509939199461518e+02 9.908499693062998e+01 6.040224285621923e+02 + 4 1.506354165156304e+02 -3.616228611940879e+00 8.811142866916488e+01 -1.221242307543523e+02 + 5 2.366660238555453e+02 -1.167432981705493e+02 3.425573917477102e+00 -2.058399247551156e+02 + ME 1.527835907227665e-05 + +Event 102 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.679004164430066e+02 1.260994283332420e+02 8.794295354075821e+01 4.419228109116983e+02 + 3 2.893886902350230e+02 1.121360101901791e+02 -2.665918046579882e+02 -1.000694477686555e+01 + 4 1.114482866002886e+02 7.246487011182150e+01 -5.194724669148226e+01 6.686588627238250e+01 + 5 6.312626067216820e+02 -3.107003086352426e+02 2.305960978087122e+02 -4.987817524072153e+02 + ME 1.293271949002516e-06 + +Event 103 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.015611695754376e+02 -2.478016296999642e+02 2.089981655060758e+02 -2.369925991332431e+02 + 3 2.805421352009303e+02 2.015483315378810e+02 1.930950025069369e+02 2.822197165754875e+01 + 4 2.160334239749209e+02 1.520789029588300e+02 1.534112976413324e+02 2.724207255193543e+00 + 5 6.018632712487114e+02 -1.058256047967467e+02 -5.555044656543452e+02 2.060464202205007e+02 + ME 4.079188051089405e-09 + +Event 104 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.888143656522529e+02 5.760997201270005e+02 9.608601910085939e+01 7.469234633753241e+01 + 3 3.060271446633420e+02 -1.984745521217481e+02 2.204192649519958e+02 7.533799220108909e+01 + 4 3.967306659051177e+02 -3.423810873408198e+02 -1.995377379946823e+02 1.884418787853177e+01 + 5 2.084278237792873e+02 -3.524408066443252e+01 -1.169675460581729e+02 -1.688745264171533e+02 + ME 1.639687028098068e-08 + +Event 105 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.504015321144005e+02 1.426088302035090e+02 -2.057470186990173e+02 5.640312907289357e+00 + 3 1.979630815113672e+02 4.982132386022299e+01 1.913292686370453e+02 1.001640120524153e+01 + 4 4.659014384742006e+02 2.574185871348824e+02 -5.255943452024413e+01 -3.847561919095292e+02 + 5 5.857339479000306e+02 -4.498487411986147e+02 6.697718458221685e+01 3.690994777969991e+02 + ME 1.088701469357768e-08 + +Event 106 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 7.361513001939429e+02 -3.741524637210578e+01 1.304189622135483e+01 7.350841754922349e+02 + 3 4.122811658031851e+02 1.145408114286395e+02 -7.459440103785889e+00 -3.959804527330108e+02 + 4 2.337908007462916e+02 -6.120784213133226e+01 -2.574540563694116e+01 -2.241626923995326e+02 + 5 1.177767332565805e+02 -1.591772292520144e+01 2.016294951937229e+01 -1.149410303596913e+02 + ME 1.099893041290890e-03 + +Event 107 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.705546785847132e+02 1.262951978594902e+01 -9.714584685273636e+01 1.396140324479450e+02 + 3 6.671070399945477e+02 2.578935168541208e+02 6.114409935711720e+02 -6.828358628248799e+01 + 4 2.745513521168064e+02 -2.324733487602298e+02 -1.283830712319619e+02 -6.965898424769128e+01 + 5 3.877869293039332e+02 -3.804968787984006e+01 -3.859120754864738e+02 -1.671461917765848e+00 + ME 1.536701523800557e-08 + +Event 108 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.706224267805914e+02 -4.353661443150737e+01 9.404361586016130e+01 1.355447307728594e+02 + 3 2.687777512938866e+02 2.082248009387954e+02 3.014322059927089e+01 1.672581780257728e+02 + 4 3.692025609623798e+02 3.365346633914971e+02 2.321314261258354e+01 1.500536616254310e+02 + 5 6.913972609631422e+02 -5.012228498987852e+02 -1.473999790720158e+02 -4.528565704240632e+02 + ME 4.569544766601897e-08 + +Event 109 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.466785643841017e+02 -2.365744581492209e+02 2.771136527000190e+02 -2.583839954774635e+02 + 3 3.878915327990413e+02 2.483945414202764e+02 -1.631710090657951e+02 -2.492693619566003e+02 + 4 1.253118648319771e+02 4.194400500436873e+01 1.160335020033091e+02 2.190868149180264e+01 + 5 5.401180379848795e+02 -5.376408827542424e+01 -2.299761456375331e+02 4.857446759422612e+02 + ME 1.013278487380946e-07 + +Event 110 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.381411416550031e+02 6.702134331125377e+01 -1.162827706142533e+02 -1.967172085705169e+02 + 3 6.212430200653038e+02 -3.967265104066119e+02 1.827510534384594e+02 4.417612685462424e+02 + 4 1.823603315775933e+02 2.482060450627628e+01 -1.599146046747258e+02 8.406275832233293e+01 + 5 4.582555067020995e+02 3.048845625890818e+02 9.344632185051987e+01 -3.291068182980584e+02 + ME 6.851051377489183e-08 + +Event 111 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.374985436753868e+02 -2.389765770808210e+02 -2.262746633651867e+02 7.480133226562783e+01 + 3 1.687316160676459e+02 -3.174949652867830e+01 -1.649088651344595e+02 1.635218428955413e+01 + 4 5.145505242681480e+02 2.608128140187756e+01 2.183177034136404e+02 -4.652089736465278e+02 + 5 4.792193159888191e+02 2.446447922076219e+02 1.728658250860056e+02 3.740554570913458e+02 + ME 3.128135120818016e-07 + +Event 112 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.705149137771965e+02 -1.687461219713958e+02 -2.442102979231825e+01 -1.922353750557715e+00 + 3 6.869944158795411e+02 2.444246111927705e+02 5.622677815177788e+02 3.099562529777548e+02 + 4 6.218245605391446e+02 -5.521148956020887e+01 -5.388632075909079e+02 -3.053586727359832e+02 + 5 2.066610980411795e+01 -2.046699966116587e+01 1.016455865447365e+00 -2.675226491214084e+00 + ME 2.152137171262364e-06 + +Event 113 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.130363090939669e+02 1.028036904144503e+01 1.180709930084098e+01 -1.119469231022390e+02 + 3 4.872852151720413e+02 7.570757814761660e+01 3.354557570129505e+02 -3.452313407313326e+02 + 4 5.826096241012513e+02 8.602003542439087e+01 -5.178852261950345e+02 2.526448497197317e+02 + 5 3.170688516327408e+02 -1.720079826134526e+02 1.706223698812430e+02 2.045334141138398e+02 + ME 2.693743008806596e-07 + +Event 114 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.488748255497196e+02 -5.783809298403495e+01 -4.190201165497776e+02 1.502181944335374e+02 + 3 3.885313578527229e+02 -3.031237352159774e+02 6.719013528635192e+01 -2.335767601962925e+02 + 4 1.721991327065913e+02 1.359105605864553e+02 -8.348365698663605e+01 6.489483679088329e+01 + 5 4.903946838909668e+02 2.250512676135569e+02 4.353136382500617e+02 1.846372897187182e+01 + ME 6.959044445976827e-09 + +Event 115 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.614867481905578e+02 -2.044427690075313e+02 5.545544724970484e+02 -2.970474865501678e+02 + 3 5.299069281136578e+02 2.787046279045816e+01 -4.218547569036955e+02 3.194732443326408e+02 + 4 2.112135717499224e+02 1.481206856190749e+02 -1.329299397515352e+02 7.071821901566830e+01 + 5 9.739275194586149e+01 2.845162059799823e+01 2.302241581822219e-01 -9.314397679814118e+01 + ME 5.262055700672105e-06 + +Event 116 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.273084495291165e+02 2.026422934429813e+02 -1.202888698929615e+01 2.567532432494704e+02 + 3 3.558310071858317e+02 2.658361944151384e+02 -1.056345448838792e+02 -2.116321486469763e+02 + 4 4.261839858364658e+02 -3.197528890451962e+02 -4.295116688092089e+01 2.784709625693038e+02 + 5 3.906765574485857e+02 -1.487255988129233e+02 1.606145987540962e+02 -3.235920571717980e+02 + ME 4.624358515368805e-09 + +Event 117 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.398873526503558e+02 -1.697886094974675e+02 2.463425145650708e+02 -1.612780397150886e+02 + 3 3.484530288300061e+02 3.072641586090561e+02 1.508174714846008e+02 6.528660222484780e+01 + 4 4.599006329697289e+02 8.910216575675364e+00 -4.016585734725037e+02 -2.238293783277010e+02 + 5 3.517589855499093e+02 -1.463857656872640e+02 4.498587422832075e+00 3.198208158179418e+02 + ME 1.105305195728412e-08 + +Event 118 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.636830965937107e+02 -1.350752771701317e+02 -4.094705561989161e+01 -8.288645392330183e+01 + 3 5.340512912451782e+02 -4.440034731447416e+02 -2.645266954971570e+02 -1.345262981182612e+02 + 4 5.602763248554179e+02 5.415787847304525e+02 9.167439365323625e+01 1.104435859237256e+02 + 5 2.419892873056930e+02 3.749996558442061e+01 2.137993574638124e+02 1.069691661178373e+02 + ME 1.262861526356282e-06 + +Event 119 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.393958606639746e+01 5.505558390943226e+01 3.178415492333581e+01 6.849879016676002e+00 + 3 5.103236431617295e+02 1.902911879696914e+02 -2.878340806151939e+02 3.759933863611832e+02 + 4 5.716564501715113e+02 -6.229917649784055e+01 5.188259821571465e+02 -2.317962680222806e+02 + 5 3.540803206003611e+02 -1.830475953812831e+02 -2.627760564652883e+02 -1.510469973555788e+02 + ME 9.902458598773123e-08 + +Event 120 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.375361739991114e+02 2.755987077479748e+02 -1.573030807697318e+02 -5.529497863508248e+02 + 3 1.063537280575990e+02 -2.858383009670409e+01 1.513609572498959e+01 -1.013162313499492e+02 + 4 6.566870497058905e+01 3.794001125736358e+00 -5.133060130400937e+01 4.078178193435162e+01 + 5 6.904413929727009e+02 -2.508088787770071e+02 1.934975863487517e+02 6.134842357664223e+02 + ME 1.047555707673089e-05 + +Event 121 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.472844458410502e+02 -2.887724852567565e+02 -3.914139567665228e+02 -2.508502159986242e+02 + 3 1.439229258812056e+02 -7.748866294914934e+01 1.168245717185551e+02 -3.257813916319178e+01 + 4 5.996216437235047e+02 2.361653319523241e+02 3.405657659024143e+02 4.333439865751321e+02 + 5 2.091709845542395e+02 1.300958162535815e+02 -6.597638085444667e+01 -1.499156314133161e+02 + ME 2.627662664743703e-08 + +Event 122 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.721863109768987e+02 -3.366161482695965e+02 3.289037426473594e+02 -3.836416388601713e+01 + 3 3.043000907870284e+02 -6.182651453450124e+01 -1.228256199650947e+02 -2.714588264059560e+02 + 4 5.158404617584771e+02 2.163538140471089e+02 -2.337205323437163e+02 4.057796469704185e+02 + 5 2.076731364775960e+02 1.820888487569890e+02 2.764240966145166e+01 -9.595665667844543e+01 + ME 7.659638993033701e-09 + +Event 123 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.076427050299664e+02 2.733188279487669e+02 5.414201256136838e+01 -4.243425228923664e+02 + 3 5.243311343735359e+02 -5.185486655744496e+02 5.092607261139513e+01 5.862554931747282e+01 + 4 3.790262178945214e+02 1.868424378139138e+02 -5.104513483933528e+01 3.257992809881769e+02 + 5 8.899994270197607e+01 5.838739981176896e+01 -5.402295033342823e+01 3.991769258671668e+01 + ME 3.787386536404977e-07 + +Event 124 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.524096836537792e+02 3.931871421189147e+02 1.244094353277442e+02 -5.055339345672223e+02 + 3 4.453257968846718e+02 -2.749272877886793e+02 1.288694994577423e+02 3.257647984507225e+02 + 4 3.649512160194104e+02 -1.362256111675446e+02 -2.654954063631008e+02 2.101051216324038e+02 + 5 3.731330344213865e+01 1.796575683730912e+01 1.221647157761433e+01 -3.033598551590402e+01 + ME 8.261066912909652e-07 + +Event 125 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.915960233698098e+02 -1.654995845044201e+02 -3.447055388379847e+01 -9.017041984449874e+01 + 3 6.550796868804263e+02 4.495369576307071e+02 -2.048853220836558e+02 4.301952169447749e+02 + 4 4.328930401647467e+02 -1.738692079710811e+02 5.578157194523531e+01 -3.924975146085698e+02 + 5 2.204312495850170e+02 -1.101681651552061e+02 1.835743040222191e+02 5.247271750829378e+01 + ME 2.973582383458595e-07 + +Event 126 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.035701387136452e+02 9.136521656755120e+00 -8.511236795855700e+01 5.830250788488047e+01 + 3 5.780501404699309e+02 3.287868703966549e+02 4.051344723950227e+02 2.488116115242344e+02 + 4 2.667378796160922e+02 1.255353362675918e+02 -2.344633536281414e+02 -2.041841266398259e+01 + 5 5.516418412003318e+02 -4.634587283210018e+02 -8.555875080832428e+01 -2.866957067451323e+02 + ME 2.515865237403175e-08 + +Event 127 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.008254008745652e+02 -2.121113113583696e+02 -3.036077285076011e+01 2.111467188404314e+02 + 3 2.220883382942753e+02 -1.288724105068163e+02 -1.058087522116511e+02 -1.466957387652706e+02 + 4 4.817604596011059e+02 3.195498937336952e+02 -1.950871089920132e+02 3.031864537788441e+02 + 5 4.953258012300538e+02 2.143382813149065e+01 3.312566340544244e+02 -3.676374338540048e+02 + ME 4.676131547228827e-09 + +Event 128 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.497673085746553e+02 7.660884888714838e+01 -6.253597043077772e+02 1.589146934447123e+02 + 3 1.067691597532546e+02 6.343721766028852e+01 6.858194366252209e+01 5.169032688431987e+01 + 4 6.255741311782837e+02 -1.271462240130818e+02 5.209429149313172e+02 -3.221727963400119e+02 + 5 1.178894004938061e+02 -1.289984253435512e+01 3.583484571393804e+01 1.115677760109796e+02 + ME 2.770543351752477e-07 + +Event 129 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.455471401102499e+02 5.611838162748452e+01 -1.972996399049179e+02 1.349702832227318e+02 + 3 5.464479261367329e+02 3.973915006851447e+02 3.192093966153585e+02 -1.969535282111083e+02 + 4 3.628510278873775e+02 -2.872701579660765e+02 -1.541290438384745e+01 -2.211315607495373e+02 + 5 3.451539058656394e+02 -1.662397243465527e+02 -1.064968523265931e+02 2.831148057379138e+02 + ME 1.070544975104643e-08 + +Event 130 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.021391279871390e+02 7.662958214582304e+01 -5.633752971808340e+01 -3.723427656600568e+01 + 3 6.760797762746118e+02 2.243389930768460e+02 2.520516979585487e+02 -5.858547786175415e+02 + 4 4.648353497198453e+02 -1.876583671396737e+02 -1.546190406153392e+02 3.961681358600594e+02 + 5 2.569457460184036e+02 -1.133102080829954e+02 -4.109512762512606e+01 2.269209193234879e+02 + ME 1.135432974296378e-05 + +Event 131 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.920919318876586e+02 7.263675942251076e+01 -2.088562075937370e+02 3.237886174366762e+02 + 3 5.458102506861221e+02 3.135522126877631e+02 4.454057185571284e+02 -3.475033164249447e+01 + 4 5.478401415085880e+02 -3.922090216845467e+02 -2.494405778346952e+02 -2.899660360919773e+02 + 5 1.425767591763096e+01 6.020049574273062e+00 1.289106687130388e+01 9.277502977958795e-01 + ME 3.534866312485749e-07 + +Event 132 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.255682887750997e+02 -1.020202862582227e+01 -3.071270560190277e+02 4.263694597869199e+02 + 3 1.822944083831003e+02 -6.223997393813503e+01 7.452404233473399e+01 1.542841666731088e+02 + 4 3.498626937077320e+02 -7.824785520990122e+01 -9.684804908206219e+01 -3.269581517449581e+02 + 5 4.422746091340674e+02 1.506898577738587e+02 3.294510627663557e+02 -2.536954747150707e+02 + ME 1.108594715286765e-07 + +Event 133 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.629662388842297e+02 7.991123416805505e+01 -7.432810167831421e+01 3.461705049890879e+02 + 3 2.519974118268758e+02 4.092829737955621e+01 1.045933848073266e+02 -2.255832305283377e+02 + 4 4.540092238244609e+02 2.067709404411446e+02 -7.816124526092361e+01 -3.965614369124106e+02 + 5 4.310271254644332e+02 -3.276104719887559e+02 4.789596213191120e+01 2.759741624516604e+02 + ME 1.647282378507486e-08 + +Event 134 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.371391815360341e+02 2.182303519531752e+02 2.447820570023349e+02 4.254124567961070e+02 + 3 4.475096572574562e+02 8.761259551627978e+01 -1.064978001639930e+02 -4.257313061143341e+02 + 4 1.024195877641454e+02 3.874643372548357e+01 8.545199625557882e+01 -4.106631426450081e+01 + 5 4.129315734423644e+02 -3.445893811949385e+02 -2.237362530939207e+02 4.138516358272791e+01 + ME 1.830498670006412e-08 + +Event 135 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.611715485115952e+02 1.353574756360551e+02 1.270899083363582e+02 1.836765819053572e+02 + 3 4.982087211139469e+02 3.182740341581292e+02 1.027522253756155e+02 -3.692635226434683e+02 + 4 3.610184850208989e+02 -3.443761350776685e+02 -1.457446762716321e+01 -1.073639092485802e+02 + 5 3.796012453535586e+02 -1.092553747165159e+02 -2.152676660848105e+02 2.929508499866913e+02 + ME 3.450140123709077e-09 + +Event 136 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.165975957141717e+02 4.071301662611800e+02 -7.016168908300483e+01 -5.362762217357892e+01 + 3 5.429674882429235e+02 -4.587193013588839e+02 2.631983131614909e+02 1.229509812835685e+02 + 4 2.969286679985584e+02 3.813185169859018e+01 -7.853062280176133e+01 -2.838054563390252e+02 + 5 2.435062480443467e+02 1.345728339911383e+01 -1.145060012767249e+02 2.144820972290356e+02 + ME 2.237609615783897e-07 + +Event 137 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.164799518089247e+02 4.078481304962669e+02 7.086625433408588e+01 -4.575398022162616e+01 + 3 4.119129224428048e+02 1.032217184413981e+01 -1.307030352153061e+02 3.904899807028328e+02 + 4 4.185485375125854e+02 -3.640780696725425e+02 -1.159009525286994e+02 -1.708713160257731e+02 + 5 2.530585882356847e+02 -5.409223266786426e+01 1.757377334099197e+02 -1.738646844554335e+02 + ME 1.003736429836886e-08 + +Event 138 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.328295202229159e+02 -1.377487194047890e+01 -1.873512771356644e+02 1.375475821157613e+02 + 3 6.673431588212472e+02 -4.246598188414666e+02 4.577416587064386e+02 -2.355493658911680e+02 + 4 4.060704879661816e+02 3.031583118816545e+02 -2.670840197200184e+02 -4.067438437585880e+01 + 5 1.937568329896558e+02 1.352763789002910e+02 -3.306361850755688e+00 1.386761681512658e+02 + ME 2.109910701967184e-08 + +Event 139 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.641866696514709e+02 9.276406442189763e+01 3.425073851357022e+02 2.992537113580343e+02 + 3 4.084681019724289e+02 -1.718164587475395e+02 -6.269563677788108e+01 -3.652321891091058e+02 + 4 3.586483593020715e+02 2.437331083193391e+02 -1.380106438398361e+02 2.239997315310333e+02 + 5 2.686968690740283e+02 -1.646807139936973e+02 -1.418011045179850e+02 -1.580212537799619e+02 + ME 8.055587671756698e-05 + +Event 140 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.077745749323770e+02 -2.717749029281370e+02 -4.488259523209481e+02 -3.067305015739836e+02 + 3 3.836748848621314e+02 3.299395351490868e+02 1.859302801942361e+02 -6.145121094386256e+01 + 4 1.356054338659604e+02 5.736453748498839e+00 -2.020987384238928e+01 1.339682342633558e+02 + 5 3.729451063395316e+02 -6.390108596944862e+01 2.831055459691012e+02 2.342134782544908e+02 + ME 5.338203511033533e-07 + +Event 141 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.541592345202997e+02 5.064743234660293e+01 1.008919682868332e+02 -3.356849888331461e+02 + 3 5.737033413285019e+02 4.649244927868489e+02 -2.879027536526492e+02 1.734726038819985e+02 + 4 2.491572537229339e+02 -2.269136202053799e+02 7.415864097377920e+01 7.134453039277231e+01 + 5 3.229801704282646e+02 -2.886583049280719e+02 1.128521443920367e+02 9.086785455837524e+01 + ME 2.577339743408483e-06 + +Event 142 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.672503466682875e+02 -5.085474185662212e+02 -2.883041300906009e+01 4.310120131554451e+02 + 3 3.301134862993140e+02 3.214141834727917e+02 -2.596291776574526e+01 -7.066656493912240e+01 + 4 4.453287536751283e+02 2.428052104961861e+02 6.644020670411237e+01 -3.673540901349278e+02 + 5 5.730741335727044e+01 -5.567197540275682e+01 -1.164687592930690e+01 7.008641918605131e+00 + ME 1.403944944676275e-06 + +Event 143 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.961372424533693e+02 3.096839815776747e+02 -7.461011777250017e+01 3.803699846588918e+02 + 3 3.532673160900624e+02 -2.702239200247366e+02 1.096988588437250e+02 -1.993564396560228e+02 + 4 2.470296765764948e+02 -1.247422515683724e+02 9.161572144761085e+01 1.925346497822517e+02 + 5 4.035657648800727e+02 8.528219001543417e+01 -1.267044625188357e+02 -3.735481947851208e+02 + ME 2.805529113699061e-08 + +Event 144 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.484370908485413e+02 6.681262790792988e+01 4.372567917003315e+01 2.352554480611282e+02 + 3 1.333566163493899e+02 7.639041904632975e+01 -1.037373442449629e+02 -3.445365599013520e+01 + 4 6.759161690057641e+02 -2.745699937733856e+02 -8.241738839859462e+00 -6.175808123505841e+02 + 5 4.422901237963044e+02 1.313669468191260e+02 6.825340391478922e+01 4.167790202795912e+02 + ME 2.974748028483134e-07 + +Event 145 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.699419653731484e+02 -1.778511711731030e+02 -1.995508520752477e+02 3.764416313210162e+01 + 3 5.364082066653292e+02 -3.670657833361444e+02 9.343822714167079e+01 -3.798233439249868e+02 + 4 4.985199767048502e+02 3.642791687227051e+02 3.239621342782176e+01 3.387821420382697e+02 + 5 1.951298512566720e+02 1.806377857865423e+02 7.371641150575515e+01 3.397038754615279e+00 + ME 2.381985188899164e-08 + +Event 146 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.202675651747352e+02 -2.044738957939417e+02 6.060766212155786e+01 -5.509026682648763e+01 + 3 3.666300263497007e+02 1.440597763151976e+02 1.820522147186126e+02 -2.837628379214685e+02 + 4 2.848419345521625e+02 -2.522934903196281e+02 1.041889412010834e+02 -8.140999295636462e+01 + 5 6.282604739234017e+02 3.127076097983722e+02 -3.468488180412538e+02 4.202630977043208e+02 + ME 8.609187062299590e-09 + +Event 147 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.466917873161715e+02 -8.985124093282326e+01 1.062886307955967e+02 -4.634611021911086e+01 + 3 5.083338423321478e+02 -4.344326257841563e+02 1.725039954100384e+02 1.997847854117565e+02 + 4 1.758983079855465e+02 -2.529732669417202e+01 1.025981972445037e+02 -1.406195930035513e+02 + 5 6.690760623661345e+02 5.495811934111518e+02 -3.813908234501387e+02 -1.281908218909440e+01 + ME 1.307487794043808e-07 + +Event 148 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.170646172696436e+02 2.327689577119410e+02 -1.156815006470080e+02 -1.815664458486164e+02 + 3 3.480509574692189e+02 -2.600917732635422e+02 2.279827485885899e+02 3.893076960269328e+01 + 4 4.899885869304758e+02 -6.865708088891665e+01 -4.361073402046576e+02 2.125685968941702e+02 + 5 3.448958383306618e+02 9.597989644051779e+01 3.238060922630758e+02 -6.993292064824709e+01 + ME 3.278552965558282e-09 + +Event 149 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.565332013646126e+02 1.739097965881146e+01 1.427314035696600e+02 6.187037571403594e+01 + 3 1.287425867544281e+02 -3.692794701983710e+01 1.058940407929810e+02 6.322525205688030e+01 + 4 6.163211995179093e+02 3.680162870870676e+02 -3.480595054229867e+02 3.510988665583383e+02 + 5 5.984030123630491e+02 -3.484793197260416e+02 9.943406106034590e+01 -4.761944943292547e+02 + ME 9.540186842422195e-06 + +Event 150 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.336561333256779e+02 1.834876654089863e+02 -2.602841456593764e+01 -1.423024487443928e+02 + 3 1.741966417859597e+02 -7.277820045868700e+01 4.362439920231238e+01 -1.521338730912299e+02 + 4 6.077110042555056e+02 2.904143808356974e+02 1.411750271757576e+02 5.148220700387444e+02 + 5 4.844362206328570e+02 -4.011238457859966e+02 -1.587710118121321e+02 -2.203857482031216e+02 + ME 1.004960220938178e-07 + +Event 151 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.211746741680918e+02 -1.040856261513666e+02 -3.937271548256160e+01 -4.795073893018128e+01 + 3 2.923110311840379e+02 1.033353099237875e+01 -2.569705782408390e+02 -1.389427184406362e+02 + 4 6.933360159289847e+02 4.046737014260277e+02 5.364619473139211e+02 1.707706223054521e+02 + 5 3.931782787188853e+02 -3.109216062670399e+02 -2.401186535905205e+02 1.612283506536545e+01 + ME 6.201786615493041e-08 + +Event 152 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.221790270328912e+02 -1.025810599253255e+02 -2.803205211746587e+02 -1.212305943762748e+02 + 3 2.743866059556541e+02 -1.673110927218417e+02 2.121850586617832e+02 4.767083658571896e+01 + 4 5.652268340158242e+02 5.594619569444934e+02 -7.688643394315451e+01 -2.392005223436808e+01 + 5 3.382075329956306e+02 -2.895698042973262e+02 1.450218964560301e+02 9.747981002492389e+01 + ME 1.616361948953723e-08 + +Event 153 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.181242749149867e+02 -1.496553803635585e+02 3.218925844259839e+02 2.209442022162673e+02 + 3 2.742594598422451e+02 -1.018045508856852e+02 -1.318386065039126e+02 2.178822309575300e+02 + 4 3.466792897228672e+02 -1.619951176147566e+02 -1.965669238598627e+02 -2.351713337888010e+02 + 5 4.609369755199014e+02 4.134550488640003e+02 6.512945937791494e+00 -2.036550993849962e+02 + ME 6.745548566446043e-09 + +Event 154 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.415097258757403e+02 -2.050410225971519e+02 -1.222122769468913e+02 3.673263002217227e+01 + 3 2.736230574879776e+02 -2.193782751409555e+02 1.166795472694783e+02 1.145802480108935e+02 + 4 4.673057057314866e+02 1.745358467961844e+01 1.069490661195013e+02 -4.545678081949939e+02 + 5 5.175615109047961e+02 4.069657130584893e+02 -1.014163364420884e+02 3.032549301619280e+02 + ME 1.116641797231273e-07 + +Event 155 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.774233833471055e+02 -3.813733771182957e+02 -7.748207752183868e+01 2.765573391810157e+02 + 3 2.785548789953623e+02 5.565153575418104e+01 1.962114983217826e+02 -1.897281610795908e+02 + 4 3.469368907421938e+02 -2.485484467451775e+00 -3.410354529311985e+02 -6.366983876872375e+01 + 5 3.970848469153381e+02 3.282073258315664e+02 2.223060321312546e+02 -2.315933933270110e+01 + ME 2.731885210606192e-09 + +Event 156 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.830763202836453e+02 1.670390722374144e+02 -4.839353367414558e+02 2.790744228239374e+02 + 3 8.372937424277062e+01 -2.206118779177231e+01 -7.862990681346045e+01 1.847294938034042e+01 + 4 6.517262335322765e+02 -1.517360023471754e+02 4.537037704279378e+02 -4.425789847759814e+02 + 5 1.814680719413077e+02 6.758117901533359e+00 1.088614731269784e+02 1.450316125717036e+02 + ME 2.057611047580263e-06 + +Event 157 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.221466021800015e+02 1.004197184024976e+02 -1.831200458211014e+01 -1.973060148709808e+02 + 3 1.952944116425906e+02 5.947164367963718e+01 -1.637405152185915e+02 8.827272791082248e+01 + 4 5.043036849209497e+02 1.030300241331701e+02 2.995278680472508e+02 -3.924156941497569e+02 + 5 5.782553012564587e+02 -2.629213862153049e+02 -1.174753482465492e+02 5.014489811099153e+02 + ME 8.223265917270228e-08 + +Event 158 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.014796349232533e+02 6.324463617576037e+01 -5.143472614980268e+01 2.902491261215933e+02 + 3 5.569806323774449e+02 -2.837656127180183e+01 -3.396072279214705e+02 -4.405554747786710e+02 + 4 2.957632477700600e+02 2.349299171863052e+01 2.481969354528773e+02 -1.591296933428909e+02 + 5 3.457764849292423e+02 -5.836106662258913e+01 1.428450186183959e+02 3.094360419999686e+02 + ME 2.107441919556085e-08 + +Event 159 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.591538548774633e+02 -2.182240714207248e+02 -4.209612865776884e+01 -1.332925020488409e+02 + 3 6.478059984032091e+02 2.970279686703717e+02 4.046570960198610e+02 4.094870352471543e+02 + 4 2.116191389359584e+02 9.445193097144920e+01 -1.887137862457113e+02 1.576704095793058e+01 + 5 3.814210077833694e+02 -1.732558282210961e+02 -1.738471811163809e+02 -2.919615741562434e+02 + ME 1.306282576836063e-04 + +Event 160 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.355516328348965e+02 4.598601326351699e+02 1.086179643103352e+02 -2.520840091595789e+02 + 3 1.250913851056828e+02 2.412231230375017e+01 9.532685281942429e+01 -7.732244052228562e+01 + 4 1.403519283462577e+02 1.060977550664594e+02 6.322679457710809e+01 6.666560288390728e+01 + 5 6.990050537131626e+02 -5.900802000053793e+02 -2.671716117068678e+02 2.627408467979570e+02 + ME 1.451603428379081e-06 + +Event 161 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.037519486668242e+02 -4.556894118761883e+02 -3.789671218007896e+02 1.150977672109518e+02 + 3 1.320163331334137e+02 -1.009130349982057e+02 -4.400086191303104e+01 7.286148318799009e+01 + 4 4.535812871805164e+02 3.214261890918494e+02 2.240876447507702e+02 -2.284861407531699e+02 + 5 3.106504310192462e+02 2.351762577825446e+02 1.988803389630506e+02 4.052689035422793e+01 + ME 1.159331854997693e-06 + +Event 162 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.806951845247628e+02 2.263617881792713e+02 1.983837182497826e+02 -2.330945402750066e+02 + 3 6.226282282350211e+02 -5.665599382822433e+02 -1.169170394997212e+02 2.302306513115116e+02 + 4 1.991674245974932e+02 8.131880151281558e+01 -1.065651751520856e+02 1.473050541771148e+02 + 5 2.975091626427234e+02 2.588793485901565e+02 2.509849640202417e+01 -1.444411652136198e+02 + ME 1.315395566850940e-05 + +Event 163 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.775491654024494e+02 -2.389339247301170e+02 -3.569712417423736e+01 -2.901373247874839e+02 + 3 4.057858154423257e+02 1.211038531074871e+02 -1.075956188633677e+02 3.720472652474713e+02 + 4 3.781881739343797e+02 -1.691066352891619e+02 3.211864194868994e+02 -1.061533077307745e+02 + 5 3.384768452208452e+02 2.869367069117919e+02 -1.778936764492943e+02 2.424336727078715e+01 + ME 8.718978226107064e-09 + +Event 164 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.565339415542259e+02 -2.071226667867270e+02 -3.991710195847456e+02 7.865073310444370e+01 + 3 1.850572037534592e+02 -1.814377768563993e+02 3.634341818882844e+01 2.378601439647877e+00 + 4 1.921815529404395e+02 -8.912051195266237e+01 -2.935060714794936e+01 1.677194845566282e+02 + 5 6.662273017518758e+02 4.776809555957888e+02 3.921782085438665e+02 -2.487488191007194e+02 + ME 1.119182047356598e-07 + +Event 165 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.608706475726781e+02 -7.352587451384150e+01 2.926483329335021e+01 1.400602747381999e+02 + 3 4.368533973739730e+02 5.240491187105322e+01 3.687621041233546e+02 2.282742354526359e+02 + 4 6.868232300507626e+02 -1.068225318099977e+02 -4.089841618100871e+02 -5.413382042896707e+02 + 5 2.154527250025866e+02 1.279434944527859e+02 1.095722439338239e+01 1.730036940988348e+02 + ME 3.980947278072763e-07 + +Event 166 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.403514225384915e+02 -4.364754696013562e+02 2.109194731869347e+00 5.825882821969265e+01 + 3 1.069411967678109e+02 -8.113600881769634e+01 2.298926129200184e+01 6.576367921972140e+01 + 4 6.275848674095951e+02 5.117980899513774e+02 2.830058390250812e+02 -2.276690053594266e+02 + 5 3.251225132841022e+02 5.813388467675107e+00 -3.081042950489525e+02 1.036464979200126e+02 + ME 2.783827794882275e-07 + +Event 167 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.918955211023957e+02 -1.623891733199484e+02 -1.011860556445403e+02 -1.466388593530866e+01 + 3 1.871901284559375e+02 -7.878242912860118e+01 -1.694437551331696e+02 -1.105834066746689e+01 + 4 6.102188811441905e+02 -1.343591330747665e+02 5.476768981515615e+02 2.331624358582424e+02 + 5 5.106954692974762e+02 3.755307355233163e+02 -2.770470873738516e+02 -2.074402092554668e+02 + ME 2.568786304957170e-07 + +Event 168 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.216787680814040e+02 -1.189606477208518e+02 1.547783496418446e+02 1.050404826439369e+02 + 3 5.126462182586652e+02 -1.590819643619216e+02 4.209999834531878e+02 2.454752281638187e+02 + 4 4.272224542767366e+02 7.779140932193576e+01 -3.932611112348421e+02 -1.476929939580155e+02 + 5 3.384525593831932e+02 2.002512027608387e+02 -1.825172218601902e+02 -2.028227168497397e+02 + ME 7.118190055179377e-06 + +Event 169 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.698429879806195e+02 1.455074202745656e+02 2.183111666053455e+01 -4.462100697484893e+02 + 3 6.804356369583268e+02 -3.541873855898968e+02 2.380635543828889e+01 5.804973810213299e+02 + 4 2.494072380391389e+02 2.129062287565783e+02 5.332877252319552e+01 -1.184523117720060e+02 + 5 1.003141370219151e+02 -4.226263441246941e+00 -9.896624462201898e+01 -1.583499950083472e+01 + ME 4.923593830667450e-07 + +Event 170 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.947525114000201e+02 -2.120980687331741e+02 -5.339573876161244e+02 1.537350554247554e+02 + 3 5.304186438182742e+02 9.762854658278449e+01 4.210999845330489e+02 -3.073880408025275e+02 + 4 2.725467755647546e+02 1.192808703849826e+02 2.108782617781282e+02 1.248366033676855e+02 + 5 1.022820692169514e+02 -4.811348234593063e+00 -9.802085869505262e+01 2.881638201008671e+01 + ME 3.549586033645725e-08 + +Event 171 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.224797308226666e+02 -5.375302845466814e+02 -1.836636776324525e+01 3.133765865782073e+02 + 3 4.124091288166617e+02 2.382619823047310e+02 3.210619006365504e+01 -3.350846309205101e+02 + 4 1.838688075380517e+02 8.727789435881400e+01 1.413249053618683e+02 -7.885162437271515e+01 + 5 2.812423328226196e+02 2.119904078831364e+02 -1.550647276622782e+02 1.005596687150179e+02 + ME 4.002848397017290e-08 + +Event 172 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.024481242448970e+02 1.796358471701274e+01 -1.746853017443778e+02 1.007352867115970e+02 + 3 5.859822858732682e+02 -2.176592218037537e+01 3.060477525768988e+02 4.992356729356663e+02 + 4 6.608756657583934e+02 2.436588734248681e+01 -1.382800479300340e+02 -6.457875637313563e+02 + 5 5.069392412344163e+01 -2.056354987912417e+01 6.917597097512810e+00 4.581660408409283e+01 + ME 1.978331600650350e-05 + +Event 173 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.801691995127821e+02 -4.215202314930911e+02 3.958855854346895e+02 -4.681450363238425e+01 + 3 2.617744476703428e+02 1.599633143319359e+02 -6.847827136272014e+01 -1.955717921179559e+02 + 4 2.895562615833316e+02 -6.776676019363940e+01 -1.625404652143167e+02 2.298501511917842e+02 + 5 3.685000912335436e+02 3.293236773547946e+02 -1.648668488576527e+02 1.253614455855600e+01 + ME 1.886964479653412e-08 + +Event 174 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.432224768586807e+02 2.123358321375092e+02 -9.137617595590741e+01 2.537036804604029e+02 + 3 2.662389127170578e+02 5.658820252344633e+01 1.140858201862947e+02 2.338062437411519e+02 + 4 6.440666757949747e+02 -7.559162042568610e+01 -7.005998003003262e+00 -6.395769740875527e+02 + 5 2.464719346292862e+02 -1.933324142352695e+02 -1.570364622738393e+01 1.520670498859976e+02 + ME 1.518314575518000e-06 + +Event 175 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.700131770443522e+02 1.537969471106571e+02 -2.117531928678224e+02 -6.643944722308593e+01 + 3 4.962752034245967e+02 2.128838609308023e+02 -7.929139726182322e+01 4.412283010070720e+02 + 4 2.542695012796545e+02 6.381377149808605e+00 2.420365821040695e+02 -7.765661742605157e+01 + 5 4.794421182513969e+02 -3.730621851912680e+02 4.900800802557612e+01 -2.971322363579346e+02 + ME 1.170781939807770e-08 + +Event 176 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.595250760942820e+02 -3.781994799062178e+02 -1.953391788690975e+02 -3.631474485325830e+02 + 3 2.822193451057852e+02 2.531285812406774e+02 1.162602688787051e+02 -4.535669731441308e+01 + 4 3.615103193569824e+02 1.649061800696572e+00 -1.746256934103365e+02 3.165325556680135e+02 + 5 2.967452594429505e+02 1.234218368648438e+02 2.537046034007288e+02 9.197159017898271e+01 + ME 7.789186697022053e-08 + +Event 177 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.396956142606758e+02 -4.105423218103476e+01 1.309817345502700e+02 2.594609561949185e+01 + 3 5.462636835449132e+02 1.226445420924370e+02 -2.117083223539773e+02 -4.884075291199530e+02 + 4 5.587261113115391e+02 1.501945737199239e+02 1.776131549773776e+02 5.080059297541580e+02 + 5 2.553145908828726e+02 -2.317848836313263e+02 -9.688656717367031e+01 -4.554449625369679e+01 + ME 2.723404047682859e-08 + +Event 178 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.088496927414228e+02 -1.341610898283948e+02 -9.277802989315117e+01 3.749014675884302e+02 + 3 3.588364211022617e+02 3.077768962673020e+02 -8.016131802617929e+01 -1.661659481538016e+02 + 4 4.878368684282138e+02 -9.295843092916139e+01 3.953926925341255e+02 -2.702002202213190e+02 + 5 2.444770177281010e+02 -8.065737550974565e+01 -2.224533446147950e+02 6.146470078669019e+01 + ME 3.767636900015962e-09 + +Event 179 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.795210385243067e+02 4.384022819240558e+02 2.074574650990888e+02 -4.759345345481806e+02 + 3 4.130397129911727e+02 -1.166933801910930e+02 -8.188519392843645e+01 3.876587088441452e+02 + 4 1.323830995986130e+02 -9.020264614934970e+01 2.283949186981634e+01 9.416541455396502e+01 + 5 2.750561488859078e+02 -2.315062555836131e+02 -1.484117630404687e+02 -5.889588849929628e+00 + ME 3.571860673344391e-07 + +Event 180 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.390143503225903e+02 4.332330366673434e+02 3.187886675509226e+02 -3.491978285705228e+01 + 3 2.121543783556901e+02 -1.539133636629621e+02 -6.982443694241506e+01 -1.282369086773257e+02 + 4 3.525195899359830e+02 3.116523503389995e+01 -3.453504862598982e+02 -6.349670112665113e+01 + 5 3.963116813857368e+02 -3.104849080382812e+02 9.638625565139060e+01 2.266533926610290e+02 + ME 3.060789343119622e-09 + +Event 181 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.871910159031972e+02 -2.482278605801524e+02 -4.059757113335108e+02 1.045071146661306e+02 + 3 3.939631927235097e+02 3.843058254746378e+02 -6.751539482803383e+01 -5.438475143248532e+01 + 4 1.320318755627034e+02 1.173355086182816e+02 5.989553638691457e+01 -8.793139531371159e+00 + 5 4.868139158105890e+02 -2.534134735127669e+02 4.135955697746300e+02 -4.132922370227404e+01 + ME 3.492967151344021e-08 + +Event 182 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.634643361350387e+02 6.329356748624841e+01 1.470860510178148e+02 -3.286650420895970e+01 + 3 5.024217881602812e+02 -4.023414251461456e+02 -1.657157218704940e+02 2.511719139443817e+02 + 4 3.341400639218185e+02 -1.066841963158695e+01 3.309585949660332e+02 -4.474567642073586e+01 + 5 4.999738117828613e+02 3.497162772914842e+02 -3.123289241133534e+02 -1.735597333146860e+02 + ME 8.632936534855090e-09 + +Event 183 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.995054708334443e+02 -8.618442988121295e+01 -1.317716324156771e+02 -4.740402897740854e+02 + 3 3.459503058168963e+02 2.817467670894948e+02 -1.997611117656004e+02 1.989652119324885e+01 + 4 9.946167962959554e+01 4.869462143288413e+01 -5.138636892793453e+00 8.657397974641351e+01 + 5 5.550825437200641e+02 -2.442569586411661e+02 3.366713810740709e+02 3.675697888344230e+02 + ME 7.044690259607796e-07 + +Event 184 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.245304000524383e+02 -3.884223434549886e+02 -1.908539669459333e+02 2.963696795981437e+02 + 3 2.116914247222055e+02 -1.518308824598570e+02 -9.307419176861660e+01 1.144457830546720e+02 + 4 1.497828062091507e+02 5.152418898782464e+01 3.289577420345211e+01 -1.367406853302645e+02 + 5 6.139953690162062e+02 4.887290369270209e+02 2.510323845110977e+02 -2.740747773225512e+02 + ME 6.178399840070216e-03 + +Event 185 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.823567631295894e+02 -3.287439770113579e+02 -1.408601587358858e+02 -1.352128232476263e+02 + 3 2.729601432779185e+02 1.050401758721174e+02 1.518250728524651e+02 2.010545909060524e+02 + 4 4.415844326987421e+02 1.841356276793078e+02 -4.001213558867116e+02 3.152431417805641e+01 + 5 4.030986608937497e+02 3.956817345993269e+01 3.891564417701323e+02 -9.736608183648252e+01 + ME 2.803519234876577e-09 + +Event 186 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.441943751899475e+02 -3.172061664525858e+01 -2.165035809528646e+02 -1.084015442170439e+02 + 3 1.531216649467747e+02 -1.072415316939106e+02 -6.400357868200578e+01 -8.859480838013376e+01 + 4 6.690842740855512e+02 -1.683192937014951e+02 5.498056012764862e+02 3.421347424647482e+02 + 5 4.335996857777275e+02 3.072814420406643e+02 -2.692984416416161e+02 -1.451383898675707e+02 + ME 1.942296364573588e-07 + +Event 187 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.527752494388038e+02 -4.473442706504161e+02 6.157878466879122e+01 -3.311469914302317e+01 + 3 4.846819923263977e+02 1.808338503617970e+02 -3.063074014757465e+02 3.292286865538744e+02 + 4 4.767615702494118e+02 2.297431564813572e+02 3.180144106698234e+02 -2.708994491005698e+02 + 5 8.578118798538658e+01 3.676726380726194e+01 -7.328579386286808e+01 -2.521453831028136e+01 + ME 2.286823294465450e-07 + +Event 188 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.763744608693619e+02 1.879714650814332e+02 1.531545296300208e+02 -1.326395905820623e+02 + 3 1.675411521312716e+02 -1.163100541390447e+02 6.574161087985154e+00 -1.204109188140162e+02 + 4 6.612223670090391e+02 1.024684272345772e+02 -3.695690310853153e+02 5.386408555946807e+02 + 5 3.948620199903277e+02 -1.741298381769656e+02 2.098403403673094e+02 -2.855903461986023e+02 + ME 2.437697639939641e-07 + +Event 189 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.783469474210135e+02 -8.658737187334033e+01 1.356909096492871e+02 4.504513360815114e+02 + 3 4.456648861487533e+01 -2.142659180653916e+01 -3.868877590386525e+01 -5.500153641150114e+00 + 4 7.225573371875216e+02 1.692206577779366e+02 -1.495772879551334e+02 -6.863527587419686e+02 + 5 2.545292267765902e+02 -6.120669409805750e+01 5.257515420971166e+01 2.414015763016073e+02 + ME 4.036282675949279e-05 + +Event 190 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.849447494768666e+02 4.417222124371036e+02 3.063930417948521e+02 -2.305756945558716e+02 + 3 8.747756552706325e+01 -7.131945592982620e+01 5.022797529361166e+01 -6.558214263010734e+00 + 4 6.441296778117606e+02 -3.837545514381532e+02 -5.018072724050934e+02 1.257972473854055e+02 + 5 1.834480071843091e+02 1.335179493087578e+01 1.451862553166296e+02 1.113366614334768e+02 + ME 6.370683171609409e-08 + +Event 191 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.324822165476273e+02 -6.253195280175738e+02 7.607762994717295e+01 -5.675769860115388e+01 + 3 9.968007454278923e+01 -5.919441699588452e+01 6.439562903151095e+01 4.780524258916985e+01 + 4 5.616099301916483e+01 -9.982478114887614e+00 1.074288744286907e+00 -5.525625006529460e+01 + 5 7.116767158904186e+02 6.944964231283459e+02 -1.415475477229708e+02 6.420870607727863e+01 + ME 1.892760946430744e-05 + +Event 192 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.369395837007370e+02 -4.355765469733416e+00 2.422016200467210e+02 -3.636421350153062e+02 + 3 3.489363876291521e+02 2.257513727555905e+02 -9.443187595205355e+01 -2.487479469559987e+02 + 4 1.988200442993520e+02 -6.004084227260260e+01 -1.441955006989126e+02 1.230128645816471e+02 + 5 5.153039843707585e+02 -1.613547650132545e+02 -3.574243395754773e+00 4.893772173896577e+02 + ME 2.426855843003512e-07 + +Event 193 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.952170711629282e+02 -2.448161671907030e+02 6.058136449560859e+01 -1.534537769620589e+02 + 3 4.390044396065631e+02 -3.923286441491611e+02 -3.710622564906001e+01 -1.934586803233042e+02 + 4 4.491243422525343e+02 3.349194872100994e+02 5.492135841287631e+01 2.941517572287816e+02 + 5 3.166541469779751e+02 3.022253241297649e+02 -7.839649725942489e+01 5.276070005658150e+01 + ME 2.285120117479005e-06 + +Event 194 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.033148328845123e+02 3.807229676197025e+02 4.722829680298756e+01 -1.244281492773959e+02 + 3 3.402574757440810e+02 -4.112898360893270e+01 3.368414662709728e+02 -2.492755718980822e+01 + 4 3.318299773052009e+02 6.453189644180644e+01 -3.237215919515892e+02 3.392785115982090e+01 + 5 4.245977140662053e+02 -4.041258804525762e+02 -6.034817112237118e+01 1.154278553073832e+02 + ME 2.538255298147542e-09 + +Event 195 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.009160799820447e+02 1.127718590509784e+02 2.578905406128325e+02 1.064211635924338e+02 + 3 5.195297064167323e+02 3.024829678234382e+02 7.496264536843978e+01 -4.156871080819640e+02 + 4 2.228454712975530e+02 -1.162059794317317e+02 -1.900820329549402e+02 -5.009507945643892e+00 + 5 4.567087423036699e+02 -2.990488474426849e+02 -1.427711530263320e+02 3.142754524351741e+02 + ME 9.941318343264585e-09 + +Event 196 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.865816169777639e+02 -2.082718992755388e+02 -1.168755264994778e+02 3.039872922718519e+02 + 3 4.950634710774064e+02 4.481345969831610e+02 -1.338922043908974e+00 2.103840076377247e+02 + 4 5.009936462013424e+02 -2.363057974813166e+02 2.672200856348095e+01 -4.409536686196952e+02 + 5 1.173612657434876e+02 -3.556900226305540e+00 9.149243997990575e+01 -7.341763128988138e+01 + ME 9.913397566942690e-08 + +Event 197 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.200952246637107e+01 -4.092854273592183e+01 4.451595293266989e+01 1.372462023217837e+01 + 3 2.631639131516305e+02 1.236751000292302e+02 -2.240103694280010e+02 6.147413445319324e+01 + 4 4.924430755200161e+02 6.566832142306471e+01 -3.082242226360131e+02 3.783988408670338e+02 + 5 6.823834888619823e+02 -1.484148787163730e+02 4.877186391313444e+02 -4.535975955524060e+02 + ME 1.851175943167253e-06 + +Event 198 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.104475683108871e+02 -1.076092727069166e+02 -1.243307094385729e+01 2.154828346252987e+01 + 3 4.258110791144970e+02 -1.061255031183438e+02 3.244981883629734e+02 2.544668513454731e+02 + 4 5.489837505506223e+02 -1.103287384131403e+02 -5.228663656420100e+02 -1.257835105612362e+02 + 5 4.147576020239941e+02 3.240635142384003e+02 2.108012482228937e+02 -1.502316242467666e+02 + ME 1.495493137410727e-08 + +Event 199 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.945214729162650e+02 3.938714004469920e+02 1.610598617964415e+01 1.590942208647369e+01 + 3 4.307182563216121e+02 5.676770947025452e+01 3.019258642913346e+02 -3.018880851609781e+02 + 4 6.132249141587980e+02 -4.789484991716053e+02 -3.037239430541912e+02 2.332485732045241e+02 + 5 6.153535660332509e+01 2.830938925435878e+01 -1.430790741678791e+01 5.273008986998035e+01 + ME 3.304935820785736e-07 + +Event 200 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.680965384249502e+02 -4.164985458027556e+00 3.568534147325900e+02 -9.018511457139306e+01 + 3 1.116595944155914e+02 -3.841516463813660e+01 1.308374745062447e+01 1.040238227692460e+02 + 4 5.078831428275766e+02 -3.645818734439147e+02 -2.334033354278477e+02 2.656091627480076e+02 + 5 5.123607243318818e+02 4.071620235400788e+02 -1.365338267553666e+02 -2.794478709458606e+02 + ME 2.382434492971968e-07 + +Event 201 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.403128193251626e+02 1.213134048128906e+02 -5.665569190553462e+01 4.196281275587442e+01 + 3 5.694904595392484e+02 2.782425801842745e+02 1.994110039347696e+02 4.551216338390752e+02 + 4 4.865766137247841e+02 -3.320140599055400e+02 -2.710610759019412e+02 -2.303244628340644e+02 + 5 3.036201074108052e+02 -6.754192509162502e+01 1.283057638727062e+02 -2.667599837608849e+02 + ME 1.150542970280877e-07 + +Event 202 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.648494953542231e+02 1.475915136963884e+02 -2.626638545079028e+02 -2.057658836641568e+02 + 3 4.772142399752358e+02 -2.858814296920361e+02 -2.698032465892514e+02 2.705761392330797e+02 + 4 3.044384819161786e+02 -9.936314325722023e+01 2.866772864774832e+02 2.501776271730772e+01 + 5 3.534977827543630e+02 2.376530592528679e+02 2.457898146196709e+02 -8.982801828623059e+01 + ME 5.555671989034623e-09 + +Event 203 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.932094880517371e+01 1.034008155560684e+01 3.499022683723037e+01 1.465959597811796e+01 + 3 2.173576252233972e+02 7.202316342302500e+01 2.050015172626940e+02 -5.601704498491760e+00 + 4 5.734773652773411e+02 -2.838136097561228e+02 1.954238788160291e+02 4.584055311524263e+02 + 5 6.698440606940878e+02 2.014503647774911e+02 -4.354156229159533e+02 -4.674634226320525e+02 + ME 1.791563677470585e-04 + +Event 204 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.908212834725718e+02 2.977981722293325e+02 4.775358544068218e+02 -1.798486735480492e+02 + 3 4.393058230892194e+02 -4.077733598319210e+02 -1.229004842814027e+02 -1.077309805714205e+02 + 4 7.659681746343537e+01 2.011886749910355e+01 -6.038949216792007e+01 4.260766189056932e+01 + 5 3.932760759747737e+02 8.985632010348476e+01 -2.942458779574990e+02 2.449719922289005e+02 + ME 7.449435640957399e-06 + +Event 205 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.981880635358695e+02 2.184458843478823e+02 1.617999572875588e+02 2.909568754569333e+02 + 3 3.216615163919838e+02 -4.871917465073481e+01 3.144534008054084e+02 -4.702799029147248e+01 + 4 1.852586967674288e+02 1.516243001875516e+02 5.093442076970067e+00 -1.063245652161804e+02 + 5 5.948917233047191e+02 -3.213510098846994e+02 -4.813468001699367e+02 -1.376043199492804e+02 + ME 7.747079346841243e-09 + +Event 206 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.823899014055036e+02 1.390835876764512e+01 3.318403571700483e+01 1.788056304052877e+02 + 3 4.881690514074010e+02 5.489817729671770e+01 -2.514792759478631e+02 -4.147931853951296e+02 + 4 5.532771902400449e+02 -1.644494445187262e+02 1.888131751045239e+02 4.933777602855134e+02 + 5 2.761638569470506e+02 9.564290845436338e+01 2.948206512633433e+01 -2.573902052956715e+02 + ME 1.173442887132916e-06 + +Event 207 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.938861958251189e+02 2.992968080115895e+02 -3.402144065306870e+02 1.964666707857949e+02 + 3 3.044454630324485e+02 -3.028110458731305e+02 -2.191514037003857e+01 2.263265518723672e+01 + 4 2.202180359402748e+02 -1.939237559167997e+02 -5.680289179173080e+01 -8.753851568658551e+01 + 5 4.814503052021581e+02 1.974379937783406e+02 4.189324386924565e+02 -1.315608102864461e+02 + ME 1.317461659771817e-08 + +Event 208 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.898839499787492e+02 2.406651709414215e+01 -5.533524123801429e+01 2.835339808336385e+02 + 3 2.168122352910970e+02 1.569806903165401e+02 -1.452119627527829e+02 3.575044213920987e+01 + 4 3.762784182507863e+02 3.600471233079040e+02 -8.530266455519369e+00 -1.089896857194042e+02 + 5 6.170253964793670e+02 -5.410943307185862e+02 2.090774704463165e+02 -2.102947372534441e+02 + ME 1.861722657203564e-08 + +Event 209 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.204279908517810e+02 -2.514114625724550e+02 2.338847634961811e+01 1.972798848908106e+02 + 3 4.146640535559625e+02 1.131670399568331e+02 -3.642791244988921e+02 -1.626044828200972e+02 + 4 3.813647803536319e+02 -7.443149120704009e+00 1.658934600489188e+02 -3.433118919267706e+02 + 5 3.835431752386247e+02 1.456875717363259e+02 1.749971881003552e+02 3.086364898560572e+02 + ME 1.150503000707694e-08 + +Event 210 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.750782658901178e+02 6.150161642286470e+01 3.397425940367913e+02 1.465476936620454e+02 + 3 3.753847414636021e+02 3.522640303812288e+01 2.877708085052045e+02 2.384549568051627e+02 + 4 3.679623986676975e+01 -1.418616000697859e+01 -1.464605117059102e+01 -3.063020270415600e+01 + 5 7.127407527795107e+02 -8.254185945400904e+01 -6.128673513714049e+02 -3.543724477630520e+02 + ME 2.348655207677071e-04 + +Event 211 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.755660145440862e+02 -2.198570660497881e+01 3.262914547838685e+01 1.711005348715321e+02 + 3 3.842357993703558e+02 -1.193495468980239e+02 2.697221007833122e+02 2.462576364745863e+02 + 4 3.193436063508752e+02 3.079641211241163e+02 6.340526995545158e+01 5.584094160479156e+01 + 5 6.208545797346827e+02 -1.666288676211136e+02 -3.657565162171507e+02 -4.731991129509098e+02 + ME 1.854083049041212e-07 + +Event 212 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.286124870619989e+02 1.947671256067593e+02 2.039384905960800e+02 1.687039581318287e+02 + 3 2.534140104196739e+02 -1.089594202454936e+02 2.209716328642431e+02 5.931309202915249e+01 + 4 6.082520999117173e+02 1.448363181074745e+02 -4.014492274390982e+02 -4.333954035204289e+02 + 5 3.097214026066098e+02 -2.306440234687402e+02 -2.346089602122494e+01 2.053783533594477e+02 + ME 1.922370423888014e-08 + +Event 213 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.669993751556151e+02 -4.598496409826350e+02 -7.229659848051253e+01 3.237279737111812e+02 + 3 2.092334596630099e+02 2.048758411569909e+02 -3.638525763691983e+01 2.192358044350438e+01 + 4 4.459773655818120e+02 -9.956047386297783e+00 1.351965327017321e+02 -4.248747877636002e+02 + 5 2.777897995995633e+02 2.649298472119419e+02 -2.651467658429977e+01 7.922323360891461e+01 + ME 4.929779471520637e-08 + +Event 214 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.625339438015197e+02 3.062049422550726e+01 -5.616013724447026e+01 1.494178945298839e+02 + 3 5.337445472246160e+02 -5.164508962454078e+02 9.025334708476193e+01 1.000802018349427e+02 + 4 1.876106068022419e+02 -1.103443290851433e+02 7.041196210723921e+01 -1.344024717617341e+02 + 5 6.161109021716221e+02 5.961747311050440e+02 -1.045051719475309e+02 -1.150956246030925e+02 + ME 1.813529992150463e-08 + +Event 215 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.723879972712585e+02 2.234999350439466e+01 5.681683787000765e+02 6.567488603630498e+01 + 3 5.480386719020227e+02 2.169918591497192e+02 -4.867917566707426e+02 1.276507132776535e+02 + 4 1.691288617700993e+02 -6.631329221231212e+01 -1.308191347758221e+02 -8.422275901512094e+01 + 5 2.104444690566196e+02 -1.730285604418016e+02 4.944251274648834e+01 -1.091028402988376e+02 + ME 5.373075871099232e-08 + +Event 216 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.029822916324049e+02 2.312736480112502e+01 9.957621754525783e+01 -1.245207960932006e+01 + 3 5.228603101684611e+02 -4.839212819316630e+02 1.358805374086467e+02 -1.440124175083948e+02 + 4 6.978795308799915e+02 5.680185838524440e+02 -2.867570723039521e+02 2.866375926203802e+02 + 5 1.762778673191431e+02 -1.072246667219058e+02 5.130031735004759e+01 -1.301730955026653e+02 + ME 4.358550014220270e-05 + +Event 217 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.167243056528579e+02 1.524729497764623e+02 -3.092700529235155e+02 2.340153432427175e+02 + 3 2.420772334393019e+02 1.940876116374085e+02 1.438364686179607e+02 1.557100684050790e+01 + 4 2.560961474686904e+02 1.653992903559016e+02 -1.049098293922634e+02 -1.649916337120025e+02 + 5 5.851023134391495e+02 -5.119598517697725e+02 2.703434136978181e+02 -8.459471637122287e+01 + ME 4.729279843215788e-09 + +Event 218 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.191584476049009e+02 -2.558241509232277e+01 5.053737346676259e+02 1.160535310349098e+02 + 3 4.811621620037556e+02 2.736858157273282e+02 -3.947269007435494e+02 2.835091256357403e+01 + 4 3.658297349903177e+02 -3.118098839557957e+02 -2.678070504259039e+00 -1.913081786253101e+02 + 5 1.338496554010259e+02 6.370648332079029e+01 -1.079687634198174e+02 4.690373502682655e+01 + ME 1.147777165963028e-08 + +Event 219 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.056249374264288e+02 2.080046640325057e+01 -9.374879826474521e+00 2.043552473445915e+02 + 3 3.816677590094030e+02 -3.102683269227689e+02 -2.213707035898100e+02 -1.997135869083598e+01 + 4 4.652594638262414e+02 4.137417371803165e+02 5.174203782271518e+01 2.064144014279245e+02 + 5 4.474478397379265e+02 -1.242738766607982e+02 1.790035455935694e+02 -3.907982900816800e+02 + ME 1.067387772930822e-08 + +Event 220 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.509318149012606e+02 -2.007423466948322e+02 -1.490284238622257e+02 2.144329392218188e+01 + 3 6.855319233176400e+02 5.660933754166980e+02 2.752308514532210e+02 2.715516278817844e+02 + 4 3.841620255253093e+02 -3.525889260783147e+02 -9.880530052663002e+01 -1.161852987709352e+02 + 5 1.793742362557902e+02 -1.276210264355110e+01 -2.739712706436526e+01 -1.768096230330310e+02 + ME 6.889411605308702e-05 + +Event 221 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.326044260078135e+02 -1.267123948779659e+02 -3.623143164937092e+01 1.466922430768171e+01 + 3 4.838676388808951e+02 -8.498426264469487e+01 -3.969280642095542e+02 2.633508665293622e+02 + 4 4.068580325182036e+02 1.222413641068804e+02 3.430383967533347e+02 1.814253727535772e+02 + 5 4.766699025930878e+02 8.945529341578035e+01 9.012109910559042e+01 -4.594454635906212e+02 + ME 1.083425653861575e-07 + +Event 222 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.235249191113400e+02 5.899149719992188e+02 1.986167723905411e+02 -3.653803893380105e+01 + 3 1.389939159797709e+02 -2.651253992124958e+01 -1.209781885374505e+02 -6.309256536639511e+01 + 4 6.073928038344545e+02 -5.826614920857786e+02 3.086798087831638e+01 1.687565451967728e+02 + 5 1.300883610744344e+02 1.925906000780938e+01 -1.085065647314070e+02 -6.912594089657664e+01 + ME 1.833550731586346e-08 + +Event 223 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.513921720685541e+02 -1.134255090057421e+02 -9.735296175095162e+01 -4.259248146678863e+02 + 3 3.148626886899702e+02 2.189368402500764e+02 4.819786486657080e+01 2.210930540127696e+02 + 4 4.219582225753618e+02 -2.567437085475602e+02 -2.191804642337469e+02 2.531626627654307e+02 + 5 3.117869166661143e+02 1.512323773032259e+02 2.683355611181276e+02 -4.833090211031404e+01 + ME 9.051176279050939e-09 + +Event 224 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.315611776804204e+02 1.282183320794628e+02 -4.111637334587468e+02 -2.737688236334926e+01 + 3 1.674866220995890e+02 6.888658801083713e+01 -8.524503602723902e+01 1.266478993401409e+02 + 4 2.645671277337115e+02 -2.034555111374055e+02 -9.264145879346843e+01 1.414891521555669e+02 + 5 6.363850724862791e+02 6.350591047105598e+00 5.890502282794542e+02 -2.407601691323586e+02 + ME 3.520751797095715e-08 + +Event 225 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.542911364008525e+02 -6.906505534545300e+00 1.338332937438159e+02 -7.646374591170158e+01 + 3 6.009262400854108e+02 -8.940736359077168e+01 4.411714460658599e+01 -5.925979639778541e+02 + 4 4.328793970916516e+02 7.191964334477238e+01 1.665393425924038e+01 4.265381387417559e+02 + 5 3.119032264220855e+02 2.439422578054461e+01 -1.946043726096423e+02 2.425235711478000e+02 + ME 2.585039966969096e-06 + +Event 226 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.238244057688476e+02 -4.759413520569711e+02 -1.911585493182050e+02 1.064436306400155e+02 + 3 1.513714782200791e+02 5.621367009247982e+01 1.067079790997946e+02 -9.146996725539771e+01 + 4 3.309778079434476e+02 8.703450613686213e+01 -8.672921858056078e+01 3.073261243971419e+02 + 5 4.938263080676255e+02 3.326931758276290e+02 1.711797887989710e+02 -3.222997877817597e+02 + ME 3.516392089706136e-07 + +Event 227 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.441906188052045e+02 5.273333141456225e+01 9.291280776591429e+01 -9.683666899684231e+01 + 3 5.088005428111287e+02 2.120952898491664e+02 -3.923670854733692e+02 -2.448298401458269e+02 + 4 2.230296359111397e+02 5.963056642642842e+01 1.366700392970477e+02 -1.658544976805341e+02 + 5 6.239792024725269e+02 -3.244591876901570e+02 1.627842384104071e+02 5.075210068232034e+02 + ME 4.140089606008008e-08 + +Event 228 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.894755984215649e+02 1.858323987151165e+02 -6.826804175303917e+01 -4.476518239805802e+02 + 3 2.378337923954260e+02 -1.386422232509071e+02 -1.328849203068723e+02 -1.403026895404092e+02 + 4 3.773112740226967e+02 -1.117174380731088e+02 -1.040599922392212e+02 3.450427937954724e+02 + 5 3.953793351603121e+02 6.452726260889936e+01 3.052129542991327e+02 2.429117197255170e+02 + ME 6.124740443033569e-08 + +Event 229 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.452325252559777e+01 2.443195513199060e+01 -6.325325852480884e-01 2.017271769305092e+00 + 3 7.188955970603506e+02 6.816679247082502e+02 3.030179298338888e+01 -2.263217206515921e+02 + 4 2.627494813500970e+02 -2.618027083973373e+02 -2.041573691533981e+01 8.934736244973667e+00 + 5 4.938316690639539e+02 -4.442971714429038e+02 -9.253523482800997e+00 2.153697126373133e+02 + ME 5.272637304919401e-04 + +Event 230 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.769099184850985e+02 2.249558416904206e+02 2.307537550587786e+01 3.015352101945322e+02 + 3 1.778006365465799e+02 -1.387428732425598e+02 1.051237453064108e+02 -3.622816105629497e+01 + 4 4.556085275574101e+02 3.501957619527957e+02 -2.744336173624777e+02 -9.812363810355457e+01 + 5 4.896809174109113e+02 -4.364087304006566e+02 1.462344965501890e+02 -1.671834110346826e+02 + ME 9.059931978155028e-09 + +Event 231 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.014793994416338e+02 -5.768695854958890e+01 4.374811245688785e+02 -2.382521112678524e+02 + 3 2.526737499462902e+02 2.119664744384978e+02 -8.368970279598194e+01 1.091341892898568e+02 + 4 4.045018774470939e+02 -6.630541281823712e+01 -1.346697506713351e+02 3.756187153795021e+02 + 5 3.413449731649820e+02 -8.797410307067175e+01 -2.191216711015615e+02 -2.465007934015064e+02 + ME 2.984222713956498e-08 + +Event 232 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.414187826108434e+02 2.584315608658833e+02 2.849671207419298e+01 -2.212868068115541e+02 + 3 4.120935142349622e+02 3.628024247372867e+02 1.267412408575709e+02 1.487686893978352e+02 + 4 2.248548125131379e+02 -1.883103984200796e+02 9.094987429533836e+01 -8.262566745782664e+01 + 5 5.216328906410573e+02 -4.329235871830905e+02 -2.461878272271022e+02 1.551437848715456e+02 + ME 1.322787966029624e-08 + +Event 233 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.894891429646786e+01 3.536480069898001e+00 2.591327577389482e+01 1.241108723382165e+01 + 3 4.495734558856913e+02 -1.428629550884405e+02 4.257543295140538e+02 2.096948259829422e+01 + 4 3.410993816387650e+02 -7.182369067942483e+01 8.919355629468809e+01 3.213015019059832e+02 + 5 6.803782481790759e+02 2.111501656979673e+02 -5.408611615826368e+02 -3.546820717380990e+02 + ME 7.366258368256932e-05 + +Event 234 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.131015202000083e+02 -1.392455713354047e+02 9.575974407716100e+01 1.298191056405333e+02 + 3 4.325059163299786e+02 8.128751078497469e+01 1.232789394922659e+02 4.065169262508995e+02 + 4 1.602879687109332e+02 -1.232589269689068e+02 -1.390049118716285e+01 1.015196837106304e+02 + 5 6.941045947590796e+02 1.812169875193368e+02 -2.051381923822642e+02 -6.378557156020630e+02 + ME 7.724836751313716e-07 + +Event 235 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.910303275896595e+02 2.464345432925340e+02 2.918360128905574e+02 -3.085652930339881e+02 + 3 5.092125502368183e+02 -3.743627265831034e+02 -2.807984020263058e+02 2.007541473629420e+02 + 4 3.077109354739686e+02 1.158554772554631e+02 9.067751992059638e+01 2.702611988081597e+02 + 5 1.920461866995535e+02 1.207270603510670e+01 -1.017151307848479e+02 -1.624500531371134e+02 + ME 1.648639887571610e-07 + +Event 236 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.274482187963927e+02 -1.539135099798991e+02 1.447655980669331e+02 -8.417983900936366e+01 + 3 5.575149033864811e+02 5.352858954032091e+02 1.235129998854975e+02 9.506006806071187e+01 + 4 1.694314553150287e+02 1.372529159712161e+02 -9.883130012029677e+01 -1.005132946921373e+01 + 5 5.456054225020976e+02 -5.186253013945261e+02 -1.694472978321339e+02 -8.288995821344730e-01 + ME 3.355871013262915e-08 + +Event 237 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.339554322971692e+02 1.120133622069438e+02 -3.285326904336018e+02 -2.604545934011883e+02 + 3 6.302873937313195e+02 -1.022747807849330e+02 1.408185925137292e+02 6.057822974588029e+02 + 4 2.435720079051767e+02 6.470340927096325e+01 5.460699052093423e+01 -2.283831614850804e+02 + 5 1.921851660663347e+02 -7.444199069297396e+01 1.331071073989386e+02 -1.169445425725342e+02 + ME 2.670141335517614e-07 + +Event 238 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.083377096896611e+02 -5.784356003262200e+02 1.495271412220012e+02 1.145803619460332e+02 + 3 1.717721328115096e+02 5.705865046083022e+00 1.603017198195137e+02 -6.145296850109766e+01 + 4 3.206654997358105e+02 2.010041670743242e+02 -2.004126881056233e+02 -1.491926338190072e+02 + 5 3.992246577630186e+02 3.717255682058126e+02 -1.094161729358916e+02 9.606524037407168e+01 + ME 1.003536482637749e-08 + +Event 239 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.881743793489991e+02 1.049103829092727e+02 2.635007061567173e+02 5.104568861247708e+01 + 3 4.803894780132094e+02 1.090279613672190e+02 -2.314406086068727e+02 -4.065983262552766e+02 + 4 2.440501385224371e+02 -1.729404459755227e+02 -1.217772311844275e+02 -1.217471897978040e+02 + 5 4.873860041153544e+02 -4.099789830096893e+01 8.971713363458295e+01 4.772998274406036e+02 + ME 7.777282394741929e-08 + +Event 240 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.087013709129608e+02 -4.676309448785902e+02 -3.172734601441522e+02 2.262215945294169e+02 + 3 2.729447571190921e+02 -5.767450544615312e+00 2.662954895847358e+02 -5.960108371364925e+01 + 4 1.525519054527853e+02 8.110058050875806e+01 1.020251557883443e+02 7.928207417053407e+01 + 5 4.658019665151618e+02 3.922978149144475e+02 -5.104718522892794e+01 -2.459025849863017e+02 + ME 8.755456646138438e-08 + +Event 241 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.530270912109604e+02 -5.453728034889818e+02 8.831979059784159e+01 2.463906281857454e+01 + 3 1.982544179365819e+02 -1.586324861506672e+02 1.089318049583214e+02 4.769077937666254e+01 + 4 5.722723170577572e+02 5.530346801359588e+02 -1.096388820792352e+02 -9.812014560724828e+01 + 5 1.764461737947002e+02 1.509706095036902e+02 -8.761271347692812e+01 2.579030341201114e+01 + ME 1.699522188686953e-06 + +Event 242 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.746108664048633e+02 -4.749300259421791e+02 -3.143228612830272e+02 7.629060967091233e+01 + 3 5.051636989462203e+02 4.444288635815062e+02 9.034183757269724e+01 2.225122476014893e+02 + 4 3.777952608872159e+02 -2.186699418938177e+00 2.474964598096174e+02 -2.854294656761928e+02 + 5 4.243017376170176e+01 3.268786177961078e+01 -2.351543609928832e+01 -1.337339159620902e+01 + ME 2.080976844398368e-06 + +Event 243 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.107527202455984e+02 3.904995916125711e+02 3.043450795877112e+02 -3.576353265109072e+02 + 3 1.508627981883119e+02 3.391389294497832e+01 -9.072320151009265e+01 -1.156664707263215e+02 + 4 6.531020347957227e+02 -4.643459729748700e+02 -2.271350825653671e+02 3.991675581812210e+02 + 5 8.528244677036682e+01 3.993248841732053e+01 1.351320448774860e+01 7.413423905600773e+01 + ME 3.502799558347279e-07 + +Event 244 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.464269710040985e+02 3.069536149467576e+02 -1.106795177814204e+02 -1.163665280648363e+02 + 3 5.041376845601653e+02 6.573269089487455e+01 4.202350193677655e+02 2.706225172419645e+02 + 4 4.310807055576996e+02 -3.784254305479272e+02 -2.032279747057622e+02 3.637524591991036e+01 + 5 2.183546388780368e+02 5.739124706294895e+00 -1.063275268805829e+02 -1.906312350970385e+02 + ME 1.935780120331633e-08 + +Event 245 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.442357593704551e+02 7.260817279327249e+01 -1.113850962118338e+02 -5.590498964023364e+01 + 3 5.569552277539377e+02 4.707984336772996e+02 -2.468590917743929e+02 -1.661582058694779e+02 + 4 5.295813762554727e+02 -2.928127385193997e+02 4.173322561045921e+02 1.433559285556812e+02 + 5 2.692276366201346e+02 -2.505938679511724e+02 -5.908806811836557e+01 7.870726695403035e+01 + ME 4.089294375377561e-07 + +Event 246 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.246317093722421e+02 -2.157268871477894e+02 -2.199347190619292e+02 5.433740901680579e+02 + 3 1.880460358713021e+02 -1.070645769102478e+02 1.157715879471019e+02 -1.024471932370385e+02 + 4 1.420672142172261e+02 -1.168777621962525e+01 -1.208441773051401e+02 -7.377786967598762e+01 + 5 5.452550405392300e+02 3.344792402776624e+02 2.250073084199677e+02 -3.671490272550326e+02 + ME 1.874858538722742e-08 + +Event 247 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.065097258271049e+02 -1.668806543559496e+02 -1.865206091223489e+02 1.769438374201404e+02 + 3 3.129023884913622e+02 7.386736466907033e+01 2.951038514843158e+02 7.324775764191564e+01 + 4 3.864124550177795e+02 -1.802989827999254e+02 -3.272147765988919e+02 9.867802272804734e+01 + 5 4.941754306637530e+02 2.733122724868045e+02 2.186315342369250e+02 -3.488696177901033e+02 + ME 1.307527267075214e-07 + +Event 248 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.666327106485755e+02 -2.164686785201294e+02 -1.361374419638053e+02 -7.550437406605916e+01 + 3 3.506800144563604e+02 -3.287838552500039e+02 -1.212782822609880e+02 -1.300874005742749e+01 + 4 4.601802762612305e+02 3.201063220472946e+02 1.987803806208573e+02 -2.641669728134900e+02 + 5 4.225069986338340e+02 2.251462117228387e+02 5.863534360393606e+01 3.526800869369766e+02 + ME 7.734513384563505e-07 + +Event 249 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.764901453884635e+02 7.453429552391280e+01 8.820686664603213e+01 1.334651972855999e+02 + 3 6.230936441513317e+02 2.971067073789105e+02 9.787518090098750e+01 -5.388819376967907e+02 + 4 5.022078434333577e+02 -3.822006854333495e+02 -2.438015631086573e+02 2.160929241924341e+02 + 5 1.982083670268467e+02 1.055968253052625e+01 5.771951556163773e+01 1.893238162187565e+02 + ME 4.136165636809778e-08 + +Event 250 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.228636101802504e+02 -4.155243332015377e+01 5.704763635314593e+01 -1.005705184346681e+02 + 3 3.405147702190893e+02 7.985751885454553e+01 2.522537891570217e+01 -3.300557008723138e+02 + 4 3.193622656237183e+02 -1.644879368855029e+02 -2.193702205694553e+01 -2.728639631514911e+02 + 5 7.172593539769414e+02 1.261828513511111e+02 -6.033599321190239e+01 7.034901824584732e+02 + ME 1.988210231343287e-05 + +Event 251 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.961580549700980e+02 -3.878197351809906e+02 7.914688695318323e+01 -1.651750003655490e+01 + 3 3.066463839754016e+02 7.034111344423620e+01 1.893486642450590e+02 -2.307189110437774e+02 + 4 3.269242895484091e+02 -8.795629422661055e+01 -3.930068447480090e+01 3.124078065645385e+02 + 5 4.702712715060912e+02 4.054349159633650e+02 -2.291948667234414e+02 -6.517139548420626e+01 + ME 1.518511515080924e-08 + +Event 252 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.237658022858008e+02 1.405436681763271e+02 -1.649016760008569e+02 5.591107994180530e+01 + 3 3.054719110851954e+02 -2.214763823298171e+02 1.666458004254375e+02 -1.284152550622531e+02 + 4 5.392505931602817e+02 4.029685409231231e+02 5.432531306200935e+01 3.541981332682594e+02 + 5 4.315116934687227e+02 -3.220358267696332e+02 -5.606943748659013e+01 -2.816939581478115e+02 + ME 3.111709623099577e-08 + +Event 253 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.589202324543652e+02 -4.375953164514953e+02 2.198479485092990e+02 2.693864228256692e+02 + 3 4.197833585606818e+02 3.026019377854699e+02 -1.044594107420260e+02 -2.715480931260489e+02 + 4 2.738706420871746e+02 2.336491570328417e+02 7.464988490753900e+01 -1.218219795372531e+02 + 5 2.474257668977782e+02 -9.865577836681665e+01 -1.900384226748121e+02 1.239836498376325e+02 + ME 2.927988480786807e-07 + +Event 254 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.131109686858098e+02 -1.596979849442969e+01 4.209499761303451e+01 1.037644830809086e+02 + 3 2.488622312155221e+02 1.244501515047507e+02 -2.082237961096237e+02 5.556456289498274e+01 + 4 5.979154868428426e+02 -5.590425628529678e+02 -1.316391630725938e+02 -1.662692787945094e+02 + 5 5.401113132558256e+02 4.505622098426471e+02 2.977679615691829e+02 6.940232818618022e+00 + ME 1.486489534499342e-08 + +Event 255 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.625199149979439e+02 2.903215750787058e+02 -2.451585309797632e+02 -5.427184495671279e+02 + 3 2.457331142254972e+02 2.358267179437854e+01 -4.583225821432146e+01 2.402665709685299e+02 + 4 4.002681720338188e+02 -2.621095389751821e+02 2.783157645467164e+02 1.185476036294651e+02 + 5 1.914787987427404e+02 -5.179470789790269e+01 1.267502464736795e+01 1.839042749691330e+02 + ME 1.575487056372447e-07 + +Event 0 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.345677694047433e+02 2.100238310553183e+02 -2.816345401110252e+02 -2.557755312978801e+02 + 3 3.778855054923723e+02 -2.840270738478316e+02 2.448136425844733e+02 4.682261192186964e+01 + 4 2.920279085923864e+02 -1.576945398626579e+02 -2.408852190745837e+02 4.885737125284020e+01 + 5 3.955188165104972e+02 2.316977826551712e+02 2.777061166011359e+02 1.600955481231705e+02 + ME 3.418481136935543e-09 + +Event 1 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.725349105457667e+02 2.881950845301121e+02 -4.457540318931225e+02 4.129771691104840e+02 + 3 6.375781261318954e+02 -3.835006725455601e+02 4.372392202052155e+02 -2.612565126332686e+02 + 4 3.152489653934794e+01 3.054926600229694e+01 -1.796306705170926e+00 -7.571970071154192e+00 + 5 1.583620667829892e+02 6.475632201315098e+01 1.031111839307813e+01 -1.441486864060612e+02 + ME 4.785464380651434e-03 + +Event 2 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.782380757885197e+02 1.996205682030241e+02 4.001020415553458e+02 1.696515317568694e+02 + 3 2.717797792000939e+02 4.604565925658517e+01 1.990097475342964e+02 1.792739970882946e+02 + 4 6.916972528618887e+02 -2.565335659091062e+02 -5.673237009836266e+02 -3.012962619762857e+02 + 5 5.828489214949754e+01 1.086733844949693e+01 -3.178808810601573e+01 -4.762926686887831e+01 + ME 2.099485632523517e-05 + +Event 3 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.018313811485532e+02 -3.989539969780533e+02 2.934712901062141e+01 -3.798569717437191e+01 + 3 2.683933065123219e+02 2.366019084548149e+02 -7.671591945800624e+01 -1.008423105539992e+02 + 4 3.388431725058181e+02 -2.729478414859575e+02 1.984381945822547e+02 -3.060154102164474e+01 + 5 4.909321398333069e+02 4.352999300091959e+02 -1.510694041348699e+02 1.694295487500159e+02 + ME 3.358304734718933e-07 + +Event 4 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.025396283630525e+02 -2.571095877388789e+02 -4.112978625189387e+02 -1.314336572395784e+02 + 3 5.923738354103533e+02 2.675275915658220e+02 2.602417944619202e+02 4.600108227476862e+02 + 4 3.268206458950784e+01 -3.102096879508956e+01 -3.014419071639536e+00 9.835147101461061e+00 + 5 3.724044716370851e+02 2.060296496814678e+01 1.540704871286580e+02 -3.384123126095678e+02 + ME 2.859344993211158e-06 + +Event 5 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.074067282413408e+02 -4.618538476611251e+01 3.035171302884308e+02 1.559353787719173e+01 + 3 3.831379513801059e+02 -2.749543838833998e+01 -1.652445324602141e+02 -3.445764576223725e+02 + 4 5.614489455937761e+02 1.616386414426313e+02 -3.588979307262703e+02 4.003625150052696e+02 + 5 2.480063747847773e+02 -8.795781828817880e+01 2.206253328980537e+02 -7.137959526008893e+01 + ME 1.706310861476165e-08 + +Event 6 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.286636464658632e+02 -1.747226577501441e+01 -3.778773270997241e+02 -3.693084032177421e+02 + 3 1.310282673263388e+02 -1.083675617071470e+02 -6.717507586954586e+01 3.020575425495843e+01 + 4 6.582258651099335e+02 2.776185230670746e+02 5.267955454451471e+02 2.804918866008896e+02 + 5 1.820822210978650e+02 -1.517786955849135e+02 -8.174314247587706e+01 5.861076236189422e+01 + ME 3.432018091129583e-08 + +Event 7 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.262567818350125e+02 -6.135678852045158e+02 -8.153386103597425e+01 9.531126137330719e+01 + 3 1.336446614791591e+02 -4.519989455404550e+01 6.404586862299972e+01 -1.082404350809238e+02 + 4 3.176656341984028e+02 2.701266119371286e+02 1.170579115681671e+02 -1.193336248227656e+02 + 5 4.224329224874255e+02 3.886411678214329e+02 -9.956991915519265e+01 1.322627985303823e+02 + ME 1.323869922254904e-08 + +Event 8 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.349855291489958e+02 -3.626063542068543e+02 -1.229423826784078e+02 -2.064321026371652e+02 + 3 3.119050592775226e+02 -2.002874147789406e+02 -1.957942322506285e+02 1.372382457679727e+02 + 4 1.367195114173142e+02 9.785893219779986e+01 -8.501635945817435e+01 4.345195986113885e+01 + 5 6.163899001561672e+02 4.650348367879950e+02 4.037529743872105e+02 2.574189700805361e+01 + ME 3.285876644190919e-08 + +Event 9 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.655124632121683e+02 -6.972273330724498e+01 -3.084842179247440e+02 1.832364279147364e+02 + 3 1.839264563143948e+02 1.553544456242578e+02 -7.816914971633298e+01 -5.986252241407793e+01 + 4 2.954499153271153e+02 2.111586753349157e+01 -1.306467051615632e+02 2.641518711566042e+02 + 5 6.551111651463219e+02 -1.067475798505044e+02 5.173000728026402e+02 -3.875257766572626e+02 + ME 1.798086418720504e-07 + +Event 10 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.642811111709576e+02 1.645024039884385e+02 5.389597634493803e+02 -2.957202882697341e+01 + 3 3.050705971359640e+02 -1.347545052623103e+02 -2.204142360425299e+02 -1.622555302545696e+02 + 4 1.790656381713290e+02 -1.323273797872345e+02 -8.759515510166029e+00 -1.203213955220662e+02 + 5 4.515826535217496e+02 1.025794810611064e+02 -3.097860118966842e+02 3.121489546036092e+02 + ME 1.200306632419875e-05 + +Event 11 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.912845371100811e+02 -1.020148610633588e+02 3.329066770248591e+02 -1.785208713174465e+02 + 3 2.847080639014686e+02 2.638796146707179e+02 5.173703293990503e+01 9.353881565602218e+01 + 4 2.573001248270788e+02 -1.895266044096599e+02 1.605970764533154e+02 -6.701939638360363e+01 + 5 5.667072741613713e+02 2.766185080230082e+01 -5.452407864180796e+02 1.520014520450279e+02 + ME 1.426216346526762e-06 + +Event 12 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.295908994071823e+02 -3.523645455233026e+01 1.467318606160352e+01 -4.278918446697190e+02 + 3 2.043256044303079e+02 2.071061668376125e+01 1.800525177697821e+02 9.434571440797528e+01 + 4 2.514463210684133e+02 -2.896341838569179e+00 2.221301356297975e+02 -1.177924718642134e+02 + 5 6.146371750940966e+02 1.742217970713832e+01 -4.168558394611832e+02 4.513386021259576e+02 + ME 8.609702911000601e-08 + +Event 13 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.900763907650168e+02 -4.345521592554666e+02 1.816886031264379e+02 1.353829426687154e+02 + 3 8.155287447201782e+01 -3.586849648635567e+01 -4.644236448070588e+00 -7.309414040996307e+01 + 4 2.274805892576971e+02 -1.172993534843645e+02 1.746430859700105e+02 8.653365058779552e+01 + 5 7.008901455052688e+02 5.877200092261867e+02 -3.516874526483777e+02 -1.488224528465479e+02 + ME 1.915651481056226e-06 + +Event 14 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.553813512209236e+02 -2.884258797827895e+02 -3.779404323704547e+02 2.870888133228751e+02 + 3 1.895171303098595e+02 3.950181939875271e+00 1.673649699243205e+02 -8.882626630539811e+01 + 4 2.675598101961874e+02 1.545161726663045e+02 -2.183413083877818e+02 -6.330676763838193e+00 + 5 4.875417082730291e+02 1.299595251766097e+02 4.289167708339159e+02 -1.919318702536388e+02 + ME 1.330756835012696e-08 + +Event 15 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.826944038147661e+02 3.569588644211593e+02 -4.592592011223917e+02 3.455609255435130e+01 + 3 3.389524473661556e+02 -2.377392070550027e+02 9.239231435980068e+01 -2.232319225639667e+02 + 4 7.820502782875147e+01 1.594347126700341e+01 -7.655713718050528e+01 9.147941732036022e-01 + 5 5.001481209903263e+02 -1.351631286331601e+02 4.434240239430964e+02 1.877610358364118e+02 + ME 2.166874408192583e-08 + +Event 16 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.671075373493464e+02 -1.624326760732479e+01 1.171675550031839e+02 1.180374912939780e+02 + 3 4.295095098103945e+02 2.195907717116854e+02 -2.808696979999064e+02 -2.395214494404898e+02 + 4 3.847682842045416e+02 -1.737210238377358e+02 -3.429919065735126e+02 1.497299006686935e+01 + 5 5.186146686357174e+02 -2.962648026662487e+01 5.066940495702352e+02 1.065109680796425e+02 + ME 2.510076954487770e-06 + +Event 17 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 7.032955713685548e+02 6.495895482552957e+02 2.251021895685562e+02 -1.482804226981584e+02 + 3 2.234221561647206e+02 -1.180503892545828e+02 -2.021783199888669e+01 1.886075415549418e+02 + 4 3.595704725836891e+02 -3.353015999954382e+02 -1.206079698882032e+02 -4.814020558746078e+01 + 5 2.137117998830352e+02 -1.962375590052745e+02 -8.427638768146636e+01 7.813086730677438e+00 + ME 8.189932255998903e-07 + +Event 18 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.215031941006906e+02 3.997910206623501e+02 -2.192085154561078e+02 2.531409646945914e+02 + 3 4.430902120680962e+02 8.075108458464338e+01 3.816053226272268e+02 -2.102036538967018e+02 + 4 2.188624192138139e+02 -1.829448025271727e+02 -1.088960009329281e+02 5.073084617106944e+01 + 5 3.165441746173993e+02 -2.975973027198207e+02 -5.350080623819097e+01 -9.366815696895908e+01 + ME 1.019813008745839e-08 + +Event 19 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.615465159306796e+02 -1.661354327315055e+02 1.685644476861036e+02 1.113176758779641e+02 + 3 6.118064822100387e+02 5.530315541715972e+02 -1.761644968719661e+02 1.934666426199023e+02 + 4 1.123687407649047e+02 7.588942961656004e+01 -1.456870938581167e+01 -8.157990610680611e+01 + 5 5.142782610943774e+02 -4.627855510566518e+02 2.216875857167411e+01 -2.232044123910604e+02 + ME 5.584909353802536e-08 + +Event 20 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.201161646354790e+02 -1.169238528739237e+02 1.621234917435766e+02 -4.801724802288322e+02 + 3 2.564308777002585e+02 1.861146313022993e+02 1.511095254422972e+02 -9.101675875319813e+01 + 4 6.849003476946964e+02 -5.145604386088208e+01 -3.163529905442017e+02 6.052780742735057e+02 + 5 3.855260996956563e+01 -1.773473456749349e+01 3.119973358328019e+00 -3.408883529147523e+01 + ME 8.304781570816604e-06 + +Event 21 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.051714469465806e+02 4.769595747359659e+02 1.465851962980007e+02 7.887036898648951e+01 + 3 2.982914519086227e+02 -2.692776124268368e+02 -2.614768404820439e+01 -1.256330225154667e+02 + 4 4.082168347698474e+02 -2.526674124215031e+02 -2.413280677431799e+02 -2.110945916149396e+02 + 5 2.883202663749494e+02 4.498545011237395e+01 1.208905554933834e+02 2.578572451439171e+02 + ME 5.832855313914358e-07 + +Event 22 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.495241619209652e+02 3.451716010099906e+01 -9.553928903830848e+01 3.344367648377936e+02 + 3 6.022361346253780e+02 4.159349120916945e+01 7.293136399340369e+01 -5.963550615896627e+02 + 4 1.609604585668471e+02 1.426706346559205e+02 4.848087149789286e+01 -5.659473763285189e+01 + 5 3.872792448868096e+02 -2.187812859660891e+02 -2.587294645298800e+01 3.185130343847212e+02 + ME 4.391549792316749e-08 + +Event 23 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.973901127820891e+02 4.157619482135283e+02 4.273300237487649e+02 3.749666745683651e+01 + 3 2.020962069046400e+02 -8.124921004062800e+01 1.541203841174711e+02 -1.024126452763532e+02 + 4 4.866251843058939e+02 -1.871724592614197e+02 -4.344368137067278e+02 1.141717801872394e+02 + 5 2.138884960073768e+02 -1.473402789114806e+02 -1.470135941595082e+02 -4.925580236772269e+01 + ME 2.677487182497992e-08 + +Event 24 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.729751897416461e+02 5.325486799695834e+02 -2.114043177632212e+02 8.282229144928630e-01 + 3 2.209760217295415e+02 4.190554168819071e+01 2.140047851899926e+02 3.572505662723606e+01 + 4 6.217469614831009e+02 -6.139571429576343e+02 -6.952416455108575e+01 -6.922644919567138e+01 + 5 8.430182704571227e+01 3.950292129985989e+01 6.692369712431426e+01 3.267316965394235e+01 + ME 2.867020097521691e-08 + +Event 25 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.927699720954061e+02 -2.047743757602093e+02 1.139305300318160e+01 4.480623826814639e+02 + 3 3.149042319173597e+02 -7.235220864995343e+01 2.398037103748990e+01 -3.055401364597460e+02 + 4 2.888907726753627e+02 7.777131619454688e+01 2.777989383587109e+02 1.540294650737274e+01 + 5 4.034350233118720e+02 1.993552682156158e+02 -3.131723623993825e+02 -1.579251927290908e+02 + ME 1.698072431060132e-09 + +Event 26 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.781578630360667e+02 -2.003585770703804e+02 -8.178895358715285e+01 -1.747535534237924e+02 + 3 4.314269515912293e+02 -8.376259389173971e+00 2.624301036293826e+02 3.423295101901347e+02 + 4 4.627048772771270e+02 1.415704984190216e+02 -4.400078394753884e+02 2.113524624015278e+01 + 5 3.277103080955769e+02 6.716433804053280e+01 2.593666894331585e+02 -1.887112030064950e+02 + ME 4.763692611302570e-09 + +Event 27 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.288747384351033e+02 -3.287538335736824e+02 7.343114151656774e+00 -5.058573506526230e+00 + 3 3.748617761535500e+02 2.826910393495446e+02 2.461509109435954e+02 4.105670969104998e+00 + 4 4.493229387685311e+02 -2.643020753278852e+02 -3.392708645659921e+02 1.301183950777377e+02 + 5 3.469405466428158e+02 3.103648695520229e+02 8.577683947073990e+01 -1.291654925403165e+02 + ME 9.313636073630819e-08 + +Event 28 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.972279565562762e+02 2.667568883382366e+02 -1.717272400122292e+02 -6.208682154576160e+02 + 3 5.905663106606713e+02 -1.231890261491060e+02 2.466624534377953e+02 5.222553639627256e+02 + 4 1.643113640003870e+02 -9.794033068572112e+01 -8.940761721344892e+01 9.701646225797272e+01 + 5 4.789436878266499e+01 -4.562753150340967e+01 1.447240378788297e+01 1.596389236917519e+00 + ME 1.558917944335744e-05 + +Event 29 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.266188853291728e+02 -3.664030707671374e+00 1.148798248336851e+02 6.159873604030605e+02 + 3 2.715483186965963e+02 -1.390232669167604e+02 8.666144865649638e+01 -2.165659575267933e+02 + 4 3.262257817760322e+02 -5.448790208210590e+01 -2.425277014775895e+02 -2.112691251415396e+02 + 5 2.756070141981987e+02 1.971751997065377e+02 4.098642798740790e+01 -1.881522777347276e+02 + ME 8.466517133211871e-09 + +Event 30 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.746957600003898e+02 -2.591574015416285e+02 -1.764470547739902e+02 2.051847719740561e+02 + 3 4.260450496435591e+02 1.858543667698223e+02 -3.681463334087965e+02 -1.069617495931631e+02 + 4 2.090363679505941e+02 1.796219811338597e+02 6.625234226347425e+01 -8.392123786102663e+01 + 5 4.902228224054563e+02 -1.063189463620532e+02 4.783410459193125e+02 -1.430178451986603e+01 + ME 4.195772737408626e-09 + +Event 31 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.268147451203489e+02 1.033619585238285e+02 -7.175680626342712e+01 -1.578752244433521e+01 + 3 3.789446667338622e+02 -1.394826691605500e+01 3.303299056302542e+02 -1.851665729617091e+02 + 4 4.489033212820729e+02 -1.541836769602653e+02 -2.486905723036656e+02 -3.404329373964334e+02 + 5 5.453372668637153e+02 6.476998535249105e+01 -9.882527063161515e+00 5.413870328024776e+02 + ME 2.652167353212513e-07 + +Event 32 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.594239401383118e+02 6.472187280476990e+02 -9.434320337386460e+01 -8.394766744235470e+01 + 3 1.799463961036491e+02 -4.308808552135046e+01 1.452564949994531e+02 9.708075513339401e+01 + 4 5.532563487173281e+02 -5.363715880205566e+02 -1.284853434295565e+02 -4.346979967891587e+01 + 5 1.073733150407109e+02 -6.775905450579195e+01 7.757205180396797e+01 3.033671198787659e+01 + ME 2.352577766184765e-08 + +Event 33 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.632108428205668e+02 1.176561246583504e+02 1.493047995597393e+02 -6.353847143216237e+02 + 3 5.142529371160996e+02 -2.302785097856057e+02 -1.735375888118209e+02 4.258081687013944e+02 + 4 1.166729919959780e+02 1.150834163714542e+02 1.881380173106929e+01 3.799368630713526e+00 + 5 2.058632280673560e+02 -2.461031244198720e+00 5.418987521012300e+00 2.057771769895156e+02 + ME 1.200561028380627e-04 + +Event 34 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.690779677366500e+02 3.511855664846811e+02 -5.534458382142301e+01 3.060062331888239e+02 + 3 3.742689592978850e+02 -3.012002941387805e+02 8.305424587573981e+01 -2.060524907557446e+02 + 4 2.980406440054936e+02 2.332618722083638e+02 1.822761656253146e+02 -3.453293931873202e+01 + 5 3.586124289599711e+02 -2.832471445542643e+02 -2.099858276796314e+02 -6.542080311434724e+01 + ME 5.075971073707363e-09 + +Event 35 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.283056560696552e+02 -3.779242940990954e+02 5.849933729772783e+01 -3.644968061596919e+02 + 3 3.435696257780648e+02 3.183925539049349e+02 4.269218267655494e+01 1.218345062512435e+02 + 4 3.087475922619403e+02 2.738015531924525e+02 9.348544997317434e+01 1.077880134349780e+02 + 5 3.193771258903396e+02 -2.142698129982919e+02 -1.946769699474571e+02 1.348742864734704e+02 + ME 9.520833808961610e-09 + +Event 36 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.861171657357099e+02 1.949976067191705e+02 -3.323631134924988e+02 2.443685411720823e+01 + 3 4.856425374020078e+02 -3.587793340935830e+02 3.248213110244532e+02 -4.021416996509026e+01 + 4 3.386102480932668e+02 1.540387599323064e+02 2.845112873791639e+02 9.991140028120812e+01 + 5 2.896300487690154e+02 9.742967442106151e+00 -2.769694849111183e+02 -8.413408443332617e+01 + ME 8.896439667190523e-08 + +Event 37 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.304409112998234e+02 2.170475590461168e+02 -3.972923294204461e+01 -4.823686407122112e+02 + 3 2.292982173116323e+02 5.858630347836768e+01 -2.026677724490633e+02 8.983925376787056e+01 + 4 1.467869786978191e+02 -1.013820811213809e+02 -4.989060265398776e+01 -9.369641673806763e+01 + 5 5.934738926907251e+02 -1.742517814031035e+02 2.922876080450958e+02 4.862258036824082e+02 + ME 9.019947846724267e-08 + +Event 38 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.017706346629277e+02 2.384436739982337e+02 -4.258734741499014e+02 1.164051895567999e+02 + 3 4.770954291403306e+02 -2.105777645255067e+02 4.274009986857631e+02 2.460568870096314e+01 + 4 2.156156104165689e+02 -2.877166591024516e+01 1.906669901245643e+02 9.647995425422911e+01 + 5 3.055183257801733e+02 9.057564375181330e-01 -1.921945146604260e+02 -2.374908325119924e+02 + ME 1.825719174845300e-06 + +Event 39 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.689399151263619e+02 -2.579554373803598e+00 -1.305084655116407e+02 1.072454253193666e+02 + 3 1.752066215161591e+02 -1.477482509589512e+02 8.725713980331182e+01 -3.541194876059085e+01 + 4 6.166504538775523e+02 5.541135799160111e+01 3.673230597344313e+02 -4.922002981106906e+02 + 5 5.392030094799272e+02 9.491644734115384e+01 -3.240717340261025e+02 4.203668215519149e+02 + ME 6.460676710264379e-08 + +Event 40 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.915352846637887e+02 2.413866074952699e+02 1.305008487961100e+02 9.846246182894077e+01 + 3 4.766337666546407e+02 -4.064718254101213e+02 2.442499654159483e+02 4.798288296322364e+01 + 4 5.420029607651860e+02 3.967025561147059e+01 -4.874329454717395e+02 -2.336720008188668e+02 + 5 1.898279879163847e+02 1.254149623033808e+02 1.126821312596812e+02 8.722665602670243e+01 + ME 4.192431613287140e-09 + +Event 41 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.178258392081233e+02 -3.063771146787844e+01 2.817624231441970e+01 -1.102286641039828e+02 + 3 6.481000691270629e+02 4.281730940284307e+02 -2.495995064512906e+01 4.858791022635328e+02 + 4 5.135691872852316e+02 -3.271780048393351e+02 2.027042603872938e+02 -3.400277137219925e+02 + 5 2.205049043795825e+02 -7.035737772121716e+01 -2.059205520565847e+02 -3.562272443755763e+01 + ME 1.731997556776303e-07 + +Event 42 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.407568007632807e+02 -6.712702422129367e+01 5.650132897991668e+02 2.946578060970235e+02 + 3 2.519649653275297e+02 9.668586554572212e+01 -2.235157404081881e+02 -6.464441929476367e+01 + 4 1.611455149449823e+02 -1.500904782980545e+02 -2.019767982646422e+01 5.507067314617083e+01 + 5 4.461327189642074e+02 1.205316369736261e+02 -3.212998695645146e+02 -2.850840599484306e+02 + ME 2.233802709133265e-07 + +Event 43 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 7.656037718110568e+01 5.565869919512738e+01 5.206539740066113e+01 -7.266013455170691e+00 + 3 5.180921726156697e+02 9.446420117550210e+01 -5.353707605507633e+01 -5.065864146514117e+02 + 4 4.045145408547240e+02 -6.817883407235416e+01 -3.582159575777364e+02 1.751142143976551e+02 + 5 5.008329093485008e+02 -8.194406629827526e+01 3.596876362321516e+02 3.387382137089272e+02 + ME 6.975773490255196e-08 + +Event 44 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.113647181056540e+02 -5.107143134714065e+01 9.810164906833062e+01 -1.303364066484094e+01 + 3 6.573281629571673e+02 -3.985633843498063e+02 -2.702857905045169e+02 -4.474071232374617e+02 + 4 1.273704188821621e+02 8.136377415273439e+01 -8.144355608270772e+01 5.449868837360310e+01 + 5 6.039367000550166e+02 3.682710415442125e+02 2.536276975188940e+02 4.059420755286995e+02 + ME 9.174645805915437e-08 + +Event 45 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.791094112024887e+02 -3.344017621786854e+02 5.108659183713410e+00 -4.727759228180172e+02 + 3 2.010161055980396e+02 -2.492393218233912e+01 -1.782237380498131e+02 8.956880880040752e+01 + 4 3.598579655450536e+02 2.990024010429073e+02 -1.090682288963148e+02 1.679268917780071e+02 + 5 3.600165176544180e+02 6.032329331811716e+01 2.821833077624145e+02 2.152802222396027e+02 + ME 1.246543188766515e-08 + +Event 46 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.267953668800281e+02 -6.352714736069532e+01 -9.200146001961878e+01 5.980884520463430e+01 + 3 7.280210303874187e+02 4.206450303526108e+02 5.658444328595525e+02 -1.813627771287734e+02 + 4 6.518774346619089e+01 2.681482978220010e+01 -4.773984775270042e+01 3.537391324853008e+01 + 5 5.799958592663627e+02 -3.839327127741155e+02 -4.261031250872333e+02 8.618001867560905e+01 + ME 1.081610588884994e-06 + +Event 47 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.159530641405005e+02 1.142445149356237e+02 -2.007237833711748e+02 -4.613737291960360e+02 + 3 3.022880532645049e+02 -2.500992722738971e+02 1.529012103800725e+02 7.382168393378677e+01 + 4 3.701099938195064e+02 2.419009630277548e+02 2.308398354487970e+02 1.586767216112437e+02 + 5 3.116488887754888e+02 -1.060462056894813e+02 -1.830172624576947e+02 2.288753236510055e+02 + ME 8.683501176758673e-09 + +Event 48 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.117281863235953e+02 1.108482515422887e+02 3.904601382797304e+02 -6.909156936926898e+01 + 3 4.416457800211126e+02 -1.761655849232860e+02 -3.193915704670098e+02 2.490094504506014e+02 + 4 2.951205671254979e+02 -2.720452019398315e+02 2.727574676948151e+00 -1.143683416788644e+02 + 5 3.515054665297946e+02 3.373625353208287e+02 -7.379614248966867e+01 -6.554953940246800e+01 + ME 3.853884773468987e-09 + +Event 49 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.790151177355859e+02 2.685445491881806e+02 -1.264003222356048e+02 -4.971572087442830e+02 + 3 5.825462968193996e+02 -3.620774874303168e+02 2.071002122380677e+02 4.066565911492057e+02 + 4 1.232538965502943e+02 1.411023551560034e+01 -5.744174282575165e+01 -1.081335768837097e+02 + 5 2.151846888947203e+02 7.942270272653560e+01 -2.325814717671123e+01 1.986341944787866e+02 + ME 2.043261450273553e-06 + +Event 50 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.145744464521337e+02 1.949057366487758e+00 -3.132665042327793e+02 -2.858987341389515e+01 + 3 5.210452536770441e+02 3.365475988572654e+02 2.288931725040629e+02 -3.253179762383411e+02 + 4 4.024143942462559e+02 -3.880355946879494e+02 2.653164231204767e+01 1.032559630625573e+02 + 5 2.619659056245661e+02 4.953893846419621e+01 5.784168941666874e+01 2.506518865896789e+02 + ME 2.536581443959216e-08 + +Event 51 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.804391138743970e+02 5.017232555386195e+02 -1.014098872260622e+02 2.736775009748181e+02 + 3 4.713537758174337e+01 8.111299990939797e+00 -4.333873138520375e+00 4.622951628396848e+01 + 4 6.266947405808538e+02 -5.426030878998815e+02 2.770731071369993e+02 -1.468287443747501e+02 + 5 2.457307679630063e+02 3.276853237032218e+01 -1.713293467724168e+02 -1.730782728840364e+02 + ME 7.159681285813359e-07 + +Event 52 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.239697017241612e+02 -1.405450188662117e+02 3.730121131586498e+02 3.400783871899555e+02 + 3 1.578462691260114e+02 -1.307296241737952e+02 -8.016414633287305e+01 3.740213473989416e+01 + 4 2.346875433863188e+02 3.589966406507264e+01 1.851707703338134e+02 -1.396468508585222e+02 + 5 5.834964857635086e+02 2.353749789749342e+02 -4.780187371595902e+02 -2.378336710713274e+02 + ME 1.091071284005791e-08 + +Event 53 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.236952601159668e+02 -3.969697599659208e+01 1.283750074878056e+02 -1.788395284817703e+02 + 3 4.313350831023799e+02 -3.366597921026201e+02 2.109624625450273e+02 -1.679433764496105e+02 + 4 2.801401728473173e+02 2.616468403601891e+02 9.956816004668732e+01 1.027759102960046e+01 + 5 5.648294839343359e+02 1.147099277390230e+02 -4.389056300795202e+02 3.365053139017804e+02 + ME 4.178869840930611e-08 + +Event 54 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.424957591900098e+02 1.303189036682192e+02 1.786751139223701e+02 -2.615253947032346e+02 + 3 4.181611430197448e+02 -3.495405289942557e+02 -1.455704883643566e+02 1.774525092506670e+02 + 4 4.253746812368033e+02 1.528889148664904e+02 -1.709820665168174e+02 3.582369775412607e+02 + 5 3.139684165534423e+02 6.633271045954612e+01 1.378774409588040e+02 -2.741640920886931e+02 + ME 3.653235936447035e-08 + +Event 55 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.902820092019053e+02 4.969094085134603e+02 -1.717027031534156e+02 -4.473125011537596e+02 + 3 3.505542265094331e+02 -3.042029506312313e+02 -2.771059843041879e+01 1.719911430437845e+02 + 4 3.123150316279192e+02 -2.383922595804615e+02 1.302132333211217e+02 1.541243764656621e+02 + 5 1.468487326607427e+02 4.568580169823259e+01 6.920006826271279e+01 1.211969816443130e+02 + ME 4.102918153988802e-05 + +Event 56 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.517045596935317e+02 3.287009769062940e+02 7.982883452857169e+01 4.358450942081274e+02 + 3 5.634713549544340e+02 1.236880428650327e+01 8.234347921332743e+00 -5.632753998258918e+02 + 4 2.247534233722244e+02 -1.830483440080827e+02 -7.950172450526783e+01 1.033773711898374e+02 + 5 1.600706619798102e+02 -1.580214371847146e+02 -8.561457944636569e+00 2.405293442792711e+01 + ME 5.624279731297572e-08 + +Event 57 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.612663949947443e+02 6.166031259026278e+01 1.487802576587276e+02 8.324117783561414e+00 + 3 1.820024643451797e+02 1.879353241782060e+01 -1.625270683069972e+02 -7.972861615826162e+01 + 4 5.924987722813793e+02 -1.264958307278939e+02 5.759352761456844e+02 5.789782080869779e+01 + 5 5.642323683786965e+02 4.604198571981062e+01 -5.621884654974148e+02 1.350667756600244e+01 + ME 4.866487281171431e-05 + +Event 58 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.537542945315818e+02 1.629560282904648e+02 -2.140600948134415e+02 2.297078787325215e+02 + 3 2.777758408292174e+02 2.346896280376003e+02 7.436606577911790e+01 1.286463544002993e+02 + 4 3.282171909538803e+02 1.357516725902970e+02 1.084620089653986e+02 -2.784492780342276e+02 + 5 5.402526736853205e+02 -5.333973289183622e+02 3.123202006892496e+01 -7.990495509859326e+01 + ME 1.829504869096126e-08 + +Event 59 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.976381540886909e+02 -6.639185065184327e+01 -1.092066538588677e+02 1.507543328450558e+02 + 3 5.908605962463500e+02 2.928235141717450e+02 4.943985123342437e+02 -1.376253782788214e+02 + 4 3.266674027313048e+02 -3.263528609865800e+02 -1.366055614966464e+01 -4.334897781080562e+00 + 5 3.848338469336537e+02 9.992119746667817e+01 -3.715313023257119e+02 -8.794056785153758e+00 + ME 3.132664003926979e-09 + +Event 60 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 7.121408887067226e+02 -1.629155490191453e+02 -1.421475012227830e+02 -6.785257969686267e+02 + 3 2.741179903154751e+02 1.475044814487676e+02 1.545489065904012e+02 1.717490496009702e+02 + 4 6.757364169575578e+00 1.698500861258775e-01 -6.755016584407215e+00 5.359489612222521e-02 + 5 5.069837568082268e+02 1.524121748425186e+01 -5.646388783210994e+00 5.067231524715342e+02 + ME 1.415656031996490e-03 + +Event 61 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.060218431628061e+02 -3.666102684855927e+01 -1.896168417000883e+02 -4.677173593228888e+02 + 3 6.566657576617764e+02 1.298514611056881e+02 2.926865236287042e+02 5.733089169203428e+02 + 4 1.062674698969952e+02 1.030596485895223e+02 -2.044593557069221e+01 -1.592004112909394e+01 + 5 2.310449292784226e+02 -1.962500828466512e+02 -8.262374635792366e+01 -8.967151646835990e+01 + ME 2.344014144710753e-07 + +Event 62 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.055086643741489e+02 -7.294551827191325e+00 9.237032345627718e+01 -5.046376042508070e+01 + 3 5.688846753260372e+02 3.341862040344012e+02 -2.722490171883784e+02 3.712543972720732e+02 + 4 4.946635586748542e+02 -1.135243476177037e+02 -1.573702928991474e+01 -4.812032883179146e+02 + 5 3.309431016249600e+02 -2.133673045895060e+02 1.956157230220159e+02 1.604126514709221e+02 + ME 4.250359822953940e-07 + +Event 63 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.158808969828533e+02 -1.476287203313588e+02 1.676739582816468e+02 2.233202761197066e+02 + 3 3.883323257562103e+02 -3.056810783903564e+02 2.043617890712476e+02 1.248892818016628e+02 + 4 2.887403188019102e+02 1.019387632956730e+02 -1.499858918976027e+01 -2.697304257251938e+02 + 5 5.070464584590262e+02 3.513710354260422e+02 -3.570371581631342e+02 -7.847913219617558e+01 + ME 5.358404688824838e-07 + +Event 64 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.850523188566764e+02 2.550712447674044e+01 -2.660317865305242e+02 9.915291040546418e+01 + 3 2.916452653107143e+02 1.403399316576782e+01 2.690561401486174e+02 -1.116637867095131e+02 + 4 4.714598286310267e+02 -1.052157000050604e+02 -2.066429807719118e+02 4.104908098641693e+02 + 5 4.518425872015821e+02 6.567458236255207e+01 2.036186271538186e+02 -3.979799335601206e+02 + ME 2.467966615716427e-07 + +Event 65 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.214350019381618e+02 7.995884478713779e+01 -7.224395149801896e+01 5.598083875737888e+01 + 3 6.120578807552533e+02 9.201985783628670e+01 5.195324550411796e+02 -3.102148018990813e+02 + 4 5.322028765827238e+02 4.286174464190796e+00 -3.665653478175947e+02 3.858126181590674e+02 + 5 2.343042407238607e+02 -1.762648770876154e+02 -8.072315572556604e+01 -1.315786550173648e+02 + ME 2.975997769514851e-06 + +Event 66 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.420838586983576e+02 1.172583084765124e+02 -5.279399036277819e+02 -3.721366834936297e+01 + 3 1.564392099528226e+02 1.132387905244197e+02 6.972777909444963e+01 -8.239077347485902e+01 + 4 4.857304734552536e+02 1.638606370619556e+01 4.794549877218303e+02 -7.608222202289349e+01 + 5 3.157464578935655e+02 -2.468831627071277e+02 -2.124286318849815e+01 1.956866638471152e+02 + ME 1.188193311029425e-08 + +Event 67 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.575902343233390e+02 1.284720285965683e+02 -3.052315686261782e+02 -1.349051632284907e+02 + 3 2.817442134209693e+02 1.513959995933567e+01 2.809460911141386e+02 1.482862761546490e+01 + 4 3.417076894701673e+02 1.623591614032429e+02 -1.451356906432050e+02 -2.633235254454034e+02 + 5 5.189578627855246e+02 -3.059707899591470e+02 1.694211681552447e+02 3.834000610584292e+02 + ME 1.069564314420608e-07 + +Event 68 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.312846117834605e+02 -2.146983334976369e+01 -8.138388544700084e+01 -1.007539514689958e+02 + 3 6.081561718481715e+02 -1.919908989361124e+02 -4.948570314768852e+02 2.968331896547476e+02 + 4 6.188990257047046e+02 3.200282424269924e+02 4.846263547333213e+02 -2.139047086092678e+02 + 5 1.416601906636633e+02 -1.065675101411164e+02 9.161456219056458e+01 1.782547042351602e+01 + ME 4.596750544733890e-08 + +Event 69 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.931414138169079e+02 -3.273293746991303e+02 -5.999656711319622e+02 1.155062486203779e+02 + 3 5.318906858450803e+02 2.665952958823761e+02 4.596824129140024e+02 -2.295058081397398e+01 + 4 9.890991607956899e+01 7.762108251097793e+01 3.690462310319209e+01 4.895087172158100e+01 + 5 1.760579842584430e+02 -1.688700369422365e+01 1.033786351147677e+02 -1.415065395279848e+02 + ME 6.087424011942764e-05 + +Event 70 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.380439264868779e+02 -3.354639703644540e+02 -1.520232726263372e+02 2.371398968949265e+02 + 3 2.951328688021417e+02 2.031166168690902e+02 6.863385339078722e+01 2.028212128150538e+02 + 4 2.729251659354399e+02 2.078106869723441e+02 -1.750231714082777e+02 -2.587960685865382e+01 + 5 4.938980387755407e+02 -7.546333347698052e+01 2.584125906438277e+02 -4.140815028513266e+02 + ME 1.526402190973689e-08 + +Event 71 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.516725804906696e+02 -2.115628301998922e+02 -4.748726394059171e+02 -1.846070997732851e+02 + 3 1.486032143367139e+02 3.144790462197262e-03 1.024005313005051e+02 -1.076895839470461e+02 + 4 6.474143806083581e+02 3.410247127162772e+02 4.478272683866319e+02 3.198409967853593e+02 + 5 1.523098245642589e+02 -1.294650273068471e+02 -7.535516028121992e+01 -2.754431306502831e+01 + ME 8.561829826283358e-06 + +Event 72 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.330749580482132e+02 -3.265677636286840e+02 5.763987838257717e+00 -6.526254577917835e+01 + 3 6.712248537502356e+02 5.525262209628081e+02 3.205348494218363e+02 2.061916335516648e+02 + 4 1.960894953123145e+02 -1.804902499505635e+02 -3.994939157176093e+01 -6.540952497662286e+01 + 5 2.996106928892366e+02 -4.546820738356064e+01 -2.863494456883330e+02 -7.551956279586351e+01 + ME 1.175963504293250e-08 + +Event 73 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.244112630934240e+02 1.874119439001354e+02 2.373895141185757e+02 2.977379755937671e+02 + 3 2.512397615119819e+02 -1.915148586935148e+02 1.506486288779340e+02 -6.122472769558972e+01 + 4 3.648202995074479e+02 -4.800070047693639e+01 -2.942119755412286e+02 2.103071495088906e+02 + 5 4.595286758871460e+02 5.210361527031582e+01 -9.382616745528101e+01 -4.468203974070680e+02 + ME 2.190510645509726e-08 + +Event 74 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.175955016648010e+02 -2.448313074458401e+02 -4.559235086301704e+02 9.822856832534049e+00 + 3 6.621390955434566e+02 2.137341741969738e+02 6.260267976401974e+02 2.891942710019756e+01 + 4 2.303718015973827e+02 1.812134960949857e+01 -2.278277430547247e+02 2.893619107872610e+01 + 5 8.989360119435973e+01 1.297578363936777e+01 5.772445404469759e+01 -6.767847501145771e+01 + ME 3.728174007465366e-05 + +Event 75 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.234767238744631e+02 1.148240181757038e+02 1.757017011162820e+02 -7.672159532030989e+01 + 3 5.117399613751515e+02 -4.727573887809738e+02 1.390803688823399e+02 1.379669903012637e+02 + 4 2.544294994045669e+02 -3.670658913956010e+01 -4.967306761896025e+01 -2.468189272205846e+02 + 5 5.103538153458185e+02 3.946399597448302e+02 -2.651090023796617e+02 1.855735322396308e+02 + ME 5.016558215576689e-08 + +Event 76 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.909285481378914e+02 -3.305040374270265e+02 -1.794570557368611e+02 1.067116495041263e+02 + 3 4.098525442038564e+02 2.778747229690340e+02 -2.854331647728486e+02 -9.639841685947228e+01 + 4 4.418316193782279e+02 2.211223520423719e+02 3.525074401020420e+02 1.485213452078249e+02 + 5 2.573872882800243e+02 -1.684930375843794e+02 1.123827804076678e+02 -1.588345778524789e+02 + ME 2.954143563509706e-09 + +Event 77 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.911537813436147e+02 -2.642087240745080e+02 -4.088350218788157e+02 6.541950730783680e+01 + 3 3.180168689971177e+02 3.520456914156713e+01 -8.253704519800401e+01 -3.050950728023466e+02 + 4 3.461489397531647e+02 1.250503078887523e+02 3.201771174570675e+02 -4.084265473804997e+01 + 5 3.446804099061027e+02 1.039538470441886e+02 1.711949496197523e+02 2.805182202325598e+02 + ME 7.619107133112622e-09 + +Event 78 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.642050168228878e+02 4.544857132649140e+02 1.463535046289709e+01 -3.339997664116333e+02 + 3 1.651631715519659e+02 1.196484546942685e+02 -1.099426959841972e+02 -2.959263634933707e+01 + 4 2.320532834071475e+02 -7.238565948697827e+01 1.373958575216963e+02 1.724280167970126e+02 + 5 5.385785282179992e+02 -5.017485084722042e+02 -4.208851200039614e+01 1.911643859639578e+02 + ME 1.371761917314043e-07 + +Event 79 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.982601538273628e+02 -1.711694840703935e+02 -2.385903670700898e+02 -5.229496940965934e+01 + 3 3.869985664719069e+02 -7.300257822028925e+01 3.454374333335043e+02 1.584660647471954e+02 + 4 2.730442121954245e+02 -2.168309222333608e+02 1.645934868985690e+02 -2.113000348842466e+01 + 5 5.416970675053059e+02 4.610029845240435e+02 -2.714405531619835e+02 -8.504109184911137e+01 + ME 6.511557453413974e-09 + +Event 80 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.717649893571369e+02 6.886949171513177e+01 -2.685228819958284e+02 -2.477128625390008e+02 + 3 3.869685808114618e+02 5.957956738527029e+01 2.814529638922006e+02 2.588033747881130e+02 + 4 3.309739394987644e+02 1.882716768699517e+02 -1.270374363062544e+01 -2.719120063801442e+02 + 5 4.102924903326370e+02 -3.167207359703538e+02 -2.263382657468383e-01 2.608214941310320e+02 + ME 2.298668672399951e-08 + +Event 81 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.842246424902096e+02 -2.267486624627472e+02 -2.937281983436480e+02 -9.968633540199460e+01 + 3 2.254487557377375e+02 2.209193002070300e+01 1.769877698127917e+02 -1.378927751129431e+02 + 4 4.703100720128006e+02 -6.491977305379046e+01 4.323580934137871e+02 1.733305107675070e+02 + 5 4.200165297592530e+02 2.695765054958348e+02 -3.156176648829309e+02 6.424859974743075e+01 + ME 2.610412817505035e-09 + +Event 82 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.929255068593492e+02 -4.355325407251513e+02 -3.510627019846902e+02 -1.965376348924526e+02 + 3 7.260108906535528e+01 -5.579709963741175e+01 7.472103649087548e+00 -4.584505941304569e+01 + 4 5.079399281835097e+02 3.053634150176129e+02 1.183021662560418e+02 3.882792202410245e+02 + 5 3.265334758917856e+02 1.859662253449502e+02 2.252884320795608e+02 -1.458965259355263e+02 + ME 3.648330924144809e-07 + +Event 83 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.902208799106454e+02 9.347119462039890e+01 -6.680743332736715e+01 2.665109036504027e+02 + 3 6.713082397370666e+02 3.520657855373972e+01 4.944193978438478e+02 -4.527302823990740e+02 + 4 1.855962177862651e+02 -4.627668248951798e+01 -1.740298043062299e+02 -4.492273285839197e+01 + 5 3.528746625660226e+02 -8.240109068462066e+01 -2.535821602102507e+02 2.311421116070631e+02 + ME 2.846073631453881e-08 + +Event 84 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.787180416895206e+02 1.865558524434928e+02 1.788512602743489e+02 1.043689962613429e+02 + 3 5.712981506042247e+02 2.561938996798009e+02 -3.762285149930340e+02 -3.452511653228697e+02 + 4 4.097077405278727e+02 -4.006461115622685e+02 2.118683226805513e+01 8.303158481526167e+01 + 5 2.402760671783827e+02 -4.210364056102517e+01 1.761904224506301e+02 1.578505842462649e+02 + ME 1.393336053758218e-08 + +Event 85 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.203351269117373e+02 -1.925479700358236e+02 -6.940689928982219e+01 5.855968162880135e+02 + 3 5.381473375593997e+02 9.356601590033819e+01 1.871475275927688e+02 -4.958061723160798e+02 + 4 1.334694954173727e+02 6.261202027528761e+01 -5.387043968641776e+01 1.048418659315403e+02 + 5 2.080480401114898e+02 3.636993386019776e+01 -6.387018861652887e+01 -1.946325099034741e+02 + ME 1.175144186701299e-06 + +Event 86 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.865599090092867e+02 -2.891134797262823e+02 -7.185603877268264e+01 2.463304057272006e+02 + 3 2.932777885173375e+02 -1.951329295480071e+02 1.024098870135540e+02 -1.935128318368158e+02 + 4 5.494991859904238e+02 4.929671188610552e+02 -1.532307333884745e+02 1.882899823973623e+02 + 5 2.706631164829519e+02 -8.720709586765841e+00 1.226768851476032e+02 -2.411075562877469e+02 + ME 5.981558327141324e-08 + +Event 87 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.398434642042322e+02 -5.773916908620580e+01 -2.210310523256466e+02 7.305032226170286e+01 + 3 6.256736457816577e+02 -1.570961431352856e+02 3.525379921364367e+02 -4.924482479795606e+02 + 4 2.661332101449430e+02 1.721182608911090e+02 1.257989686761089e+02 1.593010021622582e+02 + 5 3.683496798691678e+02 4.271705133038212e+01 -2.573059084868993e+02 2.600969235555995e+02 + ME 1.397166363438410e-04 + +Event 88 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.084047713119921e+02 -9.094715275662553e+01 -2.599647375380904e+01 2.935409711195911e+02 + 3 6.399024272101833e+02 3.541182238176331e+02 -3.940685931943562e+02 -3.588667493200643e+02 + 4 2.347172247375546e+02 -1.607307767247329e+02 1.246137179386499e+02 1.171717299670462e+02 + 5 3.169755767402701e+02 -1.024402943362748e+02 2.954513490095153e+02 -5.184595176657282e+01 + ME 1.973456756036072e-08 + +Event 89 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.184418668698223e+02 5.725262999818232e+02 2.132430012949283e+02 9.597604349672923e+01 + 3 1.648425597874048e+02 -1.197110850513235e+02 -9.455524227052835e+01 -6.246304341176985e+01 + 4 5.018918856507312e+02 -4.440754270637876e+02 -1.508485608523586e+02 1.787097972941989e+02 + 5 2.148236876920411e+02 -8.739787866711962e+00 3.216080182795855e+01 -2.122227973791583e+02 + ME 1.568817273715900e-06 + +Event 90 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.957637279642276e+02 1.263767639048391e+02 1.039632395279027e+02 1.074429874782743e+02 + 3 6.255717748556117e+02 2.485042080720027e+02 -5.052377532279100e+02 -2.726178951934749e+02 + 4 5.792311181609888e+02 -2.996537209891232e+02 4.496683582853566e+02 2.086017816327423e+02 + 5 9.943337901917147e+01 -7.522725098771861e+01 -4.839384458534928e+01 -4.342687391754171e+01 + ME 2.736497039972114e-08 + +Event 91 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.017185800766916e+02 -1.626043578155511e+02 -4.726483587494785e+02 -4.341526672713017e+01 + 3 1.532087699529515e+02 4.558627180762441e+01 -1.068434756756598e+02 -9.989639992873859e+01 + 4 1.553335691954189e+02 1.187326020855014e+02 -7.919197047207838e+01 -6.131654535069170e+01 + 5 6.897390807749382e+02 -1.714516077574820e+00 6.586838048972166e+02 2.046282120065602e+02 + ME 9.288336681334200e-08 + +Event 92 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.316508895826993e+02 2.423717673725613e+02 -3.493294830668556e+02 7.448039418853939e+01 + 3 4.088752336424421e+02 -4.083682512007605e+02 -4.296296540485988e+00 1.989648042821913e+01 + 4 4.838676110831551e+02 3.367111480297710e+02 3.431854235720046e+02 -5.456402565332683e+01 + 5 1.756062656917031e+02 -1.707146642015718e+02 1.044035603533699e+01 -3.981284896343173e+01 + ME 2.680018893381737e-09 + +Event 93 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.625352690202036e+02 -2.779056014020862e+02 -1.510359273299077e+02 -1.771678488002014e+02 + 3 4.496460928618026e+02 1.458684829985395e+02 -2.529482449111344e+02 -3.419373917692631e+02 + 4 5.819497911300327e+02 7.907814180644722e+01 3.218768382402445e+02 4.783382776751110e+02 + 5 1.058688469879608e+02 5.295897659709960e+01 8.210733400079755e+01 4.076696289435350e+01 + ME 2.589724003231477e-07 + +Event 94 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.529640986072859e+02 -9.457834198297704e+01 -4.155446162454757e+01 1.128103692467342e+02 + 3 5.452273502833522e+02 1.506136657220608e+02 3.951184420445458e+02 -3.441944275421369e+02 + 4 5.763591625604005e+02 -1.414467252236214e+02 -5.409858543903301e+02 1.397033054025702e+02 + 5 2.254493885489612e+02 8.541140148453734e+01 1.874218739703320e+02 9.168075289283256e+01 + ME 1.947047683121928e-08 + +Event 95 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.175930213981758e+02 1.049723762521991e+02 5.988073145300190e+02 1.087738036893143e+02 + 3 2.127444997197509e+02 1.110742673830455e+02 1.426661177414863e+01 -1.808844743885239e+02 + 4 3.734458243090439e+02 -6.700755739503158e+01 -3.574088045654868e+02 8.503362490734212e+01 + 5 2.962166545730298e+02 -1.490390862402129e+02 -2.556651217386811e+02 -1.292295420813219e+01 + ME 2.175144310909644e-08 + +Event 96 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.336643939052875e+02 5.655461284496032e+01 -2.475517668243394e+02 -3.515458790106136e+02 + 3 3.201335954241758e+02 2.737812519173168e+02 1.122352583779800e+02 1.221989844255046e+02 + 4 2.711474972504125e+02 -1.056171090554795e+02 1.641528331527196e+02 -1.882015911406193e+02 + 5 4.750545134201236e+02 -2.247187557067975e+02 -2.883632470636028e+01 4.175484857257282e+02 + ME 2.420565316254954e-08 + +Event 97 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.808150504334330e+02 -2.215516143647532e+02 2.522196782723236e+02 1.797782486876414e+02 + 3 1.725086962483917e+02 -1.958631536182567e+01 -1.200850556071196e+01 -1.709719928118794e+02 + 4 6.244594303322471e+02 3.979033339800429e+02 -4.294715131468292e+02 -2.172020633737498e+02 + 5 3.222168229859278e+02 -1.567654042534641e+02 1.892603404352173e+02 2.083958074979878e+02 + ME 4.352284085440343e-09 + +Event 98 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.497882471555648e+02 -2.192521180269852e+02 2.018837878810383e+02 -3.368692805982172e+02 + 3 3.552361781915542e+02 9.190647471572817e+01 -1.700004974647006e+02 2.980700807917883e+02 + 4 3.423969339559752e+02 -8.430327104189780e+01 -1.816338984228904e+02 2.777368283425730e+02 + 5 3.525786406969056e+02 2.116489143531549e+02 1.497506080065528e+02 -2.389376285361441e+02 + ME 9.816266504356063e-06 + +Event 99 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.510905676127444e+02 -1.120176118685159e+02 1.002985425558891e+02 -1.485316848286262e+01 + 3 6.608990669934888e+02 5.206564204577553e+02 -3.715703155588059e+02 1.662527268483447e+02 + 4 4.055868262761770e+02 -2.099131999005441e+02 1.513461738821256e+02 -3.123002686638893e+02 + 5 2.824235391175904e+02 -1.987256086886954e+02 1.199255991207911e+02 1.609007102984069e+02 + ME 8.331459372890322e-07 + +Event 100 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.912277729130220e+02 -3.038923856333700e+02 -3.681394565520995e+02 -1.158770182765827e+02 + 3 3.291961677177790e+02 9.682949861260764e+01 4.959602220292174e+01 -3.106998545544404e+02 + 4 1.561943773057186e+02 1.080498253360949e+02 -6.909857434628779e+01 8.914766272915456e+01 + 5 5.233816820634804e+02 9.901306168466753e+01 3.876420086954656e+02 3.374292101018685e+02 + ME 1.393819127647782e-08 + +Event 101 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.606145981152812e+02 1.415165413755632e+02 -1.858039240081087e+02 1.156284527747264e+02 + 3 3.602882052374051e+02 2.118000521994822e+02 1.364734610909919e+02 2.575331495930819e+02 + 4 4.124277552237738e+02 -3.176993998179824e+02 2.596287687502778e+02 4.191237372697500e+01 + 5 4.666694414235400e+02 -3.561719375706302e+01 -2.102983058331611e+02 -4.150739760947835e+02 + ME 1.488897902552855e-08 + +Event 102 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.668883721914399e+02 -1.522538817869545e+02 1.714625751179097e+02 6.262263502751125e+02 + 3 1.233366340807367e+02 9.011481525477787e+01 7.793251741380510e+01 -3.190247807788268e+01 + 4 1.269706430435817e+02 -4.043133476762945e+01 5.414615182810899e+01 -1.074943980215523e+02 + 5 5.828043506842416e+02 1.025704012998063e+02 -3.035412443598238e+02 -4.868294741756775e+02 + ME 3.297617806632213e-07 + +Event 103 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.552864941980412e+02 -3.167444776289482e+02 2.214161018629589e+02 -5.291958382354646e+02 + 3 1.601276089464259e+02 -7.094294880163687e+01 -2.470441050126062e+01 1.414130166003577e+02 + 4 5.894184034750448e+02 3.412800894354302e+02 -1.500599500250239e+02 4.565347372418694e+02 + 5 9.516749338048810e+01 4.640733699515487e+01 -4.665174133667438e+01 -6.875191560676257e+01 + ME 2.932130523403274e-07 + +Event 104 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.774569993979300e+02 1.989410031267868e+02 4.017120069248927e+02 1.643627909271369e+02 + 3 4.609712540524605e+01 4.243610185127382e+01 -1.704461951459786e+01 -5.796824639221475e+00 + 4 7.261932715446645e+02 -3.396385607991187e+02 -6.122865574881962e+02 -1.926330375981752e+02 + 5 2.502526036521592e+02 9.826145582105819e+01 2.276191700779015e+02 3.406707131025968e+01 + ME 3.831308408331831e-07 + +Event 105 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.921789576562784e+02 4.810279062964443e+02 1.348719512102337e+02 4.790964616472718e+02 + 3 8.813504188469315e+01 -2.537319850765734e+01 7.858109277220775e+01 3.080581542880034e+01 + 4 6.360767083273016e+01 -3.678422527687845e+01 -3.637890142810105e+01 -3.700583859919021e+01 + 5 6.560783296262979e+02 -4.188704825119085e+02 -1.770741425543404e+02 -4.728964384768819e+02 + ME 1.082894035183429e-05 + +Event 106 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.864390473248633e+02 2.130816993347910e+02 -9.460577540765872e+00 1.911910424511779e+02 + 3 3.195711363524375e+02 -1.238775433747336e+02 -2.683784353696865e+02 1.214622610753980e+02 + 4 5.745504627825516e+02 2.049135896350914e+02 3.226669556919594e+02 -4.289576794638239e+02 + 5 3.194393535401477e+02 -2.941177455951488e+02 -4.482794278150708e+01 1.163043759372481e+02 + ME 1.234446722151009e-08 + +Event 107 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.722313928324554e+02 -1.968575188090820e+02 1.163894612093210e+02 -2.936951147324818e+02 + 3 5.656198121119706e+02 -1.543046273498362e+02 8.076299742135981e+01 5.381386364864782e+02 + 4 4.865572520387377e+01 -4.212119983306869e+01 2.435239455081530e+01 3.807878398712239e-01 + 5 5.134930698517002e+02 3.932833459919871e+02 -2.215048531814962e+02 -2.448243095938675e+02 + ME 1.098825212225620e-06 + +Event 108 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 7.379979300943136e+02 -3.192200473520488e+02 -3.606896713798772e+02 5.591444063494898e+02 + 3 1.260099028519024e+01 3.978889775076310e+00 1.147615618471866e+01 3.354285549740169e+00 + 4 7.222347693662582e+02 2.991742959970567e+02 3.284329357345791e+02 -5.694291961437907e+02 + 5 2.716631025423775e+01 1.606686157991582e+01 2.078057946057941e+01 6.930504244560659e+00 + ME 2.059541454146206e-04 + +Event 109 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.231511027318798e+02 2.454122241586620e+02 -1.092654998279543e+02 -1.796121543150015e+02 + 3 1.956814867717928e+02 1.324393710405636e+02 -9.556622719590956e+01 -1.077875386264064e+02 + 4 5.871682488784802e+02 -4.565221017188252e+02 -1.796226224478535e+02 3.226295656603770e+02 + 5 3.939991616178473e+02 7.867050651959941e+01 3.844543494717174e+02 -3.522987271896919e+01 + ME 1.131201628261414e-05 + +Event 110 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.199007184505405e+01 3.732711745037530e+01 1.830560612245135e+01 5.895525497219110e+00 + 3 6.503495414798849e+02 6.292604094065496e+02 -1.169464273078949e+02 1.153663572993340e+02 + 4 5.826055008056769e+02 -5.629196868847104e+02 1.294559693061781e+02 7.610353275407947e+01 + 5 2.250548858693838e+02 -1.036678399722146e+02 -3.081514812073457e+01 -1.973654155506326e+02 + ME 2.373720202487503e-05 + +Event 111 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.499685704497380e+02 1.681858109101244e+02 -7.955231263377716e+01 -1.669408541244690e+02 + 3 2.500774020307764e+02 -9.118504148310892e+01 1.285070504366491e+02 -1.941904560071345e+02 + 4 4.449919367221886e+02 -3.058493380776594e+02 3.227017355837655e+02 1.837378557748528e+01 + 5 5.549620907972972e+02 2.288485686506438e+02 -3.716564733866373e+02 3.427575245541182e+02 + ME 1.470492043078410e-08 + +Event 112 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.601284604146208e+02 -2.488585849081573e+02 -5.878734146366800e+02 1.680590293030910e+02 + 3 3.001424246875746e+02 -1.647249933729962e+01 1.562495115994508e+02 -2.557346710711165e+02 + 4 3.055316759483335e+02 9.306007508284046e+01 2.734221395002294e+02 9.964818645861378e+01 + 5 2.341974389494710e+02 1.722710091626164e+02 1.582017635369998e+02 -1.197254469058826e+01 + ME 1.619745550065749e-08 + +Event 113 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.646683093846072e+02 2.910998267486567e+02 3.270673291512863e+02 1.555779252178637e+02 + 3 1.032835588102810e+02 6.414528091080065e+01 -8.089516327050815e+01 -2.974729706893169e+00 + 4 2.576709858897333e+02 5.223657579993224e+01 2.415431221983603e+02 7.295613227654688e+01 + 5 6.743771459153788e+02 -4.074816834593897e+02 -4.877152880791386e+02 -2.255593277875174e+02 + ME 7.681413772994171e-06 + +Event 114 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.292401292391440e+02 -4.020985695220133e+02 -3.022214392513490e+02 -1.645419595187190e+02 + 3 2.852547491939839e+02 5.684779875308551e+01 2.983811334987575e+01 -2.779357600352486e+02 + 4 5.503881444993327e+02 3.517711961045184e+02 2.897049565647914e+02 3.086343683687983e+02 + 5 1.351169770675392e+02 -6.520425335590628e+00 -1.732163066331816e+01 1.338433511851691e+02 + ME 6.022091148209651e-07 + +Event 115 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.315689135772181e+02 1.523084328556000e+02 1.421486881719875e+02 1.010942800923345e+02 + 3 4.774006609503493e+02 -1.978437903340176e+02 -1.809847573733626e+02 3.949857507564100e+02 + 4 1.705370598210000e+02 -1.094359051505278e+02 -9.529413476772473e+01 8.958626744734215e+01 + 5 6.204933656514328e+02 1.549712626289454e+02 1.341302039690998e+02 -5.856662982960866e+02 + ME 2.583369958889061e-07 + +Event 116 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.746322505032659e+02 1.490212136649899e+02 -3.941831318833100e+01 -6.567857701582011e+02 + 3 3.002577903546940e+02 2.698491623731484e+01 1.898406713834985e+02 2.310564313171373e+02 + 4 3.649703499796597e+02 -2.118033082945360e+02 -1.168367756298047e+02 2.732981573669967e+02 + 5 1.601396091623805e+02 3.579717839223127e+01 -3.358558256536293e+01 1.524311814740669e+02 + ME 1.103840180080067e-06 + +Event 117 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.989590248458575e+02 1.044204896489002e+02 1.692644965960478e+02 -5.530379840932138e+00 + 3 4.228744835378425e+02 3.264095412410632e+02 -1.699630168106393e+02 -2.083079766375305e+02 + 4 4.224386223860297e+02 -2.861508131031816e+02 2.925187696477572e+02 -1.049041050081309e+02 + 5 4.557278692302706e+02 -1.446792177867819e+02 -2.918202494331658e+02 3.187424614865934e+02 + ME 4.222883609567332e-09 + +Event 118 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.729668676760357e+02 1.184007139072070e+02 5.539744922226419e+02 -8.593348804405296e+01 + 3 2.157021508192258e+02 -1.942718312667870e+02 -3.003467563250634e+01 8.879071856866089e+01 + 4 6.030943128170970e+02 6.761820676461598e+01 -5.931358380448543e+02 -8.567616875825117e+01 + 5 1.082366686876419e+02 8.252910594964055e+00 6.919602145471869e+01 8.281893823364319e+01 + ME 1.197130064463845e-07 + +Event 119 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.846061745194154e+02 -5.587431713332440e+01 2.848851387904504e+02 -2.522705449704536e+02 + 3 3.723414251304717e+02 -7.909406967610423e+01 2.575223087846816e+02 2.570302034556822e+02 + 4 2.507014391707247e+02 -1.454225725560075e+02 -1.575427155496305e+02 -1.299375995265172e+02 + 5 4.923509611793876e+02 2.803909593654362e+02 -3.848647320255016e+02 1.251779410412884e+02 + ME 6.987478149515427e-09 + +Event 120 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.122124974385885e+02 -1.805344246922925e+02 -4.186310826559472e+01 3.682036728658805e+02 + 3 4.103314828537498e+02 1.875880572101384e+02 3.493840084974134e+02 1.054204022917875e+02 + 4 2.606101940762739e+02 1.386532314613984e+02 -1.016069521191984e+01 -2.204307486141520e+02 + 5 4.168458256313883e+02 -1.457068639792442e+02 -2.973602050198988e+02 -2.531933265435160e+02 + ME 1.522037133407384e-08 + +Event 121 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.648818809703109e+02 9.112562142302345e+01 5.529617988614829e+02 3.577670831179963e+02 + 3 1.821081589233734e+02 -1.118989809065603e+02 -1.417154481828441e+02 -2.363749912468558e+01 + 4 3.177811324832343e+02 1.923141187866275e+02 -1.574082799297883e+02 -1.980473713210938e+02 + 5 3.352288276230817e+02 -1.715407593030907e+02 -2.538380707488505e+02 -1.360822126722171e+02 + ME 1.427969941103858e-08 + +Event 122 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.318877662083166e+02 -1.287773968646637e+02 1.171672255817822e+01 -2.595155765412092e+01 + 3 5.737869076225661e+02 4.983007023876715e+02 -1.830722893772108e+02 -2.177437995011737e+02 + 4 4.899092372804375e+02 -1.418218373570128e+02 1.492994579099246e+02 4.445304253807424e+02 + 5 3.044160888886793e+02 -2.277014681659949e+02 2.205610890910764e+01 -2.008350682254478e+02 + ME 8.667372063479675e-08 + +Event 123 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.617768154532660e+02 -5.530096067488929e+01 -2.708467093957606e+02 3.698941619545819e+02 + 3 4.024250741463961e+02 3.719307063830553e+02 -8.950215258237559e+01 -1.249113871280559e+02 + 4 5.686589162433559e+02 -3.599400046259339e+02 3.327673296178381e+02 -2.882395885924827e+02 + 5 6.713919415698200e+01 4.331025891776792e+01 2.758153236029808e+01 4.325681376595668e+01 + ME 2.692696839499492e-07 + +Event 124 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.379698547837551e+02 -1.418344380556738e+02 4.784715070099304e+02 -2.008969233640271e+02 + 3 6.969091655902267e+02 1.102655237134663e+02 -6.144259960763414e+02 3.098460822883782e+02 + 4 1.204076926314279e+02 -5.195962553876775e+01 1.084548321656371e+02 5.979894532426239e+00 + 5 1.447132869945906e+02 8.352853988097523e+01 2.749965690077405e+01 -1.149290534567774e+02 + ME 5.461252319415605e-07 + +Event 125 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.993265030449273e+02 -2.447949992392673e+02 -4.282124327582629e+02 3.404435019658305e+02 + 3 6.731775329270110e+01 -2.804109752229690e+01 -6.119041173487811e+01 1.053693426996917e+00 + 4 1.243834765225636e+02 -1.197301671655536e+02 -1.282222238280984e+01 -3.116932651684168e+01 + 5 7.089722671398082e+02 3.925662639271179e+02 5.022250668759508e+02 -3.103278688759856e+02 + ME 5.469450028911744e-06 + +Event 126 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.963413774872841e+02 -2.028966757095202e+02 -8.071348940097575e+01 -2.003409185009523e+02 + 3 5.505085443412618e+02 -3.540820098777997e+02 -1.472538634584982e+02 3.949707424230035e+02 + 4 5.980459330604076e+02 5.127370036025510e+02 2.537494953815607e+02 -1.742724785511865e+02 + 5 5.510414511104668e+01 4.424168198476883e+01 -2.578214252208698e+01 -2.035734537086468e+01 + ME 3.703478689630513e-07 + +Event 127 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.341333562245315e+02 1.279906072472883e+02 1.954399695910118e+02 1.549358705071582e+01 + 3 2.952995190591675e+02 2.065736836642964e+00 4.076907777821773e+01 -2.924643926788542e+02 + 4 3.901989577777041e+02 -5.888488716750150e+01 3.336956288095710e+02 1.934813273353844e+02 + 5 5.803681669385968e+02 -7.117145691642982e+01 -5.699046761788006e+02 8.348947829275389e+01 + ME 7.048942410786899e-09 + +Event 128 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.006194261205288e+02 1.970078759501975e+02 2.223923104087647e+01 -3.068334325383111e+01 + 3 4.169679269604398e+02 1.948380004768638e+02 -3.622744174691725e+02 -6.824699356921091e+01 + 4 4.053889184975367e+02 7.500867626306021e+01 3.464478799306621e+02 1.966919932722616e+02 + 5 4.770237284214948e+02 -4.668545526901215e+02 -6.412693502366069e+00 -9.776165644921963e+01 + ME 5.241692106099753e-09 + +Event 129 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.252915081508855e+02 -9.538237368340913e+01 -7.350539936684783e+01 5.113025792912360e+02 + 3 3.101175064357083e+02 2.980876593097250e+02 -2.924507148532651e+01 8.038246673851862e+01 + 4 3.069384995973983e+02 -1.872130733221282e+02 3.995859154565954e+01 -2.399287783365572e+02 + 5 3.576524858160083e+02 -1.549221230418743e+01 6.279187930651464e+01 -3.517562676931971e+02 + ME 4.510719923219567e-07 + +Event 130 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.459228778168206e+02 2.565546925335566e+02 -2.098380620336044e+02 5.544042221593887e+02 + 3 3.439568781167829e+02 -2.720151357658145e+02 1.417213346239043e+02 -1.556571978116284e+02 + 4 4.116171180733704e+02 -4.853282653097614e+01 -6.103612751111114e+00 -4.087003334367684e+02 + 5 9.850312599302548e+01 6.399326976323378e+01 7.422034016081112e+01 9.953309089007995e+00 + ME 1.009215808611906e-06 + +Event 131 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.691384726730905e+02 9.209415983561640e+01 8.878922249924504e+01 -3.462634137467797e+02 + 3 2.941454650704778e+02 5.402596827688082e+01 5.252299287417019e+01 2.843309420249809e+02 + 4 3.384067227193843e+02 -4.862827719487453e+01 3.183719183147821e+02 -1.038928403081678e+02 + 5 4.983093395370473e+02 -9.749185091762267e+01 -4.596841336881973e+02 1.658253120299667e+02 + ME 6.136966240276261e-09 + +Event 132 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.707345198779215e+02 6.870837694602631e+01 -2.400964784749993e+02 1.045467369881799e+02 + 3 4.279656548163086e+02 3.103112050689890e+02 2.902864584573433e+02 5.094437895662996e+01 + 4 4.190719066649796e+02 -1.246682736407299e+02 1.263571350494781e+02 -3.796221264960058e+02 + 5 3.822279186407903e+02 -2.543513083742854e+02 -1.765471150318222e+02 2.241310105511960e+02 + ME 1.724145733357482e-08 + +Event 133 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.929720700957797e+02 5.142339919817744e+02 2.604838772561675e+02 -3.846060856420664e+02 + 3 3.148753114588353e+01 -2.203036177987943e+01 1.741009785128097e+01 -1.424837781361216e+01 + 4 2.496211560069210e+02 -1.554620265425120e+02 -1.952705634097225e+02 3.418610123488827e+00 + 5 5.259192427514150e+02 -3.367416036593829e+02 -8.262341169772583e+01 3.954358533321899e+02 + ME 1.238961772659907e-05 + +Event 134 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.197916906084878e+02 6.019490617396246e+01 -8.116208159236564e+01 -6.433769440337217e+01 + 3 5.683824394481226e+02 1.081755691462717e+02 -5.398427847909498e+02 1.411609415597358e+02 + 4 4.816985571718546e+02 -2.884024598071591e+02 3.717366705283751e+02 1.032926374099569e+02 + 5 3.301273127715343e+02 1.200319844869249e+02 2.492681958549404e+02 -1.801158845663207e+02 + ME 4.044329551622419e-08 + +Event 135 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.350166624422527e+02 -2.198562968051228e+02 -3.373781523021513e+01 -2.505217209995491e+02 + 3 5.912215178852441e+02 -2.771944434106617e+01 -4.569913276888498e+02 3.740767862794175e+02 + 4 2.502486776794080e+02 6.054245701130881e+01 2.317565313843600e+02 -7.244254095499562e+01 + 5 3.235131419930953e+02 1.870332841348801e+02 2.589726115347048e+02 -5.111252432487285e+01 + ME 5.564179156041390e-08 + +Event 136 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.090067243858946e+02 -5.732442171651005e+01 7.824626590657545e+01 4.973830021108072e+01 + 3 6.815640342145938e+02 -4.337142854700792e+02 -4.067901902413736e+02 3.330813600870479e+02 + 4 2.032618343052464e+02 1.129685178335902e+02 1.212961788254292e+02 -1.176466075412493e+02 + 5 5.061674070942652e+02 3.780701893529991e+02 2.072477455093691e+02 -2.651730527568794e+02 + ME 6.883104349826221e-07 + +Event 137 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.368852252705568e+02 2.060183932929131e+02 2.064637249428417e+02 -3.252658173977682e+02 + 3 3.381060129384423e+02 1.187665134594073e+02 -2.812383212949928e+02 1.453106943793225e+02 + 4 4.559721413906877e+02 -1.886887365516218e+02 2.518423412375508e+02 3.299736195257901e+02 + 5 2.690366204003139e+02 -1.360961702006985e+02 -1.770677448853995e+02 -1.500184965073444e+02 + ME 1.160548431187924e-08 + +Event 138 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.281444835382400e+02 -7.170216505610387e+01 8.048316021729237e+01 3.099355780227290e+02 + 3 4.195412269153062e+02 -8.233072610126706e+01 3.843189873918888e+02 1.467494754720159e+02 + 4 5.954423007595251e+02 2.591445083415473e+02 -3.916019632055438e+02 -3.661195975958926e+02 + 5 1.568719887869287e+02 -1.051116171841762e+02 -7.320018440363727e+01 -9.056545589885236e+01 + ME 6.549075898554983e-08 + +Event 139 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.608240142934881e+02 -1.978529853543028e+02 -1.693530849717742e+02 -1.424412963654433e+01 + 3 4.955759006510128e+02 -4.667016398458182e+02 -1.515076386550367e+02 6.950171293185221e+01 + 4 6.747340014191125e+02 6.026021606891686e+02 2.951526224468365e+02 -7.086281159076073e+01 + 5 6.886608363638693e+01 6.195246451095252e+01 2.570810117997448e+01 1.560522829545275e+01 + ME 1.584556714413430e-05 + +Event 140 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.602659806312457e+02 -3.561732527960755e+02 2.435133213622238e+01 -4.836531211568242e+01 + 3 3.725079748856116e+02 -2.434506824135563e+02 -2.792614056347937e+02 -3.882040582776655e+01 + 4 4.679082590584684e+02 4.480807144504858e+02 8.348713917835198e+01 -1.057908777942770e+02 + 5 2.993177854246740e+02 1.515432207591460e+02 1.714229343202193e+02 1.929765957377260e+02 + ME 1.397449795178337e-08 + +Event 141 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.518456049687265e+02 -1.447323876721944e+02 -2.797778873058074e+02 -4.531119524540313e+02 + 3 3.714883419349469e+02 1.931277822064916e+02 8.611260447142448e+01 3.054339000253999e+02 + 4 3.355296667174945e+02 -2.406718940601041e+02 6.932072359930869e+01 2.232752425521988e+02 + 5 2.411363863788320e+02 1.922764995258069e+02 1.243445592350743e+02 -7.559719012356737e+01 + ME 2.289959978971276e-08 + +Event 142 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.034813172564561e+02 -2.283824334287206e+02 -1.981635898359732e+02 -2.595314409103105e+01 + 3 6.163677719793855e+02 6.075815331760192e+02 1.023397473350788e+02 1.674774592897086e+01 + 4 2.855126706949896e+02 -1.929815176467484e+02 2.738809148793401e+01 -2.086276861272057e+02 + 5 2.946382400691695e+02 -1.862175821005503e+02 6.843575101296032e+01 2.178330842892659e+02 + ME 2.845394223688494e-08 + +Event 143 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.765102965824572e+02 6.404671225068564e+01 -2.523880643688529e+02 -9.303885064928589e+01 + 3 4.906331167889079e+02 4.654623693262333e+02 -8.642087129466307e+01 1.288296201806037e+02 + 4 3.107154638669692e+02 -1.787822362222275e+02 1.647042861868788e+02 -1.935290924102013e+02 + 5 4.221411227616651e+02 -3.507268453546915e+02 1.741046494766373e+02 1.577383228788834e+02 + ME 8.618192815594796e-09 + +Event 144 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.275344822318363e+02 -5.170608027367086e+02 7.533492100171158e+01 -7.256311662648034e+01 + 3 8.007363982231998e+01 5.428447222359202e+01 4.041177195768910e+00 -5.872523100570222e+01 + 4 6.090813110431084e+02 5.981821680688868e+02 -2.587994404401108e+01 -1.117513568717483e+02 + 5 2.833105669027356e+02 -1.354058375557700e+02 -5.349615415346947e+01 2.430397045039308e+02 + ME 1.282321413165749e-06 + +Event 145 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.325096538893530e+02 -2.426159535975006e+02 -3.315129682972141e+02 -3.388261831619632e+02 + 3 2.284791393037104e+02 -1.566914323798220e+02 8.733052769045943e+01 1.415057986410094e+02 + 4 4.231517474846562e+02 4.111259958116378e+02 7.341849952547859e+01 -6.813619371989205e+01 + 5 3.158594593222808e+02 -1.181860983431524e+01 1.707639410812761e+02 2.654565782408458e+02 + ME 1.989700748448432e-07 + +Event 146 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.853154876963472e+02 -1.115425014580856e+02 2.346915094935503e+00 4.723175679095089e+02 + 3 1.780978034776686e+02 -1.279353210791639e+02 1.013248544366916e+02 7.130676754225195e+01 + 4 2.669235424450998e+02 2.236642823219127e+02 1.425247145974822e+02 -3.015248006003818e+01 + 5 5.696631663808841e+02 1.581354021533682e+01 -2.461964841291093e+02 -5.134718553917226e+02 + ME 9.542241308891179e-08 + +Event 147 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.616553850833649e+02 -3.952525530052050e+02 -1.318566300751644e+02 1.987836588468952e+02 + 3 2.908739185877553e+02 2.228658584604865e+02 -1.479014920521994e+02 -1.142960817176148e+02 + 4 2.305801020752397e+02 -4.980254073033321e+01 -8.282806011201670e+01 2.093475647527613e+02 + 5 5.168905942536400e+02 2.221892352750518e+02 3.625861822393804e+02 -2.938351418820417e+02 + ME 3.925248230183511e-08 + +Event 148 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.986236365167859e+02 2.143922541391384e+02 7.424054753538570e+01 -1.941658537263818e+02 + 3 5.431300986327866e+02 -2.806204744558453e+02 1.772213579739537e+02 4.299244627081655e+02 + 4 2.075257794515811e+02 -1.671248660321451e+01 1.739190576128833e+02 -1.119812632879726e+02 + 5 4.507204853988458e+02 8.294070691992133e+01 -4.253809631222227e+02 -1.237773456938111e+02 + ME 1.792548862963308e-08 + +Event 149 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.606702652730058e+02 1.482150598519967e+02 5.691576771795033e+01 -2.465411854119752e+01 + 3 5.470495180870233e+02 2.976789640827242e+02 4.494205378211043e+02 -9.312137115866565e+01 + 4 8.855244506584305e+01 2.448792744151061e+01 -2.255805030539081e+01 -8.205492857335213e+01 + 5 7.037277715741276e+02 -4.703819513762315e+02 -4.837782552336639e+02 1.998304182732153e+02 + ME 3.022640231901066e-06 + +Event 150 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.589228438361087e+02 -4.599888281396891e+01 -1.940699740613964e+02 1.651120438001223e+02 + 3 3.672343011246725e+02 -1.252842613728790e+02 -3.439632022826295e+02 -2.922672151058827e+01 + 4 2.630407655820263e+02 -2.136932482478519e+02 6.383958259969688e+01 -1.394637863560174e+02 + 5 6.108020894571932e+02 3.849763924346998e+02 4.741935937443291e+02 3.578464066483269e+00 + ME 2.451753064577522e-08 + +Event 151 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.074288193573346e+02 1.543896703986276e+02 -1.365285657072381e+02 2.346264094481421e+01 + 3 1.187518680134530e+02 6.614859683574460e+01 2.146588978980583e+01 -9.625790808488716e+01 + 4 5.855490127465466e+02 -2.497256519667726e+01 4.593548187907378e+02 -3.622667080614524e+02 + 5 5.882702998826659e+02 -1.955657020376949e+02 -3.442921428733055e+02 4.350619752015253e+02 + ME 1.403761429841276e-07 + +Event 152 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.469187816458224e+02 3.346653279286313e+01 6.576737700245403e+00 2.445518808627397e+02 + 3 2.050488318670080e+02 2.024852188395404e+02 -3.198592830617967e+01 -4.654029643207478e+00 + 4 4.457639178610945e+02 1.763406247999739e+02 -3.941620330002511e+02 -1.106604999678583e+02 + 5 6.022684686260751e+02 -4.122923764323775e+02 4.195712236061854e+02 -1.292373512516739e+02 + ME 8.116477778827081e-09 + +Event 153 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.388118256285087e+02 -1.907263201164206e+02 2.746355408008761e+02 5.470140518836757e+01 + 3 4.321891825954874e+02 3.144038017692075e+02 9.731608721136159e+01 -2.801201851982380e+02 + 4 2.946402774128100e+02 -2.098835107053740e+02 -1.526675250199261e+02 -1.394791447212631e+02 + 5 4.343587143631935e+02 8.620602905258723e+01 -2.192841029923117e+02 3.648979247311337e+02 + ME 4.626132947604298e-09 + +Event 154 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 7.166018743478079e+02 2.716108235141309e+02 -4.142745723228110e+02 -5.178053549312899e+02 + 3 4.336582961481601e+02 -2.527703288032556e+02 2.658228397098244e+02 2.313112547703298e+02 + 4 1.758894695506488e+02 -5.524813141932555e+01 1.166356953616248e+02 1.195025691815528e+02 + 5 1.738503599533830e+02 3.640763670845025e+01 3.181603725136177e+01 1.669915309794072e+02 + ME 9.739017552565555e-07 + +Event 155 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.311412179822988e+02 4.570041908288474e+00 2.309160670256665e+02 -9.118517242124817e+00 + 3 1.127940168856365e+02 9.688938222147939e+01 5.762608966553506e+01 -3.764524909869582e+00 + 4 4.841340752681733e+02 1.199724179371484e+02 1.518135540047473e+02 -4.437849328115266e+02 + 5 6.719306898638915e+02 -2.214318420669161e+02 -4.403557106959490e+02 4.566679749635209e+02 + ME 6.851747290447632e-07 + +Event 156 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.939383624002055e+02 -5.584434953296778e+01 -1.074936322310989e+02 -1.514549968323212e+02 + 3 5.333164952329516e+02 -4.350263902124027e+02 2.486552239121393e+01 -3.075064709929489e+02 + 4 5.439544646395684e+02 2.632706271852285e+02 6.316511808396706e+01 4.717893643568650e+02 + 5 2.287906777272746e+02 2.276001125601422e+02 1.946299175591791e+01 -1.282789653159498e+01 + ME 1.481000882395586e-07 + +Event 157 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.312192489929148e+02 -1.585569120979517e+02 1.680571010706740e+02 -8.880175140797474e+00 + 3 4.848229799559913e+02 2.683425948717759e+02 -3.974996855026540e+02 7.098995489631305e+01 + 4 4.746943934695868e+02 8.517047965358651e+01 4.145824897329423e+02 -2.149467743276730e+02 + 5 3.092633775815074e+02 -1.949561624274110e+02 -1.851399053009623e+02 1.528369945721574e+02 + ME 5.434949567094156e-09 + +Event 158 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.018805202065023e+02 -1.753303435111355e+02 -2.369304707527992e+02 -5.247698383836232e+02 + 3 8.634821849561426e+01 -2.991645269896793e+01 7.632972427838878e+01 -2.710708185810307e+01 + 4 4.997026770426654e+02 3.739093325581300e+02 1.867465724157422e+01 3.309770893074772e+02 + 5 3.120685842552181e+02 -1.686625363480265e+02 1.419260892328361e+02 2.208998309342491e+02 + ME 5.788602537992303e-07 + +Event 159 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.303650459443541e+02 1.779155779553055e+02 1.687725002807367e+02 3.536608022392421e+02 + 3 5.511053464986993e+02 -4.854202618317909e+02 -2.099654990918666e+02 -1.549153366639674e+02 + 4 1.610168062150695e+02 -8.022454684444302e+00 -1.072391010449718e+02 -1.198408415841761e+02 + 5 3.575128013418773e+02 3.155271385609297e+02 1.484320998561018e+02 -7.890462399109865e+01 + ME 2.063727006087920e-08 + +Event 160 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.944516008522268e+02 -6.281446959798443e+01 1.015008487838442e+02 -1.535035673177559e+02 + 3 4.230235916153152e+02 -3.998222205375997e+02 -6.268267453255914e+01 -1.231342086544158e+02 + 4 6.245424625752944e+02 4.116166861635971e+02 1.496811615662379e+02 4.452196548935073e+02 + 5 2.579823449571633e+02 5.102000397198710e+01 -1.884993358175229e+02 -1.685818789213359e+02 + ME 3.679115014007942e-08 + +Event 161 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.155018654656784e+02 -7.068712627844450e+01 9.130062612448707e+01 2.864746729386987e+00 + 3 4.158111502215671e+02 2.244999292291257e+02 2.797316750395929e+02 -2.103541879883635e+02 + 4 2.674174137253543e+02 -2.901773797454457e+01 2.441511879743710e+02 -1.051676825697958e+02 + 5 7.012695705874006e+02 -1.247950649761366e+02 -6.151834891384510e+02 3.126571238287723e+02 + ME 1.233407114871100e-07 + +Event 162 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.251731088161694e+02 4.809658489651716e+02 2.183673650866463e+02 -3.344083760631615e+02 + 3 1.108846666575800e+02 1.085837095121458e+02 1.269400989282292e+01 -1.854317775316524e+01 + 4 4.812365383625109e+02 -3.785395977737375e+02 -2.468116052076602e+02 1.654702701612802e+02 + 5 2.827056861637403e+02 -2.110099607035797e+02 1.575023022819105e+01 1.874812836550461e+02 + ME 2.983265920792471e-06 + +Event 163 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.197406137989224e+02 3.484446545657323e+01 -2.083509112967882e+02 6.051196858118802e+01 + 3 2.294753481748079e+02 -4.289167430922014e+01 1.411072116241522e+02 1.758066964667666e+02 + 4 6.045742534248396e+02 -3.922481835179264e+01 -2.454372160591728e+02 -5.511188751100746e+02 + 5 4.462097846014298e+02 4.727202720443962e+01 3.126809157318087e+02 3.148002100621198e+02 + ME 9.864732327742836e-08 + +Event 164 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.294925844427888e+02 7.335206987339838e+01 3.211431815175449e+02 7.203749916922466e+00 + 3 4.456282610861912e+02 -2.140706694514153e+02 -2.874930256302156e+02 2.647754818205600e+02 + 4 5.123820383524130e+02 1.705541274100711e+02 -2.866217204657403e+01 -4.823122668387517e+02 + 5 2.124971161186064e+02 -2.983552783205418e+01 -4.987983840755344e+00 2.103330351012688e+02 + ME 1.602732609424759e-06 + +Event 165 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.181198415073812e+02 -4.576729557413964e+01 1.980904969172528e+01 2.123422272308200e+02 + 3 2.986822563453929e+02 -2.114010465926206e+02 -1.050902232874885e+02 -1.829664797838815e+02 + 4 6.054978258860258e+02 4.739070609379935e+02 3.590040584148247e+02 1.146987392585554e+02 + 5 3.777000762612001e+02 -2.167387187712332e+02 -2.737228848190615e+02 -1.440744867054939e+02 + ME 4.824679004507268e-08 + +Event 166 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.222232017840727e+02 3.192297607931550e+02 6.501391151310611e+00 -4.333455324590233e+01 + 3 3.053327974515881e+02 1.412228998217293e+02 2.069513876027932e+02 1.745145636754502e+02 + 4 4.336545371614681e+02 -3.424637997499572e+02 2.077212038433833e+02 -1.662128302370304e+02 + 5 4.387894636028709e+02 -1.179888608649271e+02 -4.211739825974873e+02 3.503281980748251e+01 + ME 3.815717061776281e-09 + +Event 167 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.729290336372008e+02 2.217891042804635e+02 -3.163933861400006e+01 -1.558807328590503e+02 + 3 1.537967125602959e+02 -5.805059168074692e+01 -5.204366344775282e+00 1.423252337810090e+02 + 4 6.018172045649106e+02 -4.859322890486575e+02 2.249815041196951e+02 -2.746581165272472e+02 + 5 4.714570492375925e+02 3.221937764489409e+02 -1.881377991609198e+02 2.882136156052884e+02 + ME 1.018904034669989e-08 + +Event 168 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.302714671417868e+01 -4.694579621882252e+01 -8.099628082448691e+00 -2.328876404951167e+01 + 3 5.269668821589169e+02 -9.568171326198458e+01 -5.105187840955387e+02 -8.893635772367706e+01 + 4 3.135748577105153e+02 3.091348665867711e+02 -5.194641375603636e+01 -8.148358511739456e+00 + 5 6.064311134163896e+02 -1.665073571059640e+02 5.705648259340238e+02 1.203734802849284e+02 + ME 8.118367292619523e-08 + +Event 169 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.789601344296162e+02 5.468556852911152e+02 -1.869602488084409e+02 3.449002883486748e+01 + 3 5.891143790802997e+02 -5.265905860904877e+02 1.639376395451868e+02 2.070810387756352e+02 + 4 1.164890241423856e+02 4.243473362119256e+01 9.674051308718406e+01 -4.909439128629754e+01 + 5 2.154364623476983e+02 -6.269983282181995e+01 -7.371790382393003e+01 -1.924766763242052e+02 + ME 1.776299576355062e-07 + +Event 170 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.175951285792084e+02 -5.046759251961064e+02 2.162362154945924e+02 -2.827858774422785e+02 + 3 8.257615191587736e+01 -1.244558951936122e+01 -3.459182778741835e+01 7.394142017215529e+01 + 4 3.412788931358452e+02 9.206397792120845e+01 -3.135461028995509e+02 9.840908609399399e+01 + 5 4.585498263690690e+02 4.250575367942591e+02 1.319017151923769e+02 1.104353711761293e+02 + ME 1.031098678470843e-07 + +Event 171 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.241099768142416e+02 -1.801845393564228e+02 -4.755218322366496e+02 3.618366786304098e+02 + 3 1.760989498853843e+02 1.628509626135169e+02 2.215130304491187e+01 6.324337040353328e+01 + 4 1.106507541955661e+02 8.705766835783074e+01 6.684051231296790e+01 1.403202401243385e+01 + 5 5.891403191048082e+02 -6.972409161492482e+01 3.865300168787697e+02 -4.391120730463770e+02 + ME 3.196616728704032e-08 + +Event 172 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.170584705570329e+02 -2.734753423202163e+02 -1.216658779499090e+02 2.904245498384905e+02 + 3 2.310308870099137e+02 8.118388166822324e+01 2.158679150802150e+02 -1.361952087220694e+01 + 4 5.904124943192925e+02 2.597890264188085e+02 -2.749362883764528e+02 -4.533283716407745e+02 + 5 2.614981481137613e+02 -6.749756576681540e+01 1.807342512461468e+02 1.765233426744909e+02 + ME 2.144054022459239e-08 + +Event 173 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.257185513659660e+02 -1.853427295891294e+02 1.999009554138799e+02 -1.782701750630551e+02 + 3 5.945302616762999e+02 -1.868533588100201e+02 -3.653044045316943e+02 4.302380113147228e+02 + 4 4.859436879418532e+02 4.057526358399537e+02 7.788756376499921e+01 -2.558116372845701e+02 + 5 9.380749901588126e+01 -3.355654744080420e+01 8.751588535281510e+01 3.843801032902197e+00 + ME 4.492007672036047e-08 + +Event 174 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.305554368133522e+02 -4.672890155754840e+02 -2.496372833150609e+02 2.848287615003372e+01 + 3 3.299992352974423e+02 -6.928313446547062e+01 3.005180188229559e+02 -1.174234343658106e+02 + 4 4.859186117296834e+02 4.836387558179937e+02 -2.840874679686298e+00 -4.692952724224151e+01 + 5 1.535267161595212e+02 5.293339422296092e+01 -4.803986082820874e+01 1.358700854580181e+02 + ME 1.963643420674225e-08 + +Event 175 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.655594170959286e+02 -8.549977165527956e+00 3.601534549686833e+02 6.204896608409049e+01 + 3 5.484575297133066e+02 -1.135388551231450e+02 -5.289508375770936e+02 -9.014211947274862e+01 + 4 2.960714747917294e+02 2.867045434701770e+02 -5.821682656799009e+01 -4.549312083446882e+01 + 5 2.899115783990353e+02 -1.646157111815041e+02 2.270142091764003e+02 7.358627422312696e+01 + ME 1.797554086108266e-07 + +Event 176 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.687299918743935e+02 8.339274256771583e+01 3.315319220567164e+02 1.381811928306607e+02 + 3 1.629485641149831e+02 -9.683584082676977e+01 -1.409503471845347e+01 1.302934552262425e+02 + 4 4.822020608335142e+02 -2.484261719570099e+02 -3.907996987564748e+02 1.344576513654872e+02 + 5 4.861193831771089e+02 2.618692702160638e+02 7.336281141821190e+01 -4.029322994223904e+02 + ME 2.741061669514358e-08 + +Event 177 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.577057842620000e+02 2.915980668115854e+00 1.386867066994572e+02 -2.171860163171064e+02 + 3 7.376522012584236e+02 -1.434041695523210e+02 -3.410539372724913e+02 6.381600316905930e+02 + 4 6.808763621736034e+01 2.120489361288136e+01 5.915691106678145e+01 -2.620569719681001e+01 + 5 4.365543782622163e+02 1.192832952713237e+02 1.432103195062527e+02 -3.947683181766764e+02 + ME 1.077234048167949e-05 + +Event 178 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.161481411810116e+02 5.961255761930871e+02 3.994627094820481e+01 1.505892583373998e+02 + 3 4.209349270977736e+02 -3.821919352609089e+02 8.968205956028466e+01 -1.518968915592242e+02 + 4 3.373669481877309e+02 -2.683700810084367e+02 -1.756017833436885e+02 1.046803278345296e+02 + 5 1.255499835334836e+02 5.443644007625858e+01 4.597345283519907e+01 -1.033726946127052e+02 + ME 5.643071175218675e-08 + +Event 179 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.043080164604085e+02 -4.190938142816105e+02 2.545150292529335e+02 1.179366362989085e+02 + 3 3.183281589704842e+02 3.585230981201615e+01 1.721259596521259e+02 -2.653678252699747e+02 + 4 2.314375836919171e+02 2.283484903133223e+02 -2.615876940174820e+01 2.713007372208609e+01 + 5 4.459262408771901e+02 1.548930141562721e+02 -4.004822195033112e+02 1.203011152489800e+02 + ME 4.270447503980010e-09 + +Event 180 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.882297939654281e+02 -6.668050208816672e+02 1.625262598210258e+02 5.115201166409273e+01 + 3 1.329650151441869e+02 1.107437070332806e+02 -6.736705495672318e+01 2.961767227988413e+01 + 4 4.738727920676825e+02 4.060266452073242e+02 -2.342858705864514e+02 -6.933914685987018e+01 + 5 2.049323988227019e+02 1.500346686410625e+02 1.391266657221484e+02 -1.143053708410680e+01 + ME 6.456947687167656e-08 + +Event 181 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.428334272971978e+02 1.994988487176103e+02 -8.712095886553358e+01 1.076021435641571e+02 + 3 5.756669394886247e+02 -4.225670293516123e+02 3.014220455272963e+02 2.489463424019198e+02 + 4 2.315484652385184e+02 -9.345090162870810e+01 6.540105188821644e+01 -2.015051442296441e+02 + 5 4.499511679756598e+02 3.165190822627102e+02 -2.797021385499793e+02 -1.550433417364326e+02 + ME 5.570254340110193e-08 + +Event 182 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.444435281163276e+02 1.469003270004890e+01 -4.049746300418323e+02 -1.825097302782551e+02 + 3 5.448711840887836e+02 -2.922556364469127e+02 4.166227684668842e+02 -1.946707965009439e+02 + 4 3.116991105767848e+02 1.944903403636982e+02 -1.026079273884969e+02 2.209105164463849e+02 + 5 1.989861772181039e+02 8.307526338316566e+01 9.095978896344506e+01 1.562700103328142e+02 + ME 3.981507039485593e-08 + +Event 183 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.401094905126758e+02 -1.821299783062261e+02 1.426447704035357e+02 6.429391816457414e+01 + 3 5.112023061484729e+02 4.864809735593811e+02 1.476911503742452e+02 5.339835463163433e+01 + 4 1.651868611336106e+02 5.963144449802130e+01 1.535106867308423e+02 -1.285530931869608e+01 + 5 5.835013422052410e+02 -3.639824397511763e+02 -4.438466075086230e+02 -1.048369634775124e+02 + ME 1.485037456661759e-08 + +Event 184 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.826515649016759e+02 -1.477902646129266e+02 1.867155418966292e+02 -1.522736065155598e+02 + 3 6.027880405940907e+02 1.749283586593599e+01 -3.719329937924915e+02 4.740393134595325e+02 + 4 2.613827332123843e+02 -1.367477909345774e+02 -2.306183173214315e+01 -2.215606617006907e+02 + 5 3.531776612918493e+02 2.670452196815680e+02 2.082792836280054e+02 -1.002050452432820e+02 + ME 5.509046501140474e-08 + +Event 185 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.293902171331328e+02 2.274132505448976e+01 4.856616106115516e+02 -2.094507916175659e+02 + 3 3.105838365977013e+02 -2.358986821094529e+02 -1.967102753115335e+02 4.603475775576094e+01 + 4 1.784474258301200e+02 3.764653629262912e+01 6.082173661233966e+00 -1.743250677731649e+02 + 5 4.815785204390459e+02 1.755108207623341e+02 -2.950335089612521e+02 3.377411016349700e+02 + ME 1.734260193481628e-07 + +Event 186 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.989720483234585e+02 -1.741182591155330e+02 -6.550171034983236e+01 7.058494030496489e+01 + 3 5.152114262802828e+02 -4.648498795531518e+02 -1.436720305668072e+02 1.694572243428831e+02 + 4 5.546843843841008e+02 4.191879013201381e+02 1.907167584026881e+02 -3.091656315484596e+02 + 5 2.311321410121571e+02 2.197802373485465e+02 1.845698251395170e+01 6.912346690061167e+01 + ME 1.269048684612794e-03 + +Event 187 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.129865985452143e+02 8.791089187031965e+01 -7.377241052563376e+01 -3.967206033391113e+02 + 3 6.138096947611982e+02 2.827115017631438e+02 3.326539175498887e+02 4.314833939937611e+02 + 4 1.561121885082345e+01 -1.526480341131205e+00 1.058464960658816e+01 -1.137300331848183e+01 + 5 4.575924878427639e+02 -3.690959132923323e+02 -2.694661566308431e+02 -2.338978733616798e+01 + ME 1.312689025628123e-06 + +Event 188 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.409186700623276e+02 2.554881275349463e+02 3.574186001581245e+02 -3.724291287245752e+01 + 3 5.678467400131308e+02 -2.085482205222035e+02 -5.142972510897584e+02 -1.202326801750691e+02 + 4 3.251230260129324e+02 -1.394598252065705e+02 2.786827561471974e+02 9.269228998876029e+01 + 5 1.661115639116091e+02 9.251991819382758e+01 -1.218041052155635e+02 6.478330305876626e+01 + ME 1.546538191107271e-08 + +Event 189 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.048089636454501e+02 -1.135472313170013e+02 1.696480662060318e+02 -1.653092502918514e+01 + 3 5.473280721360723e+02 8.276565856454246e+01 -4.677176099525416e+02 -2.719523885735314e+02 + 4 5.707624195781960e+02 1.366705484110403e+02 3.757862824583086e+02 4.072782472904077e+02 + 5 1.771005446402820e+02 -1.058889756585815e+02 -7.771673871179848e+01 -1.187949336876910e+02 + ME 5.878438196807855e-08 + +Event 190 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.691905082890466e+02 1.091304876593433e+02 -1.415440939324064e+02 -3.230440179709456e+02 + 3 5.165238126843835e+02 6.541410712031549e+01 5.564220852798431e+00 5.123347373602196e+02 + 4 4.306101857863023e+02 -3.416491223880155e+02 2.067968524389392e+02 -1.610467978438568e+02 + 5 1.836754932402680e+02 1.671045276083569e+02 -7.081697935933127e+01 -2.824392154541716e+01 + ME 3.437045775489816e-08 + +Event 191 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.069337892507112e+02 -3.717000808244268e+02 -1.559978392326048e+02 -5.566716180851298e+01 + 3 5.558199679384036e+02 4.288254322302436e+02 -3.467374488240874e+02 6.940984810929838e+01 + 4 1.131764079543421e+02 2.092547930706861e+01 8.924670515456383e+01 -6.637807810016392e+01 + 5 4.240698348565434e+02 -7.805083071288544e+01 4.134885829021285e+02 5.263539179937854e+01 + ME 2.857716857713938e-08 + +Event 192 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.660270538535898e+02 -6.938500902735587e+00 3.406931051238014e+02 -1.336258563267746e+02 + 3 2.198197890933954e+02 1.850047155697348e+02 -9.607133768696315e+01 -6.974448343104864e+01 + 4 4.132582096760701e+02 -1.250851363991759e+02 -2.616302956397870e+02 -2.944242600739753e+02 + 5 5.008949473769448e+02 -5.298107826782326e+01 1.700852820294866e+01 4.977945998317986e+02 + ME 2.415902125902624e-07 + +Event 193 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.330325958487633e+02 5.870041499782552e+01 1.287754330113803e+02 1.851360036833128e+02 + 3 5.708908650052945e+02 1.115253094670215e+02 4.567035139831037e+02 -3.238832897978265e+02 + 4 1.796971979479947e+02 7.338418865332758e+01 -1.320667158645153e+02 9.728425549293682e+01 + 5 5.163793411979481e+02 -2.436099131181745e+02 -4.534122311299690e+02 4.146303062157691e+01 + ME 1.084472508220815e-08 + +Event 194 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.026272994324191e+02 -2.281452380970014e+02 1.481292949894225e+02 4.226602233879195e+02 + 3 3.230851168166026e+02 6.671920747475995e+01 -1.604438231736436e+02 -2.723790000491271e+02 + 4 4.149226527531526e+02 1.112824714324781e+02 1.170540097886192e+02 -3.821980875305355e+02 + 5 2.593649309978254e+02 5.014355918976329e+01 -1.047394816043981e+02 2.319168641917431e+02 + ME 4.953342414967494e-08 + +Event 195 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.186769531653988e+02 4.053399161407181e+02 -4.064715764973516e+01 -3.210500626116969e+02 + 3 1.983392180439614e+02 1.362622940759869e+02 -2.970600443234310e+01 1.410268978886826e+02 + 4 4.580369644375024e+02 -4.270735786572080e+02 -1.650789232562076e+02 -1.244862645509943e+01 + 5 3.249468643531376e+02 -1.145286315594970e+02 2.354320853382859e+02 1.924717911781137e+02 + ME 7.527283647323538e-09 + +Event 196 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.670680736096177e+02 -5.196009607058459e+02 -3.195159447878110e+02 -2.700078100521552e+02 + 3 4.796337064789745e+02 4.109757184160675e+02 1.611950782145398e+02 1.875195937030707e+02 + 4 2.549467832538206e+02 1.757938664861856e+02 1.180485581477291e+02 1.419820999864066e+02 + 5 9.835143665758714e+01 -6.716862419640718e+01 4.027230842554202e+01 -5.949388363732206e+01 + ME 6.776520769995833e-07 + +Event 197 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.456277846903779e+02 5.073638365313777e+02 -6.950772545675264e+01 -1.883090356518230e+02 + 3 3.840060774912939e+02 -2.335726483981930e+02 2.994458700181055e+02 -5.689161976603957e+01 + 4 2.170201197002058e+02 5.304772290063384e+01 -1.145548521448566e+02 1.765243816015771e+02 + 5 3.533460181181225e+02 -3.268389110338186e+02 -1.153832924164962e+02 6.867627381628544e+01 + ME 1.509668665880030e-08 + +Event 198 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.910248171598183e+02 -4.090729546193914e+02 3.366364194938390e+02 -2.620030025937223e+02 + 3 5.547864644728130e+02 3.349061746249842e+02 -1.441441520604850e+02 4.181487041556715e+02 + 4 2.745197367303354e+02 5.772758735139705e+01 -1.507960221697820e+02 -2.220116465657829e+02 + 5 7.966898163703361e+01 1.643919264301007e+01 -4.169624526357206e+01 6.586594500383369e+01 + ME 5.954257163612112e-07 + +Event 199 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.089763723582333e+02 -2.391470875959899e+02 -7.198191922923307e+01 -1.819166635415397e+02 + 3 2.302930034245914e+02 2.280759743109415e+02 2.554139852644603e+01 1.907496604838038e+01 + 4 4.296042628313223e+02 2.011197297410303e+02 -3.594007704411145e+02 -1.222365050141414e+02 + 5 5.311263613858528e+02 -1.900486164559819e+02 4.058412911439016e+02 2.850782025073007e+02 + ME 3.862621286224446e-09 + +Event 200 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.668574923646054e+02 1.957149396867698e+02 -4.074080523547822e+01 -1.767732174377508e+02 + 3 4.828614932981502e+02 -4.435255570781280e+02 2.718101129892899e+01 -1.889483912432793e+02 + 4 4.041444758692144e+02 3.452769428205598e+02 -1.849911387865645e+02 9.947295462858226e+01 + 5 3.461365384680294e+02 -9.746632542920153e+01 1.985509327231137e+02 2.662486540524480e+02 + ME 1.154943734123872e-08 + +Event 201 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.557462218499876e+02 5.577307285874686e+01 -5.518883540368638e+01 3.469854912690419e+02 + 3 6.090180126474653e+02 -2.732890171778827e+02 3.408295323239708e+02 -4.243245016668710e+02 + 4 1.810043524304992e+02 1.725577415117764e+01 -1.199573841645601e+01 1.797801883330637e+02 + 5 3.542314130720482e+02 2.002601701679582e+02 -2.736449585038284e+02 -1.024411779352346e+02 + ME 2.192246974609935e-07 + +Event 202 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.401898284303757e+02 -4.345767112988091e+02 6.008776977239305e+01 3.605033944437847e+01 + 3 5.108999584385472e+02 4.765299298274663e+02 1.140292958983961e+02 1.446904046163914e+02 + 4 1.528255459328671e+02 1.932347971289793e+01 4.151372197535511e+01 1.458041889289091e+02 + 5 3.960846671982105e+02 -6.127669824155520e+01 -2.156307876461444e+02 -3.265449329896788e+02 + ME 2.228805001794721e-07 + +Event 203 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.041261761344618e+02 -9.500166915393218e+01 3.778895461862847e+01 1.972151929195667e+01 + 3 4.443475859153140e+02 -3.287098418714517e+02 1.564021836721695e+02 -2.548194927947812e+02 + 4 2.899092144312161e+02 4.077089716485121e+01 2.868817947747052e+02 -9.160916075474518e+00 + 5 6.616170235190077e+02 3.829406138605327e+02 -4.810729330655031e+02 2.442588895782988e+02 + ME 1.501672169620850e-07 + +Event 204 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.353583912015085e+02 3.684328216913381e+02 2.309035724253134e+02 -2.185691953026545e+01 + 3 2.535164374831818e+02 -2.445756557044238e+02 4.172545258629644e+01 -5.207993200248917e+01 + 4 3.377617009372444e+02 2.305821856525063e+02 -1.063652282272372e+01 2.465799802538221e+02 + 5 4.733634703780650e+02 -3.544393516394203e+02 -2.619925021888862e+02 -1.726431287210675e+02 + ME 3.531392705061042e-08 + +Event 205 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.561765973099244e+02 -5.595525752729490e+02 -2.445909106268452e+02 -2.400915008936639e+02 + 3 4.436268818857168e+02 4.246930749258180e+02 -8.966125936745792e+01 9.165948401741431e+01 + 4 1.399697315148318e+02 1.499554105305907e+01 1.358590097348833e+02 3.014944382102273e+01 + 5 2.602267892895269e+02 1.198639592940718e+02 1.983931602594199e+02 1.182825730552269e+02 + ME 1.335422034506543e-07 + +Event 206 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.492493811814721e+01 -2.674402956441456e+00 5.513252874300674e+01 -3.418332097490475e+01 + 3 4.416704097344147e+02 1.072044637050192e+02 4.084318907704088e+02 1.294733347002168e+02 + 4 7.006249631956899e+02 7.376574991388425e+01 -6.937409068373729e+02 -6.447873582091820e+01 + 5 2.927796889517476e+02 -1.782958106624620e+02 2.301764873239575e+02 -3.081127790439369e+01 + ME 3.592179589872834e-07 + +Event 207 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.871274697603224e+02 4.279496817610274e+02 2.164744983621549e+02 -8.538754730394086e+01 + 3 8.117859920617876e+01 -3.275578473866842e+01 6.568413093248333e+01 -3.467879004342293e+01 + 4 2.872554221624425e+02 2.156852159581688e+02 -8.320290545444449e+01 1.705076001318999e+02 + 5 6.444385088710563e+02 -6.108791129805277e+02 -1.989557238401938e+02 -5.044126278453607e+01 + ME 4.296012320866767e-08 + +Event 208 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.641639267419049e+02 -3.419606422698960e+02 -3.074769342805806e+02 6.300003898602276e+01 + 3 1.786897064305949e+02 1.076490072974621e+02 -9.081241090814457e+01 1.099763994553988e+02 + 4 5.763848573443231e+02 4.797982260748441e+02 2.623521952599240e+02 -1.821661101126315e+02 + 5 2.807615094831766e+02 -2.454865911024102e+02 1.359371499288009e+02 9.189671671210036e+00 + ME 5.705415484414741e-09 + +Event 209 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.385828658973285e+02 -5.075491230008664e+02 -3.533516944878140e+02 -1.591368730410633e+02 + 3 1.765423491478754e+02 1.621867223420716e+02 2.683860309775541e+01 6.436114916894574e+01 + 4 4.986667957256042e+02 4.344440716974439e+02 1.795281780354134e+02 1.664228200021638e+02 + 5 1.862079892291916e+02 -8.908167103864918e+01 1.469849133546452e+02 -7.164709613004626e+01 + ME 3.719901495936352e-08 + +Event 210 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.764638473920721e+02 -4.170352276148382e+02 2.008387828191197e+02 1.129743338800030e+02 + 3 7.223003052451869e+02 5.315103137685568e+02 -4.106342874200929e+02 -2.656953129242833e+02 + 4 1.470953339362244e+02 -9.260579603966968e+01 1.071066173964053e+02 3.986698277482917e+01 + 5 1.541405134265168e+02 -2.186929011404899e+01 1.026888872045679e+02 1.128539962694512e+02 + ME 4.038419122954612e-07 + +Event 211 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.375648452949696e+02 -2.432158852065867e+02 -3.617678147661081e+02 -3.785597998390857e+01 + 3 3.755078213314552e+02 2.872422996521213e+02 2.203609879312930e+02 -9.969463460789413e+01 + 4 3.007064557415487e+02 -1.694459342837558e+02 -2.228285208135228e+02 1.098175677722217e+02 + 5 3.862208776320263e+02 1.254195198382212e+02 3.642353476483379e+02 2.773304681958093e+01 + ME 1.006117335130367e-05 + +Event 212 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.121878142369525e+02 1.183445947348006e+00 -2.465625978764644e+01 1.094384483270791e+02 + 3 7.375067391765950e+02 -3.127794647526268e+02 3.331246995416567e+02 -5.788895674610446e+02 + 4 2.291493811726512e+01 1.618073814178101e+01 -1.621519190684619e+01 -5.879230641442971e-01 + 5 6.273905084691875e+02 2.954152806634978e+02 -2.922532478471641e+02 4.700390421981098e+02 + ME 1.110570875308278e-04 + +Event 213 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.149170341818729e+02 2.012777647785824e+00 4.394135149382410e+02 2.684236645797402e+02 + 3 2.443426884296023e+02 -1.176956726368923e+02 1.176742395059145e+02 1.788962028335422e+02 + 4 9.102154734540717e+01 -3.403376741680239e+01 -5.303122632979904e+01 -6.568343619611289e+01 + 5 6.497187300431173e+02 1.497166624059089e+02 -5.040565281143565e+02 -3.816364312171696e+02 + ME 2.312814464354041e-06 + +Event 214 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.202063301686816e+02 -1.064350067374717e+02 1.642139056432389e+02 2.534511322016189e+02 + 3 8.302321932066316e+01 -5.764493522725375e+01 5.652661110437803e+01 -1.935610048710902e+01 + 4 5.674025885458663e+02 2.435984979474369e+02 2.596369945692084e+02 -4.418077640075727e+02 + 5 5.293678619647889e+02 -7.951855598271139e+01 -4.803775113168255e+02 2.077127322930627e+02 + ME 9.042105782741295e-08 + +Event 215 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.138906695630313e+02 1.178864239647874e+02 -4.582866998625274e+02 2.003988823268451e+02 + 3 3.856670962690675e+02 -3.121084563031177e+01 3.362323895090097e+02 -1.863136401467070e+02 + 4 2.798710520603011e+02 -1.660050298897437e+02 -1.022090328473867e+02 2.008069954883218e+02 + 5 3.205711821075999e+02 7.932945155526808e+01 2.242633432009040e+02 -2.148922376684599e+02 + ME 2.856967949661706e-07 + +Event 216 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.502734568939956e+02 -3.484492676068055e+02 -3.562535325858312e+02 -2.333825310224928e+02 + 3 2.927316415798877e+02 -1.723462782434523e+01 1.859956838442979e+02 2.253894123003654e+02 + 4 4.062892609764483e+02 2.518503039165275e+02 2.467607920511911e+02 -2.018700064601229e+02 + 5 2.507056405496688e+02 1.138335915146231e+02 -7.650294330965788e+01 2.098631251822504e+02 + ME 2.162766252781662e-08 + +Event 217 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.740538118662423e+02 4.049475823483302e+02 4.864798667203213e-01 2.464634565863595e+02 + 3 1.985267271768088e+02 -1.272681407062418e+02 -1.303933537284553e+02 -7.882420356817595e+01 + 4 5.247611246848355e+02 -4.998692904349176e+02 1.555305125498374e+02 3.626555013467213e+01 + 5 3.026583362721131e+02 2.221898487928290e+02 -2.562363868810226e+01 -2.039048031528557e+02 + ME 4.323909857530960e-09 + +Event 218 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.734261191295303e+02 1.952249633514984e+02 1.466545247967154e+02 2.825362463281442e+02 + 3 1.398002662411878e+02 -9.684800712809066e+00 -1.064184732605320e+02 -9.014115389297822e+01 + 4 5.708039251040940e+02 -3.493876776423592e+02 -4.213571589346009e+02 -1.618750019010977e+02 + 5 4.159696895251885e+02 1.638475150036699e+02 3.811211073984176e+02 -3.052009053406823e+01 + ME 5.200624473381894e-07 + +Event 219 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.964338295601742e+02 -4.930977654258188e+02 4.159874786449742e+00 5.730476686633798e+01 + 3 4.573553743327010e+02 2.961037518728453e+02 1.328781681642411e+02 3.222419882373264e+02 + 4 2.353157927788246e+02 2.103198091366726e+02 -7.380868571206494e+01 -7.544122301035409e+01 + 5 3.108950033283000e+02 -1.332579558369913e+01 -6.322935723862582e+01 -3.041055320933104e+02 + ME 2.070263917700041e-07 + +Event 220 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.895106323190153e+02 -9.842902929784736e+01 -3.242676826039605e+02 -1.920435599016529e+02 + 3 2.689406576306271e+02 6.079057874307624e+01 2.545565461740099e+02 6.192372455557902e+01 + 4 4.581215795927168e+02 4.170329892022735e+02 5.148915397769732e+01 1.825040674292038e+02 + 5 3.834271304576408e+02 -3.793945386475024e+02 1.822198245225330e+01 -5.238423208312998e+01 + ME 3.042046345212406e-09 + +Event 221 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.276347617265195e+02 4.709149142425274e+02 -1.408991586477919e+02 1.917941928695925e+02 + 3 3.954418917787426e+02 -3.935231131055336e+02 -3.463013336995992e+01 1.773705409753062e+01 + 4 4.144133623840756e+02 -1.412634588767815e+02 1.548014912649188e+02 -3.575186266627241e+02 + 5 1.625099841106622e+02 6.387165773978758e+01 2.072780075283330e+01 1.479873796956009e+02 + ME 4.575760247009588e-07 + +Event 222 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.584442989006752e+02 -1.078486037163722e+02 -3.673694489405860e+01 -2.319752814214077e+02 + 3 4.134394487074566e+02 2.855923313448866e+02 1.924609957241841e+02 -2.287530615081986e+02 + 4 2.278563169252060e+02 -1.871641106410819e+02 1.009921504714389e+02 -8.178436521614036e+01 + 5 6.002599354666618e+02 9.420383012567621e+00 -2.567162013015646e+02 5.425127081457466e+02 + ME 1.867484399126946e-07 + +Event 223 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.884176534843068e+02 -2.685843465024753e+02 7.606026273343657e+01 7.253983793855949e+01 + 3 4.513000265569297e+02 1.572877532749309e+02 -3.610427145398817e+02 -2.204096978757592e+02 + 4 3.276144969444980e+02 -5.317464615934441e+01 2.105167263568906e+02 -2.453292146035672e+02 + 5 4.326678230142646e+02 1.644712393868885e+02 7.446572544955465e+01 3.931990745407668e+02 + ME 1.287858255037100e-08 + +Event 224 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.199291946379053e+02 2.536541992327827e+02 -3.336793713310643e+02 -2.565449022922251e+01 + 3 5.882329265931312e+02 -4.073421144314937e+02 3.584669694021168e+02 2.271383049739999e+02 + 4 1.482351543087514e+02 -7.006196037154500e+01 1.303822701627548e+02 8.089889309615469e+00 + 5 3.436027244602120e+02 2.237498755702560e+02 -1.551698682338073e+02 -2.095737040543928e+02 + ME 1.271216286968288e-06 + +Event 225 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.828966757595687e+02 5.914771327429723e+01 -6.614934231762894e+01 2.686193248468568e+02 + 3 6.901623261275527e+02 3.466820540113055e+02 9.413404853472802e+01 -5.892998988110877e+02 + 4 4.105963527227361e+02 -3.014014625423418e+02 -4.993418597615523e+01 2.743229853975957e+02 + 5 1.163446453901425e+02 -1.044283047432609e+02 2.194947975905614e+01 4.635758856663511e+01 + ME 9.096875462933512e-08 + +Event 226 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.360810731792063e+02 1.642782223699453e+02 -1.678975564323074e+02 -2.360824670484281e+01 + 3 5.160979991978127e+02 2.441030829231628e+01 -3.180769822102765e+02 -4.056948545558138e+02 + 4 5.308615635413040e+02 -1.515741961800045e+02 2.722138494694173e+02 4.298126136526764e+02 + 5 2.169593640816770e+02 -3.711433448225712e+01 2.137606891731666e+02 -5.095123920196851e-01 + ME 6.008836651526734e-08 + +Event 227 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.616469781392049e+02 1.350377972296386e+02 2.133665597436083e+02 6.854666783966795e+01 + 3 5.923326784759448e+02 -2.698941073591661e+02 1.106177983815398e+02 -5.155374627362273e+02 + 4 4.172276769301889e+02 2.330765525795236e+02 -1.925693830312472e+02 2.875261514248250e+02 + 5 2.287926664546615e+02 -9.822024244999602e+01 -1.314149750939009e+02 1.594646434717345e+02 + ME 1.492561957034817e-08 + +Event 228 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.092591846574758e+02 -3.142862365084946e+02 -4.911232501198605e+01 3.976896506463815e+02 + 3 2.735255741033087e+02 -2.718229287466501e+02 2.970718554764161e+01 6.783673265737467e+00 + 4 4.133409721086167e+02 3.274757910496356e+02 -2.426316191218202e+01 -2.510411609161631e+02 + 5 3.038742691305989e+02 2.586333742055091e+02 4.366830137652649e+01 -1.534321629959558e+02 + ME 5.180332008224184e-07 + +Event 229 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.602909302006852e+02 4.125987937663707e+01 1.420578335932218e+02 2.141694717119223e+02 + 3 5.291571012132247e+02 -2.192354150045460e+02 4.669770596370902e+02 -1.177942967416715e+02 + 4 3.718875129217348e+02 1.186191445924093e+02 -2.915140032044290e+02 -1.981146303002550e+02 + 5 3.386644556643549e+02 5.935639103549980e+01 -3.175208900258829e+02 1.017394553300042e+02 + ME 7.006526388499469e-09 + +Event 230 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 7.332952183623519e+01 2.203444947169411e+01 3.375417535460226e+01 -6.125648908761432e+01 + 3 6.172505402697790e+02 -4.734101162373001e+02 -6.693569541003697e+01 -3.903853275771192e+02 + 4 7.073803814485553e+02 4.648032214155373e+02 1.050900954312582e+02 5.227820207909715e+02 + 5 1.020395564454305e+02 -1.342755464993128e+01 -7.190857537582355e+01 -7.114020412623796e+01 + ME 2.138946638328408e-06 + +Event 231 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.515175972108462e+02 1.138815578269133e+02 9.437222137628117e+01 4.266063937758993e+02 + 3 4.345680215032115e+02 2.353831600015865e+02 2.161520441325732e+02 -2.944867180675445e+02 + 4 5.497447759881504e+02 -3.929841166309689e+02 -3.541217261697238e+02 -1.496014901550582e+02 + 5 6.416960529779162e+01 4.371939880246914e+01 4.359746066086947e+01 1.748181444670339e+01 + ME 7.713547798663205e-07 + +Event 232 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.827704738940411e+02 2.367350579269709e+02 2.188417272414405e+02 -2.063444849065888e+02 + 3 4.081166106293834e+02 2.895218841081623e+02 -1.566771248798238e+02 2.412229778306114e+02 + 4 2.051848745083037e+02 -3.942539020633502e+01 -1.720622366528163e+02 -1.045995126761917e+02 + 5 5.039280409682721e+02 -4.868315518287982e+02 1.098976342911997e+02 6.972101975216928e+01 + ME 7.162646027763106e-09 + +Event 233 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.943080306229408e+02 -1.702895836853463e+02 2.339619717705403e+02 5.367001344015300e+01 + 3 2.122083142716507e+02 -1.780325885917701e+02 -1.129102431248863e+02 -2.424959881746902e+01 + 4 3.867932102720350e+02 -3.902291549294982e+01 2.871044371014023e+02 -2.562366909239652e+02 + 5 6.066904448333739e+02 3.873450877700663e+02 -4.081561657470563e+02 2.268162763012813e+02 + ME 7.192450759544549e-09 + +Event 234 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.029213520218469e+02 5.481883220516288e+01 1.866500429479581e+02 2.322025034618088e+02 + 3 5.290563168779678e+02 5.680066435642218e+01 3.079339449882754e+02 -4.264398626783235e+02 + 4 5.645687672755980e+02 -1.284160013176555e+02 -5.400643958490008e+02 1.028478095290611e+02 + 5 1.034535638245874e+02 1.679650475607036e+01 4.548040791276726e+01 9.138954968745371e+01 + ME 2.122529681253960e-08 + +Event 235 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.445049250783111e+02 -2.589734140921206e+01 -1.319246578968199e+02 3.171889905875589e+02 + 3 4.823315859421518e+02 1.472115336462561e+02 3.873128963179108e+02 2.469033080070408e+02 + 4 3.973986256682691e+01 3.274912805667769e+01 1.780785140860165e+01 -1.377068322803123e+01 + 5 6.334236264127103e+02 -1.540633202937217e+02 -2.731960898296927e+02 -5.503216153665683e+02 + ME 1.320429320532181e-06 + +Event 236 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.946542617367735e+02 -3.810657402206150e+02 2.660800071441577e+02 -5.162701567758321e+02 + 3 3.916436838147840e+02 3.070607591843180e+02 -1.609888059458168e+02 1.821567171457176e+02 + 4 9.227402093021701e+01 -2.267558677586710e+01 -8.487016008637360e+01 2.823771644296982e+01 + 5 3.214280335182248e+02 9.668056781216411e+01 -2.022104111196721e+01 3.058757231871447e+02 + ME 1.543701437779770e-06 + +Event 237 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.545864517205334e+02 -1.684333917230649e+02 1.738982858125821e+02 7.876445990268434e+01 + 3 2.329362064168684e+01 2.196496253262233e+01 7.299389178887916e+00 2.617651839807976e+00 + 4 6.044417478472913e+02 9.016712624747305e+01 2.020796472547225e+02 -5.624798059045032e+02 + 5 6.176781797904888e+02 5.630130294296942e+01 -3.832773222461925e+02 4.810976941620109e+02 + ME 6.559014552266826e-04 + +Event 238 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.734827785011449e+02 6.504306401774845e+01 3.141570859505669e+02 -3.482250230919593e+02 + 3 3.980459969418915e+02 -3.957723037213677e+02 -3.888755659178175e+01 -1.710722744534845e+01 + 4 4.526639311890888e+02 2.293268680998929e+02 -3.168457877546505e+02 2.278652429599333e+02 + 5 1.758072933678742e+02 1.014023716037262e+02 4.157625839586526e+01 1.374670075773742e+02 + ME 2.524267594277576e-08 + +Event 239 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.971046063012477e+02 -8.428839093137756e+01 -3.781742721300474e+02 4.543276327929836e+02 + 3 2.887724106080996e+02 1.067916659556329e+02 -1.547148155349657e+01 -2.678538378843455e+02 + 4 3.710345357389202e+02 1.508541977394769e+02 3.380306102744051e+02 -2.539575265449116e+01 + 5 2.430884473517323e+02 -1.733574727637321e+02 5.561514340913884e+01 -1.610780422541469e+02 + ME 4.121992313761582e-09 + +Event 240 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.944633714894943e+02 1.680489118241840e+02 -4.922931942743077e+01 -2.367376490809594e+02 + 3 6.312361218089733e+02 -4.392109669761415e+02 -1.588390894238462e+02 4.246444532021100e+02 + 4 1.228701097365929e+02 3.824564875459874e+01 -3.798906962116553e+01 1.104136078902437e+02 + 5 4.514303969649403e+02 2.329164063973583e+02 2.460574784724420e+02 -2.983204120113939e+02 + ME 5.020228174580350e-07 + +Event 241 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.490816146825686e+02 -6.780857619464055e+01 -9.970859965235596e+01 8.766709751202949e+01 + 3 6.219622579644403e+02 5.689750001884105e+02 -2.464007541664536e+02 4.889956890429657e+01 + 4 4.738547977759255e+02 -4.341772833431141e+02 1.011389610234909e+02 -1.606218122396370e+02 + 5 2.551013295770660e+02 -6.698914065065584e+01 2.449703927953187e+02 2.405514582331105e+01 + ME 7.530329109294164e-09 + +Event 242 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.607824489443905e+02 5.914237010894076e+02 9.905219388542341e+01 -2.775610086253785e+02 + 3 3.990062854722137e+02 -2.311648369680887e+02 -1.390196856386274e+02 2.940108178295280e+02 + 4 1.863529685930985e+02 -1.278615554594403e+02 1.331766098585692e+02 2.535433149446559e+01 + 5 2.538582969902973e+02 -2.323973086618786e+02 -9.320911810536499e+01 -4.180414069861509e+01 + ME 4.365330614034530e-08 + +Event 243 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.196686647491888e+02 1.122774737725373e+01 -1.164726479644376e+02 2.507287952825761e+01 + 3 1.133151911771732e+02 -7.807701867250280e+01 -5.396068428009529e+01 6.190764297529687e+01 + 4 6.621421970941052e+02 -2.484088449740625e+02 1.240463476686637e+02 -6.011138316004096e+02 + 5 6.048739469795333e+02 3.152581162693117e+02 4.638698457586912e+01 5.141333090968552e+02 + ME 3.461426381373927e-06 + +Event 244 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.280935105172994e+02 1.583139798127287e+02 -1.973572348382067e+02 2.088831187445198e+02 + 3 5.103001436903666e+02 -4.402359718002467e+02 -2.577957536370686e+02 1.182688421340016e+01 + 4 3.470582738822527e+02 1.452007069270574e+02 1.749319995190819e+02 -2.622308062037477e+02 + 5 3.145480719100811e+02 1.367212850604606e+02 2.802209889561934e+02 4.152080324582772e+01 + ME 6.518377181333897e-09 + +Event 245 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.396911839925324e+02 3.289933370610810e+02 -7.114763674475311e+01 -4.573290322403688e+01 + 3 4.384857551822396e+02 -2.791071807415779e+02 3.066124832896743e+02 1.426804970805972e+02 + 4 4.176347759399601e+02 -3.519942713896021e+02 -2.140287152627982e+02 -6.863343227815282e+01 + 5 3.041882848852677e+02 3.021081150700990e+02 -2.143613128212309e+01 -2.831416157840737e+01 + ME 2.811054499281442e-09 + +Event 246 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.608229391410545e+02 -1.458217158240457e+02 -2.068702814137655e+02 -6.300253521961616e+01 + 3 3.337430353743154e+02 2.371946018027210e+02 1.095161066265306e+02 2.076760865527770e+02 + 4 5.261187567554393e+02 -3.789028184447150e+02 3.437750393676882e+02 -1.226879076856591e+02 + 5 3.793152687291911e+02 2.875299324660397e+02 -2.464208645804532e+02 -2.198564364750174e+01 + ME 2.520987626738108e-09 + +Event 247 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.364693619192626e+02 -4.606913761890457e+01 3.470682395859384e+00 -2.319123714881566e+02 + 3 6.707586181725082e+02 6.224312082991470e+02 1.264643842609764e+02 2.156461784995246e+02 + 4 8.441103857058096e+01 -7.843393409710345e+01 -2.748410014225528e+01 1.476365991161498e+01 + 5 5.083609813376476e+02 -4.979281365831390e+02 -1.024509665145803e+02 1.502533077017130e+00 + ME 1.153938090023693e-06 + +Event 248 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.738776112665326e+01 -3.800357331789279e+01 1.082310776995784e+01 -5.458662018236982e+01 + 3 2.731577122423595e+02 -1.023650088339821e+02 -1.963134715457747e+02 -1.599923798608694e+02 + 4 5.780931297050771e+02 4.359659916762920e+02 -3.151044766581967e+02 2.117415630051930e+02 + 5 5.813613969259109e+02 -2.955974095244171e+02 5.005948404340136e+02 2.837437038046019e+00 + ME 3.300111237391993e-07 + +Event 249 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.771449535203825e+02 7.193062052119420e+01 7.263463532627495e+01 5.680197997926654e+02 + 3 1.483275966380963e+02 1.459664561817996e+02 -2.113630427238560e+00 -2.627550495380916e+01 + 4 3.000364175298768e+02 -9.368804156371920e+01 2.167482964027108e+02 -1.851069386020958e+02 + 5 4.744910323116439e+02 -1.242090351392746e+02 -2.872693013017473e+02 -3.566373562367605e+02 + ME 1.905532696959173e-08 + +Event 250 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.070748515323192e+02 2.522952262611132e+02 -2.176867244366134e+02 -3.822100389398938e+02 + 3 1.532396868211021e+02 -1.290354637987217e+02 4.944135710293926e+00 8.250943110551940e+01 + 4 5.298941936163071e+02 -2.854713268542403e+02 -6.677262350798084e+00 4.463736015266296e+02 + 5 3.097912680302717e+02 1.622115643918488e+02 2.194198510771175e+02 -1.466729936922552e+02 + ME 1.130246547288476e-07 + +Event 251 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.182836311039666e+02 -9.488016677547932e+01 -3.342630543518727e+02 2.328672593937015e+02 + 3 5.257152316762973e+02 -2.134880180342399e+02 4.309672861440873e+02 2.122888815879800e+02 + 4 9.387018854625114e+01 6.019218689726185e+01 1.252636339050904e+01 -7.093379416359139e+01 + 5 4.621309486734849e+02 2.481759979124573e+02 -1.092305951827236e+02 -3.742223468180902e+02 + ME 4.939885635209957e-07 + +Event 252 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 9.365447326755805e+01 4.277947245944422e+00 6.388710156528008e+01 -6.834689300891627e+01 + 3 1.951509969640049e+02 7.461354319095608e+01 1.411336517620811e+01 -1.797708088426464e+02 + 4 6.319138287033421e+02 4.463349366878398e+02 7.119278093780918e+01 4.416240472853804e+02 + 5 5.792807010650953e+02 -5.252264271247403e+02 -1.491932476792976e+02 -1.935063454338176e+02 + ME 3.850010012323012e-06 + +Event 253 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.901525762082525e+01 -4.735464381405090e+00 -3.620220682176468e+01 4.636567944481127e+01 + 3 5.682395652067073e+02 -2.449465566088506e+02 7.457080728476193e+01 5.072835327237362e+02 + 4 4.471391262730152e+02 4.097222030514869e+02 5.483830234859550e+01 -1.704519731958408e+02 + 5 4.256060508994522e+02 -1.600401820612311e+02 -9.320690281159273e+01 -3.831972389727066e+02 + ME 1.180833750256481e-06 + +Event 254 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.548613132274681e+02 1.031167602621187e+02 3.787623878828554e+01 1.091528772998381e+02 + 3 6.185434438850467e+02 -1.082622339079234e+02 -7.722295375814301e+01 -6.040793789687806e+02 + 4 3.466331755597933e+02 4.347459990183827e+01 2.783088740441842e+02 2.020116040981310e+02 + 5 3.799620673276922e+02 -3.832912625603342e+01 -2.389621590743267e+02 2.929148975708114e+02 + ME 8.878000568277924e-07 + +Event 255 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.081680100869344e+02 5.338690546525502e+02 2.877400741676965e+02 -4.536309838913628e+01 + 3 2.634732913131461e+02 -1.846835573335169e+02 1.840484333905926e+02 3.789898484772500e+01 + 4 4.775197661603478e+02 -2.126456306214764e+02 -4.259270823234806e+02 -3.732403240319365e+01 + 5 1.508389324395720e+02 -1.365398666975568e+02 -4.586142523480855e+01 4.478814594460499e+01 + ME 5.570874656157607e-08 + diff --git a/epochX/cudacpp/pp_tt012j.mad/test/ref/dump_CPUTest.Sigma_sm_uux_ttxgg.txt b/epochX/cudacpp/pp_tt012j.mad/test/ref/dump_CPUTest.Sigma_sm_uux_ttxgg.txt new file mode 100644 index 0000000000..e9f7ef1a82 --- /dev/null +++ b/epochX/cudacpp/pp_tt012j.mad/test/ref/dump_CPUTest.Sigma_sm_uux_ttxgg.txt @@ -0,0 +1,4608 @@ +Event 0 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.045233209356227e+02 6.877986897204741e+01 -1.905381248013139e+02 2.818406336784428e+01 + 3 5.474933604313477e+02 -4.596225360107564e+02 3.030720946352398e+01 2.959350894402091e+02 + 4 5.014688717565996e+02 4.188441856206844e+02 2.572754903817050e+02 -9.924666020293004e+01 + 5 2.465144468764297e+02 -2.800151858197538e+01 -9.704457504391526e+01 -2.248724926051234e+02 + ME 1.898303560024237e-08 + +Event 1 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.008083996490003e+02 7.883320272753284e+01 -1.779144499629306e+02 -4.955590793941928e+01 + 3 5.095915127572659e+02 1.945100505575215e+01 4.232835353003264e+02 2.830834100052795e+02 + 4 5.330731110420373e+02 -3.351807593152422e+02 -3.437684940301842e+02 -2.316117933377168e+02 + 5 2.565269765516967e+02 2.368965515319572e+02 9.839940869278838e+01 -1.915708728143429e+00 + ME 8.597009272127998e-09 + +Event 2 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.874993553150719e+02 -3.353676580361334e+02 -1.808823320939806e+02 -7.046890271033257e+01 + 3 3.626455728935598e+02 2.056734411127569e+02 -1.625327830620692e+02 2.505859963969135e+02 + 4 5.314718876693757e+02 3.681440252065139e+01 3.745048277115113e+02 -3.753041448887398e+02 + 5 2.183831841219925e+02 9.287981440272506e+01 -3.108971255546150e+01 1.951870512021589e+02 + ME 3.711549380646671e-08 + +Event 3 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.366452034215279e+02 1.646792644528339e+02 4.079517915654560e+02 -4.601882122104464e+02 + 3 2.850611318540120e+02 -1.410564077018440e+02 2.241470575148821e+01 2.466992495047679e+02 + 4 5.100787565257925e+02 3.619333890962012e+01 -4.480337270250971e+02 2.411144116917793e+02 + 5 6.821490819866779e+01 -5.981619566060999e+01 1.766722970815293e+01 -2.762544898610076e+01 + ME 7.154822305576670e-07 + +Event 4 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.502637187052808e+02 5.534999170445879e+01 -2.382039909598248e+02 -5.317110126115482e+01 + 3 6.306127670141703e+02 9.222569406819532e+01 6.223439713329586e+02 -4.306813927289475e+01 + 4 3.012500630459575e+02 -1.662164166936457e+01 -2.533227164825486e+02 -1.621817586145584e+02 + 5 3.178734512345914e+02 -1.309540441032896e+02 -1.308172638905854e+02 2.584209991486079e+02 + ME 8.571663806697150e-08 + +Event 5 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.543595875307082e+02 1.177423500857260e+02 2.021351892259652e+02 -9.988445345330558e+01 + 3 1.672353472875774e+02 -4.643301969933537e+01 1.390571194439707e+02 -8.046585360227670e+01 + 4 4.148863440715187e+02 5.705637783937733e+01 -5.963382698230392e+01 -4.065944600266038e+02 + 5 6.635187211101955e+02 -1.283657082257680e+02 -2.815584816876321e+02 5.869447670821860e+02 + ME 3.541618749615125e-06 + +Event 6 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.600736528022404e+02 3.737322990662495e+02 2.536668813098301e+02 -8.743596493432509e+01 + 3 2.003131692770116e+02 1.425583968826074e+02 -7.419927099902716e+01 -1.195698015691029e+02 + 4 6.919589874187652e+02 -6.251541860981462e+02 -2.582872915825600e+02 1.458669218175010e+02 + 5 1.476541905019823e+02 1.088634901492892e+02 7.881968127175713e+01 6.113884468592695e+01 + ME 4.103844163554172e-07 + +Event 7 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.145629825968214e+02 1.959037730784686e+02 -1.819514480286372e+02 -3.168246341329452e+02 + 3 2.635019328107883e+02 -5.865118337121913e+01 -1.151155589842043e+02 -2.296556451819355e+02 + 4 5.280293449698496e+02 -2.518410835847975e+02 3.981394172424513e+01 4.623915092348713e+02 + 5 2.939057396225401e+02 1.145884938775480e+02 2.572530652885964e+02 8.408877008000950e+01 + ME 1.226132418997979e-07 + +Event 8 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.397378022805042e+02 -1.487288937969701e+01 -1.160009939420407e+02 6.289570909312075e+02 + 3 1.834286250976932e+02 1.635491119298312e+02 -6.096802297516525e+01 -5.639723988541734e+01 + 4 4.991547965706248e+02 -8.664012365698299e+01 3.208151079475728e+01 -4.905300975243927e+02 + 5 1.776787760511781e+02 -6.203609889315122e+01 1.448875061224487e+02 -8.202975352139767e+01 + ME 2.518310683770126e-07 + +Event 9 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.768693845261535e+02 -4.456674718007656e+02 1.636141522680622e+02 -4.489235630560713e+01 + 3 2.612786207802826e+02 8.184621745013861e+01 2.479930738231251e+02 8.194492156890165e+00 + 4 3.368713959814187e+02 3.479928867591725e+01 -2.732232778405869e+02 -1.939597571254548e+02 + 5 4.249805987121456e+02 3.290219656747095e+02 -1.383839482506003e+02 2.306576212741717e+02 + ME 3.938758863012469e-09 + +Event 10 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.488350171096896e+02 -1.831887653712691e+02 -5.102545779713487e+02 -8.545184554369901e+01 + 3 7.035065238815303e+02 4.041792774985642e+01 6.809284192215310e+02 1.721171349887872e+02 + 4 1.751828801954048e+02 1.268400499588020e+02 -1.091761136932150e+02 -5.178049284095648e+01 + 5 7.247557881337549e+01 1.593078766261062e+01 -6.149772755696730e+01 -3.488479660413173e+01 + ME 7.960158180756801e-07 + +Event 11 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.269658880944947e+02 -2.185431515300268e+02 5.206117424428275e+01 3.228063528112231e+01 + 3 1.005856529182378e+02 -4.644479827572638e+01 -7.508984239583356e+01 4.818578478227943e+01 + 4 4.675628274246620e+02 -2.703728833735590e+02 -2.515742362338795e+02 2.867471101666977e+02 + 5 7.048856315626057e+02 5.353608331793122e+02 2.746029043854304e+02 -3.672135302300995e+02 + ME 2.405423484837008e-07 + +Event 12 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.837700766590144e+02 1.296958544175530e+02 -7.540996840916678e+01 2.408687991801600e+02 + 3 2.628002397813191e+02 -8.376084481590414e+01 -1.663098735764636e+02 -1.854430178136278e+02 + 4 5.190623657100422e+02 -3.621783241410699e+02 1.519752457270119e+02 -3.393466158739261e+02 + 5 4.343673178496245e+02 3.162433145394211e+02 8.974459625861842e+01 2.839208345073940e+02 + ME 7.433768457129216e-08 + +Event 13 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.995598257201647e+02 -5.586644429775192e+02 1.101534889159592e+02 -1.877025137014794e+02 + 3 5.937134122752477e+02 5.346076236572911e+02 -1.031605262004245e+02 2.367450326344228e+02 + 4 1.647592826022760e+02 -7.925301245804906e+01 1.680176709576468e+01 -1.434652635392995e+02 + 5 1.419674794023117e+02 1.033098317782771e+02 -2.379472981129927e+01 9.442274460635609e+01 + ME 1.145126864768706e-06 + +Event 14 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.028779021236546e+02 1.164750571227171e+02 -2.225368001532149e+02 1.692511661426708e+02 + 3 5.030384766013229e+02 -4.515737850621545e+02 -1.020261550868047e+02 -1.967726842430677e+02 + 4 3.063971056395570e+02 2.430825837173773e+02 1.431329210018300e+01 -1.859708942464840e+02 + 5 3.876865156354651e+02 9.201614422206016e+01 3.102496631398366e+02 2.134924123468809e+02 + ME 2.645321854133857e-09 + +Event 15 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.241250378461693e+02 -1.805033431240864e+02 1.231079432807119e+02 -4.995007519281845e+01 + 3 3.844614260046683e+02 1.307728483313577e+02 -9.608556196200369e+01 -3.485349552158186e+02 + 4 4.110760119555223e+02 5.739270654525845e+01 -3.965776976049418e+02 9.173709502175154e+01 + 5 4.803375241936400e+02 -7.662211752529799e+00 3.695553162862337e+02 3.067479353868856e+02 + ME 5.022011105281753e-09 + +Event 16 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.001054877319223e+02 -1.430620362533657e+01 7.855291304039666e+01 -6.038113169479623e+01 + 3 4.093088791607984e+02 -1.119992820429624e+02 3.757454087335235e+02 -1.174959880055799e+02 + 4 7.087543950175984e+02 1.089443267851879e+02 -6.992154166158715e+02 3.951869538303891e+01 + 5 2.818312380896809e+02 1.736115888311106e+01 2.449170948419514e+02 1.383584243173372e+02 + ME 6.080589976989418e-06 + +Event 17 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.581631210613618e+02 -1.069713793286924e+02 -1.856462517995979e+02 -1.440166319333314e+02 + 3 4.806574857692274e+02 -3.871036291743680e+02 -8.927922635205840e+01 2.705764561967766e+02 + 4 4.638994968983050e+02 4.586966534295722e+02 -1.433077824478446e+01 -6.778460112673157e+01 + 5 2.972798962711066e+02 3.537835507348831e+01 2.892562563964409e+02 -5.877522313671356e+01 + ME 4.768457986390018e-09 + +Event 18 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.259069939880740e+02 6.694234146427497e+01 1.047108042274209e+02 -2.017279188511186e+01 + 3 4.274507013081181e+02 1.554527732937734e+02 -2.433805370458512e+02 -3.151419545400927e+02 + 4 3.505784003274900e+02 -2.628862848704467e+02 -8.012897055127387e+01 -2.176588249568330e+02 + 5 5.960639043763177e+02 4.049117011239836e+01 2.187987033697040e+02 5.529735713820376e+02 + ME 3.633613596998657e-08 + +Event 19 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.489050407799418e+02 -2.155159091310213e+02 -1.094654413984134e+02 -5.936269347447438e+01 + 3 2.600997784564499e+02 1.488424657388715e+02 1.507021889641061e+02 -1.509525269324567e+02 + 4 5.901199044754460e+02 3.182370400099771e+02 -2.814956777202155e+02 4.095447123924745e+02 + 5 4.008752762881623e+02 -2.515635966178273e+02 2.402589301545227e+02 -1.992294919855434e+02 + ME 6.950715264269408e-09 + +Event 20 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.908334513331024e+02 8.808928417538735e+01 2.991337054415237e+02 -5.018400855815297e+02 + 3 1.401706268696378e+02 -9.583159895522556e+01 -7.965314127488557e+01 6.418322494044027e+01 + 4 2.982536537656620e+02 1.120939357246564e+02 1.793074392675402e+02 2.103307723126631e+02 + 5 4.707422680315980e+02 -1.043516209448182e+02 -3.987880034341784e+02 2.273260883284264e+02 + ME 2.894377224286436e-07 + +Event 21 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.112413366700984e+02 2.716995006725958e+02 6.188924638009126e+01 3.024376621768124e+02 + 3 5.662415611998294e+02 -3.715892650272579e+02 2.050688206350350e+02 -3.748302316381090e+02 + 4 2.225653804612988e+02 -8.369496880497042e+01 -6.444146815856185e+01 1.959025215717929e+02 + 5 2.999517216687734e+02 1.835847331596327e+02 -2.025165988565645e+02 -1.235099521104963e+02 + ME 1.436903184170180e-08 + +Event 22 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.464950628793005e+02 1.637062818694535e+02 -3.617598874126118e+02 2.041760963268814e+02 + 3 4.190330476761976e+02 3.863780321676090e+02 1.621746205431056e+02 3.221099009750422e-01 + 4 6.041993534847936e+02 -5.473292470825340e+02 1.815948543536370e+02 -1.803076895525813e+02 + 5 3.027253595970840e+01 -2.755066954528329e+00 1.799041251586903e+01 -2.419051667527518e+01 + ME 3.727890024956625e-07 + +Event 23 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.340268758838264e+02 -9.885820280056214e+00 -1.281457206036256e+02 3.800195136498373e+01 + 3 1.460676733919085e+02 -1.207605538086376e+02 -7.761120113030877e+01 2.700287601473496e+01 + 4 5.791378930647284e+02 -2.550511254140081e+02 -3.011940406439271e+01 -5.190784566010291e+02 + 5 6.407675576595367e+02 3.856974995027019e+02 2.358763257983270e+02 4.540736292213105e+02 + ME 1.192489531875888e-06 + +Event 24 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.120994118474102e+02 -3.999484487477040e+02 -1.288251570508291e+02 4.450966268565517e+02 + 3 5.928222484883795e+02 4.242577382365043e+02 3.619492402961907e+01 -4.124724443205316e+02 + 4 1.136153476517902e+02 1.506354321291778e+01 -7.760365615106858e+01 -8.160397931410229e+01 + 5 1.814629920124191e+02 -3.937283270171845e+01 1.702338891722784e+02 4.897979677808213e+01 + ME 1.285510078979376e-07 + +Event 25 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.186484166765788e+02 2.332076299066254e+02 3.412653877230308e+02 6.647280106472095e+01 + 3 2.684644304712756e+02 7.897452755298143e+01 -5.206738710801169e+01 2.512472121751683e+02 + 4 5.018698799968644e+02 -3.665172118365466e+01 -2.251847766938088e+02 -4.470143668023453e+02 + 5 3.110172728552824e+02 -2.755304362759526e+02 -6.401322392121017e+01 1.292943535624560e+02 + ME 1.901918976141090e-08 + +Event 26 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.880157450735950e+02 -5.340609759213479e+02 -1.800693671113295e+02 1.676794963032682e+02 + 3 1.698935524482946e+02 9.424850332356012e+00 1.535211800024927e+02 -7.215426979989711e+01 + 4 3.316905961662700e+02 1.799651549092350e+02 -1.445567114258025e+02 -2.381901588760289e+02 + 5 4.104001063118405e+02 3.446709706797568e+02 1.711048985346393e+02 1.426649323726578e+02 + ME 6.020987949018286e-09 + +Event 27 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.260721948247595e+02 2.432868311106053e+02 -5.770296458017678e+01 3.449918852518222e+02 + 3 1.015574395166651e+02 -5.186955072304988e-01 -6.316674902066286e+01 7.952110596761376e+01 + 4 6.802443988998606e+02 -1.254022800835581e+02 1.115720726787119e+01 -6.684925034063277e+02 + 5 2.921259667587150e+02 -1.173658555198167e+02 1.097125063329686e+02 2.439795121868918e+02 + ME 1.967149883536404e-05 + +Event 28 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.577687888188209e+02 -4.408525315058863e+00 -6.157352186961897e+02 2.313233341145691e+02 + 3 4.217509083163121e+02 -2.657091410126092e+01 3.668529733823863e+02 -2.063654794532260e+02 + 4 2.768898842003987e+02 1.707159504683327e+02 2.175125744448075e+02 -1.457230889722216e+01 + 5 1.435904186644676e+02 -1.397365110520128e+02 3.136967086899622e+01 -1.038554576412053e+01 + ME 3.085488584291408e-08 + +Event 29 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.691757511791561e+02 7.936049457942595e+01 -4.578381871568865e+02 6.489985959561209e+01 + 3 4.168196707014676e+02 3.402072588652903e+02 1.817843664063917e+02 -1.579623468718793e+02 + 4 3.259562817662209e+02 -2.464919493866710e+02 1.791142676162754e+02 -1.157898771339882e+02 + 5 2.880482963531553e+02 -1.730758040580453e+02 9.693955313421930e+01 2.088523644102555e+02 + ME 4.895947955324834e-09 + +Event 30 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.587646316076485e+02 2.500214437920706e+02 6.280817637543875e+01 2.243981273456414e+01 + 3 1.696814728620085e+02 -9.470121197275456e+01 -1.406091650320610e+02 7.248820076297696e+00 + 4 5.864710833492851e+02 -2.932689801956460e+02 4.208355310058186e+02 2.843221635802257e+02 + 5 4.850828121810579e+02 1.379487483763299e+02 -3.430345423491963e+02 -3.140107963910876e+02 + ME 7.481478658057845e-09 + +Event 31 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.510064466785172e+02 -1.763911466206437e+02 1.762664757402212e+02 -2.864488083675499e+01 + 3 1.634676601057650e+02 -1.528515845674027e+02 -1.917706779920085e+01 5.468371847554744e+01 + 4 6.544233617606191e+02 5.127258688558928e+02 -1.829185292592408e+02 3.632119649428913e+02 + 5 4.311025314550986e+02 -1.834831376678465e+02 2.582912131822037e+01 -3.892508025816840e+02 + ME 1.609213533429697e-07 + +Event 32 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.730232054084494e+02 2.432605335138694e+02 1.715636199034402e+02 -2.248033561434742e+02 + 3 2.362205628011194e+02 -4.367709384711757e+01 7.672087287982943e+01 2.191035678114456e+02 + 4 4.054383297542172e+02 -2.205824977775273e+02 1.234567003875169e+02 3.169890282605115e+02 + 5 4.853179020362142e+02 2.099905811077544e+01 -3.717411931707865e+02 -3.112892399284830e+02 + ME 3.487765415465164e-08 + +Event 33 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.747910883673144e+02 5.323539820562518e+02 8.641425442309121e+01 1.987878509563276e+02 + 3 1.584581085429429e+02 -1.118080933695560e+02 1.076607709535321e+02 -3.189170452896511e+01 + 4 4.953900627949081e+02 -4.939048969940529e+02 2.681611008765802e+01 -2.738910880265214e+01 + 5 2.713607402948348e+02 7.335900830735730e+01 -2.208911354642813e+02 -1.395070376247104e+02 + ME 1.458819422095788e-07 + +Event 34 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.310199002368670e+02 -1.157285499049388e+02 -6.166178457504553e+02 -6.764206926102779e+01 + 3 4.817608951852553e+02 -3.997907691000606e+01 4.373161358964807e+02 1.981157005986480e+02 + 4 2.860765236279268e+02 1.674393784787844e+02 1.106820450243557e+02 -2.038463068463706e+02 + 5 1.011426809499510e+02 -1.173175166383970e+01 6.861966482961880e+01 7.337267550875022e+01 + ME 1.247261192066612e-07 + +Event 35 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.652617461959501e+02 4.544204650188408e+02 3.037117635510197e+01 -9.512163314500258e+01 + 3 2.394629598395643e+02 -1.805063362629201e+02 -1.540296017189006e+02 3.216913891261685e+01 + 4 3.655637126606654e+02 -1.682977929708781e+02 -3.352014704439824e+01 -3.227833338905570e+02 + 5 4.297115813038207e+02 -1.056163357850426e+02 1.571785724081969e+02 3.857358281229427e+02 + ME 4.574122987290013e-08 + +Event 36 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.499192045006146e+02 -3.325790315669839e+02 7.774434570915018e+01 -2.928724894056954e+02 + 3 2.295207781400161e+02 7.258784260898673e+01 9.894250089353637e+00 2.175152788163185e+02 + 4 4.830584025161939e+02 3.898488694796316e+02 1.934726951777060e+02 2.095986532104270e+02 + 5 3.375016148431750e+02 -1.298576805216344e+02 -2.811112909762098e+02 -1.342414426210501e+02 + ME 1.863783967042743e-08 + +Event 37 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.644647330879737e+02 4.258097602950139e+02 -2.901560281802422e+02 -4.195341569715645e+02 + 3 3.705058926630717e+00 -8.486098469472709e-01 5.377443871237387e-01 -3.566252087498443e+00 + 4 4.717811915619315e+02 -4.461616916387519e+02 8.922603813628874e+01 1.247235011701669e+02 + 5 3.600490164234641e+02 2.120054119068520e+01 2.003922456568298e+02 2.983769078888961e+02 + ME 4.970165437072497e-04 + +Event 38 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.320658071316812e+02 -5.229898031006179e+01 -7.533526820906631e+01 -3.191506137992071e+02 + 3 5.173086194760924e+02 2.914536896664749e+02 -2.771354642533742e+02 3.253596302818245e+02 + 4 1.139748976757842e+02 3.760489884644618e+01 -1.069643132300276e+02 1.160967605846844e+01 + 5 5.366506757164423e+02 -2.767596082028593e+02 4.594350456924680e+02 -1.781869254108562e+01 + ME 2.355143823559904e-05 + +Event 39 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.580369915970425e+02 9.859906083728804e+01 -2.937981802807958e+02 -1.793079524660254e+02 + 3 3.008057137260953e+02 -1.290389675776721e+02 -4.755272039058874e+01 -2.675289910275308e+02 + 4 1.563788184394283e+02 -8.740572256111449e+01 -9.464096594244925e+00 -1.293251924248945e+02 + 5 6.847784762374331e+02 1.178456293014986e+02 3.508149972656293e+02 5.761621359184506e+02 + ME 2.607935206775021e-07 + +Event 40 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.061905838966051e+02 -8.306017888269724e+01 -5.398586008655030e+01 -3.824883923718052e+01 + 3 3.775395017070495e+02 1.945243896057245e+02 3.099826314852029e+02 -9.277448666113087e+01 + 4 4.073176242310425e+02 -2.719044333335594e+02 2.932534467128884e+02 -7.731779959225287e+01 + 5 6.089522901653033e+02 1.604402226105321e+02 -5.492502181115411e+02 2.083411254905642e+02 + ME 8.520573534311801e-09 + +Event 41 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.139380311935496e+02 -4.604569970586491e+02 -8.651738563141195e+01 2.112496053258770e+02 + 3 3.779489592837219e+02 3.440308282843344e+02 -8.249656237966933e+01 1.329756451730190e+02 + 4 4.970454597046420e+02 1.909761039695885e+02 1.692120849403949e+02 -4.265554911564500e+02 + 5 1.110675498180860e+02 -7.454993519527386e+01 -1.981369293135298e-01 8.233024065755386e+01 + ME 3.869995609536364e-08 + +Event 42 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.173779439151573e+02 3.630558430598339e+02 -9.842883754866893e+00 2.056645825764505e+02 + 3 4.387025788534138e+02 -3.367242411299441e+02 -8.622807709247308e+00 2.810736297045815e+02 + 4 3.848566002764389e+02 -2.376531184093808e+01 2.151853038720266e+02 -3.181903482617680e+02 + 5 2.590628769549898e+02 -2.566290088951960e+00 -1.967196124079123e+02 -1.685478640192640e+02 + ME 1.597303371265191e-08 + +Event 43 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.285774523262414e+02 3.003415161273636e+02 -7.585251142778557e+01 -1.095651056569458e+02 + 3 6.443551136010930e+02 -4.262554242356605e+02 -3.793660967414875e+02 2.993011700222419e+02 + 4 1.194081536546638e+02 7.683021647299904e+01 7.417483351494982e+01 -5.341834019283430e+01 + 5 4.076592804180017e+02 4.908369163529784e+01 3.810437746543233e+02 -1.363177241724618e+02 + ME 3.026979878382822e-06 + +Event 44 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.344278629651235e+02 -3.630184907012124e+02 -2.117651291203815e+02 1.100030618577765e+02 + 3 3.783362210634242e+02 -2.139207812824499e+02 2.214425529500993e+02 2.198622096837037e+02 + 4 2.731070100083523e+02 2.386736268129995e+02 7.781587548733641e+01 -1.075501199523767e+02 + 5 4.141289059631004e+02 3.382656451706628e+02 -8.749329931705431e+01 -2.223151515891035e+02 + ME 3.545945960117813e-08 + +Event 45 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.489710523078153e+02 -1.087275227839727e+01 -1.135937836198698e+01 -2.484740080338036e+02 + 3 5.496834214369441e+02 3.652599963991979e+02 -1.627221171722717e+02 3.771717266923071e+02 + 4 3.590003089931698e+02 -3.273342096749050e+02 -3.092057510665313e+01 1.441438693416079e+02 + 5 3.423452172620712e+02 -2.705303444589567e+01 2.050020706409118e+02 -2.728415880001114e+02 + ME 1.625279533498255e-07 + +Event 46 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.597985691912828e+02 -2.306727818104758e+02 7.603141863539261e+01 9.222032132856626e+01 + 3 7.002947929838682e+02 4.239737553652563e+02 1.188001021383240e+01 -5.572413455578469e+02 + 4 2.992434877229013e+02 -1.661439730366823e+02 1.360103548958277e+01 2.485112814376109e+02 + 5 2.406631501019480e+02 -2.715700051809825e+01 -1.015124643388078e+02 2.165097427916698e+02 + ME 7.228768445607493e-05 + +Event 47 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.018388784182160e+02 8.642536924923879e+00 -7.368701360758435e+01 1.877084532518992e+02 + 3 6.387534662808699e+02 -2.318851129196157e+02 1.997708430514635e+02 -5.606486380600520e+02 + 4 2.649820787300668e+02 1.788659005461101e+02 -1.950823496502483e+02 -1.285956938916121e+01 + 5 3.944255765708474e+02 4.437667544858174e+01 6.899852020636911e+01 3.857997541973140e+02 + ME 1.657302302888816e-07 + +Event 48 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.027019167519019e+02 -6.158689118671300e+01 4.178205606243037e+02 -2.726577544460905e+02 + 3 5.743238667714223e+02 3.184605495288456e+02 -1.749486635874764e+02 4.447738160526316e+02 + 4 3.758842972635484e+02 -2.607694178749530e+02 -2.399878564004706e+02 -1.252762723374896e+02 + 5 4.708991921312748e+01 3.895759532820393e+00 -2.884040636356643e+00 -4.683978926905154e+01 + ME 1.102336819899130e-05 + +Event 49 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.764648203352889e+02 2.738178952147450e+01 -3.157099897407809e+02 -3.558035483207228e+02 + 3 4.895961256288140e+02 -3.256740061063620e+02 3.286155635585780e+02 1.601643511036614e+02 + 4 1.166509262431076e+02 1.759755750888453e+01 3.782228425839705e+01 -1.089368595865212e+02 + 5 4.172881277927893e+02 2.806946590760029e+02 -5.072785807619410e+01 3.045760568035827e+02 + ME 2.756786236908775e-07 + +Event 50 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.289894155958067e+02 4.693347168027174e+02 -2.050228258252127e+02 -1.323645205738705e+02 + 3 3.157727461963105e+02 1.138825334157519e+02 2.859620904593798e+02 -7.049027339478296e+01 + 4 5.977725833195261e+02 -5.754593992719119e+02 -5.502927305745786e+01 1.521522929990794e+02 + 5 5.746525488835675e+01 -7.757850946557383e+00 -2.590999157670939e+01 5.070250096957403e+01 + ME 2.051616582639857e-07 + +Event 51 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.219327715020971e+02 5.984785298499144e+01 -4.338034317791259e+01 2.092618823041012e+02 + 3 3.719694454596721e+02 2.481003316167899e+02 6.684163406846992e+01 -2.689603869759851e+02 + 4 5.038009677439173e+02 -3.561225019008228e+02 3.408324299472030e+02 -1.040453431725397e+02 + 5 4.022968152943129e+02 4.817431729904136e+01 -3.642937208377602e+02 1.637438478444239e+02 + ME 2.408810354087823e-09 + +Event 52 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.643797726078950e+02 -1.708128057115347e+02 -2.017258340575681e+02 5.132001844727701e+00 + 3 1.082614026075099e+02 8.023457653018266e+01 -7.166510600964263e+01 -1.212668974594046e+01 + 4 5.888736361086693e+02 1.251923882116535e+02 2.277230615162053e+02 -5.284328079249005e+02 + 5 5.384851886759253e+02 -3.461415903030148e+01 4.566787855100542e+01 5.354274958261134e+02 + ME 2.387497787736484e-06 + +Event 53 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.236225962870593e+02 -8.655229351820063e+01 -2.025655916342637e+02 3.850905273783228e+01 + 3 3.598708704269264e+02 -3.246728222408169e+01 3.017281195636015e+02 -1.934245610863019e+02 + 4 4.959901518772787e+02 3.780916831344547e+02 2.233019308120418e+02 2.306277468116429e+02 + 5 4.205163814087348e+02 -2.590721073921725e+02 -3.224644587413796e+02 -7.571223846317311e+01 + ME 2.419493379402845e-08 + +Event 54 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.833324108095402e+02 3.689695429376331e+02 -9.184861439378331e+01 -4.867284248315899e+01 + 3 1.733517466553474e+02 -1.283859018369739e+02 1.142418318268169e+02 2.273086313407226e+01 + 4 5.882352328920327e+02 -5.696191122096893e+02 -1.438232518530712e+02 -2.948946332840464e+01 + 5 3.550806096430796e+02 3.290354711090303e+02 1.214300344200377e+02 5.543144267749134e+01 + ME 4.116554511041948e-08 + +Event 55 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.230627174531745e+02 4.559332054335223e+00 -3.968535050007001e+02 -1.465215716498505e+02 + 3 3.495042365247249e+02 -1.042339596976066e+02 -8.990135550403504e+01 -3.212572789417006e+02 + 4 2.159564078947226e+02 -5.070199742482322e+01 1.962132698937685e+02 7.461119410329923e+01 + 5 5.114766381273783e+02 1.503766250680946e+02 2.905415906109667e+02 3.931676564882520e+02 + ME 6.540453144473672e-08 + +Event 56 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.301047227118418e+02 -1.540011276808692e+02 1.679727819701612e+02 3.189013334119058e+01 + 3 8.914969805191234e+01 6.109731064089875e+01 -5.747680497126689e+01 -3.018615883963399e+01 + 4 6.600518622851478e+02 5.103775210112311e+02 -4.083637358386221e+02 -9.177312354086116e+01 + 5 5.206937169510982e+02 -4.174737039712605e+02 2.978677588397278e+02 9.006914903930456e+01 + ME 1.210838577412805e-07 + +Event 57 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.428929101034774e+02 4.260395144351128e+02 1.172634949350701e+02 -2.989539622472088e+01 + 3 2.959829527779269e+02 -1.135559932551681e+02 -1.425261047989344e+02 -2.332321894203626e+02 + 4 4.151099697755375e+02 -1.242288834014612e+01 -6.521586552925592e+01 4.097668236150967e+02 + 5 3.460141673430585e+02 -3.000606328397987e+02 9.047847539312014e+01 -1.466392379700132e+02 + ME 9.614686222852469e-08 + +Event 58 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.357156983149213e+02 -5.877712383564347e+01 2.922019789681372e+02 3.178229427822562e+02 + 3 3.319248809135800e+02 -2.788588871424606e+01 2.781385476596402e+02 -1.789845023623471e+02 + 4 1.585962071308597e+02 -2.424722381792027e+01 -7.876980550994809e+01 1.354996191630928e+02 + 5 5.737632136406385e+02 1.109102363678097e+02 -4.915707211178297e+02 -2.743380595830020e+02 + ME 1.713629333536021e-08 + +Event 59 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.336459069578588e+02 -1.992843481885649e+01 5.107665464174289e+02 -1.532917041439581e+02 + 3 1.581511369245755e+02 -9.743817802085908e+01 -5.863052068271143e+01 -1.099092608426849e+02 + 4 5.888078775864332e+02 2.639198311142280e+02 -3.515067392327601e+02 3.917704069048988e+02 + 5 2.193950785311320e+02 -1.465532182745123e+02 -1.006292865019573e+02 -1.285694419182557e+02 + ME 1.432379604105286e-08 + +Event 60 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.398861408394455e+02 9.292985018883907e+01 -1.755261709518740e+02 2.758209473364647e+02 + 3 4.495621192790998e+02 1.515758570389179e+02 -3.450839350786029e+02 -2.450468045176262e+02 + 4 5.587170539667186e+02 -2.339829412606645e+02 4.760297086658421e+02 -1.755347431700375e+02 + 5 1.518346859147359e+02 -1.052276596709245e+01 4.458039736463480e+01 1.447606003511990e+02 + ME 4.482931149984433e-08 + +Event 61 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.175194209979107e+01 5.998402058062320e+01 -1.454594179391587e+01 -1.906621464091413e+00 + 3 3.885205042949810e+02 2.010533504306213e+02 -3.301647653931597e+02 3.894817365587326e+01 + 4 4.121877137292707e+02 -1.873608925987552e+02 -2.415372201761172e+02 -2.765038490573954e+02 + 5 6.375398398759568e+02 -7.367647841248923e+01 5.862479273631928e+02 2.394622968656136e+02 + ME 4.915053968402902e-07 + +Event 62 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.423805753542258e+02 -2.842742526400005e+02 1.403994964620940e+02 1.292307589509954e+02 + 3 3.730016642701108e+02 -6.375176338198228e+01 3.556485890785658e+02 9.262847996370058e+01 + 4 1.869146245818500e+02 1.512767776127116e+02 -3.521592858368063e+01 1.039819783023830e+02 + 5 5.977031357938134e+02 1.967492384092712e+02 -4.608321569569791e+02 -3.258412172170790e+02 + ME 2.893684790840834e-08 + +Event 63 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.204233175784373e+02 -1.250932662423830e+01 -4.690369092824184e+02 -2.251406759285211e+02 + 3 1.393553568983892e+02 8.467826532496937e+01 1.098936348220459e+02 -1.314898868469838e+01 + 4 2.210675038562465e+02 -1.091496397100441e+02 -1.833244208077437e+02 -5.787360493268422e+01 + 5 6.191538216669275e+02 3.698070100931304e+01 5.424676952681161e+02 2.961632695459037e+02 + ME 3.491281245214703e-04 + +Event 64 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.285187126492506e+02 5.115930460477169e+02 2.913679691486133e+02 -2.200296205970973e+02 + 3 3.530874069984857e+02 -5.757495613833130e+01 -3.215266291557357e+02 1.340763519429640e+02 + 4 2.198421555599027e+02 -1.613778626189666e+02 6.174872575212309e+01 1.359222339639379e+02 + 5 2.985517247923617e+02 -2.926402272904187e+02 -3.159006574500087e+01 -4.996896530980440e+01 + ME 1.979059982852776e-08 + +Event 65 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.733821832722187e+02 2.303260106007256e+02 -1.646059812172811e+00 1.472584036940988e+02 + 3 1.394921625216098e+02 -9.684562217110874e+01 4.145751137329393e+01 -9.143447720624461e+01 + 4 5.102700480977414e+02 3.604369604937132e+02 -2.998931993418235e+02 -2.013076960383036e+02 + 5 5.768556061084298e+02 -4.939173489233301e+02 2.600817477807025e+02 1.454837695504496e+02 + ME 8.572020790384727e-09 + +Event 66 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.544462431538033e+02 -3.753345008667602e+02 -2.512516495498346e+02 5.017976658168838e+01 + 3 3.165563250580395e+02 1.103952965289289e+02 -2.325997113597451e+02 -1.841688348062842e+02 + 4 3.684879093534597e+02 6.572067686856805e+01 2.241075105812514e+02 2.850262368146047e+02 + 5 3.605095224346970e+02 1.992185274692630e+02 2.597438503283283e+02 -1.510371685900090e+02 + ME 4.525957563721070e-09 + +Event 67 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.440190035555440e+02 2.253514126547281e+02 -1.260243593843257e+00 -9.359715111499492e+01 + 3 3.825895783887988e+02 -2.104023034558342e+02 -1.413119979724069e+02 -2.865947930811799e+02 + 4 4.876346193001705e+02 -2.655995372194987e+02 -1.506557767336876e+02 3.801936936688713e+02 + 5 3.857567987554873e+02 2.506504280206046e+02 2.932280182999377e+02 -1.749472696344974e-03 + ME 1.150513790624041e-08 + +Event 68 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.035832133728723e+02 -2.971861821973761e+02 1.881283924203020e+02 -4.905107303024299e+02 + 3 4.910040511213285e+02 6.999750717015637e+01 6.653935986886803e+01 4.814123396795738e+02 + 4 1.379763939873843e+02 1.378874442733864e+02 -2.922008491766640e+00 -3.999984486182564e+00 + 5 2.674363415184150e+02 8.930123075383302e+01 -2.517457437974033e+02 1.309837510903859e+01 + ME 6.064279967849539e-08 + +Event 69 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.030381868442192e+02 2.272305877240548e+02 1.124384392229261e+01 3.326854611056926e+02 + 3 4.200661478070355e+02 -7.160564158348362e+01 3.787564442608000e+02 -1.669483649448990e+02 + 4 3.799818119209206e+02 1.049459036478361e+02 -3.642939882503813e+02 -2.573761494148145e+01 + 5 2.969138534278247e+02 -2.605708497884073e+02 -2.570629993271116e+01 -1.399994812193121e+02 + ME 2.211041372363260e-09 + +Event 70 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.167686328179870e+02 -7.473352909257774e+00 2.955788092743162e+01 2.146138878198537e+02 + 3 4.902322685632545e+02 6.433192499326780e+01 -2.241342640720430e+02 -4.312225785325012e+02 + 4 4.524638474271014e+02 1.238344991848497e+02 4.320121481028072e+02 5.247908089678295e+01 + 5 3.405352511916566e+02 -1.806930712688595e+02 -2.374357649581957e+02 1.641296098158646e+02 + ME 2.145303282455767e-09 + +Event 71 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.536202816327036e+02 -2.094555017497595e+02 -3.528962486096462e+02 -1.932976730654783e+02 + 3 4.830671392542954e+02 -1.130399763251615e+02 4.195776068459593e+02 -2.110224078460706e+02 + 4 1.227243866738444e+02 7.580385517780422e+01 7.042433585630756e+01 6.599593581313735e+01 + 5 4.405881924391570e+02 2.466916228971166e+02 -1.371056940926206e+02 3.383241450984115e+02 + ME 4.416701015699929e-08 + +Event 72 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.855461065651830e+02 -6.960662796769586e+01 6.543639335521402e+02 -1.921879913933703e+02 + 3 1.544820687132741e+02 -4.432993363636479e+01 -1.101873255905340e+02 9.878420833784055e+01 + 4 1.673033372364589e+02 6.926279643044643e+01 -5.591621839923215e+01 1.416560912951512e+02 + 5 4.926684874850837e+02 4.467376517361423e+01 -4.882603895623742e+02 -4.825230823962126e+01 + ME 2.086075467222067e-07 + +Event 73 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.670906658704047e+01 -5.458408693475392e+00 -1.816753288898089e+01 1.880214778193577e+01 + 3 6.242100951925029e+02 -5.543116507793766e+02 2.403203993953238e+02 1.569169920210937e+02 + 4 4.464355243035053e+02 1.923986431943475e+02 -3.808569523700174e+02 -1.312837434282788e+02 + 5 4.026453139169509e+02 3.673714162785045e+02 1.587040858636744e+02 -4.443539637475057e+01 + ME 8.777250890020343e-07 + +Event 74 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.507575031696209e+02 -1.392071235576032e+02 -5.787209256044109e+01 -1.497178419166269e-01 + 3 6.125489314065023e+02 6.060714876125714e+02 -8.678795919437113e+01 1.901040265772213e+01 + 4 3.363511975714606e+02 -2.665860722445908e+02 -1.847740056381793e+02 8.900876941841000e+01 + 5 4.003423678524160e+02 -2.002782918103776e+02 3.294340573929915e+02 -1.078694542342155e+02 + ME 6.869043601345221e-09 + +Event 75 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.949609689268429e+01 2.952198203772742e+01 1.197957151721274e+01 -2.334275289215887e+01 + 3 4.190786176726720e+02 1.383393001415919e+02 -2.870901836423846e+02 2.721550151714166e+02 + 4 4.516269609304361e+02 -4.017945448128341e+02 -2.062213189338416e+02 -9.073120168421993e-01 + 5 5.897983245042075e+02 2.339332626335147e+02 4.813319310590135e+02 -2.479049502624155e+02 + ME 8.853913575949025e-08 + +Event 76 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.715950956231771e+02 -5.685992331526851e+02 -4.378901164006464e+01 3.870901520619992e+01 + 3 2.332327857868956e+02 1.165329531079328e+02 -1.925039496033650e+02 -6.131747379797535e+01 + 4 3.244822622272624e+02 1.227113072274079e+02 2.628412386324302e+02 -1.454137436861878e+02 + 5 3.706898563626654e+02 3.293549728173440e+02 -2.654827738900063e+01 1.680222022779628e+02 + ME 4.126838594121268e-09 + +Event 77 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.469171932013445e+02 6.704141444804748e+01 -6.996151281265823e+01 -2.271099640530980e+02 + 3 6.144793631549346e+02 -4.733339087492144e+02 9.433660898623472e+01 3.803163193664752e+02 + 4 1.021761213297807e+02 -9.029119947808269e+01 1.069887339263507e+01 4.661537487713156e+01 + 5 5.364273223139397e+02 4.965836937792496e+02 -3.507396956621158e+01 -1.998217301905086e+02 + ME 4.136635199465815e-08 + +Event 78 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.967497774816142e+02 -2.697858484391465e+02 6.318686962407354e+02 1.158352239764816e+02 + 3 6.532937684360132e+01 -1.968556360581410e+00 -5.408995210783415e+01 -3.658318391830724e+01 + 4 6.825170260279165e+02 3.242089958026899e+02 -5.955481599371366e+02 -7.772005567479931e+01 + 5 5.540381964686841e+01 -5.245459100296188e+01 1.776941580423527e+01 -1.531984383375085e+00 + ME 6.912778750585067e-04 + +Event 79 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.067690710988118e+02 -2.411523221575334e+02 7.258473255078884e+01 -1.751692812721097e+02 + 3 4.341993133670206e+02 -2.152390662369684e+02 -1.744359138858042e+02 3.343251412033717e+02 + 4 4.316885855045250e+02 4.064167724737121e+02 -7.391084315808240e+00 1.453472179974050e+02 + 5 3.273430300296425e+02 4.997461592078958e+01 1.092422656508236e+02 -3.045030779286670e+02 + ME 2.227839851987215e-08 + +Event 80 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.542875433020407e+01 3.027762979867648e+01 3.286699452335474e+01 -8.172975270371369e+00 + 3 4.747123602854808e+02 -4.741886647646233e+02 -1.797507628065839e+01 -1.318453068032191e+01 + 4 5.041118878446803e+02 2.786633966721448e+02 2.426995114610604e+02 -3.428883986926841e+02 + 5 4.757469975396346e+02 1.652476382938020e+02 -2.575914297037568e+02 3.642459046433773e+02 + ME 1.116306319253378e-07 + +Event 81 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.864116929519442e+02 3.277381135111354e+02 3.711141341299856e+02 3.142303327686207e+02 + 3 3.685765254538676e+02 -3.416666086612904e+02 -1.007529100226153e+02 -9.466485495426969e+01 + 4 2.326234951979822e+02 1.494507175101483e+02 8.025952299133930e+00 -1.780835692688112e+02 + 5 3.123882863962061e+02 -1.355222223599932e+02 -2.783871764065043e+02 -4.148190854553969e+01 + ME 3.152071526461638e-08 + +Event 82 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.427639687834170e+02 9.380520328619333e+00 1.408494872006385e+02 3.123468682248003e+02 + 3 6.478929207969744e+02 -1.321126375113856e+02 -3.734561186667144e+02 -5.126812023655760e+02 + 4 3.203811193174650e+02 -1.134795021127586e+01 1.346301271349556e+02 2.904995946791318e+02 + 5 1.889619911021435e+02 1.340800673940422e+02 9.797650433112027e+01 -9.016526053835608e+01 + ME 2.747443919603630e-08 + +Event 83 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.062422362872099e+02 5.909870990240152e+01 2.721577348549549e+02 1.273648975686913e+02 + 3 2.466716629423465e+02 -1.034354582623313e+02 -1.868503752330573e+02 1.234299499638147e+02 + 4 4.906943885930805e+02 5.161889116502462e+01 3.651680763098555e+02 -3.236800103741192e+02 + 5 4.563917121773633e+02 -7.282142805094902e+00 -4.504754359317530e+02 7.288516284161318e+01 + ME 1.920224543422507e-07 + +Event 84 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.336579016443923e+02 -7.328260784589015e+01 1.067078727201235e+02 -3.327948255056634e+01 + 3 6.164528201146906e+02 -4.207287356636679e+02 6.823455463559316e+01 4.453599173341587e+02 + 4 1.467908941354667e+02 -2.567468685241225e+01 -7.754572458221436e+01 -1.219632635474294e+02 + 5 6.030983841054509e+02 5.196860303619703e+02 -9.739670277350224e+01 -2.901171712361628e+02 + ME 1.643582175604126e-07 + +Event 85 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.358447951050334e+02 -1.672088219728145e+02 2.854579619038340e+02 5.785056818489144e+01 + 3 4.684481782024459e+02 3.813275907644369e+02 3.444658097706862e+01 -2.699007173795044e+02 + 4 4.650926385624549e+02 -3.110546686540760e+02 -1.387147979935619e+02 3.167244233889999e+02 + 5 2.306143881300662e+02 9.693589986245354e+01 -1.811897448873403e+02 -1.046742741943870e+02 + ME 9.887674833666381e-09 + +Event 86 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.346862187327210e+02 -1.105019805657391e+02 -2.067698421018028e+02 1.063794864187420e+01 + 3 5.058624304519142e+02 -4.262206430615211e+02 2.700548789916521e+02 3.609881305175244e+01 + 4 6.480280992696387e+02 6.454938193212064e+02 -5.106895467449713e+01 -2.588645455826063e+01 + 5 1.114232515457259e+02 -1.087711956939464e+02 -1.221608221535224e+01 -2.085030713536592e+01 + ME 2.641123684843117e-06 + +Event 87 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.728899334305389e+02 4.659191099288730e+02 -3.129457850944554e+01 -7.459840145031788e+01 + 3 4.494169400629929e+02 -7.010118226273974e+01 1.008358429699955e+02 4.323118585390417e+02 + 4 2.844458559289022e+01 -7.098330388355530e+00 -9.888008676198389e+00 2.570866468077313e+01 + 5 5.492485409135775e+02 -3.887195972777775e+02 -5.965325578435169e+01 -3.834221217694970e+02 + ME 1.836555389995247e-06 + +Event 88 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.984878614180078e+02 -8.577726579355432e+01 4.910354340013712e+02 -4.075685116146667e+00 + 3 4.609805056931717e+02 2.129284200140233e+02 -3.890221250310136e+02 1.258026264265515e+02 + 4 2.969828717410932e+02 -2.479988381372320e+02 1.094380361139229e+02 -1.213207263483756e+02 + 5 2.435487611477276e+02 1.208476839167630e+02 -2.114513450842809e+02 -4.062149620292672e-01 + ME 1.560041010039522e-08 + +Event 89 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.726870008116494e+02 1.539765893236600e+02 -3.662906941914419e+02 2.560377667948945e+02 + 3 4.594378962938944e+02 -1.479060782129439e+02 4.245625574332342e+02 9.462350344590699e+01 + 4 1.718353569329646e+02 -3.298783981694858e+01 -1.660422757461218e+02 2.948143452309455e+01 + 5 3.960397459614920e+02 2.691732870623245e+01 1.077704125043293e+02 -3.801427047638961e+02 + ME 5.286447740137126e-06 + +Event 90 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.474695652900048e+02 -9.333174748729691e+01 1.132426971448449e+02 1.457906516726571e+01 + 3 3.251565719826368e+02 2.585053334584991e+02 -2.175136337350804e+00 -1.972233699613811e+02 + 4 5.790098794634628e+02 6.564529205760056e+01 -4.580486422816988e+02 3.480439303462398e+02 + 5 4.483639832638958e+02 -2.308188780288028e+02 3.469810814742048e+02 -1.653996255521244e+02 + ME 2.792655563627604e-08 + +Event 91 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.820899052888924e+02 -1.808581415393254e+02 -3.203199804488937e+02 1.033350786898440e+02 + 3 9.295446296256250e+01 -2.298114143078748e+01 3.555880655718099e+01 8.275246582081725e+01 + 4 4.336620114613530e+02 8.456554310968218e+01 -2.782844067212398e+02 -3.216662837150926e+02 + 5 5.912936202871920e+02 1.192737398604308e+02 5.630455806129527e+02 1.355787392044315e+02 + ME 5.474348862057168e-08 + +Event 92 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.270593439871326e+02 5.052201207875458e+02 3.779850976205829e+01 1.453115766046592e+02 + 3 2.463043854963669e+02 1.231304177150150e+02 -3.773893720068454e+01 -2.099536214668173e+02 + 4 6.690437393076164e+02 -6.594864940642268e+02 8.207385292371921e+00 1.123820629827311e+02 + 5 5.759253120888415e+01 3.113595556166609e+01 -8.266957853745721e+00 -4.774001812057302e+01 + ME 2.727158601392794e-07 + +Event 93 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.200017882248953e+02 -1.560830085677291e+02 -1.325663041349294e+02 8.040557360409322e+01 + 3 6.407281865953230e+02 1.823233391623666e+02 6.142037882279666e+02 -6.672002760070171e+00 + 4 8.521385755377797e+01 4.383951335035405e+01 5.404958342950359e+01 4.917459831556157e+01 + 5 5.540561676260040e+02 -7.007984394499131e+01 -5.356870675225409e+02 -1.229081691595850e+02 + ME 7.673177869532113e-06 + +Event 94 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.370935815124155e+02 5.275516558105982e+02 1.000073439779119e+02 1.254180624206741e+01 + 3 5.057716473607446e+02 -3.633458733842592e+02 -1.608969609488800e+02 -3.128848087172752e+02 + 4 9.454406003253547e+01 -6.967807726468104e+01 4.085645048107038e+01 -4.913547893549688e+01 + 5 3.625907110943047e+02 -9.452770516165788e+01 2.003316648989775e+01 3.494784814107046e+02 + ME 4.167919088307122e-05 + +Event 95 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.256779780037450e+02 -3.004969003882455e+02 9.471368436356252e+00 1.252120257547474e+02 + 3 2.582480939333944e+02 -2.012383405486748e+02 7.138897109957118e+01 1.452543394146680e+02 + 4 5.694131298692070e+02 2.847102884863675e+02 8.193724006527485e+01 -4.862691156015786e+02 + 5 3.466607981936535e+02 2.170249524505529e+02 -1.627975796012024e+02 2.158027504321630e+02 + ME 1.143568282052127e-06 + +Event 96 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.766185052317254e+02 4.233490188089946e+02 1.329496801040323e+01 -2.185498836155904e+02 + 3 7.890873879535889e+01 -4.740418313873944e+01 4.641498695348351e+01 4.272097219552690e+01 + 4 4.792869803542939e+02 -2.336105143624531e+02 3.831040160425885e+02 1.684442044372186e+02 + 5 4.651857756186217e+02 -1.423343213078020e+02 -4.428139710064752e+02 7.384706982844790e+00 + ME 1.367682751699699e-08 + +Event 97 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.454191314938116e+02 -2.198423252847823e+02 -1.067171314055373e+02 -2.261318157911461e+01 + 3 6.283883510117278e+02 4.722599592005207e+02 -1.937207663271801e+02 -3.664897206154230e+02 + 4 1.620781893868624e+02 -7.571987944222909e+01 -4.595113060672451e+01 1.357362623919699e+02 + 5 4.641143281075982e+02 -1.766977544735093e+02 3.463890283394419e+02 2.533666398025679e+02 + ME 7.206430297766959e-08 + +Event 98 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.982747694543484e+02 4.799793179522203e+02 -1.370111687864804e+01 -1.330784716217580e+02 + 3 5.240661916116436e+02 -3.125813856230740e+02 1.929132879729713e+02 3.737950158519350e+02 + 4 2.943287261583366e+02 -2.480543997855068e+02 -1.355691835838943e+02 -8.197200895084490e+01 + 5 1.833303127756715e+02 8.065646745636053e+01 -4.364298751042897e+01 -1.587445352793322e+02 + ME 9.545426588767261e-08 + +Event 99 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.112057021621225e+02 -2.049393130332368e+02 -2.328035275724479e+01 -4.545054207331780e+01 + 3 5.066243223503690e+02 -2.358079378948771e+02 -4.471534870778939e+02 3.341525724599697e+01 + 4 4.653239426414497e+02 4.182795598186354e+02 1.760198094306579e+02 -1.028863845283059e+02 + 5 3.168460328460582e+02 2.246769110947843e+01 2.944140304044810e+02 1.149216693556268e+02 + ME 1.139669243722759e-08 + +Event 100 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.261030820391055e+02 -1.819121811113251e+01 6.012879360431594e+01 1.093416437734688e+02 + 3 4.769048092319793e+02 -2.259295543204739e+02 1.301569921137044e+02 -3.993159037116550e+02 + 4 5.269499564110497e+02 2.313940015147070e+02 1.423959739422059e+02 4.515046613598465e+02 + 5 3.700421523178656e+02 1.272677091689939e+01 -3.326817596602262e+02 -1.615304014216603e+02 + ME 2.536413678333058e-07 + +Event 101 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.071082658590780e+02 -2.306343931636616e+02 -1.906219995172719e+02 -2.760582730527242e+02 + 3 7.055902937697466e+02 3.509939199461518e+02 9.908499693062998e+01 6.040224285621923e+02 + 4 1.506354165156304e+02 -3.616228611940879e+00 8.811142866916488e+01 -1.221242307543523e+02 + 5 2.366660238555453e+02 -1.167432981705493e+02 3.425573917477102e+00 -2.058399247551156e+02 + ME 1.527835907227665e-05 + +Event 102 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.679004164430066e+02 1.260994283332420e+02 8.794295354075821e+01 4.419228109116983e+02 + 3 2.893886902350230e+02 1.121360101901791e+02 -2.665918046579882e+02 -1.000694477686555e+01 + 4 1.114482866002886e+02 7.246487011182150e+01 -5.194724669148226e+01 6.686588627238250e+01 + 5 6.312626067216820e+02 -3.107003086352426e+02 2.305960978087122e+02 -4.987817524072153e+02 + ME 1.293271949002516e-06 + +Event 103 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.015611695754376e+02 -2.478016296999642e+02 2.089981655060758e+02 -2.369925991332431e+02 + 3 2.805421352009303e+02 2.015483315378810e+02 1.930950025069369e+02 2.822197165754875e+01 + 4 2.160334239749209e+02 1.520789029588300e+02 1.534112976413324e+02 2.724207255193543e+00 + 5 6.018632712487114e+02 -1.058256047967467e+02 -5.555044656543452e+02 2.060464202205007e+02 + ME 4.079188051089405e-09 + +Event 104 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.888143656522529e+02 5.760997201270005e+02 9.608601910085939e+01 7.469234633753241e+01 + 3 3.060271446633420e+02 -1.984745521217481e+02 2.204192649519958e+02 7.533799220108909e+01 + 4 3.967306659051177e+02 -3.423810873408198e+02 -1.995377379946823e+02 1.884418787853177e+01 + 5 2.084278237792873e+02 -3.524408066443252e+01 -1.169675460581729e+02 -1.688745264171533e+02 + ME 1.639687028098068e-08 + +Event 105 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.504015321144005e+02 1.426088302035090e+02 -2.057470186990173e+02 5.640312907289357e+00 + 3 1.979630815113672e+02 4.982132386022299e+01 1.913292686370453e+02 1.001640120524153e+01 + 4 4.659014384742006e+02 2.574185871348824e+02 -5.255943452024413e+01 -3.847561919095292e+02 + 5 5.857339479000306e+02 -4.498487411986147e+02 6.697718458221685e+01 3.690994777969991e+02 + ME 1.088701469357768e-08 + +Event 106 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 7.361513001939429e+02 -3.741524637210578e+01 1.304189622135483e+01 7.350841754922349e+02 + 3 4.122811658031851e+02 1.145408114286395e+02 -7.459440103785889e+00 -3.959804527330108e+02 + 4 2.337908007462916e+02 -6.120784213133226e+01 -2.574540563694116e+01 -2.241626923995326e+02 + 5 1.177767332565805e+02 -1.591772292520144e+01 2.016294951937229e+01 -1.149410303596913e+02 + ME 1.099893041290890e-03 + +Event 107 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.705546785847132e+02 1.262951978594902e+01 -9.714584685273636e+01 1.396140324479450e+02 + 3 6.671070399945477e+02 2.578935168541208e+02 6.114409935711720e+02 -6.828358628248799e+01 + 4 2.745513521168064e+02 -2.324733487602298e+02 -1.283830712319619e+02 -6.965898424769128e+01 + 5 3.877869293039332e+02 -3.804968787984006e+01 -3.859120754864738e+02 -1.671461917765848e+00 + ME 1.536701523800557e-08 + +Event 108 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.706224267805914e+02 -4.353661443150737e+01 9.404361586016130e+01 1.355447307728594e+02 + 3 2.687777512938866e+02 2.082248009387954e+02 3.014322059927089e+01 1.672581780257728e+02 + 4 3.692025609623798e+02 3.365346633914971e+02 2.321314261258354e+01 1.500536616254310e+02 + 5 6.913972609631422e+02 -5.012228498987852e+02 -1.473999790720158e+02 -4.528565704240632e+02 + ME 4.569544766601897e-08 + +Event 109 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.466785643841017e+02 -2.365744581492209e+02 2.771136527000190e+02 -2.583839954774635e+02 + 3 3.878915327990413e+02 2.483945414202764e+02 -1.631710090657951e+02 -2.492693619566003e+02 + 4 1.253118648319771e+02 4.194400500436873e+01 1.160335020033091e+02 2.190868149180264e+01 + 5 5.401180379848795e+02 -5.376408827542424e+01 -2.299761456375331e+02 4.857446759422612e+02 + ME 1.013278487380946e-07 + +Event 110 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.381411416550031e+02 6.702134331125377e+01 -1.162827706142533e+02 -1.967172085705169e+02 + 3 6.212430200653038e+02 -3.967265104066119e+02 1.827510534384594e+02 4.417612685462424e+02 + 4 1.823603315775933e+02 2.482060450627628e+01 -1.599146046747258e+02 8.406275832233293e+01 + 5 4.582555067020995e+02 3.048845625890818e+02 9.344632185051987e+01 -3.291068182980584e+02 + ME 6.851051377489183e-08 + +Event 111 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.374985436753868e+02 -2.389765770808210e+02 -2.262746633651867e+02 7.480133226562783e+01 + 3 1.687316160676459e+02 -3.174949652867830e+01 -1.649088651344595e+02 1.635218428955413e+01 + 4 5.145505242681480e+02 2.608128140187756e+01 2.183177034136404e+02 -4.652089736465278e+02 + 5 4.792193159888191e+02 2.446447922076219e+02 1.728658250860056e+02 3.740554570913458e+02 + ME 3.128135120818016e-07 + +Event 112 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.705149137771965e+02 -1.687461219713958e+02 -2.442102979231825e+01 -1.922353750557715e+00 + 3 6.869944158795411e+02 2.444246111927705e+02 5.622677815177788e+02 3.099562529777548e+02 + 4 6.218245605391446e+02 -5.521148956020887e+01 -5.388632075909079e+02 -3.053586727359832e+02 + 5 2.066610980411795e+01 -2.046699966116587e+01 1.016455865447365e+00 -2.675226491214084e+00 + ME 2.152137171262364e-06 + +Event 113 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.130363090939669e+02 1.028036904144503e+01 1.180709930084098e+01 -1.119469231022390e+02 + 3 4.872852151720413e+02 7.570757814761660e+01 3.354557570129505e+02 -3.452313407313326e+02 + 4 5.826096241012513e+02 8.602003542439087e+01 -5.178852261950345e+02 2.526448497197317e+02 + 5 3.170688516327408e+02 -1.720079826134526e+02 1.706223698812430e+02 2.045334141138398e+02 + ME 2.693743008806596e-07 + +Event 114 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.488748255497196e+02 -5.783809298403495e+01 -4.190201165497776e+02 1.502181944335374e+02 + 3 3.885313578527229e+02 -3.031237352159774e+02 6.719013528635192e+01 -2.335767601962925e+02 + 4 1.721991327065913e+02 1.359105605864553e+02 -8.348365698663605e+01 6.489483679088329e+01 + 5 4.903946838909668e+02 2.250512676135569e+02 4.353136382500617e+02 1.846372897187182e+01 + ME 6.959044445976827e-09 + +Event 115 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.614867481905578e+02 -2.044427690075313e+02 5.545544724970484e+02 -2.970474865501678e+02 + 3 5.299069281136578e+02 2.787046279045816e+01 -4.218547569036955e+02 3.194732443326408e+02 + 4 2.112135717499224e+02 1.481206856190749e+02 -1.329299397515352e+02 7.071821901566830e+01 + 5 9.739275194586149e+01 2.845162059799823e+01 2.302241581822219e-01 -9.314397679814118e+01 + ME 5.262055700672105e-06 + +Event 116 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.273084495291165e+02 2.026422934429813e+02 -1.202888698929615e+01 2.567532432494704e+02 + 3 3.558310071858317e+02 2.658361944151384e+02 -1.056345448838792e+02 -2.116321486469763e+02 + 4 4.261839858364658e+02 -3.197528890451962e+02 -4.295116688092089e+01 2.784709625693038e+02 + 5 3.906765574485857e+02 -1.487255988129233e+02 1.606145987540962e+02 -3.235920571717980e+02 + ME 4.624358515368805e-09 + +Event 117 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.398873526503558e+02 -1.697886094974675e+02 2.463425145650708e+02 -1.612780397150886e+02 + 3 3.484530288300061e+02 3.072641586090561e+02 1.508174714846008e+02 6.528660222484780e+01 + 4 4.599006329697289e+02 8.910216575675364e+00 -4.016585734725037e+02 -2.238293783277010e+02 + 5 3.517589855499093e+02 -1.463857656872640e+02 4.498587422832075e+00 3.198208158179418e+02 + ME 1.105305195728412e-08 + +Event 118 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.636830965937107e+02 -1.350752771701317e+02 -4.094705561989161e+01 -8.288645392330183e+01 + 3 5.340512912451782e+02 -4.440034731447416e+02 -2.645266954971570e+02 -1.345262981182612e+02 + 4 5.602763248554179e+02 5.415787847304525e+02 9.167439365323625e+01 1.104435859237256e+02 + 5 2.419892873056930e+02 3.749996558442061e+01 2.137993574638124e+02 1.069691661178373e+02 + ME 1.262861526356282e-06 + +Event 119 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.393958606639746e+01 5.505558390943226e+01 3.178415492333581e+01 6.849879016676002e+00 + 3 5.103236431617295e+02 1.902911879696914e+02 -2.878340806151939e+02 3.759933863611832e+02 + 4 5.716564501715113e+02 -6.229917649784055e+01 5.188259821571465e+02 -2.317962680222806e+02 + 5 3.540803206003611e+02 -1.830475953812831e+02 -2.627760564652883e+02 -1.510469973555788e+02 + ME 9.902458598773123e-08 + +Event 120 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.375361739991114e+02 2.755987077479748e+02 -1.573030807697318e+02 -5.529497863508248e+02 + 3 1.063537280575990e+02 -2.858383009670409e+01 1.513609572498959e+01 -1.013162313499492e+02 + 4 6.566870497058905e+01 3.794001125736358e+00 -5.133060130400937e+01 4.078178193435162e+01 + 5 6.904413929727009e+02 -2.508088787770071e+02 1.934975863487517e+02 6.134842357664223e+02 + ME 1.047555707673089e-05 + +Event 121 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.472844458410502e+02 -2.887724852567565e+02 -3.914139567665228e+02 -2.508502159986242e+02 + 3 1.439229258812056e+02 -7.748866294914934e+01 1.168245717185551e+02 -3.257813916319178e+01 + 4 5.996216437235047e+02 2.361653319523241e+02 3.405657659024143e+02 4.333439865751321e+02 + 5 2.091709845542395e+02 1.300958162535815e+02 -6.597638085444667e+01 -1.499156314133161e+02 + ME 2.627662664743703e-08 + +Event 122 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.721863109768987e+02 -3.366161482695965e+02 3.289037426473594e+02 -3.836416388601713e+01 + 3 3.043000907870284e+02 -6.182651453450124e+01 -1.228256199650947e+02 -2.714588264059560e+02 + 4 5.158404617584771e+02 2.163538140471089e+02 -2.337205323437163e+02 4.057796469704185e+02 + 5 2.076731364775960e+02 1.820888487569890e+02 2.764240966145166e+01 -9.595665667844543e+01 + ME 7.659638993033701e-09 + +Event 123 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.076427050299664e+02 2.733188279487669e+02 5.414201256136838e+01 -4.243425228923664e+02 + 3 5.243311343735359e+02 -5.185486655744496e+02 5.092607261139513e+01 5.862554931747282e+01 + 4 3.790262178945214e+02 1.868424378139138e+02 -5.104513483933528e+01 3.257992809881769e+02 + 5 8.899994270197607e+01 5.838739981176896e+01 -5.402295033342823e+01 3.991769258671668e+01 + ME 3.787386536404977e-07 + +Event 124 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.524096836537792e+02 3.931871421189147e+02 1.244094353277442e+02 -5.055339345672223e+02 + 3 4.453257968846718e+02 -2.749272877886793e+02 1.288694994577423e+02 3.257647984507225e+02 + 4 3.649512160194104e+02 -1.362256111675446e+02 -2.654954063631008e+02 2.101051216324038e+02 + 5 3.731330344213865e+01 1.796575683730912e+01 1.221647157761433e+01 -3.033598551590402e+01 + ME 8.261066912909652e-07 + +Event 125 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.915960233698098e+02 -1.654995845044201e+02 -3.447055388379847e+01 -9.017041984449874e+01 + 3 6.550796868804263e+02 4.495369576307071e+02 -2.048853220836558e+02 4.301952169447749e+02 + 4 4.328930401647467e+02 -1.738692079710811e+02 5.578157194523531e+01 -3.924975146085698e+02 + 5 2.204312495850170e+02 -1.101681651552061e+02 1.835743040222191e+02 5.247271750829378e+01 + ME 2.973582383458595e-07 + +Event 126 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.035701387136452e+02 9.136521656755120e+00 -8.511236795855700e+01 5.830250788488047e+01 + 3 5.780501404699309e+02 3.287868703966549e+02 4.051344723950227e+02 2.488116115242344e+02 + 4 2.667378796160922e+02 1.255353362675918e+02 -2.344633536281414e+02 -2.041841266398259e+01 + 5 5.516418412003318e+02 -4.634587283210018e+02 -8.555875080832428e+01 -2.866957067451323e+02 + ME 2.515865237403175e-08 + +Event 127 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.008254008745652e+02 -2.121113113583696e+02 -3.036077285076011e+01 2.111467188404314e+02 + 3 2.220883382942753e+02 -1.288724105068163e+02 -1.058087522116511e+02 -1.466957387652706e+02 + 4 4.817604596011059e+02 3.195498937336952e+02 -1.950871089920132e+02 3.031864537788441e+02 + 5 4.953258012300538e+02 2.143382813149065e+01 3.312566340544244e+02 -3.676374338540048e+02 + ME 4.676131547228827e-09 + +Event 128 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.497673085746553e+02 7.660884888714838e+01 -6.253597043077772e+02 1.589146934447123e+02 + 3 1.067691597532546e+02 6.343721766028852e+01 6.858194366252209e+01 5.169032688431987e+01 + 4 6.255741311782837e+02 -1.271462240130818e+02 5.209429149313172e+02 -3.221727963400119e+02 + 5 1.178894004938061e+02 -1.289984253435512e+01 3.583484571393804e+01 1.115677760109796e+02 + ME 2.770543351752477e-07 + +Event 129 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.455471401102499e+02 5.611838162748452e+01 -1.972996399049179e+02 1.349702832227318e+02 + 3 5.464479261367329e+02 3.973915006851447e+02 3.192093966153585e+02 -1.969535282111083e+02 + 4 3.628510278873775e+02 -2.872701579660765e+02 -1.541290438384745e+01 -2.211315607495373e+02 + 5 3.451539058656394e+02 -1.662397243465527e+02 -1.064968523265931e+02 2.831148057379138e+02 + ME 1.070544975104643e-08 + +Event 130 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.021391279871390e+02 7.662958214582304e+01 -5.633752971808340e+01 -3.723427656600568e+01 + 3 6.760797762746118e+02 2.243389930768460e+02 2.520516979585487e+02 -5.858547786175415e+02 + 4 4.648353497198453e+02 -1.876583671396737e+02 -1.546190406153392e+02 3.961681358600594e+02 + 5 2.569457460184036e+02 -1.133102080829954e+02 -4.109512762512606e+01 2.269209193234879e+02 + ME 1.135432974296378e-05 + +Event 131 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.920919318876586e+02 7.263675942251076e+01 -2.088562075937370e+02 3.237886174366762e+02 + 3 5.458102506861221e+02 3.135522126877631e+02 4.454057185571284e+02 -3.475033164249447e+01 + 4 5.478401415085880e+02 -3.922090216845467e+02 -2.494405778346952e+02 -2.899660360919773e+02 + 5 1.425767591763096e+01 6.020049574273062e+00 1.289106687130388e+01 9.277502977958795e-01 + ME 3.534866312485749e-07 + +Event 132 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.255682887750997e+02 -1.020202862582227e+01 -3.071270560190277e+02 4.263694597869199e+02 + 3 1.822944083831003e+02 -6.223997393813503e+01 7.452404233473399e+01 1.542841666731088e+02 + 4 3.498626937077320e+02 -7.824785520990122e+01 -9.684804908206219e+01 -3.269581517449581e+02 + 5 4.422746091340674e+02 1.506898577738587e+02 3.294510627663557e+02 -2.536954747150707e+02 + ME 1.108594715286765e-07 + +Event 133 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.629662388842297e+02 7.991123416805505e+01 -7.432810167831421e+01 3.461705049890879e+02 + 3 2.519974118268758e+02 4.092829737955621e+01 1.045933848073266e+02 -2.255832305283377e+02 + 4 4.540092238244609e+02 2.067709404411446e+02 -7.816124526092361e+01 -3.965614369124106e+02 + 5 4.310271254644332e+02 -3.276104719887559e+02 4.789596213191120e+01 2.759741624516604e+02 + ME 1.647282378507486e-08 + +Event 134 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.371391815360341e+02 2.182303519531752e+02 2.447820570023349e+02 4.254124567961070e+02 + 3 4.475096572574562e+02 8.761259551627978e+01 -1.064978001639930e+02 -4.257313061143341e+02 + 4 1.024195877641454e+02 3.874643372548357e+01 8.545199625557882e+01 -4.106631426450081e+01 + 5 4.129315734423644e+02 -3.445893811949385e+02 -2.237362530939207e+02 4.138516358272791e+01 + ME 1.830498670006412e-08 + +Event 135 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.611715485115952e+02 1.353574756360551e+02 1.270899083363582e+02 1.836765819053572e+02 + 3 4.982087211139469e+02 3.182740341581292e+02 1.027522253756155e+02 -3.692635226434683e+02 + 4 3.610184850208989e+02 -3.443761350776685e+02 -1.457446762716321e+01 -1.073639092485802e+02 + 5 3.796012453535586e+02 -1.092553747165159e+02 -2.152676660848105e+02 2.929508499866913e+02 + ME 3.450140123709077e-09 + +Event 136 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.165975957141717e+02 4.071301662611800e+02 -7.016168908300483e+01 -5.362762217357892e+01 + 3 5.429674882429235e+02 -4.587193013588839e+02 2.631983131614909e+02 1.229509812835685e+02 + 4 2.969286679985584e+02 3.813185169859018e+01 -7.853062280176133e+01 -2.838054563390252e+02 + 5 2.435062480443467e+02 1.345728339911383e+01 -1.145060012767249e+02 2.144820972290356e+02 + ME 2.237609615783897e-07 + +Event 137 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.164799518089247e+02 4.078481304962669e+02 7.086625433408588e+01 -4.575398022162616e+01 + 3 4.119129224428048e+02 1.032217184413981e+01 -1.307030352153061e+02 3.904899807028328e+02 + 4 4.185485375125854e+02 -3.640780696725425e+02 -1.159009525286994e+02 -1.708713160257731e+02 + 5 2.530585882356847e+02 -5.409223266786426e+01 1.757377334099197e+02 -1.738646844554335e+02 + ME 1.003736429836886e-08 + +Event 138 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.328295202229159e+02 -1.377487194047890e+01 -1.873512771356644e+02 1.375475821157613e+02 + 3 6.673431588212472e+02 -4.246598188414666e+02 4.577416587064386e+02 -2.355493658911680e+02 + 4 4.060704879661816e+02 3.031583118816545e+02 -2.670840197200184e+02 -4.067438437585880e+01 + 5 1.937568329896558e+02 1.352763789002910e+02 -3.306361850755688e+00 1.386761681512658e+02 + ME 2.109910701967184e-08 + +Event 139 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.641866696514709e+02 9.276406442189763e+01 3.425073851357022e+02 2.992537113580343e+02 + 3 4.084681019724289e+02 -1.718164587475395e+02 -6.269563677788108e+01 -3.652321891091058e+02 + 4 3.586483593020715e+02 2.437331083193391e+02 -1.380106438398361e+02 2.239997315310333e+02 + 5 2.686968690740283e+02 -1.646807139936973e+02 -1.418011045179850e+02 -1.580212537799619e+02 + ME 8.055587671756698e-05 + +Event 140 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.077745749323770e+02 -2.717749029281370e+02 -4.488259523209481e+02 -3.067305015739836e+02 + 3 3.836748848621314e+02 3.299395351490868e+02 1.859302801942361e+02 -6.145121094386256e+01 + 4 1.356054338659604e+02 5.736453748498839e+00 -2.020987384238928e+01 1.339682342633558e+02 + 5 3.729451063395316e+02 -6.390108596944862e+01 2.831055459691012e+02 2.342134782544908e+02 + ME 5.338203511033533e-07 + +Event 141 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.541592345202997e+02 5.064743234660293e+01 1.008919682868332e+02 -3.356849888331461e+02 + 3 5.737033413285019e+02 4.649244927868489e+02 -2.879027536526492e+02 1.734726038819985e+02 + 4 2.491572537229339e+02 -2.269136202053799e+02 7.415864097377920e+01 7.134453039277231e+01 + 5 3.229801704282646e+02 -2.886583049280719e+02 1.128521443920367e+02 9.086785455837524e+01 + ME 2.577339743408483e-06 + +Event 142 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.672503466682875e+02 -5.085474185662212e+02 -2.883041300906009e+01 4.310120131554451e+02 + 3 3.301134862993140e+02 3.214141834727917e+02 -2.596291776574526e+01 -7.066656493912240e+01 + 4 4.453287536751283e+02 2.428052104961861e+02 6.644020670411237e+01 -3.673540901349278e+02 + 5 5.730741335727044e+01 -5.567197540275682e+01 -1.164687592930690e+01 7.008641918605131e+00 + ME 1.403944944676275e-06 + +Event 143 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.961372424533693e+02 3.096839815776747e+02 -7.461011777250017e+01 3.803699846588918e+02 + 3 3.532673160900624e+02 -2.702239200247366e+02 1.096988588437250e+02 -1.993564396560228e+02 + 4 2.470296765764948e+02 -1.247422515683724e+02 9.161572144761085e+01 1.925346497822517e+02 + 5 4.035657648800727e+02 8.528219001543417e+01 -1.267044625188357e+02 -3.735481947851208e+02 + ME 2.805529113699061e-08 + +Event 144 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.484370908485413e+02 6.681262790792988e+01 4.372567917003315e+01 2.352554480611282e+02 + 3 1.333566163493899e+02 7.639041904632975e+01 -1.037373442449629e+02 -3.445365599013520e+01 + 4 6.759161690057641e+02 -2.745699937733856e+02 -8.241738839859462e+00 -6.175808123505841e+02 + 5 4.422901237963044e+02 1.313669468191260e+02 6.825340391478922e+01 4.167790202795912e+02 + ME 2.974748028483134e-07 + +Event 145 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.699419653731484e+02 -1.778511711731030e+02 -1.995508520752477e+02 3.764416313210162e+01 + 3 5.364082066653292e+02 -3.670657833361444e+02 9.343822714167079e+01 -3.798233439249868e+02 + 4 4.985199767048502e+02 3.642791687227051e+02 3.239621342782176e+01 3.387821420382697e+02 + 5 1.951298512566720e+02 1.806377857865423e+02 7.371641150575515e+01 3.397038754615279e+00 + ME 2.381985188899164e-08 + +Event 146 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.202675651747352e+02 -2.044738957939417e+02 6.060766212155786e+01 -5.509026682648763e+01 + 3 3.666300263497007e+02 1.440597763151976e+02 1.820522147186126e+02 -2.837628379214685e+02 + 4 2.848419345521625e+02 -2.522934903196281e+02 1.041889412010834e+02 -8.140999295636462e+01 + 5 6.282604739234017e+02 3.127076097983722e+02 -3.468488180412538e+02 4.202630977043208e+02 + ME 8.609187062299590e-09 + +Event 147 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.466917873161715e+02 -8.985124093282326e+01 1.062886307955967e+02 -4.634611021911086e+01 + 3 5.083338423321478e+02 -4.344326257841563e+02 1.725039954100384e+02 1.997847854117565e+02 + 4 1.758983079855465e+02 -2.529732669417202e+01 1.025981972445037e+02 -1.406195930035513e+02 + 5 6.690760623661345e+02 5.495811934111518e+02 -3.813908234501387e+02 -1.281908218909440e+01 + ME 1.307487794043808e-07 + +Event 148 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.170646172696436e+02 2.327689577119410e+02 -1.156815006470080e+02 -1.815664458486164e+02 + 3 3.480509574692189e+02 -2.600917732635422e+02 2.279827485885899e+02 3.893076960269328e+01 + 4 4.899885869304758e+02 -6.865708088891665e+01 -4.361073402046576e+02 2.125685968941702e+02 + 5 3.448958383306618e+02 9.597989644051779e+01 3.238060922630758e+02 -6.993292064824709e+01 + ME 3.278552965558282e-09 + +Event 149 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.565332013646126e+02 1.739097965881146e+01 1.427314035696600e+02 6.187037571403594e+01 + 3 1.287425867544281e+02 -3.692794701983710e+01 1.058940407929810e+02 6.322525205688030e+01 + 4 6.163211995179093e+02 3.680162870870676e+02 -3.480595054229867e+02 3.510988665583383e+02 + 5 5.984030123630491e+02 -3.484793197260416e+02 9.943406106034590e+01 -4.761944943292547e+02 + ME 9.540186842422195e-06 + +Event 150 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.336561333256779e+02 1.834876654089863e+02 -2.602841456593764e+01 -1.423024487443928e+02 + 3 1.741966417859597e+02 -7.277820045868700e+01 4.362439920231238e+01 -1.521338730912299e+02 + 4 6.077110042555056e+02 2.904143808356974e+02 1.411750271757576e+02 5.148220700387444e+02 + 5 4.844362206328570e+02 -4.011238457859966e+02 -1.587710118121321e+02 -2.203857482031216e+02 + ME 1.004960220938178e-07 + +Event 151 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.211746741680918e+02 -1.040856261513666e+02 -3.937271548256160e+01 -4.795073893018128e+01 + 3 2.923110311840379e+02 1.033353099237875e+01 -2.569705782408390e+02 -1.389427184406362e+02 + 4 6.933360159289847e+02 4.046737014260277e+02 5.364619473139211e+02 1.707706223054521e+02 + 5 3.931782787188853e+02 -3.109216062670399e+02 -2.401186535905205e+02 1.612283506536545e+01 + ME 6.201786615493041e-08 + +Event 152 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.221790270328912e+02 -1.025810599253255e+02 -2.803205211746587e+02 -1.212305943762748e+02 + 3 2.743866059556541e+02 -1.673110927218417e+02 2.121850586617832e+02 4.767083658571896e+01 + 4 5.652268340158242e+02 5.594619569444934e+02 -7.688643394315451e+01 -2.392005223436808e+01 + 5 3.382075329956306e+02 -2.895698042973262e+02 1.450218964560301e+02 9.747981002492389e+01 + ME 1.616361948953723e-08 + +Event 153 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.181242749149867e+02 -1.496553803635585e+02 3.218925844259839e+02 2.209442022162673e+02 + 3 2.742594598422451e+02 -1.018045508856852e+02 -1.318386065039126e+02 2.178822309575300e+02 + 4 3.466792897228672e+02 -1.619951176147566e+02 -1.965669238598627e+02 -2.351713337888010e+02 + 5 4.609369755199014e+02 4.134550488640003e+02 6.512945937791494e+00 -2.036550993849962e+02 + ME 6.745548566446043e-09 + +Event 154 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.415097258757403e+02 -2.050410225971519e+02 -1.222122769468913e+02 3.673263002217227e+01 + 3 2.736230574879776e+02 -2.193782751409555e+02 1.166795472694783e+02 1.145802480108935e+02 + 4 4.673057057314866e+02 1.745358467961844e+01 1.069490661195013e+02 -4.545678081949939e+02 + 5 5.175615109047961e+02 4.069657130584893e+02 -1.014163364420884e+02 3.032549301619280e+02 + ME 1.116641797231273e-07 + +Event 155 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.774233833471055e+02 -3.813733771182957e+02 -7.748207752183868e+01 2.765573391810157e+02 + 3 2.785548789953623e+02 5.565153575418104e+01 1.962114983217826e+02 -1.897281610795908e+02 + 4 3.469368907421938e+02 -2.485484467451775e+00 -3.410354529311985e+02 -6.366983876872375e+01 + 5 3.970848469153381e+02 3.282073258315664e+02 2.223060321312546e+02 -2.315933933270110e+01 + ME 2.731885210606192e-09 + +Event 156 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.830763202836453e+02 1.670390722374144e+02 -4.839353367414558e+02 2.790744228239374e+02 + 3 8.372937424277062e+01 -2.206118779177231e+01 -7.862990681346045e+01 1.847294938034042e+01 + 4 6.517262335322765e+02 -1.517360023471754e+02 4.537037704279378e+02 -4.425789847759814e+02 + 5 1.814680719413077e+02 6.758117901533359e+00 1.088614731269784e+02 1.450316125717036e+02 + ME 2.057611047580263e-06 + +Event 157 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.221466021800015e+02 1.004197184024976e+02 -1.831200458211014e+01 -1.973060148709808e+02 + 3 1.952944116425906e+02 5.947164367963718e+01 -1.637405152185915e+02 8.827272791082248e+01 + 4 5.043036849209497e+02 1.030300241331701e+02 2.995278680472508e+02 -3.924156941497569e+02 + 5 5.782553012564587e+02 -2.629213862153049e+02 -1.174753482465492e+02 5.014489811099153e+02 + ME 8.223265917270228e-08 + +Event 158 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.014796349232533e+02 6.324463617576037e+01 -5.143472614980268e+01 2.902491261215933e+02 + 3 5.569806323774449e+02 -2.837656127180183e+01 -3.396072279214705e+02 -4.405554747786710e+02 + 4 2.957632477700600e+02 2.349299171863052e+01 2.481969354528773e+02 -1.591296933428909e+02 + 5 3.457764849292423e+02 -5.836106662258913e+01 1.428450186183959e+02 3.094360419999686e+02 + ME 2.107441919556085e-08 + +Event 159 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.591538548774633e+02 -2.182240714207248e+02 -4.209612865776884e+01 -1.332925020488409e+02 + 3 6.478059984032091e+02 2.970279686703717e+02 4.046570960198610e+02 4.094870352471543e+02 + 4 2.116191389359584e+02 9.445193097144920e+01 -1.887137862457113e+02 1.576704095793058e+01 + 5 3.814210077833694e+02 -1.732558282210961e+02 -1.738471811163809e+02 -2.919615741562434e+02 + ME 1.306282576836063e-04 + +Event 160 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.355516328348965e+02 4.598601326351699e+02 1.086179643103352e+02 -2.520840091595789e+02 + 3 1.250913851056828e+02 2.412231230375017e+01 9.532685281942429e+01 -7.732244052228562e+01 + 4 1.403519283462577e+02 1.060977550664594e+02 6.322679457710809e+01 6.666560288390728e+01 + 5 6.990050537131626e+02 -5.900802000053793e+02 -2.671716117068678e+02 2.627408467979570e+02 + ME 1.451603428379081e-06 + +Event 161 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.037519486668242e+02 -4.556894118761883e+02 -3.789671218007896e+02 1.150977672109518e+02 + 3 1.320163331334137e+02 -1.009130349982057e+02 -4.400086191303104e+01 7.286148318799009e+01 + 4 4.535812871805164e+02 3.214261890918494e+02 2.240876447507702e+02 -2.284861407531699e+02 + 5 3.106504310192462e+02 2.351762577825446e+02 1.988803389630506e+02 4.052689035422793e+01 + ME 1.159331854997693e-06 + +Event 162 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.806951845247628e+02 2.263617881792713e+02 1.983837182497826e+02 -2.330945402750066e+02 + 3 6.226282282350211e+02 -5.665599382822433e+02 -1.169170394997212e+02 2.302306513115116e+02 + 4 1.991674245974932e+02 8.131880151281558e+01 -1.065651751520856e+02 1.473050541771148e+02 + 5 2.975091626427234e+02 2.588793485901565e+02 2.509849640202417e+01 -1.444411652136198e+02 + ME 1.315395566850940e-05 + +Event 163 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.775491654024494e+02 -2.389339247301170e+02 -3.569712417423736e+01 -2.901373247874839e+02 + 3 4.057858154423257e+02 1.211038531074871e+02 -1.075956188633677e+02 3.720472652474713e+02 + 4 3.781881739343797e+02 -1.691066352891619e+02 3.211864194868994e+02 -1.061533077307745e+02 + 5 3.384768452208452e+02 2.869367069117919e+02 -1.778936764492943e+02 2.424336727078715e+01 + ME 8.718978226107064e-09 + +Event 164 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.565339415542259e+02 -2.071226667867270e+02 -3.991710195847456e+02 7.865073310444370e+01 + 3 1.850572037534592e+02 -1.814377768563993e+02 3.634341818882844e+01 2.378601439647877e+00 + 4 1.921815529404395e+02 -8.912051195266237e+01 -2.935060714794936e+01 1.677194845566282e+02 + 5 6.662273017518758e+02 4.776809555957888e+02 3.921782085438665e+02 -2.487488191007194e+02 + ME 1.119182047356598e-07 + +Event 165 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.608706475726781e+02 -7.352587451384150e+01 2.926483329335021e+01 1.400602747381999e+02 + 3 4.368533973739730e+02 5.240491187105322e+01 3.687621041233546e+02 2.282742354526359e+02 + 4 6.868232300507626e+02 -1.068225318099977e+02 -4.089841618100871e+02 -5.413382042896707e+02 + 5 2.154527250025866e+02 1.279434944527859e+02 1.095722439338239e+01 1.730036940988348e+02 + ME 3.980947278072763e-07 + +Event 166 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.403514225384915e+02 -4.364754696013562e+02 2.109194731869347e+00 5.825882821969265e+01 + 3 1.069411967678109e+02 -8.113600881769634e+01 2.298926129200184e+01 6.576367921972140e+01 + 4 6.275848674095951e+02 5.117980899513774e+02 2.830058390250812e+02 -2.276690053594266e+02 + 5 3.251225132841022e+02 5.813388467675107e+00 -3.081042950489525e+02 1.036464979200126e+02 + ME 2.783827794882275e-07 + +Event 167 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.918955211023957e+02 -1.623891733199484e+02 -1.011860556445403e+02 -1.466388593530866e+01 + 3 1.871901284559375e+02 -7.878242912860118e+01 -1.694437551331696e+02 -1.105834066746689e+01 + 4 6.102188811441905e+02 -1.343591330747665e+02 5.476768981515615e+02 2.331624358582424e+02 + 5 5.106954692974762e+02 3.755307355233163e+02 -2.770470873738516e+02 -2.074402092554668e+02 + ME 2.568786304957170e-07 + +Event 168 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.216787680814040e+02 -1.189606477208518e+02 1.547783496418446e+02 1.050404826439369e+02 + 3 5.126462182586652e+02 -1.590819643619216e+02 4.209999834531878e+02 2.454752281638187e+02 + 4 4.272224542767366e+02 7.779140932193576e+01 -3.932611112348421e+02 -1.476929939580155e+02 + 5 3.384525593831932e+02 2.002512027608387e+02 -1.825172218601902e+02 -2.028227168497397e+02 + ME 7.118190055179377e-06 + +Event 169 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.698429879806195e+02 1.455074202745656e+02 2.183111666053455e+01 -4.462100697484893e+02 + 3 6.804356369583268e+02 -3.541873855898968e+02 2.380635543828889e+01 5.804973810213299e+02 + 4 2.494072380391389e+02 2.129062287565783e+02 5.332877252319552e+01 -1.184523117720060e+02 + 5 1.003141370219151e+02 -4.226263441246941e+00 -9.896624462201898e+01 -1.583499950083472e+01 + ME 4.923593830667450e-07 + +Event 170 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.947525114000201e+02 -2.120980687331741e+02 -5.339573876161244e+02 1.537350554247554e+02 + 3 5.304186438182742e+02 9.762854658278449e+01 4.210999845330489e+02 -3.073880408025275e+02 + 4 2.725467755647546e+02 1.192808703849826e+02 2.108782617781282e+02 1.248366033676855e+02 + 5 1.022820692169514e+02 -4.811348234593063e+00 -9.802085869505262e+01 2.881638201008671e+01 + ME 3.549586033645725e-08 + +Event 171 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.224797308226666e+02 -5.375302845466814e+02 -1.836636776324525e+01 3.133765865782073e+02 + 3 4.124091288166617e+02 2.382619823047310e+02 3.210619006365504e+01 -3.350846309205101e+02 + 4 1.838688075380517e+02 8.727789435881400e+01 1.413249053618683e+02 -7.885162437271515e+01 + 5 2.812423328226196e+02 2.119904078831364e+02 -1.550647276622782e+02 1.005596687150179e+02 + ME 4.002848397017290e-08 + +Event 172 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.024481242448970e+02 1.796358471701274e+01 -1.746853017443778e+02 1.007352867115970e+02 + 3 5.859822858732682e+02 -2.176592218037537e+01 3.060477525768988e+02 4.992356729356663e+02 + 4 6.608756657583934e+02 2.436588734248681e+01 -1.382800479300340e+02 -6.457875637313563e+02 + 5 5.069392412344163e+01 -2.056354987912417e+01 6.917597097512810e+00 4.581660408409283e+01 + ME 1.978331600650350e-05 + +Event 173 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.801691995127821e+02 -4.215202314930911e+02 3.958855854346895e+02 -4.681450363238425e+01 + 3 2.617744476703428e+02 1.599633143319359e+02 -6.847827136272014e+01 -1.955717921179559e+02 + 4 2.895562615833316e+02 -6.776676019363940e+01 -1.625404652143167e+02 2.298501511917842e+02 + 5 3.685000912335436e+02 3.293236773547946e+02 -1.648668488576527e+02 1.253614455855600e+01 + ME 1.886964479653412e-08 + +Event 174 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.432224768586807e+02 2.123358321375092e+02 -9.137617595590741e+01 2.537036804604029e+02 + 3 2.662389127170578e+02 5.658820252344633e+01 1.140858201862947e+02 2.338062437411519e+02 + 4 6.440666757949747e+02 -7.559162042568610e+01 -7.005998003003262e+00 -6.395769740875527e+02 + 5 2.464719346292862e+02 -1.933324142352695e+02 -1.570364622738393e+01 1.520670498859976e+02 + ME 1.518314575518000e-06 + +Event 175 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.700131770443522e+02 1.537969471106571e+02 -2.117531928678224e+02 -6.643944722308593e+01 + 3 4.962752034245967e+02 2.128838609308023e+02 -7.929139726182322e+01 4.412283010070720e+02 + 4 2.542695012796545e+02 6.381377149808605e+00 2.420365821040695e+02 -7.765661742605157e+01 + 5 4.794421182513969e+02 -3.730621851912680e+02 4.900800802557612e+01 -2.971322363579346e+02 + ME 1.170781939807770e-08 + +Event 176 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.595250760942820e+02 -3.781994799062178e+02 -1.953391788690975e+02 -3.631474485325830e+02 + 3 2.822193451057852e+02 2.531285812406774e+02 1.162602688787051e+02 -4.535669731441308e+01 + 4 3.615103193569824e+02 1.649061800696572e+00 -1.746256934103365e+02 3.165325556680135e+02 + 5 2.967452594429505e+02 1.234218368648438e+02 2.537046034007288e+02 9.197159017898271e+01 + ME 7.789186697022053e-08 + +Event 177 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.396956142606758e+02 -4.105423218103476e+01 1.309817345502700e+02 2.594609561949185e+01 + 3 5.462636835449132e+02 1.226445420924370e+02 -2.117083223539773e+02 -4.884075291199530e+02 + 4 5.587261113115391e+02 1.501945737199239e+02 1.776131549773776e+02 5.080059297541580e+02 + 5 2.553145908828726e+02 -2.317848836313263e+02 -9.688656717367031e+01 -4.554449625369679e+01 + ME 2.723404047682859e-08 + +Event 178 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.088496927414228e+02 -1.341610898283948e+02 -9.277802989315117e+01 3.749014675884302e+02 + 3 3.588364211022617e+02 3.077768962673020e+02 -8.016131802617929e+01 -1.661659481538016e+02 + 4 4.878368684282138e+02 -9.295843092916139e+01 3.953926925341255e+02 -2.702002202213190e+02 + 5 2.444770177281010e+02 -8.065737550974565e+01 -2.224533446147950e+02 6.146470078669019e+01 + ME 3.767636900015962e-09 + +Event 179 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.795210385243067e+02 4.384022819240558e+02 2.074574650990888e+02 -4.759345345481806e+02 + 3 4.130397129911727e+02 -1.166933801910930e+02 -8.188519392843645e+01 3.876587088441452e+02 + 4 1.323830995986130e+02 -9.020264614934970e+01 2.283949186981634e+01 9.416541455396502e+01 + 5 2.750561488859078e+02 -2.315062555836131e+02 -1.484117630404687e+02 -5.889588849929628e+00 + ME 3.571860673344391e-07 + +Event 180 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.390143503225903e+02 4.332330366673434e+02 3.187886675509226e+02 -3.491978285705228e+01 + 3 2.121543783556901e+02 -1.539133636629621e+02 -6.982443694241506e+01 -1.282369086773257e+02 + 4 3.525195899359830e+02 3.116523503389995e+01 -3.453504862598982e+02 -6.349670112665113e+01 + 5 3.963116813857368e+02 -3.104849080382812e+02 9.638625565139060e+01 2.266533926610290e+02 + ME 3.060789343119622e-09 + +Event 181 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.871910159031972e+02 -2.482278605801524e+02 -4.059757113335108e+02 1.045071146661306e+02 + 3 3.939631927235097e+02 3.843058254746378e+02 -6.751539482803383e+01 -5.438475143248532e+01 + 4 1.320318755627034e+02 1.173355086182816e+02 5.989553638691457e+01 -8.793139531371159e+00 + 5 4.868139158105890e+02 -2.534134735127669e+02 4.135955697746300e+02 -4.132922370227404e+01 + ME 3.492967151344021e-08 + +Event 182 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.634643361350387e+02 6.329356748624841e+01 1.470860510178148e+02 -3.286650420895970e+01 + 3 5.024217881602812e+02 -4.023414251461456e+02 -1.657157218704940e+02 2.511719139443817e+02 + 4 3.341400639218185e+02 -1.066841963158695e+01 3.309585949660332e+02 -4.474567642073586e+01 + 5 4.999738117828613e+02 3.497162772914842e+02 -3.123289241133534e+02 -1.735597333146860e+02 + ME 8.632936534855090e-09 + +Event 183 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.995054708334443e+02 -8.618442988121295e+01 -1.317716324156771e+02 -4.740402897740854e+02 + 3 3.459503058168963e+02 2.817467670894948e+02 -1.997611117656004e+02 1.989652119324885e+01 + 4 9.946167962959554e+01 4.869462143288413e+01 -5.138636892793453e+00 8.657397974641351e+01 + 5 5.550825437200641e+02 -2.442569586411661e+02 3.366713810740709e+02 3.675697888344230e+02 + ME 7.044690259607796e-07 + +Event 184 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.245304000524383e+02 -3.884223434549886e+02 -1.908539669459333e+02 2.963696795981437e+02 + 3 2.116914247222055e+02 -1.518308824598570e+02 -9.307419176861660e+01 1.144457830546720e+02 + 4 1.497828062091507e+02 5.152418898782464e+01 3.289577420345211e+01 -1.367406853302645e+02 + 5 6.139953690162062e+02 4.887290369270209e+02 2.510323845110977e+02 -2.740747773225512e+02 + ME 6.178399840070216e-03 + +Event 185 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.823567631295894e+02 -3.287439770113579e+02 -1.408601587358858e+02 -1.352128232476263e+02 + 3 2.729601432779185e+02 1.050401758721174e+02 1.518250728524651e+02 2.010545909060524e+02 + 4 4.415844326987421e+02 1.841356276793078e+02 -4.001213558867116e+02 3.152431417805641e+01 + 5 4.030986608937497e+02 3.956817345993269e+01 3.891564417701323e+02 -9.736608183648252e+01 + ME 2.803519234876577e-09 + +Event 186 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.441943751899475e+02 -3.172061664525858e+01 -2.165035809528646e+02 -1.084015442170439e+02 + 3 1.531216649467747e+02 -1.072415316939106e+02 -6.400357868200578e+01 -8.859480838013376e+01 + 4 6.690842740855512e+02 -1.683192937014951e+02 5.498056012764862e+02 3.421347424647482e+02 + 5 4.335996857777275e+02 3.072814420406643e+02 -2.692984416416161e+02 -1.451383898675707e+02 + ME 1.942296364573588e-07 + +Event 187 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.527752494388038e+02 -4.473442706504161e+02 6.157878466879122e+01 -3.311469914302317e+01 + 3 4.846819923263977e+02 1.808338503617970e+02 -3.063074014757465e+02 3.292286865538744e+02 + 4 4.767615702494118e+02 2.297431564813572e+02 3.180144106698234e+02 -2.708994491005698e+02 + 5 8.578118798538658e+01 3.676726380726194e+01 -7.328579386286808e+01 -2.521453831028136e+01 + ME 2.286823294465450e-07 + +Event 188 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.763744608693619e+02 1.879714650814332e+02 1.531545296300208e+02 -1.326395905820623e+02 + 3 1.675411521312716e+02 -1.163100541390447e+02 6.574161087985154e+00 -1.204109188140162e+02 + 4 6.612223670090391e+02 1.024684272345772e+02 -3.695690310853153e+02 5.386408555946807e+02 + 5 3.948620199903277e+02 -1.741298381769656e+02 2.098403403673094e+02 -2.855903461986023e+02 + ME 2.437697639939641e-07 + +Event 189 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.783469474210135e+02 -8.658737187334033e+01 1.356909096492871e+02 4.504513360815114e+02 + 3 4.456648861487533e+01 -2.142659180653916e+01 -3.868877590386525e+01 -5.500153641150114e+00 + 4 7.225573371875216e+02 1.692206577779366e+02 -1.495772879551334e+02 -6.863527587419686e+02 + 5 2.545292267765902e+02 -6.120669409805750e+01 5.257515420971166e+01 2.414015763016073e+02 + ME 4.036282675949279e-05 + +Event 190 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.849447494768666e+02 4.417222124371036e+02 3.063930417948521e+02 -2.305756945558716e+02 + 3 8.747756552706325e+01 -7.131945592982620e+01 5.022797529361166e+01 -6.558214263010734e+00 + 4 6.441296778117606e+02 -3.837545514381532e+02 -5.018072724050934e+02 1.257972473854055e+02 + 5 1.834480071843091e+02 1.335179493087578e+01 1.451862553166296e+02 1.113366614334768e+02 + ME 6.370683171609409e-08 + +Event 191 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.324822165476273e+02 -6.253195280175738e+02 7.607762994717295e+01 -5.675769860115388e+01 + 3 9.968007454278923e+01 -5.919441699588452e+01 6.439562903151095e+01 4.780524258916985e+01 + 4 5.616099301916483e+01 -9.982478114887614e+00 1.074288744286907e+00 -5.525625006529460e+01 + 5 7.116767158904186e+02 6.944964231283459e+02 -1.415475477229708e+02 6.420870607727863e+01 + ME 1.892760946430744e-05 + +Event 192 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.369395837007370e+02 -4.355765469733416e+00 2.422016200467210e+02 -3.636421350153062e+02 + 3 3.489363876291521e+02 2.257513727555905e+02 -9.443187595205355e+01 -2.487479469559987e+02 + 4 1.988200442993520e+02 -6.004084227260260e+01 -1.441955006989126e+02 1.230128645816471e+02 + 5 5.153039843707585e+02 -1.613547650132545e+02 -3.574243395754773e+00 4.893772173896577e+02 + ME 2.426855843003512e-07 + +Event 193 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.952170711629282e+02 -2.448161671907030e+02 6.058136449560859e+01 -1.534537769620589e+02 + 3 4.390044396065631e+02 -3.923286441491611e+02 -3.710622564906001e+01 -1.934586803233042e+02 + 4 4.491243422525343e+02 3.349194872100994e+02 5.492135841287631e+01 2.941517572287816e+02 + 5 3.166541469779751e+02 3.022253241297649e+02 -7.839649725942489e+01 5.276070005658150e+01 + ME 2.285120117479005e-06 + +Event 194 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.033148328845123e+02 3.807229676197025e+02 4.722829680298756e+01 -1.244281492773959e+02 + 3 3.402574757440810e+02 -4.112898360893270e+01 3.368414662709728e+02 -2.492755718980822e+01 + 4 3.318299773052009e+02 6.453189644180644e+01 -3.237215919515892e+02 3.392785115982090e+01 + 5 4.245977140662053e+02 -4.041258804525762e+02 -6.034817112237118e+01 1.154278553073832e+02 + ME 2.538255298147542e-09 + +Event 195 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.009160799820447e+02 1.127718590509784e+02 2.578905406128325e+02 1.064211635924338e+02 + 3 5.195297064167323e+02 3.024829678234382e+02 7.496264536843978e+01 -4.156871080819640e+02 + 4 2.228454712975530e+02 -1.162059794317317e+02 -1.900820329549402e+02 -5.009507945643892e+00 + 5 4.567087423036699e+02 -2.990488474426849e+02 -1.427711530263320e+02 3.142754524351741e+02 + ME 9.941318343264585e-09 + +Event 196 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.865816169777639e+02 -2.082718992755388e+02 -1.168755264994778e+02 3.039872922718519e+02 + 3 4.950634710774064e+02 4.481345969831610e+02 -1.338922043908974e+00 2.103840076377247e+02 + 4 5.009936462013424e+02 -2.363057974813166e+02 2.672200856348095e+01 -4.409536686196952e+02 + 5 1.173612657434876e+02 -3.556900226305540e+00 9.149243997990575e+01 -7.341763128988138e+01 + ME 9.913397566942690e-08 + +Event 197 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.200952246637107e+01 -4.092854273592183e+01 4.451595293266989e+01 1.372462023217837e+01 + 3 2.631639131516305e+02 1.236751000292302e+02 -2.240103694280010e+02 6.147413445319324e+01 + 4 4.924430755200161e+02 6.566832142306471e+01 -3.082242226360131e+02 3.783988408670338e+02 + 5 6.823834888619823e+02 -1.484148787163730e+02 4.877186391313444e+02 -4.535975955524060e+02 + ME 1.851175943167253e-06 + +Event 198 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.104475683108871e+02 -1.076092727069166e+02 -1.243307094385729e+01 2.154828346252987e+01 + 3 4.258110791144970e+02 -1.061255031183438e+02 3.244981883629734e+02 2.544668513454731e+02 + 4 5.489837505506223e+02 -1.103287384131403e+02 -5.228663656420100e+02 -1.257835105612362e+02 + 5 4.147576020239941e+02 3.240635142384003e+02 2.108012482228937e+02 -1.502316242467666e+02 + ME 1.495493137410727e-08 + +Event 199 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.945214729162650e+02 3.938714004469920e+02 1.610598617964415e+01 1.590942208647369e+01 + 3 4.307182563216121e+02 5.676770947025452e+01 3.019258642913346e+02 -3.018880851609781e+02 + 4 6.132249141587980e+02 -4.789484991716053e+02 -3.037239430541912e+02 2.332485732045241e+02 + 5 6.153535660332509e+01 2.830938925435878e+01 -1.430790741678791e+01 5.273008986998035e+01 + ME 3.304935820785736e-07 + +Event 200 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.680965384249502e+02 -4.164985458027556e+00 3.568534147325900e+02 -9.018511457139306e+01 + 3 1.116595944155914e+02 -3.841516463813660e+01 1.308374745062447e+01 1.040238227692460e+02 + 4 5.078831428275766e+02 -3.645818734439147e+02 -2.334033354278477e+02 2.656091627480076e+02 + 5 5.123607243318818e+02 4.071620235400788e+02 -1.365338267553666e+02 -2.794478709458606e+02 + ME 2.382434492971968e-07 + +Event 201 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.403128193251626e+02 1.213134048128906e+02 -5.665569190553462e+01 4.196281275587442e+01 + 3 5.694904595392484e+02 2.782425801842745e+02 1.994110039347696e+02 4.551216338390752e+02 + 4 4.865766137247841e+02 -3.320140599055400e+02 -2.710610759019412e+02 -2.303244628340644e+02 + 5 3.036201074108052e+02 -6.754192509162502e+01 1.283057638727062e+02 -2.667599837608849e+02 + ME 1.150542970280877e-07 + +Event 202 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.648494953542231e+02 1.475915136963884e+02 -2.626638545079028e+02 -2.057658836641568e+02 + 3 4.772142399752358e+02 -2.858814296920361e+02 -2.698032465892514e+02 2.705761392330797e+02 + 4 3.044384819161786e+02 -9.936314325722023e+01 2.866772864774832e+02 2.501776271730772e+01 + 5 3.534977827543630e+02 2.376530592528679e+02 2.457898146196709e+02 -8.982801828623059e+01 + ME 5.555671989034623e-09 + +Event 203 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.932094880517371e+01 1.034008155560684e+01 3.499022683723037e+01 1.465959597811796e+01 + 3 2.173576252233972e+02 7.202316342302500e+01 2.050015172626940e+02 -5.601704498491760e+00 + 4 5.734773652773411e+02 -2.838136097561228e+02 1.954238788160291e+02 4.584055311524263e+02 + 5 6.698440606940878e+02 2.014503647774911e+02 -4.354156229159533e+02 -4.674634226320525e+02 + ME 1.791563677470585e-04 + +Event 204 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.908212834725718e+02 2.977981722293325e+02 4.775358544068218e+02 -1.798486735480492e+02 + 3 4.393058230892194e+02 -4.077733598319210e+02 -1.229004842814027e+02 -1.077309805714205e+02 + 4 7.659681746343537e+01 2.011886749910355e+01 -6.038949216792007e+01 4.260766189056932e+01 + 5 3.932760759747737e+02 8.985632010348476e+01 -2.942458779574990e+02 2.449719922289005e+02 + ME 7.449435640957399e-06 + +Event 205 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.981880635358695e+02 2.184458843478823e+02 1.617999572875588e+02 2.909568754569333e+02 + 3 3.216615163919838e+02 -4.871917465073481e+01 3.144534008054084e+02 -4.702799029147248e+01 + 4 1.852586967674288e+02 1.516243001875516e+02 5.093442076970067e+00 -1.063245652161804e+02 + 5 5.948917233047191e+02 -3.213510098846994e+02 -4.813468001699367e+02 -1.376043199492804e+02 + ME 7.747079346841243e-09 + +Event 206 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.823899014055036e+02 1.390835876764512e+01 3.318403571700483e+01 1.788056304052877e+02 + 3 4.881690514074010e+02 5.489817729671770e+01 -2.514792759478631e+02 -4.147931853951296e+02 + 4 5.532771902400449e+02 -1.644494445187262e+02 1.888131751045239e+02 4.933777602855134e+02 + 5 2.761638569470506e+02 9.564290845436338e+01 2.948206512633433e+01 -2.573902052956715e+02 + ME 1.173442887132916e-06 + +Event 207 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.938861958251189e+02 2.992968080115895e+02 -3.402144065306870e+02 1.964666707857949e+02 + 3 3.044454630324485e+02 -3.028110458731305e+02 -2.191514037003857e+01 2.263265518723672e+01 + 4 2.202180359402748e+02 -1.939237559167997e+02 -5.680289179173080e+01 -8.753851568658551e+01 + 5 4.814503052021581e+02 1.974379937783406e+02 4.189324386924565e+02 -1.315608102864461e+02 + ME 1.317461659771817e-08 + +Event 208 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.898839499787492e+02 2.406651709414215e+01 -5.533524123801429e+01 2.835339808336385e+02 + 3 2.168122352910970e+02 1.569806903165401e+02 -1.452119627527829e+02 3.575044213920987e+01 + 4 3.762784182507863e+02 3.600471233079040e+02 -8.530266455519369e+00 -1.089896857194042e+02 + 5 6.170253964793670e+02 -5.410943307185862e+02 2.090774704463165e+02 -2.102947372534441e+02 + ME 1.861722657203564e-08 + +Event 209 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.204279908517810e+02 -2.514114625724550e+02 2.338847634961811e+01 1.972798848908106e+02 + 3 4.146640535559625e+02 1.131670399568331e+02 -3.642791244988921e+02 -1.626044828200972e+02 + 4 3.813647803536319e+02 -7.443149120704009e+00 1.658934600489188e+02 -3.433118919267706e+02 + 5 3.835431752386247e+02 1.456875717363259e+02 1.749971881003552e+02 3.086364898560572e+02 + ME 1.150503000707694e-08 + +Event 210 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.750782658901178e+02 6.150161642286470e+01 3.397425940367913e+02 1.465476936620454e+02 + 3 3.753847414636021e+02 3.522640303812288e+01 2.877708085052045e+02 2.384549568051627e+02 + 4 3.679623986676975e+01 -1.418616000697859e+01 -1.464605117059102e+01 -3.063020270415600e+01 + 5 7.127407527795107e+02 -8.254185945400904e+01 -6.128673513714049e+02 -3.543724477630520e+02 + ME 2.348655207677071e-04 + +Event 211 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.755660145440862e+02 -2.198570660497881e+01 3.262914547838685e+01 1.711005348715321e+02 + 3 3.842357993703558e+02 -1.193495468980239e+02 2.697221007833122e+02 2.462576364745863e+02 + 4 3.193436063508752e+02 3.079641211241163e+02 6.340526995545158e+01 5.584094160479156e+01 + 5 6.208545797346827e+02 -1.666288676211136e+02 -3.657565162171507e+02 -4.731991129509098e+02 + ME 1.854083049041212e-07 + +Event 212 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.286124870619989e+02 1.947671256067593e+02 2.039384905960800e+02 1.687039581318287e+02 + 3 2.534140104196739e+02 -1.089594202454936e+02 2.209716328642431e+02 5.931309202915249e+01 + 4 6.082520999117173e+02 1.448363181074745e+02 -4.014492274390982e+02 -4.333954035204289e+02 + 5 3.097214026066098e+02 -2.306440234687402e+02 -2.346089602122494e+01 2.053783533594477e+02 + ME 1.922370423888014e-08 + +Event 213 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.669993751556151e+02 -4.598496409826350e+02 -7.229659848051253e+01 3.237279737111812e+02 + 3 2.092334596630099e+02 2.048758411569909e+02 -3.638525763691983e+01 2.192358044350438e+01 + 4 4.459773655818120e+02 -9.956047386297783e+00 1.351965327017321e+02 -4.248747877636002e+02 + 5 2.777897995995633e+02 2.649298472119419e+02 -2.651467658429977e+01 7.922323360891461e+01 + ME 4.929779471520637e-08 + +Event 214 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.625339438015197e+02 3.062049422550726e+01 -5.616013724447026e+01 1.494178945298839e+02 + 3 5.337445472246160e+02 -5.164508962454078e+02 9.025334708476193e+01 1.000802018349427e+02 + 4 1.876106068022419e+02 -1.103443290851433e+02 7.041196210723921e+01 -1.344024717617341e+02 + 5 6.161109021716221e+02 5.961747311050440e+02 -1.045051719475309e+02 -1.150956246030925e+02 + ME 1.813529992150463e-08 + +Event 215 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.723879972712585e+02 2.234999350439466e+01 5.681683787000765e+02 6.567488603630498e+01 + 3 5.480386719020227e+02 2.169918591497192e+02 -4.867917566707426e+02 1.276507132776535e+02 + 4 1.691288617700993e+02 -6.631329221231212e+01 -1.308191347758221e+02 -8.422275901512094e+01 + 5 2.104444690566196e+02 -1.730285604418016e+02 4.944251274648834e+01 -1.091028402988376e+02 + ME 5.373075871099232e-08 + +Event 216 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.029822916324049e+02 2.312736480112502e+01 9.957621754525783e+01 -1.245207960932006e+01 + 3 5.228603101684611e+02 -4.839212819316630e+02 1.358805374086467e+02 -1.440124175083948e+02 + 4 6.978795308799915e+02 5.680185838524440e+02 -2.867570723039521e+02 2.866375926203802e+02 + 5 1.762778673191431e+02 -1.072246667219058e+02 5.130031735004759e+01 -1.301730955026653e+02 + ME 4.358550014220270e-05 + +Event 217 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.167243056528579e+02 1.524729497764623e+02 -3.092700529235155e+02 2.340153432427175e+02 + 3 2.420772334393019e+02 1.940876116374085e+02 1.438364686179607e+02 1.557100684050790e+01 + 4 2.560961474686904e+02 1.653992903559016e+02 -1.049098293922634e+02 -1.649916337120025e+02 + 5 5.851023134391495e+02 -5.119598517697725e+02 2.703434136978181e+02 -8.459471637122287e+01 + ME 4.729279843215788e-09 + +Event 218 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.191584476049009e+02 -2.558241509232277e+01 5.053737346676259e+02 1.160535310349098e+02 + 3 4.811621620037556e+02 2.736858157273282e+02 -3.947269007435494e+02 2.835091256357403e+01 + 4 3.658297349903177e+02 -3.118098839557957e+02 -2.678070504259039e+00 -1.913081786253101e+02 + 5 1.338496554010259e+02 6.370648332079029e+01 -1.079687634198174e+02 4.690373502682655e+01 + ME 1.147777165963028e-08 + +Event 219 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.056249374264288e+02 2.080046640325057e+01 -9.374879826474521e+00 2.043552473445915e+02 + 3 3.816677590094030e+02 -3.102683269227689e+02 -2.213707035898100e+02 -1.997135869083598e+01 + 4 4.652594638262414e+02 4.137417371803165e+02 5.174203782271518e+01 2.064144014279245e+02 + 5 4.474478397379265e+02 -1.242738766607982e+02 1.790035455935694e+02 -3.907982900816800e+02 + ME 1.067387772930822e-08 + +Event 220 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.509318149012606e+02 -2.007423466948322e+02 -1.490284238622257e+02 2.144329392218188e+01 + 3 6.855319233176400e+02 5.660933754166980e+02 2.752308514532210e+02 2.715516278817844e+02 + 4 3.841620255253093e+02 -3.525889260783147e+02 -9.880530052663002e+01 -1.161852987709352e+02 + 5 1.793742362557902e+02 -1.276210264355110e+01 -2.739712706436526e+01 -1.768096230330310e+02 + ME 6.889411605308702e-05 + +Event 221 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.326044260078135e+02 -1.267123948779659e+02 -3.623143164937092e+01 1.466922430768171e+01 + 3 4.838676388808951e+02 -8.498426264469487e+01 -3.969280642095542e+02 2.633508665293622e+02 + 4 4.068580325182036e+02 1.222413641068804e+02 3.430383967533347e+02 1.814253727535772e+02 + 5 4.766699025930878e+02 8.945529341578035e+01 9.012109910559042e+01 -4.594454635906212e+02 + ME 1.083425653861575e-07 + +Event 222 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.235249191113400e+02 5.899149719992188e+02 1.986167723905411e+02 -3.653803893380105e+01 + 3 1.389939159797709e+02 -2.651253992124958e+01 -1.209781885374505e+02 -6.309256536639511e+01 + 4 6.073928038344545e+02 -5.826614920857786e+02 3.086798087831638e+01 1.687565451967728e+02 + 5 1.300883610744344e+02 1.925906000780938e+01 -1.085065647314070e+02 -6.912594089657664e+01 + ME 1.833550731586346e-08 + +Event 223 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.513921720685541e+02 -1.134255090057421e+02 -9.735296175095162e+01 -4.259248146678863e+02 + 3 3.148626886899702e+02 2.189368402500764e+02 4.819786486657080e+01 2.210930540127696e+02 + 4 4.219582225753618e+02 -2.567437085475602e+02 -2.191804642337469e+02 2.531626627654307e+02 + 5 3.117869166661143e+02 1.512323773032259e+02 2.683355611181276e+02 -4.833090211031404e+01 + ME 9.051176279050939e-09 + +Event 224 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.315611776804204e+02 1.282183320794628e+02 -4.111637334587468e+02 -2.737688236334926e+01 + 3 1.674866220995890e+02 6.888658801083713e+01 -8.524503602723902e+01 1.266478993401409e+02 + 4 2.645671277337115e+02 -2.034555111374055e+02 -9.264145879346843e+01 1.414891521555669e+02 + 5 6.363850724862791e+02 6.350591047105598e+00 5.890502282794542e+02 -2.407601691323586e+02 + ME 3.520751797095715e-08 + +Event 225 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.542911364008525e+02 -6.906505534545300e+00 1.338332937438159e+02 -7.646374591170158e+01 + 3 6.009262400854108e+02 -8.940736359077168e+01 4.411714460658599e+01 -5.925979639778541e+02 + 4 4.328793970916516e+02 7.191964334477238e+01 1.665393425924038e+01 4.265381387417559e+02 + 5 3.119032264220855e+02 2.439422578054461e+01 -1.946043726096423e+02 2.425235711478000e+02 + ME 2.585039966969096e-06 + +Event 226 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.238244057688476e+02 -4.759413520569711e+02 -1.911585493182050e+02 1.064436306400155e+02 + 3 1.513714782200791e+02 5.621367009247982e+01 1.067079790997946e+02 -9.146996725539771e+01 + 4 3.309778079434476e+02 8.703450613686213e+01 -8.672921858056078e+01 3.073261243971419e+02 + 5 4.938263080676255e+02 3.326931758276290e+02 1.711797887989710e+02 -3.222997877817597e+02 + ME 3.516392089706136e-07 + +Event 227 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.441906188052045e+02 5.273333141456225e+01 9.291280776591429e+01 -9.683666899684231e+01 + 3 5.088005428111287e+02 2.120952898491664e+02 -3.923670854733692e+02 -2.448298401458269e+02 + 4 2.230296359111397e+02 5.963056642642842e+01 1.366700392970477e+02 -1.658544976805341e+02 + 5 6.239792024725269e+02 -3.244591876901570e+02 1.627842384104071e+02 5.075210068232034e+02 + ME 4.140089606008008e-08 + +Event 228 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.894755984215649e+02 1.858323987151165e+02 -6.826804175303917e+01 -4.476518239805802e+02 + 3 2.378337923954260e+02 -1.386422232509071e+02 -1.328849203068723e+02 -1.403026895404092e+02 + 4 3.773112740226967e+02 -1.117174380731088e+02 -1.040599922392212e+02 3.450427937954724e+02 + 5 3.953793351603121e+02 6.452726260889936e+01 3.052129542991327e+02 2.429117197255170e+02 + ME 6.124740443033569e-08 + +Event 229 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.452325252559777e+01 2.443195513199060e+01 -6.325325852480884e-01 2.017271769305092e+00 + 3 7.188955970603506e+02 6.816679247082502e+02 3.030179298338888e+01 -2.263217206515921e+02 + 4 2.627494813500970e+02 -2.618027083973373e+02 -2.041573691533981e+01 8.934736244973667e+00 + 5 4.938316690639539e+02 -4.442971714429038e+02 -9.253523482800997e+00 2.153697126373133e+02 + ME 5.272637304919401e-04 + +Event 230 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.769099184850985e+02 2.249558416904206e+02 2.307537550587786e+01 3.015352101945322e+02 + 3 1.778006365465799e+02 -1.387428732425598e+02 1.051237453064108e+02 -3.622816105629497e+01 + 4 4.556085275574101e+02 3.501957619527957e+02 -2.744336173624777e+02 -9.812363810355457e+01 + 5 4.896809174109113e+02 -4.364087304006566e+02 1.462344965501890e+02 -1.671834110346826e+02 + ME 9.059931978155028e-09 + +Event 231 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.014793994416338e+02 -5.768695854958890e+01 4.374811245688785e+02 -2.382521112678524e+02 + 3 2.526737499462902e+02 2.119664744384978e+02 -8.368970279598194e+01 1.091341892898568e+02 + 4 4.045018774470939e+02 -6.630541281823712e+01 -1.346697506713351e+02 3.756187153795021e+02 + 5 3.413449731649820e+02 -8.797410307067175e+01 -2.191216711015615e+02 -2.465007934015064e+02 + ME 2.984222713956498e-08 + +Event 232 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.414187826108434e+02 2.584315608658833e+02 2.849671207419298e+01 -2.212868068115541e+02 + 3 4.120935142349622e+02 3.628024247372867e+02 1.267412408575709e+02 1.487686893978352e+02 + 4 2.248548125131379e+02 -1.883103984200796e+02 9.094987429533836e+01 -8.262566745782664e+01 + 5 5.216328906410573e+02 -4.329235871830905e+02 -2.461878272271022e+02 1.551437848715456e+02 + ME 1.322787966029624e-08 + +Event 233 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.894891429646786e+01 3.536480069898001e+00 2.591327577389482e+01 1.241108723382165e+01 + 3 4.495734558856913e+02 -1.428629550884405e+02 4.257543295140538e+02 2.096948259829422e+01 + 4 3.410993816387650e+02 -7.182369067942483e+01 8.919355629468809e+01 3.213015019059832e+02 + 5 6.803782481790759e+02 2.111501656979673e+02 -5.408611615826368e+02 -3.546820717380990e+02 + ME 7.366258368256932e-05 + +Event 234 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.131015202000083e+02 -1.392455713354047e+02 9.575974407716100e+01 1.298191056405333e+02 + 3 4.325059163299786e+02 8.128751078497469e+01 1.232789394922659e+02 4.065169262508995e+02 + 4 1.602879687109332e+02 -1.232589269689068e+02 -1.390049118716285e+01 1.015196837106304e+02 + 5 6.941045947590796e+02 1.812169875193368e+02 -2.051381923822642e+02 -6.378557156020630e+02 + ME 7.724836751313716e-07 + +Event 235 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.910303275896595e+02 2.464345432925340e+02 2.918360128905574e+02 -3.085652930339881e+02 + 3 5.092125502368183e+02 -3.743627265831034e+02 -2.807984020263058e+02 2.007541473629420e+02 + 4 3.077109354739686e+02 1.158554772554631e+02 9.067751992059638e+01 2.702611988081597e+02 + 5 1.920461866995535e+02 1.207270603510670e+01 -1.017151307848479e+02 -1.624500531371134e+02 + ME 1.648639887571610e-07 + +Event 236 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.274482187963927e+02 -1.539135099798991e+02 1.447655980669331e+02 -8.417983900936366e+01 + 3 5.575149033864811e+02 5.352858954032091e+02 1.235129998854975e+02 9.506006806071187e+01 + 4 1.694314553150287e+02 1.372529159712161e+02 -9.883130012029677e+01 -1.005132946921373e+01 + 5 5.456054225020976e+02 -5.186253013945261e+02 -1.694472978321339e+02 -8.288995821344730e-01 + ME 3.355871013262915e-08 + +Event 237 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.339554322971692e+02 1.120133622069438e+02 -3.285326904336018e+02 -2.604545934011883e+02 + 3 6.302873937313195e+02 -1.022747807849330e+02 1.408185925137292e+02 6.057822974588029e+02 + 4 2.435720079051767e+02 6.470340927096325e+01 5.460699052093423e+01 -2.283831614850804e+02 + 5 1.921851660663347e+02 -7.444199069297396e+01 1.331071073989386e+02 -1.169445425725342e+02 + ME 2.670141335517614e-07 + +Event 238 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.083377096896611e+02 -5.784356003262200e+02 1.495271412220012e+02 1.145803619460332e+02 + 3 1.717721328115096e+02 5.705865046083022e+00 1.603017198195137e+02 -6.145296850109766e+01 + 4 3.206654997358105e+02 2.010041670743242e+02 -2.004126881056233e+02 -1.491926338190072e+02 + 5 3.992246577630186e+02 3.717255682058126e+02 -1.094161729358916e+02 9.606524037407168e+01 + ME 1.003536482637749e-08 + +Event 239 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.881743793489991e+02 1.049103829092727e+02 2.635007061567173e+02 5.104568861247708e+01 + 3 4.803894780132094e+02 1.090279613672190e+02 -2.314406086068727e+02 -4.065983262552766e+02 + 4 2.440501385224371e+02 -1.729404459755227e+02 -1.217772311844275e+02 -1.217471897978040e+02 + 5 4.873860041153544e+02 -4.099789830096893e+01 8.971713363458295e+01 4.772998274406036e+02 + ME 7.777282394741929e-08 + +Event 240 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.087013709129608e+02 -4.676309448785902e+02 -3.172734601441522e+02 2.262215945294169e+02 + 3 2.729447571190921e+02 -5.767450544615312e+00 2.662954895847358e+02 -5.960108371364925e+01 + 4 1.525519054527853e+02 8.110058050875806e+01 1.020251557883443e+02 7.928207417053407e+01 + 5 4.658019665151618e+02 3.922978149144475e+02 -5.104718522892794e+01 -2.459025849863017e+02 + ME 8.755456646138438e-08 + +Event 241 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.530270912109604e+02 -5.453728034889818e+02 8.831979059784159e+01 2.463906281857454e+01 + 3 1.982544179365819e+02 -1.586324861506672e+02 1.089318049583214e+02 4.769077937666254e+01 + 4 5.722723170577572e+02 5.530346801359588e+02 -1.096388820792352e+02 -9.812014560724828e+01 + 5 1.764461737947002e+02 1.509706095036902e+02 -8.761271347692812e+01 2.579030341201114e+01 + ME 1.699522188686953e-06 + +Event 242 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.746108664048633e+02 -4.749300259421791e+02 -3.143228612830272e+02 7.629060967091233e+01 + 3 5.051636989462203e+02 4.444288635815062e+02 9.034183757269724e+01 2.225122476014893e+02 + 4 3.777952608872159e+02 -2.186699418938177e+00 2.474964598096174e+02 -2.854294656761928e+02 + 5 4.243017376170176e+01 3.268786177961078e+01 -2.351543609928832e+01 -1.337339159620902e+01 + ME 2.080976844398368e-06 + +Event 243 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.107527202455984e+02 3.904995916125711e+02 3.043450795877112e+02 -3.576353265109072e+02 + 3 1.508627981883119e+02 3.391389294497832e+01 -9.072320151009265e+01 -1.156664707263215e+02 + 4 6.531020347957227e+02 -4.643459729748700e+02 -2.271350825653671e+02 3.991675581812210e+02 + 5 8.528244677036682e+01 3.993248841732053e+01 1.351320448774860e+01 7.413423905600773e+01 + ME 3.502799558347279e-07 + +Event 244 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.464269710040985e+02 3.069536149467576e+02 -1.106795177814204e+02 -1.163665280648363e+02 + 3 5.041376845601653e+02 6.573269089487455e+01 4.202350193677655e+02 2.706225172419645e+02 + 4 4.310807055576996e+02 -3.784254305479272e+02 -2.032279747057622e+02 3.637524591991036e+01 + 5 2.183546388780368e+02 5.739124706294895e+00 -1.063275268805829e+02 -1.906312350970385e+02 + ME 1.935780120331633e-08 + +Event 245 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.442357593704551e+02 7.260817279327249e+01 -1.113850962118338e+02 -5.590498964023364e+01 + 3 5.569552277539377e+02 4.707984336772996e+02 -2.468590917743929e+02 -1.661582058694779e+02 + 4 5.295813762554727e+02 -2.928127385193997e+02 4.173322561045921e+02 1.433559285556812e+02 + 5 2.692276366201346e+02 -2.505938679511724e+02 -5.908806811836557e+01 7.870726695403035e+01 + ME 4.089294375377561e-07 + +Event 246 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.246317093722421e+02 -2.157268871477894e+02 -2.199347190619292e+02 5.433740901680579e+02 + 3 1.880460358713021e+02 -1.070645769102478e+02 1.157715879471019e+02 -1.024471932370385e+02 + 4 1.420672142172261e+02 -1.168777621962525e+01 -1.208441773051401e+02 -7.377786967598762e+01 + 5 5.452550405392300e+02 3.344792402776624e+02 2.250073084199677e+02 -3.671490272550326e+02 + ME 1.874858538722742e-08 + +Event 247 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.065097258271049e+02 -1.668806543559496e+02 -1.865206091223489e+02 1.769438374201404e+02 + 3 3.129023884913622e+02 7.386736466907033e+01 2.951038514843158e+02 7.324775764191564e+01 + 4 3.864124550177795e+02 -1.802989827999254e+02 -3.272147765988919e+02 9.867802272804734e+01 + 5 4.941754306637530e+02 2.733122724868045e+02 2.186315342369250e+02 -3.488696177901033e+02 + ME 1.307527267075214e-07 + +Event 248 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.666327106485755e+02 -2.164686785201294e+02 -1.361374419638053e+02 -7.550437406605916e+01 + 3 3.506800144563604e+02 -3.287838552500039e+02 -1.212782822609880e+02 -1.300874005742749e+01 + 4 4.601802762612305e+02 3.201063220472946e+02 1.987803806208573e+02 -2.641669728134900e+02 + 5 4.225069986338340e+02 2.251462117228387e+02 5.863534360393606e+01 3.526800869369766e+02 + ME 7.734513384563505e-07 + +Event 249 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.764901453884635e+02 7.453429552391280e+01 8.820686664603213e+01 1.334651972855999e+02 + 3 6.230936441513317e+02 2.971067073789105e+02 9.787518090098750e+01 -5.388819376967907e+02 + 4 5.022078434333577e+02 -3.822006854333495e+02 -2.438015631086573e+02 2.160929241924341e+02 + 5 1.982083670268467e+02 1.055968253052625e+01 5.771951556163773e+01 1.893238162187565e+02 + ME 4.136165636809778e-08 + +Event 250 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.228636101802504e+02 -4.155243332015377e+01 5.704763635314593e+01 -1.005705184346681e+02 + 3 3.405147702190893e+02 7.985751885454553e+01 2.522537891570217e+01 -3.300557008723138e+02 + 4 3.193622656237183e+02 -1.644879368855029e+02 -2.193702205694553e+01 -2.728639631514911e+02 + 5 7.172593539769414e+02 1.261828513511111e+02 -6.033599321190239e+01 7.034901824584732e+02 + ME 1.988210231343287e-05 + +Event 251 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.961580549700980e+02 -3.878197351809906e+02 7.914688695318323e+01 -1.651750003655490e+01 + 3 3.066463839754016e+02 7.034111344423620e+01 1.893486642450590e+02 -2.307189110437774e+02 + 4 3.269242895484091e+02 -8.795629422661055e+01 -3.930068447480090e+01 3.124078065645385e+02 + 5 4.702712715060912e+02 4.054349159633650e+02 -2.291948667234414e+02 -6.517139548420626e+01 + ME 1.518511515080924e-08 + +Event 252 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.237658022858008e+02 1.405436681763271e+02 -1.649016760008569e+02 5.591107994180530e+01 + 3 3.054719110851954e+02 -2.214763823298171e+02 1.666458004254375e+02 -1.284152550622531e+02 + 4 5.392505931602817e+02 4.029685409231231e+02 5.432531306200935e+01 3.541981332682594e+02 + 5 4.315116934687227e+02 -3.220358267696332e+02 -5.606943748659013e+01 -2.816939581478115e+02 + ME 3.111709623099577e-08 + +Event 253 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.589202324543652e+02 -4.375953164514953e+02 2.198479485092990e+02 2.693864228256692e+02 + 3 4.197833585606818e+02 3.026019377854699e+02 -1.044594107420260e+02 -2.715480931260489e+02 + 4 2.738706420871746e+02 2.336491570328417e+02 7.464988490753900e+01 -1.218219795372531e+02 + 5 2.474257668977782e+02 -9.865577836681665e+01 -1.900384226748121e+02 1.239836498376325e+02 + ME 2.927988480786807e-07 + +Event 254 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.131109686858098e+02 -1.596979849442969e+01 4.209499761303451e+01 1.037644830809086e+02 + 3 2.488622312155221e+02 1.244501515047507e+02 -2.082237961096237e+02 5.556456289498274e+01 + 4 5.979154868428426e+02 -5.590425628529678e+02 -1.316391630725938e+02 -1.662692787945094e+02 + 5 5.401113132558256e+02 4.505622098426471e+02 2.977679615691829e+02 6.940232818618022e+00 + ME 1.486489534499342e-08 + +Event 255 Batch 0 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.625199149979439e+02 2.903215750787058e+02 -2.451585309797632e+02 -5.427184495671279e+02 + 3 2.457331142254972e+02 2.358267179437854e+01 -4.583225821432146e+01 2.402665709685299e+02 + 4 4.002681720338188e+02 -2.621095389751821e+02 2.783157645467164e+02 1.185476036294651e+02 + 5 1.914787987427404e+02 -5.179470789790269e+01 1.267502464736795e+01 1.839042749691330e+02 + ME 1.575487056372447e-07 + +Event 0 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.345677694047433e+02 2.100238310553183e+02 -2.816345401110252e+02 -2.557755312978801e+02 + 3 3.778855054923723e+02 -2.840270738478316e+02 2.448136425844733e+02 4.682261192186964e+01 + 4 2.920279085923864e+02 -1.576945398626579e+02 -2.408852190745837e+02 4.885737125284020e+01 + 5 3.955188165104972e+02 2.316977826551712e+02 2.777061166011359e+02 1.600955481231705e+02 + ME 3.418481136935543e-09 + +Event 1 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.725349105457667e+02 2.881950845301121e+02 -4.457540318931225e+02 4.129771691104840e+02 + 3 6.375781261318954e+02 -3.835006725455601e+02 4.372392202052155e+02 -2.612565126332686e+02 + 4 3.152489653934794e+01 3.054926600229694e+01 -1.796306705170926e+00 -7.571970071154192e+00 + 5 1.583620667829892e+02 6.475632201315098e+01 1.031111839307813e+01 -1.441486864060612e+02 + ME 4.785464380651434e-03 + +Event 2 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.782380757885197e+02 1.996205682030241e+02 4.001020415553458e+02 1.696515317568694e+02 + 3 2.717797792000939e+02 4.604565925658517e+01 1.990097475342964e+02 1.792739970882946e+02 + 4 6.916972528618887e+02 -2.565335659091062e+02 -5.673237009836266e+02 -3.012962619762857e+02 + 5 5.828489214949754e+01 1.086733844949693e+01 -3.178808810601573e+01 -4.762926686887831e+01 + ME 2.099485632523517e-05 + +Event 3 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.018313811485532e+02 -3.989539969780533e+02 2.934712901062141e+01 -3.798569717437191e+01 + 3 2.683933065123219e+02 2.366019084548149e+02 -7.671591945800624e+01 -1.008423105539992e+02 + 4 3.388431725058181e+02 -2.729478414859575e+02 1.984381945822547e+02 -3.060154102164474e+01 + 5 4.909321398333069e+02 4.352999300091959e+02 -1.510694041348699e+02 1.694295487500159e+02 + ME 3.358304734718933e-07 + +Event 4 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.025396283630525e+02 -2.571095877388789e+02 -4.112978625189387e+02 -1.314336572395784e+02 + 3 5.923738354103533e+02 2.675275915658220e+02 2.602417944619202e+02 4.600108227476862e+02 + 4 3.268206458950784e+01 -3.102096879508956e+01 -3.014419071639536e+00 9.835147101461061e+00 + 5 3.724044716370851e+02 2.060296496814678e+01 1.540704871286580e+02 -3.384123126095678e+02 + ME 2.859344993211158e-06 + +Event 5 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.074067282413408e+02 -4.618538476611251e+01 3.035171302884308e+02 1.559353787719173e+01 + 3 3.831379513801059e+02 -2.749543838833998e+01 -1.652445324602141e+02 -3.445764576223725e+02 + 4 5.614489455937761e+02 1.616386414426313e+02 -3.588979307262703e+02 4.003625150052696e+02 + 5 2.480063747847773e+02 -8.795781828817880e+01 2.206253328980537e+02 -7.137959526008893e+01 + ME 1.706310861476165e-08 + +Event 6 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.286636464658632e+02 -1.747226577501441e+01 -3.778773270997241e+02 -3.693084032177421e+02 + 3 1.310282673263388e+02 -1.083675617071470e+02 -6.717507586954586e+01 3.020575425495843e+01 + 4 6.582258651099335e+02 2.776185230670746e+02 5.267955454451471e+02 2.804918866008896e+02 + 5 1.820822210978650e+02 -1.517786955849135e+02 -8.174314247587706e+01 5.861076236189422e+01 + ME 3.432018091129583e-08 + +Event 7 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.262567818350125e+02 -6.135678852045158e+02 -8.153386103597425e+01 9.531126137330719e+01 + 3 1.336446614791591e+02 -4.519989455404550e+01 6.404586862299972e+01 -1.082404350809238e+02 + 4 3.176656341984028e+02 2.701266119371286e+02 1.170579115681671e+02 -1.193336248227656e+02 + 5 4.224329224874255e+02 3.886411678214329e+02 -9.956991915519265e+01 1.322627985303823e+02 + ME 1.323869922254904e-08 + +Event 8 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.349855291489958e+02 -3.626063542068543e+02 -1.229423826784078e+02 -2.064321026371652e+02 + 3 3.119050592775226e+02 -2.002874147789406e+02 -1.957942322506285e+02 1.372382457679727e+02 + 4 1.367195114173142e+02 9.785893219779986e+01 -8.501635945817435e+01 4.345195986113885e+01 + 5 6.163899001561672e+02 4.650348367879950e+02 4.037529743872105e+02 2.574189700805361e+01 + ME 3.285876644190919e-08 + +Event 9 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.655124632121683e+02 -6.972273330724498e+01 -3.084842179247440e+02 1.832364279147364e+02 + 3 1.839264563143948e+02 1.553544456242578e+02 -7.816914971633298e+01 -5.986252241407793e+01 + 4 2.954499153271153e+02 2.111586753349157e+01 -1.306467051615632e+02 2.641518711566042e+02 + 5 6.551111651463219e+02 -1.067475798505044e+02 5.173000728026402e+02 -3.875257766572626e+02 + ME 1.798086418720504e-07 + +Event 10 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.642811111709576e+02 1.645024039884385e+02 5.389597634493803e+02 -2.957202882697341e+01 + 3 3.050705971359640e+02 -1.347545052623103e+02 -2.204142360425299e+02 -1.622555302545696e+02 + 4 1.790656381713290e+02 -1.323273797872345e+02 -8.759515510166029e+00 -1.203213955220662e+02 + 5 4.515826535217496e+02 1.025794810611064e+02 -3.097860118966842e+02 3.121489546036092e+02 + ME 1.200306632419875e-05 + +Event 11 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.912845371100811e+02 -1.020148610633588e+02 3.329066770248591e+02 -1.785208713174465e+02 + 3 2.847080639014686e+02 2.638796146707179e+02 5.173703293990503e+01 9.353881565602218e+01 + 4 2.573001248270788e+02 -1.895266044096599e+02 1.605970764533154e+02 -6.701939638360363e+01 + 5 5.667072741613713e+02 2.766185080230082e+01 -5.452407864180796e+02 1.520014520450279e+02 + ME 1.426216346526762e-06 + +Event 12 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.295908994071823e+02 -3.523645455233026e+01 1.467318606160352e+01 -4.278918446697190e+02 + 3 2.043256044303079e+02 2.071061668376125e+01 1.800525177697821e+02 9.434571440797528e+01 + 4 2.514463210684133e+02 -2.896341838569179e+00 2.221301356297975e+02 -1.177924718642134e+02 + 5 6.146371750940966e+02 1.742217970713832e+01 -4.168558394611832e+02 4.513386021259576e+02 + ME 8.609702911000601e-08 + +Event 13 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.900763907650168e+02 -4.345521592554666e+02 1.816886031264379e+02 1.353829426687154e+02 + 3 8.155287447201782e+01 -3.586849648635567e+01 -4.644236448070588e+00 -7.309414040996307e+01 + 4 2.274805892576971e+02 -1.172993534843645e+02 1.746430859700105e+02 8.653365058779552e+01 + 5 7.008901455052688e+02 5.877200092261867e+02 -3.516874526483777e+02 -1.488224528465479e+02 + ME 1.915651481056226e-06 + +Event 14 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.553813512209236e+02 -2.884258797827895e+02 -3.779404323704547e+02 2.870888133228751e+02 + 3 1.895171303098595e+02 3.950181939875271e+00 1.673649699243205e+02 -8.882626630539811e+01 + 4 2.675598101961874e+02 1.545161726663045e+02 -2.183413083877818e+02 -6.330676763838193e+00 + 5 4.875417082730291e+02 1.299595251766097e+02 4.289167708339159e+02 -1.919318702536388e+02 + ME 1.330756835012696e-08 + +Event 15 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.826944038147661e+02 3.569588644211593e+02 -4.592592011223917e+02 3.455609255435130e+01 + 3 3.389524473661556e+02 -2.377392070550027e+02 9.239231435980068e+01 -2.232319225639667e+02 + 4 7.820502782875147e+01 1.594347126700341e+01 -7.655713718050528e+01 9.147941732036022e-01 + 5 5.001481209903263e+02 -1.351631286331601e+02 4.434240239430964e+02 1.877610358364118e+02 + ME 2.166874408192583e-08 + +Event 16 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.671075373493464e+02 -1.624326760732479e+01 1.171675550031839e+02 1.180374912939780e+02 + 3 4.295095098103945e+02 2.195907717116854e+02 -2.808696979999064e+02 -2.395214494404898e+02 + 4 3.847682842045416e+02 -1.737210238377358e+02 -3.429919065735126e+02 1.497299006686935e+01 + 5 5.186146686357174e+02 -2.962648026662487e+01 5.066940495702352e+02 1.065109680796425e+02 + ME 2.510076954487770e-06 + +Event 17 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 7.032955713685548e+02 6.495895482552957e+02 2.251021895685562e+02 -1.482804226981584e+02 + 3 2.234221561647206e+02 -1.180503892545828e+02 -2.021783199888669e+01 1.886075415549418e+02 + 4 3.595704725836891e+02 -3.353015999954382e+02 -1.206079698882032e+02 -4.814020558746078e+01 + 5 2.137117998830352e+02 -1.962375590052745e+02 -8.427638768146636e+01 7.813086730677438e+00 + ME 8.189932255998903e-07 + +Event 18 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.215031941006906e+02 3.997910206623501e+02 -2.192085154561078e+02 2.531409646945914e+02 + 3 4.430902120680962e+02 8.075108458464338e+01 3.816053226272268e+02 -2.102036538967018e+02 + 4 2.188624192138139e+02 -1.829448025271727e+02 -1.088960009329281e+02 5.073084617106944e+01 + 5 3.165441746173993e+02 -2.975973027198207e+02 -5.350080623819097e+01 -9.366815696895908e+01 + ME 1.019813008745839e-08 + +Event 19 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.615465159306796e+02 -1.661354327315055e+02 1.685644476861036e+02 1.113176758779641e+02 + 3 6.118064822100387e+02 5.530315541715972e+02 -1.761644968719661e+02 1.934666426199023e+02 + 4 1.123687407649047e+02 7.588942961656004e+01 -1.456870938581167e+01 -8.157990610680611e+01 + 5 5.142782610943774e+02 -4.627855510566518e+02 2.216875857167411e+01 -2.232044123910604e+02 + ME 5.584909353802536e-08 + +Event 20 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.201161646354790e+02 -1.169238528739237e+02 1.621234917435766e+02 -4.801724802288322e+02 + 3 2.564308777002585e+02 1.861146313022993e+02 1.511095254422972e+02 -9.101675875319813e+01 + 4 6.849003476946964e+02 -5.145604386088208e+01 -3.163529905442017e+02 6.052780742735057e+02 + 5 3.855260996956563e+01 -1.773473456749349e+01 3.119973358328019e+00 -3.408883529147523e+01 + ME 8.304781570816604e-06 + +Event 21 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.051714469465806e+02 4.769595747359659e+02 1.465851962980007e+02 7.887036898648951e+01 + 3 2.982914519086227e+02 -2.692776124268368e+02 -2.614768404820439e+01 -1.256330225154667e+02 + 4 4.082168347698474e+02 -2.526674124215031e+02 -2.413280677431799e+02 -2.110945916149396e+02 + 5 2.883202663749494e+02 4.498545011237395e+01 1.208905554933834e+02 2.578572451439171e+02 + ME 5.832855313914358e-07 + +Event 22 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.495241619209652e+02 3.451716010099906e+01 -9.553928903830848e+01 3.344367648377936e+02 + 3 6.022361346253780e+02 4.159349120916945e+01 7.293136399340369e+01 -5.963550615896627e+02 + 4 1.609604585668471e+02 1.426706346559205e+02 4.848087149789286e+01 -5.659473763285189e+01 + 5 3.872792448868096e+02 -2.187812859660891e+02 -2.587294645298800e+01 3.185130343847212e+02 + ME 4.391549792316749e-08 + +Event 23 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.973901127820891e+02 4.157619482135283e+02 4.273300237487649e+02 3.749666745683651e+01 + 3 2.020962069046400e+02 -8.124921004062800e+01 1.541203841174711e+02 -1.024126452763532e+02 + 4 4.866251843058939e+02 -1.871724592614197e+02 -4.344368137067278e+02 1.141717801872394e+02 + 5 2.138884960073768e+02 -1.473402789114806e+02 -1.470135941595082e+02 -4.925580236772269e+01 + ME 2.677487182497992e-08 + +Event 24 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.729751897416461e+02 5.325486799695834e+02 -2.114043177632212e+02 8.282229144928630e-01 + 3 2.209760217295415e+02 4.190554168819071e+01 2.140047851899926e+02 3.572505662723606e+01 + 4 6.217469614831009e+02 -6.139571429576343e+02 -6.952416455108575e+01 -6.922644919567138e+01 + 5 8.430182704571227e+01 3.950292129985989e+01 6.692369712431426e+01 3.267316965394235e+01 + ME 2.867020097521691e-08 + +Event 25 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.927699720954061e+02 -2.047743757602093e+02 1.139305300318160e+01 4.480623826814639e+02 + 3 3.149042319173597e+02 -7.235220864995343e+01 2.398037103748990e+01 -3.055401364597460e+02 + 4 2.888907726753627e+02 7.777131619454688e+01 2.777989383587109e+02 1.540294650737274e+01 + 5 4.034350233118720e+02 1.993552682156158e+02 -3.131723623993825e+02 -1.579251927290908e+02 + ME 1.698072431060132e-09 + +Event 26 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.781578630360667e+02 -2.003585770703804e+02 -8.178895358715285e+01 -1.747535534237924e+02 + 3 4.314269515912293e+02 -8.376259389173971e+00 2.624301036293826e+02 3.423295101901347e+02 + 4 4.627048772771270e+02 1.415704984190216e+02 -4.400078394753884e+02 2.113524624015278e+01 + 5 3.277103080955769e+02 6.716433804053280e+01 2.593666894331585e+02 -1.887112030064950e+02 + ME 4.763692611302570e-09 + +Event 27 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.288747384351033e+02 -3.287538335736824e+02 7.343114151656774e+00 -5.058573506526230e+00 + 3 3.748617761535500e+02 2.826910393495446e+02 2.461509109435954e+02 4.105670969104998e+00 + 4 4.493229387685311e+02 -2.643020753278852e+02 -3.392708645659921e+02 1.301183950777377e+02 + 5 3.469405466428158e+02 3.103648695520229e+02 8.577683947073990e+01 -1.291654925403165e+02 + ME 9.313636073630819e-08 + +Event 28 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.972279565562762e+02 2.667568883382366e+02 -1.717272400122292e+02 -6.208682154576160e+02 + 3 5.905663106606713e+02 -1.231890261491060e+02 2.466624534377953e+02 5.222553639627256e+02 + 4 1.643113640003870e+02 -9.794033068572112e+01 -8.940761721344892e+01 9.701646225797272e+01 + 5 4.789436878266499e+01 -4.562753150340967e+01 1.447240378788297e+01 1.596389236917519e+00 + ME 1.558917944335744e-05 + +Event 29 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.266188853291728e+02 -3.664030707671374e+00 1.148798248336851e+02 6.159873604030605e+02 + 3 2.715483186965963e+02 -1.390232669167604e+02 8.666144865649638e+01 -2.165659575267933e+02 + 4 3.262257817760322e+02 -5.448790208210590e+01 -2.425277014775895e+02 -2.112691251415396e+02 + 5 2.756070141981987e+02 1.971751997065377e+02 4.098642798740790e+01 -1.881522777347276e+02 + ME 8.466517133211871e-09 + +Event 30 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.746957600003898e+02 -2.591574015416285e+02 -1.764470547739902e+02 2.051847719740561e+02 + 3 4.260450496435591e+02 1.858543667698223e+02 -3.681463334087965e+02 -1.069617495931631e+02 + 4 2.090363679505941e+02 1.796219811338597e+02 6.625234226347425e+01 -8.392123786102663e+01 + 5 4.902228224054563e+02 -1.063189463620532e+02 4.783410459193125e+02 -1.430178451986603e+01 + ME 4.195772737408626e-09 + +Event 31 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.268147451203489e+02 1.033619585238285e+02 -7.175680626342712e+01 -1.578752244433521e+01 + 3 3.789446667338622e+02 -1.394826691605500e+01 3.303299056302542e+02 -1.851665729617091e+02 + 4 4.489033212820729e+02 -1.541836769602653e+02 -2.486905723036656e+02 -3.404329373964334e+02 + 5 5.453372668637153e+02 6.476998535249105e+01 -9.882527063161515e+00 5.413870328024776e+02 + ME 2.652167353212513e-07 + +Event 32 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.594239401383118e+02 6.472187280476990e+02 -9.434320337386460e+01 -8.394766744235470e+01 + 3 1.799463961036491e+02 -4.308808552135046e+01 1.452564949994531e+02 9.708075513339401e+01 + 4 5.532563487173281e+02 -5.363715880205566e+02 -1.284853434295565e+02 -4.346979967891587e+01 + 5 1.073733150407109e+02 -6.775905450579195e+01 7.757205180396797e+01 3.033671198787659e+01 + ME 2.352577766184765e-08 + +Event 33 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.632108428205668e+02 1.176561246583504e+02 1.493047995597393e+02 -6.353847143216237e+02 + 3 5.142529371160996e+02 -2.302785097856057e+02 -1.735375888118209e+02 4.258081687013944e+02 + 4 1.166729919959780e+02 1.150834163714542e+02 1.881380173106929e+01 3.799368630713526e+00 + 5 2.058632280673560e+02 -2.461031244198720e+00 5.418987521012300e+00 2.057771769895156e+02 + ME 1.200561028380627e-04 + +Event 34 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.690779677366500e+02 3.511855664846811e+02 -5.534458382142301e+01 3.060062331888239e+02 + 3 3.742689592978850e+02 -3.012002941387805e+02 8.305424587573981e+01 -2.060524907557446e+02 + 4 2.980406440054936e+02 2.332618722083638e+02 1.822761656253146e+02 -3.453293931873202e+01 + 5 3.586124289599711e+02 -2.832471445542643e+02 -2.099858276796314e+02 -6.542080311434724e+01 + ME 5.075971073707363e-09 + +Event 35 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.283056560696552e+02 -3.779242940990954e+02 5.849933729772783e+01 -3.644968061596919e+02 + 3 3.435696257780648e+02 3.183925539049349e+02 4.269218267655494e+01 1.218345062512435e+02 + 4 3.087475922619403e+02 2.738015531924525e+02 9.348544997317434e+01 1.077880134349780e+02 + 5 3.193771258903396e+02 -2.142698129982919e+02 -1.946769699474571e+02 1.348742864734704e+02 + ME 9.520833808961610e-09 + +Event 36 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.861171657357099e+02 1.949976067191705e+02 -3.323631134924988e+02 2.443685411720823e+01 + 3 4.856425374020078e+02 -3.587793340935830e+02 3.248213110244532e+02 -4.021416996509026e+01 + 4 3.386102480932668e+02 1.540387599323064e+02 2.845112873791639e+02 9.991140028120812e+01 + 5 2.896300487690154e+02 9.742967442106151e+00 -2.769694849111183e+02 -8.413408443332617e+01 + ME 8.896439667190523e-08 + +Event 37 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.304409112998234e+02 2.170475590461168e+02 -3.972923294204461e+01 -4.823686407122112e+02 + 3 2.292982173116323e+02 5.858630347836768e+01 -2.026677724490633e+02 8.983925376787056e+01 + 4 1.467869786978191e+02 -1.013820811213809e+02 -4.989060265398776e+01 -9.369641673806763e+01 + 5 5.934738926907251e+02 -1.742517814031035e+02 2.922876080450958e+02 4.862258036824082e+02 + ME 9.019947846724267e-08 + +Event 38 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.017706346629277e+02 2.384436739982337e+02 -4.258734741499014e+02 1.164051895567999e+02 + 3 4.770954291403306e+02 -2.105777645255067e+02 4.274009986857631e+02 2.460568870096314e+01 + 4 2.156156104165689e+02 -2.877166591024516e+01 1.906669901245643e+02 9.647995425422911e+01 + 5 3.055183257801733e+02 9.057564375181330e-01 -1.921945146604260e+02 -2.374908325119924e+02 + ME 1.825719174845300e-06 + +Event 39 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.689399151263619e+02 -2.579554373803598e+00 -1.305084655116407e+02 1.072454253193666e+02 + 3 1.752066215161591e+02 -1.477482509589512e+02 8.725713980331182e+01 -3.541194876059085e+01 + 4 6.166504538775523e+02 5.541135799160111e+01 3.673230597344313e+02 -4.922002981106906e+02 + 5 5.392030094799272e+02 9.491644734115384e+01 -3.240717340261025e+02 4.203668215519149e+02 + ME 6.460676710264379e-08 + +Event 40 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.915352846637887e+02 2.413866074952699e+02 1.305008487961100e+02 9.846246182894077e+01 + 3 4.766337666546407e+02 -4.064718254101213e+02 2.442499654159483e+02 4.798288296322364e+01 + 4 5.420029607651860e+02 3.967025561147059e+01 -4.874329454717395e+02 -2.336720008188668e+02 + 5 1.898279879163847e+02 1.254149623033808e+02 1.126821312596812e+02 8.722665602670243e+01 + ME 4.192431613287140e-09 + +Event 41 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.178258392081233e+02 -3.063771146787844e+01 2.817624231441970e+01 -1.102286641039828e+02 + 3 6.481000691270629e+02 4.281730940284307e+02 -2.495995064512906e+01 4.858791022635328e+02 + 4 5.135691872852316e+02 -3.271780048393351e+02 2.027042603872938e+02 -3.400277137219925e+02 + 5 2.205049043795825e+02 -7.035737772121716e+01 -2.059205520565847e+02 -3.562272443755763e+01 + ME 1.731997556776303e-07 + +Event 42 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.407568007632807e+02 -6.712702422129367e+01 5.650132897991668e+02 2.946578060970235e+02 + 3 2.519649653275297e+02 9.668586554572212e+01 -2.235157404081881e+02 -6.464441929476367e+01 + 4 1.611455149449823e+02 -1.500904782980545e+02 -2.019767982646422e+01 5.507067314617083e+01 + 5 4.461327189642074e+02 1.205316369736261e+02 -3.212998695645146e+02 -2.850840599484306e+02 + ME 2.233802709133265e-07 + +Event 43 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 7.656037718110568e+01 5.565869919512738e+01 5.206539740066113e+01 -7.266013455170691e+00 + 3 5.180921726156697e+02 9.446420117550210e+01 -5.353707605507633e+01 -5.065864146514117e+02 + 4 4.045145408547240e+02 -6.817883407235416e+01 -3.582159575777364e+02 1.751142143976551e+02 + 5 5.008329093485008e+02 -8.194406629827526e+01 3.596876362321516e+02 3.387382137089272e+02 + ME 6.975773490255196e-08 + +Event 44 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.113647181056540e+02 -5.107143134714065e+01 9.810164906833062e+01 -1.303364066484094e+01 + 3 6.573281629571673e+02 -3.985633843498063e+02 -2.702857905045169e+02 -4.474071232374617e+02 + 4 1.273704188821621e+02 8.136377415273439e+01 -8.144355608270772e+01 5.449868837360310e+01 + 5 6.039367000550166e+02 3.682710415442125e+02 2.536276975188940e+02 4.059420755286995e+02 + ME 9.174645805915437e-08 + +Event 45 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.791094112024887e+02 -3.344017621786854e+02 5.108659183713410e+00 -4.727759228180172e+02 + 3 2.010161055980396e+02 -2.492393218233912e+01 -1.782237380498131e+02 8.956880880040752e+01 + 4 3.598579655450536e+02 2.990024010429073e+02 -1.090682288963148e+02 1.679268917780071e+02 + 5 3.600165176544180e+02 6.032329331811716e+01 2.821833077624145e+02 2.152802222396027e+02 + ME 1.246543188766515e-08 + +Event 46 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.267953668800281e+02 -6.352714736069532e+01 -9.200146001961878e+01 5.980884520463430e+01 + 3 7.280210303874187e+02 4.206450303526108e+02 5.658444328595525e+02 -1.813627771287734e+02 + 4 6.518774346619089e+01 2.681482978220010e+01 -4.773984775270042e+01 3.537391324853008e+01 + 5 5.799958592663627e+02 -3.839327127741155e+02 -4.261031250872333e+02 8.618001867560905e+01 + ME 1.081610588884994e-06 + +Event 47 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.159530641405005e+02 1.142445149356237e+02 -2.007237833711748e+02 -4.613737291960360e+02 + 3 3.022880532645049e+02 -2.500992722738971e+02 1.529012103800725e+02 7.382168393378677e+01 + 4 3.701099938195064e+02 2.419009630277548e+02 2.308398354487970e+02 1.586767216112437e+02 + 5 3.116488887754888e+02 -1.060462056894813e+02 -1.830172624576947e+02 2.288753236510055e+02 + ME 8.683501176758673e-09 + +Event 48 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.117281863235953e+02 1.108482515422887e+02 3.904601382797304e+02 -6.909156936926898e+01 + 3 4.416457800211126e+02 -1.761655849232860e+02 -3.193915704670098e+02 2.490094504506014e+02 + 4 2.951205671254979e+02 -2.720452019398315e+02 2.727574676948151e+00 -1.143683416788644e+02 + 5 3.515054665297946e+02 3.373625353208287e+02 -7.379614248966867e+01 -6.554953940246800e+01 + ME 3.853884773468987e-09 + +Event 49 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.790151177355859e+02 2.685445491881806e+02 -1.264003222356048e+02 -4.971572087442830e+02 + 3 5.825462968193996e+02 -3.620774874303168e+02 2.071002122380677e+02 4.066565911492057e+02 + 4 1.232538965502943e+02 1.411023551560034e+01 -5.744174282575165e+01 -1.081335768837097e+02 + 5 2.151846888947203e+02 7.942270272653560e+01 -2.325814717671123e+01 1.986341944787866e+02 + ME 2.043261450273553e-06 + +Event 50 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.145744464521337e+02 1.949057366487758e+00 -3.132665042327793e+02 -2.858987341389515e+01 + 3 5.210452536770441e+02 3.365475988572654e+02 2.288931725040629e+02 -3.253179762383411e+02 + 4 4.024143942462559e+02 -3.880355946879494e+02 2.653164231204767e+01 1.032559630625573e+02 + 5 2.619659056245661e+02 4.953893846419621e+01 5.784168941666874e+01 2.506518865896789e+02 + ME 2.536581443959216e-08 + +Event 51 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.804391138743970e+02 5.017232555386195e+02 -1.014098872260622e+02 2.736775009748181e+02 + 3 4.713537758174337e+01 8.111299990939797e+00 -4.333873138520375e+00 4.622951628396848e+01 + 4 6.266947405808538e+02 -5.426030878998815e+02 2.770731071369993e+02 -1.468287443747501e+02 + 5 2.457307679630063e+02 3.276853237032218e+01 -1.713293467724168e+02 -1.730782728840364e+02 + ME 7.159681285813359e-07 + +Event 52 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.239697017241612e+02 -1.405450188662117e+02 3.730121131586498e+02 3.400783871899555e+02 + 3 1.578462691260114e+02 -1.307296241737952e+02 -8.016414633287305e+01 3.740213473989416e+01 + 4 2.346875433863188e+02 3.589966406507264e+01 1.851707703338134e+02 -1.396468508585222e+02 + 5 5.834964857635086e+02 2.353749789749342e+02 -4.780187371595902e+02 -2.378336710713274e+02 + ME 1.091071284005791e-08 + +Event 53 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.236952601159668e+02 -3.969697599659208e+01 1.283750074878056e+02 -1.788395284817703e+02 + 3 4.313350831023799e+02 -3.366597921026201e+02 2.109624625450273e+02 -1.679433764496105e+02 + 4 2.801401728473173e+02 2.616468403601891e+02 9.956816004668732e+01 1.027759102960046e+01 + 5 5.648294839343359e+02 1.147099277390230e+02 -4.389056300795202e+02 3.365053139017804e+02 + ME 4.178869840930611e-08 + +Event 54 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.424957591900098e+02 1.303189036682192e+02 1.786751139223701e+02 -2.615253947032346e+02 + 3 4.181611430197448e+02 -3.495405289942557e+02 -1.455704883643566e+02 1.774525092506670e+02 + 4 4.253746812368033e+02 1.528889148664904e+02 -1.709820665168174e+02 3.582369775412607e+02 + 5 3.139684165534423e+02 6.633271045954612e+01 1.378774409588040e+02 -2.741640920886931e+02 + ME 3.653235936447035e-08 + +Event 55 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.902820092019053e+02 4.969094085134603e+02 -1.717027031534156e+02 -4.473125011537596e+02 + 3 3.505542265094331e+02 -3.042029506312313e+02 -2.771059843041879e+01 1.719911430437845e+02 + 4 3.123150316279192e+02 -2.383922595804615e+02 1.302132333211217e+02 1.541243764656621e+02 + 5 1.468487326607427e+02 4.568580169823259e+01 6.920006826271279e+01 1.211969816443130e+02 + ME 4.102918153988802e-05 + +Event 56 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.517045596935317e+02 3.287009769062940e+02 7.982883452857169e+01 4.358450942081274e+02 + 3 5.634713549544340e+02 1.236880428650327e+01 8.234347921332743e+00 -5.632753998258918e+02 + 4 2.247534233722244e+02 -1.830483440080827e+02 -7.950172450526783e+01 1.033773711898374e+02 + 5 1.600706619798102e+02 -1.580214371847146e+02 -8.561457944636569e+00 2.405293442792711e+01 + ME 5.624279731297572e-08 + +Event 57 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.612663949947443e+02 6.166031259026278e+01 1.487802576587276e+02 8.324117783561414e+00 + 3 1.820024643451797e+02 1.879353241782060e+01 -1.625270683069972e+02 -7.972861615826162e+01 + 4 5.924987722813793e+02 -1.264958307278939e+02 5.759352761456844e+02 5.789782080869779e+01 + 5 5.642323683786965e+02 4.604198571981062e+01 -5.621884654974148e+02 1.350667756600244e+01 + ME 4.866487281171431e-05 + +Event 58 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.537542945315818e+02 1.629560282904648e+02 -2.140600948134415e+02 2.297078787325215e+02 + 3 2.777758408292174e+02 2.346896280376003e+02 7.436606577911790e+01 1.286463544002993e+02 + 4 3.282171909538803e+02 1.357516725902970e+02 1.084620089653986e+02 -2.784492780342276e+02 + 5 5.402526736853205e+02 -5.333973289183622e+02 3.123202006892496e+01 -7.990495509859326e+01 + ME 1.829504869096126e-08 + +Event 59 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.976381540886909e+02 -6.639185065184327e+01 -1.092066538588677e+02 1.507543328450558e+02 + 3 5.908605962463500e+02 2.928235141717450e+02 4.943985123342437e+02 -1.376253782788214e+02 + 4 3.266674027313048e+02 -3.263528609865800e+02 -1.366055614966464e+01 -4.334897781080562e+00 + 5 3.848338469336537e+02 9.992119746667817e+01 -3.715313023257119e+02 -8.794056785153758e+00 + ME 3.132664003926979e-09 + +Event 60 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 7.121408887067226e+02 -1.629155490191453e+02 -1.421475012227830e+02 -6.785257969686267e+02 + 3 2.741179903154751e+02 1.475044814487676e+02 1.545489065904012e+02 1.717490496009702e+02 + 4 6.757364169575578e+00 1.698500861258775e-01 -6.755016584407215e+00 5.359489612222521e-02 + 5 5.069837568082268e+02 1.524121748425186e+01 -5.646388783210994e+00 5.067231524715342e+02 + ME 1.415656031996490e-03 + +Event 61 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.060218431628061e+02 -3.666102684855927e+01 -1.896168417000883e+02 -4.677173593228888e+02 + 3 6.566657576617764e+02 1.298514611056881e+02 2.926865236287042e+02 5.733089169203428e+02 + 4 1.062674698969952e+02 1.030596485895223e+02 -2.044593557069221e+01 -1.592004112909394e+01 + 5 2.310449292784226e+02 -1.962500828466512e+02 -8.262374635792366e+01 -8.967151646835990e+01 + ME 2.344014144710753e-07 + +Event 62 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.055086643741489e+02 -7.294551827191325e+00 9.237032345627718e+01 -5.046376042508070e+01 + 3 5.688846753260372e+02 3.341862040344012e+02 -2.722490171883784e+02 3.712543972720732e+02 + 4 4.946635586748542e+02 -1.135243476177037e+02 -1.573702928991474e+01 -4.812032883179146e+02 + 5 3.309431016249600e+02 -2.133673045895060e+02 1.956157230220159e+02 1.604126514709221e+02 + ME 4.250359822953940e-07 + +Event 63 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.158808969828533e+02 -1.476287203313588e+02 1.676739582816468e+02 2.233202761197066e+02 + 3 3.883323257562103e+02 -3.056810783903564e+02 2.043617890712476e+02 1.248892818016628e+02 + 4 2.887403188019102e+02 1.019387632956730e+02 -1.499858918976027e+01 -2.697304257251938e+02 + 5 5.070464584590262e+02 3.513710354260422e+02 -3.570371581631342e+02 -7.847913219617558e+01 + ME 5.358404688824838e-07 + +Event 64 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.850523188566764e+02 2.550712447674044e+01 -2.660317865305242e+02 9.915291040546418e+01 + 3 2.916452653107143e+02 1.403399316576782e+01 2.690561401486174e+02 -1.116637867095131e+02 + 4 4.714598286310267e+02 -1.052157000050604e+02 -2.066429807719118e+02 4.104908098641693e+02 + 5 4.518425872015821e+02 6.567458236255207e+01 2.036186271538186e+02 -3.979799335601206e+02 + ME 2.467966615716427e-07 + +Event 65 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.214350019381618e+02 7.995884478713779e+01 -7.224395149801896e+01 5.598083875737888e+01 + 3 6.120578807552533e+02 9.201985783628670e+01 5.195324550411796e+02 -3.102148018990813e+02 + 4 5.322028765827238e+02 4.286174464190796e+00 -3.665653478175947e+02 3.858126181590674e+02 + 5 2.343042407238607e+02 -1.762648770876154e+02 -8.072315572556604e+01 -1.315786550173648e+02 + ME 2.975997769514851e-06 + +Event 66 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.420838586983576e+02 1.172583084765124e+02 -5.279399036277819e+02 -3.721366834936297e+01 + 3 1.564392099528226e+02 1.132387905244197e+02 6.972777909444963e+01 -8.239077347485902e+01 + 4 4.857304734552536e+02 1.638606370619556e+01 4.794549877218303e+02 -7.608222202289349e+01 + 5 3.157464578935655e+02 -2.468831627071277e+02 -2.124286318849815e+01 1.956866638471152e+02 + ME 1.188193311029425e-08 + +Event 67 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.575902343233390e+02 1.284720285965683e+02 -3.052315686261782e+02 -1.349051632284907e+02 + 3 2.817442134209693e+02 1.513959995933567e+01 2.809460911141386e+02 1.482862761546490e+01 + 4 3.417076894701673e+02 1.623591614032429e+02 -1.451356906432050e+02 -2.633235254454034e+02 + 5 5.189578627855246e+02 -3.059707899591470e+02 1.694211681552447e+02 3.834000610584292e+02 + ME 1.069564314420608e-07 + +Event 68 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.312846117834605e+02 -2.146983334976369e+01 -8.138388544700084e+01 -1.007539514689958e+02 + 3 6.081561718481715e+02 -1.919908989361124e+02 -4.948570314768852e+02 2.968331896547476e+02 + 4 6.188990257047046e+02 3.200282424269924e+02 4.846263547333213e+02 -2.139047086092678e+02 + 5 1.416601906636633e+02 -1.065675101411164e+02 9.161456219056458e+01 1.782547042351602e+01 + ME 4.596750544733890e-08 + +Event 69 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.931414138169079e+02 -3.273293746991303e+02 -5.999656711319622e+02 1.155062486203779e+02 + 3 5.318906858450803e+02 2.665952958823761e+02 4.596824129140024e+02 -2.295058081397398e+01 + 4 9.890991607956899e+01 7.762108251097793e+01 3.690462310319209e+01 4.895087172158100e+01 + 5 1.760579842584430e+02 -1.688700369422365e+01 1.033786351147677e+02 -1.415065395279848e+02 + ME 6.087424011942764e-05 + +Event 70 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.380439264868779e+02 -3.354639703644540e+02 -1.520232726263372e+02 2.371398968949265e+02 + 3 2.951328688021417e+02 2.031166168690902e+02 6.863385339078722e+01 2.028212128150538e+02 + 4 2.729251659354399e+02 2.078106869723441e+02 -1.750231714082777e+02 -2.587960685865382e+01 + 5 4.938980387755407e+02 -7.546333347698052e+01 2.584125906438277e+02 -4.140815028513266e+02 + ME 1.526402190973689e-08 + +Event 71 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.516725804906696e+02 -2.115628301998922e+02 -4.748726394059171e+02 -1.846070997732851e+02 + 3 1.486032143367139e+02 3.144790462197262e-03 1.024005313005051e+02 -1.076895839470461e+02 + 4 6.474143806083581e+02 3.410247127162772e+02 4.478272683866319e+02 3.198409967853593e+02 + 5 1.523098245642589e+02 -1.294650273068471e+02 -7.535516028121992e+01 -2.754431306502831e+01 + ME 8.561829826283358e-06 + +Event 72 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.330749580482132e+02 -3.265677636286840e+02 5.763987838257717e+00 -6.526254577917835e+01 + 3 6.712248537502356e+02 5.525262209628081e+02 3.205348494218363e+02 2.061916335516648e+02 + 4 1.960894953123145e+02 -1.804902499505635e+02 -3.994939157176093e+01 -6.540952497662286e+01 + 5 2.996106928892366e+02 -4.546820738356064e+01 -2.863494456883330e+02 -7.551956279586351e+01 + ME 1.175963504293250e-08 + +Event 73 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.244112630934240e+02 1.874119439001354e+02 2.373895141185757e+02 2.977379755937671e+02 + 3 2.512397615119819e+02 -1.915148586935148e+02 1.506486288779340e+02 -6.122472769558972e+01 + 4 3.648202995074479e+02 -4.800070047693639e+01 -2.942119755412286e+02 2.103071495088906e+02 + 5 4.595286758871460e+02 5.210361527031582e+01 -9.382616745528101e+01 -4.468203974070680e+02 + ME 2.190510645509726e-08 + +Event 74 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.175955016648010e+02 -2.448313074458401e+02 -4.559235086301704e+02 9.822856832534049e+00 + 3 6.621390955434566e+02 2.137341741969738e+02 6.260267976401974e+02 2.891942710019756e+01 + 4 2.303718015973827e+02 1.812134960949857e+01 -2.278277430547247e+02 2.893619107872610e+01 + 5 8.989360119435973e+01 1.297578363936777e+01 5.772445404469759e+01 -6.767847501145771e+01 + ME 3.728174007465366e-05 + +Event 75 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.234767238744631e+02 1.148240181757038e+02 1.757017011162820e+02 -7.672159532030989e+01 + 3 5.117399613751515e+02 -4.727573887809738e+02 1.390803688823399e+02 1.379669903012637e+02 + 4 2.544294994045669e+02 -3.670658913956010e+01 -4.967306761896025e+01 -2.468189272205846e+02 + 5 5.103538153458185e+02 3.946399597448302e+02 -2.651090023796617e+02 1.855735322396308e+02 + ME 5.016558215576689e-08 + +Event 76 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.909285481378914e+02 -3.305040374270265e+02 -1.794570557368611e+02 1.067116495041263e+02 + 3 4.098525442038564e+02 2.778747229690340e+02 -2.854331647728486e+02 -9.639841685947228e+01 + 4 4.418316193782279e+02 2.211223520423719e+02 3.525074401020420e+02 1.485213452078249e+02 + 5 2.573872882800243e+02 -1.684930375843794e+02 1.123827804076678e+02 -1.588345778524789e+02 + ME 2.954143563509706e-09 + +Event 77 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.911537813436147e+02 -2.642087240745080e+02 -4.088350218788157e+02 6.541950730783680e+01 + 3 3.180168689971177e+02 3.520456914156713e+01 -8.253704519800401e+01 -3.050950728023466e+02 + 4 3.461489397531647e+02 1.250503078887523e+02 3.201771174570675e+02 -4.084265473804997e+01 + 5 3.446804099061027e+02 1.039538470441886e+02 1.711949496197523e+02 2.805182202325598e+02 + ME 7.619107133112622e-09 + +Event 78 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.642050168228878e+02 4.544857132649140e+02 1.463535046289709e+01 -3.339997664116333e+02 + 3 1.651631715519659e+02 1.196484546942685e+02 -1.099426959841972e+02 -2.959263634933707e+01 + 4 2.320532834071475e+02 -7.238565948697827e+01 1.373958575216963e+02 1.724280167970126e+02 + 5 5.385785282179992e+02 -5.017485084722042e+02 -4.208851200039614e+01 1.911643859639578e+02 + ME 1.371761917314043e-07 + +Event 79 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.982601538273628e+02 -1.711694840703935e+02 -2.385903670700898e+02 -5.229496940965934e+01 + 3 3.869985664719069e+02 -7.300257822028925e+01 3.454374333335043e+02 1.584660647471954e+02 + 4 2.730442121954245e+02 -2.168309222333608e+02 1.645934868985690e+02 -2.113000348842466e+01 + 5 5.416970675053059e+02 4.610029845240435e+02 -2.714405531619835e+02 -8.504109184911137e+01 + ME 6.511557453413974e-09 + +Event 80 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.717649893571369e+02 6.886949171513177e+01 -2.685228819958284e+02 -2.477128625390008e+02 + 3 3.869685808114618e+02 5.957956738527029e+01 2.814529638922006e+02 2.588033747881130e+02 + 4 3.309739394987644e+02 1.882716768699517e+02 -1.270374363062544e+01 -2.719120063801442e+02 + 5 4.102924903326370e+02 -3.167207359703538e+02 -2.263382657468383e-01 2.608214941310320e+02 + ME 2.298668672399951e-08 + +Event 81 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.842246424902096e+02 -2.267486624627472e+02 -2.937281983436480e+02 -9.968633540199460e+01 + 3 2.254487557377375e+02 2.209193002070300e+01 1.769877698127917e+02 -1.378927751129431e+02 + 4 4.703100720128006e+02 -6.491977305379046e+01 4.323580934137871e+02 1.733305107675070e+02 + 5 4.200165297592530e+02 2.695765054958348e+02 -3.156176648829309e+02 6.424859974743075e+01 + ME 2.610412817505035e-09 + +Event 82 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.929255068593492e+02 -4.355325407251513e+02 -3.510627019846902e+02 -1.965376348924526e+02 + 3 7.260108906535528e+01 -5.579709963741175e+01 7.472103649087548e+00 -4.584505941304569e+01 + 4 5.079399281835097e+02 3.053634150176129e+02 1.183021662560418e+02 3.882792202410245e+02 + 5 3.265334758917856e+02 1.859662253449502e+02 2.252884320795608e+02 -1.458965259355263e+02 + ME 3.648330924144809e-07 + +Event 83 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.902208799106454e+02 9.347119462039890e+01 -6.680743332736715e+01 2.665109036504027e+02 + 3 6.713082397370666e+02 3.520657855373972e+01 4.944193978438478e+02 -4.527302823990740e+02 + 4 1.855962177862651e+02 -4.627668248951798e+01 -1.740298043062299e+02 -4.492273285839197e+01 + 5 3.528746625660226e+02 -8.240109068462066e+01 -2.535821602102507e+02 2.311421116070631e+02 + ME 2.846073631453881e-08 + +Event 84 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.787180416895206e+02 1.865558524434928e+02 1.788512602743489e+02 1.043689962613429e+02 + 3 5.712981506042247e+02 2.561938996798009e+02 -3.762285149930340e+02 -3.452511653228697e+02 + 4 4.097077405278727e+02 -4.006461115622685e+02 2.118683226805513e+01 8.303158481526167e+01 + 5 2.402760671783827e+02 -4.210364056102517e+01 1.761904224506301e+02 1.578505842462649e+02 + ME 1.393336053758218e-08 + +Event 85 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.203351269117373e+02 -1.925479700358236e+02 -6.940689928982219e+01 5.855968162880135e+02 + 3 5.381473375593997e+02 9.356601590033819e+01 1.871475275927688e+02 -4.958061723160798e+02 + 4 1.334694954173727e+02 6.261202027528761e+01 -5.387043968641776e+01 1.048418659315403e+02 + 5 2.080480401114898e+02 3.636993386019776e+01 -6.387018861652887e+01 -1.946325099034741e+02 + ME 1.175144186701299e-06 + +Event 86 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.865599090092867e+02 -2.891134797262823e+02 -7.185603877268264e+01 2.463304057272006e+02 + 3 2.932777885173375e+02 -1.951329295480071e+02 1.024098870135540e+02 -1.935128318368158e+02 + 4 5.494991859904238e+02 4.929671188610552e+02 -1.532307333884745e+02 1.882899823973623e+02 + 5 2.706631164829519e+02 -8.720709586765841e+00 1.226768851476032e+02 -2.411075562877469e+02 + ME 5.981558327141324e-08 + +Event 87 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.398434642042322e+02 -5.773916908620580e+01 -2.210310523256466e+02 7.305032226170286e+01 + 3 6.256736457816577e+02 -1.570961431352856e+02 3.525379921364367e+02 -4.924482479795606e+02 + 4 2.661332101449430e+02 1.721182608911090e+02 1.257989686761089e+02 1.593010021622582e+02 + 5 3.683496798691678e+02 4.271705133038212e+01 -2.573059084868993e+02 2.600969235555995e+02 + ME 1.397166363438410e-04 + +Event 88 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.084047713119921e+02 -9.094715275662553e+01 -2.599647375380904e+01 2.935409711195911e+02 + 3 6.399024272101833e+02 3.541182238176331e+02 -3.940685931943562e+02 -3.588667493200643e+02 + 4 2.347172247375546e+02 -1.607307767247329e+02 1.246137179386499e+02 1.171717299670462e+02 + 5 3.169755767402701e+02 -1.024402943362748e+02 2.954513490095153e+02 -5.184595176657282e+01 + ME 1.973456756036072e-08 + +Event 89 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.184418668698223e+02 5.725262999818232e+02 2.132430012949283e+02 9.597604349672923e+01 + 3 1.648425597874048e+02 -1.197110850513235e+02 -9.455524227052835e+01 -6.246304341176985e+01 + 4 5.018918856507312e+02 -4.440754270637876e+02 -1.508485608523586e+02 1.787097972941989e+02 + 5 2.148236876920411e+02 -8.739787866711962e+00 3.216080182795855e+01 -2.122227973791583e+02 + ME 1.568817273715900e-06 + +Event 90 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.957637279642276e+02 1.263767639048391e+02 1.039632395279027e+02 1.074429874782743e+02 + 3 6.255717748556117e+02 2.485042080720027e+02 -5.052377532279100e+02 -2.726178951934749e+02 + 4 5.792311181609888e+02 -2.996537209891232e+02 4.496683582853566e+02 2.086017816327423e+02 + 5 9.943337901917147e+01 -7.522725098771861e+01 -4.839384458534928e+01 -4.342687391754171e+01 + ME 2.736497039972114e-08 + +Event 91 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.017185800766916e+02 -1.626043578155511e+02 -4.726483587494785e+02 -4.341526672713017e+01 + 3 1.532087699529515e+02 4.558627180762441e+01 -1.068434756756598e+02 -9.989639992873859e+01 + 4 1.553335691954189e+02 1.187326020855014e+02 -7.919197047207838e+01 -6.131654535069170e+01 + 5 6.897390807749382e+02 -1.714516077574820e+00 6.586838048972166e+02 2.046282120065602e+02 + ME 9.288336681334200e-08 + +Event 92 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.316508895826993e+02 2.423717673725613e+02 -3.493294830668556e+02 7.448039418853939e+01 + 3 4.088752336424421e+02 -4.083682512007605e+02 -4.296296540485988e+00 1.989648042821913e+01 + 4 4.838676110831551e+02 3.367111480297710e+02 3.431854235720046e+02 -5.456402565332683e+01 + 5 1.756062656917031e+02 -1.707146642015718e+02 1.044035603533699e+01 -3.981284896343173e+01 + ME 2.680018893381737e-09 + +Event 93 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.625352690202036e+02 -2.779056014020862e+02 -1.510359273299077e+02 -1.771678488002014e+02 + 3 4.496460928618026e+02 1.458684829985395e+02 -2.529482449111344e+02 -3.419373917692631e+02 + 4 5.819497911300327e+02 7.907814180644722e+01 3.218768382402445e+02 4.783382776751110e+02 + 5 1.058688469879608e+02 5.295897659709960e+01 8.210733400079755e+01 4.076696289435350e+01 + ME 2.589724003231477e-07 + +Event 94 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.529640986072859e+02 -9.457834198297704e+01 -4.155446162454757e+01 1.128103692467342e+02 + 3 5.452273502833522e+02 1.506136657220608e+02 3.951184420445458e+02 -3.441944275421369e+02 + 4 5.763591625604005e+02 -1.414467252236214e+02 -5.409858543903301e+02 1.397033054025702e+02 + 5 2.254493885489612e+02 8.541140148453734e+01 1.874218739703320e+02 9.168075289283256e+01 + ME 1.947047683121928e-08 + +Event 95 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.175930213981758e+02 1.049723762521991e+02 5.988073145300190e+02 1.087738036893143e+02 + 3 2.127444997197509e+02 1.110742673830455e+02 1.426661177414863e+01 -1.808844743885239e+02 + 4 3.734458243090439e+02 -6.700755739503158e+01 -3.574088045654868e+02 8.503362490734212e+01 + 5 2.962166545730298e+02 -1.490390862402129e+02 -2.556651217386811e+02 -1.292295420813219e+01 + ME 2.175144310909644e-08 + +Event 96 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.336643939052875e+02 5.655461284496032e+01 -2.475517668243394e+02 -3.515458790106136e+02 + 3 3.201335954241758e+02 2.737812519173168e+02 1.122352583779800e+02 1.221989844255046e+02 + 4 2.711474972504125e+02 -1.056171090554795e+02 1.641528331527196e+02 -1.882015911406193e+02 + 5 4.750545134201236e+02 -2.247187557067975e+02 -2.883632470636028e+01 4.175484857257282e+02 + ME 2.420565316254954e-08 + +Event 97 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.808150504334330e+02 -2.215516143647532e+02 2.522196782723236e+02 1.797782486876414e+02 + 3 1.725086962483917e+02 -1.958631536182567e+01 -1.200850556071196e+01 -1.709719928118794e+02 + 4 6.244594303322471e+02 3.979033339800429e+02 -4.294715131468292e+02 -2.172020633737498e+02 + 5 3.222168229859278e+02 -1.567654042534641e+02 1.892603404352173e+02 2.083958074979878e+02 + ME 4.352284085440343e-09 + +Event 98 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.497882471555648e+02 -2.192521180269852e+02 2.018837878810383e+02 -3.368692805982172e+02 + 3 3.552361781915542e+02 9.190647471572817e+01 -1.700004974647006e+02 2.980700807917883e+02 + 4 3.423969339559752e+02 -8.430327104189780e+01 -1.816338984228904e+02 2.777368283425730e+02 + 5 3.525786406969056e+02 2.116489143531549e+02 1.497506080065528e+02 -2.389376285361441e+02 + ME 9.816266504356063e-06 + +Event 99 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.510905676127444e+02 -1.120176118685159e+02 1.002985425558891e+02 -1.485316848286262e+01 + 3 6.608990669934888e+02 5.206564204577553e+02 -3.715703155588059e+02 1.662527268483447e+02 + 4 4.055868262761770e+02 -2.099131999005441e+02 1.513461738821256e+02 -3.123002686638893e+02 + 5 2.824235391175904e+02 -1.987256086886954e+02 1.199255991207911e+02 1.609007102984069e+02 + ME 8.331459372890322e-07 + +Event 100 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.912277729130220e+02 -3.038923856333700e+02 -3.681394565520995e+02 -1.158770182765827e+02 + 3 3.291961677177790e+02 9.682949861260764e+01 4.959602220292174e+01 -3.106998545544404e+02 + 4 1.561943773057186e+02 1.080498253360949e+02 -6.909857434628779e+01 8.914766272915456e+01 + 5 5.233816820634804e+02 9.901306168466753e+01 3.876420086954656e+02 3.374292101018685e+02 + ME 1.393819127647782e-08 + +Event 101 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.606145981152812e+02 1.415165413755632e+02 -1.858039240081087e+02 1.156284527747264e+02 + 3 3.602882052374051e+02 2.118000521994822e+02 1.364734610909919e+02 2.575331495930819e+02 + 4 4.124277552237738e+02 -3.176993998179824e+02 2.596287687502778e+02 4.191237372697500e+01 + 5 4.666694414235400e+02 -3.561719375706302e+01 -2.102983058331611e+02 -4.150739760947835e+02 + ME 1.488897902552855e-08 + +Event 102 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.668883721914399e+02 -1.522538817869545e+02 1.714625751179097e+02 6.262263502751125e+02 + 3 1.233366340807367e+02 9.011481525477787e+01 7.793251741380510e+01 -3.190247807788268e+01 + 4 1.269706430435817e+02 -4.043133476762945e+01 5.414615182810899e+01 -1.074943980215523e+02 + 5 5.828043506842416e+02 1.025704012998063e+02 -3.035412443598238e+02 -4.868294741756775e+02 + ME 3.297617806632213e-07 + +Event 103 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.552864941980412e+02 -3.167444776289482e+02 2.214161018629589e+02 -5.291958382354646e+02 + 3 1.601276089464259e+02 -7.094294880163687e+01 -2.470441050126062e+01 1.414130166003577e+02 + 4 5.894184034750448e+02 3.412800894354302e+02 -1.500599500250239e+02 4.565347372418694e+02 + 5 9.516749338048810e+01 4.640733699515487e+01 -4.665174133667438e+01 -6.875191560676257e+01 + ME 2.932130523403274e-07 + +Event 104 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.774569993979300e+02 1.989410031267868e+02 4.017120069248927e+02 1.643627909271369e+02 + 3 4.609712540524605e+01 4.243610185127382e+01 -1.704461951459786e+01 -5.796824639221475e+00 + 4 7.261932715446645e+02 -3.396385607991187e+02 -6.122865574881962e+02 -1.926330375981752e+02 + 5 2.502526036521592e+02 9.826145582105819e+01 2.276191700779015e+02 3.406707131025968e+01 + ME 3.831308408331831e-07 + +Event 105 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.921789576562784e+02 4.810279062964443e+02 1.348719512102337e+02 4.790964616472718e+02 + 3 8.813504188469315e+01 -2.537319850765734e+01 7.858109277220775e+01 3.080581542880034e+01 + 4 6.360767083273016e+01 -3.678422527687845e+01 -3.637890142810105e+01 -3.700583859919021e+01 + 5 6.560783296262979e+02 -4.188704825119085e+02 -1.770741425543404e+02 -4.728964384768819e+02 + ME 1.082894035183429e-05 + +Event 106 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.864390473248633e+02 2.130816993347910e+02 -9.460577540765872e+00 1.911910424511779e+02 + 3 3.195711363524375e+02 -1.238775433747336e+02 -2.683784353696865e+02 1.214622610753980e+02 + 4 5.745504627825516e+02 2.049135896350914e+02 3.226669556919594e+02 -4.289576794638239e+02 + 5 3.194393535401477e+02 -2.941177455951488e+02 -4.482794278150708e+01 1.163043759372481e+02 + ME 1.234446722151009e-08 + +Event 107 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.722313928324554e+02 -1.968575188090820e+02 1.163894612093210e+02 -2.936951147324818e+02 + 3 5.656198121119706e+02 -1.543046273498362e+02 8.076299742135981e+01 5.381386364864782e+02 + 4 4.865572520387377e+01 -4.212119983306869e+01 2.435239455081530e+01 3.807878398712239e-01 + 5 5.134930698517002e+02 3.932833459919871e+02 -2.215048531814962e+02 -2.448243095938675e+02 + ME 1.098825212225620e-06 + +Event 108 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 7.379979300943136e+02 -3.192200473520488e+02 -3.606896713798772e+02 5.591444063494898e+02 + 3 1.260099028519024e+01 3.978889775076310e+00 1.147615618471866e+01 3.354285549740169e+00 + 4 7.222347693662582e+02 2.991742959970567e+02 3.284329357345791e+02 -5.694291961437907e+02 + 5 2.716631025423775e+01 1.606686157991582e+01 2.078057946057941e+01 6.930504244560659e+00 + ME 2.059541454146206e-04 + +Event 109 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.231511027318798e+02 2.454122241586620e+02 -1.092654998279543e+02 -1.796121543150015e+02 + 3 1.956814867717928e+02 1.324393710405636e+02 -9.556622719590956e+01 -1.077875386264064e+02 + 4 5.871682488784802e+02 -4.565221017188252e+02 -1.796226224478535e+02 3.226295656603770e+02 + 5 3.939991616178473e+02 7.867050651959941e+01 3.844543494717174e+02 -3.522987271896919e+01 + ME 1.131201628261414e-05 + +Event 110 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.199007184505405e+01 3.732711745037530e+01 1.830560612245135e+01 5.895525497219110e+00 + 3 6.503495414798849e+02 6.292604094065496e+02 -1.169464273078949e+02 1.153663572993340e+02 + 4 5.826055008056769e+02 -5.629196868847104e+02 1.294559693061781e+02 7.610353275407947e+01 + 5 2.250548858693838e+02 -1.036678399722146e+02 -3.081514812073457e+01 -1.973654155506326e+02 + ME 2.373720202487503e-05 + +Event 111 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.499685704497380e+02 1.681858109101244e+02 -7.955231263377716e+01 -1.669408541244690e+02 + 3 2.500774020307764e+02 -9.118504148310892e+01 1.285070504366491e+02 -1.941904560071345e+02 + 4 4.449919367221886e+02 -3.058493380776594e+02 3.227017355837655e+02 1.837378557748528e+01 + 5 5.549620907972972e+02 2.288485686506438e+02 -3.716564733866373e+02 3.427575245541182e+02 + ME 1.470492043078410e-08 + +Event 112 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.601284604146208e+02 -2.488585849081573e+02 -5.878734146366800e+02 1.680590293030910e+02 + 3 3.001424246875746e+02 -1.647249933729962e+01 1.562495115994508e+02 -2.557346710711165e+02 + 4 3.055316759483335e+02 9.306007508284046e+01 2.734221395002294e+02 9.964818645861378e+01 + 5 2.341974389494710e+02 1.722710091626164e+02 1.582017635369998e+02 -1.197254469058826e+01 + ME 1.619745550065749e-08 + +Event 113 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.646683093846072e+02 2.910998267486567e+02 3.270673291512863e+02 1.555779252178637e+02 + 3 1.032835588102810e+02 6.414528091080065e+01 -8.089516327050815e+01 -2.974729706893169e+00 + 4 2.576709858897333e+02 5.223657579993224e+01 2.415431221983603e+02 7.295613227654688e+01 + 5 6.743771459153788e+02 -4.074816834593897e+02 -4.877152880791386e+02 -2.255593277875174e+02 + ME 7.681413772994171e-06 + +Event 114 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.292401292391440e+02 -4.020985695220133e+02 -3.022214392513490e+02 -1.645419595187190e+02 + 3 2.852547491939839e+02 5.684779875308551e+01 2.983811334987575e+01 -2.779357600352486e+02 + 4 5.503881444993327e+02 3.517711961045184e+02 2.897049565647914e+02 3.086343683687983e+02 + 5 1.351169770675392e+02 -6.520425335590628e+00 -1.732163066331816e+01 1.338433511851691e+02 + ME 6.022091148209651e-07 + +Event 115 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.315689135772181e+02 1.523084328556000e+02 1.421486881719875e+02 1.010942800923345e+02 + 3 4.774006609503493e+02 -1.978437903340176e+02 -1.809847573733626e+02 3.949857507564100e+02 + 4 1.705370598210000e+02 -1.094359051505278e+02 -9.529413476772473e+01 8.958626744734215e+01 + 5 6.204933656514328e+02 1.549712626289454e+02 1.341302039690998e+02 -5.856662982960866e+02 + ME 2.583369958889061e-07 + +Event 116 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.746322505032659e+02 1.490212136649899e+02 -3.941831318833100e+01 -6.567857701582011e+02 + 3 3.002577903546940e+02 2.698491623731484e+01 1.898406713834985e+02 2.310564313171373e+02 + 4 3.649703499796597e+02 -2.118033082945360e+02 -1.168367756298047e+02 2.732981573669967e+02 + 5 1.601396091623805e+02 3.579717839223127e+01 -3.358558256536293e+01 1.524311814740669e+02 + ME 1.103840180080067e-06 + +Event 117 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.989590248458575e+02 1.044204896489002e+02 1.692644965960478e+02 -5.530379840932138e+00 + 3 4.228744835378425e+02 3.264095412410632e+02 -1.699630168106393e+02 -2.083079766375305e+02 + 4 4.224386223860297e+02 -2.861508131031816e+02 2.925187696477572e+02 -1.049041050081309e+02 + 5 4.557278692302706e+02 -1.446792177867819e+02 -2.918202494331658e+02 3.187424614865934e+02 + ME 4.222883609567332e-09 + +Event 118 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.729668676760357e+02 1.184007139072070e+02 5.539744922226419e+02 -8.593348804405296e+01 + 3 2.157021508192258e+02 -1.942718312667870e+02 -3.003467563250634e+01 8.879071856866089e+01 + 4 6.030943128170970e+02 6.761820676461598e+01 -5.931358380448543e+02 -8.567616875825117e+01 + 5 1.082366686876419e+02 8.252910594964055e+00 6.919602145471869e+01 8.281893823364319e+01 + ME 1.197130064463845e-07 + +Event 119 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.846061745194154e+02 -5.587431713332440e+01 2.848851387904504e+02 -2.522705449704536e+02 + 3 3.723414251304717e+02 -7.909406967610423e+01 2.575223087846816e+02 2.570302034556822e+02 + 4 2.507014391707247e+02 -1.454225725560075e+02 -1.575427155496305e+02 -1.299375995265172e+02 + 5 4.923509611793876e+02 2.803909593654362e+02 -3.848647320255016e+02 1.251779410412884e+02 + ME 6.987478149515427e-09 + +Event 120 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.122124974385885e+02 -1.805344246922925e+02 -4.186310826559472e+01 3.682036728658805e+02 + 3 4.103314828537498e+02 1.875880572101384e+02 3.493840084974134e+02 1.054204022917875e+02 + 4 2.606101940762739e+02 1.386532314613984e+02 -1.016069521191984e+01 -2.204307486141520e+02 + 5 4.168458256313883e+02 -1.457068639792442e+02 -2.973602050198988e+02 -2.531933265435160e+02 + ME 1.522037133407384e-08 + +Event 121 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.648818809703109e+02 9.112562142302345e+01 5.529617988614829e+02 3.577670831179963e+02 + 3 1.821081589233734e+02 -1.118989809065603e+02 -1.417154481828441e+02 -2.363749912468558e+01 + 4 3.177811324832343e+02 1.923141187866275e+02 -1.574082799297883e+02 -1.980473713210938e+02 + 5 3.352288276230817e+02 -1.715407593030907e+02 -2.538380707488505e+02 -1.360822126722171e+02 + ME 1.427969941103858e-08 + +Event 122 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.318877662083166e+02 -1.287773968646637e+02 1.171672255817822e+01 -2.595155765412092e+01 + 3 5.737869076225661e+02 4.983007023876715e+02 -1.830722893772108e+02 -2.177437995011737e+02 + 4 4.899092372804375e+02 -1.418218373570128e+02 1.492994579099246e+02 4.445304253807424e+02 + 5 3.044160888886793e+02 -2.277014681659949e+02 2.205610890910764e+01 -2.008350682254478e+02 + ME 8.667372063479675e-08 + +Event 123 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.617768154532660e+02 -5.530096067488929e+01 -2.708467093957606e+02 3.698941619545819e+02 + 3 4.024250741463961e+02 3.719307063830553e+02 -8.950215258237559e+01 -1.249113871280559e+02 + 4 5.686589162433559e+02 -3.599400046259339e+02 3.327673296178381e+02 -2.882395885924827e+02 + 5 6.713919415698200e+01 4.331025891776792e+01 2.758153236029808e+01 4.325681376595668e+01 + ME 2.692696839499492e-07 + +Event 124 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.379698547837551e+02 -1.418344380556738e+02 4.784715070099304e+02 -2.008969233640271e+02 + 3 6.969091655902267e+02 1.102655237134663e+02 -6.144259960763414e+02 3.098460822883782e+02 + 4 1.204076926314279e+02 -5.195962553876775e+01 1.084548321656371e+02 5.979894532426239e+00 + 5 1.447132869945906e+02 8.352853988097523e+01 2.749965690077405e+01 -1.149290534567774e+02 + ME 5.461252319415605e-07 + +Event 125 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.993265030449273e+02 -2.447949992392673e+02 -4.282124327582629e+02 3.404435019658305e+02 + 3 6.731775329270110e+01 -2.804109752229690e+01 -6.119041173487811e+01 1.053693426996917e+00 + 4 1.243834765225636e+02 -1.197301671655536e+02 -1.282222238280984e+01 -3.116932651684168e+01 + 5 7.089722671398082e+02 3.925662639271179e+02 5.022250668759508e+02 -3.103278688759856e+02 + ME 5.469450028911744e-06 + +Event 126 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.963413774872841e+02 -2.028966757095202e+02 -8.071348940097575e+01 -2.003409185009523e+02 + 3 5.505085443412618e+02 -3.540820098777997e+02 -1.472538634584982e+02 3.949707424230035e+02 + 4 5.980459330604076e+02 5.127370036025510e+02 2.537494953815607e+02 -1.742724785511865e+02 + 5 5.510414511104668e+01 4.424168198476883e+01 -2.578214252208698e+01 -2.035734537086468e+01 + ME 3.703478689630513e-07 + +Event 127 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.341333562245315e+02 1.279906072472883e+02 1.954399695910118e+02 1.549358705071582e+01 + 3 2.952995190591675e+02 2.065736836642964e+00 4.076907777821773e+01 -2.924643926788542e+02 + 4 3.901989577777041e+02 -5.888488716750150e+01 3.336956288095710e+02 1.934813273353844e+02 + 5 5.803681669385968e+02 -7.117145691642982e+01 -5.699046761788006e+02 8.348947829275389e+01 + ME 7.048942410786899e-09 + +Event 128 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.006194261205288e+02 1.970078759501975e+02 2.223923104087647e+01 -3.068334325383111e+01 + 3 4.169679269604398e+02 1.948380004768638e+02 -3.622744174691725e+02 -6.824699356921091e+01 + 4 4.053889184975367e+02 7.500867626306021e+01 3.464478799306621e+02 1.966919932722616e+02 + 5 4.770237284214948e+02 -4.668545526901215e+02 -6.412693502366069e+00 -9.776165644921963e+01 + ME 5.241692106099753e-09 + +Event 129 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.252915081508855e+02 -9.538237368340913e+01 -7.350539936684783e+01 5.113025792912360e+02 + 3 3.101175064357083e+02 2.980876593097250e+02 -2.924507148532651e+01 8.038246673851862e+01 + 4 3.069384995973983e+02 -1.872130733221282e+02 3.995859154565954e+01 -2.399287783365572e+02 + 5 3.576524858160083e+02 -1.549221230418743e+01 6.279187930651464e+01 -3.517562676931971e+02 + ME 4.510719923219567e-07 + +Event 130 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.459228778168206e+02 2.565546925335566e+02 -2.098380620336044e+02 5.544042221593887e+02 + 3 3.439568781167829e+02 -2.720151357658145e+02 1.417213346239043e+02 -1.556571978116284e+02 + 4 4.116171180733704e+02 -4.853282653097614e+01 -6.103612751111114e+00 -4.087003334367684e+02 + 5 9.850312599302548e+01 6.399326976323378e+01 7.422034016081112e+01 9.953309089007995e+00 + ME 1.009215808611906e-06 + +Event 131 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.691384726730905e+02 9.209415983561640e+01 8.878922249924504e+01 -3.462634137467797e+02 + 3 2.941454650704778e+02 5.402596827688082e+01 5.252299287417019e+01 2.843309420249809e+02 + 4 3.384067227193843e+02 -4.862827719487453e+01 3.183719183147821e+02 -1.038928403081678e+02 + 5 4.983093395370473e+02 -9.749185091762267e+01 -4.596841336881973e+02 1.658253120299667e+02 + ME 6.136966240276261e-09 + +Event 132 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.707345198779215e+02 6.870837694602631e+01 -2.400964784749993e+02 1.045467369881799e+02 + 3 4.279656548163086e+02 3.103112050689890e+02 2.902864584573433e+02 5.094437895662996e+01 + 4 4.190719066649796e+02 -1.246682736407299e+02 1.263571350494781e+02 -3.796221264960058e+02 + 5 3.822279186407903e+02 -2.543513083742854e+02 -1.765471150318222e+02 2.241310105511960e+02 + ME 1.724145733357482e-08 + +Event 133 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.929720700957797e+02 5.142339919817744e+02 2.604838772561675e+02 -3.846060856420664e+02 + 3 3.148753114588353e+01 -2.203036177987943e+01 1.741009785128097e+01 -1.424837781361216e+01 + 4 2.496211560069210e+02 -1.554620265425120e+02 -1.952705634097225e+02 3.418610123488827e+00 + 5 5.259192427514150e+02 -3.367416036593829e+02 -8.262341169772583e+01 3.954358533321899e+02 + ME 1.238961772659907e-05 + +Event 134 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.197916906084878e+02 6.019490617396246e+01 -8.116208159236564e+01 -6.433769440337217e+01 + 3 5.683824394481226e+02 1.081755691462717e+02 -5.398427847909498e+02 1.411609415597358e+02 + 4 4.816985571718546e+02 -2.884024598071591e+02 3.717366705283751e+02 1.032926374099569e+02 + 5 3.301273127715343e+02 1.200319844869249e+02 2.492681958549404e+02 -1.801158845663207e+02 + ME 4.044329551622419e-08 + +Event 135 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.350166624422527e+02 -2.198562968051228e+02 -3.373781523021513e+01 -2.505217209995491e+02 + 3 5.912215178852441e+02 -2.771944434106617e+01 -4.569913276888498e+02 3.740767862794175e+02 + 4 2.502486776794080e+02 6.054245701130881e+01 2.317565313843600e+02 -7.244254095499562e+01 + 5 3.235131419930953e+02 1.870332841348801e+02 2.589726115347048e+02 -5.111252432487285e+01 + ME 5.564179156041390e-08 + +Event 136 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.090067243858946e+02 -5.732442171651005e+01 7.824626590657545e+01 4.973830021108072e+01 + 3 6.815640342145938e+02 -4.337142854700792e+02 -4.067901902413736e+02 3.330813600870479e+02 + 4 2.032618343052464e+02 1.129685178335902e+02 1.212961788254292e+02 -1.176466075412493e+02 + 5 5.061674070942652e+02 3.780701893529991e+02 2.072477455093691e+02 -2.651730527568794e+02 + ME 6.883104349826221e-07 + +Event 137 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.368852252705568e+02 2.060183932929131e+02 2.064637249428417e+02 -3.252658173977682e+02 + 3 3.381060129384423e+02 1.187665134594073e+02 -2.812383212949928e+02 1.453106943793225e+02 + 4 4.559721413906877e+02 -1.886887365516218e+02 2.518423412375508e+02 3.299736195257901e+02 + 5 2.690366204003139e+02 -1.360961702006985e+02 -1.770677448853995e+02 -1.500184965073444e+02 + ME 1.160548431187924e-08 + +Event 138 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.281444835382400e+02 -7.170216505610387e+01 8.048316021729237e+01 3.099355780227290e+02 + 3 4.195412269153062e+02 -8.233072610126706e+01 3.843189873918888e+02 1.467494754720159e+02 + 4 5.954423007595251e+02 2.591445083415473e+02 -3.916019632055438e+02 -3.661195975958926e+02 + 5 1.568719887869287e+02 -1.051116171841762e+02 -7.320018440363727e+01 -9.056545589885236e+01 + ME 6.549075898554983e-08 + +Event 139 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.608240142934881e+02 -1.978529853543028e+02 -1.693530849717742e+02 -1.424412963654433e+01 + 3 4.955759006510128e+02 -4.667016398458182e+02 -1.515076386550367e+02 6.950171293185221e+01 + 4 6.747340014191125e+02 6.026021606891686e+02 2.951526224468365e+02 -7.086281159076073e+01 + 5 6.886608363638693e+01 6.195246451095252e+01 2.570810117997448e+01 1.560522829545275e+01 + ME 1.584556714413430e-05 + +Event 140 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.602659806312457e+02 -3.561732527960755e+02 2.435133213622238e+01 -4.836531211568242e+01 + 3 3.725079748856116e+02 -2.434506824135563e+02 -2.792614056347937e+02 -3.882040582776655e+01 + 4 4.679082590584684e+02 4.480807144504858e+02 8.348713917835198e+01 -1.057908777942770e+02 + 5 2.993177854246740e+02 1.515432207591460e+02 1.714229343202193e+02 1.929765957377260e+02 + ME 1.397449795178337e-08 + +Event 141 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.518456049687265e+02 -1.447323876721944e+02 -2.797778873058074e+02 -4.531119524540313e+02 + 3 3.714883419349469e+02 1.931277822064916e+02 8.611260447142448e+01 3.054339000253999e+02 + 4 3.355296667174945e+02 -2.406718940601041e+02 6.932072359930869e+01 2.232752425521988e+02 + 5 2.411363863788320e+02 1.922764995258069e+02 1.243445592350743e+02 -7.559719012356737e+01 + ME 2.289959978971276e-08 + +Event 142 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.034813172564561e+02 -2.283824334287206e+02 -1.981635898359732e+02 -2.595314409103105e+01 + 3 6.163677719793855e+02 6.075815331760192e+02 1.023397473350788e+02 1.674774592897086e+01 + 4 2.855126706949896e+02 -1.929815176467484e+02 2.738809148793401e+01 -2.086276861272057e+02 + 5 2.946382400691695e+02 -1.862175821005503e+02 6.843575101296032e+01 2.178330842892659e+02 + ME 2.845394223688494e-08 + +Event 143 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.765102965824572e+02 6.404671225068564e+01 -2.523880643688529e+02 -9.303885064928589e+01 + 3 4.906331167889079e+02 4.654623693262333e+02 -8.642087129466307e+01 1.288296201806037e+02 + 4 3.107154638669692e+02 -1.787822362222275e+02 1.647042861868788e+02 -1.935290924102013e+02 + 5 4.221411227616651e+02 -3.507268453546915e+02 1.741046494766373e+02 1.577383228788834e+02 + ME 8.618192815594796e-09 + +Event 144 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.275344822318363e+02 -5.170608027367086e+02 7.533492100171158e+01 -7.256311662648034e+01 + 3 8.007363982231998e+01 5.428447222359202e+01 4.041177195768910e+00 -5.872523100570222e+01 + 4 6.090813110431084e+02 5.981821680688868e+02 -2.587994404401108e+01 -1.117513568717483e+02 + 5 2.833105669027356e+02 -1.354058375557700e+02 -5.349615415346947e+01 2.430397045039308e+02 + ME 1.282321413165749e-06 + +Event 145 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.325096538893530e+02 -2.426159535975006e+02 -3.315129682972141e+02 -3.388261831619632e+02 + 3 2.284791393037104e+02 -1.566914323798220e+02 8.733052769045943e+01 1.415057986410094e+02 + 4 4.231517474846562e+02 4.111259958116378e+02 7.341849952547859e+01 -6.813619371989205e+01 + 5 3.158594593222808e+02 -1.181860983431524e+01 1.707639410812761e+02 2.654565782408458e+02 + ME 1.989700748448432e-07 + +Event 146 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.853154876963472e+02 -1.115425014580856e+02 2.346915094935503e+00 4.723175679095089e+02 + 3 1.780978034776686e+02 -1.279353210791639e+02 1.013248544366916e+02 7.130676754225195e+01 + 4 2.669235424450998e+02 2.236642823219127e+02 1.425247145974822e+02 -3.015248006003818e+01 + 5 5.696631663808841e+02 1.581354021533682e+01 -2.461964841291093e+02 -5.134718553917226e+02 + ME 9.542241308891179e-08 + +Event 147 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.616553850833649e+02 -3.952525530052050e+02 -1.318566300751644e+02 1.987836588468952e+02 + 3 2.908739185877553e+02 2.228658584604865e+02 -1.479014920521994e+02 -1.142960817176148e+02 + 4 2.305801020752397e+02 -4.980254073033321e+01 -8.282806011201670e+01 2.093475647527613e+02 + 5 5.168905942536400e+02 2.221892352750518e+02 3.625861822393804e+02 -2.938351418820417e+02 + ME 3.925248230183511e-08 + +Event 148 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.986236365167859e+02 2.143922541391384e+02 7.424054753538570e+01 -1.941658537263818e+02 + 3 5.431300986327866e+02 -2.806204744558453e+02 1.772213579739537e+02 4.299244627081655e+02 + 4 2.075257794515811e+02 -1.671248660321451e+01 1.739190576128833e+02 -1.119812632879726e+02 + 5 4.507204853988458e+02 8.294070691992133e+01 -4.253809631222227e+02 -1.237773456938111e+02 + ME 1.792548862963308e-08 + +Event 149 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.606702652730058e+02 1.482150598519967e+02 5.691576771795033e+01 -2.465411854119752e+01 + 3 5.470495180870233e+02 2.976789640827242e+02 4.494205378211043e+02 -9.312137115866565e+01 + 4 8.855244506584305e+01 2.448792744151061e+01 -2.255805030539081e+01 -8.205492857335213e+01 + 5 7.037277715741276e+02 -4.703819513762315e+02 -4.837782552336639e+02 1.998304182732153e+02 + ME 3.022640231901066e-06 + +Event 150 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.589228438361087e+02 -4.599888281396891e+01 -1.940699740613964e+02 1.651120438001223e+02 + 3 3.672343011246725e+02 -1.252842613728790e+02 -3.439632022826295e+02 -2.922672151058827e+01 + 4 2.630407655820263e+02 -2.136932482478519e+02 6.383958259969688e+01 -1.394637863560174e+02 + 5 6.108020894571932e+02 3.849763924346998e+02 4.741935937443291e+02 3.578464066483269e+00 + ME 2.451753064577522e-08 + +Event 151 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.074288193573346e+02 1.543896703986276e+02 -1.365285657072381e+02 2.346264094481421e+01 + 3 1.187518680134530e+02 6.614859683574460e+01 2.146588978980583e+01 -9.625790808488716e+01 + 4 5.855490127465466e+02 -2.497256519667726e+01 4.593548187907378e+02 -3.622667080614524e+02 + 5 5.882702998826659e+02 -1.955657020376949e+02 -3.442921428733055e+02 4.350619752015253e+02 + ME 1.403761429841276e-07 + +Event 152 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.469187816458224e+02 3.346653279286313e+01 6.576737700245403e+00 2.445518808627397e+02 + 3 2.050488318670080e+02 2.024852188395404e+02 -3.198592830617967e+01 -4.654029643207478e+00 + 4 4.457639178610945e+02 1.763406247999739e+02 -3.941620330002511e+02 -1.106604999678583e+02 + 5 6.022684686260751e+02 -4.122923764323775e+02 4.195712236061854e+02 -1.292373512516739e+02 + ME 8.116477778827081e-09 + +Event 153 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.388118256285087e+02 -1.907263201164206e+02 2.746355408008761e+02 5.470140518836757e+01 + 3 4.321891825954874e+02 3.144038017692075e+02 9.731608721136159e+01 -2.801201851982380e+02 + 4 2.946402774128100e+02 -2.098835107053740e+02 -1.526675250199261e+02 -1.394791447212631e+02 + 5 4.343587143631935e+02 8.620602905258723e+01 -2.192841029923117e+02 3.648979247311337e+02 + ME 4.626132947604298e-09 + +Event 154 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 7.166018743478079e+02 2.716108235141309e+02 -4.142745723228110e+02 -5.178053549312899e+02 + 3 4.336582961481601e+02 -2.527703288032556e+02 2.658228397098244e+02 2.313112547703298e+02 + 4 1.758894695506488e+02 -5.524813141932555e+01 1.166356953616248e+02 1.195025691815528e+02 + 5 1.738503599533830e+02 3.640763670845025e+01 3.181603725136177e+01 1.669915309794072e+02 + ME 9.739017552565555e-07 + +Event 155 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.311412179822988e+02 4.570041908288474e+00 2.309160670256665e+02 -9.118517242124817e+00 + 3 1.127940168856365e+02 9.688938222147939e+01 5.762608966553506e+01 -3.764524909869582e+00 + 4 4.841340752681733e+02 1.199724179371484e+02 1.518135540047473e+02 -4.437849328115266e+02 + 5 6.719306898638915e+02 -2.214318420669161e+02 -4.403557106959490e+02 4.566679749635209e+02 + ME 6.851747290447632e-07 + +Event 156 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.939383624002055e+02 -5.584434953296778e+01 -1.074936322310989e+02 -1.514549968323212e+02 + 3 5.333164952329516e+02 -4.350263902124027e+02 2.486552239121393e+01 -3.075064709929489e+02 + 4 5.439544646395684e+02 2.632706271852285e+02 6.316511808396706e+01 4.717893643568650e+02 + 5 2.287906777272746e+02 2.276001125601422e+02 1.946299175591791e+01 -1.282789653159498e+01 + ME 1.481000882395586e-07 + +Event 157 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.312192489929148e+02 -1.585569120979517e+02 1.680571010706740e+02 -8.880175140797474e+00 + 3 4.848229799559913e+02 2.683425948717759e+02 -3.974996855026540e+02 7.098995489631305e+01 + 4 4.746943934695868e+02 8.517047965358651e+01 4.145824897329423e+02 -2.149467743276730e+02 + 5 3.092633775815074e+02 -1.949561624274110e+02 -1.851399053009623e+02 1.528369945721574e+02 + ME 5.434949567094156e-09 + +Event 158 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.018805202065023e+02 -1.753303435111355e+02 -2.369304707527992e+02 -5.247698383836232e+02 + 3 8.634821849561426e+01 -2.991645269896793e+01 7.632972427838878e+01 -2.710708185810307e+01 + 4 4.997026770426654e+02 3.739093325581300e+02 1.867465724157422e+01 3.309770893074772e+02 + 5 3.120685842552181e+02 -1.686625363480265e+02 1.419260892328361e+02 2.208998309342491e+02 + ME 5.788602537992303e-07 + +Event 159 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.303650459443541e+02 1.779155779553055e+02 1.687725002807367e+02 3.536608022392421e+02 + 3 5.511053464986993e+02 -4.854202618317909e+02 -2.099654990918666e+02 -1.549153366639674e+02 + 4 1.610168062150695e+02 -8.022454684444302e+00 -1.072391010449718e+02 -1.198408415841761e+02 + 5 3.575128013418773e+02 3.155271385609297e+02 1.484320998561018e+02 -7.890462399109865e+01 + ME 2.063727006087920e-08 + +Event 160 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.944516008522268e+02 -6.281446959798443e+01 1.015008487838442e+02 -1.535035673177559e+02 + 3 4.230235916153152e+02 -3.998222205375997e+02 -6.268267453255914e+01 -1.231342086544158e+02 + 4 6.245424625752944e+02 4.116166861635971e+02 1.496811615662379e+02 4.452196548935073e+02 + 5 2.579823449571633e+02 5.102000397198710e+01 -1.884993358175229e+02 -1.685818789213359e+02 + ME 3.679115014007942e-08 + +Event 161 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.155018654656784e+02 -7.068712627844450e+01 9.130062612448707e+01 2.864746729386987e+00 + 3 4.158111502215671e+02 2.244999292291257e+02 2.797316750395929e+02 -2.103541879883635e+02 + 4 2.674174137253543e+02 -2.901773797454457e+01 2.441511879743710e+02 -1.051676825697958e+02 + 5 7.012695705874006e+02 -1.247950649761366e+02 -6.151834891384510e+02 3.126571238287723e+02 + ME 1.233407114871100e-07 + +Event 162 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.251731088161694e+02 4.809658489651716e+02 2.183673650866463e+02 -3.344083760631615e+02 + 3 1.108846666575800e+02 1.085837095121458e+02 1.269400989282292e+01 -1.854317775316524e+01 + 4 4.812365383625109e+02 -3.785395977737375e+02 -2.468116052076602e+02 1.654702701612802e+02 + 5 2.827056861637403e+02 -2.110099607035797e+02 1.575023022819105e+01 1.874812836550461e+02 + ME 2.983265920792471e-06 + +Event 163 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.197406137989224e+02 3.484446545657323e+01 -2.083509112967882e+02 6.051196858118802e+01 + 3 2.294753481748079e+02 -4.289167430922014e+01 1.411072116241522e+02 1.758066964667666e+02 + 4 6.045742534248396e+02 -3.922481835179264e+01 -2.454372160591728e+02 -5.511188751100746e+02 + 5 4.462097846014298e+02 4.727202720443962e+01 3.126809157318087e+02 3.148002100621198e+02 + ME 9.864732327742836e-08 + +Event 164 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.294925844427888e+02 7.335206987339838e+01 3.211431815175449e+02 7.203749916922466e+00 + 3 4.456282610861912e+02 -2.140706694514153e+02 -2.874930256302156e+02 2.647754818205600e+02 + 4 5.123820383524130e+02 1.705541274100711e+02 -2.866217204657403e+01 -4.823122668387517e+02 + 5 2.124971161186064e+02 -2.983552783205418e+01 -4.987983840755344e+00 2.103330351012688e+02 + ME 1.602732609424759e-06 + +Event 165 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.181198415073812e+02 -4.576729557413964e+01 1.980904969172528e+01 2.123422272308200e+02 + 3 2.986822563453929e+02 -2.114010465926206e+02 -1.050902232874885e+02 -1.829664797838815e+02 + 4 6.054978258860258e+02 4.739070609379935e+02 3.590040584148247e+02 1.146987392585554e+02 + 5 3.777000762612001e+02 -2.167387187712332e+02 -2.737228848190615e+02 -1.440744867054939e+02 + ME 4.824679004507268e-08 + +Event 166 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.222232017840727e+02 3.192297607931550e+02 6.501391151310611e+00 -4.333455324590233e+01 + 3 3.053327974515881e+02 1.412228998217293e+02 2.069513876027932e+02 1.745145636754502e+02 + 4 4.336545371614681e+02 -3.424637997499572e+02 2.077212038433833e+02 -1.662128302370304e+02 + 5 4.387894636028709e+02 -1.179888608649271e+02 -4.211739825974873e+02 3.503281980748251e+01 + ME 3.815717061776281e-09 + +Event 167 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.729290336372008e+02 2.217891042804635e+02 -3.163933861400006e+01 -1.558807328590503e+02 + 3 1.537967125602959e+02 -5.805059168074692e+01 -5.204366344775282e+00 1.423252337810090e+02 + 4 6.018172045649106e+02 -4.859322890486575e+02 2.249815041196951e+02 -2.746581165272472e+02 + 5 4.714570492375925e+02 3.221937764489409e+02 -1.881377991609198e+02 2.882136156052884e+02 + ME 1.018904034669989e-08 + +Event 168 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.302714671417868e+01 -4.694579621882252e+01 -8.099628082448691e+00 -2.328876404951167e+01 + 3 5.269668821589169e+02 -9.568171326198458e+01 -5.105187840955387e+02 -8.893635772367706e+01 + 4 3.135748577105153e+02 3.091348665867711e+02 -5.194641375603636e+01 -8.148358511739456e+00 + 5 6.064311134163896e+02 -1.665073571059640e+02 5.705648259340238e+02 1.203734802849284e+02 + ME 8.118367292619523e-08 + +Event 169 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.789601344296162e+02 5.468556852911152e+02 -1.869602488084409e+02 3.449002883486748e+01 + 3 5.891143790802997e+02 -5.265905860904877e+02 1.639376395451868e+02 2.070810387756352e+02 + 4 1.164890241423856e+02 4.243473362119256e+01 9.674051308718406e+01 -4.909439128629754e+01 + 5 2.154364623476983e+02 -6.269983282181995e+01 -7.371790382393003e+01 -1.924766763242052e+02 + ME 1.776299576355062e-07 + +Event 170 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.175951285792084e+02 -5.046759251961064e+02 2.162362154945924e+02 -2.827858774422785e+02 + 3 8.257615191587736e+01 -1.244558951936122e+01 -3.459182778741835e+01 7.394142017215529e+01 + 4 3.412788931358452e+02 9.206397792120845e+01 -3.135461028995509e+02 9.840908609399399e+01 + 5 4.585498263690690e+02 4.250575367942591e+02 1.319017151923769e+02 1.104353711761293e+02 + ME 1.031098678470843e-07 + +Event 171 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.241099768142416e+02 -1.801845393564228e+02 -4.755218322366496e+02 3.618366786304098e+02 + 3 1.760989498853843e+02 1.628509626135169e+02 2.215130304491187e+01 6.324337040353328e+01 + 4 1.106507541955661e+02 8.705766835783074e+01 6.684051231296790e+01 1.403202401243385e+01 + 5 5.891403191048082e+02 -6.972409161492482e+01 3.865300168787697e+02 -4.391120730463770e+02 + ME 3.196616728704032e-08 + +Event 172 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.170584705570329e+02 -2.734753423202163e+02 -1.216658779499090e+02 2.904245498384905e+02 + 3 2.310308870099137e+02 8.118388166822324e+01 2.158679150802150e+02 -1.361952087220694e+01 + 4 5.904124943192925e+02 2.597890264188085e+02 -2.749362883764528e+02 -4.533283716407745e+02 + 5 2.614981481137613e+02 -6.749756576681540e+01 1.807342512461468e+02 1.765233426744909e+02 + ME 2.144054022459239e-08 + +Event 173 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.257185513659660e+02 -1.853427295891294e+02 1.999009554138799e+02 -1.782701750630551e+02 + 3 5.945302616762999e+02 -1.868533588100201e+02 -3.653044045316943e+02 4.302380113147228e+02 + 4 4.859436879418532e+02 4.057526358399537e+02 7.788756376499921e+01 -2.558116372845701e+02 + 5 9.380749901588126e+01 -3.355654744080420e+01 8.751588535281510e+01 3.843801032902197e+00 + ME 4.492007672036047e-08 + +Event 174 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.305554368133522e+02 -4.672890155754840e+02 -2.496372833150609e+02 2.848287615003372e+01 + 3 3.299992352974423e+02 -6.928313446547062e+01 3.005180188229559e+02 -1.174234343658106e+02 + 4 4.859186117296834e+02 4.836387558179937e+02 -2.840874679686298e+00 -4.692952724224151e+01 + 5 1.535267161595212e+02 5.293339422296092e+01 -4.803986082820874e+01 1.358700854580181e+02 + ME 1.963643420674225e-08 + +Event 175 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.655594170959286e+02 -8.549977165527956e+00 3.601534549686833e+02 6.204896608409049e+01 + 3 5.484575297133066e+02 -1.135388551231450e+02 -5.289508375770936e+02 -9.014211947274862e+01 + 4 2.960714747917294e+02 2.867045434701770e+02 -5.821682656799009e+01 -4.549312083446882e+01 + 5 2.899115783990353e+02 -1.646157111815041e+02 2.270142091764003e+02 7.358627422312696e+01 + ME 1.797554086108266e-07 + +Event 176 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.687299918743935e+02 8.339274256771583e+01 3.315319220567164e+02 1.381811928306607e+02 + 3 1.629485641149831e+02 -9.683584082676977e+01 -1.409503471845347e+01 1.302934552262425e+02 + 4 4.822020608335142e+02 -2.484261719570099e+02 -3.907996987564748e+02 1.344576513654872e+02 + 5 4.861193831771089e+02 2.618692702160638e+02 7.336281141821190e+01 -4.029322994223904e+02 + ME 2.741061669514358e-08 + +Event 177 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.577057842620000e+02 2.915980668115854e+00 1.386867066994572e+02 -2.171860163171064e+02 + 3 7.376522012584236e+02 -1.434041695523210e+02 -3.410539372724913e+02 6.381600316905930e+02 + 4 6.808763621736034e+01 2.120489361288136e+01 5.915691106678145e+01 -2.620569719681001e+01 + 5 4.365543782622163e+02 1.192832952713237e+02 1.432103195062527e+02 -3.947683181766764e+02 + ME 1.077234048167949e-05 + +Event 178 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.161481411810116e+02 5.961255761930871e+02 3.994627094820481e+01 1.505892583373998e+02 + 3 4.209349270977736e+02 -3.821919352609089e+02 8.968205956028466e+01 -1.518968915592242e+02 + 4 3.373669481877309e+02 -2.683700810084367e+02 -1.756017833436885e+02 1.046803278345296e+02 + 5 1.255499835334836e+02 5.443644007625858e+01 4.597345283519907e+01 -1.033726946127052e+02 + ME 5.643071175218675e-08 + +Event 179 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.043080164604085e+02 -4.190938142816105e+02 2.545150292529335e+02 1.179366362989085e+02 + 3 3.183281589704842e+02 3.585230981201615e+01 1.721259596521259e+02 -2.653678252699747e+02 + 4 2.314375836919171e+02 2.283484903133223e+02 -2.615876940174820e+01 2.713007372208609e+01 + 5 4.459262408771901e+02 1.548930141562721e+02 -4.004822195033112e+02 1.203011152489800e+02 + ME 4.270447503980010e-09 + +Event 180 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.882297939654281e+02 -6.668050208816672e+02 1.625262598210258e+02 5.115201166409273e+01 + 3 1.329650151441869e+02 1.107437070332806e+02 -6.736705495672318e+01 2.961767227988413e+01 + 4 4.738727920676825e+02 4.060266452073242e+02 -2.342858705864514e+02 -6.933914685987018e+01 + 5 2.049323988227019e+02 1.500346686410625e+02 1.391266657221484e+02 -1.143053708410680e+01 + ME 6.456947687167656e-08 + +Event 181 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.428334272971978e+02 1.994988487176103e+02 -8.712095886553358e+01 1.076021435641571e+02 + 3 5.756669394886247e+02 -4.225670293516123e+02 3.014220455272963e+02 2.489463424019198e+02 + 4 2.315484652385184e+02 -9.345090162870810e+01 6.540105188821644e+01 -2.015051442296441e+02 + 5 4.499511679756598e+02 3.165190822627102e+02 -2.797021385499793e+02 -1.550433417364326e+02 + ME 5.570254340110193e-08 + +Event 182 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.444435281163276e+02 1.469003270004890e+01 -4.049746300418323e+02 -1.825097302782551e+02 + 3 5.448711840887836e+02 -2.922556364469127e+02 4.166227684668842e+02 -1.946707965009439e+02 + 4 3.116991105767848e+02 1.944903403636982e+02 -1.026079273884969e+02 2.209105164463849e+02 + 5 1.989861772181039e+02 8.307526338316566e+01 9.095978896344506e+01 1.562700103328142e+02 + ME 3.981507039485593e-08 + +Event 183 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.401094905126758e+02 -1.821299783062261e+02 1.426447704035357e+02 6.429391816457414e+01 + 3 5.112023061484729e+02 4.864809735593811e+02 1.476911503742452e+02 5.339835463163433e+01 + 4 1.651868611336106e+02 5.963144449802130e+01 1.535106867308423e+02 -1.285530931869608e+01 + 5 5.835013422052410e+02 -3.639824397511763e+02 -4.438466075086230e+02 -1.048369634775124e+02 + ME 1.485037456661759e-08 + +Event 184 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.826515649016759e+02 -1.477902646129266e+02 1.867155418966292e+02 -1.522736065155598e+02 + 3 6.027880405940907e+02 1.749283586593599e+01 -3.719329937924915e+02 4.740393134595325e+02 + 4 2.613827332123843e+02 -1.367477909345774e+02 -2.306183173214315e+01 -2.215606617006907e+02 + 5 3.531776612918493e+02 2.670452196815680e+02 2.082792836280054e+02 -1.002050452432820e+02 + ME 5.509046501140474e-08 + +Event 185 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.293902171331328e+02 2.274132505448976e+01 4.856616106115516e+02 -2.094507916175659e+02 + 3 3.105838365977013e+02 -2.358986821094529e+02 -1.967102753115335e+02 4.603475775576094e+01 + 4 1.784474258301200e+02 3.764653629262912e+01 6.082173661233966e+00 -1.743250677731649e+02 + 5 4.815785204390459e+02 1.755108207623341e+02 -2.950335089612521e+02 3.377411016349700e+02 + ME 1.734260193481628e-07 + +Event 186 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.989720483234585e+02 -1.741182591155330e+02 -6.550171034983236e+01 7.058494030496489e+01 + 3 5.152114262802828e+02 -4.648498795531518e+02 -1.436720305668072e+02 1.694572243428831e+02 + 4 5.546843843841008e+02 4.191879013201381e+02 1.907167584026881e+02 -3.091656315484596e+02 + 5 2.311321410121571e+02 2.197802373485465e+02 1.845698251395170e+01 6.912346690061167e+01 + ME 1.269048684612794e-03 + +Event 187 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.129865985452143e+02 8.791089187031965e+01 -7.377241052563376e+01 -3.967206033391113e+02 + 3 6.138096947611982e+02 2.827115017631438e+02 3.326539175498887e+02 4.314833939937611e+02 + 4 1.561121885082345e+01 -1.526480341131205e+00 1.058464960658816e+01 -1.137300331848183e+01 + 5 4.575924878427639e+02 -3.690959132923323e+02 -2.694661566308431e+02 -2.338978733616798e+01 + ME 1.312689025628123e-06 + +Event 188 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.409186700623276e+02 2.554881275349463e+02 3.574186001581245e+02 -3.724291287245752e+01 + 3 5.678467400131308e+02 -2.085482205222035e+02 -5.142972510897584e+02 -1.202326801750691e+02 + 4 3.251230260129324e+02 -1.394598252065705e+02 2.786827561471974e+02 9.269228998876029e+01 + 5 1.661115639116091e+02 9.251991819382758e+01 -1.218041052155635e+02 6.478330305876626e+01 + ME 1.546538191107271e-08 + +Event 189 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.048089636454501e+02 -1.135472313170013e+02 1.696480662060318e+02 -1.653092502918514e+01 + 3 5.473280721360723e+02 8.276565856454246e+01 -4.677176099525416e+02 -2.719523885735314e+02 + 4 5.707624195781960e+02 1.366705484110403e+02 3.757862824583086e+02 4.072782472904077e+02 + 5 1.771005446402820e+02 -1.058889756585815e+02 -7.771673871179848e+01 -1.187949336876910e+02 + ME 5.878438196807855e-08 + +Event 190 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.691905082890466e+02 1.091304876593433e+02 -1.415440939324064e+02 -3.230440179709456e+02 + 3 5.165238126843835e+02 6.541410712031549e+01 5.564220852798431e+00 5.123347373602196e+02 + 4 4.306101857863023e+02 -3.416491223880155e+02 2.067968524389392e+02 -1.610467978438568e+02 + 5 1.836754932402680e+02 1.671045276083569e+02 -7.081697935933127e+01 -2.824392154541716e+01 + ME 3.437045775489816e-08 + +Event 191 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.069337892507112e+02 -3.717000808244268e+02 -1.559978392326048e+02 -5.566716180851298e+01 + 3 5.558199679384036e+02 4.288254322302436e+02 -3.467374488240874e+02 6.940984810929838e+01 + 4 1.131764079543421e+02 2.092547930706861e+01 8.924670515456383e+01 -6.637807810016392e+01 + 5 4.240698348565434e+02 -7.805083071288544e+01 4.134885829021285e+02 5.263539179937854e+01 + ME 2.857716857713938e-08 + +Event 192 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.660270538535898e+02 -6.938500902735587e+00 3.406931051238014e+02 -1.336258563267746e+02 + 3 2.198197890933954e+02 1.850047155697348e+02 -9.607133768696315e+01 -6.974448343104864e+01 + 4 4.132582096760701e+02 -1.250851363991759e+02 -2.616302956397870e+02 -2.944242600739753e+02 + 5 5.008949473769448e+02 -5.298107826782326e+01 1.700852820294866e+01 4.977945998317986e+02 + ME 2.415902125902624e-07 + +Event 193 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.330325958487633e+02 5.870041499782552e+01 1.287754330113803e+02 1.851360036833128e+02 + 3 5.708908650052945e+02 1.115253094670215e+02 4.567035139831037e+02 -3.238832897978265e+02 + 4 1.796971979479947e+02 7.338418865332758e+01 -1.320667158645153e+02 9.728425549293682e+01 + 5 5.163793411979481e+02 -2.436099131181745e+02 -4.534122311299690e+02 4.146303062157691e+01 + ME 1.084472508220815e-08 + +Event 194 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.026272994324191e+02 -2.281452380970014e+02 1.481292949894225e+02 4.226602233879195e+02 + 3 3.230851168166026e+02 6.671920747475995e+01 -1.604438231736436e+02 -2.723790000491271e+02 + 4 4.149226527531526e+02 1.112824714324781e+02 1.170540097886192e+02 -3.821980875305355e+02 + 5 2.593649309978254e+02 5.014355918976329e+01 -1.047394816043981e+02 2.319168641917431e+02 + ME 4.953342414967494e-08 + +Event 195 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.186769531653988e+02 4.053399161407181e+02 -4.064715764973516e+01 -3.210500626116969e+02 + 3 1.983392180439614e+02 1.362622940759869e+02 -2.970600443234310e+01 1.410268978886826e+02 + 4 4.580369644375024e+02 -4.270735786572080e+02 -1.650789232562076e+02 -1.244862645509943e+01 + 5 3.249468643531376e+02 -1.145286315594970e+02 2.354320853382859e+02 1.924717911781137e+02 + ME 7.527283647323538e-09 + +Event 196 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.670680736096177e+02 -5.196009607058459e+02 -3.195159447878110e+02 -2.700078100521552e+02 + 3 4.796337064789745e+02 4.109757184160675e+02 1.611950782145398e+02 1.875195937030707e+02 + 4 2.549467832538206e+02 1.757938664861856e+02 1.180485581477291e+02 1.419820999864066e+02 + 5 9.835143665758714e+01 -6.716862419640718e+01 4.027230842554202e+01 -5.949388363732206e+01 + ME 6.776520769995833e-07 + +Event 197 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.456277846903779e+02 5.073638365313777e+02 -6.950772545675264e+01 -1.883090356518230e+02 + 3 3.840060774912939e+02 -2.335726483981930e+02 2.994458700181055e+02 -5.689161976603957e+01 + 4 2.170201197002058e+02 5.304772290063384e+01 -1.145548521448566e+02 1.765243816015771e+02 + 5 3.533460181181225e+02 -3.268389110338186e+02 -1.153832924164962e+02 6.867627381628544e+01 + ME 1.509668665880030e-08 + +Event 198 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.910248171598183e+02 -4.090729546193914e+02 3.366364194938390e+02 -2.620030025937223e+02 + 3 5.547864644728130e+02 3.349061746249842e+02 -1.441441520604850e+02 4.181487041556715e+02 + 4 2.745197367303354e+02 5.772758735139705e+01 -1.507960221697820e+02 -2.220116465657829e+02 + 5 7.966898163703361e+01 1.643919264301007e+01 -4.169624526357206e+01 6.586594500383369e+01 + ME 5.954257163612112e-07 + +Event 199 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.089763723582333e+02 -2.391470875959899e+02 -7.198191922923307e+01 -1.819166635415397e+02 + 3 2.302930034245914e+02 2.280759743109415e+02 2.554139852644603e+01 1.907496604838038e+01 + 4 4.296042628313223e+02 2.011197297410303e+02 -3.594007704411145e+02 -1.222365050141414e+02 + 5 5.311263613858528e+02 -1.900486164559819e+02 4.058412911439016e+02 2.850782025073007e+02 + ME 3.862621286224446e-09 + +Event 200 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.668574923646054e+02 1.957149396867698e+02 -4.074080523547822e+01 -1.767732174377508e+02 + 3 4.828614932981502e+02 -4.435255570781280e+02 2.718101129892899e+01 -1.889483912432793e+02 + 4 4.041444758692144e+02 3.452769428205598e+02 -1.849911387865645e+02 9.947295462858226e+01 + 5 3.461365384680294e+02 -9.746632542920153e+01 1.985509327231137e+02 2.662486540524480e+02 + ME 1.154943734123872e-08 + +Event 201 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.557462218499876e+02 5.577307285874686e+01 -5.518883540368638e+01 3.469854912690419e+02 + 3 6.090180126474653e+02 -2.732890171778827e+02 3.408295323239708e+02 -4.243245016668710e+02 + 4 1.810043524304992e+02 1.725577415117764e+01 -1.199573841645601e+01 1.797801883330637e+02 + 5 3.542314130720482e+02 2.002601701679582e+02 -2.736449585038284e+02 -1.024411779352346e+02 + ME 2.192246974609935e-07 + +Event 202 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.401898284303757e+02 -4.345767112988091e+02 6.008776977239305e+01 3.605033944437847e+01 + 3 5.108999584385472e+02 4.765299298274663e+02 1.140292958983961e+02 1.446904046163914e+02 + 4 1.528255459328671e+02 1.932347971289793e+01 4.151372197535511e+01 1.458041889289091e+02 + 5 3.960846671982105e+02 -6.127669824155520e+01 -2.156307876461444e+02 -3.265449329896788e+02 + ME 2.228805001794721e-07 + +Event 203 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.041261761344618e+02 -9.500166915393218e+01 3.778895461862847e+01 1.972151929195667e+01 + 3 4.443475859153140e+02 -3.287098418714517e+02 1.564021836721695e+02 -2.548194927947812e+02 + 4 2.899092144312161e+02 4.077089716485121e+01 2.868817947747052e+02 -9.160916075474518e+00 + 5 6.616170235190077e+02 3.829406138605327e+02 -4.810729330655031e+02 2.442588895782988e+02 + ME 1.501672169620850e-07 + +Event 204 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.353583912015085e+02 3.684328216913381e+02 2.309035724253134e+02 -2.185691953026545e+01 + 3 2.535164374831818e+02 -2.445756557044238e+02 4.172545258629644e+01 -5.207993200248917e+01 + 4 3.377617009372444e+02 2.305821856525063e+02 -1.063652282272372e+01 2.465799802538221e+02 + 5 4.733634703780650e+02 -3.544393516394203e+02 -2.619925021888862e+02 -1.726431287210675e+02 + ME 3.531392705061042e-08 + +Event 205 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.561765973099244e+02 -5.595525752729490e+02 -2.445909106268452e+02 -2.400915008936639e+02 + 3 4.436268818857168e+02 4.246930749258180e+02 -8.966125936745792e+01 9.165948401741431e+01 + 4 1.399697315148318e+02 1.499554105305907e+01 1.358590097348833e+02 3.014944382102273e+01 + 5 2.602267892895269e+02 1.198639592940718e+02 1.983931602594199e+02 1.182825730552269e+02 + ME 1.335422034506543e-07 + +Event 206 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.492493811814721e+01 -2.674402956441456e+00 5.513252874300674e+01 -3.418332097490475e+01 + 3 4.416704097344147e+02 1.072044637050192e+02 4.084318907704088e+02 1.294733347002168e+02 + 4 7.006249631956899e+02 7.376574991388425e+01 -6.937409068373729e+02 -6.447873582091820e+01 + 5 2.927796889517476e+02 -1.782958106624620e+02 2.301764873239575e+02 -3.081127790439369e+01 + ME 3.592179589872834e-07 + +Event 207 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.871274697603224e+02 4.279496817610274e+02 2.164744983621549e+02 -8.538754730394086e+01 + 3 8.117859920617876e+01 -3.275578473866842e+01 6.568413093248333e+01 -3.467879004342293e+01 + 4 2.872554221624425e+02 2.156852159581688e+02 -8.320290545444449e+01 1.705076001318999e+02 + 5 6.444385088710563e+02 -6.108791129805277e+02 -1.989557238401938e+02 -5.044126278453607e+01 + ME 4.296012320866767e-08 + +Event 208 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.641639267419049e+02 -3.419606422698960e+02 -3.074769342805806e+02 6.300003898602276e+01 + 3 1.786897064305949e+02 1.076490072974621e+02 -9.081241090814457e+01 1.099763994553988e+02 + 4 5.763848573443231e+02 4.797982260748441e+02 2.623521952599240e+02 -1.821661101126315e+02 + 5 2.807615094831766e+02 -2.454865911024102e+02 1.359371499288009e+02 9.189671671210036e+00 + ME 5.705415484414741e-09 + +Event 209 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.385828658973285e+02 -5.075491230008664e+02 -3.533516944878140e+02 -1.591368730410633e+02 + 3 1.765423491478754e+02 1.621867223420716e+02 2.683860309775541e+01 6.436114916894574e+01 + 4 4.986667957256042e+02 4.344440716974439e+02 1.795281780354134e+02 1.664228200021638e+02 + 5 1.862079892291916e+02 -8.908167103864918e+01 1.469849133546452e+02 -7.164709613004626e+01 + ME 3.719901495936352e-08 + +Event 210 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.764638473920721e+02 -4.170352276148382e+02 2.008387828191197e+02 1.129743338800030e+02 + 3 7.223003052451869e+02 5.315103137685568e+02 -4.106342874200929e+02 -2.656953129242833e+02 + 4 1.470953339362244e+02 -9.260579603966968e+01 1.071066173964053e+02 3.986698277482917e+01 + 5 1.541405134265168e+02 -2.186929011404899e+01 1.026888872045679e+02 1.128539962694512e+02 + ME 4.038419122954612e-07 + +Event 211 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.375648452949696e+02 -2.432158852065867e+02 -3.617678147661081e+02 -3.785597998390857e+01 + 3 3.755078213314552e+02 2.872422996521213e+02 2.203609879312930e+02 -9.969463460789413e+01 + 4 3.007064557415487e+02 -1.694459342837558e+02 -2.228285208135228e+02 1.098175677722217e+02 + 5 3.862208776320263e+02 1.254195198382212e+02 3.642353476483379e+02 2.773304681958093e+01 + ME 1.006117335130367e-05 + +Event 212 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.121878142369525e+02 1.183445947348006e+00 -2.465625978764644e+01 1.094384483270791e+02 + 3 7.375067391765950e+02 -3.127794647526268e+02 3.331246995416567e+02 -5.788895674610446e+02 + 4 2.291493811726512e+01 1.618073814178101e+01 -1.621519190684619e+01 -5.879230641442971e-01 + 5 6.273905084691875e+02 2.954152806634978e+02 -2.922532478471641e+02 4.700390421981098e+02 + ME 1.110570875308278e-04 + +Event 213 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.149170341818729e+02 2.012777647785824e+00 4.394135149382410e+02 2.684236645797402e+02 + 3 2.443426884296023e+02 -1.176956726368923e+02 1.176742395059145e+02 1.788962028335422e+02 + 4 9.102154734540717e+01 -3.403376741680239e+01 -5.303122632979904e+01 -6.568343619611289e+01 + 5 6.497187300431173e+02 1.497166624059089e+02 -5.040565281143565e+02 -3.816364312171696e+02 + ME 2.312814464354041e-06 + +Event 214 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.202063301686816e+02 -1.064350067374717e+02 1.642139056432389e+02 2.534511322016189e+02 + 3 8.302321932066316e+01 -5.764493522725375e+01 5.652661110437803e+01 -1.935610048710902e+01 + 4 5.674025885458663e+02 2.435984979474369e+02 2.596369945692084e+02 -4.418077640075727e+02 + 5 5.293678619647889e+02 -7.951855598271139e+01 -4.803775113168255e+02 2.077127322930627e+02 + ME 9.042105782741295e-08 + +Event 215 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.138906695630313e+02 1.178864239647874e+02 -4.582866998625274e+02 2.003988823268451e+02 + 3 3.856670962690675e+02 -3.121084563031177e+01 3.362323895090097e+02 -1.863136401467070e+02 + 4 2.798710520603011e+02 -1.660050298897437e+02 -1.022090328473867e+02 2.008069954883218e+02 + 5 3.205711821075999e+02 7.932945155526808e+01 2.242633432009040e+02 -2.148922376684599e+02 + ME 2.856967949661706e-07 + +Event 216 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.502734568939956e+02 -3.484492676068055e+02 -3.562535325858312e+02 -2.333825310224928e+02 + 3 2.927316415798877e+02 -1.723462782434523e+01 1.859956838442979e+02 2.253894123003654e+02 + 4 4.062892609764483e+02 2.518503039165275e+02 2.467607920511911e+02 -2.018700064601229e+02 + 5 2.507056405496688e+02 1.138335915146231e+02 -7.650294330965788e+01 2.098631251822504e+02 + ME 2.162766252781662e-08 + +Event 217 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.740538118662423e+02 4.049475823483302e+02 4.864798667203213e-01 2.464634565863595e+02 + 3 1.985267271768088e+02 -1.272681407062418e+02 -1.303933537284553e+02 -7.882420356817595e+01 + 4 5.247611246848355e+02 -4.998692904349176e+02 1.555305125498374e+02 3.626555013467213e+01 + 5 3.026583362721131e+02 2.221898487928290e+02 -2.562363868810226e+01 -2.039048031528557e+02 + ME 4.323909857530960e-09 + +Event 218 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.734261191295303e+02 1.952249633514984e+02 1.466545247967154e+02 2.825362463281442e+02 + 3 1.398002662411878e+02 -9.684800712809066e+00 -1.064184732605320e+02 -9.014115389297822e+01 + 4 5.708039251040940e+02 -3.493876776423592e+02 -4.213571589346009e+02 -1.618750019010977e+02 + 5 4.159696895251885e+02 1.638475150036699e+02 3.811211073984176e+02 -3.052009053406823e+01 + ME 5.200624473381894e-07 + +Event 219 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.964338295601742e+02 -4.930977654258188e+02 4.159874786449742e+00 5.730476686633798e+01 + 3 4.573553743327010e+02 2.961037518728453e+02 1.328781681642411e+02 3.222419882373264e+02 + 4 2.353157927788246e+02 2.103198091366726e+02 -7.380868571206494e+01 -7.544122301035409e+01 + 5 3.108950033283000e+02 -1.332579558369913e+01 -6.322935723862582e+01 -3.041055320933104e+02 + ME 2.070263917700041e-07 + +Event 220 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.895106323190153e+02 -9.842902929784736e+01 -3.242676826039605e+02 -1.920435599016529e+02 + 3 2.689406576306271e+02 6.079057874307624e+01 2.545565461740099e+02 6.192372455557902e+01 + 4 4.581215795927168e+02 4.170329892022735e+02 5.148915397769732e+01 1.825040674292038e+02 + 5 3.834271304576408e+02 -3.793945386475024e+02 1.822198245225330e+01 -5.238423208312998e+01 + ME 3.042046345212406e-09 + +Event 221 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.276347617265195e+02 4.709149142425274e+02 -1.408991586477919e+02 1.917941928695925e+02 + 3 3.954418917787426e+02 -3.935231131055336e+02 -3.463013336995992e+01 1.773705409753062e+01 + 4 4.144133623840756e+02 -1.412634588767815e+02 1.548014912649188e+02 -3.575186266627241e+02 + 5 1.625099841106622e+02 6.387165773978758e+01 2.072780075283330e+01 1.479873796956009e+02 + ME 4.575760247009588e-07 + +Event 222 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.584442989006752e+02 -1.078486037163722e+02 -3.673694489405860e+01 -2.319752814214077e+02 + 3 4.134394487074566e+02 2.855923313448866e+02 1.924609957241841e+02 -2.287530615081986e+02 + 4 2.278563169252060e+02 -1.871641106410819e+02 1.009921504714389e+02 -8.178436521614036e+01 + 5 6.002599354666618e+02 9.420383012567621e+00 -2.567162013015646e+02 5.425127081457466e+02 + ME 1.867484399126946e-07 + +Event 223 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.884176534843068e+02 -2.685843465024753e+02 7.606026273343657e+01 7.253983793855949e+01 + 3 4.513000265569297e+02 1.572877532749309e+02 -3.610427145398817e+02 -2.204096978757592e+02 + 4 3.276144969444980e+02 -5.317464615934441e+01 2.105167263568906e+02 -2.453292146035672e+02 + 5 4.326678230142646e+02 1.644712393868885e+02 7.446572544955465e+01 3.931990745407668e+02 + ME 1.287858255037100e-08 + +Event 224 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.199291946379053e+02 2.536541992327827e+02 -3.336793713310643e+02 -2.565449022922251e+01 + 3 5.882329265931312e+02 -4.073421144314937e+02 3.584669694021168e+02 2.271383049739999e+02 + 4 1.482351543087514e+02 -7.006196037154500e+01 1.303822701627548e+02 8.089889309615469e+00 + 5 3.436027244602120e+02 2.237498755702560e+02 -1.551698682338073e+02 -2.095737040543928e+02 + ME 1.271216286968288e-06 + +Event 225 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.828966757595687e+02 5.914771327429723e+01 -6.614934231762894e+01 2.686193248468568e+02 + 3 6.901623261275527e+02 3.466820540113055e+02 9.413404853472802e+01 -5.892998988110877e+02 + 4 4.105963527227361e+02 -3.014014625423418e+02 -4.993418597615523e+01 2.743229853975957e+02 + 5 1.163446453901425e+02 -1.044283047432609e+02 2.194947975905614e+01 4.635758856663511e+01 + ME 9.096875462933512e-08 + +Event 226 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.360810731792063e+02 1.642782223699453e+02 -1.678975564323074e+02 -2.360824670484281e+01 + 3 5.160979991978127e+02 2.441030829231628e+01 -3.180769822102765e+02 -4.056948545558138e+02 + 4 5.308615635413040e+02 -1.515741961800045e+02 2.722138494694173e+02 4.298126136526764e+02 + 5 2.169593640816770e+02 -3.711433448225712e+01 2.137606891731666e+02 -5.095123920196851e-01 + ME 6.008836651526734e-08 + +Event 227 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.616469781392049e+02 1.350377972296386e+02 2.133665597436083e+02 6.854666783966795e+01 + 3 5.923326784759448e+02 -2.698941073591661e+02 1.106177983815398e+02 -5.155374627362273e+02 + 4 4.172276769301889e+02 2.330765525795236e+02 -1.925693830312472e+02 2.875261514248250e+02 + 5 2.287926664546615e+02 -9.822024244999602e+01 -1.314149750939009e+02 1.594646434717345e+02 + ME 1.492561957034817e-08 + +Event 228 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.092591846574758e+02 -3.142862365084946e+02 -4.911232501198605e+01 3.976896506463815e+02 + 3 2.735255741033087e+02 -2.718229287466501e+02 2.970718554764161e+01 6.783673265737467e+00 + 4 4.133409721086167e+02 3.274757910496356e+02 -2.426316191218202e+01 -2.510411609161631e+02 + 5 3.038742691305989e+02 2.586333742055091e+02 4.366830137652649e+01 -1.534321629959558e+02 + ME 5.180332008224184e-07 + +Event 229 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.602909302006852e+02 4.125987937663707e+01 1.420578335932218e+02 2.141694717119223e+02 + 3 5.291571012132247e+02 -2.192354150045460e+02 4.669770596370902e+02 -1.177942967416715e+02 + 4 3.718875129217348e+02 1.186191445924093e+02 -2.915140032044290e+02 -1.981146303002550e+02 + 5 3.386644556643549e+02 5.935639103549980e+01 -3.175208900258829e+02 1.017394553300042e+02 + ME 7.006526388499469e-09 + +Event 230 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 7.332952183623519e+01 2.203444947169411e+01 3.375417535460226e+01 -6.125648908761432e+01 + 3 6.172505402697790e+02 -4.734101162373001e+02 -6.693569541003697e+01 -3.903853275771192e+02 + 4 7.073803814485553e+02 4.648032214155373e+02 1.050900954312582e+02 5.227820207909715e+02 + 5 1.020395564454305e+02 -1.342755464993128e+01 -7.190857537582355e+01 -7.114020412623796e+01 + ME 2.138946638328408e-06 + +Event 231 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.515175972108462e+02 1.138815578269133e+02 9.437222137628117e+01 4.266063937758993e+02 + 3 4.345680215032115e+02 2.353831600015865e+02 2.161520441325732e+02 -2.944867180675445e+02 + 4 5.497447759881504e+02 -3.929841166309689e+02 -3.541217261697238e+02 -1.496014901550582e+02 + 5 6.416960529779162e+01 4.371939880246914e+01 4.359746066086947e+01 1.748181444670339e+01 + ME 7.713547798663205e-07 + +Event 232 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.827704738940411e+02 2.367350579269709e+02 2.188417272414405e+02 -2.063444849065888e+02 + 3 4.081166106293834e+02 2.895218841081623e+02 -1.566771248798238e+02 2.412229778306114e+02 + 4 2.051848745083037e+02 -3.942539020633502e+01 -1.720622366528163e+02 -1.045995126761917e+02 + 5 5.039280409682721e+02 -4.868315518287982e+02 1.098976342911997e+02 6.972101975216928e+01 + ME 7.162646027763106e-09 + +Event 233 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.943080306229408e+02 -1.702895836853463e+02 2.339619717705403e+02 5.367001344015300e+01 + 3 2.122083142716507e+02 -1.780325885917701e+02 -1.129102431248863e+02 -2.424959881746902e+01 + 4 3.867932102720350e+02 -3.902291549294982e+01 2.871044371014023e+02 -2.562366909239652e+02 + 5 6.066904448333739e+02 3.873450877700663e+02 -4.081561657470563e+02 2.268162763012813e+02 + ME 7.192450759544549e-09 + +Event 234 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.029213520218469e+02 5.481883220516288e+01 1.866500429479581e+02 2.322025034618088e+02 + 3 5.290563168779678e+02 5.680066435642218e+01 3.079339449882754e+02 -4.264398626783235e+02 + 4 5.645687672755980e+02 -1.284160013176555e+02 -5.400643958490008e+02 1.028478095290611e+02 + 5 1.034535638245874e+02 1.679650475607036e+01 4.548040791276726e+01 9.138954968745371e+01 + ME 2.122529681253960e-08 + +Event 235 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.445049250783111e+02 -2.589734140921206e+01 -1.319246578968199e+02 3.171889905875589e+02 + 3 4.823315859421518e+02 1.472115336462561e+02 3.873128963179108e+02 2.469033080070408e+02 + 4 3.973986256682691e+01 3.274912805667769e+01 1.780785140860165e+01 -1.377068322803123e+01 + 5 6.334236264127103e+02 -1.540633202937217e+02 -2.731960898296927e+02 -5.503216153665683e+02 + ME 1.320429320532181e-06 + +Event 236 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.946542617367735e+02 -3.810657402206150e+02 2.660800071441577e+02 -5.162701567758321e+02 + 3 3.916436838147840e+02 3.070607591843180e+02 -1.609888059458168e+02 1.821567171457176e+02 + 4 9.227402093021701e+01 -2.267558677586710e+01 -8.487016008637360e+01 2.823771644296982e+01 + 5 3.214280335182248e+02 9.668056781216411e+01 -2.022104111196721e+01 3.058757231871447e+02 + ME 1.543701437779770e-06 + +Event 237 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.545864517205334e+02 -1.684333917230649e+02 1.738982858125821e+02 7.876445990268434e+01 + 3 2.329362064168684e+01 2.196496253262233e+01 7.299389178887916e+00 2.617651839807976e+00 + 4 6.044417478472913e+02 9.016712624747305e+01 2.020796472547225e+02 -5.624798059045032e+02 + 5 6.176781797904888e+02 5.630130294296942e+01 -3.832773222461925e+02 4.810976941620109e+02 + ME 6.559014552266826e-04 + +Event 238 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.734827785011449e+02 6.504306401774845e+01 3.141570859505669e+02 -3.482250230919593e+02 + 3 3.980459969418915e+02 -3.957723037213677e+02 -3.888755659178175e+01 -1.710722744534845e+01 + 4 4.526639311890888e+02 2.293268680998929e+02 -3.168457877546505e+02 2.278652429599333e+02 + 5 1.758072933678742e+02 1.014023716037262e+02 4.157625839586526e+01 1.374670075773742e+02 + ME 2.524267594277576e-08 + +Event 239 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.971046063012477e+02 -8.428839093137756e+01 -3.781742721300474e+02 4.543276327929836e+02 + 3 2.887724106080996e+02 1.067916659556329e+02 -1.547148155349657e+01 -2.678538378843455e+02 + 4 3.710345357389202e+02 1.508541977394769e+02 3.380306102744051e+02 -2.539575265449116e+01 + 5 2.430884473517323e+02 -1.733574727637321e+02 5.561514340913884e+01 -1.610780422541469e+02 + ME 4.121992313761582e-09 + +Event 240 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.944633714894943e+02 1.680489118241840e+02 -4.922931942743077e+01 -2.367376490809594e+02 + 3 6.312361218089733e+02 -4.392109669761415e+02 -1.588390894238462e+02 4.246444532021100e+02 + 4 1.228701097365929e+02 3.824564875459874e+01 -3.798906962116553e+01 1.104136078902437e+02 + 5 4.514303969649403e+02 2.329164063973583e+02 2.460574784724420e+02 -2.983204120113939e+02 + ME 5.020228174580350e-07 + +Event 241 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.490816146825686e+02 -6.780857619464055e+01 -9.970859965235596e+01 8.766709751202949e+01 + 3 6.219622579644403e+02 5.689750001884105e+02 -2.464007541664536e+02 4.889956890429657e+01 + 4 4.738547977759255e+02 -4.341772833431141e+02 1.011389610234909e+02 -1.606218122396370e+02 + 5 2.551013295770660e+02 -6.698914065065584e+01 2.449703927953187e+02 2.405514582331105e+01 + ME 7.530329109294164e-09 + +Event 242 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.607824489443905e+02 5.914237010894076e+02 9.905219388542341e+01 -2.775610086253785e+02 + 3 3.990062854722137e+02 -2.311648369680887e+02 -1.390196856386274e+02 2.940108178295280e+02 + 4 1.863529685930985e+02 -1.278615554594403e+02 1.331766098585692e+02 2.535433149446559e+01 + 5 2.538582969902973e+02 -2.323973086618786e+02 -9.320911810536499e+01 -4.180414069861509e+01 + ME 4.365330614034530e-08 + +Event 243 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.196686647491888e+02 1.122774737725373e+01 -1.164726479644376e+02 2.507287952825761e+01 + 3 1.133151911771732e+02 -7.807701867250280e+01 -5.396068428009529e+01 6.190764297529687e+01 + 4 6.621421970941052e+02 -2.484088449740625e+02 1.240463476686637e+02 -6.011138316004096e+02 + 5 6.048739469795333e+02 3.152581162693117e+02 4.638698457586912e+01 5.141333090968552e+02 + ME 3.461426381373927e-06 + +Event 244 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.280935105172994e+02 1.583139798127287e+02 -1.973572348382067e+02 2.088831187445198e+02 + 3 5.103001436903666e+02 -4.402359718002467e+02 -2.577957536370686e+02 1.182688421340016e+01 + 4 3.470582738822527e+02 1.452007069270574e+02 1.749319995190819e+02 -2.622308062037477e+02 + 5 3.145480719100811e+02 1.367212850604606e+02 2.802209889561934e+02 4.152080324582772e+01 + ME 6.518377181333897e-09 + +Event 245 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 3.396911839925324e+02 3.289933370610810e+02 -7.114763674475311e+01 -4.573290322403688e+01 + 3 4.384857551822396e+02 -2.791071807415779e+02 3.066124832896743e+02 1.426804970805972e+02 + 4 4.176347759399601e+02 -3.519942713896021e+02 -2.140287152627982e+02 -6.863343227815282e+01 + 5 3.041882848852677e+02 3.021081150700990e+02 -2.143613128212309e+01 -2.831416157840737e+01 + ME 2.811054499281442e-09 + +Event 246 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.608229391410545e+02 -1.458217158240457e+02 -2.068702814137655e+02 -6.300253521961616e+01 + 3 3.337430353743154e+02 2.371946018027210e+02 1.095161066265306e+02 2.076760865527770e+02 + 4 5.261187567554393e+02 -3.789028184447150e+02 3.437750393676882e+02 -1.226879076856591e+02 + 5 3.793152687291911e+02 2.875299324660397e+02 -2.464208645804532e+02 -2.198564364750174e+01 + ME 2.520987626738108e-09 + +Event 247 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 2.364693619192626e+02 -4.606913761890457e+01 3.470682395859384e+00 -2.319123714881566e+02 + 3 6.707586181725082e+02 6.224312082991470e+02 1.264643842609764e+02 2.156461784995246e+02 + 4 8.441103857058096e+01 -7.843393409710345e+01 -2.748410014225528e+01 1.476365991161498e+01 + 5 5.083609813376476e+02 -4.979281365831390e+02 -1.024509665145803e+02 1.502533077017130e+00 + ME 1.153938090023693e-06 + +Event 248 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.738776112665326e+01 -3.800357331789279e+01 1.082310776995784e+01 -5.458662018236982e+01 + 3 2.731577122423595e+02 -1.023650088339821e+02 -1.963134715457747e+02 -1.599923798608694e+02 + 4 5.780931297050771e+02 4.359659916762920e+02 -3.151044766581967e+02 2.117415630051930e+02 + 5 5.813613969259109e+02 -2.955974095244171e+02 5.005948404340136e+02 2.837437038046019e+00 + ME 3.300111237391993e-07 + +Event 249 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.771449535203825e+02 7.193062052119420e+01 7.263463532627495e+01 5.680197997926654e+02 + 3 1.483275966380963e+02 1.459664561817996e+02 -2.113630427238560e+00 -2.627550495380916e+01 + 4 3.000364175298768e+02 -9.368804156371920e+01 2.167482964027108e+02 -1.851069386020958e+02 + 5 4.744910323116439e+02 -1.242090351392746e+02 -2.872693013017473e+02 -3.566373562367605e+02 + ME 1.905532696959173e-08 + +Event 250 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.070748515323192e+02 2.522952262611132e+02 -2.176867244366134e+02 -3.822100389398938e+02 + 3 1.532396868211021e+02 -1.290354637987217e+02 4.944135710293926e+00 8.250943110551940e+01 + 4 5.298941936163071e+02 -2.854713268542403e+02 -6.677262350798084e+00 4.463736015266296e+02 + 5 3.097912680302717e+02 1.622115643918488e+02 2.194198510771175e+02 -1.466729936922552e+02 + ME 1.130246547288476e-07 + +Event 251 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 4.182836311039666e+02 -9.488016677547932e+01 -3.342630543518727e+02 2.328672593937015e+02 + 3 5.257152316762973e+02 -2.134880180342399e+02 4.309672861440873e+02 2.122888815879800e+02 + 4 9.387018854625114e+01 6.019218689726185e+01 1.252636339050904e+01 -7.093379416359139e+01 + 5 4.621309486734849e+02 2.481759979124573e+02 -1.092305951827236e+02 -3.742223468180902e+02 + ME 4.939885635209957e-07 + +Event 252 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 9.365447326755805e+01 4.277947245944422e+00 6.388710156528008e+01 -6.834689300891627e+01 + 3 1.951509969640049e+02 7.461354319095608e+01 1.411336517620811e+01 -1.797708088426464e+02 + 4 6.319138287033421e+02 4.463349366878398e+02 7.119278093780918e+01 4.416240472853804e+02 + 5 5.792807010650953e+02 -5.252264271247403e+02 -1.491932476792976e+02 -1.935063454338176e+02 + ME 3.850010012323012e-06 + +Event 253 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 5.901525762082525e+01 -4.735464381405090e+00 -3.620220682176468e+01 4.636567944481127e+01 + 3 5.682395652067073e+02 -2.449465566088506e+02 7.457080728476193e+01 5.072835327237362e+02 + 4 4.471391262730152e+02 4.097222030514869e+02 5.483830234859550e+01 -1.704519731958408e+02 + 5 4.256060508994522e+02 -1.600401820612311e+02 -9.320690281159273e+01 -3.831972389727066e+02 + ME 1.180833750256481e-06 + +Event 254 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 1.548613132274681e+02 1.031167602621187e+02 3.787623878828554e+01 1.091528772998381e+02 + 3 6.185434438850467e+02 -1.082622339079234e+02 -7.722295375814301e+01 -6.040793789687806e+02 + 4 3.466331755597933e+02 4.347459990183827e+01 2.783088740441842e+02 2.020116040981310e+02 + 5 3.799620673276922e+02 -3.832912625603342e+01 -2.389621590743267e+02 2.929148975708114e+02 + ME 8.878000568277924e-07 + +Event 255 Batch 1 + 0 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 7.500000000000000e+02 + 1 7.500000000000000e+02 0.000000000000000e+00 0.000000000000000e+00 -7.500000000000000e+02 + 2 6.081680100869344e+02 5.338690546525502e+02 2.877400741676965e+02 -4.536309838913628e+01 + 3 2.634732913131461e+02 -1.846835573335169e+02 1.840484333905926e+02 3.789898484772500e+01 + 4 4.775197661603478e+02 -2.126456306214764e+02 -4.259270823234806e+02 -3.732403240319365e+01 + 5 1.508389324395720e+02 -1.365398666975568e+02 -4.586142523480855e+01 4.478814594460499e+01 + ME 5.570874656157607e-08 + From fa18d55ae6b7602fa3b8546ce7027ce4c4968b7a Mon Sep 17 00:00:00 2001 From: Stephan Hageboeck Date: Thu, 17 Aug 2023 17:18:43 +0200 Subject: [PATCH 085/129] Remove epoch1/2 from CI, add epochX/pptt012j instead. --- .github/workflows/c-cpp.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index 34cff0be37..6afb794d35 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - folder: [ epochX/cudacpp/ee_mumu.sa/SubProcesses/P1_Sigma_sm_epem_mupmum , epoch1/cuda/ee_mumu/SubProcesses/P1_Sigma_sm_epem_mupmum , epoch2/cuda/ee_mumu/SubProcesses/P1_Sigma_sm_epem_mupmum ] + folder: [ epochX/cudacpp/ee_mumu.sa/SubProcesses/P1_Sigma_sm_epem_mupmum , epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_gg_ttx , epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxgg ] fail-fast: false steps: - uses: actions/checkout@v2 @@ -21,7 +21,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - folder: [ epochX/cudacpp/ee_mumu.sa/SubProcesses/P1_Sigma_sm_epem_mupmum , epochX/cudacpp/gg_ttgg.sa/SubProcesses/P1_Sigma_sm_gg_ttxgg ] + folder: [ epochX/cudacpp/ee_mumu.sa/SubProcesses/P1_Sigma_sm_epem_mupmum , epochX/cudacpp/gg_ttgg.sa/SubProcesses/P1_Sigma_sm_gg_ttxgg, epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_gg_ttx ] precision: [ d , f , m ] fail-fast: false steps: @@ -57,7 +57,7 @@ jobs: REQUIRE_CUDA: 1 strategy: matrix: - folder: [ epochX/cudacpp/ee_mumu.sa/SubProcesses/P1_Sigma_sm_epem_mupmum , epochX/cudacpp/gg_ttgg.sa/SubProcesses/P1_Sigma_sm_gg_ttxgg ] + folder: [ epochX/cudacpp/ee_mumu.sa/SubProcesses/P1_Sigma_sm_epem_mupmum , epochX/cudacpp/gg_ttgg.sa/SubProcesses/P1_Sigma_sm_gg_ttxgg , epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_gg_ttx , epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxgg ] precision: [ d , f , m ] fail-fast: false steps: @@ -67,6 +67,6 @@ jobs: - name: make info run: make FPTYPE=${{ matrix.precision }} -C ${{ matrix.folder }} info - name: make - run: make FPTYPE=${{ matrix.precision }} -C ${{ matrix.folder }} - - name: make check - run: make FPTYPE=${{ matrix.precision }} -C ${{ matrix.folder }} check + run: make FPTYPE=${{ matrix.precision }} -C ${{ matrix.folder }} cuda + - name: make gcheck + run: make FPTYPE=${{ matrix.precision }} -C ${{ matrix.folder }} gcheck From cf0fafa975ada3340afd04c374c6b9da5005123a Mon Sep 17 00:00:00 2001 From: Stephan Hageboeck Date: Thu, 17 Aug 2023 12:36:23 +0200 Subject: [PATCH 086/129] [pp->tt012j] Start refactoring the Makefiles. - Separate internal from external flags for every language. - From now on, use MG_XXXFLAGS for madgraph-internal flags - Followed by external XXXFLAGS, which can be overridden by the user. - Remove the need for all .libs and .cudacpp files by making explicit dependencies on the corresponding targets. - Remove force-overrides where possible, so variables can be set on the command line. --- epochX/cudacpp/pp_tt012j.mad/Source/make_opts | 63 ++--- epochX/cudacpp/pp_tt012j.mad/Source/makefile | 33 +-- .../pp_tt012j.mad/SubProcesses/cudacpp.mk | 218 +++++++----------- .../pp_tt012j.mad/SubProcesses/makefile | 66 ++---- .../cudacpp/pp_tt012j.mad/src/cudacpp_src.mk | 57 ++--- 5 files changed, 182 insertions(+), 255 deletions(-) diff --git a/epochX/cudacpp/pp_tt012j.mad/Source/make_opts b/epochX/cudacpp/pp_tt012j.mad/Source/make_opts index 2607530b78..6d46d001df 100644 --- a/epochX/cudacpp/pp_tt012j.mad/Source/make_opts +++ b/epochX/cudacpp/pp_tt012j.mad/Source/make_opts @@ -11,13 +11,6 @@ PYTHIA8_PATH=NotInstalled BIASLIBDIR=../../../lib/ BIASLIBRARY=libbias.$(libext) -# Rest of the makefile -ifeq ($(origin FFLAGS),undefined) -FFLAGS= -w -fPIC -#FFLAGS+= -g -fbounds-check -ffpe-trap=invalid,zero,overflow,underflow,denormal -Wall -fimplicit-none -endif - -FFLAGS += $(GLOBAL_FLAG) # REMOVE MACFLAG IF NOT ON MAC OR FOR F2PY UNAME := $(shell uname -s) @@ -29,14 +22,33 @@ MACFLAG= endif endif +############################################################ +# Default compiler flags +# To change optimisation level, override these as follows: +# make CXXFLAGS="-O0 -g" +# or export them as environment variables +# For debugging Fortran, one could e.g. use: +# FCFLAGS="-g -fbounds-check -ffpe-trap=invalid,zero,overflow,underflow,denormal -Wall -fimplicit-none" +############################################################ -ifeq ($(origin CXXFLAGS),undefined) -CXXFLAGS= -O $(STDLIB_FLAG) $(MACFLAG) +FCFLAGS ?= -O3 -ffast-math -fbounds-check +CXXFLAGS ?= -O3 -ffast-math -DNDEBUG $(STDLIB_FLAG) $(MACFLAG) +NVCCFLAGS ?= -O3 -ffast-math -use_fast_math -DNDEBUG -lineinfo +LDFLAGS ?= $(STDLIB) $(MACFLAG) + +ifneq ($(FFLAGS),) +# Madgraph used to use FFLAGS, so the user probably tries to change the flags specifically for madgraph: +FCFLAGS = $(FFLAGS) endif -ifeq ($(origin CFLAGS),undefined) -CFLAGS= -O $(STDLIB_FLAG) $(MACFLAG) +# Madgraph-specific flags: +WARNFLAGS = -Wall -Wshadow -Wextra +ifeq (,$(findstring -std=,$(CXXFLAGS))) + CXXSTANDARD= -std=c++17 endif +MG_FCFLAGS += -fPIC -w +MG_CXXFLAGS += -fPIC $(CXXSTANDARD) $(WARNFLAGS) +MG_NVCCFLAGS += -fPIC $(CXXSTANDARD) --forward-unknown-to-host-compiler $(WARNFLAGS) # Set FC unless it's defined by an environment variable ifeq ($(origin FC),default) @@ -48,21 +60,18 @@ endif # Increase the number of allowed charcters in a Fortran line ifeq ($(FC), ftn) -FFLAGS+= -extend-source # for ifort type of compiler +MG_FCFLAGS += -extend-source # for ifort type of compiler else VERS="$(shell $(FC) --version | grep ifort -i)" ifeq ($(VERS), "") -FFLAGS+= -ffixed-line-length-132 +MG_FCFLAGS += -ffixed-line-length-132 else -FFLAGS+= -extend-source # for ifort type of compiler +MG_FCFLAGS += -extend-source # for ifort type of compiler endif endif UNAME := $(shell uname -s) -ifeq ($(origin LDFLAGS), undefined) -LDFLAGS=$(STDLIB) $(MACFLAG) -endif # Options: dynamic, lhapdf # Option dynamic @@ -76,17 +85,17 @@ endif ifdef dynamic ifeq ($(UNAME), Darwin) libext=dylib -FFLAGS+= -fno-common -LDFLAGS += -bundle +MG_FCFLAGS += -fno-common +MG_LDFLAGS += -bundle define CREATELIB $(FC) -dynamiclib -undefined dynamic_lookup -o $(1) $(2) endef else libext=so -FFLAGS+= -fPIC -LDFLAGS += -shared +MG_FCFLAGS += -fPIC +MG_LDFLAGS += -shared define CREATELIB -$(FC) $(FFLAGS) $(LDFLAGS) -o $(1) $(2) +$(FC) $(MG_FCFLAGS) $(FCFLAGS) $(MG_LDFLAGS) $(LDFLAGS) -o $(1) $(2) endef endif else @@ -100,17 +109,9 @@ endif # Option lhapdf ifneq ($(lhapdf),) -CXXFLAGS += $(shell $(lhapdf) --cppflags) +MG_CXXFLAGS += $(shell $(lhapdf) --cppflags) alfas_functions=alfas_functions_lhapdf llhapdf+= $(shell $(lhapdf) --cflags --libs) -lLHAPDF -# check if we need to activate c++11 (for lhapdf6.2) -ifeq ($(origin CXX),default) -ifeq ($lhapdfversion$lhapdfsubversion,62) -CXX=$(DEFAULT_CPP_COMPILER) -std=c++11 -else -CXX=$(DEFAULT_CPP_COMPILER) -endif -endif else alfas_functions=alfas_functions llhapdf= diff --git a/epochX/cudacpp/pp_tt012j.mad/Source/makefile b/epochX/cudacpp/pp_tt012j.mad/Source/makefile index 00c73099a0..a98b9a4b08 100644 --- a/epochX/cudacpp/pp_tt012j.mad/Source/makefile +++ b/epochX/cudacpp/pp_tt012j.mad/Source/makefile @@ -10,8 +10,8 @@ include make_opts # Source files -PROCESS= hfill.o matrix.o myamp.o -DSAMPLE = dsample.o ranmar.o DiscreteSampler.o StringCast.o +PROCESS = hfill.o matrix.o myamp.o +DSAMPLE = dsample.o ranmar.o DiscreteSampler.o StringCast.o HBOOK = hfill.o hcurve.o hbook1.o hbook2.o GENERIC = $(alfas_functions).o transpole.o invarients.o hfill.o pawgraphs.o ran1.o \ rw_events.o rw_routines.o kin_functions.o open_file.o basecode.o setrun.o \ @@ -22,7 +22,7 @@ GENSUDGRID = gensudgrid.o is-sud.o setrun_gen.o rw_routines.o open_file.o # Locally compiled libraries -LIBRARIES=$(LIBDIR)libdsample.$(libext) $(LIBDIR)libgeneric.$(libext) +LIBRARIES=$(LIBDIR)libdsample.$(libext) $(LIBDIR)libgeneric.$(libext) # Binaries @@ -32,6 +32,9 @@ BINARIES = $(BINDIR)gen_ximprove $(BINDIR)gensudgrid $(BINDIR)combine_runs all: $(LIBRARIES) $(LIBDIR)libdhelas.$(libext) $(LIBDIR)libpdf.$(libext) $(LIBDIR)libgammaUPC.$(libext) $(LIBDIR)libmodel.$(libext) $(LIBDIR)libcernlib.$(libext) $(LIBDIR)libbias.$(libext) +%.o: %.f *.inc + $(FC) -I. $(MG_FCFLAGS) $(FCFLAGS) -c $< -o $@ + # Libraries $(LIBDIR)libdsample.$(libext): $(DSAMPLE) @@ -39,36 +42,34 @@ $(LIBDIR)libdsample.$(libext): $(DSAMPLE) $(LIBDIR)libgeneric.$(libext): $(GENERIC) $(call CREATELIB, $@, $^) $(LIBDIR)libdhelas.$(libext): DHELAS - cd DHELAS; make; cd .. + $(MAKE) -C $< FFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" FCFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" $(LIBDIR)libpdf.$(libext): PDF make_opts - cd PDF; make; cd .. + $(MAKE) -C $< FFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" FCFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" ifneq (,$(filter edff chff, $(pdlabel1) $(pdlabel2))) $(LIBDIR)libgammaUPC.$(libext): PDF/gammaUPC - cd PDF/gammaUPC; make ; cd ../../ + $(MAKE) -C $< FFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" FCFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" else $(LIBDIR)libgammaUPC.$(libext): PDF/gammaUPC - cd PDF/gammaUPC; make -f makefile_dummy; cd ../../ -endif + $(MAKE) -C $< -f makefile_dummy FFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" FCFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" +endif $(LIBDIR)libcernlib.$(libext): CERNLIB - cd CERNLIB; make; cd .. + $(MAKE) -C $< FFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" FCFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" # The bias library is here the dummy by default; compilation of other ones specified in the run_card will be done by MG5aMC directly. $(LIBDIR)libbias.$(libext): BIAS/dummy - cd BIAS/dummy; make; cd ../../ + $(MAKE) -C $< FFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" FCFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" $(LIBDIR)libmodel.$(libext): MODEL param_card.inc - cd MODEL; make + $(MAKE) -C $< FFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" FCFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" param_card.inc: ../Cards/param_card.dat ../bin/madevent treatcards param -$(BINDIR)gen_ximprove: gen_ximprove.o ranmar.o rw_routines.o open_file.o - $(FC) $(LDFLAGS) -o $@ $^ -#$(BINDIR)combine_events: $(COMBINE) $(LIBDIR)libmodel.$(libext) $(LIBDIR)libpdf.$(libext) $(LIBDIR)libgammaUPC.$(libext) run_card.inc $(LIBDIR)libbias.$(libext) -# $(FC) -o $@ $(COMBINE) -L$(LIBDIR) -lmodel -lpdf -lgammaUPC $(llhapdf) $(LDFLAGS) -lbias +$(BINDIR)gen_ximprove: gen_ximprove.o ranmar.o rw_routines.o open_file.o + $(FC) $(MG_LDFLAGS) $(LDFLAGS) -o $@ $^ $(BINDIR)gensudgrid: $(GENSUDGRID) $(LIBDIR)libpdf.$(libext) $(LIBDIR)libgammaUPC.$(libext) $(LIBDIR)libcernlib.$(libext) - $(FC) -o $@ $(GENSUDGRID) -L$(LIBDIR) -lmodel -lpdf -lgammaUPC -lcernlib $(llhapdf) $(LDFLAGS) + $(FC) -o $@ $(GENSUDGRID) -L$(LIBDIR) -lmodel -lpdf -lgammaUPC -lcernlib $(llhapdf) $(MG_LDFLAGS) $(LDFLAGS) # Dependencies diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/cudacpp.mk b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/cudacpp.mk index 15669185ad..9962a83f75 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/cudacpp.mk @@ -31,13 +31,17 @@ UNAME_P := $(shell uname -p) #=== Configure common compiler flags for C++ and CUDA -INCFLAGS = -I. -OPTFLAGS = -O3 # this ends up in CUFLAGS too (should it?), cannot add -Ofast or -ffast-math here +include ../../Source/make_opts + +# Include directories +INCFLAGS = -I. -I../../src + +MG_CXXFLAGS += $(INCFLAGS) +MG_NVCCFLAGS += $(INCFLAGS) # Dependency on src directory -MG5AMC_COMMONLIB = mg5amc_common -LIBFLAGS = -L$(LIBDIR) -l$(MG5AMC_COMMONLIB) -INCFLAGS += -I../../src +MG5AMC_COMMONLIB = mg5amc_common +MG_LDFLAGS += -L$(LIBDIR) -l$(MG5AMC_COMMONLIB) # Compiler-specific googletest build directory (#125 and #738) ifneq ($(shell $(CXX) --version | grep '^Intel(R) oneAPI DPC++/C++ Compiler'),) @@ -86,32 +90,16 @@ endif #------------------------------------------------------------------------------- +#=== Configure targets + .DEFAULT_GOAL := usage -# Target if user does not specify target usage: $(error Unknown target='$(MAKECMDGOALS)': only 'cppnone', 'cppsse4', 'cppavx2', 'cpp512y', 'cpp512z' and 'cuda' are supported!) #------------------------------------------------------------------------------- -#=== Configure the C++ compiler - -CXXFLAGS = $(OPTFLAGS) -std=c++17 $(INCFLAGS) -Wall -Wshadow -Wextra -ifeq ($(shell $(CXX) --version | grep ^nvc++),) -CXXFLAGS += -ffast-math # see issue #117 -endif -###CXXFLAGS+= -Ofast # performance is not different from --fast-math -###CXXFLAGS+= -g # FOR DEBUGGING ONLY - -# Optionally add debug flags to display the full list of flags (eg on Darwin) -###CXXFLAGS+= -v - -# Note: AR, CXX and FC are implicitly defined if not set externally -# See https://www.gnu.org/software/make/manual/html_node/Implicit-Variables.html - -#------------------------------------------------------------------------------- - -#=== Configure the CUDA compiler for the CUDA target +#=== Configure the CUDA compiler ifneq (,$(findstring $(MAKECMDGOALS),cuda-gcheck-runGcheck-runFGcheck-cmpFGcheck-memcheck)) # If CXX is not a single word (example "clang++ --gcc-toolchain...") then disable CUDA builds (issue #505) @@ -133,27 +121,18 @@ ifneq (,$(findstring $(MAKECMDGOALS),cuda-gcheck-runGcheck-runFGcheck-cmpFGcheck USE_NVTX ?=-DUSE_NVTX # See https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html # See https://arnon.dk/matching-sm-architectures-arch-and-gencode-for-various-nvidia-cards/ - # Default: use compute capability 70 for V100 (CERN lxbatch, CERN itscrd, Juwels Cluster). - # Embed device code for 70, and PTX for 70+. - # Export MADGRAPH_CUDA_ARCHITECTURE (comma-separated list) to use another value or list of values (see #533). - # Examples: use 60 for P100 (Piz Daint), 80 for A100 (Juwels Booster, NVidia raplab/Curiosity). + # Default: use compute capability 70 (Volta architecture), and embed PTX to support later architectures, too. + # Set MADGRAPH_CUDA_ARCHITECTURE to the desired value to change the default. MADGRAPH_CUDA_ARCHITECTURE ?= 70 - ###CUARCHFLAGS = -gencode arch=compute_$(MADGRAPH_CUDA_ARCHITECTURE),code=compute_$(MADGRAPH_CUDA_ARCHITECTURE) -gencode arch=compute_$(MADGRAPH_CUDA_ARCHITECTURE),code=sm_$(MADGRAPH_CUDA_ARCHITECTURE) # Older implementation (AV): go back to this one for multi-GPU support #533 - ###CUARCHFLAGS = --gpu-architecture=compute_$(MADGRAPH_CUDA_ARCHITECTURE) --gpu-code=sm_$(MADGRAPH_CUDA_ARCHITECTURE),compute_$(MADGRAPH_CUDA_ARCHITECTURE) # Newer implementation (SH): cannot use this as-is for multi-GPU support #533 comma:=, - CUARCHFLAGS = $(foreach arch,$(subst $(comma), ,$(MADGRAPH_CUDA_ARCHITECTURE)),-gencode arch=compute_$(arch),code=compute_$(arch) -gencode arch=compute_$(arch),code=sm_$(arch)) + CUARCHFLAGS = $(foreach arch,$(subst $(comma), ,$(MADGRAPH_CUDA_ARCHITECTURE)),--generate-code arch=compute_$(arch),code=compute_$(arch) --generate-code arch=compute_$(arch),code=sm_$(arch)) CUINC = -I$(CUDA_HOME)/include/ CURANDLIBFLAGS = -L$(CUDA_HOME)/lib64/ -lcurand # NB: -lcuda is not needed here! - CUOPTFLAGS = -lineinfo - CUFLAGS = $(foreach opt, $(OPTFLAGS), -Xcompiler $(opt)) $(CUOPTFLAGS) $(INCFLAGS) $(CUINC) $(USE_NVTX) $(CUARCHFLAGS) -use_fast_math - ###CUFLAGS += -Xcompiler -Wall -Xcompiler -Wextra -Xcompiler -Wshadow - ###NVCC_VERSION = $(shell $(NVCC) --version | grep 'Cuda compilation tools' | cut -d' ' -f5 | cut -d, -f1) - CUFLAGS += -std=c++17 # need CUDA >= 11.2 (see #333): this is enforced in mgOnGpuConfig.h - # Without -maxrregcount: baseline throughput: 6.5E8 (16384 32 12) up to 7.3E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 160 # improves throughput: 6.9E8 (16384 32 12) up to 7.7E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 128 # improves throughput: 7.3E8 (16384 32 12) up to 7.6E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 96 # degrades throughput: 4.1E8 (16384 32 12) up to 4.5E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 64 # degrades throughput: 1.7E8 (16384 32 12) flat at 1.7E8 (65536 128 12) + MG_LDFLAGS += $(CURANDLIBFLAGS) + + # Check ../../Source/make_opts for default flags + MG_NVCCFLAGS += $(CUINC) $(USE_NVTX) $(CUARCHFLAGS) + else ifneq ($(origin REQUIRE_CUDA),undefined) # If REQUIRE_CUDA is set but no cuda is found, stop here (e.g. for CI tests on GPU #443) $(error No cuda installation found (set CUDA_HOME or make nvcc visible in PATH)) @@ -165,19 +144,22 @@ ifneq (,$(findstring $(MAKECMDGOALS),cuda-gcheck-runGcheck-runFGcheck-cmpFGcheck override CUINC= override CURANDLIBFLAGS= endif + + # Export NVCC settings for other folders: export NVCC - export CUFLAGS + export MG_NVCCFLAGS + export NVCCFLAGS # Set the host C++ compiler for nvcc via "-ccbin " # (NB issue #505: this must be a single word, "clang++ --gcc-toolchain..." is not supported) - CUFLAGS += -ccbin $(shell which $(subst ccache ,,$(CXX))) + MG_NVCCFLAGS += -ccbin $(shell which $(subst ccache ,,$(CXX))) # Allow newer (unsupported) C++ compilers with older versions of CUDA if ALLOW_UNSUPPORTED_COMPILER_IN_CUDA is set (#504) ifneq ($(origin ALLOW_UNSUPPORTED_COMPILER_IN_CUDA),undefined) - CUFLAGS += -allow-unsupported-compiler + MG_NVCCFLAGS += -allow-unsupported-compiler endif -endif # ($(MAKECMDGOALS),cuda) +endif #------------------------------------------------------------------------------- @@ -200,23 +182,10 @@ endif #=== Configure PowerPC-specific compiler flags for C++ and CUDA -# PowerPC-specific CXX compiler flags (being reviewed) -ifeq ($(UNAME_P),ppc64le) - CXXFLAGS+= -mcpu=power9 -mtune=power9 # gains ~2-3% both for none and sse4 - # Throughput references without the extra flags below: none=1.41-1.42E6, sse4=2.15-2.19E6 - ###CXXFLAGS+= -DNO_WARN_X86_INTRINSICS # no change - ###CXXFLAGS+= -fpeel-loops # no change - ###CXXFLAGS+= -funroll-loops # gains ~1% for none, loses ~1% for sse4 - ###CXXFLAGS+= -ftree-vectorize # no change - ###CXXFLAGS+= -flto # would increase to none=4.08-4.12E6, sse4=4.99-5.03E6! -else - ###CXXFLAGS+= -flto # also on Intel this would increase throughputs by a factor 2 to 4... - ######CXXFLAGS+= -fno-semantic-interposition # no benefit (neither alone, nor combined with -flto) -endif - -# PowerPC-specific CUDA compiler flags (to be reviewed!) +# PowerPC-specific CXX / CUDA compiler flags (being reviewed) ifeq ($(UNAME_P),ppc64le) - CUFLAGS+= -Xcompiler -mno-float128 + MG_CXXFLAGS+= -mcpu=power9 -mtune=power9 # gains ~2-3% both for none and sse4 + MG_NVCCFLAGS+= -Xcompiler -mno-float128 endif #------------------------------------------------------------------------------- @@ -225,32 +194,23 @@ endif # Set the default OMPFLAGS choice ifneq ($(shell $(CXX) --version | egrep '^Intel'),) -override OMPFLAGS = -fopenmp -###override OMPFLAGS = # disable OpenMP MT on Intel (was ok without nvcc but not ok with nvcc before #578) +OMPFLAGS = -fopenmp else ifneq ($(shell $(CXX) --version | egrep '^(clang)'),) -override OMPFLAGS = -fopenmp -###override OMPFLAGS = # disable OpenMP MT on clang (was not ok without or with nvcc before #578) +OMPFLAGS = -fopenmp else ifneq ($(shell $(CXX) --version | egrep '^(Apple clang)'),) -override OMPFLAGS = # disable OpenMP MT on Apple clang (builds fail in the CI #578) +OMPFLAGS = # disable OpenMP MT on Apple clang (builds fail in the CI #578) else -override OMPFLAGS = -fopenmp -###override OMPFLAGS = # disable OpenMP MT (default before #575) +OMPFLAGS = -fopenmp endif # Set the default FPTYPE (floating point type) choice -ifeq ($(FPTYPE),) - override FPTYPE = d -endif +FPTYPE ?= d # Set the default HELINL (inline helicities?) choice -ifeq ($(HELINL),) - override HELINL = 0 -endif +HELINL ?= 0 # Set the default HRDCOD (hardcode cIPD physics parameters?) choice -ifeq ($(HRDCOD),) - override HRDCOD = 0 -endif +HRDCOD ?= 0 # Set the default RNDGEN (random number generator) choice ifeq ($(RNDGEN),) @@ -290,7 +250,7 @@ export OMPFLAGS # Set the build flags appropriate to OMPFLAGS $(info OMPFLAGS=$(OMPFLAGS)) -CXXFLAGS += $(OMPFLAGS) +MG_CXXFLAGS += $(OMPFLAGS) # Set the build flags appropriate to each AVX choice (example: "make AVX=none") # [NB MGONGPU_PVW512 is needed because "-mprefer-vector-width=256" is not exposed in a macro] @@ -339,20 +299,17 @@ ifeq ($(findstring cpp,$(MAKECMDGOALS)),cpp) endif endif # For the moment, use AVXFLAGS everywhere: eventually, use them only in encapsulated implementations? - CXXFLAGS+= $(AVXFLAGS) + MG_CXXFLAGS+= $(AVXFLAGS) endif # Set the build flags appropriate to each FPTYPE choice (example: "make FPTYPE=f") $(info FPTYPE=$(FPTYPE)) ifeq ($(FPTYPE),d) - CXXFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_DOUBLE - CUFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_DOUBLE + COMMONFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_DOUBLE else ifeq ($(FPTYPE),f) - CXXFLAGS += -DMGONGPU_FPTYPE_FLOAT -DMGONGPU_FPTYPE2_FLOAT - CUFLAGS += -DMGONGPU_FPTYPE_FLOAT -DMGONGPU_FPTYPE2_FLOAT + COMMONFLAGS += -DMGONGPU_FPTYPE_FLOAT -DMGONGPU_FPTYPE2_FLOAT else ifeq ($(FPTYPE),m) - CXXFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_FLOAT - CUFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_FLOAT + COMMONFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_FLOAT else $(error Unknown FPTYPE='$(FPTYPE)': only 'd', 'f' and 'm' are supported) endif @@ -360,8 +317,7 @@ endif # Set the build flags appropriate to each HELINL choice (example: "make HELINL=1") $(info HELINL=$(HELINL)) ifeq ($(HELINL),1) - CXXFLAGS += -DMGONGPU_INLINE_HELAMPS - CUFLAGS += -DMGONGPU_INLINE_HELAMPS + COMMONFLAGS += -DMGONGPU_INLINE_HELAMPS else ifneq ($(HELINL),0) $(error Unknown HELINL='$(HELINL)': only '0' and '1' are supported) endif @@ -369,8 +325,7 @@ endif # Set the build flags appropriate to each HRDCOD choice (example: "make HRDCOD=1") $(info HRDCOD=$(HRDCOD)) ifeq ($(HRDCOD),1) - CXXFLAGS += -DMGONGPU_HARDCODE_PARAM - CUFLAGS += -DMGONGPU_HARDCODE_PARAM + COMMONFLAGS += -DMGONGPU_HARDCODE_PARAM else ifneq ($(HRDCOD),0) $(error Unknown HRDCOD='$(HRDCOD)': only '0' and '1' are supported) endif @@ -385,6 +340,9 @@ else $(error Unknown RNDGEN='$(RNDGEN)': only 'hasCurand' and 'hasNoCurand' are supported) endif +MG_CXXFLAGS += $(COMMONFLAGS) +MG_NVCCFLAGS += $(COMMONFLAGS) + #------------------------------------------------------------------------------- #=== Configure build directories and build lockfiles === @@ -465,8 +423,6 @@ endif # Target (and build options): debug MAKEDEBUG= -debug: OPTFLAGS = -g -O0 -debug: CUOPTFLAGS = -G debug: MAKEDEBUG := debug debug: all.$(TAG) @@ -474,44 +430,43 @@ debug: all.$(TAG) ifneq ($(NVCC),) $(BUILDDIR)/%.o : %.cu *.h ../../src/*.h @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c $< -o $@ + $(NVCC) $(MG_NVCCFLAGS) $(NVCCFLAGS) -c $< -o $@ $(BUILDDIR)/%_cu.o : %.cc *.h ../../src/*.h @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c -x cu $< -o $@ + $(NVCC) $(MG_NVCCFLAGS) $(NVCCFLAGS) -c -x cu $< -o $@ endif # Generic target and build rules: objects from C++ compilation # (NB do not include CUINC here! add it only for NVTX or curand #679) $(BUILDDIR)/%.o : %.cc *.h ../../src/*.h @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - $(CXX) $(CPPFLAGS) $(CXXFLAGS) -fPIC -c $< -o $@ + $(CXX) $(MG_CXXFLAGS) $(CXXFLAGS) -c $< -o $@ # Apply special build flags only to CrossSectionKernel.cc and gCrossSectionKernel.cu (no fast math, see #117 and #516) ifeq ($(shell $(CXX) --version | grep ^nvc++),) -$(BUILDDIR)/CrossSectionKernels.o: CXXFLAGS := $(filter-out -ffast-math,$(CXXFLAGS)) $(BUILDDIR)/CrossSectionKernels.o: CXXFLAGS += -fno-fast-math ifneq ($(NVCC),) -$(BUILDDIR)/gCrossSectionKernels.o: CUFLAGS += -Xcompiler -fno-fast-math +$(BUILDDIR)/gCrossSectionKernels.o: NVCCFLAGS += -Xcompiler -fno-fast-math endif endif # Apply special build flags only to check_sa.o and gcheck_sa.o (NVTX in timermap.h, #679) -$(BUILDDIR)/check_sa.o: CXXFLAGS += $(USE_NVTX) $(CUINC) -$(BUILDDIR)/gcheck_sa.o: CXXFLAGS += $(USE_NVTX) $(CUINC) +$(BUILDDIR)/check_sa.o: MG_CXXFLAGS += $(USE_NVTX) $(CUINC) +$(BUILDDIR)/gcheck_sa.o: MG_CXXFLAGS += $(USE_NVTX) $(CUINC) # Apply special build flags only to check_sa and CurandRandomNumberKernel (curand headers, #679) -$(BUILDDIR)/check_sa.o: CXXFLAGS += $(CXXFLAGSCURAND) -$(BUILDDIR)/gcheck_sa.o: CXXFLAGS += $(CXXFLAGSCURAND) -$(BUILDDIR)/CurandRandomNumberKernel.o: CXXFLAGS += $(CXXFLAGSCURAND) +$(BUILDDIR)/check_sa.o: MG_CXXFLAGS += $(CXXFLAGSCURAND) +$(BUILDDIR)/gcheck_sa.o: MG_CXXFLAGS += $(CXXFLAGSCURAND) +$(BUILDDIR)/CurandRandomNumberKernel.o: MG_CXXFLAGS += $(CXXFLAGSCURAND) ifeq ($(RNDGEN),hasCurand) -$(BUILDDIR)/CurandRandomNumberKernel.o: CXXFLAGS += $(CUINC) +$(BUILDDIR)/CurandRandomNumberKernel.o: MG_CXXFLAGS += $(CUINC) endif # Avoid "warning: builtin __has_trivial_... is deprecated; use __is_trivially_... instead" in nvcc with icx2023 (#592) ifneq ($(shell $(CXX) --version | egrep '^(Intel)'),) ifneq ($(NVCC),) -CUFLAGS += -Xcompiler -Wno-deprecated-builtins +MG_NVCCFLAGS += -Xcompiler -Wno-deprecated-builtins endif endif @@ -527,9 +482,6 @@ endif #### Apply special build flags only to CPPProcess.cc (-flto) ###$(BUILDDIR)/CPPProcess.o: CXXFLAGS += -flto -#### Apply special build flags only to CPPProcess.cc (AVXFLAGS) -###$(BUILDDIR)/CPPProcess.o: CXXFLAGS += $(AVXFLAGS) - #------------------------------------------------------------------------------- # Target (and build rules): common (src) library @@ -557,7 +509,7 @@ endif $(LIBDIR)/lib$(MG5AMC_CXXLIB).so: $(BUILDDIR)/fbridge.o $(LIBDIR)/lib$(MG5AMC_CXXLIB).so: cxx_objects_lib += $(BUILDDIR)/fbridge.o $(LIBDIR)/lib$(MG5AMC_CXXLIB).so: $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cxx_objects_lib) - $(CXX) -shared -o $@ $(cxx_objects_lib) $(CXXLIBFLAGSRPATH2) -L$(LIBDIR) -l$(MG5AMC_COMMONLIB) + $(CXX) -shared -o $@ $(cxx_objects_lib) $(CXXLIBFLAGSRPATH2) -L$(LIBDIR) -l$(MG5AMC_COMMONLIB) $(MG_LDFLAGS) $(LDFLAGS) ifneq ($(NVCC),) $(LIBDIR)/lib$(MG5AMC_CULIB).so: $(BUILDDIR)/fbridge_cu.o @@ -576,20 +528,20 @@ endif #------------------------------------------------------------------------------- # Target (and build rules): C++ and CUDA standalone executables -$(cxx_main): LIBFLAGS += $(CXXLIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH +$(cxx_main): MG_LDFLAGS += $(CXXLIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH $(cxx_main): $(BUILDDIR)/check_sa.o $(LIBDIR)/lib$(MG5AMC_CXXLIB).so $(cxx_objects_exe) $(BUILDDIR)/CurandRandomNumberKernel.o - $(CXX) -o $@ $(BUILDDIR)/check_sa.o $(OMPFLAGS) -ldl -pthread $(LIBFLAGS) -L$(LIBDIR) -l$(MG5AMC_CXXLIB) $(cxx_objects_exe) $(BUILDDIR)/CurandRandomNumberKernel.o $(CURANDLIBFLAGS) + $(CXX) -o $@ $(BUILDDIR)/check_sa.o $(OMPFLAGS) -ldl -pthread -L$(LIBDIR) -l$(MG5AMC_CXXLIB) $(cxx_objects_exe) $(BUILDDIR)/CurandRandomNumberKernel.o $(MG_LDFLAGS) $(LDFLAGS) ifneq ($(NVCC),) ifneq ($(shell $(CXX) --version | grep ^Intel),) -$(cu_main): LIBFLAGS += -lintlc # compile with icpx and link with nvcc (undefined reference to `_intel_fast_memcpy') -$(cu_main): LIBFLAGS += -lsvml # compile with icpx and link with nvcc (undefined reference to `__svml_cos4_l9') +$(cu_main): MG_LDFLAGS += -lintlc # compile with icpx and link with nvcc (undefined reference to `_intel_fast_memcpy') +$(cu_main): MG_LDFLAGS += -lsvml # compile with icpx and link with nvcc (undefined reference to `__svml_cos4_l9') else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 -$(cu_main): LIBFLAGS += -L$(patsubst %bin/nvc++,%lib,$(subst ccache ,,$(CXX))) -lnvhpcatm -lnvcpumath -lnvc +$(cu_main): MG_LDFLAGS += -L$(patsubst %bin/nvc++,%lib,$(subst ccache ,,$(CXX))) -lnvhpcatm -lnvcpumath -lnvc endif -$(cu_main): LIBFLAGS += $(CULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH +$(cu_main): MG_LDFLAGS += $(CULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH $(cu_main): $(BUILDDIR)/gcheck_sa.o $(LIBDIR)/lib$(MG5AMC_CULIB).so $(cu_objects_exe) $(BUILDDIR)/gCurandRandomNumberKernel.o - $(NVCC) -o $@ $(BUILDDIR)/gcheck_sa.o $(CUARCHFLAGS) $(LIBFLAGS) -L$(LIBDIR) -l$(MG5AMC_CULIB) $(cu_objects_exe) $(BUILDDIR)/gCurandRandomNumberKernel.o $(CURANDLIBFLAGS) + $(NVCC) -o $@ $(BUILDDIR)/gcheck_sa.o $(CUARCHFLAGS) -L$(LIBDIR) -l$(MG5AMC_CULIB) $(cu_objects_exe) $(BUILDDIR)/gCurandRandomNumberKernel.o $(MG_LDFLAGS) $(LDFLAGS) endif #------------------------------------------------------------------------------- @@ -609,23 +561,23 @@ $(BUILDDIR)/%.o : %.f *.inc ###$(BUILDDIR)/fcheck_sa.o : $(INCDIR)/fbridge.inc ifeq ($(UNAME_S),Darwin) -$(fcxx_main): LIBFLAGS += -L$(shell dirname $(shell $(FC) --print-file-name libgfortran.dylib)) # add path to libgfortran on Mac #375 +$(fcxx_main): MG_LDFLAGS += -L$(shell dirname $(shell $(FC) --print-file-name libgfortran.dylib)) # add path to libgfortran on Mac #375 endif -$(fcxx_main): LIBFLAGS += $(CXXLIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH +$(fcxx_main): MG_LDFLAGS += $(CXXLIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH $(fcxx_main): $(BUILDDIR)/fcheck_sa.o $(BUILDDIR)/fsampler.o $(LIBDIR)/lib$(MG5AMC_CXXLIB).so $(cxx_objects_exe) - $(CXX) -o $@ $(BUILDDIR)/fcheck_sa.o $(OMPFLAGS) $(BUILDDIR)/fsampler.o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_CXXLIB) $(cxx_objects_exe) + $(CXX) -o $@ $(BUILDDIR)/fcheck_sa.o $(cxx_objects_exe) $(OMPFLAGS) $(BUILDDIR)/fsampler.o -lgfortran -L$(LIBDIR) -l$(MG5AMC_CXXLIB) $(MG_LDFLAGS) $(LDFLAGS) ifneq ($(NVCC),) ifneq ($(shell $(CXX) --version | grep ^Intel),) -$(fcu_main): LIBFLAGS += -lintlc # compile with icpx and link with nvcc (undefined reference to `_intel_fast_memcpy') -$(fcu_main): LIBFLAGS += -lsvml # compile with icpx and link with nvcc (undefined reference to `__svml_cos4_l9') +$(fcu_main): MG_LDFLAGS += -lintlc # compile with icpx and link with nvcc (undefined reference to `_intel_fast_memcpy') +$(fcu_main): MG_LDFLAGS += -lsvml # compile with icpx and link with nvcc (undefined reference to `__svml_cos4_l9') endif ifeq ($(UNAME_S),Darwin) -$(fcu_main): LIBFLAGS += -L$(shell dirname $(shell $(FC) --print-file-name libgfortran.dylib)) # add path to libgfortran on Mac #375 +$(fcu_main): MG_LDFLAGS += -L$(shell dirname $(shell $(FC) --print-file-name libgfortran.dylib)) # add path to libgfortran on Mac #375 endif -$(fcu_main): LIBFLAGS += $(CULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH +$(fcu_main): MG_LDFLAGS += $(CULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH $(fcu_main): $(BUILDDIR)/fcheck_sa.o $(BUILDDIR)/fsampler_cu.o $(LIBDIR)/lib$(MG5AMC_CULIB).so $(cu_objects_exe) - $(NVCC) -o $@ $(BUILDDIR)/fcheck_sa.o $(BUILDDIR)/fsampler_cu.o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_CULIB) $(cu_objects_exe) + $(NVCC) -o $@ $(BUILDDIR)/fcheck_sa.o $(BUILDDIR)/fsampler_cu.o $(cu_objects_exe) -lgfortran -L$(LIBDIR) -l$(MG5AMC_CULIB) $(MG_LDFLAGS) $(LDFLAGS) endif #------------------------------------------------------------------------------- @@ -666,10 +618,10 @@ ifneq ($(NVCC),) $(BUILDDIR)/runTest_cu.o: $(GTESTLIBS) $(BUILDDIR)/runTest_cu.o: INCFLAGS += $(GTESTINC) ifneq ($(shell $(CXX) --version | grep ^Intel),) -$(testmain): LIBFLAGS += -lintlc # compile with icpx and link with nvcc (undefined reference to `_intel_fast_memcpy') -$(testmain): LIBFLAGS += -lsvml # compile with icpx and link with nvcc (undefined reference to `__svml_cos4_l9') +$(testmain): MG_LDFLAGS += -lintlc # compile with icpx and link with nvcc (undefined reference to `_intel_fast_memcpy') +$(testmain): MG_LDFLAGS += -lsvml # compile with icpx and link with nvcc (undefined reference to `__svml_cos4_l9') else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 -$(testmain): LIBFLAGS += -L$(patsubst %bin/nvc++,%lib,$(subst ccache ,,$(CXX))) -lnvhpcatm -lnvcpumath -lnvc +$(testmain): MG_LDFLAGS += -L$(patsubst %bin/nvc++,%lib,$(subst ccache ,,$(CXX))) -lnvhpcatm -lnvcpumath -lnvc endif $(testmain): $(BUILDDIR)/runTest_cu.o $(testmain): cu_objects_exe += $(BUILDDIR)/runTest_cu.o @@ -677,28 +629,28 @@ endif $(testmain): $(GTESTLIBS) $(testmain): INCFLAGS += $(GTESTINC) -$(testmain): LIBFLAGS += -L$(GTESTLIBDIR) -lgtest -lgtest_main +$(testmain): MG_LDFLAGS += -L$(GTESTLIBDIR) -lgtest -lgtest_main ifneq ($(OMPFLAGS),) ifneq ($(shell $(CXX) --version | egrep '^Intel'),) -$(testmain): LIBFLAGS += -liomp5 # see #578 (not '-qopenmp -static-intel' as in https://stackoverflow.com/questions/45909648) +$(testmain): MG_LDFLAGS += -liomp5 # see #578 (not '-qopenmp -static-intel' as in https://stackoverflow.com/questions/45909648) else ifneq ($(shell $(CXX) --version | egrep '^clang'),) -$(testmain): LIBFLAGS += -L $(shell dirname $(shell $(CXX) -print-file-name=libc++.so)) -lomp # see #604 +$(testmain): MG_LDFLAGS += -L $(shell dirname $(shell $(CXX) -print-file-name=libc++.so)) -lomp # see #604 ###else ifneq ($(shell $(CXX) --version | egrep '^Apple clang'),) ###$(testmain): LIBFLAGS += ???? # OMP is not supported yet by cudacpp for Apple clang (see #578 and #604) else -$(testmain): LIBFLAGS += -lgomp +$(testmain): MG_LDFLAGS += -lgomp endif endif ifeq ($(NVCC),) # link only runTest.o -$(testmain): LIBFLAGS += $(CXXLIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH +$(testmain): MG_LDFLAGS += $(CXXLIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH $(testmain): $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cxx_objects_lib) $(cxx_objects_exe) $(GTESTLIBS) - $(CXX) -o $@ $(cxx_objects_lib) $(cxx_objects_exe) -ldl -pthread $(LIBFLAGS) + $(CXX) -o $@ $(cxx_objects_lib) $(cxx_objects_exe) -ldl -pthread $(MG_LDFLAGS) $(LDFLAGS) else # link both runTest.o and runTest_cu.o -$(testmain): LIBFLAGS += $(CULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH +$(testmain): MG_LDFLAGS += $(CULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH $(testmain): $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cxx_objects_lib) $(cxx_objects_exe) $(cu_objects_lib) $(cu_objects_exe) $(GTESTLIBS) - $(NVCC) -o $@ $(cxx_objects_lib) $(cxx_objects_exe) $(cu_objects_lib) $(cu_objects_exe) -ldl $(LIBFLAGS) -lcuda + $(NVCC) -o $@ $(cxx_objects_lib) $(cxx_objects_exe) $(cu_objects_lib) $(cu_objects_exe) -ldl -lcuda $(MG_LDFLAGS) $(LDFLAGS) endif # Use flock (Linux only, no Mac) to allow 'make -j' if googletest has not yet been downloaded https://stackoverflow.com/a/32666215 diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/makefile b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/makefile index 093bc84271..0662fa860e 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/makefile +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/makefile @@ -1,13 +1,10 @@ SHELL := /bin/bash include ../../Source/make_opts -FFLAGS+= -w # Enable the C preprocessor https://gcc.gnu.org/onlinedocs/gfortran/Preprocessing-Options.html -FFLAGS+= -cpp - -# Compile counters with -O3 as in the cudacpp makefile (avoid being "unfair" to Fortran #740) -CXXFLAGS = -O3 -Wall -Wshadow -Wextra +MG_FCFLAGS += -cpp +MG_CXXFLAGS += -I. # Sets correct target based on MAKECMDGOALS ifeq ($(MAKECMDGOALS),) @@ -67,7 +64,7 @@ else MADLOOP_LIB = endif -LINKLIBS = $(LINK_MADLOOP_LIB) $(LINK_LOOP_LIBS) -L$(LIBDIR) -ldhelas -ldsample -lmodel -lgeneric -lpdf -lcernlib $(llhapdf) -lbias +LINKLIBS = $(LINK_MADLOOP_LIB) $(LINK_LOOP_LIBS) -L$(LIBDIR) -ldhelas -ldsample -lmodel -lgeneric -lpdf -lcernlib $(llhapdf) -lbias processid_short=$(shell basename $(CURDIR) | awk -F_ '{print $$(NF-1)"_"$$NF}') CUDACPP_MAKEFILE=cudacpp.mk @@ -92,7 +89,7 @@ LIBS = $(LIBDIR)libbias.$(libext) $(LIBDIR)libdhelas.$(libext) $(LIBDIR)libdsamp ifneq ("$(wildcard ../../Source/RUNNING)","") LINKLIBS += -lrunning - LIBS += $(LIBDIR)librunning.$(libext) + LIBS += $(LIBDIR)librunning.$(libext) endif @@ -112,13 +109,13 @@ PROCESS= myamp.o genps.o unwgt.o setcuts.o get_color.o \ DSIG=driver.o $(patsubst %.f, %.o, $(filter-out auto_dsig.f, $(wildcard auto_dsig*.f))) DSIG_cudacpp=driver_cudacpp.o $(patsubst %.f, %_cudacpp.o, $(filter-out auto_dsig.f, $(wildcard auto_dsig*.f))) -SYMMETRY = symmetry.o idenparts.o +SYMMETRY = symmetry.o idenparts.o # Binaries #LDFLAGS+=-Wl,--no-relax # avoid 'failed to convert GOTPCREL relocation' error #458 (flag not universal -> skip?) -all: $(PROG)_fortran $(CUDACPP_BUILDDIR)/$(PROG)_cpp # also builds $(PROG)_cuda if $(CUDACPP_CULIB) exists (#503) +all: $(PROG)_fortran $(CUDACPP_BUILDDIR)/$(PROG)_cpp# also builds $(PROG)_cuda if $(CUDACPP_CULIB) exists (#503) ifneq ($(shell $(CXX) --version | egrep '^Intel'),) override OMPFLAGS = -fopenmp @@ -134,13 +131,12 @@ override OMPFLAGS = -fopenmp endif $(PROG)_fortran: $(PROCESS) $(DSIG) auto_dsig.o $(LIBS) $(MATRIX) counters.o ompnumthreads.o - $(FC) -o $(PROG)_fortran $(PROCESS) $(DSIG) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o $(LDFLAGS) + $(FC) $(MG_FCFLAGS) $(FCFLAGS) -o $(PROG)_fortran $(PROCESS) $(DSIG) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o $(LDFLAGS) -$(LIBS): .libs +$(LIBS): ../../Source -.libs: ../../Cards/param_card.dat ../../Cards/run_card.dat - cd ../../Source; make - touch $@ +../../Source: ../../Source/*.f ../../Cards/param_card.dat ../../Cards/run_card.dat + $(MAKE) -C ../../Source # On Linux, set rpath to LIBDIR to make it unnecessary to use LD_LIBRARY_PATH # Use relative paths with respect to the executables ($ORIGIN on Linux) @@ -188,18 +184,17 @@ madevent_cuda_link: $(CUDACPP_BUILDDIR)/$(PROG)_cuda rm -f $(PROG) ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cuda $(PROG) -# Building $(PROG)_cpp also builds $(PROG)_cuda if $(CUDACPP_CULIB) exists (improved patch for cpp-only builds #503) $(CUDACPP_BUILDDIR)/$(PROG)_cpp: $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(LIBS) $(MATRIX) counters.o ompnumthreads.o $(CPPTARGET) - $(FC) -o $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o -L$(LIBDIR)/$(CUDACPP_BUILDDIR) -l$(CUDACPP_COMMONLIB) -l$(CUDACPP_CXXLIB) $(LIBFLAGSRPATH) $(LDFLAGS) + $(FC) -o $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o -L$(LIBDIR)/$(CUDACPP_BUILDDIR) -l$(CUDACPP_COMMONLIB) -l$(CUDACPP_CXXLIB) $(LIBFLAGSRPATH) $(MG_LDFLAGS) $(LDFLAGS) $(CUDACPP_BUILDDIR)/$(PROG)_cuda: $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(LIBS) $(MATRIX) counters.o ompnumthreads.o cuda - $(FC) -o $(CUDACPP_BUILDDIR)/$(PROG)_cuda $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o -L$(LIBDIR)/$(CUDACPP_BUILDDIR) -l$(CUDACPP_COMMONLIB) -l$(CUDACPP_CULIB) $(LIBFLAGSRPATH) $(LDFLAGS) + $(FC) -o $(CUDACPP_BUILDDIR)/$(PROG)_cuda $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o -L$(LIBDIR)/$(CUDACPP_BUILDDIR) -l$(CUDACPP_COMMONLIB) -l$(CUDACPP_CULIB) $(LIBFLAGSRPATH) $(MG_LDFLAGS) $(LDFLAGS) counters.o: counters.cc timer.h - $(CXX) $(CXXFLAGS) -c $< -o $@ + $(CXX) $(MG_CXXFLAGS) $(CXXFLAGS) -c $< -o $@ ompnumthreads.o: ompnumthreads.cc ompnumthreads.h - $(CXX) -I. $(CXXFLAGS) $(OMPFLAGS) -c $< -o $@ + $(CXX) $(MG_CXXFLAGS) $(CXXFLAGS) $(OMPFLAGS) -c $< -o $@ $(PROG)_forhel: $(PROCESS) auto_dsig.o $(LIBS) $(MATRIX_HEL) $(FC) -o $(PROG)_forhel $(PROCESS) $(MATRIX_HEL) $(LINKLIBS) $(LDFLAGS) $(BIASDEPENDENCIES) $(OMPFLAGS) @@ -207,27 +202,14 @@ $(PROG)_forhel: $(PROCESS) auto_dsig.o $(LIBS) $(MATRIX_HEL) gensym: $(SYMMETRY) configs.inc $(LIBS) $(FC) -o gensym $(SYMMETRY) -L$(LIBDIR) $(LINKLIBS) $(LDFLAGS) -###ifeq (,$(wildcard fbridge.inc)) # Pointless: fbridge.inc always exists as this is the cudacpp-modified makefile! -###$(LIBDIR)libmodel.$(libext): ../../Cards/param_card.dat -### cd ../../Source/MODEL; make -### -###$(LIBDIR)libgeneric.$(libext): ../../Cards/run_card.dat -### cd ../../Source; make -### -###$(LIBDIR)libpdf.$(libext): -### cd ../../Source/PDF; make -### -###$(LIBDIR)libgammaUPC.$(libext): -### cd ../../Source/PDF/gammaUPC; make -###endif # Add source so that the compiler finds the DiscreteSampler module. $(MATRIX): %.o: %.f - $(FC) $(FFLAGS) $(MATRIX_FLAG) -c $< -I../../Source/ -I../../Source/PDF/gammaUPC + $(FC) $(MG_FCFLAGS) $(FCFLAGS) $(MATRIX_FLAG) -c $< -I../../Source/ -I../../Source/PDF/gammaUPC %.o: %.f - $(FC) $(FFLAGS) -c $< -I../../Source/ -I../../Source/PDF/gammaUPC + $(FC) $(MG_FCFLAGS) $(FCFLAGS) -I../../Source/ -I../../Source/PDF/gammaUPC -c $< -o $@ %_cudacpp.o: %.f - $(FC) $(FFLAGS) -c -DMG5AMC_MEEXPORTER_CUDACPP $< -I../../Source/ $(OMPFLAGS) -o $@ + $(FC) $(MG_FCFLAGS) $(FCFLAGS) -c -DMG5AMC_MEEXPORTER_CUDACPP $< -I../../Source/ $(OMPFLAGS) -o $@ # Dependencies @@ -248,12 +230,14 @@ unwgt.o: genps.inc nexternal.inc symswap.inc cluster.inc run.inc message.inc \ initcluster.o: message.inc # Extra dependencies on discretesampler.mod - -auto_dsig.o: .libs -driver.o: .libs -driver_cudacpp.o: .libs -$(MATRIX): .libs -genps.o: .libs +../../Source/discretesampler.mod: ../../Source/DiscreteSampler.f + $(MAKE) -C ../../Source + +auto_dsig.o: ../../Source/discretesampler.mod +driver.o: ../../Source/discretesampler.mod +driver_cudacpp.o: ../../Source/discretesampler.mod +$(MATRIX): ../../Source/discretesampler.mod +genps.o: ../../Source/discretesampler.mod # Cudacpp avxall targets diff --git a/epochX/cudacpp/pp_tt012j.mad/src/cudacpp_src.mk b/epochX/cudacpp/pp_tt012j.mad/src/cudacpp_src.mk index 750986464e..4e5521c103 100644 --- a/epochX/cudacpp/pp_tt012j.mad/src/cudacpp_src.mk +++ b/epochX/cudacpp/pp_tt012j.mad/src/cudacpp_src.mk @@ -16,21 +16,14 @@ SHELL := /bin/bash #------------------------------------------------------------------------------- -#=== Configure common compiler flags for CUDA and C++ - -INCFLAGS = -I. -OPTFLAGS = -O3 # this ends up in CUFLAGS too (should it?), cannot add -Ofast or -ffast-math here - -#------------------------------------------------------------------------------- - #=== Configure the C++ compiler -CXXFLAGS = $(OPTFLAGS) -std=c++17 $(INCFLAGS) $(USE_NVTX) -fPIC -Wall -Wshadow -Wextra +include ../Source/make_opts + +MG_CXXFLAGS += -fPIC -I. $(USE_NVTX) ifeq ($(shell $(CXX) --version | grep ^nvc++),) -CXXFLAGS+= -ffast-math # see issue #117 +MG_CXXFLAGS += -ffast-math # see issue #117 endif -###CXXFLAGS+= -Ofast # performance is not different from --fast-math -###CXXFLAGS+= -g # FOR DEBUGGING ONLY # Note: AR, CXX and FC are implicitly defined if not set externally # See https://www.gnu.org/software/make/manual/html_node/Implicit-Variables.html @@ -63,18 +56,18 @@ UNAME_P := $(shell uname -p) # PowerPC-specific CXX compiler flags (being reviewed) ifeq ($(UNAME_P),ppc64le) - CXXFLAGS+= -mcpu=power9 -mtune=power9 # gains ~2-3% both for none and sse4 + MG_CXXFLAGS+= -mcpu=power9 -mtune=power9 # gains ~2-3% both for none and sse4 # Throughput references without the extra flags below: none=1.41-1.42E6, sse4=2.15-2.19E6 - ###CXXFLAGS+= -DNO_WARN_X86_INTRINSICS # no change - ###CXXFLAGS+= -fpeel-loops # no change - ###CXXFLAGS+= -funroll-loops # gains ~1% for none, loses ~1% for sse4 - ###CXXFLAGS+= -ftree-vectorize # no change - ###CXXFLAGS+= -flto # BUILD ERROR IF THIS ADDED IN SRC?! + ###MG_CXXFLAGS+= -DNO_WARN_X86_INTRINSICS # no change + ###MG_CXXFLAGS+= -fpeel-loops # no change + ###MG_CXXFLAGS+= -funroll-loops # gains ~1% for none, loses ~1% for sse4 + ###MG_CXXFLAGS+= -ftree-vectorize # no change + ###MG_CXXFLAGS+= -flto # BUILD ERROR IF THIS ADDED IN SRC?! else ###AR=gcc-ar # needed by -flto ###RANLIB=gcc-ranlib # needed by -flto - ###CXXFLAGS+= -flto # NB: build error from src/Makefile unless gcc-ar and gcc-ranlib are used - ######CXXFLAGS+= -fno-semantic-interposition # no benefit (neither alone, nor combined with -flto) + ###MG_CXXFLAGS+= -flto # NB: build error from src/Makefile unless gcc-ar and gcc-ranlib are used + ######MG_CXXFLAGS+= -fno-semantic-interposition # no benefit (neither alone, nor combined with -flto) endif #------------------------------------------------------------------------------- @@ -83,7 +76,7 @@ endif # Set the build flags appropriate to OMPFLAGS ###$(info OMPFLAGS=$(OMPFLAGS)) -CXXFLAGS += $(OMPFLAGS) +MG_CXXFLAGS += $(OMPFLAGS) # Set the build flags appropriate to each AVX choice (example: "make AVX=none") # [NB MGONGPU_PVW512 is needed because "-mprefer-vector-width=256" is not exposed in a macro] @@ -132,17 +125,17 @@ ifeq ($(NVCC),) endif endif # For the moment, use AVXFLAGS everywhere: eventually, use them only in encapsulated implementations? - CXXFLAGS+= $(AVXFLAGS) + MG_CXXFLAGS+= $(AVXFLAGS) endif # Set the build flags appropriate to each FPTYPE choice (example: "make FPTYPE=f") ###$(info FPTYPE=$(FPTYPE)) ifeq ($(FPTYPE),d) - CXXFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_DOUBLE + MG_CXXFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_DOUBLE else ifeq ($(FPTYPE),f) - CXXFLAGS += -DMGONGPU_FPTYPE_FLOAT -DMGONGPU_FPTYPE2_FLOAT + MG_CXXFLAGS += -DMGONGPU_FPTYPE_FLOAT -DMGONGPU_FPTYPE2_FLOAT else ifeq ($(FPTYPE),m) - CXXFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_FLOAT + MG_CXXFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_FLOAT else $(error Unknown FPTYPE='$(FPTYPE)': only 'd', 'f' and 'm' are supported) endif @@ -150,7 +143,7 @@ endif # Set the build flags appropriate to each HELINL choice (example: "make HELINL=1") ###$(info HELINL=$(HELINL)) ifeq ($(HELINL),1) - CXXFLAGS += -DMGONGPU_INLINE_HELAMPS + MG_CXXFLAGS += -DMGONGPU_INLINE_HELAMPS else ifneq ($(HELINL),0) $(error Unknown HELINL='$(HELINL)': only '0' and '1' are supported) endif @@ -158,7 +151,7 @@ endif # Set the build flags appropriate to each HRDCOD choice (example: "make HRDCOD=1") ###$(info HRDCOD=$(HRDCOD)) ifeq ($(HRDCOD),1) - CXXFLAGS += -DMGONGPU_HARDCODE_PARAM + MG_CXXFLAGS += -DMGONGPU_HARDCODE_PARAM else ifneq ($(HRDCOD),0) $(error Unknown HRDCOD='$(HRDCOD)': only '0' and '1' are supported) endif @@ -166,7 +159,7 @@ endif # Set the build flags appropriate to each RNDGEN choice (example: "make RNDGEN=hasNoCurand") ###$(info RNDGEN=$(RNDGEN)) ifeq ($(RNDGEN),hasNoCurand) - CXXFLAGS += -DMGONGPU_HAS_NO_CURAND + MG_CXXFLAGS += -DMGONGPU_HAS_NO_CURAND else ifneq ($(RNDGEN),hasCurand) $(error Unknown RNDGEN='$(RNDGEN)': only 'hasCurand' and 'hasNoCurand' are supported) endif @@ -228,21 +221,17 @@ MG5AMC_COMMONLIB = mg5amc_common # First target (default goal) all.$(TAG): $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so -# Target (and build options): debug -debug: OPTFLAGS = -g -O0 -debug: all.$(TAG) - #------------------------------------------------------------------------------- # Generic target and build rules: objects from C++ compilation $(BUILDDIR)/%.o : %.cc *.h @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - $(CXX) $(CPPFLAGS) $(CXXFLAGS) -fPIC -c $< -o $@ + $(CXX) $(MG_CXXFLAGS) $(CXXFLAGS) -c $< -o $@ # Generic target and build rules: objects from CUDA compilation $(BUILDDIR)/%_cu.o : %.cc *.h @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c -x cu $< -o $@ + $(NVCC) $(MG_NVCCFLAGS) $(NVCCFLAGS) -c -x cu $< -o $@ #------------------------------------------------------------------------------- @@ -259,7 +248,7 @@ $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so : $(cxx_objects) $(cu_objects) else $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so : $(cxx_objects) @if [ ! -d $(LIBDIR) ]; then echo "mkdir -p $(LIBDIR)"; mkdir -p $(LIBDIR); fi - $(CXX) -shared -o $@ $(cxx_objects) + $(CXX) $(MG_LDFLAGS) $(LDFLAGS) -shared -o $@ $(cxx_objects) endif #------------------------------------------------------------------------------- From 91f1b6134173fb00d9fe12dab8234d33b02f1fdd Mon Sep 17 00:00:00 2001 From: Stephan Hageboeck Date: Fri, 18 Aug 2023 16:09:01 +0200 Subject: [PATCH 087/129] Fix a signed-unsigned warning. --- epochX/cudacpp/pp_tt012j.mad/SubProcesses/Bridge.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/Bridge.h b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/Bridge.h index bf8b5e024d..ad730fbcf7 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/Bridge.h +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/Bridge.h @@ -236,7 +236,7 @@ namespace mg5amcCpu #ifdef __CUDACC__ if( ( m_nevt < s_gputhreadsmin ) || ( m_nevt % s_gputhreadsmin != 0 ) ) throw std::runtime_error( "Bridge constructor: nevt should be a multiple of " + std::to_string( s_gputhreadsmin ) ); - while( m_nevt != m_gpublocks * m_gputhreads ) + while( m_nevt != static_cast( m_gpublocks * m_gputhreads ) ) { m_gputhreads /= 2; if( m_gputhreads < s_gputhreadsmin ) From 0212f8b87eaf46881597fb8ace7aa829a223bf02 Mon Sep 17 00:00:00 2001 From: Stephan Hageboeck Date: Fri, 8 Sep 2023 12:34:34 +0200 Subject: [PATCH 088/129] Protect clang-specific pragmas from other compilers. --- epochX/cudacpp/pp_tt012j.mad/src/mgOnGpuCxtypes.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/epochX/cudacpp/pp_tt012j.mad/src/mgOnGpuCxtypes.h b/epochX/cudacpp/pp_tt012j.mad/src/mgOnGpuCxtypes.h index b56348bc58..067cbceb8c 100644 --- a/epochX/cudacpp/pp_tt012j.mad/src/mgOnGpuCxtypes.h +++ b/epochX/cudacpp/pp_tt012j.mad/src/mgOnGpuCxtypes.h @@ -21,10 +21,14 @@ // Complex type in cuda: thrust or cucomplex or cxsmpl #ifdef __CUDACC__ #if defined MGONGPU_CUCXTYPE_THRUST +#ifdef __CLANG__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" // for icpx2021/clang13 (https://stackoverflow.com/a/15864661) +#endif #include +#ifdef __CLANG__ #pragma clang diagnostic pop +#endif #elif defined MGONGPU_CUCXTYPE_CUCOMPLEX #include #elif not defined MGONGPU_CUCXTYPE_CXSMPL From 434774b410806f9b9523284c3fb25076932ae474 Mon Sep 17 00:00:00 2001 From: Stephan Hageboeck Date: Tue, 19 Sep 2023 09:37:03 +0200 Subject: [PATCH 089/129] Remove force override of OMPFLAGS. --- epochX/cudacpp/gg_ttggg.mad/SubProcesses/cudacpp.mk | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/cudacpp.mk b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/cudacpp.mk index 15669185ad..6105da85ff 100644 --- a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/cudacpp.mk @@ -225,15 +225,15 @@ endif # Set the default OMPFLAGS choice ifneq ($(shell $(CXX) --version | egrep '^Intel'),) -override OMPFLAGS = -fopenmp +OMPFLAGS = -fopenmp ###override OMPFLAGS = # disable OpenMP MT on Intel (was ok without nvcc but not ok with nvcc before #578) else ifneq ($(shell $(CXX) --version | egrep '^(clang)'),) -override OMPFLAGS = -fopenmp +OMPFLAGS = -fopenmp ###override OMPFLAGS = # disable OpenMP MT on clang (was not ok without or with nvcc before #578) else ifneq ($(shell $(CXX) --version | egrep '^(Apple clang)'),) -override OMPFLAGS = # disable OpenMP MT on Apple clang (builds fail in the CI #578) +OMPFLAGS = # disable OpenMP MT on Apple clang (builds fail in the CI #578) else -override OMPFLAGS = -fopenmp +OMPFLAGS = -fopenmp ###override OMPFLAGS = # disable OpenMP MT (default before #575) endif From d2182debcc72549cb25d6a362f54b635d995c211 Mon Sep 17 00:00:00 2001 From: Stephan Hageboeck Date: Tue, 19 Sep 2023 09:47:03 +0200 Subject: [PATCH 090/129] [gg_ttgg] Remove force override of OMPFLAGS. --- epochX/cudacpp/gg_ttgg.mad/SubProcesses/cudacpp.mk | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/cudacpp.mk b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/cudacpp.mk index 15669185ad..6105da85ff 100644 --- a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/cudacpp.mk @@ -225,15 +225,15 @@ endif # Set the default OMPFLAGS choice ifneq ($(shell $(CXX) --version | egrep '^Intel'),) -override OMPFLAGS = -fopenmp +OMPFLAGS = -fopenmp ###override OMPFLAGS = # disable OpenMP MT on Intel (was ok without nvcc but not ok with nvcc before #578) else ifneq ($(shell $(CXX) --version | egrep '^(clang)'),) -override OMPFLAGS = -fopenmp +OMPFLAGS = -fopenmp ###override OMPFLAGS = # disable OpenMP MT on clang (was not ok without or with nvcc before #578) else ifneq ($(shell $(CXX) --version | egrep '^(Apple clang)'),) -override OMPFLAGS = # disable OpenMP MT on Apple clang (builds fail in the CI #578) +OMPFLAGS = # disable OpenMP MT on Apple clang (builds fail in the CI #578) else -override OMPFLAGS = -fopenmp +OMPFLAGS = -fopenmp ###override OMPFLAGS = # disable OpenMP MT (default before #575) endif From 938fab6aca4b6e35695c2a4116d0dab3d8b9cbf7 Mon Sep 17 00:00:00 2001 From: Stephan Hageboeck Date: Thu, 19 Oct 2023 17:21:24 +0200 Subject: [PATCH 091/129] [pp_tt012j] Remove a hardcoded path to non-existing madgraph --- epochX/cudacpp/pp_tt012j.mad/Cards/me5_configuration.txt | 5 ----- 1 file changed, 5 deletions(-) diff --git a/epochX/cudacpp/pp_tt012j.mad/Cards/me5_configuration.txt b/epochX/cudacpp/pp_tt012j.mad/Cards/me5_configuration.txt index 8a0c1e6345..dcabfa33d5 100644 --- a/epochX/cudacpp/pp_tt012j.mad/Cards/me5_configuration.txt +++ b/epochX/cudacpp/pp_tt012j.mad/Cards/me5_configuration.txt @@ -233,8 +233,3 @@ #! (to generate PDF-independent fast-interpolation grids). # pineappl = pineappl - -mg5_path = /afs/cern.ch/work/j/jteig/madgraph4gpu/MG5aMC/mg5amcnlo - -# MG5 MAIN DIRECTORY -mg5_path = /afs/cern.ch/work/j/jteig/madgraph4gpu/MG5aMC/mg5amcnlo From c1020b643e15e0df41e0c563a38cf747afe0b967 Mon Sep 17 00:00:00 2001 From: Stephan Hageboeck Date: Fri, 17 Nov 2023 14:49:55 +0100 Subject: [PATCH 092/129] [pp_tt012j] Completely overhaul Makefiles Completely change the strategy how makefiles are used: - Include rules from the C++ Makefile into the Fortran Makefile - Move common setup into Source/make_opts - Allow for overriding flags from outside for every compiler. Internal flags are now called MG_CXXFLAGS, and CXXFLAGS are appended to the string. These can be set from outside to override or refined the flags for every compiler. Similar flags exist for FC and NVCC. - Every architecture-specific C++/cuda build ends up in its own directory. This includes the library, object files and all executables. - In order to do an architecture-specific build, the Makefile invokes itself with the appropriate flags. This allows for parallel architecture-specific builds, and greatly simplifies the Makefiles. - A new default target has been added, "cppnative", which builds -march=native if the user doesn't specify anything else. - Clean targets have been simplified. "clean" cleans an entire subprocess, "clean" cleans an architecture-specific build, "cleanall" cleans all subprocesses. --- .../cudacpp/pp_tt012j.mad/Source/PDF/makefile | 2 +- epochX/cudacpp/pp_tt012j.mad/Source/make_opts | 220 +++++- epochX/cudacpp/pp_tt012j.mad/Source/makefile | 12 +- .../pp_tt012j.mad/SubProcesses/cudacpp.mk | 705 ++++-------------- .../pp_tt012j.mad/SubProcesses/makefile | 254 ++----- .../cudacpp/pp_tt012j.mad/src/cudacpp_src.mk | 234 +----- 6 files changed, 440 insertions(+), 987 deletions(-) diff --git a/epochX/cudacpp/pp_tt012j.mad/Source/PDF/makefile b/epochX/cudacpp/pp_tt012j.mad/Source/PDF/makefile index bcaf733469..4e97287771 100644 --- a/epochX/cudacpp/pp_tt012j.mad/Source/PDF/makefile +++ b/epochX/cudacpp/pp_tt012j.mad/Source/PDF/makefile @@ -68,7 +68,7 @@ reset: rm -rf $(TOREMOVE) -$(LIBDIR)$(LIBRARY): $(PDF) +$(LIBDIR)$(LIBRARY): $(PDF) ../make_opts rm $(LIBDIR)$(LIBRARY) || echo "recompilation of $(LIBDIR)$(LIBRARY)" $(call CREATELIB, $@, $^) diff --git a/epochX/cudacpp/pp_tt012j.mad/Source/make_opts b/epochX/cudacpp/pp_tt012j.mad/Source/make_opts index 6d46d001df..c1db6d206b 100644 --- a/epochX/cudacpp/pp_tt012j.mad/Source/make_opts +++ b/epochX/cudacpp/pp_tt012j.mad/Source/make_opts @@ -1,11 +1,17 @@ +pdlabel1= +pdlabel2= +lhapdf= +PYTHIA8_PATH=NotInstalled +MG5AMC_VERSION=3.5.1_lo_vect +GLOBAL_FLAG=-O +ALOHA_FLAG= +MATRIX_FLAG= DEFAULT_CPP_COMPILER=g++ MACFLAG= STDLIB=-lstdc++ STDLIB_FLAG= DEFAULT_F_COMPILER=gfortran DEFAULT_F2PY_COMPILER=f2py3.9 -MG5AMC_VERSION=SpecifiedByMG5aMCAtRunTime -PYTHIA8_PATH=NotInstalled #end_of_make_opts_variables BIASLIBDIR=../../../lib/ @@ -32,9 +38,9 @@ endif ############################################################ FCFLAGS ?= -O3 -ffast-math -fbounds-check -CXXFLAGS ?= -O3 -ffast-math -DNDEBUG $(STDLIB_FLAG) $(MACFLAG) +CXXFLAGS ?= -O3 -ffast-math -DNDEBUG NVCCFLAGS ?= -O3 -ffast-math -use_fast_math -DNDEBUG -lineinfo -LDFLAGS ?= $(STDLIB) $(MACFLAG) +LDFLAGS ?= $(STDLIB) ifneq ($(FFLAGS),) # Madgraph used to use FFLAGS, so the user probably tries to change the flags specifically for madgraph: @@ -44,11 +50,12 @@ endif # Madgraph-specific flags: WARNFLAGS = -Wall -Wshadow -Wextra ifeq (,$(findstring -std=,$(CXXFLAGS))) - CXXSTANDARD= -std=c++17 +CXXSTANDARD= -std=c++17 endif MG_FCFLAGS += -fPIC -w -MG_CXXFLAGS += -fPIC $(CXXSTANDARD) $(WARNFLAGS) +MG_CXXFLAGS += -fPIC $(CXXSTANDARD) $(WARNFLAGS) $(MACFLAG) MG_NVCCFLAGS += -fPIC $(CXXSTANDARD) --forward-unknown-to-host-compiler $(WARNFLAGS) +MG_LDFLAGS += $(MACFLAG) # Set FC unless it's defined by an environment variable ifeq ($(origin FC),default) @@ -120,4 +127,203 @@ endif # Helper function to check MG5 version define CHECK_MG5AMC_VERSION python -c 'import re; from distutils.version import StrictVersion; print StrictVersion("$(MG5AMC_VERSION)") >= StrictVersion("$(1)") if re.match("^[\d\.]+$$","$(MG5AMC_VERSION)") else True;' -endef \ No newline at end of file +endef + +#------------------------------------------------------------------------------- + +#=== Detect O/S and architecture (assuming uname is available, https://en.wikipedia.org/wiki/Uname) + +# Detect O/S kernel (Linux, Darwin...) +UNAME_S := $(shell uname -s) +###$(info UNAME_S='$(UNAME_S)') + +# Detect architecture (x86_64, ppc64le...) +UNAME_P := $(shell uname -p) +###$(info UNAME_P='$(UNAME_P)') + +#------------------------------------------------------------------------------- + +# Set special cases for non-gcc/clang builds +# AVX below gets overridden from outside in architecture-specific builds +AVX ?= none +# [NB MGONGPU_PVW512 is needed because "-mprefer-vector-width=256" is not exposed in a macro] +# [See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96476] +$(info AVX=$(AVX)) +ifeq ($(UNAME_P),ppc64le) + ifeq ($(AVX),sse4) + override AVXFLAGS = -D__SSE4_2__ # Power9 VSX with 128 width (VSR registers) + endif +else ifeq ($(UNAME_P),arm) + ifeq ($(AVX),sse4) + override AVXFLAGS = -D__SSE4_2__ # ARM NEON with 128 width (Q/quadword registers) + endif +else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 + ifeq ($(AVX),none) + override AVXFLAGS = -mno-sse3 # no SIMD + else ifeq ($(AVX),sse4) + override AVXFLAGS = -mno-avx # SSE4.2 with 128 width (xmm registers) + else ifeq ($(AVX),avx2) + override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] + else ifeq ($(AVX),512y) + override AVXFLAGS = -march=skylake -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] + else ifeq ($(AVX),512z) + override AVXFLAGS = -march=skylake -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) + else + $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) + endif +endif + +# For the moment, use AVXFLAGS everywhere: eventually, use them only in encapsulated implementations? +MG_CXXFLAGS+= $(AVXFLAGS) + +#------------------------------------------------------------------------------- + +#=== Configure the CUDA compiler if available + +# If CXX is not a single word (example "clang++ --gcc-toolchain...") then disable CUDA builds (issue #505) +# This is because it is impossible to pass this to "CUFLAGS += -ccbin " below +ifneq ($(words $(subst ccache ,,$(CXX))),1) # allow at most "CXX=ccache " from outside + $(warning CUDA builds are not supported for multi-word CXX "$(CXX)") + override CUDA_HOME=disabled +endif + +# If CUDA_HOME is not set, try to set it from the location of nvcc +ifndef CUDA_HOME + CUDA_HOME = $(patsubst %bin/nvcc,%,$(shell which nvcc 2>/dev/null)) + $(info CUDA_HOME="$(CUDA_HOME)") +endif + +# Set NVCC as $(CUDA_HOME)/bin/nvcc if it exists +ifneq ($(wildcard $(CUDA_HOME)/bin/nvcc),) + NVCC = $(CUDA_HOME)/bin/nvcc + USE_NVTX ?=-DUSE_NVTX + # See https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html + # See https://arnon.dk/matching-sm-architectures-arch-and-gencode-for-various-nvidia-cards/ + # Default: use compute capability 70 (Volta architecture), and embed PTX to support later architectures, too. + # Set MADGRAPH_CUDA_ARCHITECTURE to the desired value to change the default. + MADGRAPH_CUDA_ARCHITECTURE ?= 70 + comma:=, + CUARCHFLAGS = $(foreach arch,$(subst $(comma), ,$(MADGRAPH_CUDA_ARCHITECTURE)),--generate-code arch=compute_$(arch),code=compute_$(arch) --generate-code arch=compute_$(arch),code=sm_$(arch)) + CUINC = -I$(CUDA_HOME)/include/ + CURANDLIBFLAGS = -L$(CUDA_HOME)/lib64/ -lcurand # NB: -lcuda is not needed here! + MG_LDFLAGS += $(CURANDLIBFLAGS) + + # Check ../../Source/make_opts for default flags + MG_NVCCFLAGS += $(CUINC) $(USE_NVTX) $(CUARCHFLAGS) + +else ifneq ($(origin REQUIRE_CUDA),undefined) + # If REQUIRE_CUDA is set but no cuda is found, stop here (e.g. for CI tests on GPU #443) + $(error No cuda installation found (set CUDA_HOME or make nvcc visible in PATH)) +else + # No cuda. Switch cuda compilation off and go to common random numbers in C++ + $(warning CUDA_HOME is not set or is invalid: export CUDA_HOME to compile with cuda) + override NVCC= + override USE_NVTX= + override CUINC= + override CURANDLIBFLAGS= +endif + +# Set the host C++ compiler for nvcc via "-ccbin " +# (NB issue #505: this must be a single word, "clang++ --gcc-toolchain..." is not supported) +MG_NVCCFLAGS += -ccbin $(shell which $(subst ccache ,,$(CXX))) + +# Allow newer (unsupported) C++ compilers with older versions of CUDA if ALLOW_UNSUPPORTED_COMPILER_IN_CUDA is set (#504) +ifneq ($(origin ALLOW_UNSUPPORTED_COMPILER_IN_CUDA),undefined) +MG_NVCCFLAGS += -allow-unsupported-compiler +endif + +#------------------------------------------------------------------------------- + +#=== Configure ccache for C++ and CUDA builds + +# Enable ccache if USECCACHE=1 +ifeq ($(USECCACHE)$(shell echo $(CXX) | grep ccache),1) + override CXX:=ccache $(CXX) +endif + +ifneq ($(NVCC),) + ifeq ($(USECCACHE)$(shell echo $(NVCC) | grep ccache),1) + override NVCC:=ccache $(NVCC) + endif +endif + +#------------------------------------------------------------------------------- + +#=== Configure PowerPC-specific compiler flags for C++ and CUDA + +# PowerPC-specific CXX / CUDA compiler flags (being reviewed) +ifeq ($(UNAME_P),ppc64le) + MG_CXXFLAGS+= -mcpu=power9 -mtune=power9 # gains ~2-3% both for none and sse4 + MG_NVCCFLAGS+= -Xcompiler -mno-float128 +endif + +#------------------------------------------------------------------------------- + +#=== C++/CUDA-specific flags for floating-point types and random generators to use + +# Set the default FPTYPE (floating point type) choice +FPTYPE ?= d + +# Set the default HELINL (inline helicities?) choice +HELINL ?= 0 + +# Set the default HRDCOD (hardcode cIPD physics parameters?) choice +HRDCOD ?= 0 + +# Set the default RNDGEN (random number generator) choice +ifeq ($(NVCC),) + RNDGEN ?= hasNoCurand +else + RNDGEN ?= hasCurand +endif + +# Export AVX, FPTYPE, HELINL, HRDCOD, RNDGEN, OMPFLAGS so sub-makes don't go back to the defaults +export AVX +export AVXFLAGS +export FPTYPE +export HELINL +export HRDCOD +export RNDGEN + +#=== Set the CUDA/C++ compiler flags appropriate to user-defined choices of AVX, FPTYPE, HELINL, HRDCOD, RNDGEN + +# Set the build flags appropriate to each FPTYPE choice (example: "make FPTYPE=f") +# $(info FPTYPE=$(FPTYPE)) +ifeq ($(FPTYPE),d) + COMMONFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_DOUBLE +else ifeq ($(FPTYPE),f) + COMMONFLAGS += -DMGONGPU_FPTYPE_FLOAT -DMGONGPU_FPTYPE2_FLOAT +else ifeq ($(FPTYPE),m) + COMMONFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_FLOAT +else + $(error Unknown FPTYPE='$(FPTYPE)': only 'd', 'f' and 'm' are supported) +endif + +# Set the build flags appropriate to each HELINL choice (example: "make HELINL=1") +# $(info HELINL=$(HELINL)) +ifeq ($(HELINL),1) + COMMONFLAGS += -DMGONGPU_INLINE_HELAMPS +else ifneq ($(HELINL),0) + $(error Unknown HELINL='$(HELINL)': only '0' and '1' are supported) +endif + +# Set the build flags appropriate to each HRDCOD choice (example: "make HRDCOD=1") +# $(info HRDCOD=$(HRDCOD)) +ifeq ($(HRDCOD),1) + COMMONFLAGS += -DMGONGPU_HARDCODE_PARAM +else ifneq ($(HRDCOD),0) + $(error Unknown HRDCOD='$(HRDCOD)': only '0' and '1' are supported) +endif + +# Set the build flags appropriate to each RNDGEN choice (example: "make RNDGEN=hasNoCurand") +$(info RNDGEN=$(RNDGEN)) +ifeq ($(RNDGEN),hasNoCurand) + override CXXFLAGSCURAND = -DMGONGPU_HAS_NO_CURAND +else ifeq ($(RNDGEN),hasCurand) + override CXXFLAGSCURAND = +else + $(error Unknown RNDGEN='$(RNDGEN)': only 'hasCurand' and 'hasNoCurand' are supported) +endif + +MG_CXXFLAGS += $(COMMONFLAGS) +MG_NVCCFLAGS += $(COMMONFLAGS) \ No newline at end of file diff --git a/epochX/cudacpp/pp_tt012j.mad/Source/makefile b/epochX/cudacpp/pp_tt012j.mad/Source/makefile index a98b9a4b08..bf6e96c1a5 100644 --- a/epochX/cudacpp/pp_tt012j.mad/Source/makefile +++ b/epochX/cudacpp/pp_tt012j.mad/Source/makefile @@ -121,8 +121,8 @@ $(LIBDIR)libiregi.a: $(IREGIDIR) cd $(IREGIDIR); make ln -sf ../Source/$(IREGIDIR)libiregi.a $(LIBDIR)libiregi.a -cleanSource: - $(RM) *.o $(LIBRARIES) $(BINARIES) +clean: + $(RM) *.o *.inc $(LIBRARIES) $(BINARIES) cd PDF; make clean; cd .. cd PDF/gammaUPC; make clean; cd ../../ cd DHELAS; make clean; cd .. @@ -133,11 +133,3 @@ cleanSource: cd BIAS/ptj_bias; make clean; cd ../.. if [ -d $(CUTTOOLSDIR) ]; then cd $(CUTTOOLSDIR); make clean; cd ..; fi if [ -d $(IREGIDIR) ]; then cd $(IREGIDIR); make clean; cd ..; fi - -clean: cleanSource - for i in `ls -d ../SubProcesses/P*`; do cd $$i; make clean; cd -; done; - -cleanavx: - for i in `ls -d ../SubProcesses/P*`; do cd $$i; make cleanavxs; cd -; done; -cleanall: cleanSource # THIS IS THE ONE - for i in `ls -d ../SubProcesses/P*`; do cd $$i; make cleanavxs; cd -; done; diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/cudacpp.mk b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/cudacpp.mk index 9962a83f75..412b58edee 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/cudacpp.mk @@ -3,35 +3,30 @@ # Created by: S. Roiser (Feb 2020) for the MG5aMC CUDACPP plugin. # Further modified by: J. Teig, O. Mattelaer, S. Roiser, A. Valassi (2020-2023) for the MG5aMC CUDACPP plugin. -#=== Determine the name of this makefile (https://ftp.gnu.org/old-gnu/Manuals/make-3.80/html_node/make_17.html) -#=== NB: different names (e.g. cudacpp.mk and cudacpp_src.mk) are used in the Subprocess and src directories +# This makefile extends the Fortran makefile called "makefile" -CUDACPP_MAKEFILE = $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)) CUDACPP_SRC_MAKEFILE = cudacpp_src.mk -#------------------------------------------------------------------------------- - -#=== Use bash in the Makefile (https://www.gnu.org/software/make/manual/html_node/Choosing-the-Shell.html) - -SHELL := /bin/bash - -#------------------------------------------------------------------------------- - -#=== Detect O/S and architecture (assuming uname is available, https://en.wikipedia.org/wiki/Uname) - -# Detect O/S kernel (Linux, Darwin...) -UNAME_S := $(shell uname -s) -###$(info UNAME_S='$(UNAME_S)') - -# Detect architecture (x86_64, ppc64le...) -UNAME_P := $(shell uname -p) -###$(info UNAME_P='$(UNAME_P)') +# Self-invocation with adapted flags: +cppnative: + $(MAKE) AVX=native AVXFLAGS="-march=native" cppbuild +cppnone: + $(MAKE) AVX=none AVXFLAGS= cppbuild +cppsse4: + $(MAKE) AVX=sse4 AVXFLAGS=-march=nehalem cppbuild +cppavx2: + $(MAKE) AVX=avx2 AVXFLAGS=-march=haswell cppbuild +cppavx512y: + $(MAKE) AVX=512y AVXFLAGS="-march=skylake-avx512 -mprefer-vector-width=256" cppbuild +cppavx512z: + $(MAKE) AVX=512z AVXFLAGS="-march=skylake-avx512 -DMGONGPU_PVW512" cppbuild +cuda: + $(MAKE) AVX=cuda cudabuild #------------------------------------------------------------------------------- #=== Configure common compiler flags for C++ and CUDA - -include ../../Source/make_opts +# NB: The base flags are defined in the fortran "makefile" # Include directories INCFLAGS = -I. -I../../src @@ -41,7 +36,6 @@ MG_NVCCFLAGS += $(INCFLAGS) # Dependency on src directory MG5AMC_COMMONLIB = mg5amc_common -MG_LDFLAGS += -L$(LIBDIR) -l$(MG5AMC_COMMONLIB) # Compiler-specific googletest build directory (#125 and #738) ifneq ($(shell $(CXX) --version | grep '^Intel(R) oneAPI DPC++/C++ Compiler'),) @@ -90,309 +84,47 @@ endif #------------------------------------------------------------------------------- -#=== Configure targets - -.DEFAULT_GOAL := usage - -usage: - $(error Unknown target='$(MAKECMDGOALS)': only 'cppnone', 'cppsse4', 'cppavx2', 'cpp512y', 'cpp512z' and 'cuda' are supported!) - -#------------------------------------------------------------------------------- - -#=== Configure the CUDA compiler - -ifneq (,$(findstring $(MAKECMDGOALS),cuda-gcheck-runGcheck-runFGcheck-cmpFGcheck-memcheck)) - # If CXX is not a single word (example "clang++ --gcc-toolchain...") then disable CUDA builds (issue #505) - # This is because it is impossible to pass this to "CUFLAGS += -ccbin " below - ifneq ($(words $(subst ccache ,,$(CXX))),1) # allow at most "CXX=ccache " from outside - $(warning CUDA builds are not supported for multi-word CXX "$(CXX)") - override CUDA_HOME=disabled - endif - - # If CUDA_HOME is not set, try to set it from the location of nvcc - ifndef CUDA_HOME - CUDA_HOME = $(patsubst %bin/nvcc,%,$(shell which nvcc 2>/dev/null)) - $(warning CUDA_HOME was not set: using "$(CUDA_HOME)") - endif - - # Set NVCC as $(CUDA_HOME)/bin/nvcc if it exists - ifneq ($(wildcard $(CUDA_HOME)/bin/nvcc),) - NVCC = $(CUDA_HOME)/bin/nvcc - USE_NVTX ?=-DUSE_NVTX - # See https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html - # See https://arnon.dk/matching-sm-architectures-arch-and-gencode-for-various-nvidia-cards/ - # Default: use compute capability 70 (Volta architecture), and embed PTX to support later architectures, too. - # Set MADGRAPH_CUDA_ARCHITECTURE to the desired value to change the default. - MADGRAPH_CUDA_ARCHITECTURE ?= 70 - comma:=, - CUARCHFLAGS = $(foreach arch,$(subst $(comma), ,$(MADGRAPH_CUDA_ARCHITECTURE)),--generate-code arch=compute_$(arch),code=compute_$(arch) --generate-code arch=compute_$(arch),code=sm_$(arch)) - CUINC = -I$(CUDA_HOME)/include/ - CURANDLIBFLAGS = -L$(CUDA_HOME)/lib64/ -lcurand # NB: -lcuda is not needed here! - MG_LDFLAGS += $(CURANDLIBFLAGS) - - # Check ../../Source/make_opts for default flags - MG_NVCCFLAGS += $(CUINC) $(USE_NVTX) $(CUARCHFLAGS) - - else ifneq ($(origin REQUIRE_CUDA),undefined) - # If REQUIRE_CUDA is set but no cuda is found, stop here (e.g. for CI tests on GPU #443) - $(error No cuda installation found (set CUDA_HOME or make nvcc visible in PATH)) - else - # No cuda. Switch cuda compilation off and go to common random numbers in C++ - $(warning CUDA_HOME is not set or is invalid: export CUDA_HOME to compile with cuda) - override NVCC= - override USE_NVTX= - override CUINC= - override CURANDLIBFLAGS= - endif - - # Export NVCC settings for other folders: - export NVCC - export MG_NVCCFLAGS - export NVCCFLAGS - - # Set the host C++ compiler for nvcc via "-ccbin " - # (NB issue #505: this must be a single word, "clang++ --gcc-toolchain..." is not supported) - MG_NVCCFLAGS += -ccbin $(shell which $(subst ccache ,,$(CXX))) - - # Allow newer (unsupported) C++ compilers with older versions of CUDA if ALLOW_UNSUPPORTED_COMPILER_IN_CUDA is set (#504) - ifneq ($(origin ALLOW_UNSUPPORTED_COMPILER_IN_CUDA),undefined) - MG_NVCCFLAGS += -allow-unsupported-compiler - endif - -endif - -#------------------------------------------------------------------------------- - -#=== Configure ccache for C++ and CUDA builds - -# Enable ccache if USECCACHE=1 -ifeq ($(USECCACHE)$(shell echo $(CXX) | grep ccache),1) - override CXX:=ccache $(CXX) -endif -#ifeq ($(USECCACHE)$(shell echo $(AR) | grep ccache),1) -# override AR:=ccache $(AR) -#endif -ifneq ($(NVCC),) - ifeq ($(USECCACHE)$(shell echo $(NVCC) | grep ccache),1) - override NVCC:=ccache $(NVCC) - endif -endif - -#------------------------------------------------------------------------------- - -#=== Configure PowerPC-specific compiler flags for C++ and CUDA - -# PowerPC-specific CXX / CUDA compiler flags (being reviewed) -ifeq ($(UNAME_P),ppc64le) - MG_CXXFLAGS+= -mcpu=power9 -mtune=power9 # gains ~2-3% both for none and sse4 - MG_NVCCFLAGS+= -Xcompiler -mno-float128 -endif - -#------------------------------------------------------------------------------- - #=== Configure defaults and check if user-defined choices exist for OMPFLAGS, AVX, FPTYPE, HELINL, HRDCOD, RNDGEN # Set the default OMPFLAGS choice ifneq ($(shell $(CXX) --version | egrep '^Intel'),) -OMPFLAGS = -fopenmp +OMPFLAGS ?= -fopenmp else ifneq ($(shell $(CXX) --version | egrep '^(clang)'),) -OMPFLAGS = -fopenmp +OMPFLAGS ?= -fopenmp else ifneq ($(shell $(CXX) --version | egrep '^(Apple clang)'),) -OMPFLAGS = # disable OpenMP MT on Apple clang (builds fail in the CI #578) +OMPFLAGS ?= # disable OpenMP MT on Apple clang (builds fail in the CI #578) else -OMPFLAGS = -fopenmp +OMPFLAGS ?= -fopenmp endif -# Set the default FPTYPE (floating point type) choice -FPTYPE ?= d - -# Set the default HELINL (inline helicities?) choice -HELINL ?= 0 - -# Set the default HRDCOD (hardcode cIPD physics parameters?) choice -HRDCOD ?= 0 - -# Set the default RNDGEN (random number generator) choice -ifeq ($(RNDGEN),) - ifeq ($(NVCC),) - override RNDGEN = hasNoCurand - else ifeq ($(RNDGEN),) - override RNDGEN = hasCurand - endif -endif - -# set the correct AVX based on avxcpp target -ifeq ($(MAKECMDGOALS),cppnone) # no SIMD - override AVX = none -else ifeq ($(MAKECMDGOALS),cppsse4) # SSE4.2 with 128 width (xmm registers) - override AVX = sse4 -else ifeq ($(MAKECMDGOALS),cppavx2) # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - override AVX = avx2 -else ifeq ($(MAKECMDGOALS),cpp512y) # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - override AVX = 512y -else ifeq ($(MAKECMDGOALS),cpp512z) # AVX512 with 512 width (zmm registers) - override AVX = 512z -else - override AVX = none -endif - -# Export AVX, FPTYPE, HELINL, HRDCOD, RNDGEN, OMPFLAGS so that it is not necessary to pass them to the src Makefile too -export AVX -export FPTYPE -export HELINL -export HRDCOD -export RNDGEN +# Export here, so sub makes don't fall back to the defaults: export OMPFLAGS -#------------------------------------------------------------------------------- - -#=== Set the CUDA/C++ compiler flags appropriate to user-defined choices of AVX, FPTYPE, HELINL, HRDCOD, RNDGEN - -# Set the build flags appropriate to OMPFLAGS -$(info OMPFLAGS=$(OMPFLAGS)) MG_CXXFLAGS += $(OMPFLAGS) -# Set the build flags appropriate to each AVX choice (example: "make AVX=none") -# [NB MGONGPU_PVW512 is needed because "-mprefer-vector-width=256" is not exposed in a macro] -# [See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96476] -ifeq ($(findstring cpp,$(MAKECMDGOALS)),cpp) - $(info AVX=$(AVX)) - ifeq ($(UNAME_P),ppc64le) - ifeq ($(AVX),sse4) - override AVXFLAGS = -D__SSE4_2__ # Power9 VSX with 128 width (VSR registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on PowerPC for the moment) - endif - else ifeq ($(UNAME_P),arm) - ifeq ($(AVX),sse4) - override AVXFLAGS = -D__SSE4_2__ # ARM NEON with 128 width (Q/quadword registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on ARM for the moment) - endif - else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 - ifeq ($(AVX),none) - override AVXFLAGS = -mno-sse3 # no SIMD - else ifeq ($(AVX),sse4) - override AVXFLAGS = -mno-avx # SSE4.2 with 128 width (xmm registers) - else ifeq ($(AVX),avx2) - override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(AVX),512y) - override AVXFLAGS = -march=skylake -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(AVX),512z) - override AVXFLAGS = -march=skylake -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) - else - $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) - endif - else - ifeq ($(AVX),none) - override AVXFLAGS = -march=x86-64 # no SIMD (see #588) - else ifeq ($(AVX),sse4) - override AVXFLAGS = -march=nehalem # SSE4.2 with 128 width (xmm registers) - else ifeq ($(AVX),avx2) - override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(AVX),512y) - override AVXFLAGS = -march=skylake-avx512 -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(AVX),512z) - override AVXFLAGS = -march=skylake-avx512 -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) - else - $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) - endif - endif - # For the moment, use AVXFLAGS everywhere: eventually, use them only in encapsulated implementations? - MG_CXXFLAGS+= $(AVXFLAGS) -endif - -# Set the build flags appropriate to each FPTYPE choice (example: "make FPTYPE=f") -$(info FPTYPE=$(FPTYPE)) -ifeq ($(FPTYPE),d) - COMMONFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_DOUBLE -else ifeq ($(FPTYPE),f) - COMMONFLAGS += -DMGONGPU_FPTYPE_FLOAT -DMGONGPU_FPTYPE2_FLOAT -else ifeq ($(FPTYPE),m) - COMMONFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_FLOAT -else - $(error Unknown FPTYPE='$(FPTYPE)': only 'd', 'f' and 'm' are supported) -endif - -# Set the build flags appropriate to each HELINL choice (example: "make HELINL=1") -$(info HELINL=$(HELINL)) -ifeq ($(HELINL),1) - COMMONFLAGS += -DMGONGPU_INLINE_HELAMPS -else ifneq ($(HELINL),0) - $(error Unknown HELINL='$(HELINL)': only '0' and '1' are supported) -endif - -# Set the build flags appropriate to each HRDCOD choice (example: "make HRDCOD=1") -$(info HRDCOD=$(HRDCOD)) -ifeq ($(HRDCOD),1) - COMMONFLAGS += -DMGONGPU_HARDCODE_PARAM -else ifneq ($(HRDCOD),0) - $(error Unknown HRDCOD='$(HRDCOD)': only '0' and '1' are supported) -endif - -# Set the build flags appropriate to each RNDGEN choice (example: "make RNDGEN=hasNoCurand") -$(info RNDGEN=$(RNDGEN)) -ifeq ($(RNDGEN),hasNoCurand) - override CXXFLAGSCURAND = -DMGONGPU_HAS_NO_CURAND -else ifeq ($(RNDGEN),hasCurand) - override CXXFLAGSCURAND = -else - $(error Unknown RNDGEN='$(RNDGEN)': only 'hasCurand' and 'hasNoCurand' are supported) -endif - -MG_CXXFLAGS += $(COMMONFLAGS) -MG_NVCCFLAGS += $(COMMONFLAGS) - #------------------------------------------------------------------------------- #=== Configure build directories and build lockfiles === -# Build directory "short" tag (defines target and path to the optional build directory) -# (Rationale: keep directory names shorter, e.g. do not include random number generator choice) -ifneq ($(NVCC),) - override DIRTAG = cuda_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) -else - override DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) +# Build directory "short" tag (defines target and path to the build directory) +DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) +CUDACPP_BUILDDIR = build.$(DIRTAG) +CUDACPP_LIBDIR := ../../lib/$(CUDACPP_BUILDDIR) +LIBDIRRPATH := '$$ORIGIN:$$ORIGIN/../$(CUDACPP_LIBDIR)' +ifneq ($(AVX),) + $(info Building CUDACPP in CUDACPP_BUILDDIR=$(CUDACPP_BUILDDIR). Libs in $(CUDACPP_LIBDIR)) endif -# Build lockfile "full" tag (defines full specification of build options that cannot be intermixed) -# (Rationale: avoid mixing of CUDA and no-CUDA environment builds with different random number generators) -ifneq ($(NVCC),) - override TAG = cuda_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) -else - override TAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) -endif - -# Build directory: current directory by default, or build.$(DIRTAG) if USEBUILDDIR==1 -ifeq ($(USEBUILDDIR),1) - override BUILDDIR = build.$(DIRTAG) - override LIBDIR = ../../lib/$(BUILDDIR) - override LIBDIRRPATH = '$$ORIGIN/../$(LIBDIR)' - $(info Building in BUILDDIR=$(BUILDDIR) for tag=$(TAG) (USEBUILDDIR is set = 1)) -else - override BUILDDIR = . - override LIBDIR = ../../lib - override LIBDIRRPATH = '$$ORIGIN/$(LIBDIR)' - $(info Building in BUILDDIR=$(BUILDDIR) for tag=$(TAG) (USEBUILDDIR is not set)) -endif -###override INCDIR = ../../include -###$(info Building in BUILDDIR=$(BUILDDIR) for tag=$(TAG)) - -# On Linux, set rpath to LIBDIR to make it unnecessary to use LD_LIBRARY_PATH +# On Linux, set rpath to CUDACPP_LIBDIR to make it unnecessary to use LD_LIBRARY_PATH # Use relative paths with respect to the executables or shared libraries ($ORIGIN on Linux) -# On Darwin, building libraries with absolute paths in LIBDIR makes this unnecessary +# On Darwin, building libraries with absolute paths in CUDACPP_LIBDIR makes this unnecessary ifeq ($(UNAME_S),Darwin) override CXXLIBFLAGSRPATH = override CULIBFLAGSRPATH = - override CXXLIBFLAGSRPATH2 = - override CULIBFLAGSRPATH2 = else # RPATH to cuda/cpp libs when linking executables override CXXLIBFLAGSRPATH = -Wl,-rpath,$(LIBDIRRPATH) override CULIBFLAGSRPATH = -Xlinker -rpath,$(LIBDIRRPATH) - # RPATH to common lib when linking cuda/cpp libs - override CXXLIBFLAGSRPATH2 = -Wl,-rpath,'$$ORIGIN' - override CULIBFLAGSRPATH2 = -Xlinker -rpath,'$$ORIGIN' endif # Setting LD_LIBRARY_PATH or DYLD_LIBRARY_PATH in the RUNTIME is no longer necessary (neither on Linux nor on Mac) @@ -402,65 +134,55 @@ override RUNTIME = #=== Makefile TARGETS and build rules below #=============================================================================== -cxx_main=$(BUILDDIR)/check.exe -fcxx_main=$(BUILDDIR)/fcheck.exe - -ifneq ($(NVCC),) -cu_main=$(BUILDDIR)/gcheck.exe -fcu_main=$(BUILDDIR)/fgcheck.exe -else -cu_main= -fcu_main= -endif +cxx_main=$(CUDACPP_BUILDDIR)/check.exe +fcxx_main=$(CUDACPP_BUILDDIR)/fcheck.exe -testmain=$(BUILDDIR)/runTest.exe +cu_main=$(CUDACPP_BUILDDIR)/gcheck.exe +fcu_main=$(CUDACPP_BUILDDIR)/fgcheck.exe ifneq ($(GTESTLIBS),) -all.$(TAG): $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_main) $(cxx_main) $(fcu_main) $(fcxx_main) $(testmain) -else -all.$(TAG): $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_main) $(cxx_main) $(fcu_main) $(fcxx_main) +testmain=$(CUDACPP_BUILDDIR)/runTest.exe +cutestmain=$(CUDACPP_BUILDDIR)/runTest_cuda.exe endif -# Target (and build options): debug -MAKEDEBUG= -debug: MAKEDEBUG := debug -debug: all.$(TAG) +cppbuild: $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(cxx_main) $(fcxx_main) $(testmain) +cudabuild: $(CUDACPP_BUILDDIR)/$(PROG)_cuda $(cu_main) $(fcu_main) $(cutestmain) # Generic target and build rules: objects from CUDA compilation ifneq ($(NVCC),) -$(BUILDDIR)/%.o : %.cu *.h ../../src/*.h - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi +$(CUDACPP_BUILDDIR)/%.o : %.cu *.h ../../src/*.h + @mkdir -p $(CUDACPP_BUILDDIR) $(NVCC) $(MG_NVCCFLAGS) $(NVCCFLAGS) -c $< -o $@ -$(BUILDDIR)/%_cu.o : %.cc *.h ../../src/*.h - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi +$(CUDACPP_BUILDDIR)/%_cu.o : %.cc *.h ../../src/*.h + @mkdir -p $(CUDACPP_BUILDDIR) $(NVCC) $(MG_NVCCFLAGS) $(NVCCFLAGS) -c -x cu $< -o $@ endif # Generic target and build rules: objects from C++ compilation # (NB do not include CUINC here! add it only for NVTX or curand #679) -$(BUILDDIR)/%.o : %.cc *.h ../../src/*.h - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi +$(CUDACPP_BUILDDIR)/%.o : %.cc *.h ../../src/*.h + @mkdir -p $(CUDACPP_BUILDDIR) $(CXX) $(MG_CXXFLAGS) $(CXXFLAGS) -c $< -o $@ # Apply special build flags only to CrossSectionKernel.cc and gCrossSectionKernel.cu (no fast math, see #117 and #516) ifeq ($(shell $(CXX) --version | grep ^nvc++),) -$(BUILDDIR)/CrossSectionKernels.o: CXXFLAGS += -fno-fast-math +$(CUDACPP_BUILDDIR)/CrossSectionKernels.o: CXXFLAGS += -fno-fast-math ifneq ($(NVCC),) -$(BUILDDIR)/gCrossSectionKernels.o: NVCCFLAGS += -Xcompiler -fno-fast-math +$(CUDACPP_BUILDDIR)/gCrossSectionKernels.o: NVCCFLAGS += -Xcompiler -fno-fast-math endif endif # Apply special build flags only to check_sa.o and gcheck_sa.o (NVTX in timermap.h, #679) -$(BUILDDIR)/check_sa.o: MG_CXXFLAGS += $(USE_NVTX) $(CUINC) -$(BUILDDIR)/gcheck_sa.o: MG_CXXFLAGS += $(USE_NVTX) $(CUINC) +$(CUDACPP_BUILDDIR)/check_sa.o: MG_CXXFLAGS += $(USE_NVTX) $(CUINC) +$(CUDACPP_BUILDDIR)/gcheck_sa.o: MG_CXXFLAGS += $(USE_NVTX) $(CUINC) # Apply special build flags only to check_sa and CurandRandomNumberKernel (curand headers, #679) -$(BUILDDIR)/check_sa.o: MG_CXXFLAGS += $(CXXFLAGSCURAND) -$(BUILDDIR)/gcheck_sa.o: MG_CXXFLAGS += $(CXXFLAGSCURAND) -$(BUILDDIR)/CurandRandomNumberKernel.o: MG_CXXFLAGS += $(CXXFLAGSCURAND) +$(CUDACPP_BUILDDIR)/check_sa.o: MG_CXXFLAGS += $(CXXFLAGSCURAND) +$(CUDACPP_BUILDDIR)/gcheck_sa.o: MG_CXXFLAGS += $(CXXFLAGSCURAND) +$(CUDACPP_BUILDDIR)/CurandRandomNumberKernel.o: MG_CXXFLAGS += $(CXXFLAGSCURAND) ifeq ($(RNDGEN),hasCurand) -$(BUILDDIR)/CurandRandomNumberKernel.o: MG_CXXFLAGS += $(CUINC) +$(CUDACPP_BUILDDIR)/CurandRandomNumberKernel.o: MG_CXXFLAGS += $(CUINC) endif # Avoid "warning: builtin __has_trivial_... is deprecated; use __is_trivially_... instead" in nvcc with icx2023 (#592) @@ -470,25 +192,13 @@ MG_NVCCFLAGS += -Xcompiler -Wno-deprecated-builtins endif endif -# Avoid clang warning "overriding '-ffp-contract=fast' option with '-ffp-contract=on'" (#516) -# This patch does remove the warning, but I prefer to keep it disabled for the moment... -###ifneq ($(shell $(CXX) --version | egrep '^(clang|Apple clang|Intel)'),) -###$(BUILDDIR)/CrossSectionKernels.o: CXXFLAGS += -Wno-overriding-t-option -###ifneq ($(NVCC),) -###$(BUILDDIR)/gCrossSectionKernels.o: CUFLAGS += -Xcompiler -Wno-overriding-t-option -###endif -###endif - #### Apply special build flags only to CPPProcess.cc (-flto) ###$(BUILDDIR)/CPPProcess.o: CXXFLAGS += -flto #------------------------------------------------------------------------------- -# Target (and build rules): common (src) library -commonlib : $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so - -$(LIBDIR)/lib$(MG5AMC_COMMONLIB).so: ../../src/*.h ../../src/*.cc - $(MAKE) -C ../../src $(MAKEDEBUG) -f $(CUDACPP_SRC_MAKEFILE) +$(CUDACPP_LIBDIR)/lib$(MG5AMC_COMMONLIB).so: ../../src/*.h ../../src/*.cc + $(MAKE) AVX=$(AVX) AVXFLAGS="$(AVXFLAGS)" -C ../../src -f $(CUDACPP_SRC_MAKEFILE) #------------------------------------------------------------------------------- @@ -496,43 +206,33 @@ processid_short=$(shell basename $(CURDIR) | awk -F_ '{print $$(NF-1)"_"$$NF}') ###$(info processid_short=$(processid_short)) MG5AMC_CXXLIB = mg5amc_$(processid_short)_cpp -cxx_objects_lib=$(BUILDDIR)/CPPProcess.o $(BUILDDIR)/MatrixElementKernels.o $(BUILDDIR)/BridgeKernels.o $(BUILDDIR)/CrossSectionKernels.o -cxx_objects_exe=$(BUILDDIR)/CommonRandomNumberKernel.o $(BUILDDIR)/RamboSamplingKernels.o +cxx_objects_lib=$(CUDACPP_BUILDDIR)/CPPProcess.o $(CUDACPP_BUILDDIR)/MatrixElementKernels.o $(CUDACPP_BUILDDIR)/BridgeKernels.o $(CUDACPP_BUILDDIR)/CrossSectionKernels.o +cxx_objects_exe=$(CUDACPP_BUILDDIR)/CommonRandomNumberKernel.o $(CUDACPP_BUILDDIR)/RamboSamplingKernels.o -ifneq ($(NVCC),) MG5AMC_CULIB = mg5amc_$(processid_short)_cuda -cu_objects_lib=$(BUILDDIR)/gCPPProcess.o $(BUILDDIR)/gMatrixElementKernels.o $(BUILDDIR)/gBridgeKernels.o $(BUILDDIR)/gCrossSectionKernels.o -cu_objects_exe=$(BUILDDIR)/gCommonRandomNumberKernel.o $(BUILDDIR)/gRamboSamplingKernels.o -endif +cu_objects_lib=$(CUDACPP_BUILDDIR)/gCPPProcess.o $(CUDACPP_BUILDDIR)/gMatrixElementKernels.o $(CUDACPP_BUILDDIR)/gBridgeKernels.o $(CUDACPP_BUILDDIR)/gCrossSectionKernels.o +cu_objects_exe=$(CUDACPP_BUILDDIR)/gCommonRandomNumberKernel.o $(CUDACPP_BUILDDIR)/gRamboSamplingKernels.o # Target (and build rules): C++ and CUDA shared libraries -$(LIBDIR)/lib$(MG5AMC_CXXLIB).so: $(BUILDDIR)/fbridge.o -$(LIBDIR)/lib$(MG5AMC_CXXLIB).so: cxx_objects_lib += $(BUILDDIR)/fbridge.o -$(LIBDIR)/lib$(MG5AMC_CXXLIB).so: $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cxx_objects_lib) - $(CXX) -shared -o $@ $(cxx_objects_lib) $(CXXLIBFLAGSRPATH2) -L$(LIBDIR) -l$(MG5AMC_COMMONLIB) $(MG_LDFLAGS) $(LDFLAGS) - -ifneq ($(NVCC),) -$(LIBDIR)/lib$(MG5AMC_CULIB).so: $(BUILDDIR)/fbridge_cu.o -$(LIBDIR)/lib$(MG5AMC_CULIB).so: cu_objects_lib += $(BUILDDIR)/fbridge_cu.o -$(LIBDIR)/lib$(MG5AMC_CULIB).so: $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_objects_lib) - $(NVCC) --shared -o $@ $(cu_objects_lib) $(CULIBFLAGSRPATH2) -L$(LIBDIR) -l$(MG5AMC_COMMONLIB) -endif - -#------------------------------------------------------------------------------- +$(CUDACPP_BUILDDIR)/lib$(MG5AMC_CXXLIB).so: $(CUDACPP_BUILDDIR)/fbridge.o +$(CUDACPP_BUILDDIR)/lib$(MG5AMC_CXXLIB).so: cxx_objects_lib += $(CUDACPP_BUILDDIR)/fbridge.o +$(CUDACPP_BUILDDIR)/lib$(MG5AMC_CXXLIB).so: $(CUDACPP_LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cxx_objects_lib) + $(CXX) -shared -o $@ $(cxx_objects_lib) $(CXXLIBFLAGSRPATH) -L$(CUDACPP_LIBDIR) -l$(MG5AMC_COMMONLIB) $(MG_LDFLAGS) $(LDFLAGS) -# Target (and build rules): Fortran include files -###$(INCDIR)/%.inc : ../%.inc -### @if [ ! -d $(INCDIR) ]; then echo "mkdir -p $(INCDIR)"; mkdir -p $(INCDIR); fi -### \cp $< $@ +$(CUDACPP_BUILDDIR)/lib$(MG5AMC_CULIB).so: $(CUDACPP_BUILDDIR)/fbridge_cu.o +$(CUDACPP_BUILDDIR)/lib$(MG5AMC_CULIB).so: cu_objects_lib += $(CUDACPP_BUILDDIR)/fbridge_cu.o +$(CUDACPP_BUILDDIR)/lib$(MG5AMC_CULIB).so: $(CUDACPP_LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_objects_lib) + $(NVCC) --shared -o $@ $(cu_objects_lib) $(CULIBFLAGSRPATH) -L$(CUDACPP_LIBDIR) -l$(MG5AMC_COMMONLIB) #------------------------------------------------------------------------------- # Target (and build rules): C++ and CUDA standalone executables + $(cxx_main): MG_LDFLAGS += $(CXXLIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH -$(cxx_main): $(BUILDDIR)/check_sa.o $(LIBDIR)/lib$(MG5AMC_CXXLIB).so $(cxx_objects_exe) $(BUILDDIR)/CurandRandomNumberKernel.o - $(CXX) -o $@ $(BUILDDIR)/check_sa.o $(OMPFLAGS) -ldl -pthread -L$(LIBDIR) -l$(MG5AMC_CXXLIB) $(cxx_objects_exe) $(BUILDDIR)/CurandRandomNumberKernel.o $(MG_LDFLAGS) $(LDFLAGS) +$(cxx_main): MG_LDFLAGS += -L$(CUDACPP_BUILDDIR) -l$(MG5AMC_CXXLIB) # Process-specific library +$(cxx_main): $(CUDACPP_BUILDDIR)/check_sa.o $(CUDACPP_BUILDDIR)/lib$(MG5AMC_CXXLIB).so $(cxx_objects_exe) $(CUDACPP_BUILDDIR)/CurandRandomNumberKernel.o + $(CXX) -o $@ $(CUDACPP_BUILDDIR)/check_sa.o $(OMPFLAGS) -ldl -pthread $(cxx_objects_exe) $(CUDACPP_BUILDDIR)/CurandRandomNumberKernel.o $(MG_LDFLAGS) $(LDFLAGS) -ifneq ($(NVCC),) ifneq ($(shell $(CXX) --version | grep ^Intel),) $(cu_main): MG_LDFLAGS += -lintlc # compile with icpx and link with nvcc (undefined reference to `_intel_fast_memcpy') $(cu_main): MG_LDFLAGS += -lsvml # compile with icpx and link with nvcc (undefined reference to `__svml_cos4_l9') @@ -540,34 +240,21 @@ else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 $(cu_main): MG_LDFLAGS += -L$(patsubst %bin/nvc++,%lib,$(subst ccache ,,$(CXX))) -lnvhpcatm -lnvcpumath -lnvc endif $(cu_main): MG_LDFLAGS += $(CULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH -$(cu_main): $(BUILDDIR)/gcheck_sa.o $(LIBDIR)/lib$(MG5AMC_CULIB).so $(cu_objects_exe) $(BUILDDIR)/gCurandRandomNumberKernel.o - $(NVCC) -o $@ $(BUILDDIR)/gcheck_sa.o $(CUARCHFLAGS) -L$(LIBDIR) -l$(MG5AMC_CULIB) $(cu_objects_exe) $(BUILDDIR)/gCurandRandomNumberKernel.o $(MG_LDFLAGS) $(LDFLAGS) -endif +$(cu_main): MG_LDFLAGS += -L$(CUDACPP_BUILDDIR) -l$(MG5AMC_CULIB) # Process-specific library +$(cu_main): $(CUDACPP_BUILDDIR)/gcheck_sa.o $(CUDACPP_BUILDDIR)/lib$(MG5AMC_CULIB).so $(cu_objects_exe) $(CUDACPP_BUILDDIR)/gCurandRandomNumberKernel.o + $(NVCC) -o $@ $(CUDACPP_BUILDDIR)/gcheck_sa.o $(CUARCHFLAGS) $(cu_objects_exe) $(CUDACPP_BUILDDIR)/gCurandRandomNumberKernel.o $(MG_LDFLAGS) $(LDFLAGS) #------------------------------------------------------------------------------- - -# Generic target and build rules: objects from Fortran compilation -$(BUILDDIR)/%.o : %.f *.inc - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - $(FC) -I. -c $< -o $@ - -# Generic target and build rules: objects from Fortran compilation -###$(BUILDDIR)/%.o : %.f *.inc -### @if [ ! -d $(INCDIR) ]; then echo "mkdir -p $(INCDIR)"; mkdir -p $(INCDIR); fi -### @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi -### $(FC) -I. -I$(INCDIR) -c $< -o $@ - -# Target (and build rules): Fortran standalone executables -###$(BUILDDIR)/fcheck_sa.o : $(INCDIR)/fbridge.inc +# Check executables: ifeq ($(UNAME_S),Darwin) $(fcxx_main): MG_LDFLAGS += -L$(shell dirname $(shell $(FC) --print-file-name libgfortran.dylib)) # add path to libgfortran on Mac #375 endif $(fcxx_main): MG_LDFLAGS += $(CXXLIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH -$(fcxx_main): $(BUILDDIR)/fcheck_sa.o $(BUILDDIR)/fsampler.o $(LIBDIR)/lib$(MG5AMC_CXXLIB).so $(cxx_objects_exe) - $(CXX) -o $@ $(BUILDDIR)/fcheck_sa.o $(cxx_objects_exe) $(OMPFLAGS) $(BUILDDIR)/fsampler.o -lgfortran -L$(LIBDIR) -l$(MG5AMC_CXXLIB) $(MG_LDFLAGS) $(LDFLAGS) +$(fcxx_main): MG_LDFLAGS += -L$(CUDACPP_BUILDDIR) -l$(MG5AMC_CXXLIB) # Process-specific library +$(fcxx_main): $(CUDACPP_BUILDDIR)/fcheck_sa.o $(CUDACPP_BUILDDIR)/fsampler.o $(CUDACPP_BUILDDIR)/lib$(MG5AMC_CXXLIB).so $(cxx_objects_exe) + $(CXX) -o $@ $(CUDACPP_BUILDDIR)/fcheck_sa.o $(cxx_objects_exe) $(OMPFLAGS) $(CUDACPP_BUILDDIR)/fsampler.o -lgfortran -L$(CUDACPP_LIBDIR) $(MG_LDFLAGS) $(LDFLAGS) -ifneq ($(NVCC),) ifneq ($(shell $(CXX) --version | grep ^Intel),) $(fcu_main): MG_LDFLAGS += -lintlc # compile with icpx and link with nvcc (undefined reference to `_intel_fast_memcpy') $(fcu_main): MG_LDFLAGS += -lsvml # compile with icpx and link with nvcc (undefined reference to `__svml_cos4_l9') @@ -576,60 +263,46 @@ ifeq ($(UNAME_S),Darwin) $(fcu_main): MG_LDFLAGS += -L$(shell dirname $(shell $(FC) --print-file-name libgfortran.dylib)) # add path to libgfortran on Mac #375 endif $(fcu_main): MG_LDFLAGS += $(CULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH -$(fcu_main): $(BUILDDIR)/fcheck_sa.o $(BUILDDIR)/fsampler_cu.o $(LIBDIR)/lib$(MG5AMC_CULIB).so $(cu_objects_exe) - $(NVCC) -o $@ $(BUILDDIR)/fcheck_sa.o $(BUILDDIR)/fsampler_cu.o $(cu_objects_exe) -lgfortran -L$(LIBDIR) -l$(MG5AMC_CULIB) $(MG_LDFLAGS) $(LDFLAGS) -endif +$(fcu_main): MG_LDFLAGS += -L$(CUDACPP_BUILDDIR) -l$(MG5AMC_CULIB) # Process-specific library +$(fcu_main): $(CUDACPP_BUILDDIR)/fcheck_sa.o $(CUDACPP_BUILDDIR)/fsampler_cu.o $(CUDACPP_BUILDDIR)/lib$(MG5AMC_CULIB).so $(cu_objects_exe) + $(NVCC) -o $@ $(CUDACPP_BUILDDIR)/fcheck_sa.o $(CUDACPP_BUILDDIR)/fsampler_cu.o $(cu_objects_exe) -lgfortran $(MG_LDFLAGS) $(LDFLAGS) #------------------------------------------------------------------------------- # Target (and build rules): test objects and test executable -$(BUILDDIR)/testxxx.o: $(GTESTLIBS) -$(BUILDDIR)/testxxx.o: INCFLAGS += $(GTESTINC) -$(BUILDDIR)/testxxx.o: testxxx_cc_ref.txt -$(testmain): $(BUILDDIR)/testxxx.o -$(testmain): cxx_objects_exe += $(BUILDDIR)/testxxx.o # Comment out this line to skip the C++ test of xxx functions -ifneq ($(NVCC),) -$(BUILDDIR)/testxxx_cu.o: $(GTESTLIBS) -$(BUILDDIR)/testxxx_cu.o: INCFLAGS += $(GTESTINC) -$(BUILDDIR)/testxxx_cu.o: testxxx_cc_ref.txt -$(testmain): $(BUILDDIR)/testxxx_cu.o -$(testmain): cu_objects_exe += $(BUILDDIR)/testxxx_cu.o # Comment out this line to skip the CUDA test of xxx functions -endif +$(testmain) $(cutestmain): $(GTESTLIBS) +$(testmain) $(cutestmain): INCFLAGS += $(GTESTINC) +$(testmain) $(cutestmain): MG_LDFLAGS += -L$(GTESTLIBDIR) -lgtest -lgtest_main -$(BUILDDIR)/testmisc.o: $(GTESTLIBS) -$(BUILDDIR)/testmisc.o: INCFLAGS += $(GTESTINC) -$(testmain): $(BUILDDIR)/testmisc.o -$(testmain): cxx_objects_exe += $(BUILDDIR)/testmisc.o # Comment out this line to skip the C++ miscellaneous tests +$(CUDACPP_BUILDDIR)/testxxx.o $(CUDACPP_BUILDDIR)/testxxx_cu.o: $(GTESTLIBS) testxxx_cc_ref.txt +$(testmain): $(CUDACPP_BUILDDIR)/testxxx.o +$(testmain): cxx_objects_exe += $(CUDACPP_BUILDDIR)/testxxx.o # Comment out this line to skip the C++ test of xxx functions +$(cutestmain): $(CUDACPP_BUILDDIR)/testxxx_cu.o +$(cutestmain): cu_objects_exe += $(CUDACPP_BUILDDIR)/testxxx_cu.o # Comment out this line to skip the CUDA test of xxx functions -ifneq ($(NVCC),) -$(BUILDDIR)/testmisc_cu.o: $(GTESTLIBS) -$(BUILDDIR)/testmisc_cu.o: INCFLAGS += $(GTESTINC) -$(testmain): $(BUILDDIR)/testmisc_cu.o -$(testmain): cu_objects_exe += $(BUILDDIR)/testmisc_cu.o # Comment out this line to skip the CUDA miscellaneous tests -endif -$(BUILDDIR)/runTest.o: $(GTESTLIBS) -$(BUILDDIR)/runTest.o: INCFLAGS += $(GTESTINC) -$(testmain): $(BUILDDIR)/runTest.o -$(testmain): cxx_objects_exe += $(BUILDDIR)/runTest.o +$(CUDACPP_BUILDDIR)/testmisc.o $(CUDACPP_BUILDDIR)/testmisc_cu.o: $(GTESTLIBS) +$(testmain): $(CUDACPP_BUILDDIR)/testmisc.o +$(testmain): cxx_objects_exe += $(CUDACPP_BUILDDIR)/testmisc.o # Comment out this line to skip the C++ miscellaneous tests +$(cutestmain): $(CUDACPP_BUILDDIR)/testmisc_cu.o +$(cutestmain): cu_objects_exe += $(CUDACPP_BUILDDIR)/testmisc_cu.o # Comment out this line to skip the CUDA miscellaneous tests + + +$(CUDACPP_BUILDDIR)/runTest.o $(CUDACPP_BUILDDIR)/runTest_cu.o: $(GTESTLIBS) +$(testmain): $(CUDACPP_BUILDDIR)/runTest.o +$(testmain): cxx_objects_exe += $(CUDACPP_BUILDDIR)/runTest.o +$(cutestmain): $(CUDACPP_BUILDDIR)/runTest_cu.o +$(cutestmain): cu_objects_exe += $(CUDACPP_BUILDDIR)/runTest_cu.o + -ifneq ($(NVCC),) -$(BUILDDIR)/runTest_cu.o: $(GTESTLIBS) -$(BUILDDIR)/runTest_cu.o: INCFLAGS += $(GTESTINC) ifneq ($(shell $(CXX) --version | grep ^Intel),) -$(testmain): MG_LDFLAGS += -lintlc # compile with icpx and link with nvcc (undefined reference to `_intel_fast_memcpy') -$(testmain): MG_LDFLAGS += -lsvml # compile with icpx and link with nvcc (undefined reference to `__svml_cos4_l9') +$(cutestmain): MG_LDFLAGS += -lintlc # compile with icpx and link with nvcc (undefined reference to `_intel_fast_memcpy') +$(cutestmain): MG_LDFLAGS += -lsvml # compile with icpx and link with nvcc (undefined reference to `__svml_cos4_l9') else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 -$(testmain): MG_LDFLAGS += -L$(patsubst %bin/nvc++,%lib,$(subst ccache ,,$(CXX))) -lnvhpcatm -lnvcpumath -lnvc -endif -$(testmain): $(BUILDDIR)/runTest_cu.o -$(testmain): cu_objects_exe += $(BUILDDIR)/runTest_cu.o +$(cutestmain): MG_LDFLAGS += -L$(patsubst %bin/nvc++,%lib,$(subst ccache ,,$(CXX))) -lnvhpcatm -lnvcpumath -lnvc endif -$(testmain): $(GTESTLIBS) -$(testmain): INCFLAGS += $(GTESTINC) -$(testmain): MG_LDFLAGS += -L$(GTESTLIBDIR) -lgtest -lgtest_main ifneq ($(OMPFLAGS),) ifneq ($(shell $(CXX) --version | egrep '^Intel'),) @@ -643,127 +316,31 @@ $(testmain): MG_LDFLAGS += -lgomp endif endif -ifeq ($(NVCC),) # link only runTest.o $(testmain): MG_LDFLAGS += $(CXXLIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH -$(testmain): $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cxx_objects_lib) $(cxx_objects_exe) $(GTESTLIBS) - $(CXX) -o $@ $(cxx_objects_lib) $(cxx_objects_exe) -ldl -pthread $(MG_LDFLAGS) $(LDFLAGS) -else # link both runTest.o and runTest_cu.o -$(testmain): MG_LDFLAGS += $(CULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH -$(testmain): $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cxx_objects_lib) $(cxx_objects_exe) $(cu_objects_lib) $(cu_objects_exe) $(GTESTLIBS) - $(NVCC) -o $@ $(cxx_objects_lib) $(cxx_objects_exe) $(cu_objects_lib) $(cu_objects_exe) -ldl -lcuda $(MG_LDFLAGS) $(LDFLAGS) -endif +$(testmain): $(CUDACPP_LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cxx_objects_lib) $(cxx_objects_exe) $(GTESTLIBS) + $(CXX) -o $@ $(cxx_objects_lib) $(cxx_objects_exe) -L$(CUDACPP_LIBDIR) -l$(MG5AMC_COMMONLIB) -ldl -pthread $(MG_LDFLAGS) $(LDFLAGS) + +$(cutestmain): MG_LDFLAGS += $(CULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH +$(cutestmain): $(CUDACPP_LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_objects_lib) $(cu_objects_exe) $(GTESTLIBS) + $(NVCC) -o $@ $(cu_objects_lib) $(cu_objects_exe) -L$(CUDACPP_LIBDIR) -l$(MG5AMC_COMMONLIB) -ldl -lcuda $(MG_LDFLAGS) $(LDFLAGS) # Use flock (Linux only, no Mac) to allow 'make -j' if googletest has not yet been downloaded https://stackoverflow.com/a/32666215 $(GTESTLIBS): ifneq ($(shell which flock 2>/dev/null),) - flock $(BUILDDIR)/.make_test.lock $(MAKE) -C $(TESTDIR) + flock $(CUDACPP_BUILDDIR)/.make_test.lock $(MAKE) -C $(TESTDIR) else $(MAKE) -C $(TESTDIR) endif #------------------------------------------------------------------------------- -# Target: build all targets in all AVX modes (each AVX mode in a separate build directory) -# Split the avxall target into five separate targets to allow parallel 'make -j avxall' builds -# (Hack: add a fbridge.inc dependency to avxall, to ensure it is only copied once for all AVX modes) -cppnone: $(cxx_main) - -cppsse4: $(cxx_main) - -cppavx2: $(cxx_main) - -cpp512y: $(cxx_main) - -cpp512z: $(cxx_main) - -cuda: $(cu_main) - -ifeq ($(UNAME_P),ppc64le) -###avxall: $(INCDIR)/fbridge.inc avxnone avxsse4 -cppall: cppnone cppsse4 -else ifeq ($(UNAME_P),arm) -###avxall: $(INCDIR)/fbridge.inc avxnone avxsse4 -cppall: cppnone cppsse4 -else -###avxall: $(INCDIR)/fbridge.inc avxnone avxsse4 avxavx2 avx512y avx512z -cppall: cppnone cppsse4 cppavx2 cpp512y cpp512z -endif - -#------------------------------------------------------------------------------- - -# Target: clean the builds -.PHONY: clean - -BUILD_DIRS := $(wildcard build.*) -NUM_BUILD_DIRS := $(words $(BUILD_DIRS)) - -clean: -ifeq ($(USEBUILDDIR),1) -ifeq ($(NUM_BUILD_DIRS),1) - $(info USEBUILDDIR=1, Only one build directory found.) - rm -rf $(BUILD_DIRS) -else ifeq ($(NUM_BUILD_DIRS),0) - $(error USEBUILDDIR=1, but no build directories are found.) -else - $(error Multiple BUILDDIR's found! Use 'cleannone', 'cleansse4', 'cleanavx2', 'clean512y','clean512z', 'cleancuda' or 'cleanall'.) -endif -else - rm -f $(BUILDDIR)/*.o $(BUILDDIR)/*.exe - rm -f $(LIBDIR)/lib$(MG5AMC_CXXLIB).so $(LIBDIR)/lib$(MG5AMC_CULIB).so -endif - $(MAKE) -C ../../src clean -f $(CUDACPP_SRC_MAKEFILE) - -cleanall: - @echo - rm -f $(BUILDDIR)/*.o $(BUILDDIR)/*.exe - rm -f $(LIBDIR)/lib$(MG5AMC_CXXLIB).so $(LIBDIR)/lib$(MG5AMC_CULIB).so - @echo - $(MAKE) -C ../../src cleanall -f $(CUDACPP_SRC_MAKEFILE) - rm -rf build.* - # Target: clean the builds as well as the gtest installation(s) -distclean: cleanall +distclean: clean cleansrc ifneq ($(wildcard $(TESTDIRCOMMON)),) $(MAKE) -C $(TESTDIRCOMMON) clean endif $(MAKE) -C $(TESTDIRLOCAL) clean -# Target: clean different builds -cleannone: - rm -rf build.none_* - rm -f ../../lib/build.none_*/lib$(MG5AMC_CXXLIB).so - $(MAKE) -C ../../src cleannone -f $(CUDACPP_SRC_MAKEFILE) - -cleansse4: - rm -rf build.sse4_* - rm -f ../../lib/build.sse4_*/lib$(MG5AMC_CXXLIB).so - $(MAKE) -C ../../src cleansse4 -f $(CUDACPP_SRC_MAKEFILE) - -cleanavx2: - rm -rf build.avx2_* - rm -f ../../lib/build.avx2_*/lib$(MG5AMC_CXXLIB).so - $(MAKE) -C ../../src cleanavx2 -f $(CUDACPP_SRC_MAKEFILE) - -clean512y: - rm -rf build.512y_* - rm -f ../../lib/build.512y_*/lib$(MG5AMC_CXXLIB).so - $(MAKE) -C ../../src clean512y -f $(CUDACPP_SRC_MAKEFILE) - -clean512z: - rm -rf build.512z_* - rm -f ../../lib/build.512z_*/lib$(MG5AMC_CXXLIB).so - $(MAKE) -C ../../src clean512z -f $(CUDACPP_SRC_MAKEFILE) - -cleancuda: - rm -rf build.cuda_* - rm -f ../../lib/build.cuda_*/lib$(MG5AMC_CULIB).so - $(MAKE) -C ../../src cleancuda -f $(CUDACPP_SRC_MAKEFILE) - -cleandir: - rm -f ./*.o ./*.exe - rm -f ../../lib/lib$(MG5AMC_CXXLIB).so ../../lib/lib$(MG5AMC_CULIB).so - $(MAKE) -C ../../src cleandir -f $(CUDACPP_SRC_MAKEFILE) - #------------------------------------------------------------------------------- # Target: show system and compiler information @@ -813,44 +390,52 @@ endif # Target: check/gcheck (run the C++ test executable) # [NB THIS IS WHAT IS USED IN THE GITHUB CI!] check: runTest cmpFcheck -gcheck: runTest cmpFGcheck +gcheck: + $(MAKE) AVX=cuda runTest cmpFGcheck # Target: runTest (run the C++ test executable runTest.exe) -runTest: all.$(TAG) - $(RUNTIME) $(BUILDDIR)/runTest.exe +ifneq ($(AVX),cuda) +runTest: cppbuild + $(RUNTIME) $(CUDACPP_BUILDDIR)/runTest.exe +else +runTest: cudabuild + $(RUNTIME) $(CUDACPP_BUILDDIR)/runTest_cuda.exe +endif + # Target: runCheck (run the C++ standalone executable check.exe, with a small number of events) -runCheck: all.$(TAG) - $(RUNTIME) $(BUILDDIR)/check.exe -p 2 32 2 +runCheck: cppbuild + $(RUNTIME) $(CUDACPP_BUILDDIR)/check.exe -p 2 32 2 # Target: runGcheck (run the CUDA standalone executable gcheck.exe, with a small number of events) -runGcheck: all.$(TAG) - $(RUNTIME) $(BUILDDIR)/gcheck.exe -p 2 32 2 +runGcheck: AVX=cuda +runGcheck: + $(MAKE) AVX=cuda cudabuild + $(RUNTIME) $(CUDACPP_BUILDDIR)/gcheck.exe -p 2 32 2 # Target: runFcheck (run the Fortran standalone executable - with C++ MEs - fcheck.exe, with a small number of events) -runFcheck: all.$(TAG) - $(RUNTIME) $(BUILDDIR)/fcheck.exe 2 32 2 +runFcheck: cppbuild + $(RUNTIME) $(CUDACPP_BUILDDIR)/fcheck.exe 2 32 2 # Target: runFGcheck (run the Fortran standalone executable - with CUDA MEs - fgcheck.exe, with a small number of events) -runFGcheck: all.$(TAG) - $(RUNTIME) $(BUILDDIR)/fgcheck.exe 2 32 2 +runFGcheck: AVX=cuda +runFGcheck: + $(MAKE) AVX=cuda cudabuild + $(RUNTIME) $(CUDACPP_BUILDDIR)/fgcheck.exe 2 32 2 # Target: cmpFcheck (compare ME results from the C++ and Fortran with C++ MEs standalone executables, with a small number of events) -cmpFcheck: all.$(TAG) +cmpFcheck: cppbuild @echo - @echo "$(BUILDDIR)/check.exe --common -p 2 32 2" - @echo "$(BUILDDIR)/fcheck.exe 2 32 2" - @me1=$(shell $(RUNTIME) $(BUILDDIR)/check.exe --common -p 2 32 2 | grep MeanMatrix | awk '{print $$4}'); me2=$(shell $(RUNTIME) $(BUILDDIR)/fcheck.exe 2 32 2 | grep Average | awk '{print $$4}'); echo "Avg ME (C++/C++) = $${me1}"; echo "Avg ME (F77/C++) = $${me2}"; if [ "$${me2}" == "NaN" ]; then echo "ERROR! Fortran calculation (F77/C++) returned NaN"; elif [ "$${me2}" == "" ]; then echo "ERROR! Fortran calculation (F77/C++) crashed"; else python3 -c "me1=$${me1}; me2=$${me2}; reldif=abs((me2-me1)/me1); print('Relative difference =', reldif); ok = reldif <= 2E-4; print ( '%s (relative difference %s 2E-4)' % ( ('OK','<=') if ok else ('ERROR','>') ) ); import sys; sys.exit(0 if ok else 1)"; fi + @echo "$(CUDACPP_BUILDDIR)/check.exe --common -p 2 32 2" + @echo "$(CUDACPP_BUILDDIR)/fcheck.exe 2 32 2" + @me1=$(shell $(RUNTIME) $(CUDACPP_BUILDDIR)/check.exe --common -p 2 32 2 | grep MeanMatrix | awk '{print $$4}'); me2=$(shell $(RUNTIME) $(CUDACPP_BUILDDIR)/fcheck.exe 2 32 2 | grep Average | awk '{print $$4}'); echo "Avg ME (C++/C++) = $${me1}"; echo "Avg ME (F77/C++) = $${me2}"; if [ "$${me2}" == "NaN" ]; then echo "ERROR! Fortran calculation (F77/C++) returned NaN"; elif [ "$${me2}" == "" ]; then echo "ERROR! Fortran calculation (F77/C++) crashed"; else python3 -c "me1=$${me1}; me2=$${me2}; reldif=abs((me2-me1)/me1); print('Relative difference =', reldif); ok = reldif <= 2E-4; print ( '%s (relative difference %s 2E-4)' % ( ('OK','<=') if ok else ('ERROR','>') ) ); import sys; sys.exit(0 if ok else 1)"; fi # Target: cmpFGcheck (compare ME results from the CUDA and Fortran with CUDA MEs standalone executables, with a small number of events) -cmpFGcheck: all.$(TAG) +cmpFGcheck: AVX=cuda +cmpFGcheck: + $(MAKE) AVX=cuda cudabuild @echo - @echo "$(BUILDDIR)/gcheck.exe --common -p 2 32 2" - @echo "$(BUILDDIR)/fgcheck.exe 2 32 2" - @me1=$(shell $(RUNTIME) $(BUILDDIR)/gcheck.exe --common -p 2 32 2 | grep MeanMatrix | awk '{print $$4}'); me2=$(shell $(RUNTIME) $(BUILDDIR)/fgcheck.exe 2 32 2 | grep Average | awk '{print $$4}'); echo "Avg ME (C++/CUDA) = $${me1}"; echo "Avg ME (F77/CUDA) = $${me2}"; if [ "$${me2}" == "NaN" ]; then echo "ERROR! Fortran calculation (F77/CUDA) crashed"; elif [ "$${me2}" == "" ]; then echo "ERROR! Fortran calculation (F77/CUDA) crashed"; else python3 -c "me1=$${me1}; me2=$${me2}; reldif=abs((me2-me1)/me1); print('Relative difference =', reldif); ok = reldif <= 2E-4; print ( '%s (relative difference %s 2E-4)' % ( ('OK','<=') if ok else ('ERROR','>') ) ); import sys; sys.exit(0 if ok else 1)"; fi - -# Target: memcheck (run the CUDA standalone executable gcheck.exe with a small number of events through cuda-memcheck) -memcheck: all.$(TAG) - $(RUNTIME) $(CUDA_HOME)/bin/cuda-memcheck --check-api-memory-access yes --check-deprecated-instr yes --check-device-heap yes --demangle full --language c --leak-check full --racecheck-report all --report-api-errors all --show-backtrace yes --tool memcheck --track-unused-memory yes $(BUILDDIR)/gcheck.exe -p 2 32 2 + @echo "$(CUDACPP_BUILDDIR)/gcheck.exe --common -p 2 32 2" + @echo "$(CUDACPP_BUILDDIR)/fgcheck.exe 2 32 2" + @me1=$(shell $(RUNTIME) $(CUDACPP_BUILDDIR)/gcheck.exe --common -p 2 32 2 | grep MeanMatrix | awk '{print $$4}'); me2=$(shell $(RUNTIME) $(CUDACPP_BUILDDIR)/fgcheck.exe 2 32 2 | grep Average | awk '{print $$4}'); echo "Avg ME (C++/CUDA) = $${me1}"; echo "Avg ME (F77/CUDA) = $${me2}"; if [ "$${me2}" == "NaN" ]; then echo "ERROR! Fortran calculation (F77/CUDA) crashed"; elif [ "$${me2}" == "" ]; then echo "ERROR! Fortran calculation (F77/CUDA) crashed"; else python3 -c "me1=$${me1}; me2=$${me2}; reldif=abs((me2-me1)/me1); print('Relative difference =', reldif); ok = reldif <= 2E-4; print ( '%s (relative difference %s 2E-4)' % ( ('OK','<=') if ok else ('ERROR','>') ) ); import sys; sys.exit(0 if ok else 1)"; fi -#------------------------------------------------------------------------------- \ No newline at end of file diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/makefile b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/makefile index 0662fa860e..cbfe9962fa 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/makefile +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/makefile @@ -1,37 +1,21 @@ SHELL := /bin/bash -include ../../Source/make_opts +# Include general setup +OPTIONS_MAKEFILE := ../../Source/make_opts +include $(OPTIONS_MAKEFILE) # Enable the C preprocessor https://gcc.gnu.org/onlinedocs/gfortran/Preprocessing-Options.html MG_FCFLAGS += -cpp MG_CXXFLAGS += -I. -# Sets correct target based on MAKECMDGOALS -ifeq ($(MAKECMDGOALS),) - TARGET := undefined -else - ifeq ($(shell grep -q madevent_ <<< $(MAKECMDGOALS)a),) - TARGET := $(word 2,($(subst _, ,$(MAKECMDGOALS)))) - else - TARGET := $(MAKECMDGOALS) - endif -endif - -# Sets correct cppavx target as dependency when compiling Fortran -ifeq ($(shell grep -q cpp <<< $(MAKECMDGOALS)a),) - ifeq ($(TARGET),cpp) - CPPTARGET := cppavx2 - else - CPPTARGET := $(TARGET) - endif -endif - -# Default goal -.DEFAULT_GOAL := usage +all: help cppnative # Target if user does not specify target -usage: - $(error Unknown target='$(TARGET)': only 'cppnone', 'cppsse4', 'cppavx2', 'cpp512y', 'cpp512z' and 'cuda' are supported!) +help: + $(info No target specified.) + $(info Viable targets are 'cppnative' (default), 'cppnone', 'cppsse4', 'cppavx2', 'cpp512y', 'cpp512z' and 'cuda') + $(info Or 'cppall' for all C++ targets) + $(info Or 'ALL' for all C++ and cuda targets) # Enable ccache if USECCACHE=1 ifeq ($(USECCACHE)$(shell echo $(CXX) | grep ccache),1) @@ -65,26 +49,6 @@ else endif LINKLIBS = $(LINK_MADLOOP_LIB) $(LINK_LOOP_LIBS) -L$(LIBDIR) -ldhelas -ldsample -lmodel -lgeneric -lpdf -lcernlib $(llhapdf) -lbias - -processid_short=$(shell basename $(CURDIR) | awk -F_ '{print $$(NF-1)"_"$$NF}') -CUDACPP_MAKEFILE=cudacpp.mk -# NB1 Using ":=" below instead of "=" is much faster (it only runs the subprocess once instead of many times) -# NB2 Use '|&' in CUDACPP_BUILDDIR to avoid confusing errors about googletest #507 -# NB3 Do not add a comment inlined "CUDACPP_BUILDDIR=$(shell ...) # comment" as otherwise a trailing space is included... -# NB4 The variables relevant to the cudacpp Makefile must be explicitly passed to $(shell...) -CUDACPP_MAKEENV:=$(shell echo '$(.VARIABLES)' | tr " " "\n" | egrep "(USEBUILDDIR|FPTYPE|HELINL|HRDCOD)") -###$(info CUDACPP_MAKEENV=$(CUDACPP_MAKEENV)) -###$(info $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))")) -CUDACPP_BUILDDIR:=$(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn $(TARGET) 2>/dev/null | awk '/Building/{print $$3}' | sed s/BUILDDIR=//) -ifeq ($(CUDACPP_BUILDDIR),) -$(error CUDACPP_BUILDDIR='$(CUDACPP_BUILDDIR)' should not be empty!) -else -$(info CUDACPP_BUILDDIR='$(CUDACPP_BUILDDIR)') -endif -CUDACPP_COMMONLIB=mg5amc_common -CUDACPP_CXXLIB=mg5amc_$(processid_short)_cpp -CUDACPP_CULIB=mg5amc_$(processid_short)_cuda - LIBS = $(LIBDIR)libbias.$(libext) $(LIBDIR)libdhelas.$(libext) $(LIBDIR)libdsample.$(libext) $(LIBDIR)libgeneric.$(libext) $(LIBDIR)libpdf.$(libext) $(LIBDIR)libgammaUPC.$(libext) $(LIBDIR)libmodel.$(libext) $(LIBDIR)libcernlib.$(libext) $(MADLOOP_LIB) $(LOOP_LIBS) ifneq ("$(wildcard ../../Source/RUNNING)","") @@ -92,6 +56,10 @@ ifneq ("$(wildcard ../../Source/RUNNING)","") LIBS += $(LIBDIR)librunning.$(libext) endif +SourceDir: ../../Source/*.f ../../Cards/param_card.dat ../../Cards/run_card.dat + $(MAKE) -C ../../Source + +$(LIBS): SourceDir # Source files @@ -111,84 +79,71 @@ DSIG_cudacpp=driver_cudacpp.o $(patsubst %.f, %_cudacpp.o, $(filter-out auto_dsi SYMMETRY = symmetry.o idenparts.o -# Binaries +# cudacpp targets: +CUDACPP_MAKEFILE := cudacpp.mk +ifneq (,$(wildcard $(CUDACPP_MAKEFILE))) +include $(CUDACPP_MAKEFILE) +endif + +ifeq ($(CUDACPP_BUILDDIR),) +$(error CUDACPP_BUILDDIR='$(CUDACPP_BUILDDIR)' should not be empty!) +endif +CUDACPP_COMMONLIB=mg5amc_common +CUDACPP_CXXLIB := $(CUDACPP_BUILDDIR)/lib$(MG5AMC_CXXLIB).so +CUDACPP_CULIB := $(CUDACPP_BUILDDIR)/lib$(MG5AMC_CULIB).so -#LDFLAGS+=-Wl,--no-relax # avoid 'failed to convert GOTPCREL relocation' error #458 (flag not universal -> skip?) -all: $(PROG)_fortran $(CUDACPP_BUILDDIR)/$(PROG)_cpp# also builds $(PROG)_cuda if $(CUDACPP_CULIB) exists (#503) +# Binaries +OMPFLAGS ?= -fopenmp ifneq ($(shell $(CXX) --version | egrep '^Intel'),) -override OMPFLAGS = -fopenmp LINKLIBS += -liomp5 # see #578 LINKLIBS += -lintlc # undefined reference to `_intel_fast_memcpy' else ifneq ($(shell $(CXX) --version | egrep '^clang'),) -override OMPFLAGS = -fopenmp $(CUDACPP_BUILDDIR)/$(PROG)_cpp: LINKLIBS += -L $(shell dirname $(shell $(CXX) -print-file-name=libc++.so)) -lomp # see #604 -###else ifneq ($(shell $(CXX) --version | egrep '^Apple clang'),) -###override OMPFLAGS = -fopenmp # OMP is not supported yet by cudacpp for Apple clang -else -override OMPFLAGS = -fopenmp endif $(PROG)_fortran: $(PROCESS) $(DSIG) auto_dsig.o $(LIBS) $(MATRIX) counters.o ompnumthreads.o $(FC) $(MG_FCFLAGS) $(FCFLAGS) -o $(PROG)_fortran $(PROCESS) $(DSIG) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o $(LDFLAGS) -$(LIBS): ../../Source - -../../Source: ../../Source/*.f ../../Cards/param_card.dat ../../Cards/run_card.dat - $(MAKE) -C ../../Source - # On Linux, set rpath to LIBDIR to make it unnecessary to use LD_LIBRARY_PATH # Use relative paths with respect to the executables ($ORIGIN on Linux) # On Darwin, building libraries with absolute paths in LIBDIR makes this unnecessary -ifeq ($(UNAME_S),Darwin) - override LIBFLAGSRPATH = -else ifeq ($(USEBUILDDIR),1) - override LIBFLAGSRPATH = -Wl,-rpath,'$$ORIGIN/../$(LIBDIR)/$(CUDACPP_BUILDDIR)' -else - override LIBFLAGSRPATH = -Wl,-rpath,'$$ORIGIN/$(LIBDIR)' +ifneq ($(UNAME_S),Darwin) + LIBFLAGSRPATH := -Wl,-rpath,'$$ORIGIN:$$ORIGIN/../$(LIBDIR)/$(CUDACPP_BUILDDIR)' endif -.PHONY: madevent_fortran_link madevent_cuda_link madevent_cpp_link madevent_cppnone_link madevent_cppsse4_link madevent_cppavx2_link madevent_cpp512y_link madevent_cpp512z_link +.PHONY: SourceDir madevent_fortran_link madevent_cuda_link madevent_cpp_link madevent_cppnone_link madevent_cppsse4_link madevent_cppavx2_link madevent_cpp512y_link madevent_cpp512z_link madevent_fortran_link: $(PROG)_fortran rm -f $(PROG) ln -s $(PROG)_fortran $(PROG) -# Only used for testing, should be removed in the future -madevent_cpp_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp - rm -f $(PROG) - ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) +madevent_cppnone_link: AVX=none +madevent_cppnone_link: cppnone + ln -sf $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) -madevent_cppnone_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp - rm -f $(PROG) - ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) +madevent_cppavx2_link: AVX=avx2 +madevent_cppavx2_link: cppavx2 + ln -sf $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) -madevent_cppsse4_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp - rm -f $(PROG) - ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) - -madevent_cppavx2_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp - rm -f $(PROG) - ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) +madevent_cpp512y_link: AVX=512y +madevent_cpp512y_link: cppavx512y + ln -sf $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) -madevent_cpp512y_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp - rm -f $(PROG) - ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) +madevent_cpp512z_link: AVX=512z +madevent_cpp512z_link: cppavx512z + ln -sf $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) -madevent_cpp512z_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp - rm -f $(PROG) - ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) - -madevent_cuda_link: $(CUDACPP_BUILDDIR)/$(PROG)_cuda - rm -f $(PROG) - ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cuda $(PROG) +madevent_cuda_link: AVX=cuda +madevent_cuda_link: cuda + ln -sf $(CUDACPP_BUILDDIR)/$(PROG)_cuda $(PROG) -$(CUDACPP_BUILDDIR)/$(PROG)_cpp: $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(LIBS) $(MATRIX) counters.o ompnumthreads.o $(CPPTARGET) - $(FC) -o $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o -L$(LIBDIR)/$(CUDACPP_BUILDDIR) -l$(CUDACPP_COMMONLIB) -l$(CUDACPP_CXXLIB) $(LIBFLAGSRPATH) $(MG_LDFLAGS) $(LDFLAGS) +$(CUDACPP_BUILDDIR)/$(PROG)_cpp: $(LIBS) $(CUDACPP_CXXLIB) $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) counters.o ompnumthreads.o + $(FC) -o $(CUDACPP_BUILDDIR)/$(PROG)_cpp -L$(LIBDIR)/$(CUDACPP_BUILDDIR) -l$(CUDACPP_COMMONLIB) $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o -L$(CUDACPP_BUILDDIR) -l$(MG5AMC_CXXLIB) $(LIBFLAGSRPATH) $(MG_LDFLAGS) $(LDFLAGS) -$(CUDACPP_BUILDDIR)/$(PROG)_cuda: $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(LIBS) $(MATRIX) counters.o ompnumthreads.o cuda - $(FC) -o $(CUDACPP_BUILDDIR)/$(PROG)_cuda $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o -L$(LIBDIR)/$(CUDACPP_BUILDDIR) -l$(CUDACPP_COMMONLIB) -l$(CUDACPP_CULIB) $(LIBFLAGSRPATH) $(MG_LDFLAGS) $(LDFLAGS) +$(CUDACPP_BUILDDIR)/$(PROG)_cuda: $(LIBS) $(CUDACPP_CULIB) $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) counters.o ompnumthreads.o + $(FC) -o $(CUDACPP_BUILDDIR)/$(PROG)_cuda -L$(LIBDIR)/$(CUDACPP_BUILDDIR) -l$(CUDACPP_COMMONLIB) $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o -L$(CUDACPP_BUILDDIR) -l$(MG5AMC_CULIB) $(LIBFLAGSRPATH) $(MG_LDFLAGS) $(LDFLAGS) counters.o: counters.cc timer.h $(CXX) $(MG_CXXFLAGS) $(CXXFLAGS) -c $< -o $@ @@ -206,7 +161,7 @@ gensym: $(SYMMETRY) configs.inc $(LIBS) # Add source so that the compiler finds the DiscreteSampler module. $(MATRIX): %.o: %.f $(FC) $(MG_FCFLAGS) $(FCFLAGS) $(MATRIX_FLAG) -c $< -I../../Source/ -I../../Source/PDF/gammaUPC -%.o: %.f +%.o $(CUDACPP_BUILDDIR)/%.o: %.f $(FC) $(MG_FCFLAGS) $(FCFLAGS) -I../../Source/ -I../../Source/PDF/gammaUPC -c $< -o $@ %_cudacpp.o: %.f $(FC) $(MG_FCFLAGS) $(FCFLAGS) -c -DMG5AMC_MEEXPORTER_CUDACPP $< -I../../Source/ $(OMPFLAGS) -o $@ @@ -241,107 +196,28 @@ genps.o: ../../Source/discretesampler.mod # Cudacpp avxall targets -UNAME_P := $(shell uname -p) ifeq ($(UNAME_P),ppc64le) -cppall: - $(MAKE) USEBUILDDIR=1 cppnone - $(MAKE) USEBUILDDIR=1 cppsse4 +cppall: cppnative cppnone cppsse4 else ifeq ($(UNAME_P),arm) -cppall: - $(MAKE) USEBUILDDIR=1 cppnone - $(MAKE) USEBUILDDIR=1 cppsse4 +cppall: cppnative cppnone cppsse4 else -cppall: - $(MAKE) USEBUILDDIR=1 cppnone - $(MAKE) USEBUILDDIR=1 cppsse4 - $(MAKE) USEBUILDDIR=1 cppavx2 - $(MAKE) USEBUILDDIR=1 cpp512y - $(MAKE) USEBUILDDIR=1 cpp512z +cppall: cppnative cppnone cppsse4 cppavx2 cppavx512y cppavx512z endif -ALL: - $(MAKE) USEBUILDDIR=1 cppnone - $(MAKE) USEBUILDDIR=1 cppsse4 - $(MAKE) USEBUILDDIR=1 cppavx2 - $(MAKE) USEBUILDDIR=1 cpp512y - $(MAKE) USEBUILDDIR=1 cpp512z - $(MAKE) USEBUILDDIR=1 cuda - -cppnone: - $(MAKE) -f $(CUDACPP_MAKEFILE) cppnone - -cppsse4: - $(MAKE) -f $(CUDACPP_MAKEFILE) cppsse4 - -cppavx2: - $(MAKE) -f $(CUDACPP_MAKEFILE) cppavx2 - -cpp512y: - $(MAKE) -f $(CUDACPP_MAKEFILE) cpp512y - -cpp512z: - $(MAKE) -f $(CUDACPP_MAKEFILE) cpp512z - -cuda: - $(MAKE) -f $(CUDACPP_MAKEFILE) cuda - -# Clean (NB: 'make clean' in Source calls 'make clean' in all P*) - -BUILD_DIRS := $(wildcard build.*) -BUILD_TARGET_DIR := $(shell echo $(BUILD_DIRS) | awk -F '[._]' '{print $$2}') -NUM_BUILD_DIRS := $(words $(BUILD_DIRS)) +ALL: cppall cuda +# Clean all architecture-specific builds: clean: -ifeq ($(USEBUILDDIR),1) -ifeq ($(NUM_BUILD_DIRS),1) - $(info USEBUILDDIR=1, only cleaning build dir.) - $(RM) -r $(BUILD_DIRS) - $(MAKE) -f $(CUDACPP_MAKEFILE) clean$(BUILD_TARGET_DIR) -else ifeq ($(NUM_BUILD_DIRS),0) - $(error USEBUILDDIR=1, but no build directories are found.) -else - $(error Multiple BUILDDIR's found! Use 'cleannone', 'cleansse4', 'cleanavx2', 'clean512y','clean512z', 'cleancuda' or 'cleanall'.) -endif -else - $(info USEBUILDDIR=0 only cleaning build with no dir.) - $(RM) *.o gensym $(PROG) $(PROG)_fortran $(PROG)_forhel ./$(PROG)_* - $(MAKE) -f $(CUDACPP_MAKEFILE) cleandir - $(RM) $(CUDACPP_BUILDDIR)/.*libs -endif - -cleannone: # Clean builds: fortran in this Pn; cpp executables for one AVX in this Pn - $(RM) *.o gensym $(PROG) $(PROG)_fortran $(PROG)_forhel build.none_*/$(PROG)_cpp - $(MAKE) -f $(CUDACPP_MAKEFILE) cleannone - -cleansse4: # Clean build: fortran in this Pn; cpp executables for cppsse4 in this Pn - $(RM) *.o gensym $(PROG) $(PROG)_fortran $(PROG)_forhel build.sse4_*/$(PROG)_cpp - $(MAKE) -f $(CUDACPP_MAKEFILE) cleansse4 + $(RM) *.o gensym $(PROG) $(PROG)_* + $(RM) -rf build.*/*{.o,.so,.exe,.dylib,madevent_*} -cleanavx2: # Clean build: fortran in this Pn; cpp executables for cppavx2 in this Pn - $(RM) *.o gensym $(PROG) $(PROG)_fortran $(PROG)_forhel build.avx2_*/$(PROG)_cpp - $(MAKE) -f $(CUDACPP_MAKEFILE) cleanavx2 +# Clean one architecture-specific build +clean%: + $(RM) -r build.$*_*/*{.o,.so,.exe,.dylib,madevent_*} -clean512y: # Clean build: fortran in this Pn; cpp executables for cpp512y in this Pn - $(RM) *.o gensym $(PROG) $(PROG)_fortran $(PROG)_forhel build.512y_*/$(PROG)_cpp - $(MAKE) -f $(CUDACPP_MAKEFILE) clean512y - -clean512z: # Clean build: fortran in this Pn; cpp executables for cpp512z in this Pn - $(RM) *.o gensym $(PROG) $(PROG)_fortran $(PROG)_forhel build.512z_*/$(PROG)_cpp - $(MAKE) -f $(CUDACPP_MAKEFILE) clean512z - -cleancuda: # Clean build: fortran in this Pn; cuda executables in this Pn - $(RM) *.o gensym $(PROG) $(PROG)_fortran $(PROG)_forhel build.cuda_*/$(PROG)_cuda - $(MAKE) -f $(CUDACPP_MAKEFILE) cleancuda - -cleanavxs: clean # Clean builds: fortran in this Pn; cudacpp for all AVX in this Pn and in src - $(MAKE) -f $(CUDACPP_MAKEFILE) cleanall - $(RM) $(CUDACPP_BUILDDIR)/.*libs - $(RM) .libs - -cleanall: # Clean builds: fortran in all P* and in Source; cudacpp for all AVX in all P* and in src - make -C ../../Source cleanall - $(RM) -r $(LIBDIR)libbias.$(libext) +# Clean common source directories (interferes with other P*) +cleansrc: + make -C ../../Source clean $(RM) ../../Source/*.mod ../../Source/*/*.mod - -distclean: cleanall # Clean all fortran and cudacpp builds as well as the googletest installation - $(MAKE) -f $(CUDACPP_MAKEFILE) distclean + $(RM) -r $(LIBDIR)libbias.$(libext) + if [ -d ../../src ]; then $(MAKE) -C ../../src -f cudacpp_src.mk clean; fi diff --git a/epochX/cudacpp/pp_tt012j.mad/src/cudacpp_src.mk b/epochX/cudacpp/pp_tt012j.mad/src/cudacpp_src.mk index 4e5521c103..328f1293e1 100644 --- a/epochX/cudacpp/pp_tt012j.mad/src/cudacpp_src.mk +++ b/epochX/cudacpp/pp_tt012j.mad/src/cudacpp_src.mk @@ -3,11 +3,6 @@ # Created by: S. Roiser (Feb 2020) for the MG5aMC CUDACPP plugin. # Further modified by: J. Teig, O. Mattelaer, S. Roiser, A. Valassi (2020-2023) for the MG5aMC CUDACPP plugin. -#=== Determine the name of this makefile (https://ftp.gnu.org/old-gnu/Manuals/make-3.80/html_node/make_17.html) -#=== NB: assume that the same name (e.g. cudacpp.mk, Makefile...) is used in the Subprocess and src directories - -THISMK = $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)) - #------------------------------------------------------------------------------- #=== Use bash in the Makefile (https://www.gnu.org/software/make/manual/html_node/Choosing-the-Shell.html) @@ -29,173 +24,27 @@ endif # See https://www.gnu.org/software/make/manual/html_node/Implicit-Variables.html ###RANLIB = ranlib -#------------------------------------------------------------------------------- - -#=== Configure the CUDA compiler (note: NVCC is already exported including ccache) - -###$(info NVCC=$(NVCC)) - -#------------------------------------------------------------------------------- - -#=== Configure ccache for C++ builds (note: NVCC is already exported including ccache) - -# Enable ccache if USECCACHE=1 -ifeq ($(USECCACHE)$(shell echo $(CXX) | grep ccache),1) - override CXX:=ccache $(CXX) -endif -#ifeq ($(USECCACHE)$(shell echo $(AR) | grep ccache),1) -# override AR:=ccache $(AR) -#endif - -#------------------------------------------------------------------------------- - -#=== Configure PowerPC-specific compiler flags for CUDA and C++ - -# Assuming uname is available, detect if architecture is PowerPC -UNAME_P := $(shell uname -p) - -# PowerPC-specific CXX compiler flags (being reviewed) -ifeq ($(UNAME_P),ppc64le) - MG_CXXFLAGS+= -mcpu=power9 -mtune=power9 # gains ~2-3% both for none and sse4 - # Throughput references without the extra flags below: none=1.41-1.42E6, sse4=2.15-2.19E6 - ###MG_CXXFLAGS+= -DNO_WARN_X86_INTRINSICS # no change - ###MG_CXXFLAGS+= -fpeel-loops # no change - ###MG_CXXFLAGS+= -funroll-loops # gains ~1% for none, loses ~1% for sse4 - ###MG_CXXFLAGS+= -ftree-vectorize # no change - ###MG_CXXFLAGS+= -flto # BUILD ERROR IF THIS ADDED IN SRC?! -else - ###AR=gcc-ar # needed by -flto - ###RANLIB=gcc-ranlib # needed by -flto - ###MG_CXXFLAGS+= -flto # NB: build error from src/Makefile unless gcc-ar and gcc-ranlib are used - ######MG_CXXFLAGS+= -fno-semantic-interposition # no benefit (neither alone, nor combined with -flto) -endif - -#------------------------------------------------------------------------------- - #=== Set the CUDA/C++ compiler flags appropriate to user-defined choices of AVX, FPTYPE, HELINL, HRDCOD, RNDGEN # Set the build flags appropriate to OMPFLAGS ###$(info OMPFLAGS=$(OMPFLAGS)) MG_CXXFLAGS += $(OMPFLAGS) -# Set the build flags appropriate to each AVX choice (example: "make AVX=none") -# [NB MGONGPU_PVW512 is needed because "-mprefer-vector-width=256" is not exposed in a macro] -# [See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96476] -ifeq ($(NVCC),) - $(info AVX=$(AVX)) - ifeq ($(UNAME_P),ppc64le) - ifeq ($(AVX),sse4) - override AVXFLAGS = -D__SSE4_2__ # Power9 VSX with 128 width (VSR registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on PowerPC for the moment) - endif - else ifeq ($(UNAME_P),arm) - ifeq ($(AVX),sse4) - override AVXFLAGS = -D__SSE4_2__ # ARM NEON with 128 width (Q/quadword registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on ARM for the moment) - endif - else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 - ifeq ($(AVX),none) - override AVXFLAGS = -mno-sse3 # no SIMD - else ifeq ($(AVX),sse4) - override AVXFLAGS = -mno-avx # SSE4.2 with 128 width (xmm registers) - else ifeq ($(AVX),avx2) - override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(AVX),512y) - override AVXFLAGS = -march=skylake -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(AVX),512z) - override AVXFLAGS = -march=skylake -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) - else - $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) - endif - else - ifeq ($(AVX),none) - override AVXFLAGS = -march=x86-64 # no SIMD (see #588) - else ifeq ($(AVX),sse4) - override AVXFLAGS = -march=nehalem # SSE4.2 with 128 width (xmm registers) - else ifeq ($(AVX),avx2) - override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(AVX),512y) - override AVXFLAGS = -march=skylake-avx512 -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(AVX),512z) - override AVXFLAGS = -march=skylake-avx512 -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) - endif - endif - # For the moment, use AVXFLAGS everywhere: eventually, use them only in encapsulated implementations? - MG_CXXFLAGS+= $(AVXFLAGS) -endif - -# Set the build flags appropriate to each FPTYPE choice (example: "make FPTYPE=f") -###$(info FPTYPE=$(FPTYPE)) -ifeq ($(FPTYPE),d) - MG_CXXFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_DOUBLE -else ifeq ($(FPTYPE),f) - MG_CXXFLAGS += -DMGONGPU_FPTYPE_FLOAT -DMGONGPU_FPTYPE2_FLOAT -else ifeq ($(FPTYPE),m) - MG_CXXFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_FLOAT -else - $(error Unknown FPTYPE='$(FPTYPE)': only 'd', 'f' and 'm' are supported) -endif - -# Set the build flags appropriate to each HELINL choice (example: "make HELINL=1") -###$(info HELINL=$(HELINL)) -ifeq ($(HELINL),1) - MG_CXXFLAGS += -DMGONGPU_INLINE_HELAMPS -else ifneq ($(HELINL),0) - $(error Unknown HELINL='$(HELINL)': only '0' and '1' are supported) -endif - -# Set the build flags appropriate to each HRDCOD choice (example: "make HRDCOD=1") -###$(info HRDCOD=$(HRDCOD)) -ifeq ($(HRDCOD),1) - MG_CXXFLAGS += -DMGONGPU_HARDCODE_PARAM -else ifneq ($(HRDCOD),0) - $(error Unknown HRDCOD='$(HRDCOD)': only '0' and '1' are supported) -endif - -# Set the build flags appropriate to each RNDGEN choice (example: "make RNDGEN=hasNoCurand") -###$(info RNDGEN=$(RNDGEN)) -ifeq ($(RNDGEN),hasNoCurand) - MG_CXXFLAGS += -DMGONGPU_HAS_NO_CURAND -else ifneq ($(RNDGEN),hasCurand) - $(error Unknown RNDGEN='$(RNDGEN)': only 'hasCurand' and 'hasNoCurand' are supported) -endif - #------------------------------------------------------------------------------- #=== Configure build directories and build lockfiles === # Build directory "short" tag (defines target and path to the optional build directory) # (Rationale: keep directory names shorter, e.g. do not include random number generator choice) -ifneq ($(NVCC),) - override DIRTAG = cuda_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) -else - override DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) -endif +DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) # Build lockfile "full" tag (defines full specification of build options that cannot be intermixed) # (Rationale: avoid mixing of CUDA and no-CUDA environment builds with different random number generators) -ifneq ($(NVCC),) - override TAG = cuda_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) -else - override TAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) -endif +TAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) -# Build directory: current directory by default, or build.$(DIRTAG) if USEBUILDDIR==1 -###$(info Current directory is $(shell pwd)) -ifeq ($(USEBUILDDIR),1) - override BUILDDIR = build.$(DIRTAG) - override LIBDIRREL = ../lib/$(BUILDDIR) - ###$(info Building in BUILDDIR=$(BUILDDIR) for tag=$(TAG) (USEBUILDDIR=1 is set)) -else - override BUILDDIR = . - override LIBDIRREL = ../lib - ###$(info Building in BUILDDIR=$(BUILDDIR) for tag=$(TAG) (USEBUILDDIR is not set)) -endif -######$(info Building in BUILDDIR=$(BUILDDIR) for tag=$(TAG)) +# Build directory: +BUILDDIR := build.$(DIRTAG) +LIBDIRREL := ../lib/$(BUILDDIR) # Workaround for Mac #375 (I did not manage to fix rpath with @executable_path): use absolute paths for LIBDIR # (NB: this is quite ugly because it creates the directory if it does not exist - to avoid removing src by mistake) @@ -236,81 +85,26 @@ $(BUILDDIR)/%_cu.o : %.cc *.h #------------------------------------------------------------------------------- cxx_objects=$(addprefix $(BUILDDIR)/, Parameters_sm.o read_slha.o) -ifneq ($(NVCC),) +ifeq ($(AVX),cuda) +COMPILER=$(NVCC) cu_objects=$(addprefix $(BUILDDIR)/, Parameters_sm_cu.o) +else +COMPILER=$(CXX) +cu_objects= endif # Target (and build rules): common (src) library -ifneq ($(NVCC),) $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so : $(cxx_objects) $(cu_objects) - @if [ ! -d $(LIBDIR) ]; then echo "mkdir -p $(LIBDIR)"; mkdir -p $(LIBDIR); fi - $(NVCC) -shared -o $@ $(cxx_objects) $(cu_objects) -else -$(LIBDIR)/lib$(MG5AMC_COMMONLIB).so : $(cxx_objects) - @if [ ! -d $(LIBDIR) ]; then echo "mkdir -p $(LIBDIR)"; mkdir -p $(LIBDIR); fi - $(CXX) $(MG_LDFLAGS) $(LDFLAGS) -shared -o $@ $(cxx_objects) -endif + mkdir -p $(LIBDIR) + $(COMPILER) -shared -o $@ $(cxx_objects) $(cu_objects) $(MG_LDFLAGS) $(LDFLAGS) #------------------------------------------------------------------------------- # Target: clean the builds .PHONY: clean -BUILD_DIRS := $(wildcard build.*) -NUM_BUILD_DIRS := $(words $(BUILD_DIRS)) - clean: -ifeq ($(USEBUILDDIR),1) -ifeq ($(NUM_BUILD_DIRS),1) - $(info USEBUILDDIR=1, only one src build directory found.) - rm -rf ../lib/$(BUILD_DIRS) - rm -rf $(BUILD_DIRS) -else ifeq ($(NUM_BUILD_DIRS),0) - $(error USEBUILDDIR=1, but no src build directories are found.) -else - $(error Multiple src BUILDDIR's found! Use 'cleannone', 'cleansse4', 'cleanavx2', 'clean512y','clean512z', 'cleancuda' or 'cleanall'.) -endif -else - rm -f ../lib/lib$(MG5AMC_COMMONLIB).so - rm -f $(BUILDDIR)/*.o $(BUILDDIR)/*.exe -endif - -cleanall: - @echo - rm -f ../lib/lib$(MG5AMC_COMMONLIB).so - rm -f $(BUILDDIR)/*.o $(BUILDDIR)/*.exe - @echo - rm -rf ../lib/build.* - rm -rf build.* - -# Target: clean different builds - -cleannone: - rm -rf ../lib/build.none_* - rm -rf build.none_* - -cleansse4: - rm -rf ../lib/build.sse4_* - rm -rf build.sse4_* - -cleanavx2: - rm -rf ../lib/build.avx2_* - rm -rf build.avx2_* - -clean512y: - rm -rf ../lib/build.512y_* - rm -rf build.512y_* - -clean512z: - rm -rf ../lib/build.512z_* - rm -rf build.512z_* - -cleancuda: - rm -rf ../lib/build.cuda_* - rm -rf build.cuda_* - -cleandir: - rm -f ./*.o ./*.exe - rm -f ../lib/lib$(MG5AMC_COMMONLIB).so + $(RM) -f ../lib/build.*/*.so + $(RM) -rf build.* #------------------------------------------------------------------------------- From e9f18a7fa59de5219c43b534ade7d5ca2c5fd0f7 Mon Sep 17 00:00:00 2001 From: Stephan Hageboeck Date: Fri, 17 Nov 2023 14:50:36 +0100 Subject: [PATCH 093/129] Remove conditional compilation after Makefile overhaul. --- epochX/cudacpp/pp_tt012j.mad/SubProcesses/MadgraphTest.h | 6 ------ 1 file changed, 6 deletions(-) diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/MadgraphTest.h b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/MadgraphTest.h index ffe3b84d53..7c313f13cc 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/MadgraphTest.h +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/MadgraphTest.h @@ -198,10 +198,6 @@ class MadgraphTest : public testing::TestWithParam } }; -// Since we link both the CPU-only and GPU tests into the same executable, we prevent -// a multiply defined symbol by only compiling this in the non-CUDA phase: -#ifndef __CUDACC__ - /// Compare momenta and matrix elements. /// This uses an implementation of TestDriverBase to run a madgraph workflow, /// and compares momenta and matrix elements with a reference file. @@ -309,6 +305,4 @@ TEST_P( MadgraphTest, CompareMomentaAndME ) } } -#endif // __CUDACC__ - #endif /* MADGRAPHTEST_H_ */ From 2a56e6d01bdcf48d81f1bde7ce9068e70b7a806f Mon Sep 17 00:00:00 2001 From: Stephan Hageboeck Date: Tue, 21 Nov 2023 14:48:39 +0100 Subject: [PATCH 094/129] [misc.py] Fix a few typos. --- epochX/cudacpp/pp_tt012j.mad/bin/internal/misc.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/epochX/cudacpp/pp_tt012j.mad/bin/internal/misc.py b/epochX/cudacpp/pp_tt012j.mad/bin/internal/misc.py index d3fed3baa2..5e19e943db 100755 --- a/epochX/cudacpp/pp_tt012j.mad/bin/internal/misc.py +++ b/epochX/cudacpp/pp_tt012j.mad/bin/internal/misc.py @@ -545,12 +545,13 @@ def compile(arg=[], cwd=None, mode='fortran', job_specs = True, nb_core=1 ,**opt ' but will not be able to compile an executable.') return p.returncode # Other reason - error_text = 'A compilation Error occurs ' + error_text = 'A compilation Error occurred ' if cwd: error_text += 'when trying to compile %s.\n' % cwd - error_text += 'The compilation fails with the following output message:\n' + error_text += 'The compilation failed with the following output message:\n' + error_text += ' '.join(cmd) + '\n' error_text += ' '+out.replace('\n','\n ')+'\n' - error_text += 'Please try to fix this compilations issue and retry.\n' + error_text += 'Please try to fix this compilation issue and retry.\n' error_text += 'Help might be found at https://answers.launchpad.net/mg5amcnlo.\n' error_text += 'If you think that this is a bug, you can report this at https://bugs.launchpad.net/mg5amcnlo' raise MadGraph5Error(error_text) From d8bfd81b046c64ad8063daa6588ce9cfa690d257 Mon Sep 17 00:00:00 2001 From: Stephan Hageboeck Date: Wed, 22 Nov 2023 09:43:15 +0100 Subject: [PATCH 095/129] Adapt old CI to new Makefile workflow. --- .github/workflows/c-cpp.yml | 40 +++++++++---------------------------- 1 file changed, 9 insertions(+), 31 deletions(-) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index 05f779b202..de258f17c8 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -21,23 +21,17 @@ jobs: runs-on: ubuntu-latest strategy: matrix: -<<<<<<< HEAD - folder: [ epochX/cudacpp/ee_mumu.sa/SubProcesses/P1_Sigma_sm_epem_mupmum , epochX/cudacpp/gg_ttgg.sa/SubProcesses/P1_Sigma_sm_gg_ttxgg, epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_gg_ttx ] -||||||| e21d34682 - folder: [ epochX/cudacpp/ee_mumu.sa/SubProcesses/P1_Sigma_sm_epem_mupmum , epochX/cudacpp/gg_ttgg.sa/SubProcesses/P1_Sigma_sm_gg_ttxgg ] -======= - folder: [ epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum , epochX/cudacpp/gg_ttgg.mad/SubProcesses/P1_gg_ttxgg ] ->>>>>>> madgraph/master + folder: [ epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum , epochX/cudacpp/gg_ttgg.mad/SubProcesses/P1_gg_ttxgg , epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_gg_ttx ] precision: [ d , f , m ] fail-fast: false steps: - uses: actions/checkout@v2 - name: make info - run: make FPTYPE=${{ matrix.precision }} -C ${{ matrix.folder }} -f cudacpp.mk info + run: make FPTYPE=${{ matrix.precision }} -C ${{ matrix.folder }} info - name: make run: make FPTYPE=${{ matrix.precision }} -C ${{ matrix.folder }} - name: make check - run: make FPTYPE=${{ matrix.precision }} -C ${{ matrix.folder }} -f cudacpp.mk check + run: make FPTYPE=${{ matrix.precision }} -C ${{ matrix.folder }} check CPU_MAC: runs-on: macos-latest env: @@ -50,11 +44,11 @@ jobs: steps: - uses: actions/checkout@v2 - name: make info - run: make AVX=none OMPFLAGS= FPTYPE=${{ matrix.precision }} -C ${{ matrix.folder }} -f cudacpp.mk info + run: make AVX=none OMPFLAGS= FPTYPE=${{ matrix.precision }} -C ${{ matrix.folder }} info - name: make - run: make AVX=none OMPFLAGS= FPTYPE=${{ matrix.precision }} -C ${{ matrix.folder }} + run: make AVX=none OMPFLAGS= FPTYPE=${{ matrix.precision }} -C ${{ matrix.folder }} cpp - name: make check - run: make AVX=none OMPFLAGS= FPTYPE=${{ matrix.precision }} -C ${{ matrix.folder }} -f cudacpp.mk check + run: make AVX=none OMPFLAGS= FPTYPE=${{ matrix.precision }} -C ${{ matrix.folder }} check GPU: runs-on: self-hosted env: @@ -63,13 +57,7 @@ jobs: REQUIRE_CUDA: 1 strategy: matrix: -<<<<<<< HEAD - folder: [ epochX/cudacpp/ee_mumu.sa/SubProcesses/P1_Sigma_sm_epem_mupmum , epochX/cudacpp/gg_ttgg.sa/SubProcesses/P1_Sigma_sm_gg_ttxgg , epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_gg_ttx , epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxgg ] -||||||| e21d34682 - folder: [ epochX/cudacpp/ee_mumu.sa/SubProcesses/P1_Sigma_sm_epem_mupmum , epochX/cudacpp/gg_ttgg.sa/SubProcesses/P1_Sigma_sm_gg_ttxgg ] -======= - folder: [ epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum , epochX/cudacpp/gg_ttgg.mad/SubProcesses/P1_gg_ttxgg ] ->>>>>>> madgraph/master + folder: [ epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum , epochX/cudacpp/gg_ttgg.mad/SubProcesses/P1_gg_ttxgg , epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_gg_ttx , epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxgg ] precision: [ d , f , m ] fail-fast: false steps: @@ -77,18 +65,8 @@ jobs: - name: path run: echo "PATH=$PATH" - name: make info - run: make FPTYPE=${{ matrix.precision }} -C ${{ matrix.folder }} -f cudacpp.mk info - - name: make -<<<<<<< HEAD + run: make FPTYPE=${{ matrix.precision }} -C ${{ matrix.folder }} info + - name: make cuda run: make FPTYPE=${{ matrix.precision }} -C ${{ matrix.folder }} cuda - name: make gcheck run: make FPTYPE=${{ matrix.precision }} -C ${{ matrix.folder }} gcheck -||||||| e21d34682 - run: make FPTYPE=${{ matrix.precision }} -C ${{ matrix.folder }} - - name: make check - run: make FPTYPE=${{ matrix.precision }} -C ${{ matrix.folder }} check -======= - run: make FPTYPE=${{ matrix.precision }} -C ${{ matrix.folder }} - - name: make check - run: make FPTYPE=${{ matrix.precision }} -C ${{ matrix.folder }} -f cudacpp.mk check ->>>>>>> madgraph/master From 4a5447e44238bfec22d89c4e37ab372e29576d84 Mon Sep 17 00:00:00 2001 From: Stephan Hageboeck Date: Thu, 23 Nov 2023 17:10:41 +0100 Subject: [PATCH 096/129] [pp_tt012j] More Makefile tweaks. - Ensure that Fortran parts of madevent are built only once before cpp and cuda builds start. - Add a cleanall target to clean all subprocesses. - Incorporate Andrea's/Olivier's Mac fixes. --- epochX/cudacpp/pp_tt012j.mad/Source/make_opts | 75 ++++++++++--------- epochX/cudacpp/pp_tt012j.mad/Source/makefile | 2 + .../pp_tt012j.mad/SubProcesses/cudacpp.mk | 16 ++-- .../pp_tt012j.mad/SubProcesses/makefile | 33 ++++---- .../cudacpp/pp_tt012j.mad/src/cudacpp_src.mk | 8 -- 5 files changed, 68 insertions(+), 66 deletions(-) diff --git a/epochX/cudacpp/pp_tt012j.mad/Source/make_opts b/epochX/cudacpp/pp_tt012j.mad/Source/make_opts index 7c2eef1a5f..34c3107455 100644 --- a/epochX/cudacpp/pp_tt012j.mad/Source/make_opts +++ b/epochX/cudacpp/pp_tt012j.mad/Source/make_opts @@ -12,13 +12,23 @@ STDLIB=-lstdc++ BIASLIBDIR=../../../lib/ BIASLIBRARY=libbias.$(libext) +# Rest of the makefile + +#=== Detect O/S and architecture (assuming uname is available, https://en.wikipedia.org/wiki/Uname) + +# Detect O/S kernel (Linux, Darwin...) +UNAME_S := $(shell uname -s) + +# Detect architecture (x86_64, ppc64le...) +UNAME_P := $(shell uname -p) + +#------------------------------------------------------------------------------- # REMOVE MACFLAG IF NOT ON MAC OR FOR F2PY -UNAME := $(shell uname -s) ifdef f2pymode MACFLAG= else -ifneq ($(UNAME), Darwin) +ifneq ($(UNAME_S), Darwin) MACFLAG= endif endif @@ -73,19 +83,17 @@ endif endif -UNAME := $(shell uname -s) - # Options: dynamic, lhapdf # Option dynamic -ifeq ($(UNAME), Darwin) +ifeq ($(UNAME_S), Darwin) dylibext=dylib else dylibext=so endif ifdef dynamic -ifeq ($(UNAME), Darwin) +ifeq ($(UNAME_S), Darwin) libext=dylib MG_FCFLAGS += -fno-common MG_LDFLAGS += -bundle @@ -126,29 +134,13 @@ endef #------------------------------------------------------------------------------- -#=== Detect O/S and architecture (assuming uname is available, https://en.wikipedia.org/wiki/Uname) - -# Detect O/S kernel (Linux, Darwin...) -UNAME_S := $(shell uname -s) -###$(info UNAME_S='$(UNAME_S)') - -# Detect architecture (x86_64, ppc64le...) -UNAME_P := $(shell uname -p) -###$(info UNAME_P='$(UNAME_P)') - -#------------------------------------------------------------------------------- - # Set special cases for non-gcc/clang builds # AVX below gets overridden from outside in architecture-specific builds AVX ?= none # [NB MGONGPU_PVW512 is needed because "-mprefer-vector-width=256" is not exposed in a macro] # [See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96476] $(info AVX=$(AVX)) -ifeq ($(UNAME_P),ppc64le) - ifeq ($(AVX),sse4) - override AVXFLAGS = -D__SSE4_2__ # Power9 VSX with 128 width (VSR registers) - endif -else ifeq ($(UNAME_P),arm) +ifeq ($(UNAME_P),arm) ifeq ($(AVX),sse4) override AVXFLAGS = -D__SSE4_2__ # ARM NEON with 128 width (Q/quadword registers) endif @@ -196,14 +188,16 @@ ifneq ($(wildcard $(CUDA_HOME)/bin/nvcc),) # See https://arnon.dk/matching-sm-architectures-arch-and-gencode-for-various-nvidia-cards/ # Default: use compute capability 70 (Volta architecture), and embed PTX to support later architectures, too. # Set MADGRAPH_CUDA_ARCHITECTURE to the desired value to change the default. + # Build for multiple architectures using a space-separated list, e.g. MADGRAPH_CUDA_ARCHITECTURE="70 80" MADGRAPH_CUDA_ARCHITECTURE ?= 70 - comma:=, - CUARCHFLAGS = $(foreach arch,$(subst $(comma), ,$(MADGRAPH_CUDA_ARCHITECTURE)),--generate-code arch=compute_$(arch),code=compute_$(arch) --generate-code arch=compute_$(arch),code=sm_$(arch)) + # Generate PTX for the first architecture: + CUARCHFLAGS := --generate-code arch=compute_$(firstword $(MADGRAPH_CUDA_ARCHITECTURE)),code=compute_$(firstword $(MADGRAPH_CUDA_ARCHITECTURE)) + # Generate device code for all architectures: + CUARCHFLAGS += $(foreach arch,$(MADGRAPH_CUDA_ARCHITECTURE), --generate-code arch=compute_$(arch),code=sm_$(arch)) + CUINC = -I$(CUDA_HOME)/include/ CURANDLIBFLAGS = -L$(CUDA_HOME)/lib64/ -lcurand # NB: -lcuda is not needed here! MG_LDFLAGS += $(CURANDLIBFLAGS) - - # Check ../../Source/make_opts for default flags MG_NVCCFLAGS += $(CUINC) $(USE_NVTX) $(CUARCHFLAGS) else ifneq ($(origin REQUIRE_CUDA),undefined) @@ -244,11 +238,30 @@ endif #=== Configure PowerPC-specific compiler flags for C++ and CUDA -$(warning Unify this with other makefiles) # PowerPC-specific CXX / CUDA compiler flags (being reviewed) ifeq ($(UNAME_P),ppc64le) MG_CXXFLAGS+= -mcpu=power9 -mtune=power9 # gains ~2-3% both for none and sse4 MG_NVCCFLAGS+= -Xcompiler -mno-float128 + + ifeq ($(AVX),sse4) + override AVXFLAGS = -D__SSE4_2__ # Power9 VSX with 128 width (VSR registers) + endif +endif + +#------------------------------------------------------------------------------- +#=== Apple-specific compiler/linker options + +# Add -std=c++17 explicitly to avoid build errors on macOS +# Add -mmacosx-version-min=11.3 to avoid "ld: warning: object file was built for newer macOS version than being linked" +ifneq ($(shell $(CXX) --version | egrep '^Apple clang'),) +MG_CXXFLAGS += -std=c++17 -mmacosx-version-min=11.3 +endif + +ifeq ($(UNAME_S),Darwin) +MG_LDFLAGS += -lc++ # avoid 'Undefined symbols' for chrono::steady_clock on macOS (checked with otool -L libmg5amc_gg_ttx_cpp.so) +MG_LDFLAGS += -mmacosx-version-min=11.3 # avoid "ld: warning: object file was built for newer macOS version than being linked" +else +MG_LDFLAGS += -Xlinker --no-relax # avoid 'failed to convert GOTPCREL relocation' error #458 (not supported on macOS) endif #------------------------------------------------------------------------------- @@ -324,9 +337,3 @@ MG_CXXFLAGS += $(COMMONFLAGS) MG_NVCCFLAGS += $(COMMONFLAGS) #------------------------------------------------------------------------------- -$(warning Unify this with other makefiles) -# Add -std=c++17 explicitly to avoid build errors on macOS -# Add -mmacosx-version-min=11.3 to avoid "ld: warning: object file was built for newer macOS version than being linked" -ifneq ($(shell $(CXX) --version | egrep '^Apple clang'),) -MG_CXXFLAGS += -std=c++17 -mmacosx-version-min=11.3 -endif diff --git a/epochX/cudacpp/pp_tt012j.mad/Source/makefile b/epochX/cudacpp/pp_tt012j.mad/Source/makefile index 18e0dda911..407b1b753e 100644 --- a/epochX/cudacpp/pp_tt012j.mad/Source/makefile +++ b/epochX/cudacpp/pp_tt012j.mad/Source/makefile @@ -62,6 +62,7 @@ $(LIBDIR)libmodel.$(libext): MODEL param_card.inc $(MAKE) -C $< FFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" FCFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" param_card.inc: ../Cards/param_card.dat ../bin/madevent treatcards param + touch $@ # madevent doesn't update the time stamp if there's nothing to do @@ -86,6 +87,7 @@ rw_events.o: rw_events.f run_config.inc run_card.inc: ../Cards/run_card.dat ../bin/madevent treatcards run + touch $@ # madevent doesn't update the time stamp if there's nothing to do clean4pdf: rm -f ../lib/libpdf.$(libext) diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/cudacpp.mk b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/cudacpp.mk index 0966cc03de..8c727f8333 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/cudacpp.mk @@ -8,19 +8,19 @@ CUDACPP_SRC_MAKEFILE = cudacpp_src.mk # Self-invocation with adapted flags: -cppnative: +cppnative: ../../Source/.sentry $(PROCESS) $(MAKE) AVX=native AVXFLAGS="-march=native" cppbuild -cppnone: +cppnone: ../../Source/.sentry $(PROCESS) $(MAKE) AVX=none AVXFLAGS= cppbuild -cppsse4: +cppsse4: ../../Source/.sentry $(PROCESS) $(MAKE) AVX=sse4 AVXFLAGS=-march=nehalem cppbuild -cppavx2: +cppavx2: ../../Source/.sentry $(PROCESS) $(MAKE) AVX=avx2 AVXFLAGS=-march=haswell cppbuild -cppavx512y: +cppavx512y: ../../Source/.sentry $(PROCESS) $(MAKE) AVX=512y AVXFLAGS="-march=skylake-avx512 -mprefer-vector-width=256" cppbuild -cppavx512z: +cppavx512z: ../../Source/.sentry $(PROCESS) $(MAKE) AVX=512z AVXFLAGS="-march=skylake-avx512 -DMGONGPU_PVW512" cppbuild -cuda: +cuda: ../../Source/.sentry $(PROCESS) $(MAKE) AVX=cuda cudabuild #------------------------------------------------------------------------------- @@ -324,7 +324,7 @@ endif # Use flock (Linux only, no Mac) to allow 'make -j' if googletest has not yet been downloaded https://stackoverflow.com/a/32666215 $(GTESTLIBS): ifneq ($(shell which flock 2>/dev/null),) - flock $(CUDACPP_BUILDDIR)/.make_test.lock $(MAKE) -C $(TESTDIR) + flock $(TESTDIR)/.make_test.lock $(MAKE) -C $(TESTDIR) else if [ -d $(TESTDIR) ]; then $(MAKE) -C $(TESTDIR); fi endif diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/makefile b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/makefile index 171a7466ca..127920d908 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/makefile +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/makefile @@ -57,10 +57,16 @@ ifneq ("$(wildcard ../../Source/RUNNING)","") LIBS += $(LIBDIR)librunning.$(libext) endif -SourceDir: ../../Source/*.f ../../Cards/param_card.dat ../../Cards/run_card.dat - $(MAKE) -C ../../Source +# We use Source/.timestamp_proxy to figure out if Source is out of date. The Source makefile doesn't correctly +# update all files, so we need a proxy that is updated every time we run "$(MAKE) -C ../../Source". +../../Source/.timestamp_proxy ../../Source/discretesampler.mod &: ../../Source/*.f ../../Cards/param_card.dat ../../Cards/run_card.dat +ifneq ($(shell which flock 2>/dev/null),) + flock ../../Source/.lock -c "$(MAKE) -C ../../Source; touch ../../Source/.timestamp_proxy" +else + $(MAKE) -C ../../Source; touch ../../Source/.timestamp_proxy +endif -$(LIBS): SourceDir +$(LIBS): ../../Source/.timestamp_proxy # Source files @@ -94,16 +100,6 @@ CUDACPP_CXXLIB := $(CUDACPP_BUILDDIR)/lib$(MG5AMC_CXXLIB).so CUDACPP_CULIB := $(CUDACPP_BUILDDIR)/lib$(MG5AMC_CULIB).so -# Binaries - -$(warning Find a place for the following) -ifeq ($(UNAME),Darwin) -MG_LDFLAGS += -lc++ # avoid 'Undefined symbols' for chrono::steady_clock on macOS (checked with otool -L libmg5amc_gg_ttx_cpp.so) -MG_LDFLAGS += -mmacosx-version-min=11.3 # avoid "ld: warning: object file was built for newer macOS version than being linked" -else -MG_LDFLAGS += -Xlinker --no-relax # avoid 'failed to convert GOTPCREL relocation' error #458 (not supported on macOS) -endif - # Set up OpenMP if supported OMPFLAGS ?= -fopenmp ifneq ($(shell $(CXX) --version | egrep '^Intel'),) @@ -115,6 +111,9 @@ else ifneq ($(shell $(CXX) --version | egrep '^Apple clang'),) OMPFLAGS = # OMP is not supported yet by cudacpp for Apple clang endif + +# Binaries + $(PROG)_fortran: $(PROCESS) $(DSIG) auto_dsig.o $(LIBS) $(MATRIX) counters.o ompnumthreads.o $(FC) $(MG_FCFLAGS) $(FCFLAGS) -o $(PROG)_fortran $(PROCESS) $(DSIG) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o $(LDFLAGS) @@ -125,7 +124,7 @@ ifneq ($(UNAME_S),Darwin) LIBFLAGSRPATH := -Wl,-rpath,'$$ORIGIN:$$ORIGIN/../$(LIBDIR)/$(CUDACPP_BUILDDIR)' endif -.PHONY: SourceDir madevent_fortran_link madevent_cuda_link madevent_cpp_link madevent_cppnone_link madevent_cppsse4_link madevent_cppavx2_link madevent_cpp512y_link madevent_cpp512z_link +.PHONY: madevent_fortran_link madevent_cuda_link madevent_cpp_link madevent_cppnone_link madevent_cppsse4_link madevent_cppavx2_link madevent_cpp512y_link madevent_cpp512z_link madevent_fortran_link: $(PROG)_fortran rm -f $(PROG) @@ -198,7 +197,6 @@ initcluster.o: message.inc # Extra dependencies on discretesampler.mod ../../Source/discretesampler.mod: ../../Source/DiscreteSampler.f - $(MAKE) -C ../../Source auto_dsig.o: ../../Source/discretesampler.mod driver.o: ../../Source/discretesampler.mod @@ -223,6 +221,9 @@ clean: $(RM) *.o gensym $(PROG) $(PROG)_* $(RM) -rf build.*/*{.o,.so,.exe,.dylib,madevent_*} +cleanall: + for PROCESS in ../P[0-9]*; do $(MAKE) -C $${PROCESS} clean; done + # Clean one architecture-specific build clean%: $(RM) -r build.$*_*/*{.o,.so,.exe,.dylib,madevent_*} @@ -230,6 +231,6 @@ clean%: # Clean common source directories (interferes with other P*) cleansrc: make -C ../../Source clean - $(RM) ../../Source/*.mod ../../Source/*/*.mod + $(RM) -f ../../Source/{*.mod,.timestamp_proxy,.lock} ../../Source/*/*.mod $(RM) -r $(LIBDIR)libbias.$(libext) if [ -d ../../src ]; then $(MAKE) -C ../../src -f cudacpp_src.mk clean; fi diff --git a/epochX/cudacpp/pp_tt012j.mad/src/cudacpp_src.mk b/epochX/cudacpp/pp_tt012j.mad/src/cudacpp_src.mk index 3685c13cb6..9b1b2ea4bc 100644 --- a/epochX/cudacpp/pp_tt012j.mad/src/cudacpp_src.mk +++ b/epochX/cudacpp/pp_tt012j.mad/src/cudacpp_src.mk @@ -23,13 +23,6 @@ endif # Note: AR, CXX and FC are implicitly defined if not set externally # See https://www.gnu.org/software/make/manual/html_node/Implicit-Variables.html ###RANLIB = ranlib -$(warning Unify) -# Add -mmacosx-version-min=11.3 to avoid "ld: warning: object file was built for newer macOS version than being linked" -LDFLAGS = -ifneq ($(shell $(CXX) --version | egrep '^Apple clang'),) -MG_CXXFLAGS += -mmacosx-version-min=11.3 -MG_LDFLAGS += -mmacosx-version-min=11.3 -endif #=== Set the CUDA/C++ compiler flags appropriate to user-defined choices of AVX, FPTYPE, HELINL, HRDCOD, RNDGEN @@ -55,7 +48,6 @@ LIBDIRREL := ../lib/$(BUILDDIR) # Workaround for Mac #375 (I did not manage to fix rpath with @executable_path): use absolute paths for LIBDIR # (NB: this is quite ugly because it creates the directory if it does not exist - to avoid removing src by mistake) -UNAME_S := $(shell uname -s) ifeq ($(UNAME_S),Darwin) override LIBDIR = $(shell mkdir -p $(LIBDIRREL); cd $(LIBDIRREL); pwd) ifeq ($(wildcard $(LIBDIR)),) From 4ac7d3c009b9dde8c002cda4b22fb821bada0bcc Mon Sep 17 00:00:00 2001 From: Stephan Hageboeck Date: Mon, 27 Nov 2023 14:18:00 +0100 Subject: [PATCH 097/129] [pp_tt012j] Reactivate GLOBAL_FLAG to work with new Makefiles. --- epochX/cudacpp/pp_tt012j.mad/Source/make_opts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/epochX/cudacpp/pp_tt012j.mad/Source/make_opts b/epochX/cudacpp/pp_tt012j.mad/Source/make_opts index 34c3107455..82143458fa 100644 --- a/epochX/cudacpp/pp_tt012j.mad/Source/make_opts +++ b/epochX/cudacpp/pp_tt012j.mad/Source/make_opts @@ -1,7 +1,7 @@ DEFAULT_CPP_COMPILER=g++ DEFAULT_F2PY_COMPILER=f2py3 DEFAULT_F_COMPILER=gfortran -GLOBAL_FLAG=-O3 -ffast-math -fbounds-check +GLOBAL_FLAG=-O3 -ffast-math MACFLAG= MG5AMC_VERSION=SpecifiedByMG5aMCAtRunTime PYTHIA8_PATH=NotInstalled @@ -41,10 +41,9 @@ endif # For debugging Fortran, one could e.g. use: # FCFLAGS="-g -fbounds-check -ffpe-trap=invalid,zero,overflow,underflow,denormal -Wall -fimplicit-none" ############################################################ -$(warning GLOBAL_FLAG is ignored here) -FCFLAGS ?= -O3 -ffast-math -fbounds-check -CXXFLAGS ?= -O3 -ffast-math -DNDEBUG -NVCCFLAGS ?= -O3 -ffast-math -use_fast_math -DNDEBUG -lineinfo +FCFLAGS ?= $(GLOBAL_FLAG) -fbounds-check +CXXFLAGS ?= $(GLOBAL_FLAG) -DNDEBUG +NVCCFLAGS ?= $(GLOBAL_FLAG) -DNDEBUG -use_fast_math -lineinfo LDFLAGS ?= $(STDLIB) ifneq ($(FFLAGS),) From 8ecef5be96eec5eeea417ca443b63968a3185143 Mon Sep 17 00:00:00 2001 From: Stephan Hageboeck Date: Mon, 27 Nov 2023 15:36:11 +0100 Subject: [PATCH 098/129] [pp_tt012j] Even more Makefile tweaks. --- epochX/cudacpp/pp_tt012j.mad/Source/make_opts | 10 +++++----- .../cudacpp/pp_tt012j.mad/SubProcesses/cudacpp.mk | 14 +++++++------- epochX/cudacpp/pp_tt012j.mad/SubProcesses/makefile | 13 +++++++------ 3 files changed, 19 insertions(+), 18 deletions(-) diff --git a/epochX/cudacpp/pp_tt012j.mad/Source/make_opts b/epochX/cudacpp/pp_tt012j.mad/Source/make_opts index 82143458fa..3cacd17b0c 100644 --- a/epochX/cudacpp/pp_tt012j.mad/Source/make_opts +++ b/epochX/cudacpp/pp_tt012j.mad/Source/make_opts @@ -1,12 +1,12 @@ -DEFAULT_CPP_COMPILER=g++ -DEFAULT_F2PY_COMPILER=f2py3 -DEFAULT_F_COMPILER=gfortran GLOBAL_FLAG=-O3 -ffast-math +DEFAULT_CPP_COMPILER=g++ MACFLAG= +STDLIB=-lstdc++ +STDLIB_FLAG= +DEFAULT_F_COMPILER=gfortran +DEFAULT_F2PY_COMPILER=f2py3 MG5AMC_VERSION=SpecifiedByMG5aMCAtRunTime PYTHIA8_PATH=NotInstalled -STDLIB_FLAG= -STDLIB=-lstdc++ #end_of_make_opts_variables BIASLIBDIR=../../../lib/ diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/cudacpp.mk b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/cudacpp.mk index 8c727f8333..eadffe1285 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/cudacpp.mk @@ -8,19 +8,19 @@ CUDACPP_SRC_MAKEFILE = cudacpp_src.mk # Self-invocation with adapted flags: -cppnative: ../../Source/.sentry $(PROCESS) +cppnative: $(SOURCEDIR_GUARD) $(PROCESS) $(MAKE) AVX=native AVXFLAGS="-march=native" cppbuild -cppnone: ../../Source/.sentry $(PROCESS) +cppnone: $(SOURCEDIR_GUARD) $(PROCESS) $(MAKE) AVX=none AVXFLAGS= cppbuild -cppsse4: ../../Source/.sentry $(PROCESS) +cppsse4: $(SOURCEDIR_GUARD) $(PROCESS) $(MAKE) AVX=sse4 AVXFLAGS=-march=nehalem cppbuild -cppavx2: ../../Source/.sentry $(PROCESS) +cppavx2: $(SOURCEDIR_GUARD) $(PROCESS) $(MAKE) AVX=avx2 AVXFLAGS=-march=haswell cppbuild -cppavx512y: ../../Source/.sentry $(PROCESS) +cppavx512y: $(SOURCEDIR_GUARD) $(PROCESS) $(MAKE) AVX=512y AVXFLAGS="-march=skylake-avx512 -mprefer-vector-width=256" cppbuild -cppavx512z: ../../Source/.sentry $(PROCESS) +cppavx512z: $(SOURCEDIR_GUARD) $(PROCESS) $(MAKE) AVX=512z AVXFLAGS="-march=skylake-avx512 -DMGONGPU_PVW512" cppbuild -cuda: ../../Source/.sentry $(PROCESS) +cuda: $(SOURCEDIR_GUARD) $(PROCESS) $(MAKE) AVX=cuda cudabuild #------------------------------------------------------------------------------- diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/makefile b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/makefile index 127920d908..4cadaecf00 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/makefile +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/makefile @@ -57,16 +57,17 @@ ifneq ("$(wildcard ../../Source/RUNNING)","") LIBS += $(LIBDIR)librunning.$(libext) endif -# We use Source/.timestamp_proxy to figure out if Source is out of date. The Source makefile doesn't correctly +SOURCEDIR_GUARD:=../../Source/.timestamp_guard +# We use $(SOURCEDIR_GUARD) to figure out if Source is out of date. The Source makefile doesn't correctly # update all files, so we need a proxy that is updated every time we run "$(MAKE) -C ../../Source". -../../Source/.timestamp_proxy ../../Source/discretesampler.mod &: ../../Source/*.f ../../Cards/param_card.dat ../../Cards/run_card.dat +$(SOURCEDIR_GUARD) ../../Source/discretesampler.mod &: ../../Source/*.f ../../Cards/param_card.dat ../../Cards/run_card.dat ifneq ($(shell which flock 2>/dev/null),) - flock ../../Source/.lock -c "$(MAKE) -C ../../Source; touch ../../Source/.timestamp_proxy" + flock ../../Source/.lock -c "$(MAKE) -C ../../Source; touch $(SOURCEDIR_GUARD)" else - $(MAKE) -C ../../Source; touch ../../Source/.timestamp_proxy + $(MAKE) -C ../../Source; touch $(SOURCEDIR_GUARD) endif -$(LIBS): ../../Source/.timestamp_proxy +$(LIBS): $(SOURCEDIR_GUARD) # Source files @@ -231,6 +232,6 @@ clean%: # Clean common source directories (interferes with other P*) cleansrc: make -C ../../Source clean - $(RM) -f ../../Source/{*.mod,.timestamp_proxy,.lock} ../../Source/*/*.mod + $(RM) -f $(SOURCEDIR_GUARD) ../../Source/{*.mod,.lock} ../../Source/*/*.mod $(RM) -r $(LIBDIR)libbias.$(libext) if [ -d ../../src ]; then $(MAKE) -C ../../src -f cudacpp_src.mk clean; fi From ee768b4e5e0a6fe5865272e9bd66f35b95e210e1 Mon Sep 17 00:00:00 2001 From: Stephan Hageboeck Date: Fri, 24 Nov 2023 16:13:21 +0100 Subject: [PATCH 099/129] [CODEGEN] Port makefile overhaul to CODEGEN. This is a port of Makefile work in pp_tt012j, namely - Unify Makefiles by including rules from the C++ Makefile into the Fortran makefile instead of calling the C++ makefile. --> Now, only one make is invoked to build both C++ and Fortran executables (or fortran+cuda for the cuda build), and dependencies and flags are easier to track. - Create dedicated targets for different architectures: - make cuda to build cuda - make cppavx2 for an avx2 build (and similar) - make cppall to build all C++ vectorisation levels - make ALL to build both C++ and cuda - (names to be discussed) - Move common setup work into Source/make_opts --> Setup such as architecture selection and compiler configuration don't have to be repeated in each Makefile - Allow for overriding flags without editing any Makefiles for every compiler. This is achieved by following the Makefile convention that CXXFLAGS (FCFLAGS, etc) should come last in each command line. Internal flags are now called MG_CXXFLAGS, MG_NVCCFLAGS, etc, and CXXFLAGS are appended. - The established GLOBAL_FLAG is used as base optimisation level for all compilers. - With this, flags can now easily be overridden, e.g. for debugging C++: make CXXFLAGS="-O0 -g" cppavx2 (or export CXXFLAGS for an entire session) The same goes for other compilers. Or simultaneously for all compilers: make GLOBAL_FLAG="-O0 -g" cuda - Every architecture-specific C++/cuda build now ends up in its own directory. This includes the library, object files and all executables. - In order to do an architecture-specific build, the Makefile invokes itself with the appropriate flags. This allows for parallel architecture-specific builds, and greatly simplifies the Makefiles. `make cppavx2` cuda will internally e.g. do something like $(MAKE) AVX=avx2 AVXFLAGS=<...> cpp $(MAKE) AVX=cuda AVXFLAGS=<...> cuda but in parallel. - The cuda build is now completely separated from SIMD-enabled builds - A new default target has been added, "cppnative", which builds -march=native if the user doesn't specify anything else. - Clean targets have been simplified. - "clean" cleans an entire subprocess, - "clean" cleans only the architecture-specific build in the subprocess, - "cleanall" cleans all subprocesses. - "distclean" cleans everything The patches were generated using: 1. Commit everything in a specific process, e.g. pp_tt012j 2. CODEGEN/generateAndCompare --mad --nopatch pp_tt012j 3. git diff -R pp_tt012j.mad/SubProcesses/P1_gg_ttxg/{auto_dsig1.f,driver.f,matrix1.f} > CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 git diff -R pp_tt012j.mad/{Source/makefile,Source/make_opts,Source/dsample.f,Source/genps.inc,SubProcesses/makefile,bin/internal/banner.py,bin/internal/gen_ximprove.py,bin/internal/madevent_interface.py} > CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common --- .../MG5aMC_patches/PROD/patch.P1 | 32 +- .../MG5aMC_patches/PROD/patch.common | 13055 +++++++++++++++- .../iolibs/template_files/gpu/cudacpp.mk | 811 +- .../iolibs/template_files/gpu/cudacpp_src.mk | 238 +- 4 files changed, 13041 insertions(+), 1095 deletions(-) diff --git a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 index fe883a6b25..2b919d0612 100644 --- a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 +++ b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 @@ -1,7 +1,7 @@ -diff --git b/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/auto_dsig1.f a/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/auto_dsig1.f -index 880769442..5a3da931f 100644 ---- b/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/auto_dsig1.f -+++ a/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/auto_dsig1.f +diff --git b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gg_ttxg/auto_dsig1.f a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gg_ttxg/auto_dsig1.f +index ddcb97ace..e28575ead 100644 +--- b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gg_ttxg/auto_dsig1.f ++++ a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gg_ttxg/auto_dsig1.f @@ -484,23 +484,140 @@ C INTEGER VECSIZE_USED @@ -156,10 +156,10 @@ index 880769442..5a3da931f 100644 RETURN END -diff --git b/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/driver.f a/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/driver.f -index 71fbf2b25..0f1d199fc 100644 ---- b/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/driver.f -+++ a/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/driver.f +diff --git b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gg_ttxg/driver.f a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gg_ttxg/driver.f +index 7fb7adb7b..6c314a957 100644 +--- b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gg_ttxg/driver.f ++++ a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gg_ttxg/driver.f @@ -74,13 +74,77 @@ c common/to_colstats/ncols,ncolflow,ncolalt,ic include 'coupl.inc' ! needs VECSIZE_MEMMAX (defined in vector.inc) @@ -283,10 +283,10 @@ index 71fbf2b25..0f1d199fc 100644 if(fine.eq.0) fine=len(tempname) open(unit=lun,file=tempname,status='old',ERR=20) fopened=.true. -diff --git b/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/matrix1.f a/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/matrix1.f -index 3ac962688..daea73a6d 100644 ---- b/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/matrix1.f -+++ a/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/matrix1.f +diff --git b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gg_ttxg/matrix1.f a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gg_ttxg/matrix1.f +index 12641a014..a885b7fde 100644 +--- b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gg_ttxg/matrix1.f ++++ a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gg_ttxg/matrix1.f @@ -72,7 +72,10 @@ C DATA NB_FAIL /0/ DOUBLE PRECISION GET_CHANNEL_CUT @@ -299,7 +299,7 @@ index 3ac962688..daea73a6d 100644 C C This is just to temporarily store the reference grid for C helicity of the DiscreteSampler so as to obtain its number of -@@ -140,6 +143,7 @@ C ---------- +@@ -156,6 +159,7 @@ C ---------- C BEGIN CODE C ---------- @@ -307,7 +307,7 @@ index 3ac962688..daea73a6d 100644 NTRY(IMIRROR)=NTRY(IMIRROR)+1 THIS_NTRY(IMIRROR) = THIS_NTRY(IMIRROR)+1 DO I=1,NEXTERNAL -@@ -217,6 +221,17 @@ C ---------- +@@ -233,6 +237,17 @@ C ---------- ENDIF IF(NTRY(IMIRROR).EQ.MAXTRIES)THEN ISHEL(IMIRROR)=MIN(ISUM_HEL,NGOOD(IMIRROR)) @@ -325,7 +325,7 @@ index 3ac962688..daea73a6d 100644 ENDIF ENDIF ELSE IF (.NOT.INIT_MODE) THEN ! random helicity -@@ -234,6 +249,7 @@ C Include the Jacobian from helicity sampling +@@ -250,6 +265,7 @@ C Include the Jacobian from helicity sampling IHEL = HEL_PICKED ELSE ANS = 1D0 @@ -333,7 +333,7 @@ index 3ac962688..daea73a6d 100644 RETURN ENDIF IF (ANS.NE.0D0.AND.(ISUM_HEL .NE. 1.OR.HEL_PICKED.EQ.-1)) THEN -@@ -278,9 +294,8 @@ C Set right sign for ANS, based on sign of chosen helicity +@@ -294,9 +310,8 @@ C Set right sign for ANS, based on sign of chosen helicity ENDIF ENDIF ANS=ANS/DBLE(IDEN) diff --git a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common index e19a7d2054..b2978b4459 100644 --- a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common +++ b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common @@ -12,52 +12,498 @@ index a59181c70..af7e0efbc 100644 INTEGER MAXTRIES PARAMETER(MAXTRIES=25) C To pass the helicity configuration chosen by the DiscreteSampler to +diff --git b/epochX/cudacpp/gg_tt.mad/Source/make_opts a/epochX/cudacpp/gg_tt.mad/Source/make_opts +index 2607530b7..7b87725d9 100644 +--- b/epochX/cudacpp/gg_tt.mad/Source/make_opts ++++ a/epochX/cudacpp/gg_tt.mad/Source/make_opts +@@ -1,42 +1,65 @@ + DEFAULT_CPP_COMPILER=g++ +-MACFLAG= +-STDLIB=-lstdc++ +-STDLIB_FLAG= ++DEFAULT_F2PY_COMPILER=f2py3 + DEFAULT_F_COMPILER=gfortran +-DEFAULT_F2PY_COMPILER=f2py3.9 ++GLOBAL_FLAG=-O3 -ffast-math ++MACFLAG= + MG5AMC_VERSION=SpecifiedByMG5aMCAtRunTime + PYTHIA8_PATH=NotInstalled ++STDLIB_FLAG= ++STDLIB=-lstdc++ + #end_of_make_opts_variables + + BIASLIBDIR=../../../lib/ + BIASLIBRARY=libbias.$(libext) + + # Rest of the makefile +-ifeq ($(origin FFLAGS),undefined) +-FFLAGS= -w -fPIC +-#FFLAGS+= -g -fbounds-check -ffpe-trap=invalid,zero,overflow,underflow,denormal -Wall -fimplicit-none +-endif + +-FFLAGS += $(GLOBAL_FLAG) ++#=== Detect O/S and architecture (assuming uname is available, https://en.wikipedia.org/wiki/Uname) ++ ++# Detect O/S kernel (Linux, Darwin...) ++UNAME_S := $(shell uname -s) ++ ++# Detect architecture (x86_64, ppc64le...) ++UNAME_P := $(shell uname -p) ++ ++#------------------------------------------------------------------------------- + + # REMOVE MACFLAG IF NOT ON MAC OR FOR F2PY +-UNAME := $(shell uname -s) + ifdef f2pymode + MACFLAG= + else +-ifneq ($(UNAME), Darwin) ++ifneq ($(UNAME_S), Darwin) + MACFLAG= + endif + endif + ++############################################################ ++# Default compiler flags ++# To change optimisation level, override these as follows: ++# make CXXFLAGS="-O0 -g" ++# or export them as environment variables ++# For debugging Fortran, one could e.g. use: ++# FCFLAGS="-g -fbounds-check -ffpe-trap=invalid,zero,overflow,underflow,denormal -Wall -fimplicit-none" ++############################################################ ++FCFLAGS ?= $(GLOBAL_FLAG) -fbounds-check ++CXXFLAGS ?= $(GLOBAL_FLAG) -DNDEBUG ++NVCCFLAGS ?= $(GLOBAL_FLAG) -DNDEBUG -use_fast_math -lineinfo ++LDFLAGS ?= $(STDLIB) + +-ifeq ($(origin CXXFLAGS),undefined) +-CXXFLAGS= -O $(STDLIB_FLAG) $(MACFLAG) ++ifneq ($(FFLAGS),) ++# Madgraph used to use FFLAGS, so the user probably tries to change the flags specifically for madgraph: ++FCFLAGS = $(FFLAGS) + endif + +-ifeq ($(origin CFLAGS),undefined) +-CFLAGS= -O $(STDLIB_FLAG) $(MACFLAG) ++# Madgraph-specific flags: ++WARNFLAGS = -Wall -Wshadow -Wextra ++ifeq (,$(findstring -std=,$(CXXFLAGS))) ++CXXSTANDARD= -std=c++17 + endif ++MG_FCFLAGS += -fPIC -w ++MG_CXXFLAGS += -fPIC $(CXXSTANDARD) $(WARNFLAGS) $(MACFLAG) ++MG_NVCCFLAGS += -fPIC $(CXXSTANDARD) --forward-unknown-to-host-compiler $(WARNFLAGS) ++MG_LDFLAGS += $(MACFLAG) + + # Set FC unless it's defined by an environment variable + ifeq ($(origin FC),default) +@@ -48,45 +71,40 @@ endif + + # Increase the number of allowed charcters in a Fortran line + ifeq ($(FC), ftn) +-FFLAGS+= -extend-source # for ifort type of compiler ++MG_FCFLAGS += -extend-source # for ifort type of compiler + else + VERS="$(shell $(FC) --version | grep ifort -i)" + ifeq ($(VERS), "") +-FFLAGS+= -ffixed-line-length-132 ++MG_FCFLAGS += -ffixed-line-length-132 + else +-FFLAGS+= -extend-source # for ifort type of compiler ++MG_FCFLAGS += -extend-source # for ifort type of compiler + endif + endif + + +-UNAME := $(shell uname -s) +-ifeq ($(origin LDFLAGS), undefined) +-LDFLAGS=$(STDLIB) $(MACFLAG) +-endif +- + # Options: dynamic, lhapdf + # Option dynamic + +-ifeq ($(UNAME), Darwin) ++ifeq ($(UNAME_S), Darwin) + dylibext=dylib + else + dylibext=so + endif + + ifdef dynamic +-ifeq ($(UNAME), Darwin) ++ifeq ($(UNAME_S), Darwin) + libext=dylib +-FFLAGS+= -fno-common +-LDFLAGS += -bundle ++MG_FCFLAGS += -fno-common ++MG_LDFLAGS += -bundle + define CREATELIB + $(FC) -dynamiclib -undefined dynamic_lookup -o $(1) $(2) + endef + else + libext=so +-FFLAGS+= -fPIC +-LDFLAGS += -shared ++MG_FCFLAGS += -fPIC ++MG_LDFLAGS += -shared + define CREATELIB +-$(FC) $(FFLAGS) $(LDFLAGS) -o $(1) $(2) ++$(FC) $(MG_FCFLAGS) $(FCFLAGS) $(MG_LDFLAGS) $(LDFLAGS) -o $(1) $(2) + endef + endif + else +@@ -100,17 +118,9 @@ endif + # Option lhapdf + + ifneq ($(lhapdf),) +-CXXFLAGS += $(shell $(lhapdf) --cppflags) ++MG_CXXFLAGS += $(shell $(lhapdf) --cppflags) + alfas_functions=alfas_functions_lhapdf + llhapdf+= $(shell $(lhapdf) --cflags --libs) -lLHAPDF +-# check if we need to activate c++11 (for lhapdf6.2) +-ifeq ($(origin CXX),default) +-ifeq ($lhapdfversion$lhapdfsubversion,62) +-CXX=$(DEFAULT_CPP_COMPILER) -std=c++11 +-else +-CXX=$(DEFAULT_CPP_COMPILER) +-endif +-endif + else + alfas_functions=alfas_functions + llhapdf= +@@ -119,4 +129,207 @@ endif + # Helper function to check MG5 version + define CHECK_MG5AMC_VERSION + python -c 'import re; from distutils.version import StrictVersion; print StrictVersion("$(MG5AMC_VERSION)") >= StrictVersion("$(1)") if re.match("^[\d\.]+$$","$(MG5AMC_VERSION)") else True;' +-endef +\ No newline at end of file ++endef ++ ++#------------------------------------------------------------------------------- ++ ++# Set special cases for non-gcc/clang builds ++# AVX below gets overridden from outside in architecture-specific builds ++AVX ?= none ++# [NB MGONGPU_PVW512 is needed because "-mprefer-vector-width=256" is not exposed in a macro] ++# [See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96476] ++$(info AVX=$(AVX)) ++ifeq ($(UNAME_P),arm) ++ ifeq ($(AVX),sse4) ++ override AVXFLAGS = -D__SSE4_2__ # ARM NEON with 128 width (Q/quadword registers) ++ endif ++else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 ++ ifeq ($(AVX),none) ++ override AVXFLAGS = -mno-sse3 # no SIMD ++ else ifeq ($(AVX),sse4) ++ override AVXFLAGS = -mno-avx # SSE4.2 with 128 width (xmm registers) ++ else ifeq ($(AVX),avx2) ++ override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] ++ else ifeq ($(AVX),512y) ++ override AVXFLAGS = -march=skylake -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] ++ else ifeq ($(AVX),512z) ++ override AVXFLAGS = -march=skylake -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) ++ else ++ $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) ++ endif ++endif ++ ++# For the moment, use AVXFLAGS everywhere: eventually, use them only in encapsulated implementations? ++MG_CXXFLAGS+= $(AVXFLAGS) ++ ++#------------------------------------------------------------------------------- ++ ++#=== Configure the CUDA compiler if available ++ ++# If CXX is not a single word (example "clang++ --gcc-toolchain...") then disable CUDA builds (issue #505) ++# This is because it is impossible to pass this to "CUFLAGS += -ccbin " below ++ifneq ($(words $(subst ccache ,,$(CXX))),1) # allow at most "CXX=ccache " from outside ++ $(warning CUDA builds are not supported for multi-word CXX "$(CXX)") ++ override CUDA_HOME=disabled ++endif ++ ++# If CUDA_HOME is not set, try to set it from the location of nvcc ++ifndef CUDA_HOME ++ CUDA_HOME = $(patsubst %bin/nvcc,%,$(shell which nvcc 2>/dev/null)) ++ $(info CUDA_HOME="$(CUDA_HOME)") ++endif ++ ++# Set NVCC as $(CUDA_HOME)/bin/nvcc if it exists ++ifneq ($(wildcard $(CUDA_HOME)/bin/nvcc),) ++ NVCC = $(CUDA_HOME)/bin/nvcc ++ USE_NVTX ?=-DUSE_NVTX ++ # See https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html ++ # See https://arnon.dk/matching-sm-architectures-arch-and-gencode-for-various-nvidia-cards/ ++ # Default: use compute capability 70 (Volta architecture), and embed PTX to support later architectures, too. ++ # Set MADGRAPH_CUDA_ARCHITECTURE to the desired value to change the default. ++ # Build for multiple architectures using a space-separated list, e.g. MADGRAPH_CUDA_ARCHITECTURE="70 80" ++ MADGRAPH_CUDA_ARCHITECTURE ?= 70 ++ # Generate PTX for the first architecture: ++ CUARCHFLAGS := --generate-code arch=compute_$(firstword $(MADGRAPH_CUDA_ARCHITECTURE)),code=compute_$(firstword $(MADGRAPH_CUDA_ARCHITECTURE)) ++ # Generate device code for all architectures: ++ CUARCHFLAGS += $(foreach arch,$(MADGRAPH_CUDA_ARCHITECTURE), --generate-code arch=compute_$(arch),code=sm_$(arch)) ++ ++ CUINC = -I$(CUDA_HOME)/include/ ++ CURANDLIBFLAGS = -L$(CUDA_HOME)/lib64/ -lcurand # NB: -lcuda is not needed here! ++ MG_LDFLAGS += $(CURANDLIBFLAGS) ++ MG_NVCCFLAGS += $(CUINC) $(USE_NVTX) $(CUARCHFLAGS) ++ ++else ifeq ($(AVX),cuda) ++ $(error nvcc is not visible in PATH. Either add it to PATH or export CUDA_HOME to compile with cuda) ++ ifeq ($(AVX),cuda) ++ $(error Cannot compile for cuda without NVCC) ++ endif ++endif ++ ++# Set the host C++ compiler for nvcc via "-ccbin " ++# (NB issue #505: this must be a single word, "clang++ --gcc-toolchain..." is not supported) ++MG_NVCCFLAGS += -ccbin $(shell which $(subst ccache ,,$(CXX))) ++ ++# Allow newer (unsupported) C++ compilers with older versions of CUDA if ALLOW_UNSUPPORTED_COMPILER_IN_CUDA is set (#504) ++ifneq ($(origin ALLOW_UNSUPPORTED_COMPILER_IN_CUDA),undefined) ++MG_NVCCFLAGS += -allow-unsupported-compiler ++endif ++ ++#------------------------------------------------------------------------------- ++ ++#=== Configure ccache for C++ and CUDA builds ++ ++# Enable ccache if USECCACHE=1 ++ifeq ($(USECCACHE)$(shell echo $(CXX) | grep ccache),1) ++ override CXX:=ccache $(CXX) ++endif ++ ++ifneq ($(NVCC),) ++ ifeq ($(USECCACHE)$(shell echo $(NVCC) | grep ccache),1) ++ override NVCC:=ccache $(NVCC) ++ endif ++endif ++ ++#------------------------------------------------------------------------------- ++ ++#=== Configure PowerPC-specific compiler flags for C++ and CUDA ++ ++# PowerPC-specific CXX / CUDA compiler flags (being reviewed) ++ifeq ($(UNAME_P),ppc64le) ++ MG_CXXFLAGS+= -mcpu=power9 -mtune=power9 # gains ~2-3% both for none and sse4 ++ MG_NVCCFLAGS+= -Xcompiler -mno-float128 ++ ++ ifeq ($(AVX),sse4) ++ override AVXFLAGS = -D__SSE4_2__ # Power9 VSX with 128 width (VSR registers) ++ endif ++endif ++ ++#------------------------------------------------------------------------------- ++#=== Apple-specific compiler/linker options ++ ++# Add -std=c++17 explicitly to avoid build errors on macOS ++# Add -mmacosx-version-min=11.3 to avoid "ld: warning: object file was built for newer macOS version than being linked" ++ifneq ($(shell $(CXX) --version | egrep '^Apple clang'),) ++MG_CXXFLAGS += -std=c++17 -mmacosx-version-min=11.3 ++endif ++ ++ifeq ($(UNAME_S),Darwin) ++STDLIB = -lc++ # avoid 'Undefined symbols' for chrono::steady_clock on macOS (checked with otool -L libmg5amc_gg_ttx_cpp.so) ++MG_LDFLAGS += -mmacosx-version-min=11.3 # avoid "ld: warning: object file was built for newer macOS version than being linked" ++else ++MG_LDFLAGS += -Xlinker --no-relax # avoid 'failed to convert GOTPCREL relocation' error #458 (not supported on macOS) ++endif ++ ++#------------------------------------------------------------------------------- ++ ++#=== C++/CUDA-specific flags for floating-point types and random generators to use ++ ++# Set the default FPTYPE (floating point type) choice ++FPTYPE ?= d ++ ++# Set the default HELINL (inline helicities?) choice ++HELINL ?= 0 ++ ++# Set the default HRDCOD (hardcode cIPD physics parameters?) choice ++HRDCOD ?= 0 ++ ++# Set the default RNDGEN (random number generator) choice ++ifeq ($(NVCC),) ++ RNDGEN ?= hasNoCurand ++else ++ RNDGEN ?= hasCurand ++endif ++ ++# Export AVX, FPTYPE, HELINL, HRDCOD, RNDGEN, OMPFLAGS so sub-makes don't go back to the defaults ++export AVX ++export AVXFLAGS ++export FPTYPE ++export HELINL ++export HRDCOD ++export RNDGEN ++ ++#=== Set the CUDA/C++ compiler flags appropriate to user-defined choices of AVX, FPTYPE, HELINL, HRDCOD, RNDGEN ++ ++# Set the build flags appropriate to each FPTYPE choice (example: "make FPTYPE=f") ++# $(info FPTYPE=$(FPTYPE)) ++ifeq ($(FPTYPE),d) ++ COMMONFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_DOUBLE ++else ifeq ($(FPTYPE),f) ++ COMMONFLAGS += -DMGONGPU_FPTYPE_FLOAT -DMGONGPU_FPTYPE2_FLOAT ++else ifeq ($(FPTYPE),m) ++ COMMONFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_FLOAT ++else ++ $(error Unknown FPTYPE='$(FPTYPE)': only 'd', 'f' and 'm' are supported) ++endif ++ ++# Set the build flags appropriate to each HELINL choice (example: "make HELINL=1") ++# $(info HELINL=$(HELINL)) ++ifeq ($(HELINL),1) ++ COMMONFLAGS += -DMGONGPU_INLINE_HELAMPS ++else ifneq ($(HELINL),0) ++ $(error Unknown HELINL='$(HELINL)': only '0' and '1' are supported) ++endif ++ ++# Set the build flags appropriate to each HRDCOD choice (example: "make HRDCOD=1") ++# $(info HRDCOD=$(HRDCOD)) ++ifeq ($(HRDCOD),1) ++ COMMONFLAGS += -DMGONGPU_HARDCODE_PARAM ++else ifneq ($(HRDCOD),0) ++ $(error Unknown HRDCOD='$(HRDCOD)': only '0' and '1' are supported) ++endif ++ ++# Set the build flags appropriate to each RNDGEN choice (example: "make RNDGEN=hasNoCurand") ++$(info RNDGEN=$(RNDGEN)) ++ifeq ($(RNDGEN),hasNoCurand) ++ override CXXFLAGSCURAND = -DMGONGPU_HAS_NO_CURAND ++ override CURANDLIBFLAGS = ++else ifeq ($(RNDGEN),hasCurand) ++ CXXFLAGSCURAND = $(CUINC) ++else ++ $(error Unknown RNDGEN='$(RNDGEN)': only 'hasCurand' and 'hasNoCurand' are supported) ++endif ++ ++MG_CXXFLAGS += $(COMMONFLAGS) ++MG_NVCCFLAGS += $(COMMONFLAGS) ++ ++#------------------------------------------------------------------------------- diff --git b/epochX/cudacpp/gg_tt.mad/Source/makefile a/epochX/cudacpp/gg_tt.mad/Source/makefile -index 617f10b93..00c73099a 100644 +index 617f10b93..407b1b753 100644 --- b/epochX/cudacpp/gg_tt.mad/Source/makefile +++ a/epochX/cudacpp/gg_tt.mad/Source/makefile -@@ -120,7 +120,7 @@ $(LIBDIR)libiregi.a: $(IREGIDIR) - cd $(IREGIDIR); make - ln -sf ../Source/$(IREGIDIR)libiregi.a $(LIBDIR)libiregi.a - --clean: -+cleanSource: - $(RM) *.o $(LIBRARIES) $(BINARIES) - cd PDF; make clean; cd .. - cd PDF/gammaUPC; make clean; cd ../../ -@@ -132,4 +132,11 @@ clean: +@@ -10,8 +10,8 @@ include make_opts + + # Source files + +-PROCESS= hfill.o matrix.o myamp.o +-DSAMPLE = dsample.o ranmar.o DiscreteSampler.o StringCast.o ++PROCESS = hfill.o matrix.o myamp.o ++DSAMPLE = dsample.o ranmar.o DiscreteSampler.o StringCast.o + HBOOK = hfill.o hcurve.o hbook1.o hbook2.o + GENERIC = $(alfas_functions).o transpole.o invarients.o hfill.o pawgraphs.o ran1.o \ + rw_events.o rw_routines.o kin_functions.o open_file.o basecode.o setrun.o \ +@@ -22,7 +22,7 @@ GENSUDGRID = gensudgrid.o is-sud.o setrun_gen.o rw_routines.o open_file.o + + # Locally compiled libraries + +-LIBRARIES=$(LIBDIR)libdsample.$(libext) $(LIBDIR)libgeneric.$(libext) ++LIBRARIES=$(LIBDIR)libdsample.$(libext) $(LIBDIR)libgeneric.$(libext) + + # Binaries + +@@ -32,6 +32,9 @@ BINARIES = $(BINDIR)gen_ximprove $(BINDIR)gensudgrid $(BINDIR)combine_runs + + all: $(LIBRARIES) $(LIBDIR)libdhelas.$(libext) $(LIBDIR)libpdf.$(libext) $(LIBDIR)libgammaUPC.$(libext) $(LIBDIR)libmodel.$(libext) $(LIBDIR)libcernlib.$(libext) $(LIBDIR)libbias.$(libext) + ++%.o: %.f *.inc ++ $(FC) -I. $(MG_FCFLAGS) $(FCFLAGS) -c $< -o $@ ++ + # Libraries + + $(LIBDIR)libdsample.$(libext): $(DSAMPLE) +@@ -39,36 +42,35 @@ $(LIBDIR)libdsample.$(libext): $(DSAMPLE) + $(LIBDIR)libgeneric.$(libext): $(GENERIC) + $(call CREATELIB, $@, $^) + $(LIBDIR)libdhelas.$(libext): DHELAS +- cd DHELAS; make; cd .. ++ $(MAKE) -C $< FFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" FCFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" + $(LIBDIR)libpdf.$(libext): PDF make_opts +- cd PDF; make; cd .. ++ $(MAKE) -C $< FFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" FCFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" + ifneq (,$(filter edff chff, $(pdlabel1) $(pdlabel2))) + $(LIBDIR)libgammaUPC.$(libext): PDF/gammaUPC +- cd PDF/gammaUPC; make ; cd ../../ ++ $(MAKE) -C $< FFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" FCFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" + else + $(LIBDIR)libgammaUPC.$(libext): PDF/gammaUPC +- cd PDF/gammaUPC; make -f makefile_dummy; cd ../../ +-endif ++ $(MAKE) -C $< -f makefile_dummy FFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" FCFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" ++endif + $(LIBDIR)libcernlib.$(libext): CERNLIB +- cd CERNLIB; make; cd .. ++ $(MAKE) -C $< FFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" FCFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" + # The bias library is here the dummy by default; compilation of other ones specified in the run_card will be done by MG5aMC directly. + $(LIBDIR)libbias.$(libext): BIAS/dummy +- cd BIAS/dummy; make; cd ../../ ++ $(MAKE) -C $< FFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" FCFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" + + $(LIBDIR)libmodel.$(libext): MODEL param_card.inc +- cd MODEL; make ++ $(MAKE) -C $< FFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" FCFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" + param_card.inc: ../Cards/param_card.dat + ../bin/madevent treatcards param ++ touch $@ # madevent doesn't update the time stamp if there's nothing to do + + + + +-$(BINDIR)gen_ximprove: gen_ximprove.o ranmar.o rw_routines.o open_file.o +- $(FC) $(LDFLAGS) -o $@ $^ +-#$(BINDIR)combine_events: $(COMBINE) $(LIBDIR)libmodel.$(libext) $(LIBDIR)libpdf.$(libext) $(LIBDIR)libgammaUPC.$(libext) run_card.inc $(LIBDIR)libbias.$(libext) +-# $(FC) -o $@ $(COMBINE) -L$(LIBDIR) -lmodel -lpdf -lgammaUPC $(llhapdf) $(LDFLAGS) -lbias ++$(BINDIR)gen_ximprove: gen_ximprove.o ranmar.o rw_routines.o open_file.o ++ $(FC) $(MG_LDFLAGS) $(LDFLAGS) -o $@ $^ + $(BINDIR)gensudgrid: $(GENSUDGRID) $(LIBDIR)libpdf.$(libext) $(LIBDIR)libgammaUPC.$(libext) $(LIBDIR)libcernlib.$(libext) +- $(FC) -o $@ $(GENSUDGRID) -L$(LIBDIR) -lmodel -lpdf -lgammaUPC -lcernlib $(llhapdf) $(LDFLAGS) ++ $(FC) -o $@ $(GENSUDGRID) -L$(LIBDIR) -lmodel -lpdf -lgammaUPC -lcernlib $(llhapdf) $(MG_LDFLAGS) $(LDFLAGS) + + # Dependencies + +@@ -85,6 +87,7 @@ rw_events.o: rw_events.f run_config.inc + + run_card.inc: ../Cards/run_card.dat + ../bin/madevent treatcards run ++ touch $@ # madevent doesn't update the time stamp if there's nothing to do + + clean4pdf: + rm -f ../lib/libpdf.$(libext) +@@ -132,4 +135,3 @@ clean: cd BIAS/ptj_bias; make clean; cd ../.. if [ -d $(CUTTOOLSDIR) ]; then cd $(CUTTOOLSDIR); make clean; cd ..; fi if [ -d $(IREGIDIR) ]; then cd $(IREGIDIR); make clean; cd ..; fi -+ -+clean: cleanSource - for i in `ls -d ../SubProcesses/P*`; do cd $$i; make clean; cd -; done; -+ -+cleanavx: -+ for i in `ls -d ../SubProcesses/P*`; do cd $$i; make cleanavxs; cd -; done; -+cleanall: cleanSource # THIS IS THE ONE -+ for i in `ls -d ../SubProcesses/P*`; do cd $$i; make cleanavxs; cd -; done; +- for i in `ls -d ../SubProcesses/P*`; do cd $$i; make clean; cd -; done; diff --git b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile -index 348c283be..65369d610 100644 +index 348c283be..4cadaecf0 100644 --- b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile +++ a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile -@@ -1,6 +1,28 @@ +@@ -1,5 +1,30 @@ +-include ../../Source/make_opts +-FFLAGS+= -w +SHELL := /bin/bash + - include ../../Source/make_opts - FFLAGS+= -w - ++# Include general setup ++OPTIONS_MAKEFILE := ../../Source/make_opts ++include $(OPTIONS_MAKEFILE) ++ +# Enable the C preprocessor https://gcc.gnu.org/onlinedocs/gfortran/Preprocessing-Options.html -+FFLAGS+= -cpp ++MG_FCFLAGS += -cpp ++MG_CXXFLAGS += -I. + -+# Compile counters with -O3 as in the cudacpp makefile (avoid being "unfair" to Fortran #740) -+CXXFLAGS = -O3 -Wall -Wshadow -Wextra ++all: help cppnative ++ ++# Target if user does not specify target ++help: ++ $(info No target specified.) ++ $(info Viable targets are 'cppnative' (default), 'cppnone', 'cppsse4', 'cppavx2', 'cpp512y', 'cpp512z' and 'cuda') ++ $(info Or 'cppall' for all C++ targets) ++ $(info Or 'ALL' for all C++ and cuda targets) + -+# Add -std=c++17 explicitly to avoid build errors on macOS -+# Add -mmacosx-version-min=11.3 to avoid "ld: warning: object file was built for newer macOS version than being linked" -+ifneq ($(shell $(CXX) --version | egrep '^Apple clang'),) -+CXXFLAGS += -std=c++17 -mmacosx-version-min=11.3 -+endif + +# Enable ccache if USECCACHE=1 +ifeq ($(USECCACHE)$(shell echo $(CXX) | grep ccache),1) @@ -66,39 +512,39 @@ index 348c283be..65369d610 100644 +ifeq ($(USECCACHE)$(shell echo $(FC) | grep ccache),1) + override FC:=ccache $(FC) +endif -+ + # Load additional dependencies of the bias module, if present ifeq (,$(wildcard ../bias_dependencies)) - BIASDEPENDENCIES = -@@ -24,7 +46,26 @@ else +@@ -24,15 +49,25 @@ else MADLOOP_LIB = endif -LINKLIBS = $(LINK_MADLOOP_LIB) $(LINK_LOOP_LIBS) -L../../lib/ -ldhelas -ldsample -lmodel -lgeneric -lpdf -lgammaUPC -lcernlib $(llhapdf) -lbias -+LINKLIBS = $(LINK_MADLOOP_LIB) $(LINK_LOOP_LIBS) -L$(LIBDIR) -ldhelas -ldsample -lmodel -lgeneric -lpdf -lcernlib $(llhapdf) -lbias -+ -+processid_short=$(shell basename $(CURDIR) | awk -F_ '{print $$(NF-1)"_"$$NF}') -+CUDACPP_MAKEFILE=cudacpp.mk -+# NB1 Using ":=" below instead of "=" is much faster (it only runs the subprocess once instead of many times) -+# NB2 Use '|&' in CUDACPP_BUILDDIR to avoid confusing errors about googletest #507 -+# NB3 Do not add a comment inlined "CUDACPP_BUILDDIR=$(shell ...) # comment" as otherwise a trailing space is included... -+# NB4 The variables relevant to the cudacpp Makefile must be explicitly passed to $(shell...) -+CUDACPP_MAKEENV:=$(shell echo '$(.VARIABLES)' | tr " " "\n" | egrep "(USEBUILDDIR|AVX|FPTYPE|HELINL|HRDCOD)") -+###$(info CUDACPP_MAKEENV=$(CUDACPP_MAKEENV)) -+###$(info $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))")) -+CUDACPP_BUILDDIR:=$(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn 2>&1 | awk '/Building/{print $$3}' | sed s/BUILDDIR=//) -+ifeq ($(CUDACPP_BUILDDIR),) -+$(error CUDACPP_BUILDDIR='$(CUDACPP_BUILDDIR)' should not be empty!) -+else -+$(info CUDACPP_BUILDDIR='$(CUDACPP_BUILDDIR)') +- ++LINKLIBS = $(LINK_MADLOOP_LIB) $(LINK_LOOP_LIBS) -L$(LIBDIR) -ldhelas -ldsample -lmodel -lgeneric -lpdf -lcernlib $(llhapdf) -lbias + LIBS = $(LIBDIR)libbias.$(libext) $(LIBDIR)libdhelas.$(libext) $(LIBDIR)libdsample.$(libext) $(LIBDIR)libgeneric.$(libext) $(LIBDIR)libpdf.$(libext) $(LIBDIR)libgammaUPC.$(libext) $(LIBDIR)libmodel.$(libext) $(LIBDIR)libcernlib.$(libext) $(MADLOOP_LIB) $(LOOP_LIBS) + + ifneq ("$(wildcard ../../Source/RUNNING)","") + LINKLIBS += -lrunning +- LIBS += $(LIBDIR)librunning.$(libext) ++ LIBS += $(LIBDIR)librunning.$(libext) +endif -+CUDACPP_COMMONLIB=mg5amc_common -+CUDACPP_CXXLIB=mg5amc_$(processid_short)_cpp -+CUDACPP_CULIB=mg5amc_$(processid_short)_cuda ++ ++SOURCEDIR_GUARD:=../../Source/.timestamp_guard ++# We use $(SOURCEDIR_GUARD) to figure out if Source is out of date. The Source makefile doesn't correctly ++# update all files, so we need a proxy that is updated every time we run "$(MAKE) -C ../../Source". ++$(SOURCEDIR_GUARD) ../../Source/discretesampler.mod &: ../../Source/*.f ../../Cards/param_card.dat ../../Cards/run_card.dat ++ifneq ($(shell which flock 2>/dev/null),) ++ flock ../../Source/.lock -c "$(MAKE) -C ../../Source; touch $(SOURCEDIR_GUARD)" ++else ++ $(MAKE) -C ../../Source; touch $(SOURCEDIR_GUARD) + endif - LIBS = $(LIBDIR)libbias.$(libext) $(LIBDIR)libdhelas.$(libext) $(LIBDIR)libdsample.$(libext) $(LIBDIR)libgeneric.$(libext) $(LIBDIR)libpdf.$(libext) $(LIBDIR)libgammaUPC.$(libext) $(LIBDIR)libmodel.$(libext) $(LIBDIR)libcernlib.$(libext) $(MADLOOP_LIB) $(LOOP_LIBS) ++$(LIBS): $(SOURCEDIR_GUARD) + + # Source files -@@ -43,41 +84,117 @@ ifeq ($(strip $(MATRIX_HEL)),) +@@ -43,41 +78,105 @@ ifeq ($(strip $(MATRIX_HEL)),) endif @@ -111,242 +557,12389 @@ index 348c283be..65369d610 100644 + +DSIG=driver.o $(patsubst %.f, %.o, $(filter-out auto_dsig.f, $(wildcard auto_dsig*.f))) +DSIG_cudacpp=driver_cudacpp.o $(patsubst %.f, %_cudacpp.o, $(filter-out auto_dsig.f, $(wildcard auto_dsig*.f))) - - SYMMETRY = symmetry.o idenparts.o - - # Binaries - --$(PROG): $(PROCESS) auto_dsig.o $(LIBS) $(MATRIX) -- $(FC) -o $(PROG) $(PROCESS) $(MATRIX) $(LINKLIBS) $(LDFLAGS) $(BIASDEPENDENCIES) -fopenmp -+ifeq ($(UNAME),Darwin) -+LDFLAGS += -lc++ # avoid 'Undefined symbols' for chrono::steady_clock on macOS (checked with otool -L libmg5amc_gg_ttx_cpp.so) -+LDFLAGS += -mmacosx-version-min=11.3 # avoid "ld: warning: object file was built for newer macOS version than being linked" -+else -+LDFLAGS += -Wl,--no-relax # avoid 'failed to convert GOTPCREL relocation' error #458 (not supported on macOS) ++ ++SYMMETRY = symmetry.o idenparts.o ++ ++# cudacpp targets: ++CUDACPP_MAKEFILE := cudacpp.mk ++ifneq (,$(wildcard $(CUDACPP_MAKEFILE))) ++include $(CUDACPP_MAKEFILE) +endif - --$(PROG)_forhel: $(PROCESS) auto_dsig.o $(LIBS) $(MATRIX_HEL) -- $(FC) -o $(PROG)_forhel $(PROCESS) $(MATRIX_HEL) $(LINKLIBS) $(LDFLAGS) $(BIASDEPENDENCIES) -fopenmp -+all: $(PROG)_fortran $(CUDACPP_BUILDDIR)/$(PROG)_cpp # also builds $(PROG)_cuda if $(CUDACPP_CULIB) exists (#503) - --gensym: $(SYMMETRY) configs.inc $(LIBS) -- $(FC) -o gensym $(SYMMETRY) -L../../lib/ $(LINKLIBS) $(LDFLAGS) ++ ++ifeq ($(CUDACPP_BUILDDIR),) ++$(error CUDACPP_BUILDDIR='$(CUDACPP_BUILDDIR)' should not be empty!) ++endif ++CUDACPP_COMMONLIB=mg5amc_common ++CUDACPP_CXXLIB := $(CUDACPP_BUILDDIR)/lib$(MG5AMC_CXXLIB).so ++CUDACPP_CULIB := $(CUDACPP_BUILDDIR)/lib$(MG5AMC_CULIB).so ++ ++ ++# Set up OpenMP if supported ++OMPFLAGS ?= -fopenmp +ifneq ($(shell $(CXX) --version | egrep '^Intel'),) -+override OMPFLAGS = -fopenmp +LINKLIBS += -liomp5 # see #578 +LINKLIBS += -lintlc # undefined reference to `_intel_fast_memcpy' +else ifneq ($(shell $(CXX) --version | egrep '^clang'),) -+override OMPFLAGS = -fopenmp +$(CUDACPP_BUILDDIR)/$(PROG)_cpp: LINKLIBS += -L $(shell dirname $(shell $(CXX) -print-file-name=libc++.so)) -lomp # see #604 +else ifneq ($(shell $(CXX) --version | egrep '^Apple clang'),) -+override OMPFLAGS = # OMP is not supported yet by cudacpp for Apple clang -+else -+override OMPFLAGS = -fopenmp ++OMPFLAGS = # OMP is not supported yet by cudacpp for Apple clang +endif -+ -+$(PROG)_fortran: $(PROCESS) $(DSIG) auto_dsig.o $(LIBS) $(MATRIX) counters.o ompnumthreads.o -+ $(FC) -o $(PROG)_fortran $(PROCESS) $(DSIG) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o $(LDFLAGS) --$(LIBDIR)libmodel.$(libext): ../../Cards/param_card.dat -- cd ../../Source/MODEL; make -+$(LIBS): .libs +-SYMMETRY = symmetry.o idenparts.o --$(LIBDIR)libgeneric.$(libext): ../../Cards/run_card.dat -+.libs: ../../Cards/param_card.dat ../../Cards/run_card.dat - cd ../../Source; make -+ touch $@ -+ -+$(CUDACPP_BUILDDIR)/.cudacpplibs: -+ $(MAKE) -f $(CUDACPP_MAKEFILE) -+ touch $@ -+ + # Binaries + +-$(PROG): $(PROCESS) auto_dsig.o $(LIBS) $(MATRIX) +- $(FC) -o $(PROG) $(PROCESS) $(MATRIX) $(LINKLIBS) $(LDFLAGS) $(BIASDEPENDENCIES) -fopenmp ++$(PROG)_fortran: $(PROCESS) $(DSIG) auto_dsig.o $(LIBS) $(MATRIX) counters.o ompnumthreads.o ++ $(FC) $(MG_FCFLAGS) $(FCFLAGS) -o $(PROG)_fortran $(PROCESS) $(DSIG) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o $(LDFLAGS) + +-$(PROG)_forhel: $(PROCESS) auto_dsig.o $(LIBS) $(MATRIX_HEL) +- $(FC) -o $(PROG)_forhel $(PROCESS) $(MATRIX_HEL) $(LINKLIBS) $(LDFLAGS) $(BIASDEPENDENCIES) -fopenmp +# On Linux, set rpath to LIBDIR to make it unnecessary to use LD_LIBRARY_PATH +# Use relative paths with respect to the executables ($ORIGIN on Linux) +# On Darwin, building libraries with absolute paths in LIBDIR makes this unnecessary -+ifeq ($(UNAME_S),Darwin) -+ override LIBFLAGSRPATH = -+else ifeq ($(USEBUILDDIR),1) -+ override LIBFLAGSRPATH = -Wl,-rpath,'$$ORIGIN/../$(LIBDIR)/$(CUDACPP_BUILDDIR)' -+else -+ override LIBFLAGSRPATH = -Wl,-rpath,'$$ORIGIN/$(LIBDIR)' ++ifneq ($(UNAME_S),Darwin) ++ LIBFLAGSRPATH := -Wl,-rpath,'$$ORIGIN:$$ORIGIN/../$(LIBDIR)/$(CUDACPP_BUILDDIR)' +endif -+ -+.PHONY: madevent_fortran_link madevent_cuda_link madevent_cpp_link + +-gensym: $(SYMMETRY) configs.inc $(LIBS) +- $(FC) -o gensym $(SYMMETRY) -L../../lib/ $(LINKLIBS) $(LDFLAGS) ++.PHONY: madevent_fortran_link madevent_cuda_link madevent_cpp_link madevent_cppnone_link madevent_cppsse4_link madevent_cppavx2_link madevent_cpp512y_link madevent_cpp512z_link + +madevent_fortran_link: $(PROG)_fortran + rm -f $(PROG) + ln -s $(PROG)_fortran $(PROG) - --$(LIBDIR)libpdf.$(libext): -- cd ../../Source/PDF; make -+madevent_cpp_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp -+ rm -f $(PROG) -+ ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) - --$(LIBDIR)libgammaUPC.$(libext): -- cd ../../Source/PDF/gammaUPC; make -+madevent_cuda_link: $(CUDACPP_BUILDDIR)/$(PROG)_cuda -+ rm -f $(PROG) -+ ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cuda $(PROG) + -+# Building $(PROG)_cpp also builds $(PROG)_cuda if $(CUDACPP_CULIB) exists (improved patch for cpp-only builds #503) -+$(CUDACPP_BUILDDIR)/$(PROG)_cpp: $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(LIBS) $(MATRIX) counters.o ompnumthreads.o $(CUDACPP_BUILDDIR)/.cudacpplibs -+ $(FC) -o $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o -L$(LIBDIR)/$(CUDACPP_BUILDDIR) -l$(CUDACPP_COMMONLIB) -l$(CUDACPP_CXXLIB) $(LIBFLAGSRPATH) $(LDFLAGS) -+ if [ -f $(LIBDIR)/$(CUDACPP_BUILDDIR)/lib$(CUDACPP_CULIB).* ]; then $(FC) -o $(CUDACPP_BUILDDIR)/$(PROG)_cuda $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o -L$(LIBDIR)/$(CUDACPP_BUILDDIR) -l$(CUDACPP_COMMONLIB) -l$(CUDACPP_CULIB) $(LIBFLAGSRPATH) $(LDFLAGS); fi ++madevent_cppnone_link: AVX=none ++madevent_cppnone_link: cppnone ++ ln -sf $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) + -+$(CUDACPP_BUILDDIR)/$(PROG)_cuda: $(CUDACPP_BUILDDIR)/$(PROG)_cpp ++madevent_cppavx2_link: AVX=avx2 ++madevent_cppavx2_link: cppavx2 ++ ln -sf $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) + -+counters.o: counters.cc timer.h -+ $(CXX) $(CXXFLAGS) -c $< -o $@ ++madevent_cpp512y_link: AVX=512y ++madevent_cpp512y_link: cppavx512y ++ ln -sf $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) + -+ompnumthreads.o: ompnumthreads.cc ompnumthreads.h -+ $(CXX) -I. $(CXXFLAGS) $(OMPFLAGS) -c $< -o $@ ++madevent_cpp512z_link: AVX=512z ++madevent_cpp512z_link: cppavx512z ++ ln -sf $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) + ++madevent_cuda_link: AVX=cuda ++madevent_cuda_link: cuda ++ ln -sf $(CUDACPP_BUILDDIR)/$(PROG)_cuda $(PROG) ++ ++$(CUDACPP_BUILDDIR)/$(PROG)_cpp: $(LIBS) $(CUDACPP_CXXLIB) $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) counters.o ompnumthreads.o ++ $(FC) -o $(CUDACPP_BUILDDIR)/$(PROG)_cpp -L$(LIBDIR)/$(CUDACPP_BUILDDIR) -l$(CUDACPP_COMMONLIB) $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o -L$(CUDACPP_BUILDDIR) -l$(MG5AMC_CXXLIB) $(LIBFLAGSRPATH) $(MG_LDFLAGS) $(LDFLAGS) ++ ++$(CUDACPP_BUILDDIR)/$(PROG)_cuda: $(LIBS) $(CUDACPP_CULIB) $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) counters.o ompnumthreads.o ++ $(FC) -o $(CUDACPP_BUILDDIR)/$(PROG)_cuda -L$(LIBDIR)/$(CUDACPP_BUILDDIR) -l$(CUDACPP_COMMONLIB) $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o -L$(CUDACPP_BUILDDIR) -l$(MG5AMC_CULIB) $(LIBFLAGSRPATH) $(MG_LDFLAGS) $(LDFLAGS) + +-$(LIBDIR)libmodel.$(libext): ../../Cards/param_card.dat +- cd ../../Source/MODEL; make ++counters.o: counters.cc timer.h ++ $(CXX) $(MG_CXXFLAGS) $(CXXFLAGS) -c $< -o $@ + +-$(LIBDIR)libgeneric.$(libext): ../../Cards/run_card.dat +- cd ../../Source; make ++ompnumthreads.o: ompnumthreads.cc ompnumthreads.h ++ $(CXX) $(MG_CXXFLAGS) $(CXXFLAGS) $(OMPFLAGS) -c $< -o $@ + +-$(LIBDIR)libpdf.$(libext): +- cd ../../Source/PDF; make +$(PROG)_forhel: $(PROCESS) auto_dsig.o $(LIBS) $(MATRIX_HEL) + $(FC) -o $(PROG)_forhel $(PROCESS) $(MATRIX_HEL) $(LINKLIBS) $(LDFLAGS) $(BIASDEPENDENCIES) $(OMPFLAGS) + +gensym: $(SYMMETRY) configs.inc $(LIBS) + $(FC) -o gensym $(SYMMETRY) -L$(LIBDIR) $(LINKLIBS) $(LDFLAGS) -+ -+###ifeq (,$(wildcard fbridge.inc)) # Pointless: fbridge.inc always exists as this is the cudacpp-modified makefile! -+###$(LIBDIR)libmodel.$(libext): ../../Cards/param_card.dat -+### cd ../../Source/MODEL; make -+### -+###$(LIBDIR)libgeneric.$(libext): ../../Cards/run_card.dat -+### cd ../../Source; make -+### -+###$(LIBDIR)libpdf.$(libext): -+### cd ../../Source/PDF; make -+### -+###$(LIBDIR)libgammaUPC.$(libext): -+### cd ../../Source/PDF/gammaUPC; make -+###endif + +-$(LIBDIR)libgammaUPC.$(libext): +- cd ../../Source/PDF/gammaUPC; make # Add source so that the compiler finds the DiscreteSampler module. $(MATRIX): %.o: %.f - $(FC) $(FFLAGS) $(MATRIX_FLAG) -c $< -I../../Source/ -I../../Source/PDF/gammaUPC - %.o: %.f - $(FC) $(FFLAGS) -c $< -I../../Source/ -I../../Source/PDF/gammaUPC +- $(FC) $(FFLAGS) $(MATRIX_FLAG) -c $< -I../../Source/ -I../../Source/PDF/gammaUPC +-%.o: %.f +- $(FC) $(FFLAGS) -c $< -I../../Source/ -I../../Source/PDF/gammaUPC ++ $(FC) $(MG_FCFLAGS) $(FCFLAGS) $(MATRIX_FLAG) -c $< -I../../Source/ -I../../Source/PDF/gammaUPC ++%.o $(CUDACPP_BUILDDIR)/%.o: %.f ++ $(FC) $(MG_FCFLAGS) $(FCFLAGS) -I../../Source/ -I../../Source/PDF/gammaUPC -c $< -o $@ +%_cudacpp.o: %.f -+ $(FC) $(FFLAGS) -c -DMG5AMC_MEEXPORTER_CUDACPP $< -I../../Source/ $(OMPFLAGS) -o $@ ++ $(FC) $(MG_FCFLAGS) $(FCFLAGS) -c -DMG5AMC_MEEXPORTER_CUDACPP $< -I../../Source/ $(OMPFLAGS) -o $@ # Dependencies -@@ -97,5 +214,61 @@ unwgt.o: genps.inc nexternal.inc symswap.inc cluster.inc run.inc message.inc \ +@@ -97,5 +196,42 @@ unwgt.o: genps.inc nexternal.inc symswap.inc cluster.inc run.inc message.inc \ run_config.inc initcluster.o: message.inc --clean: -- $(RM) *.o gensym madevent madevent_forhel +# Extra dependencies on discretesampler.mod ++../../Source/discretesampler.mod: ../../Source/DiscreteSampler.f + -+auto_dsig.o: .libs -+driver.o: .libs -+driver_cudacpp.o: .libs -+$(MATRIX): .libs -+genps.o: .libs ++auto_dsig.o: ../../Source/discretesampler.mod ++driver.o: ../../Source/discretesampler.mod ++driver_cudacpp.o: ../../Source/discretesampler.mod ++$(MATRIX): ../../Source/discretesampler.mod ++genps.o: ../../Source/discretesampler.mod + +# Cudacpp avxall targets + -+UNAME_P := $(shell uname -p) +ifeq ($(UNAME_P),ppc64le) -+avxall: avxnone avxsse4 ++cppall: cppnative cppnone cppsse4 +else ifeq ($(UNAME_P),arm) -+avxall: avxnone avxsse4 ++cppall: cppnative cppnone cppsse4 +else -+avxall: avxnone avxsse4 avxavx2 avx512y avx512z ++cppall: cppnative cppnone cppsse4 cppavx2 cppavx512y cppavx512z +endif + -+avxnone: $(PROG)_fortran $(DSIG_cudacpp) -+ @echo -+ $(MAKE) USEBUILDDIR=1 AVX=none ++ALL: cppall cuda + -+avxsse4: $(PROG)_fortran $(DSIG_cudacpp) -+ @echo -+ $(MAKE) USEBUILDDIR=1 AVX=sse4 ++# Clean all architecture-specific builds: + clean: +- $(RM) *.o gensym madevent madevent_forhel ++ $(RM) *.o gensym $(PROG) $(PROG)_* ++ $(RM) -rf build.*/*{.o,.so,.exe,.dylib,madevent_*} + -+avxavx2: $(PROG)_fortran $(DSIG_cudacpp) -+ @echo -+ $(MAKE) USEBUILDDIR=1 AVX=avx2 ++cleanall: ++ for PROCESS in ../P[0-9]*; do $(MAKE) -C $${PROCESS} clean; done + -+avx512y: $(PROG)_fortran $(DSIG_cudacpp) -+ @echo -+ $(MAKE) USEBUILDDIR=1 AVX=512y ++# Clean one architecture-specific build ++clean%: ++ $(RM) -r build.$*_*/*{.o,.so,.exe,.dylib,madevent_*} + -+avx512z: $(PROG)_fortran $(DSIG_cudacpp) -+ @echo -+ $(MAKE) USEBUILDDIR=1 AVX=512z ++# Clean common source directories (interferes with other P*) ++cleansrc: ++ make -C ../../Source clean ++ $(RM) -f $(SOURCEDIR_GUARD) ../../Source/{*.mod,.lock} ../../Source/*/*.mod ++ $(RM) -r $(LIBDIR)libbias.$(libext) ++ if [ -d ../../src ]; then $(MAKE) -C ../../src -f cudacpp_src.mk clean; fi +diff --git b/epochX/cudacpp/gg_tt.mad/bin/internal/banner.py a/epochX/cudacpp/gg_tt.mad/bin/internal/banner.py +index bd1517985..b408679c2 100755 +--- b/epochX/cudacpp/gg_tt.mad/bin/internal/banner.py ++++ a/epochX/cudacpp/gg_tt.mad/bin/internal/banner.py +@@ -2,11 +2,11 @@ + # + # Copyright (c) 2011 The MadGraph5_aMC@NLO Development team and Contributors + # +-# This file is a part of the MadGraph5_aMC@NLO project, an application which ++# This file is a part of the MadGraph5_aMC@NLO project, an application which + # automatically generates Feynman diagrams and matrix elements for arbitrary + # high-energy processes in the Standard Model and beyond. + # +-# It is subject to the MadGraph5_aMC@NLO license which should accompany this ++# It is subject to the MadGraph5_aMC@NLO license which should accompany this + # distribution. + # + # For more information, visit madgraph.phys.ucl.ac.be and amcatnlo.web.cern.ch +@@ -53,7 +53,7 @@ else: + MADEVENT = False + import madgraph.various.misc as misc + import madgraph.iolibs.file_writers as file_writers +- import madgraph.iolibs.files as files ++ import madgraph.iolibs.files as files + import models.check_param_card as param_card_reader + from madgraph import MG5DIR, MadGraph5Error, InvalidCmd + +@@ -80,36 +80,36 @@ class Banner(dict): + 'mgproccard': 'MGProcCard', + 'mgruncard': 'MGRunCard', + 'ma5card_parton' : 'MA5Card_parton', +- 'ma5card_hadron' : 'MA5Card_hadron', ++ 'ma5card_hadron' : 'MA5Card_hadron', + 'mggenerationinfo': 'MGGenerationInfo', + 'mgpythiacard': 'MGPythiaCard', + 'mgpgscard': 'MGPGSCard', + 'mgdelphescard': 'MGDelphesCard', + 'mgdelphestrigger': 'MGDelphesTrigger', + 'mgshowercard': 'MGShowerCard' } +- + -+###endif + forbid_cdata = ['initrwgt'] +- + -+# Clean (NB: 'make clean' in Source calls 'make clean' in all P*) + def __init__(self, banner_path=None): + """ """ + + if isinstance(banner_path, Banner): + dict.__init__(self, banner_path) + self.lhe_version = banner_path.lhe_version +- return ++ return + else: + dict.__init__(self) +- + -+clean: # Clean builds: fortran in this Pn; cudacpp executables for one AVX in this Pn -+ $(RM) *.o gensym $(PROG) $(PROG)_fortran $(PROG)_forhel $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(CUDACPP_BUILDDIR)/$(PROG)_cuda + #Look at the version + if MADEVENT: + self['mgversion'] = '#%s\n' % open(pjoin(MEDIR, 'MGMEVersion.txt')).read() + else: + info = misc.get_pkg_info() + self['mgversion'] = info['version']+'\n' +- + -+cleanavxs: clean # Clean builds: fortran in this Pn; cudacpp for all AVX in this Pn and in src -+ $(MAKE) -f $(CUDACPP_MAKEFILE) cleanall -+ rm -f $(CUDACPP_BUILDDIR)/.cudacpplibs -+ rm -f .libs + self.lhe_version = None + +- + -+cleanall: # Clean builds: fortran in all P* and in Source; cudacpp for all AVX in all P* and in src -+ make -C ../../Source cleanall -+ rm -rf $(LIBDIR)libbias.$(libext) -+ rm -f ../../Source/*.mod ../../Source/*/*.mod + if banner_path: + self.read_banner(banner_path) + +@@ -123,7 +123,7 @@ class Banner(dict): + 'mgruncard':'run_card.dat', + 'mgpythiacard':'pythia_card.dat', + 'mgpgscard' : 'pgs_card.dat', +- 'mgdelphescard':'delphes_card.dat', ++ 'mgdelphescard':'delphes_card.dat', + 'mgdelphestrigger':'delphes_trigger.dat', + 'mg5proccard':'proc_card_mg5.dat', + 'mgproccard': 'proc_card.dat', +@@ -137,10 +137,10 @@ class Banner(dict): + 'mgshowercard':'shower_card.dat', + 'pythia8':'pythia8_card.dat', + 'ma5card_parton':'madanalysis5_parton_card.dat', +- 'ma5card_hadron':'madanalysis5_hadron_card.dat', ++ 'ma5card_hadron':'madanalysis5_hadron_card.dat', + 'run_settings':'' + } +- + -+distclean: cleanall # Clean all fortran and cudacpp builds as well as the googletest installation -+ $(MAKE) -f $(CUDACPP_MAKEFILE) distclean -diff --git b/epochX/cudacpp/gg_tt.mad/bin/internal/gen_ximprove.py a/epochX/cudacpp/gg_tt.mad/bin/internal/gen_ximprove.py -index ebbc1ac1d..a88d60b28 100755 ---- b/epochX/cudacpp/gg_tt.mad/bin/internal/gen_ximprove.py -+++ a/epochX/cudacpp/gg_tt.mad/bin/internal/gen_ximprove.py -@@ -385,8 +385,20 @@ class gensym(object): - done = True - if not done: - raise Exception('Parsing error in gensym: %s' % stdout) -- -- self.cmd.compile(['madevent'], cwd=Pdir) + def read_banner(self, input_path): + """read a banner""" + +@@ -151,7 +151,7 @@ class Banner(dict): + def split_iter(string): + return (x.groups(0)[0] for x in re.finditer(r"([^\n]*\n)", string, re.DOTALL)) + input_path = split_iter(input_path) +- + -+ cudacpp_backend = self.run_card['cudacpp_backend'] # the default value is defined in banner.py -+ logger.info("Building madevent in madevent_interface.py with '%s' matrix elements"%cudacpp_backend) -+ if cudacpp_backend == 'FORTRAN': -+ self.cmd.compile(['madevent_fortran_link'], cwd=Pdir) -+ elif cudacpp_backend == 'CPP': -+ self.cmd.compile(['madevent_cpp_link'], cwd=Pdir) -+ elif cudacpp_backend == 'CUDA': -+ self.cmd.compile(['madevent_cuda_link'], cwd=Pdir) -+ else: -+ raise Exception("Invalid cudacpp_backend='%s': only 'FORTRAN', 'CPP', 'CUDA' are supported") -+ ###logger.info("Building madevent with ALL(FORTRAN/CPP/CUDA) matrix elements (cudacpp_backend=%s)"%cudacpp_backend) -+ ###self.cmd.compile(['all'], cwd=Pdir) + text = '' + store = False + for line in input_path: +@@ -170,13 +170,13 @@ class Banner(dict): + text += line + else: + text += '%s%s' % (line, '\n') +- +- #reaching end of the banner in a event file avoid to read full file + - if to_submit: - self.submit_to_cluster(job_list) - job_list = {} -diff --git b/epochX/cudacpp/gg_tt.mad/bin/internal/madevent_interface.py a/epochX/cudacpp/gg_tt.mad/bin/internal/madevent_interface.py -index 389b93ab8..d72270289 100755 ---- b/epochX/cudacpp/gg_tt.mad/bin/internal/madevent_interface.py -+++ a/epochX/cudacpp/gg_tt.mad/bin/internal/madevent_interface.py -@@ -3614,8 +3614,20 @@ Beware that this can be dangerous for local multicore runs.""") - logger.info(' %s ' % subdir) - - if os.path.exists(pjoin(Pdir, 'ajob1')): -- self.compile(['madevent'], cwd=Pdir) -- ++ #reaching end of the banner in a event file avoid to read full file + if "" in line: + break + elif "" in line: + break +- + -+ cudacpp_backend = self.run_card['cudacpp_backend'] # the default value is defined in banner.py -+ logger.info("Building madevent in madevent_interface.py with '%s' matrix elements"%cudacpp_backend) -+ if cudacpp_backend == 'FORTRAN': -+ self.compile(['madevent_fortran_link'], cwd=Pdir) -+ elif cudacpp_backend == 'CPP': -+ self.compile(['madevent_cpp_link'], cwd=Pdir) -+ elif cudacpp_backend == 'CUDA': -+ self.compile(['madevent_cuda_link'], cwd=Pdir) -+ else: -+ raise Exception("Invalid cudacpp_backend='%s': only 'FORTRAN', 'CPP', 'CUDA' are supported") -+ ###logger.info("Building madevent with ALL (FORTRAN/CPP/CUDA) matrix elements (cudacpp_backend=%s)"%cudacpp_backend) -+ ###self.compile(['all'], cwd=Pdir) + def __getattribute__(self, attr): + """allow auto-build for the run_card/param_card/... """ + try: +@@ -187,23 +187,23 @@ class Banner(dict): + return self.charge_card(attr) + + +- ++ + def change_lhe_version(self, version): + """change the lhe version associate to the banner""" +- ++ + version = float(version) + if version < 3: + version = 1 + elif version > 3: + raise Exception("Not Supported version") + self.lhe_version = version +- ++ + def get_cross(self, witherror=False): + """return the cross-section of the file""" + + if "init" not in self: + raise Exception +- ++ + text = self["init"].split('\n') + cross = 0 + error = 0 +@@ -217,13 +217,13 @@ class Banner(dict): + return cross + else: + return cross, math.sqrt(error) +- ++ + + def scale_init_cross(self, ratio): + """modify the init information with the associate scale""" + + assert "init" in self +- ++ + all_lines = self["init"].split('\n') + new_data = [] + new_data.append(all_lines[0]) +@@ -231,29 +231,29 @@ class Banner(dict): + line = all_lines[i] + split = line.split() + if len(split) == 4: +- xsec, xerr, xmax, pid = split ++ xsec, xerr, xmax, pid = split + else: + new_data += all_lines[i:] + break + pid = int(pid) +- ++ + line = " %+13.7e %+13.7e %+13.7e %i" % \ + (ratio*float(xsec), ratio* float(xerr), ratio*float(xmax), pid) + new_data.append(line) + self['init'] = '\n'.join(new_data) +- ++ + def get_pdg_beam(self): + """return the pdg of each beam""" +- ++ + assert "init" in self +- ++ + all_lines = self["init"].split('\n') + pdg1,pdg2,_ = all_lines[0].split(None, 2) + return int(pdg1), int(pdg2) +- ++ + def load_basic(self, medir): + """ Load the proc_card /param_card and run_card """ +- ++ + self.add(pjoin(medir,'Cards', 'param_card.dat')) + self.add(pjoin(medir,'Cards', 'run_card.dat')) + if os.path.exists(pjoin(medir, 'SubProcesses', 'procdef_mg5.dat')): +@@ -261,29 +261,29 @@ class Banner(dict): + self.add(pjoin(medir,'Cards', 'proc_card_mg5.dat')) + else: + self.add(pjoin(medir,'Cards', 'proc_card.dat')) +- ++ + def change_seed(self, seed): + """Change the seed value in the banner""" + # 0 = iseed + p = re.compile(r'''^\s*\d+\s*=\s*iseed''', re.M) + new_seed_str = " %s = iseed" % seed + self['mgruncard'] = p.sub(new_seed_str, self['mgruncard']) +- ++ + def add_generation_info(self, cross, nb_event): + """add info on MGGeneration""" +- ++ + text = """ + # Number of Events : %s + # Integrated weight (pb) : %s + """ % (nb_event, cross) + self['MGGenerationInfo'] = text +- ++ + ############################################################################ + # SPLIT BANNER + ############################################################################ + def split(self, me_dir, proc_card=True): + """write the banner in the Cards directory. +- proc_card argument is present to avoid the overwrite of proc_card ++ proc_card argument is present to avoid the overwrite of proc_card + information""" + + for tag, text in self.items(): +@@ -305,37 +305,37 @@ class Banner(dict): + """special routine removing width/mass of particles not present in the model + This is usefull in case of loop model card, when we want to use the non + loop model.""" +- ++ + if not hasattr(self, 'param_card'): + self.charge_card('slha') +- ++ + for tag in ['mass', 'decay']: + block = self.param_card.get(tag) + for data in block: + pid = data.lhacode[0] +- if pid not in list(pid2label.keys()): ++ if pid not in list(pid2label.keys()): + block.remove((pid,)) + + def get_lha_strategy(self): + """get the lha_strategy: how the weight have to be handle by the shower""" +- ++ + if not self["init"]: + raise Exception("No init block define") +- ++ + data = self["init"].split('\n')[0].split() + if len(data) != 10: + misc.sprint(len(data), self['init']) + raise Exception("init block has a wrong format") + return int(float(data[-2])) +- ++ + def set_lha_strategy(self, value): + """set the lha_strategy: how the weight have to be handle by the shower""" +- ++ + if not (-4 <= int(value) <= 4): + six.reraise(Exception, "wrong value for lha_strategy", value) + if not self["init"]: + raise Exception("No init block define") +- ++ + all_lines = self["init"].split('\n') + data = all_lines[0].split() + if len(data) != 10: +@@ -351,13 +351,13 @@ class Banner(dict): + assert isinstance(cross, dict) + # assert "all" in cross + assert "init" in self +- ++ + cross = dict(cross) + for key in cross.keys(): + if isinstance(key, str) and key.isdigit() and int(key) not in cross: + cross[int(key)] = cross[key] +- +- ++ ++ + all_lines = self["init"].split('\n') + new_data = [] + new_data.append(all_lines[0]) +@@ -365,7 +365,7 @@ class Banner(dict): + line = all_lines[i] + split = line.split() + if len(split) == 4: +- xsec, xerr, xmax, pid = split ++ xsec, xerr, xmax, pid = split + else: + new_data += all_lines[i:] + break +@@ -383,23 +383,23 @@ class Banner(dict): + (float(cross[pid]), ratio* float(xerr), ratio*float(xmax), pid) + new_data.append(line) + self['init'] = '\n'.join(new_data) +- ++ + ############################################################################ + # WRITE BANNER + ############################################################################ + def write(self, output_path, close_tag=True, exclude=[]): + """write the banner""" +- ++ + if isinstance(output_path, str): + ff = open(output_path, 'w') + else: + ff = output_path +- ++ + if MADEVENT: + header = open(pjoin(MEDIR, 'Source', 'banner_header.txt')).read() + else: + header = open(pjoin(MG5DIR,'Template', 'LO', 'Source', 'banner_header.txt')).read() +- ++ + if not self.lhe_version: + self.lhe_version = self.get('run_card', 'lhe_version', default=1.0) + if float(self.lhe_version) < 3: +@@ -412,7 +412,7 @@ class Banner(dict): + + for tag in [t for t in self.ordered_items if t in list(self.keys())]+ \ + [t for t in self.keys() if t not in self.ordered_items]: +- if tag in ['init'] or tag in exclude: ++ if tag in ['init'] or tag in exclude: + continue + capitalized_tag = self.capitalized_items[tag] if tag in self.capitalized_items else tag + start_data, stop_data = '', '' +@@ -422,19 +422,19 @@ class Banner(dict): + stop_data = ']]>\n' + out = '<%(tag)s>%(start_data)s\n%(text)s\n%(stop_data)s\n' % \ + {'tag':capitalized_tag, 'text':self[tag].strip(), +- 'start_data': start_data, 'stop_data':stop_data} ++ 'start_data': start_data, 'stop_data':stop_data} + try: + ff.write(out) + except: + ff.write(out.encode('utf-8')) +- +- ++ ++ + if not '/header' in exclude: + out = '\n' + try: + ff.write(out) + except: +- ff.write(out.encode('utf-8')) ++ ff.write(out.encode('utf-8')) + + if 'init' in self and not 'init' in exclude: + text = self['init'] +@@ -444,22 +444,22 @@ class Banner(dict): + ff.write(out) + except: + ff.write(out.encode('utf-8')) +- ++ + if close_tag: +- out = '\n' ++ out = '\n' + try: + ff.write(out) + except: +- ff.write(out.encode('utf-8')) ++ ff.write(out.encode('utf-8')) + return ff +- +- ++ ++ + ############################################################################ + # BANNER + ############################################################################ + def add(self, path, tag=None): + """Add the content of the file to the banner""" +- ++ + if not tag: + card_name = os.path.basename(path) + if 'param_card' in card_name: +@@ -505,33 +505,33 @@ class Banner(dict): + if tag == 'param_card': + tag = 'slha' + elif tag == 'run_card': +- tag = 'mgruncard' ++ tag = 'mgruncard' + elif tag == 'proc_card': +- tag = 'mg5proccard' ++ tag = 'mg5proccard' + elif tag == 'shower_card': + tag = 'mgshowercard' + elif tag == 'FO_analyse_card': + tag = 'foanalyse' +- ++ + self[tag.lower()] = text +- +- ++ ++ + def charge_card(self, tag): + """Build the python object associated to the card""" +- ++ + if tag in ['param_card', 'param']: + tag = 'slha' + elif tag in ['run_card', 'run']: +- tag = 'mgruncard' ++ tag = 'mgruncard' + elif tag == 'proc_card': +- tag = 'mg5proccard' ++ tag = 'mg5proccard' + elif tag == 'shower_card': + tag = 'mgshowercard' + elif tag == 'FO_analyse_card': + tag = 'foanalyse' + + assert tag in ['slha', 'mgruncard', 'mg5proccard', 'mgshowercard', 'foanalyse'], 'invalid card %s' % tag +- ++ + if tag == 'slha': + param_card = self[tag].split('\n') + self.param_card = param_card_reader.ParamCard(param_card) +@@ -544,56 +544,56 @@ class Banner(dict): + self.proc_card = ProcCard(proc_card) + return self.proc_card + elif tag =='mgshowercard': +- shower_content = self[tag] ++ shower_content = self[tag] + if MADEVENT: + import internal.shower_card as shower_card + else: + import madgraph.various.shower_card as shower_card + self.shower_card = shower_card.ShowerCard(shower_content, True) +- # set testing to false (testing = true allow to init using ++ # set testing to false (testing = true allow to init using + # the card content instead of the card path" + self.shower_card.testing = False + return self.shower_card + elif tag =='foanalyse': +- analyse_content = self[tag] ++ analyse_content = self[tag] + if MADEVENT: + import internal.FO_analyse_card as FO_analyse_card + else: + import madgraph.various.FO_analyse_card as FO_analyse_card +- # set testing to false (testing = true allow to init using ++ # set testing to false (testing = true allow to init using + # the card content instead of the card path" + self.FOanalyse_card = FO_analyse_card.FOAnalyseCard(analyse_content, True) + self.FOanalyse_card.testing = False + return self.FOanalyse_card +- ++ + + def get_detail(self, tag, *arg, **opt): + """return a specific """ +- ++ + if tag in ['param_card', 'param']: + tag = 'slha' + attr_tag = 'param_card' + elif tag in ['run_card', 'run']: +- tag = 'mgruncard' ++ tag = 'mgruncard' + attr_tag = 'run_card' + elif tag == 'proc_card': +- tag = 'mg5proccard' ++ tag = 'mg5proccard' + attr_tag = 'proc_card' + elif tag == 'model': +- tag = 'mg5proccard' ++ tag = 'mg5proccard' + attr_tag = 'proc_card' + arg = ('model',) + elif tag == 'generate': +- tag = 'mg5proccard' ++ tag = 'mg5proccard' + attr_tag = 'proc_card' + arg = ('generate',) + elif tag == 'shower_card': + tag = 'mgshowercard' + attr_tag = 'shower_card' + assert tag in ['slha', 'mgruncard', 'mg5proccard', 'shower_card'], '%s not recognized' % tag +- ++ + if not hasattr(self, attr_tag): +- self.charge_card(attr_tag) ++ self.charge_card(attr_tag) + + card = getattr(self, attr_tag) + if len(arg) == 0: +@@ -613,7 +613,7 @@ class Banner(dict): + if 'default' in opt: + return opt['default'] + else: +- raise ++ raise + elif len(arg) == 2 and tag == 'slha': + try: + return card[arg[0]].get(arg[1:]) +@@ -621,15 +621,15 @@ class Banner(dict): + if 'default' in opt: + return opt['default'] + else: +- raise ++ raise + elif len(arg) == 0: + return card + else: + raise Exception("Unknow command") +- ++ + #convenient alias + get = get_detail +- ++ + def set(self, tag, *args): + """modify one of the cards""" + +@@ -637,27 +637,27 @@ class Banner(dict): + tag = 'slha' + attr_tag = 'param_card' + elif tag == 'run_card': +- tag = 'mgruncard' ++ tag = 'mgruncard' + attr_tag = 'run_card' + elif tag == 'proc_card': +- tag = 'mg5proccard' ++ tag = 'mg5proccard' + attr_tag = 'proc_card' + elif tag == 'model': +- tag = 'mg5proccard' ++ tag = 'mg5proccard' + attr_tag = 'proc_card' + arg = ('model',) + elif tag == 'generate': +- tag = 'mg5proccard' ++ tag = 'mg5proccard' + attr_tag = 'proc_card' + arg = ('generate',) + elif tag == 'shower_card': + tag = 'mgshowercard' + attr_tag = 'shower_card' + assert tag in ['slha', 'mgruncard', 'mg5proccard', 'shower_card'], 'not recognized' +- ++ + if not hasattr(self, attr_tag): +- self.charge_card(attr_tag) +- ++ self.charge_card(attr_tag) ++ + card = getattr(self, attr_tag) + if len(args) ==2: + if tag == 'mg5proccard': +@@ -666,20 +666,20 @@ class Banner(dict): + card[args[0]] = args[1] + else: + card[args[:-1]] = args[-1] +- +- ++ ++ + @misc.multiple_try() + def add_to_file(self, path, seed=None, out=None): + """Add the banner to a file and change the associate seed in the banner""" + + if seed is not None: + self.set("run_card", "iseed", seed) +- ++ + if not out: + path_out = "%s.tmp" % path + else: + path_out = out +- ++ + ff = self.write(path_out, close_tag=False, + exclude=['MGGenerationInfo', '/header', 'init']) + ff.write("## END BANNER##\n") +@@ -698,44 +698,44 @@ class Banner(dict): + files.mv(path_out, path) + + +- ++ + def split_banner(banner_path, me_dir, proc_card=True): + """a simple way to split a banner""" +- ++ + banner = Banner(banner_path) + banner.split(me_dir, proc_card) +- ++ + def recover_banner(results_object, level, run=None, tag=None): + """as input we receive a gen_crossxhtml.AllResults object. + This define the current banner and load it + """ +- ++ + if not run: +- try: +- _run = results_object.current['run_name'] +- _tag = results_object.current['tag'] ++ try: ++ _run = results_object.current['run_name'] ++ _tag = results_object.current['tag'] + except Exception: + return Banner() + else: + _run = run + if not tag: +- try: +- _tag = results_object[run].tags[-1] ++ try: ++ _tag = results_object[run].tags[-1] + except Exception as error: + if os.path.exists( pjoin(results_object.path,'Events','%s_banner.txt' % (run))): + tag = None + else: +- return Banner() ++ return Banner() + else: + _tag = tag +- + +- path = results_object.path +- if tag: ++ ++ path = results_object.path ++ if tag: + banner_path = pjoin(path,'Events',run,'%s_%s_banner.txt' % (run, tag)) + else: + banner_path = pjoin(results_object.path,'Events','%s_banner.txt' % (run)) +- ++ + if not os.path.exists(banner_path): + if level != "parton" and tag != _tag: + return recover_banner(results_object, level, _run, results_object[_run].tags[0]) +@@ -754,12 +754,12 @@ def recover_banner(results_object, level, run=None, tag=None): + return Banner(lhe.banner) + + # security if the banner was remove (or program canceled before created it) +- return Banner() +- ++ return Banner() ++ + banner = Banner(banner_path) +- +- +- ++ ++ ++ + if level == 'pythia': + if 'mgpythiacard' in banner: + del banner['mgpythiacard'] +@@ -768,13 +768,13 @@ def recover_banner(results_object, level, run=None, tag=None): + if tag in banner: + del banner[tag] + return banner +- ++ + class InvalidRunCard(InvalidCmd): + pass + + class ProcCard(list): + """Basic Proccard object""" +- ++ + history_header = \ + '#************************************************************\n' + \ + '#* MadGraph5_aMC@NLO *\n' + \ +@@ -798,10 +798,10 @@ class ProcCard(list): + '#* run as ./bin/mg5_aMC filename *\n' + \ + '#* *\n' + \ + '#************************************************************\n' +- +- +- +- ++ ++ ++ ++ + def __init__(self, init=None): + """ initialize a basic proc_card""" + self.info = {'model': 'sm', 'generate':None, +@@ -810,13 +810,13 @@ class ProcCard(list): + if init: + self.read(init) + +- ++ + def read(self, init): + """read the proc_card and save the information""" +- ++ + if isinstance(init, str): #path to file + init = open(init, 'r') +- ++ + store_line = '' + for line in init: + line = line.rstrip() +@@ -828,28 +828,28 @@ class ProcCard(list): + store_line = "" + if store_line: + raise Exception("WRONG CARD FORMAT") +- +- ++ ++ + def move_to_last(self, cmd): + """move an element to the last history.""" + for line in self[:]: + if line.startswith(cmd): + self.remove(line) + list.append(self, line) +- ++ + def append(self, line): + """"add a line in the proc_card perform automatically cleaning""" +- ++ + line = line.strip() + cmds = line.split() + if len(cmds) == 0: + return +- ++ + list.append(self, line) +- ++ + # command type: + cmd = cmds[0] +- ++ + if cmd == 'output': + # Remove previous outputs from history + self.clean(allow_for_removal = ['output'], keep_switch=True, +@@ -875,7 +875,7 @@ class ProcCard(list): + elif cmds[1] == 'proc_v4': + #full cleaning + self[:] = [] +- ++ + + def clean(self, to_keep=['set','add','load'], + remove_bef_last=None, +@@ -884,13 +884,13 @@ class ProcCard(list): + keep_switch=False): + """Remove command in arguments from history. + All command before the last occurrence of 'remove_bef_last' +- (including it) will be removed (but if another options tells the opposite). ++ (including it) will be removed (but if another options tells the opposite). + 'to_keep' is a set of line to always keep. +- 'to_remove' is a set of line to always remove (don't care about remove_bef_ ++ 'to_remove' is a set of line to always remove (don't care about remove_bef_ + status but keep_switch acts.). +- if 'allow_for_removal' is define only the command in that list can be ++ if 'allow_for_removal' is define only the command in that list can be + remove of the history for older command that remove_bef_lb1. all parameter +- present in to_remove are always remove even if they are not part of this ++ present in to_remove are always remove even if they are not part of this + list. + keep_switch force to keep the statement remove_bef_??? which changes starts + the removal mode. +@@ -900,8 +900,8 @@ class ProcCard(list): + if __debug__ and allow_for_removal: + for arg in to_keep: + assert arg not in allow_for_removal +- +- ++ ++ + nline = -1 + removal = False + #looping backward +@@ -912,7 +912,7 @@ class ProcCard(list): + if not removal and remove_bef_last: + if self[nline].startswith(remove_bef_last): + removal = True +- switch = True ++ switch = True + + # if this is the switch and is protected pass to the next element + if switch and keep_switch: +@@ -923,12 +923,12 @@ class ProcCard(list): + if any([self[nline].startswith(arg) for arg in to_remove]): + self.pop(nline) + continue +- ++ + # Only if removal mode is active! + if removal: + if allow_for_removal: + # Only a subset of command can be removed +- if any([self[nline].startswith(arg) ++ if any([self[nline].startswith(arg) + for arg in allow_for_removal]): + self.pop(nline) + continue +@@ -936,10 +936,10 @@ class ProcCard(list): + # All command have to be remove but protected + self.pop(nline) + continue +- ++ + # update the counter to pass to the next element + nline -= 1 +- ++ + def get(self, tag, default=None): + if isinstance(tag, int): + list.__getattr__(self, tag) +@@ -954,32 +954,32 @@ class ProcCard(list): + except ValueError: + name, content = line[7:].split(None,1) + out.append((name, content)) +- return out ++ return out + else: + return self.info[tag] +- ++ + def write(self, path): + """write the proc_card to a given path""" +- ++ + fsock = open(path, 'w') + fsock.write(self.history_header) + for line in self: + while len(line) > 70: +- sub, line = line[:70]+"\\" , line[70:] ++ sub, line = line[:70]+"\\" , line[70:] + fsock.write(sub+"\n") + else: + fsock.write(line+"\n") +- +-class InvalidCardEdition(InvalidCmd): pass +- ++ ++class InvalidCardEdition(InvalidCmd): pass ++ + class ConfigFile(dict): + """ a class for storing/dealing with input file. +- """ ++ """ + + def __init__(self, finput=None, **opt): + """initialize a new instance. input can be an instance of MadLoopParam, +- a file, a path to a file, or simply Nothing""" +- ++ a file, a path to a file, or simply Nothing""" ++ + if isinstance(finput, self.__class__): + dict.__init__(self) + for key in finput.__dict__: +@@ -989,7 +989,7 @@ class ConfigFile(dict): + return + else: + dict.__init__(self) +- ++ + # Initialize it with all the default value + self.user_set = set() + self.auto_set = set() +@@ -1000,15 +1000,15 @@ class ConfigFile(dict): + self.comments = {} # comment associated to parameters. can be display via help message + # store the valid options for a given parameter. + self.allowed_value = {} +- ++ + self.default_setup() + self.plugin_input(finput) +- ++ + + # if input is define read that input + if isinstance(finput, (file, str, StringIO.StringIO)): + self.read(finput, **opt) +- ++ + + + +@@ -1028,7 +1028,7 @@ class ConfigFile(dict): + base = self.__class__(self) + #base = copy.copy(self) + base.update((key.lower(),value) for key, value in other.items()) +- ++ + return base + + def __radd__(self, other): +@@ -1036,26 +1036,26 @@ class ConfigFile(dict): + new = copy.copy(other) + new.update((key, value) for key, value in self.items()) + return new +- ++ + def __contains__(self, key): + return dict.__contains__(self, key.lower()) + + def __iter__(self): +- ++ + for name in super(ConfigFile, self).__iter__(): + yield self.lower_to_case[name.lower()] +- +- ++ ++ + #iter = super(ConfigFile, self).__iter__() + #misc.sprint(iter) + #return (self.lower_to_case[name] for name in iter) +- ++ + def keys(self): + return [name for name in self] +- ++ + def items(self): + return [(name,self[name]) for name in self] +- ++ + @staticmethod + def warn(text, level, raiseerror=False): + """convenient proxy to raiseerror/print warning""" +@@ -1071,11 +1071,11 @@ class ConfigFile(dict): + log = lambda t: logger.log(level, t) + elif level: + log = level +- ++ + return log(text) + + def post_set(self, name, value, change_userdefine, raiseerror): +- ++ + if value is None: + value = self[name] + +@@ -1087,25 +1087,25 @@ class ConfigFile(dict): + return getattr(self, 'post_set_%s' % name)(value, change_userdefine, raiseerror) + else: + raise +- ++ + def __setitem__(self, name, value, change_userdefine=False,raiseerror=False): + """set the attribute and set correctly the type if the value is a string. + change_userdefine on True if we have to add the parameter in user_set + """ +- ++ + if not len(self): + #Should never happen but when deepcopy/pickle + self.__init__() +- ++ + name = name.strip() +- lower_name = name.lower() +- ++ lower_name = name.lower() ++ + # 0. check if this parameter is a system only one + if change_userdefine and lower_name in self.system_only: + text='%s is a private entry which can not be modify by the user. Keep value at %s' % (name,self[name]) + self.warn(text, 'critical', raiseerror) + return +- ++ + #1. check if the parameter is set to auto -> pass it to special + if lower_name in self: + targettype = type(dict.__getitem__(self, lower_name)) +@@ -1115,22 +1115,22 @@ class ConfigFile(dict): + self.user_set.remove(lower_name) + #keep old value. + self.post_set(lower_name, 'auto', change_userdefine, raiseerror) +- return ++ return + elif lower_name in self.auto_set: + self.auto_set.remove(lower_name) +- ++ + # 2. Find the type of the attribute that we want + if lower_name in self.list_parameter: + targettype = self.list_parameter[lower_name] +- +- +- ++ ++ ++ + if isinstance(value, str): + # split for each comma/space + value = value.strip() + if value.startswith('[') and value.endswith(']'): + value = value[1:-1] +- #do not perform split within a " or ' block ++ #do not perform split within a " or ' block + data = re.split(r"((? bad input + dropped.append(val) +- ++ + if not new_values: + + text= "value '%s' for entry '%s' is not valid. Preserving previous value: '%s'.\n" \ + % (value, name, self[lower_name]) + text += "allowed values are any list composed of the following entries: %s" % ', '.join([str(i) for i in self.allowed_value[lower_name]]) +- return self.warn(text, 'warning', raiseerror) +- elif dropped: ++ return self.warn(text, 'warning', raiseerror) ++ elif dropped: + text = "some value for entry '%s' are not valid. Invalid items are: '%s'.\n" \ + % (name, dropped) + text += "value will be set to %s" % new_values +- text += "allowed items in the list are: %s" % ', '.join([str(i) for i in self.allowed_value[lower_name]]) ++ text += "allowed items in the list are: %s" % ', '.join([str(i) for i in self.allowed_value[lower_name]]) + self.warn(text, 'warning') + + values = new_values + + # make the assignment +- dict.__setitem__(self, lower_name, values) ++ dict.__setitem__(self, lower_name, values) + if change_userdefine: + self.user_set.add(lower_name) + #check for specific action +- return self.post_set(lower_name, None, change_userdefine, raiseerror) ++ return self.post_set(lower_name, None, change_userdefine, raiseerror) + elif lower_name in self.dict_parameter: +- targettype = self.dict_parameter[lower_name] ++ targettype = self.dict_parameter[lower_name] + full_reset = True #check if we just update the current dict or not +- ++ + if isinstance(value, str): + value = value.strip() + # allowed entry: +@@ -1209,7 +1209,7 @@ class ConfigFile(dict): + # name , value => just add the entry + # name value => just add the entry + # {name1:value1, name2:value2} => full reset +- ++ + # split for each comma/space + if value.startswith('{') and value.endswith('}'): + new_value = {} +@@ -1219,23 +1219,23 @@ class ConfigFile(dict): + x, y = pair.split(':') + x, y = x.strip(), y.strip() + if x.startswith(('"',"'")) and x.endswith(x[0]): +- x = x[1:-1] ++ x = x[1:-1] + new_value[x] = y + value = new_value + elif ',' in value: + x,y = value.split(',') + value = {x.strip():y.strip()} + full_reset = False +- ++ + elif ':' in value: + x,y = value.split(':') + value = {x.strip():y.strip()} +- full_reset = False ++ full_reset = False + else: + x,y = value.split() + value = {x:y} +- full_reset = False +- ++ full_reset = False ++ + if isinstance(value, dict): + for key in value: + value[key] = self.format_variable(value[key], targettype, name=name) +@@ -1248,7 +1248,7 @@ class ConfigFile(dict): + if change_userdefine: + self.user_set.add(lower_name) + return self.post_set(lower_name, None, change_userdefine, raiseerror) +- elif name in self: ++ elif name in self: + targettype = type(self[name]) + else: + logger.debug('Trying to add argument %s in %s. ' % (name, self.__class__.__name__) +\ +@@ -1256,22 +1256,22 @@ class ConfigFile(dict): + suggestions = [k for k in self.keys() if k.startswith(name[0].lower())] + if len(suggestions)>0: + logger.debug("Did you mean one of the following: %s"%suggestions) +- self.add_param(lower_name, self.format_variable(UnknownType(value), ++ self.add_param(lower_name, self.format_variable(UnknownType(value), + UnknownType, name)) + self.lower_to_case[lower_name] = name + if change_userdefine: + self.user_set.add(lower_name) + return self.post_set(lower_name, None, change_userdefine, raiseerror) +- ++ + value = self.format_variable(value, targettype, name=name) + #check that the value is allowed: + if lower_name in self.allowed_value and '*' not in self.allowed_value[lower_name]: + valid = False + allowed = self.allowed_value[lower_name] +- ++ + # check if the current value is allowed or not (set valid to True) + if value in allowed: +- valid=True ++ valid=True + elif isinstance(value, str): + value = value.lower().strip() + allowed = [str(v).lower() for v in allowed] +@@ -1279,7 +1279,7 @@ class ConfigFile(dict): + i = allowed.index(value) + value = self.allowed_value[lower_name][i] + valid=True +- ++ + if not valid: + # act if not valid: + text = "value '%s' for entry '%s' is not valid. Preserving previous value: '%s'.\n" \ +@@ -1303,7 +1303,7 @@ class ConfigFile(dict): + if __debug__: + if lower_name in self: + raise Exception("Duplicate case for %s in %s" % (name,self.__class__)) +- ++ + dict.__setitem__(self, lower_name, value) + self.lower_to_case[lower_name] = name + if isinstance(value, list): +@@ -1318,12 +1318,12 @@ class ConfigFile(dict): + elif isinstance(value, dict): + allvalues = list(value.values()) + if any([type(allvalues[0]) != type(v) for v in allvalues]): +- raise Exception("All entry should have the same type") +- self.dict_parameter[lower_name] = type(allvalues[0]) ++ raise Exception("All entry should have the same type") ++ self.dict_parameter[lower_name] = type(allvalues[0]) + if '__type__' in value: + del value['__type__'] + dict.__setitem__(self, lower_name, value) +- ++ + if allowed and allowed != ['*']: + self.allowed_value[lower_name] = allowed + if lower_name in self.list_parameter: +@@ -1333,8 +1333,8 @@ class ConfigFile(dict): + assert value in allowed or '*' in allowed + #elif isinstance(value, bool) and allowed != ['*']: + # self.allowed_value[name] = [True, False] +- +- ++ ++ + if system: + self.system_only.add(lower_name) + if comment: +@@ -1342,7 +1342,7 @@ class ConfigFile(dict): + + def do_help(self, name): + """return a minimal help for the parameter""" +- ++ + out = "## Information on parameter %s from class %s\n" % (name, self.__class__.__name__) + if name.lower() in self: + out += "## current value: %s (parameter should be of type %s)\n" % (self[name], type(self[name])) +@@ -1351,7 +1351,7 @@ class ConfigFile(dict): + else: + out += "## Unknown for this class\n" + if name.lower() in self.user_set: +- out += "## This value is considered as being set by the user\n" ++ out += "## This value is considered as being set by the user\n" + else: + out += "## This value is considered as being set by the system\n" + if name.lower() in self.allowed_value: +@@ -1359,17 +1359,17 @@ class ConfigFile(dict): + out += "Allowed value are: %s\n" % ','.join([str(p) for p in self.allowed_value[name.lower()]]) + else: + out += "Suggested value are : %s\n " % ','.join([str(p) for p in self.allowed_value[name.lower()] if p!='*']) +- ++ + logger.info(out) + return out + + @staticmethod + def guess_type_from_value(value): + "try to guess the type of the string --do not use eval as it might not be safe" +- ++ + if not isinstance(value, str): + return str(value.__class__.__name__) +- ++ + #use ast.literal_eval to be safe since value is untrusted + # add a timeout to mitigate infinite loop, memory stack attack + with misc.stdchannel_redirected(sys.stdout, os.devnull): +@@ -1388,7 +1388,7 @@ class ConfigFile(dict): + @staticmethod + def format_variable(value, targettype, name="unknown"): + """assign the value to the attribute for the given format""" +- ++ + if isinstance(targettype, str): + if targettype in ['str', 'int', 'float', 'bool']: + targettype = eval(targettype) +@@ -1412,7 +1412,7 @@ class ConfigFile(dict): + (name, type(value), targettype, value)) + else: + raise InvalidCmd("Wrong input type for %s found %s and expecting %s for value %s" %\ +- (name, type(value), targettype, value)) ++ (name, type(value), targettype, value)) + else: + if targettype != UnknownType: + value = value.strip() +@@ -1441,8 +1441,8 @@ class ConfigFile(dict): + value = int(value) + elif value.endswith(('k', 'M')) and value[:-1].isdigit(): + convert = {'k':1000, 'M':1000000} +- value =int(value[:-1]) * convert[value[-1]] +- elif '/' in value or '*' in value: ++ value =int(value[:-1]) * convert[value[-1]] ++ elif '/' in value or '*' in value: + try: + split = re.split('(\*|/)',value) + v = float(split[0]) +@@ -1461,7 +1461,7 @@ class ConfigFile(dict): + try: + value = float(value.replace('d','e')) + except ValueError: +- raise InvalidCmd("%s can not be mapped to an integer" % value) ++ raise InvalidCmd("%s can not be mapped to an integer" % value) + try: + new_value = int(value) + except ValueError: +@@ -1471,7 +1471,7 @@ class ConfigFile(dict): + value = new_value + else: + raise InvalidCmd("incorect input: %s need an integer for %s" % (value,name)) +- ++ + elif targettype == float: + if value.endswith(('k', 'M')) and value[:-1].isdigit(): + convert = {'k':1000, 'M':1000000} +@@ -1496,33 +1496,33 @@ class ConfigFile(dict): + value = v + else: + raise InvalidCmd("type %s is not handle by the card" % targettype) +- ++ + return value +- +- ++ ++ + + def __getitem__(self, name): +- ++ + lower_name = name.lower() + if __debug__: + if lower_name not in self: + if lower_name in [key.lower() for key in self] : + raise Exception("Some key are not lower case %s. Invalid use of the class!"\ + % [key for key in self if key.lower() != key]) +- ++ + if lower_name in self.auto_set: + return 'auto' +- ++ + return dict.__getitem__(self, name.lower()) + +- ++ + get = __getitem__ + + def set(self, name, value, changeifuserset=True, user=False, raiseerror=False): + """convenient way to change attribute. + changeifuserset=False means that the value is NOT change is the value is not on default. +- user=True, means that the value will be marked as modified by the user +- (potentially preventing future change to the value) ++ user=True, means that the value will be marked as modified by the user ++ (potentially preventing future change to the value) + """ + + # changeifuserset=False -> we need to check if the user force a value. +@@ -1530,8 +1530,8 @@ class ConfigFile(dict): + if name.lower() in self.user_set: + #value modified by the user -> do nothing + return +- self.__setitem__(name, value, change_userdefine=user, raiseerror=raiseerror) +- ++ self.__setitem__(name, value, change_userdefine=user, raiseerror=raiseerror) ++ + + class RivetCard(ConfigFile): + +@@ -1706,7 +1706,7 @@ class RivetCard(ConfigFile): + yexec_dict = {} + yexec_line = exec_line + "yaxis_relvar = " + self['yaxis_relvar'] + exec(yexec_line, locals(), yexec_dict) +- if self['yaxis_label'] == "": ++ if self['yaxis_label'] == "": + self['yaxis_label'] = "yaxis_relvar" + f_relparams.write("{0} = {1}\n".format(self['yaxis_label'], yexec_dict['yaxis_relvar'])) + else: +@@ -1715,11 +1715,11 @@ class RivetCard(ConfigFile): + + class ProcCharacteristic(ConfigFile): + """A class to handle information which are passed from MadGraph to the madevent +- interface.""" +- ++ interface.""" ++ + def default_setup(self): + """initialize the directory to the default value""" +- ++ + self.add_param('loop_induced', False) + self.add_param('has_isr', False) + self.add_param('has_fsr', False) +@@ -1735,16 +1735,16 @@ class ProcCharacteristic(ConfigFile): + self.add_param('pdg_initial1', [0]) + self.add_param('pdg_initial2', [0]) + self.add_param('splitting_types',[], typelist=str) +- self.add_param('perturbation_order', [], typelist=str) +- self.add_param('limitations', [], typelist=str) +- self.add_param('hel_recycling', False) ++ self.add_param('perturbation_order', [], typelist=str) ++ self.add_param('limitations', [], typelist=str) ++ self.add_param('hel_recycling', False) + self.add_param('single_color', True) +- self.add_param('nlo_mixed_expansion', True) ++ self.add_param('nlo_mixed_expansion', True) + + def read(self, finput): +- """Read the input file, this can be a path to a file, ++ """Read the input file, this can be a path to a file, + a file object, a str with the content of the file.""" +- ++ + if isinstance(finput, str): + if "\n" in finput: + finput = finput.split('\n') +@@ -1752,49 +1752,49 @@ class ProcCharacteristic(ConfigFile): + finput = open(finput) + else: + raise Exception("No such file %s" % finput) +- ++ + for line in finput: + if '#' in line: + line = line.split('#',1)[0] + if not line: + continue +- ++ + if '=' in line: + key, value = line.split('=',1) + self[key.strip()] = value +- ++ + def write(self, outputpath): + """write the file""" + + template ="# Information about the process #\n" + template +="#########################################\n" +- ++ + fsock = open(outputpath, 'w') + fsock.write(template) +- ++ + for key, value in self.items(): + fsock.write(" %s = %s \n" % (key, value)) +- +- fsock.close() +- ++ ++ fsock.close() ++ + + + + class GridpackCard(ConfigFile): + """an object for the GridpackCard""" +- ++ + def default_setup(self): + """default value for the GridpackCard""" +- ++ + self.add_param("GridRun", True) + self.add_param("gevents", 2500) + self.add_param("gseed", 1) +- self.add_param("ngran", -1) +- ++ self.add_param("ngran", -1) ++ + def read(self, finput): +- """Read the input file, this can be a path to a file, ++ """Read the input file, this can be a path to a file, + a file object, a str with the content of the file.""" +- ++ + if isinstance(finput, str): + if "\n" in finput: + finput = finput.split('\n') +@@ -1802,7 +1802,7 @@ class GridpackCard(ConfigFile): + finput = open(finput) + else: + raise Exception("No such file %s" % finput) +- ++ + for line in finput: + line = line.split('#')[0] + line = line.split('!')[0] +@@ -1812,19 +1812,19 @@ class GridpackCard(ConfigFile): + self[line[1].strip()] = line[0].replace('\'','').strip() + + def write(self, output_file, template=None): +- """Write the run_card in output_file according to template ++ """Write the run_card in output_file according to template + (a path to a valid run_card)""" + + if not template: + if not MADEVENT: +- template = pjoin(MG5DIR, 'Template', 'LO', 'Cards', ++ template = pjoin(MG5DIR, 'Template', 'LO', 'Cards', + 'grid_card_default.dat') + else: + template = pjoin(MEDIR, 'Cards', 'grid_card_default.dat') + +- ++ + text = "" +- for line in open(template,'r'): ++ for line in open(template,'r'): + nline = line.split('#')[0] + nline = nline.split('!')[0] + comment = line[len(nline):] +@@ -1832,19 +1832,19 @@ class GridpackCard(ConfigFile): + if len(nline) != 2: + text += line + elif nline[1].strip() in self: +- text += ' %s\t= %s %s' % (self[nline[1].strip()],nline[1], comment) ++ text += ' %s\t= %s %s' % (self[nline[1].strip()],nline[1], comment) + else: + logger.info('Adding missing parameter %s to current run_card (with default value)' % nline[1].strip()) +- text += line +- ++ text += line ++ + if isinstance(output_file, str): + fsock = open(output_file,'w') + else: + fsock = output_file +- ++ + fsock.write(text) + fsock.close() +- ++ + class PY8Card(ConfigFile): + """ Implements the Pythia8 card.""" + +@@ -1868,7 +1868,7 @@ class PY8Card(ConfigFile): + + def default_setup(self): + """ Sets up the list of available PY8 parameters.""" +- ++ + # Visible parameters + # ================== + self.add_param("Main:numberOfEvents", -1) +@@ -1877,11 +1877,11 @@ class PY8Card(ConfigFile): + self.add_param("JetMatching:qCut", -1.0, always_write_to_card=False) + self.add_param("JetMatching:doShowerKt",False,always_write_to_card=False) + # -1 means that it is automatically set. +- self.add_param("JetMatching:nJetMax", -1, always_write_to_card=False) ++ self.add_param("JetMatching:nJetMax", -1, always_write_to_card=False) + # for CKKWL merging + self.add_param("Merging:TMS", -1.0, always_write_to_card=False) + self.add_param("Merging:Process", '', always_write_to_card=False) +- # -1 means that it is automatically set. ++ # -1 means that it is automatically set. + self.add_param("Merging:nJetMax", -1, always_write_to_card=False) + # for both merging, chose whether to also consider different merging + # scale values for the extra weights related to scale and PDF variations. +@@ -1918,10 +1918,10 @@ class PY8Card(ConfigFile): + comment='This allows to turn on/off hadronization alltogether.') + self.add_param("partonlevel:mpi", True, hidden=True, always_write_to_card=False, + comment='This allows to turn on/off MPI alltogether.') +- self.add_param("Beams:setProductionScalesFromLHEF", False, hidden=True, ++ self.add_param("Beams:setProductionScalesFromLHEF", False, hidden=True, + always_write_to_card=False, + comment='This parameter is automatically set to True by MG5aMC when doing MLM merging with PY8.') +- ++ + # for MLM merging + self.add_param("JetMatching:merge", False, hidden=True, always_write_to_card=False, + comment='Specifiy if we are merging sample of different multiplicity.') +@@ -1931,9 +1931,9 @@ class PY8Card(ConfigFile): + comment='Value of the merging scale below which one does not even write the HepMC event.') + self.add_param("JetMatching:doVeto", False, hidden=True, always_write_to_card=False, + comment='Do veto externally (e.g. in SysCalc).') +- self.add_param("JetMatching:scheme", 1, hidden=True, always_write_to_card=False) ++ self.add_param("JetMatching:scheme", 1, hidden=True, always_write_to_card=False) + self.add_param("JetMatching:setMad", False, hidden=True, always_write_to_card=False, +- comment='Specify one must read inputs from the MadGraph banner.') ++ comment='Specify one must read inputs from the MadGraph banner.') + self.add_param("JetMatching:coneRadius", 1.0, hidden=True, always_write_to_card=False) + self.add_param("JetMatching:nQmatch",4,hidden=True, always_write_to_card=False) + # for CKKWL merging (common with UMEPS, UNLOPS) +@@ -1946,7 +1946,7 @@ class PY8Card(ConfigFile): + self.add_param("Merging:applyVeto", False, hidden=True, always_write_to_card=False, + comment='Do veto externally (e.g. in SysCalc).') + self.add_param("Merging:includeWeightInXsection", True, hidden=True, always_write_to_card=False, +- comment='If turned off, then the option belows forces PY8 to keep the original weight.') ++ comment='If turned off, then the option belows forces PY8 to keep the original weight.') + self.add_param("Merging:muRen", 91.188, hidden=True, always_write_to_card=False, + comment='Set renormalization scales of the 2->2 process.') + self.add_param("Merging:muFacInME", 91.188, hidden=True, always_write_to_card=False, +@@ -1958,7 +1958,7 @@ class PY8Card(ConfigFile): + # To be added in subruns for CKKWL + self.add_param("Merging:mayRemoveDecayProducts", False, hidden=True, always_write_to_card=False) + self.add_param("Merging:doKTMerging", False, hidden=True, always_write_to_card=False) +- self.add_param("Merging:Dparameter", 0.4, hidden=True, always_write_to_card=False) ++ self.add_param("Merging:Dparameter", 0.4, hidden=True, always_write_to_card=False) + self.add_param("Merging:doPTLundMerging", False, hidden=True, always_write_to_card=False) + + # Special Pythia8 paremeters useful to simplify the shower. +@@ -1975,33 +1975,33 @@ class PY8Card(ConfigFile): + # Add parameters controlling the subruns execution flow. + # These parameters should not be part of PY8SubRun daughter. + self.add_default_subruns('parameters') +- ++ + def __init__(self, *args, **opts): +- # Parameters which are not printed in the card unless they are +- # 'user_set' or 'system_set' or part of the ++ # Parameters which are not printed in the card unless they are ++ # 'user_set' or 'system_set' or part of the + # self.hidden_params_to_always_print set. + self.hidden_param = [] + self.hidden_params_to_always_write = set() + self.visible_params_to_always_write = set() + # List of parameters that should never be written out given the current context. + self.params_to_never_write = set() +- ++ + # Parameters which have been set by the system (i.e. MG5 itself during + # the regular course of the shower interface) + self.system_set = set() +- ++ + # Add attributes controlling the subruns execution flow. + # These attributes should not be part of PY8SubRun daughter. + self.add_default_subruns('attributes') +- +- # Parameters which have been set by the ++ ++ # Parameters which have been set by the + super(PY8Card, self).__init__(*args, **opts) + + + +- def add_param(self, name, value, hidden=False, always_write_to_card=True, ++ def add_param(self, name, value, hidden=False, always_write_to_card=True, + comment=None): +- """ add a parameter to the card. value is the default value and ++ """ add a parameter to the card. value is the default value and + defines the type (int/float/bool/str) of the input. + The option 'hidden' decides whether the parameter should be visible to the user. + The option 'always_write_to_card' decides whether it should +@@ -2017,7 +2017,7 @@ class PY8Card(ConfigFile): + self.hidden_params_to_always_write.add(name) + else: + if always_write_to_card: +- self.visible_params_to_always_write.add(name) ++ self.visible_params_to_always_write.add(name) + if not comment is None: + if not isinstance(comment, str): + raise MadGraph5Error("Option 'comment' must be a string, not"+\ +@@ -2036,7 +2036,7 @@ class PY8Card(ConfigFile): + self.subruns[py8_subrun['Main:subrun']] = py8_subrun + if not 'LHEFInputs:nSubruns' in self.user_set: + self['LHEFInputs:nSubruns'] = max(self.subruns.keys()) +- ++ + def userSet(self, name, value, **opts): + """Set an attribute of this card, following a user_request""" + self.__setitem__(name, value, change_userdefine=True, **opts) +@@ -2044,10 +2044,10 @@ class PY8Card(ConfigFile): + self.system_set.remove(name.lower()) + + def vetoParamWriteOut(self, name): +- """ Forbid the writeout of a specific parameter of this card when the ++ """ Forbid the writeout of a specific parameter of this card when the + "write" function will be invoked.""" + self.params_to_never_write.add(name.lower()) +- ++ + def systemSet(self, name, value, **opts): + """Set an attribute of this card, independently of a specific user + request and only if not already user_set.""" +@@ -2058,7 +2058,7 @@ class PY8Card(ConfigFile): + if force or name.lower() not in self.user_set: + self.__setitem__(name, value, change_userdefine=False, **opts) + self.system_set.add(name.lower()) +- ++ + def MadGraphSet(self, name, value, **opts): + """ Sets a card attribute, but only if it is absent or not already + user_set.""" +@@ -2068,18 +2068,18 @@ class PY8Card(ConfigFile): + force = False + if name.lower() not in self or (force or name.lower() not in self.user_set): + self.__setitem__(name, value, change_userdefine=False, **opts) +- self.system_set.add(name.lower()) +- ++ self.system_set.add(name.lower()) ++ + def defaultSet(self, name, value, **opts): + self.__setitem__(name, value, change_userdefine=False, **opts) +- ++ + @staticmethod + def pythia8_formatting(value, formatv=None): + """format the variable into pythia8 card convention. + The type is detected by default""" + if not formatv: + if isinstance(value,UnknownType): +- formatv = 'unknown' ++ formatv = 'unknown' + elif isinstance(value, bool): + formatv = 'bool' + elif isinstance(value, int): +@@ -2095,7 +2095,7 @@ class PY8Card(ConfigFile): + formatv = 'str' + else: + assert formatv +- ++ + if formatv == 'unknown': + # No formatting then + return str(value) +@@ -2116,7 +2116,7 @@ class PY8Card(ConfigFile): + elif formatv == 'float': + return '%.10e' % float(value) + elif formatv == 'shortfloat': +- return '%.3f' % float(value) ++ return '%.3f' % float(value) + elif formatv == 'str': + return "%s" % value + elif formatv == 'list': +@@ -2124,9 +2124,9 @@ class PY8Card(ConfigFile): + return ','.join([PY8Card.pythia8_formatting(arg, 'shortfloat') for arg in value]) + else: + return ','.join([PY8Card.pythia8_formatting(arg) for arg in value]) +- + +- def write(self, output_file, template, read_subrun=False, ++ ++ def write(self, output_file, template, read_subrun=False, + print_only_visible=False, direct_pythia_input=False, add_missing=True): + """ Write the card to output_file using a specific template. + > 'print_only_visible' specifies whether or not the hidden parameters +@@ -2143,28 +2143,28 @@ class PY8Card(ConfigFile): + or p.lower() in self.user_set] + # Filter against list of parameters vetoed for write-out + visible_param = [p for p in visible_param if p.lower() not in self.params_to_never_write] +- ++ + # Now the hidden param which must be written out + if print_only_visible: + hidden_output_param = [] + else: + hidden_output_param = [p for p in self if p.lower() in self.hidden_param and + not p.lower() in self.user_set and +- (p.lower() in self.hidden_params_to_always_write or ++ (p.lower() in self.hidden_params_to_always_write or + p.lower() in self.system_set)] + # Filter against list of parameters vetoed for write-out + hidden_output_param = [p for p in hidden_output_param if p not in self.params_to_never_write] +- ++ + if print_only_visible: + subruns = [] + else: + if not read_subrun: + subruns = sorted(self.subruns.keys()) +- ++ + # Store the subruns to write in a dictionary, with its ID in key + # and the corresponding stringstream in value + subruns_to_write = {} +- ++ + # Sort these parameters nicely so as to put together parameters + # belonging to the same group (i.e. prefix before the ':' in their name). + def group_params(params): +@@ -2191,7 +2191,7 @@ class PY8Card(ConfigFile): + # First dump in a temporary_output (might need to have a second pass + # at the very end to update 'LHEFInputs:nSubruns') + output = StringIO.StringIO() +- ++ + # Setup template from which to read + if isinstance(template, str): + if os.path.isfile(template): +@@ -2199,7 +2199,7 @@ class PY8Card(ConfigFile): + elif '\n' in template: + tmpl = StringIO.StringIO(template) + else: +- raise Exception("File input '%s' not found." % file_input) ++ raise Exception("File input '%s' not found." % file_input) + elif template is None: + # Then use a dummy empty StringIO, hence skipping the reading + tmpl = StringIO.StringIO() +@@ -2257,8 +2257,8 @@ class PY8Card(ConfigFile): + # Remove all of its variables (so that nothing is overwritten) + DummySubrun.clear() + DummySubrun.write(subruns_to_write[int(value)], +- tmpl, read_subrun=True, +- print_only_visible=print_only_visible, ++ tmpl, read_subrun=True, ++ print_only_visible=print_only_visible, + direct_pythia_input=direct_pythia_input) + + logger.info('Adding new unknown subrun with ID %d.'% +@@ -2267,7 +2267,7 @@ class PY8Card(ConfigFile): + last_pos = tmpl.tell() + line = tmpl.readline() + continue +- ++ + # Change parameters which must be output + if param in visible_param: + new_value = PY8Card.pythia8_formatting(self[param]) +@@ -2286,10 +2286,10 @@ class PY8Card(ConfigFile): + last_pos = tmpl.tell() + line = tmpl.readline() + continue +- +- # Substitute the value. ++ ++ # Substitute the value. + # If it is directly the pytia input, then don't write the param if it +- # is not in the list of visible_params_to_always_write and was ++ # is not in the list of visible_params_to_always_write and was + # not user_set or system_set + if ((not direct_pythia_input) or + (param.lower() in self.visible_params_to_always_write) or +@@ -2304,16 +2304,16 @@ class PY8Card(ConfigFile): + + output.write(template%(param_entry, + value_entry.replace(value,new_value))) +- ++ + # Proceed to next line + last_pos = tmpl.tell() + line = tmpl.readline() +- ++ + # If add_missing is False, make sure to empty the list of remaining parameters + if not add_missing: + visible_param = [] + hidden_output_param = [] +- ++ + # Now output the missing parameters. Warn about visible ones. + if len(visible_param)>0 and not template is None: + output.write( +@@ -2343,12 +2343,12 @@ class PY8Card(ConfigFile): + """%(' for subrun %d'%self['Main:subrun'] if 'Main:subrun' in self else '')) + for param in hidden_output_param: + if param.lower() in self.comments: +- comment = '\n'.join('! %s'%c for c in ++ comment = '\n'.join('! %s'%c for c in + self.comments[param.lower()].split('\n')) + output.write(comment+'\n') + output.write('%s=%s\n'%(param,PY8Card.pythia8_formatting(self[param]))) +- +- # Don't close the file if we were reading a subrun, but simply write ++ ++ # Don't close the file if we were reading a subrun, but simply write + # output and return now + if read_subrun: + output_file.write(output.getvalue()) +@@ -2382,12 +2382,12 @@ class PY8Card(ConfigFile): + out.close() + else: + output_file.write(output.getvalue()) +- ++ + def read(self, file_input, read_subrun=False, setter='default'): +- """Read the input file, this can be a path to a file, ++ """Read the input file, this can be a path to a file, + a file object, a str with the content of the file. +- The setter option choses the authority that sets potential +- modified/new parameters. It can be either: ++ The setter option choses the authority that sets potential ++ modified/new parameters. It can be either: + 'default' or 'user' or 'system'""" + if isinstance(file_input, str): + if "\n" in file_input: +@@ -2423,8 +2423,8 @@ class PY8Card(ConfigFile): + raise MadGraph5Error("Could not read line '%s' of Pythia8 card."%\ + line) + if '!' in value: +- value,_ = value.split('!',1) +- ++ value,_ = value.split('!',1) ++ + # Read a subrun if detected: + if param=='Main:subrun': + if read_subrun: +@@ -2451,7 +2451,7 @@ class PY8Card(ConfigFile): + last_pos = finput.tell() + line = finput.readline() + continue +- ++ + # Read parameter. The case of a parameter not defined in the card is + # handled directly in ConfigFile. + +@@ -2478,7 +2478,7 @@ class PY8SubRun(PY8Card): + + def __init__(self, *args, **opts): + """ Initialize a subrun """ +- ++ + # Force user to set it manually. + subrunID = -1 + if 'subrun_id' in opts: +@@ -2489,7 +2489,7 @@ class PY8SubRun(PY8Card): + + def default_setup(self): + """Sets up the list of available PY8SubRun parameters.""" +- ++ + # Add all default PY8Card parameters + super(PY8SubRun, self).default_setup() + # Make sure they are all hidden +@@ -2501,33 +2501,33 @@ class PY8SubRun(PY8Card): + self.add_param("Main:subrun", -1) + self.add_param("Beams:LHEF", "events.lhe.gz") + +- ++ + class RunBlock(object): + """ Class for a series of parameter in the run_card that can be either + visible or hidden. +- name: allow to set in the default run_card $name to set where that ++ name: allow to set in the default run_card $name to set where that + block need to be inserted + template_on: information to include is block is active + template_off: information to include is block is not active + on_fields/off_fields: paramater associated to the block +- can be specify but are otherwise automatically but ++ can be specify but are otherwise automatically but + otherwise determined from the template. +- ++ + function: + status(self,run_card) -> return which template need to be used + check_validity(self, runcard) -> sanity check +- create_default_for_process(self, run_card, proc_characteristic, +- history, proc_def) ++ create_default_for_process(self, run_card, proc_characteristic, ++ history, proc_def) + post_set_XXXX(card, value, change_userdefine, raiseerror) + -> fct called when XXXXX is set + post_set(card, value, change_userdefine, raiseerror, **opt) + -> fct called when a parameter is changed +- -> no access to parameter name ++ -> no access to parameter name + -> not called if post_set_XXXX is defined + """ +- + +- ++ ++ + def __init__(self, name, template_on, template_off, on_fields=False, off_fields=False): + + self.name = name +@@ -2550,7 +2550,7 @@ class RunBlock(object): + def find_fields_from_template(template): + """ return the list of fields from a template. checking line like + %(mass_ion2)s = mass_ion2 # mass of the heavy ion (second beam) """ +- ++ + return re.findall(r"^\s*%\((.*)\)s\s*=\s*\1", template, re.M) + + def get_template(self, card): +@@ -2565,7 +2565,7 @@ class RunBlock(object): + if self.status(card): + return self.template_off + else: +- return self.template_on ++ return self.template_on + + def status(self, card): + """return False if template_off to be used, True if template_on to be used""" +@@ -2594,20 +2594,20 @@ class RunBlock(object): + written.add(name) + if name in to_write: + to_write.remove(name) +- ++ + def check_validity(self, runcard): + """run self consistency check here --avoid to use runcard[''] = xxx here since it can trigger post_set function""" + return + + def create_default_for_process(self, run_card, proc_characteristic, history, proc_def): +- return ++ return + + # @staticmethod + # def post_set(card, value, change_userdefine, raiseerror, **opt): + # """default action to run when a parameter of the block is defined. + # Here we do not know which parameter is modified. if this is needed. + # then one need to define post_set_XXXXX(card, value, change_userdefine, raiseerror) +-# and then only that function is used ++# and then only that function is used + # """ + # + # if 'pdlabel' in card.user_set: +@@ -2621,7 +2621,7 @@ class RunCard(ConfigFile): + + blocks = [] + parameter_in_block = {} +- allowed_lep_densities = {} ++ allowed_lep_densities = {} + default_include_file = 'run_card.inc' + default_autodef_file = 'run.inc' + donewarning = [] +@@ -2637,7 +2637,7 @@ class RunCard(ConfigFile): + curr_dir = os.path.dirname(os.path.dirname(finput.name)) + elif isinstance(finput, str): + curr_dir = os.path.dirname(os.path.dirname(finput)) +- ++ + if curr_dir: + if os.path.exists(pjoin(curr_dir, 'bin', 'internal', 'plugin_run_card')): + # expected format {} passing everything as optional argument +@@ -2646,7 +2646,7 @@ class RunCard(ConfigFile): + continue + opts = dict(eval(line)) + self.add_param(**opts) +- ++ + @classmethod + def fill_post_set_from_blocks(cls): + """set the post_set function for any parameter defined in a run_block""" +@@ -2659,8 +2659,8 @@ class RunCard(ConfigFile): + elif hasattr(block, 'post_set'): + setattr(cls, 'post_set_%s' % parameter, block.post_set) + cls.parameter_in_block[parameter] = block +- +- ++ ++ + def __new__(cls, finput=None, **opt): + + cls.fill_post_set_from_blocks() +@@ -2718,9 +2718,9 @@ class RunCard(ConfigFile): + return super(RunCard, cls).__new__(cls, finput, **opt) + + def __init__(self, *args, **opts): +- ++ + # The following parameter are updated in the defaultsetup stage. +- ++ + #parameter for which no warning should be raised if not define + self.hidden_param = [] + # in which include file the parameer should be written +@@ -2739,11 +2739,11 @@ class RunCard(ConfigFile): + self.cuts_parameter = {} + # parameter added where legacy requires an older value. + self.system_default = {} +- ++ + self.display_block = [] # set some block to be displayed + self.fct_mod = {} # {param: (fct_pointer, *argument, **opts)} + +- self.cut_class = {} ++ self.cut_class = {} + self.warned=False + + +@@ -2776,11 +2776,11 @@ class RunCard(ConfigFile): + else: + cls.allowed_lep_densities[identity].append(name) + +- def add_param(self, name, value, fortran_name=None, include=True, ++ def add_param(self, name, value, fortran_name=None, include=True, + hidden=False, legacy=False, cut=False, system=False, sys_default=None, + autodef=False, fct_mod=None, + **opts): +- """ add a parameter to the card. value is the default value and ++ """ add a parameter to the card. value is the default value and + defines the type (int/float/bool/str) of the input. + fortran_name: defines what is the associate name in the f77 code + include: defines if we have to put the value in the include file +@@ -2795,7 +2795,7 @@ class RunCard(ConfigFile): + fct_mod: defines a function to run if the parameter is modify in the include file + options of **opts: + - allowed: list of valid options. '*' means anything else should be allowed. +- empty list means anything possible as well. ++ empty list means anything possible as well. + - comment: add comment for writing/help + - typelist: type of the list if default is empty + """ +@@ -2823,9 +2823,9 @@ class RunCard(ConfigFile): + self.fct_mod[name] = fct_mod + + def read(self, finput, consistency=True, unknown_warning=True, **opt): +- """Read the input file, this can be a path to a file, ++ """Read the input file, this can be a path to a file, + a file object, a str with the content of the file.""" +- ++ + if isinstance(finput, str): + if "\n" in finput: + finput = finput.split('\n') +@@ -2836,7 +2836,7 @@ class RunCard(ConfigFile): + finput = open(finput) + else: + raise Exception("No such file %s" % finput) +- ++ + for line in finput: + line = line.split('#')[0] + line = line.split('!')[0] +@@ -2864,8 +2864,8 @@ class RunCard(ConfigFile): + This is based on the guess_entry_fromname for the various syntax providing input. + This then call add_param accordingly. + +- This function does not returns anything. +- """ ++ This function does not returns anything. ++ """ + + if name == "dsqrt_q2fact1" and not self.LO: + raise InvalidRunCard("Looks like you passed a LO run_card for a NLO run. Please correct") +@@ -2903,7 +2903,7 @@ class RunCard(ConfigFile): + " The type was assigned to %s. \n"+\ + " The definition of that variable will %sbe automatically added to fortran file %s\n"+\ + " The value of that variable will %sbe passed to the fortran code via fortran file %s",\ +- name, value, vartype if vartype != "list" else "list of %s" % opts.get('typelist').__name__, ++ name, value, vartype if vartype != "list" else "list of %s" % opts.get('typelist').__name__, + "" if opts.get('autodef', False) else "not", "" if opts.get('autodef', False) in [True,False] else opts.get('autodef'), + "" if opts.get('include', True) else "not", "" if opts.get('include', True) in [True,False] else opts.get('include')) + RunCard.donewarning.append(name) +@@ -2923,19 +2923,19 @@ class RunCard(ConfigFile): + return False + elif line.strip().startswith('%'): + parameter = line[line.find('(')+1:line.find(')')] +- ++ + try: + cond = self.cuts_parameter[parameter] + except KeyError: + return True +- +- ++ ++ + if template_options.get(cond, default) or cond is True: + return True + else: +- return False ++ return False + else: +- return True ++ return True + + + def reset_simd(self, old_value, new_value, name, *args, **opts): +@@ -2946,28 +2946,28 @@ class RunCard(ConfigFile): + raise Exception('pass make clean for ', dir) + + def make_Ptouch(self,old_value, new_value, name, reset): +- raise Exception('pass Ptouch for ', reset) +- ++ raise Exception('pass Ptouch for ', reset) ++ + def write(self, output_file, template=None, python_template=False, + write_hidden=False, template_options=None, **opt): +- """Write the run_card in output_file according to template ++ """Write the run_card in output_file according to template + (a path to a valid run_card)""" + +- to_write = set(self.user_set) ++ to_write = set(self.user_set) + written = set() + if not template: + raise Exception + if not template_options: + template_options = collections.defaultdict(str) +- ++ + if python_template: + text = open(template,'r').read() +- text = text.split('\n') ++ text = text.split('\n') + # remove if templating +- text = [l if not l.startswith('#IF') else l[l.find(')# ')+2:] ++ text = [l if not l.startswith('#IF') else l[l.find(')# ')+2:] + for l in text if self.valid_line(l, template_options)] + text ='\n'.join(text) +- ++ + if python_template and not to_write: + import string + if self.blocks: +@@ -2981,14 +2981,14 @@ class RunCard(ConfigFile): + if not self.list_parameter: + text = text % self + else: +- data = dict((key.lower(),value) for key, value in self.items()) ++ data = dict((key.lower(),value) for key, value in self.items()) + for name in self.list_parameter: + if self.list_parameter[name] != str: + data[name] = ', '.join(str(v) for v in data[name]) + else: + data[name] = "['%s']" % "', '".join(str(v) for v in data[name]) + text = text % data +- else: ++ else: + text = "" + for line in open(template,'r'): + nline = line.split('#')[0] +@@ -3005,11 +3005,11 @@ class RunCard(ConfigFile): + this_group = this_group[0] + text += this_group.get_template(self) % self + this_group.manage_parameters(self, written, to_write) +- ++ + elif len(nline) != 2: + text += line + elif nline[1].strip() in self: +- ++ + name = nline[1].strip().lower() + value = self[name] + if name in self.list_parameter: +@@ -3026,15 +3026,15 @@ class RunCard(ConfigFile): + else: + endline = '' + text += ' %s\t= %s %s%s' % (value, name, comment, endline) +- written.add(name) ++ written.add(name) + + if name in to_write: + to_write.remove(name) + else: + logger.info('Adding missing parameter %s to current %s (with default value)', + (name, self.filename)) +- written.add(name) +- text += line ++ written.add(name) ++ text += line + + for b in self.blocks: + if b.status(self): +@@ -3057,7 +3057,7 @@ class RunCard(ConfigFile): + else: + #partial writting -> add only what is needed + to_add = [] +- for line in b.get_template(self).split('\n'): ++ for line in b.get_template(self).split('\n'): + nline = line.split('#')[0] + nline = nline.split('!')[0] + nline = nline.split('=') +@@ -3072,8 +3072,8 @@ class RunCard(ConfigFile): + continue #already include before + else: + to_add.append(line % {nline[1].strip():value, name:value}) +- written.add(name) +- ++ written.add(name) ++ + if name in to_write: + to_write.remove(name) + else: +@@ -3095,13 +3095,13 @@ class RunCard(ConfigFile): + text += '\n'.join(to_add) + + if to_write or write_hidden: +- text+="""#********************************************************************* ++ text+="""#********************************************************************* + # Additional hidden parameters + #********************************************************************* +-""" ++""" + if write_hidden: + # +- # do not write hidden parameter not hidden for this template ++ # do not write hidden parameter not hidden for this template + # + if python_template: + written = written.union(set(re.findall('\%\((\w*)\)s', open(template,'r').read(), re.M))) +@@ -3129,7 +3129,7 @@ class RunCard(ConfigFile): + if inc file does not exist we will return the current value (i.e. set has no change) + """ + +- #remember that ++ #remember that + # default_include_file is a class variable + # self.includepath is on the form include_path : [list of param ] + out = {} +@@ -3165,7 +3165,7 @@ class RunCard(ConfigFile): + + with open(pjoin(output_dir,path), 'r') as fsock: + text = fsock.read() +- ++ + for name in list_of_params: + misc.sprint(name, name in self.fortran_name) + misc.sprint(self.fortran_name[name] if name in self.fortran_name[name] else name) +@@ -3191,11 +3191,11 @@ class RunCard(ConfigFile): + misc.sprint(self.fortran_name) + misc.sprint(text) + raise Exception +- return out ++ return out + + + def get_default(self, name, default=None, log_level=None): +- """return self[name] if exist otherwise default. log control if we ++ """return self[name] if exist otherwise default. log control if we + put a warning or not if we use the default value""" + + lower_name = name.lower() +@@ -3216,13 +3216,13 @@ class RunCard(ConfigFile): + log_level = 20 + if not default: + default = dict.__getitem__(self, name.lower()) +- ++ + logger.log(log_level, '%s missed argument %s. Takes default: %s' + % (self.filename, name, default)) + self[name] = default + return default + else: +- return self[name] ++ return self[name] + + def mod_inc_pdlabel(self, value): + """flag pdlabel has 'dressed' if one of the special lepton PDF with beamstralung. +@@ -3237,16 +3237,16 @@ class RunCard(ConfigFile): + filelist is a list of input files (given by the user) + containing a series of function to be placed in replacement of standard + (typically dummy) functions of the code. +- This use LO/NLO class attribute that defines which function name need to +- be placed in which file. ++ This use LO/NLO class attribute that defines which function name need to ++ be placed in which file. + + First time this is used, a backup of the original file is done in order to +- recover if the user remove some of those files. ++ recover if the user remove some of those files. + + The function present in the file are determined automatically via regular expression. + and only that function is replaced in the associated file. + +- function in the filelist starting with user_ will also be include within the ++ function in the filelist starting with user_ will also be include within the + dummy_fct.f file + """ + +@@ -3269,7 +3269,7 @@ class RunCard(ConfigFile): + fsock = file_writers.FortranWriter(tmp,'w') + function_text = fsock.remove_routine(text, fct) + fsock.close() +- test = open(tmp,'r').read() ++ test = open(tmp,'r').read() + if fct not in self.dummy_fct_file: + if fct.startswith('user_'): + self.dummy_fct_file[fct] = self.dummy_fct_file['user_'] +@@ -3315,22 +3315,22 @@ class RunCard(ConfigFile): + - vartype: type of the variable + - name: name of the variable (stripped from metadata) + - options: additional options for the add_param +- rules: +- - if name starts with str_, int_, float_, bool_, list_, dict_ then ++ rules: ++ - if name starts with str_, int_, float_, bool_, list_, dict_ then + - vartype is set accordingly + - name is strip accordingly + - otherwise guessed from value (which is string) + - if name contains min/max + - vartype is set to float + - options has an added {'cut':True} +- - suffixes like ++ - suffixes like + - will be removed from named + - will be added in options (for add_param) as {'cut':True} + see add_param documentation for the list of supported options + - if include is on False set autodef to False (i.e. enforce it False for future change) + + """ +- # local function ++ # local function + def update_typelist(value, name, opts): + """convert a string to a list and update opts to keep track of the type """ + value = value.strip() +@@ -3358,7 +3358,7 @@ class RunCard(ConfigFile): + opts[key] = val + name = name.replace("<%s=%s>" %(key,val), '') + +- # get vartype ++ # get vartype + # first check that name does not force it + supported_type = ["str", "float", "int", "bool", "list", "dict"] + if "_" in name and name.split("_")[0].lower() in supported_type: +@@ -3406,13 +3406,13 @@ class RunCard(ConfigFile): + value = str(value).lower() + else: + assert formatv +- ++ + if formatv == 'bool': + if str(value) in ['1','T','.true.','True']: + return '.true.' + else: + return '.false.' +- ++ + elif formatv == 'int': + try: + return str(int(value)) +@@ -3422,12 +3422,12 @@ class RunCard(ConfigFile): + return str(int(fl)) + else: + raise +- ++ + elif formatv == 'float': + if isinstance(value, str): + value = value.replace('d','e') + return ('%.10e' % float(value)).replace('e','d') +- ++ + elif formatv == 'str': + # Check if it is a list + if value.strip().startswith('[') and value.strip().endswith(']'): +@@ -3437,20 +3437,20 @@ class RunCard(ConfigFile): + enumerate(elements)] + else: + return "'%s'" % value +- + +- ++ ++ + def check_validity(self, log_level=30): + """check that parameter missing in the card are set to the expected value""" + + for name, value in self.system_default.items(): + self.set(name, value, changeifuserset=False) +- ++ + + for name in self.includepath[False]: + to_bypass = self.hidden_param + list(self.legacy_parameter.keys()) + if name not in to_bypass: +- self.get_default(name, log_level=log_level) ++ self.get_default(name, log_level=log_level) + + for name in self.legacy_parameter: + if self[name] != self.legacy_parameter[name]: +@@ -3458,28 +3458,28 @@ class RunCard(ConfigFile): + + for block in self.blocks: + block.check_validity(self) +- ++ + + + def update_system_parameter_for_include(self): +- """update hidden system only parameter for the correct writtin in the ++ """update hidden system only parameter for the correct writtin in the + include""" + return + +- ++ + + def write_include_file(self, output_dir, output_file=None): + """Write the various include file in output_dir. + The entry True of self.includepath will be written in run_card.inc + The entry False will not be written anywhere + output_file allows testing by providing stream. +- This also call the function to add variable definition for the +- variable with autodef=True (handle by write_autodef function) ++ This also call the function to add variable definition for the ++ variable with autodef=True (handle by write_autodef function) + """ +- ++ + # ensure that all parameter are coherent and fix those if needed + self.check_validity() +- ++ + #ensusre that system only parameter are correctly set + self.update_system_parameter_for_include() + +@@ -3490,10 +3490,10 @@ class RunCard(ConfigFile): + self.write_autodef(output_dir, output_file=None) + # check/fix status of customised functions + self.edit_dummy_fct_from_file(self["custom_fcts"], os.path.dirname(output_dir)) +- ++ + for incname in self.includepath: + self.write_one_include_file(output_dir, incname, output_file) +- ++ + for name,value in value_in_old_include.items(): + if value != self[name]: + self.fct_mod[name][0](value, self[name], name, *self.fct_mod[name][1],**self.fct_mod[name][2]) +@@ -3515,13 +3515,13 @@ class RunCard(ConfigFile): + fsock = file_writers.FortranWriter(pjoin(output_dir,pathinc+'.tmp')) + + +- for key in self.includepath[incname]: ++ for key in self.includepath[incname]: + #define the fortran name + if key in self.fortran_name: + fortran_name = self.fortran_name[key] + else: + fortran_name = key +- ++ + if incname in self.include_as_parameter: + fsock.writelines('INTEGER %s\n' % fortran_name) + #get the value with warning if the user didn't set it +@@ -3534,7 +3534,7 @@ class RunCard(ConfigFile): + # in case of a list, add the length of the list as 0th + # element in fortran. Only in case of integer or float + # list (not for bool nor string) +- targettype = self.list_parameter[key] ++ targettype = self.list_parameter[key] + if targettype is bool: + pass + elif targettype is int: +@@ -3550,7 +3550,7 @@ class RunCard(ConfigFile): + elif isinstance(value, dict): + for fortran_name, onevalue in value.items(): + line = '%s = %s \n' % (fortran_name, self.f77_formatting(onevalue)) +- fsock.writelines(line) ++ fsock.writelines(line) + elif isinstance(incname,str) and 'compile' in incname: + if incname in self.include_as_parameter: + line = 'PARAMETER (%s=%s)' %( fortran_name, value) +@@ -3585,7 +3585,7 @@ class RunCard(ConfigFile): + filetocheck = dict(self.definition_path) + if True not in self.definition_path: + filetocheck[True] = [] +- ++ + + for incname in filetocheck: + if incname is True: +@@ -3598,7 +3598,7 @@ class RunCard(ConfigFile): + if output_file: + fsock = output_file + input = fsock.getvalue() +- ++ + else: + input = open(pjoin(output_dir,pathinc),'r').read() + # do not define fsock here since we might not need to overwrite it +@@ -3608,7 +3608,7 @@ class RunCard(ConfigFile): + previous = re.findall(re_pat, input, re.M) + # now check which one needed to be added (and remove those identicaly defined) + to_add = [] +- for key in filetocheck[incname]: ++ for key in filetocheck[incname]: + curr_type = self[key].__class__.__name__ + length = "" + if curr_type in [list, "list"]: +@@ -3640,10 +3640,10 @@ class RunCard(ConfigFile): + fsock.truncate(0) + fsock.seek(0) + +- # remove outdated lines ++ # remove outdated lines + lines = input.split('\n') + if previous: +- out = [line for line in lines if not re.search(re_pat, line, re.M) or ++ out = [line for line in lines if not re.search(re_pat, line, re.M) or + re.search(re_pat, line, re.M).groups() not in previous] + else: + out = lines +@@ -3662,7 +3662,7 @@ class RunCard(ConfigFile): + stop = out.index('C STOP USER COMMON BLOCK') + out = out[:start]+ out[stop+1:] + #add new common-block +- if self.definition_path[incname]: ++ if self.definition_path[incname]: + out.append("C START USER COMMON BLOCK") + if isinstance(pathinc , str): + filename = os.path.basename(pathinc).split('.',1)[0] +@@ -3675,10 +3675,10 @@ class RunCard(ConfigFile): + filename = filename.upper() + out.append(" COMMON/USER_CUSTOM_%s/%s" %(filename,','.join( self.definition_path[incname]))) + out.append('C STOP USER COMMON BLOCK') +- ++ + if not output_file: + fsock.writelines(out) +- fsock.close() ++ fsock.close() + else: + # for iotest + out = ["%s\n" %l for l in out] +@@ -3702,7 +3702,7 @@ class RunCard(ConfigFile): + def get_banner_init_information(self): + """return a dictionary with the information needed to write + the first line of the block of the lhe file.""" +- ++ + output = {} + output["idbmup1"] = self.get_idbmup(self['lpp1']) + output["idbmup2"] = self.get_idbmup(self['lpp2']) +@@ -3713,7 +3713,7 @@ class RunCard(ConfigFile): + output["pdfsup1"] = self.get_pdf_id(self["pdlabel"]) + output["pdfsup2"] = self.get_pdf_id(self["pdlabel"]) + return output +- ++ + def get_pdf_id(self, pdf): + if pdf == "lhapdf": + lhaid = self["lhaid"] +@@ -3721,19 +3721,19 @@ class RunCard(ConfigFile): + return lhaid[0] + else: + return lhaid +- else: ++ else: + try: + return {'none': 0, 'iww': 0, 'eva':0, 'edff':0, 'chff':0, + 'cteq6_m':10000,'cteq6_l':10041,'cteq6l1':10042, + 'nn23lo':246800,'nn23lo1':247000,'nn23nlo':244800 +- }[pdf] ++ }[pdf] + except: +- return 0 +- ++ return 0 ++ + def get_lhapdf_id(self): + return self.get_pdf_id(self['pdlabel']) + +- def remove_all_cut(self): ++ def remove_all_cut(self): + """remove all the cut""" + + for name in self.cuts_parameter: +@@ -3749,7 +3749,7 @@ class RunCard(ConfigFile): + elif 'eta' in name: + self[name] = -1 + else: +- self[name] = 0 ++ self[name] = 0 + + ################################################################################################ + ### Define various template subpart for the LO Run_card +@@ -3767,11 +3767,11 @@ template_on = \ + %(nb_proton1)s = nb_proton1 # number of proton for the first beam + %(nb_neutron1)s = nb_neutron1 # number of neutron for the first beam + %(mass_ion1)s = mass_ion1 # mass of the heavy ion (first beam) +-# Note that seting differently the two beams only work if you use ++# Note that seting differently the two beams only work if you use + # group_subprocess=False when generating your matrix-element + %(nb_proton2)s = nb_proton2 # number of proton for the second beam + %(nb_neutron2)s = nb_neutron2 # number of neutron for the second beam +- %(mass_ion2)s = mass_ion2 # mass of the heavy ion (second beam) ++ %(mass_ion2)s = mass_ion2 # mass of the heavy ion (second beam) + """ + template_off = "# To see heavy ion options: type \"update ion_pdf\"" + +@@ -3834,11 +3834,11 @@ ecut_block = RunBlock('ecut', template_on=template_on, template_off=template_off + # Frame for polarization ------------------------------------------------------------------------------------ + template_on = \ + """#********************************************************************* +-# Frame where to evaluate the matrix-element (not the cut!) for polarization ++# Frame where to evaluate the matrix-element (not the cut!) for polarization + #********************************************************************* + %(me_frame)s = me_frame ! list of particles to sum-up to define the rest-frame + ! in which to evaluate the matrix-element +- ! [1,2] means the partonic center of mass ++ ! [1,2] means the partonic center of mass + """ + template_off = "" + frame_block = RunBlock('frame', template_on=template_on, template_off=template_off) +@@ -3891,7 +3891,7 @@ template_on = \ + # CONTROL The extra running scale (not QCD) * + # Such running is NOT include in systematics computation * + #*********************************************************************** +- %(fixed_extra_scale)s = fixed_extra_scale ! False means dynamical scale ++ %(fixed_extra_scale)s = fixed_extra_scale ! False means dynamical scale + %(mue_ref_fixed)s = mue_ref_fixed ! scale to use if fixed scale mode + %(mue_over_ref)s = mue_over_ref ! ratio to mur if dynamical scale + """ +@@ -3908,10 +3908,10 @@ template_on = \ + %(tmin_for_channel)s = tmin_for_channel ! limit the non-singular reach of --some-- channel of integration related to T-channel diagram (value between -1 and 0), -1 is no impact + %(survey_splitting)s = survey_splitting ! for loop-induced control how many core are used at survey for the computation of a single iteration. + %(survey_nchannel_per_job)s = survey_nchannel_per_job ! control how many Channel are integrated inside a single job on cluster/multicore +- %(refine_evt_by_job)s = refine_evt_by_job ! control the maximal number of events for the first iteration of the refine (larger means less jobs) ++ %(refine_evt_by_job)s = refine_evt_by_job ! control the maximal number of events for the first iteration of the refine (larger means less jobs) ++#********************************************************************* ++# Compilation flag. + #********************************************************************* +-# Compilation flag. +-#********************************************************************* + %(global_flag)s = global_flag ! fortran optimization flag use for the all code. + %(aloha_flag)s = aloha_flag ! fortran optimization flag for aloha function. Suggestions: '-ffast-math' + %(matrix_flag)s = matrix_flag ! fortran optimization flag for matrix.f function. Suggestions: '-O3' +@@ -3948,7 +3948,7 @@ class PDLabelBlock(RunBlock): + if card['pdlabel'] != card['pdlabel1']: + dict.__setitem__(card, 'pdlabel', card['pdlabel1']) + elif card['pdlabel1'] in sum(card.allowed_lep_densities.values(),[]): +- raise InvalidRunCard("Assymetric beam pdf not supported for e e collision with ISR/bemstralung option") ++ raise InvalidRunCard("Assymetric beam pdf not supported for e e collision with ISR/bemstralung option") + elif card['pdlabel2'] in sum(card.allowed_lep_densities.values(),[]): + raise InvalidRunCard("Assymetric beam pdf not supported for e e collision with ISR/bemstralung option") + elif card['pdlabel1'] == 'none': +@@ -3962,7 +3962,7 @@ class PDLabelBlock(RunBlock): + dict.__setitem__(card, 'pdlabel2', card['pdlabel']) + + if abs(card['lpp1']) == 1 == abs(card['lpp2']) and card['pdlabel1'] != card['pdlabel2']: +- raise InvalidRunCard("Assymetric beam pdf not supported for proton-proton collision") ++ raise InvalidRunCard("Assymetric beam pdf not supported for proton-proton collision") + + def status(self, card): + """return False if template_off to be used, True if template_on to be used""" +@@ -4028,7 +4028,7 @@ class FixedfacscaleBlock(RunBlock): + if name == 'fixed_fac_scale2' and 'fixed_fac_scale1' not in card.user_set: + dict.__setitem__(card, 'fixed_fac_scale1', card['fixed_fac_scale']) + if name == 'fixed_fac_scale1' and 'fixed_fac_scale2' not in card.user_set: +- dict.__setitem__(card, 'fixed_fac_scale2', card['fixed_fac_scale']) ++ dict.__setitem__(card, 'fixed_fac_scale2', card['fixed_fac_scale']) + + + def status(self, card): +@@ -4061,32 +4061,32 @@ fixedfacscale = FixedfacscaleBlock('fixed_fact_scale', template_on=template_on, + + class RunCardLO(RunCard): + """an object to handle in a nice way the run_card information""" +- ++ + blocks = [heavy_ion_block, beam_pol_block, syscalc_block, ecut_block, + frame_block, eva_scale_block, mlm_block, ckkw_block, psoptim_block, + pdlabel_block, fixedfacscale, running_block] + + dummy_fct_file = {"dummy_cuts": pjoin("SubProcesses","dummy_fct.f"), + "get_dummy_x1": pjoin("SubProcesses","dummy_fct.f"), +- "get_dummy_x1_x2": pjoin("SubProcesses","dummy_fct.f"), ++ "get_dummy_x1_x2": pjoin("SubProcesses","dummy_fct.f"), + "dummy_boostframe": pjoin("SubProcesses","dummy_fct.f"), + "user_dynamical_scale": pjoin("SubProcesses","dummy_fct.f"), + "bias_wgt_custom": pjoin("SubProcesses","dummy_fct.f"), + "user_": pjoin("SubProcesses","dummy_fct.f") # all function starting by user will be added to that file + } +- ++ + include_as_parameter = ['vector.inc'] + + if MG5DIR: + default_run_card = pjoin(MG5DIR, "internal", "default_run_card_lo.dat") +- ++ + def default_setup(self): + """default value for the run_card.dat""" +- ++ + self.add_param("run_tag", "tag_1", include=False) + self.add_param("gridpack", False) + self.add_param("time_of_flight", -1.0, include=False) +- self.add_param("nevents", 10000) ++ self.add_param("nevents", 10000) + self.add_param("iseed", 0) + self.add_param("python_seed", -2, include=False, hidden=True, comment="controlling python seed [handling in particular the final unweighting].\n -1 means use default from random module.\n -2 means set to same value as iseed") + self.add_param("lpp1", 1, fortran_name="lpp(1)", allowed=[-1,1,0,2,3,9,-2,-3,4,-4], +@@ -4106,7 +4106,7 @@ class RunCardLO(RunCard): + self.add_param('nb_neutron1', 0, hidden=True, allowed=[1,0, 126 , '*'],fortran_name="nb_neutron(1)", + comment='For heavy ion physics nb of neutron in the ion (for both beam but if group_subprocess was False)') + self.add_param('nb_neutron2', 0, hidden=True, allowed=[1,0, 126 , '*'],fortran_name="nb_neutron(2)", +- comment='For heavy ion physics nb of neutron in the ion (of beam 2 if group_subprocess was False )') ++ comment='For heavy ion physics nb of neutron in the ion (of beam 2 if group_subprocess was False )') + self.add_param('mass_ion1', -1.0, hidden=True, fortran_name="mass_ion(1)", + allowed=[-1,0, 0.938, 207.9766521*0.938, 0.000511, 0.105, '*'], + comment='For heavy ion physics mass in GeV of the ion (of beam 1)') +@@ -4133,11 +4133,11 @@ class RunCardLO(RunCard): + self.add_param("mue_over_ref", 1.0, hidden=True, comment='ratio mu_other/mu for dynamical scale') + self.add_param("ievo_eva",0,hidden=True, allowed=[0,1],fortran_name="ievo_eva", + comment='eva: 0 for EW pdf muf evolution by q^2; 1 for evo by pT^2') +- ++ + # Bias module options + self.add_param("bias_module", 'None', include=False, hidden=True) + self.add_param('bias_parameters', {'__type__':1.0}, include='BIAS/bias.inc', hidden=True) +- ++ + #matching + self.add_param("scalefact", 1.0) + self.add_param("ickkw", 0, allowed=[0,1], hidden=True, comment="\'0\' for standard fixed order computation.\n\'1\' for MLM merging activates alphas and pdf re-weighting according to a kt clustering of the QCD radiation.") +@@ -4221,7 +4221,7 @@ class RunCardLO(RunCard): + self.add_param("mmaa", 0.0, cut='aa') + self.add_param("mmll", 0.0, cut='ll') + self.add_param("mmjjmax", -1.0, cut='jj') +- self.add_param("mmbbmax", -1.0, cut='bb') ++ self.add_param("mmbbmax", -1.0, cut='bb') + self.add_param("mmaamax", -1.0, cut='aa') + self.add_param("mmllmax", -1.0, cut='ll') + self.add_param("mmnl", 0.0, cut='LL') +@@ -4231,9 +4231,9 @@ class RunCardLO(RunCard): + self.add_param("ptllmax", -1.0, cut='ll') + self.add_param("xptj", 0.0, cut='jj') + self.add_param("xptb", 0.0, cut='bb') +- self.add_param("xpta", 0.0, cut='aa') ++ self.add_param("xpta", 0.0, cut='aa') + self.add_param("xptl", 0.0, cut='ll') +- # ordered pt jet ++ # ordered pt jet + self.add_param("ptj1min", 0.0, cut='jj') + self.add_param("ptj1max", -1.0, cut='jj') + self.add_param("ptj2min", 0.0, cut='jj') +@@ -4241,7 +4241,7 @@ class RunCardLO(RunCard): + self.add_param("ptj3min", 0.0, cut='jjj') + self.add_param("ptj3max", -1.0, cut='jjj') + self.add_param("ptj4min", 0.0, cut='j'*4) +- self.add_param("ptj4max", -1.0, cut='j'*4) ++ self.add_param("ptj4max", -1.0, cut='j'*4) + self.add_param("cutuse", 0, cut='jj') + # ordered pt lepton + self.add_param("ptl1min", 0.0, cut='l'*2) +@@ -4249,7 +4249,7 @@ class RunCardLO(RunCard): + self.add_param("ptl2min", 0.0, cut='l'*2) + self.add_param("ptl2max", -1.0, cut='l'*2) + self.add_param("ptl3min", 0.0, cut='l'*3) +- self.add_param("ptl3max", -1.0, cut='l'*3) ++ self.add_param("ptl3max", -1.0, cut='l'*3) + self.add_param("ptl4min", 0.0, cut='l'*4) + self.add_param("ptl4max", -1.0, cut='l'*4) + # Ht sum of jets +@@ -4257,7 +4257,7 @@ class RunCardLO(RunCard): + self.add_param("htjmax", -1.0, cut='j'*2) + self.add_param("ihtmin", 0.0, cut='J'*2) + self.add_param("ihtmax", -1.0, cut='J'*2) +- self.add_param("ht2min", 0.0, cut='J'*3) ++ self.add_param("ht2min", 0.0, cut='J'*3) + self.add_param("ht3min", 0.0, cut='J'*3) + self.add_param("ht4min", 0.0, cut='J'*4) + self.add_param("ht2max", -1.0, cut='J'*3) +@@ -4267,7 +4267,7 @@ class RunCardLO(RunCard): + self.add_param("ptgmin", 0.0, cut='aj') + self.add_param("r0gamma", 0.4, hidden=True) + self.add_param("xn", 1.0, hidden=True) +- self.add_param("epsgamma", 1.0, hidden=True) ++ self.add_param("epsgamma", 1.0, hidden=True) + self.add_param("isoem", True, hidden=True) + self.add_param("xetamin", 0.0, cut='jj') + self.add_param("deltaeta", 0.0, cut='j'*2) +@@ -4280,7 +4280,7 @@ class RunCardLO(RunCard): + self.add_param("use_syst", True) + self.add_param('systematics_program', 'systematics', include=False, hidden=True, comment='Choose which program to use for systematics computation: none, systematics, syscalc') + self.add_param('systematics_arguments', ['--mur=0.5,1,2', '--muf=0.5,1,2', '--pdf=errorset'], include=False, hidden=True, comment='Choose the argment to pass to the systematics command. like --mur=0.25,1,4. Look at the help of the systematics function for more details.') +- ++ + self.add_param("sys_scalefact", "0.5 1 2", include=False, hidden=True) + self.add_param("sys_alpsfact", "None", include=False, hidden=True) + self.add_param("sys_matchscale", "auto", include=False, hidden=True) +@@ -4315,8 +4315,8 @@ class RunCardLO(RunCard): + self.add_param('aloha_flag', '', include=False, hidden=True, comment='global fortran compilation flag, suggestion: -ffast-math', + fct_mod=(self.make_clean, ('Source/DHELAS'),{})) + self.add_param('matrix_flag', '', include=False, hidden=True, comment='fortran compilation flag for the matrix-element files, suggestion -O3', +- fct_mod=(self.make_Ptouch, ('matrix'),{})) +- self.add_param('vector_size', 1, include='vector.inc', hidden=True, comment='lockstep size for parralelism run', ++ fct_mod=(self.make_Ptouch, ('matrix'),{})) ++ self.add_param('vector_size', 1, include='vector.inc', hidden=True, comment='lockstep size for parralelism run', + fortran_name='VECSIZE_MEMMAX', fct_mod=(self.reset_simd,(),{})) + + # parameter allowing to define simple cut via the pdg +@@ -4329,24 +4329,24 @@ class RunCardLO(RunCard): + self.add_param('eta_max_pdg',{'__type__':0.}, include=False,cut=True) + self.add_param('mxx_min_pdg',{'__type__':0.}, include=False,cut=True) + self.add_param('mxx_only_part_antipart', {'default':False}, include=False) +- ++ + self.add_param('pdg_cut',[0], system=True) # store which PDG are tracked + self.add_param('ptmin4pdg',[0.], system=True) # store pt min + self.add_param('ptmax4pdg',[-1.], system=True) + self.add_param('Emin4pdg',[0.], system=True) # store pt min +- self.add_param('Emax4pdg',[-1.], system=True) ++ self.add_param('Emax4pdg',[-1.], system=True) + self.add_param('etamin4pdg',[0.], system=True) # store pt min +- self.add_param('etamax4pdg',[-1.], system=True) ++ self.add_param('etamax4pdg',[-1.], system=True) + self.add_param('mxxmin4pdg',[-1.], system=True) + self.add_param('mxxpart_antipart', [False], system=True) +- +- +- ++ ++ ++ + def check_validity(self): + """ """ +- ++ + super(RunCardLO, self).check_validity() +- ++ + #Make sure that nhel is only either 0 (i.e. no MC over hel) or + #1 (MC over hel with importance sampling). In particular, it can + #no longer be > 1. +@@ -4357,12 +4357,12 @@ class RunCardLO(RunCard): + "not %s." % self['nhel']) + if int(self['maxjetflavor']) > 6: + raise InvalidRunCard('maxjetflavor should be lower than 5! (6 is partly supported)') +- ++ + if len(self['pdgs_for_merging_cut']) > 1000: + raise InvalidRunCard("The number of elements in "+\ + "'pdgs_for_merging_cut' should not exceed 1000.") + +- ++ + # some cut need to be deactivated in presence of isolation + if self['ptgmin'] > 0: + if self['pta'] > 0: +@@ -4370,18 +4370,18 @@ class RunCardLO(RunCard): + self['pta'] = 0.0 + if self['draj'] > 0: + logger.warning('draj cut discarded since photon isolation is used') +- self['draj'] = 0.0 +- +- # special treatment for gridpack use the gseed instead of the iseed ++ self['draj'] = 0.0 ++ ++ # special treatment for gridpack use the gseed instead of the iseed + if self['gridrun']: + self['iseed'] = self['gseed'] +- ++ + #Some parameter need to be fixed when using syscalc + #if self['use_syst']: + # if self['scalefact'] != 1.0: + # logger.warning('Since use_syst=T, changing the value of \'scalefact\' to 1') + # self['scalefact'] = 1.0 +- ++ + # CKKW Treatment + if self['ickkw'] > 0: + if self['ickkw'] != 1: +@@ -4399,7 +4399,7 @@ class RunCardLO(RunCard): + raise InvalidRunCard('maxjetflavor at 6 is NOT supported for matching!') + if self['ickkw'] == 2: + # add warning if ckkw selected but the associate parameter are empty +- self.get_default('highestmult', log_level=20) ++ self.get_default('highestmult', log_level=20) + self.get_default('issgridfile', 'issudgrid.dat', log_level=20) + if self['xqcut'] > 0: + if self['ickkw'] == 0: +@@ -4412,13 +4412,13 @@ class RunCardLO(RunCard): + if self['drjl'] != 0: + if 'drjl' in self.user_set: + logger.warning('Since icckw>0, changing the value of \'drjl\' to 0') +- self['drjl'] = 0 +- if not self['auto_ptj_mjj']: ++ self['drjl'] = 0 ++ if not self['auto_ptj_mjj']: + if self['mmjj'] > self['xqcut']: + logger.warning('mmjj > xqcut (and auto_ptj_mjj = F). MMJJ set to 0') +- self['mmjj'] = 0.0 +- +- # check validity of the pdf set ++ self['mmjj'] = 0.0 ++ ++ # check validity of the pdf set + # note that pdlabel is automatically set to lhapdf if pdlabel1 or pdlabel2 is set to lhapdf + if self['pdlabel'] == 'lhapdf': + #add warning if lhaid not define +@@ -4426,7 +4426,7 @@ class RunCardLO(RunCard): + + mod = False + for i in [1,2]: +- lpp = 'lpp%i' %i ++ lpp = 'lpp%i' %i + pdlabelX = 'pdlabel%i' % i + if self[lpp] == 0: # nopdf + if self[pdlabelX] != 'none': +@@ -4459,12 +4459,12 @@ class RunCardLO(RunCard): + raise InvalidRunCard( "Heavy ion mode is only supported for lpp1=1/2") + if self['lpp2'] not in [1,2]: + if self['nb_proton2'] !=1 or self['nb_neutron2'] !=0: +- raise InvalidRunCard( "Heavy ion mode is only supported for lpp2=1/2") ++ raise InvalidRunCard( "Heavy ion mode is only supported for lpp2=1/2") + + + # check that fixed_fac_scale(1/2) is setting as expected + # if lpp=2/3/4 -> default is that beam in fixed scale +- # check that fixed_fac_scale is not setup if fixed_fac_scale1/2 are ++ # check that fixed_fac_scale is not setup if fixed_fac_scale1/2 are + # check that both fixed_fac_scale1/2 are defined together + # ensure that fixed_fac_scale1 and fixed_fac_scale2 are setup as needed + if 'fixed_fac_scale1' in self.user_set: +@@ -4475,13 +4475,13 @@ class RunCardLO(RunCard): + elif 'fixed_fac_scale' in self.user_set: + logger.warning('fixed_fac_scale and fixed_fac_scale1 are defined but not fixed_fac_scale2. The value of fixed_fac_scale2 will be set to the one of fixed_fac_scale.') + self['fixed_fac_scale2'] = self['fixed_fac_scale'] +- elif self['lpp2'] !=0: ++ elif self['lpp2'] !=0: + raise Exception('fixed_fac_scale2 not defined while fixed_fac_scale1 is. Please fix your run_card.') + elif 'fixed_fac_scale2' in self.user_set: + if 'fixed_fac_scale' in self.user_set: + logger.warning('fixed_fac_scale and fixed_fac_scale2 are defined but not fixed_fac_scale1. The value of fixed_fac_scale1 will be set to the one of fixed_fac_scale.') + self['fixed_fac_scale1'] = self['fixed_fac_scale'] +- elif self['lpp1'] !=0: ++ elif self['lpp1'] !=0: + raise Exception('fixed_fac_scale1 not defined while fixed_fac_scale2 is. Please fix your run_card.') + else: + if 'fixed_fac_scale' in self.user_set: +@@ -4500,12 +4500,12 @@ class RunCardLO(RunCard): + logger.warning('fixed_fac_scale1 not defined whithin your run_card. Using default value: %s', self['fixed_fac_scale1']) + logger.warning('fixed_fac_scale2 not defined whithin your run_card. Using default value: %s', self['fixed_fac_scale2']) + +- # check if lpp = ++ # check if lpp = + if self['pdlabel'] not in sum(self.allowed_lep_densities.values(),[]): + for i in [1,2]: + if abs(self['lpp%s' % i ]) in [3,4] and self['fixed_fac_scale%s' % i] and self['dsqrt_q2fact%s'%i] == 91.188: + logger.warning("Vector boson from lepton PDF is using fixed scale value of muf [dsqrt_q2fact%s]. Looks like you kept the default value (Mz). Is this really the cut-off that you want to use?" % i) +- ++ + if abs(self['lpp%s' % i ]) == 2 and self['fixed_fac_scale%s' % i] and self['dsqrt_q2fact%s'%i] == 91.188: + if self['pdlabel'] in ['edff','chff']: + logger.warning("Since 3.5.0 exclusive photon-photon processes in ultraperipheral proton and nuclear collisions from gamma-UPC (arXiv:2207.03012) will ignore the factorisation scale.") +@@ -4515,10 +4515,10 @@ class RunCardLO(RunCard): + + if six.PY2 and self['hel_recycling']: + self['hel_recycling'] = False +- logger.warning("""Helicity recycling optimization requires Python3. This optimzation is therefore deactivated automatically. ++ logger.warning("""Helicity recycling optimization requires Python3. This optimzation is therefore deactivated automatically. + In general this optimization speeds up the computation by a factor of two.""") + +- ++ + # check that ebeam is bigger than the associated mass. + for i in [1,2]: + if self['lpp%s' % i ] not in [1,2]: +@@ -4529,13 +4529,13 @@ class RunCardLO(RunCard): + logger.warning("At-rest proton mode set: energy beam set to 0.938") + self.set('ebeam%i' %i, 0.938) + else: +- raise InvalidRunCard("Energy for beam %i lower than proton mass. Please fix this") +- elif self['ebeam%i' % i] < self['mass_ion%i' % i]: ++ raise InvalidRunCard("Energy for beam %i lower than proton mass. Please fix this") ++ elif self['ebeam%i' % i] < self['mass_ion%i' % i]: + if self['ebeam%i' %i] == 0: + logger.warning("At rest ion mode set: Energy beam set to %s" % self['mass_ion%i' % i]) + self.set('ebeam%i' %i, self['mass_ion%i' % i]) +- +- ++ ++ + # check the tmin_for_channel is negative + if self['tmin_for_channel'] == 0: + raise InvalidRunCard('tmin_for_channel can not be set to 0.') +@@ -4543,15 +4543,15 @@ class RunCardLO(RunCard): + logger.warning('tmin_for_channel should be negative. Will be using -%f instead' % self['tmin_for_channel']) + self.set('tmin_for_channel', -self['tmin_for_channel']) + +- ++ + def update_system_parameter_for_include(self): + """system parameter need to be setupe""" +- ++ + # polarization + self['frame_id'] = sum(2**(n) for n in self['me_frame']) +- ++ + # set the pdg_for_cut fortran parameter +- pdg_to_cut = set(list(self['pt_min_pdg'].keys()) +list(self['pt_max_pdg'].keys()) + ++ pdg_to_cut = set(list(self['pt_min_pdg'].keys()) +list(self['pt_max_pdg'].keys()) + + list(self['e_min_pdg'].keys()) +list(self['e_max_pdg'].keys()) + + list(self['eta_min_pdg'].keys()) +list(self['eta_max_pdg'].keys())+ + list(self['mxx_min_pdg'].keys()) + list(self['mxx_only_part_antipart'].keys())) +@@ -4559,15 +4559,15 @@ class RunCardLO(RunCard): + pdg_to_cut.discard('default') + if len(pdg_to_cut)>25: + raise Exception("Maximum 25 different pdgs are allowed for pdg specific cut") +- ++ + if any(int(pdg)<0 for pdg in pdg_to_cut): + logger.warning('PDG specific cuts are always applied symmetrically on particles/anti-particles. Always use positve PDG codes') + raise MadGraph5Error('Some PDG specific cuts are defined using negative pdg code') +- +- ++ ++ + if any(pdg in pdg_to_cut for pdg in [1,2,3,4,5,21,22,11,13,15]): + raise Exception("Can not use PDG related cut for light quark/b quark/lepton/gluon/photon") +- ++ + if pdg_to_cut: + self['pdg_cut'] = list(pdg_to_cut) + self['ptmin4pdg'] = [] +@@ -4595,7 +4595,7 @@ class RunCardLO(RunCard): + self[new_var].append(self[old_var][str(pdg)] if str(pdg) in self[old_var] else default) + else: + if str(pdg) not in self[old_var]: +- raise Exception("no default value defined for %s and no value defined for pdg %s" % (old_var, pdg)) ++ raise Exception("no default value defined for %s and no value defined for pdg %s" % (old_var, pdg)) + self[new_var].append(self[old_var][str(pdg)]) + else: + self['pdg_cut'] = [0] +@@ -4605,11 +4605,11 @@ class RunCardLO(RunCard): + self['ptmax4pdg'] = [-1.] + self['Emax4pdg'] = [-1.] + self['etamax4pdg'] =[-1.] +- self['mxxmin4pdg'] =[0.] ++ self['mxxmin4pdg'] =[0.] + self['mxxpart_antipart'] = [False] +- +- +- ++ ++ ++ + def create_default_for_process(self, proc_characteristic, history, proc_def): + """Rules + process 1->N all cut set on off. +@@ -4626,7 +4626,7 @@ class RunCardLO(RunCard): + if proc_characteristic['loop_induced']: + self['nhel'] = 1 + self['pdgs_for_merging_cut'] = proc_characteristic['colored_pdgs'] +- ++ + if proc_characteristic['ninitial'] == 1: + #remove all cut + self.remove_all_cut() +@@ -4636,7 +4636,7 @@ class RunCardLO(RunCard): + # check for beam_id + beam_id = set() + beam_id_split = [set(), set()] +- for proc in proc_def: ++ for proc in proc_def: + for oneproc in proc: + for i,leg in enumerate(oneproc['legs']): + if not leg['state']: +@@ -4654,20 +4654,20 @@ class RunCardLO(RunCard): + maxjetflavor = max([4]+[abs(i) for i in beam_id if -7< i < 7]) + self['maxjetflavor'] = maxjetflavor + self['asrwgtflavor'] = maxjetflavor +- ++ + if any(i in beam_id for i in [1,-1,2,-2,3,-3,4,-4,5,-5,21,22]): + # check for e p collision + if any(id in beam_id for id in [11,-11,13,-13]): + self.display_block.append('beam_pol') + if any(id in beam_id_split[0] for id in [11,-11,13,-13]): +- self['lpp1'] = 0 +- self['lpp2'] = 1 +- self['ebeam1'] = '1k' +- self['ebeam2'] = '6500' ++ self['lpp1'] = 0 ++ self['lpp2'] = 1 ++ self['ebeam1'] = '1k' ++ self['ebeam2'] = '6500' + else: +- self['lpp1'] = 1 +- self['lpp2'] = 0 +- self['ebeam1'] = '6500' ++ self['lpp1'] = 1 ++ self['lpp2'] = 0 ++ self['ebeam1'] = '6500' + self['ebeam2'] = '1k' + + # UPC for p p collision +@@ -4677,7 +4677,7 @@ class RunCardLO(RunCard): + self['ebeam1'] = '6500' + self['ebeam2'] = '6500' + self['pdlabel'] = 'edff' +- ++ + elif any(id in beam_id for id in [11,-11,13,-13]): + self['lpp1'] = 0 + self['lpp2'] = 0 +@@ -4688,7 +4688,7 @@ class RunCardLO(RunCard): + self.display_block.append('ecut') + self.display_block.append('beam_pol') + +- ++ + + # check for possibility of eva + eva_in_b1 = any(i in beam_id_split[0] for i in [23,24,-24]) #,12,-12,14,-14]) +@@ -4701,10 +4701,10 @@ class RunCardLO(RunCard): + self['nhel'] = 1 + self['pdlabel'] = 'eva' + self['fixed_fac_scale'] = True +- self.display_block.append('beam_pol') ++ self.display_block.append('beam_pol') + + elif eva_in_b1: +- self.display_block.append('beam_pol') ++ self.display_block.append('beam_pol') + self['pdlabel1'] = 'eva' + self['fixed_fac_scale1'] = True + self['nhel'] = 1 +@@ -4724,7 +4724,7 @@ class RunCardLO(RunCard): + self['pdlabel2'] = 'eva' + self['fixed_fac_scale2'] = True + self['nhel'] = 1 +- self.display_block.append('beam_pol') ++ self.display_block.append('beam_pol') + for i in beam_id_split[0]: + if abs(i) == 11: + self['lpp1'] = math.copysign(3,i) +@@ -4740,34 +4740,34 @@ class RunCardLO(RunCard): + if any(i in beam_id for i in [22,23,24,-24,12,-12,14,-14]): + self.display_block.append('eva_scale') + +- # automatic polarisation of the beam if neutrino beam ++ # automatic polarisation of the beam if neutrino beam + if any(id in beam_id for id in [12,-12,14,-14,16,-16]): + self.display_block.append('beam_pol') + if any(id in beam_id_split[0] for id in [12,14,16]): +- self['lpp1'] = 0 +- self['ebeam1'] = '1k' ++ self['lpp1'] = 0 ++ self['ebeam1'] = '1k' + self['polbeam1'] = -100 + if not all(id in [12,14,16] for id in beam_id_split[0]): + logger.warning('Issue with default beam setup of neutrino in the run_card. Please check it up [polbeam1]. %s') + elif any(id in beam_id_split[0] for id in [-12,-14,-16]): +- self['lpp1'] = 0 +- self['ebeam1'] = '1k' ++ self['lpp1'] = 0 ++ self['ebeam1'] = '1k' + self['polbeam1'] = 100 + if not all(id in [-12,-14,-16] for id in beam_id_split[0]): +- logger.warning('Issue with default beam setup of neutrino in the run_card. Please check it up [polbeam1].') ++ logger.warning('Issue with default beam setup of neutrino in the run_card. Please check it up [polbeam1].') + if any(id in beam_id_split[1] for id in [12,14,16]): +- self['lpp2'] = 0 +- self['ebeam2'] = '1k' ++ self['lpp2'] = 0 ++ self['ebeam2'] = '1k' + self['polbeam2'] = -100 + if not all(id in [12,14,16] for id in beam_id_split[1]): + logger.warning('Issue with default beam setup of neutrino in the run_card. Please check it up [polbeam2].') + elif any(id in beam_id_split[1] for id in [-12,-14,-16]): +- self['lpp2'] = 0 +- self['ebeam2'] = '1k' ++ self['lpp2'] = 0 ++ self['ebeam2'] = '1k' + self['polbeam2'] = 100 + if not all(id in [-12,-14,-16] for id in beam_id_split[1]): + logger.warning('Issue with default beam setup of neutrino in the run_card. Please check it up [polbeam2].') +- ++ + # Check if need matching + min_particle = 99 + max_particle = 0 +@@ -4798,12 +4798,12 @@ class RunCardLO(RunCard): + else: + # all are jet => matching is ON + matching=True +- break +- ++ break ++ + if matching: + self['ickkw'] = 1 + self['xqcut'] = 30 +- #self['use_syst'] = False ++ #self['use_syst'] = False + self['drjj'] = 0 + self['drjl'] = 0 + self['sys_alpsfact'] = "0.5 1 2" +@@ -4811,8 +4811,8 @@ class RunCardLO(RunCard): + self.display_block.append('mlm') + self.display_block.append('ckkw') + self['dynamical_scale_choice'] = -1 +- +- ++ ++ + # For interference module, the systematics are wrong. + # automatically set use_syst=F and set systematics_program=none + no_systematics = False +@@ -4826,14 +4826,14 @@ class RunCardLO(RunCard): + continue + break + +- ++ + if interference or no_systematics: + self['use_syst'] = False + self['systematics_program'] = 'none' + if interference: + self['dynamical_scale_choice'] = 3 + self['sde_strategy'] = 2 +- ++ + # set default integration strategy + # interference case is already handle above + # here pick strategy 2 if only one QCD color flow +@@ -4852,7 +4852,7 @@ class RunCardLO(RunCard): + if pure_lepton and proton_initial: + self['sde_strategy'] = 1 + else: +- # check if multi-jet j ++ # check if multi-jet j + is_multijet = True + for proc in proc_def: + if any(abs(j.get('id')) not in jet_id for j in proc[0]['legs']): +@@ -4860,7 +4860,7 @@ class RunCardLO(RunCard): + break + if is_multijet: + self['sde_strategy'] = 2 +- ++ + # if polarization is used, set the choice of the frame in the run_card + # But only if polarization is used for massive particles + for plist in proc_def: +@@ -4870,7 +4870,7 @@ class RunCardLO(RunCard): + model = proc.get('model') + particle = model.get_particle(l.get('id')) + if particle.get('mass').lower() != 'zero': +- self.display_block.append('frame') ++ self.display_block.append('frame') + break + else: + continue +@@ -4894,15 +4894,15 @@ class RunCardLO(RunCard): + proc = proc_list[0] + if proc['forbidden_onsh_s_channels']: + self['sde_strategy'] = 1 +- ++ + if 'fix_scale' in proc_characteristic['limitations']: + self['fixed_ren_scale'] = 1 + self['fixed_fac_scale'] = 1 + if self['ickkw'] == 1: + logger.critical("MLM matching/merging not compatible with the model! You need to use another method to remove the double counting!") + self['ickkw'] = 0 +- +- # define class of particles present to hide all the cuts associated to ++ ++ # define class of particles present to hide all the cuts associated to + # not present class + cut_class = collections.defaultdict(int) + for proc in proc_def: +@@ -4925,41 +4925,41 @@ class RunCardLO(RunCard): + one_proc_cut['L'] += 1 + elif abs(pdg) in [12,14,16]: + one_proc_cut['n'] += 1 +- one_proc_cut['L'] += 1 ++ one_proc_cut['L'] += 1 + elif str(oneproc.get('model').get_particle(pdg)['mass']) != 'ZERO': + one_proc_cut['H'] += 1 +- ++ + for key, nb in one_proc_cut.items(): + cut_class[key] = max(cut_class[key], nb) + self.cut_class = dict(cut_class) + self.cut_class[''] = True #avoid empty +- ++ + # If model has running functionality add the additional parameter + model = proc_def[0][0].get('model') + if model['running_elements']: +- self.display_block.append('RUNNING') ++ self.display_block.append('RUNNING') + + + # Read file input/default_run_card_lo.dat + # This has to be LAST !! + if os.path.exists(self.default_run_card): + self.read(self.default_run_card, consistency=False) +- ++ + def write(self, output_file, template=None, python_template=False, + **opt): +- """Write the run_card in output_file according to template ++ """Write the run_card in output_file according to template + (a path to a valid run_card)""" + + + if not template: + if not MADEVENT: +- template = pjoin(MG5DIR, 'Template', 'LO', 'Cards', ++ template = pjoin(MG5DIR, 'Template', 'LO', 'Cards', + 'run_card.dat') + python_template = True + else: + template = pjoin(MEDIR, 'Cards', 'run_card_default.dat') + python_template = False +- ++ + + hid_lines = {'default':True}#collections.defaultdict(itertools.repeat(True).next) + if isinstance(output_file, str): +@@ -4975,9 +4975,9 @@ class RunCardLO(RunCard): + hid_lines[k1+k2] = True + + super(RunCardLO, self).write(output_file, template=template, +- python_template=python_template, ++ python_template=python_template, + template_options=hid_lines, +- **opt) ++ **opt) + + + class InvalidMadAnalysis5Card(InvalidCmd): +@@ -4986,19 +4986,19 @@ class InvalidMadAnalysis5Card(InvalidCmd): + class MadAnalysis5Card(dict): + """ A class to store a MadAnalysis5 card. Very basic since it is basically + free format.""" +- ++ + _MG5aMC_escape_tag = '@MG5aMC' +- ++ + _default_hadron_inputs = ['*.hepmc', '*.hep', '*.stdhep', '*.lhco','*.root'] + _default_parton_inputs = ['*.lhe'] + _skip_analysis = False +- ++ + @classmethod + def events_can_be_reconstructed(cls, file_path): + """ Checks from the type of an event file whether it can be reconstructed or not.""" + return not (file_path.endswith('.lhco') or file_path.endswith('.lhco.gz') or \ + file_path.endswith('.root') or file_path.endswith('.root.gz')) +- ++ + @classmethod + def empty_analysis(cls): + """ A method returning the structure of an empty analysis """ +@@ -5012,7 +5012,7 @@ class MadAnalysis5Card(dict): + 'reco_output':'lhe'} + + def default_setup(self): +- """define the default value""" ++ """define the default value""" + self['mode'] = 'parton' + self['inputs'] = [] + # None is the default stdout level, it will be set automatically by MG5aMC +@@ -5025,8 +5025,8 @@ class MadAnalysis5Card(dict): + # of this class and some other property could be added to this dictionary + # in the future. + self['analyses'] = {} +- # The recasting structure contains on set of commands and one set of +- # card lines. ++ # The recasting structure contains on set of commands and one set of ++ # card lines. + self['recasting'] = {'commands':[],'card':[]} + # Add the default trivial reconstruction to use an lhco input + # This is just for the structure +@@ -5035,7 +5035,7 @@ class MadAnalysis5Card(dict): + 'root_input': + MadAnalysis5Card.empty_reconstruction()} + self['reconstruction']['lhco_input']['reco_output']='lhco' +- self['reconstruction']['root_input']['reco_output']='root' ++ self['reconstruction']['root_input']['reco_output']='root' + + # Specify in which order the analysis/recasting were specified + self['order'] = [] +@@ -5049,7 +5049,7 @@ class MadAnalysis5Card(dict): + return + else: + dict.__init__(self) +- ++ + # Initialize it with all the default value + self.default_setup() + if not mode is None: +@@ -5058,15 +5058,15 @@ class MadAnalysis5Card(dict): + # if input is define read that input + if isinstance(finput, (file, str, StringIO.StringIO)): + self.read(finput, mode=mode) +- ++ + def read(self, input, mode=None): + """ Read an MA5 card""" +- ++ + if mode not in [None,'parton','hadron']: + raise MadGraph5Error('A MadAnalysis5Card can be read online the modes'+ + "'parton' or 'hadron'") + card_mode = mode +- ++ + if isinstance(input, (file, StringIO.StringIO)): + input_stream = input + elif isinstance(input, str): +@@ -5099,10 +5099,10 @@ class MadAnalysis5Card(dict): + except ValueError: + option = line[len(self._MG5aMC_escape_tag):] + option = option.strip() +- ++ + if option=='inputs': + self['inputs'].extend([v.strip() for v in value.split(',')]) +- ++ + elif option == 'skip_analysis': + self._skip_analysis = True + +@@ -5118,7 +5118,7 @@ class MadAnalysis5Card(dict): + except: + raise InvalidMadAnalysis5Card( + "MA5 output level specification '%s' is incorrect."%str(value)) +- ++ + elif option=='analysis_name': + current_type = 'analyses' + current_name = value +@@ -5127,7 +5127,7 @@ class MadAnalysis5Card(dict): + "Analysis '%s' already defined in MadAnalysis5 card"%current_name) + else: + self[current_type][current_name] = MadAnalysis5Card.empty_analysis() +- ++ + elif option=='set_reconstructions': + try: + reconstructions = eval(value) +@@ -5142,7 +5142,7 @@ class MadAnalysis5Card(dict): + "analysis in a MadAnalysis5 card.") + self[current_type][current_name]['reconstructions']=reconstructions + continue +- ++ + elif option=='reconstruction_name': + current_type = 'reconstruction' + current_name = value +@@ -5161,7 +5161,7 @@ class MadAnalysis5Card(dict): + raise InvalidMadAnalysis5Card( + "Option '%s' can only take the values 'lhe' or 'root'"%option) + self['reconstruction'][current_name]['reco_output'] = value.lower() +- ++ + elif option.startswith('recasting'): + current_type = 'recasting' + try: +@@ -5171,11 +5171,11 @@ class MadAnalysis5Card(dict): + if len(self['recasting'][current_name])>0: + raise InvalidMadAnalysis5Card( + "Only one recasting can be defined in MadAnalysis5 hadron card") +- ++ + else: + raise InvalidMadAnalysis5Card( + "Unreckognized MG5aMC instruction in MadAnalysis5 card: '%s'"%option) +- ++ + if option in ['analysis_name','reconstruction_name'] or \ + option.startswith('recasting'): + self['order'].append((current_type,current_name)) +@@ -5209,7 +5209,7 @@ class MadAnalysis5Card(dict): + self['inputs'] = self._default_hadron_inputs + else: + self['inputs'] = self._default_parton_inputs +- ++ + # Make sure at least one reconstruction is specified for each hadron + # level analysis and that it exists. + if self['mode']=='hadron': +@@ -5221,7 +5221,7 @@ class MadAnalysis5Card(dict): + analysis['reconstructions']): + raise InvalidMadAnalysis5Card('A reconstructions specified in'+\ + " analysis '%s' is not defined."%analysis_name) +- ++ + def write(self, output): + """ Write an MA5 card.""" + +@@ -5232,7 +5232,7 @@ class MadAnalysis5Card(dict): + else: + raise MadGraph5Error('Incorrect input for the write function of'+\ + ' the MadAnalysis5Card card. Received argument type is: %s'%str(type(output))) +- ++ + output_lines = [] + if self._skip_analysis: + output_lines.append('%s skip_analysis'%self._MG5aMC_escape_tag) +@@ -5240,11 +5240,11 @@ class MadAnalysis5Card(dict): + if not self['stdout_lvl'] is None: + output_lines.append('%s stdout_lvl=%s'%(self._MG5aMC_escape_tag,self['stdout_lvl'])) + for definition_type, name in self['order']: +- ++ + if definition_type=='analyses': + output_lines.append('%s analysis_name = %s'%(self._MG5aMC_escape_tag,name)) + output_lines.append('%s set_reconstructions = %s'%(self._MG5aMC_escape_tag, +- str(self['analyses'][name]['reconstructions']))) ++ str(self['analyses'][name]['reconstructions']))) + elif definition_type=='reconstruction': + output_lines.append('%s reconstruction_name = %s'%(self._MG5aMC_escape_tag,name)) + elif definition_type=='recasting': +@@ -5254,23 +5254,23 @@ class MadAnalysis5Card(dict): + output_lines.extend(self[definition_type][name]) + elif definition_type in ['reconstruction']: + output_lines.append('%s reco_output = %s'%(self._MG5aMC_escape_tag, +- self[definition_type][name]['reco_output'])) ++ self[definition_type][name]['reco_output'])) + output_lines.extend(self[definition_type][name]['commands']) + elif definition_type in ['analyses']: +- output_lines.extend(self[definition_type][name]['commands']) +- ++ output_lines.extend(self[definition_type][name]['commands']) ++ + output_stream.write('\n'.join(output_lines)) +- ++ + return +- +- def get_MA5_cmds(self, inputs_arg, submit_folder, run_dir_path=None, ++ ++ def get_MA5_cmds(self, inputs_arg, submit_folder, run_dir_path=None, + UFO_model_path=None, run_tag=''): +- """ Returns a list of tuples ('AnalysisTag',['commands']) specifying +- the commands of the MadAnalysis runs required from this card. +- At parton-level, the number of such commands is the number of analysis ++ """ Returns a list of tuples ('AnalysisTag',['commands']) specifying ++ the commands of the MadAnalysis runs required from this card. ++ At parton-level, the number of such commands is the number of analysis + asked for. In the future, the idea is that the entire card can be + processed in one go from MA5 directly.""" +- ++ + if isinstance(inputs_arg, list): + inputs = inputs_arg + elif isinstance(inputs_arg, str): +@@ -5278,21 +5278,21 @@ class MadAnalysis5Card(dict): + else: + raise MadGraph5Error("The function 'get_MA5_cmds' can only take "+\ + " a string or a list for the argument 'inputs_arg'") +- ++ + if len(inputs)==0: + raise MadGraph5Error("The function 'get_MA5_cmds' must have "+\ + " at least one input specified'") +- ++ + if run_dir_path is None: + run_dir_path = os.path.dirname(inputs_arg) +- ++ + cmds_list = [] +- ++ + UFO_load = [] + # first import the UFO if provided + if UFO_model_path: + UFO_load.append('import %s'%UFO_model_path) +- ++ + def get_import(input, type=None): + """ Generates the MA5 import commands for that event file. """ + dataset_name = os.path.basename(input).split('.')[0] +@@ -5304,7 +5304,7 @@ class MadAnalysis5Card(dict): + if not type is None: + res.append('set %s.type = %s'%(dataset_name, type)) + return res +- ++ + fifo_status = {'warned_fifo':False,'fifo_used_up':False} + def warn_fifo(input): + if not input.endswith('.fifo'): +@@ -5317,7 +5317,7 @@ class MadAnalysis5Card(dict): + logger.warning('Only the first MA5 analysis/reconstructions can be run on a fifo. Subsequent runs will skip fifo inputs.') + fifo_status['warned_fifo'] = True + return True +- ++ + # Then the event file(s) input(s) + inputs_load = [] + for input in inputs: +@@ -5325,16 +5325,16 @@ class MadAnalysis5Card(dict): + + if len(inputs) > 1: + inputs_load.append('set main.stacking_method = superimpose') +- ++ + submit_command = 'submit %s'%submit_folder+'_%s' +- ++ + # Keep track of the reconstruction outpus in the MA5 workflow + # Keys are reconstruction names and values are .lhe.gz reco file paths. + # We put by default already the lhco/root ones present + reconstruction_outputs = { +- 'lhco_input':[f for f in inputs if ++ 'lhco_input':[f for f in inputs if + f.endswith('.lhco') or f.endswith('.lhco.gz')], +- 'root_input':[f for f in inputs if ++ 'root_input':[f for f in inputs if + f.endswith('.root') or f.endswith('.root.gz')]} + + # If a recasting card has to be written out, chose here its path +@@ -5343,7 +5343,7 @@ class MadAnalysis5Card(dict): + + # Make sure to only run over one analysis over each fifo. + for definition_type, name in self['order']: +- if definition_type == 'reconstruction': ++ if definition_type == 'reconstruction': + analysis_cmds = list(self['reconstruction'][name]['commands']) + reco_outputs = [] + for i_input, input in enumerate(inputs): +@@ -5365,8 +5365,8 @@ class MadAnalysis5Card(dict): + analysis_cmds.append( + submit_command%('reco_%s_%d'%(name,i_input+1))) + analysis_cmds.append('remove reco_events') +- +- reconstruction_outputs[name]= [pjoin(run_dir_path,rec_out) ++ ++ reconstruction_outputs[name]= [pjoin(run_dir_path,rec_out) + for rec_out in reco_outputs] + if len(reco_outputs)>0: + cmds_list.append(('_reco_%s'%name,analysis_cmds)) +@@ -5386,7 +5386,7 @@ class MadAnalysis5Card(dict): + analysis_cmds = ['set main.mode = parton'] + else: + analysis_cmds = [] +- analysis_cmds.extend(sum([get_import(rec_out) for ++ analysis_cmds.extend(sum([get_import(rec_out) for + rec_out in reconstruction_outputs[reco]],[])) + analysis_cmds.extend(self['analyses'][name]['commands']) + analysis_cmds.append(submit_command%('%s_%s'%(name,reco))) +@@ -5427,12 +5427,12 @@ template_on = \ + %(mue_ref_fixed)s = mue_ref_fixed ! scale to use if fixed scale mode + """ + running_block_nlo = RunBlock('RUNNING', template_on=template_on, template_off="") +- ++ + class RunCardNLO(RunCard): + """A class object for the run_card for a (aMC@)NLO pocess""" +- ++ + LO = False +- ++ + blocks = [running_block_nlo] + + dummy_fct_file = {"dummy_cuts": pjoin("SubProcesses","dummy_fct.f"), +@@ -5443,11 +5443,11 @@ class RunCardNLO(RunCard): + + if MG5DIR: + default_run_card = pjoin(MG5DIR, "internal", "default_run_card_nlo.dat") +- +- ++ ++ + def default_setup(self): + """define the default value""" +- ++ + self.add_param('run_tag', 'tag_1', include=False) + self.add_param('nevents', 10000) + self.add_param('req_acc', -1.0, include=False) +@@ -5455,27 +5455,27 @@ class RunCardNLO(RunCard): + self.add_param("time_of_flight", -1.0, include=False) + self.add_param('event_norm', 'average') + #FO parameter +- self.add_param('req_acc_fo', 0.01, include=False) ++ self.add_param('req_acc_fo', 0.01, include=False) + self.add_param('npoints_fo_grid', 5000, include=False) + self.add_param('niters_fo_grid', 4, include=False) +- self.add_param('npoints_fo', 10000, include=False) ++ self.add_param('npoints_fo', 10000, include=False) + self.add_param('niters_fo', 6, include=False) + #seed and collider + self.add_param('iseed', 0) +- self.add_param('lpp1', 1, fortran_name='lpp(1)') +- self.add_param('lpp2', 1, fortran_name='lpp(2)') ++ self.add_param('lpp1', 1, fortran_name='lpp(1)') ++ self.add_param('lpp2', 1, fortran_name='lpp(2)') + self.add_param('ebeam1', 6500.0, fortran_name='ebeam(1)') +- self.add_param('ebeam2', 6500.0, fortran_name='ebeam(2)') ++ self.add_param('ebeam2', 6500.0, fortran_name='ebeam(2)') + self.add_param('pdlabel', 'nn23nlo', allowed=['lhapdf', 'emela', 'cteq6_m','cteq6_d','cteq6_l','cteq6l1', 'nn23lo','nn23lo1','nn23nlo','ct14q00','ct14q07','ct14q14','ct14q21'] +\ +- sum(self.allowed_lep_densities.values(),[]) ) ++ sum(self.allowed_lep_densities.values(),[]) ) + self.add_param('lhaid', [244600],fortran_name='lhaPDFid') + self.add_param('pdfscheme', 0) + # whether to include or not photon-initiated processes in lepton collisions + self.add_param('photons_from_lepton', True) + self.add_param('lhapdfsetname', ['internal_use_only'], system=True) +- # stuff for lepton collisions +- # these parameters are in general set automatically by eMELA in a consistent manner with the PDF set +- # whether the current PDF set has or not beamstrahlung ++ # stuff for lepton collisions ++ # these parameters are in general set automatically by eMELA in a consistent manner with the PDF set ++ # whether the current PDF set has or not beamstrahlung + self.add_param('has_bstrahl', False, system=True) + # renormalisation scheme of alpha + self.add_param('alphascheme', 0, system=True) +@@ -5486,31 +5486,31 @@ class RunCardNLO(RunCard): + # w contribution included or not in the running of alpha + self.add_param('w_run', 1, system=True) + #shower and scale +- self.add_param('parton_shower', 'HERWIG6', fortran_name='shower_mc') ++ self.add_param('parton_shower', 'HERWIG6', fortran_name='shower_mc') + self.add_param('shower_scale_factor',1.0) + self.add_param('mcatnlo_delta', False) + self.add_param('fixed_ren_scale', False) + self.add_param('fixed_fac_scale', False) + self.add_param('fixed_extra_scale', True, hidden=True, system=True) # set system since running from Ellis-Sexton scale not implemented +- self.add_param('mur_ref_fixed', 91.118) ++ self.add_param('mur_ref_fixed', 91.118) + self.add_param('muf1_ref_fixed', -1.0, hidden=True) +- self.add_param('muf_ref_fixed', 91.118) ++ self.add_param('muf_ref_fixed', 91.118) + self.add_param('muf2_ref_fixed', -1.0, hidden=True) +- self.add_param('mue_ref_fixed', 91.118, hidden=True) +- self.add_param("dynamical_scale_choice", [-1],fortran_name='dyn_scale', ++ self.add_param('mue_ref_fixed', 91.118, hidden=True) ++ self.add_param("dynamical_scale_choice", [-1],fortran_name='dyn_scale', + allowed = [-2,-1,0,1,2,3,10], comment="\'-1\' is based on CKKW back clustering (following feynman diagram).\n \'1\' is the sum of transverse energy.\n '2' is HT (sum of the transverse mass)\n '3' is HT/2, '0' allows to use the user_hook definition (need to be defined via custom_fct entry) ") + self.add_param('fixed_qes_scale', False, hidden=True) + self.add_param('qes_ref_fixed', -1.0, hidden=True) + self.add_param('mur_over_ref', 1.0) +- self.add_param('muf_over_ref', 1.0) +- self.add_param('muf1_over_ref', -1.0, hidden=True) ++ self.add_param('muf_over_ref', 1.0) ++ self.add_param('muf1_over_ref', -1.0, hidden=True) + self.add_param('muf2_over_ref', -1.0, hidden=True) + self.add_param('mue_over_ref', 1.0, hidden=True, system=True) # forbid the user to modigy due to incorrect handling of the Ellis-Sexton scale + self.add_param('qes_over_ref', -1.0, hidden=True) + self.add_param('reweight_scale', [True], fortran_name='lscalevar') +- self.add_param('rw_rscale_down', -1.0, hidden=True) ++ self.add_param('rw_rscale_down', -1.0, hidden=True) + self.add_param('rw_rscale_up', -1.0, hidden=True) +- self.add_param('rw_fscale_down', -1.0, hidden=True) ++ self.add_param('rw_fscale_down', -1.0, hidden=True) + self.add_param('rw_fscale_up', -1.0, hidden=True) + self.add_param('rw_rscale', [1.0,2.0,0.5], fortran_name='scalevarR') + self.add_param('rw_fscale', [1.0,2.0,0.5], fortran_name='scalevarF') +@@ -5523,60 +5523,60 @@ class RunCardNLO(RunCard): + + #technical + self.add_param('folding', [1,1,1], include=False) +- ++ + #merging + self.add_param('ickkw', 0, allowed=[-1,0,3,4], comment=" - 0: No merging\n - 3: FxFx Merging : http://amcatnlo.cern.ch/FxFx_merging.htm\n - 4: UNLOPS merging (No interface within MG5aMC)\n - -1: NNLL+NLO jet-veto computation. See arxiv:1412.8408 [hep-ph]") + self.add_param('bwcutoff', 15.0) +- #cuts ++ #cuts + self.add_param('jetalgo', 1.0) +- self.add_param('jetradius', 0.7) ++ self.add_param('jetradius', 0.7) + self.add_param('ptj', 10.0 , cut=True) +- self.add_param('etaj', -1.0, cut=True) +- self.add_param('gamma_is_j', True) ++ self.add_param('etaj', -1.0, cut=True) ++ self.add_param('gamma_is_j', True) + self.add_param('ptl', 0.0, cut=True) +- self.add_param('etal', -1.0, cut=True) ++ self.add_param('etal', -1.0, cut=True) + self.add_param('drll', 0.0, cut=True) +- self.add_param('drll_sf', 0.0, cut=True) ++ self.add_param('drll_sf', 0.0, cut=True) + self.add_param('mll', 0.0, cut=True) +- self.add_param('mll_sf', 30.0, cut=True) +- self.add_param('rphreco', 0.1) +- self.add_param('etaphreco', -1.0) +- self.add_param('lepphreco', True) +- self.add_param('quarkphreco', True) ++ self.add_param('mll_sf', 30.0, cut=True) ++ self.add_param('rphreco', 0.1) ++ self.add_param('etaphreco', -1.0) ++ self.add_param('lepphreco', True) ++ self.add_param('quarkphreco', True) + self.add_param('ptgmin', 20.0, cut=True) +- self.add_param('etagamma', -1.0) ++ self.add_param('etagamma', -1.0) + self.add_param('r0gamma', 0.4) +- self.add_param('xn', 1.0) ++ self.add_param('xn', 1.0) + self.add_param('epsgamma', 1.0) +- self.add_param('isoem', True) ++ self.add_param('isoem', True) + self.add_param('maxjetflavor', 4, hidden=True) +- self.add_param('pineappl', False) ++ self.add_param('pineappl', False) + self.add_param('lhe_version', 3, hidden=True, include=False) +- ++ + # customization + self.add_param("custom_fcts",[],typelist="str", include=False, comment="list of files containing function that overwritte dummy function of the code (like adding cuts/...)") + + #internal variable related to FO_analyse_card + self.add_param('FO_LHE_weight_ratio',1e-3, hidden=True, system=True) +- self.add_param('FO_LHE_postprocessing',['grouping','random'], ++ self.add_param('FO_LHE_postprocessing',['grouping','random'], + hidden=True, system=True, include=False) +- ++ + # parameter allowing to define simple cut via the pdg + self.add_param('pt_min_pdg',{'__type__':0.}, include=False,cut=True) + self.add_param('pt_max_pdg',{'__type__':0.}, include=False,cut=True) + self.add_param('mxx_min_pdg',{'__type__':0.}, include=False,cut=True) + self.add_param('mxx_only_part_antipart', {'default':False}, include=False, hidden=True) +- ++ + #hidden parameter that are transfer to the fortran code + self.add_param('pdg_cut',[0], hidden=True, system=True) # store which PDG are tracked + self.add_param('ptmin4pdg',[0.], hidden=True, system=True) # store pt min + self.add_param('ptmax4pdg',[-1.], hidden=True, system=True) + self.add_param('mxxmin4pdg',[0.], hidden=True, system=True) + self.add_param('mxxpart_antipart', [False], hidden=True, system=True) +- ++ + def check_validity(self): + """check the validity of the various input""" +- ++ + super(RunCardNLO, self).check_validity() + + # for lepton-lepton collisions, ignore 'pdlabel' and 'lhaid' +@@ -5588,12 +5588,12 @@ class RunCardNLO(RunCard): + # for dressed lepton collisions, check that the lhaid is a valid one + if self['pdlabel'] not in sum(self.allowed_lep_densities.values(),[]) + ['emela']: + raise InvalidRunCard('pdlabel %s not allowed for dressed-lepton collisions' % self['pdlabel']) +- ++ + elif self['pdlabel']!='nn23nlo' or self['reweight_pdf']: + self['pdlabel']='nn23nlo' + self['reweight_pdf']=[False] + logger.info('''Lepton-lepton collisions: ignoring PDF related parameters in the run_card.dat (pdlabel, lhaid, reweight_pdf, ...)''') +- ++ + if self['lpp1'] == 0 == self['lpp2']: + if self['pdlabel']!='nn23nlo' or self['reweight_pdf']: + self['pdlabel']='nn23nlo' +@@ -5601,8 +5601,8 @@ class RunCardNLO(RunCard): + logger.info('''Lepton-lepton collisions: ignoring PDF related parameters in the run_card.dat (pdlabel, lhaid, reweight_pdf, ...)''') + + # For FxFx merging, make sure that the following parameters are set correctly: +- if self['ickkw'] == 3: +- # 1. Renormalization and factorization (and ellis-sexton scales) are not fixed ++ if self['ickkw'] == 3: ++ # 1. Renormalization and factorization (and ellis-sexton scales) are not fixed + scales=['fixed_ren_scale','fixed_fac_scale','fixed_QES_scale'] + for scale in scales: + if self[scale]: +@@ -5615,7 +5615,7 @@ class RunCardNLO(RunCard): + self["reweight_scale"]=[self["reweight_scale"][0]] + logger.warning('''For consistency in FxFx merging, dynamical_scale_choice has been set to -1 (default)''' + ,'$MG:BOLD') +- ++ + # 2. Use kT algorithm for jets with pseudo-code size R=1.0 + jetparams=['jetradius','jetalgo'] + for jetparam in jetparams: +@@ -5628,8 +5628,8 @@ class RunCardNLO(RunCard): + self["dynamical_scale_choice"] = [-1] + self["reweight_scale"]=[self["reweight_scale"][0]] + logger.warning('''For consistency with the jet veto, the scale which will be used is ptj. dynamical_scale_choice will be set at -1.''' +- ,'$MG:BOLD') +- ++ ,'$MG:BOLD') ++ + # For interface to PINEAPPL, need to use LHAPDF and reweighting to get scale uncertainties + if self['pineappl'] and self['pdlabel'].lower() != 'lhapdf': + raise InvalidRunCard('PineAPPL generation only possible with the use of LHAPDF') +@@ -5661,7 +5661,7 @@ class RunCardNLO(RunCard): + if (self['rw_fscale_down'] != -1.0 and ['rw_fscale_down'] not in self['rw_fscale']) or\ + (self['rw_fscale_up'] != -1.0 and ['rw_fscale_up'] not in self['rw_fscale']): + self['rw_fscale']=[1.0,self['rw_fscale_up'],self['rw_fscale_down']] +- ++ + # PDF reweighting check + if any(self['reweight_pdf']): + # check that we use lhapdf if reweighting is ON +@@ -5672,7 +5672,7 @@ class RunCardNLO(RunCard): + if self['pdlabel'] != "lhapdf": + self['reweight_pdf']=[self['reweight_pdf'][0]] + self['lhaid']=[self['lhaid'][0]] +- ++ + # make sure set have reweight_scale and dyn_scale_choice of length 1 when fixed scales: + if self['fixed_ren_scale'] and self['fixed_fac_scale']: + self['reweight_scale']=[self['reweight_scale'][0]] +@@ -5685,7 +5685,7 @@ class RunCardNLO(RunCard): + self['reweight_pdf']=self['reweight_pdf']*len(self['lhaid']) + logger.warning("Setting 'reweight_pdf' for all 'lhaid' to %s" % self['reweight_pdf'][0]) + if len(self['reweight_scale']) == 1 and len(self['dynamical_scale_choice']) != 1: +- self['reweight_scale']=self['reweight_scale']*len(self['dynamical_scale_choice']) ++ self['reweight_scale']=self['reweight_scale']*len(self['dynamical_scale_choice']) + logger.warning("Setting 'reweight_scale' for all 'dynamical_scale_choice' to %s" % self['reweight_pdf'][0]) + + # Check that there are no identical elements in lhaid or dynamical_scale_choice +@@ -5693,7 +5693,7 @@ class RunCardNLO(RunCard): + raise InvalidRunCard("'lhaid' has two or more identical entries. They have to be all different for the code to work correctly.") + if len(self['dynamical_scale_choice']) != len(set(self['dynamical_scale_choice'])): + raise InvalidRunCard("'dynamical_scale_choice' has two or more identical entries. They have to be all different for the code to work correctly.") +- ++ + # Check that lenght of lists are consistent + if len(self['reweight_pdf']) != len(self['lhaid']): + raise InvalidRunCard("'reweight_pdf' and 'lhaid' lists should have the same length") +@@ -5730,7 +5730,7 @@ class RunCardNLO(RunCard): + if len(self['folding']) != 3: + raise InvalidRunCard("'folding' should contain exactly three integers") + for ifold in self['folding']: +- if ifold not in [1,2,4,8]: ++ if ifold not in [1,2,4,8]: + raise InvalidRunCard("The three 'folding' parameters should be equal to 1, 2, 4, or 8.") + # Check MC@NLO-Delta + if self['mcatnlo_delta'] and not self['parton_shower'].lower() == 'pythia8': +@@ -5746,11 +5746,11 @@ class RunCardNLO(RunCard): + logger.warning("At-rest proton mode set: energy beam set to 0.938 GeV") + self.set('ebeam%i' %i, 0.938) + else: +- raise InvalidRunCard("Energy for beam %i lower than proton mass. Please fix this") ++ raise InvalidRunCard("Energy for beam %i lower than proton mass. Please fix this") + + + def update_system_parameter_for_include(self): +- ++ + # set the pdg_for_cut fortran parameter + pdg_to_cut = set(list(self['pt_min_pdg'].keys()) +list(self['pt_max_pdg'].keys())+ + list(self['mxx_min_pdg'].keys())+ list(self['mxx_only_part_antipart'].keys())) +@@ -5758,12 +5758,12 @@ class RunCardNLO(RunCard): + pdg_to_cut.discard('default') + if len(pdg_to_cut)>25: + raise Exception("Maximum 25 different PDGs are allowed for PDG specific cut") +- ++ + if any(int(pdg)<0 for pdg in pdg_to_cut): + logger.warning('PDG specific cuts are always applied symmetrically on particles/anti-particles. Always use positve PDG codes') + raise MadGraph5Error('Some PDG specific cuts are defined using negative PDG codes') +- +- ++ ++ + if any(pdg in pdg_to_cut for pdg in [21,22,11,13,15]+ list(range(self['maxjetflavor']+1))): + # Note that this will double check in the fortran code + raise Exception("Can not use PDG related cuts for massless SM particles/leptons") +@@ -5790,7 +5790,7 @@ class RunCardNLO(RunCard): + self[new_var].append(self[old_var][str(pdg)] if str(pdg) in self[old_var] else default) + else: + if str(pdg) not in self[old_var]: +- raise Exception("no default value defined for %s and no value defined for pdg %s" % (old_var, pdg)) ++ raise Exception("no default value defined for %s and no value defined for pdg %s" % (old_var, pdg)) + self[new_var].append(self[old_var][str(pdg)]) + else: + self['pdg_cut'] = [0] +@@ -5800,12 +5800,12 @@ class RunCardNLO(RunCard): + self['mxxpart_antipart'] = [False] + + def write(self, output_file, template=None, python_template=False, **opt): +- """Write the run_card in output_file according to template ++ """Write the run_card in output_file according to template + (a path to a valid run_card)""" + + if not template: + if not MADEVENT: +- template = pjoin(MG5DIR, 'Template', 'NLO', 'Cards', ++ template = pjoin(MG5DIR, 'Template', 'NLO', 'Cards', + 'run_card.dat') + python_template = True + else: +@@ -5818,7 +5818,7 @@ class RunCardNLO(RunCard): + + def create_default_for_process(self, proc_characteristic, history, proc_def): + """Rules +- e+ e- beam -> lpp:0 ebeam:500 ++ e+ e- beam -> lpp:0 ebeam:500 + p p beam -> set maxjetflavor automatically + process with tagged photons -> gamma_is_j = false + process without QED splittings -> gamma_is_j = false, recombination = false +@@ -5844,19 +5844,19 @@ class RunCardNLO(RunCard): + self['ebeam2'] = 500 + else: + self['lpp1'] = 0 +- self['lpp2'] = 0 +- ++ self['lpp2'] = 0 ++ + if proc_characteristic['ninitial'] == 1: + #remove all cut + self.remove_all_cut() + + # check for tagged photons + tagged_particles = set() +- ++ + # If model has running functionality add the additional parameter + model = proc_def[0].get('model') + if model['running_elements']: +- self.display_block.append('RUNNING') ++ self.display_block.append('RUNNING') + + # Check if need matching + min_particle = 99 +@@ -5885,7 +5885,7 @@ class RunCardNLO(RunCard): + else: + idsmin = [l['id'] for l in procmin['legs']] + break +- ++ + for procmax in proc_def: + if len(procmax['legs']) != max_particle: + continue +@@ -5901,9 +5901,9 @@ class RunCardNLO(RunCard): + else: + # all are jet => matching is ON + matching=True +- break +- +- if matching: ++ break ++ ++ if matching: + self['ickkw'] = 3 + self['fixed_ren_scale'] = False + self["fixed_fac_scale"] = False +@@ -5911,17 +5911,17 @@ class RunCardNLO(RunCard): + self["jetalgo"] = 1 + self["jetradius"] = 1 + self["parton_shower"] = "PYTHIA8" +- ++ + # Read file input/default_run_card_nlo.dat + # This has to be LAST !! + if os.path.exists(self.default_run_card): + self.read(self.default_run_card, consistency=False) +- ++ + class MadLoopParam(ConfigFile): + """ a class for storing/dealing with the file MadLoopParam.dat + contains a parser to read it, facilities to write a new file,... + """ +- ++ + _ID_reduction_tool_map = {1:'CutTools', + 2:'PJFry++', + 3:'IREGI', +@@ -5929,10 +5929,10 @@ class MadLoopParam(ConfigFile): + 5:'Samurai', + 6:'Ninja', + 7:'COLLIER'} +- ++ + def default_setup(self): + """initialize the directory to the default value""" +- ++ + self.add_param("MLReductionLib", "6|7|1") + self.add_param("IREGIMODE", 2) + self.add_param("IREGIRECY", True) +@@ -5954,7 +5954,7 @@ class MadLoopParam(ConfigFile): + self.add_param("HelicityFilterLevel", 2) + self.add_param("LoopInitStartOver", False) + self.add_param("HelInitStartOver", False) +- self.add_param("UseQPIntegrandForNinja", True) ++ self.add_param("UseQPIntegrandForNinja", True) + self.add_param("UseQPIntegrandForCutTools", True) + self.add_param("COLLIERMode", 1) + self.add_param("COLLIERComputeUVpoles", True) +@@ -5966,9 +5966,9 @@ class MadLoopParam(ConfigFile): + self.add_param("COLLIERUseInternalStabilityTest",True) + + def read(self, finput): +- """Read the input file, this can be a path to a file, ++ """Read the input file, this can be a path to a file, + a file object, a str with the content of the file.""" +- ++ + if isinstance(finput, str): + if "\n" in finput: + finput = finput.split('\n') +@@ -5976,7 +5976,7 @@ class MadLoopParam(ConfigFile): + finput = open(finput) + else: + raise Exception("No such file %s" % input) +- ++ + previous_line= '' + for line in finput: + if previous_line.startswith('#'): +@@ -5985,20 +5985,20 @@ class MadLoopParam(ConfigFile): + if len(value) and value[0] not in ['#', '!']: + self.__setitem__(name, value, change_userdefine=True) + previous_line = line +- +- ++ ++ + def write(self, outputpath, template=None,commentdefault=False): +- ++ + if not template: + if not MADEVENT: +- template = pjoin(MG5DIR, 'Template', 'loop_material', 'StandAlone', ++ template = pjoin(MG5DIR, 'Template', 'loop_material', 'StandAlone', + 'Cards', 'MadLoopParams.dat') + else: + template = pjoin(MEDIR, 'Cards', 'MadLoopParams_default.dat') + fsock = open(template, 'r') + template = fsock.readlines() + fsock.close() +- ++ + if isinstance(outputpath, str): + output = open(outputpath, 'w') + else: +@@ -6019,7 +6019,7 @@ class MadLoopParam(ConfigFile): + return value + else: + raise Exception("Can not format input %s" % type(value)) +- ++ + name = '' + done = set() + for line in template: +@@ -6034,12 +6034,12 @@ class MadLoopParam(ConfigFile): + elif line.startswith('#'): + name = line[1:].split()[0] + output.write(line) +- +- +- +- +- +-class eMELA_info(ConfigFile): ++ ++ ++ ++ ++ ++class eMELA_info(ConfigFile): + """ a class for eMELA (LHAPDF-like) info files + """ + path = '' +@@ -6053,7 +6053,7 @@ class eMELA_info(ConfigFile): + + + def read(self, finput): +- if isinstance(finput, file): ++ if isinstance(finput, file): + lines = finput.open().read().split('\n') + self.path = finput.name + else: +@@ -6066,7 +6066,7 @@ class eMELA_info(ConfigFile): + k, v = l.split(':', 1) # ignore further occurrences of : + try: + self[k.strip()] = eval(v) +- except (NameError, SyntaxError): ++ except (NameError, SyntaxError): + self[k.strip()] = v + + def default_setup(self): +@@ -6091,7 +6091,7 @@ class eMELA_info(ConfigFile): + +"powers of alpha should be reweighted a posteriori") + + +- logger.info('Updating variables according to %s' % self.path) ++ logger.info('Updating variables according to %s' % self.path) + # Flavours in the running of alpha + nd, nu, nl = self['eMELA_ActiveFlavoursAlpha'] + self.log_and_update(banner, 'run_card', 'ndnq_run', nd) +@@ -6130,8 +6130,8 @@ class eMELA_info(ConfigFile): + logger.warning('Cannot treat the following renormalisation schemes for ME and PDFs: %d, %d' \ + % (uvscheme, uvscheme_pdf)) + +- # if PDFs use MSbar with fixed alpha, set the ren scale fixed to Qref +- # also check that the com energy is equal to qref, otherwise print a ++ # if PDFs use MSbar with fixed alpha, set the ren scale fixed to Qref ++ # also check that the com energy is equal to qref, otherwise print a + # warning + if uvscheme_pdf == 1: + qref = self['eMELA_AlphaQref'] +@@ -6144,23 +6144,23 @@ class eMELA_info(ConfigFile): + + # LL / NLL PDF (0/1) + pdforder = self['eMELA_PerturbativeOrder'] +- # pdfscheme = 0->MSbar; 1->DIS; 2->eta (leptonic); 3->beta (leptonic) ++ # pdfscheme = 0->MSbar; 1->DIS; 2->eta (leptonic); 3->beta (leptonic) + # 4->mixed (leptonic); 5-> nobeta (leptonic); 6->delta (leptonic) + # if LL, use nobeta scheme unless LEGACYLLPDF > 0 + if pdforder == 0: + if 'eMELA_LEGACYLLPDF' not in self.keys() or self['eMELA_LEGACYLLPDF'] in [-1, 0]: + self.log_and_update(banner, 'run_card', 'pdfscheme', 5) +- elif self['eMELA_LEGACYLLPDF'] == 1: ++ elif self['eMELA_LEGACYLLPDF'] == 1: + # mixed + self.log_and_update(banner, 'run_card', 'pdfscheme', 4) +- elif self['eMELA_LEGACYLLPDF'] == 2: ++ elif self['eMELA_LEGACYLLPDF'] == 2: + # eta + self.log_and_update(banner, 'run_card', 'pdfscheme', 2) +- elif self['eMELA_LEGACYLLPDF'] == 3: ++ elif self['eMELA_LEGACYLLPDF'] == 3: + # beta + self.log_and_update(banner, 'run_card', 'pdfscheme', 3) + elif pdforder == 1: +- # for NLL, use eMELA_FactorisationSchemeInt = 0/1 ++ # for NLL, use eMELA_FactorisationSchemeInt = 0/1 + # for delta/MSbar + if self['eMELA_FactorisationSchemeInt'] == 0: + # MSbar +@@ -6177,7 +6177,7 @@ class eMELA_info(ConfigFile): + + + +- ++ + + def log_and_update(self, banner, card, par, v): + """update the card parameter par to value v +diff --git b/epochX/cudacpp/gg_tt.mad/bin/internal/gen_ximprove.py a/epochX/cudacpp/gg_tt.mad/bin/internal/gen_ximprove.py +index fb7efa87c..cc842aa50 100755 +--- b/epochX/cudacpp/gg_tt.mad/bin/internal/gen_ximprove.py ++++ a/epochX/cudacpp/gg_tt.mad/bin/internal/gen_ximprove.py +@@ -2,18 +2,18 @@ + # + # Copyright (c) 2014 The MadGraph5_aMC@NLO Development team and Contributors + # +-# This file is a part of the MadGraph5_aMC@NLO project, an application which ++# This file is a part of the MadGraph5_aMC@NLO project, an application which + # automatically generates Feynman diagrams and matrix elements for arbitrary + # high-energy processes in the Standard Model and beyond. + # +-# It is subject to the MadGraph5_aMC@NLO license which should accompany this ++# It is subject to the MadGraph5_aMC@NLO license which should accompany this + # distribution. + # + # For more information, visit madgraph.phys.ucl.ac.be and amcatnlo.web.cern.ch + # + ################################################################################ + """ A python file to replace the fortran script gen_ximprove. +- This script analyses the result of the survey/ previous refine and ++ This script analyses the result of the survey/ previous refine and + creates the jobs for the following script. + """ + from __future__ import division +@@ -66,77 +66,77 @@ pjoin = os.path.join + class gensym(object): + """a class to call the fortran gensym executable and handle it's output + in order to create the various job that are needed for the survey""" +- ++ + #convenient shortcut for the formatting of variable + @ staticmethod + def format_variable(*args): + return bannermod.ConfigFile.format_variable(*args) +- ++ + combining_job = 2 # number of channel by ajob +- splitted_grid = False ++ splitted_grid = False + min_iterations = 3 + mode= "survey" +- ++ + + def __init__(self, cmd, opt=None): +- ++ + try: + super(gensym, self).__init__(cmd, opt) + except TypeError: + pass +- +- # Run statistics, a dictionary of RunStatistics(), with ++ ++ # Run statistics, a dictionary of RunStatistics(), with + self.run_statistics = {} +- ++ + self.cmd = cmd + self.run_card = cmd.run_card + self.me_dir = cmd.me_dir +- +- ++ ++ + # dictionary to keep track of the precision when combining iteration + self.cross = collections.defaultdict(int) + self.abscross = collections.defaultdict(int) + self.sigma = collections.defaultdict(int) + self.chi2 = collections.defaultdict(int) +- ++ + self.splitted_grid = False + if self.cmd.proc_characteristics['loop_induced']: + nexternal = self.cmd.proc_characteristics['nexternal'] + self.splitted_grid = max(2, (nexternal-2)**2) + if hasattr(self.cmd, "opts") and self.cmd.opts['accuracy'] == 0.1: + self.cmd.opts['accuracy'] = 0.02 +- ++ + if isinstance(cmd.cluster, cluster.MultiCore) and self.splitted_grid > 1: + self.splitted_grid = int(cmd.cluster.nb_core**0.5) + if self.splitted_grid == 1 and cmd.cluster.nb_core >1: + self.splitted_grid = 2 +- ++ + #if the user defines it in the run_card: + if self.run_card['survey_splitting'] != -1: + self.splitted_grid = self.run_card['survey_splitting'] + if self.run_card['survey_nchannel_per_job'] != 1 and 'survey_nchannel_per_job' in self.run_card.user_set: +- self.combining_job = self.run_card['survey_nchannel_per_job'] ++ self.combining_job = self.run_card['survey_nchannel_per_job'] + elif self.run_card['hard_survey'] > 1: + self.combining_job = 1 +- +- ++ ++ + self.splitted_Pdir = {} + self.splitted_for_dir = lambda x,y: self.splitted_grid + self.combining_job_for_Pdir = lambda x: self.combining_job + self.lastoffset = {} +- ++ + done_warning_zero_coupling = False + def get_helicity(self, to_submit=True, clean=True): + """launch a single call to madevent to get the list of non zero helicity""" +- +- self.subproc = [l.strip() for l in open(pjoin(self.me_dir,'SubProcesses', ++ ++ self.subproc = [l.strip() for l in open(pjoin(self.me_dir,'SubProcesses', + 'subproc.mg'))] + subproc = self.subproc + P_zero_result = [] + nb_tot_proc = len(subproc) +- job_list = {} +- +- ++ job_list = {} ++ ++ + for nb_proc,subdir in enumerate(subproc): + self.cmd.update_status('Compiling for process %s/%s.' % \ + (nb_proc+1,nb_tot_proc), level=None) +@@ -154,7 +154,7 @@ class gensym(object): + p = misc.Popen(['./gensym'], stdout=subprocess.PIPE, + stderr=subprocess.STDOUT, cwd=Pdir) + #sym_input = "%(points)d %(iterations)d %(accuracy)f \n" % self.opts +- ++ + (stdout, _) = p.communicate(''.encode()) + stdout = stdout.decode('ascii',errors='ignore') + if stdout: +@@ -166,11 +166,11 @@ class gensym(object): + if os.path.exists(pjoin(self.me_dir, 'error')): + os.remove(pjoin(self.me_dir, 'error')) + continue # bypass bad process +- ++ + self.cmd.compile(['madevent_forhel'], cwd=Pdir) + if not os.path.exists(pjoin(Pdir, 'madevent_forhel')): +- raise Exception('Error make madevent_forhel not successful') +- ++ raise Exception('Error make madevent_forhel not successful') ++ + if not os.path.exists(pjoin(Pdir, 'Hel')): + os.mkdir(pjoin(Pdir, 'Hel')) + ff = open(pjoin(Pdir, 'Hel', 'input_app.txt'),'w') +@@ -180,15 +180,15 @@ class gensym(object): + try: + os.remove(pjoin(Pdir, 'Hel','results.dat')) + except Exception: +- pass ++ pass + # Launch gensym +- p = misc.Popen(['../madevent_forhel < input_app.txt'], stdout=subprocess.PIPE, ++ p = misc.Popen(['../madevent_forhel < input_app.txt'], stdout=subprocess.PIPE, + stderr=subprocess.STDOUT, cwd=pjoin(Pdir,'Hel'), shell=True) + #sym_input = "%(points)d %(iterations)d %(accuracy)f \n" % self.opts + (stdout, _) = p.communicate(" ".encode()) + stdout = stdout.decode('ascii',errors='ignore') + if os.path.exists(pjoin(self.me_dir, 'error')): +- raise Exception(pjoin(self.me_dir,'error')) ++ raise Exception(pjoin(self.me_dir,'error')) + # note a continue is not enough here, we have in top to link + # the matrixX_optim.f to matrixX_orig.f to let the code to work + # after this error. +@@ -203,7 +203,7 @@ class gensym(object): + zero_gc = list() + all_zampperhel = set() + all_bad_amps_perhel = set() +- ++ + for line in stdout.splitlines(): + if "=" not in line and ":" not in line: + continue +@@ -229,22 +229,22 @@ class gensym(object): + "%s\n" % (' '.join(zero_gc)) +\ + "This will slow down the computation. Please consider using restricted model:\n" +\ + "https://answers.launchpad.net/mg5amcnlo/+faq/2312") +- +- ++ ++ + all_good_hels = collections.defaultdict(list) + for me_index, hel in all_hel: +- all_good_hels[me_index].append(int(hel)) +- ++ all_good_hels[me_index].append(int(hel)) ++ + #print(all_hel) + if self.run_card['hel_zeroamp']: + all_bad_amps = collections.defaultdict(list) + for me_index, amp in all_zamp: + all_bad_amps[me_index].append(int(amp)) +- ++ + all_bad_amps_perhel = collections.defaultdict(list) + for me_index, hel, amp in all_zampperhel: +- all_bad_amps_perhel[me_index].append((int(hel),int(amp))) +- ++ all_bad_amps_perhel[me_index].append((int(hel),int(amp))) ++ + elif all_zamp: + nb_zero = sum(int(a[1]) for a in all_zamp) + if zero_gc: +@@ -254,7 +254,7 @@ class gensym(object): + else: + logger.warning("The optimization detected that you have %i zero matrix-element for this SubProcess: %s.\n" % nb_zero +\ + "This part can optimize if you set the flag hel_zeroamp to True in the run_card.") +- ++ + #check if we need to do something and write associate information" + data = [all_hel, all_zamp, all_bad_amps_perhel] + if not self.run_card['hel_zeroamp']: +@@ -266,14 +266,14 @@ class gensym(object): + old_data = open(pjoin(Pdir,'Hel','selection')).read() + if old_data == data: + continue +- +- ++ ++ + with open(pjoin(Pdir,'Hel','selection'),'w') as fsock: +- fsock.write(data) +- +- ++ fsock.write(data) ++ ++ + for matrix_file in misc.glob('matrix*orig.f', Pdir): +- ++ + split_file = matrix_file.split('/') + me_index = split_file[-1][len('matrix'):-len('_orig.f')] + +@@ -289,11 +289,11 @@ class gensym(object): + #good_hels = sorted(list(good_hels)) + good_hels = [str(x) for x in sorted(all_good_hels[me_index])] + if self.run_card['hel_zeroamp']: +- ++ + bad_amps = [str(x) for x in sorted(all_bad_amps[me_index])] + bad_amps_perhel = [x for x in sorted(all_bad_amps_perhel[me_index])] + else: +- bad_amps = [] ++ bad_amps = [] + bad_amps_perhel = [] + if __debug__: + mtext = open(matrix_file).read() +@@ -310,7 +310,7 @@ class gensym(object): + + recycler.set_input(matrix_file) + recycler.set_output(out_file) +- recycler.set_template(templ_file) ++ recycler.set_template(templ_file) + recycler.generate_output_file() + del recycler + +@@ -321,19 +321,19 @@ class gensym(object): + + return {}, P_zero_result + +- ++ + def launch(self, to_submit=True, clean=True): + """ """ + + if not hasattr(self, 'subproc'): +- self.subproc = [l.strip() for l in open(pjoin(self.me_dir,'SubProcesses', ++ self.subproc = [l.strip() for l in open(pjoin(self.me_dir,'SubProcesses', + 'subproc.mg'))] + subproc = self.subproc +- ++ + P_zero_result = [] # check the number of times where they are no phase-space +- ++ + nb_tot_proc = len(subproc) +- job_list = {} ++ job_list = {} + for nb_proc,subdir in enumerate(subproc): + self.cmd.update_status('Compiling for process %s/%s.
(previous processes already running)' % \ + (nb_proc+1,nb_tot_proc), level=None) +@@ -341,7 +341,7 @@ class gensym(object): + subdir = subdir.strip() + Pdir = pjoin(self.me_dir, 'SubProcesses',subdir) + logger.info(' %s ' % subdir) +- ++ + # clean previous run + if clean: + for match in misc.glob('*ajob*', Pdir): +@@ -349,17 +349,17 @@ class gensym(object): + os.remove(match) + for match in misc.glob('G*', Pdir): + if os.path.exists(pjoin(match,'results.dat')): +- os.remove(pjoin(match, 'results.dat')) ++ os.remove(pjoin(match, 'results.dat')) + if os.path.exists(pjoin(match, 'ftn25')): +- os.remove(pjoin(match, 'ftn25')) +- ++ os.remove(pjoin(match, 'ftn25')) ++ + #compile gensym + self.cmd.compile(['gensym'], cwd=Pdir) + if not os.path.exists(pjoin(Pdir, 'gensym')): +- raise Exception('Error make gensym not successful') +- ++ raise Exception('Error make gensym not successful') ++ + # Launch gensym +- p = misc.Popen(['./gensym'], stdout=subprocess.PIPE, ++ p = misc.Popen(['./gensym'], stdout=subprocess.PIPE, + stderr=subprocess.STDOUT, cwd=Pdir) + #sym_input = "%(points)d %(iterations)d %(accuracy)f \n" % self.opts + (stdout, _) = p.communicate(''.encode()) +@@ -367,8 +367,8 @@ class gensym(object): + if os.path.exists(pjoin(self.me_dir,'error')): + files.mv(pjoin(self.me_dir,'error'), pjoin(Pdir,'ajob.no_ps.log')) + P_zero_result.append(subdir) +- continue +- ++ continue ++ + jobs = stdout.split() + job_list[Pdir] = jobs + try: +@@ -386,26 +386,38 @@ class gensym(object): + continue + else: + if done: +- raise Exception('Parsing error in gensym: %s' % stdout) +- job_list[Pdir] = l.split() ++ raise Exception('Parsing error in gensym: %s' % stdout) ++ job_list[Pdir] = l.split() + done = True + if not done: + raise Exception('Parsing error in gensym: %s' % stdout) +- +- self.cmd.compile(['madevent'], cwd=Pdir) ++ ++ cudacpp_backend = self.run_card['cudacpp_backend'] # the default value is defined in banner.py ++ logger.info("Building madevent in madevent_interface.py with '%s' matrix elements"%cudacpp_backend) ++ if cudacpp_backend == 'FORTRAN': ++ self.cmd.compile(['madevent_fortran_link'], cwd=Pdir) ++ elif cudacpp_backend == 'CPP': ++ self.cmd.compile(['madevent_cpp_link'], cwd=Pdir) ++ elif cudacpp_backend == 'CUDA': ++ self.cmd.compile(['madevent_cuda_link'], cwd=Pdir) ++ else: ++ raise Exception("Invalid cudacpp_backend='%s': only 'FORTRAN', 'CPP', 'CUDA' are supported") ++ ###logger.info("Building madevent with ALL(FORTRAN/CPP/CUDA) matrix elements (cudacpp_backend=%s)"%cudacpp_backend) ++ ###self.cmd.compile(['all'], cwd=Pdir) ++ + if to_submit: + self.submit_to_cluster(job_list) + job_list = {} +- ++ + return job_list, P_zero_result +- ++ + def resubmit(self, min_precision=1.0, resubmit_zero=False): + """collect the result of the current run and relaunch each channel +- not completed or optionally a completed one with a precision worse than ++ not completed or optionally a completed one with a precision worse than + a threshold (and/or the zero result channel)""" +- ++ + job_list, P_zero_result = self.launch(to_submit=False, clean=False) +- ++ + for P , jobs in dict(job_list).items(): + misc.sprint(jobs) + to_resub = [] +@@ -422,7 +434,7 @@ class gensym(object): + elif max(one_result.xerru, one_result.xerrc)/one_result.xsec > min_precision: + to_resub.append(job) + else: +- to_resub.append(job) ++ to_resub.append(job) + if to_resub: + for G in to_resub: + try: +@@ -430,19 +442,19 @@ class gensym(object): + except Exception as error: + misc.sprint(error) + pass +- misc.sprint(to_resub) ++ misc.sprint(to_resub) + self.submit_to_cluster({P: to_resub}) +- +- +- +- +- +- +- +- +- +- +- ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + def submit_to_cluster(self, job_list): + """ """ + +@@ -455,7 +467,7 @@ class gensym(object): + nexternal = self.cmd.proc_characteristics['nexternal'] + current = open(pjoin(path, "nexternal.inc")).read() + ext = re.search(r"PARAMETER \(NEXTERNAL=(\d+)\)", current).group(1) +- ++ + if self.run_card['job_strategy'] == 2: + self.splitted_grid = 2 + if nexternal == int(ext): +@@ -486,18 +498,18 @@ class gensym(object): + return self.submit_to_cluster_no_splitting(job_list) + else: + return self.submit_to_cluster_splitted(job_list) +- +- ++ ++ + def submit_to_cluster_no_splitting(self, job_list): + """submit the survey without the parralelization. + This is the old mode which is still usefull in single core""" +- +- # write the template file for the parameter file ++ ++ # write the template file for the parameter file + self.write_parameter(parralelization=False, Pdirs=list(job_list.keys())) +- +- ++ ++ + # launch the job with the appropriate grouping +- for Pdir, jobs in job_list.items(): ++ for Pdir, jobs in job_list.items(): + jobs = list(jobs) + i=0 + while jobs: +@@ -506,16 +518,16 @@ class gensym(object): + for _ in range(self.combining_job_for_Pdir(Pdir)): + if jobs: + to_submit.append(jobs.pop(0)) +- ++ + self.cmd.launch_job(pjoin(self.me_dir, 'SubProcesses', 'survey.sh'), + argument=to_submit, + cwd=pjoin(self.me_dir,'SubProcesses' , Pdir)) + +- ++ + def create_resubmit_one_iter(self, Pdir, G, submit_ps, nb_job, step=0): + """prepare the input_file for submitting the channel""" + +- ++ + if 'SubProcesses' not in Pdir: + Pdir = pjoin(self.me_dir, 'SubProcesses', Pdir) + +@@ -523,8 +535,8 @@ class gensym(object): + self.splitted_Pdir[(Pdir, G)] = int(nb_job) + + +- # 1. write the new input_app.txt +- run_card = self.cmd.run_card ++ # 1. write the new input_app.txt ++ run_card = self.cmd.run_card + options = {'event' : submit_ps, + 'maxiter': 1, + 'miniter': 1, +@@ -533,29 +545,29 @@ class gensym(object): + else run_card['nhel'], + 'gridmode': -2, + 'channel' : G +- } +- ++ } ++ + Gdir = pjoin(Pdir, 'G%s' % G) +- self.write_parameter_file(pjoin(Gdir, 'input_app.txt'), options) +- ++ self.write_parameter_file(pjoin(Gdir, 'input_app.txt'), options) ++ + # 2. check that ftn25 exists. +- assert os.path.exists(pjoin(Gdir, "ftn25")) +- +- ++ assert os.path.exists(pjoin(Gdir, "ftn25")) ++ ++ + # 3. Submit the new jobs + #call back function +- packet = cluster.Packet((Pdir, G, step+1), ++ packet = cluster.Packet((Pdir, G, step+1), + self.combine_iteration, + (Pdir, G, step+1)) +- ++ + if step ==0: +- self.lastoffset[(Pdir, G)] = 0 +- +- # resubmit the new jobs ++ self.lastoffset[(Pdir, G)] = 0 ++ ++ # resubmit the new jobs + for i in range(int(nb_job)): + name = "G%s_%s" % (G,i+1) + self.lastoffset[(Pdir, G)] += 1 +- offset = self.lastoffset[(Pdir, G)] ++ offset = self.lastoffset[(Pdir, G)] + self.cmd.launch_job(pjoin(self.me_dir, 'SubProcesses', 'refine_splitted.sh'), + argument=[name, 'G%s'%G, offset], + cwd= Pdir, +@@ -563,9 +575,9 @@ class gensym(object): + + + def submit_to_cluster_splitted(self, job_list): +- """ submit the version of the survey with splitted grid creation +- """ +- ++ """ submit the version of the survey with splitted grid creation ++ """ ++ + #if self.splitted_grid <= 1: + # return self.submit_to_cluster_no_splitting(job_list) + +@@ -580,7 +592,7 @@ class gensym(object): + + for job in jobs: + packet = cluster.Packet((Pdir, job, 1), self.combine_iteration, (Pdir, job, 1)) +- for i in range(self.splitted_for_dir(Pdir, job)): ++ for i in range(self.splitted_for_dir(Pdir, job)): + self.cmd.launch_job(pjoin(self.me_dir, 'SubProcesses', 'survey.sh'), + argument=[i+1, job], + cwd=pjoin(self.me_dir,'SubProcesses' , Pdir), +@@ -589,15 +601,15 @@ class gensym(object): + def combine_iteration(self, Pdir, G, step): + + grid_calculator, cross, error = self.combine_grid(Pdir, G, step) +- +- # Compute the number of events used for this run. ++ ++ # Compute the number of events used for this run. + nb_events = grid_calculator.target_evt + + Gdirs = [] #build the the list of directory + for i in range(self.splitted_for_dir(Pdir, G)): + path = pjoin(Pdir, "G%s_%s" % (G, i+1)) + Gdirs.append(path) +- ++ + # 4. make the submission of the next iteration + # Three cases - less than 3 iteration -> continue + # - more than 3 and less than 5 -> check error +@@ -615,15 +627,15 @@ class gensym(object): + need_submit = False + else: + need_submit = True +- ++ + elif step >= self.cmd.opts['iterations']: + need_submit = False + elif self.cmd.opts['accuracy'] < 0: + #check for luminosity + raise Exception("Not Implemented") + elif self.abscross[(Pdir,G)] == 0: +- need_submit = False +- else: ++ need_submit = False ++ else: + across = self.abscross[(Pdir,G)]/(self.sigma[(Pdir,G)]+1e-99) + tot_across = self.get_current_axsec() + if across == 0: +@@ -634,20 +646,20 @@ class gensym(object): + need_submit = True + else: + need_submit = False +- +- ++ ++ + if cross: + grid_calculator.write_grid_for_submission(Pdir,G, + self.splitted_for_dir(Pdir, G), + nb_events,mode=self.mode, + conservative_factor=5.0) +- +- xsec_format = '.%ig'%(max(3,int(math.log10(1.0/float(error)))+2) +- if float(cross)!=0.0 and float(error)!=0.0 else 8) ++ ++ xsec_format = '.%ig'%(max(3,int(math.log10(1.0/float(error)))+2) ++ if float(cross)!=0.0 and float(error)!=0.0 else 8) + if need_submit: + message = "%%s/G%%s is at %%%s +- %%.3g pb. Now submitting iteration #%s."%(xsec_format, step+1) + logger.info(message%\ +- (os.path.basename(Pdir), G, float(cross), ++ (os.path.basename(Pdir), G, float(cross), + float(error)*float(cross))) + self.resubmit_survey(Pdir,G, Gdirs, step) + elif cross: +@@ -658,26 +670,26 @@ class gensym(object): + newGpath = pjoin(self.me_dir,'SubProcesses' , Pdir, 'G%s' % G) + if not os.path.exists(newGpath): + os.mkdir(newGpath) +- ++ + # copy the new grid: +- files.cp(pjoin(Gdirs[0], 'ftn25'), ++ files.cp(pjoin(Gdirs[0], 'ftn25'), + pjoin(self.me_dir,'SubProcesses' , Pdir, 'G%s' % G, 'ftn26')) +- ++ + # copy the events + fsock = open(pjoin(newGpath, 'events.lhe'), 'w') + for Gdir in Gdirs: +- fsock.write(open(pjoin(Gdir, 'events.lhe')).read()) +- ++ fsock.write(open(pjoin(Gdir, 'events.lhe')).read()) ++ + # copy one log +- files.cp(pjoin(Gdirs[0], 'log.txt'), ++ files.cp(pjoin(Gdirs[0], 'log.txt'), + pjoin(self.me_dir,'SubProcesses' , Pdir, 'G%s' % G)) +- +- ++ ++ + # create the appropriate results.dat + self.write_results(grid_calculator, cross, error, Pdir, G, step) + else: + logger.info("Survey finished for %s/G%s [0 cross]", os.path.basename(Pdir),G) +- ++ + Gdir = pjoin(self.me_dir,'SubProcesses' , Pdir, 'G%s' % G) + if not os.path.exists(Gdir): + os.mkdir(Gdir) +@@ -685,21 +697,21 @@ class gensym(object): + files.cp(pjoin(Gdirs[0], 'log.txt'), Gdir) + # create the appropriate results.dat + self.write_results(grid_calculator, cross, error, Pdir, G, step) +- ++ + return 0 + + def combine_grid(self, Pdir, G, step, exclude_sub_jobs=[]): + """ exclude_sub_jobs is to remove some of the subjobs if a numerical + issue is detected in one of them. Warning is issue when this occurs. + """ +- ++ + # 1. create an object to combine the grid information and fill it + grid_calculator = combine_grid.grid_information(self.run_card['nhel']) +- ++ + for i in range(self.splitted_for_dir(Pdir, G)): + if i in exclude_sub_jobs: + continue +- path = pjoin(Pdir, "G%s_%s" % (G, i+1)) ++ path = pjoin(Pdir, "G%s_%s" % (G, i+1)) + fsock = misc.mult_try_open(pjoin(path, 'results.dat')) + one_result = grid_calculator.add_results_information(fsock) + fsock.close() +@@ -711,9 +723,9 @@ class gensym(object): + fsock.close() + os.remove(pjoin(path, 'results.dat')) + #os.remove(pjoin(path, 'grid_information')) +- +- +- ++ ++ ++ + #2. combine the information about the total crossection / error + # start by keep the interation in memory + cross, across, sigma = grid_calculator.get_cross_section() +@@ -724,12 +736,12 @@ class gensym(object): + if maxwgt: + nunwgt = grid_calculator.get_nunwgt(maxwgt) + # Make sure not to apply the security below during the first step of the +- # survey. Also, disregard channels with a contribution relative to the ++ # survey. Also, disregard channels with a contribution relative to the + # total cross-section smaller than 1e-8 since in this case it is unlikely + # that this channel will need more than 1 event anyway. + apply_instability_security = False + rel_contrib = 0.0 +- if (self.__class__ != gensym or step > 1): ++ if (self.__class__ != gensym or step > 1): + Pdir_across = 0.0 + Gdir_across = 0.0 + for (mPdir,mG) in self.abscross.keys(): +@@ -738,7 +750,7 @@ class gensym(object): + (self.sigma[(mPdir,mG)]+1e-99)) + if mG == G: + Gdir_across += (self.abscross[(mPdir,mG)]/ +- (self.sigma[(mPdir,mG)]+1e-99)) ++ (self.sigma[(mPdir,mG)]+1e-99)) + rel_contrib = abs(Gdir_across/(Pdir_across+1e-99)) + if rel_contrib > (1.0e-8) and \ + nunwgt < 2 and len(grid_calculator.results) > 1: +@@ -758,14 +770,14 @@ For offline investigation, the problematic discarded events are stored in: + exclude_sub_jobs = list(exclude_sub_jobs) + exclude_sub_jobs.append(th_maxwgt[-1][1]) + grid_calculator.results.run_statistics['skipped_subchannel'] += 1 +- ++ + # Add some monitoring of the problematic events +- gPath = pjoin(Pdir, "G%s_%s" % (G, th_maxwgt[-1][1]+1)) ++ gPath = pjoin(Pdir, "G%s_%s" % (G, th_maxwgt[-1][1]+1)) + if os.path.isfile(pjoin(gPath,'events.lhe')): + lhe_file = lhe_parser.EventFile(pjoin(gPath,'events.lhe')) + discardedPath = pjoin(Pdir,'DiscardedUnstableEvents') + if not os.path.exists(discardedPath): +- os.mkdir(discardedPath) ++ os.mkdir(discardedPath) + if os.path.isdir(discardedPath): + # Keep only the event with a maximum weight, as it surely + # is the problematic one. +@@ -778,10 +790,10 @@ For offline investigation, the problematic discarded events are stored in: + lhe_file.close() + evtRecord.write(pjoin(gPath,'events.lhe').read()) + evtRecord.close() +- ++ + return self.combine_grid(Pdir, G, step, exclude_sub_jobs) + +- ++ + if across !=0: + if sigma != 0: + self.cross[(Pdir,G)] += cross**3/sigma**2 +@@ -802,10 +814,10 @@ For offline investigation, the problematic discarded events are stored in: + self.chi2[(Pdir,G)] = 0 + cross = self.cross[(Pdir,G)] + error = 0 +- ++ + else: + error = 0 +- ++ + grid_calculator.results.compute_values(update_statistics=True) + if (str(os.path.basename(Pdir)), G) in self.run_statistics: + self.run_statistics[(str(os.path.basename(Pdir)), G)]\ +@@ -813,8 +825,8 @@ For offline investigation, the problematic discarded events are stored in: + else: + self.run_statistics[(str(os.path.basename(Pdir)), G)] = \ + grid_calculator.results.run_statistics +- +- self.warnings_from_statistics(G, grid_calculator.results.run_statistics) ++ ++ self.warnings_from_statistics(G, grid_calculator.results.run_statistics) + stats_msg = grid_calculator.results.run_statistics.nice_output( + '/'.join([os.path.basename(Pdir),'G%s'%G])) + +@@ -824,7 +836,7 @@ For offline investigation, the problematic discarded events are stored in: + # Clean up grid_information to avoid border effects in case of a crash + for i in range(self.splitted_for_dir(Pdir, G)): + path = pjoin(Pdir, "G%s_%s" % (G, i+1)) +- try: ++ try: + os.remove(pjoin(path, 'grid_information')) + except OSError as oneerror: + if oneerror.errno != 2: +@@ -838,7 +850,7 @@ For offline investigation, the problematic discarded events are stored in: + return + + EPS_fraction = float(stats['exceptional_points'])/stats['n_madloop_calls'] +- ++ + msg = "Channel %s has encountered a fraction of %.3g\n"+ \ + "of numerically unstable loop matrix element computations\n"+\ + "(which could not be rescued using quadruple precision).\n"+\ +@@ -849,16 +861,16 @@ For offline investigation, the problematic discarded events are stored in: + elif EPS_fraction > 0.01: + logger.critical((msg%(G,EPS_fraction)).replace('might', 'can')) + raise Exception((msg%(G,EPS_fraction)).replace('might', 'can')) +- ++ + def get_current_axsec(self): +- ++ + across = 0 + for (Pdir,G) in self.abscross: + across += self.abscross[(Pdir,G)]/(self.sigma[(Pdir,G)]+1e-99) + return across +- ++ + def write_results(self, grid_calculator, cross, error, Pdir, G, step): +- ++ + #compute the value + if cross == 0: + abscross,nw, luminosity = 0, 0, 0 +@@ -876,7 +888,7 @@ For offline investigation, the problematic discarded events are stored in: + maxwgt = grid_calculator.get_max_wgt() + nunwgt = grid_calculator.get_nunwgt() + luminosity = nunwgt/cross +- ++ + #format the results.dat + def fstr(nb): + data = '%E' % nb +@@ -885,20 +897,20 @@ For offline investigation, the problematic discarded events are stored in: + power = int(power) + 1 + return '%.5fE%+03i' %(nb,power) + line = '%s %s %s %i %i %i %i %s %s %s %s 0.0 0\n' % \ +- (fstr(cross), fstr(error*cross), fstr(error*cross), ++ (fstr(cross), fstr(error*cross), fstr(error*cross), + nevents, nw, maxit,nunwgt, + fstr(luminosity), fstr(wgt), fstr(abscross), fstr(maxwgt)) +- ++ + fsock = open(pjoin(self.me_dir,'SubProcesses' , Pdir, 'G%s' % G, +- 'results.dat'),'w') ++ 'results.dat'),'w') + fsock.writelines(line) + fsock.close() +- ++ + def resubmit_survey(self, Pdir, G, Gdirs, step): + """submit the next iteration of the survey""" + + # 1. write the new input_app.txt to double the number of points +- run_card = self.cmd.run_card ++ run_card = self.cmd.run_card + options = {'event' : 2**(step) * self.cmd.opts['points'] / self.splitted_grid, + 'maxiter': 1, + 'miniter': 1, +@@ -907,18 +919,18 @@ For offline investigation, the problematic discarded events are stored in: + else run_card['nhel'], + 'gridmode': -2, + 'channel' : '' +- } +- ++ } ++ + if int(options['helicity']) == 1: + options['event'] = options['event'] * 2**(self.cmd.proc_characteristics['nexternal']//3) +- ++ + for Gdir in Gdirs: +- self.write_parameter_file(pjoin(Gdir, 'input_app.txt'), options) +- +- ++ self.write_parameter_file(pjoin(Gdir, 'input_app.txt'), options) ++ ++ + #2. resubmit the new jobs + packet = cluster.Packet((Pdir, G, step+1), self.combine_iteration, \ +- (Pdir, G, step+1)) ++ (Pdir, G, step+1)) + nb_step = len(Gdirs) * (step+1) + for i,subdir in enumerate(Gdirs): + subdir = subdir.rsplit('_',1)[1] +@@ -926,34 +938,34 @@ For offline investigation, the problematic discarded events are stored in: + offset = nb_step+i+1 + offset=str(offset) + tag = "%s.%s" % (subdir, offset) +- ++ + self.cmd.launch_job(pjoin(self.me_dir, 'SubProcesses', 'survey.sh'), + argument=[tag, G], + cwd=pjoin(self.me_dir,'SubProcesses' , Pdir), + packet_member=packet) +- ++ + + + + def write_parameter_file(self, path, options): + """ """ +- ++ + template =""" %(event)s %(maxiter)s %(miniter)s !Number of events and max and min iterations + %(accuracy)s !Accuracy + %(gridmode)s !Grid Adjustment 0=none, 2=adjust + 1 !Suppress Amplitude 1=yes + %(helicity)s !Helicity Sum/event 0=exact +- %(channel)s """ ++ %(channel)s """ + options['event'] = int(options['event']) + open(path, 'w').write(template % options) + +- +- ++ ++ + def write_parameter(self, parralelization, Pdirs=None): + """Write the parameter of the survey run""" + + run_card = self.cmd.run_card +- ++ + options = {'event' : self.cmd.opts['points'], + 'maxiter': self.cmd.opts['iterations'], + 'miniter': self.min_iterations, +@@ -963,36 +975,36 @@ For offline investigation, the problematic discarded events are stored in: + 'gridmode': 2, + 'channel': '' + } +- ++ + if int(options['helicity'])== 1: + options['event'] = options['event'] * 2**(self.cmd.proc_characteristics['nexternal']//3) +- ++ + if parralelization: + options['gridmode'] = -2 + options['maxiter'] = 1 #this is automatic in dsample anyway + options['miniter'] = 1 #this is automatic in dsample anyway + options['event'] /= self.splitted_grid +- ++ + if not Pdirs: + Pdirs = self.subproc +- ++ + for Pdir in Pdirs: +- path =pjoin(Pdir, 'input_app.txt') ++ path =pjoin(Pdir, 'input_app.txt') + self.write_parameter_file(path, options) + +- +- +-class gen_ximprove(object): +- +- ++ ++ ++class gen_ximprove(object): ++ ++ + # some hardcoded value which impact the generation + gen_events_security = 1.2 # multiply the number of requested event by this number for security + combining_job = 0 # allow to run multiple channel in sequence +- max_request_event = 1000 # split jobs if a channel if it needs more than that ++ max_request_event = 1000 # split jobs if a channel if it needs more than that + max_event_in_iter = 5000 + min_event_in_iter = 1000 +- max_splitting = 130 # maximum duplication of a given channel +- min_iter = 3 ++ max_splitting = 130 # maximum duplication of a given channel ++ min_iter = 3 + max_iter = 9 + keep_grid_for_refine = False # only apply if needed to split the job + +@@ -1010,7 +1022,7 @@ class gen_ximprove(object): + return super(gen_ximprove, cls).__new__(gen_ximprove_gridpack) + elif cls.force_class == 'loop_induced': + return super(gen_ximprove, cls).__new__(gen_ximprove_share) +- ++ + if cmd.proc_characteristics['loop_induced']: + return super(gen_ximprove, cls).__new__(gen_ximprove_share) + elif gen_ximprove.format_variable(cmd.run_card['gridpack'], bool): +@@ -1019,31 +1031,31 @@ class gen_ximprove(object): + return super(gen_ximprove, cls).__new__(gen_ximprove_share) + else: + return super(gen_ximprove, cls).__new__(gen_ximprove_v4) +- +- ++ ++ + def __init__(self, cmd, opt=None): +- ++ + try: + super(gen_ximprove, self).__init__(cmd, opt) + except TypeError: + pass +- ++ + self.run_statistics = {} + self.cmd = cmd + self.run_card = cmd.run_card + run_card = self.run_card + self.me_dir = cmd.me_dir +- ++ + #extract from the run_card the information that we need. + self.gridpack = run_card['gridpack'] + self.nhel = run_card['nhel'] + if "nhel_refine" in run_card: + self.nhel = run_card["nhel_refine"] +- ++ + if self.run_card['refine_evt_by_job'] != -1: + self.max_request_event = run_card['refine_evt_by_job'] +- +- ++ ++ + # Default option for the run + self.gen_events = True + self.parralel = False +@@ -1054,7 +1066,7 @@ class gen_ximprove(object): + # parameter for the gridpack run + self.nreq = 2000 + self.iseed = 4321 +- ++ + # placeholder for information + self.results = 0 #updated in launch/update_html + +@@ -1062,16 +1074,16 @@ class gen_ximprove(object): + self.configure(opt) + elif isinstance(opt, bannermod.GridpackCard): + self.configure_gridpack(opt) +- ++ + def __call__(self): + return self.launch() +- ++ + def launch(self): +- """running """ +- ++ """running """ ++ + #start the run + self.handle_seed() +- self.results = sum_html.collect_result(self.cmd, ++ self.results = sum_html.collect_result(self.cmd, + main_dir=pjoin(self.cmd.me_dir,'SubProcesses')) #main_dir is for gridpack readonly mode + if self.gen_events: + # We run to provide a given number of events +@@ -1083,15 +1095,15 @@ class gen_ximprove(object): + + def configure(self, opt): + """Defines some parameter of the run""" +- ++ + for key, value in opt.items(): + if key in self.__dict__: + targettype = type(getattr(self, key)) + setattr(self, key, self.format_variable(value, targettype, key)) + else: + raise Exception('%s not define' % key) +- +- ++ ++ + # special treatment always do outside the loop to avoid side effect + if 'err_goal' in opt: + if self.err_goal < 1: +@@ -1101,24 +1113,24 @@ class gen_ximprove(object): + logger.info("Generating %s unweighted events." % self.err_goal) + self.gen_events = True + self.err_goal = self.err_goal * self.gen_events_security # security +- ++ + def handle_seed(self): + """not needed but for gridpack --which is not handle here for the moment""" + return +- +- ++ ++ + def find_job_for_event(self): + """return the list of channel that need to be improved""" +- ++ + assert self.err_goal >=1 + self.err_goal = int(self.err_goal) +- +- goal_lum = self.err_goal/(self.results.axsec+1e-99) #pb^-1 ++ ++ goal_lum = self.err_goal/(self.results.axsec+1e-99) #pb^-1 + logger.info('Effective Luminosity %s pb^-1', goal_lum) +- ++ + all_channels = sum([list(P) for P in self.results],[]) +- all_channels.sort(key= lambda x:x.get('luminosity'), reverse=True) +- ++ all_channels.sort(key= lambda x:x.get('luminosity'), reverse=True) ++ + to_refine = [] + for C in all_channels: + if C.get('axsec') == 0: +@@ -1129,61 +1141,61 @@ class gen_ximprove(object): + elif C.get('xerr') > max(C.get('axsec'), + (1/(100*math.sqrt(self.err_goal)))*all_channels[-1].get('axsec')): + to_refine.append(C) +- +- logger.info('need to improve %s channels' % len(to_refine)) ++ ++ logger.info('need to improve %s channels' % len(to_refine)) + return goal_lum, to_refine + + def update_html(self): + """update the html from this object since it contains all the information""" +- ++ + + run = self.cmd.results.current['run_name'] + if not os.path.exists(pjoin(self.cmd.me_dir, 'HTML', run)): + os.mkdir(pjoin(self.cmd.me_dir, 'HTML', run)) +- ++ + unit = self.cmd.results.unit +- P_text = "" +- if self.results: +- Presults = self.results ++ P_text = "" ++ if self.results: ++ Presults = self.results + else: + self.results = sum_html.collect_result(self.cmd, None) + Presults = self.results +- ++ + for P_comb in Presults: +- P_text += P_comb.get_html(run, unit, self.cmd.me_dir) +- +- Presults.write_results_dat(pjoin(self.cmd.me_dir,'SubProcesses', 'results.dat')) +- ++ P_text += P_comb.get_html(run, unit, self.cmd.me_dir) ++ ++ Presults.write_results_dat(pjoin(self.cmd.me_dir,'SubProcesses', 'results.dat')) ++ + fsock = open(pjoin(self.cmd.me_dir, 'HTML', run, 'results.html'),'w') + fsock.write(sum_html.results_header) + fsock.write('%s
' % Presults.get_html(run, unit, self.cmd.me_dir)) +- fsock.write('%s
' % P_text) +- ++ fsock.write('%s ' % P_text) ++ + self.cmd.results.add_detail('cross', Presults.xsec) +- self.cmd.results.add_detail('error', Presults.xerru) +- +- return Presults.xsec, Presults.xerru ++ self.cmd.results.add_detail('error', Presults.xerru) ++ ++ return Presults.xsec, Presults.xerru ++ + +- + class gen_ximprove_v4(gen_ximprove): +- ++ + # some hardcoded value which impact the generation + gen_events_security = 1.2 # multiply the number of requested event by this number for security + combining_job = 0 # allow to run multiple channel in sequence +- max_request_event = 1000 # split jobs if a channel if it needs more than that ++ max_request_event = 1000 # split jobs if a channel if it needs more than that + max_event_in_iter = 5000 + min_event_in_iter = 1000 +- max_splitting = 130 # maximum duplication of a given channel +- min_iter = 3 ++ max_splitting = 130 # maximum duplication of a given channel ++ min_iter = 3 + max_iter = 9 + keep_grid_for_refine = False # only apply if needed to split the job + + + +- def __init__(self, cmd, opt=None): +- ++ def __init__(self, cmd, opt=None): ++ + super(gen_ximprove_v4, self).__init__(cmd, opt) +- ++ + if cmd.opts['accuracy'] < cmd._survey_options['accuracy'][1]: + self.increase_precision(cmd._survey_options['accuracy'][1]/cmd.opts['accuracy']) + +@@ -1191,7 +1203,7 @@ class gen_ximprove_v4(gen_ximprove): + + for path in misc.glob(pjoin('*', '*','multijob.dat'), pjoin(self.me_dir, 'SubProcesses')): + open(path,'w').write('0\n') +- ++ + def write_multijob(self, Channel, nb_split): + """ """ + if nb_split <=1: +@@ -1199,7 +1211,7 @@ class gen_ximprove_v4(gen_ximprove): + f = open(pjoin(self.me_dir, 'SubProcesses', Channel.get('name'), 'multijob.dat'), 'w') + f.write('%i\n' % nb_split) + f.close() +- ++ + def increase_precision(self, rate=3): + #misc.sprint(rate) + if rate < 3: +@@ -1210,25 +1222,25 @@ class gen_ximprove_v4(gen_ximprove): + rate = rate -2 + self.max_event_in_iter = int((rate+1) * 10000) + self.min_events = int(rate+2) * 2500 +- self.gen_events_security = 1 + 0.1 * (rate+2) +- ++ self.gen_events_security = 1 + 0.1 * (rate+2) ++ + if int(self.nhel) == 1: + self.min_event_in_iter *= 2**(self.cmd.proc_characteristics['nexternal']//3) + self.max_event_in_iter *= 2**(self.cmd.proc_characteristics['nexternal']//2) + +- +- ++ ++ + alphabet = "abcdefghijklmnopqrstuvwxyz" + def get_job_for_event(self): + """generate the script in order to generate a given number of event""" + # correspond to write_gen in the fortran version +- +- ++ ++ + goal_lum, to_refine = self.find_job_for_event() + + #reset the potential multijob of previous run + self.reset_multijob() +- ++ + jobs = [] # list of the refine if some job are split is list of + # dict with the parameter of the run. + +@@ -1245,17 +1257,17 @@ class gen_ximprove_v4(gen_ximprove): + else: + for i in range(len(to_refine) //3): + new_order.append(to_refine[i]) +- new_order.append(to_refine[-2*i-1]) ++ new_order.append(to_refine[-2*i-1]) + new_order.append(to_refine[-2*i-2]) + if len(to_refine) % 3 == 1: +- new_order.append(to_refine[i+1]) ++ new_order.append(to_refine[i+1]) + elif len(to_refine) % 3 == 2: +- new_order.append(to_refine[i+2]) ++ new_order.append(to_refine[i+2]) + #ensure that the reordering is done nicely + assert set([id(C) for C in to_refine]) == set([id(C) for C in new_order]) +- to_refine = new_order +- +- ++ to_refine = new_order ++ ++ + # loop over the channel to refine + for C in to_refine: + #1. Compute the number of points are needed to reach target +@@ -1267,7 +1279,7 @@ class gen_ximprove_v4(gen_ximprove): + nb_split = self.max_splitting + nb_split=max(1, nb_split) + +- ++ + #2. estimate how many points we need in each iteration + if C.get('nunwgt') > 0: + nevents = needed_event / nb_split * (C.get('nevents') / C.get('nunwgt')) +@@ -1284,21 +1296,21 @@ class gen_ximprove_v4(gen_ximprove): + nevents = max(self.min_event_in_iter, min(self.max_event_in_iter, nevents)) + logger.debug("%s : need %s event. Need %s split job of %s points", C.name, needed_event, nb_split, nevents) + +- ++ + # write the multi-job information + self.write_multijob(C, nb_split) +- ++ + packet = cluster.Packet((C.parent_name, C.name), + combine_runs.CombineRuns, + (pjoin(self.me_dir, 'SubProcesses', C.parent_name)), + {"subproc": C.name, "nb_split":nb_split}) +- +- ++ ++ + #create the info dict assume no splitting for the default + info = {'name': self.cmd.results.current['run_name'], + 'script_name': 'unknown', + 'directory': C.name, # need to be change for splitted job +- 'P_dir': C.parent_name, ++ 'P_dir': C.parent_name, + 'Ppath': pjoin(self.cmd.me_dir, 'SubProcesses', C.parent_name), + 'offset': 1, # need to be change for splitted job + 'nevents': nevents, +@@ -1309,7 +1321,7 @@ class gen_ximprove_v4(gen_ximprove): + 'channel': C.name.replace('G',''), + 'grid_refinment' : 0, #no refinment of the grid + 'base_directory': '', #should be change in splitted job if want to keep the grid +- 'packet': packet, ++ 'packet': packet, + } + + if nb_split == 1: +@@ -1322,19 +1334,19 @@ class gen_ximprove_v4(gen_ximprove): + if self.keep_grid_for_refine: + new_info['base_directory'] = info['directory'] + jobs.append(new_info) +- +- self.create_ajob(pjoin(self.me_dir, 'SubProcesses', 'refine.sh'), jobs) +- ++ ++ self.create_ajob(pjoin(self.me_dir, 'SubProcesses', 'refine.sh'), jobs) ++ + + def create_ajob(self, template, jobs, write_dir=None): + """create the ajob""" +- ++ + if not jobs: + return + + if not write_dir: + write_dir = pjoin(self.me_dir, 'SubProcesses') +- ++ + #filter the job according to their SubProcess directory # no mix submition + P2job= collections.defaultdict(list) + for j in jobs: +@@ -1343,11 +1355,11 @@ class gen_ximprove_v4(gen_ximprove): + for P in P2job.values(): + self.create_ajob(template, P, write_dir) + return +- +- ++ ++ + #Here we can assume that all job are for the same directory. + path = pjoin(write_dir, jobs[0]['P_dir']) +- ++ + template_text = open(template, 'r').read() + # special treatment if needed to combine the script + # computes how many submition miss one job +@@ -1372,8 +1384,8 @@ class gen_ximprove_v4(gen_ximprove): + skip1=0 + combining_job =1 + nb_sub = len(jobs) +- +- ++ ++ + nb_use = 0 + for i in range(nb_sub): + script_number = i+1 +@@ -1392,14 +1404,14 @@ class gen_ximprove_v4(gen_ximprove): + info["base_directory"] = "./" + fsock.write(template_text % info) + nb_use += nb_job +- ++ + fsock.close() + return script_number + + def get_job_for_precision(self): + """create the ajob to achieve a give precision on the total cross-section""" + +- ++ + assert self.err_goal <=1 + xtot = abs(self.results.xsec) + logger.info("Working on precision: %s %%" %(100*self.err_goal)) +@@ -1416,46 +1428,46 @@ class gen_ximprove_v4(gen_ximprove): + rerr *=rerr + if not len(to_refine): + return +- +- # change limit since most don't contribute ++ ++ # change limit since most don't contribute + limit = math.sqrt((self.err_goal * xtot)**2 - rerr/math.sqrt(len(to_refine))) + for C in to_refine[:]: + cerr = C.mfactor*(C.xerru + len(to_refine)*C.xerrc) + if cerr < limit: + to_refine.remove(C) +- ++ + # all the channel are now selected. create the channel information + logger.info('need to improve %s channels' % len(to_refine)) + +- ++ + jobs = [] # list of the refine if some job are split is list of + # dict with the parameter of the run. + + # loop over the channel to refine + for C in to_refine: +- ++ + #1. Determine how many events we need in each iteration + yerr = C.mfactor*(C.xerru+len(to_refine)*C.xerrc) + nevents = 0.2*C.nevents*(yerr/limit)**2 +- ++ + nb_split = int((nevents*(C.nunwgt/C.nevents)/self.max_request_event/ (2**self.min_iter-1))**(2/3)) + nb_split = max(nb_split, 1) +- # **(2/3) to slow down the increase in number of jobs ++ # **(2/3) to slow down the increase in number of jobs + if nb_split > self.max_splitting: + nb_split = self.max_splitting +- ++ + if nb_split >1: + nevents = nevents / nb_split + self.write_multijob(C, nb_split) + # forbid too low/too large value + nevents = min(self.min_event_in_iter, max(self.max_event_in_iter, nevents)) +- +- ++ ++ + #create the info dict assume no splitting for the default + info = {'name': self.cmd.results.current['run_name'], + 'script_name': 'unknown', + 'directory': C.name, # need to be change for splitted job +- 'P_dir': C.parent_name, ++ 'P_dir': C.parent_name, + 'Ppath': pjoin(self.cmd.me_dir, 'SubProcesses', C.parent_name), + 'offset': 1, # need to be change for splitted job + 'nevents': nevents, +@@ -1475,38 +1487,38 @@ class gen_ximprove_v4(gen_ximprove): + new_info['offset'] = i+1 + new_info['directory'] += self.alphabet[i % 26] + str((i+1)//26) + jobs.append(new_info) +- self.create_ajob(pjoin(self.me_dir, 'SubProcesses', 'refine.sh'), jobs) +- ++ self.create_ajob(pjoin(self.me_dir, 'SubProcesses', 'refine.sh'), jobs) ++ + def update_html(self): + """update the html from this object since it contains all the information""" +- ++ + + run = self.cmd.results.current['run_name'] + if not os.path.exists(pjoin(self.cmd.me_dir, 'HTML', run)): + os.mkdir(pjoin(self.cmd.me_dir, 'HTML', run)) +- ++ + unit = self.cmd.results.unit +- P_text = "" +- if self.results: +- Presults = self.results ++ P_text = "" ++ if self.results: ++ Presults = self.results + else: + self.results = sum_html.collect_result(self.cmd, None) + Presults = self.results +- ++ + for P_comb in Presults: +- P_text += P_comb.get_html(run, unit, self.cmd.me_dir) +- +- Presults.write_results_dat(pjoin(self.cmd.me_dir,'SubProcesses', 'results.dat')) +- ++ P_text += P_comb.get_html(run, unit, self.cmd.me_dir) ++ ++ Presults.write_results_dat(pjoin(self.cmd.me_dir,'SubProcesses', 'results.dat')) ++ + fsock = open(pjoin(self.cmd.me_dir, 'HTML', run, 'results.html'),'w') + fsock.write(sum_html.results_header) + fsock.write('%s
' % Presults.get_html(run, unit, self.cmd.me_dir)) +- fsock.write('%s
' % P_text) +- ++ fsock.write('%s ' % P_text) ++ + self.cmd.results.add_detail('cross', Presults.xsec) +- self.cmd.results.add_detail('error', Presults.xerru) +- +- return Presults.xsec, Presults.xerru ++ self.cmd.results.add_detail('error', Presults.xerru) ++ ++ return Presults.xsec, Presults.xerru + + + +@@ -1516,27 +1528,27 @@ class gen_ximprove_v4_nogridupdate(gen_ximprove_v4): + # some hardcoded value which impact the generation + gen_events_security = 1.1 # multiply the number of requested event by this number for security + combining_job = 0 # allow to run multiple channel in sequence +- max_request_event = 400 # split jobs if a channel if it needs more than that ++ max_request_event = 400 # split jobs if a channel if it needs more than that + max_event_in_iter = 500 + min_event_in_iter = 250 +- max_splitting = 260 # maximum duplication of a given channel +- min_iter = 2 ++ max_splitting = 260 # maximum duplication of a given channel ++ min_iter = 2 + max_iter = 6 + keep_grid_for_refine = True + + +- def __init__(self, cmd, opt=None): +- ++ def __init__(self, cmd, opt=None): ++ + gen_ximprove.__init__(cmd, opt) +- ++ + if cmd.proc_characteristics['loopinduced'] and \ + cmd.proc_characteristics['nexternal'] > 2: + self.increase_parralelization(cmd.proc_characteristics['nexternal']) +- ++ + def increase_parralelization(self, nexternal): + +- self.max_splitting = 1000 +- ++ self.max_splitting = 1000 ++ + if self.run_card['refine_evt_by_job'] != -1: + pass + elif nexternal == 3: +@@ -1551,27 +1563,27 @@ class gen_ximprove_v4_nogridupdate(gen_ximprove_v4): + class gen_ximprove_share(gen_ximprove, gensym): + """Doing the refine in multicore. Each core handle a couple of PS point.""" + +- nb_ps_by_job = 2000 ++ nb_ps_by_job = 2000 + mode = "refine" + gen_events_security = 1.15 + # Note the real security is lower since we stop the jobs if they are at 96% + # of this target. + + def __init__(self, *args, **opts): +- ++ + super(gen_ximprove_share, self).__init__(*args, **opts) + self.generated_events = {} + self.splitted_for_dir = lambda x,y : self.splitted_Pdir[(x,y)] +- ++ + + def get_job_for_event(self): + """generate the script in order to generate a given number of event""" + # correspond to write_gen in the fortran version +- ++ + + goal_lum, to_refine = self.find_job_for_event() + self.goal_lum = goal_lum +- ++ + # loop over the channel to refine to find the number of PS point to launch + total_ps_points = 0 + channel_to_ps_point = [] +@@ -1581,7 +1593,7 @@ class gen_ximprove_share(gen_ximprove, gensym): + os.remove(pjoin(self.me_dir, "SubProcesses",C.parent_name, C.name, "events.lhe")) + except: + pass +- ++ + #1. Compute the number of points are needed to reach target + needed_event = goal_lum*C.get('axsec') + if needed_event == 0: +@@ -1597,18 +1609,18 @@ class gen_ximprove_share(gen_ximprove, gensym): + nb_split = 1 + if nb_split > self.max_splitting: + nb_split = self.max_splitting +- nevents = self.max_event_in_iter * self.max_splitting ++ nevents = self.max_event_in_iter * self.max_splitting + else: + nevents = self.max_event_in_iter * nb_split + + if nevents > self.max_splitting*self.max_event_in_iter: + logger.warning("Channel %s/%s has a very low efficiency of unweighting. Might not be possible to reach target" % \ + (C.name, C.parent_name)) +- nevents = self.max_event_in_iter * self.max_splitting +- +- total_ps_points += nevents +- channel_to_ps_point.append((C, nevents)) +- ++ nevents = self.max_event_in_iter * self.max_splitting ++ ++ total_ps_points += nevents ++ channel_to_ps_point.append((C, nevents)) ++ + if self.cmd.options["run_mode"] == 1: + if self.cmd.options["cluster_size"]: + nb_ps_by_job = total_ps_points /int(self.cmd.options["cluster_size"]) +@@ -1622,7 +1634,7 @@ class gen_ximprove_share(gen_ximprove, gensym): + nb_ps_by_job = total_ps_points / self.cmd.options["nb_core"] + else: + nb_ps_by_job = self.nb_ps_by_job +- ++ + nb_ps_by_job = int(max(nb_ps_by_job, 500)) + + for C, nevents in channel_to_ps_point: +@@ -1636,20 +1648,20 @@ class gen_ximprove_share(gen_ximprove, gensym): + self.create_resubmit_one_iter(C.parent_name, C.name[1:], submit_ps, nb_job, step=0) + needed_event = goal_lum*C.get('xsec') + logger.debug("%s/%s : need %s event. Need %s split job of %s points", C.parent_name, C.name, needed_event, nb_job, submit_ps) +- +- ++ ++ + def combine_iteration(self, Pdir, G, step): +- ++ + grid_calculator, cross, error = self.combine_grid(Pdir, G, step) +- ++ + # collect all the generated_event + Gdirs = [] #build the the list of directory + for i in range(self.splitted_for_dir(Pdir, G)): + path = pjoin(Pdir, "G%s_%s" % (G, i+1)) + Gdirs.append(path) + assert len(grid_calculator.results) == len(Gdirs) == self.splitted_for_dir(Pdir, G) +- +- ++ ++ + # Check how many events are going to be kept after un-weighting. + needed_event = cross * self.goal_lum + if needed_event == 0: +@@ -1659,19 +1671,19 @@ class gen_ximprove_share(gen_ximprove, gensym): + if self.err_goal >=1: + if needed_event > self.gen_events_security * self.err_goal: + needed_event = int(self.gen_events_security * self.err_goal) +- ++ + if (Pdir, G) in self.generated_events: + old_nunwgt, old_maxwgt = self.generated_events[(Pdir, G)] + else: + old_nunwgt, old_maxwgt = 0, 0 +- ++ + if old_nunwgt == 0 and os.path.exists(pjoin(Pdir,"G%s" % G, "events.lhe")): + # possible for second refine. + lhe = lhe_parser.EventFile(pjoin(Pdir,"G%s" % G, "events.lhe")) + old_nunwgt = lhe.unweight(None, trunc_error=0.005, log_level=0) + old_maxwgt = lhe.max_wgt +- +- ++ ++ + + maxwgt = max(grid_calculator.get_max_wgt(), old_maxwgt) + new_evt = grid_calculator.get_nunwgt(maxwgt) +@@ -1683,35 +1695,35 @@ class gen_ximprove_share(gen_ximprove, gensym): + one_iter_nb_event = max(grid_calculator.get_nunwgt(),1) + drop_previous_iteration = False + # compare the number of events to generate if we discard the previous iteration +- n_target_one_iter = (needed_event-one_iter_nb_event) / ( one_iter_nb_event/ sum([R.nevents for R in grid_calculator.results])) ++ n_target_one_iter = (needed_event-one_iter_nb_event) / ( one_iter_nb_event/ sum([R.nevents for R in grid_calculator.results])) + n_target_combined = (needed_event-nunwgt) / efficiency + if n_target_one_iter < n_target_combined: + # the last iteration alone has more event that the combine iteration. +- # it is therefore interesting to drop previous iteration. ++ # it is therefore interesting to drop previous iteration. + drop_previous_iteration = True + nunwgt = one_iter_nb_event + maxwgt = grid_calculator.get_max_wgt() + new_evt = nunwgt +- efficiency = ( one_iter_nb_event/ sum([R.nevents for R in grid_calculator.results])) +- ++ efficiency = ( one_iter_nb_event/ sum([R.nevents for R in grid_calculator.results])) ++ + try: + if drop_previous_iteration: + raise IOError + output_file = open(pjoin(Pdir,"G%s" % G, "events.lhe"), 'a') + except IOError: + output_file = open(pjoin(Pdir,"G%s" % G, "events.lhe"), 'w') +- ++ + misc.call(["cat"] + [pjoin(d, "events.lhe") for d in Gdirs], + stdout=output_file) + output_file.close() + # For large number of iteration. check the number of event by doing the + # real unweighting. +- if nunwgt < 0.6 * needed_event and step > self.min_iter: ++ if nunwgt < 0.6 * needed_event and step > self.min_iter: + lhe = lhe_parser.EventFile(output_file.name) + old_nunwgt =nunwgt + nunwgt = lhe.unweight(None, trunc_error=0.01, log_level=0) +- +- ++ ++ + self.generated_events[(Pdir, G)] = (nunwgt, maxwgt) + + # misc.sprint("Adding %s event to %s. Currently at %s" % (new_evt, G, nunwgt)) +@@ -1730,21 +1742,21 @@ class gen_ximprove_share(gen_ximprove, gensym): + nevents = grid_calculator.results[0].nevents + if nevents == 0: # possible if some integral returns 0 + nevents = max(g.nevents for g in grid_calculator.results) +- ++ + need_ps_point = (needed_event - nunwgt)/(efficiency+1e-99) +- need_job = need_ps_point // nevents + 1 +- ++ need_job = need_ps_point // nevents + 1 ++ + if step < self.min_iter: + # This is normal but check if we are on the good track +- job_at_first_iter = nb_split_before/2**(step-1) ++ job_at_first_iter = nb_split_before/2**(step-1) + expected_total_job = job_at_first_iter * (2**self.min_iter-1) + done_job = job_at_first_iter * (2**step-1) + expected_remaining_job = expected_total_job - done_job + +- logger.debug("efficiency status (smaller is better): %s", need_job/expected_remaining_job) ++ logger.debug("efficiency status (smaller is better): %s", need_job/expected_remaining_job) + # increase if needed but not too much + need_job = min(need_job, expected_remaining_job*1.25) +- ++ + nb_job = (need_job-0.5)//(2**(self.min_iter-step)-1) + 1 + nb_job = max(1, nb_job) + grid_calculator.write_grid_for_submission(Pdir,G, +@@ -1756,7 +1768,7 @@ class gen_ximprove_share(gen_ximprove, gensym): + nb_job, step)) + self.create_resubmit_one_iter(Pdir, G, nevents, nb_job, step) + #self.create_job(Pdir, G, nb_job, nevents, step) +- ++ + elif step < self.max_iter: + if step + 1 == self.max_iter: + need_job = 1.20 * need_job # avoid to have just too few event. +@@ -1765,21 +1777,21 @@ class gen_ximprove_share(gen_ximprove, gensym): + grid_calculator.write_grid_for_submission(Pdir,G, + self.splitted_for_dir(Pdir, G), nb_job*nevents ,mode=self.mode, + conservative_factor=self.max_iter) +- +- ++ ++ + logger.info("%s/G%s is at %i/%i ('%.2g%%') event. Resubmit %i job at iteration %i." \ + % (os.path.basename(Pdir), G, int(nunwgt),int(needed_event)+1, + (float(nunwgt)/needed_event)*100.0 if needed_event>0.0 else 0.0, + nb_job, step)) + self.create_resubmit_one_iter(Pdir, G, nevents, nb_job, step) +- +- ++ ++ + + return 0 +- +- ++ ++ + def write_results(self, grid_calculator, cross, error, Pdir, G, step, efficiency): +- ++ + #compute the value + if cross == 0: + abscross,nw, luminosity = 0, 0, 0 +@@ -1795,7 +1807,7 @@ class gen_ximprove_share(gen_ximprove, gensym): + nevents = nunwgt + # make the unweighting to compute the number of events: + luminosity = nunwgt/cross +- ++ + #format the results.dat + def fstr(nb): + data = '%E' % nb +@@ -1804,23 +1816,23 @@ class gen_ximprove_share(gen_ximprove, gensym): + power = int(power) + 1 + return '%.5fE%+03i' %(nb,power) + line = '%s %s %s %i %i %i %i %s %s %s 0.0 0.0 0\n' % \ +- (fstr(cross), fstr(error*cross), fstr(error*cross), ++ (fstr(cross), fstr(error*cross), fstr(error*cross), + nevents, nw, maxit,nunwgt, + fstr(luminosity), fstr(wgt), fstr(abscross)) +- ++ + fsock = open(pjoin(self.me_dir,'SubProcesses' , Pdir, 'G%s' % G, +- 'results.dat'),'w') ++ 'results.dat'),'w') + fsock.writelines(line) + fsock.close() + +- +- +- ++ ++ ++ + class gen_ximprove_gridpack(gen_ximprove_v4): +- +- min_iter = 1 ++ ++ min_iter = 1 + max_iter = 13 +- max_request_event = 1e12 # split jobs if a channel if it needs more than that ++ max_request_event = 1e12 # split jobs if a channel if it needs more than that + max_event_in_iter = 4000 + min_event_in_iter = 500 + combining_job = sys.maxsize +@@ -1832,7 +1844,7 @@ class gen_ximprove_gridpack(gen_ximprove_v4): + return super(gen_ximprove_gridpack, cls).__new__(cls, *args, **opts) + + def __init__(self, *args, **opts): +- ++ + self.ngran = -1 + self.gscalefact = {} + self.readonly = False +@@ -1843,23 +1855,23 @@ class gen_ximprove_gridpack(gen_ximprove_v4): + self.readonly = opts['readonly'] + super(gen_ximprove_gridpack,self).__init__(*args, **opts) + if self.ngran == -1: +- self.ngran = 1 +- ++ self.ngran = 1 ++ + def find_job_for_event(self): + """return the list of channel that need to be improved""" + import random +- ++ + assert self.err_goal >=1 + self.err_goal = int(self.err_goal) + self.gscalefact = {} +- ++ + xtot = self.results.axsec +- goal_lum = self.err_goal/(xtot+1e-99) #pb^-1 ++ goal_lum = self.err_goal/(xtot+1e-99) #pb^-1 + # logger.info('Effective Luminosity %s pb^-1', goal_lum) +- ++ + all_channels = sum([list(P) for P in self.results],[]) + all_channels.sort(key=lambda x : x.get('luminosity'), reverse=True) +- ++ + to_refine = [] + for C in all_channels: + tag = C.get('name') +@@ -1873,27 +1885,27 @@ class gen_ximprove_gridpack(gen_ximprove_v4): + #need to generate events + logger.debug('request events for ', C.get('name'), 'cross=', + C.get('axsec'), 'needed events = ', goal_lum * C.get('axsec')) +- to_refine.append(C) +- +- logger.info('need to improve %s channels' % len(to_refine)) ++ to_refine.append(C) ++ ++ logger.info('need to improve %s channels' % len(to_refine)) + return goal_lum, to_refine + + def get_job_for_event(self): + """generate the script in order to generate a given number of event""" + # correspond to write_gen in the fortran version +- +- ++ ++ + goal_lum, to_refine = self.find_job_for_event() + + jobs = [] # list of the refine if some job are split is list of + # dict with the parameter of the run. +- ++ + # loop over the channel to refine + for C in to_refine: + #1. Compute the number of points are needed to reach target + needed_event = max(goal_lum*C.get('axsec'), self.ngran) + nb_split = 1 +- ++ + #2. estimate how many points we need in each iteration + if C.get('nunwgt') > 0: + nevents = needed_event / nb_split * (C.get('nevents') / C.get('nunwgt')) +@@ -1908,13 +1920,13 @@ class gen_ximprove_gridpack(gen_ximprove_v4): + # forbid too low/too large value + nevents = max(self.min_event_in_iter, min(self.max_event_in_iter, nevents)) + logger.debug("%s : need %s event. Need %s split job of %s points", C.name, needed_event, nb_split, nevents) +- ++ + + #create the info dict assume no splitting for the default + info = {'name': self.cmd.results.current['run_name'], + 'script_name': 'unknown', + 'directory': C.name, # need to be change for splitted job +- 'P_dir': os.path.basename(C.parent_name), ++ 'P_dir': os.path.basename(C.parent_name), + 'offset': 1, # need to be change for splitted job + 'Ppath': pjoin(self.cmd.me_dir, 'SubProcesses', C.parent_name), + 'nevents': nevents, #int(nevents*self.gen_events_security)+1, +@@ -1926,7 +1938,7 @@ class gen_ximprove_gridpack(gen_ximprove_v4): + 'channel': C.name.replace('G',''), + 'grid_refinment' : 0, #no refinment of the grid + 'base_directory': '', #should be change in splitted job if want to keep the grid +- 'packet': None, ++ 'packet': None, + } + + if self.readonly: +@@ -1934,11 +1946,11 @@ class gen_ximprove_gridpack(gen_ximprove_v4): + info['base_directory'] = basedir + + jobs.append(info) +- + +- write_dir = '.' if self.readonly else None +- self.create_ajob(pjoin(self.me_dir, 'SubProcesses', 'refine.sh'), jobs, write_dir) +- ++ ++ write_dir = '.' if self.readonly else None ++ self.create_ajob(pjoin(self.me_dir, 'SubProcesses', 'refine.sh'), jobs, write_dir) ++ + done = [] + for j in jobs: + if j['P_dir'] in done: +@@ -1955,22 +1967,22 @@ class gen_ximprove_gridpack(gen_ximprove_v4): + write_dir = '.' if self.readonly else pjoin(self.me_dir, 'SubProcesses') + + self.check_events(goal_lum, to_refine, jobs, write_dir) +- ++ + def check_events(self, goal_lum, to_refine, jobs, Sdir): + """check that we get the number of requested events if not resubmit.""" +- ++ + new_jobs = [] +- ++ + for C, job_info in zip(to_refine, jobs): +- P = job_info['P_dir'] ++ P = job_info['P_dir'] + G = job_info['channel'] + axsec = C.get('axsec') +- requested_events= job_info['requested_event'] +- ++ requested_events= job_info['requested_event'] ++ + + new_results = sum_html.OneResult((P,G)) + new_results.read_results(pjoin(Sdir,P, 'G%s'%G, 'results.dat')) +- ++ + # need to resubmit? + if new_results.get('nunwgt') < requested_events: + pwd = pjoin(os.getcwd(),job_info['P_dir'],'G%s'%G) if self.readonly else \ +@@ -1980,10 +1992,10 @@ class gen_ximprove_gridpack(gen_ximprove_v4): + job_info['offset'] += 1 + new_jobs.append(job_info) + files.mv(pjoin(pwd, 'events.lhe'), pjoin(pwd, 'events.lhe.previous')) +- ++ + if new_jobs: +- self.create_ajob(pjoin(self.me_dir, 'SubProcesses', 'refine.sh'), new_jobs, Sdir) +- ++ self.create_ajob(pjoin(self.me_dir, 'SubProcesses', 'refine.sh'), new_jobs, Sdir) ++ + done = [] + for j in new_jobs: + if j['P_dir'] in done: +@@ -2003,9 +2015,9 @@ class gen_ximprove_gridpack(gen_ximprove_v4): + files.put_at_end(pjoin(pwd, 'events.lhe'),pjoin(pwd, 'events.lhe.previous')) + + return self.check_events(goal_lum, to_refine, new_jobs, Sdir) +- +- +- + +- ++ ++ ++ ++ + +diff --git b/epochX/cudacpp/gg_tt.mad/bin/internal/madevent_interface.py a/epochX/cudacpp/gg_tt.mad/bin/internal/madevent_interface.py +index 8c509e83f..8abba3f33 100755 +--- b/epochX/cudacpp/gg_tt.mad/bin/internal/madevent_interface.py ++++ a/epochX/cudacpp/gg_tt.mad/bin/internal/madevent_interface.py +@@ -2,11 +2,11 @@ + # + # Copyright (c) 2011 The MadGraph5_aMC@NLO Development team and Contributors + # +-# This file is a part of the MadGraph5_aMC@NLO project, an application which ++# This file is a part of the MadGraph5_aMC@NLO project, an application which + # automatically generates Feynman diagrams and matrix elements for arbitrary + # high-energy processes in the Standard Model and beyond. + # +-# It is subject to the MadGraph5_aMC@NLO license which should accompany this ++# It is subject to the MadGraph5_aMC@NLO license which should accompany this + # distribution. + # + # For more information, visit madgraph.phys.ucl.ac.be and amcatnlo.web.cern.ch +@@ -53,10 +53,10 @@ pjoin = os.path.join + # Special logger for the Cmd Interface + logger = logging.getLogger('madevent.stdout') # -> stdout + logger_stderr = logging.getLogger('madevent.stderr') # ->stderr +- ++ + try: + import madgraph +-except ImportError as error: ++except ImportError as error: + # import from madevent directory + MADEVENT = True + import internal.extended_cmd as cmd +@@ -92,7 +92,7 @@ else: + import madgraph.various.lhe_parser as lhe_parser + # import madgraph.various.histograms as histograms # imported later to not slow down the loading of the code + import models.check_param_card as check_param_card +- from madgraph.iolibs.files import ln ++ from madgraph.iolibs.files import ln + from madgraph import InvalidCmd, MadGraph5Error, MG5DIR, ReadWrite + + +@@ -113,10 +113,10 @@ class CmdExtended(common_run.CommonRunCmd): + next_possibility = { + 'start': [], + } +- ++ + debug_output = 'ME5_debug' + error_debug = 'Please report this bug on https://bugs.launchpad.net/mg5amcnlo\n' +- error_debug += 'More information is found in \'%(debug)s\'.\n' ++ error_debug += 'More information is found in \'%(debug)s\'.\n' + error_debug += 'Please attach this file to your report.' + + config_debug = 'If you need help with this issue please contact us on https://answers.launchpad.net/mg5amcnlo\n' +@@ -124,18 +124,18 @@ class CmdExtended(common_run.CommonRunCmd): + + keyboard_stop_msg = """stopping all operation + in order to quit MadGraph5_aMC@NLO please enter exit""" +- ++ + # Define the Error + InvalidCmd = InvalidCmd + ConfigurationError = MadGraph5Error + + def __init__(self, me_dir, options, *arg, **opt): + """Init history and line continuation""" +- ++ + # Tag allowing/forbiding question + self.force = False +- +- # If possible, build an info line with current version number ++ ++ # If possible, build an info line with current version number + # and date, from the VERSION text file + info = misc.get_pkg_info() + info_line = "" +@@ -150,7 +150,7 @@ class CmdExtended(common_run.CommonRunCmd): + else: + version = open(pjoin(root_path,'MGMEVersion.txt')).readline().strip() + info_line = "#* VERSION %s %s *\n" % \ +- (version, (24 - len(version)) * ' ') ++ (version, (24 - len(version)) * ' ') + + # Create a header for the history file. + # Remember to fill in time at writeout time! +@@ -177,7 +177,7 @@ class CmdExtended(common_run.CommonRunCmd): + '#* run as ./bin/madevent.py filename *\n' + \ + '#* *\n' + \ + '#************************************************************\n' +- ++ + if info_line: + info_line = info_line[1:] + +@@ -203,11 +203,11 @@ class CmdExtended(common_run.CommonRunCmd): + "* *\n" + \ + "************************************************************") + super(CmdExtended, self).__init__(me_dir, options, *arg, **opt) +- ++ + def get_history_header(self): +- """return the history header""" ++ """return the history header""" + return self.history_header % misc.get_time_info() +- ++ + def stop_on_keyboard_stop(self): + """action to perform to close nicely on a keyboard interupt""" + try: +@@ -219,20 +219,20 @@ class CmdExtended(common_run.CommonRunCmd): + self.add_error_log_in_html(KeyboardInterrupt) + except: + pass +- ++ + def postcmd(self, stop, line): + """ Update the status of the run for finishing interactive command """ +- +- stop = super(CmdExtended, self).postcmd(stop, line) ++ ++ stop = super(CmdExtended, self).postcmd(stop, line) + # relaxing the tag forbidding question + self.force = False +- ++ + if not self.use_rawinput: + return stop +- ++ + if self.results and not self.results.current: + return stop +- ++ + arg = line.split() + if len(arg) == 0: + return stop +@@ -240,41 +240,41 @@ class CmdExtended(common_run.CommonRunCmd): + return stop + if isinstance(self.results.status, str) and self.results.status == 'Stop by the user': + self.update_status('%s Stop by the user' % arg[0], level=None, error=True) +- return stop ++ return stop + elif not self.results.status: + return stop + elif str(arg[0]) in ['exit','quit','EOF']: + return stop +- ++ + try: +- self.update_status('Command \'%s\' done.
Waiting for instruction.' % arg[0], ++ self.update_status('Command \'%s\' done.
Waiting for instruction.' % arg[0], + level=None, error=True) + except Exception: + misc.sprint('update_status fails') + pass +- +- ++ ++ + def nice_user_error(self, error, line): + """If a ME run is currently running add a link in the html output""" + + self.add_error_log_in_html() +- return cmd.Cmd.nice_user_error(self, error, line) +- ++ return cmd.Cmd.nice_user_error(self, error, line) ++ + def nice_config_error(self, error, line): + """If a ME run is currently running add a link in the html output""" + + self.add_error_log_in_html() + stop = cmd.Cmd.nice_config_error(self, error, line) +- +- ++ ++ + try: + debug_file = open(self.debug_output, 'a') + debug_file.write(open(pjoin(self.me_dir,'Cards','proc_card_mg5.dat'))) + debug_file.close() + except: +- pass ++ pass + return stop +- ++ + + def nice_error_handling(self, error, line): + """If a ME run is currently running add a link in the html output""" +@@ -294,7 +294,7 @@ class CmdExtended(common_run.CommonRunCmd): + proc_card = pjoin(self.me_dir,'Cards','proc_card_mg5.dat') + if os.path.exists(proc_card): + self.banner.add(proc_card) +- ++ + out_dir = pjoin(self.me_dir, 'Events', self.run_name) + if not os.path.isdir(out_dir): + os.mkdir(out_dir) +@@ -307,7 +307,7 @@ class CmdExtended(common_run.CommonRunCmd): + else: + pass + else: +- self.add_error_log_in_html() ++ self.add_error_log_in_html() + stop = cmd.Cmd.nice_error_handling(self, error, line) + try: + debug_file = open(self.debug_output, 'a') +@@ -316,14 +316,14 @@ class CmdExtended(common_run.CommonRunCmd): + except: + pass + return stop +- +- ++ ++ + #=============================================================================== + # HelpToCmd + #=============================================================================== + class HelpToCmd(object): + """ The Series of help routine for the MadEventCmd""" +- ++ + def help_pythia(self): + logger.info("syntax: pythia [RUN] [--run_options]") + logger.info("-- run pythia on RUN (current one by default)") +@@ -352,29 +352,29 @@ class HelpToCmd(object): + logger.info(" Path should be the path of a valid banner.") + logger.info(" RUN should be the name of a run of the current directory") + self.run_options_help([('-f','answer all question by default'), +- ('--name=X', 'Define the name associated with the new run')]) +- ++ ('--name=X', 'Define the name associated with the new run')]) ++ + def help_open(self): + logger.info("syntax: open FILE ") + logger.info("-- open a file with the appropriate editor.") + logger.info(' If FILE belongs to index.html, param_card.dat, run_card.dat') + logger.info(' the path to the last created/used directory is used') + logger.info(' The program used to open those files can be chosen in the') +- logger.info(' configuration file ./input/mg5_configuration.txt') +- +- ++ logger.info(' configuration file ./input/mg5_configuration.txt') ++ ++ + def run_options_help(self, data): + if data: + logger.info('-- local options:') + for name, info in data: + logger.info(' %s : %s' % (name, info)) +- ++ + logger.info("-- session options:") +- logger.info(" Note that those options will be kept for the current session") ++ logger.info(" Note that those options will be kept for the current session") + logger.info(" --cluster : Submit to the cluster. Current cluster: %s" % self.options['cluster_type']) + logger.info(" --multicore : Run in multi-core configuration") + logger.info(" --nb_core=X : limit the number of core to use to X.") +- ++ + + def help_generate_events(self): + logger.info("syntax: generate_events [run_name] [options]",) +@@ -398,16 +398,16 @@ class HelpToCmd(object): + logger.info(" -f : Bypass the edition of MadLoopParams.dat.",'$MG:color:BLUE') + logger.info(" -r : Refresh of the existing filters (erasing them if already present).",'$MG:color:BLUE') + logger.info(" --nPS= : Specify how many phase-space points should be tried to set up the filters.",'$MG:color:BLUE') +- ++ + + + def help_calculate_decay_widths(self): +- ++ + if self.ninitial != 1: + logger.warning("This command is only valid for processes of type A > B C.") + logger.warning("This command can not be run in current context.") + logger.warning("") +- ++ + logger.info("syntax: calculate_decay_widths [run_name] [options])") + logger.info("-- Calculate decay widths and enter widths and BRs in param_card") + logger.info(" for a series of processes of type A > B C ...") +@@ -428,8 +428,8 @@ class HelpToCmd(object): + logger.info("-- evaluate the different channel associate to the process") + self.run_options_help([("--" + key,value[-1]) for (key,value) in \ + self._survey_options.items()]) +- +- ++ ++ + def help_restart_gridpack(self): + logger.info("syntax: restart_gridpack --precision= --restart_zero") + +@@ -439,14 +439,14 @@ class HelpToCmd(object): + logger.info("syntax: launch [run_name] [options])") + logger.info(" --alias for either generate_events/calculate_decay_widths") + logger.info(" depending of the number of particles in the initial state.") +- ++ + if self.ninitial == 1: + logger.info("For this directory this is equivalent to calculate_decay_widths") + self.help_calculate_decay_widths() + else: + logger.info("For this directory this is equivalent to $generate_events") + self.help_generate_events() +- ++ + def help_refine(self): + logger.info("syntax: refine require_precision [max_channel] [--run_options]") + logger.info("-- refine the LAST run to achieve a given precision.") +@@ -454,14 +454,14 @@ class HelpToCmd(object): + logger.info(' or the required relative error') + logger.info(' max_channel:[5] maximal number of channel per job') + self.run_options_help([]) +- ++ + def help_combine_events(self): + """ """ + logger.info("syntax: combine_events [run_name] [--tag=tag_name] [--run_options]") + logger.info("-- Combine the last run in order to write the number of events") + logger.info(" asked in the run_card.") + self.run_options_help([]) +- ++ + def help_store_events(self): + """ """ + logger.info("syntax: store_events [--run_options]") +@@ -481,7 +481,7 @@ class HelpToCmd(object): + logger.info("syntax: import command PATH") + logger.info("-- Execute the command present in the file") + self.run_options_help([]) +- ++ + def help_syscalc(self): + logger.info("syntax: syscalc [RUN] [%s] [-f | --tag=]" % '|'.join(self._plot_mode)) + logger.info("-- calculate systematics information for the RUN (current run by default)") +@@ -506,18 +506,18 @@ class AskRun(cmd.ControlSwitch): + ('madspin', 'Decay onshell particles'), + ('reweight', 'Add weights to events for new hypp.') + ] +- ++ + def __init__(self, question, line_args=[], mode=None, force=False, + *args, **opt): +- ++ + self.check_available_module(opt['mother_interface'].options) + self.me_dir = opt['mother_interface'].me_dir + super(AskRun,self).__init__(self.to_control, opt['mother_interface'], + *args, **opt) +- +- ++ ++ + def check_available_module(self, options): +- ++ + self.available_module = set() + if options['pythia-pgs_path']: + self.available_module.add('PY6') +@@ -540,32 +540,32 @@ class AskRun(cmd.ControlSwitch): + self.available_module.add('Rivet') + else: + logger.warning("Rivet program installed but no parton shower with hepmc output detected.\n Please install pythia8") +- ++ + if not MADEVENT or ('mg5_path' in options and options['mg5_path']): + self.available_module.add('MadSpin') + if misc.has_f2py() or options['f2py_compiler']: + self.available_module.add('reweight') + +-# old mode to activate the shower ++# old mode to activate the shower + def ans_parton(self, value=None): + """None: means that the user type 'pythia' + value: means that the user type pythia=value""" +- ++ + if value is None: + self.set_all_off() + else: + logger.warning('Invalid command: parton=%s' % value) +- +- ++ ++ + # +-# HANDLING SHOWER ++# HANDLING SHOWER + # + def get_allowed_shower(self): + """return valid entry for the shower switch""" +- ++ + if hasattr(self, 'allowed_shower'): + return self.allowed_shower +- ++ + self.allowed_shower = [] + if 'PY6' in self.available_module: + self.allowed_shower.append('Pythia6') +@@ -574,9 +574,9 @@ class AskRun(cmd.ControlSwitch): + if self.allowed_shower: + self.allowed_shower.append('OFF') + return self.allowed_shower +- ++ + def set_default_shower(self): +- ++ + if 'PY6' in self.available_module and\ + os.path.exists(pjoin(self.me_dir,'Cards','pythia_card.dat')): + self.switch['shower'] = 'Pythia6' +@@ -590,10 +590,10 @@ class AskRun(cmd.ControlSwitch): + + def check_value_shower(self, value): + """check an entry is valid. return the valid entry in case of shortcut""" +- ++ + if value in self.get_allowed_shower(): + return True +- ++ + value =value.lower() + if value in ['py6','p6','pythia_6'] and 'PY6' in self.available_module: + return 'Pythia6' +@@ -601,13 +601,13 @@ class AskRun(cmd.ControlSwitch): + return 'Pythia8' + else: + return False +- +- +-# old mode to activate the shower ++ ++ ++# old mode to activate the shower + def ans_pythia(self, value=None): + """None: means that the user type 'pythia' + value: means that the user type pythia=value""" +- ++ + if 'PY6' not in self.available_module: + logger.info('pythia-pgs not available. Ignore commmand') + return +@@ -621,13 +621,13 @@ class AskRun(cmd.ControlSwitch): + self.set_switch('shower', 'OFF') + else: + logger.warning('Invalid command: pythia=%s' % value) +- +- ++ ++ + def consistency_shower_detector(self, vshower, vdetector): + """consistency_XX_YY(val_XX, val_YY) + -> XX is the new key set by the user to a new value val_XX + -> YY is another key +- -> return value should be None or "replace_YY" ++ -> return value should be None or "replace_YY" + """ + + if vshower == 'OFF': +@@ -635,35 +635,35 @@ class AskRun(cmd.ControlSwitch): + return 'OFF' + if vshower == 'Pythia8' and vdetector == 'PGS': + return 'OFF' +- ++ + return None + + +- ++ + # + # HANDLING DETECTOR + # + def get_allowed_detector(self): + """return valid entry for the switch""" +- ++ + if hasattr(self, 'allowed_detector'): +- return self.allowed_detector +- ++ return self.allowed_detector ++ + self.allowed_detector = [] + if 'PGS' in self.available_module: + self.allowed_detector.append('PGS') + if 'Delphes' in self.available_module: + self.allowed_detector.append('Delphes') + +- ++ + if self.allowed_detector: + self.allowed_detector.append('OFF') +- return self.allowed_detector ++ return self.allowed_detector + + def set_default_detector(self): +- ++ + self.set_default_shower() #ensure that this one is called first! +- ++ + if 'PGS' in self.available_module and self.switch['shower'] == 'Pythia6'\ + and os.path.exists(pjoin(self.me_dir,'Cards','pgs_card.dat')): + self.switch['detector'] = 'PGS' +@@ -674,16 +674,16 @@ class AskRun(cmd.ControlSwitch): + self.switch['detector'] = 'OFF' + else: + self.switch['detector'] = 'Not Avail.' +- +-# old mode to activate pgs ++ ++# old mode to activate pgs + def ans_pgs(self, value=None): + """None: means that the user type 'pgs' +- value: means that the user type pgs=value""" +- ++ value: means that the user type pgs=value""" ++ + if 'PGS' not in self.available_module: + logger.info('pythia-pgs not available. Ignore commmand') + return +- ++ + if value is None: + self.set_all_off() + self.switch['shower'] = 'Pythia6' +@@ -696,16 +696,16 @@ class AskRun(cmd.ControlSwitch): + else: + logger.warning('Invalid command: pgs=%s' % value) + +- ++ + # old mode to activate Delphes + def ans_delphes(self, value=None): + """None: means that the user type 'delphes' +- value: means that the user type delphes=value""" +- ++ value: means that the user type delphes=value""" ++ + if 'Delphes' not in self.available_module: + logger.warning('Delphes not available. Ignore commmand') + return +- ++ + if value is None: + self.set_all_off() + if 'PY6' in self.available_module: +@@ -718,15 +718,15 @@ class AskRun(cmd.ControlSwitch): + elif value == 'off': + self.set_switch('detector', 'OFF') + else: +- logger.warning('Invalid command: pgs=%s' % value) ++ logger.warning('Invalid command: pgs=%s' % value) + + def consistency_detector_shower(self,vdetector, vshower): + """consistency_XX_YY(val_XX, val_YY) + -> XX is the new key set by the user to a new value val_XX + -> YY is another key +- -> return value should be None or "replace_YY" ++ -> return value should be None or "replace_YY" + """ +- ++ + if vdetector == 'PGS' and vshower != 'Pythia6': + return 'Pythia6' + if vdetector == 'Delphes' and vshower not in ['Pythia6', 'Pythia8']: +@@ -744,28 +744,28 @@ class AskRun(cmd.ControlSwitch): + # + def get_allowed_analysis(self): + """return valid entry for the shower switch""" +- ++ + if hasattr(self, 'allowed_analysis'): + return self.allowed_analysis +- ++ + self.allowed_analysis = [] + if 'ExRoot' in self.available_module: + self.allowed_analysis.append('ExRoot') + if 'MA4' in self.available_module: + self.allowed_analysis.append('MadAnalysis4') + if 'MA5' in self.available_module: +- self.allowed_analysis.append('MadAnalysis5') ++ self.allowed_analysis.append('MadAnalysis5') + if 'Rivet' in self.available_module: +- self.allowed_analysis.append('Rivet') +- ++ self.allowed_analysis.append('Rivet') ++ + if self.allowed_analysis: + self.allowed_analysis.append('OFF') +- ++ + return self.allowed_analysis +- ++ + def check_analysis(self, value): + """check an entry is valid. return the valid entry in case of shortcut""" +- ++ + if value in self.get_allowed_analysis(): + return True + if value.lower() in ['ma4', 'madanalysis4', 'madanalysis_4','4']: +@@ -786,30 +786,30 @@ class AskRun(cmd.ControlSwitch): + """consistency_XX_YY(val_XX, val_YY) + -> XX is the new key set by the user to a new value val_XX + -> YY is another key +- -> return value should be None or "replace_YY" ++ -> return value should be None or "replace_YY" + """ + + if vshower != 'Pythia8' and vanalysis == 'Rivet': + return 'OFF' #new value for analysis +- ++ + return None +- ++ + def consistency_analysis_shower(self, vanalysis, vshower): + """consistency_XX_YY(val_XX, val_YY) + -> XX is the new key set by the user to a new value val_XX + -> YY is another key +- -> return value should be None or "replace_YY" ++ -> return value should be None or "replace_YY" + """ + + if vshower != 'Pythia8' and vanalysis == 'Rivet': + return 'Pythia8' #new value for analysis +- ++ + return None + + + def set_default_analysis(self): + """initialise the switch for analysis""" +- ++ + if 'MA4' in self.available_module and \ + os.path.exists(pjoin(self.me_dir,'Cards','plot_card.dat')): + self.switch['analysis'] = 'MadAnalysis4' +@@ -818,46 +818,46 @@ class AskRun(cmd.ControlSwitch): + or os.path.exists(pjoin(self.me_dir,'Cards', 'madanalysis5_hadron_card.dat'))): + self.switch['analysis'] = 'MadAnalysis5' + elif 'ExRoot' in self.available_module: +- self.switch['analysis'] = 'ExRoot' +- elif self.get_allowed_analysis(): ++ self.switch['analysis'] = 'ExRoot' ++ elif self.get_allowed_analysis(): + self.switch['analysis'] = 'OFF' + else: + self.switch['analysis'] = 'Not Avail.' +- ++ + # + # MADSPIN handling + # + def get_allowed_madspin(self): + """ ON|OFF|onshell """ +- ++ + if hasattr(self, 'allowed_madspin'): + return self.allowed_madspin +- ++ + self.allowed_madspin = [] + if 'MadSpin' in self.available_module: + self.allowed_madspin = ['OFF',"ON",'onshell',"full"] + return self.allowed_madspin +- ++ + def check_value_madspin(self, value): + """handle alias and valid option not present in get_allowed_madspin""" +- ++ + if value.upper() in self.get_allowed_madspin(): + return True + elif value.lower() in self.get_allowed_madspin(): + return True +- ++ + if 'MadSpin' not in self.available_module: + return False +- ++ + if value.lower() in ['madspin', 'full']: + return 'full' + elif value.lower() in ['none']: + return 'none' +- +- ++ ++ + def set_default_madspin(self): + """initialise the switch for madspin""" +- ++ + if 'MadSpin' in self.available_module: + if os.path.exists(pjoin(self.me_dir,'Cards','madspin_card.dat')): + self.switch['madspin'] = 'ON' +@@ -865,10 +865,10 @@ class AskRun(cmd.ControlSwitch): + self.switch['madspin'] = 'OFF' + else: + self.switch['madspin'] = 'Not Avail.' +- ++ + def get_cardcmd_for_madspin(self, value): + """set some command to run before allowing the user to modify the cards.""" +- ++ + if value == 'onshell': + return ["edit madspin_card --replace_line='set spinmode' --before_line='decay' set spinmode onshell"] + elif value in ['full', 'madspin']: +@@ -877,36 +877,36 @@ class AskRun(cmd.ControlSwitch): + return ["edit madspin_card --replace_line='set spinmode' --before_line='decay' set spinmode none"] + else: + return [] +- ++ + # + # ReWeight handling + # + def get_allowed_reweight(self): + """ return the list of valid option for reweight=XXX """ +- ++ + if hasattr(self, 'allowed_reweight'): + return getattr(self, 'allowed_reweight') +- ++ + if 'reweight' not in self.available_module: + self.allowed_reweight = [] + return + self.allowed_reweight = ['OFF', 'ON'] +- ++ + # check for plugin mode + plugin_path = self.mother_interface.plugin_path + opts = misc.from_plugin_import(plugin_path, 'new_reweight', warning=False) + self.allowed_reweight += opts +- ++ + def set_default_reweight(self): + """initialise the switch for reweight""" +- ++ + if 'reweight' in self.available_module: + if os.path.exists(pjoin(self.me_dir,'Cards','reweight_card.dat')): + self.switch['reweight'] = 'ON' + else: + self.switch['reweight'] = 'OFF' + else: +- self.switch['reweight'] = 'Not Avail.' ++ self.switch['reweight'] = 'Not Avail.' + + #=============================================================================== + # CheckValidForCmd +@@ -916,14 +916,14 @@ class CheckValidForCmd(object): + + def check_banner_run(self, args): + """check the validity of line""" +- ++ + if len(args) == 0: + self.help_banner_run() + raise self.InvalidCmd('banner_run requires at least one argument.') +- ++ + tag = [a[6:] for a in args if a.startswith('--tag=')] +- +- ++ ++ + if os.path.exists(args[0]): + type ='banner' + format = self.detect_card_type(args[0]) +@@ -931,7 +931,7 @@ class CheckValidForCmd(object): + raise self.InvalidCmd('The file is not a valid banner.') + elif tag: + args[0] = pjoin(self.me_dir,'Events', args[0], '%s_%s_banner.txt' % \ +- (args[0], tag)) ++ (args[0], tag)) + if not os.path.exists(args[0]): + raise self.InvalidCmd('No banner associates to this name and tag.') + else: +@@ -939,7 +939,7 @@ class CheckValidForCmd(object): + type = 'run' + banners = misc.glob('*_banner.txt', pjoin(self.me_dir,'Events', args[0])) + if not banners: +- raise self.InvalidCmd('No banner associates to this name.') ++ raise self.InvalidCmd('No banner associates to this name.') + elif len(banners) == 1: + args[0] = banners[0] + else: +@@ -947,8 +947,8 @@ class CheckValidForCmd(object): + tags = [os.path.basename(p)[len(args[0])+1:-11] for p in banners] + tag = self.ask('which tag do you want to use?', tags[0], tags) + args[0] = pjoin(self.me_dir,'Events', args[0], '%s_%s_banner.txt' % \ +- (args[0], tag)) +- ++ (args[0], tag)) ++ + run_name = [arg[7:] for arg in args if arg.startswith('--name=')] + if run_name: + try: +@@ -970,14 +970,14 @@ class CheckValidForCmd(object): + except Exception: + pass + self.set_run_name(name) +- ++ + def check_history(self, args): + """check the validity of line""" +- ++ + if len(args) > 1: + self.help_history() + raise self.InvalidCmd('\"history\" command takes at most one argument') +- ++ + if not len(args): + return + elif args[0] != 'clean': +@@ -985,16 +985,16 @@ class CheckValidForCmd(object): + if dirpath and not os.path.exists(dirpath) or \ + os.path.isdir(args[0]): + raise self.InvalidCmd("invalid path %s " % dirpath) +- ++ + def check_save(self, args): + """ check the validity of the line""" +- ++ + if len(args) == 0: + args.append('options') + + if args[0] not in self._save_opts: + raise self.InvalidCmd('wrong \"save\" format') +- ++ + if args[0] != 'options' and len(args) != 2: + self.help_save() + raise self.InvalidCmd('wrong \"save\" format') +@@ -1003,7 +1003,7 @@ class CheckValidForCmd(object): + if not os.path.exists(basename): + raise self.InvalidCmd('%s is not a valid path, please retry' % \ + args[1]) +- ++ + if args[0] == 'options': + has_path = None + for arg in args[1:]: +@@ -1024,9 +1024,9 @@ class CheckValidForCmd(object): + has_path = True + if not has_path: + if '--auto' in arg and self.options['mg5_path']: +- args.insert(1, pjoin(self.options['mg5_path'],'input','mg5_configuration.txt')) ++ args.insert(1, pjoin(self.options['mg5_path'],'input','mg5_configuration.txt')) + else: +- args.insert(1, pjoin(self.me_dir,'Cards','me5_configuration.txt')) ++ args.insert(1, pjoin(self.me_dir,'Cards','me5_configuration.txt')) + + def check_set(self, args): + """ check the validity of the line""" +@@ -1039,20 +1039,20 @@ class CheckValidForCmd(object): + self.help_set() + raise self.InvalidCmd('Possible options for set are %s' % \ + self._set_options) +- ++ + if args[0] in ['stdout_level']: + if args[1] not in ['DEBUG','INFO','WARNING','ERROR','CRITICAL'] \ + and not args[1].isdigit(): + raise self.InvalidCmd('output_level needs ' + \ +- 'a valid level') +- ++ 'a valid level') ++ + if args[0] in ['timeout']: + if not args[1].isdigit(): +- raise self.InvalidCmd('timeout values should be a integer') +- ++ raise self.InvalidCmd('timeout values should be a integer') ++ + def check_open(self, args): + """ check the validity of the line """ +- ++ + if len(args) != 1: + self.help_open() + raise self.InvalidCmd('OPEN command requires exactly one argument') +@@ -1069,7 +1069,7 @@ class CheckValidForCmd(object): + raise self.InvalidCmd('No MadEvent path defined. Unable to associate this name to a file') + else: + return True +- ++ + path = self.me_dir + if os.path.isfile(os.path.join(path,args[0])): + args[0] = os.path.join(path,args[0]) +@@ -1078,7 +1078,7 @@ class CheckValidForCmd(object): + elif os.path.isfile(os.path.join(path,'HTML',args[0])): + args[0] = os.path.join(path,'HTML',args[0]) + # special for card with _default define: copy the default and open it +- elif '_card.dat' in args[0]: ++ elif '_card.dat' in args[0]: + name = args[0].replace('_card.dat','_card_default.dat') + if os.path.isfile(os.path.join(path,'Cards', name)): + files.cp(os.path.join(path,'Cards', name), os.path.join(path,'Cards', args[0])) +@@ -1086,13 +1086,13 @@ class CheckValidForCmd(object): + else: + raise self.InvalidCmd('No default path for this file') + elif not os.path.isfile(args[0]): +- raise self.InvalidCmd('No default path for this file') +- ++ raise self.InvalidCmd('No default path for this file') ++ + def check_initMadLoop(self, args): + """ check initMadLoop command arguments are valid.""" +- ++ + opt = {'refresh': False, 'nPS': None, 'force': False} +- ++ + for arg in args: + if arg in ['-r','--refresh']: + opt['refresh'] = True +@@ -1105,14 +1105,14 @@ class CheckValidForCmd(object): + except ValueError: + raise InvalidCmd("The number of attempts specified "+ + "'%s' is not a valid integer."%n_attempts) +- ++ + return opt +- ++ + def check_treatcards(self, args): + """check that treatcards arguments are valid + [param|run|all] [--output_dir=] [--param_card=] [--run_card=] + """ +- ++ + opt = {'output_dir':pjoin(self.me_dir,'Source'), + 'param_card':pjoin(self.me_dir,'Cards','param_card.dat'), + 'run_card':pjoin(self.me_dir,'Cards','run_card.dat'), +@@ -1129,14 +1129,14 @@ class CheckValidForCmd(object): + if os.path.isfile(value): + card_name = self.detect_card_type(value) + if card_name != key: +- raise self.InvalidCmd('Format for input file detected as %s while expecting %s' ++ raise self.InvalidCmd('Format for input file detected as %s while expecting %s' + % (card_name, key)) + opt[key] = value + elif os.path.isfile(pjoin(self.me_dir,value)): + card_name = self.detect_card_type(pjoin(self.me_dir,value)) + if card_name != key: +- raise self.InvalidCmd('Format for input file detected as %s while expecting %s' +- % (card_name, key)) ++ raise self.InvalidCmd('Format for input file detected as %s while expecting %s' ++ % (card_name, key)) + opt[key] = value + else: + raise self.InvalidCmd('No such file: %s ' % value) +@@ -1154,14 +1154,14 @@ class CheckValidForCmd(object): + else: + self.help_treatcards() + raise self.InvalidCmd('Unvalid argument %s' % arg) +- +- return mode, opt +- +- ++ ++ return mode, opt ++ ++ + def check_survey(self, args, cmd='survey'): + """check that the argument for survey are valid""" +- +- ++ ++ + self.opts = dict([(key,value[1]) for (key,value) in \ + self._survey_options.items()]) + +@@ -1183,41 +1183,41 @@ class CheckValidForCmd(object): + self.help_survey() + raise self.InvalidCmd('Too many argument for %s command' % cmd) + elif not args: +- # No run name assigned -> assigned one automaticaly ++ # No run name assigned -> assigned one automaticaly + self.set_run_name(self.find_available_run_name(self.me_dir)) + else: + self.set_run_name(args[0], None,'parton', True) + args.pop(0) +- ++ + return True + + def check_generate_events(self, args): + """check that the argument for generate_events are valid""" +- ++ + run = None + if args and args[-1].startswith('--laststep='): + run = args[-1].split('=')[-1] + if run not in ['auto','parton', 'pythia', 'pgs', 'delphes']: + self.help_generate_events() + raise self.InvalidCmd('invalid %s argument'% args[-1]) +- if run != 'parton' and not self.options['pythia-pgs_path']: +- raise self.InvalidCmd('''pythia-pgs not install. Please install this package first. ++ if run != 'parton' and not self.options['pythia-pgs_path']: ++ raise self.InvalidCmd('''pythia-pgs not install. Please install this package first. + To do so type: \'install pythia-pgs\' in the mg5 interface''') + if run == 'delphes' and not self.options['delphes_path']: +- raise self.InvalidCmd('''delphes not install. Please install this package first. ++ raise self.InvalidCmd('''delphes not install. Please install this package first. + To do so type: \'install Delphes\' in the mg5 interface''') + del args[-1] + +- ++ + #if len(args) > 1: + # self.help_generate_events() + # raise self.InvalidCmd('Too many argument for generate_events command: %s' % cmd) +- ++ + return run + + def check_calculate_decay_widths(self, args): + """check that the argument for calculate_decay_widths are valid""" +- ++ + if self.ninitial != 1: + raise self.InvalidCmd('Can only calculate decay widths for decay processes A > B C ...') + +@@ -1232,7 +1232,7 @@ class CheckValidForCmd(object): + if len(args) > 1: + self.help_calculate_decay_widths() + raise self.InvalidCmd('Too many argument for calculate_decay_widths command: %s' % cmd) +- ++ + return accuracy + + +@@ -1241,25 +1241,25 @@ class CheckValidForCmd(object): + """check that the argument for survey are valid""" + + run = None +- ++ + if not len(args): + self.help_multi_run() + raise self.InvalidCmd("""multi_run command requires at least one argument for + the number of times that it call generate_events command""") +- ++ + if args[-1].startswith('--laststep='): + run = args[-1].split('=')[-1] + if run not in ['parton', 'pythia', 'pgs', 'delphes']: + self.help_multi_run() + raise self.InvalidCmd('invalid %s argument'% args[-1]) +- if run != 'parton' and not self.options['pythia-pgs_path']: +- raise self.InvalidCmd('''pythia-pgs not install. Please install this package first. ++ if run != 'parton' and not self.options['pythia-pgs_path']: ++ raise self.InvalidCmd('''pythia-pgs not install. Please install this package first. + To do so type: \'install pythia-pgs\' in the mg5 interface''') + if run == 'delphes' and not self.options['delphes_path']: +- raise self.InvalidCmd('''delphes not install. Please install this package first. ++ raise self.InvalidCmd('''delphes not install. Please install this package first. + To do so type: \'install Delphes\' in the mg5 interface''') + del args[-1] +- ++ + + elif not args[0].isdigit(): + self.help_multi_run() +@@ -1267,7 +1267,7 @@ class CheckValidForCmd(object): + #pass nb run to an integer + nb_run = args.pop(0) + args.insert(0, int(nb_run)) +- ++ + + return run + +@@ -1284,7 +1284,7 @@ class CheckValidForCmd(object): + self.help_refine() + raise self.InvalidCmd('require_precision argument is require for refine cmd') + +- ++ + if not self.run_name: + if self.results.lastrun: + self.set_run_name(self.results.lastrun) +@@ -1296,17 +1296,17 @@ class CheckValidForCmd(object): + else: + try: + [float(arg) for arg in args] +- except ValueError: +- self.help_refine() ++ except ValueError: ++ self.help_refine() + raise self.InvalidCmd('refine arguments are suppose to be number') +- ++ + return True +- ++ + def check_combine_events(self, arg): + """ Check the argument for the combine events command """ +- ++ + tag = [a for a in arg if a.startswith('--tag=')] +- if tag: ++ if tag: + arg.remove(tag[0]) + tag = tag[0][6:] + elif not self.run_tag: +@@ -1314,53 +1314,53 @@ class CheckValidForCmd(object): + else: + tag = self.run_tag + self.run_tag = tag +- ++ + if len(arg) > 1: + self.help_combine_events() + raise self.InvalidCmd('Too many argument for combine_events command') +- ++ + if len(arg) == 1: + self.set_run_name(arg[0], self.run_tag, 'parton', True) +- ++ + if not self.run_name: + if not self.results.lastrun: + raise self.InvalidCmd('No run_name currently define. Unable to run combine') + else: + self.set_run_name(self.results.lastrun) +- ++ + return True +- ++ + def check_pythia(self, args): + """Check the argument for pythia command +- syntax: pythia [NAME] ++ syntax: pythia [NAME] + Note that other option are already removed at this point + """ +- ++ + mode = None + laststep = [arg for arg in args if arg.startswith('--laststep=')] + if laststep and len(laststep)==1: + mode = laststep[0].split('=')[-1] + if mode not in ['auto', 'pythia', 'pgs', 'delphes']: + self.help_pythia() +- raise self.InvalidCmd('invalid %s argument'% args[-1]) ++ raise self.InvalidCmd('invalid %s argument'% args[-1]) + elif laststep: + raise self.InvalidCmd('only one laststep argument is allowed') +- ++ + if not self.options['pythia-pgs_path']: + logger.info('Retry to read configuration file to find pythia-pgs path') + self.set_configuration() +- ++ + if not self.options['pythia-pgs_path'] or not \ + os.path.exists(pjoin(self.options['pythia-pgs_path'],'src')): + error_msg = 'No valid pythia-pgs path set.\n' + error_msg += 'Please use the set command to define the path and retry.\n' + error_msg += 'You can also define it in the configuration file.\n' + raise self.InvalidCmd(error_msg) +- +- +- ++ ++ ++ + tag = [a for a in args if a.startswith('--tag=')] +- if tag: ++ if tag: + args.remove(tag[0]) + tag = tag[0][6:] + +@@ -1368,8 +1368,8 @@ class CheckValidForCmd(object): + if self.results.lastrun: + args.insert(0, self.results.lastrun) + else: +- raise self.InvalidCmd('No run name currently define. Please add this information.') +- ++ raise self.InvalidCmd('No run name currently define. Please add this information.') ++ + if len(args) >= 1: + if args[0] != self.run_name and\ + not os.path.exists(pjoin(self.me_dir,'Events',args[0], 'unweighted_events.lhe.gz')): +@@ -1388,21 +1388,21 @@ class CheckValidForCmd(object): + files.ln(input_file, os.path.dirname(output_file)) + else: + misc.gunzip(input_file, keep=True, stdout=output_file) +- ++ + args.append(mode) +- ++ + def check_pythia8(self, args): + """Check the argument for pythia command +- syntax: pythia8 [NAME] ++ syntax: pythia8 [NAME] + Note that other option are already removed at this point +- """ ++ """ + mode = None + laststep = [arg for arg in args if arg.startswith('--laststep=')] + if laststep and len(laststep)==1: + mode = laststep[0].split('=')[-1] + if mode not in ['auto', 'pythia','pythia8','delphes']: + self.help_pythia8() +- raise self.InvalidCmd('invalid %s argument'% args[-1]) ++ raise self.InvalidCmd('invalid %s argument'% args[-1]) + elif laststep: + raise self.InvalidCmd('only one laststep argument is allowed') + +@@ -1410,7 +1410,7 @@ class CheckValidForCmd(object): + if not self.options['pythia8_path']: + logger.info('Retry reading configuration file to find pythia8 path') + self.set_configuration() +- ++ + if not self.options['pythia8_path'] or not \ + os.path.exists(pjoin(self.options['pythia8_path'],'bin','pythia8-config')): + error_msg = 'No valid pythia8 path set.\n' +@@ -1421,7 +1421,7 @@ class CheckValidForCmd(object): + raise self.InvalidCmd(error_msg) + + tag = [a for a in args if a.startswith('--tag=')] +- if tag: ++ if tag: + args.remove(tag[0]) + tag = tag[0][6:] + +@@ -1430,11 +1430,11 @@ class CheckValidForCmd(object): + args.insert(0, self.results.lastrun) + else: + raise self.InvalidCmd('No run name currently define. '+ +- 'Please add this information.') +- ++ 'Please add this information.') ++ + if len(args) >= 1: + if args[0] != self.run_name and\ +- not os.path.exists(pjoin(self.me_dir,'Events',args[0], ++ not os.path.exists(pjoin(self.me_dir,'Events',args[0], + 'unweighted_events.lhe.gz')): + raise self.InvalidCmd('No events file corresponding to %s run. ' + % args[0]) +@@ -1451,9 +1451,9 @@ class CheckValidForCmd(object): + else: + raise self.InvalidCmd('No event file corresponding to %s run. ' + % self.run_name) +- ++ + args.append(mode) +- ++ + def check_remove(self, args): + """Check that the remove command is valid""" + +@@ -1484,33 +1484,33 @@ class CheckValidForCmd(object): + + madir = self.options['madanalysis_path'] + td = self.options['td_path'] +- ++ + if not madir or not td: + logger.info('Retry to read configuration file to find madanalysis/td') + self.set_configuration() + + madir = self.options['madanalysis_path'] +- td = self.options['td_path'] +- ++ td = self.options['td_path'] ++ + if not madir: + error_msg = 'No valid MadAnalysis path set.\n' + error_msg += 'Please use the set command to define the path and retry.\n' + error_msg += 'You can also define it in the configuration file.\n' +- raise self.InvalidCmd(error_msg) ++ raise self.InvalidCmd(error_msg) + if not td: + error_msg = 'No valid td path set.\n' + error_msg += 'Please use the set command to define the path and retry.\n' + error_msg += 'You can also define it in the configuration file.\n' +- raise self.InvalidCmd(error_msg) +- ++ raise self.InvalidCmd(error_msg) ++ + if len(args) == 0: + if not hasattr(self, 'run_name') or not self.run_name: + self.help_plot() +- raise self.InvalidCmd('No run name currently define. Please add this information.') ++ raise self.InvalidCmd('No run name currently define. Please add this information.') + args.append('all') + return + +- ++ + if args[0] not in self._plot_mode: + self.set_run_name(args[0], level='plot') + del args[0] +@@ -1518,45 +1518,45 @@ class CheckValidForCmd(object): + args.append('all') + elif not self.run_name: + self.help_plot() +- raise self.InvalidCmd('No run name currently define. Please add this information.') +- ++ raise self.InvalidCmd('No run name currently define. Please add this information.') ++ + for arg in args: + if arg not in self._plot_mode and arg != self.run_name: + self.help_plot() +- raise self.InvalidCmd('unknown options %s' % arg) +- ++ raise self.InvalidCmd('unknown options %s' % arg) ++ + def check_syscalc(self, args): + """Check the argument for the syscalc command + syscalc run_name modes""" + + scdir = self.options['syscalc_path'] +- ++ + if not scdir: + logger.info('Retry to read configuration file to find SysCalc') + self.set_configuration() + + scdir = self.options['syscalc_path'] +- ++ + if not scdir: + error_msg = 'No valid SysCalc path set.\n' + error_msg += 'Please use the set command to define the path and retry.\n' + error_msg += 'You can also define it in the configuration file.\n' + error_msg += 'Please note that you need to compile SysCalc first.' +- raise self.InvalidCmd(error_msg) +- ++ raise self.InvalidCmd(error_msg) ++ + if len(args) == 0: + if not hasattr(self, 'run_name') or not self.run_name: + self.help_syscalc() +- raise self.InvalidCmd('No run name currently defined. Please add this information.') ++ raise self.InvalidCmd('No run name currently defined. Please add this information.') + args.append('all') + return + + #deal options + tag = [a for a in args if a.startswith('--tag=')] +- if tag: ++ if tag: + args.remove(tag[0]) + tag = tag[0][6:] +- ++ + if args[0] not in self._syscalc_mode: + self.set_run_name(args[0], tag=tag, level='syscalc') + del args[0] +@@ -1564,61 +1564,61 @@ class CheckValidForCmd(object): + args.append('all') + elif not self.run_name: + self.help_syscalc() +- raise self.InvalidCmd('No run name currently defined. Please add this information.') ++ raise self.InvalidCmd('No run name currently defined. Please add this information.') + elif tag and tag != self.run_tag: + self.set_run_name(self.run_name, tag=tag, level='syscalc') +- ++ + for arg in args: + if arg not in self._syscalc_mode and arg != self.run_name: + self.help_syscalc() +- raise self.InvalidCmd('unknown options %s' % arg) ++ raise self.InvalidCmd('unknown options %s' % arg) + + if self.run_card['use_syst'] not in self.true: + raise self.InvalidCmd('Run %s does not include ' % self.run_name + \ + 'systematics information needed for syscalc.') +- +- ++ ++ + def check_pgs(self, arg, no_default=False): + """Check the argument for pythia command +- syntax is "pgs [NAME]" ++ syntax is "pgs [NAME]" + Note that other option are already remove at this point + """ +- ++ + # If not pythia-pgs path + if not self.options['pythia-pgs_path']: + logger.info('Retry to read configuration file to find pythia-pgs path') + self.set_configuration() +- ++ + if not self.options['pythia-pgs_path'] or not \ + os.path.exists(pjoin(self.options['pythia-pgs_path'],'src')): + error_msg = 'No valid pythia-pgs path set.\n' + error_msg += 'Please use the set command to define the path and retry.\n' + error_msg += 'You can also define it in the configuration file.\n' +- raise self.InvalidCmd(error_msg) +- ++ raise self.InvalidCmd(error_msg) ++ + tag = [a for a in arg if a.startswith('--tag=')] +- if tag: ++ if tag: + arg.remove(tag[0]) + tag = tag[0][6:] +- +- ++ ++ + if len(arg) == 0 and not self.run_name: + if self.results.lastrun: + arg.insert(0, self.results.lastrun) + else: +- raise self.InvalidCmd('No run name currently define. Please add this information.') +- ++ raise self.InvalidCmd('No run name currently define. Please add this information.') ++ + if len(arg) == 1 and self.run_name == arg[0]: + arg.pop(0) +- ++ + if not len(arg) and \ + not os.path.exists(pjoin(self.me_dir,'Events','pythia_events.hep')): + if not no_default: + self.help_pgs() + raise self.InvalidCmd('''No file file pythia_events.hep currently available + Please specify a valid run_name''') +- +- lock = None ++ ++ lock = None + if len(arg) == 1: + prev_tag = self.set_run_name(arg[0], tag, 'pgs') + if not os.path.exists(pjoin(self.me_dir,'Events',self.run_name,'%s_pythia_events.hep.gz' % prev_tag)): +@@ -1626,25 +1626,25 @@ class CheckValidForCmd(object): + else: + input_file = pjoin(self.me_dir,'Events', self.run_name, '%s_pythia_events.hep.gz' % prev_tag) + output_file = pjoin(self.me_dir, 'Events', 'pythia_events.hep') +- lock = cluster.asyncrone_launch('gunzip',stdout=open(output_file,'w'), ++ lock = cluster.asyncrone_launch('gunzip',stdout=open(output_file,'w'), + argument=['-c', input_file]) + + else: +- if tag: ++ if tag: + self.run_card['run_tag'] = tag + self.set_run_name(self.run_name, tag, 'pgs') +- +- return lock ++ ++ return lock + + def check_display(self, args): + """check the validity of line + syntax is "display XXXXX" + """ +- ++ + if len(args) < 1 or args[0] not in self._display_opts: + self.help_display() + raise self.InvalidCmd +- ++ + if args[0] == 'variable' and len(args) !=2: + raise self.InvalidCmd('variable need a variable name') + +@@ -1654,39 +1654,39 @@ class CheckValidForCmd(object): + + def check_import(self, args): + """check the validity of line""" +- ++ + if not args: + self.help_import() + raise self.InvalidCmd('wrong \"import\" format') +- ++ + if args[0] != 'command': + args.insert(0,'command') +- +- ++ ++ + if not len(args) == 2 or not os.path.exists(args[1]): + raise self.InvalidCmd('PATH is mandatory for import command\n') +- ++ + + #=============================================================================== + # CompleteForCmd + #=============================================================================== + class CompleteForCmd(CheckValidForCmd): + """ The Series of help routine for the MadGraphCmd""" +- +- ++ ++ + def complete_banner_run(self, text, line, begidx, endidx, formatting=True): + "Complete the banner run command" + try: +- +- ++ ++ + args = self.split_arg(line[0:begidx], error=False) +- ++ + if args[-1].endswith(os.path.sep): + return self.path_completion(text, + os.path.join('.',*[a for a in args \ +- if a.endswith(os.path.sep)])) +- +- ++ if a.endswith(os.path.sep)])) ++ ++ + if len(args) > 1: + # only options are possible + tags = misc.glob('%s_*_banner.txt' % args[1], pjoin(self.me_dir, 'Events' , args[1])) +@@ -1697,9 +1697,9 @@ class CompleteForCmd(CheckValidForCmd): + else: + return self.list_completion(text, tags) + return self.list_completion(text, tags +['--name=','-f'], line) +- ++ + # First argument +- possibilites = {} ++ possibilites = {} + + comp = self.path_completion(text, os.path.join('.',*[a for a in args \ + if a.endswith(os.path.sep)])) +@@ -1711,10 +1711,10 @@ class CompleteForCmd(CheckValidForCmd): + run_list = misc.glob(pjoin('*','*_banner.txt'), pjoin(self.me_dir, 'Events')) + run_list = [n.rsplit('/',2)[1] for n in run_list] + possibilites['RUN Name'] = self.list_completion(text, run_list) +- ++ + return self.deal_multiple_categories(possibilites, formatting) +- +- ++ ++ + except Exception as error: + print(error) + +@@ -1732,12 +1732,12 @@ class CompleteForCmd(CheckValidForCmd): + + if len(args) == 1: + return self.path_completion(text) +- +- def complete_open(self, text, line, begidx, endidx): ++ ++ def complete_open(self, text, line, begidx, endidx): + """ complete the open command """ + + args = self.split_arg(line[0:begidx]) +- ++ + # Directory continuation + if os.path.sep in args[-1] + text: + return self.path_completion(text, +@@ -1751,10 +1751,10 @@ class CompleteForCmd(CheckValidForCmd): + if os.path.isfile(os.path.join(path,'README')): + possibility.append('README') + if os.path.isdir(os.path.join(path,'Cards')): +- possibility += [f for f in os.listdir(os.path.join(path,'Cards')) ++ possibility += [f for f in os.listdir(os.path.join(path,'Cards')) + if f.endswith('.dat')] + if os.path.isdir(os.path.join(path,'HTML')): +- possibility += [f for f in os.listdir(os.path.join(path,'HTML')) ++ possibility += [f for f in os.listdir(os.path.join(path,'HTML')) + if f.endswith('.html') and 'default' not in f] + else: + possibility.extend(['./','../']) +@@ -1763,7 +1763,7 @@ class CompleteForCmd(CheckValidForCmd): + if os.path.exists('MG5_debug'): + possibility.append('MG5_debug') + return self.list_completion(text, possibility) +- ++ + def complete_set(self, text, line, begidx, endidx): + "Complete the set command" + +@@ -1784,27 +1784,27 @@ class CompleteForCmd(CheckValidForCmd): + elif len(args) >2 and args[-1].endswith(os.path.sep): + return self.path_completion(text, + os.path.join('.',*[a for a in args if a.endswith(os.path.sep)]), +- only_dirs = True) +- ++ only_dirs = True) ++ + def complete_survey(self, text, line, begidx, endidx): + """ Complete the survey command """ +- ++ + if line.endswith('nb_core=') and not text: + import multiprocessing + max = multiprocessing.cpu_count() + return [str(i) for i in range(2,max+1)] +- ++ + return self.list_completion(text, self._run_options, line) +- ++ + complete_refine = complete_survey + complete_combine_events = complete_survey + complite_store = complete_survey + complete_generate_events = complete_survey + complete_create_gridpack = complete_survey +- ++ + def complete_generate_events(self, text, line, begidx, endidx): + """ Complete the generate events""" +- ++ + if line.endswith('nb_core=') and not text: + import multiprocessing + max = multiprocessing.cpu_count() +@@ -1813,17 +1813,17 @@ class CompleteForCmd(CheckValidForCmd): + return ['parton','pythia','pgs','delphes'] + elif '--laststep=' in line.split()[-1] and line and line[-1] != ' ': + return self.list_completion(text,['parton','pythia','pgs','delphes'],line) +- ++ + opts = self._run_options + self._generate_options + return self.list_completion(text, opts, line) + + + def complete_initMadLoop(self, text, line, begidx, endidx): + "Complete the initMadLoop command" +- ++ + numbers = [str(i) for i in range(10)] + opts = ['-f','-r','--nPS='] +- ++ + args = self.split_arg(line[0:begidx], error=False) + if len(line) >=6 and line[begidx-6:begidx]=='--nPS=': + return self.list_completion(text, numbers, line) +@@ -1840,18 +1840,18 @@ class CompleteForCmd(CheckValidForCmd): + + def complete_calculate_decay_widths(self, text, line, begidx, endidx): + """ Complete the calculate_decay_widths command""" +- ++ + if line.endswith('nb_core=') and not text: + import multiprocessing + max = multiprocessing.cpu_count() + return [str(i) for i in range(2,max+1)] +- ++ + opts = self._run_options + self._calculate_decay_options + return self.list_completion(text, opts, line) +- ++ + def complete_display(self, text, line, begidx, endidx): +- """ Complete the display command""" +- ++ """ Complete the display command""" ++ + args = self.split_arg(line[0:begidx], error=False) + if len(args) >= 2 and args[1] =='results': + start = line.find('results') +@@ -1860,44 +1860,44 @@ class CompleteForCmd(CheckValidForCmd): + + def complete_multi_run(self, text, line, begidx, endidx): + """complete multi run command""" +- ++ + args = self.split_arg(line[0:begidx], error=False) + if len(args) == 1: + data = [str(i) for i in range(0,20)] + return self.list_completion(text, data, line) +- ++ + if line.endswith('run=') and not text: + return ['parton','pythia','pgs','delphes'] + elif '--laststep=' in line.split()[-1] and line and line[-1] != ' ': + return self.list_completion(text,['parton','pythia','pgs','delphes'],line) +- ++ + opts = self._run_options + self._generate_options + return self.list_completion(text, opts, line) +- +- +- ++ ++ ++ + if line.endswith('nb_core=') and not text: + import multiprocessing + max = multiprocessing.cpu_count() + return [str(i) for i in range(2,max+1)] + opts = self._run_options + self._generate_options + return self.list_completion(text, opts, line) +- ++ + def complete_plot(self, text, line, begidx, endidx): + """ Complete the plot command """ +- ++ + args = self.split_arg(line[0:begidx], error=False) + if len(args) > 1: + return self.list_completion(text, self._plot_mode) + else: + return self.list_completion(text, self._plot_mode + list(self.results.keys())) +- ++ + def complete_syscalc(self, text, line, begidx, endidx, formatting=True): + """ Complete the syscalc command """ +- ++ + output = {} + args = self.split_arg(line[0:begidx], error=False) +- ++ + if len(args) <=1: + output['RUN_NAME'] = self.list_completion(list(self.results.keys())) + output['MODE'] = self.list_completion(text, self._syscalc_mode) +@@ -1907,12 +1907,12 @@ class CompleteForCmd(CheckValidForCmd): + if run in self.results: + tags = ['--tag=%s' % tag['tag'] for tag in self.results[run]] + output['options'] += tags +- ++ + return self.deal_multiple_categories(output, formatting) +- ++ + def complete_remove(self, text, line, begidx, endidx): + """Complete the remove command """ +- ++ + args = self.split_arg(line[0:begidx], error=False) + if len(args) > 1 and (text.startswith('--t')): + run = args[1] +@@ -1932,8 +1932,8 @@ class CompleteForCmd(CheckValidForCmd): + data = misc.glob(pjoin('*','*_banner.txt'), pjoin(self.me_dir, 'Events')) + data = [n.rsplit('/',2)[1] for n in data] + return self.list_completion(text, ['all'] + data) +- +- ++ ++ + def complete_shower(self,text, line, begidx, endidx): + "Complete the shower command" + args = self.split_arg(line[0:begidx], error=False) +@@ -1941,7 +1941,7 @@ class CompleteForCmd(CheckValidForCmd): + return self.list_completion(text, self._interfaced_showers) + elif len(args)>1 and args[1] in self._interfaced_showers: + return getattr(self, 'complete_%s' % text)\ +- (text, args[1],line.replace(args[0]+' ',''), ++ (text, args[1],line.replace(args[0]+' ',''), + begidx-len(args[0])-1, endidx-len(args[0])-1) + + def complete_pythia8(self,text, line, begidx, endidx): +@@ -1955,11 +1955,11 @@ class CompleteForCmd(CheckValidForCmd): + if not self.run_name: + return tmp1 + else: +- tmp2 = self.list_completion(text, self._run_options + ['-f', ++ tmp2 = self.list_completion(text, self._run_options + ['-f', + '--no_default', '--tag='], line) + return tmp1 + tmp2 + elif line[-1] != '=': +- return self.list_completion(text, self._run_options + ['-f', ++ return self.list_completion(text, self._run_options + ['-f', + '--no_default','--tag='], line) + + def complete_madanalysis5_parton(self,text, line, begidx, endidx): +@@ -1978,19 +1978,19 @@ class CompleteForCmd(CheckValidForCmd): + else: + tmp2 = self.list_completion(text, ['-f', + '--MA5_stdout_lvl=','--no_default','--tag='], line) +- return tmp1 + tmp2 ++ return tmp1 + tmp2 + elif '--MA5_stdout_lvl=' in line and not any(arg.startswith( + '--MA5_stdout_lvl=') for arg in args): +- return self.list_completion(text, +- ['--MA5_stdout_lvl=%s'%opt for opt in ++ return self.list_completion(text, ++ ['--MA5_stdout_lvl=%s'%opt for opt in + ['logging.INFO','logging.DEBUG','logging.WARNING', + 'logging.CRITICAL','90']], line) + else: +- return self.list_completion(text, ['-f', ++ return self.list_completion(text, ['-f', + '--MA5_stdout_lvl=','--no_default','--tag='], line) + + def complete_pythia(self,text, line, begidx, endidx): +- "Complete the pythia command" ++ "Complete the pythia command" + args = self.split_arg(line[0:begidx], error=False) + + if len(args) == 1: +@@ -2001,16 +2001,16 @@ class CompleteForCmd(CheckValidForCmd): + if not self.run_name: + return tmp1 + else: +- tmp2 = self.list_completion(text, self._run_options + ['-f', ++ tmp2 = self.list_completion(text, self._run_options + ['-f', + '--no_default', '--tag='], line) + return tmp1 + tmp2 + elif line[-1] != '=': +- return self.list_completion(text, self._run_options + ['-f', ++ return self.list_completion(text, self._run_options + ['-f', + '--no_default','--tag='], line) + + def complete_pgs(self,text, line, begidx, endidx): + "Complete the pythia command" +- args = self.split_arg(line[0:begidx], error=False) ++ args = self.split_arg(line[0:begidx], error=False) + if len(args) == 1: + #return valid run_name + data = misc.glob(pjoin('*', '*_pythia_events.hep.gz'), pjoin(self.me_dir, 'Events')) +@@ -2019,23 +2019,23 @@ class CompleteForCmd(CheckValidForCmd): + if not self.run_name: + return tmp1 + else: +- tmp2 = self.list_completion(text, self._run_options + ['-f', ++ tmp2 = self.list_completion(text, self._run_options + ['-f', + '--tag=' ,'--no_default'], line) +- return tmp1 + tmp2 ++ return tmp1 + tmp2 + else: +- return self.list_completion(text, self._run_options + ['-f', ++ return self.list_completion(text, self._run_options + ['-f', + '--tag=','--no_default'], line) + +- complete_delphes = complete_pgs +- complete_rivet = complete_pgs ++ complete_delphes = complete_pgs ++ complete_rivet = complete_pgs + + #=============================================================================== + # MadEventCmd + #=============================================================================== + class MadEventCmd(CompleteForCmd, CmdExtended, HelpToCmd, common_run.CommonRunCmd): + +- """The command line processor of Mad Graph""" +- ++ """The command line processor of Mad Graph""" ++ + + LO = True + # Truth values +@@ -2063,7 +2063,7 @@ class MadEventCmd(CompleteForCmd, CmdExtended, HelpToCmd, common_run.CommonRunCm + cluster_mode = 0 + queue = 'madgraph' + nb_core = None +- ++ + next_possibility = { + 'start': ['generate_events [OPTIONS]', 'multi_run [OPTIONS]', + 'calculate_decay_widths [OPTIONS]', +@@ -2080,9 +2080,9 @@ class MadEventCmd(CompleteForCmd, CmdExtended, HelpToCmd, common_run.CommonRunCm + 'pgs': ['generate_events [OPTIONS]', 'multi_run [OPTIONS]'], + 'delphes' : ['generate_events [OPTIONS]', 'multi_run [OPTIONS]'] + } +- ++ + asking_for_run = AskRun +- ++ + ############################################################################ + def __init__(self, me_dir = None, options={}, *completekey, **stdin): + """ add information to the cmd """ +@@ -2095,16 +2095,16 @@ class MadEventCmd(CompleteForCmd, CmdExtended, HelpToCmd, common_run.CommonRunCm + if self.web: + os.system('touch %s' % pjoin(self.me_dir,'Online')) + +- self.load_results_db() ++ self.load_results_db() + self.results.def_web_mode(self.web) + + self.Gdirs = None +- ++ + self.prompt = "%s>"%os.path.basename(pjoin(self.me_dir)) + self.configured = 0 # time for reading the card + self._options = {} # for compatibility with extended_cmd +- +- ++ ++ + def pass_in_web_mode(self): + """configure web data""" + self.web = True +@@ -2113,22 +2113,22 @@ class MadEventCmd(CompleteForCmd, CmdExtended, HelpToCmd, common_run.CommonRunCm + if os.environ['MADGRAPH_BASE']: + self.options['mg5_path'] = pjoin(os.environ['MADGRAPH_BASE'],'MG5') + +- ############################################################################ ++ ############################################################################ + def check_output_type(self, path): + """ Check that the output path is a valid madevent directory """ +- ++ + bin_path = os.path.join(path,'bin') + if os.path.isfile(os.path.join(bin_path,'generate_events')): + return True +- else: ++ else: + return False + + ############################################################################ + def set_configuration(self, amcatnlo=False, final=True, **opt): +- """assign all configuration variable from file ++ """assign all configuration variable from file + loop over the different config file if config_file not define """ +- +- super(MadEventCmd,self).set_configuration(amcatnlo=amcatnlo, ++ ++ super(MadEventCmd,self).set_configuration(amcatnlo=amcatnlo, + final=final, **opt) + + if not final: +@@ -2171,24 +2171,24 @@ class MadEventCmd(CompleteForCmd, CmdExtended, HelpToCmd, common_run.CommonRunCm + if not os.path.exists(pjoin(path, 'sys_calc')): + logger.info("No valid SysCalc path found") + continue +- # No else since the next line reinitialize the option to the ++ # No else since the next line reinitialize the option to the + #previous value anyway + self.options[key] = os.path.realpath(path) + continue + else: + self.options[key] = None +- +- ++ ++ + return self.options + + ############################################################################ +- def do_banner_run(self, line): ++ def do_banner_run(self, line): + """Make a run from the banner file""" +- ++ + args = self.split_arg(line) + #check the validity of the arguments +- self.check_banner_run(args) +- ++ self.check_banner_run(args) ++ + # Remove previous cards + for name in ['delphes_trigger.dat', 'delphes_card.dat', + 'pgs_card.dat', 'pythia_card.dat', 'madspin_card.dat', +@@ -2197,20 +2197,20 @@ class MadEventCmd(CompleteForCmd, CmdExtended, HelpToCmd, common_run.CommonRunCm + os.remove(pjoin(self.me_dir, 'Cards', name)) + except Exception: + pass +- ++ + banner_mod.split_banner(args[0], self.me_dir, proc_card=False) +- ++ + # Check if we want to modify the run + if not self.force: + ans = self.ask('Do you want to modify the Cards?', 'n', ['y','n']) + if ans == 'n': + self.force = True +- ++ + # Call Generate events + self.exec_cmd('generate_events %s %s' % (self.run_name, self.force and '-f' or '')) +- +- +- ++ ++ ++ + ############################################################################ + def do_display(self, line, output=sys.stdout): + """Display current internal status""" +@@ -2223,7 +2223,7 @@ class MadEventCmd(CompleteForCmd, CmdExtended, HelpToCmd, common_run.CommonRunCm + #return valid run_name + data = misc.glob(pjoin('*','*_banner.txt'), pjoin(self.me_dir, 'Events')) + data = [n.rsplit('/',2)[1:] for n in data] +- ++ + if data: + out = {} + for name, tag in data: +@@ -2235,11 +2235,11 @@ class MadEventCmd(CompleteForCmd, CmdExtended, HelpToCmd, common_run.CommonRunCm + print('the runs available are:') + for run_name, tags in out.items(): + print(' run: %s' % run_name) +- print(' tags: ', end=' ') ++ print(' tags: ', end=' ') + print(', '.join(tags)) + else: + print('No run detected.') +- ++ + elif args[0] == 'options': + outstr = " Run Options \n" + outstr += " ----------- \n" +@@ -2260,8 +2260,8 @@ class MadEventCmd(CompleteForCmd, CmdExtended, HelpToCmd, common_run.CommonRunCm + if value == default: + outstr += " %25s \t:\t%s\n" % (key,value) + else: +- outstr += " %25s \t:\t%s (user set)\n" % (key,value) +- outstr += "\n" ++ outstr += " %25s \t:\t%s (user set)\n" % (key,value) ++ outstr += "\n" + outstr += " Configuration Options \n" + outstr += " --------------------- \n" + for key, default in self.options_configuration.items(): +@@ -2275,15 +2275,15 @@ class MadEventCmd(CompleteForCmd, CmdExtended, HelpToCmd, common_run.CommonRunCm + self.do_print_results(' '.join(args[1:])) + else: + super(MadEventCmd, self).do_display(line, output) +- ++ + def do_save(self, line, check=True, to_keep={}): +- """Not in help: Save information to file""" ++ """Not in help: Save information to file""" + + args = self.split_arg(line) + # Check argument validity + if check: + self.check_save(args) +- ++ + if args[0] == 'options': + # First look at options which should be put in MG5DIR/input + to_define = {} +@@ -2295,7 +2295,7 @@ class MadEventCmd(CompleteForCmd, CmdExtended, HelpToCmd, common_run.CommonRunCm + for key, default in self.options_madevent.items(): + if self.options[key] != self.options_madevent[key]: + to_define[key] = self.options[key] +- ++ + if '--all' in args: + for key, default in self.options_madgraph.items(): + if self.options[key] != self.options_madgraph[key]: +@@ -2312,12 +2312,12 @@ class MadEventCmd(CompleteForCmd, CmdExtended, HelpToCmd, common_run.CommonRunCm + filepath = pjoin(self.me_dir, 'Cards', 'me5_configuration.txt') + basefile = pjoin(self.me_dir, 'Cards', 'me5_configuration.txt') + basedir = self.me_dir +- ++ + if to_keep: + to_define = to_keep + self.write_configuration(filepath, basefile, basedir, to_define) +- +- ++ ++ + + + def do_edit_cards(self, line): +@@ -2326,80 +2326,80 @@ class MadEventCmd(CompleteForCmd, CmdExtended, HelpToCmd, common_run.CommonRunCm + # Check argument's validity + mode = self.check_generate_events(args) + self.ask_run_configuration(mode) +- ++ + return + + ############################################################################ +- ++ + ############################################################################ + def do_restart_gridpack(self, line): + """ syntax restart_gridpack --precision=1.0 --restart_zero + collect the result of the current run and relaunch each channel +- not completed or optionally a completed one with a precision worse than ++ not completed or optionally a completed one with a precision worse than + a threshold (and/or the zero result channel)""" +- +- ++ ++ + args = self.split_arg(line) + # Check argument's validity + self.check_survey(args) +- ++ + # initialize / remove lhapdf mode + #self.run_card = banner_mod.RunCard(pjoin(self.me_dir, 'Cards', 'run_card.dat')) + #self.configure_directory() +- ++ + gensym = gen_ximprove.gensym(self) +- ++ + min_precision = 1.0 + resubmit_zero=False + if '--precision=' in line: + s = line.index('--precision=') + len('--precision=') + arg=line[s:].split(1)[0] + min_precision = float(arg) +- ++ + if '--restart_zero' in line: + resubmit_zero = True +- +- ++ ++ + gensym.resubmit(min_precision, resubmit_zero) + self.monitor(run_type='All jobs submitted for gridpack', html=True) + + #will be done during the refine (more precisely in gen_ximprove) + cross, error = sum_html.make_all_html_results(self) + self.results.add_detail('cross', cross) +- self.results.add_detail('error', error) ++ self.results.add_detail('error', error) + self.exec_cmd("print_results %s" % self.run_name, +- errorhandling=False, printcmd=False, precmd=False, postcmd=False) +- ++ errorhandling=False, printcmd=False, precmd=False, postcmd=False) ++ + self.results.add_detail('run_statistics', dict(gensym.run_statistics)) + +- ++ + #self.exec_cmd('combine_events', postcmd=False) + #self.exec_cmd('store_events', postcmd=False) + self.exec_cmd('decay_events -from_cards', postcmd=False) + self.exec_cmd('create_gridpack', postcmd=False) +- +- + +- ############################################################################ ++ ++ ++ ############################################################################ + + ############################################################################ + def do_generate_events(self, line): + """Main Commands: launch the full chain """ +- ++ + self.banner = None + self.Gdirs = None +- ++ + args = self.split_arg(line) + # Check argument's validity + mode = self.check_generate_events(args) + switch_mode = self.ask_run_configuration(mode, args) + if not args: +- # No run name assigned -> assigned one automaticaly ++ # No run name assigned -> assigned one automaticaly + self.set_run_name(self.find_available_run_name(self.me_dir), None, 'parton') + else: + self.set_run_name(args[0], None, 'parton', True) + args.pop(0) +- ++ + self.run_generate_events(switch_mode, args) + + self.postprocessing() +@@ -2420,8 +2420,8 @@ class MadEventCmd(CompleteForCmd, CmdExtended, HelpToCmd, common_run.CommonRunCm + + def rivet_postprocessing(self, rivet_config, postprocess_RIVET, postprocess_CONTUR): + +- # Check number of Rivet jobs to run +- run_dirs = [pjoin(self.me_dir, 'Events',run_name) ++ # Check number of Rivet jobs to run ++ run_dirs = [pjoin(self.me_dir, 'Events',run_name) + for run_name in self.postprocessing_dirs] + + nb_rivet = len(run_dirs) +@@ -2550,10 +2550,10 @@ class MadEventCmd(CompleteForCmd, CmdExtended, HelpToCmd, common_run.CommonRunCm + + wrapper = open(pjoin(self.me_dir, "Analysis", "contur", "run_contur.sh"), "w") + wrapper.write(set_env) +- ++ + wrapper.write('{0}\n'.format(contur_cmd)) + wrapper.close() +- ++ + misc.call(["run_contur.sh"], cwd=(pjoin(self.me_dir, "Analysis", "contur"))) + + logger.info("Contur outputs are stored in {0}".format(pjoin(self.me_dir, "Analysis", "contur","conturPlot"))) +@@ -2572,7 +2572,7 @@ Beware that MG5aMC now changes your runtime options to a multi-core mode with on + self.do_set('run_mode 2') + self.do_set('nb_core 1') + +- if self.run_card['gridpack'] in self.true: ++ if self.run_card['gridpack'] in self.true: + # Running gridpack warmup + gridpack_opts=[('accuracy', 0.01), + ('points', 2000), +@@ -2593,7 +2593,7 @@ Beware that MG5aMC now changes your runtime options to a multi-core mode with on + # Regular run mode + logger.info('Generating %s events with run name %s' % + (self.run_card['nevents'], self.run_name)) +- ++ + self.exec_cmd('survey %s %s' % (self.run_name,' '.join(args)), + postcmd=False) + nb_event = self.run_card['nevents'] +@@ -2601,7 +2601,7 @@ Beware that MG5aMC now changes your runtime options to a multi-core mode with on + self.exec_cmd('refine %s' % nb_event, postcmd=False) + if not float(self.results.current['cross']): + # Zero cross-section. Try to guess why +- text = '''Survey return zero cross section. ++ text = '''Survey return zero cross section. + Typical reasons are the following: + 1) A massive s-channel particle has a width set to zero. + 2) The pdf are zero for at least one of the initial state particles +@@ -2613,17 +2613,17 @@ Beware that MG5aMC now changes your runtime options to a multi-core mode with on + raise ZeroResult('See https://cp3.irmp.ucl.ac.be/projects/madgraph/wiki/FAQ-General-14') + else: + bypass_run = True +- ++ + #we can bypass the following if scan and first result is zero + if not bypass_run: + self.exec_cmd('refine %s --treshold=%s' % (nb_event,self.run_card['second_refine_treshold']) + , postcmd=False) +- ++ + self.exec_cmd('combine_events', postcmd=False,printcmd=False) + self.print_results_in_shell(self.results.current) + + if self.run_card['use_syst']: +- if self.run_card['systematics_program'] == 'auto': ++ if self.run_card['systematics_program'] == 'auto': + scdir = self.options['syscalc_path'] + if not scdir or not os.path.exists(scdir): + to_use = 'systematics' +@@ -2634,26 +2634,26 @@ Beware that MG5aMC now changes your runtime options to a multi-core mode with on + else: + logger.critical('Unvalid options for systematics_program: bypass computation of systematics variations.') + to_use = 'none' +- ++ + if to_use == 'systematics': + if self.run_card['systematics_arguments'] != ['']: + self.exec_cmd('systematics %s %s ' % (self.run_name, +- ' '.join(self.run_card['systematics_arguments'])), ++ ' '.join(self.run_card['systematics_arguments'])), + postcmd=False, printcmd=False) + else: + self.exec_cmd('systematics %s --from_card' % self.run_name, +- postcmd=False,printcmd=False) ++ postcmd=False,printcmd=False) + elif to_use == 'syscalc': + self.run_syscalc('parton') +- +- +- self.create_plot('parton') +- self.exec_cmd('store_events', postcmd=False) ++ ++ ++ self.create_plot('parton') ++ self.exec_cmd('store_events', postcmd=False) + if self.run_card['boost_event'].strip() and self.run_card['boost_event'] != 'False': + self.boost_events() +- +- +- self.exec_cmd('reweight -from_cards', postcmd=False) ++ ++ ++ self.exec_cmd('reweight -from_cards', postcmd=False) + self.exec_cmd('decay_events -from_cards', postcmd=False) + if self.run_card['time_of_flight']>=0: + self.exec_cmd("add_time_of_flight --threshold=%s" % self.run_card['time_of_flight'] ,postcmd=False) +@@ -2664,43 +2664,43 @@ Beware that MG5aMC now changes your runtime options to a multi-core mode with on + self.create_root_file(input , output) + + self.exec_cmd('madanalysis5_parton --no_default', postcmd=False, printcmd=False) +- # shower launches pgs/delphes if needed ++ # shower launches pgs/delphes if needed + self.exec_cmd('shower --no_default', postcmd=False, printcmd=False) + self.exec_cmd('madanalysis5_hadron --no_default', postcmd=False, printcmd=False) + self.exec_cmd('rivet --no_default', postcmd=False, printcmd=False) + self.store_result() +- +- if self.allow_notification_center: +- misc.system_notify('Run %s finished' % os.path.basename(self.me_dir), +- '%s: %s +- %s ' % (self.results.current['run_name'], ++ ++ if self.allow_notification_center: ++ misc.system_notify('Run %s finished' % os.path.basename(self.me_dir), ++ '%s: %s +- %s ' % (self.results.current['run_name'], + self.results.current['cross'], + self.results.current['error'])) +- ++ + def boost_events(self): +- ++ + if not self.run_card['boost_event']: + return +- ++ + if self.run_card['boost_event'].startswith('lambda'): + if not isinstance(self, cmd.CmdShell): + raise Exception("boost not allowed online") + filter = eval(self.run_card['boost_event']) + else: + raise Exception +- ++ + path = [pjoin(self.me_dir, 'Events', self.run_name, 'unweighted_events.lhe.gz'), + pjoin(self.me_dir, 'Events', self.run_name, 'unweighted_events.lhe'), + pjoin(self.me_dir, 'Events', self.run_name, 'events.lhe.gz'), + pjoin(self.me_dir, 'Events', self.run_name, 'events.lhe')] +- ++ + for p in path: + if os.path.exists(p): + event_path = p + break + else: + raise Exception("fail to find event file for the boost") +- +- ++ ++ + lhe = lhe_parser.EventFile(event_path) + with misc.TMP_directory() as tmp_dir: + output = lhe_parser.EventFile(pjoin(tmp_dir, os.path.basename(event_path)), 'w') +@@ -2711,28 +2711,28 @@ Beware that MG5aMC now changes your runtime options to a multi-core mode with on + event.boost(filter) + #write this modify event + output.write(str(event)) +- output.write('\n') ++ output.write('\n') + lhe.close() +- files.mv(pjoin(tmp_dir, os.path.basename(event_path)), event_path) +- +- +- +- +- ++ files.mv(pjoin(tmp_dir, os.path.basename(event_path)), event_path) ++ ++ ++ ++ ++ + def do_initMadLoop(self,line): +- """Compile and run MadLoop for a certain number of PS point so as to ++ """Compile and run MadLoop for a certain number of PS point so as to + initialize MadLoop (setup the zero helicity and loop filter.)""" +- ++ + args = line.split() + # Check argument's validity + options = self.check_initMadLoop(args) +- ++ + if not options['force']: + self.ask_edit_cards(['MadLoopParams.dat'], mode='fixed', plot=False) + self.exec_cmd('treatcards loop --no_MadLoopInit') + + if options['refresh']: +- for filter in misc.glob('*Filter*', ++ for filter in misc.glob('*Filter*', + pjoin(self.me_dir,'SubProcesses','MadLoop5_resources')): + logger.debug("Resetting filter '%s'."%os.path.basename(filter)) + os.remove(filter) +@@ -2753,14 +2753,14 @@ Beware that MG5aMC now changes your runtime options to a multi-core mode with on + + def do_launch(self, line, *args, **opt): + """Main Commands: exec generate_events for 2>N and calculate_width for 1>N""" +- ++ + if self.ninitial == 1: + logger.info("Note that since 2.3. The launch for 1>N pass in event generation\n"+ + " To have the previous behavior use the calculate_decay_widths function") + # self.do_calculate_decay_widths(line, *args, **opt) + #else: + self.do_generate_events(line, *args, **opt) +- ++ + def print_results_in_shell(self, data): + """Have a nice results prints in the shell, + data should be of type: gen_crossxhtml.OneTagResults""" +@@ -2770,7 +2770,7 @@ Beware that MG5aMC now changes your runtime options to a multi-core mode with on + + if data['run_statistics']: + globalstat = sum_html.RunStatistics() +- ++ + logger.info(" " ) + logger.debug(" === Run statistics summary ===") + for key, value in data['run_statistics'].items(): +@@ -2786,13 +2786,13 @@ Beware that MG5aMC now changes your runtime options to a multi-core mode with on + logger.warning(globalstat.get_warning_text()) + logger.info(" ") + +- ++ + logger.info(" === Results Summary for run: %s tag: %s ===\n" % (data['run_name'],data['tag'])) +- ++ + total_time = int(sum(_['cumulative_timing'] for _ in data['run_statistics'].values())) + if total_time > 0: + logger.info(" Cumulative sequential time for this run: %s"%misc.format_time(total_time)) +- ++ + if self.ninitial == 1: + logger.info(" Width : %.4g +- %.4g GeV" % (data['cross'], data['error'])) + else: +@@ -2810,18 +2810,18 @@ Beware that MG5aMC now changes your runtime options to a multi-core mode with on + if len(split)!=3: + continue + scale, cross, error = split +- cross_sections[float(scale)] = (float(cross), float(error)) ++ cross_sections[float(scale)] = (float(cross), float(error)) + if len(cross_sections)>0: + logger.info(' Pythia8 merged cross-sections are:') + for scale in sorted(cross_sections.keys()): + logger.info(' > Merging scale = %-6.4g : %-11.5g +/- %-7.2g [pb]'%\ + (scale,cross_sections[scale][0],cross_sections[scale][1])) +- ++ + else: + if self.ninitial == 1: + logger.info(" Matched width : %.4g +- %.4g GeV" % (data['cross_pythia'], data['error_pythia'])) + else: +- logger.info(" Matched cross-section : %.4g +- %.4g pb" % (data['cross_pythia'], data['error_pythia'])) ++ logger.info(" Matched cross-section : %.4g +- %.4g pb" % (data['cross_pythia'], data['error_pythia'])) + logger.info(" Nb of events after matching/merging : %d" % int(data['nb_event_pythia'])) + if self.run_card['use_syst'] in self.true and \ + (int(self.run_card['ickkw'])==1 or self.run_card['ktdurham']>0.0 +@@ -2838,9 +2838,9 @@ Beware that MG5aMC now changes your runtime options to a multi-core mode with on + data should be of type: gen_crossxhtml.OneTagResults""" + if not data: + return +- ++ + fsock = open(path, mode) +- ++ + if data['run_statistics']: + logger.debug(" === Run statistics summary ===") + for key, value in data['run_statistics'].items(): +@@ -2851,7 +2851,7 @@ Beware that MG5aMC now changes your runtime options to a multi-core mode with on + if format == "full": + fsock.write(" === Results Summary for run: %s tag: %s process: %s ===\n" % \ + (data['run_name'],data['tag'], os.path.basename(self.me_dir))) +- ++ + if self.ninitial == 1: + fsock.write(" Width : %.4g +- %.4g GeV\n" % (data['cross'], data['error'])) + else: +@@ -2861,20 +2861,20 @@ Beware that MG5aMC now changes your runtime options to a multi-core mode with on + if self.ninitial == 1: + fsock.write(" Matched Width : %.4g +- %.4g GeV\n" % (data['cross_pythia'], data['error_pythia'])) + else: +- fsock.write(" Matched Cross-section : %.4g +- %.4g pb\n" % (data['cross_pythia'], data['error_pythia'])) ++ fsock.write(" Matched Cross-section : %.4g +- %.4g pb\n" % (data['cross_pythia'], data['error_pythia'])) + fsock.write(" Nb of events after Matching : %s\n" % data['nb_event_pythia']) + fsock.write(" \n" ) + elif format == "short": + if mode == "w": + fsock.write("# run_name tag cross error Nb_event cross_after_matching nb_event_after matching\n") +- ++ + if data['cross_pythia'] and data['nb_event_pythia']: + text = "%(run_name)s %(tag)s %(cross)s %(error)s %(nb_event)s %(cross_pythia)s %(nb_event_pythia)s\n" + else: + text = "%(run_name)s %(tag)s %(cross)s %(error)s %(nb_event)s\n" + fsock.write(text % data) +- +- ############################################################################ ++ ++ ############################################################################ + def do_calculate_decay_widths(self, line): + """Main Commands: launch decay width calculation and automatic inclusion of + calculated widths and BRs in the param_card.""" +@@ -2887,21 +2887,21 @@ Beware that MG5aMC now changes your runtime options to a multi-core mode with on + self.Gdirs = None + + if not args: +- # No run name assigned -> assigned one automaticaly ++ # No run name assigned -> assigned one automaticaly + self.set_run_name(self.find_available_run_name(self.me_dir)) + else: + self.set_run_name(args[0], reload_card=True) + args.pop(0) + + self.configure_directory() +- ++ + # Running gridpack warmup + opts=[('accuracy', accuracy), # default 0.01 + ('points', 1000), + ('iterations',9)] + + logger.info('Calculating decay widths with run name %s' % self.run_name) +- ++ + self.exec_cmd('survey %s %s' % \ + (self.run_name, + " ".join(['--' + opt + '=' + str(val) for (opt,val) \ +@@ -2910,26 +2910,26 @@ Beware that MG5aMC now changes your runtime options to a multi-core mode with on + self.refine_mode = "old" # specify how to combine event + self.exec_cmd('combine_events', postcmd=False) + self.exec_cmd('store_events', postcmd=False) +- ++ + self.collect_decay_widths() + self.print_results_in_shell(self.results.current) +- self.update_status('calculate_decay_widths done', +- level='parton', makehtml=False) ++ self.update_status('calculate_decay_widths done', ++ level='parton', makehtml=False) ++ + +- + ############################################################################ + def collect_decay_widths(self): +- """ Collect the decay widths and calculate BRs for all particles, and put +- in param_card form. ++ """ Collect the decay widths and calculate BRs for all particles, and put ++ in param_card form. + """ +- ++ + particle_dict = {} # store the results + run_name = self.run_name + + # Looping over the Subprocesses + for P_path in SubProcesses.get_subP(self.me_dir): + ids = SubProcesses.get_subP_ids(P_path) +- # due to grouping we need to compute the ratio factor for the ++ # due to grouping we need to compute the ratio factor for the + # ungroup resutls (that we need here). Note that initial particles + # grouping are not at the same stage as final particle grouping + nb_output = len(ids) / (len(set([p[0] for p in ids]))) +@@ -2940,30 +2940,30 @@ Beware that MG5aMC now changes your runtime options to a multi-core mode with on + particle_dict[particles[0]].append([particles[1:], result/nb_output]) + except KeyError: + particle_dict[particles[0]] = [[particles[1:], result/nb_output]] +- ++ + self.update_width_in_param_card(particle_dict, + initial = pjoin(self.me_dir, 'Cards', 'param_card.dat'), + output=pjoin(self.me_dir, 'Events', run_name, "param_card.dat")) +- ++ + @staticmethod + def update_width_in_param_card(decay_info, initial=None, output=None): + # Open the param_card.dat and insert the calculated decays and BRs +- ++ + if not output: + output = initial +- ++ + param_card_file = open(initial) + param_card = param_card_file.read().split('\n') + param_card_file.close() + + decay_lines = [] + line_number = 0 +- # Read and remove all decays from the param_card ++ # Read and remove all decays from the param_card + while line_number < len(param_card): + line = param_card[line_number] + if line.lower().startswith('decay'): +- # Read decay if particle in decay_info +- # DECAY 6 1.455100e+00 ++ # Read decay if particle in decay_info ++ # DECAY 6 1.455100e+00 + line = param_card.pop(line_number) + line = line.split() + particle = 0 +@@ -2996,7 +2996,7 @@ Beware that MG5aMC now changes your runtime options to a multi-core mode with on + break + line=param_card[line_number] + if particle and particle not in decay_info: +- # No decays given, only total width ++ # No decays given, only total width + decay_info[particle] = [[[], width]] + else: # Not decay + line_number += 1 +@@ -3004,7 +3004,7 @@ Beware that MG5aMC now changes your runtime options to a multi-core mode with on + while not param_card[-1] or param_card[-1].startswith('#'): + param_card.pop(-1) + +- # Append calculated and read decays to the param_card ++ # Append calculated and read decays to the param_card + param_card.append("#\n#*************************") + param_card.append("# Decay widths *") + param_card.append("#*************************") +@@ -3018,7 +3018,7 @@ Beware that MG5aMC now changes your runtime options to a multi-core mode with on + param_card.append("# BR NDA ID1 ID2 ...") + brs = [[(val[1]/width).real, val[0]] for val in decay_info[key] if val[1]] + for val in sorted(brs, reverse=True): +- param_card.append(" %e %i %s # %s" % ++ param_card.append(" %e %i %s # %s" % + (val[0].real, len(val[1]), + " ".join([str(v) for v in val[1]]), + val[0] * width +@@ -3031,7 +3031,7 @@ Beware that MG5aMC now changes your runtime options to a multi-core mode with on + + ############################################################################ + def do_multi_run(self, line): +- ++ + args = self.split_arg(line) + # Check argument's validity + mode = self.check_multi_run(args) +@@ -3047,7 +3047,7 @@ Beware that MG5aMC now changes your runtime options to a multi-core mode with on + self.check_param_card(path, run=False) + #store it locally to avoid relaunch + param_card_iterator, self.param_card_iterator = self.param_card_iterator, [] +- ++ + crossoversig = 0 + inv_sq_err = 0 + nb_event = 0 +@@ -3055,8 +3055,8 @@ Beware that MG5aMC now changes your runtime options to a multi-core mode with on + self.nb_refine = 0 + self.exec_cmd('generate_events %s_%s -f' % (main_name, i), postcmd=False) + # Update collected value +- nb_event += int(self.results[self.run_name][-1]['nb_event']) +- self.results.add_detail('nb_event', nb_event , run=main_name) ++ nb_event += int(self.results[self.run_name][-1]['nb_event']) ++ self.results.add_detail('nb_event', nb_event , run=main_name) + cross = self.results[self.run_name][-1]['cross'] + error = self.results[self.run_name][-1]['error'] + 1e-99 + crossoversig+=cross/error**2 +@@ -3070,7 +3070,7 @@ Beware that MG5aMC now changes your runtime options to a multi-core mode with on + os.mkdir(pjoin(self.me_dir,'Events', self.run_name)) + except Exception: + pass +- os.system('%(bin)s/merge.pl %(event)s/%(name)s_*/unweighted_events.lhe.gz %(event)s/%(name)s/unweighted_events.lhe.gz %(event)s/%(name)s_banner.txt' ++ os.system('%(bin)s/merge.pl %(event)s/%(name)s_*/unweighted_events.lhe.gz %(event)s/%(name)s/unweighted_events.lhe.gz %(event)s/%(name)s_banner.txt' + % {'bin': self.dirbin, 'event': pjoin(self.me_dir,'Events'), + 'name': self.run_name}) + +@@ -3084,19 +3084,19 @@ Beware that MG5aMC now changes your runtime options to a multi-core mode with on + + self.create_root_file('%s/unweighted_events.lhe' % self.run_name, + '%s/unweighted_events.root' % self.run_name) +- +- path = pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe") ++ ++ path = pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe") + self.create_plot('parton', path, + pjoin(self.me_dir, 'HTML',self.run_name, 'plots_parton.html') + ) +- + +- if not os.path.exists('%s.gz' % path): ++ ++ if not os.path.exists('%s.gz' % path): + misc.gzip(path) + + self.update_status('', level='parton') +- self.print_results_in_shell(self.results.current) +- ++ self.print_results_in_shell(self.results.current) ++ + cpath = pjoin(self.me_dir,'Cards','param_card.dat') + if param_card_iterator: + +@@ -3112,21 +3112,21 @@ Beware that MG5aMC now changes your runtime options to a multi-core mode with on + path = pjoin(self.me_dir, 'Events','scan_%s.txt' % scan_name) + logger.info("write all cross-section results in %s" % path, '$MG:BOLD') + param_card_iterator.write_summary(path) +- + +- ############################################################################ ++ ++ ############################################################################ + def do_treatcards(self, line, mode=None, opt=None): + """Advanced commands: create .inc files from param_card.dat/run_card.dat""" + + if not mode and not opt: + args = self.split_arg(line) + mode, opt = self.check_treatcards(args) +- ++ + # To decide whether to refresh MadLoop's helicity filters, it is necessary + # to check if the model parameters where modified or not, before doing +- # anything else. ++ # anything else. + need_MadLoopFilterUpdate = False +- # Just to record what triggered the reinitialization of MadLoop for a ++ # Just to record what triggered the reinitialization of MadLoop for a + # nice debug message. + type_of_change = '' + if not opt['forbid_MadLoopInit'] and self.proc_characteristics['loop_induced'] \ +@@ -3137,10 +3137,10 @@ Beware that MG5aMC now changes your runtime options to a multi-core mode with on + (os.path.getmtime(paramDat)-os.path.getmtime(paramInc)) > 0.0: + need_MadLoopFilterUpdate = True + type_of_change = 'model' +- ++ + ML_in = pjoin(self.me_dir, 'Cards', 'MadLoopParams.dat') + ML_out = pjoin(self.me_dir,"SubProcesses", +- "MadLoop5_resources", "MadLoopParams.dat") ++ "MadLoop5_resources", "MadLoopParams.dat") + if (not os.path.isfile(ML_in)) or (not os.path.isfile(ML_out)) or \ + (os.path.getmtime(ML_in)-os.path.getmtime(ML_out)) > 0.0: + need_MadLoopFilterUpdate = True +@@ -3148,7 +3148,7 @@ Beware that MG5aMC now changes your runtime options to a multi-core mode with on + + #check if no 'Auto' are present in the file + self.check_param_card(pjoin(self.me_dir, 'Cards','param_card.dat')) +- ++ + if mode in ['param', 'all']: + model = self.find_model_name() + tmp_model = os.path.basename(model) +@@ -3160,9 +3160,9 @@ Beware that MG5aMC now changes your runtime options to a multi-core mode with on + check_param_card.check_valid_param_card(mg5_param) + opt['param_card'] = pjoin(self.me_dir, 'Source', 'MODEL', 'MG5_param.dat') + else: +- check_param_card.check_valid_param_card(opt['param_card']) +- +- logger.debug('write compile file for card: %s' % opt['param_card']) ++ check_param_card.check_valid_param_card(opt['param_card']) ++ ++ logger.debug('write compile file for card: %s' % opt['param_card']) + param_card = check_param_card.ParamCard(opt['param_card']) + outfile = pjoin(opt['output_dir'], 'param_card.inc') + ident_card = pjoin(self.me_dir,'Cards','ident_card.dat') +@@ -3185,10 +3185,10 @@ Beware that MG5aMC now changes your runtime options to a multi-core mode with on + devnull.close() + default = pjoin(self.me_dir,'bin','internal','ufomodel','param_card.dat') + +- need_mp = self.proc_characteristics['loop_induced'] ++ need_mp = self.proc_characteristics['loop_induced'] + param_card.write_inc_file(outfile, ident_card, default, need_mp=need_mp) +- +- ++ ++ + if mode in ['run', 'all']: + if not hasattr(self, 'run_card'): + run_card = banner_mod.RunCard(opt['run_card'], path=pjoin(self.me_dir, 'Cards', 'run_card.dat')) +@@ -3202,7 +3202,7 @@ Beware that MG5aMC now changes your runtime options to a multi-core mode with on + run_card['lpp2'] = 0 + run_card['ebeam1'] = 0 + run_card['ebeam2'] = 0 +- ++ + # Ensure that the bias parameters has all the required input from the + # run_card + if run_card['bias_module'].lower() not in ['dummy','none']: +@@ -3219,7 +3219,7 @@ Beware that MG5aMC now changes your runtime options to a multi-core mode with on + mandatory_file,run_card['bias_module'])) + misc.copytree(run_card['bias_module'], pjoin(self.me_dir,'Source','BIAS', + os.path.basename(run_card['bias_module']))) +- ++ + #check expected parameters for the module. + default_bias_parameters = {} + start, last = False,False +@@ -3244,50 +3244,50 @@ Beware that MG5aMC now changes your runtime options to a multi-core mode with on + for pair in line.split(','): + if not pair.strip(): + continue +- x,y =pair.split(':') ++ x,y =pair.split(':') + x=x.strip() + if x.startswith(('"',"'")) and x.endswith(x[0]): +- x = x[1:-1] ++ x = x[1:-1] + default_bias_parameters[x] = y + elif ':' in line: + x,y = line.split(':') + x = x.strip() + if x.startswith(('"',"'")) and x.endswith(x[0]): +- x = x[1:-1] ++ x = x[1:-1] + default_bias_parameters[x] = y + for key,value in run_card['bias_parameters'].items(): + if key not in default_bias_parameters: + logger.warning('%s not supported by the bias module. We discard this entry.', key) + else: + default_bias_parameters[key] = value +- run_card['bias_parameters'] = default_bias_parameters +- +- +- # Finally write the include file ++ run_card['bias_parameters'] = default_bias_parameters ++ ++ ++ # Finally write the include file + run_card.write_include_file(opt['output_dir']) +- ++ + + if self.proc_characteristics['loop_induced'] and mode in ['loop', 'all']: +- self.MadLoopparam = banner_mod.MadLoopParam(pjoin(self.me_dir, ++ self.MadLoopparam = banner_mod.MadLoopParam(pjoin(self.me_dir, + 'Cards', 'MadLoopParams.dat')) + # The writing out of MadLoop filter is potentially dangerous + # when running in multi-core with a central disk. So it is turned +- # off here. If these filters were not initialized then they will ++ # off here. If these filters were not initialized then they will + # have to be re-computed at the beginning of each run. + if 'WriteOutFilters' in self.MadLoopparam.user_set and \ + self.MadLoopparam.get('WriteOutFilters'): + logger.info( +-"""You chose to have MadLoop writing out filters. ++"""You chose to have MadLoop writing out filters. + Beware that this can be dangerous for local multicore runs.""") + self.MadLoopparam.set('WriteOutFilters',False, changeifuserset=False) +- ++ + # The conservative settings below for 'CTModeInit' and 'ZeroThres' + # help adress issues for processes like g g > h z, and g g > h g +- # where there are some helicity configuration heavily suppressed +- # (by several orders of magnitude) so that the helicity filter ++ # where there are some helicity configuration heavily suppressed ++ # (by several orders of magnitude) so that the helicity filter + # needs high numerical accuracy to correctly handle this spread in + # magnitude. Also, because one cannot use the Born as a reference +- # scale, it is better to force quadruple precision *for the ++ # scale, it is better to force quadruple precision *for the + # initialization points only*. This avoids numerical accuracy issues + # when setting up the helicity filters and does not significantly + # slow down the run. +@@ -3298,21 +3298,21 @@ Beware that this can be dangerous for local multicore runs.""") + + # It is a bit superficial to use the level 2 which tries to numerically + # map matching helicities (because of CP symmetry typically) together. +-# It is useless in the context of MC over helicities and it can ++# It is useless in the context of MC over helicities and it can + # potentially make the helicity double checking fail. + self.MadLoopparam.set('HelicityFilterLevel',1, changeifuserset=False) + + # To be on the safe side however, we ask for 4 consecutive matching + # helicity filters. + self.MadLoopparam.set('CheckCycle',4, changeifuserset=False) +- ++ + # For now it is tricky to have each channel performing the helicity + # double check. What we will end up doing is probably some kind + # of new initialization round at the beginning of each launch +- # command, to reset the filters. ++ # command, to reset the filters. + self.MadLoopparam.set('DoubleCheckHelicityFilter',False, + changeifuserset=False) +- ++ + # Thanks to TIR recycling, TIR is typically much faster for Loop-induced + # processes when not doing MC over helicities, so that we place OPP last. + if not hasattr(self, 'run_card'): +@@ -3349,7 +3349,7 @@ Beware that this can be dangerous for local multicore runs.""") + logger.warning( + """You chose to also use a lorentz rotation for stability tests (see parameter NRotations_[DP|QP]). + Beware that, for optimization purposes, MadEvent uses manual TIR cache clearing which is not compatible +- with the lorentz rotation stability test. The number of these rotations to be used will be reset to ++ with the lorentz rotation stability test. The number of these rotations to be used will be reset to + zero by MadLoop. You can avoid this by changing the parameter 'FORCE_ML_HELICITY_SUM' int he matrix.f + files to be .TRUE. so that the sum over helicity configurations is performed within MadLoop (in which case + the helicity of final state particles cannot be speicfied in the LHE file.""") +@@ -3363,15 +3363,15 @@ Beware that this can be dangerous for local multicore runs.""") + # self.MadLoopparam.set('NRotations_DP',0,changeifuserset=False) + # Revert to the above to be slightly less robust but twice faster. + self.MadLoopparam.set('NRotations_DP',1,changeifuserset=False) +- self.MadLoopparam.set('NRotations_QP',0,changeifuserset=False) +- ++ self.MadLoopparam.set('NRotations_QP',0,changeifuserset=False) ++ + # Finally, the stability tests are slightly less reliable for process +- # with less or equal than 4 final state particles because the ++ # with less or equal than 4 final state particles because the + # accessible kinematic is very limited (i.e. lorentz rotations don't + # shuffle invariants numerics much). In these cases, we therefore + # increase the required accuracy to 10^-7. + # This is important for getting g g > z z [QCD] working with a +- # ptheavy cut as low as 1 GeV. ++ # ptheavy cut as low as 1 GeV. + if self.proc_characteristics['nexternal']<=4: + if ('MLStabThres' in self.MadLoopparam.user_set and \ + self.MadLoopparam.get('MLStabThres')>1.0e-7): +@@ -3381,12 +3381,12 @@ Beware that this can be dangerous for local multicore runs.""") + than four external legs, so this is not recommended (especially not for g g > z z).""") + self.MadLoopparam.set('MLStabThres',1.0e-7,changeifuserset=False) + else: +- self.MadLoopparam.set('MLStabThres',1.0e-4,changeifuserset=False) ++ self.MadLoopparam.set('MLStabThres',1.0e-4,changeifuserset=False) + + #write the output file + self.MadLoopparam.write(pjoin(self.me_dir,"SubProcesses","MadLoop5_resources", + "MadLoopParams.dat")) +- ++ + if self.proc_characteristics['loop_induced'] and mode in ['loop', 'all']: + # Now Update MadLoop filters if necessary (if modifications were made to + # the model parameters). +@@ -3403,12 +3403,12 @@ Beware that this can be dangerous for local multicore runs.""") + elif not opt['forbid_MadLoopInit'] and \ + MadLoopInitializer.need_MadLoopInit(self.me_dir): + self.exec_cmd('initMadLoop -f') +- +- ############################################################################ ++ ++ ############################################################################ + def do_survey(self, line): + """Advanced commands: launch survey for the current process """ +- +- ++ ++ + args = self.split_arg(line) + # Check argument's validity + self.check_survey(args) +@@ -3416,7 +3416,7 @@ Beware that this can be dangerous for local multicore runs.""") + + if os.path.exists(pjoin(self.me_dir,'error')): + os.remove(pjoin(self.me_dir,'error')) +- ++ + self.configure_directory() + # Save original random number + self.random_orig = self.random +@@ -3435,9 +3435,9 @@ Beware that this can be dangerous for local multicore runs.""") + P_zero_result = [] # check the number of times where they are no phase-space + + # File for the loop (for loop induced) +- if os.path.exists(pjoin(self.me_dir,'SubProcesses', ++ if os.path.exists(pjoin(self.me_dir,'SubProcesses', + 'MadLoop5_resources')) and cluster.need_transfer(self.options): +- tf=tarfile.open(pjoin(self.me_dir, 'SubProcesses', ++ tf=tarfile.open(pjoin(self.me_dir, 'SubProcesses', + 'MadLoop5_resources.tar.gz'), 'w:gz', dereference=True) + tf.add(pjoin(self.me_dir,'SubProcesses','MadLoop5_resources'), + arcname='MadLoop5_resources') +@@ -3467,7 +3467,7 @@ Beware that this can be dangerous for local multicore runs.""") + except Exception as error: + logger.debug(error) + pass +- ++ + jobs, P_zero_result = ajobcreator.launch() + # Check if all or only some fails + if P_zero_result: +@@ -3481,60 +3481,60 @@ Beware that this can be dangerous for local multicore runs.""") + self.get_Gdir() + for P in P_zero_result: + self.Gdirs[0][pjoin(self.me_dir,'SubProcesses',P)] = [] +- ++ + self.monitor(run_type='All jobs submitted for survey', html=True) + if not self.history or 'survey' in self.history[-1] or self.ninitial ==1 or \ + self.run_card['gridpack']: + #will be done during the refine (more precisely in gen_ximprove) + cross, error = self.make_make_all_html_results() + self.results.add_detail('cross', cross) +- self.results.add_detail('error', error) ++ self.results.add_detail('error', error) + self.exec_cmd("print_results %s" % self.run_name, +- errorhandling=False, printcmd=False, precmd=False, postcmd=False) +- ++ errorhandling=False, printcmd=False, precmd=False, postcmd=False) ++ + self.results.add_detail('run_statistics', dict(ajobcreator.run_statistics)) + self.update_status('End survey', 'parton', makehtml=False) + + ############################################################################ + def pass_in_difficult_integration_mode(self, rate=1): + """be more secure for the integration to not miss it due to strong cut""" +- ++ + # improve survey options if default + if self.opts['points'] == self._survey_options['points'][1]: + self.opts['points'] = (rate+2) * self._survey_options['points'][1] + if self.opts['iterations'] == self._survey_options['iterations'][1]: + self.opts['iterations'] = 1 + rate + self._survey_options['iterations'][1] + if self.opts['accuracy'] == self._survey_options['accuracy'][1]: +- self.opts['accuracy'] = self._survey_options['accuracy'][1]/(rate+2) +- ++ self.opts['accuracy'] = self._survey_options['accuracy'][1]/(rate+2) ++ + # Modify run_config.inc in order to improve the refine + conf_path = pjoin(self.me_dir, 'Source','run_config.inc') + files.cp(conf_path, conf_path + '.bk') + # + text = open(conf_path).read() +- min_evt, max_evt = 2500 *(2+rate), 10000*(rate+1) +- ++ min_evt, max_evt = 2500 *(2+rate), 10000*(rate+1) ++ + text = re.sub('''\(min_events = \d+\)''', '(min_events = %i )' % min_evt, text) + text = re.sub('''\(max_events = \d+\)''', '(max_events = %i )' % max_evt, text) + fsock = open(conf_path, 'w') + fsock.write(text) + fsock.close() +- ++ + # Compile + for name in ['../bin/internal/gen_ximprove', 'all']: + self.compile(arg=[name], cwd=os.path.join(self.me_dir, 'Source')) +- +- +- ############################################################################ ++ ++ ++ ############################################################################ + def do_refine(self, line): + """Advanced commands: launch survey for the current process """ +- devnull = open(os.devnull, 'w') ++ devnull = open(os.devnull, 'w') + self.nb_refine += 1 + args = self.split_arg(line) + treshold=None +- + +- ++ ++ + for a in args: + if a.startswith('--treshold='): + treshold = float(a.split('=',1)[1]) +@@ -3548,8 +3548,8 @@ Beware that this can be dangerous for local multicore runs.""") + break + # Check argument's validity + self.check_refine(args) +- +- refine_opt = {'err_goal': args[0], 'split_channels': True} ++ ++ refine_opt = {'err_goal': args[0], 'split_channels': True} + precision = args[0] + if len(args) == 2: + refine_opt['max_process']= args[1] +@@ -3560,15 +3560,15 @@ Beware that this can be dangerous for local multicore runs.""") + # Update random number + self.update_random() + self.save_random() +- ++ + if self.cluster_mode: + logger.info('Creating Jobs') + self.update_status('Refine results to %s' % precision, level=None) +- ++ + self.total_jobs = 0 +- subproc = [l.strip() for l in open(pjoin(self.me_dir,'SubProcesses', ++ subproc = [l.strip() for l in open(pjoin(self.me_dir,'SubProcesses', + 'subproc.mg'))] +- ++ + # cleanning the previous job + for nb_proc,subdir in enumerate(subproc): + subdir = subdir.strip() +@@ -3589,14 +3589,14 @@ Beware that this can be dangerous for local multicore runs.""") + level = 5 + if value.has_warning(): + level = 10 +- logger.log(level, ++ logger.log(level, + value.nice_output(str('/'.join([key[0],'G%s'%key[1]]))). + replace(' statistics','')) + logger.debug(globalstat.nice_output('combined', no_warning=True)) +- ++ + if survey_statistics: + x_improve.run_statistics = survey_statistics +- ++ + x_improve.launch() # create the ajob for the refinment. + if not self.history or 'refine' not in self.history[-1]: + cross, error = x_improve.update_html() #update html results for survey +@@ -3610,14 +3610,26 @@ Beware that this can be dangerous for local multicore runs.""") + subdir = subdir.strip() + Pdir = pjoin(self.me_dir, 'SubProcesses',subdir) + bindir = pjoin(os.path.relpath(self.dirbin, Pdir)) +- ++ + logger.info(' %s ' % subdir) +- ++ + if os.path.exists(pjoin(Pdir, 'ajob1')): +- self.compile(['madevent'], cwd=Pdir) +- ++ ++ cudacpp_backend = self.run_card['cudacpp_backend'] # the default value is defined in banner.py ++ logger.info("Building madevent in madevent_interface.py with '%s' matrix elements"%cudacpp_backend) ++ if cudacpp_backend == 'FORTRAN': ++ self.compile(['madevent_fortran_link'], cwd=Pdir) ++ elif cudacpp_backend == 'CPP': ++ self.compile(['madevent_cpp_link'], cwd=Pdir) ++ elif cudacpp_backend == 'CUDA': ++ self.compile(['madevent_cuda_link'], cwd=Pdir) ++ else: ++ raise Exception("Invalid cudacpp_backend='%s': only 'FORTRAN', 'CPP', 'CUDA' are supported") ++ ###logger.info("Building madevent with ALL (FORTRAN/CPP/CUDA) matrix elements (cudacpp_backend=%s)"%cudacpp_backend) ++ ###self.compile(['all'], cwd=Pdir) + alljobs = misc.glob('ajob*', Pdir) - +- ++ #remove associated results.dat (ensure to not mix with all data) + Gre = re.compile("\s*j=(G[\d\.\w]+)") + for job in alljobs: +@@ -3625,49 +3637,49 @@ Beware that this can be dangerous for local multicore runs.""") + for Gdir in Gdirs: + if os.path.exists(pjoin(Pdir, Gdir, 'results.dat')): + os.remove(pjoin(Pdir, Gdir,'results.dat')) +- +- nb_tot = len(alljobs) ++ ++ nb_tot = len(alljobs) + self.total_jobs += nb_tot + for i, job in enumerate(alljobs): + job = os.path.basename(job) +- self.launch_job('%s' % job, cwd=Pdir, remaining=(nb_tot-i-1), +- run_type='Refine number %s on %s (%s/%s)' % ++ self.launch_job('%s' % job, cwd=Pdir, remaining=(nb_tot-i-1), ++ run_type='Refine number %s on %s (%s/%s)' % + (self.nb_refine, subdir, nb_proc+1, len(subproc))) + + +- self.monitor(run_type='All job submitted for refine number %s' % self.nb_refine, ++ self.monitor(run_type='All job submitted for refine number %s' % self.nb_refine, + html=True) +- ++ + self.update_status("Combining runs", level='parton') + try: + os.remove(pjoin(Pdir, 'combine_runs.log')) + except Exception: + pass +- ++ + if isinstance(x_improve, gen_ximprove.gen_ximprove_v4): + # the merge of the events.lhe is handle in the x_improve class +- # for splitted runs. (and partly in store_events). ++ # for splitted runs. (and partly in store_events). + combine_runs.CombineRuns(self.me_dir) + self.refine_mode = "old" + else: + self.refine_mode = "new" +- ++ + cross, error = self.make_make_all_html_results() + self.results.add_detail('cross', cross) + self.results.add_detail('error', error) + +- self.results.add_detail('run_statistics', ++ self.results.add_detail('run_statistics', + dict(self.results.get_detail('run_statistics'))) + + self.update_status('finish refine', 'parton', makehtml=False) + devnull.close() +- +- ############################################################################ ++ ++ ############################################################################ + def do_comine_iteration(self, line): + """Not in help: Combine a given iteration combine_iteration Pdir Gdir S|R step +- S is for survey ++ S is for survey + R is for refine +- step is the iteration number (not very critical)""" ++ step is the iteration number (not very critical)""" + + self.set_run_name("tmp") + self.configure_directory(html_opening=False) +@@ -3683,12 +3695,12 @@ Beware that this can be dangerous for local multicore runs.""") + gensym.combine_iteration(Pdir, Gdir, int(step)) + elif mode == "R": + refine = gen_ximprove.gen_ximprove_share(self) +- refine.combine_iteration(Pdir, Gdir, int(step)) +- +- ++ refine.combine_iteration(Pdir, Gdir, int(step)) ++ ++ ++ + +- +- ############################################################################ ++ ############################################################################ + def do_combine_events(self, line): + """Advanced commands: Launch combine events""" + start=time.time() +@@ -3698,11 +3710,11 @@ Beware that this can be dangerous for local multicore runs.""") + self.check_combine_events(args) + self.update_status('Combining Events', level='parton') + +- ++ + if self.run_card['gridpack'] and isinstance(self, GridPackCmd): + return GridPackCmd.do_combine_events(self, line) + +- ++ + # Define The Banner + tag = self.run_card['run_tag'] + # Update the banner with the pythia card +@@ -3715,14 +3727,14 @@ Beware that this can be dangerous for local multicore runs.""") + self.banner.change_seed(self.random_orig) + if not os.path.exists(pjoin(self.me_dir, 'Events', self.run_name)): + os.mkdir(pjoin(self.me_dir, 'Events', self.run_name)) +- self.banner.write(pjoin(self.me_dir, 'Events', self.run_name, ++ self.banner.write(pjoin(self.me_dir, 'Events', self.run_name, + '%s_%s_banner.txt' % (self.run_name, tag))) +- + +- get_wgt = lambda event: event.wgt ++ ++ get_wgt = lambda event: event.wgt + AllEvent = lhe_parser.MultiEventFile() + AllEvent.banner = self.banner +- ++ + partials = 0 # if too many file make some partial unweighting + sum_xsec, sum_xerru, sum_axsec = 0,[],0 + Gdirs = self.get_Gdir() +@@ -3739,12 +3751,12 @@ Beware that this can be dangerous for local multicore runs.""") + os.remove(pjoin(Gdir, 'events.lhe')) + continue + +- AllEvent.add(pjoin(Gdir, 'events.lhe'), ++ AllEvent.add(pjoin(Gdir, 'events.lhe'), + result.get('xsec'), + result.get('xerru'), + result.get('axsec') + ) +- ++ + if len(AllEvent) >= 80: #perform a partial unweighting + AllEvent.unweight(pjoin(self.me_dir, "Events", self.run_name, "partials%s.lhe.gz" % partials), + get_wgt, log_level=5, trunc_error=1e-2, event_target=self.run_card['nevents']) +@@ -3753,13 +3765,13 @@ Beware that this can be dangerous for local multicore runs.""") + AllEvent.add(pjoin(self.me_dir, "Events", self.run_name, "partials%s.lhe.gz" % partials), + sum_xsec, + math.sqrt(sum(x**2 for x in sum_xerru)), +- sum_axsec) ++ sum_axsec) + partials +=1 +- ++ + if not hasattr(self,'proc_characteristic'): + self.proc_characteristic = self.get_characteristics() + if len(AllEvent) == 0: +- nb_event = 0 ++ nb_event = 0 + else: + nb_event = AllEvent.unweight(pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe.gz"), + get_wgt, trunc_error=1e-2, event_target=self.run_card['nevents'], +@@ -3779,22 +3791,22 @@ Beware that this can be dangerous for local multicore runs.""") + os.remove(pjoin(self.me_dir, "Events", self.run_name, "partials%s.lhe.gz" % i)) + except Exception: + os.remove(pjoin(self.me_dir, "Events", self.run_name, "partials%s.lhe" % i)) +- ++ + self.results.add_detail('nb_event', nb_event) +- ++ + if self.run_card['bias_module'].lower() not in ['dummy', 'none'] and nb_event: + self.correct_bias() + elif self.run_card['custom_fcts']: + self.correct_bias() + logger.info("combination of events done in %s s ", time.time()-start) +- ++ + self.to_store.append('event') +- +- ############################################################################ ++ ++ ############################################################################ + def correct_bias(self): +- """check the first event and correct the weight by the bias ++ """check the first event and correct the weight by the bias + and correct the cross-section. +- If the event do not have the bias tag it means that the bias is ++ If the event do not have the bias tag it means that the bias is + one modifying the cross-section/shape so we have nothing to do + """ + +@@ -3822,7 +3834,7 @@ Beware that this can be dangerous for local multicore runs.""") + output.write('') + output.close() + lhe.close() +- ++ + # MODIFY THE BANNER i.e. INIT BLOCK + # ensure information compatible with normalisation choice + total_cross = sum(cross[key] for key in cross) +@@ -3834,8 +3846,8 @@ Beware that this can be dangerous for local multicore runs.""") + elif self.run_card['event_norm'] == 'unity': + total_cross = self.results.current['cross'] * total_cross / nb_event + for key in cross: +- cross[key] *= total_cross / nb_event +- ++ cross[key] *= total_cross / nb_event ++ + bannerfile = lhe_parser.EventFile(pjoin(self.me_dir, 'Events', self.run_name, '.banner.tmp.gz'),'w') + banner = banner_mod.Banner(lhe.banner) + banner.modify_init_cross(cross) +@@ -3850,12 +3862,12 @@ Beware that this can be dangerous for local multicore runs.""") + os.remove(lhe.name) + os.remove(bannerfile.name) + os.remove(output.name) +- +- ++ ++ + self.results.current['cross'] = total_cross + self.results.current['error'] = 0 +- +- ############################################################################ ++ ++ ############################################################################ + def do_store_events(self, line): + """Advanced commands: Launch store events""" + +@@ -3871,16 +3883,16 @@ Beware that this can be dangerous for local multicore runs.""") + if not os.path.exists(pjoin(self.me_dir, 'Events', run)): + os.mkdir(pjoin(self.me_dir, 'Events', run)) + if not os.path.exists(pjoin(self.me_dir, 'HTML', run)): +- os.mkdir(pjoin(self.me_dir, 'HTML', run)) +- ++ os.mkdir(pjoin(self.me_dir, 'HTML', run)) ++ + # 1) Store overall process information + #input = pjoin(self.me_dir, 'SubProcesses', 'results.dat') + #output = pjoin(self.me_dir, 'SubProcesses', '%s_results.dat' % run) +- #files.cp(input, output) ++ #files.cp(input, output) + + + # 2) Treat the files present in the P directory +- # Ensure that the number of events is different of 0 ++ # Ensure that the number of events is different of 0 + if self.results.current['nb_event'] == 0 and not self.run_card['gridpack']: + logger.warning("No event detected. No cleaning performed! This should allow to run:\n" + + " cd Subprocesses; ../bin/internal/combine_events\n"+ +@@ -3898,18 +3910,18 @@ Beware that this can be dangerous for local multicore runs.""") + # if os.path.exists(pjoin(G_path, 'results.dat')): + # input = pjoin(G_path, 'results.dat') + # output = pjoin(G_path, '%s_results.dat' % run) +- # files.cp(input, output) ++ # files.cp(input, output) + #except Exception: +- # continue ++ # continue + # Store log + try: + if os.path.exists(pjoin(G_path, 'log.txt')): + input = pjoin(G_path, 'log.txt') + output = pjoin(G_path, '%s_log.txt' % run) +- files.mv(input, output) ++ files.mv(input, output) + except Exception: + continue +- #try: ++ #try: + # # Grid + # for name in ['ftn26']: + # if os.path.exists(pjoin(G_path, name)): +@@ -3918,7 +3930,7 @@ Beware that this can be dangerous for local multicore runs.""") + # input = pjoin(G_path, name) + # output = pjoin(G_path, '%s_%s' % (run,name)) + # files.mv(input, output) +- # misc.gzip(pjoin(G_path, output), error=None) ++ # misc.gzip(pjoin(G_path, output), error=None) + #except Exception: + # continue + # Delete ftn25 to ensure reproducible runs +@@ -3928,11 +3940,11 @@ Beware that this can be dangerous for local multicore runs.""") + # 3) Update the index.html + self.gen_card_html() + +- ++ + # 4) Move the Files present in Events directory + E_path = pjoin(self.me_dir, 'Events') + O_path = pjoin(self.me_dir, 'Events', run) +- ++ + # The events file + for name in ['events.lhe', 'unweighted_events.lhe']: + finput = pjoin(E_path, name) +@@ -3948,30 +3960,30 @@ Beware that this can be dangerous for local multicore runs.""") + # os.remove(pjoin(O_path, '%s.gz' % name)) + # input = pjoin(E_path, name) + ## output = pjoin(O_path, name) +- ++ + + self.update_status('End Parton', level='parton', makehtml=False) + devnull.close() +- +- +- ############################################################################ ++ ++ ++ ############################################################################ + def do_create_gridpack(self, line): + """Advanced commands: Create gridpack from present run""" + + self.update_status('Creating gridpack', level='parton') + # compile gen_ximprove + misc.compile(['../bin/internal/gen_ximprove'], cwd=pjoin(self.me_dir, "Source")) +- ++ + Gdir = self.get_Gdir() + Pdir = set([os.path.dirname(G) for G in Gdir]) +- for P in Pdir: ++ for P in Pdir: + allG = misc.glob('G*', path=P) + for G in allG: + if pjoin(P, G) not in Gdir: + logger.debug('removing %s', pjoin(P,G)) + shutil.rmtree(pjoin(P,G)) +- +- ++ ++ + args = self.split_arg(line) + self.check_combine_events(args) + if not self.run_tag: self.run_tag = 'tag_1' +@@ -3984,13 +3996,13 @@ Beware that this can be dangerous for local multicore runs.""") + cwd=self.me_dir) + misc.call(['./bin/internal/clean'], cwd=self.me_dir) + misc.call(['./bin/internal/make_gridpack'], cwd=self.me_dir) +- files.mv(pjoin(self.me_dir, 'gridpack.tar.gz'), ++ files.mv(pjoin(self.me_dir, 'gridpack.tar.gz'), + pjoin(self.me_dir, '%s_gridpack.tar.gz' % self.run_name)) + os.system("sed -i.bak \"s/\s*.true.*=.*GridRun/ .false. = GridRun/g\" %s/Cards/grid_card.dat" \ + % self.me_dir) + self.update_status('gridpack created', level='gridpack') +- +- ############################################################################ ++ ++ ############################################################################ + def do_shower(self, line): + """launch the shower""" + +@@ -3998,7 +4010,7 @@ Beware that this can be dangerous for local multicore runs.""") + if len(args)>1 and args[0] in self._interfaced_showers: + chosen_showers = [args.pop(0)] + elif '--no_default' in line: +- # If '--no_default' was specified in the arguments, then only one ++ # If '--no_default' was specified in the arguments, then only one + # shower will be run, depending on which card is present. + # but we each of them are called. (each of them check if the file exists) + chosen_showers = list(self._interfaced_showers) +@@ -4009,9 +4021,9 @@ Beware that this can be dangerous for local multicore runs.""") + shower_priority = ['pythia8','pythia'] + chosen_showers = [sorted(chosen_showers,key=lambda sh: + shower_priority.index(sh) if sh in shower_priority else len(shower_priority)+1)[0]] +- ++ + for shower in chosen_showers: +- self.exec_cmd('%s %s'%(shower,' '.join(args)), ++ self.exec_cmd('%s %s'%(shower,' '.join(args)), + postcmd=False, printcmd=False) + + def do_madanalysis5_parton(self, line): +@@ -4027,11 +4039,11 @@ Beware that this can be dangerous for local multicore runs.""") + def mg5amc_py8_interface_consistency_warning(options): + """ Check the consistency of the mg5amc_py8_interface installed with + the current MG5 and Pythia8 versions. """ +- ++ + # All this is only relevant is Pythia8 is interfaced to MG5 + if not options['pythia8_path']: + return None +- ++ + if not options['mg5amc_py8_interface_path']: + return \ + """ +@@ -4041,7 +4053,7 @@ Beware that this can be dangerous for local multicore runs.""") + Consider installing the MG5_aMC-PY8 interface with the following command: + MG5_aMC>install mg5amc_py8_interface + """ +- ++ + mg5amc_py8_interface_path = options['mg5amc_py8_interface_path'] + py8_path = options['pythia8_path'] + # If the specified interface path is relative, make it absolut w.r.t MGDIR if +@@ -4050,7 +4062,7 @@ Beware that this can be dangerous for local multicore runs.""") + mg5amc_py8_interface_path = pjoin(MG5DIR,mg5amc_py8_interface_path) + py8_path = pjoin(MG5DIR,py8_path) + +- # Retrieve all the on-install and current versions ++ # Retrieve all the on-install and current versions + fsock = open(pjoin(mg5amc_py8_interface_path, 'MG5AMC_VERSION_ON_INSTALL')) + MG5_version_on_install = fsock.read().replace('\n','') + fsock.close() +@@ -4062,7 +4074,7 @@ Beware that this can be dangerous for local multicore runs.""") + MG5_curr_version =misc.get_pkg_info()['version'] + try: + p = subprocess.Popen(['./get_pythia8_version.py',py8_path], +- stdout=subprocess.PIPE, stderr=subprocess.PIPE, ++ stdout=subprocess.PIPE, stderr=subprocess.PIPE, + cwd=mg5amc_py8_interface_path) + (out, err) = p.communicate() + out = out.decode(errors='ignore').replace('\n','') +@@ -4072,37 +4084,37 @@ Beware that this can be dangerous for local multicore runs.""") + float(out) + except: + PY8_curr_version = None +- ++ + if not MG5_version_on_install is None and not MG5_curr_version is None: + if MG5_version_on_install != MG5_curr_version: + return \ + """ + The current version of MG5_aMC (v%s) is different than the one active when +- installing the 'mg5amc_py8_interface_path' (which was MG5aMC v%s). ++ installing the 'mg5amc_py8_interface_path' (which was MG5aMC v%s). + Please consider refreshing the installation of this interface with the command: + MG5_aMC>install mg5amc_py8_interface + """%(MG5_curr_version, MG5_version_on_install) +- ++ + if not PY8_version_on_install is None and not PY8_curr_version is None: + if PY8_version_on_install != PY8_curr_version: + return \ + """ + The current version of Pythia8 (v%s) is different than the one active when +- installing the 'mg5amc_py8_interface' tool (which was Pythia8 v%s). ++ installing the 'mg5amc_py8_interface' tool (which was Pythia8 v%s). + Please consider refreshing the installation of this interface with the command: + MG5_aMC>install mg5amc_py8_interface + """%(PY8_curr_version,PY8_version_on_install) +- ++ + return None + + def setup_Pythia8RunAndCard(self, PY8_Card, run_type): + """ Setup the Pythia8 Run environment and card. In particular all the process and run specific parameters + of the card are automatically set here. This function returns the path where HEPMC events will be output, + if any.""" +- ++ + HepMC_event_output = None + tag = self.run_tag +- ++ + PY8_Card.subruns[0].systemSet('Beams:LHEF',"unweighted_events.lhe.gz") + + hepmc_format = PY8_Card['HEPMCoutput:file'].lower() +@@ -4173,7 +4185,7 @@ already exists and is not a fifo file."""%fifo_path) + misc.mkfifo(fifo_path) + # Use defaultSet not to overwrite the current userSet status + PY8_Card.defaultSet('HEPMCoutput:file',fifo_path) +- HepMC_event_output=fifo_path ++ HepMC_event_output=fifo_path + elif hepmc_format in ['','/dev/null','None']: + logger.warning('User disabled the HepMC output of Pythia8.') + HepMC_event_output = None +@@ -4194,7 +4206,7 @@ already exists and is not a fifo file."""%fifo_path) + # only if it is not already user_set. + if PY8_Card['JetMatching:qCut']==-1.0: + PY8_Card.MadGraphSet('JetMatching:qCut',1.5*self.run_card['xqcut'], force=True) +- ++ + if PY8_Card['JetMatching:qCut']<(1.5*self.run_card['xqcut']): + logger.error( + 'The MLM merging qCut parameter you chose (%f) is less than '%PY8_Card['JetMatching:qCut']+ +@@ -4221,7 +4233,7 @@ already exists and is not a fifo file."""%fifo_path) + if PY8_Card['JetMatching:qCut'] not in qCutList: + qCutList.append(PY8_Card['JetMatching:qCut']) + PY8_Card.MadGraphSet('SysCalc:qCutList', qCutList, force=True) +- ++ + + if PY8_Card['SysCalc:qCutList']!='auto': + for scale in PY8_Card['SysCalc:qCutList']: +@@ -4232,7 +4244,7 @@ already exists and is not a fifo file."""%fifo_path) + "'sys_matchscale' in the run_card) is less than 1.5*xqcut, where xqcut is"+ + ' the run_card parameter (=%f)\n'%self.run_card['xqcut']+ + 'It would be better/safer to use a larger qCut or a smaller xqcut.') +- ++ + # Specific MLM settings + # PY8 should not implement the MLM veto since the driver should do it + # if merging scale variation is turned on +@@ -4282,18 +4294,18 @@ already exists and is not a fifo file."""%fifo_path) + CKKW_cut = 'ktdurham' + elif self.run_card['ptlund']>0.0 and self.run_card['ktdurham']<=0.0: + PY8_Card.subruns[0].MadGraphSet('Merging:doPTLundMerging',True) +- CKKW_cut = 'ptlund' ++ CKKW_cut = 'ptlund' + else: + raise InvalidCmd("*Either* the 'ptlund' or 'ktdurham' cut in "+\ + " the run_card must be turned on to activate CKKW(L) merging"+ + " with Pythia8, but *both* cuts cannot be turned on at the same time."+ + "\n ptlund=%f, ktdurham=%f."%(self.run_card['ptlund'],self.run_card['ktdurham'])) + +- ++ + # Automatically set qWeed to the CKKWL cut if not defined by the user. + if PY8_Card['SysCalc:qWeed']==-1.0: + PY8_Card.MadGraphSet('SysCalc:qWeed',self.run_card[CKKW_cut], force=True) +- ++ + # MadGraphSet sets the corresponding value (in system mode) + # only if it is not already user_set. + if PY8_Card['Merging:TMS']==-1.0: +@@ -4307,7 +4319,7 @@ already exists and is not a fifo file."""%fifo_path) + 'The CKKWl merging scale you chose (%f) is less than '%PY8_Card['Merging:TMS']+ + 'the %s cut specified in the run_card parameter (=%f).\n'%(CKKW_cut,self.run_card[CKKW_cut])+ + 'It is incorrect to use a smaller CKKWl scale than the generation-level %s cut!'%CKKW_cut) +- ++ + PY8_Card.MadGraphSet('TimeShower:pTmaxMatch',1) + PY8_Card.MadGraphSet('SpaceShower:pTmaxMatch',1) + PY8_Card.MadGraphSet('SpaceShower:rapidityOrder',False) +@@ -4369,7 +4381,7 @@ already exists and is not a fifo file."""%fifo_path) + + try: + import madgraph +- except ImportError: ++ except ImportError: + import internal.histograms as histograms + else: + import madgraph.various.histograms as histograms +@@ -4388,16 +4400,16 @@ already exists and is not a fifo file."""%fifo_path) + self.check_pythia8(args) + self.configure_directory(html_opening =False) + else: +- # initialize / remove lhapdf mode ++ # initialize / remove lhapdf mode + self.configure_directory(html_opening =False) +- self.check_pythia8(args) ++ self.check_pythia8(args) + + # Update the banner with the pythia card + if not self.banner or len(self.banner) <=1: + # Here the level keyword 'pythia' must not be changed to 'pythia8'. + self.banner = banner_mod.recover_banner(self.results, 'pythia') + +- # the args are modify and the last arg is always the mode ++ # the args are modify and the last arg is always the mode + if not no_default: + self.ask_pythia_run_configuration(args[-1], pythia_version=8, banner=self.banner) + +@@ -4413,7 +4425,7 @@ already exists and is not a fifo file."""%fifo_path) + #"Please use 'event_norm = average' in the run_card to avoid this problem.") + + +- ++ + if not self.options['mg5amc_py8_interface_path'] or not \ + os.path.exists(pjoin(self.options['mg5amc_py8_interface_path'], + 'MG5aMC_PY8_interface')): +@@ -4432,16 +4444,16 @@ Please install this tool with the following MG5_aMC command: + + # Again here 'pythia' is just a keyword for the simulation level. + self.update_status('\033[92mRunning Pythia8 [arXiv:1410.3012]\033[0m', 'pythia8') +- +- tag = self.run_tag ++ ++ tag = self.run_tag + # Now write Pythia8 card + # Start by reading, starting from the default one so that the 'user_set' + # tag are correctly set. +- PY8_Card = banner_mod.PY8Card(pjoin(self.me_dir, 'Cards', ++ PY8_Card = banner_mod.PY8Card(pjoin(self.me_dir, 'Cards', + 'pythia8_card_default.dat')) + PY8_Card.read(pjoin(self.me_dir, 'Cards', 'pythia8_card.dat'), + setter='user') +- ++ + run_type = 'default' + merged_run_types = ['MLM','CKKW'] + if int(self.run_card['ickkw'])==1: +@@ -4459,7 +4471,7 @@ Please install this tool with the following MG5_aMC command: + cmd_card = StringIO.StringIO() + PY8_Card.write(cmd_card,pjoin(self.me_dir,'Cards','pythia8_card_default.dat'), + direct_pythia_input=True) +- ++ + # Now setup the preamble to make sure that everything will use the locally + # installed tools (if present) even if the user did not add it to its + # environment variables. +@@ -4474,13 +4486,13 @@ Please install this tool with the following MG5_aMC command: + preamble = misc.get_HEPTools_location_setter( + pjoin(MG5DIR,'HEPTools'),'lib') + preamble += "\n unset PYTHIA8DATA\n" +- ++ + open(pythia_cmd_card,'w').write("""! + ! It is possible to run this card manually with: + ! %s %s + ! + """%(preamble+pythia_main,os.path.basename(pythia_cmd_card))+cmd_card.getvalue()) +- ++ + # launch pythia8 + pythia_log = pjoin(self.me_dir , 'Events', self.run_name , + '%s_pythia8.log' % tag) +@@ -4492,13 +4504,13 @@ Please install this tool with the following MG5_aMC command: + shell_exe = None + if os.path.exists('/usr/bin/env'): + shell_exe = '/usr/bin/env %s'%shell +- else: ++ else: + shell_exe = misc.which(shell) + if not shell_exe: + raise self.InvalidCmd('No s hell could be found in your environment.\n'+ + "Make sure that either '%s' is in your path or that the"%shell+\ + " command '/usr/bin/env %s' exists and returns a valid path."%shell) +- ++ + exe_cmd = "#!%s\n%s"%(shell_exe,' '.join( + [preamble+pythia_main, + os.path.basename(pythia_cmd_card)])) +@@ -4516,7 +4528,7 @@ Please install this tool with the following MG5_aMC command: + ( os.path.exists(HepMC_event_output) and \ + stat.S_ISFIFO(os.stat(HepMC_event_output).st_mode)) + startPY8timer = time.time() +- ++ + # Information that will be extracted from this PY8 run + PY8_extracted_information={ 'sigma_m':None, 'Nacc':None, 'Ntry':None, + 'cross_sections':{} } +@@ -4544,7 +4556,7 @@ You can follow PY8 run with the following command (in a separate terminal): + n_cores = max(int(self.options['cluster_size']),1) + elif self.options['run_mode']==2: + n_cores = max(int(self.cluster.nb_core),1) +- ++ + lhe_file_name = os.path.basename(PY8_Card.subruns[0]['Beams:LHEF']) + lhe_file = lhe_parser.EventFile(pjoin(self.me_dir,'Events', + self.run_name,PY8_Card.subruns[0]['Beams:LHEF'])) +@@ -4562,7 +4574,7 @@ You can follow PY8 run with the following command (in a separate terminal): + if self.options['run_mode']==2: + min_n_events_per_job = 100 + elif self.options['run_mode']==1: +- min_n_events_per_job = 1000 ++ min_n_events_per_job = 1000 + min_n_core = n_events//min_n_events_per_job + n_cores = max(min(min_n_core,n_cores),1) + +@@ -4572,8 +4584,8 @@ You can follow PY8 run with the following command (in a separate terminal): + logger.info('Follow Pythia8 shower by running the '+ + 'following command (in a separate terminal):\n tail -f %s'%pythia_log) + +- if self.options['run_mode']==2 and self.options['nb_core']>1: +- ret_code = self.cluster.launch_and_wait(wrapper_path, ++ if self.options['run_mode']==2 and self.options['nb_core']>1: ++ ret_code = self.cluster.launch_and_wait(wrapper_path, + argument= [], stdout= pythia_log, stderr=subprocess.STDOUT, + cwd=pjoin(self.me_dir,'Events',self.run_name)) + else: +@@ -4618,10 +4630,10 @@ You can follow PY8 run with the following command (in a separate terminal): + wrapper = open(wrapper_path,'w') + if self.options['cluster_temp_path'] is None: + exe_cmd = \ +-"""#!%s ++"""#!%s + ./%s PY8Card.dat >& PY8_log.txt + """ +- else: ++ else: + exe_cmd = \ + """#!%s + ln -s ./events_$1.lhe.gz ./events.lhe.gz +@@ -4651,21 +4663,21 @@ tar -czf split_$1.tar.gz split_$1 + # Set it as executable + st = os.stat(wrapper_path) + os.chmod(wrapper_path, st.st_mode | stat.S_IEXEC) +- ++ + # Split the .lhe event file, create event partition + partition=[n_available_events//n_cores]*n_cores + for i in range(n_available_events%n_cores): + partition[i] += 1 +- ++ + # Splitting according to the total number of events requested by the user + # Will be used to determine the number of events to indicate in the PY8 split cards. + partition_for_PY8=[n_events//n_cores]*n_cores + for i in range(n_events%n_cores): + partition_for_PY8[i] += 1 +- +- logger.info('Splitting .lhe event file for PY8 parallelization...') +- n_splits = lhe_file.split(partition=partition, cwd=parallelization_dir, zip=True) +- ++ ++ logger.info('Splitting .lhe event file for PY8 parallelization...') ++ n_splits = lhe_file.split(partition=partition, cwd=parallelization_dir, zip=True) ++ + if n_splits!=len(partition): + raise MadGraph5Error('Error during lhe file splitting. Expected %d files but obtained %d.' + %(len(partition),n_splits)) +@@ -4678,7 +4690,7 @@ tar -czf split_$1.tar.gz split_$1 + # Add the necessary run content + shutil.move(pjoin(parallelization_dir,lhe_file.name+'_%d.lhe.gz'%split_id), + pjoin(parallelization_dir,split_files[-1])) +- ++ + logger.info('Submitting Pythia8 jobs...') + for i, split_file in enumerate(split_files): + # We must write a PY8Card tailored for each split so as to correct the normalization +@@ -4694,7 +4706,7 @@ tar -czf split_$1.tar.gz split_$1 + split_PY8_Card.write(pjoin(parallelization_dir,'PY8Card_%d.dat'%i), + pjoin(parallelization_dir,'PY8Card.dat'), add_missing=False) + in_files = [pjoin(parallelization_dir,os.path.basename(pythia_main)), +- pjoin(parallelization_dir,'PY8Card_%d.dat'%i), ++ pjoin(parallelization_dir,'PY8Card_%d.dat'%i), + pjoin(parallelization_dir,split_file)] + if self.options['cluster_temp_path'] is None: + out_files = [] +@@ -4706,35 +4718,35 @@ tar -czf split_$1.tar.gz split_$1 + if os.path.basename(in_file)==split_file: + ln(in_file,selected_cwd,name='events.lhe.gz') + elif os.path.basename(in_file).startswith('PY8Card'): +- ln(in_file,selected_cwd,name='PY8Card.dat') ++ ln(in_file,selected_cwd,name='PY8Card.dat') + else: +- ln(in_file,selected_cwd) ++ ln(in_file,selected_cwd) + in_files = [] + wrapper_path = os.path.basename(wrapper_path) + else: + out_files = ['split_%d.tar.gz'%i] + selected_cwd = parallelization_dir + +- self.cluster.submit2(wrapper_path, +- argument=[str(i)], cwd=selected_cwd, ++ self.cluster.submit2(wrapper_path, ++ argument=[str(i)], cwd=selected_cwd, + input_files=in_files, + output_files=out_files, + required_output=out_files) +- ++ + def wait_monitoring(Idle, Running, Done): + if Idle+Running+Done == 0: + return + logger.info('Pythia8 shower jobs: %d Idle, %d Running, %d Done [%s]'\ + %(Idle, Running, Done, misc.format_time(time.time() - startPY8timer))) + self.cluster.wait(parallelization_dir,wait_monitoring) +- ++ + logger.info('Merging results from the split PY8 runs...') + if self.options['cluster_temp_path']: + # Decompressing the output + for i, split_file in enumerate(split_files): + misc.call(['tar','-xzf','split_%d.tar.gz'%i],cwd=parallelization_dir) + os.remove(pjoin(parallelization_dir,'split_%d.tar.gz'%i)) +- ++ + # Now merge logs + pythia_log_file = open(pythia_log,'w') + n_added = 0 +@@ -4766,7 +4778,7 @@ tar -czf split_$1.tar.gz split_$1 + if n_added>0: + PY8_extracted_information['sigma_m'] /= float(n_added) + pythia_log_file.close() +- ++ + # djr plots + djr_HwU = None + n_added = 0 +@@ -4833,7 +4845,7 @@ tar -czf split_$1.tar.gz split_$1 + if not os.path.isfile(hepmc_file): + continue + all_hepmc_files.append(hepmc_file) +- ++ + if len(all_hepmc_files)>0: + hepmc_output = pjoin(self.me_dir,'Events',self.run_name,HepMC_event_output) + with misc.TMP_directory() as tmp_dir: +@@ -4848,8 +4860,8 @@ tar -czf split_$1.tar.gz split_$1 + break + header.close() + tail = open(pjoin(tmp_dir,'tail.hepmc'),'w') +- n_tail = 0 +- ++ n_tail = 0 ++ + for line in misc.reverse_readline(all_hepmc_files[-1]): + if line.startswith('HepMC::'): + n_tail += 1 +@@ -4859,7 +4871,7 @@ tar -czf split_$1.tar.gz split_$1 + tail.close() + if n_tail>1: + raise MadGraph5Error('HEPMC files should only have one trailing command.') +- ###################################################################### ++ ###################################################################### + # This is the most efficient way of putting together HEPMC's, *BUT* # + # WARNING: NEED TO RENDER THE CODE BELOW SAFE TOWARDS INJECTION # + ###################################################################### +@@ -4876,12 +4888,12 @@ tar -czf split_$1.tar.gz split_$1 + elif sys.platform == 'darwin': + # sed on MAC has slightly different synthax than on + os.system(' '.join(['sed','-i',"''","'%s;$d'"% +- (';'.join('%id'%(i+1) for i in range(n_head))),hepmc_file])) +- else: +- # other UNIX systems ++ (';'.join('%id'%(i+1) for i in range(n_head))),hepmc_file])) ++ else: ++ # other UNIX systems + os.system(' '.join(['sed','-i']+["-e '%id'"%(i+1) for i in range(n_head)]+ + ["-e '$d'",hepmc_file])) +- ++ + os.system(' '.join(['cat',pjoin(tmp_dir,'header.hepmc')]+all_hepmc_files+ + [pjoin(tmp_dir,'tail.hepmc'),'>',hepmc_output])) + +@@ -4903,12 +4915,12 @@ tar -czf split_$1.tar.gz split_$1 + 'Inclusive cross section:' not in '\n'.join(open(pythia_log,'r').readlines()[-20:]): + logger.warning('Fail to produce a pythia8 output. More info in \n %s'%pythia_log) + return +- ++ + # Plot for Pythia8 + successful = self.create_plot('Pythia8') + if not successful: + logger.warning('Failed to produce Pythia8 merging plots.') +- ++ + self.to_store.append('pythia8') + + # Study matched cross-sections +@@ -4919,7 +4931,7 @@ tar -czf split_$1.tar.gz split_$1 + if self.options['run_mode']==0 or (self.options['run_mode']==2 and self.options['nb_core']==1): + PY8_extracted_information['sigma_m'],PY8_extracted_information['Nacc'],\ + PY8_extracted_information['Ntry'] = self.parse_PY8_log_file( +- pjoin(self.me_dir,'Events', self.run_name,'%s_pythia8.log' % tag)) ++ pjoin(self.me_dir,'Events', self.run_name,'%s_pythia8.log' % tag)) + else: + logger.warning('Pythia8 cross-section could not be retreived.\n'+ + 'Try turning parallelization off by setting the option nb_core to 1. YYYYY') +@@ -4932,8 +4944,8 @@ tar -czf split_$1.tar.gz split_$1 + Ntry = PY8_extracted_information['Ntry'] + sigma_m = PY8_extracted_information['sigma_m'] + # Compute pythia error +- error = self.results[self.run_name].return_tag(self.run_tag)['error'] +- try: ++ error = self.results[self.run_name].return_tag(self.run_tag)['error'] ++ try: + error_m = math.sqrt((error * Nacc/Ntry)**2 + sigma_m**2 *(1-Nacc/Ntry)/Nacc) + except ZeroDivisionError: + # Cannot compute error +@@ -4954,31 +4966,31 @@ tar -czf split_$1.tar.gz split_$1 + else: + logger.warning('Pythia8 merged cross-sections could not be retreived.\n'+ + 'Try turning parallelization off by setting the option nb_core to 1.XXXXX') +- PY8_extracted_information['cross_sections'] = {} +- ++ PY8_extracted_information['cross_sections'] = {} ++ + cross_sections = PY8_extracted_information['cross_sections'] + if cross_sections: +- # Filter the cross_sections specified an keep only the ones ++ # Filter the cross_sections specified an keep only the ones + # with central parameters and a different merging scale + a_float_re = '[\+|-]?\d+(\.\d*)?([EeDd][\+|-]?\d+)?' + central_merging_re = re.compile( + '^\s*Weight_MERGING\s*=\s*(?P%s)\s*$'%a_float_re, +- re.IGNORECASE) ++ re.IGNORECASE) + cross_sections = dict( + (float(central_merging_re.match(xsec).group('merging')),value) +- for xsec, value in cross_sections.items() if not ++ for xsec, value in cross_sections.items() if not + central_merging_re.match(xsec) is None) + central_scale = PY8_Card['JetMatching:qCut'] if \ + int(self.run_card['ickkw'])==1 else PY8_Card['Merging:TMS'] + if central_scale in cross_sections: + self.results.add_detail('cross_pythia8', cross_sections[central_scale][0]) + self.results.add_detail('error_pythia8', cross_sections[central_scale][1]) +- ++ + #logger.info('Pythia8 merged cross-sections are:') + #for scale in sorted(cross_sections.keys()): + # logger.info(' > Merging scale = %-6.4g : %-11.5g +/- %-7.2g [pb]'%\ +- # (scale,cross_sections[scale][0],cross_sections[scale][1])) +- ++ # (scale,cross_sections[scale][0],cross_sections[scale][1])) ++ + xsecs_file = open(pjoin(self.me_dir,'Events',self.run_name, + '%s_merged_xsecs.txt'%tag),'w') + if cross_sections: +@@ -4991,9 +5003,9 @@ tar -czf split_$1.tar.gz split_$1 + xsecs_file.write('Cross-sections could not be read from the'+\ + "XML node 'xsection' of the .dat file produced by Pythia8.") + xsecs_file.close() +- ++ + #Update the banner +- # We add directly the pythia command card because it has the full ++ # We add directly the pythia command card because it has the full + # information + self.banner.add(pythia_cmd_card) + +@@ -5010,13 +5022,13 @@ tar -czf split_$1.tar.gz split_$1 + if self.options['delphes_path']: + self.exec_cmd('delphes --no_default', postcmd=False, printcmd=False) + self.print_results_in_shell(self.results.current) +- ++ + def parse_PY8_log_file(self, log_file_path): + """ Parse a log file to extract number of event and cross-section. """ + pythiare = re.compile("Les Houches User Process\(es\)\s*\d+\s*\|\s*(?P\d+)\s*(?P\d+)\s*(?P\d+)\s*\|\s*(?P[\d\.e\-\+]+)\s*(?P[\d\.e\-\+]+)") + pythia_xsec_re = re.compile("Inclusive cross section\s*:\s*(?P[\d\.e\-\+]+)\s*(?P[\d\.e\-\+]+)") + sigma_m, Nacc, Ntry = None, None, None +- for line in misc.BackRead(log_file_path): ++ for line in misc.BackRead(log_file_path): + info = pythiare.search(line) + if not info: + # Also try to obtain the cross-section and error from the final xsec line of pythia8 log +@@ -5046,7 +5058,7 @@ tar -czf split_$1.tar.gz split_$1 + + raise self.InvalidCmd("Could not find cross-section and event number information "+\ + "in Pythia8 log\n '%s'."%log_file_path) +- ++ + def extract_cross_sections_from_DJR(self,djr_output): + """Extract cross-sections from a djr XML output.""" + import xml.dom.minidom as minidom +@@ -5063,11 +5075,11 @@ tar -czf split_$1.tar.gz split_$1 + [float(xsec.childNodes[0].data.split()[0]), + float(xsec.childNodes[0].data.split()[1])]) + for xsec in xsections) +- ++ + def do_pythia(self, line): + """launch pythia""" +- +- ++ ++ + # Check argument's validity + args = self.split_arg(line) + if '--no_default' in args: +@@ -5077,12 +5089,12 @@ tar -czf split_$1.tar.gz split_$1 + args.remove('--no_default') + else: + no_default = False +- ++ + if not self.run_name: + self.check_pythia(args) + self.configure_directory(html_opening =False) + else: +- # initialize / remove lhapdf mode ++ # initialize / remove lhapdf mode + self.configure_directory(html_opening =False) + self.check_pythia(args) + +@@ -5090,7 +5102,7 @@ tar -czf split_$1.tar.gz split_$1 + logger.error('pythia-pgs require event_norm to be on sum. Do not run pythia6') + return + +- # the args are modify and the last arg is always the mode ++ # the args are modify and the last arg is always the mode + if not no_default: + self.ask_pythia_run_configuration(args[-1]) + if self.options['automatic_html_opening']: +@@ -5102,35 +5114,35 @@ tar -czf split_$1.tar.gz split_$1 + self.banner = banner_mod.recover_banner(self.results, 'pythia') + + pythia_src = pjoin(self.options['pythia-pgs_path'],'src') +- ++ + self.results.add_detail('run_mode', 'madevent') + + self.update_status('Running Pythia', 'pythia') + try: + os.remove(pjoin(self.me_dir,'Events','pythia.done')) + except Exception: +- pass +- ++ pass ++ + ## LAUNCHING PYTHIA + # check that LHAPATH is define. + if not re.search(r'^\s*LHAPATH=%s/PDFsets' % pythia_src, +- open(pjoin(self.me_dir,'Cards','pythia_card.dat')).read(), ++ open(pjoin(self.me_dir,'Cards','pythia_card.dat')).read(), + re.M): + f = open(pjoin(self.me_dir,'Cards','pythia_card.dat'),'a') + f.write('\n LHAPATH=%s/PDFsets' % pythia_src) + f.close() + tag = self.run_tag + pythia_log = pjoin(self.me_dir, 'Events', self.run_name , '%s_pythia.log' % tag) +- #self.cluster.launch_and_wait('../bin/internal/run_pythia', ++ #self.cluster.launch_and_wait('../bin/internal/run_pythia', + # argument= [pythia_src], stdout= pythia_log, + # stderr=subprocess.STDOUT, + # cwd=pjoin(self.me_dir,'Events')) + output_files = ['pythia_events.hep'] + if self.run_card['use_syst']: + output_files.append('syst.dat') +- if self.run_card['ickkw'] == 1: ++ if self.run_card['ickkw'] == 1: + output_files += ['beforeveto.tree', 'xsecs.tree', 'events.tree'] +- ++ + os.environ['PDG_MASS_TBL'] = pjoin(pythia_src,'mass_width_2004.mc') + self.cluster.launch_and_wait(pjoin(pythia_src, 'pythia'), + input_files=[pjoin(self.me_dir, "Events", "unweighted_events.lhe"), +@@ -5140,23 +5152,23 @@ tar -czf split_$1.tar.gz split_$1 + stdout= pythia_log, + stderr=subprocess.STDOUT, + cwd=pjoin(self.me_dir,'Events')) +- ++ + + os.remove(pjoin(self.me_dir, "Events", "unweighted_events.lhe")) + + if not os.path.exists(pjoin(self.me_dir,'Events','pythia_events.hep')): + logger.warning('Fail to produce pythia output. More info in \n %s' % pythia_log) + return +- ++ + self.to_store.append('pythia') +- ++ + # Find the matched cross-section + if int(self.run_card['ickkw']): + # read the line from the bottom of the file +- #pythia_log = misc.BackRead(pjoin(self.me_dir,'Events', self.run_name, ++ #pythia_log = misc.BackRead(pjoin(self.me_dir,'Events', self.run_name, + # '%s_pythia.log' % tag)) +- pythiare = re.compile("\s*I\s+0 All included subprocesses\s+I\s+(?P\d+)\s+(?P\d+)\s+I\s+(?P[\d\.D\-+]+)\s+I") +- for line in misc.reverse_readline(pjoin(self.me_dir,'Events', self.run_name, ++ pythiare = re.compile("\s*I\s+0 All included subprocesses\s+I\s+(?P\d+)\s+(?P\d+)\s+I\s+(?P[\d\.D\-+]+)\s+I") ++ for line in misc.reverse_readline(pjoin(self.me_dir,'Events', self.run_name, + '%s_pythia.log' % tag)): + info = pythiare.search(line) + if not info: +@@ -5176,16 +5188,16 @@ tar -czf split_$1.tar.gz split_$1 + self.results.add_detail('nb_event_pythia', Nacc) + #compute pythia error + error = self.results[self.run_name].return_tag(self.run_tag)['error'] +- if Nacc: ++ if Nacc: + error_m = math.sqrt((error * Nacc/Ntry)**2 + sigma_m**2 *(1-Nacc/Ntry)/Nacc) + else: + error_m = 10000 * sigma_m + # works both for fixed number of generated events and fixed accepted events + self.results.add_detail('error_pythia', error_m) +- break ++ break + + #pythia_log.close() +- ++ + pydir = pjoin(self.options['pythia-pgs_path'], 'src') + eradir = self.options['exrootanalysis_path'] + madir = self.options['madanalysis_path'] +@@ -5204,12 +5216,12 @@ tar -czf split_$1.tar.gz split_$1 + + # Creating LHE file + self.run_hep2lhe(banner_path) +- ++ + if int(self.run_card['ickkw']): + misc.gzip(pjoin(self.me_dir,'Events','beforeveto.tree'), +- stdout=pjoin(self.me_dir,'Events',self.run_name, tag+'_pythia_beforeveto.tree.gz')) ++ stdout=pjoin(self.me_dir,'Events',self.run_name, tag+'_pythia_beforeveto.tree.gz')) ++ + +- + if self.run_card['use_syst'] in self.true: + # Calculate syscalc info based on syst.dat + try: +@@ -5221,7 +5233,7 @@ tar -czf split_$1.tar.gz split_$1 + # Store syst.dat + misc.gzip(pjoin(self.me_dir,'Events', 'syst.dat'), + stdout=pjoin(self.me_dir,'Events',self.run_name, tag + '_pythia_syst.dat.gz')) +- ++ + # Store syscalc.dat + if os.path.exists(pjoin(self.me_dir, 'Events', 'syscalc.dat')): + filename = pjoin(self.me_dir, 'Events' ,self.run_name, +@@ -5241,7 +5253,7 @@ tar -czf split_$1.tar.gz split_$1 + if self.options['delphes_path']: + self.exec_cmd('delphes --no_default', postcmd=False, printcmd=False) + self.print_results_in_shell(self.results.current) +- ++ + + ################################################################################ + def do_remove(self, line): +@@ -5251,8 +5263,8 @@ tar -czf split_$1.tar.gz split_$1 + run, tag, mode = self.check_remove(args) + if 'banner' in mode: + mode.append('all') +- +- ++ ++ + if run == 'all': + # Check first if they are not a run with a name run. + if os.path.exists(pjoin(self.me_dir, 'Events', 'all')): +@@ -5268,7 +5280,7 @@ tar -czf split_$1.tar.gz split_$1 + logger.info(error) + pass # run already clear + return +- ++ + # Check that run exists + if not os.path.exists(pjoin(self.me_dir, 'Events', run)): + raise self.InvalidCmd('No run \'%s\' detected' % run) +@@ -5282,7 +5294,7 @@ tar -czf split_$1.tar.gz split_$1 + + + # Found the file to delete +- ++ + to_delete = misc.glob('*', pjoin(self.me_dir, 'Events', run)) + to_delete += misc.glob('*', pjoin(self.me_dir, 'HTML', run)) + # forbid the banner to be removed +@@ -5302,7 +5314,7 @@ tar -czf split_$1.tar.gz split_$1 + if os.path.exists(pjoin(self.me_dir, 'Events', run, 'unweighted_events.lhe.gz')): + to_delete.append('unweighted_events.lhe.gz') + if os.path.exists(pjoin(self.me_dir, 'HTML', run,'plots_parton.html')): +- to_delete.append(pjoin(self.me_dir, 'HTML', run,'plots_parton.html')) ++ to_delete.append(pjoin(self.me_dir, 'HTML', run,'plots_parton.html')) + if nb_rm != len(to_delete): + logger.warning('Be carefull that partonic information are on the point to be removed.') + if 'all' in mode: +@@ -5315,8 +5327,8 @@ tar -czf split_$1.tar.gz split_$1 + if 'delphes' not in mode: + to_delete = [f for f in to_delete if 'delphes' not in f] + if 'parton' not in mode: +- to_delete = [f for f in to_delete if 'delphes' in f +- or 'pgs' in f ++ to_delete = [f for f in to_delete if 'delphes' in f ++ or 'pgs' in f + or 'pythia' in f] + if not self.force and len(to_delete): + question = 'Do you want to delete the following files?\n %s' % \ +@@ -5324,7 +5336,7 @@ tar -czf split_$1.tar.gz split_$1 + ans = self.ask(question, 'y', choices=['y','n']) + else: + ans = 'y' +- ++ + if ans == 'y': + for file2rm in to_delete: + if os.path.exists(pjoin(self.me_dir, 'Events', run, file2rm)): +@@ -5362,7 +5374,7 @@ tar -czf split_$1.tar.gz split_$1 + if ans == 'y': + for file2rm in to_delete: + os.remove(file2rm) +- ++ + if 'banner' in mode: + to_delete = misc.glob('*', pjoin(self.me_dir, 'Events', run)) + if tag: +@@ -5377,8 +5389,8 @@ tar -czf split_$1.tar.gz split_$1 + return + elif any(['banner' not in os.path.basename(p) for p in to_delete]): + if to_delete: +- raise MadGraph5Error('''Some output still exists for this run. +- Please remove those output first. Do for example: ++ raise MadGraph5Error('''Some output still exists for this run. ++ Please remove those output first. Do for example: + remove %s all banner + ''' % run) + else: +@@ -5388,7 +5400,7 @@ tar -czf split_$1.tar.gz split_$1 + return + else: + logger.info('''The banner is not removed. In order to remove it run: +- remove %s all banner %s''' % (run, tag and '--tag=%s ' % tag or '')) ++ remove %s all banner %s''' % (run, tag and '--tag=%s ' % tag or '')) + + # update database. + self.results.clean(mode, run, tag) +@@ -5408,7 +5420,7 @@ tar -czf split_$1.tar.gz split_$1 + logger.info('plot for run %s' % self.run_name) + if not self.force: + self.ask_edit_cards(['plot_card.dat'], args, plot=True) +- ++ + if any([arg in ['all','parton'] for arg in args]): + filename = pjoin(self.me_dir, 'Events', self.run_name, 'unweighted_events.lhe') + if os.path.exists(filename+'.gz'): +@@ -5426,8 +5438,8 @@ tar -czf split_$1.tar.gz split_$1 + except Exception: + pass + else: +- logger.info('No valid files for partonic plot') +- ++ logger.info('No valid files for partonic plot') ++ + if any([arg in ['all','pythia'] for arg in args]): + filename = pjoin(self.me_dir, 'Events' ,self.run_name, + '%s_pythia_events.lhe' % self.run_tag) +@@ -5440,10 +5452,10 @@ tar -czf split_$1.tar.gz split_$1 + stdout= "%s.gz" % filename) + else: + logger.info('No valid files for pythia plot') +- +- ++ ++ + if any([arg in ['all','pgs'] for arg in args]): +- filename = pjoin(self.me_dir, 'Events', self.run_name, ++ filename = pjoin(self.me_dir, 'Events', self.run_name, + '%s_pgs_events.lhco' % self.run_tag) + if os.path.exists(filename+'.gz'): + misc.gunzip("%s.gz" % filename) +@@ -5452,15 +5464,15 @@ tar -czf split_$1.tar.gz split_$1 + misc.gzip(filename) + else: + logger.info('No valid files for pgs plot') +- ++ + if any([arg in ['all','delphes'] for arg in args]): +- filename = pjoin(self.me_dir, 'Events', self.run_name, ++ filename = pjoin(self.me_dir, 'Events', self.run_name, + '%s_delphes_events.lhco' % self.run_tag) + if os.path.exists(filename+'.gz'): + misc.gunzip("%s.gz" % filename) + if os.path.exists(filename): + self.create_plot('Delphes') +- misc.gzip(filename) ++ misc.gzip(filename) + else: + logger.info('No valid files for delphes plot') + +@@ -5476,9 +5488,9 @@ tar -czf split_$1.tar.gz split_$1 + if self.ninitial == 1: + logger.error('SysCalc can\'t be run for decay processes') + return +- ++ + logger.info('Calculating systematics for run %s' % self.run_name) +- ++ + self.ask_edit_cards(['run_card.dat'], args, plot=False) + self.run_card = banner_mod.RunCard(pjoin(self.me_dir, 'Cards', 'run_card.dat')) + if any([arg in ['all','parton'] for arg in args]): +@@ -5492,7 +5504,7 @@ tar -czf split_$1.tar.gz split_$1 + stdout="%s.gz" % filename) + else: + logger.info('No valid files for parton level systematics run.') +- ++ + if any([arg in ['all','pythia'] for arg in args]): + filename = pjoin(self.me_dir, 'Events' ,self.run_name, + '%s_pythia_syst.dat' % self.run_tag) +@@ -5513,17 +5525,17 @@ tar -czf split_$1.tar.gz split_$1 + else: + logger.info('No valid files for pythia level') + +- ++ + def store_result(self): +- """ tar the pythia results. This is done when we are quite sure that ++ """ tar the pythia results. This is done when we are quite sure that + the pythia output will not be use anymore """ + + if not self.run_name: + return +- ++ + if not self.to_store: +- return +- ++ return ++ + tag = self.run_card['run_tag'] + self.update_status('storing files of previous run', level=None,\ + error=True) +@@ -5534,14 +5546,14 @@ tar -czf split_$1.tar.gz split_$1 + misc.gzip(pjoin(self.me_dir,'Events',self.run_name,"unweighted_events.lhe")) + if os.path.exists(pjoin(self.me_dir,'Events','reweight.lhe')): + os.remove(pjoin(self.me_dir,'Events', 'reweight.lhe')) +- ++ + if 'pythia' in self.to_store: + self.update_status('Storing Pythia files of previous run', level='pythia', error=True) + p = pjoin(self.me_dir,'Events') + n = self.run_name + t = tag + self.to_store.remove('pythia') +- misc.gzip(pjoin(p,'pythia_events.hep'), ++ misc.gzip(pjoin(p,'pythia_events.hep'), + stdout=pjoin(p, str(n),'%s_pythia_events.hep' % t),forceexternal=True) + + if 'pythia8' in self.to_store: +@@ -5569,26 +5581,26 @@ tar -czf split_$1.tar.gz split_$1 + os.system("mv " + file_path + hepmc_fileformat + " " + move_hepmc_path) + + self.update_status('Done', level='pythia',makehtml=False,error=True) +- self.results.save() +- ++ self.results.save() ++ + self.to_store = [] + +- def launch_job(self,exe, cwd=None, stdout=None, argument = [], remaining=0, ++ def launch_job(self,exe, cwd=None, stdout=None, argument = [], remaining=0, + run_type='', mode=None, **opt): + """ """ + argument = [str(arg) for arg in argument] + if mode is None: + mode = self.cluster_mode +- ++ + # ensure that exe is executable + if os.path.exists(exe) and not os.access(exe, os.X_OK): + os.system('chmod +x %s ' % exe) + elif (cwd and os.path.exists(pjoin(cwd, exe))) and not \ + os.access(pjoin(cwd, exe), os.X_OK): + os.system('chmod +x %s ' % pjoin(cwd, exe)) +- ++ + if mode == 0: +- self.update_status((remaining, 1, ++ self.update_status((remaining, 1, + self.total_jobs - remaining -1, run_type), level=None, force=False) + start = time.time() + #os.system('cd %s; ./%s' % (cwd,exe)) +@@ -5601,24 +5613,24 @@ tar -czf split_$1.tar.gz split_$1 + elif mode in [1,2]: + exename = os.path.basename(exe) + # For condor cluster, create the input/output files +- if 'ajob' in exename: ++ if 'ajob' in exename: + input_files = ['madevent','input_app.txt','symfact.dat','iproc.dat','dname.mg', + pjoin(self.me_dir, 'SubProcesses','randinit')] +- if os.path.exists(pjoin(self.me_dir,'SubProcesses', ++ if os.path.exists(pjoin(self.me_dir,'SubProcesses', + 'MadLoop5_resources.tar.gz')) and cluster.need_transfer(self.options): + input_files.append(pjoin(self.me_dir,'SubProcesses', 'MadLoop5_resources.tar.gz')) +- ++ + output_files = [] + required_output = [] +- ++ + + #Find the correct PDF input file + input_files.append(self.get_pdf_input_filename()) +- ++ + #Find the correct ajob + Gre = re.compile("\s*j=(G[\d\.\w]+)") + origre = re.compile("grid_directory=(G[\d\.\w]+)") +- try : ++ try : + fsock = open(exe) + except Exception: + fsock = open(pjoin(cwd,exe)) +@@ -5636,21 +5648,21 @@ tar -czf split_$1.tar.gz split_$1 + if os.path.isdir(pjoin(cwd,G)): + input_files.append(G) + required_output.append('%s/results.dat' % G) +- ++ + if origre.search(text): + G_grid = origre.search(text).groups()[0] + input_files.append(pjoin(G_grid, 'ftn26')) +- ++ + #submitting +- self.cluster.submit2(exe, stdout=stdout, cwd=cwd, ++ self.cluster.submit2(exe, stdout=stdout, cwd=cwd, + input_files=input_files, output_files=output_files, + required_output=required_output) + elif 'survey' in exename: + input_files = ['madevent','input_app.txt','symfact.dat','iproc.dat', 'dname.mg', +- pjoin(self.me_dir, 'SubProcesses','randinit')] +- if os.path.exists(pjoin(self.me_dir,'SubProcesses', ++ pjoin(self.me_dir, 'SubProcesses','randinit')] ++ if os.path.exists(pjoin(self.me_dir,'SubProcesses', + 'MadLoop5_resources.tar.gz')) and cluster.need_transfer(self.options): +- input_files.append(pjoin(self.me_dir,'SubProcesses', ++ input_files.append(pjoin(self.me_dir,'SubProcesses', + 'MadLoop5_resources.tar.gz')) + + #Find the correct PDF input file +@@ -5659,7 +5671,7 @@ tar -czf split_$1.tar.gz split_$1 + + output_files = [] + required_output = [] +- ++ + #Find the correct ajob + suffix = "_%s" % int(float(argument[0])) + if suffix == '_0': +@@ -5673,12 +5685,12 @@ tar -czf split_$1.tar.gz split_$1 + if '.' in argument[0]: + offset = int(str(argument[0]).split('.')[1]) + else: +- offset = 0 +- ++ offset = 0 ++ + if offset ==0 or offset == int(float(argument[0])): + if os.path.exists(pjoin(cwd, G, 'input_app.txt')): + os.remove(pjoin(cwd, G, 'input_app.txt')) +- ++ + if os.path.exists(os.path.realpath(pjoin(cwd, G, 'ftn25'))): + if offset == 0 or offset == int(float(argument[0])): + os.remove(pjoin(cwd, G, 'ftn25')) +@@ -5694,16 +5706,16 @@ tar -czf split_$1.tar.gz split_$1 + pass + + #submitting +- self.cluster.cluster_submit(exe, stdout=stdout, cwd=cwd, argument=argument, ++ self.cluster.cluster_submit(exe, stdout=stdout, cwd=cwd, argument=argument, + input_files=input_files, output_files=output_files, + required_output=required_output, **opt) + elif "refine_splitted.sh" in exename: + input_files = ['madevent','symfact.dat','iproc.dat', 'dname.mg', +- pjoin(self.me_dir, 'SubProcesses','randinit')] +- ++ pjoin(self.me_dir, 'SubProcesses','randinit')] ++ + if os.path.exists(pjoin(self.me_dir,'SubProcesses', + 'MadLoop5_resources.tar.gz')) and cluster.need_transfer(self.options): +- input_files.append(pjoin(self.me_dir,'SubProcesses', ++ input_files.append(pjoin(self.me_dir,'SubProcesses', + 'MadLoop5_resources.tar.gz')) + + #Find the correct PDF input file +@@ -5713,25 +5725,25 @@ tar -czf split_$1.tar.gz split_$1 + output_files = [argument[0]] + required_output = [] + for G in output_files: +- required_output.append('%s/results.dat' % G) ++ required_output.append('%s/results.dat' % G) + input_files.append(pjoin(argument[1], "input_app.txt")) + input_files.append(pjoin(argument[1], "ftn26")) +- ++ + #submitting +- self.cluster.cluster_submit(exe, stdout=stdout, cwd=cwd, argument=argument, ++ self.cluster.cluster_submit(exe, stdout=stdout, cwd=cwd, argument=argument, + input_files=input_files, output_files=output_files, +- required_output=required_output, **opt) ++ required_output=required_output, **opt) ++ ++ + +- +- + else: + self.cluster.submit(exe, argument=argument, stdout=stdout, cwd=cwd, **opt) +- ++ + + ############################################################################ + def find_madevent_mode(self): + """Find if Madevent is in Group mode or not""" +- ++ + # The strategy is too look in the files Source/run_configs.inc + # if we found: ChanPerJob=3 then it's a group mode. + file_path = pjoin(self.me_dir, 'Source', 'run_config.inc') +@@ -5740,11 +5752,11 @@ tar -czf split_$1.tar.gz split_$1 + return 'group' + else: + return 'v4' +- ++ + ############################################################################ + def monitor(self, run_type='monitor', mode=None, html=False): + """ monitor the progress of running job """ +- ++ + + starttime = time.time() + if mode is None: +@@ -5760,8 +5772,8 @@ tar -czf split_$1.tar.gz split_$1 + else: + update_status = lambda idle, run, finish: None + update_first = None +- try: +- self.cluster.wait(self.me_dir, update_status, update_first=update_first) ++ try: ++ self.cluster.wait(self.me_dir, update_status, update_first=update_first) + except Exception as error: + logger.info(error) + if not self.force: +@@ -5776,24 +5788,24 @@ tar -czf split_$1.tar.gz split_$1 + raise + except KeyboardInterrupt as error: + self.cluster.remove() +- raise +- +- ++ raise ++ + +- ############################################################################ ++ ++ ############################################################################ + def configure_directory(self, html_opening=True): +- """ All action require before any type of run """ ++ """ All action require before any type of run """ + + # Basic check + assert os.path.exists(pjoin(self.me_dir,'SubProcesses')) + + # environmental variables to be included in make_opts + self.make_opts_var = {} +- ++ + #see when the last file was modified + time_mod = max([os.path.getmtime(pjoin(self.me_dir,'Cards','run_card.dat')), + os.path.getmtime(pjoin(self.me_dir,'Cards','param_card.dat'))]) +- ++ + if self.configured >= time_mod and hasattr(self, 'random') and hasattr(self, 'run_card'): + #just ensure that cluster specific are correctly handled + if self.cluster: +@@ -5808,7 +5820,7 @@ tar -czf split_$1.tar.gz split_$1 + #open only once the web page + # Change current working directory + self.launching_dir = os.getcwd() +- ++ + # Check if we need the MSSM special treatment + model = self.find_model_name() + if model == 'mssm' or model.startswith('mssm-'): +@@ -5816,14 +5828,14 @@ tar -czf split_$1.tar.gz split_$1 + mg5_param = pjoin(self.me_dir, 'Source', 'MODEL', 'MG5_param.dat') + check_param_card.convert_to_mg5card(param_card, mg5_param) + check_param_card.check_valid_param_card(mg5_param) +- ++ + # limit the number of event to 100k + self.check_nb_events() + + # this is in order to avoid conflicts between runs with and without + # lhapdf. not needed anymore the makefile handles it automaticallu + #misc.compile(['clean4pdf'], cwd = pjoin(self.me_dir, 'Source')) +- ++ + self.make_opts_var['pdlabel1'] = '' + self.make_opts_var['pdlabel2'] = '' + if self.run_card['pdlabel1'] in ['eva', 'iww']: +@@ -5854,7 +5866,7 @@ tar -czf split_$1.tar.gz split_$1 + self.copy_lep_densities(self.run_card['pdlabel'], pjoin(self.me_dir, 'Source')) + self.make_opts_var['pdlabel1'] = 'ee' + self.make_opts_var['pdlabel2'] = 'ee' +- ++ + # set random number + if self.run_card['iseed'] != 0: + self.random = int(self.run_card['iseed']) +@@ -5873,18 +5885,18 @@ tar -czf split_$1.tar.gz split_$1 + break + else: + self.random = random.randint(1, 30107) +- ++ + #set random seed for python part of the code + if self.run_card['python_seed'] == -2: #-2 means same as run_card + import random + if not hasattr(random, 'mg_seedset'): +- random.seed(self.run_card['python_seed']) +- random.mg_seedset = self.run_card['python_seed'] ++ random.seed(self.run_card['python_seed']) ++ random.mg_seedset = self.run_card['python_seed'] + elif self.run_card['python_seed'] >= 0: + import random + if not hasattr(random, 'mg_seedset'): +- random.seed(self.run_card['python_seed']) +- random.mg_seedset = self.run_card['python_seed'] ++ random.seed(self.run_card['python_seed']) ++ random.mg_seedset = self.run_card['python_seed'] + if self.run_card['ickkw'] == 2: + logger.info('Running with CKKW matching') + self.treat_ckkw_matching() +@@ -5893,12 +5905,12 @@ tar -czf split_$1.tar.gz split_$1 + self.update_make_opts(self.run_card) + # reset list of Gdirectory + self.Gdirs = None +- ++ + # create param_card.inc and run_card.inc + self.do_treatcards('') +- ++ + logger.info("compile Source Directory") +- ++ + # Compile + for name in [ 'all']:#, '../bin/internal/combine_events']: + self.compile(arg=[name], cwd=os.path.join(self.me_dir, 'Source')) +@@ -5921,7 +5933,7 @@ tar -czf split_$1.tar.gz split_$1 + os.remove(pjoin(self.me_dir, 'lib','libbias.a')) + force_subproc_clean = True + +- ++ + # Finally compile the bias module as well + if self.run_card['bias_module'] not in ['dummy',None]: + logger.debug("Compiling the bias module '%s'"%bias_name) +@@ -5933,7 +5945,7 @@ tar -czf split_$1.tar.gz split_$1 + 'INVALID' in str(bias_module_valid).upper(): + raise InvalidCmd("The bias module '%s' cannot be used because of:\n%s"% + (bias_name,bias_module_valid)) +- ++ + self.compile(arg=[], cwd=os.path.join(self.me_dir, 'Source','BIAS',bias_name)) + self.proc_characteristics['bias_module']=bias_name + # Update the proc_characterstics file +@@ -5942,7 +5954,7 @@ tar -czf split_$1.tar.gz split_$1 + + if force_subproc_clean: + # Make sure that madevent will be recompiled +- subproc = [l.strip() for l in open(pjoin(self.me_dir,'SubProcesses', ++ subproc = [l.strip() for l in open(pjoin(self.me_dir,'SubProcesses', + 'subproc.mg'))] + for nb_proc,subdir in enumerate(subproc): + Pdir = pjoin(self.me_dir, 'SubProcesses',subdir.strip()) +@@ -5959,20 +5971,20 @@ tar -czf split_$1.tar.gz split_$1 + ############################################################################ + @staticmethod + def check_dir(path, default=''): +- """check if the directory exists. if so return the path otherwise the ++ """check if the directory exists. if so return the path otherwise the + default""" +- ++ + if os.path.isdir(path): + return path + else: + return default + + +- ++ + ############################################################################ + def get_Gdir(self, Pdir=None, symfact=None): + """get the list of Gdirectory if not yet saved.""" +- ++ + if hasattr(self, "Gdirs") and self.Gdirs: + if self.me_dir in self.Gdirs[0]: + if Pdir is None: +@@ -5988,8 +6000,8 @@ tar -czf split_$1.tar.gz split_$1 + + + Pdirs = self.get_Pdir() +- Gdirs = {self.me_dir:[]} +- mfactors = {} ++ Gdirs = {self.me_dir:[]} ++ mfactors = {} + for P in Pdirs: + Gdirs[P] = [] + #for the next line do not use P, since in readonly mode it might not have symfact +@@ -6000,7 +6012,7 @@ tar -czf split_$1.tar.gz split_$1 + mfactors[pjoin(P, "G%s" % tag)] = mfactor + self.Gdirs = (Gdirs, mfactors) + return self.get_Gdir(Pdir, symfact=symfact) +- ++ + ############################################################################ + def set_run_name(self, name, tag=None, level='parton', reload_card=False, + allow_new_tag=True): +@@ -6018,8 +6030,8 @@ tar -czf split_$1.tar.gz split_$1 + tagRun = self.results[self.run_name][i] + if tagRun.pythia or tagRun.shower or tagRun.pythia8 : + return tagRun['tag'] +- +- ++ ++ + # when are we force to change the tag new_run:previous run requiring changes + upgrade_tag = {'parton': ['parton','pythia','pgs','delphes','madanalysis5_hadron','madanalysis5_parton', 'rivet'], + 'pythia': ['pythia','pgs','delphes','madanalysis5_hadron'], +@@ -6032,7 +6044,7 @@ tar -czf split_$1.tar.gz split_$1 + 'syscalc':[], + 'rivet':['rivet']} + +- if name == self.run_name: ++ if name == self.run_name: + if reload_card: + run_card = pjoin(self.me_dir, 'Cards','run_card.dat') + self.run_card = banner_mod.RunCard(run_card) +@@ -6052,13 +6064,13 @@ tar -czf split_$1.tar.gz split_$1 + break + return get_last_tag(self, level) + +- ++ + # save/clean previous run + if self.run_name: + self.store_result() + # store new name + self.run_name = name +- ++ + new_tag = False + # First call for this run -> set the banner + self.banner = banner_mod.recover_banner(self.results, level, name) +@@ -6067,8 +6079,8 @@ tar -czf split_$1.tar.gz split_$1 + else: + # Read run_card + run_card = pjoin(self.me_dir, 'Cards','run_card.dat') +- self.run_card = banner_mod.RunCard(run_card) +- ++ self.run_card = banner_mod.RunCard(run_card) ++ + if tag: + self.run_card['run_tag'] = tag + new_tag = True +@@ -6081,7 +6093,7 @@ tar -czf split_$1.tar.gz split_$1 + self.results.update('add run %s' % name, 'all', makehtml=False) + else: + for tag in upgrade_tag[level]: +- ++ + if getattr(self.results[self.run_name][-1], tag): + # LEVEL is already define in the last tag -> need to switch tag + tag = self.get_available_tag() +@@ -6091,8 +6103,8 @@ tar -czf split_$1.tar.gz split_$1 + if not new_tag: + # We can add the results to the current run + tag = self.results[self.run_name][-1]['tag'] +- self.run_card['run_tag'] = tag # ensure that run_tag is correct +- ++ self.run_card['run_tag'] = tag # ensure that run_tag is correct ++ + if allow_new_tag and (name in self.results and not new_tag): + self.results.def_current(self.run_name) + else: +@@ -6101,15 +6113,15 @@ tar -czf split_$1.tar.gz split_$1 + self.run_tag = self.run_card['run_tag'] + + return get_last_tag(self, level) +- +- +- ++ ++ ++ + ############################################################################ + def check_nb_events(self): +- """Find the number of event in the run_card, and check that this is not ++ """Find the number of event in the run_card, and check that this is not + too large""" + +- ++ + nb_event = int(self.run_card['nevents']) + if nb_event > 1000000: + logger.warning("Attempting to generate more than 1M events") +@@ -6121,20 +6133,20 @@ tar -czf split_$1.tar.gz split_$1 + + return + +- +- ############################################################################ ++ ++ ############################################################################ + def update_random(self): + """ change random number""" +- ++ + self.random += 3 + if self.random > 30081*30081: # can't use too big random number + raise MadGraph5Error('Random seed too large ' + str(self.random) + ' > 30081*30081') +- if self.run_card['python_seed'] == -2: ++ if self.run_card['python_seed'] == -2: + import random + if not hasattr(random, 'mg_seedset'): +- random.seed(self.random) ++ random.seed(self.random) + random.mg_seedset = self.random +- ++ + ############################################################################ + def save_random(self): + """save random number in appropirate file""" +@@ -6143,14 +6155,14 @@ tar -czf split_$1.tar.gz split_$1 + fsock.writelines('r=%s\n' % self.random) + + def do_quit(self, *args, **opts): +- ++ + return common_run.CommonRunCmd.do_quit(self, *args, **opts) + #return CmdExtended.do_quit(self, *args, **opts) +- ++ + ############################################################################ + def treat_CKKW_matching(self): + """check for ckkw""" +- ++ + lpp1 = self.run_card['lpp1'] + lpp2 = self.run_card['lpp2'] + e1 = self.run_card['ebeam1'] +@@ -6158,19 +6170,19 @@ tar -czf split_$1.tar.gz split_$1 + pd = self.run_card['pdlabel'] + lha = self.run_card['lhaid'] + xq = self.run_card['xqcut'] +- translation = {'e1': e1, 'e2':e2, 'pd':pd, ++ translation = {'e1': e1, 'e2':e2, 'pd':pd, + 'lha':lha, 'xq':xq} + + if lpp1 or lpp2: +- # Remove ':s from pd ++ # Remove ':s from pd + if pd.startswith("'"): + pd = pd[1:] + if pd.endswith("'"): +- pd = pd[:-1] ++ pd = pd[:-1] + + if xq >2 or xq ==2: + xq = 2 +- ++ + # find data file + if pd == "lhapdf": + issudfile = 'lib/issudgrid-%(e1)s-%(e2)s-%(pd)s-%(lha)s-%(xq)s.dat.gz' +@@ -6180,9 +6192,9 @@ tar -czf split_$1.tar.gz split_$1 + issudfile = pjoin(self.webbin, issudfile % translation) + else: + issudfile = pjoin(self.me_dir, issudfile % translation) +- ++ + logger.info('Sudakov grid file: %s' % issudfile) +- ++ + # check that filepath exists + if os.path.exists(issudfile): + path = pjoin(self.me_dir, 'lib', 'issudgrid.dat') +@@ -6191,20 +6203,20 @@ tar -czf split_$1.tar.gz split_$1 + msg = 'No sudakov grid file for parameter choice. Start to generate it. This might take a while' + logger.info(msg) + self.update_status('GENERATE SUDAKOV GRID', level='parton') +- ++ + for i in range(-2,6): +- self.cluster.submit('%s/gensudgrid ' % self.dirbin, ++ self.cluster.submit('%s/gensudgrid ' % self.dirbin, + argument = ['%d'%i], +- cwd=self.me_dir, ++ cwd=self.me_dir, + stdout=open(pjoin(self.me_dir, 'gensudgrid%s.log' % i),'w')) + self.monitor() + for i in range(-2,6): + path = pjoin(self.me_dir, 'lib', 'issudgrid.dat') + os.system('cat %s/gensudgrid%s.log >> %s' % (self.me_dir, path)) + misc.gzip(path, stdout=issudfile) +- ++ + ############################################################################ +- def create_root_file(self, input='unweighted_events.lhe', ++ def create_root_file(self, input='unweighted_events.lhe', + output='unweighted_events.root' ): + """create the LHE root file """ + self.update_status('Creating root files', level='parton') +@@ -6221,14 +6233,14 @@ tar -czf split_$1.tar.gz split_$1 + totar = False + torm = True + input = input[:-3] +- ++ + try: +- misc.call(['%s/ExRootLHEFConverter' % eradir, ++ misc.call(['%s/ExRootLHEFConverter' % eradir, + input, output], + cwd=pjoin(self.me_dir, 'Events')) + except Exception: + logger.warning('fail to produce Root output [problem with ExRootAnalysis]') +- ++ + if totar: + if os.path.exists('%s.gz' % input): + try: +@@ -6239,13 +6251,13 @@ tar -czf split_$1.tar.gz split_$1 + misc.gzip(input) + if torm: + os.remove(input) +- ++ + def run_syscalc(self, mode='parton', event_path=None, output=None): +- """create the syscalc output""" ++ """create the syscalc output""" + + if self.run_card['use_syst'] not in self.true: + return +- ++ + scdir = self.options['syscalc_path'] + if not scdir or not os.path.exists(scdir): + return +@@ -6253,12 +6265,12 @@ tar -czf split_$1.tar.gz split_$1 + if self.run_card['event_norm'] != 'sum': + logger.critical('SysCalc works only when event_norm is on \'sum\'.') + return +- logger.info('running SysCalc on mode %s' % mode) +- ++ logger.info('running SysCalc on mode %s' % mode) ++ + # Restore the old default for SysCalc+PY6 + if self.run_card['sys_matchscale']=='auto': + self.run_card['sys_matchscale'] = "30 50" +- ++ + # Check that all pdfset are correctly installed + lhaid = [self.run_card.get_lhapdf_id()] + if '&&' in self.run_card['sys_pdf']: +@@ -6273,20 +6285,20 @@ tar -czf split_$1.tar.gz split_$1 + logger.debug(str(error)) + logger.warning('Systematic computation requires lhapdf to run. Bypass SysCalc') + return +- ++ + # Copy all the relevant PDF sets + [self.copy_lhapdf_set([onelha], pdfsets_dir) for onelha in lhaid] +- ++ + to_syscalc={'sys_scalefact': self.run_card['sys_scalefact'], + 'sys_alpsfact': self.run_card['sys_alpsfact'], + 'sys_matchscale': self.run_card['sys_matchscale'], + 'sys_scalecorrelation': self.run_card['sys_scalecorrelation'], + 'sys_pdf': self.run_card['sys_pdf']} +- +- tag = self.run_card['run_tag'] ++ ++ tag = self.run_card['run_tag'] + card = pjoin(self.me_dir, 'bin','internal', 'syscalc_card.dat') + template = open(pjoin(self.me_dir, 'bin','internal', 'syscalc_template.dat')).read() +- ++ + if '&&' in to_syscalc['sys_pdf']: + to_syscalc['sys_pdf'] = to_syscalc['sys_pdf'].split('#',1)[0].replace('&&',' \n ') + else: +@@ -6299,8 +6311,8 @@ tar -czf split_$1.tar.gz split_$1 + new.append(d) + else: + new[-1] += ' %s' % d +- to_syscalc['sys_pdf'] = '\n'.join(new) +- ++ to_syscalc['sys_pdf'] = '\n'.join(new) ++ + if to_syscalc['sys_pdf'].lower() in ['', 'f', 'false', 'none', '.false.']: + to_syscalc['sys_pdf'] = '' + if to_syscalc['sys_alpsfact'].lower() in ['', 'f', 'false', 'none','.false.']: +@@ -6308,17 +6320,17 @@ tar -czf split_$1.tar.gz split_$1 + + + +- ++ + # check if the scalecorrelation parameter is define: + if not 'sys_scalecorrelation' in self.run_card: + self.run_card['sys_scalecorrelation'] = -1 + open(card,'w').write(template % self.run_card) +- ++ + if not os.path.exists(card): + return False + +- +- ++ ++ + event_dir = pjoin(self.me_dir, 'Events') + + if not event_path: +@@ -6341,19 +6353,19 @@ tar -czf split_$1.tar.gz split_$1 + raise SysCalcError('qcut value for sys_matchscale lower than qcut in pythia_card. Bypass syscalc') + if float(value) < xqcut: + raise SysCalcError('qcut value for sys_matchscale lower than xqcut in run_card. Bypass syscalc') +- +- ++ ++ + event_path = pjoin(event_dir,'syst.dat') + output = pjoin(event_dir, 'syscalc.dat') + else: + raise self.InvalidCmd('Invalid mode %s' % mode) +- ++ + if not os.path.exists(event_path): + if os.path.exists(event_path+'.gz'): + misc.gunzip(event_path+'.gz') + else: + raise SysCalcError('Events file %s does not exits' % event_path) +- ++ + self.update_status('Calculating systematics for %s level' % mode, level = mode.lower()) + try: + proc = misc.call([os.path.join(scdir, 'sys_calc'), +@@ -6362,7 +6374,7 @@ tar -czf split_$1.tar.gz split_$1 + stderr = subprocess.STDOUT, + cwd=event_dir) + # Wait 5 s to make sure file is finished writing +- time.sleep(5) ++ time.sleep(5) + except OSError as error: + logger.error('fail to run syscalc: %s. Please check that SysCalc is correctly installed.' % error) + else: +@@ -6370,11 +6382,11 @@ tar -czf split_$1.tar.gz split_$1 + logger.warning('SysCalc Failed. Please read the associate log to see the reason. Did you install the associate PDF set?') + elif mode == 'parton': + files.mv(output, event_path) +- ++ + self.update_status('End syscalc for %s level' % mode, level = mode.lower(), + makehtml=False) +- +- return True ++ ++ return True + + + action_switcher = AskRun +@@ -6387,23 +6399,23 @@ tar -czf split_$1.tar.gz split_$1 + passing_cmd.append('reweight=ON') + if '-M' in args or '--madspin' in args: + passing_cmd.append('madspin=ON') +- ++ + switch, cmd_switch = self.ask('', '0', [], ask_class = self.action_switcher, + mode=mode, line_args=args, force=self.force, + first_cmd=passing_cmd, return_instance=True) + # +- self.switch = switch # store the value of the switch for plugin purpose ++ self.switch = switch # store the value of the switch for plugin purpose + if 'dynamical' in switch: + mode = 'auto' +- ++ + # Now that we know in which mode we are check that all the card + #exists (copy default if needed) +- ++ + cards = ['param_card.dat', 'run_card.dat'] + if switch['shower'] == 'Pythia6': + cards.append('pythia_card.dat') + if switch['shower'] == 'Pythia8': +- cards.append('pythia8_card.dat') ++ cards.append('pythia8_card.dat') + if switch['detector'] in ['PGS','DELPHES+PGS']: + cards.append('pgs_card.dat') + if switch['detector'] in ['Delphes', 'DELPHES+PGS']: +@@ -6426,29 +6438,29 @@ tar -czf split_$1.tar.gz split_$1 + cards.append('rivet_card.dat') + + self.keep_cards(cards) +- ++ + first_cmd = cmd_switch.get_cardcmd() +- ++ + if os.path.isfile(pjoin(self.me_dir,'Cards','MadLoopParams.dat')): + cards.append('MadLoopParams.dat') +- ++ + if self.force: + self.check_param_card(pjoin(self.me_dir,'Cards','param_card.dat' )) + return switch +- ++ + + if 'dynamical' in switch and switch['dynamical']: + self.ask_edit_cards(cards, plot=False, mode='auto', first_cmd=first_cmd) + else: + self.ask_edit_cards(cards, plot=False, first_cmd=first_cmd) + return switch +- ++ + ############################################################################ + def ask_pythia_run_configuration(self, mode=None, pythia_version=6, banner=None): + """Ask the question when launching pythia""" +- ++ + pythia_suffix = '' if pythia_version==6 else '%d'%pythia_version +- ++ + available_mode = ['0', '1'] + if pythia_version==6: + available_mode.append('2') +@@ -6473,10 +6485,10 @@ tar -czf split_$1.tar.gz split_$1 + mode = self.ask(question, '0', options) + elif not mode: + mode = 'auto' +- ++ + if mode.isdigit(): + mode = name[mode] +- ++ + auto = False + if mode == 'auto': + auto = True +@@ -6485,7 +6497,7 @@ tar -czf split_$1.tar.gz split_$1 + mode = 'pgs' + elif os.path.exists(pjoin(self.me_dir, 'Cards', 'delphes_card.dat')): + mode = 'delphes' +- else: ++ else: + mode = 'pythia%s'%pythia_suffix + logger.info('Will run in mode %s' % mode) + # Now that we know in which mode we are check that all the card +@@ -6501,15 +6513,15 @@ tar -czf split_$1.tar.gz split_$1 + cards.append('delphes_trigger.dat') + self.keep_cards(cards, ignore=['madanalysis5_parton_card.dat','madanalysis5_hadron_card.dat', + 'plot_card.dat']) +- ++ + if self.force: + return mode +- ++ + if not banner: + banner = self.banner +- ++ + if auto: +- self.ask_edit_cards(cards, from_banner=['param', 'run'], ++ self.ask_edit_cards(cards, from_banner=['param', 'run'], + mode='auto', plot=(pythia_version==6), banner=banner + ) + else: +@@ -6517,12 +6529,12 @@ tar -czf split_$1.tar.gz split_$1 + plot=(pythia_version==6), banner=banner) + + return mode +- ++ + #=============================================================================== + # MadEventCmd + #=============================================================================== + class MadEventCmdShell(MadEventCmd, cmd.CmdShell): +- """The command line processor of MadGraph""" ++ """The command line processor of MadGraph""" + + + +@@ -6536,11 +6548,11 @@ class SubProcesses(object): + @classmethod + def clean(cls): + cls.name_to_pdg = {} +- ++ + @staticmethod + def get_subP(me_dir): + """return the list of Subprocesses""" +- ++ + out = [] + for line in open(pjoin(me_dir,'SubProcesses', 'subproc.mg')): + if not line: +@@ -6548,9 +6560,9 @@ class SubProcesses(object): + name = line.strip() + if os.path.exists(pjoin(me_dir, 'SubProcesses', name)): + out.append(pjoin(me_dir, 'SubProcesses', name)) +- ++ + return out +- ++ + + + @staticmethod +@@ -6611,9 +6623,9 @@ class SubProcesses(object): + particles = re.search("/([\d,-]+)/", line) + all_ids.append([int(p) for p in particles.group(1).split(',')]) + return all_ids +- +- +-#=============================================================================== ++ ++ ++#=============================================================================== + class GridPackCmd(MadEventCmd): + """The command for the gridpack --Those are not suppose to be use interactively--""" + +@@ -6627,7 +6639,7 @@ class GridPackCmd(MadEventCmd): + self.random = seed + self.random_orig = self.random + self.granularity = gran +- ++ + self.options['automatic_html_opening'] = False + #write the grid_card.dat on disk + self.nb_event = int(nb_event) +@@ -6668,7 +6680,7 @@ class GridPackCmd(MadEventCmd): + + def write_gridcard(self, nb_event, seed, gran): + """write the grid_card.dat file at appropriate location""" +- ++ + # first try to write grid_card within the gridpack. + print("WRITE GRIDCARD", self.me_dir) + if self.readonly: +@@ -6677,35 +6689,35 @@ class GridPackCmd(MadEventCmd): + fsock = open('grid_card.dat','w') + else: + fsock = open(pjoin(self.me_dir, 'Cards', 'grid_card.dat'),'w') +- ++ + gridpackcard = banner_mod.GridpackCard() + gridpackcard['GridRun'] = True + gridpackcard['gevents'] = nb_event + gridpackcard['gseed'] = seed + gridpackcard['ngran'] = gran +- ++ + gridpackcard.write(fsock) + + ############################################################################ + def get_Pdir(self): + """get the list of Pdirectory if not yet saved.""" +- ++ + if hasattr(self, "Pdirs"): + if self.me_dir in self.Pdirs[0]: + return self.Pdirs +- ++ + if not self.readonly: +- self.Pdirs = [pjoin(self.me_dir, 'SubProcesses', l.strip()) ++ self.Pdirs = [pjoin(self.me_dir, 'SubProcesses', l.strip()) + for l in open(pjoin(self.me_dir,'SubProcesses', 'subproc.mg'))] + else: +- self.Pdirs = [l.strip() +- for l in open(pjoin(self.me_dir,'SubProcesses', 'subproc.mg'))] +- ++ self.Pdirs = [l.strip() ++ for l in open(pjoin(self.me_dir,'SubProcesses', 'subproc.mg'))] ++ + return self.Pdirs +- ++ + def prepare_local_dir(self): + """create the P directory structure in the local directory""" +- ++ + if not self.readonly: + os.chdir(self.me_dir) + else: +@@ -6714,7 +6726,7 @@ class GridPackCmd(MadEventCmd): + os.mkdir(p) + files.cp(pjoin(self.me_dir,'SubProcesses',p,'symfact.dat'), + pjoin(p, 'symfact.dat')) +- ++ + + def launch(self, nb_event, seed): + """ launch the generation for the grid """ +@@ -6730,13 +6742,13 @@ class GridPackCmd(MadEventCmd): + if self.run_card['python_seed'] == -2: + import random + if not hasattr(random, 'mg_seedset'): +- random.seed(seed) ++ random.seed(seed) + random.mg_seedset = seed + elif self.run_card['python_seed'] > 0: + import random + if not hasattr(random, 'mg_seedset'): +- random.seed(self.run_card['python_seed']) +- random.mg_seedset = self.run_card['python_seed'] ++ random.seed(self.run_card['python_seed']) ++ random.mg_seedset = self.run_card['python_seed'] + # 2) Run the refine for the grid + self.update_status('Generating Events', level=None) + #misc.call([pjoin(self.me_dir,'bin','refine4grid'), +@@ -6755,70 +6767,70 @@ class GridPackCmd(MadEventCmd): + self.exec_cmd('decay_events -from_cards', postcmd=False) + elif self.run_card['use_syst'] and self.run_card['systematics_program'] == 'systematics': + self.options['nb_core'] = 1 +- self.exec_cmd('systematics %s --from_card' % ++ self.exec_cmd('systematics %s --from_card' % + pjoin('Events', self.run_name, 'unweighted_events.lhe.gz'), + postcmd=False,printcmd=False) +- ++ + + def refine4grid(self, nb_event): + """Special refine for gridpack run.""" + self.nb_refine += 1 +- ++ + precision = nb_event + + self.opts = dict([(key,value[1]) for (key,value) in \ + self._survey_options.items()]) +- ++ + # initialize / remove lhapdf mode + # self.configure_directory() # All this has been done before + self.cluster_mode = 0 # force single machine + + # Store seed in randinit file, to be read by ranmar.f + self.save_random() +- ++ + self.update_status('Refine results to %s' % precision, level=None) + logger.info("Using random number seed offset = %s" % self.random) + + refine_opt = {'err_goal': nb_event, 'split_channels': False, +- 'ngran':self.granularity, 'readonly': self.readonly} ++ 'ngran':self.granularity, 'readonly': self.readonly} + x_improve = gen_ximprove.gen_ximprove_gridpack(self, refine_opt) + x_improve.launch() # create the ajob for the refinment and run those! +- self.gscalefact = x_improve.gscalefact #store jacobian associate to the gridpack +- +- ++ self.gscalefact = x_improve.gscalefact #store jacobian associate to the gridpack ++ ++ + #bindir = pjoin(os.path.relpath(self.dirbin, pjoin(self.me_dir,'SubProcesses'))) + #print 'run combine!!!' + #combine_runs.CombineRuns(self.me_dir) +- ++ + return + #update html output + Presults = sum_html.collect_result(self) + cross, error = Presults.xsec, Presults.xerru + self.results.add_detail('cross', cross) + self.results.add_detail('error', error) +- +- ++ ++ + #self.update_status('finish refine', 'parton', makehtml=False) + #devnull.close() +- +- +- ++ ++ ++ + return + self.total_jobs = 0 +- subproc = [P for P in os.listdir(pjoin(self.me_dir,'SubProcesses')) if ++ subproc = [P for P in os.listdir(pjoin(self.me_dir,'SubProcesses')) if + P.startswith('P') and os.path.isdir(pjoin(self.me_dir,'SubProcesses', P))] + devnull = open(os.devnull, 'w') + for nb_proc,subdir in enumerate(subproc): + subdir = subdir.strip() + Pdir = pjoin(self.me_dir, 'SubProcesses',subdir) + bindir = pjoin(os.path.relpath(self.dirbin, Pdir)) +- ++ + logger.info(' %s ' % subdir) + # clean previous run + for match in misc.glob('*ajob*', Pdir): + if os.path.basename(match)[:4] in ['ajob', 'wait', 'run.', 'done']: + os.remove(pjoin(Pdir, match)) +- ++ + + logfile = pjoin(Pdir, 'gen_ximprove.log') + misc.call([pjoin(bindir, 'gen_ximprove')], +@@ -6828,40 +6840,40 @@ class GridPackCmd(MadEventCmd): + + if os.path.exists(pjoin(Pdir, 'ajob1')): + alljobs = misc.glob('ajob*', Pdir) +- nb_tot = len(alljobs) ++ nb_tot = len(alljobs) + self.total_jobs += nb_tot + for i, job in enumerate(alljobs): + job = os.path.basename(job) +- self.launch_job('%s' % job, cwd=Pdir, remaining=(nb_tot-i-1), ++ self.launch_job('%s' % job, cwd=Pdir, remaining=(nb_tot-i-1), + run_type='Refine number %s on %s (%s/%s)' % + (self.nb_refine, subdir, nb_proc+1, len(subproc))) + if os.path.exists(pjoin(self.me_dir,'error')): + self.monitor(html=True) + raise MadEventError('Error detected in dir %s: %s' % \ + (Pdir, open(pjoin(self.me_dir,'error')).read())) +- self.monitor(run_type='All job submitted for refine number %s' % ++ self.monitor(run_type='All job submitted for refine number %s' % + self.nb_refine) +- ++ + self.update_status("Combining runs", level='parton') + try: + os.remove(pjoin(Pdir, 'combine_runs.log')) + except Exception: + pass +- ++ + bindir = pjoin(os.path.relpath(self.dirbin, pjoin(self.me_dir,'SubProcesses'))) + combine_runs.CombineRuns(self.me_dir) +- ++ + #update html output + cross, error = self.make_make_all_html_results() + self.results.add_detail('cross', cross) + self.results.add_detail('error', error) +- +- ++ ++ + self.update_status('finish refine', 'parton', makehtml=False) + devnull.close() + + def do_combine_events(self, line): +- """Advanced commands: Launch combine events""" ++ """Advanced commands: Launch combine events""" + + if self.readonly: + outdir = 'Events' +@@ -6883,17 +6895,17 @@ class GridPackCmd(MadEventCmd): + self.banner.add_generation_info(self.results.current['cross'], self.run_card['nevents']) + if not hasattr(self, 'random_orig'): self.random_orig = 0 + self.banner.change_seed(self.random_orig) +- +- ++ ++ + if not os.path.exists(pjoin(outdir, self.run_name)): + os.mkdir(pjoin(outdir, self.run_name)) +- self.banner.write(pjoin(outdir, self.run_name, ++ self.banner.write(pjoin(outdir, self.run_name, + '%s_%s_banner.txt' % (self.run_name, tag))) +- +- get_wgt = lambda event: event.wgt ++ ++ get_wgt = lambda event: event.wgt + AllEvent = lhe_parser.MultiEventFile() + AllEvent.banner = self.banner +- ++ + partials = 0 # if too many file make some partial unweighting + sum_xsec, sum_xerru, sum_axsec = 0,[],0 + Gdirs = self.get_Gdir() +@@ -6903,7 +6915,7 @@ class GridPackCmd(MadEventCmd): + if os.path.exists(pjoin(Gdir, 'events.lhe')): + result = sum_html.OneResult('') + result.read_results(pjoin(Gdir, 'results.dat')) +- AllEvent.add(pjoin(Gdir, 'events.lhe'), ++ AllEvent.add(pjoin(Gdir, 'events.lhe'), + result.get('xsec')*gscalefact[Gdir], + result.get('xerru')*gscalefact[Gdir], + result.get('axsec')*gscalefact[Gdir] +@@ -6912,7 +6924,7 @@ class GridPackCmd(MadEventCmd): + sum_xsec += result.get('xsec')*gscalefact[Gdir] + sum_xerru.append(result.get('xerru')*gscalefact[Gdir]) + sum_axsec += result.get('axsec')*gscalefact[Gdir] +- ++ + if len(AllEvent) >= 80: #perform a partial unweighting + AllEvent.unweight(pjoin(outdir, self.run_name, "partials%s.lhe.gz" % partials), + get_wgt, log_level=5, trunc_error=1e-2, event_target=self.nb_event) +@@ -6921,26 +6933,26 @@ class GridPackCmd(MadEventCmd): + AllEvent.add(pjoin(outdir, self.run_name, "partials%s.lhe.gz" % partials), + sum_xsec, + math.sqrt(sum(x**2 for x in sum_xerru)), +- sum_axsec) ++ sum_axsec) + partials +=1 +- ++ + if not hasattr(self,'proc_characteristic'): + self.proc_characteristic = self.get_characteristics() +- ++ + self.banner.add_generation_info(sum_xsec, self.nb_event) + nb_event = AllEvent.unweight(pjoin(outdir, self.run_name, "unweighted_events.lhe.gz"), + get_wgt, trunc_error=1e-2, event_target=self.nb_event, + log_level=logging.DEBUG, normalization=self.run_card['event_norm'], + proc_charac=self.proc_characteristic) +- +- ++ ++ + if partials: + for i in range(partials): + try: + os.remove(pjoin(outdir, self.run_name, "partials%s.lhe.gz" % i)) + except Exception: + os.remove(pjoin(outdir, self.run_name, "partials%s.lhe" % i)) +- ++ + self.results.add_detail('nb_event', nb_event) + self.banner.add_generation_info(sum_xsec, nb_event) + if self.run_card['bias_module'].lower() not in ['dummy', 'none']: +@@ -6949,7 +6961,7 @@ class GridPackCmd(MadEventCmd): + + class MadLoopInitializer(object): + """ A container class for the various methods for initializing MadLoop. It is +- placed in MadEventInterface because it is used by Madevent for loop-induced ++ placed in MadEventInterface because it is used by Madevent for loop-induced + simulations. """ + + @staticmethod +@@ -6962,7 +6974,7 @@ class MadLoopInitializer(object): + if os.path.isfile(pjoin(dir_name,'check')): + os.remove(pjoin(dir_name,'check')) + os.remove(pjoin(dir_name,'check_sa.o')) +- os.remove(pjoin(dir_name,'loop_matrix.o')) ++ os.remove(pjoin(dir_name,'loop_matrix.o')) + # Now run make + devnull = open(os.devnull, 'w') + start=time.time() +@@ -6984,7 +6996,7 @@ class MadLoopInitializer(object): + stdout=devnull, stderr=devnull, close_fds=True) + try: + ptimer.execute() +- #poll as often as possible; otherwise the subprocess might ++ #poll as often as possible; otherwise the subprocess might + # "sneak" in some extra memory usage while you aren't looking + # Accuracy of .2 seconds is enough for the timing. + while ptimer.poll(): +@@ -7016,7 +7028,7 @@ class MadLoopInitializer(object): + If mu_r > 0.0, then the renormalization constant value will be hardcoded + directly in check_sa.f, if is is 0 it will be set to Sqrt(s) and if it + is < 0.0 the value in the param_card.dat is used. +- If the split_orders target (i.e. the target squared coupling orders for ++ If the split_orders target (i.e. the target squared coupling orders for + the computation) is != -1, it will be changed in check_sa.f via the + subroutine CALL SET_COUPLINGORDERS_TARGET(split_orders).""" + +@@ -7031,12 +7043,12 @@ class MadLoopInitializer(object): + file_path = pjoin(directories[0],'check_sa.f') + if not os.path.isfile(file_path): + raise MadGraph5Error('Could not find the location of check_sa.f'+\ +- ' from the specified path %s.'%str(file_path)) ++ ' from the specified path %s.'%str(file_path)) + + file = open(file_path, 'r') + check_sa = file.read() + file.close() +- ++ + file = open(file_path, 'w') + check_sa = re.sub(r"READPS = \S+\)","READPS = %s)"%('.TRUE.' if read_ps \ + else '.FALSE.'), check_sa) +@@ -7052,42 +7064,42 @@ class MadLoopInitializer(object): + (("%.17e"%mu_r).replace('e','d')),check_sa) + elif mu_r < 0.0: + check_sa = re.sub(r"MU_R=SQRTS","",check_sa) +- ++ + if split_orders > 0: + check_sa = re.sub(r"SET_COUPLINGORDERS_TARGET\(-?\d+\)", +- "SET_COUPLINGORDERS_TARGET(%d)"%split_orders,check_sa) +- ++ "SET_COUPLINGORDERS_TARGET(%d)"%split_orders,check_sa) ++ + file.write(check_sa) + file.close() + +- @staticmethod ++ @staticmethod + def run_initialization(run_dir=None, SubProc_dir=None, infos=None,\ + req_files = ['HelFilter.dat','LoopFilter.dat'], + attempts = [4,15]): +- """ Run the initialization of the process in 'run_dir' with success ++ """ Run the initialization of the process in 'run_dir' with success + characterized by the creation of the files req_files in this directory. + The directory containing the driving source code 'check_sa.f'. +- The list attempt gives the successive number of PS points the ++ The list attempt gives the successive number of PS points the + initialization should be tried with before calling it failed. + Returns the number of PS points which were necessary for the init. + Notice at least run_dir or SubProc_dir must be provided. + A negative attempt number given in input means that quadprec will be + forced for initialization.""" +- ++ + # If the user does not want detailed info, then set the dictionary + # to a dummy one. + if infos is None: + infos={} +- ++ + if SubProc_dir is None and run_dir is None: + raise MadGraph5Error('At least one of [SubProc_dir,run_dir] must'+\ + ' be provided in run_initialization.') +- ++ + # If the user does not specify where is check_sa.f, then it is assumed + # to be one levels above run_dir + if SubProc_dir is None: + SubProc_dir = os.path.abspath(pjoin(run_dir,os.pardir)) +- ++ + if run_dir is None: + directories =[ dir for dir in misc.glob('P[0-9]*', SubProc_dir) + if os.path.isdir(dir) ] +@@ -7097,7 +7109,7 @@ class MadLoopInitializer(object): + raise MadGraph5Error('Could not find a valid running directory'+\ + ' in %s.'%str(SubProc_dir)) + +- # Use the presence of the file born_matrix.f to decide if it is a ++ # Use the presence of the file born_matrix.f to decide if it is a + # loop-induced process or not. It's not crucial, but just that because + # of the dynamic adjustment of the ref scale used for deciding what are + # the zero contributions, more points are neeeded for loop-induced. +@@ -7116,9 +7128,9 @@ class MadLoopInitializer(object): + raise MadGraph5Error('Could not find MadLoopParams.dat at %s.'\ + %MLCardPath) + else: +- MLCard = banner_mod.MadLoopParam(MLCardPath) ++ MLCard = banner_mod.MadLoopParam(MLCardPath) + MLCard_orig = banner_mod.MadLoopParam(MLCard) +- ++ + # Make sure that LoopFilter really is needed. + if not MLCard['UseLoopFilter']: + try: +@@ -7141,11 +7153,11 @@ class MadLoopInitializer(object): + proc_prefix+fname)) for fname in my_req_files]) or \ + not os.path.isfile(pjoin(run_dir,'check')) or \ + not os.access(pjoin(run_dir,'check'), os.X_OK) +- ++ + # Check if this is a process without born by checking the presence of the + # file born_matrix.f + is_loop_induced = os.path.exists(pjoin(run_dir,'born_matrix.f')) +- ++ + # For loop induced processes, always attempt quadruple precision if + # double precision attempts fail and the user didn't specify himself + # quadruple precision initializations attempts +@@ -7154,11 +7166,11 @@ class MadLoopInitializer(object): + use_quad_prec = 1 + curr_attempt = 1 + +- MLCard.set('WriteOutFilters',True) +- ++ MLCard.set('WriteOutFilters',True) ++ + while to_attempt!=[] and need_init(): + curr_attempt = to_attempt.pop() +- # if the attempt is a negative number it means we must force ++ # if the attempt is a negative number it means we must force + # quadruple precision at initialization time + if curr_attempt < 0: + use_quad_prec = -1 +@@ -7171,11 +7183,11 @@ class MadLoopInitializer(object): + MLCard.set('ZeroThres',1e-9) + # Plus one because the filter are written on the next PS point after + curr_attempt = abs(curr_attempt+1) +- MLCard.set('MaxAttempts',curr_attempt) ++ MLCard.set('MaxAttempts',curr_attempt) + MLCard.write(pjoin(SubProc_dir,'MadLoopParams.dat')) + + # initialization is performed. +- MadLoopInitializer.fix_PSPoint_in_check(run_dir, read_ps = False, ++ MadLoopInitializer.fix_PSPoint_in_check(run_dir, read_ps = False, + npoints = curr_attempt) + compile_time, run_time, ram_usage = \ + MadLoopInitializer.make_and_run(run_dir) +@@ -7188,7 +7200,7 @@ class MadLoopInitializer(object): + infos['Process_compilation']==None: + infos['Process_compilation'] = compile_time + infos['Initialization'] = run_time +- ++ + MLCard_orig.write(pjoin(SubProc_dir,'MadLoopParams.dat')) + if need_init(): + return None +@@ -7207,8 +7219,8 @@ class MadLoopInitializer(object): + MLCardPath = pjoin(proc_dir,'SubProcesses','MadLoopParams.dat') + if not os.path.isfile(MLCardPath): + raise MadGraph5Error('Could not find MadLoopParams.dat at %s.'\ +- %MLCardPath) +- MLCard = banner_mod.MadLoopParam(MLCardPath) ++ %MLCardPath) ++ MLCard = banner_mod.MadLoopParam(MLCardPath) + + req_files = ['HelFilter.dat','LoopFilter.dat'] + # Make sure that LoopFilter really is needed. +@@ -7222,9 +7234,9 @@ class MadLoopInitializer(object): + req_files.remove('HelFilter.dat') + except ValueError: + pass +- ++ + for v_folder in glob.iglob(pjoin(proc_dir,'SubProcesses', +- '%s*'%subproc_prefix)): ++ '%s*'%subproc_prefix)): + # Make sure it is a valid MadLoop directory + if not os.path.isdir(v_folder) or not os.path.isfile(\ + pjoin(v_folder,'loop_matrix.f')): +@@ -7235,7 +7247,7 @@ class MadLoopInitializer(object): + if need_init(pjoin(proc_dir,'SubProcesses','MadLoop5_resources'), + proc_prefix, req_files): + return True +- ++ + return False + + @staticmethod +@@ -7253,7 +7265,7 @@ class MadLoopInitializer(object): + misc.compile(arg=['treatCardsLoopNoInit'], cwd=pjoin(proc_dir,'Source')) + else: + interface.do_treatcards('all --no_MadLoopInit') +- ++ + # First make sure that IREGI and CUTTOOLS are compiled if needed + if os.path.exists(pjoin(proc_dir,'Source','CutTools')): + misc.compile(arg=['libcuttools'],cwd=pjoin(proc_dir,'Source')) +@@ -7261,8 +7273,8 @@ class MadLoopInitializer(object): + misc.compile(arg=['libiregi'],cwd=pjoin(proc_dir,'Source')) + # Then make sure DHELAS and MODEL are compiled + misc.compile(arg=['libmodel'],cwd=pjoin(proc_dir,'Source')) +- misc.compile(arg=['libdhelas'],cwd=pjoin(proc_dir,'Source')) +- ++ misc.compile(arg=['libdhelas'],cwd=pjoin(proc_dir,'Source')) ++ + # Now initialize the MadLoop outputs + logger.info('Initializing MadLoop loop-induced matrix elements '+\ + '(this can take some time)...') +@@ -7271,7 +7283,7 @@ class MadLoopInitializer(object): + if MG_options: + if interface and hasattr(interface, 'cluster') and isinstance(interface.cluster, cluster.MultiCore): + mcore = interface.cluster +- else: ++ else: + mcore = cluster.MultiCore(**MG_options) + else: + mcore = cluster.onecore +@@ -7282,10 +7294,10 @@ class MadLoopInitializer(object): + run_dir=run_dir, infos=infos) + else: + n_PS = MadLoopInitializer.run_initialization( +- run_dir=run_dir, infos=infos, attempts=attempts) ++ run_dir=run_dir, infos=infos, attempts=attempts) + infos['nPS'] = n_PS + return 0 +- ++ + def wait_monitoring(Idle, Running, Done): + if Idle+Running+Done == 0: + return +@@ -7295,21 +7307,21 @@ class MadLoopInitializer(object): + init_info = {} + # List all virtual folders while making sure they are valid MadLoop folders + VirtualFolders = [f for f in glob.iglob(pjoin(proc_dir,'SubProcesses', +- '%s*'%subproc_prefix)) if (os.path.isdir(f) or ++ '%s*'%subproc_prefix)) if (os.path.isdir(f) or + os.path.isfile(pjoin(f,'loop_matrix.f')))] + logger.debug("Now Initializing MadLoop matrix element in %d folder%s:"%\ + (len(VirtualFolders),'s' if len(VirtualFolders)>1 else '')) +- logger.debug(', '.join("'%s'"%os.path.basename(v_folder) for v_folder in ++ logger.debug(', '.join("'%s'"%os.path.basename(v_folder) for v_folder in + VirtualFolders)) + for v_folder in VirtualFolders: + init_info[v_folder] = {} +- ++ + # We try all multiples of n_PS from 1 to max_mult, first in DP and then + # in QP before giving up, or use default values if n_PS is None. + max_mult = 3 + if n_PS is None: + # Then use the default list of number of PS points to try +- mcore.submit(run_initialization_wrapper, ++ mcore.submit(run_initialization_wrapper, + [pjoin(v_folder), init_info[v_folder], None]) + else: + # Use specific set of PS points +@@ -7336,8 +7348,8 @@ class MadLoopInitializer(object): + '%d PS points (%s), in %.3g(compil.) + %.3g(init.) secs.'%( + abs(init['nPS']),'DP' if init['nPS']>0 else 'QP', + init['Process_compilation'],init['Initialization'])) +- +- logger.info('MadLoop initialization finished.') ++ ++ logger.info('MadLoop initialization finished.') + + AskforEditCard = common_run.AskforEditCard + +@@ -7352,16 +7364,16 @@ if '__main__' == __name__: + + import os + import optparse +- # Get the directory of the script real path (bin) +- # and add it to the current PYTHONPATH ++ # Get the directory of the script real path (bin) ++ # and add it to the current PYTHONPATH + #root_path = os.path.dirname(os.path.dirname(os.path.dirname(os.path.realpath( __file__ )))) + sys.path.insert(0, root_path) + +- class MyOptParser(optparse.OptionParser): ++ class MyOptParser(optparse.OptionParser): + class InvalidOption(Exception): pass + def error(self, msg=''): + raise MyOptParser.InvalidOption(msg) +- # Write out nice usage message if called with -h or --help ++ # Write out nice usage message if called with -h or --help + usage = "usage: %prog [options] [FILE] " + parser = MyOptParser(usage=usage) + parser.add_option("-l", "--logging", default='INFO', +@@ -7372,7 +7384,7 @@ if '__main__' == __name__: + help='force to launch debug mode') + parser_error = '' + done = False +- ++ + for i in range(len(sys.argv)-1): + try: + (options, args) = parser.parse_args(sys.argv[1:len(sys.argv)-i]) +@@ -7382,7 +7394,7 @@ if '__main__' == __name__: + else: + args += sys.argv[len(sys.argv)-i:] + if not done: +- # raise correct error: ++ # raise correct error: + try: + (options, args) = parser.parse_args() + except MyOptParser.InvalidOption as error: +@@ -7395,8 +7407,8 @@ if '__main__' == __name__: + import subprocess + import logging + import logging.config +- # Set logging level according to the logging level given by options +- #logging.basicConfig(level=vars(logging)[options.logging]) ++ # Set logging level according to the logging level given by options ++ #logging.basicConfig(level=vars(logging)[options.logging]) + import internal + import internal.coloring_logging + # internal.file = XXX/bin/internal/__init__.py +@@ -7419,13 +7431,13 @@ if '__main__' == __name__: + raise + pass + +- # Call the cmd interface main loop ++ # Call the cmd interface main loop + try: + if args: + # a single command is provided + if '--web' in args: +- i = args.index('--web') +- args.pop(i) ++ i = args.index('--web') ++ args.pop(i) + cmd_line = MadEventCmd(me_dir, force_run=True) + else: + cmd_line = MadEventCmdShell(me_dir, force_run=True) +@@ -7445,13 +7457,13 @@ if '__main__' == __name__: + pass + + +- +- +- +- +- +- +- +- ++ ++ ++ ++ ++ ++ ++ ++ + + diff --git a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/cudacpp.mk b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/cudacpp.mk index ed07a5ddf8..db26bf090e 100644 --- a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/cudacpp.mk +++ b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/cudacpp.mk @@ -1,56 +1,41 @@ # Copyright (C) 2020-2023 CERN and UCLouvain. # Licensed under the GNU Lesser General Public License (version 3 or later). # Created by: S. Roiser (Feb 2020) for the MG5aMC CUDACPP plugin. -# Further modified by: J. Teig, O. Mattelaer, S. Roiser, A. Valassi (2020-2023) for the MG5aMC CUDACPP plugin. - -#=== Determine the name of this makefile (https://ftp.gnu.org/old-gnu/Manuals/make-3.80/html_node/make_17.html) -#=== NB: use ':=' to ensure that the value of CUDACPP_MAKEFILE is not modified further down after including make_opts -#=== NB: use 'override' to ensure that the value can not be modified from the outside -override CUDACPP_MAKEFILE := $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)) -###$(info CUDACPP_MAKEFILE='$(CUDACPP_MAKEFILE)') - -#=== NB: different names (e.g. cudacpp.mk and cudacpp_src.mk) are used in the Subprocess and src directories -override CUDACPP_SRC_MAKEFILE = cudacpp_src.mk - -#------------------------------------------------------------------------------- - -#=== Use bash in the Makefile (https://www.gnu.org/software/make/manual/html_node/Choosing-the-Shell.html) - -SHELL := /bin/bash - -#------------------------------------------------------------------------------- - -#=== Detect O/S and architecture (assuming uname is available, https://en.wikipedia.org/wiki/Uname) - -# Detect O/S kernel (Linux, Darwin...) -UNAME_S := $(shell uname -s) -###$(info UNAME_S='$(UNAME_S)') - -# Detect architecture (x86_64, ppc64le...) -UNAME_P := $(shell uname -p) -###$(info UNAME_P='$(UNAME_P)') - -#------------------------------------------------------------------------------- - -#=== Include the common MG5aMC Makefile options - -# OM: this is crucial for MG5aMC flag consistency/documentation -# AV: temporarely comment this out because it breaks cudacpp builds -ifneq ($(wildcard ../../Source/make_opts),) -include ../../Source/make_opts -endif +# Further modified by: S. Hageboeck, J. Teig, O. Mattelaer, S. Roiser, A. Valassi (2020-2023) for the MG5aMC CUDACPP plugin. + +# This makefile extends the Fortran makefile called "makefile" + +CUDACPP_SRC_MAKEFILE = cudacpp_src.mk + +# Self-invocation with adapted flags: +cppnative: $(SOURCEDIR_GUARD) $(PROCESS) + $(MAKE) AVX=native AVXFLAGS="-march=native" cppbuild +cppnone: $(SOURCEDIR_GUARD) $(PROCESS) + $(MAKE) AVX=none AVXFLAGS= cppbuild +cppsse4: $(SOURCEDIR_GUARD) $(PROCESS) + $(MAKE) AVX=sse4 AVXFLAGS=-march=nehalem cppbuild +cppavx2: $(SOURCEDIR_GUARD) $(PROCESS) + $(MAKE) AVX=avx2 AVXFLAGS=-march=haswell cppbuild +cppavx512y: $(SOURCEDIR_GUARD) $(PROCESS) + $(MAKE) AVX=512y AVXFLAGS="-march=skylake-avx512 -mprefer-vector-width=256" cppbuild +cppavx512z: $(SOURCEDIR_GUARD) $(PROCESS) + $(MAKE) AVX=512z AVXFLAGS="-march=skylake-avx512 -DMGONGPU_PVW512" cppbuild +cuda: $(SOURCEDIR_GUARD) $(PROCESS) + $(MAKE) AVX=cuda cudabuild #------------------------------------------------------------------------------- #=== Configure common compiler flags for C++ and CUDA +# NB: The base flags are defined in the fortran "makefile" + +# Include directories +INCFLAGS = -I. -I../../src -INCFLAGS = -I. -OPTFLAGS = -O3 # this ends up in CUFLAGS too (should it?), cannot add -Ofast or -ffast-math here +MG_CXXFLAGS += $(INCFLAGS) +MG_NVCCFLAGS += $(INCFLAGS) # Dependency on src directory -MG5AMC_COMMONLIB = mg5amc_common -LIBFLAGS = -L$(LIBDIR) -l$(MG5AMC_COMMONLIB) -INCFLAGS += -I../../src +MG5AMC_COMMONLIB = mg5amc_common # Compiler-specific googletest build directory (#125 and #738) ifneq ($(shell $(CXX) --version | grep '^Intel(R) oneAPI DPC++/C++ Compiler'),) @@ -99,356 +84,42 @@ endif #------------------------------------------------------------------------------- -#=== Configure the C++ compiler - -CXXFLAGS = $(OPTFLAGS) -std=c++17 $(INCFLAGS) -Wall -Wshadow -Wextra -ifeq ($(shell $(CXX) --version | grep ^nvc++),) -CXXFLAGS += -ffast-math # see issue #117 -endif -###CXXFLAGS+= -Ofast # performance is not different from --fast-math -###CXXFLAGS+= -g # FOR DEBUGGING ONLY - -# Optionally add debug flags to display the full list of flags (eg on Darwin) -###CXXFLAGS+= -v - -# Note: AR, CXX and FC are implicitly defined if not set externally -# See https://www.gnu.org/software/make/manual/html_node/Implicit-Variables.html - -# Add -mmacosx-version-min=11.3 to avoid "ld: warning: object file was built for newer macOS version than being linked" -ifneq ($(shell $(CXX) --version | egrep '^Apple clang'),) -CXXFLAGS += -mmacosx-version-min=11.3 -endif - -#------------------------------------------------------------------------------- - -#=== Configure the CUDA compiler - -# If CXX is not a single word (example "clang++ --gcc-toolchain...") then disable CUDA builds (issue #505) -# This is because it is impossible to pass this to "CUFLAGS += -ccbin " below -ifneq ($(words $(subst ccache ,,$(CXX))),1) # allow at most "CXX=ccache " from outside - $(warning CUDA builds are not supported for multi-word CXX "$(CXX)") - override CUDA_HOME=disabled -endif - -# If CUDA_HOME is not set, try to set it from the location of nvcc -ifndef CUDA_HOME - CUDA_HOME = $(patsubst %%bin/nvcc,%%,$(shell which nvcc 2>/dev/null)) - $(warning CUDA_HOME was not set: using "$(CUDA_HOME)") -endif - -# Set NVCC as $(CUDA_HOME)/bin/nvcc if it exists -ifneq ($(wildcard $(CUDA_HOME)/bin/nvcc),) - NVCC = $(CUDA_HOME)/bin/nvcc - USE_NVTX ?=-DUSE_NVTX - # See https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html - # See https://arnon.dk/matching-sm-architectures-arch-and-gencode-for-various-nvidia-cards/ - # Default: use compute capability 70 for V100 (CERN lxbatch, CERN itscrd, Juwels Cluster). - # Embed device code for 70, and PTX for 70+. - # Export MADGRAPH_CUDA_ARCHITECTURE (comma-separated list) to use another value or list of values (see #533). - # Examples: use 60 for P100 (Piz Daint), 80 for A100 (Juwels Booster, NVidia raplab/Curiosity). - MADGRAPH_CUDA_ARCHITECTURE ?= 70 - ###CUARCHFLAGS = -gencode arch=compute_$(MADGRAPH_CUDA_ARCHITECTURE),code=compute_$(MADGRAPH_CUDA_ARCHITECTURE) -gencode arch=compute_$(MADGRAPH_CUDA_ARCHITECTURE),code=sm_$(MADGRAPH_CUDA_ARCHITECTURE) # Older implementation (AV): go back to this one for multi-GPU support #533 - ###CUARCHFLAGS = --gpu-architecture=compute_$(MADGRAPH_CUDA_ARCHITECTURE) --gpu-code=sm_$(MADGRAPH_CUDA_ARCHITECTURE),compute_$(MADGRAPH_CUDA_ARCHITECTURE) # Newer implementation (SH): cannot use this as-is for multi-GPU support #533 - comma:=, - CUARCHFLAGS = $(foreach arch,$(subst $(comma), ,$(MADGRAPH_CUDA_ARCHITECTURE)),-gencode arch=compute_$(arch),code=compute_$(arch) -gencode arch=compute_$(arch),code=sm_$(arch)) - CUINC = -I$(CUDA_HOME)/include/ - ifeq ($(RNDGEN),hasNoCurand) - CURANDLIBFLAGS= - else - CURANDLIBFLAGS = -L$(CUDA_HOME)/lib64/ -lcurand # NB: -lcuda is not needed here! - endif - CUOPTFLAGS = -lineinfo - CUFLAGS = $(foreach opt, $(OPTFLAGS), -Xcompiler $(opt)) $(CUOPTFLAGS) $(INCFLAGS) $(CUINC) $(USE_NVTX) $(CUARCHFLAGS) -use_fast_math - ###CUFLAGS += -Xcompiler -Wall -Xcompiler -Wextra -Xcompiler -Wshadow - ###NVCC_VERSION = $(shell $(NVCC) --version | grep 'Cuda compilation tools' | cut -d' ' -f5 | cut -d, -f1) - CUFLAGS += -std=c++17 # need CUDA >= 11.2 (see #333): this is enforced in mgOnGpuConfig.h - # Without -maxrregcount: baseline throughput: 6.5E8 (16384 32 12) up to 7.3E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 160 # improves throughput: 6.9E8 (16384 32 12) up to 7.7E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 128 # improves throughput: 7.3E8 (16384 32 12) up to 7.6E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 96 # degrades throughput: 4.1E8 (16384 32 12) up to 4.5E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 64 # degrades throughput: 1.7E8 (16384 32 12) flat at 1.7E8 (65536 128 12) -else ifneq ($(origin REQUIRE_CUDA),undefined) - # If REQUIRE_CUDA is set but no cuda is found, stop here (e.g. for CI tests on GPU #443) - $(error No cuda installation found (set CUDA_HOME or make nvcc visible in PATH)) -else - # No cuda. Switch cuda compilation off and go to common random numbers in C++ - $(warning CUDA_HOME is not set or is invalid: export CUDA_HOME to compile with cuda) - override NVCC= - override USE_NVTX= - override CUINC= - override CURANDLIBFLAGS= -endif -export NVCC -export CUFLAGS - -# Set the host C++ compiler for nvcc via "-ccbin " -# (NB issue #505: this must be a single word, "clang++ --gcc-toolchain..." is not supported) -CUFLAGS += -ccbin $(shell which $(subst ccache ,,$(CXX))) - -# Allow newer (unsupported) C++ compilers with older versions of CUDA if ALLOW_UNSUPPORTED_COMPILER_IN_CUDA is set (#504) -ifneq ($(origin ALLOW_UNSUPPORTED_COMPILER_IN_CUDA),undefined) -CUFLAGS += -allow-unsupported-compiler -endif - -#------------------------------------------------------------------------------- - -#=== Configure ccache for C++ and CUDA builds - -# Enable ccache if USECCACHE=1 -ifeq ($(USECCACHE)$(shell echo $(CXX) | grep ccache),1) - override CXX:=ccache $(CXX) -endif -#ifeq ($(USECCACHE)$(shell echo $(AR) | grep ccache),1) -# override AR:=ccache $(AR) -#endif -ifneq ($(NVCC),) - ifeq ($(USECCACHE)$(shell echo $(NVCC) | grep ccache),1) - override NVCC:=ccache $(NVCC) - endif -endif - -#------------------------------------------------------------------------------- - -#=== Configure PowerPC-specific compiler flags for C++ and CUDA - -# PowerPC-specific CXX compiler flags (being reviewed) -ifeq ($(UNAME_P),ppc64le) - CXXFLAGS+= -mcpu=power9 -mtune=power9 # gains ~2-3%% both for none and sse4 - # Throughput references without the extra flags below: none=1.41-1.42E6, sse4=2.15-2.19E6 - ###CXXFLAGS+= -DNO_WARN_X86_INTRINSICS # no change - ###CXXFLAGS+= -fpeel-loops # no change - ###CXXFLAGS+= -funroll-loops # gains ~1%% for none, loses ~1%% for sse4 - ###CXXFLAGS+= -ftree-vectorize # no change - ###CXXFLAGS+= -flto # would increase to none=4.08-4.12E6, sse4=4.99-5.03E6! -else - ###CXXFLAGS+= -flto # also on Intel this would increase throughputs by a factor 2 to 4... - ######CXXFLAGS+= -fno-semantic-interposition # no benefit (neither alone, nor combined with -flto) -endif - -# PowerPC-specific CUDA compiler flags (to be reviewed!) -ifeq ($(UNAME_P),ppc64le) - CUFLAGS+= -Xcompiler -mno-float128 -endif - -#------------------------------------------------------------------------------- - #=== Configure defaults and check if user-defined choices exist for OMPFLAGS, AVX, FPTYPE, HELINL, HRDCOD, RNDGEN # Set the default OMPFLAGS choice -ifneq ($(shell $(CXX) --version | egrep '^Intel'),) -override OMPFLAGS = -fopenmp -###override OMPFLAGS = # disable OpenMP MT on Intel (was ok without nvcc but not ok with nvcc before #578) -else ifneq ($(shell $(CXX) --version | egrep '^(clang)'),) -override OMPFLAGS = -fopenmp -###override OMPFLAGS = # disable OpenMP MT on clang (was not ok without or with nvcc before #578) -###else ifneq ($(shell $(CXX) --version | egrep '^(Apple clang)'),) # AV for Mac (Apple clang compiler) -else ifeq ($(UNAME_S),Darwin) # OM for Mac (any compiler) +OMPFLAGS ?= -fopenmp +ifeq ($(UNAME_S),Darwin) # OM for Mac (any compiler) override OMPFLAGS = # AV disable OpenMP MT on Apple clang (builds fail in the CI #578) -###override OMPFLAGS = -fopenmp # OM reenable OpenMP MT on Apple clang? (AV Oct 2023: this still fails in the CI) -else -override OMPFLAGS = -fopenmp # enable OpenMP MT by default on all other platforms -###override OMPFLAGS = # disable OpenMP MT on all other platforms (default before #575) -endif - -# Set the default AVX (vectorization) choice -ifeq ($(AVX),) - ifeq ($(UNAME_P),ppc64le) - ###override AVX = none - override AVX = sse4 - else ifeq ($(UNAME_P),arm) - ###override AVX = none - override AVX = sse4 - else ifeq ($(wildcard /proc/cpuinfo),) - override AVX = none - $(warning Using AVX='$(AVX)' because host SIMD features cannot be read from /proc/cpuinfo) - else ifeq ($(shell grep -m1 -c avx512vl /proc/cpuinfo)$(shell $(CXX) --version | grep ^clang),1) - override AVX = 512y - ###$(info Using AVX='$(AVX)' as no user input exists) - else - override AVX = avx2 - ifneq ($(shell grep -m1 -c avx512vl /proc/cpuinfo),1) - $(warning Using AVX='$(AVX)' because host does not support avx512vl) - else - $(warning Using AVX='$(AVX)' because this is faster than avx512vl for clang) - endif - endif -else - ###$(info Using AVX='$(AVX)' according to user input) -endif - -# Set the default FPTYPE (floating point type) choice -ifeq ($(FPTYPE),) - override FPTYPE = d -endif - -# Set the default HELINL (inline helicities?) choice -ifeq ($(HELINL),) - override HELINL = 0 -endif - -# Set the default HRDCOD (hardcode cIPD physics parameters?) choice -ifeq ($(HRDCOD),) - override HRDCOD = 0 -endif - -# Set the default RNDGEN (random number generator) choice -ifeq ($(RNDGEN),) - ifeq ($(NVCC),) - override RNDGEN = hasNoCurand - else ifeq ($(RNDGEN),) - override RNDGEN = hasCurand - endif endif -# Export AVX, FPTYPE, HELINL, HRDCOD, RNDGEN, OMPFLAGS so that it is not necessary to pass them to the src Makefile too -export AVX -export FPTYPE -export HELINL -export HRDCOD -export RNDGEN +# Export here, so sub makes don't fall back to the defaults: export OMPFLAGS -#------------------------------------------------------------------------------- - -#=== Set the CUDA/C++ compiler flags appropriate to user-defined choices of AVX, FPTYPE, HELINL, HRDCOD, RNDGEN - -# Set the build flags appropriate to OMPFLAGS -$(info OMPFLAGS=$(OMPFLAGS)) -CXXFLAGS += $(OMPFLAGS) - -# Set the build flags appropriate to each AVX choice (example: "make AVX=none") -# [NB MGONGPU_PVW512 is needed because "-mprefer-vector-width=256" is not exposed in a macro] -# [See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96476] -$(info AVX=$(AVX)) -ifeq ($(UNAME_P),ppc64le) - ifeq ($(AVX),sse4) - override AVXFLAGS = -D__SSE4_2__ # Power9 VSX with 128 width (VSR registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on PowerPC for the moment) - endif -else ifeq ($(UNAME_P),arm) - ifeq ($(AVX),sse4) - override AVXFLAGS = -D__SSE4_2__ # ARM NEON with 128 width (Q/quadword registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on ARM for the moment) - endif -else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 - ifeq ($(AVX),none) - override AVXFLAGS = -mno-sse3 # no SIMD - else ifeq ($(AVX),sse4) - override AVXFLAGS = -mno-avx # SSE4.2 with 128 width (xmm registers) - else ifeq ($(AVX),avx2) - override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(AVX),512y) - override AVXFLAGS = -march=skylake -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(AVX),512z) - override AVXFLAGS = -march=skylake -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) - else - $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) - endif -else - ifeq ($(AVX),none) - override AVXFLAGS = -march=x86-64 # no SIMD (see #588) - else ifeq ($(AVX),sse4) - override AVXFLAGS = -march=nehalem # SSE4.2 with 128 width (xmm registers) - else ifeq ($(AVX),avx2) - override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(AVX),512y) - override AVXFLAGS = -march=skylake-avx512 -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(AVX),512z) - override AVXFLAGS = -march=skylake-avx512 -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) - else - $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) - endif -endif -# For the moment, use AVXFLAGS everywhere: eventually, use them only in encapsulated implementations? -CXXFLAGS+= $(AVXFLAGS) - -# Set the build flags appropriate to each FPTYPE choice (example: "make FPTYPE=f") -$(info FPTYPE=$(FPTYPE)) -ifeq ($(FPTYPE),d) - CXXFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_DOUBLE - CUFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_DOUBLE -else ifeq ($(FPTYPE),f) - CXXFLAGS += -DMGONGPU_FPTYPE_FLOAT -DMGONGPU_FPTYPE2_FLOAT - CUFLAGS += -DMGONGPU_FPTYPE_FLOAT -DMGONGPU_FPTYPE2_FLOAT -else ifeq ($(FPTYPE),m) - CXXFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_FLOAT - CUFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_FLOAT -else - $(error Unknown FPTYPE='$(FPTYPE)': only 'd', 'f' and 'm' are supported) -endif - -# Set the build flags appropriate to each HELINL choice (example: "make HELINL=1") -$(info HELINL=$(HELINL)) -ifeq ($(HELINL),1) - CXXFLAGS += -DMGONGPU_INLINE_HELAMPS - CUFLAGS += -DMGONGPU_INLINE_HELAMPS -else ifneq ($(HELINL),0) - $(error Unknown HELINL='$(HELINL)': only '0' and '1' are supported) -endif - -# Set the build flags appropriate to each HRDCOD choice (example: "make HRDCOD=1") -$(info HRDCOD=$(HRDCOD)) -ifeq ($(HRDCOD),1) - CXXFLAGS += -DMGONGPU_HARDCODE_PARAM - CUFLAGS += -DMGONGPU_HARDCODE_PARAM -else ifneq ($(HRDCOD),0) - $(error Unknown HRDCOD='$(HRDCOD)': only '0' and '1' are supported) -endif - -# Set the build flags appropriate to each RNDGEN choice (example: "make RNDGEN=hasNoCurand") -$(info RNDGEN=$(RNDGEN)) -ifeq ($(RNDGEN),hasNoCurand) - override CXXFLAGSCURAND = -DMGONGPU_HAS_NO_CURAND -else ifeq ($(RNDGEN),hasCurand) - override CXXFLAGSCURAND = -else - $(error Unknown RNDGEN='$(RNDGEN)': only 'hasCurand' and 'hasNoCurand' are supported) -endif +MG_CXXFLAGS += $(OMPFLAGS) #------------------------------------------------------------------------------- #=== Configure build directories and build lockfiles === -# Build directory "short" tag (defines target and path to the optional build directory) -# (Rationale: keep directory names shorter, e.g. do not include random number generator choice) -override DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) - -# Build lockfile "full" tag (defines full specification of build options that cannot be intermixed) -# (Rationale: avoid mixing of CUDA and no-CUDA environment builds with different random number generators) -override TAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) - -# Build directory: current directory by default, or build.$(DIRTAG) if USEBUILDDIR==1 -ifeq ($(USEBUILDDIR),1) - override BUILDDIR = build.$(DIRTAG) - override LIBDIR = ../../lib/$(BUILDDIR) - override LIBDIRRPATH = '$$ORIGIN/../$(LIBDIR)' - $(info Building in BUILDDIR=$(BUILDDIR) for tag=$(TAG) (USEBUILDDIR is set = 1)) -else - override BUILDDIR = . - override LIBDIR = ../../lib - override LIBDIRRPATH = '$$ORIGIN/$(LIBDIR)' - $(info Building in BUILDDIR=$(BUILDDIR) for tag=$(TAG) (USEBUILDDIR is not set)) +# Build directory "short" tag (defines target and path to the build directory) +DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) +CUDACPP_BUILDDIR = build.$(DIRTAG) +CUDACPP_LIBDIR := ../../lib/$(CUDACPP_BUILDDIR) +LIBDIRRPATH := '$$ORIGIN:$$ORIGIN/../$(CUDACPP_LIBDIR)' +ifneq ($(AVX),) + $(info Building CUDACPP in CUDACPP_BUILDDIR=$(CUDACPP_BUILDDIR). Libs in $(CUDACPP_LIBDIR)) endif -###override INCDIR = ../../include -###$(info Building in BUILDDIR=$(BUILDDIR) for tag=$(TAG)) -# On Linux, set rpath to LIBDIR to make it unnecessary to use LD_LIBRARY_PATH +# On Linux, set rpath to CUDACPP_LIBDIR to make it unnecessary to use LD_LIBRARY_PATH # Use relative paths with respect to the executables or shared libraries ($ORIGIN on Linux) -# On Darwin, building libraries with absolute paths in LIBDIR makes this unnecessary +# On Darwin, building libraries with absolute paths in CUDACPP_LIBDIR makes this unnecessary ifeq ($(UNAME_S),Darwin) override CXXLIBFLAGSRPATH = override CULIBFLAGSRPATH = - override CXXLIBFLAGSRPATH2 = - override CULIBFLAGSRPATH2 = else # RPATH to cuda/cpp libs when linking executables override CXXLIBFLAGSRPATH = -Wl,-rpath,$(LIBDIRRPATH) override CULIBFLAGSRPATH = -Xlinker -rpath,$(LIBDIRRPATH) - # RPATH to common lib when linking cuda/cpp libs - override CXXLIBFLAGSRPATH2 = -Wl,-rpath,'$$ORIGIN' - override CULIBFLAGSRPATH2 = -Xlinker -rpath,'$$ORIGIN' endif # Setting LD_LIBRARY_PATH or DYLD_LIBRARY_PATH in the RUNTIME is no longer necessary (neither on Linux nor on Mac) @@ -458,107 +129,68 @@ override RUNTIME = #=== Makefile TARGETS and build rules below #=============================================================================== -cxx_main=$(BUILDDIR)/check.exe -fcxx_main=$(BUILDDIR)/fcheck.exe +cxx_main=$(CUDACPP_BUILDDIR)/check.exe +fcxx_main=$(CUDACPP_BUILDDIR)/fcheck.exe -ifneq ($(NVCC),) -cu_main=$(BUILDDIR)/gcheck.exe -fcu_main=$(BUILDDIR)/fgcheck.exe -else -cu_main= -fcu_main= -endif - -testmain=$(BUILDDIR)/runTest.exe +cu_main=$(CUDACPP_BUILDDIR)/gcheck.exe +fcu_main=$(CUDACPP_BUILDDIR)/fgcheck.exe ifneq ($(GTESTLIBS),) -all.$(TAG): $(BUILDDIR)/.build.$(TAG) $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_main) $(cxx_main) $(fcu_main) $(fcxx_main) $(testmain) -else -all.$(TAG): $(BUILDDIR)/.build.$(TAG) $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_main) $(cxx_main) $(fcu_main) $(fcxx_main) +testmain=$(CUDACPP_BUILDDIR)/runTest.exe +cutestmain=$(CUDACPP_BUILDDIR)/runTest_cuda.exe endif -# Target (and build options): debug -MAKEDEBUG= -debug: OPTFLAGS = -g -O0 -debug: CUOPTFLAGS = -G -debug: MAKEDEBUG := debug -debug: all.$(TAG) - -# Target: tag-specific build lockfiles -override oldtagsb=`if [ -d $(BUILDDIR) ]; then find $(BUILDDIR) -maxdepth 1 -name '.build.*' ! -name '.build.$(TAG)' -exec echo $(shell pwd)/{} \; ; fi` -$(BUILDDIR)/.build.$(TAG): - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - @if [ "$(oldtagsb)" != "" ]; then echo "Cannot build for tag=$(TAG) as old builds exist for other tags:"; echo " $(oldtagsb)"; echo "Please run 'make clean' first\nIf 'make clean' is not enough: run 'make clean USEBUILDDIR=1 AVX=$(AVX) FPTYPE=$(FPTYPE)' or 'make cleanall'"; exit 1; fi - @touch $(BUILDDIR)/.build.$(TAG) +cppbuild: $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(cxx_main) $(fcxx_main) $(testmain) +cudabuild: $(CUDACPP_BUILDDIR)/$(PROG)_cuda $(cu_main) $(fcu_main) $(cutestmain) # Generic target and build rules: objects from CUDA compilation -ifneq ($(NVCC),) -$(BUILDDIR)/%%.o : %%.cu *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c $< -o $@ +$(CUDACPP_BUILDDIR)/%%.o : %%.cu *.h ../../src/*.h + @mkdir -p $(CUDACPP_BUILDDIR) + $(NVCC) $(MG_NVCCFLAGS) $(NVCCFLAGS) -c $< -o $@ -$(BUILDDIR)/%%_cu.o : %%.cc *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c -x cu $< -o $@ -endif +$(CUDACPP_BUILDDIR)/%%_cu.o : %%.cc *.h ../../src/*.h + @mkdir -p $(CUDACPP_BUILDDIR) + $(NVCC) $(MG_NVCCFLAGS) $(NVCCFLAGS) -c -x cu $< -o $@ # Generic target and build rules: objects from C++ compilation # (NB do not include CUINC here! add it only for NVTX or curand #679) -$(BUILDDIR)/%%.o : %%.cc *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - $(CXX) $(CPPFLAGS) $(CXXFLAGS) -fPIC -c $< -o $@ +$(CUDACPP_BUILDDIR)/%%.o : %%.cc *.h ../../src/*.h + @mkdir -p $(CUDACPP_BUILDDIR) + $(CXX) $(MG_CXXFLAGS) $(CXXFLAGS) -c $< -o $@ # Apply special build flags only to CrossSectionKernel.cc and gCrossSectionKernel.cu (no fast math, see #117 and #516) ifeq ($(shell $(CXX) --version | grep ^nvc++),) -$(BUILDDIR)/CrossSectionKernels.o: CXXFLAGS := $(filter-out -ffast-math,$(CXXFLAGS)) -$(BUILDDIR)/CrossSectionKernels.o: CXXFLAGS += -fno-fast-math +$(CUDACPP_BUILDDIR)/CrossSectionKernels.o: CXXFLAGS += -fno-fast-math ifneq ($(NVCC),) -$(BUILDDIR)/gCrossSectionKernels.o: CUFLAGS += -Xcompiler -fno-fast-math +$(CUDACPP_BUILDDIR)/gCrossSectionKernels.o: NVCCFLAGS += -Xcompiler -fno-fast-math endif endif # Apply special build flags only to check_sa.o and gcheck_sa.o (NVTX in timermap.h, #679) -$(BUILDDIR)/check_sa.o: CXXFLAGS += $(USE_NVTX) $(CUINC) -$(BUILDDIR)/gcheck_sa.o: CXXFLAGS += $(USE_NVTX) $(CUINC) +$(CUDACPP_BUILDDIR)/check_sa.o: MG_CXXFLAGS += $(USE_NVTX) $(CUINC) +$(CUDACPP_BUILDDIR)/gcheck_sa.o: MG_CXXFLAGS += $(USE_NVTX) $(CUINC) # Apply special build flags only to check_sa and CurandRandomNumberKernel (curand headers, #679) -$(BUILDDIR)/check_sa.o: CXXFLAGS += $(CXXFLAGSCURAND) -$(BUILDDIR)/gcheck_sa.o: CUFLAGS += $(CXXFLAGSCURAND) -$(BUILDDIR)/CurandRandomNumberKernel.o: CXXFLAGS += $(CXXFLAGSCURAND) -$(BUILDDIR)/gCurandRandomNumberKernel.o: CUFLAGS += $(CXXFLAGSCURAND) -ifeq ($(RNDGEN),hasCurand) -$(BUILDDIR)/CurandRandomNumberKernel.o: CXXFLAGS += $(CUINC) -endif +$(CUDACPP_BUILDDIR)/check_sa.o: MG_CXXFLAGS += $(CXXFLAGSCURAND) +$(CUDACPP_BUILDDIR)/gcheck_sa.o: MG_NVCCFLAGS += $(CXXFLAGSCURAND) +$(CUDACPP_BUILDDIR)/CurandRandomNumberKernel.o: MG_CXXFLAGS += $(CXXFLAGSCURAND) +$(CUDACPP_BUILDDIR)/gCurandRandomNumberKernel.o: MG_NVCCFLAGS += $(CXXFLAGSCURAND) + # Avoid "warning: builtin __has_trivial_... is deprecated; use __is_trivially_... instead" in nvcc with icx2023 (#592) ifneq ($(shell $(CXX) --version | egrep '^(Intel)'),) ifneq ($(NVCC),) -CUFLAGS += -Xcompiler -Wno-deprecated-builtins +MG_NVCCFLAGS += -Xcompiler -Wno-deprecated-builtins endif endif -# Avoid clang warning "overriding '-ffp-contract=fast' option with '-ffp-contract=on'" (#516) -# This patch does remove the warning, but I prefer to keep it disabled for the moment... -###ifneq ($(shell $(CXX) --version | egrep '^(clang|Apple clang|Intel)'),) -###$(BUILDDIR)/CrossSectionKernels.o: CXXFLAGS += -Wno-overriding-t-option -###ifneq ($(NVCC),) -###$(BUILDDIR)/gCrossSectionKernels.o: CUFLAGS += -Xcompiler -Wno-overriding-t-option -###endif -###endif - #### Apply special build flags only to CPPProcess.cc (-flto) ###$(BUILDDIR)/CPPProcess.o: CXXFLAGS += -flto -#### Apply special build flags only to CPPProcess.cc (AVXFLAGS) -###$(BUILDDIR)/CPPProcess.o: CXXFLAGS += $(AVXFLAGS) - #------------------------------------------------------------------------------- -# Target (and build rules): common (src) library -commonlib : $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so - -$(LIBDIR)/lib$(MG5AMC_COMMONLIB).so: ../../src/*.h ../../src/*.cc $(BUILDDIR)/.build.$(TAG) - $(MAKE) -C ../../src $(MAKEDEBUG) -f $(CUDACPP_SRC_MAKEFILE) +$(CUDACPP_LIBDIR)/lib$(MG5AMC_COMMONLIB).so: ../../src/*.h ../../src/*.cc + $(MAKE) AVX=$(AVX) AVXFLAGS="$(AVXFLAGS)" -C ../../src -f $(CUDACPP_SRC_MAKEFILE) #------------------------------------------------------------------------------- @@ -566,162 +198,123 @@ processid_short=$(shell basename $(CURDIR) | awk -F_ '{print $$(NF-1)"_"$$NF}') ###$(info processid_short=$(processid_short)) MG5AMC_CXXLIB = mg5amc_$(processid_short)_cpp -cxx_objects_lib=$(BUILDDIR)/CPPProcess.o $(BUILDDIR)/MatrixElementKernels.o $(BUILDDIR)/BridgeKernels.o $(BUILDDIR)/CrossSectionKernels.o -cxx_objects_exe=$(BUILDDIR)/CommonRandomNumberKernel.o $(BUILDDIR)/RamboSamplingKernels.o +cxx_objects_lib=$(CUDACPP_BUILDDIR)/CPPProcess.o $(CUDACPP_BUILDDIR)/MatrixElementKernels.o $(CUDACPP_BUILDDIR)/BridgeKernels.o $(CUDACPP_BUILDDIR)/CrossSectionKernels.o +cxx_objects_exe=$(CUDACPP_BUILDDIR)/CommonRandomNumberKernel.o $(CUDACPP_BUILDDIR)/RamboSamplingKernels.o -ifneq ($(NVCC),) MG5AMC_CULIB = mg5amc_$(processid_short)_cuda -cu_objects_lib=$(BUILDDIR)/gCPPProcess.o $(BUILDDIR)/gMatrixElementKernels.o $(BUILDDIR)/gBridgeKernels.o $(BUILDDIR)/gCrossSectionKernels.o -cu_objects_exe=$(BUILDDIR)/gCommonRandomNumberKernel.o $(BUILDDIR)/gRamboSamplingKernels.o -endif +cu_objects_lib=$(CUDACPP_BUILDDIR)/gCPPProcess.o $(CUDACPP_BUILDDIR)/gMatrixElementKernels.o $(CUDACPP_BUILDDIR)/gBridgeKernels.o $(CUDACPP_BUILDDIR)/gCrossSectionKernels.o +cu_objects_exe=$(CUDACPP_BUILDDIR)/gCommonRandomNumberKernel.o $(CUDACPP_BUILDDIR)/gRamboSamplingKernels.o # Target (and build rules): C++ and CUDA shared libraries -$(LIBDIR)/lib$(MG5AMC_CXXLIB).so: $(BUILDDIR)/fbridge.o -$(LIBDIR)/lib$(MG5AMC_CXXLIB).so: cxx_objects_lib += $(BUILDDIR)/fbridge.o -$(LIBDIR)/lib$(MG5AMC_CXXLIB).so: $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cxx_objects_lib) - $(CXX) -shared -o $@ $(cxx_objects_lib) $(CXXLIBFLAGSRPATH2) -L$(LIBDIR) -l$(MG5AMC_COMMONLIB) - -ifneq ($(NVCC),) -$(LIBDIR)/lib$(MG5AMC_CULIB).so: $(BUILDDIR)/fbridge_cu.o -$(LIBDIR)/lib$(MG5AMC_CULIB).so: cu_objects_lib += $(BUILDDIR)/fbridge_cu.o -$(LIBDIR)/lib$(MG5AMC_CULIB).so: $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_objects_lib) - $(NVCC) --shared -o $@ $(cu_objects_lib) $(CULIBFLAGSRPATH2) -L$(LIBDIR) -l$(MG5AMC_COMMONLIB) -endif +$(CUDACPP_BUILDDIR)/lib$(MG5AMC_CXXLIB).so: $(CUDACPP_BUILDDIR)/fbridge.o +$(CUDACPP_BUILDDIR)/lib$(MG5AMC_CXXLIB).so: cxx_objects_lib += $(CUDACPP_BUILDDIR)/fbridge.o +$(CUDACPP_BUILDDIR)/lib$(MG5AMC_CXXLIB).so: $(CUDACPP_LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cxx_objects_lib) + $(CXX) -shared -o $@ $(cxx_objects_lib) $(CXXLIBFLAGSRPATH) -L$(CUDACPP_LIBDIR) -l$(MG5AMC_COMMONLIB) $(MG_LDFLAGS) $(LDFLAGS) -#------------------------------------------------------------------------------- - -# Target (and build rules): Fortran include files -###$(INCDIR)/%%.inc : ../%%.inc -### @if [ ! -d $(INCDIR) ]; then echo "mkdir -p $(INCDIR)"; mkdir -p $(INCDIR); fi -### \cp $< $@ +$(CUDACPP_BUILDDIR)/lib$(MG5AMC_CULIB).so: $(CUDACPP_BUILDDIR)/fbridge_cu.o +$(CUDACPP_BUILDDIR)/lib$(MG5AMC_CULIB).so: cu_objects_lib += $(CUDACPP_BUILDDIR)/fbridge_cu.o +$(CUDACPP_BUILDDIR)/lib$(MG5AMC_CULIB).so: $(CUDACPP_LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_objects_lib) + $(NVCC) --shared -o $@ $(cu_objects_lib) $(CULIBFLAGSRPATH) -L$(CUDACPP_LIBDIR) -l$(MG5AMC_COMMONLIB) #------------------------------------------------------------------------------- # Target (and build rules): C++ and CUDA standalone executables -$(cxx_main): LIBFLAGS += $(CXXLIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH -$(cxx_main): $(BUILDDIR)/check_sa.o $(LIBDIR)/lib$(MG5AMC_CXXLIB).so $(cxx_objects_exe) $(BUILDDIR)/CurandRandomNumberKernel.o - $(CXX) -o $@ $(BUILDDIR)/check_sa.o $(OMPFLAGS) -ldl -pthread $(LIBFLAGS) -L$(LIBDIR) -l$(MG5AMC_CXXLIB) $(cxx_objects_exe) $(BUILDDIR)/CurandRandomNumberKernel.o $(CURANDLIBFLAGS) -ifneq ($(NVCC),) +$(cxx_main): MG_LDFLAGS += $(CXXLIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH +$(cxx_main): MG_LDFLAGS += -L$(CUDACPP_BUILDDIR) -l$(MG5AMC_CXXLIB) # Process-specific library +$(cxx_main): $(CUDACPP_BUILDDIR)/check_sa.o $(CUDACPP_BUILDDIR)/lib$(MG5AMC_CXXLIB).so $(cxx_objects_exe) $(CUDACPP_BUILDDIR)/CurandRandomNumberKernel.o + $(CXX) -o $@ $(CUDACPP_BUILDDIR)/check_sa.o $(OMPFLAGS) -ldl -pthread $(cxx_objects_exe) $(CUDACPP_BUILDDIR)/CurandRandomNumberKernel.o $(MG_LDFLAGS) $(LDFLAGS) + ifneq ($(shell $(CXX) --version | grep ^Intel),) -$(cu_main): LIBFLAGS += -lintlc # compile with icpx and link with nvcc (undefined reference to `_intel_fast_memcpy') -$(cu_main): LIBFLAGS += -lsvml # compile with icpx and link with nvcc (undefined reference to `__svml_cos4_l9') +$(cu_main): MG_LDFLAGS += -lintlc # compile with icpx and link with nvcc (undefined reference to `_intel_fast_memcpy') +$(cu_main): MG_LDFLAGS += -lsvml # compile with icpx and link with nvcc (undefined reference to `__svml_cos4_l9') else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 -$(cu_main): LIBFLAGS += -L$(patsubst %%bin/nvc++,%%lib,$(subst ccache ,,$(CXX))) -lnvhpcatm -lnvcpumath -lnvc -endif -$(cu_main): LIBFLAGS += $(CULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH -$(cu_main): $(BUILDDIR)/gcheck_sa.o $(LIBDIR)/lib$(MG5AMC_CULIB).so $(cu_objects_exe) $(BUILDDIR)/gCurandRandomNumberKernel.o - $(NVCC) -o $@ $(BUILDDIR)/gcheck_sa.o $(CUARCHFLAGS) $(LIBFLAGS) -L$(LIBDIR) -l$(MG5AMC_CULIB) $(cu_objects_exe) $(BUILDDIR)/gCurandRandomNumberKernel.o $(CURANDLIBFLAGS) +$(cu_main): MG_LDFLAGS += -L$(patsubst %%bin/nvc++,%%lib,$(subst ccache ,,$(CXX))) -lnvhpcatm -lnvcpumath -lnvc endif +$(cu_main): MG_LDFLAGS += $(CULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH +$(cu_main): MG_LDFLAGS += -L$(CUDACPP_BUILDDIR) -l$(MG5AMC_CULIB) # Process-specific library +$(cu_main): $(CUDACPP_BUILDDIR)/gcheck_sa.o $(CUDACPP_BUILDDIR)/lib$(MG5AMC_CULIB).so $(cu_objects_exe) $(CUDACPP_BUILDDIR)/gCurandRandomNumberKernel.o + $(NVCC) -o $@ $(CUDACPP_BUILDDIR)/gcheck_sa.o $(CUARCHFLAGS) $(cu_objects_exe) $(CUDACPP_BUILDDIR)/gCurandRandomNumberKernel.o $(MG_LDFLAGS) $(LDFLAGS) #------------------------------------------------------------------------------- - -# Generic target and build rules: objects from Fortran compilation -$(BUILDDIR)/%%.o : %%.f *.inc - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - $(FC) -I. -c $< -o $@ - -# Generic target and build rules: objects from Fortran compilation -###$(BUILDDIR)/%%.o : %%.f *.inc -### @if [ ! -d $(INCDIR) ]; then echo "mkdir -p $(INCDIR)"; mkdir -p $(INCDIR); fi -### @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi -### $(FC) -I. -I$(INCDIR) -c $< -o $@ - -# Target (and build rules): Fortran standalone executables -###$(BUILDDIR)/fcheck_sa.o : $(INCDIR)/fbridge.inc +# Check executables: ifeq ($(UNAME_S),Darwin) -$(fcxx_main): LIBFLAGS += -L$(shell dirname $(shell $(FC) --print-file-name libgfortran.dylib)) # add path to libgfortran on Mac #375 +$(fcxx_main): MG_LDFLAGS += -L$(shell dirname $(shell $(FC) --print-file-name libgfortran.dylib)) # add path to libgfortran on Mac #375 endif -$(fcxx_main): LIBFLAGS += $(CXXLIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH -$(fcxx_main): $(BUILDDIR)/fcheck_sa.o $(BUILDDIR)/fsampler.o $(LIBDIR)/lib$(MG5AMC_CXXLIB).so $(cxx_objects_exe) - $(CXX) -o $@ $(BUILDDIR)/fcheck_sa.o $(OMPFLAGS) $(BUILDDIR)/fsampler.o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_CXXLIB) $(cxx_objects_exe) +$(fcxx_main): MG_LDFLAGS += $(CXXLIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH +$(fcxx_main): MG_LDFLAGS += -L$(CUDACPP_BUILDDIR) -l$(MG5AMC_CXXLIB) # Process-specific library +$(fcxx_main): $(CUDACPP_BUILDDIR)/fcheck_sa.o $(CUDACPP_BUILDDIR)/fsampler.o $(CUDACPP_BUILDDIR)/lib$(MG5AMC_CXXLIB).so $(cxx_objects_exe) + $(CXX) -o $@ $(CUDACPP_BUILDDIR)/fcheck_sa.o $(cxx_objects_exe) $(OMPFLAGS) $(CUDACPP_BUILDDIR)/fsampler.o -lgfortran -L$(CUDACPP_LIBDIR) $(MG_LDFLAGS) $(LDFLAGS) -ifneq ($(NVCC),) ifneq ($(shell $(CXX) --version | grep ^Intel),) -$(fcu_main): LIBFLAGS += -lintlc # compile with icpx and link with nvcc (undefined reference to `_intel_fast_memcpy') -$(fcu_main): LIBFLAGS += -lsvml # compile with icpx and link with nvcc (undefined reference to `__svml_cos4_l9') +$(fcu_main): MG_LDFLAGS += -lintlc # compile with icpx and link with nvcc (undefined reference to `_intel_fast_memcpy') +$(fcu_main): MG_LDFLAGS += -lsvml # compile with icpx and link with nvcc (undefined reference to `__svml_cos4_l9') endif ifeq ($(UNAME_S),Darwin) -$(fcu_main): LIBFLAGS += -L$(shell dirname $(shell $(FC) --print-file-name libgfortran.dylib)) # add path to libgfortran on Mac #375 -endif -$(fcu_main): LIBFLAGS += $(CULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH -$(fcu_main): $(BUILDDIR)/fcheck_sa.o $(BUILDDIR)/fsampler_cu.o $(LIBDIR)/lib$(MG5AMC_CULIB).so $(cu_objects_exe) - $(NVCC) -o $@ $(BUILDDIR)/fcheck_sa.o $(BUILDDIR)/fsampler_cu.o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_CULIB) $(cu_objects_exe) +$(fcu_main): MG_LDFLAGS += -L$(shell dirname $(shell $(FC) --print-file-name libgfortran.dylib)) # add path to libgfortran on Mac #375 endif +$(fcu_main): MG_LDFLAGS += $(CULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH +$(fcu_main): MG_LDFLAGS += -L$(CUDACPP_BUILDDIR) -l$(MG5AMC_CULIB) # Process-specific library +$(fcu_main): $(CUDACPP_BUILDDIR)/fcheck_sa.o $(CUDACPP_BUILDDIR)/fsampler_cu.o $(CUDACPP_BUILDDIR)/lib$(MG5AMC_CULIB).so $(cu_objects_exe) + $(NVCC) -o $@ $(CUDACPP_BUILDDIR)/fcheck_sa.o $(CUDACPP_BUILDDIR)/fsampler_cu.o $(cu_objects_exe) -lgfortran $(MG_LDFLAGS) $(LDFLAGS) #------------------------------------------------------------------------------- # Target (and build rules): test objects and test executable -$(BUILDDIR)/testxxx.o: $(GTESTLIBS) -$(BUILDDIR)/testxxx.o: INCFLAGS += $(GTESTINC) -$(BUILDDIR)/testxxx.o: testxxx_cc_ref.txt -$(testmain): $(BUILDDIR)/testxxx.o -$(testmain): cxx_objects_exe += $(BUILDDIR)/testxxx.o # Comment out this line to skip the C++ test of xxx functions -ifneq ($(NVCC),) -$(BUILDDIR)/testxxx_cu.o: $(GTESTLIBS) -$(BUILDDIR)/testxxx_cu.o: INCFLAGS += $(GTESTINC) -$(BUILDDIR)/testxxx_cu.o: testxxx_cc_ref.txt -$(testmain): $(BUILDDIR)/testxxx_cu.o -$(testmain): cu_objects_exe += $(BUILDDIR)/testxxx_cu.o # Comment out this line to skip the CUDA test of xxx functions -endif +$(testmain) $(cutestmain): $(GTESTLIBS) +$(testmain) $(cutestmain): INCFLAGS += $(GTESTINC) +$(testmain) $(cutestmain): MG_LDFLAGS += -L$(GTESTLIBDIR) -lgtest -lgtest_main -$(BUILDDIR)/testmisc.o: $(GTESTLIBS) -$(BUILDDIR)/testmisc.o: INCFLAGS += $(GTESTINC) -$(testmain): $(BUILDDIR)/testmisc.o -$(testmain): cxx_objects_exe += $(BUILDDIR)/testmisc.o # Comment out this line to skip the C++ miscellaneous tests +$(CUDACPP_BUILDDIR)/testxxx.o $(CUDACPP_BUILDDIR)/testxxx_cu.o: $(GTESTLIBS) testxxx_cc_ref.txt +$(testmain): $(CUDACPP_BUILDDIR)/testxxx.o +$(testmain): cxx_objects_exe += $(CUDACPP_BUILDDIR)/testxxx.o # Comment out this line to skip the C++ test of xxx functions +$(cutestmain): $(CUDACPP_BUILDDIR)/testxxx_cu.o +$(cutestmain): cu_objects_exe += $(CUDACPP_BUILDDIR)/testxxx_cu.o # Comment out this line to skip the CUDA test of xxx functions -ifneq ($(NVCC),) -$(BUILDDIR)/testmisc_cu.o: $(GTESTLIBS) -$(BUILDDIR)/testmisc_cu.o: INCFLAGS += $(GTESTINC) -$(testmain): $(BUILDDIR)/testmisc_cu.o -$(testmain): cu_objects_exe += $(BUILDDIR)/testmisc_cu.o # Comment out this line to skip the CUDA miscellaneous tests -endif -$(BUILDDIR)/runTest.o: $(GTESTLIBS) -$(BUILDDIR)/runTest.o: INCFLAGS += $(GTESTINC) -$(testmain): $(BUILDDIR)/runTest.o -$(testmain): cxx_objects_exe += $(BUILDDIR)/runTest.o +$(CUDACPP_BUILDDIR)/testmisc.o $(CUDACPP_BUILDDIR)/testmisc_cu.o: $(GTESTLIBS) +$(testmain): $(CUDACPP_BUILDDIR)/testmisc.o +$(testmain): cxx_objects_exe += $(CUDACPP_BUILDDIR)/testmisc.o # Comment out this line to skip the C++ miscellaneous tests +$(cutestmain): $(CUDACPP_BUILDDIR)/testmisc_cu.o +$(cutestmain): cu_objects_exe += $(CUDACPP_BUILDDIR)/testmisc_cu.o # Comment out this line to skip the CUDA miscellaneous tests + + +$(CUDACPP_BUILDDIR)/runTest.o $(CUDACPP_BUILDDIR)/runTest_cu.o: $(GTESTLIBS) +$(testmain): $(CUDACPP_BUILDDIR)/runTest.o +$(testmain): cxx_objects_exe += $(CUDACPP_BUILDDIR)/runTest.o +$(cutestmain): $(CUDACPP_BUILDDIR)/runTest_cu.o +$(cutestmain): cu_objects_exe += $(CUDACPP_BUILDDIR)/runTest_cu.o + -ifneq ($(NVCC),) -$(BUILDDIR)/runTest_cu.o: $(GTESTLIBS) -$(BUILDDIR)/runTest_cu.o: INCFLAGS += $(GTESTINC) ifneq ($(shell $(CXX) --version | grep ^Intel),) -$(testmain): LIBFLAGS += -lintlc # compile with icpx and link with nvcc (undefined reference to `_intel_fast_memcpy') -$(testmain): LIBFLAGS += -lsvml # compile with icpx and link with nvcc (undefined reference to `__svml_cos4_l9') +$(cutestmain): MG_LDFLAGS += -lintlc # compile with icpx and link with nvcc (undefined reference to `_intel_fast_memcpy') +$(cutestmain): MG_LDFLAGS += -lsvml # compile with icpx and link with nvcc (undefined reference to `__svml_cos4_l9') else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 -$(testmain): LIBFLAGS += -L$(patsubst %%bin/nvc++,%%lib,$(subst ccache ,,$(CXX))) -lnvhpcatm -lnvcpumath -lnvc -endif -$(testmain): $(BUILDDIR)/runTest_cu.o -$(testmain): cu_objects_exe += $(BUILDDIR)/runTest_cu.o +$(cutestmain): MG_LDFLAGS += -L$(patsubst %%bin/nvc++,%%lib,$(subst ccache ,,$(CXX))) -lnvhpcatm -lnvcpumath -lnvc endif -$(testmain): $(GTESTLIBS) -$(testmain): INCFLAGS += $(GTESTINC) -$(testmain): LIBFLAGS += -L$(GTESTLIBDIR) -lgtest -lgtest_main ifneq ($(OMPFLAGS),) ifneq ($(shell $(CXX) --version | egrep '^Intel'),) -$(testmain): LIBFLAGS += -liomp5 # see #578 (not '-qopenmp -static-intel' as in https://stackoverflow.com/questions/45909648) +$(testmain): MG_LDFLAGS += -liomp5 # see #578 (not '-qopenmp -static-intel' as in https://stackoverflow.com/questions/45909648) else ifneq ($(shell $(CXX) --version | egrep '^clang'),) -$(testmain): LIBFLAGS += -L $(shell dirname $(shell $(CXX) -print-file-name=libc++.so)) -lomp # see #604 +$(testmain): MG_LDFLAGS += -L $(shell dirname $(shell $(CXX) -print-file-name=libc++.so)) -lomp # see #604 ###else ifneq ($(shell $(CXX) --version | egrep '^Apple clang'),) ###$(testmain): LIBFLAGS += ???? # OMP is not supported yet by cudacpp for Apple clang (see #578 and #604) else -$(testmain): LIBFLAGS += -lgomp +$(testmain): MG_LDFLAGS += -lgomp endif endif -ifeq ($(NVCC),) # link only runTest.o -$(testmain): LIBFLAGS += $(CXXLIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH -$(testmain): $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cxx_objects_lib) $(cxx_objects_exe) $(GTESTLIBS) - $(CXX) -o $@ $(cxx_objects_lib) $(cxx_objects_exe) -ldl -pthread $(LIBFLAGS) -else # link both runTest.o and runTest_cu.o -$(testmain): LIBFLAGS += $(CULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH -$(testmain): $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cxx_objects_lib) $(cxx_objects_exe) $(cu_objects_lib) $(cu_objects_exe) $(GTESTLIBS) - $(NVCC) -o $@ $(cxx_objects_lib) $(cxx_objects_exe) $(cu_objects_lib) $(cu_objects_exe) -ldl $(LIBFLAGS) -lcuda -endif +$(testmain): MG_LDFLAGS += $(CXXLIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH +$(testmain): $(CUDACPP_LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cxx_objects_lib) $(cxx_objects_exe) $(GTESTLIBS) + $(CXX) -o $@ $(cxx_objects_lib) $(cxx_objects_exe) -L$(CUDACPP_LIBDIR) -l$(MG5AMC_COMMONLIB) -ldl -pthread $(MG_LDFLAGS) $(LDFLAGS) + +$(cutestmain): MG_LDFLAGS += $(CULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH +$(cutestmain): $(CUDACPP_LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_objects_lib) $(cu_objects_exe) $(GTESTLIBS) + $(NVCC) -o $@ $(cu_objects_lib) $(cu_objects_exe) -L$(CUDACPP_LIBDIR) -l$(MG5AMC_COMMONLIB) -ldl -lcuda $(MG_LDFLAGS) $(LDFLAGS) # Use target gtestlibs to build only googletest ifneq ($(GTESTLIBS),) @@ -731,72 +324,15 @@ endif # Use flock (Linux only, no Mac) to allow 'make -j' if googletest has not yet been downloaded https://stackoverflow.com/a/32666215 $(GTESTLIBS): ifneq ($(shell which flock 2>/dev/null),) - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - flock $(BUILDDIR)/.make_test.lock $(MAKE) -C $(TESTDIR) + flock $(TESTDIR)/.make_test.lock $(MAKE) -C $(TESTDIR) else if [ -d $(TESTDIR) ]; then $(MAKE) -C $(TESTDIR); fi endif #------------------------------------------------------------------------------- -# Target: build all targets in all AVX modes (each AVX mode in a separate build directory) -# Split the avxall target into five separate targets to allow parallel 'make -j avxall' builds -# (Hack: add a fbridge.inc dependency to avxall, to ensure it is only copied once for all AVX modes) -avxnone: - @echo - $(MAKE) USEBUILDDIR=1 AVX=none -f $(CUDACPP_MAKEFILE) - -avxsse4: - @echo - $(MAKE) USEBUILDDIR=1 AVX=sse4 -f $(CUDACPP_MAKEFILE) - -avxavx2: - @echo - $(MAKE) USEBUILDDIR=1 AVX=avx2 -f $(CUDACPP_MAKEFILE) - -avx512y: - @echo - $(MAKE) USEBUILDDIR=1 AVX=512y -f $(CUDACPP_MAKEFILE) - -avx512z: - @echo - $(MAKE) USEBUILDDIR=1 AVX=512z -f $(CUDACPP_MAKEFILE) - -ifeq ($(UNAME_P),ppc64le) -###avxall: $(INCDIR)/fbridge.inc avxnone avxsse4 -avxall: avxnone avxsse4 -else ifeq ($(UNAME_P),arm) -###avxall: $(INCDIR)/fbridge.inc avxnone avxsse4 -avxall: avxnone avxsse4 -else -###avxall: $(INCDIR)/fbridge.inc avxnone avxsse4 avxavx2 avx512y avx512z -avxall: avxnone avxsse4 avxavx2 avx512y avx512z -endif - -#------------------------------------------------------------------------------- - -# Target: clean the builds -.PHONY: clean - -clean: -ifeq ($(USEBUILDDIR),1) - rm -rf $(BUILDDIR) -else - rm -f $(BUILDDIR)/.build.* $(BUILDDIR)/*.o $(BUILDDIR)/*.exe - rm -f $(LIBDIR)/lib$(MG5AMC_CXXLIB).so $(LIBDIR)/lib$(MG5AMC_CULIB).so -endif - $(MAKE) -C ../../src clean -f $(CUDACPP_SRC_MAKEFILE) -### rm -rf $(INCDIR) - -cleanall: - @echo - $(MAKE) USEBUILDDIR=0 clean -f $(CUDACPP_MAKEFILE) - @echo - $(MAKE) USEBUILDDIR=0 -C ../../src cleanall -f $(CUDACPP_SRC_MAKEFILE) - rm -rf build.* - # Target: clean the builds as well as the gtest installation(s) -distclean: cleanall +distclean: clean cleansrc ifneq ($(wildcard $(TESTDIRCOMMON)),) $(MAKE) -C $(TESTDIRCOMMON) clean endif @@ -848,50 +384,55 @@ endif #------------------------------------------------------------------------------- -# Target: check (run the C++ test executable) +# Target: check/gcheck (run the C++ test executable) # [NB THIS IS WHAT IS USED IN THE GITHUB CI!] -ifneq ($(NVCC),) -check: runTest cmpFcheck cmpFGcheck -else check: runTest cmpFcheck -endif +gcheck: + $(MAKE) AVX=cuda runTest cmpFGcheck # Target: runTest (run the C++ test executable runTest.exe) -runTest: all.$(TAG) - $(RUNTIME) $(BUILDDIR)/runTest.exe +ifneq ($(AVX),cuda) +runTest: cppbuild + $(RUNTIME) $(CUDACPP_BUILDDIR)/runTest.exe +else +runTest: cudabuild + $(RUNTIME) $(CUDACPP_BUILDDIR)/runTest_cuda.exe +endif + # Target: runCheck (run the C++ standalone executable check.exe, with a small number of events) -runCheck: all.$(TAG) - $(RUNTIME) $(BUILDDIR)/check.exe -p 2 32 2 +runCheck: cppbuild + $(RUNTIME) $(CUDACPP_BUILDDIR)/check.exe -p 2 32 2 # Target: runGcheck (run the CUDA standalone executable gcheck.exe, with a small number of events) -runGcheck: all.$(TAG) - $(RUNTIME) $(BUILDDIR)/gcheck.exe -p 2 32 2 +runGcheck: AVX=cuda +runGcheck: + $(MAKE) AVX=cuda cudabuild + $(RUNTIME) $(CUDACPP_BUILDDIR)/gcheck.exe -p 2 32 2 # Target: runFcheck (run the Fortran standalone executable - with C++ MEs - fcheck.exe, with a small number of events) -runFcheck: all.$(TAG) - $(RUNTIME) $(BUILDDIR)/fcheck.exe 2 32 2 +runFcheck: cppbuild + $(RUNTIME) $(CUDACPP_BUILDDIR)/fcheck.exe 2 32 2 # Target: runFGcheck (run the Fortran standalone executable - with CUDA MEs - fgcheck.exe, with a small number of events) -runFGcheck: all.$(TAG) - $(RUNTIME) $(BUILDDIR)/fgcheck.exe 2 32 2 +runFGcheck: AVX=cuda +runFGcheck: + $(MAKE) AVX=cuda cudabuild + $(RUNTIME) $(CUDACPP_BUILDDIR)/fgcheck.exe 2 32 2 # Target: cmpFcheck (compare ME results from the C++ and Fortran with C++ MEs standalone executables, with a small number of events) -cmpFcheck: all.$(TAG) +cmpFcheck: cppbuild @echo - @echo "$(BUILDDIR)/check.exe --common -p 2 32 2" - @echo "$(BUILDDIR)/fcheck.exe 2 32 2" - @me1=$(shell $(RUNTIME) $(BUILDDIR)/check.exe --common -p 2 32 2 | grep MeanMatrix | awk '{print $$4}'); me2=$(shell $(RUNTIME) $(BUILDDIR)/fcheck.exe 2 32 2 | grep Average | awk '{print $$4}'); echo "Avg ME (C++/C++) = $${me1}"; echo "Avg ME (F77/C++) = $${me2}"; if [ "$${me2}" == "NaN" ]; then echo "ERROR! Fortran calculation (F77/C++) returned NaN"; elif [ "$${me2}" == "" ]; then echo "ERROR! Fortran calculation (F77/C++) crashed"; else python3 -c "me1=$${me1}; me2=$${me2}; reldif=abs((me2-me1)/me1); print('Relative difference =', reldif); ok = reldif <= 2E-4; print ( '%%s (relative difference %%s 2E-4)' %% ( ('OK','<=') if ok else ('ERROR','>') ) ); import sys; sys.exit(0 if ok else 1)"; fi + @echo "$(CUDACPP_BUILDDIR)/check.exe --common -p 2 32 2" + @echo "$(CUDACPP_BUILDDIR)/fcheck.exe 2 32 2" + @me1=$(shell $(RUNTIME) $(CUDACPP_BUILDDIR)/check.exe --common -p 2 32 2 | grep MeanMatrix | awk '{print $$4}'); me2=$(shell $(RUNTIME) $(CUDACPP_BUILDDIR)/fcheck.exe 2 32 2 | grep Average | awk '{print $$4}'); echo "Avg ME (C++/C++) = $${me1}"; echo "Avg ME (F77/C++) = $${me2}"; if [ "$${me2}" == "NaN" ]; then echo "ERROR! Fortran calculation (F77/C++) returned NaN"; elif [ "$${me2}" == "" ]; then echo "ERROR! Fortran calculation (F77/C++) crashed"; else python3 -c "me1=$${me1}; me2=$${me2}; reldif=abs((me2-me1)/me1); print('Relative difference =', reldif); ok = reldif <= 2E-4; print ( '%%s (relative difference %%s 2E-4)' %% ( ('OK','<=') if ok else ('ERROR','>') ) ); import sys; sys.exit(0 if ok else 1)"; fi # Target: cmpFGcheck (compare ME results from the CUDA and Fortran with CUDA MEs standalone executables, with a small number of events) -cmpFGcheck: all.$(TAG) +cmpFGcheck: AVX=cuda +cmpFGcheck: + $(MAKE) AVX=cuda cudabuild @echo - @echo "$(BUILDDIR)/gcheck.exe --common -p 2 32 2" - @echo "$(BUILDDIR)/fgcheck.exe 2 32 2" - @me1=$(shell $(RUNTIME) $(BUILDDIR)/gcheck.exe --common -p 2 32 2 | grep MeanMatrix | awk '{print $$4}'); me2=$(shell $(RUNTIME) $(BUILDDIR)/fgcheck.exe 2 32 2 | grep Average | awk '{print $$4}'); echo "Avg ME (C++/CUDA) = $${me1}"; echo "Avg ME (F77/CUDA) = $${me2}"; if [ "$${me2}" == "NaN" ]; then echo "ERROR! Fortran calculation (F77/CUDA) crashed"; elif [ "$${me2}" == "" ]; then echo "ERROR! Fortran calculation (F77/CUDA) crashed"; else python3 -c "me1=$${me1}; me2=$${me2}; reldif=abs((me2-me1)/me1); print('Relative difference =', reldif); ok = reldif <= 2E-4; print ( '%%s (relative difference %%s 2E-4)' %% ( ('OK','<=') if ok else ('ERROR','>') ) ); import sys; sys.exit(0 if ok else 1)"; fi + @echo "$(CUDACPP_BUILDDIR)/gcheck.exe --common -p 2 32 2" + @echo "$(CUDACPP_BUILDDIR)/fgcheck.exe 2 32 2" + @me1=$(shell $(RUNTIME) $(CUDACPP_BUILDDIR)/gcheck.exe --common -p 2 32 2 | grep MeanMatrix | awk '{print $$4}'); me2=$(shell $(RUNTIME) $(CUDACPP_BUILDDIR)/fgcheck.exe 2 32 2 | grep Average | awk '{print $$4}'); echo "Avg ME (C++/CUDA) = $${me1}"; echo "Avg ME (F77/CUDA) = $${me2}"; if [ "$${me2}" == "NaN" ]; then echo "ERROR! Fortran calculation (F77/CUDA) crashed"; elif [ "$${me2}" == "" ]; then echo "ERROR! Fortran calculation (F77/CUDA) crashed"; else python3 -c "me1=$${me1}; me2=$${me2}; reldif=abs((me2-me1)/me1); print('Relative difference =', reldif); ok = reldif <= 2E-4; print ( '%%s (relative difference %%s 2E-4)' %% ( ('OK','<=') if ok else ('ERROR','>') ) ); import sys; sys.exit(0 if ok else 1)"; fi -# Target: memcheck (run the CUDA standalone executable gcheck.exe with a small number of events through cuda-memcheck) -memcheck: all.$(TAG) - $(RUNTIME) $(CUDA_HOME)/bin/cuda-memcheck --check-api-memory-access yes --check-deprecated-instr yes --check-device-heap yes --demangle full --language c --leak-check full --racecheck-report all --report-api-errors all --show-backtrace yes --tool memcheck --track-unused-memory yes $(BUILDDIR)/gcheck.exe -p 2 32 2 - -#------------------------------------------------------------------------------- diff --git a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/cudacpp_src.mk b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/cudacpp_src.mk index 25b6f8f7c8..ce8c2906c6 100644 --- a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/cudacpp_src.mk +++ b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/cudacpp_src.mk @@ -1,12 +1,7 @@ # Copyright (C) 2020-2023 CERN and UCLouvain. # Licensed under the GNU Lesser General Public License (version 3 or later). # Created by: S. Roiser (Feb 2020) for the MG5aMC CUDACPP plugin. -# Further modified by: O. Mattelaer, S. Roiser, A. Valassi (2020-2023) for the MG5aMC CUDACPP plugin. - -#=== Determine the name of this makefile (https://ftp.gnu.org/old-gnu/Manuals/make-3.80/html_node/make_17.html) -#=== NB: assume that the same name (e.g. cudacpp.mk, Makefile...) is used in the Subprocess and src directories - -THISMK = $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)) +# Further modified by: S. Hageboeck, J. Teig, O. Mattelaer, S. Roiser, A. Valassi (2020-2023) for the MG5aMC CUDACPP plugin. #------------------------------------------------------------------------------- @@ -16,165 +11,24 @@ SHELL := /bin/bash #------------------------------------------------------------------------------- -#=== Configure common compiler flags for CUDA and C++ - -INCFLAGS = -I. -OPTFLAGS = -O3 # this ends up in CUFLAGS too (should it?), cannot add -Ofast or -ffast-math here - -#------------------------------------------------------------------------------- - #=== Configure the C++ compiler -CXXFLAGS = $(OPTFLAGS) -std=c++17 $(INCFLAGS) $(USE_NVTX) -fPIC -Wall -Wshadow -Wextra +include ../Source/make_opts + +MG_CXXFLAGS += -fPIC -I. $(USE_NVTX) ifeq ($(shell $(CXX) --version | grep ^nvc++),) -CXXFLAGS+= -ffast-math # see issue #117 +MG_CXXFLAGS += -ffast-math # see issue #117 endif -###CXXFLAGS+= -Ofast # performance is not different from --fast-math -###CXXFLAGS+= -g # FOR DEBUGGING ONLY # Note: AR, CXX and FC are implicitly defined if not set externally # See https://www.gnu.org/software/make/manual/html_node/Implicit-Variables.html ###RANLIB = ranlib -# Add -mmacosx-version-min=11.3 to avoid "ld: warning: object file was built for newer macOS version than being linked" -LDFLAGS = -ifneq ($(shell $(CXX) --version | egrep '^Apple clang'),) -CXXFLAGS += -mmacosx-version-min=11.3 -LDFLAGS += -mmacosx-version-min=11.3 -endif - -#------------------------------------------------------------------------------- - -#=== Configure the CUDA compiler (note: NVCC is already exported including ccache) - -###$(info NVCC=$(NVCC)) - -#------------------------------------------------------------------------------- - -#=== Configure ccache for C++ builds (note: NVCC is already exported including ccache) - -# Enable ccache if USECCACHE=1 -ifeq ($(USECCACHE)$(shell echo $(CXX) | grep ccache),1) - override CXX:=ccache $(CXX) -endif -#ifeq ($(USECCACHE)$(shell echo $(AR) | grep ccache),1) -# override AR:=ccache $(AR) -#endif - -#------------------------------------------------------------------------------- - -#=== Configure PowerPC-specific compiler flags for CUDA and C++ - -# Assuming uname is available, detect if architecture is PowerPC -UNAME_P := $(shell uname -p) - -# PowerPC-specific CXX compiler flags (being reviewed) -ifeq ($(UNAME_P),ppc64le) - CXXFLAGS+= -mcpu=power9 -mtune=power9 # gains ~2-3%% both for none and sse4 - # Throughput references without the extra flags below: none=1.41-1.42E6, sse4=2.15-2.19E6 - ###CXXFLAGS+= -DNO_WARN_X86_INTRINSICS # no change - ###CXXFLAGS+= -fpeel-loops # no change - ###CXXFLAGS+= -funroll-loops # gains ~1%% for none, loses ~1%% for sse4 - ###CXXFLAGS+= -ftree-vectorize # no change - ###CXXFLAGS+= -flto # BUILD ERROR IF THIS ADDED IN SRC?! -else - ###AR=gcc-ar # needed by -flto - ###RANLIB=gcc-ranlib # needed by -flto - ###CXXFLAGS+= -flto # NB: build error from src/Makefile unless gcc-ar and gcc-ranlib are used - ######CXXFLAGS+= -fno-semantic-interposition # no benefit (neither alone, nor combined with -flto) -endif - -#------------------------------------------------------------------------------- - #=== Set the CUDA/C++ compiler flags appropriate to user-defined choices of AVX, FPTYPE, HELINL, HRDCOD, RNDGEN # Set the build flags appropriate to OMPFLAGS ###$(info OMPFLAGS=$(OMPFLAGS)) -CXXFLAGS += $(OMPFLAGS) - -# Set the build flags appropriate to each AVX choice (example: "make AVX=none") -# [NB MGONGPU_PVW512 is needed because "-mprefer-vector-width=256" is not exposed in a macro] -# [See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96476] -$(info AVX=$(AVX)) -ifeq ($(UNAME_P),ppc64le) - ifeq ($(AVX),sse4) - override AVXFLAGS = -D__SSE4_2__ # Power9 VSX with 128 width (VSR registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on PowerPC for the moment) - endif -else ifeq ($(UNAME_P),arm) - ifeq ($(AVX),sse4) - override AVXFLAGS = -D__SSE4_2__ # ARM NEON with 128 width (Q/quadword registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on ARM for the moment) - endif -else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 - ifeq ($(AVX),none) - override AVXFLAGS = -mno-sse3 # no SIMD - else ifeq ($(AVX),sse4) - override AVXFLAGS = -mno-avx # SSE4.2 with 128 width (xmm registers) - else ifeq ($(AVX),avx2) - override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(AVX),512y) - override AVXFLAGS = -march=skylake -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(AVX),512z) - override AVXFLAGS = -march=skylake -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) - else - $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) - endif -else - ifeq ($(AVX),none) - override AVXFLAGS = -march=x86-64 # no SIMD (see #588) - else ifeq ($(AVX),sse4) - override AVXFLAGS = -march=nehalem # SSE4.2 with 128 width (xmm registers) - else ifeq ($(AVX),avx2) - override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(AVX),512y) - override AVXFLAGS = -march=skylake-avx512 -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(AVX),512z) - override AVXFLAGS = -march=skylake-avx512 -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) - endif -endif -# For the moment, use AVXFLAGS everywhere: eventually, use them only in encapsulated implementations? -CXXFLAGS+= $(AVXFLAGS) - -# Set the build flags appropriate to each FPTYPE choice (example: "make FPTYPE=f") -###$(info FPTYPE=$(FPTYPE)) -ifeq ($(FPTYPE),d) - CXXFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_DOUBLE -else ifeq ($(FPTYPE),f) - CXXFLAGS += -DMGONGPU_FPTYPE_FLOAT -DMGONGPU_FPTYPE2_FLOAT -else ifeq ($(FPTYPE),m) - CXXFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_FLOAT -else - $(error Unknown FPTYPE='$(FPTYPE)': only 'd', 'f' and 'm' are supported) -endif - -# Set the build flags appropriate to each HELINL choice (example: "make HELINL=1") -###$(info HELINL=$(HELINL)) -ifeq ($(HELINL),1) - CXXFLAGS += -DMGONGPU_INLINE_HELAMPS -else ifneq ($(HELINL),0) - $(error Unknown HELINL='$(HELINL)': only '0' and '1' are supported) -endif - -# Set the build flags appropriate to each HRDCOD choice (example: "make HRDCOD=1") -###$(info HRDCOD=$(HRDCOD)) -ifeq ($(HRDCOD),1) - CXXFLAGS += -DMGONGPU_HARDCODE_PARAM -else ifneq ($(HRDCOD),0) - $(error Unknown HRDCOD='$(HRDCOD)': only '0' and '1' are supported) -endif - -# Set the build flags appropriate to each RNDGEN choice (example: "make RNDGEN=hasNoCurand") -###$(info RNDGEN=$(RNDGEN)) -ifeq ($(RNDGEN),hasNoCurand) - CXXFLAGS += -DMGONGPU_HAS_NO_CURAND -else ifneq ($(RNDGEN),hasCurand) - $(error Unknown RNDGEN='$(RNDGEN)': only 'hasCurand' and 'hasNoCurand' are supported) -endif +MG_CXXFLAGS += $(OMPFLAGS) #------------------------------------------------------------------------------- @@ -182,28 +36,18 @@ endif # Build directory "short" tag (defines target and path to the optional build directory) # (Rationale: keep directory names shorter, e.g. do not include random number generator choice) -override DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) +DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) # Build lockfile "full" tag (defines full specification of build options that cannot be intermixed) # (Rationale: avoid mixing of CUDA and no-CUDA environment builds with different random number generators) -override TAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) +TAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) -# Build directory: current directory by default, or build.$(DIRTAG) if USEBUILDDIR==1 -###$(info Current directory is $(shell pwd)) -ifeq ($(USEBUILDDIR),1) - override BUILDDIR = build.$(DIRTAG) - override LIBDIRREL = ../lib/$(BUILDDIR) - ###$(info Building in BUILDDIR=$(BUILDDIR) for tag=$(TAG) (USEBUILDDIR=1 is set)) -else - override BUILDDIR = . - override LIBDIRREL = ../lib - ###$(info Building in BUILDDIR=$(BUILDDIR) for tag=$(TAG) (USEBUILDDIR is not set)) -endif -######$(info Building in BUILDDIR=$(BUILDDIR) for tag=$(TAG)) +# Build directory: +BUILDDIR := build.$(DIRTAG) +LIBDIRREL := ../lib/$(BUILDDIR) # Workaround for Mac #375 (I did not manage to fix rpath with @executable_path): use absolute paths for LIBDIR # (NB: this is quite ugly because it creates the directory if it does not exist - to avoid removing src by mistake) -UNAME_S := $(shell uname -s) ifeq ($(UNAME_S),Darwin) override LIBDIR = $(shell mkdir -p $(LIBDIRREL); cd $(LIBDIRREL); pwd) ifeq ($(wildcard $(LIBDIR)),) @@ -223,55 +67,35 @@ endif MG5AMC_COMMONLIB = mg5amc_common # First target (default goal) -all.$(TAG): $(BUILDDIR)/.build.$(TAG) $(LIBDIR)/.build.$(TAG) $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so - -# Target (and build options): debug -debug: OPTFLAGS = -g -O0 -debug: all.$(TAG) - -# Target: tag-specific build lockfiles -override oldtagsb=`if [ -d $(BUILDDIR) ]; then find $(BUILDDIR) -maxdepth 1 -name '.build.*' ! -name '.build.$(TAG)' -exec echo $(shell pwd)/{} \; ; fi` -override oldtagsl=`if [ -d $(LIBDIR) ]; then find $(LIBDIR) -maxdepth 1 -name '.build.*' ! -name '.build.$(TAG)' -exec echo $(shell pwd)/{} \; ; fi` - -$(BUILDDIR)/.build.$(TAG): $(LIBDIR)/.build.$(TAG) - -$(LIBDIR)/.build.$(TAG): - @if [ "$(oldtagsl)" != "" ]; then echo -e "Cannot build for tag=$(TAG) as old builds exist in $(LIBDIR) for other tags:\n$(oldtagsl)\nPlease run 'make clean' first\nIf 'make clean' is not enough: run 'make clean USEBUILDDIR=1 AVX=$(AVX) FPTYPE=$(FPTYPE)' or 'make cleanall'"; exit 1; fi - @if [ "$(oldtagsb)" != "" ]; then echo -e "Cannot build for tag=$(TAG) as old builds exist in $(BUILDDIR) for other tags:\n$(oldtagsb)\nPlease run 'make clean' first\nIf 'make clean' is not enough: run 'make clean USEBUILDDIR=1 AVX=$(AVX) FPTYPE=$(FPTYPE)' or 'make cleanall'"; exit 1; fi - @if [ ! -d $(LIBDIR) ]; then echo "mkdir -p $(LIBDIR)"; mkdir -p $(LIBDIR); fi - @touch $(LIBDIR)/.build.$(TAG) - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - @touch $(BUILDDIR)/.build.$(TAG) +all.$(TAG): $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so #------------------------------------------------------------------------------- # Generic target and build rules: objects from C++ compilation -$(BUILDDIR)/%%.o : %%.cc *.h $(BUILDDIR)/.build.$(TAG) +$(BUILDDIR)/%%.o : %%.cc *.h @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - $(CXX) $(CPPFLAGS) $(CXXFLAGS) -fPIC -c $< -o $@ + $(CXX) $(MG_CXXFLAGS) $(CXXFLAGS) -c $< -o $@ # Generic target and build rules: objects from CUDA compilation -$(BUILDDIR)/%%_cu.o : %%.cc *.h $(BUILDDIR)/.build.$(TAG) +$(BUILDDIR)/%%_cu.o : %%.cc *.h @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c -x cu $< -o $@ + $(NVCC) $(MG_NVCCFLAGS) $(NVCCFLAGS) -c -x cu $< -o $@ #------------------------------------------------------------------------------- cxx_objects=$(addprefix $(BUILDDIR)/, Parameters_%(model)s.o read_slha.o) -ifneq ($(NVCC),) +ifeq ($(AVX),cuda) +COMPILER=$(NVCC) cu_objects=$(addprefix $(BUILDDIR)/, Parameters_%(model)s_cu.o) +else +COMPILER=$(CXX) +cu_objects= endif # Target (and build rules): common (src) library -ifneq ($(NVCC),) $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so : $(cxx_objects) $(cu_objects) - @if [ ! -d $(LIBDIR) ]; then echo "mkdir -p $(LIBDIR)"; mkdir -p $(LIBDIR); fi - $(NVCC) -shared -o $@ $(cxx_objects) $(cu_objects) $(LDFLAGS) -else -$(LIBDIR)/lib$(MG5AMC_COMMONLIB).so : $(cxx_objects) - @if [ ! -d $(LIBDIR) ]; then echo "mkdir -p $(LIBDIR)"; mkdir -p $(LIBDIR); fi - $(CXX) -shared -o $@ $(cxx_objects) $(LDFLAGS) -endif + mkdir -p $(LIBDIR) + $(COMPILER) -shared -o $@ $(cxx_objects) $(cu_objects) $(MG_LDFLAGS) $(LDFLAGS) #------------------------------------------------------------------------------- @@ -279,19 +103,7 @@ endif .PHONY: clean clean: -ifeq ($(USEBUILDDIR),1) - rm -rf $(LIBDIR) - rm -rf $(BUILDDIR) -else - rm -f $(LIBDIR)/.build.* $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so - rm -f $(BUILDDIR)/.build.* $(BUILDDIR)/*.o $(BUILDDIR)/*.exe -endif - -cleanall: - @echo - $(MAKE) clean -f $(THISMK) - @echo - rm -rf $(LIBDIR)/build.* - rm -rf build.* + $(RM) -f ../lib/build.*/*.so + $(RM) -rf build.* #------------------------------------------------------------------------------- From 8715ca364312913fc8fdc51b0731188ac9139054 Mon Sep 17 00:00:00 2001 From: Stephan Hageboeck Date: Fri, 24 Nov 2023 16:19:06 +0100 Subject: [PATCH 100/129] [CODEGEN] Fix compiler warnings. With the overhaul of the makefiles, files that were erroneously compiled without warnings enabled are now compiled correctly. Here, the corresponding warnings are fixed to clean up the builds. The warnings fixed are: - A function that might finish without returning a value in counters.cc - Two warnings in Bridge.h - An unused argument in check_sa - Two warnings in testxxx --- .../CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/counters.cc | 2 ++ .../madgraph/iolibs/template_files/gpu/Bridge.h | 4 ++-- .../madgraph/iolibs/template_files/gpu/check_sa.cc | 2 +- .../madgraph/iolibs/template_files/gpu/testxxx.cc | 9 ++++----- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/counters.cc b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/counters.cc index 3bbdec9387..cf875e8be4 100644 --- a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/counters.cc +++ b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/counters.cc @@ -32,6 +32,8 @@ extern "C" case +0: return "CudaCpp"; break; default: assert( false ); break; } + + return 0; } static mgOnGpu::Timer program_timer; diff --git a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/Bridge.h b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/Bridge.h index bf8b5e024d..c263f39a62 100644 --- a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/Bridge.h +++ b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/Bridge.h @@ -236,7 +236,7 @@ namespace mg5amcCpu #ifdef __CUDACC__ if( ( m_nevt < s_gputhreadsmin ) || ( m_nevt % s_gputhreadsmin != 0 ) ) throw std::runtime_error( "Bridge constructor: nevt should be a multiple of " + std::to_string( s_gputhreadsmin ) ); - while( m_nevt != m_gpublocks * m_gputhreads ) + while( m_nevt != static_cast( m_gpublocks * m_gputhreads ) ) { m_gputhreads /= 2; if( m_gputhreads < s_gputhreadsmin ) @@ -266,7 +266,7 @@ namespace mg5amcCpu template void Bridge::set_gpugrid( const int gpublocks, const int gputhreads ) { - if( m_nevt != gpublocks * gputhreads ) + if( m_nevt != static_cast( gpublocks * gputhreads ) ) throw std::runtime_error( "Bridge: gpublocks*gputhreads must equal m_nevt in set_gpugrid" ); m_gpublocks = gpublocks; m_gputhreads = gputhreads; diff --git a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/check_sa.cc b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/check_sa.cc index 3fbf0ffbee..07b7304b17 100644 --- a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/check_sa.cc +++ b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/check_sa.cc @@ -81,7 +81,7 @@ namespace mg5amcGpu namespace mg5amcCpu #endif { - inline void FPEhandler( int sig ) + inline void FPEhandler( int ) { #ifdef __CUDACC__ std::cerr << "Floating Point Exception (GPU)" << std::endl; diff --git a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/testxxx.cc b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/testxxx.cc index 2d1578cb43..4f4f658fa3 100644 --- a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/testxxx.cc +++ b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/testxxx.cc @@ -40,7 +40,7 @@ namespace mg5amcCpu { std::string FPEhandlerMessage = "unknown"; int FPEhandlerIevt = -1; - inline void FPEhandler( int sig ) + inline void FPEhandler( int ) { #ifdef __CUDACC__ std::cerr << "Floating Point Exception (GPU): '" << FPEhandlerMessage << "' ievt=" << FPEhandlerIevt << std::endl; @@ -71,11 +71,10 @@ TEST( XTESTID( MG_EPOCH_PROCESS_ID ), testxxx ) constexpr bool testEvents = !dumpEvents; // run the test? constexpr fptype toleranceXXXs = std::is_same::value ? 1.E-15 : 1.E-5; // Constant parameters - constexpr int neppM = MemoryAccessMomenta::neppM; // AOSOA layout constexpr int np4 = CPPProcess::np4; - const int nevt = 32; // 12 independent tests plus 20 duplicates (need a multiple of 16 for floats '512z') - assert( nevt %% neppM == 0 ); // nevt must be a multiple of neppM - assert( nevt %% neppV == 0 ); // nevt must be a multiple of neppV + const int nevt = 32; // 12 independent tests plus 20 duplicates (need a multiple of 16 for floats '512z') + assert( nevt %% MemoryAccessMomenta::neppM == 0 ); // nevt must be a multiple of neppM + assert( nevt %% neppV == 0 ); // nevt must be a multiple of neppV // Fill in the input momenta #ifdef __CUDACC__ mg5amcGpu::PinnedHostBufferMomenta hstMomenta( nevt ); // AOSOA[npagM][npar=4][np4=4][neppM] From 58b3ab639bc87a76033f670a54e8bc0229c6141f Mon Sep 17 00:00:00 2001 From: Stephan Hageboeck Date: Fri, 8 Sep 2023 12:34:34 +0200 Subject: [PATCH 101/129] [CODEGEN] Protect clang-specific pragmas from other compilers. Port of 0212f8b87. signed-unsigned warnings. --- .../madgraph/iolibs/template_files/gpu/mgOnGpuCxtypes.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/mgOnGpuCxtypes.h b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/mgOnGpuCxtypes.h index ca9a9f00c0..3290d314d6 100644 --- a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/mgOnGpuCxtypes.h +++ b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/mgOnGpuCxtypes.h @@ -21,10 +21,14 @@ // Complex type in cuda: thrust or cucomplex or cxsmpl #ifdef __CUDACC__ #if defined MGONGPU_CUCXTYPE_THRUST +#ifdef __CLANG__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" // for icpx2021/clang13 (https://stackoverflow.com/a/15864661) +#endif #include +#ifdef __CLANG__ #pragma clang diagnostic pop +#endif #elif defined MGONGPU_CUCXTYPE_CUCOMPLEX #include #elif not defined MGONGPU_CUCXTYPE_CXSMPL From a2093c69efa955c6446d108f8662a19fb5391cd3 Mon Sep 17 00:00:00 2001 From: Stephan Hageboeck Date: Fri, 24 Nov 2023 16:37:56 +0100 Subject: [PATCH 102/129] [CODEGEN] Fix MatrixElementKernelDevice::setGrid() Now that warnings are enabled throughout mg4gpu, it is apparent that the setGrid function was always ignoring all arguments. It now honours the grid that's set from outside, but it might throw in case the grid isn't aligned to the device. --- .../madgraph/iolibs/template_files/gpu/MatrixElementKernels.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/MatrixElementKernels.cc b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/MatrixElementKernels.cc index 74b5239ebf..2d6f27cd5d 100644 --- a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/MatrixElementKernels.cc +++ b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/MatrixElementKernels.cc @@ -196,6 +196,9 @@ namespace mg5amcGpu void MatrixElementKernelDevice::setGrid( const int gpublocks, const int gputhreads ) { + m_gpublocks = gpublocks; + m_gputhreads = gputhreads; + if( m_gpublocks == 0 ) throw std::runtime_error( "MatrixElementKernelDevice: gpublocks must be > 0 in setGrid" ); if( m_gputhreads == 0 ) throw std::runtime_error( "MatrixElementKernelDevice: gputhreads must be > 0 in setGrid" ); if( this->nevt() != m_gpublocks * m_gputhreads ) throw std::runtime_error( "MatrixElementKernelDevice: nevt mismatch in setGrid" ); From eec9d56efe23d85c929a793fc5c256161f21b996 Mon Sep 17 00:00:00 2001 From: Stephan Hageboeck Date: Tue, 28 Nov 2023 11:33:40 +0100 Subject: [PATCH 103/129] [CODEGEN] Instantiate madgraph test cases also for CUDA builds. Now that C++ and cuda build folders are separate, the test cases have to be instantiated on every compiler pass. --- .../madgraph/iolibs/template_files/gpu/MadgraphTest.h | 6 ------ 1 file changed, 6 deletions(-) diff --git a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/MadgraphTest.h b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/MadgraphTest.h index ef40624c88..b0f2250c25 100644 --- a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/MadgraphTest.h +++ b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/MadgraphTest.h @@ -199,10 +199,6 @@ class MadgraphTest : public testing::TestWithParam } }; -// Since we link both the CPU-only and GPU tests into the same executable, we prevent -// a multiply defined symbol by only compiling this in the non-CUDA phase: -#ifndef __CUDACC__ - /// Compare momenta and matrix elements. /// This uses an implementation of TestDriverBase to run a madgraph workflow, /// and compares momenta and matrix elements with a reference file. @@ -307,6 +303,4 @@ TEST_P( MadgraphTest, CompareMomentaAndME ) } } -#endif // __CUDACC__ - #endif /* MADGRAPHTEST_H_ */ From 7452bbeb6628487b6c55e154564eb5411d99836c Mon Sep 17 00:00:00 2001 From: Stephan Hageboeck Date: Tue, 28 Nov 2023 17:24:14 +0100 Subject: [PATCH 104/129] [CODEGEN] Apply clang-format to runTest.cc clang-format 16 was not accepting the macros at the end of runTest.cc --- .../madgraph/iolibs/template_files/gpu/runTest.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/runTest.cc b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/runTest.cc index d4a760a71b..734235824a 100644 --- a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/runTest.cc +++ b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/runTest.cc @@ -246,15 +246,15 @@ struct CUDATest : public CUDA_CPU_TestBase #define TESTID_CPU( s ) s##_CPU #define XTESTID_CPU( s ) TESTID_CPU( s ) #define MG_INSTANTIATE_TEST_SUITE_CPU( prefix, test_suite_name ) \ -INSTANTIATE_TEST_SUITE_P( prefix, \ - test_suite_name, \ - testing::Values( new CPUTest( MG_EPOCH_REFERENCE_FILE_NAME ) ) ); + INSTANTIATE_TEST_SUITE_P( prefix, \ + test_suite_name, \ + testing::Values( new CPUTest( MG_EPOCH_REFERENCE_FILE_NAME ) ) ); #define TESTID_GPU( s ) s##_GPU #define XTESTID_GPU( s ) TESTID_GPU( s ) #define MG_INSTANTIATE_TEST_SUITE_GPU( prefix, test_suite_name ) \ -INSTANTIATE_TEST_SUITE_P( prefix, \ - test_suite_name, \ - testing::Values( new CUDATest( MG_EPOCH_REFERENCE_FILE_NAME ) ) ); + INSTANTIATE_TEST_SUITE_P( prefix, \ + test_suite_name, \ + testing::Values( new CUDATest( MG_EPOCH_REFERENCE_FILE_NAME ) ) ); #ifdef __CUDACC__ MG_INSTANTIATE_TEST_SUITE_GPU( XTESTID_GPU( MG_EPOCH_PROCESS_ID ), MadgraphTest ); From 99c275863239ad60c0a944e9183c871c668ca2bc Mon Sep 17 00:00:00 2001 From: Stephan Hageboeck Date: Thu, 30 Nov 2023 15:58:47 +0100 Subject: [PATCH 105/129] [CODEGEN] Remove level 0 pre-patches from generateAndCompare In order to generate a correct patch for madgraph4gpu, the generated code cannot be patched. Therefore, the pre-patch step is removed here. The desired change (-O3 -ffast-math -fbounds-check) is absorbed into patch.common --- epochX/cudacpp/CODEGEN/generateAndCompare.sh | 7 ------- 1 file changed, 7 deletions(-) diff --git a/epochX/cudacpp/CODEGEN/generateAndCompare.sh b/epochX/cudacpp/CODEGEN/generateAndCompare.sh index f3f830205c..77c9448ef6 100755 --- a/epochX/cudacpp/CODEGEN/generateAndCompare.sh +++ b/epochX/cudacpp/CODEGEN/generateAndCompare.sh @@ -236,13 +236,6 @@ function codeGenAndDiff() \rm -rf ${outproc}/bin/internal/ufomodel/py3_model.pkl \rm -rf ${outproc}/bin/internal/ufomodel/__pycache__ touch ${outproc}/HTML/.keep # new file - if [ "${patchlevel}" != "0" ]; then - # Add global flag '-O3 -ffast-math -fbounds-check' as in previous gridpacks - # (FIXME? these flags are already set in the runcards, why are they not propagated to make_opts?) - echo "GLOBAL_FLAG=-O3 -ffast-math -fbounds-check" > ${outproc}/Source/make_opts.new - cat ${outproc}/Source/make_opts >> ${outproc}/Source/make_opts.new - \mv ${outproc}/Source/make_opts.new ${outproc}/Source/make_opts - fi if [ "${patchlevel}" == "2" ]; then sed -i 's/DEFAULT_F2PY_COMPILER=f2py.*/DEFAULT_F2PY_COMPILER=f2py3/' ${outproc}/Source/make_opts cat ${outproc}/Source/make_opts | sed '/#end/q' | head --lines=-1 | sort > ${outproc}/Source/make_opts.new From c85de5d304e13bf7d5f97eb1f2bd5ca676e6def6 Mon Sep 17 00:00:00 2001 From: Stephan Hageboeck Date: Wed, 13 Dec 2023 13:42:33 +0100 Subject: [PATCH 106/129] [CODEGEN] Make mixed-precision computations the default. Zenny's and Filips work showed that the colour matrix can run in single precision without impact on the results. Make this the default in the makefiles now. --- .../PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common index b2978b4459..c130652f58 100644 --- a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common +++ b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common @@ -314,7 +314,7 @@ index 2607530b7..7b87725d9 100644 +#=== C++/CUDA-specific flags for floating-point types and random generators to use + +# Set the default FPTYPE (floating point type) choice -+FPTYPE ?= d ++FPTYPE ?= m + +# Set the default HELINL (inline helicities?) choice +HELINL ?= 0 From 23d6470b90230f39d599ff745964384619f088af Mon Sep 17 00:00:00 2001 From: Stephan Hageboeck Date: Wed, 13 Dec 2023 14:26:09 +0100 Subject: [PATCH 107/129] [CODEGEN] Refine clean targets. - clean will now also remove build directories when they are empty. - cleanall will also invoke cleansrc to clean the source directory. --- .../CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common index c130652f58..3b5eee9321 100644 --- a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common +++ b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common @@ -605,7 +605,7 @@ index 348c283be..4cadaecf0 100644 -gensym: $(SYMMETRY) configs.inc $(LIBS) - $(FC) -o gensym $(SYMMETRY) -L../../lib/ $(LINKLIBS) $(LDFLAGS) -+.PHONY: madevent_fortran_link madevent_cuda_link madevent_cpp_link madevent_cppnone_link madevent_cppsse4_link madevent_cppavx2_link madevent_cpp512y_link madevent_cpp512z_link ++.PHONY: madevent_fortran_link madevent_cuda_link madevent_cpp_link madevent_cppnone_link madevent_cppsse4_link madevent_cppavx2_link madevent_cpp512y_link madevent_cpp512z_link clean cleanall cleansrc + +madevent_fortran_link: $(PROG)_fortran + rm -f $(PROG) @@ -671,7 +671,7 @@ index 348c283be..4cadaecf0 100644 # Dependencies -@@ -97,5 +196,42 @@ unwgt.o: genps.inc nexternal.inc symswap.inc cluster.inc run.inc message.inc \ +@@ -97,5 +196,43 @@ unwgt.o: genps.inc nexternal.inc symswap.inc cluster.inc run.inc message.inc \ run_config.inc initcluster.o: message.inc @@ -701,13 +701,14 @@ index 348c283be..4cadaecf0 100644 - $(RM) *.o gensym madevent madevent_forhel + $(RM) *.o gensym $(PROG) $(PROG)_* + $(RM) -rf build.*/*{.o,.so,.exe,.dylib,madevent_*} ++ @for dir in build.*; do if [ -z "$$(ls -A $${dir})" ]; then rm -r $${dir}; else echo "Not cleaning $${dir}; not empty"; fi; done + -+cleanall: ++cleanall: cleansrc + for PROCESS in ../P[0-9]*; do $(MAKE) -C $${PROCESS} clean; done + +# Clean one architecture-specific build +clean%: -+ $(RM) -r build.$*_*/*{.o,.so,.exe,.dylib,madevent_*} ++ $(RM) -r build.$*_* + +# Clean common source directories (interferes with other P*) +cleansrc: From 1904d74d2b97e03c1795a9f61b56e72f195cc1d5 Mon Sep 17 00:00:00 2001 From: Stephan Hageboeck Date: Tue, 28 Nov 2023 17:28:11 +0100 Subject: [PATCH 108/129] Regenerate all *.mad processes. --- .../ee_mumu.mad/CODEGEN_mad_ee_mumu_log.txt | 85 +- .../ee_mumu.mad/Cards/delphes_trigger.dat | 20 - .../cudacpp/ee_mumu.mad/Cards/ident_card.dat | 28 +- .../ee_mumu.mad/Cards/me5_configuration.txt | 4 +- .../cudacpp/ee_mumu.mad/Cards/plot_card.dat | 203 -- .../ee_mumu.mad/Source/DHELAS/FFV4_0.f | 8 +- .../ee_mumu.mad/Source/DHELAS/FFV4_3.f | 12 +- .../ee_mumu.mad/Source/DHELAS/aloha_file.inc | 6 - epochX/cudacpp/ee_mumu.mad/Source/make_opts | 286 ++- epochX/cudacpp/ee_mumu.mad/Source/makefile | 45 +- .../cudacpp/ee_mumu.mad/SubProcesses/Bridge.h | 4 +- .../ee_mumu.mad/SubProcesses/MadgraphTest.h | 6 - .../SubProcesses/MatrixElementKernels.cc | 3 + .../SubProcesses/P1_epem_mupmum/check_sa.cc | 2 +- .../{ => P1_epem_mupmum}/counters.cc | 5 +- .../counters.cc~madgraph_master | 98 - .../P1_epem_mupmum/ompnumthreads.cc | 26 +- .../ee_mumu.mad/SubProcesses/cudacpp.mk | 811 ++----- .../cudacpp/ee_mumu.mad/SubProcesses/makefile | 236 +- .../ee_mumu.mad/SubProcesses/ompnumthreads.cc | 25 - .../SubProcesses/proc_characteristics | 2 +- .../ee_mumu.mad/SubProcesses/runTest.cc | 12 +- .../ee_mumu.mad/SubProcesses/testxxx.cc | 9 +- .../ee_mumu.mad/bin/internal/banner.py | 1 - .../ee_mumu.mad/bin/internal/launch_plugin.py | 4 +- .../bin/internal/madevent_interface.py | 2124 ++++++++--------- .../cudacpp/ee_mumu.mad/bin/internal/run_plot | 47 - .../ee_mumu.mad/bin/internal/run_plot_delphes | 46 - .../ee_mumu.mad/bin/internal/run_plot_pgs | 47 - .../ee_mumu.mad/bin/internal/run_plot_pythia | 50 - epochX/cudacpp/ee_mumu.mad/src/cudacpp_src.mk | 269 +-- .../cudacpp/ee_mumu.mad/src/mgOnGpuCxtypes.h | 4 + .../gg_tt.mad/CODEGEN_mad_gg_tt_log.txt | 82 +- .../gg_tt.mad/Cards/delphes_trigger.dat | 20 - .../gg_tt.mad/Cards/me5_configuration.txt | 4 +- epochX/cudacpp/gg_tt.mad/Cards/plot_card.dat | 203 -- .../gg_tt.mad/Source/DHELAS/aloha_file.inc | 2 +- epochX/cudacpp/gg_tt.mad/Source/make_opts | 286 ++- epochX/cudacpp/gg_tt.mad/Source/makefile | 45 +- .../cudacpp/gg_tt.mad/SubProcesses/Bridge.h | 4 +- .../gg_tt.mad/SubProcesses/MadgraphTest.h | 6 - .../SubProcesses/MatrixElementKernels.cc | 3 + .../SubProcesses/P1_gg_ttx/check_sa.cc | 2 +- .../SubProcesses/P1_gg_ttx/counters.cc | 2 + .../cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk | 811 ++----- .../cudacpp/gg_tt.mad/SubProcesses/makefile | 236 +- .../cudacpp/gg_tt.mad/SubProcesses/runTest.cc | 12 +- .../cudacpp/gg_tt.mad/SubProcesses/testxxx.cc | 9 +- .../cudacpp/gg_tt.mad/bin/internal/banner.py | 1446 +++++------ .../gg_tt.mad/bin/internal/gen_ximprove.py | 814 +++---- .../bin/internal/madevent_interface.py | 2124 ++++++++--------- .../cudacpp/gg_tt.mad/bin/internal/run_plot | 47 - .../gg_tt.mad/bin/internal/run_plot_delphes | 46 - .../gg_tt.mad/bin/internal/run_plot_pgs | 47 - .../gg_tt.mad/bin/internal/run_plot_pythia | 50 - epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk | 269 +-- epochX/cudacpp/gg_tt.mad/src/mgOnGpuCxtypes.h | 4 + .../gg_tt01g.mad/CODEGEN_mad_gg_tt01g_log.txt | 92 +- .../gg_tt01g.mad/Cards/me5_configuration.txt | 4 +- epochX/cudacpp/gg_tt01g.mad/Source/make_opts | 286 ++- epochX/cudacpp/gg_tt01g.mad/Source/makefile | 45 +- .../gg_tt01g.mad/SubProcesses/Bridge.h | 4 +- .../gg_tt01g.mad/SubProcesses/MadgraphTest.h | 6 - .../SubProcesses/MatrixElementKernels.cc | 3 + .../SubProcesses/P1_gg_ttx/check_sa.cc | 2 +- .../SubProcesses/P1_gg_ttx/counters.cc | 2 + .../SubProcesses/P2_gg_ttxg/check_sa.cc | 2 +- .../SubProcesses/P2_gg_ttxg/counters.cc | 2 + .../gg_tt01g.mad/SubProcesses/cudacpp.mk | 811 ++----- .../gg_tt01g.mad/SubProcesses/makefile | 236 +- .../gg_tt01g.mad/SubProcesses/runTest.cc | 12 +- .../gg_tt01g.mad/SubProcesses/testxxx.cc | 9 +- .../gg_tt01g.mad/bin/internal/banner.py | 1446 +++++------ .../gg_tt01g.mad/bin/internal/gen_ximprove.py | 814 +++---- .../bin/internal/madevent_interface.py | 2124 ++++++++--------- .../cudacpp/gg_tt01g.mad/src/cudacpp_src.mk | 238 +- .../cudacpp/gg_tt01g.mad/src/mgOnGpuCxtypes.h | 4 + .../gg_ttg.mad/CODEGEN_mad_gg_ttg_log.txt | 82 +- .../gg_ttg.mad/Cards/delphes_trigger.dat | 20 - .../gg_ttg.mad/Cards/me5_configuration.txt | 4 +- epochX/cudacpp/gg_ttg.mad/Cards/plot_card.dat | 203 -- .../gg_ttg.mad/Source/DHELAS/aloha_file.inc | 2 +- epochX/cudacpp/gg_ttg.mad/Source/make_opts | 286 ++- epochX/cudacpp/gg_ttg.mad/Source/makefile | 45 +- .../cudacpp/gg_ttg.mad/SubProcesses/Bridge.h | 4 +- .../gg_ttg.mad/SubProcesses/MadgraphTest.h | 6 - .../SubProcesses/MatrixElementKernels.cc | 3 + .../SubProcesses/P1_gg_ttxg/check_sa.cc | 2 +- .../SubProcesses/P1_gg_ttxg/counters.cc | 2 + .../gg_ttg.mad/SubProcesses/cudacpp.mk | 811 ++----- .../cudacpp/gg_ttg.mad/SubProcesses/makefile | 236 +- .../gg_ttg.mad/SubProcesses/runTest.cc | 12 +- .../gg_ttg.mad/SubProcesses/testxxx.cc | 9 +- .../cudacpp/gg_ttg.mad/bin/internal/banner.py | 1446 +++++------ .../gg_ttg.mad/bin/internal/gen_ximprove.py | 814 +++---- .../bin/internal/madevent_interface.py | 2124 ++++++++--------- .../cudacpp/gg_ttg.mad/bin/internal/run_plot | 47 - .../gg_ttg.mad/bin/internal/run_plot_delphes | 46 - .../gg_ttg.mad/bin/internal/run_plot_pgs | 47 - .../gg_ttg.mad/bin/internal/run_plot_pythia | 50 - epochX/cudacpp/gg_ttg.mad/src/cudacpp_src.mk | 269 +-- .../cudacpp/gg_ttg.mad/src/mgOnGpuCxtypes.h | 4 + .../gg_ttgg.mad/CODEGEN_mad_gg_ttgg_log.txt | 86 +- .../gg_ttgg.mad/Cards/delphes_trigger.dat | 20 - .../gg_ttgg.mad/Cards/me5_configuration.txt | 4 +- .../cudacpp/gg_ttgg.mad/Cards/plot_card.dat | 203 -- .../gg_ttgg.mad/Source/DHELAS/aloha_file.inc | 2 +- epochX/cudacpp/gg_ttgg.mad/Source/make_opts | 286 ++- epochX/cudacpp/gg_ttgg.mad/Source/makefile | 45 +- .../cudacpp/gg_ttgg.mad/SubProcesses/Bridge.h | 4 +- .../gg_ttgg.mad/SubProcesses/MadgraphTest.h | 6 - .../SubProcesses/MatrixElementKernels.cc | 3 + .../SubProcesses/P1_gg_ttxgg/check_sa.cc | 2 +- .../SubProcesses/P1_gg_ttxgg/counters.cc | 2 + .../gg_ttgg.mad/SubProcesses/cudacpp.mk | 811 ++----- .../cudacpp/gg_ttgg.mad/SubProcesses/makefile | 236 +- .../gg_ttgg.mad/SubProcesses/runTest.cc | 12 +- .../gg_ttgg.mad/SubProcesses/testxxx.cc | 9 +- .../gg_ttgg.mad/bin/internal/banner.py | 1446 +++++------ .../gg_ttgg.mad/bin/internal/gen_ximprove.py | 814 +++---- .../bin/internal/madevent_interface.py | 2124 ++++++++--------- .../cudacpp/gg_ttgg.mad/bin/internal/run_plot | 47 - .../gg_ttgg.mad/bin/internal/run_plot_delphes | 46 - .../gg_ttgg.mad/bin/internal/run_plot_pgs | 47 - .../gg_ttgg.mad/bin/internal/run_plot_pythia | 50 - epochX/cudacpp/gg_ttgg.mad/src/cudacpp_src.mk | 269 +-- .../cudacpp/gg_ttgg.mad/src/mgOnGpuCxtypes.h | 4 + .../gg_ttggg.mad/CODEGEN_mad_gg_ttggg_log.txt | 88 +- .../gg_ttggg.mad/Cards/delphes_trigger.dat | 20 - .../gg_ttggg.mad/Cards/me5_configuration.txt | 4 +- .../cudacpp/gg_ttggg.mad/Cards/plot_card.dat | 203 -- .../gg_ttggg.mad/Source/DHELAS/aloha_file.inc | 2 +- epochX/cudacpp/gg_ttggg.mad/Source/make_opts | 286 ++- epochX/cudacpp/gg_ttggg.mad/Source/makefile | 45 +- .../gg_ttggg.mad/SubProcesses/Bridge.h | 4 +- .../gg_ttggg.mad/SubProcesses/MadgraphTest.h | 6 - .../SubProcesses/MatrixElementKernels.cc | 3 + .../SubProcesses/P1_gg_ttxggg/check_sa.cc | 2 +- .../SubProcesses/P1_gg_ttxggg/counters.cc | 2 + .../gg_ttggg.mad/SubProcesses/cudacpp.mk | 811 ++----- .../gg_ttggg.mad/SubProcesses/makefile | 236 +- .../gg_ttggg.mad/SubProcesses/runTest.cc | 12 +- .../gg_ttggg.mad/SubProcesses/testxxx.cc | 9 +- .../gg_ttggg.mad/bin/internal/banner.py | 1446 +++++------ .../gg_ttggg.mad/bin/internal/gen_ximprove.py | 814 +++---- .../bin/internal/madevent_interface.py | 2124 ++++++++--------- .../gg_ttggg.mad/bin/internal/run_plot | 47 - .../bin/internal/run_plot_delphes | 46 - .../gg_ttggg.mad/bin/internal/run_plot_pgs | 47 - .../gg_ttggg.mad/bin/internal/run_plot_pythia | 50 - .../cudacpp/gg_ttggg.mad/src/cudacpp_src.mk | 269 +-- .../cudacpp/gg_ttggg.mad/src/mgOnGpuCxtypes.h | 4 + .../gq_ttq.mad/CODEGEN_mad_gq_ttq_log.txt | 98 +- .../gq_ttq.mad/Cards/delphes_trigger.dat | 20 - .../gq_ttq.mad/Cards/me5_configuration.txt | 4 +- epochX/cudacpp/gq_ttq.mad/Cards/plot_card.dat | 203 -- .../gq_ttq.mad/Source/DHELAS/aloha_file.inc | 2 +- epochX/cudacpp/gq_ttq.mad/Source/make_opts | 286 ++- epochX/cudacpp/gq_ttq.mad/Source/makefile | 45 +- .../cudacpp/gq_ttq.mad/SubProcesses/Bridge.h | 4 +- .../gq_ttq.mad/SubProcesses/MadgraphTest.h | 6 - .../SubProcesses/MatrixElementKernels.cc | 3 + .../SubProcesses/P1_gu_ttxu/check_sa.cc | 2 +- .../SubProcesses/P1_gu_ttxu/counters.cc | 2 + .../SubProcesses/P1_gux_ttxux/check_sa.cc | 2 +- .../SubProcesses/P1_gux_ttxux/counters.cc | 2 + .../gq_ttq.mad/SubProcesses/cudacpp.mk | 811 ++----- .../cudacpp/gq_ttq.mad/SubProcesses/makefile | 236 +- .../gq_ttq.mad/SubProcesses/runTest.cc | 12 +- .../gq_ttq.mad/SubProcesses/testxxx.cc | 9 +- .../cudacpp/gq_ttq.mad/bin/internal/banner.py | 1446 +++++------ .../gq_ttq.mad/bin/internal/gen_ximprove.py | 814 +++---- .../bin/internal/madevent_interface.py | 2124 ++++++++--------- .../cudacpp/gq_ttq.mad/bin/internal/run_plot | 47 - .../gq_ttq.mad/bin/internal/run_plot_delphes | 46 - .../gq_ttq.mad/bin/internal/run_plot_pgs | 47 - .../gq_ttq.mad/bin/internal/run_plot_pythia | 50 - .../cudacpp/gq_ttq.mad/src/Parameters_sm.cc | 4 +- epochX/cudacpp/gq_ttq.mad/src/Parameters_sm.h | 18 +- epochX/cudacpp/gq_ttq.mad/src/cudacpp_src.mk | 269 +-- .../cudacpp/gq_ttq.mad/src/mgOnGpuCxtypes.h | 4 + .../CODEGEN_mad_pp_tt012j_log.txt | 286 +-- .../pp_tt012j.mad/Cards/delphes_trigger.dat | 20 - .../pp_tt012j.mad/Cards/me5_configuration.txt | 44 +- .../cudacpp/pp_tt012j.mad/Cards/plot_card.dat | 203 -- .../Source/DHELAS/aloha_file.inc | 2 +- .../cudacpp/pp_tt012j.mad/Source/PDF/makefile | 2 +- epochX/cudacpp/pp_tt012j.mad/Source/make_opts | 27 +- .../pp_tt012j.mad/SubProcesses/Bridge.h | 2 +- .../SubProcesses/MatrixElementKernels.cc | 3 + .../SubProcesses/P0_gg_ttx/check_sa.cc | 2 +- .../SubProcesses/P0_gg_ttx/counters.cc | 2 + .../SubProcesses/P0_uux_ttx/check_sa.cc | 2 +- .../SubProcesses/P0_uux_ttx/counters.cc | 2 + .../SubProcesses/P1_gg_ttxg/check_sa.cc | 2 +- .../SubProcesses/P1_gg_ttxg/counters.cc | 2 + .../SubProcesses/P1_gu_ttxu/check_sa.cc | 2 +- .../SubProcesses/P1_gu_ttxu/counters.cc | 2 + .../SubProcesses/P1_gux_ttxux/check_sa.cc | 2 +- .../SubProcesses/P1_gux_ttxux/counters.cc | 2 + .../SubProcesses/P1_uux_ttxg/check_sa.cc | 2 +- .../SubProcesses/P1_uux_ttxg/counters.cc | 2 + .../SubProcesses/P2_gg_ttxgg/check_sa.cc | 2 +- .../SubProcesses/P2_gg_ttxgg/counters.cc | 2 + .../SubProcesses/P2_gg_ttxuux/check_sa.cc | 2 +- .../SubProcesses/P2_gg_ttxuux/counters.cc | 2 + .../SubProcesses/P2_gu_ttxgu/check_sa.cc | 2 +- .../SubProcesses/P2_gu_ttxgu/counters.cc | 2 + .../SubProcesses/P2_gux_ttxgux/check_sa.cc | 2 +- .../SubProcesses/P2_gux_ttxgux/counters.cc | 2 + .../SubProcesses/P2_uc_ttxuc/check_sa.cc | 2 +- .../SubProcesses/P2_uc_ttxuc/counters.cc | 2 + .../SubProcesses/P2_ucx_ttxucx/check_sa.cc | 2 +- .../SubProcesses/P2_ucx_ttxucx/counters.cc | 2 + .../SubProcesses/P2_uu_ttxuu/check_sa.cc | 2 +- .../SubProcesses/P2_uu_ttxuu/counters.cc | 2 + .../SubProcesses/P2_uux_ttxccx/check_sa.cc | 2 +- .../SubProcesses/P2_uux_ttxccx/counters.cc | 2 + .../SubProcesses/P2_uux_ttxgg/check_sa.cc | 2 +- .../SubProcesses/P2_uux_ttxgg/counters.cc | 2 + .../SubProcesses/P2_uux_ttxuux/check_sa.cc | 2 +- .../SubProcesses/P2_uux_ttxuux/counters.cc | 2 + .../SubProcesses/P2_uxcx_ttxuxcx/check_sa.cc | 2 +- .../SubProcesses/P2_uxcx_ttxuxcx/counters.cc | 2 + .../SubProcesses/P2_uxux_ttxuxux/check_sa.cc | 2 +- .../SubProcesses/P2_uxux_ttxuxux/counters.cc | 2 + .../pp_tt012j.mad/SubProcesses/cudacpp.mk | 2 +- .../pp_tt012j.mad/SubProcesses/makefile | 7 +- .../pp_tt012j.mad/SubProcesses/runTest.cc | 12 +- .../pp_tt012j.mad/SubProcesses/testxxx.cc | 9 +- .../bin/internal/launch_plugin.py | 4 +- .../pp_tt012j.mad/bin/internal/misc.py | 7 +- .../pp_tt012j.mad/bin/internal/run_plot | 47 - .../bin/internal/run_plot_delphes | 46 - .../pp_tt012j.mad/bin/internal/run_plot_pgs | 47 - .../bin/internal/run_plot_pythia | 50 - .../cudacpp/pp_tt012j.mad/src/cudacpp_src.mk | 2 +- 237 files changed, 19002 insertions(+), 25484 deletions(-) delete mode 100644 epochX/cudacpp/ee_mumu.mad/Cards/delphes_trigger.dat delete mode 100644 epochX/cudacpp/ee_mumu.mad/Cards/plot_card.dat rename epochX/cudacpp/ee_mumu.mad/SubProcesses/{ => P1_epem_mupmum}/counters.cc (96%) delete mode 100644 epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum/counters.cc~madgraph_master mode change 120000 => 100644 epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum/ompnumthreads.cc delete mode 100644 epochX/cudacpp/ee_mumu.mad/SubProcesses/ompnumthreads.cc delete mode 100755 epochX/cudacpp/ee_mumu.mad/bin/internal/run_plot delete mode 100755 epochX/cudacpp/ee_mumu.mad/bin/internal/run_plot_delphes delete mode 100755 epochX/cudacpp/ee_mumu.mad/bin/internal/run_plot_pgs delete mode 100755 epochX/cudacpp/ee_mumu.mad/bin/internal/run_plot_pythia delete mode 100644 epochX/cudacpp/gg_tt.mad/Cards/delphes_trigger.dat delete mode 100644 epochX/cudacpp/gg_tt.mad/Cards/plot_card.dat delete mode 100755 epochX/cudacpp/gg_tt.mad/bin/internal/run_plot delete mode 100755 epochX/cudacpp/gg_tt.mad/bin/internal/run_plot_delphes delete mode 100755 epochX/cudacpp/gg_tt.mad/bin/internal/run_plot_pgs delete mode 100755 epochX/cudacpp/gg_tt.mad/bin/internal/run_plot_pythia delete mode 100644 epochX/cudacpp/gg_ttg.mad/Cards/delphes_trigger.dat delete mode 100644 epochX/cudacpp/gg_ttg.mad/Cards/plot_card.dat delete mode 100755 epochX/cudacpp/gg_ttg.mad/bin/internal/run_plot delete mode 100755 epochX/cudacpp/gg_ttg.mad/bin/internal/run_plot_delphes delete mode 100755 epochX/cudacpp/gg_ttg.mad/bin/internal/run_plot_pgs delete mode 100755 epochX/cudacpp/gg_ttg.mad/bin/internal/run_plot_pythia delete mode 100644 epochX/cudacpp/gg_ttgg.mad/Cards/delphes_trigger.dat delete mode 100644 epochX/cudacpp/gg_ttgg.mad/Cards/plot_card.dat delete mode 100755 epochX/cudacpp/gg_ttgg.mad/bin/internal/run_plot delete mode 100755 epochX/cudacpp/gg_ttgg.mad/bin/internal/run_plot_delphes delete mode 100755 epochX/cudacpp/gg_ttgg.mad/bin/internal/run_plot_pgs delete mode 100755 epochX/cudacpp/gg_ttgg.mad/bin/internal/run_plot_pythia delete mode 100644 epochX/cudacpp/gg_ttggg.mad/Cards/delphes_trigger.dat delete mode 100644 epochX/cudacpp/gg_ttggg.mad/Cards/plot_card.dat delete mode 100755 epochX/cudacpp/gg_ttggg.mad/bin/internal/run_plot delete mode 100755 epochX/cudacpp/gg_ttggg.mad/bin/internal/run_plot_delphes delete mode 100755 epochX/cudacpp/gg_ttggg.mad/bin/internal/run_plot_pgs delete mode 100755 epochX/cudacpp/gg_ttggg.mad/bin/internal/run_plot_pythia delete mode 100644 epochX/cudacpp/gq_ttq.mad/Cards/delphes_trigger.dat delete mode 100644 epochX/cudacpp/gq_ttq.mad/Cards/plot_card.dat delete mode 100755 epochX/cudacpp/gq_ttq.mad/bin/internal/run_plot delete mode 100755 epochX/cudacpp/gq_ttq.mad/bin/internal/run_plot_delphes delete mode 100755 epochX/cudacpp/gq_ttq.mad/bin/internal/run_plot_pgs delete mode 100755 epochX/cudacpp/gq_ttq.mad/bin/internal/run_plot_pythia delete mode 100644 epochX/cudacpp/pp_tt012j.mad/Cards/delphes_trigger.dat delete mode 100644 epochX/cudacpp/pp_tt012j.mad/Cards/plot_card.dat delete mode 100755 epochX/cudacpp/pp_tt012j.mad/bin/internal/run_plot delete mode 100755 epochX/cudacpp/pp_tt012j.mad/bin/internal/run_plot_delphes delete mode 100755 epochX/cudacpp/pp_tt012j.mad/bin/internal/run_plot_pgs delete mode 100755 epochX/cudacpp/pp_tt012j.mad/bin/internal/run_plot_pythia diff --git a/epochX/cudacpp/ee_mumu.mad/CODEGEN_mad_ee_mumu_log.txt b/epochX/cudacpp/ee_mumu.mad/CODEGEN_mad_ee_mumu_log.txt index e090137829..e6a712b2f4 100644 --- a/epochX/cudacpp/ee_mumu.mad/CODEGEN_mad_ee_mumu_log.txt +++ b/epochX/cudacpp/ee_mumu.mad/CODEGEN_mad_ee_mumu_log.txt @@ -50,10 +50,9 @@ Please set the 'lhapdf' variable to the (absolute) /PATH/TO/lhapdf-config (inclu Note that you can still compile and run aMC@NLO with the built-in PDFs MG5_aMC> set lhapdf /PATH/TO/lhapdf-config -Using default text editor "vi". Set another one in ./input/mg5_configuration.txt Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt -No valid web browser found. Please set in ./input/mg5_configuration.txt -import /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu.mg +Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt +import /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu.mg The import format was not given, so we guess it as command set stdout_level DEBUG set output information to level: 10 @@ -62,7 +61,7 @@ generate e+ e- > mu+ mu- No model currently active, so we import the Standard Model INFO: load particles INFO: load vertices -DEBUG: model prefixing takes 0.005680561065673828  +DEBUG: model prefixing takes 0.0036394596099853516  INFO: Restrict model sm with file models/sm/restrict_default.dat . DEBUG: Simplifying conditional expressions  DEBUG: remove interactions: u s w+ at order: QED=1  @@ -154,7 +153,7 @@ INFO: Checking for minimal orders which gives processes. INFO: Please specify coupling orders to bypass this step. INFO: Trying process: e+ e- > mu+ mu- WEIGHTED<=4 @1 INFO: Process has 2 diagrams -1 processes with 2 diagrams generated in 0.004 s +1 processes with 2 diagrams generated in 0.003 s Total: 1 processes with 2 diagrams output madevent ../TMPOUT/CODEGEN_mad_ee_mumu --hel_recycling=False --vector_size=32 --me_exporter=standalone_cudacpp Load PLUGIN.CUDACPP_OUTPUT @@ -165,16 +164,16 @@ Load PLUGIN.CUDACPP_OUTPUT INFO: initialize a new directory: CODEGEN_mad_ee_mumu INFO: remove old information in CODEGEN_mad_ee_mumu DEBUG: Entering PLUGIN_ProcessExporter.copy_template (initialise the directory) [output.py at line 165]  -WARNING: File exists /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu  -INFO: Creating subdirectories in directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu -WARNING: File exists /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/Cards  -WARNING: File exists /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/SubProcesses  +WARNING: File exists /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu  +INFO: Creating subdirectories in directory /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu +WARNING: File exists /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/Cards  +WARNING: File exists /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/SubProcesses  INFO: Organizing processes into subprocess groups INFO: Generating Helas calls for process: e+ e- > mu+ mu- WEIGHTED<=4 @1 INFO: Processing color information for process: e+ e- > mu+ mu- @1 INFO: Creating files in directory P1_epem_mupmum DEBUG: kwargs[prefix] = 0 [model_handling.py at line 1058]  -DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  +DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  INFO: Creating files in directory . FileWriter for ././CPPProcess.h FileWriter for ././CPPProcess.cc @@ -190,20 +189,20 @@ INFO: Created files CPPProcess.h and CPPProcess.cc in directory ./. DEBUG: vector, subproc_group,self.opt['vector_size'] =  32 True 32 [export_v4.py at line 1872]  INFO: Generating Feynman diagrams for Process: e+ e- > mu+ mu- WEIGHTED<=4 @1 INFO: Finding symmetric diagrams for subprocess group epem_mupmum -Generated helas calls for 1 subprocesses (2 diagrams) in 0.004 s -Wrote files for 8 helas calls in 0.097 s +Generated helas calls for 1 subprocesses (2 diagrams) in 0.003 s +Wrote files for 8 helas calls in 0.076 s ALOHA: aloha starts to compute helicity amplitudes ALOHA: aloha creates FFV1 routines ALOHA: aloha creates FFV2 routines ALOHA: aloha creates FFV4 routines -ALOHA: aloha creates 3 routines in 0.199 s +ALOHA: aloha creates 3 routines in 0.133 s DEBUG: Entering PLUGIN_ProcessExporter.convert_model (create the model) [output.py at line 202]  ALOHA: aloha starts to compute helicity amplitudes ALOHA: aloha creates FFV1 routines ALOHA: aloha creates FFV2 routines ALOHA: aloha creates FFV4 routines ALOHA: aloha creates FFV2_4 routines -ALOHA: aloha creates 7 routines in 0.254 s +ALOHA: aloha creates 7 routines in 0.163 s FFV1 FFV1 FFV2 @@ -212,45 +211,51 @@ ALOHA: aloha creates 7 routines in 0.254 s FFV4 FFV2_4 FFV2_4 -FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/src/./HelAmps_sm.h -INFO: Created file HelAmps_sm.h in directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/src/. +FileWriter for /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/src/./HelAmps_sm.h +INFO: Created file HelAmps_sm.h in directory /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/src/. super_write_set_parameters_onlyfixMajorana (hardcoded=False) super_write_set_parameters_onlyfixMajorana (hardcoded=True) -FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/src/./Parameters_sm.h -FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/src/./Parameters_sm.cc +FileWriter for /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/src/./Parameters_sm.h +FileWriter for /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/src/./Parameters_sm.cc INFO: Created files Parameters_sm.h and Parameters_sm.cc in directory -INFO: /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/src/. and /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/src/. +INFO: /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/src/. and /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/src/. The option zerowidth_tchannel is modified [True] but will not be written in the configuration files. If you want to make this value the default for future session, you can run 'save options --all' -save configuration file to /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/Cards/me5_configuration.txt +save configuration file to /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/Cards/me5_configuration.txt INFO: Use Fortran compiler gfortran INFO: Use c++ compiler g++ INFO: Generate web pages -DEBUG: cd /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu; patch -p4 -i /data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common +DEBUG: cd /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu; patch -p4 -i /data/stephan/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common patching file Source/genps.inc +patching file Source/make_opts +Hunk #1 succeeded at 12 (offset -1 lines). +Hunk #2 succeeded at 70 (offset -1 lines). +Hunk #3 succeeded at 117 (offset -1 lines). +Hunk #4 succeeded at 128 (offset -1 lines). patching file Source/makefile patching file SubProcesses/makefile +patching file bin/internal/banner.py patching file bin/internal/gen_ximprove.py -Hunk #1 succeeded at 391 (offset 6 lines). patching file bin/internal/madevent_interface.py -DEBUG: cd /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/SubProcesses/P1_epem_mupmum; patch -p6 -i /data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 +DEBUG: cd /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/SubProcesses/P1_epem_mupmum; patch -p6 -i /data/stephan/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 patching file auto_dsig1.f Hunk #1 succeeded at 496 (offset 12 lines). patching file driver.f patching file matrix1.f -Hunk #3 succeeded at 230 (offset 9 lines). -Hunk #4 succeeded at 267 (offset 18 lines). -Hunk #5 succeeded at 312 (offset 18 lines). +Hunk #2 succeeded at 143 (offset -16 lines). +Hunk #3 succeeded at 230 (offset -7 lines). +Hunk #4 succeeded at 267 (offset 2 lines). +Hunk #5 succeeded at 312 (offset 2 lines). DEBUG: p.returncode =  0 [output.py at line 237]  -Output to directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu done. +Output to directory /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu done. Type "launch" to generate events from this process, or see -/data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/README +/data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/README Run "open index.html" to see more information about this process. quit -real 0m1.848s -user 0m1.621s -sys 0m0.225s +real 0m1.496s +user 0m1.179s +sys 0m0.313s ************************************************************ * * * W E L C O M E to * @@ -271,12 +276,11 @@ sys 0m0.225s * Type 'help' for in-line help. * * * ************************************************************ -INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/Cards/me5_configuration.txt -INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo/input/mg5_configuration.txt -INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/Cards/me5_configuration.txt -Using default text editor "vi". Set another one in ./input/mg5_configuration.txt +INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/Cards/me5_configuration.txt +INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/mg5amcnlo/input/mg5_configuration.txt +INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/Cards/me5_configuration.txt Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt -No valid web browser found. Please set in ./input/mg5_configuration.txt +Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt treatcards run quit INFO: @@ -301,12 +305,11 @@ launch in debug mode * Type 'help' for in-line help. * * * ************************************************************ -INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/Cards/me5_configuration.txt -INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo/input/mg5_configuration.txt -INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/Cards/me5_configuration.txt -Using default text editor "vi". Set another one in ./input/mg5_configuration.txt +INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/Cards/me5_configuration.txt +INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/mg5amcnlo/input/mg5_configuration.txt +INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/Cards/me5_configuration.txt Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt -No valid web browser found. Please set in ./input/mg5_configuration.txt +Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt treatcards param quit INFO: diff --git a/epochX/cudacpp/ee_mumu.mad/Cards/delphes_trigger.dat b/epochX/cudacpp/ee_mumu.mad/Cards/delphes_trigger.dat deleted file mode 100644 index 0aab0677aa..0000000000 --- a/epochX/cudacpp/ee_mumu.mad/Cards/delphes_trigger.dat +++ /dev/null @@ -1,20 +0,0 @@ -#TRIGGER CARD # DO NOT REMOVE THIS IS A TAG! - -# list of trigger algorithms -# trigger_name >> algorithm #comments -Inclusive electron >> ELEC1_PT: '29' -di-electron >> ELEC1_PT: '17' && ELEC2_PT: '17' -Inclusive Photon >> GAMMA1_PT: '80' -di-Photon >> GAMMA1_PT: '40' && GAMMA2_PT: '25' -Inclusive muon >> MUON1_PT: '19' -di-muon >> MUON1_PT: '7' && MUON2_PT: '7' -Taujet and ETmis >> TAU1_PT: '86' && ETMIS_PT: '65' -di-Taujets >> TAU1_PT: '59' && TAU2_PT: '59' -Jet and ETmis >> JET1_PT: '180' && ETMIS_PT: '123' -Taujet and electron >> TAU1_PT: '45' && ELEC1_PT: '19' -Taujet and muon >> TAU1_PT: '40' && ELEC1_PT: '15' -Inclusive b-jet >> Bjet1_PT: '237' -Inclusive 1 jet >> JET1_PT: '657' -Inclusive 3 jets >> JET1_PT: '247' && JET2_PT: '247' && JET3_PT: '247' -Inclusive 4 jets >> JET1_PT: '113' && JET2_PT: '113' && JET3_PT: '113' && JET4_PT: '113' - diff --git a/epochX/cudacpp/ee_mumu.mad/Cards/ident_card.dat b/epochX/cudacpp/ee_mumu.mad/Cards/ident_card.dat index b37758a42a..0ba87b008f 100644 --- a/epochX/cudacpp/ee_mumu.mad/Cards/ident_card.dat +++ b/epochX/cudacpp/ee_mumu.mad/Cards/ident_card.dat @@ -2,32 +2,32 @@ ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c written by the UFO converter ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc -mass 5 mdl_MB -mass 6 mdl_MT -mass 15 mdl_MTA -mass 23 mdl_MZ -mass 25 mdl_MH -sminputs 1 aEWM1 -sminputs 2 mdl_Gf -sminputs 3 aS -yukawa 5 mdl_ymb -yukawa 6 mdl_ymt -yukawa 15 mdl_ymtau -decay 6 mdl_WT -decay 23 mdl_WZ -decay 24 mdl_WW +decay 23 mdl_WZ +decay 24 mdl_WW decay 25 mdl_WH +decay 6 mdl_WT +mass 15 mdl_MTA +mass 23 mdl_MZ +mass 25 mdl_MH +mass 5 mdl_MB +mass 6 mdl_MT +sminputs 1 aEWM1 +sminputs 2 mdl_Gf +sminputs 3 aS +yukawa 15 mdl_ymtau +yukawa 5 mdl_ymb +yukawa 6 mdl_ymt diff --git a/epochX/cudacpp/ee_mumu.mad/Cards/me5_configuration.txt b/epochX/cudacpp/ee_mumu.mad/Cards/me5_configuration.txt index cdeedc7863..22f81b5926 100644 --- a/epochX/cudacpp/ee_mumu.mad/Cards/me5_configuration.txt +++ b/epochX/cudacpp/ee_mumu.mad/Cards/me5_configuration.txt @@ -234,7 +234,7 @@ # pineappl = pineappl -#mg5_path = /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo +#mg5_path = /data/stephan/madgraph4gpu/MG5aMC/mg5amcnlo # MG5 MAIN DIRECTORY -#mg5_path = /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo +#mg5_path = /data/stephan/madgraph4gpu/MG5aMC/mg5amcnlo diff --git a/epochX/cudacpp/ee_mumu.mad/Cards/plot_card.dat b/epochX/cudacpp/ee_mumu.mad/Cards/plot_card.dat deleted file mode 100644 index 9abe1cc05e..0000000000 --- a/epochX/cudacpp/ee_mumu.mad/Cards/plot_card.dat +++ /dev/null @@ -1,203 +0,0 @@ -#************************************************************************** -# Card for MadAnalysis * -# * -# This file is used to set the classes and options for * -# the MadAnalysis program. * -# * -# * -# Some comments about the classes * -# 1. Plots are for classes of particles. * -# 2. Each particle is identified by its PDG code. * -# 3. Classes names are arbitrary (4 symbols max, no spaces allowed). * -# 4. Particles in the same class will be ordered with the 'ordering * -# function' in the file in_func.f. * -# 5. Classes can be added/edited/removed at will, and given a name * -# that will then appear in the plots. * -# 6. A particle can be put in one class only. Putting a particle in * -# two or more classes can lead to double counting of events. * -# 7. The class name mET is missing Energy and its name is reserved. * -# If used, it must be put last in the classes list below. * -# 8. If events contain particles not belonging to an existing class, * -# a new class will automatically be generated. * -# 9. For LHCO events the PDG code 21 is assigned to a jet (not * -# b-tagged), 5 to a b-tagged jet and 12 to missing ET. * -# * -# * -# Some comments about the cuts * -# 1. In the file kin_func.f the functions on which cuts can be applied * -# are given. * -# 2. The syntax is as follows. * -# etmin 1 3 30d0 * -# means that from the first class the Et of the first three particles * -# has to be greater than 30 GeV. * -# * -# etmissmin 20d0 * -# means that there must be at least 20 GeV of missing Et * -# * -# dRmin 2 1 4 3 3d0 * -# means that the distance between the first particle in the second * -# class and the first three particles in the fourth class has to be * -# greater than 3. * -# * -# ptmax 1 3 10d0 * -# ptmax 1 2 15d0 * -# means that the maximum pt of the third particle in the first class * -# has to smaller than 10 GeV, and the first two particles of this * -# class has to be smaller than 15 GeV * -# 3. The ordering of the particles within a class can be set with the * -# 'ordering function' in the file kin_func.f. * -# 4. For all the 'min' cuts, an event will be thrown away if the particle * -# does not exist. On the other hand, for all the 'max' cuts the cut * -# will be ignored if the particle does not exist * -# (Only dRij is an exception, for which it is the other way around) * -# * -# * -# * -# Some comments about the plotting options * -# 1. In the file kin_func.f the functions can be found that can be * -# plotted. (only for off-line usage) * -# 2. With the plotting options one can set the number of plots for each * -# of these functions. * -# 3. One has to specify for each variable which particles from which * -# class are used to set the plots. Syntax: * -# et 2 4 * -# means that the transverse energy of the first four particles in the * -# second class will be plotted. * -# mij 1 3 * -# mij 2 2 * -# means that for the invariant mass plots the first three particles * -# from the first class and the first two from the second class will be * -# used to plot the invariant mass of two particles. (10 plots) * -# 4. The ordering of the particles in a class can be set with the * -# 'ordering_function'. pt, e and et are valid functions. (For off-line * -# users X1, X2 and X3 can also be used, if defined in kin_func.f.) * -# 5. Max number of plots is 200. * -# * -# * -#************************************************************************** -# Put here your list of classes -#************************************************************************** -# Do NOT put spaces before class names! -# Begin Classes # This is TAG. Do not modify this line -jet 1 -1 2 -2 3 -3 4 -4 21 # Class number 1 -b 5 -5 # Class number 2 -mET 12 -12 14 -14 16 -16 1000022 # Missing ET class, name is reserved -# End Classes # This is TAG. Do not modify this line -#************************************************************************** -ordering_function pt # orders particles in classes according to their pt -normalization xsec # histogram normalization, xsec or number (e.g. 1) -#************************************************************************** -# Put here list of minimum pt for the classes -#************************************************************************** -# Begin Minpts # This is TAG. Do not modify this line -#1 30 -#2 40 -#3 10 -# End Minpts # This is TAG. Do not modify this line -#************************************************************************** -# Cuts on plotted events -#************************************************************************** -# Modify the cuts and remove the pounds/hashes to apply those cuts -# Do NOT put spaces at the beginning of the following lines! -# Begin Cuts # This is TAG. Do not modify this line -#etmin 2 2 40d0 -#etmin 2 1 80d0 -#etmin 1 3 20d0 -#etmax 2 1 200d0 -#ptmin 3 1 0d0 -#etmissmin 20d0 -#etmissmax 80d0 -#etamax 1 1 1d0 -#etamax 2 1 2d0 -#etamin 2 2 1.5d0 -#etamin 2 1 2d0 -#mijmax 2 1 2 2 200d0 -#mijmin 2 1 2 2 100d0 -#X1min 2 1 40d0 -#X1max 2 2 50d0 -#dRijmin 2 1 2 2 0.7d0 -#dRijmax 1 3 2 2 0.7d0 -#XY1min 2 2 2 2 20d0 -#XYZA2max 2 2 2 2 4 1 5 1 40d0 -# End Cuts # This is TAG. Do not modify this line -#************************************************************************** -# Put here the required plots -#************************************************************************** -# Do NOT put spaces at the beginning of the following lines! -# Begin PlotDefs # This is TAG. Do not modify this line -pt 1 4 # plot pt for the first four particles in class 1 -pt 2 4 # plot pt for the first four particles in class 2 -pt 3 4 # plot pt for the first four particles in class 3 -pt 4 4 # plot pt for the first four particles in class 4 -pt 5 4 # etc. -pt 6 4 -pt 7 4 -#e 2 2 -y 1 4 # plot rapidity for the first four particles in class 1 -y 2 4 -y 3 4 -y 4 4 -y 5 4 -y 6 4 -y 7 4 -#eta 2 2 # plot pseudo-rapidity for the first two part in the 2nd class -#mom 4 1 -#costh 5 1 -#phi 2 2 -#delta_eta 2 2 -#delta_eta 4 1 -mij 1 4 # use the first four particles in the 1st class to plot inv. mass -mij 2 2 # use the first two particles from the second class as well -mij 3 1 # etc. -mij 4 1 -mij 5 1 -mij 6 1 -mij 7 1 -#cosij 1 2 -#cosij 2 2 -#cosij 3 1 -#cosij 4 1 -dRij 1 4 -dRij 2 2 -dRij 3 1 -dRij 4 1 -dRij 5 1 -dRij 6 1 -dRij 7 1 -#delta_phi 2 2 -#delta_phi 4 1 -#delta_phi 5 1 -#X1 2 2 # plot X1 (defined in kin_func.f) -#XYZA1 2 2 -#XYZA1 4 1 -#XYZA1 5 1 -# End PlotDefs # This is TAG. Do not modify this line -#************************************************************************** -#************************************************************************** -# Put here the plot ranges -#************************************************************************** -# Do NOT put spaces at the beginning of the following lines! -# Begin PlotRange # This is TAG. Do not modify this line -pt 10 0 500 # bin size, min value, max value -et 10 0 500 # bin size, min value, max value -etmiss 10 0 500 # bin size, min value, max value -ht 20 0 1500 -y 0.2 -5 5 # etc. -mij 20 0 1500 -dRij 0.1 0 5 -#delta_phi 0.1 0 3.1 -#X1 1 0 100 -#XYZA1 1 0 100 -# End PlotRange # This is TAG. Do not modify this line -#************************************************************************** -#************************************************************************** -# Output for plots -#************************************************************************** -# Do NOT put spaces at the beginning of the following lines! -# Begin PlotOutput # This is TAG. Do not modify this line -output topdrawer # set to topdrawer or gnuplot -plot_decayed no # plot (and cut) dec. res.? (Only for LHE events) -# End PlotOutput # This is TAG. Do not modify this line -#************************************************************************** -# -# diff --git a/epochX/cudacpp/ee_mumu.mad/Source/DHELAS/FFV4_0.f b/epochX/cudacpp/ee_mumu.mad/Source/DHELAS/FFV4_0.f index 53829ce13a..86144cea09 100644 --- a/epochX/cudacpp/ee_mumu.mad/Source/DHELAS/FFV4_0.f +++ b/epochX/cudacpp/ee_mumu.mad/Source/DHELAS/FFV4_0.f @@ -9,15 +9,15 @@ SUBROUTINE FFV4_0(F1, F2, V3, COUP,VERTEX) COMPLEX*16 COUP COMPLEX*16 F1(*) COMPLEX*16 F2(*) + COMPLEX*16 TMP1 COMPLEX*16 TMP3 - COMPLEX*16 TMP4 COMPLEX*16 V3(*) COMPLEX*16 VERTEX - TMP3 = (F1(3)*(F2(5)*(V3(3)+V3(6))+F2(6)*(V3(4)+CI*(V3(5)))) + TMP1 = (F1(3)*(F2(5)*(V3(3)+V3(6))+F2(6)*(V3(4)+CI*(V3(5)))) $ +F1(4)*(F2(5)*(V3(4)-CI*(V3(5)))+F2(6)*(V3(3)-V3(6)))) - TMP4 = (F1(5)*(F2(3)*(V3(3)-V3(6))-F2(4)*(V3(4)+CI*(V3(5)))) + TMP3 = (F1(5)*(F2(3)*(V3(3)-V3(6))-F2(4)*(V3(4)+CI*(V3(5)))) $ +F1(6)*(F2(3)*(-V3(4)+CI*(V3(5)))+F2(4)*(V3(3)+V3(6)))) - VERTEX = COUP*(-1D0)*(+CI*(TMP3)+2D0 * CI*(TMP4)) + VERTEX = COUP*(-1D0)*(+CI*(TMP1)+2D0 * CI*(TMP3)) END diff --git a/epochX/cudacpp/ee_mumu.mad/Source/DHELAS/FFV4_3.f b/epochX/cudacpp/ee_mumu.mad/Source/DHELAS/FFV4_3.f index 06573c09ee..aa18a03673 100644 --- a/epochX/cudacpp/ee_mumu.mad/Source/DHELAS/FFV4_3.f +++ b/epochX/cudacpp/ee_mumu.mad/Source/DHELAS/FFV4_3.f @@ -13,7 +13,7 @@ SUBROUTINE FFV4_3(F1, F2, COUP, M3, W3,V3) REAL*8 OM3 REAL*8 P3(0:3) COMPLEX*16 TMP2 - COMPLEX*16 TMP5 + COMPLEX*16 TMP4 COMPLEX*16 V3(6) REAL*8 W3 COMPLEX*16 DENOM @@ -27,18 +27,18 @@ SUBROUTINE FFV4_3(F1, F2, COUP, M3, W3,V3) P3(3) = -DIMAG(V3(1)) TMP2 = (F1(3)*(F2(5)*(P3(0)+P3(3))+F2(6)*(P3(1)+CI*(P3(2)))) $ +F1(4)*(F2(5)*(P3(1)-CI*(P3(2)))+F2(6)*(P3(0)-P3(3)))) - TMP5 = (F1(5)*(F2(3)*(P3(0)-P3(3))-F2(4)*(P3(1)+CI*(P3(2)))) + TMP4 = (F1(5)*(F2(3)*(P3(0)-P3(3))-F2(4)*(P3(1)+CI*(P3(2)))) $ +F1(6)*(F2(3)*(-P3(1)+CI*(P3(2)))+F2(4)*(P3(0)+P3(3)))) DENOM = COUP/(P3(0)**2-P3(1)**2-P3(2)**2-P3(3)**2 - M3 * (M3 -CI $ * W3)) - V3(3)= DENOM*(-2D0 * CI)*(OM3*-1D0/2D0 * P3(0)*(TMP2+2D0*(TMP5)) + V3(3)= DENOM*(-2D0 * CI)*(OM3*-1D0/2D0 * P3(0)*(TMP2+2D0*(TMP4)) $ +(+1D0/2D0*(F1(3)*F2(5)+F1(4)*F2(6))+F1(5)*F2(3)+F1(6)*F2(4))) - V3(4)= DENOM*(-2D0 * CI)*(OM3*-1D0/2D0 * P3(1)*(TMP2+2D0*(TMP5)) + V3(4)= DENOM*(-2D0 * CI)*(OM3*-1D0/2D0 * P3(1)*(TMP2+2D0*(TMP4)) $ +(-1D0/2D0*(F1(3)*F2(6)+F1(4)*F2(5))+F1(5)*F2(4)+F1(6)*F2(3))) - V3(5)= DENOM*2D0 * CI*(OM3*1D0/2D0 * P3(2)*(TMP2+2D0*(TMP5))+( + V3(5)= DENOM*2D0 * CI*(OM3*1D0/2D0 * P3(2)*(TMP2+2D0*(TMP4))+( $ +1D0/2D0 * CI*(F1(3)*F2(6))-1D0/2D0 * CI*(F1(4)*F2(5))-CI*(F1(5) $ *F2(4))+CI*(F1(6)*F2(3)))) - V3(6)= DENOM*2D0 * CI*(OM3*1D0/2D0 * P3(3)*(TMP2+2D0*(TMP5))+( + V3(6)= DENOM*2D0 * CI*(OM3*1D0/2D0 * P3(3)*(TMP2+2D0*(TMP4))+( $ +1D0/2D0*(F1(3)*F2(5))-1D0/2D0*(F1(4)*F2(6))-F1(5)*F2(3)+F1(6) $ *F2(4))) END diff --git a/epochX/cudacpp/ee_mumu.mad/Source/DHELAS/aloha_file.inc b/epochX/cudacpp/ee_mumu.mad/Source/DHELAS/aloha_file.inc index 22e23a3436..13aaa31c6d 100644 --- a/epochX/cudacpp/ee_mumu.mad/Source/DHELAS/aloha_file.inc +++ b/epochX/cudacpp/ee_mumu.mad/Source/DHELAS/aloha_file.inc @@ -1,7 +1 @@ -<<<<<<< HEAD -ALOHARoutine = FFV1_0.o FFV1P0_3.o FFV2_0.o FFV2_3.o FFV4_0.o FFV4_3.o -||||||| e21d34682 -ALOHARoutine = FFV2_3.o FFV2_0.o FFV4_0.o FFV4_3.o FFV1_0.o FFV1P0_3.o -======= ALOHARoutine = FFV1P0_3.o FFV1_0.o FFV2_0.o FFV2_3.o FFV4_0.o FFV4_3.o ->>>>>>> madgraph/master diff --git a/epochX/cudacpp/ee_mumu.mad/Source/make_opts b/epochX/cudacpp/ee_mumu.mad/Source/make_opts index e4b87ee6ad..435bed0dc7 100644 --- a/epochX/cudacpp/ee_mumu.mad/Source/make_opts +++ b/epochX/cudacpp/ee_mumu.mad/Source/make_opts @@ -1,7 +1,7 @@ DEFAULT_CPP_COMPILER=g++ DEFAULT_F2PY_COMPILER=f2py3 DEFAULT_F_COMPILER=gfortran -GLOBAL_FLAG=-O3 -ffast-math -fbounds-check +GLOBAL_FLAG=-O3 -ffast-math MACFLAG= MG5AMC_VERSION=SpecifiedByMG5aMCAtRunTime PYTHIA8_PATH=NotInstalled @@ -13,31 +13,53 @@ BIASLIBDIR=../../../lib/ BIASLIBRARY=libbias.$(libext) # Rest of the makefile -ifeq ($(origin FFLAGS),undefined) -FFLAGS= -w -fPIC -#FFLAGS+= -g -fbounds-check -ffpe-trap=invalid,zero,overflow,underflow,denormal -Wall -fimplicit-none -endif -FFLAGS += $(GLOBAL_FLAG) +#=== Detect O/S and architecture (assuming uname is available, https://en.wikipedia.org/wiki/Uname) + +# Detect O/S kernel (Linux, Darwin...) +UNAME_S := $(shell uname -s) + +# Detect architecture (x86_64, ppc64le...) +UNAME_P := $(shell uname -p) + +#------------------------------------------------------------------------------- # REMOVE MACFLAG IF NOT ON MAC OR FOR F2PY -UNAME := $(shell uname -s) ifdef f2pymode MACFLAG= else -ifneq ($(UNAME), Darwin) +ifneq ($(UNAME_S), Darwin) MACFLAG= endif endif +############################################################ +# Default compiler flags +# To change optimisation level, override these as follows: +# make CXXFLAGS="-O0 -g" +# or export them as environment variables +# For debugging Fortran, one could e.g. use: +# FCFLAGS="-g -fbounds-check -ffpe-trap=invalid,zero,overflow,underflow,denormal -Wall -fimplicit-none" +############################################################ +FCFLAGS ?= $(GLOBAL_FLAG) -fbounds-check +CXXFLAGS ?= $(GLOBAL_FLAG) -DNDEBUG +NVCCFLAGS ?= $(GLOBAL_FLAG) -DNDEBUG -use_fast_math -lineinfo +LDFLAGS ?= $(STDLIB) -ifeq ($(origin CXXFLAGS),undefined) -CXXFLAGS= -O $(STDLIB_FLAG) $(MACFLAG) +ifneq ($(FFLAGS),) +# Madgraph used to use FFLAGS, so the user probably tries to change the flags specifically for madgraph: +FCFLAGS = $(FFLAGS) endif -ifeq ($(origin CFLAGS),undefined) -CFLAGS= -O $(STDLIB_FLAG) $(MACFLAG) +# Madgraph-specific flags: +WARNFLAGS = -Wall -Wshadow -Wextra +ifeq (,$(findstring -std=,$(CXXFLAGS))) +CXXSTANDARD= -std=c++17 endif +MG_FCFLAGS += -fPIC -w +MG_CXXFLAGS += -fPIC $(CXXSTANDARD) $(WARNFLAGS) $(MACFLAG) +MG_NVCCFLAGS += -fPIC $(CXXSTANDARD) --forward-unknown-to-host-compiler $(WARNFLAGS) +MG_LDFLAGS += $(MACFLAG) # Set FC unless it's defined by an environment variable ifeq ($(origin FC),default) @@ -49,45 +71,40 @@ endif # Increase the number of allowed charcters in a Fortran line ifeq ($(FC), ftn) -FFLAGS+= -extend-source # for ifort type of compiler +MG_FCFLAGS += -extend-source # for ifort type of compiler else VERS="$(shell $(FC) --version | grep ifort -i)" ifeq ($(VERS), "") -FFLAGS+= -ffixed-line-length-132 +MG_FCFLAGS += -ffixed-line-length-132 else -FFLAGS+= -extend-source # for ifort type of compiler +MG_FCFLAGS += -extend-source # for ifort type of compiler endif endif -UNAME := $(shell uname -s) -ifeq ($(origin LDFLAGS), undefined) -LDFLAGS=$(STDLIB) $(MACFLAG) -endif - # Options: dynamic, lhapdf # Option dynamic -ifeq ($(UNAME), Darwin) +ifeq ($(UNAME_S), Darwin) dylibext=dylib else dylibext=so endif ifdef dynamic -ifeq ($(UNAME), Darwin) +ifeq ($(UNAME_S), Darwin) libext=dylib -FFLAGS+= -fno-common -LDFLAGS += -bundle +MG_FCFLAGS += -fno-common +MG_LDFLAGS += -bundle define CREATELIB $(FC) -dynamiclib -undefined dynamic_lookup -o $(1) $(2) endef else libext=so -FFLAGS+= -fPIC -LDFLAGS += -shared +MG_FCFLAGS += -fPIC +MG_LDFLAGS += -shared define CREATELIB -$(FC) $(FFLAGS) $(LDFLAGS) -o $(1) $(2) +$(FC) $(MG_FCFLAGS) $(FCFLAGS) $(MG_LDFLAGS) $(LDFLAGS) -o $(1) $(2) endef endif else @@ -101,17 +118,9 @@ endif # Option lhapdf ifneq ($(lhapdf),) -CXXFLAGS += $(shell $(lhapdf) --cppflags) +MG_CXXFLAGS += $(shell $(lhapdf) --cppflags) alfas_functions=alfas_functions_lhapdf llhapdf+= $(shell $(lhapdf) --cflags --libs) -lLHAPDF -# check if we need to activate c++11 (for lhapdf6.2) -ifeq ($(origin CXX),default) -ifeq ($lhapdfversion$lhapdfsubversion,62) -CXX=$(DEFAULT_CPP_COMPILER) -std=c++11 -else -CXX=$(DEFAULT_CPP_COMPILER) -endif -endif else alfas_functions=alfas_functions llhapdf= @@ -120,4 +129,207 @@ endif # Helper function to check MG5 version define CHECK_MG5AMC_VERSION python -c 'import re; from distutils.version import StrictVersion; print StrictVersion("$(MG5AMC_VERSION)") >= StrictVersion("$(1)") if re.match("^[\d\.]+$$","$(MG5AMC_VERSION)") else True;' -endef \ No newline at end of file +endef + +#------------------------------------------------------------------------------- + +# Set special cases for non-gcc/clang builds +# AVX below gets overridden from outside in architecture-specific builds +AVX ?= none +# [NB MGONGPU_PVW512 is needed because "-mprefer-vector-width=256" is not exposed in a macro] +# [See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96476] +$(info AVX=$(AVX)) +ifeq ($(UNAME_P),arm) + ifeq ($(AVX),sse4) + override AVXFLAGS = -D__SSE4_2__ # ARM NEON with 128 width (Q/quadword registers) + endif +else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 + ifeq ($(AVX),none) + override AVXFLAGS = -mno-sse3 # no SIMD + else ifeq ($(AVX),sse4) + override AVXFLAGS = -mno-avx # SSE4.2 with 128 width (xmm registers) + else ifeq ($(AVX),avx2) + override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] + else ifeq ($(AVX),512y) + override AVXFLAGS = -march=skylake -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] + else ifeq ($(AVX),512z) + override AVXFLAGS = -march=skylake -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) + else + $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) + endif +endif + +# For the moment, use AVXFLAGS everywhere: eventually, use them only in encapsulated implementations? +MG_CXXFLAGS+= $(AVXFLAGS) + +#------------------------------------------------------------------------------- + +#=== Configure the CUDA compiler if available + +# If CXX is not a single word (example "clang++ --gcc-toolchain...") then disable CUDA builds (issue #505) +# This is because it is impossible to pass this to "CUFLAGS += -ccbin " below +ifneq ($(words $(subst ccache ,,$(CXX))),1) # allow at most "CXX=ccache " from outside + $(warning CUDA builds are not supported for multi-word CXX "$(CXX)") + override CUDA_HOME=disabled +endif + +# If CUDA_HOME is not set, try to set it from the location of nvcc +ifndef CUDA_HOME + CUDA_HOME = $(patsubst %bin/nvcc,%,$(shell which nvcc 2>/dev/null)) + $(info CUDA_HOME="$(CUDA_HOME)") +endif + +# Set NVCC as $(CUDA_HOME)/bin/nvcc if it exists +ifneq ($(wildcard $(CUDA_HOME)/bin/nvcc),) + NVCC = $(CUDA_HOME)/bin/nvcc + USE_NVTX ?=-DUSE_NVTX + # See https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html + # See https://arnon.dk/matching-sm-architectures-arch-and-gencode-for-various-nvidia-cards/ + # Default: use compute capability 70 (Volta architecture), and embed PTX to support later architectures, too. + # Set MADGRAPH_CUDA_ARCHITECTURE to the desired value to change the default. + # Build for multiple architectures using a space-separated list, e.g. MADGRAPH_CUDA_ARCHITECTURE="70 80" + MADGRAPH_CUDA_ARCHITECTURE ?= 70 + # Generate PTX for the first architecture: + CUARCHFLAGS := --generate-code arch=compute_$(firstword $(MADGRAPH_CUDA_ARCHITECTURE)),code=compute_$(firstword $(MADGRAPH_CUDA_ARCHITECTURE)) + # Generate device code for all architectures: + CUARCHFLAGS += $(foreach arch,$(MADGRAPH_CUDA_ARCHITECTURE), --generate-code arch=compute_$(arch),code=sm_$(arch)) + + CUINC = -I$(CUDA_HOME)/include/ + CURANDLIBFLAGS = -L$(CUDA_HOME)/lib64/ -lcurand # NB: -lcuda is not needed here! + MG_LDFLAGS += $(CURANDLIBFLAGS) + MG_NVCCFLAGS += $(CUINC) $(USE_NVTX) $(CUARCHFLAGS) + +else ifeq ($(AVX),cuda) + $(error nvcc is not visible in PATH. Either add it to PATH or export CUDA_HOME to compile with cuda) + ifeq ($(AVX),cuda) + $(error Cannot compile for cuda without NVCC) + endif +endif + +# Set the host C++ compiler for nvcc via "-ccbin " +# (NB issue #505: this must be a single word, "clang++ --gcc-toolchain..." is not supported) +MG_NVCCFLAGS += -ccbin $(shell which $(subst ccache ,,$(CXX))) + +# Allow newer (unsupported) C++ compilers with older versions of CUDA if ALLOW_UNSUPPORTED_COMPILER_IN_CUDA is set (#504) +ifneq ($(origin ALLOW_UNSUPPORTED_COMPILER_IN_CUDA),undefined) +MG_NVCCFLAGS += -allow-unsupported-compiler +endif + +#------------------------------------------------------------------------------- + +#=== Configure ccache for C++ and CUDA builds + +# Enable ccache if USECCACHE=1 +ifeq ($(USECCACHE)$(shell echo $(CXX) | grep ccache),1) + override CXX:=ccache $(CXX) +endif + +ifneq ($(NVCC),) + ifeq ($(USECCACHE)$(shell echo $(NVCC) | grep ccache),1) + override NVCC:=ccache $(NVCC) + endif +endif + +#------------------------------------------------------------------------------- + +#=== Configure PowerPC-specific compiler flags for C++ and CUDA + +# PowerPC-specific CXX / CUDA compiler flags (being reviewed) +ifeq ($(UNAME_P),ppc64le) + MG_CXXFLAGS+= -mcpu=power9 -mtune=power9 # gains ~2-3% both for none and sse4 + MG_NVCCFLAGS+= -Xcompiler -mno-float128 + + ifeq ($(AVX),sse4) + override AVXFLAGS = -D__SSE4_2__ # Power9 VSX with 128 width (VSR registers) + endif +endif + +#------------------------------------------------------------------------------- +#=== Apple-specific compiler/linker options + +# Add -std=c++17 explicitly to avoid build errors on macOS +# Add -mmacosx-version-min=11.3 to avoid "ld: warning: object file was built for newer macOS version than being linked" +ifneq ($(shell $(CXX) --version | egrep '^Apple clang'),) +MG_CXXFLAGS += -std=c++17 -mmacosx-version-min=11.3 +endif + +ifeq ($(UNAME_S),Darwin) +STDLIB = -lc++ # avoid 'Undefined symbols' for chrono::steady_clock on macOS (checked with otool -L libmg5amc_gg_ttx_cpp.so) +MG_LDFLAGS += -mmacosx-version-min=11.3 # avoid "ld: warning: object file was built for newer macOS version than being linked" +else +MG_LDFLAGS += -Xlinker --no-relax # avoid 'failed to convert GOTPCREL relocation' error #458 (not supported on macOS) +endif + +#------------------------------------------------------------------------------- + +#=== C++/CUDA-specific flags for floating-point types and random generators to use + +# Set the default FPTYPE (floating point type) choice +FPTYPE ?= m + +# Set the default HELINL (inline helicities?) choice +HELINL ?= 0 + +# Set the default HRDCOD (hardcode cIPD physics parameters?) choice +HRDCOD ?= 0 + +# Set the default RNDGEN (random number generator) choice +ifeq ($(NVCC),) + RNDGEN ?= hasNoCurand +else + RNDGEN ?= hasCurand +endif + +# Export AVX, FPTYPE, HELINL, HRDCOD, RNDGEN, OMPFLAGS so sub-makes don't go back to the defaults +export AVX +export AVXFLAGS +export FPTYPE +export HELINL +export HRDCOD +export RNDGEN + +#=== Set the CUDA/C++ compiler flags appropriate to user-defined choices of AVX, FPTYPE, HELINL, HRDCOD, RNDGEN + +# Set the build flags appropriate to each FPTYPE choice (example: "make FPTYPE=f") +# $(info FPTYPE=$(FPTYPE)) +ifeq ($(FPTYPE),d) + COMMONFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_DOUBLE +else ifeq ($(FPTYPE),f) + COMMONFLAGS += -DMGONGPU_FPTYPE_FLOAT -DMGONGPU_FPTYPE2_FLOAT +else ifeq ($(FPTYPE),m) + COMMONFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_FLOAT +else + $(error Unknown FPTYPE='$(FPTYPE)': only 'd', 'f' and 'm' are supported) +endif + +# Set the build flags appropriate to each HELINL choice (example: "make HELINL=1") +# $(info HELINL=$(HELINL)) +ifeq ($(HELINL),1) + COMMONFLAGS += -DMGONGPU_INLINE_HELAMPS +else ifneq ($(HELINL),0) + $(error Unknown HELINL='$(HELINL)': only '0' and '1' are supported) +endif + +# Set the build flags appropriate to each HRDCOD choice (example: "make HRDCOD=1") +# $(info HRDCOD=$(HRDCOD)) +ifeq ($(HRDCOD),1) + COMMONFLAGS += -DMGONGPU_HARDCODE_PARAM +else ifneq ($(HRDCOD),0) + $(error Unknown HRDCOD='$(HRDCOD)': only '0' and '1' are supported) +endif + +# Set the build flags appropriate to each RNDGEN choice (example: "make RNDGEN=hasNoCurand") +$(info RNDGEN=$(RNDGEN)) +ifeq ($(RNDGEN),hasNoCurand) + override CXXFLAGSCURAND = -DMGONGPU_HAS_NO_CURAND + override CURANDLIBFLAGS = +else ifeq ($(RNDGEN),hasCurand) + CXXFLAGSCURAND = $(CUINC) +else + $(error Unknown RNDGEN='$(RNDGEN)': only 'hasCurand' and 'hasNoCurand' are supported) +endif + +MG_CXXFLAGS += $(COMMONFLAGS) +MG_NVCCFLAGS += $(COMMONFLAGS) + +#------------------------------------------------------------------------------- diff --git a/epochX/cudacpp/ee_mumu.mad/Source/makefile b/epochX/cudacpp/ee_mumu.mad/Source/makefile index 00c73099a0..407b1b753e 100644 --- a/epochX/cudacpp/ee_mumu.mad/Source/makefile +++ b/epochX/cudacpp/ee_mumu.mad/Source/makefile @@ -10,8 +10,8 @@ include make_opts # Source files -PROCESS= hfill.o matrix.o myamp.o -DSAMPLE = dsample.o ranmar.o DiscreteSampler.o StringCast.o +PROCESS = hfill.o matrix.o myamp.o +DSAMPLE = dsample.o ranmar.o DiscreteSampler.o StringCast.o HBOOK = hfill.o hcurve.o hbook1.o hbook2.o GENERIC = $(alfas_functions).o transpole.o invarients.o hfill.o pawgraphs.o ran1.o \ rw_events.o rw_routines.o kin_functions.o open_file.o basecode.o setrun.o \ @@ -22,7 +22,7 @@ GENSUDGRID = gensudgrid.o is-sud.o setrun_gen.o rw_routines.o open_file.o # Locally compiled libraries -LIBRARIES=$(LIBDIR)libdsample.$(libext) $(LIBDIR)libgeneric.$(libext) +LIBRARIES=$(LIBDIR)libdsample.$(libext) $(LIBDIR)libgeneric.$(libext) # Binaries @@ -32,6 +32,9 @@ BINARIES = $(BINDIR)gen_ximprove $(BINDIR)gensudgrid $(BINDIR)combine_runs all: $(LIBRARIES) $(LIBDIR)libdhelas.$(libext) $(LIBDIR)libpdf.$(libext) $(LIBDIR)libgammaUPC.$(libext) $(LIBDIR)libmodel.$(libext) $(LIBDIR)libcernlib.$(libext) $(LIBDIR)libbias.$(libext) +%.o: %.f *.inc + $(FC) -I. $(MG_FCFLAGS) $(FCFLAGS) -c $< -o $@ + # Libraries $(LIBDIR)libdsample.$(libext): $(DSAMPLE) @@ -39,36 +42,35 @@ $(LIBDIR)libdsample.$(libext): $(DSAMPLE) $(LIBDIR)libgeneric.$(libext): $(GENERIC) $(call CREATELIB, $@, $^) $(LIBDIR)libdhelas.$(libext): DHELAS - cd DHELAS; make; cd .. + $(MAKE) -C $< FFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" FCFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" $(LIBDIR)libpdf.$(libext): PDF make_opts - cd PDF; make; cd .. + $(MAKE) -C $< FFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" FCFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" ifneq (,$(filter edff chff, $(pdlabel1) $(pdlabel2))) $(LIBDIR)libgammaUPC.$(libext): PDF/gammaUPC - cd PDF/gammaUPC; make ; cd ../../ + $(MAKE) -C $< FFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" FCFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" else $(LIBDIR)libgammaUPC.$(libext): PDF/gammaUPC - cd PDF/gammaUPC; make -f makefile_dummy; cd ../../ -endif + $(MAKE) -C $< -f makefile_dummy FFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" FCFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" +endif $(LIBDIR)libcernlib.$(libext): CERNLIB - cd CERNLIB; make; cd .. + $(MAKE) -C $< FFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" FCFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" # The bias library is here the dummy by default; compilation of other ones specified in the run_card will be done by MG5aMC directly. $(LIBDIR)libbias.$(libext): BIAS/dummy - cd BIAS/dummy; make; cd ../../ + $(MAKE) -C $< FFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" FCFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" $(LIBDIR)libmodel.$(libext): MODEL param_card.inc - cd MODEL; make + $(MAKE) -C $< FFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" FCFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" param_card.inc: ../Cards/param_card.dat ../bin/madevent treatcards param + touch $@ # madevent doesn't update the time stamp if there's nothing to do -$(BINDIR)gen_ximprove: gen_ximprove.o ranmar.o rw_routines.o open_file.o - $(FC) $(LDFLAGS) -o $@ $^ -#$(BINDIR)combine_events: $(COMBINE) $(LIBDIR)libmodel.$(libext) $(LIBDIR)libpdf.$(libext) $(LIBDIR)libgammaUPC.$(libext) run_card.inc $(LIBDIR)libbias.$(libext) -# $(FC) -o $@ $(COMBINE) -L$(LIBDIR) -lmodel -lpdf -lgammaUPC $(llhapdf) $(LDFLAGS) -lbias +$(BINDIR)gen_ximprove: gen_ximprove.o ranmar.o rw_routines.o open_file.o + $(FC) $(MG_LDFLAGS) $(LDFLAGS) -o $@ $^ $(BINDIR)gensudgrid: $(GENSUDGRID) $(LIBDIR)libpdf.$(libext) $(LIBDIR)libgammaUPC.$(libext) $(LIBDIR)libcernlib.$(libext) - $(FC) -o $@ $(GENSUDGRID) -L$(LIBDIR) -lmodel -lpdf -lgammaUPC -lcernlib $(llhapdf) $(LDFLAGS) + $(FC) -o $@ $(GENSUDGRID) -L$(LIBDIR) -lmodel -lpdf -lgammaUPC -lcernlib $(llhapdf) $(MG_LDFLAGS) $(LDFLAGS) # Dependencies @@ -85,6 +87,7 @@ rw_events.o: rw_events.f run_config.inc run_card.inc: ../Cards/run_card.dat ../bin/madevent treatcards run + touch $@ # madevent doesn't update the time stamp if there's nothing to do clean4pdf: rm -f ../lib/libpdf.$(libext) @@ -120,7 +123,7 @@ $(LIBDIR)libiregi.a: $(IREGIDIR) cd $(IREGIDIR); make ln -sf ../Source/$(IREGIDIR)libiregi.a $(LIBDIR)libiregi.a -cleanSource: +clean: $(RM) *.o $(LIBRARIES) $(BINARIES) cd PDF; make clean; cd .. cd PDF/gammaUPC; make clean; cd ../../ @@ -132,11 +135,3 @@ cleanSource: cd BIAS/ptj_bias; make clean; cd ../.. if [ -d $(CUTTOOLSDIR) ]; then cd $(CUTTOOLSDIR); make clean; cd ..; fi if [ -d $(IREGIDIR) ]; then cd $(IREGIDIR); make clean; cd ..; fi - -clean: cleanSource - for i in `ls -d ../SubProcesses/P*`; do cd $$i; make clean; cd -; done; - -cleanavx: - for i in `ls -d ../SubProcesses/P*`; do cd $$i; make cleanavxs; cd -; done; -cleanall: cleanSource # THIS IS THE ONE - for i in `ls -d ../SubProcesses/P*`; do cd $$i; make cleanavxs; cd -; done; diff --git a/epochX/cudacpp/ee_mumu.mad/SubProcesses/Bridge.h b/epochX/cudacpp/ee_mumu.mad/SubProcesses/Bridge.h index bf8b5e024d..c263f39a62 100644 --- a/epochX/cudacpp/ee_mumu.mad/SubProcesses/Bridge.h +++ b/epochX/cudacpp/ee_mumu.mad/SubProcesses/Bridge.h @@ -236,7 +236,7 @@ namespace mg5amcCpu #ifdef __CUDACC__ if( ( m_nevt < s_gputhreadsmin ) || ( m_nevt % s_gputhreadsmin != 0 ) ) throw std::runtime_error( "Bridge constructor: nevt should be a multiple of " + std::to_string( s_gputhreadsmin ) ); - while( m_nevt != m_gpublocks * m_gputhreads ) + while( m_nevt != static_cast( m_gpublocks * m_gputhreads ) ) { m_gputhreads /= 2; if( m_gputhreads < s_gputhreadsmin ) @@ -266,7 +266,7 @@ namespace mg5amcCpu template void Bridge::set_gpugrid( const int gpublocks, const int gputhreads ) { - if( m_nevt != gpublocks * gputhreads ) + if( m_nevt != static_cast( gpublocks * gputhreads ) ) throw std::runtime_error( "Bridge: gpublocks*gputhreads must equal m_nevt in set_gpugrid" ); m_gpublocks = gpublocks; m_gputhreads = gputhreads; diff --git a/epochX/cudacpp/ee_mumu.mad/SubProcesses/MadgraphTest.h b/epochX/cudacpp/ee_mumu.mad/SubProcesses/MadgraphTest.h index ef40624c88..b0f2250c25 100644 --- a/epochX/cudacpp/ee_mumu.mad/SubProcesses/MadgraphTest.h +++ b/epochX/cudacpp/ee_mumu.mad/SubProcesses/MadgraphTest.h @@ -199,10 +199,6 @@ class MadgraphTest : public testing::TestWithParam } }; -// Since we link both the CPU-only and GPU tests into the same executable, we prevent -// a multiply defined symbol by only compiling this in the non-CUDA phase: -#ifndef __CUDACC__ - /// Compare momenta and matrix elements. /// This uses an implementation of TestDriverBase to run a madgraph workflow, /// and compares momenta and matrix elements with a reference file. @@ -307,6 +303,4 @@ TEST_P( MadgraphTest, CompareMomentaAndME ) } } -#endif // __CUDACC__ - #endif /* MADGRAPHTEST_H_ */ diff --git a/epochX/cudacpp/ee_mumu.mad/SubProcesses/MatrixElementKernels.cc b/epochX/cudacpp/ee_mumu.mad/SubProcesses/MatrixElementKernels.cc index 74b5239ebf..2d6f27cd5d 100644 --- a/epochX/cudacpp/ee_mumu.mad/SubProcesses/MatrixElementKernels.cc +++ b/epochX/cudacpp/ee_mumu.mad/SubProcesses/MatrixElementKernels.cc @@ -196,6 +196,9 @@ namespace mg5amcGpu void MatrixElementKernelDevice::setGrid( const int gpublocks, const int gputhreads ) { + m_gpublocks = gpublocks; + m_gputhreads = gputhreads; + if( m_gpublocks == 0 ) throw std::runtime_error( "MatrixElementKernelDevice: gpublocks must be > 0 in setGrid" ); if( m_gputhreads == 0 ) throw std::runtime_error( "MatrixElementKernelDevice: gputhreads must be > 0 in setGrid" ); if( this->nevt() != m_gpublocks * m_gputhreads ) throw std::runtime_error( "MatrixElementKernelDevice: nevt mismatch in setGrid" ); diff --git a/epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum/check_sa.cc b/epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum/check_sa.cc index 3fbf0ffbee..07b7304b17 100644 --- a/epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum/check_sa.cc +++ b/epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum/check_sa.cc @@ -81,7 +81,7 @@ namespace mg5amcGpu namespace mg5amcCpu #endif { - inline void FPEhandler( int sig ) + inline void FPEhandler( int ) { #ifdef __CUDACC__ std::cerr << "Floating Point Exception (GPU)" << std::endl; diff --git a/epochX/cudacpp/ee_mumu.mad/SubProcesses/counters.cc b/epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum/counters.cc similarity index 96% rename from epochX/cudacpp/ee_mumu.mad/SubProcesses/counters.cc rename to epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum/counters.cc index cd6ecc8acd..cf875e8be4 100644 --- a/epochX/cudacpp/ee_mumu.mad/SubProcesses/counters.cc +++ b/epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum/counters.cc @@ -1,7 +1,7 @@ // Copyright (C) 2020-2023 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: A. Valassi (Dec 2022) for the MG5aMC CUDACPP plugin. -// Further modified by: A. Valassi (2022-2023) for the MG5aMC CUDACPP plugin. +// Further modified by: S. Hageboeck, A. Valassi (2022-2023) for the MG5aMC CUDACPP plugin. #include "timer.h" #define TIMERTYPE std::chrono::high_resolution_clock @@ -32,6 +32,8 @@ extern "C" case +0: return "CudaCpp"; break; default: assert( false ); break; } + + return 0; } static mgOnGpu::Timer program_timer; @@ -40,7 +42,6 @@ extern "C" static float smatrix1_totaltime = 0; static mgOnGpu::Timer smatrix1multi_timer[nimplC]; static float smatrix1multi_totaltime[nimplC] = { 0 }; - static int matrix1_counter = 0; static int smatrix1_counter = 0; static int smatrix1multi_counter[nimplC] = { 0 }; diff --git a/epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum/counters.cc~madgraph_master b/epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum/counters.cc~madgraph_master deleted file mode 100644 index 3bbdec9387..0000000000 --- a/epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum/counters.cc~madgraph_master +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (C) 2020-2023 CERN and UCLouvain. -// Licensed under the GNU Lesser General Public License (version 3 or later). -// Created by: A. Valassi (Dec 2022) for the MG5aMC CUDACPP plugin. -// Further modified by: S. Hageboeck, A. Valassi (2022-2023) for the MG5aMC CUDACPP plugin. - -#include "timer.h" -#define TIMERTYPE std::chrono::high_resolution_clock - -#include -#include - -// NB1: The C functions counters_xxx_ in this file are called by Fortran code -// Hence the trailing "_": 'call counters_end()' links to counters_end_ -// See http://www.yolinux.com/TUTORIALS/LinuxTutorialMixingFortranAndC.html - -// NB2: This file also contains C++ code and is built using g++ -// Hence use 'extern "C"' to avoid name mangling by the C++ compiler -// See https://www.geeksforgeeks.org/extern-c-in-c - -extern "C" -{ - // Now: fortran=-1, cudacpp=0 - // Eventually: fortran=-1, cuda=0, cpp/none=1, cpp/sse4=2, etc... - constexpr unsigned int nimplC = 2; - constexpr unsigned int iimplF2C( int iimplF ) { return iimplF + 1; } - const char* iimplC2TXT( int iimplC ) - { - const int iimplF = iimplC - 1; - switch( iimplF ) - { - case -1: return "Fortran"; break; - case +0: return "CudaCpp"; break; - default: assert( false ); break; - } - } - - static mgOnGpu::Timer program_timer; - static float program_totaltime = 0; - static mgOnGpu::Timer smatrix1_timer; - static float smatrix1_totaltime = 0; - static mgOnGpu::Timer smatrix1multi_timer[nimplC]; - static float smatrix1multi_totaltime[nimplC] = { 0 }; - static int smatrix1_counter = 0; - static int smatrix1multi_counter[nimplC] = { 0 }; - - void counters_initialise_() - { - program_timer.Start(); - return; - } - - void counters_smatrix1_start_() - { - smatrix1_counter++; - smatrix1_timer.Start(); - return; - } - - void counters_smatrix1_stop_() - { - smatrix1_totaltime += smatrix1_timer.GetDuration(); - return; - } - - void counters_smatrix1multi_start_( const int* iimplF, const int* pnevt ) - { - const unsigned int iimplC = iimplF2C( *iimplF ); - smatrix1multi_counter[iimplC] += *pnevt; - smatrix1multi_timer[iimplC].Start(); - return; - } - - void counters_smatrix1multi_stop_( const int* iimplF ) - { - const unsigned int iimplC = iimplF2C( *iimplF ); - smatrix1multi_totaltime[iimplC] += smatrix1multi_timer[iimplC].GetDuration(); - return; - } - - void counters_finalise_() - { - program_totaltime += program_timer.GetDuration(); - // Write to stdout - float overhead_totaltime = program_totaltime; - for( unsigned int iimplC = 0; iimplC < nimplC; iimplC++ ) overhead_totaltime -= smatrix1multi_totaltime[iimplC]; - printf( " [COUNTERS] PROGRAM TOTAL : %9.4fs\n", program_totaltime ); - printf( " [COUNTERS] Fortran Overhead ( 0 ) : %9.4fs\n", overhead_totaltime ); - for( unsigned int iimplC = 0; iimplC < nimplC; iimplC++ ) - if( smatrix1multi_counter[iimplC] > 0 ) - printf( " [COUNTERS] %7s MEs ( %1d ) : %9.4fs for %8d events => throughput is %8.2E events/s\n", - iimplC2TXT( iimplC ), - iimplC + 1, - smatrix1multi_totaltime[iimplC], - smatrix1multi_counter[iimplC], - smatrix1multi_counter[iimplC] / smatrix1multi_totaltime[iimplC] ); - return; - } -} diff --git a/epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum/ompnumthreads.cc b/epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum/ompnumthreads.cc deleted file mode 120000 index 645dc78215..0000000000 --- a/epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum/ompnumthreads.cc +++ /dev/null @@ -1 +0,0 @@ -../ompnumthreads.cc \ No newline at end of file diff --git a/epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum/ompnumthreads.cc b/epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum/ompnumthreads.cc new file mode 100644 index 0000000000..1d004923b9 --- /dev/null +++ b/epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum/ompnumthreads.cc @@ -0,0 +1,25 @@ +// Copyright (C) 2020-2023 CERN and UCLouvain. +// Licensed under the GNU Lesser General Public License (version 3 or later). +// Created by: A. Valassi (Dec 2022) for the MG5aMC CUDACPP plugin. +// Further modified by: A. Valassi (2022-2023) for the MG5aMC CUDACPP plugin. + +#include + +// NB1: The C function ompnumthreadsNotSetMeansOneThread_ is called by Fortran code +// Hence the trailing "_": 'call xxx()' links to xxx_ +// See http://www.yolinux.com/TUTORIALS/LinuxTutorialMixingFortranAndC.html + +// NB2: This file also contains C++ code and is built using g++ +// Hence use 'extern "C"' to avoid name mangling by the C++ compiler +// See https://www.geeksforgeeks.org/extern-c-in-c + +#ifdef _OPENMP +extern "C" +{ + void ompnumthreads_not_set_means_one_thread_() + { + const int debuglevel = 0; // quiet(-1), info(0), debug(1) + ompnumthreadsNotSetMeansOneThread( debuglevel ); // call the inline C++ function defined in the .h file + } +} +#endif diff --git a/epochX/cudacpp/ee_mumu.mad/SubProcesses/cudacpp.mk b/epochX/cudacpp/ee_mumu.mad/SubProcesses/cudacpp.mk index 509307506b..a522ddb335 100644 --- a/epochX/cudacpp/ee_mumu.mad/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/ee_mumu.mad/SubProcesses/cudacpp.mk @@ -1,56 +1,41 @@ # Copyright (C) 2020-2023 CERN and UCLouvain. # Licensed under the GNU Lesser General Public License (version 3 or later). # Created by: S. Roiser (Feb 2020) for the MG5aMC CUDACPP plugin. -# Further modified by: O. Mattelaer, S. Roiser, A. Valassi (2020-2023) for the MG5aMC CUDACPP plugin. - -#=== Determine the name of this makefile (https://ftp.gnu.org/old-gnu/Manuals/make-3.80/html_node/make_17.html) -#=== NB: use ':=' to ensure that the value of CUDACPP_MAKEFILE is not modified further down after including make_opts -#=== NB: use 'override' to ensure that the value can not be modified from the outside -override CUDACPP_MAKEFILE := $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)) -###$(info CUDACPP_MAKEFILE='$(CUDACPP_MAKEFILE)') - -#=== NB: different names (e.g. cudacpp.mk and cudacpp_src.mk) are used in the Subprocess and src directories -override CUDACPP_SRC_MAKEFILE = cudacpp_src.mk - -#------------------------------------------------------------------------------- - -#=== Use bash in the Makefile (https://www.gnu.org/software/make/manual/html_node/Choosing-the-Shell.html) - -SHELL := /bin/bash - -#------------------------------------------------------------------------------- - -#=== Detect O/S and architecture (assuming uname is available, https://en.wikipedia.org/wiki/Uname) - -# Detect O/S kernel (Linux, Darwin...) -UNAME_S := $(shell uname -s) -###$(info UNAME_S='$(UNAME_S)') - -# Detect architecture (x86_64, ppc64le...) -UNAME_P := $(shell uname -p) -###$(info UNAME_P='$(UNAME_P)') - -#------------------------------------------------------------------------------- - -#=== Include the common MG5aMC Makefile options - -# OM: this is crucial for MG5aMC flag consistency/documentation -# AV: temporarely comment this out because it breaks cudacpp builds -ifneq ($(wildcard ../../Source/make_opts),) -include ../../Source/make_opts -endif +# Further modified by: S. Hageboeck, J. Teig, O. Mattelaer, S. Roiser, A. Valassi (2020-2023) for the MG5aMC CUDACPP plugin. + +# This makefile extends the Fortran makefile called "makefile" + +CUDACPP_SRC_MAKEFILE = cudacpp_src.mk + +# Self-invocation with adapted flags: +cppnative: $(SOURCEDIR_GUARD) $(PROCESS) + $(MAKE) AVX=native AVXFLAGS="-march=native" cppbuild +cppnone: $(SOURCEDIR_GUARD) $(PROCESS) + $(MAKE) AVX=none AVXFLAGS= cppbuild +cppsse4: $(SOURCEDIR_GUARD) $(PROCESS) + $(MAKE) AVX=sse4 AVXFLAGS=-march=nehalem cppbuild +cppavx2: $(SOURCEDIR_GUARD) $(PROCESS) + $(MAKE) AVX=avx2 AVXFLAGS=-march=haswell cppbuild +cppavx512y: $(SOURCEDIR_GUARD) $(PROCESS) + $(MAKE) AVX=512y AVXFLAGS="-march=skylake-avx512 -mprefer-vector-width=256" cppbuild +cppavx512z: $(SOURCEDIR_GUARD) $(PROCESS) + $(MAKE) AVX=512z AVXFLAGS="-march=skylake-avx512 -DMGONGPU_PVW512" cppbuild +cuda: $(SOURCEDIR_GUARD) $(PROCESS) + $(MAKE) AVX=cuda cudabuild #------------------------------------------------------------------------------- #=== Configure common compiler flags for C++ and CUDA +# NB: The base flags are defined in the fortran "makefile" + +# Include directories +INCFLAGS = -I. -I../../src -INCFLAGS = -I. -OPTFLAGS = -O3 # this ends up in CUFLAGS too (should it?), cannot add -Ofast or -ffast-math here +MG_CXXFLAGS += $(INCFLAGS) +MG_NVCCFLAGS += $(INCFLAGS) # Dependency on src directory -MG5AMC_COMMONLIB = mg5amc_common -LIBFLAGS = -L$(LIBDIR) -l$(MG5AMC_COMMONLIB) -INCFLAGS += -I../../src +MG5AMC_COMMONLIB = mg5amc_common # Compiler-specific googletest build directory (#125 and #738) ifneq ($(shell $(CXX) --version | grep '^Intel(R) oneAPI DPC++/C++ Compiler'),) @@ -99,356 +84,42 @@ endif #------------------------------------------------------------------------------- -#=== Configure the C++ compiler - -CXXFLAGS = $(OPTFLAGS) -std=c++17 $(INCFLAGS) -Wall -Wshadow -Wextra -ifeq ($(shell $(CXX) --version | grep ^nvc++),) -CXXFLAGS += -ffast-math # see issue #117 -endif -###CXXFLAGS+= -Ofast # performance is not different from --fast-math -###CXXFLAGS+= -g # FOR DEBUGGING ONLY - -# Optionally add debug flags to display the full list of flags (eg on Darwin) -###CXXFLAGS+= -v - -# Note: AR, CXX and FC are implicitly defined if not set externally -# See https://www.gnu.org/software/make/manual/html_node/Implicit-Variables.html - -# Add -mmacosx-version-min=11.3 to avoid "ld: warning: object file was built for newer macOS version than being linked" -ifneq ($(shell $(CXX) --version | egrep '^Apple clang'),) -CXXFLAGS += -mmacosx-version-min=11.3 -endif - -#------------------------------------------------------------------------------- - -#=== Configure the CUDA compiler - -# If CXX is not a single word (example "clang++ --gcc-toolchain...") then disable CUDA builds (issue #505) -# This is because it is impossible to pass this to "CUFLAGS += -ccbin " below -ifneq ($(words $(subst ccache ,,$(CXX))),1) # allow at most "CXX=ccache " from outside - $(warning CUDA builds are not supported for multi-word CXX "$(CXX)") - override CUDA_HOME=disabled -endif - -# If CUDA_HOME is not set, try to set it from the location of nvcc -ifndef CUDA_HOME - CUDA_HOME = $(patsubst %bin/nvcc,%,$(shell which nvcc 2>/dev/null)) - $(warning CUDA_HOME was not set: using "$(CUDA_HOME)") -endif - -# Set NVCC as $(CUDA_HOME)/bin/nvcc if it exists -ifneq ($(wildcard $(CUDA_HOME)/bin/nvcc),) - NVCC = $(CUDA_HOME)/bin/nvcc - USE_NVTX ?=-DUSE_NVTX - # See https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html - # See https://arnon.dk/matching-sm-architectures-arch-and-gencode-for-various-nvidia-cards/ - # Default: use compute capability 70 for V100 (CERN lxbatch, CERN itscrd, Juwels Cluster). - # Embed device code for 70, and PTX for 70+. - # Export MADGRAPH_CUDA_ARCHITECTURE (comma-separated list) to use another value or list of values (see #533). - # Examples: use 60 for P100 (Piz Daint), 80 for A100 (Juwels Booster, NVidia raplab/Curiosity). - MADGRAPH_CUDA_ARCHITECTURE ?= 70 - ###CUARCHFLAGS = -gencode arch=compute_$(MADGRAPH_CUDA_ARCHITECTURE),code=compute_$(MADGRAPH_CUDA_ARCHITECTURE) -gencode arch=compute_$(MADGRAPH_CUDA_ARCHITECTURE),code=sm_$(MADGRAPH_CUDA_ARCHITECTURE) # Older implementation (AV): go back to this one for multi-GPU support #533 - ###CUARCHFLAGS = --gpu-architecture=compute_$(MADGRAPH_CUDA_ARCHITECTURE) --gpu-code=sm_$(MADGRAPH_CUDA_ARCHITECTURE),compute_$(MADGRAPH_CUDA_ARCHITECTURE) # Newer implementation (SH): cannot use this as-is for multi-GPU support #533 - comma:=, - CUARCHFLAGS = $(foreach arch,$(subst $(comma), ,$(MADGRAPH_CUDA_ARCHITECTURE)),-gencode arch=compute_$(arch),code=compute_$(arch) -gencode arch=compute_$(arch),code=sm_$(arch)) - CUINC = -I$(CUDA_HOME)/include/ - ifeq ($(RNDGEN),hasNoCurand) - CURANDLIBFLAGS= - else - CURANDLIBFLAGS = -L$(CUDA_HOME)/lib64/ -lcurand # NB: -lcuda is not needed here! - endif - CUOPTFLAGS = -lineinfo - CUFLAGS = $(foreach opt, $(OPTFLAGS), -Xcompiler $(opt)) $(CUOPTFLAGS) $(INCFLAGS) $(CUINC) $(USE_NVTX) $(CUARCHFLAGS) -use_fast_math - ###CUFLAGS += -Xcompiler -Wall -Xcompiler -Wextra -Xcompiler -Wshadow - ###NVCC_VERSION = $(shell $(NVCC) --version | grep 'Cuda compilation tools' | cut -d' ' -f5 | cut -d, -f1) - CUFLAGS += -std=c++17 # need CUDA >= 11.2 (see #333): this is enforced in mgOnGpuConfig.h - # Without -maxrregcount: baseline throughput: 6.5E8 (16384 32 12) up to 7.3E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 160 # improves throughput: 6.9E8 (16384 32 12) up to 7.7E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 128 # improves throughput: 7.3E8 (16384 32 12) up to 7.6E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 96 # degrades throughput: 4.1E8 (16384 32 12) up to 4.5E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 64 # degrades throughput: 1.7E8 (16384 32 12) flat at 1.7E8 (65536 128 12) -else ifneq ($(origin REQUIRE_CUDA),undefined) - # If REQUIRE_CUDA is set but no cuda is found, stop here (e.g. for CI tests on GPU #443) - $(error No cuda installation found (set CUDA_HOME or make nvcc visible in PATH)) -else - # No cuda. Switch cuda compilation off and go to common random numbers in C++ - $(warning CUDA_HOME is not set or is invalid: export CUDA_HOME to compile with cuda) - override NVCC= - override USE_NVTX= - override CUINC= - override CURANDLIBFLAGS= -endif -export NVCC -export CUFLAGS - -# Set the host C++ compiler for nvcc via "-ccbin " -# (NB issue #505: this must be a single word, "clang++ --gcc-toolchain..." is not supported) -CUFLAGS += -ccbin $(shell which $(subst ccache ,,$(CXX))) - -# Allow newer (unsupported) C++ compilers with older versions of CUDA if ALLOW_UNSUPPORTED_COMPILER_IN_CUDA is set (#504) -ifneq ($(origin ALLOW_UNSUPPORTED_COMPILER_IN_CUDA),undefined) -CUFLAGS += -allow-unsupported-compiler -endif - -#------------------------------------------------------------------------------- - -#=== Configure ccache for C++ and CUDA builds - -# Enable ccache if USECCACHE=1 -ifeq ($(USECCACHE)$(shell echo $(CXX) | grep ccache),1) - override CXX:=ccache $(CXX) -endif -#ifeq ($(USECCACHE)$(shell echo $(AR) | grep ccache),1) -# override AR:=ccache $(AR) -#endif -ifneq ($(NVCC),) - ifeq ($(USECCACHE)$(shell echo $(NVCC) | grep ccache),1) - override NVCC:=ccache $(NVCC) - endif -endif - -#------------------------------------------------------------------------------- - -#=== Configure PowerPC-specific compiler flags for C++ and CUDA - -# PowerPC-specific CXX compiler flags (being reviewed) -ifeq ($(UNAME_P),ppc64le) - CXXFLAGS+= -mcpu=power9 -mtune=power9 # gains ~2-3% both for none and sse4 - # Throughput references without the extra flags below: none=1.41-1.42E6, sse4=2.15-2.19E6 - ###CXXFLAGS+= -DNO_WARN_X86_INTRINSICS # no change - ###CXXFLAGS+= -fpeel-loops # no change - ###CXXFLAGS+= -funroll-loops # gains ~1% for none, loses ~1% for sse4 - ###CXXFLAGS+= -ftree-vectorize # no change - ###CXXFLAGS+= -flto # would increase to none=4.08-4.12E6, sse4=4.99-5.03E6! -else - ###CXXFLAGS+= -flto # also on Intel this would increase throughputs by a factor 2 to 4... - ######CXXFLAGS+= -fno-semantic-interposition # no benefit (neither alone, nor combined with -flto) -endif - -# PowerPC-specific CUDA compiler flags (to be reviewed!) -ifeq ($(UNAME_P),ppc64le) - CUFLAGS+= -Xcompiler -mno-float128 -endif - -#------------------------------------------------------------------------------- - #=== Configure defaults and check if user-defined choices exist for OMPFLAGS, AVX, FPTYPE, HELINL, HRDCOD, RNDGEN # Set the default OMPFLAGS choice -ifneq ($(shell $(CXX) --version | egrep '^Intel'),) -override OMPFLAGS = -fopenmp -###override OMPFLAGS = # disable OpenMP MT on Intel (was ok without nvcc but not ok with nvcc before #578) -else ifneq ($(shell $(CXX) --version | egrep '^(clang)'),) -override OMPFLAGS = -fopenmp -###override OMPFLAGS = # disable OpenMP MT on clang (was not ok without or with nvcc before #578) -###else ifneq ($(shell $(CXX) --version | egrep '^(Apple clang)'),) # AV for Mac (Apple clang compiler) -else ifeq ($(UNAME_S),Darwin) # OM for Mac (any compiler) +OMPFLAGS ?= -fopenmp +ifeq ($(UNAME_S),Darwin) # OM for Mac (any compiler) override OMPFLAGS = # AV disable OpenMP MT on Apple clang (builds fail in the CI #578) -###override OMPFLAGS = -fopenmp # OM reenable OpenMP MT on Apple clang? (AV Oct 2023: this still fails in the CI) -else -override OMPFLAGS = -fopenmp # enable OpenMP MT by default on all other platforms -###override OMPFLAGS = # disable OpenMP MT on all other platforms (default before #575) -endif - -# Set the default AVX (vectorization) choice -ifeq ($(AVX),) - ifeq ($(UNAME_P),ppc64le) - ###override AVX = none - override AVX = sse4 - else ifeq ($(UNAME_P),arm) - ###override AVX = none - override AVX = sse4 - else ifeq ($(wildcard /proc/cpuinfo),) - override AVX = none - $(warning Using AVX='$(AVX)' because host SIMD features cannot be read from /proc/cpuinfo) - else ifeq ($(shell grep -m1 -c avx512vl /proc/cpuinfo)$(shell $(CXX) --version | grep ^clang),1) - override AVX = 512y - ###$(info Using AVX='$(AVX)' as no user input exists) - else - override AVX = avx2 - ifneq ($(shell grep -m1 -c avx512vl /proc/cpuinfo),1) - $(warning Using AVX='$(AVX)' because host does not support avx512vl) - else - $(warning Using AVX='$(AVX)' because this is faster than avx512vl for clang) - endif - endif -else - ###$(info Using AVX='$(AVX)' according to user input) -endif - -# Set the default FPTYPE (floating point type) choice -ifeq ($(FPTYPE),) - override FPTYPE = d -endif - -# Set the default HELINL (inline helicities?) choice -ifeq ($(HELINL),) - override HELINL = 0 -endif - -# Set the default HRDCOD (hardcode cIPD physics parameters?) choice -ifeq ($(HRDCOD),) - override HRDCOD = 0 -endif - -# Set the default RNDGEN (random number generator) choice -ifeq ($(RNDGEN),) - ifeq ($(NVCC),) - override RNDGEN = hasNoCurand - else ifeq ($(RNDGEN),) - override RNDGEN = hasCurand - endif endif -# Export AVX, FPTYPE, HELINL, HRDCOD, RNDGEN, OMPFLAGS so that it is not necessary to pass them to the src Makefile too -export AVX -export FPTYPE -export HELINL -export HRDCOD -export RNDGEN +# Export here, so sub makes don't fall back to the defaults: export OMPFLAGS -#------------------------------------------------------------------------------- - -#=== Set the CUDA/C++ compiler flags appropriate to user-defined choices of AVX, FPTYPE, HELINL, HRDCOD, RNDGEN - -# Set the build flags appropriate to OMPFLAGS -$(info OMPFLAGS=$(OMPFLAGS)) -CXXFLAGS += $(OMPFLAGS) - -# Set the build flags appropriate to each AVX choice (example: "make AVX=none") -# [NB MGONGPU_PVW512 is needed because "-mprefer-vector-width=256" is not exposed in a macro] -# [See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96476] -$(info AVX=$(AVX)) -ifeq ($(UNAME_P),ppc64le) - ifeq ($(AVX),sse4) - override AVXFLAGS = -D__SSE4_2__ # Power9 VSX with 128 width (VSR registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on PowerPC for the moment) - endif -else ifeq ($(UNAME_P),arm) - ifeq ($(AVX),sse4) - override AVXFLAGS = -D__SSE4_2__ # ARM NEON with 128 width (Q/quadword registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on ARM for the moment) - endif -else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 - ifeq ($(AVX),none) - override AVXFLAGS = -mno-sse3 # no SIMD - else ifeq ($(AVX),sse4) - override AVXFLAGS = -mno-avx # SSE4.2 with 128 width (xmm registers) - else ifeq ($(AVX),avx2) - override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(AVX),512y) - override AVXFLAGS = -march=skylake -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(AVX),512z) - override AVXFLAGS = -march=skylake -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) - else - $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) - endif -else - ifeq ($(AVX),none) - override AVXFLAGS = -march=x86-64 # no SIMD (see #588) - else ifeq ($(AVX),sse4) - override AVXFLAGS = -march=nehalem # SSE4.2 with 128 width (xmm registers) - else ifeq ($(AVX),avx2) - override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(AVX),512y) - override AVXFLAGS = -march=skylake-avx512 -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(AVX),512z) - override AVXFLAGS = -march=skylake-avx512 -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) - else - $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) - endif -endif -# For the moment, use AVXFLAGS everywhere: eventually, use them only in encapsulated implementations? -CXXFLAGS+= $(AVXFLAGS) - -# Set the build flags appropriate to each FPTYPE choice (example: "make FPTYPE=f") -$(info FPTYPE=$(FPTYPE)) -ifeq ($(FPTYPE),d) - CXXFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_DOUBLE - CUFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_DOUBLE -else ifeq ($(FPTYPE),f) - CXXFLAGS += -DMGONGPU_FPTYPE_FLOAT -DMGONGPU_FPTYPE2_FLOAT - CUFLAGS += -DMGONGPU_FPTYPE_FLOAT -DMGONGPU_FPTYPE2_FLOAT -else ifeq ($(FPTYPE),m) - CXXFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_FLOAT - CUFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_FLOAT -else - $(error Unknown FPTYPE='$(FPTYPE)': only 'd', 'f' and 'm' are supported) -endif - -# Set the build flags appropriate to each HELINL choice (example: "make HELINL=1") -$(info HELINL=$(HELINL)) -ifeq ($(HELINL),1) - CXXFLAGS += -DMGONGPU_INLINE_HELAMPS - CUFLAGS += -DMGONGPU_INLINE_HELAMPS -else ifneq ($(HELINL),0) - $(error Unknown HELINL='$(HELINL)': only '0' and '1' are supported) -endif - -# Set the build flags appropriate to each HRDCOD choice (example: "make HRDCOD=1") -$(info HRDCOD=$(HRDCOD)) -ifeq ($(HRDCOD),1) - CXXFLAGS += -DMGONGPU_HARDCODE_PARAM - CUFLAGS += -DMGONGPU_HARDCODE_PARAM -else ifneq ($(HRDCOD),0) - $(error Unknown HRDCOD='$(HRDCOD)': only '0' and '1' are supported) -endif - -# Set the build flags appropriate to each RNDGEN choice (example: "make RNDGEN=hasNoCurand") -$(info RNDGEN=$(RNDGEN)) -ifeq ($(RNDGEN),hasNoCurand) - override CXXFLAGSCURAND = -DMGONGPU_HAS_NO_CURAND -else ifeq ($(RNDGEN),hasCurand) - override CXXFLAGSCURAND = -else - $(error Unknown RNDGEN='$(RNDGEN)': only 'hasCurand' and 'hasNoCurand' are supported) -endif +MG_CXXFLAGS += $(OMPFLAGS) #------------------------------------------------------------------------------- #=== Configure build directories and build lockfiles === -# Build directory "short" tag (defines target and path to the optional build directory) -# (Rationale: keep directory names shorter, e.g. do not include random number generator choice) -override DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) - -# Build lockfile "full" tag (defines full specification of build options that cannot be intermixed) -# (Rationale: avoid mixing of CUDA and no-CUDA environment builds with different random number generators) -override TAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) - -# Build directory: current directory by default, or build.$(DIRTAG) if USEBUILDDIR==1 -ifeq ($(USEBUILDDIR),1) - override BUILDDIR = build.$(DIRTAG) - override LIBDIR = ../../lib/$(BUILDDIR) - override LIBDIRRPATH = '$$ORIGIN/../$(LIBDIR)' - $(info Building in BUILDDIR=$(BUILDDIR) for tag=$(TAG) (USEBUILDDIR is set = 1)) -else - override BUILDDIR = . - override LIBDIR = ../../lib - override LIBDIRRPATH = '$$ORIGIN/$(LIBDIR)' - $(info Building in BUILDDIR=$(BUILDDIR) for tag=$(TAG) (USEBUILDDIR is not set)) +# Build directory "short" tag (defines target and path to the build directory) +DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) +CUDACPP_BUILDDIR = build.$(DIRTAG) +CUDACPP_LIBDIR := ../../lib/$(CUDACPP_BUILDDIR) +LIBDIRRPATH := '$$ORIGIN:$$ORIGIN/../$(CUDACPP_LIBDIR)' +ifneq ($(AVX),) + $(info Building CUDACPP in CUDACPP_BUILDDIR=$(CUDACPP_BUILDDIR). Libs in $(CUDACPP_LIBDIR)) endif -###override INCDIR = ../../include -###$(info Building in BUILDDIR=$(BUILDDIR) for tag=$(TAG)) -# On Linux, set rpath to LIBDIR to make it unnecessary to use LD_LIBRARY_PATH +# On Linux, set rpath to CUDACPP_LIBDIR to make it unnecessary to use LD_LIBRARY_PATH # Use relative paths with respect to the executables or shared libraries ($ORIGIN on Linux) -# On Darwin, building libraries with absolute paths in LIBDIR makes this unnecessary +# On Darwin, building libraries with absolute paths in CUDACPP_LIBDIR makes this unnecessary ifeq ($(UNAME_S),Darwin) override CXXLIBFLAGSRPATH = override CULIBFLAGSRPATH = - override CXXLIBFLAGSRPATH2 = - override CULIBFLAGSRPATH2 = else # RPATH to cuda/cpp libs when linking executables override CXXLIBFLAGSRPATH = -Wl,-rpath,$(LIBDIRRPATH) override CULIBFLAGSRPATH = -Xlinker -rpath,$(LIBDIRRPATH) - # RPATH to common lib when linking cuda/cpp libs - override CXXLIBFLAGSRPATH2 = -Wl,-rpath,'$$ORIGIN' - override CULIBFLAGSRPATH2 = -Xlinker -rpath,'$$ORIGIN' endif # Setting LD_LIBRARY_PATH or DYLD_LIBRARY_PATH in the RUNTIME is no longer necessary (neither on Linux nor on Mac) @@ -458,107 +129,68 @@ override RUNTIME = #=== Makefile TARGETS and build rules below #=============================================================================== -cxx_main=$(BUILDDIR)/check.exe -fcxx_main=$(BUILDDIR)/fcheck.exe +cxx_main=$(CUDACPP_BUILDDIR)/check.exe +fcxx_main=$(CUDACPP_BUILDDIR)/fcheck.exe -ifneq ($(NVCC),) -cu_main=$(BUILDDIR)/gcheck.exe -fcu_main=$(BUILDDIR)/fgcheck.exe -else -cu_main= -fcu_main= -endif - -testmain=$(BUILDDIR)/runTest.exe +cu_main=$(CUDACPP_BUILDDIR)/gcheck.exe +fcu_main=$(CUDACPP_BUILDDIR)/fgcheck.exe ifneq ($(GTESTLIBS),) -all.$(TAG): $(BUILDDIR)/.build.$(TAG) $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_main) $(cxx_main) $(fcu_main) $(fcxx_main) $(testmain) -else -all.$(TAG): $(BUILDDIR)/.build.$(TAG) $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_main) $(cxx_main) $(fcu_main) $(fcxx_main) +testmain=$(CUDACPP_BUILDDIR)/runTest.exe +cutestmain=$(CUDACPP_BUILDDIR)/runTest_cuda.exe endif -# Target (and build options): debug -MAKEDEBUG= -debug: OPTFLAGS = -g -O0 -debug: CUOPTFLAGS = -G -debug: MAKEDEBUG := debug -debug: all.$(TAG) - -# Target: tag-specific build lockfiles -override oldtagsb=`if [ -d $(BUILDDIR) ]; then find $(BUILDDIR) -maxdepth 1 -name '.build.*' ! -name '.build.$(TAG)' -exec echo $(shell pwd)/{} \; ; fi` -$(BUILDDIR)/.build.$(TAG): - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - @if [ "$(oldtagsb)" != "" ]; then echo "Cannot build for tag=$(TAG) as old builds exist for other tags:"; echo " $(oldtagsb)"; echo "Please run 'make clean' first\nIf 'make clean' is not enough: run 'make clean USEBUILDDIR=1 AVX=$(AVX) FPTYPE=$(FPTYPE)' or 'make cleanall'"; exit 1; fi - @touch $(BUILDDIR)/.build.$(TAG) +cppbuild: $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(cxx_main) $(fcxx_main) $(testmain) +cudabuild: $(CUDACPP_BUILDDIR)/$(PROG)_cuda $(cu_main) $(fcu_main) $(cutestmain) # Generic target and build rules: objects from CUDA compilation -ifneq ($(NVCC),) -$(BUILDDIR)/%.o : %.cu *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c $< -o $@ +$(CUDACPP_BUILDDIR)/%.o : %.cu *.h ../../src/*.h + @mkdir -p $(CUDACPP_BUILDDIR) + $(NVCC) $(MG_NVCCFLAGS) $(NVCCFLAGS) -c $< -o $@ -$(BUILDDIR)/%_cu.o : %.cc *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c -x cu $< -o $@ -endif +$(CUDACPP_BUILDDIR)/%_cu.o : %.cc *.h ../../src/*.h + @mkdir -p $(CUDACPP_BUILDDIR) + $(NVCC) $(MG_NVCCFLAGS) $(NVCCFLAGS) -c -x cu $< -o $@ # Generic target and build rules: objects from C++ compilation # (NB do not include CUINC here! add it only for NVTX or curand #679) -$(BUILDDIR)/%.o : %.cc *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - $(CXX) $(CPPFLAGS) $(CXXFLAGS) -fPIC -c $< -o $@ +$(CUDACPP_BUILDDIR)/%.o : %.cc *.h ../../src/*.h + @mkdir -p $(CUDACPP_BUILDDIR) + $(CXX) $(MG_CXXFLAGS) $(CXXFLAGS) -c $< -o $@ # Apply special build flags only to CrossSectionKernel.cc and gCrossSectionKernel.cu (no fast math, see #117 and #516) ifeq ($(shell $(CXX) --version | grep ^nvc++),) -$(BUILDDIR)/CrossSectionKernels.o: CXXFLAGS := $(filter-out -ffast-math,$(CXXFLAGS)) -$(BUILDDIR)/CrossSectionKernels.o: CXXFLAGS += -fno-fast-math +$(CUDACPP_BUILDDIR)/CrossSectionKernels.o: CXXFLAGS += -fno-fast-math ifneq ($(NVCC),) -$(BUILDDIR)/gCrossSectionKernels.o: CUFLAGS += -Xcompiler -fno-fast-math +$(CUDACPP_BUILDDIR)/gCrossSectionKernels.o: NVCCFLAGS += -Xcompiler -fno-fast-math endif endif # Apply special build flags only to check_sa.o and gcheck_sa.o (NVTX in timermap.h, #679) -$(BUILDDIR)/check_sa.o: CXXFLAGS += $(USE_NVTX) $(CUINC) -$(BUILDDIR)/gcheck_sa.o: CXXFLAGS += $(USE_NVTX) $(CUINC) +$(CUDACPP_BUILDDIR)/check_sa.o: MG_CXXFLAGS += $(USE_NVTX) $(CUINC) +$(CUDACPP_BUILDDIR)/gcheck_sa.o: MG_CXXFLAGS += $(USE_NVTX) $(CUINC) # Apply special build flags only to check_sa and CurandRandomNumberKernel (curand headers, #679) -$(BUILDDIR)/check_sa.o: CXXFLAGS += $(CXXFLAGSCURAND) -$(BUILDDIR)/gcheck_sa.o: CUFLAGS += $(CXXFLAGSCURAND) -$(BUILDDIR)/CurandRandomNumberKernel.o: CXXFLAGS += $(CXXFLAGSCURAND) -$(BUILDDIR)/gCurandRandomNumberKernel.o: CUFLAGS += $(CXXFLAGSCURAND) -ifeq ($(RNDGEN),hasCurand) -$(BUILDDIR)/CurandRandomNumberKernel.o: CXXFLAGS += $(CUINC) -endif +$(CUDACPP_BUILDDIR)/check_sa.o: MG_CXXFLAGS += $(CXXFLAGSCURAND) +$(CUDACPP_BUILDDIR)/gcheck_sa.o: MG_NVCCFLAGS += $(CXXFLAGSCURAND) +$(CUDACPP_BUILDDIR)/CurandRandomNumberKernel.o: MG_CXXFLAGS += $(CXXFLAGSCURAND) +$(CUDACPP_BUILDDIR)/gCurandRandomNumberKernel.o: MG_NVCCFLAGS += $(CXXFLAGSCURAND) + # Avoid "warning: builtin __has_trivial_... is deprecated; use __is_trivially_... instead" in nvcc with icx2023 (#592) ifneq ($(shell $(CXX) --version | egrep '^(Intel)'),) ifneq ($(NVCC),) -CUFLAGS += -Xcompiler -Wno-deprecated-builtins +MG_NVCCFLAGS += -Xcompiler -Wno-deprecated-builtins endif endif -# Avoid clang warning "overriding '-ffp-contract=fast' option with '-ffp-contract=on'" (#516) -# This patch does remove the warning, but I prefer to keep it disabled for the moment... -###ifneq ($(shell $(CXX) --version | egrep '^(clang|Apple clang|Intel)'),) -###$(BUILDDIR)/CrossSectionKernels.o: CXXFLAGS += -Wno-overriding-t-option -###ifneq ($(NVCC),) -###$(BUILDDIR)/gCrossSectionKernels.o: CUFLAGS += -Xcompiler -Wno-overriding-t-option -###endif -###endif - #### Apply special build flags only to CPPProcess.cc (-flto) ###$(BUILDDIR)/CPPProcess.o: CXXFLAGS += -flto -#### Apply special build flags only to CPPProcess.cc (AVXFLAGS) -###$(BUILDDIR)/CPPProcess.o: CXXFLAGS += $(AVXFLAGS) - #------------------------------------------------------------------------------- -# Target (and build rules): common (src) library -commonlib : $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so - -$(LIBDIR)/lib$(MG5AMC_COMMONLIB).so: ../../src/*.h ../../src/*.cc $(BUILDDIR)/.build.$(TAG) - $(MAKE) -C ../../src $(MAKEDEBUG) -f $(CUDACPP_SRC_MAKEFILE) +$(CUDACPP_LIBDIR)/lib$(MG5AMC_COMMONLIB).so: ../../src/*.h ../../src/*.cc + $(MAKE) AVX=$(AVX) AVXFLAGS="$(AVXFLAGS)" -C ../../src -f $(CUDACPP_SRC_MAKEFILE) #------------------------------------------------------------------------------- @@ -566,162 +198,123 @@ processid_short=$(shell basename $(CURDIR) | awk -F_ '{print $$(NF-1)"_"$$NF}') ###$(info processid_short=$(processid_short)) MG5AMC_CXXLIB = mg5amc_$(processid_short)_cpp -cxx_objects_lib=$(BUILDDIR)/CPPProcess.o $(BUILDDIR)/MatrixElementKernels.o $(BUILDDIR)/BridgeKernels.o $(BUILDDIR)/CrossSectionKernels.o -cxx_objects_exe=$(BUILDDIR)/CommonRandomNumberKernel.o $(BUILDDIR)/RamboSamplingKernels.o +cxx_objects_lib=$(CUDACPP_BUILDDIR)/CPPProcess.o $(CUDACPP_BUILDDIR)/MatrixElementKernels.o $(CUDACPP_BUILDDIR)/BridgeKernels.o $(CUDACPP_BUILDDIR)/CrossSectionKernels.o +cxx_objects_exe=$(CUDACPP_BUILDDIR)/CommonRandomNumberKernel.o $(CUDACPP_BUILDDIR)/RamboSamplingKernels.o -ifneq ($(NVCC),) MG5AMC_CULIB = mg5amc_$(processid_short)_cuda -cu_objects_lib=$(BUILDDIR)/gCPPProcess.o $(BUILDDIR)/gMatrixElementKernels.o $(BUILDDIR)/gBridgeKernels.o $(BUILDDIR)/gCrossSectionKernels.o -cu_objects_exe=$(BUILDDIR)/gCommonRandomNumberKernel.o $(BUILDDIR)/gRamboSamplingKernels.o -endif +cu_objects_lib=$(CUDACPP_BUILDDIR)/gCPPProcess.o $(CUDACPP_BUILDDIR)/gMatrixElementKernels.o $(CUDACPP_BUILDDIR)/gBridgeKernels.o $(CUDACPP_BUILDDIR)/gCrossSectionKernels.o +cu_objects_exe=$(CUDACPP_BUILDDIR)/gCommonRandomNumberKernel.o $(CUDACPP_BUILDDIR)/gRamboSamplingKernels.o # Target (and build rules): C++ and CUDA shared libraries -$(LIBDIR)/lib$(MG5AMC_CXXLIB).so: $(BUILDDIR)/fbridge.o -$(LIBDIR)/lib$(MG5AMC_CXXLIB).so: cxx_objects_lib += $(BUILDDIR)/fbridge.o -$(LIBDIR)/lib$(MG5AMC_CXXLIB).so: $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cxx_objects_lib) - $(CXX) -shared -o $@ $(cxx_objects_lib) $(CXXLIBFLAGSRPATH2) -L$(LIBDIR) -l$(MG5AMC_COMMONLIB) - -ifneq ($(NVCC),) -$(LIBDIR)/lib$(MG5AMC_CULIB).so: $(BUILDDIR)/fbridge_cu.o -$(LIBDIR)/lib$(MG5AMC_CULIB).so: cu_objects_lib += $(BUILDDIR)/fbridge_cu.o -$(LIBDIR)/lib$(MG5AMC_CULIB).so: $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_objects_lib) - $(NVCC) --shared -o $@ $(cu_objects_lib) $(CULIBFLAGSRPATH2) -L$(LIBDIR) -l$(MG5AMC_COMMONLIB) -endif +$(CUDACPP_BUILDDIR)/lib$(MG5AMC_CXXLIB).so: $(CUDACPP_BUILDDIR)/fbridge.o +$(CUDACPP_BUILDDIR)/lib$(MG5AMC_CXXLIB).so: cxx_objects_lib += $(CUDACPP_BUILDDIR)/fbridge.o +$(CUDACPP_BUILDDIR)/lib$(MG5AMC_CXXLIB).so: $(CUDACPP_LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cxx_objects_lib) + $(CXX) -shared -o $@ $(cxx_objects_lib) $(CXXLIBFLAGSRPATH) -L$(CUDACPP_LIBDIR) -l$(MG5AMC_COMMONLIB) $(MG_LDFLAGS) $(LDFLAGS) -#------------------------------------------------------------------------------- - -# Target (and build rules): Fortran include files -###$(INCDIR)/%.inc : ../%.inc -### @if [ ! -d $(INCDIR) ]; then echo "mkdir -p $(INCDIR)"; mkdir -p $(INCDIR); fi -### \cp $< $@ +$(CUDACPP_BUILDDIR)/lib$(MG5AMC_CULIB).so: $(CUDACPP_BUILDDIR)/fbridge_cu.o +$(CUDACPP_BUILDDIR)/lib$(MG5AMC_CULIB).so: cu_objects_lib += $(CUDACPP_BUILDDIR)/fbridge_cu.o +$(CUDACPP_BUILDDIR)/lib$(MG5AMC_CULIB).so: $(CUDACPP_LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_objects_lib) + $(NVCC) --shared -o $@ $(cu_objects_lib) $(CULIBFLAGSRPATH) -L$(CUDACPP_LIBDIR) -l$(MG5AMC_COMMONLIB) #------------------------------------------------------------------------------- # Target (and build rules): C++ and CUDA standalone executables -$(cxx_main): LIBFLAGS += $(CXXLIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH -$(cxx_main): $(BUILDDIR)/check_sa.o $(LIBDIR)/lib$(MG5AMC_CXXLIB).so $(cxx_objects_exe) $(BUILDDIR)/CurandRandomNumberKernel.o - $(CXX) -o $@ $(BUILDDIR)/check_sa.o $(OMPFLAGS) -ldl -pthread $(LIBFLAGS) -L$(LIBDIR) -l$(MG5AMC_CXXLIB) $(cxx_objects_exe) $(BUILDDIR)/CurandRandomNumberKernel.o $(CURANDLIBFLAGS) -ifneq ($(NVCC),) +$(cxx_main): MG_LDFLAGS += $(CXXLIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH +$(cxx_main): MG_LDFLAGS += -L$(CUDACPP_BUILDDIR) -l$(MG5AMC_CXXLIB) # Process-specific library +$(cxx_main): $(CUDACPP_BUILDDIR)/check_sa.o $(CUDACPP_BUILDDIR)/lib$(MG5AMC_CXXLIB).so $(cxx_objects_exe) $(CUDACPP_BUILDDIR)/CurandRandomNumberKernel.o + $(CXX) -o $@ $(CUDACPP_BUILDDIR)/check_sa.o $(OMPFLAGS) -ldl -pthread $(cxx_objects_exe) $(CUDACPP_BUILDDIR)/CurandRandomNumberKernel.o $(MG_LDFLAGS) $(LDFLAGS) + ifneq ($(shell $(CXX) --version | grep ^Intel),) -$(cu_main): LIBFLAGS += -lintlc # compile with icpx and link with nvcc (undefined reference to `_intel_fast_memcpy') -$(cu_main): LIBFLAGS += -lsvml # compile with icpx and link with nvcc (undefined reference to `__svml_cos4_l9') +$(cu_main): MG_LDFLAGS += -lintlc # compile with icpx and link with nvcc (undefined reference to `_intel_fast_memcpy') +$(cu_main): MG_LDFLAGS += -lsvml # compile with icpx and link with nvcc (undefined reference to `__svml_cos4_l9') else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 -$(cu_main): LIBFLAGS += -L$(patsubst %bin/nvc++,%lib,$(subst ccache ,,$(CXX))) -lnvhpcatm -lnvcpumath -lnvc -endif -$(cu_main): LIBFLAGS += $(CULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH -$(cu_main): $(BUILDDIR)/gcheck_sa.o $(LIBDIR)/lib$(MG5AMC_CULIB).so $(cu_objects_exe) $(BUILDDIR)/gCurandRandomNumberKernel.o - $(NVCC) -o $@ $(BUILDDIR)/gcheck_sa.o $(CUARCHFLAGS) $(LIBFLAGS) -L$(LIBDIR) -l$(MG5AMC_CULIB) $(cu_objects_exe) $(BUILDDIR)/gCurandRandomNumberKernel.o $(CURANDLIBFLAGS) +$(cu_main): MG_LDFLAGS += -L$(patsubst %bin/nvc++,%lib,$(subst ccache ,,$(CXX))) -lnvhpcatm -lnvcpumath -lnvc endif +$(cu_main): MG_LDFLAGS += $(CULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH +$(cu_main): MG_LDFLAGS += -L$(CUDACPP_BUILDDIR) -l$(MG5AMC_CULIB) # Process-specific library +$(cu_main): $(CUDACPP_BUILDDIR)/gcheck_sa.o $(CUDACPP_BUILDDIR)/lib$(MG5AMC_CULIB).so $(cu_objects_exe) $(CUDACPP_BUILDDIR)/gCurandRandomNumberKernel.o + $(NVCC) -o $@ $(CUDACPP_BUILDDIR)/gcheck_sa.o $(CUARCHFLAGS) $(cu_objects_exe) $(CUDACPP_BUILDDIR)/gCurandRandomNumberKernel.o $(MG_LDFLAGS) $(LDFLAGS) #------------------------------------------------------------------------------- - -# Generic target and build rules: objects from Fortran compilation -$(BUILDDIR)/%.o : %.f *.inc - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - $(FC) -I. -c $< -o $@ - -# Generic target and build rules: objects from Fortran compilation -###$(BUILDDIR)/%.o : %.f *.inc -### @if [ ! -d $(INCDIR) ]; then echo "mkdir -p $(INCDIR)"; mkdir -p $(INCDIR); fi -### @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi -### $(FC) -I. -I$(INCDIR) -c $< -o $@ - -# Target (and build rules): Fortran standalone executables -###$(BUILDDIR)/fcheck_sa.o : $(INCDIR)/fbridge.inc +# Check executables: ifeq ($(UNAME_S),Darwin) -$(fcxx_main): LIBFLAGS += -L$(shell dirname $(shell $(FC) --print-file-name libgfortran.dylib)) # add path to libgfortran on Mac #375 +$(fcxx_main): MG_LDFLAGS += -L$(shell dirname $(shell $(FC) --print-file-name libgfortran.dylib)) # add path to libgfortran on Mac #375 endif -$(fcxx_main): LIBFLAGS += $(CXXLIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH -$(fcxx_main): $(BUILDDIR)/fcheck_sa.o $(BUILDDIR)/fsampler.o $(LIBDIR)/lib$(MG5AMC_CXXLIB).so $(cxx_objects_exe) - $(CXX) -o $@ $(BUILDDIR)/fcheck_sa.o $(OMPFLAGS) $(BUILDDIR)/fsampler.o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_CXXLIB) $(cxx_objects_exe) +$(fcxx_main): MG_LDFLAGS += $(CXXLIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH +$(fcxx_main): MG_LDFLAGS += -L$(CUDACPP_BUILDDIR) -l$(MG5AMC_CXXLIB) # Process-specific library +$(fcxx_main): $(CUDACPP_BUILDDIR)/fcheck_sa.o $(CUDACPP_BUILDDIR)/fsampler.o $(CUDACPP_BUILDDIR)/lib$(MG5AMC_CXXLIB).so $(cxx_objects_exe) + $(CXX) -o $@ $(CUDACPP_BUILDDIR)/fcheck_sa.o $(cxx_objects_exe) $(OMPFLAGS) $(CUDACPP_BUILDDIR)/fsampler.o -lgfortran -L$(CUDACPP_LIBDIR) $(MG_LDFLAGS) $(LDFLAGS) -ifneq ($(NVCC),) ifneq ($(shell $(CXX) --version | grep ^Intel),) -$(fcu_main): LIBFLAGS += -lintlc # compile with icpx and link with nvcc (undefined reference to `_intel_fast_memcpy') -$(fcu_main): LIBFLAGS += -lsvml # compile with icpx and link with nvcc (undefined reference to `__svml_cos4_l9') +$(fcu_main): MG_LDFLAGS += -lintlc # compile with icpx and link with nvcc (undefined reference to `_intel_fast_memcpy') +$(fcu_main): MG_LDFLAGS += -lsvml # compile with icpx and link with nvcc (undefined reference to `__svml_cos4_l9') endif ifeq ($(UNAME_S),Darwin) -$(fcu_main): LIBFLAGS += -L$(shell dirname $(shell $(FC) --print-file-name libgfortran.dylib)) # add path to libgfortran on Mac #375 -endif -$(fcu_main): LIBFLAGS += $(CULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH -$(fcu_main): $(BUILDDIR)/fcheck_sa.o $(BUILDDIR)/fsampler_cu.o $(LIBDIR)/lib$(MG5AMC_CULIB).so $(cu_objects_exe) - $(NVCC) -o $@ $(BUILDDIR)/fcheck_sa.o $(BUILDDIR)/fsampler_cu.o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_CULIB) $(cu_objects_exe) +$(fcu_main): MG_LDFLAGS += -L$(shell dirname $(shell $(FC) --print-file-name libgfortran.dylib)) # add path to libgfortran on Mac #375 endif +$(fcu_main): MG_LDFLAGS += $(CULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH +$(fcu_main): MG_LDFLAGS += -L$(CUDACPP_BUILDDIR) -l$(MG5AMC_CULIB) # Process-specific library +$(fcu_main): $(CUDACPP_BUILDDIR)/fcheck_sa.o $(CUDACPP_BUILDDIR)/fsampler_cu.o $(CUDACPP_BUILDDIR)/lib$(MG5AMC_CULIB).so $(cu_objects_exe) + $(NVCC) -o $@ $(CUDACPP_BUILDDIR)/fcheck_sa.o $(CUDACPP_BUILDDIR)/fsampler_cu.o $(cu_objects_exe) -lgfortran $(MG_LDFLAGS) $(LDFLAGS) #------------------------------------------------------------------------------- # Target (and build rules): test objects and test executable -$(BUILDDIR)/testxxx.o: $(GTESTLIBS) -$(BUILDDIR)/testxxx.o: INCFLAGS += $(GTESTINC) -$(BUILDDIR)/testxxx.o: testxxx_cc_ref.txt -$(testmain): $(BUILDDIR)/testxxx.o -$(testmain): cxx_objects_exe += $(BUILDDIR)/testxxx.o # Comment out this line to skip the C++ test of xxx functions -ifneq ($(NVCC),) -$(BUILDDIR)/testxxx_cu.o: $(GTESTLIBS) -$(BUILDDIR)/testxxx_cu.o: INCFLAGS += $(GTESTINC) -$(BUILDDIR)/testxxx_cu.o: testxxx_cc_ref.txt -$(testmain): $(BUILDDIR)/testxxx_cu.o -$(testmain): cu_objects_exe += $(BUILDDIR)/testxxx_cu.o # Comment out this line to skip the CUDA test of xxx functions -endif +$(testmain) $(cutestmain): $(GTESTLIBS) +$(testmain) $(cutestmain): INCFLAGS += $(GTESTINC) +$(testmain) $(cutestmain): MG_LDFLAGS += -L$(GTESTLIBDIR) -lgtest -lgtest_main -$(BUILDDIR)/testmisc.o: $(GTESTLIBS) -$(BUILDDIR)/testmisc.o: INCFLAGS += $(GTESTINC) -$(testmain): $(BUILDDIR)/testmisc.o -$(testmain): cxx_objects_exe += $(BUILDDIR)/testmisc.o # Comment out this line to skip the C++ miscellaneous tests +$(CUDACPP_BUILDDIR)/testxxx.o $(CUDACPP_BUILDDIR)/testxxx_cu.o: $(GTESTLIBS) testxxx_cc_ref.txt +$(testmain): $(CUDACPP_BUILDDIR)/testxxx.o +$(testmain): cxx_objects_exe += $(CUDACPP_BUILDDIR)/testxxx.o # Comment out this line to skip the C++ test of xxx functions +$(cutestmain): $(CUDACPP_BUILDDIR)/testxxx_cu.o +$(cutestmain): cu_objects_exe += $(CUDACPP_BUILDDIR)/testxxx_cu.o # Comment out this line to skip the CUDA test of xxx functions -ifneq ($(NVCC),) -$(BUILDDIR)/testmisc_cu.o: $(GTESTLIBS) -$(BUILDDIR)/testmisc_cu.o: INCFLAGS += $(GTESTINC) -$(testmain): $(BUILDDIR)/testmisc_cu.o -$(testmain): cu_objects_exe += $(BUILDDIR)/testmisc_cu.o # Comment out this line to skip the CUDA miscellaneous tests -endif -$(BUILDDIR)/runTest.o: $(GTESTLIBS) -$(BUILDDIR)/runTest.o: INCFLAGS += $(GTESTINC) -$(testmain): $(BUILDDIR)/runTest.o -$(testmain): cxx_objects_exe += $(BUILDDIR)/runTest.o +$(CUDACPP_BUILDDIR)/testmisc.o $(CUDACPP_BUILDDIR)/testmisc_cu.o: $(GTESTLIBS) +$(testmain): $(CUDACPP_BUILDDIR)/testmisc.o +$(testmain): cxx_objects_exe += $(CUDACPP_BUILDDIR)/testmisc.o # Comment out this line to skip the C++ miscellaneous tests +$(cutestmain): $(CUDACPP_BUILDDIR)/testmisc_cu.o +$(cutestmain): cu_objects_exe += $(CUDACPP_BUILDDIR)/testmisc_cu.o # Comment out this line to skip the CUDA miscellaneous tests + + +$(CUDACPP_BUILDDIR)/runTest.o $(CUDACPP_BUILDDIR)/runTest_cu.o: $(GTESTLIBS) +$(testmain): $(CUDACPP_BUILDDIR)/runTest.o +$(testmain): cxx_objects_exe += $(CUDACPP_BUILDDIR)/runTest.o +$(cutestmain): $(CUDACPP_BUILDDIR)/runTest_cu.o +$(cutestmain): cu_objects_exe += $(CUDACPP_BUILDDIR)/runTest_cu.o + -ifneq ($(NVCC),) -$(BUILDDIR)/runTest_cu.o: $(GTESTLIBS) -$(BUILDDIR)/runTest_cu.o: INCFLAGS += $(GTESTINC) ifneq ($(shell $(CXX) --version | grep ^Intel),) -$(testmain): LIBFLAGS += -lintlc # compile with icpx and link with nvcc (undefined reference to `_intel_fast_memcpy') -$(testmain): LIBFLAGS += -lsvml # compile with icpx and link with nvcc (undefined reference to `__svml_cos4_l9') +$(cutestmain): MG_LDFLAGS += -lintlc # compile with icpx and link with nvcc (undefined reference to `_intel_fast_memcpy') +$(cutestmain): MG_LDFLAGS += -lsvml # compile with icpx and link with nvcc (undefined reference to `__svml_cos4_l9') else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 -$(testmain): LIBFLAGS += -L$(patsubst %bin/nvc++,%lib,$(subst ccache ,,$(CXX))) -lnvhpcatm -lnvcpumath -lnvc -endif -$(testmain): $(BUILDDIR)/runTest_cu.o -$(testmain): cu_objects_exe += $(BUILDDIR)/runTest_cu.o +$(cutestmain): MG_LDFLAGS += -L$(patsubst %bin/nvc++,%lib,$(subst ccache ,,$(CXX))) -lnvhpcatm -lnvcpumath -lnvc endif -$(testmain): $(GTESTLIBS) -$(testmain): INCFLAGS += $(GTESTINC) -$(testmain): LIBFLAGS += -L$(GTESTLIBDIR) -lgtest -lgtest_main ifneq ($(OMPFLAGS),) ifneq ($(shell $(CXX) --version | egrep '^Intel'),) -$(testmain): LIBFLAGS += -liomp5 # see #578 (not '-qopenmp -static-intel' as in https://stackoverflow.com/questions/45909648) +$(testmain): MG_LDFLAGS += -liomp5 # see #578 (not '-qopenmp -static-intel' as in https://stackoverflow.com/questions/45909648) else ifneq ($(shell $(CXX) --version | egrep '^clang'),) -$(testmain): LIBFLAGS += -L $(shell dirname $(shell $(CXX) -print-file-name=libc++.so)) -lomp # see #604 +$(testmain): MG_LDFLAGS += -L $(shell dirname $(shell $(CXX) -print-file-name=libc++.so)) -lomp # see #604 ###else ifneq ($(shell $(CXX) --version | egrep '^Apple clang'),) ###$(testmain): LIBFLAGS += ???? # OMP is not supported yet by cudacpp for Apple clang (see #578 and #604) else -$(testmain): LIBFLAGS += -lgomp +$(testmain): MG_LDFLAGS += -lgomp endif endif -ifeq ($(NVCC),) # link only runTest.o -$(testmain): LIBFLAGS += $(CXXLIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH -$(testmain): $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cxx_objects_lib) $(cxx_objects_exe) $(GTESTLIBS) - $(CXX) -o $@ $(cxx_objects_lib) $(cxx_objects_exe) -ldl -pthread $(LIBFLAGS) -else # link both runTest.o and runTest_cu.o -$(testmain): LIBFLAGS += $(CULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH -$(testmain): $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cxx_objects_lib) $(cxx_objects_exe) $(cu_objects_lib) $(cu_objects_exe) $(GTESTLIBS) - $(NVCC) -o $@ $(cxx_objects_lib) $(cxx_objects_exe) $(cu_objects_lib) $(cu_objects_exe) -ldl $(LIBFLAGS) -lcuda -endif +$(testmain): MG_LDFLAGS += $(CXXLIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH +$(testmain): $(CUDACPP_LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cxx_objects_lib) $(cxx_objects_exe) $(GTESTLIBS) + $(CXX) -o $@ $(cxx_objects_lib) $(cxx_objects_exe) -L$(CUDACPP_LIBDIR) -l$(MG5AMC_COMMONLIB) -ldl -pthread $(MG_LDFLAGS) $(LDFLAGS) + +$(cutestmain): MG_LDFLAGS += $(CULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH +$(cutestmain): $(CUDACPP_LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_objects_lib) $(cu_objects_exe) $(GTESTLIBS) + $(NVCC) -o $@ $(cu_objects_lib) $(cu_objects_exe) -L$(CUDACPP_LIBDIR) -l$(MG5AMC_COMMONLIB) -ldl -lcuda $(MG_LDFLAGS) $(LDFLAGS) # Use target gtestlibs to build only googletest ifneq ($(GTESTLIBS),) @@ -731,72 +324,15 @@ endif # Use flock (Linux only, no Mac) to allow 'make -j' if googletest has not yet been downloaded https://stackoverflow.com/a/32666215 $(GTESTLIBS): ifneq ($(shell which flock 2>/dev/null),) - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - flock $(BUILDDIR)/.make_test.lock $(MAKE) -C $(TESTDIR) + flock $(TESTDIR)/.make_test.lock $(MAKE) -C $(TESTDIR) else if [ -d $(TESTDIR) ]; then $(MAKE) -C $(TESTDIR); fi endif #------------------------------------------------------------------------------- -# Target: build all targets in all AVX modes (each AVX mode in a separate build directory) -# Split the avxall target into five separate targets to allow parallel 'make -j avxall' builds -# (Hack: add a fbridge.inc dependency to avxall, to ensure it is only copied once for all AVX modes) -avxnone: - @echo - $(MAKE) USEBUILDDIR=1 AVX=none -f $(CUDACPP_MAKEFILE) - -avxsse4: - @echo - $(MAKE) USEBUILDDIR=1 AVX=sse4 -f $(CUDACPP_MAKEFILE) - -avxavx2: - @echo - $(MAKE) USEBUILDDIR=1 AVX=avx2 -f $(CUDACPP_MAKEFILE) - -avx512y: - @echo - $(MAKE) USEBUILDDIR=1 AVX=512y -f $(CUDACPP_MAKEFILE) - -avx512z: - @echo - $(MAKE) USEBUILDDIR=1 AVX=512z -f $(CUDACPP_MAKEFILE) - -ifeq ($(UNAME_P),ppc64le) -###avxall: $(INCDIR)/fbridge.inc avxnone avxsse4 -avxall: avxnone avxsse4 -else ifeq ($(UNAME_P),arm) -###avxall: $(INCDIR)/fbridge.inc avxnone avxsse4 -avxall: avxnone avxsse4 -else -###avxall: $(INCDIR)/fbridge.inc avxnone avxsse4 avxavx2 avx512y avx512z -avxall: avxnone avxsse4 avxavx2 avx512y avx512z -endif - -#------------------------------------------------------------------------------- - -# Target: clean the builds -.PHONY: clean - -clean: -ifeq ($(USEBUILDDIR),1) - rm -rf $(BUILDDIR) -else - rm -f $(BUILDDIR)/.build.* $(BUILDDIR)/*.o $(BUILDDIR)/*.exe - rm -f $(LIBDIR)/lib$(MG5AMC_CXXLIB).so $(LIBDIR)/lib$(MG5AMC_CULIB).so -endif - $(MAKE) -C ../../src clean -f $(CUDACPP_SRC_MAKEFILE) -### rm -rf $(INCDIR) - -cleanall: - @echo - $(MAKE) USEBUILDDIR=0 clean -f $(CUDACPP_MAKEFILE) - @echo - $(MAKE) USEBUILDDIR=0 -C ../../src cleanall -f $(CUDACPP_SRC_MAKEFILE) - rm -rf build.* - # Target: clean the builds as well as the gtest installation(s) -distclean: cleanall +distclean: clean cleansrc ifneq ($(wildcard $(TESTDIRCOMMON)),) $(MAKE) -C $(TESTDIRCOMMON) clean endif @@ -848,50 +384,55 @@ endif #------------------------------------------------------------------------------- -# Target: check (run the C++ test executable) +# Target: check/gcheck (run the C++ test executable) # [NB THIS IS WHAT IS USED IN THE GITHUB CI!] -ifneq ($(NVCC),) -check: runTest cmpFcheck cmpFGcheck -else check: runTest cmpFcheck -endif +gcheck: + $(MAKE) AVX=cuda runTest cmpFGcheck # Target: runTest (run the C++ test executable runTest.exe) -runTest: all.$(TAG) - $(RUNTIME) $(BUILDDIR)/runTest.exe +ifneq ($(AVX),cuda) +runTest: cppbuild + $(RUNTIME) $(CUDACPP_BUILDDIR)/runTest.exe +else +runTest: cudabuild + $(RUNTIME) $(CUDACPP_BUILDDIR)/runTest_cuda.exe +endif + # Target: runCheck (run the C++ standalone executable check.exe, with a small number of events) -runCheck: all.$(TAG) - $(RUNTIME) $(BUILDDIR)/check.exe -p 2 32 2 +runCheck: cppbuild + $(RUNTIME) $(CUDACPP_BUILDDIR)/check.exe -p 2 32 2 # Target: runGcheck (run the CUDA standalone executable gcheck.exe, with a small number of events) -runGcheck: all.$(TAG) - $(RUNTIME) $(BUILDDIR)/gcheck.exe -p 2 32 2 +runGcheck: AVX=cuda +runGcheck: + $(MAKE) AVX=cuda cudabuild + $(RUNTIME) $(CUDACPP_BUILDDIR)/gcheck.exe -p 2 32 2 # Target: runFcheck (run the Fortran standalone executable - with C++ MEs - fcheck.exe, with a small number of events) -runFcheck: all.$(TAG) - $(RUNTIME) $(BUILDDIR)/fcheck.exe 2 32 2 +runFcheck: cppbuild + $(RUNTIME) $(CUDACPP_BUILDDIR)/fcheck.exe 2 32 2 # Target: runFGcheck (run the Fortran standalone executable - with CUDA MEs - fgcheck.exe, with a small number of events) -runFGcheck: all.$(TAG) - $(RUNTIME) $(BUILDDIR)/fgcheck.exe 2 32 2 +runFGcheck: AVX=cuda +runFGcheck: + $(MAKE) AVX=cuda cudabuild + $(RUNTIME) $(CUDACPP_BUILDDIR)/fgcheck.exe 2 32 2 # Target: cmpFcheck (compare ME results from the C++ and Fortran with C++ MEs standalone executables, with a small number of events) -cmpFcheck: all.$(TAG) +cmpFcheck: cppbuild @echo - @echo "$(BUILDDIR)/check.exe --common -p 2 32 2" - @echo "$(BUILDDIR)/fcheck.exe 2 32 2" - @me1=$(shell $(RUNTIME) $(BUILDDIR)/check.exe --common -p 2 32 2 | grep MeanMatrix | awk '{print $$4}'); me2=$(shell $(RUNTIME) $(BUILDDIR)/fcheck.exe 2 32 2 | grep Average | awk '{print $$4}'); echo "Avg ME (C++/C++) = $${me1}"; echo "Avg ME (F77/C++) = $${me2}"; if [ "$${me2}" == "NaN" ]; then echo "ERROR! Fortran calculation (F77/C++) returned NaN"; elif [ "$${me2}" == "" ]; then echo "ERROR! Fortran calculation (F77/C++) crashed"; else python3 -c "me1=$${me1}; me2=$${me2}; reldif=abs((me2-me1)/me1); print('Relative difference =', reldif); ok = reldif <= 2E-4; print ( '%s (relative difference %s 2E-4)' % ( ('OK','<=') if ok else ('ERROR','>') ) ); import sys; sys.exit(0 if ok else 1)"; fi + @echo "$(CUDACPP_BUILDDIR)/check.exe --common -p 2 32 2" + @echo "$(CUDACPP_BUILDDIR)/fcheck.exe 2 32 2" + @me1=$(shell $(RUNTIME) $(CUDACPP_BUILDDIR)/check.exe --common -p 2 32 2 | grep MeanMatrix | awk '{print $$4}'); me2=$(shell $(RUNTIME) $(CUDACPP_BUILDDIR)/fcheck.exe 2 32 2 | grep Average | awk '{print $$4}'); echo "Avg ME (C++/C++) = $${me1}"; echo "Avg ME (F77/C++) = $${me2}"; if [ "$${me2}" == "NaN" ]; then echo "ERROR! Fortran calculation (F77/C++) returned NaN"; elif [ "$${me2}" == "" ]; then echo "ERROR! Fortran calculation (F77/C++) crashed"; else python3 -c "me1=$${me1}; me2=$${me2}; reldif=abs((me2-me1)/me1); print('Relative difference =', reldif); ok = reldif <= 2E-4; print ( '%s (relative difference %s 2E-4)' % ( ('OK','<=') if ok else ('ERROR','>') ) ); import sys; sys.exit(0 if ok else 1)"; fi # Target: cmpFGcheck (compare ME results from the CUDA and Fortran with CUDA MEs standalone executables, with a small number of events) -cmpFGcheck: all.$(TAG) +cmpFGcheck: AVX=cuda +cmpFGcheck: + $(MAKE) AVX=cuda cudabuild @echo - @echo "$(BUILDDIR)/gcheck.exe --common -p 2 32 2" - @echo "$(BUILDDIR)/fgcheck.exe 2 32 2" - @me1=$(shell $(RUNTIME) $(BUILDDIR)/gcheck.exe --common -p 2 32 2 | grep MeanMatrix | awk '{print $$4}'); me2=$(shell $(RUNTIME) $(BUILDDIR)/fgcheck.exe 2 32 2 | grep Average | awk '{print $$4}'); echo "Avg ME (C++/CUDA) = $${me1}"; echo "Avg ME (F77/CUDA) = $${me2}"; if [ "$${me2}" == "NaN" ]; then echo "ERROR! Fortran calculation (F77/CUDA) crashed"; elif [ "$${me2}" == "" ]; then echo "ERROR! Fortran calculation (F77/CUDA) crashed"; else python3 -c "me1=$${me1}; me2=$${me2}; reldif=abs((me2-me1)/me1); print('Relative difference =', reldif); ok = reldif <= 2E-4; print ( '%s (relative difference %s 2E-4)' % ( ('OK','<=') if ok else ('ERROR','>') ) ); import sys; sys.exit(0 if ok else 1)"; fi + @echo "$(CUDACPP_BUILDDIR)/gcheck.exe --common -p 2 32 2" + @echo "$(CUDACPP_BUILDDIR)/fgcheck.exe 2 32 2" + @me1=$(shell $(RUNTIME) $(CUDACPP_BUILDDIR)/gcheck.exe --common -p 2 32 2 | grep MeanMatrix | awk '{print $$4}'); me2=$(shell $(RUNTIME) $(CUDACPP_BUILDDIR)/fgcheck.exe 2 32 2 | grep Average | awk '{print $$4}'); echo "Avg ME (C++/CUDA) = $${me1}"; echo "Avg ME (F77/CUDA) = $${me2}"; if [ "$${me2}" == "NaN" ]; then echo "ERROR! Fortran calculation (F77/CUDA) crashed"; elif [ "$${me2}" == "" ]; then echo "ERROR! Fortran calculation (F77/CUDA) crashed"; else python3 -c "me1=$${me1}; me2=$${me2}; reldif=abs((me2-me1)/me1); print('Relative difference =', reldif); ok = reldif <= 2E-4; print ( '%s (relative difference %s 2E-4)' % ( ('OK','<=') if ok else ('ERROR','>') ) ); import sys; sys.exit(0 if ok else 1)"; fi -# Target: memcheck (run the CUDA standalone executable gcheck.exe with a small number of events through cuda-memcheck) -memcheck: all.$(TAG) - $(RUNTIME) $(CUDA_HOME)/bin/cuda-memcheck --check-api-memory-access yes --check-deprecated-instr yes --check-device-heap yes --demangle full --language c --leak-check full --racecheck-report all --report-api-errors all --show-backtrace yes --tool memcheck --track-unused-memory yes $(BUILDDIR)/gcheck.exe -p 2 32 2 - -#------------------------------------------------------------------------------- diff --git a/epochX/cudacpp/ee_mumu.mad/SubProcesses/makefile b/epochX/cudacpp/ee_mumu.mad/SubProcesses/makefile index d572486c2e..d229c1cf4d 100644 --- a/epochX/cudacpp/ee_mumu.mad/SubProcesses/makefile +++ b/epochX/cudacpp/ee_mumu.mad/SubProcesses/makefile @@ -1,19 +1,22 @@ SHELL := /bin/bash -include ../../Source/make_opts -FFLAGS+= -w +# Include general setup +OPTIONS_MAKEFILE := ../../Source/make_opts +include $(OPTIONS_MAKEFILE) # Enable the C preprocessor https://gcc.gnu.org/onlinedocs/gfortran/Preprocessing-Options.html -FFLAGS+= -cpp +MG_FCFLAGS += -cpp +MG_CXXFLAGS += -I. -# Compile counters with -O3 as in the cudacpp makefile (avoid being "unfair" to Fortran #740) -CXXFLAGS = -O3 -Wall -Wshadow -Wextra +all: help cppnative + +# Target if user does not specify target +help: + $(info No target specified.) + $(info Viable targets are 'cppnative' (default), 'cppnone', 'cppsse4', 'cppavx2', 'cpp512y', 'cpp512z' and 'cuda') + $(info Or 'cppall' for all C++ targets) + $(info Or 'ALL' for all C++ and cuda targets) -# Add -std=c++17 explicitly to avoid build errors on macOS -# Add -mmacosx-version-min=11.3 to avoid "ld: warning: object file was built for newer macOS version than being linked" -ifneq ($(shell $(CXX) --version | egrep '^Apple clang'),) -CXXFLAGS += -std=c++17 -mmacosx-version-min=11.3 -endif # Enable ccache if USECCACHE=1 ifeq ($(USECCACHE)$(shell echo $(CXX) | grep ccache),1) @@ -46,34 +49,25 @@ else MADLOOP_LIB = endif -LINKLIBS = $(LINK_MADLOOP_LIB) $(LINK_LOOP_LIBS) -L$(LIBDIR) -ldhelas -ldsample -lmodel -lgeneric -lpdf -lcernlib $(llhapdf) -lbias - -processid_short=$(shell basename $(CURDIR) | awk -F_ '{print $$(NF-1)"_"$$NF}') -CUDACPP_MAKEFILE=cudacpp.mk -# NB1 Using ":=" below instead of "=" is much faster (it only runs the subprocess once instead of many times) -# NB2 Use '|&' in CUDACPP_BUILDDIR to avoid confusing errors about googletest #507 -# NB3 Do not add a comment inlined "CUDACPP_BUILDDIR=$(shell ...) # comment" as otherwise a trailing space is included... -# NB4 The variables relevant to the cudacpp Makefile must be explicitly passed to $(shell...) -CUDACPP_MAKEENV:=$(shell echo '$(.VARIABLES)' | tr " " "\n" | egrep "(USEBUILDDIR|AVX|FPTYPE|HELINL|HRDCOD)") -###$(info CUDACPP_MAKEENV=$(CUDACPP_MAKEENV)) -###$(info $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))")) -CUDACPP_BUILDDIR:=$(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn 2>&1 | awk '/Building/{print $$3}' | sed s/BUILDDIR=//) -ifeq ($(CUDACPP_BUILDDIR),) -$(error CUDACPP_BUILDDIR='$(CUDACPP_BUILDDIR)' should not be empty!) -else -$(info CUDACPP_BUILDDIR='$(CUDACPP_BUILDDIR)') -endif -CUDACPP_COMMONLIB=mg5amc_common -CUDACPP_CXXLIB=mg5amc_$(processid_short)_cpp -CUDACPP_CULIB=mg5amc_$(processid_short)_cuda - +LINKLIBS = $(LINK_MADLOOP_LIB) $(LINK_LOOP_LIBS) -L$(LIBDIR) -ldhelas -ldsample -lmodel -lgeneric -lpdf -lcernlib $(llhapdf) -lbias LIBS = $(LIBDIR)libbias.$(libext) $(LIBDIR)libdhelas.$(libext) $(LIBDIR)libdsample.$(libext) $(LIBDIR)libgeneric.$(libext) $(LIBDIR)libpdf.$(libext) $(LIBDIR)libgammaUPC.$(libext) $(LIBDIR)libmodel.$(libext) $(LIBDIR)libcernlib.$(libext) $(MADLOOP_LIB) $(LOOP_LIBS) ifneq ("$(wildcard ../../Source/RUNNING)","") LINKLIBS += -lrunning - LIBS += $(LIBDIR)librunning.$(libext) + LIBS += $(LIBDIR)librunning.$(libext) endif +SOURCEDIR_GUARD:=../../Source/.timestamp_guard +# We use $(SOURCEDIR_GUARD) to figure out if Source is out of date. The Source makefile doesn't correctly +# update all files, so we need a proxy that is updated every time we run "$(MAKE) -C ../../Source". +$(SOURCEDIR_GUARD) ../../Source/discretesampler.mod &: ../../Source/*.f ../../Cards/param_card.dat ../../Cards/run_card.dat +ifneq ($(shell which flock 2>/dev/null),) + flock ../../Source/.lock -c "$(MAKE) -C ../../Source; touch $(SOURCEDIR_GUARD)" +else + $(MAKE) -C ../../Source; touch $(SOURCEDIR_GUARD) +endif + +$(LIBS): $(SOURCEDIR_GUARD) # Source files @@ -91,82 +85,83 @@ PROCESS= myamp.o genps.o unwgt.o setcuts.o get_color.o \ DSIG=driver.o $(patsubst %.f, %.o, $(filter-out auto_dsig.f, $(wildcard auto_dsig*.f))) DSIG_cudacpp=driver_cudacpp.o $(patsubst %.f, %_cudacpp.o, $(filter-out auto_dsig.f, $(wildcard auto_dsig*.f))) -SYMMETRY = symmetry.o idenparts.o +SYMMETRY = symmetry.o idenparts.o -# Binaries +# cudacpp targets: +CUDACPP_MAKEFILE := cudacpp.mk +ifneq (,$(wildcard $(CUDACPP_MAKEFILE))) +include $(CUDACPP_MAKEFILE) +endif -ifeq ($(UNAME),Darwin) -LDFLAGS += -lc++ # avoid 'Undefined symbols' for chrono::steady_clock on macOS (checked with otool -L libmg5amc_gg_ttx_cpp.so) -LDFLAGS += -mmacosx-version-min=11.3 # avoid "ld: warning: object file was built for newer macOS version than being linked" -else -LDFLAGS += -Wl,--no-relax # avoid 'failed to convert GOTPCREL relocation' error #458 (not supported on macOS) +ifeq ($(CUDACPP_BUILDDIR),) +$(error CUDACPP_BUILDDIR='$(CUDACPP_BUILDDIR)' should not be empty!) endif +CUDACPP_COMMONLIB=mg5amc_common +CUDACPP_CXXLIB := $(CUDACPP_BUILDDIR)/lib$(MG5AMC_CXXLIB).so +CUDACPP_CULIB := $(CUDACPP_BUILDDIR)/lib$(MG5AMC_CULIB).so -all: $(PROG)_fortran $(CUDACPP_BUILDDIR)/$(PROG)_cpp # also builds $(PROG)_cuda if $(CUDACPP_CULIB) exists (#503) +# Set up OpenMP if supported +OMPFLAGS ?= -fopenmp ifneq ($(shell $(CXX) --version | egrep '^Intel'),) -override OMPFLAGS = -fopenmp LINKLIBS += -liomp5 # see #578 LINKLIBS += -lintlc # undefined reference to `_intel_fast_memcpy' else ifneq ($(shell $(CXX) --version | egrep '^clang'),) -override OMPFLAGS = -fopenmp $(CUDACPP_BUILDDIR)/$(PROG)_cpp: LINKLIBS += -L $(shell dirname $(shell $(CXX) -print-file-name=libc++.so)) -lomp # see #604 else ifneq ($(shell $(CXX) --version | egrep '^Apple clang'),) -override OMPFLAGS = # OMP is not supported yet by cudacpp for Apple clang -else -override OMPFLAGS = -fopenmp +OMPFLAGS = # OMP is not supported yet by cudacpp for Apple clang endif -$(PROG)_fortran: $(PROCESS) $(DSIG) auto_dsig.o $(LIBS) $(MATRIX) counters.o ompnumthreads.o - $(FC) -o $(PROG)_fortran $(PROCESS) $(DSIG) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o $(LDFLAGS) - -$(LIBS): .libs -.libs: ../../Cards/param_card.dat ../../Cards/run_card.dat - cd ../../Source; make - touch $@ +# Binaries -$(CUDACPP_BUILDDIR)/.cudacpplibs: - $(MAKE) -f $(CUDACPP_MAKEFILE) - touch $@ +$(PROG)_fortran: $(PROCESS) $(DSIG) auto_dsig.o $(LIBS) $(MATRIX) counters.o ompnumthreads.o + $(FC) $(MG_FCFLAGS) $(FCFLAGS) -o $(PROG)_fortran $(PROCESS) $(DSIG) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o $(LDFLAGS) # On Linux, set rpath to LIBDIR to make it unnecessary to use LD_LIBRARY_PATH # Use relative paths with respect to the executables ($ORIGIN on Linux) # On Darwin, building libraries with absolute paths in LIBDIR makes this unnecessary -ifeq ($(UNAME_S),Darwin) - override LIBFLAGSRPATH = -else ifeq ($(USEBUILDDIR),1) - override LIBFLAGSRPATH = -Wl,-rpath,'$$ORIGIN/../$(LIBDIR)/$(CUDACPP_BUILDDIR)' -else - override LIBFLAGSRPATH = -Wl,-rpath,'$$ORIGIN/$(LIBDIR)' +ifneq ($(UNAME_S),Darwin) + LIBFLAGSRPATH := -Wl,-rpath,'$$ORIGIN:$$ORIGIN/../$(LIBDIR)/$(CUDACPP_BUILDDIR)' endif -.PHONY: madevent_fortran_link madevent_cuda_link madevent_cpp_link +.PHONY: madevent_fortran_link madevent_cuda_link madevent_cpp_link madevent_cppnone_link madevent_cppsse4_link madevent_cppavx2_link madevent_cpp512y_link madevent_cpp512z_link clean cleanall cleansrc madevent_fortran_link: $(PROG)_fortran rm -f $(PROG) ln -s $(PROG)_fortran $(PROG) -madevent_cpp_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp - rm -f $(PROG) - ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) +madevent_cppnone_link: AVX=none +madevent_cppnone_link: cppnone + ln -sf $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) -madevent_cuda_link: $(CUDACPP_BUILDDIR)/$(PROG)_cuda - rm -f $(PROG) - ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cuda $(PROG) +madevent_cppavx2_link: AVX=avx2 +madevent_cppavx2_link: cppavx2 + ln -sf $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) + +madevent_cpp512y_link: AVX=512y +madevent_cpp512y_link: cppavx512y + ln -sf $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) -# Building $(PROG)_cpp also builds $(PROG)_cuda if $(CUDACPP_CULIB) exists (improved patch for cpp-only builds #503) -$(CUDACPP_BUILDDIR)/$(PROG)_cpp: $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(LIBS) $(MATRIX) counters.o ompnumthreads.o $(CUDACPP_BUILDDIR)/.cudacpplibs - $(FC) -o $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o -L$(LIBDIR)/$(CUDACPP_BUILDDIR) -l$(CUDACPP_COMMONLIB) -l$(CUDACPP_CXXLIB) $(LIBFLAGSRPATH) $(LDFLAGS) - if [ -f $(LIBDIR)/$(CUDACPP_BUILDDIR)/lib$(CUDACPP_CULIB).* ]; then $(FC) -o $(CUDACPP_BUILDDIR)/$(PROG)_cuda $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o -L$(LIBDIR)/$(CUDACPP_BUILDDIR) -l$(CUDACPP_COMMONLIB) -l$(CUDACPP_CULIB) $(LIBFLAGSRPATH) $(LDFLAGS); fi +madevent_cpp512z_link: AVX=512z +madevent_cpp512z_link: cppavx512z + ln -sf $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) -$(CUDACPP_BUILDDIR)/$(PROG)_cuda: $(CUDACPP_BUILDDIR)/$(PROG)_cpp +madevent_cuda_link: AVX=cuda +madevent_cuda_link: cuda + ln -sf $(CUDACPP_BUILDDIR)/$(PROG)_cuda $(PROG) + +$(CUDACPP_BUILDDIR)/$(PROG)_cpp: $(LIBS) $(CUDACPP_CXXLIB) $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) counters.o ompnumthreads.o + $(FC) -o $(CUDACPP_BUILDDIR)/$(PROG)_cpp -L$(LIBDIR)/$(CUDACPP_BUILDDIR) -l$(CUDACPP_COMMONLIB) $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o -L$(CUDACPP_BUILDDIR) -l$(MG5AMC_CXXLIB) $(LIBFLAGSRPATH) $(MG_LDFLAGS) $(LDFLAGS) + +$(CUDACPP_BUILDDIR)/$(PROG)_cuda: $(LIBS) $(CUDACPP_CULIB) $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) counters.o ompnumthreads.o + $(FC) -o $(CUDACPP_BUILDDIR)/$(PROG)_cuda -L$(LIBDIR)/$(CUDACPP_BUILDDIR) -l$(CUDACPP_COMMONLIB) $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o -L$(CUDACPP_BUILDDIR) -l$(MG5AMC_CULIB) $(LIBFLAGSRPATH) $(MG_LDFLAGS) $(LDFLAGS) counters.o: counters.cc timer.h - $(CXX) $(CXXFLAGS) -c $< -o $@ + $(CXX) $(MG_CXXFLAGS) $(CXXFLAGS) -c $< -o $@ ompnumthreads.o: ompnumthreads.cc ompnumthreads.h - $(CXX) -I. $(CXXFLAGS) $(OMPFLAGS) -c $< -o $@ + $(CXX) $(MG_CXXFLAGS) $(CXXFLAGS) $(OMPFLAGS) -c $< -o $@ $(PROG)_forhel: $(PROCESS) auto_dsig.o $(LIBS) $(MATRIX_HEL) $(FC) -o $(PROG)_forhel $(PROCESS) $(MATRIX_HEL) $(LINKLIBS) $(LDFLAGS) $(BIASDEPENDENCIES) $(OMPFLAGS) @@ -174,27 +169,14 @@ $(PROG)_forhel: $(PROCESS) auto_dsig.o $(LIBS) $(MATRIX_HEL) gensym: $(SYMMETRY) configs.inc $(LIBS) $(FC) -o gensym $(SYMMETRY) -L$(LIBDIR) $(LINKLIBS) $(LDFLAGS) -###ifeq (,$(wildcard fbridge.inc)) # Pointless: fbridge.inc always exists as this is the cudacpp-modified makefile! -###$(LIBDIR)libmodel.$(libext): ../../Cards/param_card.dat -### cd ../../Source/MODEL; make -### -###$(LIBDIR)libgeneric.$(libext): ../../Cards/run_card.dat -### cd ../../Source; make -### -###$(LIBDIR)libpdf.$(libext): -### cd ../../Source/PDF; make -### -###$(LIBDIR)libgammaUPC.$(libext): -### cd ../../Source/PDF/gammaUPC; make -###endif # Add source so that the compiler finds the DiscreteSampler module. $(MATRIX): %.o: %.f - $(FC) $(FFLAGS) $(MATRIX_FLAG) -c $< -I../../Source/ -I../../Source/PDF/gammaUPC -%.o: %.f - $(FC) $(FFLAGS) -c $< -I../../Source/ -I../../Source/PDF/gammaUPC + $(FC) $(MG_FCFLAGS) $(FCFLAGS) $(MATRIX_FLAG) -c $< -I../../Source/ -I../../Source/PDF/gammaUPC +%.o $(CUDACPP_BUILDDIR)/%.o: %.f + $(FC) $(MG_FCFLAGS) $(FCFLAGS) -I../../Source/ -I../../Source/PDF/gammaUPC -c $< -o $@ %_cudacpp.o: %.f - $(FC) $(FFLAGS) -c -DMG5AMC_MEEXPORTER_CUDACPP $< -I../../Source/ $(OMPFLAGS) -o $@ + $(FC) $(MG_FCFLAGS) $(FCFLAGS) -c -DMG5AMC_MEEXPORTER_CUDACPP $< -I../../Source/ $(OMPFLAGS) -o $@ # Dependencies @@ -215,60 +197,42 @@ unwgt.o: genps.inc nexternal.inc symswap.inc cluster.inc run.inc message.inc \ initcluster.o: message.inc # Extra dependencies on discretesampler.mod +../../Source/discretesampler.mod: ../../Source/DiscreteSampler.f -auto_dsig.o: .libs -driver.o: .libs -driver_cudacpp.o: .libs -$(MATRIX): .libs -genps.o: .libs +auto_dsig.o: ../../Source/discretesampler.mod +driver.o: ../../Source/discretesampler.mod +driver_cudacpp.o: ../../Source/discretesampler.mod +$(MATRIX): ../../Source/discretesampler.mod +genps.o: ../../Source/discretesampler.mod # Cudacpp avxall targets -UNAME_P := $(shell uname -p) ifeq ($(UNAME_P),ppc64le) -avxall: avxnone avxsse4 +cppall: cppnative cppnone cppsse4 else ifeq ($(UNAME_P),arm) -avxall: avxnone avxsse4 +cppall: cppnative cppnone cppsse4 else -avxall: avxnone avxsse4 avxavx2 avx512y avx512z +cppall: cppnative cppnone cppsse4 cppavx2 cppavx512y cppavx512z endif -avxnone: $(PROG)_fortran $(DSIG_cudacpp) - @echo - $(MAKE) USEBUILDDIR=1 AVX=none - -avxsse4: $(PROG)_fortran $(DSIG_cudacpp) - @echo - $(MAKE) USEBUILDDIR=1 AVX=sse4 - -avxavx2: $(PROG)_fortran $(DSIG_cudacpp) - @echo - $(MAKE) USEBUILDDIR=1 AVX=avx2 - -avx512y: $(PROG)_fortran $(DSIG_cudacpp) - @echo - $(MAKE) USEBUILDDIR=1 AVX=512y - -avx512z: $(PROG)_fortran $(DSIG_cudacpp) - @echo - $(MAKE) USEBUILDDIR=1 AVX=512z - -###endif - -# Clean (NB: 'make clean' in Source calls 'make clean' in all P*) +ALL: cppall cuda -clean: # Clean builds: fortran in this Pn; cudacpp executables for one AVX in this Pn - $(RM) *.o gensym $(PROG) $(PROG)_fortran $(PROG)_forhel $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(CUDACPP_BUILDDIR)/$(PROG)_cuda +# Clean all architecture-specific builds: +clean: + $(RM) *.o gensym $(PROG) $(PROG)_* + $(RM) -rf build.*/*{.o,.so,.exe,.dylib,madevent_*} + @for dir in build.*; do if [ -z "$$(ls -A $${dir})" ]; then rm -r $${dir}; else echo "Not cleaning $${dir}; not empty"; fi; done -cleanavxs: clean # Clean builds: fortran in this Pn; cudacpp for all AVX in this Pn and in src - $(MAKE) -f $(CUDACPP_MAKEFILE) cleanall - rm -f $(CUDACPP_BUILDDIR)/.cudacpplibs - rm -f .libs +cleanall: cleansrc + for PROCESS in ../P[0-9]*; do $(MAKE) -C $${PROCESS} clean; done -cleanall: # Clean builds: fortran in all P* and in Source; cudacpp for all AVX in all P* and in src - make -C ../../Source cleanall - rm -rf $(LIBDIR)libbias.$(libext) - rm -f ../../Source/*.mod ../../Source/*/*.mod +# Clean one architecture-specific build +clean%: + $(RM) -r build.$*_* -distclean: cleanall # Clean all fortran and cudacpp builds as well as the googletest installation - $(MAKE) -f $(CUDACPP_MAKEFILE) distclean +# Clean common source directories (interferes with other P*) +cleansrc: + make -C ../../Source clean + $(RM) -f $(SOURCEDIR_GUARD) ../../Source/{*.mod,.lock} ../../Source/*/*.mod + $(RM) -r $(LIBDIR)libbias.$(libext) + if [ -d ../../src ]; then $(MAKE) -C ../../src -f cudacpp_src.mk clean; fi diff --git a/epochX/cudacpp/ee_mumu.mad/SubProcesses/ompnumthreads.cc b/epochX/cudacpp/ee_mumu.mad/SubProcesses/ompnumthreads.cc deleted file mode 100644 index 1d004923b9..0000000000 --- a/epochX/cudacpp/ee_mumu.mad/SubProcesses/ompnumthreads.cc +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (C) 2020-2023 CERN and UCLouvain. -// Licensed under the GNU Lesser General Public License (version 3 or later). -// Created by: A. Valassi (Dec 2022) for the MG5aMC CUDACPP plugin. -// Further modified by: A. Valassi (2022-2023) for the MG5aMC CUDACPP plugin. - -#include - -// NB1: The C function ompnumthreadsNotSetMeansOneThread_ is called by Fortran code -// Hence the trailing "_": 'call xxx()' links to xxx_ -// See http://www.yolinux.com/TUTORIALS/LinuxTutorialMixingFortranAndC.html - -// NB2: This file also contains C++ code and is built using g++ -// Hence use 'extern "C"' to avoid name mangling by the C++ compiler -// See https://www.geeksforgeeks.org/extern-c-in-c - -#ifdef _OPENMP -extern "C" -{ - void ompnumthreads_not_set_means_one_thread_() - { - const int debuglevel = 0; // quiet(-1), info(0), debug(1) - ompnumthreadsNotSetMeansOneThread( debuglevel ); // call the inline C++ function defined in the .h file - } -} -#endif diff --git a/epochX/cudacpp/ee_mumu.mad/SubProcesses/proc_characteristics b/epochX/cudacpp/ee_mumu.mad/SubProcesses/proc_characteristics index 12e1ef1648..95773bcf0c 100644 --- a/epochX/cudacpp/ee_mumu.mad/SubProcesses/proc_characteristics +++ b/epochX/cudacpp/ee_mumu.mad/SubProcesses/proc_characteristics @@ -8,7 +8,7 @@ ninitial = 2 grouped_matrix = True has_loops = False - bias_module = None + bias_module = dummy max_n_matched_jets = 0 colored_pdgs = [1, 2, 3, 4, 5, 6, 21] complex_mass_scheme = False diff --git a/epochX/cudacpp/ee_mumu.mad/SubProcesses/runTest.cc b/epochX/cudacpp/ee_mumu.mad/SubProcesses/runTest.cc index d4a760a71b..734235824a 100644 --- a/epochX/cudacpp/ee_mumu.mad/SubProcesses/runTest.cc +++ b/epochX/cudacpp/ee_mumu.mad/SubProcesses/runTest.cc @@ -246,15 +246,15 @@ struct CUDATest : public CUDA_CPU_TestBase #define TESTID_CPU( s ) s##_CPU #define XTESTID_CPU( s ) TESTID_CPU( s ) #define MG_INSTANTIATE_TEST_SUITE_CPU( prefix, test_suite_name ) \ -INSTANTIATE_TEST_SUITE_P( prefix, \ - test_suite_name, \ - testing::Values( new CPUTest( MG_EPOCH_REFERENCE_FILE_NAME ) ) ); + INSTANTIATE_TEST_SUITE_P( prefix, \ + test_suite_name, \ + testing::Values( new CPUTest( MG_EPOCH_REFERENCE_FILE_NAME ) ) ); #define TESTID_GPU( s ) s##_GPU #define XTESTID_GPU( s ) TESTID_GPU( s ) #define MG_INSTANTIATE_TEST_SUITE_GPU( prefix, test_suite_name ) \ -INSTANTIATE_TEST_SUITE_P( prefix, \ - test_suite_name, \ - testing::Values( new CUDATest( MG_EPOCH_REFERENCE_FILE_NAME ) ) ); + INSTANTIATE_TEST_SUITE_P( prefix, \ + test_suite_name, \ + testing::Values( new CUDATest( MG_EPOCH_REFERENCE_FILE_NAME ) ) ); #ifdef __CUDACC__ MG_INSTANTIATE_TEST_SUITE_GPU( XTESTID_GPU( MG_EPOCH_PROCESS_ID ), MadgraphTest ); diff --git a/epochX/cudacpp/ee_mumu.mad/SubProcesses/testxxx.cc b/epochX/cudacpp/ee_mumu.mad/SubProcesses/testxxx.cc index 3361fe5aa9..1d315f6d75 100644 --- a/epochX/cudacpp/ee_mumu.mad/SubProcesses/testxxx.cc +++ b/epochX/cudacpp/ee_mumu.mad/SubProcesses/testxxx.cc @@ -40,7 +40,7 @@ namespace mg5amcCpu { std::string FPEhandlerMessage = "unknown"; int FPEhandlerIevt = -1; - inline void FPEhandler( int sig ) + inline void FPEhandler( int ) { #ifdef __CUDACC__ std::cerr << "Floating Point Exception (GPU): '" << FPEhandlerMessage << "' ievt=" << FPEhandlerIevt << std::endl; @@ -71,11 +71,10 @@ TEST( XTESTID( MG_EPOCH_PROCESS_ID ), testxxx ) constexpr bool testEvents = !dumpEvents; // run the test? constexpr fptype toleranceXXXs = std::is_same::value ? 1.E-15 : 1.E-5; // Constant parameters - constexpr int neppM = MemoryAccessMomenta::neppM; // AOSOA layout constexpr int np4 = CPPProcess::np4; - const int nevt = 32; // 12 independent tests plus 20 duplicates (need a multiple of 16 for floats '512z') - assert( nevt % neppM == 0 ); // nevt must be a multiple of neppM - assert( nevt % neppV == 0 ); // nevt must be a multiple of neppV + const int nevt = 32; // 12 independent tests plus 20 duplicates (need a multiple of 16 for floats '512z') + assert( nevt % MemoryAccessMomenta::neppM == 0 ); // nevt must be a multiple of neppM + assert( nevt % neppV == 0 ); // nevt must be a multiple of neppV // Fill in the input momenta #ifdef __CUDACC__ mg5amcGpu::PinnedHostBufferMomenta hstMomenta( nevt ); // AOSOA[npagM][npar=4][np4=4][neppM] diff --git a/epochX/cudacpp/ee_mumu.mad/bin/internal/banner.py b/epochX/cudacpp/ee_mumu.mad/bin/internal/banner.py index 754f992259..b408679c2f 100755 --- a/epochX/cudacpp/ee_mumu.mad/bin/internal/banner.py +++ b/epochX/cudacpp/ee_mumu.mad/bin/internal/banner.py @@ -1012,7 +1012,6 @@ def __init__(self, finput=None, **opt): - def plugin_input(self, finput=None): pass diff --git a/epochX/cudacpp/ee_mumu.mad/bin/internal/launch_plugin.py b/epochX/cudacpp/ee_mumu.mad/bin/internal/launch_plugin.py index c93f03a01b..3b09713e12 100644 --- a/epochX/cudacpp/ee_mumu.mad/bin/internal/launch_plugin.py +++ b/epochX/cudacpp/ee_mumu.mad/bin/internal/launch_plugin.py @@ -29,7 +29,7 @@ def compile(self, *args, **opts): """ """ import multiprocessing if not self.options['nb_core'] or self.options['nb_core'] == 'None': - self.options['nb_core'] = multiprocessing.cpu_count() + self.options['nb_core'] = multiprocessing.cpu_count() if 'cwd' in opts and os.path.basename(opts['cwd']) == 'Source': path = pjoin(opts['cwd'], 'make_opts') avx_level = self.run_card['avx_level'] if self.run_card['avx_level'] != 'auto' else '' @@ -37,7 +37,7 @@ def compile(self, *args, **opts): {'FPTYPE': self.run_card['floating_type'], 'AVX': avx_level }) misc.sprint('FPTYPE checked') - if args and args[0][0] == 'madevent' and hasattr(self, 'run_card'): + if args and args[0][0] == 'madevent' and hasattr(self, 'run_card'): cudacpp_backend = self.run_card['cudacpp_backend'].upper() # the default value is defined in banner.py logger.info("Building madevent in madevent_interface.py with '%s' matrix elements"%cudacpp_backend) if cudacpp_backend == 'FORTRAN': diff --git a/epochX/cudacpp/ee_mumu.mad/bin/internal/madevent_interface.py b/epochX/cudacpp/ee_mumu.mad/bin/internal/madevent_interface.py index cb6bf4ca57..8abba3f33f 100755 --- a/epochX/cudacpp/ee_mumu.mad/bin/internal/madevent_interface.py +++ b/epochX/cudacpp/ee_mumu.mad/bin/internal/madevent_interface.py @@ -2,11 +2,11 @@ # # Copyright (c) 2011 The MadGraph5_aMC@NLO Development team and Contributors # -# This file is a part of the MadGraph5_aMC@NLO project, an application which +# This file is a part of the MadGraph5_aMC@NLO project, an application which # automatically generates Feynman diagrams and matrix elements for arbitrary # high-energy processes in the Standard Model and beyond. # -# It is subject to the MadGraph5_aMC@NLO license which should accompany this +# It is subject to the MadGraph5_aMC@NLO license which should accompany this # distribution. # # For more information, visit madgraph.phys.ucl.ac.be and amcatnlo.web.cern.ch @@ -53,10 +53,10 @@ # Special logger for the Cmd Interface logger = logging.getLogger('madevent.stdout') # -> stdout logger_stderr = logging.getLogger('madevent.stderr') # ->stderr - + try: import madgraph -except ImportError as error: +except ImportError as error: # import from madevent directory MADEVENT = True import internal.extended_cmd as cmd @@ -92,7 +92,7 @@ import madgraph.various.lhe_parser as lhe_parser # import madgraph.various.histograms as histograms # imported later to not slow down the loading of the code import models.check_param_card as check_param_card - from madgraph.iolibs.files import ln + from madgraph.iolibs.files import ln from madgraph import InvalidCmd, MadGraph5Error, MG5DIR, ReadWrite @@ -113,10 +113,10 @@ class CmdExtended(common_run.CommonRunCmd): next_possibility = { 'start': [], } - + debug_output = 'ME5_debug' error_debug = 'Please report this bug on https://bugs.launchpad.net/mg5amcnlo\n' - error_debug += 'More information is found in \'%(debug)s\'.\n' + error_debug += 'More information is found in \'%(debug)s\'.\n' error_debug += 'Please attach this file to your report.' config_debug = 'If you need help with this issue please contact us on https://answers.launchpad.net/mg5amcnlo\n' @@ -124,18 +124,18 @@ class CmdExtended(common_run.CommonRunCmd): keyboard_stop_msg = """stopping all operation in order to quit MadGraph5_aMC@NLO please enter exit""" - + # Define the Error InvalidCmd = InvalidCmd ConfigurationError = MadGraph5Error def __init__(self, me_dir, options, *arg, **opt): """Init history and line continuation""" - + # Tag allowing/forbiding question self.force = False - - # If possible, build an info line with current version number + + # If possible, build an info line with current version number # and date, from the VERSION text file info = misc.get_pkg_info() info_line = "" @@ -150,7 +150,7 @@ def __init__(self, me_dir, options, *arg, **opt): else: version = open(pjoin(root_path,'MGMEVersion.txt')).readline().strip() info_line = "#* VERSION %s %s *\n" % \ - (version, (24 - len(version)) * ' ') + (version, (24 - len(version)) * ' ') # Create a header for the history file. # Remember to fill in time at writeout time! @@ -177,7 +177,7 @@ def __init__(self, me_dir, options, *arg, **opt): '#* run as ./bin/madevent.py filename *\n' + \ '#* *\n' + \ '#************************************************************\n' - + if info_line: info_line = info_line[1:] @@ -203,11 +203,11 @@ def __init__(self, me_dir, options, *arg, **opt): "* *\n" + \ "************************************************************") super(CmdExtended, self).__init__(me_dir, options, *arg, **opt) - + def get_history_header(self): - """return the history header""" + """return the history header""" return self.history_header % misc.get_time_info() - + def stop_on_keyboard_stop(self): """action to perform to close nicely on a keyboard interupt""" try: @@ -219,20 +219,20 @@ def stop_on_keyboard_stop(self): self.add_error_log_in_html(KeyboardInterrupt) except: pass - + def postcmd(self, stop, line): """ Update the status of the run for finishing interactive command """ - - stop = super(CmdExtended, self).postcmd(stop, line) + + stop = super(CmdExtended, self).postcmd(stop, line) # relaxing the tag forbidding question self.force = False - + if not self.use_rawinput: return stop - + if self.results and not self.results.current: return stop - + arg = line.split() if len(arg) == 0: return stop @@ -240,41 +240,41 @@ def postcmd(self, stop, line): return stop if isinstance(self.results.status, str) and self.results.status == 'Stop by the user': self.update_status('%s Stop by the user' % arg[0], level=None, error=True) - return stop + return stop elif not self.results.status: return stop elif str(arg[0]) in ['exit','quit','EOF']: return stop - + try: - self.update_status('Command \'%s\' done.
Waiting for instruction.' % arg[0], + self.update_status('Command \'%s\' done.
Waiting for instruction.' % arg[0], level=None, error=True) except Exception: misc.sprint('update_status fails') pass - - + + def nice_user_error(self, error, line): """If a ME run is currently running add a link in the html output""" self.add_error_log_in_html() - return cmd.Cmd.nice_user_error(self, error, line) - + return cmd.Cmd.nice_user_error(self, error, line) + def nice_config_error(self, error, line): """If a ME run is currently running add a link in the html output""" self.add_error_log_in_html() stop = cmd.Cmd.nice_config_error(self, error, line) - - + + try: debug_file = open(self.debug_output, 'a') debug_file.write(open(pjoin(self.me_dir,'Cards','proc_card_mg5.dat'))) debug_file.close() except: - pass + pass return stop - + def nice_error_handling(self, error, line): """If a ME run is currently running add a link in the html output""" @@ -294,7 +294,7 @@ def nice_error_handling(self, error, line): proc_card = pjoin(self.me_dir,'Cards','proc_card_mg5.dat') if os.path.exists(proc_card): self.banner.add(proc_card) - + out_dir = pjoin(self.me_dir, 'Events', self.run_name) if not os.path.isdir(out_dir): os.mkdir(out_dir) @@ -307,7 +307,7 @@ def nice_error_handling(self, error, line): else: pass else: - self.add_error_log_in_html() + self.add_error_log_in_html() stop = cmd.Cmd.nice_error_handling(self, error, line) try: debug_file = open(self.debug_output, 'a') @@ -316,14 +316,14 @@ def nice_error_handling(self, error, line): except: pass return stop - - + + #=============================================================================== # HelpToCmd #=============================================================================== class HelpToCmd(object): """ The Series of help routine for the MadEventCmd""" - + def help_pythia(self): logger.info("syntax: pythia [RUN] [--run_options]") logger.info("-- run pythia on RUN (current one by default)") @@ -352,29 +352,29 @@ def help_banner_run(self): logger.info(" Path should be the path of a valid banner.") logger.info(" RUN should be the name of a run of the current directory") self.run_options_help([('-f','answer all question by default'), - ('--name=X', 'Define the name associated with the new run')]) - + ('--name=X', 'Define the name associated with the new run')]) + def help_open(self): logger.info("syntax: open FILE ") logger.info("-- open a file with the appropriate editor.") logger.info(' If FILE belongs to index.html, param_card.dat, run_card.dat') logger.info(' the path to the last created/used directory is used') logger.info(' The program used to open those files can be chosen in the') - logger.info(' configuration file ./input/mg5_configuration.txt') - - + logger.info(' configuration file ./input/mg5_configuration.txt') + + def run_options_help(self, data): if data: logger.info('-- local options:') for name, info in data: logger.info(' %s : %s' % (name, info)) - + logger.info("-- session options:") - logger.info(" Note that those options will be kept for the current session") + logger.info(" Note that those options will be kept for the current session") logger.info(" --cluster : Submit to the cluster. Current cluster: %s" % self.options['cluster_type']) logger.info(" --multicore : Run in multi-core configuration") logger.info(" --nb_core=X : limit the number of core to use to X.") - + def help_generate_events(self): logger.info("syntax: generate_events [run_name] [options]",) @@ -398,16 +398,16 @@ def help_initMadLoop(self): logger.info(" -f : Bypass the edition of MadLoopParams.dat.",'$MG:color:BLUE') logger.info(" -r : Refresh of the existing filters (erasing them if already present).",'$MG:color:BLUE') logger.info(" --nPS= : Specify how many phase-space points should be tried to set up the filters.",'$MG:color:BLUE') - + def help_calculate_decay_widths(self): - + if self.ninitial != 1: logger.warning("This command is only valid for processes of type A > B C.") logger.warning("This command can not be run in current context.") logger.warning("") - + logger.info("syntax: calculate_decay_widths [run_name] [options])") logger.info("-- Calculate decay widths and enter widths and BRs in param_card") logger.info(" for a series of processes of type A > B C ...") @@ -428,8 +428,8 @@ def help_survey(self): logger.info("-- evaluate the different channel associate to the process") self.run_options_help([("--" + key,value[-1]) for (key,value) in \ self._survey_options.items()]) - - + + def help_restart_gridpack(self): logger.info("syntax: restart_gridpack --precision= --restart_zero") @@ -439,14 +439,14 @@ def help_launch(self): logger.info("syntax: launch [run_name] [options])") logger.info(" --alias for either generate_events/calculate_decay_widths") logger.info(" depending of the number of particles in the initial state.") - + if self.ninitial == 1: logger.info("For this directory this is equivalent to calculate_decay_widths") self.help_calculate_decay_widths() else: logger.info("For this directory this is equivalent to $generate_events") self.help_generate_events() - + def help_refine(self): logger.info("syntax: refine require_precision [max_channel] [--run_options]") logger.info("-- refine the LAST run to achieve a given precision.") @@ -454,14 +454,14 @@ def help_refine(self): logger.info(' or the required relative error') logger.info(' max_channel:[5] maximal number of channel per job') self.run_options_help([]) - + def help_combine_events(self): """ """ logger.info("syntax: combine_events [run_name] [--tag=tag_name] [--run_options]") logger.info("-- Combine the last run in order to write the number of events") logger.info(" asked in the run_card.") self.run_options_help([]) - + def help_store_events(self): """ """ logger.info("syntax: store_events [--run_options]") @@ -481,7 +481,7 @@ def help_import(self): logger.info("syntax: import command PATH") logger.info("-- Execute the command present in the file") self.run_options_help([]) - + def help_syscalc(self): logger.info("syntax: syscalc [RUN] [%s] [-f | --tag=]" % '|'.join(self._plot_mode)) logger.info("-- calculate systematics information for the RUN (current run by default)") @@ -506,18 +506,18 @@ class AskRun(cmd.ControlSwitch): ('madspin', 'Decay onshell particles'), ('reweight', 'Add weights to events for new hypp.') ] - + def __init__(self, question, line_args=[], mode=None, force=False, *args, **opt): - + self.check_available_module(opt['mother_interface'].options) self.me_dir = opt['mother_interface'].me_dir super(AskRun,self).__init__(self.to_control, opt['mother_interface'], *args, **opt) - - + + def check_available_module(self, options): - + self.available_module = set() if options['pythia-pgs_path']: self.available_module.add('PY6') @@ -540,32 +540,32 @@ def check_available_module(self, options): self.available_module.add('Rivet') else: logger.warning("Rivet program installed but no parton shower with hepmc output detected.\n Please install pythia8") - + if not MADEVENT or ('mg5_path' in options and options['mg5_path']): self.available_module.add('MadSpin') if misc.has_f2py() or options['f2py_compiler']: self.available_module.add('reweight') -# old mode to activate the shower +# old mode to activate the shower def ans_parton(self, value=None): """None: means that the user type 'pythia' value: means that the user type pythia=value""" - + if value is None: self.set_all_off() else: logger.warning('Invalid command: parton=%s' % value) - - + + # -# HANDLING SHOWER +# HANDLING SHOWER # def get_allowed_shower(self): """return valid entry for the shower switch""" - + if hasattr(self, 'allowed_shower'): return self.allowed_shower - + self.allowed_shower = [] if 'PY6' in self.available_module: self.allowed_shower.append('Pythia6') @@ -574,9 +574,9 @@ def get_allowed_shower(self): if self.allowed_shower: self.allowed_shower.append('OFF') return self.allowed_shower - + def set_default_shower(self): - + if 'PY6' in self.available_module and\ os.path.exists(pjoin(self.me_dir,'Cards','pythia_card.dat')): self.switch['shower'] = 'Pythia6' @@ -590,10 +590,10 @@ def set_default_shower(self): def check_value_shower(self, value): """check an entry is valid. return the valid entry in case of shortcut""" - + if value in self.get_allowed_shower(): return True - + value =value.lower() if value in ['py6','p6','pythia_6'] and 'PY6' in self.available_module: return 'Pythia6' @@ -601,13 +601,13 @@ def check_value_shower(self, value): return 'Pythia8' else: return False - - -# old mode to activate the shower + + +# old mode to activate the shower def ans_pythia(self, value=None): """None: means that the user type 'pythia' value: means that the user type pythia=value""" - + if 'PY6' not in self.available_module: logger.info('pythia-pgs not available. Ignore commmand') return @@ -621,13 +621,13 @@ def ans_pythia(self, value=None): self.set_switch('shower', 'OFF') else: logger.warning('Invalid command: pythia=%s' % value) - - + + def consistency_shower_detector(self, vshower, vdetector): """consistency_XX_YY(val_XX, val_YY) -> XX is the new key set by the user to a new value val_XX -> YY is another key - -> return value should be None or "replace_YY" + -> return value should be None or "replace_YY" """ if vshower == 'OFF': @@ -635,35 +635,35 @@ def consistency_shower_detector(self, vshower, vdetector): return 'OFF' if vshower == 'Pythia8' and vdetector == 'PGS': return 'OFF' - + return None - + # # HANDLING DETECTOR # def get_allowed_detector(self): """return valid entry for the switch""" - + if hasattr(self, 'allowed_detector'): - return self.allowed_detector - + return self.allowed_detector + self.allowed_detector = [] if 'PGS' in self.available_module: self.allowed_detector.append('PGS') if 'Delphes' in self.available_module: self.allowed_detector.append('Delphes') - + if self.allowed_detector: self.allowed_detector.append('OFF') - return self.allowed_detector + return self.allowed_detector def set_default_detector(self): - + self.set_default_shower() #ensure that this one is called first! - + if 'PGS' in self.available_module and self.switch['shower'] == 'Pythia6'\ and os.path.exists(pjoin(self.me_dir,'Cards','pgs_card.dat')): self.switch['detector'] = 'PGS' @@ -674,16 +674,16 @@ def set_default_detector(self): self.switch['detector'] = 'OFF' else: self.switch['detector'] = 'Not Avail.' - -# old mode to activate pgs + +# old mode to activate pgs def ans_pgs(self, value=None): """None: means that the user type 'pgs' - value: means that the user type pgs=value""" - + value: means that the user type pgs=value""" + if 'PGS' not in self.available_module: logger.info('pythia-pgs not available. Ignore commmand') return - + if value is None: self.set_all_off() self.switch['shower'] = 'Pythia6' @@ -696,16 +696,16 @@ def ans_pgs(self, value=None): else: logger.warning('Invalid command: pgs=%s' % value) - + # old mode to activate Delphes def ans_delphes(self, value=None): """None: means that the user type 'delphes' - value: means that the user type delphes=value""" - + value: means that the user type delphes=value""" + if 'Delphes' not in self.available_module: logger.warning('Delphes not available. Ignore commmand') return - + if value is None: self.set_all_off() if 'PY6' in self.available_module: @@ -718,15 +718,15 @@ def ans_delphes(self, value=None): elif value == 'off': self.set_switch('detector', 'OFF') else: - logger.warning('Invalid command: pgs=%s' % value) + logger.warning('Invalid command: pgs=%s' % value) def consistency_detector_shower(self,vdetector, vshower): """consistency_XX_YY(val_XX, val_YY) -> XX is the new key set by the user to a new value val_XX -> YY is another key - -> return value should be None or "replace_YY" + -> return value should be None or "replace_YY" """ - + if vdetector == 'PGS' and vshower != 'Pythia6': return 'Pythia6' if vdetector == 'Delphes' and vshower not in ['Pythia6', 'Pythia8']: @@ -744,28 +744,28 @@ def consistency_detector_shower(self,vdetector, vshower): # def get_allowed_analysis(self): """return valid entry for the shower switch""" - + if hasattr(self, 'allowed_analysis'): return self.allowed_analysis - + self.allowed_analysis = [] if 'ExRoot' in self.available_module: self.allowed_analysis.append('ExRoot') if 'MA4' in self.available_module: self.allowed_analysis.append('MadAnalysis4') if 'MA5' in self.available_module: - self.allowed_analysis.append('MadAnalysis5') + self.allowed_analysis.append('MadAnalysis5') if 'Rivet' in self.available_module: - self.allowed_analysis.append('Rivet') - + self.allowed_analysis.append('Rivet') + if self.allowed_analysis: self.allowed_analysis.append('OFF') - + return self.allowed_analysis - + def check_analysis(self, value): """check an entry is valid. return the valid entry in case of shortcut""" - + if value in self.get_allowed_analysis(): return True if value.lower() in ['ma4', 'madanalysis4', 'madanalysis_4','4']: @@ -786,30 +786,30 @@ def consistency_shower_analysis(self, vshower, vanalysis): """consistency_XX_YY(val_XX, val_YY) -> XX is the new key set by the user to a new value val_XX -> YY is another key - -> return value should be None or "replace_YY" + -> return value should be None or "replace_YY" """ if vshower != 'Pythia8' and vanalysis == 'Rivet': return 'OFF' #new value for analysis - + return None - + def consistency_analysis_shower(self, vanalysis, vshower): """consistency_XX_YY(val_XX, val_YY) -> XX is the new key set by the user to a new value val_XX -> YY is another key - -> return value should be None or "replace_YY" + -> return value should be None or "replace_YY" """ if vshower != 'Pythia8' and vanalysis == 'Rivet': return 'Pythia8' #new value for analysis - + return None def set_default_analysis(self): """initialise the switch for analysis""" - + if 'MA4' in self.available_module and \ os.path.exists(pjoin(self.me_dir,'Cards','plot_card.dat')): self.switch['analysis'] = 'MadAnalysis4' @@ -818,46 +818,46 @@ def set_default_analysis(self): or os.path.exists(pjoin(self.me_dir,'Cards', 'madanalysis5_hadron_card.dat'))): self.switch['analysis'] = 'MadAnalysis5' elif 'ExRoot' in self.available_module: - self.switch['analysis'] = 'ExRoot' - elif self.get_allowed_analysis(): + self.switch['analysis'] = 'ExRoot' + elif self.get_allowed_analysis(): self.switch['analysis'] = 'OFF' else: self.switch['analysis'] = 'Not Avail.' - + # # MADSPIN handling # def get_allowed_madspin(self): """ ON|OFF|onshell """ - + if hasattr(self, 'allowed_madspin'): return self.allowed_madspin - + self.allowed_madspin = [] if 'MadSpin' in self.available_module: self.allowed_madspin = ['OFF',"ON",'onshell',"full"] return self.allowed_madspin - + def check_value_madspin(self, value): """handle alias and valid option not present in get_allowed_madspin""" - + if value.upper() in self.get_allowed_madspin(): return True elif value.lower() in self.get_allowed_madspin(): return True - + if 'MadSpin' not in self.available_module: return False - + if value.lower() in ['madspin', 'full']: return 'full' elif value.lower() in ['none']: return 'none' - - + + def set_default_madspin(self): """initialise the switch for madspin""" - + if 'MadSpin' in self.available_module: if os.path.exists(pjoin(self.me_dir,'Cards','madspin_card.dat')): self.switch['madspin'] = 'ON' @@ -865,10 +865,10 @@ def set_default_madspin(self): self.switch['madspin'] = 'OFF' else: self.switch['madspin'] = 'Not Avail.' - + def get_cardcmd_for_madspin(self, value): """set some command to run before allowing the user to modify the cards.""" - + if value == 'onshell': return ["edit madspin_card --replace_line='set spinmode' --before_line='decay' set spinmode onshell"] elif value in ['full', 'madspin']: @@ -877,36 +877,36 @@ def get_cardcmd_for_madspin(self, value): return ["edit madspin_card --replace_line='set spinmode' --before_line='decay' set spinmode none"] else: return [] - + # # ReWeight handling # def get_allowed_reweight(self): """ return the list of valid option for reweight=XXX """ - + if hasattr(self, 'allowed_reweight'): return getattr(self, 'allowed_reweight') - + if 'reweight' not in self.available_module: self.allowed_reweight = [] return self.allowed_reweight = ['OFF', 'ON'] - + # check for plugin mode plugin_path = self.mother_interface.plugin_path opts = misc.from_plugin_import(plugin_path, 'new_reweight', warning=False) self.allowed_reweight += opts - + def set_default_reweight(self): """initialise the switch for reweight""" - + if 'reweight' in self.available_module: if os.path.exists(pjoin(self.me_dir,'Cards','reweight_card.dat')): self.switch['reweight'] = 'ON' else: self.switch['reweight'] = 'OFF' else: - self.switch['reweight'] = 'Not Avail.' + self.switch['reweight'] = 'Not Avail.' #=============================================================================== # CheckValidForCmd @@ -916,14 +916,14 @@ class CheckValidForCmd(object): def check_banner_run(self, args): """check the validity of line""" - + if len(args) == 0: self.help_banner_run() raise self.InvalidCmd('banner_run requires at least one argument.') - + tag = [a[6:] for a in args if a.startswith('--tag=')] - - + + if os.path.exists(args[0]): type ='banner' format = self.detect_card_type(args[0]) @@ -931,7 +931,7 @@ def check_banner_run(self, args): raise self.InvalidCmd('The file is not a valid banner.') elif tag: args[0] = pjoin(self.me_dir,'Events', args[0], '%s_%s_banner.txt' % \ - (args[0], tag)) + (args[0], tag)) if not os.path.exists(args[0]): raise self.InvalidCmd('No banner associates to this name and tag.') else: @@ -939,7 +939,7 @@ def check_banner_run(self, args): type = 'run' banners = misc.glob('*_banner.txt', pjoin(self.me_dir,'Events', args[0])) if not banners: - raise self.InvalidCmd('No banner associates to this name.') + raise self.InvalidCmd('No banner associates to this name.') elif len(banners) == 1: args[0] = banners[0] else: @@ -947,8 +947,8 @@ def check_banner_run(self, args): tags = [os.path.basename(p)[len(args[0])+1:-11] for p in banners] tag = self.ask('which tag do you want to use?', tags[0], tags) args[0] = pjoin(self.me_dir,'Events', args[0], '%s_%s_banner.txt' % \ - (args[0], tag)) - + (args[0], tag)) + run_name = [arg[7:] for arg in args if arg.startswith('--name=')] if run_name: try: @@ -970,14 +970,14 @@ def check_banner_run(self, args): except Exception: pass self.set_run_name(name) - + def check_history(self, args): """check the validity of line""" - + if len(args) > 1: self.help_history() raise self.InvalidCmd('\"history\" command takes at most one argument') - + if not len(args): return elif args[0] != 'clean': @@ -985,16 +985,16 @@ def check_history(self, args): if dirpath and not os.path.exists(dirpath) or \ os.path.isdir(args[0]): raise self.InvalidCmd("invalid path %s " % dirpath) - + def check_save(self, args): """ check the validity of the line""" - + if len(args) == 0: args.append('options') if args[0] not in self._save_opts: raise self.InvalidCmd('wrong \"save\" format') - + if args[0] != 'options' and len(args) != 2: self.help_save() raise self.InvalidCmd('wrong \"save\" format') @@ -1003,7 +1003,7 @@ def check_save(self, args): if not os.path.exists(basename): raise self.InvalidCmd('%s is not a valid path, please retry' % \ args[1]) - + if args[0] == 'options': has_path = None for arg in args[1:]: @@ -1024,9 +1024,9 @@ def check_save(self, args): has_path = True if not has_path: if '--auto' in arg and self.options['mg5_path']: - args.insert(1, pjoin(self.options['mg5_path'],'input','mg5_configuration.txt')) + args.insert(1, pjoin(self.options['mg5_path'],'input','mg5_configuration.txt')) else: - args.insert(1, pjoin(self.me_dir,'Cards','me5_configuration.txt')) + args.insert(1, pjoin(self.me_dir,'Cards','me5_configuration.txt')) def check_set(self, args): """ check the validity of the line""" @@ -1039,20 +1039,20 @@ def check_set(self, args): self.help_set() raise self.InvalidCmd('Possible options for set are %s' % \ self._set_options) - + if args[0] in ['stdout_level']: if args[1] not in ['DEBUG','INFO','WARNING','ERROR','CRITICAL'] \ and not args[1].isdigit(): raise self.InvalidCmd('output_level needs ' + \ - 'a valid level') - + 'a valid level') + if args[0] in ['timeout']: if not args[1].isdigit(): - raise self.InvalidCmd('timeout values should be a integer') - + raise self.InvalidCmd('timeout values should be a integer') + def check_open(self, args): """ check the validity of the line """ - + if len(args) != 1: self.help_open() raise self.InvalidCmd('OPEN command requires exactly one argument') @@ -1069,7 +1069,7 @@ def check_open(self, args): raise self.InvalidCmd('No MadEvent path defined. Unable to associate this name to a file') else: return True - + path = self.me_dir if os.path.isfile(os.path.join(path,args[0])): args[0] = os.path.join(path,args[0]) @@ -1078,7 +1078,7 @@ def check_open(self, args): elif os.path.isfile(os.path.join(path,'HTML',args[0])): args[0] = os.path.join(path,'HTML',args[0]) # special for card with _default define: copy the default and open it - elif '_card.dat' in args[0]: + elif '_card.dat' in args[0]: name = args[0].replace('_card.dat','_card_default.dat') if os.path.isfile(os.path.join(path,'Cards', name)): files.cp(os.path.join(path,'Cards', name), os.path.join(path,'Cards', args[0])) @@ -1086,13 +1086,13 @@ def check_open(self, args): else: raise self.InvalidCmd('No default path for this file') elif not os.path.isfile(args[0]): - raise self.InvalidCmd('No default path for this file') - + raise self.InvalidCmd('No default path for this file') + def check_initMadLoop(self, args): """ check initMadLoop command arguments are valid.""" - + opt = {'refresh': False, 'nPS': None, 'force': False} - + for arg in args: if arg in ['-r','--refresh']: opt['refresh'] = True @@ -1105,14 +1105,14 @@ def check_initMadLoop(self, args): except ValueError: raise InvalidCmd("The number of attempts specified "+ "'%s' is not a valid integer."%n_attempts) - + return opt - + def check_treatcards(self, args): """check that treatcards arguments are valid [param|run|all] [--output_dir=] [--param_card=] [--run_card=] """ - + opt = {'output_dir':pjoin(self.me_dir,'Source'), 'param_card':pjoin(self.me_dir,'Cards','param_card.dat'), 'run_card':pjoin(self.me_dir,'Cards','run_card.dat'), @@ -1129,14 +1129,14 @@ def check_treatcards(self, args): if os.path.isfile(value): card_name = self.detect_card_type(value) if card_name != key: - raise self.InvalidCmd('Format for input file detected as %s while expecting %s' + raise self.InvalidCmd('Format for input file detected as %s while expecting %s' % (card_name, key)) opt[key] = value elif os.path.isfile(pjoin(self.me_dir,value)): card_name = self.detect_card_type(pjoin(self.me_dir,value)) if card_name != key: - raise self.InvalidCmd('Format for input file detected as %s while expecting %s' - % (card_name, key)) + raise self.InvalidCmd('Format for input file detected as %s while expecting %s' + % (card_name, key)) opt[key] = value else: raise self.InvalidCmd('No such file: %s ' % value) @@ -1154,14 +1154,14 @@ def check_treatcards(self, args): else: self.help_treatcards() raise self.InvalidCmd('Unvalid argument %s' % arg) - - return mode, opt - - + + return mode, opt + + def check_survey(self, args, cmd='survey'): """check that the argument for survey are valid""" - - + + self.opts = dict([(key,value[1]) for (key,value) in \ self._survey_options.items()]) @@ -1183,41 +1183,41 @@ def check_survey(self, args, cmd='survey'): self.help_survey() raise self.InvalidCmd('Too many argument for %s command' % cmd) elif not args: - # No run name assigned -> assigned one automaticaly + # No run name assigned -> assigned one automaticaly self.set_run_name(self.find_available_run_name(self.me_dir)) else: self.set_run_name(args[0], None,'parton', True) args.pop(0) - + return True def check_generate_events(self, args): """check that the argument for generate_events are valid""" - + run = None if args and args[-1].startswith('--laststep='): run = args[-1].split('=')[-1] if run not in ['auto','parton', 'pythia', 'pgs', 'delphes']: self.help_generate_events() raise self.InvalidCmd('invalid %s argument'% args[-1]) - if run != 'parton' and not self.options['pythia-pgs_path']: - raise self.InvalidCmd('''pythia-pgs not install. Please install this package first. + if run != 'parton' and not self.options['pythia-pgs_path']: + raise self.InvalidCmd('''pythia-pgs not install. Please install this package first. To do so type: \'install pythia-pgs\' in the mg5 interface''') if run == 'delphes' and not self.options['delphes_path']: - raise self.InvalidCmd('''delphes not install. Please install this package first. + raise self.InvalidCmd('''delphes not install. Please install this package first. To do so type: \'install Delphes\' in the mg5 interface''') del args[-1] - + #if len(args) > 1: # self.help_generate_events() # raise self.InvalidCmd('Too many argument for generate_events command: %s' % cmd) - + return run def check_calculate_decay_widths(self, args): """check that the argument for calculate_decay_widths are valid""" - + if self.ninitial != 1: raise self.InvalidCmd('Can only calculate decay widths for decay processes A > B C ...') @@ -1232,7 +1232,7 @@ def check_calculate_decay_widths(self, args): if len(args) > 1: self.help_calculate_decay_widths() raise self.InvalidCmd('Too many argument for calculate_decay_widths command: %s' % cmd) - + return accuracy @@ -1241,25 +1241,25 @@ def check_multi_run(self, args): """check that the argument for survey are valid""" run = None - + if not len(args): self.help_multi_run() raise self.InvalidCmd("""multi_run command requires at least one argument for the number of times that it call generate_events command""") - + if args[-1].startswith('--laststep='): run = args[-1].split('=')[-1] if run not in ['parton', 'pythia', 'pgs', 'delphes']: self.help_multi_run() raise self.InvalidCmd('invalid %s argument'% args[-1]) - if run != 'parton' and not self.options['pythia-pgs_path']: - raise self.InvalidCmd('''pythia-pgs not install. Please install this package first. + if run != 'parton' and not self.options['pythia-pgs_path']: + raise self.InvalidCmd('''pythia-pgs not install. Please install this package first. To do so type: \'install pythia-pgs\' in the mg5 interface''') if run == 'delphes' and not self.options['delphes_path']: - raise self.InvalidCmd('''delphes not install. Please install this package first. + raise self.InvalidCmd('''delphes not install. Please install this package first. To do so type: \'install Delphes\' in the mg5 interface''') del args[-1] - + elif not args[0].isdigit(): self.help_multi_run() @@ -1267,7 +1267,7 @@ def check_multi_run(self, args): #pass nb run to an integer nb_run = args.pop(0) args.insert(0, int(nb_run)) - + return run @@ -1284,7 +1284,7 @@ def check_refine(self, args): self.help_refine() raise self.InvalidCmd('require_precision argument is require for refine cmd') - + if not self.run_name: if self.results.lastrun: self.set_run_name(self.results.lastrun) @@ -1296,17 +1296,17 @@ def check_refine(self, args): else: try: [float(arg) for arg in args] - except ValueError: - self.help_refine() + except ValueError: + self.help_refine() raise self.InvalidCmd('refine arguments are suppose to be number') - + return True - + def check_combine_events(self, arg): """ Check the argument for the combine events command """ - + tag = [a for a in arg if a.startswith('--tag=')] - if tag: + if tag: arg.remove(tag[0]) tag = tag[0][6:] elif not self.run_tag: @@ -1314,53 +1314,53 @@ def check_combine_events(self, arg): else: tag = self.run_tag self.run_tag = tag - + if len(arg) > 1: self.help_combine_events() raise self.InvalidCmd('Too many argument for combine_events command') - + if len(arg) == 1: self.set_run_name(arg[0], self.run_tag, 'parton', True) - + if not self.run_name: if not self.results.lastrun: raise self.InvalidCmd('No run_name currently define. Unable to run combine') else: self.set_run_name(self.results.lastrun) - + return True - + def check_pythia(self, args): """Check the argument for pythia command - syntax: pythia [NAME] + syntax: pythia [NAME] Note that other option are already removed at this point """ - + mode = None laststep = [arg for arg in args if arg.startswith('--laststep=')] if laststep and len(laststep)==1: mode = laststep[0].split('=')[-1] if mode not in ['auto', 'pythia', 'pgs', 'delphes']: self.help_pythia() - raise self.InvalidCmd('invalid %s argument'% args[-1]) + raise self.InvalidCmd('invalid %s argument'% args[-1]) elif laststep: raise self.InvalidCmd('only one laststep argument is allowed') - + if not self.options['pythia-pgs_path']: logger.info('Retry to read configuration file to find pythia-pgs path') self.set_configuration() - + if not self.options['pythia-pgs_path'] or not \ os.path.exists(pjoin(self.options['pythia-pgs_path'],'src')): error_msg = 'No valid pythia-pgs path set.\n' error_msg += 'Please use the set command to define the path and retry.\n' error_msg += 'You can also define it in the configuration file.\n' raise self.InvalidCmd(error_msg) - - - + + + tag = [a for a in args if a.startswith('--tag=')] - if tag: + if tag: args.remove(tag[0]) tag = tag[0][6:] @@ -1368,8 +1368,8 @@ def check_pythia(self, args): if self.results.lastrun: args.insert(0, self.results.lastrun) else: - raise self.InvalidCmd('No run name currently define. Please add this information.') - + raise self.InvalidCmd('No run name currently define. Please add this information.') + if len(args) >= 1: if args[0] != self.run_name and\ not os.path.exists(pjoin(self.me_dir,'Events',args[0], 'unweighted_events.lhe.gz')): @@ -1388,21 +1388,21 @@ def check_pythia(self, args): files.ln(input_file, os.path.dirname(output_file)) else: misc.gunzip(input_file, keep=True, stdout=output_file) - + args.append(mode) - + def check_pythia8(self, args): """Check the argument for pythia command - syntax: pythia8 [NAME] + syntax: pythia8 [NAME] Note that other option are already removed at this point - """ + """ mode = None laststep = [arg for arg in args if arg.startswith('--laststep=')] if laststep and len(laststep)==1: mode = laststep[0].split('=')[-1] if mode not in ['auto', 'pythia','pythia8','delphes']: self.help_pythia8() - raise self.InvalidCmd('invalid %s argument'% args[-1]) + raise self.InvalidCmd('invalid %s argument'% args[-1]) elif laststep: raise self.InvalidCmd('only one laststep argument is allowed') @@ -1410,7 +1410,7 @@ def check_pythia8(self, args): if not self.options['pythia8_path']: logger.info('Retry reading configuration file to find pythia8 path') self.set_configuration() - + if not self.options['pythia8_path'] or not \ os.path.exists(pjoin(self.options['pythia8_path'],'bin','pythia8-config')): error_msg = 'No valid pythia8 path set.\n' @@ -1421,7 +1421,7 @@ def check_pythia8(self, args): raise self.InvalidCmd(error_msg) tag = [a for a in args if a.startswith('--tag=')] - if tag: + if tag: args.remove(tag[0]) tag = tag[0][6:] @@ -1430,11 +1430,11 @@ def check_pythia8(self, args): args.insert(0, self.results.lastrun) else: raise self.InvalidCmd('No run name currently define. '+ - 'Please add this information.') - + 'Please add this information.') + if len(args) >= 1: if args[0] != self.run_name and\ - not os.path.exists(pjoin(self.me_dir,'Events',args[0], + not os.path.exists(pjoin(self.me_dir,'Events',args[0], 'unweighted_events.lhe.gz')): raise self.InvalidCmd('No events file corresponding to %s run. ' % args[0]) @@ -1451,9 +1451,9 @@ def check_pythia8(self, args): else: raise self.InvalidCmd('No event file corresponding to %s run. ' % self.run_name) - + args.append(mode) - + def check_remove(self, args): """Check that the remove command is valid""" @@ -1484,33 +1484,33 @@ def check_plot(self, args): madir = self.options['madanalysis_path'] td = self.options['td_path'] - + if not madir or not td: logger.info('Retry to read configuration file to find madanalysis/td') self.set_configuration() madir = self.options['madanalysis_path'] - td = self.options['td_path'] - + td = self.options['td_path'] + if not madir: error_msg = 'No valid MadAnalysis path set.\n' error_msg += 'Please use the set command to define the path and retry.\n' error_msg += 'You can also define it in the configuration file.\n' - raise self.InvalidCmd(error_msg) + raise self.InvalidCmd(error_msg) if not td: error_msg = 'No valid td path set.\n' error_msg += 'Please use the set command to define the path and retry.\n' error_msg += 'You can also define it in the configuration file.\n' - raise self.InvalidCmd(error_msg) - + raise self.InvalidCmd(error_msg) + if len(args) == 0: if not hasattr(self, 'run_name') or not self.run_name: self.help_plot() - raise self.InvalidCmd('No run name currently define. Please add this information.') + raise self.InvalidCmd('No run name currently define. Please add this information.') args.append('all') return - + if args[0] not in self._plot_mode: self.set_run_name(args[0], level='plot') del args[0] @@ -1518,45 +1518,45 @@ def check_plot(self, args): args.append('all') elif not self.run_name: self.help_plot() - raise self.InvalidCmd('No run name currently define. Please add this information.') - + raise self.InvalidCmd('No run name currently define. Please add this information.') + for arg in args: if arg not in self._plot_mode and arg != self.run_name: self.help_plot() - raise self.InvalidCmd('unknown options %s' % arg) - + raise self.InvalidCmd('unknown options %s' % arg) + def check_syscalc(self, args): """Check the argument for the syscalc command syscalc run_name modes""" scdir = self.options['syscalc_path'] - + if not scdir: logger.info('Retry to read configuration file to find SysCalc') self.set_configuration() scdir = self.options['syscalc_path'] - + if not scdir: error_msg = 'No valid SysCalc path set.\n' error_msg += 'Please use the set command to define the path and retry.\n' error_msg += 'You can also define it in the configuration file.\n' error_msg += 'Please note that you need to compile SysCalc first.' - raise self.InvalidCmd(error_msg) - + raise self.InvalidCmd(error_msg) + if len(args) == 0: if not hasattr(self, 'run_name') or not self.run_name: self.help_syscalc() - raise self.InvalidCmd('No run name currently defined. Please add this information.') + raise self.InvalidCmd('No run name currently defined. Please add this information.') args.append('all') return #deal options tag = [a for a in args if a.startswith('--tag=')] - if tag: + if tag: args.remove(tag[0]) tag = tag[0][6:] - + if args[0] not in self._syscalc_mode: self.set_run_name(args[0], tag=tag, level='syscalc') del args[0] @@ -1564,61 +1564,61 @@ def check_syscalc(self, args): args.append('all') elif not self.run_name: self.help_syscalc() - raise self.InvalidCmd('No run name currently defined. Please add this information.') + raise self.InvalidCmd('No run name currently defined. Please add this information.') elif tag and tag != self.run_tag: self.set_run_name(self.run_name, tag=tag, level='syscalc') - + for arg in args: if arg not in self._syscalc_mode and arg != self.run_name: self.help_syscalc() - raise self.InvalidCmd('unknown options %s' % arg) + raise self.InvalidCmd('unknown options %s' % arg) if self.run_card['use_syst'] not in self.true: raise self.InvalidCmd('Run %s does not include ' % self.run_name + \ 'systematics information needed for syscalc.') - - + + def check_pgs(self, arg, no_default=False): """Check the argument for pythia command - syntax is "pgs [NAME]" + syntax is "pgs [NAME]" Note that other option are already remove at this point """ - + # If not pythia-pgs path if not self.options['pythia-pgs_path']: logger.info('Retry to read configuration file to find pythia-pgs path') self.set_configuration() - + if not self.options['pythia-pgs_path'] or not \ os.path.exists(pjoin(self.options['pythia-pgs_path'],'src')): error_msg = 'No valid pythia-pgs path set.\n' error_msg += 'Please use the set command to define the path and retry.\n' error_msg += 'You can also define it in the configuration file.\n' - raise self.InvalidCmd(error_msg) - + raise self.InvalidCmd(error_msg) + tag = [a for a in arg if a.startswith('--tag=')] - if tag: + if tag: arg.remove(tag[0]) tag = tag[0][6:] - - + + if len(arg) == 0 and not self.run_name: if self.results.lastrun: arg.insert(0, self.results.lastrun) else: - raise self.InvalidCmd('No run name currently define. Please add this information.') - + raise self.InvalidCmd('No run name currently define. Please add this information.') + if len(arg) == 1 and self.run_name == arg[0]: arg.pop(0) - + if not len(arg) and \ not os.path.exists(pjoin(self.me_dir,'Events','pythia_events.hep')): if not no_default: self.help_pgs() raise self.InvalidCmd('''No file file pythia_events.hep currently available Please specify a valid run_name''') - - lock = None + + lock = None if len(arg) == 1: prev_tag = self.set_run_name(arg[0], tag, 'pgs') if not os.path.exists(pjoin(self.me_dir,'Events',self.run_name,'%s_pythia_events.hep.gz' % prev_tag)): @@ -1626,25 +1626,25 @@ def check_pgs(self, arg, no_default=False): else: input_file = pjoin(self.me_dir,'Events', self.run_name, '%s_pythia_events.hep.gz' % prev_tag) output_file = pjoin(self.me_dir, 'Events', 'pythia_events.hep') - lock = cluster.asyncrone_launch('gunzip',stdout=open(output_file,'w'), + lock = cluster.asyncrone_launch('gunzip',stdout=open(output_file,'w'), argument=['-c', input_file]) else: - if tag: + if tag: self.run_card['run_tag'] = tag self.set_run_name(self.run_name, tag, 'pgs') - - return lock + + return lock def check_display(self, args): """check the validity of line syntax is "display XXXXX" """ - + if len(args) < 1 or args[0] not in self._display_opts: self.help_display() raise self.InvalidCmd - + if args[0] == 'variable' and len(args) !=2: raise self.InvalidCmd('variable need a variable name') @@ -1654,39 +1654,39 @@ def check_display(self, args): def check_import(self, args): """check the validity of line""" - + if not args: self.help_import() raise self.InvalidCmd('wrong \"import\" format') - + if args[0] != 'command': args.insert(0,'command') - - + + if not len(args) == 2 or not os.path.exists(args[1]): raise self.InvalidCmd('PATH is mandatory for import command\n') - + #=============================================================================== # CompleteForCmd #=============================================================================== class CompleteForCmd(CheckValidForCmd): """ The Series of help routine for the MadGraphCmd""" - - + + def complete_banner_run(self, text, line, begidx, endidx, formatting=True): "Complete the banner run command" try: - - + + args = self.split_arg(line[0:begidx], error=False) - + if args[-1].endswith(os.path.sep): return self.path_completion(text, os.path.join('.',*[a for a in args \ - if a.endswith(os.path.sep)])) - - + if a.endswith(os.path.sep)])) + + if len(args) > 1: # only options are possible tags = misc.glob('%s_*_banner.txt' % args[1], pjoin(self.me_dir, 'Events' , args[1])) @@ -1697,9 +1697,9 @@ def complete_banner_run(self, text, line, begidx, endidx, formatting=True): else: return self.list_completion(text, tags) return self.list_completion(text, tags +['--name=','-f'], line) - + # First argument - possibilites = {} + possibilites = {} comp = self.path_completion(text, os.path.join('.',*[a for a in args \ if a.endswith(os.path.sep)])) @@ -1711,10 +1711,10 @@ def complete_banner_run(self, text, line, begidx, endidx, formatting=True): run_list = misc.glob(pjoin('*','*_banner.txt'), pjoin(self.me_dir, 'Events')) run_list = [n.rsplit('/',2)[1] for n in run_list] possibilites['RUN Name'] = self.list_completion(text, run_list) - + return self.deal_multiple_categories(possibilites, formatting) - - + + except Exception as error: print(error) @@ -1732,12 +1732,12 @@ def complete_history(self, text, line, begidx, endidx): if len(args) == 1: return self.path_completion(text) - - def complete_open(self, text, line, begidx, endidx): + + def complete_open(self, text, line, begidx, endidx): """ complete the open command """ args = self.split_arg(line[0:begidx]) - + # Directory continuation if os.path.sep in args[-1] + text: return self.path_completion(text, @@ -1751,10 +1751,10 @@ def complete_open(self, text, line, begidx, endidx): if os.path.isfile(os.path.join(path,'README')): possibility.append('README') if os.path.isdir(os.path.join(path,'Cards')): - possibility += [f for f in os.listdir(os.path.join(path,'Cards')) + possibility += [f for f in os.listdir(os.path.join(path,'Cards')) if f.endswith('.dat')] if os.path.isdir(os.path.join(path,'HTML')): - possibility += [f for f in os.listdir(os.path.join(path,'HTML')) + possibility += [f for f in os.listdir(os.path.join(path,'HTML')) if f.endswith('.html') and 'default' not in f] else: possibility.extend(['./','../']) @@ -1763,7 +1763,7 @@ def complete_open(self, text, line, begidx, endidx): if os.path.exists('MG5_debug'): possibility.append('MG5_debug') return self.list_completion(text, possibility) - + def complete_set(self, text, line, begidx, endidx): "Complete the set command" @@ -1784,27 +1784,27 @@ def complete_set(self, text, line, begidx, endidx): elif len(args) >2 and args[-1].endswith(os.path.sep): return self.path_completion(text, os.path.join('.',*[a for a in args if a.endswith(os.path.sep)]), - only_dirs = True) - + only_dirs = True) + def complete_survey(self, text, line, begidx, endidx): """ Complete the survey command """ - + if line.endswith('nb_core=') and not text: import multiprocessing max = multiprocessing.cpu_count() return [str(i) for i in range(2,max+1)] - + return self.list_completion(text, self._run_options, line) - + complete_refine = complete_survey complete_combine_events = complete_survey complite_store = complete_survey complete_generate_events = complete_survey complete_create_gridpack = complete_survey - + def complete_generate_events(self, text, line, begidx, endidx): """ Complete the generate events""" - + if line.endswith('nb_core=') and not text: import multiprocessing max = multiprocessing.cpu_count() @@ -1813,17 +1813,17 @@ def complete_generate_events(self, text, line, begidx, endidx): return ['parton','pythia','pgs','delphes'] elif '--laststep=' in line.split()[-1] and line and line[-1] != ' ': return self.list_completion(text,['parton','pythia','pgs','delphes'],line) - + opts = self._run_options + self._generate_options return self.list_completion(text, opts, line) def complete_initMadLoop(self, text, line, begidx, endidx): "Complete the initMadLoop command" - + numbers = [str(i) for i in range(10)] opts = ['-f','-r','--nPS='] - + args = self.split_arg(line[0:begidx], error=False) if len(line) >=6 and line[begidx-6:begidx]=='--nPS=': return self.list_completion(text, numbers, line) @@ -1840,18 +1840,18 @@ def complete_launch(self, *args, **opts): def complete_calculate_decay_widths(self, text, line, begidx, endidx): """ Complete the calculate_decay_widths command""" - + if line.endswith('nb_core=') and not text: import multiprocessing max = multiprocessing.cpu_count() return [str(i) for i in range(2,max+1)] - + opts = self._run_options + self._calculate_decay_options return self.list_completion(text, opts, line) - + def complete_display(self, text, line, begidx, endidx): - """ Complete the display command""" - + """ Complete the display command""" + args = self.split_arg(line[0:begidx], error=False) if len(args) >= 2 and args[1] =='results': start = line.find('results') @@ -1860,44 +1860,44 @@ def complete_display(self, text, line, begidx, endidx): def complete_multi_run(self, text, line, begidx, endidx): """complete multi run command""" - + args = self.split_arg(line[0:begidx], error=False) if len(args) == 1: data = [str(i) for i in range(0,20)] return self.list_completion(text, data, line) - + if line.endswith('run=') and not text: return ['parton','pythia','pgs','delphes'] elif '--laststep=' in line.split()[-1] and line and line[-1] != ' ': return self.list_completion(text,['parton','pythia','pgs','delphes'],line) - + opts = self._run_options + self._generate_options return self.list_completion(text, opts, line) - - - + + + if line.endswith('nb_core=') and not text: import multiprocessing max = multiprocessing.cpu_count() return [str(i) for i in range(2,max+1)] opts = self._run_options + self._generate_options return self.list_completion(text, opts, line) - + def complete_plot(self, text, line, begidx, endidx): """ Complete the plot command """ - + args = self.split_arg(line[0:begidx], error=False) if len(args) > 1: return self.list_completion(text, self._plot_mode) else: return self.list_completion(text, self._plot_mode + list(self.results.keys())) - + def complete_syscalc(self, text, line, begidx, endidx, formatting=True): """ Complete the syscalc command """ - + output = {} args = self.split_arg(line[0:begidx], error=False) - + if len(args) <=1: output['RUN_NAME'] = self.list_completion(list(self.results.keys())) output['MODE'] = self.list_completion(text, self._syscalc_mode) @@ -1907,12 +1907,12 @@ def complete_syscalc(self, text, line, begidx, endidx, formatting=True): if run in self.results: tags = ['--tag=%s' % tag['tag'] for tag in self.results[run]] output['options'] += tags - + return self.deal_multiple_categories(output, formatting) - + def complete_remove(self, text, line, begidx, endidx): """Complete the remove command """ - + args = self.split_arg(line[0:begidx], error=False) if len(args) > 1 and (text.startswith('--t')): run = args[1] @@ -1932,8 +1932,8 @@ def complete_remove(self, text, line, begidx, endidx): data = misc.glob(pjoin('*','*_banner.txt'), pjoin(self.me_dir, 'Events')) data = [n.rsplit('/',2)[1] for n in data] return self.list_completion(text, ['all'] + data) - - + + def complete_shower(self,text, line, begidx, endidx): "Complete the shower command" args = self.split_arg(line[0:begidx], error=False) @@ -1941,7 +1941,7 @@ def complete_shower(self,text, line, begidx, endidx): return self.list_completion(text, self._interfaced_showers) elif len(args)>1 and args[1] in self._interfaced_showers: return getattr(self, 'complete_%s' % text)\ - (text, args[1],line.replace(args[0]+' ',''), + (text, args[1],line.replace(args[0]+' ',''), begidx-len(args[0])-1, endidx-len(args[0])-1) def complete_pythia8(self,text, line, begidx, endidx): @@ -1955,11 +1955,11 @@ def complete_pythia8(self,text, line, begidx, endidx): if not self.run_name: return tmp1 else: - tmp2 = self.list_completion(text, self._run_options + ['-f', + tmp2 = self.list_completion(text, self._run_options + ['-f', '--no_default', '--tag='], line) return tmp1 + tmp2 elif line[-1] != '=': - return self.list_completion(text, self._run_options + ['-f', + return self.list_completion(text, self._run_options + ['-f', '--no_default','--tag='], line) def complete_madanalysis5_parton(self,text, line, begidx, endidx): @@ -1978,19 +1978,19 @@ def complete_madanalysis5_parton(self,text, line, begidx, endidx): else: tmp2 = self.list_completion(text, ['-f', '--MA5_stdout_lvl=','--no_default','--tag='], line) - return tmp1 + tmp2 + return tmp1 + tmp2 elif '--MA5_stdout_lvl=' in line and not any(arg.startswith( '--MA5_stdout_lvl=') for arg in args): - return self.list_completion(text, - ['--MA5_stdout_lvl=%s'%opt for opt in + return self.list_completion(text, + ['--MA5_stdout_lvl=%s'%opt for opt in ['logging.INFO','logging.DEBUG','logging.WARNING', 'logging.CRITICAL','90']], line) else: - return self.list_completion(text, ['-f', + return self.list_completion(text, ['-f', '--MA5_stdout_lvl=','--no_default','--tag='], line) def complete_pythia(self,text, line, begidx, endidx): - "Complete the pythia command" + "Complete the pythia command" args = self.split_arg(line[0:begidx], error=False) if len(args) == 1: @@ -2001,16 +2001,16 @@ def complete_pythia(self,text, line, begidx, endidx): if not self.run_name: return tmp1 else: - tmp2 = self.list_completion(text, self._run_options + ['-f', + tmp2 = self.list_completion(text, self._run_options + ['-f', '--no_default', '--tag='], line) return tmp1 + tmp2 elif line[-1] != '=': - return self.list_completion(text, self._run_options + ['-f', + return self.list_completion(text, self._run_options + ['-f', '--no_default','--tag='], line) def complete_pgs(self,text, line, begidx, endidx): "Complete the pythia command" - args = self.split_arg(line[0:begidx], error=False) + args = self.split_arg(line[0:begidx], error=False) if len(args) == 1: #return valid run_name data = misc.glob(pjoin('*', '*_pythia_events.hep.gz'), pjoin(self.me_dir, 'Events')) @@ -2019,23 +2019,23 @@ def complete_pgs(self,text, line, begidx, endidx): if not self.run_name: return tmp1 else: - tmp2 = self.list_completion(text, self._run_options + ['-f', + tmp2 = self.list_completion(text, self._run_options + ['-f', '--tag=' ,'--no_default'], line) - return tmp1 + tmp2 + return tmp1 + tmp2 else: - return self.list_completion(text, self._run_options + ['-f', + return self.list_completion(text, self._run_options + ['-f', '--tag=','--no_default'], line) - complete_delphes = complete_pgs - complete_rivet = complete_pgs + complete_delphes = complete_pgs + complete_rivet = complete_pgs #=============================================================================== # MadEventCmd #=============================================================================== class MadEventCmd(CompleteForCmd, CmdExtended, HelpToCmd, common_run.CommonRunCmd): - """The command line processor of Mad Graph""" - + """The command line processor of Mad Graph""" + LO = True # Truth values @@ -2063,7 +2063,7 @@ class MadEventCmd(CompleteForCmd, CmdExtended, HelpToCmd, common_run.CommonRunCm cluster_mode = 0 queue = 'madgraph' nb_core = None - + next_possibility = { 'start': ['generate_events [OPTIONS]', 'multi_run [OPTIONS]', 'calculate_decay_widths [OPTIONS]', @@ -2080,9 +2080,9 @@ class MadEventCmd(CompleteForCmd, CmdExtended, HelpToCmd, common_run.CommonRunCm 'pgs': ['generate_events [OPTIONS]', 'multi_run [OPTIONS]'], 'delphes' : ['generate_events [OPTIONS]', 'multi_run [OPTIONS]'] } - + asking_for_run = AskRun - + ############################################################################ def __init__(self, me_dir = None, options={}, *completekey, **stdin): """ add information to the cmd """ @@ -2095,16 +2095,16 @@ def __init__(self, me_dir = None, options={}, *completekey, **stdin): if self.web: os.system('touch %s' % pjoin(self.me_dir,'Online')) - self.load_results_db() + self.load_results_db() self.results.def_web_mode(self.web) self.Gdirs = None - + self.prompt = "%s>"%os.path.basename(pjoin(self.me_dir)) self.configured = 0 # time for reading the card self._options = {} # for compatibility with extended_cmd - - + + def pass_in_web_mode(self): """configure web data""" self.web = True @@ -2113,22 +2113,22 @@ def pass_in_web_mode(self): if os.environ['MADGRAPH_BASE']: self.options['mg5_path'] = pjoin(os.environ['MADGRAPH_BASE'],'MG5') - ############################################################################ + ############################################################################ def check_output_type(self, path): """ Check that the output path is a valid madevent directory """ - + bin_path = os.path.join(path,'bin') if os.path.isfile(os.path.join(bin_path,'generate_events')): return True - else: + else: return False ############################################################################ def set_configuration(self, amcatnlo=False, final=True, **opt): - """assign all configuration variable from file + """assign all configuration variable from file loop over the different config file if config_file not define """ - - super(MadEventCmd,self).set_configuration(amcatnlo=amcatnlo, + + super(MadEventCmd,self).set_configuration(amcatnlo=amcatnlo, final=final, **opt) if not final: @@ -2171,24 +2171,24 @@ def set_configuration(self, amcatnlo=False, final=True, **opt): if not os.path.exists(pjoin(path, 'sys_calc')): logger.info("No valid SysCalc path found") continue - # No else since the next line reinitialize the option to the + # No else since the next line reinitialize the option to the #previous value anyway self.options[key] = os.path.realpath(path) continue else: self.options[key] = None - - + + return self.options ############################################################################ - def do_banner_run(self, line): + def do_banner_run(self, line): """Make a run from the banner file""" - + args = self.split_arg(line) #check the validity of the arguments - self.check_banner_run(args) - + self.check_banner_run(args) + # Remove previous cards for name in ['delphes_trigger.dat', 'delphes_card.dat', 'pgs_card.dat', 'pythia_card.dat', 'madspin_card.dat', @@ -2197,20 +2197,20 @@ def do_banner_run(self, line): os.remove(pjoin(self.me_dir, 'Cards', name)) except Exception: pass - + banner_mod.split_banner(args[0], self.me_dir, proc_card=False) - + # Check if we want to modify the run if not self.force: ans = self.ask('Do you want to modify the Cards?', 'n', ['y','n']) if ans == 'n': self.force = True - + # Call Generate events self.exec_cmd('generate_events %s %s' % (self.run_name, self.force and '-f' or '')) - - - + + + ############################################################################ def do_display(self, line, output=sys.stdout): """Display current internal status""" @@ -2223,7 +2223,7 @@ def do_display(self, line, output=sys.stdout): #return valid run_name data = misc.glob(pjoin('*','*_banner.txt'), pjoin(self.me_dir, 'Events')) data = [n.rsplit('/',2)[1:] for n in data] - + if data: out = {} for name, tag in data: @@ -2235,11 +2235,11 @@ def do_display(self, line, output=sys.stdout): print('the runs available are:') for run_name, tags in out.items(): print(' run: %s' % run_name) - print(' tags: ', end=' ') + print(' tags: ', end=' ') print(', '.join(tags)) else: print('No run detected.') - + elif args[0] == 'options': outstr = " Run Options \n" outstr += " ----------- \n" @@ -2260,8 +2260,8 @@ def do_display(self, line, output=sys.stdout): if value == default: outstr += " %25s \t:\t%s\n" % (key,value) else: - outstr += " %25s \t:\t%s (user set)\n" % (key,value) - outstr += "\n" + outstr += " %25s \t:\t%s (user set)\n" % (key,value) + outstr += "\n" outstr += " Configuration Options \n" outstr += " --------------------- \n" for key, default in self.options_configuration.items(): @@ -2275,15 +2275,15 @@ def do_display(self, line, output=sys.stdout): self.do_print_results(' '.join(args[1:])) else: super(MadEventCmd, self).do_display(line, output) - + def do_save(self, line, check=True, to_keep={}): - """Not in help: Save information to file""" + """Not in help: Save information to file""" args = self.split_arg(line) # Check argument validity if check: self.check_save(args) - + if args[0] == 'options': # First look at options which should be put in MG5DIR/input to_define = {} @@ -2295,7 +2295,7 @@ def do_save(self, line, check=True, to_keep={}): for key, default in self.options_madevent.items(): if self.options[key] != self.options_madevent[key]: to_define[key] = self.options[key] - + if '--all' in args: for key, default in self.options_madgraph.items(): if self.options[key] != self.options_madgraph[key]: @@ -2312,12 +2312,12 @@ def do_save(self, line, check=True, to_keep={}): filepath = pjoin(self.me_dir, 'Cards', 'me5_configuration.txt') basefile = pjoin(self.me_dir, 'Cards', 'me5_configuration.txt') basedir = self.me_dir - + if to_keep: to_define = to_keep self.write_configuration(filepath, basefile, basedir, to_define) - - + + def do_edit_cards(self, line): @@ -2326,80 +2326,80 @@ def do_edit_cards(self, line): # Check argument's validity mode = self.check_generate_events(args) self.ask_run_configuration(mode) - + return ############################################################################ - + ############################################################################ def do_restart_gridpack(self, line): """ syntax restart_gridpack --precision=1.0 --restart_zero collect the result of the current run and relaunch each channel - not completed or optionally a completed one with a precision worse than + not completed or optionally a completed one with a precision worse than a threshold (and/or the zero result channel)""" - - + + args = self.split_arg(line) # Check argument's validity self.check_survey(args) - + # initialize / remove lhapdf mode #self.run_card = banner_mod.RunCard(pjoin(self.me_dir, 'Cards', 'run_card.dat')) #self.configure_directory() - + gensym = gen_ximprove.gensym(self) - + min_precision = 1.0 resubmit_zero=False if '--precision=' in line: s = line.index('--precision=') + len('--precision=') arg=line[s:].split(1)[0] min_precision = float(arg) - + if '--restart_zero' in line: resubmit_zero = True - - + + gensym.resubmit(min_precision, resubmit_zero) self.monitor(run_type='All jobs submitted for gridpack', html=True) #will be done during the refine (more precisely in gen_ximprove) cross, error = sum_html.make_all_html_results(self) self.results.add_detail('cross', cross) - self.results.add_detail('error', error) + self.results.add_detail('error', error) self.exec_cmd("print_results %s" % self.run_name, - errorhandling=False, printcmd=False, precmd=False, postcmd=False) - + errorhandling=False, printcmd=False, precmd=False, postcmd=False) + self.results.add_detail('run_statistics', dict(gensym.run_statistics)) - + #self.exec_cmd('combine_events', postcmd=False) #self.exec_cmd('store_events', postcmd=False) self.exec_cmd('decay_events -from_cards', postcmd=False) self.exec_cmd('create_gridpack', postcmd=False) - - - ############################################################################ + + + ############################################################################ ############################################################################ def do_generate_events(self, line): """Main Commands: launch the full chain """ - + self.banner = None self.Gdirs = None - + args = self.split_arg(line) # Check argument's validity mode = self.check_generate_events(args) switch_mode = self.ask_run_configuration(mode, args) if not args: - # No run name assigned -> assigned one automaticaly + # No run name assigned -> assigned one automaticaly self.set_run_name(self.find_available_run_name(self.me_dir), None, 'parton') else: self.set_run_name(args[0], None, 'parton', True) args.pop(0) - + self.run_generate_events(switch_mode, args) self.postprocessing() @@ -2420,8 +2420,8 @@ def postprocessing(self): def rivet_postprocessing(self, rivet_config, postprocess_RIVET, postprocess_CONTUR): - # Check number of Rivet jobs to run - run_dirs = [pjoin(self.me_dir, 'Events',run_name) + # Check number of Rivet jobs to run + run_dirs = [pjoin(self.me_dir, 'Events',run_name) for run_name in self.postprocessing_dirs] nb_rivet = len(run_dirs) @@ -2550,10 +2550,10 @@ def wait_monitoring(Idle, Running, Done): wrapper = open(pjoin(self.me_dir, "Analysis", "contur", "run_contur.sh"), "w") wrapper.write(set_env) - + wrapper.write('{0}\n'.format(contur_cmd)) wrapper.close() - + misc.call(["run_contur.sh"], cwd=(pjoin(self.me_dir, "Analysis", "contur"))) logger.info("Contur outputs are stored in {0}".format(pjoin(self.me_dir, "Analysis", "contur","conturPlot"))) @@ -2572,7 +2572,7 @@ def run_generate_events(self, switch_mode, args): self.do_set('run_mode 2') self.do_set('nb_core 1') - if self.run_card['gridpack'] in self.true: + if self.run_card['gridpack'] in self.true: # Running gridpack warmup gridpack_opts=[('accuracy', 0.01), ('points', 2000), @@ -2593,7 +2593,7 @@ def run_generate_events(self, switch_mode, args): # Regular run mode logger.info('Generating %s events with run name %s' % (self.run_card['nevents'], self.run_name)) - + self.exec_cmd('survey %s %s' % (self.run_name,' '.join(args)), postcmd=False) nb_event = self.run_card['nevents'] @@ -2601,7 +2601,7 @@ def run_generate_events(self, switch_mode, args): self.exec_cmd('refine %s' % nb_event, postcmd=False) if not float(self.results.current['cross']): # Zero cross-section. Try to guess why - text = '''Survey return zero cross section. + text = '''Survey return zero cross section. Typical reasons are the following: 1) A massive s-channel particle has a width set to zero. 2) The pdf are zero for at least one of the initial state particles @@ -2613,17 +2613,17 @@ def run_generate_events(self, switch_mode, args): raise ZeroResult('See https://cp3.irmp.ucl.ac.be/projects/madgraph/wiki/FAQ-General-14') else: bypass_run = True - + #we can bypass the following if scan and first result is zero if not bypass_run: self.exec_cmd('refine %s --treshold=%s' % (nb_event,self.run_card['second_refine_treshold']) , postcmd=False) - + self.exec_cmd('combine_events', postcmd=False,printcmd=False) self.print_results_in_shell(self.results.current) if self.run_card['use_syst']: - if self.run_card['systematics_program'] == 'auto': + if self.run_card['systematics_program'] == 'auto': scdir = self.options['syscalc_path'] if not scdir or not os.path.exists(scdir): to_use = 'systematics' @@ -2634,26 +2634,26 @@ def run_generate_events(self, switch_mode, args): else: logger.critical('Unvalid options for systematics_program: bypass computation of systematics variations.') to_use = 'none' - + if to_use == 'systematics': if self.run_card['systematics_arguments'] != ['']: self.exec_cmd('systematics %s %s ' % (self.run_name, - ' '.join(self.run_card['systematics_arguments'])), + ' '.join(self.run_card['systematics_arguments'])), postcmd=False, printcmd=False) else: self.exec_cmd('systematics %s --from_card' % self.run_name, - postcmd=False,printcmd=False) + postcmd=False,printcmd=False) elif to_use == 'syscalc': self.run_syscalc('parton') - - - self.create_plot('parton') - self.exec_cmd('store_events', postcmd=False) + + + self.create_plot('parton') + self.exec_cmd('store_events', postcmd=False) if self.run_card['boost_event'].strip() and self.run_card['boost_event'] != 'False': self.boost_events() - - - self.exec_cmd('reweight -from_cards', postcmd=False) + + + self.exec_cmd('reweight -from_cards', postcmd=False) self.exec_cmd('decay_events -from_cards', postcmd=False) if self.run_card['time_of_flight']>=0: self.exec_cmd("add_time_of_flight --threshold=%s" % self.run_card['time_of_flight'] ,postcmd=False) @@ -2664,43 +2664,43 @@ def run_generate_events(self, switch_mode, args): self.create_root_file(input , output) self.exec_cmd('madanalysis5_parton --no_default', postcmd=False, printcmd=False) - # shower launches pgs/delphes if needed + # shower launches pgs/delphes if needed self.exec_cmd('shower --no_default', postcmd=False, printcmd=False) self.exec_cmd('madanalysis5_hadron --no_default', postcmd=False, printcmd=False) self.exec_cmd('rivet --no_default', postcmd=False, printcmd=False) self.store_result() - - if self.allow_notification_center: - misc.system_notify('Run %s finished' % os.path.basename(self.me_dir), - '%s: %s +- %s ' % (self.results.current['run_name'], + + if self.allow_notification_center: + misc.system_notify('Run %s finished' % os.path.basename(self.me_dir), + '%s: %s +- %s ' % (self.results.current['run_name'], self.results.current['cross'], self.results.current['error'])) - + def boost_events(self): - + if not self.run_card['boost_event']: return - + if self.run_card['boost_event'].startswith('lambda'): if not isinstance(self, cmd.CmdShell): raise Exception("boost not allowed online") filter = eval(self.run_card['boost_event']) else: raise Exception - + path = [pjoin(self.me_dir, 'Events', self.run_name, 'unweighted_events.lhe.gz'), pjoin(self.me_dir, 'Events', self.run_name, 'unweighted_events.lhe'), pjoin(self.me_dir, 'Events', self.run_name, 'events.lhe.gz'), pjoin(self.me_dir, 'Events', self.run_name, 'events.lhe')] - + for p in path: if os.path.exists(p): event_path = p break else: raise Exception("fail to find event file for the boost") - - + + lhe = lhe_parser.EventFile(event_path) with misc.TMP_directory() as tmp_dir: output = lhe_parser.EventFile(pjoin(tmp_dir, os.path.basename(event_path)), 'w') @@ -2711,28 +2711,28 @@ def boost_events(self): event.boost(filter) #write this modify event output.write(str(event)) - output.write('\n') + output.write('\n') lhe.close() - files.mv(pjoin(tmp_dir, os.path.basename(event_path)), event_path) - - - - - + files.mv(pjoin(tmp_dir, os.path.basename(event_path)), event_path) + + + + + def do_initMadLoop(self,line): - """Compile and run MadLoop for a certain number of PS point so as to + """Compile and run MadLoop for a certain number of PS point so as to initialize MadLoop (setup the zero helicity and loop filter.)""" - + args = line.split() # Check argument's validity options = self.check_initMadLoop(args) - + if not options['force']: self.ask_edit_cards(['MadLoopParams.dat'], mode='fixed', plot=False) self.exec_cmd('treatcards loop --no_MadLoopInit') if options['refresh']: - for filter in misc.glob('*Filter*', + for filter in misc.glob('*Filter*', pjoin(self.me_dir,'SubProcesses','MadLoop5_resources')): logger.debug("Resetting filter '%s'."%os.path.basename(filter)) os.remove(filter) @@ -2753,14 +2753,14 @@ def do_initMadLoop(self,line): def do_launch(self, line, *args, **opt): """Main Commands: exec generate_events for 2>N and calculate_width for 1>N""" - + if self.ninitial == 1: logger.info("Note that since 2.3. The launch for 1>N pass in event generation\n"+ " To have the previous behavior use the calculate_decay_widths function") # self.do_calculate_decay_widths(line, *args, **opt) #else: self.do_generate_events(line, *args, **opt) - + def print_results_in_shell(self, data): """Have a nice results prints in the shell, data should be of type: gen_crossxhtml.OneTagResults""" @@ -2770,7 +2770,7 @@ def print_results_in_shell(self, data): if data['run_statistics']: globalstat = sum_html.RunStatistics() - + logger.info(" " ) logger.debug(" === Run statistics summary ===") for key, value in data['run_statistics'].items(): @@ -2786,13 +2786,13 @@ def print_results_in_shell(self, data): logger.warning(globalstat.get_warning_text()) logger.info(" ") - + logger.info(" === Results Summary for run: %s tag: %s ===\n" % (data['run_name'],data['tag'])) - + total_time = int(sum(_['cumulative_timing'] for _ in data['run_statistics'].values())) if total_time > 0: logger.info(" Cumulative sequential time for this run: %s"%misc.format_time(total_time)) - + if self.ninitial == 1: logger.info(" Width : %.4g +- %.4g GeV" % (data['cross'], data['error'])) else: @@ -2810,18 +2810,18 @@ def print_results_in_shell(self, data): if len(split)!=3: continue scale, cross, error = split - cross_sections[float(scale)] = (float(cross), float(error)) + cross_sections[float(scale)] = (float(cross), float(error)) if len(cross_sections)>0: logger.info(' Pythia8 merged cross-sections are:') for scale in sorted(cross_sections.keys()): logger.info(' > Merging scale = %-6.4g : %-11.5g +/- %-7.2g [pb]'%\ (scale,cross_sections[scale][0],cross_sections[scale][1])) - + else: if self.ninitial == 1: logger.info(" Matched width : %.4g +- %.4g GeV" % (data['cross_pythia'], data['error_pythia'])) else: - logger.info(" Matched cross-section : %.4g +- %.4g pb" % (data['cross_pythia'], data['error_pythia'])) + logger.info(" Matched cross-section : %.4g +- %.4g pb" % (data['cross_pythia'], data['error_pythia'])) logger.info(" Nb of events after matching/merging : %d" % int(data['nb_event_pythia'])) if self.run_card['use_syst'] in self.true and \ (int(self.run_card['ickkw'])==1 or self.run_card['ktdurham']>0.0 @@ -2838,9 +2838,9 @@ def print_results_in_file(self, data, path, mode='w', format='full'): data should be of type: gen_crossxhtml.OneTagResults""" if not data: return - + fsock = open(path, mode) - + if data['run_statistics']: logger.debug(" === Run statistics summary ===") for key, value in data['run_statistics'].items(): @@ -2851,7 +2851,7 @@ def print_results_in_file(self, data, path, mode='w', format='full'): if format == "full": fsock.write(" === Results Summary for run: %s tag: %s process: %s ===\n" % \ (data['run_name'],data['tag'], os.path.basename(self.me_dir))) - + if self.ninitial == 1: fsock.write(" Width : %.4g +- %.4g GeV\n" % (data['cross'], data['error'])) else: @@ -2861,20 +2861,20 @@ def print_results_in_file(self, data, path, mode='w', format='full'): if self.ninitial == 1: fsock.write(" Matched Width : %.4g +- %.4g GeV\n" % (data['cross_pythia'], data['error_pythia'])) else: - fsock.write(" Matched Cross-section : %.4g +- %.4g pb\n" % (data['cross_pythia'], data['error_pythia'])) + fsock.write(" Matched Cross-section : %.4g +- %.4g pb\n" % (data['cross_pythia'], data['error_pythia'])) fsock.write(" Nb of events after Matching : %s\n" % data['nb_event_pythia']) fsock.write(" \n" ) elif format == "short": if mode == "w": fsock.write("# run_name tag cross error Nb_event cross_after_matching nb_event_after matching\n") - + if data['cross_pythia'] and data['nb_event_pythia']: text = "%(run_name)s %(tag)s %(cross)s %(error)s %(nb_event)s %(cross_pythia)s %(nb_event_pythia)s\n" else: text = "%(run_name)s %(tag)s %(cross)s %(error)s %(nb_event)s\n" fsock.write(text % data) - - ############################################################################ + + ############################################################################ def do_calculate_decay_widths(self, line): """Main Commands: launch decay width calculation and automatic inclusion of calculated widths and BRs in the param_card.""" @@ -2887,21 +2887,21 @@ def do_calculate_decay_widths(self, line): self.Gdirs = None if not args: - # No run name assigned -> assigned one automaticaly + # No run name assigned -> assigned one automaticaly self.set_run_name(self.find_available_run_name(self.me_dir)) else: self.set_run_name(args[0], reload_card=True) args.pop(0) self.configure_directory() - + # Running gridpack warmup opts=[('accuracy', accuracy), # default 0.01 ('points', 1000), ('iterations',9)] logger.info('Calculating decay widths with run name %s' % self.run_name) - + self.exec_cmd('survey %s %s' % \ (self.run_name, " ".join(['--' + opt + '=' + str(val) for (opt,val) \ @@ -2910,26 +2910,26 @@ def do_calculate_decay_widths(self, line): self.refine_mode = "old" # specify how to combine event self.exec_cmd('combine_events', postcmd=False) self.exec_cmd('store_events', postcmd=False) - + self.collect_decay_widths() self.print_results_in_shell(self.results.current) - self.update_status('calculate_decay_widths done', - level='parton', makehtml=False) + self.update_status('calculate_decay_widths done', + level='parton', makehtml=False) + - ############################################################################ def collect_decay_widths(self): - """ Collect the decay widths and calculate BRs for all particles, and put - in param_card form. + """ Collect the decay widths and calculate BRs for all particles, and put + in param_card form. """ - + particle_dict = {} # store the results run_name = self.run_name # Looping over the Subprocesses for P_path in SubProcesses.get_subP(self.me_dir): ids = SubProcesses.get_subP_ids(P_path) - # due to grouping we need to compute the ratio factor for the + # due to grouping we need to compute the ratio factor for the # ungroup resutls (that we need here). Note that initial particles # grouping are not at the same stage as final particle grouping nb_output = len(ids) / (len(set([p[0] for p in ids]))) @@ -2940,30 +2940,30 @@ def collect_decay_widths(self): particle_dict[particles[0]].append([particles[1:], result/nb_output]) except KeyError: particle_dict[particles[0]] = [[particles[1:], result/nb_output]] - + self.update_width_in_param_card(particle_dict, initial = pjoin(self.me_dir, 'Cards', 'param_card.dat'), output=pjoin(self.me_dir, 'Events', run_name, "param_card.dat")) - + @staticmethod def update_width_in_param_card(decay_info, initial=None, output=None): # Open the param_card.dat and insert the calculated decays and BRs - + if not output: output = initial - + param_card_file = open(initial) param_card = param_card_file.read().split('\n') param_card_file.close() decay_lines = [] line_number = 0 - # Read and remove all decays from the param_card + # Read and remove all decays from the param_card while line_number < len(param_card): line = param_card[line_number] if line.lower().startswith('decay'): - # Read decay if particle in decay_info - # DECAY 6 1.455100e+00 + # Read decay if particle in decay_info + # DECAY 6 1.455100e+00 line = param_card.pop(line_number) line = line.split() particle = 0 @@ -2996,7 +2996,7 @@ def update_width_in_param_card(decay_info, initial=None, output=None): break line=param_card[line_number] if particle and particle not in decay_info: - # No decays given, only total width + # No decays given, only total width decay_info[particle] = [[[], width]] else: # Not decay line_number += 1 @@ -3004,7 +3004,7 @@ def update_width_in_param_card(decay_info, initial=None, output=None): while not param_card[-1] or param_card[-1].startswith('#'): param_card.pop(-1) - # Append calculated and read decays to the param_card + # Append calculated and read decays to the param_card param_card.append("#\n#*************************") param_card.append("# Decay widths *") param_card.append("#*************************") @@ -3018,7 +3018,7 @@ def update_width_in_param_card(decay_info, initial=None, output=None): param_card.append("# BR NDA ID1 ID2 ...") brs = [[(val[1]/width).real, val[0]] for val in decay_info[key] if val[1]] for val in sorted(brs, reverse=True): - param_card.append(" %e %i %s # %s" % + param_card.append(" %e %i %s # %s" % (val[0].real, len(val[1]), " ".join([str(v) for v in val[1]]), val[0] * width @@ -3031,7 +3031,7 @@ def update_width_in_param_card(decay_info, initial=None, output=None): ############################################################################ def do_multi_run(self, line): - + args = self.split_arg(line) # Check argument's validity mode = self.check_multi_run(args) @@ -3047,7 +3047,7 @@ def do_multi_run(self, line): self.check_param_card(path, run=False) #store it locally to avoid relaunch param_card_iterator, self.param_card_iterator = self.param_card_iterator, [] - + crossoversig = 0 inv_sq_err = 0 nb_event = 0 @@ -3055,8 +3055,8 @@ def do_multi_run(self, line): self.nb_refine = 0 self.exec_cmd('generate_events %s_%s -f' % (main_name, i), postcmd=False) # Update collected value - nb_event += int(self.results[self.run_name][-1]['nb_event']) - self.results.add_detail('nb_event', nb_event , run=main_name) + nb_event += int(self.results[self.run_name][-1]['nb_event']) + self.results.add_detail('nb_event', nb_event , run=main_name) cross = self.results[self.run_name][-1]['cross'] error = self.results[self.run_name][-1]['error'] + 1e-99 crossoversig+=cross/error**2 @@ -3070,7 +3070,7 @@ def do_multi_run(self, line): os.mkdir(pjoin(self.me_dir,'Events', self.run_name)) except Exception: pass - os.system('%(bin)s/merge.pl %(event)s/%(name)s_*/unweighted_events.lhe.gz %(event)s/%(name)s/unweighted_events.lhe.gz %(event)s/%(name)s_banner.txt' + os.system('%(bin)s/merge.pl %(event)s/%(name)s_*/unweighted_events.lhe.gz %(event)s/%(name)s/unweighted_events.lhe.gz %(event)s/%(name)s_banner.txt' % {'bin': self.dirbin, 'event': pjoin(self.me_dir,'Events'), 'name': self.run_name}) @@ -3084,19 +3084,19 @@ def do_multi_run(self, line): self.create_root_file('%s/unweighted_events.lhe' % self.run_name, '%s/unweighted_events.root' % self.run_name) - - path = pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe") + + path = pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe") self.create_plot('parton', path, pjoin(self.me_dir, 'HTML',self.run_name, 'plots_parton.html') ) - - if not os.path.exists('%s.gz' % path): + + if not os.path.exists('%s.gz' % path): misc.gzip(path) self.update_status('', level='parton') - self.print_results_in_shell(self.results.current) - + self.print_results_in_shell(self.results.current) + cpath = pjoin(self.me_dir,'Cards','param_card.dat') if param_card_iterator: @@ -3112,21 +3112,21 @@ def do_multi_run(self, line): path = pjoin(self.me_dir, 'Events','scan_%s.txt' % scan_name) logger.info("write all cross-section results in %s" % path, '$MG:BOLD') param_card_iterator.write_summary(path) - - ############################################################################ + + ############################################################################ def do_treatcards(self, line, mode=None, opt=None): """Advanced commands: create .inc files from param_card.dat/run_card.dat""" if not mode and not opt: args = self.split_arg(line) mode, opt = self.check_treatcards(args) - + # To decide whether to refresh MadLoop's helicity filters, it is necessary # to check if the model parameters where modified or not, before doing - # anything else. + # anything else. need_MadLoopFilterUpdate = False - # Just to record what triggered the reinitialization of MadLoop for a + # Just to record what triggered the reinitialization of MadLoop for a # nice debug message. type_of_change = '' if not opt['forbid_MadLoopInit'] and self.proc_characteristics['loop_induced'] \ @@ -3137,10 +3137,10 @@ def do_treatcards(self, line, mode=None, opt=None): (os.path.getmtime(paramDat)-os.path.getmtime(paramInc)) > 0.0: need_MadLoopFilterUpdate = True type_of_change = 'model' - + ML_in = pjoin(self.me_dir, 'Cards', 'MadLoopParams.dat') ML_out = pjoin(self.me_dir,"SubProcesses", - "MadLoop5_resources", "MadLoopParams.dat") + "MadLoop5_resources", "MadLoopParams.dat") if (not os.path.isfile(ML_in)) or (not os.path.isfile(ML_out)) or \ (os.path.getmtime(ML_in)-os.path.getmtime(ML_out)) > 0.0: need_MadLoopFilterUpdate = True @@ -3148,7 +3148,7 @@ def do_treatcards(self, line, mode=None, opt=None): #check if no 'Auto' are present in the file self.check_param_card(pjoin(self.me_dir, 'Cards','param_card.dat')) - + if mode in ['param', 'all']: model = self.find_model_name() tmp_model = os.path.basename(model) @@ -3160,9 +3160,9 @@ def do_treatcards(self, line, mode=None, opt=None): check_param_card.check_valid_param_card(mg5_param) opt['param_card'] = pjoin(self.me_dir, 'Source', 'MODEL', 'MG5_param.dat') else: - check_param_card.check_valid_param_card(opt['param_card']) - - logger.debug('write compile file for card: %s' % opt['param_card']) + check_param_card.check_valid_param_card(opt['param_card']) + + logger.debug('write compile file for card: %s' % opt['param_card']) param_card = check_param_card.ParamCard(opt['param_card']) outfile = pjoin(opt['output_dir'], 'param_card.inc') ident_card = pjoin(self.me_dir,'Cards','ident_card.dat') @@ -3185,10 +3185,10 @@ def do_treatcards(self, line, mode=None, opt=None): devnull.close() default = pjoin(self.me_dir,'bin','internal','ufomodel','param_card.dat') - need_mp = self.proc_characteristics['loop_induced'] + need_mp = self.proc_characteristics['loop_induced'] param_card.write_inc_file(outfile, ident_card, default, need_mp=need_mp) - - + + if mode in ['run', 'all']: if not hasattr(self, 'run_card'): run_card = banner_mod.RunCard(opt['run_card'], path=pjoin(self.me_dir, 'Cards', 'run_card.dat')) @@ -3202,7 +3202,7 @@ def do_treatcards(self, line, mode=None, opt=None): run_card['lpp2'] = 0 run_card['ebeam1'] = 0 run_card['ebeam2'] = 0 - + # Ensure that the bias parameters has all the required input from the # run_card if run_card['bias_module'].lower() not in ['dummy','none']: @@ -3219,7 +3219,7 @@ def do_treatcards(self, line, mode=None, opt=None): mandatory_file,run_card['bias_module'])) misc.copytree(run_card['bias_module'], pjoin(self.me_dir,'Source','BIAS', os.path.basename(run_card['bias_module']))) - + #check expected parameters for the module. default_bias_parameters = {} start, last = False,False @@ -3244,50 +3244,50 @@ def do_treatcards(self, line, mode=None, opt=None): for pair in line.split(','): if not pair.strip(): continue - x,y =pair.split(':') + x,y =pair.split(':') x=x.strip() if x.startswith(('"',"'")) and x.endswith(x[0]): - x = x[1:-1] + x = x[1:-1] default_bias_parameters[x] = y elif ':' in line: x,y = line.split(':') x = x.strip() if x.startswith(('"',"'")) and x.endswith(x[0]): - x = x[1:-1] + x = x[1:-1] default_bias_parameters[x] = y for key,value in run_card['bias_parameters'].items(): if key not in default_bias_parameters: logger.warning('%s not supported by the bias module. We discard this entry.', key) else: default_bias_parameters[key] = value - run_card['bias_parameters'] = default_bias_parameters - - - # Finally write the include file + run_card['bias_parameters'] = default_bias_parameters + + + # Finally write the include file run_card.write_include_file(opt['output_dir']) - + if self.proc_characteristics['loop_induced'] and mode in ['loop', 'all']: - self.MadLoopparam = banner_mod.MadLoopParam(pjoin(self.me_dir, + self.MadLoopparam = banner_mod.MadLoopParam(pjoin(self.me_dir, 'Cards', 'MadLoopParams.dat')) # The writing out of MadLoop filter is potentially dangerous # when running in multi-core with a central disk. So it is turned - # off here. If these filters were not initialized then they will + # off here. If these filters were not initialized then they will # have to be re-computed at the beginning of each run. if 'WriteOutFilters' in self.MadLoopparam.user_set and \ self.MadLoopparam.get('WriteOutFilters'): logger.info( -"""You chose to have MadLoop writing out filters. +"""You chose to have MadLoop writing out filters. Beware that this can be dangerous for local multicore runs.""") self.MadLoopparam.set('WriteOutFilters',False, changeifuserset=False) - + # The conservative settings below for 'CTModeInit' and 'ZeroThres' # help adress issues for processes like g g > h z, and g g > h g - # where there are some helicity configuration heavily suppressed - # (by several orders of magnitude) so that the helicity filter + # where there are some helicity configuration heavily suppressed + # (by several orders of magnitude) so that the helicity filter # needs high numerical accuracy to correctly handle this spread in # magnitude. Also, because one cannot use the Born as a reference - # scale, it is better to force quadruple precision *for the + # scale, it is better to force quadruple precision *for the # initialization points only*. This avoids numerical accuracy issues # when setting up the helicity filters and does not significantly # slow down the run. @@ -3298,21 +3298,21 @@ def do_treatcards(self, line, mode=None, opt=None): # It is a bit superficial to use the level 2 which tries to numerically # map matching helicities (because of CP symmetry typically) together. -# It is useless in the context of MC over helicities and it can +# It is useless in the context of MC over helicities and it can # potentially make the helicity double checking fail. self.MadLoopparam.set('HelicityFilterLevel',1, changeifuserset=False) # To be on the safe side however, we ask for 4 consecutive matching # helicity filters. self.MadLoopparam.set('CheckCycle',4, changeifuserset=False) - + # For now it is tricky to have each channel performing the helicity # double check. What we will end up doing is probably some kind # of new initialization round at the beginning of each launch - # command, to reset the filters. + # command, to reset the filters. self.MadLoopparam.set('DoubleCheckHelicityFilter',False, changeifuserset=False) - + # Thanks to TIR recycling, TIR is typically much faster for Loop-induced # processes when not doing MC over helicities, so that we place OPP last. if not hasattr(self, 'run_card'): @@ -3349,7 +3349,7 @@ def do_treatcards(self, line, mode=None, opt=None): logger.warning( """You chose to also use a lorentz rotation for stability tests (see parameter NRotations_[DP|QP]). Beware that, for optimization purposes, MadEvent uses manual TIR cache clearing which is not compatible - with the lorentz rotation stability test. The number of these rotations to be used will be reset to + with the lorentz rotation stability test. The number of these rotations to be used will be reset to zero by MadLoop. You can avoid this by changing the parameter 'FORCE_ML_HELICITY_SUM' int he matrix.f files to be .TRUE. so that the sum over helicity configurations is performed within MadLoop (in which case the helicity of final state particles cannot be speicfied in the LHE file.""") @@ -3363,15 +3363,15 @@ def do_treatcards(self, line, mode=None, opt=None): # self.MadLoopparam.set('NRotations_DP',0,changeifuserset=False) # Revert to the above to be slightly less robust but twice faster. self.MadLoopparam.set('NRotations_DP',1,changeifuserset=False) - self.MadLoopparam.set('NRotations_QP',0,changeifuserset=False) - + self.MadLoopparam.set('NRotations_QP',0,changeifuserset=False) + # Finally, the stability tests are slightly less reliable for process - # with less or equal than 4 final state particles because the + # with less or equal than 4 final state particles because the # accessible kinematic is very limited (i.e. lorentz rotations don't # shuffle invariants numerics much). In these cases, we therefore # increase the required accuracy to 10^-7. # This is important for getting g g > z z [QCD] working with a - # ptheavy cut as low as 1 GeV. + # ptheavy cut as low as 1 GeV. if self.proc_characteristics['nexternal']<=4: if ('MLStabThres' in self.MadLoopparam.user_set and \ self.MadLoopparam.get('MLStabThres')>1.0e-7): @@ -3381,12 +3381,12 @@ def do_treatcards(self, line, mode=None, opt=None): than four external legs, so this is not recommended (especially not for g g > z z).""") self.MadLoopparam.set('MLStabThres',1.0e-7,changeifuserset=False) else: - self.MadLoopparam.set('MLStabThres',1.0e-4,changeifuserset=False) + self.MadLoopparam.set('MLStabThres',1.0e-4,changeifuserset=False) #write the output file self.MadLoopparam.write(pjoin(self.me_dir,"SubProcesses","MadLoop5_resources", "MadLoopParams.dat")) - + if self.proc_characteristics['loop_induced'] and mode in ['loop', 'all']: # Now Update MadLoop filters if necessary (if modifications were made to # the model parameters). @@ -3403,12 +3403,12 @@ def do_treatcards(self, line, mode=None, opt=None): elif not opt['forbid_MadLoopInit'] and \ MadLoopInitializer.need_MadLoopInit(self.me_dir): self.exec_cmd('initMadLoop -f') - - ############################################################################ + + ############################################################################ def do_survey(self, line): """Advanced commands: launch survey for the current process """ - - + + args = self.split_arg(line) # Check argument's validity self.check_survey(args) @@ -3416,7 +3416,7 @@ def do_survey(self, line): if os.path.exists(pjoin(self.me_dir,'error')): os.remove(pjoin(self.me_dir,'error')) - + self.configure_directory() # Save original random number self.random_orig = self.random @@ -3435,9 +3435,9 @@ def do_survey(self, line): P_zero_result = [] # check the number of times where they are no phase-space # File for the loop (for loop induced) - if os.path.exists(pjoin(self.me_dir,'SubProcesses', + if os.path.exists(pjoin(self.me_dir,'SubProcesses', 'MadLoop5_resources')) and cluster.need_transfer(self.options): - tf=tarfile.open(pjoin(self.me_dir, 'SubProcesses', + tf=tarfile.open(pjoin(self.me_dir, 'SubProcesses', 'MadLoop5_resources.tar.gz'), 'w:gz', dereference=True) tf.add(pjoin(self.me_dir,'SubProcesses','MadLoop5_resources'), arcname='MadLoop5_resources') @@ -3467,7 +3467,7 @@ def do_survey(self, line): except Exception as error: logger.debug(error) pass - + jobs, P_zero_result = ajobcreator.launch() # Check if all or only some fails if P_zero_result: @@ -3481,60 +3481,60 @@ def do_survey(self, line): self.get_Gdir() for P in P_zero_result: self.Gdirs[0][pjoin(self.me_dir,'SubProcesses',P)] = [] - + self.monitor(run_type='All jobs submitted for survey', html=True) if not self.history or 'survey' in self.history[-1] or self.ninitial ==1 or \ self.run_card['gridpack']: #will be done during the refine (more precisely in gen_ximprove) cross, error = self.make_make_all_html_results() self.results.add_detail('cross', cross) - self.results.add_detail('error', error) + self.results.add_detail('error', error) self.exec_cmd("print_results %s" % self.run_name, - errorhandling=False, printcmd=False, precmd=False, postcmd=False) - + errorhandling=False, printcmd=False, precmd=False, postcmd=False) + self.results.add_detail('run_statistics', dict(ajobcreator.run_statistics)) self.update_status('End survey', 'parton', makehtml=False) ############################################################################ def pass_in_difficult_integration_mode(self, rate=1): """be more secure for the integration to not miss it due to strong cut""" - + # improve survey options if default if self.opts['points'] == self._survey_options['points'][1]: self.opts['points'] = (rate+2) * self._survey_options['points'][1] if self.opts['iterations'] == self._survey_options['iterations'][1]: self.opts['iterations'] = 1 + rate + self._survey_options['iterations'][1] if self.opts['accuracy'] == self._survey_options['accuracy'][1]: - self.opts['accuracy'] = self._survey_options['accuracy'][1]/(rate+2) - + self.opts['accuracy'] = self._survey_options['accuracy'][1]/(rate+2) + # Modify run_config.inc in order to improve the refine conf_path = pjoin(self.me_dir, 'Source','run_config.inc') files.cp(conf_path, conf_path + '.bk') # text = open(conf_path).read() - min_evt, max_evt = 2500 *(2+rate), 10000*(rate+1) - + min_evt, max_evt = 2500 *(2+rate), 10000*(rate+1) + text = re.sub('''\(min_events = \d+\)''', '(min_events = %i )' % min_evt, text) text = re.sub('''\(max_events = \d+\)''', '(max_events = %i )' % max_evt, text) fsock = open(conf_path, 'w') fsock.write(text) fsock.close() - + # Compile for name in ['../bin/internal/gen_ximprove', 'all']: self.compile(arg=[name], cwd=os.path.join(self.me_dir, 'Source')) - - - ############################################################################ + + + ############################################################################ def do_refine(self, line): """Advanced commands: launch survey for the current process """ - devnull = open(os.devnull, 'w') + devnull = open(os.devnull, 'w') self.nb_refine += 1 args = self.split_arg(line) treshold=None - - + + for a in args: if a.startswith('--treshold='): treshold = float(a.split('=',1)[1]) @@ -3548,8 +3548,8 @@ def do_refine(self, line): break # Check argument's validity self.check_refine(args) - - refine_opt = {'err_goal': args[0], 'split_channels': True} + + refine_opt = {'err_goal': args[0], 'split_channels': True} precision = args[0] if len(args) == 2: refine_opt['max_process']= args[1] @@ -3560,15 +3560,15 @@ def do_refine(self, line): # Update random number self.update_random() self.save_random() - + if self.cluster_mode: logger.info('Creating Jobs') self.update_status('Refine results to %s' % precision, level=None) - + self.total_jobs = 0 - subproc = [l.strip() for l in open(pjoin(self.me_dir,'SubProcesses', + subproc = [l.strip() for l in open(pjoin(self.me_dir,'SubProcesses', 'subproc.mg'))] - + # cleanning the previous job for nb_proc,subdir in enumerate(subproc): subdir = subdir.strip() @@ -3589,14 +3589,14 @@ def do_refine(self, line): level = 5 if value.has_warning(): level = 10 - logger.log(level, + logger.log(level, value.nice_output(str('/'.join([key[0],'G%s'%key[1]]))). replace(' statistics','')) logger.debug(globalstat.nice_output('combined', no_warning=True)) - + if survey_statistics: x_improve.run_statistics = survey_statistics - + x_improve.launch() # create the ajob for the refinment. if not self.history or 'refine' not in self.history[-1]: cross, error = x_improve.update_html() #update html results for survey @@ -3610,9 +3610,9 @@ def do_refine(self, line): subdir = subdir.strip() Pdir = pjoin(self.me_dir, 'SubProcesses',subdir) bindir = pjoin(os.path.relpath(self.dirbin, Pdir)) - + logger.info(' %s ' % subdir) - + if os.path.exists(pjoin(Pdir, 'ajob1')): cudacpp_backend = self.run_card['cudacpp_backend'] # the default value is defined in banner.py @@ -3629,7 +3629,7 @@ def do_refine(self, line): ###self.compile(['all'], cwd=Pdir) alljobs = misc.glob('ajob*', Pdir) - + #remove associated results.dat (ensure to not mix with all data) Gre = re.compile("\s*j=(G[\d\.\w]+)") for job in alljobs: @@ -3637,49 +3637,49 @@ def do_refine(self, line): for Gdir in Gdirs: if os.path.exists(pjoin(Pdir, Gdir, 'results.dat')): os.remove(pjoin(Pdir, Gdir,'results.dat')) - - nb_tot = len(alljobs) + + nb_tot = len(alljobs) self.total_jobs += nb_tot for i, job in enumerate(alljobs): job = os.path.basename(job) - self.launch_job('%s' % job, cwd=Pdir, remaining=(nb_tot-i-1), - run_type='Refine number %s on %s (%s/%s)' % + self.launch_job('%s' % job, cwd=Pdir, remaining=(nb_tot-i-1), + run_type='Refine number %s on %s (%s/%s)' % (self.nb_refine, subdir, nb_proc+1, len(subproc))) - self.monitor(run_type='All job submitted for refine number %s' % self.nb_refine, + self.monitor(run_type='All job submitted for refine number %s' % self.nb_refine, html=True) - + self.update_status("Combining runs", level='parton') try: os.remove(pjoin(Pdir, 'combine_runs.log')) except Exception: pass - + if isinstance(x_improve, gen_ximprove.gen_ximprove_v4): # the merge of the events.lhe is handle in the x_improve class - # for splitted runs. (and partly in store_events). + # for splitted runs. (and partly in store_events). combine_runs.CombineRuns(self.me_dir) self.refine_mode = "old" else: self.refine_mode = "new" - + cross, error = self.make_make_all_html_results() self.results.add_detail('cross', cross) self.results.add_detail('error', error) - self.results.add_detail('run_statistics', + self.results.add_detail('run_statistics', dict(self.results.get_detail('run_statistics'))) self.update_status('finish refine', 'parton', makehtml=False) devnull.close() - - ############################################################################ + + ############################################################################ def do_comine_iteration(self, line): """Not in help: Combine a given iteration combine_iteration Pdir Gdir S|R step - S is for survey + S is for survey R is for refine - step is the iteration number (not very critical)""" + step is the iteration number (not very critical)""" self.set_run_name("tmp") self.configure_directory(html_opening=False) @@ -3695,12 +3695,12 @@ def do_comine_iteration(self, line): gensym.combine_iteration(Pdir, Gdir, int(step)) elif mode == "R": refine = gen_ximprove.gen_ximprove_share(self) - refine.combine_iteration(Pdir, Gdir, int(step)) - - + refine.combine_iteration(Pdir, Gdir, int(step)) - - ############################################################################ + + + + ############################################################################ def do_combine_events(self, line): """Advanced commands: Launch combine events""" start=time.time() @@ -3710,11 +3710,11 @@ def do_combine_events(self, line): self.check_combine_events(args) self.update_status('Combining Events', level='parton') - + if self.run_card['gridpack'] and isinstance(self, GridPackCmd): return GridPackCmd.do_combine_events(self, line) - + # Define The Banner tag = self.run_card['run_tag'] # Update the banner with the pythia card @@ -3727,14 +3727,14 @@ def do_combine_events(self, line): self.banner.change_seed(self.random_orig) if not os.path.exists(pjoin(self.me_dir, 'Events', self.run_name)): os.mkdir(pjoin(self.me_dir, 'Events', self.run_name)) - self.banner.write(pjoin(self.me_dir, 'Events', self.run_name, + self.banner.write(pjoin(self.me_dir, 'Events', self.run_name, '%s_%s_banner.txt' % (self.run_name, tag))) - - get_wgt = lambda event: event.wgt + + get_wgt = lambda event: event.wgt AllEvent = lhe_parser.MultiEventFile() AllEvent.banner = self.banner - + partials = 0 # if too many file make some partial unweighting sum_xsec, sum_xerru, sum_axsec = 0,[],0 Gdirs = self.get_Gdir() @@ -3751,12 +3751,12 @@ def do_combine_events(self, line): os.remove(pjoin(Gdir, 'events.lhe')) continue - AllEvent.add(pjoin(Gdir, 'events.lhe'), + AllEvent.add(pjoin(Gdir, 'events.lhe'), result.get('xsec'), result.get('xerru'), result.get('axsec') ) - + if len(AllEvent) >= 80: #perform a partial unweighting AllEvent.unweight(pjoin(self.me_dir, "Events", self.run_name, "partials%s.lhe.gz" % partials), get_wgt, log_level=5, trunc_error=1e-2, event_target=self.run_card['nevents']) @@ -3765,13 +3765,13 @@ def do_combine_events(self, line): AllEvent.add(pjoin(self.me_dir, "Events", self.run_name, "partials%s.lhe.gz" % partials), sum_xsec, math.sqrt(sum(x**2 for x in sum_xerru)), - sum_axsec) + sum_axsec) partials +=1 - + if not hasattr(self,'proc_characteristic'): self.proc_characteristic = self.get_characteristics() if len(AllEvent) == 0: - nb_event = 0 + nb_event = 0 else: nb_event = AllEvent.unweight(pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe.gz"), get_wgt, trunc_error=1e-2, event_target=self.run_card['nevents'], @@ -3791,22 +3791,22 @@ def do_combine_events(self, line): os.remove(pjoin(self.me_dir, "Events", self.run_name, "partials%s.lhe.gz" % i)) except Exception: os.remove(pjoin(self.me_dir, "Events", self.run_name, "partials%s.lhe" % i)) - + self.results.add_detail('nb_event', nb_event) - + if self.run_card['bias_module'].lower() not in ['dummy', 'none'] and nb_event: self.correct_bias() elif self.run_card['custom_fcts']: self.correct_bias() logger.info("combination of events done in %s s ", time.time()-start) - + self.to_store.append('event') - - ############################################################################ + + ############################################################################ def correct_bias(self): - """check the first event and correct the weight by the bias + """check the first event and correct the weight by the bias and correct the cross-section. - If the event do not have the bias tag it means that the bias is + If the event do not have the bias tag it means that the bias is one modifying the cross-section/shape so we have nothing to do """ @@ -3834,7 +3834,7 @@ def correct_bias(self): output.write('') output.close() lhe.close() - + # MODIFY THE BANNER i.e. INIT BLOCK # ensure information compatible with normalisation choice total_cross = sum(cross[key] for key in cross) @@ -3846,8 +3846,8 @@ def correct_bias(self): elif self.run_card['event_norm'] == 'unity': total_cross = self.results.current['cross'] * total_cross / nb_event for key in cross: - cross[key] *= total_cross / nb_event - + cross[key] *= total_cross / nb_event + bannerfile = lhe_parser.EventFile(pjoin(self.me_dir, 'Events', self.run_name, '.banner.tmp.gz'),'w') banner = banner_mod.Banner(lhe.banner) banner.modify_init_cross(cross) @@ -3862,12 +3862,12 @@ def correct_bias(self): os.remove(lhe.name) os.remove(bannerfile.name) os.remove(output.name) - - + + self.results.current['cross'] = total_cross self.results.current['error'] = 0 - - ############################################################################ + + ############################################################################ def do_store_events(self, line): """Advanced commands: Launch store events""" @@ -3883,16 +3883,16 @@ def do_store_events(self, line): if not os.path.exists(pjoin(self.me_dir, 'Events', run)): os.mkdir(pjoin(self.me_dir, 'Events', run)) if not os.path.exists(pjoin(self.me_dir, 'HTML', run)): - os.mkdir(pjoin(self.me_dir, 'HTML', run)) - + os.mkdir(pjoin(self.me_dir, 'HTML', run)) + # 1) Store overall process information #input = pjoin(self.me_dir, 'SubProcesses', 'results.dat') #output = pjoin(self.me_dir, 'SubProcesses', '%s_results.dat' % run) - #files.cp(input, output) + #files.cp(input, output) # 2) Treat the files present in the P directory - # Ensure that the number of events is different of 0 + # Ensure that the number of events is different of 0 if self.results.current['nb_event'] == 0 and not self.run_card['gridpack']: logger.warning("No event detected. No cleaning performed! This should allow to run:\n" + " cd Subprocesses; ../bin/internal/combine_events\n"+ @@ -3910,18 +3910,18 @@ def do_store_events(self, line): # if os.path.exists(pjoin(G_path, 'results.dat')): # input = pjoin(G_path, 'results.dat') # output = pjoin(G_path, '%s_results.dat' % run) - # files.cp(input, output) + # files.cp(input, output) #except Exception: - # continue + # continue # Store log try: if os.path.exists(pjoin(G_path, 'log.txt')): input = pjoin(G_path, 'log.txt') output = pjoin(G_path, '%s_log.txt' % run) - files.mv(input, output) + files.mv(input, output) except Exception: continue - #try: + #try: # # Grid # for name in ['ftn26']: # if os.path.exists(pjoin(G_path, name)): @@ -3930,7 +3930,7 @@ def do_store_events(self, line): # input = pjoin(G_path, name) # output = pjoin(G_path, '%s_%s' % (run,name)) # files.mv(input, output) - # misc.gzip(pjoin(G_path, output), error=None) + # misc.gzip(pjoin(G_path, output), error=None) #except Exception: # continue # Delete ftn25 to ensure reproducible runs @@ -3940,11 +3940,11 @@ def do_store_events(self, line): # 3) Update the index.html self.gen_card_html() - + # 4) Move the Files present in Events directory E_path = pjoin(self.me_dir, 'Events') O_path = pjoin(self.me_dir, 'Events', run) - + # The events file for name in ['events.lhe', 'unweighted_events.lhe']: finput = pjoin(E_path, name) @@ -3960,30 +3960,30 @@ def do_store_events(self, line): # os.remove(pjoin(O_path, '%s.gz' % name)) # input = pjoin(E_path, name) ## output = pjoin(O_path, name) - + self.update_status('End Parton', level='parton', makehtml=False) devnull.close() - - - ############################################################################ + + + ############################################################################ def do_create_gridpack(self, line): """Advanced commands: Create gridpack from present run""" self.update_status('Creating gridpack', level='parton') # compile gen_ximprove misc.compile(['../bin/internal/gen_ximprove'], cwd=pjoin(self.me_dir, "Source")) - + Gdir = self.get_Gdir() Pdir = set([os.path.dirname(G) for G in Gdir]) - for P in Pdir: + for P in Pdir: allG = misc.glob('G*', path=P) for G in allG: if pjoin(P, G) not in Gdir: logger.debug('removing %s', pjoin(P,G)) shutil.rmtree(pjoin(P,G)) - - + + args = self.split_arg(line) self.check_combine_events(args) if not self.run_tag: self.run_tag = 'tag_1' @@ -3996,13 +3996,13 @@ def do_create_gridpack(self, line): cwd=self.me_dir) misc.call(['./bin/internal/clean'], cwd=self.me_dir) misc.call(['./bin/internal/make_gridpack'], cwd=self.me_dir) - files.mv(pjoin(self.me_dir, 'gridpack.tar.gz'), + files.mv(pjoin(self.me_dir, 'gridpack.tar.gz'), pjoin(self.me_dir, '%s_gridpack.tar.gz' % self.run_name)) os.system("sed -i.bak \"s/\s*.true.*=.*GridRun/ .false. = GridRun/g\" %s/Cards/grid_card.dat" \ % self.me_dir) self.update_status('gridpack created', level='gridpack') - - ############################################################################ + + ############################################################################ def do_shower(self, line): """launch the shower""" @@ -4010,7 +4010,7 @@ def do_shower(self, line): if len(args)>1 and args[0] in self._interfaced_showers: chosen_showers = [args.pop(0)] elif '--no_default' in line: - # If '--no_default' was specified in the arguments, then only one + # If '--no_default' was specified in the arguments, then only one # shower will be run, depending on which card is present. # but we each of them are called. (each of them check if the file exists) chosen_showers = list(self._interfaced_showers) @@ -4021,9 +4021,9 @@ def do_shower(self, line): shower_priority = ['pythia8','pythia'] chosen_showers = [sorted(chosen_showers,key=lambda sh: shower_priority.index(sh) if sh in shower_priority else len(shower_priority)+1)[0]] - + for shower in chosen_showers: - self.exec_cmd('%s %s'%(shower,' '.join(args)), + self.exec_cmd('%s %s'%(shower,' '.join(args)), postcmd=False, printcmd=False) def do_madanalysis5_parton(self, line): @@ -4039,11 +4039,11 @@ def do_madanalysis5_parton(self, line): def mg5amc_py8_interface_consistency_warning(options): """ Check the consistency of the mg5amc_py8_interface installed with the current MG5 and Pythia8 versions. """ - + # All this is only relevant is Pythia8 is interfaced to MG5 if not options['pythia8_path']: return None - + if not options['mg5amc_py8_interface_path']: return \ """ @@ -4053,7 +4053,7 @@ def mg5amc_py8_interface_consistency_warning(options): Consider installing the MG5_aMC-PY8 interface with the following command: MG5_aMC>install mg5amc_py8_interface """ - + mg5amc_py8_interface_path = options['mg5amc_py8_interface_path'] py8_path = options['pythia8_path'] # If the specified interface path is relative, make it absolut w.r.t MGDIR if @@ -4062,7 +4062,7 @@ def mg5amc_py8_interface_consistency_warning(options): mg5amc_py8_interface_path = pjoin(MG5DIR,mg5amc_py8_interface_path) py8_path = pjoin(MG5DIR,py8_path) - # Retrieve all the on-install and current versions + # Retrieve all the on-install and current versions fsock = open(pjoin(mg5amc_py8_interface_path, 'MG5AMC_VERSION_ON_INSTALL')) MG5_version_on_install = fsock.read().replace('\n','') fsock.close() @@ -4074,7 +4074,7 @@ def mg5amc_py8_interface_consistency_warning(options): MG5_curr_version =misc.get_pkg_info()['version'] try: p = subprocess.Popen(['./get_pythia8_version.py',py8_path], - stdout=subprocess.PIPE, stderr=subprocess.PIPE, + stdout=subprocess.PIPE, stderr=subprocess.PIPE, cwd=mg5amc_py8_interface_path) (out, err) = p.communicate() out = out.decode(errors='ignore').replace('\n','') @@ -4084,37 +4084,37 @@ def mg5amc_py8_interface_consistency_warning(options): float(out) except: PY8_curr_version = None - + if not MG5_version_on_install is None and not MG5_curr_version is None: if MG5_version_on_install != MG5_curr_version: return \ """ The current version of MG5_aMC (v%s) is different than the one active when - installing the 'mg5amc_py8_interface_path' (which was MG5aMC v%s). + installing the 'mg5amc_py8_interface_path' (which was MG5aMC v%s). Please consider refreshing the installation of this interface with the command: MG5_aMC>install mg5amc_py8_interface """%(MG5_curr_version, MG5_version_on_install) - + if not PY8_version_on_install is None and not PY8_curr_version is None: if PY8_version_on_install != PY8_curr_version: return \ """ The current version of Pythia8 (v%s) is different than the one active when - installing the 'mg5amc_py8_interface' tool (which was Pythia8 v%s). + installing the 'mg5amc_py8_interface' tool (which was Pythia8 v%s). Please consider refreshing the installation of this interface with the command: MG5_aMC>install mg5amc_py8_interface """%(PY8_curr_version,PY8_version_on_install) - + return None def setup_Pythia8RunAndCard(self, PY8_Card, run_type): """ Setup the Pythia8 Run environment and card. In particular all the process and run specific parameters of the card are automatically set here. This function returns the path where HEPMC events will be output, if any.""" - + HepMC_event_output = None tag = self.run_tag - + PY8_Card.subruns[0].systemSet('Beams:LHEF',"unweighted_events.lhe.gz") hepmc_format = PY8_Card['HEPMCoutput:file'].lower() @@ -4185,7 +4185,7 @@ def setup_Pythia8RunAndCard(self, PY8_Card, run_type): misc.mkfifo(fifo_path) # Use defaultSet not to overwrite the current userSet status PY8_Card.defaultSet('HEPMCoutput:file',fifo_path) - HepMC_event_output=fifo_path + HepMC_event_output=fifo_path elif hepmc_format in ['','/dev/null','None']: logger.warning('User disabled the HepMC output of Pythia8.') HepMC_event_output = None @@ -4206,7 +4206,7 @@ def setup_Pythia8RunAndCard(self, PY8_Card, run_type): # only if it is not already user_set. if PY8_Card['JetMatching:qCut']==-1.0: PY8_Card.MadGraphSet('JetMatching:qCut',1.5*self.run_card['xqcut'], force=True) - + if PY8_Card['JetMatching:qCut']<(1.5*self.run_card['xqcut']): logger.error( 'The MLM merging qCut parameter you chose (%f) is less than '%PY8_Card['JetMatching:qCut']+ @@ -4233,7 +4233,7 @@ def setup_Pythia8RunAndCard(self, PY8_Card, run_type): if PY8_Card['JetMatching:qCut'] not in qCutList: qCutList.append(PY8_Card['JetMatching:qCut']) PY8_Card.MadGraphSet('SysCalc:qCutList', qCutList, force=True) - + if PY8_Card['SysCalc:qCutList']!='auto': for scale in PY8_Card['SysCalc:qCutList']: @@ -4244,7 +4244,7 @@ def setup_Pythia8RunAndCard(self, PY8_Card, run_type): "'sys_matchscale' in the run_card) is less than 1.5*xqcut, where xqcut is"+ ' the run_card parameter (=%f)\n'%self.run_card['xqcut']+ 'It would be better/safer to use a larger qCut or a smaller xqcut.') - + # Specific MLM settings # PY8 should not implement the MLM veto since the driver should do it # if merging scale variation is turned on @@ -4294,18 +4294,18 @@ def setup_Pythia8RunAndCard(self, PY8_Card, run_type): CKKW_cut = 'ktdurham' elif self.run_card['ptlund']>0.0 and self.run_card['ktdurham']<=0.0: PY8_Card.subruns[0].MadGraphSet('Merging:doPTLundMerging',True) - CKKW_cut = 'ptlund' + CKKW_cut = 'ptlund' else: raise InvalidCmd("*Either* the 'ptlund' or 'ktdurham' cut in "+\ " the run_card must be turned on to activate CKKW(L) merging"+ " with Pythia8, but *both* cuts cannot be turned on at the same time."+ "\n ptlund=%f, ktdurham=%f."%(self.run_card['ptlund'],self.run_card['ktdurham'])) - + # Automatically set qWeed to the CKKWL cut if not defined by the user. if PY8_Card['SysCalc:qWeed']==-1.0: PY8_Card.MadGraphSet('SysCalc:qWeed',self.run_card[CKKW_cut], force=True) - + # MadGraphSet sets the corresponding value (in system mode) # only if it is not already user_set. if PY8_Card['Merging:TMS']==-1.0: @@ -4319,7 +4319,7 @@ def setup_Pythia8RunAndCard(self, PY8_Card, run_type): 'The CKKWl merging scale you chose (%f) is less than '%PY8_Card['Merging:TMS']+ 'the %s cut specified in the run_card parameter (=%f).\n'%(CKKW_cut,self.run_card[CKKW_cut])+ 'It is incorrect to use a smaller CKKWl scale than the generation-level %s cut!'%CKKW_cut) - + PY8_Card.MadGraphSet('TimeShower:pTmaxMatch',1) PY8_Card.MadGraphSet('SpaceShower:pTmaxMatch',1) PY8_Card.MadGraphSet('SpaceShower:rapidityOrder',False) @@ -4381,7 +4381,7 @@ def do_pythia8(self, line): try: import madgraph - except ImportError: + except ImportError: import internal.histograms as histograms else: import madgraph.various.histograms as histograms @@ -4400,16 +4400,16 @@ def do_pythia8(self, line): self.check_pythia8(args) self.configure_directory(html_opening =False) else: - # initialize / remove lhapdf mode + # initialize / remove lhapdf mode self.configure_directory(html_opening =False) - self.check_pythia8(args) + self.check_pythia8(args) # Update the banner with the pythia card if not self.banner or len(self.banner) <=1: # Here the level keyword 'pythia' must not be changed to 'pythia8'. self.banner = banner_mod.recover_banner(self.results, 'pythia') - # the args are modify and the last arg is always the mode + # the args are modify and the last arg is always the mode if not no_default: self.ask_pythia_run_configuration(args[-1], pythia_version=8, banner=self.banner) @@ -4425,7 +4425,7 @@ def do_pythia8(self, line): #"Please use 'event_norm = average' in the run_card to avoid this problem.") - + if not self.options['mg5amc_py8_interface_path'] or not \ os.path.exists(pjoin(self.options['mg5amc_py8_interface_path'], 'MG5aMC_PY8_interface')): @@ -4444,16 +4444,16 @@ def do_pythia8(self, line): # Again here 'pythia' is just a keyword for the simulation level. self.update_status('\033[92mRunning Pythia8 [arXiv:1410.3012]\033[0m', 'pythia8') - - tag = self.run_tag + + tag = self.run_tag # Now write Pythia8 card # Start by reading, starting from the default one so that the 'user_set' # tag are correctly set. - PY8_Card = banner_mod.PY8Card(pjoin(self.me_dir, 'Cards', + PY8_Card = banner_mod.PY8Card(pjoin(self.me_dir, 'Cards', 'pythia8_card_default.dat')) PY8_Card.read(pjoin(self.me_dir, 'Cards', 'pythia8_card.dat'), setter='user') - + run_type = 'default' merged_run_types = ['MLM','CKKW'] if int(self.run_card['ickkw'])==1: @@ -4471,7 +4471,7 @@ def do_pythia8(self, line): cmd_card = StringIO.StringIO() PY8_Card.write(cmd_card,pjoin(self.me_dir,'Cards','pythia8_card_default.dat'), direct_pythia_input=True) - + # Now setup the preamble to make sure that everything will use the locally # installed tools (if present) even if the user did not add it to its # environment variables. @@ -4486,13 +4486,13 @@ def do_pythia8(self, line): preamble = misc.get_HEPTools_location_setter( pjoin(MG5DIR,'HEPTools'),'lib') preamble += "\n unset PYTHIA8DATA\n" - + open(pythia_cmd_card,'w').write("""! ! It is possible to run this card manually with: ! %s %s ! """%(preamble+pythia_main,os.path.basename(pythia_cmd_card))+cmd_card.getvalue()) - + # launch pythia8 pythia_log = pjoin(self.me_dir , 'Events', self.run_name , '%s_pythia8.log' % tag) @@ -4504,13 +4504,13 @@ def do_pythia8(self, line): shell_exe = None if os.path.exists('/usr/bin/env'): shell_exe = '/usr/bin/env %s'%shell - else: + else: shell_exe = misc.which(shell) if not shell_exe: raise self.InvalidCmd('No s hell could be found in your environment.\n'+ "Make sure that either '%s' is in your path or that the"%shell+\ " command '/usr/bin/env %s' exists and returns a valid path."%shell) - + exe_cmd = "#!%s\n%s"%(shell_exe,' '.join( [preamble+pythia_main, os.path.basename(pythia_cmd_card)])) @@ -4528,7 +4528,7 @@ def do_pythia8(self, line): ( os.path.exists(HepMC_event_output) and \ stat.S_ISFIFO(os.stat(HepMC_event_output).st_mode)) startPY8timer = time.time() - + # Information that will be extracted from this PY8 run PY8_extracted_information={ 'sigma_m':None, 'Nacc':None, 'Ntry':None, 'cross_sections':{} } @@ -4556,7 +4556,7 @@ def do_pythia8(self, line): n_cores = max(int(self.options['cluster_size']),1) elif self.options['run_mode']==2: n_cores = max(int(self.cluster.nb_core),1) - + lhe_file_name = os.path.basename(PY8_Card.subruns[0]['Beams:LHEF']) lhe_file = lhe_parser.EventFile(pjoin(self.me_dir,'Events', self.run_name,PY8_Card.subruns[0]['Beams:LHEF'])) @@ -4574,7 +4574,7 @@ def do_pythia8(self, line): if self.options['run_mode']==2: min_n_events_per_job = 100 elif self.options['run_mode']==1: - min_n_events_per_job = 1000 + min_n_events_per_job = 1000 min_n_core = n_events//min_n_events_per_job n_cores = max(min(min_n_core,n_cores),1) @@ -4584,8 +4584,8 @@ def do_pythia8(self, line): logger.info('Follow Pythia8 shower by running the '+ 'following command (in a separate terminal):\n tail -f %s'%pythia_log) - if self.options['run_mode']==2 and self.options['nb_core']>1: - ret_code = self.cluster.launch_and_wait(wrapper_path, + if self.options['run_mode']==2 and self.options['nb_core']>1: + ret_code = self.cluster.launch_and_wait(wrapper_path, argument= [], stdout= pythia_log, stderr=subprocess.STDOUT, cwd=pjoin(self.me_dir,'Events',self.run_name)) else: @@ -4630,10 +4630,10 @@ def do_pythia8(self, line): wrapper = open(wrapper_path,'w') if self.options['cluster_temp_path'] is None: exe_cmd = \ -"""#!%s +"""#!%s ./%s PY8Card.dat >& PY8_log.txt """ - else: + else: exe_cmd = \ """#!%s ln -s ./events_$1.lhe.gz ./events.lhe.gz @@ -4663,21 +4663,21 @@ def do_pythia8(self, line): # Set it as executable st = os.stat(wrapper_path) os.chmod(wrapper_path, st.st_mode | stat.S_IEXEC) - + # Split the .lhe event file, create event partition partition=[n_available_events//n_cores]*n_cores for i in range(n_available_events%n_cores): partition[i] += 1 - + # Splitting according to the total number of events requested by the user # Will be used to determine the number of events to indicate in the PY8 split cards. partition_for_PY8=[n_events//n_cores]*n_cores for i in range(n_events%n_cores): partition_for_PY8[i] += 1 - - logger.info('Splitting .lhe event file for PY8 parallelization...') - n_splits = lhe_file.split(partition=partition, cwd=parallelization_dir, zip=True) - + + logger.info('Splitting .lhe event file for PY8 parallelization...') + n_splits = lhe_file.split(partition=partition, cwd=parallelization_dir, zip=True) + if n_splits!=len(partition): raise MadGraph5Error('Error during lhe file splitting. Expected %d files but obtained %d.' %(len(partition),n_splits)) @@ -4690,7 +4690,7 @@ def do_pythia8(self, line): # Add the necessary run content shutil.move(pjoin(parallelization_dir,lhe_file.name+'_%d.lhe.gz'%split_id), pjoin(parallelization_dir,split_files[-1])) - + logger.info('Submitting Pythia8 jobs...') for i, split_file in enumerate(split_files): # We must write a PY8Card tailored for each split so as to correct the normalization @@ -4706,7 +4706,7 @@ def do_pythia8(self, line): split_PY8_Card.write(pjoin(parallelization_dir,'PY8Card_%d.dat'%i), pjoin(parallelization_dir,'PY8Card.dat'), add_missing=False) in_files = [pjoin(parallelization_dir,os.path.basename(pythia_main)), - pjoin(parallelization_dir,'PY8Card_%d.dat'%i), + pjoin(parallelization_dir,'PY8Card_%d.dat'%i), pjoin(parallelization_dir,split_file)] if self.options['cluster_temp_path'] is None: out_files = [] @@ -4718,35 +4718,35 @@ def do_pythia8(self, line): if os.path.basename(in_file)==split_file: ln(in_file,selected_cwd,name='events.lhe.gz') elif os.path.basename(in_file).startswith('PY8Card'): - ln(in_file,selected_cwd,name='PY8Card.dat') + ln(in_file,selected_cwd,name='PY8Card.dat') else: - ln(in_file,selected_cwd) + ln(in_file,selected_cwd) in_files = [] wrapper_path = os.path.basename(wrapper_path) else: out_files = ['split_%d.tar.gz'%i] selected_cwd = parallelization_dir - self.cluster.submit2(wrapper_path, - argument=[str(i)], cwd=selected_cwd, + self.cluster.submit2(wrapper_path, + argument=[str(i)], cwd=selected_cwd, input_files=in_files, output_files=out_files, required_output=out_files) - + def wait_monitoring(Idle, Running, Done): if Idle+Running+Done == 0: return logger.info('Pythia8 shower jobs: %d Idle, %d Running, %d Done [%s]'\ %(Idle, Running, Done, misc.format_time(time.time() - startPY8timer))) self.cluster.wait(parallelization_dir,wait_monitoring) - + logger.info('Merging results from the split PY8 runs...') if self.options['cluster_temp_path']: # Decompressing the output for i, split_file in enumerate(split_files): misc.call(['tar','-xzf','split_%d.tar.gz'%i],cwd=parallelization_dir) os.remove(pjoin(parallelization_dir,'split_%d.tar.gz'%i)) - + # Now merge logs pythia_log_file = open(pythia_log,'w') n_added = 0 @@ -4778,7 +4778,7 @@ def wait_monitoring(Idle, Running, Done): if n_added>0: PY8_extracted_information['sigma_m'] /= float(n_added) pythia_log_file.close() - + # djr plots djr_HwU = None n_added = 0 @@ -4845,7 +4845,7 @@ def wait_monitoring(Idle, Running, Done): if not os.path.isfile(hepmc_file): continue all_hepmc_files.append(hepmc_file) - + if len(all_hepmc_files)>0: hepmc_output = pjoin(self.me_dir,'Events',self.run_name,HepMC_event_output) with misc.TMP_directory() as tmp_dir: @@ -4860,8 +4860,8 @@ def wait_monitoring(Idle, Running, Done): break header.close() tail = open(pjoin(tmp_dir,'tail.hepmc'),'w') - n_tail = 0 - + n_tail = 0 + for line in misc.reverse_readline(all_hepmc_files[-1]): if line.startswith('HepMC::'): n_tail += 1 @@ -4871,7 +4871,7 @@ def wait_monitoring(Idle, Running, Done): tail.close() if n_tail>1: raise MadGraph5Error('HEPMC files should only have one trailing command.') - ###################################################################### + ###################################################################### # This is the most efficient way of putting together HEPMC's, *BUT* # # WARNING: NEED TO RENDER THE CODE BELOW SAFE TOWARDS INJECTION # ###################################################################### @@ -4888,12 +4888,12 @@ def wait_monitoring(Idle, Running, Done): elif sys.platform == 'darwin': # sed on MAC has slightly different synthax than on os.system(' '.join(['sed','-i',"''","'%s;$d'"% - (';'.join('%id'%(i+1) for i in range(n_head))),hepmc_file])) - else: - # other UNIX systems + (';'.join('%id'%(i+1) for i in range(n_head))),hepmc_file])) + else: + # other UNIX systems os.system(' '.join(['sed','-i']+["-e '%id'"%(i+1) for i in range(n_head)]+ ["-e '$d'",hepmc_file])) - + os.system(' '.join(['cat',pjoin(tmp_dir,'header.hepmc')]+all_hepmc_files+ [pjoin(tmp_dir,'tail.hepmc'),'>',hepmc_output])) @@ -4915,12 +4915,12 @@ def wait_monitoring(Idle, Running, Done): 'Inclusive cross section:' not in '\n'.join(open(pythia_log,'r').readlines()[-20:]): logger.warning('Fail to produce a pythia8 output. More info in \n %s'%pythia_log) return - + # Plot for Pythia8 successful = self.create_plot('Pythia8') if not successful: logger.warning('Failed to produce Pythia8 merging plots.') - + self.to_store.append('pythia8') # Study matched cross-sections @@ -4931,7 +4931,7 @@ def wait_monitoring(Idle, Running, Done): if self.options['run_mode']==0 or (self.options['run_mode']==2 and self.options['nb_core']==1): PY8_extracted_information['sigma_m'],PY8_extracted_information['Nacc'],\ PY8_extracted_information['Ntry'] = self.parse_PY8_log_file( - pjoin(self.me_dir,'Events', self.run_name,'%s_pythia8.log' % tag)) + pjoin(self.me_dir,'Events', self.run_name,'%s_pythia8.log' % tag)) else: logger.warning('Pythia8 cross-section could not be retreived.\n'+ 'Try turning parallelization off by setting the option nb_core to 1. YYYYY') @@ -4944,8 +4944,8 @@ def wait_monitoring(Idle, Running, Done): Ntry = PY8_extracted_information['Ntry'] sigma_m = PY8_extracted_information['sigma_m'] # Compute pythia error - error = self.results[self.run_name].return_tag(self.run_tag)['error'] - try: + error = self.results[self.run_name].return_tag(self.run_tag)['error'] + try: error_m = math.sqrt((error * Nacc/Ntry)**2 + sigma_m**2 *(1-Nacc/Ntry)/Nacc) except ZeroDivisionError: # Cannot compute error @@ -4966,31 +4966,31 @@ def wait_monitoring(Idle, Running, Done): else: logger.warning('Pythia8 merged cross-sections could not be retreived.\n'+ 'Try turning parallelization off by setting the option nb_core to 1.XXXXX') - PY8_extracted_information['cross_sections'] = {} - + PY8_extracted_information['cross_sections'] = {} + cross_sections = PY8_extracted_information['cross_sections'] if cross_sections: - # Filter the cross_sections specified an keep only the ones + # Filter the cross_sections specified an keep only the ones # with central parameters and a different merging scale a_float_re = '[\+|-]?\d+(\.\d*)?([EeDd][\+|-]?\d+)?' central_merging_re = re.compile( '^\s*Weight_MERGING\s*=\s*(?P%s)\s*$'%a_float_re, - re.IGNORECASE) + re.IGNORECASE) cross_sections = dict( (float(central_merging_re.match(xsec).group('merging')),value) - for xsec, value in cross_sections.items() if not + for xsec, value in cross_sections.items() if not central_merging_re.match(xsec) is None) central_scale = PY8_Card['JetMatching:qCut'] if \ int(self.run_card['ickkw'])==1 else PY8_Card['Merging:TMS'] if central_scale in cross_sections: self.results.add_detail('cross_pythia8', cross_sections[central_scale][0]) self.results.add_detail('error_pythia8', cross_sections[central_scale][1]) - + #logger.info('Pythia8 merged cross-sections are:') #for scale in sorted(cross_sections.keys()): # logger.info(' > Merging scale = %-6.4g : %-11.5g +/- %-7.2g [pb]'%\ - # (scale,cross_sections[scale][0],cross_sections[scale][1])) - + # (scale,cross_sections[scale][0],cross_sections[scale][1])) + xsecs_file = open(pjoin(self.me_dir,'Events',self.run_name, '%s_merged_xsecs.txt'%tag),'w') if cross_sections: @@ -5003,9 +5003,9 @@ def wait_monitoring(Idle, Running, Done): xsecs_file.write('Cross-sections could not be read from the'+\ "XML node 'xsection' of the .dat file produced by Pythia8.") xsecs_file.close() - + #Update the banner - # We add directly the pythia command card because it has the full + # We add directly the pythia command card because it has the full # information self.banner.add(pythia_cmd_card) @@ -5022,13 +5022,13 @@ def wait_monitoring(Idle, Running, Done): if self.options['delphes_path']: self.exec_cmd('delphes --no_default', postcmd=False, printcmd=False) self.print_results_in_shell(self.results.current) - + def parse_PY8_log_file(self, log_file_path): """ Parse a log file to extract number of event and cross-section. """ pythiare = re.compile("Les Houches User Process\(es\)\s*\d+\s*\|\s*(?P\d+)\s*(?P\d+)\s*(?P\d+)\s*\|\s*(?P[\d\.e\-\+]+)\s*(?P[\d\.e\-\+]+)") pythia_xsec_re = re.compile("Inclusive cross section\s*:\s*(?P[\d\.e\-\+]+)\s*(?P[\d\.e\-\+]+)") sigma_m, Nacc, Ntry = None, None, None - for line in misc.BackRead(log_file_path): + for line in misc.BackRead(log_file_path): info = pythiare.search(line) if not info: # Also try to obtain the cross-section and error from the final xsec line of pythia8 log @@ -5058,7 +5058,7 @@ def parse_PY8_log_file(self, log_file_path): raise self.InvalidCmd("Could not find cross-section and event number information "+\ "in Pythia8 log\n '%s'."%log_file_path) - + def extract_cross_sections_from_DJR(self,djr_output): """Extract cross-sections from a djr XML output.""" import xml.dom.minidom as minidom @@ -5075,11 +5075,11 @@ def extract_cross_sections_from_DJR(self,djr_output): [float(xsec.childNodes[0].data.split()[0]), float(xsec.childNodes[0].data.split()[1])]) for xsec in xsections) - + def do_pythia(self, line): """launch pythia""" - - + + # Check argument's validity args = self.split_arg(line) if '--no_default' in args: @@ -5089,12 +5089,12 @@ def do_pythia(self, line): args.remove('--no_default') else: no_default = False - + if not self.run_name: self.check_pythia(args) self.configure_directory(html_opening =False) else: - # initialize / remove lhapdf mode + # initialize / remove lhapdf mode self.configure_directory(html_opening =False) self.check_pythia(args) @@ -5102,7 +5102,7 @@ def do_pythia(self, line): logger.error('pythia-pgs require event_norm to be on sum. Do not run pythia6') return - # the args are modify and the last arg is always the mode + # the args are modify and the last arg is always the mode if not no_default: self.ask_pythia_run_configuration(args[-1]) if self.options['automatic_html_opening']: @@ -5114,35 +5114,35 @@ def do_pythia(self, line): self.banner = banner_mod.recover_banner(self.results, 'pythia') pythia_src = pjoin(self.options['pythia-pgs_path'],'src') - + self.results.add_detail('run_mode', 'madevent') self.update_status('Running Pythia', 'pythia') try: os.remove(pjoin(self.me_dir,'Events','pythia.done')) except Exception: - pass - + pass + ## LAUNCHING PYTHIA # check that LHAPATH is define. if not re.search(r'^\s*LHAPATH=%s/PDFsets' % pythia_src, - open(pjoin(self.me_dir,'Cards','pythia_card.dat')).read(), + open(pjoin(self.me_dir,'Cards','pythia_card.dat')).read(), re.M): f = open(pjoin(self.me_dir,'Cards','pythia_card.dat'),'a') f.write('\n LHAPATH=%s/PDFsets' % pythia_src) f.close() tag = self.run_tag pythia_log = pjoin(self.me_dir, 'Events', self.run_name , '%s_pythia.log' % tag) - #self.cluster.launch_and_wait('../bin/internal/run_pythia', + #self.cluster.launch_and_wait('../bin/internal/run_pythia', # argument= [pythia_src], stdout= pythia_log, # stderr=subprocess.STDOUT, # cwd=pjoin(self.me_dir,'Events')) output_files = ['pythia_events.hep'] if self.run_card['use_syst']: output_files.append('syst.dat') - if self.run_card['ickkw'] == 1: + if self.run_card['ickkw'] == 1: output_files += ['beforeveto.tree', 'xsecs.tree', 'events.tree'] - + os.environ['PDG_MASS_TBL'] = pjoin(pythia_src,'mass_width_2004.mc') self.cluster.launch_and_wait(pjoin(pythia_src, 'pythia'), input_files=[pjoin(self.me_dir, "Events", "unweighted_events.lhe"), @@ -5152,23 +5152,23 @@ def do_pythia(self, line): stdout= pythia_log, stderr=subprocess.STDOUT, cwd=pjoin(self.me_dir,'Events')) - + os.remove(pjoin(self.me_dir, "Events", "unweighted_events.lhe")) if not os.path.exists(pjoin(self.me_dir,'Events','pythia_events.hep')): logger.warning('Fail to produce pythia output. More info in \n %s' % pythia_log) return - + self.to_store.append('pythia') - + # Find the matched cross-section if int(self.run_card['ickkw']): # read the line from the bottom of the file - #pythia_log = misc.BackRead(pjoin(self.me_dir,'Events', self.run_name, + #pythia_log = misc.BackRead(pjoin(self.me_dir,'Events', self.run_name, # '%s_pythia.log' % tag)) - pythiare = re.compile("\s*I\s+0 All included subprocesses\s+I\s+(?P\d+)\s+(?P\d+)\s+I\s+(?P[\d\.D\-+]+)\s+I") - for line in misc.reverse_readline(pjoin(self.me_dir,'Events', self.run_name, + pythiare = re.compile("\s*I\s+0 All included subprocesses\s+I\s+(?P\d+)\s+(?P\d+)\s+I\s+(?P[\d\.D\-+]+)\s+I") + for line in misc.reverse_readline(pjoin(self.me_dir,'Events', self.run_name, '%s_pythia.log' % tag)): info = pythiare.search(line) if not info: @@ -5188,16 +5188,16 @@ def do_pythia(self, line): self.results.add_detail('nb_event_pythia', Nacc) #compute pythia error error = self.results[self.run_name].return_tag(self.run_tag)['error'] - if Nacc: + if Nacc: error_m = math.sqrt((error * Nacc/Ntry)**2 + sigma_m**2 *(1-Nacc/Ntry)/Nacc) else: error_m = 10000 * sigma_m # works both for fixed number of generated events and fixed accepted events self.results.add_detail('error_pythia', error_m) - break + break #pythia_log.close() - + pydir = pjoin(self.options['pythia-pgs_path'], 'src') eradir = self.options['exrootanalysis_path'] madir = self.options['madanalysis_path'] @@ -5216,12 +5216,12 @@ def do_pythia(self, line): # Creating LHE file self.run_hep2lhe(banner_path) - + if int(self.run_card['ickkw']): misc.gzip(pjoin(self.me_dir,'Events','beforeveto.tree'), - stdout=pjoin(self.me_dir,'Events',self.run_name, tag+'_pythia_beforeveto.tree.gz')) + stdout=pjoin(self.me_dir,'Events',self.run_name, tag+'_pythia_beforeveto.tree.gz')) + - if self.run_card['use_syst'] in self.true: # Calculate syscalc info based on syst.dat try: @@ -5233,7 +5233,7 @@ def do_pythia(self, line): # Store syst.dat misc.gzip(pjoin(self.me_dir,'Events', 'syst.dat'), stdout=pjoin(self.me_dir,'Events',self.run_name, tag + '_pythia_syst.dat.gz')) - + # Store syscalc.dat if os.path.exists(pjoin(self.me_dir, 'Events', 'syscalc.dat')): filename = pjoin(self.me_dir, 'Events' ,self.run_name, @@ -5253,7 +5253,7 @@ def do_pythia(self, line): if self.options['delphes_path']: self.exec_cmd('delphes --no_default', postcmd=False, printcmd=False) self.print_results_in_shell(self.results.current) - + ################################################################################ def do_remove(self, line): @@ -5263,8 +5263,8 @@ def do_remove(self, line): run, tag, mode = self.check_remove(args) if 'banner' in mode: mode.append('all') - - + + if run == 'all': # Check first if they are not a run with a name run. if os.path.exists(pjoin(self.me_dir, 'Events', 'all')): @@ -5280,7 +5280,7 @@ def do_remove(self, line): logger.info(error) pass # run already clear return - + # Check that run exists if not os.path.exists(pjoin(self.me_dir, 'Events', run)): raise self.InvalidCmd('No run \'%s\' detected' % run) @@ -5294,7 +5294,7 @@ def do_remove(self, line): # Found the file to delete - + to_delete = misc.glob('*', pjoin(self.me_dir, 'Events', run)) to_delete += misc.glob('*', pjoin(self.me_dir, 'HTML', run)) # forbid the banner to be removed @@ -5314,7 +5314,7 @@ def do_remove(self, line): if os.path.exists(pjoin(self.me_dir, 'Events', run, 'unweighted_events.lhe.gz')): to_delete.append('unweighted_events.lhe.gz') if os.path.exists(pjoin(self.me_dir, 'HTML', run,'plots_parton.html')): - to_delete.append(pjoin(self.me_dir, 'HTML', run,'plots_parton.html')) + to_delete.append(pjoin(self.me_dir, 'HTML', run,'plots_parton.html')) if nb_rm != len(to_delete): logger.warning('Be carefull that partonic information are on the point to be removed.') if 'all' in mode: @@ -5327,8 +5327,8 @@ def do_remove(self, line): if 'delphes' not in mode: to_delete = [f for f in to_delete if 'delphes' not in f] if 'parton' not in mode: - to_delete = [f for f in to_delete if 'delphes' in f - or 'pgs' in f + to_delete = [f for f in to_delete if 'delphes' in f + or 'pgs' in f or 'pythia' in f] if not self.force and len(to_delete): question = 'Do you want to delete the following files?\n %s' % \ @@ -5336,7 +5336,7 @@ def do_remove(self, line): ans = self.ask(question, 'y', choices=['y','n']) else: ans = 'y' - + if ans == 'y': for file2rm in to_delete: if os.path.exists(pjoin(self.me_dir, 'Events', run, file2rm)): @@ -5374,7 +5374,7 @@ def do_remove(self, line): if ans == 'y': for file2rm in to_delete: os.remove(file2rm) - + if 'banner' in mode: to_delete = misc.glob('*', pjoin(self.me_dir, 'Events', run)) if tag: @@ -5389,8 +5389,8 @@ def do_remove(self, line): return elif any(['banner' not in os.path.basename(p) for p in to_delete]): if to_delete: - raise MadGraph5Error('''Some output still exists for this run. - Please remove those output first. Do for example: + raise MadGraph5Error('''Some output still exists for this run. + Please remove those output first. Do for example: remove %s all banner ''' % run) else: @@ -5400,7 +5400,7 @@ def do_remove(self, line): return else: logger.info('''The banner is not removed. In order to remove it run: - remove %s all banner %s''' % (run, tag and '--tag=%s ' % tag or '')) + remove %s all banner %s''' % (run, tag and '--tag=%s ' % tag or '')) # update database. self.results.clean(mode, run, tag) @@ -5420,7 +5420,7 @@ def do_plot(self, line): logger.info('plot for run %s' % self.run_name) if not self.force: self.ask_edit_cards(['plot_card.dat'], args, plot=True) - + if any([arg in ['all','parton'] for arg in args]): filename = pjoin(self.me_dir, 'Events', self.run_name, 'unweighted_events.lhe') if os.path.exists(filename+'.gz'): @@ -5438,8 +5438,8 @@ def do_plot(self, line): except Exception: pass else: - logger.info('No valid files for partonic plot') - + logger.info('No valid files for partonic plot') + if any([arg in ['all','pythia'] for arg in args]): filename = pjoin(self.me_dir, 'Events' ,self.run_name, '%s_pythia_events.lhe' % self.run_tag) @@ -5452,10 +5452,10 @@ def do_plot(self, line): stdout= "%s.gz" % filename) else: logger.info('No valid files for pythia plot') - - + + if any([arg in ['all','pgs'] for arg in args]): - filename = pjoin(self.me_dir, 'Events', self.run_name, + filename = pjoin(self.me_dir, 'Events', self.run_name, '%s_pgs_events.lhco' % self.run_tag) if os.path.exists(filename+'.gz'): misc.gunzip("%s.gz" % filename) @@ -5464,15 +5464,15 @@ def do_plot(self, line): misc.gzip(filename) else: logger.info('No valid files for pgs plot') - + if any([arg in ['all','delphes'] for arg in args]): - filename = pjoin(self.me_dir, 'Events', self.run_name, + filename = pjoin(self.me_dir, 'Events', self.run_name, '%s_delphes_events.lhco' % self.run_tag) if os.path.exists(filename+'.gz'): misc.gunzip("%s.gz" % filename) if os.path.exists(filename): self.create_plot('Delphes') - misc.gzip(filename) + misc.gzip(filename) else: logger.info('No valid files for delphes plot') @@ -5488,9 +5488,9 @@ def do_syscalc(self, line): if self.ninitial == 1: logger.error('SysCalc can\'t be run for decay processes') return - + logger.info('Calculating systematics for run %s' % self.run_name) - + self.ask_edit_cards(['run_card.dat'], args, plot=False) self.run_card = banner_mod.RunCard(pjoin(self.me_dir, 'Cards', 'run_card.dat')) if any([arg in ['all','parton'] for arg in args]): @@ -5504,7 +5504,7 @@ def do_syscalc(self, line): stdout="%s.gz" % filename) else: logger.info('No valid files for parton level systematics run.') - + if any([arg in ['all','pythia'] for arg in args]): filename = pjoin(self.me_dir, 'Events' ,self.run_name, '%s_pythia_syst.dat' % self.run_tag) @@ -5525,17 +5525,17 @@ def do_syscalc(self, line): else: logger.info('No valid files for pythia level') - + def store_result(self): - """ tar the pythia results. This is done when we are quite sure that + """ tar the pythia results. This is done when we are quite sure that the pythia output will not be use anymore """ if not self.run_name: return - + if not self.to_store: - return - + return + tag = self.run_card['run_tag'] self.update_status('storing files of previous run', level=None,\ error=True) @@ -5546,14 +5546,14 @@ def store_result(self): misc.gzip(pjoin(self.me_dir,'Events',self.run_name,"unweighted_events.lhe")) if os.path.exists(pjoin(self.me_dir,'Events','reweight.lhe')): os.remove(pjoin(self.me_dir,'Events', 'reweight.lhe')) - + if 'pythia' in self.to_store: self.update_status('Storing Pythia files of previous run', level='pythia', error=True) p = pjoin(self.me_dir,'Events') n = self.run_name t = tag self.to_store.remove('pythia') - misc.gzip(pjoin(p,'pythia_events.hep'), + misc.gzip(pjoin(p,'pythia_events.hep'), stdout=pjoin(p, str(n),'%s_pythia_events.hep' % t),forceexternal=True) if 'pythia8' in self.to_store: @@ -5581,26 +5581,26 @@ def store_result(self): os.system("mv " + file_path + hepmc_fileformat + " " + move_hepmc_path) self.update_status('Done', level='pythia',makehtml=False,error=True) - self.results.save() - + self.results.save() + self.to_store = [] - def launch_job(self,exe, cwd=None, stdout=None, argument = [], remaining=0, + def launch_job(self,exe, cwd=None, stdout=None, argument = [], remaining=0, run_type='', mode=None, **opt): """ """ argument = [str(arg) for arg in argument] if mode is None: mode = self.cluster_mode - + # ensure that exe is executable if os.path.exists(exe) and not os.access(exe, os.X_OK): os.system('chmod +x %s ' % exe) elif (cwd and os.path.exists(pjoin(cwd, exe))) and not \ os.access(pjoin(cwd, exe), os.X_OK): os.system('chmod +x %s ' % pjoin(cwd, exe)) - + if mode == 0: - self.update_status((remaining, 1, + self.update_status((remaining, 1, self.total_jobs - remaining -1, run_type), level=None, force=False) start = time.time() #os.system('cd %s; ./%s' % (cwd,exe)) @@ -5613,24 +5613,24 @@ def launch_job(self,exe, cwd=None, stdout=None, argument = [], remaining=0, elif mode in [1,2]: exename = os.path.basename(exe) # For condor cluster, create the input/output files - if 'ajob' in exename: + if 'ajob' in exename: input_files = ['madevent','input_app.txt','symfact.dat','iproc.dat','dname.mg', pjoin(self.me_dir, 'SubProcesses','randinit')] - if os.path.exists(pjoin(self.me_dir,'SubProcesses', + if os.path.exists(pjoin(self.me_dir,'SubProcesses', 'MadLoop5_resources.tar.gz')) and cluster.need_transfer(self.options): input_files.append(pjoin(self.me_dir,'SubProcesses', 'MadLoop5_resources.tar.gz')) - + output_files = [] required_output = [] - + #Find the correct PDF input file input_files.append(self.get_pdf_input_filename()) - + #Find the correct ajob Gre = re.compile("\s*j=(G[\d\.\w]+)") origre = re.compile("grid_directory=(G[\d\.\w]+)") - try : + try : fsock = open(exe) except Exception: fsock = open(pjoin(cwd,exe)) @@ -5648,21 +5648,21 @@ def launch_job(self,exe, cwd=None, stdout=None, argument = [], remaining=0, if os.path.isdir(pjoin(cwd,G)): input_files.append(G) required_output.append('%s/results.dat' % G) - + if origre.search(text): G_grid = origre.search(text).groups()[0] input_files.append(pjoin(G_grid, 'ftn26')) - + #submitting - self.cluster.submit2(exe, stdout=stdout, cwd=cwd, + self.cluster.submit2(exe, stdout=stdout, cwd=cwd, input_files=input_files, output_files=output_files, required_output=required_output) elif 'survey' in exename: input_files = ['madevent','input_app.txt','symfact.dat','iproc.dat', 'dname.mg', - pjoin(self.me_dir, 'SubProcesses','randinit')] - if os.path.exists(pjoin(self.me_dir,'SubProcesses', + pjoin(self.me_dir, 'SubProcesses','randinit')] + if os.path.exists(pjoin(self.me_dir,'SubProcesses', 'MadLoop5_resources.tar.gz')) and cluster.need_transfer(self.options): - input_files.append(pjoin(self.me_dir,'SubProcesses', + input_files.append(pjoin(self.me_dir,'SubProcesses', 'MadLoop5_resources.tar.gz')) #Find the correct PDF input file @@ -5671,7 +5671,7 @@ def launch_job(self,exe, cwd=None, stdout=None, argument = [], remaining=0, output_files = [] required_output = [] - + #Find the correct ajob suffix = "_%s" % int(float(argument[0])) if suffix == '_0': @@ -5685,12 +5685,12 @@ def launch_job(self,exe, cwd=None, stdout=None, argument = [], remaining=0, if '.' in argument[0]: offset = int(str(argument[0]).split('.')[1]) else: - offset = 0 - + offset = 0 + if offset ==0 or offset == int(float(argument[0])): if os.path.exists(pjoin(cwd, G, 'input_app.txt')): os.remove(pjoin(cwd, G, 'input_app.txt')) - + if os.path.exists(os.path.realpath(pjoin(cwd, G, 'ftn25'))): if offset == 0 or offset == int(float(argument[0])): os.remove(pjoin(cwd, G, 'ftn25')) @@ -5706,16 +5706,16 @@ def launch_job(self,exe, cwd=None, stdout=None, argument = [], remaining=0, pass #submitting - self.cluster.cluster_submit(exe, stdout=stdout, cwd=cwd, argument=argument, + self.cluster.cluster_submit(exe, stdout=stdout, cwd=cwd, argument=argument, input_files=input_files, output_files=output_files, required_output=required_output, **opt) elif "refine_splitted.sh" in exename: input_files = ['madevent','symfact.dat','iproc.dat', 'dname.mg', - pjoin(self.me_dir, 'SubProcesses','randinit')] - + pjoin(self.me_dir, 'SubProcesses','randinit')] + if os.path.exists(pjoin(self.me_dir,'SubProcesses', 'MadLoop5_resources.tar.gz')) and cluster.need_transfer(self.options): - input_files.append(pjoin(self.me_dir,'SubProcesses', + input_files.append(pjoin(self.me_dir,'SubProcesses', 'MadLoop5_resources.tar.gz')) #Find the correct PDF input file @@ -5725,25 +5725,25 @@ def launch_job(self,exe, cwd=None, stdout=None, argument = [], remaining=0, output_files = [argument[0]] required_output = [] for G in output_files: - required_output.append('%s/results.dat' % G) + required_output.append('%s/results.dat' % G) input_files.append(pjoin(argument[1], "input_app.txt")) input_files.append(pjoin(argument[1], "ftn26")) - + #submitting - self.cluster.cluster_submit(exe, stdout=stdout, cwd=cwd, argument=argument, + self.cluster.cluster_submit(exe, stdout=stdout, cwd=cwd, argument=argument, input_files=input_files, output_files=output_files, - required_output=required_output, **opt) + required_output=required_output, **opt) + + - - else: self.cluster.submit(exe, argument=argument, stdout=stdout, cwd=cwd, **opt) - + ############################################################################ def find_madevent_mode(self): """Find if Madevent is in Group mode or not""" - + # The strategy is too look in the files Source/run_configs.inc # if we found: ChanPerJob=3 then it's a group mode. file_path = pjoin(self.me_dir, 'Source', 'run_config.inc') @@ -5752,11 +5752,11 @@ def find_madevent_mode(self): return 'group' else: return 'v4' - + ############################################################################ def monitor(self, run_type='monitor', mode=None, html=False): """ monitor the progress of running job """ - + starttime = time.time() if mode is None: @@ -5772,8 +5772,8 @@ def monitor(self, run_type='monitor', mode=None, html=False): else: update_status = lambda idle, run, finish: None update_first = None - try: - self.cluster.wait(self.me_dir, update_status, update_first=update_first) + try: + self.cluster.wait(self.me_dir, update_status, update_first=update_first) except Exception as error: logger.info(error) if not self.force: @@ -5788,24 +5788,24 @@ def monitor(self, run_type='monitor', mode=None, html=False): raise except KeyboardInterrupt as error: self.cluster.remove() - raise - - + raise + - ############################################################################ + + ############################################################################ def configure_directory(self, html_opening=True): - """ All action require before any type of run """ + """ All action require before any type of run """ # Basic check assert os.path.exists(pjoin(self.me_dir,'SubProcesses')) # environmental variables to be included in make_opts self.make_opts_var = {} - + #see when the last file was modified time_mod = max([os.path.getmtime(pjoin(self.me_dir,'Cards','run_card.dat')), os.path.getmtime(pjoin(self.me_dir,'Cards','param_card.dat'))]) - + if self.configured >= time_mod and hasattr(self, 'random') and hasattr(self, 'run_card'): #just ensure that cluster specific are correctly handled if self.cluster: @@ -5820,7 +5820,7 @@ def configure_directory(self, html_opening=True): #open only once the web page # Change current working directory self.launching_dir = os.getcwd() - + # Check if we need the MSSM special treatment model = self.find_model_name() if model == 'mssm' or model.startswith('mssm-'): @@ -5828,14 +5828,14 @@ def configure_directory(self, html_opening=True): mg5_param = pjoin(self.me_dir, 'Source', 'MODEL', 'MG5_param.dat') check_param_card.convert_to_mg5card(param_card, mg5_param) check_param_card.check_valid_param_card(mg5_param) - + # limit the number of event to 100k self.check_nb_events() # this is in order to avoid conflicts between runs with and without # lhapdf. not needed anymore the makefile handles it automaticallu #misc.compile(['clean4pdf'], cwd = pjoin(self.me_dir, 'Source')) - + self.make_opts_var['pdlabel1'] = '' self.make_opts_var['pdlabel2'] = '' if self.run_card['pdlabel1'] in ['eva', 'iww']: @@ -5866,7 +5866,7 @@ def configure_directory(self, html_opening=True): self.copy_lep_densities(self.run_card['pdlabel'], pjoin(self.me_dir, 'Source')) self.make_opts_var['pdlabel1'] = 'ee' self.make_opts_var['pdlabel2'] = 'ee' - + # set random number if self.run_card['iseed'] != 0: self.random = int(self.run_card['iseed']) @@ -5885,18 +5885,18 @@ def configure_directory(self, html_opening=True): break else: self.random = random.randint(1, 30107) - + #set random seed for python part of the code if self.run_card['python_seed'] == -2: #-2 means same as run_card import random if not hasattr(random, 'mg_seedset'): - random.seed(self.run_card['python_seed']) - random.mg_seedset = self.run_card['python_seed'] + random.seed(self.run_card['python_seed']) + random.mg_seedset = self.run_card['python_seed'] elif self.run_card['python_seed'] >= 0: import random if not hasattr(random, 'mg_seedset'): - random.seed(self.run_card['python_seed']) - random.mg_seedset = self.run_card['python_seed'] + random.seed(self.run_card['python_seed']) + random.mg_seedset = self.run_card['python_seed'] if self.run_card['ickkw'] == 2: logger.info('Running with CKKW matching') self.treat_ckkw_matching() @@ -5905,12 +5905,12 @@ def configure_directory(self, html_opening=True): self.update_make_opts(self.run_card) # reset list of Gdirectory self.Gdirs = None - + # create param_card.inc and run_card.inc self.do_treatcards('') - + logger.info("compile Source Directory") - + # Compile for name in [ 'all']:#, '../bin/internal/combine_events']: self.compile(arg=[name], cwd=os.path.join(self.me_dir, 'Source')) @@ -5933,7 +5933,7 @@ def configure_directory(self, html_opening=True): os.remove(pjoin(self.me_dir, 'lib','libbias.a')) force_subproc_clean = True - + # Finally compile the bias module as well if self.run_card['bias_module'] not in ['dummy',None]: logger.debug("Compiling the bias module '%s'"%bias_name) @@ -5945,7 +5945,7 @@ def configure_directory(self, html_opening=True): 'INVALID' in str(bias_module_valid).upper(): raise InvalidCmd("The bias module '%s' cannot be used because of:\n%s"% (bias_name,bias_module_valid)) - + self.compile(arg=[], cwd=os.path.join(self.me_dir, 'Source','BIAS',bias_name)) self.proc_characteristics['bias_module']=bias_name # Update the proc_characterstics file @@ -5954,7 +5954,7 @@ def configure_directory(self, html_opening=True): if force_subproc_clean: # Make sure that madevent will be recompiled - subproc = [l.strip() for l in open(pjoin(self.me_dir,'SubProcesses', + subproc = [l.strip() for l in open(pjoin(self.me_dir,'SubProcesses', 'subproc.mg'))] for nb_proc,subdir in enumerate(subproc): Pdir = pjoin(self.me_dir, 'SubProcesses',subdir.strip()) @@ -5971,20 +5971,20 @@ def configure_directory(self, html_opening=True): ############################################################################ @staticmethod def check_dir(path, default=''): - """check if the directory exists. if so return the path otherwise the + """check if the directory exists. if so return the path otherwise the default""" - + if os.path.isdir(path): return path else: return default - + ############################################################################ def get_Gdir(self, Pdir=None, symfact=None): """get the list of Gdirectory if not yet saved.""" - + if hasattr(self, "Gdirs") and self.Gdirs: if self.me_dir in self.Gdirs[0]: if Pdir is None: @@ -6000,8 +6000,8 @@ def get_Gdir(self, Pdir=None, symfact=None): Pdirs = self.get_Pdir() - Gdirs = {self.me_dir:[]} - mfactors = {} + Gdirs = {self.me_dir:[]} + mfactors = {} for P in Pdirs: Gdirs[P] = [] #for the next line do not use P, since in readonly mode it might not have symfact @@ -6012,7 +6012,7 @@ def get_Gdir(self, Pdir=None, symfact=None): mfactors[pjoin(P, "G%s" % tag)] = mfactor self.Gdirs = (Gdirs, mfactors) return self.get_Gdir(Pdir, symfact=symfact) - + ############################################################################ def set_run_name(self, name, tag=None, level='parton', reload_card=False, allow_new_tag=True): @@ -6030,8 +6030,8 @@ def get_last_tag(self, level): tagRun = self.results[self.run_name][i] if tagRun.pythia or tagRun.shower or tagRun.pythia8 : return tagRun['tag'] - - + + # when are we force to change the tag new_run:previous run requiring changes upgrade_tag = {'parton': ['parton','pythia','pgs','delphes','madanalysis5_hadron','madanalysis5_parton', 'rivet'], 'pythia': ['pythia','pgs','delphes','madanalysis5_hadron'], @@ -6044,7 +6044,7 @@ def get_last_tag(self, level): 'syscalc':[], 'rivet':['rivet']} - if name == self.run_name: + if name == self.run_name: if reload_card: run_card = pjoin(self.me_dir, 'Cards','run_card.dat') self.run_card = banner_mod.RunCard(run_card) @@ -6064,13 +6064,13 @@ def get_last_tag(self, level): break return get_last_tag(self, level) - + # save/clean previous run if self.run_name: self.store_result() # store new name self.run_name = name - + new_tag = False # First call for this run -> set the banner self.banner = banner_mod.recover_banner(self.results, level, name) @@ -6079,8 +6079,8 @@ def get_last_tag(self, level): else: # Read run_card run_card = pjoin(self.me_dir, 'Cards','run_card.dat') - self.run_card = banner_mod.RunCard(run_card) - + self.run_card = banner_mod.RunCard(run_card) + if tag: self.run_card['run_tag'] = tag new_tag = True @@ -6093,7 +6093,7 @@ def get_last_tag(self, level): self.results.update('add run %s' % name, 'all', makehtml=False) else: for tag in upgrade_tag[level]: - + if getattr(self.results[self.run_name][-1], tag): # LEVEL is already define in the last tag -> need to switch tag tag = self.get_available_tag() @@ -6103,8 +6103,8 @@ def get_last_tag(self, level): if not new_tag: # We can add the results to the current run tag = self.results[self.run_name][-1]['tag'] - self.run_card['run_tag'] = tag # ensure that run_tag is correct - + self.run_card['run_tag'] = tag # ensure that run_tag is correct + if allow_new_tag and (name in self.results and not new_tag): self.results.def_current(self.run_name) else: @@ -6113,15 +6113,15 @@ def get_last_tag(self, level): self.run_tag = self.run_card['run_tag'] return get_last_tag(self, level) - - - + + + ############################################################################ def check_nb_events(self): - """Find the number of event in the run_card, and check that this is not + """Find the number of event in the run_card, and check that this is not too large""" - + nb_event = int(self.run_card['nevents']) if nb_event > 1000000: logger.warning("Attempting to generate more than 1M events") @@ -6133,20 +6133,20 @@ def check_nb_events(self): return - - ############################################################################ + + ############################################################################ def update_random(self): """ change random number""" - + self.random += 3 if self.random > 30081*30081: # can't use too big random number raise MadGraph5Error('Random seed too large ' + str(self.random) + ' > 30081*30081') - if self.run_card['python_seed'] == -2: + if self.run_card['python_seed'] == -2: import random if not hasattr(random, 'mg_seedset'): - random.seed(self.random) + random.seed(self.random) random.mg_seedset = self.random - + ############################################################################ def save_random(self): """save random number in appropirate file""" @@ -6155,14 +6155,14 @@ def save_random(self): fsock.writelines('r=%s\n' % self.random) def do_quit(self, *args, **opts): - + return common_run.CommonRunCmd.do_quit(self, *args, **opts) #return CmdExtended.do_quit(self, *args, **opts) - + ############################################################################ def treat_CKKW_matching(self): """check for ckkw""" - + lpp1 = self.run_card['lpp1'] lpp2 = self.run_card['lpp2'] e1 = self.run_card['ebeam1'] @@ -6170,19 +6170,19 @@ def treat_CKKW_matching(self): pd = self.run_card['pdlabel'] lha = self.run_card['lhaid'] xq = self.run_card['xqcut'] - translation = {'e1': e1, 'e2':e2, 'pd':pd, + translation = {'e1': e1, 'e2':e2, 'pd':pd, 'lha':lha, 'xq':xq} if lpp1 or lpp2: - # Remove ':s from pd + # Remove ':s from pd if pd.startswith("'"): pd = pd[1:] if pd.endswith("'"): - pd = pd[:-1] + pd = pd[:-1] if xq >2 or xq ==2: xq = 2 - + # find data file if pd == "lhapdf": issudfile = 'lib/issudgrid-%(e1)s-%(e2)s-%(pd)s-%(lha)s-%(xq)s.dat.gz' @@ -6192,9 +6192,9 @@ def treat_CKKW_matching(self): issudfile = pjoin(self.webbin, issudfile % translation) else: issudfile = pjoin(self.me_dir, issudfile % translation) - + logger.info('Sudakov grid file: %s' % issudfile) - + # check that filepath exists if os.path.exists(issudfile): path = pjoin(self.me_dir, 'lib', 'issudgrid.dat') @@ -6203,20 +6203,20 @@ def treat_CKKW_matching(self): msg = 'No sudakov grid file for parameter choice. Start to generate it. This might take a while' logger.info(msg) self.update_status('GENERATE SUDAKOV GRID', level='parton') - + for i in range(-2,6): - self.cluster.submit('%s/gensudgrid ' % self.dirbin, + self.cluster.submit('%s/gensudgrid ' % self.dirbin, argument = ['%d'%i], - cwd=self.me_dir, + cwd=self.me_dir, stdout=open(pjoin(self.me_dir, 'gensudgrid%s.log' % i),'w')) self.monitor() for i in range(-2,6): path = pjoin(self.me_dir, 'lib', 'issudgrid.dat') os.system('cat %s/gensudgrid%s.log >> %s' % (self.me_dir, path)) misc.gzip(path, stdout=issudfile) - + ############################################################################ - def create_root_file(self, input='unweighted_events.lhe', + def create_root_file(self, input='unweighted_events.lhe', output='unweighted_events.root' ): """create the LHE root file """ self.update_status('Creating root files', level='parton') @@ -6233,14 +6233,14 @@ def create_root_file(self, input='unweighted_events.lhe', totar = False torm = True input = input[:-3] - + try: - misc.call(['%s/ExRootLHEFConverter' % eradir, + misc.call(['%s/ExRootLHEFConverter' % eradir, input, output], cwd=pjoin(self.me_dir, 'Events')) except Exception: logger.warning('fail to produce Root output [problem with ExRootAnalysis]') - + if totar: if os.path.exists('%s.gz' % input): try: @@ -6251,13 +6251,13 @@ def create_root_file(self, input='unweighted_events.lhe', misc.gzip(input) if torm: os.remove(input) - + def run_syscalc(self, mode='parton', event_path=None, output=None): - """create the syscalc output""" + """create the syscalc output""" if self.run_card['use_syst'] not in self.true: return - + scdir = self.options['syscalc_path'] if not scdir or not os.path.exists(scdir): return @@ -6265,12 +6265,12 @@ def run_syscalc(self, mode='parton', event_path=None, output=None): if self.run_card['event_norm'] != 'sum': logger.critical('SysCalc works only when event_norm is on \'sum\'.') return - logger.info('running SysCalc on mode %s' % mode) - + logger.info('running SysCalc on mode %s' % mode) + # Restore the old default for SysCalc+PY6 if self.run_card['sys_matchscale']=='auto': self.run_card['sys_matchscale'] = "30 50" - + # Check that all pdfset are correctly installed lhaid = [self.run_card.get_lhapdf_id()] if '&&' in self.run_card['sys_pdf']: @@ -6285,20 +6285,20 @@ def run_syscalc(self, mode='parton', event_path=None, output=None): logger.debug(str(error)) logger.warning('Systematic computation requires lhapdf to run. Bypass SysCalc') return - + # Copy all the relevant PDF sets [self.copy_lhapdf_set([onelha], pdfsets_dir) for onelha in lhaid] - + to_syscalc={'sys_scalefact': self.run_card['sys_scalefact'], 'sys_alpsfact': self.run_card['sys_alpsfact'], 'sys_matchscale': self.run_card['sys_matchscale'], 'sys_scalecorrelation': self.run_card['sys_scalecorrelation'], 'sys_pdf': self.run_card['sys_pdf']} - - tag = self.run_card['run_tag'] + + tag = self.run_card['run_tag'] card = pjoin(self.me_dir, 'bin','internal', 'syscalc_card.dat') template = open(pjoin(self.me_dir, 'bin','internal', 'syscalc_template.dat')).read() - + if '&&' in to_syscalc['sys_pdf']: to_syscalc['sys_pdf'] = to_syscalc['sys_pdf'].split('#',1)[0].replace('&&',' \n ') else: @@ -6311,8 +6311,8 @@ def run_syscalc(self, mode='parton', event_path=None, output=None): new.append(d) else: new[-1] += ' %s' % d - to_syscalc['sys_pdf'] = '\n'.join(new) - + to_syscalc['sys_pdf'] = '\n'.join(new) + if to_syscalc['sys_pdf'].lower() in ['', 'f', 'false', 'none', '.false.']: to_syscalc['sys_pdf'] = '' if to_syscalc['sys_alpsfact'].lower() in ['', 'f', 'false', 'none','.false.']: @@ -6320,17 +6320,17 @@ def run_syscalc(self, mode='parton', event_path=None, output=None): - + # check if the scalecorrelation parameter is define: if not 'sys_scalecorrelation' in self.run_card: self.run_card['sys_scalecorrelation'] = -1 open(card,'w').write(template % self.run_card) - + if not os.path.exists(card): return False - - + + event_dir = pjoin(self.me_dir, 'Events') if not event_path: @@ -6353,19 +6353,19 @@ def run_syscalc(self, mode='parton', event_path=None, output=None): raise SysCalcError('qcut value for sys_matchscale lower than qcut in pythia_card. Bypass syscalc') if float(value) < xqcut: raise SysCalcError('qcut value for sys_matchscale lower than xqcut in run_card. Bypass syscalc') - - + + event_path = pjoin(event_dir,'syst.dat') output = pjoin(event_dir, 'syscalc.dat') else: raise self.InvalidCmd('Invalid mode %s' % mode) - + if not os.path.exists(event_path): if os.path.exists(event_path+'.gz'): misc.gunzip(event_path+'.gz') else: raise SysCalcError('Events file %s does not exits' % event_path) - + self.update_status('Calculating systematics for %s level' % mode, level = mode.lower()) try: proc = misc.call([os.path.join(scdir, 'sys_calc'), @@ -6374,7 +6374,7 @@ def run_syscalc(self, mode='parton', event_path=None, output=None): stderr = subprocess.STDOUT, cwd=event_dir) # Wait 5 s to make sure file is finished writing - time.sleep(5) + time.sleep(5) except OSError as error: logger.error('fail to run syscalc: %s. Please check that SysCalc is correctly installed.' % error) else: @@ -6382,11 +6382,11 @@ def run_syscalc(self, mode='parton', event_path=None, output=None): logger.warning('SysCalc Failed. Please read the associate log to see the reason. Did you install the associate PDF set?') elif mode == 'parton': files.mv(output, event_path) - + self.update_status('End syscalc for %s level' % mode, level = mode.lower(), makehtml=False) - - return True + + return True action_switcher = AskRun @@ -6399,23 +6399,23 @@ def ask_run_configuration(self, mode=None, args=[]): passing_cmd.append('reweight=ON') if '-M' in args or '--madspin' in args: passing_cmd.append('madspin=ON') - + switch, cmd_switch = self.ask('', '0', [], ask_class = self.action_switcher, mode=mode, line_args=args, force=self.force, first_cmd=passing_cmd, return_instance=True) # - self.switch = switch # store the value of the switch for plugin purpose + self.switch = switch # store the value of the switch for plugin purpose if 'dynamical' in switch: mode = 'auto' - + # Now that we know in which mode we are check that all the card #exists (copy default if needed) - + cards = ['param_card.dat', 'run_card.dat'] if switch['shower'] == 'Pythia6': cards.append('pythia_card.dat') if switch['shower'] == 'Pythia8': - cards.append('pythia8_card.dat') + cards.append('pythia8_card.dat') if switch['detector'] in ['PGS','DELPHES+PGS']: cards.append('pgs_card.dat') if switch['detector'] in ['Delphes', 'DELPHES+PGS']: @@ -6438,29 +6438,29 @@ def ask_run_configuration(self, mode=None, args=[]): cards.append('rivet_card.dat') self.keep_cards(cards) - + first_cmd = cmd_switch.get_cardcmd() - + if os.path.isfile(pjoin(self.me_dir,'Cards','MadLoopParams.dat')): cards.append('MadLoopParams.dat') - + if self.force: self.check_param_card(pjoin(self.me_dir,'Cards','param_card.dat' )) return switch - + if 'dynamical' in switch and switch['dynamical']: self.ask_edit_cards(cards, plot=False, mode='auto', first_cmd=first_cmd) else: self.ask_edit_cards(cards, plot=False, first_cmd=first_cmd) return switch - + ############################################################################ def ask_pythia_run_configuration(self, mode=None, pythia_version=6, banner=None): """Ask the question when launching pythia""" - + pythia_suffix = '' if pythia_version==6 else '%d'%pythia_version - + available_mode = ['0', '1'] if pythia_version==6: available_mode.append('2') @@ -6485,10 +6485,10 @@ def ask_pythia_run_configuration(self, mode=None, pythia_version=6, banner=None) mode = self.ask(question, '0', options) elif not mode: mode = 'auto' - + if mode.isdigit(): mode = name[mode] - + auto = False if mode == 'auto': auto = True @@ -6497,7 +6497,7 @@ def ask_pythia_run_configuration(self, mode=None, pythia_version=6, banner=None) mode = 'pgs' elif os.path.exists(pjoin(self.me_dir, 'Cards', 'delphes_card.dat')): mode = 'delphes' - else: + else: mode = 'pythia%s'%pythia_suffix logger.info('Will run in mode %s' % mode) # Now that we know in which mode we are check that all the card @@ -6513,15 +6513,15 @@ def ask_pythia_run_configuration(self, mode=None, pythia_version=6, banner=None) cards.append('delphes_trigger.dat') self.keep_cards(cards, ignore=['madanalysis5_parton_card.dat','madanalysis5_hadron_card.dat', 'plot_card.dat']) - + if self.force: return mode - + if not banner: banner = self.banner - + if auto: - self.ask_edit_cards(cards, from_banner=['param', 'run'], + self.ask_edit_cards(cards, from_banner=['param', 'run'], mode='auto', plot=(pythia_version==6), banner=banner ) else: @@ -6529,12 +6529,12 @@ def ask_pythia_run_configuration(self, mode=None, pythia_version=6, banner=None) plot=(pythia_version==6), banner=banner) return mode - + #=============================================================================== # MadEventCmd #=============================================================================== class MadEventCmdShell(MadEventCmd, cmd.CmdShell): - """The command line processor of MadGraph""" + """The command line processor of MadGraph""" @@ -6548,11 +6548,11 @@ class SubProcesses(object): @classmethod def clean(cls): cls.name_to_pdg = {} - + @staticmethod def get_subP(me_dir): """return the list of Subprocesses""" - + out = [] for line in open(pjoin(me_dir,'SubProcesses', 'subproc.mg')): if not line: @@ -6560,9 +6560,9 @@ def get_subP(me_dir): name = line.strip() if os.path.exists(pjoin(me_dir, 'SubProcesses', name)): out.append(pjoin(me_dir, 'SubProcesses', name)) - + return out - + @staticmethod @@ -6623,9 +6623,9 @@ def get_subP_ids(path): particles = re.search("/([\d,-]+)/", line) all_ids.append([int(p) for p in particles.group(1).split(',')]) return all_ids - - -#=============================================================================== + + +#=============================================================================== class GridPackCmd(MadEventCmd): """The command for the gridpack --Those are not suppose to be use interactively--""" @@ -6639,7 +6639,7 @@ def __init__(self, me_dir = None, nb_event=0, seed=0, gran=-1, *completekey, **s self.random = seed self.random_orig = self.random self.granularity = gran - + self.options['automatic_html_opening'] = False #write the grid_card.dat on disk self.nb_event = int(nb_event) @@ -6680,7 +6680,7 @@ def write_RunWeb(self, me_dir): def write_gridcard(self, nb_event, seed, gran): """write the grid_card.dat file at appropriate location""" - + # first try to write grid_card within the gridpack. print("WRITE GRIDCARD", self.me_dir) if self.readonly: @@ -6689,35 +6689,35 @@ def write_gridcard(self, nb_event, seed, gran): fsock = open('grid_card.dat','w') else: fsock = open(pjoin(self.me_dir, 'Cards', 'grid_card.dat'),'w') - + gridpackcard = banner_mod.GridpackCard() gridpackcard['GridRun'] = True gridpackcard['gevents'] = nb_event gridpackcard['gseed'] = seed gridpackcard['ngran'] = gran - + gridpackcard.write(fsock) ############################################################################ def get_Pdir(self): """get the list of Pdirectory if not yet saved.""" - + if hasattr(self, "Pdirs"): if self.me_dir in self.Pdirs[0]: return self.Pdirs - + if not self.readonly: - self.Pdirs = [pjoin(self.me_dir, 'SubProcesses', l.strip()) + self.Pdirs = [pjoin(self.me_dir, 'SubProcesses', l.strip()) for l in open(pjoin(self.me_dir,'SubProcesses', 'subproc.mg'))] else: - self.Pdirs = [l.strip() - for l in open(pjoin(self.me_dir,'SubProcesses', 'subproc.mg'))] - + self.Pdirs = [l.strip() + for l in open(pjoin(self.me_dir,'SubProcesses', 'subproc.mg'))] + return self.Pdirs - + def prepare_local_dir(self): """create the P directory structure in the local directory""" - + if not self.readonly: os.chdir(self.me_dir) else: @@ -6726,7 +6726,7 @@ def prepare_local_dir(self): os.mkdir(p) files.cp(pjoin(self.me_dir,'SubProcesses',p,'symfact.dat'), pjoin(p, 'symfact.dat')) - + def launch(self, nb_event, seed): """ launch the generation for the grid """ @@ -6742,13 +6742,13 @@ def launch(self, nb_event, seed): if self.run_card['python_seed'] == -2: import random if not hasattr(random, 'mg_seedset'): - random.seed(seed) + random.seed(seed) random.mg_seedset = seed elif self.run_card['python_seed'] > 0: import random if not hasattr(random, 'mg_seedset'): - random.seed(self.run_card['python_seed']) - random.mg_seedset = self.run_card['python_seed'] + random.seed(self.run_card['python_seed']) + random.mg_seedset = self.run_card['python_seed'] # 2) Run the refine for the grid self.update_status('Generating Events', level=None) #misc.call([pjoin(self.me_dir,'bin','refine4grid'), @@ -6767,70 +6767,70 @@ def launch(self, nb_event, seed): self.exec_cmd('decay_events -from_cards', postcmd=False) elif self.run_card['use_syst'] and self.run_card['systematics_program'] == 'systematics': self.options['nb_core'] = 1 - self.exec_cmd('systematics %s --from_card' % + self.exec_cmd('systematics %s --from_card' % pjoin('Events', self.run_name, 'unweighted_events.lhe.gz'), postcmd=False,printcmd=False) - + def refine4grid(self, nb_event): """Special refine for gridpack run.""" self.nb_refine += 1 - + precision = nb_event self.opts = dict([(key,value[1]) for (key,value) in \ self._survey_options.items()]) - + # initialize / remove lhapdf mode # self.configure_directory() # All this has been done before self.cluster_mode = 0 # force single machine # Store seed in randinit file, to be read by ranmar.f self.save_random() - + self.update_status('Refine results to %s' % precision, level=None) logger.info("Using random number seed offset = %s" % self.random) refine_opt = {'err_goal': nb_event, 'split_channels': False, - 'ngran':self.granularity, 'readonly': self.readonly} + 'ngran':self.granularity, 'readonly': self.readonly} x_improve = gen_ximprove.gen_ximprove_gridpack(self, refine_opt) x_improve.launch() # create the ajob for the refinment and run those! - self.gscalefact = x_improve.gscalefact #store jacobian associate to the gridpack - - + self.gscalefact = x_improve.gscalefact #store jacobian associate to the gridpack + + #bindir = pjoin(os.path.relpath(self.dirbin, pjoin(self.me_dir,'SubProcesses'))) #print 'run combine!!!' #combine_runs.CombineRuns(self.me_dir) - + return #update html output Presults = sum_html.collect_result(self) cross, error = Presults.xsec, Presults.xerru self.results.add_detail('cross', cross) self.results.add_detail('error', error) - - + + #self.update_status('finish refine', 'parton', makehtml=False) #devnull.close() - - - + + + return self.total_jobs = 0 - subproc = [P for P in os.listdir(pjoin(self.me_dir,'SubProcesses')) if + subproc = [P for P in os.listdir(pjoin(self.me_dir,'SubProcesses')) if P.startswith('P') and os.path.isdir(pjoin(self.me_dir,'SubProcesses', P))] devnull = open(os.devnull, 'w') for nb_proc,subdir in enumerate(subproc): subdir = subdir.strip() Pdir = pjoin(self.me_dir, 'SubProcesses',subdir) bindir = pjoin(os.path.relpath(self.dirbin, Pdir)) - + logger.info(' %s ' % subdir) # clean previous run for match in misc.glob('*ajob*', Pdir): if os.path.basename(match)[:4] in ['ajob', 'wait', 'run.', 'done']: os.remove(pjoin(Pdir, match)) - + logfile = pjoin(Pdir, 'gen_ximprove.log') misc.call([pjoin(bindir, 'gen_ximprove')], @@ -6840,40 +6840,40 @@ def refine4grid(self, nb_event): if os.path.exists(pjoin(Pdir, 'ajob1')): alljobs = misc.glob('ajob*', Pdir) - nb_tot = len(alljobs) + nb_tot = len(alljobs) self.total_jobs += nb_tot for i, job in enumerate(alljobs): job = os.path.basename(job) - self.launch_job('%s' % job, cwd=Pdir, remaining=(nb_tot-i-1), + self.launch_job('%s' % job, cwd=Pdir, remaining=(nb_tot-i-1), run_type='Refine number %s on %s (%s/%s)' % (self.nb_refine, subdir, nb_proc+1, len(subproc))) if os.path.exists(pjoin(self.me_dir,'error')): self.monitor(html=True) raise MadEventError('Error detected in dir %s: %s' % \ (Pdir, open(pjoin(self.me_dir,'error')).read())) - self.monitor(run_type='All job submitted for refine number %s' % + self.monitor(run_type='All job submitted for refine number %s' % self.nb_refine) - + self.update_status("Combining runs", level='parton') try: os.remove(pjoin(Pdir, 'combine_runs.log')) except Exception: pass - + bindir = pjoin(os.path.relpath(self.dirbin, pjoin(self.me_dir,'SubProcesses'))) combine_runs.CombineRuns(self.me_dir) - + #update html output cross, error = self.make_make_all_html_results() self.results.add_detail('cross', cross) self.results.add_detail('error', error) - - + + self.update_status('finish refine', 'parton', makehtml=False) devnull.close() def do_combine_events(self, line): - """Advanced commands: Launch combine events""" + """Advanced commands: Launch combine events""" if self.readonly: outdir = 'Events' @@ -6895,17 +6895,17 @@ def do_combine_events(self, line): self.banner.add_generation_info(self.results.current['cross'], self.run_card['nevents']) if not hasattr(self, 'random_orig'): self.random_orig = 0 self.banner.change_seed(self.random_orig) - - + + if not os.path.exists(pjoin(outdir, self.run_name)): os.mkdir(pjoin(outdir, self.run_name)) - self.banner.write(pjoin(outdir, self.run_name, + self.banner.write(pjoin(outdir, self.run_name, '%s_%s_banner.txt' % (self.run_name, tag))) - - get_wgt = lambda event: event.wgt + + get_wgt = lambda event: event.wgt AllEvent = lhe_parser.MultiEventFile() AllEvent.banner = self.banner - + partials = 0 # if too many file make some partial unweighting sum_xsec, sum_xerru, sum_axsec = 0,[],0 Gdirs = self.get_Gdir() @@ -6915,7 +6915,7 @@ def do_combine_events(self, line): if os.path.exists(pjoin(Gdir, 'events.lhe')): result = sum_html.OneResult('') result.read_results(pjoin(Gdir, 'results.dat')) - AllEvent.add(pjoin(Gdir, 'events.lhe'), + AllEvent.add(pjoin(Gdir, 'events.lhe'), result.get('xsec')*gscalefact[Gdir], result.get('xerru')*gscalefact[Gdir], result.get('axsec')*gscalefact[Gdir] @@ -6924,7 +6924,7 @@ def do_combine_events(self, line): sum_xsec += result.get('xsec')*gscalefact[Gdir] sum_xerru.append(result.get('xerru')*gscalefact[Gdir]) sum_axsec += result.get('axsec')*gscalefact[Gdir] - + if len(AllEvent) >= 80: #perform a partial unweighting AllEvent.unweight(pjoin(outdir, self.run_name, "partials%s.lhe.gz" % partials), get_wgt, log_level=5, trunc_error=1e-2, event_target=self.nb_event) @@ -6933,26 +6933,26 @@ def do_combine_events(self, line): AllEvent.add(pjoin(outdir, self.run_name, "partials%s.lhe.gz" % partials), sum_xsec, math.sqrt(sum(x**2 for x in sum_xerru)), - sum_axsec) + sum_axsec) partials +=1 - + if not hasattr(self,'proc_characteristic'): self.proc_characteristic = self.get_characteristics() - + self.banner.add_generation_info(sum_xsec, self.nb_event) nb_event = AllEvent.unweight(pjoin(outdir, self.run_name, "unweighted_events.lhe.gz"), get_wgt, trunc_error=1e-2, event_target=self.nb_event, log_level=logging.DEBUG, normalization=self.run_card['event_norm'], proc_charac=self.proc_characteristic) - - + + if partials: for i in range(partials): try: os.remove(pjoin(outdir, self.run_name, "partials%s.lhe.gz" % i)) except Exception: os.remove(pjoin(outdir, self.run_name, "partials%s.lhe" % i)) - + self.results.add_detail('nb_event', nb_event) self.banner.add_generation_info(sum_xsec, nb_event) if self.run_card['bias_module'].lower() not in ['dummy', 'none']: @@ -6961,7 +6961,7 @@ def do_combine_events(self, line): class MadLoopInitializer(object): """ A container class for the various methods for initializing MadLoop. It is - placed in MadEventInterface because it is used by Madevent for loop-induced + placed in MadEventInterface because it is used by Madevent for loop-induced simulations. """ @staticmethod @@ -6974,7 +6974,7 @@ def make_and_run(dir_name,checkRam=False): if os.path.isfile(pjoin(dir_name,'check')): os.remove(pjoin(dir_name,'check')) os.remove(pjoin(dir_name,'check_sa.o')) - os.remove(pjoin(dir_name,'loop_matrix.o')) + os.remove(pjoin(dir_name,'loop_matrix.o')) # Now run make devnull = open(os.devnull, 'w') start=time.time() @@ -6996,7 +6996,7 @@ def make_and_run(dir_name,checkRam=False): stdout=devnull, stderr=devnull, close_fds=True) try: ptimer.execute() - #poll as often as possible; otherwise the subprocess might + #poll as often as possible; otherwise the subprocess might # "sneak" in some extra memory usage while you aren't looking # Accuracy of .2 seconds is enough for the timing. while ptimer.poll(): @@ -7028,7 +7028,7 @@ def fix_PSPoint_in_check(dir_path, read_ps = True, npoints = 1, If mu_r > 0.0, then the renormalization constant value will be hardcoded directly in check_sa.f, if is is 0 it will be set to Sqrt(s) and if it is < 0.0 the value in the param_card.dat is used. - If the split_orders target (i.e. the target squared coupling orders for + If the split_orders target (i.e. the target squared coupling orders for the computation) is != -1, it will be changed in check_sa.f via the subroutine CALL SET_COUPLINGORDERS_TARGET(split_orders).""" @@ -7043,12 +7043,12 @@ def fix_PSPoint_in_check(dir_path, read_ps = True, npoints = 1, file_path = pjoin(directories[0],'check_sa.f') if not os.path.isfile(file_path): raise MadGraph5Error('Could not find the location of check_sa.f'+\ - ' from the specified path %s.'%str(file_path)) + ' from the specified path %s.'%str(file_path)) file = open(file_path, 'r') check_sa = file.read() file.close() - + file = open(file_path, 'w') check_sa = re.sub(r"READPS = \S+\)","READPS = %s)"%('.TRUE.' if read_ps \ else '.FALSE.'), check_sa) @@ -7064,42 +7064,42 @@ def fix_PSPoint_in_check(dir_path, read_ps = True, npoints = 1, (("%.17e"%mu_r).replace('e','d')),check_sa) elif mu_r < 0.0: check_sa = re.sub(r"MU_R=SQRTS","",check_sa) - + if split_orders > 0: check_sa = re.sub(r"SET_COUPLINGORDERS_TARGET\(-?\d+\)", - "SET_COUPLINGORDERS_TARGET(%d)"%split_orders,check_sa) - + "SET_COUPLINGORDERS_TARGET(%d)"%split_orders,check_sa) + file.write(check_sa) file.close() - @staticmethod + @staticmethod def run_initialization(run_dir=None, SubProc_dir=None, infos=None,\ req_files = ['HelFilter.dat','LoopFilter.dat'], attempts = [4,15]): - """ Run the initialization of the process in 'run_dir' with success + """ Run the initialization of the process in 'run_dir' with success characterized by the creation of the files req_files in this directory. The directory containing the driving source code 'check_sa.f'. - The list attempt gives the successive number of PS points the + The list attempt gives the successive number of PS points the initialization should be tried with before calling it failed. Returns the number of PS points which were necessary for the init. Notice at least run_dir or SubProc_dir must be provided. A negative attempt number given in input means that quadprec will be forced for initialization.""" - + # If the user does not want detailed info, then set the dictionary # to a dummy one. if infos is None: infos={} - + if SubProc_dir is None and run_dir is None: raise MadGraph5Error('At least one of [SubProc_dir,run_dir] must'+\ ' be provided in run_initialization.') - + # If the user does not specify where is check_sa.f, then it is assumed # to be one levels above run_dir if SubProc_dir is None: SubProc_dir = os.path.abspath(pjoin(run_dir,os.pardir)) - + if run_dir is None: directories =[ dir for dir in misc.glob('P[0-9]*', SubProc_dir) if os.path.isdir(dir) ] @@ -7109,7 +7109,7 @@ def run_initialization(run_dir=None, SubProc_dir=None, infos=None,\ raise MadGraph5Error('Could not find a valid running directory'+\ ' in %s.'%str(SubProc_dir)) - # Use the presence of the file born_matrix.f to decide if it is a + # Use the presence of the file born_matrix.f to decide if it is a # loop-induced process or not. It's not crucial, but just that because # of the dynamic adjustment of the ref scale used for deciding what are # the zero contributions, more points are neeeded for loop-induced. @@ -7128,9 +7128,9 @@ def run_initialization(run_dir=None, SubProc_dir=None, infos=None,\ raise MadGraph5Error('Could not find MadLoopParams.dat at %s.'\ %MLCardPath) else: - MLCard = banner_mod.MadLoopParam(MLCardPath) + MLCard = banner_mod.MadLoopParam(MLCardPath) MLCard_orig = banner_mod.MadLoopParam(MLCard) - + # Make sure that LoopFilter really is needed. if not MLCard['UseLoopFilter']: try: @@ -7153,11 +7153,11 @@ def need_init(): proc_prefix+fname)) for fname in my_req_files]) or \ not os.path.isfile(pjoin(run_dir,'check')) or \ not os.access(pjoin(run_dir,'check'), os.X_OK) - + # Check if this is a process without born by checking the presence of the # file born_matrix.f is_loop_induced = os.path.exists(pjoin(run_dir,'born_matrix.f')) - + # For loop induced processes, always attempt quadruple precision if # double precision attempts fail and the user didn't specify himself # quadruple precision initializations attempts @@ -7166,11 +7166,11 @@ def need_init(): use_quad_prec = 1 curr_attempt = 1 - MLCard.set('WriteOutFilters',True) - + MLCard.set('WriteOutFilters',True) + while to_attempt!=[] and need_init(): curr_attempt = to_attempt.pop() - # if the attempt is a negative number it means we must force + # if the attempt is a negative number it means we must force # quadruple precision at initialization time if curr_attempt < 0: use_quad_prec = -1 @@ -7183,11 +7183,11 @@ def need_init(): MLCard.set('ZeroThres',1e-9) # Plus one because the filter are written on the next PS point after curr_attempt = abs(curr_attempt+1) - MLCard.set('MaxAttempts',curr_attempt) + MLCard.set('MaxAttempts',curr_attempt) MLCard.write(pjoin(SubProc_dir,'MadLoopParams.dat')) # initialization is performed. - MadLoopInitializer.fix_PSPoint_in_check(run_dir, read_ps = False, + MadLoopInitializer.fix_PSPoint_in_check(run_dir, read_ps = False, npoints = curr_attempt) compile_time, run_time, ram_usage = \ MadLoopInitializer.make_and_run(run_dir) @@ -7200,7 +7200,7 @@ def need_init(): infos['Process_compilation']==None: infos['Process_compilation'] = compile_time infos['Initialization'] = run_time - + MLCard_orig.write(pjoin(SubProc_dir,'MadLoopParams.dat')) if need_init(): return None @@ -7219,8 +7219,8 @@ def need_init(ML_resources_path, proc_prefix, r_files): MLCardPath = pjoin(proc_dir,'SubProcesses','MadLoopParams.dat') if not os.path.isfile(MLCardPath): raise MadGraph5Error('Could not find MadLoopParams.dat at %s.'\ - %MLCardPath) - MLCard = banner_mod.MadLoopParam(MLCardPath) + %MLCardPath) + MLCard = banner_mod.MadLoopParam(MLCardPath) req_files = ['HelFilter.dat','LoopFilter.dat'] # Make sure that LoopFilter really is needed. @@ -7234,9 +7234,9 @@ def need_init(ML_resources_path, proc_prefix, r_files): req_files.remove('HelFilter.dat') except ValueError: pass - + for v_folder in glob.iglob(pjoin(proc_dir,'SubProcesses', - '%s*'%subproc_prefix)): + '%s*'%subproc_prefix)): # Make sure it is a valid MadLoop directory if not os.path.isdir(v_folder) or not os.path.isfile(\ pjoin(v_folder,'loop_matrix.f')): @@ -7247,7 +7247,7 @@ def need_init(ML_resources_path, proc_prefix, r_files): if need_init(pjoin(proc_dir,'SubProcesses','MadLoop5_resources'), proc_prefix, req_files): return True - + return False @staticmethod @@ -7265,7 +7265,7 @@ def init_MadLoop(proc_dir, n_PS=None, subproc_prefix='PV', MG_options=None, misc.compile(arg=['treatCardsLoopNoInit'], cwd=pjoin(proc_dir,'Source')) else: interface.do_treatcards('all --no_MadLoopInit') - + # First make sure that IREGI and CUTTOOLS are compiled if needed if os.path.exists(pjoin(proc_dir,'Source','CutTools')): misc.compile(arg=['libcuttools'],cwd=pjoin(proc_dir,'Source')) @@ -7273,8 +7273,8 @@ def init_MadLoop(proc_dir, n_PS=None, subproc_prefix='PV', MG_options=None, misc.compile(arg=['libiregi'],cwd=pjoin(proc_dir,'Source')) # Then make sure DHELAS and MODEL are compiled misc.compile(arg=['libmodel'],cwd=pjoin(proc_dir,'Source')) - misc.compile(arg=['libdhelas'],cwd=pjoin(proc_dir,'Source')) - + misc.compile(arg=['libdhelas'],cwd=pjoin(proc_dir,'Source')) + # Now initialize the MadLoop outputs logger.info('Initializing MadLoop loop-induced matrix elements '+\ '(this can take some time)...') @@ -7283,7 +7283,7 @@ def init_MadLoop(proc_dir, n_PS=None, subproc_prefix='PV', MG_options=None, if MG_options: if interface and hasattr(interface, 'cluster') and isinstance(interface.cluster, cluster.MultiCore): mcore = interface.cluster - else: + else: mcore = cluster.MultiCore(**MG_options) else: mcore = cluster.onecore @@ -7294,10 +7294,10 @@ def run_initialization_wrapper(run_dir, infos, attempts): run_dir=run_dir, infos=infos) else: n_PS = MadLoopInitializer.run_initialization( - run_dir=run_dir, infos=infos, attempts=attempts) + run_dir=run_dir, infos=infos, attempts=attempts) infos['nPS'] = n_PS return 0 - + def wait_monitoring(Idle, Running, Done): if Idle+Running+Done == 0: return @@ -7307,21 +7307,21 @@ def wait_monitoring(Idle, Running, Done): init_info = {} # List all virtual folders while making sure they are valid MadLoop folders VirtualFolders = [f for f in glob.iglob(pjoin(proc_dir,'SubProcesses', - '%s*'%subproc_prefix)) if (os.path.isdir(f) or + '%s*'%subproc_prefix)) if (os.path.isdir(f) or os.path.isfile(pjoin(f,'loop_matrix.f')))] logger.debug("Now Initializing MadLoop matrix element in %d folder%s:"%\ (len(VirtualFolders),'s' if len(VirtualFolders)>1 else '')) - logger.debug(', '.join("'%s'"%os.path.basename(v_folder) for v_folder in + logger.debug(', '.join("'%s'"%os.path.basename(v_folder) for v_folder in VirtualFolders)) for v_folder in VirtualFolders: init_info[v_folder] = {} - + # We try all multiples of n_PS from 1 to max_mult, first in DP and then # in QP before giving up, or use default values if n_PS is None. max_mult = 3 if n_PS is None: # Then use the default list of number of PS points to try - mcore.submit(run_initialization_wrapper, + mcore.submit(run_initialization_wrapper, [pjoin(v_folder), init_info[v_folder], None]) else: # Use specific set of PS points @@ -7348,8 +7348,8 @@ def wait_monitoring(Idle, Running, Done): '%d PS points (%s), in %.3g(compil.) + %.3g(init.) secs.'%( abs(init['nPS']),'DP' if init['nPS']>0 else 'QP', init['Process_compilation'],init['Initialization'])) - - logger.info('MadLoop initialization finished.') + + logger.info('MadLoop initialization finished.') AskforEditCard = common_run.AskforEditCard @@ -7364,16 +7364,16 @@ def wait_monitoring(Idle, Running, Done): import os import optparse - # Get the directory of the script real path (bin) - # and add it to the current PYTHONPATH + # Get the directory of the script real path (bin) + # and add it to the current PYTHONPATH #root_path = os.path.dirname(os.path.dirname(os.path.dirname(os.path.realpath( __file__ )))) sys.path.insert(0, root_path) - class MyOptParser(optparse.OptionParser): + class MyOptParser(optparse.OptionParser): class InvalidOption(Exception): pass def error(self, msg=''): raise MyOptParser.InvalidOption(msg) - # Write out nice usage message if called with -h or --help + # Write out nice usage message if called with -h or --help usage = "usage: %prog [options] [FILE] " parser = MyOptParser(usage=usage) parser.add_option("-l", "--logging", default='INFO', @@ -7384,7 +7384,7 @@ def error(self, msg=''): help='force to launch debug mode') parser_error = '' done = False - + for i in range(len(sys.argv)-1): try: (options, args) = parser.parse_args(sys.argv[1:len(sys.argv)-i]) @@ -7394,7 +7394,7 @@ def error(self, msg=''): else: args += sys.argv[len(sys.argv)-i:] if not done: - # raise correct error: + # raise correct error: try: (options, args) = parser.parse_args() except MyOptParser.InvalidOption as error: @@ -7407,8 +7407,8 @@ def error(self, msg=''): import subprocess import logging import logging.config - # Set logging level according to the logging level given by options - #logging.basicConfig(level=vars(logging)[options.logging]) + # Set logging level according to the logging level given by options + #logging.basicConfig(level=vars(logging)[options.logging]) import internal import internal.coloring_logging # internal.file = XXX/bin/internal/__init__.py @@ -7431,13 +7431,13 @@ def error(self, msg=''): raise pass - # Call the cmd interface main loop + # Call the cmd interface main loop try: if args: # a single command is provided if '--web' in args: - i = args.index('--web') - args.pop(i) + i = args.index('--web') + args.pop(i) cmd_line = MadEventCmd(me_dir, force_run=True) else: cmd_line = MadEventCmdShell(me_dir, force_run=True) @@ -7457,13 +7457,13 @@ def error(self, msg=''): pass - - - - - - - - + + + + + + + + diff --git a/epochX/cudacpp/ee_mumu.mad/bin/internal/run_plot b/epochX/cudacpp/ee_mumu.mad/bin/internal/run_plot deleted file mode 100755 index 7deee7ac88..0000000000 --- a/epochX/cudacpp/ee_mumu.mad/bin/internal/run_plot +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash -# -# This runs MadAnalysis on the unweighted_events.lhe -# -# Usage: run_plot run_name [madir [tddir]] -# where madir is the path to the MadAnalysis package - -main=`pwd` - -if [ "$1" != "" ] -then - run=$1 -else - echo "Usage: run_plot runname [MAdir [tddir]]" - exit -fi - -if [ "$2" != "" ] -then - MAdir=$main/$2 -else - MAdir=$main/../../MadAnalysis -fi - -if [ "$3" != "" ]; then - td=$main/$3 -else - td=$main/../../td -fi - -dirbin=$main/../bin - -if [[ $run != "" && -e ${run}_unweighted_events.lhe.gz ]];then - gunzip -c ${run}_unweighted_events.lhe.gz > unweighted_events.lhe -fi - -if [[ (-x $MAdir/plot_events) && (-e unweighted_events.lhe) && (-e ../Cards/plot_card.dat) ]]; then - echo "Creating Plots" - mkdir $run - cd $run - echo "../unweighted_events.lhe" > events.list - $dirbin/plot $MAdir $td > plot.log - cd .. - $dirbin/plot_page-pl $run parton - mv plots.html ${run}_plots.html -fi - diff --git a/epochX/cudacpp/ee_mumu.mad/bin/internal/run_plot_delphes b/epochX/cudacpp/ee_mumu.mad/bin/internal/run_plot_delphes deleted file mode 100755 index 975f410d0e..0000000000 --- a/epochX/cudacpp/ee_mumu.mad/bin/internal/run_plot_delphes +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/bash -# -# This runs MadAnalysis on the delphes_events.lhco -# -# Usage: run_plot run_name [madir [tddir]] -# where madir is the path to the MadAnalysis package - -main=`pwd` - -if [ "$1" != "" ] -then - run=$1 -else - echo "Usage: run_plot runname [MAdir [tddir]]" - exit -fi - -if [ "$2" != "" ] -then - MAdir=$main/$2 -else - MAdir=$main/../../MadAnalysis -fi - -if [ "$3" != "" ]; then - td=$main/$3 -else - td=$main/../../td -fi - -dirbin=$main/../bin - -if [[ $run != "" && -e ${run}_delphes_events.lhco.gz ]];then - gunzip -c ${run}_delphes_events.lhco.gz > delphes_events.lhco -fi - -if [[ (-x $MAdir/plot_events) && (-e delphes_events.lhco) && (-e ../Cards/plot_card.dat) ]]; then - echo "Creating Plots" - mkdir ${run}_delphes - cd ${run}_delphes - echo "../delphes_events.lhco" > events.list - $dirbin/plot $MAdir $td > plot.log - cd .. - $dirbin/plot_page-pl ${run}_delphes Delphes - mv plots.html ${run}_plots_delphes.html -fi diff --git a/epochX/cudacpp/ee_mumu.mad/bin/internal/run_plot_pgs b/epochX/cudacpp/ee_mumu.mad/bin/internal/run_plot_pgs deleted file mode 100755 index e7a36ef344..0000000000 --- a/epochX/cudacpp/ee_mumu.mad/bin/internal/run_plot_pgs +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash -# -# This runs MadAnalysis on the unweighted_events.lhe -# -# Usage: run_plot run_name [madir [tddir]] -# where madir is the path to the MadAnalysis package - -main=`pwd` - -if [ "$1" != "" ] -then - run=$1 -else - echo "Usage: run_plot runname [MAdir [tddir]]" - exit -fi - -if [ "$2" != "" ] -then - MAdir=$main/$2 -else - MAdir=$main/../../MadAnalysis -fi - -if [ "$3" != "" ]; then - td=$main/$3 -else - td=$main/../../td -fi - -dirbin=$main/../bin - -if [[ $run != "" && -e ${run}_pgs_events.lhco.gz ]];then - gunzip -c ${run}_pgs_events.lhco.gz > pgs_events.lhco -fi - -if [[ (-x $MAdir/plot_events) && (-e pgs_events.lhco) && (-e ../Cards/plot_card.dat) ]]; then - echo "Creating Plots" - mkdir ${run}_pgs - cd ${run}_pgs - echo "../pgs_events.lhco" > events.list - $dirbin/plot $MAdir $td > plot.log - cd .. - $dirbin/plot_page-pl ${run}_pgs PGS - mv plots.html ${run}_plots_pgs.html -fi - diff --git a/epochX/cudacpp/ee_mumu.mad/bin/internal/run_plot_pythia b/epochX/cudacpp/ee_mumu.mad/bin/internal/run_plot_pythia deleted file mode 100755 index 532bfb4b7b..0000000000 --- a/epochX/cudacpp/ee_mumu.mad/bin/internal/run_plot_pythia +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/bash -# -# This runs MadAnalysis on the unweighted_events.lhe -# -# Usage: run_plot run_name [madir [tddir]] -# where madir is the path to the MadAnalysis package - -main=`pwd` - -if [ "$1" != "" ] -then - run=$1 -else - echo "Usage: run_plot runname [MAdir [tddir]]" - exit -fi - -if [ "$2" != "" ] -then - MAdir=$main/$2 -else - MAdir=$main/../../MadAnalysis -fi - -if [ "$3" != "" ]; then - td=$main/$3 -else - td=$main/../../td -fi - -dirbin=$main/../bin/internal - -if [[ $run != "" && -e ${run}_pythia_events.lhe.gz ]];then - gunzip -c ${run}_pythia_events.lhe.gz > pythia_events.lhe -fi - -if [[ (-x $MAdir/plot_events) && (-e pythia_events.lhe) && (-e ../Cards/plot_card.dat) ]]; then - echo "Creating Plots" - mkdir ${run}_pythia - cd ${run}_pythia - echo "../pythia_events.lhe" > events.list - $dirbin/plot $MAdir $td > plot.log - cd .. - $dirbin/plot_page-pl ${run}_pythia Pythia - mv plots.html ${run}_plots_pythia.html - $dirbin/gen_crossxhtml-pl $run -else - echo "Not creating plots" -fi - diff --git a/epochX/cudacpp/ee_mumu.mad/src/cudacpp_src.mk b/epochX/cudacpp/ee_mumu.mad/src/cudacpp_src.mk index c757875347..b4e446bc45 100644 --- a/epochX/cudacpp/ee_mumu.mad/src/cudacpp_src.mk +++ b/epochX/cudacpp/ee_mumu.mad/src/cudacpp_src.mk @@ -1,12 +1,7 @@ # Copyright (C) 2020-2023 CERN and UCLouvain. # Licensed under the GNU Lesser General Public License (version 3 or later). # Created by: S. Roiser (Feb 2020) for the MG5aMC CUDACPP plugin. -# Further modified by: J. Teig, O. Mattelaer, S. Roiser, A. Valassi (2020-2023) for the MG5aMC CUDACPP plugin. - -#=== Determine the name of this makefile (https://ftp.gnu.org/old-gnu/Manuals/make-3.80/html_node/make_17.html) -#=== NB: assume that the same name (e.g. cudacpp.mk, Makefile...) is used in the Subprocess and src directories - -THISMK = $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)) +# Further modified by: S. Hageboeck, J. Teig, O. Mattelaer, S. Roiser, A. Valassi (2020-2023) for the MG5aMC CUDACPP plugin. #------------------------------------------------------------------------------- @@ -16,167 +11,24 @@ SHELL := /bin/bash #------------------------------------------------------------------------------- -#=== Configure common compiler flags for CUDA and C++ - -INCFLAGS = -I. -OPTFLAGS = -O3 # this ends up in CUFLAGS too (should it?), cannot add -Ofast or -ffast-math here - -#------------------------------------------------------------------------------- - #=== Configure the C++ compiler -CXXFLAGS = $(OPTFLAGS) -std=c++17 $(INCFLAGS) $(USE_NVTX) -fPIC -Wall -Wshadow -Wextra +include ../Source/make_opts + +MG_CXXFLAGS += -fPIC -I. $(USE_NVTX) ifeq ($(shell $(CXX) --version | grep ^nvc++),) -CXXFLAGS+= -ffast-math # see issue #117 +MG_CXXFLAGS += -ffast-math # see issue #117 endif -###CXXFLAGS+= -Ofast # performance is not different from --fast-math -###CXXFLAGS+= -g # FOR DEBUGGING ONLY # Note: AR, CXX and FC are implicitly defined if not set externally # See https://www.gnu.org/software/make/manual/html_node/Implicit-Variables.html ###RANLIB = ranlib -# Add -mmacosx-version-min=11.3 to avoid "ld: warning: object file was built for newer macOS version than being linked" -LDFLAGS = -ifneq ($(shell $(CXX) --version | egrep '^Apple clang'),) -CXXFLAGS += -mmacosx-version-min=11.3 -LDFLAGS += -mmacosx-version-min=11.3 -endif - -#------------------------------------------------------------------------------- - -#=== Configure the CUDA compiler (note: NVCC is already exported including ccache) - -###$(info NVCC=$(NVCC)) - -#------------------------------------------------------------------------------- - -#=== Configure ccache for C++ builds (note: NVCC is already exported including ccache) - -# Enable ccache if USECCACHE=1 -ifeq ($(USECCACHE)$(shell echo $(CXX) | grep ccache),1) - override CXX:=ccache $(CXX) -endif -#ifeq ($(USECCACHE)$(shell echo $(AR) | grep ccache),1) -# override AR:=ccache $(AR) -#endif - -#------------------------------------------------------------------------------- - -#=== Configure PowerPC-specific compiler flags for CUDA and C++ - -# Assuming uname is available, detect if architecture is PowerPC -UNAME_P := $(shell uname -p) - -# PowerPC-specific CXX compiler flags (being reviewed) -ifeq ($(UNAME_P),ppc64le) - CXXFLAGS+= -mcpu=power9 -mtune=power9 # gains ~2-3% both for none and sse4 - # Throughput references without the extra flags below: none=1.41-1.42E6, sse4=2.15-2.19E6 - ###CXXFLAGS+= -DNO_WARN_X86_INTRINSICS # no change - ###CXXFLAGS+= -fpeel-loops # no change - ###CXXFLAGS+= -funroll-loops # gains ~1% for none, loses ~1% for sse4 - ###CXXFLAGS+= -ftree-vectorize # no change - ###CXXFLAGS+= -flto # BUILD ERROR IF THIS ADDED IN SRC?! -else - ###AR=gcc-ar # needed by -flto - ###RANLIB=gcc-ranlib # needed by -flto - ###CXXFLAGS+= -flto # NB: build error from src/Makefile unless gcc-ar and gcc-ranlib are used - ######CXXFLAGS+= -fno-semantic-interposition # no benefit (neither alone, nor combined with -flto) -endif - -#------------------------------------------------------------------------------- - #=== Set the CUDA/C++ compiler flags appropriate to user-defined choices of AVX, FPTYPE, HELINL, HRDCOD, RNDGEN # Set the build flags appropriate to OMPFLAGS ###$(info OMPFLAGS=$(OMPFLAGS)) -CXXFLAGS += $(OMPFLAGS) - -# Set the build flags appropriate to each AVX choice (example: "make AVX=none") -# [NB MGONGPU_PVW512 is needed because "-mprefer-vector-width=256" is not exposed in a macro] -# [See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96476] -ifeq ($(NVCC),) - $(info AVX=$(AVX)) - ifeq ($(UNAME_P),ppc64le) - ifeq ($(AVX),sse4) - override AVXFLAGS = -D__SSE4_2__ # Power9 VSX with 128 width (VSR registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on PowerPC for the moment) - endif - else ifeq ($(UNAME_P),arm) - ifeq ($(AVX),sse4) - override AVXFLAGS = -D__SSE4_2__ # ARM NEON with 128 width (Q/quadword registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on ARM for the moment) - endif - else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 - ifeq ($(AVX),none) - override AVXFLAGS = -mno-sse3 # no SIMD - else ifeq ($(AVX),sse4) - override AVXFLAGS = -mno-avx # SSE4.2 with 128 width (xmm registers) - else ifeq ($(AVX),avx2) - override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(AVX),512y) - override AVXFLAGS = -march=skylake -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(AVX),512z) - override AVXFLAGS = -march=skylake -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) - else - $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) - endif - else - ifeq ($(AVX),none) - override AVXFLAGS = -march=x86-64 # no SIMD (see #588) - else ifeq ($(AVX),sse4) - override AVXFLAGS = -march=nehalem # SSE4.2 with 128 width (xmm registers) - else ifeq ($(AVX),avx2) - override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(AVX),512y) - override AVXFLAGS = -march=skylake-avx512 -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(AVX),512z) - override AVXFLAGS = -march=skylake-avx512 -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) - endif - endif - # For the moment, use AVXFLAGS everywhere: eventually, use them only in encapsulated implementations? - CXXFLAGS+= $(AVXFLAGS) -endif - -# Set the build flags appropriate to each FPTYPE choice (example: "make FPTYPE=f") -###$(info FPTYPE=$(FPTYPE)) -ifeq ($(FPTYPE),d) - CXXFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_DOUBLE -else ifeq ($(FPTYPE),f) - CXXFLAGS += -DMGONGPU_FPTYPE_FLOAT -DMGONGPU_FPTYPE2_FLOAT -else ifeq ($(FPTYPE),m) - CXXFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_FLOAT -else - $(error Unknown FPTYPE='$(FPTYPE)': only 'd', 'f' and 'm' are supported) -endif - -# Set the build flags appropriate to each HELINL choice (example: "make HELINL=1") -###$(info HELINL=$(HELINL)) -ifeq ($(HELINL),1) - CXXFLAGS += -DMGONGPU_INLINE_HELAMPS -else ifneq ($(HELINL),0) - $(error Unknown HELINL='$(HELINL)': only '0' and '1' are supported) -endif - -# Set the build flags appropriate to each HRDCOD choice (example: "make HRDCOD=1") -###$(info HRDCOD=$(HRDCOD)) -ifeq ($(HRDCOD),1) - CXXFLAGS += -DMGONGPU_HARDCODE_PARAM -else ifneq ($(HRDCOD),0) - $(error Unknown HRDCOD='$(HRDCOD)': only '0' and '1' are supported) -endif - -# Set the build flags appropriate to each RNDGEN choice (example: "make RNDGEN=hasNoCurand") -###$(info RNDGEN=$(RNDGEN)) -ifeq ($(RNDGEN),hasNoCurand) - CXXFLAGS += -DMGONGPU_HAS_NO_CURAND -else ifneq ($(RNDGEN),hasCurand) - $(error Unknown RNDGEN='$(RNDGEN)': only 'hasCurand' and 'hasNoCurand' are supported) -endif +MG_CXXFLAGS += $(OMPFLAGS) #------------------------------------------------------------------------------- @@ -184,36 +36,18 @@ endif # Build directory "short" tag (defines target and path to the optional build directory) # (Rationale: keep directory names shorter, e.g. do not include random number generator choice) -ifneq ($(NVCC),) - override DIRTAG = cuda_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) -else - override DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) -endif +DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) # Build lockfile "full" tag (defines full specification of build options that cannot be intermixed) # (Rationale: avoid mixing of CUDA and no-CUDA environment builds with different random number generators) -ifneq ($(NVCC),) - override TAG = cuda_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) -else - override TAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) -endif +TAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) -# Build directory: current directory by default, or build.$(DIRTAG) if USEBUILDDIR==1 -###$(info Current directory is $(shell pwd)) -ifeq ($(USEBUILDDIR),1) - override BUILDDIR = build.$(DIRTAG) - override LIBDIRREL = ../lib/$(BUILDDIR) - ###$(info Building in BUILDDIR=$(BUILDDIR) for tag=$(TAG) (USEBUILDDIR=1 is set)) -else - override BUILDDIR = . - override LIBDIRREL = ../lib - ###$(info Building in BUILDDIR=$(BUILDDIR) for tag=$(TAG) (USEBUILDDIR is not set)) -endif -######$(info Building in BUILDDIR=$(BUILDDIR) for tag=$(TAG)) +# Build directory: +BUILDDIR := build.$(DIRTAG) +LIBDIRREL := ../lib/$(BUILDDIR) # Workaround for Mac #375 (I did not manage to fix rpath with @executable_path): use absolute paths for LIBDIR # (NB: this is quite ugly because it creates the directory if it does not exist - to avoid removing src by mistake) -UNAME_S := $(shell uname -s) ifeq ($(UNAME_S),Darwin) override LIBDIR = $(shell mkdir -p $(LIBDIRREL); cd $(LIBDIRREL); pwd) ifeq ($(wildcard $(LIBDIR)),) @@ -235,100 +69,41 @@ MG5AMC_COMMONLIB = mg5amc_common # First target (default goal) all.$(TAG): $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so -# Target (and build options): debug -debug: OPTFLAGS = -g -O0 -debug: all.$(TAG) - #------------------------------------------------------------------------------- # Generic target and build rules: objects from C++ compilation $(BUILDDIR)/%.o : %.cc *.h @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - $(CXX) $(CPPFLAGS) $(CXXFLAGS) -fPIC -c $< -o $@ + $(CXX) $(MG_CXXFLAGS) $(CXXFLAGS) -c $< -o $@ # Generic target and build rules: objects from CUDA compilation $(BUILDDIR)/%_cu.o : %.cc *.h @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c -x cu $< -o $@ + $(NVCC) $(MG_NVCCFLAGS) $(NVCCFLAGS) -c -x cu $< -o $@ #------------------------------------------------------------------------------- cxx_objects=$(addprefix $(BUILDDIR)/, Parameters_sm.o read_slha.o) -ifneq ($(NVCC),) +ifeq ($(AVX),cuda) +COMPILER=$(NVCC) cu_objects=$(addprefix $(BUILDDIR)/, Parameters_sm_cu.o) +else +COMPILER=$(CXX) +cu_objects= endif # Target (and build rules): common (src) library -ifneq ($(NVCC),) $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so : $(cxx_objects) $(cu_objects) - @if [ ! -d $(LIBDIR) ]; then echo "mkdir -p $(LIBDIR)"; mkdir -p $(LIBDIR); fi - $(NVCC) -shared -o $@ $(cxx_objects) $(cu_objects) $(LDFLAGS) -else -$(LIBDIR)/lib$(MG5AMC_COMMONLIB).so : $(cxx_objects) - @if [ ! -d $(LIBDIR) ]; then echo "mkdir -p $(LIBDIR)"; mkdir -p $(LIBDIR); fi - $(CXX) -shared -o $@ $(cxx_objects) $(LDFLAGS) -endif + mkdir -p $(LIBDIR) + $(COMPILER) -shared -o $@ $(cxx_objects) $(cu_objects) $(MG_LDFLAGS) $(LDFLAGS) #------------------------------------------------------------------------------- # Target: clean the builds .PHONY: clean -BUILD_DIRS := $(wildcard build.*) -NUM_BUILD_DIRS := $(words $(BUILD_DIRS)) - clean: -ifeq ($(USEBUILDDIR),1) -ifeq ($(NUM_BUILD_DIRS),1) - $(info USEBUILDDIR=1, only one src build directory found.) - rm -rf ../lib/$(BUILD_DIRS) - rm -rf $(BUILD_DIRS) -else ifeq ($(NUM_BUILD_DIRS),0) - $(error USEBUILDDIR=1, but no src build directories are found.) -else - $(error Multiple src BUILDDIR's found! Use 'cleannone', 'cleansse4', 'cleanavx2', 'clean512y','clean512z', 'cleancuda' or 'cleanall'.) -endif -else - rm -f ../lib/lib$(MG5AMC_COMMONLIB).so - rm -f $(BUILDDIR)/*.o $(BUILDDIR)/*.exe -endif - -cleanall: - @echo - rm -f ../lib/lib$(MG5AMC_COMMONLIB).so - rm -f $(BUILDDIR)/*.o $(BUILDDIR)/*.exe - @echo - rm -rf ../lib/build.* - rm -rf build.* - -# Target: clean different builds - -cleannone: - rm -rf ../lib/build.none_* - rm -rf build.none_* - -cleansse4: - rm -rf ../lib/build.sse4_* - rm -rf build.sse4_* - -cleanavx2: - rm -rf ../lib/build.avx2_* - rm -rf build.avx2_* - -clean512y: - rm -rf ../lib/build.512y_* - rm -rf build.512y_* - -clean512z: - rm -rf ../lib/build.512z_* - rm -rf build.512z_* - -cleancuda: - rm -rf ../lib/build.cuda_* - rm -rf build.cuda_* - -cleandir: - rm -f ./*.o ./*.exe - rm -f ../lib/lib$(MG5AMC_COMMONLIB).so + $(RM) -f ../lib/build.*/*.so + $(RM) -rf build.* #------------------------------------------------------------------------------- diff --git a/epochX/cudacpp/ee_mumu.mad/src/mgOnGpuCxtypes.h b/epochX/cudacpp/ee_mumu.mad/src/mgOnGpuCxtypes.h index ca9a9f00c0..3290d314d6 100644 --- a/epochX/cudacpp/ee_mumu.mad/src/mgOnGpuCxtypes.h +++ b/epochX/cudacpp/ee_mumu.mad/src/mgOnGpuCxtypes.h @@ -21,10 +21,14 @@ // Complex type in cuda: thrust or cucomplex or cxsmpl #ifdef __CUDACC__ #if defined MGONGPU_CUCXTYPE_THRUST +#ifdef __CLANG__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" // for icpx2021/clang13 (https://stackoverflow.com/a/15864661) +#endif #include +#ifdef __CLANG__ #pragma clang diagnostic pop +#endif #elif defined MGONGPU_CUCXTYPE_CUCOMPLEX #include #elif not defined MGONGPU_CUCXTYPE_CXSMPL diff --git a/epochX/cudacpp/gg_tt.mad/CODEGEN_mad_gg_tt_log.txt b/epochX/cudacpp/gg_tt.mad/CODEGEN_mad_gg_tt_log.txt index 3326a8488f..940d9f47b2 100644 --- a/epochX/cudacpp/gg_tt.mad/CODEGEN_mad_gg_tt_log.txt +++ b/epochX/cudacpp/gg_tt.mad/CODEGEN_mad_gg_tt_log.txt @@ -50,10 +50,9 @@ Please set the 'lhapdf' variable to the (absolute) /PATH/TO/lhapdf-config (inclu Note that you can still compile and run aMC@NLO with the built-in PDFs MG5_aMC> set lhapdf /PATH/TO/lhapdf-config -Using default text editor "vi". Set another one in ./input/mg5_configuration.txt Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt -No valid web browser found. Please set in ./input/mg5_configuration.txt -import /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt.mg +Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt +import /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt.mg The import format was not given, so we guess it as command set stdout_level DEBUG set output information to level: 10 @@ -62,7 +61,7 @@ generate g g > t t~ No model currently active, so we import the Standard Model INFO: load particles INFO: load vertices -DEBUG: model prefixing takes 0.005394458770751953  +DEBUG: model prefixing takes 0.003480195999145508  INFO: Restrict model sm with file models/sm/restrict_default.dat . DEBUG: Simplifying conditional expressions  DEBUG: remove interactions: u s w+ at order: QED=1  @@ -155,7 +154,7 @@ INFO: Please specify coupling orders to bypass this step. INFO: Trying coupling order WEIGHTED<=2: WEIGTHED IS QCD+2*QED INFO: Trying process: g g > t t~ WEIGHTED<=2 @1 INFO: Process has 3 diagrams -1 processes with 3 diagrams generated in 0.008 s +1 processes with 3 diagrams generated in 0.006 s Total: 1 processes with 3 diagrams output madevent ../TMPOUT/CODEGEN_mad_gg_tt --hel_recycling=False --vector_size=32 --me_exporter=standalone_cudacpp Load PLUGIN.CUDACPP_OUTPUT @@ -166,16 +165,16 @@ Load PLUGIN.CUDACPP_OUTPUT INFO: initialize a new directory: CODEGEN_mad_gg_tt INFO: remove old information in CODEGEN_mad_gg_tt DEBUG: Entering PLUGIN_ProcessExporter.copy_template (initialise the directory) [output.py at line 165]  -WARNING: File exists /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt  -INFO: Creating subdirectories in directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt -WARNING: File exists /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/Cards  -WARNING: File exists /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/SubProcesses  +WARNING: File exists /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt  +INFO: Creating subdirectories in directory /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt +WARNING: File exists /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/Cards  +WARNING: File exists /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/SubProcesses  INFO: Organizing processes into subprocess groups INFO: Generating Helas calls for process: g g > t t~ WEIGHTED<=2 @1 INFO: Processing color information for process: g g > t t~ @1 INFO: Creating files in directory P1_gg_ttx DEBUG: kwargs[prefix] = 0 [model_handling.py at line 1058]  -DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  +DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  INFO: Creating files in directory . FileWriter for ././CPPProcess.h FileWriter for ././CPPProcess.cc @@ -190,56 +189,65 @@ INFO: Created files CPPProcess.h and CPPProcess.cc in directory ./. DEBUG: vector, subproc_group,self.opt['vector_size'] =  32 True 32 [export_v4.py at line 1872]  INFO: Generating Feynman diagrams for Process: g g > t t~ WEIGHTED<=2 @1 INFO: Finding symmetric diagrams for subprocess group gg_ttx -Generated helas calls for 1 subprocesses (3 diagrams) in 0.006 s -Wrote files for 10 helas calls in 0.102 s +Generated helas calls for 1 subprocesses (3 diagrams) in 0.005 s +Wrote files for 10 helas calls in 0.079 s ALOHA: aloha starts to compute helicity amplitudes ALOHA: aloha creates VVV1 set of routines with options: P0 ALOHA: aloha creates FFV1 routines -ALOHA: aloha creates 2 routines in 0.142 s +ALOHA: aloha creates 2 routines in 0.101 s DEBUG: Entering PLUGIN_ProcessExporter.convert_model (create the model) [output.py at line 202]  ALOHA: aloha starts to compute helicity amplitudes ALOHA: aloha creates VVV1 set of routines with options: P0 ALOHA: aloha creates FFV1 routines -ALOHA: aloha creates 4 routines in 0.138 s +ALOHA: aloha creates 4 routines in 0.085 s VVV1 FFV1 FFV1 FFV1 -FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/src/./HelAmps_sm.h -INFO: Created file HelAmps_sm.h in directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/src/. +FileWriter for /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/src/./HelAmps_sm.h +INFO: Created file HelAmps_sm.h in directory /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/src/. super_write_set_parameters_onlyfixMajorana (hardcoded=False) super_write_set_parameters_onlyfixMajorana (hardcoded=True) -FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/src/./Parameters_sm.h -FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/src/./Parameters_sm.cc +FileWriter for /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/src/./Parameters_sm.h +FileWriter for /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/src/./Parameters_sm.cc INFO: Created files Parameters_sm.h and Parameters_sm.cc in directory -INFO: /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/src/. and /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/src/. +INFO: /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/src/. and /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/src/. The option zerowidth_tchannel is modified [True] but will not be written in the configuration files. If you want to make this value the default for future session, you can run 'save options --all' -save configuration file to /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/Cards/me5_configuration.txt +save configuration file to /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/Cards/me5_configuration.txt INFO: Use Fortran compiler gfortran INFO: Use c++ compiler g++ INFO: Generate web pages -DEBUG: cd /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt; patch -p4 -i /data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common +DEBUG: cd /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt; patch -p4 -i /data/stephan/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common patching file Source/genps.inc +patching file Source/make_opts +Hunk #1 succeeded at 12 (offset -1 lines). +Hunk #2 succeeded at 70 (offset -1 lines). +Hunk #3 succeeded at 117 (offset -1 lines). +Hunk #4 succeeded at 128 (offset -1 lines). patching file Source/makefile patching file SubProcesses/makefile +patching file bin/internal/banner.py patching file bin/internal/gen_ximprove.py -Hunk #1 succeeded at 391 (offset 6 lines). patching file bin/internal/madevent_interface.py -DEBUG: cd /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/SubProcesses/P1_gg_ttx; patch -p6 -i /data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 +DEBUG: cd /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/SubProcesses/P1_gg_ttx; patch -p6 -i /data/stephan/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 patching file auto_dsig1.f patching file driver.f patching file matrix1.f +Hunk #2 succeeded at 143 (offset -16 lines). +Hunk #3 succeeded at 221 (offset -16 lines). +Hunk #4 succeeded at 249 (offset -16 lines). +Hunk #5 succeeded at 294 (offset -16 lines). DEBUG: p.returncode =  0 [output.py at line 237]  -Output to directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt done. +Output to directory /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt done. Type "launch" to generate events from this process, or see -/data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/README +/data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/README Run "open index.html" to see more information about this process. quit -real 0m1.677s -user 0m1.453s -sys 0m0.213s +real 0m1.366s +user 0m1.060s +sys 0m0.308s ************************************************************ * * * W E L C O M E to * @@ -260,12 +268,11 @@ sys 0m0.213s * Type 'help' for in-line help. * * * ************************************************************ -INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/Cards/me5_configuration.txt -INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo/input/mg5_configuration.txt -INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/Cards/me5_configuration.txt -Using default text editor "vi". Set another one in ./input/mg5_configuration.txt +INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/Cards/me5_configuration.txt +INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/mg5amcnlo/input/mg5_configuration.txt +INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/Cards/me5_configuration.txt Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt -No valid web browser found. Please set in ./input/mg5_configuration.txt +Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt treatcards run quit INFO: @@ -290,12 +297,11 @@ launch in debug mode * Type 'help' for in-line help. * * * ************************************************************ -INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/Cards/me5_configuration.txt -INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo/input/mg5_configuration.txt -INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/Cards/me5_configuration.txt -Using default text editor "vi". Set another one in ./input/mg5_configuration.txt +INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/Cards/me5_configuration.txt +INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/mg5amcnlo/input/mg5_configuration.txt +INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/Cards/me5_configuration.txt Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt -No valid web browser found. Please set in ./input/mg5_configuration.txt +Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt treatcards param quit INFO: diff --git a/epochX/cudacpp/gg_tt.mad/Cards/delphes_trigger.dat b/epochX/cudacpp/gg_tt.mad/Cards/delphes_trigger.dat deleted file mode 100644 index 0aab0677aa..0000000000 --- a/epochX/cudacpp/gg_tt.mad/Cards/delphes_trigger.dat +++ /dev/null @@ -1,20 +0,0 @@ -#TRIGGER CARD # DO NOT REMOVE THIS IS A TAG! - -# list of trigger algorithms -# trigger_name >> algorithm #comments -Inclusive electron >> ELEC1_PT: '29' -di-electron >> ELEC1_PT: '17' && ELEC2_PT: '17' -Inclusive Photon >> GAMMA1_PT: '80' -di-Photon >> GAMMA1_PT: '40' && GAMMA2_PT: '25' -Inclusive muon >> MUON1_PT: '19' -di-muon >> MUON1_PT: '7' && MUON2_PT: '7' -Taujet and ETmis >> TAU1_PT: '86' && ETMIS_PT: '65' -di-Taujets >> TAU1_PT: '59' && TAU2_PT: '59' -Jet and ETmis >> JET1_PT: '180' && ETMIS_PT: '123' -Taujet and electron >> TAU1_PT: '45' && ELEC1_PT: '19' -Taujet and muon >> TAU1_PT: '40' && ELEC1_PT: '15' -Inclusive b-jet >> Bjet1_PT: '237' -Inclusive 1 jet >> JET1_PT: '657' -Inclusive 3 jets >> JET1_PT: '247' && JET2_PT: '247' && JET3_PT: '247' -Inclusive 4 jets >> JET1_PT: '113' && JET2_PT: '113' && JET3_PT: '113' && JET4_PT: '113' - diff --git a/epochX/cudacpp/gg_tt.mad/Cards/me5_configuration.txt b/epochX/cudacpp/gg_tt.mad/Cards/me5_configuration.txt index cdeedc7863..22f81b5926 100644 --- a/epochX/cudacpp/gg_tt.mad/Cards/me5_configuration.txt +++ b/epochX/cudacpp/gg_tt.mad/Cards/me5_configuration.txt @@ -234,7 +234,7 @@ # pineappl = pineappl -#mg5_path = /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo +#mg5_path = /data/stephan/madgraph4gpu/MG5aMC/mg5amcnlo # MG5 MAIN DIRECTORY -#mg5_path = /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo +#mg5_path = /data/stephan/madgraph4gpu/MG5aMC/mg5amcnlo diff --git a/epochX/cudacpp/gg_tt.mad/Cards/plot_card.dat b/epochX/cudacpp/gg_tt.mad/Cards/plot_card.dat deleted file mode 100644 index 9abe1cc05e..0000000000 --- a/epochX/cudacpp/gg_tt.mad/Cards/plot_card.dat +++ /dev/null @@ -1,203 +0,0 @@ -#************************************************************************** -# Card for MadAnalysis * -# * -# This file is used to set the classes and options for * -# the MadAnalysis program. * -# * -# * -# Some comments about the classes * -# 1. Plots are for classes of particles. * -# 2. Each particle is identified by its PDG code. * -# 3. Classes names are arbitrary (4 symbols max, no spaces allowed). * -# 4. Particles in the same class will be ordered with the 'ordering * -# function' in the file in_func.f. * -# 5. Classes can be added/edited/removed at will, and given a name * -# that will then appear in the plots. * -# 6. A particle can be put in one class only. Putting a particle in * -# two or more classes can lead to double counting of events. * -# 7. The class name mET is missing Energy and its name is reserved. * -# If used, it must be put last in the classes list below. * -# 8. If events contain particles not belonging to an existing class, * -# a new class will automatically be generated. * -# 9. For LHCO events the PDG code 21 is assigned to a jet (not * -# b-tagged), 5 to a b-tagged jet and 12 to missing ET. * -# * -# * -# Some comments about the cuts * -# 1. In the file kin_func.f the functions on which cuts can be applied * -# are given. * -# 2. The syntax is as follows. * -# etmin 1 3 30d0 * -# means that from the first class the Et of the first three particles * -# has to be greater than 30 GeV. * -# * -# etmissmin 20d0 * -# means that there must be at least 20 GeV of missing Et * -# * -# dRmin 2 1 4 3 3d0 * -# means that the distance between the first particle in the second * -# class and the first three particles in the fourth class has to be * -# greater than 3. * -# * -# ptmax 1 3 10d0 * -# ptmax 1 2 15d0 * -# means that the maximum pt of the third particle in the first class * -# has to smaller than 10 GeV, and the first two particles of this * -# class has to be smaller than 15 GeV * -# 3. The ordering of the particles within a class can be set with the * -# 'ordering function' in the file kin_func.f. * -# 4. For all the 'min' cuts, an event will be thrown away if the particle * -# does not exist. On the other hand, for all the 'max' cuts the cut * -# will be ignored if the particle does not exist * -# (Only dRij is an exception, for which it is the other way around) * -# * -# * -# * -# Some comments about the plotting options * -# 1. In the file kin_func.f the functions can be found that can be * -# plotted. (only for off-line usage) * -# 2. With the plotting options one can set the number of plots for each * -# of these functions. * -# 3. One has to specify for each variable which particles from which * -# class are used to set the plots. Syntax: * -# et 2 4 * -# means that the transverse energy of the first four particles in the * -# second class will be plotted. * -# mij 1 3 * -# mij 2 2 * -# means that for the invariant mass plots the first three particles * -# from the first class and the first two from the second class will be * -# used to plot the invariant mass of two particles. (10 plots) * -# 4. The ordering of the particles in a class can be set with the * -# 'ordering_function'. pt, e and et are valid functions. (For off-line * -# users X1, X2 and X3 can also be used, if defined in kin_func.f.) * -# 5. Max number of plots is 200. * -# * -# * -#************************************************************************** -# Put here your list of classes -#************************************************************************** -# Do NOT put spaces before class names! -# Begin Classes # This is TAG. Do not modify this line -jet 1 -1 2 -2 3 -3 4 -4 21 # Class number 1 -b 5 -5 # Class number 2 -mET 12 -12 14 -14 16 -16 1000022 # Missing ET class, name is reserved -# End Classes # This is TAG. Do not modify this line -#************************************************************************** -ordering_function pt # orders particles in classes according to their pt -normalization xsec # histogram normalization, xsec or number (e.g. 1) -#************************************************************************** -# Put here list of minimum pt for the classes -#************************************************************************** -# Begin Minpts # This is TAG. Do not modify this line -#1 30 -#2 40 -#3 10 -# End Minpts # This is TAG. Do not modify this line -#************************************************************************** -# Cuts on plotted events -#************************************************************************** -# Modify the cuts and remove the pounds/hashes to apply those cuts -# Do NOT put spaces at the beginning of the following lines! -# Begin Cuts # This is TAG. Do not modify this line -#etmin 2 2 40d0 -#etmin 2 1 80d0 -#etmin 1 3 20d0 -#etmax 2 1 200d0 -#ptmin 3 1 0d0 -#etmissmin 20d0 -#etmissmax 80d0 -#etamax 1 1 1d0 -#etamax 2 1 2d0 -#etamin 2 2 1.5d0 -#etamin 2 1 2d0 -#mijmax 2 1 2 2 200d0 -#mijmin 2 1 2 2 100d0 -#X1min 2 1 40d0 -#X1max 2 2 50d0 -#dRijmin 2 1 2 2 0.7d0 -#dRijmax 1 3 2 2 0.7d0 -#XY1min 2 2 2 2 20d0 -#XYZA2max 2 2 2 2 4 1 5 1 40d0 -# End Cuts # This is TAG. Do not modify this line -#************************************************************************** -# Put here the required plots -#************************************************************************** -# Do NOT put spaces at the beginning of the following lines! -# Begin PlotDefs # This is TAG. Do not modify this line -pt 1 4 # plot pt for the first four particles in class 1 -pt 2 4 # plot pt for the first four particles in class 2 -pt 3 4 # plot pt for the first four particles in class 3 -pt 4 4 # plot pt for the first four particles in class 4 -pt 5 4 # etc. -pt 6 4 -pt 7 4 -#e 2 2 -y 1 4 # plot rapidity for the first four particles in class 1 -y 2 4 -y 3 4 -y 4 4 -y 5 4 -y 6 4 -y 7 4 -#eta 2 2 # plot pseudo-rapidity for the first two part in the 2nd class -#mom 4 1 -#costh 5 1 -#phi 2 2 -#delta_eta 2 2 -#delta_eta 4 1 -mij 1 4 # use the first four particles in the 1st class to plot inv. mass -mij 2 2 # use the first two particles from the second class as well -mij 3 1 # etc. -mij 4 1 -mij 5 1 -mij 6 1 -mij 7 1 -#cosij 1 2 -#cosij 2 2 -#cosij 3 1 -#cosij 4 1 -dRij 1 4 -dRij 2 2 -dRij 3 1 -dRij 4 1 -dRij 5 1 -dRij 6 1 -dRij 7 1 -#delta_phi 2 2 -#delta_phi 4 1 -#delta_phi 5 1 -#X1 2 2 # plot X1 (defined in kin_func.f) -#XYZA1 2 2 -#XYZA1 4 1 -#XYZA1 5 1 -# End PlotDefs # This is TAG. Do not modify this line -#************************************************************************** -#************************************************************************** -# Put here the plot ranges -#************************************************************************** -# Do NOT put spaces at the beginning of the following lines! -# Begin PlotRange # This is TAG. Do not modify this line -pt 10 0 500 # bin size, min value, max value -et 10 0 500 # bin size, min value, max value -etmiss 10 0 500 # bin size, min value, max value -ht 20 0 1500 -y 0.2 -5 5 # etc. -mij 20 0 1500 -dRij 0.1 0 5 -#delta_phi 0.1 0 3.1 -#X1 1 0 100 -#XYZA1 1 0 100 -# End PlotRange # This is TAG. Do not modify this line -#************************************************************************** -#************************************************************************** -# Output for plots -#************************************************************************** -# Do NOT put spaces at the beginning of the following lines! -# Begin PlotOutput # This is TAG. Do not modify this line -output topdrawer # set to topdrawer or gnuplot -plot_decayed no # plot (and cut) dec. res.? (Only for LHE events) -# End PlotOutput # This is TAG. Do not modify this line -#************************************************************************** -# -# diff --git a/epochX/cudacpp/gg_tt.mad/Source/DHELAS/aloha_file.inc b/epochX/cudacpp/gg_tt.mad/Source/DHELAS/aloha_file.inc index eaf8cc8601..3a21194b00 100644 --- a/epochX/cudacpp/gg_tt.mad/Source/DHELAS/aloha_file.inc +++ b/epochX/cudacpp/gg_tt.mad/Source/DHELAS/aloha_file.inc @@ -1 +1 @@ -ALOHARoutine = VVV1P0_1.o FFV1_0.o FFV1_1.o FFV1_2.o +ALOHARoutine = FFV1_0.o FFV1_1.o FFV1_2.o VVV1P0_1.o diff --git a/epochX/cudacpp/gg_tt.mad/Source/make_opts b/epochX/cudacpp/gg_tt.mad/Source/make_opts index e4b87ee6ad..435bed0dc7 100644 --- a/epochX/cudacpp/gg_tt.mad/Source/make_opts +++ b/epochX/cudacpp/gg_tt.mad/Source/make_opts @@ -1,7 +1,7 @@ DEFAULT_CPP_COMPILER=g++ DEFAULT_F2PY_COMPILER=f2py3 DEFAULT_F_COMPILER=gfortran -GLOBAL_FLAG=-O3 -ffast-math -fbounds-check +GLOBAL_FLAG=-O3 -ffast-math MACFLAG= MG5AMC_VERSION=SpecifiedByMG5aMCAtRunTime PYTHIA8_PATH=NotInstalled @@ -13,31 +13,53 @@ BIASLIBDIR=../../../lib/ BIASLIBRARY=libbias.$(libext) # Rest of the makefile -ifeq ($(origin FFLAGS),undefined) -FFLAGS= -w -fPIC -#FFLAGS+= -g -fbounds-check -ffpe-trap=invalid,zero,overflow,underflow,denormal -Wall -fimplicit-none -endif -FFLAGS += $(GLOBAL_FLAG) +#=== Detect O/S and architecture (assuming uname is available, https://en.wikipedia.org/wiki/Uname) + +# Detect O/S kernel (Linux, Darwin...) +UNAME_S := $(shell uname -s) + +# Detect architecture (x86_64, ppc64le...) +UNAME_P := $(shell uname -p) + +#------------------------------------------------------------------------------- # REMOVE MACFLAG IF NOT ON MAC OR FOR F2PY -UNAME := $(shell uname -s) ifdef f2pymode MACFLAG= else -ifneq ($(UNAME), Darwin) +ifneq ($(UNAME_S), Darwin) MACFLAG= endif endif +############################################################ +# Default compiler flags +# To change optimisation level, override these as follows: +# make CXXFLAGS="-O0 -g" +# or export them as environment variables +# For debugging Fortran, one could e.g. use: +# FCFLAGS="-g -fbounds-check -ffpe-trap=invalid,zero,overflow,underflow,denormal -Wall -fimplicit-none" +############################################################ +FCFLAGS ?= $(GLOBAL_FLAG) -fbounds-check +CXXFLAGS ?= $(GLOBAL_FLAG) -DNDEBUG +NVCCFLAGS ?= $(GLOBAL_FLAG) -DNDEBUG -use_fast_math -lineinfo +LDFLAGS ?= $(STDLIB) -ifeq ($(origin CXXFLAGS),undefined) -CXXFLAGS= -O $(STDLIB_FLAG) $(MACFLAG) +ifneq ($(FFLAGS),) +# Madgraph used to use FFLAGS, so the user probably tries to change the flags specifically for madgraph: +FCFLAGS = $(FFLAGS) endif -ifeq ($(origin CFLAGS),undefined) -CFLAGS= -O $(STDLIB_FLAG) $(MACFLAG) +# Madgraph-specific flags: +WARNFLAGS = -Wall -Wshadow -Wextra +ifeq (,$(findstring -std=,$(CXXFLAGS))) +CXXSTANDARD= -std=c++17 endif +MG_FCFLAGS += -fPIC -w +MG_CXXFLAGS += -fPIC $(CXXSTANDARD) $(WARNFLAGS) $(MACFLAG) +MG_NVCCFLAGS += -fPIC $(CXXSTANDARD) --forward-unknown-to-host-compiler $(WARNFLAGS) +MG_LDFLAGS += $(MACFLAG) # Set FC unless it's defined by an environment variable ifeq ($(origin FC),default) @@ -49,45 +71,40 @@ endif # Increase the number of allowed charcters in a Fortran line ifeq ($(FC), ftn) -FFLAGS+= -extend-source # for ifort type of compiler +MG_FCFLAGS += -extend-source # for ifort type of compiler else VERS="$(shell $(FC) --version | grep ifort -i)" ifeq ($(VERS), "") -FFLAGS+= -ffixed-line-length-132 +MG_FCFLAGS += -ffixed-line-length-132 else -FFLAGS+= -extend-source # for ifort type of compiler +MG_FCFLAGS += -extend-source # for ifort type of compiler endif endif -UNAME := $(shell uname -s) -ifeq ($(origin LDFLAGS), undefined) -LDFLAGS=$(STDLIB) $(MACFLAG) -endif - # Options: dynamic, lhapdf # Option dynamic -ifeq ($(UNAME), Darwin) +ifeq ($(UNAME_S), Darwin) dylibext=dylib else dylibext=so endif ifdef dynamic -ifeq ($(UNAME), Darwin) +ifeq ($(UNAME_S), Darwin) libext=dylib -FFLAGS+= -fno-common -LDFLAGS += -bundle +MG_FCFLAGS += -fno-common +MG_LDFLAGS += -bundle define CREATELIB $(FC) -dynamiclib -undefined dynamic_lookup -o $(1) $(2) endef else libext=so -FFLAGS+= -fPIC -LDFLAGS += -shared +MG_FCFLAGS += -fPIC +MG_LDFLAGS += -shared define CREATELIB -$(FC) $(FFLAGS) $(LDFLAGS) -o $(1) $(2) +$(FC) $(MG_FCFLAGS) $(FCFLAGS) $(MG_LDFLAGS) $(LDFLAGS) -o $(1) $(2) endef endif else @@ -101,17 +118,9 @@ endif # Option lhapdf ifneq ($(lhapdf),) -CXXFLAGS += $(shell $(lhapdf) --cppflags) +MG_CXXFLAGS += $(shell $(lhapdf) --cppflags) alfas_functions=alfas_functions_lhapdf llhapdf+= $(shell $(lhapdf) --cflags --libs) -lLHAPDF -# check if we need to activate c++11 (for lhapdf6.2) -ifeq ($(origin CXX),default) -ifeq ($lhapdfversion$lhapdfsubversion,62) -CXX=$(DEFAULT_CPP_COMPILER) -std=c++11 -else -CXX=$(DEFAULT_CPP_COMPILER) -endif -endif else alfas_functions=alfas_functions llhapdf= @@ -120,4 +129,207 @@ endif # Helper function to check MG5 version define CHECK_MG5AMC_VERSION python -c 'import re; from distutils.version import StrictVersion; print StrictVersion("$(MG5AMC_VERSION)") >= StrictVersion("$(1)") if re.match("^[\d\.]+$$","$(MG5AMC_VERSION)") else True;' -endef \ No newline at end of file +endef + +#------------------------------------------------------------------------------- + +# Set special cases for non-gcc/clang builds +# AVX below gets overridden from outside in architecture-specific builds +AVX ?= none +# [NB MGONGPU_PVW512 is needed because "-mprefer-vector-width=256" is not exposed in a macro] +# [See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96476] +$(info AVX=$(AVX)) +ifeq ($(UNAME_P),arm) + ifeq ($(AVX),sse4) + override AVXFLAGS = -D__SSE4_2__ # ARM NEON with 128 width (Q/quadword registers) + endif +else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 + ifeq ($(AVX),none) + override AVXFLAGS = -mno-sse3 # no SIMD + else ifeq ($(AVX),sse4) + override AVXFLAGS = -mno-avx # SSE4.2 with 128 width (xmm registers) + else ifeq ($(AVX),avx2) + override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] + else ifeq ($(AVX),512y) + override AVXFLAGS = -march=skylake -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] + else ifeq ($(AVX),512z) + override AVXFLAGS = -march=skylake -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) + else + $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) + endif +endif + +# For the moment, use AVXFLAGS everywhere: eventually, use them only in encapsulated implementations? +MG_CXXFLAGS+= $(AVXFLAGS) + +#------------------------------------------------------------------------------- + +#=== Configure the CUDA compiler if available + +# If CXX is not a single word (example "clang++ --gcc-toolchain...") then disable CUDA builds (issue #505) +# This is because it is impossible to pass this to "CUFLAGS += -ccbin " below +ifneq ($(words $(subst ccache ,,$(CXX))),1) # allow at most "CXX=ccache " from outside + $(warning CUDA builds are not supported for multi-word CXX "$(CXX)") + override CUDA_HOME=disabled +endif + +# If CUDA_HOME is not set, try to set it from the location of nvcc +ifndef CUDA_HOME + CUDA_HOME = $(patsubst %bin/nvcc,%,$(shell which nvcc 2>/dev/null)) + $(info CUDA_HOME="$(CUDA_HOME)") +endif + +# Set NVCC as $(CUDA_HOME)/bin/nvcc if it exists +ifneq ($(wildcard $(CUDA_HOME)/bin/nvcc),) + NVCC = $(CUDA_HOME)/bin/nvcc + USE_NVTX ?=-DUSE_NVTX + # See https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html + # See https://arnon.dk/matching-sm-architectures-arch-and-gencode-for-various-nvidia-cards/ + # Default: use compute capability 70 (Volta architecture), and embed PTX to support later architectures, too. + # Set MADGRAPH_CUDA_ARCHITECTURE to the desired value to change the default. + # Build for multiple architectures using a space-separated list, e.g. MADGRAPH_CUDA_ARCHITECTURE="70 80" + MADGRAPH_CUDA_ARCHITECTURE ?= 70 + # Generate PTX for the first architecture: + CUARCHFLAGS := --generate-code arch=compute_$(firstword $(MADGRAPH_CUDA_ARCHITECTURE)),code=compute_$(firstword $(MADGRAPH_CUDA_ARCHITECTURE)) + # Generate device code for all architectures: + CUARCHFLAGS += $(foreach arch,$(MADGRAPH_CUDA_ARCHITECTURE), --generate-code arch=compute_$(arch),code=sm_$(arch)) + + CUINC = -I$(CUDA_HOME)/include/ + CURANDLIBFLAGS = -L$(CUDA_HOME)/lib64/ -lcurand # NB: -lcuda is not needed here! + MG_LDFLAGS += $(CURANDLIBFLAGS) + MG_NVCCFLAGS += $(CUINC) $(USE_NVTX) $(CUARCHFLAGS) + +else ifeq ($(AVX),cuda) + $(error nvcc is not visible in PATH. Either add it to PATH or export CUDA_HOME to compile with cuda) + ifeq ($(AVX),cuda) + $(error Cannot compile for cuda without NVCC) + endif +endif + +# Set the host C++ compiler for nvcc via "-ccbin " +# (NB issue #505: this must be a single word, "clang++ --gcc-toolchain..." is not supported) +MG_NVCCFLAGS += -ccbin $(shell which $(subst ccache ,,$(CXX))) + +# Allow newer (unsupported) C++ compilers with older versions of CUDA if ALLOW_UNSUPPORTED_COMPILER_IN_CUDA is set (#504) +ifneq ($(origin ALLOW_UNSUPPORTED_COMPILER_IN_CUDA),undefined) +MG_NVCCFLAGS += -allow-unsupported-compiler +endif + +#------------------------------------------------------------------------------- + +#=== Configure ccache for C++ and CUDA builds + +# Enable ccache if USECCACHE=1 +ifeq ($(USECCACHE)$(shell echo $(CXX) | grep ccache),1) + override CXX:=ccache $(CXX) +endif + +ifneq ($(NVCC),) + ifeq ($(USECCACHE)$(shell echo $(NVCC) | grep ccache),1) + override NVCC:=ccache $(NVCC) + endif +endif + +#------------------------------------------------------------------------------- + +#=== Configure PowerPC-specific compiler flags for C++ and CUDA + +# PowerPC-specific CXX / CUDA compiler flags (being reviewed) +ifeq ($(UNAME_P),ppc64le) + MG_CXXFLAGS+= -mcpu=power9 -mtune=power9 # gains ~2-3% both for none and sse4 + MG_NVCCFLAGS+= -Xcompiler -mno-float128 + + ifeq ($(AVX),sse4) + override AVXFLAGS = -D__SSE4_2__ # Power9 VSX with 128 width (VSR registers) + endif +endif + +#------------------------------------------------------------------------------- +#=== Apple-specific compiler/linker options + +# Add -std=c++17 explicitly to avoid build errors on macOS +# Add -mmacosx-version-min=11.3 to avoid "ld: warning: object file was built for newer macOS version than being linked" +ifneq ($(shell $(CXX) --version | egrep '^Apple clang'),) +MG_CXXFLAGS += -std=c++17 -mmacosx-version-min=11.3 +endif + +ifeq ($(UNAME_S),Darwin) +STDLIB = -lc++ # avoid 'Undefined symbols' for chrono::steady_clock on macOS (checked with otool -L libmg5amc_gg_ttx_cpp.so) +MG_LDFLAGS += -mmacosx-version-min=11.3 # avoid "ld: warning: object file was built for newer macOS version than being linked" +else +MG_LDFLAGS += -Xlinker --no-relax # avoid 'failed to convert GOTPCREL relocation' error #458 (not supported on macOS) +endif + +#------------------------------------------------------------------------------- + +#=== C++/CUDA-specific flags for floating-point types and random generators to use + +# Set the default FPTYPE (floating point type) choice +FPTYPE ?= m + +# Set the default HELINL (inline helicities?) choice +HELINL ?= 0 + +# Set the default HRDCOD (hardcode cIPD physics parameters?) choice +HRDCOD ?= 0 + +# Set the default RNDGEN (random number generator) choice +ifeq ($(NVCC),) + RNDGEN ?= hasNoCurand +else + RNDGEN ?= hasCurand +endif + +# Export AVX, FPTYPE, HELINL, HRDCOD, RNDGEN, OMPFLAGS so sub-makes don't go back to the defaults +export AVX +export AVXFLAGS +export FPTYPE +export HELINL +export HRDCOD +export RNDGEN + +#=== Set the CUDA/C++ compiler flags appropriate to user-defined choices of AVX, FPTYPE, HELINL, HRDCOD, RNDGEN + +# Set the build flags appropriate to each FPTYPE choice (example: "make FPTYPE=f") +# $(info FPTYPE=$(FPTYPE)) +ifeq ($(FPTYPE),d) + COMMONFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_DOUBLE +else ifeq ($(FPTYPE),f) + COMMONFLAGS += -DMGONGPU_FPTYPE_FLOAT -DMGONGPU_FPTYPE2_FLOAT +else ifeq ($(FPTYPE),m) + COMMONFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_FLOAT +else + $(error Unknown FPTYPE='$(FPTYPE)': only 'd', 'f' and 'm' are supported) +endif + +# Set the build flags appropriate to each HELINL choice (example: "make HELINL=1") +# $(info HELINL=$(HELINL)) +ifeq ($(HELINL),1) + COMMONFLAGS += -DMGONGPU_INLINE_HELAMPS +else ifneq ($(HELINL),0) + $(error Unknown HELINL='$(HELINL)': only '0' and '1' are supported) +endif + +# Set the build flags appropriate to each HRDCOD choice (example: "make HRDCOD=1") +# $(info HRDCOD=$(HRDCOD)) +ifeq ($(HRDCOD),1) + COMMONFLAGS += -DMGONGPU_HARDCODE_PARAM +else ifneq ($(HRDCOD),0) + $(error Unknown HRDCOD='$(HRDCOD)': only '0' and '1' are supported) +endif + +# Set the build flags appropriate to each RNDGEN choice (example: "make RNDGEN=hasNoCurand") +$(info RNDGEN=$(RNDGEN)) +ifeq ($(RNDGEN),hasNoCurand) + override CXXFLAGSCURAND = -DMGONGPU_HAS_NO_CURAND + override CURANDLIBFLAGS = +else ifeq ($(RNDGEN),hasCurand) + CXXFLAGSCURAND = $(CUINC) +else + $(error Unknown RNDGEN='$(RNDGEN)': only 'hasCurand' and 'hasNoCurand' are supported) +endif + +MG_CXXFLAGS += $(COMMONFLAGS) +MG_NVCCFLAGS += $(COMMONFLAGS) + +#------------------------------------------------------------------------------- diff --git a/epochX/cudacpp/gg_tt.mad/Source/makefile b/epochX/cudacpp/gg_tt.mad/Source/makefile index 00c73099a0..407b1b753e 100644 --- a/epochX/cudacpp/gg_tt.mad/Source/makefile +++ b/epochX/cudacpp/gg_tt.mad/Source/makefile @@ -10,8 +10,8 @@ include make_opts # Source files -PROCESS= hfill.o matrix.o myamp.o -DSAMPLE = dsample.o ranmar.o DiscreteSampler.o StringCast.o +PROCESS = hfill.o matrix.o myamp.o +DSAMPLE = dsample.o ranmar.o DiscreteSampler.o StringCast.o HBOOK = hfill.o hcurve.o hbook1.o hbook2.o GENERIC = $(alfas_functions).o transpole.o invarients.o hfill.o pawgraphs.o ran1.o \ rw_events.o rw_routines.o kin_functions.o open_file.o basecode.o setrun.o \ @@ -22,7 +22,7 @@ GENSUDGRID = gensudgrid.o is-sud.o setrun_gen.o rw_routines.o open_file.o # Locally compiled libraries -LIBRARIES=$(LIBDIR)libdsample.$(libext) $(LIBDIR)libgeneric.$(libext) +LIBRARIES=$(LIBDIR)libdsample.$(libext) $(LIBDIR)libgeneric.$(libext) # Binaries @@ -32,6 +32,9 @@ BINARIES = $(BINDIR)gen_ximprove $(BINDIR)gensudgrid $(BINDIR)combine_runs all: $(LIBRARIES) $(LIBDIR)libdhelas.$(libext) $(LIBDIR)libpdf.$(libext) $(LIBDIR)libgammaUPC.$(libext) $(LIBDIR)libmodel.$(libext) $(LIBDIR)libcernlib.$(libext) $(LIBDIR)libbias.$(libext) +%.o: %.f *.inc + $(FC) -I. $(MG_FCFLAGS) $(FCFLAGS) -c $< -o $@ + # Libraries $(LIBDIR)libdsample.$(libext): $(DSAMPLE) @@ -39,36 +42,35 @@ $(LIBDIR)libdsample.$(libext): $(DSAMPLE) $(LIBDIR)libgeneric.$(libext): $(GENERIC) $(call CREATELIB, $@, $^) $(LIBDIR)libdhelas.$(libext): DHELAS - cd DHELAS; make; cd .. + $(MAKE) -C $< FFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" FCFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" $(LIBDIR)libpdf.$(libext): PDF make_opts - cd PDF; make; cd .. + $(MAKE) -C $< FFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" FCFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" ifneq (,$(filter edff chff, $(pdlabel1) $(pdlabel2))) $(LIBDIR)libgammaUPC.$(libext): PDF/gammaUPC - cd PDF/gammaUPC; make ; cd ../../ + $(MAKE) -C $< FFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" FCFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" else $(LIBDIR)libgammaUPC.$(libext): PDF/gammaUPC - cd PDF/gammaUPC; make -f makefile_dummy; cd ../../ -endif + $(MAKE) -C $< -f makefile_dummy FFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" FCFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" +endif $(LIBDIR)libcernlib.$(libext): CERNLIB - cd CERNLIB; make; cd .. + $(MAKE) -C $< FFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" FCFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" # The bias library is here the dummy by default; compilation of other ones specified in the run_card will be done by MG5aMC directly. $(LIBDIR)libbias.$(libext): BIAS/dummy - cd BIAS/dummy; make; cd ../../ + $(MAKE) -C $< FFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" FCFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" $(LIBDIR)libmodel.$(libext): MODEL param_card.inc - cd MODEL; make + $(MAKE) -C $< FFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" FCFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" param_card.inc: ../Cards/param_card.dat ../bin/madevent treatcards param + touch $@ # madevent doesn't update the time stamp if there's nothing to do -$(BINDIR)gen_ximprove: gen_ximprove.o ranmar.o rw_routines.o open_file.o - $(FC) $(LDFLAGS) -o $@ $^ -#$(BINDIR)combine_events: $(COMBINE) $(LIBDIR)libmodel.$(libext) $(LIBDIR)libpdf.$(libext) $(LIBDIR)libgammaUPC.$(libext) run_card.inc $(LIBDIR)libbias.$(libext) -# $(FC) -o $@ $(COMBINE) -L$(LIBDIR) -lmodel -lpdf -lgammaUPC $(llhapdf) $(LDFLAGS) -lbias +$(BINDIR)gen_ximprove: gen_ximprove.o ranmar.o rw_routines.o open_file.o + $(FC) $(MG_LDFLAGS) $(LDFLAGS) -o $@ $^ $(BINDIR)gensudgrid: $(GENSUDGRID) $(LIBDIR)libpdf.$(libext) $(LIBDIR)libgammaUPC.$(libext) $(LIBDIR)libcernlib.$(libext) - $(FC) -o $@ $(GENSUDGRID) -L$(LIBDIR) -lmodel -lpdf -lgammaUPC -lcernlib $(llhapdf) $(LDFLAGS) + $(FC) -o $@ $(GENSUDGRID) -L$(LIBDIR) -lmodel -lpdf -lgammaUPC -lcernlib $(llhapdf) $(MG_LDFLAGS) $(LDFLAGS) # Dependencies @@ -85,6 +87,7 @@ rw_events.o: rw_events.f run_config.inc run_card.inc: ../Cards/run_card.dat ../bin/madevent treatcards run + touch $@ # madevent doesn't update the time stamp if there's nothing to do clean4pdf: rm -f ../lib/libpdf.$(libext) @@ -120,7 +123,7 @@ $(LIBDIR)libiregi.a: $(IREGIDIR) cd $(IREGIDIR); make ln -sf ../Source/$(IREGIDIR)libiregi.a $(LIBDIR)libiregi.a -cleanSource: +clean: $(RM) *.o $(LIBRARIES) $(BINARIES) cd PDF; make clean; cd .. cd PDF/gammaUPC; make clean; cd ../../ @@ -132,11 +135,3 @@ cleanSource: cd BIAS/ptj_bias; make clean; cd ../.. if [ -d $(CUTTOOLSDIR) ]; then cd $(CUTTOOLSDIR); make clean; cd ..; fi if [ -d $(IREGIDIR) ]; then cd $(IREGIDIR); make clean; cd ..; fi - -clean: cleanSource - for i in `ls -d ../SubProcesses/P*`; do cd $$i; make clean; cd -; done; - -cleanavx: - for i in `ls -d ../SubProcesses/P*`; do cd $$i; make cleanavxs; cd -; done; -cleanall: cleanSource # THIS IS THE ONE - for i in `ls -d ../SubProcesses/P*`; do cd $$i; make cleanavxs; cd -; done; diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/Bridge.h b/epochX/cudacpp/gg_tt.mad/SubProcesses/Bridge.h index bf8b5e024d..c263f39a62 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/Bridge.h +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/Bridge.h @@ -236,7 +236,7 @@ namespace mg5amcCpu #ifdef __CUDACC__ if( ( m_nevt < s_gputhreadsmin ) || ( m_nevt % s_gputhreadsmin != 0 ) ) throw std::runtime_error( "Bridge constructor: nevt should be a multiple of " + std::to_string( s_gputhreadsmin ) ); - while( m_nevt != m_gpublocks * m_gputhreads ) + while( m_nevt != static_cast( m_gpublocks * m_gputhreads ) ) { m_gputhreads /= 2; if( m_gputhreads < s_gputhreadsmin ) @@ -266,7 +266,7 @@ namespace mg5amcCpu template void Bridge::set_gpugrid( const int gpublocks, const int gputhreads ) { - if( m_nevt != gpublocks * gputhreads ) + if( m_nevt != static_cast( gpublocks * gputhreads ) ) throw std::runtime_error( "Bridge: gpublocks*gputhreads must equal m_nevt in set_gpugrid" ); m_gpublocks = gpublocks; m_gputhreads = gputhreads; diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/MadgraphTest.h b/epochX/cudacpp/gg_tt.mad/SubProcesses/MadgraphTest.h index ef40624c88..b0f2250c25 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/MadgraphTest.h +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/MadgraphTest.h @@ -199,10 +199,6 @@ class MadgraphTest : public testing::TestWithParam } }; -// Since we link both the CPU-only and GPU tests into the same executable, we prevent -// a multiply defined symbol by only compiling this in the non-CUDA phase: -#ifndef __CUDACC__ - /// Compare momenta and matrix elements. /// This uses an implementation of TestDriverBase to run a madgraph workflow, /// and compares momenta and matrix elements with a reference file. @@ -307,6 +303,4 @@ TEST_P( MadgraphTest, CompareMomentaAndME ) } } -#endif // __CUDACC__ - #endif /* MADGRAPHTEST_H_ */ diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/MatrixElementKernels.cc b/epochX/cudacpp/gg_tt.mad/SubProcesses/MatrixElementKernels.cc index 74b5239ebf..2d6f27cd5d 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/MatrixElementKernels.cc +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/MatrixElementKernels.cc @@ -196,6 +196,9 @@ namespace mg5amcGpu void MatrixElementKernelDevice::setGrid( const int gpublocks, const int gputhreads ) { + m_gpublocks = gpublocks; + m_gputhreads = gputhreads; + if( m_gpublocks == 0 ) throw std::runtime_error( "MatrixElementKernelDevice: gpublocks must be > 0 in setGrid" ); if( m_gputhreads == 0 ) throw std::runtime_error( "MatrixElementKernelDevice: gputhreads must be > 0 in setGrid" ); if( this->nevt() != m_gpublocks * m_gputhreads ) throw std::runtime_error( "MatrixElementKernelDevice: nevt mismatch in setGrid" ); diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/check_sa.cc b/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/check_sa.cc index 3fbf0ffbee..07b7304b17 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/check_sa.cc +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/check_sa.cc @@ -81,7 +81,7 @@ namespace mg5amcGpu namespace mg5amcCpu #endif { - inline void FPEhandler( int sig ) + inline void FPEhandler( int ) { #ifdef __CUDACC__ std::cerr << "Floating Point Exception (GPU)" << std::endl; diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/counters.cc b/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/counters.cc index 3bbdec9387..cf875e8be4 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/counters.cc +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/counters.cc @@ -32,6 +32,8 @@ extern "C" case +0: return "CudaCpp"; break; default: assert( false ); break; } + + return 0; } static mgOnGpu::Timer program_timer; diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk index 509307506b..a522ddb335 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk @@ -1,56 +1,41 @@ # Copyright (C) 2020-2023 CERN and UCLouvain. # Licensed under the GNU Lesser General Public License (version 3 or later). # Created by: S. Roiser (Feb 2020) for the MG5aMC CUDACPP plugin. -# Further modified by: O. Mattelaer, S. Roiser, A. Valassi (2020-2023) for the MG5aMC CUDACPP plugin. - -#=== Determine the name of this makefile (https://ftp.gnu.org/old-gnu/Manuals/make-3.80/html_node/make_17.html) -#=== NB: use ':=' to ensure that the value of CUDACPP_MAKEFILE is not modified further down after including make_opts -#=== NB: use 'override' to ensure that the value can not be modified from the outside -override CUDACPP_MAKEFILE := $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)) -###$(info CUDACPP_MAKEFILE='$(CUDACPP_MAKEFILE)') - -#=== NB: different names (e.g. cudacpp.mk and cudacpp_src.mk) are used in the Subprocess and src directories -override CUDACPP_SRC_MAKEFILE = cudacpp_src.mk - -#------------------------------------------------------------------------------- - -#=== Use bash in the Makefile (https://www.gnu.org/software/make/manual/html_node/Choosing-the-Shell.html) - -SHELL := /bin/bash - -#------------------------------------------------------------------------------- - -#=== Detect O/S and architecture (assuming uname is available, https://en.wikipedia.org/wiki/Uname) - -# Detect O/S kernel (Linux, Darwin...) -UNAME_S := $(shell uname -s) -###$(info UNAME_S='$(UNAME_S)') - -# Detect architecture (x86_64, ppc64le...) -UNAME_P := $(shell uname -p) -###$(info UNAME_P='$(UNAME_P)') - -#------------------------------------------------------------------------------- - -#=== Include the common MG5aMC Makefile options - -# OM: this is crucial for MG5aMC flag consistency/documentation -# AV: temporarely comment this out because it breaks cudacpp builds -ifneq ($(wildcard ../../Source/make_opts),) -include ../../Source/make_opts -endif +# Further modified by: S. Hageboeck, J. Teig, O. Mattelaer, S. Roiser, A. Valassi (2020-2023) for the MG5aMC CUDACPP plugin. + +# This makefile extends the Fortran makefile called "makefile" + +CUDACPP_SRC_MAKEFILE = cudacpp_src.mk + +# Self-invocation with adapted flags: +cppnative: $(SOURCEDIR_GUARD) $(PROCESS) + $(MAKE) AVX=native AVXFLAGS="-march=native" cppbuild +cppnone: $(SOURCEDIR_GUARD) $(PROCESS) + $(MAKE) AVX=none AVXFLAGS= cppbuild +cppsse4: $(SOURCEDIR_GUARD) $(PROCESS) + $(MAKE) AVX=sse4 AVXFLAGS=-march=nehalem cppbuild +cppavx2: $(SOURCEDIR_GUARD) $(PROCESS) + $(MAKE) AVX=avx2 AVXFLAGS=-march=haswell cppbuild +cppavx512y: $(SOURCEDIR_GUARD) $(PROCESS) + $(MAKE) AVX=512y AVXFLAGS="-march=skylake-avx512 -mprefer-vector-width=256" cppbuild +cppavx512z: $(SOURCEDIR_GUARD) $(PROCESS) + $(MAKE) AVX=512z AVXFLAGS="-march=skylake-avx512 -DMGONGPU_PVW512" cppbuild +cuda: $(SOURCEDIR_GUARD) $(PROCESS) + $(MAKE) AVX=cuda cudabuild #------------------------------------------------------------------------------- #=== Configure common compiler flags for C++ and CUDA +# NB: The base flags are defined in the fortran "makefile" + +# Include directories +INCFLAGS = -I. -I../../src -INCFLAGS = -I. -OPTFLAGS = -O3 # this ends up in CUFLAGS too (should it?), cannot add -Ofast or -ffast-math here +MG_CXXFLAGS += $(INCFLAGS) +MG_NVCCFLAGS += $(INCFLAGS) # Dependency on src directory -MG5AMC_COMMONLIB = mg5amc_common -LIBFLAGS = -L$(LIBDIR) -l$(MG5AMC_COMMONLIB) -INCFLAGS += -I../../src +MG5AMC_COMMONLIB = mg5amc_common # Compiler-specific googletest build directory (#125 and #738) ifneq ($(shell $(CXX) --version | grep '^Intel(R) oneAPI DPC++/C++ Compiler'),) @@ -99,356 +84,42 @@ endif #------------------------------------------------------------------------------- -#=== Configure the C++ compiler - -CXXFLAGS = $(OPTFLAGS) -std=c++17 $(INCFLAGS) -Wall -Wshadow -Wextra -ifeq ($(shell $(CXX) --version | grep ^nvc++),) -CXXFLAGS += -ffast-math # see issue #117 -endif -###CXXFLAGS+= -Ofast # performance is not different from --fast-math -###CXXFLAGS+= -g # FOR DEBUGGING ONLY - -# Optionally add debug flags to display the full list of flags (eg on Darwin) -###CXXFLAGS+= -v - -# Note: AR, CXX and FC are implicitly defined if not set externally -# See https://www.gnu.org/software/make/manual/html_node/Implicit-Variables.html - -# Add -mmacosx-version-min=11.3 to avoid "ld: warning: object file was built for newer macOS version than being linked" -ifneq ($(shell $(CXX) --version | egrep '^Apple clang'),) -CXXFLAGS += -mmacosx-version-min=11.3 -endif - -#------------------------------------------------------------------------------- - -#=== Configure the CUDA compiler - -# If CXX is not a single word (example "clang++ --gcc-toolchain...") then disable CUDA builds (issue #505) -# This is because it is impossible to pass this to "CUFLAGS += -ccbin " below -ifneq ($(words $(subst ccache ,,$(CXX))),1) # allow at most "CXX=ccache " from outside - $(warning CUDA builds are not supported for multi-word CXX "$(CXX)") - override CUDA_HOME=disabled -endif - -# If CUDA_HOME is not set, try to set it from the location of nvcc -ifndef CUDA_HOME - CUDA_HOME = $(patsubst %bin/nvcc,%,$(shell which nvcc 2>/dev/null)) - $(warning CUDA_HOME was not set: using "$(CUDA_HOME)") -endif - -# Set NVCC as $(CUDA_HOME)/bin/nvcc if it exists -ifneq ($(wildcard $(CUDA_HOME)/bin/nvcc),) - NVCC = $(CUDA_HOME)/bin/nvcc - USE_NVTX ?=-DUSE_NVTX - # See https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html - # See https://arnon.dk/matching-sm-architectures-arch-and-gencode-for-various-nvidia-cards/ - # Default: use compute capability 70 for V100 (CERN lxbatch, CERN itscrd, Juwels Cluster). - # Embed device code for 70, and PTX for 70+. - # Export MADGRAPH_CUDA_ARCHITECTURE (comma-separated list) to use another value or list of values (see #533). - # Examples: use 60 for P100 (Piz Daint), 80 for A100 (Juwels Booster, NVidia raplab/Curiosity). - MADGRAPH_CUDA_ARCHITECTURE ?= 70 - ###CUARCHFLAGS = -gencode arch=compute_$(MADGRAPH_CUDA_ARCHITECTURE),code=compute_$(MADGRAPH_CUDA_ARCHITECTURE) -gencode arch=compute_$(MADGRAPH_CUDA_ARCHITECTURE),code=sm_$(MADGRAPH_CUDA_ARCHITECTURE) # Older implementation (AV): go back to this one for multi-GPU support #533 - ###CUARCHFLAGS = --gpu-architecture=compute_$(MADGRAPH_CUDA_ARCHITECTURE) --gpu-code=sm_$(MADGRAPH_CUDA_ARCHITECTURE),compute_$(MADGRAPH_CUDA_ARCHITECTURE) # Newer implementation (SH): cannot use this as-is for multi-GPU support #533 - comma:=, - CUARCHFLAGS = $(foreach arch,$(subst $(comma), ,$(MADGRAPH_CUDA_ARCHITECTURE)),-gencode arch=compute_$(arch),code=compute_$(arch) -gencode arch=compute_$(arch),code=sm_$(arch)) - CUINC = -I$(CUDA_HOME)/include/ - ifeq ($(RNDGEN),hasNoCurand) - CURANDLIBFLAGS= - else - CURANDLIBFLAGS = -L$(CUDA_HOME)/lib64/ -lcurand # NB: -lcuda is not needed here! - endif - CUOPTFLAGS = -lineinfo - CUFLAGS = $(foreach opt, $(OPTFLAGS), -Xcompiler $(opt)) $(CUOPTFLAGS) $(INCFLAGS) $(CUINC) $(USE_NVTX) $(CUARCHFLAGS) -use_fast_math - ###CUFLAGS += -Xcompiler -Wall -Xcompiler -Wextra -Xcompiler -Wshadow - ###NVCC_VERSION = $(shell $(NVCC) --version | grep 'Cuda compilation tools' | cut -d' ' -f5 | cut -d, -f1) - CUFLAGS += -std=c++17 # need CUDA >= 11.2 (see #333): this is enforced in mgOnGpuConfig.h - # Without -maxrregcount: baseline throughput: 6.5E8 (16384 32 12) up to 7.3E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 160 # improves throughput: 6.9E8 (16384 32 12) up to 7.7E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 128 # improves throughput: 7.3E8 (16384 32 12) up to 7.6E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 96 # degrades throughput: 4.1E8 (16384 32 12) up to 4.5E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 64 # degrades throughput: 1.7E8 (16384 32 12) flat at 1.7E8 (65536 128 12) -else ifneq ($(origin REQUIRE_CUDA),undefined) - # If REQUIRE_CUDA is set but no cuda is found, stop here (e.g. for CI tests on GPU #443) - $(error No cuda installation found (set CUDA_HOME or make nvcc visible in PATH)) -else - # No cuda. Switch cuda compilation off and go to common random numbers in C++ - $(warning CUDA_HOME is not set or is invalid: export CUDA_HOME to compile with cuda) - override NVCC= - override USE_NVTX= - override CUINC= - override CURANDLIBFLAGS= -endif -export NVCC -export CUFLAGS - -# Set the host C++ compiler for nvcc via "-ccbin " -# (NB issue #505: this must be a single word, "clang++ --gcc-toolchain..." is not supported) -CUFLAGS += -ccbin $(shell which $(subst ccache ,,$(CXX))) - -# Allow newer (unsupported) C++ compilers with older versions of CUDA if ALLOW_UNSUPPORTED_COMPILER_IN_CUDA is set (#504) -ifneq ($(origin ALLOW_UNSUPPORTED_COMPILER_IN_CUDA),undefined) -CUFLAGS += -allow-unsupported-compiler -endif - -#------------------------------------------------------------------------------- - -#=== Configure ccache for C++ and CUDA builds - -# Enable ccache if USECCACHE=1 -ifeq ($(USECCACHE)$(shell echo $(CXX) | grep ccache),1) - override CXX:=ccache $(CXX) -endif -#ifeq ($(USECCACHE)$(shell echo $(AR) | grep ccache),1) -# override AR:=ccache $(AR) -#endif -ifneq ($(NVCC),) - ifeq ($(USECCACHE)$(shell echo $(NVCC) | grep ccache),1) - override NVCC:=ccache $(NVCC) - endif -endif - -#------------------------------------------------------------------------------- - -#=== Configure PowerPC-specific compiler flags for C++ and CUDA - -# PowerPC-specific CXX compiler flags (being reviewed) -ifeq ($(UNAME_P),ppc64le) - CXXFLAGS+= -mcpu=power9 -mtune=power9 # gains ~2-3% both for none and sse4 - # Throughput references without the extra flags below: none=1.41-1.42E6, sse4=2.15-2.19E6 - ###CXXFLAGS+= -DNO_WARN_X86_INTRINSICS # no change - ###CXXFLAGS+= -fpeel-loops # no change - ###CXXFLAGS+= -funroll-loops # gains ~1% for none, loses ~1% for sse4 - ###CXXFLAGS+= -ftree-vectorize # no change - ###CXXFLAGS+= -flto # would increase to none=4.08-4.12E6, sse4=4.99-5.03E6! -else - ###CXXFLAGS+= -flto # also on Intel this would increase throughputs by a factor 2 to 4... - ######CXXFLAGS+= -fno-semantic-interposition # no benefit (neither alone, nor combined with -flto) -endif - -# PowerPC-specific CUDA compiler flags (to be reviewed!) -ifeq ($(UNAME_P),ppc64le) - CUFLAGS+= -Xcompiler -mno-float128 -endif - -#------------------------------------------------------------------------------- - #=== Configure defaults and check if user-defined choices exist for OMPFLAGS, AVX, FPTYPE, HELINL, HRDCOD, RNDGEN # Set the default OMPFLAGS choice -ifneq ($(shell $(CXX) --version | egrep '^Intel'),) -override OMPFLAGS = -fopenmp -###override OMPFLAGS = # disable OpenMP MT on Intel (was ok without nvcc but not ok with nvcc before #578) -else ifneq ($(shell $(CXX) --version | egrep '^(clang)'),) -override OMPFLAGS = -fopenmp -###override OMPFLAGS = # disable OpenMP MT on clang (was not ok without or with nvcc before #578) -###else ifneq ($(shell $(CXX) --version | egrep '^(Apple clang)'),) # AV for Mac (Apple clang compiler) -else ifeq ($(UNAME_S),Darwin) # OM for Mac (any compiler) +OMPFLAGS ?= -fopenmp +ifeq ($(UNAME_S),Darwin) # OM for Mac (any compiler) override OMPFLAGS = # AV disable OpenMP MT on Apple clang (builds fail in the CI #578) -###override OMPFLAGS = -fopenmp # OM reenable OpenMP MT on Apple clang? (AV Oct 2023: this still fails in the CI) -else -override OMPFLAGS = -fopenmp # enable OpenMP MT by default on all other platforms -###override OMPFLAGS = # disable OpenMP MT on all other platforms (default before #575) -endif - -# Set the default AVX (vectorization) choice -ifeq ($(AVX),) - ifeq ($(UNAME_P),ppc64le) - ###override AVX = none - override AVX = sse4 - else ifeq ($(UNAME_P),arm) - ###override AVX = none - override AVX = sse4 - else ifeq ($(wildcard /proc/cpuinfo),) - override AVX = none - $(warning Using AVX='$(AVX)' because host SIMD features cannot be read from /proc/cpuinfo) - else ifeq ($(shell grep -m1 -c avx512vl /proc/cpuinfo)$(shell $(CXX) --version | grep ^clang),1) - override AVX = 512y - ###$(info Using AVX='$(AVX)' as no user input exists) - else - override AVX = avx2 - ifneq ($(shell grep -m1 -c avx512vl /proc/cpuinfo),1) - $(warning Using AVX='$(AVX)' because host does not support avx512vl) - else - $(warning Using AVX='$(AVX)' because this is faster than avx512vl for clang) - endif - endif -else - ###$(info Using AVX='$(AVX)' according to user input) -endif - -# Set the default FPTYPE (floating point type) choice -ifeq ($(FPTYPE),) - override FPTYPE = d -endif - -# Set the default HELINL (inline helicities?) choice -ifeq ($(HELINL),) - override HELINL = 0 -endif - -# Set the default HRDCOD (hardcode cIPD physics parameters?) choice -ifeq ($(HRDCOD),) - override HRDCOD = 0 -endif - -# Set the default RNDGEN (random number generator) choice -ifeq ($(RNDGEN),) - ifeq ($(NVCC),) - override RNDGEN = hasNoCurand - else ifeq ($(RNDGEN),) - override RNDGEN = hasCurand - endif endif -# Export AVX, FPTYPE, HELINL, HRDCOD, RNDGEN, OMPFLAGS so that it is not necessary to pass them to the src Makefile too -export AVX -export FPTYPE -export HELINL -export HRDCOD -export RNDGEN +# Export here, so sub makes don't fall back to the defaults: export OMPFLAGS -#------------------------------------------------------------------------------- - -#=== Set the CUDA/C++ compiler flags appropriate to user-defined choices of AVX, FPTYPE, HELINL, HRDCOD, RNDGEN - -# Set the build flags appropriate to OMPFLAGS -$(info OMPFLAGS=$(OMPFLAGS)) -CXXFLAGS += $(OMPFLAGS) - -# Set the build flags appropriate to each AVX choice (example: "make AVX=none") -# [NB MGONGPU_PVW512 is needed because "-mprefer-vector-width=256" is not exposed in a macro] -# [See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96476] -$(info AVX=$(AVX)) -ifeq ($(UNAME_P),ppc64le) - ifeq ($(AVX),sse4) - override AVXFLAGS = -D__SSE4_2__ # Power9 VSX with 128 width (VSR registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on PowerPC for the moment) - endif -else ifeq ($(UNAME_P),arm) - ifeq ($(AVX),sse4) - override AVXFLAGS = -D__SSE4_2__ # ARM NEON with 128 width (Q/quadword registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on ARM for the moment) - endif -else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 - ifeq ($(AVX),none) - override AVXFLAGS = -mno-sse3 # no SIMD - else ifeq ($(AVX),sse4) - override AVXFLAGS = -mno-avx # SSE4.2 with 128 width (xmm registers) - else ifeq ($(AVX),avx2) - override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(AVX),512y) - override AVXFLAGS = -march=skylake -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(AVX),512z) - override AVXFLAGS = -march=skylake -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) - else - $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) - endif -else - ifeq ($(AVX),none) - override AVXFLAGS = -march=x86-64 # no SIMD (see #588) - else ifeq ($(AVX),sse4) - override AVXFLAGS = -march=nehalem # SSE4.2 with 128 width (xmm registers) - else ifeq ($(AVX),avx2) - override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(AVX),512y) - override AVXFLAGS = -march=skylake-avx512 -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(AVX),512z) - override AVXFLAGS = -march=skylake-avx512 -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) - else - $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) - endif -endif -# For the moment, use AVXFLAGS everywhere: eventually, use them only in encapsulated implementations? -CXXFLAGS+= $(AVXFLAGS) - -# Set the build flags appropriate to each FPTYPE choice (example: "make FPTYPE=f") -$(info FPTYPE=$(FPTYPE)) -ifeq ($(FPTYPE),d) - CXXFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_DOUBLE - CUFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_DOUBLE -else ifeq ($(FPTYPE),f) - CXXFLAGS += -DMGONGPU_FPTYPE_FLOAT -DMGONGPU_FPTYPE2_FLOAT - CUFLAGS += -DMGONGPU_FPTYPE_FLOAT -DMGONGPU_FPTYPE2_FLOAT -else ifeq ($(FPTYPE),m) - CXXFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_FLOAT - CUFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_FLOAT -else - $(error Unknown FPTYPE='$(FPTYPE)': only 'd', 'f' and 'm' are supported) -endif - -# Set the build flags appropriate to each HELINL choice (example: "make HELINL=1") -$(info HELINL=$(HELINL)) -ifeq ($(HELINL),1) - CXXFLAGS += -DMGONGPU_INLINE_HELAMPS - CUFLAGS += -DMGONGPU_INLINE_HELAMPS -else ifneq ($(HELINL),0) - $(error Unknown HELINL='$(HELINL)': only '0' and '1' are supported) -endif - -# Set the build flags appropriate to each HRDCOD choice (example: "make HRDCOD=1") -$(info HRDCOD=$(HRDCOD)) -ifeq ($(HRDCOD),1) - CXXFLAGS += -DMGONGPU_HARDCODE_PARAM - CUFLAGS += -DMGONGPU_HARDCODE_PARAM -else ifneq ($(HRDCOD),0) - $(error Unknown HRDCOD='$(HRDCOD)': only '0' and '1' are supported) -endif - -# Set the build flags appropriate to each RNDGEN choice (example: "make RNDGEN=hasNoCurand") -$(info RNDGEN=$(RNDGEN)) -ifeq ($(RNDGEN),hasNoCurand) - override CXXFLAGSCURAND = -DMGONGPU_HAS_NO_CURAND -else ifeq ($(RNDGEN),hasCurand) - override CXXFLAGSCURAND = -else - $(error Unknown RNDGEN='$(RNDGEN)': only 'hasCurand' and 'hasNoCurand' are supported) -endif +MG_CXXFLAGS += $(OMPFLAGS) #------------------------------------------------------------------------------- #=== Configure build directories and build lockfiles === -# Build directory "short" tag (defines target and path to the optional build directory) -# (Rationale: keep directory names shorter, e.g. do not include random number generator choice) -override DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) - -# Build lockfile "full" tag (defines full specification of build options that cannot be intermixed) -# (Rationale: avoid mixing of CUDA and no-CUDA environment builds with different random number generators) -override TAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) - -# Build directory: current directory by default, or build.$(DIRTAG) if USEBUILDDIR==1 -ifeq ($(USEBUILDDIR),1) - override BUILDDIR = build.$(DIRTAG) - override LIBDIR = ../../lib/$(BUILDDIR) - override LIBDIRRPATH = '$$ORIGIN/../$(LIBDIR)' - $(info Building in BUILDDIR=$(BUILDDIR) for tag=$(TAG) (USEBUILDDIR is set = 1)) -else - override BUILDDIR = . - override LIBDIR = ../../lib - override LIBDIRRPATH = '$$ORIGIN/$(LIBDIR)' - $(info Building in BUILDDIR=$(BUILDDIR) for tag=$(TAG) (USEBUILDDIR is not set)) +# Build directory "short" tag (defines target and path to the build directory) +DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) +CUDACPP_BUILDDIR = build.$(DIRTAG) +CUDACPP_LIBDIR := ../../lib/$(CUDACPP_BUILDDIR) +LIBDIRRPATH := '$$ORIGIN:$$ORIGIN/../$(CUDACPP_LIBDIR)' +ifneq ($(AVX),) + $(info Building CUDACPP in CUDACPP_BUILDDIR=$(CUDACPP_BUILDDIR). Libs in $(CUDACPP_LIBDIR)) endif -###override INCDIR = ../../include -###$(info Building in BUILDDIR=$(BUILDDIR) for tag=$(TAG)) -# On Linux, set rpath to LIBDIR to make it unnecessary to use LD_LIBRARY_PATH +# On Linux, set rpath to CUDACPP_LIBDIR to make it unnecessary to use LD_LIBRARY_PATH # Use relative paths with respect to the executables or shared libraries ($ORIGIN on Linux) -# On Darwin, building libraries with absolute paths in LIBDIR makes this unnecessary +# On Darwin, building libraries with absolute paths in CUDACPP_LIBDIR makes this unnecessary ifeq ($(UNAME_S),Darwin) override CXXLIBFLAGSRPATH = override CULIBFLAGSRPATH = - override CXXLIBFLAGSRPATH2 = - override CULIBFLAGSRPATH2 = else # RPATH to cuda/cpp libs when linking executables override CXXLIBFLAGSRPATH = -Wl,-rpath,$(LIBDIRRPATH) override CULIBFLAGSRPATH = -Xlinker -rpath,$(LIBDIRRPATH) - # RPATH to common lib when linking cuda/cpp libs - override CXXLIBFLAGSRPATH2 = -Wl,-rpath,'$$ORIGIN' - override CULIBFLAGSRPATH2 = -Xlinker -rpath,'$$ORIGIN' endif # Setting LD_LIBRARY_PATH or DYLD_LIBRARY_PATH in the RUNTIME is no longer necessary (neither on Linux nor on Mac) @@ -458,107 +129,68 @@ override RUNTIME = #=== Makefile TARGETS and build rules below #=============================================================================== -cxx_main=$(BUILDDIR)/check.exe -fcxx_main=$(BUILDDIR)/fcheck.exe +cxx_main=$(CUDACPP_BUILDDIR)/check.exe +fcxx_main=$(CUDACPP_BUILDDIR)/fcheck.exe -ifneq ($(NVCC),) -cu_main=$(BUILDDIR)/gcheck.exe -fcu_main=$(BUILDDIR)/fgcheck.exe -else -cu_main= -fcu_main= -endif - -testmain=$(BUILDDIR)/runTest.exe +cu_main=$(CUDACPP_BUILDDIR)/gcheck.exe +fcu_main=$(CUDACPP_BUILDDIR)/fgcheck.exe ifneq ($(GTESTLIBS),) -all.$(TAG): $(BUILDDIR)/.build.$(TAG) $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_main) $(cxx_main) $(fcu_main) $(fcxx_main) $(testmain) -else -all.$(TAG): $(BUILDDIR)/.build.$(TAG) $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_main) $(cxx_main) $(fcu_main) $(fcxx_main) +testmain=$(CUDACPP_BUILDDIR)/runTest.exe +cutestmain=$(CUDACPP_BUILDDIR)/runTest_cuda.exe endif -# Target (and build options): debug -MAKEDEBUG= -debug: OPTFLAGS = -g -O0 -debug: CUOPTFLAGS = -G -debug: MAKEDEBUG := debug -debug: all.$(TAG) - -# Target: tag-specific build lockfiles -override oldtagsb=`if [ -d $(BUILDDIR) ]; then find $(BUILDDIR) -maxdepth 1 -name '.build.*' ! -name '.build.$(TAG)' -exec echo $(shell pwd)/{} \; ; fi` -$(BUILDDIR)/.build.$(TAG): - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - @if [ "$(oldtagsb)" != "" ]; then echo "Cannot build for tag=$(TAG) as old builds exist for other tags:"; echo " $(oldtagsb)"; echo "Please run 'make clean' first\nIf 'make clean' is not enough: run 'make clean USEBUILDDIR=1 AVX=$(AVX) FPTYPE=$(FPTYPE)' or 'make cleanall'"; exit 1; fi - @touch $(BUILDDIR)/.build.$(TAG) +cppbuild: $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(cxx_main) $(fcxx_main) $(testmain) +cudabuild: $(CUDACPP_BUILDDIR)/$(PROG)_cuda $(cu_main) $(fcu_main) $(cutestmain) # Generic target and build rules: objects from CUDA compilation -ifneq ($(NVCC),) -$(BUILDDIR)/%.o : %.cu *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c $< -o $@ +$(CUDACPP_BUILDDIR)/%.o : %.cu *.h ../../src/*.h + @mkdir -p $(CUDACPP_BUILDDIR) + $(NVCC) $(MG_NVCCFLAGS) $(NVCCFLAGS) -c $< -o $@ -$(BUILDDIR)/%_cu.o : %.cc *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c -x cu $< -o $@ -endif +$(CUDACPP_BUILDDIR)/%_cu.o : %.cc *.h ../../src/*.h + @mkdir -p $(CUDACPP_BUILDDIR) + $(NVCC) $(MG_NVCCFLAGS) $(NVCCFLAGS) -c -x cu $< -o $@ # Generic target and build rules: objects from C++ compilation # (NB do not include CUINC here! add it only for NVTX or curand #679) -$(BUILDDIR)/%.o : %.cc *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - $(CXX) $(CPPFLAGS) $(CXXFLAGS) -fPIC -c $< -o $@ +$(CUDACPP_BUILDDIR)/%.o : %.cc *.h ../../src/*.h + @mkdir -p $(CUDACPP_BUILDDIR) + $(CXX) $(MG_CXXFLAGS) $(CXXFLAGS) -c $< -o $@ # Apply special build flags only to CrossSectionKernel.cc and gCrossSectionKernel.cu (no fast math, see #117 and #516) ifeq ($(shell $(CXX) --version | grep ^nvc++),) -$(BUILDDIR)/CrossSectionKernels.o: CXXFLAGS := $(filter-out -ffast-math,$(CXXFLAGS)) -$(BUILDDIR)/CrossSectionKernels.o: CXXFLAGS += -fno-fast-math +$(CUDACPP_BUILDDIR)/CrossSectionKernels.o: CXXFLAGS += -fno-fast-math ifneq ($(NVCC),) -$(BUILDDIR)/gCrossSectionKernels.o: CUFLAGS += -Xcompiler -fno-fast-math +$(CUDACPP_BUILDDIR)/gCrossSectionKernels.o: NVCCFLAGS += -Xcompiler -fno-fast-math endif endif # Apply special build flags only to check_sa.o and gcheck_sa.o (NVTX in timermap.h, #679) -$(BUILDDIR)/check_sa.o: CXXFLAGS += $(USE_NVTX) $(CUINC) -$(BUILDDIR)/gcheck_sa.o: CXXFLAGS += $(USE_NVTX) $(CUINC) +$(CUDACPP_BUILDDIR)/check_sa.o: MG_CXXFLAGS += $(USE_NVTX) $(CUINC) +$(CUDACPP_BUILDDIR)/gcheck_sa.o: MG_CXXFLAGS += $(USE_NVTX) $(CUINC) # Apply special build flags only to check_sa and CurandRandomNumberKernel (curand headers, #679) -$(BUILDDIR)/check_sa.o: CXXFLAGS += $(CXXFLAGSCURAND) -$(BUILDDIR)/gcheck_sa.o: CUFLAGS += $(CXXFLAGSCURAND) -$(BUILDDIR)/CurandRandomNumberKernel.o: CXXFLAGS += $(CXXFLAGSCURAND) -$(BUILDDIR)/gCurandRandomNumberKernel.o: CUFLAGS += $(CXXFLAGSCURAND) -ifeq ($(RNDGEN),hasCurand) -$(BUILDDIR)/CurandRandomNumberKernel.o: CXXFLAGS += $(CUINC) -endif +$(CUDACPP_BUILDDIR)/check_sa.o: MG_CXXFLAGS += $(CXXFLAGSCURAND) +$(CUDACPP_BUILDDIR)/gcheck_sa.o: MG_NVCCFLAGS += $(CXXFLAGSCURAND) +$(CUDACPP_BUILDDIR)/CurandRandomNumberKernel.o: MG_CXXFLAGS += $(CXXFLAGSCURAND) +$(CUDACPP_BUILDDIR)/gCurandRandomNumberKernel.o: MG_NVCCFLAGS += $(CXXFLAGSCURAND) + # Avoid "warning: builtin __has_trivial_... is deprecated; use __is_trivially_... instead" in nvcc with icx2023 (#592) ifneq ($(shell $(CXX) --version | egrep '^(Intel)'),) ifneq ($(NVCC),) -CUFLAGS += -Xcompiler -Wno-deprecated-builtins +MG_NVCCFLAGS += -Xcompiler -Wno-deprecated-builtins endif endif -# Avoid clang warning "overriding '-ffp-contract=fast' option with '-ffp-contract=on'" (#516) -# This patch does remove the warning, but I prefer to keep it disabled for the moment... -###ifneq ($(shell $(CXX) --version | egrep '^(clang|Apple clang|Intel)'),) -###$(BUILDDIR)/CrossSectionKernels.o: CXXFLAGS += -Wno-overriding-t-option -###ifneq ($(NVCC),) -###$(BUILDDIR)/gCrossSectionKernels.o: CUFLAGS += -Xcompiler -Wno-overriding-t-option -###endif -###endif - #### Apply special build flags only to CPPProcess.cc (-flto) ###$(BUILDDIR)/CPPProcess.o: CXXFLAGS += -flto -#### Apply special build flags only to CPPProcess.cc (AVXFLAGS) -###$(BUILDDIR)/CPPProcess.o: CXXFLAGS += $(AVXFLAGS) - #------------------------------------------------------------------------------- -# Target (and build rules): common (src) library -commonlib : $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so - -$(LIBDIR)/lib$(MG5AMC_COMMONLIB).so: ../../src/*.h ../../src/*.cc $(BUILDDIR)/.build.$(TAG) - $(MAKE) -C ../../src $(MAKEDEBUG) -f $(CUDACPP_SRC_MAKEFILE) +$(CUDACPP_LIBDIR)/lib$(MG5AMC_COMMONLIB).so: ../../src/*.h ../../src/*.cc + $(MAKE) AVX=$(AVX) AVXFLAGS="$(AVXFLAGS)" -C ../../src -f $(CUDACPP_SRC_MAKEFILE) #------------------------------------------------------------------------------- @@ -566,162 +198,123 @@ processid_short=$(shell basename $(CURDIR) | awk -F_ '{print $$(NF-1)"_"$$NF}') ###$(info processid_short=$(processid_short)) MG5AMC_CXXLIB = mg5amc_$(processid_short)_cpp -cxx_objects_lib=$(BUILDDIR)/CPPProcess.o $(BUILDDIR)/MatrixElementKernels.o $(BUILDDIR)/BridgeKernels.o $(BUILDDIR)/CrossSectionKernels.o -cxx_objects_exe=$(BUILDDIR)/CommonRandomNumberKernel.o $(BUILDDIR)/RamboSamplingKernels.o +cxx_objects_lib=$(CUDACPP_BUILDDIR)/CPPProcess.o $(CUDACPP_BUILDDIR)/MatrixElementKernels.o $(CUDACPP_BUILDDIR)/BridgeKernels.o $(CUDACPP_BUILDDIR)/CrossSectionKernels.o +cxx_objects_exe=$(CUDACPP_BUILDDIR)/CommonRandomNumberKernel.o $(CUDACPP_BUILDDIR)/RamboSamplingKernels.o -ifneq ($(NVCC),) MG5AMC_CULIB = mg5amc_$(processid_short)_cuda -cu_objects_lib=$(BUILDDIR)/gCPPProcess.o $(BUILDDIR)/gMatrixElementKernels.o $(BUILDDIR)/gBridgeKernels.o $(BUILDDIR)/gCrossSectionKernels.o -cu_objects_exe=$(BUILDDIR)/gCommonRandomNumberKernel.o $(BUILDDIR)/gRamboSamplingKernels.o -endif +cu_objects_lib=$(CUDACPP_BUILDDIR)/gCPPProcess.o $(CUDACPP_BUILDDIR)/gMatrixElementKernels.o $(CUDACPP_BUILDDIR)/gBridgeKernels.o $(CUDACPP_BUILDDIR)/gCrossSectionKernels.o +cu_objects_exe=$(CUDACPP_BUILDDIR)/gCommonRandomNumberKernel.o $(CUDACPP_BUILDDIR)/gRamboSamplingKernels.o # Target (and build rules): C++ and CUDA shared libraries -$(LIBDIR)/lib$(MG5AMC_CXXLIB).so: $(BUILDDIR)/fbridge.o -$(LIBDIR)/lib$(MG5AMC_CXXLIB).so: cxx_objects_lib += $(BUILDDIR)/fbridge.o -$(LIBDIR)/lib$(MG5AMC_CXXLIB).so: $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cxx_objects_lib) - $(CXX) -shared -o $@ $(cxx_objects_lib) $(CXXLIBFLAGSRPATH2) -L$(LIBDIR) -l$(MG5AMC_COMMONLIB) - -ifneq ($(NVCC),) -$(LIBDIR)/lib$(MG5AMC_CULIB).so: $(BUILDDIR)/fbridge_cu.o -$(LIBDIR)/lib$(MG5AMC_CULIB).so: cu_objects_lib += $(BUILDDIR)/fbridge_cu.o -$(LIBDIR)/lib$(MG5AMC_CULIB).so: $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_objects_lib) - $(NVCC) --shared -o $@ $(cu_objects_lib) $(CULIBFLAGSRPATH2) -L$(LIBDIR) -l$(MG5AMC_COMMONLIB) -endif +$(CUDACPP_BUILDDIR)/lib$(MG5AMC_CXXLIB).so: $(CUDACPP_BUILDDIR)/fbridge.o +$(CUDACPP_BUILDDIR)/lib$(MG5AMC_CXXLIB).so: cxx_objects_lib += $(CUDACPP_BUILDDIR)/fbridge.o +$(CUDACPP_BUILDDIR)/lib$(MG5AMC_CXXLIB).so: $(CUDACPP_LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cxx_objects_lib) + $(CXX) -shared -o $@ $(cxx_objects_lib) $(CXXLIBFLAGSRPATH) -L$(CUDACPP_LIBDIR) -l$(MG5AMC_COMMONLIB) $(MG_LDFLAGS) $(LDFLAGS) -#------------------------------------------------------------------------------- - -# Target (and build rules): Fortran include files -###$(INCDIR)/%.inc : ../%.inc -### @if [ ! -d $(INCDIR) ]; then echo "mkdir -p $(INCDIR)"; mkdir -p $(INCDIR); fi -### \cp $< $@ +$(CUDACPP_BUILDDIR)/lib$(MG5AMC_CULIB).so: $(CUDACPP_BUILDDIR)/fbridge_cu.o +$(CUDACPP_BUILDDIR)/lib$(MG5AMC_CULIB).so: cu_objects_lib += $(CUDACPP_BUILDDIR)/fbridge_cu.o +$(CUDACPP_BUILDDIR)/lib$(MG5AMC_CULIB).so: $(CUDACPP_LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_objects_lib) + $(NVCC) --shared -o $@ $(cu_objects_lib) $(CULIBFLAGSRPATH) -L$(CUDACPP_LIBDIR) -l$(MG5AMC_COMMONLIB) #------------------------------------------------------------------------------- # Target (and build rules): C++ and CUDA standalone executables -$(cxx_main): LIBFLAGS += $(CXXLIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH -$(cxx_main): $(BUILDDIR)/check_sa.o $(LIBDIR)/lib$(MG5AMC_CXXLIB).so $(cxx_objects_exe) $(BUILDDIR)/CurandRandomNumberKernel.o - $(CXX) -o $@ $(BUILDDIR)/check_sa.o $(OMPFLAGS) -ldl -pthread $(LIBFLAGS) -L$(LIBDIR) -l$(MG5AMC_CXXLIB) $(cxx_objects_exe) $(BUILDDIR)/CurandRandomNumberKernel.o $(CURANDLIBFLAGS) -ifneq ($(NVCC),) +$(cxx_main): MG_LDFLAGS += $(CXXLIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH +$(cxx_main): MG_LDFLAGS += -L$(CUDACPP_BUILDDIR) -l$(MG5AMC_CXXLIB) # Process-specific library +$(cxx_main): $(CUDACPP_BUILDDIR)/check_sa.o $(CUDACPP_BUILDDIR)/lib$(MG5AMC_CXXLIB).so $(cxx_objects_exe) $(CUDACPP_BUILDDIR)/CurandRandomNumberKernel.o + $(CXX) -o $@ $(CUDACPP_BUILDDIR)/check_sa.o $(OMPFLAGS) -ldl -pthread $(cxx_objects_exe) $(CUDACPP_BUILDDIR)/CurandRandomNumberKernel.o $(MG_LDFLAGS) $(LDFLAGS) + ifneq ($(shell $(CXX) --version | grep ^Intel),) -$(cu_main): LIBFLAGS += -lintlc # compile with icpx and link with nvcc (undefined reference to `_intel_fast_memcpy') -$(cu_main): LIBFLAGS += -lsvml # compile with icpx and link with nvcc (undefined reference to `__svml_cos4_l9') +$(cu_main): MG_LDFLAGS += -lintlc # compile with icpx and link with nvcc (undefined reference to `_intel_fast_memcpy') +$(cu_main): MG_LDFLAGS += -lsvml # compile with icpx and link with nvcc (undefined reference to `__svml_cos4_l9') else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 -$(cu_main): LIBFLAGS += -L$(patsubst %bin/nvc++,%lib,$(subst ccache ,,$(CXX))) -lnvhpcatm -lnvcpumath -lnvc -endif -$(cu_main): LIBFLAGS += $(CULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH -$(cu_main): $(BUILDDIR)/gcheck_sa.o $(LIBDIR)/lib$(MG5AMC_CULIB).so $(cu_objects_exe) $(BUILDDIR)/gCurandRandomNumberKernel.o - $(NVCC) -o $@ $(BUILDDIR)/gcheck_sa.o $(CUARCHFLAGS) $(LIBFLAGS) -L$(LIBDIR) -l$(MG5AMC_CULIB) $(cu_objects_exe) $(BUILDDIR)/gCurandRandomNumberKernel.o $(CURANDLIBFLAGS) +$(cu_main): MG_LDFLAGS += -L$(patsubst %bin/nvc++,%lib,$(subst ccache ,,$(CXX))) -lnvhpcatm -lnvcpumath -lnvc endif +$(cu_main): MG_LDFLAGS += $(CULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH +$(cu_main): MG_LDFLAGS += -L$(CUDACPP_BUILDDIR) -l$(MG5AMC_CULIB) # Process-specific library +$(cu_main): $(CUDACPP_BUILDDIR)/gcheck_sa.o $(CUDACPP_BUILDDIR)/lib$(MG5AMC_CULIB).so $(cu_objects_exe) $(CUDACPP_BUILDDIR)/gCurandRandomNumberKernel.o + $(NVCC) -o $@ $(CUDACPP_BUILDDIR)/gcheck_sa.o $(CUARCHFLAGS) $(cu_objects_exe) $(CUDACPP_BUILDDIR)/gCurandRandomNumberKernel.o $(MG_LDFLAGS) $(LDFLAGS) #------------------------------------------------------------------------------- - -# Generic target and build rules: objects from Fortran compilation -$(BUILDDIR)/%.o : %.f *.inc - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - $(FC) -I. -c $< -o $@ - -# Generic target and build rules: objects from Fortran compilation -###$(BUILDDIR)/%.o : %.f *.inc -### @if [ ! -d $(INCDIR) ]; then echo "mkdir -p $(INCDIR)"; mkdir -p $(INCDIR); fi -### @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi -### $(FC) -I. -I$(INCDIR) -c $< -o $@ - -# Target (and build rules): Fortran standalone executables -###$(BUILDDIR)/fcheck_sa.o : $(INCDIR)/fbridge.inc +# Check executables: ifeq ($(UNAME_S),Darwin) -$(fcxx_main): LIBFLAGS += -L$(shell dirname $(shell $(FC) --print-file-name libgfortran.dylib)) # add path to libgfortran on Mac #375 +$(fcxx_main): MG_LDFLAGS += -L$(shell dirname $(shell $(FC) --print-file-name libgfortran.dylib)) # add path to libgfortran on Mac #375 endif -$(fcxx_main): LIBFLAGS += $(CXXLIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH -$(fcxx_main): $(BUILDDIR)/fcheck_sa.o $(BUILDDIR)/fsampler.o $(LIBDIR)/lib$(MG5AMC_CXXLIB).so $(cxx_objects_exe) - $(CXX) -o $@ $(BUILDDIR)/fcheck_sa.o $(OMPFLAGS) $(BUILDDIR)/fsampler.o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_CXXLIB) $(cxx_objects_exe) +$(fcxx_main): MG_LDFLAGS += $(CXXLIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH +$(fcxx_main): MG_LDFLAGS += -L$(CUDACPP_BUILDDIR) -l$(MG5AMC_CXXLIB) # Process-specific library +$(fcxx_main): $(CUDACPP_BUILDDIR)/fcheck_sa.o $(CUDACPP_BUILDDIR)/fsampler.o $(CUDACPP_BUILDDIR)/lib$(MG5AMC_CXXLIB).so $(cxx_objects_exe) + $(CXX) -o $@ $(CUDACPP_BUILDDIR)/fcheck_sa.o $(cxx_objects_exe) $(OMPFLAGS) $(CUDACPP_BUILDDIR)/fsampler.o -lgfortran -L$(CUDACPP_LIBDIR) $(MG_LDFLAGS) $(LDFLAGS) -ifneq ($(NVCC),) ifneq ($(shell $(CXX) --version | grep ^Intel),) -$(fcu_main): LIBFLAGS += -lintlc # compile with icpx and link with nvcc (undefined reference to `_intel_fast_memcpy') -$(fcu_main): LIBFLAGS += -lsvml # compile with icpx and link with nvcc (undefined reference to `__svml_cos4_l9') +$(fcu_main): MG_LDFLAGS += -lintlc # compile with icpx and link with nvcc (undefined reference to `_intel_fast_memcpy') +$(fcu_main): MG_LDFLAGS += -lsvml # compile with icpx and link with nvcc (undefined reference to `__svml_cos4_l9') endif ifeq ($(UNAME_S),Darwin) -$(fcu_main): LIBFLAGS += -L$(shell dirname $(shell $(FC) --print-file-name libgfortran.dylib)) # add path to libgfortran on Mac #375 -endif -$(fcu_main): LIBFLAGS += $(CULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH -$(fcu_main): $(BUILDDIR)/fcheck_sa.o $(BUILDDIR)/fsampler_cu.o $(LIBDIR)/lib$(MG5AMC_CULIB).so $(cu_objects_exe) - $(NVCC) -o $@ $(BUILDDIR)/fcheck_sa.o $(BUILDDIR)/fsampler_cu.o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_CULIB) $(cu_objects_exe) +$(fcu_main): MG_LDFLAGS += -L$(shell dirname $(shell $(FC) --print-file-name libgfortran.dylib)) # add path to libgfortran on Mac #375 endif +$(fcu_main): MG_LDFLAGS += $(CULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH +$(fcu_main): MG_LDFLAGS += -L$(CUDACPP_BUILDDIR) -l$(MG5AMC_CULIB) # Process-specific library +$(fcu_main): $(CUDACPP_BUILDDIR)/fcheck_sa.o $(CUDACPP_BUILDDIR)/fsampler_cu.o $(CUDACPP_BUILDDIR)/lib$(MG5AMC_CULIB).so $(cu_objects_exe) + $(NVCC) -o $@ $(CUDACPP_BUILDDIR)/fcheck_sa.o $(CUDACPP_BUILDDIR)/fsampler_cu.o $(cu_objects_exe) -lgfortran $(MG_LDFLAGS) $(LDFLAGS) #------------------------------------------------------------------------------- # Target (and build rules): test objects and test executable -$(BUILDDIR)/testxxx.o: $(GTESTLIBS) -$(BUILDDIR)/testxxx.o: INCFLAGS += $(GTESTINC) -$(BUILDDIR)/testxxx.o: testxxx_cc_ref.txt -$(testmain): $(BUILDDIR)/testxxx.o -$(testmain): cxx_objects_exe += $(BUILDDIR)/testxxx.o # Comment out this line to skip the C++ test of xxx functions -ifneq ($(NVCC),) -$(BUILDDIR)/testxxx_cu.o: $(GTESTLIBS) -$(BUILDDIR)/testxxx_cu.o: INCFLAGS += $(GTESTINC) -$(BUILDDIR)/testxxx_cu.o: testxxx_cc_ref.txt -$(testmain): $(BUILDDIR)/testxxx_cu.o -$(testmain): cu_objects_exe += $(BUILDDIR)/testxxx_cu.o # Comment out this line to skip the CUDA test of xxx functions -endif +$(testmain) $(cutestmain): $(GTESTLIBS) +$(testmain) $(cutestmain): INCFLAGS += $(GTESTINC) +$(testmain) $(cutestmain): MG_LDFLAGS += -L$(GTESTLIBDIR) -lgtest -lgtest_main -$(BUILDDIR)/testmisc.o: $(GTESTLIBS) -$(BUILDDIR)/testmisc.o: INCFLAGS += $(GTESTINC) -$(testmain): $(BUILDDIR)/testmisc.o -$(testmain): cxx_objects_exe += $(BUILDDIR)/testmisc.o # Comment out this line to skip the C++ miscellaneous tests +$(CUDACPP_BUILDDIR)/testxxx.o $(CUDACPP_BUILDDIR)/testxxx_cu.o: $(GTESTLIBS) testxxx_cc_ref.txt +$(testmain): $(CUDACPP_BUILDDIR)/testxxx.o +$(testmain): cxx_objects_exe += $(CUDACPP_BUILDDIR)/testxxx.o # Comment out this line to skip the C++ test of xxx functions +$(cutestmain): $(CUDACPP_BUILDDIR)/testxxx_cu.o +$(cutestmain): cu_objects_exe += $(CUDACPP_BUILDDIR)/testxxx_cu.o # Comment out this line to skip the CUDA test of xxx functions -ifneq ($(NVCC),) -$(BUILDDIR)/testmisc_cu.o: $(GTESTLIBS) -$(BUILDDIR)/testmisc_cu.o: INCFLAGS += $(GTESTINC) -$(testmain): $(BUILDDIR)/testmisc_cu.o -$(testmain): cu_objects_exe += $(BUILDDIR)/testmisc_cu.o # Comment out this line to skip the CUDA miscellaneous tests -endif -$(BUILDDIR)/runTest.o: $(GTESTLIBS) -$(BUILDDIR)/runTest.o: INCFLAGS += $(GTESTINC) -$(testmain): $(BUILDDIR)/runTest.o -$(testmain): cxx_objects_exe += $(BUILDDIR)/runTest.o +$(CUDACPP_BUILDDIR)/testmisc.o $(CUDACPP_BUILDDIR)/testmisc_cu.o: $(GTESTLIBS) +$(testmain): $(CUDACPP_BUILDDIR)/testmisc.o +$(testmain): cxx_objects_exe += $(CUDACPP_BUILDDIR)/testmisc.o # Comment out this line to skip the C++ miscellaneous tests +$(cutestmain): $(CUDACPP_BUILDDIR)/testmisc_cu.o +$(cutestmain): cu_objects_exe += $(CUDACPP_BUILDDIR)/testmisc_cu.o # Comment out this line to skip the CUDA miscellaneous tests + + +$(CUDACPP_BUILDDIR)/runTest.o $(CUDACPP_BUILDDIR)/runTest_cu.o: $(GTESTLIBS) +$(testmain): $(CUDACPP_BUILDDIR)/runTest.o +$(testmain): cxx_objects_exe += $(CUDACPP_BUILDDIR)/runTest.o +$(cutestmain): $(CUDACPP_BUILDDIR)/runTest_cu.o +$(cutestmain): cu_objects_exe += $(CUDACPP_BUILDDIR)/runTest_cu.o + -ifneq ($(NVCC),) -$(BUILDDIR)/runTest_cu.o: $(GTESTLIBS) -$(BUILDDIR)/runTest_cu.o: INCFLAGS += $(GTESTINC) ifneq ($(shell $(CXX) --version | grep ^Intel),) -$(testmain): LIBFLAGS += -lintlc # compile with icpx and link with nvcc (undefined reference to `_intel_fast_memcpy') -$(testmain): LIBFLAGS += -lsvml # compile with icpx and link with nvcc (undefined reference to `__svml_cos4_l9') +$(cutestmain): MG_LDFLAGS += -lintlc # compile with icpx and link with nvcc (undefined reference to `_intel_fast_memcpy') +$(cutestmain): MG_LDFLAGS += -lsvml # compile with icpx and link with nvcc (undefined reference to `__svml_cos4_l9') else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 -$(testmain): LIBFLAGS += -L$(patsubst %bin/nvc++,%lib,$(subst ccache ,,$(CXX))) -lnvhpcatm -lnvcpumath -lnvc -endif -$(testmain): $(BUILDDIR)/runTest_cu.o -$(testmain): cu_objects_exe += $(BUILDDIR)/runTest_cu.o +$(cutestmain): MG_LDFLAGS += -L$(patsubst %bin/nvc++,%lib,$(subst ccache ,,$(CXX))) -lnvhpcatm -lnvcpumath -lnvc endif -$(testmain): $(GTESTLIBS) -$(testmain): INCFLAGS += $(GTESTINC) -$(testmain): LIBFLAGS += -L$(GTESTLIBDIR) -lgtest -lgtest_main ifneq ($(OMPFLAGS),) ifneq ($(shell $(CXX) --version | egrep '^Intel'),) -$(testmain): LIBFLAGS += -liomp5 # see #578 (not '-qopenmp -static-intel' as in https://stackoverflow.com/questions/45909648) +$(testmain): MG_LDFLAGS += -liomp5 # see #578 (not '-qopenmp -static-intel' as in https://stackoverflow.com/questions/45909648) else ifneq ($(shell $(CXX) --version | egrep '^clang'),) -$(testmain): LIBFLAGS += -L $(shell dirname $(shell $(CXX) -print-file-name=libc++.so)) -lomp # see #604 +$(testmain): MG_LDFLAGS += -L $(shell dirname $(shell $(CXX) -print-file-name=libc++.so)) -lomp # see #604 ###else ifneq ($(shell $(CXX) --version | egrep '^Apple clang'),) ###$(testmain): LIBFLAGS += ???? # OMP is not supported yet by cudacpp for Apple clang (see #578 and #604) else -$(testmain): LIBFLAGS += -lgomp +$(testmain): MG_LDFLAGS += -lgomp endif endif -ifeq ($(NVCC),) # link only runTest.o -$(testmain): LIBFLAGS += $(CXXLIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH -$(testmain): $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cxx_objects_lib) $(cxx_objects_exe) $(GTESTLIBS) - $(CXX) -o $@ $(cxx_objects_lib) $(cxx_objects_exe) -ldl -pthread $(LIBFLAGS) -else # link both runTest.o and runTest_cu.o -$(testmain): LIBFLAGS += $(CULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH -$(testmain): $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cxx_objects_lib) $(cxx_objects_exe) $(cu_objects_lib) $(cu_objects_exe) $(GTESTLIBS) - $(NVCC) -o $@ $(cxx_objects_lib) $(cxx_objects_exe) $(cu_objects_lib) $(cu_objects_exe) -ldl $(LIBFLAGS) -lcuda -endif +$(testmain): MG_LDFLAGS += $(CXXLIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH +$(testmain): $(CUDACPP_LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cxx_objects_lib) $(cxx_objects_exe) $(GTESTLIBS) + $(CXX) -o $@ $(cxx_objects_lib) $(cxx_objects_exe) -L$(CUDACPP_LIBDIR) -l$(MG5AMC_COMMONLIB) -ldl -pthread $(MG_LDFLAGS) $(LDFLAGS) + +$(cutestmain): MG_LDFLAGS += $(CULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH +$(cutestmain): $(CUDACPP_LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_objects_lib) $(cu_objects_exe) $(GTESTLIBS) + $(NVCC) -o $@ $(cu_objects_lib) $(cu_objects_exe) -L$(CUDACPP_LIBDIR) -l$(MG5AMC_COMMONLIB) -ldl -lcuda $(MG_LDFLAGS) $(LDFLAGS) # Use target gtestlibs to build only googletest ifneq ($(GTESTLIBS),) @@ -731,72 +324,15 @@ endif # Use flock (Linux only, no Mac) to allow 'make -j' if googletest has not yet been downloaded https://stackoverflow.com/a/32666215 $(GTESTLIBS): ifneq ($(shell which flock 2>/dev/null),) - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - flock $(BUILDDIR)/.make_test.lock $(MAKE) -C $(TESTDIR) + flock $(TESTDIR)/.make_test.lock $(MAKE) -C $(TESTDIR) else if [ -d $(TESTDIR) ]; then $(MAKE) -C $(TESTDIR); fi endif #------------------------------------------------------------------------------- -# Target: build all targets in all AVX modes (each AVX mode in a separate build directory) -# Split the avxall target into five separate targets to allow parallel 'make -j avxall' builds -# (Hack: add a fbridge.inc dependency to avxall, to ensure it is only copied once for all AVX modes) -avxnone: - @echo - $(MAKE) USEBUILDDIR=1 AVX=none -f $(CUDACPP_MAKEFILE) - -avxsse4: - @echo - $(MAKE) USEBUILDDIR=1 AVX=sse4 -f $(CUDACPP_MAKEFILE) - -avxavx2: - @echo - $(MAKE) USEBUILDDIR=1 AVX=avx2 -f $(CUDACPP_MAKEFILE) - -avx512y: - @echo - $(MAKE) USEBUILDDIR=1 AVX=512y -f $(CUDACPP_MAKEFILE) - -avx512z: - @echo - $(MAKE) USEBUILDDIR=1 AVX=512z -f $(CUDACPP_MAKEFILE) - -ifeq ($(UNAME_P),ppc64le) -###avxall: $(INCDIR)/fbridge.inc avxnone avxsse4 -avxall: avxnone avxsse4 -else ifeq ($(UNAME_P),arm) -###avxall: $(INCDIR)/fbridge.inc avxnone avxsse4 -avxall: avxnone avxsse4 -else -###avxall: $(INCDIR)/fbridge.inc avxnone avxsse4 avxavx2 avx512y avx512z -avxall: avxnone avxsse4 avxavx2 avx512y avx512z -endif - -#------------------------------------------------------------------------------- - -# Target: clean the builds -.PHONY: clean - -clean: -ifeq ($(USEBUILDDIR),1) - rm -rf $(BUILDDIR) -else - rm -f $(BUILDDIR)/.build.* $(BUILDDIR)/*.o $(BUILDDIR)/*.exe - rm -f $(LIBDIR)/lib$(MG5AMC_CXXLIB).so $(LIBDIR)/lib$(MG5AMC_CULIB).so -endif - $(MAKE) -C ../../src clean -f $(CUDACPP_SRC_MAKEFILE) -### rm -rf $(INCDIR) - -cleanall: - @echo - $(MAKE) USEBUILDDIR=0 clean -f $(CUDACPP_MAKEFILE) - @echo - $(MAKE) USEBUILDDIR=0 -C ../../src cleanall -f $(CUDACPP_SRC_MAKEFILE) - rm -rf build.* - # Target: clean the builds as well as the gtest installation(s) -distclean: cleanall +distclean: clean cleansrc ifneq ($(wildcard $(TESTDIRCOMMON)),) $(MAKE) -C $(TESTDIRCOMMON) clean endif @@ -848,50 +384,55 @@ endif #------------------------------------------------------------------------------- -# Target: check (run the C++ test executable) +# Target: check/gcheck (run the C++ test executable) # [NB THIS IS WHAT IS USED IN THE GITHUB CI!] -ifneq ($(NVCC),) -check: runTest cmpFcheck cmpFGcheck -else check: runTest cmpFcheck -endif +gcheck: + $(MAKE) AVX=cuda runTest cmpFGcheck # Target: runTest (run the C++ test executable runTest.exe) -runTest: all.$(TAG) - $(RUNTIME) $(BUILDDIR)/runTest.exe +ifneq ($(AVX),cuda) +runTest: cppbuild + $(RUNTIME) $(CUDACPP_BUILDDIR)/runTest.exe +else +runTest: cudabuild + $(RUNTIME) $(CUDACPP_BUILDDIR)/runTest_cuda.exe +endif + # Target: runCheck (run the C++ standalone executable check.exe, with a small number of events) -runCheck: all.$(TAG) - $(RUNTIME) $(BUILDDIR)/check.exe -p 2 32 2 +runCheck: cppbuild + $(RUNTIME) $(CUDACPP_BUILDDIR)/check.exe -p 2 32 2 # Target: runGcheck (run the CUDA standalone executable gcheck.exe, with a small number of events) -runGcheck: all.$(TAG) - $(RUNTIME) $(BUILDDIR)/gcheck.exe -p 2 32 2 +runGcheck: AVX=cuda +runGcheck: + $(MAKE) AVX=cuda cudabuild + $(RUNTIME) $(CUDACPP_BUILDDIR)/gcheck.exe -p 2 32 2 # Target: runFcheck (run the Fortran standalone executable - with C++ MEs - fcheck.exe, with a small number of events) -runFcheck: all.$(TAG) - $(RUNTIME) $(BUILDDIR)/fcheck.exe 2 32 2 +runFcheck: cppbuild + $(RUNTIME) $(CUDACPP_BUILDDIR)/fcheck.exe 2 32 2 # Target: runFGcheck (run the Fortran standalone executable - with CUDA MEs - fgcheck.exe, with a small number of events) -runFGcheck: all.$(TAG) - $(RUNTIME) $(BUILDDIR)/fgcheck.exe 2 32 2 +runFGcheck: AVX=cuda +runFGcheck: + $(MAKE) AVX=cuda cudabuild + $(RUNTIME) $(CUDACPP_BUILDDIR)/fgcheck.exe 2 32 2 # Target: cmpFcheck (compare ME results from the C++ and Fortran with C++ MEs standalone executables, with a small number of events) -cmpFcheck: all.$(TAG) +cmpFcheck: cppbuild @echo - @echo "$(BUILDDIR)/check.exe --common -p 2 32 2" - @echo "$(BUILDDIR)/fcheck.exe 2 32 2" - @me1=$(shell $(RUNTIME) $(BUILDDIR)/check.exe --common -p 2 32 2 | grep MeanMatrix | awk '{print $$4}'); me2=$(shell $(RUNTIME) $(BUILDDIR)/fcheck.exe 2 32 2 | grep Average | awk '{print $$4}'); echo "Avg ME (C++/C++) = $${me1}"; echo "Avg ME (F77/C++) = $${me2}"; if [ "$${me2}" == "NaN" ]; then echo "ERROR! Fortran calculation (F77/C++) returned NaN"; elif [ "$${me2}" == "" ]; then echo "ERROR! Fortran calculation (F77/C++) crashed"; else python3 -c "me1=$${me1}; me2=$${me2}; reldif=abs((me2-me1)/me1); print('Relative difference =', reldif); ok = reldif <= 2E-4; print ( '%s (relative difference %s 2E-4)' % ( ('OK','<=') if ok else ('ERROR','>') ) ); import sys; sys.exit(0 if ok else 1)"; fi + @echo "$(CUDACPP_BUILDDIR)/check.exe --common -p 2 32 2" + @echo "$(CUDACPP_BUILDDIR)/fcheck.exe 2 32 2" + @me1=$(shell $(RUNTIME) $(CUDACPP_BUILDDIR)/check.exe --common -p 2 32 2 | grep MeanMatrix | awk '{print $$4}'); me2=$(shell $(RUNTIME) $(CUDACPP_BUILDDIR)/fcheck.exe 2 32 2 | grep Average | awk '{print $$4}'); echo "Avg ME (C++/C++) = $${me1}"; echo "Avg ME (F77/C++) = $${me2}"; if [ "$${me2}" == "NaN" ]; then echo "ERROR! Fortran calculation (F77/C++) returned NaN"; elif [ "$${me2}" == "" ]; then echo "ERROR! Fortran calculation (F77/C++) crashed"; else python3 -c "me1=$${me1}; me2=$${me2}; reldif=abs((me2-me1)/me1); print('Relative difference =', reldif); ok = reldif <= 2E-4; print ( '%s (relative difference %s 2E-4)' % ( ('OK','<=') if ok else ('ERROR','>') ) ); import sys; sys.exit(0 if ok else 1)"; fi # Target: cmpFGcheck (compare ME results from the CUDA and Fortran with CUDA MEs standalone executables, with a small number of events) -cmpFGcheck: all.$(TAG) +cmpFGcheck: AVX=cuda +cmpFGcheck: + $(MAKE) AVX=cuda cudabuild @echo - @echo "$(BUILDDIR)/gcheck.exe --common -p 2 32 2" - @echo "$(BUILDDIR)/fgcheck.exe 2 32 2" - @me1=$(shell $(RUNTIME) $(BUILDDIR)/gcheck.exe --common -p 2 32 2 | grep MeanMatrix | awk '{print $$4}'); me2=$(shell $(RUNTIME) $(BUILDDIR)/fgcheck.exe 2 32 2 | grep Average | awk '{print $$4}'); echo "Avg ME (C++/CUDA) = $${me1}"; echo "Avg ME (F77/CUDA) = $${me2}"; if [ "$${me2}" == "NaN" ]; then echo "ERROR! Fortran calculation (F77/CUDA) crashed"; elif [ "$${me2}" == "" ]; then echo "ERROR! Fortran calculation (F77/CUDA) crashed"; else python3 -c "me1=$${me1}; me2=$${me2}; reldif=abs((me2-me1)/me1); print('Relative difference =', reldif); ok = reldif <= 2E-4; print ( '%s (relative difference %s 2E-4)' % ( ('OK','<=') if ok else ('ERROR','>') ) ); import sys; sys.exit(0 if ok else 1)"; fi + @echo "$(CUDACPP_BUILDDIR)/gcheck.exe --common -p 2 32 2" + @echo "$(CUDACPP_BUILDDIR)/fgcheck.exe 2 32 2" + @me1=$(shell $(RUNTIME) $(CUDACPP_BUILDDIR)/gcheck.exe --common -p 2 32 2 | grep MeanMatrix | awk '{print $$4}'); me2=$(shell $(RUNTIME) $(CUDACPP_BUILDDIR)/fgcheck.exe 2 32 2 | grep Average | awk '{print $$4}'); echo "Avg ME (C++/CUDA) = $${me1}"; echo "Avg ME (F77/CUDA) = $${me2}"; if [ "$${me2}" == "NaN" ]; then echo "ERROR! Fortran calculation (F77/CUDA) crashed"; elif [ "$${me2}" == "" ]; then echo "ERROR! Fortran calculation (F77/CUDA) crashed"; else python3 -c "me1=$${me1}; me2=$${me2}; reldif=abs((me2-me1)/me1); print('Relative difference =', reldif); ok = reldif <= 2E-4; print ( '%s (relative difference %s 2E-4)' % ( ('OK','<=') if ok else ('ERROR','>') ) ); import sys; sys.exit(0 if ok else 1)"; fi -# Target: memcheck (run the CUDA standalone executable gcheck.exe with a small number of events through cuda-memcheck) -memcheck: all.$(TAG) - $(RUNTIME) $(CUDA_HOME)/bin/cuda-memcheck --check-api-memory-access yes --check-deprecated-instr yes --check-device-heap yes --demangle full --language c --leak-check full --racecheck-report all --report-api-errors all --show-backtrace yes --tool memcheck --track-unused-memory yes $(BUILDDIR)/gcheck.exe -p 2 32 2 - -#------------------------------------------------------------------------------- diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile index d572486c2e..d229c1cf4d 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile @@ -1,19 +1,22 @@ SHELL := /bin/bash -include ../../Source/make_opts -FFLAGS+= -w +# Include general setup +OPTIONS_MAKEFILE := ../../Source/make_opts +include $(OPTIONS_MAKEFILE) # Enable the C preprocessor https://gcc.gnu.org/onlinedocs/gfortran/Preprocessing-Options.html -FFLAGS+= -cpp +MG_FCFLAGS += -cpp +MG_CXXFLAGS += -I. -# Compile counters with -O3 as in the cudacpp makefile (avoid being "unfair" to Fortran #740) -CXXFLAGS = -O3 -Wall -Wshadow -Wextra +all: help cppnative + +# Target if user does not specify target +help: + $(info No target specified.) + $(info Viable targets are 'cppnative' (default), 'cppnone', 'cppsse4', 'cppavx2', 'cpp512y', 'cpp512z' and 'cuda') + $(info Or 'cppall' for all C++ targets) + $(info Or 'ALL' for all C++ and cuda targets) -# Add -std=c++17 explicitly to avoid build errors on macOS -# Add -mmacosx-version-min=11.3 to avoid "ld: warning: object file was built for newer macOS version than being linked" -ifneq ($(shell $(CXX) --version | egrep '^Apple clang'),) -CXXFLAGS += -std=c++17 -mmacosx-version-min=11.3 -endif # Enable ccache if USECCACHE=1 ifeq ($(USECCACHE)$(shell echo $(CXX) | grep ccache),1) @@ -46,34 +49,25 @@ else MADLOOP_LIB = endif -LINKLIBS = $(LINK_MADLOOP_LIB) $(LINK_LOOP_LIBS) -L$(LIBDIR) -ldhelas -ldsample -lmodel -lgeneric -lpdf -lcernlib $(llhapdf) -lbias - -processid_short=$(shell basename $(CURDIR) | awk -F_ '{print $$(NF-1)"_"$$NF}') -CUDACPP_MAKEFILE=cudacpp.mk -# NB1 Using ":=" below instead of "=" is much faster (it only runs the subprocess once instead of many times) -# NB2 Use '|&' in CUDACPP_BUILDDIR to avoid confusing errors about googletest #507 -# NB3 Do not add a comment inlined "CUDACPP_BUILDDIR=$(shell ...) # comment" as otherwise a trailing space is included... -# NB4 The variables relevant to the cudacpp Makefile must be explicitly passed to $(shell...) -CUDACPP_MAKEENV:=$(shell echo '$(.VARIABLES)' | tr " " "\n" | egrep "(USEBUILDDIR|AVX|FPTYPE|HELINL|HRDCOD)") -###$(info CUDACPP_MAKEENV=$(CUDACPP_MAKEENV)) -###$(info $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))")) -CUDACPP_BUILDDIR:=$(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn 2>&1 | awk '/Building/{print $$3}' | sed s/BUILDDIR=//) -ifeq ($(CUDACPP_BUILDDIR),) -$(error CUDACPP_BUILDDIR='$(CUDACPP_BUILDDIR)' should not be empty!) -else -$(info CUDACPP_BUILDDIR='$(CUDACPP_BUILDDIR)') -endif -CUDACPP_COMMONLIB=mg5amc_common -CUDACPP_CXXLIB=mg5amc_$(processid_short)_cpp -CUDACPP_CULIB=mg5amc_$(processid_short)_cuda - +LINKLIBS = $(LINK_MADLOOP_LIB) $(LINK_LOOP_LIBS) -L$(LIBDIR) -ldhelas -ldsample -lmodel -lgeneric -lpdf -lcernlib $(llhapdf) -lbias LIBS = $(LIBDIR)libbias.$(libext) $(LIBDIR)libdhelas.$(libext) $(LIBDIR)libdsample.$(libext) $(LIBDIR)libgeneric.$(libext) $(LIBDIR)libpdf.$(libext) $(LIBDIR)libgammaUPC.$(libext) $(LIBDIR)libmodel.$(libext) $(LIBDIR)libcernlib.$(libext) $(MADLOOP_LIB) $(LOOP_LIBS) ifneq ("$(wildcard ../../Source/RUNNING)","") LINKLIBS += -lrunning - LIBS += $(LIBDIR)librunning.$(libext) + LIBS += $(LIBDIR)librunning.$(libext) endif +SOURCEDIR_GUARD:=../../Source/.timestamp_guard +# We use $(SOURCEDIR_GUARD) to figure out if Source is out of date. The Source makefile doesn't correctly +# update all files, so we need a proxy that is updated every time we run "$(MAKE) -C ../../Source". +$(SOURCEDIR_GUARD) ../../Source/discretesampler.mod &: ../../Source/*.f ../../Cards/param_card.dat ../../Cards/run_card.dat +ifneq ($(shell which flock 2>/dev/null),) + flock ../../Source/.lock -c "$(MAKE) -C ../../Source; touch $(SOURCEDIR_GUARD)" +else + $(MAKE) -C ../../Source; touch $(SOURCEDIR_GUARD) +endif + +$(LIBS): $(SOURCEDIR_GUARD) # Source files @@ -91,82 +85,83 @@ PROCESS= myamp.o genps.o unwgt.o setcuts.o get_color.o \ DSIG=driver.o $(patsubst %.f, %.o, $(filter-out auto_dsig.f, $(wildcard auto_dsig*.f))) DSIG_cudacpp=driver_cudacpp.o $(patsubst %.f, %_cudacpp.o, $(filter-out auto_dsig.f, $(wildcard auto_dsig*.f))) -SYMMETRY = symmetry.o idenparts.o +SYMMETRY = symmetry.o idenparts.o -# Binaries +# cudacpp targets: +CUDACPP_MAKEFILE := cudacpp.mk +ifneq (,$(wildcard $(CUDACPP_MAKEFILE))) +include $(CUDACPP_MAKEFILE) +endif -ifeq ($(UNAME),Darwin) -LDFLAGS += -lc++ # avoid 'Undefined symbols' for chrono::steady_clock on macOS (checked with otool -L libmg5amc_gg_ttx_cpp.so) -LDFLAGS += -mmacosx-version-min=11.3 # avoid "ld: warning: object file was built for newer macOS version than being linked" -else -LDFLAGS += -Wl,--no-relax # avoid 'failed to convert GOTPCREL relocation' error #458 (not supported on macOS) +ifeq ($(CUDACPP_BUILDDIR),) +$(error CUDACPP_BUILDDIR='$(CUDACPP_BUILDDIR)' should not be empty!) endif +CUDACPP_COMMONLIB=mg5amc_common +CUDACPP_CXXLIB := $(CUDACPP_BUILDDIR)/lib$(MG5AMC_CXXLIB).so +CUDACPP_CULIB := $(CUDACPP_BUILDDIR)/lib$(MG5AMC_CULIB).so -all: $(PROG)_fortran $(CUDACPP_BUILDDIR)/$(PROG)_cpp # also builds $(PROG)_cuda if $(CUDACPP_CULIB) exists (#503) +# Set up OpenMP if supported +OMPFLAGS ?= -fopenmp ifneq ($(shell $(CXX) --version | egrep '^Intel'),) -override OMPFLAGS = -fopenmp LINKLIBS += -liomp5 # see #578 LINKLIBS += -lintlc # undefined reference to `_intel_fast_memcpy' else ifneq ($(shell $(CXX) --version | egrep '^clang'),) -override OMPFLAGS = -fopenmp $(CUDACPP_BUILDDIR)/$(PROG)_cpp: LINKLIBS += -L $(shell dirname $(shell $(CXX) -print-file-name=libc++.so)) -lomp # see #604 else ifneq ($(shell $(CXX) --version | egrep '^Apple clang'),) -override OMPFLAGS = # OMP is not supported yet by cudacpp for Apple clang -else -override OMPFLAGS = -fopenmp +OMPFLAGS = # OMP is not supported yet by cudacpp for Apple clang endif -$(PROG)_fortran: $(PROCESS) $(DSIG) auto_dsig.o $(LIBS) $(MATRIX) counters.o ompnumthreads.o - $(FC) -o $(PROG)_fortran $(PROCESS) $(DSIG) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o $(LDFLAGS) - -$(LIBS): .libs -.libs: ../../Cards/param_card.dat ../../Cards/run_card.dat - cd ../../Source; make - touch $@ +# Binaries -$(CUDACPP_BUILDDIR)/.cudacpplibs: - $(MAKE) -f $(CUDACPP_MAKEFILE) - touch $@ +$(PROG)_fortran: $(PROCESS) $(DSIG) auto_dsig.o $(LIBS) $(MATRIX) counters.o ompnumthreads.o + $(FC) $(MG_FCFLAGS) $(FCFLAGS) -o $(PROG)_fortran $(PROCESS) $(DSIG) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o $(LDFLAGS) # On Linux, set rpath to LIBDIR to make it unnecessary to use LD_LIBRARY_PATH # Use relative paths with respect to the executables ($ORIGIN on Linux) # On Darwin, building libraries with absolute paths in LIBDIR makes this unnecessary -ifeq ($(UNAME_S),Darwin) - override LIBFLAGSRPATH = -else ifeq ($(USEBUILDDIR),1) - override LIBFLAGSRPATH = -Wl,-rpath,'$$ORIGIN/../$(LIBDIR)/$(CUDACPP_BUILDDIR)' -else - override LIBFLAGSRPATH = -Wl,-rpath,'$$ORIGIN/$(LIBDIR)' +ifneq ($(UNAME_S),Darwin) + LIBFLAGSRPATH := -Wl,-rpath,'$$ORIGIN:$$ORIGIN/../$(LIBDIR)/$(CUDACPP_BUILDDIR)' endif -.PHONY: madevent_fortran_link madevent_cuda_link madevent_cpp_link +.PHONY: madevent_fortran_link madevent_cuda_link madevent_cpp_link madevent_cppnone_link madevent_cppsse4_link madevent_cppavx2_link madevent_cpp512y_link madevent_cpp512z_link clean cleanall cleansrc madevent_fortran_link: $(PROG)_fortran rm -f $(PROG) ln -s $(PROG)_fortran $(PROG) -madevent_cpp_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp - rm -f $(PROG) - ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) +madevent_cppnone_link: AVX=none +madevent_cppnone_link: cppnone + ln -sf $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) -madevent_cuda_link: $(CUDACPP_BUILDDIR)/$(PROG)_cuda - rm -f $(PROG) - ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cuda $(PROG) +madevent_cppavx2_link: AVX=avx2 +madevent_cppavx2_link: cppavx2 + ln -sf $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) + +madevent_cpp512y_link: AVX=512y +madevent_cpp512y_link: cppavx512y + ln -sf $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) -# Building $(PROG)_cpp also builds $(PROG)_cuda if $(CUDACPP_CULIB) exists (improved patch for cpp-only builds #503) -$(CUDACPP_BUILDDIR)/$(PROG)_cpp: $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(LIBS) $(MATRIX) counters.o ompnumthreads.o $(CUDACPP_BUILDDIR)/.cudacpplibs - $(FC) -o $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o -L$(LIBDIR)/$(CUDACPP_BUILDDIR) -l$(CUDACPP_COMMONLIB) -l$(CUDACPP_CXXLIB) $(LIBFLAGSRPATH) $(LDFLAGS) - if [ -f $(LIBDIR)/$(CUDACPP_BUILDDIR)/lib$(CUDACPP_CULIB).* ]; then $(FC) -o $(CUDACPP_BUILDDIR)/$(PROG)_cuda $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o -L$(LIBDIR)/$(CUDACPP_BUILDDIR) -l$(CUDACPP_COMMONLIB) -l$(CUDACPP_CULIB) $(LIBFLAGSRPATH) $(LDFLAGS); fi +madevent_cpp512z_link: AVX=512z +madevent_cpp512z_link: cppavx512z + ln -sf $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) -$(CUDACPP_BUILDDIR)/$(PROG)_cuda: $(CUDACPP_BUILDDIR)/$(PROG)_cpp +madevent_cuda_link: AVX=cuda +madevent_cuda_link: cuda + ln -sf $(CUDACPP_BUILDDIR)/$(PROG)_cuda $(PROG) + +$(CUDACPP_BUILDDIR)/$(PROG)_cpp: $(LIBS) $(CUDACPP_CXXLIB) $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) counters.o ompnumthreads.o + $(FC) -o $(CUDACPP_BUILDDIR)/$(PROG)_cpp -L$(LIBDIR)/$(CUDACPP_BUILDDIR) -l$(CUDACPP_COMMONLIB) $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o -L$(CUDACPP_BUILDDIR) -l$(MG5AMC_CXXLIB) $(LIBFLAGSRPATH) $(MG_LDFLAGS) $(LDFLAGS) + +$(CUDACPP_BUILDDIR)/$(PROG)_cuda: $(LIBS) $(CUDACPP_CULIB) $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) counters.o ompnumthreads.o + $(FC) -o $(CUDACPP_BUILDDIR)/$(PROG)_cuda -L$(LIBDIR)/$(CUDACPP_BUILDDIR) -l$(CUDACPP_COMMONLIB) $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o -L$(CUDACPP_BUILDDIR) -l$(MG5AMC_CULIB) $(LIBFLAGSRPATH) $(MG_LDFLAGS) $(LDFLAGS) counters.o: counters.cc timer.h - $(CXX) $(CXXFLAGS) -c $< -o $@ + $(CXX) $(MG_CXXFLAGS) $(CXXFLAGS) -c $< -o $@ ompnumthreads.o: ompnumthreads.cc ompnumthreads.h - $(CXX) -I. $(CXXFLAGS) $(OMPFLAGS) -c $< -o $@ + $(CXX) $(MG_CXXFLAGS) $(CXXFLAGS) $(OMPFLAGS) -c $< -o $@ $(PROG)_forhel: $(PROCESS) auto_dsig.o $(LIBS) $(MATRIX_HEL) $(FC) -o $(PROG)_forhel $(PROCESS) $(MATRIX_HEL) $(LINKLIBS) $(LDFLAGS) $(BIASDEPENDENCIES) $(OMPFLAGS) @@ -174,27 +169,14 @@ $(PROG)_forhel: $(PROCESS) auto_dsig.o $(LIBS) $(MATRIX_HEL) gensym: $(SYMMETRY) configs.inc $(LIBS) $(FC) -o gensym $(SYMMETRY) -L$(LIBDIR) $(LINKLIBS) $(LDFLAGS) -###ifeq (,$(wildcard fbridge.inc)) # Pointless: fbridge.inc always exists as this is the cudacpp-modified makefile! -###$(LIBDIR)libmodel.$(libext): ../../Cards/param_card.dat -### cd ../../Source/MODEL; make -### -###$(LIBDIR)libgeneric.$(libext): ../../Cards/run_card.dat -### cd ../../Source; make -### -###$(LIBDIR)libpdf.$(libext): -### cd ../../Source/PDF; make -### -###$(LIBDIR)libgammaUPC.$(libext): -### cd ../../Source/PDF/gammaUPC; make -###endif # Add source so that the compiler finds the DiscreteSampler module. $(MATRIX): %.o: %.f - $(FC) $(FFLAGS) $(MATRIX_FLAG) -c $< -I../../Source/ -I../../Source/PDF/gammaUPC -%.o: %.f - $(FC) $(FFLAGS) -c $< -I../../Source/ -I../../Source/PDF/gammaUPC + $(FC) $(MG_FCFLAGS) $(FCFLAGS) $(MATRIX_FLAG) -c $< -I../../Source/ -I../../Source/PDF/gammaUPC +%.o $(CUDACPP_BUILDDIR)/%.o: %.f + $(FC) $(MG_FCFLAGS) $(FCFLAGS) -I../../Source/ -I../../Source/PDF/gammaUPC -c $< -o $@ %_cudacpp.o: %.f - $(FC) $(FFLAGS) -c -DMG5AMC_MEEXPORTER_CUDACPP $< -I../../Source/ $(OMPFLAGS) -o $@ + $(FC) $(MG_FCFLAGS) $(FCFLAGS) -c -DMG5AMC_MEEXPORTER_CUDACPP $< -I../../Source/ $(OMPFLAGS) -o $@ # Dependencies @@ -215,60 +197,42 @@ unwgt.o: genps.inc nexternal.inc symswap.inc cluster.inc run.inc message.inc \ initcluster.o: message.inc # Extra dependencies on discretesampler.mod +../../Source/discretesampler.mod: ../../Source/DiscreteSampler.f -auto_dsig.o: .libs -driver.o: .libs -driver_cudacpp.o: .libs -$(MATRIX): .libs -genps.o: .libs +auto_dsig.o: ../../Source/discretesampler.mod +driver.o: ../../Source/discretesampler.mod +driver_cudacpp.o: ../../Source/discretesampler.mod +$(MATRIX): ../../Source/discretesampler.mod +genps.o: ../../Source/discretesampler.mod # Cudacpp avxall targets -UNAME_P := $(shell uname -p) ifeq ($(UNAME_P),ppc64le) -avxall: avxnone avxsse4 +cppall: cppnative cppnone cppsse4 else ifeq ($(UNAME_P),arm) -avxall: avxnone avxsse4 +cppall: cppnative cppnone cppsse4 else -avxall: avxnone avxsse4 avxavx2 avx512y avx512z +cppall: cppnative cppnone cppsse4 cppavx2 cppavx512y cppavx512z endif -avxnone: $(PROG)_fortran $(DSIG_cudacpp) - @echo - $(MAKE) USEBUILDDIR=1 AVX=none - -avxsse4: $(PROG)_fortran $(DSIG_cudacpp) - @echo - $(MAKE) USEBUILDDIR=1 AVX=sse4 - -avxavx2: $(PROG)_fortran $(DSIG_cudacpp) - @echo - $(MAKE) USEBUILDDIR=1 AVX=avx2 - -avx512y: $(PROG)_fortran $(DSIG_cudacpp) - @echo - $(MAKE) USEBUILDDIR=1 AVX=512y - -avx512z: $(PROG)_fortran $(DSIG_cudacpp) - @echo - $(MAKE) USEBUILDDIR=1 AVX=512z - -###endif - -# Clean (NB: 'make clean' in Source calls 'make clean' in all P*) +ALL: cppall cuda -clean: # Clean builds: fortran in this Pn; cudacpp executables for one AVX in this Pn - $(RM) *.o gensym $(PROG) $(PROG)_fortran $(PROG)_forhel $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(CUDACPP_BUILDDIR)/$(PROG)_cuda +# Clean all architecture-specific builds: +clean: + $(RM) *.o gensym $(PROG) $(PROG)_* + $(RM) -rf build.*/*{.o,.so,.exe,.dylib,madevent_*} + @for dir in build.*; do if [ -z "$$(ls -A $${dir})" ]; then rm -r $${dir}; else echo "Not cleaning $${dir}; not empty"; fi; done -cleanavxs: clean # Clean builds: fortran in this Pn; cudacpp for all AVX in this Pn and in src - $(MAKE) -f $(CUDACPP_MAKEFILE) cleanall - rm -f $(CUDACPP_BUILDDIR)/.cudacpplibs - rm -f .libs +cleanall: cleansrc + for PROCESS in ../P[0-9]*; do $(MAKE) -C $${PROCESS} clean; done -cleanall: # Clean builds: fortran in all P* and in Source; cudacpp for all AVX in all P* and in src - make -C ../../Source cleanall - rm -rf $(LIBDIR)libbias.$(libext) - rm -f ../../Source/*.mod ../../Source/*/*.mod +# Clean one architecture-specific build +clean%: + $(RM) -r build.$*_* -distclean: cleanall # Clean all fortran and cudacpp builds as well as the googletest installation - $(MAKE) -f $(CUDACPP_MAKEFILE) distclean +# Clean common source directories (interferes with other P*) +cleansrc: + make -C ../../Source clean + $(RM) -f $(SOURCEDIR_GUARD) ../../Source/{*.mod,.lock} ../../Source/*/*.mod + $(RM) -r $(LIBDIR)libbias.$(libext) + if [ -d ../../src ]; then $(MAKE) -C ../../src -f cudacpp_src.mk clean; fi diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/runTest.cc b/epochX/cudacpp/gg_tt.mad/SubProcesses/runTest.cc index d4a760a71b..734235824a 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/runTest.cc +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/runTest.cc @@ -246,15 +246,15 @@ struct CUDATest : public CUDA_CPU_TestBase #define TESTID_CPU( s ) s##_CPU #define XTESTID_CPU( s ) TESTID_CPU( s ) #define MG_INSTANTIATE_TEST_SUITE_CPU( prefix, test_suite_name ) \ -INSTANTIATE_TEST_SUITE_P( prefix, \ - test_suite_name, \ - testing::Values( new CPUTest( MG_EPOCH_REFERENCE_FILE_NAME ) ) ); + INSTANTIATE_TEST_SUITE_P( prefix, \ + test_suite_name, \ + testing::Values( new CPUTest( MG_EPOCH_REFERENCE_FILE_NAME ) ) ); #define TESTID_GPU( s ) s##_GPU #define XTESTID_GPU( s ) TESTID_GPU( s ) #define MG_INSTANTIATE_TEST_SUITE_GPU( prefix, test_suite_name ) \ -INSTANTIATE_TEST_SUITE_P( prefix, \ - test_suite_name, \ - testing::Values( new CUDATest( MG_EPOCH_REFERENCE_FILE_NAME ) ) ); + INSTANTIATE_TEST_SUITE_P( prefix, \ + test_suite_name, \ + testing::Values( new CUDATest( MG_EPOCH_REFERENCE_FILE_NAME ) ) ); #ifdef __CUDACC__ MG_INSTANTIATE_TEST_SUITE_GPU( XTESTID_GPU( MG_EPOCH_PROCESS_ID ), MadgraphTest ); diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/testxxx.cc b/epochX/cudacpp/gg_tt.mad/SubProcesses/testxxx.cc index 3361fe5aa9..1d315f6d75 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/testxxx.cc +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/testxxx.cc @@ -40,7 +40,7 @@ namespace mg5amcCpu { std::string FPEhandlerMessage = "unknown"; int FPEhandlerIevt = -1; - inline void FPEhandler( int sig ) + inline void FPEhandler( int ) { #ifdef __CUDACC__ std::cerr << "Floating Point Exception (GPU): '" << FPEhandlerMessage << "' ievt=" << FPEhandlerIevt << std::endl; @@ -71,11 +71,10 @@ TEST( XTESTID( MG_EPOCH_PROCESS_ID ), testxxx ) constexpr bool testEvents = !dumpEvents; // run the test? constexpr fptype toleranceXXXs = std::is_same::value ? 1.E-15 : 1.E-5; // Constant parameters - constexpr int neppM = MemoryAccessMomenta::neppM; // AOSOA layout constexpr int np4 = CPPProcess::np4; - const int nevt = 32; // 12 independent tests plus 20 duplicates (need a multiple of 16 for floats '512z') - assert( nevt % neppM == 0 ); // nevt must be a multiple of neppM - assert( nevt % neppV == 0 ); // nevt must be a multiple of neppV + const int nevt = 32; // 12 independent tests plus 20 duplicates (need a multiple of 16 for floats '512z') + assert( nevt % MemoryAccessMomenta::neppM == 0 ); // nevt must be a multiple of neppM + assert( nevt % neppV == 0 ); // nevt must be a multiple of neppV // Fill in the input momenta #ifdef __CUDACC__ mg5amcGpu::PinnedHostBufferMomenta hstMomenta( nevt ); // AOSOA[npagM][npar=4][np4=4][neppM] diff --git a/epochX/cudacpp/gg_tt.mad/bin/internal/banner.py b/epochX/cudacpp/gg_tt.mad/bin/internal/banner.py index bd1517985f..b408679c2f 100755 --- a/epochX/cudacpp/gg_tt.mad/bin/internal/banner.py +++ b/epochX/cudacpp/gg_tt.mad/bin/internal/banner.py @@ -2,11 +2,11 @@ # # Copyright (c) 2011 The MadGraph5_aMC@NLO Development team and Contributors # -# This file is a part of the MadGraph5_aMC@NLO project, an application which +# This file is a part of the MadGraph5_aMC@NLO project, an application which # automatically generates Feynman diagrams and matrix elements for arbitrary # high-energy processes in the Standard Model and beyond. # -# It is subject to the MadGraph5_aMC@NLO license which should accompany this +# It is subject to the MadGraph5_aMC@NLO license which should accompany this # distribution. # # For more information, visit madgraph.phys.ucl.ac.be and amcatnlo.web.cern.ch @@ -53,7 +53,7 @@ MADEVENT = False import madgraph.various.misc as misc import madgraph.iolibs.file_writers as file_writers - import madgraph.iolibs.files as files + import madgraph.iolibs.files as files import models.check_param_card as param_card_reader from madgraph import MG5DIR, MadGraph5Error, InvalidCmd @@ -80,36 +80,36 @@ class Banner(dict): 'mgproccard': 'MGProcCard', 'mgruncard': 'MGRunCard', 'ma5card_parton' : 'MA5Card_parton', - 'ma5card_hadron' : 'MA5Card_hadron', + 'ma5card_hadron' : 'MA5Card_hadron', 'mggenerationinfo': 'MGGenerationInfo', 'mgpythiacard': 'MGPythiaCard', 'mgpgscard': 'MGPGSCard', 'mgdelphescard': 'MGDelphesCard', 'mgdelphestrigger': 'MGDelphesTrigger', 'mgshowercard': 'MGShowerCard' } - + forbid_cdata = ['initrwgt'] - + def __init__(self, banner_path=None): """ """ if isinstance(banner_path, Banner): dict.__init__(self, banner_path) self.lhe_version = banner_path.lhe_version - return + return else: dict.__init__(self) - + #Look at the version if MADEVENT: self['mgversion'] = '#%s\n' % open(pjoin(MEDIR, 'MGMEVersion.txt')).read() else: info = misc.get_pkg_info() self['mgversion'] = info['version']+'\n' - + self.lhe_version = None - + if banner_path: self.read_banner(banner_path) @@ -123,7 +123,7 @@ def __init__(self, banner_path=None): 'mgruncard':'run_card.dat', 'mgpythiacard':'pythia_card.dat', 'mgpgscard' : 'pgs_card.dat', - 'mgdelphescard':'delphes_card.dat', + 'mgdelphescard':'delphes_card.dat', 'mgdelphestrigger':'delphes_trigger.dat', 'mg5proccard':'proc_card_mg5.dat', 'mgproccard': 'proc_card.dat', @@ -137,10 +137,10 @@ def __init__(self, banner_path=None): 'mgshowercard':'shower_card.dat', 'pythia8':'pythia8_card.dat', 'ma5card_parton':'madanalysis5_parton_card.dat', - 'ma5card_hadron':'madanalysis5_hadron_card.dat', + 'ma5card_hadron':'madanalysis5_hadron_card.dat', 'run_settings':'' } - + def read_banner(self, input_path): """read a banner""" @@ -151,7 +151,7 @@ def read_banner(self, input_path): def split_iter(string): return (x.groups(0)[0] for x in re.finditer(r"([^\n]*\n)", string, re.DOTALL)) input_path = split_iter(input_path) - + text = '' store = False for line in input_path: @@ -170,13 +170,13 @@ def split_iter(string): text += line else: text += '%s%s' % (line, '\n') - - #reaching end of the banner in a event file avoid to read full file + + #reaching end of the banner in a event file avoid to read full file if "
" in line: break elif "" in line: break - + def __getattribute__(self, attr): """allow auto-build for the run_card/param_card/... """ try: @@ -187,23 +187,23 @@ def __getattribute__(self, attr): return self.charge_card(attr) - + def change_lhe_version(self, version): """change the lhe version associate to the banner""" - + version = float(version) if version < 3: version = 1 elif version > 3: raise Exception("Not Supported version") self.lhe_version = version - + def get_cross(self, witherror=False): """return the cross-section of the file""" if "init" not in self: raise Exception - + text = self["init"].split('\n') cross = 0 error = 0 @@ -217,13 +217,13 @@ def get_cross(self, witherror=False): return cross else: return cross, math.sqrt(error) - + def scale_init_cross(self, ratio): """modify the init information with the associate scale""" assert "init" in self - + all_lines = self["init"].split('\n') new_data = [] new_data.append(all_lines[0]) @@ -231,29 +231,29 @@ def scale_init_cross(self, ratio): line = all_lines[i] split = line.split() if len(split) == 4: - xsec, xerr, xmax, pid = split + xsec, xerr, xmax, pid = split else: new_data += all_lines[i:] break pid = int(pid) - + line = " %+13.7e %+13.7e %+13.7e %i" % \ (ratio*float(xsec), ratio* float(xerr), ratio*float(xmax), pid) new_data.append(line) self['init'] = '\n'.join(new_data) - + def get_pdg_beam(self): """return the pdg of each beam""" - + assert "init" in self - + all_lines = self["init"].split('\n') pdg1,pdg2,_ = all_lines[0].split(None, 2) return int(pdg1), int(pdg2) - + def load_basic(self, medir): """ Load the proc_card /param_card and run_card """ - + self.add(pjoin(medir,'Cards', 'param_card.dat')) self.add(pjoin(medir,'Cards', 'run_card.dat')) if os.path.exists(pjoin(medir, 'SubProcesses', 'procdef_mg5.dat')): @@ -261,29 +261,29 @@ def load_basic(self, medir): self.add(pjoin(medir,'Cards', 'proc_card_mg5.dat')) else: self.add(pjoin(medir,'Cards', 'proc_card.dat')) - + def change_seed(self, seed): """Change the seed value in the banner""" # 0 = iseed p = re.compile(r'''^\s*\d+\s*=\s*iseed''', re.M) new_seed_str = " %s = iseed" % seed self['mgruncard'] = p.sub(new_seed_str, self['mgruncard']) - + def add_generation_info(self, cross, nb_event): """add info on MGGeneration""" - + text = """ # Number of Events : %s # Integrated weight (pb) : %s """ % (nb_event, cross) self['MGGenerationInfo'] = text - + ############################################################################ # SPLIT BANNER ############################################################################ def split(self, me_dir, proc_card=True): """write the banner in the Cards directory. - proc_card argument is present to avoid the overwrite of proc_card + proc_card argument is present to avoid the overwrite of proc_card information""" for tag, text in self.items(): @@ -305,37 +305,37 @@ def check_pid(self, pid2label): """special routine removing width/mass of particles not present in the model This is usefull in case of loop model card, when we want to use the non loop model.""" - + if not hasattr(self, 'param_card'): self.charge_card('slha') - + for tag in ['mass', 'decay']: block = self.param_card.get(tag) for data in block: pid = data.lhacode[0] - if pid not in list(pid2label.keys()): + if pid not in list(pid2label.keys()): block.remove((pid,)) def get_lha_strategy(self): """get the lha_strategy: how the weight have to be handle by the shower""" - + if not self["init"]: raise Exception("No init block define") - + data = self["init"].split('\n')[0].split() if len(data) != 10: misc.sprint(len(data), self['init']) raise Exception("init block has a wrong format") return int(float(data[-2])) - + def set_lha_strategy(self, value): """set the lha_strategy: how the weight have to be handle by the shower""" - + if not (-4 <= int(value) <= 4): six.reraise(Exception, "wrong value for lha_strategy", value) if not self["init"]: raise Exception("No init block define") - + all_lines = self["init"].split('\n') data = all_lines[0].split() if len(data) != 10: @@ -351,13 +351,13 @@ def modify_init_cross(self, cross, allow_zero=False): assert isinstance(cross, dict) # assert "all" in cross assert "init" in self - + cross = dict(cross) for key in cross.keys(): if isinstance(key, str) and key.isdigit() and int(key) not in cross: cross[int(key)] = cross[key] - - + + all_lines = self["init"].split('\n') new_data = [] new_data.append(all_lines[0]) @@ -365,7 +365,7 @@ def modify_init_cross(self, cross, allow_zero=False): line = all_lines[i] split = line.split() if len(split) == 4: - xsec, xerr, xmax, pid = split + xsec, xerr, xmax, pid = split else: new_data += all_lines[i:] break @@ -383,23 +383,23 @@ def modify_init_cross(self, cross, allow_zero=False): (float(cross[pid]), ratio* float(xerr), ratio*float(xmax), pid) new_data.append(line) self['init'] = '\n'.join(new_data) - + ############################################################################ # WRITE BANNER ############################################################################ def write(self, output_path, close_tag=True, exclude=[]): """write the banner""" - + if isinstance(output_path, str): ff = open(output_path, 'w') else: ff = output_path - + if MADEVENT: header = open(pjoin(MEDIR, 'Source', 'banner_header.txt')).read() else: header = open(pjoin(MG5DIR,'Template', 'LO', 'Source', 'banner_header.txt')).read() - + if not self.lhe_version: self.lhe_version = self.get('run_card', 'lhe_version', default=1.0) if float(self.lhe_version) < 3: @@ -412,7 +412,7 @@ def write(self, output_path, close_tag=True, exclude=[]): for tag in [t for t in self.ordered_items if t in list(self.keys())]+ \ [t for t in self.keys() if t not in self.ordered_items]: - if tag in ['init'] or tag in exclude: + if tag in ['init'] or tag in exclude: continue capitalized_tag = self.capitalized_items[tag] if tag in self.capitalized_items else tag start_data, stop_data = '', '' @@ -422,19 +422,19 @@ def write(self, output_path, close_tag=True, exclude=[]): stop_data = ']]>\n' out = '<%(tag)s>%(start_data)s\n%(text)s\n%(stop_data)s\n' % \ {'tag':capitalized_tag, 'text':self[tag].strip(), - 'start_data': start_data, 'stop_data':stop_data} + 'start_data': start_data, 'stop_data':stop_data} try: ff.write(out) except: ff.write(out.encode('utf-8')) - - + + if not '/header' in exclude: out = '\n' try: ff.write(out) except: - ff.write(out.encode('utf-8')) + ff.write(out.encode('utf-8')) if 'init' in self and not 'init' in exclude: text = self['init'] @@ -444,22 +444,22 @@ def write(self, output_path, close_tag=True, exclude=[]): ff.write(out) except: ff.write(out.encode('utf-8')) - + if close_tag: - out = '\n' + out = '\n' try: ff.write(out) except: - ff.write(out.encode('utf-8')) + ff.write(out.encode('utf-8')) return ff - - + + ############################################################################ # BANNER ############################################################################ def add(self, path, tag=None): """Add the content of the file to the banner""" - + if not tag: card_name = os.path.basename(path) if 'param_card' in card_name: @@ -505,33 +505,33 @@ def add_text(self, tag, text): if tag == 'param_card': tag = 'slha' elif tag == 'run_card': - tag = 'mgruncard' + tag = 'mgruncard' elif tag == 'proc_card': - tag = 'mg5proccard' + tag = 'mg5proccard' elif tag == 'shower_card': tag = 'mgshowercard' elif tag == 'FO_analyse_card': tag = 'foanalyse' - + self[tag.lower()] = text - - + + def charge_card(self, tag): """Build the python object associated to the card""" - + if tag in ['param_card', 'param']: tag = 'slha' elif tag in ['run_card', 'run']: - tag = 'mgruncard' + tag = 'mgruncard' elif tag == 'proc_card': - tag = 'mg5proccard' + tag = 'mg5proccard' elif tag == 'shower_card': tag = 'mgshowercard' elif tag == 'FO_analyse_card': tag = 'foanalyse' assert tag in ['slha', 'mgruncard', 'mg5proccard', 'mgshowercard', 'foanalyse'], 'invalid card %s' % tag - + if tag == 'slha': param_card = self[tag].split('\n') self.param_card = param_card_reader.ParamCard(param_card) @@ -544,56 +544,56 @@ def charge_card(self, tag): self.proc_card = ProcCard(proc_card) return self.proc_card elif tag =='mgshowercard': - shower_content = self[tag] + shower_content = self[tag] if MADEVENT: import internal.shower_card as shower_card else: import madgraph.various.shower_card as shower_card self.shower_card = shower_card.ShowerCard(shower_content, True) - # set testing to false (testing = true allow to init using + # set testing to false (testing = true allow to init using # the card content instead of the card path" self.shower_card.testing = False return self.shower_card elif tag =='foanalyse': - analyse_content = self[tag] + analyse_content = self[tag] if MADEVENT: import internal.FO_analyse_card as FO_analyse_card else: import madgraph.various.FO_analyse_card as FO_analyse_card - # set testing to false (testing = true allow to init using + # set testing to false (testing = true allow to init using # the card content instead of the card path" self.FOanalyse_card = FO_analyse_card.FOAnalyseCard(analyse_content, True) self.FOanalyse_card.testing = False return self.FOanalyse_card - + def get_detail(self, tag, *arg, **opt): """return a specific """ - + if tag in ['param_card', 'param']: tag = 'slha' attr_tag = 'param_card' elif tag in ['run_card', 'run']: - tag = 'mgruncard' + tag = 'mgruncard' attr_tag = 'run_card' elif tag == 'proc_card': - tag = 'mg5proccard' + tag = 'mg5proccard' attr_tag = 'proc_card' elif tag == 'model': - tag = 'mg5proccard' + tag = 'mg5proccard' attr_tag = 'proc_card' arg = ('model',) elif tag == 'generate': - tag = 'mg5proccard' + tag = 'mg5proccard' attr_tag = 'proc_card' arg = ('generate',) elif tag == 'shower_card': tag = 'mgshowercard' attr_tag = 'shower_card' assert tag in ['slha', 'mgruncard', 'mg5proccard', 'shower_card'], '%s not recognized' % tag - + if not hasattr(self, attr_tag): - self.charge_card(attr_tag) + self.charge_card(attr_tag) card = getattr(self, attr_tag) if len(arg) == 0: @@ -613,7 +613,7 @@ def get_detail(self, tag, *arg, **opt): if 'default' in opt: return opt['default'] else: - raise + raise elif len(arg) == 2 and tag == 'slha': try: return card[arg[0]].get(arg[1:]) @@ -621,15 +621,15 @@ def get_detail(self, tag, *arg, **opt): if 'default' in opt: return opt['default'] else: - raise + raise elif len(arg) == 0: return card else: raise Exception("Unknow command") - + #convenient alias get = get_detail - + def set(self, tag, *args): """modify one of the cards""" @@ -637,27 +637,27 @@ def set(self, tag, *args): tag = 'slha' attr_tag = 'param_card' elif tag == 'run_card': - tag = 'mgruncard' + tag = 'mgruncard' attr_tag = 'run_card' elif tag == 'proc_card': - tag = 'mg5proccard' + tag = 'mg5proccard' attr_tag = 'proc_card' elif tag == 'model': - tag = 'mg5proccard' + tag = 'mg5proccard' attr_tag = 'proc_card' arg = ('model',) elif tag == 'generate': - tag = 'mg5proccard' + tag = 'mg5proccard' attr_tag = 'proc_card' arg = ('generate',) elif tag == 'shower_card': tag = 'mgshowercard' attr_tag = 'shower_card' assert tag in ['slha', 'mgruncard', 'mg5proccard', 'shower_card'], 'not recognized' - + if not hasattr(self, attr_tag): - self.charge_card(attr_tag) - + self.charge_card(attr_tag) + card = getattr(self, attr_tag) if len(args) ==2: if tag == 'mg5proccard': @@ -666,20 +666,20 @@ def set(self, tag, *args): card[args[0]] = args[1] else: card[args[:-1]] = args[-1] - - + + @misc.multiple_try() def add_to_file(self, path, seed=None, out=None): """Add the banner to a file and change the associate seed in the banner""" if seed is not None: self.set("run_card", "iseed", seed) - + if not out: path_out = "%s.tmp" % path else: path_out = out - + ff = self.write(path_out, close_tag=False, exclude=['MGGenerationInfo', '/header', 'init']) ff.write("## END BANNER##\n") @@ -698,44 +698,44 @@ def add_to_file(self, path, seed=None, out=None): files.mv(path_out, path) - + def split_banner(banner_path, me_dir, proc_card=True): """a simple way to split a banner""" - + banner = Banner(banner_path) banner.split(me_dir, proc_card) - + def recover_banner(results_object, level, run=None, tag=None): """as input we receive a gen_crossxhtml.AllResults object. This define the current banner and load it """ - + if not run: - try: - _run = results_object.current['run_name'] - _tag = results_object.current['tag'] + try: + _run = results_object.current['run_name'] + _tag = results_object.current['tag'] except Exception: return Banner() else: _run = run if not tag: - try: - _tag = results_object[run].tags[-1] + try: + _tag = results_object[run].tags[-1] except Exception as error: if os.path.exists( pjoin(results_object.path,'Events','%s_banner.txt' % (run))): tag = None else: - return Banner() + return Banner() else: _tag = tag - - path = results_object.path - if tag: + + path = results_object.path + if tag: banner_path = pjoin(path,'Events',run,'%s_%s_banner.txt' % (run, tag)) else: banner_path = pjoin(results_object.path,'Events','%s_banner.txt' % (run)) - + if not os.path.exists(banner_path): if level != "parton" and tag != _tag: return recover_banner(results_object, level, _run, results_object[_run].tags[0]) @@ -754,12 +754,12 @@ def recover_banner(results_object, level, run=None, tag=None): return Banner(lhe.banner) # security if the banner was remove (or program canceled before created it) - return Banner() - + return Banner() + banner = Banner(banner_path) - - - + + + if level == 'pythia': if 'mgpythiacard' in banner: del banner['mgpythiacard'] @@ -768,13 +768,13 @@ def recover_banner(results_object, level, run=None, tag=None): if tag in banner: del banner[tag] return banner - + class InvalidRunCard(InvalidCmd): pass class ProcCard(list): """Basic Proccard object""" - + history_header = \ '#************************************************************\n' + \ '#* MadGraph5_aMC@NLO *\n' + \ @@ -798,10 +798,10 @@ class ProcCard(list): '#* run as ./bin/mg5_aMC filename *\n' + \ '#* *\n' + \ '#************************************************************\n' - - - - + + + + def __init__(self, init=None): """ initialize a basic proc_card""" self.info = {'model': 'sm', 'generate':None, @@ -810,13 +810,13 @@ def __init__(self, init=None): if init: self.read(init) - + def read(self, init): """read the proc_card and save the information""" - + if isinstance(init, str): #path to file init = open(init, 'r') - + store_line = '' for line in init: line = line.rstrip() @@ -828,28 +828,28 @@ def read(self, init): store_line = "" if store_line: raise Exception("WRONG CARD FORMAT") - - + + def move_to_last(self, cmd): """move an element to the last history.""" for line in self[:]: if line.startswith(cmd): self.remove(line) list.append(self, line) - + def append(self, line): """"add a line in the proc_card perform automatically cleaning""" - + line = line.strip() cmds = line.split() if len(cmds) == 0: return - + list.append(self, line) - + # command type: cmd = cmds[0] - + if cmd == 'output': # Remove previous outputs from history self.clean(allow_for_removal = ['output'], keep_switch=True, @@ -875,7 +875,7 @@ def append(self, line): elif cmds[1] == 'proc_v4': #full cleaning self[:] = [] - + def clean(self, to_keep=['set','add','load'], remove_bef_last=None, @@ -884,13 +884,13 @@ def clean(self, to_keep=['set','add','load'], keep_switch=False): """Remove command in arguments from history. All command before the last occurrence of 'remove_bef_last' - (including it) will be removed (but if another options tells the opposite). + (including it) will be removed (but if another options tells the opposite). 'to_keep' is a set of line to always keep. - 'to_remove' is a set of line to always remove (don't care about remove_bef_ + 'to_remove' is a set of line to always remove (don't care about remove_bef_ status but keep_switch acts.). - if 'allow_for_removal' is define only the command in that list can be + if 'allow_for_removal' is define only the command in that list can be remove of the history for older command that remove_bef_lb1. all parameter - present in to_remove are always remove even if they are not part of this + present in to_remove are always remove even if they are not part of this list. keep_switch force to keep the statement remove_bef_??? which changes starts the removal mode. @@ -900,8 +900,8 @@ def clean(self, to_keep=['set','add','load'], if __debug__ and allow_for_removal: for arg in to_keep: assert arg not in allow_for_removal - - + + nline = -1 removal = False #looping backward @@ -912,7 +912,7 @@ def clean(self, to_keep=['set','add','load'], if not removal and remove_bef_last: if self[nline].startswith(remove_bef_last): removal = True - switch = True + switch = True # if this is the switch and is protected pass to the next element if switch and keep_switch: @@ -923,12 +923,12 @@ def clean(self, to_keep=['set','add','load'], if any([self[nline].startswith(arg) for arg in to_remove]): self.pop(nline) continue - + # Only if removal mode is active! if removal: if allow_for_removal: # Only a subset of command can be removed - if any([self[nline].startswith(arg) + if any([self[nline].startswith(arg) for arg in allow_for_removal]): self.pop(nline) continue @@ -936,10 +936,10 @@ def clean(self, to_keep=['set','add','load'], # All command have to be remove but protected self.pop(nline) continue - + # update the counter to pass to the next element nline -= 1 - + def get(self, tag, default=None): if isinstance(tag, int): list.__getattr__(self, tag) @@ -954,32 +954,32 @@ def get(self, tag, default=None): except ValueError: name, content = line[7:].split(None,1) out.append((name, content)) - return out + return out else: return self.info[tag] - + def write(self, path): """write the proc_card to a given path""" - + fsock = open(path, 'w') fsock.write(self.history_header) for line in self: while len(line) > 70: - sub, line = line[:70]+"\\" , line[70:] + sub, line = line[:70]+"\\" , line[70:] fsock.write(sub+"\n") else: fsock.write(line+"\n") - -class InvalidCardEdition(InvalidCmd): pass - + +class InvalidCardEdition(InvalidCmd): pass + class ConfigFile(dict): """ a class for storing/dealing with input file. - """ + """ def __init__(self, finput=None, **opt): """initialize a new instance. input can be an instance of MadLoopParam, - a file, a path to a file, or simply Nothing""" - + a file, a path to a file, or simply Nothing""" + if isinstance(finput, self.__class__): dict.__init__(self) for key in finput.__dict__: @@ -989,7 +989,7 @@ def __init__(self, finput=None, **opt): return else: dict.__init__(self) - + # Initialize it with all the default value self.user_set = set() self.auto_set = set() @@ -1000,15 +1000,15 @@ def __init__(self, finput=None, **opt): self.comments = {} # comment associated to parameters. can be display via help message # store the valid options for a given parameter. self.allowed_value = {} - + self.default_setup() self.plugin_input(finput) - + # if input is define read that input if isinstance(finput, (file, str, StringIO.StringIO)): self.read(finput, **opt) - + @@ -1028,7 +1028,7 @@ def __add__(self, other): base = self.__class__(self) #base = copy.copy(self) base.update((key.lower(),value) for key, value in other.items()) - + return base def __radd__(self, other): @@ -1036,26 +1036,26 @@ def __radd__(self, other): new = copy.copy(other) new.update((key, value) for key, value in self.items()) return new - + def __contains__(self, key): return dict.__contains__(self, key.lower()) def __iter__(self): - + for name in super(ConfigFile, self).__iter__(): yield self.lower_to_case[name.lower()] - - + + #iter = super(ConfigFile, self).__iter__() #misc.sprint(iter) #return (self.lower_to_case[name] for name in iter) - + def keys(self): return [name for name in self] - + def items(self): return [(name,self[name]) for name in self] - + @staticmethod def warn(text, level, raiseerror=False): """convenient proxy to raiseerror/print warning""" @@ -1071,11 +1071,11 @@ def warn(text, level, raiseerror=False): log = lambda t: logger.log(level, t) elif level: log = level - + return log(text) def post_set(self, name, value, change_userdefine, raiseerror): - + if value is None: value = self[name] @@ -1087,25 +1087,25 @@ def post_set(self, name, value, change_userdefine, raiseerror): return getattr(self, 'post_set_%s' % name)(value, change_userdefine, raiseerror) else: raise - + def __setitem__(self, name, value, change_userdefine=False,raiseerror=False): """set the attribute and set correctly the type if the value is a string. change_userdefine on True if we have to add the parameter in user_set """ - + if not len(self): #Should never happen but when deepcopy/pickle self.__init__() - + name = name.strip() - lower_name = name.lower() - + lower_name = name.lower() + # 0. check if this parameter is a system only one if change_userdefine and lower_name in self.system_only: text='%s is a private entry which can not be modify by the user. Keep value at %s' % (name,self[name]) self.warn(text, 'critical', raiseerror) return - + #1. check if the parameter is set to auto -> pass it to special if lower_name in self: targettype = type(dict.__getitem__(self, lower_name)) @@ -1115,22 +1115,22 @@ def __setitem__(self, name, value, change_userdefine=False,raiseerror=False): self.user_set.remove(lower_name) #keep old value. self.post_set(lower_name, 'auto', change_userdefine, raiseerror) - return + return elif lower_name in self.auto_set: self.auto_set.remove(lower_name) - + # 2. Find the type of the attribute that we want if lower_name in self.list_parameter: targettype = self.list_parameter[lower_name] - - - + + + if isinstance(value, str): # split for each comma/space value = value.strip() if value.startswith('[') and value.endswith(']'): value = value[1:-1] - #do not perform split within a " or ' block + #do not perform split within a " or ' block data = re.split(r"((? bad input dropped.append(val) - + if not new_values: text= "value '%s' for entry '%s' is not valid. Preserving previous value: '%s'.\n" \ % (value, name, self[lower_name]) text += "allowed values are any list composed of the following entries: %s" % ', '.join([str(i) for i in self.allowed_value[lower_name]]) - return self.warn(text, 'warning', raiseerror) - elif dropped: + return self.warn(text, 'warning', raiseerror) + elif dropped: text = "some value for entry '%s' are not valid. Invalid items are: '%s'.\n" \ % (name, dropped) text += "value will be set to %s" % new_values - text += "allowed items in the list are: %s" % ', '.join([str(i) for i in self.allowed_value[lower_name]]) + text += "allowed items in the list are: %s" % ', '.join([str(i) for i in self.allowed_value[lower_name]]) self.warn(text, 'warning') values = new_values # make the assignment - dict.__setitem__(self, lower_name, values) + dict.__setitem__(self, lower_name, values) if change_userdefine: self.user_set.add(lower_name) #check for specific action - return self.post_set(lower_name, None, change_userdefine, raiseerror) + return self.post_set(lower_name, None, change_userdefine, raiseerror) elif lower_name in self.dict_parameter: - targettype = self.dict_parameter[lower_name] + targettype = self.dict_parameter[lower_name] full_reset = True #check if we just update the current dict or not - + if isinstance(value, str): value = value.strip() # allowed entry: @@ -1209,7 +1209,7 @@ def __setitem__(self, name, value, change_userdefine=False,raiseerror=False): # name , value => just add the entry # name value => just add the entry # {name1:value1, name2:value2} => full reset - + # split for each comma/space if value.startswith('{') and value.endswith('}'): new_value = {} @@ -1219,23 +1219,23 @@ def __setitem__(self, name, value, change_userdefine=False,raiseerror=False): x, y = pair.split(':') x, y = x.strip(), y.strip() if x.startswith(('"',"'")) and x.endswith(x[0]): - x = x[1:-1] + x = x[1:-1] new_value[x] = y value = new_value elif ',' in value: x,y = value.split(',') value = {x.strip():y.strip()} full_reset = False - + elif ':' in value: x,y = value.split(':') value = {x.strip():y.strip()} - full_reset = False + full_reset = False else: x,y = value.split() value = {x:y} - full_reset = False - + full_reset = False + if isinstance(value, dict): for key in value: value[key] = self.format_variable(value[key], targettype, name=name) @@ -1248,7 +1248,7 @@ def __setitem__(self, name, value, change_userdefine=False,raiseerror=False): if change_userdefine: self.user_set.add(lower_name) return self.post_set(lower_name, None, change_userdefine, raiseerror) - elif name in self: + elif name in self: targettype = type(self[name]) else: logger.debug('Trying to add argument %s in %s. ' % (name, self.__class__.__name__) +\ @@ -1256,22 +1256,22 @@ def __setitem__(self, name, value, change_userdefine=False,raiseerror=False): suggestions = [k for k in self.keys() if k.startswith(name[0].lower())] if len(suggestions)>0: logger.debug("Did you mean one of the following: %s"%suggestions) - self.add_param(lower_name, self.format_variable(UnknownType(value), + self.add_param(lower_name, self.format_variable(UnknownType(value), UnknownType, name)) self.lower_to_case[lower_name] = name if change_userdefine: self.user_set.add(lower_name) return self.post_set(lower_name, None, change_userdefine, raiseerror) - + value = self.format_variable(value, targettype, name=name) #check that the value is allowed: if lower_name in self.allowed_value and '*' not in self.allowed_value[lower_name]: valid = False allowed = self.allowed_value[lower_name] - + # check if the current value is allowed or not (set valid to True) if value in allowed: - valid=True + valid=True elif isinstance(value, str): value = value.lower().strip() allowed = [str(v).lower() for v in allowed] @@ -1279,7 +1279,7 @@ def __setitem__(self, name, value, change_userdefine=False,raiseerror=False): i = allowed.index(value) value = self.allowed_value[lower_name][i] valid=True - + if not valid: # act if not valid: text = "value '%s' for entry '%s' is not valid. Preserving previous value: '%s'.\n" \ @@ -1303,7 +1303,7 @@ def add_param(self, name, value, system=False, comment=False, typelist=None, if __debug__: if lower_name in self: raise Exception("Duplicate case for %s in %s" % (name,self.__class__)) - + dict.__setitem__(self, lower_name, value) self.lower_to_case[lower_name] = name if isinstance(value, list): @@ -1318,12 +1318,12 @@ def add_param(self, name, value, system=False, comment=False, typelist=None, elif isinstance(value, dict): allvalues = list(value.values()) if any([type(allvalues[0]) != type(v) for v in allvalues]): - raise Exception("All entry should have the same type") - self.dict_parameter[lower_name] = type(allvalues[0]) + raise Exception("All entry should have the same type") + self.dict_parameter[lower_name] = type(allvalues[0]) if '__type__' in value: del value['__type__'] dict.__setitem__(self, lower_name, value) - + if allowed and allowed != ['*']: self.allowed_value[lower_name] = allowed if lower_name in self.list_parameter: @@ -1333,8 +1333,8 @@ def add_param(self, name, value, system=False, comment=False, typelist=None, assert value in allowed or '*' in allowed #elif isinstance(value, bool) and allowed != ['*']: # self.allowed_value[name] = [True, False] - - + + if system: self.system_only.add(lower_name) if comment: @@ -1342,7 +1342,7 @@ def add_param(self, name, value, system=False, comment=False, typelist=None, def do_help(self, name): """return a minimal help for the parameter""" - + out = "## Information on parameter %s from class %s\n" % (name, self.__class__.__name__) if name.lower() in self: out += "## current value: %s (parameter should be of type %s)\n" % (self[name], type(self[name])) @@ -1351,7 +1351,7 @@ def do_help(self, name): else: out += "## Unknown for this class\n" if name.lower() in self.user_set: - out += "## This value is considered as being set by the user\n" + out += "## This value is considered as being set by the user\n" else: out += "## This value is considered as being set by the system\n" if name.lower() in self.allowed_value: @@ -1359,17 +1359,17 @@ def do_help(self, name): out += "Allowed value are: %s\n" % ','.join([str(p) for p in self.allowed_value[name.lower()]]) else: out += "Suggested value are : %s\n " % ','.join([str(p) for p in self.allowed_value[name.lower()] if p!='*']) - + logger.info(out) return out @staticmethod def guess_type_from_value(value): "try to guess the type of the string --do not use eval as it might not be safe" - + if not isinstance(value, str): return str(value.__class__.__name__) - + #use ast.literal_eval to be safe since value is untrusted # add a timeout to mitigate infinite loop, memory stack attack with misc.stdchannel_redirected(sys.stdout, os.devnull): @@ -1388,7 +1388,7 @@ def guess_type_from_value(value): @staticmethod def format_variable(value, targettype, name="unknown"): """assign the value to the attribute for the given format""" - + if isinstance(targettype, str): if targettype in ['str', 'int', 'float', 'bool']: targettype = eval(targettype) @@ -1412,7 +1412,7 @@ def format_variable(value, targettype, name="unknown"): (name, type(value), targettype, value)) else: raise InvalidCmd("Wrong input type for %s found %s and expecting %s for value %s" %\ - (name, type(value), targettype, value)) + (name, type(value), targettype, value)) else: if targettype != UnknownType: value = value.strip() @@ -1441,8 +1441,8 @@ def format_variable(value, targettype, name="unknown"): value = int(value) elif value.endswith(('k', 'M')) and value[:-1].isdigit(): convert = {'k':1000, 'M':1000000} - value =int(value[:-1]) * convert[value[-1]] - elif '/' in value or '*' in value: + value =int(value[:-1]) * convert[value[-1]] + elif '/' in value or '*' in value: try: split = re.split('(\*|/)',value) v = float(split[0]) @@ -1461,7 +1461,7 @@ def format_variable(value, targettype, name="unknown"): try: value = float(value.replace('d','e')) except ValueError: - raise InvalidCmd("%s can not be mapped to an integer" % value) + raise InvalidCmd("%s can not be mapped to an integer" % value) try: new_value = int(value) except ValueError: @@ -1471,7 +1471,7 @@ def format_variable(value, targettype, name="unknown"): value = new_value else: raise InvalidCmd("incorect input: %s need an integer for %s" % (value,name)) - + elif targettype == float: if value.endswith(('k', 'M')) and value[:-1].isdigit(): convert = {'k':1000, 'M':1000000} @@ -1496,33 +1496,33 @@ def format_variable(value, targettype, name="unknown"): value = v else: raise InvalidCmd("type %s is not handle by the card" % targettype) - + return value - - + + def __getitem__(self, name): - + lower_name = name.lower() if __debug__: if lower_name not in self: if lower_name in [key.lower() for key in self] : raise Exception("Some key are not lower case %s. Invalid use of the class!"\ % [key for key in self if key.lower() != key]) - + if lower_name in self.auto_set: return 'auto' - + return dict.__getitem__(self, name.lower()) - + get = __getitem__ def set(self, name, value, changeifuserset=True, user=False, raiseerror=False): """convenient way to change attribute. changeifuserset=False means that the value is NOT change is the value is not on default. - user=True, means that the value will be marked as modified by the user - (potentially preventing future change to the value) + user=True, means that the value will be marked as modified by the user + (potentially preventing future change to the value) """ # changeifuserset=False -> we need to check if the user force a value. @@ -1530,8 +1530,8 @@ def set(self, name, value, changeifuserset=True, user=False, raiseerror=False): if name.lower() in self.user_set: #value modified by the user -> do nothing return - self.__setitem__(name, value, change_userdefine=user, raiseerror=raiseerror) - + self.__setitem__(name, value, change_userdefine=user, raiseerror=raiseerror) + class RivetCard(ConfigFile): @@ -1706,7 +1706,7 @@ def setRelevantParamCard(self, f_params, f_relparams): yexec_dict = {} yexec_line = exec_line + "yaxis_relvar = " + self['yaxis_relvar'] exec(yexec_line, locals(), yexec_dict) - if self['yaxis_label'] == "": + if self['yaxis_label'] == "": self['yaxis_label'] = "yaxis_relvar" f_relparams.write("{0} = {1}\n".format(self['yaxis_label'], yexec_dict['yaxis_relvar'])) else: @@ -1715,11 +1715,11 @@ def setRelevantParamCard(self, f_params, f_relparams): class ProcCharacteristic(ConfigFile): """A class to handle information which are passed from MadGraph to the madevent - interface.""" - + interface.""" + def default_setup(self): """initialize the directory to the default value""" - + self.add_param('loop_induced', False) self.add_param('has_isr', False) self.add_param('has_fsr', False) @@ -1735,16 +1735,16 @@ def default_setup(self): self.add_param('pdg_initial1', [0]) self.add_param('pdg_initial2', [0]) self.add_param('splitting_types',[], typelist=str) - self.add_param('perturbation_order', [], typelist=str) - self.add_param('limitations', [], typelist=str) - self.add_param('hel_recycling', False) + self.add_param('perturbation_order', [], typelist=str) + self.add_param('limitations', [], typelist=str) + self.add_param('hel_recycling', False) self.add_param('single_color', True) - self.add_param('nlo_mixed_expansion', True) + self.add_param('nlo_mixed_expansion', True) def read(self, finput): - """Read the input file, this can be a path to a file, + """Read the input file, this can be a path to a file, a file object, a str with the content of the file.""" - + if isinstance(finput, str): if "\n" in finput: finput = finput.split('\n') @@ -1752,49 +1752,49 @@ def read(self, finput): finput = open(finput) else: raise Exception("No such file %s" % finput) - + for line in finput: if '#' in line: line = line.split('#',1)[0] if not line: continue - + if '=' in line: key, value = line.split('=',1) self[key.strip()] = value - + def write(self, outputpath): """write the file""" template ="# Information about the process #\n" template +="#########################################\n" - + fsock = open(outputpath, 'w') fsock.write(template) - + for key, value in self.items(): fsock.write(" %s = %s \n" % (key, value)) - - fsock.close() - + + fsock.close() + class GridpackCard(ConfigFile): """an object for the GridpackCard""" - + def default_setup(self): """default value for the GridpackCard""" - + self.add_param("GridRun", True) self.add_param("gevents", 2500) self.add_param("gseed", 1) - self.add_param("ngran", -1) - + self.add_param("ngran", -1) + def read(self, finput): - """Read the input file, this can be a path to a file, + """Read the input file, this can be a path to a file, a file object, a str with the content of the file.""" - + if isinstance(finput, str): if "\n" in finput: finput = finput.split('\n') @@ -1802,7 +1802,7 @@ def read(self, finput): finput = open(finput) else: raise Exception("No such file %s" % finput) - + for line in finput: line = line.split('#')[0] line = line.split('!')[0] @@ -1812,19 +1812,19 @@ def read(self, finput): self[line[1].strip()] = line[0].replace('\'','').strip() def write(self, output_file, template=None): - """Write the run_card in output_file according to template + """Write the run_card in output_file according to template (a path to a valid run_card)""" if not template: if not MADEVENT: - template = pjoin(MG5DIR, 'Template', 'LO', 'Cards', + template = pjoin(MG5DIR, 'Template', 'LO', 'Cards', 'grid_card_default.dat') else: template = pjoin(MEDIR, 'Cards', 'grid_card_default.dat') - + text = "" - for line in open(template,'r'): + for line in open(template,'r'): nline = line.split('#')[0] nline = nline.split('!')[0] comment = line[len(nline):] @@ -1832,19 +1832,19 @@ def write(self, output_file, template=None): if len(nline) != 2: text += line elif nline[1].strip() in self: - text += ' %s\t= %s %s' % (self[nline[1].strip()],nline[1], comment) + text += ' %s\t= %s %s' % (self[nline[1].strip()],nline[1], comment) else: logger.info('Adding missing parameter %s to current run_card (with default value)' % nline[1].strip()) - text += line - + text += line + if isinstance(output_file, str): fsock = open(output_file,'w') else: fsock = output_file - + fsock.write(text) fsock.close() - + class PY8Card(ConfigFile): """ Implements the Pythia8 card.""" @@ -1868,7 +1868,7 @@ def add_default_subruns(self, type): def default_setup(self): """ Sets up the list of available PY8 parameters.""" - + # Visible parameters # ================== self.add_param("Main:numberOfEvents", -1) @@ -1877,11 +1877,11 @@ def default_setup(self): self.add_param("JetMatching:qCut", -1.0, always_write_to_card=False) self.add_param("JetMatching:doShowerKt",False,always_write_to_card=False) # -1 means that it is automatically set. - self.add_param("JetMatching:nJetMax", -1, always_write_to_card=False) + self.add_param("JetMatching:nJetMax", -1, always_write_to_card=False) # for CKKWL merging self.add_param("Merging:TMS", -1.0, always_write_to_card=False) self.add_param("Merging:Process", '', always_write_to_card=False) - # -1 means that it is automatically set. + # -1 means that it is automatically set. self.add_param("Merging:nJetMax", -1, always_write_to_card=False) # for both merging, chose whether to also consider different merging # scale values for the extra weights related to scale and PDF variations. @@ -1918,10 +1918,10 @@ def default_setup(self): comment='This allows to turn on/off hadronization alltogether.') self.add_param("partonlevel:mpi", True, hidden=True, always_write_to_card=False, comment='This allows to turn on/off MPI alltogether.') - self.add_param("Beams:setProductionScalesFromLHEF", False, hidden=True, + self.add_param("Beams:setProductionScalesFromLHEF", False, hidden=True, always_write_to_card=False, comment='This parameter is automatically set to True by MG5aMC when doing MLM merging with PY8.') - + # for MLM merging self.add_param("JetMatching:merge", False, hidden=True, always_write_to_card=False, comment='Specifiy if we are merging sample of different multiplicity.') @@ -1931,9 +1931,9 @@ def default_setup(self): comment='Value of the merging scale below which one does not even write the HepMC event.') self.add_param("JetMatching:doVeto", False, hidden=True, always_write_to_card=False, comment='Do veto externally (e.g. in SysCalc).') - self.add_param("JetMatching:scheme", 1, hidden=True, always_write_to_card=False) + self.add_param("JetMatching:scheme", 1, hidden=True, always_write_to_card=False) self.add_param("JetMatching:setMad", False, hidden=True, always_write_to_card=False, - comment='Specify one must read inputs from the MadGraph banner.') + comment='Specify one must read inputs from the MadGraph banner.') self.add_param("JetMatching:coneRadius", 1.0, hidden=True, always_write_to_card=False) self.add_param("JetMatching:nQmatch",4,hidden=True, always_write_to_card=False) # for CKKWL merging (common with UMEPS, UNLOPS) @@ -1946,7 +1946,7 @@ def default_setup(self): self.add_param("Merging:applyVeto", False, hidden=True, always_write_to_card=False, comment='Do veto externally (e.g. in SysCalc).') self.add_param("Merging:includeWeightInXsection", True, hidden=True, always_write_to_card=False, - comment='If turned off, then the option belows forces PY8 to keep the original weight.') + comment='If turned off, then the option belows forces PY8 to keep the original weight.') self.add_param("Merging:muRen", 91.188, hidden=True, always_write_to_card=False, comment='Set renormalization scales of the 2->2 process.') self.add_param("Merging:muFacInME", 91.188, hidden=True, always_write_to_card=False, @@ -1958,7 +1958,7 @@ def default_setup(self): # To be added in subruns for CKKWL self.add_param("Merging:mayRemoveDecayProducts", False, hidden=True, always_write_to_card=False) self.add_param("Merging:doKTMerging", False, hidden=True, always_write_to_card=False) - self.add_param("Merging:Dparameter", 0.4, hidden=True, always_write_to_card=False) + self.add_param("Merging:Dparameter", 0.4, hidden=True, always_write_to_card=False) self.add_param("Merging:doPTLundMerging", False, hidden=True, always_write_to_card=False) # Special Pythia8 paremeters useful to simplify the shower. @@ -1975,33 +1975,33 @@ def default_setup(self): # Add parameters controlling the subruns execution flow. # These parameters should not be part of PY8SubRun daughter. self.add_default_subruns('parameters') - + def __init__(self, *args, **opts): - # Parameters which are not printed in the card unless they are - # 'user_set' or 'system_set' or part of the + # Parameters which are not printed in the card unless they are + # 'user_set' or 'system_set' or part of the # self.hidden_params_to_always_print set. self.hidden_param = [] self.hidden_params_to_always_write = set() self.visible_params_to_always_write = set() # List of parameters that should never be written out given the current context. self.params_to_never_write = set() - + # Parameters which have been set by the system (i.e. MG5 itself during # the regular course of the shower interface) self.system_set = set() - + # Add attributes controlling the subruns execution flow. # These attributes should not be part of PY8SubRun daughter. self.add_default_subruns('attributes') - - # Parameters which have been set by the + + # Parameters which have been set by the super(PY8Card, self).__init__(*args, **opts) - def add_param(self, name, value, hidden=False, always_write_to_card=True, + def add_param(self, name, value, hidden=False, always_write_to_card=True, comment=None): - """ add a parameter to the card. value is the default value and + """ add a parameter to the card. value is the default value and defines the type (int/float/bool/str) of the input. The option 'hidden' decides whether the parameter should be visible to the user. The option 'always_write_to_card' decides whether it should @@ -2017,7 +2017,7 @@ def add_param(self, name, value, hidden=False, always_write_to_card=True, self.hidden_params_to_always_write.add(name) else: if always_write_to_card: - self.visible_params_to_always_write.add(name) + self.visible_params_to_always_write.add(name) if not comment is None: if not isinstance(comment, str): raise MadGraph5Error("Option 'comment' must be a string, not"+\ @@ -2036,7 +2036,7 @@ def add_subrun(self, py8_subrun): self.subruns[py8_subrun['Main:subrun']] = py8_subrun if not 'LHEFInputs:nSubruns' in self.user_set: self['LHEFInputs:nSubruns'] = max(self.subruns.keys()) - + def userSet(self, name, value, **opts): """Set an attribute of this card, following a user_request""" self.__setitem__(name, value, change_userdefine=True, **opts) @@ -2044,10 +2044,10 @@ def userSet(self, name, value, **opts): self.system_set.remove(name.lower()) def vetoParamWriteOut(self, name): - """ Forbid the writeout of a specific parameter of this card when the + """ Forbid the writeout of a specific parameter of this card when the "write" function will be invoked.""" self.params_to_never_write.add(name.lower()) - + def systemSet(self, name, value, **opts): """Set an attribute of this card, independently of a specific user request and only if not already user_set.""" @@ -2058,7 +2058,7 @@ def systemSet(self, name, value, **opts): if force or name.lower() not in self.user_set: self.__setitem__(name, value, change_userdefine=False, **opts) self.system_set.add(name.lower()) - + def MadGraphSet(self, name, value, **opts): """ Sets a card attribute, but only if it is absent or not already user_set.""" @@ -2068,18 +2068,18 @@ def MadGraphSet(self, name, value, **opts): force = False if name.lower() not in self or (force or name.lower() not in self.user_set): self.__setitem__(name, value, change_userdefine=False, **opts) - self.system_set.add(name.lower()) - + self.system_set.add(name.lower()) + def defaultSet(self, name, value, **opts): self.__setitem__(name, value, change_userdefine=False, **opts) - + @staticmethod def pythia8_formatting(value, formatv=None): """format the variable into pythia8 card convention. The type is detected by default""" if not formatv: if isinstance(value,UnknownType): - formatv = 'unknown' + formatv = 'unknown' elif isinstance(value, bool): formatv = 'bool' elif isinstance(value, int): @@ -2095,7 +2095,7 @@ def pythia8_formatting(value, formatv=None): formatv = 'str' else: assert formatv - + if formatv == 'unknown': # No formatting then return str(value) @@ -2116,7 +2116,7 @@ def pythia8_formatting(value, formatv=None): elif formatv == 'float': return '%.10e' % float(value) elif formatv == 'shortfloat': - return '%.3f' % float(value) + return '%.3f' % float(value) elif formatv == 'str': return "%s" % value elif formatv == 'list': @@ -2124,9 +2124,9 @@ def pythia8_formatting(value, formatv=None): return ','.join([PY8Card.pythia8_formatting(arg, 'shortfloat') for arg in value]) else: return ','.join([PY8Card.pythia8_formatting(arg) for arg in value]) - - def write(self, output_file, template, read_subrun=False, + + def write(self, output_file, template, read_subrun=False, print_only_visible=False, direct_pythia_input=False, add_missing=True): """ Write the card to output_file using a specific template. > 'print_only_visible' specifies whether or not the hidden parameters @@ -2143,28 +2143,28 @@ def write(self, output_file, template, read_subrun=False, or p.lower() in self.user_set] # Filter against list of parameters vetoed for write-out visible_param = [p for p in visible_param if p.lower() not in self.params_to_never_write] - + # Now the hidden param which must be written out if print_only_visible: hidden_output_param = [] else: hidden_output_param = [p for p in self if p.lower() in self.hidden_param and not p.lower() in self.user_set and - (p.lower() in self.hidden_params_to_always_write or + (p.lower() in self.hidden_params_to_always_write or p.lower() in self.system_set)] # Filter against list of parameters vetoed for write-out hidden_output_param = [p for p in hidden_output_param if p not in self.params_to_never_write] - + if print_only_visible: subruns = [] else: if not read_subrun: subruns = sorted(self.subruns.keys()) - + # Store the subruns to write in a dictionary, with its ID in key # and the corresponding stringstream in value subruns_to_write = {} - + # Sort these parameters nicely so as to put together parameters # belonging to the same group (i.e. prefix before the ':' in their name). def group_params(params): @@ -2191,7 +2191,7 @@ def group_params(params): # First dump in a temporary_output (might need to have a second pass # at the very end to update 'LHEFInputs:nSubruns') output = StringIO.StringIO() - + # Setup template from which to read if isinstance(template, str): if os.path.isfile(template): @@ -2199,7 +2199,7 @@ def group_params(params): elif '\n' in template: tmpl = StringIO.StringIO(template) else: - raise Exception("File input '%s' not found." % file_input) + raise Exception("File input '%s' not found." % file_input) elif template is None: # Then use a dummy empty StringIO, hence skipping the reading tmpl = StringIO.StringIO() @@ -2257,8 +2257,8 @@ def group_params(params): # Remove all of its variables (so that nothing is overwritten) DummySubrun.clear() DummySubrun.write(subruns_to_write[int(value)], - tmpl, read_subrun=True, - print_only_visible=print_only_visible, + tmpl, read_subrun=True, + print_only_visible=print_only_visible, direct_pythia_input=direct_pythia_input) logger.info('Adding new unknown subrun with ID %d.'% @@ -2267,7 +2267,7 @@ def group_params(params): last_pos = tmpl.tell() line = tmpl.readline() continue - + # Change parameters which must be output if param in visible_param: new_value = PY8Card.pythia8_formatting(self[param]) @@ -2286,10 +2286,10 @@ def group_params(params): last_pos = tmpl.tell() line = tmpl.readline() continue - - # Substitute the value. + + # Substitute the value. # If it is directly the pytia input, then don't write the param if it - # is not in the list of visible_params_to_always_write and was + # is not in the list of visible_params_to_always_write and was # not user_set or system_set if ((not direct_pythia_input) or (param.lower() in self.visible_params_to_always_write) or @@ -2304,16 +2304,16 @@ def group_params(params): output.write(template%(param_entry, value_entry.replace(value,new_value))) - + # Proceed to next line last_pos = tmpl.tell() line = tmpl.readline() - + # If add_missing is False, make sure to empty the list of remaining parameters if not add_missing: visible_param = [] hidden_output_param = [] - + # Now output the missing parameters. Warn about visible ones. if len(visible_param)>0 and not template is None: output.write( @@ -2343,12 +2343,12 @@ def group_params(params): """%(' for subrun %d'%self['Main:subrun'] if 'Main:subrun' in self else '')) for param in hidden_output_param: if param.lower() in self.comments: - comment = '\n'.join('! %s'%c for c in + comment = '\n'.join('! %s'%c for c in self.comments[param.lower()].split('\n')) output.write(comment+'\n') output.write('%s=%s\n'%(param,PY8Card.pythia8_formatting(self[param]))) - - # Don't close the file if we were reading a subrun, but simply write + + # Don't close the file if we were reading a subrun, but simply write # output and return now if read_subrun: output_file.write(output.getvalue()) @@ -2382,12 +2382,12 @@ def group_params(params): out.close() else: output_file.write(output.getvalue()) - + def read(self, file_input, read_subrun=False, setter='default'): - """Read the input file, this can be a path to a file, + """Read the input file, this can be a path to a file, a file object, a str with the content of the file. - The setter option choses the authority that sets potential - modified/new parameters. It can be either: + The setter option choses the authority that sets potential + modified/new parameters. It can be either: 'default' or 'user' or 'system'""" if isinstance(file_input, str): if "\n" in file_input: @@ -2423,8 +2423,8 @@ def read(self, file_input, read_subrun=False, setter='default'): raise MadGraph5Error("Could not read line '%s' of Pythia8 card."%\ line) if '!' in value: - value,_ = value.split('!',1) - + value,_ = value.split('!',1) + # Read a subrun if detected: if param=='Main:subrun': if read_subrun: @@ -2451,7 +2451,7 @@ def read(self, file_input, read_subrun=False, setter='default'): last_pos = finput.tell() line = finput.readline() continue - + # Read parameter. The case of a parameter not defined in the card is # handled directly in ConfigFile. @@ -2478,7 +2478,7 @@ def add_default_subruns(self, type): def __init__(self, *args, **opts): """ Initialize a subrun """ - + # Force user to set it manually. subrunID = -1 if 'subrun_id' in opts: @@ -2489,7 +2489,7 @@ def __init__(self, *args, **opts): def default_setup(self): """Sets up the list of available PY8SubRun parameters.""" - + # Add all default PY8Card parameters super(PY8SubRun, self).default_setup() # Make sure they are all hidden @@ -2501,33 +2501,33 @@ def default_setup(self): self.add_param("Main:subrun", -1) self.add_param("Beams:LHEF", "events.lhe.gz") - + class RunBlock(object): """ Class for a series of parameter in the run_card that can be either visible or hidden. - name: allow to set in the default run_card $name to set where that + name: allow to set in the default run_card $name to set where that block need to be inserted template_on: information to include is block is active template_off: information to include is block is not active on_fields/off_fields: paramater associated to the block - can be specify but are otherwise automatically but + can be specify but are otherwise automatically but otherwise determined from the template. - + function: status(self,run_card) -> return which template need to be used check_validity(self, runcard) -> sanity check - create_default_for_process(self, run_card, proc_characteristic, - history, proc_def) + create_default_for_process(self, run_card, proc_characteristic, + history, proc_def) post_set_XXXX(card, value, change_userdefine, raiseerror) -> fct called when XXXXX is set post_set(card, value, change_userdefine, raiseerror, **opt) -> fct called when a parameter is changed - -> no access to parameter name + -> no access to parameter name -> not called if post_set_XXXX is defined """ - - + + def __init__(self, name, template_on, template_off, on_fields=False, off_fields=False): self.name = name @@ -2550,7 +2550,7 @@ def fields(self): def find_fields_from_template(template): """ return the list of fields from a template. checking line like %(mass_ion2)s = mass_ion2 # mass of the heavy ion (second beam) """ - + return re.findall(r"^\s*%\((.*)\)s\s*=\s*\1", template, re.M) def get_template(self, card): @@ -2565,7 +2565,7 @@ def get_unused_template(self, card): if self.status(card): return self.template_off else: - return self.template_on + return self.template_on def status(self, card): """return False if template_off to be used, True if template_on to be used""" @@ -2594,20 +2594,20 @@ def manage_parameters(self, card, written, to_write): written.add(name) if name in to_write: to_write.remove(name) - + def check_validity(self, runcard): """run self consistency check here --avoid to use runcard[''] = xxx here since it can trigger post_set function""" return def create_default_for_process(self, run_card, proc_characteristic, history, proc_def): - return + return # @staticmethod # def post_set(card, value, change_userdefine, raiseerror, **opt): # """default action to run when a parameter of the block is defined. # Here we do not know which parameter is modified. if this is needed. # then one need to define post_set_XXXXX(card, value, change_userdefine, raiseerror) -# and then only that function is used +# and then only that function is used # """ # # if 'pdlabel' in card.user_set: @@ -2621,7 +2621,7 @@ class RunCard(ConfigFile): blocks = [] parameter_in_block = {} - allowed_lep_densities = {} + allowed_lep_densities = {} default_include_file = 'run_card.inc' default_autodef_file = 'run.inc' donewarning = [] @@ -2637,7 +2637,7 @@ def plugin_input(self, finput): curr_dir = os.path.dirname(os.path.dirname(finput.name)) elif isinstance(finput, str): curr_dir = os.path.dirname(os.path.dirname(finput)) - + if curr_dir: if os.path.exists(pjoin(curr_dir, 'bin', 'internal', 'plugin_run_card')): # expected format {} passing everything as optional argument @@ -2646,7 +2646,7 @@ def plugin_input(self, finput): continue opts = dict(eval(line)) self.add_param(**opts) - + @classmethod def fill_post_set_from_blocks(cls): """set the post_set function for any parameter defined in a run_block""" @@ -2659,8 +2659,8 @@ def fill_post_set_from_blocks(cls): elif hasattr(block, 'post_set'): setattr(cls, 'post_set_%s' % parameter, block.post_set) cls.parameter_in_block[parameter] = block - - + + def __new__(cls, finput=None, **opt): cls.fill_post_set_from_blocks() @@ -2718,9 +2718,9 @@ def __new__(cls, finput=None, **opt): return super(RunCard, cls).__new__(cls, finput, **opt) def __init__(self, *args, **opts): - + # The following parameter are updated in the defaultsetup stage. - + #parameter for which no warning should be raised if not define self.hidden_param = [] # in which include file the parameer should be written @@ -2739,11 +2739,11 @@ def __init__(self, *args, **opts): self.cuts_parameter = {} # parameter added where legacy requires an older value. self.system_default = {} - + self.display_block = [] # set some block to be displayed self.fct_mod = {} # {param: (fct_pointer, *argument, **opts)} - self.cut_class = {} + self.cut_class = {} self.warned=False @@ -2776,11 +2776,11 @@ def get_lepton_densities(cls): else: cls.allowed_lep_densities[identity].append(name) - def add_param(self, name, value, fortran_name=None, include=True, + def add_param(self, name, value, fortran_name=None, include=True, hidden=False, legacy=False, cut=False, system=False, sys_default=None, autodef=False, fct_mod=None, **opts): - """ add a parameter to the card. value is the default value and + """ add a parameter to the card. value is the default value and defines the type (int/float/bool/str) of the input. fortran_name: defines what is the associate name in the f77 code include: defines if we have to put the value in the include file @@ -2795,7 +2795,7 @@ def add_param(self, name, value, fortran_name=None, include=True, fct_mod: defines a function to run if the parameter is modify in the include file options of **opts: - allowed: list of valid options. '*' means anything else should be allowed. - empty list means anything possible as well. + empty list means anything possible as well. - comment: add comment for writing/help - typelist: type of the list if default is empty """ @@ -2823,9 +2823,9 @@ def add_param(self, name, value, fortran_name=None, include=True, self.fct_mod[name] = fct_mod def read(self, finput, consistency=True, unknown_warning=True, **opt): - """Read the input file, this can be a path to a file, + """Read the input file, this can be a path to a file, a file object, a str with the content of the file.""" - + if isinstance(finput, str): if "\n" in finput: finput = finput.split('\n') @@ -2836,7 +2836,7 @@ def read(self, finput, consistency=True, unknown_warning=True, **opt): finput = open(finput) else: raise Exception("No such file %s" % finput) - + for line in finput: line = line.split('#')[0] line = line.split('!')[0] @@ -2864,8 +2864,8 @@ def add_unknown_entry(self, name, value, unknow_warning): This is based on the guess_entry_fromname for the various syntax providing input. This then call add_param accordingly. - This function does not returns anything. - """ + This function does not returns anything. + """ if name == "dsqrt_q2fact1" and not self.LO: raise InvalidRunCard("Looks like you passed a LO run_card for a NLO run. Please correct") @@ -2903,7 +2903,7 @@ def add_unknown_entry(self, name, value, unknow_warning): " The type was assigned to %s. \n"+\ " The definition of that variable will %sbe automatically added to fortran file %s\n"+\ " The value of that variable will %sbe passed to the fortran code via fortran file %s",\ - name, value, vartype if vartype != "list" else "list of %s" % opts.get('typelist').__name__, + name, value, vartype if vartype != "list" else "list of %s" % opts.get('typelist').__name__, "" if opts.get('autodef', False) else "not", "" if opts.get('autodef', False) in [True,False] else opts.get('autodef'), "" if opts.get('include', True) else "not", "" if opts.get('include', True) in [True,False] else opts.get('include')) RunCard.donewarning.append(name) @@ -2923,19 +2923,19 @@ def valid_line(self, line, tmp): return False elif line.strip().startswith('%'): parameter = line[line.find('(')+1:line.find(')')] - + try: cond = self.cuts_parameter[parameter] except KeyError: return True - - + + if template_options.get(cond, default) or cond is True: return True else: - return False + return False else: - return True + return True def reset_simd(self, old_value, new_value, name, *args, **opts): @@ -2946,28 +2946,28 @@ def make_clean(self,old_value, new_value, name, dir): raise Exception('pass make clean for ', dir) def make_Ptouch(self,old_value, new_value, name, reset): - raise Exception('pass Ptouch for ', reset) - + raise Exception('pass Ptouch for ', reset) + def write(self, output_file, template=None, python_template=False, write_hidden=False, template_options=None, **opt): - """Write the run_card in output_file according to template + """Write the run_card in output_file according to template (a path to a valid run_card)""" - to_write = set(self.user_set) + to_write = set(self.user_set) written = set() if not template: raise Exception if not template_options: template_options = collections.defaultdict(str) - + if python_template: text = open(template,'r').read() - text = text.split('\n') + text = text.split('\n') # remove if templating - text = [l if not l.startswith('#IF') else l[l.find(')# ')+2:] + text = [l if not l.startswith('#IF') else l[l.find(')# ')+2:] for l in text if self.valid_line(l, template_options)] text ='\n'.join(text) - + if python_template and not to_write: import string if self.blocks: @@ -2981,14 +2981,14 @@ def write(self, output_file, template=None, python_template=False, if not self.list_parameter: text = text % self else: - data = dict((key.lower(),value) for key, value in self.items()) + data = dict((key.lower(),value) for key, value in self.items()) for name in self.list_parameter: if self.list_parameter[name] != str: data[name] = ', '.join(str(v) for v in data[name]) else: data[name] = "['%s']" % "', '".join(str(v) for v in data[name]) text = text % data - else: + else: text = "" for line in open(template,'r'): nline = line.split('#')[0] @@ -3005,11 +3005,11 @@ def write(self, output_file, template=None, python_template=False, this_group = this_group[0] text += this_group.get_template(self) % self this_group.manage_parameters(self, written, to_write) - + elif len(nline) != 2: text += line elif nline[1].strip() in self: - + name = nline[1].strip().lower() value = self[name] if name in self.list_parameter: @@ -3026,15 +3026,15 @@ def write(self, output_file, template=None, python_template=False, else: endline = '' text += ' %s\t= %s %s%s' % (value, name, comment, endline) - written.add(name) + written.add(name) if name in to_write: to_write.remove(name) else: logger.info('Adding missing parameter %s to current %s (with default value)', (name, self.filename)) - written.add(name) - text += line + written.add(name) + text += line for b in self.blocks: if b.status(self): @@ -3057,7 +3057,7 @@ def write(self, output_file, template=None, python_template=False, else: #partial writting -> add only what is needed to_add = [] - for line in b.get_template(self).split('\n'): + for line in b.get_template(self).split('\n'): nline = line.split('#')[0] nline = nline.split('!')[0] nline = nline.split('=') @@ -3072,8 +3072,8 @@ def write(self, output_file, template=None, python_template=False, continue #already include before else: to_add.append(line % {nline[1].strip():value, name:value}) - written.add(name) - + written.add(name) + if name in to_write: to_write.remove(name) else: @@ -3095,13 +3095,13 @@ def write(self, output_file, template=None, python_template=False, text += '\n'.join(to_add) if to_write or write_hidden: - text+="""#********************************************************************* + text+="""#********************************************************************* # Additional hidden parameters #********************************************************************* -""" +""" if write_hidden: # - # do not write hidden parameter not hidden for this template + # do not write hidden parameter not hidden for this template # if python_template: written = written.union(set(re.findall('\%\((\w*)\)s', open(template,'r').read(), re.M))) @@ -3129,7 +3129,7 @@ def get_last_value_include(self, output_dir): if inc file does not exist we will return the current value (i.e. set has no change) """ - #remember that + #remember that # default_include_file is a class variable # self.includepath is on the form include_path : [list of param ] out = {} @@ -3165,7 +3165,7 @@ def get_value_from_include(self, path, list_of_params, output_dir): with open(pjoin(output_dir,path), 'r') as fsock: text = fsock.read() - + for name in list_of_params: misc.sprint(name, name in self.fortran_name) misc.sprint(self.fortran_name[name] if name in self.fortran_name[name] else name) @@ -3191,11 +3191,11 @@ def get_value_from_include(self, path, list_of_params, output_dir): misc.sprint(self.fortran_name) misc.sprint(text) raise Exception - return out + return out def get_default(self, name, default=None, log_level=None): - """return self[name] if exist otherwise default. log control if we + """return self[name] if exist otherwise default. log control if we put a warning or not if we use the default value""" lower_name = name.lower() @@ -3216,13 +3216,13 @@ def get_default(self, name, default=None, log_level=None): log_level = 20 if not default: default = dict.__getitem__(self, name.lower()) - + logger.log(log_level, '%s missed argument %s. Takes default: %s' % (self.filename, name, default)) self[name] = default return default else: - return self[name] + return self[name] def mod_inc_pdlabel(self, value): """flag pdlabel has 'dressed' if one of the special lepton PDF with beamstralung. @@ -3237,16 +3237,16 @@ def edit_dummy_fct_from_file(self, filelist, outdir): filelist is a list of input files (given by the user) containing a series of function to be placed in replacement of standard (typically dummy) functions of the code. - This use LO/NLO class attribute that defines which function name need to - be placed in which file. + This use LO/NLO class attribute that defines which function name need to + be placed in which file. First time this is used, a backup of the original file is done in order to - recover if the user remove some of those files. + recover if the user remove some of those files. The function present in the file are determined automatically via regular expression. and only that function is replaced in the associated file. - function in the filelist starting with user_ will also be include within the + function in the filelist starting with user_ will also be include within the dummy_fct.f file """ @@ -3269,7 +3269,7 @@ def edit_dummy_fct_from_file(self, filelist, outdir): fsock = file_writers.FortranWriter(tmp,'w') function_text = fsock.remove_routine(text, fct) fsock.close() - test = open(tmp,'r').read() + test = open(tmp,'r').read() if fct not in self.dummy_fct_file: if fct.startswith('user_'): self.dummy_fct_file[fct] = self.dummy_fct_file['user_'] @@ -3315,22 +3315,22 @@ def guess_entry_fromname(self, name, value): - vartype: type of the variable - name: name of the variable (stripped from metadata) - options: additional options for the add_param - rules: - - if name starts with str_, int_, float_, bool_, list_, dict_ then + rules: + - if name starts with str_, int_, float_, bool_, list_, dict_ then - vartype is set accordingly - name is strip accordingly - otherwise guessed from value (which is string) - if name contains min/max - vartype is set to float - options has an added {'cut':True} - - suffixes like + - suffixes like - will be removed from named - will be added in options (for add_param) as {'cut':True} see add_param documentation for the list of supported options - if include is on False set autodef to False (i.e. enforce it False for future change) """ - # local function + # local function def update_typelist(value, name, opts): """convert a string to a list and update opts to keep track of the type """ value = value.strip() @@ -3358,7 +3358,7 @@ def update_typelist(value, name, opts): opts[key] = val name = name.replace("<%s=%s>" %(key,val), '') - # get vartype + # get vartype # first check that name does not force it supported_type = ["str", "float", "int", "bool", "list", "dict"] if "_" in name and name.split("_")[0].lower() in supported_type: @@ -3406,13 +3406,13 @@ def f77_formatting(value, formatv=None): value = str(value).lower() else: assert formatv - + if formatv == 'bool': if str(value) in ['1','T','.true.','True']: return '.true.' else: return '.false.' - + elif formatv == 'int': try: return str(int(value)) @@ -3422,12 +3422,12 @@ def f77_formatting(value, formatv=None): return str(int(fl)) else: raise - + elif formatv == 'float': if isinstance(value, str): value = value.replace('d','e') return ('%.10e' % float(value)).replace('e','d') - + elif formatv == 'str': # Check if it is a list if value.strip().startswith('[') and value.strip().endswith(']'): @@ -3437,20 +3437,20 @@ def f77_formatting(value, formatv=None): enumerate(elements)] else: return "'%s'" % value - - + + def check_validity(self, log_level=30): """check that parameter missing in the card are set to the expected value""" for name, value in self.system_default.items(): self.set(name, value, changeifuserset=False) - + for name in self.includepath[False]: to_bypass = self.hidden_param + list(self.legacy_parameter.keys()) if name not in to_bypass: - self.get_default(name, log_level=log_level) + self.get_default(name, log_level=log_level) for name in self.legacy_parameter: if self[name] != self.legacy_parameter[name]: @@ -3458,28 +3458,28 @@ def check_validity(self, log_level=30): for block in self.blocks: block.check_validity(self) - + def update_system_parameter_for_include(self): - """update hidden system only parameter for the correct writtin in the + """update hidden system only parameter for the correct writtin in the include""" return - + def write_include_file(self, output_dir, output_file=None): """Write the various include file in output_dir. The entry True of self.includepath will be written in run_card.inc The entry False will not be written anywhere output_file allows testing by providing stream. - This also call the function to add variable definition for the - variable with autodef=True (handle by write_autodef function) + This also call the function to add variable definition for the + variable with autodef=True (handle by write_autodef function) """ - + # ensure that all parameter are coherent and fix those if needed self.check_validity() - + #ensusre that system only parameter are correctly set self.update_system_parameter_for_include() @@ -3490,10 +3490,10 @@ def write_include_file(self, output_dir, output_file=None): self.write_autodef(output_dir, output_file=None) # check/fix status of customised functions self.edit_dummy_fct_from_file(self["custom_fcts"], os.path.dirname(output_dir)) - + for incname in self.includepath: self.write_one_include_file(output_dir, incname, output_file) - + for name,value in value_in_old_include.items(): if value != self[name]: self.fct_mod[name][0](value, self[name], name, *self.fct_mod[name][1],**self.fct_mod[name][2]) @@ -3515,13 +3515,13 @@ def write_one_include_file(self, output_dir, incname, output_file=None): fsock = file_writers.FortranWriter(pjoin(output_dir,pathinc+'.tmp')) - for key in self.includepath[incname]: + for key in self.includepath[incname]: #define the fortran name if key in self.fortran_name: fortran_name = self.fortran_name[key] else: fortran_name = key - + if incname in self.include_as_parameter: fsock.writelines('INTEGER %s\n' % fortran_name) #get the value with warning if the user didn't set it @@ -3534,7 +3534,7 @@ def write_one_include_file(self, output_dir, incname, output_file=None): # in case of a list, add the length of the list as 0th # element in fortran. Only in case of integer or float # list (not for bool nor string) - targettype = self.list_parameter[key] + targettype = self.list_parameter[key] if targettype is bool: pass elif targettype is int: @@ -3550,7 +3550,7 @@ def write_one_include_file(self, output_dir, incname, output_file=None): elif isinstance(value, dict): for fortran_name, onevalue in value.items(): line = '%s = %s \n' % (fortran_name, self.f77_formatting(onevalue)) - fsock.writelines(line) + fsock.writelines(line) elif isinstance(incname,str) and 'compile' in incname: if incname in self.include_as_parameter: line = 'PARAMETER (%s=%s)' %( fortran_name, value) @@ -3585,7 +3585,7 @@ def write_autodef(self, output_dir, output_file=None): filetocheck = dict(self.definition_path) if True not in self.definition_path: filetocheck[True] = [] - + for incname in filetocheck: if incname is True: @@ -3598,7 +3598,7 @@ def write_autodef(self, output_dir, output_file=None): if output_file: fsock = output_file input = fsock.getvalue() - + else: input = open(pjoin(output_dir,pathinc),'r').read() # do not define fsock here since we might not need to overwrite it @@ -3608,7 +3608,7 @@ def write_autodef(self, output_dir, output_file=None): previous = re.findall(re_pat, input, re.M) # now check which one needed to be added (and remove those identicaly defined) to_add = [] - for key in filetocheck[incname]: + for key in filetocheck[incname]: curr_type = self[key].__class__.__name__ length = "" if curr_type in [list, "list"]: @@ -3640,10 +3640,10 @@ def write_autodef(self, output_dir, output_file=None): fsock.truncate(0) fsock.seek(0) - # remove outdated lines + # remove outdated lines lines = input.split('\n') if previous: - out = [line for line in lines if not re.search(re_pat, line, re.M) or + out = [line for line in lines if not re.search(re_pat, line, re.M) or re.search(re_pat, line, re.M).groups() not in previous] else: out = lines @@ -3662,7 +3662,7 @@ def write_autodef(self, output_dir, output_file=None): stop = out.index('C STOP USER COMMON BLOCK') out = out[:start]+ out[stop+1:] #add new common-block - if self.definition_path[incname]: + if self.definition_path[incname]: out.append("C START USER COMMON BLOCK") if isinstance(pathinc , str): filename = os.path.basename(pathinc).split('.',1)[0] @@ -3675,10 +3675,10 @@ def write_autodef(self, output_dir, output_file=None): filename = filename.upper() out.append(" COMMON/USER_CUSTOM_%s/%s" %(filename,','.join( self.definition_path[incname]))) out.append('C STOP USER COMMON BLOCK') - + if not output_file: fsock.writelines(out) - fsock.close() + fsock.close() else: # for iotest out = ["%s\n" %l for l in out] @@ -3702,7 +3702,7 @@ def get_idbmup(lpp): def get_banner_init_information(self): """return a dictionary with the information needed to write the first line of the block of the lhe file.""" - + output = {} output["idbmup1"] = self.get_idbmup(self['lpp1']) output["idbmup2"] = self.get_idbmup(self['lpp2']) @@ -3713,7 +3713,7 @@ def get_banner_init_information(self): output["pdfsup1"] = self.get_pdf_id(self["pdlabel"]) output["pdfsup2"] = self.get_pdf_id(self["pdlabel"]) return output - + def get_pdf_id(self, pdf): if pdf == "lhapdf": lhaid = self["lhaid"] @@ -3721,19 +3721,19 @@ def get_pdf_id(self, pdf): return lhaid[0] else: return lhaid - else: + else: try: return {'none': 0, 'iww': 0, 'eva':0, 'edff':0, 'chff':0, 'cteq6_m':10000,'cteq6_l':10041,'cteq6l1':10042, 'nn23lo':246800,'nn23lo1':247000,'nn23nlo':244800 - }[pdf] + }[pdf] except: - return 0 - + return 0 + def get_lhapdf_id(self): return self.get_pdf_id(self['pdlabel']) - def remove_all_cut(self): + def remove_all_cut(self): """remove all the cut""" for name in self.cuts_parameter: @@ -3749,7 +3749,7 @@ def remove_all_cut(self): elif 'eta' in name: self[name] = -1 else: - self[name] = 0 + self[name] = 0 ################################################################################################ ### Define various template subpart for the LO Run_card @@ -3767,11 +3767,11 @@ def remove_all_cut(self): %(nb_proton1)s = nb_proton1 # number of proton for the first beam %(nb_neutron1)s = nb_neutron1 # number of neutron for the first beam %(mass_ion1)s = mass_ion1 # mass of the heavy ion (first beam) -# Note that seting differently the two beams only work if you use +# Note that seting differently the two beams only work if you use # group_subprocess=False when generating your matrix-element %(nb_proton2)s = nb_proton2 # number of proton for the second beam %(nb_neutron2)s = nb_neutron2 # number of neutron for the second beam - %(mass_ion2)s = mass_ion2 # mass of the heavy ion (second beam) + %(mass_ion2)s = mass_ion2 # mass of the heavy ion (second beam) """ template_off = "# To see heavy ion options: type \"update ion_pdf\"" @@ -3834,11 +3834,11 @@ def remove_all_cut(self): # Frame for polarization ------------------------------------------------------------------------------------ template_on = \ """#********************************************************************* -# Frame where to evaluate the matrix-element (not the cut!) for polarization +# Frame where to evaluate the matrix-element (not the cut!) for polarization #********************************************************************* %(me_frame)s = me_frame ! list of particles to sum-up to define the rest-frame ! in which to evaluate the matrix-element - ! [1,2] means the partonic center of mass + ! [1,2] means the partonic center of mass """ template_off = "" frame_block = RunBlock('frame', template_on=template_on, template_off=template_off) @@ -3891,7 +3891,7 @@ def remove_all_cut(self): # CONTROL The extra running scale (not QCD) * # Such running is NOT include in systematics computation * #*********************************************************************** - %(fixed_extra_scale)s = fixed_extra_scale ! False means dynamical scale + %(fixed_extra_scale)s = fixed_extra_scale ! False means dynamical scale %(mue_ref_fixed)s = mue_ref_fixed ! scale to use if fixed scale mode %(mue_over_ref)s = mue_over_ref ! ratio to mur if dynamical scale """ @@ -3908,10 +3908,10 @@ def remove_all_cut(self): %(tmin_for_channel)s = tmin_for_channel ! limit the non-singular reach of --some-- channel of integration related to T-channel diagram (value between -1 and 0), -1 is no impact %(survey_splitting)s = survey_splitting ! for loop-induced control how many core are used at survey for the computation of a single iteration. %(survey_nchannel_per_job)s = survey_nchannel_per_job ! control how many Channel are integrated inside a single job on cluster/multicore - %(refine_evt_by_job)s = refine_evt_by_job ! control the maximal number of events for the first iteration of the refine (larger means less jobs) + %(refine_evt_by_job)s = refine_evt_by_job ! control the maximal number of events for the first iteration of the refine (larger means less jobs) +#********************************************************************* +# Compilation flag. #********************************************************************* -# Compilation flag. -#********************************************************************* %(global_flag)s = global_flag ! fortran optimization flag use for the all code. %(aloha_flag)s = aloha_flag ! fortran optimization flag for aloha function. Suggestions: '-ffast-math' %(matrix_flag)s = matrix_flag ! fortran optimization flag for matrix.f function. Suggestions: '-O3' @@ -3948,7 +3948,7 @@ def check_validity(self, card): if card['pdlabel'] != card['pdlabel1']: dict.__setitem__(card, 'pdlabel', card['pdlabel1']) elif card['pdlabel1'] in sum(card.allowed_lep_densities.values(),[]): - raise InvalidRunCard("Assymetric beam pdf not supported for e e collision with ISR/bemstralung option") + raise InvalidRunCard("Assymetric beam pdf not supported for e e collision with ISR/bemstralung option") elif card['pdlabel2'] in sum(card.allowed_lep_densities.values(),[]): raise InvalidRunCard("Assymetric beam pdf not supported for e e collision with ISR/bemstralung option") elif card['pdlabel1'] == 'none': @@ -3962,7 +3962,7 @@ def check_validity(self, card): dict.__setitem__(card, 'pdlabel2', card['pdlabel']) if abs(card['lpp1']) == 1 == abs(card['lpp2']) and card['pdlabel1'] != card['pdlabel2']: - raise InvalidRunCard("Assymetric beam pdf not supported for proton-proton collision") + raise InvalidRunCard("Assymetric beam pdf not supported for proton-proton collision") def status(self, card): """return False if template_off to be used, True if template_on to be used""" @@ -4028,7 +4028,7 @@ def post_set(card, value, change_userdefine, raiseerror, name='unknown', **opt): if name == 'fixed_fac_scale2' and 'fixed_fac_scale1' not in card.user_set: dict.__setitem__(card, 'fixed_fac_scale1', card['fixed_fac_scale']) if name == 'fixed_fac_scale1' and 'fixed_fac_scale2' not in card.user_set: - dict.__setitem__(card, 'fixed_fac_scale2', card['fixed_fac_scale']) + dict.__setitem__(card, 'fixed_fac_scale2', card['fixed_fac_scale']) def status(self, card): @@ -4061,32 +4061,32 @@ def status(self, card): class RunCardLO(RunCard): """an object to handle in a nice way the run_card information""" - + blocks = [heavy_ion_block, beam_pol_block, syscalc_block, ecut_block, frame_block, eva_scale_block, mlm_block, ckkw_block, psoptim_block, pdlabel_block, fixedfacscale, running_block] dummy_fct_file = {"dummy_cuts": pjoin("SubProcesses","dummy_fct.f"), "get_dummy_x1": pjoin("SubProcesses","dummy_fct.f"), - "get_dummy_x1_x2": pjoin("SubProcesses","dummy_fct.f"), + "get_dummy_x1_x2": pjoin("SubProcesses","dummy_fct.f"), "dummy_boostframe": pjoin("SubProcesses","dummy_fct.f"), "user_dynamical_scale": pjoin("SubProcesses","dummy_fct.f"), "bias_wgt_custom": pjoin("SubProcesses","dummy_fct.f"), "user_": pjoin("SubProcesses","dummy_fct.f") # all function starting by user will be added to that file } - + include_as_parameter = ['vector.inc'] if MG5DIR: default_run_card = pjoin(MG5DIR, "internal", "default_run_card_lo.dat") - + def default_setup(self): """default value for the run_card.dat""" - + self.add_param("run_tag", "tag_1", include=False) self.add_param("gridpack", False) self.add_param("time_of_flight", -1.0, include=False) - self.add_param("nevents", 10000) + self.add_param("nevents", 10000) self.add_param("iseed", 0) self.add_param("python_seed", -2, include=False, hidden=True, comment="controlling python seed [handling in particular the final unweighting].\n -1 means use default from random module.\n -2 means set to same value as iseed") self.add_param("lpp1", 1, fortran_name="lpp(1)", allowed=[-1,1,0,2,3,9,-2,-3,4,-4], @@ -4106,7 +4106,7 @@ def default_setup(self): self.add_param('nb_neutron1', 0, hidden=True, allowed=[1,0, 126 , '*'],fortran_name="nb_neutron(1)", comment='For heavy ion physics nb of neutron in the ion (for both beam but if group_subprocess was False)') self.add_param('nb_neutron2', 0, hidden=True, allowed=[1,0, 126 , '*'],fortran_name="nb_neutron(2)", - comment='For heavy ion physics nb of neutron in the ion (of beam 2 if group_subprocess was False )') + comment='For heavy ion physics nb of neutron in the ion (of beam 2 if group_subprocess was False )') self.add_param('mass_ion1', -1.0, hidden=True, fortran_name="mass_ion(1)", allowed=[-1,0, 0.938, 207.9766521*0.938, 0.000511, 0.105, '*'], comment='For heavy ion physics mass in GeV of the ion (of beam 1)') @@ -4133,11 +4133,11 @@ def default_setup(self): self.add_param("mue_over_ref", 1.0, hidden=True, comment='ratio mu_other/mu for dynamical scale') self.add_param("ievo_eva",0,hidden=True, allowed=[0,1],fortran_name="ievo_eva", comment='eva: 0 for EW pdf muf evolution by q^2; 1 for evo by pT^2') - + # Bias module options self.add_param("bias_module", 'None', include=False, hidden=True) self.add_param('bias_parameters', {'__type__':1.0}, include='BIAS/bias.inc', hidden=True) - + #matching self.add_param("scalefact", 1.0) self.add_param("ickkw", 0, allowed=[0,1], hidden=True, comment="\'0\' for standard fixed order computation.\n\'1\' for MLM merging activates alphas and pdf re-weighting according to a kt clustering of the QCD radiation.") @@ -4221,7 +4221,7 @@ def default_setup(self): self.add_param("mmaa", 0.0, cut='aa') self.add_param("mmll", 0.0, cut='ll') self.add_param("mmjjmax", -1.0, cut='jj') - self.add_param("mmbbmax", -1.0, cut='bb') + self.add_param("mmbbmax", -1.0, cut='bb') self.add_param("mmaamax", -1.0, cut='aa') self.add_param("mmllmax", -1.0, cut='ll') self.add_param("mmnl", 0.0, cut='LL') @@ -4231,9 +4231,9 @@ def default_setup(self): self.add_param("ptllmax", -1.0, cut='ll') self.add_param("xptj", 0.0, cut='jj') self.add_param("xptb", 0.0, cut='bb') - self.add_param("xpta", 0.0, cut='aa') + self.add_param("xpta", 0.0, cut='aa') self.add_param("xptl", 0.0, cut='ll') - # ordered pt jet + # ordered pt jet self.add_param("ptj1min", 0.0, cut='jj') self.add_param("ptj1max", -1.0, cut='jj') self.add_param("ptj2min", 0.0, cut='jj') @@ -4241,7 +4241,7 @@ def default_setup(self): self.add_param("ptj3min", 0.0, cut='jjj') self.add_param("ptj3max", -1.0, cut='jjj') self.add_param("ptj4min", 0.0, cut='j'*4) - self.add_param("ptj4max", -1.0, cut='j'*4) + self.add_param("ptj4max", -1.0, cut='j'*4) self.add_param("cutuse", 0, cut='jj') # ordered pt lepton self.add_param("ptl1min", 0.0, cut='l'*2) @@ -4249,7 +4249,7 @@ def default_setup(self): self.add_param("ptl2min", 0.0, cut='l'*2) self.add_param("ptl2max", -1.0, cut='l'*2) self.add_param("ptl3min", 0.0, cut='l'*3) - self.add_param("ptl3max", -1.0, cut='l'*3) + self.add_param("ptl3max", -1.0, cut='l'*3) self.add_param("ptl4min", 0.0, cut='l'*4) self.add_param("ptl4max", -1.0, cut='l'*4) # Ht sum of jets @@ -4257,7 +4257,7 @@ def default_setup(self): self.add_param("htjmax", -1.0, cut='j'*2) self.add_param("ihtmin", 0.0, cut='J'*2) self.add_param("ihtmax", -1.0, cut='J'*2) - self.add_param("ht2min", 0.0, cut='J'*3) + self.add_param("ht2min", 0.0, cut='J'*3) self.add_param("ht3min", 0.0, cut='J'*3) self.add_param("ht4min", 0.0, cut='J'*4) self.add_param("ht2max", -1.0, cut='J'*3) @@ -4267,7 +4267,7 @@ def default_setup(self): self.add_param("ptgmin", 0.0, cut='aj') self.add_param("r0gamma", 0.4, hidden=True) self.add_param("xn", 1.0, hidden=True) - self.add_param("epsgamma", 1.0, hidden=True) + self.add_param("epsgamma", 1.0, hidden=True) self.add_param("isoem", True, hidden=True) self.add_param("xetamin", 0.0, cut='jj') self.add_param("deltaeta", 0.0, cut='j'*2) @@ -4280,7 +4280,7 @@ def default_setup(self): self.add_param("use_syst", True) self.add_param('systematics_program', 'systematics', include=False, hidden=True, comment='Choose which program to use for systematics computation: none, systematics, syscalc') self.add_param('systematics_arguments', ['--mur=0.5,1,2', '--muf=0.5,1,2', '--pdf=errorset'], include=False, hidden=True, comment='Choose the argment to pass to the systematics command. like --mur=0.25,1,4. Look at the help of the systematics function for more details.') - + self.add_param("sys_scalefact", "0.5 1 2", include=False, hidden=True) self.add_param("sys_alpsfact", "None", include=False, hidden=True) self.add_param("sys_matchscale", "auto", include=False, hidden=True) @@ -4315,8 +4315,8 @@ def default_setup(self): self.add_param('aloha_flag', '', include=False, hidden=True, comment='global fortran compilation flag, suggestion: -ffast-math', fct_mod=(self.make_clean, ('Source/DHELAS'),{})) self.add_param('matrix_flag', '', include=False, hidden=True, comment='fortran compilation flag for the matrix-element files, suggestion -O3', - fct_mod=(self.make_Ptouch, ('matrix'),{})) - self.add_param('vector_size', 1, include='vector.inc', hidden=True, comment='lockstep size for parralelism run', + fct_mod=(self.make_Ptouch, ('matrix'),{})) + self.add_param('vector_size', 1, include='vector.inc', hidden=True, comment='lockstep size for parralelism run', fortran_name='VECSIZE_MEMMAX', fct_mod=(self.reset_simd,(),{})) # parameter allowing to define simple cut via the pdg @@ -4329,24 +4329,24 @@ def default_setup(self): self.add_param('eta_max_pdg',{'__type__':0.}, include=False,cut=True) self.add_param('mxx_min_pdg',{'__type__':0.}, include=False,cut=True) self.add_param('mxx_only_part_antipart', {'default':False}, include=False) - + self.add_param('pdg_cut',[0], system=True) # store which PDG are tracked self.add_param('ptmin4pdg',[0.], system=True) # store pt min self.add_param('ptmax4pdg',[-1.], system=True) self.add_param('Emin4pdg',[0.], system=True) # store pt min - self.add_param('Emax4pdg',[-1.], system=True) + self.add_param('Emax4pdg',[-1.], system=True) self.add_param('etamin4pdg',[0.], system=True) # store pt min - self.add_param('etamax4pdg',[-1.], system=True) + self.add_param('etamax4pdg',[-1.], system=True) self.add_param('mxxmin4pdg',[-1.], system=True) self.add_param('mxxpart_antipart', [False], system=True) - - - + + + def check_validity(self): """ """ - + super(RunCardLO, self).check_validity() - + #Make sure that nhel is only either 0 (i.e. no MC over hel) or #1 (MC over hel with importance sampling). In particular, it can #no longer be > 1. @@ -4357,12 +4357,12 @@ def check_validity(self): "not %s." % self['nhel']) if int(self['maxjetflavor']) > 6: raise InvalidRunCard('maxjetflavor should be lower than 5! (6 is partly supported)') - + if len(self['pdgs_for_merging_cut']) > 1000: raise InvalidRunCard("The number of elements in "+\ "'pdgs_for_merging_cut' should not exceed 1000.") - + # some cut need to be deactivated in presence of isolation if self['ptgmin'] > 0: if self['pta'] > 0: @@ -4370,18 +4370,18 @@ def check_validity(self): self['pta'] = 0.0 if self['draj'] > 0: logger.warning('draj cut discarded since photon isolation is used') - self['draj'] = 0.0 - - # special treatment for gridpack use the gseed instead of the iseed + self['draj'] = 0.0 + + # special treatment for gridpack use the gseed instead of the iseed if self['gridrun']: self['iseed'] = self['gseed'] - + #Some parameter need to be fixed when using syscalc #if self['use_syst']: # if self['scalefact'] != 1.0: # logger.warning('Since use_syst=T, changing the value of \'scalefact\' to 1') # self['scalefact'] = 1.0 - + # CKKW Treatment if self['ickkw'] > 0: if self['ickkw'] != 1: @@ -4399,7 +4399,7 @@ def check_validity(self): raise InvalidRunCard('maxjetflavor at 6 is NOT supported for matching!') if self['ickkw'] == 2: # add warning if ckkw selected but the associate parameter are empty - self.get_default('highestmult', log_level=20) + self.get_default('highestmult', log_level=20) self.get_default('issgridfile', 'issudgrid.dat', log_level=20) if self['xqcut'] > 0: if self['ickkw'] == 0: @@ -4412,13 +4412,13 @@ def check_validity(self): if self['drjl'] != 0: if 'drjl' in self.user_set: logger.warning('Since icckw>0, changing the value of \'drjl\' to 0') - self['drjl'] = 0 - if not self['auto_ptj_mjj']: + self['drjl'] = 0 + if not self['auto_ptj_mjj']: if self['mmjj'] > self['xqcut']: logger.warning('mmjj > xqcut (and auto_ptj_mjj = F). MMJJ set to 0') - self['mmjj'] = 0.0 - - # check validity of the pdf set + self['mmjj'] = 0.0 + + # check validity of the pdf set # note that pdlabel is automatically set to lhapdf if pdlabel1 or pdlabel2 is set to lhapdf if self['pdlabel'] == 'lhapdf': #add warning if lhaid not define @@ -4426,7 +4426,7 @@ def check_validity(self): mod = False for i in [1,2]: - lpp = 'lpp%i' %i + lpp = 'lpp%i' %i pdlabelX = 'pdlabel%i' % i if self[lpp] == 0: # nopdf if self[pdlabelX] != 'none': @@ -4459,12 +4459,12 @@ def check_validity(self): raise InvalidRunCard( "Heavy ion mode is only supported for lpp1=1/2") if self['lpp2'] not in [1,2]: if self['nb_proton2'] !=1 or self['nb_neutron2'] !=0: - raise InvalidRunCard( "Heavy ion mode is only supported for lpp2=1/2") + raise InvalidRunCard( "Heavy ion mode is only supported for lpp2=1/2") # check that fixed_fac_scale(1/2) is setting as expected # if lpp=2/3/4 -> default is that beam in fixed scale - # check that fixed_fac_scale is not setup if fixed_fac_scale1/2 are + # check that fixed_fac_scale is not setup if fixed_fac_scale1/2 are # check that both fixed_fac_scale1/2 are defined together # ensure that fixed_fac_scale1 and fixed_fac_scale2 are setup as needed if 'fixed_fac_scale1' in self.user_set: @@ -4475,13 +4475,13 @@ def check_validity(self): elif 'fixed_fac_scale' in self.user_set: logger.warning('fixed_fac_scale and fixed_fac_scale1 are defined but not fixed_fac_scale2. The value of fixed_fac_scale2 will be set to the one of fixed_fac_scale.') self['fixed_fac_scale2'] = self['fixed_fac_scale'] - elif self['lpp2'] !=0: + elif self['lpp2'] !=0: raise Exception('fixed_fac_scale2 not defined while fixed_fac_scale1 is. Please fix your run_card.') elif 'fixed_fac_scale2' in self.user_set: if 'fixed_fac_scale' in self.user_set: logger.warning('fixed_fac_scale and fixed_fac_scale2 are defined but not fixed_fac_scale1. The value of fixed_fac_scale1 will be set to the one of fixed_fac_scale.') self['fixed_fac_scale1'] = self['fixed_fac_scale'] - elif self['lpp1'] !=0: + elif self['lpp1'] !=0: raise Exception('fixed_fac_scale1 not defined while fixed_fac_scale2 is. Please fix your run_card.') else: if 'fixed_fac_scale' in self.user_set: @@ -4500,12 +4500,12 @@ def check_validity(self): logger.warning('fixed_fac_scale1 not defined whithin your run_card. Using default value: %s', self['fixed_fac_scale1']) logger.warning('fixed_fac_scale2 not defined whithin your run_card. Using default value: %s', self['fixed_fac_scale2']) - # check if lpp = + # check if lpp = if self['pdlabel'] not in sum(self.allowed_lep_densities.values(),[]): for i in [1,2]: if abs(self['lpp%s' % i ]) in [3,4] and self['fixed_fac_scale%s' % i] and self['dsqrt_q2fact%s'%i] == 91.188: logger.warning("Vector boson from lepton PDF is using fixed scale value of muf [dsqrt_q2fact%s]. Looks like you kept the default value (Mz). Is this really the cut-off that you want to use?" % i) - + if abs(self['lpp%s' % i ]) == 2 and self['fixed_fac_scale%s' % i] and self['dsqrt_q2fact%s'%i] == 91.188: if self['pdlabel'] in ['edff','chff']: logger.warning("Since 3.5.0 exclusive photon-photon processes in ultraperipheral proton and nuclear collisions from gamma-UPC (arXiv:2207.03012) will ignore the factorisation scale.") @@ -4515,10 +4515,10 @@ def check_validity(self): if six.PY2 and self['hel_recycling']: self['hel_recycling'] = False - logger.warning("""Helicity recycling optimization requires Python3. This optimzation is therefore deactivated automatically. + logger.warning("""Helicity recycling optimization requires Python3. This optimzation is therefore deactivated automatically. In general this optimization speeds up the computation by a factor of two.""") - + # check that ebeam is bigger than the associated mass. for i in [1,2]: if self['lpp%s' % i ] not in [1,2]: @@ -4529,13 +4529,13 @@ def check_validity(self): logger.warning("At-rest proton mode set: energy beam set to 0.938") self.set('ebeam%i' %i, 0.938) else: - raise InvalidRunCard("Energy for beam %i lower than proton mass. Please fix this") - elif self['ebeam%i' % i] < self['mass_ion%i' % i]: + raise InvalidRunCard("Energy for beam %i lower than proton mass. Please fix this") + elif self['ebeam%i' % i] < self['mass_ion%i' % i]: if self['ebeam%i' %i] == 0: logger.warning("At rest ion mode set: Energy beam set to %s" % self['mass_ion%i' % i]) self.set('ebeam%i' %i, self['mass_ion%i' % i]) - - + + # check the tmin_for_channel is negative if self['tmin_for_channel'] == 0: raise InvalidRunCard('tmin_for_channel can not be set to 0.') @@ -4543,15 +4543,15 @@ def check_validity(self): logger.warning('tmin_for_channel should be negative. Will be using -%f instead' % self['tmin_for_channel']) self.set('tmin_for_channel', -self['tmin_for_channel']) - + def update_system_parameter_for_include(self): """system parameter need to be setupe""" - + # polarization self['frame_id'] = sum(2**(n) for n in self['me_frame']) - + # set the pdg_for_cut fortran parameter - pdg_to_cut = set(list(self['pt_min_pdg'].keys()) +list(self['pt_max_pdg'].keys()) + + pdg_to_cut = set(list(self['pt_min_pdg'].keys()) +list(self['pt_max_pdg'].keys()) + list(self['e_min_pdg'].keys()) +list(self['e_max_pdg'].keys()) + list(self['eta_min_pdg'].keys()) +list(self['eta_max_pdg'].keys())+ list(self['mxx_min_pdg'].keys()) + list(self['mxx_only_part_antipart'].keys())) @@ -4559,15 +4559,15 @@ def update_system_parameter_for_include(self): pdg_to_cut.discard('default') if len(pdg_to_cut)>25: raise Exception("Maximum 25 different pdgs are allowed for pdg specific cut") - + if any(int(pdg)<0 for pdg in pdg_to_cut): logger.warning('PDG specific cuts are always applied symmetrically on particles/anti-particles. Always use positve PDG codes') raise MadGraph5Error('Some PDG specific cuts are defined using negative pdg code') - - + + if any(pdg in pdg_to_cut for pdg in [1,2,3,4,5,21,22,11,13,15]): raise Exception("Can not use PDG related cut for light quark/b quark/lepton/gluon/photon") - + if pdg_to_cut: self['pdg_cut'] = list(pdg_to_cut) self['ptmin4pdg'] = [] @@ -4595,7 +4595,7 @@ def update_system_parameter_for_include(self): self[new_var].append(self[old_var][str(pdg)] if str(pdg) in self[old_var] else default) else: if str(pdg) not in self[old_var]: - raise Exception("no default value defined for %s and no value defined for pdg %s" % (old_var, pdg)) + raise Exception("no default value defined for %s and no value defined for pdg %s" % (old_var, pdg)) self[new_var].append(self[old_var][str(pdg)]) else: self['pdg_cut'] = [0] @@ -4605,11 +4605,11 @@ def update_system_parameter_for_include(self): self['ptmax4pdg'] = [-1.] self['Emax4pdg'] = [-1.] self['etamax4pdg'] =[-1.] - self['mxxmin4pdg'] =[0.] + self['mxxmin4pdg'] =[0.] self['mxxpart_antipart'] = [False] - - - + + + def create_default_for_process(self, proc_characteristic, history, proc_def): """Rules process 1->N all cut set on off. @@ -4626,7 +4626,7 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): if proc_characteristic['loop_induced']: self['nhel'] = 1 self['pdgs_for_merging_cut'] = proc_characteristic['colored_pdgs'] - + if proc_characteristic['ninitial'] == 1: #remove all cut self.remove_all_cut() @@ -4636,7 +4636,7 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): # check for beam_id beam_id = set() beam_id_split = [set(), set()] - for proc in proc_def: + for proc in proc_def: for oneproc in proc: for i,leg in enumerate(oneproc['legs']): if not leg['state']: @@ -4654,20 +4654,20 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): maxjetflavor = max([4]+[abs(i) for i in beam_id if -7< i < 7]) self['maxjetflavor'] = maxjetflavor self['asrwgtflavor'] = maxjetflavor - + if any(i in beam_id for i in [1,-1,2,-2,3,-3,4,-4,5,-5,21,22]): # check for e p collision if any(id in beam_id for id in [11,-11,13,-13]): self.display_block.append('beam_pol') if any(id in beam_id_split[0] for id in [11,-11,13,-13]): - self['lpp1'] = 0 - self['lpp2'] = 1 - self['ebeam1'] = '1k' - self['ebeam2'] = '6500' + self['lpp1'] = 0 + self['lpp2'] = 1 + self['ebeam1'] = '1k' + self['ebeam2'] = '6500' else: - self['lpp1'] = 1 - self['lpp2'] = 0 - self['ebeam1'] = '6500' + self['lpp1'] = 1 + self['lpp2'] = 0 + self['ebeam1'] = '6500' self['ebeam2'] = '1k' # UPC for p p collision @@ -4677,7 +4677,7 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): self['ebeam1'] = '6500' self['ebeam2'] = '6500' self['pdlabel'] = 'edff' - + elif any(id in beam_id for id in [11,-11,13,-13]): self['lpp1'] = 0 self['lpp2'] = 0 @@ -4688,7 +4688,7 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): self.display_block.append('ecut') self.display_block.append('beam_pol') - + # check for possibility of eva eva_in_b1 = any(i in beam_id_split[0] for i in [23,24,-24]) #,12,-12,14,-14]) @@ -4701,10 +4701,10 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): self['nhel'] = 1 self['pdlabel'] = 'eva' self['fixed_fac_scale'] = True - self.display_block.append('beam_pol') + self.display_block.append('beam_pol') elif eva_in_b1: - self.display_block.append('beam_pol') + self.display_block.append('beam_pol') self['pdlabel1'] = 'eva' self['fixed_fac_scale1'] = True self['nhel'] = 1 @@ -4724,7 +4724,7 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): self['pdlabel2'] = 'eva' self['fixed_fac_scale2'] = True self['nhel'] = 1 - self.display_block.append('beam_pol') + self.display_block.append('beam_pol') for i in beam_id_split[0]: if abs(i) == 11: self['lpp1'] = math.copysign(3,i) @@ -4740,34 +4740,34 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): if any(i in beam_id for i in [22,23,24,-24,12,-12,14,-14]): self.display_block.append('eva_scale') - # automatic polarisation of the beam if neutrino beam + # automatic polarisation of the beam if neutrino beam if any(id in beam_id for id in [12,-12,14,-14,16,-16]): self.display_block.append('beam_pol') if any(id in beam_id_split[0] for id in [12,14,16]): - self['lpp1'] = 0 - self['ebeam1'] = '1k' + self['lpp1'] = 0 + self['ebeam1'] = '1k' self['polbeam1'] = -100 if not all(id in [12,14,16] for id in beam_id_split[0]): logger.warning('Issue with default beam setup of neutrino in the run_card. Please check it up [polbeam1]. %s') elif any(id in beam_id_split[0] for id in [-12,-14,-16]): - self['lpp1'] = 0 - self['ebeam1'] = '1k' + self['lpp1'] = 0 + self['ebeam1'] = '1k' self['polbeam1'] = 100 if not all(id in [-12,-14,-16] for id in beam_id_split[0]): - logger.warning('Issue with default beam setup of neutrino in the run_card. Please check it up [polbeam1].') + logger.warning('Issue with default beam setup of neutrino in the run_card. Please check it up [polbeam1].') if any(id in beam_id_split[1] for id in [12,14,16]): - self['lpp2'] = 0 - self['ebeam2'] = '1k' + self['lpp2'] = 0 + self['ebeam2'] = '1k' self['polbeam2'] = -100 if not all(id in [12,14,16] for id in beam_id_split[1]): logger.warning('Issue with default beam setup of neutrino in the run_card. Please check it up [polbeam2].') elif any(id in beam_id_split[1] for id in [-12,-14,-16]): - self['lpp2'] = 0 - self['ebeam2'] = '1k' + self['lpp2'] = 0 + self['ebeam2'] = '1k' self['polbeam2'] = 100 if not all(id in [-12,-14,-16] for id in beam_id_split[1]): logger.warning('Issue with default beam setup of neutrino in the run_card. Please check it up [polbeam2].') - + # Check if need matching min_particle = 99 max_particle = 0 @@ -4798,12 +4798,12 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): else: # all are jet => matching is ON matching=True - break - + break + if matching: self['ickkw'] = 1 self['xqcut'] = 30 - #self['use_syst'] = False + #self['use_syst'] = False self['drjj'] = 0 self['drjl'] = 0 self['sys_alpsfact'] = "0.5 1 2" @@ -4811,8 +4811,8 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): self.display_block.append('mlm') self.display_block.append('ckkw') self['dynamical_scale_choice'] = -1 - - + + # For interference module, the systematics are wrong. # automatically set use_syst=F and set systematics_program=none no_systematics = False @@ -4826,14 +4826,14 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): continue break - + if interference or no_systematics: self['use_syst'] = False self['systematics_program'] = 'none' if interference: self['dynamical_scale_choice'] = 3 self['sde_strategy'] = 2 - + # set default integration strategy # interference case is already handle above # here pick strategy 2 if only one QCD color flow @@ -4852,7 +4852,7 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): if pure_lepton and proton_initial: self['sde_strategy'] = 1 else: - # check if multi-jet j + # check if multi-jet j is_multijet = True for proc in proc_def: if any(abs(j.get('id')) not in jet_id for j in proc[0]['legs']): @@ -4860,7 +4860,7 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): break if is_multijet: self['sde_strategy'] = 2 - + # if polarization is used, set the choice of the frame in the run_card # But only if polarization is used for massive particles for plist in proc_def: @@ -4870,7 +4870,7 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): model = proc.get('model') particle = model.get_particle(l.get('id')) if particle.get('mass').lower() != 'zero': - self.display_block.append('frame') + self.display_block.append('frame') break else: continue @@ -4894,15 +4894,15 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): proc = proc_list[0] if proc['forbidden_onsh_s_channels']: self['sde_strategy'] = 1 - + if 'fix_scale' in proc_characteristic['limitations']: self['fixed_ren_scale'] = 1 self['fixed_fac_scale'] = 1 if self['ickkw'] == 1: logger.critical("MLM matching/merging not compatible with the model! You need to use another method to remove the double counting!") self['ickkw'] = 0 - - # define class of particles present to hide all the cuts associated to + + # define class of particles present to hide all the cuts associated to # not present class cut_class = collections.defaultdict(int) for proc in proc_def: @@ -4925,41 +4925,41 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): one_proc_cut['L'] += 1 elif abs(pdg) in [12,14,16]: one_proc_cut['n'] += 1 - one_proc_cut['L'] += 1 + one_proc_cut['L'] += 1 elif str(oneproc.get('model').get_particle(pdg)['mass']) != 'ZERO': one_proc_cut['H'] += 1 - + for key, nb in one_proc_cut.items(): cut_class[key] = max(cut_class[key], nb) self.cut_class = dict(cut_class) self.cut_class[''] = True #avoid empty - + # If model has running functionality add the additional parameter model = proc_def[0][0].get('model') if model['running_elements']: - self.display_block.append('RUNNING') + self.display_block.append('RUNNING') # Read file input/default_run_card_lo.dat # This has to be LAST !! if os.path.exists(self.default_run_card): self.read(self.default_run_card, consistency=False) - + def write(self, output_file, template=None, python_template=False, **opt): - """Write the run_card in output_file according to template + """Write the run_card in output_file according to template (a path to a valid run_card)""" if not template: if not MADEVENT: - template = pjoin(MG5DIR, 'Template', 'LO', 'Cards', + template = pjoin(MG5DIR, 'Template', 'LO', 'Cards', 'run_card.dat') python_template = True else: template = pjoin(MEDIR, 'Cards', 'run_card_default.dat') python_template = False - + hid_lines = {'default':True}#collections.defaultdict(itertools.repeat(True).next) if isinstance(output_file, str): @@ -4975,9 +4975,9 @@ def write(self, output_file, template=None, python_template=False, hid_lines[k1+k2] = True super(RunCardLO, self).write(output_file, template=template, - python_template=python_template, + python_template=python_template, template_options=hid_lines, - **opt) + **opt) class InvalidMadAnalysis5Card(InvalidCmd): @@ -4986,19 +4986,19 @@ class InvalidMadAnalysis5Card(InvalidCmd): class MadAnalysis5Card(dict): """ A class to store a MadAnalysis5 card. Very basic since it is basically free format.""" - + _MG5aMC_escape_tag = '@MG5aMC' - + _default_hadron_inputs = ['*.hepmc', '*.hep', '*.stdhep', '*.lhco','*.root'] _default_parton_inputs = ['*.lhe'] _skip_analysis = False - + @classmethod def events_can_be_reconstructed(cls, file_path): """ Checks from the type of an event file whether it can be reconstructed or not.""" return not (file_path.endswith('.lhco') or file_path.endswith('.lhco.gz') or \ file_path.endswith('.root') or file_path.endswith('.root.gz')) - + @classmethod def empty_analysis(cls): """ A method returning the structure of an empty analysis """ @@ -5012,7 +5012,7 @@ def empty_reconstruction(cls): 'reco_output':'lhe'} def default_setup(self): - """define the default value""" + """define the default value""" self['mode'] = 'parton' self['inputs'] = [] # None is the default stdout level, it will be set automatically by MG5aMC @@ -5025,8 +5025,8 @@ def default_setup(self): # of this class and some other property could be added to this dictionary # in the future. self['analyses'] = {} - # The recasting structure contains on set of commands and one set of - # card lines. + # The recasting structure contains on set of commands and one set of + # card lines. self['recasting'] = {'commands':[],'card':[]} # Add the default trivial reconstruction to use an lhco input # This is just for the structure @@ -5035,7 +5035,7 @@ def default_setup(self): 'root_input': MadAnalysis5Card.empty_reconstruction()} self['reconstruction']['lhco_input']['reco_output']='lhco' - self['reconstruction']['root_input']['reco_output']='root' + self['reconstruction']['root_input']['reco_output']='root' # Specify in which order the analysis/recasting were specified self['order'] = [] @@ -5049,7 +5049,7 @@ def __init__(self, finput=None,mode=None): return else: dict.__init__(self) - + # Initialize it with all the default value self.default_setup() if not mode is None: @@ -5058,15 +5058,15 @@ def __init__(self, finput=None,mode=None): # if input is define read that input if isinstance(finput, (file, str, StringIO.StringIO)): self.read(finput, mode=mode) - + def read(self, input, mode=None): """ Read an MA5 card""" - + if mode not in [None,'parton','hadron']: raise MadGraph5Error('A MadAnalysis5Card can be read online the modes'+ "'parton' or 'hadron'") card_mode = mode - + if isinstance(input, (file, StringIO.StringIO)): input_stream = input elif isinstance(input, str): @@ -5099,10 +5099,10 @@ def read(self, input, mode=None): except ValueError: option = line[len(self._MG5aMC_escape_tag):] option = option.strip() - + if option=='inputs': self['inputs'].extend([v.strip() for v in value.split(',')]) - + elif option == 'skip_analysis': self._skip_analysis = True @@ -5118,7 +5118,7 @@ def read(self, input, mode=None): except: raise InvalidMadAnalysis5Card( "MA5 output level specification '%s' is incorrect."%str(value)) - + elif option=='analysis_name': current_type = 'analyses' current_name = value @@ -5127,7 +5127,7 @@ def read(self, input, mode=None): "Analysis '%s' already defined in MadAnalysis5 card"%current_name) else: self[current_type][current_name] = MadAnalysis5Card.empty_analysis() - + elif option=='set_reconstructions': try: reconstructions = eval(value) @@ -5142,7 +5142,7 @@ def read(self, input, mode=None): "analysis in a MadAnalysis5 card.") self[current_type][current_name]['reconstructions']=reconstructions continue - + elif option=='reconstruction_name': current_type = 'reconstruction' current_name = value @@ -5161,7 +5161,7 @@ def read(self, input, mode=None): raise InvalidMadAnalysis5Card( "Option '%s' can only take the values 'lhe' or 'root'"%option) self['reconstruction'][current_name]['reco_output'] = value.lower() - + elif option.startswith('recasting'): current_type = 'recasting' try: @@ -5171,11 +5171,11 @@ def read(self, input, mode=None): if len(self['recasting'][current_name])>0: raise InvalidMadAnalysis5Card( "Only one recasting can be defined in MadAnalysis5 hadron card") - + else: raise InvalidMadAnalysis5Card( "Unreckognized MG5aMC instruction in MadAnalysis5 card: '%s'"%option) - + if option in ['analysis_name','reconstruction_name'] or \ option.startswith('recasting'): self['order'].append((current_type,current_name)) @@ -5209,7 +5209,7 @@ def read(self, input, mode=None): self['inputs'] = self._default_hadron_inputs else: self['inputs'] = self._default_parton_inputs - + # Make sure at least one reconstruction is specified for each hadron # level analysis and that it exists. if self['mode']=='hadron': @@ -5221,7 +5221,7 @@ def read(self, input, mode=None): analysis['reconstructions']): raise InvalidMadAnalysis5Card('A reconstructions specified in'+\ " analysis '%s' is not defined."%analysis_name) - + def write(self, output): """ Write an MA5 card.""" @@ -5232,7 +5232,7 @@ def write(self, output): else: raise MadGraph5Error('Incorrect input for the write function of'+\ ' the MadAnalysis5Card card. Received argument type is: %s'%str(type(output))) - + output_lines = [] if self._skip_analysis: output_lines.append('%s skip_analysis'%self._MG5aMC_escape_tag) @@ -5240,11 +5240,11 @@ def write(self, output): if not self['stdout_lvl'] is None: output_lines.append('%s stdout_lvl=%s'%(self._MG5aMC_escape_tag,self['stdout_lvl'])) for definition_type, name in self['order']: - + if definition_type=='analyses': output_lines.append('%s analysis_name = %s'%(self._MG5aMC_escape_tag,name)) output_lines.append('%s set_reconstructions = %s'%(self._MG5aMC_escape_tag, - str(self['analyses'][name]['reconstructions']))) + str(self['analyses'][name]['reconstructions']))) elif definition_type=='reconstruction': output_lines.append('%s reconstruction_name = %s'%(self._MG5aMC_escape_tag,name)) elif definition_type=='recasting': @@ -5254,23 +5254,23 @@ def write(self, output): output_lines.extend(self[definition_type][name]) elif definition_type in ['reconstruction']: output_lines.append('%s reco_output = %s'%(self._MG5aMC_escape_tag, - self[definition_type][name]['reco_output'])) + self[definition_type][name]['reco_output'])) output_lines.extend(self[definition_type][name]['commands']) elif definition_type in ['analyses']: - output_lines.extend(self[definition_type][name]['commands']) - + output_lines.extend(self[definition_type][name]['commands']) + output_stream.write('\n'.join(output_lines)) - + return - - def get_MA5_cmds(self, inputs_arg, submit_folder, run_dir_path=None, + + def get_MA5_cmds(self, inputs_arg, submit_folder, run_dir_path=None, UFO_model_path=None, run_tag=''): - """ Returns a list of tuples ('AnalysisTag',['commands']) specifying - the commands of the MadAnalysis runs required from this card. - At parton-level, the number of such commands is the number of analysis + """ Returns a list of tuples ('AnalysisTag',['commands']) specifying + the commands of the MadAnalysis runs required from this card. + At parton-level, the number of such commands is the number of analysis asked for. In the future, the idea is that the entire card can be processed in one go from MA5 directly.""" - + if isinstance(inputs_arg, list): inputs = inputs_arg elif isinstance(inputs_arg, str): @@ -5278,21 +5278,21 @@ def get_MA5_cmds(self, inputs_arg, submit_folder, run_dir_path=None, else: raise MadGraph5Error("The function 'get_MA5_cmds' can only take "+\ " a string or a list for the argument 'inputs_arg'") - + if len(inputs)==0: raise MadGraph5Error("The function 'get_MA5_cmds' must have "+\ " at least one input specified'") - + if run_dir_path is None: run_dir_path = os.path.dirname(inputs_arg) - + cmds_list = [] - + UFO_load = [] # first import the UFO if provided if UFO_model_path: UFO_load.append('import %s'%UFO_model_path) - + def get_import(input, type=None): """ Generates the MA5 import commands for that event file. """ dataset_name = os.path.basename(input).split('.')[0] @@ -5304,7 +5304,7 @@ def get_import(input, type=None): if not type is None: res.append('set %s.type = %s'%(dataset_name, type)) return res - + fifo_status = {'warned_fifo':False,'fifo_used_up':False} def warn_fifo(input): if not input.endswith('.fifo'): @@ -5317,7 +5317,7 @@ def warn_fifo(input): logger.warning('Only the first MA5 analysis/reconstructions can be run on a fifo. Subsequent runs will skip fifo inputs.') fifo_status['warned_fifo'] = True return True - + # Then the event file(s) input(s) inputs_load = [] for input in inputs: @@ -5325,16 +5325,16 @@ def warn_fifo(input): if len(inputs) > 1: inputs_load.append('set main.stacking_method = superimpose') - + submit_command = 'submit %s'%submit_folder+'_%s' - + # Keep track of the reconstruction outpus in the MA5 workflow # Keys are reconstruction names and values are .lhe.gz reco file paths. # We put by default already the lhco/root ones present reconstruction_outputs = { - 'lhco_input':[f for f in inputs if + 'lhco_input':[f for f in inputs if f.endswith('.lhco') or f.endswith('.lhco.gz')], - 'root_input':[f for f in inputs if + 'root_input':[f for f in inputs if f.endswith('.root') or f.endswith('.root.gz')]} # If a recasting card has to be written out, chose here its path @@ -5343,7 +5343,7 @@ def warn_fifo(input): # Make sure to only run over one analysis over each fifo. for definition_type, name in self['order']: - if definition_type == 'reconstruction': + if definition_type == 'reconstruction': analysis_cmds = list(self['reconstruction'][name]['commands']) reco_outputs = [] for i_input, input in enumerate(inputs): @@ -5365,8 +5365,8 @@ def warn_fifo(input): analysis_cmds.append( submit_command%('reco_%s_%d'%(name,i_input+1))) analysis_cmds.append('remove reco_events') - - reconstruction_outputs[name]= [pjoin(run_dir_path,rec_out) + + reconstruction_outputs[name]= [pjoin(run_dir_path,rec_out) for rec_out in reco_outputs] if len(reco_outputs)>0: cmds_list.append(('_reco_%s'%name,analysis_cmds)) @@ -5386,7 +5386,7 @@ def warn_fifo(input): analysis_cmds = ['set main.mode = parton'] else: analysis_cmds = [] - analysis_cmds.extend(sum([get_import(rec_out) for + analysis_cmds.extend(sum([get_import(rec_out) for rec_out in reconstruction_outputs[reco]],[])) analysis_cmds.extend(self['analyses'][name]['commands']) analysis_cmds.append(submit_command%('%s_%s'%(name,reco))) @@ -5427,12 +5427,12 @@ def warn_fifo(input): %(mue_ref_fixed)s = mue_ref_fixed ! scale to use if fixed scale mode """ running_block_nlo = RunBlock('RUNNING', template_on=template_on, template_off="") - + class RunCardNLO(RunCard): """A class object for the run_card for a (aMC@)NLO pocess""" - + LO = False - + blocks = [running_block_nlo] dummy_fct_file = {"dummy_cuts": pjoin("SubProcesses","dummy_fct.f"), @@ -5443,11 +5443,11 @@ class RunCardNLO(RunCard): if MG5DIR: default_run_card = pjoin(MG5DIR, "internal", "default_run_card_nlo.dat") - - + + def default_setup(self): """define the default value""" - + self.add_param('run_tag', 'tag_1', include=False) self.add_param('nevents', 10000) self.add_param('req_acc', -1.0, include=False) @@ -5455,27 +5455,27 @@ def default_setup(self): self.add_param("time_of_flight", -1.0, include=False) self.add_param('event_norm', 'average') #FO parameter - self.add_param('req_acc_fo', 0.01, include=False) + self.add_param('req_acc_fo', 0.01, include=False) self.add_param('npoints_fo_grid', 5000, include=False) self.add_param('niters_fo_grid', 4, include=False) - self.add_param('npoints_fo', 10000, include=False) + self.add_param('npoints_fo', 10000, include=False) self.add_param('niters_fo', 6, include=False) #seed and collider self.add_param('iseed', 0) - self.add_param('lpp1', 1, fortran_name='lpp(1)') - self.add_param('lpp2', 1, fortran_name='lpp(2)') + self.add_param('lpp1', 1, fortran_name='lpp(1)') + self.add_param('lpp2', 1, fortran_name='lpp(2)') self.add_param('ebeam1', 6500.0, fortran_name='ebeam(1)') - self.add_param('ebeam2', 6500.0, fortran_name='ebeam(2)') + self.add_param('ebeam2', 6500.0, fortran_name='ebeam(2)') self.add_param('pdlabel', 'nn23nlo', allowed=['lhapdf', 'emela', 'cteq6_m','cteq6_d','cteq6_l','cteq6l1', 'nn23lo','nn23lo1','nn23nlo','ct14q00','ct14q07','ct14q14','ct14q21'] +\ - sum(self.allowed_lep_densities.values(),[]) ) + sum(self.allowed_lep_densities.values(),[]) ) self.add_param('lhaid', [244600],fortran_name='lhaPDFid') self.add_param('pdfscheme', 0) # whether to include or not photon-initiated processes in lepton collisions self.add_param('photons_from_lepton', True) self.add_param('lhapdfsetname', ['internal_use_only'], system=True) - # stuff for lepton collisions - # these parameters are in general set automatically by eMELA in a consistent manner with the PDF set - # whether the current PDF set has or not beamstrahlung + # stuff for lepton collisions + # these parameters are in general set automatically by eMELA in a consistent manner with the PDF set + # whether the current PDF set has or not beamstrahlung self.add_param('has_bstrahl', False, system=True) # renormalisation scheme of alpha self.add_param('alphascheme', 0, system=True) @@ -5486,31 +5486,31 @@ def default_setup(self): # w contribution included or not in the running of alpha self.add_param('w_run', 1, system=True) #shower and scale - self.add_param('parton_shower', 'HERWIG6', fortran_name='shower_mc') + self.add_param('parton_shower', 'HERWIG6', fortran_name='shower_mc') self.add_param('shower_scale_factor',1.0) self.add_param('mcatnlo_delta', False) self.add_param('fixed_ren_scale', False) self.add_param('fixed_fac_scale', False) self.add_param('fixed_extra_scale', True, hidden=True, system=True) # set system since running from Ellis-Sexton scale not implemented - self.add_param('mur_ref_fixed', 91.118) + self.add_param('mur_ref_fixed', 91.118) self.add_param('muf1_ref_fixed', -1.0, hidden=True) - self.add_param('muf_ref_fixed', 91.118) + self.add_param('muf_ref_fixed', 91.118) self.add_param('muf2_ref_fixed', -1.0, hidden=True) - self.add_param('mue_ref_fixed', 91.118, hidden=True) - self.add_param("dynamical_scale_choice", [-1],fortran_name='dyn_scale', + self.add_param('mue_ref_fixed', 91.118, hidden=True) + self.add_param("dynamical_scale_choice", [-1],fortran_name='dyn_scale', allowed = [-2,-1,0,1,2,3,10], comment="\'-1\' is based on CKKW back clustering (following feynman diagram).\n \'1\' is the sum of transverse energy.\n '2' is HT (sum of the transverse mass)\n '3' is HT/2, '0' allows to use the user_hook definition (need to be defined via custom_fct entry) ") self.add_param('fixed_qes_scale', False, hidden=True) self.add_param('qes_ref_fixed', -1.0, hidden=True) self.add_param('mur_over_ref', 1.0) - self.add_param('muf_over_ref', 1.0) - self.add_param('muf1_over_ref', -1.0, hidden=True) + self.add_param('muf_over_ref', 1.0) + self.add_param('muf1_over_ref', -1.0, hidden=True) self.add_param('muf2_over_ref', -1.0, hidden=True) self.add_param('mue_over_ref', 1.0, hidden=True, system=True) # forbid the user to modigy due to incorrect handling of the Ellis-Sexton scale self.add_param('qes_over_ref', -1.0, hidden=True) self.add_param('reweight_scale', [True], fortran_name='lscalevar') - self.add_param('rw_rscale_down', -1.0, hidden=True) + self.add_param('rw_rscale_down', -1.0, hidden=True) self.add_param('rw_rscale_up', -1.0, hidden=True) - self.add_param('rw_fscale_down', -1.0, hidden=True) + self.add_param('rw_fscale_down', -1.0, hidden=True) self.add_param('rw_fscale_up', -1.0, hidden=True) self.add_param('rw_rscale', [1.0,2.0,0.5], fortran_name='scalevarR') self.add_param('rw_fscale', [1.0,2.0,0.5], fortran_name='scalevarF') @@ -5523,60 +5523,60 @@ def default_setup(self): #technical self.add_param('folding', [1,1,1], include=False) - + #merging self.add_param('ickkw', 0, allowed=[-1,0,3,4], comment=" - 0: No merging\n - 3: FxFx Merging : http://amcatnlo.cern.ch/FxFx_merging.htm\n - 4: UNLOPS merging (No interface within MG5aMC)\n - -1: NNLL+NLO jet-veto computation. See arxiv:1412.8408 [hep-ph]") self.add_param('bwcutoff', 15.0) - #cuts + #cuts self.add_param('jetalgo', 1.0) - self.add_param('jetradius', 0.7) + self.add_param('jetradius', 0.7) self.add_param('ptj', 10.0 , cut=True) - self.add_param('etaj', -1.0, cut=True) - self.add_param('gamma_is_j', True) + self.add_param('etaj', -1.0, cut=True) + self.add_param('gamma_is_j', True) self.add_param('ptl', 0.0, cut=True) - self.add_param('etal', -1.0, cut=True) + self.add_param('etal', -1.0, cut=True) self.add_param('drll', 0.0, cut=True) - self.add_param('drll_sf', 0.0, cut=True) + self.add_param('drll_sf', 0.0, cut=True) self.add_param('mll', 0.0, cut=True) - self.add_param('mll_sf', 30.0, cut=True) - self.add_param('rphreco', 0.1) - self.add_param('etaphreco', -1.0) - self.add_param('lepphreco', True) - self.add_param('quarkphreco', True) + self.add_param('mll_sf', 30.0, cut=True) + self.add_param('rphreco', 0.1) + self.add_param('etaphreco', -1.0) + self.add_param('lepphreco', True) + self.add_param('quarkphreco', True) self.add_param('ptgmin', 20.0, cut=True) - self.add_param('etagamma', -1.0) + self.add_param('etagamma', -1.0) self.add_param('r0gamma', 0.4) - self.add_param('xn', 1.0) + self.add_param('xn', 1.0) self.add_param('epsgamma', 1.0) - self.add_param('isoem', True) + self.add_param('isoem', True) self.add_param('maxjetflavor', 4, hidden=True) - self.add_param('pineappl', False) + self.add_param('pineappl', False) self.add_param('lhe_version', 3, hidden=True, include=False) - + # customization self.add_param("custom_fcts",[],typelist="str", include=False, comment="list of files containing function that overwritte dummy function of the code (like adding cuts/...)") #internal variable related to FO_analyse_card self.add_param('FO_LHE_weight_ratio',1e-3, hidden=True, system=True) - self.add_param('FO_LHE_postprocessing',['grouping','random'], + self.add_param('FO_LHE_postprocessing',['grouping','random'], hidden=True, system=True, include=False) - + # parameter allowing to define simple cut via the pdg self.add_param('pt_min_pdg',{'__type__':0.}, include=False,cut=True) self.add_param('pt_max_pdg',{'__type__':0.}, include=False,cut=True) self.add_param('mxx_min_pdg',{'__type__':0.}, include=False,cut=True) self.add_param('mxx_only_part_antipart', {'default':False}, include=False, hidden=True) - + #hidden parameter that are transfer to the fortran code self.add_param('pdg_cut',[0], hidden=True, system=True) # store which PDG are tracked self.add_param('ptmin4pdg',[0.], hidden=True, system=True) # store pt min self.add_param('ptmax4pdg',[-1.], hidden=True, system=True) self.add_param('mxxmin4pdg',[0.], hidden=True, system=True) self.add_param('mxxpart_antipart', [False], hidden=True, system=True) - + def check_validity(self): """check the validity of the various input""" - + super(RunCardNLO, self).check_validity() # for lepton-lepton collisions, ignore 'pdlabel' and 'lhaid' @@ -5588,12 +5588,12 @@ def check_validity(self): # for dressed lepton collisions, check that the lhaid is a valid one if self['pdlabel'] not in sum(self.allowed_lep_densities.values(),[]) + ['emela']: raise InvalidRunCard('pdlabel %s not allowed for dressed-lepton collisions' % self['pdlabel']) - + elif self['pdlabel']!='nn23nlo' or self['reweight_pdf']: self['pdlabel']='nn23nlo' self['reweight_pdf']=[False] logger.info('''Lepton-lepton collisions: ignoring PDF related parameters in the run_card.dat (pdlabel, lhaid, reweight_pdf, ...)''') - + if self['lpp1'] == 0 == self['lpp2']: if self['pdlabel']!='nn23nlo' or self['reweight_pdf']: self['pdlabel']='nn23nlo' @@ -5601,8 +5601,8 @@ def check_validity(self): logger.info('''Lepton-lepton collisions: ignoring PDF related parameters in the run_card.dat (pdlabel, lhaid, reweight_pdf, ...)''') # For FxFx merging, make sure that the following parameters are set correctly: - if self['ickkw'] == 3: - # 1. Renormalization and factorization (and ellis-sexton scales) are not fixed + if self['ickkw'] == 3: + # 1. Renormalization and factorization (and ellis-sexton scales) are not fixed scales=['fixed_ren_scale','fixed_fac_scale','fixed_QES_scale'] for scale in scales: if self[scale]: @@ -5615,7 +5615,7 @@ def check_validity(self): self["reweight_scale"]=[self["reweight_scale"][0]] logger.warning('''For consistency in FxFx merging, dynamical_scale_choice has been set to -1 (default)''' ,'$MG:BOLD') - + # 2. Use kT algorithm for jets with pseudo-code size R=1.0 jetparams=['jetradius','jetalgo'] for jetparam in jetparams: @@ -5628,8 +5628,8 @@ def check_validity(self): self["dynamical_scale_choice"] = [-1] self["reweight_scale"]=[self["reweight_scale"][0]] logger.warning('''For consistency with the jet veto, the scale which will be used is ptj. dynamical_scale_choice will be set at -1.''' - ,'$MG:BOLD') - + ,'$MG:BOLD') + # For interface to PINEAPPL, need to use LHAPDF and reweighting to get scale uncertainties if self['pineappl'] and self['pdlabel'].lower() != 'lhapdf': raise InvalidRunCard('PineAPPL generation only possible with the use of LHAPDF') @@ -5661,7 +5661,7 @@ def check_validity(self): if (self['rw_fscale_down'] != -1.0 and ['rw_fscale_down'] not in self['rw_fscale']) or\ (self['rw_fscale_up'] != -1.0 and ['rw_fscale_up'] not in self['rw_fscale']): self['rw_fscale']=[1.0,self['rw_fscale_up'],self['rw_fscale_down']] - + # PDF reweighting check if any(self['reweight_pdf']): # check that we use lhapdf if reweighting is ON @@ -5672,7 +5672,7 @@ def check_validity(self): if self['pdlabel'] != "lhapdf": self['reweight_pdf']=[self['reweight_pdf'][0]] self['lhaid']=[self['lhaid'][0]] - + # make sure set have reweight_scale and dyn_scale_choice of length 1 when fixed scales: if self['fixed_ren_scale'] and self['fixed_fac_scale']: self['reweight_scale']=[self['reweight_scale'][0]] @@ -5685,7 +5685,7 @@ def check_validity(self): self['reweight_pdf']=self['reweight_pdf']*len(self['lhaid']) logger.warning("Setting 'reweight_pdf' for all 'lhaid' to %s" % self['reweight_pdf'][0]) if len(self['reweight_scale']) == 1 and len(self['dynamical_scale_choice']) != 1: - self['reweight_scale']=self['reweight_scale']*len(self['dynamical_scale_choice']) + self['reweight_scale']=self['reweight_scale']*len(self['dynamical_scale_choice']) logger.warning("Setting 'reweight_scale' for all 'dynamical_scale_choice' to %s" % self['reweight_pdf'][0]) # Check that there are no identical elements in lhaid or dynamical_scale_choice @@ -5693,7 +5693,7 @@ def check_validity(self): raise InvalidRunCard("'lhaid' has two or more identical entries. They have to be all different for the code to work correctly.") if len(self['dynamical_scale_choice']) != len(set(self['dynamical_scale_choice'])): raise InvalidRunCard("'dynamical_scale_choice' has two or more identical entries. They have to be all different for the code to work correctly.") - + # Check that lenght of lists are consistent if len(self['reweight_pdf']) != len(self['lhaid']): raise InvalidRunCard("'reweight_pdf' and 'lhaid' lists should have the same length") @@ -5730,7 +5730,7 @@ def check_validity(self): if len(self['folding']) != 3: raise InvalidRunCard("'folding' should contain exactly three integers") for ifold in self['folding']: - if ifold not in [1,2,4,8]: + if ifold not in [1,2,4,8]: raise InvalidRunCard("The three 'folding' parameters should be equal to 1, 2, 4, or 8.") # Check MC@NLO-Delta if self['mcatnlo_delta'] and not self['parton_shower'].lower() == 'pythia8': @@ -5746,11 +5746,11 @@ def check_validity(self): logger.warning("At-rest proton mode set: energy beam set to 0.938 GeV") self.set('ebeam%i' %i, 0.938) else: - raise InvalidRunCard("Energy for beam %i lower than proton mass. Please fix this") + raise InvalidRunCard("Energy for beam %i lower than proton mass. Please fix this") def update_system_parameter_for_include(self): - + # set the pdg_for_cut fortran parameter pdg_to_cut = set(list(self['pt_min_pdg'].keys()) +list(self['pt_max_pdg'].keys())+ list(self['mxx_min_pdg'].keys())+ list(self['mxx_only_part_antipart'].keys())) @@ -5758,12 +5758,12 @@ def update_system_parameter_for_include(self): pdg_to_cut.discard('default') if len(pdg_to_cut)>25: raise Exception("Maximum 25 different PDGs are allowed for PDG specific cut") - + if any(int(pdg)<0 for pdg in pdg_to_cut): logger.warning('PDG specific cuts are always applied symmetrically on particles/anti-particles. Always use positve PDG codes') raise MadGraph5Error('Some PDG specific cuts are defined using negative PDG codes') - - + + if any(pdg in pdg_to_cut for pdg in [21,22,11,13,15]+ list(range(self['maxjetflavor']+1))): # Note that this will double check in the fortran code raise Exception("Can not use PDG related cuts for massless SM particles/leptons") @@ -5790,7 +5790,7 @@ def update_system_parameter_for_include(self): self[new_var].append(self[old_var][str(pdg)] if str(pdg) in self[old_var] else default) else: if str(pdg) not in self[old_var]: - raise Exception("no default value defined for %s and no value defined for pdg %s" % (old_var, pdg)) + raise Exception("no default value defined for %s and no value defined for pdg %s" % (old_var, pdg)) self[new_var].append(self[old_var][str(pdg)]) else: self['pdg_cut'] = [0] @@ -5800,12 +5800,12 @@ def update_system_parameter_for_include(self): self['mxxpart_antipart'] = [False] def write(self, output_file, template=None, python_template=False, **opt): - """Write the run_card in output_file according to template + """Write the run_card in output_file according to template (a path to a valid run_card)""" if not template: if not MADEVENT: - template = pjoin(MG5DIR, 'Template', 'NLO', 'Cards', + template = pjoin(MG5DIR, 'Template', 'NLO', 'Cards', 'run_card.dat') python_template = True else: @@ -5818,7 +5818,7 @@ def write(self, output_file, template=None, python_template=False, **opt): def create_default_for_process(self, proc_characteristic, history, proc_def): """Rules - e+ e- beam -> lpp:0 ebeam:500 + e+ e- beam -> lpp:0 ebeam:500 p p beam -> set maxjetflavor automatically process with tagged photons -> gamma_is_j = false process without QED splittings -> gamma_is_j = false, recombination = false @@ -5844,19 +5844,19 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): self['ebeam2'] = 500 else: self['lpp1'] = 0 - self['lpp2'] = 0 - + self['lpp2'] = 0 + if proc_characteristic['ninitial'] == 1: #remove all cut self.remove_all_cut() # check for tagged photons tagged_particles = set() - + # If model has running functionality add the additional parameter model = proc_def[0].get('model') if model['running_elements']: - self.display_block.append('RUNNING') + self.display_block.append('RUNNING') # Check if need matching min_particle = 99 @@ -5885,7 +5885,7 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): else: idsmin = [l['id'] for l in procmin['legs']] break - + for procmax in proc_def: if len(procmax['legs']) != max_particle: continue @@ -5901,9 +5901,9 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): else: # all are jet => matching is ON matching=True - break - - if matching: + break + + if matching: self['ickkw'] = 3 self['fixed_ren_scale'] = False self["fixed_fac_scale"] = False @@ -5911,17 +5911,17 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): self["jetalgo"] = 1 self["jetradius"] = 1 self["parton_shower"] = "PYTHIA8" - + # Read file input/default_run_card_nlo.dat # This has to be LAST !! if os.path.exists(self.default_run_card): self.read(self.default_run_card, consistency=False) - + class MadLoopParam(ConfigFile): """ a class for storing/dealing with the file MadLoopParam.dat contains a parser to read it, facilities to write a new file,... """ - + _ID_reduction_tool_map = {1:'CutTools', 2:'PJFry++', 3:'IREGI', @@ -5929,10 +5929,10 @@ class MadLoopParam(ConfigFile): 5:'Samurai', 6:'Ninja', 7:'COLLIER'} - + def default_setup(self): """initialize the directory to the default value""" - + self.add_param("MLReductionLib", "6|7|1") self.add_param("IREGIMODE", 2) self.add_param("IREGIRECY", True) @@ -5954,7 +5954,7 @@ def default_setup(self): self.add_param("HelicityFilterLevel", 2) self.add_param("LoopInitStartOver", False) self.add_param("HelInitStartOver", False) - self.add_param("UseQPIntegrandForNinja", True) + self.add_param("UseQPIntegrandForNinja", True) self.add_param("UseQPIntegrandForCutTools", True) self.add_param("COLLIERMode", 1) self.add_param("COLLIERComputeUVpoles", True) @@ -5966,9 +5966,9 @@ def default_setup(self): self.add_param("COLLIERUseInternalStabilityTest",True) def read(self, finput): - """Read the input file, this can be a path to a file, + """Read the input file, this can be a path to a file, a file object, a str with the content of the file.""" - + if isinstance(finput, str): if "\n" in finput: finput = finput.split('\n') @@ -5976,7 +5976,7 @@ def read(self, finput): finput = open(finput) else: raise Exception("No such file %s" % input) - + previous_line= '' for line in finput: if previous_line.startswith('#'): @@ -5985,20 +5985,20 @@ def read(self, finput): if len(value) and value[0] not in ['#', '!']: self.__setitem__(name, value, change_userdefine=True) previous_line = line - - + + def write(self, outputpath, template=None,commentdefault=False): - + if not template: if not MADEVENT: - template = pjoin(MG5DIR, 'Template', 'loop_material', 'StandAlone', + template = pjoin(MG5DIR, 'Template', 'loop_material', 'StandAlone', 'Cards', 'MadLoopParams.dat') else: template = pjoin(MEDIR, 'Cards', 'MadLoopParams_default.dat') fsock = open(template, 'r') template = fsock.readlines() fsock.close() - + if isinstance(outputpath, str): output = open(outputpath, 'w') else: @@ -6019,7 +6019,7 @@ def f77format(value): return value else: raise Exception("Can not format input %s" % type(value)) - + name = '' done = set() for line in template: @@ -6034,12 +6034,12 @@ def f77format(value): elif line.startswith('#'): name = line[1:].split()[0] output.write(line) - - - - - -class eMELA_info(ConfigFile): + + + + + +class eMELA_info(ConfigFile): """ a class for eMELA (LHAPDF-like) info files """ path = '' @@ -6053,7 +6053,7 @@ def __init__(self, finput, me_dir): def read(self, finput): - if isinstance(finput, file): + if isinstance(finput, file): lines = finput.open().read().split('\n') self.path = finput.name else: @@ -6066,7 +6066,7 @@ def read(self, finput): k, v = l.split(':', 1) # ignore further occurrences of : try: self[k.strip()] = eval(v) - except (NameError, SyntaxError): + except (NameError, SyntaxError): self[k.strip()] = v def default_setup(self): @@ -6091,7 +6091,7 @@ def update_epdf_emela_variables(self, banner, uvscheme): +"powers of alpha should be reweighted a posteriori") - logger.info('Updating variables according to %s' % self.path) + logger.info('Updating variables according to %s' % self.path) # Flavours in the running of alpha nd, nu, nl = self['eMELA_ActiveFlavoursAlpha'] self.log_and_update(banner, 'run_card', 'ndnq_run', nd) @@ -6130,8 +6130,8 @@ def update_epdf_emela_variables(self, banner, uvscheme): logger.warning('Cannot treat the following renormalisation schemes for ME and PDFs: %d, %d' \ % (uvscheme, uvscheme_pdf)) - # if PDFs use MSbar with fixed alpha, set the ren scale fixed to Qref - # also check that the com energy is equal to qref, otherwise print a + # if PDFs use MSbar with fixed alpha, set the ren scale fixed to Qref + # also check that the com energy is equal to qref, otherwise print a # warning if uvscheme_pdf == 1: qref = self['eMELA_AlphaQref'] @@ -6144,23 +6144,23 @@ def update_epdf_emela_variables(self, banner, uvscheme): # LL / NLL PDF (0/1) pdforder = self['eMELA_PerturbativeOrder'] - # pdfscheme = 0->MSbar; 1->DIS; 2->eta (leptonic); 3->beta (leptonic) + # pdfscheme = 0->MSbar; 1->DIS; 2->eta (leptonic); 3->beta (leptonic) # 4->mixed (leptonic); 5-> nobeta (leptonic); 6->delta (leptonic) # if LL, use nobeta scheme unless LEGACYLLPDF > 0 if pdforder == 0: if 'eMELA_LEGACYLLPDF' not in self.keys() or self['eMELA_LEGACYLLPDF'] in [-1, 0]: self.log_and_update(banner, 'run_card', 'pdfscheme', 5) - elif self['eMELA_LEGACYLLPDF'] == 1: + elif self['eMELA_LEGACYLLPDF'] == 1: # mixed self.log_and_update(banner, 'run_card', 'pdfscheme', 4) - elif self['eMELA_LEGACYLLPDF'] == 2: + elif self['eMELA_LEGACYLLPDF'] == 2: # eta self.log_and_update(banner, 'run_card', 'pdfscheme', 2) - elif self['eMELA_LEGACYLLPDF'] == 3: + elif self['eMELA_LEGACYLLPDF'] == 3: # beta self.log_and_update(banner, 'run_card', 'pdfscheme', 3) elif pdforder == 1: - # for NLL, use eMELA_FactorisationSchemeInt = 0/1 + # for NLL, use eMELA_FactorisationSchemeInt = 0/1 # for delta/MSbar if self['eMELA_FactorisationSchemeInt'] == 0: # MSbar @@ -6177,7 +6177,7 @@ def update_epdf_emela_variables(self, banner, uvscheme): - + def log_and_update(self, banner, card, par, v): """update the card parameter par to value v diff --git a/epochX/cudacpp/gg_tt.mad/bin/internal/gen_ximprove.py b/epochX/cudacpp/gg_tt.mad/bin/internal/gen_ximprove.py index 5fd170d18d..cc842aa50f 100755 --- a/epochX/cudacpp/gg_tt.mad/bin/internal/gen_ximprove.py +++ b/epochX/cudacpp/gg_tt.mad/bin/internal/gen_ximprove.py @@ -2,18 +2,18 @@ # # Copyright (c) 2014 The MadGraph5_aMC@NLO Development team and Contributors # -# This file is a part of the MadGraph5_aMC@NLO project, an application which +# This file is a part of the MadGraph5_aMC@NLO project, an application which # automatically generates Feynman diagrams and matrix elements for arbitrary # high-energy processes in the Standard Model and beyond. # -# It is subject to the MadGraph5_aMC@NLO license which should accompany this +# It is subject to the MadGraph5_aMC@NLO license which should accompany this # distribution. # # For more information, visit madgraph.phys.ucl.ac.be and amcatnlo.web.cern.ch # ################################################################################ """ A python file to replace the fortran script gen_ximprove. - This script analyses the result of the survey/ previous refine and + This script analyses the result of the survey/ previous refine and creates the jobs for the following script. """ from __future__ import division @@ -66,77 +66,77 @@ class gensym(object): """a class to call the fortran gensym executable and handle it's output in order to create the various job that are needed for the survey""" - + #convenient shortcut for the formatting of variable @ staticmethod def format_variable(*args): return bannermod.ConfigFile.format_variable(*args) - + combining_job = 2 # number of channel by ajob - splitted_grid = False + splitted_grid = False min_iterations = 3 mode= "survey" - + def __init__(self, cmd, opt=None): - + try: super(gensym, self).__init__(cmd, opt) except TypeError: pass - - # Run statistics, a dictionary of RunStatistics(), with + + # Run statistics, a dictionary of RunStatistics(), with self.run_statistics = {} - + self.cmd = cmd self.run_card = cmd.run_card self.me_dir = cmd.me_dir - - + + # dictionary to keep track of the precision when combining iteration self.cross = collections.defaultdict(int) self.abscross = collections.defaultdict(int) self.sigma = collections.defaultdict(int) self.chi2 = collections.defaultdict(int) - + self.splitted_grid = False if self.cmd.proc_characteristics['loop_induced']: nexternal = self.cmd.proc_characteristics['nexternal'] self.splitted_grid = max(2, (nexternal-2)**2) if hasattr(self.cmd, "opts") and self.cmd.opts['accuracy'] == 0.1: self.cmd.opts['accuracy'] = 0.02 - + if isinstance(cmd.cluster, cluster.MultiCore) and self.splitted_grid > 1: self.splitted_grid = int(cmd.cluster.nb_core**0.5) if self.splitted_grid == 1 and cmd.cluster.nb_core >1: self.splitted_grid = 2 - + #if the user defines it in the run_card: if self.run_card['survey_splitting'] != -1: self.splitted_grid = self.run_card['survey_splitting'] if self.run_card['survey_nchannel_per_job'] != 1 and 'survey_nchannel_per_job' in self.run_card.user_set: - self.combining_job = self.run_card['survey_nchannel_per_job'] + self.combining_job = self.run_card['survey_nchannel_per_job'] elif self.run_card['hard_survey'] > 1: self.combining_job = 1 - - + + self.splitted_Pdir = {} self.splitted_for_dir = lambda x,y: self.splitted_grid self.combining_job_for_Pdir = lambda x: self.combining_job self.lastoffset = {} - + done_warning_zero_coupling = False def get_helicity(self, to_submit=True, clean=True): """launch a single call to madevent to get the list of non zero helicity""" - - self.subproc = [l.strip() for l in open(pjoin(self.me_dir,'SubProcesses', + + self.subproc = [l.strip() for l in open(pjoin(self.me_dir,'SubProcesses', 'subproc.mg'))] subproc = self.subproc P_zero_result = [] nb_tot_proc = len(subproc) - job_list = {} - - + job_list = {} + + for nb_proc,subdir in enumerate(subproc): self.cmd.update_status('Compiling for process %s/%s.' % \ (nb_proc+1,nb_tot_proc), level=None) @@ -154,7 +154,7 @@ def get_helicity(self, to_submit=True, clean=True): p = misc.Popen(['./gensym'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT, cwd=Pdir) #sym_input = "%(points)d %(iterations)d %(accuracy)f \n" % self.opts - + (stdout, _) = p.communicate(''.encode()) stdout = stdout.decode('ascii',errors='ignore') if stdout: @@ -166,11 +166,11 @@ def get_helicity(self, to_submit=True, clean=True): if os.path.exists(pjoin(self.me_dir, 'error')): os.remove(pjoin(self.me_dir, 'error')) continue # bypass bad process - + self.cmd.compile(['madevent_forhel'], cwd=Pdir) if not os.path.exists(pjoin(Pdir, 'madevent_forhel')): - raise Exception('Error make madevent_forhel not successful') - + raise Exception('Error make madevent_forhel not successful') + if not os.path.exists(pjoin(Pdir, 'Hel')): os.mkdir(pjoin(Pdir, 'Hel')) ff = open(pjoin(Pdir, 'Hel', 'input_app.txt'),'w') @@ -180,15 +180,15 @@ def get_helicity(self, to_submit=True, clean=True): try: os.remove(pjoin(Pdir, 'Hel','results.dat')) except Exception: - pass + pass # Launch gensym - p = misc.Popen(['../madevent_forhel < input_app.txt'], stdout=subprocess.PIPE, + p = misc.Popen(['../madevent_forhel < input_app.txt'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT, cwd=pjoin(Pdir,'Hel'), shell=True) #sym_input = "%(points)d %(iterations)d %(accuracy)f \n" % self.opts (stdout, _) = p.communicate(" ".encode()) stdout = stdout.decode('ascii',errors='ignore') if os.path.exists(pjoin(self.me_dir, 'error')): - raise Exception(pjoin(self.me_dir,'error')) + raise Exception(pjoin(self.me_dir,'error')) # note a continue is not enough here, we have in top to link # the matrixX_optim.f to matrixX_orig.f to let the code to work # after this error. @@ -203,7 +203,7 @@ def get_helicity(self, to_submit=True, clean=True): zero_gc = list() all_zampperhel = set() all_bad_amps_perhel = set() - + for line in stdout.splitlines(): if "=" not in line and ":" not in line: continue @@ -229,22 +229,22 @@ def get_helicity(self, to_submit=True, clean=True): "%s\n" % (' '.join(zero_gc)) +\ "This will slow down the computation. Please consider using restricted model:\n" +\ "https://answers.launchpad.net/mg5amcnlo/+faq/2312") - - + + all_good_hels = collections.defaultdict(list) for me_index, hel in all_hel: - all_good_hels[me_index].append(int(hel)) - + all_good_hels[me_index].append(int(hel)) + #print(all_hel) if self.run_card['hel_zeroamp']: all_bad_amps = collections.defaultdict(list) for me_index, amp in all_zamp: all_bad_amps[me_index].append(int(amp)) - + all_bad_amps_perhel = collections.defaultdict(list) for me_index, hel, amp in all_zampperhel: - all_bad_amps_perhel[me_index].append((int(hel),int(amp))) - + all_bad_amps_perhel[me_index].append((int(hel),int(amp))) + elif all_zamp: nb_zero = sum(int(a[1]) for a in all_zamp) if zero_gc: @@ -254,7 +254,7 @@ def get_helicity(self, to_submit=True, clean=True): else: logger.warning("The optimization detected that you have %i zero matrix-element for this SubProcess: %s.\n" % nb_zero +\ "This part can optimize if you set the flag hel_zeroamp to True in the run_card.") - + #check if we need to do something and write associate information" data = [all_hel, all_zamp, all_bad_amps_perhel] if not self.run_card['hel_zeroamp']: @@ -266,14 +266,14 @@ def get_helicity(self, to_submit=True, clean=True): old_data = open(pjoin(Pdir,'Hel','selection')).read() if old_data == data: continue - - + + with open(pjoin(Pdir,'Hel','selection'),'w') as fsock: - fsock.write(data) - - + fsock.write(data) + + for matrix_file in misc.glob('matrix*orig.f', Pdir): - + split_file = matrix_file.split('/') me_index = split_file[-1][len('matrix'):-len('_orig.f')] @@ -289,11 +289,11 @@ def get_helicity(self, to_submit=True, clean=True): #good_hels = sorted(list(good_hels)) good_hels = [str(x) for x in sorted(all_good_hels[me_index])] if self.run_card['hel_zeroamp']: - + bad_amps = [str(x) for x in sorted(all_bad_amps[me_index])] bad_amps_perhel = [x for x in sorted(all_bad_amps_perhel[me_index])] else: - bad_amps = [] + bad_amps = [] bad_amps_perhel = [] if __debug__: mtext = open(matrix_file).read() @@ -310,7 +310,7 @@ def get_helicity(self, to_submit=True, clean=True): recycler.set_input(matrix_file) recycler.set_output(out_file) - recycler.set_template(templ_file) + recycler.set_template(templ_file) recycler.generate_output_file() del recycler @@ -321,19 +321,19 @@ def get_helicity(self, to_submit=True, clean=True): return {}, P_zero_result - + def launch(self, to_submit=True, clean=True): """ """ if not hasattr(self, 'subproc'): - self.subproc = [l.strip() for l in open(pjoin(self.me_dir,'SubProcesses', + self.subproc = [l.strip() for l in open(pjoin(self.me_dir,'SubProcesses', 'subproc.mg'))] subproc = self.subproc - + P_zero_result = [] # check the number of times where they are no phase-space - + nb_tot_proc = len(subproc) - job_list = {} + job_list = {} for nb_proc,subdir in enumerate(subproc): self.cmd.update_status('Compiling for process %s/%s.
(previous processes already running)' % \ (nb_proc+1,nb_tot_proc), level=None) @@ -341,7 +341,7 @@ def launch(self, to_submit=True, clean=True): subdir = subdir.strip() Pdir = pjoin(self.me_dir, 'SubProcesses',subdir) logger.info(' %s ' % subdir) - + # clean previous run if clean: for match in misc.glob('*ajob*', Pdir): @@ -349,17 +349,17 @@ def launch(self, to_submit=True, clean=True): os.remove(match) for match in misc.glob('G*', Pdir): if os.path.exists(pjoin(match,'results.dat')): - os.remove(pjoin(match, 'results.dat')) + os.remove(pjoin(match, 'results.dat')) if os.path.exists(pjoin(match, 'ftn25')): - os.remove(pjoin(match, 'ftn25')) - + os.remove(pjoin(match, 'ftn25')) + #compile gensym self.cmd.compile(['gensym'], cwd=Pdir) if not os.path.exists(pjoin(Pdir, 'gensym')): - raise Exception('Error make gensym not successful') - + raise Exception('Error make gensym not successful') + # Launch gensym - p = misc.Popen(['./gensym'], stdout=subprocess.PIPE, + p = misc.Popen(['./gensym'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT, cwd=Pdir) #sym_input = "%(points)d %(iterations)d %(accuracy)f \n" % self.opts (stdout, _) = p.communicate(''.encode()) @@ -367,8 +367,8 @@ def launch(self, to_submit=True, clean=True): if os.path.exists(pjoin(self.me_dir,'error')): files.mv(pjoin(self.me_dir,'error'), pjoin(Pdir,'ajob.no_ps.log')) P_zero_result.append(subdir) - continue - + continue + jobs = stdout.split() job_list[Pdir] = jobs try: @@ -386,8 +386,8 @@ def launch(self, to_submit=True, clean=True): continue else: if done: - raise Exception('Parsing error in gensym: %s' % stdout) - job_list[Pdir] = l.split() + raise Exception('Parsing error in gensym: %s' % stdout) + job_list[Pdir] = l.split() done = True if not done: raise Exception('Parsing error in gensym: %s' % stdout) @@ -408,16 +408,16 @@ def launch(self, to_submit=True, clean=True): if to_submit: self.submit_to_cluster(job_list) job_list = {} - + return job_list, P_zero_result - + def resubmit(self, min_precision=1.0, resubmit_zero=False): """collect the result of the current run and relaunch each channel - not completed or optionally a completed one with a precision worse than + not completed or optionally a completed one with a precision worse than a threshold (and/or the zero result channel)""" - + job_list, P_zero_result = self.launch(to_submit=False, clean=False) - + for P , jobs in dict(job_list).items(): misc.sprint(jobs) to_resub = [] @@ -434,7 +434,7 @@ def resubmit(self, min_precision=1.0, resubmit_zero=False): elif max(one_result.xerru, one_result.xerrc)/one_result.xsec > min_precision: to_resub.append(job) else: - to_resub.append(job) + to_resub.append(job) if to_resub: for G in to_resub: try: @@ -442,19 +442,19 @@ def resubmit(self, min_precision=1.0, resubmit_zero=False): except Exception as error: misc.sprint(error) pass - misc.sprint(to_resub) + misc.sprint(to_resub) self.submit_to_cluster({P: to_resub}) - - - - - - - - - - - + + + + + + + + + + + def submit_to_cluster(self, job_list): """ """ @@ -467,7 +467,7 @@ def submit_to_cluster(self, job_list): nexternal = self.cmd.proc_characteristics['nexternal'] current = open(pjoin(path, "nexternal.inc")).read() ext = re.search(r"PARAMETER \(NEXTERNAL=(\d+)\)", current).group(1) - + if self.run_card['job_strategy'] == 2: self.splitted_grid = 2 if nexternal == int(ext): @@ -498,18 +498,18 @@ def submit_to_cluster(self, job_list): return self.submit_to_cluster_no_splitting(job_list) else: return self.submit_to_cluster_splitted(job_list) - - + + def submit_to_cluster_no_splitting(self, job_list): """submit the survey without the parralelization. This is the old mode which is still usefull in single core""" - - # write the template file for the parameter file + + # write the template file for the parameter file self.write_parameter(parralelization=False, Pdirs=list(job_list.keys())) - - + + # launch the job with the appropriate grouping - for Pdir, jobs in job_list.items(): + for Pdir, jobs in job_list.items(): jobs = list(jobs) i=0 while jobs: @@ -518,16 +518,16 @@ def submit_to_cluster_no_splitting(self, job_list): for _ in range(self.combining_job_for_Pdir(Pdir)): if jobs: to_submit.append(jobs.pop(0)) - + self.cmd.launch_job(pjoin(self.me_dir, 'SubProcesses', 'survey.sh'), argument=to_submit, cwd=pjoin(self.me_dir,'SubProcesses' , Pdir)) - + def create_resubmit_one_iter(self, Pdir, G, submit_ps, nb_job, step=0): """prepare the input_file for submitting the channel""" - + if 'SubProcesses' not in Pdir: Pdir = pjoin(self.me_dir, 'SubProcesses', Pdir) @@ -535,8 +535,8 @@ def create_resubmit_one_iter(self, Pdir, G, submit_ps, nb_job, step=0): self.splitted_Pdir[(Pdir, G)] = int(nb_job) - # 1. write the new input_app.txt - run_card = self.cmd.run_card + # 1. write the new input_app.txt + run_card = self.cmd.run_card options = {'event' : submit_ps, 'maxiter': 1, 'miniter': 1, @@ -545,29 +545,29 @@ def create_resubmit_one_iter(self, Pdir, G, submit_ps, nb_job, step=0): else run_card['nhel'], 'gridmode': -2, 'channel' : G - } - + } + Gdir = pjoin(Pdir, 'G%s' % G) - self.write_parameter_file(pjoin(Gdir, 'input_app.txt'), options) - + self.write_parameter_file(pjoin(Gdir, 'input_app.txt'), options) + # 2. check that ftn25 exists. - assert os.path.exists(pjoin(Gdir, "ftn25")) - - + assert os.path.exists(pjoin(Gdir, "ftn25")) + + # 3. Submit the new jobs #call back function - packet = cluster.Packet((Pdir, G, step+1), + packet = cluster.Packet((Pdir, G, step+1), self.combine_iteration, (Pdir, G, step+1)) - + if step ==0: - self.lastoffset[(Pdir, G)] = 0 - - # resubmit the new jobs + self.lastoffset[(Pdir, G)] = 0 + + # resubmit the new jobs for i in range(int(nb_job)): name = "G%s_%s" % (G,i+1) self.lastoffset[(Pdir, G)] += 1 - offset = self.lastoffset[(Pdir, G)] + offset = self.lastoffset[(Pdir, G)] self.cmd.launch_job(pjoin(self.me_dir, 'SubProcesses', 'refine_splitted.sh'), argument=[name, 'G%s'%G, offset], cwd= Pdir, @@ -575,9 +575,9 @@ def create_resubmit_one_iter(self, Pdir, G, submit_ps, nb_job, step=0): def submit_to_cluster_splitted(self, job_list): - """ submit the version of the survey with splitted grid creation - """ - + """ submit the version of the survey with splitted grid creation + """ + #if self.splitted_grid <= 1: # return self.submit_to_cluster_no_splitting(job_list) @@ -592,7 +592,7 @@ def submit_to_cluster_splitted(self, job_list): for job in jobs: packet = cluster.Packet((Pdir, job, 1), self.combine_iteration, (Pdir, job, 1)) - for i in range(self.splitted_for_dir(Pdir, job)): + for i in range(self.splitted_for_dir(Pdir, job)): self.cmd.launch_job(pjoin(self.me_dir, 'SubProcesses', 'survey.sh'), argument=[i+1, job], cwd=pjoin(self.me_dir,'SubProcesses' , Pdir), @@ -601,15 +601,15 @@ def submit_to_cluster_splitted(self, job_list): def combine_iteration(self, Pdir, G, step): grid_calculator, cross, error = self.combine_grid(Pdir, G, step) - - # Compute the number of events used for this run. + + # Compute the number of events used for this run. nb_events = grid_calculator.target_evt Gdirs = [] #build the the list of directory for i in range(self.splitted_for_dir(Pdir, G)): path = pjoin(Pdir, "G%s_%s" % (G, i+1)) Gdirs.append(path) - + # 4. make the submission of the next iteration # Three cases - less than 3 iteration -> continue # - more than 3 and less than 5 -> check error @@ -627,15 +627,15 @@ def combine_iteration(self, Pdir, G, step): need_submit = False else: need_submit = True - + elif step >= self.cmd.opts['iterations']: need_submit = False elif self.cmd.opts['accuracy'] < 0: #check for luminosity raise Exception("Not Implemented") elif self.abscross[(Pdir,G)] == 0: - need_submit = False - else: + need_submit = False + else: across = self.abscross[(Pdir,G)]/(self.sigma[(Pdir,G)]+1e-99) tot_across = self.get_current_axsec() if across == 0: @@ -646,20 +646,20 @@ def combine_iteration(self, Pdir, G, step): need_submit = True else: need_submit = False - - + + if cross: grid_calculator.write_grid_for_submission(Pdir,G, self.splitted_for_dir(Pdir, G), nb_events,mode=self.mode, conservative_factor=5.0) - - xsec_format = '.%ig'%(max(3,int(math.log10(1.0/float(error)))+2) - if float(cross)!=0.0 and float(error)!=0.0 else 8) + + xsec_format = '.%ig'%(max(3,int(math.log10(1.0/float(error)))+2) + if float(cross)!=0.0 and float(error)!=0.0 else 8) if need_submit: message = "%%s/G%%s is at %%%s +- %%.3g pb. Now submitting iteration #%s."%(xsec_format, step+1) logger.info(message%\ - (os.path.basename(Pdir), G, float(cross), + (os.path.basename(Pdir), G, float(cross), float(error)*float(cross))) self.resubmit_survey(Pdir,G, Gdirs, step) elif cross: @@ -670,26 +670,26 @@ def combine_iteration(self, Pdir, G, step): newGpath = pjoin(self.me_dir,'SubProcesses' , Pdir, 'G%s' % G) if not os.path.exists(newGpath): os.mkdir(newGpath) - + # copy the new grid: - files.cp(pjoin(Gdirs[0], 'ftn25'), + files.cp(pjoin(Gdirs[0], 'ftn25'), pjoin(self.me_dir,'SubProcesses' , Pdir, 'G%s' % G, 'ftn26')) - + # copy the events fsock = open(pjoin(newGpath, 'events.lhe'), 'w') for Gdir in Gdirs: - fsock.write(open(pjoin(Gdir, 'events.lhe')).read()) - + fsock.write(open(pjoin(Gdir, 'events.lhe')).read()) + # copy one log - files.cp(pjoin(Gdirs[0], 'log.txt'), + files.cp(pjoin(Gdirs[0], 'log.txt'), pjoin(self.me_dir,'SubProcesses' , Pdir, 'G%s' % G)) - - + + # create the appropriate results.dat self.write_results(grid_calculator, cross, error, Pdir, G, step) else: logger.info("Survey finished for %s/G%s [0 cross]", os.path.basename(Pdir),G) - + Gdir = pjoin(self.me_dir,'SubProcesses' , Pdir, 'G%s' % G) if not os.path.exists(Gdir): os.mkdir(Gdir) @@ -697,21 +697,21 @@ def combine_iteration(self, Pdir, G, step): files.cp(pjoin(Gdirs[0], 'log.txt'), Gdir) # create the appropriate results.dat self.write_results(grid_calculator, cross, error, Pdir, G, step) - + return 0 def combine_grid(self, Pdir, G, step, exclude_sub_jobs=[]): """ exclude_sub_jobs is to remove some of the subjobs if a numerical issue is detected in one of them. Warning is issue when this occurs. """ - + # 1. create an object to combine the grid information and fill it grid_calculator = combine_grid.grid_information(self.run_card['nhel']) - + for i in range(self.splitted_for_dir(Pdir, G)): if i in exclude_sub_jobs: continue - path = pjoin(Pdir, "G%s_%s" % (G, i+1)) + path = pjoin(Pdir, "G%s_%s" % (G, i+1)) fsock = misc.mult_try_open(pjoin(path, 'results.dat')) one_result = grid_calculator.add_results_information(fsock) fsock.close() @@ -723,9 +723,9 @@ def combine_grid(self, Pdir, G, step, exclude_sub_jobs=[]): fsock.close() os.remove(pjoin(path, 'results.dat')) #os.remove(pjoin(path, 'grid_information')) - - - + + + #2. combine the information about the total crossection / error # start by keep the interation in memory cross, across, sigma = grid_calculator.get_cross_section() @@ -736,12 +736,12 @@ def combine_grid(self, Pdir, G, step, exclude_sub_jobs=[]): if maxwgt: nunwgt = grid_calculator.get_nunwgt(maxwgt) # Make sure not to apply the security below during the first step of the - # survey. Also, disregard channels with a contribution relative to the + # survey. Also, disregard channels with a contribution relative to the # total cross-section smaller than 1e-8 since in this case it is unlikely # that this channel will need more than 1 event anyway. apply_instability_security = False rel_contrib = 0.0 - if (self.__class__ != gensym or step > 1): + if (self.__class__ != gensym or step > 1): Pdir_across = 0.0 Gdir_across = 0.0 for (mPdir,mG) in self.abscross.keys(): @@ -750,7 +750,7 @@ def combine_grid(self, Pdir, G, step, exclude_sub_jobs=[]): (self.sigma[(mPdir,mG)]+1e-99)) if mG == G: Gdir_across += (self.abscross[(mPdir,mG)]/ - (self.sigma[(mPdir,mG)]+1e-99)) + (self.sigma[(mPdir,mG)]+1e-99)) rel_contrib = abs(Gdir_across/(Pdir_across+1e-99)) if rel_contrib > (1.0e-8) and \ nunwgt < 2 and len(grid_calculator.results) > 1: @@ -770,14 +770,14 @@ def combine_grid(self, Pdir, G, step, exclude_sub_jobs=[]): exclude_sub_jobs = list(exclude_sub_jobs) exclude_sub_jobs.append(th_maxwgt[-1][1]) grid_calculator.results.run_statistics['skipped_subchannel'] += 1 - + # Add some monitoring of the problematic events - gPath = pjoin(Pdir, "G%s_%s" % (G, th_maxwgt[-1][1]+1)) + gPath = pjoin(Pdir, "G%s_%s" % (G, th_maxwgt[-1][1]+1)) if os.path.isfile(pjoin(gPath,'events.lhe')): lhe_file = lhe_parser.EventFile(pjoin(gPath,'events.lhe')) discardedPath = pjoin(Pdir,'DiscardedUnstableEvents') if not os.path.exists(discardedPath): - os.mkdir(discardedPath) + os.mkdir(discardedPath) if os.path.isdir(discardedPath): # Keep only the event with a maximum weight, as it surely # is the problematic one. @@ -790,10 +790,10 @@ def combine_grid(self, Pdir, G, step, exclude_sub_jobs=[]): lhe_file.close() evtRecord.write(pjoin(gPath,'events.lhe').read()) evtRecord.close() - + return self.combine_grid(Pdir, G, step, exclude_sub_jobs) - + if across !=0: if sigma != 0: self.cross[(Pdir,G)] += cross**3/sigma**2 @@ -814,10 +814,10 @@ def combine_grid(self, Pdir, G, step, exclude_sub_jobs=[]): self.chi2[(Pdir,G)] = 0 cross = self.cross[(Pdir,G)] error = 0 - + else: error = 0 - + grid_calculator.results.compute_values(update_statistics=True) if (str(os.path.basename(Pdir)), G) in self.run_statistics: self.run_statistics[(str(os.path.basename(Pdir)), G)]\ @@ -825,8 +825,8 @@ def combine_grid(self, Pdir, G, step, exclude_sub_jobs=[]): else: self.run_statistics[(str(os.path.basename(Pdir)), G)] = \ grid_calculator.results.run_statistics - - self.warnings_from_statistics(G, grid_calculator.results.run_statistics) + + self.warnings_from_statistics(G, grid_calculator.results.run_statistics) stats_msg = grid_calculator.results.run_statistics.nice_output( '/'.join([os.path.basename(Pdir),'G%s'%G])) @@ -836,7 +836,7 @@ def combine_grid(self, Pdir, G, step, exclude_sub_jobs=[]): # Clean up grid_information to avoid border effects in case of a crash for i in range(self.splitted_for_dir(Pdir, G)): path = pjoin(Pdir, "G%s_%s" % (G, i+1)) - try: + try: os.remove(pjoin(path, 'grid_information')) except OSError as oneerror: if oneerror.errno != 2: @@ -850,7 +850,7 @@ def warnings_from_statistics(self,G,stats): return EPS_fraction = float(stats['exceptional_points'])/stats['n_madloop_calls'] - + msg = "Channel %s has encountered a fraction of %.3g\n"+ \ "of numerically unstable loop matrix element computations\n"+\ "(which could not be rescued using quadruple precision).\n"+\ @@ -861,16 +861,16 @@ def warnings_from_statistics(self,G,stats): elif EPS_fraction > 0.01: logger.critical((msg%(G,EPS_fraction)).replace('might', 'can')) raise Exception((msg%(G,EPS_fraction)).replace('might', 'can')) - + def get_current_axsec(self): - + across = 0 for (Pdir,G) in self.abscross: across += self.abscross[(Pdir,G)]/(self.sigma[(Pdir,G)]+1e-99) return across - + def write_results(self, grid_calculator, cross, error, Pdir, G, step): - + #compute the value if cross == 0: abscross,nw, luminosity = 0, 0, 0 @@ -888,7 +888,7 @@ def write_results(self, grid_calculator, cross, error, Pdir, G, step): maxwgt = grid_calculator.get_max_wgt() nunwgt = grid_calculator.get_nunwgt() luminosity = nunwgt/cross - + #format the results.dat def fstr(nb): data = '%E' % nb @@ -897,20 +897,20 @@ def fstr(nb): power = int(power) + 1 return '%.5fE%+03i' %(nb,power) line = '%s %s %s %i %i %i %i %s %s %s %s 0.0 0\n' % \ - (fstr(cross), fstr(error*cross), fstr(error*cross), + (fstr(cross), fstr(error*cross), fstr(error*cross), nevents, nw, maxit,nunwgt, fstr(luminosity), fstr(wgt), fstr(abscross), fstr(maxwgt)) - + fsock = open(pjoin(self.me_dir,'SubProcesses' , Pdir, 'G%s' % G, - 'results.dat'),'w') + 'results.dat'),'w') fsock.writelines(line) fsock.close() - + def resubmit_survey(self, Pdir, G, Gdirs, step): """submit the next iteration of the survey""" # 1. write the new input_app.txt to double the number of points - run_card = self.cmd.run_card + run_card = self.cmd.run_card options = {'event' : 2**(step) * self.cmd.opts['points'] / self.splitted_grid, 'maxiter': 1, 'miniter': 1, @@ -919,18 +919,18 @@ def resubmit_survey(self, Pdir, G, Gdirs, step): else run_card['nhel'], 'gridmode': -2, 'channel' : '' - } - + } + if int(options['helicity']) == 1: options['event'] = options['event'] * 2**(self.cmd.proc_characteristics['nexternal']//3) - + for Gdir in Gdirs: - self.write_parameter_file(pjoin(Gdir, 'input_app.txt'), options) - - + self.write_parameter_file(pjoin(Gdir, 'input_app.txt'), options) + + #2. resubmit the new jobs packet = cluster.Packet((Pdir, G, step+1), self.combine_iteration, \ - (Pdir, G, step+1)) + (Pdir, G, step+1)) nb_step = len(Gdirs) * (step+1) for i,subdir in enumerate(Gdirs): subdir = subdir.rsplit('_',1)[1] @@ -938,34 +938,34 @@ def resubmit_survey(self, Pdir, G, Gdirs, step): offset = nb_step+i+1 offset=str(offset) tag = "%s.%s" % (subdir, offset) - + self.cmd.launch_job(pjoin(self.me_dir, 'SubProcesses', 'survey.sh'), argument=[tag, G], cwd=pjoin(self.me_dir,'SubProcesses' , Pdir), packet_member=packet) - + def write_parameter_file(self, path, options): """ """ - + template =""" %(event)s %(maxiter)s %(miniter)s !Number of events and max and min iterations %(accuracy)s !Accuracy %(gridmode)s !Grid Adjustment 0=none, 2=adjust 1 !Suppress Amplitude 1=yes %(helicity)s !Helicity Sum/event 0=exact - %(channel)s """ + %(channel)s """ options['event'] = int(options['event']) open(path, 'w').write(template % options) - - + + def write_parameter(self, parralelization, Pdirs=None): """Write the parameter of the survey run""" run_card = self.cmd.run_card - + options = {'event' : self.cmd.opts['points'], 'maxiter': self.cmd.opts['iterations'], 'miniter': self.min_iterations, @@ -975,36 +975,36 @@ def write_parameter(self, parralelization, Pdirs=None): 'gridmode': 2, 'channel': '' } - + if int(options['helicity'])== 1: options['event'] = options['event'] * 2**(self.cmd.proc_characteristics['nexternal']//3) - + if parralelization: options['gridmode'] = -2 options['maxiter'] = 1 #this is automatic in dsample anyway options['miniter'] = 1 #this is automatic in dsample anyway options['event'] /= self.splitted_grid - + if not Pdirs: Pdirs = self.subproc - + for Pdir in Pdirs: - path =pjoin(Pdir, 'input_app.txt') + path =pjoin(Pdir, 'input_app.txt') self.write_parameter_file(path, options) - - -class gen_ximprove(object): - - + + +class gen_ximprove(object): + + # some hardcoded value which impact the generation gen_events_security = 1.2 # multiply the number of requested event by this number for security combining_job = 0 # allow to run multiple channel in sequence - max_request_event = 1000 # split jobs if a channel if it needs more than that + max_request_event = 1000 # split jobs if a channel if it needs more than that max_event_in_iter = 5000 min_event_in_iter = 1000 - max_splitting = 130 # maximum duplication of a given channel - min_iter = 3 + max_splitting = 130 # maximum duplication of a given channel + min_iter = 3 max_iter = 9 keep_grid_for_refine = False # only apply if needed to split the job @@ -1022,7 +1022,7 @@ def __new__(cls, cmd, opt): return super(gen_ximprove, cls).__new__(gen_ximprove_gridpack) elif cls.force_class == 'loop_induced': return super(gen_ximprove, cls).__new__(gen_ximprove_share) - + if cmd.proc_characteristics['loop_induced']: return super(gen_ximprove, cls).__new__(gen_ximprove_share) elif gen_ximprove.format_variable(cmd.run_card['gridpack'], bool): @@ -1031,31 +1031,31 @@ def __new__(cls, cmd, opt): return super(gen_ximprove, cls).__new__(gen_ximprove_share) else: return super(gen_ximprove, cls).__new__(gen_ximprove_v4) - - + + def __init__(self, cmd, opt=None): - + try: super(gen_ximprove, self).__init__(cmd, opt) except TypeError: pass - + self.run_statistics = {} self.cmd = cmd self.run_card = cmd.run_card run_card = self.run_card self.me_dir = cmd.me_dir - + #extract from the run_card the information that we need. self.gridpack = run_card['gridpack'] self.nhel = run_card['nhel'] if "nhel_refine" in run_card: self.nhel = run_card["nhel_refine"] - + if self.run_card['refine_evt_by_job'] != -1: self.max_request_event = run_card['refine_evt_by_job'] - - + + # Default option for the run self.gen_events = True self.parralel = False @@ -1066,7 +1066,7 @@ def __init__(self, cmd, opt=None): # parameter for the gridpack run self.nreq = 2000 self.iseed = 4321 - + # placeholder for information self.results = 0 #updated in launch/update_html @@ -1074,16 +1074,16 @@ def __init__(self, cmd, opt=None): self.configure(opt) elif isinstance(opt, bannermod.GridpackCard): self.configure_gridpack(opt) - + def __call__(self): return self.launch() - + def launch(self): - """running """ - + """running """ + #start the run self.handle_seed() - self.results = sum_html.collect_result(self.cmd, + self.results = sum_html.collect_result(self.cmd, main_dir=pjoin(self.cmd.me_dir,'SubProcesses')) #main_dir is for gridpack readonly mode if self.gen_events: # We run to provide a given number of events @@ -1095,15 +1095,15 @@ def launch(self): def configure(self, opt): """Defines some parameter of the run""" - + for key, value in opt.items(): if key in self.__dict__: targettype = type(getattr(self, key)) setattr(self, key, self.format_variable(value, targettype, key)) else: raise Exception('%s not define' % key) - - + + # special treatment always do outside the loop to avoid side effect if 'err_goal' in opt: if self.err_goal < 1: @@ -1113,24 +1113,24 @@ def configure(self, opt): logger.info("Generating %s unweighted events." % self.err_goal) self.gen_events = True self.err_goal = self.err_goal * self.gen_events_security # security - + def handle_seed(self): """not needed but for gridpack --which is not handle here for the moment""" return - - + + def find_job_for_event(self): """return the list of channel that need to be improved""" - + assert self.err_goal >=1 self.err_goal = int(self.err_goal) - - goal_lum = self.err_goal/(self.results.axsec+1e-99) #pb^-1 + + goal_lum = self.err_goal/(self.results.axsec+1e-99) #pb^-1 logger.info('Effective Luminosity %s pb^-1', goal_lum) - + all_channels = sum([list(P) for P in self.results],[]) - all_channels.sort(key= lambda x:x.get('luminosity'), reverse=True) - + all_channels.sort(key= lambda x:x.get('luminosity'), reverse=True) + to_refine = [] for C in all_channels: if C.get('axsec') == 0: @@ -1141,61 +1141,61 @@ def find_job_for_event(self): elif C.get('xerr') > max(C.get('axsec'), (1/(100*math.sqrt(self.err_goal)))*all_channels[-1].get('axsec')): to_refine.append(C) - - logger.info('need to improve %s channels' % len(to_refine)) + + logger.info('need to improve %s channels' % len(to_refine)) return goal_lum, to_refine def update_html(self): """update the html from this object since it contains all the information""" - + run = self.cmd.results.current['run_name'] if not os.path.exists(pjoin(self.cmd.me_dir, 'HTML', run)): os.mkdir(pjoin(self.cmd.me_dir, 'HTML', run)) - + unit = self.cmd.results.unit - P_text = "" - if self.results: - Presults = self.results + P_text = "" + if self.results: + Presults = self.results else: self.results = sum_html.collect_result(self.cmd, None) Presults = self.results - + for P_comb in Presults: - P_text += P_comb.get_html(run, unit, self.cmd.me_dir) - - Presults.write_results_dat(pjoin(self.cmd.me_dir,'SubProcesses', 'results.dat')) - + P_text += P_comb.get_html(run, unit, self.cmd.me_dir) + + Presults.write_results_dat(pjoin(self.cmd.me_dir,'SubProcesses', 'results.dat')) + fsock = open(pjoin(self.cmd.me_dir, 'HTML', run, 'results.html'),'w') fsock.write(sum_html.results_header) fsock.write('%s
' % Presults.get_html(run, unit, self.cmd.me_dir)) - fsock.write('%s
' % P_text) - + fsock.write('%s ' % P_text) + self.cmd.results.add_detail('cross', Presults.xsec) - self.cmd.results.add_detail('error', Presults.xerru) - - return Presults.xsec, Presults.xerru + self.cmd.results.add_detail('error', Presults.xerru) + + return Presults.xsec, Presults.xerru + - class gen_ximprove_v4(gen_ximprove): - + # some hardcoded value which impact the generation gen_events_security = 1.2 # multiply the number of requested event by this number for security combining_job = 0 # allow to run multiple channel in sequence - max_request_event = 1000 # split jobs if a channel if it needs more than that + max_request_event = 1000 # split jobs if a channel if it needs more than that max_event_in_iter = 5000 min_event_in_iter = 1000 - max_splitting = 130 # maximum duplication of a given channel - min_iter = 3 + max_splitting = 130 # maximum duplication of a given channel + min_iter = 3 max_iter = 9 keep_grid_for_refine = False # only apply if needed to split the job - def __init__(self, cmd, opt=None): - + def __init__(self, cmd, opt=None): + super(gen_ximprove_v4, self).__init__(cmd, opt) - + if cmd.opts['accuracy'] < cmd._survey_options['accuracy'][1]: self.increase_precision(cmd._survey_options['accuracy'][1]/cmd.opts['accuracy']) @@ -1203,7 +1203,7 @@ def reset_multijob(self): for path in misc.glob(pjoin('*', '*','multijob.dat'), pjoin(self.me_dir, 'SubProcesses')): open(path,'w').write('0\n') - + def write_multijob(self, Channel, nb_split): """ """ if nb_split <=1: @@ -1211,7 +1211,7 @@ def write_multijob(self, Channel, nb_split): f = open(pjoin(self.me_dir, 'SubProcesses', Channel.get('name'), 'multijob.dat'), 'w') f.write('%i\n' % nb_split) f.close() - + def increase_precision(self, rate=3): #misc.sprint(rate) if rate < 3: @@ -1222,25 +1222,25 @@ def increase_precision(self, rate=3): rate = rate -2 self.max_event_in_iter = int((rate+1) * 10000) self.min_events = int(rate+2) * 2500 - self.gen_events_security = 1 + 0.1 * (rate+2) - + self.gen_events_security = 1 + 0.1 * (rate+2) + if int(self.nhel) == 1: self.min_event_in_iter *= 2**(self.cmd.proc_characteristics['nexternal']//3) self.max_event_in_iter *= 2**(self.cmd.proc_characteristics['nexternal']//2) - - + + alphabet = "abcdefghijklmnopqrstuvwxyz" def get_job_for_event(self): """generate the script in order to generate a given number of event""" # correspond to write_gen in the fortran version - - + + goal_lum, to_refine = self.find_job_for_event() #reset the potential multijob of previous run self.reset_multijob() - + jobs = [] # list of the refine if some job are split is list of # dict with the parameter of the run. @@ -1257,17 +1257,17 @@ def get_job_for_event(self): else: for i in range(len(to_refine) //3): new_order.append(to_refine[i]) - new_order.append(to_refine[-2*i-1]) + new_order.append(to_refine[-2*i-1]) new_order.append(to_refine[-2*i-2]) if len(to_refine) % 3 == 1: - new_order.append(to_refine[i+1]) + new_order.append(to_refine[i+1]) elif len(to_refine) % 3 == 2: - new_order.append(to_refine[i+2]) + new_order.append(to_refine[i+2]) #ensure that the reordering is done nicely assert set([id(C) for C in to_refine]) == set([id(C) for C in new_order]) - to_refine = new_order - - + to_refine = new_order + + # loop over the channel to refine for C in to_refine: #1. Compute the number of points are needed to reach target @@ -1279,7 +1279,7 @@ def get_job_for_event(self): nb_split = self.max_splitting nb_split=max(1, nb_split) - + #2. estimate how many points we need in each iteration if C.get('nunwgt') > 0: nevents = needed_event / nb_split * (C.get('nevents') / C.get('nunwgt')) @@ -1296,21 +1296,21 @@ def get_job_for_event(self): nevents = max(self.min_event_in_iter, min(self.max_event_in_iter, nevents)) logger.debug("%s : need %s event. Need %s split job of %s points", C.name, needed_event, nb_split, nevents) - + # write the multi-job information self.write_multijob(C, nb_split) - + packet = cluster.Packet((C.parent_name, C.name), combine_runs.CombineRuns, (pjoin(self.me_dir, 'SubProcesses', C.parent_name)), {"subproc": C.name, "nb_split":nb_split}) - - + + #create the info dict assume no splitting for the default info = {'name': self.cmd.results.current['run_name'], 'script_name': 'unknown', 'directory': C.name, # need to be change for splitted job - 'P_dir': C.parent_name, + 'P_dir': C.parent_name, 'Ppath': pjoin(self.cmd.me_dir, 'SubProcesses', C.parent_name), 'offset': 1, # need to be change for splitted job 'nevents': nevents, @@ -1321,7 +1321,7 @@ def get_job_for_event(self): 'channel': C.name.replace('G',''), 'grid_refinment' : 0, #no refinment of the grid 'base_directory': '', #should be change in splitted job if want to keep the grid - 'packet': packet, + 'packet': packet, } if nb_split == 1: @@ -1334,19 +1334,19 @@ def get_job_for_event(self): if self.keep_grid_for_refine: new_info['base_directory'] = info['directory'] jobs.append(new_info) - - self.create_ajob(pjoin(self.me_dir, 'SubProcesses', 'refine.sh'), jobs) - + + self.create_ajob(pjoin(self.me_dir, 'SubProcesses', 'refine.sh'), jobs) + def create_ajob(self, template, jobs, write_dir=None): """create the ajob""" - + if not jobs: return if not write_dir: write_dir = pjoin(self.me_dir, 'SubProcesses') - + #filter the job according to their SubProcess directory # no mix submition P2job= collections.defaultdict(list) for j in jobs: @@ -1355,11 +1355,11 @@ def create_ajob(self, template, jobs, write_dir=None): for P in P2job.values(): self.create_ajob(template, P, write_dir) return - - + + #Here we can assume that all job are for the same directory. path = pjoin(write_dir, jobs[0]['P_dir']) - + template_text = open(template, 'r').read() # special treatment if needed to combine the script # computes how many submition miss one job @@ -1384,8 +1384,8 @@ def create_ajob(self, template, jobs, write_dir=None): skip1=0 combining_job =1 nb_sub = len(jobs) - - + + nb_use = 0 for i in range(nb_sub): script_number = i+1 @@ -1404,14 +1404,14 @@ def create_ajob(self, template, jobs, write_dir=None): info["base_directory"] = "./" fsock.write(template_text % info) nb_use += nb_job - + fsock.close() return script_number def get_job_for_precision(self): """create the ajob to achieve a give precision on the total cross-section""" - + assert self.err_goal <=1 xtot = abs(self.results.xsec) logger.info("Working on precision: %s %%" %(100*self.err_goal)) @@ -1428,46 +1428,46 @@ def get_job_for_precision(self): rerr *=rerr if not len(to_refine): return - - # change limit since most don't contribute + + # change limit since most don't contribute limit = math.sqrt((self.err_goal * xtot)**2 - rerr/math.sqrt(len(to_refine))) for C in to_refine[:]: cerr = C.mfactor*(C.xerru + len(to_refine)*C.xerrc) if cerr < limit: to_refine.remove(C) - + # all the channel are now selected. create the channel information logger.info('need to improve %s channels' % len(to_refine)) - + jobs = [] # list of the refine if some job are split is list of # dict with the parameter of the run. # loop over the channel to refine for C in to_refine: - + #1. Determine how many events we need in each iteration yerr = C.mfactor*(C.xerru+len(to_refine)*C.xerrc) nevents = 0.2*C.nevents*(yerr/limit)**2 - + nb_split = int((nevents*(C.nunwgt/C.nevents)/self.max_request_event/ (2**self.min_iter-1))**(2/3)) nb_split = max(nb_split, 1) - # **(2/3) to slow down the increase in number of jobs + # **(2/3) to slow down the increase in number of jobs if nb_split > self.max_splitting: nb_split = self.max_splitting - + if nb_split >1: nevents = nevents / nb_split self.write_multijob(C, nb_split) # forbid too low/too large value nevents = min(self.min_event_in_iter, max(self.max_event_in_iter, nevents)) - - + + #create the info dict assume no splitting for the default info = {'name': self.cmd.results.current['run_name'], 'script_name': 'unknown', 'directory': C.name, # need to be change for splitted job - 'P_dir': C.parent_name, + 'P_dir': C.parent_name, 'Ppath': pjoin(self.cmd.me_dir, 'SubProcesses', C.parent_name), 'offset': 1, # need to be change for splitted job 'nevents': nevents, @@ -1487,38 +1487,38 @@ def get_job_for_precision(self): new_info['offset'] = i+1 new_info['directory'] += self.alphabet[i % 26] + str((i+1)//26) jobs.append(new_info) - self.create_ajob(pjoin(self.me_dir, 'SubProcesses', 'refine.sh'), jobs) - + self.create_ajob(pjoin(self.me_dir, 'SubProcesses', 'refine.sh'), jobs) + def update_html(self): """update the html from this object since it contains all the information""" - + run = self.cmd.results.current['run_name'] if not os.path.exists(pjoin(self.cmd.me_dir, 'HTML', run)): os.mkdir(pjoin(self.cmd.me_dir, 'HTML', run)) - + unit = self.cmd.results.unit - P_text = "" - if self.results: - Presults = self.results + P_text = "" + if self.results: + Presults = self.results else: self.results = sum_html.collect_result(self.cmd, None) Presults = self.results - + for P_comb in Presults: - P_text += P_comb.get_html(run, unit, self.cmd.me_dir) - - Presults.write_results_dat(pjoin(self.cmd.me_dir,'SubProcesses', 'results.dat')) - + P_text += P_comb.get_html(run, unit, self.cmd.me_dir) + + Presults.write_results_dat(pjoin(self.cmd.me_dir,'SubProcesses', 'results.dat')) + fsock = open(pjoin(self.cmd.me_dir, 'HTML', run, 'results.html'),'w') fsock.write(sum_html.results_header) fsock.write('%s
' % Presults.get_html(run, unit, self.cmd.me_dir)) - fsock.write('%s
' % P_text) - + fsock.write('%s ' % P_text) + self.cmd.results.add_detail('cross', Presults.xsec) - self.cmd.results.add_detail('error', Presults.xerru) - - return Presults.xsec, Presults.xerru + self.cmd.results.add_detail('error', Presults.xerru) + + return Presults.xsec, Presults.xerru @@ -1528,27 +1528,27 @@ class gen_ximprove_v4_nogridupdate(gen_ximprove_v4): # some hardcoded value which impact the generation gen_events_security = 1.1 # multiply the number of requested event by this number for security combining_job = 0 # allow to run multiple channel in sequence - max_request_event = 400 # split jobs if a channel if it needs more than that + max_request_event = 400 # split jobs if a channel if it needs more than that max_event_in_iter = 500 min_event_in_iter = 250 - max_splitting = 260 # maximum duplication of a given channel - min_iter = 2 + max_splitting = 260 # maximum duplication of a given channel + min_iter = 2 max_iter = 6 keep_grid_for_refine = True - def __init__(self, cmd, opt=None): - + def __init__(self, cmd, opt=None): + gen_ximprove.__init__(cmd, opt) - + if cmd.proc_characteristics['loopinduced'] and \ cmd.proc_characteristics['nexternal'] > 2: self.increase_parralelization(cmd.proc_characteristics['nexternal']) - + def increase_parralelization(self, nexternal): - self.max_splitting = 1000 - + self.max_splitting = 1000 + if self.run_card['refine_evt_by_job'] != -1: pass elif nexternal == 3: @@ -1563,27 +1563,27 @@ def increase_parralelization(self, nexternal): class gen_ximprove_share(gen_ximprove, gensym): """Doing the refine in multicore. Each core handle a couple of PS point.""" - nb_ps_by_job = 2000 + nb_ps_by_job = 2000 mode = "refine" gen_events_security = 1.15 # Note the real security is lower since we stop the jobs if they are at 96% # of this target. def __init__(self, *args, **opts): - + super(gen_ximprove_share, self).__init__(*args, **opts) self.generated_events = {} self.splitted_for_dir = lambda x,y : self.splitted_Pdir[(x,y)] - + def get_job_for_event(self): """generate the script in order to generate a given number of event""" # correspond to write_gen in the fortran version - + goal_lum, to_refine = self.find_job_for_event() self.goal_lum = goal_lum - + # loop over the channel to refine to find the number of PS point to launch total_ps_points = 0 channel_to_ps_point = [] @@ -1593,7 +1593,7 @@ def get_job_for_event(self): os.remove(pjoin(self.me_dir, "SubProcesses",C.parent_name, C.name, "events.lhe")) except: pass - + #1. Compute the number of points are needed to reach target needed_event = goal_lum*C.get('axsec') if needed_event == 0: @@ -1609,18 +1609,18 @@ def get_job_for_event(self): nb_split = 1 if nb_split > self.max_splitting: nb_split = self.max_splitting - nevents = self.max_event_in_iter * self.max_splitting + nevents = self.max_event_in_iter * self.max_splitting else: nevents = self.max_event_in_iter * nb_split if nevents > self.max_splitting*self.max_event_in_iter: logger.warning("Channel %s/%s has a very low efficiency of unweighting. Might not be possible to reach target" % \ (C.name, C.parent_name)) - nevents = self.max_event_in_iter * self.max_splitting - - total_ps_points += nevents - channel_to_ps_point.append((C, nevents)) - + nevents = self.max_event_in_iter * self.max_splitting + + total_ps_points += nevents + channel_to_ps_point.append((C, nevents)) + if self.cmd.options["run_mode"] == 1: if self.cmd.options["cluster_size"]: nb_ps_by_job = total_ps_points /int(self.cmd.options["cluster_size"]) @@ -1634,7 +1634,7 @@ def get_job_for_event(self): nb_ps_by_job = total_ps_points / self.cmd.options["nb_core"] else: nb_ps_by_job = self.nb_ps_by_job - + nb_ps_by_job = int(max(nb_ps_by_job, 500)) for C, nevents in channel_to_ps_point: @@ -1648,20 +1648,20 @@ def get_job_for_event(self): self.create_resubmit_one_iter(C.parent_name, C.name[1:], submit_ps, nb_job, step=0) needed_event = goal_lum*C.get('xsec') logger.debug("%s/%s : need %s event. Need %s split job of %s points", C.parent_name, C.name, needed_event, nb_job, submit_ps) - - + + def combine_iteration(self, Pdir, G, step): - + grid_calculator, cross, error = self.combine_grid(Pdir, G, step) - + # collect all the generated_event Gdirs = [] #build the the list of directory for i in range(self.splitted_for_dir(Pdir, G)): path = pjoin(Pdir, "G%s_%s" % (G, i+1)) Gdirs.append(path) assert len(grid_calculator.results) == len(Gdirs) == self.splitted_for_dir(Pdir, G) - - + + # Check how many events are going to be kept after un-weighting. needed_event = cross * self.goal_lum if needed_event == 0: @@ -1671,19 +1671,19 @@ def combine_iteration(self, Pdir, G, step): if self.err_goal >=1: if needed_event > self.gen_events_security * self.err_goal: needed_event = int(self.gen_events_security * self.err_goal) - + if (Pdir, G) in self.generated_events: old_nunwgt, old_maxwgt = self.generated_events[(Pdir, G)] else: old_nunwgt, old_maxwgt = 0, 0 - + if old_nunwgt == 0 and os.path.exists(pjoin(Pdir,"G%s" % G, "events.lhe")): # possible for second refine. lhe = lhe_parser.EventFile(pjoin(Pdir,"G%s" % G, "events.lhe")) old_nunwgt = lhe.unweight(None, trunc_error=0.005, log_level=0) old_maxwgt = lhe.max_wgt - - + + maxwgt = max(grid_calculator.get_max_wgt(), old_maxwgt) new_evt = grid_calculator.get_nunwgt(maxwgt) @@ -1695,35 +1695,35 @@ def combine_iteration(self, Pdir, G, step): one_iter_nb_event = max(grid_calculator.get_nunwgt(),1) drop_previous_iteration = False # compare the number of events to generate if we discard the previous iteration - n_target_one_iter = (needed_event-one_iter_nb_event) / ( one_iter_nb_event/ sum([R.nevents for R in grid_calculator.results])) + n_target_one_iter = (needed_event-one_iter_nb_event) / ( one_iter_nb_event/ sum([R.nevents for R in grid_calculator.results])) n_target_combined = (needed_event-nunwgt) / efficiency if n_target_one_iter < n_target_combined: # the last iteration alone has more event that the combine iteration. - # it is therefore interesting to drop previous iteration. + # it is therefore interesting to drop previous iteration. drop_previous_iteration = True nunwgt = one_iter_nb_event maxwgt = grid_calculator.get_max_wgt() new_evt = nunwgt - efficiency = ( one_iter_nb_event/ sum([R.nevents for R in grid_calculator.results])) - + efficiency = ( one_iter_nb_event/ sum([R.nevents for R in grid_calculator.results])) + try: if drop_previous_iteration: raise IOError output_file = open(pjoin(Pdir,"G%s" % G, "events.lhe"), 'a') except IOError: output_file = open(pjoin(Pdir,"G%s" % G, "events.lhe"), 'w') - + misc.call(["cat"] + [pjoin(d, "events.lhe") for d in Gdirs], stdout=output_file) output_file.close() # For large number of iteration. check the number of event by doing the # real unweighting. - if nunwgt < 0.6 * needed_event and step > self.min_iter: + if nunwgt < 0.6 * needed_event and step > self.min_iter: lhe = lhe_parser.EventFile(output_file.name) old_nunwgt =nunwgt nunwgt = lhe.unweight(None, trunc_error=0.01, log_level=0) - - + + self.generated_events[(Pdir, G)] = (nunwgt, maxwgt) # misc.sprint("Adding %s event to %s. Currently at %s" % (new_evt, G, nunwgt)) @@ -1742,21 +1742,21 @@ def combine_iteration(self, Pdir, G, step): nevents = grid_calculator.results[0].nevents if nevents == 0: # possible if some integral returns 0 nevents = max(g.nevents for g in grid_calculator.results) - + need_ps_point = (needed_event - nunwgt)/(efficiency+1e-99) - need_job = need_ps_point // nevents + 1 - + need_job = need_ps_point // nevents + 1 + if step < self.min_iter: # This is normal but check if we are on the good track - job_at_first_iter = nb_split_before/2**(step-1) + job_at_first_iter = nb_split_before/2**(step-1) expected_total_job = job_at_first_iter * (2**self.min_iter-1) done_job = job_at_first_iter * (2**step-1) expected_remaining_job = expected_total_job - done_job - logger.debug("efficiency status (smaller is better): %s", need_job/expected_remaining_job) + logger.debug("efficiency status (smaller is better): %s", need_job/expected_remaining_job) # increase if needed but not too much need_job = min(need_job, expected_remaining_job*1.25) - + nb_job = (need_job-0.5)//(2**(self.min_iter-step)-1) + 1 nb_job = max(1, nb_job) grid_calculator.write_grid_for_submission(Pdir,G, @@ -1768,7 +1768,7 @@ def combine_iteration(self, Pdir, G, step): nb_job, step)) self.create_resubmit_one_iter(Pdir, G, nevents, nb_job, step) #self.create_job(Pdir, G, nb_job, nevents, step) - + elif step < self.max_iter: if step + 1 == self.max_iter: need_job = 1.20 * need_job # avoid to have just too few event. @@ -1777,21 +1777,21 @@ def combine_iteration(self, Pdir, G, step): grid_calculator.write_grid_for_submission(Pdir,G, self.splitted_for_dir(Pdir, G), nb_job*nevents ,mode=self.mode, conservative_factor=self.max_iter) - - + + logger.info("%s/G%s is at %i/%i ('%.2g%%') event. Resubmit %i job at iteration %i." \ % (os.path.basename(Pdir), G, int(nunwgt),int(needed_event)+1, (float(nunwgt)/needed_event)*100.0 if needed_event>0.0 else 0.0, nb_job, step)) self.create_resubmit_one_iter(Pdir, G, nevents, nb_job, step) - - + + return 0 - - + + def write_results(self, grid_calculator, cross, error, Pdir, G, step, efficiency): - + #compute the value if cross == 0: abscross,nw, luminosity = 0, 0, 0 @@ -1807,7 +1807,7 @@ def write_results(self, grid_calculator, cross, error, Pdir, G, step, efficiency nevents = nunwgt # make the unweighting to compute the number of events: luminosity = nunwgt/cross - + #format the results.dat def fstr(nb): data = '%E' % nb @@ -1816,23 +1816,23 @@ def fstr(nb): power = int(power) + 1 return '%.5fE%+03i' %(nb,power) line = '%s %s %s %i %i %i %i %s %s %s 0.0 0.0 0\n' % \ - (fstr(cross), fstr(error*cross), fstr(error*cross), + (fstr(cross), fstr(error*cross), fstr(error*cross), nevents, nw, maxit,nunwgt, fstr(luminosity), fstr(wgt), fstr(abscross)) - + fsock = open(pjoin(self.me_dir,'SubProcesses' , Pdir, 'G%s' % G, - 'results.dat'),'w') + 'results.dat'),'w') fsock.writelines(line) fsock.close() - - - + + + class gen_ximprove_gridpack(gen_ximprove_v4): - - min_iter = 1 + + min_iter = 1 max_iter = 13 - max_request_event = 1e12 # split jobs if a channel if it needs more than that + max_request_event = 1e12 # split jobs if a channel if it needs more than that max_event_in_iter = 4000 min_event_in_iter = 500 combining_job = sys.maxsize @@ -1844,7 +1844,7 @@ def __new__(cls, *args, **opts): return super(gen_ximprove_gridpack, cls).__new__(cls, *args, **opts) def __init__(self, *args, **opts): - + self.ngran = -1 self.gscalefact = {} self.readonly = False @@ -1855,23 +1855,23 @@ def __init__(self, *args, **opts): self.readonly = opts['readonly'] super(gen_ximprove_gridpack,self).__init__(*args, **opts) if self.ngran == -1: - self.ngran = 1 - + self.ngran = 1 + def find_job_for_event(self): """return the list of channel that need to be improved""" import random - + assert self.err_goal >=1 self.err_goal = int(self.err_goal) self.gscalefact = {} - + xtot = self.results.axsec - goal_lum = self.err_goal/(xtot+1e-99) #pb^-1 + goal_lum = self.err_goal/(xtot+1e-99) #pb^-1 # logger.info('Effective Luminosity %s pb^-1', goal_lum) - + all_channels = sum([list(P) for P in self.results],[]) all_channels.sort(key=lambda x : x.get('luminosity'), reverse=True) - + to_refine = [] for C in all_channels: tag = C.get('name') @@ -1885,27 +1885,27 @@ def find_job_for_event(self): #need to generate events logger.debug('request events for ', C.get('name'), 'cross=', C.get('axsec'), 'needed events = ', goal_lum * C.get('axsec')) - to_refine.append(C) - - logger.info('need to improve %s channels' % len(to_refine)) + to_refine.append(C) + + logger.info('need to improve %s channels' % len(to_refine)) return goal_lum, to_refine def get_job_for_event(self): """generate the script in order to generate a given number of event""" # correspond to write_gen in the fortran version - - + + goal_lum, to_refine = self.find_job_for_event() jobs = [] # list of the refine if some job are split is list of # dict with the parameter of the run. - + # loop over the channel to refine for C in to_refine: #1. Compute the number of points are needed to reach target needed_event = max(goal_lum*C.get('axsec'), self.ngran) nb_split = 1 - + #2. estimate how many points we need in each iteration if C.get('nunwgt') > 0: nevents = needed_event / nb_split * (C.get('nevents') / C.get('nunwgt')) @@ -1920,13 +1920,13 @@ def get_job_for_event(self): # forbid too low/too large value nevents = max(self.min_event_in_iter, min(self.max_event_in_iter, nevents)) logger.debug("%s : need %s event. Need %s split job of %s points", C.name, needed_event, nb_split, nevents) - + #create the info dict assume no splitting for the default info = {'name': self.cmd.results.current['run_name'], 'script_name': 'unknown', 'directory': C.name, # need to be change for splitted job - 'P_dir': os.path.basename(C.parent_name), + 'P_dir': os.path.basename(C.parent_name), 'offset': 1, # need to be change for splitted job 'Ppath': pjoin(self.cmd.me_dir, 'SubProcesses', C.parent_name), 'nevents': nevents, #int(nevents*self.gen_events_security)+1, @@ -1938,7 +1938,7 @@ def get_job_for_event(self): 'channel': C.name.replace('G',''), 'grid_refinment' : 0, #no refinment of the grid 'base_directory': '', #should be change in splitted job if want to keep the grid - 'packet': None, + 'packet': None, } if self.readonly: @@ -1946,11 +1946,11 @@ def get_job_for_event(self): info['base_directory'] = basedir jobs.append(info) - - write_dir = '.' if self.readonly else None - self.create_ajob(pjoin(self.me_dir, 'SubProcesses', 'refine.sh'), jobs, write_dir) - + + write_dir = '.' if self.readonly else None + self.create_ajob(pjoin(self.me_dir, 'SubProcesses', 'refine.sh'), jobs, write_dir) + done = [] for j in jobs: if j['P_dir'] in done: @@ -1967,22 +1967,22 @@ def get_job_for_event(self): write_dir = '.' if self.readonly else pjoin(self.me_dir, 'SubProcesses') self.check_events(goal_lum, to_refine, jobs, write_dir) - + def check_events(self, goal_lum, to_refine, jobs, Sdir): """check that we get the number of requested events if not resubmit.""" - + new_jobs = [] - + for C, job_info in zip(to_refine, jobs): - P = job_info['P_dir'] + P = job_info['P_dir'] G = job_info['channel'] axsec = C.get('axsec') - requested_events= job_info['requested_event'] - + requested_events= job_info['requested_event'] + new_results = sum_html.OneResult((P,G)) new_results.read_results(pjoin(Sdir,P, 'G%s'%G, 'results.dat')) - + # need to resubmit? if new_results.get('nunwgt') < requested_events: pwd = pjoin(os.getcwd(),job_info['P_dir'],'G%s'%G) if self.readonly else \ @@ -1992,10 +1992,10 @@ def check_events(self, goal_lum, to_refine, jobs, Sdir): job_info['offset'] += 1 new_jobs.append(job_info) files.mv(pjoin(pwd, 'events.lhe'), pjoin(pwd, 'events.lhe.previous')) - + if new_jobs: - self.create_ajob(pjoin(self.me_dir, 'SubProcesses', 'refine.sh'), new_jobs, Sdir) - + self.create_ajob(pjoin(self.me_dir, 'SubProcesses', 'refine.sh'), new_jobs, Sdir) + done = [] for j in new_jobs: if j['P_dir'] in done: @@ -2015,9 +2015,9 @@ def check_events(self, goal_lum, to_refine, jobs, Sdir): files.put_at_end(pjoin(pwd, 'events.lhe'),pjoin(pwd, 'events.lhe.previous')) return self.check_events(goal_lum, to_refine, new_jobs, Sdir) - - - - + + + + diff --git a/epochX/cudacpp/gg_tt.mad/bin/internal/madevent_interface.py b/epochX/cudacpp/gg_tt.mad/bin/internal/madevent_interface.py index cb6bf4ca57..8abba3f33f 100755 --- a/epochX/cudacpp/gg_tt.mad/bin/internal/madevent_interface.py +++ b/epochX/cudacpp/gg_tt.mad/bin/internal/madevent_interface.py @@ -2,11 +2,11 @@ # # Copyright (c) 2011 The MadGraph5_aMC@NLO Development team and Contributors # -# This file is a part of the MadGraph5_aMC@NLO project, an application which +# This file is a part of the MadGraph5_aMC@NLO project, an application which # automatically generates Feynman diagrams and matrix elements for arbitrary # high-energy processes in the Standard Model and beyond. # -# It is subject to the MadGraph5_aMC@NLO license which should accompany this +# It is subject to the MadGraph5_aMC@NLO license which should accompany this # distribution. # # For more information, visit madgraph.phys.ucl.ac.be and amcatnlo.web.cern.ch @@ -53,10 +53,10 @@ # Special logger for the Cmd Interface logger = logging.getLogger('madevent.stdout') # -> stdout logger_stderr = logging.getLogger('madevent.stderr') # ->stderr - + try: import madgraph -except ImportError as error: +except ImportError as error: # import from madevent directory MADEVENT = True import internal.extended_cmd as cmd @@ -92,7 +92,7 @@ import madgraph.various.lhe_parser as lhe_parser # import madgraph.various.histograms as histograms # imported later to not slow down the loading of the code import models.check_param_card as check_param_card - from madgraph.iolibs.files import ln + from madgraph.iolibs.files import ln from madgraph import InvalidCmd, MadGraph5Error, MG5DIR, ReadWrite @@ -113,10 +113,10 @@ class CmdExtended(common_run.CommonRunCmd): next_possibility = { 'start': [], } - + debug_output = 'ME5_debug' error_debug = 'Please report this bug on https://bugs.launchpad.net/mg5amcnlo\n' - error_debug += 'More information is found in \'%(debug)s\'.\n' + error_debug += 'More information is found in \'%(debug)s\'.\n' error_debug += 'Please attach this file to your report.' config_debug = 'If you need help with this issue please contact us on https://answers.launchpad.net/mg5amcnlo\n' @@ -124,18 +124,18 @@ class CmdExtended(common_run.CommonRunCmd): keyboard_stop_msg = """stopping all operation in order to quit MadGraph5_aMC@NLO please enter exit""" - + # Define the Error InvalidCmd = InvalidCmd ConfigurationError = MadGraph5Error def __init__(self, me_dir, options, *arg, **opt): """Init history and line continuation""" - + # Tag allowing/forbiding question self.force = False - - # If possible, build an info line with current version number + + # If possible, build an info line with current version number # and date, from the VERSION text file info = misc.get_pkg_info() info_line = "" @@ -150,7 +150,7 @@ def __init__(self, me_dir, options, *arg, **opt): else: version = open(pjoin(root_path,'MGMEVersion.txt')).readline().strip() info_line = "#* VERSION %s %s *\n" % \ - (version, (24 - len(version)) * ' ') + (version, (24 - len(version)) * ' ') # Create a header for the history file. # Remember to fill in time at writeout time! @@ -177,7 +177,7 @@ def __init__(self, me_dir, options, *arg, **opt): '#* run as ./bin/madevent.py filename *\n' + \ '#* *\n' + \ '#************************************************************\n' - + if info_line: info_line = info_line[1:] @@ -203,11 +203,11 @@ def __init__(self, me_dir, options, *arg, **opt): "* *\n" + \ "************************************************************") super(CmdExtended, self).__init__(me_dir, options, *arg, **opt) - + def get_history_header(self): - """return the history header""" + """return the history header""" return self.history_header % misc.get_time_info() - + def stop_on_keyboard_stop(self): """action to perform to close nicely on a keyboard interupt""" try: @@ -219,20 +219,20 @@ def stop_on_keyboard_stop(self): self.add_error_log_in_html(KeyboardInterrupt) except: pass - + def postcmd(self, stop, line): """ Update the status of the run for finishing interactive command """ - - stop = super(CmdExtended, self).postcmd(stop, line) + + stop = super(CmdExtended, self).postcmd(stop, line) # relaxing the tag forbidding question self.force = False - + if not self.use_rawinput: return stop - + if self.results and not self.results.current: return stop - + arg = line.split() if len(arg) == 0: return stop @@ -240,41 +240,41 @@ def postcmd(self, stop, line): return stop if isinstance(self.results.status, str) and self.results.status == 'Stop by the user': self.update_status('%s Stop by the user' % arg[0], level=None, error=True) - return stop + return stop elif not self.results.status: return stop elif str(arg[0]) in ['exit','quit','EOF']: return stop - + try: - self.update_status('Command \'%s\' done.
Waiting for instruction.' % arg[0], + self.update_status('Command \'%s\' done.
Waiting for instruction.' % arg[0], level=None, error=True) except Exception: misc.sprint('update_status fails') pass - - + + def nice_user_error(self, error, line): """If a ME run is currently running add a link in the html output""" self.add_error_log_in_html() - return cmd.Cmd.nice_user_error(self, error, line) - + return cmd.Cmd.nice_user_error(self, error, line) + def nice_config_error(self, error, line): """If a ME run is currently running add a link in the html output""" self.add_error_log_in_html() stop = cmd.Cmd.nice_config_error(self, error, line) - - + + try: debug_file = open(self.debug_output, 'a') debug_file.write(open(pjoin(self.me_dir,'Cards','proc_card_mg5.dat'))) debug_file.close() except: - pass + pass return stop - + def nice_error_handling(self, error, line): """If a ME run is currently running add a link in the html output""" @@ -294,7 +294,7 @@ def nice_error_handling(self, error, line): proc_card = pjoin(self.me_dir,'Cards','proc_card_mg5.dat') if os.path.exists(proc_card): self.banner.add(proc_card) - + out_dir = pjoin(self.me_dir, 'Events', self.run_name) if not os.path.isdir(out_dir): os.mkdir(out_dir) @@ -307,7 +307,7 @@ def nice_error_handling(self, error, line): else: pass else: - self.add_error_log_in_html() + self.add_error_log_in_html() stop = cmd.Cmd.nice_error_handling(self, error, line) try: debug_file = open(self.debug_output, 'a') @@ -316,14 +316,14 @@ def nice_error_handling(self, error, line): except: pass return stop - - + + #=============================================================================== # HelpToCmd #=============================================================================== class HelpToCmd(object): """ The Series of help routine for the MadEventCmd""" - + def help_pythia(self): logger.info("syntax: pythia [RUN] [--run_options]") logger.info("-- run pythia on RUN (current one by default)") @@ -352,29 +352,29 @@ def help_banner_run(self): logger.info(" Path should be the path of a valid banner.") logger.info(" RUN should be the name of a run of the current directory") self.run_options_help([('-f','answer all question by default'), - ('--name=X', 'Define the name associated with the new run')]) - + ('--name=X', 'Define the name associated with the new run')]) + def help_open(self): logger.info("syntax: open FILE ") logger.info("-- open a file with the appropriate editor.") logger.info(' If FILE belongs to index.html, param_card.dat, run_card.dat') logger.info(' the path to the last created/used directory is used') logger.info(' The program used to open those files can be chosen in the') - logger.info(' configuration file ./input/mg5_configuration.txt') - - + logger.info(' configuration file ./input/mg5_configuration.txt') + + def run_options_help(self, data): if data: logger.info('-- local options:') for name, info in data: logger.info(' %s : %s' % (name, info)) - + logger.info("-- session options:") - logger.info(" Note that those options will be kept for the current session") + logger.info(" Note that those options will be kept for the current session") logger.info(" --cluster : Submit to the cluster. Current cluster: %s" % self.options['cluster_type']) logger.info(" --multicore : Run in multi-core configuration") logger.info(" --nb_core=X : limit the number of core to use to X.") - + def help_generate_events(self): logger.info("syntax: generate_events [run_name] [options]",) @@ -398,16 +398,16 @@ def help_initMadLoop(self): logger.info(" -f : Bypass the edition of MadLoopParams.dat.",'$MG:color:BLUE') logger.info(" -r : Refresh of the existing filters (erasing them if already present).",'$MG:color:BLUE') logger.info(" --nPS= : Specify how many phase-space points should be tried to set up the filters.",'$MG:color:BLUE') - + def help_calculate_decay_widths(self): - + if self.ninitial != 1: logger.warning("This command is only valid for processes of type A > B C.") logger.warning("This command can not be run in current context.") logger.warning("") - + logger.info("syntax: calculate_decay_widths [run_name] [options])") logger.info("-- Calculate decay widths and enter widths and BRs in param_card") logger.info(" for a series of processes of type A > B C ...") @@ -428,8 +428,8 @@ def help_survey(self): logger.info("-- evaluate the different channel associate to the process") self.run_options_help([("--" + key,value[-1]) for (key,value) in \ self._survey_options.items()]) - - + + def help_restart_gridpack(self): logger.info("syntax: restart_gridpack --precision= --restart_zero") @@ -439,14 +439,14 @@ def help_launch(self): logger.info("syntax: launch [run_name] [options])") logger.info(" --alias for either generate_events/calculate_decay_widths") logger.info(" depending of the number of particles in the initial state.") - + if self.ninitial == 1: logger.info("For this directory this is equivalent to calculate_decay_widths") self.help_calculate_decay_widths() else: logger.info("For this directory this is equivalent to $generate_events") self.help_generate_events() - + def help_refine(self): logger.info("syntax: refine require_precision [max_channel] [--run_options]") logger.info("-- refine the LAST run to achieve a given precision.") @@ -454,14 +454,14 @@ def help_refine(self): logger.info(' or the required relative error') logger.info(' max_channel:[5] maximal number of channel per job') self.run_options_help([]) - + def help_combine_events(self): """ """ logger.info("syntax: combine_events [run_name] [--tag=tag_name] [--run_options]") logger.info("-- Combine the last run in order to write the number of events") logger.info(" asked in the run_card.") self.run_options_help([]) - + def help_store_events(self): """ """ logger.info("syntax: store_events [--run_options]") @@ -481,7 +481,7 @@ def help_import(self): logger.info("syntax: import command PATH") logger.info("-- Execute the command present in the file") self.run_options_help([]) - + def help_syscalc(self): logger.info("syntax: syscalc [RUN] [%s] [-f | --tag=]" % '|'.join(self._plot_mode)) logger.info("-- calculate systematics information for the RUN (current run by default)") @@ -506,18 +506,18 @@ class AskRun(cmd.ControlSwitch): ('madspin', 'Decay onshell particles'), ('reweight', 'Add weights to events for new hypp.') ] - + def __init__(self, question, line_args=[], mode=None, force=False, *args, **opt): - + self.check_available_module(opt['mother_interface'].options) self.me_dir = opt['mother_interface'].me_dir super(AskRun,self).__init__(self.to_control, opt['mother_interface'], *args, **opt) - - + + def check_available_module(self, options): - + self.available_module = set() if options['pythia-pgs_path']: self.available_module.add('PY6') @@ -540,32 +540,32 @@ def check_available_module(self, options): self.available_module.add('Rivet') else: logger.warning("Rivet program installed but no parton shower with hepmc output detected.\n Please install pythia8") - + if not MADEVENT or ('mg5_path' in options and options['mg5_path']): self.available_module.add('MadSpin') if misc.has_f2py() or options['f2py_compiler']: self.available_module.add('reweight') -# old mode to activate the shower +# old mode to activate the shower def ans_parton(self, value=None): """None: means that the user type 'pythia' value: means that the user type pythia=value""" - + if value is None: self.set_all_off() else: logger.warning('Invalid command: parton=%s' % value) - - + + # -# HANDLING SHOWER +# HANDLING SHOWER # def get_allowed_shower(self): """return valid entry for the shower switch""" - + if hasattr(self, 'allowed_shower'): return self.allowed_shower - + self.allowed_shower = [] if 'PY6' in self.available_module: self.allowed_shower.append('Pythia6') @@ -574,9 +574,9 @@ def get_allowed_shower(self): if self.allowed_shower: self.allowed_shower.append('OFF') return self.allowed_shower - + def set_default_shower(self): - + if 'PY6' in self.available_module and\ os.path.exists(pjoin(self.me_dir,'Cards','pythia_card.dat')): self.switch['shower'] = 'Pythia6' @@ -590,10 +590,10 @@ def set_default_shower(self): def check_value_shower(self, value): """check an entry is valid. return the valid entry in case of shortcut""" - + if value in self.get_allowed_shower(): return True - + value =value.lower() if value in ['py6','p6','pythia_6'] and 'PY6' in self.available_module: return 'Pythia6' @@ -601,13 +601,13 @@ def check_value_shower(self, value): return 'Pythia8' else: return False - - -# old mode to activate the shower + + +# old mode to activate the shower def ans_pythia(self, value=None): """None: means that the user type 'pythia' value: means that the user type pythia=value""" - + if 'PY6' not in self.available_module: logger.info('pythia-pgs not available. Ignore commmand') return @@ -621,13 +621,13 @@ def ans_pythia(self, value=None): self.set_switch('shower', 'OFF') else: logger.warning('Invalid command: pythia=%s' % value) - - + + def consistency_shower_detector(self, vshower, vdetector): """consistency_XX_YY(val_XX, val_YY) -> XX is the new key set by the user to a new value val_XX -> YY is another key - -> return value should be None or "replace_YY" + -> return value should be None or "replace_YY" """ if vshower == 'OFF': @@ -635,35 +635,35 @@ def consistency_shower_detector(self, vshower, vdetector): return 'OFF' if vshower == 'Pythia8' and vdetector == 'PGS': return 'OFF' - + return None - + # # HANDLING DETECTOR # def get_allowed_detector(self): """return valid entry for the switch""" - + if hasattr(self, 'allowed_detector'): - return self.allowed_detector - + return self.allowed_detector + self.allowed_detector = [] if 'PGS' in self.available_module: self.allowed_detector.append('PGS') if 'Delphes' in self.available_module: self.allowed_detector.append('Delphes') - + if self.allowed_detector: self.allowed_detector.append('OFF') - return self.allowed_detector + return self.allowed_detector def set_default_detector(self): - + self.set_default_shower() #ensure that this one is called first! - + if 'PGS' in self.available_module and self.switch['shower'] == 'Pythia6'\ and os.path.exists(pjoin(self.me_dir,'Cards','pgs_card.dat')): self.switch['detector'] = 'PGS' @@ -674,16 +674,16 @@ def set_default_detector(self): self.switch['detector'] = 'OFF' else: self.switch['detector'] = 'Not Avail.' - -# old mode to activate pgs + +# old mode to activate pgs def ans_pgs(self, value=None): """None: means that the user type 'pgs' - value: means that the user type pgs=value""" - + value: means that the user type pgs=value""" + if 'PGS' not in self.available_module: logger.info('pythia-pgs not available. Ignore commmand') return - + if value is None: self.set_all_off() self.switch['shower'] = 'Pythia6' @@ -696,16 +696,16 @@ def ans_pgs(self, value=None): else: logger.warning('Invalid command: pgs=%s' % value) - + # old mode to activate Delphes def ans_delphes(self, value=None): """None: means that the user type 'delphes' - value: means that the user type delphes=value""" - + value: means that the user type delphes=value""" + if 'Delphes' not in self.available_module: logger.warning('Delphes not available. Ignore commmand') return - + if value is None: self.set_all_off() if 'PY6' in self.available_module: @@ -718,15 +718,15 @@ def ans_delphes(self, value=None): elif value == 'off': self.set_switch('detector', 'OFF') else: - logger.warning('Invalid command: pgs=%s' % value) + logger.warning('Invalid command: pgs=%s' % value) def consistency_detector_shower(self,vdetector, vshower): """consistency_XX_YY(val_XX, val_YY) -> XX is the new key set by the user to a new value val_XX -> YY is another key - -> return value should be None or "replace_YY" + -> return value should be None or "replace_YY" """ - + if vdetector == 'PGS' and vshower != 'Pythia6': return 'Pythia6' if vdetector == 'Delphes' and vshower not in ['Pythia6', 'Pythia8']: @@ -744,28 +744,28 @@ def consistency_detector_shower(self,vdetector, vshower): # def get_allowed_analysis(self): """return valid entry for the shower switch""" - + if hasattr(self, 'allowed_analysis'): return self.allowed_analysis - + self.allowed_analysis = [] if 'ExRoot' in self.available_module: self.allowed_analysis.append('ExRoot') if 'MA4' in self.available_module: self.allowed_analysis.append('MadAnalysis4') if 'MA5' in self.available_module: - self.allowed_analysis.append('MadAnalysis5') + self.allowed_analysis.append('MadAnalysis5') if 'Rivet' in self.available_module: - self.allowed_analysis.append('Rivet') - + self.allowed_analysis.append('Rivet') + if self.allowed_analysis: self.allowed_analysis.append('OFF') - + return self.allowed_analysis - + def check_analysis(self, value): """check an entry is valid. return the valid entry in case of shortcut""" - + if value in self.get_allowed_analysis(): return True if value.lower() in ['ma4', 'madanalysis4', 'madanalysis_4','4']: @@ -786,30 +786,30 @@ def consistency_shower_analysis(self, vshower, vanalysis): """consistency_XX_YY(val_XX, val_YY) -> XX is the new key set by the user to a new value val_XX -> YY is another key - -> return value should be None or "replace_YY" + -> return value should be None or "replace_YY" """ if vshower != 'Pythia8' and vanalysis == 'Rivet': return 'OFF' #new value for analysis - + return None - + def consistency_analysis_shower(self, vanalysis, vshower): """consistency_XX_YY(val_XX, val_YY) -> XX is the new key set by the user to a new value val_XX -> YY is another key - -> return value should be None or "replace_YY" + -> return value should be None or "replace_YY" """ if vshower != 'Pythia8' and vanalysis == 'Rivet': return 'Pythia8' #new value for analysis - + return None def set_default_analysis(self): """initialise the switch for analysis""" - + if 'MA4' in self.available_module and \ os.path.exists(pjoin(self.me_dir,'Cards','plot_card.dat')): self.switch['analysis'] = 'MadAnalysis4' @@ -818,46 +818,46 @@ def set_default_analysis(self): or os.path.exists(pjoin(self.me_dir,'Cards', 'madanalysis5_hadron_card.dat'))): self.switch['analysis'] = 'MadAnalysis5' elif 'ExRoot' in self.available_module: - self.switch['analysis'] = 'ExRoot' - elif self.get_allowed_analysis(): + self.switch['analysis'] = 'ExRoot' + elif self.get_allowed_analysis(): self.switch['analysis'] = 'OFF' else: self.switch['analysis'] = 'Not Avail.' - + # # MADSPIN handling # def get_allowed_madspin(self): """ ON|OFF|onshell """ - + if hasattr(self, 'allowed_madspin'): return self.allowed_madspin - + self.allowed_madspin = [] if 'MadSpin' in self.available_module: self.allowed_madspin = ['OFF',"ON",'onshell',"full"] return self.allowed_madspin - + def check_value_madspin(self, value): """handle alias and valid option not present in get_allowed_madspin""" - + if value.upper() in self.get_allowed_madspin(): return True elif value.lower() in self.get_allowed_madspin(): return True - + if 'MadSpin' not in self.available_module: return False - + if value.lower() in ['madspin', 'full']: return 'full' elif value.lower() in ['none']: return 'none' - - + + def set_default_madspin(self): """initialise the switch for madspin""" - + if 'MadSpin' in self.available_module: if os.path.exists(pjoin(self.me_dir,'Cards','madspin_card.dat')): self.switch['madspin'] = 'ON' @@ -865,10 +865,10 @@ def set_default_madspin(self): self.switch['madspin'] = 'OFF' else: self.switch['madspin'] = 'Not Avail.' - + def get_cardcmd_for_madspin(self, value): """set some command to run before allowing the user to modify the cards.""" - + if value == 'onshell': return ["edit madspin_card --replace_line='set spinmode' --before_line='decay' set spinmode onshell"] elif value in ['full', 'madspin']: @@ -877,36 +877,36 @@ def get_cardcmd_for_madspin(self, value): return ["edit madspin_card --replace_line='set spinmode' --before_line='decay' set spinmode none"] else: return [] - + # # ReWeight handling # def get_allowed_reweight(self): """ return the list of valid option for reweight=XXX """ - + if hasattr(self, 'allowed_reweight'): return getattr(self, 'allowed_reweight') - + if 'reweight' not in self.available_module: self.allowed_reweight = [] return self.allowed_reweight = ['OFF', 'ON'] - + # check for plugin mode plugin_path = self.mother_interface.plugin_path opts = misc.from_plugin_import(plugin_path, 'new_reweight', warning=False) self.allowed_reweight += opts - + def set_default_reweight(self): """initialise the switch for reweight""" - + if 'reweight' in self.available_module: if os.path.exists(pjoin(self.me_dir,'Cards','reweight_card.dat')): self.switch['reweight'] = 'ON' else: self.switch['reweight'] = 'OFF' else: - self.switch['reweight'] = 'Not Avail.' + self.switch['reweight'] = 'Not Avail.' #=============================================================================== # CheckValidForCmd @@ -916,14 +916,14 @@ class CheckValidForCmd(object): def check_banner_run(self, args): """check the validity of line""" - + if len(args) == 0: self.help_banner_run() raise self.InvalidCmd('banner_run requires at least one argument.') - + tag = [a[6:] for a in args if a.startswith('--tag=')] - - + + if os.path.exists(args[0]): type ='banner' format = self.detect_card_type(args[0]) @@ -931,7 +931,7 @@ def check_banner_run(self, args): raise self.InvalidCmd('The file is not a valid banner.') elif tag: args[0] = pjoin(self.me_dir,'Events', args[0], '%s_%s_banner.txt' % \ - (args[0], tag)) + (args[0], tag)) if not os.path.exists(args[0]): raise self.InvalidCmd('No banner associates to this name and tag.') else: @@ -939,7 +939,7 @@ def check_banner_run(self, args): type = 'run' banners = misc.glob('*_banner.txt', pjoin(self.me_dir,'Events', args[0])) if not banners: - raise self.InvalidCmd('No banner associates to this name.') + raise self.InvalidCmd('No banner associates to this name.') elif len(banners) == 1: args[0] = banners[0] else: @@ -947,8 +947,8 @@ def check_banner_run(self, args): tags = [os.path.basename(p)[len(args[0])+1:-11] for p in banners] tag = self.ask('which tag do you want to use?', tags[0], tags) args[0] = pjoin(self.me_dir,'Events', args[0], '%s_%s_banner.txt' % \ - (args[0], tag)) - + (args[0], tag)) + run_name = [arg[7:] for arg in args if arg.startswith('--name=')] if run_name: try: @@ -970,14 +970,14 @@ def check_banner_run(self, args): except Exception: pass self.set_run_name(name) - + def check_history(self, args): """check the validity of line""" - + if len(args) > 1: self.help_history() raise self.InvalidCmd('\"history\" command takes at most one argument') - + if not len(args): return elif args[0] != 'clean': @@ -985,16 +985,16 @@ def check_history(self, args): if dirpath and not os.path.exists(dirpath) or \ os.path.isdir(args[0]): raise self.InvalidCmd("invalid path %s " % dirpath) - + def check_save(self, args): """ check the validity of the line""" - + if len(args) == 0: args.append('options') if args[0] not in self._save_opts: raise self.InvalidCmd('wrong \"save\" format') - + if args[0] != 'options' and len(args) != 2: self.help_save() raise self.InvalidCmd('wrong \"save\" format') @@ -1003,7 +1003,7 @@ def check_save(self, args): if not os.path.exists(basename): raise self.InvalidCmd('%s is not a valid path, please retry' % \ args[1]) - + if args[0] == 'options': has_path = None for arg in args[1:]: @@ -1024,9 +1024,9 @@ def check_save(self, args): has_path = True if not has_path: if '--auto' in arg and self.options['mg5_path']: - args.insert(1, pjoin(self.options['mg5_path'],'input','mg5_configuration.txt')) + args.insert(1, pjoin(self.options['mg5_path'],'input','mg5_configuration.txt')) else: - args.insert(1, pjoin(self.me_dir,'Cards','me5_configuration.txt')) + args.insert(1, pjoin(self.me_dir,'Cards','me5_configuration.txt')) def check_set(self, args): """ check the validity of the line""" @@ -1039,20 +1039,20 @@ def check_set(self, args): self.help_set() raise self.InvalidCmd('Possible options for set are %s' % \ self._set_options) - + if args[0] in ['stdout_level']: if args[1] not in ['DEBUG','INFO','WARNING','ERROR','CRITICAL'] \ and not args[1].isdigit(): raise self.InvalidCmd('output_level needs ' + \ - 'a valid level') - + 'a valid level') + if args[0] in ['timeout']: if not args[1].isdigit(): - raise self.InvalidCmd('timeout values should be a integer') - + raise self.InvalidCmd('timeout values should be a integer') + def check_open(self, args): """ check the validity of the line """ - + if len(args) != 1: self.help_open() raise self.InvalidCmd('OPEN command requires exactly one argument') @@ -1069,7 +1069,7 @@ def check_open(self, args): raise self.InvalidCmd('No MadEvent path defined. Unable to associate this name to a file') else: return True - + path = self.me_dir if os.path.isfile(os.path.join(path,args[0])): args[0] = os.path.join(path,args[0]) @@ -1078,7 +1078,7 @@ def check_open(self, args): elif os.path.isfile(os.path.join(path,'HTML',args[0])): args[0] = os.path.join(path,'HTML',args[0]) # special for card with _default define: copy the default and open it - elif '_card.dat' in args[0]: + elif '_card.dat' in args[0]: name = args[0].replace('_card.dat','_card_default.dat') if os.path.isfile(os.path.join(path,'Cards', name)): files.cp(os.path.join(path,'Cards', name), os.path.join(path,'Cards', args[0])) @@ -1086,13 +1086,13 @@ def check_open(self, args): else: raise self.InvalidCmd('No default path for this file') elif not os.path.isfile(args[0]): - raise self.InvalidCmd('No default path for this file') - + raise self.InvalidCmd('No default path for this file') + def check_initMadLoop(self, args): """ check initMadLoop command arguments are valid.""" - + opt = {'refresh': False, 'nPS': None, 'force': False} - + for arg in args: if arg in ['-r','--refresh']: opt['refresh'] = True @@ -1105,14 +1105,14 @@ def check_initMadLoop(self, args): except ValueError: raise InvalidCmd("The number of attempts specified "+ "'%s' is not a valid integer."%n_attempts) - + return opt - + def check_treatcards(self, args): """check that treatcards arguments are valid [param|run|all] [--output_dir=] [--param_card=] [--run_card=] """ - + opt = {'output_dir':pjoin(self.me_dir,'Source'), 'param_card':pjoin(self.me_dir,'Cards','param_card.dat'), 'run_card':pjoin(self.me_dir,'Cards','run_card.dat'), @@ -1129,14 +1129,14 @@ def check_treatcards(self, args): if os.path.isfile(value): card_name = self.detect_card_type(value) if card_name != key: - raise self.InvalidCmd('Format for input file detected as %s while expecting %s' + raise self.InvalidCmd('Format for input file detected as %s while expecting %s' % (card_name, key)) opt[key] = value elif os.path.isfile(pjoin(self.me_dir,value)): card_name = self.detect_card_type(pjoin(self.me_dir,value)) if card_name != key: - raise self.InvalidCmd('Format for input file detected as %s while expecting %s' - % (card_name, key)) + raise self.InvalidCmd('Format for input file detected as %s while expecting %s' + % (card_name, key)) opt[key] = value else: raise self.InvalidCmd('No such file: %s ' % value) @@ -1154,14 +1154,14 @@ def check_treatcards(self, args): else: self.help_treatcards() raise self.InvalidCmd('Unvalid argument %s' % arg) - - return mode, opt - - + + return mode, opt + + def check_survey(self, args, cmd='survey'): """check that the argument for survey are valid""" - - + + self.opts = dict([(key,value[1]) for (key,value) in \ self._survey_options.items()]) @@ -1183,41 +1183,41 @@ def check_survey(self, args, cmd='survey'): self.help_survey() raise self.InvalidCmd('Too many argument for %s command' % cmd) elif not args: - # No run name assigned -> assigned one automaticaly + # No run name assigned -> assigned one automaticaly self.set_run_name(self.find_available_run_name(self.me_dir)) else: self.set_run_name(args[0], None,'parton', True) args.pop(0) - + return True def check_generate_events(self, args): """check that the argument for generate_events are valid""" - + run = None if args and args[-1].startswith('--laststep='): run = args[-1].split('=')[-1] if run not in ['auto','parton', 'pythia', 'pgs', 'delphes']: self.help_generate_events() raise self.InvalidCmd('invalid %s argument'% args[-1]) - if run != 'parton' and not self.options['pythia-pgs_path']: - raise self.InvalidCmd('''pythia-pgs not install. Please install this package first. + if run != 'parton' and not self.options['pythia-pgs_path']: + raise self.InvalidCmd('''pythia-pgs not install. Please install this package first. To do so type: \'install pythia-pgs\' in the mg5 interface''') if run == 'delphes' and not self.options['delphes_path']: - raise self.InvalidCmd('''delphes not install. Please install this package first. + raise self.InvalidCmd('''delphes not install. Please install this package first. To do so type: \'install Delphes\' in the mg5 interface''') del args[-1] - + #if len(args) > 1: # self.help_generate_events() # raise self.InvalidCmd('Too many argument for generate_events command: %s' % cmd) - + return run def check_calculate_decay_widths(self, args): """check that the argument for calculate_decay_widths are valid""" - + if self.ninitial != 1: raise self.InvalidCmd('Can only calculate decay widths for decay processes A > B C ...') @@ -1232,7 +1232,7 @@ def check_calculate_decay_widths(self, args): if len(args) > 1: self.help_calculate_decay_widths() raise self.InvalidCmd('Too many argument for calculate_decay_widths command: %s' % cmd) - + return accuracy @@ -1241,25 +1241,25 @@ def check_multi_run(self, args): """check that the argument for survey are valid""" run = None - + if not len(args): self.help_multi_run() raise self.InvalidCmd("""multi_run command requires at least one argument for the number of times that it call generate_events command""") - + if args[-1].startswith('--laststep='): run = args[-1].split('=')[-1] if run not in ['parton', 'pythia', 'pgs', 'delphes']: self.help_multi_run() raise self.InvalidCmd('invalid %s argument'% args[-1]) - if run != 'parton' and not self.options['pythia-pgs_path']: - raise self.InvalidCmd('''pythia-pgs not install. Please install this package first. + if run != 'parton' and not self.options['pythia-pgs_path']: + raise self.InvalidCmd('''pythia-pgs not install. Please install this package first. To do so type: \'install pythia-pgs\' in the mg5 interface''') if run == 'delphes' and not self.options['delphes_path']: - raise self.InvalidCmd('''delphes not install. Please install this package first. + raise self.InvalidCmd('''delphes not install. Please install this package first. To do so type: \'install Delphes\' in the mg5 interface''') del args[-1] - + elif not args[0].isdigit(): self.help_multi_run() @@ -1267,7 +1267,7 @@ def check_multi_run(self, args): #pass nb run to an integer nb_run = args.pop(0) args.insert(0, int(nb_run)) - + return run @@ -1284,7 +1284,7 @@ def check_refine(self, args): self.help_refine() raise self.InvalidCmd('require_precision argument is require for refine cmd') - + if not self.run_name: if self.results.lastrun: self.set_run_name(self.results.lastrun) @@ -1296,17 +1296,17 @@ def check_refine(self, args): else: try: [float(arg) for arg in args] - except ValueError: - self.help_refine() + except ValueError: + self.help_refine() raise self.InvalidCmd('refine arguments are suppose to be number') - + return True - + def check_combine_events(self, arg): """ Check the argument for the combine events command """ - + tag = [a for a in arg if a.startswith('--tag=')] - if tag: + if tag: arg.remove(tag[0]) tag = tag[0][6:] elif not self.run_tag: @@ -1314,53 +1314,53 @@ def check_combine_events(self, arg): else: tag = self.run_tag self.run_tag = tag - + if len(arg) > 1: self.help_combine_events() raise self.InvalidCmd('Too many argument for combine_events command') - + if len(arg) == 1: self.set_run_name(arg[0], self.run_tag, 'parton', True) - + if not self.run_name: if not self.results.lastrun: raise self.InvalidCmd('No run_name currently define. Unable to run combine') else: self.set_run_name(self.results.lastrun) - + return True - + def check_pythia(self, args): """Check the argument for pythia command - syntax: pythia [NAME] + syntax: pythia [NAME] Note that other option are already removed at this point """ - + mode = None laststep = [arg for arg in args if arg.startswith('--laststep=')] if laststep and len(laststep)==1: mode = laststep[0].split('=')[-1] if mode not in ['auto', 'pythia', 'pgs', 'delphes']: self.help_pythia() - raise self.InvalidCmd('invalid %s argument'% args[-1]) + raise self.InvalidCmd('invalid %s argument'% args[-1]) elif laststep: raise self.InvalidCmd('only one laststep argument is allowed') - + if not self.options['pythia-pgs_path']: logger.info('Retry to read configuration file to find pythia-pgs path') self.set_configuration() - + if not self.options['pythia-pgs_path'] or not \ os.path.exists(pjoin(self.options['pythia-pgs_path'],'src')): error_msg = 'No valid pythia-pgs path set.\n' error_msg += 'Please use the set command to define the path and retry.\n' error_msg += 'You can also define it in the configuration file.\n' raise self.InvalidCmd(error_msg) - - - + + + tag = [a for a in args if a.startswith('--tag=')] - if tag: + if tag: args.remove(tag[0]) tag = tag[0][6:] @@ -1368,8 +1368,8 @@ def check_pythia(self, args): if self.results.lastrun: args.insert(0, self.results.lastrun) else: - raise self.InvalidCmd('No run name currently define. Please add this information.') - + raise self.InvalidCmd('No run name currently define. Please add this information.') + if len(args) >= 1: if args[0] != self.run_name and\ not os.path.exists(pjoin(self.me_dir,'Events',args[0], 'unweighted_events.lhe.gz')): @@ -1388,21 +1388,21 @@ def check_pythia(self, args): files.ln(input_file, os.path.dirname(output_file)) else: misc.gunzip(input_file, keep=True, stdout=output_file) - + args.append(mode) - + def check_pythia8(self, args): """Check the argument for pythia command - syntax: pythia8 [NAME] + syntax: pythia8 [NAME] Note that other option are already removed at this point - """ + """ mode = None laststep = [arg for arg in args if arg.startswith('--laststep=')] if laststep and len(laststep)==1: mode = laststep[0].split('=')[-1] if mode not in ['auto', 'pythia','pythia8','delphes']: self.help_pythia8() - raise self.InvalidCmd('invalid %s argument'% args[-1]) + raise self.InvalidCmd('invalid %s argument'% args[-1]) elif laststep: raise self.InvalidCmd('only one laststep argument is allowed') @@ -1410,7 +1410,7 @@ def check_pythia8(self, args): if not self.options['pythia8_path']: logger.info('Retry reading configuration file to find pythia8 path') self.set_configuration() - + if not self.options['pythia8_path'] or not \ os.path.exists(pjoin(self.options['pythia8_path'],'bin','pythia8-config')): error_msg = 'No valid pythia8 path set.\n' @@ -1421,7 +1421,7 @@ def check_pythia8(self, args): raise self.InvalidCmd(error_msg) tag = [a for a in args if a.startswith('--tag=')] - if tag: + if tag: args.remove(tag[0]) tag = tag[0][6:] @@ -1430,11 +1430,11 @@ def check_pythia8(self, args): args.insert(0, self.results.lastrun) else: raise self.InvalidCmd('No run name currently define. '+ - 'Please add this information.') - + 'Please add this information.') + if len(args) >= 1: if args[0] != self.run_name and\ - not os.path.exists(pjoin(self.me_dir,'Events',args[0], + not os.path.exists(pjoin(self.me_dir,'Events',args[0], 'unweighted_events.lhe.gz')): raise self.InvalidCmd('No events file corresponding to %s run. ' % args[0]) @@ -1451,9 +1451,9 @@ def check_pythia8(self, args): else: raise self.InvalidCmd('No event file corresponding to %s run. ' % self.run_name) - + args.append(mode) - + def check_remove(self, args): """Check that the remove command is valid""" @@ -1484,33 +1484,33 @@ def check_plot(self, args): madir = self.options['madanalysis_path'] td = self.options['td_path'] - + if not madir or not td: logger.info('Retry to read configuration file to find madanalysis/td') self.set_configuration() madir = self.options['madanalysis_path'] - td = self.options['td_path'] - + td = self.options['td_path'] + if not madir: error_msg = 'No valid MadAnalysis path set.\n' error_msg += 'Please use the set command to define the path and retry.\n' error_msg += 'You can also define it in the configuration file.\n' - raise self.InvalidCmd(error_msg) + raise self.InvalidCmd(error_msg) if not td: error_msg = 'No valid td path set.\n' error_msg += 'Please use the set command to define the path and retry.\n' error_msg += 'You can also define it in the configuration file.\n' - raise self.InvalidCmd(error_msg) - + raise self.InvalidCmd(error_msg) + if len(args) == 0: if not hasattr(self, 'run_name') or not self.run_name: self.help_plot() - raise self.InvalidCmd('No run name currently define. Please add this information.') + raise self.InvalidCmd('No run name currently define. Please add this information.') args.append('all') return - + if args[0] not in self._plot_mode: self.set_run_name(args[0], level='plot') del args[0] @@ -1518,45 +1518,45 @@ def check_plot(self, args): args.append('all') elif not self.run_name: self.help_plot() - raise self.InvalidCmd('No run name currently define. Please add this information.') - + raise self.InvalidCmd('No run name currently define. Please add this information.') + for arg in args: if arg not in self._plot_mode and arg != self.run_name: self.help_plot() - raise self.InvalidCmd('unknown options %s' % arg) - + raise self.InvalidCmd('unknown options %s' % arg) + def check_syscalc(self, args): """Check the argument for the syscalc command syscalc run_name modes""" scdir = self.options['syscalc_path'] - + if not scdir: logger.info('Retry to read configuration file to find SysCalc') self.set_configuration() scdir = self.options['syscalc_path'] - + if not scdir: error_msg = 'No valid SysCalc path set.\n' error_msg += 'Please use the set command to define the path and retry.\n' error_msg += 'You can also define it in the configuration file.\n' error_msg += 'Please note that you need to compile SysCalc first.' - raise self.InvalidCmd(error_msg) - + raise self.InvalidCmd(error_msg) + if len(args) == 0: if not hasattr(self, 'run_name') or not self.run_name: self.help_syscalc() - raise self.InvalidCmd('No run name currently defined. Please add this information.') + raise self.InvalidCmd('No run name currently defined. Please add this information.') args.append('all') return #deal options tag = [a for a in args if a.startswith('--tag=')] - if tag: + if tag: args.remove(tag[0]) tag = tag[0][6:] - + if args[0] not in self._syscalc_mode: self.set_run_name(args[0], tag=tag, level='syscalc') del args[0] @@ -1564,61 +1564,61 @@ def check_syscalc(self, args): args.append('all') elif not self.run_name: self.help_syscalc() - raise self.InvalidCmd('No run name currently defined. Please add this information.') + raise self.InvalidCmd('No run name currently defined. Please add this information.') elif tag and tag != self.run_tag: self.set_run_name(self.run_name, tag=tag, level='syscalc') - + for arg in args: if arg not in self._syscalc_mode and arg != self.run_name: self.help_syscalc() - raise self.InvalidCmd('unknown options %s' % arg) + raise self.InvalidCmd('unknown options %s' % arg) if self.run_card['use_syst'] not in self.true: raise self.InvalidCmd('Run %s does not include ' % self.run_name + \ 'systematics information needed for syscalc.') - - + + def check_pgs(self, arg, no_default=False): """Check the argument for pythia command - syntax is "pgs [NAME]" + syntax is "pgs [NAME]" Note that other option are already remove at this point """ - + # If not pythia-pgs path if not self.options['pythia-pgs_path']: logger.info('Retry to read configuration file to find pythia-pgs path') self.set_configuration() - + if not self.options['pythia-pgs_path'] or not \ os.path.exists(pjoin(self.options['pythia-pgs_path'],'src')): error_msg = 'No valid pythia-pgs path set.\n' error_msg += 'Please use the set command to define the path and retry.\n' error_msg += 'You can also define it in the configuration file.\n' - raise self.InvalidCmd(error_msg) - + raise self.InvalidCmd(error_msg) + tag = [a for a in arg if a.startswith('--tag=')] - if tag: + if tag: arg.remove(tag[0]) tag = tag[0][6:] - - + + if len(arg) == 0 and not self.run_name: if self.results.lastrun: arg.insert(0, self.results.lastrun) else: - raise self.InvalidCmd('No run name currently define. Please add this information.') - + raise self.InvalidCmd('No run name currently define. Please add this information.') + if len(arg) == 1 and self.run_name == arg[0]: arg.pop(0) - + if not len(arg) and \ not os.path.exists(pjoin(self.me_dir,'Events','pythia_events.hep')): if not no_default: self.help_pgs() raise self.InvalidCmd('''No file file pythia_events.hep currently available Please specify a valid run_name''') - - lock = None + + lock = None if len(arg) == 1: prev_tag = self.set_run_name(arg[0], tag, 'pgs') if not os.path.exists(pjoin(self.me_dir,'Events',self.run_name,'%s_pythia_events.hep.gz' % prev_tag)): @@ -1626,25 +1626,25 @@ def check_pgs(self, arg, no_default=False): else: input_file = pjoin(self.me_dir,'Events', self.run_name, '%s_pythia_events.hep.gz' % prev_tag) output_file = pjoin(self.me_dir, 'Events', 'pythia_events.hep') - lock = cluster.asyncrone_launch('gunzip',stdout=open(output_file,'w'), + lock = cluster.asyncrone_launch('gunzip',stdout=open(output_file,'w'), argument=['-c', input_file]) else: - if tag: + if tag: self.run_card['run_tag'] = tag self.set_run_name(self.run_name, tag, 'pgs') - - return lock + + return lock def check_display(self, args): """check the validity of line syntax is "display XXXXX" """ - + if len(args) < 1 or args[0] not in self._display_opts: self.help_display() raise self.InvalidCmd - + if args[0] == 'variable' and len(args) !=2: raise self.InvalidCmd('variable need a variable name') @@ -1654,39 +1654,39 @@ def check_display(self, args): def check_import(self, args): """check the validity of line""" - + if not args: self.help_import() raise self.InvalidCmd('wrong \"import\" format') - + if args[0] != 'command': args.insert(0,'command') - - + + if not len(args) == 2 or not os.path.exists(args[1]): raise self.InvalidCmd('PATH is mandatory for import command\n') - + #=============================================================================== # CompleteForCmd #=============================================================================== class CompleteForCmd(CheckValidForCmd): """ The Series of help routine for the MadGraphCmd""" - - + + def complete_banner_run(self, text, line, begidx, endidx, formatting=True): "Complete the banner run command" try: - - + + args = self.split_arg(line[0:begidx], error=False) - + if args[-1].endswith(os.path.sep): return self.path_completion(text, os.path.join('.',*[a for a in args \ - if a.endswith(os.path.sep)])) - - + if a.endswith(os.path.sep)])) + + if len(args) > 1: # only options are possible tags = misc.glob('%s_*_banner.txt' % args[1], pjoin(self.me_dir, 'Events' , args[1])) @@ -1697,9 +1697,9 @@ def complete_banner_run(self, text, line, begidx, endidx, formatting=True): else: return self.list_completion(text, tags) return self.list_completion(text, tags +['--name=','-f'], line) - + # First argument - possibilites = {} + possibilites = {} comp = self.path_completion(text, os.path.join('.',*[a for a in args \ if a.endswith(os.path.sep)])) @@ -1711,10 +1711,10 @@ def complete_banner_run(self, text, line, begidx, endidx, formatting=True): run_list = misc.glob(pjoin('*','*_banner.txt'), pjoin(self.me_dir, 'Events')) run_list = [n.rsplit('/',2)[1] for n in run_list] possibilites['RUN Name'] = self.list_completion(text, run_list) - + return self.deal_multiple_categories(possibilites, formatting) - - + + except Exception as error: print(error) @@ -1732,12 +1732,12 @@ def complete_history(self, text, line, begidx, endidx): if len(args) == 1: return self.path_completion(text) - - def complete_open(self, text, line, begidx, endidx): + + def complete_open(self, text, line, begidx, endidx): """ complete the open command """ args = self.split_arg(line[0:begidx]) - + # Directory continuation if os.path.sep in args[-1] + text: return self.path_completion(text, @@ -1751,10 +1751,10 @@ def complete_open(self, text, line, begidx, endidx): if os.path.isfile(os.path.join(path,'README')): possibility.append('README') if os.path.isdir(os.path.join(path,'Cards')): - possibility += [f for f in os.listdir(os.path.join(path,'Cards')) + possibility += [f for f in os.listdir(os.path.join(path,'Cards')) if f.endswith('.dat')] if os.path.isdir(os.path.join(path,'HTML')): - possibility += [f for f in os.listdir(os.path.join(path,'HTML')) + possibility += [f for f in os.listdir(os.path.join(path,'HTML')) if f.endswith('.html') and 'default' not in f] else: possibility.extend(['./','../']) @@ -1763,7 +1763,7 @@ def complete_open(self, text, line, begidx, endidx): if os.path.exists('MG5_debug'): possibility.append('MG5_debug') return self.list_completion(text, possibility) - + def complete_set(self, text, line, begidx, endidx): "Complete the set command" @@ -1784,27 +1784,27 @@ def complete_set(self, text, line, begidx, endidx): elif len(args) >2 and args[-1].endswith(os.path.sep): return self.path_completion(text, os.path.join('.',*[a for a in args if a.endswith(os.path.sep)]), - only_dirs = True) - + only_dirs = True) + def complete_survey(self, text, line, begidx, endidx): """ Complete the survey command """ - + if line.endswith('nb_core=') and not text: import multiprocessing max = multiprocessing.cpu_count() return [str(i) for i in range(2,max+1)] - + return self.list_completion(text, self._run_options, line) - + complete_refine = complete_survey complete_combine_events = complete_survey complite_store = complete_survey complete_generate_events = complete_survey complete_create_gridpack = complete_survey - + def complete_generate_events(self, text, line, begidx, endidx): """ Complete the generate events""" - + if line.endswith('nb_core=') and not text: import multiprocessing max = multiprocessing.cpu_count() @@ -1813,17 +1813,17 @@ def complete_generate_events(self, text, line, begidx, endidx): return ['parton','pythia','pgs','delphes'] elif '--laststep=' in line.split()[-1] and line and line[-1] != ' ': return self.list_completion(text,['parton','pythia','pgs','delphes'],line) - + opts = self._run_options + self._generate_options return self.list_completion(text, opts, line) def complete_initMadLoop(self, text, line, begidx, endidx): "Complete the initMadLoop command" - + numbers = [str(i) for i in range(10)] opts = ['-f','-r','--nPS='] - + args = self.split_arg(line[0:begidx], error=False) if len(line) >=6 and line[begidx-6:begidx]=='--nPS=': return self.list_completion(text, numbers, line) @@ -1840,18 +1840,18 @@ def complete_launch(self, *args, **opts): def complete_calculate_decay_widths(self, text, line, begidx, endidx): """ Complete the calculate_decay_widths command""" - + if line.endswith('nb_core=') and not text: import multiprocessing max = multiprocessing.cpu_count() return [str(i) for i in range(2,max+1)] - + opts = self._run_options + self._calculate_decay_options return self.list_completion(text, opts, line) - + def complete_display(self, text, line, begidx, endidx): - """ Complete the display command""" - + """ Complete the display command""" + args = self.split_arg(line[0:begidx], error=False) if len(args) >= 2 and args[1] =='results': start = line.find('results') @@ -1860,44 +1860,44 @@ def complete_display(self, text, line, begidx, endidx): def complete_multi_run(self, text, line, begidx, endidx): """complete multi run command""" - + args = self.split_arg(line[0:begidx], error=False) if len(args) == 1: data = [str(i) for i in range(0,20)] return self.list_completion(text, data, line) - + if line.endswith('run=') and not text: return ['parton','pythia','pgs','delphes'] elif '--laststep=' in line.split()[-1] and line and line[-1] != ' ': return self.list_completion(text,['parton','pythia','pgs','delphes'],line) - + opts = self._run_options + self._generate_options return self.list_completion(text, opts, line) - - - + + + if line.endswith('nb_core=') and not text: import multiprocessing max = multiprocessing.cpu_count() return [str(i) for i in range(2,max+1)] opts = self._run_options + self._generate_options return self.list_completion(text, opts, line) - + def complete_plot(self, text, line, begidx, endidx): """ Complete the plot command """ - + args = self.split_arg(line[0:begidx], error=False) if len(args) > 1: return self.list_completion(text, self._plot_mode) else: return self.list_completion(text, self._plot_mode + list(self.results.keys())) - + def complete_syscalc(self, text, line, begidx, endidx, formatting=True): """ Complete the syscalc command """ - + output = {} args = self.split_arg(line[0:begidx], error=False) - + if len(args) <=1: output['RUN_NAME'] = self.list_completion(list(self.results.keys())) output['MODE'] = self.list_completion(text, self._syscalc_mode) @@ -1907,12 +1907,12 @@ def complete_syscalc(self, text, line, begidx, endidx, formatting=True): if run in self.results: tags = ['--tag=%s' % tag['tag'] for tag in self.results[run]] output['options'] += tags - + return self.deal_multiple_categories(output, formatting) - + def complete_remove(self, text, line, begidx, endidx): """Complete the remove command """ - + args = self.split_arg(line[0:begidx], error=False) if len(args) > 1 and (text.startswith('--t')): run = args[1] @@ -1932,8 +1932,8 @@ def complete_remove(self, text, line, begidx, endidx): data = misc.glob(pjoin('*','*_banner.txt'), pjoin(self.me_dir, 'Events')) data = [n.rsplit('/',2)[1] for n in data] return self.list_completion(text, ['all'] + data) - - + + def complete_shower(self,text, line, begidx, endidx): "Complete the shower command" args = self.split_arg(line[0:begidx], error=False) @@ -1941,7 +1941,7 @@ def complete_shower(self,text, line, begidx, endidx): return self.list_completion(text, self._interfaced_showers) elif len(args)>1 and args[1] in self._interfaced_showers: return getattr(self, 'complete_%s' % text)\ - (text, args[1],line.replace(args[0]+' ',''), + (text, args[1],line.replace(args[0]+' ',''), begidx-len(args[0])-1, endidx-len(args[0])-1) def complete_pythia8(self,text, line, begidx, endidx): @@ -1955,11 +1955,11 @@ def complete_pythia8(self,text, line, begidx, endidx): if not self.run_name: return tmp1 else: - tmp2 = self.list_completion(text, self._run_options + ['-f', + tmp2 = self.list_completion(text, self._run_options + ['-f', '--no_default', '--tag='], line) return tmp1 + tmp2 elif line[-1] != '=': - return self.list_completion(text, self._run_options + ['-f', + return self.list_completion(text, self._run_options + ['-f', '--no_default','--tag='], line) def complete_madanalysis5_parton(self,text, line, begidx, endidx): @@ -1978,19 +1978,19 @@ def complete_madanalysis5_parton(self,text, line, begidx, endidx): else: tmp2 = self.list_completion(text, ['-f', '--MA5_stdout_lvl=','--no_default','--tag='], line) - return tmp1 + tmp2 + return tmp1 + tmp2 elif '--MA5_stdout_lvl=' in line and not any(arg.startswith( '--MA5_stdout_lvl=') for arg in args): - return self.list_completion(text, - ['--MA5_stdout_lvl=%s'%opt for opt in + return self.list_completion(text, + ['--MA5_stdout_lvl=%s'%opt for opt in ['logging.INFO','logging.DEBUG','logging.WARNING', 'logging.CRITICAL','90']], line) else: - return self.list_completion(text, ['-f', + return self.list_completion(text, ['-f', '--MA5_stdout_lvl=','--no_default','--tag='], line) def complete_pythia(self,text, line, begidx, endidx): - "Complete the pythia command" + "Complete the pythia command" args = self.split_arg(line[0:begidx], error=False) if len(args) == 1: @@ -2001,16 +2001,16 @@ def complete_pythia(self,text, line, begidx, endidx): if not self.run_name: return tmp1 else: - tmp2 = self.list_completion(text, self._run_options + ['-f', + tmp2 = self.list_completion(text, self._run_options + ['-f', '--no_default', '--tag='], line) return tmp1 + tmp2 elif line[-1] != '=': - return self.list_completion(text, self._run_options + ['-f', + return self.list_completion(text, self._run_options + ['-f', '--no_default','--tag='], line) def complete_pgs(self,text, line, begidx, endidx): "Complete the pythia command" - args = self.split_arg(line[0:begidx], error=False) + args = self.split_arg(line[0:begidx], error=False) if len(args) == 1: #return valid run_name data = misc.glob(pjoin('*', '*_pythia_events.hep.gz'), pjoin(self.me_dir, 'Events')) @@ -2019,23 +2019,23 @@ def complete_pgs(self,text, line, begidx, endidx): if not self.run_name: return tmp1 else: - tmp2 = self.list_completion(text, self._run_options + ['-f', + tmp2 = self.list_completion(text, self._run_options + ['-f', '--tag=' ,'--no_default'], line) - return tmp1 + tmp2 + return tmp1 + tmp2 else: - return self.list_completion(text, self._run_options + ['-f', + return self.list_completion(text, self._run_options + ['-f', '--tag=','--no_default'], line) - complete_delphes = complete_pgs - complete_rivet = complete_pgs + complete_delphes = complete_pgs + complete_rivet = complete_pgs #=============================================================================== # MadEventCmd #=============================================================================== class MadEventCmd(CompleteForCmd, CmdExtended, HelpToCmd, common_run.CommonRunCmd): - """The command line processor of Mad Graph""" - + """The command line processor of Mad Graph""" + LO = True # Truth values @@ -2063,7 +2063,7 @@ class MadEventCmd(CompleteForCmd, CmdExtended, HelpToCmd, common_run.CommonRunCm cluster_mode = 0 queue = 'madgraph' nb_core = None - + next_possibility = { 'start': ['generate_events [OPTIONS]', 'multi_run [OPTIONS]', 'calculate_decay_widths [OPTIONS]', @@ -2080,9 +2080,9 @@ class MadEventCmd(CompleteForCmd, CmdExtended, HelpToCmd, common_run.CommonRunCm 'pgs': ['generate_events [OPTIONS]', 'multi_run [OPTIONS]'], 'delphes' : ['generate_events [OPTIONS]', 'multi_run [OPTIONS]'] } - + asking_for_run = AskRun - + ############################################################################ def __init__(self, me_dir = None, options={}, *completekey, **stdin): """ add information to the cmd """ @@ -2095,16 +2095,16 @@ def __init__(self, me_dir = None, options={}, *completekey, **stdin): if self.web: os.system('touch %s' % pjoin(self.me_dir,'Online')) - self.load_results_db() + self.load_results_db() self.results.def_web_mode(self.web) self.Gdirs = None - + self.prompt = "%s>"%os.path.basename(pjoin(self.me_dir)) self.configured = 0 # time for reading the card self._options = {} # for compatibility with extended_cmd - - + + def pass_in_web_mode(self): """configure web data""" self.web = True @@ -2113,22 +2113,22 @@ def pass_in_web_mode(self): if os.environ['MADGRAPH_BASE']: self.options['mg5_path'] = pjoin(os.environ['MADGRAPH_BASE'],'MG5') - ############################################################################ + ############################################################################ def check_output_type(self, path): """ Check that the output path is a valid madevent directory """ - + bin_path = os.path.join(path,'bin') if os.path.isfile(os.path.join(bin_path,'generate_events')): return True - else: + else: return False ############################################################################ def set_configuration(self, amcatnlo=False, final=True, **opt): - """assign all configuration variable from file + """assign all configuration variable from file loop over the different config file if config_file not define """ - - super(MadEventCmd,self).set_configuration(amcatnlo=amcatnlo, + + super(MadEventCmd,self).set_configuration(amcatnlo=amcatnlo, final=final, **opt) if not final: @@ -2171,24 +2171,24 @@ def set_configuration(self, amcatnlo=False, final=True, **opt): if not os.path.exists(pjoin(path, 'sys_calc')): logger.info("No valid SysCalc path found") continue - # No else since the next line reinitialize the option to the + # No else since the next line reinitialize the option to the #previous value anyway self.options[key] = os.path.realpath(path) continue else: self.options[key] = None - - + + return self.options ############################################################################ - def do_banner_run(self, line): + def do_banner_run(self, line): """Make a run from the banner file""" - + args = self.split_arg(line) #check the validity of the arguments - self.check_banner_run(args) - + self.check_banner_run(args) + # Remove previous cards for name in ['delphes_trigger.dat', 'delphes_card.dat', 'pgs_card.dat', 'pythia_card.dat', 'madspin_card.dat', @@ -2197,20 +2197,20 @@ def do_banner_run(self, line): os.remove(pjoin(self.me_dir, 'Cards', name)) except Exception: pass - + banner_mod.split_banner(args[0], self.me_dir, proc_card=False) - + # Check if we want to modify the run if not self.force: ans = self.ask('Do you want to modify the Cards?', 'n', ['y','n']) if ans == 'n': self.force = True - + # Call Generate events self.exec_cmd('generate_events %s %s' % (self.run_name, self.force and '-f' or '')) - - - + + + ############################################################################ def do_display(self, line, output=sys.stdout): """Display current internal status""" @@ -2223,7 +2223,7 @@ def do_display(self, line, output=sys.stdout): #return valid run_name data = misc.glob(pjoin('*','*_banner.txt'), pjoin(self.me_dir, 'Events')) data = [n.rsplit('/',2)[1:] for n in data] - + if data: out = {} for name, tag in data: @@ -2235,11 +2235,11 @@ def do_display(self, line, output=sys.stdout): print('the runs available are:') for run_name, tags in out.items(): print(' run: %s' % run_name) - print(' tags: ', end=' ') + print(' tags: ', end=' ') print(', '.join(tags)) else: print('No run detected.') - + elif args[0] == 'options': outstr = " Run Options \n" outstr += " ----------- \n" @@ -2260,8 +2260,8 @@ def do_display(self, line, output=sys.stdout): if value == default: outstr += " %25s \t:\t%s\n" % (key,value) else: - outstr += " %25s \t:\t%s (user set)\n" % (key,value) - outstr += "\n" + outstr += " %25s \t:\t%s (user set)\n" % (key,value) + outstr += "\n" outstr += " Configuration Options \n" outstr += " --------------------- \n" for key, default in self.options_configuration.items(): @@ -2275,15 +2275,15 @@ def do_display(self, line, output=sys.stdout): self.do_print_results(' '.join(args[1:])) else: super(MadEventCmd, self).do_display(line, output) - + def do_save(self, line, check=True, to_keep={}): - """Not in help: Save information to file""" + """Not in help: Save information to file""" args = self.split_arg(line) # Check argument validity if check: self.check_save(args) - + if args[0] == 'options': # First look at options which should be put in MG5DIR/input to_define = {} @@ -2295,7 +2295,7 @@ def do_save(self, line, check=True, to_keep={}): for key, default in self.options_madevent.items(): if self.options[key] != self.options_madevent[key]: to_define[key] = self.options[key] - + if '--all' in args: for key, default in self.options_madgraph.items(): if self.options[key] != self.options_madgraph[key]: @@ -2312,12 +2312,12 @@ def do_save(self, line, check=True, to_keep={}): filepath = pjoin(self.me_dir, 'Cards', 'me5_configuration.txt') basefile = pjoin(self.me_dir, 'Cards', 'me5_configuration.txt') basedir = self.me_dir - + if to_keep: to_define = to_keep self.write_configuration(filepath, basefile, basedir, to_define) - - + + def do_edit_cards(self, line): @@ -2326,80 +2326,80 @@ def do_edit_cards(self, line): # Check argument's validity mode = self.check_generate_events(args) self.ask_run_configuration(mode) - + return ############################################################################ - + ############################################################################ def do_restart_gridpack(self, line): """ syntax restart_gridpack --precision=1.0 --restart_zero collect the result of the current run and relaunch each channel - not completed or optionally a completed one with a precision worse than + not completed or optionally a completed one with a precision worse than a threshold (and/or the zero result channel)""" - - + + args = self.split_arg(line) # Check argument's validity self.check_survey(args) - + # initialize / remove lhapdf mode #self.run_card = banner_mod.RunCard(pjoin(self.me_dir, 'Cards', 'run_card.dat')) #self.configure_directory() - + gensym = gen_ximprove.gensym(self) - + min_precision = 1.0 resubmit_zero=False if '--precision=' in line: s = line.index('--precision=') + len('--precision=') arg=line[s:].split(1)[0] min_precision = float(arg) - + if '--restart_zero' in line: resubmit_zero = True - - + + gensym.resubmit(min_precision, resubmit_zero) self.monitor(run_type='All jobs submitted for gridpack', html=True) #will be done during the refine (more precisely in gen_ximprove) cross, error = sum_html.make_all_html_results(self) self.results.add_detail('cross', cross) - self.results.add_detail('error', error) + self.results.add_detail('error', error) self.exec_cmd("print_results %s" % self.run_name, - errorhandling=False, printcmd=False, precmd=False, postcmd=False) - + errorhandling=False, printcmd=False, precmd=False, postcmd=False) + self.results.add_detail('run_statistics', dict(gensym.run_statistics)) - + #self.exec_cmd('combine_events', postcmd=False) #self.exec_cmd('store_events', postcmd=False) self.exec_cmd('decay_events -from_cards', postcmd=False) self.exec_cmd('create_gridpack', postcmd=False) - - - ############################################################################ + + + ############################################################################ ############################################################################ def do_generate_events(self, line): """Main Commands: launch the full chain """ - + self.banner = None self.Gdirs = None - + args = self.split_arg(line) # Check argument's validity mode = self.check_generate_events(args) switch_mode = self.ask_run_configuration(mode, args) if not args: - # No run name assigned -> assigned one automaticaly + # No run name assigned -> assigned one automaticaly self.set_run_name(self.find_available_run_name(self.me_dir), None, 'parton') else: self.set_run_name(args[0], None, 'parton', True) args.pop(0) - + self.run_generate_events(switch_mode, args) self.postprocessing() @@ -2420,8 +2420,8 @@ def postprocessing(self): def rivet_postprocessing(self, rivet_config, postprocess_RIVET, postprocess_CONTUR): - # Check number of Rivet jobs to run - run_dirs = [pjoin(self.me_dir, 'Events',run_name) + # Check number of Rivet jobs to run + run_dirs = [pjoin(self.me_dir, 'Events',run_name) for run_name in self.postprocessing_dirs] nb_rivet = len(run_dirs) @@ -2550,10 +2550,10 @@ def wait_monitoring(Idle, Running, Done): wrapper = open(pjoin(self.me_dir, "Analysis", "contur", "run_contur.sh"), "w") wrapper.write(set_env) - + wrapper.write('{0}\n'.format(contur_cmd)) wrapper.close() - + misc.call(["run_contur.sh"], cwd=(pjoin(self.me_dir, "Analysis", "contur"))) logger.info("Contur outputs are stored in {0}".format(pjoin(self.me_dir, "Analysis", "contur","conturPlot"))) @@ -2572,7 +2572,7 @@ def run_generate_events(self, switch_mode, args): self.do_set('run_mode 2') self.do_set('nb_core 1') - if self.run_card['gridpack'] in self.true: + if self.run_card['gridpack'] in self.true: # Running gridpack warmup gridpack_opts=[('accuracy', 0.01), ('points', 2000), @@ -2593,7 +2593,7 @@ def run_generate_events(self, switch_mode, args): # Regular run mode logger.info('Generating %s events with run name %s' % (self.run_card['nevents'], self.run_name)) - + self.exec_cmd('survey %s %s' % (self.run_name,' '.join(args)), postcmd=False) nb_event = self.run_card['nevents'] @@ -2601,7 +2601,7 @@ def run_generate_events(self, switch_mode, args): self.exec_cmd('refine %s' % nb_event, postcmd=False) if not float(self.results.current['cross']): # Zero cross-section. Try to guess why - text = '''Survey return zero cross section. + text = '''Survey return zero cross section. Typical reasons are the following: 1) A massive s-channel particle has a width set to zero. 2) The pdf are zero for at least one of the initial state particles @@ -2613,17 +2613,17 @@ def run_generate_events(self, switch_mode, args): raise ZeroResult('See https://cp3.irmp.ucl.ac.be/projects/madgraph/wiki/FAQ-General-14') else: bypass_run = True - + #we can bypass the following if scan and first result is zero if not bypass_run: self.exec_cmd('refine %s --treshold=%s' % (nb_event,self.run_card['second_refine_treshold']) , postcmd=False) - + self.exec_cmd('combine_events', postcmd=False,printcmd=False) self.print_results_in_shell(self.results.current) if self.run_card['use_syst']: - if self.run_card['systematics_program'] == 'auto': + if self.run_card['systematics_program'] == 'auto': scdir = self.options['syscalc_path'] if not scdir or not os.path.exists(scdir): to_use = 'systematics' @@ -2634,26 +2634,26 @@ def run_generate_events(self, switch_mode, args): else: logger.critical('Unvalid options for systematics_program: bypass computation of systematics variations.') to_use = 'none' - + if to_use == 'systematics': if self.run_card['systematics_arguments'] != ['']: self.exec_cmd('systematics %s %s ' % (self.run_name, - ' '.join(self.run_card['systematics_arguments'])), + ' '.join(self.run_card['systematics_arguments'])), postcmd=False, printcmd=False) else: self.exec_cmd('systematics %s --from_card' % self.run_name, - postcmd=False,printcmd=False) + postcmd=False,printcmd=False) elif to_use == 'syscalc': self.run_syscalc('parton') - - - self.create_plot('parton') - self.exec_cmd('store_events', postcmd=False) + + + self.create_plot('parton') + self.exec_cmd('store_events', postcmd=False) if self.run_card['boost_event'].strip() and self.run_card['boost_event'] != 'False': self.boost_events() - - - self.exec_cmd('reweight -from_cards', postcmd=False) + + + self.exec_cmd('reweight -from_cards', postcmd=False) self.exec_cmd('decay_events -from_cards', postcmd=False) if self.run_card['time_of_flight']>=0: self.exec_cmd("add_time_of_flight --threshold=%s" % self.run_card['time_of_flight'] ,postcmd=False) @@ -2664,43 +2664,43 @@ def run_generate_events(self, switch_mode, args): self.create_root_file(input , output) self.exec_cmd('madanalysis5_parton --no_default', postcmd=False, printcmd=False) - # shower launches pgs/delphes if needed + # shower launches pgs/delphes if needed self.exec_cmd('shower --no_default', postcmd=False, printcmd=False) self.exec_cmd('madanalysis5_hadron --no_default', postcmd=False, printcmd=False) self.exec_cmd('rivet --no_default', postcmd=False, printcmd=False) self.store_result() - - if self.allow_notification_center: - misc.system_notify('Run %s finished' % os.path.basename(self.me_dir), - '%s: %s +- %s ' % (self.results.current['run_name'], + + if self.allow_notification_center: + misc.system_notify('Run %s finished' % os.path.basename(self.me_dir), + '%s: %s +- %s ' % (self.results.current['run_name'], self.results.current['cross'], self.results.current['error'])) - + def boost_events(self): - + if not self.run_card['boost_event']: return - + if self.run_card['boost_event'].startswith('lambda'): if not isinstance(self, cmd.CmdShell): raise Exception("boost not allowed online") filter = eval(self.run_card['boost_event']) else: raise Exception - + path = [pjoin(self.me_dir, 'Events', self.run_name, 'unweighted_events.lhe.gz'), pjoin(self.me_dir, 'Events', self.run_name, 'unweighted_events.lhe'), pjoin(self.me_dir, 'Events', self.run_name, 'events.lhe.gz'), pjoin(self.me_dir, 'Events', self.run_name, 'events.lhe')] - + for p in path: if os.path.exists(p): event_path = p break else: raise Exception("fail to find event file for the boost") - - + + lhe = lhe_parser.EventFile(event_path) with misc.TMP_directory() as tmp_dir: output = lhe_parser.EventFile(pjoin(tmp_dir, os.path.basename(event_path)), 'w') @@ -2711,28 +2711,28 @@ def boost_events(self): event.boost(filter) #write this modify event output.write(str(event)) - output.write('\n') + output.write('\n') lhe.close() - files.mv(pjoin(tmp_dir, os.path.basename(event_path)), event_path) - - - - - + files.mv(pjoin(tmp_dir, os.path.basename(event_path)), event_path) + + + + + def do_initMadLoop(self,line): - """Compile and run MadLoop for a certain number of PS point so as to + """Compile and run MadLoop for a certain number of PS point so as to initialize MadLoop (setup the zero helicity and loop filter.)""" - + args = line.split() # Check argument's validity options = self.check_initMadLoop(args) - + if not options['force']: self.ask_edit_cards(['MadLoopParams.dat'], mode='fixed', plot=False) self.exec_cmd('treatcards loop --no_MadLoopInit') if options['refresh']: - for filter in misc.glob('*Filter*', + for filter in misc.glob('*Filter*', pjoin(self.me_dir,'SubProcesses','MadLoop5_resources')): logger.debug("Resetting filter '%s'."%os.path.basename(filter)) os.remove(filter) @@ -2753,14 +2753,14 @@ def do_initMadLoop(self,line): def do_launch(self, line, *args, **opt): """Main Commands: exec generate_events for 2>N and calculate_width for 1>N""" - + if self.ninitial == 1: logger.info("Note that since 2.3. The launch for 1>N pass in event generation\n"+ " To have the previous behavior use the calculate_decay_widths function") # self.do_calculate_decay_widths(line, *args, **opt) #else: self.do_generate_events(line, *args, **opt) - + def print_results_in_shell(self, data): """Have a nice results prints in the shell, data should be of type: gen_crossxhtml.OneTagResults""" @@ -2770,7 +2770,7 @@ def print_results_in_shell(self, data): if data['run_statistics']: globalstat = sum_html.RunStatistics() - + logger.info(" " ) logger.debug(" === Run statistics summary ===") for key, value in data['run_statistics'].items(): @@ -2786,13 +2786,13 @@ def print_results_in_shell(self, data): logger.warning(globalstat.get_warning_text()) logger.info(" ") - + logger.info(" === Results Summary for run: %s tag: %s ===\n" % (data['run_name'],data['tag'])) - + total_time = int(sum(_['cumulative_timing'] for _ in data['run_statistics'].values())) if total_time > 0: logger.info(" Cumulative sequential time for this run: %s"%misc.format_time(total_time)) - + if self.ninitial == 1: logger.info(" Width : %.4g +- %.4g GeV" % (data['cross'], data['error'])) else: @@ -2810,18 +2810,18 @@ def print_results_in_shell(self, data): if len(split)!=3: continue scale, cross, error = split - cross_sections[float(scale)] = (float(cross), float(error)) + cross_sections[float(scale)] = (float(cross), float(error)) if len(cross_sections)>0: logger.info(' Pythia8 merged cross-sections are:') for scale in sorted(cross_sections.keys()): logger.info(' > Merging scale = %-6.4g : %-11.5g +/- %-7.2g [pb]'%\ (scale,cross_sections[scale][0],cross_sections[scale][1])) - + else: if self.ninitial == 1: logger.info(" Matched width : %.4g +- %.4g GeV" % (data['cross_pythia'], data['error_pythia'])) else: - logger.info(" Matched cross-section : %.4g +- %.4g pb" % (data['cross_pythia'], data['error_pythia'])) + logger.info(" Matched cross-section : %.4g +- %.4g pb" % (data['cross_pythia'], data['error_pythia'])) logger.info(" Nb of events after matching/merging : %d" % int(data['nb_event_pythia'])) if self.run_card['use_syst'] in self.true and \ (int(self.run_card['ickkw'])==1 or self.run_card['ktdurham']>0.0 @@ -2838,9 +2838,9 @@ def print_results_in_file(self, data, path, mode='w', format='full'): data should be of type: gen_crossxhtml.OneTagResults""" if not data: return - + fsock = open(path, mode) - + if data['run_statistics']: logger.debug(" === Run statistics summary ===") for key, value in data['run_statistics'].items(): @@ -2851,7 +2851,7 @@ def print_results_in_file(self, data, path, mode='w', format='full'): if format == "full": fsock.write(" === Results Summary for run: %s tag: %s process: %s ===\n" % \ (data['run_name'],data['tag'], os.path.basename(self.me_dir))) - + if self.ninitial == 1: fsock.write(" Width : %.4g +- %.4g GeV\n" % (data['cross'], data['error'])) else: @@ -2861,20 +2861,20 @@ def print_results_in_file(self, data, path, mode='w', format='full'): if self.ninitial == 1: fsock.write(" Matched Width : %.4g +- %.4g GeV\n" % (data['cross_pythia'], data['error_pythia'])) else: - fsock.write(" Matched Cross-section : %.4g +- %.4g pb\n" % (data['cross_pythia'], data['error_pythia'])) + fsock.write(" Matched Cross-section : %.4g +- %.4g pb\n" % (data['cross_pythia'], data['error_pythia'])) fsock.write(" Nb of events after Matching : %s\n" % data['nb_event_pythia']) fsock.write(" \n" ) elif format == "short": if mode == "w": fsock.write("# run_name tag cross error Nb_event cross_after_matching nb_event_after matching\n") - + if data['cross_pythia'] and data['nb_event_pythia']: text = "%(run_name)s %(tag)s %(cross)s %(error)s %(nb_event)s %(cross_pythia)s %(nb_event_pythia)s\n" else: text = "%(run_name)s %(tag)s %(cross)s %(error)s %(nb_event)s\n" fsock.write(text % data) - - ############################################################################ + + ############################################################################ def do_calculate_decay_widths(self, line): """Main Commands: launch decay width calculation and automatic inclusion of calculated widths and BRs in the param_card.""" @@ -2887,21 +2887,21 @@ def do_calculate_decay_widths(self, line): self.Gdirs = None if not args: - # No run name assigned -> assigned one automaticaly + # No run name assigned -> assigned one automaticaly self.set_run_name(self.find_available_run_name(self.me_dir)) else: self.set_run_name(args[0], reload_card=True) args.pop(0) self.configure_directory() - + # Running gridpack warmup opts=[('accuracy', accuracy), # default 0.01 ('points', 1000), ('iterations',9)] logger.info('Calculating decay widths with run name %s' % self.run_name) - + self.exec_cmd('survey %s %s' % \ (self.run_name, " ".join(['--' + opt + '=' + str(val) for (opt,val) \ @@ -2910,26 +2910,26 @@ def do_calculate_decay_widths(self, line): self.refine_mode = "old" # specify how to combine event self.exec_cmd('combine_events', postcmd=False) self.exec_cmd('store_events', postcmd=False) - + self.collect_decay_widths() self.print_results_in_shell(self.results.current) - self.update_status('calculate_decay_widths done', - level='parton', makehtml=False) + self.update_status('calculate_decay_widths done', + level='parton', makehtml=False) + - ############################################################################ def collect_decay_widths(self): - """ Collect the decay widths and calculate BRs for all particles, and put - in param_card form. + """ Collect the decay widths and calculate BRs for all particles, and put + in param_card form. """ - + particle_dict = {} # store the results run_name = self.run_name # Looping over the Subprocesses for P_path in SubProcesses.get_subP(self.me_dir): ids = SubProcesses.get_subP_ids(P_path) - # due to grouping we need to compute the ratio factor for the + # due to grouping we need to compute the ratio factor for the # ungroup resutls (that we need here). Note that initial particles # grouping are not at the same stage as final particle grouping nb_output = len(ids) / (len(set([p[0] for p in ids]))) @@ -2940,30 +2940,30 @@ def collect_decay_widths(self): particle_dict[particles[0]].append([particles[1:], result/nb_output]) except KeyError: particle_dict[particles[0]] = [[particles[1:], result/nb_output]] - + self.update_width_in_param_card(particle_dict, initial = pjoin(self.me_dir, 'Cards', 'param_card.dat'), output=pjoin(self.me_dir, 'Events', run_name, "param_card.dat")) - + @staticmethod def update_width_in_param_card(decay_info, initial=None, output=None): # Open the param_card.dat and insert the calculated decays and BRs - + if not output: output = initial - + param_card_file = open(initial) param_card = param_card_file.read().split('\n') param_card_file.close() decay_lines = [] line_number = 0 - # Read and remove all decays from the param_card + # Read and remove all decays from the param_card while line_number < len(param_card): line = param_card[line_number] if line.lower().startswith('decay'): - # Read decay if particle in decay_info - # DECAY 6 1.455100e+00 + # Read decay if particle in decay_info + # DECAY 6 1.455100e+00 line = param_card.pop(line_number) line = line.split() particle = 0 @@ -2996,7 +2996,7 @@ def update_width_in_param_card(decay_info, initial=None, output=None): break line=param_card[line_number] if particle and particle not in decay_info: - # No decays given, only total width + # No decays given, only total width decay_info[particle] = [[[], width]] else: # Not decay line_number += 1 @@ -3004,7 +3004,7 @@ def update_width_in_param_card(decay_info, initial=None, output=None): while not param_card[-1] or param_card[-1].startswith('#'): param_card.pop(-1) - # Append calculated and read decays to the param_card + # Append calculated and read decays to the param_card param_card.append("#\n#*************************") param_card.append("# Decay widths *") param_card.append("#*************************") @@ -3018,7 +3018,7 @@ def update_width_in_param_card(decay_info, initial=None, output=None): param_card.append("# BR NDA ID1 ID2 ...") brs = [[(val[1]/width).real, val[0]] for val in decay_info[key] if val[1]] for val in sorted(brs, reverse=True): - param_card.append(" %e %i %s # %s" % + param_card.append(" %e %i %s # %s" % (val[0].real, len(val[1]), " ".join([str(v) for v in val[1]]), val[0] * width @@ -3031,7 +3031,7 @@ def update_width_in_param_card(decay_info, initial=None, output=None): ############################################################################ def do_multi_run(self, line): - + args = self.split_arg(line) # Check argument's validity mode = self.check_multi_run(args) @@ -3047,7 +3047,7 @@ def do_multi_run(self, line): self.check_param_card(path, run=False) #store it locally to avoid relaunch param_card_iterator, self.param_card_iterator = self.param_card_iterator, [] - + crossoversig = 0 inv_sq_err = 0 nb_event = 0 @@ -3055,8 +3055,8 @@ def do_multi_run(self, line): self.nb_refine = 0 self.exec_cmd('generate_events %s_%s -f' % (main_name, i), postcmd=False) # Update collected value - nb_event += int(self.results[self.run_name][-1]['nb_event']) - self.results.add_detail('nb_event', nb_event , run=main_name) + nb_event += int(self.results[self.run_name][-1]['nb_event']) + self.results.add_detail('nb_event', nb_event , run=main_name) cross = self.results[self.run_name][-1]['cross'] error = self.results[self.run_name][-1]['error'] + 1e-99 crossoversig+=cross/error**2 @@ -3070,7 +3070,7 @@ def do_multi_run(self, line): os.mkdir(pjoin(self.me_dir,'Events', self.run_name)) except Exception: pass - os.system('%(bin)s/merge.pl %(event)s/%(name)s_*/unweighted_events.lhe.gz %(event)s/%(name)s/unweighted_events.lhe.gz %(event)s/%(name)s_banner.txt' + os.system('%(bin)s/merge.pl %(event)s/%(name)s_*/unweighted_events.lhe.gz %(event)s/%(name)s/unweighted_events.lhe.gz %(event)s/%(name)s_banner.txt' % {'bin': self.dirbin, 'event': pjoin(self.me_dir,'Events'), 'name': self.run_name}) @@ -3084,19 +3084,19 @@ def do_multi_run(self, line): self.create_root_file('%s/unweighted_events.lhe' % self.run_name, '%s/unweighted_events.root' % self.run_name) - - path = pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe") + + path = pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe") self.create_plot('parton', path, pjoin(self.me_dir, 'HTML',self.run_name, 'plots_parton.html') ) - - if not os.path.exists('%s.gz' % path): + + if not os.path.exists('%s.gz' % path): misc.gzip(path) self.update_status('', level='parton') - self.print_results_in_shell(self.results.current) - + self.print_results_in_shell(self.results.current) + cpath = pjoin(self.me_dir,'Cards','param_card.dat') if param_card_iterator: @@ -3112,21 +3112,21 @@ def do_multi_run(self, line): path = pjoin(self.me_dir, 'Events','scan_%s.txt' % scan_name) logger.info("write all cross-section results in %s" % path, '$MG:BOLD') param_card_iterator.write_summary(path) - - ############################################################################ + + ############################################################################ def do_treatcards(self, line, mode=None, opt=None): """Advanced commands: create .inc files from param_card.dat/run_card.dat""" if not mode and not opt: args = self.split_arg(line) mode, opt = self.check_treatcards(args) - + # To decide whether to refresh MadLoop's helicity filters, it is necessary # to check if the model parameters where modified or not, before doing - # anything else. + # anything else. need_MadLoopFilterUpdate = False - # Just to record what triggered the reinitialization of MadLoop for a + # Just to record what triggered the reinitialization of MadLoop for a # nice debug message. type_of_change = '' if not opt['forbid_MadLoopInit'] and self.proc_characteristics['loop_induced'] \ @@ -3137,10 +3137,10 @@ def do_treatcards(self, line, mode=None, opt=None): (os.path.getmtime(paramDat)-os.path.getmtime(paramInc)) > 0.0: need_MadLoopFilterUpdate = True type_of_change = 'model' - + ML_in = pjoin(self.me_dir, 'Cards', 'MadLoopParams.dat') ML_out = pjoin(self.me_dir,"SubProcesses", - "MadLoop5_resources", "MadLoopParams.dat") + "MadLoop5_resources", "MadLoopParams.dat") if (not os.path.isfile(ML_in)) or (not os.path.isfile(ML_out)) or \ (os.path.getmtime(ML_in)-os.path.getmtime(ML_out)) > 0.0: need_MadLoopFilterUpdate = True @@ -3148,7 +3148,7 @@ def do_treatcards(self, line, mode=None, opt=None): #check if no 'Auto' are present in the file self.check_param_card(pjoin(self.me_dir, 'Cards','param_card.dat')) - + if mode in ['param', 'all']: model = self.find_model_name() tmp_model = os.path.basename(model) @@ -3160,9 +3160,9 @@ def do_treatcards(self, line, mode=None, opt=None): check_param_card.check_valid_param_card(mg5_param) opt['param_card'] = pjoin(self.me_dir, 'Source', 'MODEL', 'MG5_param.dat') else: - check_param_card.check_valid_param_card(opt['param_card']) - - logger.debug('write compile file for card: %s' % opt['param_card']) + check_param_card.check_valid_param_card(opt['param_card']) + + logger.debug('write compile file for card: %s' % opt['param_card']) param_card = check_param_card.ParamCard(opt['param_card']) outfile = pjoin(opt['output_dir'], 'param_card.inc') ident_card = pjoin(self.me_dir,'Cards','ident_card.dat') @@ -3185,10 +3185,10 @@ def do_treatcards(self, line, mode=None, opt=None): devnull.close() default = pjoin(self.me_dir,'bin','internal','ufomodel','param_card.dat') - need_mp = self.proc_characteristics['loop_induced'] + need_mp = self.proc_characteristics['loop_induced'] param_card.write_inc_file(outfile, ident_card, default, need_mp=need_mp) - - + + if mode in ['run', 'all']: if not hasattr(self, 'run_card'): run_card = banner_mod.RunCard(opt['run_card'], path=pjoin(self.me_dir, 'Cards', 'run_card.dat')) @@ -3202,7 +3202,7 @@ def do_treatcards(self, line, mode=None, opt=None): run_card['lpp2'] = 0 run_card['ebeam1'] = 0 run_card['ebeam2'] = 0 - + # Ensure that the bias parameters has all the required input from the # run_card if run_card['bias_module'].lower() not in ['dummy','none']: @@ -3219,7 +3219,7 @@ def do_treatcards(self, line, mode=None, opt=None): mandatory_file,run_card['bias_module'])) misc.copytree(run_card['bias_module'], pjoin(self.me_dir,'Source','BIAS', os.path.basename(run_card['bias_module']))) - + #check expected parameters for the module. default_bias_parameters = {} start, last = False,False @@ -3244,50 +3244,50 @@ def do_treatcards(self, line, mode=None, opt=None): for pair in line.split(','): if not pair.strip(): continue - x,y =pair.split(':') + x,y =pair.split(':') x=x.strip() if x.startswith(('"',"'")) and x.endswith(x[0]): - x = x[1:-1] + x = x[1:-1] default_bias_parameters[x] = y elif ':' in line: x,y = line.split(':') x = x.strip() if x.startswith(('"',"'")) and x.endswith(x[0]): - x = x[1:-1] + x = x[1:-1] default_bias_parameters[x] = y for key,value in run_card['bias_parameters'].items(): if key not in default_bias_parameters: logger.warning('%s not supported by the bias module. We discard this entry.', key) else: default_bias_parameters[key] = value - run_card['bias_parameters'] = default_bias_parameters - - - # Finally write the include file + run_card['bias_parameters'] = default_bias_parameters + + + # Finally write the include file run_card.write_include_file(opt['output_dir']) - + if self.proc_characteristics['loop_induced'] and mode in ['loop', 'all']: - self.MadLoopparam = banner_mod.MadLoopParam(pjoin(self.me_dir, + self.MadLoopparam = banner_mod.MadLoopParam(pjoin(self.me_dir, 'Cards', 'MadLoopParams.dat')) # The writing out of MadLoop filter is potentially dangerous # when running in multi-core with a central disk. So it is turned - # off here. If these filters were not initialized then they will + # off here. If these filters were not initialized then they will # have to be re-computed at the beginning of each run. if 'WriteOutFilters' in self.MadLoopparam.user_set and \ self.MadLoopparam.get('WriteOutFilters'): logger.info( -"""You chose to have MadLoop writing out filters. +"""You chose to have MadLoop writing out filters. Beware that this can be dangerous for local multicore runs.""") self.MadLoopparam.set('WriteOutFilters',False, changeifuserset=False) - + # The conservative settings below for 'CTModeInit' and 'ZeroThres' # help adress issues for processes like g g > h z, and g g > h g - # where there are some helicity configuration heavily suppressed - # (by several orders of magnitude) so that the helicity filter + # where there are some helicity configuration heavily suppressed + # (by several orders of magnitude) so that the helicity filter # needs high numerical accuracy to correctly handle this spread in # magnitude. Also, because one cannot use the Born as a reference - # scale, it is better to force quadruple precision *for the + # scale, it is better to force quadruple precision *for the # initialization points only*. This avoids numerical accuracy issues # when setting up the helicity filters and does not significantly # slow down the run. @@ -3298,21 +3298,21 @@ def do_treatcards(self, line, mode=None, opt=None): # It is a bit superficial to use the level 2 which tries to numerically # map matching helicities (because of CP symmetry typically) together. -# It is useless in the context of MC over helicities and it can +# It is useless in the context of MC over helicities and it can # potentially make the helicity double checking fail. self.MadLoopparam.set('HelicityFilterLevel',1, changeifuserset=False) # To be on the safe side however, we ask for 4 consecutive matching # helicity filters. self.MadLoopparam.set('CheckCycle',4, changeifuserset=False) - + # For now it is tricky to have each channel performing the helicity # double check. What we will end up doing is probably some kind # of new initialization round at the beginning of each launch - # command, to reset the filters. + # command, to reset the filters. self.MadLoopparam.set('DoubleCheckHelicityFilter',False, changeifuserset=False) - + # Thanks to TIR recycling, TIR is typically much faster for Loop-induced # processes when not doing MC over helicities, so that we place OPP last. if not hasattr(self, 'run_card'): @@ -3349,7 +3349,7 @@ def do_treatcards(self, line, mode=None, opt=None): logger.warning( """You chose to also use a lorentz rotation for stability tests (see parameter NRotations_[DP|QP]). Beware that, for optimization purposes, MadEvent uses manual TIR cache clearing which is not compatible - with the lorentz rotation stability test. The number of these rotations to be used will be reset to + with the lorentz rotation stability test. The number of these rotations to be used will be reset to zero by MadLoop. You can avoid this by changing the parameter 'FORCE_ML_HELICITY_SUM' int he matrix.f files to be .TRUE. so that the sum over helicity configurations is performed within MadLoop (in which case the helicity of final state particles cannot be speicfied in the LHE file.""") @@ -3363,15 +3363,15 @@ def do_treatcards(self, line, mode=None, opt=None): # self.MadLoopparam.set('NRotations_DP',0,changeifuserset=False) # Revert to the above to be slightly less robust but twice faster. self.MadLoopparam.set('NRotations_DP',1,changeifuserset=False) - self.MadLoopparam.set('NRotations_QP',0,changeifuserset=False) - + self.MadLoopparam.set('NRotations_QP',0,changeifuserset=False) + # Finally, the stability tests are slightly less reliable for process - # with less or equal than 4 final state particles because the + # with less or equal than 4 final state particles because the # accessible kinematic is very limited (i.e. lorentz rotations don't # shuffle invariants numerics much). In these cases, we therefore # increase the required accuracy to 10^-7. # This is important for getting g g > z z [QCD] working with a - # ptheavy cut as low as 1 GeV. + # ptheavy cut as low as 1 GeV. if self.proc_characteristics['nexternal']<=4: if ('MLStabThres' in self.MadLoopparam.user_set and \ self.MadLoopparam.get('MLStabThres')>1.0e-7): @@ -3381,12 +3381,12 @@ def do_treatcards(self, line, mode=None, opt=None): than four external legs, so this is not recommended (especially not for g g > z z).""") self.MadLoopparam.set('MLStabThres',1.0e-7,changeifuserset=False) else: - self.MadLoopparam.set('MLStabThres',1.0e-4,changeifuserset=False) + self.MadLoopparam.set('MLStabThres',1.0e-4,changeifuserset=False) #write the output file self.MadLoopparam.write(pjoin(self.me_dir,"SubProcesses","MadLoop5_resources", "MadLoopParams.dat")) - + if self.proc_characteristics['loop_induced'] and mode in ['loop', 'all']: # Now Update MadLoop filters if necessary (if modifications were made to # the model parameters). @@ -3403,12 +3403,12 @@ def do_treatcards(self, line, mode=None, opt=None): elif not opt['forbid_MadLoopInit'] and \ MadLoopInitializer.need_MadLoopInit(self.me_dir): self.exec_cmd('initMadLoop -f') - - ############################################################################ + + ############################################################################ def do_survey(self, line): """Advanced commands: launch survey for the current process """ - - + + args = self.split_arg(line) # Check argument's validity self.check_survey(args) @@ -3416,7 +3416,7 @@ def do_survey(self, line): if os.path.exists(pjoin(self.me_dir,'error')): os.remove(pjoin(self.me_dir,'error')) - + self.configure_directory() # Save original random number self.random_orig = self.random @@ -3435,9 +3435,9 @@ def do_survey(self, line): P_zero_result = [] # check the number of times where they are no phase-space # File for the loop (for loop induced) - if os.path.exists(pjoin(self.me_dir,'SubProcesses', + if os.path.exists(pjoin(self.me_dir,'SubProcesses', 'MadLoop5_resources')) and cluster.need_transfer(self.options): - tf=tarfile.open(pjoin(self.me_dir, 'SubProcesses', + tf=tarfile.open(pjoin(self.me_dir, 'SubProcesses', 'MadLoop5_resources.tar.gz'), 'w:gz', dereference=True) tf.add(pjoin(self.me_dir,'SubProcesses','MadLoop5_resources'), arcname='MadLoop5_resources') @@ -3467,7 +3467,7 @@ def do_survey(self, line): except Exception as error: logger.debug(error) pass - + jobs, P_zero_result = ajobcreator.launch() # Check if all or only some fails if P_zero_result: @@ -3481,60 +3481,60 @@ def do_survey(self, line): self.get_Gdir() for P in P_zero_result: self.Gdirs[0][pjoin(self.me_dir,'SubProcesses',P)] = [] - + self.monitor(run_type='All jobs submitted for survey', html=True) if not self.history or 'survey' in self.history[-1] or self.ninitial ==1 or \ self.run_card['gridpack']: #will be done during the refine (more precisely in gen_ximprove) cross, error = self.make_make_all_html_results() self.results.add_detail('cross', cross) - self.results.add_detail('error', error) + self.results.add_detail('error', error) self.exec_cmd("print_results %s" % self.run_name, - errorhandling=False, printcmd=False, precmd=False, postcmd=False) - + errorhandling=False, printcmd=False, precmd=False, postcmd=False) + self.results.add_detail('run_statistics', dict(ajobcreator.run_statistics)) self.update_status('End survey', 'parton', makehtml=False) ############################################################################ def pass_in_difficult_integration_mode(self, rate=1): """be more secure for the integration to not miss it due to strong cut""" - + # improve survey options if default if self.opts['points'] == self._survey_options['points'][1]: self.opts['points'] = (rate+2) * self._survey_options['points'][1] if self.opts['iterations'] == self._survey_options['iterations'][1]: self.opts['iterations'] = 1 + rate + self._survey_options['iterations'][1] if self.opts['accuracy'] == self._survey_options['accuracy'][1]: - self.opts['accuracy'] = self._survey_options['accuracy'][1]/(rate+2) - + self.opts['accuracy'] = self._survey_options['accuracy'][1]/(rate+2) + # Modify run_config.inc in order to improve the refine conf_path = pjoin(self.me_dir, 'Source','run_config.inc') files.cp(conf_path, conf_path + '.bk') # text = open(conf_path).read() - min_evt, max_evt = 2500 *(2+rate), 10000*(rate+1) - + min_evt, max_evt = 2500 *(2+rate), 10000*(rate+1) + text = re.sub('''\(min_events = \d+\)''', '(min_events = %i )' % min_evt, text) text = re.sub('''\(max_events = \d+\)''', '(max_events = %i )' % max_evt, text) fsock = open(conf_path, 'w') fsock.write(text) fsock.close() - + # Compile for name in ['../bin/internal/gen_ximprove', 'all']: self.compile(arg=[name], cwd=os.path.join(self.me_dir, 'Source')) - - - ############################################################################ + + + ############################################################################ def do_refine(self, line): """Advanced commands: launch survey for the current process """ - devnull = open(os.devnull, 'w') + devnull = open(os.devnull, 'w') self.nb_refine += 1 args = self.split_arg(line) treshold=None - - + + for a in args: if a.startswith('--treshold='): treshold = float(a.split('=',1)[1]) @@ -3548,8 +3548,8 @@ def do_refine(self, line): break # Check argument's validity self.check_refine(args) - - refine_opt = {'err_goal': args[0], 'split_channels': True} + + refine_opt = {'err_goal': args[0], 'split_channels': True} precision = args[0] if len(args) == 2: refine_opt['max_process']= args[1] @@ -3560,15 +3560,15 @@ def do_refine(self, line): # Update random number self.update_random() self.save_random() - + if self.cluster_mode: logger.info('Creating Jobs') self.update_status('Refine results to %s' % precision, level=None) - + self.total_jobs = 0 - subproc = [l.strip() for l in open(pjoin(self.me_dir,'SubProcesses', + subproc = [l.strip() for l in open(pjoin(self.me_dir,'SubProcesses', 'subproc.mg'))] - + # cleanning the previous job for nb_proc,subdir in enumerate(subproc): subdir = subdir.strip() @@ -3589,14 +3589,14 @@ def do_refine(self, line): level = 5 if value.has_warning(): level = 10 - logger.log(level, + logger.log(level, value.nice_output(str('/'.join([key[0],'G%s'%key[1]]))). replace(' statistics','')) logger.debug(globalstat.nice_output('combined', no_warning=True)) - + if survey_statistics: x_improve.run_statistics = survey_statistics - + x_improve.launch() # create the ajob for the refinment. if not self.history or 'refine' not in self.history[-1]: cross, error = x_improve.update_html() #update html results for survey @@ -3610,9 +3610,9 @@ def do_refine(self, line): subdir = subdir.strip() Pdir = pjoin(self.me_dir, 'SubProcesses',subdir) bindir = pjoin(os.path.relpath(self.dirbin, Pdir)) - + logger.info(' %s ' % subdir) - + if os.path.exists(pjoin(Pdir, 'ajob1')): cudacpp_backend = self.run_card['cudacpp_backend'] # the default value is defined in banner.py @@ -3629,7 +3629,7 @@ def do_refine(self, line): ###self.compile(['all'], cwd=Pdir) alljobs = misc.glob('ajob*', Pdir) - + #remove associated results.dat (ensure to not mix with all data) Gre = re.compile("\s*j=(G[\d\.\w]+)") for job in alljobs: @@ -3637,49 +3637,49 @@ def do_refine(self, line): for Gdir in Gdirs: if os.path.exists(pjoin(Pdir, Gdir, 'results.dat')): os.remove(pjoin(Pdir, Gdir,'results.dat')) - - nb_tot = len(alljobs) + + nb_tot = len(alljobs) self.total_jobs += nb_tot for i, job in enumerate(alljobs): job = os.path.basename(job) - self.launch_job('%s' % job, cwd=Pdir, remaining=(nb_tot-i-1), - run_type='Refine number %s on %s (%s/%s)' % + self.launch_job('%s' % job, cwd=Pdir, remaining=(nb_tot-i-1), + run_type='Refine number %s on %s (%s/%s)' % (self.nb_refine, subdir, nb_proc+1, len(subproc))) - self.monitor(run_type='All job submitted for refine number %s' % self.nb_refine, + self.monitor(run_type='All job submitted for refine number %s' % self.nb_refine, html=True) - + self.update_status("Combining runs", level='parton') try: os.remove(pjoin(Pdir, 'combine_runs.log')) except Exception: pass - + if isinstance(x_improve, gen_ximprove.gen_ximprove_v4): # the merge of the events.lhe is handle in the x_improve class - # for splitted runs. (and partly in store_events). + # for splitted runs. (and partly in store_events). combine_runs.CombineRuns(self.me_dir) self.refine_mode = "old" else: self.refine_mode = "new" - + cross, error = self.make_make_all_html_results() self.results.add_detail('cross', cross) self.results.add_detail('error', error) - self.results.add_detail('run_statistics', + self.results.add_detail('run_statistics', dict(self.results.get_detail('run_statistics'))) self.update_status('finish refine', 'parton', makehtml=False) devnull.close() - - ############################################################################ + + ############################################################################ def do_comine_iteration(self, line): """Not in help: Combine a given iteration combine_iteration Pdir Gdir S|R step - S is for survey + S is for survey R is for refine - step is the iteration number (not very critical)""" + step is the iteration number (not very critical)""" self.set_run_name("tmp") self.configure_directory(html_opening=False) @@ -3695,12 +3695,12 @@ def do_comine_iteration(self, line): gensym.combine_iteration(Pdir, Gdir, int(step)) elif mode == "R": refine = gen_ximprove.gen_ximprove_share(self) - refine.combine_iteration(Pdir, Gdir, int(step)) - - + refine.combine_iteration(Pdir, Gdir, int(step)) - - ############################################################################ + + + + ############################################################################ def do_combine_events(self, line): """Advanced commands: Launch combine events""" start=time.time() @@ -3710,11 +3710,11 @@ def do_combine_events(self, line): self.check_combine_events(args) self.update_status('Combining Events', level='parton') - + if self.run_card['gridpack'] and isinstance(self, GridPackCmd): return GridPackCmd.do_combine_events(self, line) - + # Define The Banner tag = self.run_card['run_tag'] # Update the banner with the pythia card @@ -3727,14 +3727,14 @@ def do_combine_events(self, line): self.banner.change_seed(self.random_orig) if not os.path.exists(pjoin(self.me_dir, 'Events', self.run_name)): os.mkdir(pjoin(self.me_dir, 'Events', self.run_name)) - self.banner.write(pjoin(self.me_dir, 'Events', self.run_name, + self.banner.write(pjoin(self.me_dir, 'Events', self.run_name, '%s_%s_banner.txt' % (self.run_name, tag))) - - get_wgt = lambda event: event.wgt + + get_wgt = lambda event: event.wgt AllEvent = lhe_parser.MultiEventFile() AllEvent.banner = self.banner - + partials = 0 # if too many file make some partial unweighting sum_xsec, sum_xerru, sum_axsec = 0,[],0 Gdirs = self.get_Gdir() @@ -3751,12 +3751,12 @@ def do_combine_events(self, line): os.remove(pjoin(Gdir, 'events.lhe')) continue - AllEvent.add(pjoin(Gdir, 'events.lhe'), + AllEvent.add(pjoin(Gdir, 'events.lhe'), result.get('xsec'), result.get('xerru'), result.get('axsec') ) - + if len(AllEvent) >= 80: #perform a partial unweighting AllEvent.unweight(pjoin(self.me_dir, "Events", self.run_name, "partials%s.lhe.gz" % partials), get_wgt, log_level=5, trunc_error=1e-2, event_target=self.run_card['nevents']) @@ -3765,13 +3765,13 @@ def do_combine_events(self, line): AllEvent.add(pjoin(self.me_dir, "Events", self.run_name, "partials%s.lhe.gz" % partials), sum_xsec, math.sqrt(sum(x**2 for x in sum_xerru)), - sum_axsec) + sum_axsec) partials +=1 - + if not hasattr(self,'proc_characteristic'): self.proc_characteristic = self.get_characteristics() if len(AllEvent) == 0: - nb_event = 0 + nb_event = 0 else: nb_event = AllEvent.unweight(pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe.gz"), get_wgt, trunc_error=1e-2, event_target=self.run_card['nevents'], @@ -3791,22 +3791,22 @@ def do_combine_events(self, line): os.remove(pjoin(self.me_dir, "Events", self.run_name, "partials%s.lhe.gz" % i)) except Exception: os.remove(pjoin(self.me_dir, "Events", self.run_name, "partials%s.lhe" % i)) - + self.results.add_detail('nb_event', nb_event) - + if self.run_card['bias_module'].lower() not in ['dummy', 'none'] and nb_event: self.correct_bias() elif self.run_card['custom_fcts']: self.correct_bias() logger.info("combination of events done in %s s ", time.time()-start) - + self.to_store.append('event') - - ############################################################################ + + ############################################################################ def correct_bias(self): - """check the first event and correct the weight by the bias + """check the first event and correct the weight by the bias and correct the cross-section. - If the event do not have the bias tag it means that the bias is + If the event do not have the bias tag it means that the bias is one modifying the cross-section/shape so we have nothing to do """ @@ -3834,7 +3834,7 @@ def correct_bias(self): output.write('') output.close() lhe.close() - + # MODIFY THE BANNER i.e. INIT BLOCK # ensure information compatible with normalisation choice total_cross = sum(cross[key] for key in cross) @@ -3846,8 +3846,8 @@ def correct_bias(self): elif self.run_card['event_norm'] == 'unity': total_cross = self.results.current['cross'] * total_cross / nb_event for key in cross: - cross[key] *= total_cross / nb_event - + cross[key] *= total_cross / nb_event + bannerfile = lhe_parser.EventFile(pjoin(self.me_dir, 'Events', self.run_name, '.banner.tmp.gz'),'w') banner = banner_mod.Banner(lhe.banner) banner.modify_init_cross(cross) @@ -3862,12 +3862,12 @@ def correct_bias(self): os.remove(lhe.name) os.remove(bannerfile.name) os.remove(output.name) - - + + self.results.current['cross'] = total_cross self.results.current['error'] = 0 - - ############################################################################ + + ############################################################################ def do_store_events(self, line): """Advanced commands: Launch store events""" @@ -3883,16 +3883,16 @@ def do_store_events(self, line): if not os.path.exists(pjoin(self.me_dir, 'Events', run)): os.mkdir(pjoin(self.me_dir, 'Events', run)) if not os.path.exists(pjoin(self.me_dir, 'HTML', run)): - os.mkdir(pjoin(self.me_dir, 'HTML', run)) - + os.mkdir(pjoin(self.me_dir, 'HTML', run)) + # 1) Store overall process information #input = pjoin(self.me_dir, 'SubProcesses', 'results.dat') #output = pjoin(self.me_dir, 'SubProcesses', '%s_results.dat' % run) - #files.cp(input, output) + #files.cp(input, output) # 2) Treat the files present in the P directory - # Ensure that the number of events is different of 0 + # Ensure that the number of events is different of 0 if self.results.current['nb_event'] == 0 and not self.run_card['gridpack']: logger.warning("No event detected. No cleaning performed! This should allow to run:\n" + " cd Subprocesses; ../bin/internal/combine_events\n"+ @@ -3910,18 +3910,18 @@ def do_store_events(self, line): # if os.path.exists(pjoin(G_path, 'results.dat')): # input = pjoin(G_path, 'results.dat') # output = pjoin(G_path, '%s_results.dat' % run) - # files.cp(input, output) + # files.cp(input, output) #except Exception: - # continue + # continue # Store log try: if os.path.exists(pjoin(G_path, 'log.txt')): input = pjoin(G_path, 'log.txt') output = pjoin(G_path, '%s_log.txt' % run) - files.mv(input, output) + files.mv(input, output) except Exception: continue - #try: + #try: # # Grid # for name in ['ftn26']: # if os.path.exists(pjoin(G_path, name)): @@ -3930,7 +3930,7 @@ def do_store_events(self, line): # input = pjoin(G_path, name) # output = pjoin(G_path, '%s_%s' % (run,name)) # files.mv(input, output) - # misc.gzip(pjoin(G_path, output), error=None) + # misc.gzip(pjoin(G_path, output), error=None) #except Exception: # continue # Delete ftn25 to ensure reproducible runs @@ -3940,11 +3940,11 @@ def do_store_events(self, line): # 3) Update the index.html self.gen_card_html() - + # 4) Move the Files present in Events directory E_path = pjoin(self.me_dir, 'Events') O_path = pjoin(self.me_dir, 'Events', run) - + # The events file for name in ['events.lhe', 'unweighted_events.lhe']: finput = pjoin(E_path, name) @@ -3960,30 +3960,30 @@ def do_store_events(self, line): # os.remove(pjoin(O_path, '%s.gz' % name)) # input = pjoin(E_path, name) ## output = pjoin(O_path, name) - + self.update_status('End Parton', level='parton', makehtml=False) devnull.close() - - - ############################################################################ + + + ############################################################################ def do_create_gridpack(self, line): """Advanced commands: Create gridpack from present run""" self.update_status('Creating gridpack', level='parton') # compile gen_ximprove misc.compile(['../bin/internal/gen_ximprove'], cwd=pjoin(self.me_dir, "Source")) - + Gdir = self.get_Gdir() Pdir = set([os.path.dirname(G) for G in Gdir]) - for P in Pdir: + for P in Pdir: allG = misc.glob('G*', path=P) for G in allG: if pjoin(P, G) not in Gdir: logger.debug('removing %s', pjoin(P,G)) shutil.rmtree(pjoin(P,G)) - - + + args = self.split_arg(line) self.check_combine_events(args) if not self.run_tag: self.run_tag = 'tag_1' @@ -3996,13 +3996,13 @@ def do_create_gridpack(self, line): cwd=self.me_dir) misc.call(['./bin/internal/clean'], cwd=self.me_dir) misc.call(['./bin/internal/make_gridpack'], cwd=self.me_dir) - files.mv(pjoin(self.me_dir, 'gridpack.tar.gz'), + files.mv(pjoin(self.me_dir, 'gridpack.tar.gz'), pjoin(self.me_dir, '%s_gridpack.tar.gz' % self.run_name)) os.system("sed -i.bak \"s/\s*.true.*=.*GridRun/ .false. = GridRun/g\" %s/Cards/grid_card.dat" \ % self.me_dir) self.update_status('gridpack created', level='gridpack') - - ############################################################################ + + ############################################################################ def do_shower(self, line): """launch the shower""" @@ -4010,7 +4010,7 @@ def do_shower(self, line): if len(args)>1 and args[0] in self._interfaced_showers: chosen_showers = [args.pop(0)] elif '--no_default' in line: - # If '--no_default' was specified in the arguments, then only one + # If '--no_default' was specified in the arguments, then only one # shower will be run, depending on which card is present. # but we each of them are called. (each of them check if the file exists) chosen_showers = list(self._interfaced_showers) @@ -4021,9 +4021,9 @@ def do_shower(self, line): shower_priority = ['pythia8','pythia'] chosen_showers = [sorted(chosen_showers,key=lambda sh: shower_priority.index(sh) if sh in shower_priority else len(shower_priority)+1)[0]] - + for shower in chosen_showers: - self.exec_cmd('%s %s'%(shower,' '.join(args)), + self.exec_cmd('%s %s'%(shower,' '.join(args)), postcmd=False, printcmd=False) def do_madanalysis5_parton(self, line): @@ -4039,11 +4039,11 @@ def do_madanalysis5_parton(self, line): def mg5amc_py8_interface_consistency_warning(options): """ Check the consistency of the mg5amc_py8_interface installed with the current MG5 and Pythia8 versions. """ - + # All this is only relevant is Pythia8 is interfaced to MG5 if not options['pythia8_path']: return None - + if not options['mg5amc_py8_interface_path']: return \ """ @@ -4053,7 +4053,7 @@ def mg5amc_py8_interface_consistency_warning(options): Consider installing the MG5_aMC-PY8 interface with the following command: MG5_aMC>install mg5amc_py8_interface """ - + mg5amc_py8_interface_path = options['mg5amc_py8_interface_path'] py8_path = options['pythia8_path'] # If the specified interface path is relative, make it absolut w.r.t MGDIR if @@ -4062,7 +4062,7 @@ def mg5amc_py8_interface_consistency_warning(options): mg5amc_py8_interface_path = pjoin(MG5DIR,mg5amc_py8_interface_path) py8_path = pjoin(MG5DIR,py8_path) - # Retrieve all the on-install and current versions + # Retrieve all the on-install and current versions fsock = open(pjoin(mg5amc_py8_interface_path, 'MG5AMC_VERSION_ON_INSTALL')) MG5_version_on_install = fsock.read().replace('\n','') fsock.close() @@ -4074,7 +4074,7 @@ def mg5amc_py8_interface_consistency_warning(options): MG5_curr_version =misc.get_pkg_info()['version'] try: p = subprocess.Popen(['./get_pythia8_version.py',py8_path], - stdout=subprocess.PIPE, stderr=subprocess.PIPE, + stdout=subprocess.PIPE, stderr=subprocess.PIPE, cwd=mg5amc_py8_interface_path) (out, err) = p.communicate() out = out.decode(errors='ignore').replace('\n','') @@ -4084,37 +4084,37 @@ def mg5amc_py8_interface_consistency_warning(options): float(out) except: PY8_curr_version = None - + if not MG5_version_on_install is None and not MG5_curr_version is None: if MG5_version_on_install != MG5_curr_version: return \ """ The current version of MG5_aMC (v%s) is different than the one active when - installing the 'mg5amc_py8_interface_path' (which was MG5aMC v%s). + installing the 'mg5amc_py8_interface_path' (which was MG5aMC v%s). Please consider refreshing the installation of this interface with the command: MG5_aMC>install mg5amc_py8_interface """%(MG5_curr_version, MG5_version_on_install) - + if not PY8_version_on_install is None and not PY8_curr_version is None: if PY8_version_on_install != PY8_curr_version: return \ """ The current version of Pythia8 (v%s) is different than the one active when - installing the 'mg5amc_py8_interface' tool (which was Pythia8 v%s). + installing the 'mg5amc_py8_interface' tool (which was Pythia8 v%s). Please consider refreshing the installation of this interface with the command: MG5_aMC>install mg5amc_py8_interface """%(PY8_curr_version,PY8_version_on_install) - + return None def setup_Pythia8RunAndCard(self, PY8_Card, run_type): """ Setup the Pythia8 Run environment and card. In particular all the process and run specific parameters of the card are automatically set here. This function returns the path where HEPMC events will be output, if any.""" - + HepMC_event_output = None tag = self.run_tag - + PY8_Card.subruns[0].systemSet('Beams:LHEF',"unweighted_events.lhe.gz") hepmc_format = PY8_Card['HEPMCoutput:file'].lower() @@ -4185,7 +4185,7 @@ def setup_Pythia8RunAndCard(self, PY8_Card, run_type): misc.mkfifo(fifo_path) # Use defaultSet not to overwrite the current userSet status PY8_Card.defaultSet('HEPMCoutput:file',fifo_path) - HepMC_event_output=fifo_path + HepMC_event_output=fifo_path elif hepmc_format in ['','/dev/null','None']: logger.warning('User disabled the HepMC output of Pythia8.') HepMC_event_output = None @@ -4206,7 +4206,7 @@ def setup_Pythia8RunAndCard(self, PY8_Card, run_type): # only if it is not already user_set. if PY8_Card['JetMatching:qCut']==-1.0: PY8_Card.MadGraphSet('JetMatching:qCut',1.5*self.run_card['xqcut'], force=True) - + if PY8_Card['JetMatching:qCut']<(1.5*self.run_card['xqcut']): logger.error( 'The MLM merging qCut parameter you chose (%f) is less than '%PY8_Card['JetMatching:qCut']+ @@ -4233,7 +4233,7 @@ def setup_Pythia8RunAndCard(self, PY8_Card, run_type): if PY8_Card['JetMatching:qCut'] not in qCutList: qCutList.append(PY8_Card['JetMatching:qCut']) PY8_Card.MadGraphSet('SysCalc:qCutList', qCutList, force=True) - + if PY8_Card['SysCalc:qCutList']!='auto': for scale in PY8_Card['SysCalc:qCutList']: @@ -4244,7 +4244,7 @@ def setup_Pythia8RunAndCard(self, PY8_Card, run_type): "'sys_matchscale' in the run_card) is less than 1.5*xqcut, where xqcut is"+ ' the run_card parameter (=%f)\n'%self.run_card['xqcut']+ 'It would be better/safer to use a larger qCut or a smaller xqcut.') - + # Specific MLM settings # PY8 should not implement the MLM veto since the driver should do it # if merging scale variation is turned on @@ -4294,18 +4294,18 @@ def setup_Pythia8RunAndCard(self, PY8_Card, run_type): CKKW_cut = 'ktdurham' elif self.run_card['ptlund']>0.0 and self.run_card['ktdurham']<=0.0: PY8_Card.subruns[0].MadGraphSet('Merging:doPTLundMerging',True) - CKKW_cut = 'ptlund' + CKKW_cut = 'ptlund' else: raise InvalidCmd("*Either* the 'ptlund' or 'ktdurham' cut in "+\ " the run_card must be turned on to activate CKKW(L) merging"+ " with Pythia8, but *both* cuts cannot be turned on at the same time."+ "\n ptlund=%f, ktdurham=%f."%(self.run_card['ptlund'],self.run_card['ktdurham'])) - + # Automatically set qWeed to the CKKWL cut if not defined by the user. if PY8_Card['SysCalc:qWeed']==-1.0: PY8_Card.MadGraphSet('SysCalc:qWeed',self.run_card[CKKW_cut], force=True) - + # MadGraphSet sets the corresponding value (in system mode) # only if it is not already user_set. if PY8_Card['Merging:TMS']==-1.0: @@ -4319,7 +4319,7 @@ def setup_Pythia8RunAndCard(self, PY8_Card, run_type): 'The CKKWl merging scale you chose (%f) is less than '%PY8_Card['Merging:TMS']+ 'the %s cut specified in the run_card parameter (=%f).\n'%(CKKW_cut,self.run_card[CKKW_cut])+ 'It is incorrect to use a smaller CKKWl scale than the generation-level %s cut!'%CKKW_cut) - + PY8_Card.MadGraphSet('TimeShower:pTmaxMatch',1) PY8_Card.MadGraphSet('SpaceShower:pTmaxMatch',1) PY8_Card.MadGraphSet('SpaceShower:rapidityOrder',False) @@ -4381,7 +4381,7 @@ def do_pythia8(self, line): try: import madgraph - except ImportError: + except ImportError: import internal.histograms as histograms else: import madgraph.various.histograms as histograms @@ -4400,16 +4400,16 @@ def do_pythia8(self, line): self.check_pythia8(args) self.configure_directory(html_opening =False) else: - # initialize / remove lhapdf mode + # initialize / remove lhapdf mode self.configure_directory(html_opening =False) - self.check_pythia8(args) + self.check_pythia8(args) # Update the banner with the pythia card if not self.banner or len(self.banner) <=1: # Here the level keyword 'pythia' must not be changed to 'pythia8'. self.banner = banner_mod.recover_banner(self.results, 'pythia') - # the args are modify and the last arg is always the mode + # the args are modify and the last arg is always the mode if not no_default: self.ask_pythia_run_configuration(args[-1], pythia_version=8, banner=self.banner) @@ -4425,7 +4425,7 @@ def do_pythia8(self, line): #"Please use 'event_norm = average' in the run_card to avoid this problem.") - + if not self.options['mg5amc_py8_interface_path'] or not \ os.path.exists(pjoin(self.options['mg5amc_py8_interface_path'], 'MG5aMC_PY8_interface')): @@ -4444,16 +4444,16 @@ def do_pythia8(self, line): # Again here 'pythia' is just a keyword for the simulation level. self.update_status('\033[92mRunning Pythia8 [arXiv:1410.3012]\033[0m', 'pythia8') - - tag = self.run_tag + + tag = self.run_tag # Now write Pythia8 card # Start by reading, starting from the default one so that the 'user_set' # tag are correctly set. - PY8_Card = banner_mod.PY8Card(pjoin(self.me_dir, 'Cards', + PY8_Card = banner_mod.PY8Card(pjoin(self.me_dir, 'Cards', 'pythia8_card_default.dat')) PY8_Card.read(pjoin(self.me_dir, 'Cards', 'pythia8_card.dat'), setter='user') - + run_type = 'default' merged_run_types = ['MLM','CKKW'] if int(self.run_card['ickkw'])==1: @@ -4471,7 +4471,7 @@ def do_pythia8(self, line): cmd_card = StringIO.StringIO() PY8_Card.write(cmd_card,pjoin(self.me_dir,'Cards','pythia8_card_default.dat'), direct_pythia_input=True) - + # Now setup the preamble to make sure that everything will use the locally # installed tools (if present) even if the user did not add it to its # environment variables. @@ -4486,13 +4486,13 @@ def do_pythia8(self, line): preamble = misc.get_HEPTools_location_setter( pjoin(MG5DIR,'HEPTools'),'lib') preamble += "\n unset PYTHIA8DATA\n" - + open(pythia_cmd_card,'w').write("""! ! It is possible to run this card manually with: ! %s %s ! """%(preamble+pythia_main,os.path.basename(pythia_cmd_card))+cmd_card.getvalue()) - + # launch pythia8 pythia_log = pjoin(self.me_dir , 'Events', self.run_name , '%s_pythia8.log' % tag) @@ -4504,13 +4504,13 @@ def do_pythia8(self, line): shell_exe = None if os.path.exists('/usr/bin/env'): shell_exe = '/usr/bin/env %s'%shell - else: + else: shell_exe = misc.which(shell) if not shell_exe: raise self.InvalidCmd('No s hell could be found in your environment.\n'+ "Make sure that either '%s' is in your path or that the"%shell+\ " command '/usr/bin/env %s' exists and returns a valid path."%shell) - + exe_cmd = "#!%s\n%s"%(shell_exe,' '.join( [preamble+pythia_main, os.path.basename(pythia_cmd_card)])) @@ -4528,7 +4528,7 @@ def do_pythia8(self, line): ( os.path.exists(HepMC_event_output) and \ stat.S_ISFIFO(os.stat(HepMC_event_output).st_mode)) startPY8timer = time.time() - + # Information that will be extracted from this PY8 run PY8_extracted_information={ 'sigma_m':None, 'Nacc':None, 'Ntry':None, 'cross_sections':{} } @@ -4556,7 +4556,7 @@ def do_pythia8(self, line): n_cores = max(int(self.options['cluster_size']),1) elif self.options['run_mode']==2: n_cores = max(int(self.cluster.nb_core),1) - + lhe_file_name = os.path.basename(PY8_Card.subruns[0]['Beams:LHEF']) lhe_file = lhe_parser.EventFile(pjoin(self.me_dir,'Events', self.run_name,PY8_Card.subruns[0]['Beams:LHEF'])) @@ -4574,7 +4574,7 @@ def do_pythia8(self, line): if self.options['run_mode']==2: min_n_events_per_job = 100 elif self.options['run_mode']==1: - min_n_events_per_job = 1000 + min_n_events_per_job = 1000 min_n_core = n_events//min_n_events_per_job n_cores = max(min(min_n_core,n_cores),1) @@ -4584,8 +4584,8 @@ def do_pythia8(self, line): logger.info('Follow Pythia8 shower by running the '+ 'following command (in a separate terminal):\n tail -f %s'%pythia_log) - if self.options['run_mode']==2 and self.options['nb_core']>1: - ret_code = self.cluster.launch_and_wait(wrapper_path, + if self.options['run_mode']==2 and self.options['nb_core']>1: + ret_code = self.cluster.launch_and_wait(wrapper_path, argument= [], stdout= pythia_log, stderr=subprocess.STDOUT, cwd=pjoin(self.me_dir,'Events',self.run_name)) else: @@ -4630,10 +4630,10 @@ def do_pythia8(self, line): wrapper = open(wrapper_path,'w') if self.options['cluster_temp_path'] is None: exe_cmd = \ -"""#!%s +"""#!%s ./%s PY8Card.dat >& PY8_log.txt """ - else: + else: exe_cmd = \ """#!%s ln -s ./events_$1.lhe.gz ./events.lhe.gz @@ -4663,21 +4663,21 @@ def do_pythia8(self, line): # Set it as executable st = os.stat(wrapper_path) os.chmod(wrapper_path, st.st_mode | stat.S_IEXEC) - + # Split the .lhe event file, create event partition partition=[n_available_events//n_cores]*n_cores for i in range(n_available_events%n_cores): partition[i] += 1 - + # Splitting according to the total number of events requested by the user # Will be used to determine the number of events to indicate in the PY8 split cards. partition_for_PY8=[n_events//n_cores]*n_cores for i in range(n_events%n_cores): partition_for_PY8[i] += 1 - - logger.info('Splitting .lhe event file for PY8 parallelization...') - n_splits = lhe_file.split(partition=partition, cwd=parallelization_dir, zip=True) - + + logger.info('Splitting .lhe event file for PY8 parallelization...') + n_splits = lhe_file.split(partition=partition, cwd=parallelization_dir, zip=True) + if n_splits!=len(partition): raise MadGraph5Error('Error during lhe file splitting. Expected %d files but obtained %d.' %(len(partition),n_splits)) @@ -4690,7 +4690,7 @@ def do_pythia8(self, line): # Add the necessary run content shutil.move(pjoin(parallelization_dir,lhe_file.name+'_%d.lhe.gz'%split_id), pjoin(parallelization_dir,split_files[-1])) - + logger.info('Submitting Pythia8 jobs...') for i, split_file in enumerate(split_files): # We must write a PY8Card tailored for each split so as to correct the normalization @@ -4706,7 +4706,7 @@ def do_pythia8(self, line): split_PY8_Card.write(pjoin(parallelization_dir,'PY8Card_%d.dat'%i), pjoin(parallelization_dir,'PY8Card.dat'), add_missing=False) in_files = [pjoin(parallelization_dir,os.path.basename(pythia_main)), - pjoin(parallelization_dir,'PY8Card_%d.dat'%i), + pjoin(parallelization_dir,'PY8Card_%d.dat'%i), pjoin(parallelization_dir,split_file)] if self.options['cluster_temp_path'] is None: out_files = [] @@ -4718,35 +4718,35 @@ def do_pythia8(self, line): if os.path.basename(in_file)==split_file: ln(in_file,selected_cwd,name='events.lhe.gz') elif os.path.basename(in_file).startswith('PY8Card'): - ln(in_file,selected_cwd,name='PY8Card.dat') + ln(in_file,selected_cwd,name='PY8Card.dat') else: - ln(in_file,selected_cwd) + ln(in_file,selected_cwd) in_files = [] wrapper_path = os.path.basename(wrapper_path) else: out_files = ['split_%d.tar.gz'%i] selected_cwd = parallelization_dir - self.cluster.submit2(wrapper_path, - argument=[str(i)], cwd=selected_cwd, + self.cluster.submit2(wrapper_path, + argument=[str(i)], cwd=selected_cwd, input_files=in_files, output_files=out_files, required_output=out_files) - + def wait_monitoring(Idle, Running, Done): if Idle+Running+Done == 0: return logger.info('Pythia8 shower jobs: %d Idle, %d Running, %d Done [%s]'\ %(Idle, Running, Done, misc.format_time(time.time() - startPY8timer))) self.cluster.wait(parallelization_dir,wait_monitoring) - + logger.info('Merging results from the split PY8 runs...') if self.options['cluster_temp_path']: # Decompressing the output for i, split_file in enumerate(split_files): misc.call(['tar','-xzf','split_%d.tar.gz'%i],cwd=parallelization_dir) os.remove(pjoin(parallelization_dir,'split_%d.tar.gz'%i)) - + # Now merge logs pythia_log_file = open(pythia_log,'w') n_added = 0 @@ -4778,7 +4778,7 @@ def wait_monitoring(Idle, Running, Done): if n_added>0: PY8_extracted_information['sigma_m'] /= float(n_added) pythia_log_file.close() - + # djr plots djr_HwU = None n_added = 0 @@ -4845,7 +4845,7 @@ def wait_monitoring(Idle, Running, Done): if not os.path.isfile(hepmc_file): continue all_hepmc_files.append(hepmc_file) - + if len(all_hepmc_files)>0: hepmc_output = pjoin(self.me_dir,'Events',self.run_name,HepMC_event_output) with misc.TMP_directory() as tmp_dir: @@ -4860,8 +4860,8 @@ def wait_monitoring(Idle, Running, Done): break header.close() tail = open(pjoin(tmp_dir,'tail.hepmc'),'w') - n_tail = 0 - + n_tail = 0 + for line in misc.reverse_readline(all_hepmc_files[-1]): if line.startswith('HepMC::'): n_tail += 1 @@ -4871,7 +4871,7 @@ def wait_monitoring(Idle, Running, Done): tail.close() if n_tail>1: raise MadGraph5Error('HEPMC files should only have one trailing command.') - ###################################################################### + ###################################################################### # This is the most efficient way of putting together HEPMC's, *BUT* # # WARNING: NEED TO RENDER THE CODE BELOW SAFE TOWARDS INJECTION # ###################################################################### @@ -4888,12 +4888,12 @@ def wait_monitoring(Idle, Running, Done): elif sys.platform == 'darwin': # sed on MAC has slightly different synthax than on os.system(' '.join(['sed','-i',"''","'%s;$d'"% - (';'.join('%id'%(i+1) for i in range(n_head))),hepmc_file])) - else: - # other UNIX systems + (';'.join('%id'%(i+1) for i in range(n_head))),hepmc_file])) + else: + # other UNIX systems os.system(' '.join(['sed','-i']+["-e '%id'"%(i+1) for i in range(n_head)]+ ["-e '$d'",hepmc_file])) - + os.system(' '.join(['cat',pjoin(tmp_dir,'header.hepmc')]+all_hepmc_files+ [pjoin(tmp_dir,'tail.hepmc'),'>',hepmc_output])) @@ -4915,12 +4915,12 @@ def wait_monitoring(Idle, Running, Done): 'Inclusive cross section:' not in '\n'.join(open(pythia_log,'r').readlines()[-20:]): logger.warning('Fail to produce a pythia8 output. More info in \n %s'%pythia_log) return - + # Plot for Pythia8 successful = self.create_plot('Pythia8') if not successful: logger.warning('Failed to produce Pythia8 merging plots.') - + self.to_store.append('pythia8') # Study matched cross-sections @@ -4931,7 +4931,7 @@ def wait_monitoring(Idle, Running, Done): if self.options['run_mode']==0 or (self.options['run_mode']==2 and self.options['nb_core']==1): PY8_extracted_information['sigma_m'],PY8_extracted_information['Nacc'],\ PY8_extracted_information['Ntry'] = self.parse_PY8_log_file( - pjoin(self.me_dir,'Events', self.run_name,'%s_pythia8.log' % tag)) + pjoin(self.me_dir,'Events', self.run_name,'%s_pythia8.log' % tag)) else: logger.warning('Pythia8 cross-section could not be retreived.\n'+ 'Try turning parallelization off by setting the option nb_core to 1. YYYYY') @@ -4944,8 +4944,8 @@ def wait_monitoring(Idle, Running, Done): Ntry = PY8_extracted_information['Ntry'] sigma_m = PY8_extracted_information['sigma_m'] # Compute pythia error - error = self.results[self.run_name].return_tag(self.run_tag)['error'] - try: + error = self.results[self.run_name].return_tag(self.run_tag)['error'] + try: error_m = math.sqrt((error * Nacc/Ntry)**2 + sigma_m**2 *(1-Nacc/Ntry)/Nacc) except ZeroDivisionError: # Cannot compute error @@ -4966,31 +4966,31 @@ def wait_monitoring(Idle, Running, Done): else: logger.warning('Pythia8 merged cross-sections could not be retreived.\n'+ 'Try turning parallelization off by setting the option nb_core to 1.XXXXX') - PY8_extracted_information['cross_sections'] = {} - + PY8_extracted_information['cross_sections'] = {} + cross_sections = PY8_extracted_information['cross_sections'] if cross_sections: - # Filter the cross_sections specified an keep only the ones + # Filter the cross_sections specified an keep only the ones # with central parameters and a different merging scale a_float_re = '[\+|-]?\d+(\.\d*)?([EeDd][\+|-]?\d+)?' central_merging_re = re.compile( '^\s*Weight_MERGING\s*=\s*(?P%s)\s*$'%a_float_re, - re.IGNORECASE) + re.IGNORECASE) cross_sections = dict( (float(central_merging_re.match(xsec).group('merging')),value) - for xsec, value in cross_sections.items() if not + for xsec, value in cross_sections.items() if not central_merging_re.match(xsec) is None) central_scale = PY8_Card['JetMatching:qCut'] if \ int(self.run_card['ickkw'])==1 else PY8_Card['Merging:TMS'] if central_scale in cross_sections: self.results.add_detail('cross_pythia8', cross_sections[central_scale][0]) self.results.add_detail('error_pythia8', cross_sections[central_scale][1]) - + #logger.info('Pythia8 merged cross-sections are:') #for scale in sorted(cross_sections.keys()): # logger.info(' > Merging scale = %-6.4g : %-11.5g +/- %-7.2g [pb]'%\ - # (scale,cross_sections[scale][0],cross_sections[scale][1])) - + # (scale,cross_sections[scale][0],cross_sections[scale][1])) + xsecs_file = open(pjoin(self.me_dir,'Events',self.run_name, '%s_merged_xsecs.txt'%tag),'w') if cross_sections: @@ -5003,9 +5003,9 @@ def wait_monitoring(Idle, Running, Done): xsecs_file.write('Cross-sections could not be read from the'+\ "XML node 'xsection' of the .dat file produced by Pythia8.") xsecs_file.close() - + #Update the banner - # We add directly the pythia command card because it has the full + # We add directly the pythia command card because it has the full # information self.banner.add(pythia_cmd_card) @@ -5022,13 +5022,13 @@ def wait_monitoring(Idle, Running, Done): if self.options['delphes_path']: self.exec_cmd('delphes --no_default', postcmd=False, printcmd=False) self.print_results_in_shell(self.results.current) - + def parse_PY8_log_file(self, log_file_path): """ Parse a log file to extract number of event and cross-section. """ pythiare = re.compile("Les Houches User Process\(es\)\s*\d+\s*\|\s*(?P\d+)\s*(?P\d+)\s*(?P\d+)\s*\|\s*(?P[\d\.e\-\+]+)\s*(?P[\d\.e\-\+]+)") pythia_xsec_re = re.compile("Inclusive cross section\s*:\s*(?P[\d\.e\-\+]+)\s*(?P[\d\.e\-\+]+)") sigma_m, Nacc, Ntry = None, None, None - for line in misc.BackRead(log_file_path): + for line in misc.BackRead(log_file_path): info = pythiare.search(line) if not info: # Also try to obtain the cross-section and error from the final xsec line of pythia8 log @@ -5058,7 +5058,7 @@ def parse_PY8_log_file(self, log_file_path): raise self.InvalidCmd("Could not find cross-section and event number information "+\ "in Pythia8 log\n '%s'."%log_file_path) - + def extract_cross_sections_from_DJR(self,djr_output): """Extract cross-sections from a djr XML output.""" import xml.dom.minidom as minidom @@ -5075,11 +5075,11 @@ def extract_cross_sections_from_DJR(self,djr_output): [float(xsec.childNodes[0].data.split()[0]), float(xsec.childNodes[0].data.split()[1])]) for xsec in xsections) - + def do_pythia(self, line): """launch pythia""" - - + + # Check argument's validity args = self.split_arg(line) if '--no_default' in args: @@ -5089,12 +5089,12 @@ def do_pythia(self, line): args.remove('--no_default') else: no_default = False - + if not self.run_name: self.check_pythia(args) self.configure_directory(html_opening =False) else: - # initialize / remove lhapdf mode + # initialize / remove lhapdf mode self.configure_directory(html_opening =False) self.check_pythia(args) @@ -5102,7 +5102,7 @@ def do_pythia(self, line): logger.error('pythia-pgs require event_norm to be on sum. Do not run pythia6') return - # the args are modify and the last arg is always the mode + # the args are modify and the last arg is always the mode if not no_default: self.ask_pythia_run_configuration(args[-1]) if self.options['automatic_html_opening']: @@ -5114,35 +5114,35 @@ def do_pythia(self, line): self.banner = banner_mod.recover_banner(self.results, 'pythia') pythia_src = pjoin(self.options['pythia-pgs_path'],'src') - + self.results.add_detail('run_mode', 'madevent') self.update_status('Running Pythia', 'pythia') try: os.remove(pjoin(self.me_dir,'Events','pythia.done')) except Exception: - pass - + pass + ## LAUNCHING PYTHIA # check that LHAPATH is define. if not re.search(r'^\s*LHAPATH=%s/PDFsets' % pythia_src, - open(pjoin(self.me_dir,'Cards','pythia_card.dat')).read(), + open(pjoin(self.me_dir,'Cards','pythia_card.dat')).read(), re.M): f = open(pjoin(self.me_dir,'Cards','pythia_card.dat'),'a') f.write('\n LHAPATH=%s/PDFsets' % pythia_src) f.close() tag = self.run_tag pythia_log = pjoin(self.me_dir, 'Events', self.run_name , '%s_pythia.log' % tag) - #self.cluster.launch_and_wait('../bin/internal/run_pythia', + #self.cluster.launch_and_wait('../bin/internal/run_pythia', # argument= [pythia_src], stdout= pythia_log, # stderr=subprocess.STDOUT, # cwd=pjoin(self.me_dir,'Events')) output_files = ['pythia_events.hep'] if self.run_card['use_syst']: output_files.append('syst.dat') - if self.run_card['ickkw'] == 1: + if self.run_card['ickkw'] == 1: output_files += ['beforeveto.tree', 'xsecs.tree', 'events.tree'] - + os.environ['PDG_MASS_TBL'] = pjoin(pythia_src,'mass_width_2004.mc') self.cluster.launch_and_wait(pjoin(pythia_src, 'pythia'), input_files=[pjoin(self.me_dir, "Events", "unweighted_events.lhe"), @@ -5152,23 +5152,23 @@ def do_pythia(self, line): stdout= pythia_log, stderr=subprocess.STDOUT, cwd=pjoin(self.me_dir,'Events')) - + os.remove(pjoin(self.me_dir, "Events", "unweighted_events.lhe")) if not os.path.exists(pjoin(self.me_dir,'Events','pythia_events.hep')): logger.warning('Fail to produce pythia output. More info in \n %s' % pythia_log) return - + self.to_store.append('pythia') - + # Find the matched cross-section if int(self.run_card['ickkw']): # read the line from the bottom of the file - #pythia_log = misc.BackRead(pjoin(self.me_dir,'Events', self.run_name, + #pythia_log = misc.BackRead(pjoin(self.me_dir,'Events', self.run_name, # '%s_pythia.log' % tag)) - pythiare = re.compile("\s*I\s+0 All included subprocesses\s+I\s+(?P\d+)\s+(?P\d+)\s+I\s+(?P[\d\.D\-+]+)\s+I") - for line in misc.reverse_readline(pjoin(self.me_dir,'Events', self.run_name, + pythiare = re.compile("\s*I\s+0 All included subprocesses\s+I\s+(?P\d+)\s+(?P\d+)\s+I\s+(?P[\d\.D\-+]+)\s+I") + for line in misc.reverse_readline(pjoin(self.me_dir,'Events', self.run_name, '%s_pythia.log' % tag)): info = pythiare.search(line) if not info: @@ -5188,16 +5188,16 @@ def do_pythia(self, line): self.results.add_detail('nb_event_pythia', Nacc) #compute pythia error error = self.results[self.run_name].return_tag(self.run_tag)['error'] - if Nacc: + if Nacc: error_m = math.sqrt((error * Nacc/Ntry)**2 + sigma_m**2 *(1-Nacc/Ntry)/Nacc) else: error_m = 10000 * sigma_m # works both for fixed number of generated events and fixed accepted events self.results.add_detail('error_pythia', error_m) - break + break #pythia_log.close() - + pydir = pjoin(self.options['pythia-pgs_path'], 'src') eradir = self.options['exrootanalysis_path'] madir = self.options['madanalysis_path'] @@ -5216,12 +5216,12 @@ def do_pythia(self, line): # Creating LHE file self.run_hep2lhe(banner_path) - + if int(self.run_card['ickkw']): misc.gzip(pjoin(self.me_dir,'Events','beforeveto.tree'), - stdout=pjoin(self.me_dir,'Events',self.run_name, tag+'_pythia_beforeveto.tree.gz')) + stdout=pjoin(self.me_dir,'Events',self.run_name, tag+'_pythia_beforeveto.tree.gz')) + - if self.run_card['use_syst'] in self.true: # Calculate syscalc info based on syst.dat try: @@ -5233,7 +5233,7 @@ def do_pythia(self, line): # Store syst.dat misc.gzip(pjoin(self.me_dir,'Events', 'syst.dat'), stdout=pjoin(self.me_dir,'Events',self.run_name, tag + '_pythia_syst.dat.gz')) - + # Store syscalc.dat if os.path.exists(pjoin(self.me_dir, 'Events', 'syscalc.dat')): filename = pjoin(self.me_dir, 'Events' ,self.run_name, @@ -5253,7 +5253,7 @@ def do_pythia(self, line): if self.options['delphes_path']: self.exec_cmd('delphes --no_default', postcmd=False, printcmd=False) self.print_results_in_shell(self.results.current) - + ################################################################################ def do_remove(self, line): @@ -5263,8 +5263,8 @@ def do_remove(self, line): run, tag, mode = self.check_remove(args) if 'banner' in mode: mode.append('all') - - + + if run == 'all': # Check first if they are not a run with a name run. if os.path.exists(pjoin(self.me_dir, 'Events', 'all')): @@ -5280,7 +5280,7 @@ def do_remove(self, line): logger.info(error) pass # run already clear return - + # Check that run exists if not os.path.exists(pjoin(self.me_dir, 'Events', run)): raise self.InvalidCmd('No run \'%s\' detected' % run) @@ -5294,7 +5294,7 @@ def do_remove(self, line): # Found the file to delete - + to_delete = misc.glob('*', pjoin(self.me_dir, 'Events', run)) to_delete += misc.glob('*', pjoin(self.me_dir, 'HTML', run)) # forbid the banner to be removed @@ -5314,7 +5314,7 @@ def do_remove(self, line): if os.path.exists(pjoin(self.me_dir, 'Events', run, 'unweighted_events.lhe.gz')): to_delete.append('unweighted_events.lhe.gz') if os.path.exists(pjoin(self.me_dir, 'HTML', run,'plots_parton.html')): - to_delete.append(pjoin(self.me_dir, 'HTML', run,'plots_parton.html')) + to_delete.append(pjoin(self.me_dir, 'HTML', run,'plots_parton.html')) if nb_rm != len(to_delete): logger.warning('Be carefull that partonic information are on the point to be removed.') if 'all' in mode: @@ -5327,8 +5327,8 @@ def do_remove(self, line): if 'delphes' not in mode: to_delete = [f for f in to_delete if 'delphes' not in f] if 'parton' not in mode: - to_delete = [f for f in to_delete if 'delphes' in f - or 'pgs' in f + to_delete = [f for f in to_delete if 'delphes' in f + or 'pgs' in f or 'pythia' in f] if not self.force and len(to_delete): question = 'Do you want to delete the following files?\n %s' % \ @@ -5336,7 +5336,7 @@ def do_remove(self, line): ans = self.ask(question, 'y', choices=['y','n']) else: ans = 'y' - + if ans == 'y': for file2rm in to_delete: if os.path.exists(pjoin(self.me_dir, 'Events', run, file2rm)): @@ -5374,7 +5374,7 @@ def do_remove(self, line): if ans == 'y': for file2rm in to_delete: os.remove(file2rm) - + if 'banner' in mode: to_delete = misc.glob('*', pjoin(self.me_dir, 'Events', run)) if tag: @@ -5389,8 +5389,8 @@ def do_remove(self, line): return elif any(['banner' not in os.path.basename(p) for p in to_delete]): if to_delete: - raise MadGraph5Error('''Some output still exists for this run. - Please remove those output first. Do for example: + raise MadGraph5Error('''Some output still exists for this run. + Please remove those output first. Do for example: remove %s all banner ''' % run) else: @@ -5400,7 +5400,7 @@ def do_remove(self, line): return else: logger.info('''The banner is not removed. In order to remove it run: - remove %s all banner %s''' % (run, tag and '--tag=%s ' % tag or '')) + remove %s all banner %s''' % (run, tag and '--tag=%s ' % tag or '')) # update database. self.results.clean(mode, run, tag) @@ -5420,7 +5420,7 @@ def do_plot(self, line): logger.info('plot for run %s' % self.run_name) if not self.force: self.ask_edit_cards(['plot_card.dat'], args, plot=True) - + if any([arg in ['all','parton'] for arg in args]): filename = pjoin(self.me_dir, 'Events', self.run_name, 'unweighted_events.lhe') if os.path.exists(filename+'.gz'): @@ -5438,8 +5438,8 @@ def do_plot(self, line): except Exception: pass else: - logger.info('No valid files for partonic plot') - + logger.info('No valid files for partonic plot') + if any([arg in ['all','pythia'] for arg in args]): filename = pjoin(self.me_dir, 'Events' ,self.run_name, '%s_pythia_events.lhe' % self.run_tag) @@ -5452,10 +5452,10 @@ def do_plot(self, line): stdout= "%s.gz" % filename) else: logger.info('No valid files for pythia plot') - - + + if any([arg in ['all','pgs'] for arg in args]): - filename = pjoin(self.me_dir, 'Events', self.run_name, + filename = pjoin(self.me_dir, 'Events', self.run_name, '%s_pgs_events.lhco' % self.run_tag) if os.path.exists(filename+'.gz'): misc.gunzip("%s.gz" % filename) @@ -5464,15 +5464,15 @@ def do_plot(self, line): misc.gzip(filename) else: logger.info('No valid files for pgs plot') - + if any([arg in ['all','delphes'] for arg in args]): - filename = pjoin(self.me_dir, 'Events', self.run_name, + filename = pjoin(self.me_dir, 'Events', self.run_name, '%s_delphes_events.lhco' % self.run_tag) if os.path.exists(filename+'.gz'): misc.gunzip("%s.gz" % filename) if os.path.exists(filename): self.create_plot('Delphes') - misc.gzip(filename) + misc.gzip(filename) else: logger.info('No valid files for delphes plot') @@ -5488,9 +5488,9 @@ def do_syscalc(self, line): if self.ninitial == 1: logger.error('SysCalc can\'t be run for decay processes') return - + logger.info('Calculating systematics for run %s' % self.run_name) - + self.ask_edit_cards(['run_card.dat'], args, plot=False) self.run_card = banner_mod.RunCard(pjoin(self.me_dir, 'Cards', 'run_card.dat')) if any([arg in ['all','parton'] for arg in args]): @@ -5504,7 +5504,7 @@ def do_syscalc(self, line): stdout="%s.gz" % filename) else: logger.info('No valid files for parton level systematics run.') - + if any([arg in ['all','pythia'] for arg in args]): filename = pjoin(self.me_dir, 'Events' ,self.run_name, '%s_pythia_syst.dat' % self.run_tag) @@ -5525,17 +5525,17 @@ def do_syscalc(self, line): else: logger.info('No valid files for pythia level') - + def store_result(self): - """ tar the pythia results. This is done when we are quite sure that + """ tar the pythia results. This is done when we are quite sure that the pythia output will not be use anymore """ if not self.run_name: return - + if not self.to_store: - return - + return + tag = self.run_card['run_tag'] self.update_status('storing files of previous run', level=None,\ error=True) @@ -5546,14 +5546,14 @@ def store_result(self): misc.gzip(pjoin(self.me_dir,'Events',self.run_name,"unweighted_events.lhe")) if os.path.exists(pjoin(self.me_dir,'Events','reweight.lhe')): os.remove(pjoin(self.me_dir,'Events', 'reweight.lhe')) - + if 'pythia' in self.to_store: self.update_status('Storing Pythia files of previous run', level='pythia', error=True) p = pjoin(self.me_dir,'Events') n = self.run_name t = tag self.to_store.remove('pythia') - misc.gzip(pjoin(p,'pythia_events.hep'), + misc.gzip(pjoin(p,'pythia_events.hep'), stdout=pjoin(p, str(n),'%s_pythia_events.hep' % t),forceexternal=True) if 'pythia8' in self.to_store: @@ -5581,26 +5581,26 @@ def store_result(self): os.system("mv " + file_path + hepmc_fileformat + " " + move_hepmc_path) self.update_status('Done', level='pythia',makehtml=False,error=True) - self.results.save() - + self.results.save() + self.to_store = [] - def launch_job(self,exe, cwd=None, stdout=None, argument = [], remaining=0, + def launch_job(self,exe, cwd=None, stdout=None, argument = [], remaining=0, run_type='', mode=None, **opt): """ """ argument = [str(arg) for arg in argument] if mode is None: mode = self.cluster_mode - + # ensure that exe is executable if os.path.exists(exe) and not os.access(exe, os.X_OK): os.system('chmod +x %s ' % exe) elif (cwd and os.path.exists(pjoin(cwd, exe))) and not \ os.access(pjoin(cwd, exe), os.X_OK): os.system('chmod +x %s ' % pjoin(cwd, exe)) - + if mode == 0: - self.update_status((remaining, 1, + self.update_status((remaining, 1, self.total_jobs - remaining -1, run_type), level=None, force=False) start = time.time() #os.system('cd %s; ./%s' % (cwd,exe)) @@ -5613,24 +5613,24 @@ def launch_job(self,exe, cwd=None, stdout=None, argument = [], remaining=0, elif mode in [1,2]: exename = os.path.basename(exe) # For condor cluster, create the input/output files - if 'ajob' in exename: + if 'ajob' in exename: input_files = ['madevent','input_app.txt','symfact.dat','iproc.dat','dname.mg', pjoin(self.me_dir, 'SubProcesses','randinit')] - if os.path.exists(pjoin(self.me_dir,'SubProcesses', + if os.path.exists(pjoin(self.me_dir,'SubProcesses', 'MadLoop5_resources.tar.gz')) and cluster.need_transfer(self.options): input_files.append(pjoin(self.me_dir,'SubProcesses', 'MadLoop5_resources.tar.gz')) - + output_files = [] required_output = [] - + #Find the correct PDF input file input_files.append(self.get_pdf_input_filename()) - + #Find the correct ajob Gre = re.compile("\s*j=(G[\d\.\w]+)") origre = re.compile("grid_directory=(G[\d\.\w]+)") - try : + try : fsock = open(exe) except Exception: fsock = open(pjoin(cwd,exe)) @@ -5648,21 +5648,21 @@ def launch_job(self,exe, cwd=None, stdout=None, argument = [], remaining=0, if os.path.isdir(pjoin(cwd,G)): input_files.append(G) required_output.append('%s/results.dat' % G) - + if origre.search(text): G_grid = origre.search(text).groups()[0] input_files.append(pjoin(G_grid, 'ftn26')) - + #submitting - self.cluster.submit2(exe, stdout=stdout, cwd=cwd, + self.cluster.submit2(exe, stdout=stdout, cwd=cwd, input_files=input_files, output_files=output_files, required_output=required_output) elif 'survey' in exename: input_files = ['madevent','input_app.txt','symfact.dat','iproc.dat', 'dname.mg', - pjoin(self.me_dir, 'SubProcesses','randinit')] - if os.path.exists(pjoin(self.me_dir,'SubProcesses', + pjoin(self.me_dir, 'SubProcesses','randinit')] + if os.path.exists(pjoin(self.me_dir,'SubProcesses', 'MadLoop5_resources.tar.gz')) and cluster.need_transfer(self.options): - input_files.append(pjoin(self.me_dir,'SubProcesses', + input_files.append(pjoin(self.me_dir,'SubProcesses', 'MadLoop5_resources.tar.gz')) #Find the correct PDF input file @@ -5671,7 +5671,7 @@ def launch_job(self,exe, cwd=None, stdout=None, argument = [], remaining=0, output_files = [] required_output = [] - + #Find the correct ajob suffix = "_%s" % int(float(argument[0])) if suffix == '_0': @@ -5685,12 +5685,12 @@ def launch_job(self,exe, cwd=None, stdout=None, argument = [], remaining=0, if '.' in argument[0]: offset = int(str(argument[0]).split('.')[1]) else: - offset = 0 - + offset = 0 + if offset ==0 or offset == int(float(argument[0])): if os.path.exists(pjoin(cwd, G, 'input_app.txt')): os.remove(pjoin(cwd, G, 'input_app.txt')) - + if os.path.exists(os.path.realpath(pjoin(cwd, G, 'ftn25'))): if offset == 0 or offset == int(float(argument[0])): os.remove(pjoin(cwd, G, 'ftn25')) @@ -5706,16 +5706,16 @@ def launch_job(self,exe, cwd=None, stdout=None, argument = [], remaining=0, pass #submitting - self.cluster.cluster_submit(exe, stdout=stdout, cwd=cwd, argument=argument, + self.cluster.cluster_submit(exe, stdout=stdout, cwd=cwd, argument=argument, input_files=input_files, output_files=output_files, required_output=required_output, **opt) elif "refine_splitted.sh" in exename: input_files = ['madevent','symfact.dat','iproc.dat', 'dname.mg', - pjoin(self.me_dir, 'SubProcesses','randinit')] - + pjoin(self.me_dir, 'SubProcesses','randinit')] + if os.path.exists(pjoin(self.me_dir,'SubProcesses', 'MadLoop5_resources.tar.gz')) and cluster.need_transfer(self.options): - input_files.append(pjoin(self.me_dir,'SubProcesses', + input_files.append(pjoin(self.me_dir,'SubProcesses', 'MadLoop5_resources.tar.gz')) #Find the correct PDF input file @@ -5725,25 +5725,25 @@ def launch_job(self,exe, cwd=None, stdout=None, argument = [], remaining=0, output_files = [argument[0]] required_output = [] for G in output_files: - required_output.append('%s/results.dat' % G) + required_output.append('%s/results.dat' % G) input_files.append(pjoin(argument[1], "input_app.txt")) input_files.append(pjoin(argument[1], "ftn26")) - + #submitting - self.cluster.cluster_submit(exe, stdout=stdout, cwd=cwd, argument=argument, + self.cluster.cluster_submit(exe, stdout=stdout, cwd=cwd, argument=argument, input_files=input_files, output_files=output_files, - required_output=required_output, **opt) + required_output=required_output, **opt) + + - - else: self.cluster.submit(exe, argument=argument, stdout=stdout, cwd=cwd, **opt) - + ############################################################################ def find_madevent_mode(self): """Find if Madevent is in Group mode or not""" - + # The strategy is too look in the files Source/run_configs.inc # if we found: ChanPerJob=3 then it's a group mode. file_path = pjoin(self.me_dir, 'Source', 'run_config.inc') @@ -5752,11 +5752,11 @@ def find_madevent_mode(self): return 'group' else: return 'v4' - + ############################################################################ def monitor(self, run_type='monitor', mode=None, html=False): """ monitor the progress of running job """ - + starttime = time.time() if mode is None: @@ -5772,8 +5772,8 @@ def monitor(self, run_type='monitor', mode=None, html=False): else: update_status = lambda idle, run, finish: None update_first = None - try: - self.cluster.wait(self.me_dir, update_status, update_first=update_first) + try: + self.cluster.wait(self.me_dir, update_status, update_first=update_first) except Exception as error: logger.info(error) if not self.force: @@ -5788,24 +5788,24 @@ def monitor(self, run_type='monitor', mode=None, html=False): raise except KeyboardInterrupt as error: self.cluster.remove() - raise - - + raise + - ############################################################################ + + ############################################################################ def configure_directory(self, html_opening=True): - """ All action require before any type of run """ + """ All action require before any type of run """ # Basic check assert os.path.exists(pjoin(self.me_dir,'SubProcesses')) # environmental variables to be included in make_opts self.make_opts_var = {} - + #see when the last file was modified time_mod = max([os.path.getmtime(pjoin(self.me_dir,'Cards','run_card.dat')), os.path.getmtime(pjoin(self.me_dir,'Cards','param_card.dat'))]) - + if self.configured >= time_mod and hasattr(self, 'random') and hasattr(self, 'run_card'): #just ensure that cluster specific are correctly handled if self.cluster: @@ -5820,7 +5820,7 @@ def configure_directory(self, html_opening=True): #open only once the web page # Change current working directory self.launching_dir = os.getcwd() - + # Check if we need the MSSM special treatment model = self.find_model_name() if model == 'mssm' or model.startswith('mssm-'): @@ -5828,14 +5828,14 @@ def configure_directory(self, html_opening=True): mg5_param = pjoin(self.me_dir, 'Source', 'MODEL', 'MG5_param.dat') check_param_card.convert_to_mg5card(param_card, mg5_param) check_param_card.check_valid_param_card(mg5_param) - + # limit the number of event to 100k self.check_nb_events() # this is in order to avoid conflicts between runs with and without # lhapdf. not needed anymore the makefile handles it automaticallu #misc.compile(['clean4pdf'], cwd = pjoin(self.me_dir, 'Source')) - + self.make_opts_var['pdlabel1'] = '' self.make_opts_var['pdlabel2'] = '' if self.run_card['pdlabel1'] in ['eva', 'iww']: @@ -5866,7 +5866,7 @@ def configure_directory(self, html_opening=True): self.copy_lep_densities(self.run_card['pdlabel'], pjoin(self.me_dir, 'Source')) self.make_opts_var['pdlabel1'] = 'ee' self.make_opts_var['pdlabel2'] = 'ee' - + # set random number if self.run_card['iseed'] != 0: self.random = int(self.run_card['iseed']) @@ -5885,18 +5885,18 @@ def configure_directory(self, html_opening=True): break else: self.random = random.randint(1, 30107) - + #set random seed for python part of the code if self.run_card['python_seed'] == -2: #-2 means same as run_card import random if not hasattr(random, 'mg_seedset'): - random.seed(self.run_card['python_seed']) - random.mg_seedset = self.run_card['python_seed'] + random.seed(self.run_card['python_seed']) + random.mg_seedset = self.run_card['python_seed'] elif self.run_card['python_seed'] >= 0: import random if not hasattr(random, 'mg_seedset'): - random.seed(self.run_card['python_seed']) - random.mg_seedset = self.run_card['python_seed'] + random.seed(self.run_card['python_seed']) + random.mg_seedset = self.run_card['python_seed'] if self.run_card['ickkw'] == 2: logger.info('Running with CKKW matching') self.treat_ckkw_matching() @@ -5905,12 +5905,12 @@ def configure_directory(self, html_opening=True): self.update_make_opts(self.run_card) # reset list of Gdirectory self.Gdirs = None - + # create param_card.inc and run_card.inc self.do_treatcards('') - + logger.info("compile Source Directory") - + # Compile for name in [ 'all']:#, '../bin/internal/combine_events']: self.compile(arg=[name], cwd=os.path.join(self.me_dir, 'Source')) @@ -5933,7 +5933,7 @@ def configure_directory(self, html_opening=True): os.remove(pjoin(self.me_dir, 'lib','libbias.a')) force_subproc_clean = True - + # Finally compile the bias module as well if self.run_card['bias_module'] not in ['dummy',None]: logger.debug("Compiling the bias module '%s'"%bias_name) @@ -5945,7 +5945,7 @@ def configure_directory(self, html_opening=True): 'INVALID' in str(bias_module_valid).upper(): raise InvalidCmd("The bias module '%s' cannot be used because of:\n%s"% (bias_name,bias_module_valid)) - + self.compile(arg=[], cwd=os.path.join(self.me_dir, 'Source','BIAS',bias_name)) self.proc_characteristics['bias_module']=bias_name # Update the proc_characterstics file @@ -5954,7 +5954,7 @@ def configure_directory(self, html_opening=True): if force_subproc_clean: # Make sure that madevent will be recompiled - subproc = [l.strip() for l in open(pjoin(self.me_dir,'SubProcesses', + subproc = [l.strip() for l in open(pjoin(self.me_dir,'SubProcesses', 'subproc.mg'))] for nb_proc,subdir in enumerate(subproc): Pdir = pjoin(self.me_dir, 'SubProcesses',subdir.strip()) @@ -5971,20 +5971,20 @@ def configure_directory(self, html_opening=True): ############################################################################ @staticmethod def check_dir(path, default=''): - """check if the directory exists. if so return the path otherwise the + """check if the directory exists. if so return the path otherwise the default""" - + if os.path.isdir(path): return path else: return default - + ############################################################################ def get_Gdir(self, Pdir=None, symfact=None): """get the list of Gdirectory if not yet saved.""" - + if hasattr(self, "Gdirs") and self.Gdirs: if self.me_dir in self.Gdirs[0]: if Pdir is None: @@ -6000,8 +6000,8 @@ def get_Gdir(self, Pdir=None, symfact=None): Pdirs = self.get_Pdir() - Gdirs = {self.me_dir:[]} - mfactors = {} + Gdirs = {self.me_dir:[]} + mfactors = {} for P in Pdirs: Gdirs[P] = [] #for the next line do not use P, since in readonly mode it might not have symfact @@ -6012,7 +6012,7 @@ def get_Gdir(self, Pdir=None, symfact=None): mfactors[pjoin(P, "G%s" % tag)] = mfactor self.Gdirs = (Gdirs, mfactors) return self.get_Gdir(Pdir, symfact=symfact) - + ############################################################################ def set_run_name(self, name, tag=None, level='parton', reload_card=False, allow_new_tag=True): @@ -6030,8 +6030,8 @@ def get_last_tag(self, level): tagRun = self.results[self.run_name][i] if tagRun.pythia or tagRun.shower or tagRun.pythia8 : return tagRun['tag'] - - + + # when are we force to change the tag new_run:previous run requiring changes upgrade_tag = {'parton': ['parton','pythia','pgs','delphes','madanalysis5_hadron','madanalysis5_parton', 'rivet'], 'pythia': ['pythia','pgs','delphes','madanalysis5_hadron'], @@ -6044,7 +6044,7 @@ def get_last_tag(self, level): 'syscalc':[], 'rivet':['rivet']} - if name == self.run_name: + if name == self.run_name: if reload_card: run_card = pjoin(self.me_dir, 'Cards','run_card.dat') self.run_card = banner_mod.RunCard(run_card) @@ -6064,13 +6064,13 @@ def get_last_tag(self, level): break return get_last_tag(self, level) - + # save/clean previous run if self.run_name: self.store_result() # store new name self.run_name = name - + new_tag = False # First call for this run -> set the banner self.banner = banner_mod.recover_banner(self.results, level, name) @@ -6079,8 +6079,8 @@ def get_last_tag(self, level): else: # Read run_card run_card = pjoin(self.me_dir, 'Cards','run_card.dat') - self.run_card = banner_mod.RunCard(run_card) - + self.run_card = banner_mod.RunCard(run_card) + if tag: self.run_card['run_tag'] = tag new_tag = True @@ -6093,7 +6093,7 @@ def get_last_tag(self, level): self.results.update('add run %s' % name, 'all', makehtml=False) else: for tag in upgrade_tag[level]: - + if getattr(self.results[self.run_name][-1], tag): # LEVEL is already define in the last tag -> need to switch tag tag = self.get_available_tag() @@ -6103,8 +6103,8 @@ def get_last_tag(self, level): if not new_tag: # We can add the results to the current run tag = self.results[self.run_name][-1]['tag'] - self.run_card['run_tag'] = tag # ensure that run_tag is correct - + self.run_card['run_tag'] = tag # ensure that run_tag is correct + if allow_new_tag and (name in self.results and not new_tag): self.results.def_current(self.run_name) else: @@ -6113,15 +6113,15 @@ def get_last_tag(self, level): self.run_tag = self.run_card['run_tag'] return get_last_tag(self, level) - - - + + + ############################################################################ def check_nb_events(self): - """Find the number of event in the run_card, and check that this is not + """Find the number of event in the run_card, and check that this is not too large""" - + nb_event = int(self.run_card['nevents']) if nb_event > 1000000: logger.warning("Attempting to generate more than 1M events") @@ -6133,20 +6133,20 @@ def check_nb_events(self): return - - ############################################################################ + + ############################################################################ def update_random(self): """ change random number""" - + self.random += 3 if self.random > 30081*30081: # can't use too big random number raise MadGraph5Error('Random seed too large ' + str(self.random) + ' > 30081*30081') - if self.run_card['python_seed'] == -2: + if self.run_card['python_seed'] == -2: import random if not hasattr(random, 'mg_seedset'): - random.seed(self.random) + random.seed(self.random) random.mg_seedset = self.random - + ############################################################################ def save_random(self): """save random number in appropirate file""" @@ -6155,14 +6155,14 @@ def save_random(self): fsock.writelines('r=%s\n' % self.random) def do_quit(self, *args, **opts): - + return common_run.CommonRunCmd.do_quit(self, *args, **opts) #return CmdExtended.do_quit(self, *args, **opts) - + ############################################################################ def treat_CKKW_matching(self): """check for ckkw""" - + lpp1 = self.run_card['lpp1'] lpp2 = self.run_card['lpp2'] e1 = self.run_card['ebeam1'] @@ -6170,19 +6170,19 @@ def treat_CKKW_matching(self): pd = self.run_card['pdlabel'] lha = self.run_card['lhaid'] xq = self.run_card['xqcut'] - translation = {'e1': e1, 'e2':e2, 'pd':pd, + translation = {'e1': e1, 'e2':e2, 'pd':pd, 'lha':lha, 'xq':xq} if lpp1 or lpp2: - # Remove ':s from pd + # Remove ':s from pd if pd.startswith("'"): pd = pd[1:] if pd.endswith("'"): - pd = pd[:-1] + pd = pd[:-1] if xq >2 or xq ==2: xq = 2 - + # find data file if pd == "lhapdf": issudfile = 'lib/issudgrid-%(e1)s-%(e2)s-%(pd)s-%(lha)s-%(xq)s.dat.gz' @@ -6192,9 +6192,9 @@ def treat_CKKW_matching(self): issudfile = pjoin(self.webbin, issudfile % translation) else: issudfile = pjoin(self.me_dir, issudfile % translation) - + logger.info('Sudakov grid file: %s' % issudfile) - + # check that filepath exists if os.path.exists(issudfile): path = pjoin(self.me_dir, 'lib', 'issudgrid.dat') @@ -6203,20 +6203,20 @@ def treat_CKKW_matching(self): msg = 'No sudakov grid file for parameter choice. Start to generate it. This might take a while' logger.info(msg) self.update_status('GENERATE SUDAKOV GRID', level='parton') - + for i in range(-2,6): - self.cluster.submit('%s/gensudgrid ' % self.dirbin, + self.cluster.submit('%s/gensudgrid ' % self.dirbin, argument = ['%d'%i], - cwd=self.me_dir, + cwd=self.me_dir, stdout=open(pjoin(self.me_dir, 'gensudgrid%s.log' % i),'w')) self.monitor() for i in range(-2,6): path = pjoin(self.me_dir, 'lib', 'issudgrid.dat') os.system('cat %s/gensudgrid%s.log >> %s' % (self.me_dir, path)) misc.gzip(path, stdout=issudfile) - + ############################################################################ - def create_root_file(self, input='unweighted_events.lhe', + def create_root_file(self, input='unweighted_events.lhe', output='unweighted_events.root' ): """create the LHE root file """ self.update_status('Creating root files', level='parton') @@ -6233,14 +6233,14 @@ def create_root_file(self, input='unweighted_events.lhe', totar = False torm = True input = input[:-3] - + try: - misc.call(['%s/ExRootLHEFConverter' % eradir, + misc.call(['%s/ExRootLHEFConverter' % eradir, input, output], cwd=pjoin(self.me_dir, 'Events')) except Exception: logger.warning('fail to produce Root output [problem with ExRootAnalysis]') - + if totar: if os.path.exists('%s.gz' % input): try: @@ -6251,13 +6251,13 @@ def create_root_file(self, input='unweighted_events.lhe', misc.gzip(input) if torm: os.remove(input) - + def run_syscalc(self, mode='parton', event_path=None, output=None): - """create the syscalc output""" + """create the syscalc output""" if self.run_card['use_syst'] not in self.true: return - + scdir = self.options['syscalc_path'] if not scdir or not os.path.exists(scdir): return @@ -6265,12 +6265,12 @@ def run_syscalc(self, mode='parton', event_path=None, output=None): if self.run_card['event_norm'] != 'sum': logger.critical('SysCalc works only when event_norm is on \'sum\'.') return - logger.info('running SysCalc on mode %s' % mode) - + logger.info('running SysCalc on mode %s' % mode) + # Restore the old default for SysCalc+PY6 if self.run_card['sys_matchscale']=='auto': self.run_card['sys_matchscale'] = "30 50" - + # Check that all pdfset are correctly installed lhaid = [self.run_card.get_lhapdf_id()] if '&&' in self.run_card['sys_pdf']: @@ -6285,20 +6285,20 @@ def run_syscalc(self, mode='parton', event_path=None, output=None): logger.debug(str(error)) logger.warning('Systematic computation requires lhapdf to run. Bypass SysCalc') return - + # Copy all the relevant PDF sets [self.copy_lhapdf_set([onelha], pdfsets_dir) for onelha in lhaid] - + to_syscalc={'sys_scalefact': self.run_card['sys_scalefact'], 'sys_alpsfact': self.run_card['sys_alpsfact'], 'sys_matchscale': self.run_card['sys_matchscale'], 'sys_scalecorrelation': self.run_card['sys_scalecorrelation'], 'sys_pdf': self.run_card['sys_pdf']} - - tag = self.run_card['run_tag'] + + tag = self.run_card['run_tag'] card = pjoin(self.me_dir, 'bin','internal', 'syscalc_card.dat') template = open(pjoin(self.me_dir, 'bin','internal', 'syscalc_template.dat')).read() - + if '&&' in to_syscalc['sys_pdf']: to_syscalc['sys_pdf'] = to_syscalc['sys_pdf'].split('#',1)[0].replace('&&',' \n ') else: @@ -6311,8 +6311,8 @@ def run_syscalc(self, mode='parton', event_path=None, output=None): new.append(d) else: new[-1] += ' %s' % d - to_syscalc['sys_pdf'] = '\n'.join(new) - + to_syscalc['sys_pdf'] = '\n'.join(new) + if to_syscalc['sys_pdf'].lower() in ['', 'f', 'false', 'none', '.false.']: to_syscalc['sys_pdf'] = '' if to_syscalc['sys_alpsfact'].lower() in ['', 'f', 'false', 'none','.false.']: @@ -6320,17 +6320,17 @@ def run_syscalc(self, mode='parton', event_path=None, output=None): - + # check if the scalecorrelation parameter is define: if not 'sys_scalecorrelation' in self.run_card: self.run_card['sys_scalecorrelation'] = -1 open(card,'w').write(template % self.run_card) - + if not os.path.exists(card): return False - - + + event_dir = pjoin(self.me_dir, 'Events') if not event_path: @@ -6353,19 +6353,19 @@ def run_syscalc(self, mode='parton', event_path=None, output=None): raise SysCalcError('qcut value for sys_matchscale lower than qcut in pythia_card. Bypass syscalc') if float(value) < xqcut: raise SysCalcError('qcut value for sys_matchscale lower than xqcut in run_card. Bypass syscalc') - - + + event_path = pjoin(event_dir,'syst.dat') output = pjoin(event_dir, 'syscalc.dat') else: raise self.InvalidCmd('Invalid mode %s' % mode) - + if not os.path.exists(event_path): if os.path.exists(event_path+'.gz'): misc.gunzip(event_path+'.gz') else: raise SysCalcError('Events file %s does not exits' % event_path) - + self.update_status('Calculating systematics for %s level' % mode, level = mode.lower()) try: proc = misc.call([os.path.join(scdir, 'sys_calc'), @@ -6374,7 +6374,7 @@ def run_syscalc(self, mode='parton', event_path=None, output=None): stderr = subprocess.STDOUT, cwd=event_dir) # Wait 5 s to make sure file is finished writing - time.sleep(5) + time.sleep(5) except OSError as error: logger.error('fail to run syscalc: %s. Please check that SysCalc is correctly installed.' % error) else: @@ -6382,11 +6382,11 @@ def run_syscalc(self, mode='parton', event_path=None, output=None): logger.warning('SysCalc Failed. Please read the associate log to see the reason. Did you install the associate PDF set?') elif mode == 'parton': files.mv(output, event_path) - + self.update_status('End syscalc for %s level' % mode, level = mode.lower(), makehtml=False) - - return True + + return True action_switcher = AskRun @@ -6399,23 +6399,23 @@ def ask_run_configuration(self, mode=None, args=[]): passing_cmd.append('reweight=ON') if '-M' in args or '--madspin' in args: passing_cmd.append('madspin=ON') - + switch, cmd_switch = self.ask('', '0', [], ask_class = self.action_switcher, mode=mode, line_args=args, force=self.force, first_cmd=passing_cmd, return_instance=True) # - self.switch = switch # store the value of the switch for plugin purpose + self.switch = switch # store the value of the switch for plugin purpose if 'dynamical' in switch: mode = 'auto' - + # Now that we know in which mode we are check that all the card #exists (copy default if needed) - + cards = ['param_card.dat', 'run_card.dat'] if switch['shower'] == 'Pythia6': cards.append('pythia_card.dat') if switch['shower'] == 'Pythia8': - cards.append('pythia8_card.dat') + cards.append('pythia8_card.dat') if switch['detector'] in ['PGS','DELPHES+PGS']: cards.append('pgs_card.dat') if switch['detector'] in ['Delphes', 'DELPHES+PGS']: @@ -6438,29 +6438,29 @@ def ask_run_configuration(self, mode=None, args=[]): cards.append('rivet_card.dat') self.keep_cards(cards) - + first_cmd = cmd_switch.get_cardcmd() - + if os.path.isfile(pjoin(self.me_dir,'Cards','MadLoopParams.dat')): cards.append('MadLoopParams.dat') - + if self.force: self.check_param_card(pjoin(self.me_dir,'Cards','param_card.dat' )) return switch - + if 'dynamical' in switch and switch['dynamical']: self.ask_edit_cards(cards, plot=False, mode='auto', first_cmd=first_cmd) else: self.ask_edit_cards(cards, plot=False, first_cmd=first_cmd) return switch - + ############################################################################ def ask_pythia_run_configuration(self, mode=None, pythia_version=6, banner=None): """Ask the question when launching pythia""" - + pythia_suffix = '' if pythia_version==6 else '%d'%pythia_version - + available_mode = ['0', '1'] if pythia_version==6: available_mode.append('2') @@ -6485,10 +6485,10 @@ def ask_pythia_run_configuration(self, mode=None, pythia_version=6, banner=None) mode = self.ask(question, '0', options) elif not mode: mode = 'auto' - + if mode.isdigit(): mode = name[mode] - + auto = False if mode == 'auto': auto = True @@ -6497,7 +6497,7 @@ def ask_pythia_run_configuration(self, mode=None, pythia_version=6, banner=None) mode = 'pgs' elif os.path.exists(pjoin(self.me_dir, 'Cards', 'delphes_card.dat')): mode = 'delphes' - else: + else: mode = 'pythia%s'%pythia_suffix logger.info('Will run in mode %s' % mode) # Now that we know in which mode we are check that all the card @@ -6513,15 +6513,15 @@ def ask_pythia_run_configuration(self, mode=None, pythia_version=6, banner=None) cards.append('delphes_trigger.dat') self.keep_cards(cards, ignore=['madanalysis5_parton_card.dat','madanalysis5_hadron_card.dat', 'plot_card.dat']) - + if self.force: return mode - + if not banner: banner = self.banner - + if auto: - self.ask_edit_cards(cards, from_banner=['param', 'run'], + self.ask_edit_cards(cards, from_banner=['param', 'run'], mode='auto', plot=(pythia_version==6), banner=banner ) else: @@ -6529,12 +6529,12 @@ def ask_pythia_run_configuration(self, mode=None, pythia_version=6, banner=None) plot=(pythia_version==6), banner=banner) return mode - + #=============================================================================== # MadEventCmd #=============================================================================== class MadEventCmdShell(MadEventCmd, cmd.CmdShell): - """The command line processor of MadGraph""" + """The command line processor of MadGraph""" @@ -6548,11 +6548,11 @@ class SubProcesses(object): @classmethod def clean(cls): cls.name_to_pdg = {} - + @staticmethod def get_subP(me_dir): """return the list of Subprocesses""" - + out = [] for line in open(pjoin(me_dir,'SubProcesses', 'subproc.mg')): if not line: @@ -6560,9 +6560,9 @@ def get_subP(me_dir): name = line.strip() if os.path.exists(pjoin(me_dir, 'SubProcesses', name)): out.append(pjoin(me_dir, 'SubProcesses', name)) - + return out - + @staticmethod @@ -6623,9 +6623,9 @@ def get_subP_ids(path): particles = re.search("/([\d,-]+)/", line) all_ids.append([int(p) for p in particles.group(1).split(',')]) return all_ids - - -#=============================================================================== + + +#=============================================================================== class GridPackCmd(MadEventCmd): """The command for the gridpack --Those are not suppose to be use interactively--""" @@ -6639,7 +6639,7 @@ def __init__(self, me_dir = None, nb_event=0, seed=0, gran=-1, *completekey, **s self.random = seed self.random_orig = self.random self.granularity = gran - + self.options['automatic_html_opening'] = False #write the grid_card.dat on disk self.nb_event = int(nb_event) @@ -6680,7 +6680,7 @@ def write_RunWeb(self, me_dir): def write_gridcard(self, nb_event, seed, gran): """write the grid_card.dat file at appropriate location""" - + # first try to write grid_card within the gridpack. print("WRITE GRIDCARD", self.me_dir) if self.readonly: @@ -6689,35 +6689,35 @@ def write_gridcard(self, nb_event, seed, gran): fsock = open('grid_card.dat','w') else: fsock = open(pjoin(self.me_dir, 'Cards', 'grid_card.dat'),'w') - + gridpackcard = banner_mod.GridpackCard() gridpackcard['GridRun'] = True gridpackcard['gevents'] = nb_event gridpackcard['gseed'] = seed gridpackcard['ngran'] = gran - + gridpackcard.write(fsock) ############################################################################ def get_Pdir(self): """get the list of Pdirectory if not yet saved.""" - + if hasattr(self, "Pdirs"): if self.me_dir in self.Pdirs[0]: return self.Pdirs - + if not self.readonly: - self.Pdirs = [pjoin(self.me_dir, 'SubProcesses', l.strip()) + self.Pdirs = [pjoin(self.me_dir, 'SubProcesses', l.strip()) for l in open(pjoin(self.me_dir,'SubProcesses', 'subproc.mg'))] else: - self.Pdirs = [l.strip() - for l in open(pjoin(self.me_dir,'SubProcesses', 'subproc.mg'))] - + self.Pdirs = [l.strip() + for l in open(pjoin(self.me_dir,'SubProcesses', 'subproc.mg'))] + return self.Pdirs - + def prepare_local_dir(self): """create the P directory structure in the local directory""" - + if not self.readonly: os.chdir(self.me_dir) else: @@ -6726,7 +6726,7 @@ def prepare_local_dir(self): os.mkdir(p) files.cp(pjoin(self.me_dir,'SubProcesses',p,'symfact.dat'), pjoin(p, 'symfact.dat')) - + def launch(self, nb_event, seed): """ launch the generation for the grid """ @@ -6742,13 +6742,13 @@ def launch(self, nb_event, seed): if self.run_card['python_seed'] == -2: import random if not hasattr(random, 'mg_seedset'): - random.seed(seed) + random.seed(seed) random.mg_seedset = seed elif self.run_card['python_seed'] > 0: import random if not hasattr(random, 'mg_seedset'): - random.seed(self.run_card['python_seed']) - random.mg_seedset = self.run_card['python_seed'] + random.seed(self.run_card['python_seed']) + random.mg_seedset = self.run_card['python_seed'] # 2) Run the refine for the grid self.update_status('Generating Events', level=None) #misc.call([pjoin(self.me_dir,'bin','refine4grid'), @@ -6767,70 +6767,70 @@ def launch(self, nb_event, seed): self.exec_cmd('decay_events -from_cards', postcmd=False) elif self.run_card['use_syst'] and self.run_card['systematics_program'] == 'systematics': self.options['nb_core'] = 1 - self.exec_cmd('systematics %s --from_card' % + self.exec_cmd('systematics %s --from_card' % pjoin('Events', self.run_name, 'unweighted_events.lhe.gz'), postcmd=False,printcmd=False) - + def refine4grid(self, nb_event): """Special refine for gridpack run.""" self.nb_refine += 1 - + precision = nb_event self.opts = dict([(key,value[1]) for (key,value) in \ self._survey_options.items()]) - + # initialize / remove lhapdf mode # self.configure_directory() # All this has been done before self.cluster_mode = 0 # force single machine # Store seed in randinit file, to be read by ranmar.f self.save_random() - + self.update_status('Refine results to %s' % precision, level=None) logger.info("Using random number seed offset = %s" % self.random) refine_opt = {'err_goal': nb_event, 'split_channels': False, - 'ngran':self.granularity, 'readonly': self.readonly} + 'ngran':self.granularity, 'readonly': self.readonly} x_improve = gen_ximprove.gen_ximprove_gridpack(self, refine_opt) x_improve.launch() # create the ajob for the refinment and run those! - self.gscalefact = x_improve.gscalefact #store jacobian associate to the gridpack - - + self.gscalefact = x_improve.gscalefact #store jacobian associate to the gridpack + + #bindir = pjoin(os.path.relpath(self.dirbin, pjoin(self.me_dir,'SubProcesses'))) #print 'run combine!!!' #combine_runs.CombineRuns(self.me_dir) - + return #update html output Presults = sum_html.collect_result(self) cross, error = Presults.xsec, Presults.xerru self.results.add_detail('cross', cross) self.results.add_detail('error', error) - - + + #self.update_status('finish refine', 'parton', makehtml=False) #devnull.close() - - - + + + return self.total_jobs = 0 - subproc = [P for P in os.listdir(pjoin(self.me_dir,'SubProcesses')) if + subproc = [P for P in os.listdir(pjoin(self.me_dir,'SubProcesses')) if P.startswith('P') and os.path.isdir(pjoin(self.me_dir,'SubProcesses', P))] devnull = open(os.devnull, 'w') for nb_proc,subdir in enumerate(subproc): subdir = subdir.strip() Pdir = pjoin(self.me_dir, 'SubProcesses',subdir) bindir = pjoin(os.path.relpath(self.dirbin, Pdir)) - + logger.info(' %s ' % subdir) # clean previous run for match in misc.glob('*ajob*', Pdir): if os.path.basename(match)[:4] in ['ajob', 'wait', 'run.', 'done']: os.remove(pjoin(Pdir, match)) - + logfile = pjoin(Pdir, 'gen_ximprove.log') misc.call([pjoin(bindir, 'gen_ximprove')], @@ -6840,40 +6840,40 @@ def refine4grid(self, nb_event): if os.path.exists(pjoin(Pdir, 'ajob1')): alljobs = misc.glob('ajob*', Pdir) - nb_tot = len(alljobs) + nb_tot = len(alljobs) self.total_jobs += nb_tot for i, job in enumerate(alljobs): job = os.path.basename(job) - self.launch_job('%s' % job, cwd=Pdir, remaining=(nb_tot-i-1), + self.launch_job('%s' % job, cwd=Pdir, remaining=(nb_tot-i-1), run_type='Refine number %s on %s (%s/%s)' % (self.nb_refine, subdir, nb_proc+1, len(subproc))) if os.path.exists(pjoin(self.me_dir,'error')): self.monitor(html=True) raise MadEventError('Error detected in dir %s: %s' % \ (Pdir, open(pjoin(self.me_dir,'error')).read())) - self.monitor(run_type='All job submitted for refine number %s' % + self.monitor(run_type='All job submitted for refine number %s' % self.nb_refine) - + self.update_status("Combining runs", level='parton') try: os.remove(pjoin(Pdir, 'combine_runs.log')) except Exception: pass - + bindir = pjoin(os.path.relpath(self.dirbin, pjoin(self.me_dir,'SubProcesses'))) combine_runs.CombineRuns(self.me_dir) - + #update html output cross, error = self.make_make_all_html_results() self.results.add_detail('cross', cross) self.results.add_detail('error', error) - - + + self.update_status('finish refine', 'parton', makehtml=False) devnull.close() def do_combine_events(self, line): - """Advanced commands: Launch combine events""" + """Advanced commands: Launch combine events""" if self.readonly: outdir = 'Events' @@ -6895,17 +6895,17 @@ def do_combine_events(self, line): self.banner.add_generation_info(self.results.current['cross'], self.run_card['nevents']) if not hasattr(self, 'random_orig'): self.random_orig = 0 self.banner.change_seed(self.random_orig) - - + + if not os.path.exists(pjoin(outdir, self.run_name)): os.mkdir(pjoin(outdir, self.run_name)) - self.banner.write(pjoin(outdir, self.run_name, + self.banner.write(pjoin(outdir, self.run_name, '%s_%s_banner.txt' % (self.run_name, tag))) - - get_wgt = lambda event: event.wgt + + get_wgt = lambda event: event.wgt AllEvent = lhe_parser.MultiEventFile() AllEvent.banner = self.banner - + partials = 0 # if too many file make some partial unweighting sum_xsec, sum_xerru, sum_axsec = 0,[],0 Gdirs = self.get_Gdir() @@ -6915,7 +6915,7 @@ def do_combine_events(self, line): if os.path.exists(pjoin(Gdir, 'events.lhe')): result = sum_html.OneResult('') result.read_results(pjoin(Gdir, 'results.dat')) - AllEvent.add(pjoin(Gdir, 'events.lhe'), + AllEvent.add(pjoin(Gdir, 'events.lhe'), result.get('xsec')*gscalefact[Gdir], result.get('xerru')*gscalefact[Gdir], result.get('axsec')*gscalefact[Gdir] @@ -6924,7 +6924,7 @@ def do_combine_events(self, line): sum_xsec += result.get('xsec')*gscalefact[Gdir] sum_xerru.append(result.get('xerru')*gscalefact[Gdir]) sum_axsec += result.get('axsec')*gscalefact[Gdir] - + if len(AllEvent) >= 80: #perform a partial unweighting AllEvent.unweight(pjoin(outdir, self.run_name, "partials%s.lhe.gz" % partials), get_wgt, log_level=5, trunc_error=1e-2, event_target=self.nb_event) @@ -6933,26 +6933,26 @@ def do_combine_events(self, line): AllEvent.add(pjoin(outdir, self.run_name, "partials%s.lhe.gz" % partials), sum_xsec, math.sqrt(sum(x**2 for x in sum_xerru)), - sum_axsec) + sum_axsec) partials +=1 - + if not hasattr(self,'proc_characteristic'): self.proc_characteristic = self.get_characteristics() - + self.banner.add_generation_info(sum_xsec, self.nb_event) nb_event = AllEvent.unweight(pjoin(outdir, self.run_name, "unweighted_events.lhe.gz"), get_wgt, trunc_error=1e-2, event_target=self.nb_event, log_level=logging.DEBUG, normalization=self.run_card['event_norm'], proc_charac=self.proc_characteristic) - - + + if partials: for i in range(partials): try: os.remove(pjoin(outdir, self.run_name, "partials%s.lhe.gz" % i)) except Exception: os.remove(pjoin(outdir, self.run_name, "partials%s.lhe" % i)) - + self.results.add_detail('nb_event', nb_event) self.banner.add_generation_info(sum_xsec, nb_event) if self.run_card['bias_module'].lower() not in ['dummy', 'none']: @@ -6961,7 +6961,7 @@ def do_combine_events(self, line): class MadLoopInitializer(object): """ A container class for the various methods for initializing MadLoop. It is - placed in MadEventInterface because it is used by Madevent for loop-induced + placed in MadEventInterface because it is used by Madevent for loop-induced simulations. """ @staticmethod @@ -6974,7 +6974,7 @@ def make_and_run(dir_name,checkRam=False): if os.path.isfile(pjoin(dir_name,'check')): os.remove(pjoin(dir_name,'check')) os.remove(pjoin(dir_name,'check_sa.o')) - os.remove(pjoin(dir_name,'loop_matrix.o')) + os.remove(pjoin(dir_name,'loop_matrix.o')) # Now run make devnull = open(os.devnull, 'w') start=time.time() @@ -6996,7 +6996,7 @@ def make_and_run(dir_name,checkRam=False): stdout=devnull, stderr=devnull, close_fds=True) try: ptimer.execute() - #poll as often as possible; otherwise the subprocess might + #poll as often as possible; otherwise the subprocess might # "sneak" in some extra memory usage while you aren't looking # Accuracy of .2 seconds is enough for the timing. while ptimer.poll(): @@ -7028,7 +7028,7 @@ def fix_PSPoint_in_check(dir_path, read_ps = True, npoints = 1, If mu_r > 0.0, then the renormalization constant value will be hardcoded directly in check_sa.f, if is is 0 it will be set to Sqrt(s) and if it is < 0.0 the value in the param_card.dat is used. - If the split_orders target (i.e. the target squared coupling orders for + If the split_orders target (i.e. the target squared coupling orders for the computation) is != -1, it will be changed in check_sa.f via the subroutine CALL SET_COUPLINGORDERS_TARGET(split_orders).""" @@ -7043,12 +7043,12 @@ def fix_PSPoint_in_check(dir_path, read_ps = True, npoints = 1, file_path = pjoin(directories[0],'check_sa.f') if not os.path.isfile(file_path): raise MadGraph5Error('Could not find the location of check_sa.f'+\ - ' from the specified path %s.'%str(file_path)) + ' from the specified path %s.'%str(file_path)) file = open(file_path, 'r') check_sa = file.read() file.close() - + file = open(file_path, 'w') check_sa = re.sub(r"READPS = \S+\)","READPS = %s)"%('.TRUE.' if read_ps \ else '.FALSE.'), check_sa) @@ -7064,42 +7064,42 @@ def fix_PSPoint_in_check(dir_path, read_ps = True, npoints = 1, (("%.17e"%mu_r).replace('e','d')),check_sa) elif mu_r < 0.0: check_sa = re.sub(r"MU_R=SQRTS","",check_sa) - + if split_orders > 0: check_sa = re.sub(r"SET_COUPLINGORDERS_TARGET\(-?\d+\)", - "SET_COUPLINGORDERS_TARGET(%d)"%split_orders,check_sa) - + "SET_COUPLINGORDERS_TARGET(%d)"%split_orders,check_sa) + file.write(check_sa) file.close() - @staticmethod + @staticmethod def run_initialization(run_dir=None, SubProc_dir=None, infos=None,\ req_files = ['HelFilter.dat','LoopFilter.dat'], attempts = [4,15]): - """ Run the initialization of the process in 'run_dir' with success + """ Run the initialization of the process in 'run_dir' with success characterized by the creation of the files req_files in this directory. The directory containing the driving source code 'check_sa.f'. - The list attempt gives the successive number of PS points the + The list attempt gives the successive number of PS points the initialization should be tried with before calling it failed. Returns the number of PS points which were necessary for the init. Notice at least run_dir or SubProc_dir must be provided. A negative attempt number given in input means that quadprec will be forced for initialization.""" - + # If the user does not want detailed info, then set the dictionary # to a dummy one. if infos is None: infos={} - + if SubProc_dir is None and run_dir is None: raise MadGraph5Error('At least one of [SubProc_dir,run_dir] must'+\ ' be provided in run_initialization.') - + # If the user does not specify where is check_sa.f, then it is assumed # to be one levels above run_dir if SubProc_dir is None: SubProc_dir = os.path.abspath(pjoin(run_dir,os.pardir)) - + if run_dir is None: directories =[ dir for dir in misc.glob('P[0-9]*', SubProc_dir) if os.path.isdir(dir) ] @@ -7109,7 +7109,7 @@ def run_initialization(run_dir=None, SubProc_dir=None, infos=None,\ raise MadGraph5Error('Could not find a valid running directory'+\ ' in %s.'%str(SubProc_dir)) - # Use the presence of the file born_matrix.f to decide if it is a + # Use the presence of the file born_matrix.f to decide if it is a # loop-induced process or not. It's not crucial, but just that because # of the dynamic adjustment of the ref scale used for deciding what are # the zero contributions, more points are neeeded for loop-induced. @@ -7128,9 +7128,9 @@ def run_initialization(run_dir=None, SubProc_dir=None, infos=None,\ raise MadGraph5Error('Could not find MadLoopParams.dat at %s.'\ %MLCardPath) else: - MLCard = banner_mod.MadLoopParam(MLCardPath) + MLCard = banner_mod.MadLoopParam(MLCardPath) MLCard_orig = banner_mod.MadLoopParam(MLCard) - + # Make sure that LoopFilter really is needed. if not MLCard['UseLoopFilter']: try: @@ -7153,11 +7153,11 @@ def need_init(): proc_prefix+fname)) for fname in my_req_files]) or \ not os.path.isfile(pjoin(run_dir,'check')) or \ not os.access(pjoin(run_dir,'check'), os.X_OK) - + # Check if this is a process without born by checking the presence of the # file born_matrix.f is_loop_induced = os.path.exists(pjoin(run_dir,'born_matrix.f')) - + # For loop induced processes, always attempt quadruple precision if # double precision attempts fail and the user didn't specify himself # quadruple precision initializations attempts @@ -7166,11 +7166,11 @@ def need_init(): use_quad_prec = 1 curr_attempt = 1 - MLCard.set('WriteOutFilters',True) - + MLCard.set('WriteOutFilters',True) + while to_attempt!=[] and need_init(): curr_attempt = to_attempt.pop() - # if the attempt is a negative number it means we must force + # if the attempt is a negative number it means we must force # quadruple precision at initialization time if curr_attempt < 0: use_quad_prec = -1 @@ -7183,11 +7183,11 @@ def need_init(): MLCard.set('ZeroThres',1e-9) # Plus one because the filter are written on the next PS point after curr_attempt = abs(curr_attempt+1) - MLCard.set('MaxAttempts',curr_attempt) + MLCard.set('MaxAttempts',curr_attempt) MLCard.write(pjoin(SubProc_dir,'MadLoopParams.dat')) # initialization is performed. - MadLoopInitializer.fix_PSPoint_in_check(run_dir, read_ps = False, + MadLoopInitializer.fix_PSPoint_in_check(run_dir, read_ps = False, npoints = curr_attempt) compile_time, run_time, ram_usage = \ MadLoopInitializer.make_and_run(run_dir) @@ -7200,7 +7200,7 @@ def need_init(): infos['Process_compilation']==None: infos['Process_compilation'] = compile_time infos['Initialization'] = run_time - + MLCard_orig.write(pjoin(SubProc_dir,'MadLoopParams.dat')) if need_init(): return None @@ -7219,8 +7219,8 @@ def need_init(ML_resources_path, proc_prefix, r_files): MLCardPath = pjoin(proc_dir,'SubProcesses','MadLoopParams.dat') if not os.path.isfile(MLCardPath): raise MadGraph5Error('Could not find MadLoopParams.dat at %s.'\ - %MLCardPath) - MLCard = banner_mod.MadLoopParam(MLCardPath) + %MLCardPath) + MLCard = banner_mod.MadLoopParam(MLCardPath) req_files = ['HelFilter.dat','LoopFilter.dat'] # Make sure that LoopFilter really is needed. @@ -7234,9 +7234,9 @@ def need_init(ML_resources_path, proc_prefix, r_files): req_files.remove('HelFilter.dat') except ValueError: pass - + for v_folder in glob.iglob(pjoin(proc_dir,'SubProcesses', - '%s*'%subproc_prefix)): + '%s*'%subproc_prefix)): # Make sure it is a valid MadLoop directory if not os.path.isdir(v_folder) or not os.path.isfile(\ pjoin(v_folder,'loop_matrix.f')): @@ -7247,7 +7247,7 @@ def need_init(ML_resources_path, proc_prefix, r_files): if need_init(pjoin(proc_dir,'SubProcesses','MadLoop5_resources'), proc_prefix, req_files): return True - + return False @staticmethod @@ -7265,7 +7265,7 @@ def init_MadLoop(proc_dir, n_PS=None, subproc_prefix='PV', MG_options=None, misc.compile(arg=['treatCardsLoopNoInit'], cwd=pjoin(proc_dir,'Source')) else: interface.do_treatcards('all --no_MadLoopInit') - + # First make sure that IREGI and CUTTOOLS are compiled if needed if os.path.exists(pjoin(proc_dir,'Source','CutTools')): misc.compile(arg=['libcuttools'],cwd=pjoin(proc_dir,'Source')) @@ -7273,8 +7273,8 @@ def init_MadLoop(proc_dir, n_PS=None, subproc_prefix='PV', MG_options=None, misc.compile(arg=['libiregi'],cwd=pjoin(proc_dir,'Source')) # Then make sure DHELAS and MODEL are compiled misc.compile(arg=['libmodel'],cwd=pjoin(proc_dir,'Source')) - misc.compile(arg=['libdhelas'],cwd=pjoin(proc_dir,'Source')) - + misc.compile(arg=['libdhelas'],cwd=pjoin(proc_dir,'Source')) + # Now initialize the MadLoop outputs logger.info('Initializing MadLoop loop-induced matrix elements '+\ '(this can take some time)...') @@ -7283,7 +7283,7 @@ def init_MadLoop(proc_dir, n_PS=None, subproc_prefix='PV', MG_options=None, if MG_options: if interface and hasattr(interface, 'cluster') and isinstance(interface.cluster, cluster.MultiCore): mcore = interface.cluster - else: + else: mcore = cluster.MultiCore(**MG_options) else: mcore = cluster.onecore @@ -7294,10 +7294,10 @@ def run_initialization_wrapper(run_dir, infos, attempts): run_dir=run_dir, infos=infos) else: n_PS = MadLoopInitializer.run_initialization( - run_dir=run_dir, infos=infos, attempts=attempts) + run_dir=run_dir, infos=infos, attempts=attempts) infos['nPS'] = n_PS return 0 - + def wait_monitoring(Idle, Running, Done): if Idle+Running+Done == 0: return @@ -7307,21 +7307,21 @@ def wait_monitoring(Idle, Running, Done): init_info = {} # List all virtual folders while making sure they are valid MadLoop folders VirtualFolders = [f for f in glob.iglob(pjoin(proc_dir,'SubProcesses', - '%s*'%subproc_prefix)) if (os.path.isdir(f) or + '%s*'%subproc_prefix)) if (os.path.isdir(f) or os.path.isfile(pjoin(f,'loop_matrix.f')))] logger.debug("Now Initializing MadLoop matrix element in %d folder%s:"%\ (len(VirtualFolders),'s' if len(VirtualFolders)>1 else '')) - logger.debug(', '.join("'%s'"%os.path.basename(v_folder) for v_folder in + logger.debug(', '.join("'%s'"%os.path.basename(v_folder) for v_folder in VirtualFolders)) for v_folder in VirtualFolders: init_info[v_folder] = {} - + # We try all multiples of n_PS from 1 to max_mult, first in DP and then # in QP before giving up, or use default values if n_PS is None. max_mult = 3 if n_PS is None: # Then use the default list of number of PS points to try - mcore.submit(run_initialization_wrapper, + mcore.submit(run_initialization_wrapper, [pjoin(v_folder), init_info[v_folder], None]) else: # Use specific set of PS points @@ -7348,8 +7348,8 @@ def wait_monitoring(Idle, Running, Done): '%d PS points (%s), in %.3g(compil.) + %.3g(init.) secs.'%( abs(init['nPS']),'DP' if init['nPS']>0 else 'QP', init['Process_compilation'],init['Initialization'])) - - logger.info('MadLoop initialization finished.') + + logger.info('MadLoop initialization finished.') AskforEditCard = common_run.AskforEditCard @@ -7364,16 +7364,16 @@ def wait_monitoring(Idle, Running, Done): import os import optparse - # Get the directory of the script real path (bin) - # and add it to the current PYTHONPATH + # Get the directory of the script real path (bin) + # and add it to the current PYTHONPATH #root_path = os.path.dirname(os.path.dirname(os.path.dirname(os.path.realpath( __file__ )))) sys.path.insert(0, root_path) - class MyOptParser(optparse.OptionParser): + class MyOptParser(optparse.OptionParser): class InvalidOption(Exception): pass def error(self, msg=''): raise MyOptParser.InvalidOption(msg) - # Write out nice usage message if called with -h or --help + # Write out nice usage message if called with -h or --help usage = "usage: %prog [options] [FILE] " parser = MyOptParser(usage=usage) parser.add_option("-l", "--logging", default='INFO', @@ -7384,7 +7384,7 @@ def error(self, msg=''): help='force to launch debug mode') parser_error = '' done = False - + for i in range(len(sys.argv)-1): try: (options, args) = parser.parse_args(sys.argv[1:len(sys.argv)-i]) @@ -7394,7 +7394,7 @@ def error(self, msg=''): else: args += sys.argv[len(sys.argv)-i:] if not done: - # raise correct error: + # raise correct error: try: (options, args) = parser.parse_args() except MyOptParser.InvalidOption as error: @@ -7407,8 +7407,8 @@ def error(self, msg=''): import subprocess import logging import logging.config - # Set logging level according to the logging level given by options - #logging.basicConfig(level=vars(logging)[options.logging]) + # Set logging level according to the logging level given by options + #logging.basicConfig(level=vars(logging)[options.logging]) import internal import internal.coloring_logging # internal.file = XXX/bin/internal/__init__.py @@ -7431,13 +7431,13 @@ def error(self, msg=''): raise pass - # Call the cmd interface main loop + # Call the cmd interface main loop try: if args: # a single command is provided if '--web' in args: - i = args.index('--web') - args.pop(i) + i = args.index('--web') + args.pop(i) cmd_line = MadEventCmd(me_dir, force_run=True) else: cmd_line = MadEventCmdShell(me_dir, force_run=True) @@ -7457,13 +7457,13 @@ def error(self, msg=''): pass - - - - - - - - + + + + + + + + diff --git a/epochX/cudacpp/gg_tt.mad/bin/internal/run_plot b/epochX/cudacpp/gg_tt.mad/bin/internal/run_plot deleted file mode 100755 index 7deee7ac88..0000000000 --- a/epochX/cudacpp/gg_tt.mad/bin/internal/run_plot +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash -# -# This runs MadAnalysis on the unweighted_events.lhe -# -# Usage: run_plot run_name [madir [tddir]] -# where madir is the path to the MadAnalysis package - -main=`pwd` - -if [ "$1" != "" ] -then - run=$1 -else - echo "Usage: run_plot runname [MAdir [tddir]]" - exit -fi - -if [ "$2" != "" ] -then - MAdir=$main/$2 -else - MAdir=$main/../../MadAnalysis -fi - -if [ "$3" != "" ]; then - td=$main/$3 -else - td=$main/../../td -fi - -dirbin=$main/../bin - -if [[ $run != "" && -e ${run}_unweighted_events.lhe.gz ]];then - gunzip -c ${run}_unweighted_events.lhe.gz > unweighted_events.lhe -fi - -if [[ (-x $MAdir/plot_events) && (-e unweighted_events.lhe) && (-e ../Cards/plot_card.dat) ]]; then - echo "Creating Plots" - mkdir $run - cd $run - echo "../unweighted_events.lhe" > events.list - $dirbin/plot $MAdir $td > plot.log - cd .. - $dirbin/plot_page-pl $run parton - mv plots.html ${run}_plots.html -fi - diff --git a/epochX/cudacpp/gg_tt.mad/bin/internal/run_plot_delphes b/epochX/cudacpp/gg_tt.mad/bin/internal/run_plot_delphes deleted file mode 100755 index 975f410d0e..0000000000 --- a/epochX/cudacpp/gg_tt.mad/bin/internal/run_plot_delphes +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/bash -# -# This runs MadAnalysis on the delphes_events.lhco -# -# Usage: run_plot run_name [madir [tddir]] -# where madir is the path to the MadAnalysis package - -main=`pwd` - -if [ "$1" != "" ] -then - run=$1 -else - echo "Usage: run_plot runname [MAdir [tddir]]" - exit -fi - -if [ "$2" != "" ] -then - MAdir=$main/$2 -else - MAdir=$main/../../MadAnalysis -fi - -if [ "$3" != "" ]; then - td=$main/$3 -else - td=$main/../../td -fi - -dirbin=$main/../bin - -if [[ $run != "" && -e ${run}_delphes_events.lhco.gz ]];then - gunzip -c ${run}_delphes_events.lhco.gz > delphes_events.lhco -fi - -if [[ (-x $MAdir/plot_events) && (-e delphes_events.lhco) && (-e ../Cards/plot_card.dat) ]]; then - echo "Creating Plots" - mkdir ${run}_delphes - cd ${run}_delphes - echo "../delphes_events.lhco" > events.list - $dirbin/plot $MAdir $td > plot.log - cd .. - $dirbin/plot_page-pl ${run}_delphes Delphes - mv plots.html ${run}_plots_delphes.html -fi diff --git a/epochX/cudacpp/gg_tt.mad/bin/internal/run_plot_pgs b/epochX/cudacpp/gg_tt.mad/bin/internal/run_plot_pgs deleted file mode 100755 index e7a36ef344..0000000000 --- a/epochX/cudacpp/gg_tt.mad/bin/internal/run_plot_pgs +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash -# -# This runs MadAnalysis on the unweighted_events.lhe -# -# Usage: run_plot run_name [madir [tddir]] -# where madir is the path to the MadAnalysis package - -main=`pwd` - -if [ "$1" != "" ] -then - run=$1 -else - echo "Usage: run_plot runname [MAdir [tddir]]" - exit -fi - -if [ "$2" != "" ] -then - MAdir=$main/$2 -else - MAdir=$main/../../MadAnalysis -fi - -if [ "$3" != "" ]; then - td=$main/$3 -else - td=$main/../../td -fi - -dirbin=$main/../bin - -if [[ $run != "" && -e ${run}_pgs_events.lhco.gz ]];then - gunzip -c ${run}_pgs_events.lhco.gz > pgs_events.lhco -fi - -if [[ (-x $MAdir/plot_events) && (-e pgs_events.lhco) && (-e ../Cards/plot_card.dat) ]]; then - echo "Creating Plots" - mkdir ${run}_pgs - cd ${run}_pgs - echo "../pgs_events.lhco" > events.list - $dirbin/plot $MAdir $td > plot.log - cd .. - $dirbin/plot_page-pl ${run}_pgs PGS - mv plots.html ${run}_plots_pgs.html -fi - diff --git a/epochX/cudacpp/gg_tt.mad/bin/internal/run_plot_pythia b/epochX/cudacpp/gg_tt.mad/bin/internal/run_plot_pythia deleted file mode 100755 index 532bfb4b7b..0000000000 --- a/epochX/cudacpp/gg_tt.mad/bin/internal/run_plot_pythia +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/bash -# -# This runs MadAnalysis on the unweighted_events.lhe -# -# Usage: run_plot run_name [madir [tddir]] -# where madir is the path to the MadAnalysis package - -main=`pwd` - -if [ "$1" != "" ] -then - run=$1 -else - echo "Usage: run_plot runname [MAdir [tddir]]" - exit -fi - -if [ "$2" != "" ] -then - MAdir=$main/$2 -else - MAdir=$main/../../MadAnalysis -fi - -if [ "$3" != "" ]; then - td=$main/$3 -else - td=$main/../../td -fi - -dirbin=$main/../bin/internal - -if [[ $run != "" && -e ${run}_pythia_events.lhe.gz ]];then - gunzip -c ${run}_pythia_events.lhe.gz > pythia_events.lhe -fi - -if [[ (-x $MAdir/plot_events) && (-e pythia_events.lhe) && (-e ../Cards/plot_card.dat) ]]; then - echo "Creating Plots" - mkdir ${run}_pythia - cd ${run}_pythia - echo "../pythia_events.lhe" > events.list - $dirbin/plot $MAdir $td > plot.log - cd .. - $dirbin/plot_page-pl ${run}_pythia Pythia - mv plots.html ${run}_plots_pythia.html - $dirbin/gen_crossxhtml-pl $run -else - echo "Not creating plots" -fi - diff --git a/epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk b/epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk index c757875347..b4e446bc45 100644 --- a/epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk +++ b/epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk @@ -1,12 +1,7 @@ # Copyright (C) 2020-2023 CERN and UCLouvain. # Licensed under the GNU Lesser General Public License (version 3 or later). # Created by: S. Roiser (Feb 2020) for the MG5aMC CUDACPP plugin. -# Further modified by: J. Teig, O. Mattelaer, S. Roiser, A. Valassi (2020-2023) for the MG5aMC CUDACPP plugin. - -#=== Determine the name of this makefile (https://ftp.gnu.org/old-gnu/Manuals/make-3.80/html_node/make_17.html) -#=== NB: assume that the same name (e.g. cudacpp.mk, Makefile...) is used in the Subprocess and src directories - -THISMK = $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)) +# Further modified by: S. Hageboeck, J. Teig, O. Mattelaer, S. Roiser, A. Valassi (2020-2023) for the MG5aMC CUDACPP plugin. #------------------------------------------------------------------------------- @@ -16,167 +11,24 @@ SHELL := /bin/bash #------------------------------------------------------------------------------- -#=== Configure common compiler flags for CUDA and C++ - -INCFLAGS = -I. -OPTFLAGS = -O3 # this ends up in CUFLAGS too (should it?), cannot add -Ofast or -ffast-math here - -#------------------------------------------------------------------------------- - #=== Configure the C++ compiler -CXXFLAGS = $(OPTFLAGS) -std=c++17 $(INCFLAGS) $(USE_NVTX) -fPIC -Wall -Wshadow -Wextra +include ../Source/make_opts + +MG_CXXFLAGS += -fPIC -I. $(USE_NVTX) ifeq ($(shell $(CXX) --version | grep ^nvc++),) -CXXFLAGS+= -ffast-math # see issue #117 +MG_CXXFLAGS += -ffast-math # see issue #117 endif -###CXXFLAGS+= -Ofast # performance is not different from --fast-math -###CXXFLAGS+= -g # FOR DEBUGGING ONLY # Note: AR, CXX and FC are implicitly defined if not set externally # See https://www.gnu.org/software/make/manual/html_node/Implicit-Variables.html ###RANLIB = ranlib -# Add -mmacosx-version-min=11.3 to avoid "ld: warning: object file was built for newer macOS version than being linked" -LDFLAGS = -ifneq ($(shell $(CXX) --version | egrep '^Apple clang'),) -CXXFLAGS += -mmacosx-version-min=11.3 -LDFLAGS += -mmacosx-version-min=11.3 -endif - -#------------------------------------------------------------------------------- - -#=== Configure the CUDA compiler (note: NVCC is already exported including ccache) - -###$(info NVCC=$(NVCC)) - -#------------------------------------------------------------------------------- - -#=== Configure ccache for C++ builds (note: NVCC is already exported including ccache) - -# Enable ccache if USECCACHE=1 -ifeq ($(USECCACHE)$(shell echo $(CXX) | grep ccache),1) - override CXX:=ccache $(CXX) -endif -#ifeq ($(USECCACHE)$(shell echo $(AR) | grep ccache),1) -# override AR:=ccache $(AR) -#endif - -#------------------------------------------------------------------------------- - -#=== Configure PowerPC-specific compiler flags for CUDA and C++ - -# Assuming uname is available, detect if architecture is PowerPC -UNAME_P := $(shell uname -p) - -# PowerPC-specific CXX compiler flags (being reviewed) -ifeq ($(UNAME_P),ppc64le) - CXXFLAGS+= -mcpu=power9 -mtune=power9 # gains ~2-3% both for none and sse4 - # Throughput references without the extra flags below: none=1.41-1.42E6, sse4=2.15-2.19E6 - ###CXXFLAGS+= -DNO_WARN_X86_INTRINSICS # no change - ###CXXFLAGS+= -fpeel-loops # no change - ###CXXFLAGS+= -funroll-loops # gains ~1% for none, loses ~1% for sse4 - ###CXXFLAGS+= -ftree-vectorize # no change - ###CXXFLAGS+= -flto # BUILD ERROR IF THIS ADDED IN SRC?! -else - ###AR=gcc-ar # needed by -flto - ###RANLIB=gcc-ranlib # needed by -flto - ###CXXFLAGS+= -flto # NB: build error from src/Makefile unless gcc-ar and gcc-ranlib are used - ######CXXFLAGS+= -fno-semantic-interposition # no benefit (neither alone, nor combined with -flto) -endif - -#------------------------------------------------------------------------------- - #=== Set the CUDA/C++ compiler flags appropriate to user-defined choices of AVX, FPTYPE, HELINL, HRDCOD, RNDGEN # Set the build flags appropriate to OMPFLAGS ###$(info OMPFLAGS=$(OMPFLAGS)) -CXXFLAGS += $(OMPFLAGS) - -# Set the build flags appropriate to each AVX choice (example: "make AVX=none") -# [NB MGONGPU_PVW512 is needed because "-mprefer-vector-width=256" is not exposed in a macro] -# [See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96476] -ifeq ($(NVCC),) - $(info AVX=$(AVX)) - ifeq ($(UNAME_P),ppc64le) - ifeq ($(AVX),sse4) - override AVXFLAGS = -D__SSE4_2__ # Power9 VSX with 128 width (VSR registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on PowerPC for the moment) - endif - else ifeq ($(UNAME_P),arm) - ifeq ($(AVX),sse4) - override AVXFLAGS = -D__SSE4_2__ # ARM NEON with 128 width (Q/quadword registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on ARM for the moment) - endif - else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 - ifeq ($(AVX),none) - override AVXFLAGS = -mno-sse3 # no SIMD - else ifeq ($(AVX),sse4) - override AVXFLAGS = -mno-avx # SSE4.2 with 128 width (xmm registers) - else ifeq ($(AVX),avx2) - override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(AVX),512y) - override AVXFLAGS = -march=skylake -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(AVX),512z) - override AVXFLAGS = -march=skylake -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) - else - $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) - endif - else - ifeq ($(AVX),none) - override AVXFLAGS = -march=x86-64 # no SIMD (see #588) - else ifeq ($(AVX),sse4) - override AVXFLAGS = -march=nehalem # SSE4.2 with 128 width (xmm registers) - else ifeq ($(AVX),avx2) - override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(AVX),512y) - override AVXFLAGS = -march=skylake-avx512 -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(AVX),512z) - override AVXFLAGS = -march=skylake-avx512 -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) - endif - endif - # For the moment, use AVXFLAGS everywhere: eventually, use them only in encapsulated implementations? - CXXFLAGS+= $(AVXFLAGS) -endif - -# Set the build flags appropriate to each FPTYPE choice (example: "make FPTYPE=f") -###$(info FPTYPE=$(FPTYPE)) -ifeq ($(FPTYPE),d) - CXXFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_DOUBLE -else ifeq ($(FPTYPE),f) - CXXFLAGS += -DMGONGPU_FPTYPE_FLOAT -DMGONGPU_FPTYPE2_FLOAT -else ifeq ($(FPTYPE),m) - CXXFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_FLOAT -else - $(error Unknown FPTYPE='$(FPTYPE)': only 'd', 'f' and 'm' are supported) -endif - -# Set the build flags appropriate to each HELINL choice (example: "make HELINL=1") -###$(info HELINL=$(HELINL)) -ifeq ($(HELINL),1) - CXXFLAGS += -DMGONGPU_INLINE_HELAMPS -else ifneq ($(HELINL),0) - $(error Unknown HELINL='$(HELINL)': only '0' and '1' are supported) -endif - -# Set the build flags appropriate to each HRDCOD choice (example: "make HRDCOD=1") -###$(info HRDCOD=$(HRDCOD)) -ifeq ($(HRDCOD),1) - CXXFLAGS += -DMGONGPU_HARDCODE_PARAM -else ifneq ($(HRDCOD),0) - $(error Unknown HRDCOD='$(HRDCOD)': only '0' and '1' are supported) -endif - -# Set the build flags appropriate to each RNDGEN choice (example: "make RNDGEN=hasNoCurand") -###$(info RNDGEN=$(RNDGEN)) -ifeq ($(RNDGEN),hasNoCurand) - CXXFLAGS += -DMGONGPU_HAS_NO_CURAND -else ifneq ($(RNDGEN),hasCurand) - $(error Unknown RNDGEN='$(RNDGEN)': only 'hasCurand' and 'hasNoCurand' are supported) -endif +MG_CXXFLAGS += $(OMPFLAGS) #------------------------------------------------------------------------------- @@ -184,36 +36,18 @@ endif # Build directory "short" tag (defines target and path to the optional build directory) # (Rationale: keep directory names shorter, e.g. do not include random number generator choice) -ifneq ($(NVCC),) - override DIRTAG = cuda_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) -else - override DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) -endif +DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) # Build lockfile "full" tag (defines full specification of build options that cannot be intermixed) # (Rationale: avoid mixing of CUDA and no-CUDA environment builds with different random number generators) -ifneq ($(NVCC),) - override TAG = cuda_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) -else - override TAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) -endif +TAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) -# Build directory: current directory by default, or build.$(DIRTAG) if USEBUILDDIR==1 -###$(info Current directory is $(shell pwd)) -ifeq ($(USEBUILDDIR),1) - override BUILDDIR = build.$(DIRTAG) - override LIBDIRREL = ../lib/$(BUILDDIR) - ###$(info Building in BUILDDIR=$(BUILDDIR) for tag=$(TAG) (USEBUILDDIR=1 is set)) -else - override BUILDDIR = . - override LIBDIRREL = ../lib - ###$(info Building in BUILDDIR=$(BUILDDIR) for tag=$(TAG) (USEBUILDDIR is not set)) -endif -######$(info Building in BUILDDIR=$(BUILDDIR) for tag=$(TAG)) +# Build directory: +BUILDDIR := build.$(DIRTAG) +LIBDIRREL := ../lib/$(BUILDDIR) # Workaround for Mac #375 (I did not manage to fix rpath with @executable_path): use absolute paths for LIBDIR # (NB: this is quite ugly because it creates the directory if it does not exist - to avoid removing src by mistake) -UNAME_S := $(shell uname -s) ifeq ($(UNAME_S),Darwin) override LIBDIR = $(shell mkdir -p $(LIBDIRREL); cd $(LIBDIRREL); pwd) ifeq ($(wildcard $(LIBDIR)),) @@ -235,100 +69,41 @@ MG5AMC_COMMONLIB = mg5amc_common # First target (default goal) all.$(TAG): $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so -# Target (and build options): debug -debug: OPTFLAGS = -g -O0 -debug: all.$(TAG) - #------------------------------------------------------------------------------- # Generic target and build rules: objects from C++ compilation $(BUILDDIR)/%.o : %.cc *.h @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - $(CXX) $(CPPFLAGS) $(CXXFLAGS) -fPIC -c $< -o $@ + $(CXX) $(MG_CXXFLAGS) $(CXXFLAGS) -c $< -o $@ # Generic target and build rules: objects from CUDA compilation $(BUILDDIR)/%_cu.o : %.cc *.h @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c -x cu $< -o $@ + $(NVCC) $(MG_NVCCFLAGS) $(NVCCFLAGS) -c -x cu $< -o $@ #------------------------------------------------------------------------------- cxx_objects=$(addprefix $(BUILDDIR)/, Parameters_sm.o read_slha.o) -ifneq ($(NVCC),) +ifeq ($(AVX),cuda) +COMPILER=$(NVCC) cu_objects=$(addprefix $(BUILDDIR)/, Parameters_sm_cu.o) +else +COMPILER=$(CXX) +cu_objects= endif # Target (and build rules): common (src) library -ifneq ($(NVCC),) $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so : $(cxx_objects) $(cu_objects) - @if [ ! -d $(LIBDIR) ]; then echo "mkdir -p $(LIBDIR)"; mkdir -p $(LIBDIR); fi - $(NVCC) -shared -o $@ $(cxx_objects) $(cu_objects) $(LDFLAGS) -else -$(LIBDIR)/lib$(MG5AMC_COMMONLIB).so : $(cxx_objects) - @if [ ! -d $(LIBDIR) ]; then echo "mkdir -p $(LIBDIR)"; mkdir -p $(LIBDIR); fi - $(CXX) -shared -o $@ $(cxx_objects) $(LDFLAGS) -endif + mkdir -p $(LIBDIR) + $(COMPILER) -shared -o $@ $(cxx_objects) $(cu_objects) $(MG_LDFLAGS) $(LDFLAGS) #------------------------------------------------------------------------------- # Target: clean the builds .PHONY: clean -BUILD_DIRS := $(wildcard build.*) -NUM_BUILD_DIRS := $(words $(BUILD_DIRS)) - clean: -ifeq ($(USEBUILDDIR),1) -ifeq ($(NUM_BUILD_DIRS),1) - $(info USEBUILDDIR=1, only one src build directory found.) - rm -rf ../lib/$(BUILD_DIRS) - rm -rf $(BUILD_DIRS) -else ifeq ($(NUM_BUILD_DIRS),0) - $(error USEBUILDDIR=1, but no src build directories are found.) -else - $(error Multiple src BUILDDIR's found! Use 'cleannone', 'cleansse4', 'cleanavx2', 'clean512y','clean512z', 'cleancuda' or 'cleanall'.) -endif -else - rm -f ../lib/lib$(MG5AMC_COMMONLIB).so - rm -f $(BUILDDIR)/*.o $(BUILDDIR)/*.exe -endif - -cleanall: - @echo - rm -f ../lib/lib$(MG5AMC_COMMONLIB).so - rm -f $(BUILDDIR)/*.o $(BUILDDIR)/*.exe - @echo - rm -rf ../lib/build.* - rm -rf build.* - -# Target: clean different builds - -cleannone: - rm -rf ../lib/build.none_* - rm -rf build.none_* - -cleansse4: - rm -rf ../lib/build.sse4_* - rm -rf build.sse4_* - -cleanavx2: - rm -rf ../lib/build.avx2_* - rm -rf build.avx2_* - -clean512y: - rm -rf ../lib/build.512y_* - rm -rf build.512y_* - -clean512z: - rm -rf ../lib/build.512z_* - rm -rf build.512z_* - -cleancuda: - rm -rf ../lib/build.cuda_* - rm -rf build.cuda_* - -cleandir: - rm -f ./*.o ./*.exe - rm -f ../lib/lib$(MG5AMC_COMMONLIB).so + $(RM) -f ../lib/build.*/*.so + $(RM) -rf build.* #------------------------------------------------------------------------------- diff --git a/epochX/cudacpp/gg_tt.mad/src/mgOnGpuCxtypes.h b/epochX/cudacpp/gg_tt.mad/src/mgOnGpuCxtypes.h index ca9a9f00c0..3290d314d6 100644 --- a/epochX/cudacpp/gg_tt.mad/src/mgOnGpuCxtypes.h +++ b/epochX/cudacpp/gg_tt.mad/src/mgOnGpuCxtypes.h @@ -21,10 +21,14 @@ // Complex type in cuda: thrust or cucomplex or cxsmpl #ifdef __CUDACC__ #if defined MGONGPU_CUCXTYPE_THRUST +#ifdef __CLANG__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" // for icpx2021/clang13 (https://stackoverflow.com/a/15864661) +#endif #include +#ifdef __CLANG__ #pragma clang diagnostic pop +#endif #elif defined MGONGPU_CUCXTYPE_CUCOMPLEX #include #elif not defined MGONGPU_CUCXTYPE_CXSMPL diff --git a/epochX/cudacpp/gg_tt01g.mad/CODEGEN_mad_gg_tt01g_log.txt b/epochX/cudacpp/gg_tt01g.mad/CODEGEN_mad_gg_tt01g_log.txt index acacaf4036..5b1de7601b 100644 --- a/epochX/cudacpp/gg_tt01g.mad/CODEGEN_mad_gg_tt01g_log.txt +++ b/epochX/cudacpp/gg_tt01g.mad/CODEGEN_mad_gg_tt01g_log.txt @@ -50,10 +50,9 @@ Please set the 'lhapdf' variable to the (absolute) /PATH/TO/lhapdf-config (inclu Note that you can still compile and run aMC@NLO with the built-in PDFs MG5_aMC> set lhapdf /PATH/TO/lhapdf-config -Using default text editor "vi". Set another one in ./input/mg5_configuration.txt Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt -No valid web browser found. Please set in ./input/mg5_configuration.txt -import /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g.mg +Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt +import /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g.mg The import format was not given, so we guess it as command set stdout_level DEBUG set output information to level: 10 @@ -62,7 +61,7 @@ generate g g > t t~ No model currently active, so we import the Standard Model INFO: load particles INFO: load vertices -DEBUG: model prefixing takes 0.0055658817291259766  +DEBUG: model prefixing takes 0.003454446792602539  INFO: Restrict model sm with file models/sm/restrict_default.dat . DEBUG: Simplifying conditional expressions  DEBUG: remove interactions: u s w+ at order: QED=1  @@ -155,7 +154,7 @@ INFO: Please specify coupling orders to bypass this step. INFO: Trying coupling order WEIGHTED<=2: WEIGTHED IS QCD+2*QED INFO: Trying process: g g > t t~ WEIGHTED<=2 @1 INFO: Process has 3 diagrams -1 processes with 3 diagrams generated in 0.008 s +1 processes with 3 diagrams generated in 0.006 s Total: 1 processes with 3 diagrams add process g g > t t~ g INFO: Checking for minimal orders which gives processes. @@ -163,7 +162,7 @@ INFO: Please specify coupling orders to bypass this step. INFO: Trying coupling order WEIGHTED<=3: WEIGTHED IS QCD+2*QED INFO: Trying process: g g > t t~ g WEIGHTED<=3 @2 INFO: Process has 16 diagrams -1 processes with 16 diagrams generated in 0.019 s +1 processes with 16 diagrams generated in 0.014 s Total: 2 processes with 19 diagrams output madevent ../TMPOUT/CODEGEN_mad_gg_tt01g --hel_recycling=False --vector_size=32 --me_exporter=standalone_cudacpp Load PLUGIN.CUDACPP_OUTPUT @@ -174,10 +173,10 @@ Load PLUGIN.CUDACPP_OUTPUT INFO: initialize a new directory: CODEGEN_mad_gg_tt01g INFO: remove old information in CODEGEN_mad_gg_tt01g DEBUG: Entering PLUGIN_ProcessExporter.copy_template (initialise the directory) [output.py at line 165]  -WARNING: File exists /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g  -INFO: Creating subdirectories in directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g -WARNING: File exists /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/Cards  -WARNING: File exists /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/SubProcesses  +WARNING: File exists /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g  +INFO: Creating subdirectories in directory /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g +WARNING: File exists /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/Cards  +WARNING: File exists /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/SubProcesses  INFO: Organizing processes into subprocess groups INFO: Generating Helas calls for process: g g > t t~ g WEIGHTED<=3 @2 INFO: Processing color information for process: g g > t t~ g @2 @@ -185,7 +184,7 @@ INFO: Generating Helas calls for process: g g > t t~ WEIGHTED<=2 @1 INFO: Processing color information for process: g g > t t~ @1 INFO: Creating files in directory P2_gg_ttxg DEBUG: kwargs[prefix] = 0 [model_handling.py at line 1058]  -DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  +DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  INFO: Creating files in directory . FileWriter for ././CPPProcess.h FileWriter for ././CPPProcess.cc @@ -202,7 +201,7 @@ INFO: Generating Feynman diagrams for Process: g g > t t~ g WEIGHTED<=3 @2 INFO: Finding symmetric diagrams for subprocess group gg_ttxg INFO: Creating files in directory P1_gg_ttx DEBUG: kwargs[prefix] = 0 [model_handling.py at line 1058]  -DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  +DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  INFO: Creating files in directory . FileWriter for ././CPPProcess.h FileWriter for ././CPPProcess.cc @@ -217,15 +216,15 @@ INFO: Created files CPPProcess.h and CPPProcess.cc in directory ./. DEBUG: vector, subproc_group,self.opt['vector_size'] =  32 True 32 [export_v4.py at line 1872]  INFO: Generating Feynman diagrams for Process: g g > t t~ WEIGHTED<=2 @1 INFO: Finding symmetric diagrams for subprocess group gg_ttx -Generated helas calls for 2 subprocesses (19 diagrams) in 0.042 s -Wrote files for 46 helas calls in 0.245 s +Generated helas calls for 2 subprocesses (19 diagrams) in 0.030 s +Wrote files for 46 helas calls in 0.179 s ALOHA: aloha starts to compute helicity amplitudes ALOHA: aloha creates VVV1 routines ALOHA: aloha creates FFV1 routines ALOHA: aloha creates VVVV1 set of routines with options: P0 ALOHA: aloha creates VVVV3 set of routines with options: P0 ALOHA: aloha creates VVVV4 set of routines with options: P0 -ALOHA: aloha creates 5 routines in 0.321 s +ALOHA: aloha creates 5 routines in 0.220 s DEBUG: Entering PLUGIN_ProcessExporter.convert_model (create the model) [output.py at line 202]  ALOHA: aloha starts to compute helicity amplitudes ALOHA: aloha creates VVV1 routines @@ -233,7 +232,7 @@ ALOHA: aloha creates FFV1 routines ALOHA: aloha creates VVVV1 set of routines with options: P0 ALOHA: aloha creates VVVV3 set of routines with options: P0 ALOHA: aloha creates VVVV4 set of routines with options: P0 -ALOHA: aloha creates 10 routines in 0.304 s +ALOHA: aloha creates 10 routines in 0.200 s VVV1 VVV1 FFV1 @@ -243,49 +242,54 @@ ALOHA: aloha creates 10 routines in 0.304 s VVVV1 VVVV3 VVVV4 -FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/src/./HelAmps_sm.h -INFO: Created file HelAmps_sm.h in directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/src/. +FileWriter for /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/src/./HelAmps_sm.h +INFO: Created file HelAmps_sm.h in directory /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/src/. super_write_set_parameters_onlyfixMajorana (hardcoded=False) super_write_set_parameters_onlyfixMajorana (hardcoded=True) -FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/src/./Parameters_sm.h -FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/src/./Parameters_sm.cc +FileWriter for /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/src/./Parameters_sm.h +FileWriter for /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/src/./Parameters_sm.cc INFO: Created files Parameters_sm.h and Parameters_sm.cc in directory -INFO: /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/src/. and /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/src/. +INFO: /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/src/. and /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/src/. The option zerowidth_tchannel is modified [True] but will not be written in the configuration files. If you want to make this value the default for future session, you can run 'save options --all' -save configuration file to /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/Cards/me5_configuration.txt +save configuration file to /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/Cards/me5_configuration.txt INFO: Use Fortran compiler gfortran INFO: Use c++ compiler g++ INFO: Generate web pages -DEBUG: cd /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g; patch -p4 -i /data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common +DEBUG: cd /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g; patch -p4 -i /data/stephan/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common patching file Source/genps.inc +patching file Source/make_opts +Hunk #1 succeeded at 12 (offset -1 lines). +Hunk #2 succeeded at 70 (offset -1 lines). +Hunk #3 succeeded at 117 (offset -1 lines). +Hunk #4 succeeded at 128 (offset -1 lines). patching file Source/makefile patching file SubProcesses/makefile +patching file bin/internal/banner.py patching file bin/internal/gen_ximprove.py -Hunk #1 succeeded at 391 (offset 6 lines). patching file bin/internal/madevent_interface.py -DEBUG: cd /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/SubProcesses/P1_gg_ttx; patch -p6 -i /data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 +DEBUG: cd /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/SubProcesses/P1_gg_ttx; patch -p6 -i /data/stephan/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 patching file auto_dsig1.f patching file driver.f patching file matrix1.f -DEBUG: cd /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/SubProcesses/P2_gg_ttxg; patch -p6 -i /data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 +Hunk #2 succeeded at 143 (offset -16 lines). +Hunk #3 succeeded at 221 (offset -16 lines). +Hunk #4 succeeded at 249 (offset -16 lines). +Hunk #5 succeeded at 294 (offset -16 lines). +DEBUG: cd /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/SubProcesses/P2_gg_ttxg; patch -p6 -i /data/stephan/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 patching file auto_dsig1.f patching file driver.f patching file matrix1.f -Hunk #2 succeeded at 159 (offset 16 lines). -Hunk #3 succeeded at 237 (offset 16 lines). -Hunk #4 succeeded at 265 (offset 16 lines). -Hunk #5 succeeded at 310 (offset 16 lines). DEBUG: p.returncode =  0 [output.py at line 237]  -Output to directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g done. +Output to directory /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g done. Type "launch" to generate events from this process, or see -/data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/README +/data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/README Run "open index.html" to see more information about this process. quit -real 0m2.697s -user 0m2.018s -sys 0m0.247s +real 0m1.803s +user 0m1.468s +sys 0m0.339s ************************************************************ * * * W E L C O M E to * @@ -306,12 +310,11 @@ sys 0m0.247s * Type 'help' for in-line help. * * * ************************************************************ -INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/Cards/me5_configuration.txt -INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo/input/mg5_configuration.txt -INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/Cards/me5_configuration.txt -Using default text editor "vi". Set another one in ./input/mg5_configuration.txt +INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/Cards/me5_configuration.txt +INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/mg5amcnlo/input/mg5_configuration.txt +INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/Cards/me5_configuration.txt Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt -No valid web browser found. Please set in ./input/mg5_configuration.txt +Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt treatcards run quit INFO: @@ -336,12 +339,11 @@ launch in debug mode * Type 'help' for in-line help. * * * ************************************************************ -INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/Cards/me5_configuration.txt -INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo/input/mg5_configuration.txt -INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/Cards/me5_configuration.txt -Using default text editor "vi". Set another one in ./input/mg5_configuration.txt +INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/Cards/me5_configuration.txt +INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/mg5amcnlo/input/mg5_configuration.txt +INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/Cards/me5_configuration.txt Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt -No valid web browser found. Please set in ./input/mg5_configuration.txt +Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt treatcards param quit INFO: diff --git a/epochX/cudacpp/gg_tt01g.mad/Cards/me5_configuration.txt b/epochX/cudacpp/gg_tt01g.mad/Cards/me5_configuration.txt index cdeedc7863..22f81b5926 100644 --- a/epochX/cudacpp/gg_tt01g.mad/Cards/me5_configuration.txt +++ b/epochX/cudacpp/gg_tt01g.mad/Cards/me5_configuration.txt @@ -234,7 +234,7 @@ # pineappl = pineappl -#mg5_path = /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo +#mg5_path = /data/stephan/madgraph4gpu/MG5aMC/mg5amcnlo # MG5 MAIN DIRECTORY -#mg5_path = /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo +#mg5_path = /data/stephan/madgraph4gpu/MG5aMC/mg5amcnlo diff --git a/epochX/cudacpp/gg_tt01g.mad/Source/make_opts b/epochX/cudacpp/gg_tt01g.mad/Source/make_opts index e4b87ee6ad..435bed0dc7 100644 --- a/epochX/cudacpp/gg_tt01g.mad/Source/make_opts +++ b/epochX/cudacpp/gg_tt01g.mad/Source/make_opts @@ -1,7 +1,7 @@ DEFAULT_CPP_COMPILER=g++ DEFAULT_F2PY_COMPILER=f2py3 DEFAULT_F_COMPILER=gfortran -GLOBAL_FLAG=-O3 -ffast-math -fbounds-check +GLOBAL_FLAG=-O3 -ffast-math MACFLAG= MG5AMC_VERSION=SpecifiedByMG5aMCAtRunTime PYTHIA8_PATH=NotInstalled @@ -13,31 +13,53 @@ BIASLIBDIR=../../../lib/ BIASLIBRARY=libbias.$(libext) # Rest of the makefile -ifeq ($(origin FFLAGS),undefined) -FFLAGS= -w -fPIC -#FFLAGS+= -g -fbounds-check -ffpe-trap=invalid,zero,overflow,underflow,denormal -Wall -fimplicit-none -endif -FFLAGS += $(GLOBAL_FLAG) +#=== Detect O/S and architecture (assuming uname is available, https://en.wikipedia.org/wiki/Uname) + +# Detect O/S kernel (Linux, Darwin...) +UNAME_S := $(shell uname -s) + +# Detect architecture (x86_64, ppc64le...) +UNAME_P := $(shell uname -p) + +#------------------------------------------------------------------------------- # REMOVE MACFLAG IF NOT ON MAC OR FOR F2PY -UNAME := $(shell uname -s) ifdef f2pymode MACFLAG= else -ifneq ($(UNAME), Darwin) +ifneq ($(UNAME_S), Darwin) MACFLAG= endif endif +############################################################ +# Default compiler flags +# To change optimisation level, override these as follows: +# make CXXFLAGS="-O0 -g" +# or export them as environment variables +# For debugging Fortran, one could e.g. use: +# FCFLAGS="-g -fbounds-check -ffpe-trap=invalid,zero,overflow,underflow,denormal -Wall -fimplicit-none" +############################################################ +FCFLAGS ?= $(GLOBAL_FLAG) -fbounds-check +CXXFLAGS ?= $(GLOBAL_FLAG) -DNDEBUG +NVCCFLAGS ?= $(GLOBAL_FLAG) -DNDEBUG -use_fast_math -lineinfo +LDFLAGS ?= $(STDLIB) -ifeq ($(origin CXXFLAGS),undefined) -CXXFLAGS= -O $(STDLIB_FLAG) $(MACFLAG) +ifneq ($(FFLAGS),) +# Madgraph used to use FFLAGS, so the user probably tries to change the flags specifically for madgraph: +FCFLAGS = $(FFLAGS) endif -ifeq ($(origin CFLAGS),undefined) -CFLAGS= -O $(STDLIB_FLAG) $(MACFLAG) +# Madgraph-specific flags: +WARNFLAGS = -Wall -Wshadow -Wextra +ifeq (,$(findstring -std=,$(CXXFLAGS))) +CXXSTANDARD= -std=c++17 endif +MG_FCFLAGS += -fPIC -w +MG_CXXFLAGS += -fPIC $(CXXSTANDARD) $(WARNFLAGS) $(MACFLAG) +MG_NVCCFLAGS += -fPIC $(CXXSTANDARD) --forward-unknown-to-host-compiler $(WARNFLAGS) +MG_LDFLAGS += $(MACFLAG) # Set FC unless it's defined by an environment variable ifeq ($(origin FC),default) @@ -49,45 +71,40 @@ endif # Increase the number of allowed charcters in a Fortran line ifeq ($(FC), ftn) -FFLAGS+= -extend-source # for ifort type of compiler +MG_FCFLAGS += -extend-source # for ifort type of compiler else VERS="$(shell $(FC) --version | grep ifort -i)" ifeq ($(VERS), "") -FFLAGS+= -ffixed-line-length-132 +MG_FCFLAGS += -ffixed-line-length-132 else -FFLAGS+= -extend-source # for ifort type of compiler +MG_FCFLAGS += -extend-source # for ifort type of compiler endif endif -UNAME := $(shell uname -s) -ifeq ($(origin LDFLAGS), undefined) -LDFLAGS=$(STDLIB) $(MACFLAG) -endif - # Options: dynamic, lhapdf # Option dynamic -ifeq ($(UNAME), Darwin) +ifeq ($(UNAME_S), Darwin) dylibext=dylib else dylibext=so endif ifdef dynamic -ifeq ($(UNAME), Darwin) +ifeq ($(UNAME_S), Darwin) libext=dylib -FFLAGS+= -fno-common -LDFLAGS += -bundle +MG_FCFLAGS += -fno-common +MG_LDFLAGS += -bundle define CREATELIB $(FC) -dynamiclib -undefined dynamic_lookup -o $(1) $(2) endef else libext=so -FFLAGS+= -fPIC -LDFLAGS += -shared +MG_FCFLAGS += -fPIC +MG_LDFLAGS += -shared define CREATELIB -$(FC) $(FFLAGS) $(LDFLAGS) -o $(1) $(2) +$(FC) $(MG_FCFLAGS) $(FCFLAGS) $(MG_LDFLAGS) $(LDFLAGS) -o $(1) $(2) endef endif else @@ -101,17 +118,9 @@ endif # Option lhapdf ifneq ($(lhapdf),) -CXXFLAGS += $(shell $(lhapdf) --cppflags) +MG_CXXFLAGS += $(shell $(lhapdf) --cppflags) alfas_functions=alfas_functions_lhapdf llhapdf+= $(shell $(lhapdf) --cflags --libs) -lLHAPDF -# check if we need to activate c++11 (for lhapdf6.2) -ifeq ($(origin CXX),default) -ifeq ($lhapdfversion$lhapdfsubversion,62) -CXX=$(DEFAULT_CPP_COMPILER) -std=c++11 -else -CXX=$(DEFAULT_CPP_COMPILER) -endif -endif else alfas_functions=alfas_functions llhapdf= @@ -120,4 +129,207 @@ endif # Helper function to check MG5 version define CHECK_MG5AMC_VERSION python -c 'import re; from distutils.version import StrictVersion; print StrictVersion("$(MG5AMC_VERSION)") >= StrictVersion("$(1)") if re.match("^[\d\.]+$$","$(MG5AMC_VERSION)") else True;' -endef \ No newline at end of file +endef + +#------------------------------------------------------------------------------- + +# Set special cases for non-gcc/clang builds +# AVX below gets overridden from outside in architecture-specific builds +AVX ?= none +# [NB MGONGPU_PVW512 is needed because "-mprefer-vector-width=256" is not exposed in a macro] +# [See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96476] +$(info AVX=$(AVX)) +ifeq ($(UNAME_P),arm) + ifeq ($(AVX),sse4) + override AVXFLAGS = -D__SSE4_2__ # ARM NEON with 128 width (Q/quadword registers) + endif +else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 + ifeq ($(AVX),none) + override AVXFLAGS = -mno-sse3 # no SIMD + else ifeq ($(AVX),sse4) + override AVXFLAGS = -mno-avx # SSE4.2 with 128 width (xmm registers) + else ifeq ($(AVX),avx2) + override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] + else ifeq ($(AVX),512y) + override AVXFLAGS = -march=skylake -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] + else ifeq ($(AVX),512z) + override AVXFLAGS = -march=skylake -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) + else + $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) + endif +endif + +# For the moment, use AVXFLAGS everywhere: eventually, use them only in encapsulated implementations? +MG_CXXFLAGS+= $(AVXFLAGS) + +#------------------------------------------------------------------------------- + +#=== Configure the CUDA compiler if available + +# If CXX is not a single word (example "clang++ --gcc-toolchain...") then disable CUDA builds (issue #505) +# This is because it is impossible to pass this to "CUFLAGS += -ccbin " below +ifneq ($(words $(subst ccache ,,$(CXX))),1) # allow at most "CXX=ccache " from outside + $(warning CUDA builds are not supported for multi-word CXX "$(CXX)") + override CUDA_HOME=disabled +endif + +# If CUDA_HOME is not set, try to set it from the location of nvcc +ifndef CUDA_HOME + CUDA_HOME = $(patsubst %bin/nvcc,%,$(shell which nvcc 2>/dev/null)) + $(info CUDA_HOME="$(CUDA_HOME)") +endif + +# Set NVCC as $(CUDA_HOME)/bin/nvcc if it exists +ifneq ($(wildcard $(CUDA_HOME)/bin/nvcc),) + NVCC = $(CUDA_HOME)/bin/nvcc + USE_NVTX ?=-DUSE_NVTX + # See https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html + # See https://arnon.dk/matching-sm-architectures-arch-and-gencode-for-various-nvidia-cards/ + # Default: use compute capability 70 (Volta architecture), and embed PTX to support later architectures, too. + # Set MADGRAPH_CUDA_ARCHITECTURE to the desired value to change the default. + # Build for multiple architectures using a space-separated list, e.g. MADGRAPH_CUDA_ARCHITECTURE="70 80" + MADGRAPH_CUDA_ARCHITECTURE ?= 70 + # Generate PTX for the first architecture: + CUARCHFLAGS := --generate-code arch=compute_$(firstword $(MADGRAPH_CUDA_ARCHITECTURE)),code=compute_$(firstword $(MADGRAPH_CUDA_ARCHITECTURE)) + # Generate device code for all architectures: + CUARCHFLAGS += $(foreach arch,$(MADGRAPH_CUDA_ARCHITECTURE), --generate-code arch=compute_$(arch),code=sm_$(arch)) + + CUINC = -I$(CUDA_HOME)/include/ + CURANDLIBFLAGS = -L$(CUDA_HOME)/lib64/ -lcurand # NB: -lcuda is not needed here! + MG_LDFLAGS += $(CURANDLIBFLAGS) + MG_NVCCFLAGS += $(CUINC) $(USE_NVTX) $(CUARCHFLAGS) + +else ifeq ($(AVX),cuda) + $(error nvcc is not visible in PATH. Either add it to PATH or export CUDA_HOME to compile with cuda) + ifeq ($(AVX),cuda) + $(error Cannot compile for cuda without NVCC) + endif +endif + +# Set the host C++ compiler for nvcc via "-ccbin " +# (NB issue #505: this must be a single word, "clang++ --gcc-toolchain..." is not supported) +MG_NVCCFLAGS += -ccbin $(shell which $(subst ccache ,,$(CXX))) + +# Allow newer (unsupported) C++ compilers with older versions of CUDA if ALLOW_UNSUPPORTED_COMPILER_IN_CUDA is set (#504) +ifneq ($(origin ALLOW_UNSUPPORTED_COMPILER_IN_CUDA),undefined) +MG_NVCCFLAGS += -allow-unsupported-compiler +endif + +#------------------------------------------------------------------------------- + +#=== Configure ccache for C++ and CUDA builds + +# Enable ccache if USECCACHE=1 +ifeq ($(USECCACHE)$(shell echo $(CXX) | grep ccache),1) + override CXX:=ccache $(CXX) +endif + +ifneq ($(NVCC),) + ifeq ($(USECCACHE)$(shell echo $(NVCC) | grep ccache),1) + override NVCC:=ccache $(NVCC) + endif +endif + +#------------------------------------------------------------------------------- + +#=== Configure PowerPC-specific compiler flags for C++ and CUDA + +# PowerPC-specific CXX / CUDA compiler flags (being reviewed) +ifeq ($(UNAME_P),ppc64le) + MG_CXXFLAGS+= -mcpu=power9 -mtune=power9 # gains ~2-3% both for none and sse4 + MG_NVCCFLAGS+= -Xcompiler -mno-float128 + + ifeq ($(AVX),sse4) + override AVXFLAGS = -D__SSE4_2__ # Power9 VSX with 128 width (VSR registers) + endif +endif + +#------------------------------------------------------------------------------- +#=== Apple-specific compiler/linker options + +# Add -std=c++17 explicitly to avoid build errors on macOS +# Add -mmacosx-version-min=11.3 to avoid "ld: warning: object file was built for newer macOS version than being linked" +ifneq ($(shell $(CXX) --version | egrep '^Apple clang'),) +MG_CXXFLAGS += -std=c++17 -mmacosx-version-min=11.3 +endif + +ifeq ($(UNAME_S),Darwin) +STDLIB = -lc++ # avoid 'Undefined symbols' for chrono::steady_clock on macOS (checked with otool -L libmg5amc_gg_ttx_cpp.so) +MG_LDFLAGS += -mmacosx-version-min=11.3 # avoid "ld: warning: object file was built for newer macOS version than being linked" +else +MG_LDFLAGS += -Xlinker --no-relax # avoid 'failed to convert GOTPCREL relocation' error #458 (not supported on macOS) +endif + +#------------------------------------------------------------------------------- + +#=== C++/CUDA-specific flags for floating-point types and random generators to use + +# Set the default FPTYPE (floating point type) choice +FPTYPE ?= m + +# Set the default HELINL (inline helicities?) choice +HELINL ?= 0 + +# Set the default HRDCOD (hardcode cIPD physics parameters?) choice +HRDCOD ?= 0 + +# Set the default RNDGEN (random number generator) choice +ifeq ($(NVCC),) + RNDGEN ?= hasNoCurand +else + RNDGEN ?= hasCurand +endif + +# Export AVX, FPTYPE, HELINL, HRDCOD, RNDGEN, OMPFLAGS so sub-makes don't go back to the defaults +export AVX +export AVXFLAGS +export FPTYPE +export HELINL +export HRDCOD +export RNDGEN + +#=== Set the CUDA/C++ compiler flags appropriate to user-defined choices of AVX, FPTYPE, HELINL, HRDCOD, RNDGEN + +# Set the build flags appropriate to each FPTYPE choice (example: "make FPTYPE=f") +# $(info FPTYPE=$(FPTYPE)) +ifeq ($(FPTYPE),d) + COMMONFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_DOUBLE +else ifeq ($(FPTYPE),f) + COMMONFLAGS += -DMGONGPU_FPTYPE_FLOAT -DMGONGPU_FPTYPE2_FLOAT +else ifeq ($(FPTYPE),m) + COMMONFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_FLOAT +else + $(error Unknown FPTYPE='$(FPTYPE)': only 'd', 'f' and 'm' are supported) +endif + +# Set the build flags appropriate to each HELINL choice (example: "make HELINL=1") +# $(info HELINL=$(HELINL)) +ifeq ($(HELINL),1) + COMMONFLAGS += -DMGONGPU_INLINE_HELAMPS +else ifneq ($(HELINL),0) + $(error Unknown HELINL='$(HELINL)': only '0' and '1' are supported) +endif + +# Set the build flags appropriate to each HRDCOD choice (example: "make HRDCOD=1") +# $(info HRDCOD=$(HRDCOD)) +ifeq ($(HRDCOD),1) + COMMONFLAGS += -DMGONGPU_HARDCODE_PARAM +else ifneq ($(HRDCOD),0) + $(error Unknown HRDCOD='$(HRDCOD)': only '0' and '1' are supported) +endif + +# Set the build flags appropriate to each RNDGEN choice (example: "make RNDGEN=hasNoCurand") +$(info RNDGEN=$(RNDGEN)) +ifeq ($(RNDGEN),hasNoCurand) + override CXXFLAGSCURAND = -DMGONGPU_HAS_NO_CURAND + override CURANDLIBFLAGS = +else ifeq ($(RNDGEN),hasCurand) + CXXFLAGSCURAND = $(CUINC) +else + $(error Unknown RNDGEN='$(RNDGEN)': only 'hasCurand' and 'hasNoCurand' are supported) +endif + +MG_CXXFLAGS += $(COMMONFLAGS) +MG_NVCCFLAGS += $(COMMONFLAGS) + +#------------------------------------------------------------------------------- diff --git a/epochX/cudacpp/gg_tt01g.mad/Source/makefile b/epochX/cudacpp/gg_tt01g.mad/Source/makefile index 00c73099a0..407b1b753e 100644 --- a/epochX/cudacpp/gg_tt01g.mad/Source/makefile +++ b/epochX/cudacpp/gg_tt01g.mad/Source/makefile @@ -10,8 +10,8 @@ include make_opts # Source files -PROCESS= hfill.o matrix.o myamp.o -DSAMPLE = dsample.o ranmar.o DiscreteSampler.o StringCast.o +PROCESS = hfill.o matrix.o myamp.o +DSAMPLE = dsample.o ranmar.o DiscreteSampler.o StringCast.o HBOOK = hfill.o hcurve.o hbook1.o hbook2.o GENERIC = $(alfas_functions).o transpole.o invarients.o hfill.o pawgraphs.o ran1.o \ rw_events.o rw_routines.o kin_functions.o open_file.o basecode.o setrun.o \ @@ -22,7 +22,7 @@ GENSUDGRID = gensudgrid.o is-sud.o setrun_gen.o rw_routines.o open_file.o # Locally compiled libraries -LIBRARIES=$(LIBDIR)libdsample.$(libext) $(LIBDIR)libgeneric.$(libext) +LIBRARIES=$(LIBDIR)libdsample.$(libext) $(LIBDIR)libgeneric.$(libext) # Binaries @@ -32,6 +32,9 @@ BINARIES = $(BINDIR)gen_ximprove $(BINDIR)gensudgrid $(BINDIR)combine_runs all: $(LIBRARIES) $(LIBDIR)libdhelas.$(libext) $(LIBDIR)libpdf.$(libext) $(LIBDIR)libgammaUPC.$(libext) $(LIBDIR)libmodel.$(libext) $(LIBDIR)libcernlib.$(libext) $(LIBDIR)libbias.$(libext) +%.o: %.f *.inc + $(FC) -I. $(MG_FCFLAGS) $(FCFLAGS) -c $< -o $@ + # Libraries $(LIBDIR)libdsample.$(libext): $(DSAMPLE) @@ -39,36 +42,35 @@ $(LIBDIR)libdsample.$(libext): $(DSAMPLE) $(LIBDIR)libgeneric.$(libext): $(GENERIC) $(call CREATELIB, $@, $^) $(LIBDIR)libdhelas.$(libext): DHELAS - cd DHELAS; make; cd .. + $(MAKE) -C $< FFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" FCFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" $(LIBDIR)libpdf.$(libext): PDF make_opts - cd PDF; make; cd .. + $(MAKE) -C $< FFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" FCFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" ifneq (,$(filter edff chff, $(pdlabel1) $(pdlabel2))) $(LIBDIR)libgammaUPC.$(libext): PDF/gammaUPC - cd PDF/gammaUPC; make ; cd ../../ + $(MAKE) -C $< FFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" FCFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" else $(LIBDIR)libgammaUPC.$(libext): PDF/gammaUPC - cd PDF/gammaUPC; make -f makefile_dummy; cd ../../ -endif + $(MAKE) -C $< -f makefile_dummy FFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" FCFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" +endif $(LIBDIR)libcernlib.$(libext): CERNLIB - cd CERNLIB; make; cd .. + $(MAKE) -C $< FFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" FCFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" # The bias library is here the dummy by default; compilation of other ones specified in the run_card will be done by MG5aMC directly. $(LIBDIR)libbias.$(libext): BIAS/dummy - cd BIAS/dummy; make; cd ../../ + $(MAKE) -C $< FFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" FCFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" $(LIBDIR)libmodel.$(libext): MODEL param_card.inc - cd MODEL; make + $(MAKE) -C $< FFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" FCFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" param_card.inc: ../Cards/param_card.dat ../bin/madevent treatcards param + touch $@ # madevent doesn't update the time stamp if there's nothing to do -$(BINDIR)gen_ximprove: gen_ximprove.o ranmar.o rw_routines.o open_file.o - $(FC) $(LDFLAGS) -o $@ $^ -#$(BINDIR)combine_events: $(COMBINE) $(LIBDIR)libmodel.$(libext) $(LIBDIR)libpdf.$(libext) $(LIBDIR)libgammaUPC.$(libext) run_card.inc $(LIBDIR)libbias.$(libext) -# $(FC) -o $@ $(COMBINE) -L$(LIBDIR) -lmodel -lpdf -lgammaUPC $(llhapdf) $(LDFLAGS) -lbias +$(BINDIR)gen_ximprove: gen_ximprove.o ranmar.o rw_routines.o open_file.o + $(FC) $(MG_LDFLAGS) $(LDFLAGS) -o $@ $^ $(BINDIR)gensudgrid: $(GENSUDGRID) $(LIBDIR)libpdf.$(libext) $(LIBDIR)libgammaUPC.$(libext) $(LIBDIR)libcernlib.$(libext) - $(FC) -o $@ $(GENSUDGRID) -L$(LIBDIR) -lmodel -lpdf -lgammaUPC -lcernlib $(llhapdf) $(LDFLAGS) + $(FC) -o $@ $(GENSUDGRID) -L$(LIBDIR) -lmodel -lpdf -lgammaUPC -lcernlib $(llhapdf) $(MG_LDFLAGS) $(LDFLAGS) # Dependencies @@ -85,6 +87,7 @@ rw_events.o: rw_events.f run_config.inc run_card.inc: ../Cards/run_card.dat ../bin/madevent treatcards run + touch $@ # madevent doesn't update the time stamp if there's nothing to do clean4pdf: rm -f ../lib/libpdf.$(libext) @@ -120,7 +123,7 @@ $(LIBDIR)libiregi.a: $(IREGIDIR) cd $(IREGIDIR); make ln -sf ../Source/$(IREGIDIR)libiregi.a $(LIBDIR)libiregi.a -cleanSource: +clean: $(RM) *.o $(LIBRARIES) $(BINARIES) cd PDF; make clean; cd .. cd PDF/gammaUPC; make clean; cd ../../ @@ -132,11 +135,3 @@ cleanSource: cd BIAS/ptj_bias; make clean; cd ../.. if [ -d $(CUTTOOLSDIR) ]; then cd $(CUTTOOLSDIR); make clean; cd ..; fi if [ -d $(IREGIDIR) ]; then cd $(IREGIDIR); make clean; cd ..; fi - -clean: cleanSource - for i in `ls -d ../SubProcesses/P*`; do cd $$i; make clean; cd -; done; - -cleanavx: - for i in `ls -d ../SubProcesses/P*`; do cd $$i; make cleanavxs; cd -; done; -cleanall: cleanSource # THIS IS THE ONE - for i in `ls -d ../SubProcesses/P*`; do cd $$i; make cleanavxs; cd -; done; diff --git a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/Bridge.h b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/Bridge.h index bf8b5e024d..c263f39a62 100644 --- a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/Bridge.h +++ b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/Bridge.h @@ -236,7 +236,7 @@ namespace mg5amcCpu #ifdef __CUDACC__ if( ( m_nevt < s_gputhreadsmin ) || ( m_nevt % s_gputhreadsmin != 0 ) ) throw std::runtime_error( "Bridge constructor: nevt should be a multiple of " + std::to_string( s_gputhreadsmin ) ); - while( m_nevt != m_gpublocks * m_gputhreads ) + while( m_nevt != static_cast( m_gpublocks * m_gputhreads ) ) { m_gputhreads /= 2; if( m_gputhreads < s_gputhreadsmin ) @@ -266,7 +266,7 @@ namespace mg5amcCpu template void Bridge::set_gpugrid( const int gpublocks, const int gputhreads ) { - if( m_nevt != gpublocks * gputhreads ) + if( m_nevt != static_cast( gpublocks * gputhreads ) ) throw std::runtime_error( "Bridge: gpublocks*gputhreads must equal m_nevt in set_gpugrid" ); m_gpublocks = gpublocks; m_gputhreads = gputhreads; diff --git a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/MadgraphTest.h b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/MadgraphTest.h index ef40624c88..b0f2250c25 100644 --- a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/MadgraphTest.h +++ b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/MadgraphTest.h @@ -199,10 +199,6 @@ class MadgraphTest : public testing::TestWithParam } }; -// Since we link both the CPU-only and GPU tests into the same executable, we prevent -// a multiply defined symbol by only compiling this in the non-CUDA phase: -#ifndef __CUDACC__ - /// Compare momenta and matrix elements. /// This uses an implementation of TestDriverBase to run a madgraph workflow, /// and compares momenta and matrix elements with a reference file. @@ -307,6 +303,4 @@ TEST_P( MadgraphTest, CompareMomentaAndME ) } } -#endif // __CUDACC__ - #endif /* MADGRAPHTEST_H_ */ diff --git a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/MatrixElementKernels.cc b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/MatrixElementKernels.cc index 74b5239ebf..2d6f27cd5d 100644 --- a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/MatrixElementKernels.cc +++ b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/MatrixElementKernels.cc @@ -196,6 +196,9 @@ namespace mg5amcGpu void MatrixElementKernelDevice::setGrid( const int gpublocks, const int gputhreads ) { + m_gpublocks = gpublocks; + m_gputhreads = gputhreads; + if( m_gpublocks == 0 ) throw std::runtime_error( "MatrixElementKernelDevice: gpublocks must be > 0 in setGrid" ); if( m_gputhreads == 0 ) throw std::runtime_error( "MatrixElementKernelDevice: gputhreads must be > 0 in setGrid" ); if( this->nevt() != m_gpublocks * m_gputhreads ) throw std::runtime_error( "MatrixElementKernelDevice: nevt mismatch in setGrid" ); diff --git a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P1_gg_ttx/check_sa.cc b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P1_gg_ttx/check_sa.cc index 3fbf0ffbee..07b7304b17 100644 --- a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P1_gg_ttx/check_sa.cc +++ b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P1_gg_ttx/check_sa.cc @@ -81,7 +81,7 @@ namespace mg5amcGpu namespace mg5amcCpu #endif { - inline void FPEhandler( int sig ) + inline void FPEhandler( int ) { #ifdef __CUDACC__ std::cerr << "Floating Point Exception (GPU)" << std::endl; diff --git a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P1_gg_ttx/counters.cc b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P1_gg_ttx/counters.cc index 3bbdec9387..cf875e8be4 100644 --- a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P1_gg_ttx/counters.cc +++ b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P1_gg_ttx/counters.cc @@ -32,6 +32,8 @@ extern "C" case +0: return "CudaCpp"; break; default: assert( false ); break; } + + return 0; } static mgOnGpu::Timer program_timer; diff --git a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P2_gg_ttxg/check_sa.cc b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P2_gg_ttxg/check_sa.cc index 3fbf0ffbee..07b7304b17 100644 --- a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P2_gg_ttxg/check_sa.cc +++ b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P2_gg_ttxg/check_sa.cc @@ -81,7 +81,7 @@ namespace mg5amcGpu namespace mg5amcCpu #endif { - inline void FPEhandler( int sig ) + inline void FPEhandler( int ) { #ifdef __CUDACC__ std::cerr << "Floating Point Exception (GPU)" << std::endl; diff --git a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P2_gg_ttxg/counters.cc b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P2_gg_ttxg/counters.cc index 3bbdec9387..cf875e8be4 100644 --- a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P2_gg_ttxg/counters.cc +++ b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P2_gg_ttxg/counters.cc @@ -32,6 +32,8 @@ extern "C" case +0: return "CudaCpp"; break; default: assert( false ); break; } + + return 0; } static mgOnGpu::Timer program_timer; diff --git a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/cudacpp.mk b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/cudacpp.mk index 509307506b..a522ddb335 100644 --- a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/cudacpp.mk @@ -1,56 +1,41 @@ # Copyright (C) 2020-2023 CERN and UCLouvain. # Licensed under the GNU Lesser General Public License (version 3 or later). # Created by: S. Roiser (Feb 2020) for the MG5aMC CUDACPP plugin. -# Further modified by: O. Mattelaer, S. Roiser, A. Valassi (2020-2023) for the MG5aMC CUDACPP plugin. - -#=== Determine the name of this makefile (https://ftp.gnu.org/old-gnu/Manuals/make-3.80/html_node/make_17.html) -#=== NB: use ':=' to ensure that the value of CUDACPP_MAKEFILE is not modified further down after including make_opts -#=== NB: use 'override' to ensure that the value can not be modified from the outside -override CUDACPP_MAKEFILE := $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)) -###$(info CUDACPP_MAKEFILE='$(CUDACPP_MAKEFILE)') - -#=== NB: different names (e.g. cudacpp.mk and cudacpp_src.mk) are used in the Subprocess and src directories -override CUDACPP_SRC_MAKEFILE = cudacpp_src.mk - -#------------------------------------------------------------------------------- - -#=== Use bash in the Makefile (https://www.gnu.org/software/make/manual/html_node/Choosing-the-Shell.html) - -SHELL := /bin/bash - -#------------------------------------------------------------------------------- - -#=== Detect O/S and architecture (assuming uname is available, https://en.wikipedia.org/wiki/Uname) - -# Detect O/S kernel (Linux, Darwin...) -UNAME_S := $(shell uname -s) -###$(info UNAME_S='$(UNAME_S)') - -# Detect architecture (x86_64, ppc64le...) -UNAME_P := $(shell uname -p) -###$(info UNAME_P='$(UNAME_P)') - -#------------------------------------------------------------------------------- - -#=== Include the common MG5aMC Makefile options - -# OM: this is crucial for MG5aMC flag consistency/documentation -# AV: temporarely comment this out because it breaks cudacpp builds -ifneq ($(wildcard ../../Source/make_opts),) -include ../../Source/make_opts -endif +# Further modified by: S. Hageboeck, J. Teig, O. Mattelaer, S. Roiser, A. Valassi (2020-2023) for the MG5aMC CUDACPP plugin. + +# This makefile extends the Fortran makefile called "makefile" + +CUDACPP_SRC_MAKEFILE = cudacpp_src.mk + +# Self-invocation with adapted flags: +cppnative: $(SOURCEDIR_GUARD) $(PROCESS) + $(MAKE) AVX=native AVXFLAGS="-march=native" cppbuild +cppnone: $(SOURCEDIR_GUARD) $(PROCESS) + $(MAKE) AVX=none AVXFLAGS= cppbuild +cppsse4: $(SOURCEDIR_GUARD) $(PROCESS) + $(MAKE) AVX=sse4 AVXFLAGS=-march=nehalem cppbuild +cppavx2: $(SOURCEDIR_GUARD) $(PROCESS) + $(MAKE) AVX=avx2 AVXFLAGS=-march=haswell cppbuild +cppavx512y: $(SOURCEDIR_GUARD) $(PROCESS) + $(MAKE) AVX=512y AVXFLAGS="-march=skylake-avx512 -mprefer-vector-width=256" cppbuild +cppavx512z: $(SOURCEDIR_GUARD) $(PROCESS) + $(MAKE) AVX=512z AVXFLAGS="-march=skylake-avx512 -DMGONGPU_PVW512" cppbuild +cuda: $(SOURCEDIR_GUARD) $(PROCESS) + $(MAKE) AVX=cuda cudabuild #------------------------------------------------------------------------------- #=== Configure common compiler flags for C++ and CUDA +# NB: The base flags are defined in the fortran "makefile" + +# Include directories +INCFLAGS = -I. -I../../src -INCFLAGS = -I. -OPTFLAGS = -O3 # this ends up in CUFLAGS too (should it?), cannot add -Ofast or -ffast-math here +MG_CXXFLAGS += $(INCFLAGS) +MG_NVCCFLAGS += $(INCFLAGS) # Dependency on src directory -MG5AMC_COMMONLIB = mg5amc_common -LIBFLAGS = -L$(LIBDIR) -l$(MG5AMC_COMMONLIB) -INCFLAGS += -I../../src +MG5AMC_COMMONLIB = mg5amc_common # Compiler-specific googletest build directory (#125 and #738) ifneq ($(shell $(CXX) --version | grep '^Intel(R) oneAPI DPC++/C++ Compiler'),) @@ -99,356 +84,42 @@ endif #------------------------------------------------------------------------------- -#=== Configure the C++ compiler - -CXXFLAGS = $(OPTFLAGS) -std=c++17 $(INCFLAGS) -Wall -Wshadow -Wextra -ifeq ($(shell $(CXX) --version | grep ^nvc++),) -CXXFLAGS += -ffast-math # see issue #117 -endif -###CXXFLAGS+= -Ofast # performance is not different from --fast-math -###CXXFLAGS+= -g # FOR DEBUGGING ONLY - -# Optionally add debug flags to display the full list of flags (eg on Darwin) -###CXXFLAGS+= -v - -# Note: AR, CXX and FC are implicitly defined if not set externally -# See https://www.gnu.org/software/make/manual/html_node/Implicit-Variables.html - -# Add -mmacosx-version-min=11.3 to avoid "ld: warning: object file was built for newer macOS version than being linked" -ifneq ($(shell $(CXX) --version | egrep '^Apple clang'),) -CXXFLAGS += -mmacosx-version-min=11.3 -endif - -#------------------------------------------------------------------------------- - -#=== Configure the CUDA compiler - -# If CXX is not a single word (example "clang++ --gcc-toolchain...") then disable CUDA builds (issue #505) -# This is because it is impossible to pass this to "CUFLAGS += -ccbin " below -ifneq ($(words $(subst ccache ,,$(CXX))),1) # allow at most "CXX=ccache " from outside - $(warning CUDA builds are not supported for multi-word CXX "$(CXX)") - override CUDA_HOME=disabled -endif - -# If CUDA_HOME is not set, try to set it from the location of nvcc -ifndef CUDA_HOME - CUDA_HOME = $(patsubst %bin/nvcc,%,$(shell which nvcc 2>/dev/null)) - $(warning CUDA_HOME was not set: using "$(CUDA_HOME)") -endif - -# Set NVCC as $(CUDA_HOME)/bin/nvcc if it exists -ifneq ($(wildcard $(CUDA_HOME)/bin/nvcc),) - NVCC = $(CUDA_HOME)/bin/nvcc - USE_NVTX ?=-DUSE_NVTX - # See https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html - # See https://arnon.dk/matching-sm-architectures-arch-and-gencode-for-various-nvidia-cards/ - # Default: use compute capability 70 for V100 (CERN lxbatch, CERN itscrd, Juwels Cluster). - # Embed device code for 70, and PTX for 70+. - # Export MADGRAPH_CUDA_ARCHITECTURE (comma-separated list) to use another value or list of values (see #533). - # Examples: use 60 for P100 (Piz Daint), 80 for A100 (Juwels Booster, NVidia raplab/Curiosity). - MADGRAPH_CUDA_ARCHITECTURE ?= 70 - ###CUARCHFLAGS = -gencode arch=compute_$(MADGRAPH_CUDA_ARCHITECTURE),code=compute_$(MADGRAPH_CUDA_ARCHITECTURE) -gencode arch=compute_$(MADGRAPH_CUDA_ARCHITECTURE),code=sm_$(MADGRAPH_CUDA_ARCHITECTURE) # Older implementation (AV): go back to this one for multi-GPU support #533 - ###CUARCHFLAGS = --gpu-architecture=compute_$(MADGRAPH_CUDA_ARCHITECTURE) --gpu-code=sm_$(MADGRAPH_CUDA_ARCHITECTURE),compute_$(MADGRAPH_CUDA_ARCHITECTURE) # Newer implementation (SH): cannot use this as-is for multi-GPU support #533 - comma:=, - CUARCHFLAGS = $(foreach arch,$(subst $(comma), ,$(MADGRAPH_CUDA_ARCHITECTURE)),-gencode arch=compute_$(arch),code=compute_$(arch) -gencode arch=compute_$(arch),code=sm_$(arch)) - CUINC = -I$(CUDA_HOME)/include/ - ifeq ($(RNDGEN),hasNoCurand) - CURANDLIBFLAGS= - else - CURANDLIBFLAGS = -L$(CUDA_HOME)/lib64/ -lcurand # NB: -lcuda is not needed here! - endif - CUOPTFLAGS = -lineinfo - CUFLAGS = $(foreach opt, $(OPTFLAGS), -Xcompiler $(opt)) $(CUOPTFLAGS) $(INCFLAGS) $(CUINC) $(USE_NVTX) $(CUARCHFLAGS) -use_fast_math - ###CUFLAGS += -Xcompiler -Wall -Xcompiler -Wextra -Xcompiler -Wshadow - ###NVCC_VERSION = $(shell $(NVCC) --version | grep 'Cuda compilation tools' | cut -d' ' -f5 | cut -d, -f1) - CUFLAGS += -std=c++17 # need CUDA >= 11.2 (see #333): this is enforced in mgOnGpuConfig.h - # Without -maxrregcount: baseline throughput: 6.5E8 (16384 32 12) up to 7.3E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 160 # improves throughput: 6.9E8 (16384 32 12) up to 7.7E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 128 # improves throughput: 7.3E8 (16384 32 12) up to 7.6E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 96 # degrades throughput: 4.1E8 (16384 32 12) up to 4.5E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 64 # degrades throughput: 1.7E8 (16384 32 12) flat at 1.7E8 (65536 128 12) -else ifneq ($(origin REQUIRE_CUDA),undefined) - # If REQUIRE_CUDA is set but no cuda is found, stop here (e.g. for CI tests on GPU #443) - $(error No cuda installation found (set CUDA_HOME or make nvcc visible in PATH)) -else - # No cuda. Switch cuda compilation off and go to common random numbers in C++ - $(warning CUDA_HOME is not set or is invalid: export CUDA_HOME to compile with cuda) - override NVCC= - override USE_NVTX= - override CUINC= - override CURANDLIBFLAGS= -endif -export NVCC -export CUFLAGS - -# Set the host C++ compiler for nvcc via "-ccbin " -# (NB issue #505: this must be a single word, "clang++ --gcc-toolchain..." is not supported) -CUFLAGS += -ccbin $(shell which $(subst ccache ,,$(CXX))) - -# Allow newer (unsupported) C++ compilers with older versions of CUDA if ALLOW_UNSUPPORTED_COMPILER_IN_CUDA is set (#504) -ifneq ($(origin ALLOW_UNSUPPORTED_COMPILER_IN_CUDA),undefined) -CUFLAGS += -allow-unsupported-compiler -endif - -#------------------------------------------------------------------------------- - -#=== Configure ccache for C++ and CUDA builds - -# Enable ccache if USECCACHE=1 -ifeq ($(USECCACHE)$(shell echo $(CXX) | grep ccache),1) - override CXX:=ccache $(CXX) -endif -#ifeq ($(USECCACHE)$(shell echo $(AR) | grep ccache),1) -# override AR:=ccache $(AR) -#endif -ifneq ($(NVCC),) - ifeq ($(USECCACHE)$(shell echo $(NVCC) | grep ccache),1) - override NVCC:=ccache $(NVCC) - endif -endif - -#------------------------------------------------------------------------------- - -#=== Configure PowerPC-specific compiler flags for C++ and CUDA - -# PowerPC-specific CXX compiler flags (being reviewed) -ifeq ($(UNAME_P),ppc64le) - CXXFLAGS+= -mcpu=power9 -mtune=power9 # gains ~2-3% both for none and sse4 - # Throughput references without the extra flags below: none=1.41-1.42E6, sse4=2.15-2.19E6 - ###CXXFLAGS+= -DNO_WARN_X86_INTRINSICS # no change - ###CXXFLAGS+= -fpeel-loops # no change - ###CXXFLAGS+= -funroll-loops # gains ~1% for none, loses ~1% for sse4 - ###CXXFLAGS+= -ftree-vectorize # no change - ###CXXFLAGS+= -flto # would increase to none=4.08-4.12E6, sse4=4.99-5.03E6! -else - ###CXXFLAGS+= -flto # also on Intel this would increase throughputs by a factor 2 to 4... - ######CXXFLAGS+= -fno-semantic-interposition # no benefit (neither alone, nor combined with -flto) -endif - -# PowerPC-specific CUDA compiler flags (to be reviewed!) -ifeq ($(UNAME_P),ppc64le) - CUFLAGS+= -Xcompiler -mno-float128 -endif - -#------------------------------------------------------------------------------- - #=== Configure defaults and check if user-defined choices exist for OMPFLAGS, AVX, FPTYPE, HELINL, HRDCOD, RNDGEN # Set the default OMPFLAGS choice -ifneq ($(shell $(CXX) --version | egrep '^Intel'),) -override OMPFLAGS = -fopenmp -###override OMPFLAGS = # disable OpenMP MT on Intel (was ok without nvcc but not ok with nvcc before #578) -else ifneq ($(shell $(CXX) --version | egrep '^(clang)'),) -override OMPFLAGS = -fopenmp -###override OMPFLAGS = # disable OpenMP MT on clang (was not ok without or with nvcc before #578) -###else ifneq ($(shell $(CXX) --version | egrep '^(Apple clang)'),) # AV for Mac (Apple clang compiler) -else ifeq ($(UNAME_S),Darwin) # OM for Mac (any compiler) +OMPFLAGS ?= -fopenmp +ifeq ($(UNAME_S),Darwin) # OM for Mac (any compiler) override OMPFLAGS = # AV disable OpenMP MT on Apple clang (builds fail in the CI #578) -###override OMPFLAGS = -fopenmp # OM reenable OpenMP MT on Apple clang? (AV Oct 2023: this still fails in the CI) -else -override OMPFLAGS = -fopenmp # enable OpenMP MT by default on all other platforms -###override OMPFLAGS = # disable OpenMP MT on all other platforms (default before #575) -endif - -# Set the default AVX (vectorization) choice -ifeq ($(AVX),) - ifeq ($(UNAME_P),ppc64le) - ###override AVX = none - override AVX = sse4 - else ifeq ($(UNAME_P),arm) - ###override AVX = none - override AVX = sse4 - else ifeq ($(wildcard /proc/cpuinfo),) - override AVX = none - $(warning Using AVX='$(AVX)' because host SIMD features cannot be read from /proc/cpuinfo) - else ifeq ($(shell grep -m1 -c avx512vl /proc/cpuinfo)$(shell $(CXX) --version | grep ^clang),1) - override AVX = 512y - ###$(info Using AVX='$(AVX)' as no user input exists) - else - override AVX = avx2 - ifneq ($(shell grep -m1 -c avx512vl /proc/cpuinfo),1) - $(warning Using AVX='$(AVX)' because host does not support avx512vl) - else - $(warning Using AVX='$(AVX)' because this is faster than avx512vl for clang) - endif - endif -else - ###$(info Using AVX='$(AVX)' according to user input) -endif - -# Set the default FPTYPE (floating point type) choice -ifeq ($(FPTYPE),) - override FPTYPE = d -endif - -# Set the default HELINL (inline helicities?) choice -ifeq ($(HELINL),) - override HELINL = 0 -endif - -# Set the default HRDCOD (hardcode cIPD physics parameters?) choice -ifeq ($(HRDCOD),) - override HRDCOD = 0 -endif - -# Set the default RNDGEN (random number generator) choice -ifeq ($(RNDGEN),) - ifeq ($(NVCC),) - override RNDGEN = hasNoCurand - else ifeq ($(RNDGEN),) - override RNDGEN = hasCurand - endif endif -# Export AVX, FPTYPE, HELINL, HRDCOD, RNDGEN, OMPFLAGS so that it is not necessary to pass them to the src Makefile too -export AVX -export FPTYPE -export HELINL -export HRDCOD -export RNDGEN +# Export here, so sub makes don't fall back to the defaults: export OMPFLAGS -#------------------------------------------------------------------------------- - -#=== Set the CUDA/C++ compiler flags appropriate to user-defined choices of AVX, FPTYPE, HELINL, HRDCOD, RNDGEN - -# Set the build flags appropriate to OMPFLAGS -$(info OMPFLAGS=$(OMPFLAGS)) -CXXFLAGS += $(OMPFLAGS) - -# Set the build flags appropriate to each AVX choice (example: "make AVX=none") -# [NB MGONGPU_PVW512 is needed because "-mprefer-vector-width=256" is not exposed in a macro] -# [See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96476] -$(info AVX=$(AVX)) -ifeq ($(UNAME_P),ppc64le) - ifeq ($(AVX),sse4) - override AVXFLAGS = -D__SSE4_2__ # Power9 VSX with 128 width (VSR registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on PowerPC for the moment) - endif -else ifeq ($(UNAME_P),arm) - ifeq ($(AVX),sse4) - override AVXFLAGS = -D__SSE4_2__ # ARM NEON with 128 width (Q/quadword registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on ARM for the moment) - endif -else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 - ifeq ($(AVX),none) - override AVXFLAGS = -mno-sse3 # no SIMD - else ifeq ($(AVX),sse4) - override AVXFLAGS = -mno-avx # SSE4.2 with 128 width (xmm registers) - else ifeq ($(AVX),avx2) - override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(AVX),512y) - override AVXFLAGS = -march=skylake -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(AVX),512z) - override AVXFLAGS = -march=skylake -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) - else - $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) - endif -else - ifeq ($(AVX),none) - override AVXFLAGS = -march=x86-64 # no SIMD (see #588) - else ifeq ($(AVX),sse4) - override AVXFLAGS = -march=nehalem # SSE4.2 with 128 width (xmm registers) - else ifeq ($(AVX),avx2) - override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(AVX),512y) - override AVXFLAGS = -march=skylake-avx512 -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(AVX),512z) - override AVXFLAGS = -march=skylake-avx512 -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) - else - $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) - endif -endif -# For the moment, use AVXFLAGS everywhere: eventually, use them only in encapsulated implementations? -CXXFLAGS+= $(AVXFLAGS) - -# Set the build flags appropriate to each FPTYPE choice (example: "make FPTYPE=f") -$(info FPTYPE=$(FPTYPE)) -ifeq ($(FPTYPE),d) - CXXFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_DOUBLE - CUFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_DOUBLE -else ifeq ($(FPTYPE),f) - CXXFLAGS += -DMGONGPU_FPTYPE_FLOAT -DMGONGPU_FPTYPE2_FLOAT - CUFLAGS += -DMGONGPU_FPTYPE_FLOAT -DMGONGPU_FPTYPE2_FLOAT -else ifeq ($(FPTYPE),m) - CXXFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_FLOAT - CUFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_FLOAT -else - $(error Unknown FPTYPE='$(FPTYPE)': only 'd', 'f' and 'm' are supported) -endif - -# Set the build flags appropriate to each HELINL choice (example: "make HELINL=1") -$(info HELINL=$(HELINL)) -ifeq ($(HELINL),1) - CXXFLAGS += -DMGONGPU_INLINE_HELAMPS - CUFLAGS += -DMGONGPU_INLINE_HELAMPS -else ifneq ($(HELINL),0) - $(error Unknown HELINL='$(HELINL)': only '0' and '1' are supported) -endif - -# Set the build flags appropriate to each HRDCOD choice (example: "make HRDCOD=1") -$(info HRDCOD=$(HRDCOD)) -ifeq ($(HRDCOD),1) - CXXFLAGS += -DMGONGPU_HARDCODE_PARAM - CUFLAGS += -DMGONGPU_HARDCODE_PARAM -else ifneq ($(HRDCOD),0) - $(error Unknown HRDCOD='$(HRDCOD)': only '0' and '1' are supported) -endif - -# Set the build flags appropriate to each RNDGEN choice (example: "make RNDGEN=hasNoCurand") -$(info RNDGEN=$(RNDGEN)) -ifeq ($(RNDGEN),hasNoCurand) - override CXXFLAGSCURAND = -DMGONGPU_HAS_NO_CURAND -else ifeq ($(RNDGEN),hasCurand) - override CXXFLAGSCURAND = -else - $(error Unknown RNDGEN='$(RNDGEN)': only 'hasCurand' and 'hasNoCurand' are supported) -endif +MG_CXXFLAGS += $(OMPFLAGS) #------------------------------------------------------------------------------- #=== Configure build directories and build lockfiles === -# Build directory "short" tag (defines target and path to the optional build directory) -# (Rationale: keep directory names shorter, e.g. do not include random number generator choice) -override DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) - -# Build lockfile "full" tag (defines full specification of build options that cannot be intermixed) -# (Rationale: avoid mixing of CUDA and no-CUDA environment builds with different random number generators) -override TAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) - -# Build directory: current directory by default, or build.$(DIRTAG) if USEBUILDDIR==1 -ifeq ($(USEBUILDDIR),1) - override BUILDDIR = build.$(DIRTAG) - override LIBDIR = ../../lib/$(BUILDDIR) - override LIBDIRRPATH = '$$ORIGIN/../$(LIBDIR)' - $(info Building in BUILDDIR=$(BUILDDIR) for tag=$(TAG) (USEBUILDDIR is set = 1)) -else - override BUILDDIR = . - override LIBDIR = ../../lib - override LIBDIRRPATH = '$$ORIGIN/$(LIBDIR)' - $(info Building in BUILDDIR=$(BUILDDIR) for tag=$(TAG) (USEBUILDDIR is not set)) +# Build directory "short" tag (defines target and path to the build directory) +DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) +CUDACPP_BUILDDIR = build.$(DIRTAG) +CUDACPP_LIBDIR := ../../lib/$(CUDACPP_BUILDDIR) +LIBDIRRPATH := '$$ORIGIN:$$ORIGIN/../$(CUDACPP_LIBDIR)' +ifneq ($(AVX),) + $(info Building CUDACPP in CUDACPP_BUILDDIR=$(CUDACPP_BUILDDIR). Libs in $(CUDACPP_LIBDIR)) endif -###override INCDIR = ../../include -###$(info Building in BUILDDIR=$(BUILDDIR) for tag=$(TAG)) -# On Linux, set rpath to LIBDIR to make it unnecessary to use LD_LIBRARY_PATH +# On Linux, set rpath to CUDACPP_LIBDIR to make it unnecessary to use LD_LIBRARY_PATH # Use relative paths with respect to the executables or shared libraries ($ORIGIN on Linux) -# On Darwin, building libraries with absolute paths in LIBDIR makes this unnecessary +# On Darwin, building libraries with absolute paths in CUDACPP_LIBDIR makes this unnecessary ifeq ($(UNAME_S),Darwin) override CXXLIBFLAGSRPATH = override CULIBFLAGSRPATH = - override CXXLIBFLAGSRPATH2 = - override CULIBFLAGSRPATH2 = else # RPATH to cuda/cpp libs when linking executables override CXXLIBFLAGSRPATH = -Wl,-rpath,$(LIBDIRRPATH) override CULIBFLAGSRPATH = -Xlinker -rpath,$(LIBDIRRPATH) - # RPATH to common lib when linking cuda/cpp libs - override CXXLIBFLAGSRPATH2 = -Wl,-rpath,'$$ORIGIN' - override CULIBFLAGSRPATH2 = -Xlinker -rpath,'$$ORIGIN' endif # Setting LD_LIBRARY_PATH or DYLD_LIBRARY_PATH in the RUNTIME is no longer necessary (neither on Linux nor on Mac) @@ -458,107 +129,68 @@ override RUNTIME = #=== Makefile TARGETS and build rules below #=============================================================================== -cxx_main=$(BUILDDIR)/check.exe -fcxx_main=$(BUILDDIR)/fcheck.exe +cxx_main=$(CUDACPP_BUILDDIR)/check.exe +fcxx_main=$(CUDACPP_BUILDDIR)/fcheck.exe -ifneq ($(NVCC),) -cu_main=$(BUILDDIR)/gcheck.exe -fcu_main=$(BUILDDIR)/fgcheck.exe -else -cu_main= -fcu_main= -endif - -testmain=$(BUILDDIR)/runTest.exe +cu_main=$(CUDACPP_BUILDDIR)/gcheck.exe +fcu_main=$(CUDACPP_BUILDDIR)/fgcheck.exe ifneq ($(GTESTLIBS),) -all.$(TAG): $(BUILDDIR)/.build.$(TAG) $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_main) $(cxx_main) $(fcu_main) $(fcxx_main) $(testmain) -else -all.$(TAG): $(BUILDDIR)/.build.$(TAG) $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_main) $(cxx_main) $(fcu_main) $(fcxx_main) +testmain=$(CUDACPP_BUILDDIR)/runTest.exe +cutestmain=$(CUDACPP_BUILDDIR)/runTest_cuda.exe endif -# Target (and build options): debug -MAKEDEBUG= -debug: OPTFLAGS = -g -O0 -debug: CUOPTFLAGS = -G -debug: MAKEDEBUG := debug -debug: all.$(TAG) - -# Target: tag-specific build lockfiles -override oldtagsb=`if [ -d $(BUILDDIR) ]; then find $(BUILDDIR) -maxdepth 1 -name '.build.*' ! -name '.build.$(TAG)' -exec echo $(shell pwd)/{} \; ; fi` -$(BUILDDIR)/.build.$(TAG): - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - @if [ "$(oldtagsb)" != "" ]; then echo "Cannot build for tag=$(TAG) as old builds exist for other tags:"; echo " $(oldtagsb)"; echo "Please run 'make clean' first\nIf 'make clean' is not enough: run 'make clean USEBUILDDIR=1 AVX=$(AVX) FPTYPE=$(FPTYPE)' or 'make cleanall'"; exit 1; fi - @touch $(BUILDDIR)/.build.$(TAG) +cppbuild: $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(cxx_main) $(fcxx_main) $(testmain) +cudabuild: $(CUDACPP_BUILDDIR)/$(PROG)_cuda $(cu_main) $(fcu_main) $(cutestmain) # Generic target and build rules: objects from CUDA compilation -ifneq ($(NVCC),) -$(BUILDDIR)/%.o : %.cu *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c $< -o $@ +$(CUDACPP_BUILDDIR)/%.o : %.cu *.h ../../src/*.h + @mkdir -p $(CUDACPP_BUILDDIR) + $(NVCC) $(MG_NVCCFLAGS) $(NVCCFLAGS) -c $< -o $@ -$(BUILDDIR)/%_cu.o : %.cc *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c -x cu $< -o $@ -endif +$(CUDACPP_BUILDDIR)/%_cu.o : %.cc *.h ../../src/*.h + @mkdir -p $(CUDACPP_BUILDDIR) + $(NVCC) $(MG_NVCCFLAGS) $(NVCCFLAGS) -c -x cu $< -o $@ # Generic target and build rules: objects from C++ compilation # (NB do not include CUINC here! add it only for NVTX or curand #679) -$(BUILDDIR)/%.o : %.cc *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - $(CXX) $(CPPFLAGS) $(CXXFLAGS) -fPIC -c $< -o $@ +$(CUDACPP_BUILDDIR)/%.o : %.cc *.h ../../src/*.h + @mkdir -p $(CUDACPP_BUILDDIR) + $(CXX) $(MG_CXXFLAGS) $(CXXFLAGS) -c $< -o $@ # Apply special build flags only to CrossSectionKernel.cc and gCrossSectionKernel.cu (no fast math, see #117 and #516) ifeq ($(shell $(CXX) --version | grep ^nvc++),) -$(BUILDDIR)/CrossSectionKernels.o: CXXFLAGS := $(filter-out -ffast-math,$(CXXFLAGS)) -$(BUILDDIR)/CrossSectionKernels.o: CXXFLAGS += -fno-fast-math +$(CUDACPP_BUILDDIR)/CrossSectionKernels.o: CXXFLAGS += -fno-fast-math ifneq ($(NVCC),) -$(BUILDDIR)/gCrossSectionKernels.o: CUFLAGS += -Xcompiler -fno-fast-math +$(CUDACPP_BUILDDIR)/gCrossSectionKernels.o: NVCCFLAGS += -Xcompiler -fno-fast-math endif endif # Apply special build flags only to check_sa.o and gcheck_sa.o (NVTX in timermap.h, #679) -$(BUILDDIR)/check_sa.o: CXXFLAGS += $(USE_NVTX) $(CUINC) -$(BUILDDIR)/gcheck_sa.o: CXXFLAGS += $(USE_NVTX) $(CUINC) +$(CUDACPP_BUILDDIR)/check_sa.o: MG_CXXFLAGS += $(USE_NVTX) $(CUINC) +$(CUDACPP_BUILDDIR)/gcheck_sa.o: MG_CXXFLAGS += $(USE_NVTX) $(CUINC) # Apply special build flags only to check_sa and CurandRandomNumberKernel (curand headers, #679) -$(BUILDDIR)/check_sa.o: CXXFLAGS += $(CXXFLAGSCURAND) -$(BUILDDIR)/gcheck_sa.o: CUFLAGS += $(CXXFLAGSCURAND) -$(BUILDDIR)/CurandRandomNumberKernel.o: CXXFLAGS += $(CXXFLAGSCURAND) -$(BUILDDIR)/gCurandRandomNumberKernel.o: CUFLAGS += $(CXXFLAGSCURAND) -ifeq ($(RNDGEN),hasCurand) -$(BUILDDIR)/CurandRandomNumberKernel.o: CXXFLAGS += $(CUINC) -endif +$(CUDACPP_BUILDDIR)/check_sa.o: MG_CXXFLAGS += $(CXXFLAGSCURAND) +$(CUDACPP_BUILDDIR)/gcheck_sa.o: MG_NVCCFLAGS += $(CXXFLAGSCURAND) +$(CUDACPP_BUILDDIR)/CurandRandomNumberKernel.o: MG_CXXFLAGS += $(CXXFLAGSCURAND) +$(CUDACPP_BUILDDIR)/gCurandRandomNumberKernel.o: MG_NVCCFLAGS += $(CXXFLAGSCURAND) + # Avoid "warning: builtin __has_trivial_... is deprecated; use __is_trivially_... instead" in nvcc with icx2023 (#592) ifneq ($(shell $(CXX) --version | egrep '^(Intel)'),) ifneq ($(NVCC),) -CUFLAGS += -Xcompiler -Wno-deprecated-builtins +MG_NVCCFLAGS += -Xcompiler -Wno-deprecated-builtins endif endif -# Avoid clang warning "overriding '-ffp-contract=fast' option with '-ffp-contract=on'" (#516) -# This patch does remove the warning, but I prefer to keep it disabled for the moment... -###ifneq ($(shell $(CXX) --version | egrep '^(clang|Apple clang|Intel)'),) -###$(BUILDDIR)/CrossSectionKernels.o: CXXFLAGS += -Wno-overriding-t-option -###ifneq ($(NVCC),) -###$(BUILDDIR)/gCrossSectionKernels.o: CUFLAGS += -Xcompiler -Wno-overriding-t-option -###endif -###endif - #### Apply special build flags only to CPPProcess.cc (-flto) ###$(BUILDDIR)/CPPProcess.o: CXXFLAGS += -flto -#### Apply special build flags only to CPPProcess.cc (AVXFLAGS) -###$(BUILDDIR)/CPPProcess.o: CXXFLAGS += $(AVXFLAGS) - #------------------------------------------------------------------------------- -# Target (and build rules): common (src) library -commonlib : $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so - -$(LIBDIR)/lib$(MG5AMC_COMMONLIB).so: ../../src/*.h ../../src/*.cc $(BUILDDIR)/.build.$(TAG) - $(MAKE) -C ../../src $(MAKEDEBUG) -f $(CUDACPP_SRC_MAKEFILE) +$(CUDACPP_LIBDIR)/lib$(MG5AMC_COMMONLIB).so: ../../src/*.h ../../src/*.cc + $(MAKE) AVX=$(AVX) AVXFLAGS="$(AVXFLAGS)" -C ../../src -f $(CUDACPP_SRC_MAKEFILE) #------------------------------------------------------------------------------- @@ -566,162 +198,123 @@ processid_short=$(shell basename $(CURDIR) | awk -F_ '{print $$(NF-1)"_"$$NF}') ###$(info processid_short=$(processid_short)) MG5AMC_CXXLIB = mg5amc_$(processid_short)_cpp -cxx_objects_lib=$(BUILDDIR)/CPPProcess.o $(BUILDDIR)/MatrixElementKernels.o $(BUILDDIR)/BridgeKernels.o $(BUILDDIR)/CrossSectionKernels.o -cxx_objects_exe=$(BUILDDIR)/CommonRandomNumberKernel.o $(BUILDDIR)/RamboSamplingKernels.o +cxx_objects_lib=$(CUDACPP_BUILDDIR)/CPPProcess.o $(CUDACPP_BUILDDIR)/MatrixElementKernels.o $(CUDACPP_BUILDDIR)/BridgeKernels.o $(CUDACPP_BUILDDIR)/CrossSectionKernels.o +cxx_objects_exe=$(CUDACPP_BUILDDIR)/CommonRandomNumberKernel.o $(CUDACPP_BUILDDIR)/RamboSamplingKernels.o -ifneq ($(NVCC),) MG5AMC_CULIB = mg5amc_$(processid_short)_cuda -cu_objects_lib=$(BUILDDIR)/gCPPProcess.o $(BUILDDIR)/gMatrixElementKernels.o $(BUILDDIR)/gBridgeKernels.o $(BUILDDIR)/gCrossSectionKernels.o -cu_objects_exe=$(BUILDDIR)/gCommonRandomNumberKernel.o $(BUILDDIR)/gRamboSamplingKernels.o -endif +cu_objects_lib=$(CUDACPP_BUILDDIR)/gCPPProcess.o $(CUDACPP_BUILDDIR)/gMatrixElementKernels.o $(CUDACPP_BUILDDIR)/gBridgeKernels.o $(CUDACPP_BUILDDIR)/gCrossSectionKernels.o +cu_objects_exe=$(CUDACPP_BUILDDIR)/gCommonRandomNumberKernel.o $(CUDACPP_BUILDDIR)/gRamboSamplingKernels.o # Target (and build rules): C++ and CUDA shared libraries -$(LIBDIR)/lib$(MG5AMC_CXXLIB).so: $(BUILDDIR)/fbridge.o -$(LIBDIR)/lib$(MG5AMC_CXXLIB).so: cxx_objects_lib += $(BUILDDIR)/fbridge.o -$(LIBDIR)/lib$(MG5AMC_CXXLIB).so: $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cxx_objects_lib) - $(CXX) -shared -o $@ $(cxx_objects_lib) $(CXXLIBFLAGSRPATH2) -L$(LIBDIR) -l$(MG5AMC_COMMONLIB) - -ifneq ($(NVCC),) -$(LIBDIR)/lib$(MG5AMC_CULIB).so: $(BUILDDIR)/fbridge_cu.o -$(LIBDIR)/lib$(MG5AMC_CULIB).so: cu_objects_lib += $(BUILDDIR)/fbridge_cu.o -$(LIBDIR)/lib$(MG5AMC_CULIB).so: $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_objects_lib) - $(NVCC) --shared -o $@ $(cu_objects_lib) $(CULIBFLAGSRPATH2) -L$(LIBDIR) -l$(MG5AMC_COMMONLIB) -endif +$(CUDACPP_BUILDDIR)/lib$(MG5AMC_CXXLIB).so: $(CUDACPP_BUILDDIR)/fbridge.o +$(CUDACPP_BUILDDIR)/lib$(MG5AMC_CXXLIB).so: cxx_objects_lib += $(CUDACPP_BUILDDIR)/fbridge.o +$(CUDACPP_BUILDDIR)/lib$(MG5AMC_CXXLIB).so: $(CUDACPP_LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cxx_objects_lib) + $(CXX) -shared -o $@ $(cxx_objects_lib) $(CXXLIBFLAGSRPATH) -L$(CUDACPP_LIBDIR) -l$(MG5AMC_COMMONLIB) $(MG_LDFLAGS) $(LDFLAGS) -#------------------------------------------------------------------------------- - -# Target (and build rules): Fortran include files -###$(INCDIR)/%.inc : ../%.inc -### @if [ ! -d $(INCDIR) ]; then echo "mkdir -p $(INCDIR)"; mkdir -p $(INCDIR); fi -### \cp $< $@ +$(CUDACPP_BUILDDIR)/lib$(MG5AMC_CULIB).so: $(CUDACPP_BUILDDIR)/fbridge_cu.o +$(CUDACPP_BUILDDIR)/lib$(MG5AMC_CULIB).so: cu_objects_lib += $(CUDACPP_BUILDDIR)/fbridge_cu.o +$(CUDACPP_BUILDDIR)/lib$(MG5AMC_CULIB).so: $(CUDACPP_LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_objects_lib) + $(NVCC) --shared -o $@ $(cu_objects_lib) $(CULIBFLAGSRPATH) -L$(CUDACPP_LIBDIR) -l$(MG5AMC_COMMONLIB) #------------------------------------------------------------------------------- # Target (and build rules): C++ and CUDA standalone executables -$(cxx_main): LIBFLAGS += $(CXXLIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH -$(cxx_main): $(BUILDDIR)/check_sa.o $(LIBDIR)/lib$(MG5AMC_CXXLIB).so $(cxx_objects_exe) $(BUILDDIR)/CurandRandomNumberKernel.o - $(CXX) -o $@ $(BUILDDIR)/check_sa.o $(OMPFLAGS) -ldl -pthread $(LIBFLAGS) -L$(LIBDIR) -l$(MG5AMC_CXXLIB) $(cxx_objects_exe) $(BUILDDIR)/CurandRandomNumberKernel.o $(CURANDLIBFLAGS) -ifneq ($(NVCC),) +$(cxx_main): MG_LDFLAGS += $(CXXLIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH +$(cxx_main): MG_LDFLAGS += -L$(CUDACPP_BUILDDIR) -l$(MG5AMC_CXXLIB) # Process-specific library +$(cxx_main): $(CUDACPP_BUILDDIR)/check_sa.o $(CUDACPP_BUILDDIR)/lib$(MG5AMC_CXXLIB).so $(cxx_objects_exe) $(CUDACPP_BUILDDIR)/CurandRandomNumberKernel.o + $(CXX) -o $@ $(CUDACPP_BUILDDIR)/check_sa.o $(OMPFLAGS) -ldl -pthread $(cxx_objects_exe) $(CUDACPP_BUILDDIR)/CurandRandomNumberKernel.o $(MG_LDFLAGS) $(LDFLAGS) + ifneq ($(shell $(CXX) --version | grep ^Intel),) -$(cu_main): LIBFLAGS += -lintlc # compile with icpx and link with nvcc (undefined reference to `_intel_fast_memcpy') -$(cu_main): LIBFLAGS += -lsvml # compile with icpx and link with nvcc (undefined reference to `__svml_cos4_l9') +$(cu_main): MG_LDFLAGS += -lintlc # compile with icpx and link with nvcc (undefined reference to `_intel_fast_memcpy') +$(cu_main): MG_LDFLAGS += -lsvml # compile with icpx and link with nvcc (undefined reference to `__svml_cos4_l9') else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 -$(cu_main): LIBFLAGS += -L$(patsubst %bin/nvc++,%lib,$(subst ccache ,,$(CXX))) -lnvhpcatm -lnvcpumath -lnvc -endif -$(cu_main): LIBFLAGS += $(CULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH -$(cu_main): $(BUILDDIR)/gcheck_sa.o $(LIBDIR)/lib$(MG5AMC_CULIB).so $(cu_objects_exe) $(BUILDDIR)/gCurandRandomNumberKernel.o - $(NVCC) -o $@ $(BUILDDIR)/gcheck_sa.o $(CUARCHFLAGS) $(LIBFLAGS) -L$(LIBDIR) -l$(MG5AMC_CULIB) $(cu_objects_exe) $(BUILDDIR)/gCurandRandomNumberKernel.o $(CURANDLIBFLAGS) +$(cu_main): MG_LDFLAGS += -L$(patsubst %bin/nvc++,%lib,$(subst ccache ,,$(CXX))) -lnvhpcatm -lnvcpumath -lnvc endif +$(cu_main): MG_LDFLAGS += $(CULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH +$(cu_main): MG_LDFLAGS += -L$(CUDACPP_BUILDDIR) -l$(MG5AMC_CULIB) # Process-specific library +$(cu_main): $(CUDACPP_BUILDDIR)/gcheck_sa.o $(CUDACPP_BUILDDIR)/lib$(MG5AMC_CULIB).so $(cu_objects_exe) $(CUDACPP_BUILDDIR)/gCurandRandomNumberKernel.o + $(NVCC) -o $@ $(CUDACPP_BUILDDIR)/gcheck_sa.o $(CUARCHFLAGS) $(cu_objects_exe) $(CUDACPP_BUILDDIR)/gCurandRandomNumberKernel.o $(MG_LDFLAGS) $(LDFLAGS) #------------------------------------------------------------------------------- - -# Generic target and build rules: objects from Fortran compilation -$(BUILDDIR)/%.o : %.f *.inc - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - $(FC) -I. -c $< -o $@ - -# Generic target and build rules: objects from Fortran compilation -###$(BUILDDIR)/%.o : %.f *.inc -### @if [ ! -d $(INCDIR) ]; then echo "mkdir -p $(INCDIR)"; mkdir -p $(INCDIR); fi -### @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi -### $(FC) -I. -I$(INCDIR) -c $< -o $@ - -# Target (and build rules): Fortran standalone executables -###$(BUILDDIR)/fcheck_sa.o : $(INCDIR)/fbridge.inc +# Check executables: ifeq ($(UNAME_S),Darwin) -$(fcxx_main): LIBFLAGS += -L$(shell dirname $(shell $(FC) --print-file-name libgfortran.dylib)) # add path to libgfortran on Mac #375 +$(fcxx_main): MG_LDFLAGS += -L$(shell dirname $(shell $(FC) --print-file-name libgfortran.dylib)) # add path to libgfortran on Mac #375 endif -$(fcxx_main): LIBFLAGS += $(CXXLIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH -$(fcxx_main): $(BUILDDIR)/fcheck_sa.o $(BUILDDIR)/fsampler.o $(LIBDIR)/lib$(MG5AMC_CXXLIB).so $(cxx_objects_exe) - $(CXX) -o $@ $(BUILDDIR)/fcheck_sa.o $(OMPFLAGS) $(BUILDDIR)/fsampler.o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_CXXLIB) $(cxx_objects_exe) +$(fcxx_main): MG_LDFLAGS += $(CXXLIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH +$(fcxx_main): MG_LDFLAGS += -L$(CUDACPP_BUILDDIR) -l$(MG5AMC_CXXLIB) # Process-specific library +$(fcxx_main): $(CUDACPP_BUILDDIR)/fcheck_sa.o $(CUDACPP_BUILDDIR)/fsampler.o $(CUDACPP_BUILDDIR)/lib$(MG5AMC_CXXLIB).so $(cxx_objects_exe) + $(CXX) -o $@ $(CUDACPP_BUILDDIR)/fcheck_sa.o $(cxx_objects_exe) $(OMPFLAGS) $(CUDACPP_BUILDDIR)/fsampler.o -lgfortran -L$(CUDACPP_LIBDIR) $(MG_LDFLAGS) $(LDFLAGS) -ifneq ($(NVCC),) ifneq ($(shell $(CXX) --version | grep ^Intel),) -$(fcu_main): LIBFLAGS += -lintlc # compile with icpx and link with nvcc (undefined reference to `_intel_fast_memcpy') -$(fcu_main): LIBFLAGS += -lsvml # compile with icpx and link with nvcc (undefined reference to `__svml_cos4_l9') +$(fcu_main): MG_LDFLAGS += -lintlc # compile with icpx and link with nvcc (undefined reference to `_intel_fast_memcpy') +$(fcu_main): MG_LDFLAGS += -lsvml # compile with icpx and link with nvcc (undefined reference to `__svml_cos4_l9') endif ifeq ($(UNAME_S),Darwin) -$(fcu_main): LIBFLAGS += -L$(shell dirname $(shell $(FC) --print-file-name libgfortran.dylib)) # add path to libgfortran on Mac #375 -endif -$(fcu_main): LIBFLAGS += $(CULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH -$(fcu_main): $(BUILDDIR)/fcheck_sa.o $(BUILDDIR)/fsampler_cu.o $(LIBDIR)/lib$(MG5AMC_CULIB).so $(cu_objects_exe) - $(NVCC) -o $@ $(BUILDDIR)/fcheck_sa.o $(BUILDDIR)/fsampler_cu.o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_CULIB) $(cu_objects_exe) +$(fcu_main): MG_LDFLAGS += -L$(shell dirname $(shell $(FC) --print-file-name libgfortran.dylib)) # add path to libgfortran on Mac #375 endif +$(fcu_main): MG_LDFLAGS += $(CULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH +$(fcu_main): MG_LDFLAGS += -L$(CUDACPP_BUILDDIR) -l$(MG5AMC_CULIB) # Process-specific library +$(fcu_main): $(CUDACPP_BUILDDIR)/fcheck_sa.o $(CUDACPP_BUILDDIR)/fsampler_cu.o $(CUDACPP_BUILDDIR)/lib$(MG5AMC_CULIB).so $(cu_objects_exe) + $(NVCC) -o $@ $(CUDACPP_BUILDDIR)/fcheck_sa.o $(CUDACPP_BUILDDIR)/fsampler_cu.o $(cu_objects_exe) -lgfortran $(MG_LDFLAGS) $(LDFLAGS) #------------------------------------------------------------------------------- # Target (and build rules): test objects and test executable -$(BUILDDIR)/testxxx.o: $(GTESTLIBS) -$(BUILDDIR)/testxxx.o: INCFLAGS += $(GTESTINC) -$(BUILDDIR)/testxxx.o: testxxx_cc_ref.txt -$(testmain): $(BUILDDIR)/testxxx.o -$(testmain): cxx_objects_exe += $(BUILDDIR)/testxxx.o # Comment out this line to skip the C++ test of xxx functions -ifneq ($(NVCC),) -$(BUILDDIR)/testxxx_cu.o: $(GTESTLIBS) -$(BUILDDIR)/testxxx_cu.o: INCFLAGS += $(GTESTINC) -$(BUILDDIR)/testxxx_cu.o: testxxx_cc_ref.txt -$(testmain): $(BUILDDIR)/testxxx_cu.o -$(testmain): cu_objects_exe += $(BUILDDIR)/testxxx_cu.o # Comment out this line to skip the CUDA test of xxx functions -endif +$(testmain) $(cutestmain): $(GTESTLIBS) +$(testmain) $(cutestmain): INCFLAGS += $(GTESTINC) +$(testmain) $(cutestmain): MG_LDFLAGS += -L$(GTESTLIBDIR) -lgtest -lgtest_main -$(BUILDDIR)/testmisc.o: $(GTESTLIBS) -$(BUILDDIR)/testmisc.o: INCFLAGS += $(GTESTINC) -$(testmain): $(BUILDDIR)/testmisc.o -$(testmain): cxx_objects_exe += $(BUILDDIR)/testmisc.o # Comment out this line to skip the C++ miscellaneous tests +$(CUDACPP_BUILDDIR)/testxxx.o $(CUDACPP_BUILDDIR)/testxxx_cu.o: $(GTESTLIBS) testxxx_cc_ref.txt +$(testmain): $(CUDACPP_BUILDDIR)/testxxx.o +$(testmain): cxx_objects_exe += $(CUDACPP_BUILDDIR)/testxxx.o # Comment out this line to skip the C++ test of xxx functions +$(cutestmain): $(CUDACPP_BUILDDIR)/testxxx_cu.o +$(cutestmain): cu_objects_exe += $(CUDACPP_BUILDDIR)/testxxx_cu.o # Comment out this line to skip the CUDA test of xxx functions -ifneq ($(NVCC),) -$(BUILDDIR)/testmisc_cu.o: $(GTESTLIBS) -$(BUILDDIR)/testmisc_cu.o: INCFLAGS += $(GTESTINC) -$(testmain): $(BUILDDIR)/testmisc_cu.o -$(testmain): cu_objects_exe += $(BUILDDIR)/testmisc_cu.o # Comment out this line to skip the CUDA miscellaneous tests -endif -$(BUILDDIR)/runTest.o: $(GTESTLIBS) -$(BUILDDIR)/runTest.o: INCFLAGS += $(GTESTINC) -$(testmain): $(BUILDDIR)/runTest.o -$(testmain): cxx_objects_exe += $(BUILDDIR)/runTest.o +$(CUDACPP_BUILDDIR)/testmisc.o $(CUDACPP_BUILDDIR)/testmisc_cu.o: $(GTESTLIBS) +$(testmain): $(CUDACPP_BUILDDIR)/testmisc.o +$(testmain): cxx_objects_exe += $(CUDACPP_BUILDDIR)/testmisc.o # Comment out this line to skip the C++ miscellaneous tests +$(cutestmain): $(CUDACPP_BUILDDIR)/testmisc_cu.o +$(cutestmain): cu_objects_exe += $(CUDACPP_BUILDDIR)/testmisc_cu.o # Comment out this line to skip the CUDA miscellaneous tests + + +$(CUDACPP_BUILDDIR)/runTest.o $(CUDACPP_BUILDDIR)/runTest_cu.o: $(GTESTLIBS) +$(testmain): $(CUDACPP_BUILDDIR)/runTest.o +$(testmain): cxx_objects_exe += $(CUDACPP_BUILDDIR)/runTest.o +$(cutestmain): $(CUDACPP_BUILDDIR)/runTest_cu.o +$(cutestmain): cu_objects_exe += $(CUDACPP_BUILDDIR)/runTest_cu.o + -ifneq ($(NVCC),) -$(BUILDDIR)/runTest_cu.o: $(GTESTLIBS) -$(BUILDDIR)/runTest_cu.o: INCFLAGS += $(GTESTINC) ifneq ($(shell $(CXX) --version | grep ^Intel),) -$(testmain): LIBFLAGS += -lintlc # compile with icpx and link with nvcc (undefined reference to `_intel_fast_memcpy') -$(testmain): LIBFLAGS += -lsvml # compile with icpx and link with nvcc (undefined reference to `__svml_cos4_l9') +$(cutestmain): MG_LDFLAGS += -lintlc # compile with icpx and link with nvcc (undefined reference to `_intel_fast_memcpy') +$(cutestmain): MG_LDFLAGS += -lsvml # compile with icpx and link with nvcc (undefined reference to `__svml_cos4_l9') else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 -$(testmain): LIBFLAGS += -L$(patsubst %bin/nvc++,%lib,$(subst ccache ,,$(CXX))) -lnvhpcatm -lnvcpumath -lnvc -endif -$(testmain): $(BUILDDIR)/runTest_cu.o -$(testmain): cu_objects_exe += $(BUILDDIR)/runTest_cu.o +$(cutestmain): MG_LDFLAGS += -L$(patsubst %bin/nvc++,%lib,$(subst ccache ,,$(CXX))) -lnvhpcatm -lnvcpumath -lnvc endif -$(testmain): $(GTESTLIBS) -$(testmain): INCFLAGS += $(GTESTINC) -$(testmain): LIBFLAGS += -L$(GTESTLIBDIR) -lgtest -lgtest_main ifneq ($(OMPFLAGS),) ifneq ($(shell $(CXX) --version | egrep '^Intel'),) -$(testmain): LIBFLAGS += -liomp5 # see #578 (not '-qopenmp -static-intel' as in https://stackoverflow.com/questions/45909648) +$(testmain): MG_LDFLAGS += -liomp5 # see #578 (not '-qopenmp -static-intel' as in https://stackoverflow.com/questions/45909648) else ifneq ($(shell $(CXX) --version | egrep '^clang'),) -$(testmain): LIBFLAGS += -L $(shell dirname $(shell $(CXX) -print-file-name=libc++.so)) -lomp # see #604 +$(testmain): MG_LDFLAGS += -L $(shell dirname $(shell $(CXX) -print-file-name=libc++.so)) -lomp # see #604 ###else ifneq ($(shell $(CXX) --version | egrep '^Apple clang'),) ###$(testmain): LIBFLAGS += ???? # OMP is not supported yet by cudacpp for Apple clang (see #578 and #604) else -$(testmain): LIBFLAGS += -lgomp +$(testmain): MG_LDFLAGS += -lgomp endif endif -ifeq ($(NVCC),) # link only runTest.o -$(testmain): LIBFLAGS += $(CXXLIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH -$(testmain): $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cxx_objects_lib) $(cxx_objects_exe) $(GTESTLIBS) - $(CXX) -o $@ $(cxx_objects_lib) $(cxx_objects_exe) -ldl -pthread $(LIBFLAGS) -else # link both runTest.o and runTest_cu.o -$(testmain): LIBFLAGS += $(CULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH -$(testmain): $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cxx_objects_lib) $(cxx_objects_exe) $(cu_objects_lib) $(cu_objects_exe) $(GTESTLIBS) - $(NVCC) -o $@ $(cxx_objects_lib) $(cxx_objects_exe) $(cu_objects_lib) $(cu_objects_exe) -ldl $(LIBFLAGS) -lcuda -endif +$(testmain): MG_LDFLAGS += $(CXXLIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH +$(testmain): $(CUDACPP_LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cxx_objects_lib) $(cxx_objects_exe) $(GTESTLIBS) + $(CXX) -o $@ $(cxx_objects_lib) $(cxx_objects_exe) -L$(CUDACPP_LIBDIR) -l$(MG5AMC_COMMONLIB) -ldl -pthread $(MG_LDFLAGS) $(LDFLAGS) + +$(cutestmain): MG_LDFLAGS += $(CULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH +$(cutestmain): $(CUDACPP_LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_objects_lib) $(cu_objects_exe) $(GTESTLIBS) + $(NVCC) -o $@ $(cu_objects_lib) $(cu_objects_exe) -L$(CUDACPP_LIBDIR) -l$(MG5AMC_COMMONLIB) -ldl -lcuda $(MG_LDFLAGS) $(LDFLAGS) # Use target gtestlibs to build only googletest ifneq ($(GTESTLIBS),) @@ -731,72 +324,15 @@ endif # Use flock (Linux only, no Mac) to allow 'make -j' if googletest has not yet been downloaded https://stackoverflow.com/a/32666215 $(GTESTLIBS): ifneq ($(shell which flock 2>/dev/null),) - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - flock $(BUILDDIR)/.make_test.lock $(MAKE) -C $(TESTDIR) + flock $(TESTDIR)/.make_test.lock $(MAKE) -C $(TESTDIR) else if [ -d $(TESTDIR) ]; then $(MAKE) -C $(TESTDIR); fi endif #------------------------------------------------------------------------------- -# Target: build all targets in all AVX modes (each AVX mode in a separate build directory) -# Split the avxall target into five separate targets to allow parallel 'make -j avxall' builds -# (Hack: add a fbridge.inc dependency to avxall, to ensure it is only copied once for all AVX modes) -avxnone: - @echo - $(MAKE) USEBUILDDIR=1 AVX=none -f $(CUDACPP_MAKEFILE) - -avxsse4: - @echo - $(MAKE) USEBUILDDIR=1 AVX=sse4 -f $(CUDACPP_MAKEFILE) - -avxavx2: - @echo - $(MAKE) USEBUILDDIR=1 AVX=avx2 -f $(CUDACPP_MAKEFILE) - -avx512y: - @echo - $(MAKE) USEBUILDDIR=1 AVX=512y -f $(CUDACPP_MAKEFILE) - -avx512z: - @echo - $(MAKE) USEBUILDDIR=1 AVX=512z -f $(CUDACPP_MAKEFILE) - -ifeq ($(UNAME_P),ppc64le) -###avxall: $(INCDIR)/fbridge.inc avxnone avxsse4 -avxall: avxnone avxsse4 -else ifeq ($(UNAME_P),arm) -###avxall: $(INCDIR)/fbridge.inc avxnone avxsse4 -avxall: avxnone avxsse4 -else -###avxall: $(INCDIR)/fbridge.inc avxnone avxsse4 avxavx2 avx512y avx512z -avxall: avxnone avxsse4 avxavx2 avx512y avx512z -endif - -#------------------------------------------------------------------------------- - -# Target: clean the builds -.PHONY: clean - -clean: -ifeq ($(USEBUILDDIR),1) - rm -rf $(BUILDDIR) -else - rm -f $(BUILDDIR)/.build.* $(BUILDDIR)/*.o $(BUILDDIR)/*.exe - rm -f $(LIBDIR)/lib$(MG5AMC_CXXLIB).so $(LIBDIR)/lib$(MG5AMC_CULIB).so -endif - $(MAKE) -C ../../src clean -f $(CUDACPP_SRC_MAKEFILE) -### rm -rf $(INCDIR) - -cleanall: - @echo - $(MAKE) USEBUILDDIR=0 clean -f $(CUDACPP_MAKEFILE) - @echo - $(MAKE) USEBUILDDIR=0 -C ../../src cleanall -f $(CUDACPP_SRC_MAKEFILE) - rm -rf build.* - # Target: clean the builds as well as the gtest installation(s) -distclean: cleanall +distclean: clean cleansrc ifneq ($(wildcard $(TESTDIRCOMMON)),) $(MAKE) -C $(TESTDIRCOMMON) clean endif @@ -848,50 +384,55 @@ endif #------------------------------------------------------------------------------- -# Target: check (run the C++ test executable) +# Target: check/gcheck (run the C++ test executable) # [NB THIS IS WHAT IS USED IN THE GITHUB CI!] -ifneq ($(NVCC),) -check: runTest cmpFcheck cmpFGcheck -else check: runTest cmpFcheck -endif +gcheck: + $(MAKE) AVX=cuda runTest cmpFGcheck # Target: runTest (run the C++ test executable runTest.exe) -runTest: all.$(TAG) - $(RUNTIME) $(BUILDDIR)/runTest.exe +ifneq ($(AVX),cuda) +runTest: cppbuild + $(RUNTIME) $(CUDACPP_BUILDDIR)/runTest.exe +else +runTest: cudabuild + $(RUNTIME) $(CUDACPP_BUILDDIR)/runTest_cuda.exe +endif + # Target: runCheck (run the C++ standalone executable check.exe, with a small number of events) -runCheck: all.$(TAG) - $(RUNTIME) $(BUILDDIR)/check.exe -p 2 32 2 +runCheck: cppbuild + $(RUNTIME) $(CUDACPP_BUILDDIR)/check.exe -p 2 32 2 # Target: runGcheck (run the CUDA standalone executable gcheck.exe, with a small number of events) -runGcheck: all.$(TAG) - $(RUNTIME) $(BUILDDIR)/gcheck.exe -p 2 32 2 +runGcheck: AVX=cuda +runGcheck: + $(MAKE) AVX=cuda cudabuild + $(RUNTIME) $(CUDACPP_BUILDDIR)/gcheck.exe -p 2 32 2 # Target: runFcheck (run the Fortran standalone executable - with C++ MEs - fcheck.exe, with a small number of events) -runFcheck: all.$(TAG) - $(RUNTIME) $(BUILDDIR)/fcheck.exe 2 32 2 +runFcheck: cppbuild + $(RUNTIME) $(CUDACPP_BUILDDIR)/fcheck.exe 2 32 2 # Target: runFGcheck (run the Fortran standalone executable - with CUDA MEs - fgcheck.exe, with a small number of events) -runFGcheck: all.$(TAG) - $(RUNTIME) $(BUILDDIR)/fgcheck.exe 2 32 2 +runFGcheck: AVX=cuda +runFGcheck: + $(MAKE) AVX=cuda cudabuild + $(RUNTIME) $(CUDACPP_BUILDDIR)/fgcheck.exe 2 32 2 # Target: cmpFcheck (compare ME results from the C++ and Fortran with C++ MEs standalone executables, with a small number of events) -cmpFcheck: all.$(TAG) +cmpFcheck: cppbuild @echo - @echo "$(BUILDDIR)/check.exe --common -p 2 32 2" - @echo "$(BUILDDIR)/fcheck.exe 2 32 2" - @me1=$(shell $(RUNTIME) $(BUILDDIR)/check.exe --common -p 2 32 2 | grep MeanMatrix | awk '{print $$4}'); me2=$(shell $(RUNTIME) $(BUILDDIR)/fcheck.exe 2 32 2 | grep Average | awk '{print $$4}'); echo "Avg ME (C++/C++) = $${me1}"; echo "Avg ME (F77/C++) = $${me2}"; if [ "$${me2}" == "NaN" ]; then echo "ERROR! Fortran calculation (F77/C++) returned NaN"; elif [ "$${me2}" == "" ]; then echo "ERROR! Fortran calculation (F77/C++) crashed"; else python3 -c "me1=$${me1}; me2=$${me2}; reldif=abs((me2-me1)/me1); print('Relative difference =', reldif); ok = reldif <= 2E-4; print ( '%s (relative difference %s 2E-4)' % ( ('OK','<=') if ok else ('ERROR','>') ) ); import sys; sys.exit(0 if ok else 1)"; fi + @echo "$(CUDACPP_BUILDDIR)/check.exe --common -p 2 32 2" + @echo "$(CUDACPP_BUILDDIR)/fcheck.exe 2 32 2" + @me1=$(shell $(RUNTIME) $(CUDACPP_BUILDDIR)/check.exe --common -p 2 32 2 | grep MeanMatrix | awk '{print $$4}'); me2=$(shell $(RUNTIME) $(CUDACPP_BUILDDIR)/fcheck.exe 2 32 2 | grep Average | awk '{print $$4}'); echo "Avg ME (C++/C++) = $${me1}"; echo "Avg ME (F77/C++) = $${me2}"; if [ "$${me2}" == "NaN" ]; then echo "ERROR! Fortran calculation (F77/C++) returned NaN"; elif [ "$${me2}" == "" ]; then echo "ERROR! Fortran calculation (F77/C++) crashed"; else python3 -c "me1=$${me1}; me2=$${me2}; reldif=abs((me2-me1)/me1); print('Relative difference =', reldif); ok = reldif <= 2E-4; print ( '%s (relative difference %s 2E-4)' % ( ('OK','<=') if ok else ('ERROR','>') ) ); import sys; sys.exit(0 if ok else 1)"; fi # Target: cmpFGcheck (compare ME results from the CUDA and Fortran with CUDA MEs standalone executables, with a small number of events) -cmpFGcheck: all.$(TAG) +cmpFGcheck: AVX=cuda +cmpFGcheck: + $(MAKE) AVX=cuda cudabuild @echo - @echo "$(BUILDDIR)/gcheck.exe --common -p 2 32 2" - @echo "$(BUILDDIR)/fgcheck.exe 2 32 2" - @me1=$(shell $(RUNTIME) $(BUILDDIR)/gcheck.exe --common -p 2 32 2 | grep MeanMatrix | awk '{print $$4}'); me2=$(shell $(RUNTIME) $(BUILDDIR)/fgcheck.exe 2 32 2 | grep Average | awk '{print $$4}'); echo "Avg ME (C++/CUDA) = $${me1}"; echo "Avg ME (F77/CUDA) = $${me2}"; if [ "$${me2}" == "NaN" ]; then echo "ERROR! Fortran calculation (F77/CUDA) crashed"; elif [ "$${me2}" == "" ]; then echo "ERROR! Fortran calculation (F77/CUDA) crashed"; else python3 -c "me1=$${me1}; me2=$${me2}; reldif=abs((me2-me1)/me1); print('Relative difference =', reldif); ok = reldif <= 2E-4; print ( '%s (relative difference %s 2E-4)' % ( ('OK','<=') if ok else ('ERROR','>') ) ); import sys; sys.exit(0 if ok else 1)"; fi + @echo "$(CUDACPP_BUILDDIR)/gcheck.exe --common -p 2 32 2" + @echo "$(CUDACPP_BUILDDIR)/fgcheck.exe 2 32 2" + @me1=$(shell $(RUNTIME) $(CUDACPP_BUILDDIR)/gcheck.exe --common -p 2 32 2 | grep MeanMatrix | awk '{print $$4}'); me2=$(shell $(RUNTIME) $(CUDACPP_BUILDDIR)/fgcheck.exe 2 32 2 | grep Average | awk '{print $$4}'); echo "Avg ME (C++/CUDA) = $${me1}"; echo "Avg ME (F77/CUDA) = $${me2}"; if [ "$${me2}" == "NaN" ]; then echo "ERROR! Fortran calculation (F77/CUDA) crashed"; elif [ "$${me2}" == "" ]; then echo "ERROR! Fortran calculation (F77/CUDA) crashed"; else python3 -c "me1=$${me1}; me2=$${me2}; reldif=abs((me2-me1)/me1); print('Relative difference =', reldif); ok = reldif <= 2E-4; print ( '%s (relative difference %s 2E-4)' % ( ('OK','<=') if ok else ('ERROR','>') ) ); import sys; sys.exit(0 if ok else 1)"; fi -# Target: memcheck (run the CUDA standalone executable gcheck.exe with a small number of events through cuda-memcheck) -memcheck: all.$(TAG) - $(RUNTIME) $(CUDA_HOME)/bin/cuda-memcheck --check-api-memory-access yes --check-deprecated-instr yes --check-device-heap yes --demangle full --language c --leak-check full --racecheck-report all --report-api-errors all --show-backtrace yes --tool memcheck --track-unused-memory yes $(BUILDDIR)/gcheck.exe -p 2 32 2 - -#------------------------------------------------------------------------------- diff --git a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/makefile b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/makefile index d572486c2e..d229c1cf4d 100644 --- a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/makefile +++ b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/makefile @@ -1,19 +1,22 @@ SHELL := /bin/bash -include ../../Source/make_opts -FFLAGS+= -w +# Include general setup +OPTIONS_MAKEFILE := ../../Source/make_opts +include $(OPTIONS_MAKEFILE) # Enable the C preprocessor https://gcc.gnu.org/onlinedocs/gfortran/Preprocessing-Options.html -FFLAGS+= -cpp +MG_FCFLAGS += -cpp +MG_CXXFLAGS += -I. -# Compile counters with -O3 as in the cudacpp makefile (avoid being "unfair" to Fortran #740) -CXXFLAGS = -O3 -Wall -Wshadow -Wextra +all: help cppnative + +# Target if user does not specify target +help: + $(info No target specified.) + $(info Viable targets are 'cppnative' (default), 'cppnone', 'cppsse4', 'cppavx2', 'cpp512y', 'cpp512z' and 'cuda') + $(info Or 'cppall' for all C++ targets) + $(info Or 'ALL' for all C++ and cuda targets) -# Add -std=c++17 explicitly to avoid build errors on macOS -# Add -mmacosx-version-min=11.3 to avoid "ld: warning: object file was built for newer macOS version than being linked" -ifneq ($(shell $(CXX) --version | egrep '^Apple clang'),) -CXXFLAGS += -std=c++17 -mmacosx-version-min=11.3 -endif # Enable ccache if USECCACHE=1 ifeq ($(USECCACHE)$(shell echo $(CXX) | grep ccache),1) @@ -46,34 +49,25 @@ else MADLOOP_LIB = endif -LINKLIBS = $(LINK_MADLOOP_LIB) $(LINK_LOOP_LIBS) -L$(LIBDIR) -ldhelas -ldsample -lmodel -lgeneric -lpdf -lcernlib $(llhapdf) -lbias - -processid_short=$(shell basename $(CURDIR) | awk -F_ '{print $$(NF-1)"_"$$NF}') -CUDACPP_MAKEFILE=cudacpp.mk -# NB1 Using ":=" below instead of "=" is much faster (it only runs the subprocess once instead of many times) -# NB2 Use '|&' in CUDACPP_BUILDDIR to avoid confusing errors about googletest #507 -# NB3 Do not add a comment inlined "CUDACPP_BUILDDIR=$(shell ...) # comment" as otherwise a trailing space is included... -# NB4 The variables relevant to the cudacpp Makefile must be explicitly passed to $(shell...) -CUDACPP_MAKEENV:=$(shell echo '$(.VARIABLES)' | tr " " "\n" | egrep "(USEBUILDDIR|AVX|FPTYPE|HELINL|HRDCOD)") -###$(info CUDACPP_MAKEENV=$(CUDACPP_MAKEENV)) -###$(info $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))")) -CUDACPP_BUILDDIR:=$(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn 2>&1 | awk '/Building/{print $$3}' | sed s/BUILDDIR=//) -ifeq ($(CUDACPP_BUILDDIR),) -$(error CUDACPP_BUILDDIR='$(CUDACPP_BUILDDIR)' should not be empty!) -else -$(info CUDACPP_BUILDDIR='$(CUDACPP_BUILDDIR)') -endif -CUDACPP_COMMONLIB=mg5amc_common -CUDACPP_CXXLIB=mg5amc_$(processid_short)_cpp -CUDACPP_CULIB=mg5amc_$(processid_short)_cuda - +LINKLIBS = $(LINK_MADLOOP_LIB) $(LINK_LOOP_LIBS) -L$(LIBDIR) -ldhelas -ldsample -lmodel -lgeneric -lpdf -lcernlib $(llhapdf) -lbias LIBS = $(LIBDIR)libbias.$(libext) $(LIBDIR)libdhelas.$(libext) $(LIBDIR)libdsample.$(libext) $(LIBDIR)libgeneric.$(libext) $(LIBDIR)libpdf.$(libext) $(LIBDIR)libgammaUPC.$(libext) $(LIBDIR)libmodel.$(libext) $(LIBDIR)libcernlib.$(libext) $(MADLOOP_LIB) $(LOOP_LIBS) ifneq ("$(wildcard ../../Source/RUNNING)","") LINKLIBS += -lrunning - LIBS += $(LIBDIR)librunning.$(libext) + LIBS += $(LIBDIR)librunning.$(libext) endif +SOURCEDIR_GUARD:=../../Source/.timestamp_guard +# We use $(SOURCEDIR_GUARD) to figure out if Source is out of date. The Source makefile doesn't correctly +# update all files, so we need a proxy that is updated every time we run "$(MAKE) -C ../../Source". +$(SOURCEDIR_GUARD) ../../Source/discretesampler.mod &: ../../Source/*.f ../../Cards/param_card.dat ../../Cards/run_card.dat +ifneq ($(shell which flock 2>/dev/null),) + flock ../../Source/.lock -c "$(MAKE) -C ../../Source; touch $(SOURCEDIR_GUARD)" +else + $(MAKE) -C ../../Source; touch $(SOURCEDIR_GUARD) +endif + +$(LIBS): $(SOURCEDIR_GUARD) # Source files @@ -91,82 +85,83 @@ PROCESS= myamp.o genps.o unwgt.o setcuts.o get_color.o \ DSIG=driver.o $(patsubst %.f, %.o, $(filter-out auto_dsig.f, $(wildcard auto_dsig*.f))) DSIG_cudacpp=driver_cudacpp.o $(patsubst %.f, %_cudacpp.o, $(filter-out auto_dsig.f, $(wildcard auto_dsig*.f))) -SYMMETRY = symmetry.o idenparts.o +SYMMETRY = symmetry.o idenparts.o -# Binaries +# cudacpp targets: +CUDACPP_MAKEFILE := cudacpp.mk +ifneq (,$(wildcard $(CUDACPP_MAKEFILE))) +include $(CUDACPP_MAKEFILE) +endif -ifeq ($(UNAME),Darwin) -LDFLAGS += -lc++ # avoid 'Undefined symbols' for chrono::steady_clock on macOS (checked with otool -L libmg5amc_gg_ttx_cpp.so) -LDFLAGS += -mmacosx-version-min=11.3 # avoid "ld: warning: object file was built for newer macOS version than being linked" -else -LDFLAGS += -Wl,--no-relax # avoid 'failed to convert GOTPCREL relocation' error #458 (not supported on macOS) +ifeq ($(CUDACPP_BUILDDIR),) +$(error CUDACPP_BUILDDIR='$(CUDACPP_BUILDDIR)' should not be empty!) endif +CUDACPP_COMMONLIB=mg5amc_common +CUDACPP_CXXLIB := $(CUDACPP_BUILDDIR)/lib$(MG5AMC_CXXLIB).so +CUDACPP_CULIB := $(CUDACPP_BUILDDIR)/lib$(MG5AMC_CULIB).so -all: $(PROG)_fortran $(CUDACPP_BUILDDIR)/$(PROG)_cpp # also builds $(PROG)_cuda if $(CUDACPP_CULIB) exists (#503) +# Set up OpenMP if supported +OMPFLAGS ?= -fopenmp ifneq ($(shell $(CXX) --version | egrep '^Intel'),) -override OMPFLAGS = -fopenmp LINKLIBS += -liomp5 # see #578 LINKLIBS += -lintlc # undefined reference to `_intel_fast_memcpy' else ifneq ($(shell $(CXX) --version | egrep '^clang'),) -override OMPFLAGS = -fopenmp $(CUDACPP_BUILDDIR)/$(PROG)_cpp: LINKLIBS += -L $(shell dirname $(shell $(CXX) -print-file-name=libc++.so)) -lomp # see #604 else ifneq ($(shell $(CXX) --version | egrep '^Apple clang'),) -override OMPFLAGS = # OMP is not supported yet by cudacpp for Apple clang -else -override OMPFLAGS = -fopenmp +OMPFLAGS = # OMP is not supported yet by cudacpp for Apple clang endif -$(PROG)_fortran: $(PROCESS) $(DSIG) auto_dsig.o $(LIBS) $(MATRIX) counters.o ompnumthreads.o - $(FC) -o $(PROG)_fortran $(PROCESS) $(DSIG) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o $(LDFLAGS) - -$(LIBS): .libs -.libs: ../../Cards/param_card.dat ../../Cards/run_card.dat - cd ../../Source; make - touch $@ +# Binaries -$(CUDACPP_BUILDDIR)/.cudacpplibs: - $(MAKE) -f $(CUDACPP_MAKEFILE) - touch $@ +$(PROG)_fortran: $(PROCESS) $(DSIG) auto_dsig.o $(LIBS) $(MATRIX) counters.o ompnumthreads.o + $(FC) $(MG_FCFLAGS) $(FCFLAGS) -o $(PROG)_fortran $(PROCESS) $(DSIG) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o $(LDFLAGS) # On Linux, set rpath to LIBDIR to make it unnecessary to use LD_LIBRARY_PATH # Use relative paths with respect to the executables ($ORIGIN on Linux) # On Darwin, building libraries with absolute paths in LIBDIR makes this unnecessary -ifeq ($(UNAME_S),Darwin) - override LIBFLAGSRPATH = -else ifeq ($(USEBUILDDIR),1) - override LIBFLAGSRPATH = -Wl,-rpath,'$$ORIGIN/../$(LIBDIR)/$(CUDACPP_BUILDDIR)' -else - override LIBFLAGSRPATH = -Wl,-rpath,'$$ORIGIN/$(LIBDIR)' +ifneq ($(UNAME_S),Darwin) + LIBFLAGSRPATH := -Wl,-rpath,'$$ORIGIN:$$ORIGIN/../$(LIBDIR)/$(CUDACPP_BUILDDIR)' endif -.PHONY: madevent_fortran_link madevent_cuda_link madevent_cpp_link +.PHONY: madevent_fortran_link madevent_cuda_link madevent_cpp_link madevent_cppnone_link madevent_cppsse4_link madevent_cppavx2_link madevent_cpp512y_link madevent_cpp512z_link clean cleanall cleansrc madevent_fortran_link: $(PROG)_fortran rm -f $(PROG) ln -s $(PROG)_fortran $(PROG) -madevent_cpp_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp - rm -f $(PROG) - ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) +madevent_cppnone_link: AVX=none +madevent_cppnone_link: cppnone + ln -sf $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) -madevent_cuda_link: $(CUDACPP_BUILDDIR)/$(PROG)_cuda - rm -f $(PROG) - ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cuda $(PROG) +madevent_cppavx2_link: AVX=avx2 +madevent_cppavx2_link: cppavx2 + ln -sf $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) + +madevent_cpp512y_link: AVX=512y +madevent_cpp512y_link: cppavx512y + ln -sf $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) -# Building $(PROG)_cpp also builds $(PROG)_cuda if $(CUDACPP_CULIB) exists (improved patch for cpp-only builds #503) -$(CUDACPP_BUILDDIR)/$(PROG)_cpp: $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(LIBS) $(MATRIX) counters.o ompnumthreads.o $(CUDACPP_BUILDDIR)/.cudacpplibs - $(FC) -o $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o -L$(LIBDIR)/$(CUDACPP_BUILDDIR) -l$(CUDACPP_COMMONLIB) -l$(CUDACPP_CXXLIB) $(LIBFLAGSRPATH) $(LDFLAGS) - if [ -f $(LIBDIR)/$(CUDACPP_BUILDDIR)/lib$(CUDACPP_CULIB).* ]; then $(FC) -o $(CUDACPP_BUILDDIR)/$(PROG)_cuda $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o -L$(LIBDIR)/$(CUDACPP_BUILDDIR) -l$(CUDACPP_COMMONLIB) -l$(CUDACPP_CULIB) $(LIBFLAGSRPATH) $(LDFLAGS); fi +madevent_cpp512z_link: AVX=512z +madevent_cpp512z_link: cppavx512z + ln -sf $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) -$(CUDACPP_BUILDDIR)/$(PROG)_cuda: $(CUDACPP_BUILDDIR)/$(PROG)_cpp +madevent_cuda_link: AVX=cuda +madevent_cuda_link: cuda + ln -sf $(CUDACPP_BUILDDIR)/$(PROG)_cuda $(PROG) + +$(CUDACPP_BUILDDIR)/$(PROG)_cpp: $(LIBS) $(CUDACPP_CXXLIB) $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) counters.o ompnumthreads.o + $(FC) -o $(CUDACPP_BUILDDIR)/$(PROG)_cpp -L$(LIBDIR)/$(CUDACPP_BUILDDIR) -l$(CUDACPP_COMMONLIB) $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o -L$(CUDACPP_BUILDDIR) -l$(MG5AMC_CXXLIB) $(LIBFLAGSRPATH) $(MG_LDFLAGS) $(LDFLAGS) + +$(CUDACPP_BUILDDIR)/$(PROG)_cuda: $(LIBS) $(CUDACPP_CULIB) $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) counters.o ompnumthreads.o + $(FC) -o $(CUDACPP_BUILDDIR)/$(PROG)_cuda -L$(LIBDIR)/$(CUDACPP_BUILDDIR) -l$(CUDACPP_COMMONLIB) $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o -L$(CUDACPP_BUILDDIR) -l$(MG5AMC_CULIB) $(LIBFLAGSRPATH) $(MG_LDFLAGS) $(LDFLAGS) counters.o: counters.cc timer.h - $(CXX) $(CXXFLAGS) -c $< -o $@ + $(CXX) $(MG_CXXFLAGS) $(CXXFLAGS) -c $< -o $@ ompnumthreads.o: ompnumthreads.cc ompnumthreads.h - $(CXX) -I. $(CXXFLAGS) $(OMPFLAGS) -c $< -o $@ + $(CXX) $(MG_CXXFLAGS) $(CXXFLAGS) $(OMPFLAGS) -c $< -o $@ $(PROG)_forhel: $(PROCESS) auto_dsig.o $(LIBS) $(MATRIX_HEL) $(FC) -o $(PROG)_forhel $(PROCESS) $(MATRIX_HEL) $(LINKLIBS) $(LDFLAGS) $(BIASDEPENDENCIES) $(OMPFLAGS) @@ -174,27 +169,14 @@ $(PROG)_forhel: $(PROCESS) auto_dsig.o $(LIBS) $(MATRIX_HEL) gensym: $(SYMMETRY) configs.inc $(LIBS) $(FC) -o gensym $(SYMMETRY) -L$(LIBDIR) $(LINKLIBS) $(LDFLAGS) -###ifeq (,$(wildcard fbridge.inc)) # Pointless: fbridge.inc always exists as this is the cudacpp-modified makefile! -###$(LIBDIR)libmodel.$(libext): ../../Cards/param_card.dat -### cd ../../Source/MODEL; make -### -###$(LIBDIR)libgeneric.$(libext): ../../Cards/run_card.dat -### cd ../../Source; make -### -###$(LIBDIR)libpdf.$(libext): -### cd ../../Source/PDF; make -### -###$(LIBDIR)libgammaUPC.$(libext): -### cd ../../Source/PDF/gammaUPC; make -###endif # Add source so that the compiler finds the DiscreteSampler module. $(MATRIX): %.o: %.f - $(FC) $(FFLAGS) $(MATRIX_FLAG) -c $< -I../../Source/ -I../../Source/PDF/gammaUPC -%.o: %.f - $(FC) $(FFLAGS) -c $< -I../../Source/ -I../../Source/PDF/gammaUPC + $(FC) $(MG_FCFLAGS) $(FCFLAGS) $(MATRIX_FLAG) -c $< -I../../Source/ -I../../Source/PDF/gammaUPC +%.o $(CUDACPP_BUILDDIR)/%.o: %.f + $(FC) $(MG_FCFLAGS) $(FCFLAGS) -I../../Source/ -I../../Source/PDF/gammaUPC -c $< -o $@ %_cudacpp.o: %.f - $(FC) $(FFLAGS) -c -DMG5AMC_MEEXPORTER_CUDACPP $< -I../../Source/ $(OMPFLAGS) -o $@ + $(FC) $(MG_FCFLAGS) $(FCFLAGS) -c -DMG5AMC_MEEXPORTER_CUDACPP $< -I../../Source/ $(OMPFLAGS) -o $@ # Dependencies @@ -215,60 +197,42 @@ unwgt.o: genps.inc nexternal.inc symswap.inc cluster.inc run.inc message.inc \ initcluster.o: message.inc # Extra dependencies on discretesampler.mod +../../Source/discretesampler.mod: ../../Source/DiscreteSampler.f -auto_dsig.o: .libs -driver.o: .libs -driver_cudacpp.o: .libs -$(MATRIX): .libs -genps.o: .libs +auto_dsig.o: ../../Source/discretesampler.mod +driver.o: ../../Source/discretesampler.mod +driver_cudacpp.o: ../../Source/discretesampler.mod +$(MATRIX): ../../Source/discretesampler.mod +genps.o: ../../Source/discretesampler.mod # Cudacpp avxall targets -UNAME_P := $(shell uname -p) ifeq ($(UNAME_P),ppc64le) -avxall: avxnone avxsse4 +cppall: cppnative cppnone cppsse4 else ifeq ($(UNAME_P),arm) -avxall: avxnone avxsse4 +cppall: cppnative cppnone cppsse4 else -avxall: avxnone avxsse4 avxavx2 avx512y avx512z +cppall: cppnative cppnone cppsse4 cppavx2 cppavx512y cppavx512z endif -avxnone: $(PROG)_fortran $(DSIG_cudacpp) - @echo - $(MAKE) USEBUILDDIR=1 AVX=none - -avxsse4: $(PROG)_fortran $(DSIG_cudacpp) - @echo - $(MAKE) USEBUILDDIR=1 AVX=sse4 - -avxavx2: $(PROG)_fortran $(DSIG_cudacpp) - @echo - $(MAKE) USEBUILDDIR=1 AVX=avx2 - -avx512y: $(PROG)_fortran $(DSIG_cudacpp) - @echo - $(MAKE) USEBUILDDIR=1 AVX=512y - -avx512z: $(PROG)_fortran $(DSIG_cudacpp) - @echo - $(MAKE) USEBUILDDIR=1 AVX=512z - -###endif - -# Clean (NB: 'make clean' in Source calls 'make clean' in all P*) +ALL: cppall cuda -clean: # Clean builds: fortran in this Pn; cudacpp executables for one AVX in this Pn - $(RM) *.o gensym $(PROG) $(PROG)_fortran $(PROG)_forhel $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(CUDACPP_BUILDDIR)/$(PROG)_cuda +# Clean all architecture-specific builds: +clean: + $(RM) *.o gensym $(PROG) $(PROG)_* + $(RM) -rf build.*/*{.o,.so,.exe,.dylib,madevent_*} + @for dir in build.*; do if [ -z "$$(ls -A $${dir})" ]; then rm -r $${dir}; else echo "Not cleaning $${dir}; not empty"; fi; done -cleanavxs: clean # Clean builds: fortran in this Pn; cudacpp for all AVX in this Pn and in src - $(MAKE) -f $(CUDACPP_MAKEFILE) cleanall - rm -f $(CUDACPP_BUILDDIR)/.cudacpplibs - rm -f .libs +cleanall: cleansrc + for PROCESS in ../P[0-9]*; do $(MAKE) -C $${PROCESS} clean; done -cleanall: # Clean builds: fortran in all P* and in Source; cudacpp for all AVX in all P* and in src - make -C ../../Source cleanall - rm -rf $(LIBDIR)libbias.$(libext) - rm -f ../../Source/*.mod ../../Source/*/*.mod +# Clean one architecture-specific build +clean%: + $(RM) -r build.$*_* -distclean: cleanall # Clean all fortran and cudacpp builds as well as the googletest installation - $(MAKE) -f $(CUDACPP_MAKEFILE) distclean +# Clean common source directories (interferes with other P*) +cleansrc: + make -C ../../Source clean + $(RM) -f $(SOURCEDIR_GUARD) ../../Source/{*.mod,.lock} ../../Source/*/*.mod + $(RM) -r $(LIBDIR)libbias.$(libext) + if [ -d ../../src ]; then $(MAKE) -C ../../src -f cudacpp_src.mk clean; fi diff --git a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/runTest.cc b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/runTest.cc index d4a760a71b..734235824a 100644 --- a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/runTest.cc +++ b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/runTest.cc @@ -246,15 +246,15 @@ struct CUDATest : public CUDA_CPU_TestBase #define TESTID_CPU( s ) s##_CPU #define XTESTID_CPU( s ) TESTID_CPU( s ) #define MG_INSTANTIATE_TEST_SUITE_CPU( prefix, test_suite_name ) \ -INSTANTIATE_TEST_SUITE_P( prefix, \ - test_suite_name, \ - testing::Values( new CPUTest( MG_EPOCH_REFERENCE_FILE_NAME ) ) ); + INSTANTIATE_TEST_SUITE_P( prefix, \ + test_suite_name, \ + testing::Values( new CPUTest( MG_EPOCH_REFERENCE_FILE_NAME ) ) ); #define TESTID_GPU( s ) s##_GPU #define XTESTID_GPU( s ) TESTID_GPU( s ) #define MG_INSTANTIATE_TEST_SUITE_GPU( prefix, test_suite_name ) \ -INSTANTIATE_TEST_SUITE_P( prefix, \ - test_suite_name, \ - testing::Values( new CUDATest( MG_EPOCH_REFERENCE_FILE_NAME ) ) ); + INSTANTIATE_TEST_SUITE_P( prefix, \ + test_suite_name, \ + testing::Values( new CUDATest( MG_EPOCH_REFERENCE_FILE_NAME ) ) ); #ifdef __CUDACC__ MG_INSTANTIATE_TEST_SUITE_GPU( XTESTID_GPU( MG_EPOCH_PROCESS_ID ), MadgraphTest ); diff --git a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/testxxx.cc b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/testxxx.cc index 3361fe5aa9..1d315f6d75 100644 --- a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/testxxx.cc +++ b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/testxxx.cc @@ -40,7 +40,7 @@ namespace mg5amcCpu { std::string FPEhandlerMessage = "unknown"; int FPEhandlerIevt = -1; - inline void FPEhandler( int sig ) + inline void FPEhandler( int ) { #ifdef __CUDACC__ std::cerr << "Floating Point Exception (GPU): '" << FPEhandlerMessage << "' ievt=" << FPEhandlerIevt << std::endl; @@ -71,11 +71,10 @@ TEST( XTESTID( MG_EPOCH_PROCESS_ID ), testxxx ) constexpr bool testEvents = !dumpEvents; // run the test? constexpr fptype toleranceXXXs = std::is_same::value ? 1.E-15 : 1.E-5; // Constant parameters - constexpr int neppM = MemoryAccessMomenta::neppM; // AOSOA layout constexpr int np4 = CPPProcess::np4; - const int nevt = 32; // 12 independent tests plus 20 duplicates (need a multiple of 16 for floats '512z') - assert( nevt % neppM == 0 ); // nevt must be a multiple of neppM - assert( nevt % neppV == 0 ); // nevt must be a multiple of neppV + const int nevt = 32; // 12 independent tests plus 20 duplicates (need a multiple of 16 for floats '512z') + assert( nevt % MemoryAccessMomenta::neppM == 0 ); // nevt must be a multiple of neppM + assert( nevt % neppV == 0 ); // nevt must be a multiple of neppV // Fill in the input momenta #ifdef __CUDACC__ mg5amcGpu::PinnedHostBufferMomenta hstMomenta( nevt ); // AOSOA[npagM][npar=4][np4=4][neppM] diff --git a/epochX/cudacpp/gg_tt01g.mad/bin/internal/banner.py b/epochX/cudacpp/gg_tt01g.mad/bin/internal/banner.py index bd1517985f..b408679c2f 100755 --- a/epochX/cudacpp/gg_tt01g.mad/bin/internal/banner.py +++ b/epochX/cudacpp/gg_tt01g.mad/bin/internal/banner.py @@ -2,11 +2,11 @@ # # Copyright (c) 2011 The MadGraph5_aMC@NLO Development team and Contributors # -# This file is a part of the MadGraph5_aMC@NLO project, an application which +# This file is a part of the MadGraph5_aMC@NLO project, an application which # automatically generates Feynman diagrams and matrix elements for arbitrary # high-energy processes in the Standard Model and beyond. # -# It is subject to the MadGraph5_aMC@NLO license which should accompany this +# It is subject to the MadGraph5_aMC@NLO license which should accompany this # distribution. # # For more information, visit madgraph.phys.ucl.ac.be and amcatnlo.web.cern.ch @@ -53,7 +53,7 @@ MADEVENT = False import madgraph.various.misc as misc import madgraph.iolibs.file_writers as file_writers - import madgraph.iolibs.files as files + import madgraph.iolibs.files as files import models.check_param_card as param_card_reader from madgraph import MG5DIR, MadGraph5Error, InvalidCmd @@ -80,36 +80,36 @@ class Banner(dict): 'mgproccard': 'MGProcCard', 'mgruncard': 'MGRunCard', 'ma5card_parton' : 'MA5Card_parton', - 'ma5card_hadron' : 'MA5Card_hadron', + 'ma5card_hadron' : 'MA5Card_hadron', 'mggenerationinfo': 'MGGenerationInfo', 'mgpythiacard': 'MGPythiaCard', 'mgpgscard': 'MGPGSCard', 'mgdelphescard': 'MGDelphesCard', 'mgdelphestrigger': 'MGDelphesTrigger', 'mgshowercard': 'MGShowerCard' } - + forbid_cdata = ['initrwgt'] - + def __init__(self, banner_path=None): """ """ if isinstance(banner_path, Banner): dict.__init__(self, banner_path) self.lhe_version = banner_path.lhe_version - return + return else: dict.__init__(self) - + #Look at the version if MADEVENT: self['mgversion'] = '#%s\n' % open(pjoin(MEDIR, 'MGMEVersion.txt')).read() else: info = misc.get_pkg_info() self['mgversion'] = info['version']+'\n' - + self.lhe_version = None - + if banner_path: self.read_banner(banner_path) @@ -123,7 +123,7 @@ def __init__(self, banner_path=None): 'mgruncard':'run_card.dat', 'mgpythiacard':'pythia_card.dat', 'mgpgscard' : 'pgs_card.dat', - 'mgdelphescard':'delphes_card.dat', + 'mgdelphescard':'delphes_card.dat', 'mgdelphestrigger':'delphes_trigger.dat', 'mg5proccard':'proc_card_mg5.dat', 'mgproccard': 'proc_card.dat', @@ -137,10 +137,10 @@ def __init__(self, banner_path=None): 'mgshowercard':'shower_card.dat', 'pythia8':'pythia8_card.dat', 'ma5card_parton':'madanalysis5_parton_card.dat', - 'ma5card_hadron':'madanalysis5_hadron_card.dat', + 'ma5card_hadron':'madanalysis5_hadron_card.dat', 'run_settings':'' } - + def read_banner(self, input_path): """read a banner""" @@ -151,7 +151,7 @@ def read_banner(self, input_path): def split_iter(string): return (x.groups(0)[0] for x in re.finditer(r"([^\n]*\n)", string, re.DOTALL)) input_path = split_iter(input_path) - + text = '' store = False for line in input_path: @@ -170,13 +170,13 @@ def split_iter(string): text += line else: text += '%s%s' % (line, '\n') - - #reaching end of the banner in a event file avoid to read full file + + #reaching end of the banner in a event file avoid to read full file if "
" in line: break elif "" in line: break - + def __getattribute__(self, attr): """allow auto-build for the run_card/param_card/... """ try: @@ -187,23 +187,23 @@ def __getattribute__(self, attr): return self.charge_card(attr) - + def change_lhe_version(self, version): """change the lhe version associate to the banner""" - + version = float(version) if version < 3: version = 1 elif version > 3: raise Exception("Not Supported version") self.lhe_version = version - + def get_cross(self, witherror=False): """return the cross-section of the file""" if "init" not in self: raise Exception - + text = self["init"].split('\n') cross = 0 error = 0 @@ -217,13 +217,13 @@ def get_cross(self, witherror=False): return cross else: return cross, math.sqrt(error) - + def scale_init_cross(self, ratio): """modify the init information with the associate scale""" assert "init" in self - + all_lines = self["init"].split('\n') new_data = [] new_data.append(all_lines[0]) @@ -231,29 +231,29 @@ def scale_init_cross(self, ratio): line = all_lines[i] split = line.split() if len(split) == 4: - xsec, xerr, xmax, pid = split + xsec, xerr, xmax, pid = split else: new_data += all_lines[i:] break pid = int(pid) - + line = " %+13.7e %+13.7e %+13.7e %i" % \ (ratio*float(xsec), ratio* float(xerr), ratio*float(xmax), pid) new_data.append(line) self['init'] = '\n'.join(new_data) - + def get_pdg_beam(self): """return the pdg of each beam""" - + assert "init" in self - + all_lines = self["init"].split('\n') pdg1,pdg2,_ = all_lines[0].split(None, 2) return int(pdg1), int(pdg2) - + def load_basic(self, medir): """ Load the proc_card /param_card and run_card """ - + self.add(pjoin(medir,'Cards', 'param_card.dat')) self.add(pjoin(medir,'Cards', 'run_card.dat')) if os.path.exists(pjoin(medir, 'SubProcesses', 'procdef_mg5.dat')): @@ -261,29 +261,29 @@ def load_basic(self, medir): self.add(pjoin(medir,'Cards', 'proc_card_mg5.dat')) else: self.add(pjoin(medir,'Cards', 'proc_card.dat')) - + def change_seed(self, seed): """Change the seed value in the banner""" # 0 = iseed p = re.compile(r'''^\s*\d+\s*=\s*iseed''', re.M) new_seed_str = " %s = iseed" % seed self['mgruncard'] = p.sub(new_seed_str, self['mgruncard']) - + def add_generation_info(self, cross, nb_event): """add info on MGGeneration""" - + text = """ # Number of Events : %s # Integrated weight (pb) : %s """ % (nb_event, cross) self['MGGenerationInfo'] = text - + ############################################################################ # SPLIT BANNER ############################################################################ def split(self, me_dir, proc_card=True): """write the banner in the Cards directory. - proc_card argument is present to avoid the overwrite of proc_card + proc_card argument is present to avoid the overwrite of proc_card information""" for tag, text in self.items(): @@ -305,37 +305,37 @@ def check_pid(self, pid2label): """special routine removing width/mass of particles not present in the model This is usefull in case of loop model card, when we want to use the non loop model.""" - + if not hasattr(self, 'param_card'): self.charge_card('slha') - + for tag in ['mass', 'decay']: block = self.param_card.get(tag) for data in block: pid = data.lhacode[0] - if pid not in list(pid2label.keys()): + if pid not in list(pid2label.keys()): block.remove((pid,)) def get_lha_strategy(self): """get the lha_strategy: how the weight have to be handle by the shower""" - + if not self["init"]: raise Exception("No init block define") - + data = self["init"].split('\n')[0].split() if len(data) != 10: misc.sprint(len(data), self['init']) raise Exception("init block has a wrong format") return int(float(data[-2])) - + def set_lha_strategy(self, value): """set the lha_strategy: how the weight have to be handle by the shower""" - + if not (-4 <= int(value) <= 4): six.reraise(Exception, "wrong value for lha_strategy", value) if not self["init"]: raise Exception("No init block define") - + all_lines = self["init"].split('\n') data = all_lines[0].split() if len(data) != 10: @@ -351,13 +351,13 @@ def modify_init_cross(self, cross, allow_zero=False): assert isinstance(cross, dict) # assert "all" in cross assert "init" in self - + cross = dict(cross) for key in cross.keys(): if isinstance(key, str) and key.isdigit() and int(key) not in cross: cross[int(key)] = cross[key] - - + + all_lines = self["init"].split('\n') new_data = [] new_data.append(all_lines[0]) @@ -365,7 +365,7 @@ def modify_init_cross(self, cross, allow_zero=False): line = all_lines[i] split = line.split() if len(split) == 4: - xsec, xerr, xmax, pid = split + xsec, xerr, xmax, pid = split else: new_data += all_lines[i:] break @@ -383,23 +383,23 @@ def modify_init_cross(self, cross, allow_zero=False): (float(cross[pid]), ratio* float(xerr), ratio*float(xmax), pid) new_data.append(line) self['init'] = '\n'.join(new_data) - + ############################################################################ # WRITE BANNER ############################################################################ def write(self, output_path, close_tag=True, exclude=[]): """write the banner""" - + if isinstance(output_path, str): ff = open(output_path, 'w') else: ff = output_path - + if MADEVENT: header = open(pjoin(MEDIR, 'Source', 'banner_header.txt')).read() else: header = open(pjoin(MG5DIR,'Template', 'LO', 'Source', 'banner_header.txt')).read() - + if not self.lhe_version: self.lhe_version = self.get('run_card', 'lhe_version', default=1.0) if float(self.lhe_version) < 3: @@ -412,7 +412,7 @@ def write(self, output_path, close_tag=True, exclude=[]): for tag in [t for t in self.ordered_items if t in list(self.keys())]+ \ [t for t in self.keys() if t not in self.ordered_items]: - if tag in ['init'] or tag in exclude: + if tag in ['init'] or tag in exclude: continue capitalized_tag = self.capitalized_items[tag] if tag in self.capitalized_items else tag start_data, stop_data = '', '' @@ -422,19 +422,19 @@ def write(self, output_path, close_tag=True, exclude=[]): stop_data = ']]>\n' out = '<%(tag)s>%(start_data)s\n%(text)s\n%(stop_data)s\n' % \ {'tag':capitalized_tag, 'text':self[tag].strip(), - 'start_data': start_data, 'stop_data':stop_data} + 'start_data': start_data, 'stop_data':stop_data} try: ff.write(out) except: ff.write(out.encode('utf-8')) - - + + if not '/header' in exclude: out = '\n' try: ff.write(out) except: - ff.write(out.encode('utf-8')) + ff.write(out.encode('utf-8')) if 'init' in self and not 'init' in exclude: text = self['init'] @@ -444,22 +444,22 @@ def write(self, output_path, close_tag=True, exclude=[]): ff.write(out) except: ff.write(out.encode('utf-8')) - + if close_tag: - out = '\n' + out = '\n' try: ff.write(out) except: - ff.write(out.encode('utf-8')) + ff.write(out.encode('utf-8')) return ff - - + + ############################################################################ # BANNER ############################################################################ def add(self, path, tag=None): """Add the content of the file to the banner""" - + if not tag: card_name = os.path.basename(path) if 'param_card' in card_name: @@ -505,33 +505,33 @@ def add_text(self, tag, text): if tag == 'param_card': tag = 'slha' elif tag == 'run_card': - tag = 'mgruncard' + tag = 'mgruncard' elif tag == 'proc_card': - tag = 'mg5proccard' + tag = 'mg5proccard' elif tag == 'shower_card': tag = 'mgshowercard' elif tag == 'FO_analyse_card': tag = 'foanalyse' - + self[tag.lower()] = text - - + + def charge_card(self, tag): """Build the python object associated to the card""" - + if tag in ['param_card', 'param']: tag = 'slha' elif tag in ['run_card', 'run']: - tag = 'mgruncard' + tag = 'mgruncard' elif tag == 'proc_card': - tag = 'mg5proccard' + tag = 'mg5proccard' elif tag == 'shower_card': tag = 'mgshowercard' elif tag == 'FO_analyse_card': tag = 'foanalyse' assert tag in ['slha', 'mgruncard', 'mg5proccard', 'mgshowercard', 'foanalyse'], 'invalid card %s' % tag - + if tag == 'slha': param_card = self[tag].split('\n') self.param_card = param_card_reader.ParamCard(param_card) @@ -544,56 +544,56 @@ def charge_card(self, tag): self.proc_card = ProcCard(proc_card) return self.proc_card elif tag =='mgshowercard': - shower_content = self[tag] + shower_content = self[tag] if MADEVENT: import internal.shower_card as shower_card else: import madgraph.various.shower_card as shower_card self.shower_card = shower_card.ShowerCard(shower_content, True) - # set testing to false (testing = true allow to init using + # set testing to false (testing = true allow to init using # the card content instead of the card path" self.shower_card.testing = False return self.shower_card elif tag =='foanalyse': - analyse_content = self[tag] + analyse_content = self[tag] if MADEVENT: import internal.FO_analyse_card as FO_analyse_card else: import madgraph.various.FO_analyse_card as FO_analyse_card - # set testing to false (testing = true allow to init using + # set testing to false (testing = true allow to init using # the card content instead of the card path" self.FOanalyse_card = FO_analyse_card.FOAnalyseCard(analyse_content, True) self.FOanalyse_card.testing = False return self.FOanalyse_card - + def get_detail(self, tag, *arg, **opt): """return a specific """ - + if tag in ['param_card', 'param']: tag = 'slha' attr_tag = 'param_card' elif tag in ['run_card', 'run']: - tag = 'mgruncard' + tag = 'mgruncard' attr_tag = 'run_card' elif tag == 'proc_card': - tag = 'mg5proccard' + tag = 'mg5proccard' attr_tag = 'proc_card' elif tag == 'model': - tag = 'mg5proccard' + tag = 'mg5proccard' attr_tag = 'proc_card' arg = ('model',) elif tag == 'generate': - tag = 'mg5proccard' + tag = 'mg5proccard' attr_tag = 'proc_card' arg = ('generate',) elif tag == 'shower_card': tag = 'mgshowercard' attr_tag = 'shower_card' assert tag in ['slha', 'mgruncard', 'mg5proccard', 'shower_card'], '%s not recognized' % tag - + if not hasattr(self, attr_tag): - self.charge_card(attr_tag) + self.charge_card(attr_tag) card = getattr(self, attr_tag) if len(arg) == 0: @@ -613,7 +613,7 @@ def get_detail(self, tag, *arg, **opt): if 'default' in opt: return opt['default'] else: - raise + raise elif len(arg) == 2 and tag == 'slha': try: return card[arg[0]].get(arg[1:]) @@ -621,15 +621,15 @@ def get_detail(self, tag, *arg, **opt): if 'default' in opt: return opt['default'] else: - raise + raise elif len(arg) == 0: return card else: raise Exception("Unknow command") - + #convenient alias get = get_detail - + def set(self, tag, *args): """modify one of the cards""" @@ -637,27 +637,27 @@ def set(self, tag, *args): tag = 'slha' attr_tag = 'param_card' elif tag == 'run_card': - tag = 'mgruncard' + tag = 'mgruncard' attr_tag = 'run_card' elif tag == 'proc_card': - tag = 'mg5proccard' + tag = 'mg5proccard' attr_tag = 'proc_card' elif tag == 'model': - tag = 'mg5proccard' + tag = 'mg5proccard' attr_tag = 'proc_card' arg = ('model',) elif tag == 'generate': - tag = 'mg5proccard' + tag = 'mg5proccard' attr_tag = 'proc_card' arg = ('generate',) elif tag == 'shower_card': tag = 'mgshowercard' attr_tag = 'shower_card' assert tag in ['slha', 'mgruncard', 'mg5proccard', 'shower_card'], 'not recognized' - + if not hasattr(self, attr_tag): - self.charge_card(attr_tag) - + self.charge_card(attr_tag) + card = getattr(self, attr_tag) if len(args) ==2: if tag == 'mg5proccard': @@ -666,20 +666,20 @@ def set(self, tag, *args): card[args[0]] = args[1] else: card[args[:-1]] = args[-1] - - + + @misc.multiple_try() def add_to_file(self, path, seed=None, out=None): """Add the banner to a file and change the associate seed in the banner""" if seed is not None: self.set("run_card", "iseed", seed) - + if not out: path_out = "%s.tmp" % path else: path_out = out - + ff = self.write(path_out, close_tag=False, exclude=['MGGenerationInfo', '/header', 'init']) ff.write("## END BANNER##\n") @@ -698,44 +698,44 @@ def add_to_file(self, path, seed=None, out=None): files.mv(path_out, path) - + def split_banner(banner_path, me_dir, proc_card=True): """a simple way to split a banner""" - + banner = Banner(banner_path) banner.split(me_dir, proc_card) - + def recover_banner(results_object, level, run=None, tag=None): """as input we receive a gen_crossxhtml.AllResults object. This define the current banner and load it """ - + if not run: - try: - _run = results_object.current['run_name'] - _tag = results_object.current['tag'] + try: + _run = results_object.current['run_name'] + _tag = results_object.current['tag'] except Exception: return Banner() else: _run = run if not tag: - try: - _tag = results_object[run].tags[-1] + try: + _tag = results_object[run].tags[-1] except Exception as error: if os.path.exists( pjoin(results_object.path,'Events','%s_banner.txt' % (run))): tag = None else: - return Banner() + return Banner() else: _tag = tag - - path = results_object.path - if tag: + + path = results_object.path + if tag: banner_path = pjoin(path,'Events',run,'%s_%s_banner.txt' % (run, tag)) else: banner_path = pjoin(results_object.path,'Events','%s_banner.txt' % (run)) - + if not os.path.exists(banner_path): if level != "parton" and tag != _tag: return recover_banner(results_object, level, _run, results_object[_run].tags[0]) @@ -754,12 +754,12 @@ def recover_banner(results_object, level, run=None, tag=None): return Banner(lhe.banner) # security if the banner was remove (or program canceled before created it) - return Banner() - + return Banner() + banner = Banner(banner_path) - - - + + + if level == 'pythia': if 'mgpythiacard' in banner: del banner['mgpythiacard'] @@ -768,13 +768,13 @@ def recover_banner(results_object, level, run=None, tag=None): if tag in banner: del banner[tag] return banner - + class InvalidRunCard(InvalidCmd): pass class ProcCard(list): """Basic Proccard object""" - + history_header = \ '#************************************************************\n' + \ '#* MadGraph5_aMC@NLO *\n' + \ @@ -798,10 +798,10 @@ class ProcCard(list): '#* run as ./bin/mg5_aMC filename *\n' + \ '#* *\n' + \ '#************************************************************\n' - - - - + + + + def __init__(self, init=None): """ initialize a basic proc_card""" self.info = {'model': 'sm', 'generate':None, @@ -810,13 +810,13 @@ def __init__(self, init=None): if init: self.read(init) - + def read(self, init): """read the proc_card and save the information""" - + if isinstance(init, str): #path to file init = open(init, 'r') - + store_line = '' for line in init: line = line.rstrip() @@ -828,28 +828,28 @@ def read(self, init): store_line = "" if store_line: raise Exception("WRONG CARD FORMAT") - - + + def move_to_last(self, cmd): """move an element to the last history.""" for line in self[:]: if line.startswith(cmd): self.remove(line) list.append(self, line) - + def append(self, line): """"add a line in the proc_card perform automatically cleaning""" - + line = line.strip() cmds = line.split() if len(cmds) == 0: return - + list.append(self, line) - + # command type: cmd = cmds[0] - + if cmd == 'output': # Remove previous outputs from history self.clean(allow_for_removal = ['output'], keep_switch=True, @@ -875,7 +875,7 @@ def append(self, line): elif cmds[1] == 'proc_v4': #full cleaning self[:] = [] - + def clean(self, to_keep=['set','add','load'], remove_bef_last=None, @@ -884,13 +884,13 @@ def clean(self, to_keep=['set','add','load'], keep_switch=False): """Remove command in arguments from history. All command before the last occurrence of 'remove_bef_last' - (including it) will be removed (but if another options tells the opposite). + (including it) will be removed (but if another options tells the opposite). 'to_keep' is a set of line to always keep. - 'to_remove' is a set of line to always remove (don't care about remove_bef_ + 'to_remove' is a set of line to always remove (don't care about remove_bef_ status but keep_switch acts.). - if 'allow_for_removal' is define only the command in that list can be + if 'allow_for_removal' is define only the command in that list can be remove of the history for older command that remove_bef_lb1. all parameter - present in to_remove are always remove even if they are not part of this + present in to_remove are always remove even if they are not part of this list. keep_switch force to keep the statement remove_bef_??? which changes starts the removal mode. @@ -900,8 +900,8 @@ def clean(self, to_keep=['set','add','load'], if __debug__ and allow_for_removal: for arg in to_keep: assert arg not in allow_for_removal - - + + nline = -1 removal = False #looping backward @@ -912,7 +912,7 @@ def clean(self, to_keep=['set','add','load'], if not removal and remove_bef_last: if self[nline].startswith(remove_bef_last): removal = True - switch = True + switch = True # if this is the switch and is protected pass to the next element if switch and keep_switch: @@ -923,12 +923,12 @@ def clean(self, to_keep=['set','add','load'], if any([self[nline].startswith(arg) for arg in to_remove]): self.pop(nline) continue - + # Only if removal mode is active! if removal: if allow_for_removal: # Only a subset of command can be removed - if any([self[nline].startswith(arg) + if any([self[nline].startswith(arg) for arg in allow_for_removal]): self.pop(nline) continue @@ -936,10 +936,10 @@ def clean(self, to_keep=['set','add','load'], # All command have to be remove but protected self.pop(nline) continue - + # update the counter to pass to the next element nline -= 1 - + def get(self, tag, default=None): if isinstance(tag, int): list.__getattr__(self, tag) @@ -954,32 +954,32 @@ def get(self, tag, default=None): except ValueError: name, content = line[7:].split(None,1) out.append((name, content)) - return out + return out else: return self.info[tag] - + def write(self, path): """write the proc_card to a given path""" - + fsock = open(path, 'w') fsock.write(self.history_header) for line in self: while len(line) > 70: - sub, line = line[:70]+"\\" , line[70:] + sub, line = line[:70]+"\\" , line[70:] fsock.write(sub+"\n") else: fsock.write(line+"\n") - -class InvalidCardEdition(InvalidCmd): pass - + +class InvalidCardEdition(InvalidCmd): pass + class ConfigFile(dict): """ a class for storing/dealing with input file. - """ + """ def __init__(self, finput=None, **opt): """initialize a new instance. input can be an instance of MadLoopParam, - a file, a path to a file, or simply Nothing""" - + a file, a path to a file, or simply Nothing""" + if isinstance(finput, self.__class__): dict.__init__(self) for key in finput.__dict__: @@ -989,7 +989,7 @@ def __init__(self, finput=None, **opt): return else: dict.__init__(self) - + # Initialize it with all the default value self.user_set = set() self.auto_set = set() @@ -1000,15 +1000,15 @@ def __init__(self, finput=None, **opt): self.comments = {} # comment associated to parameters. can be display via help message # store the valid options for a given parameter. self.allowed_value = {} - + self.default_setup() self.plugin_input(finput) - + # if input is define read that input if isinstance(finput, (file, str, StringIO.StringIO)): self.read(finput, **opt) - + @@ -1028,7 +1028,7 @@ def __add__(self, other): base = self.__class__(self) #base = copy.copy(self) base.update((key.lower(),value) for key, value in other.items()) - + return base def __radd__(self, other): @@ -1036,26 +1036,26 @@ def __radd__(self, other): new = copy.copy(other) new.update((key, value) for key, value in self.items()) return new - + def __contains__(self, key): return dict.__contains__(self, key.lower()) def __iter__(self): - + for name in super(ConfigFile, self).__iter__(): yield self.lower_to_case[name.lower()] - - + + #iter = super(ConfigFile, self).__iter__() #misc.sprint(iter) #return (self.lower_to_case[name] for name in iter) - + def keys(self): return [name for name in self] - + def items(self): return [(name,self[name]) for name in self] - + @staticmethod def warn(text, level, raiseerror=False): """convenient proxy to raiseerror/print warning""" @@ -1071,11 +1071,11 @@ def warn(text, level, raiseerror=False): log = lambda t: logger.log(level, t) elif level: log = level - + return log(text) def post_set(self, name, value, change_userdefine, raiseerror): - + if value is None: value = self[name] @@ -1087,25 +1087,25 @@ def post_set(self, name, value, change_userdefine, raiseerror): return getattr(self, 'post_set_%s' % name)(value, change_userdefine, raiseerror) else: raise - + def __setitem__(self, name, value, change_userdefine=False,raiseerror=False): """set the attribute and set correctly the type if the value is a string. change_userdefine on True if we have to add the parameter in user_set """ - + if not len(self): #Should never happen but when deepcopy/pickle self.__init__() - + name = name.strip() - lower_name = name.lower() - + lower_name = name.lower() + # 0. check if this parameter is a system only one if change_userdefine and lower_name in self.system_only: text='%s is a private entry which can not be modify by the user. Keep value at %s' % (name,self[name]) self.warn(text, 'critical', raiseerror) return - + #1. check if the parameter is set to auto -> pass it to special if lower_name in self: targettype = type(dict.__getitem__(self, lower_name)) @@ -1115,22 +1115,22 @@ def __setitem__(self, name, value, change_userdefine=False,raiseerror=False): self.user_set.remove(lower_name) #keep old value. self.post_set(lower_name, 'auto', change_userdefine, raiseerror) - return + return elif lower_name in self.auto_set: self.auto_set.remove(lower_name) - + # 2. Find the type of the attribute that we want if lower_name in self.list_parameter: targettype = self.list_parameter[lower_name] - - - + + + if isinstance(value, str): # split for each comma/space value = value.strip() if value.startswith('[') and value.endswith(']'): value = value[1:-1] - #do not perform split within a " or ' block + #do not perform split within a " or ' block data = re.split(r"((? bad input dropped.append(val) - + if not new_values: text= "value '%s' for entry '%s' is not valid. Preserving previous value: '%s'.\n" \ % (value, name, self[lower_name]) text += "allowed values are any list composed of the following entries: %s" % ', '.join([str(i) for i in self.allowed_value[lower_name]]) - return self.warn(text, 'warning', raiseerror) - elif dropped: + return self.warn(text, 'warning', raiseerror) + elif dropped: text = "some value for entry '%s' are not valid. Invalid items are: '%s'.\n" \ % (name, dropped) text += "value will be set to %s" % new_values - text += "allowed items in the list are: %s" % ', '.join([str(i) for i in self.allowed_value[lower_name]]) + text += "allowed items in the list are: %s" % ', '.join([str(i) for i in self.allowed_value[lower_name]]) self.warn(text, 'warning') values = new_values # make the assignment - dict.__setitem__(self, lower_name, values) + dict.__setitem__(self, lower_name, values) if change_userdefine: self.user_set.add(lower_name) #check for specific action - return self.post_set(lower_name, None, change_userdefine, raiseerror) + return self.post_set(lower_name, None, change_userdefine, raiseerror) elif lower_name in self.dict_parameter: - targettype = self.dict_parameter[lower_name] + targettype = self.dict_parameter[lower_name] full_reset = True #check if we just update the current dict or not - + if isinstance(value, str): value = value.strip() # allowed entry: @@ -1209,7 +1209,7 @@ def __setitem__(self, name, value, change_userdefine=False,raiseerror=False): # name , value => just add the entry # name value => just add the entry # {name1:value1, name2:value2} => full reset - + # split for each comma/space if value.startswith('{') and value.endswith('}'): new_value = {} @@ -1219,23 +1219,23 @@ def __setitem__(self, name, value, change_userdefine=False,raiseerror=False): x, y = pair.split(':') x, y = x.strip(), y.strip() if x.startswith(('"',"'")) and x.endswith(x[0]): - x = x[1:-1] + x = x[1:-1] new_value[x] = y value = new_value elif ',' in value: x,y = value.split(',') value = {x.strip():y.strip()} full_reset = False - + elif ':' in value: x,y = value.split(':') value = {x.strip():y.strip()} - full_reset = False + full_reset = False else: x,y = value.split() value = {x:y} - full_reset = False - + full_reset = False + if isinstance(value, dict): for key in value: value[key] = self.format_variable(value[key], targettype, name=name) @@ -1248,7 +1248,7 @@ def __setitem__(self, name, value, change_userdefine=False,raiseerror=False): if change_userdefine: self.user_set.add(lower_name) return self.post_set(lower_name, None, change_userdefine, raiseerror) - elif name in self: + elif name in self: targettype = type(self[name]) else: logger.debug('Trying to add argument %s in %s. ' % (name, self.__class__.__name__) +\ @@ -1256,22 +1256,22 @@ def __setitem__(self, name, value, change_userdefine=False,raiseerror=False): suggestions = [k for k in self.keys() if k.startswith(name[0].lower())] if len(suggestions)>0: logger.debug("Did you mean one of the following: %s"%suggestions) - self.add_param(lower_name, self.format_variable(UnknownType(value), + self.add_param(lower_name, self.format_variable(UnknownType(value), UnknownType, name)) self.lower_to_case[lower_name] = name if change_userdefine: self.user_set.add(lower_name) return self.post_set(lower_name, None, change_userdefine, raiseerror) - + value = self.format_variable(value, targettype, name=name) #check that the value is allowed: if lower_name in self.allowed_value and '*' not in self.allowed_value[lower_name]: valid = False allowed = self.allowed_value[lower_name] - + # check if the current value is allowed or not (set valid to True) if value in allowed: - valid=True + valid=True elif isinstance(value, str): value = value.lower().strip() allowed = [str(v).lower() for v in allowed] @@ -1279,7 +1279,7 @@ def __setitem__(self, name, value, change_userdefine=False,raiseerror=False): i = allowed.index(value) value = self.allowed_value[lower_name][i] valid=True - + if not valid: # act if not valid: text = "value '%s' for entry '%s' is not valid. Preserving previous value: '%s'.\n" \ @@ -1303,7 +1303,7 @@ def add_param(self, name, value, system=False, comment=False, typelist=None, if __debug__: if lower_name in self: raise Exception("Duplicate case for %s in %s" % (name,self.__class__)) - + dict.__setitem__(self, lower_name, value) self.lower_to_case[lower_name] = name if isinstance(value, list): @@ -1318,12 +1318,12 @@ def add_param(self, name, value, system=False, comment=False, typelist=None, elif isinstance(value, dict): allvalues = list(value.values()) if any([type(allvalues[0]) != type(v) for v in allvalues]): - raise Exception("All entry should have the same type") - self.dict_parameter[lower_name] = type(allvalues[0]) + raise Exception("All entry should have the same type") + self.dict_parameter[lower_name] = type(allvalues[0]) if '__type__' in value: del value['__type__'] dict.__setitem__(self, lower_name, value) - + if allowed and allowed != ['*']: self.allowed_value[lower_name] = allowed if lower_name in self.list_parameter: @@ -1333,8 +1333,8 @@ def add_param(self, name, value, system=False, comment=False, typelist=None, assert value in allowed or '*' in allowed #elif isinstance(value, bool) and allowed != ['*']: # self.allowed_value[name] = [True, False] - - + + if system: self.system_only.add(lower_name) if comment: @@ -1342,7 +1342,7 @@ def add_param(self, name, value, system=False, comment=False, typelist=None, def do_help(self, name): """return a minimal help for the parameter""" - + out = "## Information on parameter %s from class %s\n" % (name, self.__class__.__name__) if name.lower() in self: out += "## current value: %s (parameter should be of type %s)\n" % (self[name], type(self[name])) @@ -1351,7 +1351,7 @@ def do_help(self, name): else: out += "## Unknown for this class\n" if name.lower() in self.user_set: - out += "## This value is considered as being set by the user\n" + out += "## This value is considered as being set by the user\n" else: out += "## This value is considered as being set by the system\n" if name.lower() in self.allowed_value: @@ -1359,17 +1359,17 @@ def do_help(self, name): out += "Allowed value are: %s\n" % ','.join([str(p) for p in self.allowed_value[name.lower()]]) else: out += "Suggested value are : %s\n " % ','.join([str(p) for p in self.allowed_value[name.lower()] if p!='*']) - + logger.info(out) return out @staticmethod def guess_type_from_value(value): "try to guess the type of the string --do not use eval as it might not be safe" - + if not isinstance(value, str): return str(value.__class__.__name__) - + #use ast.literal_eval to be safe since value is untrusted # add a timeout to mitigate infinite loop, memory stack attack with misc.stdchannel_redirected(sys.stdout, os.devnull): @@ -1388,7 +1388,7 @@ def guess_type_from_value(value): @staticmethod def format_variable(value, targettype, name="unknown"): """assign the value to the attribute for the given format""" - + if isinstance(targettype, str): if targettype in ['str', 'int', 'float', 'bool']: targettype = eval(targettype) @@ -1412,7 +1412,7 @@ def format_variable(value, targettype, name="unknown"): (name, type(value), targettype, value)) else: raise InvalidCmd("Wrong input type for %s found %s and expecting %s for value %s" %\ - (name, type(value), targettype, value)) + (name, type(value), targettype, value)) else: if targettype != UnknownType: value = value.strip() @@ -1441,8 +1441,8 @@ def format_variable(value, targettype, name="unknown"): value = int(value) elif value.endswith(('k', 'M')) and value[:-1].isdigit(): convert = {'k':1000, 'M':1000000} - value =int(value[:-1]) * convert[value[-1]] - elif '/' in value or '*' in value: + value =int(value[:-1]) * convert[value[-1]] + elif '/' in value or '*' in value: try: split = re.split('(\*|/)',value) v = float(split[0]) @@ -1461,7 +1461,7 @@ def format_variable(value, targettype, name="unknown"): try: value = float(value.replace('d','e')) except ValueError: - raise InvalidCmd("%s can not be mapped to an integer" % value) + raise InvalidCmd("%s can not be mapped to an integer" % value) try: new_value = int(value) except ValueError: @@ -1471,7 +1471,7 @@ def format_variable(value, targettype, name="unknown"): value = new_value else: raise InvalidCmd("incorect input: %s need an integer for %s" % (value,name)) - + elif targettype == float: if value.endswith(('k', 'M')) and value[:-1].isdigit(): convert = {'k':1000, 'M':1000000} @@ -1496,33 +1496,33 @@ def format_variable(value, targettype, name="unknown"): value = v else: raise InvalidCmd("type %s is not handle by the card" % targettype) - + return value - - + + def __getitem__(self, name): - + lower_name = name.lower() if __debug__: if lower_name not in self: if lower_name in [key.lower() for key in self] : raise Exception("Some key are not lower case %s. Invalid use of the class!"\ % [key for key in self if key.lower() != key]) - + if lower_name in self.auto_set: return 'auto' - + return dict.__getitem__(self, name.lower()) - + get = __getitem__ def set(self, name, value, changeifuserset=True, user=False, raiseerror=False): """convenient way to change attribute. changeifuserset=False means that the value is NOT change is the value is not on default. - user=True, means that the value will be marked as modified by the user - (potentially preventing future change to the value) + user=True, means that the value will be marked as modified by the user + (potentially preventing future change to the value) """ # changeifuserset=False -> we need to check if the user force a value. @@ -1530,8 +1530,8 @@ def set(self, name, value, changeifuserset=True, user=False, raiseerror=False): if name.lower() in self.user_set: #value modified by the user -> do nothing return - self.__setitem__(name, value, change_userdefine=user, raiseerror=raiseerror) - + self.__setitem__(name, value, change_userdefine=user, raiseerror=raiseerror) + class RivetCard(ConfigFile): @@ -1706,7 +1706,7 @@ def setRelevantParamCard(self, f_params, f_relparams): yexec_dict = {} yexec_line = exec_line + "yaxis_relvar = " + self['yaxis_relvar'] exec(yexec_line, locals(), yexec_dict) - if self['yaxis_label'] == "": + if self['yaxis_label'] == "": self['yaxis_label'] = "yaxis_relvar" f_relparams.write("{0} = {1}\n".format(self['yaxis_label'], yexec_dict['yaxis_relvar'])) else: @@ -1715,11 +1715,11 @@ def setRelevantParamCard(self, f_params, f_relparams): class ProcCharacteristic(ConfigFile): """A class to handle information which are passed from MadGraph to the madevent - interface.""" - + interface.""" + def default_setup(self): """initialize the directory to the default value""" - + self.add_param('loop_induced', False) self.add_param('has_isr', False) self.add_param('has_fsr', False) @@ -1735,16 +1735,16 @@ def default_setup(self): self.add_param('pdg_initial1', [0]) self.add_param('pdg_initial2', [0]) self.add_param('splitting_types',[], typelist=str) - self.add_param('perturbation_order', [], typelist=str) - self.add_param('limitations', [], typelist=str) - self.add_param('hel_recycling', False) + self.add_param('perturbation_order', [], typelist=str) + self.add_param('limitations', [], typelist=str) + self.add_param('hel_recycling', False) self.add_param('single_color', True) - self.add_param('nlo_mixed_expansion', True) + self.add_param('nlo_mixed_expansion', True) def read(self, finput): - """Read the input file, this can be a path to a file, + """Read the input file, this can be a path to a file, a file object, a str with the content of the file.""" - + if isinstance(finput, str): if "\n" in finput: finput = finput.split('\n') @@ -1752,49 +1752,49 @@ def read(self, finput): finput = open(finput) else: raise Exception("No such file %s" % finput) - + for line in finput: if '#' in line: line = line.split('#',1)[0] if not line: continue - + if '=' in line: key, value = line.split('=',1) self[key.strip()] = value - + def write(self, outputpath): """write the file""" template ="# Information about the process #\n" template +="#########################################\n" - + fsock = open(outputpath, 'w') fsock.write(template) - + for key, value in self.items(): fsock.write(" %s = %s \n" % (key, value)) - - fsock.close() - + + fsock.close() + class GridpackCard(ConfigFile): """an object for the GridpackCard""" - + def default_setup(self): """default value for the GridpackCard""" - + self.add_param("GridRun", True) self.add_param("gevents", 2500) self.add_param("gseed", 1) - self.add_param("ngran", -1) - + self.add_param("ngran", -1) + def read(self, finput): - """Read the input file, this can be a path to a file, + """Read the input file, this can be a path to a file, a file object, a str with the content of the file.""" - + if isinstance(finput, str): if "\n" in finput: finput = finput.split('\n') @@ -1802,7 +1802,7 @@ def read(self, finput): finput = open(finput) else: raise Exception("No such file %s" % finput) - + for line in finput: line = line.split('#')[0] line = line.split('!')[0] @@ -1812,19 +1812,19 @@ def read(self, finput): self[line[1].strip()] = line[0].replace('\'','').strip() def write(self, output_file, template=None): - """Write the run_card in output_file according to template + """Write the run_card in output_file according to template (a path to a valid run_card)""" if not template: if not MADEVENT: - template = pjoin(MG5DIR, 'Template', 'LO', 'Cards', + template = pjoin(MG5DIR, 'Template', 'LO', 'Cards', 'grid_card_default.dat') else: template = pjoin(MEDIR, 'Cards', 'grid_card_default.dat') - + text = "" - for line in open(template,'r'): + for line in open(template,'r'): nline = line.split('#')[0] nline = nline.split('!')[0] comment = line[len(nline):] @@ -1832,19 +1832,19 @@ def write(self, output_file, template=None): if len(nline) != 2: text += line elif nline[1].strip() in self: - text += ' %s\t= %s %s' % (self[nline[1].strip()],nline[1], comment) + text += ' %s\t= %s %s' % (self[nline[1].strip()],nline[1], comment) else: logger.info('Adding missing parameter %s to current run_card (with default value)' % nline[1].strip()) - text += line - + text += line + if isinstance(output_file, str): fsock = open(output_file,'w') else: fsock = output_file - + fsock.write(text) fsock.close() - + class PY8Card(ConfigFile): """ Implements the Pythia8 card.""" @@ -1868,7 +1868,7 @@ def add_default_subruns(self, type): def default_setup(self): """ Sets up the list of available PY8 parameters.""" - + # Visible parameters # ================== self.add_param("Main:numberOfEvents", -1) @@ -1877,11 +1877,11 @@ def default_setup(self): self.add_param("JetMatching:qCut", -1.0, always_write_to_card=False) self.add_param("JetMatching:doShowerKt",False,always_write_to_card=False) # -1 means that it is automatically set. - self.add_param("JetMatching:nJetMax", -1, always_write_to_card=False) + self.add_param("JetMatching:nJetMax", -1, always_write_to_card=False) # for CKKWL merging self.add_param("Merging:TMS", -1.0, always_write_to_card=False) self.add_param("Merging:Process", '', always_write_to_card=False) - # -1 means that it is automatically set. + # -1 means that it is automatically set. self.add_param("Merging:nJetMax", -1, always_write_to_card=False) # for both merging, chose whether to also consider different merging # scale values for the extra weights related to scale and PDF variations. @@ -1918,10 +1918,10 @@ def default_setup(self): comment='This allows to turn on/off hadronization alltogether.') self.add_param("partonlevel:mpi", True, hidden=True, always_write_to_card=False, comment='This allows to turn on/off MPI alltogether.') - self.add_param("Beams:setProductionScalesFromLHEF", False, hidden=True, + self.add_param("Beams:setProductionScalesFromLHEF", False, hidden=True, always_write_to_card=False, comment='This parameter is automatically set to True by MG5aMC when doing MLM merging with PY8.') - + # for MLM merging self.add_param("JetMatching:merge", False, hidden=True, always_write_to_card=False, comment='Specifiy if we are merging sample of different multiplicity.') @@ -1931,9 +1931,9 @@ def default_setup(self): comment='Value of the merging scale below which one does not even write the HepMC event.') self.add_param("JetMatching:doVeto", False, hidden=True, always_write_to_card=False, comment='Do veto externally (e.g. in SysCalc).') - self.add_param("JetMatching:scheme", 1, hidden=True, always_write_to_card=False) + self.add_param("JetMatching:scheme", 1, hidden=True, always_write_to_card=False) self.add_param("JetMatching:setMad", False, hidden=True, always_write_to_card=False, - comment='Specify one must read inputs from the MadGraph banner.') + comment='Specify one must read inputs from the MadGraph banner.') self.add_param("JetMatching:coneRadius", 1.0, hidden=True, always_write_to_card=False) self.add_param("JetMatching:nQmatch",4,hidden=True, always_write_to_card=False) # for CKKWL merging (common with UMEPS, UNLOPS) @@ -1946,7 +1946,7 @@ def default_setup(self): self.add_param("Merging:applyVeto", False, hidden=True, always_write_to_card=False, comment='Do veto externally (e.g. in SysCalc).') self.add_param("Merging:includeWeightInXsection", True, hidden=True, always_write_to_card=False, - comment='If turned off, then the option belows forces PY8 to keep the original weight.') + comment='If turned off, then the option belows forces PY8 to keep the original weight.') self.add_param("Merging:muRen", 91.188, hidden=True, always_write_to_card=False, comment='Set renormalization scales of the 2->2 process.') self.add_param("Merging:muFacInME", 91.188, hidden=True, always_write_to_card=False, @@ -1958,7 +1958,7 @@ def default_setup(self): # To be added in subruns for CKKWL self.add_param("Merging:mayRemoveDecayProducts", False, hidden=True, always_write_to_card=False) self.add_param("Merging:doKTMerging", False, hidden=True, always_write_to_card=False) - self.add_param("Merging:Dparameter", 0.4, hidden=True, always_write_to_card=False) + self.add_param("Merging:Dparameter", 0.4, hidden=True, always_write_to_card=False) self.add_param("Merging:doPTLundMerging", False, hidden=True, always_write_to_card=False) # Special Pythia8 paremeters useful to simplify the shower. @@ -1975,33 +1975,33 @@ def default_setup(self): # Add parameters controlling the subruns execution flow. # These parameters should not be part of PY8SubRun daughter. self.add_default_subruns('parameters') - + def __init__(self, *args, **opts): - # Parameters which are not printed in the card unless they are - # 'user_set' or 'system_set' or part of the + # Parameters which are not printed in the card unless they are + # 'user_set' or 'system_set' or part of the # self.hidden_params_to_always_print set. self.hidden_param = [] self.hidden_params_to_always_write = set() self.visible_params_to_always_write = set() # List of parameters that should never be written out given the current context. self.params_to_never_write = set() - + # Parameters which have been set by the system (i.e. MG5 itself during # the regular course of the shower interface) self.system_set = set() - + # Add attributes controlling the subruns execution flow. # These attributes should not be part of PY8SubRun daughter. self.add_default_subruns('attributes') - - # Parameters which have been set by the + + # Parameters which have been set by the super(PY8Card, self).__init__(*args, **opts) - def add_param(self, name, value, hidden=False, always_write_to_card=True, + def add_param(self, name, value, hidden=False, always_write_to_card=True, comment=None): - """ add a parameter to the card. value is the default value and + """ add a parameter to the card. value is the default value and defines the type (int/float/bool/str) of the input. The option 'hidden' decides whether the parameter should be visible to the user. The option 'always_write_to_card' decides whether it should @@ -2017,7 +2017,7 @@ def add_param(self, name, value, hidden=False, always_write_to_card=True, self.hidden_params_to_always_write.add(name) else: if always_write_to_card: - self.visible_params_to_always_write.add(name) + self.visible_params_to_always_write.add(name) if not comment is None: if not isinstance(comment, str): raise MadGraph5Error("Option 'comment' must be a string, not"+\ @@ -2036,7 +2036,7 @@ def add_subrun(self, py8_subrun): self.subruns[py8_subrun['Main:subrun']] = py8_subrun if not 'LHEFInputs:nSubruns' in self.user_set: self['LHEFInputs:nSubruns'] = max(self.subruns.keys()) - + def userSet(self, name, value, **opts): """Set an attribute of this card, following a user_request""" self.__setitem__(name, value, change_userdefine=True, **opts) @@ -2044,10 +2044,10 @@ def userSet(self, name, value, **opts): self.system_set.remove(name.lower()) def vetoParamWriteOut(self, name): - """ Forbid the writeout of a specific parameter of this card when the + """ Forbid the writeout of a specific parameter of this card when the "write" function will be invoked.""" self.params_to_never_write.add(name.lower()) - + def systemSet(self, name, value, **opts): """Set an attribute of this card, independently of a specific user request and only if not already user_set.""" @@ -2058,7 +2058,7 @@ def systemSet(self, name, value, **opts): if force or name.lower() not in self.user_set: self.__setitem__(name, value, change_userdefine=False, **opts) self.system_set.add(name.lower()) - + def MadGraphSet(self, name, value, **opts): """ Sets a card attribute, but only if it is absent or not already user_set.""" @@ -2068,18 +2068,18 @@ def MadGraphSet(self, name, value, **opts): force = False if name.lower() not in self or (force or name.lower() not in self.user_set): self.__setitem__(name, value, change_userdefine=False, **opts) - self.system_set.add(name.lower()) - + self.system_set.add(name.lower()) + def defaultSet(self, name, value, **opts): self.__setitem__(name, value, change_userdefine=False, **opts) - + @staticmethod def pythia8_formatting(value, formatv=None): """format the variable into pythia8 card convention. The type is detected by default""" if not formatv: if isinstance(value,UnknownType): - formatv = 'unknown' + formatv = 'unknown' elif isinstance(value, bool): formatv = 'bool' elif isinstance(value, int): @@ -2095,7 +2095,7 @@ def pythia8_formatting(value, formatv=None): formatv = 'str' else: assert formatv - + if formatv == 'unknown': # No formatting then return str(value) @@ -2116,7 +2116,7 @@ def pythia8_formatting(value, formatv=None): elif formatv == 'float': return '%.10e' % float(value) elif formatv == 'shortfloat': - return '%.3f' % float(value) + return '%.3f' % float(value) elif formatv == 'str': return "%s" % value elif formatv == 'list': @@ -2124,9 +2124,9 @@ def pythia8_formatting(value, formatv=None): return ','.join([PY8Card.pythia8_formatting(arg, 'shortfloat') for arg in value]) else: return ','.join([PY8Card.pythia8_formatting(arg) for arg in value]) - - def write(self, output_file, template, read_subrun=False, + + def write(self, output_file, template, read_subrun=False, print_only_visible=False, direct_pythia_input=False, add_missing=True): """ Write the card to output_file using a specific template. > 'print_only_visible' specifies whether or not the hidden parameters @@ -2143,28 +2143,28 @@ def write(self, output_file, template, read_subrun=False, or p.lower() in self.user_set] # Filter against list of parameters vetoed for write-out visible_param = [p for p in visible_param if p.lower() not in self.params_to_never_write] - + # Now the hidden param which must be written out if print_only_visible: hidden_output_param = [] else: hidden_output_param = [p for p in self if p.lower() in self.hidden_param and not p.lower() in self.user_set and - (p.lower() in self.hidden_params_to_always_write or + (p.lower() in self.hidden_params_to_always_write or p.lower() in self.system_set)] # Filter against list of parameters vetoed for write-out hidden_output_param = [p for p in hidden_output_param if p not in self.params_to_never_write] - + if print_only_visible: subruns = [] else: if not read_subrun: subruns = sorted(self.subruns.keys()) - + # Store the subruns to write in a dictionary, with its ID in key # and the corresponding stringstream in value subruns_to_write = {} - + # Sort these parameters nicely so as to put together parameters # belonging to the same group (i.e. prefix before the ':' in their name). def group_params(params): @@ -2191,7 +2191,7 @@ def group_params(params): # First dump in a temporary_output (might need to have a second pass # at the very end to update 'LHEFInputs:nSubruns') output = StringIO.StringIO() - + # Setup template from which to read if isinstance(template, str): if os.path.isfile(template): @@ -2199,7 +2199,7 @@ def group_params(params): elif '\n' in template: tmpl = StringIO.StringIO(template) else: - raise Exception("File input '%s' not found." % file_input) + raise Exception("File input '%s' not found." % file_input) elif template is None: # Then use a dummy empty StringIO, hence skipping the reading tmpl = StringIO.StringIO() @@ -2257,8 +2257,8 @@ def group_params(params): # Remove all of its variables (so that nothing is overwritten) DummySubrun.clear() DummySubrun.write(subruns_to_write[int(value)], - tmpl, read_subrun=True, - print_only_visible=print_only_visible, + tmpl, read_subrun=True, + print_only_visible=print_only_visible, direct_pythia_input=direct_pythia_input) logger.info('Adding new unknown subrun with ID %d.'% @@ -2267,7 +2267,7 @@ def group_params(params): last_pos = tmpl.tell() line = tmpl.readline() continue - + # Change parameters which must be output if param in visible_param: new_value = PY8Card.pythia8_formatting(self[param]) @@ -2286,10 +2286,10 @@ def group_params(params): last_pos = tmpl.tell() line = tmpl.readline() continue - - # Substitute the value. + + # Substitute the value. # If it is directly the pytia input, then don't write the param if it - # is not in the list of visible_params_to_always_write and was + # is not in the list of visible_params_to_always_write and was # not user_set or system_set if ((not direct_pythia_input) or (param.lower() in self.visible_params_to_always_write) or @@ -2304,16 +2304,16 @@ def group_params(params): output.write(template%(param_entry, value_entry.replace(value,new_value))) - + # Proceed to next line last_pos = tmpl.tell() line = tmpl.readline() - + # If add_missing is False, make sure to empty the list of remaining parameters if not add_missing: visible_param = [] hidden_output_param = [] - + # Now output the missing parameters. Warn about visible ones. if len(visible_param)>0 and not template is None: output.write( @@ -2343,12 +2343,12 @@ def group_params(params): """%(' for subrun %d'%self['Main:subrun'] if 'Main:subrun' in self else '')) for param in hidden_output_param: if param.lower() in self.comments: - comment = '\n'.join('! %s'%c for c in + comment = '\n'.join('! %s'%c for c in self.comments[param.lower()].split('\n')) output.write(comment+'\n') output.write('%s=%s\n'%(param,PY8Card.pythia8_formatting(self[param]))) - - # Don't close the file if we were reading a subrun, but simply write + + # Don't close the file if we were reading a subrun, but simply write # output and return now if read_subrun: output_file.write(output.getvalue()) @@ -2382,12 +2382,12 @@ def group_params(params): out.close() else: output_file.write(output.getvalue()) - + def read(self, file_input, read_subrun=False, setter='default'): - """Read the input file, this can be a path to a file, + """Read the input file, this can be a path to a file, a file object, a str with the content of the file. - The setter option choses the authority that sets potential - modified/new parameters. It can be either: + The setter option choses the authority that sets potential + modified/new parameters. It can be either: 'default' or 'user' or 'system'""" if isinstance(file_input, str): if "\n" in file_input: @@ -2423,8 +2423,8 @@ def read(self, file_input, read_subrun=False, setter='default'): raise MadGraph5Error("Could not read line '%s' of Pythia8 card."%\ line) if '!' in value: - value,_ = value.split('!',1) - + value,_ = value.split('!',1) + # Read a subrun if detected: if param=='Main:subrun': if read_subrun: @@ -2451,7 +2451,7 @@ def read(self, file_input, read_subrun=False, setter='default'): last_pos = finput.tell() line = finput.readline() continue - + # Read parameter. The case of a parameter not defined in the card is # handled directly in ConfigFile. @@ -2478,7 +2478,7 @@ def add_default_subruns(self, type): def __init__(self, *args, **opts): """ Initialize a subrun """ - + # Force user to set it manually. subrunID = -1 if 'subrun_id' in opts: @@ -2489,7 +2489,7 @@ def __init__(self, *args, **opts): def default_setup(self): """Sets up the list of available PY8SubRun parameters.""" - + # Add all default PY8Card parameters super(PY8SubRun, self).default_setup() # Make sure they are all hidden @@ -2501,33 +2501,33 @@ def default_setup(self): self.add_param("Main:subrun", -1) self.add_param("Beams:LHEF", "events.lhe.gz") - + class RunBlock(object): """ Class for a series of parameter in the run_card that can be either visible or hidden. - name: allow to set in the default run_card $name to set where that + name: allow to set in the default run_card $name to set where that block need to be inserted template_on: information to include is block is active template_off: information to include is block is not active on_fields/off_fields: paramater associated to the block - can be specify but are otherwise automatically but + can be specify but are otherwise automatically but otherwise determined from the template. - + function: status(self,run_card) -> return which template need to be used check_validity(self, runcard) -> sanity check - create_default_for_process(self, run_card, proc_characteristic, - history, proc_def) + create_default_for_process(self, run_card, proc_characteristic, + history, proc_def) post_set_XXXX(card, value, change_userdefine, raiseerror) -> fct called when XXXXX is set post_set(card, value, change_userdefine, raiseerror, **opt) -> fct called when a parameter is changed - -> no access to parameter name + -> no access to parameter name -> not called if post_set_XXXX is defined """ - - + + def __init__(self, name, template_on, template_off, on_fields=False, off_fields=False): self.name = name @@ -2550,7 +2550,7 @@ def fields(self): def find_fields_from_template(template): """ return the list of fields from a template. checking line like %(mass_ion2)s = mass_ion2 # mass of the heavy ion (second beam) """ - + return re.findall(r"^\s*%\((.*)\)s\s*=\s*\1", template, re.M) def get_template(self, card): @@ -2565,7 +2565,7 @@ def get_unused_template(self, card): if self.status(card): return self.template_off else: - return self.template_on + return self.template_on def status(self, card): """return False if template_off to be used, True if template_on to be used""" @@ -2594,20 +2594,20 @@ def manage_parameters(self, card, written, to_write): written.add(name) if name in to_write: to_write.remove(name) - + def check_validity(self, runcard): """run self consistency check here --avoid to use runcard[''] = xxx here since it can trigger post_set function""" return def create_default_for_process(self, run_card, proc_characteristic, history, proc_def): - return + return # @staticmethod # def post_set(card, value, change_userdefine, raiseerror, **opt): # """default action to run when a parameter of the block is defined. # Here we do not know which parameter is modified. if this is needed. # then one need to define post_set_XXXXX(card, value, change_userdefine, raiseerror) -# and then only that function is used +# and then only that function is used # """ # # if 'pdlabel' in card.user_set: @@ -2621,7 +2621,7 @@ class RunCard(ConfigFile): blocks = [] parameter_in_block = {} - allowed_lep_densities = {} + allowed_lep_densities = {} default_include_file = 'run_card.inc' default_autodef_file = 'run.inc' donewarning = [] @@ -2637,7 +2637,7 @@ def plugin_input(self, finput): curr_dir = os.path.dirname(os.path.dirname(finput.name)) elif isinstance(finput, str): curr_dir = os.path.dirname(os.path.dirname(finput)) - + if curr_dir: if os.path.exists(pjoin(curr_dir, 'bin', 'internal', 'plugin_run_card')): # expected format {} passing everything as optional argument @@ -2646,7 +2646,7 @@ def plugin_input(self, finput): continue opts = dict(eval(line)) self.add_param(**opts) - + @classmethod def fill_post_set_from_blocks(cls): """set the post_set function for any parameter defined in a run_block""" @@ -2659,8 +2659,8 @@ def fill_post_set_from_blocks(cls): elif hasattr(block, 'post_set'): setattr(cls, 'post_set_%s' % parameter, block.post_set) cls.parameter_in_block[parameter] = block - - + + def __new__(cls, finput=None, **opt): cls.fill_post_set_from_blocks() @@ -2718,9 +2718,9 @@ def __new__(cls, finput=None, **opt): return super(RunCard, cls).__new__(cls, finput, **opt) def __init__(self, *args, **opts): - + # The following parameter are updated in the defaultsetup stage. - + #parameter for which no warning should be raised if not define self.hidden_param = [] # in which include file the parameer should be written @@ -2739,11 +2739,11 @@ def __init__(self, *args, **opts): self.cuts_parameter = {} # parameter added where legacy requires an older value. self.system_default = {} - + self.display_block = [] # set some block to be displayed self.fct_mod = {} # {param: (fct_pointer, *argument, **opts)} - self.cut_class = {} + self.cut_class = {} self.warned=False @@ -2776,11 +2776,11 @@ def get_lepton_densities(cls): else: cls.allowed_lep_densities[identity].append(name) - def add_param(self, name, value, fortran_name=None, include=True, + def add_param(self, name, value, fortran_name=None, include=True, hidden=False, legacy=False, cut=False, system=False, sys_default=None, autodef=False, fct_mod=None, **opts): - """ add a parameter to the card. value is the default value and + """ add a parameter to the card. value is the default value and defines the type (int/float/bool/str) of the input. fortran_name: defines what is the associate name in the f77 code include: defines if we have to put the value in the include file @@ -2795,7 +2795,7 @@ def add_param(self, name, value, fortran_name=None, include=True, fct_mod: defines a function to run if the parameter is modify in the include file options of **opts: - allowed: list of valid options. '*' means anything else should be allowed. - empty list means anything possible as well. + empty list means anything possible as well. - comment: add comment for writing/help - typelist: type of the list if default is empty """ @@ -2823,9 +2823,9 @@ def add_param(self, name, value, fortran_name=None, include=True, self.fct_mod[name] = fct_mod def read(self, finput, consistency=True, unknown_warning=True, **opt): - """Read the input file, this can be a path to a file, + """Read the input file, this can be a path to a file, a file object, a str with the content of the file.""" - + if isinstance(finput, str): if "\n" in finput: finput = finput.split('\n') @@ -2836,7 +2836,7 @@ def read(self, finput, consistency=True, unknown_warning=True, **opt): finput = open(finput) else: raise Exception("No such file %s" % finput) - + for line in finput: line = line.split('#')[0] line = line.split('!')[0] @@ -2864,8 +2864,8 @@ def add_unknown_entry(self, name, value, unknow_warning): This is based on the guess_entry_fromname for the various syntax providing input. This then call add_param accordingly. - This function does not returns anything. - """ + This function does not returns anything. + """ if name == "dsqrt_q2fact1" and not self.LO: raise InvalidRunCard("Looks like you passed a LO run_card for a NLO run. Please correct") @@ -2903,7 +2903,7 @@ def add_unknown_entry(self, name, value, unknow_warning): " The type was assigned to %s. \n"+\ " The definition of that variable will %sbe automatically added to fortran file %s\n"+\ " The value of that variable will %sbe passed to the fortran code via fortran file %s",\ - name, value, vartype if vartype != "list" else "list of %s" % opts.get('typelist').__name__, + name, value, vartype if vartype != "list" else "list of %s" % opts.get('typelist').__name__, "" if opts.get('autodef', False) else "not", "" if opts.get('autodef', False) in [True,False] else opts.get('autodef'), "" if opts.get('include', True) else "not", "" if opts.get('include', True) in [True,False] else opts.get('include')) RunCard.donewarning.append(name) @@ -2923,19 +2923,19 @@ def valid_line(self, line, tmp): return False elif line.strip().startswith('%'): parameter = line[line.find('(')+1:line.find(')')] - + try: cond = self.cuts_parameter[parameter] except KeyError: return True - - + + if template_options.get(cond, default) or cond is True: return True else: - return False + return False else: - return True + return True def reset_simd(self, old_value, new_value, name, *args, **opts): @@ -2946,28 +2946,28 @@ def make_clean(self,old_value, new_value, name, dir): raise Exception('pass make clean for ', dir) def make_Ptouch(self,old_value, new_value, name, reset): - raise Exception('pass Ptouch for ', reset) - + raise Exception('pass Ptouch for ', reset) + def write(self, output_file, template=None, python_template=False, write_hidden=False, template_options=None, **opt): - """Write the run_card in output_file according to template + """Write the run_card in output_file according to template (a path to a valid run_card)""" - to_write = set(self.user_set) + to_write = set(self.user_set) written = set() if not template: raise Exception if not template_options: template_options = collections.defaultdict(str) - + if python_template: text = open(template,'r').read() - text = text.split('\n') + text = text.split('\n') # remove if templating - text = [l if not l.startswith('#IF') else l[l.find(')# ')+2:] + text = [l if not l.startswith('#IF') else l[l.find(')# ')+2:] for l in text if self.valid_line(l, template_options)] text ='\n'.join(text) - + if python_template and not to_write: import string if self.blocks: @@ -2981,14 +2981,14 @@ def write(self, output_file, template=None, python_template=False, if not self.list_parameter: text = text % self else: - data = dict((key.lower(),value) for key, value in self.items()) + data = dict((key.lower(),value) for key, value in self.items()) for name in self.list_parameter: if self.list_parameter[name] != str: data[name] = ', '.join(str(v) for v in data[name]) else: data[name] = "['%s']" % "', '".join(str(v) for v in data[name]) text = text % data - else: + else: text = "" for line in open(template,'r'): nline = line.split('#')[0] @@ -3005,11 +3005,11 @@ def write(self, output_file, template=None, python_template=False, this_group = this_group[0] text += this_group.get_template(self) % self this_group.manage_parameters(self, written, to_write) - + elif len(nline) != 2: text += line elif nline[1].strip() in self: - + name = nline[1].strip().lower() value = self[name] if name in self.list_parameter: @@ -3026,15 +3026,15 @@ def write(self, output_file, template=None, python_template=False, else: endline = '' text += ' %s\t= %s %s%s' % (value, name, comment, endline) - written.add(name) + written.add(name) if name in to_write: to_write.remove(name) else: logger.info('Adding missing parameter %s to current %s (with default value)', (name, self.filename)) - written.add(name) - text += line + written.add(name) + text += line for b in self.blocks: if b.status(self): @@ -3057,7 +3057,7 @@ def write(self, output_file, template=None, python_template=False, else: #partial writting -> add only what is needed to_add = [] - for line in b.get_template(self).split('\n'): + for line in b.get_template(self).split('\n'): nline = line.split('#')[0] nline = nline.split('!')[0] nline = nline.split('=') @@ -3072,8 +3072,8 @@ def write(self, output_file, template=None, python_template=False, continue #already include before else: to_add.append(line % {nline[1].strip():value, name:value}) - written.add(name) - + written.add(name) + if name in to_write: to_write.remove(name) else: @@ -3095,13 +3095,13 @@ def write(self, output_file, template=None, python_template=False, text += '\n'.join(to_add) if to_write or write_hidden: - text+="""#********************************************************************* + text+="""#********************************************************************* # Additional hidden parameters #********************************************************************* -""" +""" if write_hidden: # - # do not write hidden parameter not hidden for this template + # do not write hidden parameter not hidden for this template # if python_template: written = written.union(set(re.findall('\%\((\w*)\)s', open(template,'r').read(), re.M))) @@ -3129,7 +3129,7 @@ def get_last_value_include(self, output_dir): if inc file does not exist we will return the current value (i.e. set has no change) """ - #remember that + #remember that # default_include_file is a class variable # self.includepath is on the form include_path : [list of param ] out = {} @@ -3165,7 +3165,7 @@ def get_value_from_include(self, path, list_of_params, output_dir): with open(pjoin(output_dir,path), 'r') as fsock: text = fsock.read() - + for name in list_of_params: misc.sprint(name, name in self.fortran_name) misc.sprint(self.fortran_name[name] if name in self.fortran_name[name] else name) @@ -3191,11 +3191,11 @@ def get_value_from_include(self, path, list_of_params, output_dir): misc.sprint(self.fortran_name) misc.sprint(text) raise Exception - return out + return out def get_default(self, name, default=None, log_level=None): - """return self[name] if exist otherwise default. log control if we + """return self[name] if exist otherwise default. log control if we put a warning or not if we use the default value""" lower_name = name.lower() @@ -3216,13 +3216,13 @@ def get_default(self, name, default=None, log_level=None): log_level = 20 if not default: default = dict.__getitem__(self, name.lower()) - + logger.log(log_level, '%s missed argument %s. Takes default: %s' % (self.filename, name, default)) self[name] = default return default else: - return self[name] + return self[name] def mod_inc_pdlabel(self, value): """flag pdlabel has 'dressed' if one of the special lepton PDF with beamstralung. @@ -3237,16 +3237,16 @@ def edit_dummy_fct_from_file(self, filelist, outdir): filelist is a list of input files (given by the user) containing a series of function to be placed in replacement of standard (typically dummy) functions of the code. - This use LO/NLO class attribute that defines which function name need to - be placed in which file. + This use LO/NLO class attribute that defines which function name need to + be placed in which file. First time this is used, a backup of the original file is done in order to - recover if the user remove some of those files. + recover if the user remove some of those files. The function present in the file are determined automatically via regular expression. and only that function is replaced in the associated file. - function in the filelist starting with user_ will also be include within the + function in the filelist starting with user_ will also be include within the dummy_fct.f file """ @@ -3269,7 +3269,7 @@ def edit_dummy_fct_from_file(self, filelist, outdir): fsock = file_writers.FortranWriter(tmp,'w') function_text = fsock.remove_routine(text, fct) fsock.close() - test = open(tmp,'r').read() + test = open(tmp,'r').read() if fct not in self.dummy_fct_file: if fct.startswith('user_'): self.dummy_fct_file[fct] = self.dummy_fct_file['user_'] @@ -3315,22 +3315,22 @@ def guess_entry_fromname(self, name, value): - vartype: type of the variable - name: name of the variable (stripped from metadata) - options: additional options for the add_param - rules: - - if name starts with str_, int_, float_, bool_, list_, dict_ then + rules: + - if name starts with str_, int_, float_, bool_, list_, dict_ then - vartype is set accordingly - name is strip accordingly - otherwise guessed from value (which is string) - if name contains min/max - vartype is set to float - options has an added {'cut':True} - - suffixes like + - suffixes like - will be removed from named - will be added in options (for add_param) as {'cut':True} see add_param documentation for the list of supported options - if include is on False set autodef to False (i.e. enforce it False for future change) """ - # local function + # local function def update_typelist(value, name, opts): """convert a string to a list and update opts to keep track of the type """ value = value.strip() @@ -3358,7 +3358,7 @@ def update_typelist(value, name, opts): opts[key] = val name = name.replace("<%s=%s>" %(key,val), '') - # get vartype + # get vartype # first check that name does not force it supported_type = ["str", "float", "int", "bool", "list", "dict"] if "_" in name and name.split("_")[0].lower() in supported_type: @@ -3406,13 +3406,13 @@ def f77_formatting(value, formatv=None): value = str(value).lower() else: assert formatv - + if formatv == 'bool': if str(value) in ['1','T','.true.','True']: return '.true.' else: return '.false.' - + elif formatv == 'int': try: return str(int(value)) @@ -3422,12 +3422,12 @@ def f77_formatting(value, formatv=None): return str(int(fl)) else: raise - + elif formatv == 'float': if isinstance(value, str): value = value.replace('d','e') return ('%.10e' % float(value)).replace('e','d') - + elif formatv == 'str': # Check if it is a list if value.strip().startswith('[') and value.strip().endswith(']'): @@ -3437,20 +3437,20 @@ def f77_formatting(value, formatv=None): enumerate(elements)] else: return "'%s'" % value - - + + def check_validity(self, log_level=30): """check that parameter missing in the card are set to the expected value""" for name, value in self.system_default.items(): self.set(name, value, changeifuserset=False) - + for name in self.includepath[False]: to_bypass = self.hidden_param + list(self.legacy_parameter.keys()) if name not in to_bypass: - self.get_default(name, log_level=log_level) + self.get_default(name, log_level=log_level) for name in self.legacy_parameter: if self[name] != self.legacy_parameter[name]: @@ -3458,28 +3458,28 @@ def check_validity(self, log_level=30): for block in self.blocks: block.check_validity(self) - + def update_system_parameter_for_include(self): - """update hidden system only parameter for the correct writtin in the + """update hidden system only parameter for the correct writtin in the include""" return - + def write_include_file(self, output_dir, output_file=None): """Write the various include file in output_dir. The entry True of self.includepath will be written in run_card.inc The entry False will not be written anywhere output_file allows testing by providing stream. - This also call the function to add variable definition for the - variable with autodef=True (handle by write_autodef function) + This also call the function to add variable definition for the + variable with autodef=True (handle by write_autodef function) """ - + # ensure that all parameter are coherent and fix those if needed self.check_validity() - + #ensusre that system only parameter are correctly set self.update_system_parameter_for_include() @@ -3490,10 +3490,10 @@ def write_include_file(self, output_dir, output_file=None): self.write_autodef(output_dir, output_file=None) # check/fix status of customised functions self.edit_dummy_fct_from_file(self["custom_fcts"], os.path.dirname(output_dir)) - + for incname in self.includepath: self.write_one_include_file(output_dir, incname, output_file) - + for name,value in value_in_old_include.items(): if value != self[name]: self.fct_mod[name][0](value, self[name], name, *self.fct_mod[name][1],**self.fct_mod[name][2]) @@ -3515,13 +3515,13 @@ def write_one_include_file(self, output_dir, incname, output_file=None): fsock = file_writers.FortranWriter(pjoin(output_dir,pathinc+'.tmp')) - for key in self.includepath[incname]: + for key in self.includepath[incname]: #define the fortran name if key in self.fortran_name: fortran_name = self.fortran_name[key] else: fortran_name = key - + if incname in self.include_as_parameter: fsock.writelines('INTEGER %s\n' % fortran_name) #get the value with warning if the user didn't set it @@ -3534,7 +3534,7 @@ def write_one_include_file(self, output_dir, incname, output_file=None): # in case of a list, add the length of the list as 0th # element in fortran. Only in case of integer or float # list (not for bool nor string) - targettype = self.list_parameter[key] + targettype = self.list_parameter[key] if targettype is bool: pass elif targettype is int: @@ -3550,7 +3550,7 @@ def write_one_include_file(self, output_dir, incname, output_file=None): elif isinstance(value, dict): for fortran_name, onevalue in value.items(): line = '%s = %s \n' % (fortran_name, self.f77_formatting(onevalue)) - fsock.writelines(line) + fsock.writelines(line) elif isinstance(incname,str) and 'compile' in incname: if incname in self.include_as_parameter: line = 'PARAMETER (%s=%s)' %( fortran_name, value) @@ -3585,7 +3585,7 @@ def write_autodef(self, output_dir, output_file=None): filetocheck = dict(self.definition_path) if True not in self.definition_path: filetocheck[True] = [] - + for incname in filetocheck: if incname is True: @@ -3598,7 +3598,7 @@ def write_autodef(self, output_dir, output_file=None): if output_file: fsock = output_file input = fsock.getvalue() - + else: input = open(pjoin(output_dir,pathinc),'r').read() # do not define fsock here since we might not need to overwrite it @@ -3608,7 +3608,7 @@ def write_autodef(self, output_dir, output_file=None): previous = re.findall(re_pat, input, re.M) # now check which one needed to be added (and remove those identicaly defined) to_add = [] - for key in filetocheck[incname]: + for key in filetocheck[incname]: curr_type = self[key].__class__.__name__ length = "" if curr_type in [list, "list"]: @@ -3640,10 +3640,10 @@ def write_autodef(self, output_dir, output_file=None): fsock.truncate(0) fsock.seek(0) - # remove outdated lines + # remove outdated lines lines = input.split('\n') if previous: - out = [line for line in lines if not re.search(re_pat, line, re.M) or + out = [line for line in lines if not re.search(re_pat, line, re.M) or re.search(re_pat, line, re.M).groups() not in previous] else: out = lines @@ -3662,7 +3662,7 @@ def write_autodef(self, output_dir, output_file=None): stop = out.index('C STOP USER COMMON BLOCK') out = out[:start]+ out[stop+1:] #add new common-block - if self.definition_path[incname]: + if self.definition_path[incname]: out.append("C START USER COMMON BLOCK") if isinstance(pathinc , str): filename = os.path.basename(pathinc).split('.',1)[0] @@ -3675,10 +3675,10 @@ def write_autodef(self, output_dir, output_file=None): filename = filename.upper() out.append(" COMMON/USER_CUSTOM_%s/%s" %(filename,','.join( self.definition_path[incname]))) out.append('C STOP USER COMMON BLOCK') - + if not output_file: fsock.writelines(out) - fsock.close() + fsock.close() else: # for iotest out = ["%s\n" %l for l in out] @@ -3702,7 +3702,7 @@ def get_idbmup(lpp): def get_banner_init_information(self): """return a dictionary with the information needed to write the first line of the block of the lhe file.""" - + output = {} output["idbmup1"] = self.get_idbmup(self['lpp1']) output["idbmup2"] = self.get_idbmup(self['lpp2']) @@ -3713,7 +3713,7 @@ def get_banner_init_information(self): output["pdfsup1"] = self.get_pdf_id(self["pdlabel"]) output["pdfsup2"] = self.get_pdf_id(self["pdlabel"]) return output - + def get_pdf_id(self, pdf): if pdf == "lhapdf": lhaid = self["lhaid"] @@ -3721,19 +3721,19 @@ def get_pdf_id(self, pdf): return lhaid[0] else: return lhaid - else: + else: try: return {'none': 0, 'iww': 0, 'eva':0, 'edff':0, 'chff':0, 'cteq6_m':10000,'cteq6_l':10041,'cteq6l1':10042, 'nn23lo':246800,'nn23lo1':247000,'nn23nlo':244800 - }[pdf] + }[pdf] except: - return 0 - + return 0 + def get_lhapdf_id(self): return self.get_pdf_id(self['pdlabel']) - def remove_all_cut(self): + def remove_all_cut(self): """remove all the cut""" for name in self.cuts_parameter: @@ -3749,7 +3749,7 @@ def remove_all_cut(self): elif 'eta' in name: self[name] = -1 else: - self[name] = 0 + self[name] = 0 ################################################################################################ ### Define various template subpart for the LO Run_card @@ -3767,11 +3767,11 @@ def remove_all_cut(self): %(nb_proton1)s = nb_proton1 # number of proton for the first beam %(nb_neutron1)s = nb_neutron1 # number of neutron for the first beam %(mass_ion1)s = mass_ion1 # mass of the heavy ion (first beam) -# Note that seting differently the two beams only work if you use +# Note that seting differently the two beams only work if you use # group_subprocess=False when generating your matrix-element %(nb_proton2)s = nb_proton2 # number of proton for the second beam %(nb_neutron2)s = nb_neutron2 # number of neutron for the second beam - %(mass_ion2)s = mass_ion2 # mass of the heavy ion (second beam) + %(mass_ion2)s = mass_ion2 # mass of the heavy ion (second beam) """ template_off = "# To see heavy ion options: type \"update ion_pdf\"" @@ -3834,11 +3834,11 @@ def remove_all_cut(self): # Frame for polarization ------------------------------------------------------------------------------------ template_on = \ """#********************************************************************* -# Frame where to evaluate the matrix-element (not the cut!) for polarization +# Frame where to evaluate the matrix-element (not the cut!) for polarization #********************************************************************* %(me_frame)s = me_frame ! list of particles to sum-up to define the rest-frame ! in which to evaluate the matrix-element - ! [1,2] means the partonic center of mass + ! [1,2] means the partonic center of mass """ template_off = "" frame_block = RunBlock('frame', template_on=template_on, template_off=template_off) @@ -3891,7 +3891,7 @@ def remove_all_cut(self): # CONTROL The extra running scale (not QCD) * # Such running is NOT include in systematics computation * #*********************************************************************** - %(fixed_extra_scale)s = fixed_extra_scale ! False means dynamical scale + %(fixed_extra_scale)s = fixed_extra_scale ! False means dynamical scale %(mue_ref_fixed)s = mue_ref_fixed ! scale to use if fixed scale mode %(mue_over_ref)s = mue_over_ref ! ratio to mur if dynamical scale """ @@ -3908,10 +3908,10 @@ def remove_all_cut(self): %(tmin_for_channel)s = tmin_for_channel ! limit the non-singular reach of --some-- channel of integration related to T-channel diagram (value between -1 and 0), -1 is no impact %(survey_splitting)s = survey_splitting ! for loop-induced control how many core are used at survey for the computation of a single iteration. %(survey_nchannel_per_job)s = survey_nchannel_per_job ! control how many Channel are integrated inside a single job on cluster/multicore - %(refine_evt_by_job)s = refine_evt_by_job ! control the maximal number of events for the first iteration of the refine (larger means less jobs) + %(refine_evt_by_job)s = refine_evt_by_job ! control the maximal number of events for the first iteration of the refine (larger means less jobs) +#********************************************************************* +# Compilation flag. #********************************************************************* -# Compilation flag. -#********************************************************************* %(global_flag)s = global_flag ! fortran optimization flag use for the all code. %(aloha_flag)s = aloha_flag ! fortran optimization flag for aloha function. Suggestions: '-ffast-math' %(matrix_flag)s = matrix_flag ! fortran optimization flag for matrix.f function. Suggestions: '-O3' @@ -3948,7 +3948,7 @@ def check_validity(self, card): if card['pdlabel'] != card['pdlabel1']: dict.__setitem__(card, 'pdlabel', card['pdlabel1']) elif card['pdlabel1'] in sum(card.allowed_lep_densities.values(),[]): - raise InvalidRunCard("Assymetric beam pdf not supported for e e collision with ISR/bemstralung option") + raise InvalidRunCard("Assymetric beam pdf not supported for e e collision with ISR/bemstralung option") elif card['pdlabel2'] in sum(card.allowed_lep_densities.values(),[]): raise InvalidRunCard("Assymetric beam pdf not supported for e e collision with ISR/bemstralung option") elif card['pdlabel1'] == 'none': @@ -3962,7 +3962,7 @@ def check_validity(self, card): dict.__setitem__(card, 'pdlabel2', card['pdlabel']) if abs(card['lpp1']) == 1 == abs(card['lpp2']) and card['pdlabel1'] != card['pdlabel2']: - raise InvalidRunCard("Assymetric beam pdf not supported for proton-proton collision") + raise InvalidRunCard("Assymetric beam pdf not supported for proton-proton collision") def status(self, card): """return False if template_off to be used, True if template_on to be used""" @@ -4028,7 +4028,7 @@ def post_set(card, value, change_userdefine, raiseerror, name='unknown', **opt): if name == 'fixed_fac_scale2' and 'fixed_fac_scale1' not in card.user_set: dict.__setitem__(card, 'fixed_fac_scale1', card['fixed_fac_scale']) if name == 'fixed_fac_scale1' and 'fixed_fac_scale2' not in card.user_set: - dict.__setitem__(card, 'fixed_fac_scale2', card['fixed_fac_scale']) + dict.__setitem__(card, 'fixed_fac_scale2', card['fixed_fac_scale']) def status(self, card): @@ -4061,32 +4061,32 @@ def status(self, card): class RunCardLO(RunCard): """an object to handle in a nice way the run_card information""" - + blocks = [heavy_ion_block, beam_pol_block, syscalc_block, ecut_block, frame_block, eva_scale_block, mlm_block, ckkw_block, psoptim_block, pdlabel_block, fixedfacscale, running_block] dummy_fct_file = {"dummy_cuts": pjoin("SubProcesses","dummy_fct.f"), "get_dummy_x1": pjoin("SubProcesses","dummy_fct.f"), - "get_dummy_x1_x2": pjoin("SubProcesses","dummy_fct.f"), + "get_dummy_x1_x2": pjoin("SubProcesses","dummy_fct.f"), "dummy_boostframe": pjoin("SubProcesses","dummy_fct.f"), "user_dynamical_scale": pjoin("SubProcesses","dummy_fct.f"), "bias_wgt_custom": pjoin("SubProcesses","dummy_fct.f"), "user_": pjoin("SubProcesses","dummy_fct.f") # all function starting by user will be added to that file } - + include_as_parameter = ['vector.inc'] if MG5DIR: default_run_card = pjoin(MG5DIR, "internal", "default_run_card_lo.dat") - + def default_setup(self): """default value for the run_card.dat""" - + self.add_param("run_tag", "tag_1", include=False) self.add_param("gridpack", False) self.add_param("time_of_flight", -1.0, include=False) - self.add_param("nevents", 10000) + self.add_param("nevents", 10000) self.add_param("iseed", 0) self.add_param("python_seed", -2, include=False, hidden=True, comment="controlling python seed [handling in particular the final unweighting].\n -1 means use default from random module.\n -2 means set to same value as iseed") self.add_param("lpp1", 1, fortran_name="lpp(1)", allowed=[-1,1,0,2,3,9,-2,-3,4,-4], @@ -4106,7 +4106,7 @@ def default_setup(self): self.add_param('nb_neutron1', 0, hidden=True, allowed=[1,0, 126 , '*'],fortran_name="nb_neutron(1)", comment='For heavy ion physics nb of neutron in the ion (for both beam but if group_subprocess was False)') self.add_param('nb_neutron2', 0, hidden=True, allowed=[1,0, 126 , '*'],fortran_name="nb_neutron(2)", - comment='For heavy ion physics nb of neutron in the ion (of beam 2 if group_subprocess was False )') + comment='For heavy ion physics nb of neutron in the ion (of beam 2 if group_subprocess was False )') self.add_param('mass_ion1', -1.0, hidden=True, fortran_name="mass_ion(1)", allowed=[-1,0, 0.938, 207.9766521*0.938, 0.000511, 0.105, '*'], comment='For heavy ion physics mass in GeV of the ion (of beam 1)') @@ -4133,11 +4133,11 @@ def default_setup(self): self.add_param("mue_over_ref", 1.0, hidden=True, comment='ratio mu_other/mu for dynamical scale') self.add_param("ievo_eva",0,hidden=True, allowed=[0,1],fortran_name="ievo_eva", comment='eva: 0 for EW pdf muf evolution by q^2; 1 for evo by pT^2') - + # Bias module options self.add_param("bias_module", 'None', include=False, hidden=True) self.add_param('bias_parameters', {'__type__':1.0}, include='BIAS/bias.inc', hidden=True) - + #matching self.add_param("scalefact", 1.0) self.add_param("ickkw", 0, allowed=[0,1], hidden=True, comment="\'0\' for standard fixed order computation.\n\'1\' for MLM merging activates alphas and pdf re-weighting according to a kt clustering of the QCD radiation.") @@ -4221,7 +4221,7 @@ def default_setup(self): self.add_param("mmaa", 0.0, cut='aa') self.add_param("mmll", 0.0, cut='ll') self.add_param("mmjjmax", -1.0, cut='jj') - self.add_param("mmbbmax", -1.0, cut='bb') + self.add_param("mmbbmax", -1.0, cut='bb') self.add_param("mmaamax", -1.0, cut='aa') self.add_param("mmllmax", -1.0, cut='ll') self.add_param("mmnl", 0.0, cut='LL') @@ -4231,9 +4231,9 @@ def default_setup(self): self.add_param("ptllmax", -1.0, cut='ll') self.add_param("xptj", 0.0, cut='jj') self.add_param("xptb", 0.0, cut='bb') - self.add_param("xpta", 0.0, cut='aa') + self.add_param("xpta", 0.0, cut='aa') self.add_param("xptl", 0.0, cut='ll') - # ordered pt jet + # ordered pt jet self.add_param("ptj1min", 0.0, cut='jj') self.add_param("ptj1max", -1.0, cut='jj') self.add_param("ptj2min", 0.0, cut='jj') @@ -4241,7 +4241,7 @@ def default_setup(self): self.add_param("ptj3min", 0.0, cut='jjj') self.add_param("ptj3max", -1.0, cut='jjj') self.add_param("ptj4min", 0.0, cut='j'*4) - self.add_param("ptj4max", -1.0, cut='j'*4) + self.add_param("ptj4max", -1.0, cut='j'*4) self.add_param("cutuse", 0, cut='jj') # ordered pt lepton self.add_param("ptl1min", 0.0, cut='l'*2) @@ -4249,7 +4249,7 @@ def default_setup(self): self.add_param("ptl2min", 0.0, cut='l'*2) self.add_param("ptl2max", -1.0, cut='l'*2) self.add_param("ptl3min", 0.0, cut='l'*3) - self.add_param("ptl3max", -1.0, cut='l'*3) + self.add_param("ptl3max", -1.0, cut='l'*3) self.add_param("ptl4min", 0.0, cut='l'*4) self.add_param("ptl4max", -1.0, cut='l'*4) # Ht sum of jets @@ -4257,7 +4257,7 @@ def default_setup(self): self.add_param("htjmax", -1.0, cut='j'*2) self.add_param("ihtmin", 0.0, cut='J'*2) self.add_param("ihtmax", -1.0, cut='J'*2) - self.add_param("ht2min", 0.0, cut='J'*3) + self.add_param("ht2min", 0.0, cut='J'*3) self.add_param("ht3min", 0.0, cut='J'*3) self.add_param("ht4min", 0.0, cut='J'*4) self.add_param("ht2max", -1.0, cut='J'*3) @@ -4267,7 +4267,7 @@ def default_setup(self): self.add_param("ptgmin", 0.0, cut='aj') self.add_param("r0gamma", 0.4, hidden=True) self.add_param("xn", 1.0, hidden=True) - self.add_param("epsgamma", 1.0, hidden=True) + self.add_param("epsgamma", 1.0, hidden=True) self.add_param("isoem", True, hidden=True) self.add_param("xetamin", 0.0, cut='jj') self.add_param("deltaeta", 0.0, cut='j'*2) @@ -4280,7 +4280,7 @@ def default_setup(self): self.add_param("use_syst", True) self.add_param('systematics_program', 'systematics', include=False, hidden=True, comment='Choose which program to use for systematics computation: none, systematics, syscalc') self.add_param('systematics_arguments', ['--mur=0.5,1,2', '--muf=0.5,1,2', '--pdf=errorset'], include=False, hidden=True, comment='Choose the argment to pass to the systematics command. like --mur=0.25,1,4. Look at the help of the systematics function for more details.') - + self.add_param("sys_scalefact", "0.5 1 2", include=False, hidden=True) self.add_param("sys_alpsfact", "None", include=False, hidden=True) self.add_param("sys_matchscale", "auto", include=False, hidden=True) @@ -4315,8 +4315,8 @@ def default_setup(self): self.add_param('aloha_flag', '', include=False, hidden=True, comment='global fortran compilation flag, suggestion: -ffast-math', fct_mod=(self.make_clean, ('Source/DHELAS'),{})) self.add_param('matrix_flag', '', include=False, hidden=True, comment='fortran compilation flag for the matrix-element files, suggestion -O3', - fct_mod=(self.make_Ptouch, ('matrix'),{})) - self.add_param('vector_size', 1, include='vector.inc', hidden=True, comment='lockstep size for parralelism run', + fct_mod=(self.make_Ptouch, ('matrix'),{})) + self.add_param('vector_size', 1, include='vector.inc', hidden=True, comment='lockstep size for parralelism run', fortran_name='VECSIZE_MEMMAX', fct_mod=(self.reset_simd,(),{})) # parameter allowing to define simple cut via the pdg @@ -4329,24 +4329,24 @@ def default_setup(self): self.add_param('eta_max_pdg',{'__type__':0.}, include=False,cut=True) self.add_param('mxx_min_pdg',{'__type__':0.}, include=False,cut=True) self.add_param('mxx_only_part_antipart', {'default':False}, include=False) - + self.add_param('pdg_cut',[0], system=True) # store which PDG are tracked self.add_param('ptmin4pdg',[0.], system=True) # store pt min self.add_param('ptmax4pdg',[-1.], system=True) self.add_param('Emin4pdg',[0.], system=True) # store pt min - self.add_param('Emax4pdg',[-1.], system=True) + self.add_param('Emax4pdg',[-1.], system=True) self.add_param('etamin4pdg',[0.], system=True) # store pt min - self.add_param('etamax4pdg',[-1.], system=True) + self.add_param('etamax4pdg',[-1.], system=True) self.add_param('mxxmin4pdg',[-1.], system=True) self.add_param('mxxpart_antipart', [False], system=True) - - - + + + def check_validity(self): """ """ - + super(RunCardLO, self).check_validity() - + #Make sure that nhel is only either 0 (i.e. no MC over hel) or #1 (MC over hel with importance sampling). In particular, it can #no longer be > 1. @@ -4357,12 +4357,12 @@ def check_validity(self): "not %s." % self['nhel']) if int(self['maxjetflavor']) > 6: raise InvalidRunCard('maxjetflavor should be lower than 5! (6 is partly supported)') - + if len(self['pdgs_for_merging_cut']) > 1000: raise InvalidRunCard("The number of elements in "+\ "'pdgs_for_merging_cut' should not exceed 1000.") - + # some cut need to be deactivated in presence of isolation if self['ptgmin'] > 0: if self['pta'] > 0: @@ -4370,18 +4370,18 @@ def check_validity(self): self['pta'] = 0.0 if self['draj'] > 0: logger.warning('draj cut discarded since photon isolation is used') - self['draj'] = 0.0 - - # special treatment for gridpack use the gseed instead of the iseed + self['draj'] = 0.0 + + # special treatment for gridpack use the gseed instead of the iseed if self['gridrun']: self['iseed'] = self['gseed'] - + #Some parameter need to be fixed when using syscalc #if self['use_syst']: # if self['scalefact'] != 1.0: # logger.warning('Since use_syst=T, changing the value of \'scalefact\' to 1') # self['scalefact'] = 1.0 - + # CKKW Treatment if self['ickkw'] > 0: if self['ickkw'] != 1: @@ -4399,7 +4399,7 @@ def check_validity(self): raise InvalidRunCard('maxjetflavor at 6 is NOT supported for matching!') if self['ickkw'] == 2: # add warning if ckkw selected but the associate parameter are empty - self.get_default('highestmult', log_level=20) + self.get_default('highestmult', log_level=20) self.get_default('issgridfile', 'issudgrid.dat', log_level=20) if self['xqcut'] > 0: if self['ickkw'] == 0: @@ -4412,13 +4412,13 @@ def check_validity(self): if self['drjl'] != 0: if 'drjl' in self.user_set: logger.warning('Since icckw>0, changing the value of \'drjl\' to 0') - self['drjl'] = 0 - if not self['auto_ptj_mjj']: + self['drjl'] = 0 + if not self['auto_ptj_mjj']: if self['mmjj'] > self['xqcut']: logger.warning('mmjj > xqcut (and auto_ptj_mjj = F). MMJJ set to 0') - self['mmjj'] = 0.0 - - # check validity of the pdf set + self['mmjj'] = 0.0 + + # check validity of the pdf set # note that pdlabel is automatically set to lhapdf if pdlabel1 or pdlabel2 is set to lhapdf if self['pdlabel'] == 'lhapdf': #add warning if lhaid not define @@ -4426,7 +4426,7 @@ def check_validity(self): mod = False for i in [1,2]: - lpp = 'lpp%i' %i + lpp = 'lpp%i' %i pdlabelX = 'pdlabel%i' % i if self[lpp] == 0: # nopdf if self[pdlabelX] != 'none': @@ -4459,12 +4459,12 @@ def check_validity(self): raise InvalidRunCard( "Heavy ion mode is only supported for lpp1=1/2") if self['lpp2'] not in [1,2]: if self['nb_proton2'] !=1 or self['nb_neutron2'] !=0: - raise InvalidRunCard( "Heavy ion mode is only supported for lpp2=1/2") + raise InvalidRunCard( "Heavy ion mode is only supported for lpp2=1/2") # check that fixed_fac_scale(1/2) is setting as expected # if lpp=2/3/4 -> default is that beam in fixed scale - # check that fixed_fac_scale is not setup if fixed_fac_scale1/2 are + # check that fixed_fac_scale is not setup if fixed_fac_scale1/2 are # check that both fixed_fac_scale1/2 are defined together # ensure that fixed_fac_scale1 and fixed_fac_scale2 are setup as needed if 'fixed_fac_scale1' in self.user_set: @@ -4475,13 +4475,13 @@ def check_validity(self): elif 'fixed_fac_scale' in self.user_set: logger.warning('fixed_fac_scale and fixed_fac_scale1 are defined but not fixed_fac_scale2. The value of fixed_fac_scale2 will be set to the one of fixed_fac_scale.') self['fixed_fac_scale2'] = self['fixed_fac_scale'] - elif self['lpp2'] !=0: + elif self['lpp2'] !=0: raise Exception('fixed_fac_scale2 not defined while fixed_fac_scale1 is. Please fix your run_card.') elif 'fixed_fac_scale2' in self.user_set: if 'fixed_fac_scale' in self.user_set: logger.warning('fixed_fac_scale and fixed_fac_scale2 are defined but not fixed_fac_scale1. The value of fixed_fac_scale1 will be set to the one of fixed_fac_scale.') self['fixed_fac_scale1'] = self['fixed_fac_scale'] - elif self['lpp1'] !=0: + elif self['lpp1'] !=0: raise Exception('fixed_fac_scale1 not defined while fixed_fac_scale2 is. Please fix your run_card.') else: if 'fixed_fac_scale' in self.user_set: @@ -4500,12 +4500,12 @@ def check_validity(self): logger.warning('fixed_fac_scale1 not defined whithin your run_card. Using default value: %s', self['fixed_fac_scale1']) logger.warning('fixed_fac_scale2 not defined whithin your run_card. Using default value: %s', self['fixed_fac_scale2']) - # check if lpp = + # check if lpp = if self['pdlabel'] not in sum(self.allowed_lep_densities.values(),[]): for i in [1,2]: if abs(self['lpp%s' % i ]) in [3,4] and self['fixed_fac_scale%s' % i] and self['dsqrt_q2fact%s'%i] == 91.188: logger.warning("Vector boson from lepton PDF is using fixed scale value of muf [dsqrt_q2fact%s]. Looks like you kept the default value (Mz). Is this really the cut-off that you want to use?" % i) - + if abs(self['lpp%s' % i ]) == 2 and self['fixed_fac_scale%s' % i] and self['dsqrt_q2fact%s'%i] == 91.188: if self['pdlabel'] in ['edff','chff']: logger.warning("Since 3.5.0 exclusive photon-photon processes in ultraperipheral proton and nuclear collisions from gamma-UPC (arXiv:2207.03012) will ignore the factorisation scale.") @@ -4515,10 +4515,10 @@ def check_validity(self): if six.PY2 and self['hel_recycling']: self['hel_recycling'] = False - logger.warning("""Helicity recycling optimization requires Python3. This optimzation is therefore deactivated automatically. + logger.warning("""Helicity recycling optimization requires Python3. This optimzation is therefore deactivated automatically. In general this optimization speeds up the computation by a factor of two.""") - + # check that ebeam is bigger than the associated mass. for i in [1,2]: if self['lpp%s' % i ] not in [1,2]: @@ -4529,13 +4529,13 @@ def check_validity(self): logger.warning("At-rest proton mode set: energy beam set to 0.938") self.set('ebeam%i' %i, 0.938) else: - raise InvalidRunCard("Energy for beam %i lower than proton mass. Please fix this") - elif self['ebeam%i' % i] < self['mass_ion%i' % i]: + raise InvalidRunCard("Energy for beam %i lower than proton mass. Please fix this") + elif self['ebeam%i' % i] < self['mass_ion%i' % i]: if self['ebeam%i' %i] == 0: logger.warning("At rest ion mode set: Energy beam set to %s" % self['mass_ion%i' % i]) self.set('ebeam%i' %i, self['mass_ion%i' % i]) - - + + # check the tmin_for_channel is negative if self['tmin_for_channel'] == 0: raise InvalidRunCard('tmin_for_channel can not be set to 0.') @@ -4543,15 +4543,15 @@ def check_validity(self): logger.warning('tmin_for_channel should be negative. Will be using -%f instead' % self['tmin_for_channel']) self.set('tmin_for_channel', -self['tmin_for_channel']) - + def update_system_parameter_for_include(self): """system parameter need to be setupe""" - + # polarization self['frame_id'] = sum(2**(n) for n in self['me_frame']) - + # set the pdg_for_cut fortran parameter - pdg_to_cut = set(list(self['pt_min_pdg'].keys()) +list(self['pt_max_pdg'].keys()) + + pdg_to_cut = set(list(self['pt_min_pdg'].keys()) +list(self['pt_max_pdg'].keys()) + list(self['e_min_pdg'].keys()) +list(self['e_max_pdg'].keys()) + list(self['eta_min_pdg'].keys()) +list(self['eta_max_pdg'].keys())+ list(self['mxx_min_pdg'].keys()) + list(self['mxx_only_part_antipart'].keys())) @@ -4559,15 +4559,15 @@ def update_system_parameter_for_include(self): pdg_to_cut.discard('default') if len(pdg_to_cut)>25: raise Exception("Maximum 25 different pdgs are allowed for pdg specific cut") - + if any(int(pdg)<0 for pdg in pdg_to_cut): logger.warning('PDG specific cuts are always applied symmetrically on particles/anti-particles. Always use positve PDG codes') raise MadGraph5Error('Some PDG specific cuts are defined using negative pdg code') - - + + if any(pdg in pdg_to_cut for pdg in [1,2,3,4,5,21,22,11,13,15]): raise Exception("Can not use PDG related cut for light quark/b quark/lepton/gluon/photon") - + if pdg_to_cut: self['pdg_cut'] = list(pdg_to_cut) self['ptmin4pdg'] = [] @@ -4595,7 +4595,7 @@ def update_system_parameter_for_include(self): self[new_var].append(self[old_var][str(pdg)] if str(pdg) in self[old_var] else default) else: if str(pdg) not in self[old_var]: - raise Exception("no default value defined for %s and no value defined for pdg %s" % (old_var, pdg)) + raise Exception("no default value defined for %s and no value defined for pdg %s" % (old_var, pdg)) self[new_var].append(self[old_var][str(pdg)]) else: self['pdg_cut'] = [0] @@ -4605,11 +4605,11 @@ def update_system_parameter_for_include(self): self['ptmax4pdg'] = [-1.] self['Emax4pdg'] = [-1.] self['etamax4pdg'] =[-1.] - self['mxxmin4pdg'] =[0.] + self['mxxmin4pdg'] =[0.] self['mxxpart_antipart'] = [False] - - - + + + def create_default_for_process(self, proc_characteristic, history, proc_def): """Rules process 1->N all cut set on off. @@ -4626,7 +4626,7 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): if proc_characteristic['loop_induced']: self['nhel'] = 1 self['pdgs_for_merging_cut'] = proc_characteristic['colored_pdgs'] - + if proc_characteristic['ninitial'] == 1: #remove all cut self.remove_all_cut() @@ -4636,7 +4636,7 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): # check for beam_id beam_id = set() beam_id_split = [set(), set()] - for proc in proc_def: + for proc in proc_def: for oneproc in proc: for i,leg in enumerate(oneproc['legs']): if not leg['state']: @@ -4654,20 +4654,20 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): maxjetflavor = max([4]+[abs(i) for i in beam_id if -7< i < 7]) self['maxjetflavor'] = maxjetflavor self['asrwgtflavor'] = maxjetflavor - + if any(i in beam_id for i in [1,-1,2,-2,3,-3,4,-4,5,-5,21,22]): # check for e p collision if any(id in beam_id for id in [11,-11,13,-13]): self.display_block.append('beam_pol') if any(id in beam_id_split[0] for id in [11,-11,13,-13]): - self['lpp1'] = 0 - self['lpp2'] = 1 - self['ebeam1'] = '1k' - self['ebeam2'] = '6500' + self['lpp1'] = 0 + self['lpp2'] = 1 + self['ebeam1'] = '1k' + self['ebeam2'] = '6500' else: - self['lpp1'] = 1 - self['lpp2'] = 0 - self['ebeam1'] = '6500' + self['lpp1'] = 1 + self['lpp2'] = 0 + self['ebeam1'] = '6500' self['ebeam2'] = '1k' # UPC for p p collision @@ -4677,7 +4677,7 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): self['ebeam1'] = '6500' self['ebeam2'] = '6500' self['pdlabel'] = 'edff' - + elif any(id in beam_id for id in [11,-11,13,-13]): self['lpp1'] = 0 self['lpp2'] = 0 @@ -4688,7 +4688,7 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): self.display_block.append('ecut') self.display_block.append('beam_pol') - + # check for possibility of eva eva_in_b1 = any(i in beam_id_split[0] for i in [23,24,-24]) #,12,-12,14,-14]) @@ -4701,10 +4701,10 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): self['nhel'] = 1 self['pdlabel'] = 'eva' self['fixed_fac_scale'] = True - self.display_block.append('beam_pol') + self.display_block.append('beam_pol') elif eva_in_b1: - self.display_block.append('beam_pol') + self.display_block.append('beam_pol') self['pdlabel1'] = 'eva' self['fixed_fac_scale1'] = True self['nhel'] = 1 @@ -4724,7 +4724,7 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): self['pdlabel2'] = 'eva' self['fixed_fac_scale2'] = True self['nhel'] = 1 - self.display_block.append('beam_pol') + self.display_block.append('beam_pol') for i in beam_id_split[0]: if abs(i) == 11: self['lpp1'] = math.copysign(3,i) @@ -4740,34 +4740,34 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): if any(i in beam_id for i in [22,23,24,-24,12,-12,14,-14]): self.display_block.append('eva_scale') - # automatic polarisation of the beam if neutrino beam + # automatic polarisation of the beam if neutrino beam if any(id in beam_id for id in [12,-12,14,-14,16,-16]): self.display_block.append('beam_pol') if any(id in beam_id_split[0] for id in [12,14,16]): - self['lpp1'] = 0 - self['ebeam1'] = '1k' + self['lpp1'] = 0 + self['ebeam1'] = '1k' self['polbeam1'] = -100 if not all(id in [12,14,16] for id in beam_id_split[0]): logger.warning('Issue with default beam setup of neutrino in the run_card. Please check it up [polbeam1]. %s') elif any(id in beam_id_split[0] for id in [-12,-14,-16]): - self['lpp1'] = 0 - self['ebeam1'] = '1k' + self['lpp1'] = 0 + self['ebeam1'] = '1k' self['polbeam1'] = 100 if not all(id in [-12,-14,-16] for id in beam_id_split[0]): - logger.warning('Issue with default beam setup of neutrino in the run_card. Please check it up [polbeam1].') + logger.warning('Issue with default beam setup of neutrino in the run_card. Please check it up [polbeam1].') if any(id in beam_id_split[1] for id in [12,14,16]): - self['lpp2'] = 0 - self['ebeam2'] = '1k' + self['lpp2'] = 0 + self['ebeam2'] = '1k' self['polbeam2'] = -100 if not all(id in [12,14,16] for id in beam_id_split[1]): logger.warning('Issue with default beam setup of neutrino in the run_card. Please check it up [polbeam2].') elif any(id in beam_id_split[1] for id in [-12,-14,-16]): - self['lpp2'] = 0 - self['ebeam2'] = '1k' + self['lpp2'] = 0 + self['ebeam2'] = '1k' self['polbeam2'] = 100 if not all(id in [-12,-14,-16] for id in beam_id_split[1]): logger.warning('Issue with default beam setup of neutrino in the run_card. Please check it up [polbeam2].') - + # Check if need matching min_particle = 99 max_particle = 0 @@ -4798,12 +4798,12 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): else: # all are jet => matching is ON matching=True - break - + break + if matching: self['ickkw'] = 1 self['xqcut'] = 30 - #self['use_syst'] = False + #self['use_syst'] = False self['drjj'] = 0 self['drjl'] = 0 self['sys_alpsfact'] = "0.5 1 2" @@ -4811,8 +4811,8 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): self.display_block.append('mlm') self.display_block.append('ckkw') self['dynamical_scale_choice'] = -1 - - + + # For interference module, the systematics are wrong. # automatically set use_syst=F and set systematics_program=none no_systematics = False @@ -4826,14 +4826,14 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): continue break - + if interference or no_systematics: self['use_syst'] = False self['systematics_program'] = 'none' if interference: self['dynamical_scale_choice'] = 3 self['sde_strategy'] = 2 - + # set default integration strategy # interference case is already handle above # here pick strategy 2 if only one QCD color flow @@ -4852,7 +4852,7 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): if pure_lepton and proton_initial: self['sde_strategy'] = 1 else: - # check if multi-jet j + # check if multi-jet j is_multijet = True for proc in proc_def: if any(abs(j.get('id')) not in jet_id for j in proc[0]['legs']): @@ -4860,7 +4860,7 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): break if is_multijet: self['sde_strategy'] = 2 - + # if polarization is used, set the choice of the frame in the run_card # But only if polarization is used for massive particles for plist in proc_def: @@ -4870,7 +4870,7 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): model = proc.get('model') particle = model.get_particle(l.get('id')) if particle.get('mass').lower() != 'zero': - self.display_block.append('frame') + self.display_block.append('frame') break else: continue @@ -4894,15 +4894,15 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): proc = proc_list[0] if proc['forbidden_onsh_s_channels']: self['sde_strategy'] = 1 - + if 'fix_scale' in proc_characteristic['limitations']: self['fixed_ren_scale'] = 1 self['fixed_fac_scale'] = 1 if self['ickkw'] == 1: logger.critical("MLM matching/merging not compatible with the model! You need to use another method to remove the double counting!") self['ickkw'] = 0 - - # define class of particles present to hide all the cuts associated to + + # define class of particles present to hide all the cuts associated to # not present class cut_class = collections.defaultdict(int) for proc in proc_def: @@ -4925,41 +4925,41 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): one_proc_cut['L'] += 1 elif abs(pdg) in [12,14,16]: one_proc_cut['n'] += 1 - one_proc_cut['L'] += 1 + one_proc_cut['L'] += 1 elif str(oneproc.get('model').get_particle(pdg)['mass']) != 'ZERO': one_proc_cut['H'] += 1 - + for key, nb in one_proc_cut.items(): cut_class[key] = max(cut_class[key], nb) self.cut_class = dict(cut_class) self.cut_class[''] = True #avoid empty - + # If model has running functionality add the additional parameter model = proc_def[0][0].get('model') if model['running_elements']: - self.display_block.append('RUNNING') + self.display_block.append('RUNNING') # Read file input/default_run_card_lo.dat # This has to be LAST !! if os.path.exists(self.default_run_card): self.read(self.default_run_card, consistency=False) - + def write(self, output_file, template=None, python_template=False, **opt): - """Write the run_card in output_file according to template + """Write the run_card in output_file according to template (a path to a valid run_card)""" if not template: if not MADEVENT: - template = pjoin(MG5DIR, 'Template', 'LO', 'Cards', + template = pjoin(MG5DIR, 'Template', 'LO', 'Cards', 'run_card.dat') python_template = True else: template = pjoin(MEDIR, 'Cards', 'run_card_default.dat') python_template = False - + hid_lines = {'default':True}#collections.defaultdict(itertools.repeat(True).next) if isinstance(output_file, str): @@ -4975,9 +4975,9 @@ def write(self, output_file, template=None, python_template=False, hid_lines[k1+k2] = True super(RunCardLO, self).write(output_file, template=template, - python_template=python_template, + python_template=python_template, template_options=hid_lines, - **opt) + **opt) class InvalidMadAnalysis5Card(InvalidCmd): @@ -4986,19 +4986,19 @@ class InvalidMadAnalysis5Card(InvalidCmd): class MadAnalysis5Card(dict): """ A class to store a MadAnalysis5 card. Very basic since it is basically free format.""" - + _MG5aMC_escape_tag = '@MG5aMC' - + _default_hadron_inputs = ['*.hepmc', '*.hep', '*.stdhep', '*.lhco','*.root'] _default_parton_inputs = ['*.lhe'] _skip_analysis = False - + @classmethod def events_can_be_reconstructed(cls, file_path): """ Checks from the type of an event file whether it can be reconstructed or not.""" return not (file_path.endswith('.lhco') or file_path.endswith('.lhco.gz') or \ file_path.endswith('.root') or file_path.endswith('.root.gz')) - + @classmethod def empty_analysis(cls): """ A method returning the structure of an empty analysis """ @@ -5012,7 +5012,7 @@ def empty_reconstruction(cls): 'reco_output':'lhe'} def default_setup(self): - """define the default value""" + """define the default value""" self['mode'] = 'parton' self['inputs'] = [] # None is the default stdout level, it will be set automatically by MG5aMC @@ -5025,8 +5025,8 @@ def default_setup(self): # of this class and some other property could be added to this dictionary # in the future. self['analyses'] = {} - # The recasting structure contains on set of commands and one set of - # card lines. + # The recasting structure contains on set of commands and one set of + # card lines. self['recasting'] = {'commands':[],'card':[]} # Add the default trivial reconstruction to use an lhco input # This is just for the structure @@ -5035,7 +5035,7 @@ def default_setup(self): 'root_input': MadAnalysis5Card.empty_reconstruction()} self['reconstruction']['lhco_input']['reco_output']='lhco' - self['reconstruction']['root_input']['reco_output']='root' + self['reconstruction']['root_input']['reco_output']='root' # Specify in which order the analysis/recasting were specified self['order'] = [] @@ -5049,7 +5049,7 @@ def __init__(self, finput=None,mode=None): return else: dict.__init__(self) - + # Initialize it with all the default value self.default_setup() if not mode is None: @@ -5058,15 +5058,15 @@ def __init__(self, finput=None,mode=None): # if input is define read that input if isinstance(finput, (file, str, StringIO.StringIO)): self.read(finput, mode=mode) - + def read(self, input, mode=None): """ Read an MA5 card""" - + if mode not in [None,'parton','hadron']: raise MadGraph5Error('A MadAnalysis5Card can be read online the modes'+ "'parton' or 'hadron'") card_mode = mode - + if isinstance(input, (file, StringIO.StringIO)): input_stream = input elif isinstance(input, str): @@ -5099,10 +5099,10 @@ def read(self, input, mode=None): except ValueError: option = line[len(self._MG5aMC_escape_tag):] option = option.strip() - + if option=='inputs': self['inputs'].extend([v.strip() for v in value.split(',')]) - + elif option == 'skip_analysis': self._skip_analysis = True @@ -5118,7 +5118,7 @@ def read(self, input, mode=None): except: raise InvalidMadAnalysis5Card( "MA5 output level specification '%s' is incorrect."%str(value)) - + elif option=='analysis_name': current_type = 'analyses' current_name = value @@ -5127,7 +5127,7 @@ def read(self, input, mode=None): "Analysis '%s' already defined in MadAnalysis5 card"%current_name) else: self[current_type][current_name] = MadAnalysis5Card.empty_analysis() - + elif option=='set_reconstructions': try: reconstructions = eval(value) @@ -5142,7 +5142,7 @@ def read(self, input, mode=None): "analysis in a MadAnalysis5 card.") self[current_type][current_name]['reconstructions']=reconstructions continue - + elif option=='reconstruction_name': current_type = 'reconstruction' current_name = value @@ -5161,7 +5161,7 @@ def read(self, input, mode=None): raise InvalidMadAnalysis5Card( "Option '%s' can only take the values 'lhe' or 'root'"%option) self['reconstruction'][current_name]['reco_output'] = value.lower() - + elif option.startswith('recasting'): current_type = 'recasting' try: @@ -5171,11 +5171,11 @@ def read(self, input, mode=None): if len(self['recasting'][current_name])>0: raise InvalidMadAnalysis5Card( "Only one recasting can be defined in MadAnalysis5 hadron card") - + else: raise InvalidMadAnalysis5Card( "Unreckognized MG5aMC instruction in MadAnalysis5 card: '%s'"%option) - + if option in ['analysis_name','reconstruction_name'] or \ option.startswith('recasting'): self['order'].append((current_type,current_name)) @@ -5209,7 +5209,7 @@ def read(self, input, mode=None): self['inputs'] = self._default_hadron_inputs else: self['inputs'] = self._default_parton_inputs - + # Make sure at least one reconstruction is specified for each hadron # level analysis and that it exists. if self['mode']=='hadron': @@ -5221,7 +5221,7 @@ def read(self, input, mode=None): analysis['reconstructions']): raise InvalidMadAnalysis5Card('A reconstructions specified in'+\ " analysis '%s' is not defined."%analysis_name) - + def write(self, output): """ Write an MA5 card.""" @@ -5232,7 +5232,7 @@ def write(self, output): else: raise MadGraph5Error('Incorrect input for the write function of'+\ ' the MadAnalysis5Card card. Received argument type is: %s'%str(type(output))) - + output_lines = [] if self._skip_analysis: output_lines.append('%s skip_analysis'%self._MG5aMC_escape_tag) @@ -5240,11 +5240,11 @@ def write(self, output): if not self['stdout_lvl'] is None: output_lines.append('%s stdout_lvl=%s'%(self._MG5aMC_escape_tag,self['stdout_lvl'])) for definition_type, name in self['order']: - + if definition_type=='analyses': output_lines.append('%s analysis_name = %s'%(self._MG5aMC_escape_tag,name)) output_lines.append('%s set_reconstructions = %s'%(self._MG5aMC_escape_tag, - str(self['analyses'][name]['reconstructions']))) + str(self['analyses'][name]['reconstructions']))) elif definition_type=='reconstruction': output_lines.append('%s reconstruction_name = %s'%(self._MG5aMC_escape_tag,name)) elif definition_type=='recasting': @@ -5254,23 +5254,23 @@ def write(self, output): output_lines.extend(self[definition_type][name]) elif definition_type in ['reconstruction']: output_lines.append('%s reco_output = %s'%(self._MG5aMC_escape_tag, - self[definition_type][name]['reco_output'])) + self[definition_type][name]['reco_output'])) output_lines.extend(self[definition_type][name]['commands']) elif definition_type in ['analyses']: - output_lines.extend(self[definition_type][name]['commands']) - + output_lines.extend(self[definition_type][name]['commands']) + output_stream.write('\n'.join(output_lines)) - + return - - def get_MA5_cmds(self, inputs_arg, submit_folder, run_dir_path=None, + + def get_MA5_cmds(self, inputs_arg, submit_folder, run_dir_path=None, UFO_model_path=None, run_tag=''): - """ Returns a list of tuples ('AnalysisTag',['commands']) specifying - the commands of the MadAnalysis runs required from this card. - At parton-level, the number of such commands is the number of analysis + """ Returns a list of tuples ('AnalysisTag',['commands']) specifying + the commands of the MadAnalysis runs required from this card. + At parton-level, the number of such commands is the number of analysis asked for. In the future, the idea is that the entire card can be processed in one go from MA5 directly.""" - + if isinstance(inputs_arg, list): inputs = inputs_arg elif isinstance(inputs_arg, str): @@ -5278,21 +5278,21 @@ def get_MA5_cmds(self, inputs_arg, submit_folder, run_dir_path=None, else: raise MadGraph5Error("The function 'get_MA5_cmds' can only take "+\ " a string or a list for the argument 'inputs_arg'") - + if len(inputs)==0: raise MadGraph5Error("The function 'get_MA5_cmds' must have "+\ " at least one input specified'") - + if run_dir_path is None: run_dir_path = os.path.dirname(inputs_arg) - + cmds_list = [] - + UFO_load = [] # first import the UFO if provided if UFO_model_path: UFO_load.append('import %s'%UFO_model_path) - + def get_import(input, type=None): """ Generates the MA5 import commands for that event file. """ dataset_name = os.path.basename(input).split('.')[0] @@ -5304,7 +5304,7 @@ def get_import(input, type=None): if not type is None: res.append('set %s.type = %s'%(dataset_name, type)) return res - + fifo_status = {'warned_fifo':False,'fifo_used_up':False} def warn_fifo(input): if not input.endswith('.fifo'): @@ -5317,7 +5317,7 @@ def warn_fifo(input): logger.warning('Only the first MA5 analysis/reconstructions can be run on a fifo. Subsequent runs will skip fifo inputs.') fifo_status['warned_fifo'] = True return True - + # Then the event file(s) input(s) inputs_load = [] for input in inputs: @@ -5325,16 +5325,16 @@ def warn_fifo(input): if len(inputs) > 1: inputs_load.append('set main.stacking_method = superimpose') - + submit_command = 'submit %s'%submit_folder+'_%s' - + # Keep track of the reconstruction outpus in the MA5 workflow # Keys are reconstruction names and values are .lhe.gz reco file paths. # We put by default already the lhco/root ones present reconstruction_outputs = { - 'lhco_input':[f for f in inputs if + 'lhco_input':[f for f in inputs if f.endswith('.lhco') or f.endswith('.lhco.gz')], - 'root_input':[f for f in inputs if + 'root_input':[f for f in inputs if f.endswith('.root') or f.endswith('.root.gz')]} # If a recasting card has to be written out, chose here its path @@ -5343,7 +5343,7 @@ def warn_fifo(input): # Make sure to only run over one analysis over each fifo. for definition_type, name in self['order']: - if definition_type == 'reconstruction': + if definition_type == 'reconstruction': analysis_cmds = list(self['reconstruction'][name]['commands']) reco_outputs = [] for i_input, input in enumerate(inputs): @@ -5365,8 +5365,8 @@ def warn_fifo(input): analysis_cmds.append( submit_command%('reco_%s_%d'%(name,i_input+1))) analysis_cmds.append('remove reco_events') - - reconstruction_outputs[name]= [pjoin(run_dir_path,rec_out) + + reconstruction_outputs[name]= [pjoin(run_dir_path,rec_out) for rec_out in reco_outputs] if len(reco_outputs)>0: cmds_list.append(('_reco_%s'%name,analysis_cmds)) @@ -5386,7 +5386,7 @@ def warn_fifo(input): analysis_cmds = ['set main.mode = parton'] else: analysis_cmds = [] - analysis_cmds.extend(sum([get_import(rec_out) for + analysis_cmds.extend(sum([get_import(rec_out) for rec_out in reconstruction_outputs[reco]],[])) analysis_cmds.extend(self['analyses'][name]['commands']) analysis_cmds.append(submit_command%('%s_%s'%(name,reco))) @@ -5427,12 +5427,12 @@ def warn_fifo(input): %(mue_ref_fixed)s = mue_ref_fixed ! scale to use if fixed scale mode """ running_block_nlo = RunBlock('RUNNING', template_on=template_on, template_off="") - + class RunCardNLO(RunCard): """A class object for the run_card for a (aMC@)NLO pocess""" - + LO = False - + blocks = [running_block_nlo] dummy_fct_file = {"dummy_cuts": pjoin("SubProcesses","dummy_fct.f"), @@ -5443,11 +5443,11 @@ class RunCardNLO(RunCard): if MG5DIR: default_run_card = pjoin(MG5DIR, "internal", "default_run_card_nlo.dat") - - + + def default_setup(self): """define the default value""" - + self.add_param('run_tag', 'tag_1', include=False) self.add_param('nevents', 10000) self.add_param('req_acc', -1.0, include=False) @@ -5455,27 +5455,27 @@ def default_setup(self): self.add_param("time_of_flight", -1.0, include=False) self.add_param('event_norm', 'average') #FO parameter - self.add_param('req_acc_fo', 0.01, include=False) + self.add_param('req_acc_fo', 0.01, include=False) self.add_param('npoints_fo_grid', 5000, include=False) self.add_param('niters_fo_grid', 4, include=False) - self.add_param('npoints_fo', 10000, include=False) + self.add_param('npoints_fo', 10000, include=False) self.add_param('niters_fo', 6, include=False) #seed and collider self.add_param('iseed', 0) - self.add_param('lpp1', 1, fortran_name='lpp(1)') - self.add_param('lpp2', 1, fortran_name='lpp(2)') + self.add_param('lpp1', 1, fortran_name='lpp(1)') + self.add_param('lpp2', 1, fortran_name='lpp(2)') self.add_param('ebeam1', 6500.0, fortran_name='ebeam(1)') - self.add_param('ebeam2', 6500.0, fortran_name='ebeam(2)') + self.add_param('ebeam2', 6500.0, fortran_name='ebeam(2)') self.add_param('pdlabel', 'nn23nlo', allowed=['lhapdf', 'emela', 'cteq6_m','cteq6_d','cteq6_l','cteq6l1', 'nn23lo','nn23lo1','nn23nlo','ct14q00','ct14q07','ct14q14','ct14q21'] +\ - sum(self.allowed_lep_densities.values(),[]) ) + sum(self.allowed_lep_densities.values(),[]) ) self.add_param('lhaid', [244600],fortran_name='lhaPDFid') self.add_param('pdfscheme', 0) # whether to include or not photon-initiated processes in lepton collisions self.add_param('photons_from_lepton', True) self.add_param('lhapdfsetname', ['internal_use_only'], system=True) - # stuff for lepton collisions - # these parameters are in general set automatically by eMELA in a consistent manner with the PDF set - # whether the current PDF set has or not beamstrahlung + # stuff for lepton collisions + # these parameters are in general set automatically by eMELA in a consistent manner with the PDF set + # whether the current PDF set has or not beamstrahlung self.add_param('has_bstrahl', False, system=True) # renormalisation scheme of alpha self.add_param('alphascheme', 0, system=True) @@ -5486,31 +5486,31 @@ def default_setup(self): # w contribution included or not in the running of alpha self.add_param('w_run', 1, system=True) #shower and scale - self.add_param('parton_shower', 'HERWIG6', fortran_name='shower_mc') + self.add_param('parton_shower', 'HERWIG6', fortran_name='shower_mc') self.add_param('shower_scale_factor',1.0) self.add_param('mcatnlo_delta', False) self.add_param('fixed_ren_scale', False) self.add_param('fixed_fac_scale', False) self.add_param('fixed_extra_scale', True, hidden=True, system=True) # set system since running from Ellis-Sexton scale not implemented - self.add_param('mur_ref_fixed', 91.118) + self.add_param('mur_ref_fixed', 91.118) self.add_param('muf1_ref_fixed', -1.0, hidden=True) - self.add_param('muf_ref_fixed', 91.118) + self.add_param('muf_ref_fixed', 91.118) self.add_param('muf2_ref_fixed', -1.0, hidden=True) - self.add_param('mue_ref_fixed', 91.118, hidden=True) - self.add_param("dynamical_scale_choice", [-1],fortran_name='dyn_scale', + self.add_param('mue_ref_fixed', 91.118, hidden=True) + self.add_param("dynamical_scale_choice", [-1],fortran_name='dyn_scale', allowed = [-2,-1,0,1,2,3,10], comment="\'-1\' is based on CKKW back clustering (following feynman diagram).\n \'1\' is the sum of transverse energy.\n '2' is HT (sum of the transverse mass)\n '3' is HT/2, '0' allows to use the user_hook definition (need to be defined via custom_fct entry) ") self.add_param('fixed_qes_scale', False, hidden=True) self.add_param('qes_ref_fixed', -1.0, hidden=True) self.add_param('mur_over_ref', 1.0) - self.add_param('muf_over_ref', 1.0) - self.add_param('muf1_over_ref', -1.0, hidden=True) + self.add_param('muf_over_ref', 1.0) + self.add_param('muf1_over_ref', -1.0, hidden=True) self.add_param('muf2_over_ref', -1.0, hidden=True) self.add_param('mue_over_ref', 1.0, hidden=True, system=True) # forbid the user to modigy due to incorrect handling of the Ellis-Sexton scale self.add_param('qes_over_ref', -1.0, hidden=True) self.add_param('reweight_scale', [True], fortran_name='lscalevar') - self.add_param('rw_rscale_down', -1.0, hidden=True) + self.add_param('rw_rscale_down', -1.0, hidden=True) self.add_param('rw_rscale_up', -1.0, hidden=True) - self.add_param('rw_fscale_down', -1.0, hidden=True) + self.add_param('rw_fscale_down', -1.0, hidden=True) self.add_param('rw_fscale_up', -1.0, hidden=True) self.add_param('rw_rscale', [1.0,2.0,0.5], fortran_name='scalevarR') self.add_param('rw_fscale', [1.0,2.0,0.5], fortran_name='scalevarF') @@ -5523,60 +5523,60 @@ def default_setup(self): #technical self.add_param('folding', [1,1,1], include=False) - + #merging self.add_param('ickkw', 0, allowed=[-1,0,3,4], comment=" - 0: No merging\n - 3: FxFx Merging : http://amcatnlo.cern.ch/FxFx_merging.htm\n - 4: UNLOPS merging (No interface within MG5aMC)\n - -1: NNLL+NLO jet-veto computation. See arxiv:1412.8408 [hep-ph]") self.add_param('bwcutoff', 15.0) - #cuts + #cuts self.add_param('jetalgo', 1.0) - self.add_param('jetradius', 0.7) + self.add_param('jetradius', 0.7) self.add_param('ptj', 10.0 , cut=True) - self.add_param('etaj', -1.0, cut=True) - self.add_param('gamma_is_j', True) + self.add_param('etaj', -1.0, cut=True) + self.add_param('gamma_is_j', True) self.add_param('ptl', 0.0, cut=True) - self.add_param('etal', -1.0, cut=True) + self.add_param('etal', -1.0, cut=True) self.add_param('drll', 0.0, cut=True) - self.add_param('drll_sf', 0.0, cut=True) + self.add_param('drll_sf', 0.0, cut=True) self.add_param('mll', 0.0, cut=True) - self.add_param('mll_sf', 30.0, cut=True) - self.add_param('rphreco', 0.1) - self.add_param('etaphreco', -1.0) - self.add_param('lepphreco', True) - self.add_param('quarkphreco', True) + self.add_param('mll_sf', 30.0, cut=True) + self.add_param('rphreco', 0.1) + self.add_param('etaphreco', -1.0) + self.add_param('lepphreco', True) + self.add_param('quarkphreco', True) self.add_param('ptgmin', 20.0, cut=True) - self.add_param('etagamma', -1.0) + self.add_param('etagamma', -1.0) self.add_param('r0gamma', 0.4) - self.add_param('xn', 1.0) + self.add_param('xn', 1.0) self.add_param('epsgamma', 1.0) - self.add_param('isoem', True) + self.add_param('isoem', True) self.add_param('maxjetflavor', 4, hidden=True) - self.add_param('pineappl', False) + self.add_param('pineappl', False) self.add_param('lhe_version', 3, hidden=True, include=False) - + # customization self.add_param("custom_fcts",[],typelist="str", include=False, comment="list of files containing function that overwritte dummy function of the code (like adding cuts/...)") #internal variable related to FO_analyse_card self.add_param('FO_LHE_weight_ratio',1e-3, hidden=True, system=True) - self.add_param('FO_LHE_postprocessing',['grouping','random'], + self.add_param('FO_LHE_postprocessing',['grouping','random'], hidden=True, system=True, include=False) - + # parameter allowing to define simple cut via the pdg self.add_param('pt_min_pdg',{'__type__':0.}, include=False,cut=True) self.add_param('pt_max_pdg',{'__type__':0.}, include=False,cut=True) self.add_param('mxx_min_pdg',{'__type__':0.}, include=False,cut=True) self.add_param('mxx_only_part_antipart', {'default':False}, include=False, hidden=True) - + #hidden parameter that are transfer to the fortran code self.add_param('pdg_cut',[0], hidden=True, system=True) # store which PDG are tracked self.add_param('ptmin4pdg',[0.], hidden=True, system=True) # store pt min self.add_param('ptmax4pdg',[-1.], hidden=True, system=True) self.add_param('mxxmin4pdg',[0.], hidden=True, system=True) self.add_param('mxxpart_antipart', [False], hidden=True, system=True) - + def check_validity(self): """check the validity of the various input""" - + super(RunCardNLO, self).check_validity() # for lepton-lepton collisions, ignore 'pdlabel' and 'lhaid' @@ -5588,12 +5588,12 @@ def check_validity(self): # for dressed lepton collisions, check that the lhaid is a valid one if self['pdlabel'] not in sum(self.allowed_lep_densities.values(),[]) + ['emela']: raise InvalidRunCard('pdlabel %s not allowed for dressed-lepton collisions' % self['pdlabel']) - + elif self['pdlabel']!='nn23nlo' or self['reweight_pdf']: self['pdlabel']='nn23nlo' self['reweight_pdf']=[False] logger.info('''Lepton-lepton collisions: ignoring PDF related parameters in the run_card.dat (pdlabel, lhaid, reweight_pdf, ...)''') - + if self['lpp1'] == 0 == self['lpp2']: if self['pdlabel']!='nn23nlo' or self['reweight_pdf']: self['pdlabel']='nn23nlo' @@ -5601,8 +5601,8 @@ def check_validity(self): logger.info('''Lepton-lepton collisions: ignoring PDF related parameters in the run_card.dat (pdlabel, lhaid, reweight_pdf, ...)''') # For FxFx merging, make sure that the following parameters are set correctly: - if self['ickkw'] == 3: - # 1. Renormalization and factorization (and ellis-sexton scales) are not fixed + if self['ickkw'] == 3: + # 1. Renormalization and factorization (and ellis-sexton scales) are not fixed scales=['fixed_ren_scale','fixed_fac_scale','fixed_QES_scale'] for scale in scales: if self[scale]: @@ -5615,7 +5615,7 @@ def check_validity(self): self["reweight_scale"]=[self["reweight_scale"][0]] logger.warning('''For consistency in FxFx merging, dynamical_scale_choice has been set to -1 (default)''' ,'$MG:BOLD') - + # 2. Use kT algorithm for jets with pseudo-code size R=1.0 jetparams=['jetradius','jetalgo'] for jetparam in jetparams: @@ -5628,8 +5628,8 @@ def check_validity(self): self["dynamical_scale_choice"] = [-1] self["reweight_scale"]=[self["reweight_scale"][0]] logger.warning('''For consistency with the jet veto, the scale which will be used is ptj. dynamical_scale_choice will be set at -1.''' - ,'$MG:BOLD') - + ,'$MG:BOLD') + # For interface to PINEAPPL, need to use LHAPDF and reweighting to get scale uncertainties if self['pineappl'] and self['pdlabel'].lower() != 'lhapdf': raise InvalidRunCard('PineAPPL generation only possible with the use of LHAPDF') @@ -5661,7 +5661,7 @@ def check_validity(self): if (self['rw_fscale_down'] != -1.0 and ['rw_fscale_down'] not in self['rw_fscale']) or\ (self['rw_fscale_up'] != -1.0 and ['rw_fscale_up'] not in self['rw_fscale']): self['rw_fscale']=[1.0,self['rw_fscale_up'],self['rw_fscale_down']] - + # PDF reweighting check if any(self['reweight_pdf']): # check that we use lhapdf if reweighting is ON @@ -5672,7 +5672,7 @@ def check_validity(self): if self['pdlabel'] != "lhapdf": self['reweight_pdf']=[self['reweight_pdf'][0]] self['lhaid']=[self['lhaid'][0]] - + # make sure set have reweight_scale and dyn_scale_choice of length 1 when fixed scales: if self['fixed_ren_scale'] and self['fixed_fac_scale']: self['reweight_scale']=[self['reweight_scale'][0]] @@ -5685,7 +5685,7 @@ def check_validity(self): self['reweight_pdf']=self['reweight_pdf']*len(self['lhaid']) logger.warning("Setting 'reweight_pdf' for all 'lhaid' to %s" % self['reweight_pdf'][0]) if len(self['reweight_scale']) == 1 and len(self['dynamical_scale_choice']) != 1: - self['reweight_scale']=self['reweight_scale']*len(self['dynamical_scale_choice']) + self['reweight_scale']=self['reweight_scale']*len(self['dynamical_scale_choice']) logger.warning("Setting 'reweight_scale' for all 'dynamical_scale_choice' to %s" % self['reweight_pdf'][0]) # Check that there are no identical elements in lhaid or dynamical_scale_choice @@ -5693,7 +5693,7 @@ def check_validity(self): raise InvalidRunCard("'lhaid' has two or more identical entries. They have to be all different for the code to work correctly.") if len(self['dynamical_scale_choice']) != len(set(self['dynamical_scale_choice'])): raise InvalidRunCard("'dynamical_scale_choice' has two or more identical entries. They have to be all different for the code to work correctly.") - + # Check that lenght of lists are consistent if len(self['reweight_pdf']) != len(self['lhaid']): raise InvalidRunCard("'reweight_pdf' and 'lhaid' lists should have the same length") @@ -5730,7 +5730,7 @@ def check_validity(self): if len(self['folding']) != 3: raise InvalidRunCard("'folding' should contain exactly three integers") for ifold in self['folding']: - if ifold not in [1,2,4,8]: + if ifold not in [1,2,4,8]: raise InvalidRunCard("The three 'folding' parameters should be equal to 1, 2, 4, or 8.") # Check MC@NLO-Delta if self['mcatnlo_delta'] and not self['parton_shower'].lower() == 'pythia8': @@ -5746,11 +5746,11 @@ def check_validity(self): logger.warning("At-rest proton mode set: energy beam set to 0.938 GeV") self.set('ebeam%i' %i, 0.938) else: - raise InvalidRunCard("Energy for beam %i lower than proton mass. Please fix this") + raise InvalidRunCard("Energy for beam %i lower than proton mass. Please fix this") def update_system_parameter_for_include(self): - + # set the pdg_for_cut fortran parameter pdg_to_cut = set(list(self['pt_min_pdg'].keys()) +list(self['pt_max_pdg'].keys())+ list(self['mxx_min_pdg'].keys())+ list(self['mxx_only_part_antipart'].keys())) @@ -5758,12 +5758,12 @@ def update_system_parameter_for_include(self): pdg_to_cut.discard('default') if len(pdg_to_cut)>25: raise Exception("Maximum 25 different PDGs are allowed for PDG specific cut") - + if any(int(pdg)<0 for pdg in pdg_to_cut): logger.warning('PDG specific cuts are always applied symmetrically on particles/anti-particles. Always use positve PDG codes') raise MadGraph5Error('Some PDG specific cuts are defined using negative PDG codes') - - + + if any(pdg in pdg_to_cut for pdg in [21,22,11,13,15]+ list(range(self['maxjetflavor']+1))): # Note that this will double check in the fortran code raise Exception("Can not use PDG related cuts for massless SM particles/leptons") @@ -5790,7 +5790,7 @@ def update_system_parameter_for_include(self): self[new_var].append(self[old_var][str(pdg)] if str(pdg) in self[old_var] else default) else: if str(pdg) not in self[old_var]: - raise Exception("no default value defined for %s and no value defined for pdg %s" % (old_var, pdg)) + raise Exception("no default value defined for %s and no value defined for pdg %s" % (old_var, pdg)) self[new_var].append(self[old_var][str(pdg)]) else: self['pdg_cut'] = [0] @@ -5800,12 +5800,12 @@ def update_system_parameter_for_include(self): self['mxxpart_antipart'] = [False] def write(self, output_file, template=None, python_template=False, **opt): - """Write the run_card in output_file according to template + """Write the run_card in output_file according to template (a path to a valid run_card)""" if not template: if not MADEVENT: - template = pjoin(MG5DIR, 'Template', 'NLO', 'Cards', + template = pjoin(MG5DIR, 'Template', 'NLO', 'Cards', 'run_card.dat') python_template = True else: @@ -5818,7 +5818,7 @@ def write(self, output_file, template=None, python_template=False, **opt): def create_default_for_process(self, proc_characteristic, history, proc_def): """Rules - e+ e- beam -> lpp:0 ebeam:500 + e+ e- beam -> lpp:0 ebeam:500 p p beam -> set maxjetflavor automatically process with tagged photons -> gamma_is_j = false process without QED splittings -> gamma_is_j = false, recombination = false @@ -5844,19 +5844,19 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): self['ebeam2'] = 500 else: self['lpp1'] = 0 - self['lpp2'] = 0 - + self['lpp2'] = 0 + if proc_characteristic['ninitial'] == 1: #remove all cut self.remove_all_cut() # check for tagged photons tagged_particles = set() - + # If model has running functionality add the additional parameter model = proc_def[0].get('model') if model['running_elements']: - self.display_block.append('RUNNING') + self.display_block.append('RUNNING') # Check if need matching min_particle = 99 @@ -5885,7 +5885,7 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): else: idsmin = [l['id'] for l in procmin['legs']] break - + for procmax in proc_def: if len(procmax['legs']) != max_particle: continue @@ -5901,9 +5901,9 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): else: # all are jet => matching is ON matching=True - break - - if matching: + break + + if matching: self['ickkw'] = 3 self['fixed_ren_scale'] = False self["fixed_fac_scale"] = False @@ -5911,17 +5911,17 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): self["jetalgo"] = 1 self["jetradius"] = 1 self["parton_shower"] = "PYTHIA8" - + # Read file input/default_run_card_nlo.dat # This has to be LAST !! if os.path.exists(self.default_run_card): self.read(self.default_run_card, consistency=False) - + class MadLoopParam(ConfigFile): """ a class for storing/dealing with the file MadLoopParam.dat contains a parser to read it, facilities to write a new file,... """ - + _ID_reduction_tool_map = {1:'CutTools', 2:'PJFry++', 3:'IREGI', @@ -5929,10 +5929,10 @@ class MadLoopParam(ConfigFile): 5:'Samurai', 6:'Ninja', 7:'COLLIER'} - + def default_setup(self): """initialize the directory to the default value""" - + self.add_param("MLReductionLib", "6|7|1") self.add_param("IREGIMODE", 2) self.add_param("IREGIRECY", True) @@ -5954,7 +5954,7 @@ def default_setup(self): self.add_param("HelicityFilterLevel", 2) self.add_param("LoopInitStartOver", False) self.add_param("HelInitStartOver", False) - self.add_param("UseQPIntegrandForNinja", True) + self.add_param("UseQPIntegrandForNinja", True) self.add_param("UseQPIntegrandForCutTools", True) self.add_param("COLLIERMode", 1) self.add_param("COLLIERComputeUVpoles", True) @@ -5966,9 +5966,9 @@ def default_setup(self): self.add_param("COLLIERUseInternalStabilityTest",True) def read(self, finput): - """Read the input file, this can be a path to a file, + """Read the input file, this can be a path to a file, a file object, a str with the content of the file.""" - + if isinstance(finput, str): if "\n" in finput: finput = finput.split('\n') @@ -5976,7 +5976,7 @@ def read(self, finput): finput = open(finput) else: raise Exception("No such file %s" % input) - + previous_line= '' for line in finput: if previous_line.startswith('#'): @@ -5985,20 +5985,20 @@ def read(self, finput): if len(value) and value[0] not in ['#', '!']: self.__setitem__(name, value, change_userdefine=True) previous_line = line - - + + def write(self, outputpath, template=None,commentdefault=False): - + if not template: if not MADEVENT: - template = pjoin(MG5DIR, 'Template', 'loop_material', 'StandAlone', + template = pjoin(MG5DIR, 'Template', 'loop_material', 'StandAlone', 'Cards', 'MadLoopParams.dat') else: template = pjoin(MEDIR, 'Cards', 'MadLoopParams_default.dat') fsock = open(template, 'r') template = fsock.readlines() fsock.close() - + if isinstance(outputpath, str): output = open(outputpath, 'w') else: @@ -6019,7 +6019,7 @@ def f77format(value): return value else: raise Exception("Can not format input %s" % type(value)) - + name = '' done = set() for line in template: @@ -6034,12 +6034,12 @@ def f77format(value): elif line.startswith('#'): name = line[1:].split()[0] output.write(line) - - - - - -class eMELA_info(ConfigFile): + + + + + +class eMELA_info(ConfigFile): """ a class for eMELA (LHAPDF-like) info files """ path = '' @@ -6053,7 +6053,7 @@ def __init__(self, finput, me_dir): def read(self, finput): - if isinstance(finput, file): + if isinstance(finput, file): lines = finput.open().read().split('\n') self.path = finput.name else: @@ -6066,7 +6066,7 @@ def read(self, finput): k, v = l.split(':', 1) # ignore further occurrences of : try: self[k.strip()] = eval(v) - except (NameError, SyntaxError): + except (NameError, SyntaxError): self[k.strip()] = v def default_setup(self): @@ -6091,7 +6091,7 @@ def update_epdf_emela_variables(self, banner, uvscheme): +"powers of alpha should be reweighted a posteriori") - logger.info('Updating variables according to %s' % self.path) + logger.info('Updating variables according to %s' % self.path) # Flavours in the running of alpha nd, nu, nl = self['eMELA_ActiveFlavoursAlpha'] self.log_and_update(banner, 'run_card', 'ndnq_run', nd) @@ -6130,8 +6130,8 @@ def update_epdf_emela_variables(self, banner, uvscheme): logger.warning('Cannot treat the following renormalisation schemes for ME and PDFs: %d, %d' \ % (uvscheme, uvscheme_pdf)) - # if PDFs use MSbar with fixed alpha, set the ren scale fixed to Qref - # also check that the com energy is equal to qref, otherwise print a + # if PDFs use MSbar with fixed alpha, set the ren scale fixed to Qref + # also check that the com energy is equal to qref, otherwise print a # warning if uvscheme_pdf == 1: qref = self['eMELA_AlphaQref'] @@ -6144,23 +6144,23 @@ def update_epdf_emela_variables(self, banner, uvscheme): # LL / NLL PDF (0/1) pdforder = self['eMELA_PerturbativeOrder'] - # pdfscheme = 0->MSbar; 1->DIS; 2->eta (leptonic); 3->beta (leptonic) + # pdfscheme = 0->MSbar; 1->DIS; 2->eta (leptonic); 3->beta (leptonic) # 4->mixed (leptonic); 5-> nobeta (leptonic); 6->delta (leptonic) # if LL, use nobeta scheme unless LEGACYLLPDF > 0 if pdforder == 0: if 'eMELA_LEGACYLLPDF' not in self.keys() or self['eMELA_LEGACYLLPDF'] in [-1, 0]: self.log_and_update(banner, 'run_card', 'pdfscheme', 5) - elif self['eMELA_LEGACYLLPDF'] == 1: + elif self['eMELA_LEGACYLLPDF'] == 1: # mixed self.log_and_update(banner, 'run_card', 'pdfscheme', 4) - elif self['eMELA_LEGACYLLPDF'] == 2: + elif self['eMELA_LEGACYLLPDF'] == 2: # eta self.log_and_update(banner, 'run_card', 'pdfscheme', 2) - elif self['eMELA_LEGACYLLPDF'] == 3: + elif self['eMELA_LEGACYLLPDF'] == 3: # beta self.log_and_update(banner, 'run_card', 'pdfscheme', 3) elif pdforder == 1: - # for NLL, use eMELA_FactorisationSchemeInt = 0/1 + # for NLL, use eMELA_FactorisationSchemeInt = 0/1 # for delta/MSbar if self['eMELA_FactorisationSchemeInt'] == 0: # MSbar @@ -6177,7 +6177,7 @@ def update_epdf_emela_variables(self, banner, uvscheme): - + def log_and_update(self, banner, card, par, v): """update the card parameter par to value v diff --git a/epochX/cudacpp/gg_tt01g.mad/bin/internal/gen_ximprove.py b/epochX/cudacpp/gg_tt01g.mad/bin/internal/gen_ximprove.py index 5fd170d18d..cc842aa50f 100755 --- a/epochX/cudacpp/gg_tt01g.mad/bin/internal/gen_ximprove.py +++ b/epochX/cudacpp/gg_tt01g.mad/bin/internal/gen_ximprove.py @@ -2,18 +2,18 @@ # # Copyright (c) 2014 The MadGraph5_aMC@NLO Development team and Contributors # -# This file is a part of the MadGraph5_aMC@NLO project, an application which +# This file is a part of the MadGraph5_aMC@NLO project, an application which # automatically generates Feynman diagrams and matrix elements for arbitrary # high-energy processes in the Standard Model and beyond. # -# It is subject to the MadGraph5_aMC@NLO license which should accompany this +# It is subject to the MadGraph5_aMC@NLO license which should accompany this # distribution. # # For more information, visit madgraph.phys.ucl.ac.be and amcatnlo.web.cern.ch # ################################################################################ """ A python file to replace the fortran script gen_ximprove. - This script analyses the result of the survey/ previous refine and + This script analyses the result of the survey/ previous refine and creates the jobs for the following script. """ from __future__ import division @@ -66,77 +66,77 @@ class gensym(object): """a class to call the fortran gensym executable and handle it's output in order to create the various job that are needed for the survey""" - + #convenient shortcut for the formatting of variable @ staticmethod def format_variable(*args): return bannermod.ConfigFile.format_variable(*args) - + combining_job = 2 # number of channel by ajob - splitted_grid = False + splitted_grid = False min_iterations = 3 mode= "survey" - + def __init__(self, cmd, opt=None): - + try: super(gensym, self).__init__(cmd, opt) except TypeError: pass - - # Run statistics, a dictionary of RunStatistics(), with + + # Run statistics, a dictionary of RunStatistics(), with self.run_statistics = {} - + self.cmd = cmd self.run_card = cmd.run_card self.me_dir = cmd.me_dir - - + + # dictionary to keep track of the precision when combining iteration self.cross = collections.defaultdict(int) self.abscross = collections.defaultdict(int) self.sigma = collections.defaultdict(int) self.chi2 = collections.defaultdict(int) - + self.splitted_grid = False if self.cmd.proc_characteristics['loop_induced']: nexternal = self.cmd.proc_characteristics['nexternal'] self.splitted_grid = max(2, (nexternal-2)**2) if hasattr(self.cmd, "opts") and self.cmd.opts['accuracy'] == 0.1: self.cmd.opts['accuracy'] = 0.02 - + if isinstance(cmd.cluster, cluster.MultiCore) and self.splitted_grid > 1: self.splitted_grid = int(cmd.cluster.nb_core**0.5) if self.splitted_grid == 1 and cmd.cluster.nb_core >1: self.splitted_grid = 2 - + #if the user defines it in the run_card: if self.run_card['survey_splitting'] != -1: self.splitted_grid = self.run_card['survey_splitting'] if self.run_card['survey_nchannel_per_job'] != 1 and 'survey_nchannel_per_job' in self.run_card.user_set: - self.combining_job = self.run_card['survey_nchannel_per_job'] + self.combining_job = self.run_card['survey_nchannel_per_job'] elif self.run_card['hard_survey'] > 1: self.combining_job = 1 - - + + self.splitted_Pdir = {} self.splitted_for_dir = lambda x,y: self.splitted_grid self.combining_job_for_Pdir = lambda x: self.combining_job self.lastoffset = {} - + done_warning_zero_coupling = False def get_helicity(self, to_submit=True, clean=True): """launch a single call to madevent to get the list of non zero helicity""" - - self.subproc = [l.strip() for l in open(pjoin(self.me_dir,'SubProcesses', + + self.subproc = [l.strip() for l in open(pjoin(self.me_dir,'SubProcesses', 'subproc.mg'))] subproc = self.subproc P_zero_result = [] nb_tot_proc = len(subproc) - job_list = {} - - + job_list = {} + + for nb_proc,subdir in enumerate(subproc): self.cmd.update_status('Compiling for process %s/%s.' % \ (nb_proc+1,nb_tot_proc), level=None) @@ -154,7 +154,7 @@ def get_helicity(self, to_submit=True, clean=True): p = misc.Popen(['./gensym'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT, cwd=Pdir) #sym_input = "%(points)d %(iterations)d %(accuracy)f \n" % self.opts - + (stdout, _) = p.communicate(''.encode()) stdout = stdout.decode('ascii',errors='ignore') if stdout: @@ -166,11 +166,11 @@ def get_helicity(self, to_submit=True, clean=True): if os.path.exists(pjoin(self.me_dir, 'error')): os.remove(pjoin(self.me_dir, 'error')) continue # bypass bad process - + self.cmd.compile(['madevent_forhel'], cwd=Pdir) if not os.path.exists(pjoin(Pdir, 'madevent_forhel')): - raise Exception('Error make madevent_forhel not successful') - + raise Exception('Error make madevent_forhel not successful') + if not os.path.exists(pjoin(Pdir, 'Hel')): os.mkdir(pjoin(Pdir, 'Hel')) ff = open(pjoin(Pdir, 'Hel', 'input_app.txt'),'w') @@ -180,15 +180,15 @@ def get_helicity(self, to_submit=True, clean=True): try: os.remove(pjoin(Pdir, 'Hel','results.dat')) except Exception: - pass + pass # Launch gensym - p = misc.Popen(['../madevent_forhel < input_app.txt'], stdout=subprocess.PIPE, + p = misc.Popen(['../madevent_forhel < input_app.txt'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT, cwd=pjoin(Pdir,'Hel'), shell=True) #sym_input = "%(points)d %(iterations)d %(accuracy)f \n" % self.opts (stdout, _) = p.communicate(" ".encode()) stdout = stdout.decode('ascii',errors='ignore') if os.path.exists(pjoin(self.me_dir, 'error')): - raise Exception(pjoin(self.me_dir,'error')) + raise Exception(pjoin(self.me_dir,'error')) # note a continue is not enough here, we have in top to link # the matrixX_optim.f to matrixX_orig.f to let the code to work # after this error. @@ -203,7 +203,7 @@ def get_helicity(self, to_submit=True, clean=True): zero_gc = list() all_zampperhel = set() all_bad_amps_perhel = set() - + for line in stdout.splitlines(): if "=" not in line and ":" not in line: continue @@ -229,22 +229,22 @@ def get_helicity(self, to_submit=True, clean=True): "%s\n" % (' '.join(zero_gc)) +\ "This will slow down the computation. Please consider using restricted model:\n" +\ "https://answers.launchpad.net/mg5amcnlo/+faq/2312") - - + + all_good_hels = collections.defaultdict(list) for me_index, hel in all_hel: - all_good_hels[me_index].append(int(hel)) - + all_good_hels[me_index].append(int(hel)) + #print(all_hel) if self.run_card['hel_zeroamp']: all_bad_amps = collections.defaultdict(list) for me_index, amp in all_zamp: all_bad_amps[me_index].append(int(amp)) - + all_bad_amps_perhel = collections.defaultdict(list) for me_index, hel, amp in all_zampperhel: - all_bad_amps_perhel[me_index].append((int(hel),int(amp))) - + all_bad_amps_perhel[me_index].append((int(hel),int(amp))) + elif all_zamp: nb_zero = sum(int(a[1]) for a in all_zamp) if zero_gc: @@ -254,7 +254,7 @@ def get_helicity(self, to_submit=True, clean=True): else: logger.warning("The optimization detected that you have %i zero matrix-element for this SubProcess: %s.\n" % nb_zero +\ "This part can optimize if you set the flag hel_zeroamp to True in the run_card.") - + #check if we need to do something and write associate information" data = [all_hel, all_zamp, all_bad_amps_perhel] if not self.run_card['hel_zeroamp']: @@ -266,14 +266,14 @@ def get_helicity(self, to_submit=True, clean=True): old_data = open(pjoin(Pdir,'Hel','selection')).read() if old_data == data: continue - - + + with open(pjoin(Pdir,'Hel','selection'),'w') as fsock: - fsock.write(data) - - + fsock.write(data) + + for matrix_file in misc.glob('matrix*orig.f', Pdir): - + split_file = matrix_file.split('/') me_index = split_file[-1][len('matrix'):-len('_orig.f')] @@ -289,11 +289,11 @@ def get_helicity(self, to_submit=True, clean=True): #good_hels = sorted(list(good_hels)) good_hels = [str(x) for x in sorted(all_good_hels[me_index])] if self.run_card['hel_zeroamp']: - + bad_amps = [str(x) for x in sorted(all_bad_amps[me_index])] bad_amps_perhel = [x for x in sorted(all_bad_amps_perhel[me_index])] else: - bad_amps = [] + bad_amps = [] bad_amps_perhel = [] if __debug__: mtext = open(matrix_file).read() @@ -310,7 +310,7 @@ def get_helicity(self, to_submit=True, clean=True): recycler.set_input(matrix_file) recycler.set_output(out_file) - recycler.set_template(templ_file) + recycler.set_template(templ_file) recycler.generate_output_file() del recycler @@ -321,19 +321,19 @@ def get_helicity(self, to_submit=True, clean=True): return {}, P_zero_result - + def launch(self, to_submit=True, clean=True): """ """ if not hasattr(self, 'subproc'): - self.subproc = [l.strip() for l in open(pjoin(self.me_dir,'SubProcesses', + self.subproc = [l.strip() for l in open(pjoin(self.me_dir,'SubProcesses', 'subproc.mg'))] subproc = self.subproc - + P_zero_result = [] # check the number of times where they are no phase-space - + nb_tot_proc = len(subproc) - job_list = {} + job_list = {} for nb_proc,subdir in enumerate(subproc): self.cmd.update_status('Compiling for process %s/%s.
(previous processes already running)' % \ (nb_proc+1,nb_tot_proc), level=None) @@ -341,7 +341,7 @@ def launch(self, to_submit=True, clean=True): subdir = subdir.strip() Pdir = pjoin(self.me_dir, 'SubProcesses',subdir) logger.info(' %s ' % subdir) - + # clean previous run if clean: for match in misc.glob('*ajob*', Pdir): @@ -349,17 +349,17 @@ def launch(self, to_submit=True, clean=True): os.remove(match) for match in misc.glob('G*', Pdir): if os.path.exists(pjoin(match,'results.dat')): - os.remove(pjoin(match, 'results.dat')) + os.remove(pjoin(match, 'results.dat')) if os.path.exists(pjoin(match, 'ftn25')): - os.remove(pjoin(match, 'ftn25')) - + os.remove(pjoin(match, 'ftn25')) + #compile gensym self.cmd.compile(['gensym'], cwd=Pdir) if not os.path.exists(pjoin(Pdir, 'gensym')): - raise Exception('Error make gensym not successful') - + raise Exception('Error make gensym not successful') + # Launch gensym - p = misc.Popen(['./gensym'], stdout=subprocess.PIPE, + p = misc.Popen(['./gensym'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT, cwd=Pdir) #sym_input = "%(points)d %(iterations)d %(accuracy)f \n" % self.opts (stdout, _) = p.communicate(''.encode()) @@ -367,8 +367,8 @@ def launch(self, to_submit=True, clean=True): if os.path.exists(pjoin(self.me_dir,'error')): files.mv(pjoin(self.me_dir,'error'), pjoin(Pdir,'ajob.no_ps.log')) P_zero_result.append(subdir) - continue - + continue + jobs = stdout.split() job_list[Pdir] = jobs try: @@ -386,8 +386,8 @@ def launch(self, to_submit=True, clean=True): continue else: if done: - raise Exception('Parsing error in gensym: %s' % stdout) - job_list[Pdir] = l.split() + raise Exception('Parsing error in gensym: %s' % stdout) + job_list[Pdir] = l.split() done = True if not done: raise Exception('Parsing error in gensym: %s' % stdout) @@ -408,16 +408,16 @@ def launch(self, to_submit=True, clean=True): if to_submit: self.submit_to_cluster(job_list) job_list = {} - + return job_list, P_zero_result - + def resubmit(self, min_precision=1.0, resubmit_zero=False): """collect the result of the current run and relaunch each channel - not completed or optionally a completed one with a precision worse than + not completed or optionally a completed one with a precision worse than a threshold (and/or the zero result channel)""" - + job_list, P_zero_result = self.launch(to_submit=False, clean=False) - + for P , jobs in dict(job_list).items(): misc.sprint(jobs) to_resub = [] @@ -434,7 +434,7 @@ def resubmit(self, min_precision=1.0, resubmit_zero=False): elif max(one_result.xerru, one_result.xerrc)/one_result.xsec > min_precision: to_resub.append(job) else: - to_resub.append(job) + to_resub.append(job) if to_resub: for G in to_resub: try: @@ -442,19 +442,19 @@ def resubmit(self, min_precision=1.0, resubmit_zero=False): except Exception as error: misc.sprint(error) pass - misc.sprint(to_resub) + misc.sprint(to_resub) self.submit_to_cluster({P: to_resub}) - - - - - - - - - - - + + + + + + + + + + + def submit_to_cluster(self, job_list): """ """ @@ -467,7 +467,7 @@ def submit_to_cluster(self, job_list): nexternal = self.cmd.proc_characteristics['nexternal'] current = open(pjoin(path, "nexternal.inc")).read() ext = re.search(r"PARAMETER \(NEXTERNAL=(\d+)\)", current).group(1) - + if self.run_card['job_strategy'] == 2: self.splitted_grid = 2 if nexternal == int(ext): @@ -498,18 +498,18 @@ def submit_to_cluster(self, job_list): return self.submit_to_cluster_no_splitting(job_list) else: return self.submit_to_cluster_splitted(job_list) - - + + def submit_to_cluster_no_splitting(self, job_list): """submit the survey without the parralelization. This is the old mode which is still usefull in single core""" - - # write the template file for the parameter file + + # write the template file for the parameter file self.write_parameter(parralelization=False, Pdirs=list(job_list.keys())) - - + + # launch the job with the appropriate grouping - for Pdir, jobs in job_list.items(): + for Pdir, jobs in job_list.items(): jobs = list(jobs) i=0 while jobs: @@ -518,16 +518,16 @@ def submit_to_cluster_no_splitting(self, job_list): for _ in range(self.combining_job_for_Pdir(Pdir)): if jobs: to_submit.append(jobs.pop(0)) - + self.cmd.launch_job(pjoin(self.me_dir, 'SubProcesses', 'survey.sh'), argument=to_submit, cwd=pjoin(self.me_dir,'SubProcesses' , Pdir)) - + def create_resubmit_one_iter(self, Pdir, G, submit_ps, nb_job, step=0): """prepare the input_file for submitting the channel""" - + if 'SubProcesses' not in Pdir: Pdir = pjoin(self.me_dir, 'SubProcesses', Pdir) @@ -535,8 +535,8 @@ def create_resubmit_one_iter(self, Pdir, G, submit_ps, nb_job, step=0): self.splitted_Pdir[(Pdir, G)] = int(nb_job) - # 1. write the new input_app.txt - run_card = self.cmd.run_card + # 1. write the new input_app.txt + run_card = self.cmd.run_card options = {'event' : submit_ps, 'maxiter': 1, 'miniter': 1, @@ -545,29 +545,29 @@ def create_resubmit_one_iter(self, Pdir, G, submit_ps, nb_job, step=0): else run_card['nhel'], 'gridmode': -2, 'channel' : G - } - + } + Gdir = pjoin(Pdir, 'G%s' % G) - self.write_parameter_file(pjoin(Gdir, 'input_app.txt'), options) - + self.write_parameter_file(pjoin(Gdir, 'input_app.txt'), options) + # 2. check that ftn25 exists. - assert os.path.exists(pjoin(Gdir, "ftn25")) - - + assert os.path.exists(pjoin(Gdir, "ftn25")) + + # 3. Submit the new jobs #call back function - packet = cluster.Packet((Pdir, G, step+1), + packet = cluster.Packet((Pdir, G, step+1), self.combine_iteration, (Pdir, G, step+1)) - + if step ==0: - self.lastoffset[(Pdir, G)] = 0 - - # resubmit the new jobs + self.lastoffset[(Pdir, G)] = 0 + + # resubmit the new jobs for i in range(int(nb_job)): name = "G%s_%s" % (G,i+1) self.lastoffset[(Pdir, G)] += 1 - offset = self.lastoffset[(Pdir, G)] + offset = self.lastoffset[(Pdir, G)] self.cmd.launch_job(pjoin(self.me_dir, 'SubProcesses', 'refine_splitted.sh'), argument=[name, 'G%s'%G, offset], cwd= Pdir, @@ -575,9 +575,9 @@ def create_resubmit_one_iter(self, Pdir, G, submit_ps, nb_job, step=0): def submit_to_cluster_splitted(self, job_list): - """ submit the version of the survey with splitted grid creation - """ - + """ submit the version of the survey with splitted grid creation + """ + #if self.splitted_grid <= 1: # return self.submit_to_cluster_no_splitting(job_list) @@ -592,7 +592,7 @@ def submit_to_cluster_splitted(self, job_list): for job in jobs: packet = cluster.Packet((Pdir, job, 1), self.combine_iteration, (Pdir, job, 1)) - for i in range(self.splitted_for_dir(Pdir, job)): + for i in range(self.splitted_for_dir(Pdir, job)): self.cmd.launch_job(pjoin(self.me_dir, 'SubProcesses', 'survey.sh'), argument=[i+1, job], cwd=pjoin(self.me_dir,'SubProcesses' , Pdir), @@ -601,15 +601,15 @@ def submit_to_cluster_splitted(self, job_list): def combine_iteration(self, Pdir, G, step): grid_calculator, cross, error = self.combine_grid(Pdir, G, step) - - # Compute the number of events used for this run. + + # Compute the number of events used for this run. nb_events = grid_calculator.target_evt Gdirs = [] #build the the list of directory for i in range(self.splitted_for_dir(Pdir, G)): path = pjoin(Pdir, "G%s_%s" % (G, i+1)) Gdirs.append(path) - + # 4. make the submission of the next iteration # Three cases - less than 3 iteration -> continue # - more than 3 and less than 5 -> check error @@ -627,15 +627,15 @@ def combine_iteration(self, Pdir, G, step): need_submit = False else: need_submit = True - + elif step >= self.cmd.opts['iterations']: need_submit = False elif self.cmd.opts['accuracy'] < 0: #check for luminosity raise Exception("Not Implemented") elif self.abscross[(Pdir,G)] == 0: - need_submit = False - else: + need_submit = False + else: across = self.abscross[(Pdir,G)]/(self.sigma[(Pdir,G)]+1e-99) tot_across = self.get_current_axsec() if across == 0: @@ -646,20 +646,20 @@ def combine_iteration(self, Pdir, G, step): need_submit = True else: need_submit = False - - + + if cross: grid_calculator.write_grid_for_submission(Pdir,G, self.splitted_for_dir(Pdir, G), nb_events,mode=self.mode, conservative_factor=5.0) - - xsec_format = '.%ig'%(max(3,int(math.log10(1.0/float(error)))+2) - if float(cross)!=0.0 and float(error)!=0.0 else 8) + + xsec_format = '.%ig'%(max(3,int(math.log10(1.0/float(error)))+2) + if float(cross)!=0.0 and float(error)!=0.0 else 8) if need_submit: message = "%%s/G%%s is at %%%s +- %%.3g pb. Now submitting iteration #%s."%(xsec_format, step+1) logger.info(message%\ - (os.path.basename(Pdir), G, float(cross), + (os.path.basename(Pdir), G, float(cross), float(error)*float(cross))) self.resubmit_survey(Pdir,G, Gdirs, step) elif cross: @@ -670,26 +670,26 @@ def combine_iteration(self, Pdir, G, step): newGpath = pjoin(self.me_dir,'SubProcesses' , Pdir, 'G%s' % G) if not os.path.exists(newGpath): os.mkdir(newGpath) - + # copy the new grid: - files.cp(pjoin(Gdirs[0], 'ftn25'), + files.cp(pjoin(Gdirs[0], 'ftn25'), pjoin(self.me_dir,'SubProcesses' , Pdir, 'G%s' % G, 'ftn26')) - + # copy the events fsock = open(pjoin(newGpath, 'events.lhe'), 'w') for Gdir in Gdirs: - fsock.write(open(pjoin(Gdir, 'events.lhe')).read()) - + fsock.write(open(pjoin(Gdir, 'events.lhe')).read()) + # copy one log - files.cp(pjoin(Gdirs[0], 'log.txt'), + files.cp(pjoin(Gdirs[0], 'log.txt'), pjoin(self.me_dir,'SubProcesses' , Pdir, 'G%s' % G)) - - + + # create the appropriate results.dat self.write_results(grid_calculator, cross, error, Pdir, G, step) else: logger.info("Survey finished for %s/G%s [0 cross]", os.path.basename(Pdir),G) - + Gdir = pjoin(self.me_dir,'SubProcesses' , Pdir, 'G%s' % G) if not os.path.exists(Gdir): os.mkdir(Gdir) @@ -697,21 +697,21 @@ def combine_iteration(self, Pdir, G, step): files.cp(pjoin(Gdirs[0], 'log.txt'), Gdir) # create the appropriate results.dat self.write_results(grid_calculator, cross, error, Pdir, G, step) - + return 0 def combine_grid(self, Pdir, G, step, exclude_sub_jobs=[]): """ exclude_sub_jobs is to remove some of the subjobs if a numerical issue is detected in one of them. Warning is issue when this occurs. """ - + # 1. create an object to combine the grid information and fill it grid_calculator = combine_grid.grid_information(self.run_card['nhel']) - + for i in range(self.splitted_for_dir(Pdir, G)): if i in exclude_sub_jobs: continue - path = pjoin(Pdir, "G%s_%s" % (G, i+1)) + path = pjoin(Pdir, "G%s_%s" % (G, i+1)) fsock = misc.mult_try_open(pjoin(path, 'results.dat')) one_result = grid_calculator.add_results_information(fsock) fsock.close() @@ -723,9 +723,9 @@ def combine_grid(self, Pdir, G, step, exclude_sub_jobs=[]): fsock.close() os.remove(pjoin(path, 'results.dat')) #os.remove(pjoin(path, 'grid_information')) - - - + + + #2. combine the information about the total crossection / error # start by keep the interation in memory cross, across, sigma = grid_calculator.get_cross_section() @@ -736,12 +736,12 @@ def combine_grid(self, Pdir, G, step, exclude_sub_jobs=[]): if maxwgt: nunwgt = grid_calculator.get_nunwgt(maxwgt) # Make sure not to apply the security below during the first step of the - # survey. Also, disregard channels with a contribution relative to the + # survey. Also, disregard channels with a contribution relative to the # total cross-section smaller than 1e-8 since in this case it is unlikely # that this channel will need more than 1 event anyway. apply_instability_security = False rel_contrib = 0.0 - if (self.__class__ != gensym or step > 1): + if (self.__class__ != gensym or step > 1): Pdir_across = 0.0 Gdir_across = 0.0 for (mPdir,mG) in self.abscross.keys(): @@ -750,7 +750,7 @@ def combine_grid(self, Pdir, G, step, exclude_sub_jobs=[]): (self.sigma[(mPdir,mG)]+1e-99)) if mG == G: Gdir_across += (self.abscross[(mPdir,mG)]/ - (self.sigma[(mPdir,mG)]+1e-99)) + (self.sigma[(mPdir,mG)]+1e-99)) rel_contrib = abs(Gdir_across/(Pdir_across+1e-99)) if rel_contrib > (1.0e-8) and \ nunwgt < 2 and len(grid_calculator.results) > 1: @@ -770,14 +770,14 @@ def combine_grid(self, Pdir, G, step, exclude_sub_jobs=[]): exclude_sub_jobs = list(exclude_sub_jobs) exclude_sub_jobs.append(th_maxwgt[-1][1]) grid_calculator.results.run_statistics['skipped_subchannel'] += 1 - + # Add some monitoring of the problematic events - gPath = pjoin(Pdir, "G%s_%s" % (G, th_maxwgt[-1][1]+1)) + gPath = pjoin(Pdir, "G%s_%s" % (G, th_maxwgt[-1][1]+1)) if os.path.isfile(pjoin(gPath,'events.lhe')): lhe_file = lhe_parser.EventFile(pjoin(gPath,'events.lhe')) discardedPath = pjoin(Pdir,'DiscardedUnstableEvents') if not os.path.exists(discardedPath): - os.mkdir(discardedPath) + os.mkdir(discardedPath) if os.path.isdir(discardedPath): # Keep only the event with a maximum weight, as it surely # is the problematic one. @@ -790,10 +790,10 @@ def combine_grid(self, Pdir, G, step, exclude_sub_jobs=[]): lhe_file.close() evtRecord.write(pjoin(gPath,'events.lhe').read()) evtRecord.close() - + return self.combine_grid(Pdir, G, step, exclude_sub_jobs) - + if across !=0: if sigma != 0: self.cross[(Pdir,G)] += cross**3/sigma**2 @@ -814,10 +814,10 @@ def combine_grid(self, Pdir, G, step, exclude_sub_jobs=[]): self.chi2[(Pdir,G)] = 0 cross = self.cross[(Pdir,G)] error = 0 - + else: error = 0 - + grid_calculator.results.compute_values(update_statistics=True) if (str(os.path.basename(Pdir)), G) in self.run_statistics: self.run_statistics[(str(os.path.basename(Pdir)), G)]\ @@ -825,8 +825,8 @@ def combine_grid(self, Pdir, G, step, exclude_sub_jobs=[]): else: self.run_statistics[(str(os.path.basename(Pdir)), G)] = \ grid_calculator.results.run_statistics - - self.warnings_from_statistics(G, grid_calculator.results.run_statistics) + + self.warnings_from_statistics(G, grid_calculator.results.run_statistics) stats_msg = grid_calculator.results.run_statistics.nice_output( '/'.join([os.path.basename(Pdir),'G%s'%G])) @@ -836,7 +836,7 @@ def combine_grid(self, Pdir, G, step, exclude_sub_jobs=[]): # Clean up grid_information to avoid border effects in case of a crash for i in range(self.splitted_for_dir(Pdir, G)): path = pjoin(Pdir, "G%s_%s" % (G, i+1)) - try: + try: os.remove(pjoin(path, 'grid_information')) except OSError as oneerror: if oneerror.errno != 2: @@ -850,7 +850,7 @@ def warnings_from_statistics(self,G,stats): return EPS_fraction = float(stats['exceptional_points'])/stats['n_madloop_calls'] - + msg = "Channel %s has encountered a fraction of %.3g\n"+ \ "of numerically unstable loop matrix element computations\n"+\ "(which could not be rescued using quadruple precision).\n"+\ @@ -861,16 +861,16 @@ def warnings_from_statistics(self,G,stats): elif EPS_fraction > 0.01: logger.critical((msg%(G,EPS_fraction)).replace('might', 'can')) raise Exception((msg%(G,EPS_fraction)).replace('might', 'can')) - + def get_current_axsec(self): - + across = 0 for (Pdir,G) in self.abscross: across += self.abscross[(Pdir,G)]/(self.sigma[(Pdir,G)]+1e-99) return across - + def write_results(self, grid_calculator, cross, error, Pdir, G, step): - + #compute the value if cross == 0: abscross,nw, luminosity = 0, 0, 0 @@ -888,7 +888,7 @@ def write_results(self, grid_calculator, cross, error, Pdir, G, step): maxwgt = grid_calculator.get_max_wgt() nunwgt = grid_calculator.get_nunwgt() luminosity = nunwgt/cross - + #format the results.dat def fstr(nb): data = '%E' % nb @@ -897,20 +897,20 @@ def fstr(nb): power = int(power) + 1 return '%.5fE%+03i' %(nb,power) line = '%s %s %s %i %i %i %i %s %s %s %s 0.0 0\n' % \ - (fstr(cross), fstr(error*cross), fstr(error*cross), + (fstr(cross), fstr(error*cross), fstr(error*cross), nevents, nw, maxit,nunwgt, fstr(luminosity), fstr(wgt), fstr(abscross), fstr(maxwgt)) - + fsock = open(pjoin(self.me_dir,'SubProcesses' , Pdir, 'G%s' % G, - 'results.dat'),'w') + 'results.dat'),'w') fsock.writelines(line) fsock.close() - + def resubmit_survey(self, Pdir, G, Gdirs, step): """submit the next iteration of the survey""" # 1. write the new input_app.txt to double the number of points - run_card = self.cmd.run_card + run_card = self.cmd.run_card options = {'event' : 2**(step) * self.cmd.opts['points'] / self.splitted_grid, 'maxiter': 1, 'miniter': 1, @@ -919,18 +919,18 @@ def resubmit_survey(self, Pdir, G, Gdirs, step): else run_card['nhel'], 'gridmode': -2, 'channel' : '' - } - + } + if int(options['helicity']) == 1: options['event'] = options['event'] * 2**(self.cmd.proc_characteristics['nexternal']//3) - + for Gdir in Gdirs: - self.write_parameter_file(pjoin(Gdir, 'input_app.txt'), options) - - + self.write_parameter_file(pjoin(Gdir, 'input_app.txt'), options) + + #2. resubmit the new jobs packet = cluster.Packet((Pdir, G, step+1), self.combine_iteration, \ - (Pdir, G, step+1)) + (Pdir, G, step+1)) nb_step = len(Gdirs) * (step+1) for i,subdir in enumerate(Gdirs): subdir = subdir.rsplit('_',1)[1] @@ -938,34 +938,34 @@ def resubmit_survey(self, Pdir, G, Gdirs, step): offset = nb_step+i+1 offset=str(offset) tag = "%s.%s" % (subdir, offset) - + self.cmd.launch_job(pjoin(self.me_dir, 'SubProcesses', 'survey.sh'), argument=[tag, G], cwd=pjoin(self.me_dir,'SubProcesses' , Pdir), packet_member=packet) - + def write_parameter_file(self, path, options): """ """ - + template =""" %(event)s %(maxiter)s %(miniter)s !Number of events and max and min iterations %(accuracy)s !Accuracy %(gridmode)s !Grid Adjustment 0=none, 2=adjust 1 !Suppress Amplitude 1=yes %(helicity)s !Helicity Sum/event 0=exact - %(channel)s """ + %(channel)s """ options['event'] = int(options['event']) open(path, 'w').write(template % options) - - + + def write_parameter(self, parralelization, Pdirs=None): """Write the parameter of the survey run""" run_card = self.cmd.run_card - + options = {'event' : self.cmd.opts['points'], 'maxiter': self.cmd.opts['iterations'], 'miniter': self.min_iterations, @@ -975,36 +975,36 @@ def write_parameter(self, parralelization, Pdirs=None): 'gridmode': 2, 'channel': '' } - + if int(options['helicity'])== 1: options['event'] = options['event'] * 2**(self.cmd.proc_characteristics['nexternal']//3) - + if parralelization: options['gridmode'] = -2 options['maxiter'] = 1 #this is automatic in dsample anyway options['miniter'] = 1 #this is automatic in dsample anyway options['event'] /= self.splitted_grid - + if not Pdirs: Pdirs = self.subproc - + for Pdir in Pdirs: - path =pjoin(Pdir, 'input_app.txt') + path =pjoin(Pdir, 'input_app.txt') self.write_parameter_file(path, options) - - -class gen_ximprove(object): - - + + +class gen_ximprove(object): + + # some hardcoded value which impact the generation gen_events_security = 1.2 # multiply the number of requested event by this number for security combining_job = 0 # allow to run multiple channel in sequence - max_request_event = 1000 # split jobs if a channel if it needs more than that + max_request_event = 1000 # split jobs if a channel if it needs more than that max_event_in_iter = 5000 min_event_in_iter = 1000 - max_splitting = 130 # maximum duplication of a given channel - min_iter = 3 + max_splitting = 130 # maximum duplication of a given channel + min_iter = 3 max_iter = 9 keep_grid_for_refine = False # only apply if needed to split the job @@ -1022,7 +1022,7 @@ def __new__(cls, cmd, opt): return super(gen_ximprove, cls).__new__(gen_ximprove_gridpack) elif cls.force_class == 'loop_induced': return super(gen_ximprove, cls).__new__(gen_ximprove_share) - + if cmd.proc_characteristics['loop_induced']: return super(gen_ximprove, cls).__new__(gen_ximprove_share) elif gen_ximprove.format_variable(cmd.run_card['gridpack'], bool): @@ -1031,31 +1031,31 @@ def __new__(cls, cmd, opt): return super(gen_ximprove, cls).__new__(gen_ximprove_share) else: return super(gen_ximprove, cls).__new__(gen_ximprove_v4) - - + + def __init__(self, cmd, opt=None): - + try: super(gen_ximprove, self).__init__(cmd, opt) except TypeError: pass - + self.run_statistics = {} self.cmd = cmd self.run_card = cmd.run_card run_card = self.run_card self.me_dir = cmd.me_dir - + #extract from the run_card the information that we need. self.gridpack = run_card['gridpack'] self.nhel = run_card['nhel'] if "nhel_refine" in run_card: self.nhel = run_card["nhel_refine"] - + if self.run_card['refine_evt_by_job'] != -1: self.max_request_event = run_card['refine_evt_by_job'] - - + + # Default option for the run self.gen_events = True self.parralel = False @@ -1066,7 +1066,7 @@ def __init__(self, cmd, opt=None): # parameter for the gridpack run self.nreq = 2000 self.iseed = 4321 - + # placeholder for information self.results = 0 #updated in launch/update_html @@ -1074,16 +1074,16 @@ def __init__(self, cmd, opt=None): self.configure(opt) elif isinstance(opt, bannermod.GridpackCard): self.configure_gridpack(opt) - + def __call__(self): return self.launch() - + def launch(self): - """running """ - + """running """ + #start the run self.handle_seed() - self.results = sum_html.collect_result(self.cmd, + self.results = sum_html.collect_result(self.cmd, main_dir=pjoin(self.cmd.me_dir,'SubProcesses')) #main_dir is for gridpack readonly mode if self.gen_events: # We run to provide a given number of events @@ -1095,15 +1095,15 @@ def launch(self): def configure(self, opt): """Defines some parameter of the run""" - + for key, value in opt.items(): if key in self.__dict__: targettype = type(getattr(self, key)) setattr(self, key, self.format_variable(value, targettype, key)) else: raise Exception('%s not define' % key) - - + + # special treatment always do outside the loop to avoid side effect if 'err_goal' in opt: if self.err_goal < 1: @@ -1113,24 +1113,24 @@ def configure(self, opt): logger.info("Generating %s unweighted events." % self.err_goal) self.gen_events = True self.err_goal = self.err_goal * self.gen_events_security # security - + def handle_seed(self): """not needed but for gridpack --which is not handle here for the moment""" return - - + + def find_job_for_event(self): """return the list of channel that need to be improved""" - + assert self.err_goal >=1 self.err_goal = int(self.err_goal) - - goal_lum = self.err_goal/(self.results.axsec+1e-99) #pb^-1 + + goal_lum = self.err_goal/(self.results.axsec+1e-99) #pb^-1 logger.info('Effective Luminosity %s pb^-1', goal_lum) - + all_channels = sum([list(P) for P in self.results],[]) - all_channels.sort(key= lambda x:x.get('luminosity'), reverse=True) - + all_channels.sort(key= lambda x:x.get('luminosity'), reverse=True) + to_refine = [] for C in all_channels: if C.get('axsec') == 0: @@ -1141,61 +1141,61 @@ def find_job_for_event(self): elif C.get('xerr') > max(C.get('axsec'), (1/(100*math.sqrt(self.err_goal)))*all_channels[-1].get('axsec')): to_refine.append(C) - - logger.info('need to improve %s channels' % len(to_refine)) + + logger.info('need to improve %s channels' % len(to_refine)) return goal_lum, to_refine def update_html(self): """update the html from this object since it contains all the information""" - + run = self.cmd.results.current['run_name'] if not os.path.exists(pjoin(self.cmd.me_dir, 'HTML', run)): os.mkdir(pjoin(self.cmd.me_dir, 'HTML', run)) - + unit = self.cmd.results.unit - P_text = "" - if self.results: - Presults = self.results + P_text = "" + if self.results: + Presults = self.results else: self.results = sum_html.collect_result(self.cmd, None) Presults = self.results - + for P_comb in Presults: - P_text += P_comb.get_html(run, unit, self.cmd.me_dir) - - Presults.write_results_dat(pjoin(self.cmd.me_dir,'SubProcesses', 'results.dat')) - + P_text += P_comb.get_html(run, unit, self.cmd.me_dir) + + Presults.write_results_dat(pjoin(self.cmd.me_dir,'SubProcesses', 'results.dat')) + fsock = open(pjoin(self.cmd.me_dir, 'HTML', run, 'results.html'),'w') fsock.write(sum_html.results_header) fsock.write('%s
' % Presults.get_html(run, unit, self.cmd.me_dir)) - fsock.write('%s
' % P_text) - + fsock.write('%s ' % P_text) + self.cmd.results.add_detail('cross', Presults.xsec) - self.cmd.results.add_detail('error', Presults.xerru) - - return Presults.xsec, Presults.xerru + self.cmd.results.add_detail('error', Presults.xerru) + + return Presults.xsec, Presults.xerru + - class gen_ximprove_v4(gen_ximprove): - + # some hardcoded value which impact the generation gen_events_security = 1.2 # multiply the number of requested event by this number for security combining_job = 0 # allow to run multiple channel in sequence - max_request_event = 1000 # split jobs if a channel if it needs more than that + max_request_event = 1000 # split jobs if a channel if it needs more than that max_event_in_iter = 5000 min_event_in_iter = 1000 - max_splitting = 130 # maximum duplication of a given channel - min_iter = 3 + max_splitting = 130 # maximum duplication of a given channel + min_iter = 3 max_iter = 9 keep_grid_for_refine = False # only apply if needed to split the job - def __init__(self, cmd, opt=None): - + def __init__(self, cmd, opt=None): + super(gen_ximprove_v4, self).__init__(cmd, opt) - + if cmd.opts['accuracy'] < cmd._survey_options['accuracy'][1]: self.increase_precision(cmd._survey_options['accuracy'][1]/cmd.opts['accuracy']) @@ -1203,7 +1203,7 @@ def reset_multijob(self): for path in misc.glob(pjoin('*', '*','multijob.dat'), pjoin(self.me_dir, 'SubProcesses')): open(path,'w').write('0\n') - + def write_multijob(self, Channel, nb_split): """ """ if nb_split <=1: @@ -1211,7 +1211,7 @@ def write_multijob(self, Channel, nb_split): f = open(pjoin(self.me_dir, 'SubProcesses', Channel.get('name'), 'multijob.dat'), 'w') f.write('%i\n' % nb_split) f.close() - + def increase_precision(self, rate=3): #misc.sprint(rate) if rate < 3: @@ -1222,25 +1222,25 @@ def increase_precision(self, rate=3): rate = rate -2 self.max_event_in_iter = int((rate+1) * 10000) self.min_events = int(rate+2) * 2500 - self.gen_events_security = 1 + 0.1 * (rate+2) - + self.gen_events_security = 1 + 0.1 * (rate+2) + if int(self.nhel) == 1: self.min_event_in_iter *= 2**(self.cmd.proc_characteristics['nexternal']//3) self.max_event_in_iter *= 2**(self.cmd.proc_characteristics['nexternal']//2) - - + + alphabet = "abcdefghijklmnopqrstuvwxyz" def get_job_for_event(self): """generate the script in order to generate a given number of event""" # correspond to write_gen in the fortran version - - + + goal_lum, to_refine = self.find_job_for_event() #reset the potential multijob of previous run self.reset_multijob() - + jobs = [] # list of the refine if some job are split is list of # dict with the parameter of the run. @@ -1257,17 +1257,17 @@ def get_job_for_event(self): else: for i in range(len(to_refine) //3): new_order.append(to_refine[i]) - new_order.append(to_refine[-2*i-1]) + new_order.append(to_refine[-2*i-1]) new_order.append(to_refine[-2*i-2]) if len(to_refine) % 3 == 1: - new_order.append(to_refine[i+1]) + new_order.append(to_refine[i+1]) elif len(to_refine) % 3 == 2: - new_order.append(to_refine[i+2]) + new_order.append(to_refine[i+2]) #ensure that the reordering is done nicely assert set([id(C) for C in to_refine]) == set([id(C) for C in new_order]) - to_refine = new_order - - + to_refine = new_order + + # loop over the channel to refine for C in to_refine: #1. Compute the number of points are needed to reach target @@ -1279,7 +1279,7 @@ def get_job_for_event(self): nb_split = self.max_splitting nb_split=max(1, nb_split) - + #2. estimate how many points we need in each iteration if C.get('nunwgt') > 0: nevents = needed_event / nb_split * (C.get('nevents') / C.get('nunwgt')) @@ -1296,21 +1296,21 @@ def get_job_for_event(self): nevents = max(self.min_event_in_iter, min(self.max_event_in_iter, nevents)) logger.debug("%s : need %s event. Need %s split job of %s points", C.name, needed_event, nb_split, nevents) - + # write the multi-job information self.write_multijob(C, nb_split) - + packet = cluster.Packet((C.parent_name, C.name), combine_runs.CombineRuns, (pjoin(self.me_dir, 'SubProcesses', C.parent_name)), {"subproc": C.name, "nb_split":nb_split}) - - + + #create the info dict assume no splitting for the default info = {'name': self.cmd.results.current['run_name'], 'script_name': 'unknown', 'directory': C.name, # need to be change for splitted job - 'P_dir': C.parent_name, + 'P_dir': C.parent_name, 'Ppath': pjoin(self.cmd.me_dir, 'SubProcesses', C.parent_name), 'offset': 1, # need to be change for splitted job 'nevents': nevents, @@ -1321,7 +1321,7 @@ def get_job_for_event(self): 'channel': C.name.replace('G',''), 'grid_refinment' : 0, #no refinment of the grid 'base_directory': '', #should be change in splitted job if want to keep the grid - 'packet': packet, + 'packet': packet, } if nb_split == 1: @@ -1334,19 +1334,19 @@ def get_job_for_event(self): if self.keep_grid_for_refine: new_info['base_directory'] = info['directory'] jobs.append(new_info) - - self.create_ajob(pjoin(self.me_dir, 'SubProcesses', 'refine.sh'), jobs) - + + self.create_ajob(pjoin(self.me_dir, 'SubProcesses', 'refine.sh'), jobs) + def create_ajob(self, template, jobs, write_dir=None): """create the ajob""" - + if not jobs: return if not write_dir: write_dir = pjoin(self.me_dir, 'SubProcesses') - + #filter the job according to their SubProcess directory # no mix submition P2job= collections.defaultdict(list) for j in jobs: @@ -1355,11 +1355,11 @@ def create_ajob(self, template, jobs, write_dir=None): for P in P2job.values(): self.create_ajob(template, P, write_dir) return - - + + #Here we can assume that all job are for the same directory. path = pjoin(write_dir, jobs[0]['P_dir']) - + template_text = open(template, 'r').read() # special treatment if needed to combine the script # computes how many submition miss one job @@ -1384,8 +1384,8 @@ def create_ajob(self, template, jobs, write_dir=None): skip1=0 combining_job =1 nb_sub = len(jobs) - - + + nb_use = 0 for i in range(nb_sub): script_number = i+1 @@ -1404,14 +1404,14 @@ def create_ajob(self, template, jobs, write_dir=None): info["base_directory"] = "./" fsock.write(template_text % info) nb_use += nb_job - + fsock.close() return script_number def get_job_for_precision(self): """create the ajob to achieve a give precision on the total cross-section""" - + assert self.err_goal <=1 xtot = abs(self.results.xsec) logger.info("Working on precision: %s %%" %(100*self.err_goal)) @@ -1428,46 +1428,46 @@ def get_job_for_precision(self): rerr *=rerr if not len(to_refine): return - - # change limit since most don't contribute + + # change limit since most don't contribute limit = math.sqrt((self.err_goal * xtot)**2 - rerr/math.sqrt(len(to_refine))) for C in to_refine[:]: cerr = C.mfactor*(C.xerru + len(to_refine)*C.xerrc) if cerr < limit: to_refine.remove(C) - + # all the channel are now selected. create the channel information logger.info('need to improve %s channels' % len(to_refine)) - + jobs = [] # list of the refine if some job are split is list of # dict with the parameter of the run. # loop over the channel to refine for C in to_refine: - + #1. Determine how many events we need in each iteration yerr = C.mfactor*(C.xerru+len(to_refine)*C.xerrc) nevents = 0.2*C.nevents*(yerr/limit)**2 - + nb_split = int((nevents*(C.nunwgt/C.nevents)/self.max_request_event/ (2**self.min_iter-1))**(2/3)) nb_split = max(nb_split, 1) - # **(2/3) to slow down the increase in number of jobs + # **(2/3) to slow down the increase in number of jobs if nb_split > self.max_splitting: nb_split = self.max_splitting - + if nb_split >1: nevents = nevents / nb_split self.write_multijob(C, nb_split) # forbid too low/too large value nevents = min(self.min_event_in_iter, max(self.max_event_in_iter, nevents)) - - + + #create the info dict assume no splitting for the default info = {'name': self.cmd.results.current['run_name'], 'script_name': 'unknown', 'directory': C.name, # need to be change for splitted job - 'P_dir': C.parent_name, + 'P_dir': C.parent_name, 'Ppath': pjoin(self.cmd.me_dir, 'SubProcesses', C.parent_name), 'offset': 1, # need to be change for splitted job 'nevents': nevents, @@ -1487,38 +1487,38 @@ def get_job_for_precision(self): new_info['offset'] = i+1 new_info['directory'] += self.alphabet[i % 26] + str((i+1)//26) jobs.append(new_info) - self.create_ajob(pjoin(self.me_dir, 'SubProcesses', 'refine.sh'), jobs) - + self.create_ajob(pjoin(self.me_dir, 'SubProcesses', 'refine.sh'), jobs) + def update_html(self): """update the html from this object since it contains all the information""" - + run = self.cmd.results.current['run_name'] if not os.path.exists(pjoin(self.cmd.me_dir, 'HTML', run)): os.mkdir(pjoin(self.cmd.me_dir, 'HTML', run)) - + unit = self.cmd.results.unit - P_text = "" - if self.results: - Presults = self.results + P_text = "" + if self.results: + Presults = self.results else: self.results = sum_html.collect_result(self.cmd, None) Presults = self.results - + for P_comb in Presults: - P_text += P_comb.get_html(run, unit, self.cmd.me_dir) - - Presults.write_results_dat(pjoin(self.cmd.me_dir,'SubProcesses', 'results.dat')) - + P_text += P_comb.get_html(run, unit, self.cmd.me_dir) + + Presults.write_results_dat(pjoin(self.cmd.me_dir,'SubProcesses', 'results.dat')) + fsock = open(pjoin(self.cmd.me_dir, 'HTML', run, 'results.html'),'w') fsock.write(sum_html.results_header) fsock.write('%s
' % Presults.get_html(run, unit, self.cmd.me_dir)) - fsock.write('%s
' % P_text) - + fsock.write('%s ' % P_text) + self.cmd.results.add_detail('cross', Presults.xsec) - self.cmd.results.add_detail('error', Presults.xerru) - - return Presults.xsec, Presults.xerru + self.cmd.results.add_detail('error', Presults.xerru) + + return Presults.xsec, Presults.xerru @@ -1528,27 +1528,27 @@ class gen_ximprove_v4_nogridupdate(gen_ximprove_v4): # some hardcoded value which impact the generation gen_events_security = 1.1 # multiply the number of requested event by this number for security combining_job = 0 # allow to run multiple channel in sequence - max_request_event = 400 # split jobs if a channel if it needs more than that + max_request_event = 400 # split jobs if a channel if it needs more than that max_event_in_iter = 500 min_event_in_iter = 250 - max_splitting = 260 # maximum duplication of a given channel - min_iter = 2 + max_splitting = 260 # maximum duplication of a given channel + min_iter = 2 max_iter = 6 keep_grid_for_refine = True - def __init__(self, cmd, opt=None): - + def __init__(self, cmd, opt=None): + gen_ximprove.__init__(cmd, opt) - + if cmd.proc_characteristics['loopinduced'] and \ cmd.proc_characteristics['nexternal'] > 2: self.increase_parralelization(cmd.proc_characteristics['nexternal']) - + def increase_parralelization(self, nexternal): - self.max_splitting = 1000 - + self.max_splitting = 1000 + if self.run_card['refine_evt_by_job'] != -1: pass elif nexternal == 3: @@ -1563,27 +1563,27 @@ def increase_parralelization(self, nexternal): class gen_ximprove_share(gen_ximprove, gensym): """Doing the refine in multicore. Each core handle a couple of PS point.""" - nb_ps_by_job = 2000 + nb_ps_by_job = 2000 mode = "refine" gen_events_security = 1.15 # Note the real security is lower since we stop the jobs if they are at 96% # of this target. def __init__(self, *args, **opts): - + super(gen_ximprove_share, self).__init__(*args, **opts) self.generated_events = {} self.splitted_for_dir = lambda x,y : self.splitted_Pdir[(x,y)] - + def get_job_for_event(self): """generate the script in order to generate a given number of event""" # correspond to write_gen in the fortran version - + goal_lum, to_refine = self.find_job_for_event() self.goal_lum = goal_lum - + # loop over the channel to refine to find the number of PS point to launch total_ps_points = 0 channel_to_ps_point = [] @@ -1593,7 +1593,7 @@ def get_job_for_event(self): os.remove(pjoin(self.me_dir, "SubProcesses",C.parent_name, C.name, "events.lhe")) except: pass - + #1. Compute the number of points are needed to reach target needed_event = goal_lum*C.get('axsec') if needed_event == 0: @@ -1609,18 +1609,18 @@ def get_job_for_event(self): nb_split = 1 if nb_split > self.max_splitting: nb_split = self.max_splitting - nevents = self.max_event_in_iter * self.max_splitting + nevents = self.max_event_in_iter * self.max_splitting else: nevents = self.max_event_in_iter * nb_split if nevents > self.max_splitting*self.max_event_in_iter: logger.warning("Channel %s/%s has a very low efficiency of unweighting. Might not be possible to reach target" % \ (C.name, C.parent_name)) - nevents = self.max_event_in_iter * self.max_splitting - - total_ps_points += nevents - channel_to_ps_point.append((C, nevents)) - + nevents = self.max_event_in_iter * self.max_splitting + + total_ps_points += nevents + channel_to_ps_point.append((C, nevents)) + if self.cmd.options["run_mode"] == 1: if self.cmd.options["cluster_size"]: nb_ps_by_job = total_ps_points /int(self.cmd.options["cluster_size"]) @@ -1634,7 +1634,7 @@ def get_job_for_event(self): nb_ps_by_job = total_ps_points / self.cmd.options["nb_core"] else: nb_ps_by_job = self.nb_ps_by_job - + nb_ps_by_job = int(max(nb_ps_by_job, 500)) for C, nevents in channel_to_ps_point: @@ -1648,20 +1648,20 @@ def get_job_for_event(self): self.create_resubmit_one_iter(C.parent_name, C.name[1:], submit_ps, nb_job, step=0) needed_event = goal_lum*C.get('xsec') logger.debug("%s/%s : need %s event. Need %s split job of %s points", C.parent_name, C.name, needed_event, nb_job, submit_ps) - - + + def combine_iteration(self, Pdir, G, step): - + grid_calculator, cross, error = self.combine_grid(Pdir, G, step) - + # collect all the generated_event Gdirs = [] #build the the list of directory for i in range(self.splitted_for_dir(Pdir, G)): path = pjoin(Pdir, "G%s_%s" % (G, i+1)) Gdirs.append(path) assert len(grid_calculator.results) == len(Gdirs) == self.splitted_for_dir(Pdir, G) - - + + # Check how many events are going to be kept after un-weighting. needed_event = cross * self.goal_lum if needed_event == 0: @@ -1671,19 +1671,19 @@ def combine_iteration(self, Pdir, G, step): if self.err_goal >=1: if needed_event > self.gen_events_security * self.err_goal: needed_event = int(self.gen_events_security * self.err_goal) - + if (Pdir, G) in self.generated_events: old_nunwgt, old_maxwgt = self.generated_events[(Pdir, G)] else: old_nunwgt, old_maxwgt = 0, 0 - + if old_nunwgt == 0 and os.path.exists(pjoin(Pdir,"G%s" % G, "events.lhe")): # possible for second refine. lhe = lhe_parser.EventFile(pjoin(Pdir,"G%s" % G, "events.lhe")) old_nunwgt = lhe.unweight(None, trunc_error=0.005, log_level=0) old_maxwgt = lhe.max_wgt - - + + maxwgt = max(grid_calculator.get_max_wgt(), old_maxwgt) new_evt = grid_calculator.get_nunwgt(maxwgt) @@ -1695,35 +1695,35 @@ def combine_iteration(self, Pdir, G, step): one_iter_nb_event = max(grid_calculator.get_nunwgt(),1) drop_previous_iteration = False # compare the number of events to generate if we discard the previous iteration - n_target_one_iter = (needed_event-one_iter_nb_event) / ( one_iter_nb_event/ sum([R.nevents for R in grid_calculator.results])) + n_target_one_iter = (needed_event-one_iter_nb_event) / ( one_iter_nb_event/ sum([R.nevents for R in grid_calculator.results])) n_target_combined = (needed_event-nunwgt) / efficiency if n_target_one_iter < n_target_combined: # the last iteration alone has more event that the combine iteration. - # it is therefore interesting to drop previous iteration. + # it is therefore interesting to drop previous iteration. drop_previous_iteration = True nunwgt = one_iter_nb_event maxwgt = grid_calculator.get_max_wgt() new_evt = nunwgt - efficiency = ( one_iter_nb_event/ sum([R.nevents for R in grid_calculator.results])) - + efficiency = ( one_iter_nb_event/ sum([R.nevents for R in grid_calculator.results])) + try: if drop_previous_iteration: raise IOError output_file = open(pjoin(Pdir,"G%s" % G, "events.lhe"), 'a') except IOError: output_file = open(pjoin(Pdir,"G%s" % G, "events.lhe"), 'w') - + misc.call(["cat"] + [pjoin(d, "events.lhe") for d in Gdirs], stdout=output_file) output_file.close() # For large number of iteration. check the number of event by doing the # real unweighting. - if nunwgt < 0.6 * needed_event and step > self.min_iter: + if nunwgt < 0.6 * needed_event and step > self.min_iter: lhe = lhe_parser.EventFile(output_file.name) old_nunwgt =nunwgt nunwgt = lhe.unweight(None, trunc_error=0.01, log_level=0) - - + + self.generated_events[(Pdir, G)] = (nunwgt, maxwgt) # misc.sprint("Adding %s event to %s. Currently at %s" % (new_evt, G, nunwgt)) @@ -1742,21 +1742,21 @@ def combine_iteration(self, Pdir, G, step): nevents = grid_calculator.results[0].nevents if nevents == 0: # possible if some integral returns 0 nevents = max(g.nevents for g in grid_calculator.results) - + need_ps_point = (needed_event - nunwgt)/(efficiency+1e-99) - need_job = need_ps_point // nevents + 1 - + need_job = need_ps_point // nevents + 1 + if step < self.min_iter: # This is normal but check if we are on the good track - job_at_first_iter = nb_split_before/2**(step-1) + job_at_first_iter = nb_split_before/2**(step-1) expected_total_job = job_at_first_iter * (2**self.min_iter-1) done_job = job_at_first_iter * (2**step-1) expected_remaining_job = expected_total_job - done_job - logger.debug("efficiency status (smaller is better): %s", need_job/expected_remaining_job) + logger.debug("efficiency status (smaller is better): %s", need_job/expected_remaining_job) # increase if needed but not too much need_job = min(need_job, expected_remaining_job*1.25) - + nb_job = (need_job-0.5)//(2**(self.min_iter-step)-1) + 1 nb_job = max(1, nb_job) grid_calculator.write_grid_for_submission(Pdir,G, @@ -1768,7 +1768,7 @@ def combine_iteration(self, Pdir, G, step): nb_job, step)) self.create_resubmit_one_iter(Pdir, G, nevents, nb_job, step) #self.create_job(Pdir, G, nb_job, nevents, step) - + elif step < self.max_iter: if step + 1 == self.max_iter: need_job = 1.20 * need_job # avoid to have just too few event. @@ -1777,21 +1777,21 @@ def combine_iteration(self, Pdir, G, step): grid_calculator.write_grid_for_submission(Pdir,G, self.splitted_for_dir(Pdir, G), nb_job*nevents ,mode=self.mode, conservative_factor=self.max_iter) - - + + logger.info("%s/G%s is at %i/%i ('%.2g%%') event. Resubmit %i job at iteration %i." \ % (os.path.basename(Pdir), G, int(nunwgt),int(needed_event)+1, (float(nunwgt)/needed_event)*100.0 if needed_event>0.0 else 0.0, nb_job, step)) self.create_resubmit_one_iter(Pdir, G, nevents, nb_job, step) - - + + return 0 - - + + def write_results(self, grid_calculator, cross, error, Pdir, G, step, efficiency): - + #compute the value if cross == 0: abscross,nw, luminosity = 0, 0, 0 @@ -1807,7 +1807,7 @@ def write_results(self, grid_calculator, cross, error, Pdir, G, step, efficiency nevents = nunwgt # make the unweighting to compute the number of events: luminosity = nunwgt/cross - + #format the results.dat def fstr(nb): data = '%E' % nb @@ -1816,23 +1816,23 @@ def fstr(nb): power = int(power) + 1 return '%.5fE%+03i' %(nb,power) line = '%s %s %s %i %i %i %i %s %s %s 0.0 0.0 0\n' % \ - (fstr(cross), fstr(error*cross), fstr(error*cross), + (fstr(cross), fstr(error*cross), fstr(error*cross), nevents, nw, maxit,nunwgt, fstr(luminosity), fstr(wgt), fstr(abscross)) - + fsock = open(pjoin(self.me_dir,'SubProcesses' , Pdir, 'G%s' % G, - 'results.dat'),'w') + 'results.dat'),'w') fsock.writelines(line) fsock.close() - - - + + + class gen_ximprove_gridpack(gen_ximprove_v4): - - min_iter = 1 + + min_iter = 1 max_iter = 13 - max_request_event = 1e12 # split jobs if a channel if it needs more than that + max_request_event = 1e12 # split jobs if a channel if it needs more than that max_event_in_iter = 4000 min_event_in_iter = 500 combining_job = sys.maxsize @@ -1844,7 +1844,7 @@ def __new__(cls, *args, **opts): return super(gen_ximprove_gridpack, cls).__new__(cls, *args, **opts) def __init__(self, *args, **opts): - + self.ngran = -1 self.gscalefact = {} self.readonly = False @@ -1855,23 +1855,23 @@ def __init__(self, *args, **opts): self.readonly = opts['readonly'] super(gen_ximprove_gridpack,self).__init__(*args, **opts) if self.ngran == -1: - self.ngran = 1 - + self.ngran = 1 + def find_job_for_event(self): """return the list of channel that need to be improved""" import random - + assert self.err_goal >=1 self.err_goal = int(self.err_goal) self.gscalefact = {} - + xtot = self.results.axsec - goal_lum = self.err_goal/(xtot+1e-99) #pb^-1 + goal_lum = self.err_goal/(xtot+1e-99) #pb^-1 # logger.info('Effective Luminosity %s pb^-1', goal_lum) - + all_channels = sum([list(P) for P in self.results],[]) all_channels.sort(key=lambda x : x.get('luminosity'), reverse=True) - + to_refine = [] for C in all_channels: tag = C.get('name') @@ -1885,27 +1885,27 @@ def find_job_for_event(self): #need to generate events logger.debug('request events for ', C.get('name'), 'cross=', C.get('axsec'), 'needed events = ', goal_lum * C.get('axsec')) - to_refine.append(C) - - logger.info('need to improve %s channels' % len(to_refine)) + to_refine.append(C) + + logger.info('need to improve %s channels' % len(to_refine)) return goal_lum, to_refine def get_job_for_event(self): """generate the script in order to generate a given number of event""" # correspond to write_gen in the fortran version - - + + goal_lum, to_refine = self.find_job_for_event() jobs = [] # list of the refine if some job are split is list of # dict with the parameter of the run. - + # loop over the channel to refine for C in to_refine: #1. Compute the number of points are needed to reach target needed_event = max(goal_lum*C.get('axsec'), self.ngran) nb_split = 1 - + #2. estimate how many points we need in each iteration if C.get('nunwgt') > 0: nevents = needed_event / nb_split * (C.get('nevents') / C.get('nunwgt')) @@ -1920,13 +1920,13 @@ def get_job_for_event(self): # forbid too low/too large value nevents = max(self.min_event_in_iter, min(self.max_event_in_iter, nevents)) logger.debug("%s : need %s event. Need %s split job of %s points", C.name, needed_event, nb_split, nevents) - + #create the info dict assume no splitting for the default info = {'name': self.cmd.results.current['run_name'], 'script_name': 'unknown', 'directory': C.name, # need to be change for splitted job - 'P_dir': os.path.basename(C.parent_name), + 'P_dir': os.path.basename(C.parent_name), 'offset': 1, # need to be change for splitted job 'Ppath': pjoin(self.cmd.me_dir, 'SubProcesses', C.parent_name), 'nevents': nevents, #int(nevents*self.gen_events_security)+1, @@ -1938,7 +1938,7 @@ def get_job_for_event(self): 'channel': C.name.replace('G',''), 'grid_refinment' : 0, #no refinment of the grid 'base_directory': '', #should be change in splitted job if want to keep the grid - 'packet': None, + 'packet': None, } if self.readonly: @@ -1946,11 +1946,11 @@ def get_job_for_event(self): info['base_directory'] = basedir jobs.append(info) - - write_dir = '.' if self.readonly else None - self.create_ajob(pjoin(self.me_dir, 'SubProcesses', 'refine.sh'), jobs, write_dir) - + + write_dir = '.' if self.readonly else None + self.create_ajob(pjoin(self.me_dir, 'SubProcesses', 'refine.sh'), jobs, write_dir) + done = [] for j in jobs: if j['P_dir'] in done: @@ -1967,22 +1967,22 @@ def get_job_for_event(self): write_dir = '.' if self.readonly else pjoin(self.me_dir, 'SubProcesses') self.check_events(goal_lum, to_refine, jobs, write_dir) - + def check_events(self, goal_lum, to_refine, jobs, Sdir): """check that we get the number of requested events if not resubmit.""" - + new_jobs = [] - + for C, job_info in zip(to_refine, jobs): - P = job_info['P_dir'] + P = job_info['P_dir'] G = job_info['channel'] axsec = C.get('axsec') - requested_events= job_info['requested_event'] - + requested_events= job_info['requested_event'] + new_results = sum_html.OneResult((P,G)) new_results.read_results(pjoin(Sdir,P, 'G%s'%G, 'results.dat')) - + # need to resubmit? if new_results.get('nunwgt') < requested_events: pwd = pjoin(os.getcwd(),job_info['P_dir'],'G%s'%G) if self.readonly else \ @@ -1992,10 +1992,10 @@ def check_events(self, goal_lum, to_refine, jobs, Sdir): job_info['offset'] += 1 new_jobs.append(job_info) files.mv(pjoin(pwd, 'events.lhe'), pjoin(pwd, 'events.lhe.previous')) - + if new_jobs: - self.create_ajob(pjoin(self.me_dir, 'SubProcesses', 'refine.sh'), new_jobs, Sdir) - + self.create_ajob(pjoin(self.me_dir, 'SubProcesses', 'refine.sh'), new_jobs, Sdir) + done = [] for j in new_jobs: if j['P_dir'] in done: @@ -2015,9 +2015,9 @@ def check_events(self, goal_lum, to_refine, jobs, Sdir): files.put_at_end(pjoin(pwd, 'events.lhe'),pjoin(pwd, 'events.lhe.previous')) return self.check_events(goal_lum, to_refine, new_jobs, Sdir) - - - - + + + + diff --git a/epochX/cudacpp/gg_tt01g.mad/bin/internal/madevent_interface.py b/epochX/cudacpp/gg_tt01g.mad/bin/internal/madevent_interface.py index cb6bf4ca57..8abba3f33f 100755 --- a/epochX/cudacpp/gg_tt01g.mad/bin/internal/madevent_interface.py +++ b/epochX/cudacpp/gg_tt01g.mad/bin/internal/madevent_interface.py @@ -2,11 +2,11 @@ # # Copyright (c) 2011 The MadGraph5_aMC@NLO Development team and Contributors # -# This file is a part of the MadGraph5_aMC@NLO project, an application which +# This file is a part of the MadGraph5_aMC@NLO project, an application which # automatically generates Feynman diagrams and matrix elements for arbitrary # high-energy processes in the Standard Model and beyond. # -# It is subject to the MadGraph5_aMC@NLO license which should accompany this +# It is subject to the MadGraph5_aMC@NLO license which should accompany this # distribution. # # For more information, visit madgraph.phys.ucl.ac.be and amcatnlo.web.cern.ch @@ -53,10 +53,10 @@ # Special logger for the Cmd Interface logger = logging.getLogger('madevent.stdout') # -> stdout logger_stderr = logging.getLogger('madevent.stderr') # ->stderr - + try: import madgraph -except ImportError as error: +except ImportError as error: # import from madevent directory MADEVENT = True import internal.extended_cmd as cmd @@ -92,7 +92,7 @@ import madgraph.various.lhe_parser as lhe_parser # import madgraph.various.histograms as histograms # imported later to not slow down the loading of the code import models.check_param_card as check_param_card - from madgraph.iolibs.files import ln + from madgraph.iolibs.files import ln from madgraph import InvalidCmd, MadGraph5Error, MG5DIR, ReadWrite @@ -113,10 +113,10 @@ class CmdExtended(common_run.CommonRunCmd): next_possibility = { 'start': [], } - + debug_output = 'ME5_debug' error_debug = 'Please report this bug on https://bugs.launchpad.net/mg5amcnlo\n' - error_debug += 'More information is found in \'%(debug)s\'.\n' + error_debug += 'More information is found in \'%(debug)s\'.\n' error_debug += 'Please attach this file to your report.' config_debug = 'If you need help with this issue please contact us on https://answers.launchpad.net/mg5amcnlo\n' @@ -124,18 +124,18 @@ class CmdExtended(common_run.CommonRunCmd): keyboard_stop_msg = """stopping all operation in order to quit MadGraph5_aMC@NLO please enter exit""" - + # Define the Error InvalidCmd = InvalidCmd ConfigurationError = MadGraph5Error def __init__(self, me_dir, options, *arg, **opt): """Init history and line continuation""" - + # Tag allowing/forbiding question self.force = False - - # If possible, build an info line with current version number + + # If possible, build an info line with current version number # and date, from the VERSION text file info = misc.get_pkg_info() info_line = "" @@ -150,7 +150,7 @@ def __init__(self, me_dir, options, *arg, **opt): else: version = open(pjoin(root_path,'MGMEVersion.txt')).readline().strip() info_line = "#* VERSION %s %s *\n" % \ - (version, (24 - len(version)) * ' ') + (version, (24 - len(version)) * ' ') # Create a header for the history file. # Remember to fill in time at writeout time! @@ -177,7 +177,7 @@ def __init__(self, me_dir, options, *arg, **opt): '#* run as ./bin/madevent.py filename *\n' + \ '#* *\n' + \ '#************************************************************\n' - + if info_line: info_line = info_line[1:] @@ -203,11 +203,11 @@ def __init__(self, me_dir, options, *arg, **opt): "* *\n" + \ "************************************************************") super(CmdExtended, self).__init__(me_dir, options, *arg, **opt) - + def get_history_header(self): - """return the history header""" + """return the history header""" return self.history_header % misc.get_time_info() - + def stop_on_keyboard_stop(self): """action to perform to close nicely on a keyboard interupt""" try: @@ -219,20 +219,20 @@ def stop_on_keyboard_stop(self): self.add_error_log_in_html(KeyboardInterrupt) except: pass - + def postcmd(self, stop, line): """ Update the status of the run for finishing interactive command """ - - stop = super(CmdExtended, self).postcmd(stop, line) + + stop = super(CmdExtended, self).postcmd(stop, line) # relaxing the tag forbidding question self.force = False - + if not self.use_rawinput: return stop - + if self.results and not self.results.current: return stop - + arg = line.split() if len(arg) == 0: return stop @@ -240,41 +240,41 @@ def postcmd(self, stop, line): return stop if isinstance(self.results.status, str) and self.results.status == 'Stop by the user': self.update_status('%s Stop by the user' % arg[0], level=None, error=True) - return stop + return stop elif not self.results.status: return stop elif str(arg[0]) in ['exit','quit','EOF']: return stop - + try: - self.update_status('Command \'%s\' done.
Waiting for instruction.' % arg[0], + self.update_status('Command \'%s\' done.
Waiting for instruction.' % arg[0], level=None, error=True) except Exception: misc.sprint('update_status fails') pass - - + + def nice_user_error(self, error, line): """If a ME run is currently running add a link in the html output""" self.add_error_log_in_html() - return cmd.Cmd.nice_user_error(self, error, line) - + return cmd.Cmd.nice_user_error(self, error, line) + def nice_config_error(self, error, line): """If a ME run is currently running add a link in the html output""" self.add_error_log_in_html() stop = cmd.Cmd.nice_config_error(self, error, line) - - + + try: debug_file = open(self.debug_output, 'a') debug_file.write(open(pjoin(self.me_dir,'Cards','proc_card_mg5.dat'))) debug_file.close() except: - pass + pass return stop - + def nice_error_handling(self, error, line): """If a ME run is currently running add a link in the html output""" @@ -294,7 +294,7 @@ def nice_error_handling(self, error, line): proc_card = pjoin(self.me_dir,'Cards','proc_card_mg5.dat') if os.path.exists(proc_card): self.banner.add(proc_card) - + out_dir = pjoin(self.me_dir, 'Events', self.run_name) if not os.path.isdir(out_dir): os.mkdir(out_dir) @@ -307,7 +307,7 @@ def nice_error_handling(self, error, line): else: pass else: - self.add_error_log_in_html() + self.add_error_log_in_html() stop = cmd.Cmd.nice_error_handling(self, error, line) try: debug_file = open(self.debug_output, 'a') @@ -316,14 +316,14 @@ def nice_error_handling(self, error, line): except: pass return stop - - + + #=============================================================================== # HelpToCmd #=============================================================================== class HelpToCmd(object): """ The Series of help routine for the MadEventCmd""" - + def help_pythia(self): logger.info("syntax: pythia [RUN] [--run_options]") logger.info("-- run pythia on RUN (current one by default)") @@ -352,29 +352,29 @@ def help_banner_run(self): logger.info(" Path should be the path of a valid banner.") logger.info(" RUN should be the name of a run of the current directory") self.run_options_help([('-f','answer all question by default'), - ('--name=X', 'Define the name associated with the new run')]) - + ('--name=X', 'Define the name associated with the new run')]) + def help_open(self): logger.info("syntax: open FILE ") logger.info("-- open a file with the appropriate editor.") logger.info(' If FILE belongs to index.html, param_card.dat, run_card.dat') logger.info(' the path to the last created/used directory is used') logger.info(' The program used to open those files can be chosen in the') - logger.info(' configuration file ./input/mg5_configuration.txt') - - + logger.info(' configuration file ./input/mg5_configuration.txt') + + def run_options_help(self, data): if data: logger.info('-- local options:') for name, info in data: logger.info(' %s : %s' % (name, info)) - + logger.info("-- session options:") - logger.info(" Note that those options will be kept for the current session") + logger.info(" Note that those options will be kept for the current session") logger.info(" --cluster : Submit to the cluster. Current cluster: %s" % self.options['cluster_type']) logger.info(" --multicore : Run in multi-core configuration") logger.info(" --nb_core=X : limit the number of core to use to X.") - + def help_generate_events(self): logger.info("syntax: generate_events [run_name] [options]",) @@ -398,16 +398,16 @@ def help_initMadLoop(self): logger.info(" -f : Bypass the edition of MadLoopParams.dat.",'$MG:color:BLUE') logger.info(" -r : Refresh of the existing filters (erasing them if already present).",'$MG:color:BLUE') logger.info(" --nPS= : Specify how many phase-space points should be tried to set up the filters.",'$MG:color:BLUE') - + def help_calculate_decay_widths(self): - + if self.ninitial != 1: logger.warning("This command is only valid for processes of type A > B C.") logger.warning("This command can not be run in current context.") logger.warning("") - + logger.info("syntax: calculate_decay_widths [run_name] [options])") logger.info("-- Calculate decay widths and enter widths and BRs in param_card") logger.info(" for a series of processes of type A > B C ...") @@ -428,8 +428,8 @@ def help_survey(self): logger.info("-- evaluate the different channel associate to the process") self.run_options_help([("--" + key,value[-1]) for (key,value) in \ self._survey_options.items()]) - - + + def help_restart_gridpack(self): logger.info("syntax: restart_gridpack --precision= --restart_zero") @@ -439,14 +439,14 @@ def help_launch(self): logger.info("syntax: launch [run_name] [options])") logger.info(" --alias for either generate_events/calculate_decay_widths") logger.info(" depending of the number of particles in the initial state.") - + if self.ninitial == 1: logger.info("For this directory this is equivalent to calculate_decay_widths") self.help_calculate_decay_widths() else: logger.info("For this directory this is equivalent to $generate_events") self.help_generate_events() - + def help_refine(self): logger.info("syntax: refine require_precision [max_channel] [--run_options]") logger.info("-- refine the LAST run to achieve a given precision.") @@ -454,14 +454,14 @@ def help_refine(self): logger.info(' or the required relative error') logger.info(' max_channel:[5] maximal number of channel per job') self.run_options_help([]) - + def help_combine_events(self): """ """ logger.info("syntax: combine_events [run_name] [--tag=tag_name] [--run_options]") logger.info("-- Combine the last run in order to write the number of events") logger.info(" asked in the run_card.") self.run_options_help([]) - + def help_store_events(self): """ """ logger.info("syntax: store_events [--run_options]") @@ -481,7 +481,7 @@ def help_import(self): logger.info("syntax: import command PATH") logger.info("-- Execute the command present in the file") self.run_options_help([]) - + def help_syscalc(self): logger.info("syntax: syscalc [RUN] [%s] [-f | --tag=]" % '|'.join(self._plot_mode)) logger.info("-- calculate systematics information for the RUN (current run by default)") @@ -506,18 +506,18 @@ class AskRun(cmd.ControlSwitch): ('madspin', 'Decay onshell particles'), ('reweight', 'Add weights to events for new hypp.') ] - + def __init__(self, question, line_args=[], mode=None, force=False, *args, **opt): - + self.check_available_module(opt['mother_interface'].options) self.me_dir = opt['mother_interface'].me_dir super(AskRun,self).__init__(self.to_control, opt['mother_interface'], *args, **opt) - - + + def check_available_module(self, options): - + self.available_module = set() if options['pythia-pgs_path']: self.available_module.add('PY6') @@ -540,32 +540,32 @@ def check_available_module(self, options): self.available_module.add('Rivet') else: logger.warning("Rivet program installed but no parton shower with hepmc output detected.\n Please install pythia8") - + if not MADEVENT or ('mg5_path' in options and options['mg5_path']): self.available_module.add('MadSpin') if misc.has_f2py() or options['f2py_compiler']: self.available_module.add('reweight') -# old mode to activate the shower +# old mode to activate the shower def ans_parton(self, value=None): """None: means that the user type 'pythia' value: means that the user type pythia=value""" - + if value is None: self.set_all_off() else: logger.warning('Invalid command: parton=%s' % value) - - + + # -# HANDLING SHOWER +# HANDLING SHOWER # def get_allowed_shower(self): """return valid entry for the shower switch""" - + if hasattr(self, 'allowed_shower'): return self.allowed_shower - + self.allowed_shower = [] if 'PY6' in self.available_module: self.allowed_shower.append('Pythia6') @@ -574,9 +574,9 @@ def get_allowed_shower(self): if self.allowed_shower: self.allowed_shower.append('OFF') return self.allowed_shower - + def set_default_shower(self): - + if 'PY6' in self.available_module and\ os.path.exists(pjoin(self.me_dir,'Cards','pythia_card.dat')): self.switch['shower'] = 'Pythia6' @@ -590,10 +590,10 @@ def set_default_shower(self): def check_value_shower(self, value): """check an entry is valid. return the valid entry in case of shortcut""" - + if value in self.get_allowed_shower(): return True - + value =value.lower() if value in ['py6','p6','pythia_6'] and 'PY6' in self.available_module: return 'Pythia6' @@ -601,13 +601,13 @@ def check_value_shower(self, value): return 'Pythia8' else: return False - - -# old mode to activate the shower + + +# old mode to activate the shower def ans_pythia(self, value=None): """None: means that the user type 'pythia' value: means that the user type pythia=value""" - + if 'PY6' not in self.available_module: logger.info('pythia-pgs not available. Ignore commmand') return @@ -621,13 +621,13 @@ def ans_pythia(self, value=None): self.set_switch('shower', 'OFF') else: logger.warning('Invalid command: pythia=%s' % value) - - + + def consistency_shower_detector(self, vshower, vdetector): """consistency_XX_YY(val_XX, val_YY) -> XX is the new key set by the user to a new value val_XX -> YY is another key - -> return value should be None or "replace_YY" + -> return value should be None or "replace_YY" """ if vshower == 'OFF': @@ -635,35 +635,35 @@ def consistency_shower_detector(self, vshower, vdetector): return 'OFF' if vshower == 'Pythia8' and vdetector == 'PGS': return 'OFF' - + return None - + # # HANDLING DETECTOR # def get_allowed_detector(self): """return valid entry for the switch""" - + if hasattr(self, 'allowed_detector'): - return self.allowed_detector - + return self.allowed_detector + self.allowed_detector = [] if 'PGS' in self.available_module: self.allowed_detector.append('PGS') if 'Delphes' in self.available_module: self.allowed_detector.append('Delphes') - + if self.allowed_detector: self.allowed_detector.append('OFF') - return self.allowed_detector + return self.allowed_detector def set_default_detector(self): - + self.set_default_shower() #ensure that this one is called first! - + if 'PGS' in self.available_module and self.switch['shower'] == 'Pythia6'\ and os.path.exists(pjoin(self.me_dir,'Cards','pgs_card.dat')): self.switch['detector'] = 'PGS' @@ -674,16 +674,16 @@ def set_default_detector(self): self.switch['detector'] = 'OFF' else: self.switch['detector'] = 'Not Avail.' - -# old mode to activate pgs + +# old mode to activate pgs def ans_pgs(self, value=None): """None: means that the user type 'pgs' - value: means that the user type pgs=value""" - + value: means that the user type pgs=value""" + if 'PGS' not in self.available_module: logger.info('pythia-pgs not available. Ignore commmand') return - + if value is None: self.set_all_off() self.switch['shower'] = 'Pythia6' @@ -696,16 +696,16 @@ def ans_pgs(self, value=None): else: logger.warning('Invalid command: pgs=%s' % value) - + # old mode to activate Delphes def ans_delphes(self, value=None): """None: means that the user type 'delphes' - value: means that the user type delphes=value""" - + value: means that the user type delphes=value""" + if 'Delphes' not in self.available_module: logger.warning('Delphes not available. Ignore commmand') return - + if value is None: self.set_all_off() if 'PY6' in self.available_module: @@ -718,15 +718,15 @@ def ans_delphes(self, value=None): elif value == 'off': self.set_switch('detector', 'OFF') else: - logger.warning('Invalid command: pgs=%s' % value) + logger.warning('Invalid command: pgs=%s' % value) def consistency_detector_shower(self,vdetector, vshower): """consistency_XX_YY(val_XX, val_YY) -> XX is the new key set by the user to a new value val_XX -> YY is another key - -> return value should be None or "replace_YY" + -> return value should be None or "replace_YY" """ - + if vdetector == 'PGS' and vshower != 'Pythia6': return 'Pythia6' if vdetector == 'Delphes' and vshower not in ['Pythia6', 'Pythia8']: @@ -744,28 +744,28 @@ def consistency_detector_shower(self,vdetector, vshower): # def get_allowed_analysis(self): """return valid entry for the shower switch""" - + if hasattr(self, 'allowed_analysis'): return self.allowed_analysis - + self.allowed_analysis = [] if 'ExRoot' in self.available_module: self.allowed_analysis.append('ExRoot') if 'MA4' in self.available_module: self.allowed_analysis.append('MadAnalysis4') if 'MA5' in self.available_module: - self.allowed_analysis.append('MadAnalysis5') + self.allowed_analysis.append('MadAnalysis5') if 'Rivet' in self.available_module: - self.allowed_analysis.append('Rivet') - + self.allowed_analysis.append('Rivet') + if self.allowed_analysis: self.allowed_analysis.append('OFF') - + return self.allowed_analysis - + def check_analysis(self, value): """check an entry is valid. return the valid entry in case of shortcut""" - + if value in self.get_allowed_analysis(): return True if value.lower() in ['ma4', 'madanalysis4', 'madanalysis_4','4']: @@ -786,30 +786,30 @@ def consistency_shower_analysis(self, vshower, vanalysis): """consistency_XX_YY(val_XX, val_YY) -> XX is the new key set by the user to a new value val_XX -> YY is another key - -> return value should be None or "replace_YY" + -> return value should be None or "replace_YY" """ if vshower != 'Pythia8' and vanalysis == 'Rivet': return 'OFF' #new value for analysis - + return None - + def consistency_analysis_shower(self, vanalysis, vshower): """consistency_XX_YY(val_XX, val_YY) -> XX is the new key set by the user to a new value val_XX -> YY is another key - -> return value should be None or "replace_YY" + -> return value should be None or "replace_YY" """ if vshower != 'Pythia8' and vanalysis == 'Rivet': return 'Pythia8' #new value for analysis - + return None def set_default_analysis(self): """initialise the switch for analysis""" - + if 'MA4' in self.available_module and \ os.path.exists(pjoin(self.me_dir,'Cards','plot_card.dat')): self.switch['analysis'] = 'MadAnalysis4' @@ -818,46 +818,46 @@ def set_default_analysis(self): or os.path.exists(pjoin(self.me_dir,'Cards', 'madanalysis5_hadron_card.dat'))): self.switch['analysis'] = 'MadAnalysis5' elif 'ExRoot' in self.available_module: - self.switch['analysis'] = 'ExRoot' - elif self.get_allowed_analysis(): + self.switch['analysis'] = 'ExRoot' + elif self.get_allowed_analysis(): self.switch['analysis'] = 'OFF' else: self.switch['analysis'] = 'Not Avail.' - + # # MADSPIN handling # def get_allowed_madspin(self): """ ON|OFF|onshell """ - + if hasattr(self, 'allowed_madspin'): return self.allowed_madspin - + self.allowed_madspin = [] if 'MadSpin' in self.available_module: self.allowed_madspin = ['OFF',"ON",'onshell',"full"] return self.allowed_madspin - + def check_value_madspin(self, value): """handle alias and valid option not present in get_allowed_madspin""" - + if value.upper() in self.get_allowed_madspin(): return True elif value.lower() in self.get_allowed_madspin(): return True - + if 'MadSpin' not in self.available_module: return False - + if value.lower() in ['madspin', 'full']: return 'full' elif value.lower() in ['none']: return 'none' - - + + def set_default_madspin(self): """initialise the switch for madspin""" - + if 'MadSpin' in self.available_module: if os.path.exists(pjoin(self.me_dir,'Cards','madspin_card.dat')): self.switch['madspin'] = 'ON' @@ -865,10 +865,10 @@ def set_default_madspin(self): self.switch['madspin'] = 'OFF' else: self.switch['madspin'] = 'Not Avail.' - + def get_cardcmd_for_madspin(self, value): """set some command to run before allowing the user to modify the cards.""" - + if value == 'onshell': return ["edit madspin_card --replace_line='set spinmode' --before_line='decay' set spinmode onshell"] elif value in ['full', 'madspin']: @@ -877,36 +877,36 @@ def get_cardcmd_for_madspin(self, value): return ["edit madspin_card --replace_line='set spinmode' --before_line='decay' set spinmode none"] else: return [] - + # # ReWeight handling # def get_allowed_reweight(self): """ return the list of valid option for reweight=XXX """ - + if hasattr(self, 'allowed_reweight'): return getattr(self, 'allowed_reweight') - + if 'reweight' not in self.available_module: self.allowed_reweight = [] return self.allowed_reweight = ['OFF', 'ON'] - + # check for plugin mode plugin_path = self.mother_interface.plugin_path opts = misc.from_plugin_import(plugin_path, 'new_reweight', warning=False) self.allowed_reweight += opts - + def set_default_reweight(self): """initialise the switch for reweight""" - + if 'reweight' in self.available_module: if os.path.exists(pjoin(self.me_dir,'Cards','reweight_card.dat')): self.switch['reweight'] = 'ON' else: self.switch['reweight'] = 'OFF' else: - self.switch['reweight'] = 'Not Avail.' + self.switch['reweight'] = 'Not Avail.' #=============================================================================== # CheckValidForCmd @@ -916,14 +916,14 @@ class CheckValidForCmd(object): def check_banner_run(self, args): """check the validity of line""" - + if len(args) == 0: self.help_banner_run() raise self.InvalidCmd('banner_run requires at least one argument.') - + tag = [a[6:] for a in args if a.startswith('--tag=')] - - + + if os.path.exists(args[0]): type ='banner' format = self.detect_card_type(args[0]) @@ -931,7 +931,7 @@ def check_banner_run(self, args): raise self.InvalidCmd('The file is not a valid banner.') elif tag: args[0] = pjoin(self.me_dir,'Events', args[0], '%s_%s_banner.txt' % \ - (args[0], tag)) + (args[0], tag)) if not os.path.exists(args[0]): raise self.InvalidCmd('No banner associates to this name and tag.') else: @@ -939,7 +939,7 @@ def check_banner_run(self, args): type = 'run' banners = misc.glob('*_banner.txt', pjoin(self.me_dir,'Events', args[0])) if not banners: - raise self.InvalidCmd('No banner associates to this name.') + raise self.InvalidCmd('No banner associates to this name.') elif len(banners) == 1: args[0] = banners[0] else: @@ -947,8 +947,8 @@ def check_banner_run(self, args): tags = [os.path.basename(p)[len(args[0])+1:-11] for p in banners] tag = self.ask('which tag do you want to use?', tags[0], tags) args[0] = pjoin(self.me_dir,'Events', args[0], '%s_%s_banner.txt' % \ - (args[0], tag)) - + (args[0], tag)) + run_name = [arg[7:] for arg in args if arg.startswith('--name=')] if run_name: try: @@ -970,14 +970,14 @@ def check_banner_run(self, args): except Exception: pass self.set_run_name(name) - + def check_history(self, args): """check the validity of line""" - + if len(args) > 1: self.help_history() raise self.InvalidCmd('\"history\" command takes at most one argument') - + if not len(args): return elif args[0] != 'clean': @@ -985,16 +985,16 @@ def check_history(self, args): if dirpath and not os.path.exists(dirpath) or \ os.path.isdir(args[0]): raise self.InvalidCmd("invalid path %s " % dirpath) - + def check_save(self, args): """ check the validity of the line""" - + if len(args) == 0: args.append('options') if args[0] not in self._save_opts: raise self.InvalidCmd('wrong \"save\" format') - + if args[0] != 'options' and len(args) != 2: self.help_save() raise self.InvalidCmd('wrong \"save\" format') @@ -1003,7 +1003,7 @@ def check_save(self, args): if not os.path.exists(basename): raise self.InvalidCmd('%s is not a valid path, please retry' % \ args[1]) - + if args[0] == 'options': has_path = None for arg in args[1:]: @@ -1024,9 +1024,9 @@ def check_save(self, args): has_path = True if not has_path: if '--auto' in arg and self.options['mg5_path']: - args.insert(1, pjoin(self.options['mg5_path'],'input','mg5_configuration.txt')) + args.insert(1, pjoin(self.options['mg5_path'],'input','mg5_configuration.txt')) else: - args.insert(1, pjoin(self.me_dir,'Cards','me5_configuration.txt')) + args.insert(1, pjoin(self.me_dir,'Cards','me5_configuration.txt')) def check_set(self, args): """ check the validity of the line""" @@ -1039,20 +1039,20 @@ def check_set(self, args): self.help_set() raise self.InvalidCmd('Possible options for set are %s' % \ self._set_options) - + if args[0] in ['stdout_level']: if args[1] not in ['DEBUG','INFO','WARNING','ERROR','CRITICAL'] \ and not args[1].isdigit(): raise self.InvalidCmd('output_level needs ' + \ - 'a valid level') - + 'a valid level') + if args[0] in ['timeout']: if not args[1].isdigit(): - raise self.InvalidCmd('timeout values should be a integer') - + raise self.InvalidCmd('timeout values should be a integer') + def check_open(self, args): """ check the validity of the line """ - + if len(args) != 1: self.help_open() raise self.InvalidCmd('OPEN command requires exactly one argument') @@ -1069,7 +1069,7 @@ def check_open(self, args): raise self.InvalidCmd('No MadEvent path defined. Unable to associate this name to a file') else: return True - + path = self.me_dir if os.path.isfile(os.path.join(path,args[0])): args[0] = os.path.join(path,args[0]) @@ -1078,7 +1078,7 @@ def check_open(self, args): elif os.path.isfile(os.path.join(path,'HTML',args[0])): args[0] = os.path.join(path,'HTML',args[0]) # special for card with _default define: copy the default and open it - elif '_card.dat' in args[0]: + elif '_card.dat' in args[0]: name = args[0].replace('_card.dat','_card_default.dat') if os.path.isfile(os.path.join(path,'Cards', name)): files.cp(os.path.join(path,'Cards', name), os.path.join(path,'Cards', args[0])) @@ -1086,13 +1086,13 @@ def check_open(self, args): else: raise self.InvalidCmd('No default path for this file') elif not os.path.isfile(args[0]): - raise self.InvalidCmd('No default path for this file') - + raise self.InvalidCmd('No default path for this file') + def check_initMadLoop(self, args): """ check initMadLoop command arguments are valid.""" - + opt = {'refresh': False, 'nPS': None, 'force': False} - + for arg in args: if arg in ['-r','--refresh']: opt['refresh'] = True @@ -1105,14 +1105,14 @@ def check_initMadLoop(self, args): except ValueError: raise InvalidCmd("The number of attempts specified "+ "'%s' is not a valid integer."%n_attempts) - + return opt - + def check_treatcards(self, args): """check that treatcards arguments are valid [param|run|all] [--output_dir=] [--param_card=] [--run_card=] """ - + opt = {'output_dir':pjoin(self.me_dir,'Source'), 'param_card':pjoin(self.me_dir,'Cards','param_card.dat'), 'run_card':pjoin(self.me_dir,'Cards','run_card.dat'), @@ -1129,14 +1129,14 @@ def check_treatcards(self, args): if os.path.isfile(value): card_name = self.detect_card_type(value) if card_name != key: - raise self.InvalidCmd('Format for input file detected as %s while expecting %s' + raise self.InvalidCmd('Format for input file detected as %s while expecting %s' % (card_name, key)) opt[key] = value elif os.path.isfile(pjoin(self.me_dir,value)): card_name = self.detect_card_type(pjoin(self.me_dir,value)) if card_name != key: - raise self.InvalidCmd('Format for input file detected as %s while expecting %s' - % (card_name, key)) + raise self.InvalidCmd('Format for input file detected as %s while expecting %s' + % (card_name, key)) opt[key] = value else: raise self.InvalidCmd('No such file: %s ' % value) @@ -1154,14 +1154,14 @@ def check_treatcards(self, args): else: self.help_treatcards() raise self.InvalidCmd('Unvalid argument %s' % arg) - - return mode, opt - - + + return mode, opt + + def check_survey(self, args, cmd='survey'): """check that the argument for survey are valid""" - - + + self.opts = dict([(key,value[1]) for (key,value) in \ self._survey_options.items()]) @@ -1183,41 +1183,41 @@ def check_survey(self, args, cmd='survey'): self.help_survey() raise self.InvalidCmd('Too many argument for %s command' % cmd) elif not args: - # No run name assigned -> assigned one automaticaly + # No run name assigned -> assigned one automaticaly self.set_run_name(self.find_available_run_name(self.me_dir)) else: self.set_run_name(args[0], None,'parton', True) args.pop(0) - + return True def check_generate_events(self, args): """check that the argument for generate_events are valid""" - + run = None if args and args[-1].startswith('--laststep='): run = args[-1].split('=')[-1] if run not in ['auto','parton', 'pythia', 'pgs', 'delphes']: self.help_generate_events() raise self.InvalidCmd('invalid %s argument'% args[-1]) - if run != 'parton' and not self.options['pythia-pgs_path']: - raise self.InvalidCmd('''pythia-pgs not install. Please install this package first. + if run != 'parton' and not self.options['pythia-pgs_path']: + raise self.InvalidCmd('''pythia-pgs not install. Please install this package first. To do so type: \'install pythia-pgs\' in the mg5 interface''') if run == 'delphes' and not self.options['delphes_path']: - raise self.InvalidCmd('''delphes not install. Please install this package first. + raise self.InvalidCmd('''delphes not install. Please install this package first. To do so type: \'install Delphes\' in the mg5 interface''') del args[-1] - + #if len(args) > 1: # self.help_generate_events() # raise self.InvalidCmd('Too many argument for generate_events command: %s' % cmd) - + return run def check_calculate_decay_widths(self, args): """check that the argument for calculate_decay_widths are valid""" - + if self.ninitial != 1: raise self.InvalidCmd('Can only calculate decay widths for decay processes A > B C ...') @@ -1232,7 +1232,7 @@ def check_calculate_decay_widths(self, args): if len(args) > 1: self.help_calculate_decay_widths() raise self.InvalidCmd('Too many argument for calculate_decay_widths command: %s' % cmd) - + return accuracy @@ -1241,25 +1241,25 @@ def check_multi_run(self, args): """check that the argument for survey are valid""" run = None - + if not len(args): self.help_multi_run() raise self.InvalidCmd("""multi_run command requires at least one argument for the number of times that it call generate_events command""") - + if args[-1].startswith('--laststep='): run = args[-1].split('=')[-1] if run not in ['parton', 'pythia', 'pgs', 'delphes']: self.help_multi_run() raise self.InvalidCmd('invalid %s argument'% args[-1]) - if run != 'parton' and not self.options['pythia-pgs_path']: - raise self.InvalidCmd('''pythia-pgs not install. Please install this package first. + if run != 'parton' and not self.options['pythia-pgs_path']: + raise self.InvalidCmd('''pythia-pgs not install. Please install this package first. To do so type: \'install pythia-pgs\' in the mg5 interface''') if run == 'delphes' and not self.options['delphes_path']: - raise self.InvalidCmd('''delphes not install. Please install this package first. + raise self.InvalidCmd('''delphes not install. Please install this package first. To do so type: \'install Delphes\' in the mg5 interface''') del args[-1] - + elif not args[0].isdigit(): self.help_multi_run() @@ -1267,7 +1267,7 @@ def check_multi_run(self, args): #pass nb run to an integer nb_run = args.pop(0) args.insert(0, int(nb_run)) - + return run @@ -1284,7 +1284,7 @@ def check_refine(self, args): self.help_refine() raise self.InvalidCmd('require_precision argument is require for refine cmd') - + if not self.run_name: if self.results.lastrun: self.set_run_name(self.results.lastrun) @@ -1296,17 +1296,17 @@ def check_refine(self, args): else: try: [float(arg) for arg in args] - except ValueError: - self.help_refine() + except ValueError: + self.help_refine() raise self.InvalidCmd('refine arguments are suppose to be number') - + return True - + def check_combine_events(self, arg): """ Check the argument for the combine events command """ - + tag = [a for a in arg if a.startswith('--tag=')] - if tag: + if tag: arg.remove(tag[0]) tag = tag[0][6:] elif not self.run_tag: @@ -1314,53 +1314,53 @@ def check_combine_events(self, arg): else: tag = self.run_tag self.run_tag = tag - + if len(arg) > 1: self.help_combine_events() raise self.InvalidCmd('Too many argument for combine_events command') - + if len(arg) == 1: self.set_run_name(arg[0], self.run_tag, 'parton', True) - + if not self.run_name: if not self.results.lastrun: raise self.InvalidCmd('No run_name currently define. Unable to run combine') else: self.set_run_name(self.results.lastrun) - + return True - + def check_pythia(self, args): """Check the argument for pythia command - syntax: pythia [NAME] + syntax: pythia [NAME] Note that other option are already removed at this point """ - + mode = None laststep = [arg for arg in args if arg.startswith('--laststep=')] if laststep and len(laststep)==1: mode = laststep[0].split('=')[-1] if mode not in ['auto', 'pythia', 'pgs', 'delphes']: self.help_pythia() - raise self.InvalidCmd('invalid %s argument'% args[-1]) + raise self.InvalidCmd('invalid %s argument'% args[-1]) elif laststep: raise self.InvalidCmd('only one laststep argument is allowed') - + if not self.options['pythia-pgs_path']: logger.info('Retry to read configuration file to find pythia-pgs path') self.set_configuration() - + if not self.options['pythia-pgs_path'] or not \ os.path.exists(pjoin(self.options['pythia-pgs_path'],'src')): error_msg = 'No valid pythia-pgs path set.\n' error_msg += 'Please use the set command to define the path and retry.\n' error_msg += 'You can also define it in the configuration file.\n' raise self.InvalidCmd(error_msg) - - - + + + tag = [a for a in args if a.startswith('--tag=')] - if tag: + if tag: args.remove(tag[0]) tag = tag[0][6:] @@ -1368,8 +1368,8 @@ def check_pythia(self, args): if self.results.lastrun: args.insert(0, self.results.lastrun) else: - raise self.InvalidCmd('No run name currently define. Please add this information.') - + raise self.InvalidCmd('No run name currently define. Please add this information.') + if len(args) >= 1: if args[0] != self.run_name and\ not os.path.exists(pjoin(self.me_dir,'Events',args[0], 'unweighted_events.lhe.gz')): @@ -1388,21 +1388,21 @@ def check_pythia(self, args): files.ln(input_file, os.path.dirname(output_file)) else: misc.gunzip(input_file, keep=True, stdout=output_file) - + args.append(mode) - + def check_pythia8(self, args): """Check the argument for pythia command - syntax: pythia8 [NAME] + syntax: pythia8 [NAME] Note that other option are already removed at this point - """ + """ mode = None laststep = [arg for arg in args if arg.startswith('--laststep=')] if laststep and len(laststep)==1: mode = laststep[0].split('=')[-1] if mode not in ['auto', 'pythia','pythia8','delphes']: self.help_pythia8() - raise self.InvalidCmd('invalid %s argument'% args[-1]) + raise self.InvalidCmd('invalid %s argument'% args[-1]) elif laststep: raise self.InvalidCmd('only one laststep argument is allowed') @@ -1410,7 +1410,7 @@ def check_pythia8(self, args): if not self.options['pythia8_path']: logger.info('Retry reading configuration file to find pythia8 path') self.set_configuration() - + if not self.options['pythia8_path'] or not \ os.path.exists(pjoin(self.options['pythia8_path'],'bin','pythia8-config')): error_msg = 'No valid pythia8 path set.\n' @@ -1421,7 +1421,7 @@ def check_pythia8(self, args): raise self.InvalidCmd(error_msg) tag = [a for a in args if a.startswith('--tag=')] - if tag: + if tag: args.remove(tag[0]) tag = tag[0][6:] @@ -1430,11 +1430,11 @@ def check_pythia8(self, args): args.insert(0, self.results.lastrun) else: raise self.InvalidCmd('No run name currently define. '+ - 'Please add this information.') - + 'Please add this information.') + if len(args) >= 1: if args[0] != self.run_name and\ - not os.path.exists(pjoin(self.me_dir,'Events',args[0], + not os.path.exists(pjoin(self.me_dir,'Events',args[0], 'unweighted_events.lhe.gz')): raise self.InvalidCmd('No events file corresponding to %s run. ' % args[0]) @@ -1451,9 +1451,9 @@ def check_pythia8(self, args): else: raise self.InvalidCmd('No event file corresponding to %s run. ' % self.run_name) - + args.append(mode) - + def check_remove(self, args): """Check that the remove command is valid""" @@ -1484,33 +1484,33 @@ def check_plot(self, args): madir = self.options['madanalysis_path'] td = self.options['td_path'] - + if not madir or not td: logger.info('Retry to read configuration file to find madanalysis/td') self.set_configuration() madir = self.options['madanalysis_path'] - td = self.options['td_path'] - + td = self.options['td_path'] + if not madir: error_msg = 'No valid MadAnalysis path set.\n' error_msg += 'Please use the set command to define the path and retry.\n' error_msg += 'You can also define it in the configuration file.\n' - raise self.InvalidCmd(error_msg) + raise self.InvalidCmd(error_msg) if not td: error_msg = 'No valid td path set.\n' error_msg += 'Please use the set command to define the path and retry.\n' error_msg += 'You can also define it in the configuration file.\n' - raise self.InvalidCmd(error_msg) - + raise self.InvalidCmd(error_msg) + if len(args) == 0: if not hasattr(self, 'run_name') or not self.run_name: self.help_plot() - raise self.InvalidCmd('No run name currently define. Please add this information.') + raise self.InvalidCmd('No run name currently define. Please add this information.') args.append('all') return - + if args[0] not in self._plot_mode: self.set_run_name(args[0], level='plot') del args[0] @@ -1518,45 +1518,45 @@ def check_plot(self, args): args.append('all') elif not self.run_name: self.help_plot() - raise self.InvalidCmd('No run name currently define. Please add this information.') - + raise self.InvalidCmd('No run name currently define. Please add this information.') + for arg in args: if arg not in self._plot_mode and arg != self.run_name: self.help_plot() - raise self.InvalidCmd('unknown options %s' % arg) - + raise self.InvalidCmd('unknown options %s' % arg) + def check_syscalc(self, args): """Check the argument for the syscalc command syscalc run_name modes""" scdir = self.options['syscalc_path'] - + if not scdir: logger.info('Retry to read configuration file to find SysCalc') self.set_configuration() scdir = self.options['syscalc_path'] - + if not scdir: error_msg = 'No valid SysCalc path set.\n' error_msg += 'Please use the set command to define the path and retry.\n' error_msg += 'You can also define it in the configuration file.\n' error_msg += 'Please note that you need to compile SysCalc first.' - raise self.InvalidCmd(error_msg) - + raise self.InvalidCmd(error_msg) + if len(args) == 0: if not hasattr(self, 'run_name') or not self.run_name: self.help_syscalc() - raise self.InvalidCmd('No run name currently defined. Please add this information.') + raise self.InvalidCmd('No run name currently defined. Please add this information.') args.append('all') return #deal options tag = [a for a in args if a.startswith('--tag=')] - if tag: + if tag: args.remove(tag[0]) tag = tag[0][6:] - + if args[0] not in self._syscalc_mode: self.set_run_name(args[0], tag=tag, level='syscalc') del args[0] @@ -1564,61 +1564,61 @@ def check_syscalc(self, args): args.append('all') elif not self.run_name: self.help_syscalc() - raise self.InvalidCmd('No run name currently defined. Please add this information.') + raise self.InvalidCmd('No run name currently defined. Please add this information.') elif tag and tag != self.run_tag: self.set_run_name(self.run_name, tag=tag, level='syscalc') - + for arg in args: if arg not in self._syscalc_mode and arg != self.run_name: self.help_syscalc() - raise self.InvalidCmd('unknown options %s' % arg) + raise self.InvalidCmd('unknown options %s' % arg) if self.run_card['use_syst'] not in self.true: raise self.InvalidCmd('Run %s does not include ' % self.run_name + \ 'systematics information needed for syscalc.') - - + + def check_pgs(self, arg, no_default=False): """Check the argument for pythia command - syntax is "pgs [NAME]" + syntax is "pgs [NAME]" Note that other option are already remove at this point """ - + # If not pythia-pgs path if not self.options['pythia-pgs_path']: logger.info('Retry to read configuration file to find pythia-pgs path') self.set_configuration() - + if not self.options['pythia-pgs_path'] or not \ os.path.exists(pjoin(self.options['pythia-pgs_path'],'src')): error_msg = 'No valid pythia-pgs path set.\n' error_msg += 'Please use the set command to define the path and retry.\n' error_msg += 'You can also define it in the configuration file.\n' - raise self.InvalidCmd(error_msg) - + raise self.InvalidCmd(error_msg) + tag = [a for a in arg if a.startswith('--tag=')] - if tag: + if tag: arg.remove(tag[0]) tag = tag[0][6:] - - + + if len(arg) == 0 and not self.run_name: if self.results.lastrun: arg.insert(0, self.results.lastrun) else: - raise self.InvalidCmd('No run name currently define. Please add this information.') - + raise self.InvalidCmd('No run name currently define. Please add this information.') + if len(arg) == 1 and self.run_name == arg[0]: arg.pop(0) - + if not len(arg) and \ not os.path.exists(pjoin(self.me_dir,'Events','pythia_events.hep')): if not no_default: self.help_pgs() raise self.InvalidCmd('''No file file pythia_events.hep currently available Please specify a valid run_name''') - - lock = None + + lock = None if len(arg) == 1: prev_tag = self.set_run_name(arg[0], tag, 'pgs') if not os.path.exists(pjoin(self.me_dir,'Events',self.run_name,'%s_pythia_events.hep.gz' % prev_tag)): @@ -1626,25 +1626,25 @@ def check_pgs(self, arg, no_default=False): else: input_file = pjoin(self.me_dir,'Events', self.run_name, '%s_pythia_events.hep.gz' % prev_tag) output_file = pjoin(self.me_dir, 'Events', 'pythia_events.hep') - lock = cluster.asyncrone_launch('gunzip',stdout=open(output_file,'w'), + lock = cluster.asyncrone_launch('gunzip',stdout=open(output_file,'w'), argument=['-c', input_file]) else: - if tag: + if tag: self.run_card['run_tag'] = tag self.set_run_name(self.run_name, tag, 'pgs') - - return lock + + return lock def check_display(self, args): """check the validity of line syntax is "display XXXXX" """ - + if len(args) < 1 or args[0] not in self._display_opts: self.help_display() raise self.InvalidCmd - + if args[0] == 'variable' and len(args) !=2: raise self.InvalidCmd('variable need a variable name') @@ -1654,39 +1654,39 @@ def check_display(self, args): def check_import(self, args): """check the validity of line""" - + if not args: self.help_import() raise self.InvalidCmd('wrong \"import\" format') - + if args[0] != 'command': args.insert(0,'command') - - + + if not len(args) == 2 or not os.path.exists(args[1]): raise self.InvalidCmd('PATH is mandatory for import command\n') - + #=============================================================================== # CompleteForCmd #=============================================================================== class CompleteForCmd(CheckValidForCmd): """ The Series of help routine for the MadGraphCmd""" - - + + def complete_banner_run(self, text, line, begidx, endidx, formatting=True): "Complete the banner run command" try: - - + + args = self.split_arg(line[0:begidx], error=False) - + if args[-1].endswith(os.path.sep): return self.path_completion(text, os.path.join('.',*[a for a in args \ - if a.endswith(os.path.sep)])) - - + if a.endswith(os.path.sep)])) + + if len(args) > 1: # only options are possible tags = misc.glob('%s_*_banner.txt' % args[1], pjoin(self.me_dir, 'Events' , args[1])) @@ -1697,9 +1697,9 @@ def complete_banner_run(self, text, line, begidx, endidx, formatting=True): else: return self.list_completion(text, tags) return self.list_completion(text, tags +['--name=','-f'], line) - + # First argument - possibilites = {} + possibilites = {} comp = self.path_completion(text, os.path.join('.',*[a for a in args \ if a.endswith(os.path.sep)])) @@ -1711,10 +1711,10 @@ def complete_banner_run(self, text, line, begidx, endidx, formatting=True): run_list = misc.glob(pjoin('*','*_banner.txt'), pjoin(self.me_dir, 'Events')) run_list = [n.rsplit('/',2)[1] for n in run_list] possibilites['RUN Name'] = self.list_completion(text, run_list) - + return self.deal_multiple_categories(possibilites, formatting) - - + + except Exception as error: print(error) @@ -1732,12 +1732,12 @@ def complete_history(self, text, line, begidx, endidx): if len(args) == 1: return self.path_completion(text) - - def complete_open(self, text, line, begidx, endidx): + + def complete_open(self, text, line, begidx, endidx): """ complete the open command """ args = self.split_arg(line[0:begidx]) - + # Directory continuation if os.path.sep in args[-1] + text: return self.path_completion(text, @@ -1751,10 +1751,10 @@ def complete_open(self, text, line, begidx, endidx): if os.path.isfile(os.path.join(path,'README')): possibility.append('README') if os.path.isdir(os.path.join(path,'Cards')): - possibility += [f for f in os.listdir(os.path.join(path,'Cards')) + possibility += [f for f in os.listdir(os.path.join(path,'Cards')) if f.endswith('.dat')] if os.path.isdir(os.path.join(path,'HTML')): - possibility += [f for f in os.listdir(os.path.join(path,'HTML')) + possibility += [f for f in os.listdir(os.path.join(path,'HTML')) if f.endswith('.html') and 'default' not in f] else: possibility.extend(['./','../']) @@ -1763,7 +1763,7 @@ def complete_open(self, text, line, begidx, endidx): if os.path.exists('MG5_debug'): possibility.append('MG5_debug') return self.list_completion(text, possibility) - + def complete_set(self, text, line, begidx, endidx): "Complete the set command" @@ -1784,27 +1784,27 @@ def complete_set(self, text, line, begidx, endidx): elif len(args) >2 and args[-1].endswith(os.path.sep): return self.path_completion(text, os.path.join('.',*[a for a in args if a.endswith(os.path.sep)]), - only_dirs = True) - + only_dirs = True) + def complete_survey(self, text, line, begidx, endidx): """ Complete the survey command """ - + if line.endswith('nb_core=') and not text: import multiprocessing max = multiprocessing.cpu_count() return [str(i) for i in range(2,max+1)] - + return self.list_completion(text, self._run_options, line) - + complete_refine = complete_survey complete_combine_events = complete_survey complite_store = complete_survey complete_generate_events = complete_survey complete_create_gridpack = complete_survey - + def complete_generate_events(self, text, line, begidx, endidx): """ Complete the generate events""" - + if line.endswith('nb_core=') and not text: import multiprocessing max = multiprocessing.cpu_count() @@ -1813,17 +1813,17 @@ def complete_generate_events(self, text, line, begidx, endidx): return ['parton','pythia','pgs','delphes'] elif '--laststep=' in line.split()[-1] and line and line[-1] != ' ': return self.list_completion(text,['parton','pythia','pgs','delphes'],line) - + opts = self._run_options + self._generate_options return self.list_completion(text, opts, line) def complete_initMadLoop(self, text, line, begidx, endidx): "Complete the initMadLoop command" - + numbers = [str(i) for i in range(10)] opts = ['-f','-r','--nPS='] - + args = self.split_arg(line[0:begidx], error=False) if len(line) >=6 and line[begidx-6:begidx]=='--nPS=': return self.list_completion(text, numbers, line) @@ -1840,18 +1840,18 @@ def complete_launch(self, *args, **opts): def complete_calculate_decay_widths(self, text, line, begidx, endidx): """ Complete the calculate_decay_widths command""" - + if line.endswith('nb_core=') and not text: import multiprocessing max = multiprocessing.cpu_count() return [str(i) for i in range(2,max+1)] - + opts = self._run_options + self._calculate_decay_options return self.list_completion(text, opts, line) - + def complete_display(self, text, line, begidx, endidx): - """ Complete the display command""" - + """ Complete the display command""" + args = self.split_arg(line[0:begidx], error=False) if len(args) >= 2 and args[1] =='results': start = line.find('results') @@ -1860,44 +1860,44 @@ def complete_display(self, text, line, begidx, endidx): def complete_multi_run(self, text, line, begidx, endidx): """complete multi run command""" - + args = self.split_arg(line[0:begidx], error=False) if len(args) == 1: data = [str(i) for i in range(0,20)] return self.list_completion(text, data, line) - + if line.endswith('run=') and not text: return ['parton','pythia','pgs','delphes'] elif '--laststep=' in line.split()[-1] and line and line[-1] != ' ': return self.list_completion(text,['parton','pythia','pgs','delphes'],line) - + opts = self._run_options + self._generate_options return self.list_completion(text, opts, line) - - - + + + if line.endswith('nb_core=') and not text: import multiprocessing max = multiprocessing.cpu_count() return [str(i) for i in range(2,max+1)] opts = self._run_options + self._generate_options return self.list_completion(text, opts, line) - + def complete_plot(self, text, line, begidx, endidx): """ Complete the plot command """ - + args = self.split_arg(line[0:begidx], error=False) if len(args) > 1: return self.list_completion(text, self._plot_mode) else: return self.list_completion(text, self._plot_mode + list(self.results.keys())) - + def complete_syscalc(self, text, line, begidx, endidx, formatting=True): """ Complete the syscalc command """ - + output = {} args = self.split_arg(line[0:begidx], error=False) - + if len(args) <=1: output['RUN_NAME'] = self.list_completion(list(self.results.keys())) output['MODE'] = self.list_completion(text, self._syscalc_mode) @@ -1907,12 +1907,12 @@ def complete_syscalc(self, text, line, begidx, endidx, formatting=True): if run in self.results: tags = ['--tag=%s' % tag['tag'] for tag in self.results[run]] output['options'] += tags - + return self.deal_multiple_categories(output, formatting) - + def complete_remove(self, text, line, begidx, endidx): """Complete the remove command """ - + args = self.split_arg(line[0:begidx], error=False) if len(args) > 1 and (text.startswith('--t')): run = args[1] @@ -1932,8 +1932,8 @@ def complete_remove(self, text, line, begidx, endidx): data = misc.glob(pjoin('*','*_banner.txt'), pjoin(self.me_dir, 'Events')) data = [n.rsplit('/',2)[1] for n in data] return self.list_completion(text, ['all'] + data) - - + + def complete_shower(self,text, line, begidx, endidx): "Complete the shower command" args = self.split_arg(line[0:begidx], error=False) @@ -1941,7 +1941,7 @@ def complete_shower(self,text, line, begidx, endidx): return self.list_completion(text, self._interfaced_showers) elif len(args)>1 and args[1] in self._interfaced_showers: return getattr(self, 'complete_%s' % text)\ - (text, args[1],line.replace(args[0]+' ',''), + (text, args[1],line.replace(args[0]+' ',''), begidx-len(args[0])-1, endidx-len(args[0])-1) def complete_pythia8(self,text, line, begidx, endidx): @@ -1955,11 +1955,11 @@ def complete_pythia8(self,text, line, begidx, endidx): if not self.run_name: return tmp1 else: - tmp2 = self.list_completion(text, self._run_options + ['-f', + tmp2 = self.list_completion(text, self._run_options + ['-f', '--no_default', '--tag='], line) return tmp1 + tmp2 elif line[-1] != '=': - return self.list_completion(text, self._run_options + ['-f', + return self.list_completion(text, self._run_options + ['-f', '--no_default','--tag='], line) def complete_madanalysis5_parton(self,text, line, begidx, endidx): @@ -1978,19 +1978,19 @@ def complete_madanalysis5_parton(self,text, line, begidx, endidx): else: tmp2 = self.list_completion(text, ['-f', '--MA5_stdout_lvl=','--no_default','--tag='], line) - return tmp1 + tmp2 + return tmp1 + tmp2 elif '--MA5_stdout_lvl=' in line and not any(arg.startswith( '--MA5_stdout_lvl=') for arg in args): - return self.list_completion(text, - ['--MA5_stdout_lvl=%s'%opt for opt in + return self.list_completion(text, + ['--MA5_stdout_lvl=%s'%opt for opt in ['logging.INFO','logging.DEBUG','logging.WARNING', 'logging.CRITICAL','90']], line) else: - return self.list_completion(text, ['-f', + return self.list_completion(text, ['-f', '--MA5_stdout_lvl=','--no_default','--tag='], line) def complete_pythia(self,text, line, begidx, endidx): - "Complete the pythia command" + "Complete the pythia command" args = self.split_arg(line[0:begidx], error=False) if len(args) == 1: @@ -2001,16 +2001,16 @@ def complete_pythia(self,text, line, begidx, endidx): if not self.run_name: return tmp1 else: - tmp2 = self.list_completion(text, self._run_options + ['-f', + tmp2 = self.list_completion(text, self._run_options + ['-f', '--no_default', '--tag='], line) return tmp1 + tmp2 elif line[-1] != '=': - return self.list_completion(text, self._run_options + ['-f', + return self.list_completion(text, self._run_options + ['-f', '--no_default','--tag='], line) def complete_pgs(self,text, line, begidx, endidx): "Complete the pythia command" - args = self.split_arg(line[0:begidx], error=False) + args = self.split_arg(line[0:begidx], error=False) if len(args) == 1: #return valid run_name data = misc.glob(pjoin('*', '*_pythia_events.hep.gz'), pjoin(self.me_dir, 'Events')) @@ -2019,23 +2019,23 @@ def complete_pgs(self,text, line, begidx, endidx): if not self.run_name: return tmp1 else: - tmp2 = self.list_completion(text, self._run_options + ['-f', + tmp2 = self.list_completion(text, self._run_options + ['-f', '--tag=' ,'--no_default'], line) - return tmp1 + tmp2 + return tmp1 + tmp2 else: - return self.list_completion(text, self._run_options + ['-f', + return self.list_completion(text, self._run_options + ['-f', '--tag=','--no_default'], line) - complete_delphes = complete_pgs - complete_rivet = complete_pgs + complete_delphes = complete_pgs + complete_rivet = complete_pgs #=============================================================================== # MadEventCmd #=============================================================================== class MadEventCmd(CompleteForCmd, CmdExtended, HelpToCmd, common_run.CommonRunCmd): - """The command line processor of Mad Graph""" - + """The command line processor of Mad Graph""" + LO = True # Truth values @@ -2063,7 +2063,7 @@ class MadEventCmd(CompleteForCmd, CmdExtended, HelpToCmd, common_run.CommonRunCm cluster_mode = 0 queue = 'madgraph' nb_core = None - + next_possibility = { 'start': ['generate_events [OPTIONS]', 'multi_run [OPTIONS]', 'calculate_decay_widths [OPTIONS]', @@ -2080,9 +2080,9 @@ class MadEventCmd(CompleteForCmd, CmdExtended, HelpToCmd, common_run.CommonRunCm 'pgs': ['generate_events [OPTIONS]', 'multi_run [OPTIONS]'], 'delphes' : ['generate_events [OPTIONS]', 'multi_run [OPTIONS]'] } - + asking_for_run = AskRun - + ############################################################################ def __init__(self, me_dir = None, options={}, *completekey, **stdin): """ add information to the cmd """ @@ -2095,16 +2095,16 @@ def __init__(self, me_dir = None, options={}, *completekey, **stdin): if self.web: os.system('touch %s' % pjoin(self.me_dir,'Online')) - self.load_results_db() + self.load_results_db() self.results.def_web_mode(self.web) self.Gdirs = None - + self.prompt = "%s>"%os.path.basename(pjoin(self.me_dir)) self.configured = 0 # time for reading the card self._options = {} # for compatibility with extended_cmd - - + + def pass_in_web_mode(self): """configure web data""" self.web = True @@ -2113,22 +2113,22 @@ def pass_in_web_mode(self): if os.environ['MADGRAPH_BASE']: self.options['mg5_path'] = pjoin(os.environ['MADGRAPH_BASE'],'MG5') - ############################################################################ + ############################################################################ def check_output_type(self, path): """ Check that the output path is a valid madevent directory """ - + bin_path = os.path.join(path,'bin') if os.path.isfile(os.path.join(bin_path,'generate_events')): return True - else: + else: return False ############################################################################ def set_configuration(self, amcatnlo=False, final=True, **opt): - """assign all configuration variable from file + """assign all configuration variable from file loop over the different config file if config_file not define """ - - super(MadEventCmd,self).set_configuration(amcatnlo=amcatnlo, + + super(MadEventCmd,self).set_configuration(amcatnlo=amcatnlo, final=final, **opt) if not final: @@ -2171,24 +2171,24 @@ def set_configuration(self, amcatnlo=False, final=True, **opt): if not os.path.exists(pjoin(path, 'sys_calc')): logger.info("No valid SysCalc path found") continue - # No else since the next line reinitialize the option to the + # No else since the next line reinitialize the option to the #previous value anyway self.options[key] = os.path.realpath(path) continue else: self.options[key] = None - - + + return self.options ############################################################################ - def do_banner_run(self, line): + def do_banner_run(self, line): """Make a run from the banner file""" - + args = self.split_arg(line) #check the validity of the arguments - self.check_banner_run(args) - + self.check_banner_run(args) + # Remove previous cards for name in ['delphes_trigger.dat', 'delphes_card.dat', 'pgs_card.dat', 'pythia_card.dat', 'madspin_card.dat', @@ -2197,20 +2197,20 @@ def do_banner_run(self, line): os.remove(pjoin(self.me_dir, 'Cards', name)) except Exception: pass - + banner_mod.split_banner(args[0], self.me_dir, proc_card=False) - + # Check if we want to modify the run if not self.force: ans = self.ask('Do you want to modify the Cards?', 'n', ['y','n']) if ans == 'n': self.force = True - + # Call Generate events self.exec_cmd('generate_events %s %s' % (self.run_name, self.force and '-f' or '')) - - - + + + ############################################################################ def do_display(self, line, output=sys.stdout): """Display current internal status""" @@ -2223,7 +2223,7 @@ def do_display(self, line, output=sys.stdout): #return valid run_name data = misc.glob(pjoin('*','*_banner.txt'), pjoin(self.me_dir, 'Events')) data = [n.rsplit('/',2)[1:] for n in data] - + if data: out = {} for name, tag in data: @@ -2235,11 +2235,11 @@ def do_display(self, line, output=sys.stdout): print('the runs available are:') for run_name, tags in out.items(): print(' run: %s' % run_name) - print(' tags: ', end=' ') + print(' tags: ', end=' ') print(', '.join(tags)) else: print('No run detected.') - + elif args[0] == 'options': outstr = " Run Options \n" outstr += " ----------- \n" @@ -2260,8 +2260,8 @@ def do_display(self, line, output=sys.stdout): if value == default: outstr += " %25s \t:\t%s\n" % (key,value) else: - outstr += " %25s \t:\t%s (user set)\n" % (key,value) - outstr += "\n" + outstr += " %25s \t:\t%s (user set)\n" % (key,value) + outstr += "\n" outstr += " Configuration Options \n" outstr += " --------------------- \n" for key, default in self.options_configuration.items(): @@ -2275,15 +2275,15 @@ def do_display(self, line, output=sys.stdout): self.do_print_results(' '.join(args[1:])) else: super(MadEventCmd, self).do_display(line, output) - + def do_save(self, line, check=True, to_keep={}): - """Not in help: Save information to file""" + """Not in help: Save information to file""" args = self.split_arg(line) # Check argument validity if check: self.check_save(args) - + if args[0] == 'options': # First look at options which should be put in MG5DIR/input to_define = {} @@ -2295,7 +2295,7 @@ def do_save(self, line, check=True, to_keep={}): for key, default in self.options_madevent.items(): if self.options[key] != self.options_madevent[key]: to_define[key] = self.options[key] - + if '--all' in args: for key, default in self.options_madgraph.items(): if self.options[key] != self.options_madgraph[key]: @@ -2312,12 +2312,12 @@ def do_save(self, line, check=True, to_keep={}): filepath = pjoin(self.me_dir, 'Cards', 'me5_configuration.txt') basefile = pjoin(self.me_dir, 'Cards', 'me5_configuration.txt') basedir = self.me_dir - + if to_keep: to_define = to_keep self.write_configuration(filepath, basefile, basedir, to_define) - - + + def do_edit_cards(self, line): @@ -2326,80 +2326,80 @@ def do_edit_cards(self, line): # Check argument's validity mode = self.check_generate_events(args) self.ask_run_configuration(mode) - + return ############################################################################ - + ############################################################################ def do_restart_gridpack(self, line): """ syntax restart_gridpack --precision=1.0 --restart_zero collect the result of the current run and relaunch each channel - not completed or optionally a completed one with a precision worse than + not completed or optionally a completed one with a precision worse than a threshold (and/or the zero result channel)""" - - + + args = self.split_arg(line) # Check argument's validity self.check_survey(args) - + # initialize / remove lhapdf mode #self.run_card = banner_mod.RunCard(pjoin(self.me_dir, 'Cards', 'run_card.dat')) #self.configure_directory() - + gensym = gen_ximprove.gensym(self) - + min_precision = 1.0 resubmit_zero=False if '--precision=' in line: s = line.index('--precision=') + len('--precision=') arg=line[s:].split(1)[0] min_precision = float(arg) - + if '--restart_zero' in line: resubmit_zero = True - - + + gensym.resubmit(min_precision, resubmit_zero) self.monitor(run_type='All jobs submitted for gridpack', html=True) #will be done during the refine (more precisely in gen_ximprove) cross, error = sum_html.make_all_html_results(self) self.results.add_detail('cross', cross) - self.results.add_detail('error', error) + self.results.add_detail('error', error) self.exec_cmd("print_results %s" % self.run_name, - errorhandling=False, printcmd=False, precmd=False, postcmd=False) - + errorhandling=False, printcmd=False, precmd=False, postcmd=False) + self.results.add_detail('run_statistics', dict(gensym.run_statistics)) - + #self.exec_cmd('combine_events', postcmd=False) #self.exec_cmd('store_events', postcmd=False) self.exec_cmd('decay_events -from_cards', postcmd=False) self.exec_cmd('create_gridpack', postcmd=False) - - - ############################################################################ + + + ############################################################################ ############################################################################ def do_generate_events(self, line): """Main Commands: launch the full chain """ - + self.banner = None self.Gdirs = None - + args = self.split_arg(line) # Check argument's validity mode = self.check_generate_events(args) switch_mode = self.ask_run_configuration(mode, args) if not args: - # No run name assigned -> assigned one automaticaly + # No run name assigned -> assigned one automaticaly self.set_run_name(self.find_available_run_name(self.me_dir), None, 'parton') else: self.set_run_name(args[0], None, 'parton', True) args.pop(0) - + self.run_generate_events(switch_mode, args) self.postprocessing() @@ -2420,8 +2420,8 @@ def postprocessing(self): def rivet_postprocessing(self, rivet_config, postprocess_RIVET, postprocess_CONTUR): - # Check number of Rivet jobs to run - run_dirs = [pjoin(self.me_dir, 'Events',run_name) + # Check number of Rivet jobs to run + run_dirs = [pjoin(self.me_dir, 'Events',run_name) for run_name in self.postprocessing_dirs] nb_rivet = len(run_dirs) @@ -2550,10 +2550,10 @@ def wait_monitoring(Idle, Running, Done): wrapper = open(pjoin(self.me_dir, "Analysis", "contur", "run_contur.sh"), "w") wrapper.write(set_env) - + wrapper.write('{0}\n'.format(contur_cmd)) wrapper.close() - + misc.call(["run_contur.sh"], cwd=(pjoin(self.me_dir, "Analysis", "contur"))) logger.info("Contur outputs are stored in {0}".format(pjoin(self.me_dir, "Analysis", "contur","conturPlot"))) @@ -2572,7 +2572,7 @@ def run_generate_events(self, switch_mode, args): self.do_set('run_mode 2') self.do_set('nb_core 1') - if self.run_card['gridpack'] in self.true: + if self.run_card['gridpack'] in self.true: # Running gridpack warmup gridpack_opts=[('accuracy', 0.01), ('points', 2000), @@ -2593,7 +2593,7 @@ def run_generate_events(self, switch_mode, args): # Regular run mode logger.info('Generating %s events with run name %s' % (self.run_card['nevents'], self.run_name)) - + self.exec_cmd('survey %s %s' % (self.run_name,' '.join(args)), postcmd=False) nb_event = self.run_card['nevents'] @@ -2601,7 +2601,7 @@ def run_generate_events(self, switch_mode, args): self.exec_cmd('refine %s' % nb_event, postcmd=False) if not float(self.results.current['cross']): # Zero cross-section. Try to guess why - text = '''Survey return zero cross section. + text = '''Survey return zero cross section. Typical reasons are the following: 1) A massive s-channel particle has a width set to zero. 2) The pdf are zero for at least one of the initial state particles @@ -2613,17 +2613,17 @@ def run_generate_events(self, switch_mode, args): raise ZeroResult('See https://cp3.irmp.ucl.ac.be/projects/madgraph/wiki/FAQ-General-14') else: bypass_run = True - + #we can bypass the following if scan and first result is zero if not bypass_run: self.exec_cmd('refine %s --treshold=%s' % (nb_event,self.run_card['second_refine_treshold']) , postcmd=False) - + self.exec_cmd('combine_events', postcmd=False,printcmd=False) self.print_results_in_shell(self.results.current) if self.run_card['use_syst']: - if self.run_card['systematics_program'] == 'auto': + if self.run_card['systematics_program'] == 'auto': scdir = self.options['syscalc_path'] if not scdir or not os.path.exists(scdir): to_use = 'systematics' @@ -2634,26 +2634,26 @@ def run_generate_events(self, switch_mode, args): else: logger.critical('Unvalid options for systematics_program: bypass computation of systematics variations.') to_use = 'none' - + if to_use == 'systematics': if self.run_card['systematics_arguments'] != ['']: self.exec_cmd('systematics %s %s ' % (self.run_name, - ' '.join(self.run_card['systematics_arguments'])), + ' '.join(self.run_card['systematics_arguments'])), postcmd=False, printcmd=False) else: self.exec_cmd('systematics %s --from_card' % self.run_name, - postcmd=False,printcmd=False) + postcmd=False,printcmd=False) elif to_use == 'syscalc': self.run_syscalc('parton') - - - self.create_plot('parton') - self.exec_cmd('store_events', postcmd=False) + + + self.create_plot('parton') + self.exec_cmd('store_events', postcmd=False) if self.run_card['boost_event'].strip() and self.run_card['boost_event'] != 'False': self.boost_events() - - - self.exec_cmd('reweight -from_cards', postcmd=False) + + + self.exec_cmd('reweight -from_cards', postcmd=False) self.exec_cmd('decay_events -from_cards', postcmd=False) if self.run_card['time_of_flight']>=0: self.exec_cmd("add_time_of_flight --threshold=%s" % self.run_card['time_of_flight'] ,postcmd=False) @@ -2664,43 +2664,43 @@ def run_generate_events(self, switch_mode, args): self.create_root_file(input , output) self.exec_cmd('madanalysis5_parton --no_default', postcmd=False, printcmd=False) - # shower launches pgs/delphes if needed + # shower launches pgs/delphes if needed self.exec_cmd('shower --no_default', postcmd=False, printcmd=False) self.exec_cmd('madanalysis5_hadron --no_default', postcmd=False, printcmd=False) self.exec_cmd('rivet --no_default', postcmd=False, printcmd=False) self.store_result() - - if self.allow_notification_center: - misc.system_notify('Run %s finished' % os.path.basename(self.me_dir), - '%s: %s +- %s ' % (self.results.current['run_name'], + + if self.allow_notification_center: + misc.system_notify('Run %s finished' % os.path.basename(self.me_dir), + '%s: %s +- %s ' % (self.results.current['run_name'], self.results.current['cross'], self.results.current['error'])) - + def boost_events(self): - + if not self.run_card['boost_event']: return - + if self.run_card['boost_event'].startswith('lambda'): if not isinstance(self, cmd.CmdShell): raise Exception("boost not allowed online") filter = eval(self.run_card['boost_event']) else: raise Exception - + path = [pjoin(self.me_dir, 'Events', self.run_name, 'unweighted_events.lhe.gz'), pjoin(self.me_dir, 'Events', self.run_name, 'unweighted_events.lhe'), pjoin(self.me_dir, 'Events', self.run_name, 'events.lhe.gz'), pjoin(self.me_dir, 'Events', self.run_name, 'events.lhe')] - + for p in path: if os.path.exists(p): event_path = p break else: raise Exception("fail to find event file for the boost") - - + + lhe = lhe_parser.EventFile(event_path) with misc.TMP_directory() as tmp_dir: output = lhe_parser.EventFile(pjoin(tmp_dir, os.path.basename(event_path)), 'w') @@ -2711,28 +2711,28 @@ def boost_events(self): event.boost(filter) #write this modify event output.write(str(event)) - output.write('\n') + output.write('\n') lhe.close() - files.mv(pjoin(tmp_dir, os.path.basename(event_path)), event_path) - - - - - + files.mv(pjoin(tmp_dir, os.path.basename(event_path)), event_path) + + + + + def do_initMadLoop(self,line): - """Compile and run MadLoop for a certain number of PS point so as to + """Compile and run MadLoop for a certain number of PS point so as to initialize MadLoop (setup the zero helicity and loop filter.)""" - + args = line.split() # Check argument's validity options = self.check_initMadLoop(args) - + if not options['force']: self.ask_edit_cards(['MadLoopParams.dat'], mode='fixed', plot=False) self.exec_cmd('treatcards loop --no_MadLoopInit') if options['refresh']: - for filter in misc.glob('*Filter*', + for filter in misc.glob('*Filter*', pjoin(self.me_dir,'SubProcesses','MadLoop5_resources')): logger.debug("Resetting filter '%s'."%os.path.basename(filter)) os.remove(filter) @@ -2753,14 +2753,14 @@ def do_initMadLoop(self,line): def do_launch(self, line, *args, **opt): """Main Commands: exec generate_events for 2>N and calculate_width for 1>N""" - + if self.ninitial == 1: logger.info("Note that since 2.3. The launch for 1>N pass in event generation\n"+ " To have the previous behavior use the calculate_decay_widths function") # self.do_calculate_decay_widths(line, *args, **opt) #else: self.do_generate_events(line, *args, **opt) - + def print_results_in_shell(self, data): """Have a nice results prints in the shell, data should be of type: gen_crossxhtml.OneTagResults""" @@ -2770,7 +2770,7 @@ def print_results_in_shell(self, data): if data['run_statistics']: globalstat = sum_html.RunStatistics() - + logger.info(" " ) logger.debug(" === Run statistics summary ===") for key, value in data['run_statistics'].items(): @@ -2786,13 +2786,13 @@ def print_results_in_shell(self, data): logger.warning(globalstat.get_warning_text()) logger.info(" ") - + logger.info(" === Results Summary for run: %s tag: %s ===\n" % (data['run_name'],data['tag'])) - + total_time = int(sum(_['cumulative_timing'] for _ in data['run_statistics'].values())) if total_time > 0: logger.info(" Cumulative sequential time for this run: %s"%misc.format_time(total_time)) - + if self.ninitial == 1: logger.info(" Width : %.4g +- %.4g GeV" % (data['cross'], data['error'])) else: @@ -2810,18 +2810,18 @@ def print_results_in_shell(self, data): if len(split)!=3: continue scale, cross, error = split - cross_sections[float(scale)] = (float(cross), float(error)) + cross_sections[float(scale)] = (float(cross), float(error)) if len(cross_sections)>0: logger.info(' Pythia8 merged cross-sections are:') for scale in sorted(cross_sections.keys()): logger.info(' > Merging scale = %-6.4g : %-11.5g +/- %-7.2g [pb]'%\ (scale,cross_sections[scale][0],cross_sections[scale][1])) - + else: if self.ninitial == 1: logger.info(" Matched width : %.4g +- %.4g GeV" % (data['cross_pythia'], data['error_pythia'])) else: - logger.info(" Matched cross-section : %.4g +- %.4g pb" % (data['cross_pythia'], data['error_pythia'])) + logger.info(" Matched cross-section : %.4g +- %.4g pb" % (data['cross_pythia'], data['error_pythia'])) logger.info(" Nb of events after matching/merging : %d" % int(data['nb_event_pythia'])) if self.run_card['use_syst'] in self.true and \ (int(self.run_card['ickkw'])==1 or self.run_card['ktdurham']>0.0 @@ -2838,9 +2838,9 @@ def print_results_in_file(self, data, path, mode='w', format='full'): data should be of type: gen_crossxhtml.OneTagResults""" if not data: return - + fsock = open(path, mode) - + if data['run_statistics']: logger.debug(" === Run statistics summary ===") for key, value in data['run_statistics'].items(): @@ -2851,7 +2851,7 @@ def print_results_in_file(self, data, path, mode='w', format='full'): if format == "full": fsock.write(" === Results Summary for run: %s tag: %s process: %s ===\n" % \ (data['run_name'],data['tag'], os.path.basename(self.me_dir))) - + if self.ninitial == 1: fsock.write(" Width : %.4g +- %.4g GeV\n" % (data['cross'], data['error'])) else: @@ -2861,20 +2861,20 @@ def print_results_in_file(self, data, path, mode='w', format='full'): if self.ninitial == 1: fsock.write(" Matched Width : %.4g +- %.4g GeV\n" % (data['cross_pythia'], data['error_pythia'])) else: - fsock.write(" Matched Cross-section : %.4g +- %.4g pb\n" % (data['cross_pythia'], data['error_pythia'])) + fsock.write(" Matched Cross-section : %.4g +- %.4g pb\n" % (data['cross_pythia'], data['error_pythia'])) fsock.write(" Nb of events after Matching : %s\n" % data['nb_event_pythia']) fsock.write(" \n" ) elif format == "short": if mode == "w": fsock.write("# run_name tag cross error Nb_event cross_after_matching nb_event_after matching\n") - + if data['cross_pythia'] and data['nb_event_pythia']: text = "%(run_name)s %(tag)s %(cross)s %(error)s %(nb_event)s %(cross_pythia)s %(nb_event_pythia)s\n" else: text = "%(run_name)s %(tag)s %(cross)s %(error)s %(nb_event)s\n" fsock.write(text % data) - - ############################################################################ + + ############################################################################ def do_calculate_decay_widths(self, line): """Main Commands: launch decay width calculation and automatic inclusion of calculated widths and BRs in the param_card.""" @@ -2887,21 +2887,21 @@ def do_calculate_decay_widths(self, line): self.Gdirs = None if not args: - # No run name assigned -> assigned one automaticaly + # No run name assigned -> assigned one automaticaly self.set_run_name(self.find_available_run_name(self.me_dir)) else: self.set_run_name(args[0], reload_card=True) args.pop(0) self.configure_directory() - + # Running gridpack warmup opts=[('accuracy', accuracy), # default 0.01 ('points', 1000), ('iterations',9)] logger.info('Calculating decay widths with run name %s' % self.run_name) - + self.exec_cmd('survey %s %s' % \ (self.run_name, " ".join(['--' + opt + '=' + str(val) for (opt,val) \ @@ -2910,26 +2910,26 @@ def do_calculate_decay_widths(self, line): self.refine_mode = "old" # specify how to combine event self.exec_cmd('combine_events', postcmd=False) self.exec_cmd('store_events', postcmd=False) - + self.collect_decay_widths() self.print_results_in_shell(self.results.current) - self.update_status('calculate_decay_widths done', - level='parton', makehtml=False) + self.update_status('calculate_decay_widths done', + level='parton', makehtml=False) + - ############################################################################ def collect_decay_widths(self): - """ Collect the decay widths and calculate BRs for all particles, and put - in param_card form. + """ Collect the decay widths and calculate BRs for all particles, and put + in param_card form. """ - + particle_dict = {} # store the results run_name = self.run_name # Looping over the Subprocesses for P_path in SubProcesses.get_subP(self.me_dir): ids = SubProcesses.get_subP_ids(P_path) - # due to grouping we need to compute the ratio factor for the + # due to grouping we need to compute the ratio factor for the # ungroup resutls (that we need here). Note that initial particles # grouping are not at the same stage as final particle grouping nb_output = len(ids) / (len(set([p[0] for p in ids]))) @@ -2940,30 +2940,30 @@ def collect_decay_widths(self): particle_dict[particles[0]].append([particles[1:], result/nb_output]) except KeyError: particle_dict[particles[0]] = [[particles[1:], result/nb_output]] - + self.update_width_in_param_card(particle_dict, initial = pjoin(self.me_dir, 'Cards', 'param_card.dat'), output=pjoin(self.me_dir, 'Events', run_name, "param_card.dat")) - + @staticmethod def update_width_in_param_card(decay_info, initial=None, output=None): # Open the param_card.dat and insert the calculated decays and BRs - + if not output: output = initial - + param_card_file = open(initial) param_card = param_card_file.read().split('\n') param_card_file.close() decay_lines = [] line_number = 0 - # Read and remove all decays from the param_card + # Read and remove all decays from the param_card while line_number < len(param_card): line = param_card[line_number] if line.lower().startswith('decay'): - # Read decay if particle in decay_info - # DECAY 6 1.455100e+00 + # Read decay if particle in decay_info + # DECAY 6 1.455100e+00 line = param_card.pop(line_number) line = line.split() particle = 0 @@ -2996,7 +2996,7 @@ def update_width_in_param_card(decay_info, initial=None, output=None): break line=param_card[line_number] if particle and particle not in decay_info: - # No decays given, only total width + # No decays given, only total width decay_info[particle] = [[[], width]] else: # Not decay line_number += 1 @@ -3004,7 +3004,7 @@ def update_width_in_param_card(decay_info, initial=None, output=None): while not param_card[-1] or param_card[-1].startswith('#'): param_card.pop(-1) - # Append calculated and read decays to the param_card + # Append calculated and read decays to the param_card param_card.append("#\n#*************************") param_card.append("# Decay widths *") param_card.append("#*************************") @@ -3018,7 +3018,7 @@ def update_width_in_param_card(decay_info, initial=None, output=None): param_card.append("# BR NDA ID1 ID2 ...") brs = [[(val[1]/width).real, val[0]] for val in decay_info[key] if val[1]] for val in sorted(brs, reverse=True): - param_card.append(" %e %i %s # %s" % + param_card.append(" %e %i %s # %s" % (val[0].real, len(val[1]), " ".join([str(v) for v in val[1]]), val[0] * width @@ -3031,7 +3031,7 @@ def update_width_in_param_card(decay_info, initial=None, output=None): ############################################################################ def do_multi_run(self, line): - + args = self.split_arg(line) # Check argument's validity mode = self.check_multi_run(args) @@ -3047,7 +3047,7 @@ def do_multi_run(self, line): self.check_param_card(path, run=False) #store it locally to avoid relaunch param_card_iterator, self.param_card_iterator = self.param_card_iterator, [] - + crossoversig = 0 inv_sq_err = 0 nb_event = 0 @@ -3055,8 +3055,8 @@ def do_multi_run(self, line): self.nb_refine = 0 self.exec_cmd('generate_events %s_%s -f' % (main_name, i), postcmd=False) # Update collected value - nb_event += int(self.results[self.run_name][-1]['nb_event']) - self.results.add_detail('nb_event', nb_event , run=main_name) + nb_event += int(self.results[self.run_name][-1]['nb_event']) + self.results.add_detail('nb_event', nb_event , run=main_name) cross = self.results[self.run_name][-1]['cross'] error = self.results[self.run_name][-1]['error'] + 1e-99 crossoversig+=cross/error**2 @@ -3070,7 +3070,7 @@ def do_multi_run(self, line): os.mkdir(pjoin(self.me_dir,'Events', self.run_name)) except Exception: pass - os.system('%(bin)s/merge.pl %(event)s/%(name)s_*/unweighted_events.lhe.gz %(event)s/%(name)s/unweighted_events.lhe.gz %(event)s/%(name)s_banner.txt' + os.system('%(bin)s/merge.pl %(event)s/%(name)s_*/unweighted_events.lhe.gz %(event)s/%(name)s/unweighted_events.lhe.gz %(event)s/%(name)s_banner.txt' % {'bin': self.dirbin, 'event': pjoin(self.me_dir,'Events'), 'name': self.run_name}) @@ -3084,19 +3084,19 @@ def do_multi_run(self, line): self.create_root_file('%s/unweighted_events.lhe' % self.run_name, '%s/unweighted_events.root' % self.run_name) - - path = pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe") + + path = pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe") self.create_plot('parton', path, pjoin(self.me_dir, 'HTML',self.run_name, 'plots_parton.html') ) - - if not os.path.exists('%s.gz' % path): + + if not os.path.exists('%s.gz' % path): misc.gzip(path) self.update_status('', level='parton') - self.print_results_in_shell(self.results.current) - + self.print_results_in_shell(self.results.current) + cpath = pjoin(self.me_dir,'Cards','param_card.dat') if param_card_iterator: @@ -3112,21 +3112,21 @@ def do_multi_run(self, line): path = pjoin(self.me_dir, 'Events','scan_%s.txt' % scan_name) logger.info("write all cross-section results in %s" % path, '$MG:BOLD') param_card_iterator.write_summary(path) - - ############################################################################ + + ############################################################################ def do_treatcards(self, line, mode=None, opt=None): """Advanced commands: create .inc files from param_card.dat/run_card.dat""" if not mode and not opt: args = self.split_arg(line) mode, opt = self.check_treatcards(args) - + # To decide whether to refresh MadLoop's helicity filters, it is necessary # to check if the model parameters where modified or not, before doing - # anything else. + # anything else. need_MadLoopFilterUpdate = False - # Just to record what triggered the reinitialization of MadLoop for a + # Just to record what triggered the reinitialization of MadLoop for a # nice debug message. type_of_change = '' if not opt['forbid_MadLoopInit'] and self.proc_characteristics['loop_induced'] \ @@ -3137,10 +3137,10 @@ def do_treatcards(self, line, mode=None, opt=None): (os.path.getmtime(paramDat)-os.path.getmtime(paramInc)) > 0.0: need_MadLoopFilterUpdate = True type_of_change = 'model' - + ML_in = pjoin(self.me_dir, 'Cards', 'MadLoopParams.dat') ML_out = pjoin(self.me_dir,"SubProcesses", - "MadLoop5_resources", "MadLoopParams.dat") + "MadLoop5_resources", "MadLoopParams.dat") if (not os.path.isfile(ML_in)) or (not os.path.isfile(ML_out)) or \ (os.path.getmtime(ML_in)-os.path.getmtime(ML_out)) > 0.0: need_MadLoopFilterUpdate = True @@ -3148,7 +3148,7 @@ def do_treatcards(self, line, mode=None, opt=None): #check if no 'Auto' are present in the file self.check_param_card(pjoin(self.me_dir, 'Cards','param_card.dat')) - + if mode in ['param', 'all']: model = self.find_model_name() tmp_model = os.path.basename(model) @@ -3160,9 +3160,9 @@ def do_treatcards(self, line, mode=None, opt=None): check_param_card.check_valid_param_card(mg5_param) opt['param_card'] = pjoin(self.me_dir, 'Source', 'MODEL', 'MG5_param.dat') else: - check_param_card.check_valid_param_card(opt['param_card']) - - logger.debug('write compile file for card: %s' % opt['param_card']) + check_param_card.check_valid_param_card(opt['param_card']) + + logger.debug('write compile file for card: %s' % opt['param_card']) param_card = check_param_card.ParamCard(opt['param_card']) outfile = pjoin(opt['output_dir'], 'param_card.inc') ident_card = pjoin(self.me_dir,'Cards','ident_card.dat') @@ -3185,10 +3185,10 @@ def do_treatcards(self, line, mode=None, opt=None): devnull.close() default = pjoin(self.me_dir,'bin','internal','ufomodel','param_card.dat') - need_mp = self.proc_characteristics['loop_induced'] + need_mp = self.proc_characteristics['loop_induced'] param_card.write_inc_file(outfile, ident_card, default, need_mp=need_mp) - - + + if mode in ['run', 'all']: if not hasattr(self, 'run_card'): run_card = banner_mod.RunCard(opt['run_card'], path=pjoin(self.me_dir, 'Cards', 'run_card.dat')) @@ -3202,7 +3202,7 @@ def do_treatcards(self, line, mode=None, opt=None): run_card['lpp2'] = 0 run_card['ebeam1'] = 0 run_card['ebeam2'] = 0 - + # Ensure that the bias parameters has all the required input from the # run_card if run_card['bias_module'].lower() not in ['dummy','none']: @@ -3219,7 +3219,7 @@ def do_treatcards(self, line, mode=None, opt=None): mandatory_file,run_card['bias_module'])) misc.copytree(run_card['bias_module'], pjoin(self.me_dir,'Source','BIAS', os.path.basename(run_card['bias_module']))) - + #check expected parameters for the module. default_bias_parameters = {} start, last = False,False @@ -3244,50 +3244,50 @@ def do_treatcards(self, line, mode=None, opt=None): for pair in line.split(','): if not pair.strip(): continue - x,y =pair.split(':') + x,y =pair.split(':') x=x.strip() if x.startswith(('"',"'")) and x.endswith(x[0]): - x = x[1:-1] + x = x[1:-1] default_bias_parameters[x] = y elif ':' in line: x,y = line.split(':') x = x.strip() if x.startswith(('"',"'")) and x.endswith(x[0]): - x = x[1:-1] + x = x[1:-1] default_bias_parameters[x] = y for key,value in run_card['bias_parameters'].items(): if key not in default_bias_parameters: logger.warning('%s not supported by the bias module. We discard this entry.', key) else: default_bias_parameters[key] = value - run_card['bias_parameters'] = default_bias_parameters - - - # Finally write the include file + run_card['bias_parameters'] = default_bias_parameters + + + # Finally write the include file run_card.write_include_file(opt['output_dir']) - + if self.proc_characteristics['loop_induced'] and mode in ['loop', 'all']: - self.MadLoopparam = banner_mod.MadLoopParam(pjoin(self.me_dir, + self.MadLoopparam = banner_mod.MadLoopParam(pjoin(self.me_dir, 'Cards', 'MadLoopParams.dat')) # The writing out of MadLoop filter is potentially dangerous # when running in multi-core with a central disk. So it is turned - # off here. If these filters were not initialized then they will + # off here. If these filters were not initialized then they will # have to be re-computed at the beginning of each run. if 'WriteOutFilters' in self.MadLoopparam.user_set and \ self.MadLoopparam.get('WriteOutFilters'): logger.info( -"""You chose to have MadLoop writing out filters. +"""You chose to have MadLoop writing out filters. Beware that this can be dangerous for local multicore runs.""") self.MadLoopparam.set('WriteOutFilters',False, changeifuserset=False) - + # The conservative settings below for 'CTModeInit' and 'ZeroThres' # help adress issues for processes like g g > h z, and g g > h g - # where there are some helicity configuration heavily suppressed - # (by several orders of magnitude) so that the helicity filter + # where there are some helicity configuration heavily suppressed + # (by several orders of magnitude) so that the helicity filter # needs high numerical accuracy to correctly handle this spread in # magnitude. Also, because one cannot use the Born as a reference - # scale, it is better to force quadruple precision *for the + # scale, it is better to force quadruple precision *for the # initialization points only*. This avoids numerical accuracy issues # when setting up the helicity filters and does not significantly # slow down the run. @@ -3298,21 +3298,21 @@ def do_treatcards(self, line, mode=None, opt=None): # It is a bit superficial to use the level 2 which tries to numerically # map matching helicities (because of CP symmetry typically) together. -# It is useless in the context of MC over helicities and it can +# It is useless in the context of MC over helicities and it can # potentially make the helicity double checking fail. self.MadLoopparam.set('HelicityFilterLevel',1, changeifuserset=False) # To be on the safe side however, we ask for 4 consecutive matching # helicity filters. self.MadLoopparam.set('CheckCycle',4, changeifuserset=False) - + # For now it is tricky to have each channel performing the helicity # double check. What we will end up doing is probably some kind # of new initialization round at the beginning of each launch - # command, to reset the filters. + # command, to reset the filters. self.MadLoopparam.set('DoubleCheckHelicityFilter',False, changeifuserset=False) - + # Thanks to TIR recycling, TIR is typically much faster for Loop-induced # processes when not doing MC over helicities, so that we place OPP last. if not hasattr(self, 'run_card'): @@ -3349,7 +3349,7 @@ def do_treatcards(self, line, mode=None, opt=None): logger.warning( """You chose to also use a lorentz rotation for stability tests (see parameter NRotations_[DP|QP]). Beware that, for optimization purposes, MadEvent uses manual TIR cache clearing which is not compatible - with the lorentz rotation stability test. The number of these rotations to be used will be reset to + with the lorentz rotation stability test. The number of these rotations to be used will be reset to zero by MadLoop. You can avoid this by changing the parameter 'FORCE_ML_HELICITY_SUM' int he matrix.f files to be .TRUE. so that the sum over helicity configurations is performed within MadLoop (in which case the helicity of final state particles cannot be speicfied in the LHE file.""") @@ -3363,15 +3363,15 @@ def do_treatcards(self, line, mode=None, opt=None): # self.MadLoopparam.set('NRotations_DP',0,changeifuserset=False) # Revert to the above to be slightly less robust but twice faster. self.MadLoopparam.set('NRotations_DP',1,changeifuserset=False) - self.MadLoopparam.set('NRotations_QP',0,changeifuserset=False) - + self.MadLoopparam.set('NRotations_QP',0,changeifuserset=False) + # Finally, the stability tests are slightly less reliable for process - # with less or equal than 4 final state particles because the + # with less or equal than 4 final state particles because the # accessible kinematic is very limited (i.e. lorentz rotations don't # shuffle invariants numerics much). In these cases, we therefore # increase the required accuracy to 10^-7. # This is important for getting g g > z z [QCD] working with a - # ptheavy cut as low as 1 GeV. + # ptheavy cut as low as 1 GeV. if self.proc_characteristics['nexternal']<=4: if ('MLStabThres' in self.MadLoopparam.user_set and \ self.MadLoopparam.get('MLStabThres')>1.0e-7): @@ -3381,12 +3381,12 @@ def do_treatcards(self, line, mode=None, opt=None): than four external legs, so this is not recommended (especially not for g g > z z).""") self.MadLoopparam.set('MLStabThres',1.0e-7,changeifuserset=False) else: - self.MadLoopparam.set('MLStabThres',1.0e-4,changeifuserset=False) + self.MadLoopparam.set('MLStabThres',1.0e-4,changeifuserset=False) #write the output file self.MadLoopparam.write(pjoin(self.me_dir,"SubProcesses","MadLoop5_resources", "MadLoopParams.dat")) - + if self.proc_characteristics['loop_induced'] and mode in ['loop', 'all']: # Now Update MadLoop filters if necessary (if modifications were made to # the model parameters). @@ -3403,12 +3403,12 @@ def do_treatcards(self, line, mode=None, opt=None): elif not opt['forbid_MadLoopInit'] and \ MadLoopInitializer.need_MadLoopInit(self.me_dir): self.exec_cmd('initMadLoop -f') - - ############################################################################ + + ############################################################################ def do_survey(self, line): """Advanced commands: launch survey for the current process """ - - + + args = self.split_arg(line) # Check argument's validity self.check_survey(args) @@ -3416,7 +3416,7 @@ def do_survey(self, line): if os.path.exists(pjoin(self.me_dir,'error')): os.remove(pjoin(self.me_dir,'error')) - + self.configure_directory() # Save original random number self.random_orig = self.random @@ -3435,9 +3435,9 @@ def do_survey(self, line): P_zero_result = [] # check the number of times where they are no phase-space # File for the loop (for loop induced) - if os.path.exists(pjoin(self.me_dir,'SubProcesses', + if os.path.exists(pjoin(self.me_dir,'SubProcesses', 'MadLoop5_resources')) and cluster.need_transfer(self.options): - tf=tarfile.open(pjoin(self.me_dir, 'SubProcesses', + tf=tarfile.open(pjoin(self.me_dir, 'SubProcesses', 'MadLoop5_resources.tar.gz'), 'w:gz', dereference=True) tf.add(pjoin(self.me_dir,'SubProcesses','MadLoop5_resources'), arcname='MadLoop5_resources') @@ -3467,7 +3467,7 @@ def do_survey(self, line): except Exception as error: logger.debug(error) pass - + jobs, P_zero_result = ajobcreator.launch() # Check if all or only some fails if P_zero_result: @@ -3481,60 +3481,60 @@ def do_survey(self, line): self.get_Gdir() for P in P_zero_result: self.Gdirs[0][pjoin(self.me_dir,'SubProcesses',P)] = [] - + self.monitor(run_type='All jobs submitted for survey', html=True) if not self.history or 'survey' in self.history[-1] or self.ninitial ==1 or \ self.run_card['gridpack']: #will be done during the refine (more precisely in gen_ximprove) cross, error = self.make_make_all_html_results() self.results.add_detail('cross', cross) - self.results.add_detail('error', error) + self.results.add_detail('error', error) self.exec_cmd("print_results %s" % self.run_name, - errorhandling=False, printcmd=False, precmd=False, postcmd=False) - + errorhandling=False, printcmd=False, precmd=False, postcmd=False) + self.results.add_detail('run_statistics', dict(ajobcreator.run_statistics)) self.update_status('End survey', 'parton', makehtml=False) ############################################################################ def pass_in_difficult_integration_mode(self, rate=1): """be more secure for the integration to not miss it due to strong cut""" - + # improve survey options if default if self.opts['points'] == self._survey_options['points'][1]: self.opts['points'] = (rate+2) * self._survey_options['points'][1] if self.opts['iterations'] == self._survey_options['iterations'][1]: self.opts['iterations'] = 1 + rate + self._survey_options['iterations'][1] if self.opts['accuracy'] == self._survey_options['accuracy'][1]: - self.opts['accuracy'] = self._survey_options['accuracy'][1]/(rate+2) - + self.opts['accuracy'] = self._survey_options['accuracy'][1]/(rate+2) + # Modify run_config.inc in order to improve the refine conf_path = pjoin(self.me_dir, 'Source','run_config.inc') files.cp(conf_path, conf_path + '.bk') # text = open(conf_path).read() - min_evt, max_evt = 2500 *(2+rate), 10000*(rate+1) - + min_evt, max_evt = 2500 *(2+rate), 10000*(rate+1) + text = re.sub('''\(min_events = \d+\)''', '(min_events = %i )' % min_evt, text) text = re.sub('''\(max_events = \d+\)''', '(max_events = %i )' % max_evt, text) fsock = open(conf_path, 'w') fsock.write(text) fsock.close() - + # Compile for name in ['../bin/internal/gen_ximprove', 'all']: self.compile(arg=[name], cwd=os.path.join(self.me_dir, 'Source')) - - - ############################################################################ + + + ############################################################################ def do_refine(self, line): """Advanced commands: launch survey for the current process """ - devnull = open(os.devnull, 'w') + devnull = open(os.devnull, 'w') self.nb_refine += 1 args = self.split_arg(line) treshold=None - - + + for a in args: if a.startswith('--treshold='): treshold = float(a.split('=',1)[1]) @@ -3548,8 +3548,8 @@ def do_refine(self, line): break # Check argument's validity self.check_refine(args) - - refine_opt = {'err_goal': args[0], 'split_channels': True} + + refine_opt = {'err_goal': args[0], 'split_channels': True} precision = args[0] if len(args) == 2: refine_opt['max_process']= args[1] @@ -3560,15 +3560,15 @@ def do_refine(self, line): # Update random number self.update_random() self.save_random() - + if self.cluster_mode: logger.info('Creating Jobs') self.update_status('Refine results to %s' % precision, level=None) - + self.total_jobs = 0 - subproc = [l.strip() for l in open(pjoin(self.me_dir,'SubProcesses', + subproc = [l.strip() for l in open(pjoin(self.me_dir,'SubProcesses', 'subproc.mg'))] - + # cleanning the previous job for nb_proc,subdir in enumerate(subproc): subdir = subdir.strip() @@ -3589,14 +3589,14 @@ def do_refine(self, line): level = 5 if value.has_warning(): level = 10 - logger.log(level, + logger.log(level, value.nice_output(str('/'.join([key[0],'G%s'%key[1]]))). replace(' statistics','')) logger.debug(globalstat.nice_output('combined', no_warning=True)) - + if survey_statistics: x_improve.run_statistics = survey_statistics - + x_improve.launch() # create the ajob for the refinment. if not self.history or 'refine' not in self.history[-1]: cross, error = x_improve.update_html() #update html results for survey @@ -3610,9 +3610,9 @@ def do_refine(self, line): subdir = subdir.strip() Pdir = pjoin(self.me_dir, 'SubProcesses',subdir) bindir = pjoin(os.path.relpath(self.dirbin, Pdir)) - + logger.info(' %s ' % subdir) - + if os.path.exists(pjoin(Pdir, 'ajob1')): cudacpp_backend = self.run_card['cudacpp_backend'] # the default value is defined in banner.py @@ -3629,7 +3629,7 @@ def do_refine(self, line): ###self.compile(['all'], cwd=Pdir) alljobs = misc.glob('ajob*', Pdir) - + #remove associated results.dat (ensure to not mix with all data) Gre = re.compile("\s*j=(G[\d\.\w]+)") for job in alljobs: @@ -3637,49 +3637,49 @@ def do_refine(self, line): for Gdir in Gdirs: if os.path.exists(pjoin(Pdir, Gdir, 'results.dat')): os.remove(pjoin(Pdir, Gdir,'results.dat')) - - nb_tot = len(alljobs) + + nb_tot = len(alljobs) self.total_jobs += nb_tot for i, job in enumerate(alljobs): job = os.path.basename(job) - self.launch_job('%s' % job, cwd=Pdir, remaining=(nb_tot-i-1), - run_type='Refine number %s on %s (%s/%s)' % + self.launch_job('%s' % job, cwd=Pdir, remaining=(nb_tot-i-1), + run_type='Refine number %s on %s (%s/%s)' % (self.nb_refine, subdir, nb_proc+1, len(subproc))) - self.monitor(run_type='All job submitted for refine number %s' % self.nb_refine, + self.monitor(run_type='All job submitted for refine number %s' % self.nb_refine, html=True) - + self.update_status("Combining runs", level='parton') try: os.remove(pjoin(Pdir, 'combine_runs.log')) except Exception: pass - + if isinstance(x_improve, gen_ximprove.gen_ximprove_v4): # the merge of the events.lhe is handle in the x_improve class - # for splitted runs. (and partly in store_events). + # for splitted runs. (and partly in store_events). combine_runs.CombineRuns(self.me_dir) self.refine_mode = "old" else: self.refine_mode = "new" - + cross, error = self.make_make_all_html_results() self.results.add_detail('cross', cross) self.results.add_detail('error', error) - self.results.add_detail('run_statistics', + self.results.add_detail('run_statistics', dict(self.results.get_detail('run_statistics'))) self.update_status('finish refine', 'parton', makehtml=False) devnull.close() - - ############################################################################ + + ############################################################################ def do_comine_iteration(self, line): """Not in help: Combine a given iteration combine_iteration Pdir Gdir S|R step - S is for survey + S is for survey R is for refine - step is the iteration number (not very critical)""" + step is the iteration number (not very critical)""" self.set_run_name("tmp") self.configure_directory(html_opening=False) @@ -3695,12 +3695,12 @@ def do_comine_iteration(self, line): gensym.combine_iteration(Pdir, Gdir, int(step)) elif mode == "R": refine = gen_ximprove.gen_ximprove_share(self) - refine.combine_iteration(Pdir, Gdir, int(step)) - - + refine.combine_iteration(Pdir, Gdir, int(step)) - - ############################################################################ + + + + ############################################################################ def do_combine_events(self, line): """Advanced commands: Launch combine events""" start=time.time() @@ -3710,11 +3710,11 @@ def do_combine_events(self, line): self.check_combine_events(args) self.update_status('Combining Events', level='parton') - + if self.run_card['gridpack'] and isinstance(self, GridPackCmd): return GridPackCmd.do_combine_events(self, line) - + # Define The Banner tag = self.run_card['run_tag'] # Update the banner with the pythia card @@ -3727,14 +3727,14 @@ def do_combine_events(self, line): self.banner.change_seed(self.random_orig) if not os.path.exists(pjoin(self.me_dir, 'Events', self.run_name)): os.mkdir(pjoin(self.me_dir, 'Events', self.run_name)) - self.banner.write(pjoin(self.me_dir, 'Events', self.run_name, + self.banner.write(pjoin(self.me_dir, 'Events', self.run_name, '%s_%s_banner.txt' % (self.run_name, tag))) - - get_wgt = lambda event: event.wgt + + get_wgt = lambda event: event.wgt AllEvent = lhe_parser.MultiEventFile() AllEvent.banner = self.banner - + partials = 0 # if too many file make some partial unweighting sum_xsec, sum_xerru, sum_axsec = 0,[],0 Gdirs = self.get_Gdir() @@ -3751,12 +3751,12 @@ def do_combine_events(self, line): os.remove(pjoin(Gdir, 'events.lhe')) continue - AllEvent.add(pjoin(Gdir, 'events.lhe'), + AllEvent.add(pjoin(Gdir, 'events.lhe'), result.get('xsec'), result.get('xerru'), result.get('axsec') ) - + if len(AllEvent) >= 80: #perform a partial unweighting AllEvent.unweight(pjoin(self.me_dir, "Events", self.run_name, "partials%s.lhe.gz" % partials), get_wgt, log_level=5, trunc_error=1e-2, event_target=self.run_card['nevents']) @@ -3765,13 +3765,13 @@ def do_combine_events(self, line): AllEvent.add(pjoin(self.me_dir, "Events", self.run_name, "partials%s.lhe.gz" % partials), sum_xsec, math.sqrt(sum(x**2 for x in sum_xerru)), - sum_axsec) + sum_axsec) partials +=1 - + if not hasattr(self,'proc_characteristic'): self.proc_characteristic = self.get_characteristics() if len(AllEvent) == 0: - nb_event = 0 + nb_event = 0 else: nb_event = AllEvent.unweight(pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe.gz"), get_wgt, trunc_error=1e-2, event_target=self.run_card['nevents'], @@ -3791,22 +3791,22 @@ def do_combine_events(self, line): os.remove(pjoin(self.me_dir, "Events", self.run_name, "partials%s.lhe.gz" % i)) except Exception: os.remove(pjoin(self.me_dir, "Events", self.run_name, "partials%s.lhe" % i)) - + self.results.add_detail('nb_event', nb_event) - + if self.run_card['bias_module'].lower() not in ['dummy', 'none'] and nb_event: self.correct_bias() elif self.run_card['custom_fcts']: self.correct_bias() logger.info("combination of events done in %s s ", time.time()-start) - + self.to_store.append('event') - - ############################################################################ + + ############################################################################ def correct_bias(self): - """check the first event and correct the weight by the bias + """check the first event and correct the weight by the bias and correct the cross-section. - If the event do not have the bias tag it means that the bias is + If the event do not have the bias tag it means that the bias is one modifying the cross-section/shape so we have nothing to do """ @@ -3834,7 +3834,7 @@ def correct_bias(self): output.write('') output.close() lhe.close() - + # MODIFY THE BANNER i.e. INIT BLOCK # ensure information compatible with normalisation choice total_cross = sum(cross[key] for key in cross) @@ -3846,8 +3846,8 @@ def correct_bias(self): elif self.run_card['event_norm'] == 'unity': total_cross = self.results.current['cross'] * total_cross / nb_event for key in cross: - cross[key] *= total_cross / nb_event - + cross[key] *= total_cross / nb_event + bannerfile = lhe_parser.EventFile(pjoin(self.me_dir, 'Events', self.run_name, '.banner.tmp.gz'),'w') banner = banner_mod.Banner(lhe.banner) banner.modify_init_cross(cross) @@ -3862,12 +3862,12 @@ def correct_bias(self): os.remove(lhe.name) os.remove(bannerfile.name) os.remove(output.name) - - + + self.results.current['cross'] = total_cross self.results.current['error'] = 0 - - ############################################################################ + + ############################################################################ def do_store_events(self, line): """Advanced commands: Launch store events""" @@ -3883,16 +3883,16 @@ def do_store_events(self, line): if not os.path.exists(pjoin(self.me_dir, 'Events', run)): os.mkdir(pjoin(self.me_dir, 'Events', run)) if not os.path.exists(pjoin(self.me_dir, 'HTML', run)): - os.mkdir(pjoin(self.me_dir, 'HTML', run)) - + os.mkdir(pjoin(self.me_dir, 'HTML', run)) + # 1) Store overall process information #input = pjoin(self.me_dir, 'SubProcesses', 'results.dat') #output = pjoin(self.me_dir, 'SubProcesses', '%s_results.dat' % run) - #files.cp(input, output) + #files.cp(input, output) # 2) Treat the files present in the P directory - # Ensure that the number of events is different of 0 + # Ensure that the number of events is different of 0 if self.results.current['nb_event'] == 0 and not self.run_card['gridpack']: logger.warning("No event detected. No cleaning performed! This should allow to run:\n" + " cd Subprocesses; ../bin/internal/combine_events\n"+ @@ -3910,18 +3910,18 @@ def do_store_events(self, line): # if os.path.exists(pjoin(G_path, 'results.dat')): # input = pjoin(G_path, 'results.dat') # output = pjoin(G_path, '%s_results.dat' % run) - # files.cp(input, output) + # files.cp(input, output) #except Exception: - # continue + # continue # Store log try: if os.path.exists(pjoin(G_path, 'log.txt')): input = pjoin(G_path, 'log.txt') output = pjoin(G_path, '%s_log.txt' % run) - files.mv(input, output) + files.mv(input, output) except Exception: continue - #try: + #try: # # Grid # for name in ['ftn26']: # if os.path.exists(pjoin(G_path, name)): @@ -3930,7 +3930,7 @@ def do_store_events(self, line): # input = pjoin(G_path, name) # output = pjoin(G_path, '%s_%s' % (run,name)) # files.mv(input, output) - # misc.gzip(pjoin(G_path, output), error=None) + # misc.gzip(pjoin(G_path, output), error=None) #except Exception: # continue # Delete ftn25 to ensure reproducible runs @@ -3940,11 +3940,11 @@ def do_store_events(self, line): # 3) Update the index.html self.gen_card_html() - + # 4) Move the Files present in Events directory E_path = pjoin(self.me_dir, 'Events') O_path = pjoin(self.me_dir, 'Events', run) - + # The events file for name in ['events.lhe', 'unweighted_events.lhe']: finput = pjoin(E_path, name) @@ -3960,30 +3960,30 @@ def do_store_events(self, line): # os.remove(pjoin(O_path, '%s.gz' % name)) # input = pjoin(E_path, name) ## output = pjoin(O_path, name) - + self.update_status('End Parton', level='parton', makehtml=False) devnull.close() - - - ############################################################################ + + + ############################################################################ def do_create_gridpack(self, line): """Advanced commands: Create gridpack from present run""" self.update_status('Creating gridpack', level='parton') # compile gen_ximprove misc.compile(['../bin/internal/gen_ximprove'], cwd=pjoin(self.me_dir, "Source")) - + Gdir = self.get_Gdir() Pdir = set([os.path.dirname(G) for G in Gdir]) - for P in Pdir: + for P in Pdir: allG = misc.glob('G*', path=P) for G in allG: if pjoin(P, G) not in Gdir: logger.debug('removing %s', pjoin(P,G)) shutil.rmtree(pjoin(P,G)) - - + + args = self.split_arg(line) self.check_combine_events(args) if not self.run_tag: self.run_tag = 'tag_1' @@ -3996,13 +3996,13 @@ def do_create_gridpack(self, line): cwd=self.me_dir) misc.call(['./bin/internal/clean'], cwd=self.me_dir) misc.call(['./bin/internal/make_gridpack'], cwd=self.me_dir) - files.mv(pjoin(self.me_dir, 'gridpack.tar.gz'), + files.mv(pjoin(self.me_dir, 'gridpack.tar.gz'), pjoin(self.me_dir, '%s_gridpack.tar.gz' % self.run_name)) os.system("sed -i.bak \"s/\s*.true.*=.*GridRun/ .false. = GridRun/g\" %s/Cards/grid_card.dat" \ % self.me_dir) self.update_status('gridpack created', level='gridpack') - - ############################################################################ + + ############################################################################ def do_shower(self, line): """launch the shower""" @@ -4010,7 +4010,7 @@ def do_shower(self, line): if len(args)>1 and args[0] in self._interfaced_showers: chosen_showers = [args.pop(0)] elif '--no_default' in line: - # If '--no_default' was specified in the arguments, then only one + # If '--no_default' was specified in the arguments, then only one # shower will be run, depending on which card is present. # but we each of them are called. (each of them check if the file exists) chosen_showers = list(self._interfaced_showers) @@ -4021,9 +4021,9 @@ def do_shower(self, line): shower_priority = ['pythia8','pythia'] chosen_showers = [sorted(chosen_showers,key=lambda sh: shower_priority.index(sh) if sh in shower_priority else len(shower_priority)+1)[0]] - + for shower in chosen_showers: - self.exec_cmd('%s %s'%(shower,' '.join(args)), + self.exec_cmd('%s %s'%(shower,' '.join(args)), postcmd=False, printcmd=False) def do_madanalysis5_parton(self, line): @@ -4039,11 +4039,11 @@ def do_madanalysis5_parton(self, line): def mg5amc_py8_interface_consistency_warning(options): """ Check the consistency of the mg5amc_py8_interface installed with the current MG5 and Pythia8 versions. """ - + # All this is only relevant is Pythia8 is interfaced to MG5 if not options['pythia8_path']: return None - + if not options['mg5amc_py8_interface_path']: return \ """ @@ -4053,7 +4053,7 @@ def mg5amc_py8_interface_consistency_warning(options): Consider installing the MG5_aMC-PY8 interface with the following command: MG5_aMC>install mg5amc_py8_interface """ - + mg5amc_py8_interface_path = options['mg5amc_py8_interface_path'] py8_path = options['pythia8_path'] # If the specified interface path is relative, make it absolut w.r.t MGDIR if @@ -4062,7 +4062,7 @@ def mg5amc_py8_interface_consistency_warning(options): mg5amc_py8_interface_path = pjoin(MG5DIR,mg5amc_py8_interface_path) py8_path = pjoin(MG5DIR,py8_path) - # Retrieve all the on-install and current versions + # Retrieve all the on-install and current versions fsock = open(pjoin(mg5amc_py8_interface_path, 'MG5AMC_VERSION_ON_INSTALL')) MG5_version_on_install = fsock.read().replace('\n','') fsock.close() @@ -4074,7 +4074,7 @@ def mg5amc_py8_interface_consistency_warning(options): MG5_curr_version =misc.get_pkg_info()['version'] try: p = subprocess.Popen(['./get_pythia8_version.py',py8_path], - stdout=subprocess.PIPE, stderr=subprocess.PIPE, + stdout=subprocess.PIPE, stderr=subprocess.PIPE, cwd=mg5amc_py8_interface_path) (out, err) = p.communicate() out = out.decode(errors='ignore').replace('\n','') @@ -4084,37 +4084,37 @@ def mg5amc_py8_interface_consistency_warning(options): float(out) except: PY8_curr_version = None - + if not MG5_version_on_install is None and not MG5_curr_version is None: if MG5_version_on_install != MG5_curr_version: return \ """ The current version of MG5_aMC (v%s) is different than the one active when - installing the 'mg5amc_py8_interface_path' (which was MG5aMC v%s). + installing the 'mg5amc_py8_interface_path' (which was MG5aMC v%s). Please consider refreshing the installation of this interface with the command: MG5_aMC>install mg5amc_py8_interface """%(MG5_curr_version, MG5_version_on_install) - + if not PY8_version_on_install is None and not PY8_curr_version is None: if PY8_version_on_install != PY8_curr_version: return \ """ The current version of Pythia8 (v%s) is different than the one active when - installing the 'mg5amc_py8_interface' tool (which was Pythia8 v%s). + installing the 'mg5amc_py8_interface' tool (which was Pythia8 v%s). Please consider refreshing the installation of this interface with the command: MG5_aMC>install mg5amc_py8_interface """%(PY8_curr_version,PY8_version_on_install) - + return None def setup_Pythia8RunAndCard(self, PY8_Card, run_type): """ Setup the Pythia8 Run environment and card. In particular all the process and run specific parameters of the card are automatically set here. This function returns the path where HEPMC events will be output, if any.""" - + HepMC_event_output = None tag = self.run_tag - + PY8_Card.subruns[0].systemSet('Beams:LHEF',"unweighted_events.lhe.gz") hepmc_format = PY8_Card['HEPMCoutput:file'].lower() @@ -4185,7 +4185,7 @@ def setup_Pythia8RunAndCard(self, PY8_Card, run_type): misc.mkfifo(fifo_path) # Use defaultSet not to overwrite the current userSet status PY8_Card.defaultSet('HEPMCoutput:file',fifo_path) - HepMC_event_output=fifo_path + HepMC_event_output=fifo_path elif hepmc_format in ['','/dev/null','None']: logger.warning('User disabled the HepMC output of Pythia8.') HepMC_event_output = None @@ -4206,7 +4206,7 @@ def setup_Pythia8RunAndCard(self, PY8_Card, run_type): # only if it is not already user_set. if PY8_Card['JetMatching:qCut']==-1.0: PY8_Card.MadGraphSet('JetMatching:qCut',1.5*self.run_card['xqcut'], force=True) - + if PY8_Card['JetMatching:qCut']<(1.5*self.run_card['xqcut']): logger.error( 'The MLM merging qCut parameter you chose (%f) is less than '%PY8_Card['JetMatching:qCut']+ @@ -4233,7 +4233,7 @@ def setup_Pythia8RunAndCard(self, PY8_Card, run_type): if PY8_Card['JetMatching:qCut'] not in qCutList: qCutList.append(PY8_Card['JetMatching:qCut']) PY8_Card.MadGraphSet('SysCalc:qCutList', qCutList, force=True) - + if PY8_Card['SysCalc:qCutList']!='auto': for scale in PY8_Card['SysCalc:qCutList']: @@ -4244,7 +4244,7 @@ def setup_Pythia8RunAndCard(self, PY8_Card, run_type): "'sys_matchscale' in the run_card) is less than 1.5*xqcut, where xqcut is"+ ' the run_card parameter (=%f)\n'%self.run_card['xqcut']+ 'It would be better/safer to use a larger qCut or a smaller xqcut.') - + # Specific MLM settings # PY8 should not implement the MLM veto since the driver should do it # if merging scale variation is turned on @@ -4294,18 +4294,18 @@ def setup_Pythia8RunAndCard(self, PY8_Card, run_type): CKKW_cut = 'ktdurham' elif self.run_card['ptlund']>0.0 and self.run_card['ktdurham']<=0.0: PY8_Card.subruns[0].MadGraphSet('Merging:doPTLundMerging',True) - CKKW_cut = 'ptlund' + CKKW_cut = 'ptlund' else: raise InvalidCmd("*Either* the 'ptlund' or 'ktdurham' cut in "+\ " the run_card must be turned on to activate CKKW(L) merging"+ " with Pythia8, but *both* cuts cannot be turned on at the same time."+ "\n ptlund=%f, ktdurham=%f."%(self.run_card['ptlund'],self.run_card['ktdurham'])) - + # Automatically set qWeed to the CKKWL cut if not defined by the user. if PY8_Card['SysCalc:qWeed']==-1.0: PY8_Card.MadGraphSet('SysCalc:qWeed',self.run_card[CKKW_cut], force=True) - + # MadGraphSet sets the corresponding value (in system mode) # only if it is not already user_set. if PY8_Card['Merging:TMS']==-1.0: @@ -4319,7 +4319,7 @@ def setup_Pythia8RunAndCard(self, PY8_Card, run_type): 'The CKKWl merging scale you chose (%f) is less than '%PY8_Card['Merging:TMS']+ 'the %s cut specified in the run_card parameter (=%f).\n'%(CKKW_cut,self.run_card[CKKW_cut])+ 'It is incorrect to use a smaller CKKWl scale than the generation-level %s cut!'%CKKW_cut) - + PY8_Card.MadGraphSet('TimeShower:pTmaxMatch',1) PY8_Card.MadGraphSet('SpaceShower:pTmaxMatch',1) PY8_Card.MadGraphSet('SpaceShower:rapidityOrder',False) @@ -4381,7 +4381,7 @@ def do_pythia8(self, line): try: import madgraph - except ImportError: + except ImportError: import internal.histograms as histograms else: import madgraph.various.histograms as histograms @@ -4400,16 +4400,16 @@ def do_pythia8(self, line): self.check_pythia8(args) self.configure_directory(html_opening =False) else: - # initialize / remove lhapdf mode + # initialize / remove lhapdf mode self.configure_directory(html_opening =False) - self.check_pythia8(args) + self.check_pythia8(args) # Update the banner with the pythia card if not self.banner or len(self.banner) <=1: # Here the level keyword 'pythia' must not be changed to 'pythia8'. self.banner = banner_mod.recover_banner(self.results, 'pythia') - # the args are modify and the last arg is always the mode + # the args are modify and the last arg is always the mode if not no_default: self.ask_pythia_run_configuration(args[-1], pythia_version=8, banner=self.banner) @@ -4425,7 +4425,7 @@ def do_pythia8(self, line): #"Please use 'event_norm = average' in the run_card to avoid this problem.") - + if not self.options['mg5amc_py8_interface_path'] or not \ os.path.exists(pjoin(self.options['mg5amc_py8_interface_path'], 'MG5aMC_PY8_interface')): @@ -4444,16 +4444,16 @@ def do_pythia8(self, line): # Again here 'pythia' is just a keyword for the simulation level. self.update_status('\033[92mRunning Pythia8 [arXiv:1410.3012]\033[0m', 'pythia8') - - tag = self.run_tag + + tag = self.run_tag # Now write Pythia8 card # Start by reading, starting from the default one so that the 'user_set' # tag are correctly set. - PY8_Card = banner_mod.PY8Card(pjoin(self.me_dir, 'Cards', + PY8_Card = banner_mod.PY8Card(pjoin(self.me_dir, 'Cards', 'pythia8_card_default.dat')) PY8_Card.read(pjoin(self.me_dir, 'Cards', 'pythia8_card.dat'), setter='user') - + run_type = 'default' merged_run_types = ['MLM','CKKW'] if int(self.run_card['ickkw'])==1: @@ -4471,7 +4471,7 @@ def do_pythia8(self, line): cmd_card = StringIO.StringIO() PY8_Card.write(cmd_card,pjoin(self.me_dir,'Cards','pythia8_card_default.dat'), direct_pythia_input=True) - + # Now setup the preamble to make sure that everything will use the locally # installed tools (if present) even if the user did not add it to its # environment variables. @@ -4486,13 +4486,13 @@ def do_pythia8(self, line): preamble = misc.get_HEPTools_location_setter( pjoin(MG5DIR,'HEPTools'),'lib') preamble += "\n unset PYTHIA8DATA\n" - + open(pythia_cmd_card,'w').write("""! ! It is possible to run this card manually with: ! %s %s ! """%(preamble+pythia_main,os.path.basename(pythia_cmd_card))+cmd_card.getvalue()) - + # launch pythia8 pythia_log = pjoin(self.me_dir , 'Events', self.run_name , '%s_pythia8.log' % tag) @@ -4504,13 +4504,13 @@ def do_pythia8(self, line): shell_exe = None if os.path.exists('/usr/bin/env'): shell_exe = '/usr/bin/env %s'%shell - else: + else: shell_exe = misc.which(shell) if not shell_exe: raise self.InvalidCmd('No s hell could be found in your environment.\n'+ "Make sure that either '%s' is in your path or that the"%shell+\ " command '/usr/bin/env %s' exists and returns a valid path."%shell) - + exe_cmd = "#!%s\n%s"%(shell_exe,' '.join( [preamble+pythia_main, os.path.basename(pythia_cmd_card)])) @@ -4528,7 +4528,7 @@ def do_pythia8(self, line): ( os.path.exists(HepMC_event_output) and \ stat.S_ISFIFO(os.stat(HepMC_event_output).st_mode)) startPY8timer = time.time() - + # Information that will be extracted from this PY8 run PY8_extracted_information={ 'sigma_m':None, 'Nacc':None, 'Ntry':None, 'cross_sections':{} } @@ -4556,7 +4556,7 @@ def do_pythia8(self, line): n_cores = max(int(self.options['cluster_size']),1) elif self.options['run_mode']==2: n_cores = max(int(self.cluster.nb_core),1) - + lhe_file_name = os.path.basename(PY8_Card.subruns[0]['Beams:LHEF']) lhe_file = lhe_parser.EventFile(pjoin(self.me_dir,'Events', self.run_name,PY8_Card.subruns[0]['Beams:LHEF'])) @@ -4574,7 +4574,7 @@ def do_pythia8(self, line): if self.options['run_mode']==2: min_n_events_per_job = 100 elif self.options['run_mode']==1: - min_n_events_per_job = 1000 + min_n_events_per_job = 1000 min_n_core = n_events//min_n_events_per_job n_cores = max(min(min_n_core,n_cores),1) @@ -4584,8 +4584,8 @@ def do_pythia8(self, line): logger.info('Follow Pythia8 shower by running the '+ 'following command (in a separate terminal):\n tail -f %s'%pythia_log) - if self.options['run_mode']==2 and self.options['nb_core']>1: - ret_code = self.cluster.launch_and_wait(wrapper_path, + if self.options['run_mode']==2 and self.options['nb_core']>1: + ret_code = self.cluster.launch_and_wait(wrapper_path, argument= [], stdout= pythia_log, stderr=subprocess.STDOUT, cwd=pjoin(self.me_dir,'Events',self.run_name)) else: @@ -4630,10 +4630,10 @@ def do_pythia8(self, line): wrapper = open(wrapper_path,'w') if self.options['cluster_temp_path'] is None: exe_cmd = \ -"""#!%s +"""#!%s ./%s PY8Card.dat >& PY8_log.txt """ - else: + else: exe_cmd = \ """#!%s ln -s ./events_$1.lhe.gz ./events.lhe.gz @@ -4663,21 +4663,21 @@ def do_pythia8(self, line): # Set it as executable st = os.stat(wrapper_path) os.chmod(wrapper_path, st.st_mode | stat.S_IEXEC) - + # Split the .lhe event file, create event partition partition=[n_available_events//n_cores]*n_cores for i in range(n_available_events%n_cores): partition[i] += 1 - + # Splitting according to the total number of events requested by the user # Will be used to determine the number of events to indicate in the PY8 split cards. partition_for_PY8=[n_events//n_cores]*n_cores for i in range(n_events%n_cores): partition_for_PY8[i] += 1 - - logger.info('Splitting .lhe event file for PY8 parallelization...') - n_splits = lhe_file.split(partition=partition, cwd=parallelization_dir, zip=True) - + + logger.info('Splitting .lhe event file for PY8 parallelization...') + n_splits = lhe_file.split(partition=partition, cwd=parallelization_dir, zip=True) + if n_splits!=len(partition): raise MadGraph5Error('Error during lhe file splitting. Expected %d files but obtained %d.' %(len(partition),n_splits)) @@ -4690,7 +4690,7 @@ def do_pythia8(self, line): # Add the necessary run content shutil.move(pjoin(parallelization_dir,lhe_file.name+'_%d.lhe.gz'%split_id), pjoin(parallelization_dir,split_files[-1])) - + logger.info('Submitting Pythia8 jobs...') for i, split_file in enumerate(split_files): # We must write a PY8Card tailored for each split so as to correct the normalization @@ -4706,7 +4706,7 @@ def do_pythia8(self, line): split_PY8_Card.write(pjoin(parallelization_dir,'PY8Card_%d.dat'%i), pjoin(parallelization_dir,'PY8Card.dat'), add_missing=False) in_files = [pjoin(parallelization_dir,os.path.basename(pythia_main)), - pjoin(parallelization_dir,'PY8Card_%d.dat'%i), + pjoin(parallelization_dir,'PY8Card_%d.dat'%i), pjoin(parallelization_dir,split_file)] if self.options['cluster_temp_path'] is None: out_files = [] @@ -4718,35 +4718,35 @@ def do_pythia8(self, line): if os.path.basename(in_file)==split_file: ln(in_file,selected_cwd,name='events.lhe.gz') elif os.path.basename(in_file).startswith('PY8Card'): - ln(in_file,selected_cwd,name='PY8Card.dat') + ln(in_file,selected_cwd,name='PY8Card.dat') else: - ln(in_file,selected_cwd) + ln(in_file,selected_cwd) in_files = [] wrapper_path = os.path.basename(wrapper_path) else: out_files = ['split_%d.tar.gz'%i] selected_cwd = parallelization_dir - self.cluster.submit2(wrapper_path, - argument=[str(i)], cwd=selected_cwd, + self.cluster.submit2(wrapper_path, + argument=[str(i)], cwd=selected_cwd, input_files=in_files, output_files=out_files, required_output=out_files) - + def wait_monitoring(Idle, Running, Done): if Idle+Running+Done == 0: return logger.info('Pythia8 shower jobs: %d Idle, %d Running, %d Done [%s]'\ %(Idle, Running, Done, misc.format_time(time.time() - startPY8timer))) self.cluster.wait(parallelization_dir,wait_monitoring) - + logger.info('Merging results from the split PY8 runs...') if self.options['cluster_temp_path']: # Decompressing the output for i, split_file in enumerate(split_files): misc.call(['tar','-xzf','split_%d.tar.gz'%i],cwd=parallelization_dir) os.remove(pjoin(parallelization_dir,'split_%d.tar.gz'%i)) - + # Now merge logs pythia_log_file = open(pythia_log,'w') n_added = 0 @@ -4778,7 +4778,7 @@ def wait_monitoring(Idle, Running, Done): if n_added>0: PY8_extracted_information['sigma_m'] /= float(n_added) pythia_log_file.close() - + # djr plots djr_HwU = None n_added = 0 @@ -4845,7 +4845,7 @@ def wait_monitoring(Idle, Running, Done): if not os.path.isfile(hepmc_file): continue all_hepmc_files.append(hepmc_file) - + if len(all_hepmc_files)>0: hepmc_output = pjoin(self.me_dir,'Events',self.run_name,HepMC_event_output) with misc.TMP_directory() as tmp_dir: @@ -4860,8 +4860,8 @@ def wait_monitoring(Idle, Running, Done): break header.close() tail = open(pjoin(tmp_dir,'tail.hepmc'),'w') - n_tail = 0 - + n_tail = 0 + for line in misc.reverse_readline(all_hepmc_files[-1]): if line.startswith('HepMC::'): n_tail += 1 @@ -4871,7 +4871,7 @@ def wait_monitoring(Idle, Running, Done): tail.close() if n_tail>1: raise MadGraph5Error('HEPMC files should only have one trailing command.') - ###################################################################### + ###################################################################### # This is the most efficient way of putting together HEPMC's, *BUT* # # WARNING: NEED TO RENDER THE CODE BELOW SAFE TOWARDS INJECTION # ###################################################################### @@ -4888,12 +4888,12 @@ def wait_monitoring(Idle, Running, Done): elif sys.platform == 'darwin': # sed on MAC has slightly different synthax than on os.system(' '.join(['sed','-i',"''","'%s;$d'"% - (';'.join('%id'%(i+1) for i in range(n_head))),hepmc_file])) - else: - # other UNIX systems + (';'.join('%id'%(i+1) for i in range(n_head))),hepmc_file])) + else: + # other UNIX systems os.system(' '.join(['sed','-i']+["-e '%id'"%(i+1) for i in range(n_head)]+ ["-e '$d'",hepmc_file])) - + os.system(' '.join(['cat',pjoin(tmp_dir,'header.hepmc')]+all_hepmc_files+ [pjoin(tmp_dir,'tail.hepmc'),'>',hepmc_output])) @@ -4915,12 +4915,12 @@ def wait_monitoring(Idle, Running, Done): 'Inclusive cross section:' not in '\n'.join(open(pythia_log,'r').readlines()[-20:]): logger.warning('Fail to produce a pythia8 output. More info in \n %s'%pythia_log) return - + # Plot for Pythia8 successful = self.create_plot('Pythia8') if not successful: logger.warning('Failed to produce Pythia8 merging plots.') - + self.to_store.append('pythia8') # Study matched cross-sections @@ -4931,7 +4931,7 @@ def wait_monitoring(Idle, Running, Done): if self.options['run_mode']==0 or (self.options['run_mode']==2 and self.options['nb_core']==1): PY8_extracted_information['sigma_m'],PY8_extracted_information['Nacc'],\ PY8_extracted_information['Ntry'] = self.parse_PY8_log_file( - pjoin(self.me_dir,'Events', self.run_name,'%s_pythia8.log' % tag)) + pjoin(self.me_dir,'Events', self.run_name,'%s_pythia8.log' % tag)) else: logger.warning('Pythia8 cross-section could not be retreived.\n'+ 'Try turning parallelization off by setting the option nb_core to 1. YYYYY') @@ -4944,8 +4944,8 @@ def wait_monitoring(Idle, Running, Done): Ntry = PY8_extracted_information['Ntry'] sigma_m = PY8_extracted_information['sigma_m'] # Compute pythia error - error = self.results[self.run_name].return_tag(self.run_tag)['error'] - try: + error = self.results[self.run_name].return_tag(self.run_tag)['error'] + try: error_m = math.sqrt((error * Nacc/Ntry)**2 + sigma_m**2 *(1-Nacc/Ntry)/Nacc) except ZeroDivisionError: # Cannot compute error @@ -4966,31 +4966,31 @@ def wait_monitoring(Idle, Running, Done): else: logger.warning('Pythia8 merged cross-sections could not be retreived.\n'+ 'Try turning parallelization off by setting the option nb_core to 1.XXXXX') - PY8_extracted_information['cross_sections'] = {} - + PY8_extracted_information['cross_sections'] = {} + cross_sections = PY8_extracted_information['cross_sections'] if cross_sections: - # Filter the cross_sections specified an keep only the ones + # Filter the cross_sections specified an keep only the ones # with central parameters and a different merging scale a_float_re = '[\+|-]?\d+(\.\d*)?([EeDd][\+|-]?\d+)?' central_merging_re = re.compile( '^\s*Weight_MERGING\s*=\s*(?P%s)\s*$'%a_float_re, - re.IGNORECASE) + re.IGNORECASE) cross_sections = dict( (float(central_merging_re.match(xsec).group('merging')),value) - for xsec, value in cross_sections.items() if not + for xsec, value in cross_sections.items() if not central_merging_re.match(xsec) is None) central_scale = PY8_Card['JetMatching:qCut'] if \ int(self.run_card['ickkw'])==1 else PY8_Card['Merging:TMS'] if central_scale in cross_sections: self.results.add_detail('cross_pythia8', cross_sections[central_scale][0]) self.results.add_detail('error_pythia8', cross_sections[central_scale][1]) - + #logger.info('Pythia8 merged cross-sections are:') #for scale in sorted(cross_sections.keys()): # logger.info(' > Merging scale = %-6.4g : %-11.5g +/- %-7.2g [pb]'%\ - # (scale,cross_sections[scale][0],cross_sections[scale][1])) - + # (scale,cross_sections[scale][0],cross_sections[scale][1])) + xsecs_file = open(pjoin(self.me_dir,'Events',self.run_name, '%s_merged_xsecs.txt'%tag),'w') if cross_sections: @@ -5003,9 +5003,9 @@ def wait_monitoring(Idle, Running, Done): xsecs_file.write('Cross-sections could not be read from the'+\ "XML node 'xsection' of the .dat file produced by Pythia8.") xsecs_file.close() - + #Update the banner - # We add directly the pythia command card because it has the full + # We add directly the pythia command card because it has the full # information self.banner.add(pythia_cmd_card) @@ -5022,13 +5022,13 @@ def wait_monitoring(Idle, Running, Done): if self.options['delphes_path']: self.exec_cmd('delphes --no_default', postcmd=False, printcmd=False) self.print_results_in_shell(self.results.current) - + def parse_PY8_log_file(self, log_file_path): """ Parse a log file to extract number of event and cross-section. """ pythiare = re.compile("Les Houches User Process\(es\)\s*\d+\s*\|\s*(?P\d+)\s*(?P\d+)\s*(?P\d+)\s*\|\s*(?P[\d\.e\-\+]+)\s*(?P[\d\.e\-\+]+)") pythia_xsec_re = re.compile("Inclusive cross section\s*:\s*(?P[\d\.e\-\+]+)\s*(?P[\d\.e\-\+]+)") sigma_m, Nacc, Ntry = None, None, None - for line in misc.BackRead(log_file_path): + for line in misc.BackRead(log_file_path): info = pythiare.search(line) if not info: # Also try to obtain the cross-section and error from the final xsec line of pythia8 log @@ -5058,7 +5058,7 @@ def parse_PY8_log_file(self, log_file_path): raise self.InvalidCmd("Could not find cross-section and event number information "+\ "in Pythia8 log\n '%s'."%log_file_path) - + def extract_cross_sections_from_DJR(self,djr_output): """Extract cross-sections from a djr XML output.""" import xml.dom.minidom as minidom @@ -5075,11 +5075,11 @@ def extract_cross_sections_from_DJR(self,djr_output): [float(xsec.childNodes[0].data.split()[0]), float(xsec.childNodes[0].data.split()[1])]) for xsec in xsections) - + def do_pythia(self, line): """launch pythia""" - - + + # Check argument's validity args = self.split_arg(line) if '--no_default' in args: @@ -5089,12 +5089,12 @@ def do_pythia(self, line): args.remove('--no_default') else: no_default = False - + if not self.run_name: self.check_pythia(args) self.configure_directory(html_opening =False) else: - # initialize / remove lhapdf mode + # initialize / remove lhapdf mode self.configure_directory(html_opening =False) self.check_pythia(args) @@ -5102,7 +5102,7 @@ def do_pythia(self, line): logger.error('pythia-pgs require event_norm to be on sum. Do not run pythia6') return - # the args are modify and the last arg is always the mode + # the args are modify and the last arg is always the mode if not no_default: self.ask_pythia_run_configuration(args[-1]) if self.options['automatic_html_opening']: @@ -5114,35 +5114,35 @@ def do_pythia(self, line): self.banner = banner_mod.recover_banner(self.results, 'pythia') pythia_src = pjoin(self.options['pythia-pgs_path'],'src') - + self.results.add_detail('run_mode', 'madevent') self.update_status('Running Pythia', 'pythia') try: os.remove(pjoin(self.me_dir,'Events','pythia.done')) except Exception: - pass - + pass + ## LAUNCHING PYTHIA # check that LHAPATH is define. if not re.search(r'^\s*LHAPATH=%s/PDFsets' % pythia_src, - open(pjoin(self.me_dir,'Cards','pythia_card.dat')).read(), + open(pjoin(self.me_dir,'Cards','pythia_card.dat')).read(), re.M): f = open(pjoin(self.me_dir,'Cards','pythia_card.dat'),'a') f.write('\n LHAPATH=%s/PDFsets' % pythia_src) f.close() tag = self.run_tag pythia_log = pjoin(self.me_dir, 'Events', self.run_name , '%s_pythia.log' % tag) - #self.cluster.launch_and_wait('../bin/internal/run_pythia', + #self.cluster.launch_and_wait('../bin/internal/run_pythia', # argument= [pythia_src], stdout= pythia_log, # stderr=subprocess.STDOUT, # cwd=pjoin(self.me_dir,'Events')) output_files = ['pythia_events.hep'] if self.run_card['use_syst']: output_files.append('syst.dat') - if self.run_card['ickkw'] == 1: + if self.run_card['ickkw'] == 1: output_files += ['beforeveto.tree', 'xsecs.tree', 'events.tree'] - + os.environ['PDG_MASS_TBL'] = pjoin(pythia_src,'mass_width_2004.mc') self.cluster.launch_and_wait(pjoin(pythia_src, 'pythia'), input_files=[pjoin(self.me_dir, "Events", "unweighted_events.lhe"), @@ -5152,23 +5152,23 @@ def do_pythia(self, line): stdout= pythia_log, stderr=subprocess.STDOUT, cwd=pjoin(self.me_dir,'Events')) - + os.remove(pjoin(self.me_dir, "Events", "unweighted_events.lhe")) if not os.path.exists(pjoin(self.me_dir,'Events','pythia_events.hep')): logger.warning('Fail to produce pythia output. More info in \n %s' % pythia_log) return - + self.to_store.append('pythia') - + # Find the matched cross-section if int(self.run_card['ickkw']): # read the line from the bottom of the file - #pythia_log = misc.BackRead(pjoin(self.me_dir,'Events', self.run_name, + #pythia_log = misc.BackRead(pjoin(self.me_dir,'Events', self.run_name, # '%s_pythia.log' % tag)) - pythiare = re.compile("\s*I\s+0 All included subprocesses\s+I\s+(?P\d+)\s+(?P\d+)\s+I\s+(?P[\d\.D\-+]+)\s+I") - for line in misc.reverse_readline(pjoin(self.me_dir,'Events', self.run_name, + pythiare = re.compile("\s*I\s+0 All included subprocesses\s+I\s+(?P\d+)\s+(?P\d+)\s+I\s+(?P[\d\.D\-+]+)\s+I") + for line in misc.reverse_readline(pjoin(self.me_dir,'Events', self.run_name, '%s_pythia.log' % tag)): info = pythiare.search(line) if not info: @@ -5188,16 +5188,16 @@ def do_pythia(self, line): self.results.add_detail('nb_event_pythia', Nacc) #compute pythia error error = self.results[self.run_name].return_tag(self.run_tag)['error'] - if Nacc: + if Nacc: error_m = math.sqrt((error * Nacc/Ntry)**2 + sigma_m**2 *(1-Nacc/Ntry)/Nacc) else: error_m = 10000 * sigma_m # works both for fixed number of generated events and fixed accepted events self.results.add_detail('error_pythia', error_m) - break + break #pythia_log.close() - + pydir = pjoin(self.options['pythia-pgs_path'], 'src') eradir = self.options['exrootanalysis_path'] madir = self.options['madanalysis_path'] @@ -5216,12 +5216,12 @@ def do_pythia(self, line): # Creating LHE file self.run_hep2lhe(banner_path) - + if int(self.run_card['ickkw']): misc.gzip(pjoin(self.me_dir,'Events','beforeveto.tree'), - stdout=pjoin(self.me_dir,'Events',self.run_name, tag+'_pythia_beforeveto.tree.gz')) + stdout=pjoin(self.me_dir,'Events',self.run_name, tag+'_pythia_beforeveto.tree.gz')) + - if self.run_card['use_syst'] in self.true: # Calculate syscalc info based on syst.dat try: @@ -5233,7 +5233,7 @@ def do_pythia(self, line): # Store syst.dat misc.gzip(pjoin(self.me_dir,'Events', 'syst.dat'), stdout=pjoin(self.me_dir,'Events',self.run_name, tag + '_pythia_syst.dat.gz')) - + # Store syscalc.dat if os.path.exists(pjoin(self.me_dir, 'Events', 'syscalc.dat')): filename = pjoin(self.me_dir, 'Events' ,self.run_name, @@ -5253,7 +5253,7 @@ def do_pythia(self, line): if self.options['delphes_path']: self.exec_cmd('delphes --no_default', postcmd=False, printcmd=False) self.print_results_in_shell(self.results.current) - + ################################################################################ def do_remove(self, line): @@ -5263,8 +5263,8 @@ def do_remove(self, line): run, tag, mode = self.check_remove(args) if 'banner' in mode: mode.append('all') - - + + if run == 'all': # Check first if they are not a run with a name run. if os.path.exists(pjoin(self.me_dir, 'Events', 'all')): @@ -5280,7 +5280,7 @@ def do_remove(self, line): logger.info(error) pass # run already clear return - + # Check that run exists if not os.path.exists(pjoin(self.me_dir, 'Events', run)): raise self.InvalidCmd('No run \'%s\' detected' % run) @@ -5294,7 +5294,7 @@ def do_remove(self, line): # Found the file to delete - + to_delete = misc.glob('*', pjoin(self.me_dir, 'Events', run)) to_delete += misc.glob('*', pjoin(self.me_dir, 'HTML', run)) # forbid the banner to be removed @@ -5314,7 +5314,7 @@ def do_remove(self, line): if os.path.exists(pjoin(self.me_dir, 'Events', run, 'unweighted_events.lhe.gz')): to_delete.append('unweighted_events.lhe.gz') if os.path.exists(pjoin(self.me_dir, 'HTML', run,'plots_parton.html')): - to_delete.append(pjoin(self.me_dir, 'HTML', run,'plots_parton.html')) + to_delete.append(pjoin(self.me_dir, 'HTML', run,'plots_parton.html')) if nb_rm != len(to_delete): logger.warning('Be carefull that partonic information are on the point to be removed.') if 'all' in mode: @@ -5327,8 +5327,8 @@ def do_remove(self, line): if 'delphes' not in mode: to_delete = [f for f in to_delete if 'delphes' not in f] if 'parton' not in mode: - to_delete = [f for f in to_delete if 'delphes' in f - or 'pgs' in f + to_delete = [f for f in to_delete if 'delphes' in f + or 'pgs' in f or 'pythia' in f] if not self.force and len(to_delete): question = 'Do you want to delete the following files?\n %s' % \ @@ -5336,7 +5336,7 @@ def do_remove(self, line): ans = self.ask(question, 'y', choices=['y','n']) else: ans = 'y' - + if ans == 'y': for file2rm in to_delete: if os.path.exists(pjoin(self.me_dir, 'Events', run, file2rm)): @@ -5374,7 +5374,7 @@ def do_remove(self, line): if ans == 'y': for file2rm in to_delete: os.remove(file2rm) - + if 'banner' in mode: to_delete = misc.glob('*', pjoin(self.me_dir, 'Events', run)) if tag: @@ -5389,8 +5389,8 @@ def do_remove(self, line): return elif any(['banner' not in os.path.basename(p) for p in to_delete]): if to_delete: - raise MadGraph5Error('''Some output still exists for this run. - Please remove those output first. Do for example: + raise MadGraph5Error('''Some output still exists for this run. + Please remove those output first. Do for example: remove %s all banner ''' % run) else: @@ -5400,7 +5400,7 @@ def do_remove(self, line): return else: logger.info('''The banner is not removed. In order to remove it run: - remove %s all banner %s''' % (run, tag and '--tag=%s ' % tag or '')) + remove %s all banner %s''' % (run, tag and '--tag=%s ' % tag or '')) # update database. self.results.clean(mode, run, tag) @@ -5420,7 +5420,7 @@ def do_plot(self, line): logger.info('plot for run %s' % self.run_name) if not self.force: self.ask_edit_cards(['plot_card.dat'], args, plot=True) - + if any([arg in ['all','parton'] for arg in args]): filename = pjoin(self.me_dir, 'Events', self.run_name, 'unweighted_events.lhe') if os.path.exists(filename+'.gz'): @@ -5438,8 +5438,8 @@ def do_plot(self, line): except Exception: pass else: - logger.info('No valid files for partonic plot') - + logger.info('No valid files for partonic plot') + if any([arg in ['all','pythia'] for arg in args]): filename = pjoin(self.me_dir, 'Events' ,self.run_name, '%s_pythia_events.lhe' % self.run_tag) @@ -5452,10 +5452,10 @@ def do_plot(self, line): stdout= "%s.gz" % filename) else: logger.info('No valid files for pythia plot') - - + + if any([arg in ['all','pgs'] for arg in args]): - filename = pjoin(self.me_dir, 'Events', self.run_name, + filename = pjoin(self.me_dir, 'Events', self.run_name, '%s_pgs_events.lhco' % self.run_tag) if os.path.exists(filename+'.gz'): misc.gunzip("%s.gz" % filename) @@ -5464,15 +5464,15 @@ def do_plot(self, line): misc.gzip(filename) else: logger.info('No valid files for pgs plot') - + if any([arg in ['all','delphes'] for arg in args]): - filename = pjoin(self.me_dir, 'Events', self.run_name, + filename = pjoin(self.me_dir, 'Events', self.run_name, '%s_delphes_events.lhco' % self.run_tag) if os.path.exists(filename+'.gz'): misc.gunzip("%s.gz" % filename) if os.path.exists(filename): self.create_plot('Delphes') - misc.gzip(filename) + misc.gzip(filename) else: logger.info('No valid files for delphes plot') @@ -5488,9 +5488,9 @@ def do_syscalc(self, line): if self.ninitial == 1: logger.error('SysCalc can\'t be run for decay processes') return - + logger.info('Calculating systematics for run %s' % self.run_name) - + self.ask_edit_cards(['run_card.dat'], args, plot=False) self.run_card = banner_mod.RunCard(pjoin(self.me_dir, 'Cards', 'run_card.dat')) if any([arg in ['all','parton'] for arg in args]): @@ -5504,7 +5504,7 @@ def do_syscalc(self, line): stdout="%s.gz" % filename) else: logger.info('No valid files for parton level systematics run.') - + if any([arg in ['all','pythia'] for arg in args]): filename = pjoin(self.me_dir, 'Events' ,self.run_name, '%s_pythia_syst.dat' % self.run_tag) @@ -5525,17 +5525,17 @@ def do_syscalc(self, line): else: logger.info('No valid files for pythia level') - + def store_result(self): - """ tar the pythia results. This is done when we are quite sure that + """ tar the pythia results. This is done when we are quite sure that the pythia output will not be use anymore """ if not self.run_name: return - + if not self.to_store: - return - + return + tag = self.run_card['run_tag'] self.update_status('storing files of previous run', level=None,\ error=True) @@ -5546,14 +5546,14 @@ def store_result(self): misc.gzip(pjoin(self.me_dir,'Events',self.run_name,"unweighted_events.lhe")) if os.path.exists(pjoin(self.me_dir,'Events','reweight.lhe')): os.remove(pjoin(self.me_dir,'Events', 'reweight.lhe')) - + if 'pythia' in self.to_store: self.update_status('Storing Pythia files of previous run', level='pythia', error=True) p = pjoin(self.me_dir,'Events') n = self.run_name t = tag self.to_store.remove('pythia') - misc.gzip(pjoin(p,'pythia_events.hep'), + misc.gzip(pjoin(p,'pythia_events.hep'), stdout=pjoin(p, str(n),'%s_pythia_events.hep' % t),forceexternal=True) if 'pythia8' in self.to_store: @@ -5581,26 +5581,26 @@ def store_result(self): os.system("mv " + file_path + hepmc_fileformat + " " + move_hepmc_path) self.update_status('Done', level='pythia',makehtml=False,error=True) - self.results.save() - + self.results.save() + self.to_store = [] - def launch_job(self,exe, cwd=None, stdout=None, argument = [], remaining=0, + def launch_job(self,exe, cwd=None, stdout=None, argument = [], remaining=0, run_type='', mode=None, **opt): """ """ argument = [str(arg) for arg in argument] if mode is None: mode = self.cluster_mode - + # ensure that exe is executable if os.path.exists(exe) and not os.access(exe, os.X_OK): os.system('chmod +x %s ' % exe) elif (cwd and os.path.exists(pjoin(cwd, exe))) and not \ os.access(pjoin(cwd, exe), os.X_OK): os.system('chmod +x %s ' % pjoin(cwd, exe)) - + if mode == 0: - self.update_status((remaining, 1, + self.update_status((remaining, 1, self.total_jobs - remaining -1, run_type), level=None, force=False) start = time.time() #os.system('cd %s; ./%s' % (cwd,exe)) @@ -5613,24 +5613,24 @@ def launch_job(self,exe, cwd=None, stdout=None, argument = [], remaining=0, elif mode in [1,2]: exename = os.path.basename(exe) # For condor cluster, create the input/output files - if 'ajob' in exename: + if 'ajob' in exename: input_files = ['madevent','input_app.txt','symfact.dat','iproc.dat','dname.mg', pjoin(self.me_dir, 'SubProcesses','randinit')] - if os.path.exists(pjoin(self.me_dir,'SubProcesses', + if os.path.exists(pjoin(self.me_dir,'SubProcesses', 'MadLoop5_resources.tar.gz')) and cluster.need_transfer(self.options): input_files.append(pjoin(self.me_dir,'SubProcesses', 'MadLoop5_resources.tar.gz')) - + output_files = [] required_output = [] - + #Find the correct PDF input file input_files.append(self.get_pdf_input_filename()) - + #Find the correct ajob Gre = re.compile("\s*j=(G[\d\.\w]+)") origre = re.compile("grid_directory=(G[\d\.\w]+)") - try : + try : fsock = open(exe) except Exception: fsock = open(pjoin(cwd,exe)) @@ -5648,21 +5648,21 @@ def launch_job(self,exe, cwd=None, stdout=None, argument = [], remaining=0, if os.path.isdir(pjoin(cwd,G)): input_files.append(G) required_output.append('%s/results.dat' % G) - + if origre.search(text): G_grid = origre.search(text).groups()[0] input_files.append(pjoin(G_grid, 'ftn26')) - + #submitting - self.cluster.submit2(exe, stdout=stdout, cwd=cwd, + self.cluster.submit2(exe, stdout=stdout, cwd=cwd, input_files=input_files, output_files=output_files, required_output=required_output) elif 'survey' in exename: input_files = ['madevent','input_app.txt','symfact.dat','iproc.dat', 'dname.mg', - pjoin(self.me_dir, 'SubProcesses','randinit')] - if os.path.exists(pjoin(self.me_dir,'SubProcesses', + pjoin(self.me_dir, 'SubProcesses','randinit')] + if os.path.exists(pjoin(self.me_dir,'SubProcesses', 'MadLoop5_resources.tar.gz')) and cluster.need_transfer(self.options): - input_files.append(pjoin(self.me_dir,'SubProcesses', + input_files.append(pjoin(self.me_dir,'SubProcesses', 'MadLoop5_resources.tar.gz')) #Find the correct PDF input file @@ -5671,7 +5671,7 @@ def launch_job(self,exe, cwd=None, stdout=None, argument = [], remaining=0, output_files = [] required_output = [] - + #Find the correct ajob suffix = "_%s" % int(float(argument[0])) if suffix == '_0': @@ -5685,12 +5685,12 @@ def launch_job(self,exe, cwd=None, stdout=None, argument = [], remaining=0, if '.' in argument[0]: offset = int(str(argument[0]).split('.')[1]) else: - offset = 0 - + offset = 0 + if offset ==0 or offset == int(float(argument[0])): if os.path.exists(pjoin(cwd, G, 'input_app.txt')): os.remove(pjoin(cwd, G, 'input_app.txt')) - + if os.path.exists(os.path.realpath(pjoin(cwd, G, 'ftn25'))): if offset == 0 or offset == int(float(argument[0])): os.remove(pjoin(cwd, G, 'ftn25')) @@ -5706,16 +5706,16 @@ def launch_job(self,exe, cwd=None, stdout=None, argument = [], remaining=0, pass #submitting - self.cluster.cluster_submit(exe, stdout=stdout, cwd=cwd, argument=argument, + self.cluster.cluster_submit(exe, stdout=stdout, cwd=cwd, argument=argument, input_files=input_files, output_files=output_files, required_output=required_output, **opt) elif "refine_splitted.sh" in exename: input_files = ['madevent','symfact.dat','iproc.dat', 'dname.mg', - pjoin(self.me_dir, 'SubProcesses','randinit')] - + pjoin(self.me_dir, 'SubProcesses','randinit')] + if os.path.exists(pjoin(self.me_dir,'SubProcesses', 'MadLoop5_resources.tar.gz')) and cluster.need_transfer(self.options): - input_files.append(pjoin(self.me_dir,'SubProcesses', + input_files.append(pjoin(self.me_dir,'SubProcesses', 'MadLoop5_resources.tar.gz')) #Find the correct PDF input file @@ -5725,25 +5725,25 @@ def launch_job(self,exe, cwd=None, stdout=None, argument = [], remaining=0, output_files = [argument[0]] required_output = [] for G in output_files: - required_output.append('%s/results.dat' % G) + required_output.append('%s/results.dat' % G) input_files.append(pjoin(argument[1], "input_app.txt")) input_files.append(pjoin(argument[1], "ftn26")) - + #submitting - self.cluster.cluster_submit(exe, stdout=stdout, cwd=cwd, argument=argument, + self.cluster.cluster_submit(exe, stdout=stdout, cwd=cwd, argument=argument, input_files=input_files, output_files=output_files, - required_output=required_output, **opt) + required_output=required_output, **opt) + + - - else: self.cluster.submit(exe, argument=argument, stdout=stdout, cwd=cwd, **opt) - + ############################################################################ def find_madevent_mode(self): """Find if Madevent is in Group mode or not""" - + # The strategy is too look in the files Source/run_configs.inc # if we found: ChanPerJob=3 then it's a group mode. file_path = pjoin(self.me_dir, 'Source', 'run_config.inc') @@ -5752,11 +5752,11 @@ def find_madevent_mode(self): return 'group' else: return 'v4' - + ############################################################################ def monitor(self, run_type='monitor', mode=None, html=False): """ monitor the progress of running job """ - + starttime = time.time() if mode is None: @@ -5772,8 +5772,8 @@ def monitor(self, run_type='monitor', mode=None, html=False): else: update_status = lambda idle, run, finish: None update_first = None - try: - self.cluster.wait(self.me_dir, update_status, update_first=update_first) + try: + self.cluster.wait(self.me_dir, update_status, update_first=update_first) except Exception as error: logger.info(error) if not self.force: @@ -5788,24 +5788,24 @@ def monitor(self, run_type='monitor', mode=None, html=False): raise except KeyboardInterrupt as error: self.cluster.remove() - raise - - + raise + - ############################################################################ + + ############################################################################ def configure_directory(self, html_opening=True): - """ All action require before any type of run """ + """ All action require before any type of run """ # Basic check assert os.path.exists(pjoin(self.me_dir,'SubProcesses')) # environmental variables to be included in make_opts self.make_opts_var = {} - + #see when the last file was modified time_mod = max([os.path.getmtime(pjoin(self.me_dir,'Cards','run_card.dat')), os.path.getmtime(pjoin(self.me_dir,'Cards','param_card.dat'))]) - + if self.configured >= time_mod and hasattr(self, 'random') and hasattr(self, 'run_card'): #just ensure that cluster specific are correctly handled if self.cluster: @@ -5820,7 +5820,7 @@ def configure_directory(self, html_opening=True): #open only once the web page # Change current working directory self.launching_dir = os.getcwd() - + # Check if we need the MSSM special treatment model = self.find_model_name() if model == 'mssm' or model.startswith('mssm-'): @@ -5828,14 +5828,14 @@ def configure_directory(self, html_opening=True): mg5_param = pjoin(self.me_dir, 'Source', 'MODEL', 'MG5_param.dat') check_param_card.convert_to_mg5card(param_card, mg5_param) check_param_card.check_valid_param_card(mg5_param) - + # limit the number of event to 100k self.check_nb_events() # this is in order to avoid conflicts between runs with and without # lhapdf. not needed anymore the makefile handles it automaticallu #misc.compile(['clean4pdf'], cwd = pjoin(self.me_dir, 'Source')) - + self.make_opts_var['pdlabel1'] = '' self.make_opts_var['pdlabel2'] = '' if self.run_card['pdlabel1'] in ['eva', 'iww']: @@ -5866,7 +5866,7 @@ def configure_directory(self, html_opening=True): self.copy_lep_densities(self.run_card['pdlabel'], pjoin(self.me_dir, 'Source')) self.make_opts_var['pdlabel1'] = 'ee' self.make_opts_var['pdlabel2'] = 'ee' - + # set random number if self.run_card['iseed'] != 0: self.random = int(self.run_card['iseed']) @@ -5885,18 +5885,18 @@ def configure_directory(self, html_opening=True): break else: self.random = random.randint(1, 30107) - + #set random seed for python part of the code if self.run_card['python_seed'] == -2: #-2 means same as run_card import random if not hasattr(random, 'mg_seedset'): - random.seed(self.run_card['python_seed']) - random.mg_seedset = self.run_card['python_seed'] + random.seed(self.run_card['python_seed']) + random.mg_seedset = self.run_card['python_seed'] elif self.run_card['python_seed'] >= 0: import random if not hasattr(random, 'mg_seedset'): - random.seed(self.run_card['python_seed']) - random.mg_seedset = self.run_card['python_seed'] + random.seed(self.run_card['python_seed']) + random.mg_seedset = self.run_card['python_seed'] if self.run_card['ickkw'] == 2: logger.info('Running with CKKW matching') self.treat_ckkw_matching() @@ -5905,12 +5905,12 @@ def configure_directory(self, html_opening=True): self.update_make_opts(self.run_card) # reset list of Gdirectory self.Gdirs = None - + # create param_card.inc and run_card.inc self.do_treatcards('') - + logger.info("compile Source Directory") - + # Compile for name in [ 'all']:#, '../bin/internal/combine_events']: self.compile(arg=[name], cwd=os.path.join(self.me_dir, 'Source')) @@ -5933,7 +5933,7 @@ def configure_directory(self, html_opening=True): os.remove(pjoin(self.me_dir, 'lib','libbias.a')) force_subproc_clean = True - + # Finally compile the bias module as well if self.run_card['bias_module'] not in ['dummy',None]: logger.debug("Compiling the bias module '%s'"%bias_name) @@ -5945,7 +5945,7 @@ def configure_directory(self, html_opening=True): 'INVALID' in str(bias_module_valid).upper(): raise InvalidCmd("The bias module '%s' cannot be used because of:\n%s"% (bias_name,bias_module_valid)) - + self.compile(arg=[], cwd=os.path.join(self.me_dir, 'Source','BIAS',bias_name)) self.proc_characteristics['bias_module']=bias_name # Update the proc_characterstics file @@ -5954,7 +5954,7 @@ def configure_directory(self, html_opening=True): if force_subproc_clean: # Make sure that madevent will be recompiled - subproc = [l.strip() for l in open(pjoin(self.me_dir,'SubProcesses', + subproc = [l.strip() for l in open(pjoin(self.me_dir,'SubProcesses', 'subproc.mg'))] for nb_proc,subdir in enumerate(subproc): Pdir = pjoin(self.me_dir, 'SubProcesses',subdir.strip()) @@ -5971,20 +5971,20 @@ def configure_directory(self, html_opening=True): ############################################################################ @staticmethod def check_dir(path, default=''): - """check if the directory exists. if so return the path otherwise the + """check if the directory exists. if so return the path otherwise the default""" - + if os.path.isdir(path): return path else: return default - + ############################################################################ def get_Gdir(self, Pdir=None, symfact=None): """get the list of Gdirectory if not yet saved.""" - + if hasattr(self, "Gdirs") and self.Gdirs: if self.me_dir in self.Gdirs[0]: if Pdir is None: @@ -6000,8 +6000,8 @@ def get_Gdir(self, Pdir=None, symfact=None): Pdirs = self.get_Pdir() - Gdirs = {self.me_dir:[]} - mfactors = {} + Gdirs = {self.me_dir:[]} + mfactors = {} for P in Pdirs: Gdirs[P] = [] #for the next line do not use P, since in readonly mode it might not have symfact @@ -6012,7 +6012,7 @@ def get_Gdir(self, Pdir=None, symfact=None): mfactors[pjoin(P, "G%s" % tag)] = mfactor self.Gdirs = (Gdirs, mfactors) return self.get_Gdir(Pdir, symfact=symfact) - + ############################################################################ def set_run_name(self, name, tag=None, level='parton', reload_card=False, allow_new_tag=True): @@ -6030,8 +6030,8 @@ def get_last_tag(self, level): tagRun = self.results[self.run_name][i] if tagRun.pythia or tagRun.shower or tagRun.pythia8 : return tagRun['tag'] - - + + # when are we force to change the tag new_run:previous run requiring changes upgrade_tag = {'parton': ['parton','pythia','pgs','delphes','madanalysis5_hadron','madanalysis5_parton', 'rivet'], 'pythia': ['pythia','pgs','delphes','madanalysis5_hadron'], @@ -6044,7 +6044,7 @@ def get_last_tag(self, level): 'syscalc':[], 'rivet':['rivet']} - if name == self.run_name: + if name == self.run_name: if reload_card: run_card = pjoin(self.me_dir, 'Cards','run_card.dat') self.run_card = banner_mod.RunCard(run_card) @@ -6064,13 +6064,13 @@ def get_last_tag(self, level): break return get_last_tag(self, level) - + # save/clean previous run if self.run_name: self.store_result() # store new name self.run_name = name - + new_tag = False # First call for this run -> set the banner self.banner = banner_mod.recover_banner(self.results, level, name) @@ -6079,8 +6079,8 @@ def get_last_tag(self, level): else: # Read run_card run_card = pjoin(self.me_dir, 'Cards','run_card.dat') - self.run_card = banner_mod.RunCard(run_card) - + self.run_card = banner_mod.RunCard(run_card) + if tag: self.run_card['run_tag'] = tag new_tag = True @@ -6093,7 +6093,7 @@ def get_last_tag(self, level): self.results.update('add run %s' % name, 'all', makehtml=False) else: for tag in upgrade_tag[level]: - + if getattr(self.results[self.run_name][-1], tag): # LEVEL is already define in the last tag -> need to switch tag tag = self.get_available_tag() @@ -6103,8 +6103,8 @@ def get_last_tag(self, level): if not new_tag: # We can add the results to the current run tag = self.results[self.run_name][-1]['tag'] - self.run_card['run_tag'] = tag # ensure that run_tag is correct - + self.run_card['run_tag'] = tag # ensure that run_tag is correct + if allow_new_tag and (name in self.results and not new_tag): self.results.def_current(self.run_name) else: @@ -6113,15 +6113,15 @@ def get_last_tag(self, level): self.run_tag = self.run_card['run_tag'] return get_last_tag(self, level) - - - + + + ############################################################################ def check_nb_events(self): - """Find the number of event in the run_card, and check that this is not + """Find the number of event in the run_card, and check that this is not too large""" - + nb_event = int(self.run_card['nevents']) if nb_event > 1000000: logger.warning("Attempting to generate more than 1M events") @@ -6133,20 +6133,20 @@ def check_nb_events(self): return - - ############################################################################ + + ############################################################################ def update_random(self): """ change random number""" - + self.random += 3 if self.random > 30081*30081: # can't use too big random number raise MadGraph5Error('Random seed too large ' + str(self.random) + ' > 30081*30081') - if self.run_card['python_seed'] == -2: + if self.run_card['python_seed'] == -2: import random if not hasattr(random, 'mg_seedset'): - random.seed(self.random) + random.seed(self.random) random.mg_seedset = self.random - + ############################################################################ def save_random(self): """save random number in appropirate file""" @@ -6155,14 +6155,14 @@ def save_random(self): fsock.writelines('r=%s\n' % self.random) def do_quit(self, *args, **opts): - + return common_run.CommonRunCmd.do_quit(self, *args, **opts) #return CmdExtended.do_quit(self, *args, **opts) - + ############################################################################ def treat_CKKW_matching(self): """check for ckkw""" - + lpp1 = self.run_card['lpp1'] lpp2 = self.run_card['lpp2'] e1 = self.run_card['ebeam1'] @@ -6170,19 +6170,19 @@ def treat_CKKW_matching(self): pd = self.run_card['pdlabel'] lha = self.run_card['lhaid'] xq = self.run_card['xqcut'] - translation = {'e1': e1, 'e2':e2, 'pd':pd, + translation = {'e1': e1, 'e2':e2, 'pd':pd, 'lha':lha, 'xq':xq} if lpp1 or lpp2: - # Remove ':s from pd + # Remove ':s from pd if pd.startswith("'"): pd = pd[1:] if pd.endswith("'"): - pd = pd[:-1] + pd = pd[:-1] if xq >2 or xq ==2: xq = 2 - + # find data file if pd == "lhapdf": issudfile = 'lib/issudgrid-%(e1)s-%(e2)s-%(pd)s-%(lha)s-%(xq)s.dat.gz' @@ -6192,9 +6192,9 @@ def treat_CKKW_matching(self): issudfile = pjoin(self.webbin, issudfile % translation) else: issudfile = pjoin(self.me_dir, issudfile % translation) - + logger.info('Sudakov grid file: %s' % issudfile) - + # check that filepath exists if os.path.exists(issudfile): path = pjoin(self.me_dir, 'lib', 'issudgrid.dat') @@ -6203,20 +6203,20 @@ def treat_CKKW_matching(self): msg = 'No sudakov grid file for parameter choice. Start to generate it. This might take a while' logger.info(msg) self.update_status('GENERATE SUDAKOV GRID', level='parton') - + for i in range(-2,6): - self.cluster.submit('%s/gensudgrid ' % self.dirbin, + self.cluster.submit('%s/gensudgrid ' % self.dirbin, argument = ['%d'%i], - cwd=self.me_dir, + cwd=self.me_dir, stdout=open(pjoin(self.me_dir, 'gensudgrid%s.log' % i),'w')) self.monitor() for i in range(-2,6): path = pjoin(self.me_dir, 'lib', 'issudgrid.dat') os.system('cat %s/gensudgrid%s.log >> %s' % (self.me_dir, path)) misc.gzip(path, stdout=issudfile) - + ############################################################################ - def create_root_file(self, input='unweighted_events.lhe', + def create_root_file(self, input='unweighted_events.lhe', output='unweighted_events.root' ): """create the LHE root file """ self.update_status('Creating root files', level='parton') @@ -6233,14 +6233,14 @@ def create_root_file(self, input='unweighted_events.lhe', totar = False torm = True input = input[:-3] - + try: - misc.call(['%s/ExRootLHEFConverter' % eradir, + misc.call(['%s/ExRootLHEFConverter' % eradir, input, output], cwd=pjoin(self.me_dir, 'Events')) except Exception: logger.warning('fail to produce Root output [problem with ExRootAnalysis]') - + if totar: if os.path.exists('%s.gz' % input): try: @@ -6251,13 +6251,13 @@ def create_root_file(self, input='unweighted_events.lhe', misc.gzip(input) if torm: os.remove(input) - + def run_syscalc(self, mode='parton', event_path=None, output=None): - """create the syscalc output""" + """create the syscalc output""" if self.run_card['use_syst'] not in self.true: return - + scdir = self.options['syscalc_path'] if not scdir or not os.path.exists(scdir): return @@ -6265,12 +6265,12 @@ def run_syscalc(self, mode='parton', event_path=None, output=None): if self.run_card['event_norm'] != 'sum': logger.critical('SysCalc works only when event_norm is on \'sum\'.') return - logger.info('running SysCalc on mode %s' % mode) - + logger.info('running SysCalc on mode %s' % mode) + # Restore the old default for SysCalc+PY6 if self.run_card['sys_matchscale']=='auto': self.run_card['sys_matchscale'] = "30 50" - + # Check that all pdfset are correctly installed lhaid = [self.run_card.get_lhapdf_id()] if '&&' in self.run_card['sys_pdf']: @@ -6285,20 +6285,20 @@ def run_syscalc(self, mode='parton', event_path=None, output=None): logger.debug(str(error)) logger.warning('Systematic computation requires lhapdf to run. Bypass SysCalc') return - + # Copy all the relevant PDF sets [self.copy_lhapdf_set([onelha], pdfsets_dir) for onelha in lhaid] - + to_syscalc={'sys_scalefact': self.run_card['sys_scalefact'], 'sys_alpsfact': self.run_card['sys_alpsfact'], 'sys_matchscale': self.run_card['sys_matchscale'], 'sys_scalecorrelation': self.run_card['sys_scalecorrelation'], 'sys_pdf': self.run_card['sys_pdf']} - - tag = self.run_card['run_tag'] + + tag = self.run_card['run_tag'] card = pjoin(self.me_dir, 'bin','internal', 'syscalc_card.dat') template = open(pjoin(self.me_dir, 'bin','internal', 'syscalc_template.dat')).read() - + if '&&' in to_syscalc['sys_pdf']: to_syscalc['sys_pdf'] = to_syscalc['sys_pdf'].split('#',1)[0].replace('&&',' \n ') else: @@ -6311,8 +6311,8 @@ def run_syscalc(self, mode='parton', event_path=None, output=None): new.append(d) else: new[-1] += ' %s' % d - to_syscalc['sys_pdf'] = '\n'.join(new) - + to_syscalc['sys_pdf'] = '\n'.join(new) + if to_syscalc['sys_pdf'].lower() in ['', 'f', 'false', 'none', '.false.']: to_syscalc['sys_pdf'] = '' if to_syscalc['sys_alpsfact'].lower() in ['', 'f', 'false', 'none','.false.']: @@ -6320,17 +6320,17 @@ def run_syscalc(self, mode='parton', event_path=None, output=None): - + # check if the scalecorrelation parameter is define: if not 'sys_scalecorrelation' in self.run_card: self.run_card['sys_scalecorrelation'] = -1 open(card,'w').write(template % self.run_card) - + if not os.path.exists(card): return False - - + + event_dir = pjoin(self.me_dir, 'Events') if not event_path: @@ -6353,19 +6353,19 @@ def run_syscalc(self, mode='parton', event_path=None, output=None): raise SysCalcError('qcut value for sys_matchscale lower than qcut in pythia_card. Bypass syscalc') if float(value) < xqcut: raise SysCalcError('qcut value for sys_matchscale lower than xqcut in run_card. Bypass syscalc') - - + + event_path = pjoin(event_dir,'syst.dat') output = pjoin(event_dir, 'syscalc.dat') else: raise self.InvalidCmd('Invalid mode %s' % mode) - + if not os.path.exists(event_path): if os.path.exists(event_path+'.gz'): misc.gunzip(event_path+'.gz') else: raise SysCalcError('Events file %s does not exits' % event_path) - + self.update_status('Calculating systematics for %s level' % mode, level = mode.lower()) try: proc = misc.call([os.path.join(scdir, 'sys_calc'), @@ -6374,7 +6374,7 @@ def run_syscalc(self, mode='parton', event_path=None, output=None): stderr = subprocess.STDOUT, cwd=event_dir) # Wait 5 s to make sure file is finished writing - time.sleep(5) + time.sleep(5) except OSError as error: logger.error('fail to run syscalc: %s. Please check that SysCalc is correctly installed.' % error) else: @@ -6382,11 +6382,11 @@ def run_syscalc(self, mode='parton', event_path=None, output=None): logger.warning('SysCalc Failed. Please read the associate log to see the reason. Did you install the associate PDF set?') elif mode == 'parton': files.mv(output, event_path) - + self.update_status('End syscalc for %s level' % mode, level = mode.lower(), makehtml=False) - - return True + + return True action_switcher = AskRun @@ -6399,23 +6399,23 @@ def ask_run_configuration(self, mode=None, args=[]): passing_cmd.append('reweight=ON') if '-M' in args or '--madspin' in args: passing_cmd.append('madspin=ON') - + switch, cmd_switch = self.ask('', '0', [], ask_class = self.action_switcher, mode=mode, line_args=args, force=self.force, first_cmd=passing_cmd, return_instance=True) # - self.switch = switch # store the value of the switch for plugin purpose + self.switch = switch # store the value of the switch for plugin purpose if 'dynamical' in switch: mode = 'auto' - + # Now that we know in which mode we are check that all the card #exists (copy default if needed) - + cards = ['param_card.dat', 'run_card.dat'] if switch['shower'] == 'Pythia6': cards.append('pythia_card.dat') if switch['shower'] == 'Pythia8': - cards.append('pythia8_card.dat') + cards.append('pythia8_card.dat') if switch['detector'] in ['PGS','DELPHES+PGS']: cards.append('pgs_card.dat') if switch['detector'] in ['Delphes', 'DELPHES+PGS']: @@ -6438,29 +6438,29 @@ def ask_run_configuration(self, mode=None, args=[]): cards.append('rivet_card.dat') self.keep_cards(cards) - + first_cmd = cmd_switch.get_cardcmd() - + if os.path.isfile(pjoin(self.me_dir,'Cards','MadLoopParams.dat')): cards.append('MadLoopParams.dat') - + if self.force: self.check_param_card(pjoin(self.me_dir,'Cards','param_card.dat' )) return switch - + if 'dynamical' in switch and switch['dynamical']: self.ask_edit_cards(cards, plot=False, mode='auto', first_cmd=first_cmd) else: self.ask_edit_cards(cards, plot=False, first_cmd=first_cmd) return switch - + ############################################################################ def ask_pythia_run_configuration(self, mode=None, pythia_version=6, banner=None): """Ask the question when launching pythia""" - + pythia_suffix = '' if pythia_version==6 else '%d'%pythia_version - + available_mode = ['0', '1'] if pythia_version==6: available_mode.append('2') @@ -6485,10 +6485,10 @@ def ask_pythia_run_configuration(self, mode=None, pythia_version=6, banner=None) mode = self.ask(question, '0', options) elif not mode: mode = 'auto' - + if mode.isdigit(): mode = name[mode] - + auto = False if mode == 'auto': auto = True @@ -6497,7 +6497,7 @@ def ask_pythia_run_configuration(self, mode=None, pythia_version=6, banner=None) mode = 'pgs' elif os.path.exists(pjoin(self.me_dir, 'Cards', 'delphes_card.dat')): mode = 'delphes' - else: + else: mode = 'pythia%s'%pythia_suffix logger.info('Will run in mode %s' % mode) # Now that we know in which mode we are check that all the card @@ -6513,15 +6513,15 @@ def ask_pythia_run_configuration(self, mode=None, pythia_version=6, banner=None) cards.append('delphes_trigger.dat') self.keep_cards(cards, ignore=['madanalysis5_parton_card.dat','madanalysis5_hadron_card.dat', 'plot_card.dat']) - + if self.force: return mode - + if not banner: banner = self.banner - + if auto: - self.ask_edit_cards(cards, from_banner=['param', 'run'], + self.ask_edit_cards(cards, from_banner=['param', 'run'], mode='auto', plot=(pythia_version==6), banner=banner ) else: @@ -6529,12 +6529,12 @@ def ask_pythia_run_configuration(self, mode=None, pythia_version=6, banner=None) plot=(pythia_version==6), banner=banner) return mode - + #=============================================================================== # MadEventCmd #=============================================================================== class MadEventCmdShell(MadEventCmd, cmd.CmdShell): - """The command line processor of MadGraph""" + """The command line processor of MadGraph""" @@ -6548,11 +6548,11 @@ class SubProcesses(object): @classmethod def clean(cls): cls.name_to_pdg = {} - + @staticmethod def get_subP(me_dir): """return the list of Subprocesses""" - + out = [] for line in open(pjoin(me_dir,'SubProcesses', 'subproc.mg')): if not line: @@ -6560,9 +6560,9 @@ def get_subP(me_dir): name = line.strip() if os.path.exists(pjoin(me_dir, 'SubProcesses', name)): out.append(pjoin(me_dir, 'SubProcesses', name)) - + return out - + @staticmethod @@ -6623,9 +6623,9 @@ def get_subP_ids(path): particles = re.search("/([\d,-]+)/", line) all_ids.append([int(p) for p in particles.group(1).split(',')]) return all_ids - - -#=============================================================================== + + +#=============================================================================== class GridPackCmd(MadEventCmd): """The command for the gridpack --Those are not suppose to be use interactively--""" @@ -6639,7 +6639,7 @@ def __init__(self, me_dir = None, nb_event=0, seed=0, gran=-1, *completekey, **s self.random = seed self.random_orig = self.random self.granularity = gran - + self.options['automatic_html_opening'] = False #write the grid_card.dat on disk self.nb_event = int(nb_event) @@ -6680,7 +6680,7 @@ def write_RunWeb(self, me_dir): def write_gridcard(self, nb_event, seed, gran): """write the grid_card.dat file at appropriate location""" - + # first try to write grid_card within the gridpack. print("WRITE GRIDCARD", self.me_dir) if self.readonly: @@ -6689,35 +6689,35 @@ def write_gridcard(self, nb_event, seed, gran): fsock = open('grid_card.dat','w') else: fsock = open(pjoin(self.me_dir, 'Cards', 'grid_card.dat'),'w') - + gridpackcard = banner_mod.GridpackCard() gridpackcard['GridRun'] = True gridpackcard['gevents'] = nb_event gridpackcard['gseed'] = seed gridpackcard['ngran'] = gran - + gridpackcard.write(fsock) ############################################################################ def get_Pdir(self): """get the list of Pdirectory if not yet saved.""" - + if hasattr(self, "Pdirs"): if self.me_dir in self.Pdirs[0]: return self.Pdirs - + if not self.readonly: - self.Pdirs = [pjoin(self.me_dir, 'SubProcesses', l.strip()) + self.Pdirs = [pjoin(self.me_dir, 'SubProcesses', l.strip()) for l in open(pjoin(self.me_dir,'SubProcesses', 'subproc.mg'))] else: - self.Pdirs = [l.strip() - for l in open(pjoin(self.me_dir,'SubProcesses', 'subproc.mg'))] - + self.Pdirs = [l.strip() + for l in open(pjoin(self.me_dir,'SubProcesses', 'subproc.mg'))] + return self.Pdirs - + def prepare_local_dir(self): """create the P directory structure in the local directory""" - + if not self.readonly: os.chdir(self.me_dir) else: @@ -6726,7 +6726,7 @@ def prepare_local_dir(self): os.mkdir(p) files.cp(pjoin(self.me_dir,'SubProcesses',p,'symfact.dat'), pjoin(p, 'symfact.dat')) - + def launch(self, nb_event, seed): """ launch the generation for the grid """ @@ -6742,13 +6742,13 @@ def launch(self, nb_event, seed): if self.run_card['python_seed'] == -2: import random if not hasattr(random, 'mg_seedset'): - random.seed(seed) + random.seed(seed) random.mg_seedset = seed elif self.run_card['python_seed'] > 0: import random if not hasattr(random, 'mg_seedset'): - random.seed(self.run_card['python_seed']) - random.mg_seedset = self.run_card['python_seed'] + random.seed(self.run_card['python_seed']) + random.mg_seedset = self.run_card['python_seed'] # 2) Run the refine for the grid self.update_status('Generating Events', level=None) #misc.call([pjoin(self.me_dir,'bin','refine4grid'), @@ -6767,70 +6767,70 @@ def launch(self, nb_event, seed): self.exec_cmd('decay_events -from_cards', postcmd=False) elif self.run_card['use_syst'] and self.run_card['systematics_program'] == 'systematics': self.options['nb_core'] = 1 - self.exec_cmd('systematics %s --from_card' % + self.exec_cmd('systematics %s --from_card' % pjoin('Events', self.run_name, 'unweighted_events.lhe.gz'), postcmd=False,printcmd=False) - + def refine4grid(self, nb_event): """Special refine for gridpack run.""" self.nb_refine += 1 - + precision = nb_event self.opts = dict([(key,value[1]) for (key,value) in \ self._survey_options.items()]) - + # initialize / remove lhapdf mode # self.configure_directory() # All this has been done before self.cluster_mode = 0 # force single machine # Store seed in randinit file, to be read by ranmar.f self.save_random() - + self.update_status('Refine results to %s' % precision, level=None) logger.info("Using random number seed offset = %s" % self.random) refine_opt = {'err_goal': nb_event, 'split_channels': False, - 'ngran':self.granularity, 'readonly': self.readonly} + 'ngran':self.granularity, 'readonly': self.readonly} x_improve = gen_ximprove.gen_ximprove_gridpack(self, refine_opt) x_improve.launch() # create the ajob for the refinment and run those! - self.gscalefact = x_improve.gscalefact #store jacobian associate to the gridpack - - + self.gscalefact = x_improve.gscalefact #store jacobian associate to the gridpack + + #bindir = pjoin(os.path.relpath(self.dirbin, pjoin(self.me_dir,'SubProcesses'))) #print 'run combine!!!' #combine_runs.CombineRuns(self.me_dir) - + return #update html output Presults = sum_html.collect_result(self) cross, error = Presults.xsec, Presults.xerru self.results.add_detail('cross', cross) self.results.add_detail('error', error) - - + + #self.update_status('finish refine', 'parton', makehtml=False) #devnull.close() - - - + + + return self.total_jobs = 0 - subproc = [P for P in os.listdir(pjoin(self.me_dir,'SubProcesses')) if + subproc = [P for P in os.listdir(pjoin(self.me_dir,'SubProcesses')) if P.startswith('P') and os.path.isdir(pjoin(self.me_dir,'SubProcesses', P))] devnull = open(os.devnull, 'w') for nb_proc,subdir in enumerate(subproc): subdir = subdir.strip() Pdir = pjoin(self.me_dir, 'SubProcesses',subdir) bindir = pjoin(os.path.relpath(self.dirbin, Pdir)) - + logger.info(' %s ' % subdir) # clean previous run for match in misc.glob('*ajob*', Pdir): if os.path.basename(match)[:4] in ['ajob', 'wait', 'run.', 'done']: os.remove(pjoin(Pdir, match)) - + logfile = pjoin(Pdir, 'gen_ximprove.log') misc.call([pjoin(bindir, 'gen_ximprove')], @@ -6840,40 +6840,40 @@ def refine4grid(self, nb_event): if os.path.exists(pjoin(Pdir, 'ajob1')): alljobs = misc.glob('ajob*', Pdir) - nb_tot = len(alljobs) + nb_tot = len(alljobs) self.total_jobs += nb_tot for i, job in enumerate(alljobs): job = os.path.basename(job) - self.launch_job('%s' % job, cwd=Pdir, remaining=(nb_tot-i-1), + self.launch_job('%s' % job, cwd=Pdir, remaining=(nb_tot-i-1), run_type='Refine number %s on %s (%s/%s)' % (self.nb_refine, subdir, nb_proc+1, len(subproc))) if os.path.exists(pjoin(self.me_dir,'error')): self.monitor(html=True) raise MadEventError('Error detected in dir %s: %s' % \ (Pdir, open(pjoin(self.me_dir,'error')).read())) - self.monitor(run_type='All job submitted for refine number %s' % + self.monitor(run_type='All job submitted for refine number %s' % self.nb_refine) - + self.update_status("Combining runs", level='parton') try: os.remove(pjoin(Pdir, 'combine_runs.log')) except Exception: pass - + bindir = pjoin(os.path.relpath(self.dirbin, pjoin(self.me_dir,'SubProcesses'))) combine_runs.CombineRuns(self.me_dir) - + #update html output cross, error = self.make_make_all_html_results() self.results.add_detail('cross', cross) self.results.add_detail('error', error) - - + + self.update_status('finish refine', 'parton', makehtml=False) devnull.close() def do_combine_events(self, line): - """Advanced commands: Launch combine events""" + """Advanced commands: Launch combine events""" if self.readonly: outdir = 'Events' @@ -6895,17 +6895,17 @@ def do_combine_events(self, line): self.banner.add_generation_info(self.results.current['cross'], self.run_card['nevents']) if not hasattr(self, 'random_orig'): self.random_orig = 0 self.banner.change_seed(self.random_orig) - - + + if not os.path.exists(pjoin(outdir, self.run_name)): os.mkdir(pjoin(outdir, self.run_name)) - self.banner.write(pjoin(outdir, self.run_name, + self.banner.write(pjoin(outdir, self.run_name, '%s_%s_banner.txt' % (self.run_name, tag))) - - get_wgt = lambda event: event.wgt + + get_wgt = lambda event: event.wgt AllEvent = lhe_parser.MultiEventFile() AllEvent.banner = self.banner - + partials = 0 # if too many file make some partial unweighting sum_xsec, sum_xerru, sum_axsec = 0,[],0 Gdirs = self.get_Gdir() @@ -6915,7 +6915,7 @@ def do_combine_events(self, line): if os.path.exists(pjoin(Gdir, 'events.lhe')): result = sum_html.OneResult('') result.read_results(pjoin(Gdir, 'results.dat')) - AllEvent.add(pjoin(Gdir, 'events.lhe'), + AllEvent.add(pjoin(Gdir, 'events.lhe'), result.get('xsec')*gscalefact[Gdir], result.get('xerru')*gscalefact[Gdir], result.get('axsec')*gscalefact[Gdir] @@ -6924,7 +6924,7 @@ def do_combine_events(self, line): sum_xsec += result.get('xsec')*gscalefact[Gdir] sum_xerru.append(result.get('xerru')*gscalefact[Gdir]) sum_axsec += result.get('axsec')*gscalefact[Gdir] - + if len(AllEvent) >= 80: #perform a partial unweighting AllEvent.unweight(pjoin(outdir, self.run_name, "partials%s.lhe.gz" % partials), get_wgt, log_level=5, trunc_error=1e-2, event_target=self.nb_event) @@ -6933,26 +6933,26 @@ def do_combine_events(self, line): AllEvent.add(pjoin(outdir, self.run_name, "partials%s.lhe.gz" % partials), sum_xsec, math.sqrt(sum(x**2 for x in sum_xerru)), - sum_axsec) + sum_axsec) partials +=1 - + if not hasattr(self,'proc_characteristic'): self.proc_characteristic = self.get_characteristics() - + self.banner.add_generation_info(sum_xsec, self.nb_event) nb_event = AllEvent.unweight(pjoin(outdir, self.run_name, "unweighted_events.lhe.gz"), get_wgt, trunc_error=1e-2, event_target=self.nb_event, log_level=logging.DEBUG, normalization=self.run_card['event_norm'], proc_charac=self.proc_characteristic) - - + + if partials: for i in range(partials): try: os.remove(pjoin(outdir, self.run_name, "partials%s.lhe.gz" % i)) except Exception: os.remove(pjoin(outdir, self.run_name, "partials%s.lhe" % i)) - + self.results.add_detail('nb_event', nb_event) self.banner.add_generation_info(sum_xsec, nb_event) if self.run_card['bias_module'].lower() not in ['dummy', 'none']: @@ -6961,7 +6961,7 @@ def do_combine_events(self, line): class MadLoopInitializer(object): """ A container class for the various methods for initializing MadLoop. It is - placed in MadEventInterface because it is used by Madevent for loop-induced + placed in MadEventInterface because it is used by Madevent for loop-induced simulations. """ @staticmethod @@ -6974,7 +6974,7 @@ def make_and_run(dir_name,checkRam=False): if os.path.isfile(pjoin(dir_name,'check')): os.remove(pjoin(dir_name,'check')) os.remove(pjoin(dir_name,'check_sa.o')) - os.remove(pjoin(dir_name,'loop_matrix.o')) + os.remove(pjoin(dir_name,'loop_matrix.o')) # Now run make devnull = open(os.devnull, 'w') start=time.time() @@ -6996,7 +6996,7 @@ def make_and_run(dir_name,checkRam=False): stdout=devnull, stderr=devnull, close_fds=True) try: ptimer.execute() - #poll as often as possible; otherwise the subprocess might + #poll as often as possible; otherwise the subprocess might # "sneak" in some extra memory usage while you aren't looking # Accuracy of .2 seconds is enough for the timing. while ptimer.poll(): @@ -7028,7 +7028,7 @@ def fix_PSPoint_in_check(dir_path, read_ps = True, npoints = 1, If mu_r > 0.0, then the renormalization constant value will be hardcoded directly in check_sa.f, if is is 0 it will be set to Sqrt(s) and if it is < 0.0 the value in the param_card.dat is used. - If the split_orders target (i.e. the target squared coupling orders for + If the split_orders target (i.e. the target squared coupling orders for the computation) is != -1, it will be changed in check_sa.f via the subroutine CALL SET_COUPLINGORDERS_TARGET(split_orders).""" @@ -7043,12 +7043,12 @@ def fix_PSPoint_in_check(dir_path, read_ps = True, npoints = 1, file_path = pjoin(directories[0],'check_sa.f') if not os.path.isfile(file_path): raise MadGraph5Error('Could not find the location of check_sa.f'+\ - ' from the specified path %s.'%str(file_path)) + ' from the specified path %s.'%str(file_path)) file = open(file_path, 'r') check_sa = file.read() file.close() - + file = open(file_path, 'w') check_sa = re.sub(r"READPS = \S+\)","READPS = %s)"%('.TRUE.' if read_ps \ else '.FALSE.'), check_sa) @@ -7064,42 +7064,42 @@ def fix_PSPoint_in_check(dir_path, read_ps = True, npoints = 1, (("%.17e"%mu_r).replace('e','d')),check_sa) elif mu_r < 0.0: check_sa = re.sub(r"MU_R=SQRTS","",check_sa) - + if split_orders > 0: check_sa = re.sub(r"SET_COUPLINGORDERS_TARGET\(-?\d+\)", - "SET_COUPLINGORDERS_TARGET(%d)"%split_orders,check_sa) - + "SET_COUPLINGORDERS_TARGET(%d)"%split_orders,check_sa) + file.write(check_sa) file.close() - @staticmethod + @staticmethod def run_initialization(run_dir=None, SubProc_dir=None, infos=None,\ req_files = ['HelFilter.dat','LoopFilter.dat'], attempts = [4,15]): - """ Run the initialization of the process in 'run_dir' with success + """ Run the initialization of the process in 'run_dir' with success characterized by the creation of the files req_files in this directory. The directory containing the driving source code 'check_sa.f'. - The list attempt gives the successive number of PS points the + The list attempt gives the successive number of PS points the initialization should be tried with before calling it failed. Returns the number of PS points which were necessary for the init. Notice at least run_dir or SubProc_dir must be provided. A negative attempt number given in input means that quadprec will be forced for initialization.""" - + # If the user does not want detailed info, then set the dictionary # to a dummy one. if infos is None: infos={} - + if SubProc_dir is None and run_dir is None: raise MadGraph5Error('At least one of [SubProc_dir,run_dir] must'+\ ' be provided in run_initialization.') - + # If the user does not specify where is check_sa.f, then it is assumed # to be one levels above run_dir if SubProc_dir is None: SubProc_dir = os.path.abspath(pjoin(run_dir,os.pardir)) - + if run_dir is None: directories =[ dir for dir in misc.glob('P[0-9]*', SubProc_dir) if os.path.isdir(dir) ] @@ -7109,7 +7109,7 @@ def run_initialization(run_dir=None, SubProc_dir=None, infos=None,\ raise MadGraph5Error('Could not find a valid running directory'+\ ' in %s.'%str(SubProc_dir)) - # Use the presence of the file born_matrix.f to decide if it is a + # Use the presence of the file born_matrix.f to decide if it is a # loop-induced process or not. It's not crucial, but just that because # of the dynamic adjustment of the ref scale used for deciding what are # the zero contributions, more points are neeeded for loop-induced. @@ -7128,9 +7128,9 @@ def run_initialization(run_dir=None, SubProc_dir=None, infos=None,\ raise MadGraph5Error('Could not find MadLoopParams.dat at %s.'\ %MLCardPath) else: - MLCard = banner_mod.MadLoopParam(MLCardPath) + MLCard = banner_mod.MadLoopParam(MLCardPath) MLCard_orig = banner_mod.MadLoopParam(MLCard) - + # Make sure that LoopFilter really is needed. if not MLCard['UseLoopFilter']: try: @@ -7153,11 +7153,11 @@ def need_init(): proc_prefix+fname)) for fname in my_req_files]) or \ not os.path.isfile(pjoin(run_dir,'check')) or \ not os.access(pjoin(run_dir,'check'), os.X_OK) - + # Check if this is a process without born by checking the presence of the # file born_matrix.f is_loop_induced = os.path.exists(pjoin(run_dir,'born_matrix.f')) - + # For loop induced processes, always attempt quadruple precision if # double precision attempts fail and the user didn't specify himself # quadruple precision initializations attempts @@ -7166,11 +7166,11 @@ def need_init(): use_quad_prec = 1 curr_attempt = 1 - MLCard.set('WriteOutFilters',True) - + MLCard.set('WriteOutFilters',True) + while to_attempt!=[] and need_init(): curr_attempt = to_attempt.pop() - # if the attempt is a negative number it means we must force + # if the attempt is a negative number it means we must force # quadruple precision at initialization time if curr_attempt < 0: use_quad_prec = -1 @@ -7183,11 +7183,11 @@ def need_init(): MLCard.set('ZeroThres',1e-9) # Plus one because the filter are written on the next PS point after curr_attempt = abs(curr_attempt+1) - MLCard.set('MaxAttempts',curr_attempt) + MLCard.set('MaxAttempts',curr_attempt) MLCard.write(pjoin(SubProc_dir,'MadLoopParams.dat')) # initialization is performed. - MadLoopInitializer.fix_PSPoint_in_check(run_dir, read_ps = False, + MadLoopInitializer.fix_PSPoint_in_check(run_dir, read_ps = False, npoints = curr_attempt) compile_time, run_time, ram_usage = \ MadLoopInitializer.make_and_run(run_dir) @@ -7200,7 +7200,7 @@ def need_init(): infos['Process_compilation']==None: infos['Process_compilation'] = compile_time infos['Initialization'] = run_time - + MLCard_orig.write(pjoin(SubProc_dir,'MadLoopParams.dat')) if need_init(): return None @@ -7219,8 +7219,8 @@ def need_init(ML_resources_path, proc_prefix, r_files): MLCardPath = pjoin(proc_dir,'SubProcesses','MadLoopParams.dat') if not os.path.isfile(MLCardPath): raise MadGraph5Error('Could not find MadLoopParams.dat at %s.'\ - %MLCardPath) - MLCard = banner_mod.MadLoopParam(MLCardPath) + %MLCardPath) + MLCard = banner_mod.MadLoopParam(MLCardPath) req_files = ['HelFilter.dat','LoopFilter.dat'] # Make sure that LoopFilter really is needed. @@ -7234,9 +7234,9 @@ def need_init(ML_resources_path, proc_prefix, r_files): req_files.remove('HelFilter.dat') except ValueError: pass - + for v_folder in glob.iglob(pjoin(proc_dir,'SubProcesses', - '%s*'%subproc_prefix)): + '%s*'%subproc_prefix)): # Make sure it is a valid MadLoop directory if not os.path.isdir(v_folder) or not os.path.isfile(\ pjoin(v_folder,'loop_matrix.f')): @@ -7247,7 +7247,7 @@ def need_init(ML_resources_path, proc_prefix, r_files): if need_init(pjoin(proc_dir,'SubProcesses','MadLoop5_resources'), proc_prefix, req_files): return True - + return False @staticmethod @@ -7265,7 +7265,7 @@ def init_MadLoop(proc_dir, n_PS=None, subproc_prefix='PV', MG_options=None, misc.compile(arg=['treatCardsLoopNoInit'], cwd=pjoin(proc_dir,'Source')) else: interface.do_treatcards('all --no_MadLoopInit') - + # First make sure that IREGI and CUTTOOLS are compiled if needed if os.path.exists(pjoin(proc_dir,'Source','CutTools')): misc.compile(arg=['libcuttools'],cwd=pjoin(proc_dir,'Source')) @@ -7273,8 +7273,8 @@ def init_MadLoop(proc_dir, n_PS=None, subproc_prefix='PV', MG_options=None, misc.compile(arg=['libiregi'],cwd=pjoin(proc_dir,'Source')) # Then make sure DHELAS and MODEL are compiled misc.compile(arg=['libmodel'],cwd=pjoin(proc_dir,'Source')) - misc.compile(arg=['libdhelas'],cwd=pjoin(proc_dir,'Source')) - + misc.compile(arg=['libdhelas'],cwd=pjoin(proc_dir,'Source')) + # Now initialize the MadLoop outputs logger.info('Initializing MadLoop loop-induced matrix elements '+\ '(this can take some time)...') @@ -7283,7 +7283,7 @@ def init_MadLoop(proc_dir, n_PS=None, subproc_prefix='PV', MG_options=None, if MG_options: if interface and hasattr(interface, 'cluster') and isinstance(interface.cluster, cluster.MultiCore): mcore = interface.cluster - else: + else: mcore = cluster.MultiCore(**MG_options) else: mcore = cluster.onecore @@ -7294,10 +7294,10 @@ def run_initialization_wrapper(run_dir, infos, attempts): run_dir=run_dir, infos=infos) else: n_PS = MadLoopInitializer.run_initialization( - run_dir=run_dir, infos=infos, attempts=attempts) + run_dir=run_dir, infos=infos, attempts=attempts) infos['nPS'] = n_PS return 0 - + def wait_monitoring(Idle, Running, Done): if Idle+Running+Done == 0: return @@ -7307,21 +7307,21 @@ def wait_monitoring(Idle, Running, Done): init_info = {} # List all virtual folders while making sure they are valid MadLoop folders VirtualFolders = [f for f in glob.iglob(pjoin(proc_dir,'SubProcesses', - '%s*'%subproc_prefix)) if (os.path.isdir(f) or + '%s*'%subproc_prefix)) if (os.path.isdir(f) or os.path.isfile(pjoin(f,'loop_matrix.f')))] logger.debug("Now Initializing MadLoop matrix element in %d folder%s:"%\ (len(VirtualFolders),'s' if len(VirtualFolders)>1 else '')) - logger.debug(', '.join("'%s'"%os.path.basename(v_folder) for v_folder in + logger.debug(', '.join("'%s'"%os.path.basename(v_folder) for v_folder in VirtualFolders)) for v_folder in VirtualFolders: init_info[v_folder] = {} - + # We try all multiples of n_PS from 1 to max_mult, first in DP and then # in QP before giving up, or use default values if n_PS is None. max_mult = 3 if n_PS is None: # Then use the default list of number of PS points to try - mcore.submit(run_initialization_wrapper, + mcore.submit(run_initialization_wrapper, [pjoin(v_folder), init_info[v_folder], None]) else: # Use specific set of PS points @@ -7348,8 +7348,8 @@ def wait_monitoring(Idle, Running, Done): '%d PS points (%s), in %.3g(compil.) + %.3g(init.) secs.'%( abs(init['nPS']),'DP' if init['nPS']>0 else 'QP', init['Process_compilation'],init['Initialization'])) - - logger.info('MadLoop initialization finished.') + + logger.info('MadLoop initialization finished.') AskforEditCard = common_run.AskforEditCard @@ -7364,16 +7364,16 @@ def wait_monitoring(Idle, Running, Done): import os import optparse - # Get the directory of the script real path (bin) - # and add it to the current PYTHONPATH + # Get the directory of the script real path (bin) + # and add it to the current PYTHONPATH #root_path = os.path.dirname(os.path.dirname(os.path.dirname(os.path.realpath( __file__ )))) sys.path.insert(0, root_path) - class MyOptParser(optparse.OptionParser): + class MyOptParser(optparse.OptionParser): class InvalidOption(Exception): pass def error(self, msg=''): raise MyOptParser.InvalidOption(msg) - # Write out nice usage message if called with -h or --help + # Write out nice usage message if called with -h or --help usage = "usage: %prog [options] [FILE] " parser = MyOptParser(usage=usage) parser.add_option("-l", "--logging", default='INFO', @@ -7384,7 +7384,7 @@ def error(self, msg=''): help='force to launch debug mode') parser_error = '' done = False - + for i in range(len(sys.argv)-1): try: (options, args) = parser.parse_args(sys.argv[1:len(sys.argv)-i]) @@ -7394,7 +7394,7 @@ def error(self, msg=''): else: args += sys.argv[len(sys.argv)-i:] if not done: - # raise correct error: + # raise correct error: try: (options, args) = parser.parse_args() except MyOptParser.InvalidOption as error: @@ -7407,8 +7407,8 @@ def error(self, msg=''): import subprocess import logging import logging.config - # Set logging level according to the logging level given by options - #logging.basicConfig(level=vars(logging)[options.logging]) + # Set logging level according to the logging level given by options + #logging.basicConfig(level=vars(logging)[options.logging]) import internal import internal.coloring_logging # internal.file = XXX/bin/internal/__init__.py @@ -7431,13 +7431,13 @@ def error(self, msg=''): raise pass - # Call the cmd interface main loop + # Call the cmd interface main loop try: if args: # a single command is provided if '--web' in args: - i = args.index('--web') - args.pop(i) + i = args.index('--web') + args.pop(i) cmd_line = MadEventCmd(me_dir, force_run=True) else: cmd_line = MadEventCmdShell(me_dir, force_run=True) @@ -7457,13 +7457,13 @@ def error(self, msg=''): pass - - - - - - - - + + + + + + + + diff --git a/epochX/cudacpp/gg_tt01g.mad/src/cudacpp_src.mk b/epochX/cudacpp/gg_tt01g.mad/src/cudacpp_src.mk index d4cc628aec..b4e446bc45 100644 --- a/epochX/cudacpp/gg_tt01g.mad/src/cudacpp_src.mk +++ b/epochX/cudacpp/gg_tt01g.mad/src/cudacpp_src.mk @@ -1,12 +1,7 @@ # Copyright (C) 2020-2023 CERN and UCLouvain. # Licensed under the GNU Lesser General Public License (version 3 or later). # Created by: S. Roiser (Feb 2020) for the MG5aMC CUDACPP plugin. -# Further modified by: O. Mattelaer, S. Roiser, A. Valassi (2020-2023) for the MG5aMC CUDACPP plugin. - -#=== Determine the name of this makefile (https://ftp.gnu.org/old-gnu/Manuals/make-3.80/html_node/make_17.html) -#=== NB: assume that the same name (e.g. cudacpp.mk, Makefile...) is used in the Subprocess and src directories - -THISMK = $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)) +# Further modified by: S. Hageboeck, J. Teig, O. Mattelaer, S. Roiser, A. Valassi (2020-2023) for the MG5aMC CUDACPP plugin. #------------------------------------------------------------------------------- @@ -16,165 +11,24 @@ SHELL := /bin/bash #------------------------------------------------------------------------------- -#=== Configure common compiler flags for CUDA and C++ - -INCFLAGS = -I. -OPTFLAGS = -O3 # this ends up in CUFLAGS too (should it?), cannot add -Ofast or -ffast-math here - -#------------------------------------------------------------------------------- - #=== Configure the C++ compiler -CXXFLAGS = $(OPTFLAGS) -std=c++17 $(INCFLAGS) $(USE_NVTX) -fPIC -Wall -Wshadow -Wextra +include ../Source/make_opts + +MG_CXXFLAGS += -fPIC -I. $(USE_NVTX) ifeq ($(shell $(CXX) --version | grep ^nvc++),) -CXXFLAGS+= -ffast-math # see issue #117 +MG_CXXFLAGS += -ffast-math # see issue #117 endif -###CXXFLAGS+= -Ofast # performance is not different from --fast-math -###CXXFLAGS+= -g # FOR DEBUGGING ONLY # Note: AR, CXX and FC are implicitly defined if not set externally # See https://www.gnu.org/software/make/manual/html_node/Implicit-Variables.html ###RANLIB = ranlib -# Add -mmacosx-version-min=11.3 to avoid "ld: warning: object file was built for newer macOS version than being linked" -LDFLAGS = -ifneq ($(shell $(CXX) --version | egrep '^Apple clang'),) -CXXFLAGS += -mmacosx-version-min=11.3 -LDFLAGS += -mmacosx-version-min=11.3 -endif - -#------------------------------------------------------------------------------- - -#=== Configure the CUDA compiler (note: NVCC is already exported including ccache) - -###$(info NVCC=$(NVCC)) - -#------------------------------------------------------------------------------- - -#=== Configure ccache for C++ builds (note: NVCC is already exported including ccache) - -# Enable ccache if USECCACHE=1 -ifeq ($(USECCACHE)$(shell echo $(CXX) | grep ccache),1) - override CXX:=ccache $(CXX) -endif -#ifeq ($(USECCACHE)$(shell echo $(AR) | grep ccache),1) -# override AR:=ccache $(AR) -#endif - -#------------------------------------------------------------------------------- - -#=== Configure PowerPC-specific compiler flags for CUDA and C++ - -# Assuming uname is available, detect if architecture is PowerPC -UNAME_P := $(shell uname -p) - -# PowerPC-specific CXX compiler flags (being reviewed) -ifeq ($(UNAME_P),ppc64le) - CXXFLAGS+= -mcpu=power9 -mtune=power9 # gains ~2-3% both for none and sse4 - # Throughput references without the extra flags below: none=1.41-1.42E6, sse4=2.15-2.19E6 - ###CXXFLAGS+= -DNO_WARN_X86_INTRINSICS # no change - ###CXXFLAGS+= -fpeel-loops # no change - ###CXXFLAGS+= -funroll-loops # gains ~1% for none, loses ~1% for sse4 - ###CXXFLAGS+= -ftree-vectorize # no change - ###CXXFLAGS+= -flto # BUILD ERROR IF THIS ADDED IN SRC?! -else - ###AR=gcc-ar # needed by -flto - ###RANLIB=gcc-ranlib # needed by -flto - ###CXXFLAGS+= -flto # NB: build error from src/Makefile unless gcc-ar and gcc-ranlib are used - ######CXXFLAGS+= -fno-semantic-interposition # no benefit (neither alone, nor combined with -flto) -endif - -#------------------------------------------------------------------------------- - #=== Set the CUDA/C++ compiler flags appropriate to user-defined choices of AVX, FPTYPE, HELINL, HRDCOD, RNDGEN # Set the build flags appropriate to OMPFLAGS ###$(info OMPFLAGS=$(OMPFLAGS)) -CXXFLAGS += $(OMPFLAGS) - -# Set the build flags appropriate to each AVX choice (example: "make AVX=none") -# [NB MGONGPU_PVW512 is needed because "-mprefer-vector-width=256" is not exposed in a macro] -# [See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96476] -$(info AVX=$(AVX)) -ifeq ($(UNAME_P),ppc64le) - ifeq ($(AVX),sse4) - override AVXFLAGS = -D__SSE4_2__ # Power9 VSX with 128 width (VSR registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on PowerPC for the moment) - endif -else ifeq ($(UNAME_P),arm) - ifeq ($(AVX),sse4) - override AVXFLAGS = -D__SSE4_2__ # ARM NEON with 128 width (Q/quadword registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on ARM for the moment) - endif -else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 - ifeq ($(AVX),none) - override AVXFLAGS = -mno-sse3 # no SIMD - else ifeq ($(AVX),sse4) - override AVXFLAGS = -mno-avx # SSE4.2 with 128 width (xmm registers) - else ifeq ($(AVX),avx2) - override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(AVX),512y) - override AVXFLAGS = -march=skylake -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(AVX),512z) - override AVXFLAGS = -march=skylake -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) - else - $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) - endif -else - ifeq ($(AVX),none) - override AVXFLAGS = -march=x86-64 # no SIMD (see #588) - else ifeq ($(AVX),sse4) - override AVXFLAGS = -march=nehalem # SSE4.2 with 128 width (xmm registers) - else ifeq ($(AVX),avx2) - override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(AVX),512y) - override AVXFLAGS = -march=skylake-avx512 -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(AVX),512z) - override AVXFLAGS = -march=skylake-avx512 -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) - endif -endif -# For the moment, use AVXFLAGS everywhere: eventually, use them only in encapsulated implementations? -CXXFLAGS+= $(AVXFLAGS) - -# Set the build flags appropriate to each FPTYPE choice (example: "make FPTYPE=f") -###$(info FPTYPE=$(FPTYPE)) -ifeq ($(FPTYPE),d) - CXXFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_DOUBLE -else ifeq ($(FPTYPE),f) - CXXFLAGS += -DMGONGPU_FPTYPE_FLOAT -DMGONGPU_FPTYPE2_FLOAT -else ifeq ($(FPTYPE),m) - CXXFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_FLOAT -else - $(error Unknown FPTYPE='$(FPTYPE)': only 'd', 'f' and 'm' are supported) -endif - -# Set the build flags appropriate to each HELINL choice (example: "make HELINL=1") -###$(info HELINL=$(HELINL)) -ifeq ($(HELINL),1) - CXXFLAGS += -DMGONGPU_INLINE_HELAMPS -else ifneq ($(HELINL),0) - $(error Unknown HELINL='$(HELINL)': only '0' and '1' are supported) -endif - -# Set the build flags appropriate to each HRDCOD choice (example: "make HRDCOD=1") -###$(info HRDCOD=$(HRDCOD)) -ifeq ($(HRDCOD),1) - CXXFLAGS += -DMGONGPU_HARDCODE_PARAM -else ifneq ($(HRDCOD),0) - $(error Unknown HRDCOD='$(HRDCOD)': only '0' and '1' are supported) -endif - -# Set the build flags appropriate to each RNDGEN choice (example: "make RNDGEN=hasNoCurand") -###$(info RNDGEN=$(RNDGEN)) -ifeq ($(RNDGEN),hasNoCurand) - CXXFLAGS += -DMGONGPU_HAS_NO_CURAND -else ifneq ($(RNDGEN),hasCurand) - $(error Unknown RNDGEN='$(RNDGEN)': only 'hasCurand' and 'hasNoCurand' are supported) -endif +MG_CXXFLAGS += $(OMPFLAGS) #------------------------------------------------------------------------------- @@ -182,28 +36,18 @@ endif # Build directory "short" tag (defines target and path to the optional build directory) # (Rationale: keep directory names shorter, e.g. do not include random number generator choice) -override DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) +DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) # Build lockfile "full" tag (defines full specification of build options that cannot be intermixed) # (Rationale: avoid mixing of CUDA and no-CUDA environment builds with different random number generators) -override TAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) +TAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) -# Build directory: current directory by default, or build.$(DIRTAG) if USEBUILDDIR==1 -###$(info Current directory is $(shell pwd)) -ifeq ($(USEBUILDDIR),1) - override BUILDDIR = build.$(DIRTAG) - override LIBDIRREL = ../lib/$(BUILDDIR) - ###$(info Building in BUILDDIR=$(BUILDDIR) for tag=$(TAG) (USEBUILDDIR=1 is set)) -else - override BUILDDIR = . - override LIBDIRREL = ../lib - ###$(info Building in BUILDDIR=$(BUILDDIR) for tag=$(TAG) (USEBUILDDIR is not set)) -endif -######$(info Building in BUILDDIR=$(BUILDDIR) for tag=$(TAG)) +# Build directory: +BUILDDIR := build.$(DIRTAG) +LIBDIRREL := ../lib/$(BUILDDIR) # Workaround for Mac #375 (I did not manage to fix rpath with @executable_path): use absolute paths for LIBDIR # (NB: this is quite ugly because it creates the directory if it does not exist - to avoid removing src by mistake) -UNAME_S := $(shell uname -s) ifeq ($(UNAME_S),Darwin) override LIBDIR = $(shell mkdir -p $(LIBDIRREL); cd $(LIBDIRREL); pwd) ifeq ($(wildcard $(LIBDIR)),) @@ -223,55 +67,35 @@ endif MG5AMC_COMMONLIB = mg5amc_common # First target (default goal) -all.$(TAG): $(BUILDDIR)/.build.$(TAG) $(LIBDIR)/.build.$(TAG) $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so - -# Target (and build options): debug -debug: OPTFLAGS = -g -O0 -debug: all.$(TAG) - -# Target: tag-specific build lockfiles -override oldtagsb=`if [ -d $(BUILDDIR) ]; then find $(BUILDDIR) -maxdepth 1 -name '.build.*' ! -name '.build.$(TAG)' -exec echo $(shell pwd)/{} \; ; fi` -override oldtagsl=`if [ -d $(LIBDIR) ]; then find $(LIBDIR) -maxdepth 1 -name '.build.*' ! -name '.build.$(TAG)' -exec echo $(shell pwd)/{} \; ; fi` - -$(BUILDDIR)/.build.$(TAG): $(LIBDIR)/.build.$(TAG) - -$(LIBDIR)/.build.$(TAG): - @if [ "$(oldtagsl)" != "" ]; then echo -e "Cannot build for tag=$(TAG) as old builds exist in $(LIBDIR) for other tags:\n$(oldtagsl)\nPlease run 'make clean' first\nIf 'make clean' is not enough: run 'make clean USEBUILDDIR=1 AVX=$(AVX) FPTYPE=$(FPTYPE)' or 'make cleanall'"; exit 1; fi - @if [ "$(oldtagsb)" != "" ]; then echo -e "Cannot build for tag=$(TAG) as old builds exist in $(BUILDDIR) for other tags:\n$(oldtagsb)\nPlease run 'make clean' first\nIf 'make clean' is not enough: run 'make clean USEBUILDDIR=1 AVX=$(AVX) FPTYPE=$(FPTYPE)' or 'make cleanall'"; exit 1; fi - @if [ ! -d $(LIBDIR) ]; then echo "mkdir -p $(LIBDIR)"; mkdir -p $(LIBDIR); fi - @touch $(LIBDIR)/.build.$(TAG) - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - @touch $(BUILDDIR)/.build.$(TAG) +all.$(TAG): $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so #------------------------------------------------------------------------------- # Generic target and build rules: objects from C++ compilation -$(BUILDDIR)/%.o : %.cc *.h $(BUILDDIR)/.build.$(TAG) +$(BUILDDIR)/%.o : %.cc *.h @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - $(CXX) $(CPPFLAGS) $(CXXFLAGS) -fPIC -c $< -o $@ + $(CXX) $(MG_CXXFLAGS) $(CXXFLAGS) -c $< -o $@ # Generic target and build rules: objects from CUDA compilation -$(BUILDDIR)/%_cu.o : %.cc *.h $(BUILDDIR)/.build.$(TAG) +$(BUILDDIR)/%_cu.o : %.cc *.h @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c -x cu $< -o $@ + $(NVCC) $(MG_NVCCFLAGS) $(NVCCFLAGS) -c -x cu $< -o $@ #------------------------------------------------------------------------------- cxx_objects=$(addprefix $(BUILDDIR)/, Parameters_sm.o read_slha.o) -ifneq ($(NVCC),) +ifeq ($(AVX),cuda) +COMPILER=$(NVCC) cu_objects=$(addprefix $(BUILDDIR)/, Parameters_sm_cu.o) +else +COMPILER=$(CXX) +cu_objects= endif # Target (and build rules): common (src) library -ifneq ($(NVCC),) $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so : $(cxx_objects) $(cu_objects) - @if [ ! -d $(LIBDIR) ]; then echo "mkdir -p $(LIBDIR)"; mkdir -p $(LIBDIR); fi - $(NVCC) -shared -o $@ $(cxx_objects) $(cu_objects) $(LDFLAGS) -else -$(LIBDIR)/lib$(MG5AMC_COMMONLIB).so : $(cxx_objects) - @if [ ! -d $(LIBDIR) ]; then echo "mkdir -p $(LIBDIR)"; mkdir -p $(LIBDIR); fi - $(CXX) -shared -o $@ $(cxx_objects) $(LDFLAGS) -endif + mkdir -p $(LIBDIR) + $(COMPILER) -shared -o $@ $(cxx_objects) $(cu_objects) $(MG_LDFLAGS) $(LDFLAGS) #------------------------------------------------------------------------------- @@ -279,19 +103,7 @@ endif .PHONY: clean clean: -ifeq ($(USEBUILDDIR),1) - rm -rf $(LIBDIR) - rm -rf $(BUILDDIR) -else - rm -f $(LIBDIR)/.build.* $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so - rm -f $(BUILDDIR)/.build.* $(BUILDDIR)/*.o $(BUILDDIR)/*.exe -endif - -cleanall: - @echo - $(MAKE) clean -f $(THISMK) - @echo - rm -rf $(LIBDIR)/build.* - rm -rf build.* + $(RM) -f ../lib/build.*/*.so + $(RM) -rf build.* #------------------------------------------------------------------------------- diff --git a/epochX/cudacpp/gg_tt01g.mad/src/mgOnGpuCxtypes.h b/epochX/cudacpp/gg_tt01g.mad/src/mgOnGpuCxtypes.h index ca9a9f00c0..3290d314d6 100644 --- a/epochX/cudacpp/gg_tt01g.mad/src/mgOnGpuCxtypes.h +++ b/epochX/cudacpp/gg_tt01g.mad/src/mgOnGpuCxtypes.h @@ -21,10 +21,14 @@ // Complex type in cuda: thrust or cucomplex or cxsmpl #ifdef __CUDACC__ #if defined MGONGPU_CUCXTYPE_THRUST +#ifdef __CLANG__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" // for icpx2021/clang13 (https://stackoverflow.com/a/15864661) +#endif #include +#ifdef __CLANG__ #pragma clang diagnostic pop +#endif #elif defined MGONGPU_CUCXTYPE_CUCOMPLEX #include #elif not defined MGONGPU_CUCXTYPE_CXSMPL diff --git a/epochX/cudacpp/gg_ttg.mad/CODEGEN_mad_gg_ttg_log.txt b/epochX/cudacpp/gg_ttg.mad/CODEGEN_mad_gg_ttg_log.txt index b52dc31122..e5b01c714f 100644 --- a/epochX/cudacpp/gg_ttg.mad/CODEGEN_mad_gg_ttg_log.txt +++ b/epochX/cudacpp/gg_ttg.mad/CODEGEN_mad_gg_ttg_log.txt @@ -50,10 +50,9 @@ Please set the 'lhapdf' variable to the (absolute) /PATH/TO/lhapdf-config (inclu Note that you can still compile and run aMC@NLO with the built-in PDFs MG5_aMC> set lhapdf /PATH/TO/lhapdf-config -Using default text editor "vi". Set another one in ./input/mg5_configuration.txt Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt -No valid web browser found. Please set in ./input/mg5_configuration.txt -import /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg.mg +Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt +import /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg.mg The import format was not given, so we guess it as command set stdout_level DEBUG set output information to level: 10 @@ -62,7 +61,7 @@ generate g g > t t~ g No model currently active, so we import the Standard Model INFO: load particles INFO: load vertices -DEBUG: model prefixing takes 0.0053288936614990234  +DEBUG: model prefixing takes 0.0033996105194091797  INFO: Restrict model sm with file models/sm/restrict_default.dat . DEBUG: Simplifying conditional expressions  DEBUG: remove interactions: u s w+ at order: QED=1  @@ -155,7 +154,7 @@ INFO: Please specify coupling orders to bypass this step. INFO: Trying coupling order WEIGHTED<=3: WEIGTHED IS QCD+2*QED INFO: Trying process: g g > t t~ g WEIGHTED<=3 @1 INFO: Process has 16 diagrams -1 processes with 16 diagrams generated in 0.021 s +1 processes with 16 diagrams generated in 0.016 s Total: 1 processes with 16 diagrams output madevent ../TMPOUT/CODEGEN_mad_gg_ttg --hel_recycling=False --vector_size=32 --me_exporter=standalone_cudacpp Load PLUGIN.CUDACPP_OUTPUT @@ -166,16 +165,16 @@ Load PLUGIN.CUDACPP_OUTPUT INFO: initialize a new directory: CODEGEN_mad_gg_ttg INFO: remove old information in CODEGEN_mad_gg_ttg DEBUG: Entering PLUGIN_ProcessExporter.copy_template (initialise the directory) [output.py at line 165]  -WARNING: File exists /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg  -INFO: Creating subdirectories in directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg -WARNING: File exists /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/Cards  -WARNING: File exists /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/SubProcesses  +WARNING: File exists /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg  +INFO: Creating subdirectories in directory /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg +WARNING: File exists /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/Cards  +WARNING: File exists /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/SubProcesses  INFO: Organizing processes into subprocess groups INFO: Generating Helas calls for process: g g > t t~ g WEIGHTED<=3 @1 INFO: Processing color information for process: g g > t t~ g @1 INFO: Creating files in directory P1_gg_ttxg DEBUG: kwargs[prefix] = 0 [model_handling.py at line 1058]  -DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  +DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  INFO: Creating files in directory . FileWriter for ././CPPProcess.h FileWriter for ././CPPProcess.cc @@ -190,15 +189,15 @@ INFO: Created files CPPProcess.h and CPPProcess.cc in directory ./. DEBUG: vector, subproc_group,self.opt['vector_size'] =  32 True 32 [export_v4.py at line 1872]  INFO: Generating Feynman diagrams for Process: g g > t t~ g WEIGHTED<=3 @1 INFO: Finding symmetric diagrams for subprocess group gg_ttxg -Generated helas calls for 1 subprocesses (16 diagrams) in 0.037 s -Wrote files for 36 helas calls in 0.155 s +Generated helas calls for 1 subprocesses (16 diagrams) in 0.028 s +Wrote files for 36 helas calls in 0.112 s ALOHA: aloha starts to compute helicity amplitudes ALOHA: aloha creates VVV1 routines ALOHA: aloha creates FFV1 routines ALOHA: aloha creates VVVV1 set of routines with options: P0 ALOHA: aloha creates VVVV3 set of routines with options: P0 ALOHA: aloha creates VVVV4 set of routines with options: P0 -ALOHA: aloha creates 5 routines in 0.326 s +ALOHA: aloha creates 5 routines in 0.218 s DEBUG: Entering PLUGIN_ProcessExporter.convert_model (create the model) [output.py at line 202]  ALOHA: aloha starts to compute helicity amplitudes ALOHA: aloha creates VVV1 routines @@ -206,7 +205,7 @@ ALOHA: aloha creates FFV1 routines ALOHA: aloha creates VVVV1 set of routines with options: P0 ALOHA: aloha creates VVVV3 set of routines with options: P0 ALOHA: aloha creates VVVV4 set of routines with options: P0 -ALOHA: aloha creates 10 routines in 0.327 s +ALOHA: aloha creates 10 routines in 0.199 s VVV1 VVV1 FFV1 @@ -216,45 +215,46 @@ ALOHA: aloha creates 10 routines in 0.327 s VVVV1 VVVV3 VVVV4 -FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/src/./HelAmps_sm.h -INFO: Created file HelAmps_sm.h in directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/src/. +FileWriter for /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/src/./HelAmps_sm.h +INFO: Created file HelAmps_sm.h in directory /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/src/. super_write_set_parameters_onlyfixMajorana (hardcoded=False) super_write_set_parameters_onlyfixMajorana (hardcoded=True) -FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/src/./Parameters_sm.h -FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/src/./Parameters_sm.cc +FileWriter for /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/src/./Parameters_sm.h +FileWriter for /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/src/./Parameters_sm.cc INFO: Created files Parameters_sm.h and Parameters_sm.cc in directory -INFO: /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/src/. and /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/src/. +INFO: /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/src/. and /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/src/. The option zerowidth_tchannel is modified [True] but will not be written in the configuration files. If you want to make this value the default for future session, you can run 'save options --all' -save configuration file to /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/Cards/me5_configuration.txt +save configuration file to /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/Cards/me5_configuration.txt INFO: Use Fortran compiler gfortran INFO: Use c++ compiler g++ INFO: Generate web pages -DEBUG: cd /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg; patch -p4 -i /data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common +DEBUG: cd /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg; patch -p4 -i /data/stephan/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common patching file Source/genps.inc +patching file Source/make_opts +Hunk #1 succeeded at 12 (offset -1 lines). +Hunk #2 succeeded at 70 (offset -1 lines). +Hunk #3 succeeded at 117 (offset -1 lines). +Hunk #4 succeeded at 128 (offset -1 lines). patching file Source/makefile patching file SubProcesses/makefile +patching file bin/internal/banner.py patching file bin/internal/gen_ximprove.py -Hunk #1 succeeded at 391 (offset 6 lines). patching file bin/internal/madevent_interface.py -DEBUG: cd /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/SubProcesses/P1_gg_ttxg; patch -p6 -i /data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 +DEBUG: cd /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/SubProcesses/P1_gg_ttxg; patch -p6 -i /data/stephan/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 patching file auto_dsig1.f patching file driver.f patching file matrix1.f -Hunk #2 succeeded at 159 (offset 16 lines). -Hunk #3 succeeded at 237 (offset 16 lines). -Hunk #4 succeeded at 265 (offset 16 lines). -Hunk #5 succeeded at 310 (offset 16 lines). DEBUG: p.returncode =  0 [output.py at line 237]  -Output to directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg done. +Output to directory /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg done. Type "launch" to generate events from this process, or see -/data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/README +/data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/README Run "open index.html" to see more information about this process. quit -real 0m2.189s -user 0m1.943s -sys 0m0.223s +real 0m1.712s +user 0m1.388s +sys 0m0.318s ************************************************************ * * * W E L C O M E to * @@ -275,12 +275,11 @@ sys 0m0.223s * Type 'help' for in-line help. * * * ************************************************************ -INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/Cards/me5_configuration.txt -INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo/input/mg5_configuration.txt -INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/Cards/me5_configuration.txt -Using default text editor "vi". Set another one in ./input/mg5_configuration.txt +INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/Cards/me5_configuration.txt +INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/mg5amcnlo/input/mg5_configuration.txt +INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/Cards/me5_configuration.txt Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt -No valid web browser found. Please set in ./input/mg5_configuration.txt +Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt treatcards run quit INFO: @@ -305,12 +304,11 @@ launch in debug mode * Type 'help' for in-line help. * * * ************************************************************ -INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/Cards/me5_configuration.txt -INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo/input/mg5_configuration.txt -INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/Cards/me5_configuration.txt -Using default text editor "vi". Set another one in ./input/mg5_configuration.txt +INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/Cards/me5_configuration.txt +INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/mg5amcnlo/input/mg5_configuration.txt +INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/Cards/me5_configuration.txt Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt -No valid web browser found. Please set in ./input/mg5_configuration.txt +Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt treatcards param quit INFO: diff --git a/epochX/cudacpp/gg_ttg.mad/Cards/delphes_trigger.dat b/epochX/cudacpp/gg_ttg.mad/Cards/delphes_trigger.dat deleted file mode 100644 index 0aab0677aa..0000000000 --- a/epochX/cudacpp/gg_ttg.mad/Cards/delphes_trigger.dat +++ /dev/null @@ -1,20 +0,0 @@ -#TRIGGER CARD # DO NOT REMOVE THIS IS A TAG! - -# list of trigger algorithms -# trigger_name >> algorithm #comments -Inclusive electron >> ELEC1_PT: '29' -di-electron >> ELEC1_PT: '17' && ELEC2_PT: '17' -Inclusive Photon >> GAMMA1_PT: '80' -di-Photon >> GAMMA1_PT: '40' && GAMMA2_PT: '25' -Inclusive muon >> MUON1_PT: '19' -di-muon >> MUON1_PT: '7' && MUON2_PT: '7' -Taujet and ETmis >> TAU1_PT: '86' && ETMIS_PT: '65' -di-Taujets >> TAU1_PT: '59' && TAU2_PT: '59' -Jet and ETmis >> JET1_PT: '180' && ETMIS_PT: '123' -Taujet and electron >> TAU1_PT: '45' && ELEC1_PT: '19' -Taujet and muon >> TAU1_PT: '40' && ELEC1_PT: '15' -Inclusive b-jet >> Bjet1_PT: '237' -Inclusive 1 jet >> JET1_PT: '657' -Inclusive 3 jets >> JET1_PT: '247' && JET2_PT: '247' && JET3_PT: '247' -Inclusive 4 jets >> JET1_PT: '113' && JET2_PT: '113' && JET3_PT: '113' && JET4_PT: '113' - diff --git a/epochX/cudacpp/gg_ttg.mad/Cards/me5_configuration.txt b/epochX/cudacpp/gg_ttg.mad/Cards/me5_configuration.txt index cdeedc7863..22f81b5926 100644 --- a/epochX/cudacpp/gg_ttg.mad/Cards/me5_configuration.txt +++ b/epochX/cudacpp/gg_ttg.mad/Cards/me5_configuration.txt @@ -234,7 +234,7 @@ # pineappl = pineappl -#mg5_path = /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo +#mg5_path = /data/stephan/madgraph4gpu/MG5aMC/mg5amcnlo # MG5 MAIN DIRECTORY -#mg5_path = /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo +#mg5_path = /data/stephan/madgraph4gpu/MG5aMC/mg5amcnlo diff --git a/epochX/cudacpp/gg_ttg.mad/Cards/plot_card.dat b/epochX/cudacpp/gg_ttg.mad/Cards/plot_card.dat deleted file mode 100644 index 9abe1cc05e..0000000000 --- a/epochX/cudacpp/gg_ttg.mad/Cards/plot_card.dat +++ /dev/null @@ -1,203 +0,0 @@ -#************************************************************************** -# Card for MadAnalysis * -# * -# This file is used to set the classes and options for * -# the MadAnalysis program. * -# * -# * -# Some comments about the classes * -# 1. Plots are for classes of particles. * -# 2. Each particle is identified by its PDG code. * -# 3. Classes names are arbitrary (4 symbols max, no spaces allowed). * -# 4. Particles in the same class will be ordered with the 'ordering * -# function' in the file in_func.f. * -# 5. Classes can be added/edited/removed at will, and given a name * -# that will then appear in the plots. * -# 6. A particle can be put in one class only. Putting a particle in * -# two or more classes can lead to double counting of events. * -# 7. The class name mET is missing Energy and its name is reserved. * -# If used, it must be put last in the classes list below. * -# 8. If events contain particles not belonging to an existing class, * -# a new class will automatically be generated. * -# 9. For LHCO events the PDG code 21 is assigned to a jet (not * -# b-tagged), 5 to a b-tagged jet and 12 to missing ET. * -# * -# * -# Some comments about the cuts * -# 1. In the file kin_func.f the functions on which cuts can be applied * -# are given. * -# 2. The syntax is as follows. * -# etmin 1 3 30d0 * -# means that from the first class the Et of the first three particles * -# has to be greater than 30 GeV. * -# * -# etmissmin 20d0 * -# means that there must be at least 20 GeV of missing Et * -# * -# dRmin 2 1 4 3 3d0 * -# means that the distance between the first particle in the second * -# class and the first three particles in the fourth class has to be * -# greater than 3. * -# * -# ptmax 1 3 10d0 * -# ptmax 1 2 15d0 * -# means that the maximum pt of the third particle in the first class * -# has to smaller than 10 GeV, and the first two particles of this * -# class has to be smaller than 15 GeV * -# 3. The ordering of the particles within a class can be set with the * -# 'ordering function' in the file kin_func.f. * -# 4. For all the 'min' cuts, an event will be thrown away if the particle * -# does not exist. On the other hand, for all the 'max' cuts the cut * -# will be ignored if the particle does not exist * -# (Only dRij is an exception, for which it is the other way around) * -# * -# * -# * -# Some comments about the plotting options * -# 1. In the file kin_func.f the functions can be found that can be * -# plotted. (only for off-line usage) * -# 2. With the plotting options one can set the number of plots for each * -# of these functions. * -# 3. One has to specify for each variable which particles from which * -# class are used to set the plots. Syntax: * -# et 2 4 * -# means that the transverse energy of the first four particles in the * -# second class will be plotted. * -# mij 1 3 * -# mij 2 2 * -# means that for the invariant mass plots the first three particles * -# from the first class and the first two from the second class will be * -# used to plot the invariant mass of two particles. (10 plots) * -# 4. The ordering of the particles in a class can be set with the * -# 'ordering_function'. pt, e and et are valid functions. (For off-line * -# users X1, X2 and X3 can also be used, if defined in kin_func.f.) * -# 5. Max number of plots is 200. * -# * -# * -#************************************************************************** -# Put here your list of classes -#************************************************************************** -# Do NOT put spaces before class names! -# Begin Classes # This is TAG. Do not modify this line -jet 1 -1 2 -2 3 -3 4 -4 21 # Class number 1 -b 5 -5 # Class number 2 -mET 12 -12 14 -14 16 -16 1000022 # Missing ET class, name is reserved -# End Classes # This is TAG. Do not modify this line -#************************************************************************** -ordering_function pt # orders particles in classes according to their pt -normalization xsec # histogram normalization, xsec or number (e.g. 1) -#************************************************************************** -# Put here list of minimum pt for the classes -#************************************************************************** -# Begin Minpts # This is TAG. Do not modify this line -#1 30 -#2 40 -#3 10 -# End Minpts # This is TAG. Do not modify this line -#************************************************************************** -# Cuts on plotted events -#************************************************************************** -# Modify the cuts and remove the pounds/hashes to apply those cuts -# Do NOT put spaces at the beginning of the following lines! -# Begin Cuts # This is TAG. Do not modify this line -#etmin 2 2 40d0 -#etmin 2 1 80d0 -#etmin 1 3 20d0 -#etmax 2 1 200d0 -#ptmin 3 1 0d0 -#etmissmin 20d0 -#etmissmax 80d0 -#etamax 1 1 1d0 -#etamax 2 1 2d0 -#etamin 2 2 1.5d0 -#etamin 2 1 2d0 -#mijmax 2 1 2 2 200d0 -#mijmin 2 1 2 2 100d0 -#X1min 2 1 40d0 -#X1max 2 2 50d0 -#dRijmin 2 1 2 2 0.7d0 -#dRijmax 1 3 2 2 0.7d0 -#XY1min 2 2 2 2 20d0 -#XYZA2max 2 2 2 2 4 1 5 1 40d0 -# End Cuts # This is TAG. Do not modify this line -#************************************************************************** -# Put here the required plots -#************************************************************************** -# Do NOT put spaces at the beginning of the following lines! -# Begin PlotDefs # This is TAG. Do not modify this line -pt 1 4 # plot pt for the first four particles in class 1 -pt 2 4 # plot pt for the first four particles in class 2 -pt 3 4 # plot pt for the first four particles in class 3 -pt 4 4 # plot pt for the first four particles in class 4 -pt 5 4 # etc. -pt 6 4 -pt 7 4 -#e 2 2 -y 1 4 # plot rapidity for the first four particles in class 1 -y 2 4 -y 3 4 -y 4 4 -y 5 4 -y 6 4 -y 7 4 -#eta 2 2 # plot pseudo-rapidity for the first two part in the 2nd class -#mom 4 1 -#costh 5 1 -#phi 2 2 -#delta_eta 2 2 -#delta_eta 4 1 -mij 1 4 # use the first four particles in the 1st class to plot inv. mass -mij 2 2 # use the first two particles from the second class as well -mij 3 1 # etc. -mij 4 1 -mij 5 1 -mij 6 1 -mij 7 1 -#cosij 1 2 -#cosij 2 2 -#cosij 3 1 -#cosij 4 1 -dRij 1 4 -dRij 2 2 -dRij 3 1 -dRij 4 1 -dRij 5 1 -dRij 6 1 -dRij 7 1 -#delta_phi 2 2 -#delta_phi 4 1 -#delta_phi 5 1 -#X1 2 2 # plot X1 (defined in kin_func.f) -#XYZA1 2 2 -#XYZA1 4 1 -#XYZA1 5 1 -# End PlotDefs # This is TAG. Do not modify this line -#************************************************************************** -#************************************************************************** -# Put here the plot ranges -#************************************************************************** -# Do NOT put spaces at the beginning of the following lines! -# Begin PlotRange # This is TAG. Do not modify this line -pt 10 0 500 # bin size, min value, max value -et 10 0 500 # bin size, min value, max value -etmiss 10 0 500 # bin size, min value, max value -ht 20 0 1500 -y 0.2 -5 5 # etc. -mij 20 0 1500 -dRij 0.1 0 5 -#delta_phi 0.1 0 3.1 -#X1 1 0 100 -#XYZA1 1 0 100 -# End PlotRange # This is TAG. Do not modify this line -#************************************************************************** -#************************************************************************** -# Output for plots -#************************************************************************** -# Do NOT put spaces at the beginning of the following lines! -# Begin PlotOutput # This is TAG. Do not modify this line -output topdrawer # set to topdrawer or gnuplot -plot_decayed no # plot (and cut) dec. res.? (Only for LHE events) -# End PlotOutput # This is TAG. Do not modify this line -#************************************************************************** -# -# diff --git a/epochX/cudacpp/gg_ttg.mad/Source/DHELAS/aloha_file.inc b/epochX/cudacpp/gg_ttg.mad/Source/DHELAS/aloha_file.inc index 9d01a65cec..7639734c1c 100644 --- a/epochX/cudacpp/gg_ttg.mad/Source/DHELAS/aloha_file.inc +++ b/epochX/cudacpp/gg_ttg.mad/Source/DHELAS/aloha_file.inc @@ -1 +1 @@ -ALOHARoutine = VVV1_0.o VVV1P0_1.o FFV1_0.o FFV1_1.o FFV1_2.o FFV1P0_3.o VVVV1P0_1.o VVVV3P0_1.o VVVV4P0_1.o +ALOHARoutine = FFV1P0_3.o FFV1_0.o FFV1_1.o FFV1_2.o VVV1P0_1.o VVV1_0.o VVVV1P0_1.o VVVV3P0_1.o VVVV4P0_1.o diff --git a/epochX/cudacpp/gg_ttg.mad/Source/make_opts b/epochX/cudacpp/gg_ttg.mad/Source/make_opts index e4b87ee6ad..435bed0dc7 100644 --- a/epochX/cudacpp/gg_ttg.mad/Source/make_opts +++ b/epochX/cudacpp/gg_ttg.mad/Source/make_opts @@ -1,7 +1,7 @@ DEFAULT_CPP_COMPILER=g++ DEFAULT_F2PY_COMPILER=f2py3 DEFAULT_F_COMPILER=gfortran -GLOBAL_FLAG=-O3 -ffast-math -fbounds-check +GLOBAL_FLAG=-O3 -ffast-math MACFLAG= MG5AMC_VERSION=SpecifiedByMG5aMCAtRunTime PYTHIA8_PATH=NotInstalled @@ -13,31 +13,53 @@ BIASLIBDIR=../../../lib/ BIASLIBRARY=libbias.$(libext) # Rest of the makefile -ifeq ($(origin FFLAGS),undefined) -FFLAGS= -w -fPIC -#FFLAGS+= -g -fbounds-check -ffpe-trap=invalid,zero,overflow,underflow,denormal -Wall -fimplicit-none -endif -FFLAGS += $(GLOBAL_FLAG) +#=== Detect O/S and architecture (assuming uname is available, https://en.wikipedia.org/wiki/Uname) + +# Detect O/S kernel (Linux, Darwin...) +UNAME_S := $(shell uname -s) + +# Detect architecture (x86_64, ppc64le...) +UNAME_P := $(shell uname -p) + +#------------------------------------------------------------------------------- # REMOVE MACFLAG IF NOT ON MAC OR FOR F2PY -UNAME := $(shell uname -s) ifdef f2pymode MACFLAG= else -ifneq ($(UNAME), Darwin) +ifneq ($(UNAME_S), Darwin) MACFLAG= endif endif +############################################################ +# Default compiler flags +# To change optimisation level, override these as follows: +# make CXXFLAGS="-O0 -g" +# or export them as environment variables +# For debugging Fortran, one could e.g. use: +# FCFLAGS="-g -fbounds-check -ffpe-trap=invalid,zero,overflow,underflow,denormal -Wall -fimplicit-none" +############################################################ +FCFLAGS ?= $(GLOBAL_FLAG) -fbounds-check +CXXFLAGS ?= $(GLOBAL_FLAG) -DNDEBUG +NVCCFLAGS ?= $(GLOBAL_FLAG) -DNDEBUG -use_fast_math -lineinfo +LDFLAGS ?= $(STDLIB) -ifeq ($(origin CXXFLAGS),undefined) -CXXFLAGS= -O $(STDLIB_FLAG) $(MACFLAG) +ifneq ($(FFLAGS),) +# Madgraph used to use FFLAGS, so the user probably tries to change the flags specifically for madgraph: +FCFLAGS = $(FFLAGS) endif -ifeq ($(origin CFLAGS),undefined) -CFLAGS= -O $(STDLIB_FLAG) $(MACFLAG) +# Madgraph-specific flags: +WARNFLAGS = -Wall -Wshadow -Wextra +ifeq (,$(findstring -std=,$(CXXFLAGS))) +CXXSTANDARD= -std=c++17 endif +MG_FCFLAGS += -fPIC -w +MG_CXXFLAGS += -fPIC $(CXXSTANDARD) $(WARNFLAGS) $(MACFLAG) +MG_NVCCFLAGS += -fPIC $(CXXSTANDARD) --forward-unknown-to-host-compiler $(WARNFLAGS) +MG_LDFLAGS += $(MACFLAG) # Set FC unless it's defined by an environment variable ifeq ($(origin FC),default) @@ -49,45 +71,40 @@ endif # Increase the number of allowed charcters in a Fortran line ifeq ($(FC), ftn) -FFLAGS+= -extend-source # for ifort type of compiler +MG_FCFLAGS += -extend-source # for ifort type of compiler else VERS="$(shell $(FC) --version | grep ifort -i)" ifeq ($(VERS), "") -FFLAGS+= -ffixed-line-length-132 +MG_FCFLAGS += -ffixed-line-length-132 else -FFLAGS+= -extend-source # for ifort type of compiler +MG_FCFLAGS += -extend-source # for ifort type of compiler endif endif -UNAME := $(shell uname -s) -ifeq ($(origin LDFLAGS), undefined) -LDFLAGS=$(STDLIB) $(MACFLAG) -endif - # Options: dynamic, lhapdf # Option dynamic -ifeq ($(UNAME), Darwin) +ifeq ($(UNAME_S), Darwin) dylibext=dylib else dylibext=so endif ifdef dynamic -ifeq ($(UNAME), Darwin) +ifeq ($(UNAME_S), Darwin) libext=dylib -FFLAGS+= -fno-common -LDFLAGS += -bundle +MG_FCFLAGS += -fno-common +MG_LDFLAGS += -bundle define CREATELIB $(FC) -dynamiclib -undefined dynamic_lookup -o $(1) $(2) endef else libext=so -FFLAGS+= -fPIC -LDFLAGS += -shared +MG_FCFLAGS += -fPIC +MG_LDFLAGS += -shared define CREATELIB -$(FC) $(FFLAGS) $(LDFLAGS) -o $(1) $(2) +$(FC) $(MG_FCFLAGS) $(FCFLAGS) $(MG_LDFLAGS) $(LDFLAGS) -o $(1) $(2) endef endif else @@ -101,17 +118,9 @@ endif # Option lhapdf ifneq ($(lhapdf),) -CXXFLAGS += $(shell $(lhapdf) --cppflags) +MG_CXXFLAGS += $(shell $(lhapdf) --cppflags) alfas_functions=alfas_functions_lhapdf llhapdf+= $(shell $(lhapdf) --cflags --libs) -lLHAPDF -# check if we need to activate c++11 (for lhapdf6.2) -ifeq ($(origin CXX),default) -ifeq ($lhapdfversion$lhapdfsubversion,62) -CXX=$(DEFAULT_CPP_COMPILER) -std=c++11 -else -CXX=$(DEFAULT_CPP_COMPILER) -endif -endif else alfas_functions=alfas_functions llhapdf= @@ -120,4 +129,207 @@ endif # Helper function to check MG5 version define CHECK_MG5AMC_VERSION python -c 'import re; from distutils.version import StrictVersion; print StrictVersion("$(MG5AMC_VERSION)") >= StrictVersion("$(1)") if re.match("^[\d\.]+$$","$(MG5AMC_VERSION)") else True;' -endef \ No newline at end of file +endef + +#------------------------------------------------------------------------------- + +# Set special cases for non-gcc/clang builds +# AVX below gets overridden from outside in architecture-specific builds +AVX ?= none +# [NB MGONGPU_PVW512 is needed because "-mprefer-vector-width=256" is not exposed in a macro] +# [See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96476] +$(info AVX=$(AVX)) +ifeq ($(UNAME_P),arm) + ifeq ($(AVX),sse4) + override AVXFLAGS = -D__SSE4_2__ # ARM NEON with 128 width (Q/quadword registers) + endif +else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 + ifeq ($(AVX),none) + override AVXFLAGS = -mno-sse3 # no SIMD + else ifeq ($(AVX),sse4) + override AVXFLAGS = -mno-avx # SSE4.2 with 128 width (xmm registers) + else ifeq ($(AVX),avx2) + override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] + else ifeq ($(AVX),512y) + override AVXFLAGS = -march=skylake -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] + else ifeq ($(AVX),512z) + override AVXFLAGS = -march=skylake -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) + else + $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) + endif +endif + +# For the moment, use AVXFLAGS everywhere: eventually, use them only in encapsulated implementations? +MG_CXXFLAGS+= $(AVXFLAGS) + +#------------------------------------------------------------------------------- + +#=== Configure the CUDA compiler if available + +# If CXX is not a single word (example "clang++ --gcc-toolchain...") then disable CUDA builds (issue #505) +# This is because it is impossible to pass this to "CUFLAGS += -ccbin " below +ifneq ($(words $(subst ccache ,,$(CXX))),1) # allow at most "CXX=ccache " from outside + $(warning CUDA builds are not supported for multi-word CXX "$(CXX)") + override CUDA_HOME=disabled +endif + +# If CUDA_HOME is not set, try to set it from the location of nvcc +ifndef CUDA_HOME + CUDA_HOME = $(patsubst %bin/nvcc,%,$(shell which nvcc 2>/dev/null)) + $(info CUDA_HOME="$(CUDA_HOME)") +endif + +# Set NVCC as $(CUDA_HOME)/bin/nvcc if it exists +ifneq ($(wildcard $(CUDA_HOME)/bin/nvcc),) + NVCC = $(CUDA_HOME)/bin/nvcc + USE_NVTX ?=-DUSE_NVTX + # See https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html + # See https://arnon.dk/matching-sm-architectures-arch-and-gencode-for-various-nvidia-cards/ + # Default: use compute capability 70 (Volta architecture), and embed PTX to support later architectures, too. + # Set MADGRAPH_CUDA_ARCHITECTURE to the desired value to change the default. + # Build for multiple architectures using a space-separated list, e.g. MADGRAPH_CUDA_ARCHITECTURE="70 80" + MADGRAPH_CUDA_ARCHITECTURE ?= 70 + # Generate PTX for the first architecture: + CUARCHFLAGS := --generate-code arch=compute_$(firstword $(MADGRAPH_CUDA_ARCHITECTURE)),code=compute_$(firstword $(MADGRAPH_CUDA_ARCHITECTURE)) + # Generate device code for all architectures: + CUARCHFLAGS += $(foreach arch,$(MADGRAPH_CUDA_ARCHITECTURE), --generate-code arch=compute_$(arch),code=sm_$(arch)) + + CUINC = -I$(CUDA_HOME)/include/ + CURANDLIBFLAGS = -L$(CUDA_HOME)/lib64/ -lcurand # NB: -lcuda is not needed here! + MG_LDFLAGS += $(CURANDLIBFLAGS) + MG_NVCCFLAGS += $(CUINC) $(USE_NVTX) $(CUARCHFLAGS) + +else ifeq ($(AVX),cuda) + $(error nvcc is not visible in PATH. Either add it to PATH or export CUDA_HOME to compile with cuda) + ifeq ($(AVX),cuda) + $(error Cannot compile for cuda without NVCC) + endif +endif + +# Set the host C++ compiler for nvcc via "-ccbin " +# (NB issue #505: this must be a single word, "clang++ --gcc-toolchain..." is not supported) +MG_NVCCFLAGS += -ccbin $(shell which $(subst ccache ,,$(CXX))) + +# Allow newer (unsupported) C++ compilers with older versions of CUDA if ALLOW_UNSUPPORTED_COMPILER_IN_CUDA is set (#504) +ifneq ($(origin ALLOW_UNSUPPORTED_COMPILER_IN_CUDA),undefined) +MG_NVCCFLAGS += -allow-unsupported-compiler +endif + +#------------------------------------------------------------------------------- + +#=== Configure ccache for C++ and CUDA builds + +# Enable ccache if USECCACHE=1 +ifeq ($(USECCACHE)$(shell echo $(CXX) | grep ccache),1) + override CXX:=ccache $(CXX) +endif + +ifneq ($(NVCC),) + ifeq ($(USECCACHE)$(shell echo $(NVCC) | grep ccache),1) + override NVCC:=ccache $(NVCC) + endif +endif + +#------------------------------------------------------------------------------- + +#=== Configure PowerPC-specific compiler flags for C++ and CUDA + +# PowerPC-specific CXX / CUDA compiler flags (being reviewed) +ifeq ($(UNAME_P),ppc64le) + MG_CXXFLAGS+= -mcpu=power9 -mtune=power9 # gains ~2-3% both for none and sse4 + MG_NVCCFLAGS+= -Xcompiler -mno-float128 + + ifeq ($(AVX),sse4) + override AVXFLAGS = -D__SSE4_2__ # Power9 VSX with 128 width (VSR registers) + endif +endif + +#------------------------------------------------------------------------------- +#=== Apple-specific compiler/linker options + +# Add -std=c++17 explicitly to avoid build errors on macOS +# Add -mmacosx-version-min=11.3 to avoid "ld: warning: object file was built for newer macOS version than being linked" +ifneq ($(shell $(CXX) --version | egrep '^Apple clang'),) +MG_CXXFLAGS += -std=c++17 -mmacosx-version-min=11.3 +endif + +ifeq ($(UNAME_S),Darwin) +STDLIB = -lc++ # avoid 'Undefined symbols' for chrono::steady_clock on macOS (checked with otool -L libmg5amc_gg_ttx_cpp.so) +MG_LDFLAGS += -mmacosx-version-min=11.3 # avoid "ld: warning: object file was built for newer macOS version than being linked" +else +MG_LDFLAGS += -Xlinker --no-relax # avoid 'failed to convert GOTPCREL relocation' error #458 (not supported on macOS) +endif + +#------------------------------------------------------------------------------- + +#=== C++/CUDA-specific flags for floating-point types and random generators to use + +# Set the default FPTYPE (floating point type) choice +FPTYPE ?= m + +# Set the default HELINL (inline helicities?) choice +HELINL ?= 0 + +# Set the default HRDCOD (hardcode cIPD physics parameters?) choice +HRDCOD ?= 0 + +# Set the default RNDGEN (random number generator) choice +ifeq ($(NVCC),) + RNDGEN ?= hasNoCurand +else + RNDGEN ?= hasCurand +endif + +# Export AVX, FPTYPE, HELINL, HRDCOD, RNDGEN, OMPFLAGS so sub-makes don't go back to the defaults +export AVX +export AVXFLAGS +export FPTYPE +export HELINL +export HRDCOD +export RNDGEN + +#=== Set the CUDA/C++ compiler flags appropriate to user-defined choices of AVX, FPTYPE, HELINL, HRDCOD, RNDGEN + +# Set the build flags appropriate to each FPTYPE choice (example: "make FPTYPE=f") +# $(info FPTYPE=$(FPTYPE)) +ifeq ($(FPTYPE),d) + COMMONFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_DOUBLE +else ifeq ($(FPTYPE),f) + COMMONFLAGS += -DMGONGPU_FPTYPE_FLOAT -DMGONGPU_FPTYPE2_FLOAT +else ifeq ($(FPTYPE),m) + COMMONFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_FLOAT +else + $(error Unknown FPTYPE='$(FPTYPE)': only 'd', 'f' and 'm' are supported) +endif + +# Set the build flags appropriate to each HELINL choice (example: "make HELINL=1") +# $(info HELINL=$(HELINL)) +ifeq ($(HELINL),1) + COMMONFLAGS += -DMGONGPU_INLINE_HELAMPS +else ifneq ($(HELINL),0) + $(error Unknown HELINL='$(HELINL)': only '0' and '1' are supported) +endif + +# Set the build flags appropriate to each HRDCOD choice (example: "make HRDCOD=1") +# $(info HRDCOD=$(HRDCOD)) +ifeq ($(HRDCOD),1) + COMMONFLAGS += -DMGONGPU_HARDCODE_PARAM +else ifneq ($(HRDCOD),0) + $(error Unknown HRDCOD='$(HRDCOD)': only '0' and '1' are supported) +endif + +# Set the build flags appropriate to each RNDGEN choice (example: "make RNDGEN=hasNoCurand") +$(info RNDGEN=$(RNDGEN)) +ifeq ($(RNDGEN),hasNoCurand) + override CXXFLAGSCURAND = -DMGONGPU_HAS_NO_CURAND + override CURANDLIBFLAGS = +else ifeq ($(RNDGEN),hasCurand) + CXXFLAGSCURAND = $(CUINC) +else + $(error Unknown RNDGEN='$(RNDGEN)': only 'hasCurand' and 'hasNoCurand' are supported) +endif + +MG_CXXFLAGS += $(COMMONFLAGS) +MG_NVCCFLAGS += $(COMMONFLAGS) + +#------------------------------------------------------------------------------- diff --git a/epochX/cudacpp/gg_ttg.mad/Source/makefile b/epochX/cudacpp/gg_ttg.mad/Source/makefile index 00c73099a0..407b1b753e 100644 --- a/epochX/cudacpp/gg_ttg.mad/Source/makefile +++ b/epochX/cudacpp/gg_ttg.mad/Source/makefile @@ -10,8 +10,8 @@ include make_opts # Source files -PROCESS= hfill.o matrix.o myamp.o -DSAMPLE = dsample.o ranmar.o DiscreteSampler.o StringCast.o +PROCESS = hfill.o matrix.o myamp.o +DSAMPLE = dsample.o ranmar.o DiscreteSampler.o StringCast.o HBOOK = hfill.o hcurve.o hbook1.o hbook2.o GENERIC = $(alfas_functions).o transpole.o invarients.o hfill.o pawgraphs.o ran1.o \ rw_events.o rw_routines.o kin_functions.o open_file.o basecode.o setrun.o \ @@ -22,7 +22,7 @@ GENSUDGRID = gensudgrid.o is-sud.o setrun_gen.o rw_routines.o open_file.o # Locally compiled libraries -LIBRARIES=$(LIBDIR)libdsample.$(libext) $(LIBDIR)libgeneric.$(libext) +LIBRARIES=$(LIBDIR)libdsample.$(libext) $(LIBDIR)libgeneric.$(libext) # Binaries @@ -32,6 +32,9 @@ BINARIES = $(BINDIR)gen_ximprove $(BINDIR)gensudgrid $(BINDIR)combine_runs all: $(LIBRARIES) $(LIBDIR)libdhelas.$(libext) $(LIBDIR)libpdf.$(libext) $(LIBDIR)libgammaUPC.$(libext) $(LIBDIR)libmodel.$(libext) $(LIBDIR)libcernlib.$(libext) $(LIBDIR)libbias.$(libext) +%.o: %.f *.inc + $(FC) -I. $(MG_FCFLAGS) $(FCFLAGS) -c $< -o $@ + # Libraries $(LIBDIR)libdsample.$(libext): $(DSAMPLE) @@ -39,36 +42,35 @@ $(LIBDIR)libdsample.$(libext): $(DSAMPLE) $(LIBDIR)libgeneric.$(libext): $(GENERIC) $(call CREATELIB, $@, $^) $(LIBDIR)libdhelas.$(libext): DHELAS - cd DHELAS; make; cd .. + $(MAKE) -C $< FFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" FCFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" $(LIBDIR)libpdf.$(libext): PDF make_opts - cd PDF; make; cd .. + $(MAKE) -C $< FFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" FCFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" ifneq (,$(filter edff chff, $(pdlabel1) $(pdlabel2))) $(LIBDIR)libgammaUPC.$(libext): PDF/gammaUPC - cd PDF/gammaUPC; make ; cd ../../ + $(MAKE) -C $< FFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" FCFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" else $(LIBDIR)libgammaUPC.$(libext): PDF/gammaUPC - cd PDF/gammaUPC; make -f makefile_dummy; cd ../../ -endif + $(MAKE) -C $< -f makefile_dummy FFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" FCFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" +endif $(LIBDIR)libcernlib.$(libext): CERNLIB - cd CERNLIB; make; cd .. + $(MAKE) -C $< FFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" FCFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" # The bias library is here the dummy by default; compilation of other ones specified in the run_card will be done by MG5aMC directly. $(LIBDIR)libbias.$(libext): BIAS/dummy - cd BIAS/dummy; make; cd ../../ + $(MAKE) -C $< FFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" FCFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" $(LIBDIR)libmodel.$(libext): MODEL param_card.inc - cd MODEL; make + $(MAKE) -C $< FFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" FCFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" param_card.inc: ../Cards/param_card.dat ../bin/madevent treatcards param + touch $@ # madevent doesn't update the time stamp if there's nothing to do -$(BINDIR)gen_ximprove: gen_ximprove.o ranmar.o rw_routines.o open_file.o - $(FC) $(LDFLAGS) -o $@ $^ -#$(BINDIR)combine_events: $(COMBINE) $(LIBDIR)libmodel.$(libext) $(LIBDIR)libpdf.$(libext) $(LIBDIR)libgammaUPC.$(libext) run_card.inc $(LIBDIR)libbias.$(libext) -# $(FC) -o $@ $(COMBINE) -L$(LIBDIR) -lmodel -lpdf -lgammaUPC $(llhapdf) $(LDFLAGS) -lbias +$(BINDIR)gen_ximprove: gen_ximprove.o ranmar.o rw_routines.o open_file.o + $(FC) $(MG_LDFLAGS) $(LDFLAGS) -o $@ $^ $(BINDIR)gensudgrid: $(GENSUDGRID) $(LIBDIR)libpdf.$(libext) $(LIBDIR)libgammaUPC.$(libext) $(LIBDIR)libcernlib.$(libext) - $(FC) -o $@ $(GENSUDGRID) -L$(LIBDIR) -lmodel -lpdf -lgammaUPC -lcernlib $(llhapdf) $(LDFLAGS) + $(FC) -o $@ $(GENSUDGRID) -L$(LIBDIR) -lmodel -lpdf -lgammaUPC -lcernlib $(llhapdf) $(MG_LDFLAGS) $(LDFLAGS) # Dependencies @@ -85,6 +87,7 @@ rw_events.o: rw_events.f run_config.inc run_card.inc: ../Cards/run_card.dat ../bin/madevent treatcards run + touch $@ # madevent doesn't update the time stamp if there's nothing to do clean4pdf: rm -f ../lib/libpdf.$(libext) @@ -120,7 +123,7 @@ $(LIBDIR)libiregi.a: $(IREGIDIR) cd $(IREGIDIR); make ln -sf ../Source/$(IREGIDIR)libiregi.a $(LIBDIR)libiregi.a -cleanSource: +clean: $(RM) *.o $(LIBRARIES) $(BINARIES) cd PDF; make clean; cd .. cd PDF/gammaUPC; make clean; cd ../../ @@ -132,11 +135,3 @@ cleanSource: cd BIAS/ptj_bias; make clean; cd ../.. if [ -d $(CUTTOOLSDIR) ]; then cd $(CUTTOOLSDIR); make clean; cd ..; fi if [ -d $(IREGIDIR) ]; then cd $(IREGIDIR); make clean; cd ..; fi - -clean: cleanSource - for i in `ls -d ../SubProcesses/P*`; do cd $$i; make clean; cd -; done; - -cleanavx: - for i in `ls -d ../SubProcesses/P*`; do cd $$i; make cleanavxs; cd -; done; -cleanall: cleanSource # THIS IS THE ONE - for i in `ls -d ../SubProcesses/P*`; do cd $$i; make cleanavxs; cd -; done; diff --git a/epochX/cudacpp/gg_ttg.mad/SubProcesses/Bridge.h b/epochX/cudacpp/gg_ttg.mad/SubProcesses/Bridge.h index bf8b5e024d..c263f39a62 100644 --- a/epochX/cudacpp/gg_ttg.mad/SubProcesses/Bridge.h +++ b/epochX/cudacpp/gg_ttg.mad/SubProcesses/Bridge.h @@ -236,7 +236,7 @@ namespace mg5amcCpu #ifdef __CUDACC__ if( ( m_nevt < s_gputhreadsmin ) || ( m_nevt % s_gputhreadsmin != 0 ) ) throw std::runtime_error( "Bridge constructor: nevt should be a multiple of " + std::to_string( s_gputhreadsmin ) ); - while( m_nevt != m_gpublocks * m_gputhreads ) + while( m_nevt != static_cast( m_gpublocks * m_gputhreads ) ) { m_gputhreads /= 2; if( m_gputhreads < s_gputhreadsmin ) @@ -266,7 +266,7 @@ namespace mg5amcCpu template void Bridge::set_gpugrid( const int gpublocks, const int gputhreads ) { - if( m_nevt != gpublocks * gputhreads ) + if( m_nevt != static_cast( gpublocks * gputhreads ) ) throw std::runtime_error( "Bridge: gpublocks*gputhreads must equal m_nevt in set_gpugrid" ); m_gpublocks = gpublocks; m_gputhreads = gputhreads; diff --git a/epochX/cudacpp/gg_ttg.mad/SubProcesses/MadgraphTest.h b/epochX/cudacpp/gg_ttg.mad/SubProcesses/MadgraphTest.h index ef40624c88..b0f2250c25 100644 --- a/epochX/cudacpp/gg_ttg.mad/SubProcesses/MadgraphTest.h +++ b/epochX/cudacpp/gg_ttg.mad/SubProcesses/MadgraphTest.h @@ -199,10 +199,6 @@ class MadgraphTest : public testing::TestWithParam } }; -// Since we link both the CPU-only and GPU tests into the same executable, we prevent -// a multiply defined symbol by only compiling this in the non-CUDA phase: -#ifndef __CUDACC__ - /// Compare momenta and matrix elements. /// This uses an implementation of TestDriverBase to run a madgraph workflow, /// and compares momenta and matrix elements with a reference file. @@ -307,6 +303,4 @@ TEST_P( MadgraphTest, CompareMomentaAndME ) } } -#endif // __CUDACC__ - #endif /* MADGRAPHTEST_H_ */ diff --git a/epochX/cudacpp/gg_ttg.mad/SubProcesses/MatrixElementKernels.cc b/epochX/cudacpp/gg_ttg.mad/SubProcesses/MatrixElementKernels.cc index 74b5239ebf..2d6f27cd5d 100644 --- a/epochX/cudacpp/gg_ttg.mad/SubProcesses/MatrixElementKernels.cc +++ b/epochX/cudacpp/gg_ttg.mad/SubProcesses/MatrixElementKernels.cc @@ -196,6 +196,9 @@ namespace mg5amcGpu void MatrixElementKernelDevice::setGrid( const int gpublocks, const int gputhreads ) { + m_gpublocks = gpublocks; + m_gputhreads = gputhreads; + if( m_gpublocks == 0 ) throw std::runtime_error( "MatrixElementKernelDevice: gpublocks must be > 0 in setGrid" ); if( m_gputhreads == 0 ) throw std::runtime_error( "MatrixElementKernelDevice: gputhreads must be > 0 in setGrid" ); if( this->nevt() != m_gpublocks * m_gputhreads ) throw std::runtime_error( "MatrixElementKernelDevice: nevt mismatch in setGrid" ); diff --git a/epochX/cudacpp/gg_ttg.mad/SubProcesses/P1_gg_ttxg/check_sa.cc b/epochX/cudacpp/gg_ttg.mad/SubProcesses/P1_gg_ttxg/check_sa.cc index 3fbf0ffbee..07b7304b17 100644 --- a/epochX/cudacpp/gg_ttg.mad/SubProcesses/P1_gg_ttxg/check_sa.cc +++ b/epochX/cudacpp/gg_ttg.mad/SubProcesses/P1_gg_ttxg/check_sa.cc @@ -81,7 +81,7 @@ namespace mg5amcGpu namespace mg5amcCpu #endif { - inline void FPEhandler( int sig ) + inline void FPEhandler( int ) { #ifdef __CUDACC__ std::cerr << "Floating Point Exception (GPU)" << std::endl; diff --git a/epochX/cudacpp/gg_ttg.mad/SubProcesses/P1_gg_ttxg/counters.cc b/epochX/cudacpp/gg_ttg.mad/SubProcesses/P1_gg_ttxg/counters.cc index 3bbdec9387..cf875e8be4 100644 --- a/epochX/cudacpp/gg_ttg.mad/SubProcesses/P1_gg_ttxg/counters.cc +++ b/epochX/cudacpp/gg_ttg.mad/SubProcesses/P1_gg_ttxg/counters.cc @@ -32,6 +32,8 @@ extern "C" case +0: return "CudaCpp"; break; default: assert( false ); break; } + + return 0; } static mgOnGpu::Timer program_timer; diff --git a/epochX/cudacpp/gg_ttg.mad/SubProcesses/cudacpp.mk b/epochX/cudacpp/gg_ttg.mad/SubProcesses/cudacpp.mk index 509307506b..a522ddb335 100644 --- a/epochX/cudacpp/gg_ttg.mad/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/gg_ttg.mad/SubProcesses/cudacpp.mk @@ -1,56 +1,41 @@ # Copyright (C) 2020-2023 CERN and UCLouvain. # Licensed under the GNU Lesser General Public License (version 3 or later). # Created by: S. Roiser (Feb 2020) for the MG5aMC CUDACPP plugin. -# Further modified by: O. Mattelaer, S. Roiser, A. Valassi (2020-2023) for the MG5aMC CUDACPP plugin. - -#=== Determine the name of this makefile (https://ftp.gnu.org/old-gnu/Manuals/make-3.80/html_node/make_17.html) -#=== NB: use ':=' to ensure that the value of CUDACPP_MAKEFILE is not modified further down after including make_opts -#=== NB: use 'override' to ensure that the value can not be modified from the outside -override CUDACPP_MAKEFILE := $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)) -###$(info CUDACPP_MAKEFILE='$(CUDACPP_MAKEFILE)') - -#=== NB: different names (e.g. cudacpp.mk and cudacpp_src.mk) are used in the Subprocess and src directories -override CUDACPP_SRC_MAKEFILE = cudacpp_src.mk - -#------------------------------------------------------------------------------- - -#=== Use bash in the Makefile (https://www.gnu.org/software/make/manual/html_node/Choosing-the-Shell.html) - -SHELL := /bin/bash - -#------------------------------------------------------------------------------- - -#=== Detect O/S and architecture (assuming uname is available, https://en.wikipedia.org/wiki/Uname) - -# Detect O/S kernel (Linux, Darwin...) -UNAME_S := $(shell uname -s) -###$(info UNAME_S='$(UNAME_S)') - -# Detect architecture (x86_64, ppc64le...) -UNAME_P := $(shell uname -p) -###$(info UNAME_P='$(UNAME_P)') - -#------------------------------------------------------------------------------- - -#=== Include the common MG5aMC Makefile options - -# OM: this is crucial for MG5aMC flag consistency/documentation -# AV: temporarely comment this out because it breaks cudacpp builds -ifneq ($(wildcard ../../Source/make_opts),) -include ../../Source/make_opts -endif +# Further modified by: S. Hageboeck, J. Teig, O. Mattelaer, S. Roiser, A. Valassi (2020-2023) for the MG5aMC CUDACPP plugin. + +# This makefile extends the Fortran makefile called "makefile" + +CUDACPP_SRC_MAKEFILE = cudacpp_src.mk + +# Self-invocation with adapted flags: +cppnative: $(SOURCEDIR_GUARD) $(PROCESS) + $(MAKE) AVX=native AVXFLAGS="-march=native" cppbuild +cppnone: $(SOURCEDIR_GUARD) $(PROCESS) + $(MAKE) AVX=none AVXFLAGS= cppbuild +cppsse4: $(SOURCEDIR_GUARD) $(PROCESS) + $(MAKE) AVX=sse4 AVXFLAGS=-march=nehalem cppbuild +cppavx2: $(SOURCEDIR_GUARD) $(PROCESS) + $(MAKE) AVX=avx2 AVXFLAGS=-march=haswell cppbuild +cppavx512y: $(SOURCEDIR_GUARD) $(PROCESS) + $(MAKE) AVX=512y AVXFLAGS="-march=skylake-avx512 -mprefer-vector-width=256" cppbuild +cppavx512z: $(SOURCEDIR_GUARD) $(PROCESS) + $(MAKE) AVX=512z AVXFLAGS="-march=skylake-avx512 -DMGONGPU_PVW512" cppbuild +cuda: $(SOURCEDIR_GUARD) $(PROCESS) + $(MAKE) AVX=cuda cudabuild #------------------------------------------------------------------------------- #=== Configure common compiler flags for C++ and CUDA +# NB: The base flags are defined in the fortran "makefile" + +# Include directories +INCFLAGS = -I. -I../../src -INCFLAGS = -I. -OPTFLAGS = -O3 # this ends up in CUFLAGS too (should it?), cannot add -Ofast or -ffast-math here +MG_CXXFLAGS += $(INCFLAGS) +MG_NVCCFLAGS += $(INCFLAGS) # Dependency on src directory -MG5AMC_COMMONLIB = mg5amc_common -LIBFLAGS = -L$(LIBDIR) -l$(MG5AMC_COMMONLIB) -INCFLAGS += -I../../src +MG5AMC_COMMONLIB = mg5amc_common # Compiler-specific googletest build directory (#125 and #738) ifneq ($(shell $(CXX) --version | grep '^Intel(R) oneAPI DPC++/C++ Compiler'),) @@ -99,356 +84,42 @@ endif #------------------------------------------------------------------------------- -#=== Configure the C++ compiler - -CXXFLAGS = $(OPTFLAGS) -std=c++17 $(INCFLAGS) -Wall -Wshadow -Wextra -ifeq ($(shell $(CXX) --version | grep ^nvc++),) -CXXFLAGS += -ffast-math # see issue #117 -endif -###CXXFLAGS+= -Ofast # performance is not different from --fast-math -###CXXFLAGS+= -g # FOR DEBUGGING ONLY - -# Optionally add debug flags to display the full list of flags (eg on Darwin) -###CXXFLAGS+= -v - -# Note: AR, CXX and FC are implicitly defined if not set externally -# See https://www.gnu.org/software/make/manual/html_node/Implicit-Variables.html - -# Add -mmacosx-version-min=11.3 to avoid "ld: warning: object file was built for newer macOS version than being linked" -ifneq ($(shell $(CXX) --version | egrep '^Apple clang'),) -CXXFLAGS += -mmacosx-version-min=11.3 -endif - -#------------------------------------------------------------------------------- - -#=== Configure the CUDA compiler - -# If CXX is not a single word (example "clang++ --gcc-toolchain...") then disable CUDA builds (issue #505) -# This is because it is impossible to pass this to "CUFLAGS += -ccbin " below -ifneq ($(words $(subst ccache ,,$(CXX))),1) # allow at most "CXX=ccache " from outside - $(warning CUDA builds are not supported for multi-word CXX "$(CXX)") - override CUDA_HOME=disabled -endif - -# If CUDA_HOME is not set, try to set it from the location of nvcc -ifndef CUDA_HOME - CUDA_HOME = $(patsubst %bin/nvcc,%,$(shell which nvcc 2>/dev/null)) - $(warning CUDA_HOME was not set: using "$(CUDA_HOME)") -endif - -# Set NVCC as $(CUDA_HOME)/bin/nvcc if it exists -ifneq ($(wildcard $(CUDA_HOME)/bin/nvcc),) - NVCC = $(CUDA_HOME)/bin/nvcc - USE_NVTX ?=-DUSE_NVTX - # See https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html - # See https://arnon.dk/matching-sm-architectures-arch-and-gencode-for-various-nvidia-cards/ - # Default: use compute capability 70 for V100 (CERN lxbatch, CERN itscrd, Juwels Cluster). - # Embed device code for 70, and PTX for 70+. - # Export MADGRAPH_CUDA_ARCHITECTURE (comma-separated list) to use another value or list of values (see #533). - # Examples: use 60 for P100 (Piz Daint), 80 for A100 (Juwels Booster, NVidia raplab/Curiosity). - MADGRAPH_CUDA_ARCHITECTURE ?= 70 - ###CUARCHFLAGS = -gencode arch=compute_$(MADGRAPH_CUDA_ARCHITECTURE),code=compute_$(MADGRAPH_CUDA_ARCHITECTURE) -gencode arch=compute_$(MADGRAPH_CUDA_ARCHITECTURE),code=sm_$(MADGRAPH_CUDA_ARCHITECTURE) # Older implementation (AV): go back to this one for multi-GPU support #533 - ###CUARCHFLAGS = --gpu-architecture=compute_$(MADGRAPH_CUDA_ARCHITECTURE) --gpu-code=sm_$(MADGRAPH_CUDA_ARCHITECTURE),compute_$(MADGRAPH_CUDA_ARCHITECTURE) # Newer implementation (SH): cannot use this as-is for multi-GPU support #533 - comma:=, - CUARCHFLAGS = $(foreach arch,$(subst $(comma), ,$(MADGRAPH_CUDA_ARCHITECTURE)),-gencode arch=compute_$(arch),code=compute_$(arch) -gencode arch=compute_$(arch),code=sm_$(arch)) - CUINC = -I$(CUDA_HOME)/include/ - ifeq ($(RNDGEN),hasNoCurand) - CURANDLIBFLAGS= - else - CURANDLIBFLAGS = -L$(CUDA_HOME)/lib64/ -lcurand # NB: -lcuda is not needed here! - endif - CUOPTFLAGS = -lineinfo - CUFLAGS = $(foreach opt, $(OPTFLAGS), -Xcompiler $(opt)) $(CUOPTFLAGS) $(INCFLAGS) $(CUINC) $(USE_NVTX) $(CUARCHFLAGS) -use_fast_math - ###CUFLAGS += -Xcompiler -Wall -Xcompiler -Wextra -Xcompiler -Wshadow - ###NVCC_VERSION = $(shell $(NVCC) --version | grep 'Cuda compilation tools' | cut -d' ' -f5 | cut -d, -f1) - CUFLAGS += -std=c++17 # need CUDA >= 11.2 (see #333): this is enforced in mgOnGpuConfig.h - # Without -maxrregcount: baseline throughput: 6.5E8 (16384 32 12) up to 7.3E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 160 # improves throughput: 6.9E8 (16384 32 12) up to 7.7E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 128 # improves throughput: 7.3E8 (16384 32 12) up to 7.6E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 96 # degrades throughput: 4.1E8 (16384 32 12) up to 4.5E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 64 # degrades throughput: 1.7E8 (16384 32 12) flat at 1.7E8 (65536 128 12) -else ifneq ($(origin REQUIRE_CUDA),undefined) - # If REQUIRE_CUDA is set but no cuda is found, stop here (e.g. for CI tests on GPU #443) - $(error No cuda installation found (set CUDA_HOME or make nvcc visible in PATH)) -else - # No cuda. Switch cuda compilation off and go to common random numbers in C++ - $(warning CUDA_HOME is not set or is invalid: export CUDA_HOME to compile with cuda) - override NVCC= - override USE_NVTX= - override CUINC= - override CURANDLIBFLAGS= -endif -export NVCC -export CUFLAGS - -# Set the host C++ compiler for nvcc via "-ccbin " -# (NB issue #505: this must be a single word, "clang++ --gcc-toolchain..." is not supported) -CUFLAGS += -ccbin $(shell which $(subst ccache ,,$(CXX))) - -# Allow newer (unsupported) C++ compilers with older versions of CUDA if ALLOW_UNSUPPORTED_COMPILER_IN_CUDA is set (#504) -ifneq ($(origin ALLOW_UNSUPPORTED_COMPILER_IN_CUDA),undefined) -CUFLAGS += -allow-unsupported-compiler -endif - -#------------------------------------------------------------------------------- - -#=== Configure ccache for C++ and CUDA builds - -# Enable ccache if USECCACHE=1 -ifeq ($(USECCACHE)$(shell echo $(CXX) | grep ccache),1) - override CXX:=ccache $(CXX) -endif -#ifeq ($(USECCACHE)$(shell echo $(AR) | grep ccache),1) -# override AR:=ccache $(AR) -#endif -ifneq ($(NVCC),) - ifeq ($(USECCACHE)$(shell echo $(NVCC) | grep ccache),1) - override NVCC:=ccache $(NVCC) - endif -endif - -#------------------------------------------------------------------------------- - -#=== Configure PowerPC-specific compiler flags for C++ and CUDA - -# PowerPC-specific CXX compiler flags (being reviewed) -ifeq ($(UNAME_P),ppc64le) - CXXFLAGS+= -mcpu=power9 -mtune=power9 # gains ~2-3% both for none and sse4 - # Throughput references without the extra flags below: none=1.41-1.42E6, sse4=2.15-2.19E6 - ###CXXFLAGS+= -DNO_WARN_X86_INTRINSICS # no change - ###CXXFLAGS+= -fpeel-loops # no change - ###CXXFLAGS+= -funroll-loops # gains ~1% for none, loses ~1% for sse4 - ###CXXFLAGS+= -ftree-vectorize # no change - ###CXXFLAGS+= -flto # would increase to none=4.08-4.12E6, sse4=4.99-5.03E6! -else - ###CXXFLAGS+= -flto # also on Intel this would increase throughputs by a factor 2 to 4... - ######CXXFLAGS+= -fno-semantic-interposition # no benefit (neither alone, nor combined with -flto) -endif - -# PowerPC-specific CUDA compiler flags (to be reviewed!) -ifeq ($(UNAME_P),ppc64le) - CUFLAGS+= -Xcompiler -mno-float128 -endif - -#------------------------------------------------------------------------------- - #=== Configure defaults and check if user-defined choices exist for OMPFLAGS, AVX, FPTYPE, HELINL, HRDCOD, RNDGEN # Set the default OMPFLAGS choice -ifneq ($(shell $(CXX) --version | egrep '^Intel'),) -override OMPFLAGS = -fopenmp -###override OMPFLAGS = # disable OpenMP MT on Intel (was ok without nvcc but not ok with nvcc before #578) -else ifneq ($(shell $(CXX) --version | egrep '^(clang)'),) -override OMPFLAGS = -fopenmp -###override OMPFLAGS = # disable OpenMP MT on clang (was not ok without or with nvcc before #578) -###else ifneq ($(shell $(CXX) --version | egrep '^(Apple clang)'),) # AV for Mac (Apple clang compiler) -else ifeq ($(UNAME_S),Darwin) # OM for Mac (any compiler) +OMPFLAGS ?= -fopenmp +ifeq ($(UNAME_S),Darwin) # OM for Mac (any compiler) override OMPFLAGS = # AV disable OpenMP MT on Apple clang (builds fail in the CI #578) -###override OMPFLAGS = -fopenmp # OM reenable OpenMP MT on Apple clang? (AV Oct 2023: this still fails in the CI) -else -override OMPFLAGS = -fopenmp # enable OpenMP MT by default on all other platforms -###override OMPFLAGS = # disable OpenMP MT on all other platforms (default before #575) -endif - -# Set the default AVX (vectorization) choice -ifeq ($(AVX),) - ifeq ($(UNAME_P),ppc64le) - ###override AVX = none - override AVX = sse4 - else ifeq ($(UNAME_P),arm) - ###override AVX = none - override AVX = sse4 - else ifeq ($(wildcard /proc/cpuinfo),) - override AVX = none - $(warning Using AVX='$(AVX)' because host SIMD features cannot be read from /proc/cpuinfo) - else ifeq ($(shell grep -m1 -c avx512vl /proc/cpuinfo)$(shell $(CXX) --version | grep ^clang),1) - override AVX = 512y - ###$(info Using AVX='$(AVX)' as no user input exists) - else - override AVX = avx2 - ifneq ($(shell grep -m1 -c avx512vl /proc/cpuinfo),1) - $(warning Using AVX='$(AVX)' because host does not support avx512vl) - else - $(warning Using AVX='$(AVX)' because this is faster than avx512vl for clang) - endif - endif -else - ###$(info Using AVX='$(AVX)' according to user input) -endif - -# Set the default FPTYPE (floating point type) choice -ifeq ($(FPTYPE),) - override FPTYPE = d -endif - -# Set the default HELINL (inline helicities?) choice -ifeq ($(HELINL),) - override HELINL = 0 -endif - -# Set the default HRDCOD (hardcode cIPD physics parameters?) choice -ifeq ($(HRDCOD),) - override HRDCOD = 0 -endif - -# Set the default RNDGEN (random number generator) choice -ifeq ($(RNDGEN),) - ifeq ($(NVCC),) - override RNDGEN = hasNoCurand - else ifeq ($(RNDGEN),) - override RNDGEN = hasCurand - endif endif -# Export AVX, FPTYPE, HELINL, HRDCOD, RNDGEN, OMPFLAGS so that it is not necessary to pass them to the src Makefile too -export AVX -export FPTYPE -export HELINL -export HRDCOD -export RNDGEN +# Export here, so sub makes don't fall back to the defaults: export OMPFLAGS -#------------------------------------------------------------------------------- - -#=== Set the CUDA/C++ compiler flags appropriate to user-defined choices of AVX, FPTYPE, HELINL, HRDCOD, RNDGEN - -# Set the build flags appropriate to OMPFLAGS -$(info OMPFLAGS=$(OMPFLAGS)) -CXXFLAGS += $(OMPFLAGS) - -# Set the build flags appropriate to each AVX choice (example: "make AVX=none") -# [NB MGONGPU_PVW512 is needed because "-mprefer-vector-width=256" is not exposed in a macro] -# [See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96476] -$(info AVX=$(AVX)) -ifeq ($(UNAME_P),ppc64le) - ifeq ($(AVX),sse4) - override AVXFLAGS = -D__SSE4_2__ # Power9 VSX with 128 width (VSR registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on PowerPC for the moment) - endif -else ifeq ($(UNAME_P),arm) - ifeq ($(AVX),sse4) - override AVXFLAGS = -D__SSE4_2__ # ARM NEON with 128 width (Q/quadword registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on ARM for the moment) - endif -else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 - ifeq ($(AVX),none) - override AVXFLAGS = -mno-sse3 # no SIMD - else ifeq ($(AVX),sse4) - override AVXFLAGS = -mno-avx # SSE4.2 with 128 width (xmm registers) - else ifeq ($(AVX),avx2) - override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(AVX),512y) - override AVXFLAGS = -march=skylake -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(AVX),512z) - override AVXFLAGS = -march=skylake -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) - else - $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) - endif -else - ifeq ($(AVX),none) - override AVXFLAGS = -march=x86-64 # no SIMD (see #588) - else ifeq ($(AVX),sse4) - override AVXFLAGS = -march=nehalem # SSE4.2 with 128 width (xmm registers) - else ifeq ($(AVX),avx2) - override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(AVX),512y) - override AVXFLAGS = -march=skylake-avx512 -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(AVX),512z) - override AVXFLAGS = -march=skylake-avx512 -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) - else - $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) - endif -endif -# For the moment, use AVXFLAGS everywhere: eventually, use them only in encapsulated implementations? -CXXFLAGS+= $(AVXFLAGS) - -# Set the build flags appropriate to each FPTYPE choice (example: "make FPTYPE=f") -$(info FPTYPE=$(FPTYPE)) -ifeq ($(FPTYPE),d) - CXXFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_DOUBLE - CUFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_DOUBLE -else ifeq ($(FPTYPE),f) - CXXFLAGS += -DMGONGPU_FPTYPE_FLOAT -DMGONGPU_FPTYPE2_FLOAT - CUFLAGS += -DMGONGPU_FPTYPE_FLOAT -DMGONGPU_FPTYPE2_FLOAT -else ifeq ($(FPTYPE),m) - CXXFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_FLOAT - CUFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_FLOAT -else - $(error Unknown FPTYPE='$(FPTYPE)': only 'd', 'f' and 'm' are supported) -endif - -# Set the build flags appropriate to each HELINL choice (example: "make HELINL=1") -$(info HELINL=$(HELINL)) -ifeq ($(HELINL),1) - CXXFLAGS += -DMGONGPU_INLINE_HELAMPS - CUFLAGS += -DMGONGPU_INLINE_HELAMPS -else ifneq ($(HELINL),0) - $(error Unknown HELINL='$(HELINL)': only '0' and '1' are supported) -endif - -# Set the build flags appropriate to each HRDCOD choice (example: "make HRDCOD=1") -$(info HRDCOD=$(HRDCOD)) -ifeq ($(HRDCOD),1) - CXXFLAGS += -DMGONGPU_HARDCODE_PARAM - CUFLAGS += -DMGONGPU_HARDCODE_PARAM -else ifneq ($(HRDCOD),0) - $(error Unknown HRDCOD='$(HRDCOD)': only '0' and '1' are supported) -endif - -# Set the build flags appropriate to each RNDGEN choice (example: "make RNDGEN=hasNoCurand") -$(info RNDGEN=$(RNDGEN)) -ifeq ($(RNDGEN),hasNoCurand) - override CXXFLAGSCURAND = -DMGONGPU_HAS_NO_CURAND -else ifeq ($(RNDGEN),hasCurand) - override CXXFLAGSCURAND = -else - $(error Unknown RNDGEN='$(RNDGEN)': only 'hasCurand' and 'hasNoCurand' are supported) -endif +MG_CXXFLAGS += $(OMPFLAGS) #------------------------------------------------------------------------------- #=== Configure build directories and build lockfiles === -# Build directory "short" tag (defines target and path to the optional build directory) -# (Rationale: keep directory names shorter, e.g. do not include random number generator choice) -override DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) - -# Build lockfile "full" tag (defines full specification of build options that cannot be intermixed) -# (Rationale: avoid mixing of CUDA and no-CUDA environment builds with different random number generators) -override TAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) - -# Build directory: current directory by default, or build.$(DIRTAG) if USEBUILDDIR==1 -ifeq ($(USEBUILDDIR),1) - override BUILDDIR = build.$(DIRTAG) - override LIBDIR = ../../lib/$(BUILDDIR) - override LIBDIRRPATH = '$$ORIGIN/../$(LIBDIR)' - $(info Building in BUILDDIR=$(BUILDDIR) for tag=$(TAG) (USEBUILDDIR is set = 1)) -else - override BUILDDIR = . - override LIBDIR = ../../lib - override LIBDIRRPATH = '$$ORIGIN/$(LIBDIR)' - $(info Building in BUILDDIR=$(BUILDDIR) for tag=$(TAG) (USEBUILDDIR is not set)) +# Build directory "short" tag (defines target and path to the build directory) +DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) +CUDACPP_BUILDDIR = build.$(DIRTAG) +CUDACPP_LIBDIR := ../../lib/$(CUDACPP_BUILDDIR) +LIBDIRRPATH := '$$ORIGIN:$$ORIGIN/../$(CUDACPP_LIBDIR)' +ifneq ($(AVX),) + $(info Building CUDACPP in CUDACPP_BUILDDIR=$(CUDACPP_BUILDDIR). Libs in $(CUDACPP_LIBDIR)) endif -###override INCDIR = ../../include -###$(info Building in BUILDDIR=$(BUILDDIR) for tag=$(TAG)) -# On Linux, set rpath to LIBDIR to make it unnecessary to use LD_LIBRARY_PATH +# On Linux, set rpath to CUDACPP_LIBDIR to make it unnecessary to use LD_LIBRARY_PATH # Use relative paths with respect to the executables or shared libraries ($ORIGIN on Linux) -# On Darwin, building libraries with absolute paths in LIBDIR makes this unnecessary +# On Darwin, building libraries with absolute paths in CUDACPP_LIBDIR makes this unnecessary ifeq ($(UNAME_S),Darwin) override CXXLIBFLAGSRPATH = override CULIBFLAGSRPATH = - override CXXLIBFLAGSRPATH2 = - override CULIBFLAGSRPATH2 = else # RPATH to cuda/cpp libs when linking executables override CXXLIBFLAGSRPATH = -Wl,-rpath,$(LIBDIRRPATH) override CULIBFLAGSRPATH = -Xlinker -rpath,$(LIBDIRRPATH) - # RPATH to common lib when linking cuda/cpp libs - override CXXLIBFLAGSRPATH2 = -Wl,-rpath,'$$ORIGIN' - override CULIBFLAGSRPATH2 = -Xlinker -rpath,'$$ORIGIN' endif # Setting LD_LIBRARY_PATH or DYLD_LIBRARY_PATH in the RUNTIME is no longer necessary (neither on Linux nor on Mac) @@ -458,107 +129,68 @@ override RUNTIME = #=== Makefile TARGETS and build rules below #=============================================================================== -cxx_main=$(BUILDDIR)/check.exe -fcxx_main=$(BUILDDIR)/fcheck.exe +cxx_main=$(CUDACPP_BUILDDIR)/check.exe +fcxx_main=$(CUDACPP_BUILDDIR)/fcheck.exe -ifneq ($(NVCC),) -cu_main=$(BUILDDIR)/gcheck.exe -fcu_main=$(BUILDDIR)/fgcheck.exe -else -cu_main= -fcu_main= -endif - -testmain=$(BUILDDIR)/runTest.exe +cu_main=$(CUDACPP_BUILDDIR)/gcheck.exe +fcu_main=$(CUDACPP_BUILDDIR)/fgcheck.exe ifneq ($(GTESTLIBS),) -all.$(TAG): $(BUILDDIR)/.build.$(TAG) $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_main) $(cxx_main) $(fcu_main) $(fcxx_main) $(testmain) -else -all.$(TAG): $(BUILDDIR)/.build.$(TAG) $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_main) $(cxx_main) $(fcu_main) $(fcxx_main) +testmain=$(CUDACPP_BUILDDIR)/runTest.exe +cutestmain=$(CUDACPP_BUILDDIR)/runTest_cuda.exe endif -# Target (and build options): debug -MAKEDEBUG= -debug: OPTFLAGS = -g -O0 -debug: CUOPTFLAGS = -G -debug: MAKEDEBUG := debug -debug: all.$(TAG) - -# Target: tag-specific build lockfiles -override oldtagsb=`if [ -d $(BUILDDIR) ]; then find $(BUILDDIR) -maxdepth 1 -name '.build.*' ! -name '.build.$(TAG)' -exec echo $(shell pwd)/{} \; ; fi` -$(BUILDDIR)/.build.$(TAG): - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - @if [ "$(oldtagsb)" != "" ]; then echo "Cannot build for tag=$(TAG) as old builds exist for other tags:"; echo " $(oldtagsb)"; echo "Please run 'make clean' first\nIf 'make clean' is not enough: run 'make clean USEBUILDDIR=1 AVX=$(AVX) FPTYPE=$(FPTYPE)' or 'make cleanall'"; exit 1; fi - @touch $(BUILDDIR)/.build.$(TAG) +cppbuild: $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(cxx_main) $(fcxx_main) $(testmain) +cudabuild: $(CUDACPP_BUILDDIR)/$(PROG)_cuda $(cu_main) $(fcu_main) $(cutestmain) # Generic target and build rules: objects from CUDA compilation -ifneq ($(NVCC),) -$(BUILDDIR)/%.o : %.cu *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c $< -o $@ +$(CUDACPP_BUILDDIR)/%.o : %.cu *.h ../../src/*.h + @mkdir -p $(CUDACPP_BUILDDIR) + $(NVCC) $(MG_NVCCFLAGS) $(NVCCFLAGS) -c $< -o $@ -$(BUILDDIR)/%_cu.o : %.cc *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c -x cu $< -o $@ -endif +$(CUDACPP_BUILDDIR)/%_cu.o : %.cc *.h ../../src/*.h + @mkdir -p $(CUDACPP_BUILDDIR) + $(NVCC) $(MG_NVCCFLAGS) $(NVCCFLAGS) -c -x cu $< -o $@ # Generic target and build rules: objects from C++ compilation # (NB do not include CUINC here! add it only for NVTX or curand #679) -$(BUILDDIR)/%.o : %.cc *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - $(CXX) $(CPPFLAGS) $(CXXFLAGS) -fPIC -c $< -o $@ +$(CUDACPP_BUILDDIR)/%.o : %.cc *.h ../../src/*.h + @mkdir -p $(CUDACPP_BUILDDIR) + $(CXX) $(MG_CXXFLAGS) $(CXXFLAGS) -c $< -o $@ # Apply special build flags only to CrossSectionKernel.cc and gCrossSectionKernel.cu (no fast math, see #117 and #516) ifeq ($(shell $(CXX) --version | grep ^nvc++),) -$(BUILDDIR)/CrossSectionKernels.o: CXXFLAGS := $(filter-out -ffast-math,$(CXXFLAGS)) -$(BUILDDIR)/CrossSectionKernels.o: CXXFLAGS += -fno-fast-math +$(CUDACPP_BUILDDIR)/CrossSectionKernels.o: CXXFLAGS += -fno-fast-math ifneq ($(NVCC),) -$(BUILDDIR)/gCrossSectionKernels.o: CUFLAGS += -Xcompiler -fno-fast-math +$(CUDACPP_BUILDDIR)/gCrossSectionKernels.o: NVCCFLAGS += -Xcompiler -fno-fast-math endif endif # Apply special build flags only to check_sa.o and gcheck_sa.o (NVTX in timermap.h, #679) -$(BUILDDIR)/check_sa.o: CXXFLAGS += $(USE_NVTX) $(CUINC) -$(BUILDDIR)/gcheck_sa.o: CXXFLAGS += $(USE_NVTX) $(CUINC) +$(CUDACPP_BUILDDIR)/check_sa.o: MG_CXXFLAGS += $(USE_NVTX) $(CUINC) +$(CUDACPP_BUILDDIR)/gcheck_sa.o: MG_CXXFLAGS += $(USE_NVTX) $(CUINC) # Apply special build flags only to check_sa and CurandRandomNumberKernel (curand headers, #679) -$(BUILDDIR)/check_sa.o: CXXFLAGS += $(CXXFLAGSCURAND) -$(BUILDDIR)/gcheck_sa.o: CUFLAGS += $(CXXFLAGSCURAND) -$(BUILDDIR)/CurandRandomNumberKernel.o: CXXFLAGS += $(CXXFLAGSCURAND) -$(BUILDDIR)/gCurandRandomNumberKernel.o: CUFLAGS += $(CXXFLAGSCURAND) -ifeq ($(RNDGEN),hasCurand) -$(BUILDDIR)/CurandRandomNumberKernel.o: CXXFLAGS += $(CUINC) -endif +$(CUDACPP_BUILDDIR)/check_sa.o: MG_CXXFLAGS += $(CXXFLAGSCURAND) +$(CUDACPP_BUILDDIR)/gcheck_sa.o: MG_NVCCFLAGS += $(CXXFLAGSCURAND) +$(CUDACPP_BUILDDIR)/CurandRandomNumberKernel.o: MG_CXXFLAGS += $(CXXFLAGSCURAND) +$(CUDACPP_BUILDDIR)/gCurandRandomNumberKernel.o: MG_NVCCFLAGS += $(CXXFLAGSCURAND) + # Avoid "warning: builtin __has_trivial_... is deprecated; use __is_trivially_... instead" in nvcc with icx2023 (#592) ifneq ($(shell $(CXX) --version | egrep '^(Intel)'),) ifneq ($(NVCC),) -CUFLAGS += -Xcompiler -Wno-deprecated-builtins +MG_NVCCFLAGS += -Xcompiler -Wno-deprecated-builtins endif endif -# Avoid clang warning "overriding '-ffp-contract=fast' option with '-ffp-contract=on'" (#516) -# This patch does remove the warning, but I prefer to keep it disabled for the moment... -###ifneq ($(shell $(CXX) --version | egrep '^(clang|Apple clang|Intel)'),) -###$(BUILDDIR)/CrossSectionKernels.o: CXXFLAGS += -Wno-overriding-t-option -###ifneq ($(NVCC),) -###$(BUILDDIR)/gCrossSectionKernels.o: CUFLAGS += -Xcompiler -Wno-overriding-t-option -###endif -###endif - #### Apply special build flags only to CPPProcess.cc (-flto) ###$(BUILDDIR)/CPPProcess.o: CXXFLAGS += -flto -#### Apply special build flags only to CPPProcess.cc (AVXFLAGS) -###$(BUILDDIR)/CPPProcess.o: CXXFLAGS += $(AVXFLAGS) - #------------------------------------------------------------------------------- -# Target (and build rules): common (src) library -commonlib : $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so - -$(LIBDIR)/lib$(MG5AMC_COMMONLIB).so: ../../src/*.h ../../src/*.cc $(BUILDDIR)/.build.$(TAG) - $(MAKE) -C ../../src $(MAKEDEBUG) -f $(CUDACPP_SRC_MAKEFILE) +$(CUDACPP_LIBDIR)/lib$(MG5AMC_COMMONLIB).so: ../../src/*.h ../../src/*.cc + $(MAKE) AVX=$(AVX) AVXFLAGS="$(AVXFLAGS)" -C ../../src -f $(CUDACPP_SRC_MAKEFILE) #------------------------------------------------------------------------------- @@ -566,162 +198,123 @@ processid_short=$(shell basename $(CURDIR) | awk -F_ '{print $$(NF-1)"_"$$NF}') ###$(info processid_short=$(processid_short)) MG5AMC_CXXLIB = mg5amc_$(processid_short)_cpp -cxx_objects_lib=$(BUILDDIR)/CPPProcess.o $(BUILDDIR)/MatrixElementKernels.o $(BUILDDIR)/BridgeKernels.o $(BUILDDIR)/CrossSectionKernels.o -cxx_objects_exe=$(BUILDDIR)/CommonRandomNumberKernel.o $(BUILDDIR)/RamboSamplingKernels.o +cxx_objects_lib=$(CUDACPP_BUILDDIR)/CPPProcess.o $(CUDACPP_BUILDDIR)/MatrixElementKernels.o $(CUDACPP_BUILDDIR)/BridgeKernels.o $(CUDACPP_BUILDDIR)/CrossSectionKernels.o +cxx_objects_exe=$(CUDACPP_BUILDDIR)/CommonRandomNumberKernel.o $(CUDACPP_BUILDDIR)/RamboSamplingKernels.o -ifneq ($(NVCC),) MG5AMC_CULIB = mg5amc_$(processid_short)_cuda -cu_objects_lib=$(BUILDDIR)/gCPPProcess.o $(BUILDDIR)/gMatrixElementKernels.o $(BUILDDIR)/gBridgeKernels.o $(BUILDDIR)/gCrossSectionKernels.o -cu_objects_exe=$(BUILDDIR)/gCommonRandomNumberKernel.o $(BUILDDIR)/gRamboSamplingKernels.o -endif +cu_objects_lib=$(CUDACPP_BUILDDIR)/gCPPProcess.o $(CUDACPP_BUILDDIR)/gMatrixElementKernels.o $(CUDACPP_BUILDDIR)/gBridgeKernels.o $(CUDACPP_BUILDDIR)/gCrossSectionKernels.o +cu_objects_exe=$(CUDACPP_BUILDDIR)/gCommonRandomNumberKernel.o $(CUDACPP_BUILDDIR)/gRamboSamplingKernels.o # Target (and build rules): C++ and CUDA shared libraries -$(LIBDIR)/lib$(MG5AMC_CXXLIB).so: $(BUILDDIR)/fbridge.o -$(LIBDIR)/lib$(MG5AMC_CXXLIB).so: cxx_objects_lib += $(BUILDDIR)/fbridge.o -$(LIBDIR)/lib$(MG5AMC_CXXLIB).so: $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cxx_objects_lib) - $(CXX) -shared -o $@ $(cxx_objects_lib) $(CXXLIBFLAGSRPATH2) -L$(LIBDIR) -l$(MG5AMC_COMMONLIB) - -ifneq ($(NVCC),) -$(LIBDIR)/lib$(MG5AMC_CULIB).so: $(BUILDDIR)/fbridge_cu.o -$(LIBDIR)/lib$(MG5AMC_CULIB).so: cu_objects_lib += $(BUILDDIR)/fbridge_cu.o -$(LIBDIR)/lib$(MG5AMC_CULIB).so: $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_objects_lib) - $(NVCC) --shared -o $@ $(cu_objects_lib) $(CULIBFLAGSRPATH2) -L$(LIBDIR) -l$(MG5AMC_COMMONLIB) -endif +$(CUDACPP_BUILDDIR)/lib$(MG5AMC_CXXLIB).so: $(CUDACPP_BUILDDIR)/fbridge.o +$(CUDACPP_BUILDDIR)/lib$(MG5AMC_CXXLIB).so: cxx_objects_lib += $(CUDACPP_BUILDDIR)/fbridge.o +$(CUDACPP_BUILDDIR)/lib$(MG5AMC_CXXLIB).so: $(CUDACPP_LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cxx_objects_lib) + $(CXX) -shared -o $@ $(cxx_objects_lib) $(CXXLIBFLAGSRPATH) -L$(CUDACPP_LIBDIR) -l$(MG5AMC_COMMONLIB) $(MG_LDFLAGS) $(LDFLAGS) -#------------------------------------------------------------------------------- - -# Target (and build rules): Fortran include files -###$(INCDIR)/%.inc : ../%.inc -### @if [ ! -d $(INCDIR) ]; then echo "mkdir -p $(INCDIR)"; mkdir -p $(INCDIR); fi -### \cp $< $@ +$(CUDACPP_BUILDDIR)/lib$(MG5AMC_CULIB).so: $(CUDACPP_BUILDDIR)/fbridge_cu.o +$(CUDACPP_BUILDDIR)/lib$(MG5AMC_CULIB).so: cu_objects_lib += $(CUDACPP_BUILDDIR)/fbridge_cu.o +$(CUDACPP_BUILDDIR)/lib$(MG5AMC_CULIB).so: $(CUDACPP_LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_objects_lib) + $(NVCC) --shared -o $@ $(cu_objects_lib) $(CULIBFLAGSRPATH) -L$(CUDACPP_LIBDIR) -l$(MG5AMC_COMMONLIB) #------------------------------------------------------------------------------- # Target (and build rules): C++ and CUDA standalone executables -$(cxx_main): LIBFLAGS += $(CXXLIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH -$(cxx_main): $(BUILDDIR)/check_sa.o $(LIBDIR)/lib$(MG5AMC_CXXLIB).so $(cxx_objects_exe) $(BUILDDIR)/CurandRandomNumberKernel.o - $(CXX) -o $@ $(BUILDDIR)/check_sa.o $(OMPFLAGS) -ldl -pthread $(LIBFLAGS) -L$(LIBDIR) -l$(MG5AMC_CXXLIB) $(cxx_objects_exe) $(BUILDDIR)/CurandRandomNumberKernel.o $(CURANDLIBFLAGS) -ifneq ($(NVCC),) +$(cxx_main): MG_LDFLAGS += $(CXXLIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH +$(cxx_main): MG_LDFLAGS += -L$(CUDACPP_BUILDDIR) -l$(MG5AMC_CXXLIB) # Process-specific library +$(cxx_main): $(CUDACPP_BUILDDIR)/check_sa.o $(CUDACPP_BUILDDIR)/lib$(MG5AMC_CXXLIB).so $(cxx_objects_exe) $(CUDACPP_BUILDDIR)/CurandRandomNumberKernel.o + $(CXX) -o $@ $(CUDACPP_BUILDDIR)/check_sa.o $(OMPFLAGS) -ldl -pthread $(cxx_objects_exe) $(CUDACPP_BUILDDIR)/CurandRandomNumberKernel.o $(MG_LDFLAGS) $(LDFLAGS) + ifneq ($(shell $(CXX) --version | grep ^Intel),) -$(cu_main): LIBFLAGS += -lintlc # compile with icpx and link with nvcc (undefined reference to `_intel_fast_memcpy') -$(cu_main): LIBFLAGS += -lsvml # compile with icpx and link with nvcc (undefined reference to `__svml_cos4_l9') +$(cu_main): MG_LDFLAGS += -lintlc # compile with icpx and link with nvcc (undefined reference to `_intel_fast_memcpy') +$(cu_main): MG_LDFLAGS += -lsvml # compile with icpx and link with nvcc (undefined reference to `__svml_cos4_l9') else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 -$(cu_main): LIBFLAGS += -L$(patsubst %bin/nvc++,%lib,$(subst ccache ,,$(CXX))) -lnvhpcatm -lnvcpumath -lnvc -endif -$(cu_main): LIBFLAGS += $(CULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH -$(cu_main): $(BUILDDIR)/gcheck_sa.o $(LIBDIR)/lib$(MG5AMC_CULIB).so $(cu_objects_exe) $(BUILDDIR)/gCurandRandomNumberKernel.o - $(NVCC) -o $@ $(BUILDDIR)/gcheck_sa.o $(CUARCHFLAGS) $(LIBFLAGS) -L$(LIBDIR) -l$(MG5AMC_CULIB) $(cu_objects_exe) $(BUILDDIR)/gCurandRandomNumberKernel.o $(CURANDLIBFLAGS) +$(cu_main): MG_LDFLAGS += -L$(patsubst %bin/nvc++,%lib,$(subst ccache ,,$(CXX))) -lnvhpcatm -lnvcpumath -lnvc endif +$(cu_main): MG_LDFLAGS += $(CULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH +$(cu_main): MG_LDFLAGS += -L$(CUDACPP_BUILDDIR) -l$(MG5AMC_CULIB) # Process-specific library +$(cu_main): $(CUDACPP_BUILDDIR)/gcheck_sa.o $(CUDACPP_BUILDDIR)/lib$(MG5AMC_CULIB).so $(cu_objects_exe) $(CUDACPP_BUILDDIR)/gCurandRandomNumberKernel.o + $(NVCC) -o $@ $(CUDACPP_BUILDDIR)/gcheck_sa.o $(CUARCHFLAGS) $(cu_objects_exe) $(CUDACPP_BUILDDIR)/gCurandRandomNumberKernel.o $(MG_LDFLAGS) $(LDFLAGS) #------------------------------------------------------------------------------- - -# Generic target and build rules: objects from Fortran compilation -$(BUILDDIR)/%.o : %.f *.inc - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - $(FC) -I. -c $< -o $@ - -# Generic target and build rules: objects from Fortran compilation -###$(BUILDDIR)/%.o : %.f *.inc -### @if [ ! -d $(INCDIR) ]; then echo "mkdir -p $(INCDIR)"; mkdir -p $(INCDIR); fi -### @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi -### $(FC) -I. -I$(INCDIR) -c $< -o $@ - -# Target (and build rules): Fortran standalone executables -###$(BUILDDIR)/fcheck_sa.o : $(INCDIR)/fbridge.inc +# Check executables: ifeq ($(UNAME_S),Darwin) -$(fcxx_main): LIBFLAGS += -L$(shell dirname $(shell $(FC) --print-file-name libgfortran.dylib)) # add path to libgfortran on Mac #375 +$(fcxx_main): MG_LDFLAGS += -L$(shell dirname $(shell $(FC) --print-file-name libgfortran.dylib)) # add path to libgfortran on Mac #375 endif -$(fcxx_main): LIBFLAGS += $(CXXLIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH -$(fcxx_main): $(BUILDDIR)/fcheck_sa.o $(BUILDDIR)/fsampler.o $(LIBDIR)/lib$(MG5AMC_CXXLIB).so $(cxx_objects_exe) - $(CXX) -o $@ $(BUILDDIR)/fcheck_sa.o $(OMPFLAGS) $(BUILDDIR)/fsampler.o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_CXXLIB) $(cxx_objects_exe) +$(fcxx_main): MG_LDFLAGS += $(CXXLIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH +$(fcxx_main): MG_LDFLAGS += -L$(CUDACPP_BUILDDIR) -l$(MG5AMC_CXXLIB) # Process-specific library +$(fcxx_main): $(CUDACPP_BUILDDIR)/fcheck_sa.o $(CUDACPP_BUILDDIR)/fsampler.o $(CUDACPP_BUILDDIR)/lib$(MG5AMC_CXXLIB).so $(cxx_objects_exe) + $(CXX) -o $@ $(CUDACPP_BUILDDIR)/fcheck_sa.o $(cxx_objects_exe) $(OMPFLAGS) $(CUDACPP_BUILDDIR)/fsampler.o -lgfortran -L$(CUDACPP_LIBDIR) $(MG_LDFLAGS) $(LDFLAGS) -ifneq ($(NVCC),) ifneq ($(shell $(CXX) --version | grep ^Intel),) -$(fcu_main): LIBFLAGS += -lintlc # compile with icpx and link with nvcc (undefined reference to `_intel_fast_memcpy') -$(fcu_main): LIBFLAGS += -lsvml # compile with icpx and link with nvcc (undefined reference to `__svml_cos4_l9') +$(fcu_main): MG_LDFLAGS += -lintlc # compile with icpx and link with nvcc (undefined reference to `_intel_fast_memcpy') +$(fcu_main): MG_LDFLAGS += -lsvml # compile with icpx and link with nvcc (undefined reference to `__svml_cos4_l9') endif ifeq ($(UNAME_S),Darwin) -$(fcu_main): LIBFLAGS += -L$(shell dirname $(shell $(FC) --print-file-name libgfortran.dylib)) # add path to libgfortran on Mac #375 -endif -$(fcu_main): LIBFLAGS += $(CULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH -$(fcu_main): $(BUILDDIR)/fcheck_sa.o $(BUILDDIR)/fsampler_cu.o $(LIBDIR)/lib$(MG5AMC_CULIB).so $(cu_objects_exe) - $(NVCC) -o $@ $(BUILDDIR)/fcheck_sa.o $(BUILDDIR)/fsampler_cu.o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_CULIB) $(cu_objects_exe) +$(fcu_main): MG_LDFLAGS += -L$(shell dirname $(shell $(FC) --print-file-name libgfortran.dylib)) # add path to libgfortran on Mac #375 endif +$(fcu_main): MG_LDFLAGS += $(CULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH +$(fcu_main): MG_LDFLAGS += -L$(CUDACPP_BUILDDIR) -l$(MG5AMC_CULIB) # Process-specific library +$(fcu_main): $(CUDACPP_BUILDDIR)/fcheck_sa.o $(CUDACPP_BUILDDIR)/fsampler_cu.o $(CUDACPP_BUILDDIR)/lib$(MG5AMC_CULIB).so $(cu_objects_exe) + $(NVCC) -o $@ $(CUDACPP_BUILDDIR)/fcheck_sa.o $(CUDACPP_BUILDDIR)/fsampler_cu.o $(cu_objects_exe) -lgfortran $(MG_LDFLAGS) $(LDFLAGS) #------------------------------------------------------------------------------- # Target (and build rules): test objects and test executable -$(BUILDDIR)/testxxx.o: $(GTESTLIBS) -$(BUILDDIR)/testxxx.o: INCFLAGS += $(GTESTINC) -$(BUILDDIR)/testxxx.o: testxxx_cc_ref.txt -$(testmain): $(BUILDDIR)/testxxx.o -$(testmain): cxx_objects_exe += $(BUILDDIR)/testxxx.o # Comment out this line to skip the C++ test of xxx functions -ifneq ($(NVCC),) -$(BUILDDIR)/testxxx_cu.o: $(GTESTLIBS) -$(BUILDDIR)/testxxx_cu.o: INCFLAGS += $(GTESTINC) -$(BUILDDIR)/testxxx_cu.o: testxxx_cc_ref.txt -$(testmain): $(BUILDDIR)/testxxx_cu.o -$(testmain): cu_objects_exe += $(BUILDDIR)/testxxx_cu.o # Comment out this line to skip the CUDA test of xxx functions -endif +$(testmain) $(cutestmain): $(GTESTLIBS) +$(testmain) $(cutestmain): INCFLAGS += $(GTESTINC) +$(testmain) $(cutestmain): MG_LDFLAGS += -L$(GTESTLIBDIR) -lgtest -lgtest_main -$(BUILDDIR)/testmisc.o: $(GTESTLIBS) -$(BUILDDIR)/testmisc.o: INCFLAGS += $(GTESTINC) -$(testmain): $(BUILDDIR)/testmisc.o -$(testmain): cxx_objects_exe += $(BUILDDIR)/testmisc.o # Comment out this line to skip the C++ miscellaneous tests +$(CUDACPP_BUILDDIR)/testxxx.o $(CUDACPP_BUILDDIR)/testxxx_cu.o: $(GTESTLIBS) testxxx_cc_ref.txt +$(testmain): $(CUDACPP_BUILDDIR)/testxxx.o +$(testmain): cxx_objects_exe += $(CUDACPP_BUILDDIR)/testxxx.o # Comment out this line to skip the C++ test of xxx functions +$(cutestmain): $(CUDACPP_BUILDDIR)/testxxx_cu.o +$(cutestmain): cu_objects_exe += $(CUDACPP_BUILDDIR)/testxxx_cu.o # Comment out this line to skip the CUDA test of xxx functions -ifneq ($(NVCC),) -$(BUILDDIR)/testmisc_cu.o: $(GTESTLIBS) -$(BUILDDIR)/testmisc_cu.o: INCFLAGS += $(GTESTINC) -$(testmain): $(BUILDDIR)/testmisc_cu.o -$(testmain): cu_objects_exe += $(BUILDDIR)/testmisc_cu.o # Comment out this line to skip the CUDA miscellaneous tests -endif -$(BUILDDIR)/runTest.o: $(GTESTLIBS) -$(BUILDDIR)/runTest.o: INCFLAGS += $(GTESTINC) -$(testmain): $(BUILDDIR)/runTest.o -$(testmain): cxx_objects_exe += $(BUILDDIR)/runTest.o +$(CUDACPP_BUILDDIR)/testmisc.o $(CUDACPP_BUILDDIR)/testmisc_cu.o: $(GTESTLIBS) +$(testmain): $(CUDACPP_BUILDDIR)/testmisc.o +$(testmain): cxx_objects_exe += $(CUDACPP_BUILDDIR)/testmisc.o # Comment out this line to skip the C++ miscellaneous tests +$(cutestmain): $(CUDACPP_BUILDDIR)/testmisc_cu.o +$(cutestmain): cu_objects_exe += $(CUDACPP_BUILDDIR)/testmisc_cu.o # Comment out this line to skip the CUDA miscellaneous tests + + +$(CUDACPP_BUILDDIR)/runTest.o $(CUDACPP_BUILDDIR)/runTest_cu.o: $(GTESTLIBS) +$(testmain): $(CUDACPP_BUILDDIR)/runTest.o +$(testmain): cxx_objects_exe += $(CUDACPP_BUILDDIR)/runTest.o +$(cutestmain): $(CUDACPP_BUILDDIR)/runTest_cu.o +$(cutestmain): cu_objects_exe += $(CUDACPP_BUILDDIR)/runTest_cu.o + -ifneq ($(NVCC),) -$(BUILDDIR)/runTest_cu.o: $(GTESTLIBS) -$(BUILDDIR)/runTest_cu.o: INCFLAGS += $(GTESTINC) ifneq ($(shell $(CXX) --version | grep ^Intel),) -$(testmain): LIBFLAGS += -lintlc # compile with icpx and link with nvcc (undefined reference to `_intel_fast_memcpy') -$(testmain): LIBFLAGS += -lsvml # compile with icpx and link with nvcc (undefined reference to `__svml_cos4_l9') +$(cutestmain): MG_LDFLAGS += -lintlc # compile with icpx and link with nvcc (undefined reference to `_intel_fast_memcpy') +$(cutestmain): MG_LDFLAGS += -lsvml # compile with icpx and link with nvcc (undefined reference to `__svml_cos4_l9') else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 -$(testmain): LIBFLAGS += -L$(patsubst %bin/nvc++,%lib,$(subst ccache ,,$(CXX))) -lnvhpcatm -lnvcpumath -lnvc -endif -$(testmain): $(BUILDDIR)/runTest_cu.o -$(testmain): cu_objects_exe += $(BUILDDIR)/runTest_cu.o +$(cutestmain): MG_LDFLAGS += -L$(patsubst %bin/nvc++,%lib,$(subst ccache ,,$(CXX))) -lnvhpcatm -lnvcpumath -lnvc endif -$(testmain): $(GTESTLIBS) -$(testmain): INCFLAGS += $(GTESTINC) -$(testmain): LIBFLAGS += -L$(GTESTLIBDIR) -lgtest -lgtest_main ifneq ($(OMPFLAGS),) ifneq ($(shell $(CXX) --version | egrep '^Intel'),) -$(testmain): LIBFLAGS += -liomp5 # see #578 (not '-qopenmp -static-intel' as in https://stackoverflow.com/questions/45909648) +$(testmain): MG_LDFLAGS += -liomp5 # see #578 (not '-qopenmp -static-intel' as in https://stackoverflow.com/questions/45909648) else ifneq ($(shell $(CXX) --version | egrep '^clang'),) -$(testmain): LIBFLAGS += -L $(shell dirname $(shell $(CXX) -print-file-name=libc++.so)) -lomp # see #604 +$(testmain): MG_LDFLAGS += -L $(shell dirname $(shell $(CXX) -print-file-name=libc++.so)) -lomp # see #604 ###else ifneq ($(shell $(CXX) --version | egrep '^Apple clang'),) ###$(testmain): LIBFLAGS += ???? # OMP is not supported yet by cudacpp for Apple clang (see #578 and #604) else -$(testmain): LIBFLAGS += -lgomp +$(testmain): MG_LDFLAGS += -lgomp endif endif -ifeq ($(NVCC),) # link only runTest.o -$(testmain): LIBFLAGS += $(CXXLIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH -$(testmain): $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cxx_objects_lib) $(cxx_objects_exe) $(GTESTLIBS) - $(CXX) -o $@ $(cxx_objects_lib) $(cxx_objects_exe) -ldl -pthread $(LIBFLAGS) -else # link both runTest.o and runTest_cu.o -$(testmain): LIBFLAGS += $(CULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH -$(testmain): $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cxx_objects_lib) $(cxx_objects_exe) $(cu_objects_lib) $(cu_objects_exe) $(GTESTLIBS) - $(NVCC) -o $@ $(cxx_objects_lib) $(cxx_objects_exe) $(cu_objects_lib) $(cu_objects_exe) -ldl $(LIBFLAGS) -lcuda -endif +$(testmain): MG_LDFLAGS += $(CXXLIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH +$(testmain): $(CUDACPP_LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cxx_objects_lib) $(cxx_objects_exe) $(GTESTLIBS) + $(CXX) -o $@ $(cxx_objects_lib) $(cxx_objects_exe) -L$(CUDACPP_LIBDIR) -l$(MG5AMC_COMMONLIB) -ldl -pthread $(MG_LDFLAGS) $(LDFLAGS) + +$(cutestmain): MG_LDFLAGS += $(CULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH +$(cutestmain): $(CUDACPP_LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_objects_lib) $(cu_objects_exe) $(GTESTLIBS) + $(NVCC) -o $@ $(cu_objects_lib) $(cu_objects_exe) -L$(CUDACPP_LIBDIR) -l$(MG5AMC_COMMONLIB) -ldl -lcuda $(MG_LDFLAGS) $(LDFLAGS) # Use target gtestlibs to build only googletest ifneq ($(GTESTLIBS),) @@ -731,72 +324,15 @@ endif # Use flock (Linux only, no Mac) to allow 'make -j' if googletest has not yet been downloaded https://stackoverflow.com/a/32666215 $(GTESTLIBS): ifneq ($(shell which flock 2>/dev/null),) - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - flock $(BUILDDIR)/.make_test.lock $(MAKE) -C $(TESTDIR) + flock $(TESTDIR)/.make_test.lock $(MAKE) -C $(TESTDIR) else if [ -d $(TESTDIR) ]; then $(MAKE) -C $(TESTDIR); fi endif #------------------------------------------------------------------------------- -# Target: build all targets in all AVX modes (each AVX mode in a separate build directory) -# Split the avxall target into five separate targets to allow parallel 'make -j avxall' builds -# (Hack: add a fbridge.inc dependency to avxall, to ensure it is only copied once for all AVX modes) -avxnone: - @echo - $(MAKE) USEBUILDDIR=1 AVX=none -f $(CUDACPP_MAKEFILE) - -avxsse4: - @echo - $(MAKE) USEBUILDDIR=1 AVX=sse4 -f $(CUDACPP_MAKEFILE) - -avxavx2: - @echo - $(MAKE) USEBUILDDIR=1 AVX=avx2 -f $(CUDACPP_MAKEFILE) - -avx512y: - @echo - $(MAKE) USEBUILDDIR=1 AVX=512y -f $(CUDACPP_MAKEFILE) - -avx512z: - @echo - $(MAKE) USEBUILDDIR=1 AVX=512z -f $(CUDACPP_MAKEFILE) - -ifeq ($(UNAME_P),ppc64le) -###avxall: $(INCDIR)/fbridge.inc avxnone avxsse4 -avxall: avxnone avxsse4 -else ifeq ($(UNAME_P),arm) -###avxall: $(INCDIR)/fbridge.inc avxnone avxsse4 -avxall: avxnone avxsse4 -else -###avxall: $(INCDIR)/fbridge.inc avxnone avxsse4 avxavx2 avx512y avx512z -avxall: avxnone avxsse4 avxavx2 avx512y avx512z -endif - -#------------------------------------------------------------------------------- - -# Target: clean the builds -.PHONY: clean - -clean: -ifeq ($(USEBUILDDIR),1) - rm -rf $(BUILDDIR) -else - rm -f $(BUILDDIR)/.build.* $(BUILDDIR)/*.o $(BUILDDIR)/*.exe - rm -f $(LIBDIR)/lib$(MG5AMC_CXXLIB).so $(LIBDIR)/lib$(MG5AMC_CULIB).so -endif - $(MAKE) -C ../../src clean -f $(CUDACPP_SRC_MAKEFILE) -### rm -rf $(INCDIR) - -cleanall: - @echo - $(MAKE) USEBUILDDIR=0 clean -f $(CUDACPP_MAKEFILE) - @echo - $(MAKE) USEBUILDDIR=0 -C ../../src cleanall -f $(CUDACPP_SRC_MAKEFILE) - rm -rf build.* - # Target: clean the builds as well as the gtest installation(s) -distclean: cleanall +distclean: clean cleansrc ifneq ($(wildcard $(TESTDIRCOMMON)),) $(MAKE) -C $(TESTDIRCOMMON) clean endif @@ -848,50 +384,55 @@ endif #------------------------------------------------------------------------------- -# Target: check (run the C++ test executable) +# Target: check/gcheck (run the C++ test executable) # [NB THIS IS WHAT IS USED IN THE GITHUB CI!] -ifneq ($(NVCC),) -check: runTest cmpFcheck cmpFGcheck -else check: runTest cmpFcheck -endif +gcheck: + $(MAKE) AVX=cuda runTest cmpFGcheck # Target: runTest (run the C++ test executable runTest.exe) -runTest: all.$(TAG) - $(RUNTIME) $(BUILDDIR)/runTest.exe +ifneq ($(AVX),cuda) +runTest: cppbuild + $(RUNTIME) $(CUDACPP_BUILDDIR)/runTest.exe +else +runTest: cudabuild + $(RUNTIME) $(CUDACPP_BUILDDIR)/runTest_cuda.exe +endif + # Target: runCheck (run the C++ standalone executable check.exe, with a small number of events) -runCheck: all.$(TAG) - $(RUNTIME) $(BUILDDIR)/check.exe -p 2 32 2 +runCheck: cppbuild + $(RUNTIME) $(CUDACPP_BUILDDIR)/check.exe -p 2 32 2 # Target: runGcheck (run the CUDA standalone executable gcheck.exe, with a small number of events) -runGcheck: all.$(TAG) - $(RUNTIME) $(BUILDDIR)/gcheck.exe -p 2 32 2 +runGcheck: AVX=cuda +runGcheck: + $(MAKE) AVX=cuda cudabuild + $(RUNTIME) $(CUDACPP_BUILDDIR)/gcheck.exe -p 2 32 2 # Target: runFcheck (run the Fortran standalone executable - with C++ MEs - fcheck.exe, with a small number of events) -runFcheck: all.$(TAG) - $(RUNTIME) $(BUILDDIR)/fcheck.exe 2 32 2 +runFcheck: cppbuild + $(RUNTIME) $(CUDACPP_BUILDDIR)/fcheck.exe 2 32 2 # Target: runFGcheck (run the Fortran standalone executable - with CUDA MEs - fgcheck.exe, with a small number of events) -runFGcheck: all.$(TAG) - $(RUNTIME) $(BUILDDIR)/fgcheck.exe 2 32 2 +runFGcheck: AVX=cuda +runFGcheck: + $(MAKE) AVX=cuda cudabuild + $(RUNTIME) $(CUDACPP_BUILDDIR)/fgcheck.exe 2 32 2 # Target: cmpFcheck (compare ME results from the C++ and Fortran with C++ MEs standalone executables, with a small number of events) -cmpFcheck: all.$(TAG) +cmpFcheck: cppbuild @echo - @echo "$(BUILDDIR)/check.exe --common -p 2 32 2" - @echo "$(BUILDDIR)/fcheck.exe 2 32 2" - @me1=$(shell $(RUNTIME) $(BUILDDIR)/check.exe --common -p 2 32 2 | grep MeanMatrix | awk '{print $$4}'); me2=$(shell $(RUNTIME) $(BUILDDIR)/fcheck.exe 2 32 2 | grep Average | awk '{print $$4}'); echo "Avg ME (C++/C++) = $${me1}"; echo "Avg ME (F77/C++) = $${me2}"; if [ "$${me2}" == "NaN" ]; then echo "ERROR! Fortran calculation (F77/C++) returned NaN"; elif [ "$${me2}" == "" ]; then echo "ERROR! Fortran calculation (F77/C++) crashed"; else python3 -c "me1=$${me1}; me2=$${me2}; reldif=abs((me2-me1)/me1); print('Relative difference =', reldif); ok = reldif <= 2E-4; print ( '%s (relative difference %s 2E-4)' % ( ('OK','<=') if ok else ('ERROR','>') ) ); import sys; sys.exit(0 if ok else 1)"; fi + @echo "$(CUDACPP_BUILDDIR)/check.exe --common -p 2 32 2" + @echo "$(CUDACPP_BUILDDIR)/fcheck.exe 2 32 2" + @me1=$(shell $(RUNTIME) $(CUDACPP_BUILDDIR)/check.exe --common -p 2 32 2 | grep MeanMatrix | awk '{print $$4}'); me2=$(shell $(RUNTIME) $(CUDACPP_BUILDDIR)/fcheck.exe 2 32 2 | grep Average | awk '{print $$4}'); echo "Avg ME (C++/C++) = $${me1}"; echo "Avg ME (F77/C++) = $${me2}"; if [ "$${me2}" == "NaN" ]; then echo "ERROR! Fortran calculation (F77/C++) returned NaN"; elif [ "$${me2}" == "" ]; then echo "ERROR! Fortran calculation (F77/C++) crashed"; else python3 -c "me1=$${me1}; me2=$${me2}; reldif=abs((me2-me1)/me1); print('Relative difference =', reldif); ok = reldif <= 2E-4; print ( '%s (relative difference %s 2E-4)' % ( ('OK','<=') if ok else ('ERROR','>') ) ); import sys; sys.exit(0 if ok else 1)"; fi # Target: cmpFGcheck (compare ME results from the CUDA and Fortran with CUDA MEs standalone executables, with a small number of events) -cmpFGcheck: all.$(TAG) +cmpFGcheck: AVX=cuda +cmpFGcheck: + $(MAKE) AVX=cuda cudabuild @echo - @echo "$(BUILDDIR)/gcheck.exe --common -p 2 32 2" - @echo "$(BUILDDIR)/fgcheck.exe 2 32 2" - @me1=$(shell $(RUNTIME) $(BUILDDIR)/gcheck.exe --common -p 2 32 2 | grep MeanMatrix | awk '{print $$4}'); me2=$(shell $(RUNTIME) $(BUILDDIR)/fgcheck.exe 2 32 2 | grep Average | awk '{print $$4}'); echo "Avg ME (C++/CUDA) = $${me1}"; echo "Avg ME (F77/CUDA) = $${me2}"; if [ "$${me2}" == "NaN" ]; then echo "ERROR! Fortran calculation (F77/CUDA) crashed"; elif [ "$${me2}" == "" ]; then echo "ERROR! Fortran calculation (F77/CUDA) crashed"; else python3 -c "me1=$${me1}; me2=$${me2}; reldif=abs((me2-me1)/me1); print('Relative difference =', reldif); ok = reldif <= 2E-4; print ( '%s (relative difference %s 2E-4)' % ( ('OK','<=') if ok else ('ERROR','>') ) ); import sys; sys.exit(0 if ok else 1)"; fi + @echo "$(CUDACPP_BUILDDIR)/gcheck.exe --common -p 2 32 2" + @echo "$(CUDACPP_BUILDDIR)/fgcheck.exe 2 32 2" + @me1=$(shell $(RUNTIME) $(CUDACPP_BUILDDIR)/gcheck.exe --common -p 2 32 2 | grep MeanMatrix | awk '{print $$4}'); me2=$(shell $(RUNTIME) $(CUDACPP_BUILDDIR)/fgcheck.exe 2 32 2 | grep Average | awk '{print $$4}'); echo "Avg ME (C++/CUDA) = $${me1}"; echo "Avg ME (F77/CUDA) = $${me2}"; if [ "$${me2}" == "NaN" ]; then echo "ERROR! Fortran calculation (F77/CUDA) crashed"; elif [ "$${me2}" == "" ]; then echo "ERROR! Fortran calculation (F77/CUDA) crashed"; else python3 -c "me1=$${me1}; me2=$${me2}; reldif=abs((me2-me1)/me1); print('Relative difference =', reldif); ok = reldif <= 2E-4; print ( '%s (relative difference %s 2E-4)' % ( ('OK','<=') if ok else ('ERROR','>') ) ); import sys; sys.exit(0 if ok else 1)"; fi -# Target: memcheck (run the CUDA standalone executable gcheck.exe with a small number of events through cuda-memcheck) -memcheck: all.$(TAG) - $(RUNTIME) $(CUDA_HOME)/bin/cuda-memcheck --check-api-memory-access yes --check-deprecated-instr yes --check-device-heap yes --demangle full --language c --leak-check full --racecheck-report all --report-api-errors all --show-backtrace yes --tool memcheck --track-unused-memory yes $(BUILDDIR)/gcheck.exe -p 2 32 2 - -#------------------------------------------------------------------------------- diff --git a/epochX/cudacpp/gg_ttg.mad/SubProcesses/makefile b/epochX/cudacpp/gg_ttg.mad/SubProcesses/makefile index d572486c2e..d229c1cf4d 100644 --- a/epochX/cudacpp/gg_ttg.mad/SubProcesses/makefile +++ b/epochX/cudacpp/gg_ttg.mad/SubProcesses/makefile @@ -1,19 +1,22 @@ SHELL := /bin/bash -include ../../Source/make_opts -FFLAGS+= -w +# Include general setup +OPTIONS_MAKEFILE := ../../Source/make_opts +include $(OPTIONS_MAKEFILE) # Enable the C preprocessor https://gcc.gnu.org/onlinedocs/gfortran/Preprocessing-Options.html -FFLAGS+= -cpp +MG_FCFLAGS += -cpp +MG_CXXFLAGS += -I. -# Compile counters with -O3 as in the cudacpp makefile (avoid being "unfair" to Fortran #740) -CXXFLAGS = -O3 -Wall -Wshadow -Wextra +all: help cppnative + +# Target if user does not specify target +help: + $(info No target specified.) + $(info Viable targets are 'cppnative' (default), 'cppnone', 'cppsse4', 'cppavx2', 'cpp512y', 'cpp512z' and 'cuda') + $(info Or 'cppall' for all C++ targets) + $(info Or 'ALL' for all C++ and cuda targets) -# Add -std=c++17 explicitly to avoid build errors on macOS -# Add -mmacosx-version-min=11.3 to avoid "ld: warning: object file was built for newer macOS version than being linked" -ifneq ($(shell $(CXX) --version | egrep '^Apple clang'),) -CXXFLAGS += -std=c++17 -mmacosx-version-min=11.3 -endif # Enable ccache if USECCACHE=1 ifeq ($(USECCACHE)$(shell echo $(CXX) | grep ccache),1) @@ -46,34 +49,25 @@ else MADLOOP_LIB = endif -LINKLIBS = $(LINK_MADLOOP_LIB) $(LINK_LOOP_LIBS) -L$(LIBDIR) -ldhelas -ldsample -lmodel -lgeneric -lpdf -lcernlib $(llhapdf) -lbias - -processid_short=$(shell basename $(CURDIR) | awk -F_ '{print $$(NF-1)"_"$$NF}') -CUDACPP_MAKEFILE=cudacpp.mk -# NB1 Using ":=" below instead of "=" is much faster (it only runs the subprocess once instead of many times) -# NB2 Use '|&' in CUDACPP_BUILDDIR to avoid confusing errors about googletest #507 -# NB3 Do not add a comment inlined "CUDACPP_BUILDDIR=$(shell ...) # comment" as otherwise a trailing space is included... -# NB4 The variables relevant to the cudacpp Makefile must be explicitly passed to $(shell...) -CUDACPP_MAKEENV:=$(shell echo '$(.VARIABLES)' | tr " " "\n" | egrep "(USEBUILDDIR|AVX|FPTYPE|HELINL|HRDCOD)") -###$(info CUDACPP_MAKEENV=$(CUDACPP_MAKEENV)) -###$(info $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))")) -CUDACPP_BUILDDIR:=$(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn 2>&1 | awk '/Building/{print $$3}' | sed s/BUILDDIR=//) -ifeq ($(CUDACPP_BUILDDIR),) -$(error CUDACPP_BUILDDIR='$(CUDACPP_BUILDDIR)' should not be empty!) -else -$(info CUDACPP_BUILDDIR='$(CUDACPP_BUILDDIR)') -endif -CUDACPP_COMMONLIB=mg5amc_common -CUDACPP_CXXLIB=mg5amc_$(processid_short)_cpp -CUDACPP_CULIB=mg5amc_$(processid_short)_cuda - +LINKLIBS = $(LINK_MADLOOP_LIB) $(LINK_LOOP_LIBS) -L$(LIBDIR) -ldhelas -ldsample -lmodel -lgeneric -lpdf -lcernlib $(llhapdf) -lbias LIBS = $(LIBDIR)libbias.$(libext) $(LIBDIR)libdhelas.$(libext) $(LIBDIR)libdsample.$(libext) $(LIBDIR)libgeneric.$(libext) $(LIBDIR)libpdf.$(libext) $(LIBDIR)libgammaUPC.$(libext) $(LIBDIR)libmodel.$(libext) $(LIBDIR)libcernlib.$(libext) $(MADLOOP_LIB) $(LOOP_LIBS) ifneq ("$(wildcard ../../Source/RUNNING)","") LINKLIBS += -lrunning - LIBS += $(LIBDIR)librunning.$(libext) + LIBS += $(LIBDIR)librunning.$(libext) endif +SOURCEDIR_GUARD:=../../Source/.timestamp_guard +# We use $(SOURCEDIR_GUARD) to figure out if Source is out of date. The Source makefile doesn't correctly +# update all files, so we need a proxy that is updated every time we run "$(MAKE) -C ../../Source". +$(SOURCEDIR_GUARD) ../../Source/discretesampler.mod &: ../../Source/*.f ../../Cards/param_card.dat ../../Cards/run_card.dat +ifneq ($(shell which flock 2>/dev/null),) + flock ../../Source/.lock -c "$(MAKE) -C ../../Source; touch $(SOURCEDIR_GUARD)" +else + $(MAKE) -C ../../Source; touch $(SOURCEDIR_GUARD) +endif + +$(LIBS): $(SOURCEDIR_GUARD) # Source files @@ -91,82 +85,83 @@ PROCESS= myamp.o genps.o unwgt.o setcuts.o get_color.o \ DSIG=driver.o $(patsubst %.f, %.o, $(filter-out auto_dsig.f, $(wildcard auto_dsig*.f))) DSIG_cudacpp=driver_cudacpp.o $(patsubst %.f, %_cudacpp.o, $(filter-out auto_dsig.f, $(wildcard auto_dsig*.f))) -SYMMETRY = symmetry.o idenparts.o +SYMMETRY = symmetry.o idenparts.o -# Binaries +# cudacpp targets: +CUDACPP_MAKEFILE := cudacpp.mk +ifneq (,$(wildcard $(CUDACPP_MAKEFILE))) +include $(CUDACPP_MAKEFILE) +endif -ifeq ($(UNAME),Darwin) -LDFLAGS += -lc++ # avoid 'Undefined symbols' for chrono::steady_clock on macOS (checked with otool -L libmg5amc_gg_ttx_cpp.so) -LDFLAGS += -mmacosx-version-min=11.3 # avoid "ld: warning: object file was built for newer macOS version than being linked" -else -LDFLAGS += -Wl,--no-relax # avoid 'failed to convert GOTPCREL relocation' error #458 (not supported on macOS) +ifeq ($(CUDACPP_BUILDDIR),) +$(error CUDACPP_BUILDDIR='$(CUDACPP_BUILDDIR)' should not be empty!) endif +CUDACPP_COMMONLIB=mg5amc_common +CUDACPP_CXXLIB := $(CUDACPP_BUILDDIR)/lib$(MG5AMC_CXXLIB).so +CUDACPP_CULIB := $(CUDACPP_BUILDDIR)/lib$(MG5AMC_CULIB).so -all: $(PROG)_fortran $(CUDACPP_BUILDDIR)/$(PROG)_cpp # also builds $(PROG)_cuda if $(CUDACPP_CULIB) exists (#503) +# Set up OpenMP if supported +OMPFLAGS ?= -fopenmp ifneq ($(shell $(CXX) --version | egrep '^Intel'),) -override OMPFLAGS = -fopenmp LINKLIBS += -liomp5 # see #578 LINKLIBS += -lintlc # undefined reference to `_intel_fast_memcpy' else ifneq ($(shell $(CXX) --version | egrep '^clang'),) -override OMPFLAGS = -fopenmp $(CUDACPP_BUILDDIR)/$(PROG)_cpp: LINKLIBS += -L $(shell dirname $(shell $(CXX) -print-file-name=libc++.so)) -lomp # see #604 else ifneq ($(shell $(CXX) --version | egrep '^Apple clang'),) -override OMPFLAGS = # OMP is not supported yet by cudacpp for Apple clang -else -override OMPFLAGS = -fopenmp +OMPFLAGS = # OMP is not supported yet by cudacpp for Apple clang endif -$(PROG)_fortran: $(PROCESS) $(DSIG) auto_dsig.o $(LIBS) $(MATRIX) counters.o ompnumthreads.o - $(FC) -o $(PROG)_fortran $(PROCESS) $(DSIG) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o $(LDFLAGS) - -$(LIBS): .libs -.libs: ../../Cards/param_card.dat ../../Cards/run_card.dat - cd ../../Source; make - touch $@ +# Binaries -$(CUDACPP_BUILDDIR)/.cudacpplibs: - $(MAKE) -f $(CUDACPP_MAKEFILE) - touch $@ +$(PROG)_fortran: $(PROCESS) $(DSIG) auto_dsig.o $(LIBS) $(MATRIX) counters.o ompnumthreads.o + $(FC) $(MG_FCFLAGS) $(FCFLAGS) -o $(PROG)_fortran $(PROCESS) $(DSIG) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o $(LDFLAGS) # On Linux, set rpath to LIBDIR to make it unnecessary to use LD_LIBRARY_PATH # Use relative paths with respect to the executables ($ORIGIN on Linux) # On Darwin, building libraries with absolute paths in LIBDIR makes this unnecessary -ifeq ($(UNAME_S),Darwin) - override LIBFLAGSRPATH = -else ifeq ($(USEBUILDDIR),1) - override LIBFLAGSRPATH = -Wl,-rpath,'$$ORIGIN/../$(LIBDIR)/$(CUDACPP_BUILDDIR)' -else - override LIBFLAGSRPATH = -Wl,-rpath,'$$ORIGIN/$(LIBDIR)' +ifneq ($(UNAME_S),Darwin) + LIBFLAGSRPATH := -Wl,-rpath,'$$ORIGIN:$$ORIGIN/../$(LIBDIR)/$(CUDACPP_BUILDDIR)' endif -.PHONY: madevent_fortran_link madevent_cuda_link madevent_cpp_link +.PHONY: madevent_fortran_link madevent_cuda_link madevent_cpp_link madevent_cppnone_link madevent_cppsse4_link madevent_cppavx2_link madevent_cpp512y_link madevent_cpp512z_link clean cleanall cleansrc madevent_fortran_link: $(PROG)_fortran rm -f $(PROG) ln -s $(PROG)_fortran $(PROG) -madevent_cpp_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp - rm -f $(PROG) - ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) +madevent_cppnone_link: AVX=none +madevent_cppnone_link: cppnone + ln -sf $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) -madevent_cuda_link: $(CUDACPP_BUILDDIR)/$(PROG)_cuda - rm -f $(PROG) - ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cuda $(PROG) +madevent_cppavx2_link: AVX=avx2 +madevent_cppavx2_link: cppavx2 + ln -sf $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) + +madevent_cpp512y_link: AVX=512y +madevent_cpp512y_link: cppavx512y + ln -sf $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) -# Building $(PROG)_cpp also builds $(PROG)_cuda if $(CUDACPP_CULIB) exists (improved patch for cpp-only builds #503) -$(CUDACPP_BUILDDIR)/$(PROG)_cpp: $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(LIBS) $(MATRIX) counters.o ompnumthreads.o $(CUDACPP_BUILDDIR)/.cudacpplibs - $(FC) -o $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o -L$(LIBDIR)/$(CUDACPP_BUILDDIR) -l$(CUDACPP_COMMONLIB) -l$(CUDACPP_CXXLIB) $(LIBFLAGSRPATH) $(LDFLAGS) - if [ -f $(LIBDIR)/$(CUDACPP_BUILDDIR)/lib$(CUDACPP_CULIB).* ]; then $(FC) -o $(CUDACPP_BUILDDIR)/$(PROG)_cuda $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o -L$(LIBDIR)/$(CUDACPP_BUILDDIR) -l$(CUDACPP_COMMONLIB) -l$(CUDACPP_CULIB) $(LIBFLAGSRPATH) $(LDFLAGS); fi +madevent_cpp512z_link: AVX=512z +madevent_cpp512z_link: cppavx512z + ln -sf $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) -$(CUDACPP_BUILDDIR)/$(PROG)_cuda: $(CUDACPP_BUILDDIR)/$(PROG)_cpp +madevent_cuda_link: AVX=cuda +madevent_cuda_link: cuda + ln -sf $(CUDACPP_BUILDDIR)/$(PROG)_cuda $(PROG) + +$(CUDACPP_BUILDDIR)/$(PROG)_cpp: $(LIBS) $(CUDACPP_CXXLIB) $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) counters.o ompnumthreads.o + $(FC) -o $(CUDACPP_BUILDDIR)/$(PROG)_cpp -L$(LIBDIR)/$(CUDACPP_BUILDDIR) -l$(CUDACPP_COMMONLIB) $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o -L$(CUDACPP_BUILDDIR) -l$(MG5AMC_CXXLIB) $(LIBFLAGSRPATH) $(MG_LDFLAGS) $(LDFLAGS) + +$(CUDACPP_BUILDDIR)/$(PROG)_cuda: $(LIBS) $(CUDACPP_CULIB) $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) counters.o ompnumthreads.o + $(FC) -o $(CUDACPP_BUILDDIR)/$(PROG)_cuda -L$(LIBDIR)/$(CUDACPP_BUILDDIR) -l$(CUDACPP_COMMONLIB) $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o -L$(CUDACPP_BUILDDIR) -l$(MG5AMC_CULIB) $(LIBFLAGSRPATH) $(MG_LDFLAGS) $(LDFLAGS) counters.o: counters.cc timer.h - $(CXX) $(CXXFLAGS) -c $< -o $@ + $(CXX) $(MG_CXXFLAGS) $(CXXFLAGS) -c $< -o $@ ompnumthreads.o: ompnumthreads.cc ompnumthreads.h - $(CXX) -I. $(CXXFLAGS) $(OMPFLAGS) -c $< -o $@ + $(CXX) $(MG_CXXFLAGS) $(CXXFLAGS) $(OMPFLAGS) -c $< -o $@ $(PROG)_forhel: $(PROCESS) auto_dsig.o $(LIBS) $(MATRIX_HEL) $(FC) -o $(PROG)_forhel $(PROCESS) $(MATRIX_HEL) $(LINKLIBS) $(LDFLAGS) $(BIASDEPENDENCIES) $(OMPFLAGS) @@ -174,27 +169,14 @@ $(PROG)_forhel: $(PROCESS) auto_dsig.o $(LIBS) $(MATRIX_HEL) gensym: $(SYMMETRY) configs.inc $(LIBS) $(FC) -o gensym $(SYMMETRY) -L$(LIBDIR) $(LINKLIBS) $(LDFLAGS) -###ifeq (,$(wildcard fbridge.inc)) # Pointless: fbridge.inc always exists as this is the cudacpp-modified makefile! -###$(LIBDIR)libmodel.$(libext): ../../Cards/param_card.dat -### cd ../../Source/MODEL; make -### -###$(LIBDIR)libgeneric.$(libext): ../../Cards/run_card.dat -### cd ../../Source; make -### -###$(LIBDIR)libpdf.$(libext): -### cd ../../Source/PDF; make -### -###$(LIBDIR)libgammaUPC.$(libext): -### cd ../../Source/PDF/gammaUPC; make -###endif # Add source so that the compiler finds the DiscreteSampler module. $(MATRIX): %.o: %.f - $(FC) $(FFLAGS) $(MATRIX_FLAG) -c $< -I../../Source/ -I../../Source/PDF/gammaUPC -%.o: %.f - $(FC) $(FFLAGS) -c $< -I../../Source/ -I../../Source/PDF/gammaUPC + $(FC) $(MG_FCFLAGS) $(FCFLAGS) $(MATRIX_FLAG) -c $< -I../../Source/ -I../../Source/PDF/gammaUPC +%.o $(CUDACPP_BUILDDIR)/%.o: %.f + $(FC) $(MG_FCFLAGS) $(FCFLAGS) -I../../Source/ -I../../Source/PDF/gammaUPC -c $< -o $@ %_cudacpp.o: %.f - $(FC) $(FFLAGS) -c -DMG5AMC_MEEXPORTER_CUDACPP $< -I../../Source/ $(OMPFLAGS) -o $@ + $(FC) $(MG_FCFLAGS) $(FCFLAGS) -c -DMG5AMC_MEEXPORTER_CUDACPP $< -I../../Source/ $(OMPFLAGS) -o $@ # Dependencies @@ -215,60 +197,42 @@ unwgt.o: genps.inc nexternal.inc symswap.inc cluster.inc run.inc message.inc \ initcluster.o: message.inc # Extra dependencies on discretesampler.mod +../../Source/discretesampler.mod: ../../Source/DiscreteSampler.f -auto_dsig.o: .libs -driver.o: .libs -driver_cudacpp.o: .libs -$(MATRIX): .libs -genps.o: .libs +auto_dsig.o: ../../Source/discretesampler.mod +driver.o: ../../Source/discretesampler.mod +driver_cudacpp.o: ../../Source/discretesampler.mod +$(MATRIX): ../../Source/discretesampler.mod +genps.o: ../../Source/discretesampler.mod # Cudacpp avxall targets -UNAME_P := $(shell uname -p) ifeq ($(UNAME_P),ppc64le) -avxall: avxnone avxsse4 +cppall: cppnative cppnone cppsse4 else ifeq ($(UNAME_P),arm) -avxall: avxnone avxsse4 +cppall: cppnative cppnone cppsse4 else -avxall: avxnone avxsse4 avxavx2 avx512y avx512z +cppall: cppnative cppnone cppsse4 cppavx2 cppavx512y cppavx512z endif -avxnone: $(PROG)_fortran $(DSIG_cudacpp) - @echo - $(MAKE) USEBUILDDIR=1 AVX=none - -avxsse4: $(PROG)_fortran $(DSIG_cudacpp) - @echo - $(MAKE) USEBUILDDIR=1 AVX=sse4 - -avxavx2: $(PROG)_fortran $(DSIG_cudacpp) - @echo - $(MAKE) USEBUILDDIR=1 AVX=avx2 - -avx512y: $(PROG)_fortran $(DSIG_cudacpp) - @echo - $(MAKE) USEBUILDDIR=1 AVX=512y - -avx512z: $(PROG)_fortran $(DSIG_cudacpp) - @echo - $(MAKE) USEBUILDDIR=1 AVX=512z - -###endif - -# Clean (NB: 'make clean' in Source calls 'make clean' in all P*) +ALL: cppall cuda -clean: # Clean builds: fortran in this Pn; cudacpp executables for one AVX in this Pn - $(RM) *.o gensym $(PROG) $(PROG)_fortran $(PROG)_forhel $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(CUDACPP_BUILDDIR)/$(PROG)_cuda +# Clean all architecture-specific builds: +clean: + $(RM) *.o gensym $(PROG) $(PROG)_* + $(RM) -rf build.*/*{.o,.so,.exe,.dylib,madevent_*} + @for dir in build.*; do if [ -z "$$(ls -A $${dir})" ]; then rm -r $${dir}; else echo "Not cleaning $${dir}; not empty"; fi; done -cleanavxs: clean # Clean builds: fortran in this Pn; cudacpp for all AVX in this Pn and in src - $(MAKE) -f $(CUDACPP_MAKEFILE) cleanall - rm -f $(CUDACPP_BUILDDIR)/.cudacpplibs - rm -f .libs +cleanall: cleansrc + for PROCESS in ../P[0-9]*; do $(MAKE) -C $${PROCESS} clean; done -cleanall: # Clean builds: fortran in all P* and in Source; cudacpp for all AVX in all P* and in src - make -C ../../Source cleanall - rm -rf $(LIBDIR)libbias.$(libext) - rm -f ../../Source/*.mod ../../Source/*/*.mod +# Clean one architecture-specific build +clean%: + $(RM) -r build.$*_* -distclean: cleanall # Clean all fortran and cudacpp builds as well as the googletest installation - $(MAKE) -f $(CUDACPP_MAKEFILE) distclean +# Clean common source directories (interferes with other P*) +cleansrc: + make -C ../../Source clean + $(RM) -f $(SOURCEDIR_GUARD) ../../Source/{*.mod,.lock} ../../Source/*/*.mod + $(RM) -r $(LIBDIR)libbias.$(libext) + if [ -d ../../src ]; then $(MAKE) -C ../../src -f cudacpp_src.mk clean; fi diff --git a/epochX/cudacpp/gg_ttg.mad/SubProcesses/runTest.cc b/epochX/cudacpp/gg_ttg.mad/SubProcesses/runTest.cc index d4a760a71b..734235824a 100644 --- a/epochX/cudacpp/gg_ttg.mad/SubProcesses/runTest.cc +++ b/epochX/cudacpp/gg_ttg.mad/SubProcesses/runTest.cc @@ -246,15 +246,15 @@ struct CUDATest : public CUDA_CPU_TestBase #define TESTID_CPU( s ) s##_CPU #define XTESTID_CPU( s ) TESTID_CPU( s ) #define MG_INSTANTIATE_TEST_SUITE_CPU( prefix, test_suite_name ) \ -INSTANTIATE_TEST_SUITE_P( prefix, \ - test_suite_name, \ - testing::Values( new CPUTest( MG_EPOCH_REFERENCE_FILE_NAME ) ) ); + INSTANTIATE_TEST_SUITE_P( prefix, \ + test_suite_name, \ + testing::Values( new CPUTest( MG_EPOCH_REFERENCE_FILE_NAME ) ) ); #define TESTID_GPU( s ) s##_GPU #define XTESTID_GPU( s ) TESTID_GPU( s ) #define MG_INSTANTIATE_TEST_SUITE_GPU( prefix, test_suite_name ) \ -INSTANTIATE_TEST_SUITE_P( prefix, \ - test_suite_name, \ - testing::Values( new CUDATest( MG_EPOCH_REFERENCE_FILE_NAME ) ) ); + INSTANTIATE_TEST_SUITE_P( prefix, \ + test_suite_name, \ + testing::Values( new CUDATest( MG_EPOCH_REFERENCE_FILE_NAME ) ) ); #ifdef __CUDACC__ MG_INSTANTIATE_TEST_SUITE_GPU( XTESTID_GPU( MG_EPOCH_PROCESS_ID ), MadgraphTest ); diff --git a/epochX/cudacpp/gg_ttg.mad/SubProcesses/testxxx.cc b/epochX/cudacpp/gg_ttg.mad/SubProcesses/testxxx.cc index 3361fe5aa9..1d315f6d75 100644 --- a/epochX/cudacpp/gg_ttg.mad/SubProcesses/testxxx.cc +++ b/epochX/cudacpp/gg_ttg.mad/SubProcesses/testxxx.cc @@ -40,7 +40,7 @@ namespace mg5amcCpu { std::string FPEhandlerMessage = "unknown"; int FPEhandlerIevt = -1; - inline void FPEhandler( int sig ) + inline void FPEhandler( int ) { #ifdef __CUDACC__ std::cerr << "Floating Point Exception (GPU): '" << FPEhandlerMessage << "' ievt=" << FPEhandlerIevt << std::endl; @@ -71,11 +71,10 @@ TEST( XTESTID( MG_EPOCH_PROCESS_ID ), testxxx ) constexpr bool testEvents = !dumpEvents; // run the test? constexpr fptype toleranceXXXs = std::is_same::value ? 1.E-15 : 1.E-5; // Constant parameters - constexpr int neppM = MemoryAccessMomenta::neppM; // AOSOA layout constexpr int np4 = CPPProcess::np4; - const int nevt = 32; // 12 independent tests plus 20 duplicates (need a multiple of 16 for floats '512z') - assert( nevt % neppM == 0 ); // nevt must be a multiple of neppM - assert( nevt % neppV == 0 ); // nevt must be a multiple of neppV + const int nevt = 32; // 12 independent tests plus 20 duplicates (need a multiple of 16 for floats '512z') + assert( nevt % MemoryAccessMomenta::neppM == 0 ); // nevt must be a multiple of neppM + assert( nevt % neppV == 0 ); // nevt must be a multiple of neppV // Fill in the input momenta #ifdef __CUDACC__ mg5amcGpu::PinnedHostBufferMomenta hstMomenta( nevt ); // AOSOA[npagM][npar=4][np4=4][neppM] diff --git a/epochX/cudacpp/gg_ttg.mad/bin/internal/banner.py b/epochX/cudacpp/gg_ttg.mad/bin/internal/banner.py index bd1517985f..b408679c2f 100755 --- a/epochX/cudacpp/gg_ttg.mad/bin/internal/banner.py +++ b/epochX/cudacpp/gg_ttg.mad/bin/internal/banner.py @@ -2,11 +2,11 @@ # # Copyright (c) 2011 The MadGraph5_aMC@NLO Development team and Contributors # -# This file is a part of the MadGraph5_aMC@NLO project, an application which +# This file is a part of the MadGraph5_aMC@NLO project, an application which # automatically generates Feynman diagrams and matrix elements for arbitrary # high-energy processes in the Standard Model and beyond. # -# It is subject to the MadGraph5_aMC@NLO license which should accompany this +# It is subject to the MadGraph5_aMC@NLO license which should accompany this # distribution. # # For more information, visit madgraph.phys.ucl.ac.be and amcatnlo.web.cern.ch @@ -53,7 +53,7 @@ MADEVENT = False import madgraph.various.misc as misc import madgraph.iolibs.file_writers as file_writers - import madgraph.iolibs.files as files + import madgraph.iolibs.files as files import models.check_param_card as param_card_reader from madgraph import MG5DIR, MadGraph5Error, InvalidCmd @@ -80,36 +80,36 @@ class Banner(dict): 'mgproccard': 'MGProcCard', 'mgruncard': 'MGRunCard', 'ma5card_parton' : 'MA5Card_parton', - 'ma5card_hadron' : 'MA5Card_hadron', + 'ma5card_hadron' : 'MA5Card_hadron', 'mggenerationinfo': 'MGGenerationInfo', 'mgpythiacard': 'MGPythiaCard', 'mgpgscard': 'MGPGSCard', 'mgdelphescard': 'MGDelphesCard', 'mgdelphestrigger': 'MGDelphesTrigger', 'mgshowercard': 'MGShowerCard' } - + forbid_cdata = ['initrwgt'] - + def __init__(self, banner_path=None): """ """ if isinstance(banner_path, Banner): dict.__init__(self, banner_path) self.lhe_version = banner_path.lhe_version - return + return else: dict.__init__(self) - + #Look at the version if MADEVENT: self['mgversion'] = '#%s\n' % open(pjoin(MEDIR, 'MGMEVersion.txt')).read() else: info = misc.get_pkg_info() self['mgversion'] = info['version']+'\n' - + self.lhe_version = None - + if banner_path: self.read_banner(banner_path) @@ -123,7 +123,7 @@ def __init__(self, banner_path=None): 'mgruncard':'run_card.dat', 'mgpythiacard':'pythia_card.dat', 'mgpgscard' : 'pgs_card.dat', - 'mgdelphescard':'delphes_card.dat', + 'mgdelphescard':'delphes_card.dat', 'mgdelphestrigger':'delphes_trigger.dat', 'mg5proccard':'proc_card_mg5.dat', 'mgproccard': 'proc_card.dat', @@ -137,10 +137,10 @@ def __init__(self, banner_path=None): 'mgshowercard':'shower_card.dat', 'pythia8':'pythia8_card.dat', 'ma5card_parton':'madanalysis5_parton_card.dat', - 'ma5card_hadron':'madanalysis5_hadron_card.dat', + 'ma5card_hadron':'madanalysis5_hadron_card.dat', 'run_settings':'' } - + def read_banner(self, input_path): """read a banner""" @@ -151,7 +151,7 @@ def read_banner(self, input_path): def split_iter(string): return (x.groups(0)[0] for x in re.finditer(r"([^\n]*\n)", string, re.DOTALL)) input_path = split_iter(input_path) - + text = '' store = False for line in input_path: @@ -170,13 +170,13 @@ def split_iter(string): text += line else: text += '%s%s' % (line, '\n') - - #reaching end of the banner in a event file avoid to read full file + + #reaching end of the banner in a event file avoid to read full file if "
" in line: break elif "" in line: break - + def __getattribute__(self, attr): """allow auto-build for the run_card/param_card/... """ try: @@ -187,23 +187,23 @@ def __getattribute__(self, attr): return self.charge_card(attr) - + def change_lhe_version(self, version): """change the lhe version associate to the banner""" - + version = float(version) if version < 3: version = 1 elif version > 3: raise Exception("Not Supported version") self.lhe_version = version - + def get_cross(self, witherror=False): """return the cross-section of the file""" if "init" not in self: raise Exception - + text = self["init"].split('\n') cross = 0 error = 0 @@ -217,13 +217,13 @@ def get_cross(self, witherror=False): return cross else: return cross, math.sqrt(error) - + def scale_init_cross(self, ratio): """modify the init information with the associate scale""" assert "init" in self - + all_lines = self["init"].split('\n') new_data = [] new_data.append(all_lines[0]) @@ -231,29 +231,29 @@ def scale_init_cross(self, ratio): line = all_lines[i] split = line.split() if len(split) == 4: - xsec, xerr, xmax, pid = split + xsec, xerr, xmax, pid = split else: new_data += all_lines[i:] break pid = int(pid) - + line = " %+13.7e %+13.7e %+13.7e %i" % \ (ratio*float(xsec), ratio* float(xerr), ratio*float(xmax), pid) new_data.append(line) self['init'] = '\n'.join(new_data) - + def get_pdg_beam(self): """return the pdg of each beam""" - + assert "init" in self - + all_lines = self["init"].split('\n') pdg1,pdg2,_ = all_lines[0].split(None, 2) return int(pdg1), int(pdg2) - + def load_basic(self, medir): """ Load the proc_card /param_card and run_card """ - + self.add(pjoin(medir,'Cards', 'param_card.dat')) self.add(pjoin(medir,'Cards', 'run_card.dat')) if os.path.exists(pjoin(medir, 'SubProcesses', 'procdef_mg5.dat')): @@ -261,29 +261,29 @@ def load_basic(self, medir): self.add(pjoin(medir,'Cards', 'proc_card_mg5.dat')) else: self.add(pjoin(medir,'Cards', 'proc_card.dat')) - + def change_seed(self, seed): """Change the seed value in the banner""" # 0 = iseed p = re.compile(r'''^\s*\d+\s*=\s*iseed''', re.M) new_seed_str = " %s = iseed" % seed self['mgruncard'] = p.sub(new_seed_str, self['mgruncard']) - + def add_generation_info(self, cross, nb_event): """add info on MGGeneration""" - + text = """ # Number of Events : %s # Integrated weight (pb) : %s """ % (nb_event, cross) self['MGGenerationInfo'] = text - + ############################################################################ # SPLIT BANNER ############################################################################ def split(self, me_dir, proc_card=True): """write the banner in the Cards directory. - proc_card argument is present to avoid the overwrite of proc_card + proc_card argument is present to avoid the overwrite of proc_card information""" for tag, text in self.items(): @@ -305,37 +305,37 @@ def check_pid(self, pid2label): """special routine removing width/mass of particles not present in the model This is usefull in case of loop model card, when we want to use the non loop model.""" - + if not hasattr(self, 'param_card'): self.charge_card('slha') - + for tag in ['mass', 'decay']: block = self.param_card.get(tag) for data in block: pid = data.lhacode[0] - if pid not in list(pid2label.keys()): + if pid not in list(pid2label.keys()): block.remove((pid,)) def get_lha_strategy(self): """get the lha_strategy: how the weight have to be handle by the shower""" - + if not self["init"]: raise Exception("No init block define") - + data = self["init"].split('\n')[0].split() if len(data) != 10: misc.sprint(len(data), self['init']) raise Exception("init block has a wrong format") return int(float(data[-2])) - + def set_lha_strategy(self, value): """set the lha_strategy: how the weight have to be handle by the shower""" - + if not (-4 <= int(value) <= 4): six.reraise(Exception, "wrong value for lha_strategy", value) if not self["init"]: raise Exception("No init block define") - + all_lines = self["init"].split('\n') data = all_lines[0].split() if len(data) != 10: @@ -351,13 +351,13 @@ def modify_init_cross(self, cross, allow_zero=False): assert isinstance(cross, dict) # assert "all" in cross assert "init" in self - + cross = dict(cross) for key in cross.keys(): if isinstance(key, str) and key.isdigit() and int(key) not in cross: cross[int(key)] = cross[key] - - + + all_lines = self["init"].split('\n') new_data = [] new_data.append(all_lines[0]) @@ -365,7 +365,7 @@ def modify_init_cross(self, cross, allow_zero=False): line = all_lines[i] split = line.split() if len(split) == 4: - xsec, xerr, xmax, pid = split + xsec, xerr, xmax, pid = split else: new_data += all_lines[i:] break @@ -383,23 +383,23 @@ def modify_init_cross(self, cross, allow_zero=False): (float(cross[pid]), ratio* float(xerr), ratio*float(xmax), pid) new_data.append(line) self['init'] = '\n'.join(new_data) - + ############################################################################ # WRITE BANNER ############################################################################ def write(self, output_path, close_tag=True, exclude=[]): """write the banner""" - + if isinstance(output_path, str): ff = open(output_path, 'w') else: ff = output_path - + if MADEVENT: header = open(pjoin(MEDIR, 'Source', 'banner_header.txt')).read() else: header = open(pjoin(MG5DIR,'Template', 'LO', 'Source', 'banner_header.txt')).read() - + if not self.lhe_version: self.lhe_version = self.get('run_card', 'lhe_version', default=1.0) if float(self.lhe_version) < 3: @@ -412,7 +412,7 @@ def write(self, output_path, close_tag=True, exclude=[]): for tag in [t for t in self.ordered_items if t in list(self.keys())]+ \ [t for t in self.keys() if t not in self.ordered_items]: - if tag in ['init'] or tag in exclude: + if tag in ['init'] or tag in exclude: continue capitalized_tag = self.capitalized_items[tag] if tag in self.capitalized_items else tag start_data, stop_data = '', '' @@ -422,19 +422,19 @@ def write(self, output_path, close_tag=True, exclude=[]): stop_data = ']]>\n' out = '<%(tag)s>%(start_data)s\n%(text)s\n%(stop_data)s\n' % \ {'tag':capitalized_tag, 'text':self[tag].strip(), - 'start_data': start_data, 'stop_data':stop_data} + 'start_data': start_data, 'stop_data':stop_data} try: ff.write(out) except: ff.write(out.encode('utf-8')) - - + + if not '/header' in exclude: out = '\n' try: ff.write(out) except: - ff.write(out.encode('utf-8')) + ff.write(out.encode('utf-8')) if 'init' in self and not 'init' in exclude: text = self['init'] @@ -444,22 +444,22 @@ def write(self, output_path, close_tag=True, exclude=[]): ff.write(out) except: ff.write(out.encode('utf-8')) - + if close_tag: - out = '\n' + out = '\n' try: ff.write(out) except: - ff.write(out.encode('utf-8')) + ff.write(out.encode('utf-8')) return ff - - + + ############################################################################ # BANNER ############################################################################ def add(self, path, tag=None): """Add the content of the file to the banner""" - + if not tag: card_name = os.path.basename(path) if 'param_card' in card_name: @@ -505,33 +505,33 @@ def add_text(self, tag, text): if tag == 'param_card': tag = 'slha' elif tag == 'run_card': - tag = 'mgruncard' + tag = 'mgruncard' elif tag == 'proc_card': - tag = 'mg5proccard' + tag = 'mg5proccard' elif tag == 'shower_card': tag = 'mgshowercard' elif tag == 'FO_analyse_card': tag = 'foanalyse' - + self[tag.lower()] = text - - + + def charge_card(self, tag): """Build the python object associated to the card""" - + if tag in ['param_card', 'param']: tag = 'slha' elif tag in ['run_card', 'run']: - tag = 'mgruncard' + tag = 'mgruncard' elif tag == 'proc_card': - tag = 'mg5proccard' + tag = 'mg5proccard' elif tag == 'shower_card': tag = 'mgshowercard' elif tag == 'FO_analyse_card': tag = 'foanalyse' assert tag in ['slha', 'mgruncard', 'mg5proccard', 'mgshowercard', 'foanalyse'], 'invalid card %s' % tag - + if tag == 'slha': param_card = self[tag].split('\n') self.param_card = param_card_reader.ParamCard(param_card) @@ -544,56 +544,56 @@ def charge_card(self, tag): self.proc_card = ProcCard(proc_card) return self.proc_card elif tag =='mgshowercard': - shower_content = self[tag] + shower_content = self[tag] if MADEVENT: import internal.shower_card as shower_card else: import madgraph.various.shower_card as shower_card self.shower_card = shower_card.ShowerCard(shower_content, True) - # set testing to false (testing = true allow to init using + # set testing to false (testing = true allow to init using # the card content instead of the card path" self.shower_card.testing = False return self.shower_card elif tag =='foanalyse': - analyse_content = self[tag] + analyse_content = self[tag] if MADEVENT: import internal.FO_analyse_card as FO_analyse_card else: import madgraph.various.FO_analyse_card as FO_analyse_card - # set testing to false (testing = true allow to init using + # set testing to false (testing = true allow to init using # the card content instead of the card path" self.FOanalyse_card = FO_analyse_card.FOAnalyseCard(analyse_content, True) self.FOanalyse_card.testing = False return self.FOanalyse_card - + def get_detail(self, tag, *arg, **opt): """return a specific """ - + if tag in ['param_card', 'param']: tag = 'slha' attr_tag = 'param_card' elif tag in ['run_card', 'run']: - tag = 'mgruncard' + tag = 'mgruncard' attr_tag = 'run_card' elif tag == 'proc_card': - tag = 'mg5proccard' + tag = 'mg5proccard' attr_tag = 'proc_card' elif tag == 'model': - tag = 'mg5proccard' + tag = 'mg5proccard' attr_tag = 'proc_card' arg = ('model',) elif tag == 'generate': - tag = 'mg5proccard' + tag = 'mg5proccard' attr_tag = 'proc_card' arg = ('generate',) elif tag == 'shower_card': tag = 'mgshowercard' attr_tag = 'shower_card' assert tag in ['slha', 'mgruncard', 'mg5proccard', 'shower_card'], '%s not recognized' % tag - + if not hasattr(self, attr_tag): - self.charge_card(attr_tag) + self.charge_card(attr_tag) card = getattr(self, attr_tag) if len(arg) == 0: @@ -613,7 +613,7 @@ def get_detail(self, tag, *arg, **opt): if 'default' in opt: return opt['default'] else: - raise + raise elif len(arg) == 2 and tag == 'slha': try: return card[arg[0]].get(arg[1:]) @@ -621,15 +621,15 @@ def get_detail(self, tag, *arg, **opt): if 'default' in opt: return opt['default'] else: - raise + raise elif len(arg) == 0: return card else: raise Exception("Unknow command") - + #convenient alias get = get_detail - + def set(self, tag, *args): """modify one of the cards""" @@ -637,27 +637,27 @@ def set(self, tag, *args): tag = 'slha' attr_tag = 'param_card' elif tag == 'run_card': - tag = 'mgruncard' + tag = 'mgruncard' attr_tag = 'run_card' elif tag == 'proc_card': - tag = 'mg5proccard' + tag = 'mg5proccard' attr_tag = 'proc_card' elif tag == 'model': - tag = 'mg5proccard' + tag = 'mg5proccard' attr_tag = 'proc_card' arg = ('model',) elif tag == 'generate': - tag = 'mg5proccard' + tag = 'mg5proccard' attr_tag = 'proc_card' arg = ('generate',) elif tag == 'shower_card': tag = 'mgshowercard' attr_tag = 'shower_card' assert tag in ['slha', 'mgruncard', 'mg5proccard', 'shower_card'], 'not recognized' - + if not hasattr(self, attr_tag): - self.charge_card(attr_tag) - + self.charge_card(attr_tag) + card = getattr(self, attr_tag) if len(args) ==2: if tag == 'mg5proccard': @@ -666,20 +666,20 @@ def set(self, tag, *args): card[args[0]] = args[1] else: card[args[:-1]] = args[-1] - - + + @misc.multiple_try() def add_to_file(self, path, seed=None, out=None): """Add the banner to a file and change the associate seed in the banner""" if seed is not None: self.set("run_card", "iseed", seed) - + if not out: path_out = "%s.tmp" % path else: path_out = out - + ff = self.write(path_out, close_tag=False, exclude=['MGGenerationInfo', '/header', 'init']) ff.write("## END BANNER##\n") @@ -698,44 +698,44 @@ def add_to_file(self, path, seed=None, out=None): files.mv(path_out, path) - + def split_banner(banner_path, me_dir, proc_card=True): """a simple way to split a banner""" - + banner = Banner(banner_path) banner.split(me_dir, proc_card) - + def recover_banner(results_object, level, run=None, tag=None): """as input we receive a gen_crossxhtml.AllResults object. This define the current banner and load it """ - + if not run: - try: - _run = results_object.current['run_name'] - _tag = results_object.current['tag'] + try: + _run = results_object.current['run_name'] + _tag = results_object.current['tag'] except Exception: return Banner() else: _run = run if not tag: - try: - _tag = results_object[run].tags[-1] + try: + _tag = results_object[run].tags[-1] except Exception as error: if os.path.exists( pjoin(results_object.path,'Events','%s_banner.txt' % (run))): tag = None else: - return Banner() + return Banner() else: _tag = tag - - path = results_object.path - if tag: + + path = results_object.path + if tag: banner_path = pjoin(path,'Events',run,'%s_%s_banner.txt' % (run, tag)) else: banner_path = pjoin(results_object.path,'Events','%s_banner.txt' % (run)) - + if not os.path.exists(banner_path): if level != "parton" and tag != _tag: return recover_banner(results_object, level, _run, results_object[_run].tags[0]) @@ -754,12 +754,12 @@ def recover_banner(results_object, level, run=None, tag=None): return Banner(lhe.banner) # security if the banner was remove (or program canceled before created it) - return Banner() - + return Banner() + banner = Banner(banner_path) - - - + + + if level == 'pythia': if 'mgpythiacard' in banner: del banner['mgpythiacard'] @@ -768,13 +768,13 @@ def recover_banner(results_object, level, run=None, tag=None): if tag in banner: del banner[tag] return banner - + class InvalidRunCard(InvalidCmd): pass class ProcCard(list): """Basic Proccard object""" - + history_header = \ '#************************************************************\n' + \ '#* MadGraph5_aMC@NLO *\n' + \ @@ -798,10 +798,10 @@ class ProcCard(list): '#* run as ./bin/mg5_aMC filename *\n' + \ '#* *\n' + \ '#************************************************************\n' - - - - + + + + def __init__(self, init=None): """ initialize a basic proc_card""" self.info = {'model': 'sm', 'generate':None, @@ -810,13 +810,13 @@ def __init__(self, init=None): if init: self.read(init) - + def read(self, init): """read the proc_card and save the information""" - + if isinstance(init, str): #path to file init = open(init, 'r') - + store_line = '' for line in init: line = line.rstrip() @@ -828,28 +828,28 @@ def read(self, init): store_line = "" if store_line: raise Exception("WRONG CARD FORMAT") - - + + def move_to_last(self, cmd): """move an element to the last history.""" for line in self[:]: if line.startswith(cmd): self.remove(line) list.append(self, line) - + def append(self, line): """"add a line in the proc_card perform automatically cleaning""" - + line = line.strip() cmds = line.split() if len(cmds) == 0: return - + list.append(self, line) - + # command type: cmd = cmds[0] - + if cmd == 'output': # Remove previous outputs from history self.clean(allow_for_removal = ['output'], keep_switch=True, @@ -875,7 +875,7 @@ def append(self, line): elif cmds[1] == 'proc_v4': #full cleaning self[:] = [] - + def clean(self, to_keep=['set','add','load'], remove_bef_last=None, @@ -884,13 +884,13 @@ def clean(self, to_keep=['set','add','load'], keep_switch=False): """Remove command in arguments from history. All command before the last occurrence of 'remove_bef_last' - (including it) will be removed (but if another options tells the opposite). + (including it) will be removed (but if another options tells the opposite). 'to_keep' is a set of line to always keep. - 'to_remove' is a set of line to always remove (don't care about remove_bef_ + 'to_remove' is a set of line to always remove (don't care about remove_bef_ status but keep_switch acts.). - if 'allow_for_removal' is define only the command in that list can be + if 'allow_for_removal' is define only the command in that list can be remove of the history for older command that remove_bef_lb1. all parameter - present in to_remove are always remove even if they are not part of this + present in to_remove are always remove even if they are not part of this list. keep_switch force to keep the statement remove_bef_??? which changes starts the removal mode. @@ -900,8 +900,8 @@ def clean(self, to_keep=['set','add','load'], if __debug__ and allow_for_removal: for arg in to_keep: assert arg not in allow_for_removal - - + + nline = -1 removal = False #looping backward @@ -912,7 +912,7 @@ def clean(self, to_keep=['set','add','load'], if not removal and remove_bef_last: if self[nline].startswith(remove_bef_last): removal = True - switch = True + switch = True # if this is the switch and is protected pass to the next element if switch and keep_switch: @@ -923,12 +923,12 @@ def clean(self, to_keep=['set','add','load'], if any([self[nline].startswith(arg) for arg in to_remove]): self.pop(nline) continue - + # Only if removal mode is active! if removal: if allow_for_removal: # Only a subset of command can be removed - if any([self[nline].startswith(arg) + if any([self[nline].startswith(arg) for arg in allow_for_removal]): self.pop(nline) continue @@ -936,10 +936,10 @@ def clean(self, to_keep=['set','add','load'], # All command have to be remove but protected self.pop(nline) continue - + # update the counter to pass to the next element nline -= 1 - + def get(self, tag, default=None): if isinstance(tag, int): list.__getattr__(self, tag) @@ -954,32 +954,32 @@ def get(self, tag, default=None): except ValueError: name, content = line[7:].split(None,1) out.append((name, content)) - return out + return out else: return self.info[tag] - + def write(self, path): """write the proc_card to a given path""" - + fsock = open(path, 'w') fsock.write(self.history_header) for line in self: while len(line) > 70: - sub, line = line[:70]+"\\" , line[70:] + sub, line = line[:70]+"\\" , line[70:] fsock.write(sub+"\n") else: fsock.write(line+"\n") - -class InvalidCardEdition(InvalidCmd): pass - + +class InvalidCardEdition(InvalidCmd): pass + class ConfigFile(dict): """ a class for storing/dealing with input file. - """ + """ def __init__(self, finput=None, **opt): """initialize a new instance. input can be an instance of MadLoopParam, - a file, a path to a file, or simply Nothing""" - + a file, a path to a file, or simply Nothing""" + if isinstance(finput, self.__class__): dict.__init__(self) for key in finput.__dict__: @@ -989,7 +989,7 @@ def __init__(self, finput=None, **opt): return else: dict.__init__(self) - + # Initialize it with all the default value self.user_set = set() self.auto_set = set() @@ -1000,15 +1000,15 @@ def __init__(self, finput=None, **opt): self.comments = {} # comment associated to parameters. can be display via help message # store the valid options for a given parameter. self.allowed_value = {} - + self.default_setup() self.plugin_input(finput) - + # if input is define read that input if isinstance(finput, (file, str, StringIO.StringIO)): self.read(finput, **opt) - + @@ -1028,7 +1028,7 @@ def __add__(self, other): base = self.__class__(self) #base = copy.copy(self) base.update((key.lower(),value) for key, value in other.items()) - + return base def __radd__(self, other): @@ -1036,26 +1036,26 @@ def __radd__(self, other): new = copy.copy(other) new.update((key, value) for key, value in self.items()) return new - + def __contains__(self, key): return dict.__contains__(self, key.lower()) def __iter__(self): - + for name in super(ConfigFile, self).__iter__(): yield self.lower_to_case[name.lower()] - - + + #iter = super(ConfigFile, self).__iter__() #misc.sprint(iter) #return (self.lower_to_case[name] for name in iter) - + def keys(self): return [name for name in self] - + def items(self): return [(name,self[name]) for name in self] - + @staticmethod def warn(text, level, raiseerror=False): """convenient proxy to raiseerror/print warning""" @@ -1071,11 +1071,11 @@ def warn(text, level, raiseerror=False): log = lambda t: logger.log(level, t) elif level: log = level - + return log(text) def post_set(self, name, value, change_userdefine, raiseerror): - + if value is None: value = self[name] @@ -1087,25 +1087,25 @@ def post_set(self, name, value, change_userdefine, raiseerror): return getattr(self, 'post_set_%s' % name)(value, change_userdefine, raiseerror) else: raise - + def __setitem__(self, name, value, change_userdefine=False,raiseerror=False): """set the attribute and set correctly the type if the value is a string. change_userdefine on True if we have to add the parameter in user_set """ - + if not len(self): #Should never happen but when deepcopy/pickle self.__init__() - + name = name.strip() - lower_name = name.lower() - + lower_name = name.lower() + # 0. check if this parameter is a system only one if change_userdefine and lower_name in self.system_only: text='%s is a private entry which can not be modify by the user. Keep value at %s' % (name,self[name]) self.warn(text, 'critical', raiseerror) return - + #1. check if the parameter is set to auto -> pass it to special if lower_name in self: targettype = type(dict.__getitem__(self, lower_name)) @@ -1115,22 +1115,22 @@ def __setitem__(self, name, value, change_userdefine=False,raiseerror=False): self.user_set.remove(lower_name) #keep old value. self.post_set(lower_name, 'auto', change_userdefine, raiseerror) - return + return elif lower_name in self.auto_set: self.auto_set.remove(lower_name) - + # 2. Find the type of the attribute that we want if lower_name in self.list_parameter: targettype = self.list_parameter[lower_name] - - - + + + if isinstance(value, str): # split for each comma/space value = value.strip() if value.startswith('[') and value.endswith(']'): value = value[1:-1] - #do not perform split within a " or ' block + #do not perform split within a " or ' block data = re.split(r"((? bad input dropped.append(val) - + if not new_values: text= "value '%s' for entry '%s' is not valid. Preserving previous value: '%s'.\n" \ % (value, name, self[lower_name]) text += "allowed values are any list composed of the following entries: %s" % ', '.join([str(i) for i in self.allowed_value[lower_name]]) - return self.warn(text, 'warning', raiseerror) - elif dropped: + return self.warn(text, 'warning', raiseerror) + elif dropped: text = "some value for entry '%s' are not valid. Invalid items are: '%s'.\n" \ % (name, dropped) text += "value will be set to %s" % new_values - text += "allowed items in the list are: %s" % ', '.join([str(i) for i in self.allowed_value[lower_name]]) + text += "allowed items in the list are: %s" % ', '.join([str(i) for i in self.allowed_value[lower_name]]) self.warn(text, 'warning') values = new_values # make the assignment - dict.__setitem__(self, lower_name, values) + dict.__setitem__(self, lower_name, values) if change_userdefine: self.user_set.add(lower_name) #check for specific action - return self.post_set(lower_name, None, change_userdefine, raiseerror) + return self.post_set(lower_name, None, change_userdefine, raiseerror) elif lower_name in self.dict_parameter: - targettype = self.dict_parameter[lower_name] + targettype = self.dict_parameter[lower_name] full_reset = True #check if we just update the current dict or not - + if isinstance(value, str): value = value.strip() # allowed entry: @@ -1209,7 +1209,7 @@ def __setitem__(self, name, value, change_userdefine=False,raiseerror=False): # name , value => just add the entry # name value => just add the entry # {name1:value1, name2:value2} => full reset - + # split for each comma/space if value.startswith('{') and value.endswith('}'): new_value = {} @@ -1219,23 +1219,23 @@ def __setitem__(self, name, value, change_userdefine=False,raiseerror=False): x, y = pair.split(':') x, y = x.strip(), y.strip() if x.startswith(('"',"'")) and x.endswith(x[0]): - x = x[1:-1] + x = x[1:-1] new_value[x] = y value = new_value elif ',' in value: x,y = value.split(',') value = {x.strip():y.strip()} full_reset = False - + elif ':' in value: x,y = value.split(':') value = {x.strip():y.strip()} - full_reset = False + full_reset = False else: x,y = value.split() value = {x:y} - full_reset = False - + full_reset = False + if isinstance(value, dict): for key in value: value[key] = self.format_variable(value[key], targettype, name=name) @@ -1248,7 +1248,7 @@ def __setitem__(self, name, value, change_userdefine=False,raiseerror=False): if change_userdefine: self.user_set.add(lower_name) return self.post_set(lower_name, None, change_userdefine, raiseerror) - elif name in self: + elif name in self: targettype = type(self[name]) else: logger.debug('Trying to add argument %s in %s. ' % (name, self.__class__.__name__) +\ @@ -1256,22 +1256,22 @@ def __setitem__(self, name, value, change_userdefine=False,raiseerror=False): suggestions = [k for k in self.keys() if k.startswith(name[0].lower())] if len(suggestions)>0: logger.debug("Did you mean one of the following: %s"%suggestions) - self.add_param(lower_name, self.format_variable(UnknownType(value), + self.add_param(lower_name, self.format_variable(UnknownType(value), UnknownType, name)) self.lower_to_case[lower_name] = name if change_userdefine: self.user_set.add(lower_name) return self.post_set(lower_name, None, change_userdefine, raiseerror) - + value = self.format_variable(value, targettype, name=name) #check that the value is allowed: if lower_name in self.allowed_value and '*' not in self.allowed_value[lower_name]: valid = False allowed = self.allowed_value[lower_name] - + # check if the current value is allowed or not (set valid to True) if value in allowed: - valid=True + valid=True elif isinstance(value, str): value = value.lower().strip() allowed = [str(v).lower() for v in allowed] @@ -1279,7 +1279,7 @@ def __setitem__(self, name, value, change_userdefine=False,raiseerror=False): i = allowed.index(value) value = self.allowed_value[lower_name][i] valid=True - + if not valid: # act if not valid: text = "value '%s' for entry '%s' is not valid. Preserving previous value: '%s'.\n" \ @@ -1303,7 +1303,7 @@ def add_param(self, name, value, system=False, comment=False, typelist=None, if __debug__: if lower_name in self: raise Exception("Duplicate case for %s in %s" % (name,self.__class__)) - + dict.__setitem__(self, lower_name, value) self.lower_to_case[lower_name] = name if isinstance(value, list): @@ -1318,12 +1318,12 @@ def add_param(self, name, value, system=False, comment=False, typelist=None, elif isinstance(value, dict): allvalues = list(value.values()) if any([type(allvalues[0]) != type(v) for v in allvalues]): - raise Exception("All entry should have the same type") - self.dict_parameter[lower_name] = type(allvalues[0]) + raise Exception("All entry should have the same type") + self.dict_parameter[lower_name] = type(allvalues[0]) if '__type__' in value: del value['__type__'] dict.__setitem__(self, lower_name, value) - + if allowed and allowed != ['*']: self.allowed_value[lower_name] = allowed if lower_name in self.list_parameter: @@ -1333,8 +1333,8 @@ def add_param(self, name, value, system=False, comment=False, typelist=None, assert value in allowed or '*' in allowed #elif isinstance(value, bool) and allowed != ['*']: # self.allowed_value[name] = [True, False] - - + + if system: self.system_only.add(lower_name) if comment: @@ -1342,7 +1342,7 @@ def add_param(self, name, value, system=False, comment=False, typelist=None, def do_help(self, name): """return a minimal help for the parameter""" - + out = "## Information on parameter %s from class %s\n" % (name, self.__class__.__name__) if name.lower() in self: out += "## current value: %s (parameter should be of type %s)\n" % (self[name], type(self[name])) @@ -1351,7 +1351,7 @@ def do_help(self, name): else: out += "## Unknown for this class\n" if name.lower() in self.user_set: - out += "## This value is considered as being set by the user\n" + out += "## This value is considered as being set by the user\n" else: out += "## This value is considered as being set by the system\n" if name.lower() in self.allowed_value: @@ -1359,17 +1359,17 @@ def do_help(self, name): out += "Allowed value are: %s\n" % ','.join([str(p) for p in self.allowed_value[name.lower()]]) else: out += "Suggested value are : %s\n " % ','.join([str(p) for p in self.allowed_value[name.lower()] if p!='*']) - + logger.info(out) return out @staticmethod def guess_type_from_value(value): "try to guess the type of the string --do not use eval as it might not be safe" - + if not isinstance(value, str): return str(value.__class__.__name__) - + #use ast.literal_eval to be safe since value is untrusted # add a timeout to mitigate infinite loop, memory stack attack with misc.stdchannel_redirected(sys.stdout, os.devnull): @@ -1388,7 +1388,7 @@ def guess_type_from_value(value): @staticmethod def format_variable(value, targettype, name="unknown"): """assign the value to the attribute for the given format""" - + if isinstance(targettype, str): if targettype in ['str', 'int', 'float', 'bool']: targettype = eval(targettype) @@ -1412,7 +1412,7 @@ def format_variable(value, targettype, name="unknown"): (name, type(value), targettype, value)) else: raise InvalidCmd("Wrong input type for %s found %s and expecting %s for value %s" %\ - (name, type(value), targettype, value)) + (name, type(value), targettype, value)) else: if targettype != UnknownType: value = value.strip() @@ -1441,8 +1441,8 @@ def format_variable(value, targettype, name="unknown"): value = int(value) elif value.endswith(('k', 'M')) and value[:-1].isdigit(): convert = {'k':1000, 'M':1000000} - value =int(value[:-1]) * convert[value[-1]] - elif '/' in value or '*' in value: + value =int(value[:-1]) * convert[value[-1]] + elif '/' in value or '*' in value: try: split = re.split('(\*|/)',value) v = float(split[0]) @@ -1461,7 +1461,7 @@ def format_variable(value, targettype, name="unknown"): try: value = float(value.replace('d','e')) except ValueError: - raise InvalidCmd("%s can not be mapped to an integer" % value) + raise InvalidCmd("%s can not be mapped to an integer" % value) try: new_value = int(value) except ValueError: @@ -1471,7 +1471,7 @@ def format_variable(value, targettype, name="unknown"): value = new_value else: raise InvalidCmd("incorect input: %s need an integer for %s" % (value,name)) - + elif targettype == float: if value.endswith(('k', 'M')) and value[:-1].isdigit(): convert = {'k':1000, 'M':1000000} @@ -1496,33 +1496,33 @@ def format_variable(value, targettype, name="unknown"): value = v else: raise InvalidCmd("type %s is not handle by the card" % targettype) - + return value - - + + def __getitem__(self, name): - + lower_name = name.lower() if __debug__: if lower_name not in self: if lower_name in [key.lower() for key in self] : raise Exception("Some key are not lower case %s. Invalid use of the class!"\ % [key for key in self if key.lower() != key]) - + if lower_name in self.auto_set: return 'auto' - + return dict.__getitem__(self, name.lower()) - + get = __getitem__ def set(self, name, value, changeifuserset=True, user=False, raiseerror=False): """convenient way to change attribute. changeifuserset=False means that the value is NOT change is the value is not on default. - user=True, means that the value will be marked as modified by the user - (potentially preventing future change to the value) + user=True, means that the value will be marked as modified by the user + (potentially preventing future change to the value) """ # changeifuserset=False -> we need to check if the user force a value. @@ -1530,8 +1530,8 @@ def set(self, name, value, changeifuserset=True, user=False, raiseerror=False): if name.lower() in self.user_set: #value modified by the user -> do nothing return - self.__setitem__(name, value, change_userdefine=user, raiseerror=raiseerror) - + self.__setitem__(name, value, change_userdefine=user, raiseerror=raiseerror) + class RivetCard(ConfigFile): @@ -1706,7 +1706,7 @@ def setRelevantParamCard(self, f_params, f_relparams): yexec_dict = {} yexec_line = exec_line + "yaxis_relvar = " + self['yaxis_relvar'] exec(yexec_line, locals(), yexec_dict) - if self['yaxis_label'] == "": + if self['yaxis_label'] == "": self['yaxis_label'] = "yaxis_relvar" f_relparams.write("{0} = {1}\n".format(self['yaxis_label'], yexec_dict['yaxis_relvar'])) else: @@ -1715,11 +1715,11 @@ def setRelevantParamCard(self, f_params, f_relparams): class ProcCharacteristic(ConfigFile): """A class to handle information which are passed from MadGraph to the madevent - interface.""" - + interface.""" + def default_setup(self): """initialize the directory to the default value""" - + self.add_param('loop_induced', False) self.add_param('has_isr', False) self.add_param('has_fsr', False) @@ -1735,16 +1735,16 @@ def default_setup(self): self.add_param('pdg_initial1', [0]) self.add_param('pdg_initial2', [0]) self.add_param('splitting_types',[], typelist=str) - self.add_param('perturbation_order', [], typelist=str) - self.add_param('limitations', [], typelist=str) - self.add_param('hel_recycling', False) + self.add_param('perturbation_order', [], typelist=str) + self.add_param('limitations', [], typelist=str) + self.add_param('hel_recycling', False) self.add_param('single_color', True) - self.add_param('nlo_mixed_expansion', True) + self.add_param('nlo_mixed_expansion', True) def read(self, finput): - """Read the input file, this can be a path to a file, + """Read the input file, this can be a path to a file, a file object, a str with the content of the file.""" - + if isinstance(finput, str): if "\n" in finput: finput = finput.split('\n') @@ -1752,49 +1752,49 @@ def read(self, finput): finput = open(finput) else: raise Exception("No such file %s" % finput) - + for line in finput: if '#' in line: line = line.split('#',1)[0] if not line: continue - + if '=' in line: key, value = line.split('=',1) self[key.strip()] = value - + def write(self, outputpath): """write the file""" template ="# Information about the process #\n" template +="#########################################\n" - + fsock = open(outputpath, 'w') fsock.write(template) - + for key, value in self.items(): fsock.write(" %s = %s \n" % (key, value)) - - fsock.close() - + + fsock.close() + class GridpackCard(ConfigFile): """an object for the GridpackCard""" - + def default_setup(self): """default value for the GridpackCard""" - + self.add_param("GridRun", True) self.add_param("gevents", 2500) self.add_param("gseed", 1) - self.add_param("ngran", -1) - + self.add_param("ngran", -1) + def read(self, finput): - """Read the input file, this can be a path to a file, + """Read the input file, this can be a path to a file, a file object, a str with the content of the file.""" - + if isinstance(finput, str): if "\n" in finput: finput = finput.split('\n') @@ -1802,7 +1802,7 @@ def read(self, finput): finput = open(finput) else: raise Exception("No such file %s" % finput) - + for line in finput: line = line.split('#')[0] line = line.split('!')[0] @@ -1812,19 +1812,19 @@ def read(self, finput): self[line[1].strip()] = line[0].replace('\'','').strip() def write(self, output_file, template=None): - """Write the run_card in output_file according to template + """Write the run_card in output_file according to template (a path to a valid run_card)""" if not template: if not MADEVENT: - template = pjoin(MG5DIR, 'Template', 'LO', 'Cards', + template = pjoin(MG5DIR, 'Template', 'LO', 'Cards', 'grid_card_default.dat') else: template = pjoin(MEDIR, 'Cards', 'grid_card_default.dat') - + text = "" - for line in open(template,'r'): + for line in open(template,'r'): nline = line.split('#')[0] nline = nline.split('!')[0] comment = line[len(nline):] @@ -1832,19 +1832,19 @@ def write(self, output_file, template=None): if len(nline) != 2: text += line elif nline[1].strip() in self: - text += ' %s\t= %s %s' % (self[nline[1].strip()],nline[1], comment) + text += ' %s\t= %s %s' % (self[nline[1].strip()],nline[1], comment) else: logger.info('Adding missing parameter %s to current run_card (with default value)' % nline[1].strip()) - text += line - + text += line + if isinstance(output_file, str): fsock = open(output_file,'w') else: fsock = output_file - + fsock.write(text) fsock.close() - + class PY8Card(ConfigFile): """ Implements the Pythia8 card.""" @@ -1868,7 +1868,7 @@ def add_default_subruns(self, type): def default_setup(self): """ Sets up the list of available PY8 parameters.""" - + # Visible parameters # ================== self.add_param("Main:numberOfEvents", -1) @@ -1877,11 +1877,11 @@ def default_setup(self): self.add_param("JetMatching:qCut", -1.0, always_write_to_card=False) self.add_param("JetMatching:doShowerKt",False,always_write_to_card=False) # -1 means that it is automatically set. - self.add_param("JetMatching:nJetMax", -1, always_write_to_card=False) + self.add_param("JetMatching:nJetMax", -1, always_write_to_card=False) # for CKKWL merging self.add_param("Merging:TMS", -1.0, always_write_to_card=False) self.add_param("Merging:Process", '', always_write_to_card=False) - # -1 means that it is automatically set. + # -1 means that it is automatically set. self.add_param("Merging:nJetMax", -1, always_write_to_card=False) # for both merging, chose whether to also consider different merging # scale values for the extra weights related to scale and PDF variations. @@ -1918,10 +1918,10 @@ def default_setup(self): comment='This allows to turn on/off hadronization alltogether.') self.add_param("partonlevel:mpi", True, hidden=True, always_write_to_card=False, comment='This allows to turn on/off MPI alltogether.') - self.add_param("Beams:setProductionScalesFromLHEF", False, hidden=True, + self.add_param("Beams:setProductionScalesFromLHEF", False, hidden=True, always_write_to_card=False, comment='This parameter is automatically set to True by MG5aMC when doing MLM merging with PY8.') - + # for MLM merging self.add_param("JetMatching:merge", False, hidden=True, always_write_to_card=False, comment='Specifiy if we are merging sample of different multiplicity.') @@ -1931,9 +1931,9 @@ def default_setup(self): comment='Value of the merging scale below which one does not even write the HepMC event.') self.add_param("JetMatching:doVeto", False, hidden=True, always_write_to_card=False, comment='Do veto externally (e.g. in SysCalc).') - self.add_param("JetMatching:scheme", 1, hidden=True, always_write_to_card=False) + self.add_param("JetMatching:scheme", 1, hidden=True, always_write_to_card=False) self.add_param("JetMatching:setMad", False, hidden=True, always_write_to_card=False, - comment='Specify one must read inputs from the MadGraph banner.') + comment='Specify one must read inputs from the MadGraph banner.') self.add_param("JetMatching:coneRadius", 1.0, hidden=True, always_write_to_card=False) self.add_param("JetMatching:nQmatch",4,hidden=True, always_write_to_card=False) # for CKKWL merging (common with UMEPS, UNLOPS) @@ -1946,7 +1946,7 @@ def default_setup(self): self.add_param("Merging:applyVeto", False, hidden=True, always_write_to_card=False, comment='Do veto externally (e.g. in SysCalc).') self.add_param("Merging:includeWeightInXsection", True, hidden=True, always_write_to_card=False, - comment='If turned off, then the option belows forces PY8 to keep the original weight.') + comment='If turned off, then the option belows forces PY8 to keep the original weight.') self.add_param("Merging:muRen", 91.188, hidden=True, always_write_to_card=False, comment='Set renormalization scales of the 2->2 process.') self.add_param("Merging:muFacInME", 91.188, hidden=True, always_write_to_card=False, @@ -1958,7 +1958,7 @@ def default_setup(self): # To be added in subruns for CKKWL self.add_param("Merging:mayRemoveDecayProducts", False, hidden=True, always_write_to_card=False) self.add_param("Merging:doKTMerging", False, hidden=True, always_write_to_card=False) - self.add_param("Merging:Dparameter", 0.4, hidden=True, always_write_to_card=False) + self.add_param("Merging:Dparameter", 0.4, hidden=True, always_write_to_card=False) self.add_param("Merging:doPTLundMerging", False, hidden=True, always_write_to_card=False) # Special Pythia8 paremeters useful to simplify the shower. @@ -1975,33 +1975,33 @@ def default_setup(self): # Add parameters controlling the subruns execution flow. # These parameters should not be part of PY8SubRun daughter. self.add_default_subruns('parameters') - + def __init__(self, *args, **opts): - # Parameters which are not printed in the card unless they are - # 'user_set' or 'system_set' or part of the + # Parameters which are not printed in the card unless they are + # 'user_set' or 'system_set' or part of the # self.hidden_params_to_always_print set. self.hidden_param = [] self.hidden_params_to_always_write = set() self.visible_params_to_always_write = set() # List of parameters that should never be written out given the current context. self.params_to_never_write = set() - + # Parameters which have been set by the system (i.e. MG5 itself during # the regular course of the shower interface) self.system_set = set() - + # Add attributes controlling the subruns execution flow. # These attributes should not be part of PY8SubRun daughter. self.add_default_subruns('attributes') - - # Parameters which have been set by the + + # Parameters which have been set by the super(PY8Card, self).__init__(*args, **opts) - def add_param(self, name, value, hidden=False, always_write_to_card=True, + def add_param(self, name, value, hidden=False, always_write_to_card=True, comment=None): - """ add a parameter to the card. value is the default value and + """ add a parameter to the card. value is the default value and defines the type (int/float/bool/str) of the input. The option 'hidden' decides whether the parameter should be visible to the user. The option 'always_write_to_card' decides whether it should @@ -2017,7 +2017,7 @@ def add_param(self, name, value, hidden=False, always_write_to_card=True, self.hidden_params_to_always_write.add(name) else: if always_write_to_card: - self.visible_params_to_always_write.add(name) + self.visible_params_to_always_write.add(name) if not comment is None: if not isinstance(comment, str): raise MadGraph5Error("Option 'comment' must be a string, not"+\ @@ -2036,7 +2036,7 @@ def add_subrun(self, py8_subrun): self.subruns[py8_subrun['Main:subrun']] = py8_subrun if not 'LHEFInputs:nSubruns' in self.user_set: self['LHEFInputs:nSubruns'] = max(self.subruns.keys()) - + def userSet(self, name, value, **opts): """Set an attribute of this card, following a user_request""" self.__setitem__(name, value, change_userdefine=True, **opts) @@ -2044,10 +2044,10 @@ def userSet(self, name, value, **opts): self.system_set.remove(name.lower()) def vetoParamWriteOut(self, name): - """ Forbid the writeout of a specific parameter of this card when the + """ Forbid the writeout of a specific parameter of this card when the "write" function will be invoked.""" self.params_to_never_write.add(name.lower()) - + def systemSet(self, name, value, **opts): """Set an attribute of this card, independently of a specific user request and only if not already user_set.""" @@ -2058,7 +2058,7 @@ def systemSet(self, name, value, **opts): if force or name.lower() not in self.user_set: self.__setitem__(name, value, change_userdefine=False, **opts) self.system_set.add(name.lower()) - + def MadGraphSet(self, name, value, **opts): """ Sets a card attribute, but only if it is absent or not already user_set.""" @@ -2068,18 +2068,18 @@ def MadGraphSet(self, name, value, **opts): force = False if name.lower() not in self or (force or name.lower() not in self.user_set): self.__setitem__(name, value, change_userdefine=False, **opts) - self.system_set.add(name.lower()) - + self.system_set.add(name.lower()) + def defaultSet(self, name, value, **opts): self.__setitem__(name, value, change_userdefine=False, **opts) - + @staticmethod def pythia8_formatting(value, formatv=None): """format the variable into pythia8 card convention. The type is detected by default""" if not formatv: if isinstance(value,UnknownType): - formatv = 'unknown' + formatv = 'unknown' elif isinstance(value, bool): formatv = 'bool' elif isinstance(value, int): @@ -2095,7 +2095,7 @@ def pythia8_formatting(value, formatv=None): formatv = 'str' else: assert formatv - + if formatv == 'unknown': # No formatting then return str(value) @@ -2116,7 +2116,7 @@ def pythia8_formatting(value, formatv=None): elif formatv == 'float': return '%.10e' % float(value) elif formatv == 'shortfloat': - return '%.3f' % float(value) + return '%.3f' % float(value) elif formatv == 'str': return "%s" % value elif formatv == 'list': @@ -2124,9 +2124,9 @@ def pythia8_formatting(value, formatv=None): return ','.join([PY8Card.pythia8_formatting(arg, 'shortfloat') for arg in value]) else: return ','.join([PY8Card.pythia8_formatting(arg) for arg in value]) - - def write(self, output_file, template, read_subrun=False, + + def write(self, output_file, template, read_subrun=False, print_only_visible=False, direct_pythia_input=False, add_missing=True): """ Write the card to output_file using a specific template. > 'print_only_visible' specifies whether or not the hidden parameters @@ -2143,28 +2143,28 @@ def write(self, output_file, template, read_subrun=False, or p.lower() in self.user_set] # Filter against list of parameters vetoed for write-out visible_param = [p for p in visible_param if p.lower() not in self.params_to_never_write] - + # Now the hidden param which must be written out if print_only_visible: hidden_output_param = [] else: hidden_output_param = [p for p in self if p.lower() in self.hidden_param and not p.lower() in self.user_set and - (p.lower() in self.hidden_params_to_always_write or + (p.lower() in self.hidden_params_to_always_write or p.lower() in self.system_set)] # Filter against list of parameters vetoed for write-out hidden_output_param = [p for p in hidden_output_param if p not in self.params_to_never_write] - + if print_only_visible: subruns = [] else: if not read_subrun: subruns = sorted(self.subruns.keys()) - + # Store the subruns to write in a dictionary, with its ID in key # and the corresponding stringstream in value subruns_to_write = {} - + # Sort these parameters nicely so as to put together parameters # belonging to the same group (i.e. prefix before the ':' in their name). def group_params(params): @@ -2191,7 +2191,7 @@ def group_params(params): # First dump in a temporary_output (might need to have a second pass # at the very end to update 'LHEFInputs:nSubruns') output = StringIO.StringIO() - + # Setup template from which to read if isinstance(template, str): if os.path.isfile(template): @@ -2199,7 +2199,7 @@ def group_params(params): elif '\n' in template: tmpl = StringIO.StringIO(template) else: - raise Exception("File input '%s' not found." % file_input) + raise Exception("File input '%s' not found." % file_input) elif template is None: # Then use a dummy empty StringIO, hence skipping the reading tmpl = StringIO.StringIO() @@ -2257,8 +2257,8 @@ def group_params(params): # Remove all of its variables (so that nothing is overwritten) DummySubrun.clear() DummySubrun.write(subruns_to_write[int(value)], - tmpl, read_subrun=True, - print_only_visible=print_only_visible, + tmpl, read_subrun=True, + print_only_visible=print_only_visible, direct_pythia_input=direct_pythia_input) logger.info('Adding new unknown subrun with ID %d.'% @@ -2267,7 +2267,7 @@ def group_params(params): last_pos = tmpl.tell() line = tmpl.readline() continue - + # Change parameters which must be output if param in visible_param: new_value = PY8Card.pythia8_formatting(self[param]) @@ -2286,10 +2286,10 @@ def group_params(params): last_pos = tmpl.tell() line = tmpl.readline() continue - - # Substitute the value. + + # Substitute the value. # If it is directly the pytia input, then don't write the param if it - # is not in the list of visible_params_to_always_write and was + # is not in the list of visible_params_to_always_write and was # not user_set or system_set if ((not direct_pythia_input) or (param.lower() in self.visible_params_to_always_write) or @@ -2304,16 +2304,16 @@ def group_params(params): output.write(template%(param_entry, value_entry.replace(value,new_value))) - + # Proceed to next line last_pos = tmpl.tell() line = tmpl.readline() - + # If add_missing is False, make sure to empty the list of remaining parameters if not add_missing: visible_param = [] hidden_output_param = [] - + # Now output the missing parameters. Warn about visible ones. if len(visible_param)>0 and not template is None: output.write( @@ -2343,12 +2343,12 @@ def group_params(params): """%(' for subrun %d'%self['Main:subrun'] if 'Main:subrun' in self else '')) for param in hidden_output_param: if param.lower() in self.comments: - comment = '\n'.join('! %s'%c for c in + comment = '\n'.join('! %s'%c for c in self.comments[param.lower()].split('\n')) output.write(comment+'\n') output.write('%s=%s\n'%(param,PY8Card.pythia8_formatting(self[param]))) - - # Don't close the file if we were reading a subrun, but simply write + + # Don't close the file if we were reading a subrun, but simply write # output and return now if read_subrun: output_file.write(output.getvalue()) @@ -2382,12 +2382,12 @@ def group_params(params): out.close() else: output_file.write(output.getvalue()) - + def read(self, file_input, read_subrun=False, setter='default'): - """Read the input file, this can be a path to a file, + """Read the input file, this can be a path to a file, a file object, a str with the content of the file. - The setter option choses the authority that sets potential - modified/new parameters. It can be either: + The setter option choses the authority that sets potential + modified/new parameters. It can be either: 'default' or 'user' or 'system'""" if isinstance(file_input, str): if "\n" in file_input: @@ -2423,8 +2423,8 @@ def read(self, file_input, read_subrun=False, setter='default'): raise MadGraph5Error("Could not read line '%s' of Pythia8 card."%\ line) if '!' in value: - value,_ = value.split('!',1) - + value,_ = value.split('!',1) + # Read a subrun if detected: if param=='Main:subrun': if read_subrun: @@ -2451,7 +2451,7 @@ def read(self, file_input, read_subrun=False, setter='default'): last_pos = finput.tell() line = finput.readline() continue - + # Read parameter. The case of a parameter not defined in the card is # handled directly in ConfigFile. @@ -2478,7 +2478,7 @@ def add_default_subruns(self, type): def __init__(self, *args, **opts): """ Initialize a subrun """ - + # Force user to set it manually. subrunID = -1 if 'subrun_id' in opts: @@ -2489,7 +2489,7 @@ def __init__(self, *args, **opts): def default_setup(self): """Sets up the list of available PY8SubRun parameters.""" - + # Add all default PY8Card parameters super(PY8SubRun, self).default_setup() # Make sure they are all hidden @@ -2501,33 +2501,33 @@ def default_setup(self): self.add_param("Main:subrun", -1) self.add_param("Beams:LHEF", "events.lhe.gz") - + class RunBlock(object): """ Class for a series of parameter in the run_card that can be either visible or hidden. - name: allow to set in the default run_card $name to set where that + name: allow to set in the default run_card $name to set where that block need to be inserted template_on: information to include is block is active template_off: information to include is block is not active on_fields/off_fields: paramater associated to the block - can be specify but are otherwise automatically but + can be specify but are otherwise automatically but otherwise determined from the template. - + function: status(self,run_card) -> return which template need to be used check_validity(self, runcard) -> sanity check - create_default_for_process(self, run_card, proc_characteristic, - history, proc_def) + create_default_for_process(self, run_card, proc_characteristic, + history, proc_def) post_set_XXXX(card, value, change_userdefine, raiseerror) -> fct called when XXXXX is set post_set(card, value, change_userdefine, raiseerror, **opt) -> fct called when a parameter is changed - -> no access to parameter name + -> no access to parameter name -> not called if post_set_XXXX is defined """ - - + + def __init__(self, name, template_on, template_off, on_fields=False, off_fields=False): self.name = name @@ -2550,7 +2550,7 @@ def fields(self): def find_fields_from_template(template): """ return the list of fields from a template. checking line like %(mass_ion2)s = mass_ion2 # mass of the heavy ion (second beam) """ - + return re.findall(r"^\s*%\((.*)\)s\s*=\s*\1", template, re.M) def get_template(self, card): @@ -2565,7 +2565,7 @@ def get_unused_template(self, card): if self.status(card): return self.template_off else: - return self.template_on + return self.template_on def status(self, card): """return False if template_off to be used, True if template_on to be used""" @@ -2594,20 +2594,20 @@ def manage_parameters(self, card, written, to_write): written.add(name) if name in to_write: to_write.remove(name) - + def check_validity(self, runcard): """run self consistency check here --avoid to use runcard[''] = xxx here since it can trigger post_set function""" return def create_default_for_process(self, run_card, proc_characteristic, history, proc_def): - return + return # @staticmethod # def post_set(card, value, change_userdefine, raiseerror, **opt): # """default action to run when a parameter of the block is defined. # Here we do not know which parameter is modified. if this is needed. # then one need to define post_set_XXXXX(card, value, change_userdefine, raiseerror) -# and then only that function is used +# and then only that function is used # """ # # if 'pdlabel' in card.user_set: @@ -2621,7 +2621,7 @@ class RunCard(ConfigFile): blocks = [] parameter_in_block = {} - allowed_lep_densities = {} + allowed_lep_densities = {} default_include_file = 'run_card.inc' default_autodef_file = 'run.inc' donewarning = [] @@ -2637,7 +2637,7 @@ def plugin_input(self, finput): curr_dir = os.path.dirname(os.path.dirname(finput.name)) elif isinstance(finput, str): curr_dir = os.path.dirname(os.path.dirname(finput)) - + if curr_dir: if os.path.exists(pjoin(curr_dir, 'bin', 'internal', 'plugin_run_card')): # expected format {} passing everything as optional argument @@ -2646,7 +2646,7 @@ def plugin_input(self, finput): continue opts = dict(eval(line)) self.add_param(**opts) - + @classmethod def fill_post_set_from_blocks(cls): """set the post_set function for any parameter defined in a run_block""" @@ -2659,8 +2659,8 @@ def fill_post_set_from_blocks(cls): elif hasattr(block, 'post_set'): setattr(cls, 'post_set_%s' % parameter, block.post_set) cls.parameter_in_block[parameter] = block - - + + def __new__(cls, finput=None, **opt): cls.fill_post_set_from_blocks() @@ -2718,9 +2718,9 @@ def __new__(cls, finput=None, **opt): return super(RunCard, cls).__new__(cls, finput, **opt) def __init__(self, *args, **opts): - + # The following parameter are updated in the defaultsetup stage. - + #parameter for which no warning should be raised if not define self.hidden_param = [] # in which include file the parameer should be written @@ -2739,11 +2739,11 @@ def __init__(self, *args, **opts): self.cuts_parameter = {} # parameter added where legacy requires an older value. self.system_default = {} - + self.display_block = [] # set some block to be displayed self.fct_mod = {} # {param: (fct_pointer, *argument, **opts)} - self.cut_class = {} + self.cut_class = {} self.warned=False @@ -2776,11 +2776,11 @@ def get_lepton_densities(cls): else: cls.allowed_lep_densities[identity].append(name) - def add_param(self, name, value, fortran_name=None, include=True, + def add_param(self, name, value, fortran_name=None, include=True, hidden=False, legacy=False, cut=False, system=False, sys_default=None, autodef=False, fct_mod=None, **opts): - """ add a parameter to the card. value is the default value and + """ add a parameter to the card. value is the default value and defines the type (int/float/bool/str) of the input. fortran_name: defines what is the associate name in the f77 code include: defines if we have to put the value in the include file @@ -2795,7 +2795,7 @@ def add_param(self, name, value, fortran_name=None, include=True, fct_mod: defines a function to run if the parameter is modify in the include file options of **opts: - allowed: list of valid options. '*' means anything else should be allowed. - empty list means anything possible as well. + empty list means anything possible as well. - comment: add comment for writing/help - typelist: type of the list if default is empty """ @@ -2823,9 +2823,9 @@ def add_param(self, name, value, fortran_name=None, include=True, self.fct_mod[name] = fct_mod def read(self, finput, consistency=True, unknown_warning=True, **opt): - """Read the input file, this can be a path to a file, + """Read the input file, this can be a path to a file, a file object, a str with the content of the file.""" - + if isinstance(finput, str): if "\n" in finput: finput = finput.split('\n') @@ -2836,7 +2836,7 @@ def read(self, finput, consistency=True, unknown_warning=True, **opt): finput = open(finput) else: raise Exception("No such file %s" % finput) - + for line in finput: line = line.split('#')[0] line = line.split('!')[0] @@ -2864,8 +2864,8 @@ def add_unknown_entry(self, name, value, unknow_warning): This is based on the guess_entry_fromname for the various syntax providing input. This then call add_param accordingly. - This function does not returns anything. - """ + This function does not returns anything. + """ if name == "dsqrt_q2fact1" and not self.LO: raise InvalidRunCard("Looks like you passed a LO run_card for a NLO run. Please correct") @@ -2903,7 +2903,7 @@ def add_unknown_entry(self, name, value, unknow_warning): " The type was assigned to %s. \n"+\ " The definition of that variable will %sbe automatically added to fortran file %s\n"+\ " The value of that variable will %sbe passed to the fortran code via fortran file %s",\ - name, value, vartype if vartype != "list" else "list of %s" % opts.get('typelist').__name__, + name, value, vartype if vartype != "list" else "list of %s" % opts.get('typelist').__name__, "" if opts.get('autodef', False) else "not", "" if opts.get('autodef', False) in [True,False] else opts.get('autodef'), "" if opts.get('include', True) else "not", "" if opts.get('include', True) in [True,False] else opts.get('include')) RunCard.donewarning.append(name) @@ -2923,19 +2923,19 @@ def valid_line(self, line, tmp): return False elif line.strip().startswith('%'): parameter = line[line.find('(')+1:line.find(')')] - + try: cond = self.cuts_parameter[parameter] except KeyError: return True - - + + if template_options.get(cond, default) or cond is True: return True else: - return False + return False else: - return True + return True def reset_simd(self, old_value, new_value, name, *args, **opts): @@ -2946,28 +2946,28 @@ def make_clean(self,old_value, new_value, name, dir): raise Exception('pass make clean for ', dir) def make_Ptouch(self,old_value, new_value, name, reset): - raise Exception('pass Ptouch for ', reset) - + raise Exception('pass Ptouch for ', reset) + def write(self, output_file, template=None, python_template=False, write_hidden=False, template_options=None, **opt): - """Write the run_card in output_file according to template + """Write the run_card in output_file according to template (a path to a valid run_card)""" - to_write = set(self.user_set) + to_write = set(self.user_set) written = set() if not template: raise Exception if not template_options: template_options = collections.defaultdict(str) - + if python_template: text = open(template,'r').read() - text = text.split('\n') + text = text.split('\n') # remove if templating - text = [l if not l.startswith('#IF') else l[l.find(')# ')+2:] + text = [l if not l.startswith('#IF') else l[l.find(')# ')+2:] for l in text if self.valid_line(l, template_options)] text ='\n'.join(text) - + if python_template and not to_write: import string if self.blocks: @@ -2981,14 +2981,14 @@ def write(self, output_file, template=None, python_template=False, if not self.list_parameter: text = text % self else: - data = dict((key.lower(),value) for key, value in self.items()) + data = dict((key.lower(),value) for key, value in self.items()) for name in self.list_parameter: if self.list_parameter[name] != str: data[name] = ', '.join(str(v) for v in data[name]) else: data[name] = "['%s']" % "', '".join(str(v) for v in data[name]) text = text % data - else: + else: text = "" for line in open(template,'r'): nline = line.split('#')[0] @@ -3005,11 +3005,11 @@ def write(self, output_file, template=None, python_template=False, this_group = this_group[0] text += this_group.get_template(self) % self this_group.manage_parameters(self, written, to_write) - + elif len(nline) != 2: text += line elif nline[1].strip() in self: - + name = nline[1].strip().lower() value = self[name] if name in self.list_parameter: @@ -3026,15 +3026,15 @@ def write(self, output_file, template=None, python_template=False, else: endline = '' text += ' %s\t= %s %s%s' % (value, name, comment, endline) - written.add(name) + written.add(name) if name in to_write: to_write.remove(name) else: logger.info('Adding missing parameter %s to current %s (with default value)', (name, self.filename)) - written.add(name) - text += line + written.add(name) + text += line for b in self.blocks: if b.status(self): @@ -3057,7 +3057,7 @@ def write(self, output_file, template=None, python_template=False, else: #partial writting -> add only what is needed to_add = [] - for line in b.get_template(self).split('\n'): + for line in b.get_template(self).split('\n'): nline = line.split('#')[0] nline = nline.split('!')[0] nline = nline.split('=') @@ -3072,8 +3072,8 @@ def write(self, output_file, template=None, python_template=False, continue #already include before else: to_add.append(line % {nline[1].strip():value, name:value}) - written.add(name) - + written.add(name) + if name in to_write: to_write.remove(name) else: @@ -3095,13 +3095,13 @@ def write(self, output_file, template=None, python_template=False, text += '\n'.join(to_add) if to_write or write_hidden: - text+="""#********************************************************************* + text+="""#********************************************************************* # Additional hidden parameters #********************************************************************* -""" +""" if write_hidden: # - # do not write hidden parameter not hidden for this template + # do not write hidden parameter not hidden for this template # if python_template: written = written.union(set(re.findall('\%\((\w*)\)s', open(template,'r').read(), re.M))) @@ -3129,7 +3129,7 @@ def get_last_value_include(self, output_dir): if inc file does not exist we will return the current value (i.e. set has no change) """ - #remember that + #remember that # default_include_file is a class variable # self.includepath is on the form include_path : [list of param ] out = {} @@ -3165,7 +3165,7 @@ def get_value_from_include(self, path, list_of_params, output_dir): with open(pjoin(output_dir,path), 'r') as fsock: text = fsock.read() - + for name in list_of_params: misc.sprint(name, name in self.fortran_name) misc.sprint(self.fortran_name[name] if name in self.fortran_name[name] else name) @@ -3191,11 +3191,11 @@ def get_value_from_include(self, path, list_of_params, output_dir): misc.sprint(self.fortran_name) misc.sprint(text) raise Exception - return out + return out def get_default(self, name, default=None, log_level=None): - """return self[name] if exist otherwise default. log control if we + """return self[name] if exist otherwise default. log control if we put a warning or not if we use the default value""" lower_name = name.lower() @@ -3216,13 +3216,13 @@ def get_default(self, name, default=None, log_level=None): log_level = 20 if not default: default = dict.__getitem__(self, name.lower()) - + logger.log(log_level, '%s missed argument %s. Takes default: %s' % (self.filename, name, default)) self[name] = default return default else: - return self[name] + return self[name] def mod_inc_pdlabel(self, value): """flag pdlabel has 'dressed' if one of the special lepton PDF with beamstralung. @@ -3237,16 +3237,16 @@ def edit_dummy_fct_from_file(self, filelist, outdir): filelist is a list of input files (given by the user) containing a series of function to be placed in replacement of standard (typically dummy) functions of the code. - This use LO/NLO class attribute that defines which function name need to - be placed in which file. + This use LO/NLO class attribute that defines which function name need to + be placed in which file. First time this is used, a backup of the original file is done in order to - recover if the user remove some of those files. + recover if the user remove some of those files. The function present in the file are determined automatically via regular expression. and only that function is replaced in the associated file. - function in the filelist starting with user_ will also be include within the + function in the filelist starting with user_ will also be include within the dummy_fct.f file """ @@ -3269,7 +3269,7 @@ def edit_dummy_fct_from_file(self, filelist, outdir): fsock = file_writers.FortranWriter(tmp,'w') function_text = fsock.remove_routine(text, fct) fsock.close() - test = open(tmp,'r').read() + test = open(tmp,'r').read() if fct not in self.dummy_fct_file: if fct.startswith('user_'): self.dummy_fct_file[fct] = self.dummy_fct_file['user_'] @@ -3315,22 +3315,22 @@ def guess_entry_fromname(self, name, value): - vartype: type of the variable - name: name of the variable (stripped from metadata) - options: additional options for the add_param - rules: - - if name starts with str_, int_, float_, bool_, list_, dict_ then + rules: + - if name starts with str_, int_, float_, bool_, list_, dict_ then - vartype is set accordingly - name is strip accordingly - otherwise guessed from value (which is string) - if name contains min/max - vartype is set to float - options has an added {'cut':True} - - suffixes like + - suffixes like - will be removed from named - will be added in options (for add_param) as {'cut':True} see add_param documentation for the list of supported options - if include is on False set autodef to False (i.e. enforce it False for future change) """ - # local function + # local function def update_typelist(value, name, opts): """convert a string to a list and update opts to keep track of the type """ value = value.strip() @@ -3358,7 +3358,7 @@ def update_typelist(value, name, opts): opts[key] = val name = name.replace("<%s=%s>" %(key,val), '') - # get vartype + # get vartype # first check that name does not force it supported_type = ["str", "float", "int", "bool", "list", "dict"] if "_" in name and name.split("_")[0].lower() in supported_type: @@ -3406,13 +3406,13 @@ def f77_formatting(value, formatv=None): value = str(value).lower() else: assert formatv - + if formatv == 'bool': if str(value) in ['1','T','.true.','True']: return '.true.' else: return '.false.' - + elif formatv == 'int': try: return str(int(value)) @@ -3422,12 +3422,12 @@ def f77_formatting(value, formatv=None): return str(int(fl)) else: raise - + elif formatv == 'float': if isinstance(value, str): value = value.replace('d','e') return ('%.10e' % float(value)).replace('e','d') - + elif formatv == 'str': # Check if it is a list if value.strip().startswith('[') and value.strip().endswith(']'): @@ -3437,20 +3437,20 @@ def f77_formatting(value, formatv=None): enumerate(elements)] else: return "'%s'" % value - - + + def check_validity(self, log_level=30): """check that parameter missing in the card are set to the expected value""" for name, value in self.system_default.items(): self.set(name, value, changeifuserset=False) - + for name in self.includepath[False]: to_bypass = self.hidden_param + list(self.legacy_parameter.keys()) if name not in to_bypass: - self.get_default(name, log_level=log_level) + self.get_default(name, log_level=log_level) for name in self.legacy_parameter: if self[name] != self.legacy_parameter[name]: @@ -3458,28 +3458,28 @@ def check_validity(self, log_level=30): for block in self.blocks: block.check_validity(self) - + def update_system_parameter_for_include(self): - """update hidden system only parameter for the correct writtin in the + """update hidden system only parameter for the correct writtin in the include""" return - + def write_include_file(self, output_dir, output_file=None): """Write the various include file in output_dir. The entry True of self.includepath will be written in run_card.inc The entry False will not be written anywhere output_file allows testing by providing stream. - This also call the function to add variable definition for the - variable with autodef=True (handle by write_autodef function) + This also call the function to add variable definition for the + variable with autodef=True (handle by write_autodef function) """ - + # ensure that all parameter are coherent and fix those if needed self.check_validity() - + #ensusre that system only parameter are correctly set self.update_system_parameter_for_include() @@ -3490,10 +3490,10 @@ def write_include_file(self, output_dir, output_file=None): self.write_autodef(output_dir, output_file=None) # check/fix status of customised functions self.edit_dummy_fct_from_file(self["custom_fcts"], os.path.dirname(output_dir)) - + for incname in self.includepath: self.write_one_include_file(output_dir, incname, output_file) - + for name,value in value_in_old_include.items(): if value != self[name]: self.fct_mod[name][0](value, self[name], name, *self.fct_mod[name][1],**self.fct_mod[name][2]) @@ -3515,13 +3515,13 @@ def write_one_include_file(self, output_dir, incname, output_file=None): fsock = file_writers.FortranWriter(pjoin(output_dir,pathinc+'.tmp')) - for key in self.includepath[incname]: + for key in self.includepath[incname]: #define the fortran name if key in self.fortran_name: fortran_name = self.fortran_name[key] else: fortran_name = key - + if incname in self.include_as_parameter: fsock.writelines('INTEGER %s\n' % fortran_name) #get the value with warning if the user didn't set it @@ -3534,7 +3534,7 @@ def write_one_include_file(self, output_dir, incname, output_file=None): # in case of a list, add the length of the list as 0th # element in fortran. Only in case of integer or float # list (not for bool nor string) - targettype = self.list_parameter[key] + targettype = self.list_parameter[key] if targettype is bool: pass elif targettype is int: @@ -3550,7 +3550,7 @@ def write_one_include_file(self, output_dir, incname, output_file=None): elif isinstance(value, dict): for fortran_name, onevalue in value.items(): line = '%s = %s \n' % (fortran_name, self.f77_formatting(onevalue)) - fsock.writelines(line) + fsock.writelines(line) elif isinstance(incname,str) and 'compile' in incname: if incname in self.include_as_parameter: line = 'PARAMETER (%s=%s)' %( fortran_name, value) @@ -3585,7 +3585,7 @@ def write_autodef(self, output_dir, output_file=None): filetocheck = dict(self.definition_path) if True not in self.definition_path: filetocheck[True] = [] - + for incname in filetocheck: if incname is True: @@ -3598,7 +3598,7 @@ def write_autodef(self, output_dir, output_file=None): if output_file: fsock = output_file input = fsock.getvalue() - + else: input = open(pjoin(output_dir,pathinc),'r').read() # do not define fsock here since we might not need to overwrite it @@ -3608,7 +3608,7 @@ def write_autodef(self, output_dir, output_file=None): previous = re.findall(re_pat, input, re.M) # now check which one needed to be added (and remove those identicaly defined) to_add = [] - for key in filetocheck[incname]: + for key in filetocheck[incname]: curr_type = self[key].__class__.__name__ length = "" if curr_type in [list, "list"]: @@ -3640,10 +3640,10 @@ def write_autodef(self, output_dir, output_file=None): fsock.truncate(0) fsock.seek(0) - # remove outdated lines + # remove outdated lines lines = input.split('\n') if previous: - out = [line for line in lines if not re.search(re_pat, line, re.M) or + out = [line for line in lines if not re.search(re_pat, line, re.M) or re.search(re_pat, line, re.M).groups() not in previous] else: out = lines @@ -3662,7 +3662,7 @@ def write_autodef(self, output_dir, output_file=None): stop = out.index('C STOP USER COMMON BLOCK') out = out[:start]+ out[stop+1:] #add new common-block - if self.definition_path[incname]: + if self.definition_path[incname]: out.append("C START USER COMMON BLOCK") if isinstance(pathinc , str): filename = os.path.basename(pathinc).split('.',1)[0] @@ -3675,10 +3675,10 @@ def write_autodef(self, output_dir, output_file=None): filename = filename.upper() out.append(" COMMON/USER_CUSTOM_%s/%s" %(filename,','.join( self.definition_path[incname]))) out.append('C STOP USER COMMON BLOCK') - + if not output_file: fsock.writelines(out) - fsock.close() + fsock.close() else: # for iotest out = ["%s\n" %l for l in out] @@ -3702,7 +3702,7 @@ def get_idbmup(lpp): def get_banner_init_information(self): """return a dictionary with the information needed to write the first line of the block of the lhe file.""" - + output = {} output["idbmup1"] = self.get_idbmup(self['lpp1']) output["idbmup2"] = self.get_idbmup(self['lpp2']) @@ -3713,7 +3713,7 @@ def get_banner_init_information(self): output["pdfsup1"] = self.get_pdf_id(self["pdlabel"]) output["pdfsup2"] = self.get_pdf_id(self["pdlabel"]) return output - + def get_pdf_id(self, pdf): if pdf == "lhapdf": lhaid = self["lhaid"] @@ -3721,19 +3721,19 @@ def get_pdf_id(self, pdf): return lhaid[0] else: return lhaid - else: + else: try: return {'none': 0, 'iww': 0, 'eva':0, 'edff':0, 'chff':0, 'cteq6_m':10000,'cteq6_l':10041,'cteq6l1':10042, 'nn23lo':246800,'nn23lo1':247000,'nn23nlo':244800 - }[pdf] + }[pdf] except: - return 0 - + return 0 + def get_lhapdf_id(self): return self.get_pdf_id(self['pdlabel']) - def remove_all_cut(self): + def remove_all_cut(self): """remove all the cut""" for name in self.cuts_parameter: @@ -3749,7 +3749,7 @@ def remove_all_cut(self): elif 'eta' in name: self[name] = -1 else: - self[name] = 0 + self[name] = 0 ################################################################################################ ### Define various template subpart for the LO Run_card @@ -3767,11 +3767,11 @@ def remove_all_cut(self): %(nb_proton1)s = nb_proton1 # number of proton for the first beam %(nb_neutron1)s = nb_neutron1 # number of neutron for the first beam %(mass_ion1)s = mass_ion1 # mass of the heavy ion (first beam) -# Note that seting differently the two beams only work if you use +# Note that seting differently the two beams only work if you use # group_subprocess=False when generating your matrix-element %(nb_proton2)s = nb_proton2 # number of proton for the second beam %(nb_neutron2)s = nb_neutron2 # number of neutron for the second beam - %(mass_ion2)s = mass_ion2 # mass of the heavy ion (second beam) + %(mass_ion2)s = mass_ion2 # mass of the heavy ion (second beam) """ template_off = "# To see heavy ion options: type \"update ion_pdf\"" @@ -3834,11 +3834,11 @@ def remove_all_cut(self): # Frame for polarization ------------------------------------------------------------------------------------ template_on = \ """#********************************************************************* -# Frame where to evaluate the matrix-element (not the cut!) for polarization +# Frame where to evaluate the matrix-element (not the cut!) for polarization #********************************************************************* %(me_frame)s = me_frame ! list of particles to sum-up to define the rest-frame ! in which to evaluate the matrix-element - ! [1,2] means the partonic center of mass + ! [1,2] means the partonic center of mass """ template_off = "" frame_block = RunBlock('frame', template_on=template_on, template_off=template_off) @@ -3891,7 +3891,7 @@ def remove_all_cut(self): # CONTROL The extra running scale (not QCD) * # Such running is NOT include in systematics computation * #*********************************************************************** - %(fixed_extra_scale)s = fixed_extra_scale ! False means dynamical scale + %(fixed_extra_scale)s = fixed_extra_scale ! False means dynamical scale %(mue_ref_fixed)s = mue_ref_fixed ! scale to use if fixed scale mode %(mue_over_ref)s = mue_over_ref ! ratio to mur if dynamical scale """ @@ -3908,10 +3908,10 @@ def remove_all_cut(self): %(tmin_for_channel)s = tmin_for_channel ! limit the non-singular reach of --some-- channel of integration related to T-channel diagram (value between -1 and 0), -1 is no impact %(survey_splitting)s = survey_splitting ! for loop-induced control how many core are used at survey for the computation of a single iteration. %(survey_nchannel_per_job)s = survey_nchannel_per_job ! control how many Channel are integrated inside a single job on cluster/multicore - %(refine_evt_by_job)s = refine_evt_by_job ! control the maximal number of events for the first iteration of the refine (larger means less jobs) + %(refine_evt_by_job)s = refine_evt_by_job ! control the maximal number of events for the first iteration of the refine (larger means less jobs) +#********************************************************************* +# Compilation flag. #********************************************************************* -# Compilation flag. -#********************************************************************* %(global_flag)s = global_flag ! fortran optimization flag use for the all code. %(aloha_flag)s = aloha_flag ! fortran optimization flag for aloha function. Suggestions: '-ffast-math' %(matrix_flag)s = matrix_flag ! fortran optimization flag for matrix.f function. Suggestions: '-O3' @@ -3948,7 +3948,7 @@ def check_validity(self, card): if card['pdlabel'] != card['pdlabel1']: dict.__setitem__(card, 'pdlabel', card['pdlabel1']) elif card['pdlabel1'] in sum(card.allowed_lep_densities.values(),[]): - raise InvalidRunCard("Assymetric beam pdf not supported for e e collision with ISR/bemstralung option") + raise InvalidRunCard("Assymetric beam pdf not supported for e e collision with ISR/bemstralung option") elif card['pdlabel2'] in sum(card.allowed_lep_densities.values(),[]): raise InvalidRunCard("Assymetric beam pdf not supported for e e collision with ISR/bemstralung option") elif card['pdlabel1'] == 'none': @@ -3962,7 +3962,7 @@ def check_validity(self, card): dict.__setitem__(card, 'pdlabel2', card['pdlabel']) if abs(card['lpp1']) == 1 == abs(card['lpp2']) and card['pdlabel1'] != card['pdlabel2']: - raise InvalidRunCard("Assymetric beam pdf not supported for proton-proton collision") + raise InvalidRunCard("Assymetric beam pdf not supported for proton-proton collision") def status(self, card): """return False if template_off to be used, True if template_on to be used""" @@ -4028,7 +4028,7 @@ def post_set(card, value, change_userdefine, raiseerror, name='unknown', **opt): if name == 'fixed_fac_scale2' and 'fixed_fac_scale1' not in card.user_set: dict.__setitem__(card, 'fixed_fac_scale1', card['fixed_fac_scale']) if name == 'fixed_fac_scale1' and 'fixed_fac_scale2' not in card.user_set: - dict.__setitem__(card, 'fixed_fac_scale2', card['fixed_fac_scale']) + dict.__setitem__(card, 'fixed_fac_scale2', card['fixed_fac_scale']) def status(self, card): @@ -4061,32 +4061,32 @@ def status(self, card): class RunCardLO(RunCard): """an object to handle in a nice way the run_card information""" - + blocks = [heavy_ion_block, beam_pol_block, syscalc_block, ecut_block, frame_block, eva_scale_block, mlm_block, ckkw_block, psoptim_block, pdlabel_block, fixedfacscale, running_block] dummy_fct_file = {"dummy_cuts": pjoin("SubProcesses","dummy_fct.f"), "get_dummy_x1": pjoin("SubProcesses","dummy_fct.f"), - "get_dummy_x1_x2": pjoin("SubProcesses","dummy_fct.f"), + "get_dummy_x1_x2": pjoin("SubProcesses","dummy_fct.f"), "dummy_boostframe": pjoin("SubProcesses","dummy_fct.f"), "user_dynamical_scale": pjoin("SubProcesses","dummy_fct.f"), "bias_wgt_custom": pjoin("SubProcesses","dummy_fct.f"), "user_": pjoin("SubProcesses","dummy_fct.f") # all function starting by user will be added to that file } - + include_as_parameter = ['vector.inc'] if MG5DIR: default_run_card = pjoin(MG5DIR, "internal", "default_run_card_lo.dat") - + def default_setup(self): """default value for the run_card.dat""" - + self.add_param("run_tag", "tag_1", include=False) self.add_param("gridpack", False) self.add_param("time_of_flight", -1.0, include=False) - self.add_param("nevents", 10000) + self.add_param("nevents", 10000) self.add_param("iseed", 0) self.add_param("python_seed", -2, include=False, hidden=True, comment="controlling python seed [handling in particular the final unweighting].\n -1 means use default from random module.\n -2 means set to same value as iseed") self.add_param("lpp1", 1, fortran_name="lpp(1)", allowed=[-1,1,0,2,3,9,-2,-3,4,-4], @@ -4106,7 +4106,7 @@ def default_setup(self): self.add_param('nb_neutron1', 0, hidden=True, allowed=[1,0, 126 , '*'],fortran_name="nb_neutron(1)", comment='For heavy ion physics nb of neutron in the ion (for both beam but if group_subprocess was False)') self.add_param('nb_neutron2', 0, hidden=True, allowed=[1,0, 126 , '*'],fortran_name="nb_neutron(2)", - comment='For heavy ion physics nb of neutron in the ion (of beam 2 if group_subprocess was False )') + comment='For heavy ion physics nb of neutron in the ion (of beam 2 if group_subprocess was False )') self.add_param('mass_ion1', -1.0, hidden=True, fortran_name="mass_ion(1)", allowed=[-1,0, 0.938, 207.9766521*0.938, 0.000511, 0.105, '*'], comment='For heavy ion physics mass in GeV of the ion (of beam 1)') @@ -4133,11 +4133,11 @@ def default_setup(self): self.add_param("mue_over_ref", 1.0, hidden=True, comment='ratio mu_other/mu for dynamical scale') self.add_param("ievo_eva",0,hidden=True, allowed=[0,1],fortran_name="ievo_eva", comment='eva: 0 for EW pdf muf evolution by q^2; 1 for evo by pT^2') - + # Bias module options self.add_param("bias_module", 'None', include=False, hidden=True) self.add_param('bias_parameters', {'__type__':1.0}, include='BIAS/bias.inc', hidden=True) - + #matching self.add_param("scalefact", 1.0) self.add_param("ickkw", 0, allowed=[0,1], hidden=True, comment="\'0\' for standard fixed order computation.\n\'1\' for MLM merging activates alphas and pdf re-weighting according to a kt clustering of the QCD radiation.") @@ -4221,7 +4221,7 @@ def default_setup(self): self.add_param("mmaa", 0.0, cut='aa') self.add_param("mmll", 0.0, cut='ll') self.add_param("mmjjmax", -1.0, cut='jj') - self.add_param("mmbbmax", -1.0, cut='bb') + self.add_param("mmbbmax", -1.0, cut='bb') self.add_param("mmaamax", -1.0, cut='aa') self.add_param("mmllmax", -1.0, cut='ll') self.add_param("mmnl", 0.0, cut='LL') @@ -4231,9 +4231,9 @@ def default_setup(self): self.add_param("ptllmax", -1.0, cut='ll') self.add_param("xptj", 0.0, cut='jj') self.add_param("xptb", 0.0, cut='bb') - self.add_param("xpta", 0.0, cut='aa') + self.add_param("xpta", 0.0, cut='aa') self.add_param("xptl", 0.0, cut='ll') - # ordered pt jet + # ordered pt jet self.add_param("ptj1min", 0.0, cut='jj') self.add_param("ptj1max", -1.0, cut='jj') self.add_param("ptj2min", 0.0, cut='jj') @@ -4241,7 +4241,7 @@ def default_setup(self): self.add_param("ptj3min", 0.0, cut='jjj') self.add_param("ptj3max", -1.0, cut='jjj') self.add_param("ptj4min", 0.0, cut='j'*4) - self.add_param("ptj4max", -1.0, cut='j'*4) + self.add_param("ptj4max", -1.0, cut='j'*4) self.add_param("cutuse", 0, cut='jj') # ordered pt lepton self.add_param("ptl1min", 0.0, cut='l'*2) @@ -4249,7 +4249,7 @@ def default_setup(self): self.add_param("ptl2min", 0.0, cut='l'*2) self.add_param("ptl2max", -1.0, cut='l'*2) self.add_param("ptl3min", 0.0, cut='l'*3) - self.add_param("ptl3max", -1.0, cut='l'*3) + self.add_param("ptl3max", -1.0, cut='l'*3) self.add_param("ptl4min", 0.0, cut='l'*4) self.add_param("ptl4max", -1.0, cut='l'*4) # Ht sum of jets @@ -4257,7 +4257,7 @@ def default_setup(self): self.add_param("htjmax", -1.0, cut='j'*2) self.add_param("ihtmin", 0.0, cut='J'*2) self.add_param("ihtmax", -1.0, cut='J'*2) - self.add_param("ht2min", 0.0, cut='J'*3) + self.add_param("ht2min", 0.0, cut='J'*3) self.add_param("ht3min", 0.0, cut='J'*3) self.add_param("ht4min", 0.0, cut='J'*4) self.add_param("ht2max", -1.0, cut='J'*3) @@ -4267,7 +4267,7 @@ def default_setup(self): self.add_param("ptgmin", 0.0, cut='aj') self.add_param("r0gamma", 0.4, hidden=True) self.add_param("xn", 1.0, hidden=True) - self.add_param("epsgamma", 1.0, hidden=True) + self.add_param("epsgamma", 1.0, hidden=True) self.add_param("isoem", True, hidden=True) self.add_param("xetamin", 0.0, cut='jj') self.add_param("deltaeta", 0.0, cut='j'*2) @@ -4280,7 +4280,7 @@ def default_setup(self): self.add_param("use_syst", True) self.add_param('systematics_program', 'systematics', include=False, hidden=True, comment='Choose which program to use for systematics computation: none, systematics, syscalc') self.add_param('systematics_arguments', ['--mur=0.5,1,2', '--muf=0.5,1,2', '--pdf=errorset'], include=False, hidden=True, comment='Choose the argment to pass to the systematics command. like --mur=0.25,1,4. Look at the help of the systematics function for more details.') - + self.add_param("sys_scalefact", "0.5 1 2", include=False, hidden=True) self.add_param("sys_alpsfact", "None", include=False, hidden=True) self.add_param("sys_matchscale", "auto", include=False, hidden=True) @@ -4315,8 +4315,8 @@ def default_setup(self): self.add_param('aloha_flag', '', include=False, hidden=True, comment='global fortran compilation flag, suggestion: -ffast-math', fct_mod=(self.make_clean, ('Source/DHELAS'),{})) self.add_param('matrix_flag', '', include=False, hidden=True, comment='fortran compilation flag for the matrix-element files, suggestion -O3', - fct_mod=(self.make_Ptouch, ('matrix'),{})) - self.add_param('vector_size', 1, include='vector.inc', hidden=True, comment='lockstep size for parralelism run', + fct_mod=(self.make_Ptouch, ('matrix'),{})) + self.add_param('vector_size', 1, include='vector.inc', hidden=True, comment='lockstep size for parralelism run', fortran_name='VECSIZE_MEMMAX', fct_mod=(self.reset_simd,(),{})) # parameter allowing to define simple cut via the pdg @@ -4329,24 +4329,24 @@ def default_setup(self): self.add_param('eta_max_pdg',{'__type__':0.}, include=False,cut=True) self.add_param('mxx_min_pdg',{'__type__':0.}, include=False,cut=True) self.add_param('mxx_only_part_antipart', {'default':False}, include=False) - + self.add_param('pdg_cut',[0], system=True) # store which PDG are tracked self.add_param('ptmin4pdg',[0.], system=True) # store pt min self.add_param('ptmax4pdg',[-1.], system=True) self.add_param('Emin4pdg',[0.], system=True) # store pt min - self.add_param('Emax4pdg',[-1.], system=True) + self.add_param('Emax4pdg',[-1.], system=True) self.add_param('etamin4pdg',[0.], system=True) # store pt min - self.add_param('etamax4pdg',[-1.], system=True) + self.add_param('etamax4pdg',[-1.], system=True) self.add_param('mxxmin4pdg',[-1.], system=True) self.add_param('mxxpart_antipart', [False], system=True) - - - + + + def check_validity(self): """ """ - + super(RunCardLO, self).check_validity() - + #Make sure that nhel is only either 0 (i.e. no MC over hel) or #1 (MC over hel with importance sampling). In particular, it can #no longer be > 1. @@ -4357,12 +4357,12 @@ def check_validity(self): "not %s." % self['nhel']) if int(self['maxjetflavor']) > 6: raise InvalidRunCard('maxjetflavor should be lower than 5! (6 is partly supported)') - + if len(self['pdgs_for_merging_cut']) > 1000: raise InvalidRunCard("The number of elements in "+\ "'pdgs_for_merging_cut' should not exceed 1000.") - + # some cut need to be deactivated in presence of isolation if self['ptgmin'] > 0: if self['pta'] > 0: @@ -4370,18 +4370,18 @@ def check_validity(self): self['pta'] = 0.0 if self['draj'] > 0: logger.warning('draj cut discarded since photon isolation is used') - self['draj'] = 0.0 - - # special treatment for gridpack use the gseed instead of the iseed + self['draj'] = 0.0 + + # special treatment for gridpack use the gseed instead of the iseed if self['gridrun']: self['iseed'] = self['gseed'] - + #Some parameter need to be fixed when using syscalc #if self['use_syst']: # if self['scalefact'] != 1.0: # logger.warning('Since use_syst=T, changing the value of \'scalefact\' to 1') # self['scalefact'] = 1.0 - + # CKKW Treatment if self['ickkw'] > 0: if self['ickkw'] != 1: @@ -4399,7 +4399,7 @@ def check_validity(self): raise InvalidRunCard('maxjetflavor at 6 is NOT supported for matching!') if self['ickkw'] == 2: # add warning if ckkw selected but the associate parameter are empty - self.get_default('highestmult', log_level=20) + self.get_default('highestmult', log_level=20) self.get_default('issgridfile', 'issudgrid.dat', log_level=20) if self['xqcut'] > 0: if self['ickkw'] == 0: @@ -4412,13 +4412,13 @@ def check_validity(self): if self['drjl'] != 0: if 'drjl' in self.user_set: logger.warning('Since icckw>0, changing the value of \'drjl\' to 0') - self['drjl'] = 0 - if not self['auto_ptj_mjj']: + self['drjl'] = 0 + if not self['auto_ptj_mjj']: if self['mmjj'] > self['xqcut']: logger.warning('mmjj > xqcut (and auto_ptj_mjj = F). MMJJ set to 0') - self['mmjj'] = 0.0 - - # check validity of the pdf set + self['mmjj'] = 0.0 + + # check validity of the pdf set # note that pdlabel is automatically set to lhapdf if pdlabel1 or pdlabel2 is set to lhapdf if self['pdlabel'] == 'lhapdf': #add warning if lhaid not define @@ -4426,7 +4426,7 @@ def check_validity(self): mod = False for i in [1,2]: - lpp = 'lpp%i' %i + lpp = 'lpp%i' %i pdlabelX = 'pdlabel%i' % i if self[lpp] == 0: # nopdf if self[pdlabelX] != 'none': @@ -4459,12 +4459,12 @@ def check_validity(self): raise InvalidRunCard( "Heavy ion mode is only supported for lpp1=1/2") if self['lpp2'] not in [1,2]: if self['nb_proton2'] !=1 or self['nb_neutron2'] !=0: - raise InvalidRunCard( "Heavy ion mode is only supported for lpp2=1/2") + raise InvalidRunCard( "Heavy ion mode is only supported for lpp2=1/2") # check that fixed_fac_scale(1/2) is setting as expected # if lpp=2/3/4 -> default is that beam in fixed scale - # check that fixed_fac_scale is not setup if fixed_fac_scale1/2 are + # check that fixed_fac_scale is not setup if fixed_fac_scale1/2 are # check that both fixed_fac_scale1/2 are defined together # ensure that fixed_fac_scale1 and fixed_fac_scale2 are setup as needed if 'fixed_fac_scale1' in self.user_set: @@ -4475,13 +4475,13 @@ def check_validity(self): elif 'fixed_fac_scale' in self.user_set: logger.warning('fixed_fac_scale and fixed_fac_scale1 are defined but not fixed_fac_scale2. The value of fixed_fac_scale2 will be set to the one of fixed_fac_scale.') self['fixed_fac_scale2'] = self['fixed_fac_scale'] - elif self['lpp2'] !=0: + elif self['lpp2'] !=0: raise Exception('fixed_fac_scale2 not defined while fixed_fac_scale1 is. Please fix your run_card.') elif 'fixed_fac_scale2' in self.user_set: if 'fixed_fac_scale' in self.user_set: logger.warning('fixed_fac_scale and fixed_fac_scale2 are defined but not fixed_fac_scale1. The value of fixed_fac_scale1 will be set to the one of fixed_fac_scale.') self['fixed_fac_scale1'] = self['fixed_fac_scale'] - elif self['lpp1'] !=0: + elif self['lpp1'] !=0: raise Exception('fixed_fac_scale1 not defined while fixed_fac_scale2 is. Please fix your run_card.') else: if 'fixed_fac_scale' in self.user_set: @@ -4500,12 +4500,12 @@ def check_validity(self): logger.warning('fixed_fac_scale1 not defined whithin your run_card. Using default value: %s', self['fixed_fac_scale1']) logger.warning('fixed_fac_scale2 not defined whithin your run_card. Using default value: %s', self['fixed_fac_scale2']) - # check if lpp = + # check if lpp = if self['pdlabel'] not in sum(self.allowed_lep_densities.values(),[]): for i in [1,2]: if abs(self['lpp%s' % i ]) in [3,4] and self['fixed_fac_scale%s' % i] and self['dsqrt_q2fact%s'%i] == 91.188: logger.warning("Vector boson from lepton PDF is using fixed scale value of muf [dsqrt_q2fact%s]. Looks like you kept the default value (Mz). Is this really the cut-off that you want to use?" % i) - + if abs(self['lpp%s' % i ]) == 2 and self['fixed_fac_scale%s' % i] and self['dsqrt_q2fact%s'%i] == 91.188: if self['pdlabel'] in ['edff','chff']: logger.warning("Since 3.5.0 exclusive photon-photon processes in ultraperipheral proton and nuclear collisions from gamma-UPC (arXiv:2207.03012) will ignore the factorisation scale.") @@ -4515,10 +4515,10 @@ def check_validity(self): if six.PY2 and self['hel_recycling']: self['hel_recycling'] = False - logger.warning("""Helicity recycling optimization requires Python3. This optimzation is therefore deactivated automatically. + logger.warning("""Helicity recycling optimization requires Python3. This optimzation is therefore deactivated automatically. In general this optimization speeds up the computation by a factor of two.""") - + # check that ebeam is bigger than the associated mass. for i in [1,2]: if self['lpp%s' % i ] not in [1,2]: @@ -4529,13 +4529,13 @@ def check_validity(self): logger.warning("At-rest proton mode set: energy beam set to 0.938") self.set('ebeam%i' %i, 0.938) else: - raise InvalidRunCard("Energy for beam %i lower than proton mass. Please fix this") - elif self['ebeam%i' % i] < self['mass_ion%i' % i]: + raise InvalidRunCard("Energy for beam %i lower than proton mass. Please fix this") + elif self['ebeam%i' % i] < self['mass_ion%i' % i]: if self['ebeam%i' %i] == 0: logger.warning("At rest ion mode set: Energy beam set to %s" % self['mass_ion%i' % i]) self.set('ebeam%i' %i, self['mass_ion%i' % i]) - - + + # check the tmin_for_channel is negative if self['tmin_for_channel'] == 0: raise InvalidRunCard('tmin_for_channel can not be set to 0.') @@ -4543,15 +4543,15 @@ def check_validity(self): logger.warning('tmin_for_channel should be negative. Will be using -%f instead' % self['tmin_for_channel']) self.set('tmin_for_channel', -self['tmin_for_channel']) - + def update_system_parameter_for_include(self): """system parameter need to be setupe""" - + # polarization self['frame_id'] = sum(2**(n) for n in self['me_frame']) - + # set the pdg_for_cut fortran parameter - pdg_to_cut = set(list(self['pt_min_pdg'].keys()) +list(self['pt_max_pdg'].keys()) + + pdg_to_cut = set(list(self['pt_min_pdg'].keys()) +list(self['pt_max_pdg'].keys()) + list(self['e_min_pdg'].keys()) +list(self['e_max_pdg'].keys()) + list(self['eta_min_pdg'].keys()) +list(self['eta_max_pdg'].keys())+ list(self['mxx_min_pdg'].keys()) + list(self['mxx_only_part_antipart'].keys())) @@ -4559,15 +4559,15 @@ def update_system_parameter_for_include(self): pdg_to_cut.discard('default') if len(pdg_to_cut)>25: raise Exception("Maximum 25 different pdgs are allowed for pdg specific cut") - + if any(int(pdg)<0 for pdg in pdg_to_cut): logger.warning('PDG specific cuts are always applied symmetrically on particles/anti-particles. Always use positve PDG codes') raise MadGraph5Error('Some PDG specific cuts are defined using negative pdg code') - - + + if any(pdg in pdg_to_cut for pdg in [1,2,3,4,5,21,22,11,13,15]): raise Exception("Can not use PDG related cut for light quark/b quark/lepton/gluon/photon") - + if pdg_to_cut: self['pdg_cut'] = list(pdg_to_cut) self['ptmin4pdg'] = [] @@ -4595,7 +4595,7 @@ def update_system_parameter_for_include(self): self[new_var].append(self[old_var][str(pdg)] if str(pdg) in self[old_var] else default) else: if str(pdg) not in self[old_var]: - raise Exception("no default value defined for %s and no value defined for pdg %s" % (old_var, pdg)) + raise Exception("no default value defined for %s and no value defined for pdg %s" % (old_var, pdg)) self[new_var].append(self[old_var][str(pdg)]) else: self['pdg_cut'] = [0] @@ -4605,11 +4605,11 @@ def update_system_parameter_for_include(self): self['ptmax4pdg'] = [-1.] self['Emax4pdg'] = [-1.] self['etamax4pdg'] =[-1.] - self['mxxmin4pdg'] =[0.] + self['mxxmin4pdg'] =[0.] self['mxxpart_antipart'] = [False] - - - + + + def create_default_for_process(self, proc_characteristic, history, proc_def): """Rules process 1->N all cut set on off. @@ -4626,7 +4626,7 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): if proc_characteristic['loop_induced']: self['nhel'] = 1 self['pdgs_for_merging_cut'] = proc_characteristic['colored_pdgs'] - + if proc_characteristic['ninitial'] == 1: #remove all cut self.remove_all_cut() @@ -4636,7 +4636,7 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): # check for beam_id beam_id = set() beam_id_split = [set(), set()] - for proc in proc_def: + for proc in proc_def: for oneproc in proc: for i,leg in enumerate(oneproc['legs']): if not leg['state']: @@ -4654,20 +4654,20 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): maxjetflavor = max([4]+[abs(i) for i in beam_id if -7< i < 7]) self['maxjetflavor'] = maxjetflavor self['asrwgtflavor'] = maxjetflavor - + if any(i in beam_id for i in [1,-1,2,-2,3,-3,4,-4,5,-5,21,22]): # check for e p collision if any(id in beam_id for id in [11,-11,13,-13]): self.display_block.append('beam_pol') if any(id in beam_id_split[0] for id in [11,-11,13,-13]): - self['lpp1'] = 0 - self['lpp2'] = 1 - self['ebeam1'] = '1k' - self['ebeam2'] = '6500' + self['lpp1'] = 0 + self['lpp2'] = 1 + self['ebeam1'] = '1k' + self['ebeam2'] = '6500' else: - self['lpp1'] = 1 - self['lpp2'] = 0 - self['ebeam1'] = '6500' + self['lpp1'] = 1 + self['lpp2'] = 0 + self['ebeam1'] = '6500' self['ebeam2'] = '1k' # UPC for p p collision @@ -4677,7 +4677,7 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): self['ebeam1'] = '6500' self['ebeam2'] = '6500' self['pdlabel'] = 'edff' - + elif any(id in beam_id for id in [11,-11,13,-13]): self['lpp1'] = 0 self['lpp2'] = 0 @@ -4688,7 +4688,7 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): self.display_block.append('ecut') self.display_block.append('beam_pol') - + # check for possibility of eva eva_in_b1 = any(i in beam_id_split[0] for i in [23,24,-24]) #,12,-12,14,-14]) @@ -4701,10 +4701,10 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): self['nhel'] = 1 self['pdlabel'] = 'eva' self['fixed_fac_scale'] = True - self.display_block.append('beam_pol') + self.display_block.append('beam_pol') elif eva_in_b1: - self.display_block.append('beam_pol') + self.display_block.append('beam_pol') self['pdlabel1'] = 'eva' self['fixed_fac_scale1'] = True self['nhel'] = 1 @@ -4724,7 +4724,7 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): self['pdlabel2'] = 'eva' self['fixed_fac_scale2'] = True self['nhel'] = 1 - self.display_block.append('beam_pol') + self.display_block.append('beam_pol') for i in beam_id_split[0]: if abs(i) == 11: self['lpp1'] = math.copysign(3,i) @@ -4740,34 +4740,34 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): if any(i in beam_id for i in [22,23,24,-24,12,-12,14,-14]): self.display_block.append('eva_scale') - # automatic polarisation of the beam if neutrino beam + # automatic polarisation of the beam if neutrino beam if any(id in beam_id for id in [12,-12,14,-14,16,-16]): self.display_block.append('beam_pol') if any(id in beam_id_split[0] for id in [12,14,16]): - self['lpp1'] = 0 - self['ebeam1'] = '1k' + self['lpp1'] = 0 + self['ebeam1'] = '1k' self['polbeam1'] = -100 if not all(id in [12,14,16] for id in beam_id_split[0]): logger.warning('Issue with default beam setup of neutrino in the run_card. Please check it up [polbeam1]. %s') elif any(id in beam_id_split[0] for id in [-12,-14,-16]): - self['lpp1'] = 0 - self['ebeam1'] = '1k' + self['lpp1'] = 0 + self['ebeam1'] = '1k' self['polbeam1'] = 100 if not all(id in [-12,-14,-16] for id in beam_id_split[0]): - logger.warning('Issue with default beam setup of neutrino in the run_card. Please check it up [polbeam1].') + logger.warning('Issue with default beam setup of neutrino in the run_card. Please check it up [polbeam1].') if any(id in beam_id_split[1] for id in [12,14,16]): - self['lpp2'] = 0 - self['ebeam2'] = '1k' + self['lpp2'] = 0 + self['ebeam2'] = '1k' self['polbeam2'] = -100 if not all(id in [12,14,16] for id in beam_id_split[1]): logger.warning('Issue with default beam setup of neutrino in the run_card. Please check it up [polbeam2].') elif any(id in beam_id_split[1] for id in [-12,-14,-16]): - self['lpp2'] = 0 - self['ebeam2'] = '1k' + self['lpp2'] = 0 + self['ebeam2'] = '1k' self['polbeam2'] = 100 if not all(id in [-12,-14,-16] for id in beam_id_split[1]): logger.warning('Issue with default beam setup of neutrino in the run_card. Please check it up [polbeam2].') - + # Check if need matching min_particle = 99 max_particle = 0 @@ -4798,12 +4798,12 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): else: # all are jet => matching is ON matching=True - break - + break + if matching: self['ickkw'] = 1 self['xqcut'] = 30 - #self['use_syst'] = False + #self['use_syst'] = False self['drjj'] = 0 self['drjl'] = 0 self['sys_alpsfact'] = "0.5 1 2" @@ -4811,8 +4811,8 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): self.display_block.append('mlm') self.display_block.append('ckkw') self['dynamical_scale_choice'] = -1 - - + + # For interference module, the systematics are wrong. # automatically set use_syst=F and set systematics_program=none no_systematics = False @@ -4826,14 +4826,14 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): continue break - + if interference or no_systematics: self['use_syst'] = False self['systematics_program'] = 'none' if interference: self['dynamical_scale_choice'] = 3 self['sde_strategy'] = 2 - + # set default integration strategy # interference case is already handle above # here pick strategy 2 if only one QCD color flow @@ -4852,7 +4852,7 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): if pure_lepton and proton_initial: self['sde_strategy'] = 1 else: - # check if multi-jet j + # check if multi-jet j is_multijet = True for proc in proc_def: if any(abs(j.get('id')) not in jet_id for j in proc[0]['legs']): @@ -4860,7 +4860,7 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): break if is_multijet: self['sde_strategy'] = 2 - + # if polarization is used, set the choice of the frame in the run_card # But only if polarization is used for massive particles for plist in proc_def: @@ -4870,7 +4870,7 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): model = proc.get('model') particle = model.get_particle(l.get('id')) if particle.get('mass').lower() != 'zero': - self.display_block.append('frame') + self.display_block.append('frame') break else: continue @@ -4894,15 +4894,15 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): proc = proc_list[0] if proc['forbidden_onsh_s_channels']: self['sde_strategy'] = 1 - + if 'fix_scale' in proc_characteristic['limitations']: self['fixed_ren_scale'] = 1 self['fixed_fac_scale'] = 1 if self['ickkw'] == 1: logger.critical("MLM matching/merging not compatible with the model! You need to use another method to remove the double counting!") self['ickkw'] = 0 - - # define class of particles present to hide all the cuts associated to + + # define class of particles present to hide all the cuts associated to # not present class cut_class = collections.defaultdict(int) for proc in proc_def: @@ -4925,41 +4925,41 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): one_proc_cut['L'] += 1 elif abs(pdg) in [12,14,16]: one_proc_cut['n'] += 1 - one_proc_cut['L'] += 1 + one_proc_cut['L'] += 1 elif str(oneproc.get('model').get_particle(pdg)['mass']) != 'ZERO': one_proc_cut['H'] += 1 - + for key, nb in one_proc_cut.items(): cut_class[key] = max(cut_class[key], nb) self.cut_class = dict(cut_class) self.cut_class[''] = True #avoid empty - + # If model has running functionality add the additional parameter model = proc_def[0][0].get('model') if model['running_elements']: - self.display_block.append('RUNNING') + self.display_block.append('RUNNING') # Read file input/default_run_card_lo.dat # This has to be LAST !! if os.path.exists(self.default_run_card): self.read(self.default_run_card, consistency=False) - + def write(self, output_file, template=None, python_template=False, **opt): - """Write the run_card in output_file according to template + """Write the run_card in output_file according to template (a path to a valid run_card)""" if not template: if not MADEVENT: - template = pjoin(MG5DIR, 'Template', 'LO', 'Cards', + template = pjoin(MG5DIR, 'Template', 'LO', 'Cards', 'run_card.dat') python_template = True else: template = pjoin(MEDIR, 'Cards', 'run_card_default.dat') python_template = False - + hid_lines = {'default':True}#collections.defaultdict(itertools.repeat(True).next) if isinstance(output_file, str): @@ -4975,9 +4975,9 @@ def write(self, output_file, template=None, python_template=False, hid_lines[k1+k2] = True super(RunCardLO, self).write(output_file, template=template, - python_template=python_template, + python_template=python_template, template_options=hid_lines, - **opt) + **opt) class InvalidMadAnalysis5Card(InvalidCmd): @@ -4986,19 +4986,19 @@ class InvalidMadAnalysis5Card(InvalidCmd): class MadAnalysis5Card(dict): """ A class to store a MadAnalysis5 card. Very basic since it is basically free format.""" - + _MG5aMC_escape_tag = '@MG5aMC' - + _default_hadron_inputs = ['*.hepmc', '*.hep', '*.stdhep', '*.lhco','*.root'] _default_parton_inputs = ['*.lhe'] _skip_analysis = False - + @classmethod def events_can_be_reconstructed(cls, file_path): """ Checks from the type of an event file whether it can be reconstructed or not.""" return not (file_path.endswith('.lhco') or file_path.endswith('.lhco.gz') or \ file_path.endswith('.root') or file_path.endswith('.root.gz')) - + @classmethod def empty_analysis(cls): """ A method returning the structure of an empty analysis """ @@ -5012,7 +5012,7 @@ def empty_reconstruction(cls): 'reco_output':'lhe'} def default_setup(self): - """define the default value""" + """define the default value""" self['mode'] = 'parton' self['inputs'] = [] # None is the default stdout level, it will be set automatically by MG5aMC @@ -5025,8 +5025,8 @@ def default_setup(self): # of this class and some other property could be added to this dictionary # in the future. self['analyses'] = {} - # The recasting structure contains on set of commands and one set of - # card lines. + # The recasting structure contains on set of commands and one set of + # card lines. self['recasting'] = {'commands':[],'card':[]} # Add the default trivial reconstruction to use an lhco input # This is just for the structure @@ -5035,7 +5035,7 @@ def default_setup(self): 'root_input': MadAnalysis5Card.empty_reconstruction()} self['reconstruction']['lhco_input']['reco_output']='lhco' - self['reconstruction']['root_input']['reco_output']='root' + self['reconstruction']['root_input']['reco_output']='root' # Specify in which order the analysis/recasting were specified self['order'] = [] @@ -5049,7 +5049,7 @@ def __init__(self, finput=None,mode=None): return else: dict.__init__(self) - + # Initialize it with all the default value self.default_setup() if not mode is None: @@ -5058,15 +5058,15 @@ def __init__(self, finput=None,mode=None): # if input is define read that input if isinstance(finput, (file, str, StringIO.StringIO)): self.read(finput, mode=mode) - + def read(self, input, mode=None): """ Read an MA5 card""" - + if mode not in [None,'parton','hadron']: raise MadGraph5Error('A MadAnalysis5Card can be read online the modes'+ "'parton' or 'hadron'") card_mode = mode - + if isinstance(input, (file, StringIO.StringIO)): input_stream = input elif isinstance(input, str): @@ -5099,10 +5099,10 @@ def read(self, input, mode=None): except ValueError: option = line[len(self._MG5aMC_escape_tag):] option = option.strip() - + if option=='inputs': self['inputs'].extend([v.strip() for v in value.split(',')]) - + elif option == 'skip_analysis': self._skip_analysis = True @@ -5118,7 +5118,7 @@ def read(self, input, mode=None): except: raise InvalidMadAnalysis5Card( "MA5 output level specification '%s' is incorrect."%str(value)) - + elif option=='analysis_name': current_type = 'analyses' current_name = value @@ -5127,7 +5127,7 @@ def read(self, input, mode=None): "Analysis '%s' already defined in MadAnalysis5 card"%current_name) else: self[current_type][current_name] = MadAnalysis5Card.empty_analysis() - + elif option=='set_reconstructions': try: reconstructions = eval(value) @@ -5142,7 +5142,7 @@ def read(self, input, mode=None): "analysis in a MadAnalysis5 card.") self[current_type][current_name]['reconstructions']=reconstructions continue - + elif option=='reconstruction_name': current_type = 'reconstruction' current_name = value @@ -5161,7 +5161,7 @@ def read(self, input, mode=None): raise InvalidMadAnalysis5Card( "Option '%s' can only take the values 'lhe' or 'root'"%option) self['reconstruction'][current_name]['reco_output'] = value.lower() - + elif option.startswith('recasting'): current_type = 'recasting' try: @@ -5171,11 +5171,11 @@ def read(self, input, mode=None): if len(self['recasting'][current_name])>0: raise InvalidMadAnalysis5Card( "Only one recasting can be defined in MadAnalysis5 hadron card") - + else: raise InvalidMadAnalysis5Card( "Unreckognized MG5aMC instruction in MadAnalysis5 card: '%s'"%option) - + if option in ['analysis_name','reconstruction_name'] or \ option.startswith('recasting'): self['order'].append((current_type,current_name)) @@ -5209,7 +5209,7 @@ def read(self, input, mode=None): self['inputs'] = self._default_hadron_inputs else: self['inputs'] = self._default_parton_inputs - + # Make sure at least one reconstruction is specified for each hadron # level analysis and that it exists. if self['mode']=='hadron': @@ -5221,7 +5221,7 @@ def read(self, input, mode=None): analysis['reconstructions']): raise InvalidMadAnalysis5Card('A reconstructions specified in'+\ " analysis '%s' is not defined."%analysis_name) - + def write(self, output): """ Write an MA5 card.""" @@ -5232,7 +5232,7 @@ def write(self, output): else: raise MadGraph5Error('Incorrect input for the write function of'+\ ' the MadAnalysis5Card card. Received argument type is: %s'%str(type(output))) - + output_lines = [] if self._skip_analysis: output_lines.append('%s skip_analysis'%self._MG5aMC_escape_tag) @@ -5240,11 +5240,11 @@ def write(self, output): if not self['stdout_lvl'] is None: output_lines.append('%s stdout_lvl=%s'%(self._MG5aMC_escape_tag,self['stdout_lvl'])) for definition_type, name in self['order']: - + if definition_type=='analyses': output_lines.append('%s analysis_name = %s'%(self._MG5aMC_escape_tag,name)) output_lines.append('%s set_reconstructions = %s'%(self._MG5aMC_escape_tag, - str(self['analyses'][name]['reconstructions']))) + str(self['analyses'][name]['reconstructions']))) elif definition_type=='reconstruction': output_lines.append('%s reconstruction_name = %s'%(self._MG5aMC_escape_tag,name)) elif definition_type=='recasting': @@ -5254,23 +5254,23 @@ def write(self, output): output_lines.extend(self[definition_type][name]) elif definition_type in ['reconstruction']: output_lines.append('%s reco_output = %s'%(self._MG5aMC_escape_tag, - self[definition_type][name]['reco_output'])) + self[definition_type][name]['reco_output'])) output_lines.extend(self[definition_type][name]['commands']) elif definition_type in ['analyses']: - output_lines.extend(self[definition_type][name]['commands']) - + output_lines.extend(self[definition_type][name]['commands']) + output_stream.write('\n'.join(output_lines)) - + return - - def get_MA5_cmds(self, inputs_arg, submit_folder, run_dir_path=None, + + def get_MA5_cmds(self, inputs_arg, submit_folder, run_dir_path=None, UFO_model_path=None, run_tag=''): - """ Returns a list of tuples ('AnalysisTag',['commands']) specifying - the commands of the MadAnalysis runs required from this card. - At parton-level, the number of such commands is the number of analysis + """ Returns a list of tuples ('AnalysisTag',['commands']) specifying + the commands of the MadAnalysis runs required from this card. + At parton-level, the number of such commands is the number of analysis asked for. In the future, the idea is that the entire card can be processed in one go from MA5 directly.""" - + if isinstance(inputs_arg, list): inputs = inputs_arg elif isinstance(inputs_arg, str): @@ -5278,21 +5278,21 @@ def get_MA5_cmds(self, inputs_arg, submit_folder, run_dir_path=None, else: raise MadGraph5Error("The function 'get_MA5_cmds' can only take "+\ " a string or a list for the argument 'inputs_arg'") - + if len(inputs)==0: raise MadGraph5Error("The function 'get_MA5_cmds' must have "+\ " at least one input specified'") - + if run_dir_path is None: run_dir_path = os.path.dirname(inputs_arg) - + cmds_list = [] - + UFO_load = [] # first import the UFO if provided if UFO_model_path: UFO_load.append('import %s'%UFO_model_path) - + def get_import(input, type=None): """ Generates the MA5 import commands for that event file. """ dataset_name = os.path.basename(input).split('.')[0] @@ -5304,7 +5304,7 @@ def get_import(input, type=None): if not type is None: res.append('set %s.type = %s'%(dataset_name, type)) return res - + fifo_status = {'warned_fifo':False,'fifo_used_up':False} def warn_fifo(input): if not input.endswith('.fifo'): @@ -5317,7 +5317,7 @@ def warn_fifo(input): logger.warning('Only the first MA5 analysis/reconstructions can be run on a fifo. Subsequent runs will skip fifo inputs.') fifo_status['warned_fifo'] = True return True - + # Then the event file(s) input(s) inputs_load = [] for input in inputs: @@ -5325,16 +5325,16 @@ def warn_fifo(input): if len(inputs) > 1: inputs_load.append('set main.stacking_method = superimpose') - + submit_command = 'submit %s'%submit_folder+'_%s' - + # Keep track of the reconstruction outpus in the MA5 workflow # Keys are reconstruction names and values are .lhe.gz reco file paths. # We put by default already the lhco/root ones present reconstruction_outputs = { - 'lhco_input':[f for f in inputs if + 'lhco_input':[f for f in inputs if f.endswith('.lhco') or f.endswith('.lhco.gz')], - 'root_input':[f for f in inputs if + 'root_input':[f for f in inputs if f.endswith('.root') or f.endswith('.root.gz')]} # If a recasting card has to be written out, chose here its path @@ -5343,7 +5343,7 @@ def warn_fifo(input): # Make sure to only run over one analysis over each fifo. for definition_type, name in self['order']: - if definition_type == 'reconstruction': + if definition_type == 'reconstruction': analysis_cmds = list(self['reconstruction'][name]['commands']) reco_outputs = [] for i_input, input in enumerate(inputs): @@ -5365,8 +5365,8 @@ def warn_fifo(input): analysis_cmds.append( submit_command%('reco_%s_%d'%(name,i_input+1))) analysis_cmds.append('remove reco_events') - - reconstruction_outputs[name]= [pjoin(run_dir_path,rec_out) + + reconstruction_outputs[name]= [pjoin(run_dir_path,rec_out) for rec_out in reco_outputs] if len(reco_outputs)>0: cmds_list.append(('_reco_%s'%name,analysis_cmds)) @@ -5386,7 +5386,7 @@ def warn_fifo(input): analysis_cmds = ['set main.mode = parton'] else: analysis_cmds = [] - analysis_cmds.extend(sum([get_import(rec_out) for + analysis_cmds.extend(sum([get_import(rec_out) for rec_out in reconstruction_outputs[reco]],[])) analysis_cmds.extend(self['analyses'][name]['commands']) analysis_cmds.append(submit_command%('%s_%s'%(name,reco))) @@ -5427,12 +5427,12 @@ def warn_fifo(input): %(mue_ref_fixed)s = mue_ref_fixed ! scale to use if fixed scale mode """ running_block_nlo = RunBlock('RUNNING', template_on=template_on, template_off="") - + class RunCardNLO(RunCard): """A class object for the run_card for a (aMC@)NLO pocess""" - + LO = False - + blocks = [running_block_nlo] dummy_fct_file = {"dummy_cuts": pjoin("SubProcesses","dummy_fct.f"), @@ -5443,11 +5443,11 @@ class RunCardNLO(RunCard): if MG5DIR: default_run_card = pjoin(MG5DIR, "internal", "default_run_card_nlo.dat") - - + + def default_setup(self): """define the default value""" - + self.add_param('run_tag', 'tag_1', include=False) self.add_param('nevents', 10000) self.add_param('req_acc', -1.0, include=False) @@ -5455,27 +5455,27 @@ def default_setup(self): self.add_param("time_of_flight", -1.0, include=False) self.add_param('event_norm', 'average') #FO parameter - self.add_param('req_acc_fo', 0.01, include=False) + self.add_param('req_acc_fo', 0.01, include=False) self.add_param('npoints_fo_grid', 5000, include=False) self.add_param('niters_fo_grid', 4, include=False) - self.add_param('npoints_fo', 10000, include=False) + self.add_param('npoints_fo', 10000, include=False) self.add_param('niters_fo', 6, include=False) #seed and collider self.add_param('iseed', 0) - self.add_param('lpp1', 1, fortran_name='lpp(1)') - self.add_param('lpp2', 1, fortran_name='lpp(2)') + self.add_param('lpp1', 1, fortran_name='lpp(1)') + self.add_param('lpp2', 1, fortran_name='lpp(2)') self.add_param('ebeam1', 6500.0, fortran_name='ebeam(1)') - self.add_param('ebeam2', 6500.0, fortran_name='ebeam(2)') + self.add_param('ebeam2', 6500.0, fortran_name='ebeam(2)') self.add_param('pdlabel', 'nn23nlo', allowed=['lhapdf', 'emela', 'cteq6_m','cteq6_d','cteq6_l','cteq6l1', 'nn23lo','nn23lo1','nn23nlo','ct14q00','ct14q07','ct14q14','ct14q21'] +\ - sum(self.allowed_lep_densities.values(),[]) ) + sum(self.allowed_lep_densities.values(),[]) ) self.add_param('lhaid', [244600],fortran_name='lhaPDFid') self.add_param('pdfscheme', 0) # whether to include or not photon-initiated processes in lepton collisions self.add_param('photons_from_lepton', True) self.add_param('lhapdfsetname', ['internal_use_only'], system=True) - # stuff for lepton collisions - # these parameters are in general set automatically by eMELA in a consistent manner with the PDF set - # whether the current PDF set has or not beamstrahlung + # stuff for lepton collisions + # these parameters are in general set automatically by eMELA in a consistent manner with the PDF set + # whether the current PDF set has or not beamstrahlung self.add_param('has_bstrahl', False, system=True) # renormalisation scheme of alpha self.add_param('alphascheme', 0, system=True) @@ -5486,31 +5486,31 @@ def default_setup(self): # w contribution included or not in the running of alpha self.add_param('w_run', 1, system=True) #shower and scale - self.add_param('parton_shower', 'HERWIG6', fortran_name='shower_mc') + self.add_param('parton_shower', 'HERWIG6', fortran_name='shower_mc') self.add_param('shower_scale_factor',1.0) self.add_param('mcatnlo_delta', False) self.add_param('fixed_ren_scale', False) self.add_param('fixed_fac_scale', False) self.add_param('fixed_extra_scale', True, hidden=True, system=True) # set system since running from Ellis-Sexton scale not implemented - self.add_param('mur_ref_fixed', 91.118) + self.add_param('mur_ref_fixed', 91.118) self.add_param('muf1_ref_fixed', -1.0, hidden=True) - self.add_param('muf_ref_fixed', 91.118) + self.add_param('muf_ref_fixed', 91.118) self.add_param('muf2_ref_fixed', -1.0, hidden=True) - self.add_param('mue_ref_fixed', 91.118, hidden=True) - self.add_param("dynamical_scale_choice", [-1],fortran_name='dyn_scale', + self.add_param('mue_ref_fixed', 91.118, hidden=True) + self.add_param("dynamical_scale_choice", [-1],fortran_name='dyn_scale', allowed = [-2,-1,0,1,2,3,10], comment="\'-1\' is based on CKKW back clustering (following feynman diagram).\n \'1\' is the sum of transverse energy.\n '2' is HT (sum of the transverse mass)\n '3' is HT/2, '0' allows to use the user_hook definition (need to be defined via custom_fct entry) ") self.add_param('fixed_qes_scale', False, hidden=True) self.add_param('qes_ref_fixed', -1.0, hidden=True) self.add_param('mur_over_ref', 1.0) - self.add_param('muf_over_ref', 1.0) - self.add_param('muf1_over_ref', -1.0, hidden=True) + self.add_param('muf_over_ref', 1.0) + self.add_param('muf1_over_ref', -1.0, hidden=True) self.add_param('muf2_over_ref', -1.0, hidden=True) self.add_param('mue_over_ref', 1.0, hidden=True, system=True) # forbid the user to modigy due to incorrect handling of the Ellis-Sexton scale self.add_param('qes_over_ref', -1.0, hidden=True) self.add_param('reweight_scale', [True], fortran_name='lscalevar') - self.add_param('rw_rscale_down', -1.0, hidden=True) + self.add_param('rw_rscale_down', -1.0, hidden=True) self.add_param('rw_rscale_up', -1.0, hidden=True) - self.add_param('rw_fscale_down', -1.0, hidden=True) + self.add_param('rw_fscale_down', -1.0, hidden=True) self.add_param('rw_fscale_up', -1.0, hidden=True) self.add_param('rw_rscale', [1.0,2.0,0.5], fortran_name='scalevarR') self.add_param('rw_fscale', [1.0,2.0,0.5], fortran_name='scalevarF') @@ -5523,60 +5523,60 @@ def default_setup(self): #technical self.add_param('folding', [1,1,1], include=False) - + #merging self.add_param('ickkw', 0, allowed=[-1,0,3,4], comment=" - 0: No merging\n - 3: FxFx Merging : http://amcatnlo.cern.ch/FxFx_merging.htm\n - 4: UNLOPS merging (No interface within MG5aMC)\n - -1: NNLL+NLO jet-veto computation. See arxiv:1412.8408 [hep-ph]") self.add_param('bwcutoff', 15.0) - #cuts + #cuts self.add_param('jetalgo', 1.0) - self.add_param('jetradius', 0.7) + self.add_param('jetradius', 0.7) self.add_param('ptj', 10.0 , cut=True) - self.add_param('etaj', -1.0, cut=True) - self.add_param('gamma_is_j', True) + self.add_param('etaj', -1.0, cut=True) + self.add_param('gamma_is_j', True) self.add_param('ptl', 0.0, cut=True) - self.add_param('etal', -1.0, cut=True) + self.add_param('etal', -1.0, cut=True) self.add_param('drll', 0.0, cut=True) - self.add_param('drll_sf', 0.0, cut=True) + self.add_param('drll_sf', 0.0, cut=True) self.add_param('mll', 0.0, cut=True) - self.add_param('mll_sf', 30.0, cut=True) - self.add_param('rphreco', 0.1) - self.add_param('etaphreco', -1.0) - self.add_param('lepphreco', True) - self.add_param('quarkphreco', True) + self.add_param('mll_sf', 30.0, cut=True) + self.add_param('rphreco', 0.1) + self.add_param('etaphreco', -1.0) + self.add_param('lepphreco', True) + self.add_param('quarkphreco', True) self.add_param('ptgmin', 20.0, cut=True) - self.add_param('etagamma', -1.0) + self.add_param('etagamma', -1.0) self.add_param('r0gamma', 0.4) - self.add_param('xn', 1.0) + self.add_param('xn', 1.0) self.add_param('epsgamma', 1.0) - self.add_param('isoem', True) + self.add_param('isoem', True) self.add_param('maxjetflavor', 4, hidden=True) - self.add_param('pineappl', False) + self.add_param('pineappl', False) self.add_param('lhe_version', 3, hidden=True, include=False) - + # customization self.add_param("custom_fcts",[],typelist="str", include=False, comment="list of files containing function that overwritte dummy function of the code (like adding cuts/...)") #internal variable related to FO_analyse_card self.add_param('FO_LHE_weight_ratio',1e-3, hidden=True, system=True) - self.add_param('FO_LHE_postprocessing',['grouping','random'], + self.add_param('FO_LHE_postprocessing',['grouping','random'], hidden=True, system=True, include=False) - + # parameter allowing to define simple cut via the pdg self.add_param('pt_min_pdg',{'__type__':0.}, include=False,cut=True) self.add_param('pt_max_pdg',{'__type__':0.}, include=False,cut=True) self.add_param('mxx_min_pdg',{'__type__':0.}, include=False,cut=True) self.add_param('mxx_only_part_antipart', {'default':False}, include=False, hidden=True) - + #hidden parameter that are transfer to the fortran code self.add_param('pdg_cut',[0], hidden=True, system=True) # store which PDG are tracked self.add_param('ptmin4pdg',[0.], hidden=True, system=True) # store pt min self.add_param('ptmax4pdg',[-1.], hidden=True, system=True) self.add_param('mxxmin4pdg',[0.], hidden=True, system=True) self.add_param('mxxpart_antipart', [False], hidden=True, system=True) - + def check_validity(self): """check the validity of the various input""" - + super(RunCardNLO, self).check_validity() # for lepton-lepton collisions, ignore 'pdlabel' and 'lhaid' @@ -5588,12 +5588,12 @@ def check_validity(self): # for dressed lepton collisions, check that the lhaid is a valid one if self['pdlabel'] not in sum(self.allowed_lep_densities.values(),[]) + ['emela']: raise InvalidRunCard('pdlabel %s not allowed for dressed-lepton collisions' % self['pdlabel']) - + elif self['pdlabel']!='nn23nlo' or self['reweight_pdf']: self['pdlabel']='nn23nlo' self['reweight_pdf']=[False] logger.info('''Lepton-lepton collisions: ignoring PDF related parameters in the run_card.dat (pdlabel, lhaid, reweight_pdf, ...)''') - + if self['lpp1'] == 0 == self['lpp2']: if self['pdlabel']!='nn23nlo' or self['reweight_pdf']: self['pdlabel']='nn23nlo' @@ -5601,8 +5601,8 @@ def check_validity(self): logger.info('''Lepton-lepton collisions: ignoring PDF related parameters in the run_card.dat (pdlabel, lhaid, reweight_pdf, ...)''') # For FxFx merging, make sure that the following parameters are set correctly: - if self['ickkw'] == 3: - # 1. Renormalization and factorization (and ellis-sexton scales) are not fixed + if self['ickkw'] == 3: + # 1. Renormalization and factorization (and ellis-sexton scales) are not fixed scales=['fixed_ren_scale','fixed_fac_scale','fixed_QES_scale'] for scale in scales: if self[scale]: @@ -5615,7 +5615,7 @@ def check_validity(self): self["reweight_scale"]=[self["reweight_scale"][0]] logger.warning('''For consistency in FxFx merging, dynamical_scale_choice has been set to -1 (default)''' ,'$MG:BOLD') - + # 2. Use kT algorithm for jets with pseudo-code size R=1.0 jetparams=['jetradius','jetalgo'] for jetparam in jetparams: @@ -5628,8 +5628,8 @@ def check_validity(self): self["dynamical_scale_choice"] = [-1] self["reweight_scale"]=[self["reweight_scale"][0]] logger.warning('''For consistency with the jet veto, the scale which will be used is ptj. dynamical_scale_choice will be set at -1.''' - ,'$MG:BOLD') - + ,'$MG:BOLD') + # For interface to PINEAPPL, need to use LHAPDF and reweighting to get scale uncertainties if self['pineappl'] and self['pdlabel'].lower() != 'lhapdf': raise InvalidRunCard('PineAPPL generation only possible with the use of LHAPDF') @@ -5661,7 +5661,7 @@ def check_validity(self): if (self['rw_fscale_down'] != -1.0 and ['rw_fscale_down'] not in self['rw_fscale']) or\ (self['rw_fscale_up'] != -1.0 and ['rw_fscale_up'] not in self['rw_fscale']): self['rw_fscale']=[1.0,self['rw_fscale_up'],self['rw_fscale_down']] - + # PDF reweighting check if any(self['reweight_pdf']): # check that we use lhapdf if reweighting is ON @@ -5672,7 +5672,7 @@ def check_validity(self): if self['pdlabel'] != "lhapdf": self['reweight_pdf']=[self['reweight_pdf'][0]] self['lhaid']=[self['lhaid'][0]] - + # make sure set have reweight_scale and dyn_scale_choice of length 1 when fixed scales: if self['fixed_ren_scale'] and self['fixed_fac_scale']: self['reweight_scale']=[self['reweight_scale'][0]] @@ -5685,7 +5685,7 @@ def check_validity(self): self['reweight_pdf']=self['reweight_pdf']*len(self['lhaid']) logger.warning("Setting 'reweight_pdf' for all 'lhaid' to %s" % self['reweight_pdf'][0]) if len(self['reweight_scale']) == 1 and len(self['dynamical_scale_choice']) != 1: - self['reweight_scale']=self['reweight_scale']*len(self['dynamical_scale_choice']) + self['reweight_scale']=self['reweight_scale']*len(self['dynamical_scale_choice']) logger.warning("Setting 'reweight_scale' for all 'dynamical_scale_choice' to %s" % self['reweight_pdf'][0]) # Check that there are no identical elements in lhaid or dynamical_scale_choice @@ -5693,7 +5693,7 @@ def check_validity(self): raise InvalidRunCard("'lhaid' has two or more identical entries. They have to be all different for the code to work correctly.") if len(self['dynamical_scale_choice']) != len(set(self['dynamical_scale_choice'])): raise InvalidRunCard("'dynamical_scale_choice' has two or more identical entries. They have to be all different for the code to work correctly.") - + # Check that lenght of lists are consistent if len(self['reweight_pdf']) != len(self['lhaid']): raise InvalidRunCard("'reweight_pdf' and 'lhaid' lists should have the same length") @@ -5730,7 +5730,7 @@ def check_validity(self): if len(self['folding']) != 3: raise InvalidRunCard("'folding' should contain exactly three integers") for ifold in self['folding']: - if ifold not in [1,2,4,8]: + if ifold not in [1,2,4,8]: raise InvalidRunCard("The three 'folding' parameters should be equal to 1, 2, 4, or 8.") # Check MC@NLO-Delta if self['mcatnlo_delta'] and not self['parton_shower'].lower() == 'pythia8': @@ -5746,11 +5746,11 @@ def check_validity(self): logger.warning("At-rest proton mode set: energy beam set to 0.938 GeV") self.set('ebeam%i' %i, 0.938) else: - raise InvalidRunCard("Energy for beam %i lower than proton mass. Please fix this") + raise InvalidRunCard("Energy for beam %i lower than proton mass. Please fix this") def update_system_parameter_for_include(self): - + # set the pdg_for_cut fortran parameter pdg_to_cut = set(list(self['pt_min_pdg'].keys()) +list(self['pt_max_pdg'].keys())+ list(self['mxx_min_pdg'].keys())+ list(self['mxx_only_part_antipart'].keys())) @@ -5758,12 +5758,12 @@ def update_system_parameter_for_include(self): pdg_to_cut.discard('default') if len(pdg_to_cut)>25: raise Exception("Maximum 25 different PDGs are allowed for PDG specific cut") - + if any(int(pdg)<0 for pdg in pdg_to_cut): logger.warning('PDG specific cuts are always applied symmetrically on particles/anti-particles. Always use positve PDG codes') raise MadGraph5Error('Some PDG specific cuts are defined using negative PDG codes') - - + + if any(pdg in pdg_to_cut for pdg in [21,22,11,13,15]+ list(range(self['maxjetflavor']+1))): # Note that this will double check in the fortran code raise Exception("Can not use PDG related cuts for massless SM particles/leptons") @@ -5790,7 +5790,7 @@ def update_system_parameter_for_include(self): self[new_var].append(self[old_var][str(pdg)] if str(pdg) in self[old_var] else default) else: if str(pdg) not in self[old_var]: - raise Exception("no default value defined for %s and no value defined for pdg %s" % (old_var, pdg)) + raise Exception("no default value defined for %s and no value defined for pdg %s" % (old_var, pdg)) self[new_var].append(self[old_var][str(pdg)]) else: self['pdg_cut'] = [0] @@ -5800,12 +5800,12 @@ def update_system_parameter_for_include(self): self['mxxpart_antipart'] = [False] def write(self, output_file, template=None, python_template=False, **opt): - """Write the run_card in output_file according to template + """Write the run_card in output_file according to template (a path to a valid run_card)""" if not template: if not MADEVENT: - template = pjoin(MG5DIR, 'Template', 'NLO', 'Cards', + template = pjoin(MG5DIR, 'Template', 'NLO', 'Cards', 'run_card.dat') python_template = True else: @@ -5818,7 +5818,7 @@ def write(self, output_file, template=None, python_template=False, **opt): def create_default_for_process(self, proc_characteristic, history, proc_def): """Rules - e+ e- beam -> lpp:0 ebeam:500 + e+ e- beam -> lpp:0 ebeam:500 p p beam -> set maxjetflavor automatically process with tagged photons -> gamma_is_j = false process without QED splittings -> gamma_is_j = false, recombination = false @@ -5844,19 +5844,19 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): self['ebeam2'] = 500 else: self['lpp1'] = 0 - self['lpp2'] = 0 - + self['lpp2'] = 0 + if proc_characteristic['ninitial'] == 1: #remove all cut self.remove_all_cut() # check for tagged photons tagged_particles = set() - + # If model has running functionality add the additional parameter model = proc_def[0].get('model') if model['running_elements']: - self.display_block.append('RUNNING') + self.display_block.append('RUNNING') # Check if need matching min_particle = 99 @@ -5885,7 +5885,7 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): else: idsmin = [l['id'] for l in procmin['legs']] break - + for procmax in proc_def: if len(procmax['legs']) != max_particle: continue @@ -5901,9 +5901,9 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): else: # all are jet => matching is ON matching=True - break - - if matching: + break + + if matching: self['ickkw'] = 3 self['fixed_ren_scale'] = False self["fixed_fac_scale"] = False @@ -5911,17 +5911,17 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): self["jetalgo"] = 1 self["jetradius"] = 1 self["parton_shower"] = "PYTHIA8" - + # Read file input/default_run_card_nlo.dat # This has to be LAST !! if os.path.exists(self.default_run_card): self.read(self.default_run_card, consistency=False) - + class MadLoopParam(ConfigFile): """ a class for storing/dealing with the file MadLoopParam.dat contains a parser to read it, facilities to write a new file,... """ - + _ID_reduction_tool_map = {1:'CutTools', 2:'PJFry++', 3:'IREGI', @@ -5929,10 +5929,10 @@ class MadLoopParam(ConfigFile): 5:'Samurai', 6:'Ninja', 7:'COLLIER'} - + def default_setup(self): """initialize the directory to the default value""" - + self.add_param("MLReductionLib", "6|7|1") self.add_param("IREGIMODE", 2) self.add_param("IREGIRECY", True) @@ -5954,7 +5954,7 @@ def default_setup(self): self.add_param("HelicityFilterLevel", 2) self.add_param("LoopInitStartOver", False) self.add_param("HelInitStartOver", False) - self.add_param("UseQPIntegrandForNinja", True) + self.add_param("UseQPIntegrandForNinja", True) self.add_param("UseQPIntegrandForCutTools", True) self.add_param("COLLIERMode", 1) self.add_param("COLLIERComputeUVpoles", True) @@ -5966,9 +5966,9 @@ def default_setup(self): self.add_param("COLLIERUseInternalStabilityTest",True) def read(self, finput): - """Read the input file, this can be a path to a file, + """Read the input file, this can be a path to a file, a file object, a str with the content of the file.""" - + if isinstance(finput, str): if "\n" in finput: finput = finput.split('\n') @@ -5976,7 +5976,7 @@ def read(self, finput): finput = open(finput) else: raise Exception("No such file %s" % input) - + previous_line= '' for line in finput: if previous_line.startswith('#'): @@ -5985,20 +5985,20 @@ def read(self, finput): if len(value) and value[0] not in ['#', '!']: self.__setitem__(name, value, change_userdefine=True) previous_line = line - - + + def write(self, outputpath, template=None,commentdefault=False): - + if not template: if not MADEVENT: - template = pjoin(MG5DIR, 'Template', 'loop_material', 'StandAlone', + template = pjoin(MG5DIR, 'Template', 'loop_material', 'StandAlone', 'Cards', 'MadLoopParams.dat') else: template = pjoin(MEDIR, 'Cards', 'MadLoopParams_default.dat') fsock = open(template, 'r') template = fsock.readlines() fsock.close() - + if isinstance(outputpath, str): output = open(outputpath, 'w') else: @@ -6019,7 +6019,7 @@ def f77format(value): return value else: raise Exception("Can not format input %s" % type(value)) - + name = '' done = set() for line in template: @@ -6034,12 +6034,12 @@ def f77format(value): elif line.startswith('#'): name = line[1:].split()[0] output.write(line) - - - - - -class eMELA_info(ConfigFile): + + + + + +class eMELA_info(ConfigFile): """ a class for eMELA (LHAPDF-like) info files """ path = '' @@ -6053,7 +6053,7 @@ def __init__(self, finput, me_dir): def read(self, finput): - if isinstance(finput, file): + if isinstance(finput, file): lines = finput.open().read().split('\n') self.path = finput.name else: @@ -6066,7 +6066,7 @@ def read(self, finput): k, v = l.split(':', 1) # ignore further occurrences of : try: self[k.strip()] = eval(v) - except (NameError, SyntaxError): + except (NameError, SyntaxError): self[k.strip()] = v def default_setup(self): @@ -6091,7 +6091,7 @@ def update_epdf_emela_variables(self, banner, uvscheme): +"powers of alpha should be reweighted a posteriori") - logger.info('Updating variables according to %s' % self.path) + logger.info('Updating variables according to %s' % self.path) # Flavours in the running of alpha nd, nu, nl = self['eMELA_ActiveFlavoursAlpha'] self.log_and_update(banner, 'run_card', 'ndnq_run', nd) @@ -6130,8 +6130,8 @@ def update_epdf_emela_variables(self, banner, uvscheme): logger.warning('Cannot treat the following renormalisation schemes for ME and PDFs: %d, %d' \ % (uvscheme, uvscheme_pdf)) - # if PDFs use MSbar with fixed alpha, set the ren scale fixed to Qref - # also check that the com energy is equal to qref, otherwise print a + # if PDFs use MSbar with fixed alpha, set the ren scale fixed to Qref + # also check that the com energy is equal to qref, otherwise print a # warning if uvscheme_pdf == 1: qref = self['eMELA_AlphaQref'] @@ -6144,23 +6144,23 @@ def update_epdf_emela_variables(self, banner, uvscheme): # LL / NLL PDF (0/1) pdforder = self['eMELA_PerturbativeOrder'] - # pdfscheme = 0->MSbar; 1->DIS; 2->eta (leptonic); 3->beta (leptonic) + # pdfscheme = 0->MSbar; 1->DIS; 2->eta (leptonic); 3->beta (leptonic) # 4->mixed (leptonic); 5-> nobeta (leptonic); 6->delta (leptonic) # if LL, use nobeta scheme unless LEGACYLLPDF > 0 if pdforder == 0: if 'eMELA_LEGACYLLPDF' not in self.keys() or self['eMELA_LEGACYLLPDF'] in [-1, 0]: self.log_and_update(banner, 'run_card', 'pdfscheme', 5) - elif self['eMELA_LEGACYLLPDF'] == 1: + elif self['eMELA_LEGACYLLPDF'] == 1: # mixed self.log_and_update(banner, 'run_card', 'pdfscheme', 4) - elif self['eMELA_LEGACYLLPDF'] == 2: + elif self['eMELA_LEGACYLLPDF'] == 2: # eta self.log_and_update(banner, 'run_card', 'pdfscheme', 2) - elif self['eMELA_LEGACYLLPDF'] == 3: + elif self['eMELA_LEGACYLLPDF'] == 3: # beta self.log_and_update(banner, 'run_card', 'pdfscheme', 3) elif pdforder == 1: - # for NLL, use eMELA_FactorisationSchemeInt = 0/1 + # for NLL, use eMELA_FactorisationSchemeInt = 0/1 # for delta/MSbar if self['eMELA_FactorisationSchemeInt'] == 0: # MSbar @@ -6177,7 +6177,7 @@ def update_epdf_emela_variables(self, banner, uvscheme): - + def log_and_update(self, banner, card, par, v): """update the card parameter par to value v diff --git a/epochX/cudacpp/gg_ttg.mad/bin/internal/gen_ximprove.py b/epochX/cudacpp/gg_ttg.mad/bin/internal/gen_ximprove.py index 5fd170d18d..cc842aa50f 100755 --- a/epochX/cudacpp/gg_ttg.mad/bin/internal/gen_ximprove.py +++ b/epochX/cudacpp/gg_ttg.mad/bin/internal/gen_ximprove.py @@ -2,18 +2,18 @@ # # Copyright (c) 2014 The MadGraph5_aMC@NLO Development team and Contributors # -# This file is a part of the MadGraph5_aMC@NLO project, an application which +# This file is a part of the MadGraph5_aMC@NLO project, an application which # automatically generates Feynman diagrams and matrix elements for arbitrary # high-energy processes in the Standard Model and beyond. # -# It is subject to the MadGraph5_aMC@NLO license which should accompany this +# It is subject to the MadGraph5_aMC@NLO license which should accompany this # distribution. # # For more information, visit madgraph.phys.ucl.ac.be and amcatnlo.web.cern.ch # ################################################################################ """ A python file to replace the fortran script gen_ximprove. - This script analyses the result of the survey/ previous refine and + This script analyses the result of the survey/ previous refine and creates the jobs for the following script. """ from __future__ import division @@ -66,77 +66,77 @@ class gensym(object): """a class to call the fortran gensym executable and handle it's output in order to create the various job that are needed for the survey""" - + #convenient shortcut for the formatting of variable @ staticmethod def format_variable(*args): return bannermod.ConfigFile.format_variable(*args) - + combining_job = 2 # number of channel by ajob - splitted_grid = False + splitted_grid = False min_iterations = 3 mode= "survey" - + def __init__(self, cmd, opt=None): - + try: super(gensym, self).__init__(cmd, opt) except TypeError: pass - - # Run statistics, a dictionary of RunStatistics(), with + + # Run statistics, a dictionary of RunStatistics(), with self.run_statistics = {} - + self.cmd = cmd self.run_card = cmd.run_card self.me_dir = cmd.me_dir - - + + # dictionary to keep track of the precision when combining iteration self.cross = collections.defaultdict(int) self.abscross = collections.defaultdict(int) self.sigma = collections.defaultdict(int) self.chi2 = collections.defaultdict(int) - + self.splitted_grid = False if self.cmd.proc_characteristics['loop_induced']: nexternal = self.cmd.proc_characteristics['nexternal'] self.splitted_grid = max(2, (nexternal-2)**2) if hasattr(self.cmd, "opts") and self.cmd.opts['accuracy'] == 0.1: self.cmd.opts['accuracy'] = 0.02 - + if isinstance(cmd.cluster, cluster.MultiCore) and self.splitted_grid > 1: self.splitted_grid = int(cmd.cluster.nb_core**0.5) if self.splitted_grid == 1 and cmd.cluster.nb_core >1: self.splitted_grid = 2 - + #if the user defines it in the run_card: if self.run_card['survey_splitting'] != -1: self.splitted_grid = self.run_card['survey_splitting'] if self.run_card['survey_nchannel_per_job'] != 1 and 'survey_nchannel_per_job' in self.run_card.user_set: - self.combining_job = self.run_card['survey_nchannel_per_job'] + self.combining_job = self.run_card['survey_nchannel_per_job'] elif self.run_card['hard_survey'] > 1: self.combining_job = 1 - - + + self.splitted_Pdir = {} self.splitted_for_dir = lambda x,y: self.splitted_grid self.combining_job_for_Pdir = lambda x: self.combining_job self.lastoffset = {} - + done_warning_zero_coupling = False def get_helicity(self, to_submit=True, clean=True): """launch a single call to madevent to get the list of non zero helicity""" - - self.subproc = [l.strip() for l in open(pjoin(self.me_dir,'SubProcesses', + + self.subproc = [l.strip() for l in open(pjoin(self.me_dir,'SubProcesses', 'subproc.mg'))] subproc = self.subproc P_zero_result = [] nb_tot_proc = len(subproc) - job_list = {} - - + job_list = {} + + for nb_proc,subdir in enumerate(subproc): self.cmd.update_status('Compiling for process %s/%s.' % \ (nb_proc+1,nb_tot_proc), level=None) @@ -154,7 +154,7 @@ def get_helicity(self, to_submit=True, clean=True): p = misc.Popen(['./gensym'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT, cwd=Pdir) #sym_input = "%(points)d %(iterations)d %(accuracy)f \n" % self.opts - + (stdout, _) = p.communicate(''.encode()) stdout = stdout.decode('ascii',errors='ignore') if stdout: @@ -166,11 +166,11 @@ def get_helicity(self, to_submit=True, clean=True): if os.path.exists(pjoin(self.me_dir, 'error')): os.remove(pjoin(self.me_dir, 'error')) continue # bypass bad process - + self.cmd.compile(['madevent_forhel'], cwd=Pdir) if not os.path.exists(pjoin(Pdir, 'madevent_forhel')): - raise Exception('Error make madevent_forhel not successful') - + raise Exception('Error make madevent_forhel not successful') + if not os.path.exists(pjoin(Pdir, 'Hel')): os.mkdir(pjoin(Pdir, 'Hel')) ff = open(pjoin(Pdir, 'Hel', 'input_app.txt'),'w') @@ -180,15 +180,15 @@ def get_helicity(self, to_submit=True, clean=True): try: os.remove(pjoin(Pdir, 'Hel','results.dat')) except Exception: - pass + pass # Launch gensym - p = misc.Popen(['../madevent_forhel < input_app.txt'], stdout=subprocess.PIPE, + p = misc.Popen(['../madevent_forhel < input_app.txt'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT, cwd=pjoin(Pdir,'Hel'), shell=True) #sym_input = "%(points)d %(iterations)d %(accuracy)f \n" % self.opts (stdout, _) = p.communicate(" ".encode()) stdout = stdout.decode('ascii',errors='ignore') if os.path.exists(pjoin(self.me_dir, 'error')): - raise Exception(pjoin(self.me_dir,'error')) + raise Exception(pjoin(self.me_dir,'error')) # note a continue is not enough here, we have in top to link # the matrixX_optim.f to matrixX_orig.f to let the code to work # after this error. @@ -203,7 +203,7 @@ def get_helicity(self, to_submit=True, clean=True): zero_gc = list() all_zampperhel = set() all_bad_amps_perhel = set() - + for line in stdout.splitlines(): if "=" not in line and ":" not in line: continue @@ -229,22 +229,22 @@ def get_helicity(self, to_submit=True, clean=True): "%s\n" % (' '.join(zero_gc)) +\ "This will slow down the computation. Please consider using restricted model:\n" +\ "https://answers.launchpad.net/mg5amcnlo/+faq/2312") - - + + all_good_hels = collections.defaultdict(list) for me_index, hel in all_hel: - all_good_hels[me_index].append(int(hel)) - + all_good_hels[me_index].append(int(hel)) + #print(all_hel) if self.run_card['hel_zeroamp']: all_bad_amps = collections.defaultdict(list) for me_index, amp in all_zamp: all_bad_amps[me_index].append(int(amp)) - + all_bad_amps_perhel = collections.defaultdict(list) for me_index, hel, amp in all_zampperhel: - all_bad_amps_perhel[me_index].append((int(hel),int(amp))) - + all_bad_amps_perhel[me_index].append((int(hel),int(amp))) + elif all_zamp: nb_zero = sum(int(a[1]) for a in all_zamp) if zero_gc: @@ -254,7 +254,7 @@ def get_helicity(self, to_submit=True, clean=True): else: logger.warning("The optimization detected that you have %i zero matrix-element for this SubProcess: %s.\n" % nb_zero +\ "This part can optimize if you set the flag hel_zeroamp to True in the run_card.") - + #check if we need to do something and write associate information" data = [all_hel, all_zamp, all_bad_amps_perhel] if not self.run_card['hel_zeroamp']: @@ -266,14 +266,14 @@ def get_helicity(self, to_submit=True, clean=True): old_data = open(pjoin(Pdir,'Hel','selection')).read() if old_data == data: continue - - + + with open(pjoin(Pdir,'Hel','selection'),'w') as fsock: - fsock.write(data) - - + fsock.write(data) + + for matrix_file in misc.glob('matrix*orig.f', Pdir): - + split_file = matrix_file.split('/') me_index = split_file[-1][len('matrix'):-len('_orig.f')] @@ -289,11 +289,11 @@ def get_helicity(self, to_submit=True, clean=True): #good_hels = sorted(list(good_hels)) good_hels = [str(x) for x in sorted(all_good_hels[me_index])] if self.run_card['hel_zeroamp']: - + bad_amps = [str(x) for x in sorted(all_bad_amps[me_index])] bad_amps_perhel = [x for x in sorted(all_bad_amps_perhel[me_index])] else: - bad_amps = [] + bad_amps = [] bad_amps_perhel = [] if __debug__: mtext = open(matrix_file).read() @@ -310,7 +310,7 @@ def get_helicity(self, to_submit=True, clean=True): recycler.set_input(matrix_file) recycler.set_output(out_file) - recycler.set_template(templ_file) + recycler.set_template(templ_file) recycler.generate_output_file() del recycler @@ -321,19 +321,19 @@ def get_helicity(self, to_submit=True, clean=True): return {}, P_zero_result - + def launch(self, to_submit=True, clean=True): """ """ if not hasattr(self, 'subproc'): - self.subproc = [l.strip() for l in open(pjoin(self.me_dir,'SubProcesses', + self.subproc = [l.strip() for l in open(pjoin(self.me_dir,'SubProcesses', 'subproc.mg'))] subproc = self.subproc - + P_zero_result = [] # check the number of times where they are no phase-space - + nb_tot_proc = len(subproc) - job_list = {} + job_list = {} for nb_proc,subdir in enumerate(subproc): self.cmd.update_status('Compiling for process %s/%s.
(previous processes already running)' % \ (nb_proc+1,nb_tot_proc), level=None) @@ -341,7 +341,7 @@ def launch(self, to_submit=True, clean=True): subdir = subdir.strip() Pdir = pjoin(self.me_dir, 'SubProcesses',subdir) logger.info(' %s ' % subdir) - + # clean previous run if clean: for match in misc.glob('*ajob*', Pdir): @@ -349,17 +349,17 @@ def launch(self, to_submit=True, clean=True): os.remove(match) for match in misc.glob('G*', Pdir): if os.path.exists(pjoin(match,'results.dat')): - os.remove(pjoin(match, 'results.dat')) + os.remove(pjoin(match, 'results.dat')) if os.path.exists(pjoin(match, 'ftn25')): - os.remove(pjoin(match, 'ftn25')) - + os.remove(pjoin(match, 'ftn25')) + #compile gensym self.cmd.compile(['gensym'], cwd=Pdir) if not os.path.exists(pjoin(Pdir, 'gensym')): - raise Exception('Error make gensym not successful') - + raise Exception('Error make gensym not successful') + # Launch gensym - p = misc.Popen(['./gensym'], stdout=subprocess.PIPE, + p = misc.Popen(['./gensym'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT, cwd=Pdir) #sym_input = "%(points)d %(iterations)d %(accuracy)f \n" % self.opts (stdout, _) = p.communicate(''.encode()) @@ -367,8 +367,8 @@ def launch(self, to_submit=True, clean=True): if os.path.exists(pjoin(self.me_dir,'error')): files.mv(pjoin(self.me_dir,'error'), pjoin(Pdir,'ajob.no_ps.log')) P_zero_result.append(subdir) - continue - + continue + jobs = stdout.split() job_list[Pdir] = jobs try: @@ -386,8 +386,8 @@ def launch(self, to_submit=True, clean=True): continue else: if done: - raise Exception('Parsing error in gensym: %s' % stdout) - job_list[Pdir] = l.split() + raise Exception('Parsing error in gensym: %s' % stdout) + job_list[Pdir] = l.split() done = True if not done: raise Exception('Parsing error in gensym: %s' % stdout) @@ -408,16 +408,16 @@ def launch(self, to_submit=True, clean=True): if to_submit: self.submit_to_cluster(job_list) job_list = {} - + return job_list, P_zero_result - + def resubmit(self, min_precision=1.0, resubmit_zero=False): """collect the result of the current run and relaunch each channel - not completed or optionally a completed one with a precision worse than + not completed or optionally a completed one with a precision worse than a threshold (and/or the zero result channel)""" - + job_list, P_zero_result = self.launch(to_submit=False, clean=False) - + for P , jobs in dict(job_list).items(): misc.sprint(jobs) to_resub = [] @@ -434,7 +434,7 @@ def resubmit(self, min_precision=1.0, resubmit_zero=False): elif max(one_result.xerru, one_result.xerrc)/one_result.xsec > min_precision: to_resub.append(job) else: - to_resub.append(job) + to_resub.append(job) if to_resub: for G in to_resub: try: @@ -442,19 +442,19 @@ def resubmit(self, min_precision=1.0, resubmit_zero=False): except Exception as error: misc.sprint(error) pass - misc.sprint(to_resub) + misc.sprint(to_resub) self.submit_to_cluster({P: to_resub}) - - - - - - - - - - - + + + + + + + + + + + def submit_to_cluster(self, job_list): """ """ @@ -467,7 +467,7 @@ def submit_to_cluster(self, job_list): nexternal = self.cmd.proc_characteristics['nexternal'] current = open(pjoin(path, "nexternal.inc")).read() ext = re.search(r"PARAMETER \(NEXTERNAL=(\d+)\)", current).group(1) - + if self.run_card['job_strategy'] == 2: self.splitted_grid = 2 if nexternal == int(ext): @@ -498,18 +498,18 @@ def submit_to_cluster(self, job_list): return self.submit_to_cluster_no_splitting(job_list) else: return self.submit_to_cluster_splitted(job_list) - - + + def submit_to_cluster_no_splitting(self, job_list): """submit the survey without the parralelization. This is the old mode which is still usefull in single core""" - - # write the template file for the parameter file + + # write the template file for the parameter file self.write_parameter(parralelization=False, Pdirs=list(job_list.keys())) - - + + # launch the job with the appropriate grouping - for Pdir, jobs in job_list.items(): + for Pdir, jobs in job_list.items(): jobs = list(jobs) i=0 while jobs: @@ -518,16 +518,16 @@ def submit_to_cluster_no_splitting(self, job_list): for _ in range(self.combining_job_for_Pdir(Pdir)): if jobs: to_submit.append(jobs.pop(0)) - + self.cmd.launch_job(pjoin(self.me_dir, 'SubProcesses', 'survey.sh'), argument=to_submit, cwd=pjoin(self.me_dir,'SubProcesses' , Pdir)) - + def create_resubmit_one_iter(self, Pdir, G, submit_ps, nb_job, step=0): """prepare the input_file for submitting the channel""" - + if 'SubProcesses' not in Pdir: Pdir = pjoin(self.me_dir, 'SubProcesses', Pdir) @@ -535,8 +535,8 @@ def create_resubmit_one_iter(self, Pdir, G, submit_ps, nb_job, step=0): self.splitted_Pdir[(Pdir, G)] = int(nb_job) - # 1. write the new input_app.txt - run_card = self.cmd.run_card + # 1. write the new input_app.txt + run_card = self.cmd.run_card options = {'event' : submit_ps, 'maxiter': 1, 'miniter': 1, @@ -545,29 +545,29 @@ def create_resubmit_one_iter(self, Pdir, G, submit_ps, nb_job, step=0): else run_card['nhel'], 'gridmode': -2, 'channel' : G - } - + } + Gdir = pjoin(Pdir, 'G%s' % G) - self.write_parameter_file(pjoin(Gdir, 'input_app.txt'), options) - + self.write_parameter_file(pjoin(Gdir, 'input_app.txt'), options) + # 2. check that ftn25 exists. - assert os.path.exists(pjoin(Gdir, "ftn25")) - - + assert os.path.exists(pjoin(Gdir, "ftn25")) + + # 3. Submit the new jobs #call back function - packet = cluster.Packet((Pdir, G, step+1), + packet = cluster.Packet((Pdir, G, step+1), self.combine_iteration, (Pdir, G, step+1)) - + if step ==0: - self.lastoffset[(Pdir, G)] = 0 - - # resubmit the new jobs + self.lastoffset[(Pdir, G)] = 0 + + # resubmit the new jobs for i in range(int(nb_job)): name = "G%s_%s" % (G,i+1) self.lastoffset[(Pdir, G)] += 1 - offset = self.lastoffset[(Pdir, G)] + offset = self.lastoffset[(Pdir, G)] self.cmd.launch_job(pjoin(self.me_dir, 'SubProcesses', 'refine_splitted.sh'), argument=[name, 'G%s'%G, offset], cwd= Pdir, @@ -575,9 +575,9 @@ def create_resubmit_one_iter(self, Pdir, G, submit_ps, nb_job, step=0): def submit_to_cluster_splitted(self, job_list): - """ submit the version of the survey with splitted grid creation - """ - + """ submit the version of the survey with splitted grid creation + """ + #if self.splitted_grid <= 1: # return self.submit_to_cluster_no_splitting(job_list) @@ -592,7 +592,7 @@ def submit_to_cluster_splitted(self, job_list): for job in jobs: packet = cluster.Packet((Pdir, job, 1), self.combine_iteration, (Pdir, job, 1)) - for i in range(self.splitted_for_dir(Pdir, job)): + for i in range(self.splitted_for_dir(Pdir, job)): self.cmd.launch_job(pjoin(self.me_dir, 'SubProcesses', 'survey.sh'), argument=[i+1, job], cwd=pjoin(self.me_dir,'SubProcesses' , Pdir), @@ -601,15 +601,15 @@ def submit_to_cluster_splitted(self, job_list): def combine_iteration(self, Pdir, G, step): grid_calculator, cross, error = self.combine_grid(Pdir, G, step) - - # Compute the number of events used for this run. + + # Compute the number of events used for this run. nb_events = grid_calculator.target_evt Gdirs = [] #build the the list of directory for i in range(self.splitted_for_dir(Pdir, G)): path = pjoin(Pdir, "G%s_%s" % (G, i+1)) Gdirs.append(path) - + # 4. make the submission of the next iteration # Three cases - less than 3 iteration -> continue # - more than 3 and less than 5 -> check error @@ -627,15 +627,15 @@ def combine_iteration(self, Pdir, G, step): need_submit = False else: need_submit = True - + elif step >= self.cmd.opts['iterations']: need_submit = False elif self.cmd.opts['accuracy'] < 0: #check for luminosity raise Exception("Not Implemented") elif self.abscross[(Pdir,G)] == 0: - need_submit = False - else: + need_submit = False + else: across = self.abscross[(Pdir,G)]/(self.sigma[(Pdir,G)]+1e-99) tot_across = self.get_current_axsec() if across == 0: @@ -646,20 +646,20 @@ def combine_iteration(self, Pdir, G, step): need_submit = True else: need_submit = False - - + + if cross: grid_calculator.write_grid_for_submission(Pdir,G, self.splitted_for_dir(Pdir, G), nb_events,mode=self.mode, conservative_factor=5.0) - - xsec_format = '.%ig'%(max(3,int(math.log10(1.0/float(error)))+2) - if float(cross)!=0.0 and float(error)!=0.0 else 8) + + xsec_format = '.%ig'%(max(3,int(math.log10(1.0/float(error)))+2) + if float(cross)!=0.0 and float(error)!=0.0 else 8) if need_submit: message = "%%s/G%%s is at %%%s +- %%.3g pb. Now submitting iteration #%s."%(xsec_format, step+1) logger.info(message%\ - (os.path.basename(Pdir), G, float(cross), + (os.path.basename(Pdir), G, float(cross), float(error)*float(cross))) self.resubmit_survey(Pdir,G, Gdirs, step) elif cross: @@ -670,26 +670,26 @@ def combine_iteration(self, Pdir, G, step): newGpath = pjoin(self.me_dir,'SubProcesses' , Pdir, 'G%s' % G) if not os.path.exists(newGpath): os.mkdir(newGpath) - + # copy the new grid: - files.cp(pjoin(Gdirs[0], 'ftn25'), + files.cp(pjoin(Gdirs[0], 'ftn25'), pjoin(self.me_dir,'SubProcesses' , Pdir, 'G%s' % G, 'ftn26')) - + # copy the events fsock = open(pjoin(newGpath, 'events.lhe'), 'w') for Gdir in Gdirs: - fsock.write(open(pjoin(Gdir, 'events.lhe')).read()) - + fsock.write(open(pjoin(Gdir, 'events.lhe')).read()) + # copy one log - files.cp(pjoin(Gdirs[0], 'log.txt'), + files.cp(pjoin(Gdirs[0], 'log.txt'), pjoin(self.me_dir,'SubProcesses' , Pdir, 'G%s' % G)) - - + + # create the appropriate results.dat self.write_results(grid_calculator, cross, error, Pdir, G, step) else: logger.info("Survey finished for %s/G%s [0 cross]", os.path.basename(Pdir),G) - + Gdir = pjoin(self.me_dir,'SubProcesses' , Pdir, 'G%s' % G) if not os.path.exists(Gdir): os.mkdir(Gdir) @@ -697,21 +697,21 @@ def combine_iteration(self, Pdir, G, step): files.cp(pjoin(Gdirs[0], 'log.txt'), Gdir) # create the appropriate results.dat self.write_results(grid_calculator, cross, error, Pdir, G, step) - + return 0 def combine_grid(self, Pdir, G, step, exclude_sub_jobs=[]): """ exclude_sub_jobs is to remove some of the subjobs if a numerical issue is detected in one of them. Warning is issue when this occurs. """ - + # 1. create an object to combine the grid information and fill it grid_calculator = combine_grid.grid_information(self.run_card['nhel']) - + for i in range(self.splitted_for_dir(Pdir, G)): if i in exclude_sub_jobs: continue - path = pjoin(Pdir, "G%s_%s" % (G, i+1)) + path = pjoin(Pdir, "G%s_%s" % (G, i+1)) fsock = misc.mult_try_open(pjoin(path, 'results.dat')) one_result = grid_calculator.add_results_information(fsock) fsock.close() @@ -723,9 +723,9 @@ def combine_grid(self, Pdir, G, step, exclude_sub_jobs=[]): fsock.close() os.remove(pjoin(path, 'results.dat')) #os.remove(pjoin(path, 'grid_information')) - - - + + + #2. combine the information about the total crossection / error # start by keep the interation in memory cross, across, sigma = grid_calculator.get_cross_section() @@ -736,12 +736,12 @@ def combine_grid(self, Pdir, G, step, exclude_sub_jobs=[]): if maxwgt: nunwgt = grid_calculator.get_nunwgt(maxwgt) # Make sure not to apply the security below during the first step of the - # survey. Also, disregard channels with a contribution relative to the + # survey. Also, disregard channels with a contribution relative to the # total cross-section smaller than 1e-8 since in this case it is unlikely # that this channel will need more than 1 event anyway. apply_instability_security = False rel_contrib = 0.0 - if (self.__class__ != gensym or step > 1): + if (self.__class__ != gensym or step > 1): Pdir_across = 0.0 Gdir_across = 0.0 for (mPdir,mG) in self.abscross.keys(): @@ -750,7 +750,7 @@ def combine_grid(self, Pdir, G, step, exclude_sub_jobs=[]): (self.sigma[(mPdir,mG)]+1e-99)) if mG == G: Gdir_across += (self.abscross[(mPdir,mG)]/ - (self.sigma[(mPdir,mG)]+1e-99)) + (self.sigma[(mPdir,mG)]+1e-99)) rel_contrib = abs(Gdir_across/(Pdir_across+1e-99)) if rel_contrib > (1.0e-8) and \ nunwgt < 2 and len(grid_calculator.results) > 1: @@ -770,14 +770,14 @@ def combine_grid(self, Pdir, G, step, exclude_sub_jobs=[]): exclude_sub_jobs = list(exclude_sub_jobs) exclude_sub_jobs.append(th_maxwgt[-1][1]) grid_calculator.results.run_statistics['skipped_subchannel'] += 1 - + # Add some monitoring of the problematic events - gPath = pjoin(Pdir, "G%s_%s" % (G, th_maxwgt[-1][1]+1)) + gPath = pjoin(Pdir, "G%s_%s" % (G, th_maxwgt[-1][1]+1)) if os.path.isfile(pjoin(gPath,'events.lhe')): lhe_file = lhe_parser.EventFile(pjoin(gPath,'events.lhe')) discardedPath = pjoin(Pdir,'DiscardedUnstableEvents') if not os.path.exists(discardedPath): - os.mkdir(discardedPath) + os.mkdir(discardedPath) if os.path.isdir(discardedPath): # Keep only the event with a maximum weight, as it surely # is the problematic one. @@ -790,10 +790,10 @@ def combine_grid(self, Pdir, G, step, exclude_sub_jobs=[]): lhe_file.close() evtRecord.write(pjoin(gPath,'events.lhe').read()) evtRecord.close() - + return self.combine_grid(Pdir, G, step, exclude_sub_jobs) - + if across !=0: if sigma != 0: self.cross[(Pdir,G)] += cross**3/sigma**2 @@ -814,10 +814,10 @@ def combine_grid(self, Pdir, G, step, exclude_sub_jobs=[]): self.chi2[(Pdir,G)] = 0 cross = self.cross[(Pdir,G)] error = 0 - + else: error = 0 - + grid_calculator.results.compute_values(update_statistics=True) if (str(os.path.basename(Pdir)), G) in self.run_statistics: self.run_statistics[(str(os.path.basename(Pdir)), G)]\ @@ -825,8 +825,8 @@ def combine_grid(self, Pdir, G, step, exclude_sub_jobs=[]): else: self.run_statistics[(str(os.path.basename(Pdir)), G)] = \ grid_calculator.results.run_statistics - - self.warnings_from_statistics(G, grid_calculator.results.run_statistics) + + self.warnings_from_statistics(G, grid_calculator.results.run_statistics) stats_msg = grid_calculator.results.run_statistics.nice_output( '/'.join([os.path.basename(Pdir),'G%s'%G])) @@ -836,7 +836,7 @@ def combine_grid(self, Pdir, G, step, exclude_sub_jobs=[]): # Clean up grid_information to avoid border effects in case of a crash for i in range(self.splitted_for_dir(Pdir, G)): path = pjoin(Pdir, "G%s_%s" % (G, i+1)) - try: + try: os.remove(pjoin(path, 'grid_information')) except OSError as oneerror: if oneerror.errno != 2: @@ -850,7 +850,7 @@ def warnings_from_statistics(self,G,stats): return EPS_fraction = float(stats['exceptional_points'])/stats['n_madloop_calls'] - + msg = "Channel %s has encountered a fraction of %.3g\n"+ \ "of numerically unstable loop matrix element computations\n"+\ "(which could not be rescued using quadruple precision).\n"+\ @@ -861,16 +861,16 @@ def warnings_from_statistics(self,G,stats): elif EPS_fraction > 0.01: logger.critical((msg%(G,EPS_fraction)).replace('might', 'can')) raise Exception((msg%(G,EPS_fraction)).replace('might', 'can')) - + def get_current_axsec(self): - + across = 0 for (Pdir,G) in self.abscross: across += self.abscross[(Pdir,G)]/(self.sigma[(Pdir,G)]+1e-99) return across - + def write_results(self, grid_calculator, cross, error, Pdir, G, step): - + #compute the value if cross == 0: abscross,nw, luminosity = 0, 0, 0 @@ -888,7 +888,7 @@ def write_results(self, grid_calculator, cross, error, Pdir, G, step): maxwgt = grid_calculator.get_max_wgt() nunwgt = grid_calculator.get_nunwgt() luminosity = nunwgt/cross - + #format the results.dat def fstr(nb): data = '%E' % nb @@ -897,20 +897,20 @@ def fstr(nb): power = int(power) + 1 return '%.5fE%+03i' %(nb,power) line = '%s %s %s %i %i %i %i %s %s %s %s 0.0 0\n' % \ - (fstr(cross), fstr(error*cross), fstr(error*cross), + (fstr(cross), fstr(error*cross), fstr(error*cross), nevents, nw, maxit,nunwgt, fstr(luminosity), fstr(wgt), fstr(abscross), fstr(maxwgt)) - + fsock = open(pjoin(self.me_dir,'SubProcesses' , Pdir, 'G%s' % G, - 'results.dat'),'w') + 'results.dat'),'w') fsock.writelines(line) fsock.close() - + def resubmit_survey(self, Pdir, G, Gdirs, step): """submit the next iteration of the survey""" # 1. write the new input_app.txt to double the number of points - run_card = self.cmd.run_card + run_card = self.cmd.run_card options = {'event' : 2**(step) * self.cmd.opts['points'] / self.splitted_grid, 'maxiter': 1, 'miniter': 1, @@ -919,18 +919,18 @@ def resubmit_survey(self, Pdir, G, Gdirs, step): else run_card['nhel'], 'gridmode': -2, 'channel' : '' - } - + } + if int(options['helicity']) == 1: options['event'] = options['event'] * 2**(self.cmd.proc_characteristics['nexternal']//3) - + for Gdir in Gdirs: - self.write_parameter_file(pjoin(Gdir, 'input_app.txt'), options) - - + self.write_parameter_file(pjoin(Gdir, 'input_app.txt'), options) + + #2. resubmit the new jobs packet = cluster.Packet((Pdir, G, step+1), self.combine_iteration, \ - (Pdir, G, step+1)) + (Pdir, G, step+1)) nb_step = len(Gdirs) * (step+1) for i,subdir in enumerate(Gdirs): subdir = subdir.rsplit('_',1)[1] @@ -938,34 +938,34 @@ def resubmit_survey(self, Pdir, G, Gdirs, step): offset = nb_step+i+1 offset=str(offset) tag = "%s.%s" % (subdir, offset) - + self.cmd.launch_job(pjoin(self.me_dir, 'SubProcesses', 'survey.sh'), argument=[tag, G], cwd=pjoin(self.me_dir,'SubProcesses' , Pdir), packet_member=packet) - + def write_parameter_file(self, path, options): """ """ - + template =""" %(event)s %(maxiter)s %(miniter)s !Number of events and max and min iterations %(accuracy)s !Accuracy %(gridmode)s !Grid Adjustment 0=none, 2=adjust 1 !Suppress Amplitude 1=yes %(helicity)s !Helicity Sum/event 0=exact - %(channel)s """ + %(channel)s """ options['event'] = int(options['event']) open(path, 'w').write(template % options) - - + + def write_parameter(self, parralelization, Pdirs=None): """Write the parameter of the survey run""" run_card = self.cmd.run_card - + options = {'event' : self.cmd.opts['points'], 'maxiter': self.cmd.opts['iterations'], 'miniter': self.min_iterations, @@ -975,36 +975,36 @@ def write_parameter(self, parralelization, Pdirs=None): 'gridmode': 2, 'channel': '' } - + if int(options['helicity'])== 1: options['event'] = options['event'] * 2**(self.cmd.proc_characteristics['nexternal']//3) - + if parralelization: options['gridmode'] = -2 options['maxiter'] = 1 #this is automatic in dsample anyway options['miniter'] = 1 #this is automatic in dsample anyway options['event'] /= self.splitted_grid - + if not Pdirs: Pdirs = self.subproc - + for Pdir in Pdirs: - path =pjoin(Pdir, 'input_app.txt') + path =pjoin(Pdir, 'input_app.txt') self.write_parameter_file(path, options) - - -class gen_ximprove(object): - - + + +class gen_ximprove(object): + + # some hardcoded value which impact the generation gen_events_security = 1.2 # multiply the number of requested event by this number for security combining_job = 0 # allow to run multiple channel in sequence - max_request_event = 1000 # split jobs if a channel if it needs more than that + max_request_event = 1000 # split jobs if a channel if it needs more than that max_event_in_iter = 5000 min_event_in_iter = 1000 - max_splitting = 130 # maximum duplication of a given channel - min_iter = 3 + max_splitting = 130 # maximum duplication of a given channel + min_iter = 3 max_iter = 9 keep_grid_for_refine = False # only apply if needed to split the job @@ -1022,7 +1022,7 @@ def __new__(cls, cmd, opt): return super(gen_ximprove, cls).__new__(gen_ximprove_gridpack) elif cls.force_class == 'loop_induced': return super(gen_ximprove, cls).__new__(gen_ximprove_share) - + if cmd.proc_characteristics['loop_induced']: return super(gen_ximprove, cls).__new__(gen_ximprove_share) elif gen_ximprove.format_variable(cmd.run_card['gridpack'], bool): @@ -1031,31 +1031,31 @@ def __new__(cls, cmd, opt): return super(gen_ximprove, cls).__new__(gen_ximprove_share) else: return super(gen_ximprove, cls).__new__(gen_ximprove_v4) - - + + def __init__(self, cmd, opt=None): - + try: super(gen_ximprove, self).__init__(cmd, opt) except TypeError: pass - + self.run_statistics = {} self.cmd = cmd self.run_card = cmd.run_card run_card = self.run_card self.me_dir = cmd.me_dir - + #extract from the run_card the information that we need. self.gridpack = run_card['gridpack'] self.nhel = run_card['nhel'] if "nhel_refine" in run_card: self.nhel = run_card["nhel_refine"] - + if self.run_card['refine_evt_by_job'] != -1: self.max_request_event = run_card['refine_evt_by_job'] - - + + # Default option for the run self.gen_events = True self.parralel = False @@ -1066,7 +1066,7 @@ def __init__(self, cmd, opt=None): # parameter for the gridpack run self.nreq = 2000 self.iseed = 4321 - + # placeholder for information self.results = 0 #updated in launch/update_html @@ -1074,16 +1074,16 @@ def __init__(self, cmd, opt=None): self.configure(opt) elif isinstance(opt, bannermod.GridpackCard): self.configure_gridpack(opt) - + def __call__(self): return self.launch() - + def launch(self): - """running """ - + """running """ + #start the run self.handle_seed() - self.results = sum_html.collect_result(self.cmd, + self.results = sum_html.collect_result(self.cmd, main_dir=pjoin(self.cmd.me_dir,'SubProcesses')) #main_dir is for gridpack readonly mode if self.gen_events: # We run to provide a given number of events @@ -1095,15 +1095,15 @@ def launch(self): def configure(self, opt): """Defines some parameter of the run""" - + for key, value in opt.items(): if key in self.__dict__: targettype = type(getattr(self, key)) setattr(self, key, self.format_variable(value, targettype, key)) else: raise Exception('%s not define' % key) - - + + # special treatment always do outside the loop to avoid side effect if 'err_goal' in opt: if self.err_goal < 1: @@ -1113,24 +1113,24 @@ def configure(self, opt): logger.info("Generating %s unweighted events." % self.err_goal) self.gen_events = True self.err_goal = self.err_goal * self.gen_events_security # security - + def handle_seed(self): """not needed but for gridpack --which is not handle here for the moment""" return - - + + def find_job_for_event(self): """return the list of channel that need to be improved""" - + assert self.err_goal >=1 self.err_goal = int(self.err_goal) - - goal_lum = self.err_goal/(self.results.axsec+1e-99) #pb^-1 + + goal_lum = self.err_goal/(self.results.axsec+1e-99) #pb^-1 logger.info('Effective Luminosity %s pb^-1', goal_lum) - + all_channels = sum([list(P) for P in self.results],[]) - all_channels.sort(key= lambda x:x.get('luminosity'), reverse=True) - + all_channels.sort(key= lambda x:x.get('luminosity'), reverse=True) + to_refine = [] for C in all_channels: if C.get('axsec') == 0: @@ -1141,61 +1141,61 @@ def find_job_for_event(self): elif C.get('xerr') > max(C.get('axsec'), (1/(100*math.sqrt(self.err_goal)))*all_channels[-1].get('axsec')): to_refine.append(C) - - logger.info('need to improve %s channels' % len(to_refine)) + + logger.info('need to improve %s channels' % len(to_refine)) return goal_lum, to_refine def update_html(self): """update the html from this object since it contains all the information""" - + run = self.cmd.results.current['run_name'] if not os.path.exists(pjoin(self.cmd.me_dir, 'HTML', run)): os.mkdir(pjoin(self.cmd.me_dir, 'HTML', run)) - + unit = self.cmd.results.unit - P_text = "" - if self.results: - Presults = self.results + P_text = "" + if self.results: + Presults = self.results else: self.results = sum_html.collect_result(self.cmd, None) Presults = self.results - + for P_comb in Presults: - P_text += P_comb.get_html(run, unit, self.cmd.me_dir) - - Presults.write_results_dat(pjoin(self.cmd.me_dir,'SubProcesses', 'results.dat')) - + P_text += P_comb.get_html(run, unit, self.cmd.me_dir) + + Presults.write_results_dat(pjoin(self.cmd.me_dir,'SubProcesses', 'results.dat')) + fsock = open(pjoin(self.cmd.me_dir, 'HTML', run, 'results.html'),'w') fsock.write(sum_html.results_header) fsock.write('%s
' % Presults.get_html(run, unit, self.cmd.me_dir)) - fsock.write('%s
' % P_text) - + fsock.write('%s ' % P_text) + self.cmd.results.add_detail('cross', Presults.xsec) - self.cmd.results.add_detail('error', Presults.xerru) - - return Presults.xsec, Presults.xerru + self.cmd.results.add_detail('error', Presults.xerru) + + return Presults.xsec, Presults.xerru + - class gen_ximprove_v4(gen_ximprove): - + # some hardcoded value which impact the generation gen_events_security = 1.2 # multiply the number of requested event by this number for security combining_job = 0 # allow to run multiple channel in sequence - max_request_event = 1000 # split jobs if a channel if it needs more than that + max_request_event = 1000 # split jobs if a channel if it needs more than that max_event_in_iter = 5000 min_event_in_iter = 1000 - max_splitting = 130 # maximum duplication of a given channel - min_iter = 3 + max_splitting = 130 # maximum duplication of a given channel + min_iter = 3 max_iter = 9 keep_grid_for_refine = False # only apply if needed to split the job - def __init__(self, cmd, opt=None): - + def __init__(self, cmd, opt=None): + super(gen_ximprove_v4, self).__init__(cmd, opt) - + if cmd.opts['accuracy'] < cmd._survey_options['accuracy'][1]: self.increase_precision(cmd._survey_options['accuracy'][1]/cmd.opts['accuracy']) @@ -1203,7 +1203,7 @@ def reset_multijob(self): for path in misc.glob(pjoin('*', '*','multijob.dat'), pjoin(self.me_dir, 'SubProcesses')): open(path,'w').write('0\n') - + def write_multijob(self, Channel, nb_split): """ """ if nb_split <=1: @@ -1211,7 +1211,7 @@ def write_multijob(self, Channel, nb_split): f = open(pjoin(self.me_dir, 'SubProcesses', Channel.get('name'), 'multijob.dat'), 'w') f.write('%i\n' % nb_split) f.close() - + def increase_precision(self, rate=3): #misc.sprint(rate) if rate < 3: @@ -1222,25 +1222,25 @@ def increase_precision(self, rate=3): rate = rate -2 self.max_event_in_iter = int((rate+1) * 10000) self.min_events = int(rate+2) * 2500 - self.gen_events_security = 1 + 0.1 * (rate+2) - + self.gen_events_security = 1 + 0.1 * (rate+2) + if int(self.nhel) == 1: self.min_event_in_iter *= 2**(self.cmd.proc_characteristics['nexternal']//3) self.max_event_in_iter *= 2**(self.cmd.proc_characteristics['nexternal']//2) - - + + alphabet = "abcdefghijklmnopqrstuvwxyz" def get_job_for_event(self): """generate the script in order to generate a given number of event""" # correspond to write_gen in the fortran version - - + + goal_lum, to_refine = self.find_job_for_event() #reset the potential multijob of previous run self.reset_multijob() - + jobs = [] # list of the refine if some job are split is list of # dict with the parameter of the run. @@ -1257,17 +1257,17 @@ def get_job_for_event(self): else: for i in range(len(to_refine) //3): new_order.append(to_refine[i]) - new_order.append(to_refine[-2*i-1]) + new_order.append(to_refine[-2*i-1]) new_order.append(to_refine[-2*i-2]) if len(to_refine) % 3 == 1: - new_order.append(to_refine[i+1]) + new_order.append(to_refine[i+1]) elif len(to_refine) % 3 == 2: - new_order.append(to_refine[i+2]) + new_order.append(to_refine[i+2]) #ensure that the reordering is done nicely assert set([id(C) for C in to_refine]) == set([id(C) for C in new_order]) - to_refine = new_order - - + to_refine = new_order + + # loop over the channel to refine for C in to_refine: #1. Compute the number of points are needed to reach target @@ -1279,7 +1279,7 @@ def get_job_for_event(self): nb_split = self.max_splitting nb_split=max(1, nb_split) - + #2. estimate how many points we need in each iteration if C.get('nunwgt') > 0: nevents = needed_event / nb_split * (C.get('nevents') / C.get('nunwgt')) @@ -1296,21 +1296,21 @@ def get_job_for_event(self): nevents = max(self.min_event_in_iter, min(self.max_event_in_iter, nevents)) logger.debug("%s : need %s event. Need %s split job of %s points", C.name, needed_event, nb_split, nevents) - + # write the multi-job information self.write_multijob(C, nb_split) - + packet = cluster.Packet((C.parent_name, C.name), combine_runs.CombineRuns, (pjoin(self.me_dir, 'SubProcesses', C.parent_name)), {"subproc": C.name, "nb_split":nb_split}) - - + + #create the info dict assume no splitting for the default info = {'name': self.cmd.results.current['run_name'], 'script_name': 'unknown', 'directory': C.name, # need to be change for splitted job - 'P_dir': C.parent_name, + 'P_dir': C.parent_name, 'Ppath': pjoin(self.cmd.me_dir, 'SubProcesses', C.parent_name), 'offset': 1, # need to be change for splitted job 'nevents': nevents, @@ -1321,7 +1321,7 @@ def get_job_for_event(self): 'channel': C.name.replace('G',''), 'grid_refinment' : 0, #no refinment of the grid 'base_directory': '', #should be change in splitted job if want to keep the grid - 'packet': packet, + 'packet': packet, } if nb_split == 1: @@ -1334,19 +1334,19 @@ def get_job_for_event(self): if self.keep_grid_for_refine: new_info['base_directory'] = info['directory'] jobs.append(new_info) - - self.create_ajob(pjoin(self.me_dir, 'SubProcesses', 'refine.sh'), jobs) - + + self.create_ajob(pjoin(self.me_dir, 'SubProcesses', 'refine.sh'), jobs) + def create_ajob(self, template, jobs, write_dir=None): """create the ajob""" - + if not jobs: return if not write_dir: write_dir = pjoin(self.me_dir, 'SubProcesses') - + #filter the job according to their SubProcess directory # no mix submition P2job= collections.defaultdict(list) for j in jobs: @@ -1355,11 +1355,11 @@ def create_ajob(self, template, jobs, write_dir=None): for P in P2job.values(): self.create_ajob(template, P, write_dir) return - - + + #Here we can assume that all job are for the same directory. path = pjoin(write_dir, jobs[0]['P_dir']) - + template_text = open(template, 'r').read() # special treatment if needed to combine the script # computes how many submition miss one job @@ -1384,8 +1384,8 @@ def create_ajob(self, template, jobs, write_dir=None): skip1=0 combining_job =1 nb_sub = len(jobs) - - + + nb_use = 0 for i in range(nb_sub): script_number = i+1 @@ -1404,14 +1404,14 @@ def create_ajob(self, template, jobs, write_dir=None): info["base_directory"] = "./" fsock.write(template_text % info) nb_use += nb_job - + fsock.close() return script_number def get_job_for_precision(self): """create the ajob to achieve a give precision on the total cross-section""" - + assert self.err_goal <=1 xtot = abs(self.results.xsec) logger.info("Working on precision: %s %%" %(100*self.err_goal)) @@ -1428,46 +1428,46 @@ def get_job_for_precision(self): rerr *=rerr if not len(to_refine): return - - # change limit since most don't contribute + + # change limit since most don't contribute limit = math.sqrt((self.err_goal * xtot)**2 - rerr/math.sqrt(len(to_refine))) for C in to_refine[:]: cerr = C.mfactor*(C.xerru + len(to_refine)*C.xerrc) if cerr < limit: to_refine.remove(C) - + # all the channel are now selected. create the channel information logger.info('need to improve %s channels' % len(to_refine)) - + jobs = [] # list of the refine if some job are split is list of # dict with the parameter of the run. # loop over the channel to refine for C in to_refine: - + #1. Determine how many events we need in each iteration yerr = C.mfactor*(C.xerru+len(to_refine)*C.xerrc) nevents = 0.2*C.nevents*(yerr/limit)**2 - + nb_split = int((nevents*(C.nunwgt/C.nevents)/self.max_request_event/ (2**self.min_iter-1))**(2/3)) nb_split = max(nb_split, 1) - # **(2/3) to slow down the increase in number of jobs + # **(2/3) to slow down the increase in number of jobs if nb_split > self.max_splitting: nb_split = self.max_splitting - + if nb_split >1: nevents = nevents / nb_split self.write_multijob(C, nb_split) # forbid too low/too large value nevents = min(self.min_event_in_iter, max(self.max_event_in_iter, nevents)) - - + + #create the info dict assume no splitting for the default info = {'name': self.cmd.results.current['run_name'], 'script_name': 'unknown', 'directory': C.name, # need to be change for splitted job - 'P_dir': C.parent_name, + 'P_dir': C.parent_name, 'Ppath': pjoin(self.cmd.me_dir, 'SubProcesses', C.parent_name), 'offset': 1, # need to be change for splitted job 'nevents': nevents, @@ -1487,38 +1487,38 @@ def get_job_for_precision(self): new_info['offset'] = i+1 new_info['directory'] += self.alphabet[i % 26] + str((i+1)//26) jobs.append(new_info) - self.create_ajob(pjoin(self.me_dir, 'SubProcesses', 'refine.sh'), jobs) - + self.create_ajob(pjoin(self.me_dir, 'SubProcesses', 'refine.sh'), jobs) + def update_html(self): """update the html from this object since it contains all the information""" - + run = self.cmd.results.current['run_name'] if not os.path.exists(pjoin(self.cmd.me_dir, 'HTML', run)): os.mkdir(pjoin(self.cmd.me_dir, 'HTML', run)) - + unit = self.cmd.results.unit - P_text = "" - if self.results: - Presults = self.results + P_text = "" + if self.results: + Presults = self.results else: self.results = sum_html.collect_result(self.cmd, None) Presults = self.results - + for P_comb in Presults: - P_text += P_comb.get_html(run, unit, self.cmd.me_dir) - - Presults.write_results_dat(pjoin(self.cmd.me_dir,'SubProcesses', 'results.dat')) - + P_text += P_comb.get_html(run, unit, self.cmd.me_dir) + + Presults.write_results_dat(pjoin(self.cmd.me_dir,'SubProcesses', 'results.dat')) + fsock = open(pjoin(self.cmd.me_dir, 'HTML', run, 'results.html'),'w') fsock.write(sum_html.results_header) fsock.write('%s
' % Presults.get_html(run, unit, self.cmd.me_dir)) - fsock.write('%s
' % P_text) - + fsock.write('%s ' % P_text) + self.cmd.results.add_detail('cross', Presults.xsec) - self.cmd.results.add_detail('error', Presults.xerru) - - return Presults.xsec, Presults.xerru + self.cmd.results.add_detail('error', Presults.xerru) + + return Presults.xsec, Presults.xerru @@ -1528,27 +1528,27 @@ class gen_ximprove_v4_nogridupdate(gen_ximprove_v4): # some hardcoded value which impact the generation gen_events_security = 1.1 # multiply the number of requested event by this number for security combining_job = 0 # allow to run multiple channel in sequence - max_request_event = 400 # split jobs if a channel if it needs more than that + max_request_event = 400 # split jobs if a channel if it needs more than that max_event_in_iter = 500 min_event_in_iter = 250 - max_splitting = 260 # maximum duplication of a given channel - min_iter = 2 + max_splitting = 260 # maximum duplication of a given channel + min_iter = 2 max_iter = 6 keep_grid_for_refine = True - def __init__(self, cmd, opt=None): - + def __init__(self, cmd, opt=None): + gen_ximprove.__init__(cmd, opt) - + if cmd.proc_characteristics['loopinduced'] and \ cmd.proc_characteristics['nexternal'] > 2: self.increase_parralelization(cmd.proc_characteristics['nexternal']) - + def increase_parralelization(self, nexternal): - self.max_splitting = 1000 - + self.max_splitting = 1000 + if self.run_card['refine_evt_by_job'] != -1: pass elif nexternal == 3: @@ -1563,27 +1563,27 @@ def increase_parralelization(self, nexternal): class gen_ximprove_share(gen_ximprove, gensym): """Doing the refine in multicore. Each core handle a couple of PS point.""" - nb_ps_by_job = 2000 + nb_ps_by_job = 2000 mode = "refine" gen_events_security = 1.15 # Note the real security is lower since we stop the jobs if they are at 96% # of this target. def __init__(self, *args, **opts): - + super(gen_ximprove_share, self).__init__(*args, **opts) self.generated_events = {} self.splitted_for_dir = lambda x,y : self.splitted_Pdir[(x,y)] - + def get_job_for_event(self): """generate the script in order to generate a given number of event""" # correspond to write_gen in the fortran version - + goal_lum, to_refine = self.find_job_for_event() self.goal_lum = goal_lum - + # loop over the channel to refine to find the number of PS point to launch total_ps_points = 0 channel_to_ps_point = [] @@ -1593,7 +1593,7 @@ def get_job_for_event(self): os.remove(pjoin(self.me_dir, "SubProcesses",C.parent_name, C.name, "events.lhe")) except: pass - + #1. Compute the number of points are needed to reach target needed_event = goal_lum*C.get('axsec') if needed_event == 0: @@ -1609,18 +1609,18 @@ def get_job_for_event(self): nb_split = 1 if nb_split > self.max_splitting: nb_split = self.max_splitting - nevents = self.max_event_in_iter * self.max_splitting + nevents = self.max_event_in_iter * self.max_splitting else: nevents = self.max_event_in_iter * nb_split if nevents > self.max_splitting*self.max_event_in_iter: logger.warning("Channel %s/%s has a very low efficiency of unweighting. Might not be possible to reach target" % \ (C.name, C.parent_name)) - nevents = self.max_event_in_iter * self.max_splitting - - total_ps_points += nevents - channel_to_ps_point.append((C, nevents)) - + nevents = self.max_event_in_iter * self.max_splitting + + total_ps_points += nevents + channel_to_ps_point.append((C, nevents)) + if self.cmd.options["run_mode"] == 1: if self.cmd.options["cluster_size"]: nb_ps_by_job = total_ps_points /int(self.cmd.options["cluster_size"]) @@ -1634,7 +1634,7 @@ def get_job_for_event(self): nb_ps_by_job = total_ps_points / self.cmd.options["nb_core"] else: nb_ps_by_job = self.nb_ps_by_job - + nb_ps_by_job = int(max(nb_ps_by_job, 500)) for C, nevents in channel_to_ps_point: @@ -1648,20 +1648,20 @@ def get_job_for_event(self): self.create_resubmit_one_iter(C.parent_name, C.name[1:], submit_ps, nb_job, step=0) needed_event = goal_lum*C.get('xsec') logger.debug("%s/%s : need %s event. Need %s split job of %s points", C.parent_name, C.name, needed_event, nb_job, submit_ps) - - + + def combine_iteration(self, Pdir, G, step): - + grid_calculator, cross, error = self.combine_grid(Pdir, G, step) - + # collect all the generated_event Gdirs = [] #build the the list of directory for i in range(self.splitted_for_dir(Pdir, G)): path = pjoin(Pdir, "G%s_%s" % (G, i+1)) Gdirs.append(path) assert len(grid_calculator.results) == len(Gdirs) == self.splitted_for_dir(Pdir, G) - - + + # Check how many events are going to be kept after un-weighting. needed_event = cross * self.goal_lum if needed_event == 0: @@ -1671,19 +1671,19 @@ def combine_iteration(self, Pdir, G, step): if self.err_goal >=1: if needed_event > self.gen_events_security * self.err_goal: needed_event = int(self.gen_events_security * self.err_goal) - + if (Pdir, G) in self.generated_events: old_nunwgt, old_maxwgt = self.generated_events[(Pdir, G)] else: old_nunwgt, old_maxwgt = 0, 0 - + if old_nunwgt == 0 and os.path.exists(pjoin(Pdir,"G%s" % G, "events.lhe")): # possible for second refine. lhe = lhe_parser.EventFile(pjoin(Pdir,"G%s" % G, "events.lhe")) old_nunwgt = lhe.unweight(None, trunc_error=0.005, log_level=0) old_maxwgt = lhe.max_wgt - - + + maxwgt = max(grid_calculator.get_max_wgt(), old_maxwgt) new_evt = grid_calculator.get_nunwgt(maxwgt) @@ -1695,35 +1695,35 @@ def combine_iteration(self, Pdir, G, step): one_iter_nb_event = max(grid_calculator.get_nunwgt(),1) drop_previous_iteration = False # compare the number of events to generate if we discard the previous iteration - n_target_one_iter = (needed_event-one_iter_nb_event) / ( one_iter_nb_event/ sum([R.nevents for R in grid_calculator.results])) + n_target_one_iter = (needed_event-one_iter_nb_event) / ( one_iter_nb_event/ sum([R.nevents for R in grid_calculator.results])) n_target_combined = (needed_event-nunwgt) / efficiency if n_target_one_iter < n_target_combined: # the last iteration alone has more event that the combine iteration. - # it is therefore interesting to drop previous iteration. + # it is therefore interesting to drop previous iteration. drop_previous_iteration = True nunwgt = one_iter_nb_event maxwgt = grid_calculator.get_max_wgt() new_evt = nunwgt - efficiency = ( one_iter_nb_event/ sum([R.nevents for R in grid_calculator.results])) - + efficiency = ( one_iter_nb_event/ sum([R.nevents for R in grid_calculator.results])) + try: if drop_previous_iteration: raise IOError output_file = open(pjoin(Pdir,"G%s" % G, "events.lhe"), 'a') except IOError: output_file = open(pjoin(Pdir,"G%s" % G, "events.lhe"), 'w') - + misc.call(["cat"] + [pjoin(d, "events.lhe") for d in Gdirs], stdout=output_file) output_file.close() # For large number of iteration. check the number of event by doing the # real unweighting. - if nunwgt < 0.6 * needed_event and step > self.min_iter: + if nunwgt < 0.6 * needed_event and step > self.min_iter: lhe = lhe_parser.EventFile(output_file.name) old_nunwgt =nunwgt nunwgt = lhe.unweight(None, trunc_error=0.01, log_level=0) - - + + self.generated_events[(Pdir, G)] = (nunwgt, maxwgt) # misc.sprint("Adding %s event to %s. Currently at %s" % (new_evt, G, nunwgt)) @@ -1742,21 +1742,21 @@ def combine_iteration(self, Pdir, G, step): nevents = grid_calculator.results[0].nevents if nevents == 0: # possible if some integral returns 0 nevents = max(g.nevents for g in grid_calculator.results) - + need_ps_point = (needed_event - nunwgt)/(efficiency+1e-99) - need_job = need_ps_point // nevents + 1 - + need_job = need_ps_point // nevents + 1 + if step < self.min_iter: # This is normal but check if we are on the good track - job_at_first_iter = nb_split_before/2**(step-1) + job_at_first_iter = nb_split_before/2**(step-1) expected_total_job = job_at_first_iter * (2**self.min_iter-1) done_job = job_at_first_iter * (2**step-1) expected_remaining_job = expected_total_job - done_job - logger.debug("efficiency status (smaller is better): %s", need_job/expected_remaining_job) + logger.debug("efficiency status (smaller is better): %s", need_job/expected_remaining_job) # increase if needed but not too much need_job = min(need_job, expected_remaining_job*1.25) - + nb_job = (need_job-0.5)//(2**(self.min_iter-step)-1) + 1 nb_job = max(1, nb_job) grid_calculator.write_grid_for_submission(Pdir,G, @@ -1768,7 +1768,7 @@ def combine_iteration(self, Pdir, G, step): nb_job, step)) self.create_resubmit_one_iter(Pdir, G, nevents, nb_job, step) #self.create_job(Pdir, G, nb_job, nevents, step) - + elif step < self.max_iter: if step + 1 == self.max_iter: need_job = 1.20 * need_job # avoid to have just too few event. @@ -1777,21 +1777,21 @@ def combine_iteration(self, Pdir, G, step): grid_calculator.write_grid_for_submission(Pdir,G, self.splitted_for_dir(Pdir, G), nb_job*nevents ,mode=self.mode, conservative_factor=self.max_iter) - - + + logger.info("%s/G%s is at %i/%i ('%.2g%%') event. Resubmit %i job at iteration %i." \ % (os.path.basename(Pdir), G, int(nunwgt),int(needed_event)+1, (float(nunwgt)/needed_event)*100.0 if needed_event>0.0 else 0.0, nb_job, step)) self.create_resubmit_one_iter(Pdir, G, nevents, nb_job, step) - - + + return 0 - - + + def write_results(self, grid_calculator, cross, error, Pdir, G, step, efficiency): - + #compute the value if cross == 0: abscross,nw, luminosity = 0, 0, 0 @@ -1807,7 +1807,7 @@ def write_results(self, grid_calculator, cross, error, Pdir, G, step, efficiency nevents = nunwgt # make the unweighting to compute the number of events: luminosity = nunwgt/cross - + #format the results.dat def fstr(nb): data = '%E' % nb @@ -1816,23 +1816,23 @@ def fstr(nb): power = int(power) + 1 return '%.5fE%+03i' %(nb,power) line = '%s %s %s %i %i %i %i %s %s %s 0.0 0.0 0\n' % \ - (fstr(cross), fstr(error*cross), fstr(error*cross), + (fstr(cross), fstr(error*cross), fstr(error*cross), nevents, nw, maxit,nunwgt, fstr(luminosity), fstr(wgt), fstr(abscross)) - + fsock = open(pjoin(self.me_dir,'SubProcesses' , Pdir, 'G%s' % G, - 'results.dat'),'w') + 'results.dat'),'w') fsock.writelines(line) fsock.close() - - - + + + class gen_ximprove_gridpack(gen_ximprove_v4): - - min_iter = 1 + + min_iter = 1 max_iter = 13 - max_request_event = 1e12 # split jobs if a channel if it needs more than that + max_request_event = 1e12 # split jobs if a channel if it needs more than that max_event_in_iter = 4000 min_event_in_iter = 500 combining_job = sys.maxsize @@ -1844,7 +1844,7 @@ def __new__(cls, *args, **opts): return super(gen_ximprove_gridpack, cls).__new__(cls, *args, **opts) def __init__(self, *args, **opts): - + self.ngran = -1 self.gscalefact = {} self.readonly = False @@ -1855,23 +1855,23 @@ def __init__(self, *args, **opts): self.readonly = opts['readonly'] super(gen_ximprove_gridpack,self).__init__(*args, **opts) if self.ngran == -1: - self.ngran = 1 - + self.ngran = 1 + def find_job_for_event(self): """return the list of channel that need to be improved""" import random - + assert self.err_goal >=1 self.err_goal = int(self.err_goal) self.gscalefact = {} - + xtot = self.results.axsec - goal_lum = self.err_goal/(xtot+1e-99) #pb^-1 + goal_lum = self.err_goal/(xtot+1e-99) #pb^-1 # logger.info('Effective Luminosity %s pb^-1', goal_lum) - + all_channels = sum([list(P) for P in self.results],[]) all_channels.sort(key=lambda x : x.get('luminosity'), reverse=True) - + to_refine = [] for C in all_channels: tag = C.get('name') @@ -1885,27 +1885,27 @@ def find_job_for_event(self): #need to generate events logger.debug('request events for ', C.get('name'), 'cross=', C.get('axsec'), 'needed events = ', goal_lum * C.get('axsec')) - to_refine.append(C) - - logger.info('need to improve %s channels' % len(to_refine)) + to_refine.append(C) + + logger.info('need to improve %s channels' % len(to_refine)) return goal_lum, to_refine def get_job_for_event(self): """generate the script in order to generate a given number of event""" # correspond to write_gen in the fortran version - - + + goal_lum, to_refine = self.find_job_for_event() jobs = [] # list of the refine if some job are split is list of # dict with the parameter of the run. - + # loop over the channel to refine for C in to_refine: #1. Compute the number of points are needed to reach target needed_event = max(goal_lum*C.get('axsec'), self.ngran) nb_split = 1 - + #2. estimate how many points we need in each iteration if C.get('nunwgt') > 0: nevents = needed_event / nb_split * (C.get('nevents') / C.get('nunwgt')) @@ -1920,13 +1920,13 @@ def get_job_for_event(self): # forbid too low/too large value nevents = max(self.min_event_in_iter, min(self.max_event_in_iter, nevents)) logger.debug("%s : need %s event. Need %s split job of %s points", C.name, needed_event, nb_split, nevents) - + #create the info dict assume no splitting for the default info = {'name': self.cmd.results.current['run_name'], 'script_name': 'unknown', 'directory': C.name, # need to be change for splitted job - 'P_dir': os.path.basename(C.parent_name), + 'P_dir': os.path.basename(C.parent_name), 'offset': 1, # need to be change for splitted job 'Ppath': pjoin(self.cmd.me_dir, 'SubProcesses', C.parent_name), 'nevents': nevents, #int(nevents*self.gen_events_security)+1, @@ -1938,7 +1938,7 @@ def get_job_for_event(self): 'channel': C.name.replace('G',''), 'grid_refinment' : 0, #no refinment of the grid 'base_directory': '', #should be change in splitted job if want to keep the grid - 'packet': None, + 'packet': None, } if self.readonly: @@ -1946,11 +1946,11 @@ def get_job_for_event(self): info['base_directory'] = basedir jobs.append(info) - - write_dir = '.' if self.readonly else None - self.create_ajob(pjoin(self.me_dir, 'SubProcesses', 'refine.sh'), jobs, write_dir) - + + write_dir = '.' if self.readonly else None + self.create_ajob(pjoin(self.me_dir, 'SubProcesses', 'refine.sh'), jobs, write_dir) + done = [] for j in jobs: if j['P_dir'] in done: @@ -1967,22 +1967,22 @@ def get_job_for_event(self): write_dir = '.' if self.readonly else pjoin(self.me_dir, 'SubProcesses') self.check_events(goal_lum, to_refine, jobs, write_dir) - + def check_events(self, goal_lum, to_refine, jobs, Sdir): """check that we get the number of requested events if not resubmit.""" - + new_jobs = [] - + for C, job_info in zip(to_refine, jobs): - P = job_info['P_dir'] + P = job_info['P_dir'] G = job_info['channel'] axsec = C.get('axsec') - requested_events= job_info['requested_event'] - + requested_events= job_info['requested_event'] + new_results = sum_html.OneResult((P,G)) new_results.read_results(pjoin(Sdir,P, 'G%s'%G, 'results.dat')) - + # need to resubmit? if new_results.get('nunwgt') < requested_events: pwd = pjoin(os.getcwd(),job_info['P_dir'],'G%s'%G) if self.readonly else \ @@ -1992,10 +1992,10 @@ def check_events(self, goal_lum, to_refine, jobs, Sdir): job_info['offset'] += 1 new_jobs.append(job_info) files.mv(pjoin(pwd, 'events.lhe'), pjoin(pwd, 'events.lhe.previous')) - + if new_jobs: - self.create_ajob(pjoin(self.me_dir, 'SubProcesses', 'refine.sh'), new_jobs, Sdir) - + self.create_ajob(pjoin(self.me_dir, 'SubProcesses', 'refine.sh'), new_jobs, Sdir) + done = [] for j in new_jobs: if j['P_dir'] in done: @@ -2015,9 +2015,9 @@ def check_events(self, goal_lum, to_refine, jobs, Sdir): files.put_at_end(pjoin(pwd, 'events.lhe'),pjoin(pwd, 'events.lhe.previous')) return self.check_events(goal_lum, to_refine, new_jobs, Sdir) - - - - + + + + diff --git a/epochX/cudacpp/gg_ttg.mad/bin/internal/madevent_interface.py b/epochX/cudacpp/gg_ttg.mad/bin/internal/madevent_interface.py index cb6bf4ca57..8abba3f33f 100755 --- a/epochX/cudacpp/gg_ttg.mad/bin/internal/madevent_interface.py +++ b/epochX/cudacpp/gg_ttg.mad/bin/internal/madevent_interface.py @@ -2,11 +2,11 @@ # # Copyright (c) 2011 The MadGraph5_aMC@NLO Development team and Contributors # -# This file is a part of the MadGraph5_aMC@NLO project, an application which +# This file is a part of the MadGraph5_aMC@NLO project, an application which # automatically generates Feynman diagrams and matrix elements for arbitrary # high-energy processes in the Standard Model and beyond. # -# It is subject to the MadGraph5_aMC@NLO license which should accompany this +# It is subject to the MadGraph5_aMC@NLO license which should accompany this # distribution. # # For more information, visit madgraph.phys.ucl.ac.be and amcatnlo.web.cern.ch @@ -53,10 +53,10 @@ # Special logger for the Cmd Interface logger = logging.getLogger('madevent.stdout') # -> stdout logger_stderr = logging.getLogger('madevent.stderr') # ->stderr - + try: import madgraph -except ImportError as error: +except ImportError as error: # import from madevent directory MADEVENT = True import internal.extended_cmd as cmd @@ -92,7 +92,7 @@ import madgraph.various.lhe_parser as lhe_parser # import madgraph.various.histograms as histograms # imported later to not slow down the loading of the code import models.check_param_card as check_param_card - from madgraph.iolibs.files import ln + from madgraph.iolibs.files import ln from madgraph import InvalidCmd, MadGraph5Error, MG5DIR, ReadWrite @@ -113,10 +113,10 @@ class CmdExtended(common_run.CommonRunCmd): next_possibility = { 'start': [], } - + debug_output = 'ME5_debug' error_debug = 'Please report this bug on https://bugs.launchpad.net/mg5amcnlo\n' - error_debug += 'More information is found in \'%(debug)s\'.\n' + error_debug += 'More information is found in \'%(debug)s\'.\n' error_debug += 'Please attach this file to your report.' config_debug = 'If you need help with this issue please contact us on https://answers.launchpad.net/mg5amcnlo\n' @@ -124,18 +124,18 @@ class CmdExtended(common_run.CommonRunCmd): keyboard_stop_msg = """stopping all operation in order to quit MadGraph5_aMC@NLO please enter exit""" - + # Define the Error InvalidCmd = InvalidCmd ConfigurationError = MadGraph5Error def __init__(self, me_dir, options, *arg, **opt): """Init history and line continuation""" - + # Tag allowing/forbiding question self.force = False - - # If possible, build an info line with current version number + + # If possible, build an info line with current version number # and date, from the VERSION text file info = misc.get_pkg_info() info_line = "" @@ -150,7 +150,7 @@ def __init__(self, me_dir, options, *arg, **opt): else: version = open(pjoin(root_path,'MGMEVersion.txt')).readline().strip() info_line = "#* VERSION %s %s *\n" % \ - (version, (24 - len(version)) * ' ') + (version, (24 - len(version)) * ' ') # Create a header for the history file. # Remember to fill in time at writeout time! @@ -177,7 +177,7 @@ def __init__(self, me_dir, options, *arg, **opt): '#* run as ./bin/madevent.py filename *\n' + \ '#* *\n' + \ '#************************************************************\n' - + if info_line: info_line = info_line[1:] @@ -203,11 +203,11 @@ def __init__(self, me_dir, options, *arg, **opt): "* *\n" + \ "************************************************************") super(CmdExtended, self).__init__(me_dir, options, *arg, **opt) - + def get_history_header(self): - """return the history header""" + """return the history header""" return self.history_header % misc.get_time_info() - + def stop_on_keyboard_stop(self): """action to perform to close nicely on a keyboard interupt""" try: @@ -219,20 +219,20 @@ def stop_on_keyboard_stop(self): self.add_error_log_in_html(KeyboardInterrupt) except: pass - + def postcmd(self, stop, line): """ Update the status of the run for finishing interactive command """ - - stop = super(CmdExtended, self).postcmd(stop, line) + + stop = super(CmdExtended, self).postcmd(stop, line) # relaxing the tag forbidding question self.force = False - + if not self.use_rawinput: return stop - + if self.results and not self.results.current: return stop - + arg = line.split() if len(arg) == 0: return stop @@ -240,41 +240,41 @@ def postcmd(self, stop, line): return stop if isinstance(self.results.status, str) and self.results.status == 'Stop by the user': self.update_status('%s Stop by the user' % arg[0], level=None, error=True) - return stop + return stop elif not self.results.status: return stop elif str(arg[0]) in ['exit','quit','EOF']: return stop - + try: - self.update_status('Command \'%s\' done.
Waiting for instruction.' % arg[0], + self.update_status('Command \'%s\' done.
Waiting for instruction.' % arg[0], level=None, error=True) except Exception: misc.sprint('update_status fails') pass - - + + def nice_user_error(self, error, line): """If a ME run is currently running add a link in the html output""" self.add_error_log_in_html() - return cmd.Cmd.nice_user_error(self, error, line) - + return cmd.Cmd.nice_user_error(self, error, line) + def nice_config_error(self, error, line): """If a ME run is currently running add a link in the html output""" self.add_error_log_in_html() stop = cmd.Cmd.nice_config_error(self, error, line) - - + + try: debug_file = open(self.debug_output, 'a') debug_file.write(open(pjoin(self.me_dir,'Cards','proc_card_mg5.dat'))) debug_file.close() except: - pass + pass return stop - + def nice_error_handling(self, error, line): """If a ME run is currently running add a link in the html output""" @@ -294,7 +294,7 @@ def nice_error_handling(self, error, line): proc_card = pjoin(self.me_dir,'Cards','proc_card_mg5.dat') if os.path.exists(proc_card): self.banner.add(proc_card) - + out_dir = pjoin(self.me_dir, 'Events', self.run_name) if not os.path.isdir(out_dir): os.mkdir(out_dir) @@ -307,7 +307,7 @@ def nice_error_handling(self, error, line): else: pass else: - self.add_error_log_in_html() + self.add_error_log_in_html() stop = cmd.Cmd.nice_error_handling(self, error, line) try: debug_file = open(self.debug_output, 'a') @@ -316,14 +316,14 @@ def nice_error_handling(self, error, line): except: pass return stop - - + + #=============================================================================== # HelpToCmd #=============================================================================== class HelpToCmd(object): """ The Series of help routine for the MadEventCmd""" - + def help_pythia(self): logger.info("syntax: pythia [RUN] [--run_options]") logger.info("-- run pythia on RUN (current one by default)") @@ -352,29 +352,29 @@ def help_banner_run(self): logger.info(" Path should be the path of a valid banner.") logger.info(" RUN should be the name of a run of the current directory") self.run_options_help([('-f','answer all question by default'), - ('--name=X', 'Define the name associated with the new run')]) - + ('--name=X', 'Define the name associated with the new run')]) + def help_open(self): logger.info("syntax: open FILE ") logger.info("-- open a file with the appropriate editor.") logger.info(' If FILE belongs to index.html, param_card.dat, run_card.dat') logger.info(' the path to the last created/used directory is used') logger.info(' The program used to open those files can be chosen in the') - logger.info(' configuration file ./input/mg5_configuration.txt') - - + logger.info(' configuration file ./input/mg5_configuration.txt') + + def run_options_help(self, data): if data: logger.info('-- local options:') for name, info in data: logger.info(' %s : %s' % (name, info)) - + logger.info("-- session options:") - logger.info(" Note that those options will be kept for the current session") + logger.info(" Note that those options will be kept for the current session") logger.info(" --cluster : Submit to the cluster. Current cluster: %s" % self.options['cluster_type']) logger.info(" --multicore : Run in multi-core configuration") logger.info(" --nb_core=X : limit the number of core to use to X.") - + def help_generate_events(self): logger.info("syntax: generate_events [run_name] [options]",) @@ -398,16 +398,16 @@ def help_initMadLoop(self): logger.info(" -f : Bypass the edition of MadLoopParams.dat.",'$MG:color:BLUE') logger.info(" -r : Refresh of the existing filters (erasing them if already present).",'$MG:color:BLUE') logger.info(" --nPS= : Specify how many phase-space points should be tried to set up the filters.",'$MG:color:BLUE') - + def help_calculate_decay_widths(self): - + if self.ninitial != 1: logger.warning("This command is only valid for processes of type A > B C.") logger.warning("This command can not be run in current context.") logger.warning("") - + logger.info("syntax: calculate_decay_widths [run_name] [options])") logger.info("-- Calculate decay widths and enter widths and BRs in param_card") logger.info(" for a series of processes of type A > B C ...") @@ -428,8 +428,8 @@ def help_survey(self): logger.info("-- evaluate the different channel associate to the process") self.run_options_help([("--" + key,value[-1]) for (key,value) in \ self._survey_options.items()]) - - + + def help_restart_gridpack(self): logger.info("syntax: restart_gridpack --precision= --restart_zero") @@ -439,14 +439,14 @@ def help_launch(self): logger.info("syntax: launch [run_name] [options])") logger.info(" --alias for either generate_events/calculate_decay_widths") logger.info(" depending of the number of particles in the initial state.") - + if self.ninitial == 1: logger.info("For this directory this is equivalent to calculate_decay_widths") self.help_calculate_decay_widths() else: logger.info("For this directory this is equivalent to $generate_events") self.help_generate_events() - + def help_refine(self): logger.info("syntax: refine require_precision [max_channel] [--run_options]") logger.info("-- refine the LAST run to achieve a given precision.") @@ -454,14 +454,14 @@ def help_refine(self): logger.info(' or the required relative error') logger.info(' max_channel:[5] maximal number of channel per job') self.run_options_help([]) - + def help_combine_events(self): """ """ logger.info("syntax: combine_events [run_name] [--tag=tag_name] [--run_options]") logger.info("-- Combine the last run in order to write the number of events") logger.info(" asked in the run_card.") self.run_options_help([]) - + def help_store_events(self): """ """ logger.info("syntax: store_events [--run_options]") @@ -481,7 +481,7 @@ def help_import(self): logger.info("syntax: import command PATH") logger.info("-- Execute the command present in the file") self.run_options_help([]) - + def help_syscalc(self): logger.info("syntax: syscalc [RUN] [%s] [-f | --tag=]" % '|'.join(self._plot_mode)) logger.info("-- calculate systematics information for the RUN (current run by default)") @@ -506,18 +506,18 @@ class AskRun(cmd.ControlSwitch): ('madspin', 'Decay onshell particles'), ('reweight', 'Add weights to events for new hypp.') ] - + def __init__(self, question, line_args=[], mode=None, force=False, *args, **opt): - + self.check_available_module(opt['mother_interface'].options) self.me_dir = opt['mother_interface'].me_dir super(AskRun,self).__init__(self.to_control, opt['mother_interface'], *args, **opt) - - + + def check_available_module(self, options): - + self.available_module = set() if options['pythia-pgs_path']: self.available_module.add('PY6') @@ -540,32 +540,32 @@ def check_available_module(self, options): self.available_module.add('Rivet') else: logger.warning("Rivet program installed but no parton shower with hepmc output detected.\n Please install pythia8") - + if not MADEVENT or ('mg5_path' in options and options['mg5_path']): self.available_module.add('MadSpin') if misc.has_f2py() or options['f2py_compiler']: self.available_module.add('reweight') -# old mode to activate the shower +# old mode to activate the shower def ans_parton(self, value=None): """None: means that the user type 'pythia' value: means that the user type pythia=value""" - + if value is None: self.set_all_off() else: logger.warning('Invalid command: parton=%s' % value) - - + + # -# HANDLING SHOWER +# HANDLING SHOWER # def get_allowed_shower(self): """return valid entry for the shower switch""" - + if hasattr(self, 'allowed_shower'): return self.allowed_shower - + self.allowed_shower = [] if 'PY6' in self.available_module: self.allowed_shower.append('Pythia6') @@ -574,9 +574,9 @@ def get_allowed_shower(self): if self.allowed_shower: self.allowed_shower.append('OFF') return self.allowed_shower - + def set_default_shower(self): - + if 'PY6' in self.available_module and\ os.path.exists(pjoin(self.me_dir,'Cards','pythia_card.dat')): self.switch['shower'] = 'Pythia6' @@ -590,10 +590,10 @@ def set_default_shower(self): def check_value_shower(self, value): """check an entry is valid. return the valid entry in case of shortcut""" - + if value in self.get_allowed_shower(): return True - + value =value.lower() if value in ['py6','p6','pythia_6'] and 'PY6' in self.available_module: return 'Pythia6' @@ -601,13 +601,13 @@ def check_value_shower(self, value): return 'Pythia8' else: return False - - -# old mode to activate the shower + + +# old mode to activate the shower def ans_pythia(self, value=None): """None: means that the user type 'pythia' value: means that the user type pythia=value""" - + if 'PY6' not in self.available_module: logger.info('pythia-pgs not available. Ignore commmand') return @@ -621,13 +621,13 @@ def ans_pythia(self, value=None): self.set_switch('shower', 'OFF') else: logger.warning('Invalid command: pythia=%s' % value) - - + + def consistency_shower_detector(self, vshower, vdetector): """consistency_XX_YY(val_XX, val_YY) -> XX is the new key set by the user to a new value val_XX -> YY is another key - -> return value should be None or "replace_YY" + -> return value should be None or "replace_YY" """ if vshower == 'OFF': @@ -635,35 +635,35 @@ def consistency_shower_detector(self, vshower, vdetector): return 'OFF' if vshower == 'Pythia8' and vdetector == 'PGS': return 'OFF' - + return None - + # # HANDLING DETECTOR # def get_allowed_detector(self): """return valid entry for the switch""" - + if hasattr(self, 'allowed_detector'): - return self.allowed_detector - + return self.allowed_detector + self.allowed_detector = [] if 'PGS' in self.available_module: self.allowed_detector.append('PGS') if 'Delphes' in self.available_module: self.allowed_detector.append('Delphes') - + if self.allowed_detector: self.allowed_detector.append('OFF') - return self.allowed_detector + return self.allowed_detector def set_default_detector(self): - + self.set_default_shower() #ensure that this one is called first! - + if 'PGS' in self.available_module and self.switch['shower'] == 'Pythia6'\ and os.path.exists(pjoin(self.me_dir,'Cards','pgs_card.dat')): self.switch['detector'] = 'PGS' @@ -674,16 +674,16 @@ def set_default_detector(self): self.switch['detector'] = 'OFF' else: self.switch['detector'] = 'Not Avail.' - -# old mode to activate pgs + +# old mode to activate pgs def ans_pgs(self, value=None): """None: means that the user type 'pgs' - value: means that the user type pgs=value""" - + value: means that the user type pgs=value""" + if 'PGS' not in self.available_module: logger.info('pythia-pgs not available. Ignore commmand') return - + if value is None: self.set_all_off() self.switch['shower'] = 'Pythia6' @@ -696,16 +696,16 @@ def ans_pgs(self, value=None): else: logger.warning('Invalid command: pgs=%s' % value) - + # old mode to activate Delphes def ans_delphes(self, value=None): """None: means that the user type 'delphes' - value: means that the user type delphes=value""" - + value: means that the user type delphes=value""" + if 'Delphes' not in self.available_module: logger.warning('Delphes not available. Ignore commmand') return - + if value is None: self.set_all_off() if 'PY6' in self.available_module: @@ -718,15 +718,15 @@ def ans_delphes(self, value=None): elif value == 'off': self.set_switch('detector', 'OFF') else: - logger.warning('Invalid command: pgs=%s' % value) + logger.warning('Invalid command: pgs=%s' % value) def consistency_detector_shower(self,vdetector, vshower): """consistency_XX_YY(val_XX, val_YY) -> XX is the new key set by the user to a new value val_XX -> YY is another key - -> return value should be None or "replace_YY" + -> return value should be None or "replace_YY" """ - + if vdetector == 'PGS' and vshower != 'Pythia6': return 'Pythia6' if vdetector == 'Delphes' and vshower not in ['Pythia6', 'Pythia8']: @@ -744,28 +744,28 @@ def consistency_detector_shower(self,vdetector, vshower): # def get_allowed_analysis(self): """return valid entry for the shower switch""" - + if hasattr(self, 'allowed_analysis'): return self.allowed_analysis - + self.allowed_analysis = [] if 'ExRoot' in self.available_module: self.allowed_analysis.append('ExRoot') if 'MA4' in self.available_module: self.allowed_analysis.append('MadAnalysis4') if 'MA5' in self.available_module: - self.allowed_analysis.append('MadAnalysis5') + self.allowed_analysis.append('MadAnalysis5') if 'Rivet' in self.available_module: - self.allowed_analysis.append('Rivet') - + self.allowed_analysis.append('Rivet') + if self.allowed_analysis: self.allowed_analysis.append('OFF') - + return self.allowed_analysis - + def check_analysis(self, value): """check an entry is valid. return the valid entry in case of shortcut""" - + if value in self.get_allowed_analysis(): return True if value.lower() in ['ma4', 'madanalysis4', 'madanalysis_4','4']: @@ -786,30 +786,30 @@ def consistency_shower_analysis(self, vshower, vanalysis): """consistency_XX_YY(val_XX, val_YY) -> XX is the new key set by the user to a new value val_XX -> YY is another key - -> return value should be None or "replace_YY" + -> return value should be None or "replace_YY" """ if vshower != 'Pythia8' and vanalysis == 'Rivet': return 'OFF' #new value for analysis - + return None - + def consistency_analysis_shower(self, vanalysis, vshower): """consistency_XX_YY(val_XX, val_YY) -> XX is the new key set by the user to a new value val_XX -> YY is another key - -> return value should be None or "replace_YY" + -> return value should be None or "replace_YY" """ if vshower != 'Pythia8' and vanalysis == 'Rivet': return 'Pythia8' #new value for analysis - + return None def set_default_analysis(self): """initialise the switch for analysis""" - + if 'MA4' in self.available_module and \ os.path.exists(pjoin(self.me_dir,'Cards','plot_card.dat')): self.switch['analysis'] = 'MadAnalysis4' @@ -818,46 +818,46 @@ def set_default_analysis(self): or os.path.exists(pjoin(self.me_dir,'Cards', 'madanalysis5_hadron_card.dat'))): self.switch['analysis'] = 'MadAnalysis5' elif 'ExRoot' in self.available_module: - self.switch['analysis'] = 'ExRoot' - elif self.get_allowed_analysis(): + self.switch['analysis'] = 'ExRoot' + elif self.get_allowed_analysis(): self.switch['analysis'] = 'OFF' else: self.switch['analysis'] = 'Not Avail.' - + # # MADSPIN handling # def get_allowed_madspin(self): """ ON|OFF|onshell """ - + if hasattr(self, 'allowed_madspin'): return self.allowed_madspin - + self.allowed_madspin = [] if 'MadSpin' in self.available_module: self.allowed_madspin = ['OFF',"ON",'onshell',"full"] return self.allowed_madspin - + def check_value_madspin(self, value): """handle alias and valid option not present in get_allowed_madspin""" - + if value.upper() in self.get_allowed_madspin(): return True elif value.lower() in self.get_allowed_madspin(): return True - + if 'MadSpin' not in self.available_module: return False - + if value.lower() in ['madspin', 'full']: return 'full' elif value.lower() in ['none']: return 'none' - - + + def set_default_madspin(self): """initialise the switch for madspin""" - + if 'MadSpin' in self.available_module: if os.path.exists(pjoin(self.me_dir,'Cards','madspin_card.dat')): self.switch['madspin'] = 'ON' @@ -865,10 +865,10 @@ def set_default_madspin(self): self.switch['madspin'] = 'OFF' else: self.switch['madspin'] = 'Not Avail.' - + def get_cardcmd_for_madspin(self, value): """set some command to run before allowing the user to modify the cards.""" - + if value == 'onshell': return ["edit madspin_card --replace_line='set spinmode' --before_line='decay' set spinmode onshell"] elif value in ['full', 'madspin']: @@ -877,36 +877,36 @@ def get_cardcmd_for_madspin(self, value): return ["edit madspin_card --replace_line='set spinmode' --before_line='decay' set spinmode none"] else: return [] - + # # ReWeight handling # def get_allowed_reweight(self): """ return the list of valid option for reweight=XXX """ - + if hasattr(self, 'allowed_reweight'): return getattr(self, 'allowed_reweight') - + if 'reweight' not in self.available_module: self.allowed_reweight = [] return self.allowed_reweight = ['OFF', 'ON'] - + # check for plugin mode plugin_path = self.mother_interface.plugin_path opts = misc.from_plugin_import(plugin_path, 'new_reweight', warning=False) self.allowed_reweight += opts - + def set_default_reweight(self): """initialise the switch for reweight""" - + if 'reweight' in self.available_module: if os.path.exists(pjoin(self.me_dir,'Cards','reweight_card.dat')): self.switch['reweight'] = 'ON' else: self.switch['reweight'] = 'OFF' else: - self.switch['reweight'] = 'Not Avail.' + self.switch['reweight'] = 'Not Avail.' #=============================================================================== # CheckValidForCmd @@ -916,14 +916,14 @@ class CheckValidForCmd(object): def check_banner_run(self, args): """check the validity of line""" - + if len(args) == 0: self.help_banner_run() raise self.InvalidCmd('banner_run requires at least one argument.') - + tag = [a[6:] for a in args if a.startswith('--tag=')] - - + + if os.path.exists(args[0]): type ='banner' format = self.detect_card_type(args[0]) @@ -931,7 +931,7 @@ def check_banner_run(self, args): raise self.InvalidCmd('The file is not a valid banner.') elif tag: args[0] = pjoin(self.me_dir,'Events', args[0], '%s_%s_banner.txt' % \ - (args[0], tag)) + (args[0], tag)) if not os.path.exists(args[0]): raise self.InvalidCmd('No banner associates to this name and tag.') else: @@ -939,7 +939,7 @@ def check_banner_run(self, args): type = 'run' banners = misc.glob('*_banner.txt', pjoin(self.me_dir,'Events', args[0])) if not banners: - raise self.InvalidCmd('No banner associates to this name.') + raise self.InvalidCmd('No banner associates to this name.') elif len(banners) == 1: args[0] = banners[0] else: @@ -947,8 +947,8 @@ def check_banner_run(self, args): tags = [os.path.basename(p)[len(args[0])+1:-11] for p in banners] tag = self.ask('which tag do you want to use?', tags[0], tags) args[0] = pjoin(self.me_dir,'Events', args[0], '%s_%s_banner.txt' % \ - (args[0], tag)) - + (args[0], tag)) + run_name = [arg[7:] for arg in args if arg.startswith('--name=')] if run_name: try: @@ -970,14 +970,14 @@ def check_banner_run(self, args): except Exception: pass self.set_run_name(name) - + def check_history(self, args): """check the validity of line""" - + if len(args) > 1: self.help_history() raise self.InvalidCmd('\"history\" command takes at most one argument') - + if not len(args): return elif args[0] != 'clean': @@ -985,16 +985,16 @@ def check_history(self, args): if dirpath and not os.path.exists(dirpath) or \ os.path.isdir(args[0]): raise self.InvalidCmd("invalid path %s " % dirpath) - + def check_save(self, args): """ check the validity of the line""" - + if len(args) == 0: args.append('options') if args[0] not in self._save_opts: raise self.InvalidCmd('wrong \"save\" format') - + if args[0] != 'options' and len(args) != 2: self.help_save() raise self.InvalidCmd('wrong \"save\" format') @@ -1003,7 +1003,7 @@ def check_save(self, args): if not os.path.exists(basename): raise self.InvalidCmd('%s is not a valid path, please retry' % \ args[1]) - + if args[0] == 'options': has_path = None for arg in args[1:]: @@ -1024,9 +1024,9 @@ def check_save(self, args): has_path = True if not has_path: if '--auto' in arg and self.options['mg5_path']: - args.insert(1, pjoin(self.options['mg5_path'],'input','mg5_configuration.txt')) + args.insert(1, pjoin(self.options['mg5_path'],'input','mg5_configuration.txt')) else: - args.insert(1, pjoin(self.me_dir,'Cards','me5_configuration.txt')) + args.insert(1, pjoin(self.me_dir,'Cards','me5_configuration.txt')) def check_set(self, args): """ check the validity of the line""" @@ -1039,20 +1039,20 @@ def check_set(self, args): self.help_set() raise self.InvalidCmd('Possible options for set are %s' % \ self._set_options) - + if args[0] in ['stdout_level']: if args[1] not in ['DEBUG','INFO','WARNING','ERROR','CRITICAL'] \ and not args[1].isdigit(): raise self.InvalidCmd('output_level needs ' + \ - 'a valid level') - + 'a valid level') + if args[0] in ['timeout']: if not args[1].isdigit(): - raise self.InvalidCmd('timeout values should be a integer') - + raise self.InvalidCmd('timeout values should be a integer') + def check_open(self, args): """ check the validity of the line """ - + if len(args) != 1: self.help_open() raise self.InvalidCmd('OPEN command requires exactly one argument') @@ -1069,7 +1069,7 @@ def check_open(self, args): raise self.InvalidCmd('No MadEvent path defined. Unable to associate this name to a file') else: return True - + path = self.me_dir if os.path.isfile(os.path.join(path,args[0])): args[0] = os.path.join(path,args[0]) @@ -1078,7 +1078,7 @@ def check_open(self, args): elif os.path.isfile(os.path.join(path,'HTML',args[0])): args[0] = os.path.join(path,'HTML',args[0]) # special for card with _default define: copy the default and open it - elif '_card.dat' in args[0]: + elif '_card.dat' in args[0]: name = args[0].replace('_card.dat','_card_default.dat') if os.path.isfile(os.path.join(path,'Cards', name)): files.cp(os.path.join(path,'Cards', name), os.path.join(path,'Cards', args[0])) @@ -1086,13 +1086,13 @@ def check_open(self, args): else: raise self.InvalidCmd('No default path for this file') elif not os.path.isfile(args[0]): - raise self.InvalidCmd('No default path for this file') - + raise self.InvalidCmd('No default path for this file') + def check_initMadLoop(self, args): """ check initMadLoop command arguments are valid.""" - + opt = {'refresh': False, 'nPS': None, 'force': False} - + for arg in args: if arg in ['-r','--refresh']: opt['refresh'] = True @@ -1105,14 +1105,14 @@ def check_initMadLoop(self, args): except ValueError: raise InvalidCmd("The number of attempts specified "+ "'%s' is not a valid integer."%n_attempts) - + return opt - + def check_treatcards(self, args): """check that treatcards arguments are valid [param|run|all] [--output_dir=] [--param_card=] [--run_card=] """ - + opt = {'output_dir':pjoin(self.me_dir,'Source'), 'param_card':pjoin(self.me_dir,'Cards','param_card.dat'), 'run_card':pjoin(self.me_dir,'Cards','run_card.dat'), @@ -1129,14 +1129,14 @@ def check_treatcards(self, args): if os.path.isfile(value): card_name = self.detect_card_type(value) if card_name != key: - raise self.InvalidCmd('Format for input file detected as %s while expecting %s' + raise self.InvalidCmd('Format for input file detected as %s while expecting %s' % (card_name, key)) opt[key] = value elif os.path.isfile(pjoin(self.me_dir,value)): card_name = self.detect_card_type(pjoin(self.me_dir,value)) if card_name != key: - raise self.InvalidCmd('Format for input file detected as %s while expecting %s' - % (card_name, key)) + raise self.InvalidCmd('Format for input file detected as %s while expecting %s' + % (card_name, key)) opt[key] = value else: raise self.InvalidCmd('No such file: %s ' % value) @@ -1154,14 +1154,14 @@ def check_treatcards(self, args): else: self.help_treatcards() raise self.InvalidCmd('Unvalid argument %s' % arg) - - return mode, opt - - + + return mode, opt + + def check_survey(self, args, cmd='survey'): """check that the argument for survey are valid""" - - + + self.opts = dict([(key,value[1]) for (key,value) in \ self._survey_options.items()]) @@ -1183,41 +1183,41 @@ def check_survey(self, args, cmd='survey'): self.help_survey() raise self.InvalidCmd('Too many argument for %s command' % cmd) elif not args: - # No run name assigned -> assigned one automaticaly + # No run name assigned -> assigned one automaticaly self.set_run_name(self.find_available_run_name(self.me_dir)) else: self.set_run_name(args[0], None,'parton', True) args.pop(0) - + return True def check_generate_events(self, args): """check that the argument for generate_events are valid""" - + run = None if args and args[-1].startswith('--laststep='): run = args[-1].split('=')[-1] if run not in ['auto','parton', 'pythia', 'pgs', 'delphes']: self.help_generate_events() raise self.InvalidCmd('invalid %s argument'% args[-1]) - if run != 'parton' and not self.options['pythia-pgs_path']: - raise self.InvalidCmd('''pythia-pgs not install. Please install this package first. + if run != 'parton' and not self.options['pythia-pgs_path']: + raise self.InvalidCmd('''pythia-pgs not install. Please install this package first. To do so type: \'install pythia-pgs\' in the mg5 interface''') if run == 'delphes' and not self.options['delphes_path']: - raise self.InvalidCmd('''delphes not install. Please install this package first. + raise self.InvalidCmd('''delphes not install. Please install this package first. To do so type: \'install Delphes\' in the mg5 interface''') del args[-1] - + #if len(args) > 1: # self.help_generate_events() # raise self.InvalidCmd('Too many argument for generate_events command: %s' % cmd) - + return run def check_calculate_decay_widths(self, args): """check that the argument for calculate_decay_widths are valid""" - + if self.ninitial != 1: raise self.InvalidCmd('Can only calculate decay widths for decay processes A > B C ...') @@ -1232,7 +1232,7 @@ def check_calculate_decay_widths(self, args): if len(args) > 1: self.help_calculate_decay_widths() raise self.InvalidCmd('Too many argument for calculate_decay_widths command: %s' % cmd) - + return accuracy @@ -1241,25 +1241,25 @@ def check_multi_run(self, args): """check that the argument for survey are valid""" run = None - + if not len(args): self.help_multi_run() raise self.InvalidCmd("""multi_run command requires at least one argument for the number of times that it call generate_events command""") - + if args[-1].startswith('--laststep='): run = args[-1].split('=')[-1] if run not in ['parton', 'pythia', 'pgs', 'delphes']: self.help_multi_run() raise self.InvalidCmd('invalid %s argument'% args[-1]) - if run != 'parton' and not self.options['pythia-pgs_path']: - raise self.InvalidCmd('''pythia-pgs not install. Please install this package first. + if run != 'parton' and not self.options['pythia-pgs_path']: + raise self.InvalidCmd('''pythia-pgs not install. Please install this package first. To do so type: \'install pythia-pgs\' in the mg5 interface''') if run == 'delphes' and not self.options['delphes_path']: - raise self.InvalidCmd('''delphes not install. Please install this package first. + raise self.InvalidCmd('''delphes not install. Please install this package first. To do so type: \'install Delphes\' in the mg5 interface''') del args[-1] - + elif not args[0].isdigit(): self.help_multi_run() @@ -1267,7 +1267,7 @@ def check_multi_run(self, args): #pass nb run to an integer nb_run = args.pop(0) args.insert(0, int(nb_run)) - + return run @@ -1284,7 +1284,7 @@ def check_refine(self, args): self.help_refine() raise self.InvalidCmd('require_precision argument is require for refine cmd') - + if not self.run_name: if self.results.lastrun: self.set_run_name(self.results.lastrun) @@ -1296,17 +1296,17 @@ def check_refine(self, args): else: try: [float(arg) for arg in args] - except ValueError: - self.help_refine() + except ValueError: + self.help_refine() raise self.InvalidCmd('refine arguments are suppose to be number') - + return True - + def check_combine_events(self, arg): """ Check the argument for the combine events command """ - + tag = [a for a in arg if a.startswith('--tag=')] - if tag: + if tag: arg.remove(tag[0]) tag = tag[0][6:] elif not self.run_tag: @@ -1314,53 +1314,53 @@ def check_combine_events(self, arg): else: tag = self.run_tag self.run_tag = tag - + if len(arg) > 1: self.help_combine_events() raise self.InvalidCmd('Too many argument for combine_events command') - + if len(arg) == 1: self.set_run_name(arg[0], self.run_tag, 'parton', True) - + if not self.run_name: if not self.results.lastrun: raise self.InvalidCmd('No run_name currently define. Unable to run combine') else: self.set_run_name(self.results.lastrun) - + return True - + def check_pythia(self, args): """Check the argument for pythia command - syntax: pythia [NAME] + syntax: pythia [NAME] Note that other option are already removed at this point """ - + mode = None laststep = [arg for arg in args if arg.startswith('--laststep=')] if laststep and len(laststep)==1: mode = laststep[0].split('=')[-1] if mode not in ['auto', 'pythia', 'pgs', 'delphes']: self.help_pythia() - raise self.InvalidCmd('invalid %s argument'% args[-1]) + raise self.InvalidCmd('invalid %s argument'% args[-1]) elif laststep: raise self.InvalidCmd('only one laststep argument is allowed') - + if not self.options['pythia-pgs_path']: logger.info('Retry to read configuration file to find pythia-pgs path') self.set_configuration() - + if not self.options['pythia-pgs_path'] or not \ os.path.exists(pjoin(self.options['pythia-pgs_path'],'src')): error_msg = 'No valid pythia-pgs path set.\n' error_msg += 'Please use the set command to define the path and retry.\n' error_msg += 'You can also define it in the configuration file.\n' raise self.InvalidCmd(error_msg) - - - + + + tag = [a for a in args if a.startswith('--tag=')] - if tag: + if tag: args.remove(tag[0]) tag = tag[0][6:] @@ -1368,8 +1368,8 @@ def check_pythia(self, args): if self.results.lastrun: args.insert(0, self.results.lastrun) else: - raise self.InvalidCmd('No run name currently define. Please add this information.') - + raise self.InvalidCmd('No run name currently define. Please add this information.') + if len(args) >= 1: if args[0] != self.run_name and\ not os.path.exists(pjoin(self.me_dir,'Events',args[0], 'unweighted_events.lhe.gz')): @@ -1388,21 +1388,21 @@ def check_pythia(self, args): files.ln(input_file, os.path.dirname(output_file)) else: misc.gunzip(input_file, keep=True, stdout=output_file) - + args.append(mode) - + def check_pythia8(self, args): """Check the argument for pythia command - syntax: pythia8 [NAME] + syntax: pythia8 [NAME] Note that other option are already removed at this point - """ + """ mode = None laststep = [arg for arg in args if arg.startswith('--laststep=')] if laststep and len(laststep)==1: mode = laststep[0].split('=')[-1] if mode not in ['auto', 'pythia','pythia8','delphes']: self.help_pythia8() - raise self.InvalidCmd('invalid %s argument'% args[-1]) + raise self.InvalidCmd('invalid %s argument'% args[-1]) elif laststep: raise self.InvalidCmd('only one laststep argument is allowed') @@ -1410,7 +1410,7 @@ def check_pythia8(self, args): if not self.options['pythia8_path']: logger.info('Retry reading configuration file to find pythia8 path') self.set_configuration() - + if not self.options['pythia8_path'] or not \ os.path.exists(pjoin(self.options['pythia8_path'],'bin','pythia8-config')): error_msg = 'No valid pythia8 path set.\n' @@ -1421,7 +1421,7 @@ def check_pythia8(self, args): raise self.InvalidCmd(error_msg) tag = [a for a in args if a.startswith('--tag=')] - if tag: + if tag: args.remove(tag[0]) tag = tag[0][6:] @@ -1430,11 +1430,11 @@ def check_pythia8(self, args): args.insert(0, self.results.lastrun) else: raise self.InvalidCmd('No run name currently define. '+ - 'Please add this information.') - + 'Please add this information.') + if len(args) >= 1: if args[0] != self.run_name and\ - not os.path.exists(pjoin(self.me_dir,'Events',args[0], + not os.path.exists(pjoin(self.me_dir,'Events',args[0], 'unweighted_events.lhe.gz')): raise self.InvalidCmd('No events file corresponding to %s run. ' % args[0]) @@ -1451,9 +1451,9 @@ def check_pythia8(self, args): else: raise self.InvalidCmd('No event file corresponding to %s run. ' % self.run_name) - + args.append(mode) - + def check_remove(self, args): """Check that the remove command is valid""" @@ -1484,33 +1484,33 @@ def check_plot(self, args): madir = self.options['madanalysis_path'] td = self.options['td_path'] - + if not madir or not td: logger.info('Retry to read configuration file to find madanalysis/td') self.set_configuration() madir = self.options['madanalysis_path'] - td = self.options['td_path'] - + td = self.options['td_path'] + if not madir: error_msg = 'No valid MadAnalysis path set.\n' error_msg += 'Please use the set command to define the path and retry.\n' error_msg += 'You can also define it in the configuration file.\n' - raise self.InvalidCmd(error_msg) + raise self.InvalidCmd(error_msg) if not td: error_msg = 'No valid td path set.\n' error_msg += 'Please use the set command to define the path and retry.\n' error_msg += 'You can also define it in the configuration file.\n' - raise self.InvalidCmd(error_msg) - + raise self.InvalidCmd(error_msg) + if len(args) == 0: if not hasattr(self, 'run_name') or not self.run_name: self.help_plot() - raise self.InvalidCmd('No run name currently define. Please add this information.') + raise self.InvalidCmd('No run name currently define. Please add this information.') args.append('all') return - + if args[0] not in self._plot_mode: self.set_run_name(args[0], level='plot') del args[0] @@ -1518,45 +1518,45 @@ def check_plot(self, args): args.append('all') elif not self.run_name: self.help_plot() - raise self.InvalidCmd('No run name currently define. Please add this information.') - + raise self.InvalidCmd('No run name currently define. Please add this information.') + for arg in args: if arg not in self._plot_mode and arg != self.run_name: self.help_plot() - raise self.InvalidCmd('unknown options %s' % arg) - + raise self.InvalidCmd('unknown options %s' % arg) + def check_syscalc(self, args): """Check the argument for the syscalc command syscalc run_name modes""" scdir = self.options['syscalc_path'] - + if not scdir: logger.info('Retry to read configuration file to find SysCalc') self.set_configuration() scdir = self.options['syscalc_path'] - + if not scdir: error_msg = 'No valid SysCalc path set.\n' error_msg += 'Please use the set command to define the path and retry.\n' error_msg += 'You can also define it in the configuration file.\n' error_msg += 'Please note that you need to compile SysCalc first.' - raise self.InvalidCmd(error_msg) - + raise self.InvalidCmd(error_msg) + if len(args) == 0: if not hasattr(self, 'run_name') or not self.run_name: self.help_syscalc() - raise self.InvalidCmd('No run name currently defined. Please add this information.') + raise self.InvalidCmd('No run name currently defined. Please add this information.') args.append('all') return #deal options tag = [a for a in args if a.startswith('--tag=')] - if tag: + if tag: args.remove(tag[0]) tag = tag[0][6:] - + if args[0] not in self._syscalc_mode: self.set_run_name(args[0], tag=tag, level='syscalc') del args[0] @@ -1564,61 +1564,61 @@ def check_syscalc(self, args): args.append('all') elif not self.run_name: self.help_syscalc() - raise self.InvalidCmd('No run name currently defined. Please add this information.') + raise self.InvalidCmd('No run name currently defined. Please add this information.') elif tag and tag != self.run_tag: self.set_run_name(self.run_name, tag=tag, level='syscalc') - + for arg in args: if arg not in self._syscalc_mode and arg != self.run_name: self.help_syscalc() - raise self.InvalidCmd('unknown options %s' % arg) + raise self.InvalidCmd('unknown options %s' % arg) if self.run_card['use_syst'] not in self.true: raise self.InvalidCmd('Run %s does not include ' % self.run_name + \ 'systematics information needed for syscalc.') - - + + def check_pgs(self, arg, no_default=False): """Check the argument for pythia command - syntax is "pgs [NAME]" + syntax is "pgs [NAME]" Note that other option are already remove at this point """ - + # If not pythia-pgs path if not self.options['pythia-pgs_path']: logger.info('Retry to read configuration file to find pythia-pgs path') self.set_configuration() - + if not self.options['pythia-pgs_path'] or not \ os.path.exists(pjoin(self.options['pythia-pgs_path'],'src')): error_msg = 'No valid pythia-pgs path set.\n' error_msg += 'Please use the set command to define the path and retry.\n' error_msg += 'You can also define it in the configuration file.\n' - raise self.InvalidCmd(error_msg) - + raise self.InvalidCmd(error_msg) + tag = [a for a in arg if a.startswith('--tag=')] - if tag: + if tag: arg.remove(tag[0]) tag = tag[0][6:] - - + + if len(arg) == 0 and not self.run_name: if self.results.lastrun: arg.insert(0, self.results.lastrun) else: - raise self.InvalidCmd('No run name currently define. Please add this information.') - + raise self.InvalidCmd('No run name currently define. Please add this information.') + if len(arg) == 1 and self.run_name == arg[0]: arg.pop(0) - + if not len(arg) and \ not os.path.exists(pjoin(self.me_dir,'Events','pythia_events.hep')): if not no_default: self.help_pgs() raise self.InvalidCmd('''No file file pythia_events.hep currently available Please specify a valid run_name''') - - lock = None + + lock = None if len(arg) == 1: prev_tag = self.set_run_name(arg[0], tag, 'pgs') if not os.path.exists(pjoin(self.me_dir,'Events',self.run_name,'%s_pythia_events.hep.gz' % prev_tag)): @@ -1626,25 +1626,25 @@ def check_pgs(self, arg, no_default=False): else: input_file = pjoin(self.me_dir,'Events', self.run_name, '%s_pythia_events.hep.gz' % prev_tag) output_file = pjoin(self.me_dir, 'Events', 'pythia_events.hep') - lock = cluster.asyncrone_launch('gunzip',stdout=open(output_file,'w'), + lock = cluster.asyncrone_launch('gunzip',stdout=open(output_file,'w'), argument=['-c', input_file]) else: - if tag: + if tag: self.run_card['run_tag'] = tag self.set_run_name(self.run_name, tag, 'pgs') - - return lock + + return lock def check_display(self, args): """check the validity of line syntax is "display XXXXX" """ - + if len(args) < 1 or args[0] not in self._display_opts: self.help_display() raise self.InvalidCmd - + if args[0] == 'variable' and len(args) !=2: raise self.InvalidCmd('variable need a variable name') @@ -1654,39 +1654,39 @@ def check_display(self, args): def check_import(self, args): """check the validity of line""" - + if not args: self.help_import() raise self.InvalidCmd('wrong \"import\" format') - + if args[0] != 'command': args.insert(0,'command') - - + + if not len(args) == 2 or not os.path.exists(args[1]): raise self.InvalidCmd('PATH is mandatory for import command\n') - + #=============================================================================== # CompleteForCmd #=============================================================================== class CompleteForCmd(CheckValidForCmd): """ The Series of help routine for the MadGraphCmd""" - - + + def complete_banner_run(self, text, line, begidx, endidx, formatting=True): "Complete the banner run command" try: - - + + args = self.split_arg(line[0:begidx], error=False) - + if args[-1].endswith(os.path.sep): return self.path_completion(text, os.path.join('.',*[a for a in args \ - if a.endswith(os.path.sep)])) - - + if a.endswith(os.path.sep)])) + + if len(args) > 1: # only options are possible tags = misc.glob('%s_*_banner.txt' % args[1], pjoin(self.me_dir, 'Events' , args[1])) @@ -1697,9 +1697,9 @@ def complete_banner_run(self, text, line, begidx, endidx, formatting=True): else: return self.list_completion(text, tags) return self.list_completion(text, tags +['--name=','-f'], line) - + # First argument - possibilites = {} + possibilites = {} comp = self.path_completion(text, os.path.join('.',*[a for a in args \ if a.endswith(os.path.sep)])) @@ -1711,10 +1711,10 @@ def complete_banner_run(self, text, line, begidx, endidx, formatting=True): run_list = misc.glob(pjoin('*','*_banner.txt'), pjoin(self.me_dir, 'Events')) run_list = [n.rsplit('/',2)[1] for n in run_list] possibilites['RUN Name'] = self.list_completion(text, run_list) - + return self.deal_multiple_categories(possibilites, formatting) - - + + except Exception as error: print(error) @@ -1732,12 +1732,12 @@ def complete_history(self, text, line, begidx, endidx): if len(args) == 1: return self.path_completion(text) - - def complete_open(self, text, line, begidx, endidx): + + def complete_open(self, text, line, begidx, endidx): """ complete the open command """ args = self.split_arg(line[0:begidx]) - + # Directory continuation if os.path.sep in args[-1] + text: return self.path_completion(text, @@ -1751,10 +1751,10 @@ def complete_open(self, text, line, begidx, endidx): if os.path.isfile(os.path.join(path,'README')): possibility.append('README') if os.path.isdir(os.path.join(path,'Cards')): - possibility += [f for f in os.listdir(os.path.join(path,'Cards')) + possibility += [f for f in os.listdir(os.path.join(path,'Cards')) if f.endswith('.dat')] if os.path.isdir(os.path.join(path,'HTML')): - possibility += [f for f in os.listdir(os.path.join(path,'HTML')) + possibility += [f for f in os.listdir(os.path.join(path,'HTML')) if f.endswith('.html') and 'default' not in f] else: possibility.extend(['./','../']) @@ -1763,7 +1763,7 @@ def complete_open(self, text, line, begidx, endidx): if os.path.exists('MG5_debug'): possibility.append('MG5_debug') return self.list_completion(text, possibility) - + def complete_set(self, text, line, begidx, endidx): "Complete the set command" @@ -1784,27 +1784,27 @@ def complete_set(self, text, line, begidx, endidx): elif len(args) >2 and args[-1].endswith(os.path.sep): return self.path_completion(text, os.path.join('.',*[a for a in args if a.endswith(os.path.sep)]), - only_dirs = True) - + only_dirs = True) + def complete_survey(self, text, line, begidx, endidx): """ Complete the survey command """ - + if line.endswith('nb_core=') and not text: import multiprocessing max = multiprocessing.cpu_count() return [str(i) for i in range(2,max+1)] - + return self.list_completion(text, self._run_options, line) - + complete_refine = complete_survey complete_combine_events = complete_survey complite_store = complete_survey complete_generate_events = complete_survey complete_create_gridpack = complete_survey - + def complete_generate_events(self, text, line, begidx, endidx): """ Complete the generate events""" - + if line.endswith('nb_core=') and not text: import multiprocessing max = multiprocessing.cpu_count() @@ -1813,17 +1813,17 @@ def complete_generate_events(self, text, line, begidx, endidx): return ['parton','pythia','pgs','delphes'] elif '--laststep=' in line.split()[-1] and line and line[-1] != ' ': return self.list_completion(text,['parton','pythia','pgs','delphes'],line) - + opts = self._run_options + self._generate_options return self.list_completion(text, opts, line) def complete_initMadLoop(self, text, line, begidx, endidx): "Complete the initMadLoop command" - + numbers = [str(i) for i in range(10)] opts = ['-f','-r','--nPS='] - + args = self.split_arg(line[0:begidx], error=False) if len(line) >=6 and line[begidx-6:begidx]=='--nPS=': return self.list_completion(text, numbers, line) @@ -1840,18 +1840,18 @@ def complete_launch(self, *args, **opts): def complete_calculate_decay_widths(self, text, line, begidx, endidx): """ Complete the calculate_decay_widths command""" - + if line.endswith('nb_core=') and not text: import multiprocessing max = multiprocessing.cpu_count() return [str(i) for i in range(2,max+1)] - + opts = self._run_options + self._calculate_decay_options return self.list_completion(text, opts, line) - + def complete_display(self, text, line, begidx, endidx): - """ Complete the display command""" - + """ Complete the display command""" + args = self.split_arg(line[0:begidx], error=False) if len(args) >= 2 and args[1] =='results': start = line.find('results') @@ -1860,44 +1860,44 @@ def complete_display(self, text, line, begidx, endidx): def complete_multi_run(self, text, line, begidx, endidx): """complete multi run command""" - + args = self.split_arg(line[0:begidx], error=False) if len(args) == 1: data = [str(i) for i in range(0,20)] return self.list_completion(text, data, line) - + if line.endswith('run=') and not text: return ['parton','pythia','pgs','delphes'] elif '--laststep=' in line.split()[-1] and line and line[-1] != ' ': return self.list_completion(text,['parton','pythia','pgs','delphes'],line) - + opts = self._run_options + self._generate_options return self.list_completion(text, opts, line) - - - + + + if line.endswith('nb_core=') and not text: import multiprocessing max = multiprocessing.cpu_count() return [str(i) for i in range(2,max+1)] opts = self._run_options + self._generate_options return self.list_completion(text, opts, line) - + def complete_plot(self, text, line, begidx, endidx): """ Complete the plot command """ - + args = self.split_arg(line[0:begidx], error=False) if len(args) > 1: return self.list_completion(text, self._plot_mode) else: return self.list_completion(text, self._plot_mode + list(self.results.keys())) - + def complete_syscalc(self, text, line, begidx, endidx, formatting=True): """ Complete the syscalc command """ - + output = {} args = self.split_arg(line[0:begidx], error=False) - + if len(args) <=1: output['RUN_NAME'] = self.list_completion(list(self.results.keys())) output['MODE'] = self.list_completion(text, self._syscalc_mode) @@ -1907,12 +1907,12 @@ def complete_syscalc(self, text, line, begidx, endidx, formatting=True): if run in self.results: tags = ['--tag=%s' % tag['tag'] for tag in self.results[run]] output['options'] += tags - + return self.deal_multiple_categories(output, formatting) - + def complete_remove(self, text, line, begidx, endidx): """Complete the remove command """ - + args = self.split_arg(line[0:begidx], error=False) if len(args) > 1 and (text.startswith('--t')): run = args[1] @@ -1932,8 +1932,8 @@ def complete_remove(self, text, line, begidx, endidx): data = misc.glob(pjoin('*','*_banner.txt'), pjoin(self.me_dir, 'Events')) data = [n.rsplit('/',2)[1] for n in data] return self.list_completion(text, ['all'] + data) - - + + def complete_shower(self,text, line, begidx, endidx): "Complete the shower command" args = self.split_arg(line[0:begidx], error=False) @@ -1941,7 +1941,7 @@ def complete_shower(self,text, line, begidx, endidx): return self.list_completion(text, self._interfaced_showers) elif len(args)>1 and args[1] in self._interfaced_showers: return getattr(self, 'complete_%s' % text)\ - (text, args[1],line.replace(args[0]+' ',''), + (text, args[1],line.replace(args[0]+' ',''), begidx-len(args[0])-1, endidx-len(args[0])-1) def complete_pythia8(self,text, line, begidx, endidx): @@ -1955,11 +1955,11 @@ def complete_pythia8(self,text, line, begidx, endidx): if not self.run_name: return tmp1 else: - tmp2 = self.list_completion(text, self._run_options + ['-f', + tmp2 = self.list_completion(text, self._run_options + ['-f', '--no_default', '--tag='], line) return tmp1 + tmp2 elif line[-1] != '=': - return self.list_completion(text, self._run_options + ['-f', + return self.list_completion(text, self._run_options + ['-f', '--no_default','--tag='], line) def complete_madanalysis5_parton(self,text, line, begidx, endidx): @@ -1978,19 +1978,19 @@ def complete_madanalysis5_parton(self,text, line, begidx, endidx): else: tmp2 = self.list_completion(text, ['-f', '--MA5_stdout_lvl=','--no_default','--tag='], line) - return tmp1 + tmp2 + return tmp1 + tmp2 elif '--MA5_stdout_lvl=' in line and not any(arg.startswith( '--MA5_stdout_lvl=') for arg in args): - return self.list_completion(text, - ['--MA5_stdout_lvl=%s'%opt for opt in + return self.list_completion(text, + ['--MA5_stdout_lvl=%s'%opt for opt in ['logging.INFO','logging.DEBUG','logging.WARNING', 'logging.CRITICAL','90']], line) else: - return self.list_completion(text, ['-f', + return self.list_completion(text, ['-f', '--MA5_stdout_lvl=','--no_default','--tag='], line) def complete_pythia(self,text, line, begidx, endidx): - "Complete the pythia command" + "Complete the pythia command" args = self.split_arg(line[0:begidx], error=False) if len(args) == 1: @@ -2001,16 +2001,16 @@ def complete_pythia(self,text, line, begidx, endidx): if not self.run_name: return tmp1 else: - tmp2 = self.list_completion(text, self._run_options + ['-f', + tmp2 = self.list_completion(text, self._run_options + ['-f', '--no_default', '--tag='], line) return tmp1 + tmp2 elif line[-1] != '=': - return self.list_completion(text, self._run_options + ['-f', + return self.list_completion(text, self._run_options + ['-f', '--no_default','--tag='], line) def complete_pgs(self,text, line, begidx, endidx): "Complete the pythia command" - args = self.split_arg(line[0:begidx], error=False) + args = self.split_arg(line[0:begidx], error=False) if len(args) == 1: #return valid run_name data = misc.glob(pjoin('*', '*_pythia_events.hep.gz'), pjoin(self.me_dir, 'Events')) @@ -2019,23 +2019,23 @@ def complete_pgs(self,text, line, begidx, endidx): if not self.run_name: return tmp1 else: - tmp2 = self.list_completion(text, self._run_options + ['-f', + tmp2 = self.list_completion(text, self._run_options + ['-f', '--tag=' ,'--no_default'], line) - return tmp1 + tmp2 + return tmp1 + tmp2 else: - return self.list_completion(text, self._run_options + ['-f', + return self.list_completion(text, self._run_options + ['-f', '--tag=','--no_default'], line) - complete_delphes = complete_pgs - complete_rivet = complete_pgs + complete_delphes = complete_pgs + complete_rivet = complete_pgs #=============================================================================== # MadEventCmd #=============================================================================== class MadEventCmd(CompleteForCmd, CmdExtended, HelpToCmd, common_run.CommonRunCmd): - """The command line processor of Mad Graph""" - + """The command line processor of Mad Graph""" + LO = True # Truth values @@ -2063,7 +2063,7 @@ class MadEventCmd(CompleteForCmd, CmdExtended, HelpToCmd, common_run.CommonRunCm cluster_mode = 0 queue = 'madgraph' nb_core = None - + next_possibility = { 'start': ['generate_events [OPTIONS]', 'multi_run [OPTIONS]', 'calculate_decay_widths [OPTIONS]', @@ -2080,9 +2080,9 @@ class MadEventCmd(CompleteForCmd, CmdExtended, HelpToCmd, common_run.CommonRunCm 'pgs': ['generate_events [OPTIONS]', 'multi_run [OPTIONS]'], 'delphes' : ['generate_events [OPTIONS]', 'multi_run [OPTIONS]'] } - + asking_for_run = AskRun - + ############################################################################ def __init__(self, me_dir = None, options={}, *completekey, **stdin): """ add information to the cmd """ @@ -2095,16 +2095,16 @@ def __init__(self, me_dir = None, options={}, *completekey, **stdin): if self.web: os.system('touch %s' % pjoin(self.me_dir,'Online')) - self.load_results_db() + self.load_results_db() self.results.def_web_mode(self.web) self.Gdirs = None - + self.prompt = "%s>"%os.path.basename(pjoin(self.me_dir)) self.configured = 0 # time for reading the card self._options = {} # for compatibility with extended_cmd - - + + def pass_in_web_mode(self): """configure web data""" self.web = True @@ -2113,22 +2113,22 @@ def pass_in_web_mode(self): if os.environ['MADGRAPH_BASE']: self.options['mg5_path'] = pjoin(os.environ['MADGRAPH_BASE'],'MG5') - ############################################################################ + ############################################################################ def check_output_type(self, path): """ Check that the output path is a valid madevent directory """ - + bin_path = os.path.join(path,'bin') if os.path.isfile(os.path.join(bin_path,'generate_events')): return True - else: + else: return False ############################################################################ def set_configuration(self, amcatnlo=False, final=True, **opt): - """assign all configuration variable from file + """assign all configuration variable from file loop over the different config file if config_file not define """ - - super(MadEventCmd,self).set_configuration(amcatnlo=amcatnlo, + + super(MadEventCmd,self).set_configuration(amcatnlo=amcatnlo, final=final, **opt) if not final: @@ -2171,24 +2171,24 @@ def set_configuration(self, amcatnlo=False, final=True, **opt): if not os.path.exists(pjoin(path, 'sys_calc')): logger.info("No valid SysCalc path found") continue - # No else since the next line reinitialize the option to the + # No else since the next line reinitialize the option to the #previous value anyway self.options[key] = os.path.realpath(path) continue else: self.options[key] = None - - + + return self.options ############################################################################ - def do_banner_run(self, line): + def do_banner_run(self, line): """Make a run from the banner file""" - + args = self.split_arg(line) #check the validity of the arguments - self.check_banner_run(args) - + self.check_banner_run(args) + # Remove previous cards for name in ['delphes_trigger.dat', 'delphes_card.dat', 'pgs_card.dat', 'pythia_card.dat', 'madspin_card.dat', @@ -2197,20 +2197,20 @@ def do_banner_run(self, line): os.remove(pjoin(self.me_dir, 'Cards', name)) except Exception: pass - + banner_mod.split_banner(args[0], self.me_dir, proc_card=False) - + # Check if we want to modify the run if not self.force: ans = self.ask('Do you want to modify the Cards?', 'n', ['y','n']) if ans == 'n': self.force = True - + # Call Generate events self.exec_cmd('generate_events %s %s' % (self.run_name, self.force and '-f' or '')) - - - + + + ############################################################################ def do_display(self, line, output=sys.stdout): """Display current internal status""" @@ -2223,7 +2223,7 @@ def do_display(self, line, output=sys.stdout): #return valid run_name data = misc.glob(pjoin('*','*_banner.txt'), pjoin(self.me_dir, 'Events')) data = [n.rsplit('/',2)[1:] for n in data] - + if data: out = {} for name, tag in data: @@ -2235,11 +2235,11 @@ def do_display(self, line, output=sys.stdout): print('the runs available are:') for run_name, tags in out.items(): print(' run: %s' % run_name) - print(' tags: ', end=' ') + print(' tags: ', end=' ') print(', '.join(tags)) else: print('No run detected.') - + elif args[0] == 'options': outstr = " Run Options \n" outstr += " ----------- \n" @@ -2260,8 +2260,8 @@ def do_display(self, line, output=sys.stdout): if value == default: outstr += " %25s \t:\t%s\n" % (key,value) else: - outstr += " %25s \t:\t%s (user set)\n" % (key,value) - outstr += "\n" + outstr += " %25s \t:\t%s (user set)\n" % (key,value) + outstr += "\n" outstr += " Configuration Options \n" outstr += " --------------------- \n" for key, default in self.options_configuration.items(): @@ -2275,15 +2275,15 @@ def do_display(self, line, output=sys.stdout): self.do_print_results(' '.join(args[1:])) else: super(MadEventCmd, self).do_display(line, output) - + def do_save(self, line, check=True, to_keep={}): - """Not in help: Save information to file""" + """Not in help: Save information to file""" args = self.split_arg(line) # Check argument validity if check: self.check_save(args) - + if args[0] == 'options': # First look at options which should be put in MG5DIR/input to_define = {} @@ -2295,7 +2295,7 @@ def do_save(self, line, check=True, to_keep={}): for key, default in self.options_madevent.items(): if self.options[key] != self.options_madevent[key]: to_define[key] = self.options[key] - + if '--all' in args: for key, default in self.options_madgraph.items(): if self.options[key] != self.options_madgraph[key]: @@ -2312,12 +2312,12 @@ def do_save(self, line, check=True, to_keep={}): filepath = pjoin(self.me_dir, 'Cards', 'me5_configuration.txt') basefile = pjoin(self.me_dir, 'Cards', 'me5_configuration.txt') basedir = self.me_dir - + if to_keep: to_define = to_keep self.write_configuration(filepath, basefile, basedir, to_define) - - + + def do_edit_cards(self, line): @@ -2326,80 +2326,80 @@ def do_edit_cards(self, line): # Check argument's validity mode = self.check_generate_events(args) self.ask_run_configuration(mode) - + return ############################################################################ - + ############################################################################ def do_restart_gridpack(self, line): """ syntax restart_gridpack --precision=1.0 --restart_zero collect the result of the current run and relaunch each channel - not completed or optionally a completed one with a precision worse than + not completed or optionally a completed one with a precision worse than a threshold (and/or the zero result channel)""" - - + + args = self.split_arg(line) # Check argument's validity self.check_survey(args) - + # initialize / remove lhapdf mode #self.run_card = banner_mod.RunCard(pjoin(self.me_dir, 'Cards', 'run_card.dat')) #self.configure_directory() - + gensym = gen_ximprove.gensym(self) - + min_precision = 1.0 resubmit_zero=False if '--precision=' in line: s = line.index('--precision=') + len('--precision=') arg=line[s:].split(1)[0] min_precision = float(arg) - + if '--restart_zero' in line: resubmit_zero = True - - + + gensym.resubmit(min_precision, resubmit_zero) self.monitor(run_type='All jobs submitted for gridpack', html=True) #will be done during the refine (more precisely in gen_ximprove) cross, error = sum_html.make_all_html_results(self) self.results.add_detail('cross', cross) - self.results.add_detail('error', error) + self.results.add_detail('error', error) self.exec_cmd("print_results %s" % self.run_name, - errorhandling=False, printcmd=False, precmd=False, postcmd=False) - + errorhandling=False, printcmd=False, precmd=False, postcmd=False) + self.results.add_detail('run_statistics', dict(gensym.run_statistics)) - + #self.exec_cmd('combine_events', postcmd=False) #self.exec_cmd('store_events', postcmd=False) self.exec_cmd('decay_events -from_cards', postcmd=False) self.exec_cmd('create_gridpack', postcmd=False) - - - ############################################################################ + + + ############################################################################ ############################################################################ def do_generate_events(self, line): """Main Commands: launch the full chain """ - + self.banner = None self.Gdirs = None - + args = self.split_arg(line) # Check argument's validity mode = self.check_generate_events(args) switch_mode = self.ask_run_configuration(mode, args) if not args: - # No run name assigned -> assigned one automaticaly + # No run name assigned -> assigned one automaticaly self.set_run_name(self.find_available_run_name(self.me_dir), None, 'parton') else: self.set_run_name(args[0], None, 'parton', True) args.pop(0) - + self.run_generate_events(switch_mode, args) self.postprocessing() @@ -2420,8 +2420,8 @@ def postprocessing(self): def rivet_postprocessing(self, rivet_config, postprocess_RIVET, postprocess_CONTUR): - # Check number of Rivet jobs to run - run_dirs = [pjoin(self.me_dir, 'Events',run_name) + # Check number of Rivet jobs to run + run_dirs = [pjoin(self.me_dir, 'Events',run_name) for run_name in self.postprocessing_dirs] nb_rivet = len(run_dirs) @@ -2550,10 +2550,10 @@ def wait_monitoring(Idle, Running, Done): wrapper = open(pjoin(self.me_dir, "Analysis", "contur", "run_contur.sh"), "w") wrapper.write(set_env) - + wrapper.write('{0}\n'.format(contur_cmd)) wrapper.close() - + misc.call(["run_contur.sh"], cwd=(pjoin(self.me_dir, "Analysis", "contur"))) logger.info("Contur outputs are stored in {0}".format(pjoin(self.me_dir, "Analysis", "contur","conturPlot"))) @@ -2572,7 +2572,7 @@ def run_generate_events(self, switch_mode, args): self.do_set('run_mode 2') self.do_set('nb_core 1') - if self.run_card['gridpack'] in self.true: + if self.run_card['gridpack'] in self.true: # Running gridpack warmup gridpack_opts=[('accuracy', 0.01), ('points', 2000), @@ -2593,7 +2593,7 @@ def run_generate_events(self, switch_mode, args): # Regular run mode logger.info('Generating %s events with run name %s' % (self.run_card['nevents'], self.run_name)) - + self.exec_cmd('survey %s %s' % (self.run_name,' '.join(args)), postcmd=False) nb_event = self.run_card['nevents'] @@ -2601,7 +2601,7 @@ def run_generate_events(self, switch_mode, args): self.exec_cmd('refine %s' % nb_event, postcmd=False) if not float(self.results.current['cross']): # Zero cross-section. Try to guess why - text = '''Survey return zero cross section. + text = '''Survey return zero cross section. Typical reasons are the following: 1) A massive s-channel particle has a width set to zero. 2) The pdf are zero for at least one of the initial state particles @@ -2613,17 +2613,17 @@ def run_generate_events(self, switch_mode, args): raise ZeroResult('See https://cp3.irmp.ucl.ac.be/projects/madgraph/wiki/FAQ-General-14') else: bypass_run = True - + #we can bypass the following if scan and first result is zero if not bypass_run: self.exec_cmd('refine %s --treshold=%s' % (nb_event,self.run_card['second_refine_treshold']) , postcmd=False) - + self.exec_cmd('combine_events', postcmd=False,printcmd=False) self.print_results_in_shell(self.results.current) if self.run_card['use_syst']: - if self.run_card['systematics_program'] == 'auto': + if self.run_card['systematics_program'] == 'auto': scdir = self.options['syscalc_path'] if not scdir or not os.path.exists(scdir): to_use = 'systematics' @@ -2634,26 +2634,26 @@ def run_generate_events(self, switch_mode, args): else: logger.critical('Unvalid options for systematics_program: bypass computation of systematics variations.') to_use = 'none' - + if to_use == 'systematics': if self.run_card['systematics_arguments'] != ['']: self.exec_cmd('systematics %s %s ' % (self.run_name, - ' '.join(self.run_card['systematics_arguments'])), + ' '.join(self.run_card['systematics_arguments'])), postcmd=False, printcmd=False) else: self.exec_cmd('systematics %s --from_card' % self.run_name, - postcmd=False,printcmd=False) + postcmd=False,printcmd=False) elif to_use == 'syscalc': self.run_syscalc('parton') - - - self.create_plot('parton') - self.exec_cmd('store_events', postcmd=False) + + + self.create_plot('parton') + self.exec_cmd('store_events', postcmd=False) if self.run_card['boost_event'].strip() and self.run_card['boost_event'] != 'False': self.boost_events() - - - self.exec_cmd('reweight -from_cards', postcmd=False) + + + self.exec_cmd('reweight -from_cards', postcmd=False) self.exec_cmd('decay_events -from_cards', postcmd=False) if self.run_card['time_of_flight']>=0: self.exec_cmd("add_time_of_flight --threshold=%s" % self.run_card['time_of_flight'] ,postcmd=False) @@ -2664,43 +2664,43 @@ def run_generate_events(self, switch_mode, args): self.create_root_file(input , output) self.exec_cmd('madanalysis5_parton --no_default', postcmd=False, printcmd=False) - # shower launches pgs/delphes if needed + # shower launches pgs/delphes if needed self.exec_cmd('shower --no_default', postcmd=False, printcmd=False) self.exec_cmd('madanalysis5_hadron --no_default', postcmd=False, printcmd=False) self.exec_cmd('rivet --no_default', postcmd=False, printcmd=False) self.store_result() - - if self.allow_notification_center: - misc.system_notify('Run %s finished' % os.path.basename(self.me_dir), - '%s: %s +- %s ' % (self.results.current['run_name'], + + if self.allow_notification_center: + misc.system_notify('Run %s finished' % os.path.basename(self.me_dir), + '%s: %s +- %s ' % (self.results.current['run_name'], self.results.current['cross'], self.results.current['error'])) - + def boost_events(self): - + if not self.run_card['boost_event']: return - + if self.run_card['boost_event'].startswith('lambda'): if not isinstance(self, cmd.CmdShell): raise Exception("boost not allowed online") filter = eval(self.run_card['boost_event']) else: raise Exception - + path = [pjoin(self.me_dir, 'Events', self.run_name, 'unweighted_events.lhe.gz'), pjoin(self.me_dir, 'Events', self.run_name, 'unweighted_events.lhe'), pjoin(self.me_dir, 'Events', self.run_name, 'events.lhe.gz'), pjoin(self.me_dir, 'Events', self.run_name, 'events.lhe')] - + for p in path: if os.path.exists(p): event_path = p break else: raise Exception("fail to find event file for the boost") - - + + lhe = lhe_parser.EventFile(event_path) with misc.TMP_directory() as tmp_dir: output = lhe_parser.EventFile(pjoin(tmp_dir, os.path.basename(event_path)), 'w') @@ -2711,28 +2711,28 @@ def boost_events(self): event.boost(filter) #write this modify event output.write(str(event)) - output.write('\n') + output.write('\n') lhe.close() - files.mv(pjoin(tmp_dir, os.path.basename(event_path)), event_path) - - - - - + files.mv(pjoin(tmp_dir, os.path.basename(event_path)), event_path) + + + + + def do_initMadLoop(self,line): - """Compile and run MadLoop for a certain number of PS point so as to + """Compile and run MadLoop for a certain number of PS point so as to initialize MadLoop (setup the zero helicity and loop filter.)""" - + args = line.split() # Check argument's validity options = self.check_initMadLoop(args) - + if not options['force']: self.ask_edit_cards(['MadLoopParams.dat'], mode='fixed', plot=False) self.exec_cmd('treatcards loop --no_MadLoopInit') if options['refresh']: - for filter in misc.glob('*Filter*', + for filter in misc.glob('*Filter*', pjoin(self.me_dir,'SubProcesses','MadLoop5_resources')): logger.debug("Resetting filter '%s'."%os.path.basename(filter)) os.remove(filter) @@ -2753,14 +2753,14 @@ def do_initMadLoop(self,line): def do_launch(self, line, *args, **opt): """Main Commands: exec generate_events for 2>N and calculate_width for 1>N""" - + if self.ninitial == 1: logger.info("Note that since 2.3. The launch for 1>N pass in event generation\n"+ " To have the previous behavior use the calculate_decay_widths function") # self.do_calculate_decay_widths(line, *args, **opt) #else: self.do_generate_events(line, *args, **opt) - + def print_results_in_shell(self, data): """Have a nice results prints in the shell, data should be of type: gen_crossxhtml.OneTagResults""" @@ -2770,7 +2770,7 @@ def print_results_in_shell(self, data): if data['run_statistics']: globalstat = sum_html.RunStatistics() - + logger.info(" " ) logger.debug(" === Run statistics summary ===") for key, value in data['run_statistics'].items(): @@ -2786,13 +2786,13 @@ def print_results_in_shell(self, data): logger.warning(globalstat.get_warning_text()) logger.info(" ") - + logger.info(" === Results Summary for run: %s tag: %s ===\n" % (data['run_name'],data['tag'])) - + total_time = int(sum(_['cumulative_timing'] for _ in data['run_statistics'].values())) if total_time > 0: logger.info(" Cumulative sequential time for this run: %s"%misc.format_time(total_time)) - + if self.ninitial == 1: logger.info(" Width : %.4g +- %.4g GeV" % (data['cross'], data['error'])) else: @@ -2810,18 +2810,18 @@ def print_results_in_shell(self, data): if len(split)!=3: continue scale, cross, error = split - cross_sections[float(scale)] = (float(cross), float(error)) + cross_sections[float(scale)] = (float(cross), float(error)) if len(cross_sections)>0: logger.info(' Pythia8 merged cross-sections are:') for scale in sorted(cross_sections.keys()): logger.info(' > Merging scale = %-6.4g : %-11.5g +/- %-7.2g [pb]'%\ (scale,cross_sections[scale][0],cross_sections[scale][1])) - + else: if self.ninitial == 1: logger.info(" Matched width : %.4g +- %.4g GeV" % (data['cross_pythia'], data['error_pythia'])) else: - logger.info(" Matched cross-section : %.4g +- %.4g pb" % (data['cross_pythia'], data['error_pythia'])) + logger.info(" Matched cross-section : %.4g +- %.4g pb" % (data['cross_pythia'], data['error_pythia'])) logger.info(" Nb of events after matching/merging : %d" % int(data['nb_event_pythia'])) if self.run_card['use_syst'] in self.true and \ (int(self.run_card['ickkw'])==1 or self.run_card['ktdurham']>0.0 @@ -2838,9 +2838,9 @@ def print_results_in_file(self, data, path, mode='w', format='full'): data should be of type: gen_crossxhtml.OneTagResults""" if not data: return - + fsock = open(path, mode) - + if data['run_statistics']: logger.debug(" === Run statistics summary ===") for key, value in data['run_statistics'].items(): @@ -2851,7 +2851,7 @@ def print_results_in_file(self, data, path, mode='w', format='full'): if format == "full": fsock.write(" === Results Summary for run: %s tag: %s process: %s ===\n" % \ (data['run_name'],data['tag'], os.path.basename(self.me_dir))) - + if self.ninitial == 1: fsock.write(" Width : %.4g +- %.4g GeV\n" % (data['cross'], data['error'])) else: @@ -2861,20 +2861,20 @@ def print_results_in_file(self, data, path, mode='w', format='full'): if self.ninitial == 1: fsock.write(" Matched Width : %.4g +- %.4g GeV\n" % (data['cross_pythia'], data['error_pythia'])) else: - fsock.write(" Matched Cross-section : %.4g +- %.4g pb\n" % (data['cross_pythia'], data['error_pythia'])) + fsock.write(" Matched Cross-section : %.4g +- %.4g pb\n" % (data['cross_pythia'], data['error_pythia'])) fsock.write(" Nb of events after Matching : %s\n" % data['nb_event_pythia']) fsock.write(" \n" ) elif format == "short": if mode == "w": fsock.write("# run_name tag cross error Nb_event cross_after_matching nb_event_after matching\n") - + if data['cross_pythia'] and data['nb_event_pythia']: text = "%(run_name)s %(tag)s %(cross)s %(error)s %(nb_event)s %(cross_pythia)s %(nb_event_pythia)s\n" else: text = "%(run_name)s %(tag)s %(cross)s %(error)s %(nb_event)s\n" fsock.write(text % data) - - ############################################################################ + + ############################################################################ def do_calculate_decay_widths(self, line): """Main Commands: launch decay width calculation and automatic inclusion of calculated widths and BRs in the param_card.""" @@ -2887,21 +2887,21 @@ def do_calculate_decay_widths(self, line): self.Gdirs = None if not args: - # No run name assigned -> assigned one automaticaly + # No run name assigned -> assigned one automaticaly self.set_run_name(self.find_available_run_name(self.me_dir)) else: self.set_run_name(args[0], reload_card=True) args.pop(0) self.configure_directory() - + # Running gridpack warmup opts=[('accuracy', accuracy), # default 0.01 ('points', 1000), ('iterations',9)] logger.info('Calculating decay widths with run name %s' % self.run_name) - + self.exec_cmd('survey %s %s' % \ (self.run_name, " ".join(['--' + opt + '=' + str(val) for (opt,val) \ @@ -2910,26 +2910,26 @@ def do_calculate_decay_widths(self, line): self.refine_mode = "old" # specify how to combine event self.exec_cmd('combine_events', postcmd=False) self.exec_cmd('store_events', postcmd=False) - + self.collect_decay_widths() self.print_results_in_shell(self.results.current) - self.update_status('calculate_decay_widths done', - level='parton', makehtml=False) + self.update_status('calculate_decay_widths done', + level='parton', makehtml=False) + - ############################################################################ def collect_decay_widths(self): - """ Collect the decay widths and calculate BRs for all particles, and put - in param_card form. + """ Collect the decay widths and calculate BRs for all particles, and put + in param_card form. """ - + particle_dict = {} # store the results run_name = self.run_name # Looping over the Subprocesses for P_path in SubProcesses.get_subP(self.me_dir): ids = SubProcesses.get_subP_ids(P_path) - # due to grouping we need to compute the ratio factor for the + # due to grouping we need to compute the ratio factor for the # ungroup resutls (that we need here). Note that initial particles # grouping are not at the same stage as final particle grouping nb_output = len(ids) / (len(set([p[0] for p in ids]))) @@ -2940,30 +2940,30 @@ def collect_decay_widths(self): particle_dict[particles[0]].append([particles[1:], result/nb_output]) except KeyError: particle_dict[particles[0]] = [[particles[1:], result/nb_output]] - + self.update_width_in_param_card(particle_dict, initial = pjoin(self.me_dir, 'Cards', 'param_card.dat'), output=pjoin(self.me_dir, 'Events', run_name, "param_card.dat")) - + @staticmethod def update_width_in_param_card(decay_info, initial=None, output=None): # Open the param_card.dat and insert the calculated decays and BRs - + if not output: output = initial - + param_card_file = open(initial) param_card = param_card_file.read().split('\n') param_card_file.close() decay_lines = [] line_number = 0 - # Read and remove all decays from the param_card + # Read and remove all decays from the param_card while line_number < len(param_card): line = param_card[line_number] if line.lower().startswith('decay'): - # Read decay if particle in decay_info - # DECAY 6 1.455100e+00 + # Read decay if particle in decay_info + # DECAY 6 1.455100e+00 line = param_card.pop(line_number) line = line.split() particle = 0 @@ -2996,7 +2996,7 @@ def update_width_in_param_card(decay_info, initial=None, output=None): break line=param_card[line_number] if particle and particle not in decay_info: - # No decays given, only total width + # No decays given, only total width decay_info[particle] = [[[], width]] else: # Not decay line_number += 1 @@ -3004,7 +3004,7 @@ def update_width_in_param_card(decay_info, initial=None, output=None): while not param_card[-1] or param_card[-1].startswith('#'): param_card.pop(-1) - # Append calculated and read decays to the param_card + # Append calculated and read decays to the param_card param_card.append("#\n#*************************") param_card.append("# Decay widths *") param_card.append("#*************************") @@ -3018,7 +3018,7 @@ def update_width_in_param_card(decay_info, initial=None, output=None): param_card.append("# BR NDA ID1 ID2 ...") brs = [[(val[1]/width).real, val[0]] for val in decay_info[key] if val[1]] for val in sorted(brs, reverse=True): - param_card.append(" %e %i %s # %s" % + param_card.append(" %e %i %s # %s" % (val[0].real, len(val[1]), " ".join([str(v) for v in val[1]]), val[0] * width @@ -3031,7 +3031,7 @@ def update_width_in_param_card(decay_info, initial=None, output=None): ############################################################################ def do_multi_run(self, line): - + args = self.split_arg(line) # Check argument's validity mode = self.check_multi_run(args) @@ -3047,7 +3047,7 @@ def do_multi_run(self, line): self.check_param_card(path, run=False) #store it locally to avoid relaunch param_card_iterator, self.param_card_iterator = self.param_card_iterator, [] - + crossoversig = 0 inv_sq_err = 0 nb_event = 0 @@ -3055,8 +3055,8 @@ def do_multi_run(self, line): self.nb_refine = 0 self.exec_cmd('generate_events %s_%s -f' % (main_name, i), postcmd=False) # Update collected value - nb_event += int(self.results[self.run_name][-1]['nb_event']) - self.results.add_detail('nb_event', nb_event , run=main_name) + nb_event += int(self.results[self.run_name][-1]['nb_event']) + self.results.add_detail('nb_event', nb_event , run=main_name) cross = self.results[self.run_name][-1]['cross'] error = self.results[self.run_name][-1]['error'] + 1e-99 crossoversig+=cross/error**2 @@ -3070,7 +3070,7 @@ def do_multi_run(self, line): os.mkdir(pjoin(self.me_dir,'Events', self.run_name)) except Exception: pass - os.system('%(bin)s/merge.pl %(event)s/%(name)s_*/unweighted_events.lhe.gz %(event)s/%(name)s/unweighted_events.lhe.gz %(event)s/%(name)s_banner.txt' + os.system('%(bin)s/merge.pl %(event)s/%(name)s_*/unweighted_events.lhe.gz %(event)s/%(name)s/unweighted_events.lhe.gz %(event)s/%(name)s_banner.txt' % {'bin': self.dirbin, 'event': pjoin(self.me_dir,'Events'), 'name': self.run_name}) @@ -3084,19 +3084,19 @@ def do_multi_run(self, line): self.create_root_file('%s/unweighted_events.lhe' % self.run_name, '%s/unweighted_events.root' % self.run_name) - - path = pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe") + + path = pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe") self.create_plot('parton', path, pjoin(self.me_dir, 'HTML',self.run_name, 'plots_parton.html') ) - - if not os.path.exists('%s.gz' % path): + + if not os.path.exists('%s.gz' % path): misc.gzip(path) self.update_status('', level='parton') - self.print_results_in_shell(self.results.current) - + self.print_results_in_shell(self.results.current) + cpath = pjoin(self.me_dir,'Cards','param_card.dat') if param_card_iterator: @@ -3112,21 +3112,21 @@ def do_multi_run(self, line): path = pjoin(self.me_dir, 'Events','scan_%s.txt' % scan_name) logger.info("write all cross-section results in %s" % path, '$MG:BOLD') param_card_iterator.write_summary(path) - - ############################################################################ + + ############################################################################ def do_treatcards(self, line, mode=None, opt=None): """Advanced commands: create .inc files from param_card.dat/run_card.dat""" if not mode and not opt: args = self.split_arg(line) mode, opt = self.check_treatcards(args) - + # To decide whether to refresh MadLoop's helicity filters, it is necessary # to check if the model parameters where modified or not, before doing - # anything else. + # anything else. need_MadLoopFilterUpdate = False - # Just to record what triggered the reinitialization of MadLoop for a + # Just to record what triggered the reinitialization of MadLoop for a # nice debug message. type_of_change = '' if not opt['forbid_MadLoopInit'] and self.proc_characteristics['loop_induced'] \ @@ -3137,10 +3137,10 @@ def do_treatcards(self, line, mode=None, opt=None): (os.path.getmtime(paramDat)-os.path.getmtime(paramInc)) > 0.0: need_MadLoopFilterUpdate = True type_of_change = 'model' - + ML_in = pjoin(self.me_dir, 'Cards', 'MadLoopParams.dat') ML_out = pjoin(self.me_dir,"SubProcesses", - "MadLoop5_resources", "MadLoopParams.dat") + "MadLoop5_resources", "MadLoopParams.dat") if (not os.path.isfile(ML_in)) or (not os.path.isfile(ML_out)) or \ (os.path.getmtime(ML_in)-os.path.getmtime(ML_out)) > 0.0: need_MadLoopFilterUpdate = True @@ -3148,7 +3148,7 @@ def do_treatcards(self, line, mode=None, opt=None): #check if no 'Auto' are present in the file self.check_param_card(pjoin(self.me_dir, 'Cards','param_card.dat')) - + if mode in ['param', 'all']: model = self.find_model_name() tmp_model = os.path.basename(model) @@ -3160,9 +3160,9 @@ def do_treatcards(self, line, mode=None, opt=None): check_param_card.check_valid_param_card(mg5_param) opt['param_card'] = pjoin(self.me_dir, 'Source', 'MODEL', 'MG5_param.dat') else: - check_param_card.check_valid_param_card(opt['param_card']) - - logger.debug('write compile file for card: %s' % opt['param_card']) + check_param_card.check_valid_param_card(opt['param_card']) + + logger.debug('write compile file for card: %s' % opt['param_card']) param_card = check_param_card.ParamCard(opt['param_card']) outfile = pjoin(opt['output_dir'], 'param_card.inc') ident_card = pjoin(self.me_dir,'Cards','ident_card.dat') @@ -3185,10 +3185,10 @@ def do_treatcards(self, line, mode=None, opt=None): devnull.close() default = pjoin(self.me_dir,'bin','internal','ufomodel','param_card.dat') - need_mp = self.proc_characteristics['loop_induced'] + need_mp = self.proc_characteristics['loop_induced'] param_card.write_inc_file(outfile, ident_card, default, need_mp=need_mp) - - + + if mode in ['run', 'all']: if not hasattr(self, 'run_card'): run_card = banner_mod.RunCard(opt['run_card'], path=pjoin(self.me_dir, 'Cards', 'run_card.dat')) @@ -3202,7 +3202,7 @@ def do_treatcards(self, line, mode=None, opt=None): run_card['lpp2'] = 0 run_card['ebeam1'] = 0 run_card['ebeam2'] = 0 - + # Ensure that the bias parameters has all the required input from the # run_card if run_card['bias_module'].lower() not in ['dummy','none']: @@ -3219,7 +3219,7 @@ def do_treatcards(self, line, mode=None, opt=None): mandatory_file,run_card['bias_module'])) misc.copytree(run_card['bias_module'], pjoin(self.me_dir,'Source','BIAS', os.path.basename(run_card['bias_module']))) - + #check expected parameters for the module. default_bias_parameters = {} start, last = False,False @@ -3244,50 +3244,50 @@ def do_treatcards(self, line, mode=None, opt=None): for pair in line.split(','): if not pair.strip(): continue - x,y =pair.split(':') + x,y =pair.split(':') x=x.strip() if x.startswith(('"',"'")) and x.endswith(x[0]): - x = x[1:-1] + x = x[1:-1] default_bias_parameters[x] = y elif ':' in line: x,y = line.split(':') x = x.strip() if x.startswith(('"',"'")) and x.endswith(x[0]): - x = x[1:-1] + x = x[1:-1] default_bias_parameters[x] = y for key,value in run_card['bias_parameters'].items(): if key not in default_bias_parameters: logger.warning('%s not supported by the bias module. We discard this entry.', key) else: default_bias_parameters[key] = value - run_card['bias_parameters'] = default_bias_parameters - - - # Finally write the include file + run_card['bias_parameters'] = default_bias_parameters + + + # Finally write the include file run_card.write_include_file(opt['output_dir']) - + if self.proc_characteristics['loop_induced'] and mode in ['loop', 'all']: - self.MadLoopparam = banner_mod.MadLoopParam(pjoin(self.me_dir, + self.MadLoopparam = banner_mod.MadLoopParam(pjoin(self.me_dir, 'Cards', 'MadLoopParams.dat')) # The writing out of MadLoop filter is potentially dangerous # when running in multi-core with a central disk. So it is turned - # off here. If these filters were not initialized then they will + # off here. If these filters were not initialized then they will # have to be re-computed at the beginning of each run. if 'WriteOutFilters' in self.MadLoopparam.user_set and \ self.MadLoopparam.get('WriteOutFilters'): logger.info( -"""You chose to have MadLoop writing out filters. +"""You chose to have MadLoop writing out filters. Beware that this can be dangerous for local multicore runs.""") self.MadLoopparam.set('WriteOutFilters',False, changeifuserset=False) - + # The conservative settings below for 'CTModeInit' and 'ZeroThres' # help adress issues for processes like g g > h z, and g g > h g - # where there are some helicity configuration heavily suppressed - # (by several orders of magnitude) so that the helicity filter + # where there are some helicity configuration heavily suppressed + # (by several orders of magnitude) so that the helicity filter # needs high numerical accuracy to correctly handle this spread in # magnitude. Also, because one cannot use the Born as a reference - # scale, it is better to force quadruple precision *for the + # scale, it is better to force quadruple precision *for the # initialization points only*. This avoids numerical accuracy issues # when setting up the helicity filters and does not significantly # slow down the run. @@ -3298,21 +3298,21 @@ def do_treatcards(self, line, mode=None, opt=None): # It is a bit superficial to use the level 2 which tries to numerically # map matching helicities (because of CP symmetry typically) together. -# It is useless in the context of MC over helicities and it can +# It is useless in the context of MC over helicities and it can # potentially make the helicity double checking fail. self.MadLoopparam.set('HelicityFilterLevel',1, changeifuserset=False) # To be on the safe side however, we ask for 4 consecutive matching # helicity filters. self.MadLoopparam.set('CheckCycle',4, changeifuserset=False) - + # For now it is tricky to have each channel performing the helicity # double check. What we will end up doing is probably some kind # of new initialization round at the beginning of each launch - # command, to reset the filters. + # command, to reset the filters. self.MadLoopparam.set('DoubleCheckHelicityFilter',False, changeifuserset=False) - + # Thanks to TIR recycling, TIR is typically much faster for Loop-induced # processes when not doing MC over helicities, so that we place OPP last. if not hasattr(self, 'run_card'): @@ -3349,7 +3349,7 @@ def do_treatcards(self, line, mode=None, opt=None): logger.warning( """You chose to also use a lorentz rotation for stability tests (see parameter NRotations_[DP|QP]). Beware that, for optimization purposes, MadEvent uses manual TIR cache clearing which is not compatible - with the lorentz rotation stability test. The number of these rotations to be used will be reset to + with the lorentz rotation stability test. The number of these rotations to be used will be reset to zero by MadLoop. You can avoid this by changing the parameter 'FORCE_ML_HELICITY_SUM' int he matrix.f files to be .TRUE. so that the sum over helicity configurations is performed within MadLoop (in which case the helicity of final state particles cannot be speicfied in the LHE file.""") @@ -3363,15 +3363,15 @@ def do_treatcards(self, line, mode=None, opt=None): # self.MadLoopparam.set('NRotations_DP',0,changeifuserset=False) # Revert to the above to be slightly less robust but twice faster. self.MadLoopparam.set('NRotations_DP',1,changeifuserset=False) - self.MadLoopparam.set('NRotations_QP',0,changeifuserset=False) - + self.MadLoopparam.set('NRotations_QP',0,changeifuserset=False) + # Finally, the stability tests are slightly less reliable for process - # with less or equal than 4 final state particles because the + # with less or equal than 4 final state particles because the # accessible kinematic is very limited (i.e. lorentz rotations don't # shuffle invariants numerics much). In these cases, we therefore # increase the required accuracy to 10^-7. # This is important for getting g g > z z [QCD] working with a - # ptheavy cut as low as 1 GeV. + # ptheavy cut as low as 1 GeV. if self.proc_characteristics['nexternal']<=4: if ('MLStabThres' in self.MadLoopparam.user_set and \ self.MadLoopparam.get('MLStabThres')>1.0e-7): @@ -3381,12 +3381,12 @@ def do_treatcards(self, line, mode=None, opt=None): than four external legs, so this is not recommended (especially not for g g > z z).""") self.MadLoopparam.set('MLStabThres',1.0e-7,changeifuserset=False) else: - self.MadLoopparam.set('MLStabThres',1.0e-4,changeifuserset=False) + self.MadLoopparam.set('MLStabThres',1.0e-4,changeifuserset=False) #write the output file self.MadLoopparam.write(pjoin(self.me_dir,"SubProcesses","MadLoop5_resources", "MadLoopParams.dat")) - + if self.proc_characteristics['loop_induced'] and mode in ['loop', 'all']: # Now Update MadLoop filters if necessary (if modifications were made to # the model parameters). @@ -3403,12 +3403,12 @@ def do_treatcards(self, line, mode=None, opt=None): elif not opt['forbid_MadLoopInit'] and \ MadLoopInitializer.need_MadLoopInit(self.me_dir): self.exec_cmd('initMadLoop -f') - - ############################################################################ + + ############################################################################ def do_survey(self, line): """Advanced commands: launch survey for the current process """ - - + + args = self.split_arg(line) # Check argument's validity self.check_survey(args) @@ -3416,7 +3416,7 @@ def do_survey(self, line): if os.path.exists(pjoin(self.me_dir,'error')): os.remove(pjoin(self.me_dir,'error')) - + self.configure_directory() # Save original random number self.random_orig = self.random @@ -3435,9 +3435,9 @@ def do_survey(self, line): P_zero_result = [] # check the number of times where they are no phase-space # File for the loop (for loop induced) - if os.path.exists(pjoin(self.me_dir,'SubProcesses', + if os.path.exists(pjoin(self.me_dir,'SubProcesses', 'MadLoop5_resources')) and cluster.need_transfer(self.options): - tf=tarfile.open(pjoin(self.me_dir, 'SubProcesses', + tf=tarfile.open(pjoin(self.me_dir, 'SubProcesses', 'MadLoop5_resources.tar.gz'), 'w:gz', dereference=True) tf.add(pjoin(self.me_dir,'SubProcesses','MadLoop5_resources'), arcname='MadLoop5_resources') @@ -3467,7 +3467,7 @@ def do_survey(self, line): except Exception as error: logger.debug(error) pass - + jobs, P_zero_result = ajobcreator.launch() # Check if all or only some fails if P_zero_result: @@ -3481,60 +3481,60 @@ def do_survey(self, line): self.get_Gdir() for P in P_zero_result: self.Gdirs[0][pjoin(self.me_dir,'SubProcesses',P)] = [] - + self.monitor(run_type='All jobs submitted for survey', html=True) if not self.history or 'survey' in self.history[-1] or self.ninitial ==1 or \ self.run_card['gridpack']: #will be done during the refine (more precisely in gen_ximprove) cross, error = self.make_make_all_html_results() self.results.add_detail('cross', cross) - self.results.add_detail('error', error) + self.results.add_detail('error', error) self.exec_cmd("print_results %s" % self.run_name, - errorhandling=False, printcmd=False, precmd=False, postcmd=False) - + errorhandling=False, printcmd=False, precmd=False, postcmd=False) + self.results.add_detail('run_statistics', dict(ajobcreator.run_statistics)) self.update_status('End survey', 'parton', makehtml=False) ############################################################################ def pass_in_difficult_integration_mode(self, rate=1): """be more secure for the integration to not miss it due to strong cut""" - + # improve survey options if default if self.opts['points'] == self._survey_options['points'][1]: self.opts['points'] = (rate+2) * self._survey_options['points'][1] if self.opts['iterations'] == self._survey_options['iterations'][1]: self.opts['iterations'] = 1 + rate + self._survey_options['iterations'][1] if self.opts['accuracy'] == self._survey_options['accuracy'][1]: - self.opts['accuracy'] = self._survey_options['accuracy'][1]/(rate+2) - + self.opts['accuracy'] = self._survey_options['accuracy'][1]/(rate+2) + # Modify run_config.inc in order to improve the refine conf_path = pjoin(self.me_dir, 'Source','run_config.inc') files.cp(conf_path, conf_path + '.bk') # text = open(conf_path).read() - min_evt, max_evt = 2500 *(2+rate), 10000*(rate+1) - + min_evt, max_evt = 2500 *(2+rate), 10000*(rate+1) + text = re.sub('''\(min_events = \d+\)''', '(min_events = %i )' % min_evt, text) text = re.sub('''\(max_events = \d+\)''', '(max_events = %i )' % max_evt, text) fsock = open(conf_path, 'w') fsock.write(text) fsock.close() - + # Compile for name in ['../bin/internal/gen_ximprove', 'all']: self.compile(arg=[name], cwd=os.path.join(self.me_dir, 'Source')) - - - ############################################################################ + + + ############################################################################ def do_refine(self, line): """Advanced commands: launch survey for the current process """ - devnull = open(os.devnull, 'w') + devnull = open(os.devnull, 'w') self.nb_refine += 1 args = self.split_arg(line) treshold=None - - + + for a in args: if a.startswith('--treshold='): treshold = float(a.split('=',1)[1]) @@ -3548,8 +3548,8 @@ def do_refine(self, line): break # Check argument's validity self.check_refine(args) - - refine_opt = {'err_goal': args[0], 'split_channels': True} + + refine_opt = {'err_goal': args[0], 'split_channels': True} precision = args[0] if len(args) == 2: refine_opt['max_process']= args[1] @@ -3560,15 +3560,15 @@ def do_refine(self, line): # Update random number self.update_random() self.save_random() - + if self.cluster_mode: logger.info('Creating Jobs') self.update_status('Refine results to %s' % precision, level=None) - + self.total_jobs = 0 - subproc = [l.strip() for l in open(pjoin(self.me_dir,'SubProcesses', + subproc = [l.strip() for l in open(pjoin(self.me_dir,'SubProcesses', 'subproc.mg'))] - + # cleanning the previous job for nb_proc,subdir in enumerate(subproc): subdir = subdir.strip() @@ -3589,14 +3589,14 @@ def do_refine(self, line): level = 5 if value.has_warning(): level = 10 - logger.log(level, + logger.log(level, value.nice_output(str('/'.join([key[0],'G%s'%key[1]]))). replace(' statistics','')) logger.debug(globalstat.nice_output('combined', no_warning=True)) - + if survey_statistics: x_improve.run_statistics = survey_statistics - + x_improve.launch() # create the ajob for the refinment. if not self.history or 'refine' not in self.history[-1]: cross, error = x_improve.update_html() #update html results for survey @@ -3610,9 +3610,9 @@ def do_refine(self, line): subdir = subdir.strip() Pdir = pjoin(self.me_dir, 'SubProcesses',subdir) bindir = pjoin(os.path.relpath(self.dirbin, Pdir)) - + logger.info(' %s ' % subdir) - + if os.path.exists(pjoin(Pdir, 'ajob1')): cudacpp_backend = self.run_card['cudacpp_backend'] # the default value is defined in banner.py @@ -3629,7 +3629,7 @@ def do_refine(self, line): ###self.compile(['all'], cwd=Pdir) alljobs = misc.glob('ajob*', Pdir) - + #remove associated results.dat (ensure to not mix with all data) Gre = re.compile("\s*j=(G[\d\.\w]+)") for job in alljobs: @@ -3637,49 +3637,49 @@ def do_refine(self, line): for Gdir in Gdirs: if os.path.exists(pjoin(Pdir, Gdir, 'results.dat')): os.remove(pjoin(Pdir, Gdir,'results.dat')) - - nb_tot = len(alljobs) + + nb_tot = len(alljobs) self.total_jobs += nb_tot for i, job in enumerate(alljobs): job = os.path.basename(job) - self.launch_job('%s' % job, cwd=Pdir, remaining=(nb_tot-i-1), - run_type='Refine number %s on %s (%s/%s)' % + self.launch_job('%s' % job, cwd=Pdir, remaining=(nb_tot-i-1), + run_type='Refine number %s on %s (%s/%s)' % (self.nb_refine, subdir, nb_proc+1, len(subproc))) - self.monitor(run_type='All job submitted for refine number %s' % self.nb_refine, + self.monitor(run_type='All job submitted for refine number %s' % self.nb_refine, html=True) - + self.update_status("Combining runs", level='parton') try: os.remove(pjoin(Pdir, 'combine_runs.log')) except Exception: pass - + if isinstance(x_improve, gen_ximprove.gen_ximprove_v4): # the merge of the events.lhe is handle in the x_improve class - # for splitted runs. (and partly in store_events). + # for splitted runs. (and partly in store_events). combine_runs.CombineRuns(self.me_dir) self.refine_mode = "old" else: self.refine_mode = "new" - + cross, error = self.make_make_all_html_results() self.results.add_detail('cross', cross) self.results.add_detail('error', error) - self.results.add_detail('run_statistics', + self.results.add_detail('run_statistics', dict(self.results.get_detail('run_statistics'))) self.update_status('finish refine', 'parton', makehtml=False) devnull.close() - - ############################################################################ + + ############################################################################ def do_comine_iteration(self, line): """Not in help: Combine a given iteration combine_iteration Pdir Gdir S|R step - S is for survey + S is for survey R is for refine - step is the iteration number (not very critical)""" + step is the iteration number (not very critical)""" self.set_run_name("tmp") self.configure_directory(html_opening=False) @@ -3695,12 +3695,12 @@ def do_comine_iteration(self, line): gensym.combine_iteration(Pdir, Gdir, int(step)) elif mode == "R": refine = gen_ximprove.gen_ximprove_share(self) - refine.combine_iteration(Pdir, Gdir, int(step)) - - + refine.combine_iteration(Pdir, Gdir, int(step)) - - ############################################################################ + + + + ############################################################################ def do_combine_events(self, line): """Advanced commands: Launch combine events""" start=time.time() @@ -3710,11 +3710,11 @@ def do_combine_events(self, line): self.check_combine_events(args) self.update_status('Combining Events', level='parton') - + if self.run_card['gridpack'] and isinstance(self, GridPackCmd): return GridPackCmd.do_combine_events(self, line) - + # Define The Banner tag = self.run_card['run_tag'] # Update the banner with the pythia card @@ -3727,14 +3727,14 @@ def do_combine_events(self, line): self.banner.change_seed(self.random_orig) if not os.path.exists(pjoin(self.me_dir, 'Events', self.run_name)): os.mkdir(pjoin(self.me_dir, 'Events', self.run_name)) - self.banner.write(pjoin(self.me_dir, 'Events', self.run_name, + self.banner.write(pjoin(self.me_dir, 'Events', self.run_name, '%s_%s_banner.txt' % (self.run_name, tag))) - - get_wgt = lambda event: event.wgt + + get_wgt = lambda event: event.wgt AllEvent = lhe_parser.MultiEventFile() AllEvent.banner = self.banner - + partials = 0 # if too many file make some partial unweighting sum_xsec, sum_xerru, sum_axsec = 0,[],0 Gdirs = self.get_Gdir() @@ -3751,12 +3751,12 @@ def do_combine_events(self, line): os.remove(pjoin(Gdir, 'events.lhe')) continue - AllEvent.add(pjoin(Gdir, 'events.lhe'), + AllEvent.add(pjoin(Gdir, 'events.lhe'), result.get('xsec'), result.get('xerru'), result.get('axsec') ) - + if len(AllEvent) >= 80: #perform a partial unweighting AllEvent.unweight(pjoin(self.me_dir, "Events", self.run_name, "partials%s.lhe.gz" % partials), get_wgt, log_level=5, trunc_error=1e-2, event_target=self.run_card['nevents']) @@ -3765,13 +3765,13 @@ def do_combine_events(self, line): AllEvent.add(pjoin(self.me_dir, "Events", self.run_name, "partials%s.lhe.gz" % partials), sum_xsec, math.sqrt(sum(x**2 for x in sum_xerru)), - sum_axsec) + sum_axsec) partials +=1 - + if not hasattr(self,'proc_characteristic'): self.proc_characteristic = self.get_characteristics() if len(AllEvent) == 0: - nb_event = 0 + nb_event = 0 else: nb_event = AllEvent.unweight(pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe.gz"), get_wgt, trunc_error=1e-2, event_target=self.run_card['nevents'], @@ -3791,22 +3791,22 @@ def do_combine_events(self, line): os.remove(pjoin(self.me_dir, "Events", self.run_name, "partials%s.lhe.gz" % i)) except Exception: os.remove(pjoin(self.me_dir, "Events", self.run_name, "partials%s.lhe" % i)) - + self.results.add_detail('nb_event', nb_event) - + if self.run_card['bias_module'].lower() not in ['dummy', 'none'] and nb_event: self.correct_bias() elif self.run_card['custom_fcts']: self.correct_bias() logger.info("combination of events done in %s s ", time.time()-start) - + self.to_store.append('event') - - ############################################################################ + + ############################################################################ def correct_bias(self): - """check the first event and correct the weight by the bias + """check the first event and correct the weight by the bias and correct the cross-section. - If the event do not have the bias tag it means that the bias is + If the event do not have the bias tag it means that the bias is one modifying the cross-section/shape so we have nothing to do """ @@ -3834,7 +3834,7 @@ def correct_bias(self): output.write('') output.close() lhe.close() - + # MODIFY THE BANNER i.e. INIT BLOCK # ensure information compatible with normalisation choice total_cross = sum(cross[key] for key in cross) @@ -3846,8 +3846,8 @@ def correct_bias(self): elif self.run_card['event_norm'] == 'unity': total_cross = self.results.current['cross'] * total_cross / nb_event for key in cross: - cross[key] *= total_cross / nb_event - + cross[key] *= total_cross / nb_event + bannerfile = lhe_parser.EventFile(pjoin(self.me_dir, 'Events', self.run_name, '.banner.tmp.gz'),'w') banner = banner_mod.Banner(lhe.banner) banner.modify_init_cross(cross) @@ -3862,12 +3862,12 @@ def correct_bias(self): os.remove(lhe.name) os.remove(bannerfile.name) os.remove(output.name) - - + + self.results.current['cross'] = total_cross self.results.current['error'] = 0 - - ############################################################################ + + ############################################################################ def do_store_events(self, line): """Advanced commands: Launch store events""" @@ -3883,16 +3883,16 @@ def do_store_events(self, line): if not os.path.exists(pjoin(self.me_dir, 'Events', run)): os.mkdir(pjoin(self.me_dir, 'Events', run)) if not os.path.exists(pjoin(self.me_dir, 'HTML', run)): - os.mkdir(pjoin(self.me_dir, 'HTML', run)) - + os.mkdir(pjoin(self.me_dir, 'HTML', run)) + # 1) Store overall process information #input = pjoin(self.me_dir, 'SubProcesses', 'results.dat') #output = pjoin(self.me_dir, 'SubProcesses', '%s_results.dat' % run) - #files.cp(input, output) + #files.cp(input, output) # 2) Treat the files present in the P directory - # Ensure that the number of events is different of 0 + # Ensure that the number of events is different of 0 if self.results.current['nb_event'] == 0 and not self.run_card['gridpack']: logger.warning("No event detected. No cleaning performed! This should allow to run:\n" + " cd Subprocesses; ../bin/internal/combine_events\n"+ @@ -3910,18 +3910,18 @@ def do_store_events(self, line): # if os.path.exists(pjoin(G_path, 'results.dat')): # input = pjoin(G_path, 'results.dat') # output = pjoin(G_path, '%s_results.dat' % run) - # files.cp(input, output) + # files.cp(input, output) #except Exception: - # continue + # continue # Store log try: if os.path.exists(pjoin(G_path, 'log.txt')): input = pjoin(G_path, 'log.txt') output = pjoin(G_path, '%s_log.txt' % run) - files.mv(input, output) + files.mv(input, output) except Exception: continue - #try: + #try: # # Grid # for name in ['ftn26']: # if os.path.exists(pjoin(G_path, name)): @@ -3930,7 +3930,7 @@ def do_store_events(self, line): # input = pjoin(G_path, name) # output = pjoin(G_path, '%s_%s' % (run,name)) # files.mv(input, output) - # misc.gzip(pjoin(G_path, output), error=None) + # misc.gzip(pjoin(G_path, output), error=None) #except Exception: # continue # Delete ftn25 to ensure reproducible runs @@ -3940,11 +3940,11 @@ def do_store_events(self, line): # 3) Update the index.html self.gen_card_html() - + # 4) Move the Files present in Events directory E_path = pjoin(self.me_dir, 'Events') O_path = pjoin(self.me_dir, 'Events', run) - + # The events file for name in ['events.lhe', 'unweighted_events.lhe']: finput = pjoin(E_path, name) @@ -3960,30 +3960,30 @@ def do_store_events(self, line): # os.remove(pjoin(O_path, '%s.gz' % name)) # input = pjoin(E_path, name) ## output = pjoin(O_path, name) - + self.update_status('End Parton', level='parton', makehtml=False) devnull.close() - - - ############################################################################ + + + ############################################################################ def do_create_gridpack(self, line): """Advanced commands: Create gridpack from present run""" self.update_status('Creating gridpack', level='parton') # compile gen_ximprove misc.compile(['../bin/internal/gen_ximprove'], cwd=pjoin(self.me_dir, "Source")) - + Gdir = self.get_Gdir() Pdir = set([os.path.dirname(G) for G in Gdir]) - for P in Pdir: + for P in Pdir: allG = misc.glob('G*', path=P) for G in allG: if pjoin(P, G) not in Gdir: logger.debug('removing %s', pjoin(P,G)) shutil.rmtree(pjoin(P,G)) - - + + args = self.split_arg(line) self.check_combine_events(args) if not self.run_tag: self.run_tag = 'tag_1' @@ -3996,13 +3996,13 @@ def do_create_gridpack(self, line): cwd=self.me_dir) misc.call(['./bin/internal/clean'], cwd=self.me_dir) misc.call(['./bin/internal/make_gridpack'], cwd=self.me_dir) - files.mv(pjoin(self.me_dir, 'gridpack.tar.gz'), + files.mv(pjoin(self.me_dir, 'gridpack.tar.gz'), pjoin(self.me_dir, '%s_gridpack.tar.gz' % self.run_name)) os.system("sed -i.bak \"s/\s*.true.*=.*GridRun/ .false. = GridRun/g\" %s/Cards/grid_card.dat" \ % self.me_dir) self.update_status('gridpack created', level='gridpack') - - ############################################################################ + + ############################################################################ def do_shower(self, line): """launch the shower""" @@ -4010,7 +4010,7 @@ def do_shower(self, line): if len(args)>1 and args[0] in self._interfaced_showers: chosen_showers = [args.pop(0)] elif '--no_default' in line: - # If '--no_default' was specified in the arguments, then only one + # If '--no_default' was specified in the arguments, then only one # shower will be run, depending on which card is present. # but we each of them are called. (each of them check if the file exists) chosen_showers = list(self._interfaced_showers) @@ -4021,9 +4021,9 @@ def do_shower(self, line): shower_priority = ['pythia8','pythia'] chosen_showers = [sorted(chosen_showers,key=lambda sh: shower_priority.index(sh) if sh in shower_priority else len(shower_priority)+1)[0]] - + for shower in chosen_showers: - self.exec_cmd('%s %s'%(shower,' '.join(args)), + self.exec_cmd('%s %s'%(shower,' '.join(args)), postcmd=False, printcmd=False) def do_madanalysis5_parton(self, line): @@ -4039,11 +4039,11 @@ def do_madanalysis5_parton(self, line): def mg5amc_py8_interface_consistency_warning(options): """ Check the consistency of the mg5amc_py8_interface installed with the current MG5 and Pythia8 versions. """ - + # All this is only relevant is Pythia8 is interfaced to MG5 if not options['pythia8_path']: return None - + if not options['mg5amc_py8_interface_path']: return \ """ @@ -4053,7 +4053,7 @@ def mg5amc_py8_interface_consistency_warning(options): Consider installing the MG5_aMC-PY8 interface with the following command: MG5_aMC>install mg5amc_py8_interface """ - + mg5amc_py8_interface_path = options['mg5amc_py8_interface_path'] py8_path = options['pythia8_path'] # If the specified interface path is relative, make it absolut w.r.t MGDIR if @@ -4062,7 +4062,7 @@ def mg5amc_py8_interface_consistency_warning(options): mg5amc_py8_interface_path = pjoin(MG5DIR,mg5amc_py8_interface_path) py8_path = pjoin(MG5DIR,py8_path) - # Retrieve all the on-install and current versions + # Retrieve all the on-install and current versions fsock = open(pjoin(mg5amc_py8_interface_path, 'MG5AMC_VERSION_ON_INSTALL')) MG5_version_on_install = fsock.read().replace('\n','') fsock.close() @@ -4074,7 +4074,7 @@ def mg5amc_py8_interface_consistency_warning(options): MG5_curr_version =misc.get_pkg_info()['version'] try: p = subprocess.Popen(['./get_pythia8_version.py',py8_path], - stdout=subprocess.PIPE, stderr=subprocess.PIPE, + stdout=subprocess.PIPE, stderr=subprocess.PIPE, cwd=mg5amc_py8_interface_path) (out, err) = p.communicate() out = out.decode(errors='ignore').replace('\n','') @@ -4084,37 +4084,37 @@ def mg5amc_py8_interface_consistency_warning(options): float(out) except: PY8_curr_version = None - + if not MG5_version_on_install is None and not MG5_curr_version is None: if MG5_version_on_install != MG5_curr_version: return \ """ The current version of MG5_aMC (v%s) is different than the one active when - installing the 'mg5amc_py8_interface_path' (which was MG5aMC v%s). + installing the 'mg5amc_py8_interface_path' (which was MG5aMC v%s). Please consider refreshing the installation of this interface with the command: MG5_aMC>install mg5amc_py8_interface """%(MG5_curr_version, MG5_version_on_install) - + if not PY8_version_on_install is None and not PY8_curr_version is None: if PY8_version_on_install != PY8_curr_version: return \ """ The current version of Pythia8 (v%s) is different than the one active when - installing the 'mg5amc_py8_interface' tool (which was Pythia8 v%s). + installing the 'mg5amc_py8_interface' tool (which was Pythia8 v%s). Please consider refreshing the installation of this interface with the command: MG5_aMC>install mg5amc_py8_interface """%(PY8_curr_version,PY8_version_on_install) - + return None def setup_Pythia8RunAndCard(self, PY8_Card, run_type): """ Setup the Pythia8 Run environment and card. In particular all the process and run specific parameters of the card are automatically set here. This function returns the path where HEPMC events will be output, if any.""" - + HepMC_event_output = None tag = self.run_tag - + PY8_Card.subruns[0].systemSet('Beams:LHEF',"unweighted_events.lhe.gz") hepmc_format = PY8_Card['HEPMCoutput:file'].lower() @@ -4185,7 +4185,7 @@ def setup_Pythia8RunAndCard(self, PY8_Card, run_type): misc.mkfifo(fifo_path) # Use defaultSet not to overwrite the current userSet status PY8_Card.defaultSet('HEPMCoutput:file',fifo_path) - HepMC_event_output=fifo_path + HepMC_event_output=fifo_path elif hepmc_format in ['','/dev/null','None']: logger.warning('User disabled the HepMC output of Pythia8.') HepMC_event_output = None @@ -4206,7 +4206,7 @@ def setup_Pythia8RunAndCard(self, PY8_Card, run_type): # only if it is not already user_set. if PY8_Card['JetMatching:qCut']==-1.0: PY8_Card.MadGraphSet('JetMatching:qCut',1.5*self.run_card['xqcut'], force=True) - + if PY8_Card['JetMatching:qCut']<(1.5*self.run_card['xqcut']): logger.error( 'The MLM merging qCut parameter you chose (%f) is less than '%PY8_Card['JetMatching:qCut']+ @@ -4233,7 +4233,7 @@ def setup_Pythia8RunAndCard(self, PY8_Card, run_type): if PY8_Card['JetMatching:qCut'] not in qCutList: qCutList.append(PY8_Card['JetMatching:qCut']) PY8_Card.MadGraphSet('SysCalc:qCutList', qCutList, force=True) - + if PY8_Card['SysCalc:qCutList']!='auto': for scale in PY8_Card['SysCalc:qCutList']: @@ -4244,7 +4244,7 @@ def setup_Pythia8RunAndCard(self, PY8_Card, run_type): "'sys_matchscale' in the run_card) is less than 1.5*xqcut, where xqcut is"+ ' the run_card parameter (=%f)\n'%self.run_card['xqcut']+ 'It would be better/safer to use a larger qCut or a smaller xqcut.') - + # Specific MLM settings # PY8 should not implement the MLM veto since the driver should do it # if merging scale variation is turned on @@ -4294,18 +4294,18 @@ def setup_Pythia8RunAndCard(self, PY8_Card, run_type): CKKW_cut = 'ktdurham' elif self.run_card['ptlund']>0.0 and self.run_card['ktdurham']<=0.0: PY8_Card.subruns[0].MadGraphSet('Merging:doPTLundMerging',True) - CKKW_cut = 'ptlund' + CKKW_cut = 'ptlund' else: raise InvalidCmd("*Either* the 'ptlund' or 'ktdurham' cut in "+\ " the run_card must be turned on to activate CKKW(L) merging"+ " with Pythia8, but *both* cuts cannot be turned on at the same time."+ "\n ptlund=%f, ktdurham=%f."%(self.run_card['ptlund'],self.run_card['ktdurham'])) - + # Automatically set qWeed to the CKKWL cut if not defined by the user. if PY8_Card['SysCalc:qWeed']==-1.0: PY8_Card.MadGraphSet('SysCalc:qWeed',self.run_card[CKKW_cut], force=True) - + # MadGraphSet sets the corresponding value (in system mode) # only if it is not already user_set. if PY8_Card['Merging:TMS']==-1.0: @@ -4319,7 +4319,7 @@ def setup_Pythia8RunAndCard(self, PY8_Card, run_type): 'The CKKWl merging scale you chose (%f) is less than '%PY8_Card['Merging:TMS']+ 'the %s cut specified in the run_card parameter (=%f).\n'%(CKKW_cut,self.run_card[CKKW_cut])+ 'It is incorrect to use a smaller CKKWl scale than the generation-level %s cut!'%CKKW_cut) - + PY8_Card.MadGraphSet('TimeShower:pTmaxMatch',1) PY8_Card.MadGraphSet('SpaceShower:pTmaxMatch',1) PY8_Card.MadGraphSet('SpaceShower:rapidityOrder',False) @@ -4381,7 +4381,7 @@ def do_pythia8(self, line): try: import madgraph - except ImportError: + except ImportError: import internal.histograms as histograms else: import madgraph.various.histograms as histograms @@ -4400,16 +4400,16 @@ def do_pythia8(self, line): self.check_pythia8(args) self.configure_directory(html_opening =False) else: - # initialize / remove lhapdf mode + # initialize / remove lhapdf mode self.configure_directory(html_opening =False) - self.check_pythia8(args) + self.check_pythia8(args) # Update the banner with the pythia card if not self.banner or len(self.banner) <=1: # Here the level keyword 'pythia' must not be changed to 'pythia8'. self.banner = banner_mod.recover_banner(self.results, 'pythia') - # the args are modify and the last arg is always the mode + # the args are modify and the last arg is always the mode if not no_default: self.ask_pythia_run_configuration(args[-1], pythia_version=8, banner=self.banner) @@ -4425,7 +4425,7 @@ def do_pythia8(self, line): #"Please use 'event_norm = average' in the run_card to avoid this problem.") - + if not self.options['mg5amc_py8_interface_path'] or not \ os.path.exists(pjoin(self.options['mg5amc_py8_interface_path'], 'MG5aMC_PY8_interface')): @@ -4444,16 +4444,16 @@ def do_pythia8(self, line): # Again here 'pythia' is just a keyword for the simulation level. self.update_status('\033[92mRunning Pythia8 [arXiv:1410.3012]\033[0m', 'pythia8') - - tag = self.run_tag + + tag = self.run_tag # Now write Pythia8 card # Start by reading, starting from the default one so that the 'user_set' # tag are correctly set. - PY8_Card = banner_mod.PY8Card(pjoin(self.me_dir, 'Cards', + PY8_Card = banner_mod.PY8Card(pjoin(self.me_dir, 'Cards', 'pythia8_card_default.dat')) PY8_Card.read(pjoin(self.me_dir, 'Cards', 'pythia8_card.dat'), setter='user') - + run_type = 'default' merged_run_types = ['MLM','CKKW'] if int(self.run_card['ickkw'])==1: @@ -4471,7 +4471,7 @@ def do_pythia8(self, line): cmd_card = StringIO.StringIO() PY8_Card.write(cmd_card,pjoin(self.me_dir,'Cards','pythia8_card_default.dat'), direct_pythia_input=True) - + # Now setup the preamble to make sure that everything will use the locally # installed tools (if present) even if the user did not add it to its # environment variables. @@ -4486,13 +4486,13 @@ def do_pythia8(self, line): preamble = misc.get_HEPTools_location_setter( pjoin(MG5DIR,'HEPTools'),'lib') preamble += "\n unset PYTHIA8DATA\n" - + open(pythia_cmd_card,'w').write("""! ! It is possible to run this card manually with: ! %s %s ! """%(preamble+pythia_main,os.path.basename(pythia_cmd_card))+cmd_card.getvalue()) - + # launch pythia8 pythia_log = pjoin(self.me_dir , 'Events', self.run_name , '%s_pythia8.log' % tag) @@ -4504,13 +4504,13 @@ def do_pythia8(self, line): shell_exe = None if os.path.exists('/usr/bin/env'): shell_exe = '/usr/bin/env %s'%shell - else: + else: shell_exe = misc.which(shell) if not shell_exe: raise self.InvalidCmd('No s hell could be found in your environment.\n'+ "Make sure that either '%s' is in your path or that the"%shell+\ " command '/usr/bin/env %s' exists and returns a valid path."%shell) - + exe_cmd = "#!%s\n%s"%(shell_exe,' '.join( [preamble+pythia_main, os.path.basename(pythia_cmd_card)])) @@ -4528,7 +4528,7 @@ def do_pythia8(self, line): ( os.path.exists(HepMC_event_output) and \ stat.S_ISFIFO(os.stat(HepMC_event_output).st_mode)) startPY8timer = time.time() - + # Information that will be extracted from this PY8 run PY8_extracted_information={ 'sigma_m':None, 'Nacc':None, 'Ntry':None, 'cross_sections':{} } @@ -4556,7 +4556,7 @@ def do_pythia8(self, line): n_cores = max(int(self.options['cluster_size']),1) elif self.options['run_mode']==2: n_cores = max(int(self.cluster.nb_core),1) - + lhe_file_name = os.path.basename(PY8_Card.subruns[0]['Beams:LHEF']) lhe_file = lhe_parser.EventFile(pjoin(self.me_dir,'Events', self.run_name,PY8_Card.subruns[0]['Beams:LHEF'])) @@ -4574,7 +4574,7 @@ def do_pythia8(self, line): if self.options['run_mode']==2: min_n_events_per_job = 100 elif self.options['run_mode']==1: - min_n_events_per_job = 1000 + min_n_events_per_job = 1000 min_n_core = n_events//min_n_events_per_job n_cores = max(min(min_n_core,n_cores),1) @@ -4584,8 +4584,8 @@ def do_pythia8(self, line): logger.info('Follow Pythia8 shower by running the '+ 'following command (in a separate terminal):\n tail -f %s'%pythia_log) - if self.options['run_mode']==2 and self.options['nb_core']>1: - ret_code = self.cluster.launch_and_wait(wrapper_path, + if self.options['run_mode']==2 and self.options['nb_core']>1: + ret_code = self.cluster.launch_and_wait(wrapper_path, argument= [], stdout= pythia_log, stderr=subprocess.STDOUT, cwd=pjoin(self.me_dir,'Events',self.run_name)) else: @@ -4630,10 +4630,10 @@ def do_pythia8(self, line): wrapper = open(wrapper_path,'w') if self.options['cluster_temp_path'] is None: exe_cmd = \ -"""#!%s +"""#!%s ./%s PY8Card.dat >& PY8_log.txt """ - else: + else: exe_cmd = \ """#!%s ln -s ./events_$1.lhe.gz ./events.lhe.gz @@ -4663,21 +4663,21 @@ def do_pythia8(self, line): # Set it as executable st = os.stat(wrapper_path) os.chmod(wrapper_path, st.st_mode | stat.S_IEXEC) - + # Split the .lhe event file, create event partition partition=[n_available_events//n_cores]*n_cores for i in range(n_available_events%n_cores): partition[i] += 1 - + # Splitting according to the total number of events requested by the user # Will be used to determine the number of events to indicate in the PY8 split cards. partition_for_PY8=[n_events//n_cores]*n_cores for i in range(n_events%n_cores): partition_for_PY8[i] += 1 - - logger.info('Splitting .lhe event file for PY8 parallelization...') - n_splits = lhe_file.split(partition=partition, cwd=parallelization_dir, zip=True) - + + logger.info('Splitting .lhe event file for PY8 parallelization...') + n_splits = lhe_file.split(partition=partition, cwd=parallelization_dir, zip=True) + if n_splits!=len(partition): raise MadGraph5Error('Error during lhe file splitting. Expected %d files but obtained %d.' %(len(partition),n_splits)) @@ -4690,7 +4690,7 @@ def do_pythia8(self, line): # Add the necessary run content shutil.move(pjoin(parallelization_dir,lhe_file.name+'_%d.lhe.gz'%split_id), pjoin(parallelization_dir,split_files[-1])) - + logger.info('Submitting Pythia8 jobs...') for i, split_file in enumerate(split_files): # We must write a PY8Card tailored for each split so as to correct the normalization @@ -4706,7 +4706,7 @@ def do_pythia8(self, line): split_PY8_Card.write(pjoin(parallelization_dir,'PY8Card_%d.dat'%i), pjoin(parallelization_dir,'PY8Card.dat'), add_missing=False) in_files = [pjoin(parallelization_dir,os.path.basename(pythia_main)), - pjoin(parallelization_dir,'PY8Card_%d.dat'%i), + pjoin(parallelization_dir,'PY8Card_%d.dat'%i), pjoin(parallelization_dir,split_file)] if self.options['cluster_temp_path'] is None: out_files = [] @@ -4718,35 +4718,35 @@ def do_pythia8(self, line): if os.path.basename(in_file)==split_file: ln(in_file,selected_cwd,name='events.lhe.gz') elif os.path.basename(in_file).startswith('PY8Card'): - ln(in_file,selected_cwd,name='PY8Card.dat') + ln(in_file,selected_cwd,name='PY8Card.dat') else: - ln(in_file,selected_cwd) + ln(in_file,selected_cwd) in_files = [] wrapper_path = os.path.basename(wrapper_path) else: out_files = ['split_%d.tar.gz'%i] selected_cwd = parallelization_dir - self.cluster.submit2(wrapper_path, - argument=[str(i)], cwd=selected_cwd, + self.cluster.submit2(wrapper_path, + argument=[str(i)], cwd=selected_cwd, input_files=in_files, output_files=out_files, required_output=out_files) - + def wait_monitoring(Idle, Running, Done): if Idle+Running+Done == 0: return logger.info('Pythia8 shower jobs: %d Idle, %d Running, %d Done [%s]'\ %(Idle, Running, Done, misc.format_time(time.time() - startPY8timer))) self.cluster.wait(parallelization_dir,wait_monitoring) - + logger.info('Merging results from the split PY8 runs...') if self.options['cluster_temp_path']: # Decompressing the output for i, split_file in enumerate(split_files): misc.call(['tar','-xzf','split_%d.tar.gz'%i],cwd=parallelization_dir) os.remove(pjoin(parallelization_dir,'split_%d.tar.gz'%i)) - + # Now merge logs pythia_log_file = open(pythia_log,'w') n_added = 0 @@ -4778,7 +4778,7 @@ def wait_monitoring(Idle, Running, Done): if n_added>0: PY8_extracted_information['sigma_m'] /= float(n_added) pythia_log_file.close() - + # djr plots djr_HwU = None n_added = 0 @@ -4845,7 +4845,7 @@ def wait_monitoring(Idle, Running, Done): if not os.path.isfile(hepmc_file): continue all_hepmc_files.append(hepmc_file) - + if len(all_hepmc_files)>0: hepmc_output = pjoin(self.me_dir,'Events',self.run_name,HepMC_event_output) with misc.TMP_directory() as tmp_dir: @@ -4860,8 +4860,8 @@ def wait_monitoring(Idle, Running, Done): break header.close() tail = open(pjoin(tmp_dir,'tail.hepmc'),'w') - n_tail = 0 - + n_tail = 0 + for line in misc.reverse_readline(all_hepmc_files[-1]): if line.startswith('HepMC::'): n_tail += 1 @@ -4871,7 +4871,7 @@ def wait_monitoring(Idle, Running, Done): tail.close() if n_tail>1: raise MadGraph5Error('HEPMC files should only have one trailing command.') - ###################################################################### + ###################################################################### # This is the most efficient way of putting together HEPMC's, *BUT* # # WARNING: NEED TO RENDER THE CODE BELOW SAFE TOWARDS INJECTION # ###################################################################### @@ -4888,12 +4888,12 @@ def wait_monitoring(Idle, Running, Done): elif sys.platform == 'darwin': # sed on MAC has slightly different synthax than on os.system(' '.join(['sed','-i',"''","'%s;$d'"% - (';'.join('%id'%(i+1) for i in range(n_head))),hepmc_file])) - else: - # other UNIX systems + (';'.join('%id'%(i+1) for i in range(n_head))),hepmc_file])) + else: + # other UNIX systems os.system(' '.join(['sed','-i']+["-e '%id'"%(i+1) for i in range(n_head)]+ ["-e '$d'",hepmc_file])) - + os.system(' '.join(['cat',pjoin(tmp_dir,'header.hepmc')]+all_hepmc_files+ [pjoin(tmp_dir,'tail.hepmc'),'>',hepmc_output])) @@ -4915,12 +4915,12 @@ def wait_monitoring(Idle, Running, Done): 'Inclusive cross section:' not in '\n'.join(open(pythia_log,'r').readlines()[-20:]): logger.warning('Fail to produce a pythia8 output. More info in \n %s'%pythia_log) return - + # Plot for Pythia8 successful = self.create_plot('Pythia8') if not successful: logger.warning('Failed to produce Pythia8 merging plots.') - + self.to_store.append('pythia8') # Study matched cross-sections @@ -4931,7 +4931,7 @@ def wait_monitoring(Idle, Running, Done): if self.options['run_mode']==0 or (self.options['run_mode']==2 and self.options['nb_core']==1): PY8_extracted_information['sigma_m'],PY8_extracted_information['Nacc'],\ PY8_extracted_information['Ntry'] = self.parse_PY8_log_file( - pjoin(self.me_dir,'Events', self.run_name,'%s_pythia8.log' % tag)) + pjoin(self.me_dir,'Events', self.run_name,'%s_pythia8.log' % tag)) else: logger.warning('Pythia8 cross-section could not be retreived.\n'+ 'Try turning parallelization off by setting the option nb_core to 1. YYYYY') @@ -4944,8 +4944,8 @@ def wait_monitoring(Idle, Running, Done): Ntry = PY8_extracted_information['Ntry'] sigma_m = PY8_extracted_information['sigma_m'] # Compute pythia error - error = self.results[self.run_name].return_tag(self.run_tag)['error'] - try: + error = self.results[self.run_name].return_tag(self.run_tag)['error'] + try: error_m = math.sqrt((error * Nacc/Ntry)**2 + sigma_m**2 *(1-Nacc/Ntry)/Nacc) except ZeroDivisionError: # Cannot compute error @@ -4966,31 +4966,31 @@ def wait_monitoring(Idle, Running, Done): else: logger.warning('Pythia8 merged cross-sections could not be retreived.\n'+ 'Try turning parallelization off by setting the option nb_core to 1.XXXXX') - PY8_extracted_information['cross_sections'] = {} - + PY8_extracted_information['cross_sections'] = {} + cross_sections = PY8_extracted_information['cross_sections'] if cross_sections: - # Filter the cross_sections specified an keep only the ones + # Filter the cross_sections specified an keep only the ones # with central parameters and a different merging scale a_float_re = '[\+|-]?\d+(\.\d*)?([EeDd][\+|-]?\d+)?' central_merging_re = re.compile( '^\s*Weight_MERGING\s*=\s*(?P%s)\s*$'%a_float_re, - re.IGNORECASE) + re.IGNORECASE) cross_sections = dict( (float(central_merging_re.match(xsec).group('merging')),value) - for xsec, value in cross_sections.items() if not + for xsec, value in cross_sections.items() if not central_merging_re.match(xsec) is None) central_scale = PY8_Card['JetMatching:qCut'] if \ int(self.run_card['ickkw'])==1 else PY8_Card['Merging:TMS'] if central_scale in cross_sections: self.results.add_detail('cross_pythia8', cross_sections[central_scale][0]) self.results.add_detail('error_pythia8', cross_sections[central_scale][1]) - + #logger.info('Pythia8 merged cross-sections are:') #for scale in sorted(cross_sections.keys()): # logger.info(' > Merging scale = %-6.4g : %-11.5g +/- %-7.2g [pb]'%\ - # (scale,cross_sections[scale][0],cross_sections[scale][1])) - + # (scale,cross_sections[scale][0],cross_sections[scale][1])) + xsecs_file = open(pjoin(self.me_dir,'Events',self.run_name, '%s_merged_xsecs.txt'%tag),'w') if cross_sections: @@ -5003,9 +5003,9 @@ def wait_monitoring(Idle, Running, Done): xsecs_file.write('Cross-sections could not be read from the'+\ "XML node 'xsection' of the .dat file produced by Pythia8.") xsecs_file.close() - + #Update the banner - # We add directly the pythia command card because it has the full + # We add directly the pythia command card because it has the full # information self.banner.add(pythia_cmd_card) @@ -5022,13 +5022,13 @@ def wait_monitoring(Idle, Running, Done): if self.options['delphes_path']: self.exec_cmd('delphes --no_default', postcmd=False, printcmd=False) self.print_results_in_shell(self.results.current) - + def parse_PY8_log_file(self, log_file_path): """ Parse a log file to extract number of event and cross-section. """ pythiare = re.compile("Les Houches User Process\(es\)\s*\d+\s*\|\s*(?P\d+)\s*(?P\d+)\s*(?P\d+)\s*\|\s*(?P[\d\.e\-\+]+)\s*(?P[\d\.e\-\+]+)") pythia_xsec_re = re.compile("Inclusive cross section\s*:\s*(?P[\d\.e\-\+]+)\s*(?P[\d\.e\-\+]+)") sigma_m, Nacc, Ntry = None, None, None - for line in misc.BackRead(log_file_path): + for line in misc.BackRead(log_file_path): info = pythiare.search(line) if not info: # Also try to obtain the cross-section and error from the final xsec line of pythia8 log @@ -5058,7 +5058,7 @@ def parse_PY8_log_file(self, log_file_path): raise self.InvalidCmd("Could not find cross-section and event number information "+\ "in Pythia8 log\n '%s'."%log_file_path) - + def extract_cross_sections_from_DJR(self,djr_output): """Extract cross-sections from a djr XML output.""" import xml.dom.minidom as minidom @@ -5075,11 +5075,11 @@ def extract_cross_sections_from_DJR(self,djr_output): [float(xsec.childNodes[0].data.split()[0]), float(xsec.childNodes[0].data.split()[1])]) for xsec in xsections) - + def do_pythia(self, line): """launch pythia""" - - + + # Check argument's validity args = self.split_arg(line) if '--no_default' in args: @@ -5089,12 +5089,12 @@ def do_pythia(self, line): args.remove('--no_default') else: no_default = False - + if not self.run_name: self.check_pythia(args) self.configure_directory(html_opening =False) else: - # initialize / remove lhapdf mode + # initialize / remove lhapdf mode self.configure_directory(html_opening =False) self.check_pythia(args) @@ -5102,7 +5102,7 @@ def do_pythia(self, line): logger.error('pythia-pgs require event_norm to be on sum. Do not run pythia6') return - # the args are modify and the last arg is always the mode + # the args are modify and the last arg is always the mode if not no_default: self.ask_pythia_run_configuration(args[-1]) if self.options['automatic_html_opening']: @@ -5114,35 +5114,35 @@ def do_pythia(self, line): self.banner = banner_mod.recover_banner(self.results, 'pythia') pythia_src = pjoin(self.options['pythia-pgs_path'],'src') - + self.results.add_detail('run_mode', 'madevent') self.update_status('Running Pythia', 'pythia') try: os.remove(pjoin(self.me_dir,'Events','pythia.done')) except Exception: - pass - + pass + ## LAUNCHING PYTHIA # check that LHAPATH is define. if not re.search(r'^\s*LHAPATH=%s/PDFsets' % pythia_src, - open(pjoin(self.me_dir,'Cards','pythia_card.dat')).read(), + open(pjoin(self.me_dir,'Cards','pythia_card.dat')).read(), re.M): f = open(pjoin(self.me_dir,'Cards','pythia_card.dat'),'a') f.write('\n LHAPATH=%s/PDFsets' % pythia_src) f.close() tag = self.run_tag pythia_log = pjoin(self.me_dir, 'Events', self.run_name , '%s_pythia.log' % tag) - #self.cluster.launch_and_wait('../bin/internal/run_pythia', + #self.cluster.launch_and_wait('../bin/internal/run_pythia', # argument= [pythia_src], stdout= pythia_log, # stderr=subprocess.STDOUT, # cwd=pjoin(self.me_dir,'Events')) output_files = ['pythia_events.hep'] if self.run_card['use_syst']: output_files.append('syst.dat') - if self.run_card['ickkw'] == 1: + if self.run_card['ickkw'] == 1: output_files += ['beforeveto.tree', 'xsecs.tree', 'events.tree'] - + os.environ['PDG_MASS_TBL'] = pjoin(pythia_src,'mass_width_2004.mc') self.cluster.launch_and_wait(pjoin(pythia_src, 'pythia'), input_files=[pjoin(self.me_dir, "Events", "unweighted_events.lhe"), @@ -5152,23 +5152,23 @@ def do_pythia(self, line): stdout= pythia_log, stderr=subprocess.STDOUT, cwd=pjoin(self.me_dir,'Events')) - + os.remove(pjoin(self.me_dir, "Events", "unweighted_events.lhe")) if not os.path.exists(pjoin(self.me_dir,'Events','pythia_events.hep')): logger.warning('Fail to produce pythia output. More info in \n %s' % pythia_log) return - + self.to_store.append('pythia') - + # Find the matched cross-section if int(self.run_card['ickkw']): # read the line from the bottom of the file - #pythia_log = misc.BackRead(pjoin(self.me_dir,'Events', self.run_name, + #pythia_log = misc.BackRead(pjoin(self.me_dir,'Events', self.run_name, # '%s_pythia.log' % tag)) - pythiare = re.compile("\s*I\s+0 All included subprocesses\s+I\s+(?P\d+)\s+(?P\d+)\s+I\s+(?P[\d\.D\-+]+)\s+I") - for line in misc.reverse_readline(pjoin(self.me_dir,'Events', self.run_name, + pythiare = re.compile("\s*I\s+0 All included subprocesses\s+I\s+(?P\d+)\s+(?P\d+)\s+I\s+(?P[\d\.D\-+]+)\s+I") + for line in misc.reverse_readline(pjoin(self.me_dir,'Events', self.run_name, '%s_pythia.log' % tag)): info = pythiare.search(line) if not info: @@ -5188,16 +5188,16 @@ def do_pythia(self, line): self.results.add_detail('nb_event_pythia', Nacc) #compute pythia error error = self.results[self.run_name].return_tag(self.run_tag)['error'] - if Nacc: + if Nacc: error_m = math.sqrt((error * Nacc/Ntry)**2 + sigma_m**2 *(1-Nacc/Ntry)/Nacc) else: error_m = 10000 * sigma_m # works both for fixed number of generated events and fixed accepted events self.results.add_detail('error_pythia', error_m) - break + break #pythia_log.close() - + pydir = pjoin(self.options['pythia-pgs_path'], 'src') eradir = self.options['exrootanalysis_path'] madir = self.options['madanalysis_path'] @@ -5216,12 +5216,12 @@ def do_pythia(self, line): # Creating LHE file self.run_hep2lhe(banner_path) - + if int(self.run_card['ickkw']): misc.gzip(pjoin(self.me_dir,'Events','beforeveto.tree'), - stdout=pjoin(self.me_dir,'Events',self.run_name, tag+'_pythia_beforeveto.tree.gz')) + stdout=pjoin(self.me_dir,'Events',self.run_name, tag+'_pythia_beforeveto.tree.gz')) + - if self.run_card['use_syst'] in self.true: # Calculate syscalc info based on syst.dat try: @@ -5233,7 +5233,7 @@ def do_pythia(self, line): # Store syst.dat misc.gzip(pjoin(self.me_dir,'Events', 'syst.dat'), stdout=pjoin(self.me_dir,'Events',self.run_name, tag + '_pythia_syst.dat.gz')) - + # Store syscalc.dat if os.path.exists(pjoin(self.me_dir, 'Events', 'syscalc.dat')): filename = pjoin(self.me_dir, 'Events' ,self.run_name, @@ -5253,7 +5253,7 @@ def do_pythia(self, line): if self.options['delphes_path']: self.exec_cmd('delphes --no_default', postcmd=False, printcmd=False) self.print_results_in_shell(self.results.current) - + ################################################################################ def do_remove(self, line): @@ -5263,8 +5263,8 @@ def do_remove(self, line): run, tag, mode = self.check_remove(args) if 'banner' in mode: mode.append('all') - - + + if run == 'all': # Check first if they are not a run with a name run. if os.path.exists(pjoin(self.me_dir, 'Events', 'all')): @@ -5280,7 +5280,7 @@ def do_remove(self, line): logger.info(error) pass # run already clear return - + # Check that run exists if not os.path.exists(pjoin(self.me_dir, 'Events', run)): raise self.InvalidCmd('No run \'%s\' detected' % run) @@ -5294,7 +5294,7 @@ def do_remove(self, line): # Found the file to delete - + to_delete = misc.glob('*', pjoin(self.me_dir, 'Events', run)) to_delete += misc.glob('*', pjoin(self.me_dir, 'HTML', run)) # forbid the banner to be removed @@ -5314,7 +5314,7 @@ def do_remove(self, line): if os.path.exists(pjoin(self.me_dir, 'Events', run, 'unweighted_events.lhe.gz')): to_delete.append('unweighted_events.lhe.gz') if os.path.exists(pjoin(self.me_dir, 'HTML', run,'plots_parton.html')): - to_delete.append(pjoin(self.me_dir, 'HTML', run,'plots_parton.html')) + to_delete.append(pjoin(self.me_dir, 'HTML', run,'plots_parton.html')) if nb_rm != len(to_delete): logger.warning('Be carefull that partonic information are on the point to be removed.') if 'all' in mode: @@ -5327,8 +5327,8 @@ def do_remove(self, line): if 'delphes' not in mode: to_delete = [f for f in to_delete if 'delphes' not in f] if 'parton' not in mode: - to_delete = [f for f in to_delete if 'delphes' in f - or 'pgs' in f + to_delete = [f for f in to_delete if 'delphes' in f + or 'pgs' in f or 'pythia' in f] if not self.force and len(to_delete): question = 'Do you want to delete the following files?\n %s' % \ @@ -5336,7 +5336,7 @@ def do_remove(self, line): ans = self.ask(question, 'y', choices=['y','n']) else: ans = 'y' - + if ans == 'y': for file2rm in to_delete: if os.path.exists(pjoin(self.me_dir, 'Events', run, file2rm)): @@ -5374,7 +5374,7 @@ def do_remove(self, line): if ans == 'y': for file2rm in to_delete: os.remove(file2rm) - + if 'banner' in mode: to_delete = misc.glob('*', pjoin(self.me_dir, 'Events', run)) if tag: @@ -5389,8 +5389,8 @@ def do_remove(self, line): return elif any(['banner' not in os.path.basename(p) for p in to_delete]): if to_delete: - raise MadGraph5Error('''Some output still exists for this run. - Please remove those output first. Do for example: + raise MadGraph5Error('''Some output still exists for this run. + Please remove those output first. Do for example: remove %s all banner ''' % run) else: @@ -5400,7 +5400,7 @@ def do_remove(self, line): return else: logger.info('''The banner is not removed. In order to remove it run: - remove %s all banner %s''' % (run, tag and '--tag=%s ' % tag or '')) + remove %s all banner %s''' % (run, tag and '--tag=%s ' % tag or '')) # update database. self.results.clean(mode, run, tag) @@ -5420,7 +5420,7 @@ def do_plot(self, line): logger.info('plot for run %s' % self.run_name) if not self.force: self.ask_edit_cards(['plot_card.dat'], args, plot=True) - + if any([arg in ['all','parton'] for arg in args]): filename = pjoin(self.me_dir, 'Events', self.run_name, 'unweighted_events.lhe') if os.path.exists(filename+'.gz'): @@ -5438,8 +5438,8 @@ def do_plot(self, line): except Exception: pass else: - logger.info('No valid files for partonic plot') - + logger.info('No valid files for partonic plot') + if any([arg in ['all','pythia'] for arg in args]): filename = pjoin(self.me_dir, 'Events' ,self.run_name, '%s_pythia_events.lhe' % self.run_tag) @@ -5452,10 +5452,10 @@ def do_plot(self, line): stdout= "%s.gz" % filename) else: logger.info('No valid files for pythia plot') - - + + if any([arg in ['all','pgs'] for arg in args]): - filename = pjoin(self.me_dir, 'Events', self.run_name, + filename = pjoin(self.me_dir, 'Events', self.run_name, '%s_pgs_events.lhco' % self.run_tag) if os.path.exists(filename+'.gz'): misc.gunzip("%s.gz" % filename) @@ -5464,15 +5464,15 @@ def do_plot(self, line): misc.gzip(filename) else: logger.info('No valid files for pgs plot') - + if any([arg in ['all','delphes'] for arg in args]): - filename = pjoin(self.me_dir, 'Events', self.run_name, + filename = pjoin(self.me_dir, 'Events', self.run_name, '%s_delphes_events.lhco' % self.run_tag) if os.path.exists(filename+'.gz'): misc.gunzip("%s.gz" % filename) if os.path.exists(filename): self.create_plot('Delphes') - misc.gzip(filename) + misc.gzip(filename) else: logger.info('No valid files for delphes plot') @@ -5488,9 +5488,9 @@ def do_syscalc(self, line): if self.ninitial == 1: logger.error('SysCalc can\'t be run for decay processes') return - + logger.info('Calculating systematics for run %s' % self.run_name) - + self.ask_edit_cards(['run_card.dat'], args, plot=False) self.run_card = banner_mod.RunCard(pjoin(self.me_dir, 'Cards', 'run_card.dat')) if any([arg in ['all','parton'] for arg in args]): @@ -5504,7 +5504,7 @@ def do_syscalc(self, line): stdout="%s.gz" % filename) else: logger.info('No valid files for parton level systematics run.') - + if any([arg in ['all','pythia'] for arg in args]): filename = pjoin(self.me_dir, 'Events' ,self.run_name, '%s_pythia_syst.dat' % self.run_tag) @@ -5525,17 +5525,17 @@ def do_syscalc(self, line): else: logger.info('No valid files for pythia level') - + def store_result(self): - """ tar the pythia results. This is done when we are quite sure that + """ tar the pythia results. This is done when we are quite sure that the pythia output will not be use anymore """ if not self.run_name: return - + if not self.to_store: - return - + return + tag = self.run_card['run_tag'] self.update_status('storing files of previous run', level=None,\ error=True) @@ -5546,14 +5546,14 @@ def store_result(self): misc.gzip(pjoin(self.me_dir,'Events',self.run_name,"unweighted_events.lhe")) if os.path.exists(pjoin(self.me_dir,'Events','reweight.lhe')): os.remove(pjoin(self.me_dir,'Events', 'reweight.lhe')) - + if 'pythia' in self.to_store: self.update_status('Storing Pythia files of previous run', level='pythia', error=True) p = pjoin(self.me_dir,'Events') n = self.run_name t = tag self.to_store.remove('pythia') - misc.gzip(pjoin(p,'pythia_events.hep'), + misc.gzip(pjoin(p,'pythia_events.hep'), stdout=pjoin(p, str(n),'%s_pythia_events.hep' % t),forceexternal=True) if 'pythia8' in self.to_store: @@ -5581,26 +5581,26 @@ def store_result(self): os.system("mv " + file_path + hepmc_fileformat + " " + move_hepmc_path) self.update_status('Done', level='pythia',makehtml=False,error=True) - self.results.save() - + self.results.save() + self.to_store = [] - def launch_job(self,exe, cwd=None, stdout=None, argument = [], remaining=0, + def launch_job(self,exe, cwd=None, stdout=None, argument = [], remaining=0, run_type='', mode=None, **opt): """ """ argument = [str(arg) for arg in argument] if mode is None: mode = self.cluster_mode - + # ensure that exe is executable if os.path.exists(exe) and not os.access(exe, os.X_OK): os.system('chmod +x %s ' % exe) elif (cwd and os.path.exists(pjoin(cwd, exe))) and not \ os.access(pjoin(cwd, exe), os.X_OK): os.system('chmod +x %s ' % pjoin(cwd, exe)) - + if mode == 0: - self.update_status((remaining, 1, + self.update_status((remaining, 1, self.total_jobs - remaining -1, run_type), level=None, force=False) start = time.time() #os.system('cd %s; ./%s' % (cwd,exe)) @@ -5613,24 +5613,24 @@ def launch_job(self,exe, cwd=None, stdout=None, argument = [], remaining=0, elif mode in [1,2]: exename = os.path.basename(exe) # For condor cluster, create the input/output files - if 'ajob' in exename: + if 'ajob' in exename: input_files = ['madevent','input_app.txt','symfact.dat','iproc.dat','dname.mg', pjoin(self.me_dir, 'SubProcesses','randinit')] - if os.path.exists(pjoin(self.me_dir,'SubProcesses', + if os.path.exists(pjoin(self.me_dir,'SubProcesses', 'MadLoop5_resources.tar.gz')) and cluster.need_transfer(self.options): input_files.append(pjoin(self.me_dir,'SubProcesses', 'MadLoop5_resources.tar.gz')) - + output_files = [] required_output = [] - + #Find the correct PDF input file input_files.append(self.get_pdf_input_filename()) - + #Find the correct ajob Gre = re.compile("\s*j=(G[\d\.\w]+)") origre = re.compile("grid_directory=(G[\d\.\w]+)") - try : + try : fsock = open(exe) except Exception: fsock = open(pjoin(cwd,exe)) @@ -5648,21 +5648,21 @@ def launch_job(self,exe, cwd=None, stdout=None, argument = [], remaining=0, if os.path.isdir(pjoin(cwd,G)): input_files.append(G) required_output.append('%s/results.dat' % G) - + if origre.search(text): G_grid = origre.search(text).groups()[0] input_files.append(pjoin(G_grid, 'ftn26')) - + #submitting - self.cluster.submit2(exe, stdout=stdout, cwd=cwd, + self.cluster.submit2(exe, stdout=stdout, cwd=cwd, input_files=input_files, output_files=output_files, required_output=required_output) elif 'survey' in exename: input_files = ['madevent','input_app.txt','symfact.dat','iproc.dat', 'dname.mg', - pjoin(self.me_dir, 'SubProcesses','randinit')] - if os.path.exists(pjoin(self.me_dir,'SubProcesses', + pjoin(self.me_dir, 'SubProcesses','randinit')] + if os.path.exists(pjoin(self.me_dir,'SubProcesses', 'MadLoop5_resources.tar.gz')) and cluster.need_transfer(self.options): - input_files.append(pjoin(self.me_dir,'SubProcesses', + input_files.append(pjoin(self.me_dir,'SubProcesses', 'MadLoop5_resources.tar.gz')) #Find the correct PDF input file @@ -5671,7 +5671,7 @@ def launch_job(self,exe, cwd=None, stdout=None, argument = [], remaining=0, output_files = [] required_output = [] - + #Find the correct ajob suffix = "_%s" % int(float(argument[0])) if suffix == '_0': @@ -5685,12 +5685,12 @@ def launch_job(self,exe, cwd=None, stdout=None, argument = [], remaining=0, if '.' in argument[0]: offset = int(str(argument[0]).split('.')[1]) else: - offset = 0 - + offset = 0 + if offset ==0 or offset == int(float(argument[0])): if os.path.exists(pjoin(cwd, G, 'input_app.txt')): os.remove(pjoin(cwd, G, 'input_app.txt')) - + if os.path.exists(os.path.realpath(pjoin(cwd, G, 'ftn25'))): if offset == 0 or offset == int(float(argument[0])): os.remove(pjoin(cwd, G, 'ftn25')) @@ -5706,16 +5706,16 @@ def launch_job(self,exe, cwd=None, stdout=None, argument = [], remaining=0, pass #submitting - self.cluster.cluster_submit(exe, stdout=stdout, cwd=cwd, argument=argument, + self.cluster.cluster_submit(exe, stdout=stdout, cwd=cwd, argument=argument, input_files=input_files, output_files=output_files, required_output=required_output, **opt) elif "refine_splitted.sh" in exename: input_files = ['madevent','symfact.dat','iproc.dat', 'dname.mg', - pjoin(self.me_dir, 'SubProcesses','randinit')] - + pjoin(self.me_dir, 'SubProcesses','randinit')] + if os.path.exists(pjoin(self.me_dir,'SubProcesses', 'MadLoop5_resources.tar.gz')) and cluster.need_transfer(self.options): - input_files.append(pjoin(self.me_dir,'SubProcesses', + input_files.append(pjoin(self.me_dir,'SubProcesses', 'MadLoop5_resources.tar.gz')) #Find the correct PDF input file @@ -5725,25 +5725,25 @@ def launch_job(self,exe, cwd=None, stdout=None, argument = [], remaining=0, output_files = [argument[0]] required_output = [] for G in output_files: - required_output.append('%s/results.dat' % G) + required_output.append('%s/results.dat' % G) input_files.append(pjoin(argument[1], "input_app.txt")) input_files.append(pjoin(argument[1], "ftn26")) - + #submitting - self.cluster.cluster_submit(exe, stdout=stdout, cwd=cwd, argument=argument, + self.cluster.cluster_submit(exe, stdout=stdout, cwd=cwd, argument=argument, input_files=input_files, output_files=output_files, - required_output=required_output, **opt) + required_output=required_output, **opt) + + - - else: self.cluster.submit(exe, argument=argument, stdout=stdout, cwd=cwd, **opt) - + ############################################################################ def find_madevent_mode(self): """Find if Madevent is in Group mode or not""" - + # The strategy is too look in the files Source/run_configs.inc # if we found: ChanPerJob=3 then it's a group mode. file_path = pjoin(self.me_dir, 'Source', 'run_config.inc') @@ -5752,11 +5752,11 @@ def find_madevent_mode(self): return 'group' else: return 'v4' - + ############################################################################ def monitor(self, run_type='monitor', mode=None, html=False): """ monitor the progress of running job """ - + starttime = time.time() if mode is None: @@ -5772,8 +5772,8 @@ def monitor(self, run_type='monitor', mode=None, html=False): else: update_status = lambda idle, run, finish: None update_first = None - try: - self.cluster.wait(self.me_dir, update_status, update_first=update_first) + try: + self.cluster.wait(self.me_dir, update_status, update_first=update_first) except Exception as error: logger.info(error) if not self.force: @@ -5788,24 +5788,24 @@ def monitor(self, run_type='monitor', mode=None, html=False): raise except KeyboardInterrupt as error: self.cluster.remove() - raise - - + raise + - ############################################################################ + + ############################################################################ def configure_directory(self, html_opening=True): - """ All action require before any type of run """ + """ All action require before any type of run """ # Basic check assert os.path.exists(pjoin(self.me_dir,'SubProcesses')) # environmental variables to be included in make_opts self.make_opts_var = {} - + #see when the last file was modified time_mod = max([os.path.getmtime(pjoin(self.me_dir,'Cards','run_card.dat')), os.path.getmtime(pjoin(self.me_dir,'Cards','param_card.dat'))]) - + if self.configured >= time_mod and hasattr(self, 'random') and hasattr(self, 'run_card'): #just ensure that cluster specific are correctly handled if self.cluster: @@ -5820,7 +5820,7 @@ def configure_directory(self, html_opening=True): #open only once the web page # Change current working directory self.launching_dir = os.getcwd() - + # Check if we need the MSSM special treatment model = self.find_model_name() if model == 'mssm' or model.startswith('mssm-'): @@ -5828,14 +5828,14 @@ def configure_directory(self, html_opening=True): mg5_param = pjoin(self.me_dir, 'Source', 'MODEL', 'MG5_param.dat') check_param_card.convert_to_mg5card(param_card, mg5_param) check_param_card.check_valid_param_card(mg5_param) - + # limit the number of event to 100k self.check_nb_events() # this is in order to avoid conflicts between runs with and without # lhapdf. not needed anymore the makefile handles it automaticallu #misc.compile(['clean4pdf'], cwd = pjoin(self.me_dir, 'Source')) - + self.make_opts_var['pdlabel1'] = '' self.make_opts_var['pdlabel2'] = '' if self.run_card['pdlabel1'] in ['eva', 'iww']: @@ -5866,7 +5866,7 @@ def configure_directory(self, html_opening=True): self.copy_lep_densities(self.run_card['pdlabel'], pjoin(self.me_dir, 'Source')) self.make_opts_var['pdlabel1'] = 'ee' self.make_opts_var['pdlabel2'] = 'ee' - + # set random number if self.run_card['iseed'] != 0: self.random = int(self.run_card['iseed']) @@ -5885,18 +5885,18 @@ def configure_directory(self, html_opening=True): break else: self.random = random.randint(1, 30107) - + #set random seed for python part of the code if self.run_card['python_seed'] == -2: #-2 means same as run_card import random if not hasattr(random, 'mg_seedset'): - random.seed(self.run_card['python_seed']) - random.mg_seedset = self.run_card['python_seed'] + random.seed(self.run_card['python_seed']) + random.mg_seedset = self.run_card['python_seed'] elif self.run_card['python_seed'] >= 0: import random if not hasattr(random, 'mg_seedset'): - random.seed(self.run_card['python_seed']) - random.mg_seedset = self.run_card['python_seed'] + random.seed(self.run_card['python_seed']) + random.mg_seedset = self.run_card['python_seed'] if self.run_card['ickkw'] == 2: logger.info('Running with CKKW matching') self.treat_ckkw_matching() @@ -5905,12 +5905,12 @@ def configure_directory(self, html_opening=True): self.update_make_opts(self.run_card) # reset list of Gdirectory self.Gdirs = None - + # create param_card.inc and run_card.inc self.do_treatcards('') - + logger.info("compile Source Directory") - + # Compile for name in [ 'all']:#, '../bin/internal/combine_events']: self.compile(arg=[name], cwd=os.path.join(self.me_dir, 'Source')) @@ -5933,7 +5933,7 @@ def configure_directory(self, html_opening=True): os.remove(pjoin(self.me_dir, 'lib','libbias.a')) force_subproc_clean = True - + # Finally compile the bias module as well if self.run_card['bias_module'] not in ['dummy',None]: logger.debug("Compiling the bias module '%s'"%bias_name) @@ -5945,7 +5945,7 @@ def configure_directory(self, html_opening=True): 'INVALID' in str(bias_module_valid).upper(): raise InvalidCmd("The bias module '%s' cannot be used because of:\n%s"% (bias_name,bias_module_valid)) - + self.compile(arg=[], cwd=os.path.join(self.me_dir, 'Source','BIAS',bias_name)) self.proc_characteristics['bias_module']=bias_name # Update the proc_characterstics file @@ -5954,7 +5954,7 @@ def configure_directory(self, html_opening=True): if force_subproc_clean: # Make sure that madevent will be recompiled - subproc = [l.strip() for l in open(pjoin(self.me_dir,'SubProcesses', + subproc = [l.strip() for l in open(pjoin(self.me_dir,'SubProcesses', 'subproc.mg'))] for nb_proc,subdir in enumerate(subproc): Pdir = pjoin(self.me_dir, 'SubProcesses',subdir.strip()) @@ -5971,20 +5971,20 @@ def configure_directory(self, html_opening=True): ############################################################################ @staticmethod def check_dir(path, default=''): - """check if the directory exists. if so return the path otherwise the + """check if the directory exists. if so return the path otherwise the default""" - + if os.path.isdir(path): return path else: return default - + ############################################################################ def get_Gdir(self, Pdir=None, symfact=None): """get the list of Gdirectory if not yet saved.""" - + if hasattr(self, "Gdirs") and self.Gdirs: if self.me_dir in self.Gdirs[0]: if Pdir is None: @@ -6000,8 +6000,8 @@ def get_Gdir(self, Pdir=None, symfact=None): Pdirs = self.get_Pdir() - Gdirs = {self.me_dir:[]} - mfactors = {} + Gdirs = {self.me_dir:[]} + mfactors = {} for P in Pdirs: Gdirs[P] = [] #for the next line do not use P, since in readonly mode it might not have symfact @@ -6012,7 +6012,7 @@ def get_Gdir(self, Pdir=None, symfact=None): mfactors[pjoin(P, "G%s" % tag)] = mfactor self.Gdirs = (Gdirs, mfactors) return self.get_Gdir(Pdir, symfact=symfact) - + ############################################################################ def set_run_name(self, name, tag=None, level='parton', reload_card=False, allow_new_tag=True): @@ -6030,8 +6030,8 @@ def get_last_tag(self, level): tagRun = self.results[self.run_name][i] if tagRun.pythia or tagRun.shower or tagRun.pythia8 : return tagRun['tag'] - - + + # when are we force to change the tag new_run:previous run requiring changes upgrade_tag = {'parton': ['parton','pythia','pgs','delphes','madanalysis5_hadron','madanalysis5_parton', 'rivet'], 'pythia': ['pythia','pgs','delphes','madanalysis5_hadron'], @@ -6044,7 +6044,7 @@ def get_last_tag(self, level): 'syscalc':[], 'rivet':['rivet']} - if name == self.run_name: + if name == self.run_name: if reload_card: run_card = pjoin(self.me_dir, 'Cards','run_card.dat') self.run_card = banner_mod.RunCard(run_card) @@ -6064,13 +6064,13 @@ def get_last_tag(self, level): break return get_last_tag(self, level) - + # save/clean previous run if self.run_name: self.store_result() # store new name self.run_name = name - + new_tag = False # First call for this run -> set the banner self.banner = banner_mod.recover_banner(self.results, level, name) @@ -6079,8 +6079,8 @@ def get_last_tag(self, level): else: # Read run_card run_card = pjoin(self.me_dir, 'Cards','run_card.dat') - self.run_card = banner_mod.RunCard(run_card) - + self.run_card = banner_mod.RunCard(run_card) + if tag: self.run_card['run_tag'] = tag new_tag = True @@ -6093,7 +6093,7 @@ def get_last_tag(self, level): self.results.update('add run %s' % name, 'all', makehtml=False) else: for tag in upgrade_tag[level]: - + if getattr(self.results[self.run_name][-1], tag): # LEVEL is already define in the last tag -> need to switch tag tag = self.get_available_tag() @@ -6103,8 +6103,8 @@ def get_last_tag(self, level): if not new_tag: # We can add the results to the current run tag = self.results[self.run_name][-1]['tag'] - self.run_card['run_tag'] = tag # ensure that run_tag is correct - + self.run_card['run_tag'] = tag # ensure that run_tag is correct + if allow_new_tag and (name in self.results and not new_tag): self.results.def_current(self.run_name) else: @@ -6113,15 +6113,15 @@ def get_last_tag(self, level): self.run_tag = self.run_card['run_tag'] return get_last_tag(self, level) - - - + + + ############################################################################ def check_nb_events(self): - """Find the number of event in the run_card, and check that this is not + """Find the number of event in the run_card, and check that this is not too large""" - + nb_event = int(self.run_card['nevents']) if nb_event > 1000000: logger.warning("Attempting to generate more than 1M events") @@ -6133,20 +6133,20 @@ def check_nb_events(self): return - - ############################################################################ + + ############################################################################ def update_random(self): """ change random number""" - + self.random += 3 if self.random > 30081*30081: # can't use too big random number raise MadGraph5Error('Random seed too large ' + str(self.random) + ' > 30081*30081') - if self.run_card['python_seed'] == -2: + if self.run_card['python_seed'] == -2: import random if not hasattr(random, 'mg_seedset'): - random.seed(self.random) + random.seed(self.random) random.mg_seedset = self.random - + ############################################################################ def save_random(self): """save random number in appropirate file""" @@ -6155,14 +6155,14 @@ def save_random(self): fsock.writelines('r=%s\n' % self.random) def do_quit(self, *args, **opts): - + return common_run.CommonRunCmd.do_quit(self, *args, **opts) #return CmdExtended.do_quit(self, *args, **opts) - + ############################################################################ def treat_CKKW_matching(self): """check for ckkw""" - + lpp1 = self.run_card['lpp1'] lpp2 = self.run_card['lpp2'] e1 = self.run_card['ebeam1'] @@ -6170,19 +6170,19 @@ def treat_CKKW_matching(self): pd = self.run_card['pdlabel'] lha = self.run_card['lhaid'] xq = self.run_card['xqcut'] - translation = {'e1': e1, 'e2':e2, 'pd':pd, + translation = {'e1': e1, 'e2':e2, 'pd':pd, 'lha':lha, 'xq':xq} if lpp1 or lpp2: - # Remove ':s from pd + # Remove ':s from pd if pd.startswith("'"): pd = pd[1:] if pd.endswith("'"): - pd = pd[:-1] + pd = pd[:-1] if xq >2 or xq ==2: xq = 2 - + # find data file if pd == "lhapdf": issudfile = 'lib/issudgrid-%(e1)s-%(e2)s-%(pd)s-%(lha)s-%(xq)s.dat.gz' @@ -6192,9 +6192,9 @@ def treat_CKKW_matching(self): issudfile = pjoin(self.webbin, issudfile % translation) else: issudfile = pjoin(self.me_dir, issudfile % translation) - + logger.info('Sudakov grid file: %s' % issudfile) - + # check that filepath exists if os.path.exists(issudfile): path = pjoin(self.me_dir, 'lib', 'issudgrid.dat') @@ -6203,20 +6203,20 @@ def treat_CKKW_matching(self): msg = 'No sudakov grid file for parameter choice. Start to generate it. This might take a while' logger.info(msg) self.update_status('GENERATE SUDAKOV GRID', level='parton') - + for i in range(-2,6): - self.cluster.submit('%s/gensudgrid ' % self.dirbin, + self.cluster.submit('%s/gensudgrid ' % self.dirbin, argument = ['%d'%i], - cwd=self.me_dir, + cwd=self.me_dir, stdout=open(pjoin(self.me_dir, 'gensudgrid%s.log' % i),'w')) self.monitor() for i in range(-2,6): path = pjoin(self.me_dir, 'lib', 'issudgrid.dat') os.system('cat %s/gensudgrid%s.log >> %s' % (self.me_dir, path)) misc.gzip(path, stdout=issudfile) - + ############################################################################ - def create_root_file(self, input='unweighted_events.lhe', + def create_root_file(self, input='unweighted_events.lhe', output='unweighted_events.root' ): """create the LHE root file """ self.update_status('Creating root files', level='parton') @@ -6233,14 +6233,14 @@ def create_root_file(self, input='unweighted_events.lhe', totar = False torm = True input = input[:-3] - + try: - misc.call(['%s/ExRootLHEFConverter' % eradir, + misc.call(['%s/ExRootLHEFConverter' % eradir, input, output], cwd=pjoin(self.me_dir, 'Events')) except Exception: logger.warning('fail to produce Root output [problem with ExRootAnalysis]') - + if totar: if os.path.exists('%s.gz' % input): try: @@ -6251,13 +6251,13 @@ def create_root_file(self, input='unweighted_events.lhe', misc.gzip(input) if torm: os.remove(input) - + def run_syscalc(self, mode='parton', event_path=None, output=None): - """create the syscalc output""" + """create the syscalc output""" if self.run_card['use_syst'] not in self.true: return - + scdir = self.options['syscalc_path'] if not scdir or not os.path.exists(scdir): return @@ -6265,12 +6265,12 @@ def run_syscalc(self, mode='parton', event_path=None, output=None): if self.run_card['event_norm'] != 'sum': logger.critical('SysCalc works only when event_norm is on \'sum\'.') return - logger.info('running SysCalc on mode %s' % mode) - + logger.info('running SysCalc on mode %s' % mode) + # Restore the old default for SysCalc+PY6 if self.run_card['sys_matchscale']=='auto': self.run_card['sys_matchscale'] = "30 50" - + # Check that all pdfset are correctly installed lhaid = [self.run_card.get_lhapdf_id()] if '&&' in self.run_card['sys_pdf']: @@ -6285,20 +6285,20 @@ def run_syscalc(self, mode='parton', event_path=None, output=None): logger.debug(str(error)) logger.warning('Systematic computation requires lhapdf to run. Bypass SysCalc') return - + # Copy all the relevant PDF sets [self.copy_lhapdf_set([onelha], pdfsets_dir) for onelha in lhaid] - + to_syscalc={'sys_scalefact': self.run_card['sys_scalefact'], 'sys_alpsfact': self.run_card['sys_alpsfact'], 'sys_matchscale': self.run_card['sys_matchscale'], 'sys_scalecorrelation': self.run_card['sys_scalecorrelation'], 'sys_pdf': self.run_card['sys_pdf']} - - tag = self.run_card['run_tag'] + + tag = self.run_card['run_tag'] card = pjoin(self.me_dir, 'bin','internal', 'syscalc_card.dat') template = open(pjoin(self.me_dir, 'bin','internal', 'syscalc_template.dat')).read() - + if '&&' in to_syscalc['sys_pdf']: to_syscalc['sys_pdf'] = to_syscalc['sys_pdf'].split('#',1)[0].replace('&&',' \n ') else: @@ -6311,8 +6311,8 @@ def run_syscalc(self, mode='parton', event_path=None, output=None): new.append(d) else: new[-1] += ' %s' % d - to_syscalc['sys_pdf'] = '\n'.join(new) - + to_syscalc['sys_pdf'] = '\n'.join(new) + if to_syscalc['sys_pdf'].lower() in ['', 'f', 'false', 'none', '.false.']: to_syscalc['sys_pdf'] = '' if to_syscalc['sys_alpsfact'].lower() in ['', 'f', 'false', 'none','.false.']: @@ -6320,17 +6320,17 @@ def run_syscalc(self, mode='parton', event_path=None, output=None): - + # check if the scalecorrelation parameter is define: if not 'sys_scalecorrelation' in self.run_card: self.run_card['sys_scalecorrelation'] = -1 open(card,'w').write(template % self.run_card) - + if not os.path.exists(card): return False - - + + event_dir = pjoin(self.me_dir, 'Events') if not event_path: @@ -6353,19 +6353,19 @@ def run_syscalc(self, mode='parton', event_path=None, output=None): raise SysCalcError('qcut value for sys_matchscale lower than qcut in pythia_card. Bypass syscalc') if float(value) < xqcut: raise SysCalcError('qcut value for sys_matchscale lower than xqcut in run_card. Bypass syscalc') - - + + event_path = pjoin(event_dir,'syst.dat') output = pjoin(event_dir, 'syscalc.dat') else: raise self.InvalidCmd('Invalid mode %s' % mode) - + if not os.path.exists(event_path): if os.path.exists(event_path+'.gz'): misc.gunzip(event_path+'.gz') else: raise SysCalcError('Events file %s does not exits' % event_path) - + self.update_status('Calculating systematics for %s level' % mode, level = mode.lower()) try: proc = misc.call([os.path.join(scdir, 'sys_calc'), @@ -6374,7 +6374,7 @@ def run_syscalc(self, mode='parton', event_path=None, output=None): stderr = subprocess.STDOUT, cwd=event_dir) # Wait 5 s to make sure file is finished writing - time.sleep(5) + time.sleep(5) except OSError as error: logger.error('fail to run syscalc: %s. Please check that SysCalc is correctly installed.' % error) else: @@ -6382,11 +6382,11 @@ def run_syscalc(self, mode='parton', event_path=None, output=None): logger.warning('SysCalc Failed. Please read the associate log to see the reason. Did you install the associate PDF set?') elif mode == 'parton': files.mv(output, event_path) - + self.update_status('End syscalc for %s level' % mode, level = mode.lower(), makehtml=False) - - return True + + return True action_switcher = AskRun @@ -6399,23 +6399,23 @@ def ask_run_configuration(self, mode=None, args=[]): passing_cmd.append('reweight=ON') if '-M' in args or '--madspin' in args: passing_cmd.append('madspin=ON') - + switch, cmd_switch = self.ask('', '0', [], ask_class = self.action_switcher, mode=mode, line_args=args, force=self.force, first_cmd=passing_cmd, return_instance=True) # - self.switch = switch # store the value of the switch for plugin purpose + self.switch = switch # store the value of the switch for plugin purpose if 'dynamical' in switch: mode = 'auto' - + # Now that we know in which mode we are check that all the card #exists (copy default if needed) - + cards = ['param_card.dat', 'run_card.dat'] if switch['shower'] == 'Pythia6': cards.append('pythia_card.dat') if switch['shower'] == 'Pythia8': - cards.append('pythia8_card.dat') + cards.append('pythia8_card.dat') if switch['detector'] in ['PGS','DELPHES+PGS']: cards.append('pgs_card.dat') if switch['detector'] in ['Delphes', 'DELPHES+PGS']: @@ -6438,29 +6438,29 @@ def ask_run_configuration(self, mode=None, args=[]): cards.append('rivet_card.dat') self.keep_cards(cards) - + first_cmd = cmd_switch.get_cardcmd() - + if os.path.isfile(pjoin(self.me_dir,'Cards','MadLoopParams.dat')): cards.append('MadLoopParams.dat') - + if self.force: self.check_param_card(pjoin(self.me_dir,'Cards','param_card.dat' )) return switch - + if 'dynamical' in switch and switch['dynamical']: self.ask_edit_cards(cards, plot=False, mode='auto', first_cmd=first_cmd) else: self.ask_edit_cards(cards, plot=False, first_cmd=first_cmd) return switch - + ############################################################################ def ask_pythia_run_configuration(self, mode=None, pythia_version=6, banner=None): """Ask the question when launching pythia""" - + pythia_suffix = '' if pythia_version==6 else '%d'%pythia_version - + available_mode = ['0', '1'] if pythia_version==6: available_mode.append('2') @@ -6485,10 +6485,10 @@ def ask_pythia_run_configuration(self, mode=None, pythia_version=6, banner=None) mode = self.ask(question, '0', options) elif not mode: mode = 'auto' - + if mode.isdigit(): mode = name[mode] - + auto = False if mode == 'auto': auto = True @@ -6497,7 +6497,7 @@ def ask_pythia_run_configuration(self, mode=None, pythia_version=6, banner=None) mode = 'pgs' elif os.path.exists(pjoin(self.me_dir, 'Cards', 'delphes_card.dat')): mode = 'delphes' - else: + else: mode = 'pythia%s'%pythia_suffix logger.info('Will run in mode %s' % mode) # Now that we know in which mode we are check that all the card @@ -6513,15 +6513,15 @@ def ask_pythia_run_configuration(self, mode=None, pythia_version=6, banner=None) cards.append('delphes_trigger.dat') self.keep_cards(cards, ignore=['madanalysis5_parton_card.dat','madanalysis5_hadron_card.dat', 'plot_card.dat']) - + if self.force: return mode - + if not banner: banner = self.banner - + if auto: - self.ask_edit_cards(cards, from_banner=['param', 'run'], + self.ask_edit_cards(cards, from_banner=['param', 'run'], mode='auto', plot=(pythia_version==6), banner=banner ) else: @@ -6529,12 +6529,12 @@ def ask_pythia_run_configuration(self, mode=None, pythia_version=6, banner=None) plot=(pythia_version==6), banner=banner) return mode - + #=============================================================================== # MadEventCmd #=============================================================================== class MadEventCmdShell(MadEventCmd, cmd.CmdShell): - """The command line processor of MadGraph""" + """The command line processor of MadGraph""" @@ -6548,11 +6548,11 @@ class SubProcesses(object): @classmethod def clean(cls): cls.name_to_pdg = {} - + @staticmethod def get_subP(me_dir): """return the list of Subprocesses""" - + out = [] for line in open(pjoin(me_dir,'SubProcesses', 'subproc.mg')): if not line: @@ -6560,9 +6560,9 @@ def get_subP(me_dir): name = line.strip() if os.path.exists(pjoin(me_dir, 'SubProcesses', name)): out.append(pjoin(me_dir, 'SubProcesses', name)) - + return out - + @staticmethod @@ -6623,9 +6623,9 @@ def get_subP_ids(path): particles = re.search("/([\d,-]+)/", line) all_ids.append([int(p) for p in particles.group(1).split(',')]) return all_ids - - -#=============================================================================== + + +#=============================================================================== class GridPackCmd(MadEventCmd): """The command for the gridpack --Those are not suppose to be use interactively--""" @@ -6639,7 +6639,7 @@ def __init__(self, me_dir = None, nb_event=0, seed=0, gran=-1, *completekey, **s self.random = seed self.random_orig = self.random self.granularity = gran - + self.options['automatic_html_opening'] = False #write the grid_card.dat on disk self.nb_event = int(nb_event) @@ -6680,7 +6680,7 @@ def write_RunWeb(self, me_dir): def write_gridcard(self, nb_event, seed, gran): """write the grid_card.dat file at appropriate location""" - + # first try to write grid_card within the gridpack. print("WRITE GRIDCARD", self.me_dir) if self.readonly: @@ -6689,35 +6689,35 @@ def write_gridcard(self, nb_event, seed, gran): fsock = open('grid_card.dat','w') else: fsock = open(pjoin(self.me_dir, 'Cards', 'grid_card.dat'),'w') - + gridpackcard = banner_mod.GridpackCard() gridpackcard['GridRun'] = True gridpackcard['gevents'] = nb_event gridpackcard['gseed'] = seed gridpackcard['ngran'] = gran - + gridpackcard.write(fsock) ############################################################################ def get_Pdir(self): """get the list of Pdirectory if not yet saved.""" - + if hasattr(self, "Pdirs"): if self.me_dir in self.Pdirs[0]: return self.Pdirs - + if not self.readonly: - self.Pdirs = [pjoin(self.me_dir, 'SubProcesses', l.strip()) + self.Pdirs = [pjoin(self.me_dir, 'SubProcesses', l.strip()) for l in open(pjoin(self.me_dir,'SubProcesses', 'subproc.mg'))] else: - self.Pdirs = [l.strip() - for l in open(pjoin(self.me_dir,'SubProcesses', 'subproc.mg'))] - + self.Pdirs = [l.strip() + for l in open(pjoin(self.me_dir,'SubProcesses', 'subproc.mg'))] + return self.Pdirs - + def prepare_local_dir(self): """create the P directory structure in the local directory""" - + if not self.readonly: os.chdir(self.me_dir) else: @@ -6726,7 +6726,7 @@ def prepare_local_dir(self): os.mkdir(p) files.cp(pjoin(self.me_dir,'SubProcesses',p,'symfact.dat'), pjoin(p, 'symfact.dat')) - + def launch(self, nb_event, seed): """ launch the generation for the grid """ @@ -6742,13 +6742,13 @@ def launch(self, nb_event, seed): if self.run_card['python_seed'] == -2: import random if not hasattr(random, 'mg_seedset'): - random.seed(seed) + random.seed(seed) random.mg_seedset = seed elif self.run_card['python_seed'] > 0: import random if not hasattr(random, 'mg_seedset'): - random.seed(self.run_card['python_seed']) - random.mg_seedset = self.run_card['python_seed'] + random.seed(self.run_card['python_seed']) + random.mg_seedset = self.run_card['python_seed'] # 2) Run the refine for the grid self.update_status('Generating Events', level=None) #misc.call([pjoin(self.me_dir,'bin','refine4grid'), @@ -6767,70 +6767,70 @@ def launch(self, nb_event, seed): self.exec_cmd('decay_events -from_cards', postcmd=False) elif self.run_card['use_syst'] and self.run_card['systematics_program'] == 'systematics': self.options['nb_core'] = 1 - self.exec_cmd('systematics %s --from_card' % + self.exec_cmd('systematics %s --from_card' % pjoin('Events', self.run_name, 'unweighted_events.lhe.gz'), postcmd=False,printcmd=False) - + def refine4grid(self, nb_event): """Special refine for gridpack run.""" self.nb_refine += 1 - + precision = nb_event self.opts = dict([(key,value[1]) for (key,value) in \ self._survey_options.items()]) - + # initialize / remove lhapdf mode # self.configure_directory() # All this has been done before self.cluster_mode = 0 # force single machine # Store seed in randinit file, to be read by ranmar.f self.save_random() - + self.update_status('Refine results to %s' % precision, level=None) logger.info("Using random number seed offset = %s" % self.random) refine_opt = {'err_goal': nb_event, 'split_channels': False, - 'ngran':self.granularity, 'readonly': self.readonly} + 'ngran':self.granularity, 'readonly': self.readonly} x_improve = gen_ximprove.gen_ximprove_gridpack(self, refine_opt) x_improve.launch() # create the ajob for the refinment and run those! - self.gscalefact = x_improve.gscalefact #store jacobian associate to the gridpack - - + self.gscalefact = x_improve.gscalefact #store jacobian associate to the gridpack + + #bindir = pjoin(os.path.relpath(self.dirbin, pjoin(self.me_dir,'SubProcesses'))) #print 'run combine!!!' #combine_runs.CombineRuns(self.me_dir) - + return #update html output Presults = sum_html.collect_result(self) cross, error = Presults.xsec, Presults.xerru self.results.add_detail('cross', cross) self.results.add_detail('error', error) - - + + #self.update_status('finish refine', 'parton', makehtml=False) #devnull.close() - - - + + + return self.total_jobs = 0 - subproc = [P for P in os.listdir(pjoin(self.me_dir,'SubProcesses')) if + subproc = [P for P in os.listdir(pjoin(self.me_dir,'SubProcesses')) if P.startswith('P') and os.path.isdir(pjoin(self.me_dir,'SubProcesses', P))] devnull = open(os.devnull, 'w') for nb_proc,subdir in enumerate(subproc): subdir = subdir.strip() Pdir = pjoin(self.me_dir, 'SubProcesses',subdir) bindir = pjoin(os.path.relpath(self.dirbin, Pdir)) - + logger.info(' %s ' % subdir) # clean previous run for match in misc.glob('*ajob*', Pdir): if os.path.basename(match)[:4] in ['ajob', 'wait', 'run.', 'done']: os.remove(pjoin(Pdir, match)) - + logfile = pjoin(Pdir, 'gen_ximprove.log') misc.call([pjoin(bindir, 'gen_ximprove')], @@ -6840,40 +6840,40 @@ def refine4grid(self, nb_event): if os.path.exists(pjoin(Pdir, 'ajob1')): alljobs = misc.glob('ajob*', Pdir) - nb_tot = len(alljobs) + nb_tot = len(alljobs) self.total_jobs += nb_tot for i, job in enumerate(alljobs): job = os.path.basename(job) - self.launch_job('%s' % job, cwd=Pdir, remaining=(nb_tot-i-1), + self.launch_job('%s' % job, cwd=Pdir, remaining=(nb_tot-i-1), run_type='Refine number %s on %s (%s/%s)' % (self.nb_refine, subdir, nb_proc+1, len(subproc))) if os.path.exists(pjoin(self.me_dir,'error')): self.monitor(html=True) raise MadEventError('Error detected in dir %s: %s' % \ (Pdir, open(pjoin(self.me_dir,'error')).read())) - self.monitor(run_type='All job submitted for refine number %s' % + self.monitor(run_type='All job submitted for refine number %s' % self.nb_refine) - + self.update_status("Combining runs", level='parton') try: os.remove(pjoin(Pdir, 'combine_runs.log')) except Exception: pass - + bindir = pjoin(os.path.relpath(self.dirbin, pjoin(self.me_dir,'SubProcesses'))) combine_runs.CombineRuns(self.me_dir) - + #update html output cross, error = self.make_make_all_html_results() self.results.add_detail('cross', cross) self.results.add_detail('error', error) - - + + self.update_status('finish refine', 'parton', makehtml=False) devnull.close() def do_combine_events(self, line): - """Advanced commands: Launch combine events""" + """Advanced commands: Launch combine events""" if self.readonly: outdir = 'Events' @@ -6895,17 +6895,17 @@ def do_combine_events(self, line): self.banner.add_generation_info(self.results.current['cross'], self.run_card['nevents']) if not hasattr(self, 'random_orig'): self.random_orig = 0 self.banner.change_seed(self.random_orig) - - + + if not os.path.exists(pjoin(outdir, self.run_name)): os.mkdir(pjoin(outdir, self.run_name)) - self.banner.write(pjoin(outdir, self.run_name, + self.banner.write(pjoin(outdir, self.run_name, '%s_%s_banner.txt' % (self.run_name, tag))) - - get_wgt = lambda event: event.wgt + + get_wgt = lambda event: event.wgt AllEvent = lhe_parser.MultiEventFile() AllEvent.banner = self.banner - + partials = 0 # if too many file make some partial unweighting sum_xsec, sum_xerru, sum_axsec = 0,[],0 Gdirs = self.get_Gdir() @@ -6915,7 +6915,7 @@ def do_combine_events(self, line): if os.path.exists(pjoin(Gdir, 'events.lhe')): result = sum_html.OneResult('') result.read_results(pjoin(Gdir, 'results.dat')) - AllEvent.add(pjoin(Gdir, 'events.lhe'), + AllEvent.add(pjoin(Gdir, 'events.lhe'), result.get('xsec')*gscalefact[Gdir], result.get('xerru')*gscalefact[Gdir], result.get('axsec')*gscalefact[Gdir] @@ -6924,7 +6924,7 @@ def do_combine_events(self, line): sum_xsec += result.get('xsec')*gscalefact[Gdir] sum_xerru.append(result.get('xerru')*gscalefact[Gdir]) sum_axsec += result.get('axsec')*gscalefact[Gdir] - + if len(AllEvent) >= 80: #perform a partial unweighting AllEvent.unweight(pjoin(outdir, self.run_name, "partials%s.lhe.gz" % partials), get_wgt, log_level=5, trunc_error=1e-2, event_target=self.nb_event) @@ -6933,26 +6933,26 @@ def do_combine_events(self, line): AllEvent.add(pjoin(outdir, self.run_name, "partials%s.lhe.gz" % partials), sum_xsec, math.sqrt(sum(x**2 for x in sum_xerru)), - sum_axsec) + sum_axsec) partials +=1 - + if not hasattr(self,'proc_characteristic'): self.proc_characteristic = self.get_characteristics() - + self.banner.add_generation_info(sum_xsec, self.nb_event) nb_event = AllEvent.unweight(pjoin(outdir, self.run_name, "unweighted_events.lhe.gz"), get_wgt, trunc_error=1e-2, event_target=self.nb_event, log_level=logging.DEBUG, normalization=self.run_card['event_norm'], proc_charac=self.proc_characteristic) - - + + if partials: for i in range(partials): try: os.remove(pjoin(outdir, self.run_name, "partials%s.lhe.gz" % i)) except Exception: os.remove(pjoin(outdir, self.run_name, "partials%s.lhe" % i)) - + self.results.add_detail('nb_event', nb_event) self.banner.add_generation_info(sum_xsec, nb_event) if self.run_card['bias_module'].lower() not in ['dummy', 'none']: @@ -6961,7 +6961,7 @@ def do_combine_events(self, line): class MadLoopInitializer(object): """ A container class for the various methods for initializing MadLoop. It is - placed in MadEventInterface because it is used by Madevent for loop-induced + placed in MadEventInterface because it is used by Madevent for loop-induced simulations. """ @staticmethod @@ -6974,7 +6974,7 @@ def make_and_run(dir_name,checkRam=False): if os.path.isfile(pjoin(dir_name,'check')): os.remove(pjoin(dir_name,'check')) os.remove(pjoin(dir_name,'check_sa.o')) - os.remove(pjoin(dir_name,'loop_matrix.o')) + os.remove(pjoin(dir_name,'loop_matrix.o')) # Now run make devnull = open(os.devnull, 'w') start=time.time() @@ -6996,7 +6996,7 @@ def make_and_run(dir_name,checkRam=False): stdout=devnull, stderr=devnull, close_fds=True) try: ptimer.execute() - #poll as often as possible; otherwise the subprocess might + #poll as often as possible; otherwise the subprocess might # "sneak" in some extra memory usage while you aren't looking # Accuracy of .2 seconds is enough for the timing. while ptimer.poll(): @@ -7028,7 +7028,7 @@ def fix_PSPoint_in_check(dir_path, read_ps = True, npoints = 1, If mu_r > 0.0, then the renormalization constant value will be hardcoded directly in check_sa.f, if is is 0 it will be set to Sqrt(s) and if it is < 0.0 the value in the param_card.dat is used. - If the split_orders target (i.e. the target squared coupling orders for + If the split_orders target (i.e. the target squared coupling orders for the computation) is != -1, it will be changed in check_sa.f via the subroutine CALL SET_COUPLINGORDERS_TARGET(split_orders).""" @@ -7043,12 +7043,12 @@ def fix_PSPoint_in_check(dir_path, read_ps = True, npoints = 1, file_path = pjoin(directories[0],'check_sa.f') if not os.path.isfile(file_path): raise MadGraph5Error('Could not find the location of check_sa.f'+\ - ' from the specified path %s.'%str(file_path)) + ' from the specified path %s.'%str(file_path)) file = open(file_path, 'r') check_sa = file.read() file.close() - + file = open(file_path, 'w') check_sa = re.sub(r"READPS = \S+\)","READPS = %s)"%('.TRUE.' if read_ps \ else '.FALSE.'), check_sa) @@ -7064,42 +7064,42 @@ def fix_PSPoint_in_check(dir_path, read_ps = True, npoints = 1, (("%.17e"%mu_r).replace('e','d')),check_sa) elif mu_r < 0.0: check_sa = re.sub(r"MU_R=SQRTS","",check_sa) - + if split_orders > 0: check_sa = re.sub(r"SET_COUPLINGORDERS_TARGET\(-?\d+\)", - "SET_COUPLINGORDERS_TARGET(%d)"%split_orders,check_sa) - + "SET_COUPLINGORDERS_TARGET(%d)"%split_orders,check_sa) + file.write(check_sa) file.close() - @staticmethod + @staticmethod def run_initialization(run_dir=None, SubProc_dir=None, infos=None,\ req_files = ['HelFilter.dat','LoopFilter.dat'], attempts = [4,15]): - """ Run the initialization of the process in 'run_dir' with success + """ Run the initialization of the process in 'run_dir' with success characterized by the creation of the files req_files in this directory. The directory containing the driving source code 'check_sa.f'. - The list attempt gives the successive number of PS points the + The list attempt gives the successive number of PS points the initialization should be tried with before calling it failed. Returns the number of PS points which were necessary for the init. Notice at least run_dir or SubProc_dir must be provided. A negative attempt number given in input means that quadprec will be forced for initialization.""" - + # If the user does not want detailed info, then set the dictionary # to a dummy one. if infos is None: infos={} - + if SubProc_dir is None and run_dir is None: raise MadGraph5Error('At least one of [SubProc_dir,run_dir] must'+\ ' be provided in run_initialization.') - + # If the user does not specify where is check_sa.f, then it is assumed # to be one levels above run_dir if SubProc_dir is None: SubProc_dir = os.path.abspath(pjoin(run_dir,os.pardir)) - + if run_dir is None: directories =[ dir for dir in misc.glob('P[0-9]*', SubProc_dir) if os.path.isdir(dir) ] @@ -7109,7 +7109,7 @@ def run_initialization(run_dir=None, SubProc_dir=None, infos=None,\ raise MadGraph5Error('Could not find a valid running directory'+\ ' in %s.'%str(SubProc_dir)) - # Use the presence of the file born_matrix.f to decide if it is a + # Use the presence of the file born_matrix.f to decide if it is a # loop-induced process or not. It's not crucial, but just that because # of the dynamic adjustment of the ref scale used for deciding what are # the zero contributions, more points are neeeded for loop-induced. @@ -7128,9 +7128,9 @@ def run_initialization(run_dir=None, SubProc_dir=None, infos=None,\ raise MadGraph5Error('Could not find MadLoopParams.dat at %s.'\ %MLCardPath) else: - MLCard = banner_mod.MadLoopParam(MLCardPath) + MLCard = banner_mod.MadLoopParam(MLCardPath) MLCard_orig = banner_mod.MadLoopParam(MLCard) - + # Make sure that LoopFilter really is needed. if not MLCard['UseLoopFilter']: try: @@ -7153,11 +7153,11 @@ def need_init(): proc_prefix+fname)) for fname in my_req_files]) or \ not os.path.isfile(pjoin(run_dir,'check')) or \ not os.access(pjoin(run_dir,'check'), os.X_OK) - + # Check if this is a process without born by checking the presence of the # file born_matrix.f is_loop_induced = os.path.exists(pjoin(run_dir,'born_matrix.f')) - + # For loop induced processes, always attempt quadruple precision if # double precision attempts fail and the user didn't specify himself # quadruple precision initializations attempts @@ -7166,11 +7166,11 @@ def need_init(): use_quad_prec = 1 curr_attempt = 1 - MLCard.set('WriteOutFilters',True) - + MLCard.set('WriteOutFilters',True) + while to_attempt!=[] and need_init(): curr_attempt = to_attempt.pop() - # if the attempt is a negative number it means we must force + # if the attempt is a negative number it means we must force # quadruple precision at initialization time if curr_attempt < 0: use_quad_prec = -1 @@ -7183,11 +7183,11 @@ def need_init(): MLCard.set('ZeroThres',1e-9) # Plus one because the filter are written on the next PS point after curr_attempt = abs(curr_attempt+1) - MLCard.set('MaxAttempts',curr_attempt) + MLCard.set('MaxAttempts',curr_attempt) MLCard.write(pjoin(SubProc_dir,'MadLoopParams.dat')) # initialization is performed. - MadLoopInitializer.fix_PSPoint_in_check(run_dir, read_ps = False, + MadLoopInitializer.fix_PSPoint_in_check(run_dir, read_ps = False, npoints = curr_attempt) compile_time, run_time, ram_usage = \ MadLoopInitializer.make_and_run(run_dir) @@ -7200,7 +7200,7 @@ def need_init(): infos['Process_compilation']==None: infos['Process_compilation'] = compile_time infos['Initialization'] = run_time - + MLCard_orig.write(pjoin(SubProc_dir,'MadLoopParams.dat')) if need_init(): return None @@ -7219,8 +7219,8 @@ def need_init(ML_resources_path, proc_prefix, r_files): MLCardPath = pjoin(proc_dir,'SubProcesses','MadLoopParams.dat') if not os.path.isfile(MLCardPath): raise MadGraph5Error('Could not find MadLoopParams.dat at %s.'\ - %MLCardPath) - MLCard = banner_mod.MadLoopParam(MLCardPath) + %MLCardPath) + MLCard = banner_mod.MadLoopParam(MLCardPath) req_files = ['HelFilter.dat','LoopFilter.dat'] # Make sure that LoopFilter really is needed. @@ -7234,9 +7234,9 @@ def need_init(ML_resources_path, proc_prefix, r_files): req_files.remove('HelFilter.dat') except ValueError: pass - + for v_folder in glob.iglob(pjoin(proc_dir,'SubProcesses', - '%s*'%subproc_prefix)): + '%s*'%subproc_prefix)): # Make sure it is a valid MadLoop directory if not os.path.isdir(v_folder) or not os.path.isfile(\ pjoin(v_folder,'loop_matrix.f')): @@ -7247,7 +7247,7 @@ def need_init(ML_resources_path, proc_prefix, r_files): if need_init(pjoin(proc_dir,'SubProcesses','MadLoop5_resources'), proc_prefix, req_files): return True - + return False @staticmethod @@ -7265,7 +7265,7 @@ def init_MadLoop(proc_dir, n_PS=None, subproc_prefix='PV', MG_options=None, misc.compile(arg=['treatCardsLoopNoInit'], cwd=pjoin(proc_dir,'Source')) else: interface.do_treatcards('all --no_MadLoopInit') - + # First make sure that IREGI and CUTTOOLS are compiled if needed if os.path.exists(pjoin(proc_dir,'Source','CutTools')): misc.compile(arg=['libcuttools'],cwd=pjoin(proc_dir,'Source')) @@ -7273,8 +7273,8 @@ def init_MadLoop(proc_dir, n_PS=None, subproc_prefix='PV', MG_options=None, misc.compile(arg=['libiregi'],cwd=pjoin(proc_dir,'Source')) # Then make sure DHELAS and MODEL are compiled misc.compile(arg=['libmodel'],cwd=pjoin(proc_dir,'Source')) - misc.compile(arg=['libdhelas'],cwd=pjoin(proc_dir,'Source')) - + misc.compile(arg=['libdhelas'],cwd=pjoin(proc_dir,'Source')) + # Now initialize the MadLoop outputs logger.info('Initializing MadLoop loop-induced matrix elements '+\ '(this can take some time)...') @@ -7283,7 +7283,7 @@ def init_MadLoop(proc_dir, n_PS=None, subproc_prefix='PV', MG_options=None, if MG_options: if interface and hasattr(interface, 'cluster') and isinstance(interface.cluster, cluster.MultiCore): mcore = interface.cluster - else: + else: mcore = cluster.MultiCore(**MG_options) else: mcore = cluster.onecore @@ -7294,10 +7294,10 @@ def run_initialization_wrapper(run_dir, infos, attempts): run_dir=run_dir, infos=infos) else: n_PS = MadLoopInitializer.run_initialization( - run_dir=run_dir, infos=infos, attempts=attempts) + run_dir=run_dir, infos=infos, attempts=attempts) infos['nPS'] = n_PS return 0 - + def wait_monitoring(Idle, Running, Done): if Idle+Running+Done == 0: return @@ -7307,21 +7307,21 @@ def wait_monitoring(Idle, Running, Done): init_info = {} # List all virtual folders while making sure they are valid MadLoop folders VirtualFolders = [f for f in glob.iglob(pjoin(proc_dir,'SubProcesses', - '%s*'%subproc_prefix)) if (os.path.isdir(f) or + '%s*'%subproc_prefix)) if (os.path.isdir(f) or os.path.isfile(pjoin(f,'loop_matrix.f')))] logger.debug("Now Initializing MadLoop matrix element in %d folder%s:"%\ (len(VirtualFolders),'s' if len(VirtualFolders)>1 else '')) - logger.debug(', '.join("'%s'"%os.path.basename(v_folder) for v_folder in + logger.debug(', '.join("'%s'"%os.path.basename(v_folder) for v_folder in VirtualFolders)) for v_folder in VirtualFolders: init_info[v_folder] = {} - + # We try all multiples of n_PS from 1 to max_mult, first in DP and then # in QP before giving up, or use default values if n_PS is None. max_mult = 3 if n_PS is None: # Then use the default list of number of PS points to try - mcore.submit(run_initialization_wrapper, + mcore.submit(run_initialization_wrapper, [pjoin(v_folder), init_info[v_folder], None]) else: # Use specific set of PS points @@ -7348,8 +7348,8 @@ def wait_monitoring(Idle, Running, Done): '%d PS points (%s), in %.3g(compil.) + %.3g(init.) secs.'%( abs(init['nPS']),'DP' if init['nPS']>0 else 'QP', init['Process_compilation'],init['Initialization'])) - - logger.info('MadLoop initialization finished.') + + logger.info('MadLoop initialization finished.') AskforEditCard = common_run.AskforEditCard @@ -7364,16 +7364,16 @@ def wait_monitoring(Idle, Running, Done): import os import optparse - # Get the directory of the script real path (bin) - # and add it to the current PYTHONPATH + # Get the directory of the script real path (bin) + # and add it to the current PYTHONPATH #root_path = os.path.dirname(os.path.dirname(os.path.dirname(os.path.realpath( __file__ )))) sys.path.insert(0, root_path) - class MyOptParser(optparse.OptionParser): + class MyOptParser(optparse.OptionParser): class InvalidOption(Exception): pass def error(self, msg=''): raise MyOptParser.InvalidOption(msg) - # Write out nice usage message if called with -h or --help + # Write out nice usage message if called with -h or --help usage = "usage: %prog [options] [FILE] " parser = MyOptParser(usage=usage) parser.add_option("-l", "--logging", default='INFO', @@ -7384,7 +7384,7 @@ def error(self, msg=''): help='force to launch debug mode') parser_error = '' done = False - + for i in range(len(sys.argv)-1): try: (options, args) = parser.parse_args(sys.argv[1:len(sys.argv)-i]) @@ -7394,7 +7394,7 @@ def error(self, msg=''): else: args += sys.argv[len(sys.argv)-i:] if not done: - # raise correct error: + # raise correct error: try: (options, args) = parser.parse_args() except MyOptParser.InvalidOption as error: @@ -7407,8 +7407,8 @@ def error(self, msg=''): import subprocess import logging import logging.config - # Set logging level according to the logging level given by options - #logging.basicConfig(level=vars(logging)[options.logging]) + # Set logging level according to the logging level given by options + #logging.basicConfig(level=vars(logging)[options.logging]) import internal import internal.coloring_logging # internal.file = XXX/bin/internal/__init__.py @@ -7431,13 +7431,13 @@ def error(self, msg=''): raise pass - # Call the cmd interface main loop + # Call the cmd interface main loop try: if args: # a single command is provided if '--web' in args: - i = args.index('--web') - args.pop(i) + i = args.index('--web') + args.pop(i) cmd_line = MadEventCmd(me_dir, force_run=True) else: cmd_line = MadEventCmdShell(me_dir, force_run=True) @@ -7457,13 +7457,13 @@ def error(self, msg=''): pass - - - - - - - - + + + + + + + + diff --git a/epochX/cudacpp/gg_ttg.mad/bin/internal/run_plot b/epochX/cudacpp/gg_ttg.mad/bin/internal/run_plot deleted file mode 100755 index 7deee7ac88..0000000000 --- a/epochX/cudacpp/gg_ttg.mad/bin/internal/run_plot +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash -# -# This runs MadAnalysis on the unweighted_events.lhe -# -# Usage: run_plot run_name [madir [tddir]] -# where madir is the path to the MadAnalysis package - -main=`pwd` - -if [ "$1" != "" ] -then - run=$1 -else - echo "Usage: run_plot runname [MAdir [tddir]]" - exit -fi - -if [ "$2" != "" ] -then - MAdir=$main/$2 -else - MAdir=$main/../../MadAnalysis -fi - -if [ "$3" != "" ]; then - td=$main/$3 -else - td=$main/../../td -fi - -dirbin=$main/../bin - -if [[ $run != "" && -e ${run}_unweighted_events.lhe.gz ]];then - gunzip -c ${run}_unweighted_events.lhe.gz > unweighted_events.lhe -fi - -if [[ (-x $MAdir/plot_events) && (-e unweighted_events.lhe) && (-e ../Cards/plot_card.dat) ]]; then - echo "Creating Plots" - mkdir $run - cd $run - echo "../unweighted_events.lhe" > events.list - $dirbin/plot $MAdir $td > plot.log - cd .. - $dirbin/plot_page-pl $run parton - mv plots.html ${run}_plots.html -fi - diff --git a/epochX/cudacpp/gg_ttg.mad/bin/internal/run_plot_delphes b/epochX/cudacpp/gg_ttg.mad/bin/internal/run_plot_delphes deleted file mode 100755 index 975f410d0e..0000000000 --- a/epochX/cudacpp/gg_ttg.mad/bin/internal/run_plot_delphes +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/bash -# -# This runs MadAnalysis on the delphes_events.lhco -# -# Usage: run_plot run_name [madir [tddir]] -# where madir is the path to the MadAnalysis package - -main=`pwd` - -if [ "$1" != "" ] -then - run=$1 -else - echo "Usage: run_plot runname [MAdir [tddir]]" - exit -fi - -if [ "$2" != "" ] -then - MAdir=$main/$2 -else - MAdir=$main/../../MadAnalysis -fi - -if [ "$3" != "" ]; then - td=$main/$3 -else - td=$main/../../td -fi - -dirbin=$main/../bin - -if [[ $run != "" && -e ${run}_delphes_events.lhco.gz ]];then - gunzip -c ${run}_delphes_events.lhco.gz > delphes_events.lhco -fi - -if [[ (-x $MAdir/plot_events) && (-e delphes_events.lhco) && (-e ../Cards/plot_card.dat) ]]; then - echo "Creating Plots" - mkdir ${run}_delphes - cd ${run}_delphes - echo "../delphes_events.lhco" > events.list - $dirbin/plot $MAdir $td > plot.log - cd .. - $dirbin/plot_page-pl ${run}_delphes Delphes - mv plots.html ${run}_plots_delphes.html -fi diff --git a/epochX/cudacpp/gg_ttg.mad/bin/internal/run_plot_pgs b/epochX/cudacpp/gg_ttg.mad/bin/internal/run_plot_pgs deleted file mode 100755 index e7a36ef344..0000000000 --- a/epochX/cudacpp/gg_ttg.mad/bin/internal/run_plot_pgs +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash -# -# This runs MadAnalysis on the unweighted_events.lhe -# -# Usage: run_plot run_name [madir [tddir]] -# where madir is the path to the MadAnalysis package - -main=`pwd` - -if [ "$1" != "" ] -then - run=$1 -else - echo "Usage: run_plot runname [MAdir [tddir]]" - exit -fi - -if [ "$2" != "" ] -then - MAdir=$main/$2 -else - MAdir=$main/../../MadAnalysis -fi - -if [ "$3" != "" ]; then - td=$main/$3 -else - td=$main/../../td -fi - -dirbin=$main/../bin - -if [[ $run != "" && -e ${run}_pgs_events.lhco.gz ]];then - gunzip -c ${run}_pgs_events.lhco.gz > pgs_events.lhco -fi - -if [[ (-x $MAdir/plot_events) && (-e pgs_events.lhco) && (-e ../Cards/plot_card.dat) ]]; then - echo "Creating Plots" - mkdir ${run}_pgs - cd ${run}_pgs - echo "../pgs_events.lhco" > events.list - $dirbin/plot $MAdir $td > plot.log - cd .. - $dirbin/plot_page-pl ${run}_pgs PGS - mv plots.html ${run}_plots_pgs.html -fi - diff --git a/epochX/cudacpp/gg_ttg.mad/bin/internal/run_plot_pythia b/epochX/cudacpp/gg_ttg.mad/bin/internal/run_plot_pythia deleted file mode 100755 index 532bfb4b7b..0000000000 --- a/epochX/cudacpp/gg_ttg.mad/bin/internal/run_plot_pythia +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/bash -# -# This runs MadAnalysis on the unweighted_events.lhe -# -# Usage: run_plot run_name [madir [tddir]] -# where madir is the path to the MadAnalysis package - -main=`pwd` - -if [ "$1" != "" ] -then - run=$1 -else - echo "Usage: run_plot runname [MAdir [tddir]]" - exit -fi - -if [ "$2" != "" ] -then - MAdir=$main/$2 -else - MAdir=$main/../../MadAnalysis -fi - -if [ "$3" != "" ]; then - td=$main/$3 -else - td=$main/../../td -fi - -dirbin=$main/../bin/internal - -if [[ $run != "" && -e ${run}_pythia_events.lhe.gz ]];then - gunzip -c ${run}_pythia_events.lhe.gz > pythia_events.lhe -fi - -if [[ (-x $MAdir/plot_events) && (-e pythia_events.lhe) && (-e ../Cards/plot_card.dat) ]]; then - echo "Creating Plots" - mkdir ${run}_pythia - cd ${run}_pythia - echo "../pythia_events.lhe" > events.list - $dirbin/plot $MAdir $td > plot.log - cd .. - $dirbin/plot_page-pl ${run}_pythia Pythia - mv plots.html ${run}_plots_pythia.html - $dirbin/gen_crossxhtml-pl $run -else - echo "Not creating plots" -fi - diff --git a/epochX/cudacpp/gg_ttg.mad/src/cudacpp_src.mk b/epochX/cudacpp/gg_ttg.mad/src/cudacpp_src.mk index c757875347..b4e446bc45 100644 --- a/epochX/cudacpp/gg_ttg.mad/src/cudacpp_src.mk +++ b/epochX/cudacpp/gg_ttg.mad/src/cudacpp_src.mk @@ -1,12 +1,7 @@ # Copyright (C) 2020-2023 CERN and UCLouvain. # Licensed under the GNU Lesser General Public License (version 3 or later). # Created by: S. Roiser (Feb 2020) for the MG5aMC CUDACPP plugin. -# Further modified by: J. Teig, O. Mattelaer, S. Roiser, A. Valassi (2020-2023) for the MG5aMC CUDACPP plugin. - -#=== Determine the name of this makefile (https://ftp.gnu.org/old-gnu/Manuals/make-3.80/html_node/make_17.html) -#=== NB: assume that the same name (e.g. cudacpp.mk, Makefile...) is used in the Subprocess and src directories - -THISMK = $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)) +# Further modified by: S. Hageboeck, J. Teig, O. Mattelaer, S. Roiser, A. Valassi (2020-2023) for the MG5aMC CUDACPP plugin. #------------------------------------------------------------------------------- @@ -16,167 +11,24 @@ SHELL := /bin/bash #------------------------------------------------------------------------------- -#=== Configure common compiler flags for CUDA and C++ - -INCFLAGS = -I. -OPTFLAGS = -O3 # this ends up in CUFLAGS too (should it?), cannot add -Ofast or -ffast-math here - -#------------------------------------------------------------------------------- - #=== Configure the C++ compiler -CXXFLAGS = $(OPTFLAGS) -std=c++17 $(INCFLAGS) $(USE_NVTX) -fPIC -Wall -Wshadow -Wextra +include ../Source/make_opts + +MG_CXXFLAGS += -fPIC -I. $(USE_NVTX) ifeq ($(shell $(CXX) --version | grep ^nvc++),) -CXXFLAGS+= -ffast-math # see issue #117 +MG_CXXFLAGS += -ffast-math # see issue #117 endif -###CXXFLAGS+= -Ofast # performance is not different from --fast-math -###CXXFLAGS+= -g # FOR DEBUGGING ONLY # Note: AR, CXX and FC are implicitly defined if not set externally # See https://www.gnu.org/software/make/manual/html_node/Implicit-Variables.html ###RANLIB = ranlib -# Add -mmacosx-version-min=11.3 to avoid "ld: warning: object file was built for newer macOS version than being linked" -LDFLAGS = -ifneq ($(shell $(CXX) --version | egrep '^Apple clang'),) -CXXFLAGS += -mmacosx-version-min=11.3 -LDFLAGS += -mmacosx-version-min=11.3 -endif - -#------------------------------------------------------------------------------- - -#=== Configure the CUDA compiler (note: NVCC is already exported including ccache) - -###$(info NVCC=$(NVCC)) - -#------------------------------------------------------------------------------- - -#=== Configure ccache for C++ builds (note: NVCC is already exported including ccache) - -# Enable ccache if USECCACHE=1 -ifeq ($(USECCACHE)$(shell echo $(CXX) | grep ccache),1) - override CXX:=ccache $(CXX) -endif -#ifeq ($(USECCACHE)$(shell echo $(AR) | grep ccache),1) -# override AR:=ccache $(AR) -#endif - -#------------------------------------------------------------------------------- - -#=== Configure PowerPC-specific compiler flags for CUDA and C++ - -# Assuming uname is available, detect if architecture is PowerPC -UNAME_P := $(shell uname -p) - -# PowerPC-specific CXX compiler flags (being reviewed) -ifeq ($(UNAME_P),ppc64le) - CXXFLAGS+= -mcpu=power9 -mtune=power9 # gains ~2-3% both for none and sse4 - # Throughput references without the extra flags below: none=1.41-1.42E6, sse4=2.15-2.19E6 - ###CXXFLAGS+= -DNO_WARN_X86_INTRINSICS # no change - ###CXXFLAGS+= -fpeel-loops # no change - ###CXXFLAGS+= -funroll-loops # gains ~1% for none, loses ~1% for sse4 - ###CXXFLAGS+= -ftree-vectorize # no change - ###CXXFLAGS+= -flto # BUILD ERROR IF THIS ADDED IN SRC?! -else - ###AR=gcc-ar # needed by -flto - ###RANLIB=gcc-ranlib # needed by -flto - ###CXXFLAGS+= -flto # NB: build error from src/Makefile unless gcc-ar and gcc-ranlib are used - ######CXXFLAGS+= -fno-semantic-interposition # no benefit (neither alone, nor combined with -flto) -endif - -#------------------------------------------------------------------------------- - #=== Set the CUDA/C++ compiler flags appropriate to user-defined choices of AVX, FPTYPE, HELINL, HRDCOD, RNDGEN # Set the build flags appropriate to OMPFLAGS ###$(info OMPFLAGS=$(OMPFLAGS)) -CXXFLAGS += $(OMPFLAGS) - -# Set the build flags appropriate to each AVX choice (example: "make AVX=none") -# [NB MGONGPU_PVW512 is needed because "-mprefer-vector-width=256" is not exposed in a macro] -# [See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96476] -ifeq ($(NVCC),) - $(info AVX=$(AVX)) - ifeq ($(UNAME_P),ppc64le) - ifeq ($(AVX),sse4) - override AVXFLAGS = -D__SSE4_2__ # Power9 VSX with 128 width (VSR registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on PowerPC for the moment) - endif - else ifeq ($(UNAME_P),arm) - ifeq ($(AVX),sse4) - override AVXFLAGS = -D__SSE4_2__ # ARM NEON with 128 width (Q/quadword registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on ARM for the moment) - endif - else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 - ifeq ($(AVX),none) - override AVXFLAGS = -mno-sse3 # no SIMD - else ifeq ($(AVX),sse4) - override AVXFLAGS = -mno-avx # SSE4.2 with 128 width (xmm registers) - else ifeq ($(AVX),avx2) - override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(AVX),512y) - override AVXFLAGS = -march=skylake -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(AVX),512z) - override AVXFLAGS = -march=skylake -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) - else - $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) - endif - else - ifeq ($(AVX),none) - override AVXFLAGS = -march=x86-64 # no SIMD (see #588) - else ifeq ($(AVX),sse4) - override AVXFLAGS = -march=nehalem # SSE4.2 with 128 width (xmm registers) - else ifeq ($(AVX),avx2) - override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(AVX),512y) - override AVXFLAGS = -march=skylake-avx512 -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(AVX),512z) - override AVXFLAGS = -march=skylake-avx512 -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) - endif - endif - # For the moment, use AVXFLAGS everywhere: eventually, use them only in encapsulated implementations? - CXXFLAGS+= $(AVXFLAGS) -endif - -# Set the build flags appropriate to each FPTYPE choice (example: "make FPTYPE=f") -###$(info FPTYPE=$(FPTYPE)) -ifeq ($(FPTYPE),d) - CXXFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_DOUBLE -else ifeq ($(FPTYPE),f) - CXXFLAGS += -DMGONGPU_FPTYPE_FLOAT -DMGONGPU_FPTYPE2_FLOAT -else ifeq ($(FPTYPE),m) - CXXFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_FLOAT -else - $(error Unknown FPTYPE='$(FPTYPE)': only 'd', 'f' and 'm' are supported) -endif - -# Set the build flags appropriate to each HELINL choice (example: "make HELINL=1") -###$(info HELINL=$(HELINL)) -ifeq ($(HELINL),1) - CXXFLAGS += -DMGONGPU_INLINE_HELAMPS -else ifneq ($(HELINL),0) - $(error Unknown HELINL='$(HELINL)': only '0' and '1' are supported) -endif - -# Set the build flags appropriate to each HRDCOD choice (example: "make HRDCOD=1") -###$(info HRDCOD=$(HRDCOD)) -ifeq ($(HRDCOD),1) - CXXFLAGS += -DMGONGPU_HARDCODE_PARAM -else ifneq ($(HRDCOD),0) - $(error Unknown HRDCOD='$(HRDCOD)': only '0' and '1' are supported) -endif - -# Set the build flags appropriate to each RNDGEN choice (example: "make RNDGEN=hasNoCurand") -###$(info RNDGEN=$(RNDGEN)) -ifeq ($(RNDGEN),hasNoCurand) - CXXFLAGS += -DMGONGPU_HAS_NO_CURAND -else ifneq ($(RNDGEN),hasCurand) - $(error Unknown RNDGEN='$(RNDGEN)': only 'hasCurand' and 'hasNoCurand' are supported) -endif +MG_CXXFLAGS += $(OMPFLAGS) #------------------------------------------------------------------------------- @@ -184,36 +36,18 @@ endif # Build directory "short" tag (defines target and path to the optional build directory) # (Rationale: keep directory names shorter, e.g. do not include random number generator choice) -ifneq ($(NVCC),) - override DIRTAG = cuda_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) -else - override DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) -endif +DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) # Build lockfile "full" tag (defines full specification of build options that cannot be intermixed) # (Rationale: avoid mixing of CUDA and no-CUDA environment builds with different random number generators) -ifneq ($(NVCC),) - override TAG = cuda_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) -else - override TAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) -endif +TAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) -# Build directory: current directory by default, or build.$(DIRTAG) if USEBUILDDIR==1 -###$(info Current directory is $(shell pwd)) -ifeq ($(USEBUILDDIR),1) - override BUILDDIR = build.$(DIRTAG) - override LIBDIRREL = ../lib/$(BUILDDIR) - ###$(info Building in BUILDDIR=$(BUILDDIR) for tag=$(TAG) (USEBUILDDIR=1 is set)) -else - override BUILDDIR = . - override LIBDIRREL = ../lib - ###$(info Building in BUILDDIR=$(BUILDDIR) for tag=$(TAG) (USEBUILDDIR is not set)) -endif -######$(info Building in BUILDDIR=$(BUILDDIR) for tag=$(TAG)) +# Build directory: +BUILDDIR := build.$(DIRTAG) +LIBDIRREL := ../lib/$(BUILDDIR) # Workaround for Mac #375 (I did not manage to fix rpath with @executable_path): use absolute paths for LIBDIR # (NB: this is quite ugly because it creates the directory if it does not exist - to avoid removing src by mistake) -UNAME_S := $(shell uname -s) ifeq ($(UNAME_S),Darwin) override LIBDIR = $(shell mkdir -p $(LIBDIRREL); cd $(LIBDIRREL); pwd) ifeq ($(wildcard $(LIBDIR)),) @@ -235,100 +69,41 @@ MG5AMC_COMMONLIB = mg5amc_common # First target (default goal) all.$(TAG): $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so -# Target (and build options): debug -debug: OPTFLAGS = -g -O0 -debug: all.$(TAG) - #------------------------------------------------------------------------------- # Generic target and build rules: objects from C++ compilation $(BUILDDIR)/%.o : %.cc *.h @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - $(CXX) $(CPPFLAGS) $(CXXFLAGS) -fPIC -c $< -o $@ + $(CXX) $(MG_CXXFLAGS) $(CXXFLAGS) -c $< -o $@ # Generic target and build rules: objects from CUDA compilation $(BUILDDIR)/%_cu.o : %.cc *.h @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c -x cu $< -o $@ + $(NVCC) $(MG_NVCCFLAGS) $(NVCCFLAGS) -c -x cu $< -o $@ #------------------------------------------------------------------------------- cxx_objects=$(addprefix $(BUILDDIR)/, Parameters_sm.o read_slha.o) -ifneq ($(NVCC),) +ifeq ($(AVX),cuda) +COMPILER=$(NVCC) cu_objects=$(addprefix $(BUILDDIR)/, Parameters_sm_cu.o) +else +COMPILER=$(CXX) +cu_objects= endif # Target (and build rules): common (src) library -ifneq ($(NVCC),) $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so : $(cxx_objects) $(cu_objects) - @if [ ! -d $(LIBDIR) ]; then echo "mkdir -p $(LIBDIR)"; mkdir -p $(LIBDIR); fi - $(NVCC) -shared -o $@ $(cxx_objects) $(cu_objects) $(LDFLAGS) -else -$(LIBDIR)/lib$(MG5AMC_COMMONLIB).so : $(cxx_objects) - @if [ ! -d $(LIBDIR) ]; then echo "mkdir -p $(LIBDIR)"; mkdir -p $(LIBDIR); fi - $(CXX) -shared -o $@ $(cxx_objects) $(LDFLAGS) -endif + mkdir -p $(LIBDIR) + $(COMPILER) -shared -o $@ $(cxx_objects) $(cu_objects) $(MG_LDFLAGS) $(LDFLAGS) #------------------------------------------------------------------------------- # Target: clean the builds .PHONY: clean -BUILD_DIRS := $(wildcard build.*) -NUM_BUILD_DIRS := $(words $(BUILD_DIRS)) - clean: -ifeq ($(USEBUILDDIR),1) -ifeq ($(NUM_BUILD_DIRS),1) - $(info USEBUILDDIR=1, only one src build directory found.) - rm -rf ../lib/$(BUILD_DIRS) - rm -rf $(BUILD_DIRS) -else ifeq ($(NUM_BUILD_DIRS),0) - $(error USEBUILDDIR=1, but no src build directories are found.) -else - $(error Multiple src BUILDDIR's found! Use 'cleannone', 'cleansse4', 'cleanavx2', 'clean512y','clean512z', 'cleancuda' or 'cleanall'.) -endif -else - rm -f ../lib/lib$(MG5AMC_COMMONLIB).so - rm -f $(BUILDDIR)/*.o $(BUILDDIR)/*.exe -endif - -cleanall: - @echo - rm -f ../lib/lib$(MG5AMC_COMMONLIB).so - rm -f $(BUILDDIR)/*.o $(BUILDDIR)/*.exe - @echo - rm -rf ../lib/build.* - rm -rf build.* - -# Target: clean different builds - -cleannone: - rm -rf ../lib/build.none_* - rm -rf build.none_* - -cleansse4: - rm -rf ../lib/build.sse4_* - rm -rf build.sse4_* - -cleanavx2: - rm -rf ../lib/build.avx2_* - rm -rf build.avx2_* - -clean512y: - rm -rf ../lib/build.512y_* - rm -rf build.512y_* - -clean512z: - rm -rf ../lib/build.512z_* - rm -rf build.512z_* - -cleancuda: - rm -rf ../lib/build.cuda_* - rm -rf build.cuda_* - -cleandir: - rm -f ./*.o ./*.exe - rm -f ../lib/lib$(MG5AMC_COMMONLIB).so + $(RM) -f ../lib/build.*/*.so + $(RM) -rf build.* #------------------------------------------------------------------------------- diff --git a/epochX/cudacpp/gg_ttg.mad/src/mgOnGpuCxtypes.h b/epochX/cudacpp/gg_ttg.mad/src/mgOnGpuCxtypes.h index ca9a9f00c0..3290d314d6 100644 --- a/epochX/cudacpp/gg_ttg.mad/src/mgOnGpuCxtypes.h +++ b/epochX/cudacpp/gg_ttg.mad/src/mgOnGpuCxtypes.h @@ -21,10 +21,14 @@ // Complex type in cuda: thrust or cucomplex or cxsmpl #ifdef __CUDACC__ #if defined MGONGPU_CUCXTYPE_THRUST +#ifdef __CLANG__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" // for icpx2021/clang13 (https://stackoverflow.com/a/15864661) +#endif #include +#ifdef __CLANG__ #pragma clang diagnostic pop +#endif #elif defined MGONGPU_CUCXTYPE_CUCOMPLEX #include #elif not defined MGONGPU_CUCXTYPE_CXSMPL diff --git a/epochX/cudacpp/gg_ttgg.mad/CODEGEN_mad_gg_ttgg_log.txt b/epochX/cudacpp/gg_ttgg.mad/CODEGEN_mad_gg_ttgg_log.txt index ee3d38dfb1..e54b688aaa 100644 --- a/epochX/cudacpp/gg_ttgg.mad/CODEGEN_mad_gg_ttgg_log.txt +++ b/epochX/cudacpp/gg_ttgg.mad/CODEGEN_mad_gg_ttgg_log.txt @@ -50,10 +50,9 @@ Please set the 'lhapdf' variable to the (absolute) /PATH/TO/lhapdf-config (inclu Note that you can still compile and run aMC@NLO with the built-in PDFs MG5_aMC> set lhapdf /PATH/TO/lhapdf-config -Using default text editor "vi". Set another one in ./input/mg5_configuration.txt Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt -No valid web browser found. Please set in ./input/mg5_configuration.txt -import /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg.mg +Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt +import /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg.mg The import format was not given, so we guess it as command set stdout_level DEBUG set output information to level: 10 @@ -62,7 +61,7 @@ generate g g > t t~ g g No model currently active, so we import the Standard Model INFO: load particles INFO: load vertices -DEBUG: model prefixing takes 0.00561833381652832  +DEBUG: model prefixing takes 0.0035104751586914062  INFO: Restrict model sm with file models/sm/restrict_default.dat . DEBUG: Simplifying conditional expressions  DEBUG: remove interactions: u s w+ at order: QED=1  @@ -155,7 +154,7 @@ INFO: Please specify coupling orders to bypass this step. INFO: Trying coupling order WEIGHTED<=4: WEIGTHED IS QCD+2*QED INFO: Trying process: g g > t t~ g g WEIGHTED<=4 @1 INFO: Process has 123 diagrams -1 processes with 123 diagrams generated in 0.154 s +1 processes with 123 diagrams generated in 0.113 s Total: 1 processes with 123 diagrams output madevent ../TMPOUT/CODEGEN_mad_gg_ttgg --hel_recycling=False --vector_size=32 --me_exporter=standalone_cudacpp Load PLUGIN.CUDACPP_OUTPUT @@ -166,16 +165,16 @@ Load PLUGIN.CUDACPP_OUTPUT INFO: initialize a new directory: CODEGEN_mad_gg_ttgg INFO: remove old information in CODEGEN_mad_gg_ttgg DEBUG: Entering PLUGIN_ProcessExporter.copy_template (initialise the directory) [output.py at line 165]  -WARNING: File exists /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg  -INFO: Creating subdirectories in directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg -WARNING: File exists /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/Cards  -WARNING: File exists /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/SubProcesses  +WARNING: File exists /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg  +INFO: Creating subdirectories in directory /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg +WARNING: File exists /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/Cards  +WARNING: File exists /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/SubProcesses  INFO: Organizing processes into subprocess groups INFO: Generating Helas calls for process: g g > t t~ g g WEIGHTED<=4 @1 INFO: Processing color information for process: g g > t t~ g g @1 INFO: Creating files in directory P1_gg_ttxgg DEBUG: kwargs[prefix] = 0 [model_handling.py at line 1058]  -DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  +DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  INFO: Creating files in directory . FileWriter for ././CPPProcess.h FileWriter for ././CPPProcess.cc @@ -190,15 +189,15 @@ INFO: Created files CPPProcess.h and CPPProcess.cc in directory ./. DEBUG: vector, subproc_group,self.opt['vector_size'] =  32 True 32 [export_v4.py at line 1872]  INFO: Generating Feynman diagrams for Process: g g > t t~ g g WEIGHTED<=4 @1 INFO: Finding symmetric diagrams for subprocess group gg_ttxgg -Generated helas calls for 1 subprocesses (123 diagrams) in 0.420 s -Wrote files for 222 helas calls in 0.679 s +Generated helas calls for 1 subprocesses (123 diagrams) in 0.300 s +Wrote files for 222 helas calls in 0.469 s ALOHA: aloha starts to compute helicity amplitudes ALOHA: aloha creates VVV1 routines ALOHA: aloha creates FFV1 routines ALOHA: aloha creates VVVV1 routines ALOHA: aloha creates VVVV3 routines ALOHA: aloha creates VVVV4 routines -ALOHA: aloha creates 5 routines in 0.323 s +ALOHA: aloha creates 5 routines in 0.222 s DEBUG: Entering PLUGIN_ProcessExporter.convert_model (create the model) [output.py at line 202]  ALOHA: aloha starts to compute helicity amplitudes ALOHA: aloha creates VVV1 routines @@ -206,7 +205,7 @@ ALOHA: aloha creates FFV1 routines ALOHA: aloha creates VVVV1 routines ALOHA: aloha creates VVVV3 routines ALOHA: aloha creates VVVV4 routines -ALOHA: aloha creates 10 routines in 0.314 s +ALOHA: aloha creates 10 routines in 0.201 s VVV1 VVV1 FFV1 @@ -219,45 +218,50 @@ ALOHA: aloha creates 10 routines in 0.314 s VVVV3 VVVV4 VVVV4 -FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/src/./HelAmps_sm.h -INFO: Created file HelAmps_sm.h in directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/src/. +FileWriter for /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/src/./HelAmps_sm.h +INFO: Created file HelAmps_sm.h in directory /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/src/. super_write_set_parameters_onlyfixMajorana (hardcoded=False) super_write_set_parameters_onlyfixMajorana (hardcoded=True) -FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/src/./Parameters_sm.h -FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/src/./Parameters_sm.cc +FileWriter for /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/src/./Parameters_sm.h +FileWriter for /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/src/./Parameters_sm.cc INFO: Created files Parameters_sm.h and Parameters_sm.cc in directory -INFO: /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/src/. and /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/src/. +INFO: /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/src/. and /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/src/. The option zerowidth_tchannel is modified [True] but will not be written in the configuration files. If you want to make this value the default for future session, you can run 'save options --all' -save configuration file to /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/Cards/me5_configuration.txt +save configuration file to /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/Cards/me5_configuration.txt INFO: Use Fortran compiler gfortran INFO: Use c++ compiler g++ INFO: Generate web pages -DEBUG: cd /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg; patch -p4 -i /data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common +DEBUG: cd /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg; patch -p4 -i /data/stephan/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common patching file Source/genps.inc +patching file Source/make_opts +Hunk #1 succeeded at 12 (offset -1 lines). +Hunk #2 succeeded at 70 (offset -1 lines). +Hunk #3 succeeded at 117 (offset -1 lines). +Hunk #4 succeeded at 128 (offset -1 lines). patching file Source/makefile patching file SubProcesses/makefile +patching file bin/internal/banner.py patching file bin/internal/gen_ximprove.py -Hunk #1 succeeded at 391 (offset 6 lines). patching file bin/internal/madevent_interface.py -DEBUG: cd /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/SubProcesses/P1_gg_ttxgg; patch -p6 -i /data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 +DEBUG: cd /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/SubProcesses/P1_gg_ttxgg; patch -p6 -i /data/stephan/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 patching file auto_dsig1.f patching file driver.f patching file matrix1.f -Hunk #2 succeeded at 191 (offset 48 lines). -Hunk #3 succeeded at 269 (offset 48 lines). -Hunk #4 succeeded at 297 (offset 48 lines). -Hunk #5 succeeded at 342 (offset 48 lines). +Hunk #2 succeeded at 191 (offset 32 lines). +Hunk #3 succeeded at 269 (offset 32 lines). +Hunk #4 succeeded at 297 (offset 32 lines). +Hunk #5 succeeded at 342 (offset 32 lines). DEBUG: p.returncode =  0 [output.py at line 237]  -Output to directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg done. +Output to directory /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg done. Type "launch" to generate events from this process, or see -/data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/README +/data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/README Run "open index.html" to see more information about this process. quit -real 0m3.226s -user 0m2.976s -sys 0m0.232s +real 0m2.453s +user 0m2.110s +sys 0m0.342s ************************************************************ * * * W E L C O M E to * @@ -278,12 +282,11 @@ sys 0m0.232s * Type 'help' for in-line help. * * * ************************************************************ -INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/Cards/me5_configuration.txt -INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo/input/mg5_configuration.txt -INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/Cards/me5_configuration.txt -Using default text editor "vi". Set another one in ./input/mg5_configuration.txt +INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/Cards/me5_configuration.txt +INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/mg5amcnlo/input/mg5_configuration.txt +INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/Cards/me5_configuration.txt Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt -No valid web browser found. Please set in ./input/mg5_configuration.txt +Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt treatcards run quit INFO: @@ -308,12 +311,11 @@ launch in debug mode * Type 'help' for in-line help. * * * ************************************************************ -INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/Cards/me5_configuration.txt -INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo/input/mg5_configuration.txt -INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/Cards/me5_configuration.txt -Using default text editor "vi". Set another one in ./input/mg5_configuration.txt +INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/Cards/me5_configuration.txt +INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/mg5amcnlo/input/mg5_configuration.txt +INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/Cards/me5_configuration.txt Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt -No valid web browser found. Please set in ./input/mg5_configuration.txt +Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt treatcards param quit INFO: diff --git a/epochX/cudacpp/gg_ttgg.mad/Cards/delphes_trigger.dat b/epochX/cudacpp/gg_ttgg.mad/Cards/delphes_trigger.dat deleted file mode 100644 index 0aab0677aa..0000000000 --- a/epochX/cudacpp/gg_ttgg.mad/Cards/delphes_trigger.dat +++ /dev/null @@ -1,20 +0,0 @@ -#TRIGGER CARD # DO NOT REMOVE THIS IS A TAG! - -# list of trigger algorithms -# trigger_name >> algorithm #comments -Inclusive electron >> ELEC1_PT: '29' -di-electron >> ELEC1_PT: '17' && ELEC2_PT: '17' -Inclusive Photon >> GAMMA1_PT: '80' -di-Photon >> GAMMA1_PT: '40' && GAMMA2_PT: '25' -Inclusive muon >> MUON1_PT: '19' -di-muon >> MUON1_PT: '7' && MUON2_PT: '7' -Taujet and ETmis >> TAU1_PT: '86' && ETMIS_PT: '65' -di-Taujets >> TAU1_PT: '59' && TAU2_PT: '59' -Jet and ETmis >> JET1_PT: '180' && ETMIS_PT: '123' -Taujet and electron >> TAU1_PT: '45' && ELEC1_PT: '19' -Taujet and muon >> TAU1_PT: '40' && ELEC1_PT: '15' -Inclusive b-jet >> Bjet1_PT: '237' -Inclusive 1 jet >> JET1_PT: '657' -Inclusive 3 jets >> JET1_PT: '247' && JET2_PT: '247' && JET3_PT: '247' -Inclusive 4 jets >> JET1_PT: '113' && JET2_PT: '113' && JET3_PT: '113' && JET4_PT: '113' - diff --git a/epochX/cudacpp/gg_ttgg.mad/Cards/me5_configuration.txt b/epochX/cudacpp/gg_ttgg.mad/Cards/me5_configuration.txt index cdeedc7863..22f81b5926 100644 --- a/epochX/cudacpp/gg_ttgg.mad/Cards/me5_configuration.txt +++ b/epochX/cudacpp/gg_ttgg.mad/Cards/me5_configuration.txt @@ -234,7 +234,7 @@ # pineappl = pineappl -#mg5_path = /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo +#mg5_path = /data/stephan/madgraph4gpu/MG5aMC/mg5amcnlo # MG5 MAIN DIRECTORY -#mg5_path = /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo +#mg5_path = /data/stephan/madgraph4gpu/MG5aMC/mg5amcnlo diff --git a/epochX/cudacpp/gg_ttgg.mad/Cards/plot_card.dat b/epochX/cudacpp/gg_ttgg.mad/Cards/plot_card.dat deleted file mode 100644 index 9abe1cc05e..0000000000 --- a/epochX/cudacpp/gg_ttgg.mad/Cards/plot_card.dat +++ /dev/null @@ -1,203 +0,0 @@ -#************************************************************************** -# Card for MadAnalysis * -# * -# This file is used to set the classes and options for * -# the MadAnalysis program. * -# * -# * -# Some comments about the classes * -# 1. Plots are for classes of particles. * -# 2. Each particle is identified by its PDG code. * -# 3. Classes names are arbitrary (4 symbols max, no spaces allowed). * -# 4. Particles in the same class will be ordered with the 'ordering * -# function' in the file in_func.f. * -# 5. Classes can be added/edited/removed at will, and given a name * -# that will then appear in the plots. * -# 6. A particle can be put in one class only. Putting a particle in * -# two or more classes can lead to double counting of events. * -# 7. The class name mET is missing Energy and its name is reserved. * -# If used, it must be put last in the classes list below. * -# 8. If events contain particles not belonging to an existing class, * -# a new class will automatically be generated. * -# 9. For LHCO events the PDG code 21 is assigned to a jet (not * -# b-tagged), 5 to a b-tagged jet and 12 to missing ET. * -# * -# * -# Some comments about the cuts * -# 1. In the file kin_func.f the functions on which cuts can be applied * -# are given. * -# 2. The syntax is as follows. * -# etmin 1 3 30d0 * -# means that from the first class the Et of the first three particles * -# has to be greater than 30 GeV. * -# * -# etmissmin 20d0 * -# means that there must be at least 20 GeV of missing Et * -# * -# dRmin 2 1 4 3 3d0 * -# means that the distance between the first particle in the second * -# class and the first three particles in the fourth class has to be * -# greater than 3. * -# * -# ptmax 1 3 10d0 * -# ptmax 1 2 15d0 * -# means that the maximum pt of the third particle in the first class * -# has to smaller than 10 GeV, and the first two particles of this * -# class has to be smaller than 15 GeV * -# 3. The ordering of the particles within a class can be set with the * -# 'ordering function' in the file kin_func.f. * -# 4. For all the 'min' cuts, an event will be thrown away if the particle * -# does not exist. On the other hand, for all the 'max' cuts the cut * -# will be ignored if the particle does not exist * -# (Only dRij is an exception, for which it is the other way around) * -# * -# * -# * -# Some comments about the plotting options * -# 1. In the file kin_func.f the functions can be found that can be * -# plotted. (only for off-line usage) * -# 2. With the plotting options one can set the number of plots for each * -# of these functions. * -# 3. One has to specify for each variable which particles from which * -# class are used to set the plots. Syntax: * -# et 2 4 * -# means that the transverse energy of the first four particles in the * -# second class will be plotted. * -# mij 1 3 * -# mij 2 2 * -# means that for the invariant mass plots the first three particles * -# from the first class and the first two from the second class will be * -# used to plot the invariant mass of two particles. (10 plots) * -# 4. The ordering of the particles in a class can be set with the * -# 'ordering_function'. pt, e and et are valid functions. (For off-line * -# users X1, X2 and X3 can also be used, if defined in kin_func.f.) * -# 5. Max number of plots is 200. * -# * -# * -#************************************************************************** -# Put here your list of classes -#************************************************************************** -# Do NOT put spaces before class names! -# Begin Classes # This is TAG. Do not modify this line -jet 1 -1 2 -2 3 -3 4 -4 21 # Class number 1 -b 5 -5 # Class number 2 -mET 12 -12 14 -14 16 -16 1000022 # Missing ET class, name is reserved -# End Classes # This is TAG. Do not modify this line -#************************************************************************** -ordering_function pt # orders particles in classes according to their pt -normalization xsec # histogram normalization, xsec or number (e.g. 1) -#************************************************************************** -# Put here list of minimum pt for the classes -#************************************************************************** -# Begin Minpts # This is TAG. Do not modify this line -#1 30 -#2 40 -#3 10 -# End Minpts # This is TAG. Do not modify this line -#************************************************************************** -# Cuts on plotted events -#************************************************************************** -# Modify the cuts and remove the pounds/hashes to apply those cuts -# Do NOT put spaces at the beginning of the following lines! -# Begin Cuts # This is TAG. Do not modify this line -#etmin 2 2 40d0 -#etmin 2 1 80d0 -#etmin 1 3 20d0 -#etmax 2 1 200d0 -#ptmin 3 1 0d0 -#etmissmin 20d0 -#etmissmax 80d0 -#etamax 1 1 1d0 -#etamax 2 1 2d0 -#etamin 2 2 1.5d0 -#etamin 2 1 2d0 -#mijmax 2 1 2 2 200d0 -#mijmin 2 1 2 2 100d0 -#X1min 2 1 40d0 -#X1max 2 2 50d0 -#dRijmin 2 1 2 2 0.7d0 -#dRijmax 1 3 2 2 0.7d0 -#XY1min 2 2 2 2 20d0 -#XYZA2max 2 2 2 2 4 1 5 1 40d0 -# End Cuts # This is TAG. Do not modify this line -#************************************************************************** -# Put here the required plots -#************************************************************************** -# Do NOT put spaces at the beginning of the following lines! -# Begin PlotDefs # This is TAG. Do not modify this line -pt 1 4 # plot pt for the first four particles in class 1 -pt 2 4 # plot pt for the first four particles in class 2 -pt 3 4 # plot pt for the first four particles in class 3 -pt 4 4 # plot pt for the first four particles in class 4 -pt 5 4 # etc. -pt 6 4 -pt 7 4 -#e 2 2 -y 1 4 # plot rapidity for the first four particles in class 1 -y 2 4 -y 3 4 -y 4 4 -y 5 4 -y 6 4 -y 7 4 -#eta 2 2 # plot pseudo-rapidity for the first two part in the 2nd class -#mom 4 1 -#costh 5 1 -#phi 2 2 -#delta_eta 2 2 -#delta_eta 4 1 -mij 1 4 # use the first four particles in the 1st class to plot inv. mass -mij 2 2 # use the first two particles from the second class as well -mij 3 1 # etc. -mij 4 1 -mij 5 1 -mij 6 1 -mij 7 1 -#cosij 1 2 -#cosij 2 2 -#cosij 3 1 -#cosij 4 1 -dRij 1 4 -dRij 2 2 -dRij 3 1 -dRij 4 1 -dRij 5 1 -dRij 6 1 -dRij 7 1 -#delta_phi 2 2 -#delta_phi 4 1 -#delta_phi 5 1 -#X1 2 2 # plot X1 (defined in kin_func.f) -#XYZA1 2 2 -#XYZA1 4 1 -#XYZA1 5 1 -# End PlotDefs # This is TAG. Do not modify this line -#************************************************************************** -#************************************************************************** -# Put here the plot ranges -#************************************************************************** -# Do NOT put spaces at the beginning of the following lines! -# Begin PlotRange # This is TAG. Do not modify this line -pt 10 0 500 # bin size, min value, max value -et 10 0 500 # bin size, min value, max value -etmiss 10 0 500 # bin size, min value, max value -ht 20 0 1500 -y 0.2 -5 5 # etc. -mij 20 0 1500 -dRij 0.1 0 5 -#delta_phi 0.1 0 3.1 -#X1 1 0 100 -#XYZA1 1 0 100 -# End PlotRange # This is TAG. Do not modify this line -#************************************************************************** -#************************************************************************** -# Output for plots -#************************************************************************** -# Do NOT put spaces at the beginning of the following lines! -# Begin PlotOutput # This is TAG. Do not modify this line -output topdrawer # set to topdrawer or gnuplot -plot_decayed no # plot (and cut) dec. res.? (Only for LHE events) -# End PlotOutput # This is TAG. Do not modify this line -#************************************************************************** -# -# diff --git a/epochX/cudacpp/gg_ttgg.mad/Source/DHELAS/aloha_file.inc b/epochX/cudacpp/gg_ttgg.mad/Source/DHELAS/aloha_file.inc index 1b5bf6ec54..fa0f3d86f5 100644 --- a/epochX/cudacpp/gg_ttgg.mad/Source/DHELAS/aloha_file.inc +++ b/epochX/cudacpp/gg_ttgg.mad/Source/DHELAS/aloha_file.inc @@ -1 +1 @@ -ALOHARoutine = VVV1_0.o VVV1P0_1.o FFV1_0.o FFV1_1.o FFV1_2.o FFV1P0_3.o VVVV1_0.o VVVV1P0_1.o VVVV3_0.o VVVV3P0_1.o VVVV4_0.o VVVV4P0_1.o +ALOHARoutine = FFV1P0_3.o FFV1_0.o FFV1_1.o FFV1_2.o VVV1P0_1.o VVV1_0.o VVVV1P0_1.o VVVV1_0.o VVVV3P0_1.o VVVV3_0.o VVVV4P0_1.o VVVV4_0.o diff --git a/epochX/cudacpp/gg_ttgg.mad/Source/make_opts b/epochX/cudacpp/gg_ttgg.mad/Source/make_opts index e4b87ee6ad..435bed0dc7 100644 --- a/epochX/cudacpp/gg_ttgg.mad/Source/make_opts +++ b/epochX/cudacpp/gg_ttgg.mad/Source/make_opts @@ -1,7 +1,7 @@ DEFAULT_CPP_COMPILER=g++ DEFAULT_F2PY_COMPILER=f2py3 DEFAULT_F_COMPILER=gfortran -GLOBAL_FLAG=-O3 -ffast-math -fbounds-check +GLOBAL_FLAG=-O3 -ffast-math MACFLAG= MG5AMC_VERSION=SpecifiedByMG5aMCAtRunTime PYTHIA8_PATH=NotInstalled @@ -13,31 +13,53 @@ BIASLIBDIR=../../../lib/ BIASLIBRARY=libbias.$(libext) # Rest of the makefile -ifeq ($(origin FFLAGS),undefined) -FFLAGS= -w -fPIC -#FFLAGS+= -g -fbounds-check -ffpe-trap=invalid,zero,overflow,underflow,denormal -Wall -fimplicit-none -endif -FFLAGS += $(GLOBAL_FLAG) +#=== Detect O/S and architecture (assuming uname is available, https://en.wikipedia.org/wiki/Uname) + +# Detect O/S kernel (Linux, Darwin...) +UNAME_S := $(shell uname -s) + +# Detect architecture (x86_64, ppc64le...) +UNAME_P := $(shell uname -p) + +#------------------------------------------------------------------------------- # REMOVE MACFLAG IF NOT ON MAC OR FOR F2PY -UNAME := $(shell uname -s) ifdef f2pymode MACFLAG= else -ifneq ($(UNAME), Darwin) +ifneq ($(UNAME_S), Darwin) MACFLAG= endif endif +############################################################ +# Default compiler flags +# To change optimisation level, override these as follows: +# make CXXFLAGS="-O0 -g" +# or export them as environment variables +# For debugging Fortran, one could e.g. use: +# FCFLAGS="-g -fbounds-check -ffpe-trap=invalid,zero,overflow,underflow,denormal -Wall -fimplicit-none" +############################################################ +FCFLAGS ?= $(GLOBAL_FLAG) -fbounds-check +CXXFLAGS ?= $(GLOBAL_FLAG) -DNDEBUG +NVCCFLAGS ?= $(GLOBAL_FLAG) -DNDEBUG -use_fast_math -lineinfo +LDFLAGS ?= $(STDLIB) -ifeq ($(origin CXXFLAGS),undefined) -CXXFLAGS= -O $(STDLIB_FLAG) $(MACFLAG) +ifneq ($(FFLAGS),) +# Madgraph used to use FFLAGS, so the user probably tries to change the flags specifically for madgraph: +FCFLAGS = $(FFLAGS) endif -ifeq ($(origin CFLAGS),undefined) -CFLAGS= -O $(STDLIB_FLAG) $(MACFLAG) +# Madgraph-specific flags: +WARNFLAGS = -Wall -Wshadow -Wextra +ifeq (,$(findstring -std=,$(CXXFLAGS))) +CXXSTANDARD= -std=c++17 endif +MG_FCFLAGS += -fPIC -w +MG_CXXFLAGS += -fPIC $(CXXSTANDARD) $(WARNFLAGS) $(MACFLAG) +MG_NVCCFLAGS += -fPIC $(CXXSTANDARD) --forward-unknown-to-host-compiler $(WARNFLAGS) +MG_LDFLAGS += $(MACFLAG) # Set FC unless it's defined by an environment variable ifeq ($(origin FC),default) @@ -49,45 +71,40 @@ endif # Increase the number of allowed charcters in a Fortran line ifeq ($(FC), ftn) -FFLAGS+= -extend-source # for ifort type of compiler +MG_FCFLAGS += -extend-source # for ifort type of compiler else VERS="$(shell $(FC) --version | grep ifort -i)" ifeq ($(VERS), "") -FFLAGS+= -ffixed-line-length-132 +MG_FCFLAGS += -ffixed-line-length-132 else -FFLAGS+= -extend-source # for ifort type of compiler +MG_FCFLAGS += -extend-source # for ifort type of compiler endif endif -UNAME := $(shell uname -s) -ifeq ($(origin LDFLAGS), undefined) -LDFLAGS=$(STDLIB) $(MACFLAG) -endif - # Options: dynamic, lhapdf # Option dynamic -ifeq ($(UNAME), Darwin) +ifeq ($(UNAME_S), Darwin) dylibext=dylib else dylibext=so endif ifdef dynamic -ifeq ($(UNAME), Darwin) +ifeq ($(UNAME_S), Darwin) libext=dylib -FFLAGS+= -fno-common -LDFLAGS += -bundle +MG_FCFLAGS += -fno-common +MG_LDFLAGS += -bundle define CREATELIB $(FC) -dynamiclib -undefined dynamic_lookup -o $(1) $(2) endef else libext=so -FFLAGS+= -fPIC -LDFLAGS += -shared +MG_FCFLAGS += -fPIC +MG_LDFLAGS += -shared define CREATELIB -$(FC) $(FFLAGS) $(LDFLAGS) -o $(1) $(2) +$(FC) $(MG_FCFLAGS) $(FCFLAGS) $(MG_LDFLAGS) $(LDFLAGS) -o $(1) $(2) endef endif else @@ -101,17 +118,9 @@ endif # Option lhapdf ifneq ($(lhapdf),) -CXXFLAGS += $(shell $(lhapdf) --cppflags) +MG_CXXFLAGS += $(shell $(lhapdf) --cppflags) alfas_functions=alfas_functions_lhapdf llhapdf+= $(shell $(lhapdf) --cflags --libs) -lLHAPDF -# check if we need to activate c++11 (for lhapdf6.2) -ifeq ($(origin CXX),default) -ifeq ($lhapdfversion$lhapdfsubversion,62) -CXX=$(DEFAULT_CPP_COMPILER) -std=c++11 -else -CXX=$(DEFAULT_CPP_COMPILER) -endif -endif else alfas_functions=alfas_functions llhapdf= @@ -120,4 +129,207 @@ endif # Helper function to check MG5 version define CHECK_MG5AMC_VERSION python -c 'import re; from distutils.version import StrictVersion; print StrictVersion("$(MG5AMC_VERSION)") >= StrictVersion("$(1)") if re.match("^[\d\.]+$$","$(MG5AMC_VERSION)") else True;' -endef \ No newline at end of file +endef + +#------------------------------------------------------------------------------- + +# Set special cases for non-gcc/clang builds +# AVX below gets overridden from outside in architecture-specific builds +AVX ?= none +# [NB MGONGPU_PVW512 is needed because "-mprefer-vector-width=256" is not exposed in a macro] +# [See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96476] +$(info AVX=$(AVX)) +ifeq ($(UNAME_P),arm) + ifeq ($(AVX),sse4) + override AVXFLAGS = -D__SSE4_2__ # ARM NEON with 128 width (Q/quadword registers) + endif +else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 + ifeq ($(AVX),none) + override AVXFLAGS = -mno-sse3 # no SIMD + else ifeq ($(AVX),sse4) + override AVXFLAGS = -mno-avx # SSE4.2 with 128 width (xmm registers) + else ifeq ($(AVX),avx2) + override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] + else ifeq ($(AVX),512y) + override AVXFLAGS = -march=skylake -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] + else ifeq ($(AVX),512z) + override AVXFLAGS = -march=skylake -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) + else + $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) + endif +endif + +# For the moment, use AVXFLAGS everywhere: eventually, use them only in encapsulated implementations? +MG_CXXFLAGS+= $(AVXFLAGS) + +#------------------------------------------------------------------------------- + +#=== Configure the CUDA compiler if available + +# If CXX is not a single word (example "clang++ --gcc-toolchain...") then disable CUDA builds (issue #505) +# This is because it is impossible to pass this to "CUFLAGS += -ccbin " below +ifneq ($(words $(subst ccache ,,$(CXX))),1) # allow at most "CXX=ccache " from outside + $(warning CUDA builds are not supported for multi-word CXX "$(CXX)") + override CUDA_HOME=disabled +endif + +# If CUDA_HOME is not set, try to set it from the location of nvcc +ifndef CUDA_HOME + CUDA_HOME = $(patsubst %bin/nvcc,%,$(shell which nvcc 2>/dev/null)) + $(info CUDA_HOME="$(CUDA_HOME)") +endif + +# Set NVCC as $(CUDA_HOME)/bin/nvcc if it exists +ifneq ($(wildcard $(CUDA_HOME)/bin/nvcc),) + NVCC = $(CUDA_HOME)/bin/nvcc + USE_NVTX ?=-DUSE_NVTX + # See https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html + # See https://arnon.dk/matching-sm-architectures-arch-and-gencode-for-various-nvidia-cards/ + # Default: use compute capability 70 (Volta architecture), and embed PTX to support later architectures, too. + # Set MADGRAPH_CUDA_ARCHITECTURE to the desired value to change the default. + # Build for multiple architectures using a space-separated list, e.g. MADGRAPH_CUDA_ARCHITECTURE="70 80" + MADGRAPH_CUDA_ARCHITECTURE ?= 70 + # Generate PTX for the first architecture: + CUARCHFLAGS := --generate-code arch=compute_$(firstword $(MADGRAPH_CUDA_ARCHITECTURE)),code=compute_$(firstword $(MADGRAPH_CUDA_ARCHITECTURE)) + # Generate device code for all architectures: + CUARCHFLAGS += $(foreach arch,$(MADGRAPH_CUDA_ARCHITECTURE), --generate-code arch=compute_$(arch),code=sm_$(arch)) + + CUINC = -I$(CUDA_HOME)/include/ + CURANDLIBFLAGS = -L$(CUDA_HOME)/lib64/ -lcurand # NB: -lcuda is not needed here! + MG_LDFLAGS += $(CURANDLIBFLAGS) + MG_NVCCFLAGS += $(CUINC) $(USE_NVTX) $(CUARCHFLAGS) + +else ifeq ($(AVX),cuda) + $(error nvcc is not visible in PATH. Either add it to PATH or export CUDA_HOME to compile with cuda) + ifeq ($(AVX),cuda) + $(error Cannot compile for cuda without NVCC) + endif +endif + +# Set the host C++ compiler for nvcc via "-ccbin " +# (NB issue #505: this must be a single word, "clang++ --gcc-toolchain..." is not supported) +MG_NVCCFLAGS += -ccbin $(shell which $(subst ccache ,,$(CXX))) + +# Allow newer (unsupported) C++ compilers with older versions of CUDA if ALLOW_UNSUPPORTED_COMPILER_IN_CUDA is set (#504) +ifneq ($(origin ALLOW_UNSUPPORTED_COMPILER_IN_CUDA),undefined) +MG_NVCCFLAGS += -allow-unsupported-compiler +endif + +#------------------------------------------------------------------------------- + +#=== Configure ccache for C++ and CUDA builds + +# Enable ccache if USECCACHE=1 +ifeq ($(USECCACHE)$(shell echo $(CXX) | grep ccache),1) + override CXX:=ccache $(CXX) +endif + +ifneq ($(NVCC),) + ifeq ($(USECCACHE)$(shell echo $(NVCC) | grep ccache),1) + override NVCC:=ccache $(NVCC) + endif +endif + +#------------------------------------------------------------------------------- + +#=== Configure PowerPC-specific compiler flags for C++ and CUDA + +# PowerPC-specific CXX / CUDA compiler flags (being reviewed) +ifeq ($(UNAME_P),ppc64le) + MG_CXXFLAGS+= -mcpu=power9 -mtune=power9 # gains ~2-3% both for none and sse4 + MG_NVCCFLAGS+= -Xcompiler -mno-float128 + + ifeq ($(AVX),sse4) + override AVXFLAGS = -D__SSE4_2__ # Power9 VSX with 128 width (VSR registers) + endif +endif + +#------------------------------------------------------------------------------- +#=== Apple-specific compiler/linker options + +# Add -std=c++17 explicitly to avoid build errors on macOS +# Add -mmacosx-version-min=11.3 to avoid "ld: warning: object file was built for newer macOS version than being linked" +ifneq ($(shell $(CXX) --version | egrep '^Apple clang'),) +MG_CXXFLAGS += -std=c++17 -mmacosx-version-min=11.3 +endif + +ifeq ($(UNAME_S),Darwin) +STDLIB = -lc++ # avoid 'Undefined symbols' for chrono::steady_clock on macOS (checked with otool -L libmg5amc_gg_ttx_cpp.so) +MG_LDFLAGS += -mmacosx-version-min=11.3 # avoid "ld: warning: object file was built for newer macOS version than being linked" +else +MG_LDFLAGS += -Xlinker --no-relax # avoid 'failed to convert GOTPCREL relocation' error #458 (not supported on macOS) +endif + +#------------------------------------------------------------------------------- + +#=== C++/CUDA-specific flags for floating-point types and random generators to use + +# Set the default FPTYPE (floating point type) choice +FPTYPE ?= m + +# Set the default HELINL (inline helicities?) choice +HELINL ?= 0 + +# Set the default HRDCOD (hardcode cIPD physics parameters?) choice +HRDCOD ?= 0 + +# Set the default RNDGEN (random number generator) choice +ifeq ($(NVCC),) + RNDGEN ?= hasNoCurand +else + RNDGEN ?= hasCurand +endif + +# Export AVX, FPTYPE, HELINL, HRDCOD, RNDGEN, OMPFLAGS so sub-makes don't go back to the defaults +export AVX +export AVXFLAGS +export FPTYPE +export HELINL +export HRDCOD +export RNDGEN + +#=== Set the CUDA/C++ compiler flags appropriate to user-defined choices of AVX, FPTYPE, HELINL, HRDCOD, RNDGEN + +# Set the build flags appropriate to each FPTYPE choice (example: "make FPTYPE=f") +# $(info FPTYPE=$(FPTYPE)) +ifeq ($(FPTYPE),d) + COMMONFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_DOUBLE +else ifeq ($(FPTYPE),f) + COMMONFLAGS += -DMGONGPU_FPTYPE_FLOAT -DMGONGPU_FPTYPE2_FLOAT +else ifeq ($(FPTYPE),m) + COMMONFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_FLOAT +else + $(error Unknown FPTYPE='$(FPTYPE)': only 'd', 'f' and 'm' are supported) +endif + +# Set the build flags appropriate to each HELINL choice (example: "make HELINL=1") +# $(info HELINL=$(HELINL)) +ifeq ($(HELINL),1) + COMMONFLAGS += -DMGONGPU_INLINE_HELAMPS +else ifneq ($(HELINL),0) + $(error Unknown HELINL='$(HELINL)': only '0' and '1' are supported) +endif + +# Set the build flags appropriate to each HRDCOD choice (example: "make HRDCOD=1") +# $(info HRDCOD=$(HRDCOD)) +ifeq ($(HRDCOD),1) + COMMONFLAGS += -DMGONGPU_HARDCODE_PARAM +else ifneq ($(HRDCOD),0) + $(error Unknown HRDCOD='$(HRDCOD)': only '0' and '1' are supported) +endif + +# Set the build flags appropriate to each RNDGEN choice (example: "make RNDGEN=hasNoCurand") +$(info RNDGEN=$(RNDGEN)) +ifeq ($(RNDGEN),hasNoCurand) + override CXXFLAGSCURAND = -DMGONGPU_HAS_NO_CURAND + override CURANDLIBFLAGS = +else ifeq ($(RNDGEN),hasCurand) + CXXFLAGSCURAND = $(CUINC) +else + $(error Unknown RNDGEN='$(RNDGEN)': only 'hasCurand' and 'hasNoCurand' are supported) +endif + +MG_CXXFLAGS += $(COMMONFLAGS) +MG_NVCCFLAGS += $(COMMONFLAGS) + +#------------------------------------------------------------------------------- diff --git a/epochX/cudacpp/gg_ttgg.mad/Source/makefile b/epochX/cudacpp/gg_ttgg.mad/Source/makefile index 00c73099a0..407b1b753e 100644 --- a/epochX/cudacpp/gg_ttgg.mad/Source/makefile +++ b/epochX/cudacpp/gg_ttgg.mad/Source/makefile @@ -10,8 +10,8 @@ include make_opts # Source files -PROCESS= hfill.o matrix.o myamp.o -DSAMPLE = dsample.o ranmar.o DiscreteSampler.o StringCast.o +PROCESS = hfill.o matrix.o myamp.o +DSAMPLE = dsample.o ranmar.o DiscreteSampler.o StringCast.o HBOOK = hfill.o hcurve.o hbook1.o hbook2.o GENERIC = $(alfas_functions).o transpole.o invarients.o hfill.o pawgraphs.o ran1.o \ rw_events.o rw_routines.o kin_functions.o open_file.o basecode.o setrun.o \ @@ -22,7 +22,7 @@ GENSUDGRID = gensudgrid.o is-sud.o setrun_gen.o rw_routines.o open_file.o # Locally compiled libraries -LIBRARIES=$(LIBDIR)libdsample.$(libext) $(LIBDIR)libgeneric.$(libext) +LIBRARIES=$(LIBDIR)libdsample.$(libext) $(LIBDIR)libgeneric.$(libext) # Binaries @@ -32,6 +32,9 @@ BINARIES = $(BINDIR)gen_ximprove $(BINDIR)gensudgrid $(BINDIR)combine_runs all: $(LIBRARIES) $(LIBDIR)libdhelas.$(libext) $(LIBDIR)libpdf.$(libext) $(LIBDIR)libgammaUPC.$(libext) $(LIBDIR)libmodel.$(libext) $(LIBDIR)libcernlib.$(libext) $(LIBDIR)libbias.$(libext) +%.o: %.f *.inc + $(FC) -I. $(MG_FCFLAGS) $(FCFLAGS) -c $< -o $@ + # Libraries $(LIBDIR)libdsample.$(libext): $(DSAMPLE) @@ -39,36 +42,35 @@ $(LIBDIR)libdsample.$(libext): $(DSAMPLE) $(LIBDIR)libgeneric.$(libext): $(GENERIC) $(call CREATELIB, $@, $^) $(LIBDIR)libdhelas.$(libext): DHELAS - cd DHELAS; make; cd .. + $(MAKE) -C $< FFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" FCFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" $(LIBDIR)libpdf.$(libext): PDF make_opts - cd PDF; make; cd .. + $(MAKE) -C $< FFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" FCFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" ifneq (,$(filter edff chff, $(pdlabel1) $(pdlabel2))) $(LIBDIR)libgammaUPC.$(libext): PDF/gammaUPC - cd PDF/gammaUPC; make ; cd ../../ + $(MAKE) -C $< FFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" FCFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" else $(LIBDIR)libgammaUPC.$(libext): PDF/gammaUPC - cd PDF/gammaUPC; make -f makefile_dummy; cd ../../ -endif + $(MAKE) -C $< -f makefile_dummy FFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" FCFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" +endif $(LIBDIR)libcernlib.$(libext): CERNLIB - cd CERNLIB; make; cd .. + $(MAKE) -C $< FFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" FCFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" # The bias library is here the dummy by default; compilation of other ones specified in the run_card will be done by MG5aMC directly. $(LIBDIR)libbias.$(libext): BIAS/dummy - cd BIAS/dummy; make; cd ../../ + $(MAKE) -C $< FFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" FCFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" $(LIBDIR)libmodel.$(libext): MODEL param_card.inc - cd MODEL; make + $(MAKE) -C $< FFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" FCFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" param_card.inc: ../Cards/param_card.dat ../bin/madevent treatcards param + touch $@ # madevent doesn't update the time stamp if there's nothing to do -$(BINDIR)gen_ximprove: gen_ximprove.o ranmar.o rw_routines.o open_file.o - $(FC) $(LDFLAGS) -o $@ $^ -#$(BINDIR)combine_events: $(COMBINE) $(LIBDIR)libmodel.$(libext) $(LIBDIR)libpdf.$(libext) $(LIBDIR)libgammaUPC.$(libext) run_card.inc $(LIBDIR)libbias.$(libext) -# $(FC) -o $@ $(COMBINE) -L$(LIBDIR) -lmodel -lpdf -lgammaUPC $(llhapdf) $(LDFLAGS) -lbias +$(BINDIR)gen_ximprove: gen_ximprove.o ranmar.o rw_routines.o open_file.o + $(FC) $(MG_LDFLAGS) $(LDFLAGS) -o $@ $^ $(BINDIR)gensudgrid: $(GENSUDGRID) $(LIBDIR)libpdf.$(libext) $(LIBDIR)libgammaUPC.$(libext) $(LIBDIR)libcernlib.$(libext) - $(FC) -o $@ $(GENSUDGRID) -L$(LIBDIR) -lmodel -lpdf -lgammaUPC -lcernlib $(llhapdf) $(LDFLAGS) + $(FC) -o $@ $(GENSUDGRID) -L$(LIBDIR) -lmodel -lpdf -lgammaUPC -lcernlib $(llhapdf) $(MG_LDFLAGS) $(LDFLAGS) # Dependencies @@ -85,6 +87,7 @@ rw_events.o: rw_events.f run_config.inc run_card.inc: ../Cards/run_card.dat ../bin/madevent treatcards run + touch $@ # madevent doesn't update the time stamp if there's nothing to do clean4pdf: rm -f ../lib/libpdf.$(libext) @@ -120,7 +123,7 @@ $(LIBDIR)libiregi.a: $(IREGIDIR) cd $(IREGIDIR); make ln -sf ../Source/$(IREGIDIR)libiregi.a $(LIBDIR)libiregi.a -cleanSource: +clean: $(RM) *.o $(LIBRARIES) $(BINARIES) cd PDF; make clean; cd .. cd PDF/gammaUPC; make clean; cd ../../ @@ -132,11 +135,3 @@ cleanSource: cd BIAS/ptj_bias; make clean; cd ../.. if [ -d $(CUTTOOLSDIR) ]; then cd $(CUTTOOLSDIR); make clean; cd ..; fi if [ -d $(IREGIDIR) ]; then cd $(IREGIDIR); make clean; cd ..; fi - -clean: cleanSource - for i in `ls -d ../SubProcesses/P*`; do cd $$i; make clean; cd -; done; - -cleanavx: - for i in `ls -d ../SubProcesses/P*`; do cd $$i; make cleanavxs; cd -; done; -cleanall: cleanSource # THIS IS THE ONE - for i in `ls -d ../SubProcesses/P*`; do cd $$i; make cleanavxs; cd -; done; diff --git a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/Bridge.h b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/Bridge.h index bf8b5e024d..c263f39a62 100644 --- a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/Bridge.h +++ b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/Bridge.h @@ -236,7 +236,7 @@ namespace mg5amcCpu #ifdef __CUDACC__ if( ( m_nevt < s_gputhreadsmin ) || ( m_nevt % s_gputhreadsmin != 0 ) ) throw std::runtime_error( "Bridge constructor: nevt should be a multiple of " + std::to_string( s_gputhreadsmin ) ); - while( m_nevt != m_gpublocks * m_gputhreads ) + while( m_nevt != static_cast( m_gpublocks * m_gputhreads ) ) { m_gputhreads /= 2; if( m_gputhreads < s_gputhreadsmin ) @@ -266,7 +266,7 @@ namespace mg5amcCpu template void Bridge::set_gpugrid( const int gpublocks, const int gputhreads ) { - if( m_nevt != gpublocks * gputhreads ) + if( m_nevt != static_cast( gpublocks * gputhreads ) ) throw std::runtime_error( "Bridge: gpublocks*gputhreads must equal m_nevt in set_gpugrid" ); m_gpublocks = gpublocks; m_gputhreads = gputhreads; diff --git a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/MadgraphTest.h b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/MadgraphTest.h index ef40624c88..b0f2250c25 100644 --- a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/MadgraphTest.h +++ b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/MadgraphTest.h @@ -199,10 +199,6 @@ class MadgraphTest : public testing::TestWithParam } }; -// Since we link both the CPU-only and GPU tests into the same executable, we prevent -// a multiply defined symbol by only compiling this in the non-CUDA phase: -#ifndef __CUDACC__ - /// Compare momenta and matrix elements. /// This uses an implementation of TestDriverBase to run a madgraph workflow, /// and compares momenta and matrix elements with a reference file. @@ -307,6 +303,4 @@ TEST_P( MadgraphTest, CompareMomentaAndME ) } } -#endif // __CUDACC__ - #endif /* MADGRAPHTEST_H_ */ diff --git a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/MatrixElementKernels.cc b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/MatrixElementKernels.cc index 74b5239ebf..2d6f27cd5d 100644 --- a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/MatrixElementKernels.cc +++ b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/MatrixElementKernels.cc @@ -196,6 +196,9 @@ namespace mg5amcGpu void MatrixElementKernelDevice::setGrid( const int gpublocks, const int gputhreads ) { + m_gpublocks = gpublocks; + m_gputhreads = gputhreads; + if( m_gpublocks == 0 ) throw std::runtime_error( "MatrixElementKernelDevice: gpublocks must be > 0 in setGrid" ); if( m_gputhreads == 0 ) throw std::runtime_error( "MatrixElementKernelDevice: gputhreads must be > 0 in setGrid" ); if( this->nevt() != m_gpublocks * m_gputhreads ) throw std::runtime_error( "MatrixElementKernelDevice: nevt mismatch in setGrid" ); diff --git a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/P1_gg_ttxgg/check_sa.cc b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/P1_gg_ttxgg/check_sa.cc index 3fbf0ffbee..07b7304b17 100644 --- a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/P1_gg_ttxgg/check_sa.cc +++ b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/P1_gg_ttxgg/check_sa.cc @@ -81,7 +81,7 @@ namespace mg5amcGpu namespace mg5amcCpu #endif { - inline void FPEhandler( int sig ) + inline void FPEhandler( int ) { #ifdef __CUDACC__ std::cerr << "Floating Point Exception (GPU)" << std::endl; diff --git a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/P1_gg_ttxgg/counters.cc b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/P1_gg_ttxgg/counters.cc index 3bbdec9387..cf875e8be4 100644 --- a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/P1_gg_ttxgg/counters.cc +++ b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/P1_gg_ttxgg/counters.cc @@ -32,6 +32,8 @@ extern "C" case +0: return "CudaCpp"; break; default: assert( false ); break; } + + return 0; } static mgOnGpu::Timer program_timer; diff --git a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/cudacpp.mk b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/cudacpp.mk index 509307506b..a522ddb335 100644 --- a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/cudacpp.mk @@ -1,56 +1,41 @@ # Copyright (C) 2020-2023 CERN and UCLouvain. # Licensed under the GNU Lesser General Public License (version 3 or later). # Created by: S. Roiser (Feb 2020) for the MG5aMC CUDACPP plugin. -# Further modified by: O. Mattelaer, S. Roiser, A. Valassi (2020-2023) for the MG5aMC CUDACPP plugin. - -#=== Determine the name of this makefile (https://ftp.gnu.org/old-gnu/Manuals/make-3.80/html_node/make_17.html) -#=== NB: use ':=' to ensure that the value of CUDACPP_MAKEFILE is not modified further down after including make_opts -#=== NB: use 'override' to ensure that the value can not be modified from the outside -override CUDACPP_MAKEFILE := $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)) -###$(info CUDACPP_MAKEFILE='$(CUDACPP_MAKEFILE)') - -#=== NB: different names (e.g. cudacpp.mk and cudacpp_src.mk) are used in the Subprocess and src directories -override CUDACPP_SRC_MAKEFILE = cudacpp_src.mk - -#------------------------------------------------------------------------------- - -#=== Use bash in the Makefile (https://www.gnu.org/software/make/manual/html_node/Choosing-the-Shell.html) - -SHELL := /bin/bash - -#------------------------------------------------------------------------------- - -#=== Detect O/S and architecture (assuming uname is available, https://en.wikipedia.org/wiki/Uname) - -# Detect O/S kernel (Linux, Darwin...) -UNAME_S := $(shell uname -s) -###$(info UNAME_S='$(UNAME_S)') - -# Detect architecture (x86_64, ppc64le...) -UNAME_P := $(shell uname -p) -###$(info UNAME_P='$(UNAME_P)') - -#------------------------------------------------------------------------------- - -#=== Include the common MG5aMC Makefile options - -# OM: this is crucial for MG5aMC flag consistency/documentation -# AV: temporarely comment this out because it breaks cudacpp builds -ifneq ($(wildcard ../../Source/make_opts),) -include ../../Source/make_opts -endif +# Further modified by: S. Hageboeck, J. Teig, O. Mattelaer, S. Roiser, A. Valassi (2020-2023) for the MG5aMC CUDACPP plugin. + +# This makefile extends the Fortran makefile called "makefile" + +CUDACPP_SRC_MAKEFILE = cudacpp_src.mk + +# Self-invocation with adapted flags: +cppnative: $(SOURCEDIR_GUARD) $(PROCESS) + $(MAKE) AVX=native AVXFLAGS="-march=native" cppbuild +cppnone: $(SOURCEDIR_GUARD) $(PROCESS) + $(MAKE) AVX=none AVXFLAGS= cppbuild +cppsse4: $(SOURCEDIR_GUARD) $(PROCESS) + $(MAKE) AVX=sse4 AVXFLAGS=-march=nehalem cppbuild +cppavx2: $(SOURCEDIR_GUARD) $(PROCESS) + $(MAKE) AVX=avx2 AVXFLAGS=-march=haswell cppbuild +cppavx512y: $(SOURCEDIR_GUARD) $(PROCESS) + $(MAKE) AVX=512y AVXFLAGS="-march=skylake-avx512 -mprefer-vector-width=256" cppbuild +cppavx512z: $(SOURCEDIR_GUARD) $(PROCESS) + $(MAKE) AVX=512z AVXFLAGS="-march=skylake-avx512 -DMGONGPU_PVW512" cppbuild +cuda: $(SOURCEDIR_GUARD) $(PROCESS) + $(MAKE) AVX=cuda cudabuild #------------------------------------------------------------------------------- #=== Configure common compiler flags for C++ and CUDA +# NB: The base flags are defined in the fortran "makefile" + +# Include directories +INCFLAGS = -I. -I../../src -INCFLAGS = -I. -OPTFLAGS = -O3 # this ends up in CUFLAGS too (should it?), cannot add -Ofast or -ffast-math here +MG_CXXFLAGS += $(INCFLAGS) +MG_NVCCFLAGS += $(INCFLAGS) # Dependency on src directory -MG5AMC_COMMONLIB = mg5amc_common -LIBFLAGS = -L$(LIBDIR) -l$(MG5AMC_COMMONLIB) -INCFLAGS += -I../../src +MG5AMC_COMMONLIB = mg5amc_common # Compiler-specific googletest build directory (#125 and #738) ifneq ($(shell $(CXX) --version | grep '^Intel(R) oneAPI DPC++/C++ Compiler'),) @@ -99,356 +84,42 @@ endif #------------------------------------------------------------------------------- -#=== Configure the C++ compiler - -CXXFLAGS = $(OPTFLAGS) -std=c++17 $(INCFLAGS) -Wall -Wshadow -Wextra -ifeq ($(shell $(CXX) --version | grep ^nvc++),) -CXXFLAGS += -ffast-math # see issue #117 -endif -###CXXFLAGS+= -Ofast # performance is not different from --fast-math -###CXXFLAGS+= -g # FOR DEBUGGING ONLY - -# Optionally add debug flags to display the full list of flags (eg on Darwin) -###CXXFLAGS+= -v - -# Note: AR, CXX and FC are implicitly defined if not set externally -# See https://www.gnu.org/software/make/manual/html_node/Implicit-Variables.html - -# Add -mmacosx-version-min=11.3 to avoid "ld: warning: object file was built for newer macOS version than being linked" -ifneq ($(shell $(CXX) --version | egrep '^Apple clang'),) -CXXFLAGS += -mmacosx-version-min=11.3 -endif - -#------------------------------------------------------------------------------- - -#=== Configure the CUDA compiler - -# If CXX is not a single word (example "clang++ --gcc-toolchain...") then disable CUDA builds (issue #505) -# This is because it is impossible to pass this to "CUFLAGS += -ccbin " below -ifneq ($(words $(subst ccache ,,$(CXX))),1) # allow at most "CXX=ccache " from outside - $(warning CUDA builds are not supported for multi-word CXX "$(CXX)") - override CUDA_HOME=disabled -endif - -# If CUDA_HOME is not set, try to set it from the location of nvcc -ifndef CUDA_HOME - CUDA_HOME = $(patsubst %bin/nvcc,%,$(shell which nvcc 2>/dev/null)) - $(warning CUDA_HOME was not set: using "$(CUDA_HOME)") -endif - -# Set NVCC as $(CUDA_HOME)/bin/nvcc if it exists -ifneq ($(wildcard $(CUDA_HOME)/bin/nvcc),) - NVCC = $(CUDA_HOME)/bin/nvcc - USE_NVTX ?=-DUSE_NVTX - # See https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html - # See https://arnon.dk/matching-sm-architectures-arch-and-gencode-for-various-nvidia-cards/ - # Default: use compute capability 70 for V100 (CERN lxbatch, CERN itscrd, Juwels Cluster). - # Embed device code for 70, and PTX for 70+. - # Export MADGRAPH_CUDA_ARCHITECTURE (comma-separated list) to use another value or list of values (see #533). - # Examples: use 60 for P100 (Piz Daint), 80 for A100 (Juwels Booster, NVidia raplab/Curiosity). - MADGRAPH_CUDA_ARCHITECTURE ?= 70 - ###CUARCHFLAGS = -gencode arch=compute_$(MADGRAPH_CUDA_ARCHITECTURE),code=compute_$(MADGRAPH_CUDA_ARCHITECTURE) -gencode arch=compute_$(MADGRAPH_CUDA_ARCHITECTURE),code=sm_$(MADGRAPH_CUDA_ARCHITECTURE) # Older implementation (AV): go back to this one for multi-GPU support #533 - ###CUARCHFLAGS = --gpu-architecture=compute_$(MADGRAPH_CUDA_ARCHITECTURE) --gpu-code=sm_$(MADGRAPH_CUDA_ARCHITECTURE),compute_$(MADGRAPH_CUDA_ARCHITECTURE) # Newer implementation (SH): cannot use this as-is for multi-GPU support #533 - comma:=, - CUARCHFLAGS = $(foreach arch,$(subst $(comma), ,$(MADGRAPH_CUDA_ARCHITECTURE)),-gencode arch=compute_$(arch),code=compute_$(arch) -gencode arch=compute_$(arch),code=sm_$(arch)) - CUINC = -I$(CUDA_HOME)/include/ - ifeq ($(RNDGEN),hasNoCurand) - CURANDLIBFLAGS= - else - CURANDLIBFLAGS = -L$(CUDA_HOME)/lib64/ -lcurand # NB: -lcuda is not needed here! - endif - CUOPTFLAGS = -lineinfo - CUFLAGS = $(foreach opt, $(OPTFLAGS), -Xcompiler $(opt)) $(CUOPTFLAGS) $(INCFLAGS) $(CUINC) $(USE_NVTX) $(CUARCHFLAGS) -use_fast_math - ###CUFLAGS += -Xcompiler -Wall -Xcompiler -Wextra -Xcompiler -Wshadow - ###NVCC_VERSION = $(shell $(NVCC) --version | grep 'Cuda compilation tools' | cut -d' ' -f5 | cut -d, -f1) - CUFLAGS += -std=c++17 # need CUDA >= 11.2 (see #333): this is enforced in mgOnGpuConfig.h - # Without -maxrregcount: baseline throughput: 6.5E8 (16384 32 12) up to 7.3E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 160 # improves throughput: 6.9E8 (16384 32 12) up to 7.7E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 128 # improves throughput: 7.3E8 (16384 32 12) up to 7.6E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 96 # degrades throughput: 4.1E8 (16384 32 12) up to 4.5E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 64 # degrades throughput: 1.7E8 (16384 32 12) flat at 1.7E8 (65536 128 12) -else ifneq ($(origin REQUIRE_CUDA),undefined) - # If REQUIRE_CUDA is set but no cuda is found, stop here (e.g. for CI tests on GPU #443) - $(error No cuda installation found (set CUDA_HOME or make nvcc visible in PATH)) -else - # No cuda. Switch cuda compilation off and go to common random numbers in C++ - $(warning CUDA_HOME is not set or is invalid: export CUDA_HOME to compile with cuda) - override NVCC= - override USE_NVTX= - override CUINC= - override CURANDLIBFLAGS= -endif -export NVCC -export CUFLAGS - -# Set the host C++ compiler for nvcc via "-ccbin " -# (NB issue #505: this must be a single word, "clang++ --gcc-toolchain..." is not supported) -CUFLAGS += -ccbin $(shell which $(subst ccache ,,$(CXX))) - -# Allow newer (unsupported) C++ compilers with older versions of CUDA if ALLOW_UNSUPPORTED_COMPILER_IN_CUDA is set (#504) -ifneq ($(origin ALLOW_UNSUPPORTED_COMPILER_IN_CUDA),undefined) -CUFLAGS += -allow-unsupported-compiler -endif - -#------------------------------------------------------------------------------- - -#=== Configure ccache for C++ and CUDA builds - -# Enable ccache if USECCACHE=1 -ifeq ($(USECCACHE)$(shell echo $(CXX) | grep ccache),1) - override CXX:=ccache $(CXX) -endif -#ifeq ($(USECCACHE)$(shell echo $(AR) | grep ccache),1) -# override AR:=ccache $(AR) -#endif -ifneq ($(NVCC),) - ifeq ($(USECCACHE)$(shell echo $(NVCC) | grep ccache),1) - override NVCC:=ccache $(NVCC) - endif -endif - -#------------------------------------------------------------------------------- - -#=== Configure PowerPC-specific compiler flags for C++ and CUDA - -# PowerPC-specific CXX compiler flags (being reviewed) -ifeq ($(UNAME_P),ppc64le) - CXXFLAGS+= -mcpu=power9 -mtune=power9 # gains ~2-3% both for none and sse4 - # Throughput references without the extra flags below: none=1.41-1.42E6, sse4=2.15-2.19E6 - ###CXXFLAGS+= -DNO_WARN_X86_INTRINSICS # no change - ###CXXFLAGS+= -fpeel-loops # no change - ###CXXFLAGS+= -funroll-loops # gains ~1% for none, loses ~1% for sse4 - ###CXXFLAGS+= -ftree-vectorize # no change - ###CXXFLAGS+= -flto # would increase to none=4.08-4.12E6, sse4=4.99-5.03E6! -else - ###CXXFLAGS+= -flto # also on Intel this would increase throughputs by a factor 2 to 4... - ######CXXFLAGS+= -fno-semantic-interposition # no benefit (neither alone, nor combined with -flto) -endif - -# PowerPC-specific CUDA compiler flags (to be reviewed!) -ifeq ($(UNAME_P),ppc64le) - CUFLAGS+= -Xcompiler -mno-float128 -endif - -#------------------------------------------------------------------------------- - #=== Configure defaults and check if user-defined choices exist for OMPFLAGS, AVX, FPTYPE, HELINL, HRDCOD, RNDGEN # Set the default OMPFLAGS choice -ifneq ($(shell $(CXX) --version | egrep '^Intel'),) -override OMPFLAGS = -fopenmp -###override OMPFLAGS = # disable OpenMP MT on Intel (was ok without nvcc but not ok with nvcc before #578) -else ifneq ($(shell $(CXX) --version | egrep '^(clang)'),) -override OMPFLAGS = -fopenmp -###override OMPFLAGS = # disable OpenMP MT on clang (was not ok without or with nvcc before #578) -###else ifneq ($(shell $(CXX) --version | egrep '^(Apple clang)'),) # AV for Mac (Apple clang compiler) -else ifeq ($(UNAME_S),Darwin) # OM for Mac (any compiler) +OMPFLAGS ?= -fopenmp +ifeq ($(UNAME_S),Darwin) # OM for Mac (any compiler) override OMPFLAGS = # AV disable OpenMP MT on Apple clang (builds fail in the CI #578) -###override OMPFLAGS = -fopenmp # OM reenable OpenMP MT on Apple clang? (AV Oct 2023: this still fails in the CI) -else -override OMPFLAGS = -fopenmp # enable OpenMP MT by default on all other platforms -###override OMPFLAGS = # disable OpenMP MT on all other platforms (default before #575) -endif - -# Set the default AVX (vectorization) choice -ifeq ($(AVX),) - ifeq ($(UNAME_P),ppc64le) - ###override AVX = none - override AVX = sse4 - else ifeq ($(UNAME_P),arm) - ###override AVX = none - override AVX = sse4 - else ifeq ($(wildcard /proc/cpuinfo),) - override AVX = none - $(warning Using AVX='$(AVX)' because host SIMD features cannot be read from /proc/cpuinfo) - else ifeq ($(shell grep -m1 -c avx512vl /proc/cpuinfo)$(shell $(CXX) --version | grep ^clang),1) - override AVX = 512y - ###$(info Using AVX='$(AVX)' as no user input exists) - else - override AVX = avx2 - ifneq ($(shell grep -m1 -c avx512vl /proc/cpuinfo),1) - $(warning Using AVX='$(AVX)' because host does not support avx512vl) - else - $(warning Using AVX='$(AVX)' because this is faster than avx512vl for clang) - endif - endif -else - ###$(info Using AVX='$(AVX)' according to user input) -endif - -# Set the default FPTYPE (floating point type) choice -ifeq ($(FPTYPE),) - override FPTYPE = d -endif - -# Set the default HELINL (inline helicities?) choice -ifeq ($(HELINL),) - override HELINL = 0 -endif - -# Set the default HRDCOD (hardcode cIPD physics parameters?) choice -ifeq ($(HRDCOD),) - override HRDCOD = 0 -endif - -# Set the default RNDGEN (random number generator) choice -ifeq ($(RNDGEN),) - ifeq ($(NVCC),) - override RNDGEN = hasNoCurand - else ifeq ($(RNDGEN),) - override RNDGEN = hasCurand - endif endif -# Export AVX, FPTYPE, HELINL, HRDCOD, RNDGEN, OMPFLAGS so that it is not necessary to pass them to the src Makefile too -export AVX -export FPTYPE -export HELINL -export HRDCOD -export RNDGEN +# Export here, so sub makes don't fall back to the defaults: export OMPFLAGS -#------------------------------------------------------------------------------- - -#=== Set the CUDA/C++ compiler flags appropriate to user-defined choices of AVX, FPTYPE, HELINL, HRDCOD, RNDGEN - -# Set the build flags appropriate to OMPFLAGS -$(info OMPFLAGS=$(OMPFLAGS)) -CXXFLAGS += $(OMPFLAGS) - -# Set the build flags appropriate to each AVX choice (example: "make AVX=none") -# [NB MGONGPU_PVW512 is needed because "-mprefer-vector-width=256" is not exposed in a macro] -# [See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96476] -$(info AVX=$(AVX)) -ifeq ($(UNAME_P),ppc64le) - ifeq ($(AVX),sse4) - override AVXFLAGS = -D__SSE4_2__ # Power9 VSX with 128 width (VSR registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on PowerPC for the moment) - endif -else ifeq ($(UNAME_P),arm) - ifeq ($(AVX),sse4) - override AVXFLAGS = -D__SSE4_2__ # ARM NEON with 128 width (Q/quadword registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on ARM for the moment) - endif -else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 - ifeq ($(AVX),none) - override AVXFLAGS = -mno-sse3 # no SIMD - else ifeq ($(AVX),sse4) - override AVXFLAGS = -mno-avx # SSE4.2 with 128 width (xmm registers) - else ifeq ($(AVX),avx2) - override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(AVX),512y) - override AVXFLAGS = -march=skylake -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(AVX),512z) - override AVXFLAGS = -march=skylake -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) - else - $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) - endif -else - ifeq ($(AVX),none) - override AVXFLAGS = -march=x86-64 # no SIMD (see #588) - else ifeq ($(AVX),sse4) - override AVXFLAGS = -march=nehalem # SSE4.2 with 128 width (xmm registers) - else ifeq ($(AVX),avx2) - override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(AVX),512y) - override AVXFLAGS = -march=skylake-avx512 -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(AVX),512z) - override AVXFLAGS = -march=skylake-avx512 -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) - else - $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) - endif -endif -# For the moment, use AVXFLAGS everywhere: eventually, use them only in encapsulated implementations? -CXXFLAGS+= $(AVXFLAGS) - -# Set the build flags appropriate to each FPTYPE choice (example: "make FPTYPE=f") -$(info FPTYPE=$(FPTYPE)) -ifeq ($(FPTYPE),d) - CXXFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_DOUBLE - CUFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_DOUBLE -else ifeq ($(FPTYPE),f) - CXXFLAGS += -DMGONGPU_FPTYPE_FLOAT -DMGONGPU_FPTYPE2_FLOAT - CUFLAGS += -DMGONGPU_FPTYPE_FLOAT -DMGONGPU_FPTYPE2_FLOAT -else ifeq ($(FPTYPE),m) - CXXFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_FLOAT - CUFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_FLOAT -else - $(error Unknown FPTYPE='$(FPTYPE)': only 'd', 'f' and 'm' are supported) -endif - -# Set the build flags appropriate to each HELINL choice (example: "make HELINL=1") -$(info HELINL=$(HELINL)) -ifeq ($(HELINL),1) - CXXFLAGS += -DMGONGPU_INLINE_HELAMPS - CUFLAGS += -DMGONGPU_INLINE_HELAMPS -else ifneq ($(HELINL),0) - $(error Unknown HELINL='$(HELINL)': only '0' and '1' are supported) -endif - -# Set the build flags appropriate to each HRDCOD choice (example: "make HRDCOD=1") -$(info HRDCOD=$(HRDCOD)) -ifeq ($(HRDCOD),1) - CXXFLAGS += -DMGONGPU_HARDCODE_PARAM - CUFLAGS += -DMGONGPU_HARDCODE_PARAM -else ifneq ($(HRDCOD),0) - $(error Unknown HRDCOD='$(HRDCOD)': only '0' and '1' are supported) -endif - -# Set the build flags appropriate to each RNDGEN choice (example: "make RNDGEN=hasNoCurand") -$(info RNDGEN=$(RNDGEN)) -ifeq ($(RNDGEN),hasNoCurand) - override CXXFLAGSCURAND = -DMGONGPU_HAS_NO_CURAND -else ifeq ($(RNDGEN),hasCurand) - override CXXFLAGSCURAND = -else - $(error Unknown RNDGEN='$(RNDGEN)': only 'hasCurand' and 'hasNoCurand' are supported) -endif +MG_CXXFLAGS += $(OMPFLAGS) #------------------------------------------------------------------------------- #=== Configure build directories and build lockfiles === -# Build directory "short" tag (defines target and path to the optional build directory) -# (Rationale: keep directory names shorter, e.g. do not include random number generator choice) -override DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) - -# Build lockfile "full" tag (defines full specification of build options that cannot be intermixed) -# (Rationale: avoid mixing of CUDA and no-CUDA environment builds with different random number generators) -override TAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) - -# Build directory: current directory by default, or build.$(DIRTAG) if USEBUILDDIR==1 -ifeq ($(USEBUILDDIR),1) - override BUILDDIR = build.$(DIRTAG) - override LIBDIR = ../../lib/$(BUILDDIR) - override LIBDIRRPATH = '$$ORIGIN/../$(LIBDIR)' - $(info Building in BUILDDIR=$(BUILDDIR) for tag=$(TAG) (USEBUILDDIR is set = 1)) -else - override BUILDDIR = . - override LIBDIR = ../../lib - override LIBDIRRPATH = '$$ORIGIN/$(LIBDIR)' - $(info Building in BUILDDIR=$(BUILDDIR) for tag=$(TAG) (USEBUILDDIR is not set)) +# Build directory "short" tag (defines target and path to the build directory) +DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) +CUDACPP_BUILDDIR = build.$(DIRTAG) +CUDACPP_LIBDIR := ../../lib/$(CUDACPP_BUILDDIR) +LIBDIRRPATH := '$$ORIGIN:$$ORIGIN/../$(CUDACPP_LIBDIR)' +ifneq ($(AVX),) + $(info Building CUDACPP in CUDACPP_BUILDDIR=$(CUDACPP_BUILDDIR). Libs in $(CUDACPP_LIBDIR)) endif -###override INCDIR = ../../include -###$(info Building in BUILDDIR=$(BUILDDIR) for tag=$(TAG)) -# On Linux, set rpath to LIBDIR to make it unnecessary to use LD_LIBRARY_PATH +# On Linux, set rpath to CUDACPP_LIBDIR to make it unnecessary to use LD_LIBRARY_PATH # Use relative paths with respect to the executables or shared libraries ($ORIGIN on Linux) -# On Darwin, building libraries with absolute paths in LIBDIR makes this unnecessary +# On Darwin, building libraries with absolute paths in CUDACPP_LIBDIR makes this unnecessary ifeq ($(UNAME_S),Darwin) override CXXLIBFLAGSRPATH = override CULIBFLAGSRPATH = - override CXXLIBFLAGSRPATH2 = - override CULIBFLAGSRPATH2 = else # RPATH to cuda/cpp libs when linking executables override CXXLIBFLAGSRPATH = -Wl,-rpath,$(LIBDIRRPATH) override CULIBFLAGSRPATH = -Xlinker -rpath,$(LIBDIRRPATH) - # RPATH to common lib when linking cuda/cpp libs - override CXXLIBFLAGSRPATH2 = -Wl,-rpath,'$$ORIGIN' - override CULIBFLAGSRPATH2 = -Xlinker -rpath,'$$ORIGIN' endif # Setting LD_LIBRARY_PATH or DYLD_LIBRARY_PATH in the RUNTIME is no longer necessary (neither on Linux nor on Mac) @@ -458,107 +129,68 @@ override RUNTIME = #=== Makefile TARGETS and build rules below #=============================================================================== -cxx_main=$(BUILDDIR)/check.exe -fcxx_main=$(BUILDDIR)/fcheck.exe +cxx_main=$(CUDACPP_BUILDDIR)/check.exe +fcxx_main=$(CUDACPP_BUILDDIR)/fcheck.exe -ifneq ($(NVCC),) -cu_main=$(BUILDDIR)/gcheck.exe -fcu_main=$(BUILDDIR)/fgcheck.exe -else -cu_main= -fcu_main= -endif - -testmain=$(BUILDDIR)/runTest.exe +cu_main=$(CUDACPP_BUILDDIR)/gcheck.exe +fcu_main=$(CUDACPP_BUILDDIR)/fgcheck.exe ifneq ($(GTESTLIBS),) -all.$(TAG): $(BUILDDIR)/.build.$(TAG) $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_main) $(cxx_main) $(fcu_main) $(fcxx_main) $(testmain) -else -all.$(TAG): $(BUILDDIR)/.build.$(TAG) $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_main) $(cxx_main) $(fcu_main) $(fcxx_main) +testmain=$(CUDACPP_BUILDDIR)/runTest.exe +cutestmain=$(CUDACPP_BUILDDIR)/runTest_cuda.exe endif -# Target (and build options): debug -MAKEDEBUG= -debug: OPTFLAGS = -g -O0 -debug: CUOPTFLAGS = -G -debug: MAKEDEBUG := debug -debug: all.$(TAG) - -# Target: tag-specific build lockfiles -override oldtagsb=`if [ -d $(BUILDDIR) ]; then find $(BUILDDIR) -maxdepth 1 -name '.build.*' ! -name '.build.$(TAG)' -exec echo $(shell pwd)/{} \; ; fi` -$(BUILDDIR)/.build.$(TAG): - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - @if [ "$(oldtagsb)" != "" ]; then echo "Cannot build for tag=$(TAG) as old builds exist for other tags:"; echo " $(oldtagsb)"; echo "Please run 'make clean' first\nIf 'make clean' is not enough: run 'make clean USEBUILDDIR=1 AVX=$(AVX) FPTYPE=$(FPTYPE)' or 'make cleanall'"; exit 1; fi - @touch $(BUILDDIR)/.build.$(TAG) +cppbuild: $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(cxx_main) $(fcxx_main) $(testmain) +cudabuild: $(CUDACPP_BUILDDIR)/$(PROG)_cuda $(cu_main) $(fcu_main) $(cutestmain) # Generic target and build rules: objects from CUDA compilation -ifneq ($(NVCC),) -$(BUILDDIR)/%.o : %.cu *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c $< -o $@ +$(CUDACPP_BUILDDIR)/%.o : %.cu *.h ../../src/*.h + @mkdir -p $(CUDACPP_BUILDDIR) + $(NVCC) $(MG_NVCCFLAGS) $(NVCCFLAGS) -c $< -o $@ -$(BUILDDIR)/%_cu.o : %.cc *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c -x cu $< -o $@ -endif +$(CUDACPP_BUILDDIR)/%_cu.o : %.cc *.h ../../src/*.h + @mkdir -p $(CUDACPP_BUILDDIR) + $(NVCC) $(MG_NVCCFLAGS) $(NVCCFLAGS) -c -x cu $< -o $@ # Generic target and build rules: objects from C++ compilation # (NB do not include CUINC here! add it only for NVTX or curand #679) -$(BUILDDIR)/%.o : %.cc *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - $(CXX) $(CPPFLAGS) $(CXXFLAGS) -fPIC -c $< -o $@ +$(CUDACPP_BUILDDIR)/%.o : %.cc *.h ../../src/*.h + @mkdir -p $(CUDACPP_BUILDDIR) + $(CXX) $(MG_CXXFLAGS) $(CXXFLAGS) -c $< -o $@ # Apply special build flags only to CrossSectionKernel.cc and gCrossSectionKernel.cu (no fast math, see #117 and #516) ifeq ($(shell $(CXX) --version | grep ^nvc++),) -$(BUILDDIR)/CrossSectionKernels.o: CXXFLAGS := $(filter-out -ffast-math,$(CXXFLAGS)) -$(BUILDDIR)/CrossSectionKernels.o: CXXFLAGS += -fno-fast-math +$(CUDACPP_BUILDDIR)/CrossSectionKernels.o: CXXFLAGS += -fno-fast-math ifneq ($(NVCC),) -$(BUILDDIR)/gCrossSectionKernels.o: CUFLAGS += -Xcompiler -fno-fast-math +$(CUDACPP_BUILDDIR)/gCrossSectionKernels.o: NVCCFLAGS += -Xcompiler -fno-fast-math endif endif # Apply special build flags only to check_sa.o and gcheck_sa.o (NVTX in timermap.h, #679) -$(BUILDDIR)/check_sa.o: CXXFLAGS += $(USE_NVTX) $(CUINC) -$(BUILDDIR)/gcheck_sa.o: CXXFLAGS += $(USE_NVTX) $(CUINC) +$(CUDACPP_BUILDDIR)/check_sa.o: MG_CXXFLAGS += $(USE_NVTX) $(CUINC) +$(CUDACPP_BUILDDIR)/gcheck_sa.o: MG_CXXFLAGS += $(USE_NVTX) $(CUINC) # Apply special build flags only to check_sa and CurandRandomNumberKernel (curand headers, #679) -$(BUILDDIR)/check_sa.o: CXXFLAGS += $(CXXFLAGSCURAND) -$(BUILDDIR)/gcheck_sa.o: CUFLAGS += $(CXXFLAGSCURAND) -$(BUILDDIR)/CurandRandomNumberKernel.o: CXXFLAGS += $(CXXFLAGSCURAND) -$(BUILDDIR)/gCurandRandomNumberKernel.o: CUFLAGS += $(CXXFLAGSCURAND) -ifeq ($(RNDGEN),hasCurand) -$(BUILDDIR)/CurandRandomNumberKernel.o: CXXFLAGS += $(CUINC) -endif +$(CUDACPP_BUILDDIR)/check_sa.o: MG_CXXFLAGS += $(CXXFLAGSCURAND) +$(CUDACPP_BUILDDIR)/gcheck_sa.o: MG_NVCCFLAGS += $(CXXFLAGSCURAND) +$(CUDACPP_BUILDDIR)/CurandRandomNumberKernel.o: MG_CXXFLAGS += $(CXXFLAGSCURAND) +$(CUDACPP_BUILDDIR)/gCurandRandomNumberKernel.o: MG_NVCCFLAGS += $(CXXFLAGSCURAND) + # Avoid "warning: builtin __has_trivial_... is deprecated; use __is_trivially_... instead" in nvcc with icx2023 (#592) ifneq ($(shell $(CXX) --version | egrep '^(Intel)'),) ifneq ($(NVCC),) -CUFLAGS += -Xcompiler -Wno-deprecated-builtins +MG_NVCCFLAGS += -Xcompiler -Wno-deprecated-builtins endif endif -# Avoid clang warning "overriding '-ffp-contract=fast' option with '-ffp-contract=on'" (#516) -# This patch does remove the warning, but I prefer to keep it disabled for the moment... -###ifneq ($(shell $(CXX) --version | egrep '^(clang|Apple clang|Intel)'),) -###$(BUILDDIR)/CrossSectionKernels.o: CXXFLAGS += -Wno-overriding-t-option -###ifneq ($(NVCC),) -###$(BUILDDIR)/gCrossSectionKernels.o: CUFLAGS += -Xcompiler -Wno-overriding-t-option -###endif -###endif - #### Apply special build flags only to CPPProcess.cc (-flto) ###$(BUILDDIR)/CPPProcess.o: CXXFLAGS += -flto -#### Apply special build flags only to CPPProcess.cc (AVXFLAGS) -###$(BUILDDIR)/CPPProcess.o: CXXFLAGS += $(AVXFLAGS) - #------------------------------------------------------------------------------- -# Target (and build rules): common (src) library -commonlib : $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so - -$(LIBDIR)/lib$(MG5AMC_COMMONLIB).so: ../../src/*.h ../../src/*.cc $(BUILDDIR)/.build.$(TAG) - $(MAKE) -C ../../src $(MAKEDEBUG) -f $(CUDACPP_SRC_MAKEFILE) +$(CUDACPP_LIBDIR)/lib$(MG5AMC_COMMONLIB).so: ../../src/*.h ../../src/*.cc + $(MAKE) AVX=$(AVX) AVXFLAGS="$(AVXFLAGS)" -C ../../src -f $(CUDACPP_SRC_MAKEFILE) #------------------------------------------------------------------------------- @@ -566,162 +198,123 @@ processid_short=$(shell basename $(CURDIR) | awk -F_ '{print $$(NF-1)"_"$$NF}') ###$(info processid_short=$(processid_short)) MG5AMC_CXXLIB = mg5amc_$(processid_short)_cpp -cxx_objects_lib=$(BUILDDIR)/CPPProcess.o $(BUILDDIR)/MatrixElementKernels.o $(BUILDDIR)/BridgeKernels.o $(BUILDDIR)/CrossSectionKernels.o -cxx_objects_exe=$(BUILDDIR)/CommonRandomNumberKernel.o $(BUILDDIR)/RamboSamplingKernels.o +cxx_objects_lib=$(CUDACPP_BUILDDIR)/CPPProcess.o $(CUDACPP_BUILDDIR)/MatrixElementKernels.o $(CUDACPP_BUILDDIR)/BridgeKernels.o $(CUDACPP_BUILDDIR)/CrossSectionKernels.o +cxx_objects_exe=$(CUDACPP_BUILDDIR)/CommonRandomNumberKernel.o $(CUDACPP_BUILDDIR)/RamboSamplingKernels.o -ifneq ($(NVCC),) MG5AMC_CULIB = mg5amc_$(processid_short)_cuda -cu_objects_lib=$(BUILDDIR)/gCPPProcess.o $(BUILDDIR)/gMatrixElementKernels.o $(BUILDDIR)/gBridgeKernels.o $(BUILDDIR)/gCrossSectionKernels.o -cu_objects_exe=$(BUILDDIR)/gCommonRandomNumberKernel.o $(BUILDDIR)/gRamboSamplingKernels.o -endif +cu_objects_lib=$(CUDACPP_BUILDDIR)/gCPPProcess.o $(CUDACPP_BUILDDIR)/gMatrixElementKernels.o $(CUDACPP_BUILDDIR)/gBridgeKernels.o $(CUDACPP_BUILDDIR)/gCrossSectionKernels.o +cu_objects_exe=$(CUDACPP_BUILDDIR)/gCommonRandomNumberKernel.o $(CUDACPP_BUILDDIR)/gRamboSamplingKernels.o # Target (and build rules): C++ and CUDA shared libraries -$(LIBDIR)/lib$(MG5AMC_CXXLIB).so: $(BUILDDIR)/fbridge.o -$(LIBDIR)/lib$(MG5AMC_CXXLIB).so: cxx_objects_lib += $(BUILDDIR)/fbridge.o -$(LIBDIR)/lib$(MG5AMC_CXXLIB).so: $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cxx_objects_lib) - $(CXX) -shared -o $@ $(cxx_objects_lib) $(CXXLIBFLAGSRPATH2) -L$(LIBDIR) -l$(MG5AMC_COMMONLIB) - -ifneq ($(NVCC),) -$(LIBDIR)/lib$(MG5AMC_CULIB).so: $(BUILDDIR)/fbridge_cu.o -$(LIBDIR)/lib$(MG5AMC_CULIB).so: cu_objects_lib += $(BUILDDIR)/fbridge_cu.o -$(LIBDIR)/lib$(MG5AMC_CULIB).so: $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_objects_lib) - $(NVCC) --shared -o $@ $(cu_objects_lib) $(CULIBFLAGSRPATH2) -L$(LIBDIR) -l$(MG5AMC_COMMONLIB) -endif +$(CUDACPP_BUILDDIR)/lib$(MG5AMC_CXXLIB).so: $(CUDACPP_BUILDDIR)/fbridge.o +$(CUDACPP_BUILDDIR)/lib$(MG5AMC_CXXLIB).so: cxx_objects_lib += $(CUDACPP_BUILDDIR)/fbridge.o +$(CUDACPP_BUILDDIR)/lib$(MG5AMC_CXXLIB).so: $(CUDACPP_LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cxx_objects_lib) + $(CXX) -shared -o $@ $(cxx_objects_lib) $(CXXLIBFLAGSRPATH) -L$(CUDACPP_LIBDIR) -l$(MG5AMC_COMMONLIB) $(MG_LDFLAGS) $(LDFLAGS) -#------------------------------------------------------------------------------- - -# Target (and build rules): Fortran include files -###$(INCDIR)/%.inc : ../%.inc -### @if [ ! -d $(INCDIR) ]; then echo "mkdir -p $(INCDIR)"; mkdir -p $(INCDIR); fi -### \cp $< $@ +$(CUDACPP_BUILDDIR)/lib$(MG5AMC_CULIB).so: $(CUDACPP_BUILDDIR)/fbridge_cu.o +$(CUDACPP_BUILDDIR)/lib$(MG5AMC_CULIB).so: cu_objects_lib += $(CUDACPP_BUILDDIR)/fbridge_cu.o +$(CUDACPP_BUILDDIR)/lib$(MG5AMC_CULIB).so: $(CUDACPP_LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_objects_lib) + $(NVCC) --shared -o $@ $(cu_objects_lib) $(CULIBFLAGSRPATH) -L$(CUDACPP_LIBDIR) -l$(MG5AMC_COMMONLIB) #------------------------------------------------------------------------------- # Target (and build rules): C++ and CUDA standalone executables -$(cxx_main): LIBFLAGS += $(CXXLIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH -$(cxx_main): $(BUILDDIR)/check_sa.o $(LIBDIR)/lib$(MG5AMC_CXXLIB).so $(cxx_objects_exe) $(BUILDDIR)/CurandRandomNumberKernel.o - $(CXX) -o $@ $(BUILDDIR)/check_sa.o $(OMPFLAGS) -ldl -pthread $(LIBFLAGS) -L$(LIBDIR) -l$(MG5AMC_CXXLIB) $(cxx_objects_exe) $(BUILDDIR)/CurandRandomNumberKernel.o $(CURANDLIBFLAGS) -ifneq ($(NVCC),) +$(cxx_main): MG_LDFLAGS += $(CXXLIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH +$(cxx_main): MG_LDFLAGS += -L$(CUDACPP_BUILDDIR) -l$(MG5AMC_CXXLIB) # Process-specific library +$(cxx_main): $(CUDACPP_BUILDDIR)/check_sa.o $(CUDACPP_BUILDDIR)/lib$(MG5AMC_CXXLIB).so $(cxx_objects_exe) $(CUDACPP_BUILDDIR)/CurandRandomNumberKernel.o + $(CXX) -o $@ $(CUDACPP_BUILDDIR)/check_sa.o $(OMPFLAGS) -ldl -pthread $(cxx_objects_exe) $(CUDACPP_BUILDDIR)/CurandRandomNumberKernel.o $(MG_LDFLAGS) $(LDFLAGS) + ifneq ($(shell $(CXX) --version | grep ^Intel),) -$(cu_main): LIBFLAGS += -lintlc # compile with icpx and link with nvcc (undefined reference to `_intel_fast_memcpy') -$(cu_main): LIBFLAGS += -lsvml # compile with icpx and link with nvcc (undefined reference to `__svml_cos4_l9') +$(cu_main): MG_LDFLAGS += -lintlc # compile with icpx and link with nvcc (undefined reference to `_intel_fast_memcpy') +$(cu_main): MG_LDFLAGS += -lsvml # compile with icpx and link with nvcc (undefined reference to `__svml_cos4_l9') else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 -$(cu_main): LIBFLAGS += -L$(patsubst %bin/nvc++,%lib,$(subst ccache ,,$(CXX))) -lnvhpcatm -lnvcpumath -lnvc -endif -$(cu_main): LIBFLAGS += $(CULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH -$(cu_main): $(BUILDDIR)/gcheck_sa.o $(LIBDIR)/lib$(MG5AMC_CULIB).so $(cu_objects_exe) $(BUILDDIR)/gCurandRandomNumberKernel.o - $(NVCC) -o $@ $(BUILDDIR)/gcheck_sa.o $(CUARCHFLAGS) $(LIBFLAGS) -L$(LIBDIR) -l$(MG5AMC_CULIB) $(cu_objects_exe) $(BUILDDIR)/gCurandRandomNumberKernel.o $(CURANDLIBFLAGS) +$(cu_main): MG_LDFLAGS += -L$(patsubst %bin/nvc++,%lib,$(subst ccache ,,$(CXX))) -lnvhpcatm -lnvcpumath -lnvc endif +$(cu_main): MG_LDFLAGS += $(CULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH +$(cu_main): MG_LDFLAGS += -L$(CUDACPP_BUILDDIR) -l$(MG5AMC_CULIB) # Process-specific library +$(cu_main): $(CUDACPP_BUILDDIR)/gcheck_sa.o $(CUDACPP_BUILDDIR)/lib$(MG5AMC_CULIB).so $(cu_objects_exe) $(CUDACPP_BUILDDIR)/gCurandRandomNumberKernel.o + $(NVCC) -o $@ $(CUDACPP_BUILDDIR)/gcheck_sa.o $(CUARCHFLAGS) $(cu_objects_exe) $(CUDACPP_BUILDDIR)/gCurandRandomNumberKernel.o $(MG_LDFLAGS) $(LDFLAGS) #------------------------------------------------------------------------------- - -# Generic target and build rules: objects from Fortran compilation -$(BUILDDIR)/%.o : %.f *.inc - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - $(FC) -I. -c $< -o $@ - -# Generic target and build rules: objects from Fortran compilation -###$(BUILDDIR)/%.o : %.f *.inc -### @if [ ! -d $(INCDIR) ]; then echo "mkdir -p $(INCDIR)"; mkdir -p $(INCDIR); fi -### @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi -### $(FC) -I. -I$(INCDIR) -c $< -o $@ - -# Target (and build rules): Fortran standalone executables -###$(BUILDDIR)/fcheck_sa.o : $(INCDIR)/fbridge.inc +# Check executables: ifeq ($(UNAME_S),Darwin) -$(fcxx_main): LIBFLAGS += -L$(shell dirname $(shell $(FC) --print-file-name libgfortran.dylib)) # add path to libgfortran on Mac #375 +$(fcxx_main): MG_LDFLAGS += -L$(shell dirname $(shell $(FC) --print-file-name libgfortran.dylib)) # add path to libgfortran on Mac #375 endif -$(fcxx_main): LIBFLAGS += $(CXXLIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH -$(fcxx_main): $(BUILDDIR)/fcheck_sa.o $(BUILDDIR)/fsampler.o $(LIBDIR)/lib$(MG5AMC_CXXLIB).so $(cxx_objects_exe) - $(CXX) -o $@ $(BUILDDIR)/fcheck_sa.o $(OMPFLAGS) $(BUILDDIR)/fsampler.o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_CXXLIB) $(cxx_objects_exe) +$(fcxx_main): MG_LDFLAGS += $(CXXLIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH +$(fcxx_main): MG_LDFLAGS += -L$(CUDACPP_BUILDDIR) -l$(MG5AMC_CXXLIB) # Process-specific library +$(fcxx_main): $(CUDACPP_BUILDDIR)/fcheck_sa.o $(CUDACPP_BUILDDIR)/fsampler.o $(CUDACPP_BUILDDIR)/lib$(MG5AMC_CXXLIB).so $(cxx_objects_exe) + $(CXX) -o $@ $(CUDACPP_BUILDDIR)/fcheck_sa.o $(cxx_objects_exe) $(OMPFLAGS) $(CUDACPP_BUILDDIR)/fsampler.o -lgfortran -L$(CUDACPP_LIBDIR) $(MG_LDFLAGS) $(LDFLAGS) -ifneq ($(NVCC),) ifneq ($(shell $(CXX) --version | grep ^Intel),) -$(fcu_main): LIBFLAGS += -lintlc # compile with icpx and link with nvcc (undefined reference to `_intel_fast_memcpy') -$(fcu_main): LIBFLAGS += -lsvml # compile with icpx and link with nvcc (undefined reference to `__svml_cos4_l9') +$(fcu_main): MG_LDFLAGS += -lintlc # compile with icpx and link with nvcc (undefined reference to `_intel_fast_memcpy') +$(fcu_main): MG_LDFLAGS += -lsvml # compile with icpx and link with nvcc (undefined reference to `__svml_cos4_l9') endif ifeq ($(UNAME_S),Darwin) -$(fcu_main): LIBFLAGS += -L$(shell dirname $(shell $(FC) --print-file-name libgfortran.dylib)) # add path to libgfortran on Mac #375 -endif -$(fcu_main): LIBFLAGS += $(CULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH -$(fcu_main): $(BUILDDIR)/fcheck_sa.o $(BUILDDIR)/fsampler_cu.o $(LIBDIR)/lib$(MG5AMC_CULIB).so $(cu_objects_exe) - $(NVCC) -o $@ $(BUILDDIR)/fcheck_sa.o $(BUILDDIR)/fsampler_cu.o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_CULIB) $(cu_objects_exe) +$(fcu_main): MG_LDFLAGS += -L$(shell dirname $(shell $(FC) --print-file-name libgfortran.dylib)) # add path to libgfortran on Mac #375 endif +$(fcu_main): MG_LDFLAGS += $(CULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH +$(fcu_main): MG_LDFLAGS += -L$(CUDACPP_BUILDDIR) -l$(MG5AMC_CULIB) # Process-specific library +$(fcu_main): $(CUDACPP_BUILDDIR)/fcheck_sa.o $(CUDACPP_BUILDDIR)/fsampler_cu.o $(CUDACPP_BUILDDIR)/lib$(MG5AMC_CULIB).so $(cu_objects_exe) + $(NVCC) -o $@ $(CUDACPP_BUILDDIR)/fcheck_sa.o $(CUDACPP_BUILDDIR)/fsampler_cu.o $(cu_objects_exe) -lgfortran $(MG_LDFLAGS) $(LDFLAGS) #------------------------------------------------------------------------------- # Target (and build rules): test objects and test executable -$(BUILDDIR)/testxxx.o: $(GTESTLIBS) -$(BUILDDIR)/testxxx.o: INCFLAGS += $(GTESTINC) -$(BUILDDIR)/testxxx.o: testxxx_cc_ref.txt -$(testmain): $(BUILDDIR)/testxxx.o -$(testmain): cxx_objects_exe += $(BUILDDIR)/testxxx.o # Comment out this line to skip the C++ test of xxx functions -ifneq ($(NVCC),) -$(BUILDDIR)/testxxx_cu.o: $(GTESTLIBS) -$(BUILDDIR)/testxxx_cu.o: INCFLAGS += $(GTESTINC) -$(BUILDDIR)/testxxx_cu.o: testxxx_cc_ref.txt -$(testmain): $(BUILDDIR)/testxxx_cu.o -$(testmain): cu_objects_exe += $(BUILDDIR)/testxxx_cu.o # Comment out this line to skip the CUDA test of xxx functions -endif +$(testmain) $(cutestmain): $(GTESTLIBS) +$(testmain) $(cutestmain): INCFLAGS += $(GTESTINC) +$(testmain) $(cutestmain): MG_LDFLAGS += -L$(GTESTLIBDIR) -lgtest -lgtest_main -$(BUILDDIR)/testmisc.o: $(GTESTLIBS) -$(BUILDDIR)/testmisc.o: INCFLAGS += $(GTESTINC) -$(testmain): $(BUILDDIR)/testmisc.o -$(testmain): cxx_objects_exe += $(BUILDDIR)/testmisc.o # Comment out this line to skip the C++ miscellaneous tests +$(CUDACPP_BUILDDIR)/testxxx.o $(CUDACPP_BUILDDIR)/testxxx_cu.o: $(GTESTLIBS) testxxx_cc_ref.txt +$(testmain): $(CUDACPP_BUILDDIR)/testxxx.o +$(testmain): cxx_objects_exe += $(CUDACPP_BUILDDIR)/testxxx.o # Comment out this line to skip the C++ test of xxx functions +$(cutestmain): $(CUDACPP_BUILDDIR)/testxxx_cu.o +$(cutestmain): cu_objects_exe += $(CUDACPP_BUILDDIR)/testxxx_cu.o # Comment out this line to skip the CUDA test of xxx functions -ifneq ($(NVCC),) -$(BUILDDIR)/testmisc_cu.o: $(GTESTLIBS) -$(BUILDDIR)/testmisc_cu.o: INCFLAGS += $(GTESTINC) -$(testmain): $(BUILDDIR)/testmisc_cu.o -$(testmain): cu_objects_exe += $(BUILDDIR)/testmisc_cu.o # Comment out this line to skip the CUDA miscellaneous tests -endif -$(BUILDDIR)/runTest.o: $(GTESTLIBS) -$(BUILDDIR)/runTest.o: INCFLAGS += $(GTESTINC) -$(testmain): $(BUILDDIR)/runTest.o -$(testmain): cxx_objects_exe += $(BUILDDIR)/runTest.o +$(CUDACPP_BUILDDIR)/testmisc.o $(CUDACPP_BUILDDIR)/testmisc_cu.o: $(GTESTLIBS) +$(testmain): $(CUDACPP_BUILDDIR)/testmisc.o +$(testmain): cxx_objects_exe += $(CUDACPP_BUILDDIR)/testmisc.o # Comment out this line to skip the C++ miscellaneous tests +$(cutestmain): $(CUDACPP_BUILDDIR)/testmisc_cu.o +$(cutestmain): cu_objects_exe += $(CUDACPP_BUILDDIR)/testmisc_cu.o # Comment out this line to skip the CUDA miscellaneous tests + + +$(CUDACPP_BUILDDIR)/runTest.o $(CUDACPP_BUILDDIR)/runTest_cu.o: $(GTESTLIBS) +$(testmain): $(CUDACPP_BUILDDIR)/runTest.o +$(testmain): cxx_objects_exe += $(CUDACPP_BUILDDIR)/runTest.o +$(cutestmain): $(CUDACPP_BUILDDIR)/runTest_cu.o +$(cutestmain): cu_objects_exe += $(CUDACPP_BUILDDIR)/runTest_cu.o + -ifneq ($(NVCC),) -$(BUILDDIR)/runTest_cu.o: $(GTESTLIBS) -$(BUILDDIR)/runTest_cu.o: INCFLAGS += $(GTESTINC) ifneq ($(shell $(CXX) --version | grep ^Intel),) -$(testmain): LIBFLAGS += -lintlc # compile with icpx and link with nvcc (undefined reference to `_intel_fast_memcpy') -$(testmain): LIBFLAGS += -lsvml # compile with icpx and link with nvcc (undefined reference to `__svml_cos4_l9') +$(cutestmain): MG_LDFLAGS += -lintlc # compile with icpx and link with nvcc (undefined reference to `_intel_fast_memcpy') +$(cutestmain): MG_LDFLAGS += -lsvml # compile with icpx and link with nvcc (undefined reference to `__svml_cos4_l9') else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 -$(testmain): LIBFLAGS += -L$(patsubst %bin/nvc++,%lib,$(subst ccache ,,$(CXX))) -lnvhpcatm -lnvcpumath -lnvc -endif -$(testmain): $(BUILDDIR)/runTest_cu.o -$(testmain): cu_objects_exe += $(BUILDDIR)/runTest_cu.o +$(cutestmain): MG_LDFLAGS += -L$(patsubst %bin/nvc++,%lib,$(subst ccache ,,$(CXX))) -lnvhpcatm -lnvcpumath -lnvc endif -$(testmain): $(GTESTLIBS) -$(testmain): INCFLAGS += $(GTESTINC) -$(testmain): LIBFLAGS += -L$(GTESTLIBDIR) -lgtest -lgtest_main ifneq ($(OMPFLAGS),) ifneq ($(shell $(CXX) --version | egrep '^Intel'),) -$(testmain): LIBFLAGS += -liomp5 # see #578 (not '-qopenmp -static-intel' as in https://stackoverflow.com/questions/45909648) +$(testmain): MG_LDFLAGS += -liomp5 # see #578 (not '-qopenmp -static-intel' as in https://stackoverflow.com/questions/45909648) else ifneq ($(shell $(CXX) --version | egrep '^clang'),) -$(testmain): LIBFLAGS += -L $(shell dirname $(shell $(CXX) -print-file-name=libc++.so)) -lomp # see #604 +$(testmain): MG_LDFLAGS += -L $(shell dirname $(shell $(CXX) -print-file-name=libc++.so)) -lomp # see #604 ###else ifneq ($(shell $(CXX) --version | egrep '^Apple clang'),) ###$(testmain): LIBFLAGS += ???? # OMP is not supported yet by cudacpp for Apple clang (see #578 and #604) else -$(testmain): LIBFLAGS += -lgomp +$(testmain): MG_LDFLAGS += -lgomp endif endif -ifeq ($(NVCC),) # link only runTest.o -$(testmain): LIBFLAGS += $(CXXLIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH -$(testmain): $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cxx_objects_lib) $(cxx_objects_exe) $(GTESTLIBS) - $(CXX) -o $@ $(cxx_objects_lib) $(cxx_objects_exe) -ldl -pthread $(LIBFLAGS) -else # link both runTest.o and runTest_cu.o -$(testmain): LIBFLAGS += $(CULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH -$(testmain): $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cxx_objects_lib) $(cxx_objects_exe) $(cu_objects_lib) $(cu_objects_exe) $(GTESTLIBS) - $(NVCC) -o $@ $(cxx_objects_lib) $(cxx_objects_exe) $(cu_objects_lib) $(cu_objects_exe) -ldl $(LIBFLAGS) -lcuda -endif +$(testmain): MG_LDFLAGS += $(CXXLIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH +$(testmain): $(CUDACPP_LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cxx_objects_lib) $(cxx_objects_exe) $(GTESTLIBS) + $(CXX) -o $@ $(cxx_objects_lib) $(cxx_objects_exe) -L$(CUDACPP_LIBDIR) -l$(MG5AMC_COMMONLIB) -ldl -pthread $(MG_LDFLAGS) $(LDFLAGS) + +$(cutestmain): MG_LDFLAGS += $(CULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH +$(cutestmain): $(CUDACPP_LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_objects_lib) $(cu_objects_exe) $(GTESTLIBS) + $(NVCC) -o $@ $(cu_objects_lib) $(cu_objects_exe) -L$(CUDACPP_LIBDIR) -l$(MG5AMC_COMMONLIB) -ldl -lcuda $(MG_LDFLAGS) $(LDFLAGS) # Use target gtestlibs to build only googletest ifneq ($(GTESTLIBS),) @@ -731,72 +324,15 @@ endif # Use flock (Linux only, no Mac) to allow 'make -j' if googletest has not yet been downloaded https://stackoverflow.com/a/32666215 $(GTESTLIBS): ifneq ($(shell which flock 2>/dev/null),) - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - flock $(BUILDDIR)/.make_test.lock $(MAKE) -C $(TESTDIR) + flock $(TESTDIR)/.make_test.lock $(MAKE) -C $(TESTDIR) else if [ -d $(TESTDIR) ]; then $(MAKE) -C $(TESTDIR); fi endif #------------------------------------------------------------------------------- -# Target: build all targets in all AVX modes (each AVX mode in a separate build directory) -# Split the avxall target into five separate targets to allow parallel 'make -j avxall' builds -# (Hack: add a fbridge.inc dependency to avxall, to ensure it is only copied once for all AVX modes) -avxnone: - @echo - $(MAKE) USEBUILDDIR=1 AVX=none -f $(CUDACPP_MAKEFILE) - -avxsse4: - @echo - $(MAKE) USEBUILDDIR=1 AVX=sse4 -f $(CUDACPP_MAKEFILE) - -avxavx2: - @echo - $(MAKE) USEBUILDDIR=1 AVX=avx2 -f $(CUDACPP_MAKEFILE) - -avx512y: - @echo - $(MAKE) USEBUILDDIR=1 AVX=512y -f $(CUDACPP_MAKEFILE) - -avx512z: - @echo - $(MAKE) USEBUILDDIR=1 AVX=512z -f $(CUDACPP_MAKEFILE) - -ifeq ($(UNAME_P),ppc64le) -###avxall: $(INCDIR)/fbridge.inc avxnone avxsse4 -avxall: avxnone avxsse4 -else ifeq ($(UNAME_P),arm) -###avxall: $(INCDIR)/fbridge.inc avxnone avxsse4 -avxall: avxnone avxsse4 -else -###avxall: $(INCDIR)/fbridge.inc avxnone avxsse4 avxavx2 avx512y avx512z -avxall: avxnone avxsse4 avxavx2 avx512y avx512z -endif - -#------------------------------------------------------------------------------- - -# Target: clean the builds -.PHONY: clean - -clean: -ifeq ($(USEBUILDDIR),1) - rm -rf $(BUILDDIR) -else - rm -f $(BUILDDIR)/.build.* $(BUILDDIR)/*.o $(BUILDDIR)/*.exe - rm -f $(LIBDIR)/lib$(MG5AMC_CXXLIB).so $(LIBDIR)/lib$(MG5AMC_CULIB).so -endif - $(MAKE) -C ../../src clean -f $(CUDACPP_SRC_MAKEFILE) -### rm -rf $(INCDIR) - -cleanall: - @echo - $(MAKE) USEBUILDDIR=0 clean -f $(CUDACPP_MAKEFILE) - @echo - $(MAKE) USEBUILDDIR=0 -C ../../src cleanall -f $(CUDACPP_SRC_MAKEFILE) - rm -rf build.* - # Target: clean the builds as well as the gtest installation(s) -distclean: cleanall +distclean: clean cleansrc ifneq ($(wildcard $(TESTDIRCOMMON)),) $(MAKE) -C $(TESTDIRCOMMON) clean endif @@ -848,50 +384,55 @@ endif #------------------------------------------------------------------------------- -# Target: check (run the C++ test executable) +# Target: check/gcheck (run the C++ test executable) # [NB THIS IS WHAT IS USED IN THE GITHUB CI!] -ifneq ($(NVCC),) -check: runTest cmpFcheck cmpFGcheck -else check: runTest cmpFcheck -endif +gcheck: + $(MAKE) AVX=cuda runTest cmpFGcheck # Target: runTest (run the C++ test executable runTest.exe) -runTest: all.$(TAG) - $(RUNTIME) $(BUILDDIR)/runTest.exe +ifneq ($(AVX),cuda) +runTest: cppbuild + $(RUNTIME) $(CUDACPP_BUILDDIR)/runTest.exe +else +runTest: cudabuild + $(RUNTIME) $(CUDACPP_BUILDDIR)/runTest_cuda.exe +endif + # Target: runCheck (run the C++ standalone executable check.exe, with a small number of events) -runCheck: all.$(TAG) - $(RUNTIME) $(BUILDDIR)/check.exe -p 2 32 2 +runCheck: cppbuild + $(RUNTIME) $(CUDACPP_BUILDDIR)/check.exe -p 2 32 2 # Target: runGcheck (run the CUDA standalone executable gcheck.exe, with a small number of events) -runGcheck: all.$(TAG) - $(RUNTIME) $(BUILDDIR)/gcheck.exe -p 2 32 2 +runGcheck: AVX=cuda +runGcheck: + $(MAKE) AVX=cuda cudabuild + $(RUNTIME) $(CUDACPP_BUILDDIR)/gcheck.exe -p 2 32 2 # Target: runFcheck (run the Fortran standalone executable - with C++ MEs - fcheck.exe, with a small number of events) -runFcheck: all.$(TAG) - $(RUNTIME) $(BUILDDIR)/fcheck.exe 2 32 2 +runFcheck: cppbuild + $(RUNTIME) $(CUDACPP_BUILDDIR)/fcheck.exe 2 32 2 # Target: runFGcheck (run the Fortran standalone executable - with CUDA MEs - fgcheck.exe, with a small number of events) -runFGcheck: all.$(TAG) - $(RUNTIME) $(BUILDDIR)/fgcheck.exe 2 32 2 +runFGcheck: AVX=cuda +runFGcheck: + $(MAKE) AVX=cuda cudabuild + $(RUNTIME) $(CUDACPP_BUILDDIR)/fgcheck.exe 2 32 2 # Target: cmpFcheck (compare ME results from the C++ and Fortran with C++ MEs standalone executables, with a small number of events) -cmpFcheck: all.$(TAG) +cmpFcheck: cppbuild @echo - @echo "$(BUILDDIR)/check.exe --common -p 2 32 2" - @echo "$(BUILDDIR)/fcheck.exe 2 32 2" - @me1=$(shell $(RUNTIME) $(BUILDDIR)/check.exe --common -p 2 32 2 | grep MeanMatrix | awk '{print $$4}'); me2=$(shell $(RUNTIME) $(BUILDDIR)/fcheck.exe 2 32 2 | grep Average | awk '{print $$4}'); echo "Avg ME (C++/C++) = $${me1}"; echo "Avg ME (F77/C++) = $${me2}"; if [ "$${me2}" == "NaN" ]; then echo "ERROR! Fortran calculation (F77/C++) returned NaN"; elif [ "$${me2}" == "" ]; then echo "ERROR! Fortran calculation (F77/C++) crashed"; else python3 -c "me1=$${me1}; me2=$${me2}; reldif=abs((me2-me1)/me1); print('Relative difference =', reldif); ok = reldif <= 2E-4; print ( '%s (relative difference %s 2E-4)' % ( ('OK','<=') if ok else ('ERROR','>') ) ); import sys; sys.exit(0 if ok else 1)"; fi + @echo "$(CUDACPP_BUILDDIR)/check.exe --common -p 2 32 2" + @echo "$(CUDACPP_BUILDDIR)/fcheck.exe 2 32 2" + @me1=$(shell $(RUNTIME) $(CUDACPP_BUILDDIR)/check.exe --common -p 2 32 2 | grep MeanMatrix | awk '{print $$4}'); me2=$(shell $(RUNTIME) $(CUDACPP_BUILDDIR)/fcheck.exe 2 32 2 | grep Average | awk '{print $$4}'); echo "Avg ME (C++/C++) = $${me1}"; echo "Avg ME (F77/C++) = $${me2}"; if [ "$${me2}" == "NaN" ]; then echo "ERROR! Fortran calculation (F77/C++) returned NaN"; elif [ "$${me2}" == "" ]; then echo "ERROR! Fortran calculation (F77/C++) crashed"; else python3 -c "me1=$${me1}; me2=$${me2}; reldif=abs((me2-me1)/me1); print('Relative difference =', reldif); ok = reldif <= 2E-4; print ( '%s (relative difference %s 2E-4)' % ( ('OK','<=') if ok else ('ERROR','>') ) ); import sys; sys.exit(0 if ok else 1)"; fi # Target: cmpFGcheck (compare ME results from the CUDA and Fortran with CUDA MEs standalone executables, with a small number of events) -cmpFGcheck: all.$(TAG) +cmpFGcheck: AVX=cuda +cmpFGcheck: + $(MAKE) AVX=cuda cudabuild @echo - @echo "$(BUILDDIR)/gcheck.exe --common -p 2 32 2" - @echo "$(BUILDDIR)/fgcheck.exe 2 32 2" - @me1=$(shell $(RUNTIME) $(BUILDDIR)/gcheck.exe --common -p 2 32 2 | grep MeanMatrix | awk '{print $$4}'); me2=$(shell $(RUNTIME) $(BUILDDIR)/fgcheck.exe 2 32 2 | grep Average | awk '{print $$4}'); echo "Avg ME (C++/CUDA) = $${me1}"; echo "Avg ME (F77/CUDA) = $${me2}"; if [ "$${me2}" == "NaN" ]; then echo "ERROR! Fortran calculation (F77/CUDA) crashed"; elif [ "$${me2}" == "" ]; then echo "ERROR! Fortran calculation (F77/CUDA) crashed"; else python3 -c "me1=$${me1}; me2=$${me2}; reldif=abs((me2-me1)/me1); print('Relative difference =', reldif); ok = reldif <= 2E-4; print ( '%s (relative difference %s 2E-4)' % ( ('OK','<=') if ok else ('ERROR','>') ) ); import sys; sys.exit(0 if ok else 1)"; fi + @echo "$(CUDACPP_BUILDDIR)/gcheck.exe --common -p 2 32 2" + @echo "$(CUDACPP_BUILDDIR)/fgcheck.exe 2 32 2" + @me1=$(shell $(RUNTIME) $(CUDACPP_BUILDDIR)/gcheck.exe --common -p 2 32 2 | grep MeanMatrix | awk '{print $$4}'); me2=$(shell $(RUNTIME) $(CUDACPP_BUILDDIR)/fgcheck.exe 2 32 2 | grep Average | awk '{print $$4}'); echo "Avg ME (C++/CUDA) = $${me1}"; echo "Avg ME (F77/CUDA) = $${me2}"; if [ "$${me2}" == "NaN" ]; then echo "ERROR! Fortran calculation (F77/CUDA) crashed"; elif [ "$${me2}" == "" ]; then echo "ERROR! Fortran calculation (F77/CUDA) crashed"; else python3 -c "me1=$${me1}; me2=$${me2}; reldif=abs((me2-me1)/me1); print('Relative difference =', reldif); ok = reldif <= 2E-4; print ( '%s (relative difference %s 2E-4)' % ( ('OK','<=') if ok else ('ERROR','>') ) ); import sys; sys.exit(0 if ok else 1)"; fi -# Target: memcheck (run the CUDA standalone executable gcheck.exe with a small number of events through cuda-memcheck) -memcheck: all.$(TAG) - $(RUNTIME) $(CUDA_HOME)/bin/cuda-memcheck --check-api-memory-access yes --check-deprecated-instr yes --check-device-heap yes --demangle full --language c --leak-check full --racecheck-report all --report-api-errors all --show-backtrace yes --tool memcheck --track-unused-memory yes $(BUILDDIR)/gcheck.exe -p 2 32 2 - -#------------------------------------------------------------------------------- diff --git a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/makefile b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/makefile index d572486c2e..d229c1cf4d 100644 --- a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/makefile +++ b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/makefile @@ -1,19 +1,22 @@ SHELL := /bin/bash -include ../../Source/make_opts -FFLAGS+= -w +# Include general setup +OPTIONS_MAKEFILE := ../../Source/make_opts +include $(OPTIONS_MAKEFILE) # Enable the C preprocessor https://gcc.gnu.org/onlinedocs/gfortran/Preprocessing-Options.html -FFLAGS+= -cpp +MG_FCFLAGS += -cpp +MG_CXXFLAGS += -I. -# Compile counters with -O3 as in the cudacpp makefile (avoid being "unfair" to Fortran #740) -CXXFLAGS = -O3 -Wall -Wshadow -Wextra +all: help cppnative + +# Target if user does not specify target +help: + $(info No target specified.) + $(info Viable targets are 'cppnative' (default), 'cppnone', 'cppsse4', 'cppavx2', 'cpp512y', 'cpp512z' and 'cuda') + $(info Or 'cppall' for all C++ targets) + $(info Or 'ALL' for all C++ and cuda targets) -# Add -std=c++17 explicitly to avoid build errors on macOS -# Add -mmacosx-version-min=11.3 to avoid "ld: warning: object file was built for newer macOS version than being linked" -ifneq ($(shell $(CXX) --version | egrep '^Apple clang'),) -CXXFLAGS += -std=c++17 -mmacosx-version-min=11.3 -endif # Enable ccache if USECCACHE=1 ifeq ($(USECCACHE)$(shell echo $(CXX) | grep ccache),1) @@ -46,34 +49,25 @@ else MADLOOP_LIB = endif -LINKLIBS = $(LINK_MADLOOP_LIB) $(LINK_LOOP_LIBS) -L$(LIBDIR) -ldhelas -ldsample -lmodel -lgeneric -lpdf -lcernlib $(llhapdf) -lbias - -processid_short=$(shell basename $(CURDIR) | awk -F_ '{print $$(NF-1)"_"$$NF}') -CUDACPP_MAKEFILE=cudacpp.mk -# NB1 Using ":=" below instead of "=" is much faster (it only runs the subprocess once instead of many times) -# NB2 Use '|&' in CUDACPP_BUILDDIR to avoid confusing errors about googletest #507 -# NB3 Do not add a comment inlined "CUDACPP_BUILDDIR=$(shell ...) # comment" as otherwise a trailing space is included... -# NB4 The variables relevant to the cudacpp Makefile must be explicitly passed to $(shell...) -CUDACPP_MAKEENV:=$(shell echo '$(.VARIABLES)' | tr " " "\n" | egrep "(USEBUILDDIR|AVX|FPTYPE|HELINL|HRDCOD)") -###$(info CUDACPP_MAKEENV=$(CUDACPP_MAKEENV)) -###$(info $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))")) -CUDACPP_BUILDDIR:=$(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn 2>&1 | awk '/Building/{print $$3}' | sed s/BUILDDIR=//) -ifeq ($(CUDACPP_BUILDDIR),) -$(error CUDACPP_BUILDDIR='$(CUDACPP_BUILDDIR)' should not be empty!) -else -$(info CUDACPP_BUILDDIR='$(CUDACPP_BUILDDIR)') -endif -CUDACPP_COMMONLIB=mg5amc_common -CUDACPP_CXXLIB=mg5amc_$(processid_short)_cpp -CUDACPP_CULIB=mg5amc_$(processid_short)_cuda - +LINKLIBS = $(LINK_MADLOOP_LIB) $(LINK_LOOP_LIBS) -L$(LIBDIR) -ldhelas -ldsample -lmodel -lgeneric -lpdf -lcernlib $(llhapdf) -lbias LIBS = $(LIBDIR)libbias.$(libext) $(LIBDIR)libdhelas.$(libext) $(LIBDIR)libdsample.$(libext) $(LIBDIR)libgeneric.$(libext) $(LIBDIR)libpdf.$(libext) $(LIBDIR)libgammaUPC.$(libext) $(LIBDIR)libmodel.$(libext) $(LIBDIR)libcernlib.$(libext) $(MADLOOP_LIB) $(LOOP_LIBS) ifneq ("$(wildcard ../../Source/RUNNING)","") LINKLIBS += -lrunning - LIBS += $(LIBDIR)librunning.$(libext) + LIBS += $(LIBDIR)librunning.$(libext) endif +SOURCEDIR_GUARD:=../../Source/.timestamp_guard +# We use $(SOURCEDIR_GUARD) to figure out if Source is out of date. The Source makefile doesn't correctly +# update all files, so we need a proxy that is updated every time we run "$(MAKE) -C ../../Source". +$(SOURCEDIR_GUARD) ../../Source/discretesampler.mod &: ../../Source/*.f ../../Cards/param_card.dat ../../Cards/run_card.dat +ifneq ($(shell which flock 2>/dev/null),) + flock ../../Source/.lock -c "$(MAKE) -C ../../Source; touch $(SOURCEDIR_GUARD)" +else + $(MAKE) -C ../../Source; touch $(SOURCEDIR_GUARD) +endif + +$(LIBS): $(SOURCEDIR_GUARD) # Source files @@ -91,82 +85,83 @@ PROCESS= myamp.o genps.o unwgt.o setcuts.o get_color.o \ DSIG=driver.o $(patsubst %.f, %.o, $(filter-out auto_dsig.f, $(wildcard auto_dsig*.f))) DSIG_cudacpp=driver_cudacpp.o $(patsubst %.f, %_cudacpp.o, $(filter-out auto_dsig.f, $(wildcard auto_dsig*.f))) -SYMMETRY = symmetry.o idenparts.o +SYMMETRY = symmetry.o idenparts.o -# Binaries +# cudacpp targets: +CUDACPP_MAKEFILE := cudacpp.mk +ifneq (,$(wildcard $(CUDACPP_MAKEFILE))) +include $(CUDACPP_MAKEFILE) +endif -ifeq ($(UNAME),Darwin) -LDFLAGS += -lc++ # avoid 'Undefined symbols' for chrono::steady_clock on macOS (checked with otool -L libmg5amc_gg_ttx_cpp.so) -LDFLAGS += -mmacosx-version-min=11.3 # avoid "ld: warning: object file was built for newer macOS version than being linked" -else -LDFLAGS += -Wl,--no-relax # avoid 'failed to convert GOTPCREL relocation' error #458 (not supported on macOS) +ifeq ($(CUDACPP_BUILDDIR),) +$(error CUDACPP_BUILDDIR='$(CUDACPP_BUILDDIR)' should not be empty!) endif +CUDACPP_COMMONLIB=mg5amc_common +CUDACPP_CXXLIB := $(CUDACPP_BUILDDIR)/lib$(MG5AMC_CXXLIB).so +CUDACPP_CULIB := $(CUDACPP_BUILDDIR)/lib$(MG5AMC_CULIB).so -all: $(PROG)_fortran $(CUDACPP_BUILDDIR)/$(PROG)_cpp # also builds $(PROG)_cuda if $(CUDACPP_CULIB) exists (#503) +# Set up OpenMP if supported +OMPFLAGS ?= -fopenmp ifneq ($(shell $(CXX) --version | egrep '^Intel'),) -override OMPFLAGS = -fopenmp LINKLIBS += -liomp5 # see #578 LINKLIBS += -lintlc # undefined reference to `_intel_fast_memcpy' else ifneq ($(shell $(CXX) --version | egrep '^clang'),) -override OMPFLAGS = -fopenmp $(CUDACPP_BUILDDIR)/$(PROG)_cpp: LINKLIBS += -L $(shell dirname $(shell $(CXX) -print-file-name=libc++.so)) -lomp # see #604 else ifneq ($(shell $(CXX) --version | egrep '^Apple clang'),) -override OMPFLAGS = # OMP is not supported yet by cudacpp for Apple clang -else -override OMPFLAGS = -fopenmp +OMPFLAGS = # OMP is not supported yet by cudacpp for Apple clang endif -$(PROG)_fortran: $(PROCESS) $(DSIG) auto_dsig.o $(LIBS) $(MATRIX) counters.o ompnumthreads.o - $(FC) -o $(PROG)_fortran $(PROCESS) $(DSIG) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o $(LDFLAGS) - -$(LIBS): .libs -.libs: ../../Cards/param_card.dat ../../Cards/run_card.dat - cd ../../Source; make - touch $@ +# Binaries -$(CUDACPP_BUILDDIR)/.cudacpplibs: - $(MAKE) -f $(CUDACPP_MAKEFILE) - touch $@ +$(PROG)_fortran: $(PROCESS) $(DSIG) auto_dsig.o $(LIBS) $(MATRIX) counters.o ompnumthreads.o + $(FC) $(MG_FCFLAGS) $(FCFLAGS) -o $(PROG)_fortran $(PROCESS) $(DSIG) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o $(LDFLAGS) # On Linux, set rpath to LIBDIR to make it unnecessary to use LD_LIBRARY_PATH # Use relative paths with respect to the executables ($ORIGIN on Linux) # On Darwin, building libraries with absolute paths in LIBDIR makes this unnecessary -ifeq ($(UNAME_S),Darwin) - override LIBFLAGSRPATH = -else ifeq ($(USEBUILDDIR),1) - override LIBFLAGSRPATH = -Wl,-rpath,'$$ORIGIN/../$(LIBDIR)/$(CUDACPP_BUILDDIR)' -else - override LIBFLAGSRPATH = -Wl,-rpath,'$$ORIGIN/$(LIBDIR)' +ifneq ($(UNAME_S),Darwin) + LIBFLAGSRPATH := -Wl,-rpath,'$$ORIGIN:$$ORIGIN/../$(LIBDIR)/$(CUDACPP_BUILDDIR)' endif -.PHONY: madevent_fortran_link madevent_cuda_link madevent_cpp_link +.PHONY: madevent_fortran_link madevent_cuda_link madevent_cpp_link madevent_cppnone_link madevent_cppsse4_link madevent_cppavx2_link madevent_cpp512y_link madevent_cpp512z_link clean cleanall cleansrc madevent_fortran_link: $(PROG)_fortran rm -f $(PROG) ln -s $(PROG)_fortran $(PROG) -madevent_cpp_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp - rm -f $(PROG) - ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) +madevent_cppnone_link: AVX=none +madevent_cppnone_link: cppnone + ln -sf $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) -madevent_cuda_link: $(CUDACPP_BUILDDIR)/$(PROG)_cuda - rm -f $(PROG) - ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cuda $(PROG) +madevent_cppavx2_link: AVX=avx2 +madevent_cppavx2_link: cppavx2 + ln -sf $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) + +madevent_cpp512y_link: AVX=512y +madevent_cpp512y_link: cppavx512y + ln -sf $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) -# Building $(PROG)_cpp also builds $(PROG)_cuda if $(CUDACPP_CULIB) exists (improved patch for cpp-only builds #503) -$(CUDACPP_BUILDDIR)/$(PROG)_cpp: $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(LIBS) $(MATRIX) counters.o ompnumthreads.o $(CUDACPP_BUILDDIR)/.cudacpplibs - $(FC) -o $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o -L$(LIBDIR)/$(CUDACPP_BUILDDIR) -l$(CUDACPP_COMMONLIB) -l$(CUDACPP_CXXLIB) $(LIBFLAGSRPATH) $(LDFLAGS) - if [ -f $(LIBDIR)/$(CUDACPP_BUILDDIR)/lib$(CUDACPP_CULIB).* ]; then $(FC) -o $(CUDACPP_BUILDDIR)/$(PROG)_cuda $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o -L$(LIBDIR)/$(CUDACPP_BUILDDIR) -l$(CUDACPP_COMMONLIB) -l$(CUDACPP_CULIB) $(LIBFLAGSRPATH) $(LDFLAGS); fi +madevent_cpp512z_link: AVX=512z +madevent_cpp512z_link: cppavx512z + ln -sf $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) -$(CUDACPP_BUILDDIR)/$(PROG)_cuda: $(CUDACPP_BUILDDIR)/$(PROG)_cpp +madevent_cuda_link: AVX=cuda +madevent_cuda_link: cuda + ln -sf $(CUDACPP_BUILDDIR)/$(PROG)_cuda $(PROG) + +$(CUDACPP_BUILDDIR)/$(PROG)_cpp: $(LIBS) $(CUDACPP_CXXLIB) $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) counters.o ompnumthreads.o + $(FC) -o $(CUDACPP_BUILDDIR)/$(PROG)_cpp -L$(LIBDIR)/$(CUDACPP_BUILDDIR) -l$(CUDACPP_COMMONLIB) $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o -L$(CUDACPP_BUILDDIR) -l$(MG5AMC_CXXLIB) $(LIBFLAGSRPATH) $(MG_LDFLAGS) $(LDFLAGS) + +$(CUDACPP_BUILDDIR)/$(PROG)_cuda: $(LIBS) $(CUDACPP_CULIB) $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) counters.o ompnumthreads.o + $(FC) -o $(CUDACPP_BUILDDIR)/$(PROG)_cuda -L$(LIBDIR)/$(CUDACPP_BUILDDIR) -l$(CUDACPP_COMMONLIB) $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o -L$(CUDACPP_BUILDDIR) -l$(MG5AMC_CULIB) $(LIBFLAGSRPATH) $(MG_LDFLAGS) $(LDFLAGS) counters.o: counters.cc timer.h - $(CXX) $(CXXFLAGS) -c $< -o $@ + $(CXX) $(MG_CXXFLAGS) $(CXXFLAGS) -c $< -o $@ ompnumthreads.o: ompnumthreads.cc ompnumthreads.h - $(CXX) -I. $(CXXFLAGS) $(OMPFLAGS) -c $< -o $@ + $(CXX) $(MG_CXXFLAGS) $(CXXFLAGS) $(OMPFLAGS) -c $< -o $@ $(PROG)_forhel: $(PROCESS) auto_dsig.o $(LIBS) $(MATRIX_HEL) $(FC) -o $(PROG)_forhel $(PROCESS) $(MATRIX_HEL) $(LINKLIBS) $(LDFLAGS) $(BIASDEPENDENCIES) $(OMPFLAGS) @@ -174,27 +169,14 @@ $(PROG)_forhel: $(PROCESS) auto_dsig.o $(LIBS) $(MATRIX_HEL) gensym: $(SYMMETRY) configs.inc $(LIBS) $(FC) -o gensym $(SYMMETRY) -L$(LIBDIR) $(LINKLIBS) $(LDFLAGS) -###ifeq (,$(wildcard fbridge.inc)) # Pointless: fbridge.inc always exists as this is the cudacpp-modified makefile! -###$(LIBDIR)libmodel.$(libext): ../../Cards/param_card.dat -### cd ../../Source/MODEL; make -### -###$(LIBDIR)libgeneric.$(libext): ../../Cards/run_card.dat -### cd ../../Source; make -### -###$(LIBDIR)libpdf.$(libext): -### cd ../../Source/PDF; make -### -###$(LIBDIR)libgammaUPC.$(libext): -### cd ../../Source/PDF/gammaUPC; make -###endif # Add source so that the compiler finds the DiscreteSampler module. $(MATRIX): %.o: %.f - $(FC) $(FFLAGS) $(MATRIX_FLAG) -c $< -I../../Source/ -I../../Source/PDF/gammaUPC -%.o: %.f - $(FC) $(FFLAGS) -c $< -I../../Source/ -I../../Source/PDF/gammaUPC + $(FC) $(MG_FCFLAGS) $(FCFLAGS) $(MATRIX_FLAG) -c $< -I../../Source/ -I../../Source/PDF/gammaUPC +%.o $(CUDACPP_BUILDDIR)/%.o: %.f + $(FC) $(MG_FCFLAGS) $(FCFLAGS) -I../../Source/ -I../../Source/PDF/gammaUPC -c $< -o $@ %_cudacpp.o: %.f - $(FC) $(FFLAGS) -c -DMG5AMC_MEEXPORTER_CUDACPP $< -I../../Source/ $(OMPFLAGS) -o $@ + $(FC) $(MG_FCFLAGS) $(FCFLAGS) -c -DMG5AMC_MEEXPORTER_CUDACPP $< -I../../Source/ $(OMPFLAGS) -o $@ # Dependencies @@ -215,60 +197,42 @@ unwgt.o: genps.inc nexternal.inc symswap.inc cluster.inc run.inc message.inc \ initcluster.o: message.inc # Extra dependencies on discretesampler.mod +../../Source/discretesampler.mod: ../../Source/DiscreteSampler.f -auto_dsig.o: .libs -driver.o: .libs -driver_cudacpp.o: .libs -$(MATRIX): .libs -genps.o: .libs +auto_dsig.o: ../../Source/discretesampler.mod +driver.o: ../../Source/discretesampler.mod +driver_cudacpp.o: ../../Source/discretesampler.mod +$(MATRIX): ../../Source/discretesampler.mod +genps.o: ../../Source/discretesampler.mod # Cudacpp avxall targets -UNAME_P := $(shell uname -p) ifeq ($(UNAME_P),ppc64le) -avxall: avxnone avxsse4 +cppall: cppnative cppnone cppsse4 else ifeq ($(UNAME_P),arm) -avxall: avxnone avxsse4 +cppall: cppnative cppnone cppsse4 else -avxall: avxnone avxsse4 avxavx2 avx512y avx512z +cppall: cppnative cppnone cppsse4 cppavx2 cppavx512y cppavx512z endif -avxnone: $(PROG)_fortran $(DSIG_cudacpp) - @echo - $(MAKE) USEBUILDDIR=1 AVX=none - -avxsse4: $(PROG)_fortran $(DSIG_cudacpp) - @echo - $(MAKE) USEBUILDDIR=1 AVX=sse4 - -avxavx2: $(PROG)_fortran $(DSIG_cudacpp) - @echo - $(MAKE) USEBUILDDIR=1 AVX=avx2 - -avx512y: $(PROG)_fortran $(DSIG_cudacpp) - @echo - $(MAKE) USEBUILDDIR=1 AVX=512y - -avx512z: $(PROG)_fortran $(DSIG_cudacpp) - @echo - $(MAKE) USEBUILDDIR=1 AVX=512z - -###endif - -# Clean (NB: 'make clean' in Source calls 'make clean' in all P*) +ALL: cppall cuda -clean: # Clean builds: fortran in this Pn; cudacpp executables for one AVX in this Pn - $(RM) *.o gensym $(PROG) $(PROG)_fortran $(PROG)_forhel $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(CUDACPP_BUILDDIR)/$(PROG)_cuda +# Clean all architecture-specific builds: +clean: + $(RM) *.o gensym $(PROG) $(PROG)_* + $(RM) -rf build.*/*{.o,.so,.exe,.dylib,madevent_*} + @for dir in build.*; do if [ -z "$$(ls -A $${dir})" ]; then rm -r $${dir}; else echo "Not cleaning $${dir}; not empty"; fi; done -cleanavxs: clean # Clean builds: fortran in this Pn; cudacpp for all AVX in this Pn and in src - $(MAKE) -f $(CUDACPP_MAKEFILE) cleanall - rm -f $(CUDACPP_BUILDDIR)/.cudacpplibs - rm -f .libs +cleanall: cleansrc + for PROCESS in ../P[0-9]*; do $(MAKE) -C $${PROCESS} clean; done -cleanall: # Clean builds: fortran in all P* and in Source; cudacpp for all AVX in all P* and in src - make -C ../../Source cleanall - rm -rf $(LIBDIR)libbias.$(libext) - rm -f ../../Source/*.mod ../../Source/*/*.mod +# Clean one architecture-specific build +clean%: + $(RM) -r build.$*_* -distclean: cleanall # Clean all fortran and cudacpp builds as well as the googletest installation - $(MAKE) -f $(CUDACPP_MAKEFILE) distclean +# Clean common source directories (interferes with other P*) +cleansrc: + make -C ../../Source clean + $(RM) -f $(SOURCEDIR_GUARD) ../../Source/{*.mod,.lock} ../../Source/*/*.mod + $(RM) -r $(LIBDIR)libbias.$(libext) + if [ -d ../../src ]; then $(MAKE) -C ../../src -f cudacpp_src.mk clean; fi diff --git a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/runTest.cc b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/runTest.cc index d4a760a71b..734235824a 100644 --- a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/runTest.cc +++ b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/runTest.cc @@ -246,15 +246,15 @@ struct CUDATest : public CUDA_CPU_TestBase #define TESTID_CPU( s ) s##_CPU #define XTESTID_CPU( s ) TESTID_CPU( s ) #define MG_INSTANTIATE_TEST_SUITE_CPU( prefix, test_suite_name ) \ -INSTANTIATE_TEST_SUITE_P( prefix, \ - test_suite_name, \ - testing::Values( new CPUTest( MG_EPOCH_REFERENCE_FILE_NAME ) ) ); + INSTANTIATE_TEST_SUITE_P( prefix, \ + test_suite_name, \ + testing::Values( new CPUTest( MG_EPOCH_REFERENCE_FILE_NAME ) ) ); #define TESTID_GPU( s ) s##_GPU #define XTESTID_GPU( s ) TESTID_GPU( s ) #define MG_INSTANTIATE_TEST_SUITE_GPU( prefix, test_suite_name ) \ -INSTANTIATE_TEST_SUITE_P( prefix, \ - test_suite_name, \ - testing::Values( new CUDATest( MG_EPOCH_REFERENCE_FILE_NAME ) ) ); + INSTANTIATE_TEST_SUITE_P( prefix, \ + test_suite_name, \ + testing::Values( new CUDATest( MG_EPOCH_REFERENCE_FILE_NAME ) ) ); #ifdef __CUDACC__ MG_INSTANTIATE_TEST_SUITE_GPU( XTESTID_GPU( MG_EPOCH_PROCESS_ID ), MadgraphTest ); diff --git a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/testxxx.cc b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/testxxx.cc index 3361fe5aa9..1d315f6d75 100644 --- a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/testxxx.cc +++ b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/testxxx.cc @@ -40,7 +40,7 @@ namespace mg5amcCpu { std::string FPEhandlerMessage = "unknown"; int FPEhandlerIevt = -1; - inline void FPEhandler( int sig ) + inline void FPEhandler( int ) { #ifdef __CUDACC__ std::cerr << "Floating Point Exception (GPU): '" << FPEhandlerMessage << "' ievt=" << FPEhandlerIevt << std::endl; @@ -71,11 +71,10 @@ TEST( XTESTID( MG_EPOCH_PROCESS_ID ), testxxx ) constexpr bool testEvents = !dumpEvents; // run the test? constexpr fptype toleranceXXXs = std::is_same::value ? 1.E-15 : 1.E-5; // Constant parameters - constexpr int neppM = MemoryAccessMomenta::neppM; // AOSOA layout constexpr int np4 = CPPProcess::np4; - const int nevt = 32; // 12 independent tests plus 20 duplicates (need a multiple of 16 for floats '512z') - assert( nevt % neppM == 0 ); // nevt must be a multiple of neppM - assert( nevt % neppV == 0 ); // nevt must be a multiple of neppV + const int nevt = 32; // 12 independent tests plus 20 duplicates (need a multiple of 16 for floats '512z') + assert( nevt % MemoryAccessMomenta::neppM == 0 ); // nevt must be a multiple of neppM + assert( nevt % neppV == 0 ); // nevt must be a multiple of neppV // Fill in the input momenta #ifdef __CUDACC__ mg5amcGpu::PinnedHostBufferMomenta hstMomenta( nevt ); // AOSOA[npagM][npar=4][np4=4][neppM] diff --git a/epochX/cudacpp/gg_ttgg.mad/bin/internal/banner.py b/epochX/cudacpp/gg_ttgg.mad/bin/internal/banner.py index bd1517985f..b408679c2f 100755 --- a/epochX/cudacpp/gg_ttgg.mad/bin/internal/banner.py +++ b/epochX/cudacpp/gg_ttgg.mad/bin/internal/banner.py @@ -2,11 +2,11 @@ # # Copyright (c) 2011 The MadGraph5_aMC@NLO Development team and Contributors # -# This file is a part of the MadGraph5_aMC@NLO project, an application which +# This file is a part of the MadGraph5_aMC@NLO project, an application which # automatically generates Feynman diagrams and matrix elements for arbitrary # high-energy processes in the Standard Model and beyond. # -# It is subject to the MadGraph5_aMC@NLO license which should accompany this +# It is subject to the MadGraph5_aMC@NLO license which should accompany this # distribution. # # For more information, visit madgraph.phys.ucl.ac.be and amcatnlo.web.cern.ch @@ -53,7 +53,7 @@ MADEVENT = False import madgraph.various.misc as misc import madgraph.iolibs.file_writers as file_writers - import madgraph.iolibs.files as files + import madgraph.iolibs.files as files import models.check_param_card as param_card_reader from madgraph import MG5DIR, MadGraph5Error, InvalidCmd @@ -80,36 +80,36 @@ class Banner(dict): 'mgproccard': 'MGProcCard', 'mgruncard': 'MGRunCard', 'ma5card_parton' : 'MA5Card_parton', - 'ma5card_hadron' : 'MA5Card_hadron', + 'ma5card_hadron' : 'MA5Card_hadron', 'mggenerationinfo': 'MGGenerationInfo', 'mgpythiacard': 'MGPythiaCard', 'mgpgscard': 'MGPGSCard', 'mgdelphescard': 'MGDelphesCard', 'mgdelphestrigger': 'MGDelphesTrigger', 'mgshowercard': 'MGShowerCard' } - + forbid_cdata = ['initrwgt'] - + def __init__(self, banner_path=None): """ """ if isinstance(banner_path, Banner): dict.__init__(self, banner_path) self.lhe_version = banner_path.lhe_version - return + return else: dict.__init__(self) - + #Look at the version if MADEVENT: self['mgversion'] = '#%s\n' % open(pjoin(MEDIR, 'MGMEVersion.txt')).read() else: info = misc.get_pkg_info() self['mgversion'] = info['version']+'\n' - + self.lhe_version = None - + if banner_path: self.read_banner(banner_path) @@ -123,7 +123,7 @@ def __init__(self, banner_path=None): 'mgruncard':'run_card.dat', 'mgpythiacard':'pythia_card.dat', 'mgpgscard' : 'pgs_card.dat', - 'mgdelphescard':'delphes_card.dat', + 'mgdelphescard':'delphes_card.dat', 'mgdelphestrigger':'delphes_trigger.dat', 'mg5proccard':'proc_card_mg5.dat', 'mgproccard': 'proc_card.dat', @@ -137,10 +137,10 @@ def __init__(self, banner_path=None): 'mgshowercard':'shower_card.dat', 'pythia8':'pythia8_card.dat', 'ma5card_parton':'madanalysis5_parton_card.dat', - 'ma5card_hadron':'madanalysis5_hadron_card.dat', + 'ma5card_hadron':'madanalysis5_hadron_card.dat', 'run_settings':'' } - + def read_banner(self, input_path): """read a banner""" @@ -151,7 +151,7 @@ def read_banner(self, input_path): def split_iter(string): return (x.groups(0)[0] for x in re.finditer(r"([^\n]*\n)", string, re.DOTALL)) input_path = split_iter(input_path) - + text = '' store = False for line in input_path: @@ -170,13 +170,13 @@ def split_iter(string): text += line else: text += '%s%s' % (line, '\n') - - #reaching end of the banner in a event file avoid to read full file + + #reaching end of the banner in a event file avoid to read full file if "
" in line: break elif "" in line: break - + def __getattribute__(self, attr): """allow auto-build for the run_card/param_card/... """ try: @@ -187,23 +187,23 @@ def __getattribute__(self, attr): return self.charge_card(attr) - + def change_lhe_version(self, version): """change the lhe version associate to the banner""" - + version = float(version) if version < 3: version = 1 elif version > 3: raise Exception("Not Supported version") self.lhe_version = version - + def get_cross(self, witherror=False): """return the cross-section of the file""" if "init" not in self: raise Exception - + text = self["init"].split('\n') cross = 0 error = 0 @@ -217,13 +217,13 @@ def get_cross(self, witherror=False): return cross else: return cross, math.sqrt(error) - + def scale_init_cross(self, ratio): """modify the init information with the associate scale""" assert "init" in self - + all_lines = self["init"].split('\n') new_data = [] new_data.append(all_lines[0]) @@ -231,29 +231,29 @@ def scale_init_cross(self, ratio): line = all_lines[i] split = line.split() if len(split) == 4: - xsec, xerr, xmax, pid = split + xsec, xerr, xmax, pid = split else: new_data += all_lines[i:] break pid = int(pid) - + line = " %+13.7e %+13.7e %+13.7e %i" % \ (ratio*float(xsec), ratio* float(xerr), ratio*float(xmax), pid) new_data.append(line) self['init'] = '\n'.join(new_data) - + def get_pdg_beam(self): """return the pdg of each beam""" - + assert "init" in self - + all_lines = self["init"].split('\n') pdg1,pdg2,_ = all_lines[0].split(None, 2) return int(pdg1), int(pdg2) - + def load_basic(self, medir): """ Load the proc_card /param_card and run_card """ - + self.add(pjoin(medir,'Cards', 'param_card.dat')) self.add(pjoin(medir,'Cards', 'run_card.dat')) if os.path.exists(pjoin(medir, 'SubProcesses', 'procdef_mg5.dat')): @@ -261,29 +261,29 @@ def load_basic(self, medir): self.add(pjoin(medir,'Cards', 'proc_card_mg5.dat')) else: self.add(pjoin(medir,'Cards', 'proc_card.dat')) - + def change_seed(self, seed): """Change the seed value in the banner""" # 0 = iseed p = re.compile(r'''^\s*\d+\s*=\s*iseed''', re.M) new_seed_str = " %s = iseed" % seed self['mgruncard'] = p.sub(new_seed_str, self['mgruncard']) - + def add_generation_info(self, cross, nb_event): """add info on MGGeneration""" - + text = """ # Number of Events : %s # Integrated weight (pb) : %s """ % (nb_event, cross) self['MGGenerationInfo'] = text - + ############################################################################ # SPLIT BANNER ############################################################################ def split(self, me_dir, proc_card=True): """write the banner in the Cards directory. - proc_card argument is present to avoid the overwrite of proc_card + proc_card argument is present to avoid the overwrite of proc_card information""" for tag, text in self.items(): @@ -305,37 +305,37 @@ def check_pid(self, pid2label): """special routine removing width/mass of particles not present in the model This is usefull in case of loop model card, when we want to use the non loop model.""" - + if not hasattr(self, 'param_card'): self.charge_card('slha') - + for tag in ['mass', 'decay']: block = self.param_card.get(tag) for data in block: pid = data.lhacode[0] - if pid not in list(pid2label.keys()): + if pid not in list(pid2label.keys()): block.remove((pid,)) def get_lha_strategy(self): """get the lha_strategy: how the weight have to be handle by the shower""" - + if not self["init"]: raise Exception("No init block define") - + data = self["init"].split('\n')[0].split() if len(data) != 10: misc.sprint(len(data), self['init']) raise Exception("init block has a wrong format") return int(float(data[-2])) - + def set_lha_strategy(self, value): """set the lha_strategy: how the weight have to be handle by the shower""" - + if not (-4 <= int(value) <= 4): six.reraise(Exception, "wrong value for lha_strategy", value) if not self["init"]: raise Exception("No init block define") - + all_lines = self["init"].split('\n') data = all_lines[0].split() if len(data) != 10: @@ -351,13 +351,13 @@ def modify_init_cross(self, cross, allow_zero=False): assert isinstance(cross, dict) # assert "all" in cross assert "init" in self - + cross = dict(cross) for key in cross.keys(): if isinstance(key, str) and key.isdigit() and int(key) not in cross: cross[int(key)] = cross[key] - - + + all_lines = self["init"].split('\n') new_data = [] new_data.append(all_lines[0]) @@ -365,7 +365,7 @@ def modify_init_cross(self, cross, allow_zero=False): line = all_lines[i] split = line.split() if len(split) == 4: - xsec, xerr, xmax, pid = split + xsec, xerr, xmax, pid = split else: new_data += all_lines[i:] break @@ -383,23 +383,23 @@ def modify_init_cross(self, cross, allow_zero=False): (float(cross[pid]), ratio* float(xerr), ratio*float(xmax), pid) new_data.append(line) self['init'] = '\n'.join(new_data) - + ############################################################################ # WRITE BANNER ############################################################################ def write(self, output_path, close_tag=True, exclude=[]): """write the banner""" - + if isinstance(output_path, str): ff = open(output_path, 'w') else: ff = output_path - + if MADEVENT: header = open(pjoin(MEDIR, 'Source', 'banner_header.txt')).read() else: header = open(pjoin(MG5DIR,'Template', 'LO', 'Source', 'banner_header.txt')).read() - + if not self.lhe_version: self.lhe_version = self.get('run_card', 'lhe_version', default=1.0) if float(self.lhe_version) < 3: @@ -412,7 +412,7 @@ def write(self, output_path, close_tag=True, exclude=[]): for tag in [t for t in self.ordered_items if t in list(self.keys())]+ \ [t for t in self.keys() if t not in self.ordered_items]: - if tag in ['init'] or tag in exclude: + if tag in ['init'] or tag in exclude: continue capitalized_tag = self.capitalized_items[tag] if tag in self.capitalized_items else tag start_data, stop_data = '', '' @@ -422,19 +422,19 @@ def write(self, output_path, close_tag=True, exclude=[]): stop_data = ']]>\n' out = '<%(tag)s>%(start_data)s\n%(text)s\n%(stop_data)s\n' % \ {'tag':capitalized_tag, 'text':self[tag].strip(), - 'start_data': start_data, 'stop_data':stop_data} + 'start_data': start_data, 'stop_data':stop_data} try: ff.write(out) except: ff.write(out.encode('utf-8')) - - + + if not '/header' in exclude: out = '\n' try: ff.write(out) except: - ff.write(out.encode('utf-8')) + ff.write(out.encode('utf-8')) if 'init' in self and not 'init' in exclude: text = self['init'] @@ -444,22 +444,22 @@ def write(self, output_path, close_tag=True, exclude=[]): ff.write(out) except: ff.write(out.encode('utf-8')) - + if close_tag: - out = '\n' + out = '\n' try: ff.write(out) except: - ff.write(out.encode('utf-8')) + ff.write(out.encode('utf-8')) return ff - - + + ############################################################################ # BANNER ############################################################################ def add(self, path, tag=None): """Add the content of the file to the banner""" - + if not tag: card_name = os.path.basename(path) if 'param_card' in card_name: @@ -505,33 +505,33 @@ def add_text(self, tag, text): if tag == 'param_card': tag = 'slha' elif tag == 'run_card': - tag = 'mgruncard' + tag = 'mgruncard' elif tag == 'proc_card': - tag = 'mg5proccard' + tag = 'mg5proccard' elif tag == 'shower_card': tag = 'mgshowercard' elif tag == 'FO_analyse_card': tag = 'foanalyse' - + self[tag.lower()] = text - - + + def charge_card(self, tag): """Build the python object associated to the card""" - + if tag in ['param_card', 'param']: tag = 'slha' elif tag in ['run_card', 'run']: - tag = 'mgruncard' + tag = 'mgruncard' elif tag == 'proc_card': - tag = 'mg5proccard' + tag = 'mg5proccard' elif tag == 'shower_card': tag = 'mgshowercard' elif tag == 'FO_analyse_card': tag = 'foanalyse' assert tag in ['slha', 'mgruncard', 'mg5proccard', 'mgshowercard', 'foanalyse'], 'invalid card %s' % tag - + if tag == 'slha': param_card = self[tag].split('\n') self.param_card = param_card_reader.ParamCard(param_card) @@ -544,56 +544,56 @@ def charge_card(self, tag): self.proc_card = ProcCard(proc_card) return self.proc_card elif tag =='mgshowercard': - shower_content = self[tag] + shower_content = self[tag] if MADEVENT: import internal.shower_card as shower_card else: import madgraph.various.shower_card as shower_card self.shower_card = shower_card.ShowerCard(shower_content, True) - # set testing to false (testing = true allow to init using + # set testing to false (testing = true allow to init using # the card content instead of the card path" self.shower_card.testing = False return self.shower_card elif tag =='foanalyse': - analyse_content = self[tag] + analyse_content = self[tag] if MADEVENT: import internal.FO_analyse_card as FO_analyse_card else: import madgraph.various.FO_analyse_card as FO_analyse_card - # set testing to false (testing = true allow to init using + # set testing to false (testing = true allow to init using # the card content instead of the card path" self.FOanalyse_card = FO_analyse_card.FOAnalyseCard(analyse_content, True) self.FOanalyse_card.testing = False return self.FOanalyse_card - + def get_detail(self, tag, *arg, **opt): """return a specific """ - + if tag in ['param_card', 'param']: tag = 'slha' attr_tag = 'param_card' elif tag in ['run_card', 'run']: - tag = 'mgruncard' + tag = 'mgruncard' attr_tag = 'run_card' elif tag == 'proc_card': - tag = 'mg5proccard' + tag = 'mg5proccard' attr_tag = 'proc_card' elif tag == 'model': - tag = 'mg5proccard' + tag = 'mg5proccard' attr_tag = 'proc_card' arg = ('model',) elif tag == 'generate': - tag = 'mg5proccard' + tag = 'mg5proccard' attr_tag = 'proc_card' arg = ('generate',) elif tag == 'shower_card': tag = 'mgshowercard' attr_tag = 'shower_card' assert tag in ['slha', 'mgruncard', 'mg5proccard', 'shower_card'], '%s not recognized' % tag - + if not hasattr(self, attr_tag): - self.charge_card(attr_tag) + self.charge_card(attr_tag) card = getattr(self, attr_tag) if len(arg) == 0: @@ -613,7 +613,7 @@ def get_detail(self, tag, *arg, **opt): if 'default' in opt: return opt['default'] else: - raise + raise elif len(arg) == 2 and tag == 'slha': try: return card[arg[0]].get(arg[1:]) @@ -621,15 +621,15 @@ def get_detail(self, tag, *arg, **opt): if 'default' in opt: return opt['default'] else: - raise + raise elif len(arg) == 0: return card else: raise Exception("Unknow command") - + #convenient alias get = get_detail - + def set(self, tag, *args): """modify one of the cards""" @@ -637,27 +637,27 @@ def set(self, tag, *args): tag = 'slha' attr_tag = 'param_card' elif tag == 'run_card': - tag = 'mgruncard' + tag = 'mgruncard' attr_tag = 'run_card' elif tag == 'proc_card': - tag = 'mg5proccard' + tag = 'mg5proccard' attr_tag = 'proc_card' elif tag == 'model': - tag = 'mg5proccard' + tag = 'mg5proccard' attr_tag = 'proc_card' arg = ('model',) elif tag == 'generate': - tag = 'mg5proccard' + tag = 'mg5proccard' attr_tag = 'proc_card' arg = ('generate',) elif tag == 'shower_card': tag = 'mgshowercard' attr_tag = 'shower_card' assert tag in ['slha', 'mgruncard', 'mg5proccard', 'shower_card'], 'not recognized' - + if not hasattr(self, attr_tag): - self.charge_card(attr_tag) - + self.charge_card(attr_tag) + card = getattr(self, attr_tag) if len(args) ==2: if tag == 'mg5proccard': @@ -666,20 +666,20 @@ def set(self, tag, *args): card[args[0]] = args[1] else: card[args[:-1]] = args[-1] - - + + @misc.multiple_try() def add_to_file(self, path, seed=None, out=None): """Add the banner to a file and change the associate seed in the banner""" if seed is not None: self.set("run_card", "iseed", seed) - + if not out: path_out = "%s.tmp" % path else: path_out = out - + ff = self.write(path_out, close_tag=False, exclude=['MGGenerationInfo', '/header', 'init']) ff.write("## END BANNER##\n") @@ -698,44 +698,44 @@ def add_to_file(self, path, seed=None, out=None): files.mv(path_out, path) - + def split_banner(banner_path, me_dir, proc_card=True): """a simple way to split a banner""" - + banner = Banner(banner_path) banner.split(me_dir, proc_card) - + def recover_banner(results_object, level, run=None, tag=None): """as input we receive a gen_crossxhtml.AllResults object. This define the current banner and load it """ - + if not run: - try: - _run = results_object.current['run_name'] - _tag = results_object.current['tag'] + try: + _run = results_object.current['run_name'] + _tag = results_object.current['tag'] except Exception: return Banner() else: _run = run if not tag: - try: - _tag = results_object[run].tags[-1] + try: + _tag = results_object[run].tags[-1] except Exception as error: if os.path.exists( pjoin(results_object.path,'Events','%s_banner.txt' % (run))): tag = None else: - return Banner() + return Banner() else: _tag = tag - - path = results_object.path - if tag: + + path = results_object.path + if tag: banner_path = pjoin(path,'Events',run,'%s_%s_banner.txt' % (run, tag)) else: banner_path = pjoin(results_object.path,'Events','%s_banner.txt' % (run)) - + if not os.path.exists(banner_path): if level != "parton" and tag != _tag: return recover_banner(results_object, level, _run, results_object[_run].tags[0]) @@ -754,12 +754,12 @@ def recover_banner(results_object, level, run=None, tag=None): return Banner(lhe.banner) # security if the banner was remove (or program canceled before created it) - return Banner() - + return Banner() + banner = Banner(banner_path) - - - + + + if level == 'pythia': if 'mgpythiacard' in banner: del banner['mgpythiacard'] @@ -768,13 +768,13 @@ def recover_banner(results_object, level, run=None, tag=None): if tag in banner: del banner[tag] return banner - + class InvalidRunCard(InvalidCmd): pass class ProcCard(list): """Basic Proccard object""" - + history_header = \ '#************************************************************\n' + \ '#* MadGraph5_aMC@NLO *\n' + \ @@ -798,10 +798,10 @@ class ProcCard(list): '#* run as ./bin/mg5_aMC filename *\n' + \ '#* *\n' + \ '#************************************************************\n' - - - - + + + + def __init__(self, init=None): """ initialize a basic proc_card""" self.info = {'model': 'sm', 'generate':None, @@ -810,13 +810,13 @@ def __init__(self, init=None): if init: self.read(init) - + def read(self, init): """read the proc_card and save the information""" - + if isinstance(init, str): #path to file init = open(init, 'r') - + store_line = '' for line in init: line = line.rstrip() @@ -828,28 +828,28 @@ def read(self, init): store_line = "" if store_line: raise Exception("WRONG CARD FORMAT") - - + + def move_to_last(self, cmd): """move an element to the last history.""" for line in self[:]: if line.startswith(cmd): self.remove(line) list.append(self, line) - + def append(self, line): """"add a line in the proc_card perform automatically cleaning""" - + line = line.strip() cmds = line.split() if len(cmds) == 0: return - + list.append(self, line) - + # command type: cmd = cmds[0] - + if cmd == 'output': # Remove previous outputs from history self.clean(allow_for_removal = ['output'], keep_switch=True, @@ -875,7 +875,7 @@ def append(self, line): elif cmds[1] == 'proc_v4': #full cleaning self[:] = [] - + def clean(self, to_keep=['set','add','load'], remove_bef_last=None, @@ -884,13 +884,13 @@ def clean(self, to_keep=['set','add','load'], keep_switch=False): """Remove command in arguments from history. All command before the last occurrence of 'remove_bef_last' - (including it) will be removed (but if another options tells the opposite). + (including it) will be removed (but if another options tells the opposite). 'to_keep' is a set of line to always keep. - 'to_remove' is a set of line to always remove (don't care about remove_bef_ + 'to_remove' is a set of line to always remove (don't care about remove_bef_ status but keep_switch acts.). - if 'allow_for_removal' is define only the command in that list can be + if 'allow_for_removal' is define only the command in that list can be remove of the history for older command that remove_bef_lb1. all parameter - present in to_remove are always remove even if they are not part of this + present in to_remove are always remove even if they are not part of this list. keep_switch force to keep the statement remove_bef_??? which changes starts the removal mode. @@ -900,8 +900,8 @@ def clean(self, to_keep=['set','add','load'], if __debug__ and allow_for_removal: for arg in to_keep: assert arg not in allow_for_removal - - + + nline = -1 removal = False #looping backward @@ -912,7 +912,7 @@ def clean(self, to_keep=['set','add','load'], if not removal and remove_bef_last: if self[nline].startswith(remove_bef_last): removal = True - switch = True + switch = True # if this is the switch and is protected pass to the next element if switch and keep_switch: @@ -923,12 +923,12 @@ def clean(self, to_keep=['set','add','load'], if any([self[nline].startswith(arg) for arg in to_remove]): self.pop(nline) continue - + # Only if removal mode is active! if removal: if allow_for_removal: # Only a subset of command can be removed - if any([self[nline].startswith(arg) + if any([self[nline].startswith(arg) for arg in allow_for_removal]): self.pop(nline) continue @@ -936,10 +936,10 @@ def clean(self, to_keep=['set','add','load'], # All command have to be remove but protected self.pop(nline) continue - + # update the counter to pass to the next element nline -= 1 - + def get(self, tag, default=None): if isinstance(tag, int): list.__getattr__(self, tag) @@ -954,32 +954,32 @@ def get(self, tag, default=None): except ValueError: name, content = line[7:].split(None,1) out.append((name, content)) - return out + return out else: return self.info[tag] - + def write(self, path): """write the proc_card to a given path""" - + fsock = open(path, 'w') fsock.write(self.history_header) for line in self: while len(line) > 70: - sub, line = line[:70]+"\\" , line[70:] + sub, line = line[:70]+"\\" , line[70:] fsock.write(sub+"\n") else: fsock.write(line+"\n") - -class InvalidCardEdition(InvalidCmd): pass - + +class InvalidCardEdition(InvalidCmd): pass + class ConfigFile(dict): """ a class for storing/dealing with input file. - """ + """ def __init__(self, finput=None, **opt): """initialize a new instance. input can be an instance of MadLoopParam, - a file, a path to a file, or simply Nothing""" - + a file, a path to a file, or simply Nothing""" + if isinstance(finput, self.__class__): dict.__init__(self) for key in finput.__dict__: @@ -989,7 +989,7 @@ def __init__(self, finput=None, **opt): return else: dict.__init__(self) - + # Initialize it with all the default value self.user_set = set() self.auto_set = set() @@ -1000,15 +1000,15 @@ def __init__(self, finput=None, **opt): self.comments = {} # comment associated to parameters. can be display via help message # store the valid options for a given parameter. self.allowed_value = {} - + self.default_setup() self.plugin_input(finput) - + # if input is define read that input if isinstance(finput, (file, str, StringIO.StringIO)): self.read(finput, **opt) - + @@ -1028,7 +1028,7 @@ def __add__(self, other): base = self.__class__(self) #base = copy.copy(self) base.update((key.lower(),value) for key, value in other.items()) - + return base def __radd__(self, other): @@ -1036,26 +1036,26 @@ def __radd__(self, other): new = copy.copy(other) new.update((key, value) for key, value in self.items()) return new - + def __contains__(self, key): return dict.__contains__(self, key.lower()) def __iter__(self): - + for name in super(ConfigFile, self).__iter__(): yield self.lower_to_case[name.lower()] - - + + #iter = super(ConfigFile, self).__iter__() #misc.sprint(iter) #return (self.lower_to_case[name] for name in iter) - + def keys(self): return [name for name in self] - + def items(self): return [(name,self[name]) for name in self] - + @staticmethod def warn(text, level, raiseerror=False): """convenient proxy to raiseerror/print warning""" @@ -1071,11 +1071,11 @@ def warn(text, level, raiseerror=False): log = lambda t: logger.log(level, t) elif level: log = level - + return log(text) def post_set(self, name, value, change_userdefine, raiseerror): - + if value is None: value = self[name] @@ -1087,25 +1087,25 @@ def post_set(self, name, value, change_userdefine, raiseerror): return getattr(self, 'post_set_%s' % name)(value, change_userdefine, raiseerror) else: raise - + def __setitem__(self, name, value, change_userdefine=False,raiseerror=False): """set the attribute and set correctly the type if the value is a string. change_userdefine on True if we have to add the parameter in user_set """ - + if not len(self): #Should never happen but when deepcopy/pickle self.__init__() - + name = name.strip() - lower_name = name.lower() - + lower_name = name.lower() + # 0. check if this parameter is a system only one if change_userdefine and lower_name in self.system_only: text='%s is a private entry which can not be modify by the user. Keep value at %s' % (name,self[name]) self.warn(text, 'critical', raiseerror) return - + #1. check if the parameter is set to auto -> pass it to special if lower_name in self: targettype = type(dict.__getitem__(self, lower_name)) @@ -1115,22 +1115,22 @@ def __setitem__(self, name, value, change_userdefine=False,raiseerror=False): self.user_set.remove(lower_name) #keep old value. self.post_set(lower_name, 'auto', change_userdefine, raiseerror) - return + return elif lower_name in self.auto_set: self.auto_set.remove(lower_name) - + # 2. Find the type of the attribute that we want if lower_name in self.list_parameter: targettype = self.list_parameter[lower_name] - - - + + + if isinstance(value, str): # split for each comma/space value = value.strip() if value.startswith('[') and value.endswith(']'): value = value[1:-1] - #do not perform split within a " or ' block + #do not perform split within a " or ' block data = re.split(r"((? bad input dropped.append(val) - + if not new_values: text= "value '%s' for entry '%s' is not valid. Preserving previous value: '%s'.\n" \ % (value, name, self[lower_name]) text += "allowed values are any list composed of the following entries: %s" % ', '.join([str(i) for i in self.allowed_value[lower_name]]) - return self.warn(text, 'warning', raiseerror) - elif dropped: + return self.warn(text, 'warning', raiseerror) + elif dropped: text = "some value for entry '%s' are not valid. Invalid items are: '%s'.\n" \ % (name, dropped) text += "value will be set to %s" % new_values - text += "allowed items in the list are: %s" % ', '.join([str(i) for i in self.allowed_value[lower_name]]) + text += "allowed items in the list are: %s" % ', '.join([str(i) for i in self.allowed_value[lower_name]]) self.warn(text, 'warning') values = new_values # make the assignment - dict.__setitem__(self, lower_name, values) + dict.__setitem__(self, lower_name, values) if change_userdefine: self.user_set.add(lower_name) #check for specific action - return self.post_set(lower_name, None, change_userdefine, raiseerror) + return self.post_set(lower_name, None, change_userdefine, raiseerror) elif lower_name in self.dict_parameter: - targettype = self.dict_parameter[lower_name] + targettype = self.dict_parameter[lower_name] full_reset = True #check if we just update the current dict or not - + if isinstance(value, str): value = value.strip() # allowed entry: @@ -1209,7 +1209,7 @@ def __setitem__(self, name, value, change_userdefine=False,raiseerror=False): # name , value => just add the entry # name value => just add the entry # {name1:value1, name2:value2} => full reset - + # split for each comma/space if value.startswith('{') and value.endswith('}'): new_value = {} @@ -1219,23 +1219,23 @@ def __setitem__(self, name, value, change_userdefine=False,raiseerror=False): x, y = pair.split(':') x, y = x.strip(), y.strip() if x.startswith(('"',"'")) and x.endswith(x[0]): - x = x[1:-1] + x = x[1:-1] new_value[x] = y value = new_value elif ',' in value: x,y = value.split(',') value = {x.strip():y.strip()} full_reset = False - + elif ':' in value: x,y = value.split(':') value = {x.strip():y.strip()} - full_reset = False + full_reset = False else: x,y = value.split() value = {x:y} - full_reset = False - + full_reset = False + if isinstance(value, dict): for key in value: value[key] = self.format_variable(value[key], targettype, name=name) @@ -1248,7 +1248,7 @@ def __setitem__(self, name, value, change_userdefine=False,raiseerror=False): if change_userdefine: self.user_set.add(lower_name) return self.post_set(lower_name, None, change_userdefine, raiseerror) - elif name in self: + elif name in self: targettype = type(self[name]) else: logger.debug('Trying to add argument %s in %s. ' % (name, self.__class__.__name__) +\ @@ -1256,22 +1256,22 @@ def __setitem__(self, name, value, change_userdefine=False,raiseerror=False): suggestions = [k for k in self.keys() if k.startswith(name[0].lower())] if len(suggestions)>0: logger.debug("Did you mean one of the following: %s"%suggestions) - self.add_param(lower_name, self.format_variable(UnknownType(value), + self.add_param(lower_name, self.format_variable(UnknownType(value), UnknownType, name)) self.lower_to_case[lower_name] = name if change_userdefine: self.user_set.add(lower_name) return self.post_set(lower_name, None, change_userdefine, raiseerror) - + value = self.format_variable(value, targettype, name=name) #check that the value is allowed: if lower_name in self.allowed_value and '*' not in self.allowed_value[lower_name]: valid = False allowed = self.allowed_value[lower_name] - + # check if the current value is allowed or not (set valid to True) if value in allowed: - valid=True + valid=True elif isinstance(value, str): value = value.lower().strip() allowed = [str(v).lower() for v in allowed] @@ -1279,7 +1279,7 @@ def __setitem__(self, name, value, change_userdefine=False,raiseerror=False): i = allowed.index(value) value = self.allowed_value[lower_name][i] valid=True - + if not valid: # act if not valid: text = "value '%s' for entry '%s' is not valid. Preserving previous value: '%s'.\n" \ @@ -1303,7 +1303,7 @@ def add_param(self, name, value, system=False, comment=False, typelist=None, if __debug__: if lower_name in self: raise Exception("Duplicate case for %s in %s" % (name,self.__class__)) - + dict.__setitem__(self, lower_name, value) self.lower_to_case[lower_name] = name if isinstance(value, list): @@ -1318,12 +1318,12 @@ def add_param(self, name, value, system=False, comment=False, typelist=None, elif isinstance(value, dict): allvalues = list(value.values()) if any([type(allvalues[0]) != type(v) for v in allvalues]): - raise Exception("All entry should have the same type") - self.dict_parameter[lower_name] = type(allvalues[0]) + raise Exception("All entry should have the same type") + self.dict_parameter[lower_name] = type(allvalues[0]) if '__type__' in value: del value['__type__'] dict.__setitem__(self, lower_name, value) - + if allowed and allowed != ['*']: self.allowed_value[lower_name] = allowed if lower_name in self.list_parameter: @@ -1333,8 +1333,8 @@ def add_param(self, name, value, system=False, comment=False, typelist=None, assert value in allowed or '*' in allowed #elif isinstance(value, bool) and allowed != ['*']: # self.allowed_value[name] = [True, False] - - + + if system: self.system_only.add(lower_name) if comment: @@ -1342,7 +1342,7 @@ def add_param(self, name, value, system=False, comment=False, typelist=None, def do_help(self, name): """return a minimal help for the parameter""" - + out = "## Information on parameter %s from class %s\n" % (name, self.__class__.__name__) if name.lower() in self: out += "## current value: %s (parameter should be of type %s)\n" % (self[name], type(self[name])) @@ -1351,7 +1351,7 @@ def do_help(self, name): else: out += "## Unknown for this class\n" if name.lower() in self.user_set: - out += "## This value is considered as being set by the user\n" + out += "## This value is considered as being set by the user\n" else: out += "## This value is considered as being set by the system\n" if name.lower() in self.allowed_value: @@ -1359,17 +1359,17 @@ def do_help(self, name): out += "Allowed value are: %s\n" % ','.join([str(p) for p in self.allowed_value[name.lower()]]) else: out += "Suggested value are : %s\n " % ','.join([str(p) for p in self.allowed_value[name.lower()] if p!='*']) - + logger.info(out) return out @staticmethod def guess_type_from_value(value): "try to guess the type of the string --do not use eval as it might not be safe" - + if not isinstance(value, str): return str(value.__class__.__name__) - + #use ast.literal_eval to be safe since value is untrusted # add a timeout to mitigate infinite loop, memory stack attack with misc.stdchannel_redirected(sys.stdout, os.devnull): @@ -1388,7 +1388,7 @@ def guess_type_from_value(value): @staticmethod def format_variable(value, targettype, name="unknown"): """assign the value to the attribute for the given format""" - + if isinstance(targettype, str): if targettype in ['str', 'int', 'float', 'bool']: targettype = eval(targettype) @@ -1412,7 +1412,7 @@ def format_variable(value, targettype, name="unknown"): (name, type(value), targettype, value)) else: raise InvalidCmd("Wrong input type for %s found %s and expecting %s for value %s" %\ - (name, type(value), targettype, value)) + (name, type(value), targettype, value)) else: if targettype != UnknownType: value = value.strip() @@ -1441,8 +1441,8 @@ def format_variable(value, targettype, name="unknown"): value = int(value) elif value.endswith(('k', 'M')) and value[:-1].isdigit(): convert = {'k':1000, 'M':1000000} - value =int(value[:-1]) * convert[value[-1]] - elif '/' in value or '*' in value: + value =int(value[:-1]) * convert[value[-1]] + elif '/' in value or '*' in value: try: split = re.split('(\*|/)',value) v = float(split[0]) @@ -1461,7 +1461,7 @@ def format_variable(value, targettype, name="unknown"): try: value = float(value.replace('d','e')) except ValueError: - raise InvalidCmd("%s can not be mapped to an integer" % value) + raise InvalidCmd("%s can not be mapped to an integer" % value) try: new_value = int(value) except ValueError: @@ -1471,7 +1471,7 @@ def format_variable(value, targettype, name="unknown"): value = new_value else: raise InvalidCmd("incorect input: %s need an integer for %s" % (value,name)) - + elif targettype == float: if value.endswith(('k', 'M')) and value[:-1].isdigit(): convert = {'k':1000, 'M':1000000} @@ -1496,33 +1496,33 @@ def format_variable(value, targettype, name="unknown"): value = v else: raise InvalidCmd("type %s is not handle by the card" % targettype) - + return value - - + + def __getitem__(self, name): - + lower_name = name.lower() if __debug__: if lower_name not in self: if lower_name in [key.lower() for key in self] : raise Exception("Some key are not lower case %s. Invalid use of the class!"\ % [key for key in self if key.lower() != key]) - + if lower_name in self.auto_set: return 'auto' - + return dict.__getitem__(self, name.lower()) - + get = __getitem__ def set(self, name, value, changeifuserset=True, user=False, raiseerror=False): """convenient way to change attribute. changeifuserset=False means that the value is NOT change is the value is not on default. - user=True, means that the value will be marked as modified by the user - (potentially preventing future change to the value) + user=True, means that the value will be marked as modified by the user + (potentially preventing future change to the value) """ # changeifuserset=False -> we need to check if the user force a value. @@ -1530,8 +1530,8 @@ def set(self, name, value, changeifuserset=True, user=False, raiseerror=False): if name.lower() in self.user_set: #value modified by the user -> do nothing return - self.__setitem__(name, value, change_userdefine=user, raiseerror=raiseerror) - + self.__setitem__(name, value, change_userdefine=user, raiseerror=raiseerror) + class RivetCard(ConfigFile): @@ -1706,7 +1706,7 @@ def setRelevantParamCard(self, f_params, f_relparams): yexec_dict = {} yexec_line = exec_line + "yaxis_relvar = " + self['yaxis_relvar'] exec(yexec_line, locals(), yexec_dict) - if self['yaxis_label'] == "": + if self['yaxis_label'] == "": self['yaxis_label'] = "yaxis_relvar" f_relparams.write("{0} = {1}\n".format(self['yaxis_label'], yexec_dict['yaxis_relvar'])) else: @@ -1715,11 +1715,11 @@ def setRelevantParamCard(self, f_params, f_relparams): class ProcCharacteristic(ConfigFile): """A class to handle information which are passed from MadGraph to the madevent - interface.""" - + interface.""" + def default_setup(self): """initialize the directory to the default value""" - + self.add_param('loop_induced', False) self.add_param('has_isr', False) self.add_param('has_fsr', False) @@ -1735,16 +1735,16 @@ def default_setup(self): self.add_param('pdg_initial1', [0]) self.add_param('pdg_initial2', [0]) self.add_param('splitting_types',[], typelist=str) - self.add_param('perturbation_order', [], typelist=str) - self.add_param('limitations', [], typelist=str) - self.add_param('hel_recycling', False) + self.add_param('perturbation_order', [], typelist=str) + self.add_param('limitations', [], typelist=str) + self.add_param('hel_recycling', False) self.add_param('single_color', True) - self.add_param('nlo_mixed_expansion', True) + self.add_param('nlo_mixed_expansion', True) def read(self, finput): - """Read the input file, this can be a path to a file, + """Read the input file, this can be a path to a file, a file object, a str with the content of the file.""" - + if isinstance(finput, str): if "\n" in finput: finput = finput.split('\n') @@ -1752,49 +1752,49 @@ def read(self, finput): finput = open(finput) else: raise Exception("No such file %s" % finput) - + for line in finput: if '#' in line: line = line.split('#',1)[0] if not line: continue - + if '=' in line: key, value = line.split('=',1) self[key.strip()] = value - + def write(self, outputpath): """write the file""" template ="# Information about the process #\n" template +="#########################################\n" - + fsock = open(outputpath, 'w') fsock.write(template) - + for key, value in self.items(): fsock.write(" %s = %s \n" % (key, value)) - - fsock.close() - + + fsock.close() + class GridpackCard(ConfigFile): """an object for the GridpackCard""" - + def default_setup(self): """default value for the GridpackCard""" - + self.add_param("GridRun", True) self.add_param("gevents", 2500) self.add_param("gseed", 1) - self.add_param("ngran", -1) - + self.add_param("ngran", -1) + def read(self, finput): - """Read the input file, this can be a path to a file, + """Read the input file, this can be a path to a file, a file object, a str with the content of the file.""" - + if isinstance(finput, str): if "\n" in finput: finput = finput.split('\n') @@ -1802,7 +1802,7 @@ def read(self, finput): finput = open(finput) else: raise Exception("No such file %s" % finput) - + for line in finput: line = line.split('#')[0] line = line.split('!')[0] @@ -1812,19 +1812,19 @@ def read(self, finput): self[line[1].strip()] = line[0].replace('\'','').strip() def write(self, output_file, template=None): - """Write the run_card in output_file according to template + """Write the run_card in output_file according to template (a path to a valid run_card)""" if not template: if not MADEVENT: - template = pjoin(MG5DIR, 'Template', 'LO', 'Cards', + template = pjoin(MG5DIR, 'Template', 'LO', 'Cards', 'grid_card_default.dat') else: template = pjoin(MEDIR, 'Cards', 'grid_card_default.dat') - + text = "" - for line in open(template,'r'): + for line in open(template,'r'): nline = line.split('#')[0] nline = nline.split('!')[0] comment = line[len(nline):] @@ -1832,19 +1832,19 @@ def write(self, output_file, template=None): if len(nline) != 2: text += line elif nline[1].strip() in self: - text += ' %s\t= %s %s' % (self[nline[1].strip()],nline[1], comment) + text += ' %s\t= %s %s' % (self[nline[1].strip()],nline[1], comment) else: logger.info('Adding missing parameter %s to current run_card (with default value)' % nline[1].strip()) - text += line - + text += line + if isinstance(output_file, str): fsock = open(output_file,'w') else: fsock = output_file - + fsock.write(text) fsock.close() - + class PY8Card(ConfigFile): """ Implements the Pythia8 card.""" @@ -1868,7 +1868,7 @@ def add_default_subruns(self, type): def default_setup(self): """ Sets up the list of available PY8 parameters.""" - + # Visible parameters # ================== self.add_param("Main:numberOfEvents", -1) @@ -1877,11 +1877,11 @@ def default_setup(self): self.add_param("JetMatching:qCut", -1.0, always_write_to_card=False) self.add_param("JetMatching:doShowerKt",False,always_write_to_card=False) # -1 means that it is automatically set. - self.add_param("JetMatching:nJetMax", -1, always_write_to_card=False) + self.add_param("JetMatching:nJetMax", -1, always_write_to_card=False) # for CKKWL merging self.add_param("Merging:TMS", -1.0, always_write_to_card=False) self.add_param("Merging:Process", '', always_write_to_card=False) - # -1 means that it is automatically set. + # -1 means that it is automatically set. self.add_param("Merging:nJetMax", -1, always_write_to_card=False) # for both merging, chose whether to also consider different merging # scale values for the extra weights related to scale and PDF variations. @@ -1918,10 +1918,10 @@ def default_setup(self): comment='This allows to turn on/off hadronization alltogether.') self.add_param("partonlevel:mpi", True, hidden=True, always_write_to_card=False, comment='This allows to turn on/off MPI alltogether.') - self.add_param("Beams:setProductionScalesFromLHEF", False, hidden=True, + self.add_param("Beams:setProductionScalesFromLHEF", False, hidden=True, always_write_to_card=False, comment='This parameter is automatically set to True by MG5aMC when doing MLM merging with PY8.') - + # for MLM merging self.add_param("JetMatching:merge", False, hidden=True, always_write_to_card=False, comment='Specifiy if we are merging sample of different multiplicity.') @@ -1931,9 +1931,9 @@ def default_setup(self): comment='Value of the merging scale below which one does not even write the HepMC event.') self.add_param("JetMatching:doVeto", False, hidden=True, always_write_to_card=False, comment='Do veto externally (e.g. in SysCalc).') - self.add_param("JetMatching:scheme", 1, hidden=True, always_write_to_card=False) + self.add_param("JetMatching:scheme", 1, hidden=True, always_write_to_card=False) self.add_param("JetMatching:setMad", False, hidden=True, always_write_to_card=False, - comment='Specify one must read inputs from the MadGraph banner.') + comment='Specify one must read inputs from the MadGraph banner.') self.add_param("JetMatching:coneRadius", 1.0, hidden=True, always_write_to_card=False) self.add_param("JetMatching:nQmatch",4,hidden=True, always_write_to_card=False) # for CKKWL merging (common with UMEPS, UNLOPS) @@ -1946,7 +1946,7 @@ def default_setup(self): self.add_param("Merging:applyVeto", False, hidden=True, always_write_to_card=False, comment='Do veto externally (e.g. in SysCalc).') self.add_param("Merging:includeWeightInXsection", True, hidden=True, always_write_to_card=False, - comment='If turned off, then the option belows forces PY8 to keep the original weight.') + comment='If turned off, then the option belows forces PY8 to keep the original weight.') self.add_param("Merging:muRen", 91.188, hidden=True, always_write_to_card=False, comment='Set renormalization scales of the 2->2 process.') self.add_param("Merging:muFacInME", 91.188, hidden=True, always_write_to_card=False, @@ -1958,7 +1958,7 @@ def default_setup(self): # To be added in subruns for CKKWL self.add_param("Merging:mayRemoveDecayProducts", False, hidden=True, always_write_to_card=False) self.add_param("Merging:doKTMerging", False, hidden=True, always_write_to_card=False) - self.add_param("Merging:Dparameter", 0.4, hidden=True, always_write_to_card=False) + self.add_param("Merging:Dparameter", 0.4, hidden=True, always_write_to_card=False) self.add_param("Merging:doPTLundMerging", False, hidden=True, always_write_to_card=False) # Special Pythia8 paremeters useful to simplify the shower. @@ -1975,33 +1975,33 @@ def default_setup(self): # Add parameters controlling the subruns execution flow. # These parameters should not be part of PY8SubRun daughter. self.add_default_subruns('parameters') - + def __init__(self, *args, **opts): - # Parameters which are not printed in the card unless they are - # 'user_set' or 'system_set' or part of the + # Parameters which are not printed in the card unless they are + # 'user_set' or 'system_set' or part of the # self.hidden_params_to_always_print set. self.hidden_param = [] self.hidden_params_to_always_write = set() self.visible_params_to_always_write = set() # List of parameters that should never be written out given the current context. self.params_to_never_write = set() - + # Parameters which have been set by the system (i.e. MG5 itself during # the regular course of the shower interface) self.system_set = set() - + # Add attributes controlling the subruns execution flow. # These attributes should not be part of PY8SubRun daughter. self.add_default_subruns('attributes') - - # Parameters which have been set by the + + # Parameters which have been set by the super(PY8Card, self).__init__(*args, **opts) - def add_param(self, name, value, hidden=False, always_write_to_card=True, + def add_param(self, name, value, hidden=False, always_write_to_card=True, comment=None): - """ add a parameter to the card. value is the default value and + """ add a parameter to the card. value is the default value and defines the type (int/float/bool/str) of the input. The option 'hidden' decides whether the parameter should be visible to the user. The option 'always_write_to_card' decides whether it should @@ -2017,7 +2017,7 @@ def add_param(self, name, value, hidden=False, always_write_to_card=True, self.hidden_params_to_always_write.add(name) else: if always_write_to_card: - self.visible_params_to_always_write.add(name) + self.visible_params_to_always_write.add(name) if not comment is None: if not isinstance(comment, str): raise MadGraph5Error("Option 'comment' must be a string, not"+\ @@ -2036,7 +2036,7 @@ def add_subrun(self, py8_subrun): self.subruns[py8_subrun['Main:subrun']] = py8_subrun if not 'LHEFInputs:nSubruns' in self.user_set: self['LHEFInputs:nSubruns'] = max(self.subruns.keys()) - + def userSet(self, name, value, **opts): """Set an attribute of this card, following a user_request""" self.__setitem__(name, value, change_userdefine=True, **opts) @@ -2044,10 +2044,10 @@ def userSet(self, name, value, **opts): self.system_set.remove(name.lower()) def vetoParamWriteOut(self, name): - """ Forbid the writeout of a specific parameter of this card when the + """ Forbid the writeout of a specific parameter of this card when the "write" function will be invoked.""" self.params_to_never_write.add(name.lower()) - + def systemSet(self, name, value, **opts): """Set an attribute of this card, independently of a specific user request and only if not already user_set.""" @@ -2058,7 +2058,7 @@ def systemSet(self, name, value, **opts): if force or name.lower() not in self.user_set: self.__setitem__(name, value, change_userdefine=False, **opts) self.system_set.add(name.lower()) - + def MadGraphSet(self, name, value, **opts): """ Sets a card attribute, but only if it is absent or not already user_set.""" @@ -2068,18 +2068,18 @@ def MadGraphSet(self, name, value, **opts): force = False if name.lower() not in self or (force or name.lower() not in self.user_set): self.__setitem__(name, value, change_userdefine=False, **opts) - self.system_set.add(name.lower()) - + self.system_set.add(name.lower()) + def defaultSet(self, name, value, **opts): self.__setitem__(name, value, change_userdefine=False, **opts) - + @staticmethod def pythia8_formatting(value, formatv=None): """format the variable into pythia8 card convention. The type is detected by default""" if not formatv: if isinstance(value,UnknownType): - formatv = 'unknown' + formatv = 'unknown' elif isinstance(value, bool): formatv = 'bool' elif isinstance(value, int): @@ -2095,7 +2095,7 @@ def pythia8_formatting(value, formatv=None): formatv = 'str' else: assert formatv - + if formatv == 'unknown': # No formatting then return str(value) @@ -2116,7 +2116,7 @@ def pythia8_formatting(value, formatv=None): elif formatv == 'float': return '%.10e' % float(value) elif formatv == 'shortfloat': - return '%.3f' % float(value) + return '%.3f' % float(value) elif formatv == 'str': return "%s" % value elif formatv == 'list': @@ -2124,9 +2124,9 @@ def pythia8_formatting(value, formatv=None): return ','.join([PY8Card.pythia8_formatting(arg, 'shortfloat') for arg in value]) else: return ','.join([PY8Card.pythia8_formatting(arg) for arg in value]) - - def write(self, output_file, template, read_subrun=False, + + def write(self, output_file, template, read_subrun=False, print_only_visible=False, direct_pythia_input=False, add_missing=True): """ Write the card to output_file using a specific template. > 'print_only_visible' specifies whether or not the hidden parameters @@ -2143,28 +2143,28 @@ def write(self, output_file, template, read_subrun=False, or p.lower() in self.user_set] # Filter against list of parameters vetoed for write-out visible_param = [p for p in visible_param if p.lower() not in self.params_to_never_write] - + # Now the hidden param which must be written out if print_only_visible: hidden_output_param = [] else: hidden_output_param = [p for p in self if p.lower() in self.hidden_param and not p.lower() in self.user_set and - (p.lower() in self.hidden_params_to_always_write or + (p.lower() in self.hidden_params_to_always_write or p.lower() in self.system_set)] # Filter against list of parameters vetoed for write-out hidden_output_param = [p for p in hidden_output_param if p not in self.params_to_never_write] - + if print_only_visible: subruns = [] else: if not read_subrun: subruns = sorted(self.subruns.keys()) - + # Store the subruns to write in a dictionary, with its ID in key # and the corresponding stringstream in value subruns_to_write = {} - + # Sort these parameters nicely so as to put together parameters # belonging to the same group (i.e. prefix before the ':' in their name). def group_params(params): @@ -2191,7 +2191,7 @@ def group_params(params): # First dump in a temporary_output (might need to have a second pass # at the very end to update 'LHEFInputs:nSubruns') output = StringIO.StringIO() - + # Setup template from which to read if isinstance(template, str): if os.path.isfile(template): @@ -2199,7 +2199,7 @@ def group_params(params): elif '\n' in template: tmpl = StringIO.StringIO(template) else: - raise Exception("File input '%s' not found." % file_input) + raise Exception("File input '%s' not found." % file_input) elif template is None: # Then use a dummy empty StringIO, hence skipping the reading tmpl = StringIO.StringIO() @@ -2257,8 +2257,8 @@ def group_params(params): # Remove all of its variables (so that nothing is overwritten) DummySubrun.clear() DummySubrun.write(subruns_to_write[int(value)], - tmpl, read_subrun=True, - print_only_visible=print_only_visible, + tmpl, read_subrun=True, + print_only_visible=print_only_visible, direct_pythia_input=direct_pythia_input) logger.info('Adding new unknown subrun with ID %d.'% @@ -2267,7 +2267,7 @@ def group_params(params): last_pos = tmpl.tell() line = tmpl.readline() continue - + # Change parameters which must be output if param in visible_param: new_value = PY8Card.pythia8_formatting(self[param]) @@ -2286,10 +2286,10 @@ def group_params(params): last_pos = tmpl.tell() line = tmpl.readline() continue - - # Substitute the value. + + # Substitute the value. # If it is directly the pytia input, then don't write the param if it - # is not in the list of visible_params_to_always_write and was + # is not in the list of visible_params_to_always_write and was # not user_set or system_set if ((not direct_pythia_input) or (param.lower() in self.visible_params_to_always_write) or @@ -2304,16 +2304,16 @@ def group_params(params): output.write(template%(param_entry, value_entry.replace(value,new_value))) - + # Proceed to next line last_pos = tmpl.tell() line = tmpl.readline() - + # If add_missing is False, make sure to empty the list of remaining parameters if not add_missing: visible_param = [] hidden_output_param = [] - + # Now output the missing parameters. Warn about visible ones. if len(visible_param)>0 and not template is None: output.write( @@ -2343,12 +2343,12 @@ def group_params(params): """%(' for subrun %d'%self['Main:subrun'] if 'Main:subrun' in self else '')) for param in hidden_output_param: if param.lower() in self.comments: - comment = '\n'.join('! %s'%c for c in + comment = '\n'.join('! %s'%c for c in self.comments[param.lower()].split('\n')) output.write(comment+'\n') output.write('%s=%s\n'%(param,PY8Card.pythia8_formatting(self[param]))) - - # Don't close the file if we were reading a subrun, but simply write + + # Don't close the file if we were reading a subrun, but simply write # output and return now if read_subrun: output_file.write(output.getvalue()) @@ -2382,12 +2382,12 @@ def group_params(params): out.close() else: output_file.write(output.getvalue()) - + def read(self, file_input, read_subrun=False, setter='default'): - """Read the input file, this can be a path to a file, + """Read the input file, this can be a path to a file, a file object, a str with the content of the file. - The setter option choses the authority that sets potential - modified/new parameters. It can be either: + The setter option choses the authority that sets potential + modified/new parameters. It can be either: 'default' or 'user' or 'system'""" if isinstance(file_input, str): if "\n" in file_input: @@ -2423,8 +2423,8 @@ def read(self, file_input, read_subrun=False, setter='default'): raise MadGraph5Error("Could not read line '%s' of Pythia8 card."%\ line) if '!' in value: - value,_ = value.split('!',1) - + value,_ = value.split('!',1) + # Read a subrun if detected: if param=='Main:subrun': if read_subrun: @@ -2451,7 +2451,7 @@ def read(self, file_input, read_subrun=False, setter='default'): last_pos = finput.tell() line = finput.readline() continue - + # Read parameter. The case of a parameter not defined in the card is # handled directly in ConfigFile. @@ -2478,7 +2478,7 @@ def add_default_subruns(self, type): def __init__(self, *args, **opts): """ Initialize a subrun """ - + # Force user to set it manually. subrunID = -1 if 'subrun_id' in opts: @@ -2489,7 +2489,7 @@ def __init__(self, *args, **opts): def default_setup(self): """Sets up the list of available PY8SubRun parameters.""" - + # Add all default PY8Card parameters super(PY8SubRun, self).default_setup() # Make sure they are all hidden @@ -2501,33 +2501,33 @@ def default_setup(self): self.add_param("Main:subrun", -1) self.add_param("Beams:LHEF", "events.lhe.gz") - + class RunBlock(object): """ Class for a series of parameter in the run_card that can be either visible or hidden. - name: allow to set in the default run_card $name to set where that + name: allow to set in the default run_card $name to set where that block need to be inserted template_on: information to include is block is active template_off: information to include is block is not active on_fields/off_fields: paramater associated to the block - can be specify but are otherwise automatically but + can be specify but are otherwise automatically but otherwise determined from the template. - + function: status(self,run_card) -> return which template need to be used check_validity(self, runcard) -> sanity check - create_default_for_process(self, run_card, proc_characteristic, - history, proc_def) + create_default_for_process(self, run_card, proc_characteristic, + history, proc_def) post_set_XXXX(card, value, change_userdefine, raiseerror) -> fct called when XXXXX is set post_set(card, value, change_userdefine, raiseerror, **opt) -> fct called when a parameter is changed - -> no access to parameter name + -> no access to parameter name -> not called if post_set_XXXX is defined """ - - + + def __init__(self, name, template_on, template_off, on_fields=False, off_fields=False): self.name = name @@ -2550,7 +2550,7 @@ def fields(self): def find_fields_from_template(template): """ return the list of fields from a template. checking line like %(mass_ion2)s = mass_ion2 # mass of the heavy ion (second beam) """ - + return re.findall(r"^\s*%\((.*)\)s\s*=\s*\1", template, re.M) def get_template(self, card): @@ -2565,7 +2565,7 @@ def get_unused_template(self, card): if self.status(card): return self.template_off else: - return self.template_on + return self.template_on def status(self, card): """return False if template_off to be used, True if template_on to be used""" @@ -2594,20 +2594,20 @@ def manage_parameters(self, card, written, to_write): written.add(name) if name in to_write: to_write.remove(name) - + def check_validity(self, runcard): """run self consistency check here --avoid to use runcard[''] = xxx here since it can trigger post_set function""" return def create_default_for_process(self, run_card, proc_characteristic, history, proc_def): - return + return # @staticmethod # def post_set(card, value, change_userdefine, raiseerror, **opt): # """default action to run when a parameter of the block is defined. # Here we do not know which parameter is modified. if this is needed. # then one need to define post_set_XXXXX(card, value, change_userdefine, raiseerror) -# and then only that function is used +# and then only that function is used # """ # # if 'pdlabel' in card.user_set: @@ -2621,7 +2621,7 @@ class RunCard(ConfigFile): blocks = [] parameter_in_block = {} - allowed_lep_densities = {} + allowed_lep_densities = {} default_include_file = 'run_card.inc' default_autodef_file = 'run.inc' donewarning = [] @@ -2637,7 +2637,7 @@ def plugin_input(self, finput): curr_dir = os.path.dirname(os.path.dirname(finput.name)) elif isinstance(finput, str): curr_dir = os.path.dirname(os.path.dirname(finput)) - + if curr_dir: if os.path.exists(pjoin(curr_dir, 'bin', 'internal', 'plugin_run_card')): # expected format {} passing everything as optional argument @@ -2646,7 +2646,7 @@ def plugin_input(self, finput): continue opts = dict(eval(line)) self.add_param(**opts) - + @classmethod def fill_post_set_from_blocks(cls): """set the post_set function for any parameter defined in a run_block""" @@ -2659,8 +2659,8 @@ def fill_post_set_from_blocks(cls): elif hasattr(block, 'post_set'): setattr(cls, 'post_set_%s' % parameter, block.post_set) cls.parameter_in_block[parameter] = block - - + + def __new__(cls, finput=None, **opt): cls.fill_post_set_from_blocks() @@ -2718,9 +2718,9 @@ def __new__(cls, finput=None, **opt): return super(RunCard, cls).__new__(cls, finput, **opt) def __init__(self, *args, **opts): - + # The following parameter are updated in the defaultsetup stage. - + #parameter for which no warning should be raised if not define self.hidden_param = [] # in which include file the parameer should be written @@ -2739,11 +2739,11 @@ def __init__(self, *args, **opts): self.cuts_parameter = {} # parameter added where legacy requires an older value. self.system_default = {} - + self.display_block = [] # set some block to be displayed self.fct_mod = {} # {param: (fct_pointer, *argument, **opts)} - self.cut_class = {} + self.cut_class = {} self.warned=False @@ -2776,11 +2776,11 @@ def get_lepton_densities(cls): else: cls.allowed_lep_densities[identity].append(name) - def add_param(self, name, value, fortran_name=None, include=True, + def add_param(self, name, value, fortran_name=None, include=True, hidden=False, legacy=False, cut=False, system=False, sys_default=None, autodef=False, fct_mod=None, **opts): - """ add a parameter to the card. value is the default value and + """ add a parameter to the card. value is the default value and defines the type (int/float/bool/str) of the input. fortran_name: defines what is the associate name in the f77 code include: defines if we have to put the value in the include file @@ -2795,7 +2795,7 @@ def add_param(self, name, value, fortran_name=None, include=True, fct_mod: defines a function to run if the parameter is modify in the include file options of **opts: - allowed: list of valid options. '*' means anything else should be allowed. - empty list means anything possible as well. + empty list means anything possible as well. - comment: add comment for writing/help - typelist: type of the list if default is empty """ @@ -2823,9 +2823,9 @@ def add_param(self, name, value, fortran_name=None, include=True, self.fct_mod[name] = fct_mod def read(self, finput, consistency=True, unknown_warning=True, **opt): - """Read the input file, this can be a path to a file, + """Read the input file, this can be a path to a file, a file object, a str with the content of the file.""" - + if isinstance(finput, str): if "\n" in finput: finput = finput.split('\n') @@ -2836,7 +2836,7 @@ def read(self, finput, consistency=True, unknown_warning=True, **opt): finput = open(finput) else: raise Exception("No such file %s" % finput) - + for line in finput: line = line.split('#')[0] line = line.split('!')[0] @@ -2864,8 +2864,8 @@ def add_unknown_entry(self, name, value, unknow_warning): This is based on the guess_entry_fromname for the various syntax providing input. This then call add_param accordingly. - This function does not returns anything. - """ + This function does not returns anything. + """ if name == "dsqrt_q2fact1" and not self.LO: raise InvalidRunCard("Looks like you passed a LO run_card for a NLO run. Please correct") @@ -2903,7 +2903,7 @@ def add_unknown_entry(self, name, value, unknow_warning): " The type was assigned to %s. \n"+\ " The definition of that variable will %sbe automatically added to fortran file %s\n"+\ " The value of that variable will %sbe passed to the fortran code via fortran file %s",\ - name, value, vartype if vartype != "list" else "list of %s" % opts.get('typelist').__name__, + name, value, vartype if vartype != "list" else "list of %s" % opts.get('typelist').__name__, "" if opts.get('autodef', False) else "not", "" if opts.get('autodef', False) in [True,False] else opts.get('autodef'), "" if opts.get('include', True) else "not", "" if opts.get('include', True) in [True,False] else opts.get('include')) RunCard.donewarning.append(name) @@ -2923,19 +2923,19 @@ def valid_line(self, line, tmp): return False elif line.strip().startswith('%'): parameter = line[line.find('(')+1:line.find(')')] - + try: cond = self.cuts_parameter[parameter] except KeyError: return True - - + + if template_options.get(cond, default) or cond is True: return True else: - return False + return False else: - return True + return True def reset_simd(self, old_value, new_value, name, *args, **opts): @@ -2946,28 +2946,28 @@ def make_clean(self,old_value, new_value, name, dir): raise Exception('pass make clean for ', dir) def make_Ptouch(self,old_value, new_value, name, reset): - raise Exception('pass Ptouch for ', reset) - + raise Exception('pass Ptouch for ', reset) + def write(self, output_file, template=None, python_template=False, write_hidden=False, template_options=None, **opt): - """Write the run_card in output_file according to template + """Write the run_card in output_file according to template (a path to a valid run_card)""" - to_write = set(self.user_set) + to_write = set(self.user_set) written = set() if not template: raise Exception if not template_options: template_options = collections.defaultdict(str) - + if python_template: text = open(template,'r').read() - text = text.split('\n') + text = text.split('\n') # remove if templating - text = [l if not l.startswith('#IF') else l[l.find(')# ')+2:] + text = [l if not l.startswith('#IF') else l[l.find(')# ')+2:] for l in text if self.valid_line(l, template_options)] text ='\n'.join(text) - + if python_template and not to_write: import string if self.blocks: @@ -2981,14 +2981,14 @@ def write(self, output_file, template=None, python_template=False, if not self.list_parameter: text = text % self else: - data = dict((key.lower(),value) for key, value in self.items()) + data = dict((key.lower(),value) for key, value in self.items()) for name in self.list_parameter: if self.list_parameter[name] != str: data[name] = ', '.join(str(v) for v in data[name]) else: data[name] = "['%s']" % "', '".join(str(v) for v in data[name]) text = text % data - else: + else: text = "" for line in open(template,'r'): nline = line.split('#')[0] @@ -3005,11 +3005,11 @@ def write(self, output_file, template=None, python_template=False, this_group = this_group[0] text += this_group.get_template(self) % self this_group.manage_parameters(self, written, to_write) - + elif len(nline) != 2: text += line elif nline[1].strip() in self: - + name = nline[1].strip().lower() value = self[name] if name in self.list_parameter: @@ -3026,15 +3026,15 @@ def write(self, output_file, template=None, python_template=False, else: endline = '' text += ' %s\t= %s %s%s' % (value, name, comment, endline) - written.add(name) + written.add(name) if name in to_write: to_write.remove(name) else: logger.info('Adding missing parameter %s to current %s (with default value)', (name, self.filename)) - written.add(name) - text += line + written.add(name) + text += line for b in self.blocks: if b.status(self): @@ -3057,7 +3057,7 @@ def write(self, output_file, template=None, python_template=False, else: #partial writting -> add only what is needed to_add = [] - for line in b.get_template(self).split('\n'): + for line in b.get_template(self).split('\n'): nline = line.split('#')[0] nline = nline.split('!')[0] nline = nline.split('=') @@ -3072,8 +3072,8 @@ def write(self, output_file, template=None, python_template=False, continue #already include before else: to_add.append(line % {nline[1].strip():value, name:value}) - written.add(name) - + written.add(name) + if name in to_write: to_write.remove(name) else: @@ -3095,13 +3095,13 @@ def write(self, output_file, template=None, python_template=False, text += '\n'.join(to_add) if to_write or write_hidden: - text+="""#********************************************************************* + text+="""#********************************************************************* # Additional hidden parameters #********************************************************************* -""" +""" if write_hidden: # - # do not write hidden parameter not hidden for this template + # do not write hidden parameter not hidden for this template # if python_template: written = written.union(set(re.findall('\%\((\w*)\)s', open(template,'r').read(), re.M))) @@ -3129,7 +3129,7 @@ def get_last_value_include(self, output_dir): if inc file does not exist we will return the current value (i.e. set has no change) """ - #remember that + #remember that # default_include_file is a class variable # self.includepath is on the form include_path : [list of param ] out = {} @@ -3165,7 +3165,7 @@ def get_value_from_include(self, path, list_of_params, output_dir): with open(pjoin(output_dir,path), 'r') as fsock: text = fsock.read() - + for name in list_of_params: misc.sprint(name, name in self.fortran_name) misc.sprint(self.fortran_name[name] if name in self.fortran_name[name] else name) @@ -3191,11 +3191,11 @@ def get_value_from_include(self, path, list_of_params, output_dir): misc.sprint(self.fortran_name) misc.sprint(text) raise Exception - return out + return out def get_default(self, name, default=None, log_level=None): - """return self[name] if exist otherwise default. log control if we + """return self[name] if exist otherwise default. log control if we put a warning or not if we use the default value""" lower_name = name.lower() @@ -3216,13 +3216,13 @@ def get_default(self, name, default=None, log_level=None): log_level = 20 if not default: default = dict.__getitem__(self, name.lower()) - + logger.log(log_level, '%s missed argument %s. Takes default: %s' % (self.filename, name, default)) self[name] = default return default else: - return self[name] + return self[name] def mod_inc_pdlabel(self, value): """flag pdlabel has 'dressed' if one of the special lepton PDF with beamstralung. @@ -3237,16 +3237,16 @@ def edit_dummy_fct_from_file(self, filelist, outdir): filelist is a list of input files (given by the user) containing a series of function to be placed in replacement of standard (typically dummy) functions of the code. - This use LO/NLO class attribute that defines which function name need to - be placed in which file. + This use LO/NLO class attribute that defines which function name need to + be placed in which file. First time this is used, a backup of the original file is done in order to - recover if the user remove some of those files. + recover if the user remove some of those files. The function present in the file are determined automatically via regular expression. and only that function is replaced in the associated file. - function in the filelist starting with user_ will also be include within the + function in the filelist starting with user_ will also be include within the dummy_fct.f file """ @@ -3269,7 +3269,7 @@ def edit_dummy_fct_from_file(self, filelist, outdir): fsock = file_writers.FortranWriter(tmp,'w') function_text = fsock.remove_routine(text, fct) fsock.close() - test = open(tmp,'r').read() + test = open(tmp,'r').read() if fct not in self.dummy_fct_file: if fct.startswith('user_'): self.dummy_fct_file[fct] = self.dummy_fct_file['user_'] @@ -3315,22 +3315,22 @@ def guess_entry_fromname(self, name, value): - vartype: type of the variable - name: name of the variable (stripped from metadata) - options: additional options for the add_param - rules: - - if name starts with str_, int_, float_, bool_, list_, dict_ then + rules: + - if name starts with str_, int_, float_, bool_, list_, dict_ then - vartype is set accordingly - name is strip accordingly - otherwise guessed from value (which is string) - if name contains min/max - vartype is set to float - options has an added {'cut':True} - - suffixes like + - suffixes like - will be removed from named - will be added in options (for add_param) as {'cut':True} see add_param documentation for the list of supported options - if include is on False set autodef to False (i.e. enforce it False for future change) """ - # local function + # local function def update_typelist(value, name, opts): """convert a string to a list and update opts to keep track of the type """ value = value.strip() @@ -3358,7 +3358,7 @@ def update_typelist(value, name, opts): opts[key] = val name = name.replace("<%s=%s>" %(key,val), '') - # get vartype + # get vartype # first check that name does not force it supported_type = ["str", "float", "int", "bool", "list", "dict"] if "_" in name and name.split("_")[0].lower() in supported_type: @@ -3406,13 +3406,13 @@ def f77_formatting(value, formatv=None): value = str(value).lower() else: assert formatv - + if formatv == 'bool': if str(value) in ['1','T','.true.','True']: return '.true.' else: return '.false.' - + elif formatv == 'int': try: return str(int(value)) @@ -3422,12 +3422,12 @@ def f77_formatting(value, formatv=None): return str(int(fl)) else: raise - + elif formatv == 'float': if isinstance(value, str): value = value.replace('d','e') return ('%.10e' % float(value)).replace('e','d') - + elif formatv == 'str': # Check if it is a list if value.strip().startswith('[') and value.strip().endswith(']'): @@ -3437,20 +3437,20 @@ def f77_formatting(value, formatv=None): enumerate(elements)] else: return "'%s'" % value - - + + def check_validity(self, log_level=30): """check that parameter missing in the card are set to the expected value""" for name, value in self.system_default.items(): self.set(name, value, changeifuserset=False) - + for name in self.includepath[False]: to_bypass = self.hidden_param + list(self.legacy_parameter.keys()) if name not in to_bypass: - self.get_default(name, log_level=log_level) + self.get_default(name, log_level=log_level) for name in self.legacy_parameter: if self[name] != self.legacy_parameter[name]: @@ -3458,28 +3458,28 @@ def check_validity(self, log_level=30): for block in self.blocks: block.check_validity(self) - + def update_system_parameter_for_include(self): - """update hidden system only parameter for the correct writtin in the + """update hidden system only parameter for the correct writtin in the include""" return - + def write_include_file(self, output_dir, output_file=None): """Write the various include file in output_dir. The entry True of self.includepath will be written in run_card.inc The entry False will not be written anywhere output_file allows testing by providing stream. - This also call the function to add variable definition for the - variable with autodef=True (handle by write_autodef function) + This also call the function to add variable definition for the + variable with autodef=True (handle by write_autodef function) """ - + # ensure that all parameter are coherent and fix those if needed self.check_validity() - + #ensusre that system only parameter are correctly set self.update_system_parameter_for_include() @@ -3490,10 +3490,10 @@ def write_include_file(self, output_dir, output_file=None): self.write_autodef(output_dir, output_file=None) # check/fix status of customised functions self.edit_dummy_fct_from_file(self["custom_fcts"], os.path.dirname(output_dir)) - + for incname in self.includepath: self.write_one_include_file(output_dir, incname, output_file) - + for name,value in value_in_old_include.items(): if value != self[name]: self.fct_mod[name][0](value, self[name], name, *self.fct_mod[name][1],**self.fct_mod[name][2]) @@ -3515,13 +3515,13 @@ def write_one_include_file(self, output_dir, incname, output_file=None): fsock = file_writers.FortranWriter(pjoin(output_dir,pathinc+'.tmp')) - for key in self.includepath[incname]: + for key in self.includepath[incname]: #define the fortran name if key in self.fortran_name: fortran_name = self.fortran_name[key] else: fortran_name = key - + if incname in self.include_as_parameter: fsock.writelines('INTEGER %s\n' % fortran_name) #get the value with warning if the user didn't set it @@ -3534,7 +3534,7 @@ def write_one_include_file(self, output_dir, incname, output_file=None): # in case of a list, add the length of the list as 0th # element in fortran. Only in case of integer or float # list (not for bool nor string) - targettype = self.list_parameter[key] + targettype = self.list_parameter[key] if targettype is bool: pass elif targettype is int: @@ -3550,7 +3550,7 @@ def write_one_include_file(self, output_dir, incname, output_file=None): elif isinstance(value, dict): for fortran_name, onevalue in value.items(): line = '%s = %s \n' % (fortran_name, self.f77_formatting(onevalue)) - fsock.writelines(line) + fsock.writelines(line) elif isinstance(incname,str) and 'compile' in incname: if incname in self.include_as_parameter: line = 'PARAMETER (%s=%s)' %( fortran_name, value) @@ -3585,7 +3585,7 @@ def write_autodef(self, output_dir, output_file=None): filetocheck = dict(self.definition_path) if True not in self.definition_path: filetocheck[True] = [] - + for incname in filetocheck: if incname is True: @@ -3598,7 +3598,7 @@ def write_autodef(self, output_dir, output_file=None): if output_file: fsock = output_file input = fsock.getvalue() - + else: input = open(pjoin(output_dir,pathinc),'r').read() # do not define fsock here since we might not need to overwrite it @@ -3608,7 +3608,7 @@ def write_autodef(self, output_dir, output_file=None): previous = re.findall(re_pat, input, re.M) # now check which one needed to be added (and remove those identicaly defined) to_add = [] - for key in filetocheck[incname]: + for key in filetocheck[incname]: curr_type = self[key].__class__.__name__ length = "" if curr_type in [list, "list"]: @@ -3640,10 +3640,10 @@ def write_autodef(self, output_dir, output_file=None): fsock.truncate(0) fsock.seek(0) - # remove outdated lines + # remove outdated lines lines = input.split('\n') if previous: - out = [line for line in lines if not re.search(re_pat, line, re.M) or + out = [line for line in lines if not re.search(re_pat, line, re.M) or re.search(re_pat, line, re.M).groups() not in previous] else: out = lines @@ -3662,7 +3662,7 @@ def write_autodef(self, output_dir, output_file=None): stop = out.index('C STOP USER COMMON BLOCK') out = out[:start]+ out[stop+1:] #add new common-block - if self.definition_path[incname]: + if self.definition_path[incname]: out.append("C START USER COMMON BLOCK") if isinstance(pathinc , str): filename = os.path.basename(pathinc).split('.',1)[0] @@ -3675,10 +3675,10 @@ def write_autodef(self, output_dir, output_file=None): filename = filename.upper() out.append(" COMMON/USER_CUSTOM_%s/%s" %(filename,','.join( self.definition_path[incname]))) out.append('C STOP USER COMMON BLOCK') - + if not output_file: fsock.writelines(out) - fsock.close() + fsock.close() else: # for iotest out = ["%s\n" %l for l in out] @@ -3702,7 +3702,7 @@ def get_idbmup(lpp): def get_banner_init_information(self): """return a dictionary with the information needed to write the first line of the block of the lhe file.""" - + output = {} output["idbmup1"] = self.get_idbmup(self['lpp1']) output["idbmup2"] = self.get_idbmup(self['lpp2']) @@ -3713,7 +3713,7 @@ def get_banner_init_information(self): output["pdfsup1"] = self.get_pdf_id(self["pdlabel"]) output["pdfsup2"] = self.get_pdf_id(self["pdlabel"]) return output - + def get_pdf_id(self, pdf): if pdf == "lhapdf": lhaid = self["lhaid"] @@ -3721,19 +3721,19 @@ def get_pdf_id(self, pdf): return lhaid[0] else: return lhaid - else: + else: try: return {'none': 0, 'iww': 0, 'eva':0, 'edff':0, 'chff':0, 'cteq6_m':10000,'cteq6_l':10041,'cteq6l1':10042, 'nn23lo':246800,'nn23lo1':247000,'nn23nlo':244800 - }[pdf] + }[pdf] except: - return 0 - + return 0 + def get_lhapdf_id(self): return self.get_pdf_id(self['pdlabel']) - def remove_all_cut(self): + def remove_all_cut(self): """remove all the cut""" for name in self.cuts_parameter: @@ -3749,7 +3749,7 @@ def remove_all_cut(self): elif 'eta' in name: self[name] = -1 else: - self[name] = 0 + self[name] = 0 ################################################################################################ ### Define various template subpart for the LO Run_card @@ -3767,11 +3767,11 @@ def remove_all_cut(self): %(nb_proton1)s = nb_proton1 # number of proton for the first beam %(nb_neutron1)s = nb_neutron1 # number of neutron for the first beam %(mass_ion1)s = mass_ion1 # mass of the heavy ion (first beam) -# Note that seting differently the two beams only work if you use +# Note that seting differently the two beams only work if you use # group_subprocess=False when generating your matrix-element %(nb_proton2)s = nb_proton2 # number of proton for the second beam %(nb_neutron2)s = nb_neutron2 # number of neutron for the second beam - %(mass_ion2)s = mass_ion2 # mass of the heavy ion (second beam) + %(mass_ion2)s = mass_ion2 # mass of the heavy ion (second beam) """ template_off = "# To see heavy ion options: type \"update ion_pdf\"" @@ -3834,11 +3834,11 @@ def remove_all_cut(self): # Frame for polarization ------------------------------------------------------------------------------------ template_on = \ """#********************************************************************* -# Frame where to evaluate the matrix-element (not the cut!) for polarization +# Frame where to evaluate the matrix-element (not the cut!) for polarization #********************************************************************* %(me_frame)s = me_frame ! list of particles to sum-up to define the rest-frame ! in which to evaluate the matrix-element - ! [1,2] means the partonic center of mass + ! [1,2] means the partonic center of mass """ template_off = "" frame_block = RunBlock('frame', template_on=template_on, template_off=template_off) @@ -3891,7 +3891,7 @@ def remove_all_cut(self): # CONTROL The extra running scale (not QCD) * # Such running is NOT include in systematics computation * #*********************************************************************** - %(fixed_extra_scale)s = fixed_extra_scale ! False means dynamical scale + %(fixed_extra_scale)s = fixed_extra_scale ! False means dynamical scale %(mue_ref_fixed)s = mue_ref_fixed ! scale to use if fixed scale mode %(mue_over_ref)s = mue_over_ref ! ratio to mur if dynamical scale """ @@ -3908,10 +3908,10 @@ def remove_all_cut(self): %(tmin_for_channel)s = tmin_for_channel ! limit the non-singular reach of --some-- channel of integration related to T-channel diagram (value between -1 and 0), -1 is no impact %(survey_splitting)s = survey_splitting ! for loop-induced control how many core are used at survey for the computation of a single iteration. %(survey_nchannel_per_job)s = survey_nchannel_per_job ! control how many Channel are integrated inside a single job on cluster/multicore - %(refine_evt_by_job)s = refine_evt_by_job ! control the maximal number of events for the first iteration of the refine (larger means less jobs) + %(refine_evt_by_job)s = refine_evt_by_job ! control the maximal number of events for the first iteration of the refine (larger means less jobs) +#********************************************************************* +# Compilation flag. #********************************************************************* -# Compilation flag. -#********************************************************************* %(global_flag)s = global_flag ! fortran optimization flag use for the all code. %(aloha_flag)s = aloha_flag ! fortran optimization flag for aloha function. Suggestions: '-ffast-math' %(matrix_flag)s = matrix_flag ! fortran optimization flag for matrix.f function. Suggestions: '-O3' @@ -3948,7 +3948,7 @@ def check_validity(self, card): if card['pdlabel'] != card['pdlabel1']: dict.__setitem__(card, 'pdlabel', card['pdlabel1']) elif card['pdlabel1'] in sum(card.allowed_lep_densities.values(),[]): - raise InvalidRunCard("Assymetric beam pdf not supported for e e collision with ISR/bemstralung option") + raise InvalidRunCard("Assymetric beam pdf not supported for e e collision with ISR/bemstralung option") elif card['pdlabel2'] in sum(card.allowed_lep_densities.values(),[]): raise InvalidRunCard("Assymetric beam pdf not supported for e e collision with ISR/bemstralung option") elif card['pdlabel1'] == 'none': @@ -3962,7 +3962,7 @@ def check_validity(self, card): dict.__setitem__(card, 'pdlabel2', card['pdlabel']) if abs(card['lpp1']) == 1 == abs(card['lpp2']) and card['pdlabel1'] != card['pdlabel2']: - raise InvalidRunCard("Assymetric beam pdf not supported for proton-proton collision") + raise InvalidRunCard("Assymetric beam pdf not supported for proton-proton collision") def status(self, card): """return False if template_off to be used, True if template_on to be used""" @@ -4028,7 +4028,7 @@ def post_set(card, value, change_userdefine, raiseerror, name='unknown', **opt): if name == 'fixed_fac_scale2' and 'fixed_fac_scale1' not in card.user_set: dict.__setitem__(card, 'fixed_fac_scale1', card['fixed_fac_scale']) if name == 'fixed_fac_scale1' and 'fixed_fac_scale2' not in card.user_set: - dict.__setitem__(card, 'fixed_fac_scale2', card['fixed_fac_scale']) + dict.__setitem__(card, 'fixed_fac_scale2', card['fixed_fac_scale']) def status(self, card): @@ -4061,32 +4061,32 @@ def status(self, card): class RunCardLO(RunCard): """an object to handle in a nice way the run_card information""" - + blocks = [heavy_ion_block, beam_pol_block, syscalc_block, ecut_block, frame_block, eva_scale_block, mlm_block, ckkw_block, psoptim_block, pdlabel_block, fixedfacscale, running_block] dummy_fct_file = {"dummy_cuts": pjoin("SubProcesses","dummy_fct.f"), "get_dummy_x1": pjoin("SubProcesses","dummy_fct.f"), - "get_dummy_x1_x2": pjoin("SubProcesses","dummy_fct.f"), + "get_dummy_x1_x2": pjoin("SubProcesses","dummy_fct.f"), "dummy_boostframe": pjoin("SubProcesses","dummy_fct.f"), "user_dynamical_scale": pjoin("SubProcesses","dummy_fct.f"), "bias_wgt_custom": pjoin("SubProcesses","dummy_fct.f"), "user_": pjoin("SubProcesses","dummy_fct.f") # all function starting by user will be added to that file } - + include_as_parameter = ['vector.inc'] if MG5DIR: default_run_card = pjoin(MG5DIR, "internal", "default_run_card_lo.dat") - + def default_setup(self): """default value for the run_card.dat""" - + self.add_param("run_tag", "tag_1", include=False) self.add_param("gridpack", False) self.add_param("time_of_flight", -1.0, include=False) - self.add_param("nevents", 10000) + self.add_param("nevents", 10000) self.add_param("iseed", 0) self.add_param("python_seed", -2, include=False, hidden=True, comment="controlling python seed [handling in particular the final unweighting].\n -1 means use default from random module.\n -2 means set to same value as iseed") self.add_param("lpp1", 1, fortran_name="lpp(1)", allowed=[-1,1,0,2,3,9,-2,-3,4,-4], @@ -4106,7 +4106,7 @@ def default_setup(self): self.add_param('nb_neutron1', 0, hidden=True, allowed=[1,0, 126 , '*'],fortran_name="nb_neutron(1)", comment='For heavy ion physics nb of neutron in the ion (for both beam but if group_subprocess was False)') self.add_param('nb_neutron2', 0, hidden=True, allowed=[1,0, 126 , '*'],fortran_name="nb_neutron(2)", - comment='For heavy ion physics nb of neutron in the ion (of beam 2 if group_subprocess was False )') + comment='For heavy ion physics nb of neutron in the ion (of beam 2 if group_subprocess was False )') self.add_param('mass_ion1', -1.0, hidden=True, fortran_name="mass_ion(1)", allowed=[-1,0, 0.938, 207.9766521*0.938, 0.000511, 0.105, '*'], comment='For heavy ion physics mass in GeV of the ion (of beam 1)') @@ -4133,11 +4133,11 @@ def default_setup(self): self.add_param("mue_over_ref", 1.0, hidden=True, comment='ratio mu_other/mu for dynamical scale') self.add_param("ievo_eva",0,hidden=True, allowed=[0,1],fortran_name="ievo_eva", comment='eva: 0 for EW pdf muf evolution by q^2; 1 for evo by pT^2') - + # Bias module options self.add_param("bias_module", 'None', include=False, hidden=True) self.add_param('bias_parameters', {'__type__':1.0}, include='BIAS/bias.inc', hidden=True) - + #matching self.add_param("scalefact", 1.0) self.add_param("ickkw", 0, allowed=[0,1], hidden=True, comment="\'0\' for standard fixed order computation.\n\'1\' for MLM merging activates alphas and pdf re-weighting according to a kt clustering of the QCD radiation.") @@ -4221,7 +4221,7 @@ def default_setup(self): self.add_param("mmaa", 0.0, cut='aa') self.add_param("mmll", 0.0, cut='ll') self.add_param("mmjjmax", -1.0, cut='jj') - self.add_param("mmbbmax", -1.0, cut='bb') + self.add_param("mmbbmax", -1.0, cut='bb') self.add_param("mmaamax", -1.0, cut='aa') self.add_param("mmllmax", -1.0, cut='ll') self.add_param("mmnl", 0.0, cut='LL') @@ -4231,9 +4231,9 @@ def default_setup(self): self.add_param("ptllmax", -1.0, cut='ll') self.add_param("xptj", 0.0, cut='jj') self.add_param("xptb", 0.0, cut='bb') - self.add_param("xpta", 0.0, cut='aa') + self.add_param("xpta", 0.0, cut='aa') self.add_param("xptl", 0.0, cut='ll') - # ordered pt jet + # ordered pt jet self.add_param("ptj1min", 0.0, cut='jj') self.add_param("ptj1max", -1.0, cut='jj') self.add_param("ptj2min", 0.0, cut='jj') @@ -4241,7 +4241,7 @@ def default_setup(self): self.add_param("ptj3min", 0.0, cut='jjj') self.add_param("ptj3max", -1.0, cut='jjj') self.add_param("ptj4min", 0.0, cut='j'*4) - self.add_param("ptj4max", -1.0, cut='j'*4) + self.add_param("ptj4max", -1.0, cut='j'*4) self.add_param("cutuse", 0, cut='jj') # ordered pt lepton self.add_param("ptl1min", 0.0, cut='l'*2) @@ -4249,7 +4249,7 @@ def default_setup(self): self.add_param("ptl2min", 0.0, cut='l'*2) self.add_param("ptl2max", -1.0, cut='l'*2) self.add_param("ptl3min", 0.0, cut='l'*3) - self.add_param("ptl3max", -1.0, cut='l'*3) + self.add_param("ptl3max", -1.0, cut='l'*3) self.add_param("ptl4min", 0.0, cut='l'*4) self.add_param("ptl4max", -1.0, cut='l'*4) # Ht sum of jets @@ -4257,7 +4257,7 @@ def default_setup(self): self.add_param("htjmax", -1.0, cut='j'*2) self.add_param("ihtmin", 0.0, cut='J'*2) self.add_param("ihtmax", -1.0, cut='J'*2) - self.add_param("ht2min", 0.0, cut='J'*3) + self.add_param("ht2min", 0.0, cut='J'*3) self.add_param("ht3min", 0.0, cut='J'*3) self.add_param("ht4min", 0.0, cut='J'*4) self.add_param("ht2max", -1.0, cut='J'*3) @@ -4267,7 +4267,7 @@ def default_setup(self): self.add_param("ptgmin", 0.0, cut='aj') self.add_param("r0gamma", 0.4, hidden=True) self.add_param("xn", 1.0, hidden=True) - self.add_param("epsgamma", 1.0, hidden=True) + self.add_param("epsgamma", 1.0, hidden=True) self.add_param("isoem", True, hidden=True) self.add_param("xetamin", 0.0, cut='jj') self.add_param("deltaeta", 0.0, cut='j'*2) @@ -4280,7 +4280,7 @@ def default_setup(self): self.add_param("use_syst", True) self.add_param('systematics_program', 'systematics', include=False, hidden=True, comment='Choose which program to use for systematics computation: none, systematics, syscalc') self.add_param('systematics_arguments', ['--mur=0.5,1,2', '--muf=0.5,1,2', '--pdf=errorset'], include=False, hidden=True, comment='Choose the argment to pass to the systematics command. like --mur=0.25,1,4. Look at the help of the systematics function for more details.') - + self.add_param("sys_scalefact", "0.5 1 2", include=False, hidden=True) self.add_param("sys_alpsfact", "None", include=False, hidden=True) self.add_param("sys_matchscale", "auto", include=False, hidden=True) @@ -4315,8 +4315,8 @@ def default_setup(self): self.add_param('aloha_flag', '', include=False, hidden=True, comment='global fortran compilation flag, suggestion: -ffast-math', fct_mod=(self.make_clean, ('Source/DHELAS'),{})) self.add_param('matrix_flag', '', include=False, hidden=True, comment='fortran compilation flag for the matrix-element files, suggestion -O3', - fct_mod=(self.make_Ptouch, ('matrix'),{})) - self.add_param('vector_size', 1, include='vector.inc', hidden=True, comment='lockstep size for parralelism run', + fct_mod=(self.make_Ptouch, ('matrix'),{})) + self.add_param('vector_size', 1, include='vector.inc', hidden=True, comment='lockstep size for parralelism run', fortran_name='VECSIZE_MEMMAX', fct_mod=(self.reset_simd,(),{})) # parameter allowing to define simple cut via the pdg @@ -4329,24 +4329,24 @@ def default_setup(self): self.add_param('eta_max_pdg',{'__type__':0.}, include=False,cut=True) self.add_param('mxx_min_pdg',{'__type__':0.}, include=False,cut=True) self.add_param('mxx_only_part_antipart', {'default':False}, include=False) - + self.add_param('pdg_cut',[0], system=True) # store which PDG are tracked self.add_param('ptmin4pdg',[0.], system=True) # store pt min self.add_param('ptmax4pdg',[-1.], system=True) self.add_param('Emin4pdg',[0.], system=True) # store pt min - self.add_param('Emax4pdg',[-1.], system=True) + self.add_param('Emax4pdg',[-1.], system=True) self.add_param('etamin4pdg',[0.], system=True) # store pt min - self.add_param('etamax4pdg',[-1.], system=True) + self.add_param('etamax4pdg',[-1.], system=True) self.add_param('mxxmin4pdg',[-1.], system=True) self.add_param('mxxpart_antipart', [False], system=True) - - - + + + def check_validity(self): """ """ - + super(RunCardLO, self).check_validity() - + #Make sure that nhel is only either 0 (i.e. no MC over hel) or #1 (MC over hel with importance sampling). In particular, it can #no longer be > 1. @@ -4357,12 +4357,12 @@ def check_validity(self): "not %s." % self['nhel']) if int(self['maxjetflavor']) > 6: raise InvalidRunCard('maxjetflavor should be lower than 5! (6 is partly supported)') - + if len(self['pdgs_for_merging_cut']) > 1000: raise InvalidRunCard("The number of elements in "+\ "'pdgs_for_merging_cut' should not exceed 1000.") - + # some cut need to be deactivated in presence of isolation if self['ptgmin'] > 0: if self['pta'] > 0: @@ -4370,18 +4370,18 @@ def check_validity(self): self['pta'] = 0.0 if self['draj'] > 0: logger.warning('draj cut discarded since photon isolation is used') - self['draj'] = 0.0 - - # special treatment for gridpack use the gseed instead of the iseed + self['draj'] = 0.0 + + # special treatment for gridpack use the gseed instead of the iseed if self['gridrun']: self['iseed'] = self['gseed'] - + #Some parameter need to be fixed when using syscalc #if self['use_syst']: # if self['scalefact'] != 1.0: # logger.warning('Since use_syst=T, changing the value of \'scalefact\' to 1') # self['scalefact'] = 1.0 - + # CKKW Treatment if self['ickkw'] > 0: if self['ickkw'] != 1: @@ -4399,7 +4399,7 @@ def check_validity(self): raise InvalidRunCard('maxjetflavor at 6 is NOT supported for matching!') if self['ickkw'] == 2: # add warning if ckkw selected but the associate parameter are empty - self.get_default('highestmult', log_level=20) + self.get_default('highestmult', log_level=20) self.get_default('issgridfile', 'issudgrid.dat', log_level=20) if self['xqcut'] > 0: if self['ickkw'] == 0: @@ -4412,13 +4412,13 @@ def check_validity(self): if self['drjl'] != 0: if 'drjl' in self.user_set: logger.warning('Since icckw>0, changing the value of \'drjl\' to 0') - self['drjl'] = 0 - if not self['auto_ptj_mjj']: + self['drjl'] = 0 + if not self['auto_ptj_mjj']: if self['mmjj'] > self['xqcut']: logger.warning('mmjj > xqcut (and auto_ptj_mjj = F). MMJJ set to 0') - self['mmjj'] = 0.0 - - # check validity of the pdf set + self['mmjj'] = 0.0 + + # check validity of the pdf set # note that pdlabel is automatically set to lhapdf if pdlabel1 or pdlabel2 is set to lhapdf if self['pdlabel'] == 'lhapdf': #add warning if lhaid not define @@ -4426,7 +4426,7 @@ def check_validity(self): mod = False for i in [1,2]: - lpp = 'lpp%i' %i + lpp = 'lpp%i' %i pdlabelX = 'pdlabel%i' % i if self[lpp] == 0: # nopdf if self[pdlabelX] != 'none': @@ -4459,12 +4459,12 @@ def check_validity(self): raise InvalidRunCard( "Heavy ion mode is only supported for lpp1=1/2") if self['lpp2'] not in [1,2]: if self['nb_proton2'] !=1 or self['nb_neutron2'] !=0: - raise InvalidRunCard( "Heavy ion mode is only supported for lpp2=1/2") + raise InvalidRunCard( "Heavy ion mode is only supported for lpp2=1/2") # check that fixed_fac_scale(1/2) is setting as expected # if lpp=2/3/4 -> default is that beam in fixed scale - # check that fixed_fac_scale is not setup if fixed_fac_scale1/2 are + # check that fixed_fac_scale is not setup if fixed_fac_scale1/2 are # check that both fixed_fac_scale1/2 are defined together # ensure that fixed_fac_scale1 and fixed_fac_scale2 are setup as needed if 'fixed_fac_scale1' in self.user_set: @@ -4475,13 +4475,13 @@ def check_validity(self): elif 'fixed_fac_scale' in self.user_set: logger.warning('fixed_fac_scale and fixed_fac_scale1 are defined but not fixed_fac_scale2. The value of fixed_fac_scale2 will be set to the one of fixed_fac_scale.') self['fixed_fac_scale2'] = self['fixed_fac_scale'] - elif self['lpp2'] !=0: + elif self['lpp2'] !=0: raise Exception('fixed_fac_scale2 not defined while fixed_fac_scale1 is. Please fix your run_card.') elif 'fixed_fac_scale2' in self.user_set: if 'fixed_fac_scale' in self.user_set: logger.warning('fixed_fac_scale and fixed_fac_scale2 are defined but not fixed_fac_scale1. The value of fixed_fac_scale1 will be set to the one of fixed_fac_scale.') self['fixed_fac_scale1'] = self['fixed_fac_scale'] - elif self['lpp1'] !=0: + elif self['lpp1'] !=0: raise Exception('fixed_fac_scale1 not defined while fixed_fac_scale2 is. Please fix your run_card.') else: if 'fixed_fac_scale' in self.user_set: @@ -4500,12 +4500,12 @@ def check_validity(self): logger.warning('fixed_fac_scale1 not defined whithin your run_card. Using default value: %s', self['fixed_fac_scale1']) logger.warning('fixed_fac_scale2 not defined whithin your run_card. Using default value: %s', self['fixed_fac_scale2']) - # check if lpp = + # check if lpp = if self['pdlabel'] not in sum(self.allowed_lep_densities.values(),[]): for i in [1,2]: if abs(self['lpp%s' % i ]) in [3,4] and self['fixed_fac_scale%s' % i] and self['dsqrt_q2fact%s'%i] == 91.188: logger.warning("Vector boson from lepton PDF is using fixed scale value of muf [dsqrt_q2fact%s]. Looks like you kept the default value (Mz). Is this really the cut-off that you want to use?" % i) - + if abs(self['lpp%s' % i ]) == 2 and self['fixed_fac_scale%s' % i] and self['dsqrt_q2fact%s'%i] == 91.188: if self['pdlabel'] in ['edff','chff']: logger.warning("Since 3.5.0 exclusive photon-photon processes in ultraperipheral proton and nuclear collisions from gamma-UPC (arXiv:2207.03012) will ignore the factorisation scale.") @@ -4515,10 +4515,10 @@ def check_validity(self): if six.PY2 and self['hel_recycling']: self['hel_recycling'] = False - logger.warning("""Helicity recycling optimization requires Python3. This optimzation is therefore deactivated automatically. + logger.warning("""Helicity recycling optimization requires Python3. This optimzation is therefore deactivated automatically. In general this optimization speeds up the computation by a factor of two.""") - + # check that ebeam is bigger than the associated mass. for i in [1,2]: if self['lpp%s' % i ] not in [1,2]: @@ -4529,13 +4529,13 @@ def check_validity(self): logger.warning("At-rest proton mode set: energy beam set to 0.938") self.set('ebeam%i' %i, 0.938) else: - raise InvalidRunCard("Energy for beam %i lower than proton mass. Please fix this") - elif self['ebeam%i' % i] < self['mass_ion%i' % i]: + raise InvalidRunCard("Energy for beam %i lower than proton mass. Please fix this") + elif self['ebeam%i' % i] < self['mass_ion%i' % i]: if self['ebeam%i' %i] == 0: logger.warning("At rest ion mode set: Energy beam set to %s" % self['mass_ion%i' % i]) self.set('ebeam%i' %i, self['mass_ion%i' % i]) - - + + # check the tmin_for_channel is negative if self['tmin_for_channel'] == 0: raise InvalidRunCard('tmin_for_channel can not be set to 0.') @@ -4543,15 +4543,15 @@ def check_validity(self): logger.warning('tmin_for_channel should be negative. Will be using -%f instead' % self['tmin_for_channel']) self.set('tmin_for_channel', -self['tmin_for_channel']) - + def update_system_parameter_for_include(self): """system parameter need to be setupe""" - + # polarization self['frame_id'] = sum(2**(n) for n in self['me_frame']) - + # set the pdg_for_cut fortran parameter - pdg_to_cut = set(list(self['pt_min_pdg'].keys()) +list(self['pt_max_pdg'].keys()) + + pdg_to_cut = set(list(self['pt_min_pdg'].keys()) +list(self['pt_max_pdg'].keys()) + list(self['e_min_pdg'].keys()) +list(self['e_max_pdg'].keys()) + list(self['eta_min_pdg'].keys()) +list(self['eta_max_pdg'].keys())+ list(self['mxx_min_pdg'].keys()) + list(self['mxx_only_part_antipart'].keys())) @@ -4559,15 +4559,15 @@ def update_system_parameter_for_include(self): pdg_to_cut.discard('default') if len(pdg_to_cut)>25: raise Exception("Maximum 25 different pdgs are allowed for pdg specific cut") - + if any(int(pdg)<0 for pdg in pdg_to_cut): logger.warning('PDG specific cuts are always applied symmetrically on particles/anti-particles. Always use positve PDG codes') raise MadGraph5Error('Some PDG specific cuts are defined using negative pdg code') - - + + if any(pdg in pdg_to_cut for pdg in [1,2,3,4,5,21,22,11,13,15]): raise Exception("Can not use PDG related cut for light quark/b quark/lepton/gluon/photon") - + if pdg_to_cut: self['pdg_cut'] = list(pdg_to_cut) self['ptmin4pdg'] = [] @@ -4595,7 +4595,7 @@ def update_system_parameter_for_include(self): self[new_var].append(self[old_var][str(pdg)] if str(pdg) in self[old_var] else default) else: if str(pdg) not in self[old_var]: - raise Exception("no default value defined for %s and no value defined for pdg %s" % (old_var, pdg)) + raise Exception("no default value defined for %s and no value defined for pdg %s" % (old_var, pdg)) self[new_var].append(self[old_var][str(pdg)]) else: self['pdg_cut'] = [0] @@ -4605,11 +4605,11 @@ def update_system_parameter_for_include(self): self['ptmax4pdg'] = [-1.] self['Emax4pdg'] = [-1.] self['etamax4pdg'] =[-1.] - self['mxxmin4pdg'] =[0.] + self['mxxmin4pdg'] =[0.] self['mxxpart_antipart'] = [False] - - - + + + def create_default_for_process(self, proc_characteristic, history, proc_def): """Rules process 1->N all cut set on off. @@ -4626,7 +4626,7 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): if proc_characteristic['loop_induced']: self['nhel'] = 1 self['pdgs_for_merging_cut'] = proc_characteristic['colored_pdgs'] - + if proc_characteristic['ninitial'] == 1: #remove all cut self.remove_all_cut() @@ -4636,7 +4636,7 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): # check for beam_id beam_id = set() beam_id_split = [set(), set()] - for proc in proc_def: + for proc in proc_def: for oneproc in proc: for i,leg in enumerate(oneproc['legs']): if not leg['state']: @@ -4654,20 +4654,20 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): maxjetflavor = max([4]+[abs(i) for i in beam_id if -7< i < 7]) self['maxjetflavor'] = maxjetflavor self['asrwgtflavor'] = maxjetflavor - + if any(i in beam_id for i in [1,-1,2,-2,3,-3,4,-4,5,-5,21,22]): # check for e p collision if any(id in beam_id for id in [11,-11,13,-13]): self.display_block.append('beam_pol') if any(id in beam_id_split[0] for id in [11,-11,13,-13]): - self['lpp1'] = 0 - self['lpp2'] = 1 - self['ebeam1'] = '1k' - self['ebeam2'] = '6500' + self['lpp1'] = 0 + self['lpp2'] = 1 + self['ebeam1'] = '1k' + self['ebeam2'] = '6500' else: - self['lpp1'] = 1 - self['lpp2'] = 0 - self['ebeam1'] = '6500' + self['lpp1'] = 1 + self['lpp2'] = 0 + self['ebeam1'] = '6500' self['ebeam2'] = '1k' # UPC for p p collision @@ -4677,7 +4677,7 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): self['ebeam1'] = '6500' self['ebeam2'] = '6500' self['pdlabel'] = 'edff' - + elif any(id in beam_id for id in [11,-11,13,-13]): self['lpp1'] = 0 self['lpp2'] = 0 @@ -4688,7 +4688,7 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): self.display_block.append('ecut') self.display_block.append('beam_pol') - + # check for possibility of eva eva_in_b1 = any(i in beam_id_split[0] for i in [23,24,-24]) #,12,-12,14,-14]) @@ -4701,10 +4701,10 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): self['nhel'] = 1 self['pdlabel'] = 'eva' self['fixed_fac_scale'] = True - self.display_block.append('beam_pol') + self.display_block.append('beam_pol') elif eva_in_b1: - self.display_block.append('beam_pol') + self.display_block.append('beam_pol') self['pdlabel1'] = 'eva' self['fixed_fac_scale1'] = True self['nhel'] = 1 @@ -4724,7 +4724,7 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): self['pdlabel2'] = 'eva' self['fixed_fac_scale2'] = True self['nhel'] = 1 - self.display_block.append('beam_pol') + self.display_block.append('beam_pol') for i in beam_id_split[0]: if abs(i) == 11: self['lpp1'] = math.copysign(3,i) @@ -4740,34 +4740,34 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): if any(i in beam_id for i in [22,23,24,-24,12,-12,14,-14]): self.display_block.append('eva_scale') - # automatic polarisation of the beam if neutrino beam + # automatic polarisation of the beam if neutrino beam if any(id in beam_id for id in [12,-12,14,-14,16,-16]): self.display_block.append('beam_pol') if any(id in beam_id_split[0] for id in [12,14,16]): - self['lpp1'] = 0 - self['ebeam1'] = '1k' + self['lpp1'] = 0 + self['ebeam1'] = '1k' self['polbeam1'] = -100 if not all(id in [12,14,16] for id in beam_id_split[0]): logger.warning('Issue with default beam setup of neutrino in the run_card. Please check it up [polbeam1]. %s') elif any(id in beam_id_split[0] for id in [-12,-14,-16]): - self['lpp1'] = 0 - self['ebeam1'] = '1k' + self['lpp1'] = 0 + self['ebeam1'] = '1k' self['polbeam1'] = 100 if not all(id in [-12,-14,-16] for id in beam_id_split[0]): - logger.warning('Issue with default beam setup of neutrino in the run_card. Please check it up [polbeam1].') + logger.warning('Issue with default beam setup of neutrino in the run_card. Please check it up [polbeam1].') if any(id in beam_id_split[1] for id in [12,14,16]): - self['lpp2'] = 0 - self['ebeam2'] = '1k' + self['lpp2'] = 0 + self['ebeam2'] = '1k' self['polbeam2'] = -100 if not all(id in [12,14,16] for id in beam_id_split[1]): logger.warning('Issue with default beam setup of neutrino in the run_card. Please check it up [polbeam2].') elif any(id in beam_id_split[1] for id in [-12,-14,-16]): - self['lpp2'] = 0 - self['ebeam2'] = '1k' + self['lpp2'] = 0 + self['ebeam2'] = '1k' self['polbeam2'] = 100 if not all(id in [-12,-14,-16] for id in beam_id_split[1]): logger.warning('Issue with default beam setup of neutrino in the run_card. Please check it up [polbeam2].') - + # Check if need matching min_particle = 99 max_particle = 0 @@ -4798,12 +4798,12 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): else: # all are jet => matching is ON matching=True - break - + break + if matching: self['ickkw'] = 1 self['xqcut'] = 30 - #self['use_syst'] = False + #self['use_syst'] = False self['drjj'] = 0 self['drjl'] = 0 self['sys_alpsfact'] = "0.5 1 2" @@ -4811,8 +4811,8 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): self.display_block.append('mlm') self.display_block.append('ckkw') self['dynamical_scale_choice'] = -1 - - + + # For interference module, the systematics are wrong. # automatically set use_syst=F and set systematics_program=none no_systematics = False @@ -4826,14 +4826,14 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): continue break - + if interference or no_systematics: self['use_syst'] = False self['systematics_program'] = 'none' if interference: self['dynamical_scale_choice'] = 3 self['sde_strategy'] = 2 - + # set default integration strategy # interference case is already handle above # here pick strategy 2 if only one QCD color flow @@ -4852,7 +4852,7 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): if pure_lepton and proton_initial: self['sde_strategy'] = 1 else: - # check if multi-jet j + # check if multi-jet j is_multijet = True for proc in proc_def: if any(abs(j.get('id')) not in jet_id for j in proc[0]['legs']): @@ -4860,7 +4860,7 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): break if is_multijet: self['sde_strategy'] = 2 - + # if polarization is used, set the choice of the frame in the run_card # But only if polarization is used for massive particles for plist in proc_def: @@ -4870,7 +4870,7 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): model = proc.get('model') particle = model.get_particle(l.get('id')) if particle.get('mass').lower() != 'zero': - self.display_block.append('frame') + self.display_block.append('frame') break else: continue @@ -4894,15 +4894,15 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): proc = proc_list[0] if proc['forbidden_onsh_s_channels']: self['sde_strategy'] = 1 - + if 'fix_scale' in proc_characteristic['limitations']: self['fixed_ren_scale'] = 1 self['fixed_fac_scale'] = 1 if self['ickkw'] == 1: logger.critical("MLM matching/merging not compatible with the model! You need to use another method to remove the double counting!") self['ickkw'] = 0 - - # define class of particles present to hide all the cuts associated to + + # define class of particles present to hide all the cuts associated to # not present class cut_class = collections.defaultdict(int) for proc in proc_def: @@ -4925,41 +4925,41 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): one_proc_cut['L'] += 1 elif abs(pdg) in [12,14,16]: one_proc_cut['n'] += 1 - one_proc_cut['L'] += 1 + one_proc_cut['L'] += 1 elif str(oneproc.get('model').get_particle(pdg)['mass']) != 'ZERO': one_proc_cut['H'] += 1 - + for key, nb in one_proc_cut.items(): cut_class[key] = max(cut_class[key], nb) self.cut_class = dict(cut_class) self.cut_class[''] = True #avoid empty - + # If model has running functionality add the additional parameter model = proc_def[0][0].get('model') if model['running_elements']: - self.display_block.append('RUNNING') + self.display_block.append('RUNNING') # Read file input/default_run_card_lo.dat # This has to be LAST !! if os.path.exists(self.default_run_card): self.read(self.default_run_card, consistency=False) - + def write(self, output_file, template=None, python_template=False, **opt): - """Write the run_card in output_file according to template + """Write the run_card in output_file according to template (a path to a valid run_card)""" if not template: if not MADEVENT: - template = pjoin(MG5DIR, 'Template', 'LO', 'Cards', + template = pjoin(MG5DIR, 'Template', 'LO', 'Cards', 'run_card.dat') python_template = True else: template = pjoin(MEDIR, 'Cards', 'run_card_default.dat') python_template = False - + hid_lines = {'default':True}#collections.defaultdict(itertools.repeat(True).next) if isinstance(output_file, str): @@ -4975,9 +4975,9 @@ def write(self, output_file, template=None, python_template=False, hid_lines[k1+k2] = True super(RunCardLO, self).write(output_file, template=template, - python_template=python_template, + python_template=python_template, template_options=hid_lines, - **opt) + **opt) class InvalidMadAnalysis5Card(InvalidCmd): @@ -4986,19 +4986,19 @@ class InvalidMadAnalysis5Card(InvalidCmd): class MadAnalysis5Card(dict): """ A class to store a MadAnalysis5 card. Very basic since it is basically free format.""" - + _MG5aMC_escape_tag = '@MG5aMC' - + _default_hadron_inputs = ['*.hepmc', '*.hep', '*.stdhep', '*.lhco','*.root'] _default_parton_inputs = ['*.lhe'] _skip_analysis = False - + @classmethod def events_can_be_reconstructed(cls, file_path): """ Checks from the type of an event file whether it can be reconstructed or not.""" return not (file_path.endswith('.lhco') or file_path.endswith('.lhco.gz') or \ file_path.endswith('.root') or file_path.endswith('.root.gz')) - + @classmethod def empty_analysis(cls): """ A method returning the structure of an empty analysis """ @@ -5012,7 +5012,7 @@ def empty_reconstruction(cls): 'reco_output':'lhe'} def default_setup(self): - """define the default value""" + """define the default value""" self['mode'] = 'parton' self['inputs'] = [] # None is the default stdout level, it will be set automatically by MG5aMC @@ -5025,8 +5025,8 @@ def default_setup(self): # of this class and some other property could be added to this dictionary # in the future. self['analyses'] = {} - # The recasting structure contains on set of commands and one set of - # card lines. + # The recasting structure contains on set of commands and one set of + # card lines. self['recasting'] = {'commands':[],'card':[]} # Add the default trivial reconstruction to use an lhco input # This is just for the structure @@ -5035,7 +5035,7 @@ def default_setup(self): 'root_input': MadAnalysis5Card.empty_reconstruction()} self['reconstruction']['lhco_input']['reco_output']='lhco' - self['reconstruction']['root_input']['reco_output']='root' + self['reconstruction']['root_input']['reco_output']='root' # Specify in which order the analysis/recasting were specified self['order'] = [] @@ -5049,7 +5049,7 @@ def __init__(self, finput=None,mode=None): return else: dict.__init__(self) - + # Initialize it with all the default value self.default_setup() if not mode is None: @@ -5058,15 +5058,15 @@ def __init__(self, finput=None,mode=None): # if input is define read that input if isinstance(finput, (file, str, StringIO.StringIO)): self.read(finput, mode=mode) - + def read(self, input, mode=None): """ Read an MA5 card""" - + if mode not in [None,'parton','hadron']: raise MadGraph5Error('A MadAnalysis5Card can be read online the modes'+ "'parton' or 'hadron'") card_mode = mode - + if isinstance(input, (file, StringIO.StringIO)): input_stream = input elif isinstance(input, str): @@ -5099,10 +5099,10 @@ def read(self, input, mode=None): except ValueError: option = line[len(self._MG5aMC_escape_tag):] option = option.strip() - + if option=='inputs': self['inputs'].extend([v.strip() for v in value.split(',')]) - + elif option == 'skip_analysis': self._skip_analysis = True @@ -5118,7 +5118,7 @@ def read(self, input, mode=None): except: raise InvalidMadAnalysis5Card( "MA5 output level specification '%s' is incorrect."%str(value)) - + elif option=='analysis_name': current_type = 'analyses' current_name = value @@ -5127,7 +5127,7 @@ def read(self, input, mode=None): "Analysis '%s' already defined in MadAnalysis5 card"%current_name) else: self[current_type][current_name] = MadAnalysis5Card.empty_analysis() - + elif option=='set_reconstructions': try: reconstructions = eval(value) @@ -5142,7 +5142,7 @@ def read(self, input, mode=None): "analysis in a MadAnalysis5 card.") self[current_type][current_name]['reconstructions']=reconstructions continue - + elif option=='reconstruction_name': current_type = 'reconstruction' current_name = value @@ -5161,7 +5161,7 @@ def read(self, input, mode=None): raise InvalidMadAnalysis5Card( "Option '%s' can only take the values 'lhe' or 'root'"%option) self['reconstruction'][current_name]['reco_output'] = value.lower() - + elif option.startswith('recasting'): current_type = 'recasting' try: @@ -5171,11 +5171,11 @@ def read(self, input, mode=None): if len(self['recasting'][current_name])>0: raise InvalidMadAnalysis5Card( "Only one recasting can be defined in MadAnalysis5 hadron card") - + else: raise InvalidMadAnalysis5Card( "Unreckognized MG5aMC instruction in MadAnalysis5 card: '%s'"%option) - + if option in ['analysis_name','reconstruction_name'] or \ option.startswith('recasting'): self['order'].append((current_type,current_name)) @@ -5209,7 +5209,7 @@ def read(self, input, mode=None): self['inputs'] = self._default_hadron_inputs else: self['inputs'] = self._default_parton_inputs - + # Make sure at least one reconstruction is specified for each hadron # level analysis and that it exists. if self['mode']=='hadron': @@ -5221,7 +5221,7 @@ def read(self, input, mode=None): analysis['reconstructions']): raise InvalidMadAnalysis5Card('A reconstructions specified in'+\ " analysis '%s' is not defined."%analysis_name) - + def write(self, output): """ Write an MA5 card.""" @@ -5232,7 +5232,7 @@ def write(self, output): else: raise MadGraph5Error('Incorrect input for the write function of'+\ ' the MadAnalysis5Card card. Received argument type is: %s'%str(type(output))) - + output_lines = [] if self._skip_analysis: output_lines.append('%s skip_analysis'%self._MG5aMC_escape_tag) @@ -5240,11 +5240,11 @@ def write(self, output): if not self['stdout_lvl'] is None: output_lines.append('%s stdout_lvl=%s'%(self._MG5aMC_escape_tag,self['stdout_lvl'])) for definition_type, name in self['order']: - + if definition_type=='analyses': output_lines.append('%s analysis_name = %s'%(self._MG5aMC_escape_tag,name)) output_lines.append('%s set_reconstructions = %s'%(self._MG5aMC_escape_tag, - str(self['analyses'][name]['reconstructions']))) + str(self['analyses'][name]['reconstructions']))) elif definition_type=='reconstruction': output_lines.append('%s reconstruction_name = %s'%(self._MG5aMC_escape_tag,name)) elif definition_type=='recasting': @@ -5254,23 +5254,23 @@ def write(self, output): output_lines.extend(self[definition_type][name]) elif definition_type in ['reconstruction']: output_lines.append('%s reco_output = %s'%(self._MG5aMC_escape_tag, - self[definition_type][name]['reco_output'])) + self[definition_type][name]['reco_output'])) output_lines.extend(self[definition_type][name]['commands']) elif definition_type in ['analyses']: - output_lines.extend(self[definition_type][name]['commands']) - + output_lines.extend(self[definition_type][name]['commands']) + output_stream.write('\n'.join(output_lines)) - + return - - def get_MA5_cmds(self, inputs_arg, submit_folder, run_dir_path=None, + + def get_MA5_cmds(self, inputs_arg, submit_folder, run_dir_path=None, UFO_model_path=None, run_tag=''): - """ Returns a list of tuples ('AnalysisTag',['commands']) specifying - the commands of the MadAnalysis runs required from this card. - At parton-level, the number of such commands is the number of analysis + """ Returns a list of tuples ('AnalysisTag',['commands']) specifying + the commands of the MadAnalysis runs required from this card. + At parton-level, the number of such commands is the number of analysis asked for. In the future, the idea is that the entire card can be processed in one go from MA5 directly.""" - + if isinstance(inputs_arg, list): inputs = inputs_arg elif isinstance(inputs_arg, str): @@ -5278,21 +5278,21 @@ def get_MA5_cmds(self, inputs_arg, submit_folder, run_dir_path=None, else: raise MadGraph5Error("The function 'get_MA5_cmds' can only take "+\ " a string or a list for the argument 'inputs_arg'") - + if len(inputs)==0: raise MadGraph5Error("The function 'get_MA5_cmds' must have "+\ " at least one input specified'") - + if run_dir_path is None: run_dir_path = os.path.dirname(inputs_arg) - + cmds_list = [] - + UFO_load = [] # first import the UFO if provided if UFO_model_path: UFO_load.append('import %s'%UFO_model_path) - + def get_import(input, type=None): """ Generates the MA5 import commands for that event file. """ dataset_name = os.path.basename(input).split('.')[0] @@ -5304,7 +5304,7 @@ def get_import(input, type=None): if not type is None: res.append('set %s.type = %s'%(dataset_name, type)) return res - + fifo_status = {'warned_fifo':False,'fifo_used_up':False} def warn_fifo(input): if not input.endswith('.fifo'): @@ -5317,7 +5317,7 @@ def warn_fifo(input): logger.warning('Only the first MA5 analysis/reconstructions can be run on a fifo. Subsequent runs will skip fifo inputs.') fifo_status['warned_fifo'] = True return True - + # Then the event file(s) input(s) inputs_load = [] for input in inputs: @@ -5325,16 +5325,16 @@ def warn_fifo(input): if len(inputs) > 1: inputs_load.append('set main.stacking_method = superimpose') - + submit_command = 'submit %s'%submit_folder+'_%s' - + # Keep track of the reconstruction outpus in the MA5 workflow # Keys are reconstruction names and values are .lhe.gz reco file paths. # We put by default already the lhco/root ones present reconstruction_outputs = { - 'lhco_input':[f for f in inputs if + 'lhco_input':[f for f in inputs if f.endswith('.lhco') or f.endswith('.lhco.gz')], - 'root_input':[f for f in inputs if + 'root_input':[f for f in inputs if f.endswith('.root') or f.endswith('.root.gz')]} # If a recasting card has to be written out, chose here its path @@ -5343,7 +5343,7 @@ def warn_fifo(input): # Make sure to only run over one analysis over each fifo. for definition_type, name in self['order']: - if definition_type == 'reconstruction': + if definition_type == 'reconstruction': analysis_cmds = list(self['reconstruction'][name]['commands']) reco_outputs = [] for i_input, input in enumerate(inputs): @@ -5365,8 +5365,8 @@ def warn_fifo(input): analysis_cmds.append( submit_command%('reco_%s_%d'%(name,i_input+1))) analysis_cmds.append('remove reco_events') - - reconstruction_outputs[name]= [pjoin(run_dir_path,rec_out) + + reconstruction_outputs[name]= [pjoin(run_dir_path,rec_out) for rec_out in reco_outputs] if len(reco_outputs)>0: cmds_list.append(('_reco_%s'%name,analysis_cmds)) @@ -5386,7 +5386,7 @@ def warn_fifo(input): analysis_cmds = ['set main.mode = parton'] else: analysis_cmds = [] - analysis_cmds.extend(sum([get_import(rec_out) for + analysis_cmds.extend(sum([get_import(rec_out) for rec_out in reconstruction_outputs[reco]],[])) analysis_cmds.extend(self['analyses'][name]['commands']) analysis_cmds.append(submit_command%('%s_%s'%(name,reco))) @@ -5427,12 +5427,12 @@ def warn_fifo(input): %(mue_ref_fixed)s = mue_ref_fixed ! scale to use if fixed scale mode """ running_block_nlo = RunBlock('RUNNING', template_on=template_on, template_off="") - + class RunCardNLO(RunCard): """A class object for the run_card for a (aMC@)NLO pocess""" - + LO = False - + blocks = [running_block_nlo] dummy_fct_file = {"dummy_cuts": pjoin("SubProcesses","dummy_fct.f"), @@ -5443,11 +5443,11 @@ class RunCardNLO(RunCard): if MG5DIR: default_run_card = pjoin(MG5DIR, "internal", "default_run_card_nlo.dat") - - + + def default_setup(self): """define the default value""" - + self.add_param('run_tag', 'tag_1', include=False) self.add_param('nevents', 10000) self.add_param('req_acc', -1.0, include=False) @@ -5455,27 +5455,27 @@ def default_setup(self): self.add_param("time_of_flight", -1.0, include=False) self.add_param('event_norm', 'average') #FO parameter - self.add_param('req_acc_fo', 0.01, include=False) + self.add_param('req_acc_fo', 0.01, include=False) self.add_param('npoints_fo_grid', 5000, include=False) self.add_param('niters_fo_grid', 4, include=False) - self.add_param('npoints_fo', 10000, include=False) + self.add_param('npoints_fo', 10000, include=False) self.add_param('niters_fo', 6, include=False) #seed and collider self.add_param('iseed', 0) - self.add_param('lpp1', 1, fortran_name='lpp(1)') - self.add_param('lpp2', 1, fortran_name='lpp(2)') + self.add_param('lpp1', 1, fortran_name='lpp(1)') + self.add_param('lpp2', 1, fortran_name='lpp(2)') self.add_param('ebeam1', 6500.0, fortran_name='ebeam(1)') - self.add_param('ebeam2', 6500.0, fortran_name='ebeam(2)') + self.add_param('ebeam2', 6500.0, fortran_name='ebeam(2)') self.add_param('pdlabel', 'nn23nlo', allowed=['lhapdf', 'emela', 'cteq6_m','cteq6_d','cteq6_l','cteq6l1', 'nn23lo','nn23lo1','nn23nlo','ct14q00','ct14q07','ct14q14','ct14q21'] +\ - sum(self.allowed_lep_densities.values(),[]) ) + sum(self.allowed_lep_densities.values(),[]) ) self.add_param('lhaid', [244600],fortran_name='lhaPDFid') self.add_param('pdfscheme', 0) # whether to include or not photon-initiated processes in lepton collisions self.add_param('photons_from_lepton', True) self.add_param('lhapdfsetname', ['internal_use_only'], system=True) - # stuff for lepton collisions - # these parameters are in general set automatically by eMELA in a consistent manner with the PDF set - # whether the current PDF set has or not beamstrahlung + # stuff for lepton collisions + # these parameters are in general set automatically by eMELA in a consistent manner with the PDF set + # whether the current PDF set has or not beamstrahlung self.add_param('has_bstrahl', False, system=True) # renormalisation scheme of alpha self.add_param('alphascheme', 0, system=True) @@ -5486,31 +5486,31 @@ def default_setup(self): # w contribution included or not in the running of alpha self.add_param('w_run', 1, system=True) #shower and scale - self.add_param('parton_shower', 'HERWIG6', fortran_name='shower_mc') + self.add_param('parton_shower', 'HERWIG6', fortran_name='shower_mc') self.add_param('shower_scale_factor',1.0) self.add_param('mcatnlo_delta', False) self.add_param('fixed_ren_scale', False) self.add_param('fixed_fac_scale', False) self.add_param('fixed_extra_scale', True, hidden=True, system=True) # set system since running from Ellis-Sexton scale not implemented - self.add_param('mur_ref_fixed', 91.118) + self.add_param('mur_ref_fixed', 91.118) self.add_param('muf1_ref_fixed', -1.0, hidden=True) - self.add_param('muf_ref_fixed', 91.118) + self.add_param('muf_ref_fixed', 91.118) self.add_param('muf2_ref_fixed', -1.0, hidden=True) - self.add_param('mue_ref_fixed', 91.118, hidden=True) - self.add_param("dynamical_scale_choice", [-1],fortran_name='dyn_scale', + self.add_param('mue_ref_fixed', 91.118, hidden=True) + self.add_param("dynamical_scale_choice", [-1],fortran_name='dyn_scale', allowed = [-2,-1,0,1,2,3,10], comment="\'-1\' is based on CKKW back clustering (following feynman diagram).\n \'1\' is the sum of transverse energy.\n '2' is HT (sum of the transverse mass)\n '3' is HT/2, '0' allows to use the user_hook definition (need to be defined via custom_fct entry) ") self.add_param('fixed_qes_scale', False, hidden=True) self.add_param('qes_ref_fixed', -1.0, hidden=True) self.add_param('mur_over_ref', 1.0) - self.add_param('muf_over_ref', 1.0) - self.add_param('muf1_over_ref', -1.0, hidden=True) + self.add_param('muf_over_ref', 1.0) + self.add_param('muf1_over_ref', -1.0, hidden=True) self.add_param('muf2_over_ref', -1.0, hidden=True) self.add_param('mue_over_ref', 1.0, hidden=True, system=True) # forbid the user to modigy due to incorrect handling of the Ellis-Sexton scale self.add_param('qes_over_ref', -1.0, hidden=True) self.add_param('reweight_scale', [True], fortran_name='lscalevar') - self.add_param('rw_rscale_down', -1.0, hidden=True) + self.add_param('rw_rscale_down', -1.0, hidden=True) self.add_param('rw_rscale_up', -1.0, hidden=True) - self.add_param('rw_fscale_down', -1.0, hidden=True) + self.add_param('rw_fscale_down', -1.0, hidden=True) self.add_param('rw_fscale_up', -1.0, hidden=True) self.add_param('rw_rscale', [1.0,2.0,0.5], fortran_name='scalevarR') self.add_param('rw_fscale', [1.0,2.0,0.5], fortran_name='scalevarF') @@ -5523,60 +5523,60 @@ def default_setup(self): #technical self.add_param('folding', [1,1,1], include=False) - + #merging self.add_param('ickkw', 0, allowed=[-1,0,3,4], comment=" - 0: No merging\n - 3: FxFx Merging : http://amcatnlo.cern.ch/FxFx_merging.htm\n - 4: UNLOPS merging (No interface within MG5aMC)\n - -1: NNLL+NLO jet-veto computation. See arxiv:1412.8408 [hep-ph]") self.add_param('bwcutoff', 15.0) - #cuts + #cuts self.add_param('jetalgo', 1.0) - self.add_param('jetradius', 0.7) + self.add_param('jetradius', 0.7) self.add_param('ptj', 10.0 , cut=True) - self.add_param('etaj', -1.0, cut=True) - self.add_param('gamma_is_j', True) + self.add_param('etaj', -1.0, cut=True) + self.add_param('gamma_is_j', True) self.add_param('ptl', 0.0, cut=True) - self.add_param('etal', -1.0, cut=True) + self.add_param('etal', -1.0, cut=True) self.add_param('drll', 0.0, cut=True) - self.add_param('drll_sf', 0.0, cut=True) + self.add_param('drll_sf', 0.0, cut=True) self.add_param('mll', 0.0, cut=True) - self.add_param('mll_sf', 30.0, cut=True) - self.add_param('rphreco', 0.1) - self.add_param('etaphreco', -1.0) - self.add_param('lepphreco', True) - self.add_param('quarkphreco', True) + self.add_param('mll_sf', 30.0, cut=True) + self.add_param('rphreco', 0.1) + self.add_param('etaphreco', -1.0) + self.add_param('lepphreco', True) + self.add_param('quarkphreco', True) self.add_param('ptgmin', 20.0, cut=True) - self.add_param('etagamma', -1.0) + self.add_param('etagamma', -1.0) self.add_param('r0gamma', 0.4) - self.add_param('xn', 1.0) + self.add_param('xn', 1.0) self.add_param('epsgamma', 1.0) - self.add_param('isoem', True) + self.add_param('isoem', True) self.add_param('maxjetflavor', 4, hidden=True) - self.add_param('pineappl', False) + self.add_param('pineappl', False) self.add_param('lhe_version', 3, hidden=True, include=False) - + # customization self.add_param("custom_fcts",[],typelist="str", include=False, comment="list of files containing function that overwritte dummy function of the code (like adding cuts/...)") #internal variable related to FO_analyse_card self.add_param('FO_LHE_weight_ratio',1e-3, hidden=True, system=True) - self.add_param('FO_LHE_postprocessing',['grouping','random'], + self.add_param('FO_LHE_postprocessing',['grouping','random'], hidden=True, system=True, include=False) - + # parameter allowing to define simple cut via the pdg self.add_param('pt_min_pdg',{'__type__':0.}, include=False,cut=True) self.add_param('pt_max_pdg',{'__type__':0.}, include=False,cut=True) self.add_param('mxx_min_pdg',{'__type__':0.}, include=False,cut=True) self.add_param('mxx_only_part_antipart', {'default':False}, include=False, hidden=True) - + #hidden parameter that are transfer to the fortran code self.add_param('pdg_cut',[0], hidden=True, system=True) # store which PDG are tracked self.add_param('ptmin4pdg',[0.], hidden=True, system=True) # store pt min self.add_param('ptmax4pdg',[-1.], hidden=True, system=True) self.add_param('mxxmin4pdg',[0.], hidden=True, system=True) self.add_param('mxxpart_antipart', [False], hidden=True, system=True) - + def check_validity(self): """check the validity of the various input""" - + super(RunCardNLO, self).check_validity() # for lepton-lepton collisions, ignore 'pdlabel' and 'lhaid' @@ -5588,12 +5588,12 @@ def check_validity(self): # for dressed lepton collisions, check that the lhaid is a valid one if self['pdlabel'] not in sum(self.allowed_lep_densities.values(),[]) + ['emela']: raise InvalidRunCard('pdlabel %s not allowed for dressed-lepton collisions' % self['pdlabel']) - + elif self['pdlabel']!='nn23nlo' or self['reweight_pdf']: self['pdlabel']='nn23nlo' self['reweight_pdf']=[False] logger.info('''Lepton-lepton collisions: ignoring PDF related parameters in the run_card.dat (pdlabel, lhaid, reweight_pdf, ...)''') - + if self['lpp1'] == 0 == self['lpp2']: if self['pdlabel']!='nn23nlo' or self['reweight_pdf']: self['pdlabel']='nn23nlo' @@ -5601,8 +5601,8 @@ def check_validity(self): logger.info('''Lepton-lepton collisions: ignoring PDF related parameters in the run_card.dat (pdlabel, lhaid, reweight_pdf, ...)''') # For FxFx merging, make sure that the following parameters are set correctly: - if self['ickkw'] == 3: - # 1. Renormalization and factorization (and ellis-sexton scales) are not fixed + if self['ickkw'] == 3: + # 1. Renormalization and factorization (and ellis-sexton scales) are not fixed scales=['fixed_ren_scale','fixed_fac_scale','fixed_QES_scale'] for scale in scales: if self[scale]: @@ -5615,7 +5615,7 @@ def check_validity(self): self["reweight_scale"]=[self["reweight_scale"][0]] logger.warning('''For consistency in FxFx merging, dynamical_scale_choice has been set to -1 (default)''' ,'$MG:BOLD') - + # 2. Use kT algorithm for jets with pseudo-code size R=1.0 jetparams=['jetradius','jetalgo'] for jetparam in jetparams: @@ -5628,8 +5628,8 @@ def check_validity(self): self["dynamical_scale_choice"] = [-1] self["reweight_scale"]=[self["reweight_scale"][0]] logger.warning('''For consistency with the jet veto, the scale which will be used is ptj. dynamical_scale_choice will be set at -1.''' - ,'$MG:BOLD') - + ,'$MG:BOLD') + # For interface to PINEAPPL, need to use LHAPDF and reweighting to get scale uncertainties if self['pineappl'] and self['pdlabel'].lower() != 'lhapdf': raise InvalidRunCard('PineAPPL generation only possible with the use of LHAPDF') @@ -5661,7 +5661,7 @@ def check_validity(self): if (self['rw_fscale_down'] != -1.0 and ['rw_fscale_down'] not in self['rw_fscale']) or\ (self['rw_fscale_up'] != -1.0 and ['rw_fscale_up'] not in self['rw_fscale']): self['rw_fscale']=[1.0,self['rw_fscale_up'],self['rw_fscale_down']] - + # PDF reweighting check if any(self['reweight_pdf']): # check that we use lhapdf if reweighting is ON @@ -5672,7 +5672,7 @@ def check_validity(self): if self['pdlabel'] != "lhapdf": self['reweight_pdf']=[self['reweight_pdf'][0]] self['lhaid']=[self['lhaid'][0]] - + # make sure set have reweight_scale and dyn_scale_choice of length 1 when fixed scales: if self['fixed_ren_scale'] and self['fixed_fac_scale']: self['reweight_scale']=[self['reweight_scale'][0]] @@ -5685,7 +5685,7 @@ def check_validity(self): self['reweight_pdf']=self['reweight_pdf']*len(self['lhaid']) logger.warning("Setting 'reweight_pdf' for all 'lhaid' to %s" % self['reweight_pdf'][0]) if len(self['reweight_scale']) == 1 and len(self['dynamical_scale_choice']) != 1: - self['reweight_scale']=self['reweight_scale']*len(self['dynamical_scale_choice']) + self['reweight_scale']=self['reweight_scale']*len(self['dynamical_scale_choice']) logger.warning("Setting 'reweight_scale' for all 'dynamical_scale_choice' to %s" % self['reweight_pdf'][0]) # Check that there are no identical elements in lhaid or dynamical_scale_choice @@ -5693,7 +5693,7 @@ def check_validity(self): raise InvalidRunCard("'lhaid' has two or more identical entries. They have to be all different for the code to work correctly.") if len(self['dynamical_scale_choice']) != len(set(self['dynamical_scale_choice'])): raise InvalidRunCard("'dynamical_scale_choice' has two or more identical entries. They have to be all different for the code to work correctly.") - + # Check that lenght of lists are consistent if len(self['reweight_pdf']) != len(self['lhaid']): raise InvalidRunCard("'reweight_pdf' and 'lhaid' lists should have the same length") @@ -5730,7 +5730,7 @@ def check_validity(self): if len(self['folding']) != 3: raise InvalidRunCard("'folding' should contain exactly three integers") for ifold in self['folding']: - if ifold not in [1,2,4,8]: + if ifold not in [1,2,4,8]: raise InvalidRunCard("The three 'folding' parameters should be equal to 1, 2, 4, or 8.") # Check MC@NLO-Delta if self['mcatnlo_delta'] and not self['parton_shower'].lower() == 'pythia8': @@ -5746,11 +5746,11 @@ def check_validity(self): logger.warning("At-rest proton mode set: energy beam set to 0.938 GeV") self.set('ebeam%i' %i, 0.938) else: - raise InvalidRunCard("Energy for beam %i lower than proton mass. Please fix this") + raise InvalidRunCard("Energy for beam %i lower than proton mass. Please fix this") def update_system_parameter_for_include(self): - + # set the pdg_for_cut fortran parameter pdg_to_cut = set(list(self['pt_min_pdg'].keys()) +list(self['pt_max_pdg'].keys())+ list(self['mxx_min_pdg'].keys())+ list(self['mxx_only_part_antipart'].keys())) @@ -5758,12 +5758,12 @@ def update_system_parameter_for_include(self): pdg_to_cut.discard('default') if len(pdg_to_cut)>25: raise Exception("Maximum 25 different PDGs are allowed for PDG specific cut") - + if any(int(pdg)<0 for pdg in pdg_to_cut): logger.warning('PDG specific cuts are always applied symmetrically on particles/anti-particles. Always use positve PDG codes') raise MadGraph5Error('Some PDG specific cuts are defined using negative PDG codes') - - + + if any(pdg in pdg_to_cut for pdg in [21,22,11,13,15]+ list(range(self['maxjetflavor']+1))): # Note that this will double check in the fortran code raise Exception("Can not use PDG related cuts for massless SM particles/leptons") @@ -5790,7 +5790,7 @@ def update_system_parameter_for_include(self): self[new_var].append(self[old_var][str(pdg)] if str(pdg) in self[old_var] else default) else: if str(pdg) not in self[old_var]: - raise Exception("no default value defined for %s and no value defined for pdg %s" % (old_var, pdg)) + raise Exception("no default value defined for %s and no value defined for pdg %s" % (old_var, pdg)) self[new_var].append(self[old_var][str(pdg)]) else: self['pdg_cut'] = [0] @@ -5800,12 +5800,12 @@ def update_system_parameter_for_include(self): self['mxxpart_antipart'] = [False] def write(self, output_file, template=None, python_template=False, **opt): - """Write the run_card in output_file according to template + """Write the run_card in output_file according to template (a path to a valid run_card)""" if not template: if not MADEVENT: - template = pjoin(MG5DIR, 'Template', 'NLO', 'Cards', + template = pjoin(MG5DIR, 'Template', 'NLO', 'Cards', 'run_card.dat') python_template = True else: @@ -5818,7 +5818,7 @@ def write(self, output_file, template=None, python_template=False, **opt): def create_default_for_process(self, proc_characteristic, history, proc_def): """Rules - e+ e- beam -> lpp:0 ebeam:500 + e+ e- beam -> lpp:0 ebeam:500 p p beam -> set maxjetflavor automatically process with tagged photons -> gamma_is_j = false process without QED splittings -> gamma_is_j = false, recombination = false @@ -5844,19 +5844,19 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): self['ebeam2'] = 500 else: self['lpp1'] = 0 - self['lpp2'] = 0 - + self['lpp2'] = 0 + if proc_characteristic['ninitial'] == 1: #remove all cut self.remove_all_cut() # check for tagged photons tagged_particles = set() - + # If model has running functionality add the additional parameter model = proc_def[0].get('model') if model['running_elements']: - self.display_block.append('RUNNING') + self.display_block.append('RUNNING') # Check if need matching min_particle = 99 @@ -5885,7 +5885,7 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): else: idsmin = [l['id'] for l in procmin['legs']] break - + for procmax in proc_def: if len(procmax['legs']) != max_particle: continue @@ -5901,9 +5901,9 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): else: # all are jet => matching is ON matching=True - break - - if matching: + break + + if matching: self['ickkw'] = 3 self['fixed_ren_scale'] = False self["fixed_fac_scale"] = False @@ -5911,17 +5911,17 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): self["jetalgo"] = 1 self["jetradius"] = 1 self["parton_shower"] = "PYTHIA8" - + # Read file input/default_run_card_nlo.dat # This has to be LAST !! if os.path.exists(self.default_run_card): self.read(self.default_run_card, consistency=False) - + class MadLoopParam(ConfigFile): """ a class for storing/dealing with the file MadLoopParam.dat contains a parser to read it, facilities to write a new file,... """ - + _ID_reduction_tool_map = {1:'CutTools', 2:'PJFry++', 3:'IREGI', @@ -5929,10 +5929,10 @@ class MadLoopParam(ConfigFile): 5:'Samurai', 6:'Ninja', 7:'COLLIER'} - + def default_setup(self): """initialize the directory to the default value""" - + self.add_param("MLReductionLib", "6|7|1") self.add_param("IREGIMODE", 2) self.add_param("IREGIRECY", True) @@ -5954,7 +5954,7 @@ def default_setup(self): self.add_param("HelicityFilterLevel", 2) self.add_param("LoopInitStartOver", False) self.add_param("HelInitStartOver", False) - self.add_param("UseQPIntegrandForNinja", True) + self.add_param("UseQPIntegrandForNinja", True) self.add_param("UseQPIntegrandForCutTools", True) self.add_param("COLLIERMode", 1) self.add_param("COLLIERComputeUVpoles", True) @@ -5966,9 +5966,9 @@ def default_setup(self): self.add_param("COLLIERUseInternalStabilityTest",True) def read(self, finput): - """Read the input file, this can be a path to a file, + """Read the input file, this can be a path to a file, a file object, a str with the content of the file.""" - + if isinstance(finput, str): if "\n" in finput: finput = finput.split('\n') @@ -5976,7 +5976,7 @@ def read(self, finput): finput = open(finput) else: raise Exception("No such file %s" % input) - + previous_line= '' for line in finput: if previous_line.startswith('#'): @@ -5985,20 +5985,20 @@ def read(self, finput): if len(value) and value[0] not in ['#', '!']: self.__setitem__(name, value, change_userdefine=True) previous_line = line - - + + def write(self, outputpath, template=None,commentdefault=False): - + if not template: if not MADEVENT: - template = pjoin(MG5DIR, 'Template', 'loop_material', 'StandAlone', + template = pjoin(MG5DIR, 'Template', 'loop_material', 'StandAlone', 'Cards', 'MadLoopParams.dat') else: template = pjoin(MEDIR, 'Cards', 'MadLoopParams_default.dat') fsock = open(template, 'r') template = fsock.readlines() fsock.close() - + if isinstance(outputpath, str): output = open(outputpath, 'w') else: @@ -6019,7 +6019,7 @@ def f77format(value): return value else: raise Exception("Can not format input %s" % type(value)) - + name = '' done = set() for line in template: @@ -6034,12 +6034,12 @@ def f77format(value): elif line.startswith('#'): name = line[1:].split()[0] output.write(line) - - - - - -class eMELA_info(ConfigFile): + + + + + +class eMELA_info(ConfigFile): """ a class for eMELA (LHAPDF-like) info files """ path = '' @@ -6053,7 +6053,7 @@ def __init__(self, finput, me_dir): def read(self, finput): - if isinstance(finput, file): + if isinstance(finput, file): lines = finput.open().read().split('\n') self.path = finput.name else: @@ -6066,7 +6066,7 @@ def read(self, finput): k, v = l.split(':', 1) # ignore further occurrences of : try: self[k.strip()] = eval(v) - except (NameError, SyntaxError): + except (NameError, SyntaxError): self[k.strip()] = v def default_setup(self): @@ -6091,7 +6091,7 @@ def update_epdf_emela_variables(self, banner, uvscheme): +"powers of alpha should be reweighted a posteriori") - logger.info('Updating variables according to %s' % self.path) + logger.info('Updating variables according to %s' % self.path) # Flavours in the running of alpha nd, nu, nl = self['eMELA_ActiveFlavoursAlpha'] self.log_and_update(banner, 'run_card', 'ndnq_run', nd) @@ -6130,8 +6130,8 @@ def update_epdf_emela_variables(self, banner, uvscheme): logger.warning('Cannot treat the following renormalisation schemes for ME and PDFs: %d, %d' \ % (uvscheme, uvscheme_pdf)) - # if PDFs use MSbar with fixed alpha, set the ren scale fixed to Qref - # also check that the com energy is equal to qref, otherwise print a + # if PDFs use MSbar with fixed alpha, set the ren scale fixed to Qref + # also check that the com energy is equal to qref, otherwise print a # warning if uvscheme_pdf == 1: qref = self['eMELA_AlphaQref'] @@ -6144,23 +6144,23 @@ def update_epdf_emela_variables(self, banner, uvscheme): # LL / NLL PDF (0/1) pdforder = self['eMELA_PerturbativeOrder'] - # pdfscheme = 0->MSbar; 1->DIS; 2->eta (leptonic); 3->beta (leptonic) + # pdfscheme = 0->MSbar; 1->DIS; 2->eta (leptonic); 3->beta (leptonic) # 4->mixed (leptonic); 5-> nobeta (leptonic); 6->delta (leptonic) # if LL, use nobeta scheme unless LEGACYLLPDF > 0 if pdforder == 0: if 'eMELA_LEGACYLLPDF' not in self.keys() or self['eMELA_LEGACYLLPDF'] in [-1, 0]: self.log_and_update(banner, 'run_card', 'pdfscheme', 5) - elif self['eMELA_LEGACYLLPDF'] == 1: + elif self['eMELA_LEGACYLLPDF'] == 1: # mixed self.log_and_update(banner, 'run_card', 'pdfscheme', 4) - elif self['eMELA_LEGACYLLPDF'] == 2: + elif self['eMELA_LEGACYLLPDF'] == 2: # eta self.log_and_update(banner, 'run_card', 'pdfscheme', 2) - elif self['eMELA_LEGACYLLPDF'] == 3: + elif self['eMELA_LEGACYLLPDF'] == 3: # beta self.log_and_update(banner, 'run_card', 'pdfscheme', 3) elif pdforder == 1: - # for NLL, use eMELA_FactorisationSchemeInt = 0/1 + # for NLL, use eMELA_FactorisationSchemeInt = 0/1 # for delta/MSbar if self['eMELA_FactorisationSchemeInt'] == 0: # MSbar @@ -6177,7 +6177,7 @@ def update_epdf_emela_variables(self, banner, uvscheme): - + def log_and_update(self, banner, card, par, v): """update the card parameter par to value v diff --git a/epochX/cudacpp/gg_ttgg.mad/bin/internal/gen_ximprove.py b/epochX/cudacpp/gg_ttgg.mad/bin/internal/gen_ximprove.py index 5fd170d18d..cc842aa50f 100755 --- a/epochX/cudacpp/gg_ttgg.mad/bin/internal/gen_ximprove.py +++ b/epochX/cudacpp/gg_ttgg.mad/bin/internal/gen_ximprove.py @@ -2,18 +2,18 @@ # # Copyright (c) 2014 The MadGraph5_aMC@NLO Development team and Contributors # -# This file is a part of the MadGraph5_aMC@NLO project, an application which +# This file is a part of the MadGraph5_aMC@NLO project, an application which # automatically generates Feynman diagrams and matrix elements for arbitrary # high-energy processes in the Standard Model and beyond. # -# It is subject to the MadGraph5_aMC@NLO license which should accompany this +# It is subject to the MadGraph5_aMC@NLO license which should accompany this # distribution. # # For more information, visit madgraph.phys.ucl.ac.be and amcatnlo.web.cern.ch # ################################################################################ """ A python file to replace the fortran script gen_ximprove. - This script analyses the result of the survey/ previous refine and + This script analyses the result of the survey/ previous refine and creates the jobs for the following script. """ from __future__ import division @@ -66,77 +66,77 @@ class gensym(object): """a class to call the fortran gensym executable and handle it's output in order to create the various job that are needed for the survey""" - + #convenient shortcut for the formatting of variable @ staticmethod def format_variable(*args): return bannermod.ConfigFile.format_variable(*args) - + combining_job = 2 # number of channel by ajob - splitted_grid = False + splitted_grid = False min_iterations = 3 mode= "survey" - + def __init__(self, cmd, opt=None): - + try: super(gensym, self).__init__(cmd, opt) except TypeError: pass - - # Run statistics, a dictionary of RunStatistics(), with + + # Run statistics, a dictionary of RunStatistics(), with self.run_statistics = {} - + self.cmd = cmd self.run_card = cmd.run_card self.me_dir = cmd.me_dir - - + + # dictionary to keep track of the precision when combining iteration self.cross = collections.defaultdict(int) self.abscross = collections.defaultdict(int) self.sigma = collections.defaultdict(int) self.chi2 = collections.defaultdict(int) - + self.splitted_grid = False if self.cmd.proc_characteristics['loop_induced']: nexternal = self.cmd.proc_characteristics['nexternal'] self.splitted_grid = max(2, (nexternal-2)**2) if hasattr(self.cmd, "opts") and self.cmd.opts['accuracy'] == 0.1: self.cmd.opts['accuracy'] = 0.02 - + if isinstance(cmd.cluster, cluster.MultiCore) and self.splitted_grid > 1: self.splitted_grid = int(cmd.cluster.nb_core**0.5) if self.splitted_grid == 1 and cmd.cluster.nb_core >1: self.splitted_grid = 2 - + #if the user defines it in the run_card: if self.run_card['survey_splitting'] != -1: self.splitted_grid = self.run_card['survey_splitting'] if self.run_card['survey_nchannel_per_job'] != 1 and 'survey_nchannel_per_job' in self.run_card.user_set: - self.combining_job = self.run_card['survey_nchannel_per_job'] + self.combining_job = self.run_card['survey_nchannel_per_job'] elif self.run_card['hard_survey'] > 1: self.combining_job = 1 - - + + self.splitted_Pdir = {} self.splitted_for_dir = lambda x,y: self.splitted_grid self.combining_job_for_Pdir = lambda x: self.combining_job self.lastoffset = {} - + done_warning_zero_coupling = False def get_helicity(self, to_submit=True, clean=True): """launch a single call to madevent to get the list of non zero helicity""" - - self.subproc = [l.strip() for l in open(pjoin(self.me_dir,'SubProcesses', + + self.subproc = [l.strip() for l in open(pjoin(self.me_dir,'SubProcesses', 'subproc.mg'))] subproc = self.subproc P_zero_result = [] nb_tot_proc = len(subproc) - job_list = {} - - + job_list = {} + + for nb_proc,subdir in enumerate(subproc): self.cmd.update_status('Compiling for process %s/%s.' % \ (nb_proc+1,nb_tot_proc), level=None) @@ -154,7 +154,7 @@ def get_helicity(self, to_submit=True, clean=True): p = misc.Popen(['./gensym'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT, cwd=Pdir) #sym_input = "%(points)d %(iterations)d %(accuracy)f \n" % self.opts - + (stdout, _) = p.communicate(''.encode()) stdout = stdout.decode('ascii',errors='ignore') if stdout: @@ -166,11 +166,11 @@ def get_helicity(self, to_submit=True, clean=True): if os.path.exists(pjoin(self.me_dir, 'error')): os.remove(pjoin(self.me_dir, 'error')) continue # bypass bad process - + self.cmd.compile(['madevent_forhel'], cwd=Pdir) if not os.path.exists(pjoin(Pdir, 'madevent_forhel')): - raise Exception('Error make madevent_forhel not successful') - + raise Exception('Error make madevent_forhel not successful') + if not os.path.exists(pjoin(Pdir, 'Hel')): os.mkdir(pjoin(Pdir, 'Hel')) ff = open(pjoin(Pdir, 'Hel', 'input_app.txt'),'w') @@ -180,15 +180,15 @@ def get_helicity(self, to_submit=True, clean=True): try: os.remove(pjoin(Pdir, 'Hel','results.dat')) except Exception: - pass + pass # Launch gensym - p = misc.Popen(['../madevent_forhel < input_app.txt'], stdout=subprocess.PIPE, + p = misc.Popen(['../madevent_forhel < input_app.txt'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT, cwd=pjoin(Pdir,'Hel'), shell=True) #sym_input = "%(points)d %(iterations)d %(accuracy)f \n" % self.opts (stdout, _) = p.communicate(" ".encode()) stdout = stdout.decode('ascii',errors='ignore') if os.path.exists(pjoin(self.me_dir, 'error')): - raise Exception(pjoin(self.me_dir,'error')) + raise Exception(pjoin(self.me_dir,'error')) # note a continue is not enough here, we have in top to link # the matrixX_optim.f to matrixX_orig.f to let the code to work # after this error. @@ -203,7 +203,7 @@ def get_helicity(self, to_submit=True, clean=True): zero_gc = list() all_zampperhel = set() all_bad_amps_perhel = set() - + for line in stdout.splitlines(): if "=" not in line and ":" not in line: continue @@ -229,22 +229,22 @@ def get_helicity(self, to_submit=True, clean=True): "%s\n" % (' '.join(zero_gc)) +\ "This will slow down the computation. Please consider using restricted model:\n" +\ "https://answers.launchpad.net/mg5amcnlo/+faq/2312") - - + + all_good_hels = collections.defaultdict(list) for me_index, hel in all_hel: - all_good_hels[me_index].append(int(hel)) - + all_good_hels[me_index].append(int(hel)) + #print(all_hel) if self.run_card['hel_zeroamp']: all_bad_amps = collections.defaultdict(list) for me_index, amp in all_zamp: all_bad_amps[me_index].append(int(amp)) - + all_bad_amps_perhel = collections.defaultdict(list) for me_index, hel, amp in all_zampperhel: - all_bad_amps_perhel[me_index].append((int(hel),int(amp))) - + all_bad_amps_perhel[me_index].append((int(hel),int(amp))) + elif all_zamp: nb_zero = sum(int(a[1]) for a in all_zamp) if zero_gc: @@ -254,7 +254,7 @@ def get_helicity(self, to_submit=True, clean=True): else: logger.warning("The optimization detected that you have %i zero matrix-element for this SubProcess: %s.\n" % nb_zero +\ "This part can optimize if you set the flag hel_zeroamp to True in the run_card.") - + #check if we need to do something and write associate information" data = [all_hel, all_zamp, all_bad_amps_perhel] if not self.run_card['hel_zeroamp']: @@ -266,14 +266,14 @@ def get_helicity(self, to_submit=True, clean=True): old_data = open(pjoin(Pdir,'Hel','selection')).read() if old_data == data: continue - - + + with open(pjoin(Pdir,'Hel','selection'),'w') as fsock: - fsock.write(data) - - + fsock.write(data) + + for matrix_file in misc.glob('matrix*orig.f', Pdir): - + split_file = matrix_file.split('/') me_index = split_file[-1][len('matrix'):-len('_orig.f')] @@ -289,11 +289,11 @@ def get_helicity(self, to_submit=True, clean=True): #good_hels = sorted(list(good_hels)) good_hels = [str(x) for x in sorted(all_good_hels[me_index])] if self.run_card['hel_zeroamp']: - + bad_amps = [str(x) for x in sorted(all_bad_amps[me_index])] bad_amps_perhel = [x for x in sorted(all_bad_amps_perhel[me_index])] else: - bad_amps = [] + bad_amps = [] bad_amps_perhel = [] if __debug__: mtext = open(matrix_file).read() @@ -310,7 +310,7 @@ def get_helicity(self, to_submit=True, clean=True): recycler.set_input(matrix_file) recycler.set_output(out_file) - recycler.set_template(templ_file) + recycler.set_template(templ_file) recycler.generate_output_file() del recycler @@ -321,19 +321,19 @@ def get_helicity(self, to_submit=True, clean=True): return {}, P_zero_result - + def launch(self, to_submit=True, clean=True): """ """ if not hasattr(self, 'subproc'): - self.subproc = [l.strip() for l in open(pjoin(self.me_dir,'SubProcesses', + self.subproc = [l.strip() for l in open(pjoin(self.me_dir,'SubProcesses', 'subproc.mg'))] subproc = self.subproc - + P_zero_result = [] # check the number of times where they are no phase-space - + nb_tot_proc = len(subproc) - job_list = {} + job_list = {} for nb_proc,subdir in enumerate(subproc): self.cmd.update_status('Compiling for process %s/%s.
(previous processes already running)' % \ (nb_proc+1,nb_tot_proc), level=None) @@ -341,7 +341,7 @@ def launch(self, to_submit=True, clean=True): subdir = subdir.strip() Pdir = pjoin(self.me_dir, 'SubProcesses',subdir) logger.info(' %s ' % subdir) - + # clean previous run if clean: for match in misc.glob('*ajob*', Pdir): @@ -349,17 +349,17 @@ def launch(self, to_submit=True, clean=True): os.remove(match) for match in misc.glob('G*', Pdir): if os.path.exists(pjoin(match,'results.dat')): - os.remove(pjoin(match, 'results.dat')) + os.remove(pjoin(match, 'results.dat')) if os.path.exists(pjoin(match, 'ftn25')): - os.remove(pjoin(match, 'ftn25')) - + os.remove(pjoin(match, 'ftn25')) + #compile gensym self.cmd.compile(['gensym'], cwd=Pdir) if not os.path.exists(pjoin(Pdir, 'gensym')): - raise Exception('Error make gensym not successful') - + raise Exception('Error make gensym not successful') + # Launch gensym - p = misc.Popen(['./gensym'], stdout=subprocess.PIPE, + p = misc.Popen(['./gensym'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT, cwd=Pdir) #sym_input = "%(points)d %(iterations)d %(accuracy)f \n" % self.opts (stdout, _) = p.communicate(''.encode()) @@ -367,8 +367,8 @@ def launch(self, to_submit=True, clean=True): if os.path.exists(pjoin(self.me_dir,'error')): files.mv(pjoin(self.me_dir,'error'), pjoin(Pdir,'ajob.no_ps.log')) P_zero_result.append(subdir) - continue - + continue + jobs = stdout.split() job_list[Pdir] = jobs try: @@ -386,8 +386,8 @@ def launch(self, to_submit=True, clean=True): continue else: if done: - raise Exception('Parsing error in gensym: %s' % stdout) - job_list[Pdir] = l.split() + raise Exception('Parsing error in gensym: %s' % stdout) + job_list[Pdir] = l.split() done = True if not done: raise Exception('Parsing error in gensym: %s' % stdout) @@ -408,16 +408,16 @@ def launch(self, to_submit=True, clean=True): if to_submit: self.submit_to_cluster(job_list) job_list = {} - + return job_list, P_zero_result - + def resubmit(self, min_precision=1.0, resubmit_zero=False): """collect the result of the current run and relaunch each channel - not completed or optionally a completed one with a precision worse than + not completed or optionally a completed one with a precision worse than a threshold (and/or the zero result channel)""" - + job_list, P_zero_result = self.launch(to_submit=False, clean=False) - + for P , jobs in dict(job_list).items(): misc.sprint(jobs) to_resub = [] @@ -434,7 +434,7 @@ def resubmit(self, min_precision=1.0, resubmit_zero=False): elif max(one_result.xerru, one_result.xerrc)/one_result.xsec > min_precision: to_resub.append(job) else: - to_resub.append(job) + to_resub.append(job) if to_resub: for G in to_resub: try: @@ -442,19 +442,19 @@ def resubmit(self, min_precision=1.0, resubmit_zero=False): except Exception as error: misc.sprint(error) pass - misc.sprint(to_resub) + misc.sprint(to_resub) self.submit_to_cluster({P: to_resub}) - - - - - - - - - - - + + + + + + + + + + + def submit_to_cluster(self, job_list): """ """ @@ -467,7 +467,7 @@ def submit_to_cluster(self, job_list): nexternal = self.cmd.proc_characteristics['nexternal'] current = open(pjoin(path, "nexternal.inc")).read() ext = re.search(r"PARAMETER \(NEXTERNAL=(\d+)\)", current).group(1) - + if self.run_card['job_strategy'] == 2: self.splitted_grid = 2 if nexternal == int(ext): @@ -498,18 +498,18 @@ def submit_to_cluster(self, job_list): return self.submit_to_cluster_no_splitting(job_list) else: return self.submit_to_cluster_splitted(job_list) - - + + def submit_to_cluster_no_splitting(self, job_list): """submit the survey without the parralelization. This is the old mode which is still usefull in single core""" - - # write the template file for the parameter file + + # write the template file for the parameter file self.write_parameter(parralelization=False, Pdirs=list(job_list.keys())) - - + + # launch the job with the appropriate grouping - for Pdir, jobs in job_list.items(): + for Pdir, jobs in job_list.items(): jobs = list(jobs) i=0 while jobs: @@ -518,16 +518,16 @@ def submit_to_cluster_no_splitting(self, job_list): for _ in range(self.combining_job_for_Pdir(Pdir)): if jobs: to_submit.append(jobs.pop(0)) - + self.cmd.launch_job(pjoin(self.me_dir, 'SubProcesses', 'survey.sh'), argument=to_submit, cwd=pjoin(self.me_dir,'SubProcesses' , Pdir)) - + def create_resubmit_one_iter(self, Pdir, G, submit_ps, nb_job, step=0): """prepare the input_file for submitting the channel""" - + if 'SubProcesses' not in Pdir: Pdir = pjoin(self.me_dir, 'SubProcesses', Pdir) @@ -535,8 +535,8 @@ def create_resubmit_one_iter(self, Pdir, G, submit_ps, nb_job, step=0): self.splitted_Pdir[(Pdir, G)] = int(nb_job) - # 1. write the new input_app.txt - run_card = self.cmd.run_card + # 1. write the new input_app.txt + run_card = self.cmd.run_card options = {'event' : submit_ps, 'maxiter': 1, 'miniter': 1, @@ -545,29 +545,29 @@ def create_resubmit_one_iter(self, Pdir, G, submit_ps, nb_job, step=0): else run_card['nhel'], 'gridmode': -2, 'channel' : G - } - + } + Gdir = pjoin(Pdir, 'G%s' % G) - self.write_parameter_file(pjoin(Gdir, 'input_app.txt'), options) - + self.write_parameter_file(pjoin(Gdir, 'input_app.txt'), options) + # 2. check that ftn25 exists. - assert os.path.exists(pjoin(Gdir, "ftn25")) - - + assert os.path.exists(pjoin(Gdir, "ftn25")) + + # 3. Submit the new jobs #call back function - packet = cluster.Packet((Pdir, G, step+1), + packet = cluster.Packet((Pdir, G, step+1), self.combine_iteration, (Pdir, G, step+1)) - + if step ==0: - self.lastoffset[(Pdir, G)] = 0 - - # resubmit the new jobs + self.lastoffset[(Pdir, G)] = 0 + + # resubmit the new jobs for i in range(int(nb_job)): name = "G%s_%s" % (G,i+1) self.lastoffset[(Pdir, G)] += 1 - offset = self.lastoffset[(Pdir, G)] + offset = self.lastoffset[(Pdir, G)] self.cmd.launch_job(pjoin(self.me_dir, 'SubProcesses', 'refine_splitted.sh'), argument=[name, 'G%s'%G, offset], cwd= Pdir, @@ -575,9 +575,9 @@ def create_resubmit_one_iter(self, Pdir, G, submit_ps, nb_job, step=0): def submit_to_cluster_splitted(self, job_list): - """ submit the version of the survey with splitted grid creation - """ - + """ submit the version of the survey with splitted grid creation + """ + #if self.splitted_grid <= 1: # return self.submit_to_cluster_no_splitting(job_list) @@ -592,7 +592,7 @@ def submit_to_cluster_splitted(self, job_list): for job in jobs: packet = cluster.Packet((Pdir, job, 1), self.combine_iteration, (Pdir, job, 1)) - for i in range(self.splitted_for_dir(Pdir, job)): + for i in range(self.splitted_for_dir(Pdir, job)): self.cmd.launch_job(pjoin(self.me_dir, 'SubProcesses', 'survey.sh'), argument=[i+1, job], cwd=pjoin(self.me_dir,'SubProcesses' , Pdir), @@ -601,15 +601,15 @@ def submit_to_cluster_splitted(self, job_list): def combine_iteration(self, Pdir, G, step): grid_calculator, cross, error = self.combine_grid(Pdir, G, step) - - # Compute the number of events used for this run. + + # Compute the number of events used for this run. nb_events = grid_calculator.target_evt Gdirs = [] #build the the list of directory for i in range(self.splitted_for_dir(Pdir, G)): path = pjoin(Pdir, "G%s_%s" % (G, i+1)) Gdirs.append(path) - + # 4. make the submission of the next iteration # Three cases - less than 3 iteration -> continue # - more than 3 and less than 5 -> check error @@ -627,15 +627,15 @@ def combine_iteration(self, Pdir, G, step): need_submit = False else: need_submit = True - + elif step >= self.cmd.opts['iterations']: need_submit = False elif self.cmd.opts['accuracy'] < 0: #check for luminosity raise Exception("Not Implemented") elif self.abscross[(Pdir,G)] == 0: - need_submit = False - else: + need_submit = False + else: across = self.abscross[(Pdir,G)]/(self.sigma[(Pdir,G)]+1e-99) tot_across = self.get_current_axsec() if across == 0: @@ -646,20 +646,20 @@ def combine_iteration(self, Pdir, G, step): need_submit = True else: need_submit = False - - + + if cross: grid_calculator.write_grid_for_submission(Pdir,G, self.splitted_for_dir(Pdir, G), nb_events,mode=self.mode, conservative_factor=5.0) - - xsec_format = '.%ig'%(max(3,int(math.log10(1.0/float(error)))+2) - if float(cross)!=0.0 and float(error)!=0.0 else 8) + + xsec_format = '.%ig'%(max(3,int(math.log10(1.0/float(error)))+2) + if float(cross)!=0.0 and float(error)!=0.0 else 8) if need_submit: message = "%%s/G%%s is at %%%s +- %%.3g pb. Now submitting iteration #%s."%(xsec_format, step+1) logger.info(message%\ - (os.path.basename(Pdir), G, float(cross), + (os.path.basename(Pdir), G, float(cross), float(error)*float(cross))) self.resubmit_survey(Pdir,G, Gdirs, step) elif cross: @@ -670,26 +670,26 @@ def combine_iteration(self, Pdir, G, step): newGpath = pjoin(self.me_dir,'SubProcesses' , Pdir, 'G%s' % G) if not os.path.exists(newGpath): os.mkdir(newGpath) - + # copy the new grid: - files.cp(pjoin(Gdirs[0], 'ftn25'), + files.cp(pjoin(Gdirs[0], 'ftn25'), pjoin(self.me_dir,'SubProcesses' , Pdir, 'G%s' % G, 'ftn26')) - + # copy the events fsock = open(pjoin(newGpath, 'events.lhe'), 'w') for Gdir in Gdirs: - fsock.write(open(pjoin(Gdir, 'events.lhe')).read()) - + fsock.write(open(pjoin(Gdir, 'events.lhe')).read()) + # copy one log - files.cp(pjoin(Gdirs[0], 'log.txt'), + files.cp(pjoin(Gdirs[0], 'log.txt'), pjoin(self.me_dir,'SubProcesses' , Pdir, 'G%s' % G)) - - + + # create the appropriate results.dat self.write_results(grid_calculator, cross, error, Pdir, G, step) else: logger.info("Survey finished for %s/G%s [0 cross]", os.path.basename(Pdir),G) - + Gdir = pjoin(self.me_dir,'SubProcesses' , Pdir, 'G%s' % G) if not os.path.exists(Gdir): os.mkdir(Gdir) @@ -697,21 +697,21 @@ def combine_iteration(self, Pdir, G, step): files.cp(pjoin(Gdirs[0], 'log.txt'), Gdir) # create the appropriate results.dat self.write_results(grid_calculator, cross, error, Pdir, G, step) - + return 0 def combine_grid(self, Pdir, G, step, exclude_sub_jobs=[]): """ exclude_sub_jobs is to remove some of the subjobs if a numerical issue is detected in one of them. Warning is issue when this occurs. """ - + # 1. create an object to combine the grid information and fill it grid_calculator = combine_grid.grid_information(self.run_card['nhel']) - + for i in range(self.splitted_for_dir(Pdir, G)): if i in exclude_sub_jobs: continue - path = pjoin(Pdir, "G%s_%s" % (G, i+1)) + path = pjoin(Pdir, "G%s_%s" % (G, i+1)) fsock = misc.mult_try_open(pjoin(path, 'results.dat')) one_result = grid_calculator.add_results_information(fsock) fsock.close() @@ -723,9 +723,9 @@ def combine_grid(self, Pdir, G, step, exclude_sub_jobs=[]): fsock.close() os.remove(pjoin(path, 'results.dat')) #os.remove(pjoin(path, 'grid_information')) - - - + + + #2. combine the information about the total crossection / error # start by keep the interation in memory cross, across, sigma = grid_calculator.get_cross_section() @@ -736,12 +736,12 @@ def combine_grid(self, Pdir, G, step, exclude_sub_jobs=[]): if maxwgt: nunwgt = grid_calculator.get_nunwgt(maxwgt) # Make sure not to apply the security below during the first step of the - # survey. Also, disregard channels with a contribution relative to the + # survey. Also, disregard channels with a contribution relative to the # total cross-section smaller than 1e-8 since in this case it is unlikely # that this channel will need more than 1 event anyway. apply_instability_security = False rel_contrib = 0.0 - if (self.__class__ != gensym or step > 1): + if (self.__class__ != gensym or step > 1): Pdir_across = 0.0 Gdir_across = 0.0 for (mPdir,mG) in self.abscross.keys(): @@ -750,7 +750,7 @@ def combine_grid(self, Pdir, G, step, exclude_sub_jobs=[]): (self.sigma[(mPdir,mG)]+1e-99)) if mG == G: Gdir_across += (self.abscross[(mPdir,mG)]/ - (self.sigma[(mPdir,mG)]+1e-99)) + (self.sigma[(mPdir,mG)]+1e-99)) rel_contrib = abs(Gdir_across/(Pdir_across+1e-99)) if rel_contrib > (1.0e-8) and \ nunwgt < 2 and len(grid_calculator.results) > 1: @@ -770,14 +770,14 @@ def combine_grid(self, Pdir, G, step, exclude_sub_jobs=[]): exclude_sub_jobs = list(exclude_sub_jobs) exclude_sub_jobs.append(th_maxwgt[-1][1]) grid_calculator.results.run_statistics['skipped_subchannel'] += 1 - + # Add some monitoring of the problematic events - gPath = pjoin(Pdir, "G%s_%s" % (G, th_maxwgt[-1][1]+1)) + gPath = pjoin(Pdir, "G%s_%s" % (G, th_maxwgt[-1][1]+1)) if os.path.isfile(pjoin(gPath,'events.lhe')): lhe_file = lhe_parser.EventFile(pjoin(gPath,'events.lhe')) discardedPath = pjoin(Pdir,'DiscardedUnstableEvents') if not os.path.exists(discardedPath): - os.mkdir(discardedPath) + os.mkdir(discardedPath) if os.path.isdir(discardedPath): # Keep only the event with a maximum weight, as it surely # is the problematic one. @@ -790,10 +790,10 @@ def combine_grid(self, Pdir, G, step, exclude_sub_jobs=[]): lhe_file.close() evtRecord.write(pjoin(gPath,'events.lhe').read()) evtRecord.close() - + return self.combine_grid(Pdir, G, step, exclude_sub_jobs) - + if across !=0: if sigma != 0: self.cross[(Pdir,G)] += cross**3/sigma**2 @@ -814,10 +814,10 @@ def combine_grid(self, Pdir, G, step, exclude_sub_jobs=[]): self.chi2[(Pdir,G)] = 0 cross = self.cross[(Pdir,G)] error = 0 - + else: error = 0 - + grid_calculator.results.compute_values(update_statistics=True) if (str(os.path.basename(Pdir)), G) in self.run_statistics: self.run_statistics[(str(os.path.basename(Pdir)), G)]\ @@ -825,8 +825,8 @@ def combine_grid(self, Pdir, G, step, exclude_sub_jobs=[]): else: self.run_statistics[(str(os.path.basename(Pdir)), G)] = \ grid_calculator.results.run_statistics - - self.warnings_from_statistics(G, grid_calculator.results.run_statistics) + + self.warnings_from_statistics(G, grid_calculator.results.run_statistics) stats_msg = grid_calculator.results.run_statistics.nice_output( '/'.join([os.path.basename(Pdir),'G%s'%G])) @@ -836,7 +836,7 @@ def combine_grid(self, Pdir, G, step, exclude_sub_jobs=[]): # Clean up grid_information to avoid border effects in case of a crash for i in range(self.splitted_for_dir(Pdir, G)): path = pjoin(Pdir, "G%s_%s" % (G, i+1)) - try: + try: os.remove(pjoin(path, 'grid_information')) except OSError as oneerror: if oneerror.errno != 2: @@ -850,7 +850,7 @@ def warnings_from_statistics(self,G,stats): return EPS_fraction = float(stats['exceptional_points'])/stats['n_madloop_calls'] - + msg = "Channel %s has encountered a fraction of %.3g\n"+ \ "of numerically unstable loop matrix element computations\n"+\ "(which could not be rescued using quadruple precision).\n"+\ @@ -861,16 +861,16 @@ def warnings_from_statistics(self,G,stats): elif EPS_fraction > 0.01: logger.critical((msg%(G,EPS_fraction)).replace('might', 'can')) raise Exception((msg%(G,EPS_fraction)).replace('might', 'can')) - + def get_current_axsec(self): - + across = 0 for (Pdir,G) in self.abscross: across += self.abscross[(Pdir,G)]/(self.sigma[(Pdir,G)]+1e-99) return across - + def write_results(self, grid_calculator, cross, error, Pdir, G, step): - + #compute the value if cross == 0: abscross,nw, luminosity = 0, 0, 0 @@ -888,7 +888,7 @@ def write_results(self, grid_calculator, cross, error, Pdir, G, step): maxwgt = grid_calculator.get_max_wgt() nunwgt = grid_calculator.get_nunwgt() luminosity = nunwgt/cross - + #format the results.dat def fstr(nb): data = '%E' % nb @@ -897,20 +897,20 @@ def fstr(nb): power = int(power) + 1 return '%.5fE%+03i' %(nb,power) line = '%s %s %s %i %i %i %i %s %s %s %s 0.0 0\n' % \ - (fstr(cross), fstr(error*cross), fstr(error*cross), + (fstr(cross), fstr(error*cross), fstr(error*cross), nevents, nw, maxit,nunwgt, fstr(luminosity), fstr(wgt), fstr(abscross), fstr(maxwgt)) - + fsock = open(pjoin(self.me_dir,'SubProcesses' , Pdir, 'G%s' % G, - 'results.dat'),'w') + 'results.dat'),'w') fsock.writelines(line) fsock.close() - + def resubmit_survey(self, Pdir, G, Gdirs, step): """submit the next iteration of the survey""" # 1. write the new input_app.txt to double the number of points - run_card = self.cmd.run_card + run_card = self.cmd.run_card options = {'event' : 2**(step) * self.cmd.opts['points'] / self.splitted_grid, 'maxiter': 1, 'miniter': 1, @@ -919,18 +919,18 @@ def resubmit_survey(self, Pdir, G, Gdirs, step): else run_card['nhel'], 'gridmode': -2, 'channel' : '' - } - + } + if int(options['helicity']) == 1: options['event'] = options['event'] * 2**(self.cmd.proc_characteristics['nexternal']//3) - + for Gdir in Gdirs: - self.write_parameter_file(pjoin(Gdir, 'input_app.txt'), options) - - + self.write_parameter_file(pjoin(Gdir, 'input_app.txt'), options) + + #2. resubmit the new jobs packet = cluster.Packet((Pdir, G, step+1), self.combine_iteration, \ - (Pdir, G, step+1)) + (Pdir, G, step+1)) nb_step = len(Gdirs) * (step+1) for i,subdir in enumerate(Gdirs): subdir = subdir.rsplit('_',1)[1] @@ -938,34 +938,34 @@ def resubmit_survey(self, Pdir, G, Gdirs, step): offset = nb_step+i+1 offset=str(offset) tag = "%s.%s" % (subdir, offset) - + self.cmd.launch_job(pjoin(self.me_dir, 'SubProcesses', 'survey.sh'), argument=[tag, G], cwd=pjoin(self.me_dir,'SubProcesses' , Pdir), packet_member=packet) - + def write_parameter_file(self, path, options): """ """ - + template =""" %(event)s %(maxiter)s %(miniter)s !Number of events and max and min iterations %(accuracy)s !Accuracy %(gridmode)s !Grid Adjustment 0=none, 2=adjust 1 !Suppress Amplitude 1=yes %(helicity)s !Helicity Sum/event 0=exact - %(channel)s """ + %(channel)s """ options['event'] = int(options['event']) open(path, 'w').write(template % options) - - + + def write_parameter(self, parralelization, Pdirs=None): """Write the parameter of the survey run""" run_card = self.cmd.run_card - + options = {'event' : self.cmd.opts['points'], 'maxiter': self.cmd.opts['iterations'], 'miniter': self.min_iterations, @@ -975,36 +975,36 @@ def write_parameter(self, parralelization, Pdirs=None): 'gridmode': 2, 'channel': '' } - + if int(options['helicity'])== 1: options['event'] = options['event'] * 2**(self.cmd.proc_characteristics['nexternal']//3) - + if parralelization: options['gridmode'] = -2 options['maxiter'] = 1 #this is automatic in dsample anyway options['miniter'] = 1 #this is automatic in dsample anyway options['event'] /= self.splitted_grid - + if not Pdirs: Pdirs = self.subproc - + for Pdir in Pdirs: - path =pjoin(Pdir, 'input_app.txt') + path =pjoin(Pdir, 'input_app.txt') self.write_parameter_file(path, options) - - -class gen_ximprove(object): - - + + +class gen_ximprove(object): + + # some hardcoded value which impact the generation gen_events_security = 1.2 # multiply the number of requested event by this number for security combining_job = 0 # allow to run multiple channel in sequence - max_request_event = 1000 # split jobs if a channel if it needs more than that + max_request_event = 1000 # split jobs if a channel if it needs more than that max_event_in_iter = 5000 min_event_in_iter = 1000 - max_splitting = 130 # maximum duplication of a given channel - min_iter = 3 + max_splitting = 130 # maximum duplication of a given channel + min_iter = 3 max_iter = 9 keep_grid_for_refine = False # only apply if needed to split the job @@ -1022,7 +1022,7 @@ def __new__(cls, cmd, opt): return super(gen_ximprove, cls).__new__(gen_ximprove_gridpack) elif cls.force_class == 'loop_induced': return super(gen_ximprove, cls).__new__(gen_ximprove_share) - + if cmd.proc_characteristics['loop_induced']: return super(gen_ximprove, cls).__new__(gen_ximprove_share) elif gen_ximprove.format_variable(cmd.run_card['gridpack'], bool): @@ -1031,31 +1031,31 @@ def __new__(cls, cmd, opt): return super(gen_ximprove, cls).__new__(gen_ximprove_share) else: return super(gen_ximprove, cls).__new__(gen_ximprove_v4) - - + + def __init__(self, cmd, opt=None): - + try: super(gen_ximprove, self).__init__(cmd, opt) except TypeError: pass - + self.run_statistics = {} self.cmd = cmd self.run_card = cmd.run_card run_card = self.run_card self.me_dir = cmd.me_dir - + #extract from the run_card the information that we need. self.gridpack = run_card['gridpack'] self.nhel = run_card['nhel'] if "nhel_refine" in run_card: self.nhel = run_card["nhel_refine"] - + if self.run_card['refine_evt_by_job'] != -1: self.max_request_event = run_card['refine_evt_by_job'] - - + + # Default option for the run self.gen_events = True self.parralel = False @@ -1066,7 +1066,7 @@ def __init__(self, cmd, opt=None): # parameter for the gridpack run self.nreq = 2000 self.iseed = 4321 - + # placeholder for information self.results = 0 #updated in launch/update_html @@ -1074,16 +1074,16 @@ def __init__(self, cmd, opt=None): self.configure(opt) elif isinstance(opt, bannermod.GridpackCard): self.configure_gridpack(opt) - + def __call__(self): return self.launch() - + def launch(self): - """running """ - + """running """ + #start the run self.handle_seed() - self.results = sum_html.collect_result(self.cmd, + self.results = sum_html.collect_result(self.cmd, main_dir=pjoin(self.cmd.me_dir,'SubProcesses')) #main_dir is for gridpack readonly mode if self.gen_events: # We run to provide a given number of events @@ -1095,15 +1095,15 @@ def launch(self): def configure(self, opt): """Defines some parameter of the run""" - + for key, value in opt.items(): if key in self.__dict__: targettype = type(getattr(self, key)) setattr(self, key, self.format_variable(value, targettype, key)) else: raise Exception('%s not define' % key) - - + + # special treatment always do outside the loop to avoid side effect if 'err_goal' in opt: if self.err_goal < 1: @@ -1113,24 +1113,24 @@ def configure(self, opt): logger.info("Generating %s unweighted events." % self.err_goal) self.gen_events = True self.err_goal = self.err_goal * self.gen_events_security # security - + def handle_seed(self): """not needed but for gridpack --which is not handle here for the moment""" return - - + + def find_job_for_event(self): """return the list of channel that need to be improved""" - + assert self.err_goal >=1 self.err_goal = int(self.err_goal) - - goal_lum = self.err_goal/(self.results.axsec+1e-99) #pb^-1 + + goal_lum = self.err_goal/(self.results.axsec+1e-99) #pb^-1 logger.info('Effective Luminosity %s pb^-1', goal_lum) - + all_channels = sum([list(P) for P in self.results],[]) - all_channels.sort(key= lambda x:x.get('luminosity'), reverse=True) - + all_channels.sort(key= lambda x:x.get('luminosity'), reverse=True) + to_refine = [] for C in all_channels: if C.get('axsec') == 0: @@ -1141,61 +1141,61 @@ def find_job_for_event(self): elif C.get('xerr') > max(C.get('axsec'), (1/(100*math.sqrt(self.err_goal)))*all_channels[-1].get('axsec')): to_refine.append(C) - - logger.info('need to improve %s channels' % len(to_refine)) + + logger.info('need to improve %s channels' % len(to_refine)) return goal_lum, to_refine def update_html(self): """update the html from this object since it contains all the information""" - + run = self.cmd.results.current['run_name'] if not os.path.exists(pjoin(self.cmd.me_dir, 'HTML', run)): os.mkdir(pjoin(self.cmd.me_dir, 'HTML', run)) - + unit = self.cmd.results.unit - P_text = "" - if self.results: - Presults = self.results + P_text = "" + if self.results: + Presults = self.results else: self.results = sum_html.collect_result(self.cmd, None) Presults = self.results - + for P_comb in Presults: - P_text += P_comb.get_html(run, unit, self.cmd.me_dir) - - Presults.write_results_dat(pjoin(self.cmd.me_dir,'SubProcesses', 'results.dat')) - + P_text += P_comb.get_html(run, unit, self.cmd.me_dir) + + Presults.write_results_dat(pjoin(self.cmd.me_dir,'SubProcesses', 'results.dat')) + fsock = open(pjoin(self.cmd.me_dir, 'HTML', run, 'results.html'),'w') fsock.write(sum_html.results_header) fsock.write('%s
' % Presults.get_html(run, unit, self.cmd.me_dir)) - fsock.write('%s
' % P_text) - + fsock.write('%s ' % P_text) + self.cmd.results.add_detail('cross', Presults.xsec) - self.cmd.results.add_detail('error', Presults.xerru) - - return Presults.xsec, Presults.xerru + self.cmd.results.add_detail('error', Presults.xerru) + + return Presults.xsec, Presults.xerru + - class gen_ximprove_v4(gen_ximprove): - + # some hardcoded value which impact the generation gen_events_security = 1.2 # multiply the number of requested event by this number for security combining_job = 0 # allow to run multiple channel in sequence - max_request_event = 1000 # split jobs if a channel if it needs more than that + max_request_event = 1000 # split jobs if a channel if it needs more than that max_event_in_iter = 5000 min_event_in_iter = 1000 - max_splitting = 130 # maximum duplication of a given channel - min_iter = 3 + max_splitting = 130 # maximum duplication of a given channel + min_iter = 3 max_iter = 9 keep_grid_for_refine = False # only apply if needed to split the job - def __init__(self, cmd, opt=None): - + def __init__(self, cmd, opt=None): + super(gen_ximprove_v4, self).__init__(cmd, opt) - + if cmd.opts['accuracy'] < cmd._survey_options['accuracy'][1]: self.increase_precision(cmd._survey_options['accuracy'][1]/cmd.opts['accuracy']) @@ -1203,7 +1203,7 @@ def reset_multijob(self): for path in misc.glob(pjoin('*', '*','multijob.dat'), pjoin(self.me_dir, 'SubProcesses')): open(path,'w').write('0\n') - + def write_multijob(self, Channel, nb_split): """ """ if nb_split <=1: @@ -1211,7 +1211,7 @@ def write_multijob(self, Channel, nb_split): f = open(pjoin(self.me_dir, 'SubProcesses', Channel.get('name'), 'multijob.dat'), 'w') f.write('%i\n' % nb_split) f.close() - + def increase_precision(self, rate=3): #misc.sprint(rate) if rate < 3: @@ -1222,25 +1222,25 @@ def increase_precision(self, rate=3): rate = rate -2 self.max_event_in_iter = int((rate+1) * 10000) self.min_events = int(rate+2) * 2500 - self.gen_events_security = 1 + 0.1 * (rate+2) - + self.gen_events_security = 1 + 0.1 * (rate+2) + if int(self.nhel) == 1: self.min_event_in_iter *= 2**(self.cmd.proc_characteristics['nexternal']//3) self.max_event_in_iter *= 2**(self.cmd.proc_characteristics['nexternal']//2) - - + + alphabet = "abcdefghijklmnopqrstuvwxyz" def get_job_for_event(self): """generate the script in order to generate a given number of event""" # correspond to write_gen in the fortran version - - + + goal_lum, to_refine = self.find_job_for_event() #reset the potential multijob of previous run self.reset_multijob() - + jobs = [] # list of the refine if some job are split is list of # dict with the parameter of the run. @@ -1257,17 +1257,17 @@ def get_job_for_event(self): else: for i in range(len(to_refine) //3): new_order.append(to_refine[i]) - new_order.append(to_refine[-2*i-1]) + new_order.append(to_refine[-2*i-1]) new_order.append(to_refine[-2*i-2]) if len(to_refine) % 3 == 1: - new_order.append(to_refine[i+1]) + new_order.append(to_refine[i+1]) elif len(to_refine) % 3 == 2: - new_order.append(to_refine[i+2]) + new_order.append(to_refine[i+2]) #ensure that the reordering is done nicely assert set([id(C) for C in to_refine]) == set([id(C) for C in new_order]) - to_refine = new_order - - + to_refine = new_order + + # loop over the channel to refine for C in to_refine: #1. Compute the number of points are needed to reach target @@ -1279,7 +1279,7 @@ def get_job_for_event(self): nb_split = self.max_splitting nb_split=max(1, nb_split) - + #2. estimate how many points we need in each iteration if C.get('nunwgt') > 0: nevents = needed_event / nb_split * (C.get('nevents') / C.get('nunwgt')) @@ -1296,21 +1296,21 @@ def get_job_for_event(self): nevents = max(self.min_event_in_iter, min(self.max_event_in_iter, nevents)) logger.debug("%s : need %s event. Need %s split job of %s points", C.name, needed_event, nb_split, nevents) - + # write the multi-job information self.write_multijob(C, nb_split) - + packet = cluster.Packet((C.parent_name, C.name), combine_runs.CombineRuns, (pjoin(self.me_dir, 'SubProcesses', C.parent_name)), {"subproc": C.name, "nb_split":nb_split}) - - + + #create the info dict assume no splitting for the default info = {'name': self.cmd.results.current['run_name'], 'script_name': 'unknown', 'directory': C.name, # need to be change for splitted job - 'P_dir': C.parent_name, + 'P_dir': C.parent_name, 'Ppath': pjoin(self.cmd.me_dir, 'SubProcesses', C.parent_name), 'offset': 1, # need to be change for splitted job 'nevents': nevents, @@ -1321,7 +1321,7 @@ def get_job_for_event(self): 'channel': C.name.replace('G',''), 'grid_refinment' : 0, #no refinment of the grid 'base_directory': '', #should be change in splitted job if want to keep the grid - 'packet': packet, + 'packet': packet, } if nb_split == 1: @@ -1334,19 +1334,19 @@ def get_job_for_event(self): if self.keep_grid_for_refine: new_info['base_directory'] = info['directory'] jobs.append(new_info) - - self.create_ajob(pjoin(self.me_dir, 'SubProcesses', 'refine.sh'), jobs) - + + self.create_ajob(pjoin(self.me_dir, 'SubProcesses', 'refine.sh'), jobs) + def create_ajob(self, template, jobs, write_dir=None): """create the ajob""" - + if not jobs: return if not write_dir: write_dir = pjoin(self.me_dir, 'SubProcesses') - + #filter the job according to their SubProcess directory # no mix submition P2job= collections.defaultdict(list) for j in jobs: @@ -1355,11 +1355,11 @@ def create_ajob(self, template, jobs, write_dir=None): for P in P2job.values(): self.create_ajob(template, P, write_dir) return - - + + #Here we can assume that all job are for the same directory. path = pjoin(write_dir, jobs[0]['P_dir']) - + template_text = open(template, 'r').read() # special treatment if needed to combine the script # computes how many submition miss one job @@ -1384,8 +1384,8 @@ def create_ajob(self, template, jobs, write_dir=None): skip1=0 combining_job =1 nb_sub = len(jobs) - - + + nb_use = 0 for i in range(nb_sub): script_number = i+1 @@ -1404,14 +1404,14 @@ def create_ajob(self, template, jobs, write_dir=None): info["base_directory"] = "./" fsock.write(template_text % info) nb_use += nb_job - + fsock.close() return script_number def get_job_for_precision(self): """create the ajob to achieve a give precision on the total cross-section""" - + assert self.err_goal <=1 xtot = abs(self.results.xsec) logger.info("Working on precision: %s %%" %(100*self.err_goal)) @@ -1428,46 +1428,46 @@ def get_job_for_precision(self): rerr *=rerr if not len(to_refine): return - - # change limit since most don't contribute + + # change limit since most don't contribute limit = math.sqrt((self.err_goal * xtot)**2 - rerr/math.sqrt(len(to_refine))) for C in to_refine[:]: cerr = C.mfactor*(C.xerru + len(to_refine)*C.xerrc) if cerr < limit: to_refine.remove(C) - + # all the channel are now selected. create the channel information logger.info('need to improve %s channels' % len(to_refine)) - + jobs = [] # list of the refine if some job are split is list of # dict with the parameter of the run. # loop over the channel to refine for C in to_refine: - + #1. Determine how many events we need in each iteration yerr = C.mfactor*(C.xerru+len(to_refine)*C.xerrc) nevents = 0.2*C.nevents*(yerr/limit)**2 - + nb_split = int((nevents*(C.nunwgt/C.nevents)/self.max_request_event/ (2**self.min_iter-1))**(2/3)) nb_split = max(nb_split, 1) - # **(2/3) to slow down the increase in number of jobs + # **(2/3) to slow down the increase in number of jobs if nb_split > self.max_splitting: nb_split = self.max_splitting - + if nb_split >1: nevents = nevents / nb_split self.write_multijob(C, nb_split) # forbid too low/too large value nevents = min(self.min_event_in_iter, max(self.max_event_in_iter, nevents)) - - + + #create the info dict assume no splitting for the default info = {'name': self.cmd.results.current['run_name'], 'script_name': 'unknown', 'directory': C.name, # need to be change for splitted job - 'P_dir': C.parent_name, + 'P_dir': C.parent_name, 'Ppath': pjoin(self.cmd.me_dir, 'SubProcesses', C.parent_name), 'offset': 1, # need to be change for splitted job 'nevents': nevents, @@ -1487,38 +1487,38 @@ def get_job_for_precision(self): new_info['offset'] = i+1 new_info['directory'] += self.alphabet[i % 26] + str((i+1)//26) jobs.append(new_info) - self.create_ajob(pjoin(self.me_dir, 'SubProcesses', 'refine.sh'), jobs) - + self.create_ajob(pjoin(self.me_dir, 'SubProcesses', 'refine.sh'), jobs) + def update_html(self): """update the html from this object since it contains all the information""" - + run = self.cmd.results.current['run_name'] if not os.path.exists(pjoin(self.cmd.me_dir, 'HTML', run)): os.mkdir(pjoin(self.cmd.me_dir, 'HTML', run)) - + unit = self.cmd.results.unit - P_text = "" - if self.results: - Presults = self.results + P_text = "" + if self.results: + Presults = self.results else: self.results = sum_html.collect_result(self.cmd, None) Presults = self.results - + for P_comb in Presults: - P_text += P_comb.get_html(run, unit, self.cmd.me_dir) - - Presults.write_results_dat(pjoin(self.cmd.me_dir,'SubProcesses', 'results.dat')) - + P_text += P_comb.get_html(run, unit, self.cmd.me_dir) + + Presults.write_results_dat(pjoin(self.cmd.me_dir,'SubProcesses', 'results.dat')) + fsock = open(pjoin(self.cmd.me_dir, 'HTML', run, 'results.html'),'w') fsock.write(sum_html.results_header) fsock.write('%s
' % Presults.get_html(run, unit, self.cmd.me_dir)) - fsock.write('%s
' % P_text) - + fsock.write('%s ' % P_text) + self.cmd.results.add_detail('cross', Presults.xsec) - self.cmd.results.add_detail('error', Presults.xerru) - - return Presults.xsec, Presults.xerru + self.cmd.results.add_detail('error', Presults.xerru) + + return Presults.xsec, Presults.xerru @@ -1528,27 +1528,27 @@ class gen_ximprove_v4_nogridupdate(gen_ximprove_v4): # some hardcoded value which impact the generation gen_events_security = 1.1 # multiply the number of requested event by this number for security combining_job = 0 # allow to run multiple channel in sequence - max_request_event = 400 # split jobs if a channel if it needs more than that + max_request_event = 400 # split jobs if a channel if it needs more than that max_event_in_iter = 500 min_event_in_iter = 250 - max_splitting = 260 # maximum duplication of a given channel - min_iter = 2 + max_splitting = 260 # maximum duplication of a given channel + min_iter = 2 max_iter = 6 keep_grid_for_refine = True - def __init__(self, cmd, opt=None): - + def __init__(self, cmd, opt=None): + gen_ximprove.__init__(cmd, opt) - + if cmd.proc_characteristics['loopinduced'] and \ cmd.proc_characteristics['nexternal'] > 2: self.increase_parralelization(cmd.proc_characteristics['nexternal']) - + def increase_parralelization(self, nexternal): - self.max_splitting = 1000 - + self.max_splitting = 1000 + if self.run_card['refine_evt_by_job'] != -1: pass elif nexternal == 3: @@ -1563,27 +1563,27 @@ def increase_parralelization(self, nexternal): class gen_ximprove_share(gen_ximprove, gensym): """Doing the refine in multicore. Each core handle a couple of PS point.""" - nb_ps_by_job = 2000 + nb_ps_by_job = 2000 mode = "refine" gen_events_security = 1.15 # Note the real security is lower since we stop the jobs if they are at 96% # of this target. def __init__(self, *args, **opts): - + super(gen_ximprove_share, self).__init__(*args, **opts) self.generated_events = {} self.splitted_for_dir = lambda x,y : self.splitted_Pdir[(x,y)] - + def get_job_for_event(self): """generate the script in order to generate a given number of event""" # correspond to write_gen in the fortran version - + goal_lum, to_refine = self.find_job_for_event() self.goal_lum = goal_lum - + # loop over the channel to refine to find the number of PS point to launch total_ps_points = 0 channel_to_ps_point = [] @@ -1593,7 +1593,7 @@ def get_job_for_event(self): os.remove(pjoin(self.me_dir, "SubProcesses",C.parent_name, C.name, "events.lhe")) except: pass - + #1. Compute the number of points are needed to reach target needed_event = goal_lum*C.get('axsec') if needed_event == 0: @@ -1609,18 +1609,18 @@ def get_job_for_event(self): nb_split = 1 if nb_split > self.max_splitting: nb_split = self.max_splitting - nevents = self.max_event_in_iter * self.max_splitting + nevents = self.max_event_in_iter * self.max_splitting else: nevents = self.max_event_in_iter * nb_split if nevents > self.max_splitting*self.max_event_in_iter: logger.warning("Channel %s/%s has a very low efficiency of unweighting. Might not be possible to reach target" % \ (C.name, C.parent_name)) - nevents = self.max_event_in_iter * self.max_splitting - - total_ps_points += nevents - channel_to_ps_point.append((C, nevents)) - + nevents = self.max_event_in_iter * self.max_splitting + + total_ps_points += nevents + channel_to_ps_point.append((C, nevents)) + if self.cmd.options["run_mode"] == 1: if self.cmd.options["cluster_size"]: nb_ps_by_job = total_ps_points /int(self.cmd.options["cluster_size"]) @@ -1634,7 +1634,7 @@ def get_job_for_event(self): nb_ps_by_job = total_ps_points / self.cmd.options["nb_core"] else: nb_ps_by_job = self.nb_ps_by_job - + nb_ps_by_job = int(max(nb_ps_by_job, 500)) for C, nevents in channel_to_ps_point: @@ -1648,20 +1648,20 @@ def get_job_for_event(self): self.create_resubmit_one_iter(C.parent_name, C.name[1:], submit_ps, nb_job, step=0) needed_event = goal_lum*C.get('xsec') logger.debug("%s/%s : need %s event. Need %s split job of %s points", C.parent_name, C.name, needed_event, nb_job, submit_ps) - - + + def combine_iteration(self, Pdir, G, step): - + grid_calculator, cross, error = self.combine_grid(Pdir, G, step) - + # collect all the generated_event Gdirs = [] #build the the list of directory for i in range(self.splitted_for_dir(Pdir, G)): path = pjoin(Pdir, "G%s_%s" % (G, i+1)) Gdirs.append(path) assert len(grid_calculator.results) == len(Gdirs) == self.splitted_for_dir(Pdir, G) - - + + # Check how many events are going to be kept after un-weighting. needed_event = cross * self.goal_lum if needed_event == 0: @@ -1671,19 +1671,19 @@ def combine_iteration(self, Pdir, G, step): if self.err_goal >=1: if needed_event > self.gen_events_security * self.err_goal: needed_event = int(self.gen_events_security * self.err_goal) - + if (Pdir, G) in self.generated_events: old_nunwgt, old_maxwgt = self.generated_events[(Pdir, G)] else: old_nunwgt, old_maxwgt = 0, 0 - + if old_nunwgt == 0 and os.path.exists(pjoin(Pdir,"G%s" % G, "events.lhe")): # possible for second refine. lhe = lhe_parser.EventFile(pjoin(Pdir,"G%s" % G, "events.lhe")) old_nunwgt = lhe.unweight(None, trunc_error=0.005, log_level=0) old_maxwgt = lhe.max_wgt - - + + maxwgt = max(grid_calculator.get_max_wgt(), old_maxwgt) new_evt = grid_calculator.get_nunwgt(maxwgt) @@ -1695,35 +1695,35 @@ def combine_iteration(self, Pdir, G, step): one_iter_nb_event = max(grid_calculator.get_nunwgt(),1) drop_previous_iteration = False # compare the number of events to generate if we discard the previous iteration - n_target_one_iter = (needed_event-one_iter_nb_event) / ( one_iter_nb_event/ sum([R.nevents for R in grid_calculator.results])) + n_target_one_iter = (needed_event-one_iter_nb_event) / ( one_iter_nb_event/ sum([R.nevents for R in grid_calculator.results])) n_target_combined = (needed_event-nunwgt) / efficiency if n_target_one_iter < n_target_combined: # the last iteration alone has more event that the combine iteration. - # it is therefore interesting to drop previous iteration. + # it is therefore interesting to drop previous iteration. drop_previous_iteration = True nunwgt = one_iter_nb_event maxwgt = grid_calculator.get_max_wgt() new_evt = nunwgt - efficiency = ( one_iter_nb_event/ sum([R.nevents for R in grid_calculator.results])) - + efficiency = ( one_iter_nb_event/ sum([R.nevents for R in grid_calculator.results])) + try: if drop_previous_iteration: raise IOError output_file = open(pjoin(Pdir,"G%s" % G, "events.lhe"), 'a') except IOError: output_file = open(pjoin(Pdir,"G%s" % G, "events.lhe"), 'w') - + misc.call(["cat"] + [pjoin(d, "events.lhe") for d in Gdirs], stdout=output_file) output_file.close() # For large number of iteration. check the number of event by doing the # real unweighting. - if nunwgt < 0.6 * needed_event and step > self.min_iter: + if nunwgt < 0.6 * needed_event and step > self.min_iter: lhe = lhe_parser.EventFile(output_file.name) old_nunwgt =nunwgt nunwgt = lhe.unweight(None, trunc_error=0.01, log_level=0) - - + + self.generated_events[(Pdir, G)] = (nunwgt, maxwgt) # misc.sprint("Adding %s event to %s. Currently at %s" % (new_evt, G, nunwgt)) @@ -1742,21 +1742,21 @@ def combine_iteration(self, Pdir, G, step): nevents = grid_calculator.results[0].nevents if nevents == 0: # possible if some integral returns 0 nevents = max(g.nevents for g in grid_calculator.results) - + need_ps_point = (needed_event - nunwgt)/(efficiency+1e-99) - need_job = need_ps_point // nevents + 1 - + need_job = need_ps_point // nevents + 1 + if step < self.min_iter: # This is normal but check if we are on the good track - job_at_first_iter = nb_split_before/2**(step-1) + job_at_first_iter = nb_split_before/2**(step-1) expected_total_job = job_at_first_iter * (2**self.min_iter-1) done_job = job_at_first_iter * (2**step-1) expected_remaining_job = expected_total_job - done_job - logger.debug("efficiency status (smaller is better): %s", need_job/expected_remaining_job) + logger.debug("efficiency status (smaller is better): %s", need_job/expected_remaining_job) # increase if needed but not too much need_job = min(need_job, expected_remaining_job*1.25) - + nb_job = (need_job-0.5)//(2**(self.min_iter-step)-1) + 1 nb_job = max(1, nb_job) grid_calculator.write_grid_for_submission(Pdir,G, @@ -1768,7 +1768,7 @@ def combine_iteration(self, Pdir, G, step): nb_job, step)) self.create_resubmit_one_iter(Pdir, G, nevents, nb_job, step) #self.create_job(Pdir, G, nb_job, nevents, step) - + elif step < self.max_iter: if step + 1 == self.max_iter: need_job = 1.20 * need_job # avoid to have just too few event. @@ -1777,21 +1777,21 @@ def combine_iteration(self, Pdir, G, step): grid_calculator.write_grid_for_submission(Pdir,G, self.splitted_for_dir(Pdir, G), nb_job*nevents ,mode=self.mode, conservative_factor=self.max_iter) - - + + logger.info("%s/G%s is at %i/%i ('%.2g%%') event. Resubmit %i job at iteration %i." \ % (os.path.basename(Pdir), G, int(nunwgt),int(needed_event)+1, (float(nunwgt)/needed_event)*100.0 if needed_event>0.0 else 0.0, nb_job, step)) self.create_resubmit_one_iter(Pdir, G, nevents, nb_job, step) - - + + return 0 - - + + def write_results(self, grid_calculator, cross, error, Pdir, G, step, efficiency): - + #compute the value if cross == 0: abscross,nw, luminosity = 0, 0, 0 @@ -1807,7 +1807,7 @@ def write_results(self, grid_calculator, cross, error, Pdir, G, step, efficiency nevents = nunwgt # make the unweighting to compute the number of events: luminosity = nunwgt/cross - + #format the results.dat def fstr(nb): data = '%E' % nb @@ -1816,23 +1816,23 @@ def fstr(nb): power = int(power) + 1 return '%.5fE%+03i' %(nb,power) line = '%s %s %s %i %i %i %i %s %s %s 0.0 0.0 0\n' % \ - (fstr(cross), fstr(error*cross), fstr(error*cross), + (fstr(cross), fstr(error*cross), fstr(error*cross), nevents, nw, maxit,nunwgt, fstr(luminosity), fstr(wgt), fstr(abscross)) - + fsock = open(pjoin(self.me_dir,'SubProcesses' , Pdir, 'G%s' % G, - 'results.dat'),'w') + 'results.dat'),'w') fsock.writelines(line) fsock.close() - - - + + + class gen_ximprove_gridpack(gen_ximprove_v4): - - min_iter = 1 + + min_iter = 1 max_iter = 13 - max_request_event = 1e12 # split jobs if a channel if it needs more than that + max_request_event = 1e12 # split jobs if a channel if it needs more than that max_event_in_iter = 4000 min_event_in_iter = 500 combining_job = sys.maxsize @@ -1844,7 +1844,7 @@ def __new__(cls, *args, **opts): return super(gen_ximprove_gridpack, cls).__new__(cls, *args, **opts) def __init__(self, *args, **opts): - + self.ngran = -1 self.gscalefact = {} self.readonly = False @@ -1855,23 +1855,23 @@ def __init__(self, *args, **opts): self.readonly = opts['readonly'] super(gen_ximprove_gridpack,self).__init__(*args, **opts) if self.ngran == -1: - self.ngran = 1 - + self.ngran = 1 + def find_job_for_event(self): """return the list of channel that need to be improved""" import random - + assert self.err_goal >=1 self.err_goal = int(self.err_goal) self.gscalefact = {} - + xtot = self.results.axsec - goal_lum = self.err_goal/(xtot+1e-99) #pb^-1 + goal_lum = self.err_goal/(xtot+1e-99) #pb^-1 # logger.info('Effective Luminosity %s pb^-1', goal_lum) - + all_channels = sum([list(P) for P in self.results],[]) all_channels.sort(key=lambda x : x.get('luminosity'), reverse=True) - + to_refine = [] for C in all_channels: tag = C.get('name') @@ -1885,27 +1885,27 @@ def find_job_for_event(self): #need to generate events logger.debug('request events for ', C.get('name'), 'cross=', C.get('axsec'), 'needed events = ', goal_lum * C.get('axsec')) - to_refine.append(C) - - logger.info('need to improve %s channels' % len(to_refine)) + to_refine.append(C) + + logger.info('need to improve %s channels' % len(to_refine)) return goal_lum, to_refine def get_job_for_event(self): """generate the script in order to generate a given number of event""" # correspond to write_gen in the fortran version - - + + goal_lum, to_refine = self.find_job_for_event() jobs = [] # list of the refine if some job are split is list of # dict with the parameter of the run. - + # loop over the channel to refine for C in to_refine: #1. Compute the number of points are needed to reach target needed_event = max(goal_lum*C.get('axsec'), self.ngran) nb_split = 1 - + #2. estimate how many points we need in each iteration if C.get('nunwgt') > 0: nevents = needed_event / nb_split * (C.get('nevents') / C.get('nunwgt')) @@ -1920,13 +1920,13 @@ def get_job_for_event(self): # forbid too low/too large value nevents = max(self.min_event_in_iter, min(self.max_event_in_iter, nevents)) logger.debug("%s : need %s event. Need %s split job of %s points", C.name, needed_event, nb_split, nevents) - + #create the info dict assume no splitting for the default info = {'name': self.cmd.results.current['run_name'], 'script_name': 'unknown', 'directory': C.name, # need to be change for splitted job - 'P_dir': os.path.basename(C.parent_name), + 'P_dir': os.path.basename(C.parent_name), 'offset': 1, # need to be change for splitted job 'Ppath': pjoin(self.cmd.me_dir, 'SubProcesses', C.parent_name), 'nevents': nevents, #int(nevents*self.gen_events_security)+1, @@ -1938,7 +1938,7 @@ def get_job_for_event(self): 'channel': C.name.replace('G',''), 'grid_refinment' : 0, #no refinment of the grid 'base_directory': '', #should be change in splitted job if want to keep the grid - 'packet': None, + 'packet': None, } if self.readonly: @@ -1946,11 +1946,11 @@ def get_job_for_event(self): info['base_directory'] = basedir jobs.append(info) - - write_dir = '.' if self.readonly else None - self.create_ajob(pjoin(self.me_dir, 'SubProcesses', 'refine.sh'), jobs, write_dir) - + + write_dir = '.' if self.readonly else None + self.create_ajob(pjoin(self.me_dir, 'SubProcesses', 'refine.sh'), jobs, write_dir) + done = [] for j in jobs: if j['P_dir'] in done: @@ -1967,22 +1967,22 @@ def get_job_for_event(self): write_dir = '.' if self.readonly else pjoin(self.me_dir, 'SubProcesses') self.check_events(goal_lum, to_refine, jobs, write_dir) - + def check_events(self, goal_lum, to_refine, jobs, Sdir): """check that we get the number of requested events if not resubmit.""" - + new_jobs = [] - + for C, job_info in zip(to_refine, jobs): - P = job_info['P_dir'] + P = job_info['P_dir'] G = job_info['channel'] axsec = C.get('axsec') - requested_events= job_info['requested_event'] - + requested_events= job_info['requested_event'] + new_results = sum_html.OneResult((P,G)) new_results.read_results(pjoin(Sdir,P, 'G%s'%G, 'results.dat')) - + # need to resubmit? if new_results.get('nunwgt') < requested_events: pwd = pjoin(os.getcwd(),job_info['P_dir'],'G%s'%G) if self.readonly else \ @@ -1992,10 +1992,10 @@ def check_events(self, goal_lum, to_refine, jobs, Sdir): job_info['offset'] += 1 new_jobs.append(job_info) files.mv(pjoin(pwd, 'events.lhe'), pjoin(pwd, 'events.lhe.previous')) - + if new_jobs: - self.create_ajob(pjoin(self.me_dir, 'SubProcesses', 'refine.sh'), new_jobs, Sdir) - + self.create_ajob(pjoin(self.me_dir, 'SubProcesses', 'refine.sh'), new_jobs, Sdir) + done = [] for j in new_jobs: if j['P_dir'] in done: @@ -2015,9 +2015,9 @@ def check_events(self, goal_lum, to_refine, jobs, Sdir): files.put_at_end(pjoin(pwd, 'events.lhe'),pjoin(pwd, 'events.lhe.previous')) return self.check_events(goal_lum, to_refine, new_jobs, Sdir) - - - - + + + + diff --git a/epochX/cudacpp/gg_ttgg.mad/bin/internal/madevent_interface.py b/epochX/cudacpp/gg_ttgg.mad/bin/internal/madevent_interface.py index cb6bf4ca57..8abba3f33f 100755 --- a/epochX/cudacpp/gg_ttgg.mad/bin/internal/madevent_interface.py +++ b/epochX/cudacpp/gg_ttgg.mad/bin/internal/madevent_interface.py @@ -2,11 +2,11 @@ # # Copyright (c) 2011 The MadGraph5_aMC@NLO Development team and Contributors # -# This file is a part of the MadGraph5_aMC@NLO project, an application which +# This file is a part of the MadGraph5_aMC@NLO project, an application which # automatically generates Feynman diagrams and matrix elements for arbitrary # high-energy processes in the Standard Model and beyond. # -# It is subject to the MadGraph5_aMC@NLO license which should accompany this +# It is subject to the MadGraph5_aMC@NLO license which should accompany this # distribution. # # For more information, visit madgraph.phys.ucl.ac.be and amcatnlo.web.cern.ch @@ -53,10 +53,10 @@ # Special logger for the Cmd Interface logger = logging.getLogger('madevent.stdout') # -> stdout logger_stderr = logging.getLogger('madevent.stderr') # ->stderr - + try: import madgraph -except ImportError as error: +except ImportError as error: # import from madevent directory MADEVENT = True import internal.extended_cmd as cmd @@ -92,7 +92,7 @@ import madgraph.various.lhe_parser as lhe_parser # import madgraph.various.histograms as histograms # imported later to not slow down the loading of the code import models.check_param_card as check_param_card - from madgraph.iolibs.files import ln + from madgraph.iolibs.files import ln from madgraph import InvalidCmd, MadGraph5Error, MG5DIR, ReadWrite @@ -113,10 +113,10 @@ class CmdExtended(common_run.CommonRunCmd): next_possibility = { 'start': [], } - + debug_output = 'ME5_debug' error_debug = 'Please report this bug on https://bugs.launchpad.net/mg5amcnlo\n' - error_debug += 'More information is found in \'%(debug)s\'.\n' + error_debug += 'More information is found in \'%(debug)s\'.\n' error_debug += 'Please attach this file to your report.' config_debug = 'If you need help with this issue please contact us on https://answers.launchpad.net/mg5amcnlo\n' @@ -124,18 +124,18 @@ class CmdExtended(common_run.CommonRunCmd): keyboard_stop_msg = """stopping all operation in order to quit MadGraph5_aMC@NLO please enter exit""" - + # Define the Error InvalidCmd = InvalidCmd ConfigurationError = MadGraph5Error def __init__(self, me_dir, options, *arg, **opt): """Init history and line continuation""" - + # Tag allowing/forbiding question self.force = False - - # If possible, build an info line with current version number + + # If possible, build an info line with current version number # and date, from the VERSION text file info = misc.get_pkg_info() info_line = "" @@ -150,7 +150,7 @@ def __init__(self, me_dir, options, *arg, **opt): else: version = open(pjoin(root_path,'MGMEVersion.txt')).readline().strip() info_line = "#* VERSION %s %s *\n" % \ - (version, (24 - len(version)) * ' ') + (version, (24 - len(version)) * ' ') # Create a header for the history file. # Remember to fill in time at writeout time! @@ -177,7 +177,7 @@ def __init__(self, me_dir, options, *arg, **opt): '#* run as ./bin/madevent.py filename *\n' + \ '#* *\n' + \ '#************************************************************\n' - + if info_line: info_line = info_line[1:] @@ -203,11 +203,11 @@ def __init__(self, me_dir, options, *arg, **opt): "* *\n" + \ "************************************************************") super(CmdExtended, self).__init__(me_dir, options, *arg, **opt) - + def get_history_header(self): - """return the history header""" + """return the history header""" return self.history_header % misc.get_time_info() - + def stop_on_keyboard_stop(self): """action to perform to close nicely on a keyboard interupt""" try: @@ -219,20 +219,20 @@ def stop_on_keyboard_stop(self): self.add_error_log_in_html(KeyboardInterrupt) except: pass - + def postcmd(self, stop, line): """ Update the status of the run for finishing interactive command """ - - stop = super(CmdExtended, self).postcmd(stop, line) + + stop = super(CmdExtended, self).postcmd(stop, line) # relaxing the tag forbidding question self.force = False - + if not self.use_rawinput: return stop - + if self.results and not self.results.current: return stop - + arg = line.split() if len(arg) == 0: return stop @@ -240,41 +240,41 @@ def postcmd(self, stop, line): return stop if isinstance(self.results.status, str) and self.results.status == 'Stop by the user': self.update_status('%s Stop by the user' % arg[0], level=None, error=True) - return stop + return stop elif not self.results.status: return stop elif str(arg[0]) in ['exit','quit','EOF']: return stop - + try: - self.update_status('Command \'%s\' done.
Waiting for instruction.' % arg[0], + self.update_status('Command \'%s\' done.
Waiting for instruction.' % arg[0], level=None, error=True) except Exception: misc.sprint('update_status fails') pass - - + + def nice_user_error(self, error, line): """If a ME run is currently running add a link in the html output""" self.add_error_log_in_html() - return cmd.Cmd.nice_user_error(self, error, line) - + return cmd.Cmd.nice_user_error(self, error, line) + def nice_config_error(self, error, line): """If a ME run is currently running add a link in the html output""" self.add_error_log_in_html() stop = cmd.Cmd.nice_config_error(self, error, line) - - + + try: debug_file = open(self.debug_output, 'a') debug_file.write(open(pjoin(self.me_dir,'Cards','proc_card_mg5.dat'))) debug_file.close() except: - pass + pass return stop - + def nice_error_handling(self, error, line): """If a ME run is currently running add a link in the html output""" @@ -294,7 +294,7 @@ def nice_error_handling(self, error, line): proc_card = pjoin(self.me_dir,'Cards','proc_card_mg5.dat') if os.path.exists(proc_card): self.banner.add(proc_card) - + out_dir = pjoin(self.me_dir, 'Events', self.run_name) if not os.path.isdir(out_dir): os.mkdir(out_dir) @@ -307,7 +307,7 @@ def nice_error_handling(self, error, line): else: pass else: - self.add_error_log_in_html() + self.add_error_log_in_html() stop = cmd.Cmd.nice_error_handling(self, error, line) try: debug_file = open(self.debug_output, 'a') @@ -316,14 +316,14 @@ def nice_error_handling(self, error, line): except: pass return stop - - + + #=============================================================================== # HelpToCmd #=============================================================================== class HelpToCmd(object): """ The Series of help routine for the MadEventCmd""" - + def help_pythia(self): logger.info("syntax: pythia [RUN] [--run_options]") logger.info("-- run pythia on RUN (current one by default)") @@ -352,29 +352,29 @@ def help_banner_run(self): logger.info(" Path should be the path of a valid banner.") logger.info(" RUN should be the name of a run of the current directory") self.run_options_help([('-f','answer all question by default'), - ('--name=X', 'Define the name associated with the new run')]) - + ('--name=X', 'Define the name associated with the new run')]) + def help_open(self): logger.info("syntax: open FILE ") logger.info("-- open a file with the appropriate editor.") logger.info(' If FILE belongs to index.html, param_card.dat, run_card.dat') logger.info(' the path to the last created/used directory is used') logger.info(' The program used to open those files can be chosen in the') - logger.info(' configuration file ./input/mg5_configuration.txt') - - + logger.info(' configuration file ./input/mg5_configuration.txt') + + def run_options_help(self, data): if data: logger.info('-- local options:') for name, info in data: logger.info(' %s : %s' % (name, info)) - + logger.info("-- session options:") - logger.info(" Note that those options will be kept for the current session") + logger.info(" Note that those options will be kept for the current session") logger.info(" --cluster : Submit to the cluster. Current cluster: %s" % self.options['cluster_type']) logger.info(" --multicore : Run in multi-core configuration") logger.info(" --nb_core=X : limit the number of core to use to X.") - + def help_generate_events(self): logger.info("syntax: generate_events [run_name] [options]",) @@ -398,16 +398,16 @@ def help_initMadLoop(self): logger.info(" -f : Bypass the edition of MadLoopParams.dat.",'$MG:color:BLUE') logger.info(" -r : Refresh of the existing filters (erasing them if already present).",'$MG:color:BLUE') logger.info(" --nPS= : Specify how many phase-space points should be tried to set up the filters.",'$MG:color:BLUE') - + def help_calculate_decay_widths(self): - + if self.ninitial != 1: logger.warning("This command is only valid for processes of type A > B C.") logger.warning("This command can not be run in current context.") logger.warning("") - + logger.info("syntax: calculate_decay_widths [run_name] [options])") logger.info("-- Calculate decay widths and enter widths and BRs in param_card") logger.info(" for a series of processes of type A > B C ...") @@ -428,8 +428,8 @@ def help_survey(self): logger.info("-- evaluate the different channel associate to the process") self.run_options_help([("--" + key,value[-1]) for (key,value) in \ self._survey_options.items()]) - - + + def help_restart_gridpack(self): logger.info("syntax: restart_gridpack --precision= --restart_zero") @@ -439,14 +439,14 @@ def help_launch(self): logger.info("syntax: launch [run_name] [options])") logger.info(" --alias for either generate_events/calculate_decay_widths") logger.info(" depending of the number of particles in the initial state.") - + if self.ninitial == 1: logger.info("For this directory this is equivalent to calculate_decay_widths") self.help_calculate_decay_widths() else: logger.info("For this directory this is equivalent to $generate_events") self.help_generate_events() - + def help_refine(self): logger.info("syntax: refine require_precision [max_channel] [--run_options]") logger.info("-- refine the LAST run to achieve a given precision.") @@ -454,14 +454,14 @@ def help_refine(self): logger.info(' or the required relative error') logger.info(' max_channel:[5] maximal number of channel per job') self.run_options_help([]) - + def help_combine_events(self): """ """ logger.info("syntax: combine_events [run_name] [--tag=tag_name] [--run_options]") logger.info("-- Combine the last run in order to write the number of events") logger.info(" asked in the run_card.") self.run_options_help([]) - + def help_store_events(self): """ """ logger.info("syntax: store_events [--run_options]") @@ -481,7 +481,7 @@ def help_import(self): logger.info("syntax: import command PATH") logger.info("-- Execute the command present in the file") self.run_options_help([]) - + def help_syscalc(self): logger.info("syntax: syscalc [RUN] [%s] [-f | --tag=]" % '|'.join(self._plot_mode)) logger.info("-- calculate systematics information for the RUN (current run by default)") @@ -506,18 +506,18 @@ class AskRun(cmd.ControlSwitch): ('madspin', 'Decay onshell particles'), ('reweight', 'Add weights to events for new hypp.') ] - + def __init__(self, question, line_args=[], mode=None, force=False, *args, **opt): - + self.check_available_module(opt['mother_interface'].options) self.me_dir = opt['mother_interface'].me_dir super(AskRun,self).__init__(self.to_control, opt['mother_interface'], *args, **opt) - - + + def check_available_module(self, options): - + self.available_module = set() if options['pythia-pgs_path']: self.available_module.add('PY6') @@ -540,32 +540,32 @@ def check_available_module(self, options): self.available_module.add('Rivet') else: logger.warning("Rivet program installed but no parton shower with hepmc output detected.\n Please install pythia8") - + if not MADEVENT or ('mg5_path' in options and options['mg5_path']): self.available_module.add('MadSpin') if misc.has_f2py() or options['f2py_compiler']: self.available_module.add('reweight') -# old mode to activate the shower +# old mode to activate the shower def ans_parton(self, value=None): """None: means that the user type 'pythia' value: means that the user type pythia=value""" - + if value is None: self.set_all_off() else: logger.warning('Invalid command: parton=%s' % value) - - + + # -# HANDLING SHOWER +# HANDLING SHOWER # def get_allowed_shower(self): """return valid entry for the shower switch""" - + if hasattr(self, 'allowed_shower'): return self.allowed_shower - + self.allowed_shower = [] if 'PY6' in self.available_module: self.allowed_shower.append('Pythia6') @@ -574,9 +574,9 @@ def get_allowed_shower(self): if self.allowed_shower: self.allowed_shower.append('OFF') return self.allowed_shower - + def set_default_shower(self): - + if 'PY6' in self.available_module and\ os.path.exists(pjoin(self.me_dir,'Cards','pythia_card.dat')): self.switch['shower'] = 'Pythia6' @@ -590,10 +590,10 @@ def set_default_shower(self): def check_value_shower(self, value): """check an entry is valid. return the valid entry in case of shortcut""" - + if value in self.get_allowed_shower(): return True - + value =value.lower() if value in ['py6','p6','pythia_6'] and 'PY6' in self.available_module: return 'Pythia6' @@ -601,13 +601,13 @@ def check_value_shower(self, value): return 'Pythia8' else: return False - - -# old mode to activate the shower + + +# old mode to activate the shower def ans_pythia(self, value=None): """None: means that the user type 'pythia' value: means that the user type pythia=value""" - + if 'PY6' not in self.available_module: logger.info('pythia-pgs not available. Ignore commmand') return @@ -621,13 +621,13 @@ def ans_pythia(self, value=None): self.set_switch('shower', 'OFF') else: logger.warning('Invalid command: pythia=%s' % value) - - + + def consistency_shower_detector(self, vshower, vdetector): """consistency_XX_YY(val_XX, val_YY) -> XX is the new key set by the user to a new value val_XX -> YY is another key - -> return value should be None or "replace_YY" + -> return value should be None or "replace_YY" """ if vshower == 'OFF': @@ -635,35 +635,35 @@ def consistency_shower_detector(self, vshower, vdetector): return 'OFF' if vshower == 'Pythia8' and vdetector == 'PGS': return 'OFF' - + return None - + # # HANDLING DETECTOR # def get_allowed_detector(self): """return valid entry for the switch""" - + if hasattr(self, 'allowed_detector'): - return self.allowed_detector - + return self.allowed_detector + self.allowed_detector = [] if 'PGS' in self.available_module: self.allowed_detector.append('PGS') if 'Delphes' in self.available_module: self.allowed_detector.append('Delphes') - + if self.allowed_detector: self.allowed_detector.append('OFF') - return self.allowed_detector + return self.allowed_detector def set_default_detector(self): - + self.set_default_shower() #ensure that this one is called first! - + if 'PGS' in self.available_module and self.switch['shower'] == 'Pythia6'\ and os.path.exists(pjoin(self.me_dir,'Cards','pgs_card.dat')): self.switch['detector'] = 'PGS' @@ -674,16 +674,16 @@ def set_default_detector(self): self.switch['detector'] = 'OFF' else: self.switch['detector'] = 'Not Avail.' - -# old mode to activate pgs + +# old mode to activate pgs def ans_pgs(self, value=None): """None: means that the user type 'pgs' - value: means that the user type pgs=value""" - + value: means that the user type pgs=value""" + if 'PGS' not in self.available_module: logger.info('pythia-pgs not available. Ignore commmand') return - + if value is None: self.set_all_off() self.switch['shower'] = 'Pythia6' @@ -696,16 +696,16 @@ def ans_pgs(self, value=None): else: logger.warning('Invalid command: pgs=%s' % value) - + # old mode to activate Delphes def ans_delphes(self, value=None): """None: means that the user type 'delphes' - value: means that the user type delphes=value""" - + value: means that the user type delphes=value""" + if 'Delphes' not in self.available_module: logger.warning('Delphes not available. Ignore commmand') return - + if value is None: self.set_all_off() if 'PY6' in self.available_module: @@ -718,15 +718,15 @@ def ans_delphes(self, value=None): elif value == 'off': self.set_switch('detector', 'OFF') else: - logger.warning('Invalid command: pgs=%s' % value) + logger.warning('Invalid command: pgs=%s' % value) def consistency_detector_shower(self,vdetector, vshower): """consistency_XX_YY(val_XX, val_YY) -> XX is the new key set by the user to a new value val_XX -> YY is another key - -> return value should be None or "replace_YY" + -> return value should be None or "replace_YY" """ - + if vdetector == 'PGS' and vshower != 'Pythia6': return 'Pythia6' if vdetector == 'Delphes' and vshower not in ['Pythia6', 'Pythia8']: @@ -744,28 +744,28 @@ def consistency_detector_shower(self,vdetector, vshower): # def get_allowed_analysis(self): """return valid entry for the shower switch""" - + if hasattr(self, 'allowed_analysis'): return self.allowed_analysis - + self.allowed_analysis = [] if 'ExRoot' in self.available_module: self.allowed_analysis.append('ExRoot') if 'MA4' in self.available_module: self.allowed_analysis.append('MadAnalysis4') if 'MA5' in self.available_module: - self.allowed_analysis.append('MadAnalysis5') + self.allowed_analysis.append('MadAnalysis5') if 'Rivet' in self.available_module: - self.allowed_analysis.append('Rivet') - + self.allowed_analysis.append('Rivet') + if self.allowed_analysis: self.allowed_analysis.append('OFF') - + return self.allowed_analysis - + def check_analysis(self, value): """check an entry is valid. return the valid entry in case of shortcut""" - + if value in self.get_allowed_analysis(): return True if value.lower() in ['ma4', 'madanalysis4', 'madanalysis_4','4']: @@ -786,30 +786,30 @@ def consistency_shower_analysis(self, vshower, vanalysis): """consistency_XX_YY(val_XX, val_YY) -> XX is the new key set by the user to a new value val_XX -> YY is another key - -> return value should be None or "replace_YY" + -> return value should be None or "replace_YY" """ if vshower != 'Pythia8' and vanalysis == 'Rivet': return 'OFF' #new value for analysis - + return None - + def consistency_analysis_shower(self, vanalysis, vshower): """consistency_XX_YY(val_XX, val_YY) -> XX is the new key set by the user to a new value val_XX -> YY is another key - -> return value should be None or "replace_YY" + -> return value should be None or "replace_YY" """ if vshower != 'Pythia8' and vanalysis == 'Rivet': return 'Pythia8' #new value for analysis - + return None def set_default_analysis(self): """initialise the switch for analysis""" - + if 'MA4' in self.available_module and \ os.path.exists(pjoin(self.me_dir,'Cards','plot_card.dat')): self.switch['analysis'] = 'MadAnalysis4' @@ -818,46 +818,46 @@ def set_default_analysis(self): or os.path.exists(pjoin(self.me_dir,'Cards', 'madanalysis5_hadron_card.dat'))): self.switch['analysis'] = 'MadAnalysis5' elif 'ExRoot' in self.available_module: - self.switch['analysis'] = 'ExRoot' - elif self.get_allowed_analysis(): + self.switch['analysis'] = 'ExRoot' + elif self.get_allowed_analysis(): self.switch['analysis'] = 'OFF' else: self.switch['analysis'] = 'Not Avail.' - + # # MADSPIN handling # def get_allowed_madspin(self): """ ON|OFF|onshell """ - + if hasattr(self, 'allowed_madspin'): return self.allowed_madspin - + self.allowed_madspin = [] if 'MadSpin' in self.available_module: self.allowed_madspin = ['OFF',"ON",'onshell',"full"] return self.allowed_madspin - + def check_value_madspin(self, value): """handle alias and valid option not present in get_allowed_madspin""" - + if value.upper() in self.get_allowed_madspin(): return True elif value.lower() in self.get_allowed_madspin(): return True - + if 'MadSpin' not in self.available_module: return False - + if value.lower() in ['madspin', 'full']: return 'full' elif value.lower() in ['none']: return 'none' - - + + def set_default_madspin(self): """initialise the switch for madspin""" - + if 'MadSpin' in self.available_module: if os.path.exists(pjoin(self.me_dir,'Cards','madspin_card.dat')): self.switch['madspin'] = 'ON' @@ -865,10 +865,10 @@ def set_default_madspin(self): self.switch['madspin'] = 'OFF' else: self.switch['madspin'] = 'Not Avail.' - + def get_cardcmd_for_madspin(self, value): """set some command to run before allowing the user to modify the cards.""" - + if value == 'onshell': return ["edit madspin_card --replace_line='set spinmode' --before_line='decay' set spinmode onshell"] elif value in ['full', 'madspin']: @@ -877,36 +877,36 @@ def get_cardcmd_for_madspin(self, value): return ["edit madspin_card --replace_line='set spinmode' --before_line='decay' set spinmode none"] else: return [] - + # # ReWeight handling # def get_allowed_reweight(self): """ return the list of valid option for reweight=XXX """ - + if hasattr(self, 'allowed_reweight'): return getattr(self, 'allowed_reweight') - + if 'reweight' not in self.available_module: self.allowed_reweight = [] return self.allowed_reweight = ['OFF', 'ON'] - + # check for plugin mode plugin_path = self.mother_interface.plugin_path opts = misc.from_plugin_import(plugin_path, 'new_reweight', warning=False) self.allowed_reweight += opts - + def set_default_reweight(self): """initialise the switch for reweight""" - + if 'reweight' in self.available_module: if os.path.exists(pjoin(self.me_dir,'Cards','reweight_card.dat')): self.switch['reweight'] = 'ON' else: self.switch['reweight'] = 'OFF' else: - self.switch['reweight'] = 'Not Avail.' + self.switch['reweight'] = 'Not Avail.' #=============================================================================== # CheckValidForCmd @@ -916,14 +916,14 @@ class CheckValidForCmd(object): def check_banner_run(self, args): """check the validity of line""" - + if len(args) == 0: self.help_banner_run() raise self.InvalidCmd('banner_run requires at least one argument.') - + tag = [a[6:] for a in args if a.startswith('--tag=')] - - + + if os.path.exists(args[0]): type ='banner' format = self.detect_card_type(args[0]) @@ -931,7 +931,7 @@ def check_banner_run(self, args): raise self.InvalidCmd('The file is not a valid banner.') elif tag: args[0] = pjoin(self.me_dir,'Events', args[0], '%s_%s_banner.txt' % \ - (args[0], tag)) + (args[0], tag)) if not os.path.exists(args[0]): raise self.InvalidCmd('No banner associates to this name and tag.') else: @@ -939,7 +939,7 @@ def check_banner_run(self, args): type = 'run' banners = misc.glob('*_banner.txt', pjoin(self.me_dir,'Events', args[0])) if not banners: - raise self.InvalidCmd('No banner associates to this name.') + raise self.InvalidCmd('No banner associates to this name.') elif len(banners) == 1: args[0] = banners[0] else: @@ -947,8 +947,8 @@ def check_banner_run(self, args): tags = [os.path.basename(p)[len(args[0])+1:-11] for p in banners] tag = self.ask('which tag do you want to use?', tags[0], tags) args[0] = pjoin(self.me_dir,'Events', args[0], '%s_%s_banner.txt' % \ - (args[0], tag)) - + (args[0], tag)) + run_name = [arg[7:] for arg in args if arg.startswith('--name=')] if run_name: try: @@ -970,14 +970,14 @@ def check_banner_run(self, args): except Exception: pass self.set_run_name(name) - + def check_history(self, args): """check the validity of line""" - + if len(args) > 1: self.help_history() raise self.InvalidCmd('\"history\" command takes at most one argument') - + if not len(args): return elif args[0] != 'clean': @@ -985,16 +985,16 @@ def check_history(self, args): if dirpath and not os.path.exists(dirpath) or \ os.path.isdir(args[0]): raise self.InvalidCmd("invalid path %s " % dirpath) - + def check_save(self, args): """ check the validity of the line""" - + if len(args) == 0: args.append('options') if args[0] not in self._save_opts: raise self.InvalidCmd('wrong \"save\" format') - + if args[0] != 'options' and len(args) != 2: self.help_save() raise self.InvalidCmd('wrong \"save\" format') @@ -1003,7 +1003,7 @@ def check_save(self, args): if not os.path.exists(basename): raise self.InvalidCmd('%s is not a valid path, please retry' % \ args[1]) - + if args[0] == 'options': has_path = None for arg in args[1:]: @@ -1024,9 +1024,9 @@ def check_save(self, args): has_path = True if not has_path: if '--auto' in arg and self.options['mg5_path']: - args.insert(1, pjoin(self.options['mg5_path'],'input','mg5_configuration.txt')) + args.insert(1, pjoin(self.options['mg5_path'],'input','mg5_configuration.txt')) else: - args.insert(1, pjoin(self.me_dir,'Cards','me5_configuration.txt')) + args.insert(1, pjoin(self.me_dir,'Cards','me5_configuration.txt')) def check_set(self, args): """ check the validity of the line""" @@ -1039,20 +1039,20 @@ def check_set(self, args): self.help_set() raise self.InvalidCmd('Possible options for set are %s' % \ self._set_options) - + if args[0] in ['stdout_level']: if args[1] not in ['DEBUG','INFO','WARNING','ERROR','CRITICAL'] \ and not args[1].isdigit(): raise self.InvalidCmd('output_level needs ' + \ - 'a valid level') - + 'a valid level') + if args[0] in ['timeout']: if not args[1].isdigit(): - raise self.InvalidCmd('timeout values should be a integer') - + raise self.InvalidCmd('timeout values should be a integer') + def check_open(self, args): """ check the validity of the line """ - + if len(args) != 1: self.help_open() raise self.InvalidCmd('OPEN command requires exactly one argument') @@ -1069,7 +1069,7 @@ def check_open(self, args): raise self.InvalidCmd('No MadEvent path defined. Unable to associate this name to a file') else: return True - + path = self.me_dir if os.path.isfile(os.path.join(path,args[0])): args[0] = os.path.join(path,args[0]) @@ -1078,7 +1078,7 @@ def check_open(self, args): elif os.path.isfile(os.path.join(path,'HTML',args[0])): args[0] = os.path.join(path,'HTML',args[0]) # special for card with _default define: copy the default and open it - elif '_card.dat' in args[0]: + elif '_card.dat' in args[0]: name = args[0].replace('_card.dat','_card_default.dat') if os.path.isfile(os.path.join(path,'Cards', name)): files.cp(os.path.join(path,'Cards', name), os.path.join(path,'Cards', args[0])) @@ -1086,13 +1086,13 @@ def check_open(self, args): else: raise self.InvalidCmd('No default path for this file') elif not os.path.isfile(args[0]): - raise self.InvalidCmd('No default path for this file') - + raise self.InvalidCmd('No default path for this file') + def check_initMadLoop(self, args): """ check initMadLoop command arguments are valid.""" - + opt = {'refresh': False, 'nPS': None, 'force': False} - + for arg in args: if arg in ['-r','--refresh']: opt['refresh'] = True @@ -1105,14 +1105,14 @@ def check_initMadLoop(self, args): except ValueError: raise InvalidCmd("The number of attempts specified "+ "'%s' is not a valid integer."%n_attempts) - + return opt - + def check_treatcards(self, args): """check that treatcards arguments are valid [param|run|all] [--output_dir=] [--param_card=] [--run_card=] """ - + opt = {'output_dir':pjoin(self.me_dir,'Source'), 'param_card':pjoin(self.me_dir,'Cards','param_card.dat'), 'run_card':pjoin(self.me_dir,'Cards','run_card.dat'), @@ -1129,14 +1129,14 @@ def check_treatcards(self, args): if os.path.isfile(value): card_name = self.detect_card_type(value) if card_name != key: - raise self.InvalidCmd('Format for input file detected as %s while expecting %s' + raise self.InvalidCmd('Format for input file detected as %s while expecting %s' % (card_name, key)) opt[key] = value elif os.path.isfile(pjoin(self.me_dir,value)): card_name = self.detect_card_type(pjoin(self.me_dir,value)) if card_name != key: - raise self.InvalidCmd('Format for input file detected as %s while expecting %s' - % (card_name, key)) + raise self.InvalidCmd('Format for input file detected as %s while expecting %s' + % (card_name, key)) opt[key] = value else: raise self.InvalidCmd('No such file: %s ' % value) @@ -1154,14 +1154,14 @@ def check_treatcards(self, args): else: self.help_treatcards() raise self.InvalidCmd('Unvalid argument %s' % arg) - - return mode, opt - - + + return mode, opt + + def check_survey(self, args, cmd='survey'): """check that the argument for survey are valid""" - - + + self.opts = dict([(key,value[1]) for (key,value) in \ self._survey_options.items()]) @@ -1183,41 +1183,41 @@ def check_survey(self, args, cmd='survey'): self.help_survey() raise self.InvalidCmd('Too many argument for %s command' % cmd) elif not args: - # No run name assigned -> assigned one automaticaly + # No run name assigned -> assigned one automaticaly self.set_run_name(self.find_available_run_name(self.me_dir)) else: self.set_run_name(args[0], None,'parton', True) args.pop(0) - + return True def check_generate_events(self, args): """check that the argument for generate_events are valid""" - + run = None if args and args[-1].startswith('--laststep='): run = args[-1].split('=')[-1] if run not in ['auto','parton', 'pythia', 'pgs', 'delphes']: self.help_generate_events() raise self.InvalidCmd('invalid %s argument'% args[-1]) - if run != 'parton' and not self.options['pythia-pgs_path']: - raise self.InvalidCmd('''pythia-pgs not install. Please install this package first. + if run != 'parton' and not self.options['pythia-pgs_path']: + raise self.InvalidCmd('''pythia-pgs not install. Please install this package first. To do so type: \'install pythia-pgs\' in the mg5 interface''') if run == 'delphes' and not self.options['delphes_path']: - raise self.InvalidCmd('''delphes not install. Please install this package first. + raise self.InvalidCmd('''delphes not install. Please install this package first. To do so type: \'install Delphes\' in the mg5 interface''') del args[-1] - + #if len(args) > 1: # self.help_generate_events() # raise self.InvalidCmd('Too many argument for generate_events command: %s' % cmd) - + return run def check_calculate_decay_widths(self, args): """check that the argument for calculate_decay_widths are valid""" - + if self.ninitial != 1: raise self.InvalidCmd('Can only calculate decay widths for decay processes A > B C ...') @@ -1232,7 +1232,7 @@ def check_calculate_decay_widths(self, args): if len(args) > 1: self.help_calculate_decay_widths() raise self.InvalidCmd('Too many argument for calculate_decay_widths command: %s' % cmd) - + return accuracy @@ -1241,25 +1241,25 @@ def check_multi_run(self, args): """check that the argument for survey are valid""" run = None - + if not len(args): self.help_multi_run() raise self.InvalidCmd("""multi_run command requires at least one argument for the number of times that it call generate_events command""") - + if args[-1].startswith('--laststep='): run = args[-1].split('=')[-1] if run not in ['parton', 'pythia', 'pgs', 'delphes']: self.help_multi_run() raise self.InvalidCmd('invalid %s argument'% args[-1]) - if run != 'parton' and not self.options['pythia-pgs_path']: - raise self.InvalidCmd('''pythia-pgs not install. Please install this package first. + if run != 'parton' and not self.options['pythia-pgs_path']: + raise self.InvalidCmd('''pythia-pgs not install. Please install this package first. To do so type: \'install pythia-pgs\' in the mg5 interface''') if run == 'delphes' and not self.options['delphes_path']: - raise self.InvalidCmd('''delphes not install. Please install this package first. + raise self.InvalidCmd('''delphes not install. Please install this package first. To do so type: \'install Delphes\' in the mg5 interface''') del args[-1] - + elif not args[0].isdigit(): self.help_multi_run() @@ -1267,7 +1267,7 @@ def check_multi_run(self, args): #pass nb run to an integer nb_run = args.pop(0) args.insert(0, int(nb_run)) - + return run @@ -1284,7 +1284,7 @@ def check_refine(self, args): self.help_refine() raise self.InvalidCmd('require_precision argument is require for refine cmd') - + if not self.run_name: if self.results.lastrun: self.set_run_name(self.results.lastrun) @@ -1296,17 +1296,17 @@ def check_refine(self, args): else: try: [float(arg) for arg in args] - except ValueError: - self.help_refine() + except ValueError: + self.help_refine() raise self.InvalidCmd('refine arguments are suppose to be number') - + return True - + def check_combine_events(self, arg): """ Check the argument for the combine events command """ - + tag = [a for a in arg if a.startswith('--tag=')] - if tag: + if tag: arg.remove(tag[0]) tag = tag[0][6:] elif not self.run_tag: @@ -1314,53 +1314,53 @@ def check_combine_events(self, arg): else: tag = self.run_tag self.run_tag = tag - + if len(arg) > 1: self.help_combine_events() raise self.InvalidCmd('Too many argument for combine_events command') - + if len(arg) == 1: self.set_run_name(arg[0], self.run_tag, 'parton', True) - + if not self.run_name: if not self.results.lastrun: raise self.InvalidCmd('No run_name currently define. Unable to run combine') else: self.set_run_name(self.results.lastrun) - + return True - + def check_pythia(self, args): """Check the argument for pythia command - syntax: pythia [NAME] + syntax: pythia [NAME] Note that other option are already removed at this point """ - + mode = None laststep = [arg for arg in args if arg.startswith('--laststep=')] if laststep and len(laststep)==1: mode = laststep[0].split('=')[-1] if mode not in ['auto', 'pythia', 'pgs', 'delphes']: self.help_pythia() - raise self.InvalidCmd('invalid %s argument'% args[-1]) + raise self.InvalidCmd('invalid %s argument'% args[-1]) elif laststep: raise self.InvalidCmd('only one laststep argument is allowed') - + if not self.options['pythia-pgs_path']: logger.info('Retry to read configuration file to find pythia-pgs path') self.set_configuration() - + if not self.options['pythia-pgs_path'] or not \ os.path.exists(pjoin(self.options['pythia-pgs_path'],'src')): error_msg = 'No valid pythia-pgs path set.\n' error_msg += 'Please use the set command to define the path and retry.\n' error_msg += 'You can also define it in the configuration file.\n' raise self.InvalidCmd(error_msg) - - - + + + tag = [a for a in args if a.startswith('--tag=')] - if tag: + if tag: args.remove(tag[0]) tag = tag[0][6:] @@ -1368,8 +1368,8 @@ def check_pythia(self, args): if self.results.lastrun: args.insert(0, self.results.lastrun) else: - raise self.InvalidCmd('No run name currently define. Please add this information.') - + raise self.InvalidCmd('No run name currently define. Please add this information.') + if len(args) >= 1: if args[0] != self.run_name and\ not os.path.exists(pjoin(self.me_dir,'Events',args[0], 'unweighted_events.lhe.gz')): @@ -1388,21 +1388,21 @@ def check_pythia(self, args): files.ln(input_file, os.path.dirname(output_file)) else: misc.gunzip(input_file, keep=True, stdout=output_file) - + args.append(mode) - + def check_pythia8(self, args): """Check the argument for pythia command - syntax: pythia8 [NAME] + syntax: pythia8 [NAME] Note that other option are already removed at this point - """ + """ mode = None laststep = [arg for arg in args if arg.startswith('--laststep=')] if laststep and len(laststep)==1: mode = laststep[0].split('=')[-1] if mode not in ['auto', 'pythia','pythia8','delphes']: self.help_pythia8() - raise self.InvalidCmd('invalid %s argument'% args[-1]) + raise self.InvalidCmd('invalid %s argument'% args[-1]) elif laststep: raise self.InvalidCmd('only one laststep argument is allowed') @@ -1410,7 +1410,7 @@ def check_pythia8(self, args): if not self.options['pythia8_path']: logger.info('Retry reading configuration file to find pythia8 path') self.set_configuration() - + if not self.options['pythia8_path'] or not \ os.path.exists(pjoin(self.options['pythia8_path'],'bin','pythia8-config')): error_msg = 'No valid pythia8 path set.\n' @@ -1421,7 +1421,7 @@ def check_pythia8(self, args): raise self.InvalidCmd(error_msg) tag = [a for a in args if a.startswith('--tag=')] - if tag: + if tag: args.remove(tag[0]) tag = tag[0][6:] @@ -1430,11 +1430,11 @@ def check_pythia8(self, args): args.insert(0, self.results.lastrun) else: raise self.InvalidCmd('No run name currently define. '+ - 'Please add this information.') - + 'Please add this information.') + if len(args) >= 1: if args[0] != self.run_name and\ - not os.path.exists(pjoin(self.me_dir,'Events',args[0], + not os.path.exists(pjoin(self.me_dir,'Events',args[0], 'unweighted_events.lhe.gz')): raise self.InvalidCmd('No events file corresponding to %s run. ' % args[0]) @@ -1451,9 +1451,9 @@ def check_pythia8(self, args): else: raise self.InvalidCmd('No event file corresponding to %s run. ' % self.run_name) - + args.append(mode) - + def check_remove(self, args): """Check that the remove command is valid""" @@ -1484,33 +1484,33 @@ def check_plot(self, args): madir = self.options['madanalysis_path'] td = self.options['td_path'] - + if not madir or not td: logger.info('Retry to read configuration file to find madanalysis/td') self.set_configuration() madir = self.options['madanalysis_path'] - td = self.options['td_path'] - + td = self.options['td_path'] + if not madir: error_msg = 'No valid MadAnalysis path set.\n' error_msg += 'Please use the set command to define the path and retry.\n' error_msg += 'You can also define it in the configuration file.\n' - raise self.InvalidCmd(error_msg) + raise self.InvalidCmd(error_msg) if not td: error_msg = 'No valid td path set.\n' error_msg += 'Please use the set command to define the path and retry.\n' error_msg += 'You can also define it in the configuration file.\n' - raise self.InvalidCmd(error_msg) - + raise self.InvalidCmd(error_msg) + if len(args) == 0: if not hasattr(self, 'run_name') or not self.run_name: self.help_plot() - raise self.InvalidCmd('No run name currently define. Please add this information.') + raise self.InvalidCmd('No run name currently define. Please add this information.') args.append('all') return - + if args[0] not in self._plot_mode: self.set_run_name(args[0], level='plot') del args[0] @@ -1518,45 +1518,45 @@ def check_plot(self, args): args.append('all') elif not self.run_name: self.help_plot() - raise self.InvalidCmd('No run name currently define. Please add this information.') - + raise self.InvalidCmd('No run name currently define. Please add this information.') + for arg in args: if arg not in self._plot_mode and arg != self.run_name: self.help_plot() - raise self.InvalidCmd('unknown options %s' % arg) - + raise self.InvalidCmd('unknown options %s' % arg) + def check_syscalc(self, args): """Check the argument for the syscalc command syscalc run_name modes""" scdir = self.options['syscalc_path'] - + if not scdir: logger.info('Retry to read configuration file to find SysCalc') self.set_configuration() scdir = self.options['syscalc_path'] - + if not scdir: error_msg = 'No valid SysCalc path set.\n' error_msg += 'Please use the set command to define the path and retry.\n' error_msg += 'You can also define it in the configuration file.\n' error_msg += 'Please note that you need to compile SysCalc first.' - raise self.InvalidCmd(error_msg) - + raise self.InvalidCmd(error_msg) + if len(args) == 0: if not hasattr(self, 'run_name') or not self.run_name: self.help_syscalc() - raise self.InvalidCmd('No run name currently defined. Please add this information.') + raise self.InvalidCmd('No run name currently defined. Please add this information.') args.append('all') return #deal options tag = [a for a in args if a.startswith('--tag=')] - if tag: + if tag: args.remove(tag[0]) tag = tag[0][6:] - + if args[0] not in self._syscalc_mode: self.set_run_name(args[0], tag=tag, level='syscalc') del args[0] @@ -1564,61 +1564,61 @@ def check_syscalc(self, args): args.append('all') elif not self.run_name: self.help_syscalc() - raise self.InvalidCmd('No run name currently defined. Please add this information.') + raise self.InvalidCmd('No run name currently defined. Please add this information.') elif tag and tag != self.run_tag: self.set_run_name(self.run_name, tag=tag, level='syscalc') - + for arg in args: if arg not in self._syscalc_mode and arg != self.run_name: self.help_syscalc() - raise self.InvalidCmd('unknown options %s' % arg) + raise self.InvalidCmd('unknown options %s' % arg) if self.run_card['use_syst'] not in self.true: raise self.InvalidCmd('Run %s does not include ' % self.run_name + \ 'systematics information needed for syscalc.') - - + + def check_pgs(self, arg, no_default=False): """Check the argument for pythia command - syntax is "pgs [NAME]" + syntax is "pgs [NAME]" Note that other option are already remove at this point """ - + # If not pythia-pgs path if not self.options['pythia-pgs_path']: logger.info('Retry to read configuration file to find pythia-pgs path') self.set_configuration() - + if not self.options['pythia-pgs_path'] or not \ os.path.exists(pjoin(self.options['pythia-pgs_path'],'src')): error_msg = 'No valid pythia-pgs path set.\n' error_msg += 'Please use the set command to define the path and retry.\n' error_msg += 'You can also define it in the configuration file.\n' - raise self.InvalidCmd(error_msg) - + raise self.InvalidCmd(error_msg) + tag = [a for a in arg if a.startswith('--tag=')] - if tag: + if tag: arg.remove(tag[0]) tag = tag[0][6:] - - + + if len(arg) == 0 and not self.run_name: if self.results.lastrun: arg.insert(0, self.results.lastrun) else: - raise self.InvalidCmd('No run name currently define. Please add this information.') - + raise self.InvalidCmd('No run name currently define. Please add this information.') + if len(arg) == 1 and self.run_name == arg[0]: arg.pop(0) - + if not len(arg) and \ not os.path.exists(pjoin(self.me_dir,'Events','pythia_events.hep')): if not no_default: self.help_pgs() raise self.InvalidCmd('''No file file pythia_events.hep currently available Please specify a valid run_name''') - - lock = None + + lock = None if len(arg) == 1: prev_tag = self.set_run_name(arg[0], tag, 'pgs') if not os.path.exists(pjoin(self.me_dir,'Events',self.run_name,'%s_pythia_events.hep.gz' % prev_tag)): @@ -1626,25 +1626,25 @@ def check_pgs(self, arg, no_default=False): else: input_file = pjoin(self.me_dir,'Events', self.run_name, '%s_pythia_events.hep.gz' % prev_tag) output_file = pjoin(self.me_dir, 'Events', 'pythia_events.hep') - lock = cluster.asyncrone_launch('gunzip',stdout=open(output_file,'w'), + lock = cluster.asyncrone_launch('gunzip',stdout=open(output_file,'w'), argument=['-c', input_file]) else: - if tag: + if tag: self.run_card['run_tag'] = tag self.set_run_name(self.run_name, tag, 'pgs') - - return lock + + return lock def check_display(self, args): """check the validity of line syntax is "display XXXXX" """ - + if len(args) < 1 or args[0] not in self._display_opts: self.help_display() raise self.InvalidCmd - + if args[0] == 'variable' and len(args) !=2: raise self.InvalidCmd('variable need a variable name') @@ -1654,39 +1654,39 @@ def check_display(self, args): def check_import(self, args): """check the validity of line""" - + if not args: self.help_import() raise self.InvalidCmd('wrong \"import\" format') - + if args[0] != 'command': args.insert(0,'command') - - + + if not len(args) == 2 or not os.path.exists(args[1]): raise self.InvalidCmd('PATH is mandatory for import command\n') - + #=============================================================================== # CompleteForCmd #=============================================================================== class CompleteForCmd(CheckValidForCmd): """ The Series of help routine for the MadGraphCmd""" - - + + def complete_banner_run(self, text, line, begidx, endidx, formatting=True): "Complete the banner run command" try: - - + + args = self.split_arg(line[0:begidx], error=False) - + if args[-1].endswith(os.path.sep): return self.path_completion(text, os.path.join('.',*[a for a in args \ - if a.endswith(os.path.sep)])) - - + if a.endswith(os.path.sep)])) + + if len(args) > 1: # only options are possible tags = misc.glob('%s_*_banner.txt' % args[1], pjoin(self.me_dir, 'Events' , args[1])) @@ -1697,9 +1697,9 @@ def complete_banner_run(self, text, line, begidx, endidx, formatting=True): else: return self.list_completion(text, tags) return self.list_completion(text, tags +['--name=','-f'], line) - + # First argument - possibilites = {} + possibilites = {} comp = self.path_completion(text, os.path.join('.',*[a for a in args \ if a.endswith(os.path.sep)])) @@ -1711,10 +1711,10 @@ def complete_banner_run(self, text, line, begidx, endidx, formatting=True): run_list = misc.glob(pjoin('*','*_banner.txt'), pjoin(self.me_dir, 'Events')) run_list = [n.rsplit('/',2)[1] for n in run_list] possibilites['RUN Name'] = self.list_completion(text, run_list) - + return self.deal_multiple_categories(possibilites, formatting) - - + + except Exception as error: print(error) @@ -1732,12 +1732,12 @@ def complete_history(self, text, line, begidx, endidx): if len(args) == 1: return self.path_completion(text) - - def complete_open(self, text, line, begidx, endidx): + + def complete_open(self, text, line, begidx, endidx): """ complete the open command """ args = self.split_arg(line[0:begidx]) - + # Directory continuation if os.path.sep in args[-1] + text: return self.path_completion(text, @@ -1751,10 +1751,10 @@ def complete_open(self, text, line, begidx, endidx): if os.path.isfile(os.path.join(path,'README')): possibility.append('README') if os.path.isdir(os.path.join(path,'Cards')): - possibility += [f for f in os.listdir(os.path.join(path,'Cards')) + possibility += [f for f in os.listdir(os.path.join(path,'Cards')) if f.endswith('.dat')] if os.path.isdir(os.path.join(path,'HTML')): - possibility += [f for f in os.listdir(os.path.join(path,'HTML')) + possibility += [f for f in os.listdir(os.path.join(path,'HTML')) if f.endswith('.html') and 'default' not in f] else: possibility.extend(['./','../']) @@ -1763,7 +1763,7 @@ def complete_open(self, text, line, begidx, endidx): if os.path.exists('MG5_debug'): possibility.append('MG5_debug') return self.list_completion(text, possibility) - + def complete_set(self, text, line, begidx, endidx): "Complete the set command" @@ -1784,27 +1784,27 @@ def complete_set(self, text, line, begidx, endidx): elif len(args) >2 and args[-1].endswith(os.path.sep): return self.path_completion(text, os.path.join('.',*[a for a in args if a.endswith(os.path.sep)]), - only_dirs = True) - + only_dirs = True) + def complete_survey(self, text, line, begidx, endidx): """ Complete the survey command """ - + if line.endswith('nb_core=') and not text: import multiprocessing max = multiprocessing.cpu_count() return [str(i) for i in range(2,max+1)] - + return self.list_completion(text, self._run_options, line) - + complete_refine = complete_survey complete_combine_events = complete_survey complite_store = complete_survey complete_generate_events = complete_survey complete_create_gridpack = complete_survey - + def complete_generate_events(self, text, line, begidx, endidx): """ Complete the generate events""" - + if line.endswith('nb_core=') and not text: import multiprocessing max = multiprocessing.cpu_count() @@ -1813,17 +1813,17 @@ def complete_generate_events(self, text, line, begidx, endidx): return ['parton','pythia','pgs','delphes'] elif '--laststep=' in line.split()[-1] and line and line[-1] != ' ': return self.list_completion(text,['parton','pythia','pgs','delphes'],line) - + opts = self._run_options + self._generate_options return self.list_completion(text, opts, line) def complete_initMadLoop(self, text, line, begidx, endidx): "Complete the initMadLoop command" - + numbers = [str(i) for i in range(10)] opts = ['-f','-r','--nPS='] - + args = self.split_arg(line[0:begidx], error=False) if len(line) >=6 and line[begidx-6:begidx]=='--nPS=': return self.list_completion(text, numbers, line) @@ -1840,18 +1840,18 @@ def complete_launch(self, *args, **opts): def complete_calculate_decay_widths(self, text, line, begidx, endidx): """ Complete the calculate_decay_widths command""" - + if line.endswith('nb_core=') and not text: import multiprocessing max = multiprocessing.cpu_count() return [str(i) for i in range(2,max+1)] - + opts = self._run_options + self._calculate_decay_options return self.list_completion(text, opts, line) - + def complete_display(self, text, line, begidx, endidx): - """ Complete the display command""" - + """ Complete the display command""" + args = self.split_arg(line[0:begidx], error=False) if len(args) >= 2 and args[1] =='results': start = line.find('results') @@ -1860,44 +1860,44 @@ def complete_display(self, text, line, begidx, endidx): def complete_multi_run(self, text, line, begidx, endidx): """complete multi run command""" - + args = self.split_arg(line[0:begidx], error=False) if len(args) == 1: data = [str(i) for i in range(0,20)] return self.list_completion(text, data, line) - + if line.endswith('run=') and not text: return ['parton','pythia','pgs','delphes'] elif '--laststep=' in line.split()[-1] and line and line[-1] != ' ': return self.list_completion(text,['parton','pythia','pgs','delphes'],line) - + opts = self._run_options + self._generate_options return self.list_completion(text, opts, line) - - - + + + if line.endswith('nb_core=') and not text: import multiprocessing max = multiprocessing.cpu_count() return [str(i) for i in range(2,max+1)] opts = self._run_options + self._generate_options return self.list_completion(text, opts, line) - + def complete_plot(self, text, line, begidx, endidx): """ Complete the plot command """ - + args = self.split_arg(line[0:begidx], error=False) if len(args) > 1: return self.list_completion(text, self._plot_mode) else: return self.list_completion(text, self._plot_mode + list(self.results.keys())) - + def complete_syscalc(self, text, line, begidx, endidx, formatting=True): """ Complete the syscalc command """ - + output = {} args = self.split_arg(line[0:begidx], error=False) - + if len(args) <=1: output['RUN_NAME'] = self.list_completion(list(self.results.keys())) output['MODE'] = self.list_completion(text, self._syscalc_mode) @@ -1907,12 +1907,12 @@ def complete_syscalc(self, text, line, begidx, endidx, formatting=True): if run in self.results: tags = ['--tag=%s' % tag['tag'] for tag in self.results[run]] output['options'] += tags - + return self.deal_multiple_categories(output, formatting) - + def complete_remove(self, text, line, begidx, endidx): """Complete the remove command """ - + args = self.split_arg(line[0:begidx], error=False) if len(args) > 1 and (text.startswith('--t')): run = args[1] @@ -1932,8 +1932,8 @@ def complete_remove(self, text, line, begidx, endidx): data = misc.glob(pjoin('*','*_banner.txt'), pjoin(self.me_dir, 'Events')) data = [n.rsplit('/',2)[1] for n in data] return self.list_completion(text, ['all'] + data) - - + + def complete_shower(self,text, line, begidx, endidx): "Complete the shower command" args = self.split_arg(line[0:begidx], error=False) @@ -1941,7 +1941,7 @@ def complete_shower(self,text, line, begidx, endidx): return self.list_completion(text, self._interfaced_showers) elif len(args)>1 and args[1] in self._interfaced_showers: return getattr(self, 'complete_%s' % text)\ - (text, args[1],line.replace(args[0]+' ',''), + (text, args[1],line.replace(args[0]+' ',''), begidx-len(args[0])-1, endidx-len(args[0])-1) def complete_pythia8(self,text, line, begidx, endidx): @@ -1955,11 +1955,11 @@ def complete_pythia8(self,text, line, begidx, endidx): if not self.run_name: return tmp1 else: - tmp2 = self.list_completion(text, self._run_options + ['-f', + tmp2 = self.list_completion(text, self._run_options + ['-f', '--no_default', '--tag='], line) return tmp1 + tmp2 elif line[-1] != '=': - return self.list_completion(text, self._run_options + ['-f', + return self.list_completion(text, self._run_options + ['-f', '--no_default','--tag='], line) def complete_madanalysis5_parton(self,text, line, begidx, endidx): @@ -1978,19 +1978,19 @@ def complete_madanalysis5_parton(self,text, line, begidx, endidx): else: tmp2 = self.list_completion(text, ['-f', '--MA5_stdout_lvl=','--no_default','--tag='], line) - return tmp1 + tmp2 + return tmp1 + tmp2 elif '--MA5_stdout_lvl=' in line and not any(arg.startswith( '--MA5_stdout_lvl=') for arg in args): - return self.list_completion(text, - ['--MA5_stdout_lvl=%s'%opt for opt in + return self.list_completion(text, + ['--MA5_stdout_lvl=%s'%opt for opt in ['logging.INFO','logging.DEBUG','logging.WARNING', 'logging.CRITICAL','90']], line) else: - return self.list_completion(text, ['-f', + return self.list_completion(text, ['-f', '--MA5_stdout_lvl=','--no_default','--tag='], line) def complete_pythia(self,text, line, begidx, endidx): - "Complete the pythia command" + "Complete the pythia command" args = self.split_arg(line[0:begidx], error=False) if len(args) == 1: @@ -2001,16 +2001,16 @@ def complete_pythia(self,text, line, begidx, endidx): if not self.run_name: return tmp1 else: - tmp2 = self.list_completion(text, self._run_options + ['-f', + tmp2 = self.list_completion(text, self._run_options + ['-f', '--no_default', '--tag='], line) return tmp1 + tmp2 elif line[-1] != '=': - return self.list_completion(text, self._run_options + ['-f', + return self.list_completion(text, self._run_options + ['-f', '--no_default','--tag='], line) def complete_pgs(self,text, line, begidx, endidx): "Complete the pythia command" - args = self.split_arg(line[0:begidx], error=False) + args = self.split_arg(line[0:begidx], error=False) if len(args) == 1: #return valid run_name data = misc.glob(pjoin('*', '*_pythia_events.hep.gz'), pjoin(self.me_dir, 'Events')) @@ -2019,23 +2019,23 @@ def complete_pgs(self,text, line, begidx, endidx): if not self.run_name: return tmp1 else: - tmp2 = self.list_completion(text, self._run_options + ['-f', + tmp2 = self.list_completion(text, self._run_options + ['-f', '--tag=' ,'--no_default'], line) - return tmp1 + tmp2 + return tmp1 + tmp2 else: - return self.list_completion(text, self._run_options + ['-f', + return self.list_completion(text, self._run_options + ['-f', '--tag=','--no_default'], line) - complete_delphes = complete_pgs - complete_rivet = complete_pgs + complete_delphes = complete_pgs + complete_rivet = complete_pgs #=============================================================================== # MadEventCmd #=============================================================================== class MadEventCmd(CompleteForCmd, CmdExtended, HelpToCmd, common_run.CommonRunCmd): - """The command line processor of Mad Graph""" - + """The command line processor of Mad Graph""" + LO = True # Truth values @@ -2063,7 +2063,7 @@ class MadEventCmd(CompleteForCmd, CmdExtended, HelpToCmd, common_run.CommonRunCm cluster_mode = 0 queue = 'madgraph' nb_core = None - + next_possibility = { 'start': ['generate_events [OPTIONS]', 'multi_run [OPTIONS]', 'calculate_decay_widths [OPTIONS]', @@ -2080,9 +2080,9 @@ class MadEventCmd(CompleteForCmd, CmdExtended, HelpToCmd, common_run.CommonRunCm 'pgs': ['generate_events [OPTIONS]', 'multi_run [OPTIONS]'], 'delphes' : ['generate_events [OPTIONS]', 'multi_run [OPTIONS]'] } - + asking_for_run = AskRun - + ############################################################################ def __init__(self, me_dir = None, options={}, *completekey, **stdin): """ add information to the cmd """ @@ -2095,16 +2095,16 @@ def __init__(self, me_dir = None, options={}, *completekey, **stdin): if self.web: os.system('touch %s' % pjoin(self.me_dir,'Online')) - self.load_results_db() + self.load_results_db() self.results.def_web_mode(self.web) self.Gdirs = None - + self.prompt = "%s>"%os.path.basename(pjoin(self.me_dir)) self.configured = 0 # time for reading the card self._options = {} # for compatibility with extended_cmd - - + + def pass_in_web_mode(self): """configure web data""" self.web = True @@ -2113,22 +2113,22 @@ def pass_in_web_mode(self): if os.environ['MADGRAPH_BASE']: self.options['mg5_path'] = pjoin(os.environ['MADGRAPH_BASE'],'MG5') - ############################################################################ + ############################################################################ def check_output_type(self, path): """ Check that the output path is a valid madevent directory """ - + bin_path = os.path.join(path,'bin') if os.path.isfile(os.path.join(bin_path,'generate_events')): return True - else: + else: return False ############################################################################ def set_configuration(self, amcatnlo=False, final=True, **opt): - """assign all configuration variable from file + """assign all configuration variable from file loop over the different config file if config_file not define """ - - super(MadEventCmd,self).set_configuration(amcatnlo=amcatnlo, + + super(MadEventCmd,self).set_configuration(amcatnlo=amcatnlo, final=final, **opt) if not final: @@ -2171,24 +2171,24 @@ def set_configuration(self, amcatnlo=False, final=True, **opt): if not os.path.exists(pjoin(path, 'sys_calc')): logger.info("No valid SysCalc path found") continue - # No else since the next line reinitialize the option to the + # No else since the next line reinitialize the option to the #previous value anyway self.options[key] = os.path.realpath(path) continue else: self.options[key] = None - - + + return self.options ############################################################################ - def do_banner_run(self, line): + def do_banner_run(self, line): """Make a run from the banner file""" - + args = self.split_arg(line) #check the validity of the arguments - self.check_banner_run(args) - + self.check_banner_run(args) + # Remove previous cards for name in ['delphes_trigger.dat', 'delphes_card.dat', 'pgs_card.dat', 'pythia_card.dat', 'madspin_card.dat', @@ -2197,20 +2197,20 @@ def do_banner_run(self, line): os.remove(pjoin(self.me_dir, 'Cards', name)) except Exception: pass - + banner_mod.split_banner(args[0], self.me_dir, proc_card=False) - + # Check if we want to modify the run if not self.force: ans = self.ask('Do you want to modify the Cards?', 'n', ['y','n']) if ans == 'n': self.force = True - + # Call Generate events self.exec_cmd('generate_events %s %s' % (self.run_name, self.force and '-f' or '')) - - - + + + ############################################################################ def do_display(self, line, output=sys.stdout): """Display current internal status""" @@ -2223,7 +2223,7 @@ def do_display(self, line, output=sys.stdout): #return valid run_name data = misc.glob(pjoin('*','*_banner.txt'), pjoin(self.me_dir, 'Events')) data = [n.rsplit('/',2)[1:] for n in data] - + if data: out = {} for name, tag in data: @@ -2235,11 +2235,11 @@ def do_display(self, line, output=sys.stdout): print('the runs available are:') for run_name, tags in out.items(): print(' run: %s' % run_name) - print(' tags: ', end=' ') + print(' tags: ', end=' ') print(', '.join(tags)) else: print('No run detected.') - + elif args[0] == 'options': outstr = " Run Options \n" outstr += " ----------- \n" @@ -2260,8 +2260,8 @@ def do_display(self, line, output=sys.stdout): if value == default: outstr += " %25s \t:\t%s\n" % (key,value) else: - outstr += " %25s \t:\t%s (user set)\n" % (key,value) - outstr += "\n" + outstr += " %25s \t:\t%s (user set)\n" % (key,value) + outstr += "\n" outstr += " Configuration Options \n" outstr += " --------------------- \n" for key, default in self.options_configuration.items(): @@ -2275,15 +2275,15 @@ def do_display(self, line, output=sys.stdout): self.do_print_results(' '.join(args[1:])) else: super(MadEventCmd, self).do_display(line, output) - + def do_save(self, line, check=True, to_keep={}): - """Not in help: Save information to file""" + """Not in help: Save information to file""" args = self.split_arg(line) # Check argument validity if check: self.check_save(args) - + if args[0] == 'options': # First look at options which should be put in MG5DIR/input to_define = {} @@ -2295,7 +2295,7 @@ def do_save(self, line, check=True, to_keep={}): for key, default in self.options_madevent.items(): if self.options[key] != self.options_madevent[key]: to_define[key] = self.options[key] - + if '--all' in args: for key, default in self.options_madgraph.items(): if self.options[key] != self.options_madgraph[key]: @@ -2312,12 +2312,12 @@ def do_save(self, line, check=True, to_keep={}): filepath = pjoin(self.me_dir, 'Cards', 'me5_configuration.txt') basefile = pjoin(self.me_dir, 'Cards', 'me5_configuration.txt') basedir = self.me_dir - + if to_keep: to_define = to_keep self.write_configuration(filepath, basefile, basedir, to_define) - - + + def do_edit_cards(self, line): @@ -2326,80 +2326,80 @@ def do_edit_cards(self, line): # Check argument's validity mode = self.check_generate_events(args) self.ask_run_configuration(mode) - + return ############################################################################ - + ############################################################################ def do_restart_gridpack(self, line): """ syntax restart_gridpack --precision=1.0 --restart_zero collect the result of the current run and relaunch each channel - not completed or optionally a completed one with a precision worse than + not completed or optionally a completed one with a precision worse than a threshold (and/or the zero result channel)""" - - + + args = self.split_arg(line) # Check argument's validity self.check_survey(args) - + # initialize / remove lhapdf mode #self.run_card = banner_mod.RunCard(pjoin(self.me_dir, 'Cards', 'run_card.dat')) #self.configure_directory() - + gensym = gen_ximprove.gensym(self) - + min_precision = 1.0 resubmit_zero=False if '--precision=' in line: s = line.index('--precision=') + len('--precision=') arg=line[s:].split(1)[0] min_precision = float(arg) - + if '--restart_zero' in line: resubmit_zero = True - - + + gensym.resubmit(min_precision, resubmit_zero) self.monitor(run_type='All jobs submitted for gridpack', html=True) #will be done during the refine (more precisely in gen_ximprove) cross, error = sum_html.make_all_html_results(self) self.results.add_detail('cross', cross) - self.results.add_detail('error', error) + self.results.add_detail('error', error) self.exec_cmd("print_results %s" % self.run_name, - errorhandling=False, printcmd=False, precmd=False, postcmd=False) - + errorhandling=False, printcmd=False, precmd=False, postcmd=False) + self.results.add_detail('run_statistics', dict(gensym.run_statistics)) - + #self.exec_cmd('combine_events', postcmd=False) #self.exec_cmd('store_events', postcmd=False) self.exec_cmd('decay_events -from_cards', postcmd=False) self.exec_cmd('create_gridpack', postcmd=False) - - - ############################################################################ + + + ############################################################################ ############################################################################ def do_generate_events(self, line): """Main Commands: launch the full chain """ - + self.banner = None self.Gdirs = None - + args = self.split_arg(line) # Check argument's validity mode = self.check_generate_events(args) switch_mode = self.ask_run_configuration(mode, args) if not args: - # No run name assigned -> assigned one automaticaly + # No run name assigned -> assigned one automaticaly self.set_run_name(self.find_available_run_name(self.me_dir), None, 'parton') else: self.set_run_name(args[0], None, 'parton', True) args.pop(0) - + self.run_generate_events(switch_mode, args) self.postprocessing() @@ -2420,8 +2420,8 @@ def postprocessing(self): def rivet_postprocessing(self, rivet_config, postprocess_RIVET, postprocess_CONTUR): - # Check number of Rivet jobs to run - run_dirs = [pjoin(self.me_dir, 'Events',run_name) + # Check number of Rivet jobs to run + run_dirs = [pjoin(self.me_dir, 'Events',run_name) for run_name in self.postprocessing_dirs] nb_rivet = len(run_dirs) @@ -2550,10 +2550,10 @@ def wait_monitoring(Idle, Running, Done): wrapper = open(pjoin(self.me_dir, "Analysis", "contur", "run_contur.sh"), "w") wrapper.write(set_env) - + wrapper.write('{0}\n'.format(contur_cmd)) wrapper.close() - + misc.call(["run_contur.sh"], cwd=(pjoin(self.me_dir, "Analysis", "contur"))) logger.info("Contur outputs are stored in {0}".format(pjoin(self.me_dir, "Analysis", "contur","conturPlot"))) @@ -2572,7 +2572,7 @@ def run_generate_events(self, switch_mode, args): self.do_set('run_mode 2') self.do_set('nb_core 1') - if self.run_card['gridpack'] in self.true: + if self.run_card['gridpack'] in self.true: # Running gridpack warmup gridpack_opts=[('accuracy', 0.01), ('points', 2000), @@ -2593,7 +2593,7 @@ def run_generate_events(self, switch_mode, args): # Regular run mode logger.info('Generating %s events with run name %s' % (self.run_card['nevents'], self.run_name)) - + self.exec_cmd('survey %s %s' % (self.run_name,' '.join(args)), postcmd=False) nb_event = self.run_card['nevents'] @@ -2601,7 +2601,7 @@ def run_generate_events(self, switch_mode, args): self.exec_cmd('refine %s' % nb_event, postcmd=False) if not float(self.results.current['cross']): # Zero cross-section. Try to guess why - text = '''Survey return zero cross section. + text = '''Survey return zero cross section. Typical reasons are the following: 1) A massive s-channel particle has a width set to zero. 2) The pdf are zero for at least one of the initial state particles @@ -2613,17 +2613,17 @@ def run_generate_events(self, switch_mode, args): raise ZeroResult('See https://cp3.irmp.ucl.ac.be/projects/madgraph/wiki/FAQ-General-14') else: bypass_run = True - + #we can bypass the following if scan and first result is zero if not bypass_run: self.exec_cmd('refine %s --treshold=%s' % (nb_event,self.run_card['second_refine_treshold']) , postcmd=False) - + self.exec_cmd('combine_events', postcmd=False,printcmd=False) self.print_results_in_shell(self.results.current) if self.run_card['use_syst']: - if self.run_card['systematics_program'] == 'auto': + if self.run_card['systematics_program'] == 'auto': scdir = self.options['syscalc_path'] if not scdir or not os.path.exists(scdir): to_use = 'systematics' @@ -2634,26 +2634,26 @@ def run_generate_events(self, switch_mode, args): else: logger.critical('Unvalid options for systematics_program: bypass computation of systematics variations.') to_use = 'none' - + if to_use == 'systematics': if self.run_card['systematics_arguments'] != ['']: self.exec_cmd('systematics %s %s ' % (self.run_name, - ' '.join(self.run_card['systematics_arguments'])), + ' '.join(self.run_card['systematics_arguments'])), postcmd=False, printcmd=False) else: self.exec_cmd('systematics %s --from_card' % self.run_name, - postcmd=False,printcmd=False) + postcmd=False,printcmd=False) elif to_use == 'syscalc': self.run_syscalc('parton') - - - self.create_plot('parton') - self.exec_cmd('store_events', postcmd=False) + + + self.create_plot('parton') + self.exec_cmd('store_events', postcmd=False) if self.run_card['boost_event'].strip() and self.run_card['boost_event'] != 'False': self.boost_events() - - - self.exec_cmd('reweight -from_cards', postcmd=False) + + + self.exec_cmd('reweight -from_cards', postcmd=False) self.exec_cmd('decay_events -from_cards', postcmd=False) if self.run_card['time_of_flight']>=0: self.exec_cmd("add_time_of_flight --threshold=%s" % self.run_card['time_of_flight'] ,postcmd=False) @@ -2664,43 +2664,43 @@ def run_generate_events(self, switch_mode, args): self.create_root_file(input , output) self.exec_cmd('madanalysis5_parton --no_default', postcmd=False, printcmd=False) - # shower launches pgs/delphes if needed + # shower launches pgs/delphes if needed self.exec_cmd('shower --no_default', postcmd=False, printcmd=False) self.exec_cmd('madanalysis5_hadron --no_default', postcmd=False, printcmd=False) self.exec_cmd('rivet --no_default', postcmd=False, printcmd=False) self.store_result() - - if self.allow_notification_center: - misc.system_notify('Run %s finished' % os.path.basename(self.me_dir), - '%s: %s +- %s ' % (self.results.current['run_name'], + + if self.allow_notification_center: + misc.system_notify('Run %s finished' % os.path.basename(self.me_dir), + '%s: %s +- %s ' % (self.results.current['run_name'], self.results.current['cross'], self.results.current['error'])) - + def boost_events(self): - + if not self.run_card['boost_event']: return - + if self.run_card['boost_event'].startswith('lambda'): if not isinstance(self, cmd.CmdShell): raise Exception("boost not allowed online") filter = eval(self.run_card['boost_event']) else: raise Exception - + path = [pjoin(self.me_dir, 'Events', self.run_name, 'unweighted_events.lhe.gz'), pjoin(self.me_dir, 'Events', self.run_name, 'unweighted_events.lhe'), pjoin(self.me_dir, 'Events', self.run_name, 'events.lhe.gz'), pjoin(self.me_dir, 'Events', self.run_name, 'events.lhe')] - + for p in path: if os.path.exists(p): event_path = p break else: raise Exception("fail to find event file for the boost") - - + + lhe = lhe_parser.EventFile(event_path) with misc.TMP_directory() as tmp_dir: output = lhe_parser.EventFile(pjoin(tmp_dir, os.path.basename(event_path)), 'w') @@ -2711,28 +2711,28 @@ def boost_events(self): event.boost(filter) #write this modify event output.write(str(event)) - output.write('\n') + output.write('\n') lhe.close() - files.mv(pjoin(tmp_dir, os.path.basename(event_path)), event_path) - - - - - + files.mv(pjoin(tmp_dir, os.path.basename(event_path)), event_path) + + + + + def do_initMadLoop(self,line): - """Compile and run MadLoop for a certain number of PS point so as to + """Compile and run MadLoop for a certain number of PS point so as to initialize MadLoop (setup the zero helicity and loop filter.)""" - + args = line.split() # Check argument's validity options = self.check_initMadLoop(args) - + if not options['force']: self.ask_edit_cards(['MadLoopParams.dat'], mode='fixed', plot=False) self.exec_cmd('treatcards loop --no_MadLoopInit') if options['refresh']: - for filter in misc.glob('*Filter*', + for filter in misc.glob('*Filter*', pjoin(self.me_dir,'SubProcesses','MadLoop5_resources')): logger.debug("Resetting filter '%s'."%os.path.basename(filter)) os.remove(filter) @@ -2753,14 +2753,14 @@ def do_initMadLoop(self,line): def do_launch(self, line, *args, **opt): """Main Commands: exec generate_events for 2>N and calculate_width for 1>N""" - + if self.ninitial == 1: logger.info("Note that since 2.3. The launch for 1>N pass in event generation\n"+ " To have the previous behavior use the calculate_decay_widths function") # self.do_calculate_decay_widths(line, *args, **opt) #else: self.do_generate_events(line, *args, **opt) - + def print_results_in_shell(self, data): """Have a nice results prints in the shell, data should be of type: gen_crossxhtml.OneTagResults""" @@ -2770,7 +2770,7 @@ def print_results_in_shell(self, data): if data['run_statistics']: globalstat = sum_html.RunStatistics() - + logger.info(" " ) logger.debug(" === Run statistics summary ===") for key, value in data['run_statistics'].items(): @@ -2786,13 +2786,13 @@ def print_results_in_shell(self, data): logger.warning(globalstat.get_warning_text()) logger.info(" ") - + logger.info(" === Results Summary for run: %s tag: %s ===\n" % (data['run_name'],data['tag'])) - + total_time = int(sum(_['cumulative_timing'] for _ in data['run_statistics'].values())) if total_time > 0: logger.info(" Cumulative sequential time for this run: %s"%misc.format_time(total_time)) - + if self.ninitial == 1: logger.info(" Width : %.4g +- %.4g GeV" % (data['cross'], data['error'])) else: @@ -2810,18 +2810,18 @@ def print_results_in_shell(self, data): if len(split)!=3: continue scale, cross, error = split - cross_sections[float(scale)] = (float(cross), float(error)) + cross_sections[float(scale)] = (float(cross), float(error)) if len(cross_sections)>0: logger.info(' Pythia8 merged cross-sections are:') for scale in sorted(cross_sections.keys()): logger.info(' > Merging scale = %-6.4g : %-11.5g +/- %-7.2g [pb]'%\ (scale,cross_sections[scale][0],cross_sections[scale][1])) - + else: if self.ninitial == 1: logger.info(" Matched width : %.4g +- %.4g GeV" % (data['cross_pythia'], data['error_pythia'])) else: - logger.info(" Matched cross-section : %.4g +- %.4g pb" % (data['cross_pythia'], data['error_pythia'])) + logger.info(" Matched cross-section : %.4g +- %.4g pb" % (data['cross_pythia'], data['error_pythia'])) logger.info(" Nb of events after matching/merging : %d" % int(data['nb_event_pythia'])) if self.run_card['use_syst'] in self.true and \ (int(self.run_card['ickkw'])==1 or self.run_card['ktdurham']>0.0 @@ -2838,9 +2838,9 @@ def print_results_in_file(self, data, path, mode='w', format='full'): data should be of type: gen_crossxhtml.OneTagResults""" if not data: return - + fsock = open(path, mode) - + if data['run_statistics']: logger.debug(" === Run statistics summary ===") for key, value in data['run_statistics'].items(): @@ -2851,7 +2851,7 @@ def print_results_in_file(self, data, path, mode='w', format='full'): if format == "full": fsock.write(" === Results Summary for run: %s tag: %s process: %s ===\n" % \ (data['run_name'],data['tag'], os.path.basename(self.me_dir))) - + if self.ninitial == 1: fsock.write(" Width : %.4g +- %.4g GeV\n" % (data['cross'], data['error'])) else: @@ -2861,20 +2861,20 @@ def print_results_in_file(self, data, path, mode='w', format='full'): if self.ninitial == 1: fsock.write(" Matched Width : %.4g +- %.4g GeV\n" % (data['cross_pythia'], data['error_pythia'])) else: - fsock.write(" Matched Cross-section : %.4g +- %.4g pb\n" % (data['cross_pythia'], data['error_pythia'])) + fsock.write(" Matched Cross-section : %.4g +- %.4g pb\n" % (data['cross_pythia'], data['error_pythia'])) fsock.write(" Nb of events after Matching : %s\n" % data['nb_event_pythia']) fsock.write(" \n" ) elif format == "short": if mode == "w": fsock.write("# run_name tag cross error Nb_event cross_after_matching nb_event_after matching\n") - + if data['cross_pythia'] and data['nb_event_pythia']: text = "%(run_name)s %(tag)s %(cross)s %(error)s %(nb_event)s %(cross_pythia)s %(nb_event_pythia)s\n" else: text = "%(run_name)s %(tag)s %(cross)s %(error)s %(nb_event)s\n" fsock.write(text % data) - - ############################################################################ + + ############################################################################ def do_calculate_decay_widths(self, line): """Main Commands: launch decay width calculation and automatic inclusion of calculated widths and BRs in the param_card.""" @@ -2887,21 +2887,21 @@ def do_calculate_decay_widths(self, line): self.Gdirs = None if not args: - # No run name assigned -> assigned one automaticaly + # No run name assigned -> assigned one automaticaly self.set_run_name(self.find_available_run_name(self.me_dir)) else: self.set_run_name(args[0], reload_card=True) args.pop(0) self.configure_directory() - + # Running gridpack warmup opts=[('accuracy', accuracy), # default 0.01 ('points', 1000), ('iterations',9)] logger.info('Calculating decay widths with run name %s' % self.run_name) - + self.exec_cmd('survey %s %s' % \ (self.run_name, " ".join(['--' + opt + '=' + str(val) for (opt,val) \ @@ -2910,26 +2910,26 @@ def do_calculate_decay_widths(self, line): self.refine_mode = "old" # specify how to combine event self.exec_cmd('combine_events', postcmd=False) self.exec_cmd('store_events', postcmd=False) - + self.collect_decay_widths() self.print_results_in_shell(self.results.current) - self.update_status('calculate_decay_widths done', - level='parton', makehtml=False) + self.update_status('calculate_decay_widths done', + level='parton', makehtml=False) + - ############################################################################ def collect_decay_widths(self): - """ Collect the decay widths and calculate BRs for all particles, and put - in param_card form. + """ Collect the decay widths and calculate BRs for all particles, and put + in param_card form. """ - + particle_dict = {} # store the results run_name = self.run_name # Looping over the Subprocesses for P_path in SubProcesses.get_subP(self.me_dir): ids = SubProcesses.get_subP_ids(P_path) - # due to grouping we need to compute the ratio factor for the + # due to grouping we need to compute the ratio factor for the # ungroup resutls (that we need here). Note that initial particles # grouping are not at the same stage as final particle grouping nb_output = len(ids) / (len(set([p[0] for p in ids]))) @@ -2940,30 +2940,30 @@ def collect_decay_widths(self): particle_dict[particles[0]].append([particles[1:], result/nb_output]) except KeyError: particle_dict[particles[0]] = [[particles[1:], result/nb_output]] - + self.update_width_in_param_card(particle_dict, initial = pjoin(self.me_dir, 'Cards', 'param_card.dat'), output=pjoin(self.me_dir, 'Events', run_name, "param_card.dat")) - + @staticmethod def update_width_in_param_card(decay_info, initial=None, output=None): # Open the param_card.dat and insert the calculated decays and BRs - + if not output: output = initial - + param_card_file = open(initial) param_card = param_card_file.read().split('\n') param_card_file.close() decay_lines = [] line_number = 0 - # Read and remove all decays from the param_card + # Read and remove all decays from the param_card while line_number < len(param_card): line = param_card[line_number] if line.lower().startswith('decay'): - # Read decay if particle in decay_info - # DECAY 6 1.455100e+00 + # Read decay if particle in decay_info + # DECAY 6 1.455100e+00 line = param_card.pop(line_number) line = line.split() particle = 0 @@ -2996,7 +2996,7 @@ def update_width_in_param_card(decay_info, initial=None, output=None): break line=param_card[line_number] if particle and particle not in decay_info: - # No decays given, only total width + # No decays given, only total width decay_info[particle] = [[[], width]] else: # Not decay line_number += 1 @@ -3004,7 +3004,7 @@ def update_width_in_param_card(decay_info, initial=None, output=None): while not param_card[-1] or param_card[-1].startswith('#'): param_card.pop(-1) - # Append calculated and read decays to the param_card + # Append calculated and read decays to the param_card param_card.append("#\n#*************************") param_card.append("# Decay widths *") param_card.append("#*************************") @@ -3018,7 +3018,7 @@ def update_width_in_param_card(decay_info, initial=None, output=None): param_card.append("# BR NDA ID1 ID2 ...") brs = [[(val[1]/width).real, val[0]] for val in decay_info[key] if val[1]] for val in sorted(brs, reverse=True): - param_card.append(" %e %i %s # %s" % + param_card.append(" %e %i %s # %s" % (val[0].real, len(val[1]), " ".join([str(v) for v in val[1]]), val[0] * width @@ -3031,7 +3031,7 @@ def update_width_in_param_card(decay_info, initial=None, output=None): ############################################################################ def do_multi_run(self, line): - + args = self.split_arg(line) # Check argument's validity mode = self.check_multi_run(args) @@ -3047,7 +3047,7 @@ def do_multi_run(self, line): self.check_param_card(path, run=False) #store it locally to avoid relaunch param_card_iterator, self.param_card_iterator = self.param_card_iterator, [] - + crossoversig = 0 inv_sq_err = 0 nb_event = 0 @@ -3055,8 +3055,8 @@ def do_multi_run(self, line): self.nb_refine = 0 self.exec_cmd('generate_events %s_%s -f' % (main_name, i), postcmd=False) # Update collected value - nb_event += int(self.results[self.run_name][-1]['nb_event']) - self.results.add_detail('nb_event', nb_event , run=main_name) + nb_event += int(self.results[self.run_name][-1]['nb_event']) + self.results.add_detail('nb_event', nb_event , run=main_name) cross = self.results[self.run_name][-1]['cross'] error = self.results[self.run_name][-1]['error'] + 1e-99 crossoversig+=cross/error**2 @@ -3070,7 +3070,7 @@ def do_multi_run(self, line): os.mkdir(pjoin(self.me_dir,'Events', self.run_name)) except Exception: pass - os.system('%(bin)s/merge.pl %(event)s/%(name)s_*/unweighted_events.lhe.gz %(event)s/%(name)s/unweighted_events.lhe.gz %(event)s/%(name)s_banner.txt' + os.system('%(bin)s/merge.pl %(event)s/%(name)s_*/unweighted_events.lhe.gz %(event)s/%(name)s/unweighted_events.lhe.gz %(event)s/%(name)s_banner.txt' % {'bin': self.dirbin, 'event': pjoin(self.me_dir,'Events'), 'name': self.run_name}) @@ -3084,19 +3084,19 @@ def do_multi_run(self, line): self.create_root_file('%s/unweighted_events.lhe' % self.run_name, '%s/unweighted_events.root' % self.run_name) - - path = pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe") + + path = pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe") self.create_plot('parton', path, pjoin(self.me_dir, 'HTML',self.run_name, 'plots_parton.html') ) - - if not os.path.exists('%s.gz' % path): + + if not os.path.exists('%s.gz' % path): misc.gzip(path) self.update_status('', level='parton') - self.print_results_in_shell(self.results.current) - + self.print_results_in_shell(self.results.current) + cpath = pjoin(self.me_dir,'Cards','param_card.dat') if param_card_iterator: @@ -3112,21 +3112,21 @@ def do_multi_run(self, line): path = pjoin(self.me_dir, 'Events','scan_%s.txt' % scan_name) logger.info("write all cross-section results in %s" % path, '$MG:BOLD') param_card_iterator.write_summary(path) - - ############################################################################ + + ############################################################################ def do_treatcards(self, line, mode=None, opt=None): """Advanced commands: create .inc files from param_card.dat/run_card.dat""" if not mode and not opt: args = self.split_arg(line) mode, opt = self.check_treatcards(args) - + # To decide whether to refresh MadLoop's helicity filters, it is necessary # to check if the model parameters where modified or not, before doing - # anything else. + # anything else. need_MadLoopFilterUpdate = False - # Just to record what triggered the reinitialization of MadLoop for a + # Just to record what triggered the reinitialization of MadLoop for a # nice debug message. type_of_change = '' if not opt['forbid_MadLoopInit'] and self.proc_characteristics['loop_induced'] \ @@ -3137,10 +3137,10 @@ def do_treatcards(self, line, mode=None, opt=None): (os.path.getmtime(paramDat)-os.path.getmtime(paramInc)) > 0.0: need_MadLoopFilterUpdate = True type_of_change = 'model' - + ML_in = pjoin(self.me_dir, 'Cards', 'MadLoopParams.dat') ML_out = pjoin(self.me_dir,"SubProcesses", - "MadLoop5_resources", "MadLoopParams.dat") + "MadLoop5_resources", "MadLoopParams.dat") if (not os.path.isfile(ML_in)) or (not os.path.isfile(ML_out)) or \ (os.path.getmtime(ML_in)-os.path.getmtime(ML_out)) > 0.0: need_MadLoopFilterUpdate = True @@ -3148,7 +3148,7 @@ def do_treatcards(self, line, mode=None, opt=None): #check if no 'Auto' are present in the file self.check_param_card(pjoin(self.me_dir, 'Cards','param_card.dat')) - + if mode in ['param', 'all']: model = self.find_model_name() tmp_model = os.path.basename(model) @@ -3160,9 +3160,9 @@ def do_treatcards(self, line, mode=None, opt=None): check_param_card.check_valid_param_card(mg5_param) opt['param_card'] = pjoin(self.me_dir, 'Source', 'MODEL', 'MG5_param.dat') else: - check_param_card.check_valid_param_card(opt['param_card']) - - logger.debug('write compile file for card: %s' % opt['param_card']) + check_param_card.check_valid_param_card(opt['param_card']) + + logger.debug('write compile file for card: %s' % opt['param_card']) param_card = check_param_card.ParamCard(opt['param_card']) outfile = pjoin(opt['output_dir'], 'param_card.inc') ident_card = pjoin(self.me_dir,'Cards','ident_card.dat') @@ -3185,10 +3185,10 @@ def do_treatcards(self, line, mode=None, opt=None): devnull.close() default = pjoin(self.me_dir,'bin','internal','ufomodel','param_card.dat') - need_mp = self.proc_characteristics['loop_induced'] + need_mp = self.proc_characteristics['loop_induced'] param_card.write_inc_file(outfile, ident_card, default, need_mp=need_mp) - - + + if mode in ['run', 'all']: if not hasattr(self, 'run_card'): run_card = banner_mod.RunCard(opt['run_card'], path=pjoin(self.me_dir, 'Cards', 'run_card.dat')) @@ -3202,7 +3202,7 @@ def do_treatcards(self, line, mode=None, opt=None): run_card['lpp2'] = 0 run_card['ebeam1'] = 0 run_card['ebeam2'] = 0 - + # Ensure that the bias parameters has all the required input from the # run_card if run_card['bias_module'].lower() not in ['dummy','none']: @@ -3219,7 +3219,7 @@ def do_treatcards(self, line, mode=None, opt=None): mandatory_file,run_card['bias_module'])) misc.copytree(run_card['bias_module'], pjoin(self.me_dir,'Source','BIAS', os.path.basename(run_card['bias_module']))) - + #check expected parameters for the module. default_bias_parameters = {} start, last = False,False @@ -3244,50 +3244,50 @@ def do_treatcards(self, line, mode=None, opt=None): for pair in line.split(','): if not pair.strip(): continue - x,y =pair.split(':') + x,y =pair.split(':') x=x.strip() if x.startswith(('"',"'")) and x.endswith(x[0]): - x = x[1:-1] + x = x[1:-1] default_bias_parameters[x] = y elif ':' in line: x,y = line.split(':') x = x.strip() if x.startswith(('"',"'")) and x.endswith(x[0]): - x = x[1:-1] + x = x[1:-1] default_bias_parameters[x] = y for key,value in run_card['bias_parameters'].items(): if key not in default_bias_parameters: logger.warning('%s not supported by the bias module. We discard this entry.', key) else: default_bias_parameters[key] = value - run_card['bias_parameters'] = default_bias_parameters - - - # Finally write the include file + run_card['bias_parameters'] = default_bias_parameters + + + # Finally write the include file run_card.write_include_file(opt['output_dir']) - + if self.proc_characteristics['loop_induced'] and mode in ['loop', 'all']: - self.MadLoopparam = banner_mod.MadLoopParam(pjoin(self.me_dir, + self.MadLoopparam = banner_mod.MadLoopParam(pjoin(self.me_dir, 'Cards', 'MadLoopParams.dat')) # The writing out of MadLoop filter is potentially dangerous # when running in multi-core with a central disk. So it is turned - # off here. If these filters were not initialized then they will + # off here. If these filters were not initialized then they will # have to be re-computed at the beginning of each run. if 'WriteOutFilters' in self.MadLoopparam.user_set and \ self.MadLoopparam.get('WriteOutFilters'): logger.info( -"""You chose to have MadLoop writing out filters. +"""You chose to have MadLoop writing out filters. Beware that this can be dangerous for local multicore runs.""") self.MadLoopparam.set('WriteOutFilters',False, changeifuserset=False) - + # The conservative settings below for 'CTModeInit' and 'ZeroThres' # help adress issues for processes like g g > h z, and g g > h g - # where there are some helicity configuration heavily suppressed - # (by several orders of magnitude) so that the helicity filter + # where there are some helicity configuration heavily suppressed + # (by several orders of magnitude) so that the helicity filter # needs high numerical accuracy to correctly handle this spread in # magnitude. Also, because one cannot use the Born as a reference - # scale, it is better to force quadruple precision *for the + # scale, it is better to force quadruple precision *for the # initialization points only*. This avoids numerical accuracy issues # when setting up the helicity filters and does not significantly # slow down the run. @@ -3298,21 +3298,21 @@ def do_treatcards(self, line, mode=None, opt=None): # It is a bit superficial to use the level 2 which tries to numerically # map matching helicities (because of CP symmetry typically) together. -# It is useless in the context of MC over helicities and it can +# It is useless in the context of MC over helicities and it can # potentially make the helicity double checking fail. self.MadLoopparam.set('HelicityFilterLevel',1, changeifuserset=False) # To be on the safe side however, we ask for 4 consecutive matching # helicity filters. self.MadLoopparam.set('CheckCycle',4, changeifuserset=False) - + # For now it is tricky to have each channel performing the helicity # double check. What we will end up doing is probably some kind # of new initialization round at the beginning of each launch - # command, to reset the filters. + # command, to reset the filters. self.MadLoopparam.set('DoubleCheckHelicityFilter',False, changeifuserset=False) - + # Thanks to TIR recycling, TIR is typically much faster for Loop-induced # processes when not doing MC over helicities, so that we place OPP last. if not hasattr(self, 'run_card'): @@ -3349,7 +3349,7 @@ def do_treatcards(self, line, mode=None, opt=None): logger.warning( """You chose to also use a lorentz rotation for stability tests (see parameter NRotations_[DP|QP]). Beware that, for optimization purposes, MadEvent uses manual TIR cache clearing which is not compatible - with the lorentz rotation stability test. The number of these rotations to be used will be reset to + with the lorentz rotation stability test. The number of these rotations to be used will be reset to zero by MadLoop. You can avoid this by changing the parameter 'FORCE_ML_HELICITY_SUM' int he matrix.f files to be .TRUE. so that the sum over helicity configurations is performed within MadLoop (in which case the helicity of final state particles cannot be speicfied in the LHE file.""") @@ -3363,15 +3363,15 @@ def do_treatcards(self, line, mode=None, opt=None): # self.MadLoopparam.set('NRotations_DP',0,changeifuserset=False) # Revert to the above to be slightly less robust but twice faster. self.MadLoopparam.set('NRotations_DP',1,changeifuserset=False) - self.MadLoopparam.set('NRotations_QP',0,changeifuserset=False) - + self.MadLoopparam.set('NRotations_QP',0,changeifuserset=False) + # Finally, the stability tests are slightly less reliable for process - # with less or equal than 4 final state particles because the + # with less or equal than 4 final state particles because the # accessible kinematic is very limited (i.e. lorentz rotations don't # shuffle invariants numerics much). In these cases, we therefore # increase the required accuracy to 10^-7. # This is important for getting g g > z z [QCD] working with a - # ptheavy cut as low as 1 GeV. + # ptheavy cut as low as 1 GeV. if self.proc_characteristics['nexternal']<=4: if ('MLStabThres' in self.MadLoopparam.user_set and \ self.MadLoopparam.get('MLStabThres')>1.0e-7): @@ -3381,12 +3381,12 @@ def do_treatcards(self, line, mode=None, opt=None): than four external legs, so this is not recommended (especially not for g g > z z).""") self.MadLoopparam.set('MLStabThres',1.0e-7,changeifuserset=False) else: - self.MadLoopparam.set('MLStabThres',1.0e-4,changeifuserset=False) + self.MadLoopparam.set('MLStabThres',1.0e-4,changeifuserset=False) #write the output file self.MadLoopparam.write(pjoin(self.me_dir,"SubProcesses","MadLoop5_resources", "MadLoopParams.dat")) - + if self.proc_characteristics['loop_induced'] and mode in ['loop', 'all']: # Now Update MadLoop filters if necessary (if modifications were made to # the model parameters). @@ -3403,12 +3403,12 @@ def do_treatcards(self, line, mode=None, opt=None): elif not opt['forbid_MadLoopInit'] and \ MadLoopInitializer.need_MadLoopInit(self.me_dir): self.exec_cmd('initMadLoop -f') - - ############################################################################ + + ############################################################################ def do_survey(self, line): """Advanced commands: launch survey for the current process """ - - + + args = self.split_arg(line) # Check argument's validity self.check_survey(args) @@ -3416,7 +3416,7 @@ def do_survey(self, line): if os.path.exists(pjoin(self.me_dir,'error')): os.remove(pjoin(self.me_dir,'error')) - + self.configure_directory() # Save original random number self.random_orig = self.random @@ -3435,9 +3435,9 @@ def do_survey(self, line): P_zero_result = [] # check the number of times where they are no phase-space # File for the loop (for loop induced) - if os.path.exists(pjoin(self.me_dir,'SubProcesses', + if os.path.exists(pjoin(self.me_dir,'SubProcesses', 'MadLoop5_resources')) and cluster.need_transfer(self.options): - tf=tarfile.open(pjoin(self.me_dir, 'SubProcesses', + tf=tarfile.open(pjoin(self.me_dir, 'SubProcesses', 'MadLoop5_resources.tar.gz'), 'w:gz', dereference=True) tf.add(pjoin(self.me_dir,'SubProcesses','MadLoop5_resources'), arcname='MadLoop5_resources') @@ -3467,7 +3467,7 @@ def do_survey(self, line): except Exception as error: logger.debug(error) pass - + jobs, P_zero_result = ajobcreator.launch() # Check if all or only some fails if P_zero_result: @@ -3481,60 +3481,60 @@ def do_survey(self, line): self.get_Gdir() for P in P_zero_result: self.Gdirs[0][pjoin(self.me_dir,'SubProcesses',P)] = [] - + self.monitor(run_type='All jobs submitted for survey', html=True) if not self.history or 'survey' in self.history[-1] or self.ninitial ==1 or \ self.run_card['gridpack']: #will be done during the refine (more precisely in gen_ximprove) cross, error = self.make_make_all_html_results() self.results.add_detail('cross', cross) - self.results.add_detail('error', error) + self.results.add_detail('error', error) self.exec_cmd("print_results %s" % self.run_name, - errorhandling=False, printcmd=False, precmd=False, postcmd=False) - + errorhandling=False, printcmd=False, precmd=False, postcmd=False) + self.results.add_detail('run_statistics', dict(ajobcreator.run_statistics)) self.update_status('End survey', 'parton', makehtml=False) ############################################################################ def pass_in_difficult_integration_mode(self, rate=1): """be more secure for the integration to not miss it due to strong cut""" - + # improve survey options if default if self.opts['points'] == self._survey_options['points'][1]: self.opts['points'] = (rate+2) * self._survey_options['points'][1] if self.opts['iterations'] == self._survey_options['iterations'][1]: self.opts['iterations'] = 1 + rate + self._survey_options['iterations'][1] if self.opts['accuracy'] == self._survey_options['accuracy'][1]: - self.opts['accuracy'] = self._survey_options['accuracy'][1]/(rate+2) - + self.opts['accuracy'] = self._survey_options['accuracy'][1]/(rate+2) + # Modify run_config.inc in order to improve the refine conf_path = pjoin(self.me_dir, 'Source','run_config.inc') files.cp(conf_path, conf_path + '.bk') # text = open(conf_path).read() - min_evt, max_evt = 2500 *(2+rate), 10000*(rate+1) - + min_evt, max_evt = 2500 *(2+rate), 10000*(rate+1) + text = re.sub('''\(min_events = \d+\)''', '(min_events = %i )' % min_evt, text) text = re.sub('''\(max_events = \d+\)''', '(max_events = %i )' % max_evt, text) fsock = open(conf_path, 'w') fsock.write(text) fsock.close() - + # Compile for name in ['../bin/internal/gen_ximprove', 'all']: self.compile(arg=[name], cwd=os.path.join(self.me_dir, 'Source')) - - - ############################################################################ + + + ############################################################################ def do_refine(self, line): """Advanced commands: launch survey for the current process """ - devnull = open(os.devnull, 'w') + devnull = open(os.devnull, 'w') self.nb_refine += 1 args = self.split_arg(line) treshold=None - - + + for a in args: if a.startswith('--treshold='): treshold = float(a.split('=',1)[1]) @@ -3548,8 +3548,8 @@ def do_refine(self, line): break # Check argument's validity self.check_refine(args) - - refine_opt = {'err_goal': args[0], 'split_channels': True} + + refine_opt = {'err_goal': args[0], 'split_channels': True} precision = args[0] if len(args) == 2: refine_opt['max_process']= args[1] @@ -3560,15 +3560,15 @@ def do_refine(self, line): # Update random number self.update_random() self.save_random() - + if self.cluster_mode: logger.info('Creating Jobs') self.update_status('Refine results to %s' % precision, level=None) - + self.total_jobs = 0 - subproc = [l.strip() for l in open(pjoin(self.me_dir,'SubProcesses', + subproc = [l.strip() for l in open(pjoin(self.me_dir,'SubProcesses', 'subproc.mg'))] - + # cleanning the previous job for nb_proc,subdir in enumerate(subproc): subdir = subdir.strip() @@ -3589,14 +3589,14 @@ def do_refine(self, line): level = 5 if value.has_warning(): level = 10 - logger.log(level, + logger.log(level, value.nice_output(str('/'.join([key[0],'G%s'%key[1]]))). replace(' statistics','')) logger.debug(globalstat.nice_output('combined', no_warning=True)) - + if survey_statistics: x_improve.run_statistics = survey_statistics - + x_improve.launch() # create the ajob for the refinment. if not self.history or 'refine' not in self.history[-1]: cross, error = x_improve.update_html() #update html results for survey @@ -3610,9 +3610,9 @@ def do_refine(self, line): subdir = subdir.strip() Pdir = pjoin(self.me_dir, 'SubProcesses',subdir) bindir = pjoin(os.path.relpath(self.dirbin, Pdir)) - + logger.info(' %s ' % subdir) - + if os.path.exists(pjoin(Pdir, 'ajob1')): cudacpp_backend = self.run_card['cudacpp_backend'] # the default value is defined in banner.py @@ -3629,7 +3629,7 @@ def do_refine(self, line): ###self.compile(['all'], cwd=Pdir) alljobs = misc.glob('ajob*', Pdir) - + #remove associated results.dat (ensure to not mix with all data) Gre = re.compile("\s*j=(G[\d\.\w]+)") for job in alljobs: @@ -3637,49 +3637,49 @@ def do_refine(self, line): for Gdir in Gdirs: if os.path.exists(pjoin(Pdir, Gdir, 'results.dat')): os.remove(pjoin(Pdir, Gdir,'results.dat')) - - nb_tot = len(alljobs) + + nb_tot = len(alljobs) self.total_jobs += nb_tot for i, job in enumerate(alljobs): job = os.path.basename(job) - self.launch_job('%s' % job, cwd=Pdir, remaining=(nb_tot-i-1), - run_type='Refine number %s on %s (%s/%s)' % + self.launch_job('%s' % job, cwd=Pdir, remaining=(nb_tot-i-1), + run_type='Refine number %s on %s (%s/%s)' % (self.nb_refine, subdir, nb_proc+1, len(subproc))) - self.monitor(run_type='All job submitted for refine number %s' % self.nb_refine, + self.monitor(run_type='All job submitted for refine number %s' % self.nb_refine, html=True) - + self.update_status("Combining runs", level='parton') try: os.remove(pjoin(Pdir, 'combine_runs.log')) except Exception: pass - + if isinstance(x_improve, gen_ximprove.gen_ximprove_v4): # the merge of the events.lhe is handle in the x_improve class - # for splitted runs. (and partly in store_events). + # for splitted runs. (and partly in store_events). combine_runs.CombineRuns(self.me_dir) self.refine_mode = "old" else: self.refine_mode = "new" - + cross, error = self.make_make_all_html_results() self.results.add_detail('cross', cross) self.results.add_detail('error', error) - self.results.add_detail('run_statistics', + self.results.add_detail('run_statistics', dict(self.results.get_detail('run_statistics'))) self.update_status('finish refine', 'parton', makehtml=False) devnull.close() - - ############################################################################ + + ############################################################################ def do_comine_iteration(self, line): """Not in help: Combine a given iteration combine_iteration Pdir Gdir S|R step - S is for survey + S is for survey R is for refine - step is the iteration number (not very critical)""" + step is the iteration number (not very critical)""" self.set_run_name("tmp") self.configure_directory(html_opening=False) @@ -3695,12 +3695,12 @@ def do_comine_iteration(self, line): gensym.combine_iteration(Pdir, Gdir, int(step)) elif mode == "R": refine = gen_ximprove.gen_ximprove_share(self) - refine.combine_iteration(Pdir, Gdir, int(step)) - - + refine.combine_iteration(Pdir, Gdir, int(step)) - - ############################################################################ + + + + ############################################################################ def do_combine_events(self, line): """Advanced commands: Launch combine events""" start=time.time() @@ -3710,11 +3710,11 @@ def do_combine_events(self, line): self.check_combine_events(args) self.update_status('Combining Events', level='parton') - + if self.run_card['gridpack'] and isinstance(self, GridPackCmd): return GridPackCmd.do_combine_events(self, line) - + # Define The Banner tag = self.run_card['run_tag'] # Update the banner with the pythia card @@ -3727,14 +3727,14 @@ def do_combine_events(self, line): self.banner.change_seed(self.random_orig) if not os.path.exists(pjoin(self.me_dir, 'Events', self.run_name)): os.mkdir(pjoin(self.me_dir, 'Events', self.run_name)) - self.banner.write(pjoin(self.me_dir, 'Events', self.run_name, + self.banner.write(pjoin(self.me_dir, 'Events', self.run_name, '%s_%s_banner.txt' % (self.run_name, tag))) - - get_wgt = lambda event: event.wgt + + get_wgt = lambda event: event.wgt AllEvent = lhe_parser.MultiEventFile() AllEvent.banner = self.banner - + partials = 0 # if too many file make some partial unweighting sum_xsec, sum_xerru, sum_axsec = 0,[],0 Gdirs = self.get_Gdir() @@ -3751,12 +3751,12 @@ def do_combine_events(self, line): os.remove(pjoin(Gdir, 'events.lhe')) continue - AllEvent.add(pjoin(Gdir, 'events.lhe'), + AllEvent.add(pjoin(Gdir, 'events.lhe'), result.get('xsec'), result.get('xerru'), result.get('axsec') ) - + if len(AllEvent) >= 80: #perform a partial unweighting AllEvent.unweight(pjoin(self.me_dir, "Events", self.run_name, "partials%s.lhe.gz" % partials), get_wgt, log_level=5, trunc_error=1e-2, event_target=self.run_card['nevents']) @@ -3765,13 +3765,13 @@ def do_combine_events(self, line): AllEvent.add(pjoin(self.me_dir, "Events", self.run_name, "partials%s.lhe.gz" % partials), sum_xsec, math.sqrt(sum(x**2 for x in sum_xerru)), - sum_axsec) + sum_axsec) partials +=1 - + if not hasattr(self,'proc_characteristic'): self.proc_characteristic = self.get_characteristics() if len(AllEvent) == 0: - nb_event = 0 + nb_event = 0 else: nb_event = AllEvent.unweight(pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe.gz"), get_wgt, trunc_error=1e-2, event_target=self.run_card['nevents'], @@ -3791,22 +3791,22 @@ def do_combine_events(self, line): os.remove(pjoin(self.me_dir, "Events", self.run_name, "partials%s.lhe.gz" % i)) except Exception: os.remove(pjoin(self.me_dir, "Events", self.run_name, "partials%s.lhe" % i)) - + self.results.add_detail('nb_event', nb_event) - + if self.run_card['bias_module'].lower() not in ['dummy', 'none'] and nb_event: self.correct_bias() elif self.run_card['custom_fcts']: self.correct_bias() logger.info("combination of events done in %s s ", time.time()-start) - + self.to_store.append('event') - - ############################################################################ + + ############################################################################ def correct_bias(self): - """check the first event and correct the weight by the bias + """check the first event and correct the weight by the bias and correct the cross-section. - If the event do not have the bias tag it means that the bias is + If the event do not have the bias tag it means that the bias is one modifying the cross-section/shape so we have nothing to do """ @@ -3834,7 +3834,7 @@ def correct_bias(self): output.write('') output.close() lhe.close() - + # MODIFY THE BANNER i.e. INIT BLOCK # ensure information compatible with normalisation choice total_cross = sum(cross[key] for key in cross) @@ -3846,8 +3846,8 @@ def correct_bias(self): elif self.run_card['event_norm'] == 'unity': total_cross = self.results.current['cross'] * total_cross / nb_event for key in cross: - cross[key] *= total_cross / nb_event - + cross[key] *= total_cross / nb_event + bannerfile = lhe_parser.EventFile(pjoin(self.me_dir, 'Events', self.run_name, '.banner.tmp.gz'),'w') banner = banner_mod.Banner(lhe.banner) banner.modify_init_cross(cross) @@ -3862,12 +3862,12 @@ def correct_bias(self): os.remove(lhe.name) os.remove(bannerfile.name) os.remove(output.name) - - + + self.results.current['cross'] = total_cross self.results.current['error'] = 0 - - ############################################################################ + + ############################################################################ def do_store_events(self, line): """Advanced commands: Launch store events""" @@ -3883,16 +3883,16 @@ def do_store_events(self, line): if not os.path.exists(pjoin(self.me_dir, 'Events', run)): os.mkdir(pjoin(self.me_dir, 'Events', run)) if not os.path.exists(pjoin(self.me_dir, 'HTML', run)): - os.mkdir(pjoin(self.me_dir, 'HTML', run)) - + os.mkdir(pjoin(self.me_dir, 'HTML', run)) + # 1) Store overall process information #input = pjoin(self.me_dir, 'SubProcesses', 'results.dat') #output = pjoin(self.me_dir, 'SubProcesses', '%s_results.dat' % run) - #files.cp(input, output) + #files.cp(input, output) # 2) Treat the files present in the P directory - # Ensure that the number of events is different of 0 + # Ensure that the number of events is different of 0 if self.results.current['nb_event'] == 0 and not self.run_card['gridpack']: logger.warning("No event detected. No cleaning performed! This should allow to run:\n" + " cd Subprocesses; ../bin/internal/combine_events\n"+ @@ -3910,18 +3910,18 @@ def do_store_events(self, line): # if os.path.exists(pjoin(G_path, 'results.dat')): # input = pjoin(G_path, 'results.dat') # output = pjoin(G_path, '%s_results.dat' % run) - # files.cp(input, output) + # files.cp(input, output) #except Exception: - # continue + # continue # Store log try: if os.path.exists(pjoin(G_path, 'log.txt')): input = pjoin(G_path, 'log.txt') output = pjoin(G_path, '%s_log.txt' % run) - files.mv(input, output) + files.mv(input, output) except Exception: continue - #try: + #try: # # Grid # for name in ['ftn26']: # if os.path.exists(pjoin(G_path, name)): @@ -3930,7 +3930,7 @@ def do_store_events(self, line): # input = pjoin(G_path, name) # output = pjoin(G_path, '%s_%s' % (run,name)) # files.mv(input, output) - # misc.gzip(pjoin(G_path, output), error=None) + # misc.gzip(pjoin(G_path, output), error=None) #except Exception: # continue # Delete ftn25 to ensure reproducible runs @@ -3940,11 +3940,11 @@ def do_store_events(self, line): # 3) Update the index.html self.gen_card_html() - + # 4) Move the Files present in Events directory E_path = pjoin(self.me_dir, 'Events') O_path = pjoin(self.me_dir, 'Events', run) - + # The events file for name in ['events.lhe', 'unweighted_events.lhe']: finput = pjoin(E_path, name) @@ -3960,30 +3960,30 @@ def do_store_events(self, line): # os.remove(pjoin(O_path, '%s.gz' % name)) # input = pjoin(E_path, name) ## output = pjoin(O_path, name) - + self.update_status('End Parton', level='parton', makehtml=False) devnull.close() - - - ############################################################################ + + + ############################################################################ def do_create_gridpack(self, line): """Advanced commands: Create gridpack from present run""" self.update_status('Creating gridpack', level='parton') # compile gen_ximprove misc.compile(['../bin/internal/gen_ximprove'], cwd=pjoin(self.me_dir, "Source")) - + Gdir = self.get_Gdir() Pdir = set([os.path.dirname(G) for G in Gdir]) - for P in Pdir: + for P in Pdir: allG = misc.glob('G*', path=P) for G in allG: if pjoin(P, G) not in Gdir: logger.debug('removing %s', pjoin(P,G)) shutil.rmtree(pjoin(P,G)) - - + + args = self.split_arg(line) self.check_combine_events(args) if not self.run_tag: self.run_tag = 'tag_1' @@ -3996,13 +3996,13 @@ def do_create_gridpack(self, line): cwd=self.me_dir) misc.call(['./bin/internal/clean'], cwd=self.me_dir) misc.call(['./bin/internal/make_gridpack'], cwd=self.me_dir) - files.mv(pjoin(self.me_dir, 'gridpack.tar.gz'), + files.mv(pjoin(self.me_dir, 'gridpack.tar.gz'), pjoin(self.me_dir, '%s_gridpack.tar.gz' % self.run_name)) os.system("sed -i.bak \"s/\s*.true.*=.*GridRun/ .false. = GridRun/g\" %s/Cards/grid_card.dat" \ % self.me_dir) self.update_status('gridpack created', level='gridpack') - - ############################################################################ + + ############################################################################ def do_shower(self, line): """launch the shower""" @@ -4010,7 +4010,7 @@ def do_shower(self, line): if len(args)>1 and args[0] in self._interfaced_showers: chosen_showers = [args.pop(0)] elif '--no_default' in line: - # If '--no_default' was specified in the arguments, then only one + # If '--no_default' was specified in the arguments, then only one # shower will be run, depending on which card is present. # but we each of them are called. (each of them check if the file exists) chosen_showers = list(self._interfaced_showers) @@ -4021,9 +4021,9 @@ def do_shower(self, line): shower_priority = ['pythia8','pythia'] chosen_showers = [sorted(chosen_showers,key=lambda sh: shower_priority.index(sh) if sh in shower_priority else len(shower_priority)+1)[0]] - + for shower in chosen_showers: - self.exec_cmd('%s %s'%(shower,' '.join(args)), + self.exec_cmd('%s %s'%(shower,' '.join(args)), postcmd=False, printcmd=False) def do_madanalysis5_parton(self, line): @@ -4039,11 +4039,11 @@ def do_madanalysis5_parton(self, line): def mg5amc_py8_interface_consistency_warning(options): """ Check the consistency of the mg5amc_py8_interface installed with the current MG5 and Pythia8 versions. """ - + # All this is only relevant is Pythia8 is interfaced to MG5 if not options['pythia8_path']: return None - + if not options['mg5amc_py8_interface_path']: return \ """ @@ -4053,7 +4053,7 @@ def mg5amc_py8_interface_consistency_warning(options): Consider installing the MG5_aMC-PY8 interface with the following command: MG5_aMC>install mg5amc_py8_interface """ - + mg5amc_py8_interface_path = options['mg5amc_py8_interface_path'] py8_path = options['pythia8_path'] # If the specified interface path is relative, make it absolut w.r.t MGDIR if @@ -4062,7 +4062,7 @@ def mg5amc_py8_interface_consistency_warning(options): mg5amc_py8_interface_path = pjoin(MG5DIR,mg5amc_py8_interface_path) py8_path = pjoin(MG5DIR,py8_path) - # Retrieve all the on-install and current versions + # Retrieve all the on-install and current versions fsock = open(pjoin(mg5amc_py8_interface_path, 'MG5AMC_VERSION_ON_INSTALL')) MG5_version_on_install = fsock.read().replace('\n','') fsock.close() @@ -4074,7 +4074,7 @@ def mg5amc_py8_interface_consistency_warning(options): MG5_curr_version =misc.get_pkg_info()['version'] try: p = subprocess.Popen(['./get_pythia8_version.py',py8_path], - stdout=subprocess.PIPE, stderr=subprocess.PIPE, + stdout=subprocess.PIPE, stderr=subprocess.PIPE, cwd=mg5amc_py8_interface_path) (out, err) = p.communicate() out = out.decode(errors='ignore').replace('\n','') @@ -4084,37 +4084,37 @@ def mg5amc_py8_interface_consistency_warning(options): float(out) except: PY8_curr_version = None - + if not MG5_version_on_install is None and not MG5_curr_version is None: if MG5_version_on_install != MG5_curr_version: return \ """ The current version of MG5_aMC (v%s) is different than the one active when - installing the 'mg5amc_py8_interface_path' (which was MG5aMC v%s). + installing the 'mg5amc_py8_interface_path' (which was MG5aMC v%s). Please consider refreshing the installation of this interface with the command: MG5_aMC>install mg5amc_py8_interface """%(MG5_curr_version, MG5_version_on_install) - + if not PY8_version_on_install is None and not PY8_curr_version is None: if PY8_version_on_install != PY8_curr_version: return \ """ The current version of Pythia8 (v%s) is different than the one active when - installing the 'mg5amc_py8_interface' tool (which was Pythia8 v%s). + installing the 'mg5amc_py8_interface' tool (which was Pythia8 v%s). Please consider refreshing the installation of this interface with the command: MG5_aMC>install mg5amc_py8_interface """%(PY8_curr_version,PY8_version_on_install) - + return None def setup_Pythia8RunAndCard(self, PY8_Card, run_type): """ Setup the Pythia8 Run environment and card. In particular all the process and run specific parameters of the card are automatically set here. This function returns the path where HEPMC events will be output, if any.""" - + HepMC_event_output = None tag = self.run_tag - + PY8_Card.subruns[0].systemSet('Beams:LHEF',"unweighted_events.lhe.gz") hepmc_format = PY8_Card['HEPMCoutput:file'].lower() @@ -4185,7 +4185,7 @@ def setup_Pythia8RunAndCard(self, PY8_Card, run_type): misc.mkfifo(fifo_path) # Use defaultSet not to overwrite the current userSet status PY8_Card.defaultSet('HEPMCoutput:file',fifo_path) - HepMC_event_output=fifo_path + HepMC_event_output=fifo_path elif hepmc_format in ['','/dev/null','None']: logger.warning('User disabled the HepMC output of Pythia8.') HepMC_event_output = None @@ -4206,7 +4206,7 @@ def setup_Pythia8RunAndCard(self, PY8_Card, run_type): # only if it is not already user_set. if PY8_Card['JetMatching:qCut']==-1.0: PY8_Card.MadGraphSet('JetMatching:qCut',1.5*self.run_card['xqcut'], force=True) - + if PY8_Card['JetMatching:qCut']<(1.5*self.run_card['xqcut']): logger.error( 'The MLM merging qCut parameter you chose (%f) is less than '%PY8_Card['JetMatching:qCut']+ @@ -4233,7 +4233,7 @@ def setup_Pythia8RunAndCard(self, PY8_Card, run_type): if PY8_Card['JetMatching:qCut'] not in qCutList: qCutList.append(PY8_Card['JetMatching:qCut']) PY8_Card.MadGraphSet('SysCalc:qCutList', qCutList, force=True) - + if PY8_Card['SysCalc:qCutList']!='auto': for scale in PY8_Card['SysCalc:qCutList']: @@ -4244,7 +4244,7 @@ def setup_Pythia8RunAndCard(self, PY8_Card, run_type): "'sys_matchscale' in the run_card) is less than 1.5*xqcut, where xqcut is"+ ' the run_card parameter (=%f)\n'%self.run_card['xqcut']+ 'It would be better/safer to use a larger qCut or a smaller xqcut.') - + # Specific MLM settings # PY8 should not implement the MLM veto since the driver should do it # if merging scale variation is turned on @@ -4294,18 +4294,18 @@ def setup_Pythia8RunAndCard(self, PY8_Card, run_type): CKKW_cut = 'ktdurham' elif self.run_card['ptlund']>0.0 and self.run_card['ktdurham']<=0.0: PY8_Card.subruns[0].MadGraphSet('Merging:doPTLundMerging',True) - CKKW_cut = 'ptlund' + CKKW_cut = 'ptlund' else: raise InvalidCmd("*Either* the 'ptlund' or 'ktdurham' cut in "+\ " the run_card must be turned on to activate CKKW(L) merging"+ " with Pythia8, but *both* cuts cannot be turned on at the same time."+ "\n ptlund=%f, ktdurham=%f."%(self.run_card['ptlund'],self.run_card['ktdurham'])) - + # Automatically set qWeed to the CKKWL cut if not defined by the user. if PY8_Card['SysCalc:qWeed']==-1.0: PY8_Card.MadGraphSet('SysCalc:qWeed',self.run_card[CKKW_cut], force=True) - + # MadGraphSet sets the corresponding value (in system mode) # only if it is not already user_set. if PY8_Card['Merging:TMS']==-1.0: @@ -4319,7 +4319,7 @@ def setup_Pythia8RunAndCard(self, PY8_Card, run_type): 'The CKKWl merging scale you chose (%f) is less than '%PY8_Card['Merging:TMS']+ 'the %s cut specified in the run_card parameter (=%f).\n'%(CKKW_cut,self.run_card[CKKW_cut])+ 'It is incorrect to use a smaller CKKWl scale than the generation-level %s cut!'%CKKW_cut) - + PY8_Card.MadGraphSet('TimeShower:pTmaxMatch',1) PY8_Card.MadGraphSet('SpaceShower:pTmaxMatch',1) PY8_Card.MadGraphSet('SpaceShower:rapidityOrder',False) @@ -4381,7 +4381,7 @@ def do_pythia8(self, line): try: import madgraph - except ImportError: + except ImportError: import internal.histograms as histograms else: import madgraph.various.histograms as histograms @@ -4400,16 +4400,16 @@ def do_pythia8(self, line): self.check_pythia8(args) self.configure_directory(html_opening =False) else: - # initialize / remove lhapdf mode + # initialize / remove lhapdf mode self.configure_directory(html_opening =False) - self.check_pythia8(args) + self.check_pythia8(args) # Update the banner with the pythia card if not self.banner or len(self.banner) <=1: # Here the level keyword 'pythia' must not be changed to 'pythia8'. self.banner = banner_mod.recover_banner(self.results, 'pythia') - # the args are modify and the last arg is always the mode + # the args are modify and the last arg is always the mode if not no_default: self.ask_pythia_run_configuration(args[-1], pythia_version=8, banner=self.banner) @@ -4425,7 +4425,7 @@ def do_pythia8(self, line): #"Please use 'event_norm = average' in the run_card to avoid this problem.") - + if not self.options['mg5amc_py8_interface_path'] or not \ os.path.exists(pjoin(self.options['mg5amc_py8_interface_path'], 'MG5aMC_PY8_interface')): @@ -4444,16 +4444,16 @@ def do_pythia8(self, line): # Again here 'pythia' is just a keyword for the simulation level. self.update_status('\033[92mRunning Pythia8 [arXiv:1410.3012]\033[0m', 'pythia8') - - tag = self.run_tag + + tag = self.run_tag # Now write Pythia8 card # Start by reading, starting from the default one so that the 'user_set' # tag are correctly set. - PY8_Card = banner_mod.PY8Card(pjoin(self.me_dir, 'Cards', + PY8_Card = banner_mod.PY8Card(pjoin(self.me_dir, 'Cards', 'pythia8_card_default.dat')) PY8_Card.read(pjoin(self.me_dir, 'Cards', 'pythia8_card.dat'), setter='user') - + run_type = 'default' merged_run_types = ['MLM','CKKW'] if int(self.run_card['ickkw'])==1: @@ -4471,7 +4471,7 @@ def do_pythia8(self, line): cmd_card = StringIO.StringIO() PY8_Card.write(cmd_card,pjoin(self.me_dir,'Cards','pythia8_card_default.dat'), direct_pythia_input=True) - + # Now setup the preamble to make sure that everything will use the locally # installed tools (if present) even if the user did not add it to its # environment variables. @@ -4486,13 +4486,13 @@ def do_pythia8(self, line): preamble = misc.get_HEPTools_location_setter( pjoin(MG5DIR,'HEPTools'),'lib') preamble += "\n unset PYTHIA8DATA\n" - + open(pythia_cmd_card,'w').write("""! ! It is possible to run this card manually with: ! %s %s ! """%(preamble+pythia_main,os.path.basename(pythia_cmd_card))+cmd_card.getvalue()) - + # launch pythia8 pythia_log = pjoin(self.me_dir , 'Events', self.run_name , '%s_pythia8.log' % tag) @@ -4504,13 +4504,13 @@ def do_pythia8(self, line): shell_exe = None if os.path.exists('/usr/bin/env'): shell_exe = '/usr/bin/env %s'%shell - else: + else: shell_exe = misc.which(shell) if not shell_exe: raise self.InvalidCmd('No s hell could be found in your environment.\n'+ "Make sure that either '%s' is in your path or that the"%shell+\ " command '/usr/bin/env %s' exists and returns a valid path."%shell) - + exe_cmd = "#!%s\n%s"%(shell_exe,' '.join( [preamble+pythia_main, os.path.basename(pythia_cmd_card)])) @@ -4528,7 +4528,7 @@ def do_pythia8(self, line): ( os.path.exists(HepMC_event_output) and \ stat.S_ISFIFO(os.stat(HepMC_event_output).st_mode)) startPY8timer = time.time() - + # Information that will be extracted from this PY8 run PY8_extracted_information={ 'sigma_m':None, 'Nacc':None, 'Ntry':None, 'cross_sections':{} } @@ -4556,7 +4556,7 @@ def do_pythia8(self, line): n_cores = max(int(self.options['cluster_size']),1) elif self.options['run_mode']==2: n_cores = max(int(self.cluster.nb_core),1) - + lhe_file_name = os.path.basename(PY8_Card.subruns[0]['Beams:LHEF']) lhe_file = lhe_parser.EventFile(pjoin(self.me_dir,'Events', self.run_name,PY8_Card.subruns[0]['Beams:LHEF'])) @@ -4574,7 +4574,7 @@ def do_pythia8(self, line): if self.options['run_mode']==2: min_n_events_per_job = 100 elif self.options['run_mode']==1: - min_n_events_per_job = 1000 + min_n_events_per_job = 1000 min_n_core = n_events//min_n_events_per_job n_cores = max(min(min_n_core,n_cores),1) @@ -4584,8 +4584,8 @@ def do_pythia8(self, line): logger.info('Follow Pythia8 shower by running the '+ 'following command (in a separate terminal):\n tail -f %s'%pythia_log) - if self.options['run_mode']==2 and self.options['nb_core']>1: - ret_code = self.cluster.launch_and_wait(wrapper_path, + if self.options['run_mode']==2 and self.options['nb_core']>1: + ret_code = self.cluster.launch_and_wait(wrapper_path, argument= [], stdout= pythia_log, stderr=subprocess.STDOUT, cwd=pjoin(self.me_dir,'Events',self.run_name)) else: @@ -4630,10 +4630,10 @@ def do_pythia8(self, line): wrapper = open(wrapper_path,'w') if self.options['cluster_temp_path'] is None: exe_cmd = \ -"""#!%s +"""#!%s ./%s PY8Card.dat >& PY8_log.txt """ - else: + else: exe_cmd = \ """#!%s ln -s ./events_$1.lhe.gz ./events.lhe.gz @@ -4663,21 +4663,21 @@ def do_pythia8(self, line): # Set it as executable st = os.stat(wrapper_path) os.chmod(wrapper_path, st.st_mode | stat.S_IEXEC) - + # Split the .lhe event file, create event partition partition=[n_available_events//n_cores]*n_cores for i in range(n_available_events%n_cores): partition[i] += 1 - + # Splitting according to the total number of events requested by the user # Will be used to determine the number of events to indicate in the PY8 split cards. partition_for_PY8=[n_events//n_cores]*n_cores for i in range(n_events%n_cores): partition_for_PY8[i] += 1 - - logger.info('Splitting .lhe event file for PY8 parallelization...') - n_splits = lhe_file.split(partition=partition, cwd=parallelization_dir, zip=True) - + + logger.info('Splitting .lhe event file for PY8 parallelization...') + n_splits = lhe_file.split(partition=partition, cwd=parallelization_dir, zip=True) + if n_splits!=len(partition): raise MadGraph5Error('Error during lhe file splitting. Expected %d files but obtained %d.' %(len(partition),n_splits)) @@ -4690,7 +4690,7 @@ def do_pythia8(self, line): # Add the necessary run content shutil.move(pjoin(parallelization_dir,lhe_file.name+'_%d.lhe.gz'%split_id), pjoin(parallelization_dir,split_files[-1])) - + logger.info('Submitting Pythia8 jobs...') for i, split_file in enumerate(split_files): # We must write a PY8Card tailored for each split so as to correct the normalization @@ -4706,7 +4706,7 @@ def do_pythia8(self, line): split_PY8_Card.write(pjoin(parallelization_dir,'PY8Card_%d.dat'%i), pjoin(parallelization_dir,'PY8Card.dat'), add_missing=False) in_files = [pjoin(parallelization_dir,os.path.basename(pythia_main)), - pjoin(parallelization_dir,'PY8Card_%d.dat'%i), + pjoin(parallelization_dir,'PY8Card_%d.dat'%i), pjoin(parallelization_dir,split_file)] if self.options['cluster_temp_path'] is None: out_files = [] @@ -4718,35 +4718,35 @@ def do_pythia8(self, line): if os.path.basename(in_file)==split_file: ln(in_file,selected_cwd,name='events.lhe.gz') elif os.path.basename(in_file).startswith('PY8Card'): - ln(in_file,selected_cwd,name='PY8Card.dat') + ln(in_file,selected_cwd,name='PY8Card.dat') else: - ln(in_file,selected_cwd) + ln(in_file,selected_cwd) in_files = [] wrapper_path = os.path.basename(wrapper_path) else: out_files = ['split_%d.tar.gz'%i] selected_cwd = parallelization_dir - self.cluster.submit2(wrapper_path, - argument=[str(i)], cwd=selected_cwd, + self.cluster.submit2(wrapper_path, + argument=[str(i)], cwd=selected_cwd, input_files=in_files, output_files=out_files, required_output=out_files) - + def wait_monitoring(Idle, Running, Done): if Idle+Running+Done == 0: return logger.info('Pythia8 shower jobs: %d Idle, %d Running, %d Done [%s]'\ %(Idle, Running, Done, misc.format_time(time.time() - startPY8timer))) self.cluster.wait(parallelization_dir,wait_monitoring) - + logger.info('Merging results from the split PY8 runs...') if self.options['cluster_temp_path']: # Decompressing the output for i, split_file in enumerate(split_files): misc.call(['tar','-xzf','split_%d.tar.gz'%i],cwd=parallelization_dir) os.remove(pjoin(parallelization_dir,'split_%d.tar.gz'%i)) - + # Now merge logs pythia_log_file = open(pythia_log,'w') n_added = 0 @@ -4778,7 +4778,7 @@ def wait_monitoring(Idle, Running, Done): if n_added>0: PY8_extracted_information['sigma_m'] /= float(n_added) pythia_log_file.close() - + # djr plots djr_HwU = None n_added = 0 @@ -4845,7 +4845,7 @@ def wait_monitoring(Idle, Running, Done): if not os.path.isfile(hepmc_file): continue all_hepmc_files.append(hepmc_file) - + if len(all_hepmc_files)>0: hepmc_output = pjoin(self.me_dir,'Events',self.run_name,HepMC_event_output) with misc.TMP_directory() as tmp_dir: @@ -4860,8 +4860,8 @@ def wait_monitoring(Idle, Running, Done): break header.close() tail = open(pjoin(tmp_dir,'tail.hepmc'),'w') - n_tail = 0 - + n_tail = 0 + for line in misc.reverse_readline(all_hepmc_files[-1]): if line.startswith('HepMC::'): n_tail += 1 @@ -4871,7 +4871,7 @@ def wait_monitoring(Idle, Running, Done): tail.close() if n_tail>1: raise MadGraph5Error('HEPMC files should only have one trailing command.') - ###################################################################### + ###################################################################### # This is the most efficient way of putting together HEPMC's, *BUT* # # WARNING: NEED TO RENDER THE CODE BELOW SAFE TOWARDS INJECTION # ###################################################################### @@ -4888,12 +4888,12 @@ def wait_monitoring(Idle, Running, Done): elif sys.platform == 'darwin': # sed on MAC has slightly different synthax than on os.system(' '.join(['sed','-i',"''","'%s;$d'"% - (';'.join('%id'%(i+1) for i in range(n_head))),hepmc_file])) - else: - # other UNIX systems + (';'.join('%id'%(i+1) for i in range(n_head))),hepmc_file])) + else: + # other UNIX systems os.system(' '.join(['sed','-i']+["-e '%id'"%(i+1) for i in range(n_head)]+ ["-e '$d'",hepmc_file])) - + os.system(' '.join(['cat',pjoin(tmp_dir,'header.hepmc')]+all_hepmc_files+ [pjoin(tmp_dir,'tail.hepmc'),'>',hepmc_output])) @@ -4915,12 +4915,12 @@ def wait_monitoring(Idle, Running, Done): 'Inclusive cross section:' not in '\n'.join(open(pythia_log,'r').readlines()[-20:]): logger.warning('Fail to produce a pythia8 output. More info in \n %s'%pythia_log) return - + # Plot for Pythia8 successful = self.create_plot('Pythia8') if not successful: logger.warning('Failed to produce Pythia8 merging plots.') - + self.to_store.append('pythia8') # Study matched cross-sections @@ -4931,7 +4931,7 @@ def wait_monitoring(Idle, Running, Done): if self.options['run_mode']==0 or (self.options['run_mode']==2 and self.options['nb_core']==1): PY8_extracted_information['sigma_m'],PY8_extracted_information['Nacc'],\ PY8_extracted_information['Ntry'] = self.parse_PY8_log_file( - pjoin(self.me_dir,'Events', self.run_name,'%s_pythia8.log' % tag)) + pjoin(self.me_dir,'Events', self.run_name,'%s_pythia8.log' % tag)) else: logger.warning('Pythia8 cross-section could not be retreived.\n'+ 'Try turning parallelization off by setting the option nb_core to 1. YYYYY') @@ -4944,8 +4944,8 @@ def wait_monitoring(Idle, Running, Done): Ntry = PY8_extracted_information['Ntry'] sigma_m = PY8_extracted_information['sigma_m'] # Compute pythia error - error = self.results[self.run_name].return_tag(self.run_tag)['error'] - try: + error = self.results[self.run_name].return_tag(self.run_tag)['error'] + try: error_m = math.sqrt((error * Nacc/Ntry)**2 + sigma_m**2 *(1-Nacc/Ntry)/Nacc) except ZeroDivisionError: # Cannot compute error @@ -4966,31 +4966,31 @@ def wait_monitoring(Idle, Running, Done): else: logger.warning('Pythia8 merged cross-sections could not be retreived.\n'+ 'Try turning parallelization off by setting the option nb_core to 1.XXXXX') - PY8_extracted_information['cross_sections'] = {} - + PY8_extracted_information['cross_sections'] = {} + cross_sections = PY8_extracted_information['cross_sections'] if cross_sections: - # Filter the cross_sections specified an keep only the ones + # Filter the cross_sections specified an keep only the ones # with central parameters and a different merging scale a_float_re = '[\+|-]?\d+(\.\d*)?([EeDd][\+|-]?\d+)?' central_merging_re = re.compile( '^\s*Weight_MERGING\s*=\s*(?P%s)\s*$'%a_float_re, - re.IGNORECASE) + re.IGNORECASE) cross_sections = dict( (float(central_merging_re.match(xsec).group('merging')),value) - for xsec, value in cross_sections.items() if not + for xsec, value in cross_sections.items() if not central_merging_re.match(xsec) is None) central_scale = PY8_Card['JetMatching:qCut'] if \ int(self.run_card['ickkw'])==1 else PY8_Card['Merging:TMS'] if central_scale in cross_sections: self.results.add_detail('cross_pythia8', cross_sections[central_scale][0]) self.results.add_detail('error_pythia8', cross_sections[central_scale][1]) - + #logger.info('Pythia8 merged cross-sections are:') #for scale in sorted(cross_sections.keys()): # logger.info(' > Merging scale = %-6.4g : %-11.5g +/- %-7.2g [pb]'%\ - # (scale,cross_sections[scale][0],cross_sections[scale][1])) - + # (scale,cross_sections[scale][0],cross_sections[scale][1])) + xsecs_file = open(pjoin(self.me_dir,'Events',self.run_name, '%s_merged_xsecs.txt'%tag),'w') if cross_sections: @@ -5003,9 +5003,9 @@ def wait_monitoring(Idle, Running, Done): xsecs_file.write('Cross-sections could not be read from the'+\ "XML node 'xsection' of the .dat file produced by Pythia8.") xsecs_file.close() - + #Update the banner - # We add directly the pythia command card because it has the full + # We add directly the pythia command card because it has the full # information self.banner.add(pythia_cmd_card) @@ -5022,13 +5022,13 @@ def wait_monitoring(Idle, Running, Done): if self.options['delphes_path']: self.exec_cmd('delphes --no_default', postcmd=False, printcmd=False) self.print_results_in_shell(self.results.current) - + def parse_PY8_log_file(self, log_file_path): """ Parse a log file to extract number of event and cross-section. """ pythiare = re.compile("Les Houches User Process\(es\)\s*\d+\s*\|\s*(?P\d+)\s*(?P\d+)\s*(?P\d+)\s*\|\s*(?P[\d\.e\-\+]+)\s*(?P[\d\.e\-\+]+)") pythia_xsec_re = re.compile("Inclusive cross section\s*:\s*(?P[\d\.e\-\+]+)\s*(?P[\d\.e\-\+]+)") sigma_m, Nacc, Ntry = None, None, None - for line in misc.BackRead(log_file_path): + for line in misc.BackRead(log_file_path): info = pythiare.search(line) if not info: # Also try to obtain the cross-section and error from the final xsec line of pythia8 log @@ -5058,7 +5058,7 @@ def parse_PY8_log_file(self, log_file_path): raise self.InvalidCmd("Could not find cross-section and event number information "+\ "in Pythia8 log\n '%s'."%log_file_path) - + def extract_cross_sections_from_DJR(self,djr_output): """Extract cross-sections from a djr XML output.""" import xml.dom.minidom as minidom @@ -5075,11 +5075,11 @@ def extract_cross_sections_from_DJR(self,djr_output): [float(xsec.childNodes[0].data.split()[0]), float(xsec.childNodes[0].data.split()[1])]) for xsec in xsections) - + def do_pythia(self, line): """launch pythia""" - - + + # Check argument's validity args = self.split_arg(line) if '--no_default' in args: @@ -5089,12 +5089,12 @@ def do_pythia(self, line): args.remove('--no_default') else: no_default = False - + if not self.run_name: self.check_pythia(args) self.configure_directory(html_opening =False) else: - # initialize / remove lhapdf mode + # initialize / remove lhapdf mode self.configure_directory(html_opening =False) self.check_pythia(args) @@ -5102,7 +5102,7 @@ def do_pythia(self, line): logger.error('pythia-pgs require event_norm to be on sum. Do not run pythia6') return - # the args are modify and the last arg is always the mode + # the args are modify and the last arg is always the mode if not no_default: self.ask_pythia_run_configuration(args[-1]) if self.options['automatic_html_opening']: @@ -5114,35 +5114,35 @@ def do_pythia(self, line): self.banner = banner_mod.recover_banner(self.results, 'pythia') pythia_src = pjoin(self.options['pythia-pgs_path'],'src') - + self.results.add_detail('run_mode', 'madevent') self.update_status('Running Pythia', 'pythia') try: os.remove(pjoin(self.me_dir,'Events','pythia.done')) except Exception: - pass - + pass + ## LAUNCHING PYTHIA # check that LHAPATH is define. if not re.search(r'^\s*LHAPATH=%s/PDFsets' % pythia_src, - open(pjoin(self.me_dir,'Cards','pythia_card.dat')).read(), + open(pjoin(self.me_dir,'Cards','pythia_card.dat')).read(), re.M): f = open(pjoin(self.me_dir,'Cards','pythia_card.dat'),'a') f.write('\n LHAPATH=%s/PDFsets' % pythia_src) f.close() tag = self.run_tag pythia_log = pjoin(self.me_dir, 'Events', self.run_name , '%s_pythia.log' % tag) - #self.cluster.launch_and_wait('../bin/internal/run_pythia', + #self.cluster.launch_and_wait('../bin/internal/run_pythia', # argument= [pythia_src], stdout= pythia_log, # stderr=subprocess.STDOUT, # cwd=pjoin(self.me_dir,'Events')) output_files = ['pythia_events.hep'] if self.run_card['use_syst']: output_files.append('syst.dat') - if self.run_card['ickkw'] == 1: + if self.run_card['ickkw'] == 1: output_files += ['beforeveto.tree', 'xsecs.tree', 'events.tree'] - + os.environ['PDG_MASS_TBL'] = pjoin(pythia_src,'mass_width_2004.mc') self.cluster.launch_and_wait(pjoin(pythia_src, 'pythia'), input_files=[pjoin(self.me_dir, "Events", "unweighted_events.lhe"), @@ -5152,23 +5152,23 @@ def do_pythia(self, line): stdout= pythia_log, stderr=subprocess.STDOUT, cwd=pjoin(self.me_dir,'Events')) - + os.remove(pjoin(self.me_dir, "Events", "unweighted_events.lhe")) if not os.path.exists(pjoin(self.me_dir,'Events','pythia_events.hep')): logger.warning('Fail to produce pythia output. More info in \n %s' % pythia_log) return - + self.to_store.append('pythia') - + # Find the matched cross-section if int(self.run_card['ickkw']): # read the line from the bottom of the file - #pythia_log = misc.BackRead(pjoin(self.me_dir,'Events', self.run_name, + #pythia_log = misc.BackRead(pjoin(self.me_dir,'Events', self.run_name, # '%s_pythia.log' % tag)) - pythiare = re.compile("\s*I\s+0 All included subprocesses\s+I\s+(?P\d+)\s+(?P\d+)\s+I\s+(?P[\d\.D\-+]+)\s+I") - for line in misc.reverse_readline(pjoin(self.me_dir,'Events', self.run_name, + pythiare = re.compile("\s*I\s+0 All included subprocesses\s+I\s+(?P\d+)\s+(?P\d+)\s+I\s+(?P[\d\.D\-+]+)\s+I") + for line in misc.reverse_readline(pjoin(self.me_dir,'Events', self.run_name, '%s_pythia.log' % tag)): info = pythiare.search(line) if not info: @@ -5188,16 +5188,16 @@ def do_pythia(self, line): self.results.add_detail('nb_event_pythia', Nacc) #compute pythia error error = self.results[self.run_name].return_tag(self.run_tag)['error'] - if Nacc: + if Nacc: error_m = math.sqrt((error * Nacc/Ntry)**2 + sigma_m**2 *(1-Nacc/Ntry)/Nacc) else: error_m = 10000 * sigma_m # works both for fixed number of generated events and fixed accepted events self.results.add_detail('error_pythia', error_m) - break + break #pythia_log.close() - + pydir = pjoin(self.options['pythia-pgs_path'], 'src') eradir = self.options['exrootanalysis_path'] madir = self.options['madanalysis_path'] @@ -5216,12 +5216,12 @@ def do_pythia(self, line): # Creating LHE file self.run_hep2lhe(banner_path) - + if int(self.run_card['ickkw']): misc.gzip(pjoin(self.me_dir,'Events','beforeveto.tree'), - stdout=pjoin(self.me_dir,'Events',self.run_name, tag+'_pythia_beforeveto.tree.gz')) + stdout=pjoin(self.me_dir,'Events',self.run_name, tag+'_pythia_beforeveto.tree.gz')) + - if self.run_card['use_syst'] in self.true: # Calculate syscalc info based on syst.dat try: @@ -5233,7 +5233,7 @@ def do_pythia(self, line): # Store syst.dat misc.gzip(pjoin(self.me_dir,'Events', 'syst.dat'), stdout=pjoin(self.me_dir,'Events',self.run_name, tag + '_pythia_syst.dat.gz')) - + # Store syscalc.dat if os.path.exists(pjoin(self.me_dir, 'Events', 'syscalc.dat')): filename = pjoin(self.me_dir, 'Events' ,self.run_name, @@ -5253,7 +5253,7 @@ def do_pythia(self, line): if self.options['delphes_path']: self.exec_cmd('delphes --no_default', postcmd=False, printcmd=False) self.print_results_in_shell(self.results.current) - + ################################################################################ def do_remove(self, line): @@ -5263,8 +5263,8 @@ def do_remove(self, line): run, tag, mode = self.check_remove(args) if 'banner' in mode: mode.append('all') - - + + if run == 'all': # Check first if they are not a run with a name run. if os.path.exists(pjoin(self.me_dir, 'Events', 'all')): @@ -5280,7 +5280,7 @@ def do_remove(self, line): logger.info(error) pass # run already clear return - + # Check that run exists if not os.path.exists(pjoin(self.me_dir, 'Events', run)): raise self.InvalidCmd('No run \'%s\' detected' % run) @@ -5294,7 +5294,7 @@ def do_remove(self, line): # Found the file to delete - + to_delete = misc.glob('*', pjoin(self.me_dir, 'Events', run)) to_delete += misc.glob('*', pjoin(self.me_dir, 'HTML', run)) # forbid the banner to be removed @@ -5314,7 +5314,7 @@ def do_remove(self, line): if os.path.exists(pjoin(self.me_dir, 'Events', run, 'unweighted_events.lhe.gz')): to_delete.append('unweighted_events.lhe.gz') if os.path.exists(pjoin(self.me_dir, 'HTML', run,'plots_parton.html')): - to_delete.append(pjoin(self.me_dir, 'HTML', run,'plots_parton.html')) + to_delete.append(pjoin(self.me_dir, 'HTML', run,'plots_parton.html')) if nb_rm != len(to_delete): logger.warning('Be carefull that partonic information are on the point to be removed.') if 'all' in mode: @@ -5327,8 +5327,8 @@ def do_remove(self, line): if 'delphes' not in mode: to_delete = [f for f in to_delete if 'delphes' not in f] if 'parton' not in mode: - to_delete = [f for f in to_delete if 'delphes' in f - or 'pgs' in f + to_delete = [f for f in to_delete if 'delphes' in f + or 'pgs' in f or 'pythia' in f] if not self.force and len(to_delete): question = 'Do you want to delete the following files?\n %s' % \ @@ -5336,7 +5336,7 @@ def do_remove(self, line): ans = self.ask(question, 'y', choices=['y','n']) else: ans = 'y' - + if ans == 'y': for file2rm in to_delete: if os.path.exists(pjoin(self.me_dir, 'Events', run, file2rm)): @@ -5374,7 +5374,7 @@ def do_remove(self, line): if ans == 'y': for file2rm in to_delete: os.remove(file2rm) - + if 'banner' in mode: to_delete = misc.glob('*', pjoin(self.me_dir, 'Events', run)) if tag: @@ -5389,8 +5389,8 @@ def do_remove(self, line): return elif any(['banner' not in os.path.basename(p) for p in to_delete]): if to_delete: - raise MadGraph5Error('''Some output still exists for this run. - Please remove those output first. Do for example: + raise MadGraph5Error('''Some output still exists for this run. + Please remove those output first. Do for example: remove %s all banner ''' % run) else: @@ -5400,7 +5400,7 @@ def do_remove(self, line): return else: logger.info('''The banner is not removed. In order to remove it run: - remove %s all banner %s''' % (run, tag and '--tag=%s ' % tag or '')) + remove %s all banner %s''' % (run, tag and '--tag=%s ' % tag or '')) # update database. self.results.clean(mode, run, tag) @@ -5420,7 +5420,7 @@ def do_plot(self, line): logger.info('plot for run %s' % self.run_name) if not self.force: self.ask_edit_cards(['plot_card.dat'], args, plot=True) - + if any([arg in ['all','parton'] for arg in args]): filename = pjoin(self.me_dir, 'Events', self.run_name, 'unweighted_events.lhe') if os.path.exists(filename+'.gz'): @@ -5438,8 +5438,8 @@ def do_plot(self, line): except Exception: pass else: - logger.info('No valid files for partonic plot') - + logger.info('No valid files for partonic plot') + if any([arg in ['all','pythia'] for arg in args]): filename = pjoin(self.me_dir, 'Events' ,self.run_name, '%s_pythia_events.lhe' % self.run_tag) @@ -5452,10 +5452,10 @@ def do_plot(self, line): stdout= "%s.gz" % filename) else: logger.info('No valid files for pythia plot') - - + + if any([arg in ['all','pgs'] for arg in args]): - filename = pjoin(self.me_dir, 'Events', self.run_name, + filename = pjoin(self.me_dir, 'Events', self.run_name, '%s_pgs_events.lhco' % self.run_tag) if os.path.exists(filename+'.gz'): misc.gunzip("%s.gz" % filename) @@ -5464,15 +5464,15 @@ def do_plot(self, line): misc.gzip(filename) else: logger.info('No valid files for pgs plot') - + if any([arg in ['all','delphes'] for arg in args]): - filename = pjoin(self.me_dir, 'Events', self.run_name, + filename = pjoin(self.me_dir, 'Events', self.run_name, '%s_delphes_events.lhco' % self.run_tag) if os.path.exists(filename+'.gz'): misc.gunzip("%s.gz" % filename) if os.path.exists(filename): self.create_plot('Delphes') - misc.gzip(filename) + misc.gzip(filename) else: logger.info('No valid files for delphes plot') @@ -5488,9 +5488,9 @@ def do_syscalc(self, line): if self.ninitial == 1: logger.error('SysCalc can\'t be run for decay processes') return - + logger.info('Calculating systematics for run %s' % self.run_name) - + self.ask_edit_cards(['run_card.dat'], args, plot=False) self.run_card = banner_mod.RunCard(pjoin(self.me_dir, 'Cards', 'run_card.dat')) if any([arg in ['all','parton'] for arg in args]): @@ -5504,7 +5504,7 @@ def do_syscalc(self, line): stdout="%s.gz" % filename) else: logger.info('No valid files for parton level systematics run.') - + if any([arg in ['all','pythia'] for arg in args]): filename = pjoin(self.me_dir, 'Events' ,self.run_name, '%s_pythia_syst.dat' % self.run_tag) @@ -5525,17 +5525,17 @@ def do_syscalc(self, line): else: logger.info('No valid files for pythia level') - + def store_result(self): - """ tar the pythia results. This is done when we are quite sure that + """ tar the pythia results. This is done when we are quite sure that the pythia output will not be use anymore """ if not self.run_name: return - + if not self.to_store: - return - + return + tag = self.run_card['run_tag'] self.update_status('storing files of previous run', level=None,\ error=True) @@ -5546,14 +5546,14 @@ def store_result(self): misc.gzip(pjoin(self.me_dir,'Events',self.run_name,"unweighted_events.lhe")) if os.path.exists(pjoin(self.me_dir,'Events','reweight.lhe')): os.remove(pjoin(self.me_dir,'Events', 'reweight.lhe')) - + if 'pythia' in self.to_store: self.update_status('Storing Pythia files of previous run', level='pythia', error=True) p = pjoin(self.me_dir,'Events') n = self.run_name t = tag self.to_store.remove('pythia') - misc.gzip(pjoin(p,'pythia_events.hep'), + misc.gzip(pjoin(p,'pythia_events.hep'), stdout=pjoin(p, str(n),'%s_pythia_events.hep' % t),forceexternal=True) if 'pythia8' in self.to_store: @@ -5581,26 +5581,26 @@ def store_result(self): os.system("mv " + file_path + hepmc_fileformat + " " + move_hepmc_path) self.update_status('Done', level='pythia',makehtml=False,error=True) - self.results.save() - + self.results.save() + self.to_store = [] - def launch_job(self,exe, cwd=None, stdout=None, argument = [], remaining=0, + def launch_job(self,exe, cwd=None, stdout=None, argument = [], remaining=0, run_type='', mode=None, **opt): """ """ argument = [str(arg) for arg in argument] if mode is None: mode = self.cluster_mode - + # ensure that exe is executable if os.path.exists(exe) and not os.access(exe, os.X_OK): os.system('chmod +x %s ' % exe) elif (cwd and os.path.exists(pjoin(cwd, exe))) and not \ os.access(pjoin(cwd, exe), os.X_OK): os.system('chmod +x %s ' % pjoin(cwd, exe)) - + if mode == 0: - self.update_status((remaining, 1, + self.update_status((remaining, 1, self.total_jobs - remaining -1, run_type), level=None, force=False) start = time.time() #os.system('cd %s; ./%s' % (cwd,exe)) @@ -5613,24 +5613,24 @@ def launch_job(self,exe, cwd=None, stdout=None, argument = [], remaining=0, elif mode in [1,2]: exename = os.path.basename(exe) # For condor cluster, create the input/output files - if 'ajob' in exename: + if 'ajob' in exename: input_files = ['madevent','input_app.txt','symfact.dat','iproc.dat','dname.mg', pjoin(self.me_dir, 'SubProcesses','randinit')] - if os.path.exists(pjoin(self.me_dir,'SubProcesses', + if os.path.exists(pjoin(self.me_dir,'SubProcesses', 'MadLoop5_resources.tar.gz')) and cluster.need_transfer(self.options): input_files.append(pjoin(self.me_dir,'SubProcesses', 'MadLoop5_resources.tar.gz')) - + output_files = [] required_output = [] - + #Find the correct PDF input file input_files.append(self.get_pdf_input_filename()) - + #Find the correct ajob Gre = re.compile("\s*j=(G[\d\.\w]+)") origre = re.compile("grid_directory=(G[\d\.\w]+)") - try : + try : fsock = open(exe) except Exception: fsock = open(pjoin(cwd,exe)) @@ -5648,21 +5648,21 @@ def launch_job(self,exe, cwd=None, stdout=None, argument = [], remaining=0, if os.path.isdir(pjoin(cwd,G)): input_files.append(G) required_output.append('%s/results.dat' % G) - + if origre.search(text): G_grid = origre.search(text).groups()[0] input_files.append(pjoin(G_grid, 'ftn26')) - + #submitting - self.cluster.submit2(exe, stdout=stdout, cwd=cwd, + self.cluster.submit2(exe, stdout=stdout, cwd=cwd, input_files=input_files, output_files=output_files, required_output=required_output) elif 'survey' in exename: input_files = ['madevent','input_app.txt','symfact.dat','iproc.dat', 'dname.mg', - pjoin(self.me_dir, 'SubProcesses','randinit')] - if os.path.exists(pjoin(self.me_dir,'SubProcesses', + pjoin(self.me_dir, 'SubProcesses','randinit')] + if os.path.exists(pjoin(self.me_dir,'SubProcesses', 'MadLoop5_resources.tar.gz')) and cluster.need_transfer(self.options): - input_files.append(pjoin(self.me_dir,'SubProcesses', + input_files.append(pjoin(self.me_dir,'SubProcesses', 'MadLoop5_resources.tar.gz')) #Find the correct PDF input file @@ -5671,7 +5671,7 @@ def launch_job(self,exe, cwd=None, stdout=None, argument = [], remaining=0, output_files = [] required_output = [] - + #Find the correct ajob suffix = "_%s" % int(float(argument[0])) if suffix == '_0': @@ -5685,12 +5685,12 @@ def launch_job(self,exe, cwd=None, stdout=None, argument = [], remaining=0, if '.' in argument[0]: offset = int(str(argument[0]).split('.')[1]) else: - offset = 0 - + offset = 0 + if offset ==0 or offset == int(float(argument[0])): if os.path.exists(pjoin(cwd, G, 'input_app.txt')): os.remove(pjoin(cwd, G, 'input_app.txt')) - + if os.path.exists(os.path.realpath(pjoin(cwd, G, 'ftn25'))): if offset == 0 or offset == int(float(argument[0])): os.remove(pjoin(cwd, G, 'ftn25')) @@ -5706,16 +5706,16 @@ def launch_job(self,exe, cwd=None, stdout=None, argument = [], remaining=0, pass #submitting - self.cluster.cluster_submit(exe, stdout=stdout, cwd=cwd, argument=argument, + self.cluster.cluster_submit(exe, stdout=stdout, cwd=cwd, argument=argument, input_files=input_files, output_files=output_files, required_output=required_output, **opt) elif "refine_splitted.sh" in exename: input_files = ['madevent','symfact.dat','iproc.dat', 'dname.mg', - pjoin(self.me_dir, 'SubProcesses','randinit')] - + pjoin(self.me_dir, 'SubProcesses','randinit')] + if os.path.exists(pjoin(self.me_dir,'SubProcesses', 'MadLoop5_resources.tar.gz')) and cluster.need_transfer(self.options): - input_files.append(pjoin(self.me_dir,'SubProcesses', + input_files.append(pjoin(self.me_dir,'SubProcesses', 'MadLoop5_resources.tar.gz')) #Find the correct PDF input file @@ -5725,25 +5725,25 @@ def launch_job(self,exe, cwd=None, stdout=None, argument = [], remaining=0, output_files = [argument[0]] required_output = [] for G in output_files: - required_output.append('%s/results.dat' % G) + required_output.append('%s/results.dat' % G) input_files.append(pjoin(argument[1], "input_app.txt")) input_files.append(pjoin(argument[1], "ftn26")) - + #submitting - self.cluster.cluster_submit(exe, stdout=stdout, cwd=cwd, argument=argument, + self.cluster.cluster_submit(exe, stdout=stdout, cwd=cwd, argument=argument, input_files=input_files, output_files=output_files, - required_output=required_output, **opt) + required_output=required_output, **opt) + + - - else: self.cluster.submit(exe, argument=argument, stdout=stdout, cwd=cwd, **opt) - + ############################################################################ def find_madevent_mode(self): """Find if Madevent is in Group mode or not""" - + # The strategy is too look in the files Source/run_configs.inc # if we found: ChanPerJob=3 then it's a group mode. file_path = pjoin(self.me_dir, 'Source', 'run_config.inc') @@ -5752,11 +5752,11 @@ def find_madevent_mode(self): return 'group' else: return 'v4' - + ############################################################################ def monitor(self, run_type='monitor', mode=None, html=False): """ monitor the progress of running job """ - + starttime = time.time() if mode is None: @@ -5772,8 +5772,8 @@ def monitor(self, run_type='monitor', mode=None, html=False): else: update_status = lambda idle, run, finish: None update_first = None - try: - self.cluster.wait(self.me_dir, update_status, update_first=update_first) + try: + self.cluster.wait(self.me_dir, update_status, update_first=update_first) except Exception as error: logger.info(error) if not self.force: @@ -5788,24 +5788,24 @@ def monitor(self, run_type='monitor', mode=None, html=False): raise except KeyboardInterrupt as error: self.cluster.remove() - raise - - + raise + - ############################################################################ + + ############################################################################ def configure_directory(self, html_opening=True): - """ All action require before any type of run """ + """ All action require before any type of run """ # Basic check assert os.path.exists(pjoin(self.me_dir,'SubProcesses')) # environmental variables to be included in make_opts self.make_opts_var = {} - + #see when the last file was modified time_mod = max([os.path.getmtime(pjoin(self.me_dir,'Cards','run_card.dat')), os.path.getmtime(pjoin(self.me_dir,'Cards','param_card.dat'))]) - + if self.configured >= time_mod and hasattr(self, 'random') and hasattr(self, 'run_card'): #just ensure that cluster specific are correctly handled if self.cluster: @@ -5820,7 +5820,7 @@ def configure_directory(self, html_opening=True): #open only once the web page # Change current working directory self.launching_dir = os.getcwd() - + # Check if we need the MSSM special treatment model = self.find_model_name() if model == 'mssm' or model.startswith('mssm-'): @@ -5828,14 +5828,14 @@ def configure_directory(self, html_opening=True): mg5_param = pjoin(self.me_dir, 'Source', 'MODEL', 'MG5_param.dat') check_param_card.convert_to_mg5card(param_card, mg5_param) check_param_card.check_valid_param_card(mg5_param) - + # limit the number of event to 100k self.check_nb_events() # this is in order to avoid conflicts between runs with and without # lhapdf. not needed anymore the makefile handles it automaticallu #misc.compile(['clean4pdf'], cwd = pjoin(self.me_dir, 'Source')) - + self.make_opts_var['pdlabel1'] = '' self.make_opts_var['pdlabel2'] = '' if self.run_card['pdlabel1'] in ['eva', 'iww']: @@ -5866,7 +5866,7 @@ def configure_directory(self, html_opening=True): self.copy_lep_densities(self.run_card['pdlabel'], pjoin(self.me_dir, 'Source')) self.make_opts_var['pdlabel1'] = 'ee' self.make_opts_var['pdlabel2'] = 'ee' - + # set random number if self.run_card['iseed'] != 0: self.random = int(self.run_card['iseed']) @@ -5885,18 +5885,18 @@ def configure_directory(self, html_opening=True): break else: self.random = random.randint(1, 30107) - + #set random seed for python part of the code if self.run_card['python_seed'] == -2: #-2 means same as run_card import random if not hasattr(random, 'mg_seedset'): - random.seed(self.run_card['python_seed']) - random.mg_seedset = self.run_card['python_seed'] + random.seed(self.run_card['python_seed']) + random.mg_seedset = self.run_card['python_seed'] elif self.run_card['python_seed'] >= 0: import random if not hasattr(random, 'mg_seedset'): - random.seed(self.run_card['python_seed']) - random.mg_seedset = self.run_card['python_seed'] + random.seed(self.run_card['python_seed']) + random.mg_seedset = self.run_card['python_seed'] if self.run_card['ickkw'] == 2: logger.info('Running with CKKW matching') self.treat_ckkw_matching() @@ -5905,12 +5905,12 @@ def configure_directory(self, html_opening=True): self.update_make_opts(self.run_card) # reset list of Gdirectory self.Gdirs = None - + # create param_card.inc and run_card.inc self.do_treatcards('') - + logger.info("compile Source Directory") - + # Compile for name in [ 'all']:#, '../bin/internal/combine_events']: self.compile(arg=[name], cwd=os.path.join(self.me_dir, 'Source')) @@ -5933,7 +5933,7 @@ def configure_directory(self, html_opening=True): os.remove(pjoin(self.me_dir, 'lib','libbias.a')) force_subproc_clean = True - + # Finally compile the bias module as well if self.run_card['bias_module'] not in ['dummy',None]: logger.debug("Compiling the bias module '%s'"%bias_name) @@ -5945,7 +5945,7 @@ def configure_directory(self, html_opening=True): 'INVALID' in str(bias_module_valid).upper(): raise InvalidCmd("The bias module '%s' cannot be used because of:\n%s"% (bias_name,bias_module_valid)) - + self.compile(arg=[], cwd=os.path.join(self.me_dir, 'Source','BIAS',bias_name)) self.proc_characteristics['bias_module']=bias_name # Update the proc_characterstics file @@ -5954,7 +5954,7 @@ def configure_directory(self, html_opening=True): if force_subproc_clean: # Make sure that madevent will be recompiled - subproc = [l.strip() for l in open(pjoin(self.me_dir,'SubProcesses', + subproc = [l.strip() for l in open(pjoin(self.me_dir,'SubProcesses', 'subproc.mg'))] for nb_proc,subdir in enumerate(subproc): Pdir = pjoin(self.me_dir, 'SubProcesses',subdir.strip()) @@ -5971,20 +5971,20 @@ def configure_directory(self, html_opening=True): ############################################################################ @staticmethod def check_dir(path, default=''): - """check if the directory exists. if so return the path otherwise the + """check if the directory exists. if so return the path otherwise the default""" - + if os.path.isdir(path): return path else: return default - + ############################################################################ def get_Gdir(self, Pdir=None, symfact=None): """get the list of Gdirectory if not yet saved.""" - + if hasattr(self, "Gdirs") and self.Gdirs: if self.me_dir in self.Gdirs[0]: if Pdir is None: @@ -6000,8 +6000,8 @@ def get_Gdir(self, Pdir=None, symfact=None): Pdirs = self.get_Pdir() - Gdirs = {self.me_dir:[]} - mfactors = {} + Gdirs = {self.me_dir:[]} + mfactors = {} for P in Pdirs: Gdirs[P] = [] #for the next line do not use P, since in readonly mode it might not have symfact @@ -6012,7 +6012,7 @@ def get_Gdir(self, Pdir=None, symfact=None): mfactors[pjoin(P, "G%s" % tag)] = mfactor self.Gdirs = (Gdirs, mfactors) return self.get_Gdir(Pdir, symfact=symfact) - + ############################################################################ def set_run_name(self, name, tag=None, level='parton', reload_card=False, allow_new_tag=True): @@ -6030,8 +6030,8 @@ def get_last_tag(self, level): tagRun = self.results[self.run_name][i] if tagRun.pythia or tagRun.shower or tagRun.pythia8 : return tagRun['tag'] - - + + # when are we force to change the tag new_run:previous run requiring changes upgrade_tag = {'parton': ['parton','pythia','pgs','delphes','madanalysis5_hadron','madanalysis5_parton', 'rivet'], 'pythia': ['pythia','pgs','delphes','madanalysis5_hadron'], @@ -6044,7 +6044,7 @@ def get_last_tag(self, level): 'syscalc':[], 'rivet':['rivet']} - if name == self.run_name: + if name == self.run_name: if reload_card: run_card = pjoin(self.me_dir, 'Cards','run_card.dat') self.run_card = banner_mod.RunCard(run_card) @@ -6064,13 +6064,13 @@ def get_last_tag(self, level): break return get_last_tag(self, level) - + # save/clean previous run if self.run_name: self.store_result() # store new name self.run_name = name - + new_tag = False # First call for this run -> set the banner self.banner = banner_mod.recover_banner(self.results, level, name) @@ -6079,8 +6079,8 @@ def get_last_tag(self, level): else: # Read run_card run_card = pjoin(self.me_dir, 'Cards','run_card.dat') - self.run_card = banner_mod.RunCard(run_card) - + self.run_card = banner_mod.RunCard(run_card) + if tag: self.run_card['run_tag'] = tag new_tag = True @@ -6093,7 +6093,7 @@ def get_last_tag(self, level): self.results.update('add run %s' % name, 'all', makehtml=False) else: for tag in upgrade_tag[level]: - + if getattr(self.results[self.run_name][-1], tag): # LEVEL is already define in the last tag -> need to switch tag tag = self.get_available_tag() @@ -6103,8 +6103,8 @@ def get_last_tag(self, level): if not new_tag: # We can add the results to the current run tag = self.results[self.run_name][-1]['tag'] - self.run_card['run_tag'] = tag # ensure that run_tag is correct - + self.run_card['run_tag'] = tag # ensure that run_tag is correct + if allow_new_tag and (name in self.results and not new_tag): self.results.def_current(self.run_name) else: @@ -6113,15 +6113,15 @@ def get_last_tag(self, level): self.run_tag = self.run_card['run_tag'] return get_last_tag(self, level) - - - + + + ############################################################################ def check_nb_events(self): - """Find the number of event in the run_card, and check that this is not + """Find the number of event in the run_card, and check that this is not too large""" - + nb_event = int(self.run_card['nevents']) if nb_event > 1000000: logger.warning("Attempting to generate more than 1M events") @@ -6133,20 +6133,20 @@ def check_nb_events(self): return - - ############################################################################ + + ############################################################################ def update_random(self): """ change random number""" - + self.random += 3 if self.random > 30081*30081: # can't use too big random number raise MadGraph5Error('Random seed too large ' + str(self.random) + ' > 30081*30081') - if self.run_card['python_seed'] == -2: + if self.run_card['python_seed'] == -2: import random if not hasattr(random, 'mg_seedset'): - random.seed(self.random) + random.seed(self.random) random.mg_seedset = self.random - + ############################################################################ def save_random(self): """save random number in appropirate file""" @@ -6155,14 +6155,14 @@ def save_random(self): fsock.writelines('r=%s\n' % self.random) def do_quit(self, *args, **opts): - + return common_run.CommonRunCmd.do_quit(self, *args, **opts) #return CmdExtended.do_quit(self, *args, **opts) - + ############################################################################ def treat_CKKW_matching(self): """check for ckkw""" - + lpp1 = self.run_card['lpp1'] lpp2 = self.run_card['lpp2'] e1 = self.run_card['ebeam1'] @@ -6170,19 +6170,19 @@ def treat_CKKW_matching(self): pd = self.run_card['pdlabel'] lha = self.run_card['lhaid'] xq = self.run_card['xqcut'] - translation = {'e1': e1, 'e2':e2, 'pd':pd, + translation = {'e1': e1, 'e2':e2, 'pd':pd, 'lha':lha, 'xq':xq} if lpp1 or lpp2: - # Remove ':s from pd + # Remove ':s from pd if pd.startswith("'"): pd = pd[1:] if pd.endswith("'"): - pd = pd[:-1] + pd = pd[:-1] if xq >2 or xq ==2: xq = 2 - + # find data file if pd == "lhapdf": issudfile = 'lib/issudgrid-%(e1)s-%(e2)s-%(pd)s-%(lha)s-%(xq)s.dat.gz' @@ -6192,9 +6192,9 @@ def treat_CKKW_matching(self): issudfile = pjoin(self.webbin, issudfile % translation) else: issudfile = pjoin(self.me_dir, issudfile % translation) - + logger.info('Sudakov grid file: %s' % issudfile) - + # check that filepath exists if os.path.exists(issudfile): path = pjoin(self.me_dir, 'lib', 'issudgrid.dat') @@ -6203,20 +6203,20 @@ def treat_CKKW_matching(self): msg = 'No sudakov grid file for parameter choice. Start to generate it. This might take a while' logger.info(msg) self.update_status('GENERATE SUDAKOV GRID', level='parton') - + for i in range(-2,6): - self.cluster.submit('%s/gensudgrid ' % self.dirbin, + self.cluster.submit('%s/gensudgrid ' % self.dirbin, argument = ['%d'%i], - cwd=self.me_dir, + cwd=self.me_dir, stdout=open(pjoin(self.me_dir, 'gensudgrid%s.log' % i),'w')) self.monitor() for i in range(-2,6): path = pjoin(self.me_dir, 'lib', 'issudgrid.dat') os.system('cat %s/gensudgrid%s.log >> %s' % (self.me_dir, path)) misc.gzip(path, stdout=issudfile) - + ############################################################################ - def create_root_file(self, input='unweighted_events.lhe', + def create_root_file(self, input='unweighted_events.lhe', output='unweighted_events.root' ): """create the LHE root file """ self.update_status('Creating root files', level='parton') @@ -6233,14 +6233,14 @@ def create_root_file(self, input='unweighted_events.lhe', totar = False torm = True input = input[:-3] - + try: - misc.call(['%s/ExRootLHEFConverter' % eradir, + misc.call(['%s/ExRootLHEFConverter' % eradir, input, output], cwd=pjoin(self.me_dir, 'Events')) except Exception: logger.warning('fail to produce Root output [problem with ExRootAnalysis]') - + if totar: if os.path.exists('%s.gz' % input): try: @@ -6251,13 +6251,13 @@ def create_root_file(self, input='unweighted_events.lhe', misc.gzip(input) if torm: os.remove(input) - + def run_syscalc(self, mode='parton', event_path=None, output=None): - """create the syscalc output""" + """create the syscalc output""" if self.run_card['use_syst'] not in self.true: return - + scdir = self.options['syscalc_path'] if not scdir or not os.path.exists(scdir): return @@ -6265,12 +6265,12 @@ def run_syscalc(self, mode='parton', event_path=None, output=None): if self.run_card['event_norm'] != 'sum': logger.critical('SysCalc works only when event_norm is on \'sum\'.') return - logger.info('running SysCalc on mode %s' % mode) - + logger.info('running SysCalc on mode %s' % mode) + # Restore the old default for SysCalc+PY6 if self.run_card['sys_matchscale']=='auto': self.run_card['sys_matchscale'] = "30 50" - + # Check that all pdfset are correctly installed lhaid = [self.run_card.get_lhapdf_id()] if '&&' in self.run_card['sys_pdf']: @@ -6285,20 +6285,20 @@ def run_syscalc(self, mode='parton', event_path=None, output=None): logger.debug(str(error)) logger.warning('Systematic computation requires lhapdf to run. Bypass SysCalc') return - + # Copy all the relevant PDF sets [self.copy_lhapdf_set([onelha], pdfsets_dir) for onelha in lhaid] - + to_syscalc={'sys_scalefact': self.run_card['sys_scalefact'], 'sys_alpsfact': self.run_card['sys_alpsfact'], 'sys_matchscale': self.run_card['sys_matchscale'], 'sys_scalecorrelation': self.run_card['sys_scalecorrelation'], 'sys_pdf': self.run_card['sys_pdf']} - - tag = self.run_card['run_tag'] + + tag = self.run_card['run_tag'] card = pjoin(self.me_dir, 'bin','internal', 'syscalc_card.dat') template = open(pjoin(self.me_dir, 'bin','internal', 'syscalc_template.dat')).read() - + if '&&' in to_syscalc['sys_pdf']: to_syscalc['sys_pdf'] = to_syscalc['sys_pdf'].split('#',1)[0].replace('&&',' \n ') else: @@ -6311,8 +6311,8 @@ def run_syscalc(self, mode='parton', event_path=None, output=None): new.append(d) else: new[-1] += ' %s' % d - to_syscalc['sys_pdf'] = '\n'.join(new) - + to_syscalc['sys_pdf'] = '\n'.join(new) + if to_syscalc['sys_pdf'].lower() in ['', 'f', 'false', 'none', '.false.']: to_syscalc['sys_pdf'] = '' if to_syscalc['sys_alpsfact'].lower() in ['', 'f', 'false', 'none','.false.']: @@ -6320,17 +6320,17 @@ def run_syscalc(self, mode='parton', event_path=None, output=None): - + # check if the scalecorrelation parameter is define: if not 'sys_scalecorrelation' in self.run_card: self.run_card['sys_scalecorrelation'] = -1 open(card,'w').write(template % self.run_card) - + if not os.path.exists(card): return False - - + + event_dir = pjoin(self.me_dir, 'Events') if not event_path: @@ -6353,19 +6353,19 @@ def run_syscalc(self, mode='parton', event_path=None, output=None): raise SysCalcError('qcut value for sys_matchscale lower than qcut in pythia_card. Bypass syscalc') if float(value) < xqcut: raise SysCalcError('qcut value for sys_matchscale lower than xqcut in run_card. Bypass syscalc') - - + + event_path = pjoin(event_dir,'syst.dat') output = pjoin(event_dir, 'syscalc.dat') else: raise self.InvalidCmd('Invalid mode %s' % mode) - + if not os.path.exists(event_path): if os.path.exists(event_path+'.gz'): misc.gunzip(event_path+'.gz') else: raise SysCalcError('Events file %s does not exits' % event_path) - + self.update_status('Calculating systematics for %s level' % mode, level = mode.lower()) try: proc = misc.call([os.path.join(scdir, 'sys_calc'), @@ -6374,7 +6374,7 @@ def run_syscalc(self, mode='parton', event_path=None, output=None): stderr = subprocess.STDOUT, cwd=event_dir) # Wait 5 s to make sure file is finished writing - time.sleep(5) + time.sleep(5) except OSError as error: logger.error('fail to run syscalc: %s. Please check that SysCalc is correctly installed.' % error) else: @@ -6382,11 +6382,11 @@ def run_syscalc(self, mode='parton', event_path=None, output=None): logger.warning('SysCalc Failed. Please read the associate log to see the reason. Did you install the associate PDF set?') elif mode == 'parton': files.mv(output, event_path) - + self.update_status('End syscalc for %s level' % mode, level = mode.lower(), makehtml=False) - - return True + + return True action_switcher = AskRun @@ -6399,23 +6399,23 @@ def ask_run_configuration(self, mode=None, args=[]): passing_cmd.append('reweight=ON') if '-M' in args or '--madspin' in args: passing_cmd.append('madspin=ON') - + switch, cmd_switch = self.ask('', '0', [], ask_class = self.action_switcher, mode=mode, line_args=args, force=self.force, first_cmd=passing_cmd, return_instance=True) # - self.switch = switch # store the value of the switch for plugin purpose + self.switch = switch # store the value of the switch for plugin purpose if 'dynamical' in switch: mode = 'auto' - + # Now that we know in which mode we are check that all the card #exists (copy default if needed) - + cards = ['param_card.dat', 'run_card.dat'] if switch['shower'] == 'Pythia6': cards.append('pythia_card.dat') if switch['shower'] == 'Pythia8': - cards.append('pythia8_card.dat') + cards.append('pythia8_card.dat') if switch['detector'] in ['PGS','DELPHES+PGS']: cards.append('pgs_card.dat') if switch['detector'] in ['Delphes', 'DELPHES+PGS']: @@ -6438,29 +6438,29 @@ def ask_run_configuration(self, mode=None, args=[]): cards.append('rivet_card.dat') self.keep_cards(cards) - + first_cmd = cmd_switch.get_cardcmd() - + if os.path.isfile(pjoin(self.me_dir,'Cards','MadLoopParams.dat')): cards.append('MadLoopParams.dat') - + if self.force: self.check_param_card(pjoin(self.me_dir,'Cards','param_card.dat' )) return switch - + if 'dynamical' in switch and switch['dynamical']: self.ask_edit_cards(cards, plot=False, mode='auto', first_cmd=first_cmd) else: self.ask_edit_cards(cards, plot=False, first_cmd=first_cmd) return switch - + ############################################################################ def ask_pythia_run_configuration(self, mode=None, pythia_version=6, banner=None): """Ask the question when launching pythia""" - + pythia_suffix = '' if pythia_version==6 else '%d'%pythia_version - + available_mode = ['0', '1'] if pythia_version==6: available_mode.append('2') @@ -6485,10 +6485,10 @@ def ask_pythia_run_configuration(self, mode=None, pythia_version=6, banner=None) mode = self.ask(question, '0', options) elif not mode: mode = 'auto' - + if mode.isdigit(): mode = name[mode] - + auto = False if mode == 'auto': auto = True @@ -6497,7 +6497,7 @@ def ask_pythia_run_configuration(self, mode=None, pythia_version=6, banner=None) mode = 'pgs' elif os.path.exists(pjoin(self.me_dir, 'Cards', 'delphes_card.dat')): mode = 'delphes' - else: + else: mode = 'pythia%s'%pythia_suffix logger.info('Will run in mode %s' % mode) # Now that we know in which mode we are check that all the card @@ -6513,15 +6513,15 @@ def ask_pythia_run_configuration(self, mode=None, pythia_version=6, banner=None) cards.append('delphes_trigger.dat') self.keep_cards(cards, ignore=['madanalysis5_parton_card.dat','madanalysis5_hadron_card.dat', 'plot_card.dat']) - + if self.force: return mode - + if not banner: banner = self.banner - + if auto: - self.ask_edit_cards(cards, from_banner=['param', 'run'], + self.ask_edit_cards(cards, from_banner=['param', 'run'], mode='auto', plot=(pythia_version==6), banner=banner ) else: @@ -6529,12 +6529,12 @@ def ask_pythia_run_configuration(self, mode=None, pythia_version=6, banner=None) plot=(pythia_version==6), banner=banner) return mode - + #=============================================================================== # MadEventCmd #=============================================================================== class MadEventCmdShell(MadEventCmd, cmd.CmdShell): - """The command line processor of MadGraph""" + """The command line processor of MadGraph""" @@ -6548,11 +6548,11 @@ class SubProcesses(object): @classmethod def clean(cls): cls.name_to_pdg = {} - + @staticmethod def get_subP(me_dir): """return the list of Subprocesses""" - + out = [] for line in open(pjoin(me_dir,'SubProcesses', 'subproc.mg')): if not line: @@ -6560,9 +6560,9 @@ def get_subP(me_dir): name = line.strip() if os.path.exists(pjoin(me_dir, 'SubProcesses', name)): out.append(pjoin(me_dir, 'SubProcesses', name)) - + return out - + @staticmethod @@ -6623,9 +6623,9 @@ def get_subP_ids(path): particles = re.search("/([\d,-]+)/", line) all_ids.append([int(p) for p in particles.group(1).split(',')]) return all_ids - - -#=============================================================================== + + +#=============================================================================== class GridPackCmd(MadEventCmd): """The command for the gridpack --Those are not suppose to be use interactively--""" @@ -6639,7 +6639,7 @@ def __init__(self, me_dir = None, nb_event=0, seed=0, gran=-1, *completekey, **s self.random = seed self.random_orig = self.random self.granularity = gran - + self.options['automatic_html_opening'] = False #write the grid_card.dat on disk self.nb_event = int(nb_event) @@ -6680,7 +6680,7 @@ def write_RunWeb(self, me_dir): def write_gridcard(self, nb_event, seed, gran): """write the grid_card.dat file at appropriate location""" - + # first try to write grid_card within the gridpack. print("WRITE GRIDCARD", self.me_dir) if self.readonly: @@ -6689,35 +6689,35 @@ def write_gridcard(self, nb_event, seed, gran): fsock = open('grid_card.dat','w') else: fsock = open(pjoin(self.me_dir, 'Cards', 'grid_card.dat'),'w') - + gridpackcard = banner_mod.GridpackCard() gridpackcard['GridRun'] = True gridpackcard['gevents'] = nb_event gridpackcard['gseed'] = seed gridpackcard['ngran'] = gran - + gridpackcard.write(fsock) ############################################################################ def get_Pdir(self): """get the list of Pdirectory if not yet saved.""" - + if hasattr(self, "Pdirs"): if self.me_dir in self.Pdirs[0]: return self.Pdirs - + if not self.readonly: - self.Pdirs = [pjoin(self.me_dir, 'SubProcesses', l.strip()) + self.Pdirs = [pjoin(self.me_dir, 'SubProcesses', l.strip()) for l in open(pjoin(self.me_dir,'SubProcesses', 'subproc.mg'))] else: - self.Pdirs = [l.strip() - for l in open(pjoin(self.me_dir,'SubProcesses', 'subproc.mg'))] - + self.Pdirs = [l.strip() + for l in open(pjoin(self.me_dir,'SubProcesses', 'subproc.mg'))] + return self.Pdirs - + def prepare_local_dir(self): """create the P directory structure in the local directory""" - + if not self.readonly: os.chdir(self.me_dir) else: @@ -6726,7 +6726,7 @@ def prepare_local_dir(self): os.mkdir(p) files.cp(pjoin(self.me_dir,'SubProcesses',p,'symfact.dat'), pjoin(p, 'symfact.dat')) - + def launch(self, nb_event, seed): """ launch the generation for the grid """ @@ -6742,13 +6742,13 @@ def launch(self, nb_event, seed): if self.run_card['python_seed'] == -2: import random if not hasattr(random, 'mg_seedset'): - random.seed(seed) + random.seed(seed) random.mg_seedset = seed elif self.run_card['python_seed'] > 0: import random if not hasattr(random, 'mg_seedset'): - random.seed(self.run_card['python_seed']) - random.mg_seedset = self.run_card['python_seed'] + random.seed(self.run_card['python_seed']) + random.mg_seedset = self.run_card['python_seed'] # 2) Run the refine for the grid self.update_status('Generating Events', level=None) #misc.call([pjoin(self.me_dir,'bin','refine4grid'), @@ -6767,70 +6767,70 @@ def launch(self, nb_event, seed): self.exec_cmd('decay_events -from_cards', postcmd=False) elif self.run_card['use_syst'] and self.run_card['systematics_program'] == 'systematics': self.options['nb_core'] = 1 - self.exec_cmd('systematics %s --from_card' % + self.exec_cmd('systematics %s --from_card' % pjoin('Events', self.run_name, 'unweighted_events.lhe.gz'), postcmd=False,printcmd=False) - + def refine4grid(self, nb_event): """Special refine for gridpack run.""" self.nb_refine += 1 - + precision = nb_event self.opts = dict([(key,value[1]) for (key,value) in \ self._survey_options.items()]) - + # initialize / remove lhapdf mode # self.configure_directory() # All this has been done before self.cluster_mode = 0 # force single machine # Store seed in randinit file, to be read by ranmar.f self.save_random() - + self.update_status('Refine results to %s' % precision, level=None) logger.info("Using random number seed offset = %s" % self.random) refine_opt = {'err_goal': nb_event, 'split_channels': False, - 'ngran':self.granularity, 'readonly': self.readonly} + 'ngran':self.granularity, 'readonly': self.readonly} x_improve = gen_ximprove.gen_ximprove_gridpack(self, refine_opt) x_improve.launch() # create the ajob for the refinment and run those! - self.gscalefact = x_improve.gscalefact #store jacobian associate to the gridpack - - + self.gscalefact = x_improve.gscalefact #store jacobian associate to the gridpack + + #bindir = pjoin(os.path.relpath(self.dirbin, pjoin(self.me_dir,'SubProcesses'))) #print 'run combine!!!' #combine_runs.CombineRuns(self.me_dir) - + return #update html output Presults = sum_html.collect_result(self) cross, error = Presults.xsec, Presults.xerru self.results.add_detail('cross', cross) self.results.add_detail('error', error) - - + + #self.update_status('finish refine', 'parton', makehtml=False) #devnull.close() - - - + + + return self.total_jobs = 0 - subproc = [P for P in os.listdir(pjoin(self.me_dir,'SubProcesses')) if + subproc = [P for P in os.listdir(pjoin(self.me_dir,'SubProcesses')) if P.startswith('P') and os.path.isdir(pjoin(self.me_dir,'SubProcesses', P))] devnull = open(os.devnull, 'w') for nb_proc,subdir in enumerate(subproc): subdir = subdir.strip() Pdir = pjoin(self.me_dir, 'SubProcesses',subdir) bindir = pjoin(os.path.relpath(self.dirbin, Pdir)) - + logger.info(' %s ' % subdir) # clean previous run for match in misc.glob('*ajob*', Pdir): if os.path.basename(match)[:4] in ['ajob', 'wait', 'run.', 'done']: os.remove(pjoin(Pdir, match)) - + logfile = pjoin(Pdir, 'gen_ximprove.log') misc.call([pjoin(bindir, 'gen_ximprove')], @@ -6840,40 +6840,40 @@ def refine4grid(self, nb_event): if os.path.exists(pjoin(Pdir, 'ajob1')): alljobs = misc.glob('ajob*', Pdir) - nb_tot = len(alljobs) + nb_tot = len(alljobs) self.total_jobs += nb_tot for i, job in enumerate(alljobs): job = os.path.basename(job) - self.launch_job('%s' % job, cwd=Pdir, remaining=(nb_tot-i-1), + self.launch_job('%s' % job, cwd=Pdir, remaining=(nb_tot-i-1), run_type='Refine number %s on %s (%s/%s)' % (self.nb_refine, subdir, nb_proc+1, len(subproc))) if os.path.exists(pjoin(self.me_dir,'error')): self.monitor(html=True) raise MadEventError('Error detected in dir %s: %s' % \ (Pdir, open(pjoin(self.me_dir,'error')).read())) - self.monitor(run_type='All job submitted for refine number %s' % + self.monitor(run_type='All job submitted for refine number %s' % self.nb_refine) - + self.update_status("Combining runs", level='parton') try: os.remove(pjoin(Pdir, 'combine_runs.log')) except Exception: pass - + bindir = pjoin(os.path.relpath(self.dirbin, pjoin(self.me_dir,'SubProcesses'))) combine_runs.CombineRuns(self.me_dir) - + #update html output cross, error = self.make_make_all_html_results() self.results.add_detail('cross', cross) self.results.add_detail('error', error) - - + + self.update_status('finish refine', 'parton', makehtml=False) devnull.close() def do_combine_events(self, line): - """Advanced commands: Launch combine events""" + """Advanced commands: Launch combine events""" if self.readonly: outdir = 'Events' @@ -6895,17 +6895,17 @@ def do_combine_events(self, line): self.banner.add_generation_info(self.results.current['cross'], self.run_card['nevents']) if not hasattr(self, 'random_orig'): self.random_orig = 0 self.banner.change_seed(self.random_orig) - - + + if not os.path.exists(pjoin(outdir, self.run_name)): os.mkdir(pjoin(outdir, self.run_name)) - self.banner.write(pjoin(outdir, self.run_name, + self.banner.write(pjoin(outdir, self.run_name, '%s_%s_banner.txt' % (self.run_name, tag))) - - get_wgt = lambda event: event.wgt + + get_wgt = lambda event: event.wgt AllEvent = lhe_parser.MultiEventFile() AllEvent.banner = self.banner - + partials = 0 # if too many file make some partial unweighting sum_xsec, sum_xerru, sum_axsec = 0,[],0 Gdirs = self.get_Gdir() @@ -6915,7 +6915,7 @@ def do_combine_events(self, line): if os.path.exists(pjoin(Gdir, 'events.lhe')): result = sum_html.OneResult('') result.read_results(pjoin(Gdir, 'results.dat')) - AllEvent.add(pjoin(Gdir, 'events.lhe'), + AllEvent.add(pjoin(Gdir, 'events.lhe'), result.get('xsec')*gscalefact[Gdir], result.get('xerru')*gscalefact[Gdir], result.get('axsec')*gscalefact[Gdir] @@ -6924,7 +6924,7 @@ def do_combine_events(self, line): sum_xsec += result.get('xsec')*gscalefact[Gdir] sum_xerru.append(result.get('xerru')*gscalefact[Gdir]) sum_axsec += result.get('axsec')*gscalefact[Gdir] - + if len(AllEvent) >= 80: #perform a partial unweighting AllEvent.unweight(pjoin(outdir, self.run_name, "partials%s.lhe.gz" % partials), get_wgt, log_level=5, trunc_error=1e-2, event_target=self.nb_event) @@ -6933,26 +6933,26 @@ def do_combine_events(self, line): AllEvent.add(pjoin(outdir, self.run_name, "partials%s.lhe.gz" % partials), sum_xsec, math.sqrt(sum(x**2 for x in sum_xerru)), - sum_axsec) + sum_axsec) partials +=1 - + if not hasattr(self,'proc_characteristic'): self.proc_characteristic = self.get_characteristics() - + self.banner.add_generation_info(sum_xsec, self.nb_event) nb_event = AllEvent.unweight(pjoin(outdir, self.run_name, "unweighted_events.lhe.gz"), get_wgt, trunc_error=1e-2, event_target=self.nb_event, log_level=logging.DEBUG, normalization=self.run_card['event_norm'], proc_charac=self.proc_characteristic) - - + + if partials: for i in range(partials): try: os.remove(pjoin(outdir, self.run_name, "partials%s.lhe.gz" % i)) except Exception: os.remove(pjoin(outdir, self.run_name, "partials%s.lhe" % i)) - + self.results.add_detail('nb_event', nb_event) self.banner.add_generation_info(sum_xsec, nb_event) if self.run_card['bias_module'].lower() not in ['dummy', 'none']: @@ -6961,7 +6961,7 @@ def do_combine_events(self, line): class MadLoopInitializer(object): """ A container class for the various methods for initializing MadLoop. It is - placed in MadEventInterface because it is used by Madevent for loop-induced + placed in MadEventInterface because it is used by Madevent for loop-induced simulations. """ @staticmethod @@ -6974,7 +6974,7 @@ def make_and_run(dir_name,checkRam=False): if os.path.isfile(pjoin(dir_name,'check')): os.remove(pjoin(dir_name,'check')) os.remove(pjoin(dir_name,'check_sa.o')) - os.remove(pjoin(dir_name,'loop_matrix.o')) + os.remove(pjoin(dir_name,'loop_matrix.o')) # Now run make devnull = open(os.devnull, 'w') start=time.time() @@ -6996,7 +6996,7 @@ def make_and_run(dir_name,checkRam=False): stdout=devnull, stderr=devnull, close_fds=True) try: ptimer.execute() - #poll as often as possible; otherwise the subprocess might + #poll as often as possible; otherwise the subprocess might # "sneak" in some extra memory usage while you aren't looking # Accuracy of .2 seconds is enough for the timing. while ptimer.poll(): @@ -7028,7 +7028,7 @@ def fix_PSPoint_in_check(dir_path, read_ps = True, npoints = 1, If mu_r > 0.0, then the renormalization constant value will be hardcoded directly in check_sa.f, if is is 0 it will be set to Sqrt(s) and if it is < 0.0 the value in the param_card.dat is used. - If the split_orders target (i.e. the target squared coupling orders for + If the split_orders target (i.e. the target squared coupling orders for the computation) is != -1, it will be changed in check_sa.f via the subroutine CALL SET_COUPLINGORDERS_TARGET(split_orders).""" @@ -7043,12 +7043,12 @@ def fix_PSPoint_in_check(dir_path, read_ps = True, npoints = 1, file_path = pjoin(directories[0],'check_sa.f') if not os.path.isfile(file_path): raise MadGraph5Error('Could not find the location of check_sa.f'+\ - ' from the specified path %s.'%str(file_path)) + ' from the specified path %s.'%str(file_path)) file = open(file_path, 'r') check_sa = file.read() file.close() - + file = open(file_path, 'w') check_sa = re.sub(r"READPS = \S+\)","READPS = %s)"%('.TRUE.' if read_ps \ else '.FALSE.'), check_sa) @@ -7064,42 +7064,42 @@ def fix_PSPoint_in_check(dir_path, read_ps = True, npoints = 1, (("%.17e"%mu_r).replace('e','d')),check_sa) elif mu_r < 0.0: check_sa = re.sub(r"MU_R=SQRTS","",check_sa) - + if split_orders > 0: check_sa = re.sub(r"SET_COUPLINGORDERS_TARGET\(-?\d+\)", - "SET_COUPLINGORDERS_TARGET(%d)"%split_orders,check_sa) - + "SET_COUPLINGORDERS_TARGET(%d)"%split_orders,check_sa) + file.write(check_sa) file.close() - @staticmethod + @staticmethod def run_initialization(run_dir=None, SubProc_dir=None, infos=None,\ req_files = ['HelFilter.dat','LoopFilter.dat'], attempts = [4,15]): - """ Run the initialization of the process in 'run_dir' with success + """ Run the initialization of the process in 'run_dir' with success characterized by the creation of the files req_files in this directory. The directory containing the driving source code 'check_sa.f'. - The list attempt gives the successive number of PS points the + The list attempt gives the successive number of PS points the initialization should be tried with before calling it failed. Returns the number of PS points which were necessary for the init. Notice at least run_dir or SubProc_dir must be provided. A negative attempt number given in input means that quadprec will be forced for initialization.""" - + # If the user does not want detailed info, then set the dictionary # to a dummy one. if infos is None: infos={} - + if SubProc_dir is None and run_dir is None: raise MadGraph5Error('At least one of [SubProc_dir,run_dir] must'+\ ' be provided in run_initialization.') - + # If the user does not specify where is check_sa.f, then it is assumed # to be one levels above run_dir if SubProc_dir is None: SubProc_dir = os.path.abspath(pjoin(run_dir,os.pardir)) - + if run_dir is None: directories =[ dir for dir in misc.glob('P[0-9]*', SubProc_dir) if os.path.isdir(dir) ] @@ -7109,7 +7109,7 @@ def run_initialization(run_dir=None, SubProc_dir=None, infos=None,\ raise MadGraph5Error('Could not find a valid running directory'+\ ' in %s.'%str(SubProc_dir)) - # Use the presence of the file born_matrix.f to decide if it is a + # Use the presence of the file born_matrix.f to decide if it is a # loop-induced process or not. It's not crucial, but just that because # of the dynamic adjustment of the ref scale used for deciding what are # the zero contributions, more points are neeeded for loop-induced. @@ -7128,9 +7128,9 @@ def run_initialization(run_dir=None, SubProc_dir=None, infos=None,\ raise MadGraph5Error('Could not find MadLoopParams.dat at %s.'\ %MLCardPath) else: - MLCard = banner_mod.MadLoopParam(MLCardPath) + MLCard = banner_mod.MadLoopParam(MLCardPath) MLCard_orig = banner_mod.MadLoopParam(MLCard) - + # Make sure that LoopFilter really is needed. if not MLCard['UseLoopFilter']: try: @@ -7153,11 +7153,11 @@ def need_init(): proc_prefix+fname)) for fname in my_req_files]) or \ not os.path.isfile(pjoin(run_dir,'check')) or \ not os.access(pjoin(run_dir,'check'), os.X_OK) - + # Check if this is a process without born by checking the presence of the # file born_matrix.f is_loop_induced = os.path.exists(pjoin(run_dir,'born_matrix.f')) - + # For loop induced processes, always attempt quadruple precision if # double precision attempts fail and the user didn't specify himself # quadruple precision initializations attempts @@ -7166,11 +7166,11 @@ def need_init(): use_quad_prec = 1 curr_attempt = 1 - MLCard.set('WriteOutFilters',True) - + MLCard.set('WriteOutFilters',True) + while to_attempt!=[] and need_init(): curr_attempt = to_attempt.pop() - # if the attempt is a negative number it means we must force + # if the attempt is a negative number it means we must force # quadruple precision at initialization time if curr_attempt < 0: use_quad_prec = -1 @@ -7183,11 +7183,11 @@ def need_init(): MLCard.set('ZeroThres',1e-9) # Plus one because the filter are written on the next PS point after curr_attempt = abs(curr_attempt+1) - MLCard.set('MaxAttempts',curr_attempt) + MLCard.set('MaxAttempts',curr_attempt) MLCard.write(pjoin(SubProc_dir,'MadLoopParams.dat')) # initialization is performed. - MadLoopInitializer.fix_PSPoint_in_check(run_dir, read_ps = False, + MadLoopInitializer.fix_PSPoint_in_check(run_dir, read_ps = False, npoints = curr_attempt) compile_time, run_time, ram_usage = \ MadLoopInitializer.make_and_run(run_dir) @@ -7200,7 +7200,7 @@ def need_init(): infos['Process_compilation']==None: infos['Process_compilation'] = compile_time infos['Initialization'] = run_time - + MLCard_orig.write(pjoin(SubProc_dir,'MadLoopParams.dat')) if need_init(): return None @@ -7219,8 +7219,8 @@ def need_init(ML_resources_path, proc_prefix, r_files): MLCardPath = pjoin(proc_dir,'SubProcesses','MadLoopParams.dat') if not os.path.isfile(MLCardPath): raise MadGraph5Error('Could not find MadLoopParams.dat at %s.'\ - %MLCardPath) - MLCard = banner_mod.MadLoopParam(MLCardPath) + %MLCardPath) + MLCard = banner_mod.MadLoopParam(MLCardPath) req_files = ['HelFilter.dat','LoopFilter.dat'] # Make sure that LoopFilter really is needed. @@ -7234,9 +7234,9 @@ def need_init(ML_resources_path, proc_prefix, r_files): req_files.remove('HelFilter.dat') except ValueError: pass - + for v_folder in glob.iglob(pjoin(proc_dir,'SubProcesses', - '%s*'%subproc_prefix)): + '%s*'%subproc_prefix)): # Make sure it is a valid MadLoop directory if not os.path.isdir(v_folder) or not os.path.isfile(\ pjoin(v_folder,'loop_matrix.f')): @@ -7247,7 +7247,7 @@ def need_init(ML_resources_path, proc_prefix, r_files): if need_init(pjoin(proc_dir,'SubProcesses','MadLoop5_resources'), proc_prefix, req_files): return True - + return False @staticmethod @@ -7265,7 +7265,7 @@ def init_MadLoop(proc_dir, n_PS=None, subproc_prefix='PV', MG_options=None, misc.compile(arg=['treatCardsLoopNoInit'], cwd=pjoin(proc_dir,'Source')) else: interface.do_treatcards('all --no_MadLoopInit') - + # First make sure that IREGI and CUTTOOLS are compiled if needed if os.path.exists(pjoin(proc_dir,'Source','CutTools')): misc.compile(arg=['libcuttools'],cwd=pjoin(proc_dir,'Source')) @@ -7273,8 +7273,8 @@ def init_MadLoop(proc_dir, n_PS=None, subproc_prefix='PV', MG_options=None, misc.compile(arg=['libiregi'],cwd=pjoin(proc_dir,'Source')) # Then make sure DHELAS and MODEL are compiled misc.compile(arg=['libmodel'],cwd=pjoin(proc_dir,'Source')) - misc.compile(arg=['libdhelas'],cwd=pjoin(proc_dir,'Source')) - + misc.compile(arg=['libdhelas'],cwd=pjoin(proc_dir,'Source')) + # Now initialize the MadLoop outputs logger.info('Initializing MadLoop loop-induced matrix elements '+\ '(this can take some time)...') @@ -7283,7 +7283,7 @@ def init_MadLoop(proc_dir, n_PS=None, subproc_prefix='PV', MG_options=None, if MG_options: if interface and hasattr(interface, 'cluster') and isinstance(interface.cluster, cluster.MultiCore): mcore = interface.cluster - else: + else: mcore = cluster.MultiCore(**MG_options) else: mcore = cluster.onecore @@ -7294,10 +7294,10 @@ def run_initialization_wrapper(run_dir, infos, attempts): run_dir=run_dir, infos=infos) else: n_PS = MadLoopInitializer.run_initialization( - run_dir=run_dir, infos=infos, attempts=attempts) + run_dir=run_dir, infos=infos, attempts=attempts) infos['nPS'] = n_PS return 0 - + def wait_monitoring(Idle, Running, Done): if Idle+Running+Done == 0: return @@ -7307,21 +7307,21 @@ def wait_monitoring(Idle, Running, Done): init_info = {} # List all virtual folders while making sure they are valid MadLoop folders VirtualFolders = [f for f in glob.iglob(pjoin(proc_dir,'SubProcesses', - '%s*'%subproc_prefix)) if (os.path.isdir(f) or + '%s*'%subproc_prefix)) if (os.path.isdir(f) or os.path.isfile(pjoin(f,'loop_matrix.f')))] logger.debug("Now Initializing MadLoop matrix element in %d folder%s:"%\ (len(VirtualFolders),'s' if len(VirtualFolders)>1 else '')) - logger.debug(', '.join("'%s'"%os.path.basename(v_folder) for v_folder in + logger.debug(', '.join("'%s'"%os.path.basename(v_folder) for v_folder in VirtualFolders)) for v_folder in VirtualFolders: init_info[v_folder] = {} - + # We try all multiples of n_PS from 1 to max_mult, first in DP and then # in QP before giving up, or use default values if n_PS is None. max_mult = 3 if n_PS is None: # Then use the default list of number of PS points to try - mcore.submit(run_initialization_wrapper, + mcore.submit(run_initialization_wrapper, [pjoin(v_folder), init_info[v_folder], None]) else: # Use specific set of PS points @@ -7348,8 +7348,8 @@ def wait_monitoring(Idle, Running, Done): '%d PS points (%s), in %.3g(compil.) + %.3g(init.) secs.'%( abs(init['nPS']),'DP' if init['nPS']>0 else 'QP', init['Process_compilation'],init['Initialization'])) - - logger.info('MadLoop initialization finished.') + + logger.info('MadLoop initialization finished.') AskforEditCard = common_run.AskforEditCard @@ -7364,16 +7364,16 @@ def wait_monitoring(Idle, Running, Done): import os import optparse - # Get the directory of the script real path (bin) - # and add it to the current PYTHONPATH + # Get the directory of the script real path (bin) + # and add it to the current PYTHONPATH #root_path = os.path.dirname(os.path.dirname(os.path.dirname(os.path.realpath( __file__ )))) sys.path.insert(0, root_path) - class MyOptParser(optparse.OptionParser): + class MyOptParser(optparse.OptionParser): class InvalidOption(Exception): pass def error(self, msg=''): raise MyOptParser.InvalidOption(msg) - # Write out nice usage message if called with -h or --help + # Write out nice usage message if called with -h or --help usage = "usage: %prog [options] [FILE] " parser = MyOptParser(usage=usage) parser.add_option("-l", "--logging", default='INFO', @@ -7384,7 +7384,7 @@ def error(self, msg=''): help='force to launch debug mode') parser_error = '' done = False - + for i in range(len(sys.argv)-1): try: (options, args) = parser.parse_args(sys.argv[1:len(sys.argv)-i]) @@ -7394,7 +7394,7 @@ def error(self, msg=''): else: args += sys.argv[len(sys.argv)-i:] if not done: - # raise correct error: + # raise correct error: try: (options, args) = parser.parse_args() except MyOptParser.InvalidOption as error: @@ -7407,8 +7407,8 @@ def error(self, msg=''): import subprocess import logging import logging.config - # Set logging level according to the logging level given by options - #logging.basicConfig(level=vars(logging)[options.logging]) + # Set logging level according to the logging level given by options + #logging.basicConfig(level=vars(logging)[options.logging]) import internal import internal.coloring_logging # internal.file = XXX/bin/internal/__init__.py @@ -7431,13 +7431,13 @@ def error(self, msg=''): raise pass - # Call the cmd interface main loop + # Call the cmd interface main loop try: if args: # a single command is provided if '--web' in args: - i = args.index('--web') - args.pop(i) + i = args.index('--web') + args.pop(i) cmd_line = MadEventCmd(me_dir, force_run=True) else: cmd_line = MadEventCmdShell(me_dir, force_run=True) @@ -7457,13 +7457,13 @@ def error(self, msg=''): pass - - - - - - - - + + + + + + + + diff --git a/epochX/cudacpp/gg_ttgg.mad/bin/internal/run_plot b/epochX/cudacpp/gg_ttgg.mad/bin/internal/run_plot deleted file mode 100755 index 7deee7ac88..0000000000 --- a/epochX/cudacpp/gg_ttgg.mad/bin/internal/run_plot +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash -# -# This runs MadAnalysis on the unweighted_events.lhe -# -# Usage: run_plot run_name [madir [tddir]] -# where madir is the path to the MadAnalysis package - -main=`pwd` - -if [ "$1" != "" ] -then - run=$1 -else - echo "Usage: run_plot runname [MAdir [tddir]]" - exit -fi - -if [ "$2" != "" ] -then - MAdir=$main/$2 -else - MAdir=$main/../../MadAnalysis -fi - -if [ "$3" != "" ]; then - td=$main/$3 -else - td=$main/../../td -fi - -dirbin=$main/../bin - -if [[ $run != "" && -e ${run}_unweighted_events.lhe.gz ]];then - gunzip -c ${run}_unweighted_events.lhe.gz > unweighted_events.lhe -fi - -if [[ (-x $MAdir/plot_events) && (-e unweighted_events.lhe) && (-e ../Cards/plot_card.dat) ]]; then - echo "Creating Plots" - mkdir $run - cd $run - echo "../unweighted_events.lhe" > events.list - $dirbin/plot $MAdir $td > plot.log - cd .. - $dirbin/plot_page-pl $run parton - mv plots.html ${run}_plots.html -fi - diff --git a/epochX/cudacpp/gg_ttgg.mad/bin/internal/run_plot_delphes b/epochX/cudacpp/gg_ttgg.mad/bin/internal/run_plot_delphes deleted file mode 100755 index 975f410d0e..0000000000 --- a/epochX/cudacpp/gg_ttgg.mad/bin/internal/run_plot_delphes +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/bash -# -# This runs MadAnalysis on the delphes_events.lhco -# -# Usage: run_plot run_name [madir [tddir]] -# where madir is the path to the MadAnalysis package - -main=`pwd` - -if [ "$1" != "" ] -then - run=$1 -else - echo "Usage: run_plot runname [MAdir [tddir]]" - exit -fi - -if [ "$2" != "" ] -then - MAdir=$main/$2 -else - MAdir=$main/../../MadAnalysis -fi - -if [ "$3" != "" ]; then - td=$main/$3 -else - td=$main/../../td -fi - -dirbin=$main/../bin - -if [[ $run != "" && -e ${run}_delphes_events.lhco.gz ]];then - gunzip -c ${run}_delphes_events.lhco.gz > delphes_events.lhco -fi - -if [[ (-x $MAdir/plot_events) && (-e delphes_events.lhco) && (-e ../Cards/plot_card.dat) ]]; then - echo "Creating Plots" - mkdir ${run}_delphes - cd ${run}_delphes - echo "../delphes_events.lhco" > events.list - $dirbin/plot $MAdir $td > plot.log - cd .. - $dirbin/plot_page-pl ${run}_delphes Delphes - mv plots.html ${run}_plots_delphes.html -fi diff --git a/epochX/cudacpp/gg_ttgg.mad/bin/internal/run_plot_pgs b/epochX/cudacpp/gg_ttgg.mad/bin/internal/run_plot_pgs deleted file mode 100755 index e7a36ef344..0000000000 --- a/epochX/cudacpp/gg_ttgg.mad/bin/internal/run_plot_pgs +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash -# -# This runs MadAnalysis on the unweighted_events.lhe -# -# Usage: run_plot run_name [madir [tddir]] -# where madir is the path to the MadAnalysis package - -main=`pwd` - -if [ "$1" != "" ] -then - run=$1 -else - echo "Usage: run_plot runname [MAdir [tddir]]" - exit -fi - -if [ "$2" != "" ] -then - MAdir=$main/$2 -else - MAdir=$main/../../MadAnalysis -fi - -if [ "$3" != "" ]; then - td=$main/$3 -else - td=$main/../../td -fi - -dirbin=$main/../bin - -if [[ $run != "" && -e ${run}_pgs_events.lhco.gz ]];then - gunzip -c ${run}_pgs_events.lhco.gz > pgs_events.lhco -fi - -if [[ (-x $MAdir/plot_events) && (-e pgs_events.lhco) && (-e ../Cards/plot_card.dat) ]]; then - echo "Creating Plots" - mkdir ${run}_pgs - cd ${run}_pgs - echo "../pgs_events.lhco" > events.list - $dirbin/plot $MAdir $td > plot.log - cd .. - $dirbin/plot_page-pl ${run}_pgs PGS - mv plots.html ${run}_plots_pgs.html -fi - diff --git a/epochX/cudacpp/gg_ttgg.mad/bin/internal/run_plot_pythia b/epochX/cudacpp/gg_ttgg.mad/bin/internal/run_plot_pythia deleted file mode 100755 index 532bfb4b7b..0000000000 --- a/epochX/cudacpp/gg_ttgg.mad/bin/internal/run_plot_pythia +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/bash -# -# This runs MadAnalysis on the unweighted_events.lhe -# -# Usage: run_plot run_name [madir [tddir]] -# where madir is the path to the MadAnalysis package - -main=`pwd` - -if [ "$1" != "" ] -then - run=$1 -else - echo "Usage: run_plot runname [MAdir [tddir]]" - exit -fi - -if [ "$2" != "" ] -then - MAdir=$main/$2 -else - MAdir=$main/../../MadAnalysis -fi - -if [ "$3" != "" ]; then - td=$main/$3 -else - td=$main/../../td -fi - -dirbin=$main/../bin/internal - -if [[ $run != "" && -e ${run}_pythia_events.lhe.gz ]];then - gunzip -c ${run}_pythia_events.lhe.gz > pythia_events.lhe -fi - -if [[ (-x $MAdir/plot_events) && (-e pythia_events.lhe) && (-e ../Cards/plot_card.dat) ]]; then - echo "Creating Plots" - mkdir ${run}_pythia - cd ${run}_pythia - echo "../pythia_events.lhe" > events.list - $dirbin/plot $MAdir $td > plot.log - cd .. - $dirbin/plot_page-pl ${run}_pythia Pythia - mv plots.html ${run}_plots_pythia.html - $dirbin/gen_crossxhtml-pl $run -else - echo "Not creating plots" -fi - diff --git a/epochX/cudacpp/gg_ttgg.mad/src/cudacpp_src.mk b/epochX/cudacpp/gg_ttgg.mad/src/cudacpp_src.mk index c757875347..b4e446bc45 100644 --- a/epochX/cudacpp/gg_ttgg.mad/src/cudacpp_src.mk +++ b/epochX/cudacpp/gg_ttgg.mad/src/cudacpp_src.mk @@ -1,12 +1,7 @@ # Copyright (C) 2020-2023 CERN and UCLouvain. # Licensed under the GNU Lesser General Public License (version 3 or later). # Created by: S. Roiser (Feb 2020) for the MG5aMC CUDACPP plugin. -# Further modified by: J. Teig, O. Mattelaer, S. Roiser, A. Valassi (2020-2023) for the MG5aMC CUDACPP plugin. - -#=== Determine the name of this makefile (https://ftp.gnu.org/old-gnu/Manuals/make-3.80/html_node/make_17.html) -#=== NB: assume that the same name (e.g. cudacpp.mk, Makefile...) is used in the Subprocess and src directories - -THISMK = $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)) +# Further modified by: S. Hageboeck, J. Teig, O. Mattelaer, S. Roiser, A. Valassi (2020-2023) for the MG5aMC CUDACPP plugin. #------------------------------------------------------------------------------- @@ -16,167 +11,24 @@ SHELL := /bin/bash #------------------------------------------------------------------------------- -#=== Configure common compiler flags for CUDA and C++ - -INCFLAGS = -I. -OPTFLAGS = -O3 # this ends up in CUFLAGS too (should it?), cannot add -Ofast or -ffast-math here - -#------------------------------------------------------------------------------- - #=== Configure the C++ compiler -CXXFLAGS = $(OPTFLAGS) -std=c++17 $(INCFLAGS) $(USE_NVTX) -fPIC -Wall -Wshadow -Wextra +include ../Source/make_opts + +MG_CXXFLAGS += -fPIC -I. $(USE_NVTX) ifeq ($(shell $(CXX) --version | grep ^nvc++),) -CXXFLAGS+= -ffast-math # see issue #117 +MG_CXXFLAGS += -ffast-math # see issue #117 endif -###CXXFLAGS+= -Ofast # performance is not different from --fast-math -###CXXFLAGS+= -g # FOR DEBUGGING ONLY # Note: AR, CXX and FC are implicitly defined if not set externally # See https://www.gnu.org/software/make/manual/html_node/Implicit-Variables.html ###RANLIB = ranlib -# Add -mmacosx-version-min=11.3 to avoid "ld: warning: object file was built for newer macOS version than being linked" -LDFLAGS = -ifneq ($(shell $(CXX) --version | egrep '^Apple clang'),) -CXXFLAGS += -mmacosx-version-min=11.3 -LDFLAGS += -mmacosx-version-min=11.3 -endif - -#------------------------------------------------------------------------------- - -#=== Configure the CUDA compiler (note: NVCC is already exported including ccache) - -###$(info NVCC=$(NVCC)) - -#------------------------------------------------------------------------------- - -#=== Configure ccache for C++ builds (note: NVCC is already exported including ccache) - -# Enable ccache if USECCACHE=1 -ifeq ($(USECCACHE)$(shell echo $(CXX) | grep ccache),1) - override CXX:=ccache $(CXX) -endif -#ifeq ($(USECCACHE)$(shell echo $(AR) | grep ccache),1) -# override AR:=ccache $(AR) -#endif - -#------------------------------------------------------------------------------- - -#=== Configure PowerPC-specific compiler flags for CUDA and C++ - -# Assuming uname is available, detect if architecture is PowerPC -UNAME_P := $(shell uname -p) - -# PowerPC-specific CXX compiler flags (being reviewed) -ifeq ($(UNAME_P),ppc64le) - CXXFLAGS+= -mcpu=power9 -mtune=power9 # gains ~2-3% both for none and sse4 - # Throughput references without the extra flags below: none=1.41-1.42E6, sse4=2.15-2.19E6 - ###CXXFLAGS+= -DNO_WARN_X86_INTRINSICS # no change - ###CXXFLAGS+= -fpeel-loops # no change - ###CXXFLAGS+= -funroll-loops # gains ~1% for none, loses ~1% for sse4 - ###CXXFLAGS+= -ftree-vectorize # no change - ###CXXFLAGS+= -flto # BUILD ERROR IF THIS ADDED IN SRC?! -else - ###AR=gcc-ar # needed by -flto - ###RANLIB=gcc-ranlib # needed by -flto - ###CXXFLAGS+= -flto # NB: build error from src/Makefile unless gcc-ar and gcc-ranlib are used - ######CXXFLAGS+= -fno-semantic-interposition # no benefit (neither alone, nor combined with -flto) -endif - -#------------------------------------------------------------------------------- - #=== Set the CUDA/C++ compiler flags appropriate to user-defined choices of AVX, FPTYPE, HELINL, HRDCOD, RNDGEN # Set the build flags appropriate to OMPFLAGS ###$(info OMPFLAGS=$(OMPFLAGS)) -CXXFLAGS += $(OMPFLAGS) - -# Set the build flags appropriate to each AVX choice (example: "make AVX=none") -# [NB MGONGPU_PVW512 is needed because "-mprefer-vector-width=256" is not exposed in a macro] -# [See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96476] -ifeq ($(NVCC),) - $(info AVX=$(AVX)) - ifeq ($(UNAME_P),ppc64le) - ifeq ($(AVX),sse4) - override AVXFLAGS = -D__SSE4_2__ # Power9 VSX with 128 width (VSR registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on PowerPC for the moment) - endif - else ifeq ($(UNAME_P),arm) - ifeq ($(AVX),sse4) - override AVXFLAGS = -D__SSE4_2__ # ARM NEON with 128 width (Q/quadword registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on ARM for the moment) - endif - else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 - ifeq ($(AVX),none) - override AVXFLAGS = -mno-sse3 # no SIMD - else ifeq ($(AVX),sse4) - override AVXFLAGS = -mno-avx # SSE4.2 with 128 width (xmm registers) - else ifeq ($(AVX),avx2) - override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(AVX),512y) - override AVXFLAGS = -march=skylake -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(AVX),512z) - override AVXFLAGS = -march=skylake -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) - else - $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) - endif - else - ifeq ($(AVX),none) - override AVXFLAGS = -march=x86-64 # no SIMD (see #588) - else ifeq ($(AVX),sse4) - override AVXFLAGS = -march=nehalem # SSE4.2 with 128 width (xmm registers) - else ifeq ($(AVX),avx2) - override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(AVX),512y) - override AVXFLAGS = -march=skylake-avx512 -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(AVX),512z) - override AVXFLAGS = -march=skylake-avx512 -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) - endif - endif - # For the moment, use AVXFLAGS everywhere: eventually, use them only in encapsulated implementations? - CXXFLAGS+= $(AVXFLAGS) -endif - -# Set the build flags appropriate to each FPTYPE choice (example: "make FPTYPE=f") -###$(info FPTYPE=$(FPTYPE)) -ifeq ($(FPTYPE),d) - CXXFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_DOUBLE -else ifeq ($(FPTYPE),f) - CXXFLAGS += -DMGONGPU_FPTYPE_FLOAT -DMGONGPU_FPTYPE2_FLOAT -else ifeq ($(FPTYPE),m) - CXXFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_FLOAT -else - $(error Unknown FPTYPE='$(FPTYPE)': only 'd', 'f' and 'm' are supported) -endif - -# Set the build flags appropriate to each HELINL choice (example: "make HELINL=1") -###$(info HELINL=$(HELINL)) -ifeq ($(HELINL),1) - CXXFLAGS += -DMGONGPU_INLINE_HELAMPS -else ifneq ($(HELINL),0) - $(error Unknown HELINL='$(HELINL)': only '0' and '1' are supported) -endif - -# Set the build flags appropriate to each HRDCOD choice (example: "make HRDCOD=1") -###$(info HRDCOD=$(HRDCOD)) -ifeq ($(HRDCOD),1) - CXXFLAGS += -DMGONGPU_HARDCODE_PARAM -else ifneq ($(HRDCOD),0) - $(error Unknown HRDCOD='$(HRDCOD)': only '0' and '1' are supported) -endif - -# Set the build flags appropriate to each RNDGEN choice (example: "make RNDGEN=hasNoCurand") -###$(info RNDGEN=$(RNDGEN)) -ifeq ($(RNDGEN),hasNoCurand) - CXXFLAGS += -DMGONGPU_HAS_NO_CURAND -else ifneq ($(RNDGEN),hasCurand) - $(error Unknown RNDGEN='$(RNDGEN)': only 'hasCurand' and 'hasNoCurand' are supported) -endif +MG_CXXFLAGS += $(OMPFLAGS) #------------------------------------------------------------------------------- @@ -184,36 +36,18 @@ endif # Build directory "short" tag (defines target and path to the optional build directory) # (Rationale: keep directory names shorter, e.g. do not include random number generator choice) -ifneq ($(NVCC),) - override DIRTAG = cuda_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) -else - override DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) -endif +DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) # Build lockfile "full" tag (defines full specification of build options that cannot be intermixed) # (Rationale: avoid mixing of CUDA and no-CUDA environment builds with different random number generators) -ifneq ($(NVCC),) - override TAG = cuda_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) -else - override TAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) -endif +TAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) -# Build directory: current directory by default, or build.$(DIRTAG) if USEBUILDDIR==1 -###$(info Current directory is $(shell pwd)) -ifeq ($(USEBUILDDIR),1) - override BUILDDIR = build.$(DIRTAG) - override LIBDIRREL = ../lib/$(BUILDDIR) - ###$(info Building in BUILDDIR=$(BUILDDIR) for tag=$(TAG) (USEBUILDDIR=1 is set)) -else - override BUILDDIR = . - override LIBDIRREL = ../lib - ###$(info Building in BUILDDIR=$(BUILDDIR) for tag=$(TAG) (USEBUILDDIR is not set)) -endif -######$(info Building in BUILDDIR=$(BUILDDIR) for tag=$(TAG)) +# Build directory: +BUILDDIR := build.$(DIRTAG) +LIBDIRREL := ../lib/$(BUILDDIR) # Workaround for Mac #375 (I did not manage to fix rpath with @executable_path): use absolute paths for LIBDIR # (NB: this is quite ugly because it creates the directory if it does not exist - to avoid removing src by mistake) -UNAME_S := $(shell uname -s) ifeq ($(UNAME_S),Darwin) override LIBDIR = $(shell mkdir -p $(LIBDIRREL); cd $(LIBDIRREL); pwd) ifeq ($(wildcard $(LIBDIR)),) @@ -235,100 +69,41 @@ MG5AMC_COMMONLIB = mg5amc_common # First target (default goal) all.$(TAG): $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so -# Target (and build options): debug -debug: OPTFLAGS = -g -O0 -debug: all.$(TAG) - #------------------------------------------------------------------------------- # Generic target and build rules: objects from C++ compilation $(BUILDDIR)/%.o : %.cc *.h @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - $(CXX) $(CPPFLAGS) $(CXXFLAGS) -fPIC -c $< -o $@ + $(CXX) $(MG_CXXFLAGS) $(CXXFLAGS) -c $< -o $@ # Generic target and build rules: objects from CUDA compilation $(BUILDDIR)/%_cu.o : %.cc *.h @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c -x cu $< -o $@ + $(NVCC) $(MG_NVCCFLAGS) $(NVCCFLAGS) -c -x cu $< -o $@ #------------------------------------------------------------------------------- cxx_objects=$(addprefix $(BUILDDIR)/, Parameters_sm.o read_slha.o) -ifneq ($(NVCC),) +ifeq ($(AVX),cuda) +COMPILER=$(NVCC) cu_objects=$(addprefix $(BUILDDIR)/, Parameters_sm_cu.o) +else +COMPILER=$(CXX) +cu_objects= endif # Target (and build rules): common (src) library -ifneq ($(NVCC),) $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so : $(cxx_objects) $(cu_objects) - @if [ ! -d $(LIBDIR) ]; then echo "mkdir -p $(LIBDIR)"; mkdir -p $(LIBDIR); fi - $(NVCC) -shared -o $@ $(cxx_objects) $(cu_objects) $(LDFLAGS) -else -$(LIBDIR)/lib$(MG5AMC_COMMONLIB).so : $(cxx_objects) - @if [ ! -d $(LIBDIR) ]; then echo "mkdir -p $(LIBDIR)"; mkdir -p $(LIBDIR); fi - $(CXX) -shared -o $@ $(cxx_objects) $(LDFLAGS) -endif + mkdir -p $(LIBDIR) + $(COMPILER) -shared -o $@ $(cxx_objects) $(cu_objects) $(MG_LDFLAGS) $(LDFLAGS) #------------------------------------------------------------------------------- # Target: clean the builds .PHONY: clean -BUILD_DIRS := $(wildcard build.*) -NUM_BUILD_DIRS := $(words $(BUILD_DIRS)) - clean: -ifeq ($(USEBUILDDIR),1) -ifeq ($(NUM_BUILD_DIRS),1) - $(info USEBUILDDIR=1, only one src build directory found.) - rm -rf ../lib/$(BUILD_DIRS) - rm -rf $(BUILD_DIRS) -else ifeq ($(NUM_BUILD_DIRS),0) - $(error USEBUILDDIR=1, but no src build directories are found.) -else - $(error Multiple src BUILDDIR's found! Use 'cleannone', 'cleansse4', 'cleanavx2', 'clean512y','clean512z', 'cleancuda' or 'cleanall'.) -endif -else - rm -f ../lib/lib$(MG5AMC_COMMONLIB).so - rm -f $(BUILDDIR)/*.o $(BUILDDIR)/*.exe -endif - -cleanall: - @echo - rm -f ../lib/lib$(MG5AMC_COMMONLIB).so - rm -f $(BUILDDIR)/*.o $(BUILDDIR)/*.exe - @echo - rm -rf ../lib/build.* - rm -rf build.* - -# Target: clean different builds - -cleannone: - rm -rf ../lib/build.none_* - rm -rf build.none_* - -cleansse4: - rm -rf ../lib/build.sse4_* - rm -rf build.sse4_* - -cleanavx2: - rm -rf ../lib/build.avx2_* - rm -rf build.avx2_* - -clean512y: - rm -rf ../lib/build.512y_* - rm -rf build.512y_* - -clean512z: - rm -rf ../lib/build.512z_* - rm -rf build.512z_* - -cleancuda: - rm -rf ../lib/build.cuda_* - rm -rf build.cuda_* - -cleandir: - rm -f ./*.o ./*.exe - rm -f ../lib/lib$(MG5AMC_COMMONLIB).so + $(RM) -f ../lib/build.*/*.so + $(RM) -rf build.* #------------------------------------------------------------------------------- diff --git a/epochX/cudacpp/gg_ttgg.mad/src/mgOnGpuCxtypes.h b/epochX/cudacpp/gg_ttgg.mad/src/mgOnGpuCxtypes.h index ca9a9f00c0..3290d314d6 100644 --- a/epochX/cudacpp/gg_ttgg.mad/src/mgOnGpuCxtypes.h +++ b/epochX/cudacpp/gg_ttgg.mad/src/mgOnGpuCxtypes.h @@ -21,10 +21,14 @@ // Complex type in cuda: thrust or cucomplex or cxsmpl #ifdef __CUDACC__ #if defined MGONGPU_CUCXTYPE_THRUST +#ifdef __CLANG__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" // for icpx2021/clang13 (https://stackoverflow.com/a/15864661) +#endif #include +#ifdef __CLANG__ #pragma clang diagnostic pop +#endif #elif defined MGONGPU_CUCXTYPE_CUCOMPLEX #include #elif not defined MGONGPU_CUCXTYPE_CXSMPL diff --git a/epochX/cudacpp/gg_ttggg.mad/CODEGEN_mad_gg_ttggg_log.txt b/epochX/cudacpp/gg_ttggg.mad/CODEGEN_mad_gg_ttggg_log.txt index d94e7252af..748f18be44 100644 --- a/epochX/cudacpp/gg_ttggg.mad/CODEGEN_mad_gg_ttggg_log.txt +++ b/epochX/cudacpp/gg_ttggg.mad/CODEGEN_mad_gg_ttggg_log.txt @@ -50,10 +50,9 @@ Please set the 'lhapdf' variable to the (absolute) /PATH/TO/lhapdf-config (inclu Note that you can still compile and run aMC@NLO with the built-in PDFs MG5_aMC> set lhapdf /PATH/TO/lhapdf-config -Using default text editor "vi". Set another one in ./input/mg5_configuration.txt Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt -No valid web browser found. Please set in ./input/mg5_configuration.txt -import /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg.mg +Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt +import /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg.mg The import format was not given, so we guess it as command set stdout_level DEBUG set output information to level: 10 @@ -62,7 +61,7 @@ generate g g > t t~ g g g No model currently active, so we import the Standard Model INFO: load particles INFO: load vertices -DEBUG: model prefixing takes 0.005348920822143555  +DEBUG: model prefixing takes 0.0035386085510253906  INFO: Restrict model sm with file models/sm/restrict_default.dat . DEBUG: Simplifying conditional expressions  DEBUG: remove interactions: u s w+ at order: QED=1  @@ -155,7 +154,7 @@ INFO: Please specify coupling orders to bypass this step. INFO: Trying coupling order WEIGHTED<=5: WEIGTHED IS QCD+2*QED INFO: Trying process: g g > t t~ g g g WEIGHTED<=5 @1 INFO: Process has 1240 diagrams -1 processes with 1240 diagrams generated in 1.857 s +1 processes with 1240 diagrams generated in 1.316 s Total: 1 processes with 1240 diagrams output madevent ../TMPOUT/CODEGEN_mad_gg_ttggg --hel_recycling=False --vector_size=32 --me_exporter=standalone_cudacpp Load PLUGIN.CUDACPP_OUTPUT @@ -166,18 +165,18 @@ Load PLUGIN.CUDACPP_OUTPUT INFO: initialize a new directory: CODEGEN_mad_gg_ttggg INFO: remove old information in CODEGEN_mad_gg_ttggg DEBUG: Entering PLUGIN_ProcessExporter.copy_template (initialise the directory) [output.py at line 165]  -WARNING: File exists /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg  -INFO: Creating subdirectories in directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg -WARNING: File exists /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/Cards  -WARNING: File exists /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/SubProcesses  +WARNING: File exists /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg  +INFO: Creating subdirectories in directory /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg +WARNING: File exists /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/Cards  +WARNING: File exists /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/SubProcesses  INFO: Organizing processes into subprocess groups INFO: Generating Helas calls for process: g g > t t~ g g g WEIGHTED<=5 @1 INFO: Processing color information for process: g g > t t~ g g g @1 INFO: Creating files in directory P1_gg_ttxggg INFO: Computing Color-Flow optimization [15120 term] -INFO: Color-Flow passed to 1630 term in 7s. Introduce 3030 contraction +INFO: Color-Flow passed to 1630 term in 5s. Introduce 3030 contraction DEBUG: kwargs[prefix] = 0 [model_handling.py at line 1058]  -DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  +DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  INFO: Creating files in directory . FileWriter for ././CPPProcess.h FileWriter for ././CPPProcess.cc @@ -192,15 +191,15 @@ INFO: Created files CPPProcess.h and CPPProcess.cc in directory ./. DEBUG: vector, subproc_group,self.opt['vector_size'] =  32 True 32 [export_v4.py at line 1872]  INFO: Generating Feynman diagrams for Process: g g > t t~ g g g WEIGHTED<=5 @1 INFO: Finding symmetric diagrams for subprocess group gg_ttxggg -Generated helas calls for 1 subprocesses (1240 diagrams) in 6.607 s -Wrote files for 2281 helas calls in 18.169 s +Generated helas calls for 1 subprocesses (1240 diagrams) in 4.473 s +Wrote files for 2281 helas calls in 11.839 s ALOHA: aloha starts to compute helicity amplitudes ALOHA: aloha creates VVV1 routines ALOHA: aloha creates FFV1 routines ALOHA: aloha creates VVVV1 routines ALOHA: aloha creates VVVV3 routines ALOHA: aloha creates VVVV4 routines -ALOHA: aloha creates 5 routines in 0.317 s +ALOHA: aloha creates 5 routines in 0.206 s DEBUG: Entering PLUGIN_ProcessExporter.convert_model (create the model) [output.py at line 202]  ALOHA: aloha starts to compute helicity amplitudes ALOHA: aloha creates VVV1 routines @@ -208,7 +207,7 @@ ALOHA: aloha creates FFV1 routines ALOHA: aloha creates VVVV1 routines ALOHA: aloha creates VVVV3 routines ALOHA: aloha creates VVVV4 routines -ALOHA: aloha creates 10 routines in 0.308 s +ALOHA: aloha creates 10 routines in 0.199 s VVV1 VVV1 FFV1 @@ -221,45 +220,50 @@ ALOHA: aloha creates 10 routines in 0.308 s VVVV3 VVVV4 VVVV4 -FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/src/./HelAmps_sm.h -INFO: Created file HelAmps_sm.h in directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/src/. +FileWriter for /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/src/./HelAmps_sm.h +INFO: Created file HelAmps_sm.h in directory /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/src/. super_write_set_parameters_onlyfixMajorana (hardcoded=False) super_write_set_parameters_onlyfixMajorana (hardcoded=True) -FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/src/./Parameters_sm.h -FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/src/./Parameters_sm.cc +FileWriter for /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/src/./Parameters_sm.h +FileWriter for /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/src/./Parameters_sm.cc INFO: Created files Parameters_sm.h and Parameters_sm.cc in directory -INFO: /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/src/. and /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/src/. +INFO: /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/src/. and /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/src/. The option zerowidth_tchannel is modified [True] but will not be written in the configuration files. If you want to make this value the default for future session, you can run 'save options --all' -save configuration file to /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/Cards/me5_configuration.txt +save configuration file to /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/Cards/me5_configuration.txt INFO: Use Fortran compiler gfortran INFO: Use c++ compiler g++ INFO: Generate web pages -DEBUG: cd /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg; patch -p4 -i /data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common +DEBUG: cd /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg; patch -p4 -i /data/stephan/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common patching file Source/genps.inc +patching file Source/make_opts +Hunk #1 succeeded at 12 (offset -1 lines). +Hunk #2 succeeded at 70 (offset -1 lines). +Hunk #3 succeeded at 117 (offset -1 lines). +Hunk #4 succeeded at 128 (offset -1 lines). patching file Source/makefile patching file SubProcesses/makefile +patching file bin/internal/banner.py patching file bin/internal/gen_ximprove.py -Hunk #1 succeeded at 391 (offset 6 lines). patching file bin/internal/madevent_interface.py -DEBUG: cd /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/SubProcesses/P1_gg_ttxggg; patch -p6 -i /data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 +DEBUG: cd /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/SubProcesses/P1_gg_ttxggg; patch -p6 -i /data/stephan/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 patching file auto_dsig1.f patching file driver.f patching file matrix1.f -Hunk #2 succeeded at 255 (offset 112 lines). -Hunk #3 succeeded at 333 (offset 112 lines). -Hunk #4 succeeded at 361 (offset 112 lines). -Hunk #5 succeeded at 406 (offset 112 lines). +Hunk #2 succeeded at 255 (offset 96 lines). +Hunk #3 succeeded at 333 (offset 96 lines). +Hunk #4 succeeded at 361 (offset 96 lines). +Hunk #5 succeeded at 406 (offset 96 lines). DEBUG: p.returncode =  0 [output.py at line 237]  -Output to directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg done. +Output to directory /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg done. Type "launch" to generate events from this process, or see -/data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/README +/data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/README Run "open index.html" to see more information about this process. quit -real 0m28.894s -user 0m28.357s -sys 0m0.382s +real 0m19.434s +user 0m18.888s +sys 0m0.545s ************************************************************ * * * W E L C O M E to * @@ -280,12 +284,11 @@ sys 0m0.382s * Type 'help' for in-line help. * * * ************************************************************ -INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/Cards/me5_configuration.txt -INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo/input/mg5_configuration.txt -INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/Cards/me5_configuration.txt -Using default text editor "vi". Set another one in ./input/mg5_configuration.txt +INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/Cards/me5_configuration.txt +INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/mg5amcnlo/input/mg5_configuration.txt +INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/Cards/me5_configuration.txt Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt -No valid web browser found. Please set in ./input/mg5_configuration.txt +Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt treatcards run quit INFO: @@ -310,12 +313,11 @@ launch in debug mode * Type 'help' for in-line help. * * * ************************************************************ -INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/Cards/me5_configuration.txt -INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo/input/mg5_configuration.txt -INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/Cards/me5_configuration.txt -Using default text editor "vi". Set another one in ./input/mg5_configuration.txt +INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/Cards/me5_configuration.txt +INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/mg5amcnlo/input/mg5_configuration.txt +INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/Cards/me5_configuration.txt Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt -No valid web browser found. Please set in ./input/mg5_configuration.txt +Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt treatcards param quit INFO: diff --git a/epochX/cudacpp/gg_ttggg.mad/Cards/delphes_trigger.dat b/epochX/cudacpp/gg_ttggg.mad/Cards/delphes_trigger.dat deleted file mode 100644 index 0aab0677aa..0000000000 --- a/epochX/cudacpp/gg_ttggg.mad/Cards/delphes_trigger.dat +++ /dev/null @@ -1,20 +0,0 @@ -#TRIGGER CARD # DO NOT REMOVE THIS IS A TAG! - -# list of trigger algorithms -# trigger_name >> algorithm #comments -Inclusive electron >> ELEC1_PT: '29' -di-electron >> ELEC1_PT: '17' && ELEC2_PT: '17' -Inclusive Photon >> GAMMA1_PT: '80' -di-Photon >> GAMMA1_PT: '40' && GAMMA2_PT: '25' -Inclusive muon >> MUON1_PT: '19' -di-muon >> MUON1_PT: '7' && MUON2_PT: '7' -Taujet and ETmis >> TAU1_PT: '86' && ETMIS_PT: '65' -di-Taujets >> TAU1_PT: '59' && TAU2_PT: '59' -Jet and ETmis >> JET1_PT: '180' && ETMIS_PT: '123' -Taujet and electron >> TAU1_PT: '45' && ELEC1_PT: '19' -Taujet and muon >> TAU1_PT: '40' && ELEC1_PT: '15' -Inclusive b-jet >> Bjet1_PT: '237' -Inclusive 1 jet >> JET1_PT: '657' -Inclusive 3 jets >> JET1_PT: '247' && JET2_PT: '247' && JET3_PT: '247' -Inclusive 4 jets >> JET1_PT: '113' && JET2_PT: '113' && JET3_PT: '113' && JET4_PT: '113' - diff --git a/epochX/cudacpp/gg_ttggg.mad/Cards/me5_configuration.txt b/epochX/cudacpp/gg_ttggg.mad/Cards/me5_configuration.txt index cdeedc7863..22f81b5926 100644 --- a/epochX/cudacpp/gg_ttggg.mad/Cards/me5_configuration.txt +++ b/epochX/cudacpp/gg_ttggg.mad/Cards/me5_configuration.txt @@ -234,7 +234,7 @@ # pineappl = pineappl -#mg5_path = /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo +#mg5_path = /data/stephan/madgraph4gpu/MG5aMC/mg5amcnlo # MG5 MAIN DIRECTORY -#mg5_path = /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo +#mg5_path = /data/stephan/madgraph4gpu/MG5aMC/mg5amcnlo diff --git a/epochX/cudacpp/gg_ttggg.mad/Cards/plot_card.dat b/epochX/cudacpp/gg_ttggg.mad/Cards/plot_card.dat deleted file mode 100644 index 9abe1cc05e..0000000000 --- a/epochX/cudacpp/gg_ttggg.mad/Cards/plot_card.dat +++ /dev/null @@ -1,203 +0,0 @@ -#************************************************************************** -# Card for MadAnalysis * -# * -# This file is used to set the classes and options for * -# the MadAnalysis program. * -# * -# * -# Some comments about the classes * -# 1. Plots are for classes of particles. * -# 2. Each particle is identified by its PDG code. * -# 3. Classes names are arbitrary (4 symbols max, no spaces allowed). * -# 4. Particles in the same class will be ordered with the 'ordering * -# function' in the file in_func.f. * -# 5. Classes can be added/edited/removed at will, and given a name * -# that will then appear in the plots. * -# 6. A particle can be put in one class only. Putting a particle in * -# two or more classes can lead to double counting of events. * -# 7. The class name mET is missing Energy and its name is reserved. * -# If used, it must be put last in the classes list below. * -# 8. If events contain particles not belonging to an existing class, * -# a new class will automatically be generated. * -# 9. For LHCO events the PDG code 21 is assigned to a jet (not * -# b-tagged), 5 to a b-tagged jet and 12 to missing ET. * -# * -# * -# Some comments about the cuts * -# 1. In the file kin_func.f the functions on which cuts can be applied * -# are given. * -# 2. The syntax is as follows. * -# etmin 1 3 30d0 * -# means that from the first class the Et of the first three particles * -# has to be greater than 30 GeV. * -# * -# etmissmin 20d0 * -# means that there must be at least 20 GeV of missing Et * -# * -# dRmin 2 1 4 3 3d0 * -# means that the distance between the first particle in the second * -# class and the first three particles in the fourth class has to be * -# greater than 3. * -# * -# ptmax 1 3 10d0 * -# ptmax 1 2 15d0 * -# means that the maximum pt of the third particle in the first class * -# has to smaller than 10 GeV, and the first two particles of this * -# class has to be smaller than 15 GeV * -# 3. The ordering of the particles within a class can be set with the * -# 'ordering function' in the file kin_func.f. * -# 4. For all the 'min' cuts, an event will be thrown away if the particle * -# does not exist. On the other hand, for all the 'max' cuts the cut * -# will be ignored if the particle does not exist * -# (Only dRij is an exception, for which it is the other way around) * -# * -# * -# * -# Some comments about the plotting options * -# 1. In the file kin_func.f the functions can be found that can be * -# plotted. (only for off-line usage) * -# 2. With the plotting options one can set the number of plots for each * -# of these functions. * -# 3. One has to specify for each variable which particles from which * -# class are used to set the plots. Syntax: * -# et 2 4 * -# means that the transverse energy of the first four particles in the * -# second class will be plotted. * -# mij 1 3 * -# mij 2 2 * -# means that for the invariant mass plots the first three particles * -# from the first class and the first two from the second class will be * -# used to plot the invariant mass of two particles. (10 plots) * -# 4. The ordering of the particles in a class can be set with the * -# 'ordering_function'. pt, e and et are valid functions. (For off-line * -# users X1, X2 and X3 can also be used, if defined in kin_func.f.) * -# 5. Max number of plots is 200. * -# * -# * -#************************************************************************** -# Put here your list of classes -#************************************************************************** -# Do NOT put spaces before class names! -# Begin Classes # This is TAG. Do not modify this line -jet 1 -1 2 -2 3 -3 4 -4 21 # Class number 1 -b 5 -5 # Class number 2 -mET 12 -12 14 -14 16 -16 1000022 # Missing ET class, name is reserved -# End Classes # This is TAG. Do not modify this line -#************************************************************************** -ordering_function pt # orders particles in classes according to their pt -normalization xsec # histogram normalization, xsec or number (e.g. 1) -#************************************************************************** -# Put here list of minimum pt for the classes -#************************************************************************** -# Begin Minpts # This is TAG. Do not modify this line -#1 30 -#2 40 -#3 10 -# End Minpts # This is TAG. Do not modify this line -#************************************************************************** -# Cuts on plotted events -#************************************************************************** -# Modify the cuts and remove the pounds/hashes to apply those cuts -# Do NOT put spaces at the beginning of the following lines! -# Begin Cuts # This is TAG. Do not modify this line -#etmin 2 2 40d0 -#etmin 2 1 80d0 -#etmin 1 3 20d0 -#etmax 2 1 200d0 -#ptmin 3 1 0d0 -#etmissmin 20d0 -#etmissmax 80d0 -#etamax 1 1 1d0 -#etamax 2 1 2d0 -#etamin 2 2 1.5d0 -#etamin 2 1 2d0 -#mijmax 2 1 2 2 200d0 -#mijmin 2 1 2 2 100d0 -#X1min 2 1 40d0 -#X1max 2 2 50d0 -#dRijmin 2 1 2 2 0.7d0 -#dRijmax 1 3 2 2 0.7d0 -#XY1min 2 2 2 2 20d0 -#XYZA2max 2 2 2 2 4 1 5 1 40d0 -# End Cuts # This is TAG. Do not modify this line -#************************************************************************** -# Put here the required plots -#************************************************************************** -# Do NOT put spaces at the beginning of the following lines! -# Begin PlotDefs # This is TAG. Do not modify this line -pt 1 4 # plot pt for the first four particles in class 1 -pt 2 4 # plot pt for the first four particles in class 2 -pt 3 4 # plot pt for the first four particles in class 3 -pt 4 4 # plot pt for the first four particles in class 4 -pt 5 4 # etc. -pt 6 4 -pt 7 4 -#e 2 2 -y 1 4 # plot rapidity for the first four particles in class 1 -y 2 4 -y 3 4 -y 4 4 -y 5 4 -y 6 4 -y 7 4 -#eta 2 2 # plot pseudo-rapidity for the first two part in the 2nd class -#mom 4 1 -#costh 5 1 -#phi 2 2 -#delta_eta 2 2 -#delta_eta 4 1 -mij 1 4 # use the first four particles in the 1st class to plot inv. mass -mij 2 2 # use the first two particles from the second class as well -mij 3 1 # etc. -mij 4 1 -mij 5 1 -mij 6 1 -mij 7 1 -#cosij 1 2 -#cosij 2 2 -#cosij 3 1 -#cosij 4 1 -dRij 1 4 -dRij 2 2 -dRij 3 1 -dRij 4 1 -dRij 5 1 -dRij 6 1 -dRij 7 1 -#delta_phi 2 2 -#delta_phi 4 1 -#delta_phi 5 1 -#X1 2 2 # plot X1 (defined in kin_func.f) -#XYZA1 2 2 -#XYZA1 4 1 -#XYZA1 5 1 -# End PlotDefs # This is TAG. Do not modify this line -#************************************************************************** -#************************************************************************** -# Put here the plot ranges -#************************************************************************** -# Do NOT put spaces at the beginning of the following lines! -# Begin PlotRange # This is TAG. Do not modify this line -pt 10 0 500 # bin size, min value, max value -et 10 0 500 # bin size, min value, max value -etmiss 10 0 500 # bin size, min value, max value -ht 20 0 1500 -y 0.2 -5 5 # etc. -mij 20 0 1500 -dRij 0.1 0 5 -#delta_phi 0.1 0 3.1 -#X1 1 0 100 -#XYZA1 1 0 100 -# End PlotRange # This is TAG. Do not modify this line -#************************************************************************** -#************************************************************************** -# Output for plots -#************************************************************************** -# Do NOT put spaces at the beginning of the following lines! -# Begin PlotOutput # This is TAG. Do not modify this line -output topdrawer # set to topdrawer or gnuplot -plot_decayed no # plot (and cut) dec. res.? (Only for LHE events) -# End PlotOutput # This is TAG. Do not modify this line -#************************************************************************** -# -# diff --git a/epochX/cudacpp/gg_ttggg.mad/Source/DHELAS/aloha_file.inc b/epochX/cudacpp/gg_ttggg.mad/Source/DHELAS/aloha_file.inc index 1b5bf6ec54..fa0f3d86f5 100644 --- a/epochX/cudacpp/gg_ttggg.mad/Source/DHELAS/aloha_file.inc +++ b/epochX/cudacpp/gg_ttggg.mad/Source/DHELAS/aloha_file.inc @@ -1 +1 @@ -ALOHARoutine = VVV1_0.o VVV1P0_1.o FFV1_0.o FFV1_1.o FFV1_2.o FFV1P0_3.o VVVV1_0.o VVVV1P0_1.o VVVV3_0.o VVVV3P0_1.o VVVV4_0.o VVVV4P0_1.o +ALOHARoutine = FFV1P0_3.o FFV1_0.o FFV1_1.o FFV1_2.o VVV1P0_1.o VVV1_0.o VVVV1P0_1.o VVVV1_0.o VVVV3P0_1.o VVVV3_0.o VVVV4P0_1.o VVVV4_0.o diff --git a/epochX/cudacpp/gg_ttggg.mad/Source/make_opts b/epochX/cudacpp/gg_ttggg.mad/Source/make_opts index e4b87ee6ad..435bed0dc7 100644 --- a/epochX/cudacpp/gg_ttggg.mad/Source/make_opts +++ b/epochX/cudacpp/gg_ttggg.mad/Source/make_opts @@ -1,7 +1,7 @@ DEFAULT_CPP_COMPILER=g++ DEFAULT_F2PY_COMPILER=f2py3 DEFAULT_F_COMPILER=gfortran -GLOBAL_FLAG=-O3 -ffast-math -fbounds-check +GLOBAL_FLAG=-O3 -ffast-math MACFLAG= MG5AMC_VERSION=SpecifiedByMG5aMCAtRunTime PYTHIA8_PATH=NotInstalled @@ -13,31 +13,53 @@ BIASLIBDIR=../../../lib/ BIASLIBRARY=libbias.$(libext) # Rest of the makefile -ifeq ($(origin FFLAGS),undefined) -FFLAGS= -w -fPIC -#FFLAGS+= -g -fbounds-check -ffpe-trap=invalid,zero,overflow,underflow,denormal -Wall -fimplicit-none -endif -FFLAGS += $(GLOBAL_FLAG) +#=== Detect O/S and architecture (assuming uname is available, https://en.wikipedia.org/wiki/Uname) + +# Detect O/S kernel (Linux, Darwin...) +UNAME_S := $(shell uname -s) + +# Detect architecture (x86_64, ppc64le...) +UNAME_P := $(shell uname -p) + +#------------------------------------------------------------------------------- # REMOVE MACFLAG IF NOT ON MAC OR FOR F2PY -UNAME := $(shell uname -s) ifdef f2pymode MACFLAG= else -ifneq ($(UNAME), Darwin) +ifneq ($(UNAME_S), Darwin) MACFLAG= endif endif +############################################################ +# Default compiler flags +# To change optimisation level, override these as follows: +# make CXXFLAGS="-O0 -g" +# or export them as environment variables +# For debugging Fortran, one could e.g. use: +# FCFLAGS="-g -fbounds-check -ffpe-trap=invalid,zero,overflow,underflow,denormal -Wall -fimplicit-none" +############################################################ +FCFLAGS ?= $(GLOBAL_FLAG) -fbounds-check +CXXFLAGS ?= $(GLOBAL_FLAG) -DNDEBUG +NVCCFLAGS ?= $(GLOBAL_FLAG) -DNDEBUG -use_fast_math -lineinfo +LDFLAGS ?= $(STDLIB) -ifeq ($(origin CXXFLAGS),undefined) -CXXFLAGS= -O $(STDLIB_FLAG) $(MACFLAG) +ifneq ($(FFLAGS),) +# Madgraph used to use FFLAGS, so the user probably tries to change the flags specifically for madgraph: +FCFLAGS = $(FFLAGS) endif -ifeq ($(origin CFLAGS),undefined) -CFLAGS= -O $(STDLIB_FLAG) $(MACFLAG) +# Madgraph-specific flags: +WARNFLAGS = -Wall -Wshadow -Wextra +ifeq (,$(findstring -std=,$(CXXFLAGS))) +CXXSTANDARD= -std=c++17 endif +MG_FCFLAGS += -fPIC -w +MG_CXXFLAGS += -fPIC $(CXXSTANDARD) $(WARNFLAGS) $(MACFLAG) +MG_NVCCFLAGS += -fPIC $(CXXSTANDARD) --forward-unknown-to-host-compiler $(WARNFLAGS) +MG_LDFLAGS += $(MACFLAG) # Set FC unless it's defined by an environment variable ifeq ($(origin FC),default) @@ -49,45 +71,40 @@ endif # Increase the number of allowed charcters in a Fortran line ifeq ($(FC), ftn) -FFLAGS+= -extend-source # for ifort type of compiler +MG_FCFLAGS += -extend-source # for ifort type of compiler else VERS="$(shell $(FC) --version | grep ifort -i)" ifeq ($(VERS), "") -FFLAGS+= -ffixed-line-length-132 +MG_FCFLAGS += -ffixed-line-length-132 else -FFLAGS+= -extend-source # for ifort type of compiler +MG_FCFLAGS += -extend-source # for ifort type of compiler endif endif -UNAME := $(shell uname -s) -ifeq ($(origin LDFLAGS), undefined) -LDFLAGS=$(STDLIB) $(MACFLAG) -endif - # Options: dynamic, lhapdf # Option dynamic -ifeq ($(UNAME), Darwin) +ifeq ($(UNAME_S), Darwin) dylibext=dylib else dylibext=so endif ifdef dynamic -ifeq ($(UNAME), Darwin) +ifeq ($(UNAME_S), Darwin) libext=dylib -FFLAGS+= -fno-common -LDFLAGS += -bundle +MG_FCFLAGS += -fno-common +MG_LDFLAGS += -bundle define CREATELIB $(FC) -dynamiclib -undefined dynamic_lookup -o $(1) $(2) endef else libext=so -FFLAGS+= -fPIC -LDFLAGS += -shared +MG_FCFLAGS += -fPIC +MG_LDFLAGS += -shared define CREATELIB -$(FC) $(FFLAGS) $(LDFLAGS) -o $(1) $(2) +$(FC) $(MG_FCFLAGS) $(FCFLAGS) $(MG_LDFLAGS) $(LDFLAGS) -o $(1) $(2) endef endif else @@ -101,17 +118,9 @@ endif # Option lhapdf ifneq ($(lhapdf),) -CXXFLAGS += $(shell $(lhapdf) --cppflags) +MG_CXXFLAGS += $(shell $(lhapdf) --cppflags) alfas_functions=alfas_functions_lhapdf llhapdf+= $(shell $(lhapdf) --cflags --libs) -lLHAPDF -# check if we need to activate c++11 (for lhapdf6.2) -ifeq ($(origin CXX),default) -ifeq ($lhapdfversion$lhapdfsubversion,62) -CXX=$(DEFAULT_CPP_COMPILER) -std=c++11 -else -CXX=$(DEFAULT_CPP_COMPILER) -endif -endif else alfas_functions=alfas_functions llhapdf= @@ -120,4 +129,207 @@ endif # Helper function to check MG5 version define CHECK_MG5AMC_VERSION python -c 'import re; from distutils.version import StrictVersion; print StrictVersion("$(MG5AMC_VERSION)") >= StrictVersion("$(1)") if re.match("^[\d\.]+$$","$(MG5AMC_VERSION)") else True;' -endef \ No newline at end of file +endef + +#------------------------------------------------------------------------------- + +# Set special cases for non-gcc/clang builds +# AVX below gets overridden from outside in architecture-specific builds +AVX ?= none +# [NB MGONGPU_PVW512 is needed because "-mprefer-vector-width=256" is not exposed in a macro] +# [See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96476] +$(info AVX=$(AVX)) +ifeq ($(UNAME_P),arm) + ifeq ($(AVX),sse4) + override AVXFLAGS = -D__SSE4_2__ # ARM NEON with 128 width (Q/quadword registers) + endif +else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 + ifeq ($(AVX),none) + override AVXFLAGS = -mno-sse3 # no SIMD + else ifeq ($(AVX),sse4) + override AVXFLAGS = -mno-avx # SSE4.2 with 128 width (xmm registers) + else ifeq ($(AVX),avx2) + override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] + else ifeq ($(AVX),512y) + override AVXFLAGS = -march=skylake -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] + else ifeq ($(AVX),512z) + override AVXFLAGS = -march=skylake -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) + else + $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) + endif +endif + +# For the moment, use AVXFLAGS everywhere: eventually, use them only in encapsulated implementations? +MG_CXXFLAGS+= $(AVXFLAGS) + +#------------------------------------------------------------------------------- + +#=== Configure the CUDA compiler if available + +# If CXX is not a single word (example "clang++ --gcc-toolchain...") then disable CUDA builds (issue #505) +# This is because it is impossible to pass this to "CUFLAGS += -ccbin " below +ifneq ($(words $(subst ccache ,,$(CXX))),1) # allow at most "CXX=ccache " from outside + $(warning CUDA builds are not supported for multi-word CXX "$(CXX)") + override CUDA_HOME=disabled +endif + +# If CUDA_HOME is not set, try to set it from the location of nvcc +ifndef CUDA_HOME + CUDA_HOME = $(patsubst %bin/nvcc,%,$(shell which nvcc 2>/dev/null)) + $(info CUDA_HOME="$(CUDA_HOME)") +endif + +# Set NVCC as $(CUDA_HOME)/bin/nvcc if it exists +ifneq ($(wildcard $(CUDA_HOME)/bin/nvcc),) + NVCC = $(CUDA_HOME)/bin/nvcc + USE_NVTX ?=-DUSE_NVTX + # See https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html + # See https://arnon.dk/matching-sm-architectures-arch-and-gencode-for-various-nvidia-cards/ + # Default: use compute capability 70 (Volta architecture), and embed PTX to support later architectures, too. + # Set MADGRAPH_CUDA_ARCHITECTURE to the desired value to change the default. + # Build for multiple architectures using a space-separated list, e.g. MADGRAPH_CUDA_ARCHITECTURE="70 80" + MADGRAPH_CUDA_ARCHITECTURE ?= 70 + # Generate PTX for the first architecture: + CUARCHFLAGS := --generate-code arch=compute_$(firstword $(MADGRAPH_CUDA_ARCHITECTURE)),code=compute_$(firstword $(MADGRAPH_CUDA_ARCHITECTURE)) + # Generate device code for all architectures: + CUARCHFLAGS += $(foreach arch,$(MADGRAPH_CUDA_ARCHITECTURE), --generate-code arch=compute_$(arch),code=sm_$(arch)) + + CUINC = -I$(CUDA_HOME)/include/ + CURANDLIBFLAGS = -L$(CUDA_HOME)/lib64/ -lcurand # NB: -lcuda is not needed here! + MG_LDFLAGS += $(CURANDLIBFLAGS) + MG_NVCCFLAGS += $(CUINC) $(USE_NVTX) $(CUARCHFLAGS) + +else ifeq ($(AVX),cuda) + $(error nvcc is not visible in PATH. Either add it to PATH or export CUDA_HOME to compile with cuda) + ifeq ($(AVX),cuda) + $(error Cannot compile for cuda without NVCC) + endif +endif + +# Set the host C++ compiler for nvcc via "-ccbin " +# (NB issue #505: this must be a single word, "clang++ --gcc-toolchain..." is not supported) +MG_NVCCFLAGS += -ccbin $(shell which $(subst ccache ,,$(CXX))) + +# Allow newer (unsupported) C++ compilers with older versions of CUDA if ALLOW_UNSUPPORTED_COMPILER_IN_CUDA is set (#504) +ifneq ($(origin ALLOW_UNSUPPORTED_COMPILER_IN_CUDA),undefined) +MG_NVCCFLAGS += -allow-unsupported-compiler +endif + +#------------------------------------------------------------------------------- + +#=== Configure ccache for C++ and CUDA builds + +# Enable ccache if USECCACHE=1 +ifeq ($(USECCACHE)$(shell echo $(CXX) | grep ccache),1) + override CXX:=ccache $(CXX) +endif + +ifneq ($(NVCC),) + ifeq ($(USECCACHE)$(shell echo $(NVCC) | grep ccache),1) + override NVCC:=ccache $(NVCC) + endif +endif + +#------------------------------------------------------------------------------- + +#=== Configure PowerPC-specific compiler flags for C++ and CUDA + +# PowerPC-specific CXX / CUDA compiler flags (being reviewed) +ifeq ($(UNAME_P),ppc64le) + MG_CXXFLAGS+= -mcpu=power9 -mtune=power9 # gains ~2-3% both for none and sse4 + MG_NVCCFLAGS+= -Xcompiler -mno-float128 + + ifeq ($(AVX),sse4) + override AVXFLAGS = -D__SSE4_2__ # Power9 VSX with 128 width (VSR registers) + endif +endif + +#------------------------------------------------------------------------------- +#=== Apple-specific compiler/linker options + +# Add -std=c++17 explicitly to avoid build errors on macOS +# Add -mmacosx-version-min=11.3 to avoid "ld: warning: object file was built for newer macOS version than being linked" +ifneq ($(shell $(CXX) --version | egrep '^Apple clang'),) +MG_CXXFLAGS += -std=c++17 -mmacosx-version-min=11.3 +endif + +ifeq ($(UNAME_S),Darwin) +STDLIB = -lc++ # avoid 'Undefined symbols' for chrono::steady_clock on macOS (checked with otool -L libmg5amc_gg_ttx_cpp.so) +MG_LDFLAGS += -mmacosx-version-min=11.3 # avoid "ld: warning: object file was built for newer macOS version than being linked" +else +MG_LDFLAGS += -Xlinker --no-relax # avoid 'failed to convert GOTPCREL relocation' error #458 (not supported on macOS) +endif + +#------------------------------------------------------------------------------- + +#=== C++/CUDA-specific flags for floating-point types and random generators to use + +# Set the default FPTYPE (floating point type) choice +FPTYPE ?= m + +# Set the default HELINL (inline helicities?) choice +HELINL ?= 0 + +# Set the default HRDCOD (hardcode cIPD physics parameters?) choice +HRDCOD ?= 0 + +# Set the default RNDGEN (random number generator) choice +ifeq ($(NVCC),) + RNDGEN ?= hasNoCurand +else + RNDGEN ?= hasCurand +endif + +# Export AVX, FPTYPE, HELINL, HRDCOD, RNDGEN, OMPFLAGS so sub-makes don't go back to the defaults +export AVX +export AVXFLAGS +export FPTYPE +export HELINL +export HRDCOD +export RNDGEN + +#=== Set the CUDA/C++ compiler flags appropriate to user-defined choices of AVX, FPTYPE, HELINL, HRDCOD, RNDGEN + +# Set the build flags appropriate to each FPTYPE choice (example: "make FPTYPE=f") +# $(info FPTYPE=$(FPTYPE)) +ifeq ($(FPTYPE),d) + COMMONFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_DOUBLE +else ifeq ($(FPTYPE),f) + COMMONFLAGS += -DMGONGPU_FPTYPE_FLOAT -DMGONGPU_FPTYPE2_FLOAT +else ifeq ($(FPTYPE),m) + COMMONFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_FLOAT +else + $(error Unknown FPTYPE='$(FPTYPE)': only 'd', 'f' and 'm' are supported) +endif + +# Set the build flags appropriate to each HELINL choice (example: "make HELINL=1") +# $(info HELINL=$(HELINL)) +ifeq ($(HELINL),1) + COMMONFLAGS += -DMGONGPU_INLINE_HELAMPS +else ifneq ($(HELINL),0) + $(error Unknown HELINL='$(HELINL)': only '0' and '1' are supported) +endif + +# Set the build flags appropriate to each HRDCOD choice (example: "make HRDCOD=1") +# $(info HRDCOD=$(HRDCOD)) +ifeq ($(HRDCOD),1) + COMMONFLAGS += -DMGONGPU_HARDCODE_PARAM +else ifneq ($(HRDCOD),0) + $(error Unknown HRDCOD='$(HRDCOD)': only '0' and '1' are supported) +endif + +# Set the build flags appropriate to each RNDGEN choice (example: "make RNDGEN=hasNoCurand") +$(info RNDGEN=$(RNDGEN)) +ifeq ($(RNDGEN),hasNoCurand) + override CXXFLAGSCURAND = -DMGONGPU_HAS_NO_CURAND + override CURANDLIBFLAGS = +else ifeq ($(RNDGEN),hasCurand) + CXXFLAGSCURAND = $(CUINC) +else + $(error Unknown RNDGEN='$(RNDGEN)': only 'hasCurand' and 'hasNoCurand' are supported) +endif + +MG_CXXFLAGS += $(COMMONFLAGS) +MG_NVCCFLAGS += $(COMMONFLAGS) + +#------------------------------------------------------------------------------- diff --git a/epochX/cudacpp/gg_ttggg.mad/Source/makefile b/epochX/cudacpp/gg_ttggg.mad/Source/makefile index 00c73099a0..407b1b753e 100644 --- a/epochX/cudacpp/gg_ttggg.mad/Source/makefile +++ b/epochX/cudacpp/gg_ttggg.mad/Source/makefile @@ -10,8 +10,8 @@ include make_opts # Source files -PROCESS= hfill.o matrix.o myamp.o -DSAMPLE = dsample.o ranmar.o DiscreteSampler.o StringCast.o +PROCESS = hfill.o matrix.o myamp.o +DSAMPLE = dsample.o ranmar.o DiscreteSampler.o StringCast.o HBOOK = hfill.o hcurve.o hbook1.o hbook2.o GENERIC = $(alfas_functions).o transpole.o invarients.o hfill.o pawgraphs.o ran1.o \ rw_events.o rw_routines.o kin_functions.o open_file.o basecode.o setrun.o \ @@ -22,7 +22,7 @@ GENSUDGRID = gensudgrid.o is-sud.o setrun_gen.o rw_routines.o open_file.o # Locally compiled libraries -LIBRARIES=$(LIBDIR)libdsample.$(libext) $(LIBDIR)libgeneric.$(libext) +LIBRARIES=$(LIBDIR)libdsample.$(libext) $(LIBDIR)libgeneric.$(libext) # Binaries @@ -32,6 +32,9 @@ BINARIES = $(BINDIR)gen_ximprove $(BINDIR)gensudgrid $(BINDIR)combine_runs all: $(LIBRARIES) $(LIBDIR)libdhelas.$(libext) $(LIBDIR)libpdf.$(libext) $(LIBDIR)libgammaUPC.$(libext) $(LIBDIR)libmodel.$(libext) $(LIBDIR)libcernlib.$(libext) $(LIBDIR)libbias.$(libext) +%.o: %.f *.inc + $(FC) -I. $(MG_FCFLAGS) $(FCFLAGS) -c $< -o $@ + # Libraries $(LIBDIR)libdsample.$(libext): $(DSAMPLE) @@ -39,36 +42,35 @@ $(LIBDIR)libdsample.$(libext): $(DSAMPLE) $(LIBDIR)libgeneric.$(libext): $(GENERIC) $(call CREATELIB, $@, $^) $(LIBDIR)libdhelas.$(libext): DHELAS - cd DHELAS; make; cd .. + $(MAKE) -C $< FFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" FCFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" $(LIBDIR)libpdf.$(libext): PDF make_opts - cd PDF; make; cd .. + $(MAKE) -C $< FFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" FCFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" ifneq (,$(filter edff chff, $(pdlabel1) $(pdlabel2))) $(LIBDIR)libgammaUPC.$(libext): PDF/gammaUPC - cd PDF/gammaUPC; make ; cd ../../ + $(MAKE) -C $< FFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" FCFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" else $(LIBDIR)libgammaUPC.$(libext): PDF/gammaUPC - cd PDF/gammaUPC; make -f makefile_dummy; cd ../../ -endif + $(MAKE) -C $< -f makefile_dummy FFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" FCFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" +endif $(LIBDIR)libcernlib.$(libext): CERNLIB - cd CERNLIB; make; cd .. + $(MAKE) -C $< FFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" FCFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" # The bias library is here the dummy by default; compilation of other ones specified in the run_card will be done by MG5aMC directly. $(LIBDIR)libbias.$(libext): BIAS/dummy - cd BIAS/dummy; make; cd ../../ + $(MAKE) -C $< FFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" FCFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" $(LIBDIR)libmodel.$(libext): MODEL param_card.inc - cd MODEL; make + $(MAKE) -C $< FFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" FCFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" param_card.inc: ../Cards/param_card.dat ../bin/madevent treatcards param + touch $@ # madevent doesn't update the time stamp if there's nothing to do -$(BINDIR)gen_ximprove: gen_ximprove.o ranmar.o rw_routines.o open_file.o - $(FC) $(LDFLAGS) -o $@ $^ -#$(BINDIR)combine_events: $(COMBINE) $(LIBDIR)libmodel.$(libext) $(LIBDIR)libpdf.$(libext) $(LIBDIR)libgammaUPC.$(libext) run_card.inc $(LIBDIR)libbias.$(libext) -# $(FC) -o $@ $(COMBINE) -L$(LIBDIR) -lmodel -lpdf -lgammaUPC $(llhapdf) $(LDFLAGS) -lbias +$(BINDIR)gen_ximprove: gen_ximprove.o ranmar.o rw_routines.o open_file.o + $(FC) $(MG_LDFLAGS) $(LDFLAGS) -o $@ $^ $(BINDIR)gensudgrid: $(GENSUDGRID) $(LIBDIR)libpdf.$(libext) $(LIBDIR)libgammaUPC.$(libext) $(LIBDIR)libcernlib.$(libext) - $(FC) -o $@ $(GENSUDGRID) -L$(LIBDIR) -lmodel -lpdf -lgammaUPC -lcernlib $(llhapdf) $(LDFLAGS) + $(FC) -o $@ $(GENSUDGRID) -L$(LIBDIR) -lmodel -lpdf -lgammaUPC -lcernlib $(llhapdf) $(MG_LDFLAGS) $(LDFLAGS) # Dependencies @@ -85,6 +87,7 @@ rw_events.o: rw_events.f run_config.inc run_card.inc: ../Cards/run_card.dat ../bin/madevent treatcards run + touch $@ # madevent doesn't update the time stamp if there's nothing to do clean4pdf: rm -f ../lib/libpdf.$(libext) @@ -120,7 +123,7 @@ $(LIBDIR)libiregi.a: $(IREGIDIR) cd $(IREGIDIR); make ln -sf ../Source/$(IREGIDIR)libiregi.a $(LIBDIR)libiregi.a -cleanSource: +clean: $(RM) *.o $(LIBRARIES) $(BINARIES) cd PDF; make clean; cd .. cd PDF/gammaUPC; make clean; cd ../../ @@ -132,11 +135,3 @@ cleanSource: cd BIAS/ptj_bias; make clean; cd ../.. if [ -d $(CUTTOOLSDIR) ]; then cd $(CUTTOOLSDIR); make clean; cd ..; fi if [ -d $(IREGIDIR) ]; then cd $(IREGIDIR); make clean; cd ..; fi - -clean: cleanSource - for i in `ls -d ../SubProcesses/P*`; do cd $$i; make clean; cd -; done; - -cleanavx: - for i in `ls -d ../SubProcesses/P*`; do cd $$i; make cleanavxs; cd -; done; -cleanall: cleanSource # THIS IS THE ONE - for i in `ls -d ../SubProcesses/P*`; do cd $$i; make cleanavxs; cd -; done; diff --git a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/Bridge.h b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/Bridge.h index bf8b5e024d..c263f39a62 100644 --- a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/Bridge.h +++ b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/Bridge.h @@ -236,7 +236,7 @@ namespace mg5amcCpu #ifdef __CUDACC__ if( ( m_nevt < s_gputhreadsmin ) || ( m_nevt % s_gputhreadsmin != 0 ) ) throw std::runtime_error( "Bridge constructor: nevt should be a multiple of " + std::to_string( s_gputhreadsmin ) ); - while( m_nevt != m_gpublocks * m_gputhreads ) + while( m_nevt != static_cast( m_gpublocks * m_gputhreads ) ) { m_gputhreads /= 2; if( m_gputhreads < s_gputhreadsmin ) @@ -266,7 +266,7 @@ namespace mg5amcCpu template void Bridge::set_gpugrid( const int gpublocks, const int gputhreads ) { - if( m_nevt != gpublocks * gputhreads ) + if( m_nevt != static_cast( gpublocks * gputhreads ) ) throw std::runtime_error( "Bridge: gpublocks*gputhreads must equal m_nevt in set_gpugrid" ); m_gpublocks = gpublocks; m_gputhreads = gputhreads; diff --git a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/MadgraphTest.h b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/MadgraphTest.h index ef40624c88..b0f2250c25 100644 --- a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/MadgraphTest.h +++ b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/MadgraphTest.h @@ -199,10 +199,6 @@ class MadgraphTest : public testing::TestWithParam } }; -// Since we link both the CPU-only and GPU tests into the same executable, we prevent -// a multiply defined symbol by only compiling this in the non-CUDA phase: -#ifndef __CUDACC__ - /// Compare momenta and matrix elements. /// This uses an implementation of TestDriverBase to run a madgraph workflow, /// and compares momenta and matrix elements with a reference file. @@ -307,6 +303,4 @@ TEST_P( MadgraphTest, CompareMomentaAndME ) } } -#endif // __CUDACC__ - #endif /* MADGRAPHTEST_H_ */ diff --git a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/MatrixElementKernels.cc b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/MatrixElementKernels.cc index 74b5239ebf..2d6f27cd5d 100644 --- a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/MatrixElementKernels.cc +++ b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/MatrixElementKernels.cc @@ -196,6 +196,9 @@ namespace mg5amcGpu void MatrixElementKernelDevice::setGrid( const int gpublocks, const int gputhreads ) { + m_gpublocks = gpublocks; + m_gputhreads = gputhreads; + if( m_gpublocks == 0 ) throw std::runtime_error( "MatrixElementKernelDevice: gpublocks must be > 0 in setGrid" ); if( m_gputhreads == 0 ) throw std::runtime_error( "MatrixElementKernelDevice: gputhreads must be > 0 in setGrid" ); if( this->nevt() != m_gpublocks * m_gputhreads ) throw std::runtime_error( "MatrixElementKernelDevice: nevt mismatch in setGrid" ); diff --git a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/P1_gg_ttxggg/check_sa.cc b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/P1_gg_ttxggg/check_sa.cc index 3fbf0ffbee..07b7304b17 100644 --- a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/P1_gg_ttxggg/check_sa.cc +++ b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/P1_gg_ttxggg/check_sa.cc @@ -81,7 +81,7 @@ namespace mg5amcGpu namespace mg5amcCpu #endif { - inline void FPEhandler( int sig ) + inline void FPEhandler( int ) { #ifdef __CUDACC__ std::cerr << "Floating Point Exception (GPU)" << std::endl; diff --git a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/P1_gg_ttxggg/counters.cc b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/P1_gg_ttxggg/counters.cc index 3bbdec9387..cf875e8be4 100644 --- a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/P1_gg_ttxggg/counters.cc +++ b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/P1_gg_ttxggg/counters.cc @@ -32,6 +32,8 @@ extern "C" case +0: return "CudaCpp"; break; default: assert( false ); break; } + + return 0; } static mgOnGpu::Timer program_timer; diff --git a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/cudacpp.mk b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/cudacpp.mk index 509307506b..a522ddb335 100644 --- a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/cudacpp.mk @@ -1,56 +1,41 @@ # Copyright (C) 2020-2023 CERN and UCLouvain. # Licensed under the GNU Lesser General Public License (version 3 or later). # Created by: S. Roiser (Feb 2020) for the MG5aMC CUDACPP plugin. -# Further modified by: O. Mattelaer, S. Roiser, A. Valassi (2020-2023) for the MG5aMC CUDACPP plugin. - -#=== Determine the name of this makefile (https://ftp.gnu.org/old-gnu/Manuals/make-3.80/html_node/make_17.html) -#=== NB: use ':=' to ensure that the value of CUDACPP_MAKEFILE is not modified further down after including make_opts -#=== NB: use 'override' to ensure that the value can not be modified from the outside -override CUDACPP_MAKEFILE := $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)) -###$(info CUDACPP_MAKEFILE='$(CUDACPP_MAKEFILE)') - -#=== NB: different names (e.g. cudacpp.mk and cudacpp_src.mk) are used in the Subprocess and src directories -override CUDACPP_SRC_MAKEFILE = cudacpp_src.mk - -#------------------------------------------------------------------------------- - -#=== Use bash in the Makefile (https://www.gnu.org/software/make/manual/html_node/Choosing-the-Shell.html) - -SHELL := /bin/bash - -#------------------------------------------------------------------------------- - -#=== Detect O/S and architecture (assuming uname is available, https://en.wikipedia.org/wiki/Uname) - -# Detect O/S kernel (Linux, Darwin...) -UNAME_S := $(shell uname -s) -###$(info UNAME_S='$(UNAME_S)') - -# Detect architecture (x86_64, ppc64le...) -UNAME_P := $(shell uname -p) -###$(info UNAME_P='$(UNAME_P)') - -#------------------------------------------------------------------------------- - -#=== Include the common MG5aMC Makefile options - -# OM: this is crucial for MG5aMC flag consistency/documentation -# AV: temporarely comment this out because it breaks cudacpp builds -ifneq ($(wildcard ../../Source/make_opts),) -include ../../Source/make_opts -endif +# Further modified by: S. Hageboeck, J. Teig, O. Mattelaer, S. Roiser, A. Valassi (2020-2023) for the MG5aMC CUDACPP plugin. + +# This makefile extends the Fortran makefile called "makefile" + +CUDACPP_SRC_MAKEFILE = cudacpp_src.mk + +# Self-invocation with adapted flags: +cppnative: $(SOURCEDIR_GUARD) $(PROCESS) + $(MAKE) AVX=native AVXFLAGS="-march=native" cppbuild +cppnone: $(SOURCEDIR_GUARD) $(PROCESS) + $(MAKE) AVX=none AVXFLAGS= cppbuild +cppsse4: $(SOURCEDIR_GUARD) $(PROCESS) + $(MAKE) AVX=sse4 AVXFLAGS=-march=nehalem cppbuild +cppavx2: $(SOURCEDIR_GUARD) $(PROCESS) + $(MAKE) AVX=avx2 AVXFLAGS=-march=haswell cppbuild +cppavx512y: $(SOURCEDIR_GUARD) $(PROCESS) + $(MAKE) AVX=512y AVXFLAGS="-march=skylake-avx512 -mprefer-vector-width=256" cppbuild +cppavx512z: $(SOURCEDIR_GUARD) $(PROCESS) + $(MAKE) AVX=512z AVXFLAGS="-march=skylake-avx512 -DMGONGPU_PVW512" cppbuild +cuda: $(SOURCEDIR_GUARD) $(PROCESS) + $(MAKE) AVX=cuda cudabuild #------------------------------------------------------------------------------- #=== Configure common compiler flags for C++ and CUDA +# NB: The base flags are defined in the fortran "makefile" + +# Include directories +INCFLAGS = -I. -I../../src -INCFLAGS = -I. -OPTFLAGS = -O3 # this ends up in CUFLAGS too (should it?), cannot add -Ofast or -ffast-math here +MG_CXXFLAGS += $(INCFLAGS) +MG_NVCCFLAGS += $(INCFLAGS) # Dependency on src directory -MG5AMC_COMMONLIB = mg5amc_common -LIBFLAGS = -L$(LIBDIR) -l$(MG5AMC_COMMONLIB) -INCFLAGS += -I../../src +MG5AMC_COMMONLIB = mg5amc_common # Compiler-specific googletest build directory (#125 and #738) ifneq ($(shell $(CXX) --version | grep '^Intel(R) oneAPI DPC++/C++ Compiler'),) @@ -99,356 +84,42 @@ endif #------------------------------------------------------------------------------- -#=== Configure the C++ compiler - -CXXFLAGS = $(OPTFLAGS) -std=c++17 $(INCFLAGS) -Wall -Wshadow -Wextra -ifeq ($(shell $(CXX) --version | grep ^nvc++),) -CXXFLAGS += -ffast-math # see issue #117 -endif -###CXXFLAGS+= -Ofast # performance is not different from --fast-math -###CXXFLAGS+= -g # FOR DEBUGGING ONLY - -# Optionally add debug flags to display the full list of flags (eg on Darwin) -###CXXFLAGS+= -v - -# Note: AR, CXX and FC are implicitly defined if not set externally -# See https://www.gnu.org/software/make/manual/html_node/Implicit-Variables.html - -# Add -mmacosx-version-min=11.3 to avoid "ld: warning: object file was built for newer macOS version than being linked" -ifneq ($(shell $(CXX) --version | egrep '^Apple clang'),) -CXXFLAGS += -mmacosx-version-min=11.3 -endif - -#------------------------------------------------------------------------------- - -#=== Configure the CUDA compiler - -# If CXX is not a single word (example "clang++ --gcc-toolchain...") then disable CUDA builds (issue #505) -# This is because it is impossible to pass this to "CUFLAGS += -ccbin " below -ifneq ($(words $(subst ccache ,,$(CXX))),1) # allow at most "CXX=ccache " from outside - $(warning CUDA builds are not supported for multi-word CXX "$(CXX)") - override CUDA_HOME=disabled -endif - -# If CUDA_HOME is not set, try to set it from the location of nvcc -ifndef CUDA_HOME - CUDA_HOME = $(patsubst %bin/nvcc,%,$(shell which nvcc 2>/dev/null)) - $(warning CUDA_HOME was not set: using "$(CUDA_HOME)") -endif - -# Set NVCC as $(CUDA_HOME)/bin/nvcc if it exists -ifneq ($(wildcard $(CUDA_HOME)/bin/nvcc),) - NVCC = $(CUDA_HOME)/bin/nvcc - USE_NVTX ?=-DUSE_NVTX - # See https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html - # See https://arnon.dk/matching-sm-architectures-arch-and-gencode-for-various-nvidia-cards/ - # Default: use compute capability 70 for V100 (CERN lxbatch, CERN itscrd, Juwels Cluster). - # Embed device code for 70, and PTX for 70+. - # Export MADGRAPH_CUDA_ARCHITECTURE (comma-separated list) to use another value or list of values (see #533). - # Examples: use 60 for P100 (Piz Daint), 80 for A100 (Juwels Booster, NVidia raplab/Curiosity). - MADGRAPH_CUDA_ARCHITECTURE ?= 70 - ###CUARCHFLAGS = -gencode arch=compute_$(MADGRAPH_CUDA_ARCHITECTURE),code=compute_$(MADGRAPH_CUDA_ARCHITECTURE) -gencode arch=compute_$(MADGRAPH_CUDA_ARCHITECTURE),code=sm_$(MADGRAPH_CUDA_ARCHITECTURE) # Older implementation (AV): go back to this one for multi-GPU support #533 - ###CUARCHFLAGS = --gpu-architecture=compute_$(MADGRAPH_CUDA_ARCHITECTURE) --gpu-code=sm_$(MADGRAPH_CUDA_ARCHITECTURE),compute_$(MADGRAPH_CUDA_ARCHITECTURE) # Newer implementation (SH): cannot use this as-is for multi-GPU support #533 - comma:=, - CUARCHFLAGS = $(foreach arch,$(subst $(comma), ,$(MADGRAPH_CUDA_ARCHITECTURE)),-gencode arch=compute_$(arch),code=compute_$(arch) -gencode arch=compute_$(arch),code=sm_$(arch)) - CUINC = -I$(CUDA_HOME)/include/ - ifeq ($(RNDGEN),hasNoCurand) - CURANDLIBFLAGS= - else - CURANDLIBFLAGS = -L$(CUDA_HOME)/lib64/ -lcurand # NB: -lcuda is not needed here! - endif - CUOPTFLAGS = -lineinfo - CUFLAGS = $(foreach opt, $(OPTFLAGS), -Xcompiler $(opt)) $(CUOPTFLAGS) $(INCFLAGS) $(CUINC) $(USE_NVTX) $(CUARCHFLAGS) -use_fast_math - ###CUFLAGS += -Xcompiler -Wall -Xcompiler -Wextra -Xcompiler -Wshadow - ###NVCC_VERSION = $(shell $(NVCC) --version | grep 'Cuda compilation tools' | cut -d' ' -f5 | cut -d, -f1) - CUFLAGS += -std=c++17 # need CUDA >= 11.2 (see #333): this is enforced in mgOnGpuConfig.h - # Without -maxrregcount: baseline throughput: 6.5E8 (16384 32 12) up to 7.3E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 160 # improves throughput: 6.9E8 (16384 32 12) up to 7.7E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 128 # improves throughput: 7.3E8 (16384 32 12) up to 7.6E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 96 # degrades throughput: 4.1E8 (16384 32 12) up to 4.5E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 64 # degrades throughput: 1.7E8 (16384 32 12) flat at 1.7E8 (65536 128 12) -else ifneq ($(origin REQUIRE_CUDA),undefined) - # If REQUIRE_CUDA is set but no cuda is found, stop here (e.g. for CI tests on GPU #443) - $(error No cuda installation found (set CUDA_HOME or make nvcc visible in PATH)) -else - # No cuda. Switch cuda compilation off and go to common random numbers in C++ - $(warning CUDA_HOME is not set or is invalid: export CUDA_HOME to compile with cuda) - override NVCC= - override USE_NVTX= - override CUINC= - override CURANDLIBFLAGS= -endif -export NVCC -export CUFLAGS - -# Set the host C++ compiler for nvcc via "-ccbin " -# (NB issue #505: this must be a single word, "clang++ --gcc-toolchain..." is not supported) -CUFLAGS += -ccbin $(shell which $(subst ccache ,,$(CXX))) - -# Allow newer (unsupported) C++ compilers with older versions of CUDA if ALLOW_UNSUPPORTED_COMPILER_IN_CUDA is set (#504) -ifneq ($(origin ALLOW_UNSUPPORTED_COMPILER_IN_CUDA),undefined) -CUFLAGS += -allow-unsupported-compiler -endif - -#------------------------------------------------------------------------------- - -#=== Configure ccache for C++ and CUDA builds - -# Enable ccache if USECCACHE=1 -ifeq ($(USECCACHE)$(shell echo $(CXX) | grep ccache),1) - override CXX:=ccache $(CXX) -endif -#ifeq ($(USECCACHE)$(shell echo $(AR) | grep ccache),1) -# override AR:=ccache $(AR) -#endif -ifneq ($(NVCC),) - ifeq ($(USECCACHE)$(shell echo $(NVCC) | grep ccache),1) - override NVCC:=ccache $(NVCC) - endif -endif - -#------------------------------------------------------------------------------- - -#=== Configure PowerPC-specific compiler flags for C++ and CUDA - -# PowerPC-specific CXX compiler flags (being reviewed) -ifeq ($(UNAME_P),ppc64le) - CXXFLAGS+= -mcpu=power9 -mtune=power9 # gains ~2-3% both for none and sse4 - # Throughput references without the extra flags below: none=1.41-1.42E6, sse4=2.15-2.19E6 - ###CXXFLAGS+= -DNO_WARN_X86_INTRINSICS # no change - ###CXXFLAGS+= -fpeel-loops # no change - ###CXXFLAGS+= -funroll-loops # gains ~1% for none, loses ~1% for sse4 - ###CXXFLAGS+= -ftree-vectorize # no change - ###CXXFLAGS+= -flto # would increase to none=4.08-4.12E6, sse4=4.99-5.03E6! -else - ###CXXFLAGS+= -flto # also on Intel this would increase throughputs by a factor 2 to 4... - ######CXXFLAGS+= -fno-semantic-interposition # no benefit (neither alone, nor combined with -flto) -endif - -# PowerPC-specific CUDA compiler flags (to be reviewed!) -ifeq ($(UNAME_P),ppc64le) - CUFLAGS+= -Xcompiler -mno-float128 -endif - -#------------------------------------------------------------------------------- - #=== Configure defaults and check if user-defined choices exist for OMPFLAGS, AVX, FPTYPE, HELINL, HRDCOD, RNDGEN # Set the default OMPFLAGS choice -ifneq ($(shell $(CXX) --version | egrep '^Intel'),) -override OMPFLAGS = -fopenmp -###override OMPFLAGS = # disable OpenMP MT on Intel (was ok without nvcc but not ok with nvcc before #578) -else ifneq ($(shell $(CXX) --version | egrep '^(clang)'),) -override OMPFLAGS = -fopenmp -###override OMPFLAGS = # disable OpenMP MT on clang (was not ok without or with nvcc before #578) -###else ifneq ($(shell $(CXX) --version | egrep '^(Apple clang)'),) # AV for Mac (Apple clang compiler) -else ifeq ($(UNAME_S),Darwin) # OM for Mac (any compiler) +OMPFLAGS ?= -fopenmp +ifeq ($(UNAME_S),Darwin) # OM for Mac (any compiler) override OMPFLAGS = # AV disable OpenMP MT on Apple clang (builds fail in the CI #578) -###override OMPFLAGS = -fopenmp # OM reenable OpenMP MT on Apple clang? (AV Oct 2023: this still fails in the CI) -else -override OMPFLAGS = -fopenmp # enable OpenMP MT by default on all other platforms -###override OMPFLAGS = # disable OpenMP MT on all other platforms (default before #575) -endif - -# Set the default AVX (vectorization) choice -ifeq ($(AVX),) - ifeq ($(UNAME_P),ppc64le) - ###override AVX = none - override AVX = sse4 - else ifeq ($(UNAME_P),arm) - ###override AVX = none - override AVX = sse4 - else ifeq ($(wildcard /proc/cpuinfo),) - override AVX = none - $(warning Using AVX='$(AVX)' because host SIMD features cannot be read from /proc/cpuinfo) - else ifeq ($(shell grep -m1 -c avx512vl /proc/cpuinfo)$(shell $(CXX) --version | grep ^clang),1) - override AVX = 512y - ###$(info Using AVX='$(AVX)' as no user input exists) - else - override AVX = avx2 - ifneq ($(shell grep -m1 -c avx512vl /proc/cpuinfo),1) - $(warning Using AVX='$(AVX)' because host does not support avx512vl) - else - $(warning Using AVX='$(AVX)' because this is faster than avx512vl for clang) - endif - endif -else - ###$(info Using AVX='$(AVX)' according to user input) -endif - -# Set the default FPTYPE (floating point type) choice -ifeq ($(FPTYPE),) - override FPTYPE = d -endif - -# Set the default HELINL (inline helicities?) choice -ifeq ($(HELINL),) - override HELINL = 0 -endif - -# Set the default HRDCOD (hardcode cIPD physics parameters?) choice -ifeq ($(HRDCOD),) - override HRDCOD = 0 -endif - -# Set the default RNDGEN (random number generator) choice -ifeq ($(RNDGEN),) - ifeq ($(NVCC),) - override RNDGEN = hasNoCurand - else ifeq ($(RNDGEN),) - override RNDGEN = hasCurand - endif endif -# Export AVX, FPTYPE, HELINL, HRDCOD, RNDGEN, OMPFLAGS so that it is not necessary to pass them to the src Makefile too -export AVX -export FPTYPE -export HELINL -export HRDCOD -export RNDGEN +# Export here, so sub makes don't fall back to the defaults: export OMPFLAGS -#------------------------------------------------------------------------------- - -#=== Set the CUDA/C++ compiler flags appropriate to user-defined choices of AVX, FPTYPE, HELINL, HRDCOD, RNDGEN - -# Set the build flags appropriate to OMPFLAGS -$(info OMPFLAGS=$(OMPFLAGS)) -CXXFLAGS += $(OMPFLAGS) - -# Set the build flags appropriate to each AVX choice (example: "make AVX=none") -# [NB MGONGPU_PVW512 is needed because "-mprefer-vector-width=256" is not exposed in a macro] -# [See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96476] -$(info AVX=$(AVX)) -ifeq ($(UNAME_P),ppc64le) - ifeq ($(AVX),sse4) - override AVXFLAGS = -D__SSE4_2__ # Power9 VSX with 128 width (VSR registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on PowerPC for the moment) - endif -else ifeq ($(UNAME_P),arm) - ifeq ($(AVX),sse4) - override AVXFLAGS = -D__SSE4_2__ # ARM NEON with 128 width (Q/quadword registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on ARM for the moment) - endif -else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 - ifeq ($(AVX),none) - override AVXFLAGS = -mno-sse3 # no SIMD - else ifeq ($(AVX),sse4) - override AVXFLAGS = -mno-avx # SSE4.2 with 128 width (xmm registers) - else ifeq ($(AVX),avx2) - override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(AVX),512y) - override AVXFLAGS = -march=skylake -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(AVX),512z) - override AVXFLAGS = -march=skylake -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) - else - $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) - endif -else - ifeq ($(AVX),none) - override AVXFLAGS = -march=x86-64 # no SIMD (see #588) - else ifeq ($(AVX),sse4) - override AVXFLAGS = -march=nehalem # SSE4.2 with 128 width (xmm registers) - else ifeq ($(AVX),avx2) - override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(AVX),512y) - override AVXFLAGS = -march=skylake-avx512 -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(AVX),512z) - override AVXFLAGS = -march=skylake-avx512 -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) - else - $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) - endif -endif -# For the moment, use AVXFLAGS everywhere: eventually, use them only in encapsulated implementations? -CXXFLAGS+= $(AVXFLAGS) - -# Set the build flags appropriate to each FPTYPE choice (example: "make FPTYPE=f") -$(info FPTYPE=$(FPTYPE)) -ifeq ($(FPTYPE),d) - CXXFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_DOUBLE - CUFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_DOUBLE -else ifeq ($(FPTYPE),f) - CXXFLAGS += -DMGONGPU_FPTYPE_FLOAT -DMGONGPU_FPTYPE2_FLOAT - CUFLAGS += -DMGONGPU_FPTYPE_FLOAT -DMGONGPU_FPTYPE2_FLOAT -else ifeq ($(FPTYPE),m) - CXXFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_FLOAT - CUFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_FLOAT -else - $(error Unknown FPTYPE='$(FPTYPE)': only 'd', 'f' and 'm' are supported) -endif - -# Set the build flags appropriate to each HELINL choice (example: "make HELINL=1") -$(info HELINL=$(HELINL)) -ifeq ($(HELINL),1) - CXXFLAGS += -DMGONGPU_INLINE_HELAMPS - CUFLAGS += -DMGONGPU_INLINE_HELAMPS -else ifneq ($(HELINL),0) - $(error Unknown HELINL='$(HELINL)': only '0' and '1' are supported) -endif - -# Set the build flags appropriate to each HRDCOD choice (example: "make HRDCOD=1") -$(info HRDCOD=$(HRDCOD)) -ifeq ($(HRDCOD),1) - CXXFLAGS += -DMGONGPU_HARDCODE_PARAM - CUFLAGS += -DMGONGPU_HARDCODE_PARAM -else ifneq ($(HRDCOD),0) - $(error Unknown HRDCOD='$(HRDCOD)': only '0' and '1' are supported) -endif - -# Set the build flags appropriate to each RNDGEN choice (example: "make RNDGEN=hasNoCurand") -$(info RNDGEN=$(RNDGEN)) -ifeq ($(RNDGEN),hasNoCurand) - override CXXFLAGSCURAND = -DMGONGPU_HAS_NO_CURAND -else ifeq ($(RNDGEN),hasCurand) - override CXXFLAGSCURAND = -else - $(error Unknown RNDGEN='$(RNDGEN)': only 'hasCurand' and 'hasNoCurand' are supported) -endif +MG_CXXFLAGS += $(OMPFLAGS) #------------------------------------------------------------------------------- #=== Configure build directories and build lockfiles === -# Build directory "short" tag (defines target and path to the optional build directory) -# (Rationale: keep directory names shorter, e.g. do not include random number generator choice) -override DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) - -# Build lockfile "full" tag (defines full specification of build options that cannot be intermixed) -# (Rationale: avoid mixing of CUDA and no-CUDA environment builds with different random number generators) -override TAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) - -# Build directory: current directory by default, or build.$(DIRTAG) if USEBUILDDIR==1 -ifeq ($(USEBUILDDIR),1) - override BUILDDIR = build.$(DIRTAG) - override LIBDIR = ../../lib/$(BUILDDIR) - override LIBDIRRPATH = '$$ORIGIN/../$(LIBDIR)' - $(info Building in BUILDDIR=$(BUILDDIR) for tag=$(TAG) (USEBUILDDIR is set = 1)) -else - override BUILDDIR = . - override LIBDIR = ../../lib - override LIBDIRRPATH = '$$ORIGIN/$(LIBDIR)' - $(info Building in BUILDDIR=$(BUILDDIR) for tag=$(TAG) (USEBUILDDIR is not set)) +# Build directory "short" tag (defines target and path to the build directory) +DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) +CUDACPP_BUILDDIR = build.$(DIRTAG) +CUDACPP_LIBDIR := ../../lib/$(CUDACPP_BUILDDIR) +LIBDIRRPATH := '$$ORIGIN:$$ORIGIN/../$(CUDACPP_LIBDIR)' +ifneq ($(AVX),) + $(info Building CUDACPP in CUDACPP_BUILDDIR=$(CUDACPP_BUILDDIR). Libs in $(CUDACPP_LIBDIR)) endif -###override INCDIR = ../../include -###$(info Building in BUILDDIR=$(BUILDDIR) for tag=$(TAG)) -# On Linux, set rpath to LIBDIR to make it unnecessary to use LD_LIBRARY_PATH +# On Linux, set rpath to CUDACPP_LIBDIR to make it unnecessary to use LD_LIBRARY_PATH # Use relative paths with respect to the executables or shared libraries ($ORIGIN on Linux) -# On Darwin, building libraries with absolute paths in LIBDIR makes this unnecessary +# On Darwin, building libraries with absolute paths in CUDACPP_LIBDIR makes this unnecessary ifeq ($(UNAME_S),Darwin) override CXXLIBFLAGSRPATH = override CULIBFLAGSRPATH = - override CXXLIBFLAGSRPATH2 = - override CULIBFLAGSRPATH2 = else # RPATH to cuda/cpp libs when linking executables override CXXLIBFLAGSRPATH = -Wl,-rpath,$(LIBDIRRPATH) override CULIBFLAGSRPATH = -Xlinker -rpath,$(LIBDIRRPATH) - # RPATH to common lib when linking cuda/cpp libs - override CXXLIBFLAGSRPATH2 = -Wl,-rpath,'$$ORIGIN' - override CULIBFLAGSRPATH2 = -Xlinker -rpath,'$$ORIGIN' endif # Setting LD_LIBRARY_PATH or DYLD_LIBRARY_PATH in the RUNTIME is no longer necessary (neither on Linux nor on Mac) @@ -458,107 +129,68 @@ override RUNTIME = #=== Makefile TARGETS and build rules below #=============================================================================== -cxx_main=$(BUILDDIR)/check.exe -fcxx_main=$(BUILDDIR)/fcheck.exe +cxx_main=$(CUDACPP_BUILDDIR)/check.exe +fcxx_main=$(CUDACPP_BUILDDIR)/fcheck.exe -ifneq ($(NVCC),) -cu_main=$(BUILDDIR)/gcheck.exe -fcu_main=$(BUILDDIR)/fgcheck.exe -else -cu_main= -fcu_main= -endif - -testmain=$(BUILDDIR)/runTest.exe +cu_main=$(CUDACPP_BUILDDIR)/gcheck.exe +fcu_main=$(CUDACPP_BUILDDIR)/fgcheck.exe ifneq ($(GTESTLIBS),) -all.$(TAG): $(BUILDDIR)/.build.$(TAG) $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_main) $(cxx_main) $(fcu_main) $(fcxx_main) $(testmain) -else -all.$(TAG): $(BUILDDIR)/.build.$(TAG) $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_main) $(cxx_main) $(fcu_main) $(fcxx_main) +testmain=$(CUDACPP_BUILDDIR)/runTest.exe +cutestmain=$(CUDACPP_BUILDDIR)/runTest_cuda.exe endif -# Target (and build options): debug -MAKEDEBUG= -debug: OPTFLAGS = -g -O0 -debug: CUOPTFLAGS = -G -debug: MAKEDEBUG := debug -debug: all.$(TAG) - -# Target: tag-specific build lockfiles -override oldtagsb=`if [ -d $(BUILDDIR) ]; then find $(BUILDDIR) -maxdepth 1 -name '.build.*' ! -name '.build.$(TAG)' -exec echo $(shell pwd)/{} \; ; fi` -$(BUILDDIR)/.build.$(TAG): - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - @if [ "$(oldtagsb)" != "" ]; then echo "Cannot build for tag=$(TAG) as old builds exist for other tags:"; echo " $(oldtagsb)"; echo "Please run 'make clean' first\nIf 'make clean' is not enough: run 'make clean USEBUILDDIR=1 AVX=$(AVX) FPTYPE=$(FPTYPE)' or 'make cleanall'"; exit 1; fi - @touch $(BUILDDIR)/.build.$(TAG) +cppbuild: $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(cxx_main) $(fcxx_main) $(testmain) +cudabuild: $(CUDACPP_BUILDDIR)/$(PROG)_cuda $(cu_main) $(fcu_main) $(cutestmain) # Generic target and build rules: objects from CUDA compilation -ifneq ($(NVCC),) -$(BUILDDIR)/%.o : %.cu *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c $< -o $@ +$(CUDACPP_BUILDDIR)/%.o : %.cu *.h ../../src/*.h + @mkdir -p $(CUDACPP_BUILDDIR) + $(NVCC) $(MG_NVCCFLAGS) $(NVCCFLAGS) -c $< -o $@ -$(BUILDDIR)/%_cu.o : %.cc *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c -x cu $< -o $@ -endif +$(CUDACPP_BUILDDIR)/%_cu.o : %.cc *.h ../../src/*.h + @mkdir -p $(CUDACPP_BUILDDIR) + $(NVCC) $(MG_NVCCFLAGS) $(NVCCFLAGS) -c -x cu $< -o $@ # Generic target and build rules: objects from C++ compilation # (NB do not include CUINC here! add it only for NVTX or curand #679) -$(BUILDDIR)/%.o : %.cc *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - $(CXX) $(CPPFLAGS) $(CXXFLAGS) -fPIC -c $< -o $@ +$(CUDACPP_BUILDDIR)/%.o : %.cc *.h ../../src/*.h + @mkdir -p $(CUDACPP_BUILDDIR) + $(CXX) $(MG_CXXFLAGS) $(CXXFLAGS) -c $< -o $@ # Apply special build flags only to CrossSectionKernel.cc and gCrossSectionKernel.cu (no fast math, see #117 and #516) ifeq ($(shell $(CXX) --version | grep ^nvc++),) -$(BUILDDIR)/CrossSectionKernels.o: CXXFLAGS := $(filter-out -ffast-math,$(CXXFLAGS)) -$(BUILDDIR)/CrossSectionKernels.o: CXXFLAGS += -fno-fast-math +$(CUDACPP_BUILDDIR)/CrossSectionKernels.o: CXXFLAGS += -fno-fast-math ifneq ($(NVCC),) -$(BUILDDIR)/gCrossSectionKernels.o: CUFLAGS += -Xcompiler -fno-fast-math +$(CUDACPP_BUILDDIR)/gCrossSectionKernels.o: NVCCFLAGS += -Xcompiler -fno-fast-math endif endif # Apply special build flags only to check_sa.o and gcheck_sa.o (NVTX in timermap.h, #679) -$(BUILDDIR)/check_sa.o: CXXFLAGS += $(USE_NVTX) $(CUINC) -$(BUILDDIR)/gcheck_sa.o: CXXFLAGS += $(USE_NVTX) $(CUINC) +$(CUDACPP_BUILDDIR)/check_sa.o: MG_CXXFLAGS += $(USE_NVTX) $(CUINC) +$(CUDACPP_BUILDDIR)/gcheck_sa.o: MG_CXXFLAGS += $(USE_NVTX) $(CUINC) # Apply special build flags only to check_sa and CurandRandomNumberKernel (curand headers, #679) -$(BUILDDIR)/check_sa.o: CXXFLAGS += $(CXXFLAGSCURAND) -$(BUILDDIR)/gcheck_sa.o: CUFLAGS += $(CXXFLAGSCURAND) -$(BUILDDIR)/CurandRandomNumberKernel.o: CXXFLAGS += $(CXXFLAGSCURAND) -$(BUILDDIR)/gCurandRandomNumberKernel.o: CUFLAGS += $(CXXFLAGSCURAND) -ifeq ($(RNDGEN),hasCurand) -$(BUILDDIR)/CurandRandomNumberKernel.o: CXXFLAGS += $(CUINC) -endif +$(CUDACPP_BUILDDIR)/check_sa.o: MG_CXXFLAGS += $(CXXFLAGSCURAND) +$(CUDACPP_BUILDDIR)/gcheck_sa.o: MG_NVCCFLAGS += $(CXXFLAGSCURAND) +$(CUDACPP_BUILDDIR)/CurandRandomNumberKernel.o: MG_CXXFLAGS += $(CXXFLAGSCURAND) +$(CUDACPP_BUILDDIR)/gCurandRandomNumberKernel.o: MG_NVCCFLAGS += $(CXXFLAGSCURAND) + # Avoid "warning: builtin __has_trivial_... is deprecated; use __is_trivially_... instead" in nvcc with icx2023 (#592) ifneq ($(shell $(CXX) --version | egrep '^(Intel)'),) ifneq ($(NVCC),) -CUFLAGS += -Xcompiler -Wno-deprecated-builtins +MG_NVCCFLAGS += -Xcompiler -Wno-deprecated-builtins endif endif -# Avoid clang warning "overriding '-ffp-contract=fast' option with '-ffp-contract=on'" (#516) -# This patch does remove the warning, but I prefer to keep it disabled for the moment... -###ifneq ($(shell $(CXX) --version | egrep '^(clang|Apple clang|Intel)'),) -###$(BUILDDIR)/CrossSectionKernels.o: CXXFLAGS += -Wno-overriding-t-option -###ifneq ($(NVCC),) -###$(BUILDDIR)/gCrossSectionKernels.o: CUFLAGS += -Xcompiler -Wno-overriding-t-option -###endif -###endif - #### Apply special build flags only to CPPProcess.cc (-flto) ###$(BUILDDIR)/CPPProcess.o: CXXFLAGS += -flto -#### Apply special build flags only to CPPProcess.cc (AVXFLAGS) -###$(BUILDDIR)/CPPProcess.o: CXXFLAGS += $(AVXFLAGS) - #------------------------------------------------------------------------------- -# Target (and build rules): common (src) library -commonlib : $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so - -$(LIBDIR)/lib$(MG5AMC_COMMONLIB).so: ../../src/*.h ../../src/*.cc $(BUILDDIR)/.build.$(TAG) - $(MAKE) -C ../../src $(MAKEDEBUG) -f $(CUDACPP_SRC_MAKEFILE) +$(CUDACPP_LIBDIR)/lib$(MG5AMC_COMMONLIB).so: ../../src/*.h ../../src/*.cc + $(MAKE) AVX=$(AVX) AVXFLAGS="$(AVXFLAGS)" -C ../../src -f $(CUDACPP_SRC_MAKEFILE) #------------------------------------------------------------------------------- @@ -566,162 +198,123 @@ processid_short=$(shell basename $(CURDIR) | awk -F_ '{print $$(NF-1)"_"$$NF}') ###$(info processid_short=$(processid_short)) MG5AMC_CXXLIB = mg5amc_$(processid_short)_cpp -cxx_objects_lib=$(BUILDDIR)/CPPProcess.o $(BUILDDIR)/MatrixElementKernels.o $(BUILDDIR)/BridgeKernels.o $(BUILDDIR)/CrossSectionKernels.o -cxx_objects_exe=$(BUILDDIR)/CommonRandomNumberKernel.o $(BUILDDIR)/RamboSamplingKernels.o +cxx_objects_lib=$(CUDACPP_BUILDDIR)/CPPProcess.o $(CUDACPP_BUILDDIR)/MatrixElementKernels.o $(CUDACPP_BUILDDIR)/BridgeKernels.o $(CUDACPP_BUILDDIR)/CrossSectionKernels.o +cxx_objects_exe=$(CUDACPP_BUILDDIR)/CommonRandomNumberKernel.o $(CUDACPP_BUILDDIR)/RamboSamplingKernels.o -ifneq ($(NVCC),) MG5AMC_CULIB = mg5amc_$(processid_short)_cuda -cu_objects_lib=$(BUILDDIR)/gCPPProcess.o $(BUILDDIR)/gMatrixElementKernels.o $(BUILDDIR)/gBridgeKernels.o $(BUILDDIR)/gCrossSectionKernels.o -cu_objects_exe=$(BUILDDIR)/gCommonRandomNumberKernel.o $(BUILDDIR)/gRamboSamplingKernels.o -endif +cu_objects_lib=$(CUDACPP_BUILDDIR)/gCPPProcess.o $(CUDACPP_BUILDDIR)/gMatrixElementKernels.o $(CUDACPP_BUILDDIR)/gBridgeKernels.o $(CUDACPP_BUILDDIR)/gCrossSectionKernels.o +cu_objects_exe=$(CUDACPP_BUILDDIR)/gCommonRandomNumberKernel.o $(CUDACPP_BUILDDIR)/gRamboSamplingKernels.o # Target (and build rules): C++ and CUDA shared libraries -$(LIBDIR)/lib$(MG5AMC_CXXLIB).so: $(BUILDDIR)/fbridge.o -$(LIBDIR)/lib$(MG5AMC_CXXLIB).so: cxx_objects_lib += $(BUILDDIR)/fbridge.o -$(LIBDIR)/lib$(MG5AMC_CXXLIB).so: $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cxx_objects_lib) - $(CXX) -shared -o $@ $(cxx_objects_lib) $(CXXLIBFLAGSRPATH2) -L$(LIBDIR) -l$(MG5AMC_COMMONLIB) - -ifneq ($(NVCC),) -$(LIBDIR)/lib$(MG5AMC_CULIB).so: $(BUILDDIR)/fbridge_cu.o -$(LIBDIR)/lib$(MG5AMC_CULIB).so: cu_objects_lib += $(BUILDDIR)/fbridge_cu.o -$(LIBDIR)/lib$(MG5AMC_CULIB).so: $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_objects_lib) - $(NVCC) --shared -o $@ $(cu_objects_lib) $(CULIBFLAGSRPATH2) -L$(LIBDIR) -l$(MG5AMC_COMMONLIB) -endif +$(CUDACPP_BUILDDIR)/lib$(MG5AMC_CXXLIB).so: $(CUDACPP_BUILDDIR)/fbridge.o +$(CUDACPP_BUILDDIR)/lib$(MG5AMC_CXXLIB).so: cxx_objects_lib += $(CUDACPP_BUILDDIR)/fbridge.o +$(CUDACPP_BUILDDIR)/lib$(MG5AMC_CXXLIB).so: $(CUDACPP_LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cxx_objects_lib) + $(CXX) -shared -o $@ $(cxx_objects_lib) $(CXXLIBFLAGSRPATH) -L$(CUDACPP_LIBDIR) -l$(MG5AMC_COMMONLIB) $(MG_LDFLAGS) $(LDFLAGS) -#------------------------------------------------------------------------------- - -# Target (and build rules): Fortran include files -###$(INCDIR)/%.inc : ../%.inc -### @if [ ! -d $(INCDIR) ]; then echo "mkdir -p $(INCDIR)"; mkdir -p $(INCDIR); fi -### \cp $< $@ +$(CUDACPP_BUILDDIR)/lib$(MG5AMC_CULIB).so: $(CUDACPP_BUILDDIR)/fbridge_cu.o +$(CUDACPP_BUILDDIR)/lib$(MG5AMC_CULIB).so: cu_objects_lib += $(CUDACPP_BUILDDIR)/fbridge_cu.o +$(CUDACPP_BUILDDIR)/lib$(MG5AMC_CULIB).so: $(CUDACPP_LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_objects_lib) + $(NVCC) --shared -o $@ $(cu_objects_lib) $(CULIBFLAGSRPATH) -L$(CUDACPP_LIBDIR) -l$(MG5AMC_COMMONLIB) #------------------------------------------------------------------------------- # Target (and build rules): C++ and CUDA standalone executables -$(cxx_main): LIBFLAGS += $(CXXLIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH -$(cxx_main): $(BUILDDIR)/check_sa.o $(LIBDIR)/lib$(MG5AMC_CXXLIB).so $(cxx_objects_exe) $(BUILDDIR)/CurandRandomNumberKernel.o - $(CXX) -o $@ $(BUILDDIR)/check_sa.o $(OMPFLAGS) -ldl -pthread $(LIBFLAGS) -L$(LIBDIR) -l$(MG5AMC_CXXLIB) $(cxx_objects_exe) $(BUILDDIR)/CurandRandomNumberKernel.o $(CURANDLIBFLAGS) -ifneq ($(NVCC),) +$(cxx_main): MG_LDFLAGS += $(CXXLIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH +$(cxx_main): MG_LDFLAGS += -L$(CUDACPP_BUILDDIR) -l$(MG5AMC_CXXLIB) # Process-specific library +$(cxx_main): $(CUDACPP_BUILDDIR)/check_sa.o $(CUDACPP_BUILDDIR)/lib$(MG5AMC_CXXLIB).so $(cxx_objects_exe) $(CUDACPP_BUILDDIR)/CurandRandomNumberKernel.o + $(CXX) -o $@ $(CUDACPP_BUILDDIR)/check_sa.o $(OMPFLAGS) -ldl -pthread $(cxx_objects_exe) $(CUDACPP_BUILDDIR)/CurandRandomNumberKernel.o $(MG_LDFLAGS) $(LDFLAGS) + ifneq ($(shell $(CXX) --version | grep ^Intel),) -$(cu_main): LIBFLAGS += -lintlc # compile with icpx and link with nvcc (undefined reference to `_intel_fast_memcpy') -$(cu_main): LIBFLAGS += -lsvml # compile with icpx and link with nvcc (undefined reference to `__svml_cos4_l9') +$(cu_main): MG_LDFLAGS += -lintlc # compile with icpx and link with nvcc (undefined reference to `_intel_fast_memcpy') +$(cu_main): MG_LDFLAGS += -lsvml # compile with icpx and link with nvcc (undefined reference to `__svml_cos4_l9') else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 -$(cu_main): LIBFLAGS += -L$(patsubst %bin/nvc++,%lib,$(subst ccache ,,$(CXX))) -lnvhpcatm -lnvcpumath -lnvc -endif -$(cu_main): LIBFLAGS += $(CULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH -$(cu_main): $(BUILDDIR)/gcheck_sa.o $(LIBDIR)/lib$(MG5AMC_CULIB).so $(cu_objects_exe) $(BUILDDIR)/gCurandRandomNumberKernel.o - $(NVCC) -o $@ $(BUILDDIR)/gcheck_sa.o $(CUARCHFLAGS) $(LIBFLAGS) -L$(LIBDIR) -l$(MG5AMC_CULIB) $(cu_objects_exe) $(BUILDDIR)/gCurandRandomNumberKernel.o $(CURANDLIBFLAGS) +$(cu_main): MG_LDFLAGS += -L$(patsubst %bin/nvc++,%lib,$(subst ccache ,,$(CXX))) -lnvhpcatm -lnvcpumath -lnvc endif +$(cu_main): MG_LDFLAGS += $(CULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH +$(cu_main): MG_LDFLAGS += -L$(CUDACPP_BUILDDIR) -l$(MG5AMC_CULIB) # Process-specific library +$(cu_main): $(CUDACPP_BUILDDIR)/gcheck_sa.o $(CUDACPP_BUILDDIR)/lib$(MG5AMC_CULIB).so $(cu_objects_exe) $(CUDACPP_BUILDDIR)/gCurandRandomNumberKernel.o + $(NVCC) -o $@ $(CUDACPP_BUILDDIR)/gcheck_sa.o $(CUARCHFLAGS) $(cu_objects_exe) $(CUDACPP_BUILDDIR)/gCurandRandomNumberKernel.o $(MG_LDFLAGS) $(LDFLAGS) #------------------------------------------------------------------------------- - -# Generic target and build rules: objects from Fortran compilation -$(BUILDDIR)/%.o : %.f *.inc - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - $(FC) -I. -c $< -o $@ - -# Generic target and build rules: objects from Fortran compilation -###$(BUILDDIR)/%.o : %.f *.inc -### @if [ ! -d $(INCDIR) ]; then echo "mkdir -p $(INCDIR)"; mkdir -p $(INCDIR); fi -### @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi -### $(FC) -I. -I$(INCDIR) -c $< -o $@ - -# Target (and build rules): Fortran standalone executables -###$(BUILDDIR)/fcheck_sa.o : $(INCDIR)/fbridge.inc +# Check executables: ifeq ($(UNAME_S),Darwin) -$(fcxx_main): LIBFLAGS += -L$(shell dirname $(shell $(FC) --print-file-name libgfortran.dylib)) # add path to libgfortran on Mac #375 +$(fcxx_main): MG_LDFLAGS += -L$(shell dirname $(shell $(FC) --print-file-name libgfortran.dylib)) # add path to libgfortran on Mac #375 endif -$(fcxx_main): LIBFLAGS += $(CXXLIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH -$(fcxx_main): $(BUILDDIR)/fcheck_sa.o $(BUILDDIR)/fsampler.o $(LIBDIR)/lib$(MG5AMC_CXXLIB).so $(cxx_objects_exe) - $(CXX) -o $@ $(BUILDDIR)/fcheck_sa.o $(OMPFLAGS) $(BUILDDIR)/fsampler.o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_CXXLIB) $(cxx_objects_exe) +$(fcxx_main): MG_LDFLAGS += $(CXXLIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH +$(fcxx_main): MG_LDFLAGS += -L$(CUDACPP_BUILDDIR) -l$(MG5AMC_CXXLIB) # Process-specific library +$(fcxx_main): $(CUDACPP_BUILDDIR)/fcheck_sa.o $(CUDACPP_BUILDDIR)/fsampler.o $(CUDACPP_BUILDDIR)/lib$(MG5AMC_CXXLIB).so $(cxx_objects_exe) + $(CXX) -o $@ $(CUDACPP_BUILDDIR)/fcheck_sa.o $(cxx_objects_exe) $(OMPFLAGS) $(CUDACPP_BUILDDIR)/fsampler.o -lgfortran -L$(CUDACPP_LIBDIR) $(MG_LDFLAGS) $(LDFLAGS) -ifneq ($(NVCC),) ifneq ($(shell $(CXX) --version | grep ^Intel),) -$(fcu_main): LIBFLAGS += -lintlc # compile with icpx and link with nvcc (undefined reference to `_intel_fast_memcpy') -$(fcu_main): LIBFLAGS += -lsvml # compile with icpx and link with nvcc (undefined reference to `__svml_cos4_l9') +$(fcu_main): MG_LDFLAGS += -lintlc # compile with icpx and link with nvcc (undefined reference to `_intel_fast_memcpy') +$(fcu_main): MG_LDFLAGS += -lsvml # compile with icpx and link with nvcc (undefined reference to `__svml_cos4_l9') endif ifeq ($(UNAME_S),Darwin) -$(fcu_main): LIBFLAGS += -L$(shell dirname $(shell $(FC) --print-file-name libgfortran.dylib)) # add path to libgfortran on Mac #375 -endif -$(fcu_main): LIBFLAGS += $(CULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH -$(fcu_main): $(BUILDDIR)/fcheck_sa.o $(BUILDDIR)/fsampler_cu.o $(LIBDIR)/lib$(MG5AMC_CULIB).so $(cu_objects_exe) - $(NVCC) -o $@ $(BUILDDIR)/fcheck_sa.o $(BUILDDIR)/fsampler_cu.o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_CULIB) $(cu_objects_exe) +$(fcu_main): MG_LDFLAGS += -L$(shell dirname $(shell $(FC) --print-file-name libgfortran.dylib)) # add path to libgfortran on Mac #375 endif +$(fcu_main): MG_LDFLAGS += $(CULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH +$(fcu_main): MG_LDFLAGS += -L$(CUDACPP_BUILDDIR) -l$(MG5AMC_CULIB) # Process-specific library +$(fcu_main): $(CUDACPP_BUILDDIR)/fcheck_sa.o $(CUDACPP_BUILDDIR)/fsampler_cu.o $(CUDACPP_BUILDDIR)/lib$(MG5AMC_CULIB).so $(cu_objects_exe) + $(NVCC) -o $@ $(CUDACPP_BUILDDIR)/fcheck_sa.o $(CUDACPP_BUILDDIR)/fsampler_cu.o $(cu_objects_exe) -lgfortran $(MG_LDFLAGS) $(LDFLAGS) #------------------------------------------------------------------------------- # Target (and build rules): test objects and test executable -$(BUILDDIR)/testxxx.o: $(GTESTLIBS) -$(BUILDDIR)/testxxx.o: INCFLAGS += $(GTESTINC) -$(BUILDDIR)/testxxx.o: testxxx_cc_ref.txt -$(testmain): $(BUILDDIR)/testxxx.o -$(testmain): cxx_objects_exe += $(BUILDDIR)/testxxx.o # Comment out this line to skip the C++ test of xxx functions -ifneq ($(NVCC),) -$(BUILDDIR)/testxxx_cu.o: $(GTESTLIBS) -$(BUILDDIR)/testxxx_cu.o: INCFLAGS += $(GTESTINC) -$(BUILDDIR)/testxxx_cu.o: testxxx_cc_ref.txt -$(testmain): $(BUILDDIR)/testxxx_cu.o -$(testmain): cu_objects_exe += $(BUILDDIR)/testxxx_cu.o # Comment out this line to skip the CUDA test of xxx functions -endif +$(testmain) $(cutestmain): $(GTESTLIBS) +$(testmain) $(cutestmain): INCFLAGS += $(GTESTINC) +$(testmain) $(cutestmain): MG_LDFLAGS += -L$(GTESTLIBDIR) -lgtest -lgtest_main -$(BUILDDIR)/testmisc.o: $(GTESTLIBS) -$(BUILDDIR)/testmisc.o: INCFLAGS += $(GTESTINC) -$(testmain): $(BUILDDIR)/testmisc.o -$(testmain): cxx_objects_exe += $(BUILDDIR)/testmisc.o # Comment out this line to skip the C++ miscellaneous tests +$(CUDACPP_BUILDDIR)/testxxx.o $(CUDACPP_BUILDDIR)/testxxx_cu.o: $(GTESTLIBS) testxxx_cc_ref.txt +$(testmain): $(CUDACPP_BUILDDIR)/testxxx.o +$(testmain): cxx_objects_exe += $(CUDACPP_BUILDDIR)/testxxx.o # Comment out this line to skip the C++ test of xxx functions +$(cutestmain): $(CUDACPP_BUILDDIR)/testxxx_cu.o +$(cutestmain): cu_objects_exe += $(CUDACPP_BUILDDIR)/testxxx_cu.o # Comment out this line to skip the CUDA test of xxx functions -ifneq ($(NVCC),) -$(BUILDDIR)/testmisc_cu.o: $(GTESTLIBS) -$(BUILDDIR)/testmisc_cu.o: INCFLAGS += $(GTESTINC) -$(testmain): $(BUILDDIR)/testmisc_cu.o -$(testmain): cu_objects_exe += $(BUILDDIR)/testmisc_cu.o # Comment out this line to skip the CUDA miscellaneous tests -endif -$(BUILDDIR)/runTest.o: $(GTESTLIBS) -$(BUILDDIR)/runTest.o: INCFLAGS += $(GTESTINC) -$(testmain): $(BUILDDIR)/runTest.o -$(testmain): cxx_objects_exe += $(BUILDDIR)/runTest.o +$(CUDACPP_BUILDDIR)/testmisc.o $(CUDACPP_BUILDDIR)/testmisc_cu.o: $(GTESTLIBS) +$(testmain): $(CUDACPP_BUILDDIR)/testmisc.o +$(testmain): cxx_objects_exe += $(CUDACPP_BUILDDIR)/testmisc.o # Comment out this line to skip the C++ miscellaneous tests +$(cutestmain): $(CUDACPP_BUILDDIR)/testmisc_cu.o +$(cutestmain): cu_objects_exe += $(CUDACPP_BUILDDIR)/testmisc_cu.o # Comment out this line to skip the CUDA miscellaneous tests + + +$(CUDACPP_BUILDDIR)/runTest.o $(CUDACPP_BUILDDIR)/runTest_cu.o: $(GTESTLIBS) +$(testmain): $(CUDACPP_BUILDDIR)/runTest.o +$(testmain): cxx_objects_exe += $(CUDACPP_BUILDDIR)/runTest.o +$(cutestmain): $(CUDACPP_BUILDDIR)/runTest_cu.o +$(cutestmain): cu_objects_exe += $(CUDACPP_BUILDDIR)/runTest_cu.o + -ifneq ($(NVCC),) -$(BUILDDIR)/runTest_cu.o: $(GTESTLIBS) -$(BUILDDIR)/runTest_cu.o: INCFLAGS += $(GTESTINC) ifneq ($(shell $(CXX) --version | grep ^Intel),) -$(testmain): LIBFLAGS += -lintlc # compile with icpx and link with nvcc (undefined reference to `_intel_fast_memcpy') -$(testmain): LIBFLAGS += -lsvml # compile with icpx and link with nvcc (undefined reference to `__svml_cos4_l9') +$(cutestmain): MG_LDFLAGS += -lintlc # compile with icpx and link with nvcc (undefined reference to `_intel_fast_memcpy') +$(cutestmain): MG_LDFLAGS += -lsvml # compile with icpx and link with nvcc (undefined reference to `__svml_cos4_l9') else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 -$(testmain): LIBFLAGS += -L$(patsubst %bin/nvc++,%lib,$(subst ccache ,,$(CXX))) -lnvhpcatm -lnvcpumath -lnvc -endif -$(testmain): $(BUILDDIR)/runTest_cu.o -$(testmain): cu_objects_exe += $(BUILDDIR)/runTest_cu.o +$(cutestmain): MG_LDFLAGS += -L$(patsubst %bin/nvc++,%lib,$(subst ccache ,,$(CXX))) -lnvhpcatm -lnvcpumath -lnvc endif -$(testmain): $(GTESTLIBS) -$(testmain): INCFLAGS += $(GTESTINC) -$(testmain): LIBFLAGS += -L$(GTESTLIBDIR) -lgtest -lgtest_main ifneq ($(OMPFLAGS),) ifneq ($(shell $(CXX) --version | egrep '^Intel'),) -$(testmain): LIBFLAGS += -liomp5 # see #578 (not '-qopenmp -static-intel' as in https://stackoverflow.com/questions/45909648) +$(testmain): MG_LDFLAGS += -liomp5 # see #578 (not '-qopenmp -static-intel' as in https://stackoverflow.com/questions/45909648) else ifneq ($(shell $(CXX) --version | egrep '^clang'),) -$(testmain): LIBFLAGS += -L $(shell dirname $(shell $(CXX) -print-file-name=libc++.so)) -lomp # see #604 +$(testmain): MG_LDFLAGS += -L $(shell dirname $(shell $(CXX) -print-file-name=libc++.so)) -lomp # see #604 ###else ifneq ($(shell $(CXX) --version | egrep '^Apple clang'),) ###$(testmain): LIBFLAGS += ???? # OMP is not supported yet by cudacpp for Apple clang (see #578 and #604) else -$(testmain): LIBFLAGS += -lgomp +$(testmain): MG_LDFLAGS += -lgomp endif endif -ifeq ($(NVCC),) # link only runTest.o -$(testmain): LIBFLAGS += $(CXXLIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH -$(testmain): $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cxx_objects_lib) $(cxx_objects_exe) $(GTESTLIBS) - $(CXX) -o $@ $(cxx_objects_lib) $(cxx_objects_exe) -ldl -pthread $(LIBFLAGS) -else # link both runTest.o and runTest_cu.o -$(testmain): LIBFLAGS += $(CULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH -$(testmain): $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cxx_objects_lib) $(cxx_objects_exe) $(cu_objects_lib) $(cu_objects_exe) $(GTESTLIBS) - $(NVCC) -o $@ $(cxx_objects_lib) $(cxx_objects_exe) $(cu_objects_lib) $(cu_objects_exe) -ldl $(LIBFLAGS) -lcuda -endif +$(testmain): MG_LDFLAGS += $(CXXLIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH +$(testmain): $(CUDACPP_LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cxx_objects_lib) $(cxx_objects_exe) $(GTESTLIBS) + $(CXX) -o $@ $(cxx_objects_lib) $(cxx_objects_exe) -L$(CUDACPP_LIBDIR) -l$(MG5AMC_COMMONLIB) -ldl -pthread $(MG_LDFLAGS) $(LDFLAGS) + +$(cutestmain): MG_LDFLAGS += $(CULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH +$(cutestmain): $(CUDACPP_LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_objects_lib) $(cu_objects_exe) $(GTESTLIBS) + $(NVCC) -o $@ $(cu_objects_lib) $(cu_objects_exe) -L$(CUDACPP_LIBDIR) -l$(MG5AMC_COMMONLIB) -ldl -lcuda $(MG_LDFLAGS) $(LDFLAGS) # Use target gtestlibs to build only googletest ifneq ($(GTESTLIBS),) @@ -731,72 +324,15 @@ endif # Use flock (Linux only, no Mac) to allow 'make -j' if googletest has not yet been downloaded https://stackoverflow.com/a/32666215 $(GTESTLIBS): ifneq ($(shell which flock 2>/dev/null),) - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - flock $(BUILDDIR)/.make_test.lock $(MAKE) -C $(TESTDIR) + flock $(TESTDIR)/.make_test.lock $(MAKE) -C $(TESTDIR) else if [ -d $(TESTDIR) ]; then $(MAKE) -C $(TESTDIR); fi endif #------------------------------------------------------------------------------- -# Target: build all targets in all AVX modes (each AVX mode in a separate build directory) -# Split the avxall target into five separate targets to allow parallel 'make -j avxall' builds -# (Hack: add a fbridge.inc dependency to avxall, to ensure it is only copied once for all AVX modes) -avxnone: - @echo - $(MAKE) USEBUILDDIR=1 AVX=none -f $(CUDACPP_MAKEFILE) - -avxsse4: - @echo - $(MAKE) USEBUILDDIR=1 AVX=sse4 -f $(CUDACPP_MAKEFILE) - -avxavx2: - @echo - $(MAKE) USEBUILDDIR=1 AVX=avx2 -f $(CUDACPP_MAKEFILE) - -avx512y: - @echo - $(MAKE) USEBUILDDIR=1 AVX=512y -f $(CUDACPP_MAKEFILE) - -avx512z: - @echo - $(MAKE) USEBUILDDIR=1 AVX=512z -f $(CUDACPP_MAKEFILE) - -ifeq ($(UNAME_P),ppc64le) -###avxall: $(INCDIR)/fbridge.inc avxnone avxsse4 -avxall: avxnone avxsse4 -else ifeq ($(UNAME_P),arm) -###avxall: $(INCDIR)/fbridge.inc avxnone avxsse4 -avxall: avxnone avxsse4 -else -###avxall: $(INCDIR)/fbridge.inc avxnone avxsse4 avxavx2 avx512y avx512z -avxall: avxnone avxsse4 avxavx2 avx512y avx512z -endif - -#------------------------------------------------------------------------------- - -# Target: clean the builds -.PHONY: clean - -clean: -ifeq ($(USEBUILDDIR),1) - rm -rf $(BUILDDIR) -else - rm -f $(BUILDDIR)/.build.* $(BUILDDIR)/*.o $(BUILDDIR)/*.exe - rm -f $(LIBDIR)/lib$(MG5AMC_CXXLIB).so $(LIBDIR)/lib$(MG5AMC_CULIB).so -endif - $(MAKE) -C ../../src clean -f $(CUDACPP_SRC_MAKEFILE) -### rm -rf $(INCDIR) - -cleanall: - @echo - $(MAKE) USEBUILDDIR=0 clean -f $(CUDACPP_MAKEFILE) - @echo - $(MAKE) USEBUILDDIR=0 -C ../../src cleanall -f $(CUDACPP_SRC_MAKEFILE) - rm -rf build.* - # Target: clean the builds as well as the gtest installation(s) -distclean: cleanall +distclean: clean cleansrc ifneq ($(wildcard $(TESTDIRCOMMON)),) $(MAKE) -C $(TESTDIRCOMMON) clean endif @@ -848,50 +384,55 @@ endif #------------------------------------------------------------------------------- -# Target: check (run the C++ test executable) +# Target: check/gcheck (run the C++ test executable) # [NB THIS IS WHAT IS USED IN THE GITHUB CI!] -ifneq ($(NVCC),) -check: runTest cmpFcheck cmpFGcheck -else check: runTest cmpFcheck -endif +gcheck: + $(MAKE) AVX=cuda runTest cmpFGcheck # Target: runTest (run the C++ test executable runTest.exe) -runTest: all.$(TAG) - $(RUNTIME) $(BUILDDIR)/runTest.exe +ifneq ($(AVX),cuda) +runTest: cppbuild + $(RUNTIME) $(CUDACPP_BUILDDIR)/runTest.exe +else +runTest: cudabuild + $(RUNTIME) $(CUDACPP_BUILDDIR)/runTest_cuda.exe +endif + # Target: runCheck (run the C++ standalone executable check.exe, with a small number of events) -runCheck: all.$(TAG) - $(RUNTIME) $(BUILDDIR)/check.exe -p 2 32 2 +runCheck: cppbuild + $(RUNTIME) $(CUDACPP_BUILDDIR)/check.exe -p 2 32 2 # Target: runGcheck (run the CUDA standalone executable gcheck.exe, with a small number of events) -runGcheck: all.$(TAG) - $(RUNTIME) $(BUILDDIR)/gcheck.exe -p 2 32 2 +runGcheck: AVX=cuda +runGcheck: + $(MAKE) AVX=cuda cudabuild + $(RUNTIME) $(CUDACPP_BUILDDIR)/gcheck.exe -p 2 32 2 # Target: runFcheck (run the Fortran standalone executable - with C++ MEs - fcheck.exe, with a small number of events) -runFcheck: all.$(TAG) - $(RUNTIME) $(BUILDDIR)/fcheck.exe 2 32 2 +runFcheck: cppbuild + $(RUNTIME) $(CUDACPP_BUILDDIR)/fcheck.exe 2 32 2 # Target: runFGcheck (run the Fortran standalone executable - with CUDA MEs - fgcheck.exe, with a small number of events) -runFGcheck: all.$(TAG) - $(RUNTIME) $(BUILDDIR)/fgcheck.exe 2 32 2 +runFGcheck: AVX=cuda +runFGcheck: + $(MAKE) AVX=cuda cudabuild + $(RUNTIME) $(CUDACPP_BUILDDIR)/fgcheck.exe 2 32 2 # Target: cmpFcheck (compare ME results from the C++ and Fortran with C++ MEs standalone executables, with a small number of events) -cmpFcheck: all.$(TAG) +cmpFcheck: cppbuild @echo - @echo "$(BUILDDIR)/check.exe --common -p 2 32 2" - @echo "$(BUILDDIR)/fcheck.exe 2 32 2" - @me1=$(shell $(RUNTIME) $(BUILDDIR)/check.exe --common -p 2 32 2 | grep MeanMatrix | awk '{print $$4}'); me2=$(shell $(RUNTIME) $(BUILDDIR)/fcheck.exe 2 32 2 | grep Average | awk '{print $$4}'); echo "Avg ME (C++/C++) = $${me1}"; echo "Avg ME (F77/C++) = $${me2}"; if [ "$${me2}" == "NaN" ]; then echo "ERROR! Fortran calculation (F77/C++) returned NaN"; elif [ "$${me2}" == "" ]; then echo "ERROR! Fortran calculation (F77/C++) crashed"; else python3 -c "me1=$${me1}; me2=$${me2}; reldif=abs((me2-me1)/me1); print('Relative difference =', reldif); ok = reldif <= 2E-4; print ( '%s (relative difference %s 2E-4)' % ( ('OK','<=') if ok else ('ERROR','>') ) ); import sys; sys.exit(0 if ok else 1)"; fi + @echo "$(CUDACPP_BUILDDIR)/check.exe --common -p 2 32 2" + @echo "$(CUDACPP_BUILDDIR)/fcheck.exe 2 32 2" + @me1=$(shell $(RUNTIME) $(CUDACPP_BUILDDIR)/check.exe --common -p 2 32 2 | grep MeanMatrix | awk '{print $$4}'); me2=$(shell $(RUNTIME) $(CUDACPP_BUILDDIR)/fcheck.exe 2 32 2 | grep Average | awk '{print $$4}'); echo "Avg ME (C++/C++) = $${me1}"; echo "Avg ME (F77/C++) = $${me2}"; if [ "$${me2}" == "NaN" ]; then echo "ERROR! Fortran calculation (F77/C++) returned NaN"; elif [ "$${me2}" == "" ]; then echo "ERROR! Fortran calculation (F77/C++) crashed"; else python3 -c "me1=$${me1}; me2=$${me2}; reldif=abs((me2-me1)/me1); print('Relative difference =', reldif); ok = reldif <= 2E-4; print ( '%s (relative difference %s 2E-4)' % ( ('OK','<=') if ok else ('ERROR','>') ) ); import sys; sys.exit(0 if ok else 1)"; fi # Target: cmpFGcheck (compare ME results from the CUDA and Fortran with CUDA MEs standalone executables, with a small number of events) -cmpFGcheck: all.$(TAG) +cmpFGcheck: AVX=cuda +cmpFGcheck: + $(MAKE) AVX=cuda cudabuild @echo - @echo "$(BUILDDIR)/gcheck.exe --common -p 2 32 2" - @echo "$(BUILDDIR)/fgcheck.exe 2 32 2" - @me1=$(shell $(RUNTIME) $(BUILDDIR)/gcheck.exe --common -p 2 32 2 | grep MeanMatrix | awk '{print $$4}'); me2=$(shell $(RUNTIME) $(BUILDDIR)/fgcheck.exe 2 32 2 | grep Average | awk '{print $$4}'); echo "Avg ME (C++/CUDA) = $${me1}"; echo "Avg ME (F77/CUDA) = $${me2}"; if [ "$${me2}" == "NaN" ]; then echo "ERROR! Fortran calculation (F77/CUDA) crashed"; elif [ "$${me2}" == "" ]; then echo "ERROR! Fortran calculation (F77/CUDA) crashed"; else python3 -c "me1=$${me1}; me2=$${me2}; reldif=abs((me2-me1)/me1); print('Relative difference =', reldif); ok = reldif <= 2E-4; print ( '%s (relative difference %s 2E-4)' % ( ('OK','<=') if ok else ('ERROR','>') ) ); import sys; sys.exit(0 if ok else 1)"; fi + @echo "$(CUDACPP_BUILDDIR)/gcheck.exe --common -p 2 32 2" + @echo "$(CUDACPP_BUILDDIR)/fgcheck.exe 2 32 2" + @me1=$(shell $(RUNTIME) $(CUDACPP_BUILDDIR)/gcheck.exe --common -p 2 32 2 | grep MeanMatrix | awk '{print $$4}'); me2=$(shell $(RUNTIME) $(CUDACPP_BUILDDIR)/fgcheck.exe 2 32 2 | grep Average | awk '{print $$4}'); echo "Avg ME (C++/CUDA) = $${me1}"; echo "Avg ME (F77/CUDA) = $${me2}"; if [ "$${me2}" == "NaN" ]; then echo "ERROR! Fortran calculation (F77/CUDA) crashed"; elif [ "$${me2}" == "" ]; then echo "ERROR! Fortran calculation (F77/CUDA) crashed"; else python3 -c "me1=$${me1}; me2=$${me2}; reldif=abs((me2-me1)/me1); print('Relative difference =', reldif); ok = reldif <= 2E-4; print ( '%s (relative difference %s 2E-4)' % ( ('OK','<=') if ok else ('ERROR','>') ) ); import sys; sys.exit(0 if ok else 1)"; fi -# Target: memcheck (run the CUDA standalone executable gcheck.exe with a small number of events through cuda-memcheck) -memcheck: all.$(TAG) - $(RUNTIME) $(CUDA_HOME)/bin/cuda-memcheck --check-api-memory-access yes --check-deprecated-instr yes --check-device-heap yes --demangle full --language c --leak-check full --racecheck-report all --report-api-errors all --show-backtrace yes --tool memcheck --track-unused-memory yes $(BUILDDIR)/gcheck.exe -p 2 32 2 - -#------------------------------------------------------------------------------- diff --git a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/makefile b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/makefile index d572486c2e..d229c1cf4d 100644 --- a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/makefile +++ b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/makefile @@ -1,19 +1,22 @@ SHELL := /bin/bash -include ../../Source/make_opts -FFLAGS+= -w +# Include general setup +OPTIONS_MAKEFILE := ../../Source/make_opts +include $(OPTIONS_MAKEFILE) # Enable the C preprocessor https://gcc.gnu.org/onlinedocs/gfortran/Preprocessing-Options.html -FFLAGS+= -cpp +MG_FCFLAGS += -cpp +MG_CXXFLAGS += -I. -# Compile counters with -O3 as in the cudacpp makefile (avoid being "unfair" to Fortran #740) -CXXFLAGS = -O3 -Wall -Wshadow -Wextra +all: help cppnative + +# Target if user does not specify target +help: + $(info No target specified.) + $(info Viable targets are 'cppnative' (default), 'cppnone', 'cppsse4', 'cppavx2', 'cpp512y', 'cpp512z' and 'cuda') + $(info Or 'cppall' for all C++ targets) + $(info Or 'ALL' for all C++ and cuda targets) -# Add -std=c++17 explicitly to avoid build errors on macOS -# Add -mmacosx-version-min=11.3 to avoid "ld: warning: object file was built for newer macOS version than being linked" -ifneq ($(shell $(CXX) --version | egrep '^Apple clang'),) -CXXFLAGS += -std=c++17 -mmacosx-version-min=11.3 -endif # Enable ccache if USECCACHE=1 ifeq ($(USECCACHE)$(shell echo $(CXX) | grep ccache),1) @@ -46,34 +49,25 @@ else MADLOOP_LIB = endif -LINKLIBS = $(LINK_MADLOOP_LIB) $(LINK_LOOP_LIBS) -L$(LIBDIR) -ldhelas -ldsample -lmodel -lgeneric -lpdf -lcernlib $(llhapdf) -lbias - -processid_short=$(shell basename $(CURDIR) | awk -F_ '{print $$(NF-1)"_"$$NF}') -CUDACPP_MAKEFILE=cudacpp.mk -# NB1 Using ":=" below instead of "=" is much faster (it only runs the subprocess once instead of many times) -# NB2 Use '|&' in CUDACPP_BUILDDIR to avoid confusing errors about googletest #507 -# NB3 Do not add a comment inlined "CUDACPP_BUILDDIR=$(shell ...) # comment" as otherwise a trailing space is included... -# NB4 The variables relevant to the cudacpp Makefile must be explicitly passed to $(shell...) -CUDACPP_MAKEENV:=$(shell echo '$(.VARIABLES)' | tr " " "\n" | egrep "(USEBUILDDIR|AVX|FPTYPE|HELINL|HRDCOD)") -###$(info CUDACPP_MAKEENV=$(CUDACPP_MAKEENV)) -###$(info $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))")) -CUDACPP_BUILDDIR:=$(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn 2>&1 | awk '/Building/{print $$3}' | sed s/BUILDDIR=//) -ifeq ($(CUDACPP_BUILDDIR),) -$(error CUDACPP_BUILDDIR='$(CUDACPP_BUILDDIR)' should not be empty!) -else -$(info CUDACPP_BUILDDIR='$(CUDACPP_BUILDDIR)') -endif -CUDACPP_COMMONLIB=mg5amc_common -CUDACPP_CXXLIB=mg5amc_$(processid_short)_cpp -CUDACPP_CULIB=mg5amc_$(processid_short)_cuda - +LINKLIBS = $(LINK_MADLOOP_LIB) $(LINK_LOOP_LIBS) -L$(LIBDIR) -ldhelas -ldsample -lmodel -lgeneric -lpdf -lcernlib $(llhapdf) -lbias LIBS = $(LIBDIR)libbias.$(libext) $(LIBDIR)libdhelas.$(libext) $(LIBDIR)libdsample.$(libext) $(LIBDIR)libgeneric.$(libext) $(LIBDIR)libpdf.$(libext) $(LIBDIR)libgammaUPC.$(libext) $(LIBDIR)libmodel.$(libext) $(LIBDIR)libcernlib.$(libext) $(MADLOOP_LIB) $(LOOP_LIBS) ifneq ("$(wildcard ../../Source/RUNNING)","") LINKLIBS += -lrunning - LIBS += $(LIBDIR)librunning.$(libext) + LIBS += $(LIBDIR)librunning.$(libext) endif +SOURCEDIR_GUARD:=../../Source/.timestamp_guard +# We use $(SOURCEDIR_GUARD) to figure out if Source is out of date. The Source makefile doesn't correctly +# update all files, so we need a proxy that is updated every time we run "$(MAKE) -C ../../Source". +$(SOURCEDIR_GUARD) ../../Source/discretesampler.mod &: ../../Source/*.f ../../Cards/param_card.dat ../../Cards/run_card.dat +ifneq ($(shell which flock 2>/dev/null),) + flock ../../Source/.lock -c "$(MAKE) -C ../../Source; touch $(SOURCEDIR_GUARD)" +else + $(MAKE) -C ../../Source; touch $(SOURCEDIR_GUARD) +endif + +$(LIBS): $(SOURCEDIR_GUARD) # Source files @@ -91,82 +85,83 @@ PROCESS= myamp.o genps.o unwgt.o setcuts.o get_color.o \ DSIG=driver.o $(patsubst %.f, %.o, $(filter-out auto_dsig.f, $(wildcard auto_dsig*.f))) DSIG_cudacpp=driver_cudacpp.o $(patsubst %.f, %_cudacpp.o, $(filter-out auto_dsig.f, $(wildcard auto_dsig*.f))) -SYMMETRY = symmetry.o idenparts.o +SYMMETRY = symmetry.o idenparts.o -# Binaries +# cudacpp targets: +CUDACPP_MAKEFILE := cudacpp.mk +ifneq (,$(wildcard $(CUDACPP_MAKEFILE))) +include $(CUDACPP_MAKEFILE) +endif -ifeq ($(UNAME),Darwin) -LDFLAGS += -lc++ # avoid 'Undefined symbols' for chrono::steady_clock on macOS (checked with otool -L libmg5amc_gg_ttx_cpp.so) -LDFLAGS += -mmacosx-version-min=11.3 # avoid "ld: warning: object file was built for newer macOS version than being linked" -else -LDFLAGS += -Wl,--no-relax # avoid 'failed to convert GOTPCREL relocation' error #458 (not supported on macOS) +ifeq ($(CUDACPP_BUILDDIR),) +$(error CUDACPP_BUILDDIR='$(CUDACPP_BUILDDIR)' should not be empty!) endif +CUDACPP_COMMONLIB=mg5amc_common +CUDACPP_CXXLIB := $(CUDACPP_BUILDDIR)/lib$(MG5AMC_CXXLIB).so +CUDACPP_CULIB := $(CUDACPP_BUILDDIR)/lib$(MG5AMC_CULIB).so -all: $(PROG)_fortran $(CUDACPP_BUILDDIR)/$(PROG)_cpp # also builds $(PROG)_cuda if $(CUDACPP_CULIB) exists (#503) +# Set up OpenMP if supported +OMPFLAGS ?= -fopenmp ifneq ($(shell $(CXX) --version | egrep '^Intel'),) -override OMPFLAGS = -fopenmp LINKLIBS += -liomp5 # see #578 LINKLIBS += -lintlc # undefined reference to `_intel_fast_memcpy' else ifneq ($(shell $(CXX) --version | egrep '^clang'),) -override OMPFLAGS = -fopenmp $(CUDACPP_BUILDDIR)/$(PROG)_cpp: LINKLIBS += -L $(shell dirname $(shell $(CXX) -print-file-name=libc++.so)) -lomp # see #604 else ifneq ($(shell $(CXX) --version | egrep '^Apple clang'),) -override OMPFLAGS = # OMP is not supported yet by cudacpp for Apple clang -else -override OMPFLAGS = -fopenmp +OMPFLAGS = # OMP is not supported yet by cudacpp for Apple clang endif -$(PROG)_fortran: $(PROCESS) $(DSIG) auto_dsig.o $(LIBS) $(MATRIX) counters.o ompnumthreads.o - $(FC) -o $(PROG)_fortran $(PROCESS) $(DSIG) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o $(LDFLAGS) - -$(LIBS): .libs -.libs: ../../Cards/param_card.dat ../../Cards/run_card.dat - cd ../../Source; make - touch $@ +# Binaries -$(CUDACPP_BUILDDIR)/.cudacpplibs: - $(MAKE) -f $(CUDACPP_MAKEFILE) - touch $@ +$(PROG)_fortran: $(PROCESS) $(DSIG) auto_dsig.o $(LIBS) $(MATRIX) counters.o ompnumthreads.o + $(FC) $(MG_FCFLAGS) $(FCFLAGS) -o $(PROG)_fortran $(PROCESS) $(DSIG) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o $(LDFLAGS) # On Linux, set rpath to LIBDIR to make it unnecessary to use LD_LIBRARY_PATH # Use relative paths with respect to the executables ($ORIGIN on Linux) # On Darwin, building libraries with absolute paths in LIBDIR makes this unnecessary -ifeq ($(UNAME_S),Darwin) - override LIBFLAGSRPATH = -else ifeq ($(USEBUILDDIR),1) - override LIBFLAGSRPATH = -Wl,-rpath,'$$ORIGIN/../$(LIBDIR)/$(CUDACPP_BUILDDIR)' -else - override LIBFLAGSRPATH = -Wl,-rpath,'$$ORIGIN/$(LIBDIR)' +ifneq ($(UNAME_S),Darwin) + LIBFLAGSRPATH := -Wl,-rpath,'$$ORIGIN:$$ORIGIN/../$(LIBDIR)/$(CUDACPP_BUILDDIR)' endif -.PHONY: madevent_fortran_link madevent_cuda_link madevent_cpp_link +.PHONY: madevent_fortran_link madevent_cuda_link madevent_cpp_link madevent_cppnone_link madevent_cppsse4_link madevent_cppavx2_link madevent_cpp512y_link madevent_cpp512z_link clean cleanall cleansrc madevent_fortran_link: $(PROG)_fortran rm -f $(PROG) ln -s $(PROG)_fortran $(PROG) -madevent_cpp_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp - rm -f $(PROG) - ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) +madevent_cppnone_link: AVX=none +madevent_cppnone_link: cppnone + ln -sf $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) -madevent_cuda_link: $(CUDACPP_BUILDDIR)/$(PROG)_cuda - rm -f $(PROG) - ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cuda $(PROG) +madevent_cppavx2_link: AVX=avx2 +madevent_cppavx2_link: cppavx2 + ln -sf $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) + +madevent_cpp512y_link: AVX=512y +madevent_cpp512y_link: cppavx512y + ln -sf $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) -# Building $(PROG)_cpp also builds $(PROG)_cuda if $(CUDACPP_CULIB) exists (improved patch for cpp-only builds #503) -$(CUDACPP_BUILDDIR)/$(PROG)_cpp: $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(LIBS) $(MATRIX) counters.o ompnumthreads.o $(CUDACPP_BUILDDIR)/.cudacpplibs - $(FC) -o $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o -L$(LIBDIR)/$(CUDACPP_BUILDDIR) -l$(CUDACPP_COMMONLIB) -l$(CUDACPP_CXXLIB) $(LIBFLAGSRPATH) $(LDFLAGS) - if [ -f $(LIBDIR)/$(CUDACPP_BUILDDIR)/lib$(CUDACPP_CULIB).* ]; then $(FC) -o $(CUDACPP_BUILDDIR)/$(PROG)_cuda $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o -L$(LIBDIR)/$(CUDACPP_BUILDDIR) -l$(CUDACPP_COMMONLIB) -l$(CUDACPP_CULIB) $(LIBFLAGSRPATH) $(LDFLAGS); fi +madevent_cpp512z_link: AVX=512z +madevent_cpp512z_link: cppavx512z + ln -sf $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) -$(CUDACPP_BUILDDIR)/$(PROG)_cuda: $(CUDACPP_BUILDDIR)/$(PROG)_cpp +madevent_cuda_link: AVX=cuda +madevent_cuda_link: cuda + ln -sf $(CUDACPP_BUILDDIR)/$(PROG)_cuda $(PROG) + +$(CUDACPP_BUILDDIR)/$(PROG)_cpp: $(LIBS) $(CUDACPP_CXXLIB) $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) counters.o ompnumthreads.o + $(FC) -o $(CUDACPP_BUILDDIR)/$(PROG)_cpp -L$(LIBDIR)/$(CUDACPP_BUILDDIR) -l$(CUDACPP_COMMONLIB) $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o -L$(CUDACPP_BUILDDIR) -l$(MG5AMC_CXXLIB) $(LIBFLAGSRPATH) $(MG_LDFLAGS) $(LDFLAGS) + +$(CUDACPP_BUILDDIR)/$(PROG)_cuda: $(LIBS) $(CUDACPP_CULIB) $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) counters.o ompnumthreads.o + $(FC) -o $(CUDACPP_BUILDDIR)/$(PROG)_cuda -L$(LIBDIR)/$(CUDACPP_BUILDDIR) -l$(CUDACPP_COMMONLIB) $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o -L$(CUDACPP_BUILDDIR) -l$(MG5AMC_CULIB) $(LIBFLAGSRPATH) $(MG_LDFLAGS) $(LDFLAGS) counters.o: counters.cc timer.h - $(CXX) $(CXXFLAGS) -c $< -o $@ + $(CXX) $(MG_CXXFLAGS) $(CXXFLAGS) -c $< -o $@ ompnumthreads.o: ompnumthreads.cc ompnumthreads.h - $(CXX) -I. $(CXXFLAGS) $(OMPFLAGS) -c $< -o $@ + $(CXX) $(MG_CXXFLAGS) $(CXXFLAGS) $(OMPFLAGS) -c $< -o $@ $(PROG)_forhel: $(PROCESS) auto_dsig.o $(LIBS) $(MATRIX_HEL) $(FC) -o $(PROG)_forhel $(PROCESS) $(MATRIX_HEL) $(LINKLIBS) $(LDFLAGS) $(BIASDEPENDENCIES) $(OMPFLAGS) @@ -174,27 +169,14 @@ $(PROG)_forhel: $(PROCESS) auto_dsig.o $(LIBS) $(MATRIX_HEL) gensym: $(SYMMETRY) configs.inc $(LIBS) $(FC) -o gensym $(SYMMETRY) -L$(LIBDIR) $(LINKLIBS) $(LDFLAGS) -###ifeq (,$(wildcard fbridge.inc)) # Pointless: fbridge.inc always exists as this is the cudacpp-modified makefile! -###$(LIBDIR)libmodel.$(libext): ../../Cards/param_card.dat -### cd ../../Source/MODEL; make -### -###$(LIBDIR)libgeneric.$(libext): ../../Cards/run_card.dat -### cd ../../Source; make -### -###$(LIBDIR)libpdf.$(libext): -### cd ../../Source/PDF; make -### -###$(LIBDIR)libgammaUPC.$(libext): -### cd ../../Source/PDF/gammaUPC; make -###endif # Add source so that the compiler finds the DiscreteSampler module. $(MATRIX): %.o: %.f - $(FC) $(FFLAGS) $(MATRIX_FLAG) -c $< -I../../Source/ -I../../Source/PDF/gammaUPC -%.o: %.f - $(FC) $(FFLAGS) -c $< -I../../Source/ -I../../Source/PDF/gammaUPC + $(FC) $(MG_FCFLAGS) $(FCFLAGS) $(MATRIX_FLAG) -c $< -I../../Source/ -I../../Source/PDF/gammaUPC +%.o $(CUDACPP_BUILDDIR)/%.o: %.f + $(FC) $(MG_FCFLAGS) $(FCFLAGS) -I../../Source/ -I../../Source/PDF/gammaUPC -c $< -o $@ %_cudacpp.o: %.f - $(FC) $(FFLAGS) -c -DMG5AMC_MEEXPORTER_CUDACPP $< -I../../Source/ $(OMPFLAGS) -o $@ + $(FC) $(MG_FCFLAGS) $(FCFLAGS) -c -DMG5AMC_MEEXPORTER_CUDACPP $< -I../../Source/ $(OMPFLAGS) -o $@ # Dependencies @@ -215,60 +197,42 @@ unwgt.o: genps.inc nexternal.inc symswap.inc cluster.inc run.inc message.inc \ initcluster.o: message.inc # Extra dependencies on discretesampler.mod +../../Source/discretesampler.mod: ../../Source/DiscreteSampler.f -auto_dsig.o: .libs -driver.o: .libs -driver_cudacpp.o: .libs -$(MATRIX): .libs -genps.o: .libs +auto_dsig.o: ../../Source/discretesampler.mod +driver.o: ../../Source/discretesampler.mod +driver_cudacpp.o: ../../Source/discretesampler.mod +$(MATRIX): ../../Source/discretesampler.mod +genps.o: ../../Source/discretesampler.mod # Cudacpp avxall targets -UNAME_P := $(shell uname -p) ifeq ($(UNAME_P),ppc64le) -avxall: avxnone avxsse4 +cppall: cppnative cppnone cppsse4 else ifeq ($(UNAME_P),arm) -avxall: avxnone avxsse4 +cppall: cppnative cppnone cppsse4 else -avxall: avxnone avxsse4 avxavx2 avx512y avx512z +cppall: cppnative cppnone cppsse4 cppavx2 cppavx512y cppavx512z endif -avxnone: $(PROG)_fortran $(DSIG_cudacpp) - @echo - $(MAKE) USEBUILDDIR=1 AVX=none - -avxsse4: $(PROG)_fortran $(DSIG_cudacpp) - @echo - $(MAKE) USEBUILDDIR=1 AVX=sse4 - -avxavx2: $(PROG)_fortran $(DSIG_cudacpp) - @echo - $(MAKE) USEBUILDDIR=1 AVX=avx2 - -avx512y: $(PROG)_fortran $(DSIG_cudacpp) - @echo - $(MAKE) USEBUILDDIR=1 AVX=512y - -avx512z: $(PROG)_fortran $(DSIG_cudacpp) - @echo - $(MAKE) USEBUILDDIR=1 AVX=512z - -###endif - -# Clean (NB: 'make clean' in Source calls 'make clean' in all P*) +ALL: cppall cuda -clean: # Clean builds: fortran in this Pn; cudacpp executables for one AVX in this Pn - $(RM) *.o gensym $(PROG) $(PROG)_fortran $(PROG)_forhel $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(CUDACPP_BUILDDIR)/$(PROG)_cuda +# Clean all architecture-specific builds: +clean: + $(RM) *.o gensym $(PROG) $(PROG)_* + $(RM) -rf build.*/*{.o,.so,.exe,.dylib,madevent_*} + @for dir in build.*; do if [ -z "$$(ls -A $${dir})" ]; then rm -r $${dir}; else echo "Not cleaning $${dir}; not empty"; fi; done -cleanavxs: clean # Clean builds: fortran in this Pn; cudacpp for all AVX in this Pn and in src - $(MAKE) -f $(CUDACPP_MAKEFILE) cleanall - rm -f $(CUDACPP_BUILDDIR)/.cudacpplibs - rm -f .libs +cleanall: cleansrc + for PROCESS in ../P[0-9]*; do $(MAKE) -C $${PROCESS} clean; done -cleanall: # Clean builds: fortran in all P* and in Source; cudacpp for all AVX in all P* and in src - make -C ../../Source cleanall - rm -rf $(LIBDIR)libbias.$(libext) - rm -f ../../Source/*.mod ../../Source/*/*.mod +# Clean one architecture-specific build +clean%: + $(RM) -r build.$*_* -distclean: cleanall # Clean all fortran and cudacpp builds as well as the googletest installation - $(MAKE) -f $(CUDACPP_MAKEFILE) distclean +# Clean common source directories (interferes with other P*) +cleansrc: + make -C ../../Source clean + $(RM) -f $(SOURCEDIR_GUARD) ../../Source/{*.mod,.lock} ../../Source/*/*.mod + $(RM) -r $(LIBDIR)libbias.$(libext) + if [ -d ../../src ]; then $(MAKE) -C ../../src -f cudacpp_src.mk clean; fi diff --git a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/runTest.cc b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/runTest.cc index d4a760a71b..734235824a 100644 --- a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/runTest.cc +++ b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/runTest.cc @@ -246,15 +246,15 @@ struct CUDATest : public CUDA_CPU_TestBase #define TESTID_CPU( s ) s##_CPU #define XTESTID_CPU( s ) TESTID_CPU( s ) #define MG_INSTANTIATE_TEST_SUITE_CPU( prefix, test_suite_name ) \ -INSTANTIATE_TEST_SUITE_P( prefix, \ - test_suite_name, \ - testing::Values( new CPUTest( MG_EPOCH_REFERENCE_FILE_NAME ) ) ); + INSTANTIATE_TEST_SUITE_P( prefix, \ + test_suite_name, \ + testing::Values( new CPUTest( MG_EPOCH_REFERENCE_FILE_NAME ) ) ); #define TESTID_GPU( s ) s##_GPU #define XTESTID_GPU( s ) TESTID_GPU( s ) #define MG_INSTANTIATE_TEST_SUITE_GPU( prefix, test_suite_name ) \ -INSTANTIATE_TEST_SUITE_P( prefix, \ - test_suite_name, \ - testing::Values( new CUDATest( MG_EPOCH_REFERENCE_FILE_NAME ) ) ); + INSTANTIATE_TEST_SUITE_P( prefix, \ + test_suite_name, \ + testing::Values( new CUDATest( MG_EPOCH_REFERENCE_FILE_NAME ) ) ); #ifdef __CUDACC__ MG_INSTANTIATE_TEST_SUITE_GPU( XTESTID_GPU( MG_EPOCH_PROCESS_ID ), MadgraphTest ); diff --git a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/testxxx.cc b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/testxxx.cc index 3361fe5aa9..1d315f6d75 100644 --- a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/testxxx.cc +++ b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/testxxx.cc @@ -40,7 +40,7 @@ namespace mg5amcCpu { std::string FPEhandlerMessage = "unknown"; int FPEhandlerIevt = -1; - inline void FPEhandler( int sig ) + inline void FPEhandler( int ) { #ifdef __CUDACC__ std::cerr << "Floating Point Exception (GPU): '" << FPEhandlerMessage << "' ievt=" << FPEhandlerIevt << std::endl; @@ -71,11 +71,10 @@ TEST( XTESTID( MG_EPOCH_PROCESS_ID ), testxxx ) constexpr bool testEvents = !dumpEvents; // run the test? constexpr fptype toleranceXXXs = std::is_same::value ? 1.E-15 : 1.E-5; // Constant parameters - constexpr int neppM = MemoryAccessMomenta::neppM; // AOSOA layout constexpr int np4 = CPPProcess::np4; - const int nevt = 32; // 12 independent tests plus 20 duplicates (need a multiple of 16 for floats '512z') - assert( nevt % neppM == 0 ); // nevt must be a multiple of neppM - assert( nevt % neppV == 0 ); // nevt must be a multiple of neppV + const int nevt = 32; // 12 independent tests plus 20 duplicates (need a multiple of 16 for floats '512z') + assert( nevt % MemoryAccessMomenta::neppM == 0 ); // nevt must be a multiple of neppM + assert( nevt % neppV == 0 ); // nevt must be a multiple of neppV // Fill in the input momenta #ifdef __CUDACC__ mg5amcGpu::PinnedHostBufferMomenta hstMomenta( nevt ); // AOSOA[npagM][npar=4][np4=4][neppM] diff --git a/epochX/cudacpp/gg_ttggg.mad/bin/internal/banner.py b/epochX/cudacpp/gg_ttggg.mad/bin/internal/banner.py index bd1517985f..b408679c2f 100755 --- a/epochX/cudacpp/gg_ttggg.mad/bin/internal/banner.py +++ b/epochX/cudacpp/gg_ttggg.mad/bin/internal/banner.py @@ -2,11 +2,11 @@ # # Copyright (c) 2011 The MadGraph5_aMC@NLO Development team and Contributors # -# This file is a part of the MadGraph5_aMC@NLO project, an application which +# This file is a part of the MadGraph5_aMC@NLO project, an application which # automatically generates Feynman diagrams and matrix elements for arbitrary # high-energy processes in the Standard Model and beyond. # -# It is subject to the MadGraph5_aMC@NLO license which should accompany this +# It is subject to the MadGraph5_aMC@NLO license which should accompany this # distribution. # # For more information, visit madgraph.phys.ucl.ac.be and amcatnlo.web.cern.ch @@ -53,7 +53,7 @@ MADEVENT = False import madgraph.various.misc as misc import madgraph.iolibs.file_writers as file_writers - import madgraph.iolibs.files as files + import madgraph.iolibs.files as files import models.check_param_card as param_card_reader from madgraph import MG5DIR, MadGraph5Error, InvalidCmd @@ -80,36 +80,36 @@ class Banner(dict): 'mgproccard': 'MGProcCard', 'mgruncard': 'MGRunCard', 'ma5card_parton' : 'MA5Card_parton', - 'ma5card_hadron' : 'MA5Card_hadron', + 'ma5card_hadron' : 'MA5Card_hadron', 'mggenerationinfo': 'MGGenerationInfo', 'mgpythiacard': 'MGPythiaCard', 'mgpgscard': 'MGPGSCard', 'mgdelphescard': 'MGDelphesCard', 'mgdelphestrigger': 'MGDelphesTrigger', 'mgshowercard': 'MGShowerCard' } - + forbid_cdata = ['initrwgt'] - + def __init__(self, banner_path=None): """ """ if isinstance(banner_path, Banner): dict.__init__(self, banner_path) self.lhe_version = banner_path.lhe_version - return + return else: dict.__init__(self) - + #Look at the version if MADEVENT: self['mgversion'] = '#%s\n' % open(pjoin(MEDIR, 'MGMEVersion.txt')).read() else: info = misc.get_pkg_info() self['mgversion'] = info['version']+'\n' - + self.lhe_version = None - + if banner_path: self.read_banner(banner_path) @@ -123,7 +123,7 @@ def __init__(self, banner_path=None): 'mgruncard':'run_card.dat', 'mgpythiacard':'pythia_card.dat', 'mgpgscard' : 'pgs_card.dat', - 'mgdelphescard':'delphes_card.dat', + 'mgdelphescard':'delphes_card.dat', 'mgdelphestrigger':'delphes_trigger.dat', 'mg5proccard':'proc_card_mg5.dat', 'mgproccard': 'proc_card.dat', @@ -137,10 +137,10 @@ def __init__(self, banner_path=None): 'mgshowercard':'shower_card.dat', 'pythia8':'pythia8_card.dat', 'ma5card_parton':'madanalysis5_parton_card.dat', - 'ma5card_hadron':'madanalysis5_hadron_card.dat', + 'ma5card_hadron':'madanalysis5_hadron_card.dat', 'run_settings':'' } - + def read_banner(self, input_path): """read a banner""" @@ -151,7 +151,7 @@ def read_banner(self, input_path): def split_iter(string): return (x.groups(0)[0] for x in re.finditer(r"([^\n]*\n)", string, re.DOTALL)) input_path = split_iter(input_path) - + text = '' store = False for line in input_path: @@ -170,13 +170,13 @@ def split_iter(string): text += line else: text += '%s%s' % (line, '\n') - - #reaching end of the banner in a event file avoid to read full file + + #reaching end of the banner in a event file avoid to read full file if "
" in line: break elif "" in line: break - + def __getattribute__(self, attr): """allow auto-build for the run_card/param_card/... """ try: @@ -187,23 +187,23 @@ def __getattribute__(self, attr): return self.charge_card(attr) - + def change_lhe_version(self, version): """change the lhe version associate to the banner""" - + version = float(version) if version < 3: version = 1 elif version > 3: raise Exception("Not Supported version") self.lhe_version = version - + def get_cross(self, witherror=False): """return the cross-section of the file""" if "init" not in self: raise Exception - + text = self["init"].split('\n') cross = 0 error = 0 @@ -217,13 +217,13 @@ def get_cross(self, witherror=False): return cross else: return cross, math.sqrt(error) - + def scale_init_cross(self, ratio): """modify the init information with the associate scale""" assert "init" in self - + all_lines = self["init"].split('\n') new_data = [] new_data.append(all_lines[0]) @@ -231,29 +231,29 @@ def scale_init_cross(self, ratio): line = all_lines[i] split = line.split() if len(split) == 4: - xsec, xerr, xmax, pid = split + xsec, xerr, xmax, pid = split else: new_data += all_lines[i:] break pid = int(pid) - + line = " %+13.7e %+13.7e %+13.7e %i" % \ (ratio*float(xsec), ratio* float(xerr), ratio*float(xmax), pid) new_data.append(line) self['init'] = '\n'.join(new_data) - + def get_pdg_beam(self): """return the pdg of each beam""" - + assert "init" in self - + all_lines = self["init"].split('\n') pdg1,pdg2,_ = all_lines[0].split(None, 2) return int(pdg1), int(pdg2) - + def load_basic(self, medir): """ Load the proc_card /param_card and run_card """ - + self.add(pjoin(medir,'Cards', 'param_card.dat')) self.add(pjoin(medir,'Cards', 'run_card.dat')) if os.path.exists(pjoin(medir, 'SubProcesses', 'procdef_mg5.dat')): @@ -261,29 +261,29 @@ def load_basic(self, medir): self.add(pjoin(medir,'Cards', 'proc_card_mg5.dat')) else: self.add(pjoin(medir,'Cards', 'proc_card.dat')) - + def change_seed(self, seed): """Change the seed value in the banner""" # 0 = iseed p = re.compile(r'''^\s*\d+\s*=\s*iseed''', re.M) new_seed_str = " %s = iseed" % seed self['mgruncard'] = p.sub(new_seed_str, self['mgruncard']) - + def add_generation_info(self, cross, nb_event): """add info on MGGeneration""" - + text = """ # Number of Events : %s # Integrated weight (pb) : %s """ % (nb_event, cross) self['MGGenerationInfo'] = text - + ############################################################################ # SPLIT BANNER ############################################################################ def split(self, me_dir, proc_card=True): """write the banner in the Cards directory. - proc_card argument is present to avoid the overwrite of proc_card + proc_card argument is present to avoid the overwrite of proc_card information""" for tag, text in self.items(): @@ -305,37 +305,37 @@ def check_pid(self, pid2label): """special routine removing width/mass of particles not present in the model This is usefull in case of loop model card, when we want to use the non loop model.""" - + if not hasattr(self, 'param_card'): self.charge_card('slha') - + for tag in ['mass', 'decay']: block = self.param_card.get(tag) for data in block: pid = data.lhacode[0] - if pid not in list(pid2label.keys()): + if pid not in list(pid2label.keys()): block.remove((pid,)) def get_lha_strategy(self): """get the lha_strategy: how the weight have to be handle by the shower""" - + if not self["init"]: raise Exception("No init block define") - + data = self["init"].split('\n')[0].split() if len(data) != 10: misc.sprint(len(data), self['init']) raise Exception("init block has a wrong format") return int(float(data[-2])) - + def set_lha_strategy(self, value): """set the lha_strategy: how the weight have to be handle by the shower""" - + if not (-4 <= int(value) <= 4): six.reraise(Exception, "wrong value for lha_strategy", value) if not self["init"]: raise Exception("No init block define") - + all_lines = self["init"].split('\n') data = all_lines[0].split() if len(data) != 10: @@ -351,13 +351,13 @@ def modify_init_cross(self, cross, allow_zero=False): assert isinstance(cross, dict) # assert "all" in cross assert "init" in self - + cross = dict(cross) for key in cross.keys(): if isinstance(key, str) and key.isdigit() and int(key) not in cross: cross[int(key)] = cross[key] - - + + all_lines = self["init"].split('\n') new_data = [] new_data.append(all_lines[0]) @@ -365,7 +365,7 @@ def modify_init_cross(self, cross, allow_zero=False): line = all_lines[i] split = line.split() if len(split) == 4: - xsec, xerr, xmax, pid = split + xsec, xerr, xmax, pid = split else: new_data += all_lines[i:] break @@ -383,23 +383,23 @@ def modify_init_cross(self, cross, allow_zero=False): (float(cross[pid]), ratio* float(xerr), ratio*float(xmax), pid) new_data.append(line) self['init'] = '\n'.join(new_data) - + ############################################################################ # WRITE BANNER ############################################################################ def write(self, output_path, close_tag=True, exclude=[]): """write the banner""" - + if isinstance(output_path, str): ff = open(output_path, 'w') else: ff = output_path - + if MADEVENT: header = open(pjoin(MEDIR, 'Source', 'banner_header.txt')).read() else: header = open(pjoin(MG5DIR,'Template', 'LO', 'Source', 'banner_header.txt')).read() - + if not self.lhe_version: self.lhe_version = self.get('run_card', 'lhe_version', default=1.0) if float(self.lhe_version) < 3: @@ -412,7 +412,7 @@ def write(self, output_path, close_tag=True, exclude=[]): for tag in [t for t in self.ordered_items if t in list(self.keys())]+ \ [t for t in self.keys() if t not in self.ordered_items]: - if tag in ['init'] or tag in exclude: + if tag in ['init'] or tag in exclude: continue capitalized_tag = self.capitalized_items[tag] if tag in self.capitalized_items else tag start_data, stop_data = '', '' @@ -422,19 +422,19 @@ def write(self, output_path, close_tag=True, exclude=[]): stop_data = ']]>\n' out = '<%(tag)s>%(start_data)s\n%(text)s\n%(stop_data)s\n' % \ {'tag':capitalized_tag, 'text':self[tag].strip(), - 'start_data': start_data, 'stop_data':stop_data} + 'start_data': start_data, 'stop_data':stop_data} try: ff.write(out) except: ff.write(out.encode('utf-8')) - - + + if not '/header' in exclude: out = '\n' try: ff.write(out) except: - ff.write(out.encode('utf-8')) + ff.write(out.encode('utf-8')) if 'init' in self and not 'init' in exclude: text = self['init'] @@ -444,22 +444,22 @@ def write(self, output_path, close_tag=True, exclude=[]): ff.write(out) except: ff.write(out.encode('utf-8')) - + if close_tag: - out = '\n' + out = '\n' try: ff.write(out) except: - ff.write(out.encode('utf-8')) + ff.write(out.encode('utf-8')) return ff - - + + ############################################################################ # BANNER ############################################################################ def add(self, path, tag=None): """Add the content of the file to the banner""" - + if not tag: card_name = os.path.basename(path) if 'param_card' in card_name: @@ -505,33 +505,33 @@ def add_text(self, tag, text): if tag == 'param_card': tag = 'slha' elif tag == 'run_card': - tag = 'mgruncard' + tag = 'mgruncard' elif tag == 'proc_card': - tag = 'mg5proccard' + tag = 'mg5proccard' elif tag == 'shower_card': tag = 'mgshowercard' elif tag == 'FO_analyse_card': tag = 'foanalyse' - + self[tag.lower()] = text - - + + def charge_card(self, tag): """Build the python object associated to the card""" - + if tag in ['param_card', 'param']: tag = 'slha' elif tag in ['run_card', 'run']: - tag = 'mgruncard' + tag = 'mgruncard' elif tag == 'proc_card': - tag = 'mg5proccard' + tag = 'mg5proccard' elif tag == 'shower_card': tag = 'mgshowercard' elif tag == 'FO_analyse_card': tag = 'foanalyse' assert tag in ['slha', 'mgruncard', 'mg5proccard', 'mgshowercard', 'foanalyse'], 'invalid card %s' % tag - + if tag == 'slha': param_card = self[tag].split('\n') self.param_card = param_card_reader.ParamCard(param_card) @@ -544,56 +544,56 @@ def charge_card(self, tag): self.proc_card = ProcCard(proc_card) return self.proc_card elif tag =='mgshowercard': - shower_content = self[tag] + shower_content = self[tag] if MADEVENT: import internal.shower_card as shower_card else: import madgraph.various.shower_card as shower_card self.shower_card = shower_card.ShowerCard(shower_content, True) - # set testing to false (testing = true allow to init using + # set testing to false (testing = true allow to init using # the card content instead of the card path" self.shower_card.testing = False return self.shower_card elif tag =='foanalyse': - analyse_content = self[tag] + analyse_content = self[tag] if MADEVENT: import internal.FO_analyse_card as FO_analyse_card else: import madgraph.various.FO_analyse_card as FO_analyse_card - # set testing to false (testing = true allow to init using + # set testing to false (testing = true allow to init using # the card content instead of the card path" self.FOanalyse_card = FO_analyse_card.FOAnalyseCard(analyse_content, True) self.FOanalyse_card.testing = False return self.FOanalyse_card - + def get_detail(self, tag, *arg, **opt): """return a specific """ - + if tag in ['param_card', 'param']: tag = 'slha' attr_tag = 'param_card' elif tag in ['run_card', 'run']: - tag = 'mgruncard' + tag = 'mgruncard' attr_tag = 'run_card' elif tag == 'proc_card': - tag = 'mg5proccard' + tag = 'mg5proccard' attr_tag = 'proc_card' elif tag == 'model': - tag = 'mg5proccard' + tag = 'mg5proccard' attr_tag = 'proc_card' arg = ('model',) elif tag == 'generate': - tag = 'mg5proccard' + tag = 'mg5proccard' attr_tag = 'proc_card' arg = ('generate',) elif tag == 'shower_card': tag = 'mgshowercard' attr_tag = 'shower_card' assert tag in ['slha', 'mgruncard', 'mg5proccard', 'shower_card'], '%s not recognized' % tag - + if not hasattr(self, attr_tag): - self.charge_card(attr_tag) + self.charge_card(attr_tag) card = getattr(self, attr_tag) if len(arg) == 0: @@ -613,7 +613,7 @@ def get_detail(self, tag, *arg, **opt): if 'default' in opt: return opt['default'] else: - raise + raise elif len(arg) == 2 and tag == 'slha': try: return card[arg[0]].get(arg[1:]) @@ -621,15 +621,15 @@ def get_detail(self, tag, *arg, **opt): if 'default' in opt: return opt['default'] else: - raise + raise elif len(arg) == 0: return card else: raise Exception("Unknow command") - + #convenient alias get = get_detail - + def set(self, tag, *args): """modify one of the cards""" @@ -637,27 +637,27 @@ def set(self, tag, *args): tag = 'slha' attr_tag = 'param_card' elif tag == 'run_card': - tag = 'mgruncard' + tag = 'mgruncard' attr_tag = 'run_card' elif tag == 'proc_card': - tag = 'mg5proccard' + tag = 'mg5proccard' attr_tag = 'proc_card' elif tag == 'model': - tag = 'mg5proccard' + tag = 'mg5proccard' attr_tag = 'proc_card' arg = ('model',) elif tag == 'generate': - tag = 'mg5proccard' + tag = 'mg5proccard' attr_tag = 'proc_card' arg = ('generate',) elif tag == 'shower_card': tag = 'mgshowercard' attr_tag = 'shower_card' assert tag in ['slha', 'mgruncard', 'mg5proccard', 'shower_card'], 'not recognized' - + if not hasattr(self, attr_tag): - self.charge_card(attr_tag) - + self.charge_card(attr_tag) + card = getattr(self, attr_tag) if len(args) ==2: if tag == 'mg5proccard': @@ -666,20 +666,20 @@ def set(self, tag, *args): card[args[0]] = args[1] else: card[args[:-1]] = args[-1] - - + + @misc.multiple_try() def add_to_file(self, path, seed=None, out=None): """Add the banner to a file and change the associate seed in the banner""" if seed is not None: self.set("run_card", "iseed", seed) - + if not out: path_out = "%s.tmp" % path else: path_out = out - + ff = self.write(path_out, close_tag=False, exclude=['MGGenerationInfo', '/header', 'init']) ff.write("## END BANNER##\n") @@ -698,44 +698,44 @@ def add_to_file(self, path, seed=None, out=None): files.mv(path_out, path) - + def split_banner(banner_path, me_dir, proc_card=True): """a simple way to split a banner""" - + banner = Banner(banner_path) banner.split(me_dir, proc_card) - + def recover_banner(results_object, level, run=None, tag=None): """as input we receive a gen_crossxhtml.AllResults object. This define the current banner and load it """ - + if not run: - try: - _run = results_object.current['run_name'] - _tag = results_object.current['tag'] + try: + _run = results_object.current['run_name'] + _tag = results_object.current['tag'] except Exception: return Banner() else: _run = run if not tag: - try: - _tag = results_object[run].tags[-1] + try: + _tag = results_object[run].tags[-1] except Exception as error: if os.path.exists( pjoin(results_object.path,'Events','%s_banner.txt' % (run))): tag = None else: - return Banner() + return Banner() else: _tag = tag - - path = results_object.path - if tag: + + path = results_object.path + if tag: banner_path = pjoin(path,'Events',run,'%s_%s_banner.txt' % (run, tag)) else: banner_path = pjoin(results_object.path,'Events','%s_banner.txt' % (run)) - + if not os.path.exists(banner_path): if level != "parton" and tag != _tag: return recover_banner(results_object, level, _run, results_object[_run].tags[0]) @@ -754,12 +754,12 @@ def recover_banner(results_object, level, run=None, tag=None): return Banner(lhe.banner) # security if the banner was remove (or program canceled before created it) - return Banner() - + return Banner() + banner = Banner(banner_path) - - - + + + if level == 'pythia': if 'mgpythiacard' in banner: del banner['mgpythiacard'] @@ -768,13 +768,13 @@ def recover_banner(results_object, level, run=None, tag=None): if tag in banner: del banner[tag] return banner - + class InvalidRunCard(InvalidCmd): pass class ProcCard(list): """Basic Proccard object""" - + history_header = \ '#************************************************************\n' + \ '#* MadGraph5_aMC@NLO *\n' + \ @@ -798,10 +798,10 @@ class ProcCard(list): '#* run as ./bin/mg5_aMC filename *\n' + \ '#* *\n' + \ '#************************************************************\n' - - - - + + + + def __init__(self, init=None): """ initialize a basic proc_card""" self.info = {'model': 'sm', 'generate':None, @@ -810,13 +810,13 @@ def __init__(self, init=None): if init: self.read(init) - + def read(self, init): """read the proc_card and save the information""" - + if isinstance(init, str): #path to file init = open(init, 'r') - + store_line = '' for line in init: line = line.rstrip() @@ -828,28 +828,28 @@ def read(self, init): store_line = "" if store_line: raise Exception("WRONG CARD FORMAT") - - + + def move_to_last(self, cmd): """move an element to the last history.""" for line in self[:]: if line.startswith(cmd): self.remove(line) list.append(self, line) - + def append(self, line): """"add a line in the proc_card perform automatically cleaning""" - + line = line.strip() cmds = line.split() if len(cmds) == 0: return - + list.append(self, line) - + # command type: cmd = cmds[0] - + if cmd == 'output': # Remove previous outputs from history self.clean(allow_for_removal = ['output'], keep_switch=True, @@ -875,7 +875,7 @@ def append(self, line): elif cmds[1] == 'proc_v4': #full cleaning self[:] = [] - + def clean(self, to_keep=['set','add','load'], remove_bef_last=None, @@ -884,13 +884,13 @@ def clean(self, to_keep=['set','add','load'], keep_switch=False): """Remove command in arguments from history. All command before the last occurrence of 'remove_bef_last' - (including it) will be removed (but if another options tells the opposite). + (including it) will be removed (but if another options tells the opposite). 'to_keep' is a set of line to always keep. - 'to_remove' is a set of line to always remove (don't care about remove_bef_ + 'to_remove' is a set of line to always remove (don't care about remove_bef_ status but keep_switch acts.). - if 'allow_for_removal' is define only the command in that list can be + if 'allow_for_removal' is define only the command in that list can be remove of the history for older command that remove_bef_lb1. all parameter - present in to_remove are always remove even if they are not part of this + present in to_remove are always remove even if they are not part of this list. keep_switch force to keep the statement remove_bef_??? which changes starts the removal mode. @@ -900,8 +900,8 @@ def clean(self, to_keep=['set','add','load'], if __debug__ and allow_for_removal: for arg in to_keep: assert arg not in allow_for_removal - - + + nline = -1 removal = False #looping backward @@ -912,7 +912,7 @@ def clean(self, to_keep=['set','add','load'], if not removal and remove_bef_last: if self[nline].startswith(remove_bef_last): removal = True - switch = True + switch = True # if this is the switch and is protected pass to the next element if switch and keep_switch: @@ -923,12 +923,12 @@ def clean(self, to_keep=['set','add','load'], if any([self[nline].startswith(arg) for arg in to_remove]): self.pop(nline) continue - + # Only if removal mode is active! if removal: if allow_for_removal: # Only a subset of command can be removed - if any([self[nline].startswith(arg) + if any([self[nline].startswith(arg) for arg in allow_for_removal]): self.pop(nline) continue @@ -936,10 +936,10 @@ def clean(self, to_keep=['set','add','load'], # All command have to be remove but protected self.pop(nline) continue - + # update the counter to pass to the next element nline -= 1 - + def get(self, tag, default=None): if isinstance(tag, int): list.__getattr__(self, tag) @@ -954,32 +954,32 @@ def get(self, tag, default=None): except ValueError: name, content = line[7:].split(None,1) out.append((name, content)) - return out + return out else: return self.info[tag] - + def write(self, path): """write the proc_card to a given path""" - + fsock = open(path, 'w') fsock.write(self.history_header) for line in self: while len(line) > 70: - sub, line = line[:70]+"\\" , line[70:] + sub, line = line[:70]+"\\" , line[70:] fsock.write(sub+"\n") else: fsock.write(line+"\n") - -class InvalidCardEdition(InvalidCmd): pass - + +class InvalidCardEdition(InvalidCmd): pass + class ConfigFile(dict): """ a class for storing/dealing with input file. - """ + """ def __init__(self, finput=None, **opt): """initialize a new instance. input can be an instance of MadLoopParam, - a file, a path to a file, or simply Nothing""" - + a file, a path to a file, or simply Nothing""" + if isinstance(finput, self.__class__): dict.__init__(self) for key in finput.__dict__: @@ -989,7 +989,7 @@ def __init__(self, finput=None, **opt): return else: dict.__init__(self) - + # Initialize it with all the default value self.user_set = set() self.auto_set = set() @@ -1000,15 +1000,15 @@ def __init__(self, finput=None, **opt): self.comments = {} # comment associated to parameters. can be display via help message # store the valid options for a given parameter. self.allowed_value = {} - + self.default_setup() self.plugin_input(finput) - + # if input is define read that input if isinstance(finput, (file, str, StringIO.StringIO)): self.read(finput, **opt) - + @@ -1028,7 +1028,7 @@ def __add__(self, other): base = self.__class__(self) #base = copy.copy(self) base.update((key.lower(),value) for key, value in other.items()) - + return base def __radd__(self, other): @@ -1036,26 +1036,26 @@ def __radd__(self, other): new = copy.copy(other) new.update((key, value) for key, value in self.items()) return new - + def __contains__(self, key): return dict.__contains__(self, key.lower()) def __iter__(self): - + for name in super(ConfigFile, self).__iter__(): yield self.lower_to_case[name.lower()] - - + + #iter = super(ConfigFile, self).__iter__() #misc.sprint(iter) #return (self.lower_to_case[name] for name in iter) - + def keys(self): return [name for name in self] - + def items(self): return [(name,self[name]) for name in self] - + @staticmethod def warn(text, level, raiseerror=False): """convenient proxy to raiseerror/print warning""" @@ -1071,11 +1071,11 @@ def warn(text, level, raiseerror=False): log = lambda t: logger.log(level, t) elif level: log = level - + return log(text) def post_set(self, name, value, change_userdefine, raiseerror): - + if value is None: value = self[name] @@ -1087,25 +1087,25 @@ def post_set(self, name, value, change_userdefine, raiseerror): return getattr(self, 'post_set_%s' % name)(value, change_userdefine, raiseerror) else: raise - + def __setitem__(self, name, value, change_userdefine=False,raiseerror=False): """set the attribute and set correctly the type if the value is a string. change_userdefine on True if we have to add the parameter in user_set """ - + if not len(self): #Should never happen but when deepcopy/pickle self.__init__() - + name = name.strip() - lower_name = name.lower() - + lower_name = name.lower() + # 0. check if this parameter is a system only one if change_userdefine and lower_name in self.system_only: text='%s is a private entry which can not be modify by the user. Keep value at %s' % (name,self[name]) self.warn(text, 'critical', raiseerror) return - + #1. check if the parameter is set to auto -> pass it to special if lower_name in self: targettype = type(dict.__getitem__(self, lower_name)) @@ -1115,22 +1115,22 @@ def __setitem__(self, name, value, change_userdefine=False,raiseerror=False): self.user_set.remove(lower_name) #keep old value. self.post_set(lower_name, 'auto', change_userdefine, raiseerror) - return + return elif lower_name in self.auto_set: self.auto_set.remove(lower_name) - + # 2. Find the type of the attribute that we want if lower_name in self.list_parameter: targettype = self.list_parameter[lower_name] - - - + + + if isinstance(value, str): # split for each comma/space value = value.strip() if value.startswith('[') and value.endswith(']'): value = value[1:-1] - #do not perform split within a " or ' block + #do not perform split within a " or ' block data = re.split(r"((? bad input dropped.append(val) - + if not new_values: text= "value '%s' for entry '%s' is not valid. Preserving previous value: '%s'.\n" \ % (value, name, self[lower_name]) text += "allowed values are any list composed of the following entries: %s" % ', '.join([str(i) for i in self.allowed_value[lower_name]]) - return self.warn(text, 'warning', raiseerror) - elif dropped: + return self.warn(text, 'warning', raiseerror) + elif dropped: text = "some value for entry '%s' are not valid. Invalid items are: '%s'.\n" \ % (name, dropped) text += "value will be set to %s" % new_values - text += "allowed items in the list are: %s" % ', '.join([str(i) for i in self.allowed_value[lower_name]]) + text += "allowed items in the list are: %s" % ', '.join([str(i) for i in self.allowed_value[lower_name]]) self.warn(text, 'warning') values = new_values # make the assignment - dict.__setitem__(self, lower_name, values) + dict.__setitem__(self, lower_name, values) if change_userdefine: self.user_set.add(lower_name) #check for specific action - return self.post_set(lower_name, None, change_userdefine, raiseerror) + return self.post_set(lower_name, None, change_userdefine, raiseerror) elif lower_name in self.dict_parameter: - targettype = self.dict_parameter[lower_name] + targettype = self.dict_parameter[lower_name] full_reset = True #check if we just update the current dict or not - + if isinstance(value, str): value = value.strip() # allowed entry: @@ -1209,7 +1209,7 @@ def __setitem__(self, name, value, change_userdefine=False,raiseerror=False): # name , value => just add the entry # name value => just add the entry # {name1:value1, name2:value2} => full reset - + # split for each comma/space if value.startswith('{') and value.endswith('}'): new_value = {} @@ -1219,23 +1219,23 @@ def __setitem__(self, name, value, change_userdefine=False,raiseerror=False): x, y = pair.split(':') x, y = x.strip(), y.strip() if x.startswith(('"',"'")) and x.endswith(x[0]): - x = x[1:-1] + x = x[1:-1] new_value[x] = y value = new_value elif ',' in value: x,y = value.split(',') value = {x.strip():y.strip()} full_reset = False - + elif ':' in value: x,y = value.split(':') value = {x.strip():y.strip()} - full_reset = False + full_reset = False else: x,y = value.split() value = {x:y} - full_reset = False - + full_reset = False + if isinstance(value, dict): for key in value: value[key] = self.format_variable(value[key], targettype, name=name) @@ -1248,7 +1248,7 @@ def __setitem__(self, name, value, change_userdefine=False,raiseerror=False): if change_userdefine: self.user_set.add(lower_name) return self.post_set(lower_name, None, change_userdefine, raiseerror) - elif name in self: + elif name in self: targettype = type(self[name]) else: logger.debug('Trying to add argument %s in %s. ' % (name, self.__class__.__name__) +\ @@ -1256,22 +1256,22 @@ def __setitem__(self, name, value, change_userdefine=False,raiseerror=False): suggestions = [k for k in self.keys() if k.startswith(name[0].lower())] if len(suggestions)>0: logger.debug("Did you mean one of the following: %s"%suggestions) - self.add_param(lower_name, self.format_variable(UnknownType(value), + self.add_param(lower_name, self.format_variable(UnknownType(value), UnknownType, name)) self.lower_to_case[lower_name] = name if change_userdefine: self.user_set.add(lower_name) return self.post_set(lower_name, None, change_userdefine, raiseerror) - + value = self.format_variable(value, targettype, name=name) #check that the value is allowed: if lower_name in self.allowed_value and '*' not in self.allowed_value[lower_name]: valid = False allowed = self.allowed_value[lower_name] - + # check if the current value is allowed or not (set valid to True) if value in allowed: - valid=True + valid=True elif isinstance(value, str): value = value.lower().strip() allowed = [str(v).lower() for v in allowed] @@ -1279,7 +1279,7 @@ def __setitem__(self, name, value, change_userdefine=False,raiseerror=False): i = allowed.index(value) value = self.allowed_value[lower_name][i] valid=True - + if not valid: # act if not valid: text = "value '%s' for entry '%s' is not valid. Preserving previous value: '%s'.\n" \ @@ -1303,7 +1303,7 @@ def add_param(self, name, value, system=False, comment=False, typelist=None, if __debug__: if lower_name in self: raise Exception("Duplicate case for %s in %s" % (name,self.__class__)) - + dict.__setitem__(self, lower_name, value) self.lower_to_case[lower_name] = name if isinstance(value, list): @@ -1318,12 +1318,12 @@ def add_param(self, name, value, system=False, comment=False, typelist=None, elif isinstance(value, dict): allvalues = list(value.values()) if any([type(allvalues[0]) != type(v) for v in allvalues]): - raise Exception("All entry should have the same type") - self.dict_parameter[lower_name] = type(allvalues[0]) + raise Exception("All entry should have the same type") + self.dict_parameter[lower_name] = type(allvalues[0]) if '__type__' in value: del value['__type__'] dict.__setitem__(self, lower_name, value) - + if allowed and allowed != ['*']: self.allowed_value[lower_name] = allowed if lower_name in self.list_parameter: @@ -1333,8 +1333,8 @@ def add_param(self, name, value, system=False, comment=False, typelist=None, assert value in allowed or '*' in allowed #elif isinstance(value, bool) and allowed != ['*']: # self.allowed_value[name] = [True, False] - - + + if system: self.system_only.add(lower_name) if comment: @@ -1342,7 +1342,7 @@ def add_param(self, name, value, system=False, comment=False, typelist=None, def do_help(self, name): """return a minimal help for the parameter""" - + out = "## Information on parameter %s from class %s\n" % (name, self.__class__.__name__) if name.lower() in self: out += "## current value: %s (parameter should be of type %s)\n" % (self[name], type(self[name])) @@ -1351,7 +1351,7 @@ def do_help(self, name): else: out += "## Unknown for this class\n" if name.lower() in self.user_set: - out += "## This value is considered as being set by the user\n" + out += "## This value is considered as being set by the user\n" else: out += "## This value is considered as being set by the system\n" if name.lower() in self.allowed_value: @@ -1359,17 +1359,17 @@ def do_help(self, name): out += "Allowed value are: %s\n" % ','.join([str(p) for p in self.allowed_value[name.lower()]]) else: out += "Suggested value are : %s\n " % ','.join([str(p) for p in self.allowed_value[name.lower()] if p!='*']) - + logger.info(out) return out @staticmethod def guess_type_from_value(value): "try to guess the type of the string --do not use eval as it might not be safe" - + if not isinstance(value, str): return str(value.__class__.__name__) - + #use ast.literal_eval to be safe since value is untrusted # add a timeout to mitigate infinite loop, memory stack attack with misc.stdchannel_redirected(sys.stdout, os.devnull): @@ -1388,7 +1388,7 @@ def guess_type_from_value(value): @staticmethod def format_variable(value, targettype, name="unknown"): """assign the value to the attribute for the given format""" - + if isinstance(targettype, str): if targettype in ['str', 'int', 'float', 'bool']: targettype = eval(targettype) @@ -1412,7 +1412,7 @@ def format_variable(value, targettype, name="unknown"): (name, type(value), targettype, value)) else: raise InvalidCmd("Wrong input type for %s found %s and expecting %s for value %s" %\ - (name, type(value), targettype, value)) + (name, type(value), targettype, value)) else: if targettype != UnknownType: value = value.strip() @@ -1441,8 +1441,8 @@ def format_variable(value, targettype, name="unknown"): value = int(value) elif value.endswith(('k', 'M')) and value[:-1].isdigit(): convert = {'k':1000, 'M':1000000} - value =int(value[:-1]) * convert[value[-1]] - elif '/' in value or '*' in value: + value =int(value[:-1]) * convert[value[-1]] + elif '/' in value or '*' in value: try: split = re.split('(\*|/)',value) v = float(split[0]) @@ -1461,7 +1461,7 @@ def format_variable(value, targettype, name="unknown"): try: value = float(value.replace('d','e')) except ValueError: - raise InvalidCmd("%s can not be mapped to an integer" % value) + raise InvalidCmd("%s can not be mapped to an integer" % value) try: new_value = int(value) except ValueError: @@ -1471,7 +1471,7 @@ def format_variable(value, targettype, name="unknown"): value = new_value else: raise InvalidCmd("incorect input: %s need an integer for %s" % (value,name)) - + elif targettype == float: if value.endswith(('k', 'M')) and value[:-1].isdigit(): convert = {'k':1000, 'M':1000000} @@ -1496,33 +1496,33 @@ def format_variable(value, targettype, name="unknown"): value = v else: raise InvalidCmd("type %s is not handle by the card" % targettype) - + return value - - + + def __getitem__(self, name): - + lower_name = name.lower() if __debug__: if lower_name not in self: if lower_name in [key.lower() for key in self] : raise Exception("Some key are not lower case %s. Invalid use of the class!"\ % [key for key in self if key.lower() != key]) - + if lower_name in self.auto_set: return 'auto' - + return dict.__getitem__(self, name.lower()) - + get = __getitem__ def set(self, name, value, changeifuserset=True, user=False, raiseerror=False): """convenient way to change attribute. changeifuserset=False means that the value is NOT change is the value is not on default. - user=True, means that the value will be marked as modified by the user - (potentially preventing future change to the value) + user=True, means that the value will be marked as modified by the user + (potentially preventing future change to the value) """ # changeifuserset=False -> we need to check if the user force a value. @@ -1530,8 +1530,8 @@ def set(self, name, value, changeifuserset=True, user=False, raiseerror=False): if name.lower() in self.user_set: #value modified by the user -> do nothing return - self.__setitem__(name, value, change_userdefine=user, raiseerror=raiseerror) - + self.__setitem__(name, value, change_userdefine=user, raiseerror=raiseerror) + class RivetCard(ConfigFile): @@ -1706,7 +1706,7 @@ def setRelevantParamCard(self, f_params, f_relparams): yexec_dict = {} yexec_line = exec_line + "yaxis_relvar = " + self['yaxis_relvar'] exec(yexec_line, locals(), yexec_dict) - if self['yaxis_label'] == "": + if self['yaxis_label'] == "": self['yaxis_label'] = "yaxis_relvar" f_relparams.write("{0} = {1}\n".format(self['yaxis_label'], yexec_dict['yaxis_relvar'])) else: @@ -1715,11 +1715,11 @@ def setRelevantParamCard(self, f_params, f_relparams): class ProcCharacteristic(ConfigFile): """A class to handle information which are passed from MadGraph to the madevent - interface.""" - + interface.""" + def default_setup(self): """initialize the directory to the default value""" - + self.add_param('loop_induced', False) self.add_param('has_isr', False) self.add_param('has_fsr', False) @@ -1735,16 +1735,16 @@ def default_setup(self): self.add_param('pdg_initial1', [0]) self.add_param('pdg_initial2', [0]) self.add_param('splitting_types',[], typelist=str) - self.add_param('perturbation_order', [], typelist=str) - self.add_param('limitations', [], typelist=str) - self.add_param('hel_recycling', False) + self.add_param('perturbation_order', [], typelist=str) + self.add_param('limitations', [], typelist=str) + self.add_param('hel_recycling', False) self.add_param('single_color', True) - self.add_param('nlo_mixed_expansion', True) + self.add_param('nlo_mixed_expansion', True) def read(self, finput): - """Read the input file, this can be a path to a file, + """Read the input file, this can be a path to a file, a file object, a str with the content of the file.""" - + if isinstance(finput, str): if "\n" in finput: finput = finput.split('\n') @@ -1752,49 +1752,49 @@ def read(self, finput): finput = open(finput) else: raise Exception("No such file %s" % finput) - + for line in finput: if '#' in line: line = line.split('#',1)[0] if not line: continue - + if '=' in line: key, value = line.split('=',1) self[key.strip()] = value - + def write(self, outputpath): """write the file""" template ="# Information about the process #\n" template +="#########################################\n" - + fsock = open(outputpath, 'w') fsock.write(template) - + for key, value in self.items(): fsock.write(" %s = %s \n" % (key, value)) - - fsock.close() - + + fsock.close() + class GridpackCard(ConfigFile): """an object for the GridpackCard""" - + def default_setup(self): """default value for the GridpackCard""" - + self.add_param("GridRun", True) self.add_param("gevents", 2500) self.add_param("gseed", 1) - self.add_param("ngran", -1) - + self.add_param("ngran", -1) + def read(self, finput): - """Read the input file, this can be a path to a file, + """Read the input file, this can be a path to a file, a file object, a str with the content of the file.""" - + if isinstance(finput, str): if "\n" in finput: finput = finput.split('\n') @@ -1802,7 +1802,7 @@ def read(self, finput): finput = open(finput) else: raise Exception("No such file %s" % finput) - + for line in finput: line = line.split('#')[0] line = line.split('!')[0] @@ -1812,19 +1812,19 @@ def read(self, finput): self[line[1].strip()] = line[0].replace('\'','').strip() def write(self, output_file, template=None): - """Write the run_card in output_file according to template + """Write the run_card in output_file according to template (a path to a valid run_card)""" if not template: if not MADEVENT: - template = pjoin(MG5DIR, 'Template', 'LO', 'Cards', + template = pjoin(MG5DIR, 'Template', 'LO', 'Cards', 'grid_card_default.dat') else: template = pjoin(MEDIR, 'Cards', 'grid_card_default.dat') - + text = "" - for line in open(template,'r'): + for line in open(template,'r'): nline = line.split('#')[0] nline = nline.split('!')[0] comment = line[len(nline):] @@ -1832,19 +1832,19 @@ def write(self, output_file, template=None): if len(nline) != 2: text += line elif nline[1].strip() in self: - text += ' %s\t= %s %s' % (self[nline[1].strip()],nline[1], comment) + text += ' %s\t= %s %s' % (self[nline[1].strip()],nline[1], comment) else: logger.info('Adding missing parameter %s to current run_card (with default value)' % nline[1].strip()) - text += line - + text += line + if isinstance(output_file, str): fsock = open(output_file,'w') else: fsock = output_file - + fsock.write(text) fsock.close() - + class PY8Card(ConfigFile): """ Implements the Pythia8 card.""" @@ -1868,7 +1868,7 @@ def add_default_subruns(self, type): def default_setup(self): """ Sets up the list of available PY8 parameters.""" - + # Visible parameters # ================== self.add_param("Main:numberOfEvents", -1) @@ -1877,11 +1877,11 @@ def default_setup(self): self.add_param("JetMatching:qCut", -1.0, always_write_to_card=False) self.add_param("JetMatching:doShowerKt",False,always_write_to_card=False) # -1 means that it is automatically set. - self.add_param("JetMatching:nJetMax", -1, always_write_to_card=False) + self.add_param("JetMatching:nJetMax", -1, always_write_to_card=False) # for CKKWL merging self.add_param("Merging:TMS", -1.0, always_write_to_card=False) self.add_param("Merging:Process", '', always_write_to_card=False) - # -1 means that it is automatically set. + # -1 means that it is automatically set. self.add_param("Merging:nJetMax", -1, always_write_to_card=False) # for both merging, chose whether to also consider different merging # scale values for the extra weights related to scale and PDF variations. @@ -1918,10 +1918,10 @@ def default_setup(self): comment='This allows to turn on/off hadronization alltogether.') self.add_param("partonlevel:mpi", True, hidden=True, always_write_to_card=False, comment='This allows to turn on/off MPI alltogether.') - self.add_param("Beams:setProductionScalesFromLHEF", False, hidden=True, + self.add_param("Beams:setProductionScalesFromLHEF", False, hidden=True, always_write_to_card=False, comment='This parameter is automatically set to True by MG5aMC when doing MLM merging with PY8.') - + # for MLM merging self.add_param("JetMatching:merge", False, hidden=True, always_write_to_card=False, comment='Specifiy if we are merging sample of different multiplicity.') @@ -1931,9 +1931,9 @@ def default_setup(self): comment='Value of the merging scale below which one does not even write the HepMC event.') self.add_param("JetMatching:doVeto", False, hidden=True, always_write_to_card=False, comment='Do veto externally (e.g. in SysCalc).') - self.add_param("JetMatching:scheme", 1, hidden=True, always_write_to_card=False) + self.add_param("JetMatching:scheme", 1, hidden=True, always_write_to_card=False) self.add_param("JetMatching:setMad", False, hidden=True, always_write_to_card=False, - comment='Specify one must read inputs from the MadGraph banner.') + comment='Specify one must read inputs from the MadGraph banner.') self.add_param("JetMatching:coneRadius", 1.0, hidden=True, always_write_to_card=False) self.add_param("JetMatching:nQmatch",4,hidden=True, always_write_to_card=False) # for CKKWL merging (common with UMEPS, UNLOPS) @@ -1946,7 +1946,7 @@ def default_setup(self): self.add_param("Merging:applyVeto", False, hidden=True, always_write_to_card=False, comment='Do veto externally (e.g. in SysCalc).') self.add_param("Merging:includeWeightInXsection", True, hidden=True, always_write_to_card=False, - comment='If turned off, then the option belows forces PY8 to keep the original weight.') + comment='If turned off, then the option belows forces PY8 to keep the original weight.') self.add_param("Merging:muRen", 91.188, hidden=True, always_write_to_card=False, comment='Set renormalization scales of the 2->2 process.') self.add_param("Merging:muFacInME", 91.188, hidden=True, always_write_to_card=False, @@ -1958,7 +1958,7 @@ def default_setup(self): # To be added in subruns for CKKWL self.add_param("Merging:mayRemoveDecayProducts", False, hidden=True, always_write_to_card=False) self.add_param("Merging:doKTMerging", False, hidden=True, always_write_to_card=False) - self.add_param("Merging:Dparameter", 0.4, hidden=True, always_write_to_card=False) + self.add_param("Merging:Dparameter", 0.4, hidden=True, always_write_to_card=False) self.add_param("Merging:doPTLundMerging", False, hidden=True, always_write_to_card=False) # Special Pythia8 paremeters useful to simplify the shower. @@ -1975,33 +1975,33 @@ def default_setup(self): # Add parameters controlling the subruns execution flow. # These parameters should not be part of PY8SubRun daughter. self.add_default_subruns('parameters') - + def __init__(self, *args, **opts): - # Parameters which are not printed in the card unless they are - # 'user_set' or 'system_set' or part of the + # Parameters which are not printed in the card unless they are + # 'user_set' or 'system_set' or part of the # self.hidden_params_to_always_print set. self.hidden_param = [] self.hidden_params_to_always_write = set() self.visible_params_to_always_write = set() # List of parameters that should never be written out given the current context. self.params_to_never_write = set() - + # Parameters which have been set by the system (i.e. MG5 itself during # the regular course of the shower interface) self.system_set = set() - + # Add attributes controlling the subruns execution flow. # These attributes should not be part of PY8SubRun daughter. self.add_default_subruns('attributes') - - # Parameters which have been set by the + + # Parameters which have been set by the super(PY8Card, self).__init__(*args, **opts) - def add_param(self, name, value, hidden=False, always_write_to_card=True, + def add_param(self, name, value, hidden=False, always_write_to_card=True, comment=None): - """ add a parameter to the card. value is the default value and + """ add a parameter to the card. value is the default value and defines the type (int/float/bool/str) of the input. The option 'hidden' decides whether the parameter should be visible to the user. The option 'always_write_to_card' decides whether it should @@ -2017,7 +2017,7 @@ def add_param(self, name, value, hidden=False, always_write_to_card=True, self.hidden_params_to_always_write.add(name) else: if always_write_to_card: - self.visible_params_to_always_write.add(name) + self.visible_params_to_always_write.add(name) if not comment is None: if not isinstance(comment, str): raise MadGraph5Error("Option 'comment' must be a string, not"+\ @@ -2036,7 +2036,7 @@ def add_subrun(self, py8_subrun): self.subruns[py8_subrun['Main:subrun']] = py8_subrun if not 'LHEFInputs:nSubruns' in self.user_set: self['LHEFInputs:nSubruns'] = max(self.subruns.keys()) - + def userSet(self, name, value, **opts): """Set an attribute of this card, following a user_request""" self.__setitem__(name, value, change_userdefine=True, **opts) @@ -2044,10 +2044,10 @@ def userSet(self, name, value, **opts): self.system_set.remove(name.lower()) def vetoParamWriteOut(self, name): - """ Forbid the writeout of a specific parameter of this card when the + """ Forbid the writeout of a specific parameter of this card when the "write" function will be invoked.""" self.params_to_never_write.add(name.lower()) - + def systemSet(self, name, value, **opts): """Set an attribute of this card, independently of a specific user request and only if not already user_set.""" @@ -2058,7 +2058,7 @@ def systemSet(self, name, value, **opts): if force or name.lower() not in self.user_set: self.__setitem__(name, value, change_userdefine=False, **opts) self.system_set.add(name.lower()) - + def MadGraphSet(self, name, value, **opts): """ Sets a card attribute, but only if it is absent or not already user_set.""" @@ -2068,18 +2068,18 @@ def MadGraphSet(self, name, value, **opts): force = False if name.lower() not in self or (force or name.lower() not in self.user_set): self.__setitem__(name, value, change_userdefine=False, **opts) - self.system_set.add(name.lower()) - + self.system_set.add(name.lower()) + def defaultSet(self, name, value, **opts): self.__setitem__(name, value, change_userdefine=False, **opts) - + @staticmethod def pythia8_formatting(value, formatv=None): """format the variable into pythia8 card convention. The type is detected by default""" if not formatv: if isinstance(value,UnknownType): - formatv = 'unknown' + formatv = 'unknown' elif isinstance(value, bool): formatv = 'bool' elif isinstance(value, int): @@ -2095,7 +2095,7 @@ def pythia8_formatting(value, formatv=None): formatv = 'str' else: assert formatv - + if formatv == 'unknown': # No formatting then return str(value) @@ -2116,7 +2116,7 @@ def pythia8_formatting(value, formatv=None): elif formatv == 'float': return '%.10e' % float(value) elif formatv == 'shortfloat': - return '%.3f' % float(value) + return '%.3f' % float(value) elif formatv == 'str': return "%s" % value elif formatv == 'list': @@ -2124,9 +2124,9 @@ def pythia8_formatting(value, formatv=None): return ','.join([PY8Card.pythia8_formatting(arg, 'shortfloat') for arg in value]) else: return ','.join([PY8Card.pythia8_formatting(arg) for arg in value]) - - def write(self, output_file, template, read_subrun=False, + + def write(self, output_file, template, read_subrun=False, print_only_visible=False, direct_pythia_input=False, add_missing=True): """ Write the card to output_file using a specific template. > 'print_only_visible' specifies whether or not the hidden parameters @@ -2143,28 +2143,28 @@ def write(self, output_file, template, read_subrun=False, or p.lower() in self.user_set] # Filter against list of parameters vetoed for write-out visible_param = [p for p in visible_param if p.lower() not in self.params_to_never_write] - + # Now the hidden param which must be written out if print_only_visible: hidden_output_param = [] else: hidden_output_param = [p for p in self if p.lower() in self.hidden_param and not p.lower() in self.user_set and - (p.lower() in self.hidden_params_to_always_write or + (p.lower() in self.hidden_params_to_always_write or p.lower() in self.system_set)] # Filter against list of parameters vetoed for write-out hidden_output_param = [p for p in hidden_output_param if p not in self.params_to_never_write] - + if print_only_visible: subruns = [] else: if not read_subrun: subruns = sorted(self.subruns.keys()) - + # Store the subruns to write in a dictionary, with its ID in key # and the corresponding stringstream in value subruns_to_write = {} - + # Sort these parameters nicely so as to put together parameters # belonging to the same group (i.e. prefix before the ':' in their name). def group_params(params): @@ -2191,7 +2191,7 @@ def group_params(params): # First dump in a temporary_output (might need to have a second pass # at the very end to update 'LHEFInputs:nSubruns') output = StringIO.StringIO() - + # Setup template from which to read if isinstance(template, str): if os.path.isfile(template): @@ -2199,7 +2199,7 @@ def group_params(params): elif '\n' in template: tmpl = StringIO.StringIO(template) else: - raise Exception("File input '%s' not found." % file_input) + raise Exception("File input '%s' not found." % file_input) elif template is None: # Then use a dummy empty StringIO, hence skipping the reading tmpl = StringIO.StringIO() @@ -2257,8 +2257,8 @@ def group_params(params): # Remove all of its variables (so that nothing is overwritten) DummySubrun.clear() DummySubrun.write(subruns_to_write[int(value)], - tmpl, read_subrun=True, - print_only_visible=print_only_visible, + tmpl, read_subrun=True, + print_only_visible=print_only_visible, direct_pythia_input=direct_pythia_input) logger.info('Adding new unknown subrun with ID %d.'% @@ -2267,7 +2267,7 @@ def group_params(params): last_pos = tmpl.tell() line = tmpl.readline() continue - + # Change parameters which must be output if param in visible_param: new_value = PY8Card.pythia8_formatting(self[param]) @@ -2286,10 +2286,10 @@ def group_params(params): last_pos = tmpl.tell() line = tmpl.readline() continue - - # Substitute the value. + + # Substitute the value. # If it is directly the pytia input, then don't write the param if it - # is not in the list of visible_params_to_always_write and was + # is not in the list of visible_params_to_always_write and was # not user_set or system_set if ((not direct_pythia_input) or (param.lower() in self.visible_params_to_always_write) or @@ -2304,16 +2304,16 @@ def group_params(params): output.write(template%(param_entry, value_entry.replace(value,new_value))) - + # Proceed to next line last_pos = tmpl.tell() line = tmpl.readline() - + # If add_missing is False, make sure to empty the list of remaining parameters if not add_missing: visible_param = [] hidden_output_param = [] - + # Now output the missing parameters. Warn about visible ones. if len(visible_param)>0 and not template is None: output.write( @@ -2343,12 +2343,12 @@ def group_params(params): """%(' for subrun %d'%self['Main:subrun'] if 'Main:subrun' in self else '')) for param in hidden_output_param: if param.lower() in self.comments: - comment = '\n'.join('! %s'%c for c in + comment = '\n'.join('! %s'%c for c in self.comments[param.lower()].split('\n')) output.write(comment+'\n') output.write('%s=%s\n'%(param,PY8Card.pythia8_formatting(self[param]))) - - # Don't close the file if we were reading a subrun, but simply write + + # Don't close the file if we were reading a subrun, but simply write # output and return now if read_subrun: output_file.write(output.getvalue()) @@ -2382,12 +2382,12 @@ def group_params(params): out.close() else: output_file.write(output.getvalue()) - + def read(self, file_input, read_subrun=False, setter='default'): - """Read the input file, this can be a path to a file, + """Read the input file, this can be a path to a file, a file object, a str with the content of the file. - The setter option choses the authority that sets potential - modified/new parameters. It can be either: + The setter option choses the authority that sets potential + modified/new parameters. It can be either: 'default' or 'user' or 'system'""" if isinstance(file_input, str): if "\n" in file_input: @@ -2423,8 +2423,8 @@ def read(self, file_input, read_subrun=False, setter='default'): raise MadGraph5Error("Could not read line '%s' of Pythia8 card."%\ line) if '!' in value: - value,_ = value.split('!',1) - + value,_ = value.split('!',1) + # Read a subrun if detected: if param=='Main:subrun': if read_subrun: @@ -2451,7 +2451,7 @@ def read(self, file_input, read_subrun=False, setter='default'): last_pos = finput.tell() line = finput.readline() continue - + # Read parameter. The case of a parameter not defined in the card is # handled directly in ConfigFile. @@ -2478,7 +2478,7 @@ def add_default_subruns(self, type): def __init__(self, *args, **opts): """ Initialize a subrun """ - + # Force user to set it manually. subrunID = -1 if 'subrun_id' in opts: @@ -2489,7 +2489,7 @@ def __init__(self, *args, **opts): def default_setup(self): """Sets up the list of available PY8SubRun parameters.""" - + # Add all default PY8Card parameters super(PY8SubRun, self).default_setup() # Make sure they are all hidden @@ -2501,33 +2501,33 @@ def default_setup(self): self.add_param("Main:subrun", -1) self.add_param("Beams:LHEF", "events.lhe.gz") - + class RunBlock(object): """ Class for a series of parameter in the run_card that can be either visible or hidden. - name: allow to set in the default run_card $name to set where that + name: allow to set in the default run_card $name to set where that block need to be inserted template_on: information to include is block is active template_off: information to include is block is not active on_fields/off_fields: paramater associated to the block - can be specify but are otherwise automatically but + can be specify but are otherwise automatically but otherwise determined from the template. - + function: status(self,run_card) -> return which template need to be used check_validity(self, runcard) -> sanity check - create_default_for_process(self, run_card, proc_characteristic, - history, proc_def) + create_default_for_process(self, run_card, proc_characteristic, + history, proc_def) post_set_XXXX(card, value, change_userdefine, raiseerror) -> fct called when XXXXX is set post_set(card, value, change_userdefine, raiseerror, **opt) -> fct called when a parameter is changed - -> no access to parameter name + -> no access to parameter name -> not called if post_set_XXXX is defined """ - - + + def __init__(self, name, template_on, template_off, on_fields=False, off_fields=False): self.name = name @@ -2550,7 +2550,7 @@ def fields(self): def find_fields_from_template(template): """ return the list of fields from a template. checking line like %(mass_ion2)s = mass_ion2 # mass of the heavy ion (second beam) """ - + return re.findall(r"^\s*%\((.*)\)s\s*=\s*\1", template, re.M) def get_template(self, card): @@ -2565,7 +2565,7 @@ def get_unused_template(self, card): if self.status(card): return self.template_off else: - return self.template_on + return self.template_on def status(self, card): """return False if template_off to be used, True if template_on to be used""" @@ -2594,20 +2594,20 @@ def manage_parameters(self, card, written, to_write): written.add(name) if name in to_write: to_write.remove(name) - + def check_validity(self, runcard): """run self consistency check here --avoid to use runcard[''] = xxx here since it can trigger post_set function""" return def create_default_for_process(self, run_card, proc_characteristic, history, proc_def): - return + return # @staticmethod # def post_set(card, value, change_userdefine, raiseerror, **opt): # """default action to run when a parameter of the block is defined. # Here we do not know which parameter is modified. if this is needed. # then one need to define post_set_XXXXX(card, value, change_userdefine, raiseerror) -# and then only that function is used +# and then only that function is used # """ # # if 'pdlabel' in card.user_set: @@ -2621,7 +2621,7 @@ class RunCard(ConfigFile): blocks = [] parameter_in_block = {} - allowed_lep_densities = {} + allowed_lep_densities = {} default_include_file = 'run_card.inc' default_autodef_file = 'run.inc' donewarning = [] @@ -2637,7 +2637,7 @@ def plugin_input(self, finput): curr_dir = os.path.dirname(os.path.dirname(finput.name)) elif isinstance(finput, str): curr_dir = os.path.dirname(os.path.dirname(finput)) - + if curr_dir: if os.path.exists(pjoin(curr_dir, 'bin', 'internal', 'plugin_run_card')): # expected format {} passing everything as optional argument @@ -2646,7 +2646,7 @@ def plugin_input(self, finput): continue opts = dict(eval(line)) self.add_param(**opts) - + @classmethod def fill_post_set_from_blocks(cls): """set the post_set function for any parameter defined in a run_block""" @@ -2659,8 +2659,8 @@ def fill_post_set_from_blocks(cls): elif hasattr(block, 'post_set'): setattr(cls, 'post_set_%s' % parameter, block.post_set) cls.parameter_in_block[parameter] = block - - + + def __new__(cls, finput=None, **opt): cls.fill_post_set_from_blocks() @@ -2718,9 +2718,9 @@ def __new__(cls, finput=None, **opt): return super(RunCard, cls).__new__(cls, finput, **opt) def __init__(self, *args, **opts): - + # The following parameter are updated in the defaultsetup stage. - + #parameter for which no warning should be raised if not define self.hidden_param = [] # in which include file the parameer should be written @@ -2739,11 +2739,11 @@ def __init__(self, *args, **opts): self.cuts_parameter = {} # parameter added where legacy requires an older value. self.system_default = {} - + self.display_block = [] # set some block to be displayed self.fct_mod = {} # {param: (fct_pointer, *argument, **opts)} - self.cut_class = {} + self.cut_class = {} self.warned=False @@ -2776,11 +2776,11 @@ def get_lepton_densities(cls): else: cls.allowed_lep_densities[identity].append(name) - def add_param(self, name, value, fortran_name=None, include=True, + def add_param(self, name, value, fortran_name=None, include=True, hidden=False, legacy=False, cut=False, system=False, sys_default=None, autodef=False, fct_mod=None, **opts): - """ add a parameter to the card. value is the default value and + """ add a parameter to the card. value is the default value and defines the type (int/float/bool/str) of the input. fortran_name: defines what is the associate name in the f77 code include: defines if we have to put the value in the include file @@ -2795,7 +2795,7 @@ def add_param(self, name, value, fortran_name=None, include=True, fct_mod: defines a function to run if the parameter is modify in the include file options of **opts: - allowed: list of valid options. '*' means anything else should be allowed. - empty list means anything possible as well. + empty list means anything possible as well. - comment: add comment for writing/help - typelist: type of the list if default is empty """ @@ -2823,9 +2823,9 @@ def add_param(self, name, value, fortran_name=None, include=True, self.fct_mod[name] = fct_mod def read(self, finput, consistency=True, unknown_warning=True, **opt): - """Read the input file, this can be a path to a file, + """Read the input file, this can be a path to a file, a file object, a str with the content of the file.""" - + if isinstance(finput, str): if "\n" in finput: finput = finput.split('\n') @@ -2836,7 +2836,7 @@ def read(self, finput, consistency=True, unknown_warning=True, **opt): finput = open(finput) else: raise Exception("No such file %s" % finput) - + for line in finput: line = line.split('#')[0] line = line.split('!')[0] @@ -2864,8 +2864,8 @@ def add_unknown_entry(self, name, value, unknow_warning): This is based on the guess_entry_fromname for the various syntax providing input. This then call add_param accordingly. - This function does not returns anything. - """ + This function does not returns anything. + """ if name == "dsqrt_q2fact1" and not self.LO: raise InvalidRunCard("Looks like you passed a LO run_card for a NLO run. Please correct") @@ -2903,7 +2903,7 @@ def add_unknown_entry(self, name, value, unknow_warning): " The type was assigned to %s. \n"+\ " The definition of that variable will %sbe automatically added to fortran file %s\n"+\ " The value of that variable will %sbe passed to the fortran code via fortran file %s",\ - name, value, vartype if vartype != "list" else "list of %s" % opts.get('typelist').__name__, + name, value, vartype if vartype != "list" else "list of %s" % opts.get('typelist').__name__, "" if opts.get('autodef', False) else "not", "" if opts.get('autodef', False) in [True,False] else opts.get('autodef'), "" if opts.get('include', True) else "not", "" if opts.get('include', True) in [True,False] else opts.get('include')) RunCard.donewarning.append(name) @@ -2923,19 +2923,19 @@ def valid_line(self, line, tmp): return False elif line.strip().startswith('%'): parameter = line[line.find('(')+1:line.find(')')] - + try: cond = self.cuts_parameter[parameter] except KeyError: return True - - + + if template_options.get(cond, default) or cond is True: return True else: - return False + return False else: - return True + return True def reset_simd(self, old_value, new_value, name, *args, **opts): @@ -2946,28 +2946,28 @@ def make_clean(self,old_value, new_value, name, dir): raise Exception('pass make clean for ', dir) def make_Ptouch(self,old_value, new_value, name, reset): - raise Exception('pass Ptouch for ', reset) - + raise Exception('pass Ptouch for ', reset) + def write(self, output_file, template=None, python_template=False, write_hidden=False, template_options=None, **opt): - """Write the run_card in output_file according to template + """Write the run_card in output_file according to template (a path to a valid run_card)""" - to_write = set(self.user_set) + to_write = set(self.user_set) written = set() if not template: raise Exception if not template_options: template_options = collections.defaultdict(str) - + if python_template: text = open(template,'r').read() - text = text.split('\n') + text = text.split('\n') # remove if templating - text = [l if not l.startswith('#IF') else l[l.find(')# ')+2:] + text = [l if not l.startswith('#IF') else l[l.find(')# ')+2:] for l in text if self.valid_line(l, template_options)] text ='\n'.join(text) - + if python_template and not to_write: import string if self.blocks: @@ -2981,14 +2981,14 @@ def write(self, output_file, template=None, python_template=False, if not self.list_parameter: text = text % self else: - data = dict((key.lower(),value) for key, value in self.items()) + data = dict((key.lower(),value) for key, value in self.items()) for name in self.list_parameter: if self.list_parameter[name] != str: data[name] = ', '.join(str(v) for v in data[name]) else: data[name] = "['%s']" % "', '".join(str(v) for v in data[name]) text = text % data - else: + else: text = "" for line in open(template,'r'): nline = line.split('#')[0] @@ -3005,11 +3005,11 @@ def write(self, output_file, template=None, python_template=False, this_group = this_group[0] text += this_group.get_template(self) % self this_group.manage_parameters(self, written, to_write) - + elif len(nline) != 2: text += line elif nline[1].strip() in self: - + name = nline[1].strip().lower() value = self[name] if name in self.list_parameter: @@ -3026,15 +3026,15 @@ def write(self, output_file, template=None, python_template=False, else: endline = '' text += ' %s\t= %s %s%s' % (value, name, comment, endline) - written.add(name) + written.add(name) if name in to_write: to_write.remove(name) else: logger.info('Adding missing parameter %s to current %s (with default value)', (name, self.filename)) - written.add(name) - text += line + written.add(name) + text += line for b in self.blocks: if b.status(self): @@ -3057,7 +3057,7 @@ def write(self, output_file, template=None, python_template=False, else: #partial writting -> add only what is needed to_add = [] - for line in b.get_template(self).split('\n'): + for line in b.get_template(self).split('\n'): nline = line.split('#')[0] nline = nline.split('!')[0] nline = nline.split('=') @@ -3072,8 +3072,8 @@ def write(self, output_file, template=None, python_template=False, continue #already include before else: to_add.append(line % {nline[1].strip():value, name:value}) - written.add(name) - + written.add(name) + if name in to_write: to_write.remove(name) else: @@ -3095,13 +3095,13 @@ def write(self, output_file, template=None, python_template=False, text += '\n'.join(to_add) if to_write or write_hidden: - text+="""#********************************************************************* + text+="""#********************************************************************* # Additional hidden parameters #********************************************************************* -""" +""" if write_hidden: # - # do not write hidden parameter not hidden for this template + # do not write hidden parameter not hidden for this template # if python_template: written = written.union(set(re.findall('\%\((\w*)\)s', open(template,'r').read(), re.M))) @@ -3129,7 +3129,7 @@ def get_last_value_include(self, output_dir): if inc file does not exist we will return the current value (i.e. set has no change) """ - #remember that + #remember that # default_include_file is a class variable # self.includepath is on the form include_path : [list of param ] out = {} @@ -3165,7 +3165,7 @@ def get_value_from_include(self, path, list_of_params, output_dir): with open(pjoin(output_dir,path), 'r') as fsock: text = fsock.read() - + for name in list_of_params: misc.sprint(name, name in self.fortran_name) misc.sprint(self.fortran_name[name] if name in self.fortran_name[name] else name) @@ -3191,11 +3191,11 @@ def get_value_from_include(self, path, list_of_params, output_dir): misc.sprint(self.fortran_name) misc.sprint(text) raise Exception - return out + return out def get_default(self, name, default=None, log_level=None): - """return self[name] if exist otherwise default. log control if we + """return self[name] if exist otherwise default. log control if we put a warning or not if we use the default value""" lower_name = name.lower() @@ -3216,13 +3216,13 @@ def get_default(self, name, default=None, log_level=None): log_level = 20 if not default: default = dict.__getitem__(self, name.lower()) - + logger.log(log_level, '%s missed argument %s. Takes default: %s' % (self.filename, name, default)) self[name] = default return default else: - return self[name] + return self[name] def mod_inc_pdlabel(self, value): """flag pdlabel has 'dressed' if one of the special lepton PDF with beamstralung. @@ -3237,16 +3237,16 @@ def edit_dummy_fct_from_file(self, filelist, outdir): filelist is a list of input files (given by the user) containing a series of function to be placed in replacement of standard (typically dummy) functions of the code. - This use LO/NLO class attribute that defines which function name need to - be placed in which file. + This use LO/NLO class attribute that defines which function name need to + be placed in which file. First time this is used, a backup of the original file is done in order to - recover if the user remove some of those files. + recover if the user remove some of those files. The function present in the file are determined automatically via regular expression. and only that function is replaced in the associated file. - function in the filelist starting with user_ will also be include within the + function in the filelist starting with user_ will also be include within the dummy_fct.f file """ @@ -3269,7 +3269,7 @@ def edit_dummy_fct_from_file(self, filelist, outdir): fsock = file_writers.FortranWriter(tmp,'w') function_text = fsock.remove_routine(text, fct) fsock.close() - test = open(tmp,'r').read() + test = open(tmp,'r').read() if fct not in self.dummy_fct_file: if fct.startswith('user_'): self.dummy_fct_file[fct] = self.dummy_fct_file['user_'] @@ -3315,22 +3315,22 @@ def guess_entry_fromname(self, name, value): - vartype: type of the variable - name: name of the variable (stripped from metadata) - options: additional options for the add_param - rules: - - if name starts with str_, int_, float_, bool_, list_, dict_ then + rules: + - if name starts with str_, int_, float_, bool_, list_, dict_ then - vartype is set accordingly - name is strip accordingly - otherwise guessed from value (which is string) - if name contains min/max - vartype is set to float - options has an added {'cut':True} - - suffixes like + - suffixes like - will be removed from named - will be added in options (for add_param) as {'cut':True} see add_param documentation for the list of supported options - if include is on False set autodef to False (i.e. enforce it False for future change) """ - # local function + # local function def update_typelist(value, name, opts): """convert a string to a list and update opts to keep track of the type """ value = value.strip() @@ -3358,7 +3358,7 @@ def update_typelist(value, name, opts): opts[key] = val name = name.replace("<%s=%s>" %(key,val), '') - # get vartype + # get vartype # first check that name does not force it supported_type = ["str", "float", "int", "bool", "list", "dict"] if "_" in name and name.split("_")[0].lower() in supported_type: @@ -3406,13 +3406,13 @@ def f77_formatting(value, formatv=None): value = str(value).lower() else: assert formatv - + if formatv == 'bool': if str(value) in ['1','T','.true.','True']: return '.true.' else: return '.false.' - + elif formatv == 'int': try: return str(int(value)) @@ -3422,12 +3422,12 @@ def f77_formatting(value, formatv=None): return str(int(fl)) else: raise - + elif formatv == 'float': if isinstance(value, str): value = value.replace('d','e') return ('%.10e' % float(value)).replace('e','d') - + elif formatv == 'str': # Check if it is a list if value.strip().startswith('[') and value.strip().endswith(']'): @@ -3437,20 +3437,20 @@ def f77_formatting(value, formatv=None): enumerate(elements)] else: return "'%s'" % value - - + + def check_validity(self, log_level=30): """check that parameter missing in the card are set to the expected value""" for name, value in self.system_default.items(): self.set(name, value, changeifuserset=False) - + for name in self.includepath[False]: to_bypass = self.hidden_param + list(self.legacy_parameter.keys()) if name not in to_bypass: - self.get_default(name, log_level=log_level) + self.get_default(name, log_level=log_level) for name in self.legacy_parameter: if self[name] != self.legacy_parameter[name]: @@ -3458,28 +3458,28 @@ def check_validity(self, log_level=30): for block in self.blocks: block.check_validity(self) - + def update_system_parameter_for_include(self): - """update hidden system only parameter for the correct writtin in the + """update hidden system only parameter for the correct writtin in the include""" return - + def write_include_file(self, output_dir, output_file=None): """Write the various include file in output_dir. The entry True of self.includepath will be written in run_card.inc The entry False will not be written anywhere output_file allows testing by providing stream. - This also call the function to add variable definition for the - variable with autodef=True (handle by write_autodef function) + This also call the function to add variable definition for the + variable with autodef=True (handle by write_autodef function) """ - + # ensure that all parameter are coherent and fix those if needed self.check_validity() - + #ensusre that system only parameter are correctly set self.update_system_parameter_for_include() @@ -3490,10 +3490,10 @@ def write_include_file(self, output_dir, output_file=None): self.write_autodef(output_dir, output_file=None) # check/fix status of customised functions self.edit_dummy_fct_from_file(self["custom_fcts"], os.path.dirname(output_dir)) - + for incname in self.includepath: self.write_one_include_file(output_dir, incname, output_file) - + for name,value in value_in_old_include.items(): if value != self[name]: self.fct_mod[name][0](value, self[name], name, *self.fct_mod[name][1],**self.fct_mod[name][2]) @@ -3515,13 +3515,13 @@ def write_one_include_file(self, output_dir, incname, output_file=None): fsock = file_writers.FortranWriter(pjoin(output_dir,pathinc+'.tmp')) - for key in self.includepath[incname]: + for key in self.includepath[incname]: #define the fortran name if key in self.fortran_name: fortran_name = self.fortran_name[key] else: fortran_name = key - + if incname in self.include_as_parameter: fsock.writelines('INTEGER %s\n' % fortran_name) #get the value with warning if the user didn't set it @@ -3534,7 +3534,7 @@ def write_one_include_file(self, output_dir, incname, output_file=None): # in case of a list, add the length of the list as 0th # element in fortran. Only in case of integer or float # list (not for bool nor string) - targettype = self.list_parameter[key] + targettype = self.list_parameter[key] if targettype is bool: pass elif targettype is int: @@ -3550,7 +3550,7 @@ def write_one_include_file(self, output_dir, incname, output_file=None): elif isinstance(value, dict): for fortran_name, onevalue in value.items(): line = '%s = %s \n' % (fortran_name, self.f77_formatting(onevalue)) - fsock.writelines(line) + fsock.writelines(line) elif isinstance(incname,str) and 'compile' in incname: if incname in self.include_as_parameter: line = 'PARAMETER (%s=%s)' %( fortran_name, value) @@ -3585,7 +3585,7 @@ def write_autodef(self, output_dir, output_file=None): filetocheck = dict(self.definition_path) if True not in self.definition_path: filetocheck[True] = [] - + for incname in filetocheck: if incname is True: @@ -3598,7 +3598,7 @@ def write_autodef(self, output_dir, output_file=None): if output_file: fsock = output_file input = fsock.getvalue() - + else: input = open(pjoin(output_dir,pathinc),'r').read() # do not define fsock here since we might not need to overwrite it @@ -3608,7 +3608,7 @@ def write_autodef(self, output_dir, output_file=None): previous = re.findall(re_pat, input, re.M) # now check which one needed to be added (and remove those identicaly defined) to_add = [] - for key in filetocheck[incname]: + for key in filetocheck[incname]: curr_type = self[key].__class__.__name__ length = "" if curr_type in [list, "list"]: @@ -3640,10 +3640,10 @@ def write_autodef(self, output_dir, output_file=None): fsock.truncate(0) fsock.seek(0) - # remove outdated lines + # remove outdated lines lines = input.split('\n') if previous: - out = [line for line in lines if not re.search(re_pat, line, re.M) or + out = [line for line in lines if not re.search(re_pat, line, re.M) or re.search(re_pat, line, re.M).groups() not in previous] else: out = lines @@ -3662,7 +3662,7 @@ def write_autodef(self, output_dir, output_file=None): stop = out.index('C STOP USER COMMON BLOCK') out = out[:start]+ out[stop+1:] #add new common-block - if self.definition_path[incname]: + if self.definition_path[incname]: out.append("C START USER COMMON BLOCK") if isinstance(pathinc , str): filename = os.path.basename(pathinc).split('.',1)[0] @@ -3675,10 +3675,10 @@ def write_autodef(self, output_dir, output_file=None): filename = filename.upper() out.append(" COMMON/USER_CUSTOM_%s/%s" %(filename,','.join( self.definition_path[incname]))) out.append('C STOP USER COMMON BLOCK') - + if not output_file: fsock.writelines(out) - fsock.close() + fsock.close() else: # for iotest out = ["%s\n" %l for l in out] @@ -3702,7 +3702,7 @@ def get_idbmup(lpp): def get_banner_init_information(self): """return a dictionary with the information needed to write the first line of the block of the lhe file.""" - + output = {} output["idbmup1"] = self.get_idbmup(self['lpp1']) output["idbmup2"] = self.get_idbmup(self['lpp2']) @@ -3713,7 +3713,7 @@ def get_banner_init_information(self): output["pdfsup1"] = self.get_pdf_id(self["pdlabel"]) output["pdfsup2"] = self.get_pdf_id(self["pdlabel"]) return output - + def get_pdf_id(self, pdf): if pdf == "lhapdf": lhaid = self["lhaid"] @@ -3721,19 +3721,19 @@ def get_pdf_id(self, pdf): return lhaid[0] else: return lhaid - else: + else: try: return {'none': 0, 'iww': 0, 'eva':0, 'edff':0, 'chff':0, 'cteq6_m':10000,'cteq6_l':10041,'cteq6l1':10042, 'nn23lo':246800,'nn23lo1':247000,'nn23nlo':244800 - }[pdf] + }[pdf] except: - return 0 - + return 0 + def get_lhapdf_id(self): return self.get_pdf_id(self['pdlabel']) - def remove_all_cut(self): + def remove_all_cut(self): """remove all the cut""" for name in self.cuts_parameter: @@ -3749,7 +3749,7 @@ def remove_all_cut(self): elif 'eta' in name: self[name] = -1 else: - self[name] = 0 + self[name] = 0 ################################################################################################ ### Define various template subpart for the LO Run_card @@ -3767,11 +3767,11 @@ def remove_all_cut(self): %(nb_proton1)s = nb_proton1 # number of proton for the first beam %(nb_neutron1)s = nb_neutron1 # number of neutron for the first beam %(mass_ion1)s = mass_ion1 # mass of the heavy ion (first beam) -# Note that seting differently the two beams only work if you use +# Note that seting differently the two beams only work if you use # group_subprocess=False when generating your matrix-element %(nb_proton2)s = nb_proton2 # number of proton for the second beam %(nb_neutron2)s = nb_neutron2 # number of neutron for the second beam - %(mass_ion2)s = mass_ion2 # mass of the heavy ion (second beam) + %(mass_ion2)s = mass_ion2 # mass of the heavy ion (second beam) """ template_off = "# To see heavy ion options: type \"update ion_pdf\"" @@ -3834,11 +3834,11 @@ def remove_all_cut(self): # Frame for polarization ------------------------------------------------------------------------------------ template_on = \ """#********************************************************************* -# Frame where to evaluate the matrix-element (not the cut!) for polarization +# Frame where to evaluate the matrix-element (not the cut!) for polarization #********************************************************************* %(me_frame)s = me_frame ! list of particles to sum-up to define the rest-frame ! in which to evaluate the matrix-element - ! [1,2] means the partonic center of mass + ! [1,2] means the partonic center of mass """ template_off = "" frame_block = RunBlock('frame', template_on=template_on, template_off=template_off) @@ -3891,7 +3891,7 @@ def remove_all_cut(self): # CONTROL The extra running scale (not QCD) * # Such running is NOT include in systematics computation * #*********************************************************************** - %(fixed_extra_scale)s = fixed_extra_scale ! False means dynamical scale + %(fixed_extra_scale)s = fixed_extra_scale ! False means dynamical scale %(mue_ref_fixed)s = mue_ref_fixed ! scale to use if fixed scale mode %(mue_over_ref)s = mue_over_ref ! ratio to mur if dynamical scale """ @@ -3908,10 +3908,10 @@ def remove_all_cut(self): %(tmin_for_channel)s = tmin_for_channel ! limit the non-singular reach of --some-- channel of integration related to T-channel diagram (value between -1 and 0), -1 is no impact %(survey_splitting)s = survey_splitting ! for loop-induced control how many core are used at survey for the computation of a single iteration. %(survey_nchannel_per_job)s = survey_nchannel_per_job ! control how many Channel are integrated inside a single job on cluster/multicore - %(refine_evt_by_job)s = refine_evt_by_job ! control the maximal number of events for the first iteration of the refine (larger means less jobs) + %(refine_evt_by_job)s = refine_evt_by_job ! control the maximal number of events for the first iteration of the refine (larger means less jobs) +#********************************************************************* +# Compilation flag. #********************************************************************* -# Compilation flag. -#********************************************************************* %(global_flag)s = global_flag ! fortran optimization flag use for the all code. %(aloha_flag)s = aloha_flag ! fortran optimization flag for aloha function. Suggestions: '-ffast-math' %(matrix_flag)s = matrix_flag ! fortran optimization flag for matrix.f function. Suggestions: '-O3' @@ -3948,7 +3948,7 @@ def check_validity(self, card): if card['pdlabel'] != card['pdlabel1']: dict.__setitem__(card, 'pdlabel', card['pdlabel1']) elif card['pdlabel1'] in sum(card.allowed_lep_densities.values(),[]): - raise InvalidRunCard("Assymetric beam pdf not supported for e e collision with ISR/bemstralung option") + raise InvalidRunCard("Assymetric beam pdf not supported for e e collision with ISR/bemstralung option") elif card['pdlabel2'] in sum(card.allowed_lep_densities.values(),[]): raise InvalidRunCard("Assymetric beam pdf not supported for e e collision with ISR/bemstralung option") elif card['pdlabel1'] == 'none': @@ -3962,7 +3962,7 @@ def check_validity(self, card): dict.__setitem__(card, 'pdlabel2', card['pdlabel']) if abs(card['lpp1']) == 1 == abs(card['lpp2']) and card['pdlabel1'] != card['pdlabel2']: - raise InvalidRunCard("Assymetric beam pdf not supported for proton-proton collision") + raise InvalidRunCard("Assymetric beam pdf not supported for proton-proton collision") def status(self, card): """return False if template_off to be used, True if template_on to be used""" @@ -4028,7 +4028,7 @@ def post_set(card, value, change_userdefine, raiseerror, name='unknown', **opt): if name == 'fixed_fac_scale2' and 'fixed_fac_scale1' not in card.user_set: dict.__setitem__(card, 'fixed_fac_scale1', card['fixed_fac_scale']) if name == 'fixed_fac_scale1' and 'fixed_fac_scale2' not in card.user_set: - dict.__setitem__(card, 'fixed_fac_scale2', card['fixed_fac_scale']) + dict.__setitem__(card, 'fixed_fac_scale2', card['fixed_fac_scale']) def status(self, card): @@ -4061,32 +4061,32 @@ def status(self, card): class RunCardLO(RunCard): """an object to handle in a nice way the run_card information""" - + blocks = [heavy_ion_block, beam_pol_block, syscalc_block, ecut_block, frame_block, eva_scale_block, mlm_block, ckkw_block, psoptim_block, pdlabel_block, fixedfacscale, running_block] dummy_fct_file = {"dummy_cuts": pjoin("SubProcesses","dummy_fct.f"), "get_dummy_x1": pjoin("SubProcesses","dummy_fct.f"), - "get_dummy_x1_x2": pjoin("SubProcesses","dummy_fct.f"), + "get_dummy_x1_x2": pjoin("SubProcesses","dummy_fct.f"), "dummy_boostframe": pjoin("SubProcesses","dummy_fct.f"), "user_dynamical_scale": pjoin("SubProcesses","dummy_fct.f"), "bias_wgt_custom": pjoin("SubProcesses","dummy_fct.f"), "user_": pjoin("SubProcesses","dummy_fct.f") # all function starting by user will be added to that file } - + include_as_parameter = ['vector.inc'] if MG5DIR: default_run_card = pjoin(MG5DIR, "internal", "default_run_card_lo.dat") - + def default_setup(self): """default value for the run_card.dat""" - + self.add_param("run_tag", "tag_1", include=False) self.add_param("gridpack", False) self.add_param("time_of_flight", -1.0, include=False) - self.add_param("nevents", 10000) + self.add_param("nevents", 10000) self.add_param("iseed", 0) self.add_param("python_seed", -2, include=False, hidden=True, comment="controlling python seed [handling in particular the final unweighting].\n -1 means use default from random module.\n -2 means set to same value as iseed") self.add_param("lpp1", 1, fortran_name="lpp(1)", allowed=[-1,1,0,2,3,9,-2,-3,4,-4], @@ -4106,7 +4106,7 @@ def default_setup(self): self.add_param('nb_neutron1', 0, hidden=True, allowed=[1,0, 126 , '*'],fortran_name="nb_neutron(1)", comment='For heavy ion physics nb of neutron in the ion (for both beam but if group_subprocess was False)') self.add_param('nb_neutron2', 0, hidden=True, allowed=[1,0, 126 , '*'],fortran_name="nb_neutron(2)", - comment='For heavy ion physics nb of neutron in the ion (of beam 2 if group_subprocess was False )') + comment='For heavy ion physics nb of neutron in the ion (of beam 2 if group_subprocess was False )') self.add_param('mass_ion1', -1.0, hidden=True, fortran_name="mass_ion(1)", allowed=[-1,0, 0.938, 207.9766521*0.938, 0.000511, 0.105, '*'], comment='For heavy ion physics mass in GeV of the ion (of beam 1)') @@ -4133,11 +4133,11 @@ def default_setup(self): self.add_param("mue_over_ref", 1.0, hidden=True, comment='ratio mu_other/mu for dynamical scale') self.add_param("ievo_eva",0,hidden=True, allowed=[0,1],fortran_name="ievo_eva", comment='eva: 0 for EW pdf muf evolution by q^2; 1 for evo by pT^2') - + # Bias module options self.add_param("bias_module", 'None', include=False, hidden=True) self.add_param('bias_parameters', {'__type__':1.0}, include='BIAS/bias.inc', hidden=True) - + #matching self.add_param("scalefact", 1.0) self.add_param("ickkw", 0, allowed=[0,1], hidden=True, comment="\'0\' for standard fixed order computation.\n\'1\' for MLM merging activates alphas and pdf re-weighting according to a kt clustering of the QCD radiation.") @@ -4221,7 +4221,7 @@ def default_setup(self): self.add_param("mmaa", 0.0, cut='aa') self.add_param("mmll", 0.0, cut='ll') self.add_param("mmjjmax", -1.0, cut='jj') - self.add_param("mmbbmax", -1.0, cut='bb') + self.add_param("mmbbmax", -1.0, cut='bb') self.add_param("mmaamax", -1.0, cut='aa') self.add_param("mmllmax", -1.0, cut='ll') self.add_param("mmnl", 0.0, cut='LL') @@ -4231,9 +4231,9 @@ def default_setup(self): self.add_param("ptllmax", -1.0, cut='ll') self.add_param("xptj", 0.0, cut='jj') self.add_param("xptb", 0.0, cut='bb') - self.add_param("xpta", 0.0, cut='aa') + self.add_param("xpta", 0.0, cut='aa') self.add_param("xptl", 0.0, cut='ll') - # ordered pt jet + # ordered pt jet self.add_param("ptj1min", 0.0, cut='jj') self.add_param("ptj1max", -1.0, cut='jj') self.add_param("ptj2min", 0.0, cut='jj') @@ -4241,7 +4241,7 @@ def default_setup(self): self.add_param("ptj3min", 0.0, cut='jjj') self.add_param("ptj3max", -1.0, cut='jjj') self.add_param("ptj4min", 0.0, cut='j'*4) - self.add_param("ptj4max", -1.0, cut='j'*4) + self.add_param("ptj4max", -1.0, cut='j'*4) self.add_param("cutuse", 0, cut='jj') # ordered pt lepton self.add_param("ptl1min", 0.0, cut='l'*2) @@ -4249,7 +4249,7 @@ def default_setup(self): self.add_param("ptl2min", 0.0, cut='l'*2) self.add_param("ptl2max", -1.0, cut='l'*2) self.add_param("ptl3min", 0.0, cut='l'*3) - self.add_param("ptl3max", -1.0, cut='l'*3) + self.add_param("ptl3max", -1.0, cut='l'*3) self.add_param("ptl4min", 0.0, cut='l'*4) self.add_param("ptl4max", -1.0, cut='l'*4) # Ht sum of jets @@ -4257,7 +4257,7 @@ def default_setup(self): self.add_param("htjmax", -1.0, cut='j'*2) self.add_param("ihtmin", 0.0, cut='J'*2) self.add_param("ihtmax", -1.0, cut='J'*2) - self.add_param("ht2min", 0.0, cut='J'*3) + self.add_param("ht2min", 0.0, cut='J'*3) self.add_param("ht3min", 0.0, cut='J'*3) self.add_param("ht4min", 0.0, cut='J'*4) self.add_param("ht2max", -1.0, cut='J'*3) @@ -4267,7 +4267,7 @@ def default_setup(self): self.add_param("ptgmin", 0.0, cut='aj') self.add_param("r0gamma", 0.4, hidden=True) self.add_param("xn", 1.0, hidden=True) - self.add_param("epsgamma", 1.0, hidden=True) + self.add_param("epsgamma", 1.0, hidden=True) self.add_param("isoem", True, hidden=True) self.add_param("xetamin", 0.0, cut='jj') self.add_param("deltaeta", 0.0, cut='j'*2) @@ -4280,7 +4280,7 @@ def default_setup(self): self.add_param("use_syst", True) self.add_param('systematics_program', 'systematics', include=False, hidden=True, comment='Choose which program to use for systematics computation: none, systematics, syscalc') self.add_param('systematics_arguments', ['--mur=0.5,1,2', '--muf=0.5,1,2', '--pdf=errorset'], include=False, hidden=True, comment='Choose the argment to pass to the systematics command. like --mur=0.25,1,4. Look at the help of the systematics function for more details.') - + self.add_param("sys_scalefact", "0.5 1 2", include=False, hidden=True) self.add_param("sys_alpsfact", "None", include=False, hidden=True) self.add_param("sys_matchscale", "auto", include=False, hidden=True) @@ -4315,8 +4315,8 @@ def default_setup(self): self.add_param('aloha_flag', '', include=False, hidden=True, comment='global fortran compilation flag, suggestion: -ffast-math', fct_mod=(self.make_clean, ('Source/DHELAS'),{})) self.add_param('matrix_flag', '', include=False, hidden=True, comment='fortran compilation flag for the matrix-element files, suggestion -O3', - fct_mod=(self.make_Ptouch, ('matrix'),{})) - self.add_param('vector_size', 1, include='vector.inc', hidden=True, comment='lockstep size for parralelism run', + fct_mod=(self.make_Ptouch, ('matrix'),{})) + self.add_param('vector_size', 1, include='vector.inc', hidden=True, comment='lockstep size for parralelism run', fortran_name='VECSIZE_MEMMAX', fct_mod=(self.reset_simd,(),{})) # parameter allowing to define simple cut via the pdg @@ -4329,24 +4329,24 @@ def default_setup(self): self.add_param('eta_max_pdg',{'__type__':0.}, include=False,cut=True) self.add_param('mxx_min_pdg',{'__type__':0.}, include=False,cut=True) self.add_param('mxx_only_part_antipart', {'default':False}, include=False) - + self.add_param('pdg_cut',[0], system=True) # store which PDG are tracked self.add_param('ptmin4pdg',[0.], system=True) # store pt min self.add_param('ptmax4pdg',[-1.], system=True) self.add_param('Emin4pdg',[0.], system=True) # store pt min - self.add_param('Emax4pdg',[-1.], system=True) + self.add_param('Emax4pdg',[-1.], system=True) self.add_param('etamin4pdg',[0.], system=True) # store pt min - self.add_param('etamax4pdg',[-1.], system=True) + self.add_param('etamax4pdg',[-1.], system=True) self.add_param('mxxmin4pdg',[-1.], system=True) self.add_param('mxxpart_antipart', [False], system=True) - - - + + + def check_validity(self): """ """ - + super(RunCardLO, self).check_validity() - + #Make sure that nhel is only either 0 (i.e. no MC over hel) or #1 (MC over hel with importance sampling). In particular, it can #no longer be > 1. @@ -4357,12 +4357,12 @@ def check_validity(self): "not %s." % self['nhel']) if int(self['maxjetflavor']) > 6: raise InvalidRunCard('maxjetflavor should be lower than 5! (6 is partly supported)') - + if len(self['pdgs_for_merging_cut']) > 1000: raise InvalidRunCard("The number of elements in "+\ "'pdgs_for_merging_cut' should not exceed 1000.") - + # some cut need to be deactivated in presence of isolation if self['ptgmin'] > 0: if self['pta'] > 0: @@ -4370,18 +4370,18 @@ def check_validity(self): self['pta'] = 0.0 if self['draj'] > 0: logger.warning('draj cut discarded since photon isolation is used') - self['draj'] = 0.0 - - # special treatment for gridpack use the gseed instead of the iseed + self['draj'] = 0.0 + + # special treatment for gridpack use the gseed instead of the iseed if self['gridrun']: self['iseed'] = self['gseed'] - + #Some parameter need to be fixed when using syscalc #if self['use_syst']: # if self['scalefact'] != 1.0: # logger.warning('Since use_syst=T, changing the value of \'scalefact\' to 1') # self['scalefact'] = 1.0 - + # CKKW Treatment if self['ickkw'] > 0: if self['ickkw'] != 1: @@ -4399,7 +4399,7 @@ def check_validity(self): raise InvalidRunCard('maxjetflavor at 6 is NOT supported for matching!') if self['ickkw'] == 2: # add warning if ckkw selected but the associate parameter are empty - self.get_default('highestmult', log_level=20) + self.get_default('highestmult', log_level=20) self.get_default('issgridfile', 'issudgrid.dat', log_level=20) if self['xqcut'] > 0: if self['ickkw'] == 0: @@ -4412,13 +4412,13 @@ def check_validity(self): if self['drjl'] != 0: if 'drjl' in self.user_set: logger.warning('Since icckw>0, changing the value of \'drjl\' to 0') - self['drjl'] = 0 - if not self['auto_ptj_mjj']: + self['drjl'] = 0 + if not self['auto_ptj_mjj']: if self['mmjj'] > self['xqcut']: logger.warning('mmjj > xqcut (and auto_ptj_mjj = F). MMJJ set to 0') - self['mmjj'] = 0.0 - - # check validity of the pdf set + self['mmjj'] = 0.0 + + # check validity of the pdf set # note that pdlabel is automatically set to lhapdf if pdlabel1 or pdlabel2 is set to lhapdf if self['pdlabel'] == 'lhapdf': #add warning if lhaid not define @@ -4426,7 +4426,7 @@ def check_validity(self): mod = False for i in [1,2]: - lpp = 'lpp%i' %i + lpp = 'lpp%i' %i pdlabelX = 'pdlabel%i' % i if self[lpp] == 0: # nopdf if self[pdlabelX] != 'none': @@ -4459,12 +4459,12 @@ def check_validity(self): raise InvalidRunCard( "Heavy ion mode is only supported for lpp1=1/2") if self['lpp2'] not in [1,2]: if self['nb_proton2'] !=1 or self['nb_neutron2'] !=0: - raise InvalidRunCard( "Heavy ion mode is only supported for lpp2=1/2") + raise InvalidRunCard( "Heavy ion mode is only supported for lpp2=1/2") # check that fixed_fac_scale(1/2) is setting as expected # if lpp=2/3/4 -> default is that beam in fixed scale - # check that fixed_fac_scale is not setup if fixed_fac_scale1/2 are + # check that fixed_fac_scale is not setup if fixed_fac_scale1/2 are # check that both fixed_fac_scale1/2 are defined together # ensure that fixed_fac_scale1 and fixed_fac_scale2 are setup as needed if 'fixed_fac_scale1' in self.user_set: @@ -4475,13 +4475,13 @@ def check_validity(self): elif 'fixed_fac_scale' in self.user_set: logger.warning('fixed_fac_scale and fixed_fac_scale1 are defined but not fixed_fac_scale2. The value of fixed_fac_scale2 will be set to the one of fixed_fac_scale.') self['fixed_fac_scale2'] = self['fixed_fac_scale'] - elif self['lpp2'] !=0: + elif self['lpp2'] !=0: raise Exception('fixed_fac_scale2 not defined while fixed_fac_scale1 is. Please fix your run_card.') elif 'fixed_fac_scale2' in self.user_set: if 'fixed_fac_scale' in self.user_set: logger.warning('fixed_fac_scale and fixed_fac_scale2 are defined but not fixed_fac_scale1. The value of fixed_fac_scale1 will be set to the one of fixed_fac_scale.') self['fixed_fac_scale1'] = self['fixed_fac_scale'] - elif self['lpp1'] !=0: + elif self['lpp1'] !=0: raise Exception('fixed_fac_scale1 not defined while fixed_fac_scale2 is. Please fix your run_card.') else: if 'fixed_fac_scale' in self.user_set: @@ -4500,12 +4500,12 @@ def check_validity(self): logger.warning('fixed_fac_scale1 not defined whithin your run_card. Using default value: %s', self['fixed_fac_scale1']) logger.warning('fixed_fac_scale2 not defined whithin your run_card. Using default value: %s', self['fixed_fac_scale2']) - # check if lpp = + # check if lpp = if self['pdlabel'] not in sum(self.allowed_lep_densities.values(),[]): for i in [1,2]: if abs(self['lpp%s' % i ]) in [3,4] and self['fixed_fac_scale%s' % i] and self['dsqrt_q2fact%s'%i] == 91.188: logger.warning("Vector boson from lepton PDF is using fixed scale value of muf [dsqrt_q2fact%s]. Looks like you kept the default value (Mz). Is this really the cut-off that you want to use?" % i) - + if abs(self['lpp%s' % i ]) == 2 and self['fixed_fac_scale%s' % i] and self['dsqrt_q2fact%s'%i] == 91.188: if self['pdlabel'] in ['edff','chff']: logger.warning("Since 3.5.0 exclusive photon-photon processes in ultraperipheral proton and nuclear collisions from gamma-UPC (arXiv:2207.03012) will ignore the factorisation scale.") @@ -4515,10 +4515,10 @@ def check_validity(self): if six.PY2 and self['hel_recycling']: self['hel_recycling'] = False - logger.warning("""Helicity recycling optimization requires Python3. This optimzation is therefore deactivated automatically. + logger.warning("""Helicity recycling optimization requires Python3. This optimzation is therefore deactivated automatically. In general this optimization speeds up the computation by a factor of two.""") - + # check that ebeam is bigger than the associated mass. for i in [1,2]: if self['lpp%s' % i ] not in [1,2]: @@ -4529,13 +4529,13 @@ def check_validity(self): logger.warning("At-rest proton mode set: energy beam set to 0.938") self.set('ebeam%i' %i, 0.938) else: - raise InvalidRunCard("Energy for beam %i lower than proton mass. Please fix this") - elif self['ebeam%i' % i] < self['mass_ion%i' % i]: + raise InvalidRunCard("Energy for beam %i lower than proton mass. Please fix this") + elif self['ebeam%i' % i] < self['mass_ion%i' % i]: if self['ebeam%i' %i] == 0: logger.warning("At rest ion mode set: Energy beam set to %s" % self['mass_ion%i' % i]) self.set('ebeam%i' %i, self['mass_ion%i' % i]) - - + + # check the tmin_for_channel is negative if self['tmin_for_channel'] == 0: raise InvalidRunCard('tmin_for_channel can not be set to 0.') @@ -4543,15 +4543,15 @@ def check_validity(self): logger.warning('tmin_for_channel should be negative. Will be using -%f instead' % self['tmin_for_channel']) self.set('tmin_for_channel', -self['tmin_for_channel']) - + def update_system_parameter_for_include(self): """system parameter need to be setupe""" - + # polarization self['frame_id'] = sum(2**(n) for n in self['me_frame']) - + # set the pdg_for_cut fortran parameter - pdg_to_cut = set(list(self['pt_min_pdg'].keys()) +list(self['pt_max_pdg'].keys()) + + pdg_to_cut = set(list(self['pt_min_pdg'].keys()) +list(self['pt_max_pdg'].keys()) + list(self['e_min_pdg'].keys()) +list(self['e_max_pdg'].keys()) + list(self['eta_min_pdg'].keys()) +list(self['eta_max_pdg'].keys())+ list(self['mxx_min_pdg'].keys()) + list(self['mxx_only_part_antipart'].keys())) @@ -4559,15 +4559,15 @@ def update_system_parameter_for_include(self): pdg_to_cut.discard('default') if len(pdg_to_cut)>25: raise Exception("Maximum 25 different pdgs are allowed for pdg specific cut") - + if any(int(pdg)<0 for pdg in pdg_to_cut): logger.warning('PDG specific cuts are always applied symmetrically on particles/anti-particles. Always use positve PDG codes') raise MadGraph5Error('Some PDG specific cuts are defined using negative pdg code') - - + + if any(pdg in pdg_to_cut for pdg in [1,2,3,4,5,21,22,11,13,15]): raise Exception("Can not use PDG related cut for light quark/b quark/lepton/gluon/photon") - + if pdg_to_cut: self['pdg_cut'] = list(pdg_to_cut) self['ptmin4pdg'] = [] @@ -4595,7 +4595,7 @@ def update_system_parameter_for_include(self): self[new_var].append(self[old_var][str(pdg)] if str(pdg) in self[old_var] else default) else: if str(pdg) not in self[old_var]: - raise Exception("no default value defined for %s and no value defined for pdg %s" % (old_var, pdg)) + raise Exception("no default value defined for %s and no value defined for pdg %s" % (old_var, pdg)) self[new_var].append(self[old_var][str(pdg)]) else: self['pdg_cut'] = [0] @@ -4605,11 +4605,11 @@ def update_system_parameter_for_include(self): self['ptmax4pdg'] = [-1.] self['Emax4pdg'] = [-1.] self['etamax4pdg'] =[-1.] - self['mxxmin4pdg'] =[0.] + self['mxxmin4pdg'] =[0.] self['mxxpart_antipart'] = [False] - - - + + + def create_default_for_process(self, proc_characteristic, history, proc_def): """Rules process 1->N all cut set on off. @@ -4626,7 +4626,7 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): if proc_characteristic['loop_induced']: self['nhel'] = 1 self['pdgs_for_merging_cut'] = proc_characteristic['colored_pdgs'] - + if proc_characteristic['ninitial'] == 1: #remove all cut self.remove_all_cut() @@ -4636,7 +4636,7 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): # check for beam_id beam_id = set() beam_id_split = [set(), set()] - for proc in proc_def: + for proc in proc_def: for oneproc in proc: for i,leg in enumerate(oneproc['legs']): if not leg['state']: @@ -4654,20 +4654,20 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): maxjetflavor = max([4]+[abs(i) for i in beam_id if -7< i < 7]) self['maxjetflavor'] = maxjetflavor self['asrwgtflavor'] = maxjetflavor - + if any(i in beam_id for i in [1,-1,2,-2,3,-3,4,-4,5,-5,21,22]): # check for e p collision if any(id in beam_id for id in [11,-11,13,-13]): self.display_block.append('beam_pol') if any(id in beam_id_split[0] for id in [11,-11,13,-13]): - self['lpp1'] = 0 - self['lpp2'] = 1 - self['ebeam1'] = '1k' - self['ebeam2'] = '6500' + self['lpp1'] = 0 + self['lpp2'] = 1 + self['ebeam1'] = '1k' + self['ebeam2'] = '6500' else: - self['lpp1'] = 1 - self['lpp2'] = 0 - self['ebeam1'] = '6500' + self['lpp1'] = 1 + self['lpp2'] = 0 + self['ebeam1'] = '6500' self['ebeam2'] = '1k' # UPC for p p collision @@ -4677,7 +4677,7 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): self['ebeam1'] = '6500' self['ebeam2'] = '6500' self['pdlabel'] = 'edff' - + elif any(id in beam_id for id in [11,-11,13,-13]): self['lpp1'] = 0 self['lpp2'] = 0 @@ -4688,7 +4688,7 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): self.display_block.append('ecut') self.display_block.append('beam_pol') - + # check for possibility of eva eva_in_b1 = any(i in beam_id_split[0] for i in [23,24,-24]) #,12,-12,14,-14]) @@ -4701,10 +4701,10 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): self['nhel'] = 1 self['pdlabel'] = 'eva' self['fixed_fac_scale'] = True - self.display_block.append('beam_pol') + self.display_block.append('beam_pol') elif eva_in_b1: - self.display_block.append('beam_pol') + self.display_block.append('beam_pol') self['pdlabel1'] = 'eva' self['fixed_fac_scale1'] = True self['nhel'] = 1 @@ -4724,7 +4724,7 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): self['pdlabel2'] = 'eva' self['fixed_fac_scale2'] = True self['nhel'] = 1 - self.display_block.append('beam_pol') + self.display_block.append('beam_pol') for i in beam_id_split[0]: if abs(i) == 11: self['lpp1'] = math.copysign(3,i) @@ -4740,34 +4740,34 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): if any(i in beam_id for i in [22,23,24,-24,12,-12,14,-14]): self.display_block.append('eva_scale') - # automatic polarisation of the beam if neutrino beam + # automatic polarisation of the beam if neutrino beam if any(id in beam_id for id in [12,-12,14,-14,16,-16]): self.display_block.append('beam_pol') if any(id in beam_id_split[0] for id in [12,14,16]): - self['lpp1'] = 0 - self['ebeam1'] = '1k' + self['lpp1'] = 0 + self['ebeam1'] = '1k' self['polbeam1'] = -100 if not all(id in [12,14,16] for id in beam_id_split[0]): logger.warning('Issue with default beam setup of neutrino in the run_card. Please check it up [polbeam1]. %s') elif any(id in beam_id_split[0] for id in [-12,-14,-16]): - self['lpp1'] = 0 - self['ebeam1'] = '1k' + self['lpp1'] = 0 + self['ebeam1'] = '1k' self['polbeam1'] = 100 if not all(id in [-12,-14,-16] for id in beam_id_split[0]): - logger.warning('Issue with default beam setup of neutrino in the run_card. Please check it up [polbeam1].') + logger.warning('Issue with default beam setup of neutrino in the run_card. Please check it up [polbeam1].') if any(id in beam_id_split[1] for id in [12,14,16]): - self['lpp2'] = 0 - self['ebeam2'] = '1k' + self['lpp2'] = 0 + self['ebeam2'] = '1k' self['polbeam2'] = -100 if not all(id in [12,14,16] for id in beam_id_split[1]): logger.warning('Issue with default beam setup of neutrino in the run_card. Please check it up [polbeam2].') elif any(id in beam_id_split[1] for id in [-12,-14,-16]): - self['lpp2'] = 0 - self['ebeam2'] = '1k' + self['lpp2'] = 0 + self['ebeam2'] = '1k' self['polbeam2'] = 100 if not all(id in [-12,-14,-16] for id in beam_id_split[1]): logger.warning('Issue with default beam setup of neutrino in the run_card. Please check it up [polbeam2].') - + # Check if need matching min_particle = 99 max_particle = 0 @@ -4798,12 +4798,12 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): else: # all are jet => matching is ON matching=True - break - + break + if matching: self['ickkw'] = 1 self['xqcut'] = 30 - #self['use_syst'] = False + #self['use_syst'] = False self['drjj'] = 0 self['drjl'] = 0 self['sys_alpsfact'] = "0.5 1 2" @@ -4811,8 +4811,8 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): self.display_block.append('mlm') self.display_block.append('ckkw') self['dynamical_scale_choice'] = -1 - - + + # For interference module, the systematics are wrong. # automatically set use_syst=F and set systematics_program=none no_systematics = False @@ -4826,14 +4826,14 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): continue break - + if interference or no_systematics: self['use_syst'] = False self['systematics_program'] = 'none' if interference: self['dynamical_scale_choice'] = 3 self['sde_strategy'] = 2 - + # set default integration strategy # interference case is already handle above # here pick strategy 2 if only one QCD color flow @@ -4852,7 +4852,7 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): if pure_lepton and proton_initial: self['sde_strategy'] = 1 else: - # check if multi-jet j + # check if multi-jet j is_multijet = True for proc in proc_def: if any(abs(j.get('id')) not in jet_id for j in proc[0]['legs']): @@ -4860,7 +4860,7 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): break if is_multijet: self['sde_strategy'] = 2 - + # if polarization is used, set the choice of the frame in the run_card # But only if polarization is used for massive particles for plist in proc_def: @@ -4870,7 +4870,7 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): model = proc.get('model') particle = model.get_particle(l.get('id')) if particle.get('mass').lower() != 'zero': - self.display_block.append('frame') + self.display_block.append('frame') break else: continue @@ -4894,15 +4894,15 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): proc = proc_list[0] if proc['forbidden_onsh_s_channels']: self['sde_strategy'] = 1 - + if 'fix_scale' in proc_characteristic['limitations']: self['fixed_ren_scale'] = 1 self['fixed_fac_scale'] = 1 if self['ickkw'] == 1: logger.critical("MLM matching/merging not compatible with the model! You need to use another method to remove the double counting!") self['ickkw'] = 0 - - # define class of particles present to hide all the cuts associated to + + # define class of particles present to hide all the cuts associated to # not present class cut_class = collections.defaultdict(int) for proc in proc_def: @@ -4925,41 +4925,41 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): one_proc_cut['L'] += 1 elif abs(pdg) in [12,14,16]: one_proc_cut['n'] += 1 - one_proc_cut['L'] += 1 + one_proc_cut['L'] += 1 elif str(oneproc.get('model').get_particle(pdg)['mass']) != 'ZERO': one_proc_cut['H'] += 1 - + for key, nb in one_proc_cut.items(): cut_class[key] = max(cut_class[key], nb) self.cut_class = dict(cut_class) self.cut_class[''] = True #avoid empty - + # If model has running functionality add the additional parameter model = proc_def[0][0].get('model') if model['running_elements']: - self.display_block.append('RUNNING') + self.display_block.append('RUNNING') # Read file input/default_run_card_lo.dat # This has to be LAST !! if os.path.exists(self.default_run_card): self.read(self.default_run_card, consistency=False) - + def write(self, output_file, template=None, python_template=False, **opt): - """Write the run_card in output_file according to template + """Write the run_card in output_file according to template (a path to a valid run_card)""" if not template: if not MADEVENT: - template = pjoin(MG5DIR, 'Template', 'LO', 'Cards', + template = pjoin(MG5DIR, 'Template', 'LO', 'Cards', 'run_card.dat') python_template = True else: template = pjoin(MEDIR, 'Cards', 'run_card_default.dat') python_template = False - + hid_lines = {'default':True}#collections.defaultdict(itertools.repeat(True).next) if isinstance(output_file, str): @@ -4975,9 +4975,9 @@ def write(self, output_file, template=None, python_template=False, hid_lines[k1+k2] = True super(RunCardLO, self).write(output_file, template=template, - python_template=python_template, + python_template=python_template, template_options=hid_lines, - **opt) + **opt) class InvalidMadAnalysis5Card(InvalidCmd): @@ -4986,19 +4986,19 @@ class InvalidMadAnalysis5Card(InvalidCmd): class MadAnalysis5Card(dict): """ A class to store a MadAnalysis5 card. Very basic since it is basically free format.""" - + _MG5aMC_escape_tag = '@MG5aMC' - + _default_hadron_inputs = ['*.hepmc', '*.hep', '*.stdhep', '*.lhco','*.root'] _default_parton_inputs = ['*.lhe'] _skip_analysis = False - + @classmethod def events_can_be_reconstructed(cls, file_path): """ Checks from the type of an event file whether it can be reconstructed or not.""" return not (file_path.endswith('.lhco') or file_path.endswith('.lhco.gz') or \ file_path.endswith('.root') or file_path.endswith('.root.gz')) - + @classmethod def empty_analysis(cls): """ A method returning the structure of an empty analysis """ @@ -5012,7 +5012,7 @@ def empty_reconstruction(cls): 'reco_output':'lhe'} def default_setup(self): - """define the default value""" + """define the default value""" self['mode'] = 'parton' self['inputs'] = [] # None is the default stdout level, it will be set automatically by MG5aMC @@ -5025,8 +5025,8 @@ def default_setup(self): # of this class and some other property could be added to this dictionary # in the future. self['analyses'] = {} - # The recasting structure contains on set of commands and one set of - # card lines. + # The recasting structure contains on set of commands and one set of + # card lines. self['recasting'] = {'commands':[],'card':[]} # Add the default trivial reconstruction to use an lhco input # This is just for the structure @@ -5035,7 +5035,7 @@ def default_setup(self): 'root_input': MadAnalysis5Card.empty_reconstruction()} self['reconstruction']['lhco_input']['reco_output']='lhco' - self['reconstruction']['root_input']['reco_output']='root' + self['reconstruction']['root_input']['reco_output']='root' # Specify in which order the analysis/recasting were specified self['order'] = [] @@ -5049,7 +5049,7 @@ def __init__(self, finput=None,mode=None): return else: dict.__init__(self) - + # Initialize it with all the default value self.default_setup() if not mode is None: @@ -5058,15 +5058,15 @@ def __init__(self, finput=None,mode=None): # if input is define read that input if isinstance(finput, (file, str, StringIO.StringIO)): self.read(finput, mode=mode) - + def read(self, input, mode=None): """ Read an MA5 card""" - + if mode not in [None,'parton','hadron']: raise MadGraph5Error('A MadAnalysis5Card can be read online the modes'+ "'parton' or 'hadron'") card_mode = mode - + if isinstance(input, (file, StringIO.StringIO)): input_stream = input elif isinstance(input, str): @@ -5099,10 +5099,10 @@ def read(self, input, mode=None): except ValueError: option = line[len(self._MG5aMC_escape_tag):] option = option.strip() - + if option=='inputs': self['inputs'].extend([v.strip() for v in value.split(',')]) - + elif option == 'skip_analysis': self._skip_analysis = True @@ -5118,7 +5118,7 @@ def read(self, input, mode=None): except: raise InvalidMadAnalysis5Card( "MA5 output level specification '%s' is incorrect."%str(value)) - + elif option=='analysis_name': current_type = 'analyses' current_name = value @@ -5127,7 +5127,7 @@ def read(self, input, mode=None): "Analysis '%s' already defined in MadAnalysis5 card"%current_name) else: self[current_type][current_name] = MadAnalysis5Card.empty_analysis() - + elif option=='set_reconstructions': try: reconstructions = eval(value) @@ -5142,7 +5142,7 @@ def read(self, input, mode=None): "analysis in a MadAnalysis5 card.") self[current_type][current_name]['reconstructions']=reconstructions continue - + elif option=='reconstruction_name': current_type = 'reconstruction' current_name = value @@ -5161,7 +5161,7 @@ def read(self, input, mode=None): raise InvalidMadAnalysis5Card( "Option '%s' can only take the values 'lhe' or 'root'"%option) self['reconstruction'][current_name]['reco_output'] = value.lower() - + elif option.startswith('recasting'): current_type = 'recasting' try: @@ -5171,11 +5171,11 @@ def read(self, input, mode=None): if len(self['recasting'][current_name])>0: raise InvalidMadAnalysis5Card( "Only one recasting can be defined in MadAnalysis5 hadron card") - + else: raise InvalidMadAnalysis5Card( "Unreckognized MG5aMC instruction in MadAnalysis5 card: '%s'"%option) - + if option in ['analysis_name','reconstruction_name'] or \ option.startswith('recasting'): self['order'].append((current_type,current_name)) @@ -5209,7 +5209,7 @@ def read(self, input, mode=None): self['inputs'] = self._default_hadron_inputs else: self['inputs'] = self._default_parton_inputs - + # Make sure at least one reconstruction is specified for each hadron # level analysis and that it exists. if self['mode']=='hadron': @@ -5221,7 +5221,7 @@ def read(self, input, mode=None): analysis['reconstructions']): raise InvalidMadAnalysis5Card('A reconstructions specified in'+\ " analysis '%s' is not defined."%analysis_name) - + def write(self, output): """ Write an MA5 card.""" @@ -5232,7 +5232,7 @@ def write(self, output): else: raise MadGraph5Error('Incorrect input for the write function of'+\ ' the MadAnalysis5Card card. Received argument type is: %s'%str(type(output))) - + output_lines = [] if self._skip_analysis: output_lines.append('%s skip_analysis'%self._MG5aMC_escape_tag) @@ -5240,11 +5240,11 @@ def write(self, output): if not self['stdout_lvl'] is None: output_lines.append('%s stdout_lvl=%s'%(self._MG5aMC_escape_tag,self['stdout_lvl'])) for definition_type, name in self['order']: - + if definition_type=='analyses': output_lines.append('%s analysis_name = %s'%(self._MG5aMC_escape_tag,name)) output_lines.append('%s set_reconstructions = %s'%(self._MG5aMC_escape_tag, - str(self['analyses'][name]['reconstructions']))) + str(self['analyses'][name]['reconstructions']))) elif definition_type=='reconstruction': output_lines.append('%s reconstruction_name = %s'%(self._MG5aMC_escape_tag,name)) elif definition_type=='recasting': @@ -5254,23 +5254,23 @@ def write(self, output): output_lines.extend(self[definition_type][name]) elif definition_type in ['reconstruction']: output_lines.append('%s reco_output = %s'%(self._MG5aMC_escape_tag, - self[definition_type][name]['reco_output'])) + self[definition_type][name]['reco_output'])) output_lines.extend(self[definition_type][name]['commands']) elif definition_type in ['analyses']: - output_lines.extend(self[definition_type][name]['commands']) - + output_lines.extend(self[definition_type][name]['commands']) + output_stream.write('\n'.join(output_lines)) - + return - - def get_MA5_cmds(self, inputs_arg, submit_folder, run_dir_path=None, + + def get_MA5_cmds(self, inputs_arg, submit_folder, run_dir_path=None, UFO_model_path=None, run_tag=''): - """ Returns a list of tuples ('AnalysisTag',['commands']) specifying - the commands of the MadAnalysis runs required from this card. - At parton-level, the number of such commands is the number of analysis + """ Returns a list of tuples ('AnalysisTag',['commands']) specifying + the commands of the MadAnalysis runs required from this card. + At parton-level, the number of such commands is the number of analysis asked for. In the future, the idea is that the entire card can be processed in one go from MA5 directly.""" - + if isinstance(inputs_arg, list): inputs = inputs_arg elif isinstance(inputs_arg, str): @@ -5278,21 +5278,21 @@ def get_MA5_cmds(self, inputs_arg, submit_folder, run_dir_path=None, else: raise MadGraph5Error("The function 'get_MA5_cmds' can only take "+\ " a string or a list for the argument 'inputs_arg'") - + if len(inputs)==0: raise MadGraph5Error("The function 'get_MA5_cmds' must have "+\ " at least one input specified'") - + if run_dir_path is None: run_dir_path = os.path.dirname(inputs_arg) - + cmds_list = [] - + UFO_load = [] # first import the UFO if provided if UFO_model_path: UFO_load.append('import %s'%UFO_model_path) - + def get_import(input, type=None): """ Generates the MA5 import commands for that event file. """ dataset_name = os.path.basename(input).split('.')[0] @@ -5304,7 +5304,7 @@ def get_import(input, type=None): if not type is None: res.append('set %s.type = %s'%(dataset_name, type)) return res - + fifo_status = {'warned_fifo':False,'fifo_used_up':False} def warn_fifo(input): if not input.endswith('.fifo'): @@ -5317,7 +5317,7 @@ def warn_fifo(input): logger.warning('Only the first MA5 analysis/reconstructions can be run on a fifo. Subsequent runs will skip fifo inputs.') fifo_status['warned_fifo'] = True return True - + # Then the event file(s) input(s) inputs_load = [] for input in inputs: @@ -5325,16 +5325,16 @@ def warn_fifo(input): if len(inputs) > 1: inputs_load.append('set main.stacking_method = superimpose') - + submit_command = 'submit %s'%submit_folder+'_%s' - + # Keep track of the reconstruction outpus in the MA5 workflow # Keys are reconstruction names and values are .lhe.gz reco file paths. # We put by default already the lhco/root ones present reconstruction_outputs = { - 'lhco_input':[f for f in inputs if + 'lhco_input':[f for f in inputs if f.endswith('.lhco') or f.endswith('.lhco.gz')], - 'root_input':[f for f in inputs if + 'root_input':[f for f in inputs if f.endswith('.root') or f.endswith('.root.gz')]} # If a recasting card has to be written out, chose here its path @@ -5343,7 +5343,7 @@ def warn_fifo(input): # Make sure to only run over one analysis over each fifo. for definition_type, name in self['order']: - if definition_type == 'reconstruction': + if definition_type == 'reconstruction': analysis_cmds = list(self['reconstruction'][name]['commands']) reco_outputs = [] for i_input, input in enumerate(inputs): @@ -5365,8 +5365,8 @@ def warn_fifo(input): analysis_cmds.append( submit_command%('reco_%s_%d'%(name,i_input+1))) analysis_cmds.append('remove reco_events') - - reconstruction_outputs[name]= [pjoin(run_dir_path,rec_out) + + reconstruction_outputs[name]= [pjoin(run_dir_path,rec_out) for rec_out in reco_outputs] if len(reco_outputs)>0: cmds_list.append(('_reco_%s'%name,analysis_cmds)) @@ -5386,7 +5386,7 @@ def warn_fifo(input): analysis_cmds = ['set main.mode = parton'] else: analysis_cmds = [] - analysis_cmds.extend(sum([get_import(rec_out) for + analysis_cmds.extend(sum([get_import(rec_out) for rec_out in reconstruction_outputs[reco]],[])) analysis_cmds.extend(self['analyses'][name]['commands']) analysis_cmds.append(submit_command%('%s_%s'%(name,reco))) @@ -5427,12 +5427,12 @@ def warn_fifo(input): %(mue_ref_fixed)s = mue_ref_fixed ! scale to use if fixed scale mode """ running_block_nlo = RunBlock('RUNNING', template_on=template_on, template_off="") - + class RunCardNLO(RunCard): """A class object for the run_card for a (aMC@)NLO pocess""" - + LO = False - + blocks = [running_block_nlo] dummy_fct_file = {"dummy_cuts": pjoin("SubProcesses","dummy_fct.f"), @@ -5443,11 +5443,11 @@ class RunCardNLO(RunCard): if MG5DIR: default_run_card = pjoin(MG5DIR, "internal", "default_run_card_nlo.dat") - - + + def default_setup(self): """define the default value""" - + self.add_param('run_tag', 'tag_1', include=False) self.add_param('nevents', 10000) self.add_param('req_acc', -1.0, include=False) @@ -5455,27 +5455,27 @@ def default_setup(self): self.add_param("time_of_flight", -1.0, include=False) self.add_param('event_norm', 'average') #FO parameter - self.add_param('req_acc_fo', 0.01, include=False) + self.add_param('req_acc_fo', 0.01, include=False) self.add_param('npoints_fo_grid', 5000, include=False) self.add_param('niters_fo_grid', 4, include=False) - self.add_param('npoints_fo', 10000, include=False) + self.add_param('npoints_fo', 10000, include=False) self.add_param('niters_fo', 6, include=False) #seed and collider self.add_param('iseed', 0) - self.add_param('lpp1', 1, fortran_name='lpp(1)') - self.add_param('lpp2', 1, fortran_name='lpp(2)') + self.add_param('lpp1', 1, fortran_name='lpp(1)') + self.add_param('lpp2', 1, fortran_name='lpp(2)') self.add_param('ebeam1', 6500.0, fortran_name='ebeam(1)') - self.add_param('ebeam2', 6500.0, fortran_name='ebeam(2)') + self.add_param('ebeam2', 6500.0, fortran_name='ebeam(2)') self.add_param('pdlabel', 'nn23nlo', allowed=['lhapdf', 'emela', 'cteq6_m','cteq6_d','cteq6_l','cteq6l1', 'nn23lo','nn23lo1','nn23nlo','ct14q00','ct14q07','ct14q14','ct14q21'] +\ - sum(self.allowed_lep_densities.values(),[]) ) + sum(self.allowed_lep_densities.values(),[]) ) self.add_param('lhaid', [244600],fortran_name='lhaPDFid') self.add_param('pdfscheme', 0) # whether to include or not photon-initiated processes in lepton collisions self.add_param('photons_from_lepton', True) self.add_param('lhapdfsetname', ['internal_use_only'], system=True) - # stuff for lepton collisions - # these parameters are in general set automatically by eMELA in a consistent manner with the PDF set - # whether the current PDF set has or not beamstrahlung + # stuff for lepton collisions + # these parameters are in general set automatically by eMELA in a consistent manner with the PDF set + # whether the current PDF set has or not beamstrahlung self.add_param('has_bstrahl', False, system=True) # renormalisation scheme of alpha self.add_param('alphascheme', 0, system=True) @@ -5486,31 +5486,31 @@ def default_setup(self): # w contribution included or not in the running of alpha self.add_param('w_run', 1, system=True) #shower and scale - self.add_param('parton_shower', 'HERWIG6', fortran_name='shower_mc') + self.add_param('parton_shower', 'HERWIG6', fortran_name='shower_mc') self.add_param('shower_scale_factor',1.0) self.add_param('mcatnlo_delta', False) self.add_param('fixed_ren_scale', False) self.add_param('fixed_fac_scale', False) self.add_param('fixed_extra_scale', True, hidden=True, system=True) # set system since running from Ellis-Sexton scale not implemented - self.add_param('mur_ref_fixed', 91.118) + self.add_param('mur_ref_fixed', 91.118) self.add_param('muf1_ref_fixed', -1.0, hidden=True) - self.add_param('muf_ref_fixed', 91.118) + self.add_param('muf_ref_fixed', 91.118) self.add_param('muf2_ref_fixed', -1.0, hidden=True) - self.add_param('mue_ref_fixed', 91.118, hidden=True) - self.add_param("dynamical_scale_choice", [-1],fortran_name='dyn_scale', + self.add_param('mue_ref_fixed', 91.118, hidden=True) + self.add_param("dynamical_scale_choice", [-1],fortran_name='dyn_scale', allowed = [-2,-1,0,1,2,3,10], comment="\'-1\' is based on CKKW back clustering (following feynman diagram).\n \'1\' is the sum of transverse energy.\n '2' is HT (sum of the transverse mass)\n '3' is HT/2, '0' allows to use the user_hook definition (need to be defined via custom_fct entry) ") self.add_param('fixed_qes_scale', False, hidden=True) self.add_param('qes_ref_fixed', -1.0, hidden=True) self.add_param('mur_over_ref', 1.0) - self.add_param('muf_over_ref', 1.0) - self.add_param('muf1_over_ref', -1.0, hidden=True) + self.add_param('muf_over_ref', 1.0) + self.add_param('muf1_over_ref', -1.0, hidden=True) self.add_param('muf2_over_ref', -1.0, hidden=True) self.add_param('mue_over_ref', 1.0, hidden=True, system=True) # forbid the user to modigy due to incorrect handling of the Ellis-Sexton scale self.add_param('qes_over_ref', -1.0, hidden=True) self.add_param('reweight_scale', [True], fortran_name='lscalevar') - self.add_param('rw_rscale_down', -1.0, hidden=True) + self.add_param('rw_rscale_down', -1.0, hidden=True) self.add_param('rw_rscale_up', -1.0, hidden=True) - self.add_param('rw_fscale_down', -1.0, hidden=True) + self.add_param('rw_fscale_down', -1.0, hidden=True) self.add_param('rw_fscale_up', -1.0, hidden=True) self.add_param('rw_rscale', [1.0,2.0,0.5], fortran_name='scalevarR') self.add_param('rw_fscale', [1.0,2.0,0.5], fortran_name='scalevarF') @@ -5523,60 +5523,60 @@ def default_setup(self): #technical self.add_param('folding', [1,1,1], include=False) - + #merging self.add_param('ickkw', 0, allowed=[-1,0,3,4], comment=" - 0: No merging\n - 3: FxFx Merging : http://amcatnlo.cern.ch/FxFx_merging.htm\n - 4: UNLOPS merging (No interface within MG5aMC)\n - -1: NNLL+NLO jet-veto computation. See arxiv:1412.8408 [hep-ph]") self.add_param('bwcutoff', 15.0) - #cuts + #cuts self.add_param('jetalgo', 1.0) - self.add_param('jetradius', 0.7) + self.add_param('jetradius', 0.7) self.add_param('ptj', 10.0 , cut=True) - self.add_param('etaj', -1.0, cut=True) - self.add_param('gamma_is_j', True) + self.add_param('etaj', -1.0, cut=True) + self.add_param('gamma_is_j', True) self.add_param('ptl', 0.0, cut=True) - self.add_param('etal', -1.0, cut=True) + self.add_param('etal', -1.0, cut=True) self.add_param('drll', 0.0, cut=True) - self.add_param('drll_sf', 0.0, cut=True) + self.add_param('drll_sf', 0.0, cut=True) self.add_param('mll', 0.0, cut=True) - self.add_param('mll_sf', 30.0, cut=True) - self.add_param('rphreco', 0.1) - self.add_param('etaphreco', -1.0) - self.add_param('lepphreco', True) - self.add_param('quarkphreco', True) + self.add_param('mll_sf', 30.0, cut=True) + self.add_param('rphreco', 0.1) + self.add_param('etaphreco', -1.0) + self.add_param('lepphreco', True) + self.add_param('quarkphreco', True) self.add_param('ptgmin', 20.0, cut=True) - self.add_param('etagamma', -1.0) + self.add_param('etagamma', -1.0) self.add_param('r0gamma', 0.4) - self.add_param('xn', 1.0) + self.add_param('xn', 1.0) self.add_param('epsgamma', 1.0) - self.add_param('isoem', True) + self.add_param('isoem', True) self.add_param('maxjetflavor', 4, hidden=True) - self.add_param('pineappl', False) + self.add_param('pineappl', False) self.add_param('lhe_version', 3, hidden=True, include=False) - + # customization self.add_param("custom_fcts",[],typelist="str", include=False, comment="list of files containing function that overwritte dummy function of the code (like adding cuts/...)") #internal variable related to FO_analyse_card self.add_param('FO_LHE_weight_ratio',1e-3, hidden=True, system=True) - self.add_param('FO_LHE_postprocessing',['grouping','random'], + self.add_param('FO_LHE_postprocessing',['grouping','random'], hidden=True, system=True, include=False) - + # parameter allowing to define simple cut via the pdg self.add_param('pt_min_pdg',{'__type__':0.}, include=False,cut=True) self.add_param('pt_max_pdg',{'__type__':0.}, include=False,cut=True) self.add_param('mxx_min_pdg',{'__type__':0.}, include=False,cut=True) self.add_param('mxx_only_part_antipart', {'default':False}, include=False, hidden=True) - + #hidden parameter that are transfer to the fortran code self.add_param('pdg_cut',[0], hidden=True, system=True) # store which PDG are tracked self.add_param('ptmin4pdg',[0.], hidden=True, system=True) # store pt min self.add_param('ptmax4pdg',[-1.], hidden=True, system=True) self.add_param('mxxmin4pdg',[0.], hidden=True, system=True) self.add_param('mxxpart_antipart', [False], hidden=True, system=True) - + def check_validity(self): """check the validity of the various input""" - + super(RunCardNLO, self).check_validity() # for lepton-lepton collisions, ignore 'pdlabel' and 'lhaid' @@ -5588,12 +5588,12 @@ def check_validity(self): # for dressed lepton collisions, check that the lhaid is a valid one if self['pdlabel'] not in sum(self.allowed_lep_densities.values(),[]) + ['emela']: raise InvalidRunCard('pdlabel %s not allowed for dressed-lepton collisions' % self['pdlabel']) - + elif self['pdlabel']!='nn23nlo' or self['reweight_pdf']: self['pdlabel']='nn23nlo' self['reweight_pdf']=[False] logger.info('''Lepton-lepton collisions: ignoring PDF related parameters in the run_card.dat (pdlabel, lhaid, reweight_pdf, ...)''') - + if self['lpp1'] == 0 == self['lpp2']: if self['pdlabel']!='nn23nlo' or self['reweight_pdf']: self['pdlabel']='nn23nlo' @@ -5601,8 +5601,8 @@ def check_validity(self): logger.info('''Lepton-lepton collisions: ignoring PDF related parameters in the run_card.dat (pdlabel, lhaid, reweight_pdf, ...)''') # For FxFx merging, make sure that the following parameters are set correctly: - if self['ickkw'] == 3: - # 1. Renormalization and factorization (and ellis-sexton scales) are not fixed + if self['ickkw'] == 3: + # 1. Renormalization and factorization (and ellis-sexton scales) are not fixed scales=['fixed_ren_scale','fixed_fac_scale','fixed_QES_scale'] for scale in scales: if self[scale]: @@ -5615,7 +5615,7 @@ def check_validity(self): self["reweight_scale"]=[self["reweight_scale"][0]] logger.warning('''For consistency in FxFx merging, dynamical_scale_choice has been set to -1 (default)''' ,'$MG:BOLD') - + # 2. Use kT algorithm for jets with pseudo-code size R=1.0 jetparams=['jetradius','jetalgo'] for jetparam in jetparams: @@ -5628,8 +5628,8 @@ def check_validity(self): self["dynamical_scale_choice"] = [-1] self["reweight_scale"]=[self["reweight_scale"][0]] logger.warning('''For consistency with the jet veto, the scale which will be used is ptj. dynamical_scale_choice will be set at -1.''' - ,'$MG:BOLD') - + ,'$MG:BOLD') + # For interface to PINEAPPL, need to use LHAPDF and reweighting to get scale uncertainties if self['pineappl'] and self['pdlabel'].lower() != 'lhapdf': raise InvalidRunCard('PineAPPL generation only possible with the use of LHAPDF') @@ -5661,7 +5661,7 @@ def check_validity(self): if (self['rw_fscale_down'] != -1.0 and ['rw_fscale_down'] not in self['rw_fscale']) or\ (self['rw_fscale_up'] != -1.0 and ['rw_fscale_up'] not in self['rw_fscale']): self['rw_fscale']=[1.0,self['rw_fscale_up'],self['rw_fscale_down']] - + # PDF reweighting check if any(self['reweight_pdf']): # check that we use lhapdf if reweighting is ON @@ -5672,7 +5672,7 @@ def check_validity(self): if self['pdlabel'] != "lhapdf": self['reweight_pdf']=[self['reweight_pdf'][0]] self['lhaid']=[self['lhaid'][0]] - + # make sure set have reweight_scale and dyn_scale_choice of length 1 when fixed scales: if self['fixed_ren_scale'] and self['fixed_fac_scale']: self['reweight_scale']=[self['reweight_scale'][0]] @@ -5685,7 +5685,7 @@ def check_validity(self): self['reweight_pdf']=self['reweight_pdf']*len(self['lhaid']) logger.warning("Setting 'reweight_pdf' for all 'lhaid' to %s" % self['reweight_pdf'][0]) if len(self['reweight_scale']) == 1 and len(self['dynamical_scale_choice']) != 1: - self['reweight_scale']=self['reweight_scale']*len(self['dynamical_scale_choice']) + self['reweight_scale']=self['reweight_scale']*len(self['dynamical_scale_choice']) logger.warning("Setting 'reweight_scale' for all 'dynamical_scale_choice' to %s" % self['reweight_pdf'][0]) # Check that there are no identical elements in lhaid or dynamical_scale_choice @@ -5693,7 +5693,7 @@ def check_validity(self): raise InvalidRunCard("'lhaid' has two or more identical entries. They have to be all different for the code to work correctly.") if len(self['dynamical_scale_choice']) != len(set(self['dynamical_scale_choice'])): raise InvalidRunCard("'dynamical_scale_choice' has two or more identical entries. They have to be all different for the code to work correctly.") - + # Check that lenght of lists are consistent if len(self['reweight_pdf']) != len(self['lhaid']): raise InvalidRunCard("'reweight_pdf' and 'lhaid' lists should have the same length") @@ -5730,7 +5730,7 @@ def check_validity(self): if len(self['folding']) != 3: raise InvalidRunCard("'folding' should contain exactly three integers") for ifold in self['folding']: - if ifold not in [1,2,4,8]: + if ifold not in [1,2,4,8]: raise InvalidRunCard("The three 'folding' parameters should be equal to 1, 2, 4, or 8.") # Check MC@NLO-Delta if self['mcatnlo_delta'] and not self['parton_shower'].lower() == 'pythia8': @@ -5746,11 +5746,11 @@ def check_validity(self): logger.warning("At-rest proton mode set: energy beam set to 0.938 GeV") self.set('ebeam%i' %i, 0.938) else: - raise InvalidRunCard("Energy for beam %i lower than proton mass. Please fix this") + raise InvalidRunCard("Energy for beam %i lower than proton mass. Please fix this") def update_system_parameter_for_include(self): - + # set the pdg_for_cut fortran parameter pdg_to_cut = set(list(self['pt_min_pdg'].keys()) +list(self['pt_max_pdg'].keys())+ list(self['mxx_min_pdg'].keys())+ list(self['mxx_only_part_antipart'].keys())) @@ -5758,12 +5758,12 @@ def update_system_parameter_for_include(self): pdg_to_cut.discard('default') if len(pdg_to_cut)>25: raise Exception("Maximum 25 different PDGs are allowed for PDG specific cut") - + if any(int(pdg)<0 for pdg in pdg_to_cut): logger.warning('PDG specific cuts are always applied symmetrically on particles/anti-particles. Always use positve PDG codes') raise MadGraph5Error('Some PDG specific cuts are defined using negative PDG codes') - - + + if any(pdg in pdg_to_cut for pdg in [21,22,11,13,15]+ list(range(self['maxjetflavor']+1))): # Note that this will double check in the fortran code raise Exception("Can not use PDG related cuts for massless SM particles/leptons") @@ -5790,7 +5790,7 @@ def update_system_parameter_for_include(self): self[new_var].append(self[old_var][str(pdg)] if str(pdg) in self[old_var] else default) else: if str(pdg) not in self[old_var]: - raise Exception("no default value defined for %s and no value defined for pdg %s" % (old_var, pdg)) + raise Exception("no default value defined for %s and no value defined for pdg %s" % (old_var, pdg)) self[new_var].append(self[old_var][str(pdg)]) else: self['pdg_cut'] = [0] @@ -5800,12 +5800,12 @@ def update_system_parameter_for_include(self): self['mxxpart_antipart'] = [False] def write(self, output_file, template=None, python_template=False, **opt): - """Write the run_card in output_file according to template + """Write the run_card in output_file according to template (a path to a valid run_card)""" if not template: if not MADEVENT: - template = pjoin(MG5DIR, 'Template', 'NLO', 'Cards', + template = pjoin(MG5DIR, 'Template', 'NLO', 'Cards', 'run_card.dat') python_template = True else: @@ -5818,7 +5818,7 @@ def write(self, output_file, template=None, python_template=False, **opt): def create_default_for_process(self, proc_characteristic, history, proc_def): """Rules - e+ e- beam -> lpp:0 ebeam:500 + e+ e- beam -> lpp:0 ebeam:500 p p beam -> set maxjetflavor automatically process with tagged photons -> gamma_is_j = false process without QED splittings -> gamma_is_j = false, recombination = false @@ -5844,19 +5844,19 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): self['ebeam2'] = 500 else: self['lpp1'] = 0 - self['lpp2'] = 0 - + self['lpp2'] = 0 + if proc_characteristic['ninitial'] == 1: #remove all cut self.remove_all_cut() # check for tagged photons tagged_particles = set() - + # If model has running functionality add the additional parameter model = proc_def[0].get('model') if model['running_elements']: - self.display_block.append('RUNNING') + self.display_block.append('RUNNING') # Check if need matching min_particle = 99 @@ -5885,7 +5885,7 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): else: idsmin = [l['id'] for l in procmin['legs']] break - + for procmax in proc_def: if len(procmax['legs']) != max_particle: continue @@ -5901,9 +5901,9 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): else: # all are jet => matching is ON matching=True - break - - if matching: + break + + if matching: self['ickkw'] = 3 self['fixed_ren_scale'] = False self["fixed_fac_scale"] = False @@ -5911,17 +5911,17 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): self["jetalgo"] = 1 self["jetradius"] = 1 self["parton_shower"] = "PYTHIA8" - + # Read file input/default_run_card_nlo.dat # This has to be LAST !! if os.path.exists(self.default_run_card): self.read(self.default_run_card, consistency=False) - + class MadLoopParam(ConfigFile): """ a class for storing/dealing with the file MadLoopParam.dat contains a parser to read it, facilities to write a new file,... """ - + _ID_reduction_tool_map = {1:'CutTools', 2:'PJFry++', 3:'IREGI', @@ -5929,10 +5929,10 @@ class MadLoopParam(ConfigFile): 5:'Samurai', 6:'Ninja', 7:'COLLIER'} - + def default_setup(self): """initialize the directory to the default value""" - + self.add_param("MLReductionLib", "6|7|1") self.add_param("IREGIMODE", 2) self.add_param("IREGIRECY", True) @@ -5954,7 +5954,7 @@ def default_setup(self): self.add_param("HelicityFilterLevel", 2) self.add_param("LoopInitStartOver", False) self.add_param("HelInitStartOver", False) - self.add_param("UseQPIntegrandForNinja", True) + self.add_param("UseQPIntegrandForNinja", True) self.add_param("UseQPIntegrandForCutTools", True) self.add_param("COLLIERMode", 1) self.add_param("COLLIERComputeUVpoles", True) @@ -5966,9 +5966,9 @@ def default_setup(self): self.add_param("COLLIERUseInternalStabilityTest",True) def read(self, finput): - """Read the input file, this can be a path to a file, + """Read the input file, this can be a path to a file, a file object, a str with the content of the file.""" - + if isinstance(finput, str): if "\n" in finput: finput = finput.split('\n') @@ -5976,7 +5976,7 @@ def read(self, finput): finput = open(finput) else: raise Exception("No such file %s" % input) - + previous_line= '' for line in finput: if previous_line.startswith('#'): @@ -5985,20 +5985,20 @@ def read(self, finput): if len(value) and value[0] not in ['#', '!']: self.__setitem__(name, value, change_userdefine=True) previous_line = line - - + + def write(self, outputpath, template=None,commentdefault=False): - + if not template: if not MADEVENT: - template = pjoin(MG5DIR, 'Template', 'loop_material', 'StandAlone', + template = pjoin(MG5DIR, 'Template', 'loop_material', 'StandAlone', 'Cards', 'MadLoopParams.dat') else: template = pjoin(MEDIR, 'Cards', 'MadLoopParams_default.dat') fsock = open(template, 'r') template = fsock.readlines() fsock.close() - + if isinstance(outputpath, str): output = open(outputpath, 'w') else: @@ -6019,7 +6019,7 @@ def f77format(value): return value else: raise Exception("Can not format input %s" % type(value)) - + name = '' done = set() for line in template: @@ -6034,12 +6034,12 @@ def f77format(value): elif line.startswith('#'): name = line[1:].split()[0] output.write(line) - - - - - -class eMELA_info(ConfigFile): + + + + + +class eMELA_info(ConfigFile): """ a class for eMELA (LHAPDF-like) info files """ path = '' @@ -6053,7 +6053,7 @@ def __init__(self, finput, me_dir): def read(self, finput): - if isinstance(finput, file): + if isinstance(finput, file): lines = finput.open().read().split('\n') self.path = finput.name else: @@ -6066,7 +6066,7 @@ def read(self, finput): k, v = l.split(':', 1) # ignore further occurrences of : try: self[k.strip()] = eval(v) - except (NameError, SyntaxError): + except (NameError, SyntaxError): self[k.strip()] = v def default_setup(self): @@ -6091,7 +6091,7 @@ def update_epdf_emela_variables(self, banner, uvscheme): +"powers of alpha should be reweighted a posteriori") - logger.info('Updating variables according to %s' % self.path) + logger.info('Updating variables according to %s' % self.path) # Flavours in the running of alpha nd, nu, nl = self['eMELA_ActiveFlavoursAlpha'] self.log_and_update(banner, 'run_card', 'ndnq_run', nd) @@ -6130,8 +6130,8 @@ def update_epdf_emela_variables(self, banner, uvscheme): logger.warning('Cannot treat the following renormalisation schemes for ME and PDFs: %d, %d' \ % (uvscheme, uvscheme_pdf)) - # if PDFs use MSbar with fixed alpha, set the ren scale fixed to Qref - # also check that the com energy is equal to qref, otherwise print a + # if PDFs use MSbar with fixed alpha, set the ren scale fixed to Qref + # also check that the com energy is equal to qref, otherwise print a # warning if uvscheme_pdf == 1: qref = self['eMELA_AlphaQref'] @@ -6144,23 +6144,23 @@ def update_epdf_emela_variables(self, banner, uvscheme): # LL / NLL PDF (0/1) pdforder = self['eMELA_PerturbativeOrder'] - # pdfscheme = 0->MSbar; 1->DIS; 2->eta (leptonic); 3->beta (leptonic) + # pdfscheme = 0->MSbar; 1->DIS; 2->eta (leptonic); 3->beta (leptonic) # 4->mixed (leptonic); 5-> nobeta (leptonic); 6->delta (leptonic) # if LL, use nobeta scheme unless LEGACYLLPDF > 0 if pdforder == 0: if 'eMELA_LEGACYLLPDF' not in self.keys() or self['eMELA_LEGACYLLPDF'] in [-1, 0]: self.log_and_update(banner, 'run_card', 'pdfscheme', 5) - elif self['eMELA_LEGACYLLPDF'] == 1: + elif self['eMELA_LEGACYLLPDF'] == 1: # mixed self.log_and_update(banner, 'run_card', 'pdfscheme', 4) - elif self['eMELA_LEGACYLLPDF'] == 2: + elif self['eMELA_LEGACYLLPDF'] == 2: # eta self.log_and_update(banner, 'run_card', 'pdfscheme', 2) - elif self['eMELA_LEGACYLLPDF'] == 3: + elif self['eMELA_LEGACYLLPDF'] == 3: # beta self.log_and_update(banner, 'run_card', 'pdfscheme', 3) elif pdforder == 1: - # for NLL, use eMELA_FactorisationSchemeInt = 0/1 + # for NLL, use eMELA_FactorisationSchemeInt = 0/1 # for delta/MSbar if self['eMELA_FactorisationSchemeInt'] == 0: # MSbar @@ -6177,7 +6177,7 @@ def update_epdf_emela_variables(self, banner, uvscheme): - + def log_and_update(self, banner, card, par, v): """update the card parameter par to value v diff --git a/epochX/cudacpp/gg_ttggg.mad/bin/internal/gen_ximprove.py b/epochX/cudacpp/gg_ttggg.mad/bin/internal/gen_ximprove.py index 5fd170d18d..cc842aa50f 100755 --- a/epochX/cudacpp/gg_ttggg.mad/bin/internal/gen_ximprove.py +++ b/epochX/cudacpp/gg_ttggg.mad/bin/internal/gen_ximprove.py @@ -2,18 +2,18 @@ # # Copyright (c) 2014 The MadGraph5_aMC@NLO Development team and Contributors # -# This file is a part of the MadGraph5_aMC@NLO project, an application which +# This file is a part of the MadGraph5_aMC@NLO project, an application which # automatically generates Feynman diagrams and matrix elements for arbitrary # high-energy processes in the Standard Model and beyond. # -# It is subject to the MadGraph5_aMC@NLO license which should accompany this +# It is subject to the MadGraph5_aMC@NLO license which should accompany this # distribution. # # For more information, visit madgraph.phys.ucl.ac.be and amcatnlo.web.cern.ch # ################################################################################ """ A python file to replace the fortran script gen_ximprove. - This script analyses the result of the survey/ previous refine and + This script analyses the result of the survey/ previous refine and creates the jobs for the following script. """ from __future__ import division @@ -66,77 +66,77 @@ class gensym(object): """a class to call the fortran gensym executable and handle it's output in order to create the various job that are needed for the survey""" - + #convenient shortcut for the formatting of variable @ staticmethod def format_variable(*args): return bannermod.ConfigFile.format_variable(*args) - + combining_job = 2 # number of channel by ajob - splitted_grid = False + splitted_grid = False min_iterations = 3 mode= "survey" - + def __init__(self, cmd, opt=None): - + try: super(gensym, self).__init__(cmd, opt) except TypeError: pass - - # Run statistics, a dictionary of RunStatistics(), with + + # Run statistics, a dictionary of RunStatistics(), with self.run_statistics = {} - + self.cmd = cmd self.run_card = cmd.run_card self.me_dir = cmd.me_dir - - + + # dictionary to keep track of the precision when combining iteration self.cross = collections.defaultdict(int) self.abscross = collections.defaultdict(int) self.sigma = collections.defaultdict(int) self.chi2 = collections.defaultdict(int) - + self.splitted_grid = False if self.cmd.proc_characteristics['loop_induced']: nexternal = self.cmd.proc_characteristics['nexternal'] self.splitted_grid = max(2, (nexternal-2)**2) if hasattr(self.cmd, "opts") and self.cmd.opts['accuracy'] == 0.1: self.cmd.opts['accuracy'] = 0.02 - + if isinstance(cmd.cluster, cluster.MultiCore) and self.splitted_grid > 1: self.splitted_grid = int(cmd.cluster.nb_core**0.5) if self.splitted_grid == 1 and cmd.cluster.nb_core >1: self.splitted_grid = 2 - + #if the user defines it in the run_card: if self.run_card['survey_splitting'] != -1: self.splitted_grid = self.run_card['survey_splitting'] if self.run_card['survey_nchannel_per_job'] != 1 and 'survey_nchannel_per_job' in self.run_card.user_set: - self.combining_job = self.run_card['survey_nchannel_per_job'] + self.combining_job = self.run_card['survey_nchannel_per_job'] elif self.run_card['hard_survey'] > 1: self.combining_job = 1 - - + + self.splitted_Pdir = {} self.splitted_for_dir = lambda x,y: self.splitted_grid self.combining_job_for_Pdir = lambda x: self.combining_job self.lastoffset = {} - + done_warning_zero_coupling = False def get_helicity(self, to_submit=True, clean=True): """launch a single call to madevent to get the list of non zero helicity""" - - self.subproc = [l.strip() for l in open(pjoin(self.me_dir,'SubProcesses', + + self.subproc = [l.strip() for l in open(pjoin(self.me_dir,'SubProcesses', 'subproc.mg'))] subproc = self.subproc P_zero_result = [] nb_tot_proc = len(subproc) - job_list = {} - - + job_list = {} + + for nb_proc,subdir in enumerate(subproc): self.cmd.update_status('Compiling for process %s/%s.' % \ (nb_proc+1,nb_tot_proc), level=None) @@ -154,7 +154,7 @@ def get_helicity(self, to_submit=True, clean=True): p = misc.Popen(['./gensym'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT, cwd=Pdir) #sym_input = "%(points)d %(iterations)d %(accuracy)f \n" % self.opts - + (stdout, _) = p.communicate(''.encode()) stdout = stdout.decode('ascii',errors='ignore') if stdout: @@ -166,11 +166,11 @@ def get_helicity(self, to_submit=True, clean=True): if os.path.exists(pjoin(self.me_dir, 'error')): os.remove(pjoin(self.me_dir, 'error')) continue # bypass bad process - + self.cmd.compile(['madevent_forhel'], cwd=Pdir) if not os.path.exists(pjoin(Pdir, 'madevent_forhel')): - raise Exception('Error make madevent_forhel not successful') - + raise Exception('Error make madevent_forhel not successful') + if not os.path.exists(pjoin(Pdir, 'Hel')): os.mkdir(pjoin(Pdir, 'Hel')) ff = open(pjoin(Pdir, 'Hel', 'input_app.txt'),'w') @@ -180,15 +180,15 @@ def get_helicity(self, to_submit=True, clean=True): try: os.remove(pjoin(Pdir, 'Hel','results.dat')) except Exception: - pass + pass # Launch gensym - p = misc.Popen(['../madevent_forhel < input_app.txt'], stdout=subprocess.PIPE, + p = misc.Popen(['../madevent_forhel < input_app.txt'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT, cwd=pjoin(Pdir,'Hel'), shell=True) #sym_input = "%(points)d %(iterations)d %(accuracy)f \n" % self.opts (stdout, _) = p.communicate(" ".encode()) stdout = stdout.decode('ascii',errors='ignore') if os.path.exists(pjoin(self.me_dir, 'error')): - raise Exception(pjoin(self.me_dir,'error')) + raise Exception(pjoin(self.me_dir,'error')) # note a continue is not enough here, we have in top to link # the matrixX_optim.f to matrixX_orig.f to let the code to work # after this error. @@ -203,7 +203,7 @@ def get_helicity(self, to_submit=True, clean=True): zero_gc = list() all_zampperhel = set() all_bad_amps_perhel = set() - + for line in stdout.splitlines(): if "=" not in line and ":" not in line: continue @@ -229,22 +229,22 @@ def get_helicity(self, to_submit=True, clean=True): "%s\n" % (' '.join(zero_gc)) +\ "This will slow down the computation. Please consider using restricted model:\n" +\ "https://answers.launchpad.net/mg5amcnlo/+faq/2312") - - + + all_good_hels = collections.defaultdict(list) for me_index, hel in all_hel: - all_good_hels[me_index].append(int(hel)) - + all_good_hels[me_index].append(int(hel)) + #print(all_hel) if self.run_card['hel_zeroamp']: all_bad_amps = collections.defaultdict(list) for me_index, amp in all_zamp: all_bad_amps[me_index].append(int(amp)) - + all_bad_amps_perhel = collections.defaultdict(list) for me_index, hel, amp in all_zampperhel: - all_bad_amps_perhel[me_index].append((int(hel),int(amp))) - + all_bad_amps_perhel[me_index].append((int(hel),int(amp))) + elif all_zamp: nb_zero = sum(int(a[1]) for a in all_zamp) if zero_gc: @@ -254,7 +254,7 @@ def get_helicity(self, to_submit=True, clean=True): else: logger.warning("The optimization detected that you have %i zero matrix-element for this SubProcess: %s.\n" % nb_zero +\ "This part can optimize if you set the flag hel_zeroamp to True in the run_card.") - + #check if we need to do something and write associate information" data = [all_hel, all_zamp, all_bad_amps_perhel] if not self.run_card['hel_zeroamp']: @@ -266,14 +266,14 @@ def get_helicity(self, to_submit=True, clean=True): old_data = open(pjoin(Pdir,'Hel','selection')).read() if old_data == data: continue - - + + with open(pjoin(Pdir,'Hel','selection'),'w') as fsock: - fsock.write(data) - - + fsock.write(data) + + for matrix_file in misc.glob('matrix*orig.f', Pdir): - + split_file = matrix_file.split('/') me_index = split_file[-1][len('matrix'):-len('_orig.f')] @@ -289,11 +289,11 @@ def get_helicity(self, to_submit=True, clean=True): #good_hels = sorted(list(good_hels)) good_hels = [str(x) for x in sorted(all_good_hels[me_index])] if self.run_card['hel_zeroamp']: - + bad_amps = [str(x) for x in sorted(all_bad_amps[me_index])] bad_amps_perhel = [x for x in sorted(all_bad_amps_perhel[me_index])] else: - bad_amps = [] + bad_amps = [] bad_amps_perhel = [] if __debug__: mtext = open(matrix_file).read() @@ -310,7 +310,7 @@ def get_helicity(self, to_submit=True, clean=True): recycler.set_input(matrix_file) recycler.set_output(out_file) - recycler.set_template(templ_file) + recycler.set_template(templ_file) recycler.generate_output_file() del recycler @@ -321,19 +321,19 @@ def get_helicity(self, to_submit=True, clean=True): return {}, P_zero_result - + def launch(self, to_submit=True, clean=True): """ """ if not hasattr(self, 'subproc'): - self.subproc = [l.strip() for l in open(pjoin(self.me_dir,'SubProcesses', + self.subproc = [l.strip() for l in open(pjoin(self.me_dir,'SubProcesses', 'subproc.mg'))] subproc = self.subproc - + P_zero_result = [] # check the number of times where they are no phase-space - + nb_tot_proc = len(subproc) - job_list = {} + job_list = {} for nb_proc,subdir in enumerate(subproc): self.cmd.update_status('Compiling for process %s/%s.
(previous processes already running)' % \ (nb_proc+1,nb_tot_proc), level=None) @@ -341,7 +341,7 @@ def launch(self, to_submit=True, clean=True): subdir = subdir.strip() Pdir = pjoin(self.me_dir, 'SubProcesses',subdir) logger.info(' %s ' % subdir) - + # clean previous run if clean: for match in misc.glob('*ajob*', Pdir): @@ -349,17 +349,17 @@ def launch(self, to_submit=True, clean=True): os.remove(match) for match in misc.glob('G*', Pdir): if os.path.exists(pjoin(match,'results.dat')): - os.remove(pjoin(match, 'results.dat')) + os.remove(pjoin(match, 'results.dat')) if os.path.exists(pjoin(match, 'ftn25')): - os.remove(pjoin(match, 'ftn25')) - + os.remove(pjoin(match, 'ftn25')) + #compile gensym self.cmd.compile(['gensym'], cwd=Pdir) if not os.path.exists(pjoin(Pdir, 'gensym')): - raise Exception('Error make gensym not successful') - + raise Exception('Error make gensym not successful') + # Launch gensym - p = misc.Popen(['./gensym'], stdout=subprocess.PIPE, + p = misc.Popen(['./gensym'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT, cwd=Pdir) #sym_input = "%(points)d %(iterations)d %(accuracy)f \n" % self.opts (stdout, _) = p.communicate(''.encode()) @@ -367,8 +367,8 @@ def launch(self, to_submit=True, clean=True): if os.path.exists(pjoin(self.me_dir,'error')): files.mv(pjoin(self.me_dir,'error'), pjoin(Pdir,'ajob.no_ps.log')) P_zero_result.append(subdir) - continue - + continue + jobs = stdout.split() job_list[Pdir] = jobs try: @@ -386,8 +386,8 @@ def launch(self, to_submit=True, clean=True): continue else: if done: - raise Exception('Parsing error in gensym: %s' % stdout) - job_list[Pdir] = l.split() + raise Exception('Parsing error in gensym: %s' % stdout) + job_list[Pdir] = l.split() done = True if not done: raise Exception('Parsing error in gensym: %s' % stdout) @@ -408,16 +408,16 @@ def launch(self, to_submit=True, clean=True): if to_submit: self.submit_to_cluster(job_list) job_list = {} - + return job_list, P_zero_result - + def resubmit(self, min_precision=1.0, resubmit_zero=False): """collect the result of the current run and relaunch each channel - not completed or optionally a completed one with a precision worse than + not completed or optionally a completed one with a precision worse than a threshold (and/or the zero result channel)""" - + job_list, P_zero_result = self.launch(to_submit=False, clean=False) - + for P , jobs in dict(job_list).items(): misc.sprint(jobs) to_resub = [] @@ -434,7 +434,7 @@ def resubmit(self, min_precision=1.0, resubmit_zero=False): elif max(one_result.xerru, one_result.xerrc)/one_result.xsec > min_precision: to_resub.append(job) else: - to_resub.append(job) + to_resub.append(job) if to_resub: for G in to_resub: try: @@ -442,19 +442,19 @@ def resubmit(self, min_precision=1.0, resubmit_zero=False): except Exception as error: misc.sprint(error) pass - misc.sprint(to_resub) + misc.sprint(to_resub) self.submit_to_cluster({P: to_resub}) - - - - - - - - - - - + + + + + + + + + + + def submit_to_cluster(self, job_list): """ """ @@ -467,7 +467,7 @@ def submit_to_cluster(self, job_list): nexternal = self.cmd.proc_characteristics['nexternal'] current = open(pjoin(path, "nexternal.inc")).read() ext = re.search(r"PARAMETER \(NEXTERNAL=(\d+)\)", current).group(1) - + if self.run_card['job_strategy'] == 2: self.splitted_grid = 2 if nexternal == int(ext): @@ -498,18 +498,18 @@ def submit_to_cluster(self, job_list): return self.submit_to_cluster_no_splitting(job_list) else: return self.submit_to_cluster_splitted(job_list) - - + + def submit_to_cluster_no_splitting(self, job_list): """submit the survey without the parralelization. This is the old mode which is still usefull in single core""" - - # write the template file for the parameter file + + # write the template file for the parameter file self.write_parameter(parralelization=False, Pdirs=list(job_list.keys())) - - + + # launch the job with the appropriate grouping - for Pdir, jobs in job_list.items(): + for Pdir, jobs in job_list.items(): jobs = list(jobs) i=0 while jobs: @@ -518,16 +518,16 @@ def submit_to_cluster_no_splitting(self, job_list): for _ in range(self.combining_job_for_Pdir(Pdir)): if jobs: to_submit.append(jobs.pop(0)) - + self.cmd.launch_job(pjoin(self.me_dir, 'SubProcesses', 'survey.sh'), argument=to_submit, cwd=pjoin(self.me_dir,'SubProcesses' , Pdir)) - + def create_resubmit_one_iter(self, Pdir, G, submit_ps, nb_job, step=0): """prepare the input_file for submitting the channel""" - + if 'SubProcesses' not in Pdir: Pdir = pjoin(self.me_dir, 'SubProcesses', Pdir) @@ -535,8 +535,8 @@ def create_resubmit_one_iter(self, Pdir, G, submit_ps, nb_job, step=0): self.splitted_Pdir[(Pdir, G)] = int(nb_job) - # 1. write the new input_app.txt - run_card = self.cmd.run_card + # 1. write the new input_app.txt + run_card = self.cmd.run_card options = {'event' : submit_ps, 'maxiter': 1, 'miniter': 1, @@ -545,29 +545,29 @@ def create_resubmit_one_iter(self, Pdir, G, submit_ps, nb_job, step=0): else run_card['nhel'], 'gridmode': -2, 'channel' : G - } - + } + Gdir = pjoin(Pdir, 'G%s' % G) - self.write_parameter_file(pjoin(Gdir, 'input_app.txt'), options) - + self.write_parameter_file(pjoin(Gdir, 'input_app.txt'), options) + # 2. check that ftn25 exists. - assert os.path.exists(pjoin(Gdir, "ftn25")) - - + assert os.path.exists(pjoin(Gdir, "ftn25")) + + # 3. Submit the new jobs #call back function - packet = cluster.Packet((Pdir, G, step+1), + packet = cluster.Packet((Pdir, G, step+1), self.combine_iteration, (Pdir, G, step+1)) - + if step ==0: - self.lastoffset[(Pdir, G)] = 0 - - # resubmit the new jobs + self.lastoffset[(Pdir, G)] = 0 + + # resubmit the new jobs for i in range(int(nb_job)): name = "G%s_%s" % (G,i+1) self.lastoffset[(Pdir, G)] += 1 - offset = self.lastoffset[(Pdir, G)] + offset = self.lastoffset[(Pdir, G)] self.cmd.launch_job(pjoin(self.me_dir, 'SubProcesses', 'refine_splitted.sh'), argument=[name, 'G%s'%G, offset], cwd= Pdir, @@ -575,9 +575,9 @@ def create_resubmit_one_iter(self, Pdir, G, submit_ps, nb_job, step=0): def submit_to_cluster_splitted(self, job_list): - """ submit the version of the survey with splitted grid creation - """ - + """ submit the version of the survey with splitted grid creation + """ + #if self.splitted_grid <= 1: # return self.submit_to_cluster_no_splitting(job_list) @@ -592,7 +592,7 @@ def submit_to_cluster_splitted(self, job_list): for job in jobs: packet = cluster.Packet((Pdir, job, 1), self.combine_iteration, (Pdir, job, 1)) - for i in range(self.splitted_for_dir(Pdir, job)): + for i in range(self.splitted_for_dir(Pdir, job)): self.cmd.launch_job(pjoin(self.me_dir, 'SubProcesses', 'survey.sh'), argument=[i+1, job], cwd=pjoin(self.me_dir,'SubProcesses' , Pdir), @@ -601,15 +601,15 @@ def submit_to_cluster_splitted(self, job_list): def combine_iteration(self, Pdir, G, step): grid_calculator, cross, error = self.combine_grid(Pdir, G, step) - - # Compute the number of events used for this run. + + # Compute the number of events used for this run. nb_events = grid_calculator.target_evt Gdirs = [] #build the the list of directory for i in range(self.splitted_for_dir(Pdir, G)): path = pjoin(Pdir, "G%s_%s" % (G, i+1)) Gdirs.append(path) - + # 4. make the submission of the next iteration # Three cases - less than 3 iteration -> continue # - more than 3 and less than 5 -> check error @@ -627,15 +627,15 @@ def combine_iteration(self, Pdir, G, step): need_submit = False else: need_submit = True - + elif step >= self.cmd.opts['iterations']: need_submit = False elif self.cmd.opts['accuracy'] < 0: #check for luminosity raise Exception("Not Implemented") elif self.abscross[(Pdir,G)] == 0: - need_submit = False - else: + need_submit = False + else: across = self.abscross[(Pdir,G)]/(self.sigma[(Pdir,G)]+1e-99) tot_across = self.get_current_axsec() if across == 0: @@ -646,20 +646,20 @@ def combine_iteration(self, Pdir, G, step): need_submit = True else: need_submit = False - - + + if cross: grid_calculator.write_grid_for_submission(Pdir,G, self.splitted_for_dir(Pdir, G), nb_events,mode=self.mode, conservative_factor=5.0) - - xsec_format = '.%ig'%(max(3,int(math.log10(1.0/float(error)))+2) - if float(cross)!=0.0 and float(error)!=0.0 else 8) + + xsec_format = '.%ig'%(max(3,int(math.log10(1.0/float(error)))+2) + if float(cross)!=0.0 and float(error)!=0.0 else 8) if need_submit: message = "%%s/G%%s is at %%%s +- %%.3g pb. Now submitting iteration #%s."%(xsec_format, step+1) logger.info(message%\ - (os.path.basename(Pdir), G, float(cross), + (os.path.basename(Pdir), G, float(cross), float(error)*float(cross))) self.resubmit_survey(Pdir,G, Gdirs, step) elif cross: @@ -670,26 +670,26 @@ def combine_iteration(self, Pdir, G, step): newGpath = pjoin(self.me_dir,'SubProcesses' , Pdir, 'G%s' % G) if not os.path.exists(newGpath): os.mkdir(newGpath) - + # copy the new grid: - files.cp(pjoin(Gdirs[0], 'ftn25'), + files.cp(pjoin(Gdirs[0], 'ftn25'), pjoin(self.me_dir,'SubProcesses' , Pdir, 'G%s' % G, 'ftn26')) - + # copy the events fsock = open(pjoin(newGpath, 'events.lhe'), 'w') for Gdir in Gdirs: - fsock.write(open(pjoin(Gdir, 'events.lhe')).read()) - + fsock.write(open(pjoin(Gdir, 'events.lhe')).read()) + # copy one log - files.cp(pjoin(Gdirs[0], 'log.txt'), + files.cp(pjoin(Gdirs[0], 'log.txt'), pjoin(self.me_dir,'SubProcesses' , Pdir, 'G%s' % G)) - - + + # create the appropriate results.dat self.write_results(grid_calculator, cross, error, Pdir, G, step) else: logger.info("Survey finished for %s/G%s [0 cross]", os.path.basename(Pdir),G) - + Gdir = pjoin(self.me_dir,'SubProcesses' , Pdir, 'G%s' % G) if not os.path.exists(Gdir): os.mkdir(Gdir) @@ -697,21 +697,21 @@ def combine_iteration(self, Pdir, G, step): files.cp(pjoin(Gdirs[0], 'log.txt'), Gdir) # create the appropriate results.dat self.write_results(grid_calculator, cross, error, Pdir, G, step) - + return 0 def combine_grid(self, Pdir, G, step, exclude_sub_jobs=[]): """ exclude_sub_jobs is to remove some of the subjobs if a numerical issue is detected in one of them. Warning is issue when this occurs. """ - + # 1. create an object to combine the grid information and fill it grid_calculator = combine_grid.grid_information(self.run_card['nhel']) - + for i in range(self.splitted_for_dir(Pdir, G)): if i in exclude_sub_jobs: continue - path = pjoin(Pdir, "G%s_%s" % (G, i+1)) + path = pjoin(Pdir, "G%s_%s" % (G, i+1)) fsock = misc.mult_try_open(pjoin(path, 'results.dat')) one_result = grid_calculator.add_results_information(fsock) fsock.close() @@ -723,9 +723,9 @@ def combine_grid(self, Pdir, G, step, exclude_sub_jobs=[]): fsock.close() os.remove(pjoin(path, 'results.dat')) #os.remove(pjoin(path, 'grid_information')) - - - + + + #2. combine the information about the total crossection / error # start by keep the interation in memory cross, across, sigma = grid_calculator.get_cross_section() @@ -736,12 +736,12 @@ def combine_grid(self, Pdir, G, step, exclude_sub_jobs=[]): if maxwgt: nunwgt = grid_calculator.get_nunwgt(maxwgt) # Make sure not to apply the security below during the first step of the - # survey. Also, disregard channels with a contribution relative to the + # survey. Also, disregard channels with a contribution relative to the # total cross-section smaller than 1e-8 since in this case it is unlikely # that this channel will need more than 1 event anyway. apply_instability_security = False rel_contrib = 0.0 - if (self.__class__ != gensym or step > 1): + if (self.__class__ != gensym or step > 1): Pdir_across = 0.0 Gdir_across = 0.0 for (mPdir,mG) in self.abscross.keys(): @@ -750,7 +750,7 @@ def combine_grid(self, Pdir, G, step, exclude_sub_jobs=[]): (self.sigma[(mPdir,mG)]+1e-99)) if mG == G: Gdir_across += (self.abscross[(mPdir,mG)]/ - (self.sigma[(mPdir,mG)]+1e-99)) + (self.sigma[(mPdir,mG)]+1e-99)) rel_contrib = abs(Gdir_across/(Pdir_across+1e-99)) if rel_contrib > (1.0e-8) and \ nunwgt < 2 and len(grid_calculator.results) > 1: @@ -770,14 +770,14 @@ def combine_grid(self, Pdir, G, step, exclude_sub_jobs=[]): exclude_sub_jobs = list(exclude_sub_jobs) exclude_sub_jobs.append(th_maxwgt[-1][1]) grid_calculator.results.run_statistics['skipped_subchannel'] += 1 - + # Add some monitoring of the problematic events - gPath = pjoin(Pdir, "G%s_%s" % (G, th_maxwgt[-1][1]+1)) + gPath = pjoin(Pdir, "G%s_%s" % (G, th_maxwgt[-1][1]+1)) if os.path.isfile(pjoin(gPath,'events.lhe')): lhe_file = lhe_parser.EventFile(pjoin(gPath,'events.lhe')) discardedPath = pjoin(Pdir,'DiscardedUnstableEvents') if not os.path.exists(discardedPath): - os.mkdir(discardedPath) + os.mkdir(discardedPath) if os.path.isdir(discardedPath): # Keep only the event with a maximum weight, as it surely # is the problematic one. @@ -790,10 +790,10 @@ def combine_grid(self, Pdir, G, step, exclude_sub_jobs=[]): lhe_file.close() evtRecord.write(pjoin(gPath,'events.lhe').read()) evtRecord.close() - + return self.combine_grid(Pdir, G, step, exclude_sub_jobs) - + if across !=0: if sigma != 0: self.cross[(Pdir,G)] += cross**3/sigma**2 @@ -814,10 +814,10 @@ def combine_grid(self, Pdir, G, step, exclude_sub_jobs=[]): self.chi2[(Pdir,G)] = 0 cross = self.cross[(Pdir,G)] error = 0 - + else: error = 0 - + grid_calculator.results.compute_values(update_statistics=True) if (str(os.path.basename(Pdir)), G) in self.run_statistics: self.run_statistics[(str(os.path.basename(Pdir)), G)]\ @@ -825,8 +825,8 @@ def combine_grid(self, Pdir, G, step, exclude_sub_jobs=[]): else: self.run_statistics[(str(os.path.basename(Pdir)), G)] = \ grid_calculator.results.run_statistics - - self.warnings_from_statistics(G, grid_calculator.results.run_statistics) + + self.warnings_from_statistics(G, grid_calculator.results.run_statistics) stats_msg = grid_calculator.results.run_statistics.nice_output( '/'.join([os.path.basename(Pdir),'G%s'%G])) @@ -836,7 +836,7 @@ def combine_grid(self, Pdir, G, step, exclude_sub_jobs=[]): # Clean up grid_information to avoid border effects in case of a crash for i in range(self.splitted_for_dir(Pdir, G)): path = pjoin(Pdir, "G%s_%s" % (G, i+1)) - try: + try: os.remove(pjoin(path, 'grid_information')) except OSError as oneerror: if oneerror.errno != 2: @@ -850,7 +850,7 @@ def warnings_from_statistics(self,G,stats): return EPS_fraction = float(stats['exceptional_points'])/stats['n_madloop_calls'] - + msg = "Channel %s has encountered a fraction of %.3g\n"+ \ "of numerically unstable loop matrix element computations\n"+\ "(which could not be rescued using quadruple precision).\n"+\ @@ -861,16 +861,16 @@ def warnings_from_statistics(self,G,stats): elif EPS_fraction > 0.01: logger.critical((msg%(G,EPS_fraction)).replace('might', 'can')) raise Exception((msg%(G,EPS_fraction)).replace('might', 'can')) - + def get_current_axsec(self): - + across = 0 for (Pdir,G) in self.abscross: across += self.abscross[(Pdir,G)]/(self.sigma[(Pdir,G)]+1e-99) return across - + def write_results(self, grid_calculator, cross, error, Pdir, G, step): - + #compute the value if cross == 0: abscross,nw, luminosity = 0, 0, 0 @@ -888,7 +888,7 @@ def write_results(self, grid_calculator, cross, error, Pdir, G, step): maxwgt = grid_calculator.get_max_wgt() nunwgt = grid_calculator.get_nunwgt() luminosity = nunwgt/cross - + #format the results.dat def fstr(nb): data = '%E' % nb @@ -897,20 +897,20 @@ def fstr(nb): power = int(power) + 1 return '%.5fE%+03i' %(nb,power) line = '%s %s %s %i %i %i %i %s %s %s %s 0.0 0\n' % \ - (fstr(cross), fstr(error*cross), fstr(error*cross), + (fstr(cross), fstr(error*cross), fstr(error*cross), nevents, nw, maxit,nunwgt, fstr(luminosity), fstr(wgt), fstr(abscross), fstr(maxwgt)) - + fsock = open(pjoin(self.me_dir,'SubProcesses' , Pdir, 'G%s' % G, - 'results.dat'),'w') + 'results.dat'),'w') fsock.writelines(line) fsock.close() - + def resubmit_survey(self, Pdir, G, Gdirs, step): """submit the next iteration of the survey""" # 1. write the new input_app.txt to double the number of points - run_card = self.cmd.run_card + run_card = self.cmd.run_card options = {'event' : 2**(step) * self.cmd.opts['points'] / self.splitted_grid, 'maxiter': 1, 'miniter': 1, @@ -919,18 +919,18 @@ def resubmit_survey(self, Pdir, G, Gdirs, step): else run_card['nhel'], 'gridmode': -2, 'channel' : '' - } - + } + if int(options['helicity']) == 1: options['event'] = options['event'] * 2**(self.cmd.proc_characteristics['nexternal']//3) - + for Gdir in Gdirs: - self.write_parameter_file(pjoin(Gdir, 'input_app.txt'), options) - - + self.write_parameter_file(pjoin(Gdir, 'input_app.txt'), options) + + #2. resubmit the new jobs packet = cluster.Packet((Pdir, G, step+1), self.combine_iteration, \ - (Pdir, G, step+1)) + (Pdir, G, step+1)) nb_step = len(Gdirs) * (step+1) for i,subdir in enumerate(Gdirs): subdir = subdir.rsplit('_',1)[1] @@ -938,34 +938,34 @@ def resubmit_survey(self, Pdir, G, Gdirs, step): offset = nb_step+i+1 offset=str(offset) tag = "%s.%s" % (subdir, offset) - + self.cmd.launch_job(pjoin(self.me_dir, 'SubProcesses', 'survey.sh'), argument=[tag, G], cwd=pjoin(self.me_dir,'SubProcesses' , Pdir), packet_member=packet) - + def write_parameter_file(self, path, options): """ """ - + template =""" %(event)s %(maxiter)s %(miniter)s !Number of events and max and min iterations %(accuracy)s !Accuracy %(gridmode)s !Grid Adjustment 0=none, 2=adjust 1 !Suppress Amplitude 1=yes %(helicity)s !Helicity Sum/event 0=exact - %(channel)s """ + %(channel)s """ options['event'] = int(options['event']) open(path, 'w').write(template % options) - - + + def write_parameter(self, parralelization, Pdirs=None): """Write the parameter of the survey run""" run_card = self.cmd.run_card - + options = {'event' : self.cmd.opts['points'], 'maxiter': self.cmd.opts['iterations'], 'miniter': self.min_iterations, @@ -975,36 +975,36 @@ def write_parameter(self, parralelization, Pdirs=None): 'gridmode': 2, 'channel': '' } - + if int(options['helicity'])== 1: options['event'] = options['event'] * 2**(self.cmd.proc_characteristics['nexternal']//3) - + if parralelization: options['gridmode'] = -2 options['maxiter'] = 1 #this is automatic in dsample anyway options['miniter'] = 1 #this is automatic in dsample anyway options['event'] /= self.splitted_grid - + if not Pdirs: Pdirs = self.subproc - + for Pdir in Pdirs: - path =pjoin(Pdir, 'input_app.txt') + path =pjoin(Pdir, 'input_app.txt') self.write_parameter_file(path, options) - - -class gen_ximprove(object): - - + + +class gen_ximprove(object): + + # some hardcoded value which impact the generation gen_events_security = 1.2 # multiply the number of requested event by this number for security combining_job = 0 # allow to run multiple channel in sequence - max_request_event = 1000 # split jobs if a channel if it needs more than that + max_request_event = 1000 # split jobs if a channel if it needs more than that max_event_in_iter = 5000 min_event_in_iter = 1000 - max_splitting = 130 # maximum duplication of a given channel - min_iter = 3 + max_splitting = 130 # maximum duplication of a given channel + min_iter = 3 max_iter = 9 keep_grid_for_refine = False # only apply if needed to split the job @@ -1022,7 +1022,7 @@ def __new__(cls, cmd, opt): return super(gen_ximprove, cls).__new__(gen_ximprove_gridpack) elif cls.force_class == 'loop_induced': return super(gen_ximprove, cls).__new__(gen_ximprove_share) - + if cmd.proc_characteristics['loop_induced']: return super(gen_ximprove, cls).__new__(gen_ximprove_share) elif gen_ximprove.format_variable(cmd.run_card['gridpack'], bool): @@ -1031,31 +1031,31 @@ def __new__(cls, cmd, opt): return super(gen_ximprove, cls).__new__(gen_ximprove_share) else: return super(gen_ximprove, cls).__new__(gen_ximprove_v4) - - + + def __init__(self, cmd, opt=None): - + try: super(gen_ximprove, self).__init__(cmd, opt) except TypeError: pass - + self.run_statistics = {} self.cmd = cmd self.run_card = cmd.run_card run_card = self.run_card self.me_dir = cmd.me_dir - + #extract from the run_card the information that we need. self.gridpack = run_card['gridpack'] self.nhel = run_card['nhel'] if "nhel_refine" in run_card: self.nhel = run_card["nhel_refine"] - + if self.run_card['refine_evt_by_job'] != -1: self.max_request_event = run_card['refine_evt_by_job'] - - + + # Default option for the run self.gen_events = True self.parralel = False @@ -1066,7 +1066,7 @@ def __init__(self, cmd, opt=None): # parameter for the gridpack run self.nreq = 2000 self.iseed = 4321 - + # placeholder for information self.results = 0 #updated in launch/update_html @@ -1074,16 +1074,16 @@ def __init__(self, cmd, opt=None): self.configure(opt) elif isinstance(opt, bannermod.GridpackCard): self.configure_gridpack(opt) - + def __call__(self): return self.launch() - + def launch(self): - """running """ - + """running """ + #start the run self.handle_seed() - self.results = sum_html.collect_result(self.cmd, + self.results = sum_html.collect_result(self.cmd, main_dir=pjoin(self.cmd.me_dir,'SubProcesses')) #main_dir is for gridpack readonly mode if self.gen_events: # We run to provide a given number of events @@ -1095,15 +1095,15 @@ def launch(self): def configure(self, opt): """Defines some parameter of the run""" - + for key, value in opt.items(): if key in self.__dict__: targettype = type(getattr(self, key)) setattr(self, key, self.format_variable(value, targettype, key)) else: raise Exception('%s not define' % key) - - + + # special treatment always do outside the loop to avoid side effect if 'err_goal' in opt: if self.err_goal < 1: @@ -1113,24 +1113,24 @@ def configure(self, opt): logger.info("Generating %s unweighted events." % self.err_goal) self.gen_events = True self.err_goal = self.err_goal * self.gen_events_security # security - + def handle_seed(self): """not needed but for gridpack --which is not handle here for the moment""" return - - + + def find_job_for_event(self): """return the list of channel that need to be improved""" - + assert self.err_goal >=1 self.err_goal = int(self.err_goal) - - goal_lum = self.err_goal/(self.results.axsec+1e-99) #pb^-1 + + goal_lum = self.err_goal/(self.results.axsec+1e-99) #pb^-1 logger.info('Effective Luminosity %s pb^-1', goal_lum) - + all_channels = sum([list(P) for P in self.results],[]) - all_channels.sort(key= lambda x:x.get('luminosity'), reverse=True) - + all_channels.sort(key= lambda x:x.get('luminosity'), reverse=True) + to_refine = [] for C in all_channels: if C.get('axsec') == 0: @@ -1141,61 +1141,61 @@ def find_job_for_event(self): elif C.get('xerr') > max(C.get('axsec'), (1/(100*math.sqrt(self.err_goal)))*all_channels[-1].get('axsec')): to_refine.append(C) - - logger.info('need to improve %s channels' % len(to_refine)) + + logger.info('need to improve %s channels' % len(to_refine)) return goal_lum, to_refine def update_html(self): """update the html from this object since it contains all the information""" - + run = self.cmd.results.current['run_name'] if not os.path.exists(pjoin(self.cmd.me_dir, 'HTML', run)): os.mkdir(pjoin(self.cmd.me_dir, 'HTML', run)) - + unit = self.cmd.results.unit - P_text = "" - if self.results: - Presults = self.results + P_text = "" + if self.results: + Presults = self.results else: self.results = sum_html.collect_result(self.cmd, None) Presults = self.results - + for P_comb in Presults: - P_text += P_comb.get_html(run, unit, self.cmd.me_dir) - - Presults.write_results_dat(pjoin(self.cmd.me_dir,'SubProcesses', 'results.dat')) - + P_text += P_comb.get_html(run, unit, self.cmd.me_dir) + + Presults.write_results_dat(pjoin(self.cmd.me_dir,'SubProcesses', 'results.dat')) + fsock = open(pjoin(self.cmd.me_dir, 'HTML', run, 'results.html'),'w') fsock.write(sum_html.results_header) fsock.write('%s
' % Presults.get_html(run, unit, self.cmd.me_dir)) - fsock.write('%s
' % P_text) - + fsock.write('%s ' % P_text) + self.cmd.results.add_detail('cross', Presults.xsec) - self.cmd.results.add_detail('error', Presults.xerru) - - return Presults.xsec, Presults.xerru + self.cmd.results.add_detail('error', Presults.xerru) + + return Presults.xsec, Presults.xerru + - class gen_ximprove_v4(gen_ximprove): - + # some hardcoded value which impact the generation gen_events_security = 1.2 # multiply the number of requested event by this number for security combining_job = 0 # allow to run multiple channel in sequence - max_request_event = 1000 # split jobs if a channel if it needs more than that + max_request_event = 1000 # split jobs if a channel if it needs more than that max_event_in_iter = 5000 min_event_in_iter = 1000 - max_splitting = 130 # maximum duplication of a given channel - min_iter = 3 + max_splitting = 130 # maximum duplication of a given channel + min_iter = 3 max_iter = 9 keep_grid_for_refine = False # only apply if needed to split the job - def __init__(self, cmd, opt=None): - + def __init__(self, cmd, opt=None): + super(gen_ximprove_v4, self).__init__(cmd, opt) - + if cmd.opts['accuracy'] < cmd._survey_options['accuracy'][1]: self.increase_precision(cmd._survey_options['accuracy'][1]/cmd.opts['accuracy']) @@ -1203,7 +1203,7 @@ def reset_multijob(self): for path in misc.glob(pjoin('*', '*','multijob.dat'), pjoin(self.me_dir, 'SubProcesses')): open(path,'w').write('0\n') - + def write_multijob(self, Channel, nb_split): """ """ if nb_split <=1: @@ -1211,7 +1211,7 @@ def write_multijob(self, Channel, nb_split): f = open(pjoin(self.me_dir, 'SubProcesses', Channel.get('name'), 'multijob.dat'), 'w') f.write('%i\n' % nb_split) f.close() - + def increase_precision(self, rate=3): #misc.sprint(rate) if rate < 3: @@ -1222,25 +1222,25 @@ def increase_precision(self, rate=3): rate = rate -2 self.max_event_in_iter = int((rate+1) * 10000) self.min_events = int(rate+2) * 2500 - self.gen_events_security = 1 + 0.1 * (rate+2) - + self.gen_events_security = 1 + 0.1 * (rate+2) + if int(self.nhel) == 1: self.min_event_in_iter *= 2**(self.cmd.proc_characteristics['nexternal']//3) self.max_event_in_iter *= 2**(self.cmd.proc_characteristics['nexternal']//2) - - + + alphabet = "abcdefghijklmnopqrstuvwxyz" def get_job_for_event(self): """generate the script in order to generate a given number of event""" # correspond to write_gen in the fortran version - - + + goal_lum, to_refine = self.find_job_for_event() #reset the potential multijob of previous run self.reset_multijob() - + jobs = [] # list of the refine if some job are split is list of # dict with the parameter of the run. @@ -1257,17 +1257,17 @@ def get_job_for_event(self): else: for i in range(len(to_refine) //3): new_order.append(to_refine[i]) - new_order.append(to_refine[-2*i-1]) + new_order.append(to_refine[-2*i-1]) new_order.append(to_refine[-2*i-2]) if len(to_refine) % 3 == 1: - new_order.append(to_refine[i+1]) + new_order.append(to_refine[i+1]) elif len(to_refine) % 3 == 2: - new_order.append(to_refine[i+2]) + new_order.append(to_refine[i+2]) #ensure that the reordering is done nicely assert set([id(C) for C in to_refine]) == set([id(C) for C in new_order]) - to_refine = new_order - - + to_refine = new_order + + # loop over the channel to refine for C in to_refine: #1. Compute the number of points are needed to reach target @@ -1279,7 +1279,7 @@ def get_job_for_event(self): nb_split = self.max_splitting nb_split=max(1, nb_split) - + #2. estimate how many points we need in each iteration if C.get('nunwgt') > 0: nevents = needed_event / nb_split * (C.get('nevents') / C.get('nunwgt')) @@ -1296,21 +1296,21 @@ def get_job_for_event(self): nevents = max(self.min_event_in_iter, min(self.max_event_in_iter, nevents)) logger.debug("%s : need %s event. Need %s split job of %s points", C.name, needed_event, nb_split, nevents) - + # write the multi-job information self.write_multijob(C, nb_split) - + packet = cluster.Packet((C.parent_name, C.name), combine_runs.CombineRuns, (pjoin(self.me_dir, 'SubProcesses', C.parent_name)), {"subproc": C.name, "nb_split":nb_split}) - - + + #create the info dict assume no splitting for the default info = {'name': self.cmd.results.current['run_name'], 'script_name': 'unknown', 'directory': C.name, # need to be change for splitted job - 'P_dir': C.parent_name, + 'P_dir': C.parent_name, 'Ppath': pjoin(self.cmd.me_dir, 'SubProcesses', C.parent_name), 'offset': 1, # need to be change for splitted job 'nevents': nevents, @@ -1321,7 +1321,7 @@ def get_job_for_event(self): 'channel': C.name.replace('G',''), 'grid_refinment' : 0, #no refinment of the grid 'base_directory': '', #should be change in splitted job if want to keep the grid - 'packet': packet, + 'packet': packet, } if nb_split == 1: @@ -1334,19 +1334,19 @@ def get_job_for_event(self): if self.keep_grid_for_refine: new_info['base_directory'] = info['directory'] jobs.append(new_info) - - self.create_ajob(pjoin(self.me_dir, 'SubProcesses', 'refine.sh'), jobs) - + + self.create_ajob(pjoin(self.me_dir, 'SubProcesses', 'refine.sh'), jobs) + def create_ajob(self, template, jobs, write_dir=None): """create the ajob""" - + if not jobs: return if not write_dir: write_dir = pjoin(self.me_dir, 'SubProcesses') - + #filter the job according to their SubProcess directory # no mix submition P2job= collections.defaultdict(list) for j in jobs: @@ -1355,11 +1355,11 @@ def create_ajob(self, template, jobs, write_dir=None): for P in P2job.values(): self.create_ajob(template, P, write_dir) return - - + + #Here we can assume that all job are for the same directory. path = pjoin(write_dir, jobs[0]['P_dir']) - + template_text = open(template, 'r').read() # special treatment if needed to combine the script # computes how many submition miss one job @@ -1384,8 +1384,8 @@ def create_ajob(self, template, jobs, write_dir=None): skip1=0 combining_job =1 nb_sub = len(jobs) - - + + nb_use = 0 for i in range(nb_sub): script_number = i+1 @@ -1404,14 +1404,14 @@ def create_ajob(self, template, jobs, write_dir=None): info["base_directory"] = "./" fsock.write(template_text % info) nb_use += nb_job - + fsock.close() return script_number def get_job_for_precision(self): """create the ajob to achieve a give precision on the total cross-section""" - + assert self.err_goal <=1 xtot = abs(self.results.xsec) logger.info("Working on precision: %s %%" %(100*self.err_goal)) @@ -1428,46 +1428,46 @@ def get_job_for_precision(self): rerr *=rerr if not len(to_refine): return - - # change limit since most don't contribute + + # change limit since most don't contribute limit = math.sqrt((self.err_goal * xtot)**2 - rerr/math.sqrt(len(to_refine))) for C in to_refine[:]: cerr = C.mfactor*(C.xerru + len(to_refine)*C.xerrc) if cerr < limit: to_refine.remove(C) - + # all the channel are now selected. create the channel information logger.info('need to improve %s channels' % len(to_refine)) - + jobs = [] # list of the refine if some job are split is list of # dict with the parameter of the run. # loop over the channel to refine for C in to_refine: - + #1. Determine how many events we need in each iteration yerr = C.mfactor*(C.xerru+len(to_refine)*C.xerrc) nevents = 0.2*C.nevents*(yerr/limit)**2 - + nb_split = int((nevents*(C.nunwgt/C.nevents)/self.max_request_event/ (2**self.min_iter-1))**(2/3)) nb_split = max(nb_split, 1) - # **(2/3) to slow down the increase in number of jobs + # **(2/3) to slow down the increase in number of jobs if nb_split > self.max_splitting: nb_split = self.max_splitting - + if nb_split >1: nevents = nevents / nb_split self.write_multijob(C, nb_split) # forbid too low/too large value nevents = min(self.min_event_in_iter, max(self.max_event_in_iter, nevents)) - - + + #create the info dict assume no splitting for the default info = {'name': self.cmd.results.current['run_name'], 'script_name': 'unknown', 'directory': C.name, # need to be change for splitted job - 'P_dir': C.parent_name, + 'P_dir': C.parent_name, 'Ppath': pjoin(self.cmd.me_dir, 'SubProcesses', C.parent_name), 'offset': 1, # need to be change for splitted job 'nevents': nevents, @@ -1487,38 +1487,38 @@ def get_job_for_precision(self): new_info['offset'] = i+1 new_info['directory'] += self.alphabet[i % 26] + str((i+1)//26) jobs.append(new_info) - self.create_ajob(pjoin(self.me_dir, 'SubProcesses', 'refine.sh'), jobs) - + self.create_ajob(pjoin(self.me_dir, 'SubProcesses', 'refine.sh'), jobs) + def update_html(self): """update the html from this object since it contains all the information""" - + run = self.cmd.results.current['run_name'] if not os.path.exists(pjoin(self.cmd.me_dir, 'HTML', run)): os.mkdir(pjoin(self.cmd.me_dir, 'HTML', run)) - + unit = self.cmd.results.unit - P_text = "" - if self.results: - Presults = self.results + P_text = "" + if self.results: + Presults = self.results else: self.results = sum_html.collect_result(self.cmd, None) Presults = self.results - + for P_comb in Presults: - P_text += P_comb.get_html(run, unit, self.cmd.me_dir) - - Presults.write_results_dat(pjoin(self.cmd.me_dir,'SubProcesses', 'results.dat')) - + P_text += P_comb.get_html(run, unit, self.cmd.me_dir) + + Presults.write_results_dat(pjoin(self.cmd.me_dir,'SubProcesses', 'results.dat')) + fsock = open(pjoin(self.cmd.me_dir, 'HTML', run, 'results.html'),'w') fsock.write(sum_html.results_header) fsock.write('%s
' % Presults.get_html(run, unit, self.cmd.me_dir)) - fsock.write('%s
' % P_text) - + fsock.write('%s ' % P_text) + self.cmd.results.add_detail('cross', Presults.xsec) - self.cmd.results.add_detail('error', Presults.xerru) - - return Presults.xsec, Presults.xerru + self.cmd.results.add_detail('error', Presults.xerru) + + return Presults.xsec, Presults.xerru @@ -1528,27 +1528,27 @@ class gen_ximprove_v4_nogridupdate(gen_ximprove_v4): # some hardcoded value which impact the generation gen_events_security = 1.1 # multiply the number of requested event by this number for security combining_job = 0 # allow to run multiple channel in sequence - max_request_event = 400 # split jobs if a channel if it needs more than that + max_request_event = 400 # split jobs if a channel if it needs more than that max_event_in_iter = 500 min_event_in_iter = 250 - max_splitting = 260 # maximum duplication of a given channel - min_iter = 2 + max_splitting = 260 # maximum duplication of a given channel + min_iter = 2 max_iter = 6 keep_grid_for_refine = True - def __init__(self, cmd, opt=None): - + def __init__(self, cmd, opt=None): + gen_ximprove.__init__(cmd, opt) - + if cmd.proc_characteristics['loopinduced'] and \ cmd.proc_characteristics['nexternal'] > 2: self.increase_parralelization(cmd.proc_characteristics['nexternal']) - + def increase_parralelization(self, nexternal): - self.max_splitting = 1000 - + self.max_splitting = 1000 + if self.run_card['refine_evt_by_job'] != -1: pass elif nexternal == 3: @@ -1563,27 +1563,27 @@ def increase_parralelization(self, nexternal): class gen_ximprove_share(gen_ximprove, gensym): """Doing the refine in multicore. Each core handle a couple of PS point.""" - nb_ps_by_job = 2000 + nb_ps_by_job = 2000 mode = "refine" gen_events_security = 1.15 # Note the real security is lower since we stop the jobs if they are at 96% # of this target. def __init__(self, *args, **opts): - + super(gen_ximprove_share, self).__init__(*args, **opts) self.generated_events = {} self.splitted_for_dir = lambda x,y : self.splitted_Pdir[(x,y)] - + def get_job_for_event(self): """generate the script in order to generate a given number of event""" # correspond to write_gen in the fortran version - + goal_lum, to_refine = self.find_job_for_event() self.goal_lum = goal_lum - + # loop over the channel to refine to find the number of PS point to launch total_ps_points = 0 channel_to_ps_point = [] @@ -1593,7 +1593,7 @@ def get_job_for_event(self): os.remove(pjoin(self.me_dir, "SubProcesses",C.parent_name, C.name, "events.lhe")) except: pass - + #1. Compute the number of points are needed to reach target needed_event = goal_lum*C.get('axsec') if needed_event == 0: @@ -1609,18 +1609,18 @@ def get_job_for_event(self): nb_split = 1 if nb_split > self.max_splitting: nb_split = self.max_splitting - nevents = self.max_event_in_iter * self.max_splitting + nevents = self.max_event_in_iter * self.max_splitting else: nevents = self.max_event_in_iter * nb_split if nevents > self.max_splitting*self.max_event_in_iter: logger.warning("Channel %s/%s has a very low efficiency of unweighting. Might not be possible to reach target" % \ (C.name, C.parent_name)) - nevents = self.max_event_in_iter * self.max_splitting - - total_ps_points += nevents - channel_to_ps_point.append((C, nevents)) - + nevents = self.max_event_in_iter * self.max_splitting + + total_ps_points += nevents + channel_to_ps_point.append((C, nevents)) + if self.cmd.options["run_mode"] == 1: if self.cmd.options["cluster_size"]: nb_ps_by_job = total_ps_points /int(self.cmd.options["cluster_size"]) @@ -1634,7 +1634,7 @@ def get_job_for_event(self): nb_ps_by_job = total_ps_points / self.cmd.options["nb_core"] else: nb_ps_by_job = self.nb_ps_by_job - + nb_ps_by_job = int(max(nb_ps_by_job, 500)) for C, nevents in channel_to_ps_point: @@ -1648,20 +1648,20 @@ def get_job_for_event(self): self.create_resubmit_one_iter(C.parent_name, C.name[1:], submit_ps, nb_job, step=0) needed_event = goal_lum*C.get('xsec') logger.debug("%s/%s : need %s event. Need %s split job of %s points", C.parent_name, C.name, needed_event, nb_job, submit_ps) - - + + def combine_iteration(self, Pdir, G, step): - + grid_calculator, cross, error = self.combine_grid(Pdir, G, step) - + # collect all the generated_event Gdirs = [] #build the the list of directory for i in range(self.splitted_for_dir(Pdir, G)): path = pjoin(Pdir, "G%s_%s" % (G, i+1)) Gdirs.append(path) assert len(grid_calculator.results) == len(Gdirs) == self.splitted_for_dir(Pdir, G) - - + + # Check how many events are going to be kept after un-weighting. needed_event = cross * self.goal_lum if needed_event == 0: @@ -1671,19 +1671,19 @@ def combine_iteration(self, Pdir, G, step): if self.err_goal >=1: if needed_event > self.gen_events_security * self.err_goal: needed_event = int(self.gen_events_security * self.err_goal) - + if (Pdir, G) in self.generated_events: old_nunwgt, old_maxwgt = self.generated_events[(Pdir, G)] else: old_nunwgt, old_maxwgt = 0, 0 - + if old_nunwgt == 0 and os.path.exists(pjoin(Pdir,"G%s" % G, "events.lhe")): # possible for second refine. lhe = lhe_parser.EventFile(pjoin(Pdir,"G%s" % G, "events.lhe")) old_nunwgt = lhe.unweight(None, trunc_error=0.005, log_level=0) old_maxwgt = lhe.max_wgt - - + + maxwgt = max(grid_calculator.get_max_wgt(), old_maxwgt) new_evt = grid_calculator.get_nunwgt(maxwgt) @@ -1695,35 +1695,35 @@ def combine_iteration(self, Pdir, G, step): one_iter_nb_event = max(grid_calculator.get_nunwgt(),1) drop_previous_iteration = False # compare the number of events to generate if we discard the previous iteration - n_target_one_iter = (needed_event-one_iter_nb_event) / ( one_iter_nb_event/ sum([R.nevents for R in grid_calculator.results])) + n_target_one_iter = (needed_event-one_iter_nb_event) / ( one_iter_nb_event/ sum([R.nevents for R in grid_calculator.results])) n_target_combined = (needed_event-nunwgt) / efficiency if n_target_one_iter < n_target_combined: # the last iteration alone has more event that the combine iteration. - # it is therefore interesting to drop previous iteration. + # it is therefore interesting to drop previous iteration. drop_previous_iteration = True nunwgt = one_iter_nb_event maxwgt = grid_calculator.get_max_wgt() new_evt = nunwgt - efficiency = ( one_iter_nb_event/ sum([R.nevents for R in grid_calculator.results])) - + efficiency = ( one_iter_nb_event/ sum([R.nevents for R in grid_calculator.results])) + try: if drop_previous_iteration: raise IOError output_file = open(pjoin(Pdir,"G%s" % G, "events.lhe"), 'a') except IOError: output_file = open(pjoin(Pdir,"G%s" % G, "events.lhe"), 'w') - + misc.call(["cat"] + [pjoin(d, "events.lhe") for d in Gdirs], stdout=output_file) output_file.close() # For large number of iteration. check the number of event by doing the # real unweighting. - if nunwgt < 0.6 * needed_event and step > self.min_iter: + if nunwgt < 0.6 * needed_event and step > self.min_iter: lhe = lhe_parser.EventFile(output_file.name) old_nunwgt =nunwgt nunwgt = lhe.unweight(None, trunc_error=0.01, log_level=0) - - + + self.generated_events[(Pdir, G)] = (nunwgt, maxwgt) # misc.sprint("Adding %s event to %s. Currently at %s" % (new_evt, G, nunwgt)) @@ -1742,21 +1742,21 @@ def combine_iteration(self, Pdir, G, step): nevents = grid_calculator.results[0].nevents if nevents == 0: # possible if some integral returns 0 nevents = max(g.nevents for g in grid_calculator.results) - + need_ps_point = (needed_event - nunwgt)/(efficiency+1e-99) - need_job = need_ps_point // nevents + 1 - + need_job = need_ps_point // nevents + 1 + if step < self.min_iter: # This is normal but check if we are on the good track - job_at_first_iter = nb_split_before/2**(step-1) + job_at_first_iter = nb_split_before/2**(step-1) expected_total_job = job_at_first_iter * (2**self.min_iter-1) done_job = job_at_first_iter * (2**step-1) expected_remaining_job = expected_total_job - done_job - logger.debug("efficiency status (smaller is better): %s", need_job/expected_remaining_job) + logger.debug("efficiency status (smaller is better): %s", need_job/expected_remaining_job) # increase if needed but not too much need_job = min(need_job, expected_remaining_job*1.25) - + nb_job = (need_job-0.5)//(2**(self.min_iter-step)-1) + 1 nb_job = max(1, nb_job) grid_calculator.write_grid_for_submission(Pdir,G, @@ -1768,7 +1768,7 @@ def combine_iteration(self, Pdir, G, step): nb_job, step)) self.create_resubmit_one_iter(Pdir, G, nevents, nb_job, step) #self.create_job(Pdir, G, nb_job, nevents, step) - + elif step < self.max_iter: if step + 1 == self.max_iter: need_job = 1.20 * need_job # avoid to have just too few event. @@ -1777,21 +1777,21 @@ def combine_iteration(self, Pdir, G, step): grid_calculator.write_grid_for_submission(Pdir,G, self.splitted_for_dir(Pdir, G), nb_job*nevents ,mode=self.mode, conservative_factor=self.max_iter) - - + + logger.info("%s/G%s is at %i/%i ('%.2g%%') event. Resubmit %i job at iteration %i." \ % (os.path.basename(Pdir), G, int(nunwgt),int(needed_event)+1, (float(nunwgt)/needed_event)*100.0 if needed_event>0.0 else 0.0, nb_job, step)) self.create_resubmit_one_iter(Pdir, G, nevents, nb_job, step) - - + + return 0 - - + + def write_results(self, grid_calculator, cross, error, Pdir, G, step, efficiency): - + #compute the value if cross == 0: abscross,nw, luminosity = 0, 0, 0 @@ -1807,7 +1807,7 @@ def write_results(self, grid_calculator, cross, error, Pdir, G, step, efficiency nevents = nunwgt # make the unweighting to compute the number of events: luminosity = nunwgt/cross - + #format the results.dat def fstr(nb): data = '%E' % nb @@ -1816,23 +1816,23 @@ def fstr(nb): power = int(power) + 1 return '%.5fE%+03i' %(nb,power) line = '%s %s %s %i %i %i %i %s %s %s 0.0 0.0 0\n' % \ - (fstr(cross), fstr(error*cross), fstr(error*cross), + (fstr(cross), fstr(error*cross), fstr(error*cross), nevents, nw, maxit,nunwgt, fstr(luminosity), fstr(wgt), fstr(abscross)) - + fsock = open(pjoin(self.me_dir,'SubProcesses' , Pdir, 'G%s' % G, - 'results.dat'),'w') + 'results.dat'),'w') fsock.writelines(line) fsock.close() - - - + + + class gen_ximprove_gridpack(gen_ximprove_v4): - - min_iter = 1 + + min_iter = 1 max_iter = 13 - max_request_event = 1e12 # split jobs if a channel if it needs more than that + max_request_event = 1e12 # split jobs if a channel if it needs more than that max_event_in_iter = 4000 min_event_in_iter = 500 combining_job = sys.maxsize @@ -1844,7 +1844,7 @@ def __new__(cls, *args, **opts): return super(gen_ximprove_gridpack, cls).__new__(cls, *args, **opts) def __init__(self, *args, **opts): - + self.ngran = -1 self.gscalefact = {} self.readonly = False @@ -1855,23 +1855,23 @@ def __init__(self, *args, **opts): self.readonly = opts['readonly'] super(gen_ximprove_gridpack,self).__init__(*args, **opts) if self.ngran == -1: - self.ngran = 1 - + self.ngran = 1 + def find_job_for_event(self): """return the list of channel that need to be improved""" import random - + assert self.err_goal >=1 self.err_goal = int(self.err_goal) self.gscalefact = {} - + xtot = self.results.axsec - goal_lum = self.err_goal/(xtot+1e-99) #pb^-1 + goal_lum = self.err_goal/(xtot+1e-99) #pb^-1 # logger.info('Effective Luminosity %s pb^-1', goal_lum) - + all_channels = sum([list(P) for P in self.results],[]) all_channels.sort(key=lambda x : x.get('luminosity'), reverse=True) - + to_refine = [] for C in all_channels: tag = C.get('name') @@ -1885,27 +1885,27 @@ def find_job_for_event(self): #need to generate events logger.debug('request events for ', C.get('name'), 'cross=', C.get('axsec'), 'needed events = ', goal_lum * C.get('axsec')) - to_refine.append(C) - - logger.info('need to improve %s channels' % len(to_refine)) + to_refine.append(C) + + logger.info('need to improve %s channels' % len(to_refine)) return goal_lum, to_refine def get_job_for_event(self): """generate the script in order to generate a given number of event""" # correspond to write_gen in the fortran version - - + + goal_lum, to_refine = self.find_job_for_event() jobs = [] # list of the refine if some job are split is list of # dict with the parameter of the run. - + # loop over the channel to refine for C in to_refine: #1. Compute the number of points are needed to reach target needed_event = max(goal_lum*C.get('axsec'), self.ngran) nb_split = 1 - + #2. estimate how many points we need in each iteration if C.get('nunwgt') > 0: nevents = needed_event / nb_split * (C.get('nevents') / C.get('nunwgt')) @@ -1920,13 +1920,13 @@ def get_job_for_event(self): # forbid too low/too large value nevents = max(self.min_event_in_iter, min(self.max_event_in_iter, nevents)) logger.debug("%s : need %s event. Need %s split job of %s points", C.name, needed_event, nb_split, nevents) - + #create the info dict assume no splitting for the default info = {'name': self.cmd.results.current['run_name'], 'script_name': 'unknown', 'directory': C.name, # need to be change for splitted job - 'P_dir': os.path.basename(C.parent_name), + 'P_dir': os.path.basename(C.parent_name), 'offset': 1, # need to be change for splitted job 'Ppath': pjoin(self.cmd.me_dir, 'SubProcesses', C.parent_name), 'nevents': nevents, #int(nevents*self.gen_events_security)+1, @@ -1938,7 +1938,7 @@ def get_job_for_event(self): 'channel': C.name.replace('G',''), 'grid_refinment' : 0, #no refinment of the grid 'base_directory': '', #should be change in splitted job if want to keep the grid - 'packet': None, + 'packet': None, } if self.readonly: @@ -1946,11 +1946,11 @@ def get_job_for_event(self): info['base_directory'] = basedir jobs.append(info) - - write_dir = '.' if self.readonly else None - self.create_ajob(pjoin(self.me_dir, 'SubProcesses', 'refine.sh'), jobs, write_dir) - + + write_dir = '.' if self.readonly else None + self.create_ajob(pjoin(self.me_dir, 'SubProcesses', 'refine.sh'), jobs, write_dir) + done = [] for j in jobs: if j['P_dir'] in done: @@ -1967,22 +1967,22 @@ def get_job_for_event(self): write_dir = '.' if self.readonly else pjoin(self.me_dir, 'SubProcesses') self.check_events(goal_lum, to_refine, jobs, write_dir) - + def check_events(self, goal_lum, to_refine, jobs, Sdir): """check that we get the number of requested events if not resubmit.""" - + new_jobs = [] - + for C, job_info in zip(to_refine, jobs): - P = job_info['P_dir'] + P = job_info['P_dir'] G = job_info['channel'] axsec = C.get('axsec') - requested_events= job_info['requested_event'] - + requested_events= job_info['requested_event'] + new_results = sum_html.OneResult((P,G)) new_results.read_results(pjoin(Sdir,P, 'G%s'%G, 'results.dat')) - + # need to resubmit? if new_results.get('nunwgt') < requested_events: pwd = pjoin(os.getcwd(),job_info['P_dir'],'G%s'%G) if self.readonly else \ @@ -1992,10 +1992,10 @@ def check_events(self, goal_lum, to_refine, jobs, Sdir): job_info['offset'] += 1 new_jobs.append(job_info) files.mv(pjoin(pwd, 'events.lhe'), pjoin(pwd, 'events.lhe.previous')) - + if new_jobs: - self.create_ajob(pjoin(self.me_dir, 'SubProcesses', 'refine.sh'), new_jobs, Sdir) - + self.create_ajob(pjoin(self.me_dir, 'SubProcesses', 'refine.sh'), new_jobs, Sdir) + done = [] for j in new_jobs: if j['P_dir'] in done: @@ -2015,9 +2015,9 @@ def check_events(self, goal_lum, to_refine, jobs, Sdir): files.put_at_end(pjoin(pwd, 'events.lhe'),pjoin(pwd, 'events.lhe.previous')) return self.check_events(goal_lum, to_refine, new_jobs, Sdir) - - - - + + + + diff --git a/epochX/cudacpp/gg_ttggg.mad/bin/internal/madevent_interface.py b/epochX/cudacpp/gg_ttggg.mad/bin/internal/madevent_interface.py index cb6bf4ca57..8abba3f33f 100755 --- a/epochX/cudacpp/gg_ttggg.mad/bin/internal/madevent_interface.py +++ b/epochX/cudacpp/gg_ttggg.mad/bin/internal/madevent_interface.py @@ -2,11 +2,11 @@ # # Copyright (c) 2011 The MadGraph5_aMC@NLO Development team and Contributors # -# This file is a part of the MadGraph5_aMC@NLO project, an application which +# This file is a part of the MadGraph5_aMC@NLO project, an application which # automatically generates Feynman diagrams and matrix elements for arbitrary # high-energy processes in the Standard Model and beyond. # -# It is subject to the MadGraph5_aMC@NLO license which should accompany this +# It is subject to the MadGraph5_aMC@NLO license which should accompany this # distribution. # # For more information, visit madgraph.phys.ucl.ac.be and amcatnlo.web.cern.ch @@ -53,10 +53,10 @@ # Special logger for the Cmd Interface logger = logging.getLogger('madevent.stdout') # -> stdout logger_stderr = logging.getLogger('madevent.stderr') # ->stderr - + try: import madgraph -except ImportError as error: +except ImportError as error: # import from madevent directory MADEVENT = True import internal.extended_cmd as cmd @@ -92,7 +92,7 @@ import madgraph.various.lhe_parser as lhe_parser # import madgraph.various.histograms as histograms # imported later to not slow down the loading of the code import models.check_param_card as check_param_card - from madgraph.iolibs.files import ln + from madgraph.iolibs.files import ln from madgraph import InvalidCmd, MadGraph5Error, MG5DIR, ReadWrite @@ -113,10 +113,10 @@ class CmdExtended(common_run.CommonRunCmd): next_possibility = { 'start': [], } - + debug_output = 'ME5_debug' error_debug = 'Please report this bug on https://bugs.launchpad.net/mg5amcnlo\n' - error_debug += 'More information is found in \'%(debug)s\'.\n' + error_debug += 'More information is found in \'%(debug)s\'.\n' error_debug += 'Please attach this file to your report.' config_debug = 'If you need help with this issue please contact us on https://answers.launchpad.net/mg5amcnlo\n' @@ -124,18 +124,18 @@ class CmdExtended(common_run.CommonRunCmd): keyboard_stop_msg = """stopping all operation in order to quit MadGraph5_aMC@NLO please enter exit""" - + # Define the Error InvalidCmd = InvalidCmd ConfigurationError = MadGraph5Error def __init__(self, me_dir, options, *arg, **opt): """Init history and line continuation""" - + # Tag allowing/forbiding question self.force = False - - # If possible, build an info line with current version number + + # If possible, build an info line with current version number # and date, from the VERSION text file info = misc.get_pkg_info() info_line = "" @@ -150,7 +150,7 @@ def __init__(self, me_dir, options, *arg, **opt): else: version = open(pjoin(root_path,'MGMEVersion.txt')).readline().strip() info_line = "#* VERSION %s %s *\n" % \ - (version, (24 - len(version)) * ' ') + (version, (24 - len(version)) * ' ') # Create a header for the history file. # Remember to fill in time at writeout time! @@ -177,7 +177,7 @@ def __init__(self, me_dir, options, *arg, **opt): '#* run as ./bin/madevent.py filename *\n' + \ '#* *\n' + \ '#************************************************************\n' - + if info_line: info_line = info_line[1:] @@ -203,11 +203,11 @@ def __init__(self, me_dir, options, *arg, **opt): "* *\n" + \ "************************************************************") super(CmdExtended, self).__init__(me_dir, options, *arg, **opt) - + def get_history_header(self): - """return the history header""" + """return the history header""" return self.history_header % misc.get_time_info() - + def stop_on_keyboard_stop(self): """action to perform to close nicely on a keyboard interupt""" try: @@ -219,20 +219,20 @@ def stop_on_keyboard_stop(self): self.add_error_log_in_html(KeyboardInterrupt) except: pass - + def postcmd(self, stop, line): """ Update the status of the run for finishing interactive command """ - - stop = super(CmdExtended, self).postcmd(stop, line) + + stop = super(CmdExtended, self).postcmd(stop, line) # relaxing the tag forbidding question self.force = False - + if not self.use_rawinput: return stop - + if self.results and not self.results.current: return stop - + arg = line.split() if len(arg) == 0: return stop @@ -240,41 +240,41 @@ def postcmd(self, stop, line): return stop if isinstance(self.results.status, str) and self.results.status == 'Stop by the user': self.update_status('%s Stop by the user' % arg[0], level=None, error=True) - return stop + return stop elif not self.results.status: return stop elif str(arg[0]) in ['exit','quit','EOF']: return stop - + try: - self.update_status('Command \'%s\' done.
Waiting for instruction.' % arg[0], + self.update_status('Command \'%s\' done.
Waiting for instruction.' % arg[0], level=None, error=True) except Exception: misc.sprint('update_status fails') pass - - + + def nice_user_error(self, error, line): """If a ME run is currently running add a link in the html output""" self.add_error_log_in_html() - return cmd.Cmd.nice_user_error(self, error, line) - + return cmd.Cmd.nice_user_error(self, error, line) + def nice_config_error(self, error, line): """If a ME run is currently running add a link in the html output""" self.add_error_log_in_html() stop = cmd.Cmd.nice_config_error(self, error, line) - - + + try: debug_file = open(self.debug_output, 'a') debug_file.write(open(pjoin(self.me_dir,'Cards','proc_card_mg5.dat'))) debug_file.close() except: - pass + pass return stop - + def nice_error_handling(self, error, line): """If a ME run is currently running add a link in the html output""" @@ -294,7 +294,7 @@ def nice_error_handling(self, error, line): proc_card = pjoin(self.me_dir,'Cards','proc_card_mg5.dat') if os.path.exists(proc_card): self.banner.add(proc_card) - + out_dir = pjoin(self.me_dir, 'Events', self.run_name) if not os.path.isdir(out_dir): os.mkdir(out_dir) @@ -307,7 +307,7 @@ def nice_error_handling(self, error, line): else: pass else: - self.add_error_log_in_html() + self.add_error_log_in_html() stop = cmd.Cmd.nice_error_handling(self, error, line) try: debug_file = open(self.debug_output, 'a') @@ -316,14 +316,14 @@ def nice_error_handling(self, error, line): except: pass return stop - - + + #=============================================================================== # HelpToCmd #=============================================================================== class HelpToCmd(object): """ The Series of help routine for the MadEventCmd""" - + def help_pythia(self): logger.info("syntax: pythia [RUN] [--run_options]") logger.info("-- run pythia on RUN (current one by default)") @@ -352,29 +352,29 @@ def help_banner_run(self): logger.info(" Path should be the path of a valid banner.") logger.info(" RUN should be the name of a run of the current directory") self.run_options_help([('-f','answer all question by default'), - ('--name=X', 'Define the name associated with the new run')]) - + ('--name=X', 'Define the name associated with the new run')]) + def help_open(self): logger.info("syntax: open FILE ") logger.info("-- open a file with the appropriate editor.") logger.info(' If FILE belongs to index.html, param_card.dat, run_card.dat') logger.info(' the path to the last created/used directory is used') logger.info(' The program used to open those files can be chosen in the') - logger.info(' configuration file ./input/mg5_configuration.txt') - - + logger.info(' configuration file ./input/mg5_configuration.txt') + + def run_options_help(self, data): if data: logger.info('-- local options:') for name, info in data: logger.info(' %s : %s' % (name, info)) - + logger.info("-- session options:") - logger.info(" Note that those options will be kept for the current session") + logger.info(" Note that those options will be kept for the current session") logger.info(" --cluster : Submit to the cluster. Current cluster: %s" % self.options['cluster_type']) logger.info(" --multicore : Run in multi-core configuration") logger.info(" --nb_core=X : limit the number of core to use to X.") - + def help_generate_events(self): logger.info("syntax: generate_events [run_name] [options]",) @@ -398,16 +398,16 @@ def help_initMadLoop(self): logger.info(" -f : Bypass the edition of MadLoopParams.dat.",'$MG:color:BLUE') logger.info(" -r : Refresh of the existing filters (erasing them if already present).",'$MG:color:BLUE') logger.info(" --nPS= : Specify how many phase-space points should be tried to set up the filters.",'$MG:color:BLUE') - + def help_calculate_decay_widths(self): - + if self.ninitial != 1: logger.warning("This command is only valid for processes of type A > B C.") logger.warning("This command can not be run in current context.") logger.warning("") - + logger.info("syntax: calculate_decay_widths [run_name] [options])") logger.info("-- Calculate decay widths and enter widths and BRs in param_card") logger.info(" for a series of processes of type A > B C ...") @@ -428,8 +428,8 @@ def help_survey(self): logger.info("-- evaluate the different channel associate to the process") self.run_options_help([("--" + key,value[-1]) for (key,value) in \ self._survey_options.items()]) - - + + def help_restart_gridpack(self): logger.info("syntax: restart_gridpack --precision= --restart_zero") @@ -439,14 +439,14 @@ def help_launch(self): logger.info("syntax: launch [run_name] [options])") logger.info(" --alias for either generate_events/calculate_decay_widths") logger.info(" depending of the number of particles in the initial state.") - + if self.ninitial == 1: logger.info("For this directory this is equivalent to calculate_decay_widths") self.help_calculate_decay_widths() else: logger.info("For this directory this is equivalent to $generate_events") self.help_generate_events() - + def help_refine(self): logger.info("syntax: refine require_precision [max_channel] [--run_options]") logger.info("-- refine the LAST run to achieve a given precision.") @@ -454,14 +454,14 @@ def help_refine(self): logger.info(' or the required relative error') logger.info(' max_channel:[5] maximal number of channel per job') self.run_options_help([]) - + def help_combine_events(self): """ """ logger.info("syntax: combine_events [run_name] [--tag=tag_name] [--run_options]") logger.info("-- Combine the last run in order to write the number of events") logger.info(" asked in the run_card.") self.run_options_help([]) - + def help_store_events(self): """ """ logger.info("syntax: store_events [--run_options]") @@ -481,7 +481,7 @@ def help_import(self): logger.info("syntax: import command PATH") logger.info("-- Execute the command present in the file") self.run_options_help([]) - + def help_syscalc(self): logger.info("syntax: syscalc [RUN] [%s] [-f | --tag=]" % '|'.join(self._plot_mode)) logger.info("-- calculate systematics information for the RUN (current run by default)") @@ -506,18 +506,18 @@ class AskRun(cmd.ControlSwitch): ('madspin', 'Decay onshell particles'), ('reweight', 'Add weights to events for new hypp.') ] - + def __init__(self, question, line_args=[], mode=None, force=False, *args, **opt): - + self.check_available_module(opt['mother_interface'].options) self.me_dir = opt['mother_interface'].me_dir super(AskRun,self).__init__(self.to_control, opt['mother_interface'], *args, **opt) - - + + def check_available_module(self, options): - + self.available_module = set() if options['pythia-pgs_path']: self.available_module.add('PY6') @@ -540,32 +540,32 @@ def check_available_module(self, options): self.available_module.add('Rivet') else: logger.warning("Rivet program installed but no parton shower with hepmc output detected.\n Please install pythia8") - + if not MADEVENT or ('mg5_path' in options and options['mg5_path']): self.available_module.add('MadSpin') if misc.has_f2py() or options['f2py_compiler']: self.available_module.add('reweight') -# old mode to activate the shower +# old mode to activate the shower def ans_parton(self, value=None): """None: means that the user type 'pythia' value: means that the user type pythia=value""" - + if value is None: self.set_all_off() else: logger.warning('Invalid command: parton=%s' % value) - - + + # -# HANDLING SHOWER +# HANDLING SHOWER # def get_allowed_shower(self): """return valid entry for the shower switch""" - + if hasattr(self, 'allowed_shower'): return self.allowed_shower - + self.allowed_shower = [] if 'PY6' in self.available_module: self.allowed_shower.append('Pythia6') @@ -574,9 +574,9 @@ def get_allowed_shower(self): if self.allowed_shower: self.allowed_shower.append('OFF') return self.allowed_shower - + def set_default_shower(self): - + if 'PY6' in self.available_module and\ os.path.exists(pjoin(self.me_dir,'Cards','pythia_card.dat')): self.switch['shower'] = 'Pythia6' @@ -590,10 +590,10 @@ def set_default_shower(self): def check_value_shower(self, value): """check an entry is valid. return the valid entry in case of shortcut""" - + if value in self.get_allowed_shower(): return True - + value =value.lower() if value in ['py6','p6','pythia_6'] and 'PY6' in self.available_module: return 'Pythia6' @@ -601,13 +601,13 @@ def check_value_shower(self, value): return 'Pythia8' else: return False - - -# old mode to activate the shower + + +# old mode to activate the shower def ans_pythia(self, value=None): """None: means that the user type 'pythia' value: means that the user type pythia=value""" - + if 'PY6' not in self.available_module: logger.info('pythia-pgs not available. Ignore commmand') return @@ -621,13 +621,13 @@ def ans_pythia(self, value=None): self.set_switch('shower', 'OFF') else: logger.warning('Invalid command: pythia=%s' % value) - - + + def consistency_shower_detector(self, vshower, vdetector): """consistency_XX_YY(val_XX, val_YY) -> XX is the new key set by the user to a new value val_XX -> YY is another key - -> return value should be None or "replace_YY" + -> return value should be None or "replace_YY" """ if vshower == 'OFF': @@ -635,35 +635,35 @@ def consistency_shower_detector(self, vshower, vdetector): return 'OFF' if vshower == 'Pythia8' and vdetector == 'PGS': return 'OFF' - + return None - + # # HANDLING DETECTOR # def get_allowed_detector(self): """return valid entry for the switch""" - + if hasattr(self, 'allowed_detector'): - return self.allowed_detector - + return self.allowed_detector + self.allowed_detector = [] if 'PGS' in self.available_module: self.allowed_detector.append('PGS') if 'Delphes' in self.available_module: self.allowed_detector.append('Delphes') - + if self.allowed_detector: self.allowed_detector.append('OFF') - return self.allowed_detector + return self.allowed_detector def set_default_detector(self): - + self.set_default_shower() #ensure that this one is called first! - + if 'PGS' in self.available_module and self.switch['shower'] == 'Pythia6'\ and os.path.exists(pjoin(self.me_dir,'Cards','pgs_card.dat')): self.switch['detector'] = 'PGS' @@ -674,16 +674,16 @@ def set_default_detector(self): self.switch['detector'] = 'OFF' else: self.switch['detector'] = 'Not Avail.' - -# old mode to activate pgs + +# old mode to activate pgs def ans_pgs(self, value=None): """None: means that the user type 'pgs' - value: means that the user type pgs=value""" - + value: means that the user type pgs=value""" + if 'PGS' not in self.available_module: logger.info('pythia-pgs not available. Ignore commmand') return - + if value is None: self.set_all_off() self.switch['shower'] = 'Pythia6' @@ -696,16 +696,16 @@ def ans_pgs(self, value=None): else: logger.warning('Invalid command: pgs=%s' % value) - + # old mode to activate Delphes def ans_delphes(self, value=None): """None: means that the user type 'delphes' - value: means that the user type delphes=value""" - + value: means that the user type delphes=value""" + if 'Delphes' not in self.available_module: logger.warning('Delphes not available. Ignore commmand') return - + if value is None: self.set_all_off() if 'PY6' in self.available_module: @@ -718,15 +718,15 @@ def ans_delphes(self, value=None): elif value == 'off': self.set_switch('detector', 'OFF') else: - logger.warning('Invalid command: pgs=%s' % value) + logger.warning('Invalid command: pgs=%s' % value) def consistency_detector_shower(self,vdetector, vshower): """consistency_XX_YY(val_XX, val_YY) -> XX is the new key set by the user to a new value val_XX -> YY is another key - -> return value should be None or "replace_YY" + -> return value should be None or "replace_YY" """ - + if vdetector == 'PGS' and vshower != 'Pythia6': return 'Pythia6' if vdetector == 'Delphes' and vshower not in ['Pythia6', 'Pythia8']: @@ -744,28 +744,28 @@ def consistency_detector_shower(self,vdetector, vshower): # def get_allowed_analysis(self): """return valid entry for the shower switch""" - + if hasattr(self, 'allowed_analysis'): return self.allowed_analysis - + self.allowed_analysis = [] if 'ExRoot' in self.available_module: self.allowed_analysis.append('ExRoot') if 'MA4' in self.available_module: self.allowed_analysis.append('MadAnalysis4') if 'MA5' in self.available_module: - self.allowed_analysis.append('MadAnalysis5') + self.allowed_analysis.append('MadAnalysis5') if 'Rivet' in self.available_module: - self.allowed_analysis.append('Rivet') - + self.allowed_analysis.append('Rivet') + if self.allowed_analysis: self.allowed_analysis.append('OFF') - + return self.allowed_analysis - + def check_analysis(self, value): """check an entry is valid. return the valid entry in case of shortcut""" - + if value in self.get_allowed_analysis(): return True if value.lower() in ['ma4', 'madanalysis4', 'madanalysis_4','4']: @@ -786,30 +786,30 @@ def consistency_shower_analysis(self, vshower, vanalysis): """consistency_XX_YY(val_XX, val_YY) -> XX is the new key set by the user to a new value val_XX -> YY is another key - -> return value should be None or "replace_YY" + -> return value should be None or "replace_YY" """ if vshower != 'Pythia8' and vanalysis == 'Rivet': return 'OFF' #new value for analysis - + return None - + def consistency_analysis_shower(self, vanalysis, vshower): """consistency_XX_YY(val_XX, val_YY) -> XX is the new key set by the user to a new value val_XX -> YY is another key - -> return value should be None or "replace_YY" + -> return value should be None or "replace_YY" """ if vshower != 'Pythia8' and vanalysis == 'Rivet': return 'Pythia8' #new value for analysis - + return None def set_default_analysis(self): """initialise the switch for analysis""" - + if 'MA4' in self.available_module and \ os.path.exists(pjoin(self.me_dir,'Cards','plot_card.dat')): self.switch['analysis'] = 'MadAnalysis4' @@ -818,46 +818,46 @@ def set_default_analysis(self): or os.path.exists(pjoin(self.me_dir,'Cards', 'madanalysis5_hadron_card.dat'))): self.switch['analysis'] = 'MadAnalysis5' elif 'ExRoot' in self.available_module: - self.switch['analysis'] = 'ExRoot' - elif self.get_allowed_analysis(): + self.switch['analysis'] = 'ExRoot' + elif self.get_allowed_analysis(): self.switch['analysis'] = 'OFF' else: self.switch['analysis'] = 'Not Avail.' - + # # MADSPIN handling # def get_allowed_madspin(self): """ ON|OFF|onshell """ - + if hasattr(self, 'allowed_madspin'): return self.allowed_madspin - + self.allowed_madspin = [] if 'MadSpin' in self.available_module: self.allowed_madspin = ['OFF',"ON",'onshell',"full"] return self.allowed_madspin - + def check_value_madspin(self, value): """handle alias and valid option not present in get_allowed_madspin""" - + if value.upper() in self.get_allowed_madspin(): return True elif value.lower() in self.get_allowed_madspin(): return True - + if 'MadSpin' not in self.available_module: return False - + if value.lower() in ['madspin', 'full']: return 'full' elif value.lower() in ['none']: return 'none' - - + + def set_default_madspin(self): """initialise the switch for madspin""" - + if 'MadSpin' in self.available_module: if os.path.exists(pjoin(self.me_dir,'Cards','madspin_card.dat')): self.switch['madspin'] = 'ON' @@ -865,10 +865,10 @@ def set_default_madspin(self): self.switch['madspin'] = 'OFF' else: self.switch['madspin'] = 'Not Avail.' - + def get_cardcmd_for_madspin(self, value): """set some command to run before allowing the user to modify the cards.""" - + if value == 'onshell': return ["edit madspin_card --replace_line='set spinmode' --before_line='decay' set spinmode onshell"] elif value in ['full', 'madspin']: @@ -877,36 +877,36 @@ def get_cardcmd_for_madspin(self, value): return ["edit madspin_card --replace_line='set spinmode' --before_line='decay' set spinmode none"] else: return [] - + # # ReWeight handling # def get_allowed_reweight(self): """ return the list of valid option for reweight=XXX """ - + if hasattr(self, 'allowed_reweight'): return getattr(self, 'allowed_reweight') - + if 'reweight' not in self.available_module: self.allowed_reweight = [] return self.allowed_reweight = ['OFF', 'ON'] - + # check for plugin mode plugin_path = self.mother_interface.plugin_path opts = misc.from_plugin_import(plugin_path, 'new_reweight', warning=False) self.allowed_reweight += opts - + def set_default_reweight(self): """initialise the switch for reweight""" - + if 'reweight' in self.available_module: if os.path.exists(pjoin(self.me_dir,'Cards','reweight_card.dat')): self.switch['reweight'] = 'ON' else: self.switch['reweight'] = 'OFF' else: - self.switch['reweight'] = 'Not Avail.' + self.switch['reweight'] = 'Not Avail.' #=============================================================================== # CheckValidForCmd @@ -916,14 +916,14 @@ class CheckValidForCmd(object): def check_banner_run(self, args): """check the validity of line""" - + if len(args) == 0: self.help_banner_run() raise self.InvalidCmd('banner_run requires at least one argument.') - + tag = [a[6:] for a in args if a.startswith('--tag=')] - - + + if os.path.exists(args[0]): type ='banner' format = self.detect_card_type(args[0]) @@ -931,7 +931,7 @@ def check_banner_run(self, args): raise self.InvalidCmd('The file is not a valid banner.') elif tag: args[0] = pjoin(self.me_dir,'Events', args[0], '%s_%s_banner.txt' % \ - (args[0], tag)) + (args[0], tag)) if not os.path.exists(args[0]): raise self.InvalidCmd('No banner associates to this name and tag.') else: @@ -939,7 +939,7 @@ def check_banner_run(self, args): type = 'run' banners = misc.glob('*_banner.txt', pjoin(self.me_dir,'Events', args[0])) if not banners: - raise self.InvalidCmd('No banner associates to this name.') + raise self.InvalidCmd('No banner associates to this name.') elif len(banners) == 1: args[0] = banners[0] else: @@ -947,8 +947,8 @@ def check_banner_run(self, args): tags = [os.path.basename(p)[len(args[0])+1:-11] for p in banners] tag = self.ask('which tag do you want to use?', tags[0], tags) args[0] = pjoin(self.me_dir,'Events', args[0], '%s_%s_banner.txt' % \ - (args[0], tag)) - + (args[0], tag)) + run_name = [arg[7:] for arg in args if arg.startswith('--name=')] if run_name: try: @@ -970,14 +970,14 @@ def check_banner_run(self, args): except Exception: pass self.set_run_name(name) - + def check_history(self, args): """check the validity of line""" - + if len(args) > 1: self.help_history() raise self.InvalidCmd('\"history\" command takes at most one argument') - + if not len(args): return elif args[0] != 'clean': @@ -985,16 +985,16 @@ def check_history(self, args): if dirpath and not os.path.exists(dirpath) or \ os.path.isdir(args[0]): raise self.InvalidCmd("invalid path %s " % dirpath) - + def check_save(self, args): """ check the validity of the line""" - + if len(args) == 0: args.append('options') if args[0] not in self._save_opts: raise self.InvalidCmd('wrong \"save\" format') - + if args[0] != 'options' and len(args) != 2: self.help_save() raise self.InvalidCmd('wrong \"save\" format') @@ -1003,7 +1003,7 @@ def check_save(self, args): if not os.path.exists(basename): raise self.InvalidCmd('%s is not a valid path, please retry' % \ args[1]) - + if args[0] == 'options': has_path = None for arg in args[1:]: @@ -1024,9 +1024,9 @@ def check_save(self, args): has_path = True if not has_path: if '--auto' in arg and self.options['mg5_path']: - args.insert(1, pjoin(self.options['mg5_path'],'input','mg5_configuration.txt')) + args.insert(1, pjoin(self.options['mg5_path'],'input','mg5_configuration.txt')) else: - args.insert(1, pjoin(self.me_dir,'Cards','me5_configuration.txt')) + args.insert(1, pjoin(self.me_dir,'Cards','me5_configuration.txt')) def check_set(self, args): """ check the validity of the line""" @@ -1039,20 +1039,20 @@ def check_set(self, args): self.help_set() raise self.InvalidCmd('Possible options for set are %s' % \ self._set_options) - + if args[0] in ['stdout_level']: if args[1] not in ['DEBUG','INFO','WARNING','ERROR','CRITICAL'] \ and not args[1].isdigit(): raise self.InvalidCmd('output_level needs ' + \ - 'a valid level') - + 'a valid level') + if args[0] in ['timeout']: if not args[1].isdigit(): - raise self.InvalidCmd('timeout values should be a integer') - + raise self.InvalidCmd('timeout values should be a integer') + def check_open(self, args): """ check the validity of the line """ - + if len(args) != 1: self.help_open() raise self.InvalidCmd('OPEN command requires exactly one argument') @@ -1069,7 +1069,7 @@ def check_open(self, args): raise self.InvalidCmd('No MadEvent path defined. Unable to associate this name to a file') else: return True - + path = self.me_dir if os.path.isfile(os.path.join(path,args[0])): args[0] = os.path.join(path,args[0]) @@ -1078,7 +1078,7 @@ def check_open(self, args): elif os.path.isfile(os.path.join(path,'HTML',args[0])): args[0] = os.path.join(path,'HTML',args[0]) # special for card with _default define: copy the default and open it - elif '_card.dat' in args[0]: + elif '_card.dat' in args[0]: name = args[0].replace('_card.dat','_card_default.dat') if os.path.isfile(os.path.join(path,'Cards', name)): files.cp(os.path.join(path,'Cards', name), os.path.join(path,'Cards', args[0])) @@ -1086,13 +1086,13 @@ def check_open(self, args): else: raise self.InvalidCmd('No default path for this file') elif not os.path.isfile(args[0]): - raise self.InvalidCmd('No default path for this file') - + raise self.InvalidCmd('No default path for this file') + def check_initMadLoop(self, args): """ check initMadLoop command arguments are valid.""" - + opt = {'refresh': False, 'nPS': None, 'force': False} - + for arg in args: if arg in ['-r','--refresh']: opt['refresh'] = True @@ -1105,14 +1105,14 @@ def check_initMadLoop(self, args): except ValueError: raise InvalidCmd("The number of attempts specified "+ "'%s' is not a valid integer."%n_attempts) - + return opt - + def check_treatcards(self, args): """check that treatcards arguments are valid [param|run|all] [--output_dir=] [--param_card=] [--run_card=] """ - + opt = {'output_dir':pjoin(self.me_dir,'Source'), 'param_card':pjoin(self.me_dir,'Cards','param_card.dat'), 'run_card':pjoin(self.me_dir,'Cards','run_card.dat'), @@ -1129,14 +1129,14 @@ def check_treatcards(self, args): if os.path.isfile(value): card_name = self.detect_card_type(value) if card_name != key: - raise self.InvalidCmd('Format for input file detected as %s while expecting %s' + raise self.InvalidCmd('Format for input file detected as %s while expecting %s' % (card_name, key)) opt[key] = value elif os.path.isfile(pjoin(self.me_dir,value)): card_name = self.detect_card_type(pjoin(self.me_dir,value)) if card_name != key: - raise self.InvalidCmd('Format for input file detected as %s while expecting %s' - % (card_name, key)) + raise self.InvalidCmd('Format for input file detected as %s while expecting %s' + % (card_name, key)) opt[key] = value else: raise self.InvalidCmd('No such file: %s ' % value) @@ -1154,14 +1154,14 @@ def check_treatcards(self, args): else: self.help_treatcards() raise self.InvalidCmd('Unvalid argument %s' % arg) - - return mode, opt - - + + return mode, opt + + def check_survey(self, args, cmd='survey'): """check that the argument for survey are valid""" - - + + self.opts = dict([(key,value[1]) for (key,value) in \ self._survey_options.items()]) @@ -1183,41 +1183,41 @@ def check_survey(self, args, cmd='survey'): self.help_survey() raise self.InvalidCmd('Too many argument for %s command' % cmd) elif not args: - # No run name assigned -> assigned one automaticaly + # No run name assigned -> assigned one automaticaly self.set_run_name(self.find_available_run_name(self.me_dir)) else: self.set_run_name(args[0], None,'parton', True) args.pop(0) - + return True def check_generate_events(self, args): """check that the argument for generate_events are valid""" - + run = None if args and args[-1].startswith('--laststep='): run = args[-1].split('=')[-1] if run not in ['auto','parton', 'pythia', 'pgs', 'delphes']: self.help_generate_events() raise self.InvalidCmd('invalid %s argument'% args[-1]) - if run != 'parton' and not self.options['pythia-pgs_path']: - raise self.InvalidCmd('''pythia-pgs not install. Please install this package first. + if run != 'parton' and not self.options['pythia-pgs_path']: + raise self.InvalidCmd('''pythia-pgs not install. Please install this package first. To do so type: \'install pythia-pgs\' in the mg5 interface''') if run == 'delphes' and not self.options['delphes_path']: - raise self.InvalidCmd('''delphes not install. Please install this package first. + raise self.InvalidCmd('''delphes not install. Please install this package first. To do so type: \'install Delphes\' in the mg5 interface''') del args[-1] - + #if len(args) > 1: # self.help_generate_events() # raise self.InvalidCmd('Too many argument for generate_events command: %s' % cmd) - + return run def check_calculate_decay_widths(self, args): """check that the argument for calculate_decay_widths are valid""" - + if self.ninitial != 1: raise self.InvalidCmd('Can only calculate decay widths for decay processes A > B C ...') @@ -1232,7 +1232,7 @@ def check_calculate_decay_widths(self, args): if len(args) > 1: self.help_calculate_decay_widths() raise self.InvalidCmd('Too many argument for calculate_decay_widths command: %s' % cmd) - + return accuracy @@ -1241,25 +1241,25 @@ def check_multi_run(self, args): """check that the argument for survey are valid""" run = None - + if not len(args): self.help_multi_run() raise self.InvalidCmd("""multi_run command requires at least one argument for the number of times that it call generate_events command""") - + if args[-1].startswith('--laststep='): run = args[-1].split('=')[-1] if run not in ['parton', 'pythia', 'pgs', 'delphes']: self.help_multi_run() raise self.InvalidCmd('invalid %s argument'% args[-1]) - if run != 'parton' and not self.options['pythia-pgs_path']: - raise self.InvalidCmd('''pythia-pgs not install. Please install this package first. + if run != 'parton' and not self.options['pythia-pgs_path']: + raise self.InvalidCmd('''pythia-pgs not install. Please install this package first. To do so type: \'install pythia-pgs\' in the mg5 interface''') if run == 'delphes' and not self.options['delphes_path']: - raise self.InvalidCmd('''delphes not install. Please install this package first. + raise self.InvalidCmd('''delphes not install. Please install this package first. To do so type: \'install Delphes\' in the mg5 interface''') del args[-1] - + elif not args[0].isdigit(): self.help_multi_run() @@ -1267,7 +1267,7 @@ def check_multi_run(self, args): #pass nb run to an integer nb_run = args.pop(0) args.insert(0, int(nb_run)) - + return run @@ -1284,7 +1284,7 @@ def check_refine(self, args): self.help_refine() raise self.InvalidCmd('require_precision argument is require for refine cmd') - + if not self.run_name: if self.results.lastrun: self.set_run_name(self.results.lastrun) @@ -1296,17 +1296,17 @@ def check_refine(self, args): else: try: [float(arg) for arg in args] - except ValueError: - self.help_refine() + except ValueError: + self.help_refine() raise self.InvalidCmd('refine arguments are suppose to be number') - + return True - + def check_combine_events(self, arg): """ Check the argument for the combine events command """ - + tag = [a for a in arg if a.startswith('--tag=')] - if tag: + if tag: arg.remove(tag[0]) tag = tag[0][6:] elif not self.run_tag: @@ -1314,53 +1314,53 @@ def check_combine_events(self, arg): else: tag = self.run_tag self.run_tag = tag - + if len(arg) > 1: self.help_combine_events() raise self.InvalidCmd('Too many argument for combine_events command') - + if len(arg) == 1: self.set_run_name(arg[0], self.run_tag, 'parton', True) - + if not self.run_name: if not self.results.lastrun: raise self.InvalidCmd('No run_name currently define. Unable to run combine') else: self.set_run_name(self.results.lastrun) - + return True - + def check_pythia(self, args): """Check the argument for pythia command - syntax: pythia [NAME] + syntax: pythia [NAME] Note that other option are already removed at this point """ - + mode = None laststep = [arg for arg in args if arg.startswith('--laststep=')] if laststep and len(laststep)==1: mode = laststep[0].split('=')[-1] if mode not in ['auto', 'pythia', 'pgs', 'delphes']: self.help_pythia() - raise self.InvalidCmd('invalid %s argument'% args[-1]) + raise self.InvalidCmd('invalid %s argument'% args[-1]) elif laststep: raise self.InvalidCmd('only one laststep argument is allowed') - + if not self.options['pythia-pgs_path']: logger.info('Retry to read configuration file to find pythia-pgs path') self.set_configuration() - + if not self.options['pythia-pgs_path'] or not \ os.path.exists(pjoin(self.options['pythia-pgs_path'],'src')): error_msg = 'No valid pythia-pgs path set.\n' error_msg += 'Please use the set command to define the path and retry.\n' error_msg += 'You can also define it in the configuration file.\n' raise self.InvalidCmd(error_msg) - - - + + + tag = [a for a in args if a.startswith('--tag=')] - if tag: + if tag: args.remove(tag[0]) tag = tag[0][6:] @@ -1368,8 +1368,8 @@ def check_pythia(self, args): if self.results.lastrun: args.insert(0, self.results.lastrun) else: - raise self.InvalidCmd('No run name currently define. Please add this information.') - + raise self.InvalidCmd('No run name currently define. Please add this information.') + if len(args) >= 1: if args[0] != self.run_name and\ not os.path.exists(pjoin(self.me_dir,'Events',args[0], 'unweighted_events.lhe.gz')): @@ -1388,21 +1388,21 @@ def check_pythia(self, args): files.ln(input_file, os.path.dirname(output_file)) else: misc.gunzip(input_file, keep=True, stdout=output_file) - + args.append(mode) - + def check_pythia8(self, args): """Check the argument for pythia command - syntax: pythia8 [NAME] + syntax: pythia8 [NAME] Note that other option are already removed at this point - """ + """ mode = None laststep = [arg for arg in args if arg.startswith('--laststep=')] if laststep and len(laststep)==1: mode = laststep[0].split('=')[-1] if mode not in ['auto', 'pythia','pythia8','delphes']: self.help_pythia8() - raise self.InvalidCmd('invalid %s argument'% args[-1]) + raise self.InvalidCmd('invalid %s argument'% args[-1]) elif laststep: raise self.InvalidCmd('only one laststep argument is allowed') @@ -1410,7 +1410,7 @@ def check_pythia8(self, args): if not self.options['pythia8_path']: logger.info('Retry reading configuration file to find pythia8 path') self.set_configuration() - + if not self.options['pythia8_path'] or not \ os.path.exists(pjoin(self.options['pythia8_path'],'bin','pythia8-config')): error_msg = 'No valid pythia8 path set.\n' @@ -1421,7 +1421,7 @@ def check_pythia8(self, args): raise self.InvalidCmd(error_msg) tag = [a for a in args if a.startswith('--tag=')] - if tag: + if tag: args.remove(tag[0]) tag = tag[0][6:] @@ -1430,11 +1430,11 @@ def check_pythia8(self, args): args.insert(0, self.results.lastrun) else: raise self.InvalidCmd('No run name currently define. '+ - 'Please add this information.') - + 'Please add this information.') + if len(args) >= 1: if args[0] != self.run_name and\ - not os.path.exists(pjoin(self.me_dir,'Events',args[0], + not os.path.exists(pjoin(self.me_dir,'Events',args[0], 'unweighted_events.lhe.gz')): raise self.InvalidCmd('No events file corresponding to %s run. ' % args[0]) @@ -1451,9 +1451,9 @@ def check_pythia8(self, args): else: raise self.InvalidCmd('No event file corresponding to %s run. ' % self.run_name) - + args.append(mode) - + def check_remove(self, args): """Check that the remove command is valid""" @@ -1484,33 +1484,33 @@ def check_plot(self, args): madir = self.options['madanalysis_path'] td = self.options['td_path'] - + if not madir or not td: logger.info('Retry to read configuration file to find madanalysis/td') self.set_configuration() madir = self.options['madanalysis_path'] - td = self.options['td_path'] - + td = self.options['td_path'] + if not madir: error_msg = 'No valid MadAnalysis path set.\n' error_msg += 'Please use the set command to define the path and retry.\n' error_msg += 'You can also define it in the configuration file.\n' - raise self.InvalidCmd(error_msg) + raise self.InvalidCmd(error_msg) if not td: error_msg = 'No valid td path set.\n' error_msg += 'Please use the set command to define the path and retry.\n' error_msg += 'You can also define it in the configuration file.\n' - raise self.InvalidCmd(error_msg) - + raise self.InvalidCmd(error_msg) + if len(args) == 0: if not hasattr(self, 'run_name') or not self.run_name: self.help_plot() - raise self.InvalidCmd('No run name currently define. Please add this information.') + raise self.InvalidCmd('No run name currently define. Please add this information.') args.append('all') return - + if args[0] not in self._plot_mode: self.set_run_name(args[0], level='plot') del args[0] @@ -1518,45 +1518,45 @@ def check_plot(self, args): args.append('all') elif not self.run_name: self.help_plot() - raise self.InvalidCmd('No run name currently define. Please add this information.') - + raise self.InvalidCmd('No run name currently define. Please add this information.') + for arg in args: if arg not in self._plot_mode and arg != self.run_name: self.help_plot() - raise self.InvalidCmd('unknown options %s' % arg) - + raise self.InvalidCmd('unknown options %s' % arg) + def check_syscalc(self, args): """Check the argument for the syscalc command syscalc run_name modes""" scdir = self.options['syscalc_path'] - + if not scdir: logger.info('Retry to read configuration file to find SysCalc') self.set_configuration() scdir = self.options['syscalc_path'] - + if not scdir: error_msg = 'No valid SysCalc path set.\n' error_msg += 'Please use the set command to define the path and retry.\n' error_msg += 'You can also define it in the configuration file.\n' error_msg += 'Please note that you need to compile SysCalc first.' - raise self.InvalidCmd(error_msg) - + raise self.InvalidCmd(error_msg) + if len(args) == 0: if not hasattr(self, 'run_name') or not self.run_name: self.help_syscalc() - raise self.InvalidCmd('No run name currently defined. Please add this information.') + raise self.InvalidCmd('No run name currently defined. Please add this information.') args.append('all') return #deal options tag = [a for a in args if a.startswith('--tag=')] - if tag: + if tag: args.remove(tag[0]) tag = tag[0][6:] - + if args[0] not in self._syscalc_mode: self.set_run_name(args[0], tag=tag, level='syscalc') del args[0] @@ -1564,61 +1564,61 @@ def check_syscalc(self, args): args.append('all') elif not self.run_name: self.help_syscalc() - raise self.InvalidCmd('No run name currently defined. Please add this information.') + raise self.InvalidCmd('No run name currently defined. Please add this information.') elif tag and tag != self.run_tag: self.set_run_name(self.run_name, tag=tag, level='syscalc') - + for arg in args: if arg not in self._syscalc_mode and arg != self.run_name: self.help_syscalc() - raise self.InvalidCmd('unknown options %s' % arg) + raise self.InvalidCmd('unknown options %s' % arg) if self.run_card['use_syst'] not in self.true: raise self.InvalidCmd('Run %s does not include ' % self.run_name + \ 'systematics information needed for syscalc.') - - + + def check_pgs(self, arg, no_default=False): """Check the argument for pythia command - syntax is "pgs [NAME]" + syntax is "pgs [NAME]" Note that other option are already remove at this point """ - + # If not pythia-pgs path if not self.options['pythia-pgs_path']: logger.info('Retry to read configuration file to find pythia-pgs path') self.set_configuration() - + if not self.options['pythia-pgs_path'] or not \ os.path.exists(pjoin(self.options['pythia-pgs_path'],'src')): error_msg = 'No valid pythia-pgs path set.\n' error_msg += 'Please use the set command to define the path and retry.\n' error_msg += 'You can also define it in the configuration file.\n' - raise self.InvalidCmd(error_msg) - + raise self.InvalidCmd(error_msg) + tag = [a for a in arg if a.startswith('--tag=')] - if tag: + if tag: arg.remove(tag[0]) tag = tag[0][6:] - - + + if len(arg) == 0 and not self.run_name: if self.results.lastrun: arg.insert(0, self.results.lastrun) else: - raise self.InvalidCmd('No run name currently define. Please add this information.') - + raise self.InvalidCmd('No run name currently define. Please add this information.') + if len(arg) == 1 and self.run_name == arg[0]: arg.pop(0) - + if not len(arg) and \ not os.path.exists(pjoin(self.me_dir,'Events','pythia_events.hep')): if not no_default: self.help_pgs() raise self.InvalidCmd('''No file file pythia_events.hep currently available Please specify a valid run_name''') - - lock = None + + lock = None if len(arg) == 1: prev_tag = self.set_run_name(arg[0], tag, 'pgs') if not os.path.exists(pjoin(self.me_dir,'Events',self.run_name,'%s_pythia_events.hep.gz' % prev_tag)): @@ -1626,25 +1626,25 @@ def check_pgs(self, arg, no_default=False): else: input_file = pjoin(self.me_dir,'Events', self.run_name, '%s_pythia_events.hep.gz' % prev_tag) output_file = pjoin(self.me_dir, 'Events', 'pythia_events.hep') - lock = cluster.asyncrone_launch('gunzip',stdout=open(output_file,'w'), + lock = cluster.asyncrone_launch('gunzip',stdout=open(output_file,'w'), argument=['-c', input_file]) else: - if tag: + if tag: self.run_card['run_tag'] = tag self.set_run_name(self.run_name, tag, 'pgs') - - return lock + + return lock def check_display(self, args): """check the validity of line syntax is "display XXXXX" """ - + if len(args) < 1 or args[0] not in self._display_opts: self.help_display() raise self.InvalidCmd - + if args[0] == 'variable' and len(args) !=2: raise self.InvalidCmd('variable need a variable name') @@ -1654,39 +1654,39 @@ def check_display(self, args): def check_import(self, args): """check the validity of line""" - + if not args: self.help_import() raise self.InvalidCmd('wrong \"import\" format') - + if args[0] != 'command': args.insert(0,'command') - - + + if not len(args) == 2 or not os.path.exists(args[1]): raise self.InvalidCmd('PATH is mandatory for import command\n') - + #=============================================================================== # CompleteForCmd #=============================================================================== class CompleteForCmd(CheckValidForCmd): """ The Series of help routine for the MadGraphCmd""" - - + + def complete_banner_run(self, text, line, begidx, endidx, formatting=True): "Complete the banner run command" try: - - + + args = self.split_arg(line[0:begidx], error=False) - + if args[-1].endswith(os.path.sep): return self.path_completion(text, os.path.join('.',*[a for a in args \ - if a.endswith(os.path.sep)])) - - + if a.endswith(os.path.sep)])) + + if len(args) > 1: # only options are possible tags = misc.glob('%s_*_banner.txt' % args[1], pjoin(self.me_dir, 'Events' , args[1])) @@ -1697,9 +1697,9 @@ def complete_banner_run(self, text, line, begidx, endidx, formatting=True): else: return self.list_completion(text, tags) return self.list_completion(text, tags +['--name=','-f'], line) - + # First argument - possibilites = {} + possibilites = {} comp = self.path_completion(text, os.path.join('.',*[a for a in args \ if a.endswith(os.path.sep)])) @@ -1711,10 +1711,10 @@ def complete_banner_run(self, text, line, begidx, endidx, formatting=True): run_list = misc.glob(pjoin('*','*_banner.txt'), pjoin(self.me_dir, 'Events')) run_list = [n.rsplit('/',2)[1] for n in run_list] possibilites['RUN Name'] = self.list_completion(text, run_list) - + return self.deal_multiple_categories(possibilites, formatting) - - + + except Exception as error: print(error) @@ -1732,12 +1732,12 @@ def complete_history(self, text, line, begidx, endidx): if len(args) == 1: return self.path_completion(text) - - def complete_open(self, text, line, begidx, endidx): + + def complete_open(self, text, line, begidx, endidx): """ complete the open command """ args = self.split_arg(line[0:begidx]) - + # Directory continuation if os.path.sep in args[-1] + text: return self.path_completion(text, @@ -1751,10 +1751,10 @@ def complete_open(self, text, line, begidx, endidx): if os.path.isfile(os.path.join(path,'README')): possibility.append('README') if os.path.isdir(os.path.join(path,'Cards')): - possibility += [f for f in os.listdir(os.path.join(path,'Cards')) + possibility += [f for f in os.listdir(os.path.join(path,'Cards')) if f.endswith('.dat')] if os.path.isdir(os.path.join(path,'HTML')): - possibility += [f for f in os.listdir(os.path.join(path,'HTML')) + possibility += [f for f in os.listdir(os.path.join(path,'HTML')) if f.endswith('.html') and 'default' not in f] else: possibility.extend(['./','../']) @@ -1763,7 +1763,7 @@ def complete_open(self, text, line, begidx, endidx): if os.path.exists('MG5_debug'): possibility.append('MG5_debug') return self.list_completion(text, possibility) - + def complete_set(self, text, line, begidx, endidx): "Complete the set command" @@ -1784,27 +1784,27 @@ def complete_set(self, text, line, begidx, endidx): elif len(args) >2 and args[-1].endswith(os.path.sep): return self.path_completion(text, os.path.join('.',*[a for a in args if a.endswith(os.path.sep)]), - only_dirs = True) - + only_dirs = True) + def complete_survey(self, text, line, begidx, endidx): """ Complete the survey command """ - + if line.endswith('nb_core=') and not text: import multiprocessing max = multiprocessing.cpu_count() return [str(i) for i in range(2,max+1)] - + return self.list_completion(text, self._run_options, line) - + complete_refine = complete_survey complete_combine_events = complete_survey complite_store = complete_survey complete_generate_events = complete_survey complete_create_gridpack = complete_survey - + def complete_generate_events(self, text, line, begidx, endidx): """ Complete the generate events""" - + if line.endswith('nb_core=') and not text: import multiprocessing max = multiprocessing.cpu_count() @@ -1813,17 +1813,17 @@ def complete_generate_events(self, text, line, begidx, endidx): return ['parton','pythia','pgs','delphes'] elif '--laststep=' in line.split()[-1] and line and line[-1] != ' ': return self.list_completion(text,['parton','pythia','pgs','delphes'],line) - + opts = self._run_options + self._generate_options return self.list_completion(text, opts, line) def complete_initMadLoop(self, text, line, begidx, endidx): "Complete the initMadLoop command" - + numbers = [str(i) for i in range(10)] opts = ['-f','-r','--nPS='] - + args = self.split_arg(line[0:begidx], error=False) if len(line) >=6 and line[begidx-6:begidx]=='--nPS=': return self.list_completion(text, numbers, line) @@ -1840,18 +1840,18 @@ def complete_launch(self, *args, **opts): def complete_calculate_decay_widths(self, text, line, begidx, endidx): """ Complete the calculate_decay_widths command""" - + if line.endswith('nb_core=') and not text: import multiprocessing max = multiprocessing.cpu_count() return [str(i) for i in range(2,max+1)] - + opts = self._run_options + self._calculate_decay_options return self.list_completion(text, opts, line) - + def complete_display(self, text, line, begidx, endidx): - """ Complete the display command""" - + """ Complete the display command""" + args = self.split_arg(line[0:begidx], error=False) if len(args) >= 2 and args[1] =='results': start = line.find('results') @@ -1860,44 +1860,44 @@ def complete_display(self, text, line, begidx, endidx): def complete_multi_run(self, text, line, begidx, endidx): """complete multi run command""" - + args = self.split_arg(line[0:begidx], error=False) if len(args) == 1: data = [str(i) for i in range(0,20)] return self.list_completion(text, data, line) - + if line.endswith('run=') and not text: return ['parton','pythia','pgs','delphes'] elif '--laststep=' in line.split()[-1] and line and line[-1] != ' ': return self.list_completion(text,['parton','pythia','pgs','delphes'],line) - + opts = self._run_options + self._generate_options return self.list_completion(text, opts, line) - - - + + + if line.endswith('nb_core=') and not text: import multiprocessing max = multiprocessing.cpu_count() return [str(i) for i in range(2,max+1)] opts = self._run_options + self._generate_options return self.list_completion(text, opts, line) - + def complete_plot(self, text, line, begidx, endidx): """ Complete the plot command """ - + args = self.split_arg(line[0:begidx], error=False) if len(args) > 1: return self.list_completion(text, self._plot_mode) else: return self.list_completion(text, self._plot_mode + list(self.results.keys())) - + def complete_syscalc(self, text, line, begidx, endidx, formatting=True): """ Complete the syscalc command """ - + output = {} args = self.split_arg(line[0:begidx], error=False) - + if len(args) <=1: output['RUN_NAME'] = self.list_completion(list(self.results.keys())) output['MODE'] = self.list_completion(text, self._syscalc_mode) @@ -1907,12 +1907,12 @@ def complete_syscalc(self, text, line, begidx, endidx, formatting=True): if run in self.results: tags = ['--tag=%s' % tag['tag'] for tag in self.results[run]] output['options'] += tags - + return self.deal_multiple_categories(output, formatting) - + def complete_remove(self, text, line, begidx, endidx): """Complete the remove command """ - + args = self.split_arg(line[0:begidx], error=False) if len(args) > 1 and (text.startswith('--t')): run = args[1] @@ -1932,8 +1932,8 @@ def complete_remove(self, text, line, begidx, endidx): data = misc.glob(pjoin('*','*_banner.txt'), pjoin(self.me_dir, 'Events')) data = [n.rsplit('/',2)[1] for n in data] return self.list_completion(text, ['all'] + data) - - + + def complete_shower(self,text, line, begidx, endidx): "Complete the shower command" args = self.split_arg(line[0:begidx], error=False) @@ -1941,7 +1941,7 @@ def complete_shower(self,text, line, begidx, endidx): return self.list_completion(text, self._interfaced_showers) elif len(args)>1 and args[1] in self._interfaced_showers: return getattr(self, 'complete_%s' % text)\ - (text, args[1],line.replace(args[0]+' ',''), + (text, args[1],line.replace(args[0]+' ',''), begidx-len(args[0])-1, endidx-len(args[0])-1) def complete_pythia8(self,text, line, begidx, endidx): @@ -1955,11 +1955,11 @@ def complete_pythia8(self,text, line, begidx, endidx): if not self.run_name: return tmp1 else: - tmp2 = self.list_completion(text, self._run_options + ['-f', + tmp2 = self.list_completion(text, self._run_options + ['-f', '--no_default', '--tag='], line) return tmp1 + tmp2 elif line[-1] != '=': - return self.list_completion(text, self._run_options + ['-f', + return self.list_completion(text, self._run_options + ['-f', '--no_default','--tag='], line) def complete_madanalysis5_parton(self,text, line, begidx, endidx): @@ -1978,19 +1978,19 @@ def complete_madanalysis5_parton(self,text, line, begidx, endidx): else: tmp2 = self.list_completion(text, ['-f', '--MA5_stdout_lvl=','--no_default','--tag='], line) - return tmp1 + tmp2 + return tmp1 + tmp2 elif '--MA5_stdout_lvl=' in line and not any(arg.startswith( '--MA5_stdout_lvl=') for arg in args): - return self.list_completion(text, - ['--MA5_stdout_lvl=%s'%opt for opt in + return self.list_completion(text, + ['--MA5_stdout_lvl=%s'%opt for opt in ['logging.INFO','logging.DEBUG','logging.WARNING', 'logging.CRITICAL','90']], line) else: - return self.list_completion(text, ['-f', + return self.list_completion(text, ['-f', '--MA5_stdout_lvl=','--no_default','--tag='], line) def complete_pythia(self,text, line, begidx, endidx): - "Complete the pythia command" + "Complete the pythia command" args = self.split_arg(line[0:begidx], error=False) if len(args) == 1: @@ -2001,16 +2001,16 @@ def complete_pythia(self,text, line, begidx, endidx): if not self.run_name: return tmp1 else: - tmp2 = self.list_completion(text, self._run_options + ['-f', + tmp2 = self.list_completion(text, self._run_options + ['-f', '--no_default', '--tag='], line) return tmp1 + tmp2 elif line[-1] != '=': - return self.list_completion(text, self._run_options + ['-f', + return self.list_completion(text, self._run_options + ['-f', '--no_default','--tag='], line) def complete_pgs(self,text, line, begidx, endidx): "Complete the pythia command" - args = self.split_arg(line[0:begidx], error=False) + args = self.split_arg(line[0:begidx], error=False) if len(args) == 1: #return valid run_name data = misc.glob(pjoin('*', '*_pythia_events.hep.gz'), pjoin(self.me_dir, 'Events')) @@ -2019,23 +2019,23 @@ def complete_pgs(self,text, line, begidx, endidx): if not self.run_name: return tmp1 else: - tmp2 = self.list_completion(text, self._run_options + ['-f', + tmp2 = self.list_completion(text, self._run_options + ['-f', '--tag=' ,'--no_default'], line) - return tmp1 + tmp2 + return tmp1 + tmp2 else: - return self.list_completion(text, self._run_options + ['-f', + return self.list_completion(text, self._run_options + ['-f', '--tag=','--no_default'], line) - complete_delphes = complete_pgs - complete_rivet = complete_pgs + complete_delphes = complete_pgs + complete_rivet = complete_pgs #=============================================================================== # MadEventCmd #=============================================================================== class MadEventCmd(CompleteForCmd, CmdExtended, HelpToCmd, common_run.CommonRunCmd): - """The command line processor of Mad Graph""" - + """The command line processor of Mad Graph""" + LO = True # Truth values @@ -2063,7 +2063,7 @@ class MadEventCmd(CompleteForCmd, CmdExtended, HelpToCmd, common_run.CommonRunCm cluster_mode = 0 queue = 'madgraph' nb_core = None - + next_possibility = { 'start': ['generate_events [OPTIONS]', 'multi_run [OPTIONS]', 'calculate_decay_widths [OPTIONS]', @@ -2080,9 +2080,9 @@ class MadEventCmd(CompleteForCmd, CmdExtended, HelpToCmd, common_run.CommonRunCm 'pgs': ['generate_events [OPTIONS]', 'multi_run [OPTIONS]'], 'delphes' : ['generate_events [OPTIONS]', 'multi_run [OPTIONS]'] } - + asking_for_run = AskRun - + ############################################################################ def __init__(self, me_dir = None, options={}, *completekey, **stdin): """ add information to the cmd """ @@ -2095,16 +2095,16 @@ def __init__(self, me_dir = None, options={}, *completekey, **stdin): if self.web: os.system('touch %s' % pjoin(self.me_dir,'Online')) - self.load_results_db() + self.load_results_db() self.results.def_web_mode(self.web) self.Gdirs = None - + self.prompt = "%s>"%os.path.basename(pjoin(self.me_dir)) self.configured = 0 # time for reading the card self._options = {} # for compatibility with extended_cmd - - + + def pass_in_web_mode(self): """configure web data""" self.web = True @@ -2113,22 +2113,22 @@ def pass_in_web_mode(self): if os.environ['MADGRAPH_BASE']: self.options['mg5_path'] = pjoin(os.environ['MADGRAPH_BASE'],'MG5') - ############################################################################ + ############################################################################ def check_output_type(self, path): """ Check that the output path is a valid madevent directory """ - + bin_path = os.path.join(path,'bin') if os.path.isfile(os.path.join(bin_path,'generate_events')): return True - else: + else: return False ############################################################################ def set_configuration(self, amcatnlo=False, final=True, **opt): - """assign all configuration variable from file + """assign all configuration variable from file loop over the different config file if config_file not define """ - - super(MadEventCmd,self).set_configuration(amcatnlo=amcatnlo, + + super(MadEventCmd,self).set_configuration(amcatnlo=amcatnlo, final=final, **opt) if not final: @@ -2171,24 +2171,24 @@ def set_configuration(self, amcatnlo=False, final=True, **opt): if not os.path.exists(pjoin(path, 'sys_calc')): logger.info("No valid SysCalc path found") continue - # No else since the next line reinitialize the option to the + # No else since the next line reinitialize the option to the #previous value anyway self.options[key] = os.path.realpath(path) continue else: self.options[key] = None - - + + return self.options ############################################################################ - def do_banner_run(self, line): + def do_banner_run(self, line): """Make a run from the banner file""" - + args = self.split_arg(line) #check the validity of the arguments - self.check_banner_run(args) - + self.check_banner_run(args) + # Remove previous cards for name in ['delphes_trigger.dat', 'delphes_card.dat', 'pgs_card.dat', 'pythia_card.dat', 'madspin_card.dat', @@ -2197,20 +2197,20 @@ def do_banner_run(self, line): os.remove(pjoin(self.me_dir, 'Cards', name)) except Exception: pass - + banner_mod.split_banner(args[0], self.me_dir, proc_card=False) - + # Check if we want to modify the run if not self.force: ans = self.ask('Do you want to modify the Cards?', 'n', ['y','n']) if ans == 'n': self.force = True - + # Call Generate events self.exec_cmd('generate_events %s %s' % (self.run_name, self.force and '-f' or '')) - - - + + + ############################################################################ def do_display(self, line, output=sys.stdout): """Display current internal status""" @@ -2223,7 +2223,7 @@ def do_display(self, line, output=sys.stdout): #return valid run_name data = misc.glob(pjoin('*','*_banner.txt'), pjoin(self.me_dir, 'Events')) data = [n.rsplit('/',2)[1:] for n in data] - + if data: out = {} for name, tag in data: @@ -2235,11 +2235,11 @@ def do_display(self, line, output=sys.stdout): print('the runs available are:') for run_name, tags in out.items(): print(' run: %s' % run_name) - print(' tags: ', end=' ') + print(' tags: ', end=' ') print(', '.join(tags)) else: print('No run detected.') - + elif args[0] == 'options': outstr = " Run Options \n" outstr += " ----------- \n" @@ -2260,8 +2260,8 @@ def do_display(self, line, output=sys.stdout): if value == default: outstr += " %25s \t:\t%s\n" % (key,value) else: - outstr += " %25s \t:\t%s (user set)\n" % (key,value) - outstr += "\n" + outstr += " %25s \t:\t%s (user set)\n" % (key,value) + outstr += "\n" outstr += " Configuration Options \n" outstr += " --------------------- \n" for key, default in self.options_configuration.items(): @@ -2275,15 +2275,15 @@ def do_display(self, line, output=sys.stdout): self.do_print_results(' '.join(args[1:])) else: super(MadEventCmd, self).do_display(line, output) - + def do_save(self, line, check=True, to_keep={}): - """Not in help: Save information to file""" + """Not in help: Save information to file""" args = self.split_arg(line) # Check argument validity if check: self.check_save(args) - + if args[0] == 'options': # First look at options which should be put in MG5DIR/input to_define = {} @@ -2295,7 +2295,7 @@ def do_save(self, line, check=True, to_keep={}): for key, default in self.options_madevent.items(): if self.options[key] != self.options_madevent[key]: to_define[key] = self.options[key] - + if '--all' in args: for key, default in self.options_madgraph.items(): if self.options[key] != self.options_madgraph[key]: @@ -2312,12 +2312,12 @@ def do_save(self, line, check=True, to_keep={}): filepath = pjoin(self.me_dir, 'Cards', 'me5_configuration.txt') basefile = pjoin(self.me_dir, 'Cards', 'me5_configuration.txt') basedir = self.me_dir - + if to_keep: to_define = to_keep self.write_configuration(filepath, basefile, basedir, to_define) - - + + def do_edit_cards(self, line): @@ -2326,80 +2326,80 @@ def do_edit_cards(self, line): # Check argument's validity mode = self.check_generate_events(args) self.ask_run_configuration(mode) - + return ############################################################################ - + ############################################################################ def do_restart_gridpack(self, line): """ syntax restart_gridpack --precision=1.0 --restart_zero collect the result of the current run and relaunch each channel - not completed or optionally a completed one with a precision worse than + not completed or optionally a completed one with a precision worse than a threshold (and/or the zero result channel)""" - - + + args = self.split_arg(line) # Check argument's validity self.check_survey(args) - + # initialize / remove lhapdf mode #self.run_card = banner_mod.RunCard(pjoin(self.me_dir, 'Cards', 'run_card.dat')) #self.configure_directory() - + gensym = gen_ximprove.gensym(self) - + min_precision = 1.0 resubmit_zero=False if '--precision=' in line: s = line.index('--precision=') + len('--precision=') arg=line[s:].split(1)[0] min_precision = float(arg) - + if '--restart_zero' in line: resubmit_zero = True - - + + gensym.resubmit(min_precision, resubmit_zero) self.monitor(run_type='All jobs submitted for gridpack', html=True) #will be done during the refine (more precisely in gen_ximprove) cross, error = sum_html.make_all_html_results(self) self.results.add_detail('cross', cross) - self.results.add_detail('error', error) + self.results.add_detail('error', error) self.exec_cmd("print_results %s" % self.run_name, - errorhandling=False, printcmd=False, precmd=False, postcmd=False) - + errorhandling=False, printcmd=False, precmd=False, postcmd=False) + self.results.add_detail('run_statistics', dict(gensym.run_statistics)) - + #self.exec_cmd('combine_events', postcmd=False) #self.exec_cmd('store_events', postcmd=False) self.exec_cmd('decay_events -from_cards', postcmd=False) self.exec_cmd('create_gridpack', postcmd=False) - - - ############################################################################ + + + ############################################################################ ############################################################################ def do_generate_events(self, line): """Main Commands: launch the full chain """ - + self.banner = None self.Gdirs = None - + args = self.split_arg(line) # Check argument's validity mode = self.check_generate_events(args) switch_mode = self.ask_run_configuration(mode, args) if not args: - # No run name assigned -> assigned one automaticaly + # No run name assigned -> assigned one automaticaly self.set_run_name(self.find_available_run_name(self.me_dir), None, 'parton') else: self.set_run_name(args[0], None, 'parton', True) args.pop(0) - + self.run_generate_events(switch_mode, args) self.postprocessing() @@ -2420,8 +2420,8 @@ def postprocessing(self): def rivet_postprocessing(self, rivet_config, postprocess_RIVET, postprocess_CONTUR): - # Check number of Rivet jobs to run - run_dirs = [pjoin(self.me_dir, 'Events',run_name) + # Check number of Rivet jobs to run + run_dirs = [pjoin(self.me_dir, 'Events',run_name) for run_name in self.postprocessing_dirs] nb_rivet = len(run_dirs) @@ -2550,10 +2550,10 @@ def wait_monitoring(Idle, Running, Done): wrapper = open(pjoin(self.me_dir, "Analysis", "contur", "run_contur.sh"), "w") wrapper.write(set_env) - + wrapper.write('{0}\n'.format(contur_cmd)) wrapper.close() - + misc.call(["run_contur.sh"], cwd=(pjoin(self.me_dir, "Analysis", "contur"))) logger.info("Contur outputs are stored in {0}".format(pjoin(self.me_dir, "Analysis", "contur","conturPlot"))) @@ -2572,7 +2572,7 @@ def run_generate_events(self, switch_mode, args): self.do_set('run_mode 2') self.do_set('nb_core 1') - if self.run_card['gridpack'] in self.true: + if self.run_card['gridpack'] in self.true: # Running gridpack warmup gridpack_opts=[('accuracy', 0.01), ('points', 2000), @@ -2593,7 +2593,7 @@ def run_generate_events(self, switch_mode, args): # Regular run mode logger.info('Generating %s events with run name %s' % (self.run_card['nevents'], self.run_name)) - + self.exec_cmd('survey %s %s' % (self.run_name,' '.join(args)), postcmd=False) nb_event = self.run_card['nevents'] @@ -2601,7 +2601,7 @@ def run_generate_events(self, switch_mode, args): self.exec_cmd('refine %s' % nb_event, postcmd=False) if not float(self.results.current['cross']): # Zero cross-section. Try to guess why - text = '''Survey return zero cross section. + text = '''Survey return zero cross section. Typical reasons are the following: 1) A massive s-channel particle has a width set to zero. 2) The pdf are zero for at least one of the initial state particles @@ -2613,17 +2613,17 @@ def run_generate_events(self, switch_mode, args): raise ZeroResult('See https://cp3.irmp.ucl.ac.be/projects/madgraph/wiki/FAQ-General-14') else: bypass_run = True - + #we can bypass the following if scan and first result is zero if not bypass_run: self.exec_cmd('refine %s --treshold=%s' % (nb_event,self.run_card['second_refine_treshold']) , postcmd=False) - + self.exec_cmd('combine_events', postcmd=False,printcmd=False) self.print_results_in_shell(self.results.current) if self.run_card['use_syst']: - if self.run_card['systematics_program'] == 'auto': + if self.run_card['systematics_program'] == 'auto': scdir = self.options['syscalc_path'] if not scdir or not os.path.exists(scdir): to_use = 'systematics' @@ -2634,26 +2634,26 @@ def run_generate_events(self, switch_mode, args): else: logger.critical('Unvalid options for systematics_program: bypass computation of systematics variations.') to_use = 'none' - + if to_use == 'systematics': if self.run_card['systematics_arguments'] != ['']: self.exec_cmd('systematics %s %s ' % (self.run_name, - ' '.join(self.run_card['systematics_arguments'])), + ' '.join(self.run_card['systematics_arguments'])), postcmd=False, printcmd=False) else: self.exec_cmd('systematics %s --from_card' % self.run_name, - postcmd=False,printcmd=False) + postcmd=False,printcmd=False) elif to_use == 'syscalc': self.run_syscalc('parton') - - - self.create_plot('parton') - self.exec_cmd('store_events', postcmd=False) + + + self.create_plot('parton') + self.exec_cmd('store_events', postcmd=False) if self.run_card['boost_event'].strip() and self.run_card['boost_event'] != 'False': self.boost_events() - - - self.exec_cmd('reweight -from_cards', postcmd=False) + + + self.exec_cmd('reweight -from_cards', postcmd=False) self.exec_cmd('decay_events -from_cards', postcmd=False) if self.run_card['time_of_flight']>=0: self.exec_cmd("add_time_of_flight --threshold=%s" % self.run_card['time_of_flight'] ,postcmd=False) @@ -2664,43 +2664,43 @@ def run_generate_events(self, switch_mode, args): self.create_root_file(input , output) self.exec_cmd('madanalysis5_parton --no_default', postcmd=False, printcmd=False) - # shower launches pgs/delphes if needed + # shower launches pgs/delphes if needed self.exec_cmd('shower --no_default', postcmd=False, printcmd=False) self.exec_cmd('madanalysis5_hadron --no_default', postcmd=False, printcmd=False) self.exec_cmd('rivet --no_default', postcmd=False, printcmd=False) self.store_result() - - if self.allow_notification_center: - misc.system_notify('Run %s finished' % os.path.basename(self.me_dir), - '%s: %s +- %s ' % (self.results.current['run_name'], + + if self.allow_notification_center: + misc.system_notify('Run %s finished' % os.path.basename(self.me_dir), + '%s: %s +- %s ' % (self.results.current['run_name'], self.results.current['cross'], self.results.current['error'])) - + def boost_events(self): - + if not self.run_card['boost_event']: return - + if self.run_card['boost_event'].startswith('lambda'): if not isinstance(self, cmd.CmdShell): raise Exception("boost not allowed online") filter = eval(self.run_card['boost_event']) else: raise Exception - + path = [pjoin(self.me_dir, 'Events', self.run_name, 'unweighted_events.lhe.gz'), pjoin(self.me_dir, 'Events', self.run_name, 'unweighted_events.lhe'), pjoin(self.me_dir, 'Events', self.run_name, 'events.lhe.gz'), pjoin(self.me_dir, 'Events', self.run_name, 'events.lhe')] - + for p in path: if os.path.exists(p): event_path = p break else: raise Exception("fail to find event file for the boost") - - + + lhe = lhe_parser.EventFile(event_path) with misc.TMP_directory() as tmp_dir: output = lhe_parser.EventFile(pjoin(tmp_dir, os.path.basename(event_path)), 'w') @@ -2711,28 +2711,28 @@ def boost_events(self): event.boost(filter) #write this modify event output.write(str(event)) - output.write('\n') + output.write('\n') lhe.close() - files.mv(pjoin(tmp_dir, os.path.basename(event_path)), event_path) - - - - - + files.mv(pjoin(tmp_dir, os.path.basename(event_path)), event_path) + + + + + def do_initMadLoop(self,line): - """Compile and run MadLoop for a certain number of PS point so as to + """Compile and run MadLoop for a certain number of PS point so as to initialize MadLoop (setup the zero helicity and loop filter.)""" - + args = line.split() # Check argument's validity options = self.check_initMadLoop(args) - + if not options['force']: self.ask_edit_cards(['MadLoopParams.dat'], mode='fixed', plot=False) self.exec_cmd('treatcards loop --no_MadLoopInit') if options['refresh']: - for filter in misc.glob('*Filter*', + for filter in misc.glob('*Filter*', pjoin(self.me_dir,'SubProcesses','MadLoop5_resources')): logger.debug("Resetting filter '%s'."%os.path.basename(filter)) os.remove(filter) @@ -2753,14 +2753,14 @@ def do_initMadLoop(self,line): def do_launch(self, line, *args, **opt): """Main Commands: exec generate_events for 2>N and calculate_width for 1>N""" - + if self.ninitial == 1: logger.info("Note that since 2.3. The launch for 1>N pass in event generation\n"+ " To have the previous behavior use the calculate_decay_widths function") # self.do_calculate_decay_widths(line, *args, **opt) #else: self.do_generate_events(line, *args, **opt) - + def print_results_in_shell(self, data): """Have a nice results prints in the shell, data should be of type: gen_crossxhtml.OneTagResults""" @@ -2770,7 +2770,7 @@ def print_results_in_shell(self, data): if data['run_statistics']: globalstat = sum_html.RunStatistics() - + logger.info(" " ) logger.debug(" === Run statistics summary ===") for key, value in data['run_statistics'].items(): @@ -2786,13 +2786,13 @@ def print_results_in_shell(self, data): logger.warning(globalstat.get_warning_text()) logger.info(" ") - + logger.info(" === Results Summary for run: %s tag: %s ===\n" % (data['run_name'],data['tag'])) - + total_time = int(sum(_['cumulative_timing'] for _ in data['run_statistics'].values())) if total_time > 0: logger.info(" Cumulative sequential time for this run: %s"%misc.format_time(total_time)) - + if self.ninitial == 1: logger.info(" Width : %.4g +- %.4g GeV" % (data['cross'], data['error'])) else: @@ -2810,18 +2810,18 @@ def print_results_in_shell(self, data): if len(split)!=3: continue scale, cross, error = split - cross_sections[float(scale)] = (float(cross), float(error)) + cross_sections[float(scale)] = (float(cross), float(error)) if len(cross_sections)>0: logger.info(' Pythia8 merged cross-sections are:') for scale in sorted(cross_sections.keys()): logger.info(' > Merging scale = %-6.4g : %-11.5g +/- %-7.2g [pb]'%\ (scale,cross_sections[scale][0],cross_sections[scale][1])) - + else: if self.ninitial == 1: logger.info(" Matched width : %.4g +- %.4g GeV" % (data['cross_pythia'], data['error_pythia'])) else: - logger.info(" Matched cross-section : %.4g +- %.4g pb" % (data['cross_pythia'], data['error_pythia'])) + logger.info(" Matched cross-section : %.4g +- %.4g pb" % (data['cross_pythia'], data['error_pythia'])) logger.info(" Nb of events after matching/merging : %d" % int(data['nb_event_pythia'])) if self.run_card['use_syst'] in self.true and \ (int(self.run_card['ickkw'])==1 or self.run_card['ktdurham']>0.0 @@ -2838,9 +2838,9 @@ def print_results_in_file(self, data, path, mode='w', format='full'): data should be of type: gen_crossxhtml.OneTagResults""" if not data: return - + fsock = open(path, mode) - + if data['run_statistics']: logger.debug(" === Run statistics summary ===") for key, value in data['run_statistics'].items(): @@ -2851,7 +2851,7 @@ def print_results_in_file(self, data, path, mode='w', format='full'): if format == "full": fsock.write(" === Results Summary for run: %s tag: %s process: %s ===\n" % \ (data['run_name'],data['tag'], os.path.basename(self.me_dir))) - + if self.ninitial == 1: fsock.write(" Width : %.4g +- %.4g GeV\n" % (data['cross'], data['error'])) else: @@ -2861,20 +2861,20 @@ def print_results_in_file(self, data, path, mode='w', format='full'): if self.ninitial == 1: fsock.write(" Matched Width : %.4g +- %.4g GeV\n" % (data['cross_pythia'], data['error_pythia'])) else: - fsock.write(" Matched Cross-section : %.4g +- %.4g pb\n" % (data['cross_pythia'], data['error_pythia'])) + fsock.write(" Matched Cross-section : %.4g +- %.4g pb\n" % (data['cross_pythia'], data['error_pythia'])) fsock.write(" Nb of events after Matching : %s\n" % data['nb_event_pythia']) fsock.write(" \n" ) elif format == "short": if mode == "w": fsock.write("# run_name tag cross error Nb_event cross_after_matching nb_event_after matching\n") - + if data['cross_pythia'] and data['nb_event_pythia']: text = "%(run_name)s %(tag)s %(cross)s %(error)s %(nb_event)s %(cross_pythia)s %(nb_event_pythia)s\n" else: text = "%(run_name)s %(tag)s %(cross)s %(error)s %(nb_event)s\n" fsock.write(text % data) - - ############################################################################ + + ############################################################################ def do_calculate_decay_widths(self, line): """Main Commands: launch decay width calculation and automatic inclusion of calculated widths and BRs in the param_card.""" @@ -2887,21 +2887,21 @@ def do_calculate_decay_widths(self, line): self.Gdirs = None if not args: - # No run name assigned -> assigned one automaticaly + # No run name assigned -> assigned one automaticaly self.set_run_name(self.find_available_run_name(self.me_dir)) else: self.set_run_name(args[0], reload_card=True) args.pop(0) self.configure_directory() - + # Running gridpack warmup opts=[('accuracy', accuracy), # default 0.01 ('points', 1000), ('iterations',9)] logger.info('Calculating decay widths with run name %s' % self.run_name) - + self.exec_cmd('survey %s %s' % \ (self.run_name, " ".join(['--' + opt + '=' + str(val) for (opt,val) \ @@ -2910,26 +2910,26 @@ def do_calculate_decay_widths(self, line): self.refine_mode = "old" # specify how to combine event self.exec_cmd('combine_events', postcmd=False) self.exec_cmd('store_events', postcmd=False) - + self.collect_decay_widths() self.print_results_in_shell(self.results.current) - self.update_status('calculate_decay_widths done', - level='parton', makehtml=False) + self.update_status('calculate_decay_widths done', + level='parton', makehtml=False) + - ############################################################################ def collect_decay_widths(self): - """ Collect the decay widths and calculate BRs for all particles, and put - in param_card form. + """ Collect the decay widths and calculate BRs for all particles, and put + in param_card form. """ - + particle_dict = {} # store the results run_name = self.run_name # Looping over the Subprocesses for P_path in SubProcesses.get_subP(self.me_dir): ids = SubProcesses.get_subP_ids(P_path) - # due to grouping we need to compute the ratio factor for the + # due to grouping we need to compute the ratio factor for the # ungroup resutls (that we need here). Note that initial particles # grouping are not at the same stage as final particle grouping nb_output = len(ids) / (len(set([p[0] for p in ids]))) @@ -2940,30 +2940,30 @@ def collect_decay_widths(self): particle_dict[particles[0]].append([particles[1:], result/nb_output]) except KeyError: particle_dict[particles[0]] = [[particles[1:], result/nb_output]] - + self.update_width_in_param_card(particle_dict, initial = pjoin(self.me_dir, 'Cards', 'param_card.dat'), output=pjoin(self.me_dir, 'Events', run_name, "param_card.dat")) - + @staticmethod def update_width_in_param_card(decay_info, initial=None, output=None): # Open the param_card.dat and insert the calculated decays and BRs - + if not output: output = initial - + param_card_file = open(initial) param_card = param_card_file.read().split('\n') param_card_file.close() decay_lines = [] line_number = 0 - # Read and remove all decays from the param_card + # Read and remove all decays from the param_card while line_number < len(param_card): line = param_card[line_number] if line.lower().startswith('decay'): - # Read decay if particle in decay_info - # DECAY 6 1.455100e+00 + # Read decay if particle in decay_info + # DECAY 6 1.455100e+00 line = param_card.pop(line_number) line = line.split() particle = 0 @@ -2996,7 +2996,7 @@ def update_width_in_param_card(decay_info, initial=None, output=None): break line=param_card[line_number] if particle and particle not in decay_info: - # No decays given, only total width + # No decays given, only total width decay_info[particle] = [[[], width]] else: # Not decay line_number += 1 @@ -3004,7 +3004,7 @@ def update_width_in_param_card(decay_info, initial=None, output=None): while not param_card[-1] or param_card[-1].startswith('#'): param_card.pop(-1) - # Append calculated and read decays to the param_card + # Append calculated and read decays to the param_card param_card.append("#\n#*************************") param_card.append("# Decay widths *") param_card.append("#*************************") @@ -3018,7 +3018,7 @@ def update_width_in_param_card(decay_info, initial=None, output=None): param_card.append("# BR NDA ID1 ID2 ...") brs = [[(val[1]/width).real, val[0]] for val in decay_info[key] if val[1]] for val in sorted(brs, reverse=True): - param_card.append(" %e %i %s # %s" % + param_card.append(" %e %i %s # %s" % (val[0].real, len(val[1]), " ".join([str(v) for v in val[1]]), val[0] * width @@ -3031,7 +3031,7 @@ def update_width_in_param_card(decay_info, initial=None, output=None): ############################################################################ def do_multi_run(self, line): - + args = self.split_arg(line) # Check argument's validity mode = self.check_multi_run(args) @@ -3047,7 +3047,7 @@ def do_multi_run(self, line): self.check_param_card(path, run=False) #store it locally to avoid relaunch param_card_iterator, self.param_card_iterator = self.param_card_iterator, [] - + crossoversig = 0 inv_sq_err = 0 nb_event = 0 @@ -3055,8 +3055,8 @@ def do_multi_run(self, line): self.nb_refine = 0 self.exec_cmd('generate_events %s_%s -f' % (main_name, i), postcmd=False) # Update collected value - nb_event += int(self.results[self.run_name][-1]['nb_event']) - self.results.add_detail('nb_event', nb_event , run=main_name) + nb_event += int(self.results[self.run_name][-1]['nb_event']) + self.results.add_detail('nb_event', nb_event , run=main_name) cross = self.results[self.run_name][-1]['cross'] error = self.results[self.run_name][-1]['error'] + 1e-99 crossoversig+=cross/error**2 @@ -3070,7 +3070,7 @@ def do_multi_run(self, line): os.mkdir(pjoin(self.me_dir,'Events', self.run_name)) except Exception: pass - os.system('%(bin)s/merge.pl %(event)s/%(name)s_*/unweighted_events.lhe.gz %(event)s/%(name)s/unweighted_events.lhe.gz %(event)s/%(name)s_banner.txt' + os.system('%(bin)s/merge.pl %(event)s/%(name)s_*/unweighted_events.lhe.gz %(event)s/%(name)s/unweighted_events.lhe.gz %(event)s/%(name)s_banner.txt' % {'bin': self.dirbin, 'event': pjoin(self.me_dir,'Events'), 'name': self.run_name}) @@ -3084,19 +3084,19 @@ def do_multi_run(self, line): self.create_root_file('%s/unweighted_events.lhe' % self.run_name, '%s/unweighted_events.root' % self.run_name) - - path = pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe") + + path = pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe") self.create_plot('parton', path, pjoin(self.me_dir, 'HTML',self.run_name, 'plots_parton.html') ) - - if not os.path.exists('%s.gz' % path): + + if not os.path.exists('%s.gz' % path): misc.gzip(path) self.update_status('', level='parton') - self.print_results_in_shell(self.results.current) - + self.print_results_in_shell(self.results.current) + cpath = pjoin(self.me_dir,'Cards','param_card.dat') if param_card_iterator: @@ -3112,21 +3112,21 @@ def do_multi_run(self, line): path = pjoin(self.me_dir, 'Events','scan_%s.txt' % scan_name) logger.info("write all cross-section results in %s" % path, '$MG:BOLD') param_card_iterator.write_summary(path) - - ############################################################################ + + ############################################################################ def do_treatcards(self, line, mode=None, opt=None): """Advanced commands: create .inc files from param_card.dat/run_card.dat""" if not mode and not opt: args = self.split_arg(line) mode, opt = self.check_treatcards(args) - + # To decide whether to refresh MadLoop's helicity filters, it is necessary # to check if the model parameters where modified or not, before doing - # anything else. + # anything else. need_MadLoopFilterUpdate = False - # Just to record what triggered the reinitialization of MadLoop for a + # Just to record what triggered the reinitialization of MadLoop for a # nice debug message. type_of_change = '' if not opt['forbid_MadLoopInit'] and self.proc_characteristics['loop_induced'] \ @@ -3137,10 +3137,10 @@ def do_treatcards(self, line, mode=None, opt=None): (os.path.getmtime(paramDat)-os.path.getmtime(paramInc)) > 0.0: need_MadLoopFilterUpdate = True type_of_change = 'model' - + ML_in = pjoin(self.me_dir, 'Cards', 'MadLoopParams.dat') ML_out = pjoin(self.me_dir,"SubProcesses", - "MadLoop5_resources", "MadLoopParams.dat") + "MadLoop5_resources", "MadLoopParams.dat") if (not os.path.isfile(ML_in)) or (not os.path.isfile(ML_out)) or \ (os.path.getmtime(ML_in)-os.path.getmtime(ML_out)) > 0.0: need_MadLoopFilterUpdate = True @@ -3148,7 +3148,7 @@ def do_treatcards(self, line, mode=None, opt=None): #check if no 'Auto' are present in the file self.check_param_card(pjoin(self.me_dir, 'Cards','param_card.dat')) - + if mode in ['param', 'all']: model = self.find_model_name() tmp_model = os.path.basename(model) @@ -3160,9 +3160,9 @@ def do_treatcards(self, line, mode=None, opt=None): check_param_card.check_valid_param_card(mg5_param) opt['param_card'] = pjoin(self.me_dir, 'Source', 'MODEL', 'MG5_param.dat') else: - check_param_card.check_valid_param_card(opt['param_card']) - - logger.debug('write compile file for card: %s' % opt['param_card']) + check_param_card.check_valid_param_card(opt['param_card']) + + logger.debug('write compile file for card: %s' % opt['param_card']) param_card = check_param_card.ParamCard(opt['param_card']) outfile = pjoin(opt['output_dir'], 'param_card.inc') ident_card = pjoin(self.me_dir,'Cards','ident_card.dat') @@ -3185,10 +3185,10 @@ def do_treatcards(self, line, mode=None, opt=None): devnull.close() default = pjoin(self.me_dir,'bin','internal','ufomodel','param_card.dat') - need_mp = self.proc_characteristics['loop_induced'] + need_mp = self.proc_characteristics['loop_induced'] param_card.write_inc_file(outfile, ident_card, default, need_mp=need_mp) - - + + if mode in ['run', 'all']: if not hasattr(self, 'run_card'): run_card = banner_mod.RunCard(opt['run_card'], path=pjoin(self.me_dir, 'Cards', 'run_card.dat')) @@ -3202,7 +3202,7 @@ def do_treatcards(self, line, mode=None, opt=None): run_card['lpp2'] = 0 run_card['ebeam1'] = 0 run_card['ebeam2'] = 0 - + # Ensure that the bias parameters has all the required input from the # run_card if run_card['bias_module'].lower() not in ['dummy','none']: @@ -3219,7 +3219,7 @@ def do_treatcards(self, line, mode=None, opt=None): mandatory_file,run_card['bias_module'])) misc.copytree(run_card['bias_module'], pjoin(self.me_dir,'Source','BIAS', os.path.basename(run_card['bias_module']))) - + #check expected parameters for the module. default_bias_parameters = {} start, last = False,False @@ -3244,50 +3244,50 @@ def do_treatcards(self, line, mode=None, opt=None): for pair in line.split(','): if not pair.strip(): continue - x,y =pair.split(':') + x,y =pair.split(':') x=x.strip() if x.startswith(('"',"'")) and x.endswith(x[0]): - x = x[1:-1] + x = x[1:-1] default_bias_parameters[x] = y elif ':' in line: x,y = line.split(':') x = x.strip() if x.startswith(('"',"'")) and x.endswith(x[0]): - x = x[1:-1] + x = x[1:-1] default_bias_parameters[x] = y for key,value in run_card['bias_parameters'].items(): if key not in default_bias_parameters: logger.warning('%s not supported by the bias module. We discard this entry.', key) else: default_bias_parameters[key] = value - run_card['bias_parameters'] = default_bias_parameters - - - # Finally write the include file + run_card['bias_parameters'] = default_bias_parameters + + + # Finally write the include file run_card.write_include_file(opt['output_dir']) - + if self.proc_characteristics['loop_induced'] and mode in ['loop', 'all']: - self.MadLoopparam = banner_mod.MadLoopParam(pjoin(self.me_dir, + self.MadLoopparam = banner_mod.MadLoopParam(pjoin(self.me_dir, 'Cards', 'MadLoopParams.dat')) # The writing out of MadLoop filter is potentially dangerous # when running in multi-core with a central disk. So it is turned - # off here. If these filters were not initialized then they will + # off here. If these filters were not initialized then they will # have to be re-computed at the beginning of each run. if 'WriteOutFilters' in self.MadLoopparam.user_set and \ self.MadLoopparam.get('WriteOutFilters'): logger.info( -"""You chose to have MadLoop writing out filters. +"""You chose to have MadLoop writing out filters. Beware that this can be dangerous for local multicore runs.""") self.MadLoopparam.set('WriteOutFilters',False, changeifuserset=False) - + # The conservative settings below for 'CTModeInit' and 'ZeroThres' # help adress issues for processes like g g > h z, and g g > h g - # where there are some helicity configuration heavily suppressed - # (by several orders of magnitude) so that the helicity filter + # where there are some helicity configuration heavily suppressed + # (by several orders of magnitude) so that the helicity filter # needs high numerical accuracy to correctly handle this spread in # magnitude. Also, because one cannot use the Born as a reference - # scale, it is better to force quadruple precision *for the + # scale, it is better to force quadruple precision *for the # initialization points only*. This avoids numerical accuracy issues # when setting up the helicity filters and does not significantly # slow down the run. @@ -3298,21 +3298,21 @@ def do_treatcards(self, line, mode=None, opt=None): # It is a bit superficial to use the level 2 which tries to numerically # map matching helicities (because of CP symmetry typically) together. -# It is useless in the context of MC over helicities and it can +# It is useless in the context of MC over helicities and it can # potentially make the helicity double checking fail. self.MadLoopparam.set('HelicityFilterLevel',1, changeifuserset=False) # To be on the safe side however, we ask for 4 consecutive matching # helicity filters. self.MadLoopparam.set('CheckCycle',4, changeifuserset=False) - + # For now it is tricky to have each channel performing the helicity # double check. What we will end up doing is probably some kind # of new initialization round at the beginning of each launch - # command, to reset the filters. + # command, to reset the filters. self.MadLoopparam.set('DoubleCheckHelicityFilter',False, changeifuserset=False) - + # Thanks to TIR recycling, TIR is typically much faster for Loop-induced # processes when not doing MC over helicities, so that we place OPP last. if not hasattr(self, 'run_card'): @@ -3349,7 +3349,7 @@ def do_treatcards(self, line, mode=None, opt=None): logger.warning( """You chose to also use a lorentz rotation for stability tests (see parameter NRotations_[DP|QP]). Beware that, for optimization purposes, MadEvent uses manual TIR cache clearing which is not compatible - with the lorentz rotation stability test. The number of these rotations to be used will be reset to + with the lorentz rotation stability test. The number of these rotations to be used will be reset to zero by MadLoop. You can avoid this by changing the parameter 'FORCE_ML_HELICITY_SUM' int he matrix.f files to be .TRUE. so that the sum over helicity configurations is performed within MadLoop (in which case the helicity of final state particles cannot be speicfied in the LHE file.""") @@ -3363,15 +3363,15 @@ def do_treatcards(self, line, mode=None, opt=None): # self.MadLoopparam.set('NRotations_DP',0,changeifuserset=False) # Revert to the above to be slightly less robust but twice faster. self.MadLoopparam.set('NRotations_DP',1,changeifuserset=False) - self.MadLoopparam.set('NRotations_QP',0,changeifuserset=False) - + self.MadLoopparam.set('NRotations_QP',0,changeifuserset=False) + # Finally, the stability tests are slightly less reliable for process - # with less or equal than 4 final state particles because the + # with less or equal than 4 final state particles because the # accessible kinematic is very limited (i.e. lorentz rotations don't # shuffle invariants numerics much). In these cases, we therefore # increase the required accuracy to 10^-7. # This is important for getting g g > z z [QCD] working with a - # ptheavy cut as low as 1 GeV. + # ptheavy cut as low as 1 GeV. if self.proc_characteristics['nexternal']<=4: if ('MLStabThres' in self.MadLoopparam.user_set and \ self.MadLoopparam.get('MLStabThres')>1.0e-7): @@ -3381,12 +3381,12 @@ def do_treatcards(self, line, mode=None, opt=None): than four external legs, so this is not recommended (especially not for g g > z z).""") self.MadLoopparam.set('MLStabThres',1.0e-7,changeifuserset=False) else: - self.MadLoopparam.set('MLStabThres',1.0e-4,changeifuserset=False) + self.MadLoopparam.set('MLStabThres',1.0e-4,changeifuserset=False) #write the output file self.MadLoopparam.write(pjoin(self.me_dir,"SubProcesses","MadLoop5_resources", "MadLoopParams.dat")) - + if self.proc_characteristics['loop_induced'] and mode in ['loop', 'all']: # Now Update MadLoop filters if necessary (if modifications were made to # the model parameters). @@ -3403,12 +3403,12 @@ def do_treatcards(self, line, mode=None, opt=None): elif not opt['forbid_MadLoopInit'] and \ MadLoopInitializer.need_MadLoopInit(self.me_dir): self.exec_cmd('initMadLoop -f') - - ############################################################################ + + ############################################################################ def do_survey(self, line): """Advanced commands: launch survey for the current process """ - - + + args = self.split_arg(line) # Check argument's validity self.check_survey(args) @@ -3416,7 +3416,7 @@ def do_survey(self, line): if os.path.exists(pjoin(self.me_dir,'error')): os.remove(pjoin(self.me_dir,'error')) - + self.configure_directory() # Save original random number self.random_orig = self.random @@ -3435,9 +3435,9 @@ def do_survey(self, line): P_zero_result = [] # check the number of times where they are no phase-space # File for the loop (for loop induced) - if os.path.exists(pjoin(self.me_dir,'SubProcesses', + if os.path.exists(pjoin(self.me_dir,'SubProcesses', 'MadLoop5_resources')) and cluster.need_transfer(self.options): - tf=tarfile.open(pjoin(self.me_dir, 'SubProcesses', + tf=tarfile.open(pjoin(self.me_dir, 'SubProcesses', 'MadLoop5_resources.tar.gz'), 'w:gz', dereference=True) tf.add(pjoin(self.me_dir,'SubProcesses','MadLoop5_resources'), arcname='MadLoop5_resources') @@ -3467,7 +3467,7 @@ def do_survey(self, line): except Exception as error: logger.debug(error) pass - + jobs, P_zero_result = ajobcreator.launch() # Check if all or only some fails if P_zero_result: @@ -3481,60 +3481,60 @@ def do_survey(self, line): self.get_Gdir() for P in P_zero_result: self.Gdirs[0][pjoin(self.me_dir,'SubProcesses',P)] = [] - + self.monitor(run_type='All jobs submitted for survey', html=True) if not self.history or 'survey' in self.history[-1] or self.ninitial ==1 or \ self.run_card['gridpack']: #will be done during the refine (more precisely in gen_ximprove) cross, error = self.make_make_all_html_results() self.results.add_detail('cross', cross) - self.results.add_detail('error', error) + self.results.add_detail('error', error) self.exec_cmd("print_results %s" % self.run_name, - errorhandling=False, printcmd=False, precmd=False, postcmd=False) - + errorhandling=False, printcmd=False, precmd=False, postcmd=False) + self.results.add_detail('run_statistics', dict(ajobcreator.run_statistics)) self.update_status('End survey', 'parton', makehtml=False) ############################################################################ def pass_in_difficult_integration_mode(self, rate=1): """be more secure for the integration to not miss it due to strong cut""" - + # improve survey options if default if self.opts['points'] == self._survey_options['points'][1]: self.opts['points'] = (rate+2) * self._survey_options['points'][1] if self.opts['iterations'] == self._survey_options['iterations'][1]: self.opts['iterations'] = 1 + rate + self._survey_options['iterations'][1] if self.opts['accuracy'] == self._survey_options['accuracy'][1]: - self.opts['accuracy'] = self._survey_options['accuracy'][1]/(rate+2) - + self.opts['accuracy'] = self._survey_options['accuracy'][1]/(rate+2) + # Modify run_config.inc in order to improve the refine conf_path = pjoin(self.me_dir, 'Source','run_config.inc') files.cp(conf_path, conf_path + '.bk') # text = open(conf_path).read() - min_evt, max_evt = 2500 *(2+rate), 10000*(rate+1) - + min_evt, max_evt = 2500 *(2+rate), 10000*(rate+1) + text = re.sub('''\(min_events = \d+\)''', '(min_events = %i )' % min_evt, text) text = re.sub('''\(max_events = \d+\)''', '(max_events = %i )' % max_evt, text) fsock = open(conf_path, 'w') fsock.write(text) fsock.close() - + # Compile for name in ['../bin/internal/gen_ximprove', 'all']: self.compile(arg=[name], cwd=os.path.join(self.me_dir, 'Source')) - - - ############################################################################ + + + ############################################################################ def do_refine(self, line): """Advanced commands: launch survey for the current process """ - devnull = open(os.devnull, 'w') + devnull = open(os.devnull, 'w') self.nb_refine += 1 args = self.split_arg(line) treshold=None - - + + for a in args: if a.startswith('--treshold='): treshold = float(a.split('=',1)[1]) @@ -3548,8 +3548,8 @@ def do_refine(self, line): break # Check argument's validity self.check_refine(args) - - refine_opt = {'err_goal': args[0], 'split_channels': True} + + refine_opt = {'err_goal': args[0], 'split_channels': True} precision = args[0] if len(args) == 2: refine_opt['max_process']= args[1] @@ -3560,15 +3560,15 @@ def do_refine(self, line): # Update random number self.update_random() self.save_random() - + if self.cluster_mode: logger.info('Creating Jobs') self.update_status('Refine results to %s' % precision, level=None) - + self.total_jobs = 0 - subproc = [l.strip() for l in open(pjoin(self.me_dir,'SubProcesses', + subproc = [l.strip() for l in open(pjoin(self.me_dir,'SubProcesses', 'subproc.mg'))] - + # cleanning the previous job for nb_proc,subdir in enumerate(subproc): subdir = subdir.strip() @@ -3589,14 +3589,14 @@ def do_refine(self, line): level = 5 if value.has_warning(): level = 10 - logger.log(level, + logger.log(level, value.nice_output(str('/'.join([key[0],'G%s'%key[1]]))). replace(' statistics','')) logger.debug(globalstat.nice_output('combined', no_warning=True)) - + if survey_statistics: x_improve.run_statistics = survey_statistics - + x_improve.launch() # create the ajob for the refinment. if not self.history or 'refine' not in self.history[-1]: cross, error = x_improve.update_html() #update html results for survey @@ -3610,9 +3610,9 @@ def do_refine(self, line): subdir = subdir.strip() Pdir = pjoin(self.me_dir, 'SubProcesses',subdir) bindir = pjoin(os.path.relpath(self.dirbin, Pdir)) - + logger.info(' %s ' % subdir) - + if os.path.exists(pjoin(Pdir, 'ajob1')): cudacpp_backend = self.run_card['cudacpp_backend'] # the default value is defined in banner.py @@ -3629,7 +3629,7 @@ def do_refine(self, line): ###self.compile(['all'], cwd=Pdir) alljobs = misc.glob('ajob*', Pdir) - + #remove associated results.dat (ensure to not mix with all data) Gre = re.compile("\s*j=(G[\d\.\w]+)") for job in alljobs: @@ -3637,49 +3637,49 @@ def do_refine(self, line): for Gdir in Gdirs: if os.path.exists(pjoin(Pdir, Gdir, 'results.dat')): os.remove(pjoin(Pdir, Gdir,'results.dat')) - - nb_tot = len(alljobs) + + nb_tot = len(alljobs) self.total_jobs += nb_tot for i, job in enumerate(alljobs): job = os.path.basename(job) - self.launch_job('%s' % job, cwd=Pdir, remaining=(nb_tot-i-1), - run_type='Refine number %s on %s (%s/%s)' % + self.launch_job('%s' % job, cwd=Pdir, remaining=(nb_tot-i-1), + run_type='Refine number %s on %s (%s/%s)' % (self.nb_refine, subdir, nb_proc+1, len(subproc))) - self.monitor(run_type='All job submitted for refine number %s' % self.nb_refine, + self.monitor(run_type='All job submitted for refine number %s' % self.nb_refine, html=True) - + self.update_status("Combining runs", level='parton') try: os.remove(pjoin(Pdir, 'combine_runs.log')) except Exception: pass - + if isinstance(x_improve, gen_ximprove.gen_ximprove_v4): # the merge of the events.lhe is handle in the x_improve class - # for splitted runs. (and partly in store_events). + # for splitted runs. (and partly in store_events). combine_runs.CombineRuns(self.me_dir) self.refine_mode = "old" else: self.refine_mode = "new" - + cross, error = self.make_make_all_html_results() self.results.add_detail('cross', cross) self.results.add_detail('error', error) - self.results.add_detail('run_statistics', + self.results.add_detail('run_statistics', dict(self.results.get_detail('run_statistics'))) self.update_status('finish refine', 'parton', makehtml=False) devnull.close() - - ############################################################################ + + ############################################################################ def do_comine_iteration(self, line): """Not in help: Combine a given iteration combine_iteration Pdir Gdir S|R step - S is for survey + S is for survey R is for refine - step is the iteration number (not very critical)""" + step is the iteration number (not very critical)""" self.set_run_name("tmp") self.configure_directory(html_opening=False) @@ -3695,12 +3695,12 @@ def do_comine_iteration(self, line): gensym.combine_iteration(Pdir, Gdir, int(step)) elif mode == "R": refine = gen_ximprove.gen_ximprove_share(self) - refine.combine_iteration(Pdir, Gdir, int(step)) - - + refine.combine_iteration(Pdir, Gdir, int(step)) - - ############################################################################ + + + + ############################################################################ def do_combine_events(self, line): """Advanced commands: Launch combine events""" start=time.time() @@ -3710,11 +3710,11 @@ def do_combine_events(self, line): self.check_combine_events(args) self.update_status('Combining Events', level='parton') - + if self.run_card['gridpack'] and isinstance(self, GridPackCmd): return GridPackCmd.do_combine_events(self, line) - + # Define The Banner tag = self.run_card['run_tag'] # Update the banner with the pythia card @@ -3727,14 +3727,14 @@ def do_combine_events(self, line): self.banner.change_seed(self.random_orig) if not os.path.exists(pjoin(self.me_dir, 'Events', self.run_name)): os.mkdir(pjoin(self.me_dir, 'Events', self.run_name)) - self.banner.write(pjoin(self.me_dir, 'Events', self.run_name, + self.banner.write(pjoin(self.me_dir, 'Events', self.run_name, '%s_%s_banner.txt' % (self.run_name, tag))) - - get_wgt = lambda event: event.wgt + + get_wgt = lambda event: event.wgt AllEvent = lhe_parser.MultiEventFile() AllEvent.banner = self.banner - + partials = 0 # if too many file make some partial unweighting sum_xsec, sum_xerru, sum_axsec = 0,[],0 Gdirs = self.get_Gdir() @@ -3751,12 +3751,12 @@ def do_combine_events(self, line): os.remove(pjoin(Gdir, 'events.lhe')) continue - AllEvent.add(pjoin(Gdir, 'events.lhe'), + AllEvent.add(pjoin(Gdir, 'events.lhe'), result.get('xsec'), result.get('xerru'), result.get('axsec') ) - + if len(AllEvent) >= 80: #perform a partial unweighting AllEvent.unweight(pjoin(self.me_dir, "Events", self.run_name, "partials%s.lhe.gz" % partials), get_wgt, log_level=5, trunc_error=1e-2, event_target=self.run_card['nevents']) @@ -3765,13 +3765,13 @@ def do_combine_events(self, line): AllEvent.add(pjoin(self.me_dir, "Events", self.run_name, "partials%s.lhe.gz" % partials), sum_xsec, math.sqrt(sum(x**2 for x in sum_xerru)), - sum_axsec) + sum_axsec) partials +=1 - + if not hasattr(self,'proc_characteristic'): self.proc_characteristic = self.get_characteristics() if len(AllEvent) == 0: - nb_event = 0 + nb_event = 0 else: nb_event = AllEvent.unweight(pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe.gz"), get_wgt, trunc_error=1e-2, event_target=self.run_card['nevents'], @@ -3791,22 +3791,22 @@ def do_combine_events(self, line): os.remove(pjoin(self.me_dir, "Events", self.run_name, "partials%s.lhe.gz" % i)) except Exception: os.remove(pjoin(self.me_dir, "Events", self.run_name, "partials%s.lhe" % i)) - + self.results.add_detail('nb_event', nb_event) - + if self.run_card['bias_module'].lower() not in ['dummy', 'none'] and nb_event: self.correct_bias() elif self.run_card['custom_fcts']: self.correct_bias() logger.info("combination of events done in %s s ", time.time()-start) - + self.to_store.append('event') - - ############################################################################ + + ############################################################################ def correct_bias(self): - """check the first event and correct the weight by the bias + """check the first event and correct the weight by the bias and correct the cross-section. - If the event do not have the bias tag it means that the bias is + If the event do not have the bias tag it means that the bias is one modifying the cross-section/shape so we have nothing to do """ @@ -3834,7 +3834,7 @@ def correct_bias(self): output.write('') output.close() lhe.close() - + # MODIFY THE BANNER i.e. INIT BLOCK # ensure information compatible with normalisation choice total_cross = sum(cross[key] for key in cross) @@ -3846,8 +3846,8 @@ def correct_bias(self): elif self.run_card['event_norm'] == 'unity': total_cross = self.results.current['cross'] * total_cross / nb_event for key in cross: - cross[key] *= total_cross / nb_event - + cross[key] *= total_cross / nb_event + bannerfile = lhe_parser.EventFile(pjoin(self.me_dir, 'Events', self.run_name, '.banner.tmp.gz'),'w') banner = banner_mod.Banner(lhe.banner) banner.modify_init_cross(cross) @@ -3862,12 +3862,12 @@ def correct_bias(self): os.remove(lhe.name) os.remove(bannerfile.name) os.remove(output.name) - - + + self.results.current['cross'] = total_cross self.results.current['error'] = 0 - - ############################################################################ + + ############################################################################ def do_store_events(self, line): """Advanced commands: Launch store events""" @@ -3883,16 +3883,16 @@ def do_store_events(self, line): if not os.path.exists(pjoin(self.me_dir, 'Events', run)): os.mkdir(pjoin(self.me_dir, 'Events', run)) if not os.path.exists(pjoin(self.me_dir, 'HTML', run)): - os.mkdir(pjoin(self.me_dir, 'HTML', run)) - + os.mkdir(pjoin(self.me_dir, 'HTML', run)) + # 1) Store overall process information #input = pjoin(self.me_dir, 'SubProcesses', 'results.dat') #output = pjoin(self.me_dir, 'SubProcesses', '%s_results.dat' % run) - #files.cp(input, output) + #files.cp(input, output) # 2) Treat the files present in the P directory - # Ensure that the number of events is different of 0 + # Ensure that the number of events is different of 0 if self.results.current['nb_event'] == 0 and not self.run_card['gridpack']: logger.warning("No event detected. No cleaning performed! This should allow to run:\n" + " cd Subprocesses; ../bin/internal/combine_events\n"+ @@ -3910,18 +3910,18 @@ def do_store_events(self, line): # if os.path.exists(pjoin(G_path, 'results.dat')): # input = pjoin(G_path, 'results.dat') # output = pjoin(G_path, '%s_results.dat' % run) - # files.cp(input, output) + # files.cp(input, output) #except Exception: - # continue + # continue # Store log try: if os.path.exists(pjoin(G_path, 'log.txt')): input = pjoin(G_path, 'log.txt') output = pjoin(G_path, '%s_log.txt' % run) - files.mv(input, output) + files.mv(input, output) except Exception: continue - #try: + #try: # # Grid # for name in ['ftn26']: # if os.path.exists(pjoin(G_path, name)): @@ -3930,7 +3930,7 @@ def do_store_events(self, line): # input = pjoin(G_path, name) # output = pjoin(G_path, '%s_%s' % (run,name)) # files.mv(input, output) - # misc.gzip(pjoin(G_path, output), error=None) + # misc.gzip(pjoin(G_path, output), error=None) #except Exception: # continue # Delete ftn25 to ensure reproducible runs @@ -3940,11 +3940,11 @@ def do_store_events(self, line): # 3) Update the index.html self.gen_card_html() - + # 4) Move the Files present in Events directory E_path = pjoin(self.me_dir, 'Events') O_path = pjoin(self.me_dir, 'Events', run) - + # The events file for name in ['events.lhe', 'unweighted_events.lhe']: finput = pjoin(E_path, name) @@ -3960,30 +3960,30 @@ def do_store_events(self, line): # os.remove(pjoin(O_path, '%s.gz' % name)) # input = pjoin(E_path, name) ## output = pjoin(O_path, name) - + self.update_status('End Parton', level='parton', makehtml=False) devnull.close() - - - ############################################################################ + + + ############################################################################ def do_create_gridpack(self, line): """Advanced commands: Create gridpack from present run""" self.update_status('Creating gridpack', level='parton') # compile gen_ximprove misc.compile(['../bin/internal/gen_ximprove'], cwd=pjoin(self.me_dir, "Source")) - + Gdir = self.get_Gdir() Pdir = set([os.path.dirname(G) for G in Gdir]) - for P in Pdir: + for P in Pdir: allG = misc.glob('G*', path=P) for G in allG: if pjoin(P, G) not in Gdir: logger.debug('removing %s', pjoin(P,G)) shutil.rmtree(pjoin(P,G)) - - + + args = self.split_arg(line) self.check_combine_events(args) if not self.run_tag: self.run_tag = 'tag_1' @@ -3996,13 +3996,13 @@ def do_create_gridpack(self, line): cwd=self.me_dir) misc.call(['./bin/internal/clean'], cwd=self.me_dir) misc.call(['./bin/internal/make_gridpack'], cwd=self.me_dir) - files.mv(pjoin(self.me_dir, 'gridpack.tar.gz'), + files.mv(pjoin(self.me_dir, 'gridpack.tar.gz'), pjoin(self.me_dir, '%s_gridpack.tar.gz' % self.run_name)) os.system("sed -i.bak \"s/\s*.true.*=.*GridRun/ .false. = GridRun/g\" %s/Cards/grid_card.dat" \ % self.me_dir) self.update_status('gridpack created', level='gridpack') - - ############################################################################ + + ############################################################################ def do_shower(self, line): """launch the shower""" @@ -4010,7 +4010,7 @@ def do_shower(self, line): if len(args)>1 and args[0] in self._interfaced_showers: chosen_showers = [args.pop(0)] elif '--no_default' in line: - # If '--no_default' was specified in the arguments, then only one + # If '--no_default' was specified in the arguments, then only one # shower will be run, depending on which card is present. # but we each of them are called. (each of them check if the file exists) chosen_showers = list(self._interfaced_showers) @@ -4021,9 +4021,9 @@ def do_shower(self, line): shower_priority = ['pythia8','pythia'] chosen_showers = [sorted(chosen_showers,key=lambda sh: shower_priority.index(sh) if sh in shower_priority else len(shower_priority)+1)[0]] - + for shower in chosen_showers: - self.exec_cmd('%s %s'%(shower,' '.join(args)), + self.exec_cmd('%s %s'%(shower,' '.join(args)), postcmd=False, printcmd=False) def do_madanalysis5_parton(self, line): @@ -4039,11 +4039,11 @@ def do_madanalysis5_parton(self, line): def mg5amc_py8_interface_consistency_warning(options): """ Check the consistency of the mg5amc_py8_interface installed with the current MG5 and Pythia8 versions. """ - + # All this is only relevant is Pythia8 is interfaced to MG5 if not options['pythia8_path']: return None - + if not options['mg5amc_py8_interface_path']: return \ """ @@ -4053,7 +4053,7 @@ def mg5amc_py8_interface_consistency_warning(options): Consider installing the MG5_aMC-PY8 interface with the following command: MG5_aMC>install mg5amc_py8_interface """ - + mg5amc_py8_interface_path = options['mg5amc_py8_interface_path'] py8_path = options['pythia8_path'] # If the specified interface path is relative, make it absolut w.r.t MGDIR if @@ -4062,7 +4062,7 @@ def mg5amc_py8_interface_consistency_warning(options): mg5amc_py8_interface_path = pjoin(MG5DIR,mg5amc_py8_interface_path) py8_path = pjoin(MG5DIR,py8_path) - # Retrieve all the on-install and current versions + # Retrieve all the on-install and current versions fsock = open(pjoin(mg5amc_py8_interface_path, 'MG5AMC_VERSION_ON_INSTALL')) MG5_version_on_install = fsock.read().replace('\n','') fsock.close() @@ -4074,7 +4074,7 @@ def mg5amc_py8_interface_consistency_warning(options): MG5_curr_version =misc.get_pkg_info()['version'] try: p = subprocess.Popen(['./get_pythia8_version.py',py8_path], - stdout=subprocess.PIPE, stderr=subprocess.PIPE, + stdout=subprocess.PIPE, stderr=subprocess.PIPE, cwd=mg5amc_py8_interface_path) (out, err) = p.communicate() out = out.decode(errors='ignore').replace('\n','') @@ -4084,37 +4084,37 @@ def mg5amc_py8_interface_consistency_warning(options): float(out) except: PY8_curr_version = None - + if not MG5_version_on_install is None and not MG5_curr_version is None: if MG5_version_on_install != MG5_curr_version: return \ """ The current version of MG5_aMC (v%s) is different than the one active when - installing the 'mg5amc_py8_interface_path' (which was MG5aMC v%s). + installing the 'mg5amc_py8_interface_path' (which was MG5aMC v%s). Please consider refreshing the installation of this interface with the command: MG5_aMC>install mg5amc_py8_interface """%(MG5_curr_version, MG5_version_on_install) - + if not PY8_version_on_install is None and not PY8_curr_version is None: if PY8_version_on_install != PY8_curr_version: return \ """ The current version of Pythia8 (v%s) is different than the one active when - installing the 'mg5amc_py8_interface' tool (which was Pythia8 v%s). + installing the 'mg5amc_py8_interface' tool (which was Pythia8 v%s). Please consider refreshing the installation of this interface with the command: MG5_aMC>install mg5amc_py8_interface """%(PY8_curr_version,PY8_version_on_install) - + return None def setup_Pythia8RunAndCard(self, PY8_Card, run_type): """ Setup the Pythia8 Run environment and card. In particular all the process and run specific parameters of the card are automatically set here. This function returns the path where HEPMC events will be output, if any.""" - + HepMC_event_output = None tag = self.run_tag - + PY8_Card.subruns[0].systemSet('Beams:LHEF',"unweighted_events.lhe.gz") hepmc_format = PY8_Card['HEPMCoutput:file'].lower() @@ -4185,7 +4185,7 @@ def setup_Pythia8RunAndCard(self, PY8_Card, run_type): misc.mkfifo(fifo_path) # Use defaultSet not to overwrite the current userSet status PY8_Card.defaultSet('HEPMCoutput:file',fifo_path) - HepMC_event_output=fifo_path + HepMC_event_output=fifo_path elif hepmc_format in ['','/dev/null','None']: logger.warning('User disabled the HepMC output of Pythia8.') HepMC_event_output = None @@ -4206,7 +4206,7 @@ def setup_Pythia8RunAndCard(self, PY8_Card, run_type): # only if it is not already user_set. if PY8_Card['JetMatching:qCut']==-1.0: PY8_Card.MadGraphSet('JetMatching:qCut',1.5*self.run_card['xqcut'], force=True) - + if PY8_Card['JetMatching:qCut']<(1.5*self.run_card['xqcut']): logger.error( 'The MLM merging qCut parameter you chose (%f) is less than '%PY8_Card['JetMatching:qCut']+ @@ -4233,7 +4233,7 @@ def setup_Pythia8RunAndCard(self, PY8_Card, run_type): if PY8_Card['JetMatching:qCut'] not in qCutList: qCutList.append(PY8_Card['JetMatching:qCut']) PY8_Card.MadGraphSet('SysCalc:qCutList', qCutList, force=True) - + if PY8_Card['SysCalc:qCutList']!='auto': for scale in PY8_Card['SysCalc:qCutList']: @@ -4244,7 +4244,7 @@ def setup_Pythia8RunAndCard(self, PY8_Card, run_type): "'sys_matchscale' in the run_card) is less than 1.5*xqcut, where xqcut is"+ ' the run_card parameter (=%f)\n'%self.run_card['xqcut']+ 'It would be better/safer to use a larger qCut or a smaller xqcut.') - + # Specific MLM settings # PY8 should not implement the MLM veto since the driver should do it # if merging scale variation is turned on @@ -4294,18 +4294,18 @@ def setup_Pythia8RunAndCard(self, PY8_Card, run_type): CKKW_cut = 'ktdurham' elif self.run_card['ptlund']>0.0 and self.run_card['ktdurham']<=0.0: PY8_Card.subruns[0].MadGraphSet('Merging:doPTLundMerging',True) - CKKW_cut = 'ptlund' + CKKW_cut = 'ptlund' else: raise InvalidCmd("*Either* the 'ptlund' or 'ktdurham' cut in "+\ " the run_card must be turned on to activate CKKW(L) merging"+ " with Pythia8, but *both* cuts cannot be turned on at the same time."+ "\n ptlund=%f, ktdurham=%f."%(self.run_card['ptlund'],self.run_card['ktdurham'])) - + # Automatically set qWeed to the CKKWL cut if not defined by the user. if PY8_Card['SysCalc:qWeed']==-1.0: PY8_Card.MadGraphSet('SysCalc:qWeed',self.run_card[CKKW_cut], force=True) - + # MadGraphSet sets the corresponding value (in system mode) # only if it is not already user_set. if PY8_Card['Merging:TMS']==-1.0: @@ -4319,7 +4319,7 @@ def setup_Pythia8RunAndCard(self, PY8_Card, run_type): 'The CKKWl merging scale you chose (%f) is less than '%PY8_Card['Merging:TMS']+ 'the %s cut specified in the run_card parameter (=%f).\n'%(CKKW_cut,self.run_card[CKKW_cut])+ 'It is incorrect to use a smaller CKKWl scale than the generation-level %s cut!'%CKKW_cut) - + PY8_Card.MadGraphSet('TimeShower:pTmaxMatch',1) PY8_Card.MadGraphSet('SpaceShower:pTmaxMatch',1) PY8_Card.MadGraphSet('SpaceShower:rapidityOrder',False) @@ -4381,7 +4381,7 @@ def do_pythia8(self, line): try: import madgraph - except ImportError: + except ImportError: import internal.histograms as histograms else: import madgraph.various.histograms as histograms @@ -4400,16 +4400,16 @@ def do_pythia8(self, line): self.check_pythia8(args) self.configure_directory(html_opening =False) else: - # initialize / remove lhapdf mode + # initialize / remove lhapdf mode self.configure_directory(html_opening =False) - self.check_pythia8(args) + self.check_pythia8(args) # Update the banner with the pythia card if not self.banner or len(self.banner) <=1: # Here the level keyword 'pythia' must not be changed to 'pythia8'. self.banner = banner_mod.recover_banner(self.results, 'pythia') - # the args are modify and the last arg is always the mode + # the args are modify and the last arg is always the mode if not no_default: self.ask_pythia_run_configuration(args[-1], pythia_version=8, banner=self.banner) @@ -4425,7 +4425,7 @@ def do_pythia8(self, line): #"Please use 'event_norm = average' in the run_card to avoid this problem.") - + if not self.options['mg5amc_py8_interface_path'] or not \ os.path.exists(pjoin(self.options['mg5amc_py8_interface_path'], 'MG5aMC_PY8_interface')): @@ -4444,16 +4444,16 @@ def do_pythia8(self, line): # Again here 'pythia' is just a keyword for the simulation level. self.update_status('\033[92mRunning Pythia8 [arXiv:1410.3012]\033[0m', 'pythia8') - - tag = self.run_tag + + tag = self.run_tag # Now write Pythia8 card # Start by reading, starting from the default one so that the 'user_set' # tag are correctly set. - PY8_Card = banner_mod.PY8Card(pjoin(self.me_dir, 'Cards', + PY8_Card = banner_mod.PY8Card(pjoin(self.me_dir, 'Cards', 'pythia8_card_default.dat')) PY8_Card.read(pjoin(self.me_dir, 'Cards', 'pythia8_card.dat'), setter='user') - + run_type = 'default' merged_run_types = ['MLM','CKKW'] if int(self.run_card['ickkw'])==1: @@ -4471,7 +4471,7 @@ def do_pythia8(self, line): cmd_card = StringIO.StringIO() PY8_Card.write(cmd_card,pjoin(self.me_dir,'Cards','pythia8_card_default.dat'), direct_pythia_input=True) - + # Now setup the preamble to make sure that everything will use the locally # installed tools (if present) even if the user did not add it to its # environment variables. @@ -4486,13 +4486,13 @@ def do_pythia8(self, line): preamble = misc.get_HEPTools_location_setter( pjoin(MG5DIR,'HEPTools'),'lib') preamble += "\n unset PYTHIA8DATA\n" - + open(pythia_cmd_card,'w').write("""! ! It is possible to run this card manually with: ! %s %s ! """%(preamble+pythia_main,os.path.basename(pythia_cmd_card))+cmd_card.getvalue()) - + # launch pythia8 pythia_log = pjoin(self.me_dir , 'Events', self.run_name , '%s_pythia8.log' % tag) @@ -4504,13 +4504,13 @@ def do_pythia8(self, line): shell_exe = None if os.path.exists('/usr/bin/env'): shell_exe = '/usr/bin/env %s'%shell - else: + else: shell_exe = misc.which(shell) if not shell_exe: raise self.InvalidCmd('No s hell could be found in your environment.\n'+ "Make sure that either '%s' is in your path or that the"%shell+\ " command '/usr/bin/env %s' exists and returns a valid path."%shell) - + exe_cmd = "#!%s\n%s"%(shell_exe,' '.join( [preamble+pythia_main, os.path.basename(pythia_cmd_card)])) @@ -4528,7 +4528,7 @@ def do_pythia8(self, line): ( os.path.exists(HepMC_event_output) and \ stat.S_ISFIFO(os.stat(HepMC_event_output).st_mode)) startPY8timer = time.time() - + # Information that will be extracted from this PY8 run PY8_extracted_information={ 'sigma_m':None, 'Nacc':None, 'Ntry':None, 'cross_sections':{} } @@ -4556,7 +4556,7 @@ def do_pythia8(self, line): n_cores = max(int(self.options['cluster_size']),1) elif self.options['run_mode']==2: n_cores = max(int(self.cluster.nb_core),1) - + lhe_file_name = os.path.basename(PY8_Card.subruns[0]['Beams:LHEF']) lhe_file = lhe_parser.EventFile(pjoin(self.me_dir,'Events', self.run_name,PY8_Card.subruns[0]['Beams:LHEF'])) @@ -4574,7 +4574,7 @@ def do_pythia8(self, line): if self.options['run_mode']==2: min_n_events_per_job = 100 elif self.options['run_mode']==1: - min_n_events_per_job = 1000 + min_n_events_per_job = 1000 min_n_core = n_events//min_n_events_per_job n_cores = max(min(min_n_core,n_cores),1) @@ -4584,8 +4584,8 @@ def do_pythia8(self, line): logger.info('Follow Pythia8 shower by running the '+ 'following command (in a separate terminal):\n tail -f %s'%pythia_log) - if self.options['run_mode']==2 and self.options['nb_core']>1: - ret_code = self.cluster.launch_and_wait(wrapper_path, + if self.options['run_mode']==2 and self.options['nb_core']>1: + ret_code = self.cluster.launch_and_wait(wrapper_path, argument= [], stdout= pythia_log, stderr=subprocess.STDOUT, cwd=pjoin(self.me_dir,'Events',self.run_name)) else: @@ -4630,10 +4630,10 @@ def do_pythia8(self, line): wrapper = open(wrapper_path,'w') if self.options['cluster_temp_path'] is None: exe_cmd = \ -"""#!%s +"""#!%s ./%s PY8Card.dat >& PY8_log.txt """ - else: + else: exe_cmd = \ """#!%s ln -s ./events_$1.lhe.gz ./events.lhe.gz @@ -4663,21 +4663,21 @@ def do_pythia8(self, line): # Set it as executable st = os.stat(wrapper_path) os.chmod(wrapper_path, st.st_mode | stat.S_IEXEC) - + # Split the .lhe event file, create event partition partition=[n_available_events//n_cores]*n_cores for i in range(n_available_events%n_cores): partition[i] += 1 - + # Splitting according to the total number of events requested by the user # Will be used to determine the number of events to indicate in the PY8 split cards. partition_for_PY8=[n_events//n_cores]*n_cores for i in range(n_events%n_cores): partition_for_PY8[i] += 1 - - logger.info('Splitting .lhe event file for PY8 parallelization...') - n_splits = lhe_file.split(partition=partition, cwd=parallelization_dir, zip=True) - + + logger.info('Splitting .lhe event file for PY8 parallelization...') + n_splits = lhe_file.split(partition=partition, cwd=parallelization_dir, zip=True) + if n_splits!=len(partition): raise MadGraph5Error('Error during lhe file splitting. Expected %d files but obtained %d.' %(len(partition),n_splits)) @@ -4690,7 +4690,7 @@ def do_pythia8(self, line): # Add the necessary run content shutil.move(pjoin(parallelization_dir,lhe_file.name+'_%d.lhe.gz'%split_id), pjoin(parallelization_dir,split_files[-1])) - + logger.info('Submitting Pythia8 jobs...') for i, split_file in enumerate(split_files): # We must write a PY8Card tailored for each split so as to correct the normalization @@ -4706,7 +4706,7 @@ def do_pythia8(self, line): split_PY8_Card.write(pjoin(parallelization_dir,'PY8Card_%d.dat'%i), pjoin(parallelization_dir,'PY8Card.dat'), add_missing=False) in_files = [pjoin(parallelization_dir,os.path.basename(pythia_main)), - pjoin(parallelization_dir,'PY8Card_%d.dat'%i), + pjoin(parallelization_dir,'PY8Card_%d.dat'%i), pjoin(parallelization_dir,split_file)] if self.options['cluster_temp_path'] is None: out_files = [] @@ -4718,35 +4718,35 @@ def do_pythia8(self, line): if os.path.basename(in_file)==split_file: ln(in_file,selected_cwd,name='events.lhe.gz') elif os.path.basename(in_file).startswith('PY8Card'): - ln(in_file,selected_cwd,name='PY8Card.dat') + ln(in_file,selected_cwd,name='PY8Card.dat') else: - ln(in_file,selected_cwd) + ln(in_file,selected_cwd) in_files = [] wrapper_path = os.path.basename(wrapper_path) else: out_files = ['split_%d.tar.gz'%i] selected_cwd = parallelization_dir - self.cluster.submit2(wrapper_path, - argument=[str(i)], cwd=selected_cwd, + self.cluster.submit2(wrapper_path, + argument=[str(i)], cwd=selected_cwd, input_files=in_files, output_files=out_files, required_output=out_files) - + def wait_monitoring(Idle, Running, Done): if Idle+Running+Done == 0: return logger.info('Pythia8 shower jobs: %d Idle, %d Running, %d Done [%s]'\ %(Idle, Running, Done, misc.format_time(time.time() - startPY8timer))) self.cluster.wait(parallelization_dir,wait_monitoring) - + logger.info('Merging results from the split PY8 runs...') if self.options['cluster_temp_path']: # Decompressing the output for i, split_file in enumerate(split_files): misc.call(['tar','-xzf','split_%d.tar.gz'%i],cwd=parallelization_dir) os.remove(pjoin(parallelization_dir,'split_%d.tar.gz'%i)) - + # Now merge logs pythia_log_file = open(pythia_log,'w') n_added = 0 @@ -4778,7 +4778,7 @@ def wait_monitoring(Idle, Running, Done): if n_added>0: PY8_extracted_information['sigma_m'] /= float(n_added) pythia_log_file.close() - + # djr plots djr_HwU = None n_added = 0 @@ -4845,7 +4845,7 @@ def wait_monitoring(Idle, Running, Done): if not os.path.isfile(hepmc_file): continue all_hepmc_files.append(hepmc_file) - + if len(all_hepmc_files)>0: hepmc_output = pjoin(self.me_dir,'Events',self.run_name,HepMC_event_output) with misc.TMP_directory() as tmp_dir: @@ -4860,8 +4860,8 @@ def wait_monitoring(Idle, Running, Done): break header.close() tail = open(pjoin(tmp_dir,'tail.hepmc'),'w') - n_tail = 0 - + n_tail = 0 + for line in misc.reverse_readline(all_hepmc_files[-1]): if line.startswith('HepMC::'): n_tail += 1 @@ -4871,7 +4871,7 @@ def wait_monitoring(Idle, Running, Done): tail.close() if n_tail>1: raise MadGraph5Error('HEPMC files should only have one trailing command.') - ###################################################################### + ###################################################################### # This is the most efficient way of putting together HEPMC's, *BUT* # # WARNING: NEED TO RENDER THE CODE BELOW SAFE TOWARDS INJECTION # ###################################################################### @@ -4888,12 +4888,12 @@ def wait_monitoring(Idle, Running, Done): elif sys.platform == 'darwin': # sed on MAC has slightly different synthax than on os.system(' '.join(['sed','-i',"''","'%s;$d'"% - (';'.join('%id'%(i+1) for i in range(n_head))),hepmc_file])) - else: - # other UNIX systems + (';'.join('%id'%(i+1) for i in range(n_head))),hepmc_file])) + else: + # other UNIX systems os.system(' '.join(['sed','-i']+["-e '%id'"%(i+1) for i in range(n_head)]+ ["-e '$d'",hepmc_file])) - + os.system(' '.join(['cat',pjoin(tmp_dir,'header.hepmc')]+all_hepmc_files+ [pjoin(tmp_dir,'tail.hepmc'),'>',hepmc_output])) @@ -4915,12 +4915,12 @@ def wait_monitoring(Idle, Running, Done): 'Inclusive cross section:' not in '\n'.join(open(pythia_log,'r').readlines()[-20:]): logger.warning('Fail to produce a pythia8 output. More info in \n %s'%pythia_log) return - + # Plot for Pythia8 successful = self.create_plot('Pythia8') if not successful: logger.warning('Failed to produce Pythia8 merging plots.') - + self.to_store.append('pythia8') # Study matched cross-sections @@ -4931,7 +4931,7 @@ def wait_monitoring(Idle, Running, Done): if self.options['run_mode']==0 or (self.options['run_mode']==2 and self.options['nb_core']==1): PY8_extracted_information['sigma_m'],PY8_extracted_information['Nacc'],\ PY8_extracted_information['Ntry'] = self.parse_PY8_log_file( - pjoin(self.me_dir,'Events', self.run_name,'%s_pythia8.log' % tag)) + pjoin(self.me_dir,'Events', self.run_name,'%s_pythia8.log' % tag)) else: logger.warning('Pythia8 cross-section could not be retreived.\n'+ 'Try turning parallelization off by setting the option nb_core to 1. YYYYY') @@ -4944,8 +4944,8 @@ def wait_monitoring(Idle, Running, Done): Ntry = PY8_extracted_information['Ntry'] sigma_m = PY8_extracted_information['sigma_m'] # Compute pythia error - error = self.results[self.run_name].return_tag(self.run_tag)['error'] - try: + error = self.results[self.run_name].return_tag(self.run_tag)['error'] + try: error_m = math.sqrt((error * Nacc/Ntry)**2 + sigma_m**2 *(1-Nacc/Ntry)/Nacc) except ZeroDivisionError: # Cannot compute error @@ -4966,31 +4966,31 @@ def wait_monitoring(Idle, Running, Done): else: logger.warning('Pythia8 merged cross-sections could not be retreived.\n'+ 'Try turning parallelization off by setting the option nb_core to 1.XXXXX') - PY8_extracted_information['cross_sections'] = {} - + PY8_extracted_information['cross_sections'] = {} + cross_sections = PY8_extracted_information['cross_sections'] if cross_sections: - # Filter the cross_sections specified an keep only the ones + # Filter the cross_sections specified an keep only the ones # with central parameters and a different merging scale a_float_re = '[\+|-]?\d+(\.\d*)?([EeDd][\+|-]?\d+)?' central_merging_re = re.compile( '^\s*Weight_MERGING\s*=\s*(?P%s)\s*$'%a_float_re, - re.IGNORECASE) + re.IGNORECASE) cross_sections = dict( (float(central_merging_re.match(xsec).group('merging')),value) - for xsec, value in cross_sections.items() if not + for xsec, value in cross_sections.items() if not central_merging_re.match(xsec) is None) central_scale = PY8_Card['JetMatching:qCut'] if \ int(self.run_card['ickkw'])==1 else PY8_Card['Merging:TMS'] if central_scale in cross_sections: self.results.add_detail('cross_pythia8', cross_sections[central_scale][0]) self.results.add_detail('error_pythia8', cross_sections[central_scale][1]) - + #logger.info('Pythia8 merged cross-sections are:') #for scale in sorted(cross_sections.keys()): # logger.info(' > Merging scale = %-6.4g : %-11.5g +/- %-7.2g [pb]'%\ - # (scale,cross_sections[scale][0],cross_sections[scale][1])) - + # (scale,cross_sections[scale][0],cross_sections[scale][1])) + xsecs_file = open(pjoin(self.me_dir,'Events',self.run_name, '%s_merged_xsecs.txt'%tag),'w') if cross_sections: @@ -5003,9 +5003,9 @@ def wait_monitoring(Idle, Running, Done): xsecs_file.write('Cross-sections could not be read from the'+\ "XML node 'xsection' of the .dat file produced by Pythia8.") xsecs_file.close() - + #Update the banner - # We add directly the pythia command card because it has the full + # We add directly the pythia command card because it has the full # information self.banner.add(pythia_cmd_card) @@ -5022,13 +5022,13 @@ def wait_monitoring(Idle, Running, Done): if self.options['delphes_path']: self.exec_cmd('delphes --no_default', postcmd=False, printcmd=False) self.print_results_in_shell(self.results.current) - + def parse_PY8_log_file(self, log_file_path): """ Parse a log file to extract number of event and cross-section. """ pythiare = re.compile("Les Houches User Process\(es\)\s*\d+\s*\|\s*(?P\d+)\s*(?P\d+)\s*(?P\d+)\s*\|\s*(?P[\d\.e\-\+]+)\s*(?P[\d\.e\-\+]+)") pythia_xsec_re = re.compile("Inclusive cross section\s*:\s*(?P[\d\.e\-\+]+)\s*(?P[\d\.e\-\+]+)") sigma_m, Nacc, Ntry = None, None, None - for line in misc.BackRead(log_file_path): + for line in misc.BackRead(log_file_path): info = pythiare.search(line) if not info: # Also try to obtain the cross-section and error from the final xsec line of pythia8 log @@ -5058,7 +5058,7 @@ def parse_PY8_log_file(self, log_file_path): raise self.InvalidCmd("Could not find cross-section and event number information "+\ "in Pythia8 log\n '%s'."%log_file_path) - + def extract_cross_sections_from_DJR(self,djr_output): """Extract cross-sections from a djr XML output.""" import xml.dom.minidom as minidom @@ -5075,11 +5075,11 @@ def extract_cross_sections_from_DJR(self,djr_output): [float(xsec.childNodes[0].data.split()[0]), float(xsec.childNodes[0].data.split()[1])]) for xsec in xsections) - + def do_pythia(self, line): """launch pythia""" - - + + # Check argument's validity args = self.split_arg(line) if '--no_default' in args: @@ -5089,12 +5089,12 @@ def do_pythia(self, line): args.remove('--no_default') else: no_default = False - + if not self.run_name: self.check_pythia(args) self.configure_directory(html_opening =False) else: - # initialize / remove lhapdf mode + # initialize / remove lhapdf mode self.configure_directory(html_opening =False) self.check_pythia(args) @@ -5102,7 +5102,7 @@ def do_pythia(self, line): logger.error('pythia-pgs require event_norm to be on sum. Do not run pythia6') return - # the args are modify and the last arg is always the mode + # the args are modify and the last arg is always the mode if not no_default: self.ask_pythia_run_configuration(args[-1]) if self.options['automatic_html_opening']: @@ -5114,35 +5114,35 @@ def do_pythia(self, line): self.banner = banner_mod.recover_banner(self.results, 'pythia') pythia_src = pjoin(self.options['pythia-pgs_path'],'src') - + self.results.add_detail('run_mode', 'madevent') self.update_status('Running Pythia', 'pythia') try: os.remove(pjoin(self.me_dir,'Events','pythia.done')) except Exception: - pass - + pass + ## LAUNCHING PYTHIA # check that LHAPATH is define. if not re.search(r'^\s*LHAPATH=%s/PDFsets' % pythia_src, - open(pjoin(self.me_dir,'Cards','pythia_card.dat')).read(), + open(pjoin(self.me_dir,'Cards','pythia_card.dat')).read(), re.M): f = open(pjoin(self.me_dir,'Cards','pythia_card.dat'),'a') f.write('\n LHAPATH=%s/PDFsets' % pythia_src) f.close() tag = self.run_tag pythia_log = pjoin(self.me_dir, 'Events', self.run_name , '%s_pythia.log' % tag) - #self.cluster.launch_and_wait('../bin/internal/run_pythia', + #self.cluster.launch_and_wait('../bin/internal/run_pythia', # argument= [pythia_src], stdout= pythia_log, # stderr=subprocess.STDOUT, # cwd=pjoin(self.me_dir,'Events')) output_files = ['pythia_events.hep'] if self.run_card['use_syst']: output_files.append('syst.dat') - if self.run_card['ickkw'] == 1: + if self.run_card['ickkw'] == 1: output_files += ['beforeveto.tree', 'xsecs.tree', 'events.tree'] - + os.environ['PDG_MASS_TBL'] = pjoin(pythia_src,'mass_width_2004.mc') self.cluster.launch_and_wait(pjoin(pythia_src, 'pythia'), input_files=[pjoin(self.me_dir, "Events", "unweighted_events.lhe"), @@ -5152,23 +5152,23 @@ def do_pythia(self, line): stdout= pythia_log, stderr=subprocess.STDOUT, cwd=pjoin(self.me_dir,'Events')) - + os.remove(pjoin(self.me_dir, "Events", "unweighted_events.lhe")) if not os.path.exists(pjoin(self.me_dir,'Events','pythia_events.hep')): logger.warning('Fail to produce pythia output. More info in \n %s' % pythia_log) return - + self.to_store.append('pythia') - + # Find the matched cross-section if int(self.run_card['ickkw']): # read the line from the bottom of the file - #pythia_log = misc.BackRead(pjoin(self.me_dir,'Events', self.run_name, + #pythia_log = misc.BackRead(pjoin(self.me_dir,'Events', self.run_name, # '%s_pythia.log' % tag)) - pythiare = re.compile("\s*I\s+0 All included subprocesses\s+I\s+(?P\d+)\s+(?P\d+)\s+I\s+(?P[\d\.D\-+]+)\s+I") - for line in misc.reverse_readline(pjoin(self.me_dir,'Events', self.run_name, + pythiare = re.compile("\s*I\s+0 All included subprocesses\s+I\s+(?P\d+)\s+(?P\d+)\s+I\s+(?P[\d\.D\-+]+)\s+I") + for line in misc.reverse_readline(pjoin(self.me_dir,'Events', self.run_name, '%s_pythia.log' % tag)): info = pythiare.search(line) if not info: @@ -5188,16 +5188,16 @@ def do_pythia(self, line): self.results.add_detail('nb_event_pythia', Nacc) #compute pythia error error = self.results[self.run_name].return_tag(self.run_tag)['error'] - if Nacc: + if Nacc: error_m = math.sqrt((error * Nacc/Ntry)**2 + sigma_m**2 *(1-Nacc/Ntry)/Nacc) else: error_m = 10000 * sigma_m # works both for fixed number of generated events and fixed accepted events self.results.add_detail('error_pythia', error_m) - break + break #pythia_log.close() - + pydir = pjoin(self.options['pythia-pgs_path'], 'src') eradir = self.options['exrootanalysis_path'] madir = self.options['madanalysis_path'] @@ -5216,12 +5216,12 @@ def do_pythia(self, line): # Creating LHE file self.run_hep2lhe(banner_path) - + if int(self.run_card['ickkw']): misc.gzip(pjoin(self.me_dir,'Events','beforeveto.tree'), - stdout=pjoin(self.me_dir,'Events',self.run_name, tag+'_pythia_beforeveto.tree.gz')) + stdout=pjoin(self.me_dir,'Events',self.run_name, tag+'_pythia_beforeveto.tree.gz')) + - if self.run_card['use_syst'] in self.true: # Calculate syscalc info based on syst.dat try: @@ -5233,7 +5233,7 @@ def do_pythia(self, line): # Store syst.dat misc.gzip(pjoin(self.me_dir,'Events', 'syst.dat'), stdout=pjoin(self.me_dir,'Events',self.run_name, tag + '_pythia_syst.dat.gz')) - + # Store syscalc.dat if os.path.exists(pjoin(self.me_dir, 'Events', 'syscalc.dat')): filename = pjoin(self.me_dir, 'Events' ,self.run_name, @@ -5253,7 +5253,7 @@ def do_pythia(self, line): if self.options['delphes_path']: self.exec_cmd('delphes --no_default', postcmd=False, printcmd=False) self.print_results_in_shell(self.results.current) - + ################################################################################ def do_remove(self, line): @@ -5263,8 +5263,8 @@ def do_remove(self, line): run, tag, mode = self.check_remove(args) if 'banner' in mode: mode.append('all') - - + + if run == 'all': # Check first if they are not a run with a name run. if os.path.exists(pjoin(self.me_dir, 'Events', 'all')): @@ -5280,7 +5280,7 @@ def do_remove(self, line): logger.info(error) pass # run already clear return - + # Check that run exists if not os.path.exists(pjoin(self.me_dir, 'Events', run)): raise self.InvalidCmd('No run \'%s\' detected' % run) @@ -5294,7 +5294,7 @@ def do_remove(self, line): # Found the file to delete - + to_delete = misc.glob('*', pjoin(self.me_dir, 'Events', run)) to_delete += misc.glob('*', pjoin(self.me_dir, 'HTML', run)) # forbid the banner to be removed @@ -5314,7 +5314,7 @@ def do_remove(self, line): if os.path.exists(pjoin(self.me_dir, 'Events', run, 'unweighted_events.lhe.gz')): to_delete.append('unweighted_events.lhe.gz') if os.path.exists(pjoin(self.me_dir, 'HTML', run,'plots_parton.html')): - to_delete.append(pjoin(self.me_dir, 'HTML', run,'plots_parton.html')) + to_delete.append(pjoin(self.me_dir, 'HTML', run,'plots_parton.html')) if nb_rm != len(to_delete): logger.warning('Be carefull that partonic information are on the point to be removed.') if 'all' in mode: @@ -5327,8 +5327,8 @@ def do_remove(self, line): if 'delphes' not in mode: to_delete = [f for f in to_delete if 'delphes' not in f] if 'parton' not in mode: - to_delete = [f for f in to_delete if 'delphes' in f - or 'pgs' in f + to_delete = [f for f in to_delete if 'delphes' in f + or 'pgs' in f or 'pythia' in f] if not self.force and len(to_delete): question = 'Do you want to delete the following files?\n %s' % \ @@ -5336,7 +5336,7 @@ def do_remove(self, line): ans = self.ask(question, 'y', choices=['y','n']) else: ans = 'y' - + if ans == 'y': for file2rm in to_delete: if os.path.exists(pjoin(self.me_dir, 'Events', run, file2rm)): @@ -5374,7 +5374,7 @@ def do_remove(self, line): if ans == 'y': for file2rm in to_delete: os.remove(file2rm) - + if 'banner' in mode: to_delete = misc.glob('*', pjoin(self.me_dir, 'Events', run)) if tag: @@ -5389,8 +5389,8 @@ def do_remove(self, line): return elif any(['banner' not in os.path.basename(p) for p in to_delete]): if to_delete: - raise MadGraph5Error('''Some output still exists for this run. - Please remove those output first. Do for example: + raise MadGraph5Error('''Some output still exists for this run. + Please remove those output first. Do for example: remove %s all banner ''' % run) else: @@ -5400,7 +5400,7 @@ def do_remove(self, line): return else: logger.info('''The banner is not removed. In order to remove it run: - remove %s all banner %s''' % (run, tag and '--tag=%s ' % tag or '')) + remove %s all banner %s''' % (run, tag and '--tag=%s ' % tag or '')) # update database. self.results.clean(mode, run, tag) @@ -5420,7 +5420,7 @@ def do_plot(self, line): logger.info('plot for run %s' % self.run_name) if not self.force: self.ask_edit_cards(['plot_card.dat'], args, plot=True) - + if any([arg in ['all','parton'] for arg in args]): filename = pjoin(self.me_dir, 'Events', self.run_name, 'unweighted_events.lhe') if os.path.exists(filename+'.gz'): @@ -5438,8 +5438,8 @@ def do_plot(self, line): except Exception: pass else: - logger.info('No valid files for partonic plot') - + logger.info('No valid files for partonic plot') + if any([arg in ['all','pythia'] for arg in args]): filename = pjoin(self.me_dir, 'Events' ,self.run_name, '%s_pythia_events.lhe' % self.run_tag) @@ -5452,10 +5452,10 @@ def do_plot(self, line): stdout= "%s.gz" % filename) else: logger.info('No valid files for pythia plot') - - + + if any([arg in ['all','pgs'] for arg in args]): - filename = pjoin(self.me_dir, 'Events', self.run_name, + filename = pjoin(self.me_dir, 'Events', self.run_name, '%s_pgs_events.lhco' % self.run_tag) if os.path.exists(filename+'.gz'): misc.gunzip("%s.gz" % filename) @@ -5464,15 +5464,15 @@ def do_plot(self, line): misc.gzip(filename) else: logger.info('No valid files for pgs plot') - + if any([arg in ['all','delphes'] for arg in args]): - filename = pjoin(self.me_dir, 'Events', self.run_name, + filename = pjoin(self.me_dir, 'Events', self.run_name, '%s_delphes_events.lhco' % self.run_tag) if os.path.exists(filename+'.gz'): misc.gunzip("%s.gz" % filename) if os.path.exists(filename): self.create_plot('Delphes') - misc.gzip(filename) + misc.gzip(filename) else: logger.info('No valid files for delphes plot') @@ -5488,9 +5488,9 @@ def do_syscalc(self, line): if self.ninitial == 1: logger.error('SysCalc can\'t be run for decay processes') return - + logger.info('Calculating systematics for run %s' % self.run_name) - + self.ask_edit_cards(['run_card.dat'], args, plot=False) self.run_card = banner_mod.RunCard(pjoin(self.me_dir, 'Cards', 'run_card.dat')) if any([arg in ['all','parton'] for arg in args]): @@ -5504,7 +5504,7 @@ def do_syscalc(self, line): stdout="%s.gz" % filename) else: logger.info('No valid files for parton level systematics run.') - + if any([arg in ['all','pythia'] for arg in args]): filename = pjoin(self.me_dir, 'Events' ,self.run_name, '%s_pythia_syst.dat' % self.run_tag) @@ -5525,17 +5525,17 @@ def do_syscalc(self, line): else: logger.info('No valid files for pythia level') - + def store_result(self): - """ tar the pythia results. This is done when we are quite sure that + """ tar the pythia results. This is done when we are quite sure that the pythia output will not be use anymore """ if not self.run_name: return - + if not self.to_store: - return - + return + tag = self.run_card['run_tag'] self.update_status('storing files of previous run', level=None,\ error=True) @@ -5546,14 +5546,14 @@ def store_result(self): misc.gzip(pjoin(self.me_dir,'Events',self.run_name,"unweighted_events.lhe")) if os.path.exists(pjoin(self.me_dir,'Events','reweight.lhe')): os.remove(pjoin(self.me_dir,'Events', 'reweight.lhe')) - + if 'pythia' in self.to_store: self.update_status('Storing Pythia files of previous run', level='pythia', error=True) p = pjoin(self.me_dir,'Events') n = self.run_name t = tag self.to_store.remove('pythia') - misc.gzip(pjoin(p,'pythia_events.hep'), + misc.gzip(pjoin(p,'pythia_events.hep'), stdout=pjoin(p, str(n),'%s_pythia_events.hep' % t),forceexternal=True) if 'pythia8' in self.to_store: @@ -5581,26 +5581,26 @@ def store_result(self): os.system("mv " + file_path + hepmc_fileformat + " " + move_hepmc_path) self.update_status('Done', level='pythia',makehtml=False,error=True) - self.results.save() - + self.results.save() + self.to_store = [] - def launch_job(self,exe, cwd=None, stdout=None, argument = [], remaining=0, + def launch_job(self,exe, cwd=None, stdout=None, argument = [], remaining=0, run_type='', mode=None, **opt): """ """ argument = [str(arg) for arg in argument] if mode is None: mode = self.cluster_mode - + # ensure that exe is executable if os.path.exists(exe) and not os.access(exe, os.X_OK): os.system('chmod +x %s ' % exe) elif (cwd and os.path.exists(pjoin(cwd, exe))) and not \ os.access(pjoin(cwd, exe), os.X_OK): os.system('chmod +x %s ' % pjoin(cwd, exe)) - + if mode == 0: - self.update_status((remaining, 1, + self.update_status((remaining, 1, self.total_jobs - remaining -1, run_type), level=None, force=False) start = time.time() #os.system('cd %s; ./%s' % (cwd,exe)) @@ -5613,24 +5613,24 @@ def launch_job(self,exe, cwd=None, stdout=None, argument = [], remaining=0, elif mode in [1,2]: exename = os.path.basename(exe) # For condor cluster, create the input/output files - if 'ajob' in exename: + if 'ajob' in exename: input_files = ['madevent','input_app.txt','symfact.dat','iproc.dat','dname.mg', pjoin(self.me_dir, 'SubProcesses','randinit')] - if os.path.exists(pjoin(self.me_dir,'SubProcesses', + if os.path.exists(pjoin(self.me_dir,'SubProcesses', 'MadLoop5_resources.tar.gz')) and cluster.need_transfer(self.options): input_files.append(pjoin(self.me_dir,'SubProcesses', 'MadLoop5_resources.tar.gz')) - + output_files = [] required_output = [] - + #Find the correct PDF input file input_files.append(self.get_pdf_input_filename()) - + #Find the correct ajob Gre = re.compile("\s*j=(G[\d\.\w]+)") origre = re.compile("grid_directory=(G[\d\.\w]+)") - try : + try : fsock = open(exe) except Exception: fsock = open(pjoin(cwd,exe)) @@ -5648,21 +5648,21 @@ def launch_job(self,exe, cwd=None, stdout=None, argument = [], remaining=0, if os.path.isdir(pjoin(cwd,G)): input_files.append(G) required_output.append('%s/results.dat' % G) - + if origre.search(text): G_grid = origre.search(text).groups()[0] input_files.append(pjoin(G_grid, 'ftn26')) - + #submitting - self.cluster.submit2(exe, stdout=stdout, cwd=cwd, + self.cluster.submit2(exe, stdout=stdout, cwd=cwd, input_files=input_files, output_files=output_files, required_output=required_output) elif 'survey' in exename: input_files = ['madevent','input_app.txt','symfact.dat','iproc.dat', 'dname.mg', - pjoin(self.me_dir, 'SubProcesses','randinit')] - if os.path.exists(pjoin(self.me_dir,'SubProcesses', + pjoin(self.me_dir, 'SubProcesses','randinit')] + if os.path.exists(pjoin(self.me_dir,'SubProcesses', 'MadLoop5_resources.tar.gz')) and cluster.need_transfer(self.options): - input_files.append(pjoin(self.me_dir,'SubProcesses', + input_files.append(pjoin(self.me_dir,'SubProcesses', 'MadLoop5_resources.tar.gz')) #Find the correct PDF input file @@ -5671,7 +5671,7 @@ def launch_job(self,exe, cwd=None, stdout=None, argument = [], remaining=0, output_files = [] required_output = [] - + #Find the correct ajob suffix = "_%s" % int(float(argument[0])) if suffix == '_0': @@ -5685,12 +5685,12 @@ def launch_job(self,exe, cwd=None, stdout=None, argument = [], remaining=0, if '.' in argument[0]: offset = int(str(argument[0]).split('.')[1]) else: - offset = 0 - + offset = 0 + if offset ==0 or offset == int(float(argument[0])): if os.path.exists(pjoin(cwd, G, 'input_app.txt')): os.remove(pjoin(cwd, G, 'input_app.txt')) - + if os.path.exists(os.path.realpath(pjoin(cwd, G, 'ftn25'))): if offset == 0 or offset == int(float(argument[0])): os.remove(pjoin(cwd, G, 'ftn25')) @@ -5706,16 +5706,16 @@ def launch_job(self,exe, cwd=None, stdout=None, argument = [], remaining=0, pass #submitting - self.cluster.cluster_submit(exe, stdout=stdout, cwd=cwd, argument=argument, + self.cluster.cluster_submit(exe, stdout=stdout, cwd=cwd, argument=argument, input_files=input_files, output_files=output_files, required_output=required_output, **opt) elif "refine_splitted.sh" in exename: input_files = ['madevent','symfact.dat','iproc.dat', 'dname.mg', - pjoin(self.me_dir, 'SubProcesses','randinit')] - + pjoin(self.me_dir, 'SubProcesses','randinit')] + if os.path.exists(pjoin(self.me_dir,'SubProcesses', 'MadLoop5_resources.tar.gz')) and cluster.need_transfer(self.options): - input_files.append(pjoin(self.me_dir,'SubProcesses', + input_files.append(pjoin(self.me_dir,'SubProcesses', 'MadLoop5_resources.tar.gz')) #Find the correct PDF input file @@ -5725,25 +5725,25 @@ def launch_job(self,exe, cwd=None, stdout=None, argument = [], remaining=0, output_files = [argument[0]] required_output = [] for G in output_files: - required_output.append('%s/results.dat' % G) + required_output.append('%s/results.dat' % G) input_files.append(pjoin(argument[1], "input_app.txt")) input_files.append(pjoin(argument[1], "ftn26")) - + #submitting - self.cluster.cluster_submit(exe, stdout=stdout, cwd=cwd, argument=argument, + self.cluster.cluster_submit(exe, stdout=stdout, cwd=cwd, argument=argument, input_files=input_files, output_files=output_files, - required_output=required_output, **opt) + required_output=required_output, **opt) + + - - else: self.cluster.submit(exe, argument=argument, stdout=stdout, cwd=cwd, **opt) - + ############################################################################ def find_madevent_mode(self): """Find if Madevent is in Group mode or not""" - + # The strategy is too look in the files Source/run_configs.inc # if we found: ChanPerJob=3 then it's a group mode. file_path = pjoin(self.me_dir, 'Source', 'run_config.inc') @@ -5752,11 +5752,11 @@ def find_madevent_mode(self): return 'group' else: return 'v4' - + ############################################################################ def monitor(self, run_type='monitor', mode=None, html=False): """ monitor the progress of running job """ - + starttime = time.time() if mode is None: @@ -5772,8 +5772,8 @@ def monitor(self, run_type='monitor', mode=None, html=False): else: update_status = lambda idle, run, finish: None update_first = None - try: - self.cluster.wait(self.me_dir, update_status, update_first=update_first) + try: + self.cluster.wait(self.me_dir, update_status, update_first=update_first) except Exception as error: logger.info(error) if not self.force: @@ -5788,24 +5788,24 @@ def monitor(self, run_type='monitor', mode=None, html=False): raise except KeyboardInterrupt as error: self.cluster.remove() - raise - - + raise + - ############################################################################ + + ############################################################################ def configure_directory(self, html_opening=True): - """ All action require before any type of run """ + """ All action require before any type of run """ # Basic check assert os.path.exists(pjoin(self.me_dir,'SubProcesses')) # environmental variables to be included in make_opts self.make_opts_var = {} - + #see when the last file was modified time_mod = max([os.path.getmtime(pjoin(self.me_dir,'Cards','run_card.dat')), os.path.getmtime(pjoin(self.me_dir,'Cards','param_card.dat'))]) - + if self.configured >= time_mod and hasattr(self, 'random') and hasattr(self, 'run_card'): #just ensure that cluster specific are correctly handled if self.cluster: @@ -5820,7 +5820,7 @@ def configure_directory(self, html_opening=True): #open only once the web page # Change current working directory self.launching_dir = os.getcwd() - + # Check if we need the MSSM special treatment model = self.find_model_name() if model == 'mssm' or model.startswith('mssm-'): @@ -5828,14 +5828,14 @@ def configure_directory(self, html_opening=True): mg5_param = pjoin(self.me_dir, 'Source', 'MODEL', 'MG5_param.dat') check_param_card.convert_to_mg5card(param_card, mg5_param) check_param_card.check_valid_param_card(mg5_param) - + # limit the number of event to 100k self.check_nb_events() # this is in order to avoid conflicts between runs with and without # lhapdf. not needed anymore the makefile handles it automaticallu #misc.compile(['clean4pdf'], cwd = pjoin(self.me_dir, 'Source')) - + self.make_opts_var['pdlabel1'] = '' self.make_opts_var['pdlabel2'] = '' if self.run_card['pdlabel1'] in ['eva', 'iww']: @@ -5866,7 +5866,7 @@ def configure_directory(self, html_opening=True): self.copy_lep_densities(self.run_card['pdlabel'], pjoin(self.me_dir, 'Source')) self.make_opts_var['pdlabel1'] = 'ee' self.make_opts_var['pdlabel2'] = 'ee' - + # set random number if self.run_card['iseed'] != 0: self.random = int(self.run_card['iseed']) @@ -5885,18 +5885,18 @@ def configure_directory(self, html_opening=True): break else: self.random = random.randint(1, 30107) - + #set random seed for python part of the code if self.run_card['python_seed'] == -2: #-2 means same as run_card import random if not hasattr(random, 'mg_seedset'): - random.seed(self.run_card['python_seed']) - random.mg_seedset = self.run_card['python_seed'] + random.seed(self.run_card['python_seed']) + random.mg_seedset = self.run_card['python_seed'] elif self.run_card['python_seed'] >= 0: import random if not hasattr(random, 'mg_seedset'): - random.seed(self.run_card['python_seed']) - random.mg_seedset = self.run_card['python_seed'] + random.seed(self.run_card['python_seed']) + random.mg_seedset = self.run_card['python_seed'] if self.run_card['ickkw'] == 2: logger.info('Running with CKKW matching') self.treat_ckkw_matching() @@ -5905,12 +5905,12 @@ def configure_directory(self, html_opening=True): self.update_make_opts(self.run_card) # reset list of Gdirectory self.Gdirs = None - + # create param_card.inc and run_card.inc self.do_treatcards('') - + logger.info("compile Source Directory") - + # Compile for name in [ 'all']:#, '../bin/internal/combine_events']: self.compile(arg=[name], cwd=os.path.join(self.me_dir, 'Source')) @@ -5933,7 +5933,7 @@ def configure_directory(self, html_opening=True): os.remove(pjoin(self.me_dir, 'lib','libbias.a')) force_subproc_clean = True - + # Finally compile the bias module as well if self.run_card['bias_module'] not in ['dummy',None]: logger.debug("Compiling the bias module '%s'"%bias_name) @@ -5945,7 +5945,7 @@ def configure_directory(self, html_opening=True): 'INVALID' in str(bias_module_valid).upper(): raise InvalidCmd("The bias module '%s' cannot be used because of:\n%s"% (bias_name,bias_module_valid)) - + self.compile(arg=[], cwd=os.path.join(self.me_dir, 'Source','BIAS',bias_name)) self.proc_characteristics['bias_module']=bias_name # Update the proc_characterstics file @@ -5954,7 +5954,7 @@ def configure_directory(self, html_opening=True): if force_subproc_clean: # Make sure that madevent will be recompiled - subproc = [l.strip() for l in open(pjoin(self.me_dir,'SubProcesses', + subproc = [l.strip() for l in open(pjoin(self.me_dir,'SubProcesses', 'subproc.mg'))] for nb_proc,subdir in enumerate(subproc): Pdir = pjoin(self.me_dir, 'SubProcesses',subdir.strip()) @@ -5971,20 +5971,20 @@ def configure_directory(self, html_opening=True): ############################################################################ @staticmethod def check_dir(path, default=''): - """check if the directory exists. if so return the path otherwise the + """check if the directory exists. if so return the path otherwise the default""" - + if os.path.isdir(path): return path else: return default - + ############################################################################ def get_Gdir(self, Pdir=None, symfact=None): """get the list of Gdirectory if not yet saved.""" - + if hasattr(self, "Gdirs") and self.Gdirs: if self.me_dir in self.Gdirs[0]: if Pdir is None: @@ -6000,8 +6000,8 @@ def get_Gdir(self, Pdir=None, symfact=None): Pdirs = self.get_Pdir() - Gdirs = {self.me_dir:[]} - mfactors = {} + Gdirs = {self.me_dir:[]} + mfactors = {} for P in Pdirs: Gdirs[P] = [] #for the next line do not use P, since in readonly mode it might not have symfact @@ -6012,7 +6012,7 @@ def get_Gdir(self, Pdir=None, symfact=None): mfactors[pjoin(P, "G%s" % tag)] = mfactor self.Gdirs = (Gdirs, mfactors) return self.get_Gdir(Pdir, symfact=symfact) - + ############################################################################ def set_run_name(self, name, tag=None, level='parton', reload_card=False, allow_new_tag=True): @@ -6030,8 +6030,8 @@ def get_last_tag(self, level): tagRun = self.results[self.run_name][i] if tagRun.pythia or tagRun.shower or tagRun.pythia8 : return tagRun['tag'] - - + + # when are we force to change the tag new_run:previous run requiring changes upgrade_tag = {'parton': ['parton','pythia','pgs','delphes','madanalysis5_hadron','madanalysis5_parton', 'rivet'], 'pythia': ['pythia','pgs','delphes','madanalysis5_hadron'], @@ -6044,7 +6044,7 @@ def get_last_tag(self, level): 'syscalc':[], 'rivet':['rivet']} - if name == self.run_name: + if name == self.run_name: if reload_card: run_card = pjoin(self.me_dir, 'Cards','run_card.dat') self.run_card = banner_mod.RunCard(run_card) @@ -6064,13 +6064,13 @@ def get_last_tag(self, level): break return get_last_tag(self, level) - + # save/clean previous run if self.run_name: self.store_result() # store new name self.run_name = name - + new_tag = False # First call for this run -> set the banner self.banner = banner_mod.recover_banner(self.results, level, name) @@ -6079,8 +6079,8 @@ def get_last_tag(self, level): else: # Read run_card run_card = pjoin(self.me_dir, 'Cards','run_card.dat') - self.run_card = banner_mod.RunCard(run_card) - + self.run_card = banner_mod.RunCard(run_card) + if tag: self.run_card['run_tag'] = tag new_tag = True @@ -6093,7 +6093,7 @@ def get_last_tag(self, level): self.results.update('add run %s' % name, 'all', makehtml=False) else: for tag in upgrade_tag[level]: - + if getattr(self.results[self.run_name][-1], tag): # LEVEL is already define in the last tag -> need to switch tag tag = self.get_available_tag() @@ -6103,8 +6103,8 @@ def get_last_tag(self, level): if not new_tag: # We can add the results to the current run tag = self.results[self.run_name][-1]['tag'] - self.run_card['run_tag'] = tag # ensure that run_tag is correct - + self.run_card['run_tag'] = tag # ensure that run_tag is correct + if allow_new_tag and (name in self.results and not new_tag): self.results.def_current(self.run_name) else: @@ -6113,15 +6113,15 @@ def get_last_tag(self, level): self.run_tag = self.run_card['run_tag'] return get_last_tag(self, level) - - - + + + ############################################################################ def check_nb_events(self): - """Find the number of event in the run_card, and check that this is not + """Find the number of event in the run_card, and check that this is not too large""" - + nb_event = int(self.run_card['nevents']) if nb_event > 1000000: logger.warning("Attempting to generate more than 1M events") @@ -6133,20 +6133,20 @@ def check_nb_events(self): return - - ############################################################################ + + ############################################################################ def update_random(self): """ change random number""" - + self.random += 3 if self.random > 30081*30081: # can't use too big random number raise MadGraph5Error('Random seed too large ' + str(self.random) + ' > 30081*30081') - if self.run_card['python_seed'] == -2: + if self.run_card['python_seed'] == -2: import random if not hasattr(random, 'mg_seedset'): - random.seed(self.random) + random.seed(self.random) random.mg_seedset = self.random - + ############################################################################ def save_random(self): """save random number in appropirate file""" @@ -6155,14 +6155,14 @@ def save_random(self): fsock.writelines('r=%s\n' % self.random) def do_quit(self, *args, **opts): - + return common_run.CommonRunCmd.do_quit(self, *args, **opts) #return CmdExtended.do_quit(self, *args, **opts) - + ############################################################################ def treat_CKKW_matching(self): """check for ckkw""" - + lpp1 = self.run_card['lpp1'] lpp2 = self.run_card['lpp2'] e1 = self.run_card['ebeam1'] @@ -6170,19 +6170,19 @@ def treat_CKKW_matching(self): pd = self.run_card['pdlabel'] lha = self.run_card['lhaid'] xq = self.run_card['xqcut'] - translation = {'e1': e1, 'e2':e2, 'pd':pd, + translation = {'e1': e1, 'e2':e2, 'pd':pd, 'lha':lha, 'xq':xq} if lpp1 or lpp2: - # Remove ':s from pd + # Remove ':s from pd if pd.startswith("'"): pd = pd[1:] if pd.endswith("'"): - pd = pd[:-1] + pd = pd[:-1] if xq >2 or xq ==2: xq = 2 - + # find data file if pd == "lhapdf": issudfile = 'lib/issudgrid-%(e1)s-%(e2)s-%(pd)s-%(lha)s-%(xq)s.dat.gz' @@ -6192,9 +6192,9 @@ def treat_CKKW_matching(self): issudfile = pjoin(self.webbin, issudfile % translation) else: issudfile = pjoin(self.me_dir, issudfile % translation) - + logger.info('Sudakov grid file: %s' % issudfile) - + # check that filepath exists if os.path.exists(issudfile): path = pjoin(self.me_dir, 'lib', 'issudgrid.dat') @@ -6203,20 +6203,20 @@ def treat_CKKW_matching(self): msg = 'No sudakov grid file for parameter choice. Start to generate it. This might take a while' logger.info(msg) self.update_status('GENERATE SUDAKOV GRID', level='parton') - + for i in range(-2,6): - self.cluster.submit('%s/gensudgrid ' % self.dirbin, + self.cluster.submit('%s/gensudgrid ' % self.dirbin, argument = ['%d'%i], - cwd=self.me_dir, + cwd=self.me_dir, stdout=open(pjoin(self.me_dir, 'gensudgrid%s.log' % i),'w')) self.monitor() for i in range(-2,6): path = pjoin(self.me_dir, 'lib', 'issudgrid.dat') os.system('cat %s/gensudgrid%s.log >> %s' % (self.me_dir, path)) misc.gzip(path, stdout=issudfile) - + ############################################################################ - def create_root_file(self, input='unweighted_events.lhe', + def create_root_file(self, input='unweighted_events.lhe', output='unweighted_events.root' ): """create the LHE root file """ self.update_status('Creating root files', level='parton') @@ -6233,14 +6233,14 @@ def create_root_file(self, input='unweighted_events.lhe', totar = False torm = True input = input[:-3] - + try: - misc.call(['%s/ExRootLHEFConverter' % eradir, + misc.call(['%s/ExRootLHEFConverter' % eradir, input, output], cwd=pjoin(self.me_dir, 'Events')) except Exception: logger.warning('fail to produce Root output [problem with ExRootAnalysis]') - + if totar: if os.path.exists('%s.gz' % input): try: @@ -6251,13 +6251,13 @@ def create_root_file(self, input='unweighted_events.lhe', misc.gzip(input) if torm: os.remove(input) - + def run_syscalc(self, mode='parton', event_path=None, output=None): - """create the syscalc output""" + """create the syscalc output""" if self.run_card['use_syst'] not in self.true: return - + scdir = self.options['syscalc_path'] if not scdir or not os.path.exists(scdir): return @@ -6265,12 +6265,12 @@ def run_syscalc(self, mode='parton', event_path=None, output=None): if self.run_card['event_norm'] != 'sum': logger.critical('SysCalc works only when event_norm is on \'sum\'.') return - logger.info('running SysCalc on mode %s' % mode) - + logger.info('running SysCalc on mode %s' % mode) + # Restore the old default for SysCalc+PY6 if self.run_card['sys_matchscale']=='auto': self.run_card['sys_matchscale'] = "30 50" - + # Check that all pdfset are correctly installed lhaid = [self.run_card.get_lhapdf_id()] if '&&' in self.run_card['sys_pdf']: @@ -6285,20 +6285,20 @@ def run_syscalc(self, mode='parton', event_path=None, output=None): logger.debug(str(error)) logger.warning('Systematic computation requires lhapdf to run. Bypass SysCalc') return - + # Copy all the relevant PDF sets [self.copy_lhapdf_set([onelha], pdfsets_dir) for onelha in lhaid] - + to_syscalc={'sys_scalefact': self.run_card['sys_scalefact'], 'sys_alpsfact': self.run_card['sys_alpsfact'], 'sys_matchscale': self.run_card['sys_matchscale'], 'sys_scalecorrelation': self.run_card['sys_scalecorrelation'], 'sys_pdf': self.run_card['sys_pdf']} - - tag = self.run_card['run_tag'] + + tag = self.run_card['run_tag'] card = pjoin(self.me_dir, 'bin','internal', 'syscalc_card.dat') template = open(pjoin(self.me_dir, 'bin','internal', 'syscalc_template.dat')).read() - + if '&&' in to_syscalc['sys_pdf']: to_syscalc['sys_pdf'] = to_syscalc['sys_pdf'].split('#',1)[0].replace('&&',' \n ') else: @@ -6311,8 +6311,8 @@ def run_syscalc(self, mode='parton', event_path=None, output=None): new.append(d) else: new[-1] += ' %s' % d - to_syscalc['sys_pdf'] = '\n'.join(new) - + to_syscalc['sys_pdf'] = '\n'.join(new) + if to_syscalc['sys_pdf'].lower() in ['', 'f', 'false', 'none', '.false.']: to_syscalc['sys_pdf'] = '' if to_syscalc['sys_alpsfact'].lower() in ['', 'f', 'false', 'none','.false.']: @@ -6320,17 +6320,17 @@ def run_syscalc(self, mode='parton', event_path=None, output=None): - + # check if the scalecorrelation parameter is define: if not 'sys_scalecorrelation' in self.run_card: self.run_card['sys_scalecorrelation'] = -1 open(card,'w').write(template % self.run_card) - + if not os.path.exists(card): return False - - + + event_dir = pjoin(self.me_dir, 'Events') if not event_path: @@ -6353,19 +6353,19 @@ def run_syscalc(self, mode='parton', event_path=None, output=None): raise SysCalcError('qcut value for sys_matchscale lower than qcut in pythia_card. Bypass syscalc') if float(value) < xqcut: raise SysCalcError('qcut value for sys_matchscale lower than xqcut in run_card. Bypass syscalc') - - + + event_path = pjoin(event_dir,'syst.dat') output = pjoin(event_dir, 'syscalc.dat') else: raise self.InvalidCmd('Invalid mode %s' % mode) - + if not os.path.exists(event_path): if os.path.exists(event_path+'.gz'): misc.gunzip(event_path+'.gz') else: raise SysCalcError('Events file %s does not exits' % event_path) - + self.update_status('Calculating systematics for %s level' % mode, level = mode.lower()) try: proc = misc.call([os.path.join(scdir, 'sys_calc'), @@ -6374,7 +6374,7 @@ def run_syscalc(self, mode='parton', event_path=None, output=None): stderr = subprocess.STDOUT, cwd=event_dir) # Wait 5 s to make sure file is finished writing - time.sleep(5) + time.sleep(5) except OSError as error: logger.error('fail to run syscalc: %s. Please check that SysCalc is correctly installed.' % error) else: @@ -6382,11 +6382,11 @@ def run_syscalc(self, mode='parton', event_path=None, output=None): logger.warning('SysCalc Failed. Please read the associate log to see the reason. Did you install the associate PDF set?') elif mode == 'parton': files.mv(output, event_path) - + self.update_status('End syscalc for %s level' % mode, level = mode.lower(), makehtml=False) - - return True + + return True action_switcher = AskRun @@ -6399,23 +6399,23 @@ def ask_run_configuration(self, mode=None, args=[]): passing_cmd.append('reweight=ON') if '-M' in args or '--madspin' in args: passing_cmd.append('madspin=ON') - + switch, cmd_switch = self.ask('', '0', [], ask_class = self.action_switcher, mode=mode, line_args=args, force=self.force, first_cmd=passing_cmd, return_instance=True) # - self.switch = switch # store the value of the switch for plugin purpose + self.switch = switch # store the value of the switch for plugin purpose if 'dynamical' in switch: mode = 'auto' - + # Now that we know in which mode we are check that all the card #exists (copy default if needed) - + cards = ['param_card.dat', 'run_card.dat'] if switch['shower'] == 'Pythia6': cards.append('pythia_card.dat') if switch['shower'] == 'Pythia8': - cards.append('pythia8_card.dat') + cards.append('pythia8_card.dat') if switch['detector'] in ['PGS','DELPHES+PGS']: cards.append('pgs_card.dat') if switch['detector'] in ['Delphes', 'DELPHES+PGS']: @@ -6438,29 +6438,29 @@ def ask_run_configuration(self, mode=None, args=[]): cards.append('rivet_card.dat') self.keep_cards(cards) - + first_cmd = cmd_switch.get_cardcmd() - + if os.path.isfile(pjoin(self.me_dir,'Cards','MadLoopParams.dat')): cards.append('MadLoopParams.dat') - + if self.force: self.check_param_card(pjoin(self.me_dir,'Cards','param_card.dat' )) return switch - + if 'dynamical' in switch and switch['dynamical']: self.ask_edit_cards(cards, plot=False, mode='auto', first_cmd=first_cmd) else: self.ask_edit_cards(cards, plot=False, first_cmd=first_cmd) return switch - + ############################################################################ def ask_pythia_run_configuration(self, mode=None, pythia_version=6, banner=None): """Ask the question when launching pythia""" - + pythia_suffix = '' if pythia_version==6 else '%d'%pythia_version - + available_mode = ['0', '1'] if pythia_version==6: available_mode.append('2') @@ -6485,10 +6485,10 @@ def ask_pythia_run_configuration(self, mode=None, pythia_version=6, banner=None) mode = self.ask(question, '0', options) elif not mode: mode = 'auto' - + if mode.isdigit(): mode = name[mode] - + auto = False if mode == 'auto': auto = True @@ -6497,7 +6497,7 @@ def ask_pythia_run_configuration(self, mode=None, pythia_version=6, banner=None) mode = 'pgs' elif os.path.exists(pjoin(self.me_dir, 'Cards', 'delphes_card.dat')): mode = 'delphes' - else: + else: mode = 'pythia%s'%pythia_suffix logger.info('Will run in mode %s' % mode) # Now that we know in which mode we are check that all the card @@ -6513,15 +6513,15 @@ def ask_pythia_run_configuration(self, mode=None, pythia_version=6, banner=None) cards.append('delphes_trigger.dat') self.keep_cards(cards, ignore=['madanalysis5_parton_card.dat','madanalysis5_hadron_card.dat', 'plot_card.dat']) - + if self.force: return mode - + if not banner: banner = self.banner - + if auto: - self.ask_edit_cards(cards, from_banner=['param', 'run'], + self.ask_edit_cards(cards, from_banner=['param', 'run'], mode='auto', plot=(pythia_version==6), banner=banner ) else: @@ -6529,12 +6529,12 @@ def ask_pythia_run_configuration(self, mode=None, pythia_version=6, banner=None) plot=(pythia_version==6), banner=banner) return mode - + #=============================================================================== # MadEventCmd #=============================================================================== class MadEventCmdShell(MadEventCmd, cmd.CmdShell): - """The command line processor of MadGraph""" + """The command line processor of MadGraph""" @@ -6548,11 +6548,11 @@ class SubProcesses(object): @classmethod def clean(cls): cls.name_to_pdg = {} - + @staticmethod def get_subP(me_dir): """return the list of Subprocesses""" - + out = [] for line in open(pjoin(me_dir,'SubProcesses', 'subproc.mg')): if not line: @@ -6560,9 +6560,9 @@ def get_subP(me_dir): name = line.strip() if os.path.exists(pjoin(me_dir, 'SubProcesses', name)): out.append(pjoin(me_dir, 'SubProcesses', name)) - + return out - + @staticmethod @@ -6623,9 +6623,9 @@ def get_subP_ids(path): particles = re.search("/([\d,-]+)/", line) all_ids.append([int(p) for p in particles.group(1).split(',')]) return all_ids - - -#=============================================================================== + + +#=============================================================================== class GridPackCmd(MadEventCmd): """The command for the gridpack --Those are not suppose to be use interactively--""" @@ -6639,7 +6639,7 @@ def __init__(self, me_dir = None, nb_event=0, seed=0, gran=-1, *completekey, **s self.random = seed self.random_orig = self.random self.granularity = gran - + self.options['automatic_html_opening'] = False #write the grid_card.dat on disk self.nb_event = int(nb_event) @@ -6680,7 +6680,7 @@ def write_RunWeb(self, me_dir): def write_gridcard(self, nb_event, seed, gran): """write the grid_card.dat file at appropriate location""" - + # first try to write grid_card within the gridpack. print("WRITE GRIDCARD", self.me_dir) if self.readonly: @@ -6689,35 +6689,35 @@ def write_gridcard(self, nb_event, seed, gran): fsock = open('grid_card.dat','w') else: fsock = open(pjoin(self.me_dir, 'Cards', 'grid_card.dat'),'w') - + gridpackcard = banner_mod.GridpackCard() gridpackcard['GridRun'] = True gridpackcard['gevents'] = nb_event gridpackcard['gseed'] = seed gridpackcard['ngran'] = gran - + gridpackcard.write(fsock) ############################################################################ def get_Pdir(self): """get the list of Pdirectory if not yet saved.""" - + if hasattr(self, "Pdirs"): if self.me_dir in self.Pdirs[0]: return self.Pdirs - + if not self.readonly: - self.Pdirs = [pjoin(self.me_dir, 'SubProcesses', l.strip()) + self.Pdirs = [pjoin(self.me_dir, 'SubProcesses', l.strip()) for l in open(pjoin(self.me_dir,'SubProcesses', 'subproc.mg'))] else: - self.Pdirs = [l.strip() - for l in open(pjoin(self.me_dir,'SubProcesses', 'subproc.mg'))] - + self.Pdirs = [l.strip() + for l in open(pjoin(self.me_dir,'SubProcesses', 'subproc.mg'))] + return self.Pdirs - + def prepare_local_dir(self): """create the P directory structure in the local directory""" - + if not self.readonly: os.chdir(self.me_dir) else: @@ -6726,7 +6726,7 @@ def prepare_local_dir(self): os.mkdir(p) files.cp(pjoin(self.me_dir,'SubProcesses',p,'symfact.dat'), pjoin(p, 'symfact.dat')) - + def launch(self, nb_event, seed): """ launch the generation for the grid """ @@ -6742,13 +6742,13 @@ def launch(self, nb_event, seed): if self.run_card['python_seed'] == -2: import random if not hasattr(random, 'mg_seedset'): - random.seed(seed) + random.seed(seed) random.mg_seedset = seed elif self.run_card['python_seed'] > 0: import random if not hasattr(random, 'mg_seedset'): - random.seed(self.run_card['python_seed']) - random.mg_seedset = self.run_card['python_seed'] + random.seed(self.run_card['python_seed']) + random.mg_seedset = self.run_card['python_seed'] # 2) Run the refine for the grid self.update_status('Generating Events', level=None) #misc.call([pjoin(self.me_dir,'bin','refine4grid'), @@ -6767,70 +6767,70 @@ def launch(self, nb_event, seed): self.exec_cmd('decay_events -from_cards', postcmd=False) elif self.run_card['use_syst'] and self.run_card['systematics_program'] == 'systematics': self.options['nb_core'] = 1 - self.exec_cmd('systematics %s --from_card' % + self.exec_cmd('systematics %s --from_card' % pjoin('Events', self.run_name, 'unweighted_events.lhe.gz'), postcmd=False,printcmd=False) - + def refine4grid(self, nb_event): """Special refine for gridpack run.""" self.nb_refine += 1 - + precision = nb_event self.opts = dict([(key,value[1]) for (key,value) in \ self._survey_options.items()]) - + # initialize / remove lhapdf mode # self.configure_directory() # All this has been done before self.cluster_mode = 0 # force single machine # Store seed in randinit file, to be read by ranmar.f self.save_random() - + self.update_status('Refine results to %s' % precision, level=None) logger.info("Using random number seed offset = %s" % self.random) refine_opt = {'err_goal': nb_event, 'split_channels': False, - 'ngran':self.granularity, 'readonly': self.readonly} + 'ngran':self.granularity, 'readonly': self.readonly} x_improve = gen_ximprove.gen_ximprove_gridpack(self, refine_opt) x_improve.launch() # create the ajob for the refinment and run those! - self.gscalefact = x_improve.gscalefact #store jacobian associate to the gridpack - - + self.gscalefact = x_improve.gscalefact #store jacobian associate to the gridpack + + #bindir = pjoin(os.path.relpath(self.dirbin, pjoin(self.me_dir,'SubProcesses'))) #print 'run combine!!!' #combine_runs.CombineRuns(self.me_dir) - + return #update html output Presults = sum_html.collect_result(self) cross, error = Presults.xsec, Presults.xerru self.results.add_detail('cross', cross) self.results.add_detail('error', error) - - + + #self.update_status('finish refine', 'parton', makehtml=False) #devnull.close() - - - + + + return self.total_jobs = 0 - subproc = [P for P in os.listdir(pjoin(self.me_dir,'SubProcesses')) if + subproc = [P for P in os.listdir(pjoin(self.me_dir,'SubProcesses')) if P.startswith('P') and os.path.isdir(pjoin(self.me_dir,'SubProcesses', P))] devnull = open(os.devnull, 'w') for nb_proc,subdir in enumerate(subproc): subdir = subdir.strip() Pdir = pjoin(self.me_dir, 'SubProcesses',subdir) bindir = pjoin(os.path.relpath(self.dirbin, Pdir)) - + logger.info(' %s ' % subdir) # clean previous run for match in misc.glob('*ajob*', Pdir): if os.path.basename(match)[:4] in ['ajob', 'wait', 'run.', 'done']: os.remove(pjoin(Pdir, match)) - + logfile = pjoin(Pdir, 'gen_ximprove.log') misc.call([pjoin(bindir, 'gen_ximprove')], @@ -6840,40 +6840,40 @@ def refine4grid(self, nb_event): if os.path.exists(pjoin(Pdir, 'ajob1')): alljobs = misc.glob('ajob*', Pdir) - nb_tot = len(alljobs) + nb_tot = len(alljobs) self.total_jobs += nb_tot for i, job in enumerate(alljobs): job = os.path.basename(job) - self.launch_job('%s' % job, cwd=Pdir, remaining=(nb_tot-i-1), + self.launch_job('%s' % job, cwd=Pdir, remaining=(nb_tot-i-1), run_type='Refine number %s on %s (%s/%s)' % (self.nb_refine, subdir, nb_proc+1, len(subproc))) if os.path.exists(pjoin(self.me_dir,'error')): self.monitor(html=True) raise MadEventError('Error detected in dir %s: %s' % \ (Pdir, open(pjoin(self.me_dir,'error')).read())) - self.monitor(run_type='All job submitted for refine number %s' % + self.monitor(run_type='All job submitted for refine number %s' % self.nb_refine) - + self.update_status("Combining runs", level='parton') try: os.remove(pjoin(Pdir, 'combine_runs.log')) except Exception: pass - + bindir = pjoin(os.path.relpath(self.dirbin, pjoin(self.me_dir,'SubProcesses'))) combine_runs.CombineRuns(self.me_dir) - + #update html output cross, error = self.make_make_all_html_results() self.results.add_detail('cross', cross) self.results.add_detail('error', error) - - + + self.update_status('finish refine', 'parton', makehtml=False) devnull.close() def do_combine_events(self, line): - """Advanced commands: Launch combine events""" + """Advanced commands: Launch combine events""" if self.readonly: outdir = 'Events' @@ -6895,17 +6895,17 @@ def do_combine_events(self, line): self.banner.add_generation_info(self.results.current['cross'], self.run_card['nevents']) if not hasattr(self, 'random_orig'): self.random_orig = 0 self.banner.change_seed(self.random_orig) - - + + if not os.path.exists(pjoin(outdir, self.run_name)): os.mkdir(pjoin(outdir, self.run_name)) - self.banner.write(pjoin(outdir, self.run_name, + self.banner.write(pjoin(outdir, self.run_name, '%s_%s_banner.txt' % (self.run_name, tag))) - - get_wgt = lambda event: event.wgt + + get_wgt = lambda event: event.wgt AllEvent = lhe_parser.MultiEventFile() AllEvent.banner = self.banner - + partials = 0 # if too many file make some partial unweighting sum_xsec, sum_xerru, sum_axsec = 0,[],0 Gdirs = self.get_Gdir() @@ -6915,7 +6915,7 @@ def do_combine_events(self, line): if os.path.exists(pjoin(Gdir, 'events.lhe')): result = sum_html.OneResult('') result.read_results(pjoin(Gdir, 'results.dat')) - AllEvent.add(pjoin(Gdir, 'events.lhe'), + AllEvent.add(pjoin(Gdir, 'events.lhe'), result.get('xsec')*gscalefact[Gdir], result.get('xerru')*gscalefact[Gdir], result.get('axsec')*gscalefact[Gdir] @@ -6924,7 +6924,7 @@ def do_combine_events(self, line): sum_xsec += result.get('xsec')*gscalefact[Gdir] sum_xerru.append(result.get('xerru')*gscalefact[Gdir]) sum_axsec += result.get('axsec')*gscalefact[Gdir] - + if len(AllEvent) >= 80: #perform a partial unweighting AllEvent.unweight(pjoin(outdir, self.run_name, "partials%s.lhe.gz" % partials), get_wgt, log_level=5, trunc_error=1e-2, event_target=self.nb_event) @@ -6933,26 +6933,26 @@ def do_combine_events(self, line): AllEvent.add(pjoin(outdir, self.run_name, "partials%s.lhe.gz" % partials), sum_xsec, math.sqrt(sum(x**2 for x in sum_xerru)), - sum_axsec) + sum_axsec) partials +=1 - + if not hasattr(self,'proc_characteristic'): self.proc_characteristic = self.get_characteristics() - + self.banner.add_generation_info(sum_xsec, self.nb_event) nb_event = AllEvent.unweight(pjoin(outdir, self.run_name, "unweighted_events.lhe.gz"), get_wgt, trunc_error=1e-2, event_target=self.nb_event, log_level=logging.DEBUG, normalization=self.run_card['event_norm'], proc_charac=self.proc_characteristic) - - + + if partials: for i in range(partials): try: os.remove(pjoin(outdir, self.run_name, "partials%s.lhe.gz" % i)) except Exception: os.remove(pjoin(outdir, self.run_name, "partials%s.lhe" % i)) - + self.results.add_detail('nb_event', nb_event) self.banner.add_generation_info(sum_xsec, nb_event) if self.run_card['bias_module'].lower() not in ['dummy', 'none']: @@ -6961,7 +6961,7 @@ def do_combine_events(self, line): class MadLoopInitializer(object): """ A container class for the various methods for initializing MadLoop. It is - placed in MadEventInterface because it is used by Madevent for loop-induced + placed in MadEventInterface because it is used by Madevent for loop-induced simulations. """ @staticmethod @@ -6974,7 +6974,7 @@ def make_and_run(dir_name,checkRam=False): if os.path.isfile(pjoin(dir_name,'check')): os.remove(pjoin(dir_name,'check')) os.remove(pjoin(dir_name,'check_sa.o')) - os.remove(pjoin(dir_name,'loop_matrix.o')) + os.remove(pjoin(dir_name,'loop_matrix.o')) # Now run make devnull = open(os.devnull, 'w') start=time.time() @@ -6996,7 +6996,7 @@ def make_and_run(dir_name,checkRam=False): stdout=devnull, stderr=devnull, close_fds=True) try: ptimer.execute() - #poll as often as possible; otherwise the subprocess might + #poll as often as possible; otherwise the subprocess might # "sneak" in some extra memory usage while you aren't looking # Accuracy of .2 seconds is enough for the timing. while ptimer.poll(): @@ -7028,7 +7028,7 @@ def fix_PSPoint_in_check(dir_path, read_ps = True, npoints = 1, If mu_r > 0.0, then the renormalization constant value will be hardcoded directly in check_sa.f, if is is 0 it will be set to Sqrt(s) and if it is < 0.0 the value in the param_card.dat is used. - If the split_orders target (i.e. the target squared coupling orders for + If the split_orders target (i.e. the target squared coupling orders for the computation) is != -1, it will be changed in check_sa.f via the subroutine CALL SET_COUPLINGORDERS_TARGET(split_orders).""" @@ -7043,12 +7043,12 @@ def fix_PSPoint_in_check(dir_path, read_ps = True, npoints = 1, file_path = pjoin(directories[0],'check_sa.f') if not os.path.isfile(file_path): raise MadGraph5Error('Could not find the location of check_sa.f'+\ - ' from the specified path %s.'%str(file_path)) + ' from the specified path %s.'%str(file_path)) file = open(file_path, 'r') check_sa = file.read() file.close() - + file = open(file_path, 'w') check_sa = re.sub(r"READPS = \S+\)","READPS = %s)"%('.TRUE.' if read_ps \ else '.FALSE.'), check_sa) @@ -7064,42 +7064,42 @@ def fix_PSPoint_in_check(dir_path, read_ps = True, npoints = 1, (("%.17e"%mu_r).replace('e','d')),check_sa) elif mu_r < 0.0: check_sa = re.sub(r"MU_R=SQRTS","",check_sa) - + if split_orders > 0: check_sa = re.sub(r"SET_COUPLINGORDERS_TARGET\(-?\d+\)", - "SET_COUPLINGORDERS_TARGET(%d)"%split_orders,check_sa) - + "SET_COUPLINGORDERS_TARGET(%d)"%split_orders,check_sa) + file.write(check_sa) file.close() - @staticmethod + @staticmethod def run_initialization(run_dir=None, SubProc_dir=None, infos=None,\ req_files = ['HelFilter.dat','LoopFilter.dat'], attempts = [4,15]): - """ Run the initialization of the process in 'run_dir' with success + """ Run the initialization of the process in 'run_dir' with success characterized by the creation of the files req_files in this directory. The directory containing the driving source code 'check_sa.f'. - The list attempt gives the successive number of PS points the + The list attempt gives the successive number of PS points the initialization should be tried with before calling it failed. Returns the number of PS points which were necessary for the init. Notice at least run_dir or SubProc_dir must be provided. A negative attempt number given in input means that quadprec will be forced for initialization.""" - + # If the user does not want detailed info, then set the dictionary # to a dummy one. if infos is None: infos={} - + if SubProc_dir is None and run_dir is None: raise MadGraph5Error('At least one of [SubProc_dir,run_dir] must'+\ ' be provided in run_initialization.') - + # If the user does not specify where is check_sa.f, then it is assumed # to be one levels above run_dir if SubProc_dir is None: SubProc_dir = os.path.abspath(pjoin(run_dir,os.pardir)) - + if run_dir is None: directories =[ dir for dir in misc.glob('P[0-9]*', SubProc_dir) if os.path.isdir(dir) ] @@ -7109,7 +7109,7 @@ def run_initialization(run_dir=None, SubProc_dir=None, infos=None,\ raise MadGraph5Error('Could not find a valid running directory'+\ ' in %s.'%str(SubProc_dir)) - # Use the presence of the file born_matrix.f to decide if it is a + # Use the presence of the file born_matrix.f to decide if it is a # loop-induced process or not. It's not crucial, but just that because # of the dynamic adjustment of the ref scale used for deciding what are # the zero contributions, more points are neeeded for loop-induced. @@ -7128,9 +7128,9 @@ def run_initialization(run_dir=None, SubProc_dir=None, infos=None,\ raise MadGraph5Error('Could not find MadLoopParams.dat at %s.'\ %MLCardPath) else: - MLCard = banner_mod.MadLoopParam(MLCardPath) + MLCard = banner_mod.MadLoopParam(MLCardPath) MLCard_orig = banner_mod.MadLoopParam(MLCard) - + # Make sure that LoopFilter really is needed. if not MLCard['UseLoopFilter']: try: @@ -7153,11 +7153,11 @@ def need_init(): proc_prefix+fname)) for fname in my_req_files]) or \ not os.path.isfile(pjoin(run_dir,'check')) or \ not os.access(pjoin(run_dir,'check'), os.X_OK) - + # Check if this is a process without born by checking the presence of the # file born_matrix.f is_loop_induced = os.path.exists(pjoin(run_dir,'born_matrix.f')) - + # For loop induced processes, always attempt quadruple precision if # double precision attempts fail and the user didn't specify himself # quadruple precision initializations attempts @@ -7166,11 +7166,11 @@ def need_init(): use_quad_prec = 1 curr_attempt = 1 - MLCard.set('WriteOutFilters',True) - + MLCard.set('WriteOutFilters',True) + while to_attempt!=[] and need_init(): curr_attempt = to_attempt.pop() - # if the attempt is a negative number it means we must force + # if the attempt is a negative number it means we must force # quadruple precision at initialization time if curr_attempt < 0: use_quad_prec = -1 @@ -7183,11 +7183,11 @@ def need_init(): MLCard.set('ZeroThres',1e-9) # Plus one because the filter are written on the next PS point after curr_attempt = abs(curr_attempt+1) - MLCard.set('MaxAttempts',curr_attempt) + MLCard.set('MaxAttempts',curr_attempt) MLCard.write(pjoin(SubProc_dir,'MadLoopParams.dat')) # initialization is performed. - MadLoopInitializer.fix_PSPoint_in_check(run_dir, read_ps = False, + MadLoopInitializer.fix_PSPoint_in_check(run_dir, read_ps = False, npoints = curr_attempt) compile_time, run_time, ram_usage = \ MadLoopInitializer.make_and_run(run_dir) @@ -7200,7 +7200,7 @@ def need_init(): infos['Process_compilation']==None: infos['Process_compilation'] = compile_time infos['Initialization'] = run_time - + MLCard_orig.write(pjoin(SubProc_dir,'MadLoopParams.dat')) if need_init(): return None @@ -7219,8 +7219,8 @@ def need_init(ML_resources_path, proc_prefix, r_files): MLCardPath = pjoin(proc_dir,'SubProcesses','MadLoopParams.dat') if not os.path.isfile(MLCardPath): raise MadGraph5Error('Could not find MadLoopParams.dat at %s.'\ - %MLCardPath) - MLCard = banner_mod.MadLoopParam(MLCardPath) + %MLCardPath) + MLCard = banner_mod.MadLoopParam(MLCardPath) req_files = ['HelFilter.dat','LoopFilter.dat'] # Make sure that LoopFilter really is needed. @@ -7234,9 +7234,9 @@ def need_init(ML_resources_path, proc_prefix, r_files): req_files.remove('HelFilter.dat') except ValueError: pass - + for v_folder in glob.iglob(pjoin(proc_dir,'SubProcesses', - '%s*'%subproc_prefix)): + '%s*'%subproc_prefix)): # Make sure it is a valid MadLoop directory if not os.path.isdir(v_folder) or not os.path.isfile(\ pjoin(v_folder,'loop_matrix.f')): @@ -7247,7 +7247,7 @@ def need_init(ML_resources_path, proc_prefix, r_files): if need_init(pjoin(proc_dir,'SubProcesses','MadLoop5_resources'), proc_prefix, req_files): return True - + return False @staticmethod @@ -7265,7 +7265,7 @@ def init_MadLoop(proc_dir, n_PS=None, subproc_prefix='PV', MG_options=None, misc.compile(arg=['treatCardsLoopNoInit'], cwd=pjoin(proc_dir,'Source')) else: interface.do_treatcards('all --no_MadLoopInit') - + # First make sure that IREGI and CUTTOOLS are compiled if needed if os.path.exists(pjoin(proc_dir,'Source','CutTools')): misc.compile(arg=['libcuttools'],cwd=pjoin(proc_dir,'Source')) @@ -7273,8 +7273,8 @@ def init_MadLoop(proc_dir, n_PS=None, subproc_prefix='PV', MG_options=None, misc.compile(arg=['libiregi'],cwd=pjoin(proc_dir,'Source')) # Then make sure DHELAS and MODEL are compiled misc.compile(arg=['libmodel'],cwd=pjoin(proc_dir,'Source')) - misc.compile(arg=['libdhelas'],cwd=pjoin(proc_dir,'Source')) - + misc.compile(arg=['libdhelas'],cwd=pjoin(proc_dir,'Source')) + # Now initialize the MadLoop outputs logger.info('Initializing MadLoop loop-induced matrix elements '+\ '(this can take some time)...') @@ -7283,7 +7283,7 @@ def init_MadLoop(proc_dir, n_PS=None, subproc_prefix='PV', MG_options=None, if MG_options: if interface and hasattr(interface, 'cluster') and isinstance(interface.cluster, cluster.MultiCore): mcore = interface.cluster - else: + else: mcore = cluster.MultiCore(**MG_options) else: mcore = cluster.onecore @@ -7294,10 +7294,10 @@ def run_initialization_wrapper(run_dir, infos, attempts): run_dir=run_dir, infos=infos) else: n_PS = MadLoopInitializer.run_initialization( - run_dir=run_dir, infos=infos, attempts=attempts) + run_dir=run_dir, infos=infos, attempts=attempts) infos['nPS'] = n_PS return 0 - + def wait_monitoring(Idle, Running, Done): if Idle+Running+Done == 0: return @@ -7307,21 +7307,21 @@ def wait_monitoring(Idle, Running, Done): init_info = {} # List all virtual folders while making sure they are valid MadLoop folders VirtualFolders = [f for f in glob.iglob(pjoin(proc_dir,'SubProcesses', - '%s*'%subproc_prefix)) if (os.path.isdir(f) or + '%s*'%subproc_prefix)) if (os.path.isdir(f) or os.path.isfile(pjoin(f,'loop_matrix.f')))] logger.debug("Now Initializing MadLoop matrix element in %d folder%s:"%\ (len(VirtualFolders),'s' if len(VirtualFolders)>1 else '')) - logger.debug(', '.join("'%s'"%os.path.basename(v_folder) for v_folder in + logger.debug(', '.join("'%s'"%os.path.basename(v_folder) for v_folder in VirtualFolders)) for v_folder in VirtualFolders: init_info[v_folder] = {} - + # We try all multiples of n_PS from 1 to max_mult, first in DP and then # in QP before giving up, or use default values if n_PS is None. max_mult = 3 if n_PS is None: # Then use the default list of number of PS points to try - mcore.submit(run_initialization_wrapper, + mcore.submit(run_initialization_wrapper, [pjoin(v_folder), init_info[v_folder], None]) else: # Use specific set of PS points @@ -7348,8 +7348,8 @@ def wait_monitoring(Idle, Running, Done): '%d PS points (%s), in %.3g(compil.) + %.3g(init.) secs.'%( abs(init['nPS']),'DP' if init['nPS']>0 else 'QP', init['Process_compilation'],init['Initialization'])) - - logger.info('MadLoop initialization finished.') + + logger.info('MadLoop initialization finished.') AskforEditCard = common_run.AskforEditCard @@ -7364,16 +7364,16 @@ def wait_monitoring(Idle, Running, Done): import os import optparse - # Get the directory of the script real path (bin) - # and add it to the current PYTHONPATH + # Get the directory of the script real path (bin) + # and add it to the current PYTHONPATH #root_path = os.path.dirname(os.path.dirname(os.path.dirname(os.path.realpath( __file__ )))) sys.path.insert(0, root_path) - class MyOptParser(optparse.OptionParser): + class MyOptParser(optparse.OptionParser): class InvalidOption(Exception): pass def error(self, msg=''): raise MyOptParser.InvalidOption(msg) - # Write out nice usage message if called with -h or --help + # Write out nice usage message if called with -h or --help usage = "usage: %prog [options] [FILE] " parser = MyOptParser(usage=usage) parser.add_option("-l", "--logging", default='INFO', @@ -7384,7 +7384,7 @@ def error(self, msg=''): help='force to launch debug mode') parser_error = '' done = False - + for i in range(len(sys.argv)-1): try: (options, args) = parser.parse_args(sys.argv[1:len(sys.argv)-i]) @@ -7394,7 +7394,7 @@ def error(self, msg=''): else: args += sys.argv[len(sys.argv)-i:] if not done: - # raise correct error: + # raise correct error: try: (options, args) = parser.parse_args() except MyOptParser.InvalidOption as error: @@ -7407,8 +7407,8 @@ def error(self, msg=''): import subprocess import logging import logging.config - # Set logging level according to the logging level given by options - #logging.basicConfig(level=vars(logging)[options.logging]) + # Set logging level according to the logging level given by options + #logging.basicConfig(level=vars(logging)[options.logging]) import internal import internal.coloring_logging # internal.file = XXX/bin/internal/__init__.py @@ -7431,13 +7431,13 @@ def error(self, msg=''): raise pass - # Call the cmd interface main loop + # Call the cmd interface main loop try: if args: # a single command is provided if '--web' in args: - i = args.index('--web') - args.pop(i) + i = args.index('--web') + args.pop(i) cmd_line = MadEventCmd(me_dir, force_run=True) else: cmd_line = MadEventCmdShell(me_dir, force_run=True) @@ -7457,13 +7457,13 @@ def error(self, msg=''): pass - - - - - - - - + + + + + + + + diff --git a/epochX/cudacpp/gg_ttggg.mad/bin/internal/run_plot b/epochX/cudacpp/gg_ttggg.mad/bin/internal/run_plot deleted file mode 100755 index 7deee7ac88..0000000000 --- a/epochX/cudacpp/gg_ttggg.mad/bin/internal/run_plot +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash -# -# This runs MadAnalysis on the unweighted_events.lhe -# -# Usage: run_plot run_name [madir [tddir]] -# where madir is the path to the MadAnalysis package - -main=`pwd` - -if [ "$1" != "" ] -then - run=$1 -else - echo "Usage: run_plot runname [MAdir [tddir]]" - exit -fi - -if [ "$2" != "" ] -then - MAdir=$main/$2 -else - MAdir=$main/../../MadAnalysis -fi - -if [ "$3" != "" ]; then - td=$main/$3 -else - td=$main/../../td -fi - -dirbin=$main/../bin - -if [[ $run != "" && -e ${run}_unweighted_events.lhe.gz ]];then - gunzip -c ${run}_unweighted_events.lhe.gz > unweighted_events.lhe -fi - -if [[ (-x $MAdir/plot_events) && (-e unweighted_events.lhe) && (-e ../Cards/plot_card.dat) ]]; then - echo "Creating Plots" - mkdir $run - cd $run - echo "../unweighted_events.lhe" > events.list - $dirbin/plot $MAdir $td > plot.log - cd .. - $dirbin/plot_page-pl $run parton - mv plots.html ${run}_plots.html -fi - diff --git a/epochX/cudacpp/gg_ttggg.mad/bin/internal/run_plot_delphes b/epochX/cudacpp/gg_ttggg.mad/bin/internal/run_plot_delphes deleted file mode 100755 index 975f410d0e..0000000000 --- a/epochX/cudacpp/gg_ttggg.mad/bin/internal/run_plot_delphes +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/bash -# -# This runs MadAnalysis on the delphes_events.lhco -# -# Usage: run_plot run_name [madir [tddir]] -# where madir is the path to the MadAnalysis package - -main=`pwd` - -if [ "$1" != "" ] -then - run=$1 -else - echo "Usage: run_plot runname [MAdir [tddir]]" - exit -fi - -if [ "$2" != "" ] -then - MAdir=$main/$2 -else - MAdir=$main/../../MadAnalysis -fi - -if [ "$3" != "" ]; then - td=$main/$3 -else - td=$main/../../td -fi - -dirbin=$main/../bin - -if [[ $run != "" && -e ${run}_delphes_events.lhco.gz ]];then - gunzip -c ${run}_delphes_events.lhco.gz > delphes_events.lhco -fi - -if [[ (-x $MAdir/plot_events) && (-e delphes_events.lhco) && (-e ../Cards/plot_card.dat) ]]; then - echo "Creating Plots" - mkdir ${run}_delphes - cd ${run}_delphes - echo "../delphes_events.lhco" > events.list - $dirbin/plot $MAdir $td > plot.log - cd .. - $dirbin/plot_page-pl ${run}_delphes Delphes - mv plots.html ${run}_plots_delphes.html -fi diff --git a/epochX/cudacpp/gg_ttggg.mad/bin/internal/run_plot_pgs b/epochX/cudacpp/gg_ttggg.mad/bin/internal/run_plot_pgs deleted file mode 100755 index e7a36ef344..0000000000 --- a/epochX/cudacpp/gg_ttggg.mad/bin/internal/run_plot_pgs +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash -# -# This runs MadAnalysis on the unweighted_events.lhe -# -# Usage: run_plot run_name [madir [tddir]] -# where madir is the path to the MadAnalysis package - -main=`pwd` - -if [ "$1" != "" ] -then - run=$1 -else - echo "Usage: run_plot runname [MAdir [tddir]]" - exit -fi - -if [ "$2" != "" ] -then - MAdir=$main/$2 -else - MAdir=$main/../../MadAnalysis -fi - -if [ "$3" != "" ]; then - td=$main/$3 -else - td=$main/../../td -fi - -dirbin=$main/../bin - -if [[ $run != "" && -e ${run}_pgs_events.lhco.gz ]];then - gunzip -c ${run}_pgs_events.lhco.gz > pgs_events.lhco -fi - -if [[ (-x $MAdir/plot_events) && (-e pgs_events.lhco) && (-e ../Cards/plot_card.dat) ]]; then - echo "Creating Plots" - mkdir ${run}_pgs - cd ${run}_pgs - echo "../pgs_events.lhco" > events.list - $dirbin/plot $MAdir $td > plot.log - cd .. - $dirbin/plot_page-pl ${run}_pgs PGS - mv plots.html ${run}_plots_pgs.html -fi - diff --git a/epochX/cudacpp/gg_ttggg.mad/bin/internal/run_plot_pythia b/epochX/cudacpp/gg_ttggg.mad/bin/internal/run_plot_pythia deleted file mode 100755 index 532bfb4b7b..0000000000 --- a/epochX/cudacpp/gg_ttggg.mad/bin/internal/run_plot_pythia +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/bash -# -# This runs MadAnalysis on the unweighted_events.lhe -# -# Usage: run_plot run_name [madir [tddir]] -# where madir is the path to the MadAnalysis package - -main=`pwd` - -if [ "$1" != "" ] -then - run=$1 -else - echo "Usage: run_plot runname [MAdir [tddir]]" - exit -fi - -if [ "$2" != "" ] -then - MAdir=$main/$2 -else - MAdir=$main/../../MadAnalysis -fi - -if [ "$3" != "" ]; then - td=$main/$3 -else - td=$main/../../td -fi - -dirbin=$main/../bin/internal - -if [[ $run != "" && -e ${run}_pythia_events.lhe.gz ]];then - gunzip -c ${run}_pythia_events.lhe.gz > pythia_events.lhe -fi - -if [[ (-x $MAdir/plot_events) && (-e pythia_events.lhe) && (-e ../Cards/plot_card.dat) ]]; then - echo "Creating Plots" - mkdir ${run}_pythia - cd ${run}_pythia - echo "../pythia_events.lhe" > events.list - $dirbin/plot $MAdir $td > plot.log - cd .. - $dirbin/plot_page-pl ${run}_pythia Pythia - mv plots.html ${run}_plots_pythia.html - $dirbin/gen_crossxhtml-pl $run -else - echo "Not creating plots" -fi - diff --git a/epochX/cudacpp/gg_ttggg.mad/src/cudacpp_src.mk b/epochX/cudacpp/gg_ttggg.mad/src/cudacpp_src.mk index c757875347..b4e446bc45 100644 --- a/epochX/cudacpp/gg_ttggg.mad/src/cudacpp_src.mk +++ b/epochX/cudacpp/gg_ttggg.mad/src/cudacpp_src.mk @@ -1,12 +1,7 @@ # Copyright (C) 2020-2023 CERN and UCLouvain. # Licensed under the GNU Lesser General Public License (version 3 or later). # Created by: S. Roiser (Feb 2020) for the MG5aMC CUDACPP plugin. -# Further modified by: J. Teig, O. Mattelaer, S. Roiser, A. Valassi (2020-2023) for the MG5aMC CUDACPP plugin. - -#=== Determine the name of this makefile (https://ftp.gnu.org/old-gnu/Manuals/make-3.80/html_node/make_17.html) -#=== NB: assume that the same name (e.g. cudacpp.mk, Makefile...) is used in the Subprocess and src directories - -THISMK = $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)) +# Further modified by: S. Hageboeck, J. Teig, O. Mattelaer, S. Roiser, A. Valassi (2020-2023) for the MG5aMC CUDACPP plugin. #------------------------------------------------------------------------------- @@ -16,167 +11,24 @@ SHELL := /bin/bash #------------------------------------------------------------------------------- -#=== Configure common compiler flags for CUDA and C++ - -INCFLAGS = -I. -OPTFLAGS = -O3 # this ends up in CUFLAGS too (should it?), cannot add -Ofast or -ffast-math here - -#------------------------------------------------------------------------------- - #=== Configure the C++ compiler -CXXFLAGS = $(OPTFLAGS) -std=c++17 $(INCFLAGS) $(USE_NVTX) -fPIC -Wall -Wshadow -Wextra +include ../Source/make_opts + +MG_CXXFLAGS += -fPIC -I. $(USE_NVTX) ifeq ($(shell $(CXX) --version | grep ^nvc++),) -CXXFLAGS+= -ffast-math # see issue #117 +MG_CXXFLAGS += -ffast-math # see issue #117 endif -###CXXFLAGS+= -Ofast # performance is not different from --fast-math -###CXXFLAGS+= -g # FOR DEBUGGING ONLY # Note: AR, CXX and FC are implicitly defined if not set externally # See https://www.gnu.org/software/make/manual/html_node/Implicit-Variables.html ###RANLIB = ranlib -# Add -mmacosx-version-min=11.3 to avoid "ld: warning: object file was built for newer macOS version than being linked" -LDFLAGS = -ifneq ($(shell $(CXX) --version | egrep '^Apple clang'),) -CXXFLAGS += -mmacosx-version-min=11.3 -LDFLAGS += -mmacosx-version-min=11.3 -endif - -#------------------------------------------------------------------------------- - -#=== Configure the CUDA compiler (note: NVCC is already exported including ccache) - -###$(info NVCC=$(NVCC)) - -#------------------------------------------------------------------------------- - -#=== Configure ccache for C++ builds (note: NVCC is already exported including ccache) - -# Enable ccache if USECCACHE=1 -ifeq ($(USECCACHE)$(shell echo $(CXX) | grep ccache),1) - override CXX:=ccache $(CXX) -endif -#ifeq ($(USECCACHE)$(shell echo $(AR) | grep ccache),1) -# override AR:=ccache $(AR) -#endif - -#------------------------------------------------------------------------------- - -#=== Configure PowerPC-specific compiler flags for CUDA and C++ - -# Assuming uname is available, detect if architecture is PowerPC -UNAME_P := $(shell uname -p) - -# PowerPC-specific CXX compiler flags (being reviewed) -ifeq ($(UNAME_P),ppc64le) - CXXFLAGS+= -mcpu=power9 -mtune=power9 # gains ~2-3% both for none and sse4 - # Throughput references without the extra flags below: none=1.41-1.42E6, sse4=2.15-2.19E6 - ###CXXFLAGS+= -DNO_WARN_X86_INTRINSICS # no change - ###CXXFLAGS+= -fpeel-loops # no change - ###CXXFLAGS+= -funroll-loops # gains ~1% for none, loses ~1% for sse4 - ###CXXFLAGS+= -ftree-vectorize # no change - ###CXXFLAGS+= -flto # BUILD ERROR IF THIS ADDED IN SRC?! -else - ###AR=gcc-ar # needed by -flto - ###RANLIB=gcc-ranlib # needed by -flto - ###CXXFLAGS+= -flto # NB: build error from src/Makefile unless gcc-ar and gcc-ranlib are used - ######CXXFLAGS+= -fno-semantic-interposition # no benefit (neither alone, nor combined with -flto) -endif - -#------------------------------------------------------------------------------- - #=== Set the CUDA/C++ compiler flags appropriate to user-defined choices of AVX, FPTYPE, HELINL, HRDCOD, RNDGEN # Set the build flags appropriate to OMPFLAGS ###$(info OMPFLAGS=$(OMPFLAGS)) -CXXFLAGS += $(OMPFLAGS) - -# Set the build flags appropriate to each AVX choice (example: "make AVX=none") -# [NB MGONGPU_PVW512 is needed because "-mprefer-vector-width=256" is not exposed in a macro] -# [See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96476] -ifeq ($(NVCC),) - $(info AVX=$(AVX)) - ifeq ($(UNAME_P),ppc64le) - ifeq ($(AVX),sse4) - override AVXFLAGS = -D__SSE4_2__ # Power9 VSX with 128 width (VSR registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on PowerPC for the moment) - endif - else ifeq ($(UNAME_P),arm) - ifeq ($(AVX),sse4) - override AVXFLAGS = -D__SSE4_2__ # ARM NEON with 128 width (Q/quadword registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on ARM for the moment) - endif - else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 - ifeq ($(AVX),none) - override AVXFLAGS = -mno-sse3 # no SIMD - else ifeq ($(AVX),sse4) - override AVXFLAGS = -mno-avx # SSE4.2 with 128 width (xmm registers) - else ifeq ($(AVX),avx2) - override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(AVX),512y) - override AVXFLAGS = -march=skylake -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(AVX),512z) - override AVXFLAGS = -march=skylake -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) - else - $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) - endif - else - ifeq ($(AVX),none) - override AVXFLAGS = -march=x86-64 # no SIMD (see #588) - else ifeq ($(AVX),sse4) - override AVXFLAGS = -march=nehalem # SSE4.2 with 128 width (xmm registers) - else ifeq ($(AVX),avx2) - override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(AVX),512y) - override AVXFLAGS = -march=skylake-avx512 -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(AVX),512z) - override AVXFLAGS = -march=skylake-avx512 -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) - endif - endif - # For the moment, use AVXFLAGS everywhere: eventually, use them only in encapsulated implementations? - CXXFLAGS+= $(AVXFLAGS) -endif - -# Set the build flags appropriate to each FPTYPE choice (example: "make FPTYPE=f") -###$(info FPTYPE=$(FPTYPE)) -ifeq ($(FPTYPE),d) - CXXFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_DOUBLE -else ifeq ($(FPTYPE),f) - CXXFLAGS += -DMGONGPU_FPTYPE_FLOAT -DMGONGPU_FPTYPE2_FLOAT -else ifeq ($(FPTYPE),m) - CXXFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_FLOAT -else - $(error Unknown FPTYPE='$(FPTYPE)': only 'd', 'f' and 'm' are supported) -endif - -# Set the build flags appropriate to each HELINL choice (example: "make HELINL=1") -###$(info HELINL=$(HELINL)) -ifeq ($(HELINL),1) - CXXFLAGS += -DMGONGPU_INLINE_HELAMPS -else ifneq ($(HELINL),0) - $(error Unknown HELINL='$(HELINL)': only '0' and '1' are supported) -endif - -# Set the build flags appropriate to each HRDCOD choice (example: "make HRDCOD=1") -###$(info HRDCOD=$(HRDCOD)) -ifeq ($(HRDCOD),1) - CXXFLAGS += -DMGONGPU_HARDCODE_PARAM -else ifneq ($(HRDCOD),0) - $(error Unknown HRDCOD='$(HRDCOD)': only '0' and '1' are supported) -endif - -# Set the build flags appropriate to each RNDGEN choice (example: "make RNDGEN=hasNoCurand") -###$(info RNDGEN=$(RNDGEN)) -ifeq ($(RNDGEN),hasNoCurand) - CXXFLAGS += -DMGONGPU_HAS_NO_CURAND -else ifneq ($(RNDGEN),hasCurand) - $(error Unknown RNDGEN='$(RNDGEN)': only 'hasCurand' and 'hasNoCurand' are supported) -endif +MG_CXXFLAGS += $(OMPFLAGS) #------------------------------------------------------------------------------- @@ -184,36 +36,18 @@ endif # Build directory "short" tag (defines target and path to the optional build directory) # (Rationale: keep directory names shorter, e.g. do not include random number generator choice) -ifneq ($(NVCC),) - override DIRTAG = cuda_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) -else - override DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) -endif +DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) # Build lockfile "full" tag (defines full specification of build options that cannot be intermixed) # (Rationale: avoid mixing of CUDA and no-CUDA environment builds with different random number generators) -ifneq ($(NVCC),) - override TAG = cuda_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) -else - override TAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) -endif +TAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) -# Build directory: current directory by default, or build.$(DIRTAG) if USEBUILDDIR==1 -###$(info Current directory is $(shell pwd)) -ifeq ($(USEBUILDDIR),1) - override BUILDDIR = build.$(DIRTAG) - override LIBDIRREL = ../lib/$(BUILDDIR) - ###$(info Building in BUILDDIR=$(BUILDDIR) for tag=$(TAG) (USEBUILDDIR=1 is set)) -else - override BUILDDIR = . - override LIBDIRREL = ../lib - ###$(info Building in BUILDDIR=$(BUILDDIR) for tag=$(TAG) (USEBUILDDIR is not set)) -endif -######$(info Building in BUILDDIR=$(BUILDDIR) for tag=$(TAG)) +# Build directory: +BUILDDIR := build.$(DIRTAG) +LIBDIRREL := ../lib/$(BUILDDIR) # Workaround for Mac #375 (I did not manage to fix rpath with @executable_path): use absolute paths for LIBDIR # (NB: this is quite ugly because it creates the directory if it does not exist - to avoid removing src by mistake) -UNAME_S := $(shell uname -s) ifeq ($(UNAME_S),Darwin) override LIBDIR = $(shell mkdir -p $(LIBDIRREL); cd $(LIBDIRREL); pwd) ifeq ($(wildcard $(LIBDIR)),) @@ -235,100 +69,41 @@ MG5AMC_COMMONLIB = mg5amc_common # First target (default goal) all.$(TAG): $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so -# Target (and build options): debug -debug: OPTFLAGS = -g -O0 -debug: all.$(TAG) - #------------------------------------------------------------------------------- # Generic target and build rules: objects from C++ compilation $(BUILDDIR)/%.o : %.cc *.h @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - $(CXX) $(CPPFLAGS) $(CXXFLAGS) -fPIC -c $< -o $@ + $(CXX) $(MG_CXXFLAGS) $(CXXFLAGS) -c $< -o $@ # Generic target and build rules: objects from CUDA compilation $(BUILDDIR)/%_cu.o : %.cc *.h @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c -x cu $< -o $@ + $(NVCC) $(MG_NVCCFLAGS) $(NVCCFLAGS) -c -x cu $< -o $@ #------------------------------------------------------------------------------- cxx_objects=$(addprefix $(BUILDDIR)/, Parameters_sm.o read_slha.o) -ifneq ($(NVCC),) +ifeq ($(AVX),cuda) +COMPILER=$(NVCC) cu_objects=$(addprefix $(BUILDDIR)/, Parameters_sm_cu.o) +else +COMPILER=$(CXX) +cu_objects= endif # Target (and build rules): common (src) library -ifneq ($(NVCC),) $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so : $(cxx_objects) $(cu_objects) - @if [ ! -d $(LIBDIR) ]; then echo "mkdir -p $(LIBDIR)"; mkdir -p $(LIBDIR); fi - $(NVCC) -shared -o $@ $(cxx_objects) $(cu_objects) $(LDFLAGS) -else -$(LIBDIR)/lib$(MG5AMC_COMMONLIB).so : $(cxx_objects) - @if [ ! -d $(LIBDIR) ]; then echo "mkdir -p $(LIBDIR)"; mkdir -p $(LIBDIR); fi - $(CXX) -shared -o $@ $(cxx_objects) $(LDFLAGS) -endif + mkdir -p $(LIBDIR) + $(COMPILER) -shared -o $@ $(cxx_objects) $(cu_objects) $(MG_LDFLAGS) $(LDFLAGS) #------------------------------------------------------------------------------- # Target: clean the builds .PHONY: clean -BUILD_DIRS := $(wildcard build.*) -NUM_BUILD_DIRS := $(words $(BUILD_DIRS)) - clean: -ifeq ($(USEBUILDDIR),1) -ifeq ($(NUM_BUILD_DIRS),1) - $(info USEBUILDDIR=1, only one src build directory found.) - rm -rf ../lib/$(BUILD_DIRS) - rm -rf $(BUILD_DIRS) -else ifeq ($(NUM_BUILD_DIRS),0) - $(error USEBUILDDIR=1, but no src build directories are found.) -else - $(error Multiple src BUILDDIR's found! Use 'cleannone', 'cleansse4', 'cleanavx2', 'clean512y','clean512z', 'cleancuda' or 'cleanall'.) -endif -else - rm -f ../lib/lib$(MG5AMC_COMMONLIB).so - rm -f $(BUILDDIR)/*.o $(BUILDDIR)/*.exe -endif - -cleanall: - @echo - rm -f ../lib/lib$(MG5AMC_COMMONLIB).so - rm -f $(BUILDDIR)/*.o $(BUILDDIR)/*.exe - @echo - rm -rf ../lib/build.* - rm -rf build.* - -# Target: clean different builds - -cleannone: - rm -rf ../lib/build.none_* - rm -rf build.none_* - -cleansse4: - rm -rf ../lib/build.sse4_* - rm -rf build.sse4_* - -cleanavx2: - rm -rf ../lib/build.avx2_* - rm -rf build.avx2_* - -clean512y: - rm -rf ../lib/build.512y_* - rm -rf build.512y_* - -clean512z: - rm -rf ../lib/build.512z_* - rm -rf build.512z_* - -cleancuda: - rm -rf ../lib/build.cuda_* - rm -rf build.cuda_* - -cleandir: - rm -f ./*.o ./*.exe - rm -f ../lib/lib$(MG5AMC_COMMONLIB).so + $(RM) -f ../lib/build.*/*.so + $(RM) -rf build.* #------------------------------------------------------------------------------- diff --git a/epochX/cudacpp/gg_ttggg.mad/src/mgOnGpuCxtypes.h b/epochX/cudacpp/gg_ttggg.mad/src/mgOnGpuCxtypes.h index ca9a9f00c0..3290d314d6 100644 --- a/epochX/cudacpp/gg_ttggg.mad/src/mgOnGpuCxtypes.h +++ b/epochX/cudacpp/gg_ttggg.mad/src/mgOnGpuCxtypes.h @@ -21,10 +21,14 @@ // Complex type in cuda: thrust or cucomplex or cxsmpl #ifdef __CUDACC__ #if defined MGONGPU_CUCXTYPE_THRUST +#ifdef __CLANG__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" // for icpx2021/clang13 (https://stackoverflow.com/a/15864661) +#endif #include +#ifdef __CLANG__ #pragma clang diagnostic pop +#endif #elif defined MGONGPU_CUCXTYPE_CUCOMPLEX #include #elif not defined MGONGPU_CUCXTYPE_CXSMPL diff --git a/epochX/cudacpp/gq_ttq.mad/CODEGEN_mad_gq_ttq_log.txt b/epochX/cudacpp/gq_ttq.mad/CODEGEN_mad_gq_ttq_log.txt index 97f5e25170..e5595e0bf5 100644 --- a/epochX/cudacpp/gq_ttq.mad/CODEGEN_mad_gq_ttq_log.txt +++ b/epochX/cudacpp/gq_ttq.mad/CODEGEN_mad_gq_ttq_log.txt @@ -50,10 +50,9 @@ Please set the 'lhapdf' variable to the (absolute) /PATH/TO/lhapdf-config (inclu Note that you can still compile and run aMC@NLO with the built-in PDFs MG5_aMC> set lhapdf /PATH/TO/lhapdf-config -Using default text editor "vi". Set another one in ./input/mg5_configuration.txt Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt -No valid web browser found. Please set in ./input/mg5_configuration.txt -import /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq.mg +Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt +import /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq.mg The import format was not given, so we guess it as command set stdout_level DEBUG set output information to level: 10 @@ -61,7 +60,7 @@ set zerowidth_tchannel F define q = u c d s u~ c~ d~ s~ INFO: load particles INFO: load vertices -DEBUG: model prefixing takes 0.005373477935791016  +DEBUG: model prefixing takes 0.003381490707397461  INFO: Restrict model sm with file models/sm/restrict_default.dat . DEBUG: Simplifying conditional expressions  DEBUG: remove interactions: u s w+ at order: QED=1  @@ -170,7 +169,7 @@ INFO: Crossed process found for g u~ > t t~ u~, reuse diagrams. INFO: Crossed process found for g c~ > t t~ c~, reuse diagrams. INFO: Crossed process found for g d~ > t t~ d~, reuse diagrams. INFO: Crossed process found for g s~ > t t~ s~, reuse diagrams. -8 processes with 40 diagrams generated in 0.077 s +8 processes with 40 diagrams generated in 0.055 s Total: 8 processes with 40 diagrams output madevent ../TMPOUT/CODEGEN_mad_gq_ttq --hel_recycling=False --vector_size=32 --me_exporter=standalone_cudacpp Load PLUGIN.CUDACPP_OUTPUT @@ -181,10 +180,10 @@ Load PLUGIN.CUDACPP_OUTPUT INFO: initialize a new directory: CODEGEN_mad_gq_ttq INFO: remove old information in CODEGEN_mad_gq_ttq DEBUG: Entering PLUGIN_ProcessExporter.copy_template (initialise the directory) [output.py at line 165]  -WARNING: File exists /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq  -INFO: Creating subdirectories in directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq -WARNING: File exists /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/Cards  -WARNING: File exists /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/SubProcesses  +WARNING: File exists /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq  +INFO: Creating subdirectories in directory /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq +WARNING: File exists /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/Cards  +WARNING: File exists /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/SubProcesses  INFO: Organizing processes into subprocess groups INFO: Generating Helas calls for process: g u > t t~ u WEIGHTED<=3 @1 INFO: Processing color information for process: g u > t t~ u @1 @@ -198,7 +197,7 @@ INFO: Combined process g d~ > t t~ d~ WEIGHTED<=3 @1 with process g u~ > t t~ u~ INFO: Combined process g s~ > t t~ s~ WEIGHTED<=3 @1 with process g u~ > t t~ u~ WEIGHTED<=3 @1 INFO: Creating files in directory P1_gu_ttxu DEBUG: kwargs[prefix] = 0 [model_handling.py at line 1058]  -DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  +DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  INFO: Creating files in directory . FileWriter for ././CPPProcess.h FileWriter for ././CPPProcess.cc @@ -215,7 +214,7 @@ INFO: Generating Feynman diagrams for Process: g u > t t~ u WEIGHTED<=3 @1 INFO: Finding symmetric diagrams for subprocess group gu_ttxu INFO: Creating files in directory P1_gux_ttxux DEBUG: kwargs[prefix] = 0 [model_handling.py at line 1058]  -DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  +DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  INFO: Creating files in directory . FileWriter for ././CPPProcess.h FileWriter for ././CPPProcess.cc @@ -230,73 +229,78 @@ INFO: Created files CPPProcess.h and CPPProcess.cc in directory ./. DEBUG: vector, subproc_group,self.opt['vector_size'] =  32 True 32 [export_v4.py at line 1872]  INFO: Generating Feynman diagrams for Process: g u~ > t t~ u~ WEIGHTED<=3 @1 INFO: Finding symmetric diagrams for subprocess group gux_ttxux -Generated helas calls for 2 subprocesses (10 diagrams) in 0.031 s -Wrote files for 32 helas calls in 0.219 s +Generated helas calls for 2 subprocesses (10 diagrams) in 0.022 s +Wrote files for 32 helas calls in 0.162 s ALOHA: aloha starts to compute helicity amplitudes ALOHA: aloha creates FFV1 routines ALOHA: aloha creates VVV1 routines -ALOHA: aloha creates 2 routines in 0.144 s +ALOHA: aloha creates 2 routines in 0.098 s DEBUG: Entering PLUGIN_ProcessExporter.convert_model (create the model) [output.py at line 202]  ALOHA: aloha starts to compute helicity amplitudes ALOHA: aloha creates FFV1 routines ALOHA: aloha creates VVV1 routines -ALOHA: aloha creates 4 routines in 0.132 s +ALOHA: aloha creates 4 routines in 0.086 s FFV1 FFV1 FFV1 FFV1 VVV1 -FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/src/./HelAmps_sm.h -INFO: Created file HelAmps_sm.h in directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/src/. +FileWriter for /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/src/./HelAmps_sm.h +INFO: Created file HelAmps_sm.h in directory /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/src/. super_write_set_parameters_onlyfixMajorana (hardcoded=False) super_write_set_parameters_onlyfixMajorana (hardcoded=True) -FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/src/./Parameters_sm.h -FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/src/./Parameters_sm.cc +FileWriter for /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/src/./Parameters_sm.h +FileWriter for /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/src/./Parameters_sm.cc INFO: Created files Parameters_sm.h and Parameters_sm.cc in directory -INFO: /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/src/. and /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/src/. +INFO: /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/src/. and /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/src/. The option zerowidth_tchannel is modified [True] but will not be written in the configuration files. If you want to make this value the default for future session, you can run 'save options --all' -save configuration file to /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/Cards/me5_configuration.txt +save configuration file to /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/Cards/me5_configuration.txt INFO: Use Fortran compiler gfortran INFO: Use c++ compiler g++ INFO: Generate web pages -DEBUG: cd /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq; patch -p4 -i /data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common +DEBUG: cd /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq; patch -p4 -i /data/stephan/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common patching file Source/genps.inc +patching file Source/make_opts +Hunk #1 succeeded at 12 (offset -1 lines). +Hunk #2 succeeded at 70 (offset -1 lines). +Hunk #3 succeeded at 117 (offset -1 lines). +Hunk #4 succeeded at 128 (offset -1 lines). patching file Source/makefile patching file SubProcesses/makefile +patching file bin/internal/banner.py patching file bin/internal/gen_ximprove.py -Hunk #1 succeeded at 391 (offset 6 lines). patching file bin/internal/madevent_interface.py -DEBUG: cd /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/SubProcesses/P1_gu_ttxu; patch -p6 -i /data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 +DEBUG: cd /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/SubProcesses/P1_gu_ttxu; patch -p6 -i /data/stephan/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 patching file auto_dsig1.f Hunk #1 succeeded at 528 (offset 44 lines). patching file driver.f patching file matrix1.f Hunk #1 succeeded at 75 (offset 3 lines). -Hunk #2 succeeded at 162 (offset 19 lines). -Hunk #3 succeeded at 247 (offset 26 lines). -Hunk #4 succeeded at 281 (offset 32 lines). -Hunk #5 succeeded at 326 (offset 32 lines). -DEBUG: cd /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/SubProcesses/P1_gux_ttxux; patch -p6 -i /data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 +Hunk #2 succeeded at 162 (offset 3 lines). +Hunk #3 succeeded at 247 (offset 10 lines). +Hunk #4 succeeded at 281 (offset 16 lines). +Hunk #5 succeeded at 326 (offset 16 lines). +DEBUG: cd /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/SubProcesses/P1_gux_ttxux; patch -p6 -i /data/stephan/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 patching file auto_dsig1.f Hunk #1 succeeded at 528 (offset 44 lines). patching file driver.f patching file matrix1.f Hunk #1 succeeded at 75 (offset 3 lines). -Hunk #2 succeeded at 162 (offset 19 lines). -Hunk #3 succeeded at 247 (offset 26 lines). -Hunk #4 succeeded at 281 (offset 32 lines). -Hunk #5 succeeded at 326 (offset 32 lines). +Hunk #2 succeeded at 162 (offset 3 lines). +Hunk #3 succeeded at 247 (offset 10 lines). +Hunk #4 succeeded at 281 (offset 16 lines). +Hunk #5 succeeded at 326 (offset 16 lines). DEBUG: p.returncode =  0 [output.py at line 237]  -Output to directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq done. +Output to directory /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq done. Type "launch" to generate events from this process, or see -/data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/README +/data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/README Run "open index.html" to see more information about this process. quit -real 0m1.929s -user 0m1.701s -sys 0m0.227s +real 0m1.511s +user 0m1.209s +sys 0m0.300s ************************************************************ * * * W E L C O M E to * @@ -317,12 +321,11 @@ sys 0m0.227s * Type 'help' for in-line help. * * * ************************************************************ -INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/Cards/me5_configuration.txt -INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo/input/mg5_configuration.txt -INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/Cards/me5_configuration.txt -Using default text editor "vi". Set another one in ./input/mg5_configuration.txt +INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/Cards/me5_configuration.txt +INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/mg5amcnlo/input/mg5_configuration.txt +INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/Cards/me5_configuration.txt Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt -No valid web browser found. Please set in ./input/mg5_configuration.txt +Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt treatcards run quit INFO: @@ -347,12 +350,11 @@ launch in debug mode * Type 'help' for in-line help. * * * ************************************************************ -INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/Cards/me5_configuration.txt -INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo/input/mg5_configuration.txt -INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/Cards/me5_configuration.txt -Using default text editor "vi". Set another one in ./input/mg5_configuration.txt +INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/Cards/me5_configuration.txt +INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/mg5amcnlo/input/mg5_configuration.txt +INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/Cards/me5_configuration.txt Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt -No valid web browser found. Please set in ./input/mg5_configuration.txt +Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt treatcards param quit INFO: diff --git a/epochX/cudacpp/gq_ttq.mad/Cards/delphes_trigger.dat b/epochX/cudacpp/gq_ttq.mad/Cards/delphes_trigger.dat deleted file mode 100644 index 0aab0677aa..0000000000 --- a/epochX/cudacpp/gq_ttq.mad/Cards/delphes_trigger.dat +++ /dev/null @@ -1,20 +0,0 @@ -#TRIGGER CARD # DO NOT REMOVE THIS IS A TAG! - -# list of trigger algorithms -# trigger_name >> algorithm #comments -Inclusive electron >> ELEC1_PT: '29' -di-electron >> ELEC1_PT: '17' && ELEC2_PT: '17' -Inclusive Photon >> GAMMA1_PT: '80' -di-Photon >> GAMMA1_PT: '40' && GAMMA2_PT: '25' -Inclusive muon >> MUON1_PT: '19' -di-muon >> MUON1_PT: '7' && MUON2_PT: '7' -Taujet and ETmis >> TAU1_PT: '86' && ETMIS_PT: '65' -di-Taujets >> TAU1_PT: '59' && TAU2_PT: '59' -Jet and ETmis >> JET1_PT: '180' && ETMIS_PT: '123' -Taujet and electron >> TAU1_PT: '45' && ELEC1_PT: '19' -Taujet and muon >> TAU1_PT: '40' && ELEC1_PT: '15' -Inclusive b-jet >> Bjet1_PT: '237' -Inclusive 1 jet >> JET1_PT: '657' -Inclusive 3 jets >> JET1_PT: '247' && JET2_PT: '247' && JET3_PT: '247' -Inclusive 4 jets >> JET1_PT: '113' && JET2_PT: '113' && JET3_PT: '113' && JET4_PT: '113' - diff --git a/epochX/cudacpp/gq_ttq.mad/Cards/me5_configuration.txt b/epochX/cudacpp/gq_ttq.mad/Cards/me5_configuration.txt index cdeedc7863..22f81b5926 100644 --- a/epochX/cudacpp/gq_ttq.mad/Cards/me5_configuration.txt +++ b/epochX/cudacpp/gq_ttq.mad/Cards/me5_configuration.txt @@ -234,7 +234,7 @@ # pineappl = pineappl -#mg5_path = /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo +#mg5_path = /data/stephan/madgraph4gpu/MG5aMC/mg5amcnlo # MG5 MAIN DIRECTORY -#mg5_path = /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo +#mg5_path = /data/stephan/madgraph4gpu/MG5aMC/mg5amcnlo diff --git a/epochX/cudacpp/gq_ttq.mad/Cards/plot_card.dat b/epochX/cudacpp/gq_ttq.mad/Cards/plot_card.dat deleted file mode 100644 index 9abe1cc05e..0000000000 --- a/epochX/cudacpp/gq_ttq.mad/Cards/plot_card.dat +++ /dev/null @@ -1,203 +0,0 @@ -#************************************************************************** -# Card for MadAnalysis * -# * -# This file is used to set the classes and options for * -# the MadAnalysis program. * -# * -# * -# Some comments about the classes * -# 1. Plots are for classes of particles. * -# 2. Each particle is identified by its PDG code. * -# 3. Classes names are arbitrary (4 symbols max, no spaces allowed). * -# 4. Particles in the same class will be ordered with the 'ordering * -# function' in the file in_func.f. * -# 5. Classes can be added/edited/removed at will, and given a name * -# that will then appear in the plots. * -# 6. A particle can be put in one class only. Putting a particle in * -# two or more classes can lead to double counting of events. * -# 7. The class name mET is missing Energy and its name is reserved. * -# If used, it must be put last in the classes list below. * -# 8. If events contain particles not belonging to an existing class, * -# a new class will automatically be generated. * -# 9. For LHCO events the PDG code 21 is assigned to a jet (not * -# b-tagged), 5 to a b-tagged jet and 12 to missing ET. * -# * -# * -# Some comments about the cuts * -# 1. In the file kin_func.f the functions on which cuts can be applied * -# are given. * -# 2. The syntax is as follows. * -# etmin 1 3 30d0 * -# means that from the first class the Et of the first three particles * -# has to be greater than 30 GeV. * -# * -# etmissmin 20d0 * -# means that there must be at least 20 GeV of missing Et * -# * -# dRmin 2 1 4 3 3d0 * -# means that the distance between the first particle in the second * -# class and the first three particles in the fourth class has to be * -# greater than 3. * -# * -# ptmax 1 3 10d0 * -# ptmax 1 2 15d0 * -# means that the maximum pt of the third particle in the first class * -# has to smaller than 10 GeV, and the first two particles of this * -# class has to be smaller than 15 GeV * -# 3. The ordering of the particles within a class can be set with the * -# 'ordering function' in the file kin_func.f. * -# 4. For all the 'min' cuts, an event will be thrown away if the particle * -# does not exist. On the other hand, for all the 'max' cuts the cut * -# will be ignored if the particle does not exist * -# (Only dRij is an exception, for which it is the other way around) * -# * -# * -# * -# Some comments about the plotting options * -# 1. In the file kin_func.f the functions can be found that can be * -# plotted. (only for off-line usage) * -# 2. With the plotting options one can set the number of plots for each * -# of these functions. * -# 3. One has to specify for each variable which particles from which * -# class are used to set the plots. Syntax: * -# et 2 4 * -# means that the transverse energy of the first four particles in the * -# second class will be plotted. * -# mij 1 3 * -# mij 2 2 * -# means that for the invariant mass plots the first three particles * -# from the first class and the first two from the second class will be * -# used to plot the invariant mass of two particles. (10 plots) * -# 4. The ordering of the particles in a class can be set with the * -# 'ordering_function'. pt, e and et are valid functions. (For off-line * -# users X1, X2 and X3 can also be used, if defined in kin_func.f.) * -# 5. Max number of plots is 200. * -# * -# * -#************************************************************************** -# Put here your list of classes -#************************************************************************** -# Do NOT put spaces before class names! -# Begin Classes # This is TAG. Do not modify this line -jet 1 -1 2 -2 3 -3 4 -4 21 # Class number 1 -b 5 -5 # Class number 2 -mET 12 -12 14 -14 16 -16 1000022 # Missing ET class, name is reserved -# End Classes # This is TAG. Do not modify this line -#************************************************************************** -ordering_function pt # orders particles in classes according to their pt -normalization xsec # histogram normalization, xsec or number (e.g. 1) -#************************************************************************** -# Put here list of minimum pt for the classes -#************************************************************************** -# Begin Minpts # This is TAG. Do not modify this line -#1 30 -#2 40 -#3 10 -# End Minpts # This is TAG. Do not modify this line -#************************************************************************** -# Cuts on plotted events -#************************************************************************** -# Modify the cuts and remove the pounds/hashes to apply those cuts -# Do NOT put spaces at the beginning of the following lines! -# Begin Cuts # This is TAG. Do not modify this line -#etmin 2 2 40d0 -#etmin 2 1 80d0 -#etmin 1 3 20d0 -#etmax 2 1 200d0 -#ptmin 3 1 0d0 -#etmissmin 20d0 -#etmissmax 80d0 -#etamax 1 1 1d0 -#etamax 2 1 2d0 -#etamin 2 2 1.5d0 -#etamin 2 1 2d0 -#mijmax 2 1 2 2 200d0 -#mijmin 2 1 2 2 100d0 -#X1min 2 1 40d0 -#X1max 2 2 50d0 -#dRijmin 2 1 2 2 0.7d0 -#dRijmax 1 3 2 2 0.7d0 -#XY1min 2 2 2 2 20d0 -#XYZA2max 2 2 2 2 4 1 5 1 40d0 -# End Cuts # This is TAG. Do not modify this line -#************************************************************************** -# Put here the required plots -#************************************************************************** -# Do NOT put spaces at the beginning of the following lines! -# Begin PlotDefs # This is TAG. Do not modify this line -pt 1 4 # plot pt for the first four particles in class 1 -pt 2 4 # plot pt for the first four particles in class 2 -pt 3 4 # plot pt for the first four particles in class 3 -pt 4 4 # plot pt for the first four particles in class 4 -pt 5 4 # etc. -pt 6 4 -pt 7 4 -#e 2 2 -y 1 4 # plot rapidity for the first four particles in class 1 -y 2 4 -y 3 4 -y 4 4 -y 5 4 -y 6 4 -y 7 4 -#eta 2 2 # plot pseudo-rapidity for the first two part in the 2nd class -#mom 4 1 -#costh 5 1 -#phi 2 2 -#delta_eta 2 2 -#delta_eta 4 1 -mij 1 4 # use the first four particles in the 1st class to plot inv. mass -mij 2 2 # use the first two particles from the second class as well -mij 3 1 # etc. -mij 4 1 -mij 5 1 -mij 6 1 -mij 7 1 -#cosij 1 2 -#cosij 2 2 -#cosij 3 1 -#cosij 4 1 -dRij 1 4 -dRij 2 2 -dRij 3 1 -dRij 4 1 -dRij 5 1 -dRij 6 1 -dRij 7 1 -#delta_phi 2 2 -#delta_phi 4 1 -#delta_phi 5 1 -#X1 2 2 # plot X1 (defined in kin_func.f) -#XYZA1 2 2 -#XYZA1 4 1 -#XYZA1 5 1 -# End PlotDefs # This is TAG. Do not modify this line -#************************************************************************** -#************************************************************************** -# Put here the plot ranges -#************************************************************************** -# Do NOT put spaces at the beginning of the following lines! -# Begin PlotRange # This is TAG. Do not modify this line -pt 10 0 500 # bin size, min value, max value -et 10 0 500 # bin size, min value, max value -etmiss 10 0 500 # bin size, min value, max value -ht 20 0 1500 -y 0.2 -5 5 # etc. -mij 20 0 1500 -dRij 0.1 0 5 -#delta_phi 0.1 0 3.1 -#X1 1 0 100 -#XYZA1 1 0 100 -# End PlotRange # This is TAG. Do not modify this line -#************************************************************************** -#************************************************************************** -# Output for plots -#************************************************************************** -# Do NOT put spaces at the beginning of the following lines! -# Begin PlotOutput # This is TAG. Do not modify this line -output topdrawer # set to topdrawer or gnuplot -plot_decayed no # plot (and cut) dec. res.? (Only for LHE events) -# End PlotOutput # This is TAG. Do not modify this line -#************************************************************************** -# -# diff --git a/epochX/cudacpp/gq_ttq.mad/Source/DHELAS/aloha_file.inc b/epochX/cudacpp/gq_ttq.mad/Source/DHELAS/aloha_file.inc index 17f6a8b497..dccc9da9d2 100644 --- a/epochX/cudacpp/gq_ttq.mad/Source/DHELAS/aloha_file.inc +++ b/epochX/cudacpp/gq_ttq.mad/Source/DHELAS/aloha_file.inc @@ -1 +1 @@ -ALOHARoutine = FFV1_0.o FFV1_1.o FFV1_2.o FFV1P0_3.o VVV1_0.o +ALOHARoutine = FFV1P0_3.o FFV1_0.o FFV1_1.o FFV1_2.o VVV1_0.o diff --git a/epochX/cudacpp/gq_ttq.mad/Source/make_opts b/epochX/cudacpp/gq_ttq.mad/Source/make_opts index e4b87ee6ad..435bed0dc7 100644 --- a/epochX/cudacpp/gq_ttq.mad/Source/make_opts +++ b/epochX/cudacpp/gq_ttq.mad/Source/make_opts @@ -1,7 +1,7 @@ DEFAULT_CPP_COMPILER=g++ DEFAULT_F2PY_COMPILER=f2py3 DEFAULT_F_COMPILER=gfortran -GLOBAL_FLAG=-O3 -ffast-math -fbounds-check +GLOBAL_FLAG=-O3 -ffast-math MACFLAG= MG5AMC_VERSION=SpecifiedByMG5aMCAtRunTime PYTHIA8_PATH=NotInstalled @@ -13,31 +13,53 @@ BIASLIBDIR=../../../lib/ BIASLIBRARY=libbias.$(libext) # Rest of the makefile -ifeq ($(origin FFLAGS),undefined) -FFLAGS= -w -fPIC -#FFLAGS+= -g -fbounds-check -ffpe-trap=invalid,zero,overflow,underflow,denormal -Wall -fimplicit-none -endif -FFLAGS += $(GLOBAL_FLAG) +#=== Detect O/S and architecture (assuming uname is available, https://en.wikipedia.org/wiki/Uname) + +# Detect O/S kernel (Linux, Darwin...) +UNAME_S := $(shell uname -s) + +# Detect architecture (x86_64, ppc64le...) +UNAME_P := $(shell uname -p) + +#------------------------------------------------------------------------------- # REMOVE MACFLAG IF NOT ON MAC OR FOR F2PY -UNAME := $(shell uname -s) ifdef f2pymode MACFLAG= else -ifneq ($(UNAME), Darwin) +ifneq ($(UNAME_S), Darwin) MACFLAG= endif endif +############################################################ +# Default compiler flags +# To change optimisation level, override these as follows: +# make CXXFLAGS="-O0 -g" +# or export them as environment variables +# For debugging Fortran, one could e.g. use: +# FCFLAGS="-g -fbounds-check -ffpe-trap=invalid,zero,overflow,underflow,denormal -Wall -fimplicit-none" +############################################################ +FCFLAGS ?= $(GLOBAL_FLAG) -fbounds-check +CXXFLAGS ?= $(GLOBAL_FLAG) -DNDEBUG +NVCCFLAGS ?= $(GLOBAL_FLAG) -DNDEBUG -use_fast_math -lineinfo +LDFLAGS ?= $(STDLIB) -ifeq ($(origin CXXFLAGS),undefined) -CXXFLAGS= -O $(STDLIB_FLAG) $(MACFLAG) +ifneq ($(FFLAGS),) +# Madgraph used to use FFLAGS, so the user probably tries to change the flags specifically for madgraph: +FCFLAGS = $(FFLAGS) endif -ifeq ($(origin CFLAGS),undefined) -CFLAGS= -O $(STDLIB_FLAG) $(MACFLAG) +# Madgraph-specific flags: +WARNFLAGS = -Wall -Wshadow -Wextra +ifeq (,$(findstring -std=,$(CXXFLAGS))) +CXXSTANDARD= -std=c++17 endif +MG_FCFLAGS += -fPIC -w +MG_CXXFLAGS += -fPIC $(CXXSTANDARD) $(WARNFLAGS) $(MACFLAG) +MG_NVCCFLAGS += -fPIC $(CXXSTANDARD) --forward-unknown-to-host-compiler $(WARNFLAGS) +MG_LDFLAGS += $(MACFLAG) # Set FC unless it's defined by an environment variable ifeq ($(origin FC),default) @@ -49,45 +71,40 @@ endif # Increase the number of allowed charcters in a Fortran line ifeq ($(FC), ftn) -FFLAGS+= -extend-source # for ifort type of compiler +MG_FCFLAGS += -extend-source # for ifort type of compiler else VERS="$(shell $(FC) --version | grep ifort -i)" ifeq ($(VERS), "") -FFLAGS+= -ffixed-line-length-132 +MG_FCFLAGS += -ffixed-line-length-132 else -FFLAGS+= -extend-source # for ifort type of compiler +MG_FCFLAGS += -extend-source # for ifort type of compiler endif endif -UNAME := $(shell uname -s) -ifeq ($(origin LDFLAGS), undefined) -LDFLAGS=$(STDLIB) $(MACFLAG) -endif - # Options: dynamic, lhapdf # Option dynamic -ifeq ($(UNAME), Darwin) +ifeq ($(UNAME_S), Darwin) dylibext=dylib else dylibext=so endif ifdef dynamic -ifeq ($(UNAME), Darwin) +ifeq ($(UNAME_S), Darwin) libext=dylib -FFLAGS+= -fno-common -LDFLAGS += -bundle +MG_FCFLAGS += -fno-common +MG_LDFLAGS += -bundle define CREATELIB $(FC) -dynamiclib -undefined dynamic_lookup -o $(1) $(2) endef else libext=so -FFLAGS+= -fPIC -LDFLAGS += -shared +MG_FCFLAGS += -fPIC +MG_LDFLAGS += -shared define CREATELIB -$(FC) $(FFLAGS) $(LDFLAGS) -o $(1) $(2) +$(FC) $(MG_FCFLAGS) $(FCFLAGS) $(MG_LDFLAGS) $(LDFLAGS) -o $(1) $(2) endef endif else @@ -101,17 +118,9 @@ endif # Option lhapdf ifneq ($(lhapdf),) -CXXFLAGS += $(shell $(lhapdf) --cppflags) +MG_CXXFLAGS += $(shell $(lhapdf) --cppflags) alfas_functions=alfas_functions_lhapdf llhapdf+= $(shell $(lhapdf) --cflags --libs) -lLHAPDF -# check if we need to activate c++11 (for lhapdf6.2) -ifeq ($(origin CXX),default) -ifeq ($lhapdfversion$lhapdfsubversion,62) -CXX=$(DEFAULT_CPP_COMPILER) -std=c++11 -else -CXX=$(DEFAULT_CPP_COMPILER) -endif -endif else alfas_functions=alfas_functions llhapdf= @@ -120,4 +129,207 @@ endif # Helper function to check MG5 version define CHECK_MG5AMC_VERSION python -c 'import re; from distutils.version import StrictVersion; print StrictVersion("$(MG5AMC_VERSION)") >= StrictVersion("$(1)") if re.match("^[\d\.]+$$","$(MG5AMC_VERSION)") else True;' -endef \ No newline at end of file +endef + +#------------------------------------------------------------------------------- + +# Set special cases for non-gcc/clang builds +# AVX below gets overridden from outside in architecture-specific builds +AVX ?= none +# [NB MGONGPU_PVW512 is needed because "-mprefer-vector-width=256" is not exposed in a macro] +# [See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96476] +$(info AVX=$(AVX)) +ifeq ($(UNAME_P),arm) + ifeq ($(AVX),sse4) + override AVXFLAGS = -D__SSE4_2__ # ARM NEON with 128 width (Q/quadword registers) + endif +else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 + ifeq ($(AVX),none) + override AVXFLAGS = -mno-sse3 # no SIMD + else ifeq ($(AVX),sse4) + override AVXFLAGS = -mno-avx # SSE4.2 with 128 width (xmm registers) + else ifeq ($(AVX),avx2) + override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] + else ifeq ($(AVX),512y) + override AVXFLAGS = -march=skylake -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] + else ifeq ($(AVX),512z) + override AVXFLAGS = -march=skylake -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) + else + $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) + endif +endif + +# For the moment, use AVXFLAGS everywhere: eventually, use them only in encapsulated implementations? +MG_CXXFLAGS+= $(AVXFLAGS) + +#------------------------------------------------------------------------------- + +#=== Configure the CUDA compiler if available + +# If CXX is not a single word (example "clang++ --gcc-toolchain...") then disable CUDA builds (issue #505) +# This is because it is impossible to pass this to "CUFLAGS += -ccbin " below +ifneq ($(words $(subst ccache ,,$(CXX))),1) # allow at most "CXX=ccache " from outside + $(warning CUDA builds are not supported for multi-word CXX "$(CXX)") + override CUDA_HOME=disabled +endif + +# If CUDA_HOME is not set, try to set it from the location of nvcc +ifndef CUDA_HOME + CUDA_HOME = $(patsubst %bin/nvcc,%,$(shell which nvcc 2>/dev/null)) + $(info CUDA_HOME="$(CUDA_HOME)") +endif + +# Set NVCC as $(CUDA_HOME)/bin/nvcc if it exists +ifneq ($(wildcard $(CUDA_HOME)/bin/nvcc),) + NVCC = $(CUDA_HOME)/bin/nvcc + USE_NVTX ?=-DUSE_NVTX + # See https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html + # See https://arnon.dk/matching-sm-architectures-arch-and-gencode-for-various-nvidia-cards/ + # Default: use compute capability 70 (Volta architecture), and embed PTX to support later architectures, too. + # Set MADGRAPH_CUDA_ARCHITECTURE to the desired value to change the default. + # Build for multiple architectures using a space-separated list, e.g. MADGRAPH_CUDA_ARCHITECTURE="70 80" + MADGRAPH_CUDA_ARCHITECTURE ?= 70 + # Generate PTX for the first architecture: + CUARCHFLAGS := --generate-code arch=compute_$(firstword $(MADGRAPH_CUDA_ARCHITECTURE)),code=compute_$(firstword $(MADGRAPH_CUDA_ARCHITECTURE)) + # Generate device code for all architectures: + CUARCHFLAGS += $(foreach arch,$(MADGRAPH_CUDA_ARCHITECTURE), --generate-code arch=compute_$(arch),code=sm_$(arch)) + + CUINC = -I$(CUDA_HOME)/include/ + CURANDLIBFLAGS = -L$(CUDA_HOME)/lib64/ -lcurand # NB: -lcuda is not needed here! + MG_LDFLAGS += $(CURANDLIBFLAGS) + MG_NVCCFLAGS += $(CUINC) $(USE_NVTX) $(CUARCHFLAGS) + +else ifeq ($(AVX),cuda) + $(error nvcc is not visible in PATH. Either add it to PATH or export CUDA_HOME to compile with cuda) + ifeq ($(AVX),cuda) + $(error Cannot compile for cuda without NVCC) + endif +endif + +# Set the host C++ compiler for nvcc via "-ccbin " +# (NB issue #505: this must be a single word, "clang++ --gcc-toolchain..." is not supported) +MG_NVCCFLAGS += -ccbin $(shell which $(subst ccache ,,$(CXX))) + +# Allow newer (unsupported) C++ compilers with older versions of CUDA if ALLOW_UNSUPPORTED_COMPILER_IN_CUDA is set (#504) +ifneq ($(origin ALLOW_UNSUPPORTED_COMPILER_IN_CUDA),undefined) +MG_NVCCFLAGS += -allow-unsupported-compiler +endif + +#------------------------------------------------------------------------------- + +#=== Configure ccache for C++ and CUDA builds + +# Enable ccache if USECCACHE=1 +ifeq ($(USECCACHE)$(shell echo $(CXX) | grep ccache),1) + override CXX:=ccache $(CXX) +endif + +ifneq ($(NVCC),) + ifeq ($(USECCACHE)$(shell echo $(NVCC) | grep ccache),1) + override NVCC:=ccache $(NVCC) + endif +endif + +#------------------------------------------------------------------------------- + +#=== Configure PowerPC-specific compiler flags for C++ and CUDA + +# PowerPC-specific CXX / CUDA compiler flags (being reviewed) +ifeq ($(UNAME_P),ppc64le) + MG_CXXFLAGS+= -mcpu=power9 -mtune=power9 # gains ~2-3% both for none and sse4 + MG_NVCCFLAGS+= -Xcompiler -mno-float128 + + ifeq ($(AVX),sse4) + override AVXFLAGS = -D__SSE4_2__ # Power9 VSX with 128 width (VSR registers) + endif +endif + +#------------------------------------------------------------------------------- +#=== Apple-specific compiler/linker options + +# Add -std=c++17 explicitly to avoid build errors on macOS +# Add -mmacosx-version-min=11.3 to avoid "ld: warning: object file was built for newer macOS version than being linked" +ifneq ($(shell $(CXX) --version | egrep '^Apple clang'),) +MG_CXXFLAGS += -std=c++17 -mmacosx-version-min=11.3 +endif + +ifeq ($(UNAME_S),Darwin) +STDLIB = -lc++ # avoid 'Undefined symbols' for chrono::steady_clock on macOS (checked with otool -L libmg5amc_gg_ttx_cpp.so) +MG_LDFLAGS += -mmacosx-version-min=11.3 # avoid "ld: warning: object file was built for newer macOS version than being linked" +else +MG_LDFLAGS += -Xlinker --no-relax # avoid 'failed to convert GOTPCREL relocation' error #458 (not supported on macOS) +endif + +#------------------------------------------------------------------------------- + +#=== C++/CUDA-specific flags for floating-point types and random generators to use + +# Set the default FPTYPE (floating point type) choice +FPTYPE ?= m + +# Set the default HELINL (inline helicities?) choice +HELINL ?= 0 + +# Set the default HRDCOD (hardcode cIPD physics parameters?) choice +HRDCOD ?= 0 + +# Set the default RNDGEN (random number generator) choice +ifeq ($(NVCC),) + RNDGEN ?= hasNoCurand +else + RNDGEN ?= hasCurand +endif + +# Export AVX, FPTYPE, HELINL, HRDCOD, RNDGEN, OMPFLAGS so sub-makes don't go back to the defaults +export AVX +export AVXFLAGS +export FPTYPE +export HELINL +export HRDCOD +export RNDGEN + +#=== Set the CUDA/C++ compiler flags appropriate to user-defined choices of AVX, FPTYPE, HELINL, HRDCOD, RNDGEN + +# Set the build flags appropriate to each FPTYPE choice (example: "make FPTYPE=f") +# $(info FPTYPE=$(FPTYPE)) +ifeq ($(FPTYPE),d) + COMMONFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_DOUBLE +else ifeq ($(FPTYPE),f) + COMMONFLAGS += -DMGONGPU_FPTYPE_FLOAT -DMGONGPU_FPTYPE2_FLOAT +else ifeq ($(FPTYPE),m) + COMMONFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_FLOAT +else + $(error Unknown FPTYPE='$(FPTYPE)': only 'd', 'f' and 'm' are supported) +endif + +# Set the build flags appropriate to each HELINL choice (example: "make HELINL=1") +# $(info HELINL=$(HELINL)) +ifeq ($(HELINL),1) + COMMONFLAGS += -DMGONGPU_INLINE_HELAMPS +else ifneq ($(HELINL),0) + $(error Unknown HELINL='$(HELINL)': only '0' and '1' are supported) +endif + +# Set the build flags appropriate to each HRDCOD choice (example: "make HRDCOD=1") +# $(info HRDCOD=$(HRDCOD)) +ifeq ($(HRDCOD),1) + COMMONFLAGS += -DMGONGPU_HARDCODE_PARAM +else ifneq ($(HRDCOD),0) + $(error Unknown HRDCOD='$(HRDCOD)': only '0' and '1' are supported) +endif + +# Set the build flags appropriate to each RNDGEN choice (example: "make RNDGEN=hasNoCurand") +$(info RNDGEN=$(RNDGEN)) +ifeq ($(RNDGEN),hasNoCurand) + override CXXFLAGSCURAND = -DMGONGPU_HAS_NO_CURAND + override CURANDLIBFLAGS = +else ifeq ($(RNDGEN),hasCurand) + CXXFLAGSCURAND = $(CUINC) +else + $(error Unknown RNDGEN='$(RNDGEN)': only 'hasCurand' and 'hasNoCurand' are supported) +endif + +MG_CXXFLAGS += $(COMMONFLAGS) +MG_NVCCFLAGS += $(COMMONFLAGS) + +#------------------------------------------------------------------------------- diff --git a/epochX/cudacpp/gq_ttq.mad/Source/makefile b/epochX/cudacpp/gq_ttq.mad/Source/makefile index 00c73099a0..407b1b753e 100644 --- a/epochX/cudacpp/gq_ttq.mad/Source/makefile +++ b/epochX/cudacpp/gq_ttq.mad/Source/makefile @@ -10,8 +10,8 @@ include make_opts # Source files -PROCESS= hfill.o matrix.o myamp.o -DSAMPLE = dsample.o ranmar.o DiscreteSampler.o StringCast.o +PROCESS = hfill.o matrix.o myamp.o +DSAMPLE = dsample.o ranmar.o DiscreteSampler.o StringCast.o HBOOK = hfill.o hcurve.o hbook1.o hbook2.o GENERIC = $(alfas_functions).o transpole.o invarients.o hfill.o pawgraphs.o ran1.o \ rw_events.o rw_routines.o kin_functions.o open_file.o basecode.o setrun.o \ @@ -22,7 +22,7 @@ GENSUDGRID = gensudgrid.o is-sud.o setrun_gen.o rw_routines.o open_file.o # Locally compiled libraries -LIBRARIES=$(LIBDIR)libdsample.$(libext) $(LIBDIR)libgeneric.$(libext) +LIBRARIES=$(LIBDIR)libdsample.$(libext) $(LIBDIR)libgeneric.$(libext) # Binaries @@ -32,6 +32,9 @@ BINARIES = $(BINDIR)gen_ximprove $(BINDIR)gensudgrid $(BINDIR)combine_runs all: $(LIBRARIES) $(LIBDIR)libdhelas.$(libext) $(LIBDIR)libpdf.$(libext) $(LIBDIR)libgammaUPC.$(libext) $(LIBDIR)libmodel.$(libext) $(LIBDIR)libcernlib.$(libext) $(LIBDIR)libbias.$(libext) +%.o: %.f *.inc + $(FC) -I. $(MG_FCFLAGS) $(FCFLAGS) -c $< -o $@ + # Libraries $(LIBDIR)libdsample.$(libext): $(DSAMPLE) @@ -39,36 +42,35 @@ $(LIBDIR)libdsample.$(libext): $(DSAMPLE) $(LIBDIR)libgeneric.$(libext): $(GENERIC) $(call CREATELIB, $@, $^) $(LIBDIR)libdhelas.$(libext): DHELAS - cd DHELAS; make; cd .. + $(MAKE) -C $< FFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" FCFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" $(LIBDIR)libpdf.$(libext): PDF make_opts - cd PDF; make; cd .. + $(MAKE) -C $< FFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" FCFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" ifneq (,$(filter edff chff, $(pdlabel1) $(pdlabel2))) $(LIBDIR)libgammaUPC.$(libext): PDF/gammaUPC - cd PDF/gammaUPC; make ; cd ../../ + $(MAKE) -C $< FFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" FCFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" else $(LIBDIR)libgammaUPC.$(libext): PDF/gammaUPC - cd PDF/gammaUPC; make -f makefile_dummy; cd ../../ -endif + $(MAKE) -C $< -f makefile_dummy FFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" FCFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" +endif $(LIBDIR)libcernlib.$(libext): CERNLIB - cd CERNLIB; make; cd .. + $(MAKE) -C $< FFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" FCFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" # The bias library is here the dummy by default; compilation of other ones specified in the run_card will be done by MG5aMC directly. $(LIBDIR)libbias.$(libext): BIAS/dummy - cd BIAS/dummy; make; cd ../../ + $(MAKE) -C $< FFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" FCFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" $(LIBDIR)libmodel.$(libext): MODEL param_card.inc - cd MODEL; make + $(MAKE) -C $< FFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" FCFLAGS="$(MG_FCFLAGS) $(FCFLAGS)" param_card.inc: ../Cards/param_card.dat ../bin/madevent treatcards param + touch $@ # madevent doesn't update the time stamp if there's nothing to do -$(BINDIR)gen_ximprove: gen_ximprove.o ranmar.o rw_routines.o open_file.o - $(FC) $(LDFLAGS) -o $@ $^ -#$(BINDIR)combine_events: $(COMBINE) $(LIBDIR)libmodel.$(libext) $(LIBDIR)libpdf.$(libext) $(LIBDIR)libgammaUPC.$(libext) run_card.inc $(LIBDIR)libbias.$(libext) -# $(FC) -o $@ $(COMBINE) -L$(LIBDIR) -lmodel -lpdf -lgammaUPC $(llhapdf) $(LDFLAGS) -lbias +$(BINDIR)gen_ximprove: gen_ximprove.o ranmar.o rw_routines.o open_file.o + $(FC) $(MG_LDFLAGS) $(LDFLAGS) -o $@ $^ $(BINDIR)gensudgrid: $(GENSUDGRID) $(LIBDIR)libpdf.$(libext) $(LIBDIR)libgammaUPC.$(libext) $(LIBDIR)libcernlib.$(libext) - $(FC) -o $@ $(GENSUDGRID) -L$(LIBDIR) -lmodel -lpdf -lgammaUPC -lcernlib $(llhapdf) $(LDFLAGS) + $(FC) -o $@ $(GENSUDGRID) -L$(LIBDIR) -lmodel -lpdf -lgammaUPC -lcernlib $(llhapdf) $(MG_LDFLAGS) $(LDFLAGS) # Dependencies @@ -85,6 +87,7 @@ rw_events.o: rw_events.f run_config.inc run_card.inc: ../Cards/run_card.dat ../bin/madevent treatcards run + touch $@ # madevent doesn't update the time stamp if there's nothing to do clean4pdf: rm -f ../lib/libpdf.$(libext) @@ -120,7 +123,7 @@ $(LIBDIR)libiregi.a: $(IREGIDIR) cd $(IREGIDIR); make ln -sf ../Source/$(IREGIDIR)libiregi.a $(LIBDIR)libiregi.a -cleanSource: +clean: $(RM) *.o $(LIBRARIES) $(BINARIES) cd PDF; make clean; cd .. cd PDF/gammaUPC; make clean; cd ../../ @@ -132,11 +135,3 @@ cleanSource: cd BIAS/ptj_bias; make clean; cd ../.. if [ -d $(CUTTOOLSDIR) ]; then cd $(CUTTOOLSDIR); make clean; cd ..; fi if [ -d $(IREGIDIR) ]; then cd $(IREGIDIR); make clean; cd ..; fi - -clean: cleanSource - for i in `ls -d ../SubProcesses/P*`; do cd $$i; make clean; cd -; done; - -cleanavx: - for i in `ls -d ../SubProcesses/P*`; do cd $$i; make cleanavxs; cd -; done; -cleanall: cleanSource # THIS IS THE ONE - for i in `ls -d ../SubProcesses/P*`; do cd $$i; make cleanavxs; cd -; done; diff --git a/epochX/cudacpp/gq_ttq.mad/SubProcesses/Bridge.h b/epochX/cudacpp/gq_ttq.mad/SubProcesses/Bridge.h index bf8b5e024d..c263f39a62 100644 --- a/epochX/cudacpp/gq_ttq.mad/SubProcesses/Bridge.h +++ b/epochX/cudacpp/gq_ttq.mad/SubProcesses/Bridge.h @@ -236,7 +236,7 @@ namespace mg5amcCpu #ifdef __CUDACC__ if( ( m_nevt < s_gputhreadsmin ) || ( m_nevt % s_gputhreadsmin != 0 ) ) throw std::runtime_error( "Bridge constructor: nevt should be a multiple of " + std::to_string( s_gputhreadsmin ) ); - while( m_nevt != m_gpublocks * m_gputhreads ) + while( m_nevt != static_cast( m_gpublocks * m_gputhreads ) ) { m_gputhreads /= 2; if( m_gputhreads < s_gputhreadsmin ) @@ -266,7 +266,7 @@ namespace mg5amcCpu template void Bridge::set_gpugrid( const int gpublocks, const int gputhreads ) { - if( m_nevt != gpublocks * gputhreads ) + if( m_nevt != static_cast( gpublocks * gputhreads ) ) throw std::runtime_error( "Bridge: gpublocks*gputhreads must equal m_nevt in set_gpugrid" ); m_gpublocks = gpublocks; m_gputhreads = gputhreads; diff --git a/epochX/cudacpp/gq_ttq.mad/SubProcesses/MadgraphTest.h b/epochX/cudacpp/gq_ttq.mad/SubProcesses/MadgraphTest.h index ef40624c88..b0f2250c25 100644 --- a/epochX/cudacpp/gq_ttq.mad/SubProcesses/MadgraphTest.h +++ b/epochX/cudacpp/gq_ttq.mad/SubProcesses/MadgraphTest.h @@ -199,10 +199,6 @@ class MadgraphTest : public testing::TestWithParam } }; -// Since we link both the CPU-only and GPU tests into the same executable, we prevent -// a multiply defined symbol by only compiling this in the non-CUDA phase: -#ifndef __CUDACC__ - /// Compare momenta and matrix elements. /// This uses an implementation of TestDriverBase to run a madgraph workflow, /// and compares momenta and matrix elements with a reference file. @@ -307,6 +303,4 @@ TEST_P( MadgraphTest, CompareMomentaAndME ) } } -#endif // __CUDACC__ - #endif /* MADGRAPHTEST_H_ */ diff --git a/epochX/cudacpp/gq_ttq.mad/SubProcesses/MatrixElementKernels.cc b/epochX/cudacpp/gq_ttq.mad/SubProcesses/MatrixElementKernels.cc index 74b5239ebf..2d6f27cd5d 100644 --- a/epochX/cudacpp/gq_ttq.mad/SubProcesses/MatrixElementKernels.cc +++ b/epochX/cudacpp/gq_ttq.mad/SubProcesses/MatrixElementKernels.cc @@ -196,6 +196,9 @@ namespace mg5amcGpu void MatrixElementKernelDevice::setGrid( const int gpublocks, const int gputhreads ) { + m_gpublocks = gpublocks; + m_gputhreads = gputhreads; + if( m_gpublocks == 0 ) throw std::runtime_error( "MatrixElementKernelDevice: gpublocks must be > 0 in setGrid" ); if( m_gputhreads == 0 ) throw std::runtime_error( "MatrixElementKernelDevice: gputhreads must be > 0 in setGrid" ); if( this->nevt() != m_gpublocks * m_gputhreads ) throw std::runtime_error( "MatrixElementKernelDevice: nevt mismatch in setGrid" ); diff --git a/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gu_ttxu/check_sa.cc b/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gu_ttxu/check_sa.cc index 3fbf0ffbee..07b7304b17 100644 --- a/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gu_ttxu/check_sa.cc +++ b/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gu_ttxu/check_sa.cc @@ -81,7 +81,7 @@ namespace mg5amcGpu namespace mg5amcCpu #endif { - inline void FPEhandler( int sig ) + inline void FPEhandler( int ) { #ifdef __CUDACC__ std::cerr << "Floating Point Exception (GPU)" << std::endl; diff --git a/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gu_ttxu/counters.cc b/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gu_ttxu/counters.cc index 3bbdec9387..cf875e8be4 100644 --- a/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gu_ttxu/counters.cc +++ b/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gu_ttxu/counters.cc @@ -32,6 +32,8 @@ extern "C" case +0: return "CudaCpp"; break; default: assert( false ); break; } + + return 0; } static mgOnGpu::Timer program_timer; diff --git a/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gux_ttxux/check_sa.cc b/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gux_ttxux/check_sa.cc index 3fbf0ffbee..07b7304b17 100644 --- a/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gux_ttxux/check_sa.cc +++ b/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gux_ttxux/check_sa.cc @@ -81,7 +81,7 @@ namespace mg5amcGpu namespace mg5amcCpu #endif { - inline void FPEhandler( int sig ) + inline void FPEhandler( int ) { #ifdef __CUDACC__ std::cerr << "Floating Point Exception (GPU)" << std::endl; diff --git a/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gux_ttxux/counters.cc b/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gux_ttxux/counters.cc index 3bbdec9387..cf875e8be4 100644 --- a/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gux_ttxux/counters.cc +++ b/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gux_ttxux/counters.cc @@ -32,6 +32,8 @@ extern "C" case +0: return "CudaCpp"; break; default: assert( false ); break; } + + return 0; } static mgOnGpu::Timer program_timer; diff --git a/epochX/cudacpp/gq_ttq.mad/SubProcesses/cudacpp.mk b/epochX/cudacpp/gq_ttq.mad/SubProcesses/cudacpp.mk index 509307506b..a522ddb335 100644 --- a/epochX/cudacpp/gq_ttq.mad/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/gq_ttq.mad/SubProcesses/cudacpp.mk @@ -1,56 +1,41 @@ # Copyright (C) 2020-2023 CERN and UCLouvain. # Licensed under the GNU Lesser General Public License (version 3 or later). # Created by: S. Roiser (Feb 2020) for the MG5aMC CUDACPP plugin. -# Further modified by: O. Mattelaer, S. Roiser, A. Valassi (2020-2023) for the MG5aMC CUDACPP plugin. - -#=== Determine the name of this makefile (https://ftp.gnu.org/old-gnu/Manuals/make-3.80/html_node/make_17.html) -#=== NB: use ':=' to ensure that the value of CUDACPP_MAKEFILE is not modified further down after including make_opts -#=== NB: use 'override' to ensure that the value can not be modified from the outside -override CUDACPP_MAKEFILE := $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)) -###$(info CUDACPP_MAKEFILE='$(CUDACPP_MAKEFILE)') - -#=== NB: different names (e.g. cudacpp.mk and cudacpp_src.mk) are used in the Subprocess and src directories -override CUDACPP_SRC_MAKEFILE = cudacpp_src.mk - -#------------------------------------------------------------------------------- - -#=== Use bash in the Makefile (https://www.gnu.org/software/make/manual/html_node/Choosing-the-Shell.html) - -SHELL := /bin/bash - -#------------------------------------------------------------------------------- - -#=== Detect O/S and architecture (assuming uname is available, https://en.wikipedia.org/wiki/Uname) - -# Detect O/S kernel (Linux, Darwin...) -UNAME_S := $(shell uname -s) -###$(info UNAME_S='$(UNAME_S)') - -# Detect architecture (x86_64, ppc64le...) -UNAME_P := $(shell uname -p) -###$(info UNAME_P='$(UNAME_P)') - -#------------------------------------------------------------------------------- - -#=== Include the common MG5aMC Makefile options - -# OM: this is crucial for MG5aMC flag consistency/documentation -# AV: temporarely comment this out because it breaks cudacpp builds -ifneq ($(wildcard ../../Source/make_opts),) -include ../../Source/make_opts -endif +# Further modified by: S. Hageboeck, J. Teig, O. Mattelaer, S. Roiser, A. Valassi (2020-2023) for the MG5aMC CUDACPP plugin. + +# This makefile extends the Fortran makefile called "makefile" + +CUDACPP_SRC_MAKEFILE = cudacpp_src.mk + +# Self-invocation with adapted flags: +cppnative: $(SOURCEDIR_GUARD) $(PROCESS) + $(MAKE) AVX=native AVXFLAGS="-march=native" cppbuild +cppnone: $(SOURCEDIR_GUARD) $(PROCESS) + $(MAKE) AVX=none AVXFLAGS= cppbuild +cppsse4: $(SOURCEDIR_GUARD) $(PROCESS) + $(MAKE) AVX=sse4 AVXFLAGS=-march=nehalem cppbuild +cppavx2: $(SOURCEDIR_GUARD) $(PROCESS) + $(MAKE) AVX=avx2 AVXFLAGS=-march=haswell cppbuild +cppavx512y: $(SOURCEDIR_GUARD) $(PROCESS) + $(MAKE) AVX=512y AVXFLAGS="-march=skylake-avx512 -mprefer-vector-width=256" cppbuild +cppavx512z: $(SOURCEDIR_GUARD) $(PROCESS) + $(MAKE) AVX=512z AVXFLAGS="-march=skylake-avx512 -DMGONGPU_PVW512" cppbuild +cuda: $(SOURCEDIR_GUARD) $(PROCESS) + $(MAKE) AVX=cuda cudabuild #------------------------------------------------------------------------------- #=== Configure common compiler flags for C++ and CUDA +# NB: The base flags are defined in the fortran "makefile" + +# Include directories +INCFLAGS = -I. -I../../src -INCFLAGS = -I. -OPTFLAGS = -O3 # this ends up in CUFLAGS too (should it?), cannot add -Ofast or -ffast-math here +MG_CXXFLAGS += $(INCFLAGS) +MG_NVCCFLAGS += $(INCFLAGS) # Dependency on src directory -MG5AMC_COMMONLIB = mg5amc_common -LIBFLAGS = -L$(LIBDIR) -l$(MG5AMC_COMMONLIB) -INCFLAGS += -I../../src +MG5AMC_COMMONLIB = mg5amc_common # Compiler-specific googletest build directory (#125 and #738) ifneq ($(shell $(CXX) --version | grep '^Intel(R) oneAPI DPC++/C++ Compiler'),) @@ -99,356 +84,42 @@ endif #------------------------------------------------------------------------------- -#=== Configure the C++ compiler - -CXXFLAGS = $(OPTFLAGS) -std=c++17 $(INCFLAGS) -Wall -Wshadow -Wextra -ifeq ($(shell $(CXX) --version | grep ^nvc++),) -CXXFLAGS += -ffast-math # see issue #117 -endif -###CXXFLAGS+= -Ofast # performance is not different from --fast-math -###CXXFLAGS+= -g # FOR DEBUGGING ONLY - -# Optionally add debug flags to display the full list of flags (eg on Darwin) -###CXXFLAGS+= -v - -# Note: AR, CXX and FC are implicitly defined if not set externally -# See https://www.gnu.org/software/make/manual/html_node/Implicit-Variables.html - -# Add -mmacosx-version-min=11.3 to avoid "ld: warning: object file was built for newer macOS version than being linked" -ifneq ($(shell $(CXX) --version | egrep '^Apple clang'),) -CXXFLAGS += -mmacosx-version-min=11.3 -endif - -#------------------------------------------------------------------------------- - -#=== Configure the CUDA compiler - -# If CXX is not a single word (example "clang++ --gcc-toolchain...") then disable CUDA builds (issue #505) -# This is because it is impossible to pass this to "CUFLAGS += -ccbin " below -ifneq ($(words $(subst ccache ,,$(CXX))),1) # allow at most "CXX=ccache " from outside - $(warning CUDA builds are not supported for multi-word CXX "$(CXX)") - override CUDA_HOME=disabled -endif - -# If CUDA_HOME is not set, try to set it from the location of nvcc -ifndef CUDA_HOME - CUDA_HOME = $(patsubst %bin/nvcc,%,$(shell which nvcc 2>/dev/null)) - $(warning CUDA_HOME was not set: using "$(CUDA_HOME)") -endif - -# Set NVCC as $(CUDA_HOME)/bin/nvcc if it exists -ifneq ($(wildcard $(CUDA_HOME)/bin/nvcc),) - NVCC = $(CUDA_HOME)/bin/nvcc - USE_NVTX ?=-DUSE_NVTX - # See https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html - # See https://arnon.dk/matching-sm-architectures-arch-and-gencode-for-various-nvidia-cards/ - # Default: use compute capability 70 for V100 (CERN lxbatch, CERN itscrd, Juwels Cluster). - # Embed device code for 70, and PTX for 70+. - # Export MADGRAPH_CUDA_ARCHITECTURE (comma-separated list) to use another value or list of values (see #533). - # Examples: use 60 for P100 (Piz Daint), 80 for A100 (Juwels Booster, NVidia raplab/Curiosity). - MADGRAPH_CUDA_ARCHITECTURE ?= 70 - ###CUARCHFLAGS = -gencode arch=compute_$(MADGRAPH_CUDA_ARCHITECTURE),code=compute_$(MADGRAPH_CUDA_ARCHITECTURE) -gencode arch=compute_$(MADGRAPH_CUDA_ARCHITECTURE),code=sm_$(MADGRAPH_CUDA_ARCHITECTURE) # Older implementation (AV): go back to this one for multi-GPU support #533 - ###CUARCHFLAGS = --gpu-architecture=compute_$(MADGRAPH_CUDA_ARCHITECTURE) --gpu-code=sm_$(MADGRAPH_CUDA_ARCHITECTURE),compute_$(MADGRAPH_CUDA_ARCHITECTURE) # Newer implementation (SH): cannot use this as-is for multi-GPU support #533 - comma:=, - CUARCHFLAGS = $(foreach arch,$(subst $(comma), ,$(MADGRAPH_CUDA_ARCHITECTURE)),-gencode arch=compute_$(arch),code=compute_$(arch) -gencode arch=compute_$(arch),code=sm_$(arch)) - CUINC = -I$(CUDA_HOME)/include/ - ifeq ($(RNDGEN),hasNoCurand) - CURANDLIBFLAGS= - else - CURANDLIBFLAGS = -L$(CUDA_HOME)/lib64/ -lcurand # NB: -lcuda is not needed here! - endif - CUOPTFLAGS = -lineinfo - CUFLAGS = $(foreach opt, $(OPTFLAGS), -Xcompiler $(opt)) $(CUOPTFLAGS) $(INCFLAGS) $(CUINC) $(USE_NVTX) $(CUARCHFLAGS) -use_fast_math - ###CUFLAGS += -Xcompiler -Wall -Xcompiler -Wextra -Xcompiler -Wshadow - ###NVCC_VERSION = $(shell $(NVCC) --version | grep 'Cuda compilation tools' | cut -d' ' -f5 | cut -d, -f1) - CUFLAGS += -std=c++17 # need CUDA >= 11.2 (see #333): this is enforced in mgOnGpuConfig.h - # Without -maxrregcount: baseline throughput: 6.5E8 (16384 32 12) up to 7.3E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 160 # improves throughput: 6.9E8 (16384 32 12) up to 7.7E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 128 # improves throughput: 7.3E8 (16384 32 12) up to 7.6E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 96 # degrades throughput: 4.1E8 (16384 32 12) up to 4.5E8 (65536 128 12) - ###CUFLAGS+= --maxrregcount 64 # degrades throughput: 1.7E8 (16384 32 12) flat at 1.7E8 (65536 128 12) -else ifneq ($(origin REQUIRE_CUDA),undefined) - # If REQUIRE_CUDA is set but no cuda is found, stop here (e.g. for CI tests on GPU #443) - $(error No cuda installation found (set CUDA_HOME or make nvcc visible in PATH)) -else - # No cuda. Switch cuda compilation off and go to common random numbers in C++ - $(warning CUDA_HOME is not set or is invalid: export CUDA_HOME to compile with cuda) - override NVCC= - override USE_NVTX= - override CUINC= - override CURANDLIBFLAGS= -endif -export NVCC -export CUFLAGS - -# Set the host C++ compiler for nvcc via "-ccbin " -# (NB issue #505: this must be a single word, "clang++ --gcc-toolchain..." is not supported) -CUFLAGS += -ccbin $(shell which $(subst ccache ,,$(CXX))) - -# Allow newer (unsupported) C++ compilers with older versions of CUDA if ALLOW_UNSUPPORTED_COMPILER_IN_CUDA is set (#504) -ifneq ($(origin ALLOW_UNSUPPORTED_COMPILER_IN_CUDA),undefined) -CUFLAGS += -allow-unsupported-compiler -endif - -#------------------------------------------------------------------------------- - -#=== Configure ccache for C++ and CUDA builds - -# Enable ccache if USECCACHE=1 -ifeq ($(USECCACHE)$(shell echo $(CXX) | grep ccache),1) - override CXX:=ccache $(CXX) -endif -#ifeq ($(USECCACHE)$(shell echo $(AR) | grep ccache),1) -# override AR:=ccache $(AR) -#endif -ifneq ($(NVCC),) - ifeq ($(USECCACHE)$(shell echo $(NVCC) | grep ccache),1) - override NVCC:=ccache $(NVCC) - endif -endif - -#------------------------------------------------------------------------------- - -#=== Configure PowerPC-specific compiler flags for C++ and CUDA - -# PowerPC-specific CXX compiler flags (being reviewed) -ifeq ($(UNAME_P),ppc64le) - CXXFLAGS+= -mcpu=power9 -mtune=power9 # gains ~2-3% both for none and sse4 - # Throughput references without the extra flags below: none=1.41-1.42E6, sse4=2.15-2.19E6 - ###CXXFLAGS+= -DNO_WARN_X86_INTRINSICS # no change - ###CXXFLAGS+= -fpeel-loops # no change - ###CXXFLAGS+= -funroll-loops # gains ~1% for none, loses ~1% for sse4 - ###CXXFLAGS+= -ftree-vectorize # no change - ###CXXFLAGS+= -flto # would increase to none=4.08-4.12E6, sse4=4.99-5.03E6! -else - ###CXXFLAGS+= -flto # also on Intel this would increase throughputs by a factor 2 to 4... - ######CXXFLAGS+= -fno-semantic-interposition # no benefit (neither alone, nor combined with -flto) -endif - -# PowerPC-specific CUDA compiler flags (to be reviewed!) -ifeq ($(UNAME_P),ppc64le) - CUFLAGS+= -Xcompiler -mno-float128 -endif - -#------------------------------------------------------------------------------- - #=== Configure defaults and check if user-defined choices exist for OMPFLAGS, AVX, FPTYPE, HELINL, HRDCOD, RNDGEN # Set the default OMPFLAGS choice -ifneq ($(shell $(CXX) --version | egrep '^Intel'),) -override OMPFLAGS = -fopenmp -###override OMPFLAGS = # disable OpenMP MT on Intel (was ok without nvcc but not ok with nvcc before #578) -else ifneq ($(shell $(CXX) --version | egrep '^(clang)'),) -override OMPFLAGS = -fopenmp -###override OMPFLAGS = # disable OpenMP MT on clang (was not ok without or with nvcc before #578) -###else ifneq ($(shell $(CXX) --version | egrep '^(Apple clang)'),) # AV for Mac (Apple clang compiler) -else ifeq ($(UNAME_S),Darwin) # OM for Mac (any compiler) +OMPFLAGS ?= -fopenmp +ifeq ($(UNAME_S),Darwin) # OM for Mac (any compiler) override OMPFLAGS = # AV disable OpenMP MT on Apple clang (builds fail in the CI #578) -###override OMPFLAGS = -fopenmp # OM reenable OpenMP MT on Apple clang? (AV Oct 2023: this still fails in the CI) -else -override OMPFLAGS = -fopenmp # enable OpenMP MT by default on all other platforms -###override OMPFLAGS = # disable OpenMP MT on all other platforms (default before #575) -endif - -# Set the default AVX (vectorization) choice -ifeq ($(AVX),) - ifeq ($(UNAME_P),ppc64le) - ###override AVX = none - override AVX = sse4 - else ifeq ($(UNAME_P),arm) - ###override AVX = none - override AVX = sse4 - else ifeq ($(wildcard /proc/cpuinfo),) - override AVX = none - $(warning Using AVX='$(AVX)' because host SIMD features cannot be read from /proc/cpuinfo) - else ifeq ($(shell grep -m1 -c avx512vl /proc/cpuinfo)$(shell $(CXX) --version | grep ^clang),1) - override AVX = 512y - ###$(info Using AVX='$(AVX)' as no user input exists) - else - override AVX = avx2 - ifneq ($(shell grep -m1 -c avx512vl /proc/cpuinfo),1) - $(warning Using AVX='$(AVX)' because host does not support avx512vl) - else - $(warning Using AVX='$(AVX)' because this is faster than avx512vl for clang) - endif - endif -else - ###$(info Using AVX='$(AVX)' according to user input) -endif - -# Set the default FPTYPE (floating point type) choice -ifeq ($(FPTYPE),) - override FPTYPE = d -endif - -# Set the default HELINL (inline helicities?) choice -ifeq ($(HELINL),) - override HELINL = 0 -endif - -# Set the default HRDCOD (hardcode cIPD physics parameters?) choice -ifeq ($(HRDCOD),) - override HRDCOD = 0 -endif - -# Set the default RNDGEN (random number generator) choice -ifeq ($(RNDGEN),) - ifeq ($(NVCC),) - override RNDGEN = hasNoCurand - else ifeq ($(RNDGEN),) - override RNDGEN = hasCurand - endif endif -# Export AVX, FPTYPE, HELINL, HRDCOD, RNDGEN, OMPFLAGS so that it is not necessary to pass them to the src Makefile too -export AVX -export FPTYPE -export HELINL -export HRDCOD -export RNDGEN +# Export here, so sub makes don't fall back to the defaults: export OMPFLAGS -#------------------------------------------------------------------------------- - -#=== Set the CUDA/C++ compiler flags appropriate to user-defined choices of AVX, FPTYPE, HELINL, HRDCOD, RNDGEN - -# Set the build flags appropriate to OMPFLAGS -$(info OMPFLAGS=$(OMPFLAGS)) -CXXFLAGS += $(OMPFLAGS) - -# Set the build flags appropriate to each AVX choice (example: "make AVX=none") -# [NB MGONGPU_PVW512 is needed because "-mprefer-vector-width=256" is not exposed in a macro] -# [See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96476] -$(info AVX=$(AVX)) -ifeq ($(UNAME_P),ppc64le) - ifeq ($(AVX),sse4) - override AVXFLAGS = -D__SSE4_2__ # Power9 VSX with 128 width (VSR registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on PowerPC for the moment) - endif -else ifeq ($(UNAME_P),arm) - ifeq ($(AVX),sse4) - override AVXFLAGS = -D__SSE4_2__ # ARM NEON with 128 width (Q/quadword registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on ARM for the moment) - endif -else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 - ifeq ($(AVX),none) - override AVXFLAGS = -mno-sse3 # no SIMD - else ifeq ($(AVX),sse4) - override AVXFLAGS = -mno-avx # SSE4.2 with 128 width (xmm registers) - else ifeq ($(AVX),avx2) - override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(AVX),512y) - override AVXFLAGS = -march=skylake -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(AVX),512z) - override AVXFLAGS = -march=skylake -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) - else - $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) - endif -else - ifeq ($(AVX),none) - override AVXFLAGS = -march=x86-64 # no SIMD (see #588) - else ifeq ($(AVX),sse4) - override AVXFLAGS = -march=nehalem # SSE4.2 with 128 width (xmm registers) - else ifeq ($(AVX),avx2) - override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(AVX),512y) - override AVXFLAGS = -march=skylake-avx512 -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(AVX),512z) - override AVXFLAGS = -march=skylake-avx512 -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) - else - $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) - endif -endif -# For the moment, use AVXFLAGS everywhere: eventually, use them only in encapsulated implementations? -CXXFLAGS+= $(AVXFLAGS) - -# Set the build flags appropriate to each FPTYPE choice (example: "make FPTYPE=f") -$(info FPTYPE=$(FPTYPE)) -ifeq ($(FPTYPE),d) - CXXFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_DOUBLE - CUFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_DOUBLE -else ifeq ($(FPTYPE),f) - CXXFLAGS += -DMGONGPU_FPTYPE_FLOAT -DMGONGPU_FPTYPE2_FLOAT - CUFLAGS += -DMGONGPU_FPTYPE_FLOAT -DMGONGPU_FPTYPE2_FLOAT -else ifeq ($(FPTYPE),m) - CXXFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_FLOAT - CUFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_FLOAT -else - $(error Unknown FPTYPE='$(FPTYPE)': only 'd', 'f' and 'm' are supported) -endif - -# Set the build flags appropriate to each HELINL choice (example: "make HELINL=1") -$(info HELINL=$(HELINL)) -ifeq ($(HELINL),1) - CXXFLAGS += -DMGONGPU_INLINE_HELAMPS - CUFLAGS += -DMGONGPU_INLINE_HELAMPS -else ifneq ($(HELINL),0) - $(error Unknown HELINL='$(HELINL)': only '0' and '1' are supported) -endif - -# Set the build flags appropriate to each HRDCOD choice (example: "make HRDCOD=1") -$(info HRDCOD=$(HRDCOD)) -ifeq ($(HRDCOD),1) - CXXFLAGS += -DMGONGPU_HARDCODE_PARAM - CUFLAGS += -DMGONGPU_HARDCODE_PARAM -else ifneq ($(HRDCOD),0) - $(error Unknown HRDCOD='$(HRDCOD)': only '0' and '1' are supported) -endif - -# Set the build flags appropriate to each RNDGEN choice (example: "make RNDGEN=hasNoCurand") -$(info RNDGEN=$(RNDGEN)) -ifeq ($(RNDGEN),hasNoCurand) - override CXXFLAGSCURAND = -DMGONGPU_HAS_NO_CURAND -else ifeq ($(RNDGEN),hasCurand) - override CXXFLAGSCURAND = -else - $(error Unknown RNDGEN='$(RNDGEN)': only 'hasCurand' and 'hasNoCurand' are supported) -endif +MG_CXXFLAGS += $(OMPFLAGS) #------------------------------------------------------------------------------- #=== Configure build directories and build lockfiles === -# Build directory "short" tag (defines target and path to the optional build directory) -# (Rationale: keep directory names shorter, e.g. do not include random number generator choice) -override DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) - -# Build lockfile "full" tag (defines full specification of build options that cannot be intermixed) -# (Rationale: avoid mixing of CUDA and no-CUDA environment builds with different random number generators) -override TAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) - -# Build directory: current directory by default, or build.$(DIRTAG) if USEBUILDDIR==1 -ifeq ($(USEBUILDDIR),1) - override BUILDDIR = build.$(DIRTAG) - override LIBDIR = ../../lib/$(BUILDDIR) - override LIBDIRRPATH = '$$ORIGIN/../$(LIBDIR)' - $(info Building in BUILDDIR=$(BUILDDIR) for tag=$(TAG) (USEBUILDDIR is set = 1)) -else - override BUILDDIR = . - override LIBDIR = ../../lib - override LIBDIRRPATH = '$$ORIGIN/$(LIBDIR)' - $(info Building in BUILDDIR=$(BUILDDIR) for tag=$(TAG) (USEBUILDDIR is not set)) +# Build directory "short" tag (defines target and path to the build directory) +DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) +CUDACPP_BUILDDIR = build.$(DIRTAG) +CUDACPP_LIBDIR := ../../lib/$(CUDACPP_BUILDDIR) +LIBDIRRPATH := '$$ORIGIN:$$ORIGIN/../$(CUDACPP_LIBDIR)' +ifneq ($(AVX),) + $(info Building CUDACPP in CUDACPP_BUILDDIR=$(CUDACPP_BUILDDIR). Libs in $(CUDACPP_LIBDIR)) endif -###override INCDIR = ../../include -###$(info Building in BUILDDIR=$(BUILDDIR) for tag=$(TAG)) -# On Linux, set rpath to LIBDIR to make it unnecessary to use LD_LIBRARY_PATH +# On Linux, set rpath to CUDACPP_LIBDIR to make it unnecessary to use LD_LIBRARY_PATH # Use relative paths with respect to the executables or shared libraries ($ORIGIN on Linux) -# On Darwin, building libraries with absolute paths in LIBDIR makes this unnecessary +# On Darwin, building libraries with absolute paths in CUDACPP_LIBDIR makes this unnecessary ifeq ($(UNAME_S),Darwin) override CXXLIBFLAGSRPATH = override CULIBFLAGSRPATH = - override CXXLIBFLAGSRPATH2 = - override CULIBFLAGSRPATH2 = else # RPATH to cuda/cpp libs when linking executables override CXXLIBFLAGSRPATH = -Wl,-rpath,$(LIBDIRRPATH) override CULIBFLAGSRPATH = -Xlinker -rpath,$(LIBDIRRPATH) - # RPATH to common lib when linking cuda/cpp libs - override CXXLIBFLAGSRPATH2 = -Wl,-rpath,'$$ORIGIN' - override CULIBFLAGSRPATH2 = -Xlinker -rpath,'$$ORIGIN' endif # Setting LD_LIBRARY_PATH or DYLD_LIBRARY_PATH in the RUNTIME is no longer necessary (neither on Linux nor on Mac) @@ -458,107 +129,68 @@ override RUNTIME = #=== Makefile TARGETS and build rules below #=============================================================================== -cxx_main=$(BUILDDIR)/check.exe -fcxx_main=$(BUILDDIR)/fcheck.exe +cxx_main=$(CUDACPP_BUILDDIR)/check.exe +fcxx_main=$(CUDACPP_BUILDDIR)/fcheck.exe -ifneq ($(NVCC),) -cu_main=$(BUILDDIR)/gcheck.exe -fcu_main=$(BUILDDIR)/fgcheck.exe -else -cu_main= -fcu_main= -endif - -testmain=$(BUILDDIR)/runTest.exe +cu_main=$(CUDACPP_BUILDDIR)/gcheck.exe +fcu_main=$(CUDACPP_BUILDDIR)/fgcheck.exe ifneq ($(GTESTLIBS),) -all.$(TAG): $(BUILDDIR)/.build.$(TAG) $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_main) $(cxx_main) $(fcu_main) $(fcxx_main) $(testmain) -else -all.$(TAG): $(BUILDDIR)/.build.$(TAG) $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_main) $(cxx_main) $(fcu_main) $(fcxx_main) +testmain=$(CUDACPP_BUILDDIR)/runTest.exe +cutestmain=$(CUDACPP_BUILDDIR)/runTest_cuda.exe endif -# Target (and build options): debug -MAKEDEBUG= -debug: OPTFLAGS = -g -O0 -debug: CUOPTFLAGS = -G -debug: MAKEDEBUG := debug -debug: all.$(TAG) - -# Target: tag-specific build lockfiles -override oldtagsb=`if [ -d $(BUILDDIR) ]; then find $(BUILDDIR) -maxdepth 1 -name '.build.*' ! -name '.build.$(TAG)' -exec echo $(shell pwd)/{} \; ; fi` -$(BUILDDIR)/.build.$(TAG): - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - @if [ "$(oldtagsb)" != "" ]; then echo "Cannot build for tag=$(TAG) as old builds exist for other tags:"; echo " $(oldtagsb)"; echo "Please run 'make clean' first\nIf 'make clean' is not enough: run 'make clean USEBUILDDIR=1 AVX=$(AVX) FPTYPE=$(FPTYPE)' or 'make cleanall'"; exit 1; fi - @touch $(BUILDDIR)/.build.$(TAG) +cppbuild: $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(cxx_main) $(fcxx_main) $(testmain) +cudabuild: $(CUDACPP_BUILDDIR)/$(PROG)_cuda $(cu_main) $(fcu_main) $(cutestmain) # Generic target and build rules: objects from CUDA compilation -ifneq ($(NVCC),) -$(BUILDDIR)/%.o : %.cu *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c $< -o $@ +$(CUDACPP_BUILDDIR)/%.o : %.cu *.h ../../src/*.h + @mkdir -p $(CUDACPP_BUILDDIR) + $(NVCC) $(MG_NVCCFLAGS) $(NVCCFLAGS) -c $< -o $@ -$(BUILDDIR)/%_cu.o : %.cc *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c -x cu $< -o $@ -endif +$(CUDACPP_BUILDDIR)/%_cu.o : %.cc *.h ../../src/*.h + @mkdir -p $(CUDACPP_BUILDDIR) + $(NVCC) $(MG_NVCCFLAGS) $(NVCCFLAGS) -c -x cu $< -o $@ # Generic target and build rules: objects from C++ compilation # (NB do not include CUINC here! add it only for NVTX or curand #679) -$(BUILDDIR)/%.o : %.cc *.h ../../src/*.h $(BUILDDIR)/.build.$(TAG) - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - $(CXX) $(CPPFLAGS) $(CXXFLAGS) -fPIC -c $< -o $@ +$(CUDACPP_BUILDDIR)/%.o : %.cc *.h ../../src/*.h + @mkdir -p $(CUDACPP_BUILDDIR) + $(CXX) $(MG_CXXFLAGS) $(CXXFLAGS) -c $< -o $@ # Apply special build flags only to CrossSectionKernel.cc and gCrossSectionKernel.cu (no fast math, see #117 and #516) ifeq ($(shell $(CXX) --version | grep ^nvc++),) -$(BUILDDIR)/CrossSectionKernels.o: CXXFLAGS := $(filter-out -ffast-math,$(CXXFLAGS)) -$(BUILDDIR)/CrossSectionKernels.o: CXXFLAGS += -fno-fast-math +$(CUDACPP_BUILDDIR)/CrossSectionKernels.o: CXXFLAGS += -fno-fast-math ifneq ($(NVCC),) -$(BUILDDIR)/gCrossSectionKernels.o: CUFLAGS += -Xcompiler -fno-fast-math +$(CUDACPP_BUILDDIR)/gCrossSectionKernels.o: NVCCFLAGS += -Xcompiler -fno-fast-math endif endif # Apply special build flags only to check_sa.o and gcheck_sa.o (NVTX in timermap.h, #679) -$(BUILDDIR)/check_sa.o: CXXFLAGS += $(USE_NVTX) $(CUINC) -$(BUILDDIR)/gcheck_sa.o: CXXFLAGS += $(USE_NVTX) $(CUINC) +$(CUDACPP_BUILDDIR)/check_sa.o: MG_CXXFLAGS += $(USE_NVTX) $(CUINC) +$(CUDACPP_BUILDDIR)/gcheck_sa.o: MG_CXXFLAGS += $(USE_NVTX) $(CUINC) # Apply special build flags only to check_sa and CurandRandomNumberKernel (curand headers, #679) -$(BUILDDIR)/check_sa.o: CXXFLAGS += $(CXXFLAGSCURAND) -$(BUILDDIR)/gcheck_sa.o: CUFLAGS += $(CXXFLAGSCURAND) -$(BUILDDIR)/CurandRandomNumberKernel.o: CXXFLAGS += $(CXXFLAGSCURAND) -$(BUILDDIR)/gCurandRandomNumberKernel.o: CUFLAGS += $(CXXFLAGSCURAND) -ifeq ($(RNDGEN),hasCurand) -$(BUILDDIR)/CurandRandomNumberKernel.o: CXXFLAGS += $(CUINC) -endif +$(CUDACPP_BUILDDIR)/check_sa.o: MG_CXXFLAGS += $(CXXFLAGSCURAND) +$(CUDACPP_BUILDDIR)/gcheck_sa.o: MG_NVCCFLAGS += $(CXXFLAGSCURAND) +$(CUDACPP_BUILDDIR)/CurandRandomNumberKernel.o: MG_CXXFLAGS += $(CXXFLAGSCURAND) +$(CUDACPP_BUILDDIR)/gCurandRandomNumberKernel.o: MG_NVCCFLAGS += $(CXXFLAGSCURAND) + # Avoid "warning: builtin __has_trivial_... is deprecated; use __is_trivially_... instead" in nvcc with icx2023 (#592) ifneq ($(shell $(CXX) --version | egrep '^(Intel)'),) ifneq ($(NVCC),) -CUFLAGS += -Xcompiler -Wno-deprecated-builtins +MG_NVCCFLAGS += -Xcompiler -Wno-deprecated-builtins endif endif -# Avoid clang warning "overriding '-ffp-contract=fast' option with '-ffp-contract=on'" (#516) -# This patch does remove the warning, but I prefer to keep it disabled for the moment... -###ifneq ($(shell $(CXX) --version | egrep '^(clang|Apple clang|Intel)'),) -###$(BUILDDIR)/CrossSectionKernels.o: CXXFLAGS += -Wno-overriding-t-option -###ifneq ($(NVCC),) -###$(BUILDDIR)/gCrossSectionKernels.o: CUFLAGS += -Xcompiler -Wno-overriding-t-option -###endif -###endif - #### Apply special build flags only to CPPProcess.cc (-flto) ###$(BUILDDIR)/CPPProcess.o: CXXFLAGS += -flto -#### Apply special build flags only to CPPProcess.cc (AVXFLAGS) -###$(BUILDDIR)/CPPProcess.o: CXXFLAGS += $(AVXFLAGS) - #------------------------------------------------------------------------------- -# Target (and build rules): common (src) library -commonlib : $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so - -$(LIBDIR)/lib$(MG5AMC_COMMONLIB).so: ../../src/*.h ../../src/*.cc $(BUILDDIR)/.build.$(TAG) - $(MAKE) -C ../../src $(MAKEDEBUG) -f $(CUDACPP_SRC_MAKEFILE) +$(CUDACPP_LIBDIR)/lib$(MG5AMC_COMMONLIB).so: ../../src/*.h ../../src/*.cc + $(MAKE) AVX=$(AVX) AVXFLAGS="$(AVXFLAGS)" -C ../../src -f $(CUDACPP_SRC_MAKEFILE) #------------------------------------------------------------------------------- @@ -566,162 +198,123 @@ processid_short=$(shell basename $(CURDIR) | awk -F_ '{print $$(NF-1)"_"$$NF}') ###$(info processid_short=$(processid_short)) MG5AMC_CXXLIB = mg5amc_$(processid_short)_cpp -cxx_objects_lib=$(BUILDDIR)/CPPProcess.o $(BUILDDIR)/MatrixElementKernels.o $(BUILDDIR)/BridgeKernels.o $(BUILDDIR)/CrossSectionKernels.o -cxx_objects_exe=$(BUILDDIR)/CommonRandomNumberKernel.o $(BUILDDIR)/RamboSamplingKernels.o +cxx_objects_lib=$(CUDACPP_BUILDDIR)/CPPProcess.o $(CUDACPP_BUILDDIR)/MatrixElementKernels.o $(CUDACPP_BUILDDIR)/BridgeKernels.o $(CUDACPP_BUILDDIR)/CrossSectionKernels.o +cxx_objects_exe=$(CUDACPP_BUILDDIR)/CommonRandomNumberKernel.o $(CUDACPP_BUILDDIR)/RamboSamplingKernels.o -ifneq ($(NVCC),) MG5AMC_CULIB = mg5amc_$(processid_short)_cuda -cu_objects_lib=$(BUILDDIR)/gCPPProcess.o $(BUILDDIR)/gMatrixElementKernels.o $(BUILDDIR)/gBridgeKernels.o $(BUILDDIR)/gCrossSectionKernels.o -cu_objects_exe=$(BUILDDIR)/gCommonRandomNumberKernel.o $(BUILDDIR)/gRamboSamplingKernels.o -endif +cu_objects_lib=$(CUDACPP_BUILDDIR)/gCPPProcess.o $(CUDACPP_BUILDDIR)/gMatrixElementKernels.o $(CUDACPP_BUILDDIR)/gBridgeKernels.o $(CUDACPP_BUILDDIR)/gCrossSectionKernels.o +cu_objects_exe=$(CUDACPP_BUILDDIR)/gCommonRandomNumberKernel.o $(CUDACPP_BUILDDIR)/gRamboSamplingKernels.o # Target (and build rules): C++ and CUDA shared libraries -$(LIBDIR)/lib$(MG5AMC_CXXLIB).so: $(BUILDDIR)/fbridge.o -$(LIBDIR)/lib$(MG5AMC_CXXLIB).so: cxx_objects_lib += $(BUILDDIR)/fbridge.o -$(LIBDIR)/lib$(MG5AMC_CXXLIB).so: $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cxx_objects_lib) - $(CXX) -shared -o $@ $(cxx_objects_lib) $(CXXLIBFLAGSRPATH2) -L$(LIBDIR) -l$(MG5AMC_COMMONLIB) - -ifneq ($(NVCC),) -$(LIBDIR)/lib$(MG5AMC_CULIB).so: $(BUILDDIR)/fbridge_cu.o -$(LIBDIR)/lib$(MG5AMC_CULIB).so: cu_objects_lib += $(BUILDDIR)/fbridge_cu.o -$(LIBDIR)/lib$(MG5AMC_CULIB).so: $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_objects_lib) - $(NVCC) --shared -o $@ $(cu_objects_lib) $(CULIBFLAGSRPATH2) -L$(LIBDIR) -l$(MG5AMC_COMMONLIB) -endif +$(CUDACPP_BUILDDIR)/lib$(MG5AMC_CXXLIB).so: $(CUDACPP_BUILDDIR)/fbridge.o +$(CUDACPP_BUILDDIR)/lib$(MG5AMC_CXXLIB).so: cxx_objects_lib += $(CUDACPP_BUILDDIR)/fbridge.o +$(CUDACPP_BUILDDIR)/lib$(MG5AMC_CXXLIB).so: $(CUDACPP_LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cxx_objects_lib) + $(CXX) -shared -o $@ $(cxx_objects_lib) $(CXXLIBFLAGSRPATH) -L$(CUDACPP_LIBDIR) -l$(MG5AMC_COMMONLIB) $(MG_LDFLAGS) $(LDFLAGS) -#------------------------------------------------------------------------------- - -# Target (and build rules): Fortran include files -###$(INCDIR)/%.inc : ../%.inc -### @if [ ! -d $(INCDIR) ]; then echo "mkdir -p $(INCDIR)"; mkdir -p $(INCDIR); fi -### \cp $< $@ +$(CUDACPP_BUILDDIR)/lib$(MG5AMC_CULIB).so: $(CUDACPP_BUILDDIR)/fbridge_cu.o +$(CUDACPP_BUILDDIR)/lib$(MG5AMC_CULIB).so: cu_objects_lib += $(CUDACPP_BUILDDIR)/fbridge_cu.o +$(CUDACPP_BUILDDIR)/lib$(MG5AMC_CULIB).so: $(CUDACPP_LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_objects_lib) + $(NVCC) --shared -o $@ $(cu_objects_lib) $(CULIBFLAGSRPATH) -L$(CUDACPP_LIBDIR) -l$(MG5AMC_COMMONLIB) #------------------------------------------------------------------------------- # Target (and build rules): C++ and CUDA standalone executables -$(cxx_main): LIBFLAGS += $(CXXLIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH -$(cxx_main): $(BUILDDIR)/check_sa.o $(LIBDIR)/lib$(MG5AMC_CXXLIB).so $(cxx_objects_exe) $(BUILDDIR)/CurandRandomNumberKernel.o - $(CXX) -o $@ $(BUILDDIR)/check_sa.o $(OMPFLAGS) -ldl -pthread $(LIBFLAGS) -L$(LIBDIR) -l$(MG5AMC_CXXLIB) $(cxx_objects_exe) $(BUILDDIR)/CurandRandomNumberKernel.o $(CURANDLIBFLAGS) -ifneq ($(NVCC),) +$(cxx_main): MG_LDFLAGS += $(CXXLIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH +$(cxx_main): MG_LDFLAGS += -L$(CUDACPP_BUILDDIR) -l$(MG5AMC_CXXLIB) # Process-specific library +$(cxx_main): $(CUDACPP_BUILDDIR)/check_sa.o $(CUDACPP_BUILDDIR)/lib$(MG5AMC_CXXLIB).so $(cxx_objects_exe) $(CUDACPP_BUILDDIR)/CurandRandomNumberKernel.o + $(CXX) -o $@ $(CUDACPP_BUILDDIR)/check_sa.o $(OMPFLAGS) -ldl -pthread $(cxx_objects_exe) $(CUDACPP_BUILDDIR)/CurandRandomNumberKernel.o $(MG_LDFLAGS) $(LDFLAGS) + ifneq ($(shell $(CXX) --version | grep ^Intel),) -$(cu_main): LIBFLAGS += -lintlc # compile with icpx and link with nvcc (undefined reference to `_intel_fast_memcpy') -$(cu_main): LIBFLAGS += -lsvml # compile with icpx and link with nvcc (undefined reference to `__svml_cos4_l9') +$(cu_main): MG_LDFLAGS += -lintlc # compile with icpx and link with nvcc (undefined reference to `_intel_fast_memcpy') +$(cu_main): MG_LDFLAGS += -lsvml # compile with icpx and link with nvcc (undefined reference to `__svml_cos4_l9') else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 -$(cu_main): LIBFLAGS += -L$(patsubst %bin/nvc++,%lib,$(subst ccache ,,$(CXX))) -lnvhpcatm -lnvcpumath -lnvc -endif -$(cu_main): LIBFLAGS += $(CULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH -$(cu_main): $(BUILDDIR)/gcheck_sa.o $(LIBDIR)/lib$(MG5AMC_CULIB).so $(cu_objects_exe) $(BUILDDIR)/gCurandRandomNumberKernel.o - $(NVCC) -o $@ $(BUILDDIR)/gcheck_sa.o $(CUARCHFLAGS) $(LIBFLAGS) -L$(LIBDIR) -l$(MG5AMC_CULIB) $(cu_objects_exe) $(BUILDDIR)/gCurandRandomNumberKernel.o $(CURANDLIBFLAGS) +$(cu_main): MG_LDFLAGS += -L$(patsubst %bin/nvc++,%lib,$(subst ccache ,,$(CXX))) -lnvhpcatm -lnvcpumath -lnvc endif +$(cu_main): MG_LDFLAGS += $(CULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH +$(cu_main): MG_LDFLAGS += -L$(CUDACPP_BUILDDIR) -l$(MG5AMC_CULIB) # Process-specific library +$(cu_main): $(CUDACPP_BUILDDIR)/gcheck_sa.o $(CUDACPP_BUILDDIR)/lib$(MG5AMC_CULIB).so $(cu_objects_exe) $(CUDACPP_BUILDDIR)/gCurandRandomNumberKernel.o + $(NVCC) -o $@ $(CUDACPP_BUILDDIR)/gcheck_sa.o $(CUARCHFLAGS) $(cu_objects_exe) $(CUDACPP_BUILDDIR)/gCurandRandomNumberKernel.o $(MG_LDFLAGS) $(LDFLAGS) #------------------------------------------------------------------------------- - -# Generic target and build rules: objects from Fortran compilation -$(BUILDDIR)/%.o : %.f *.inc - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - $(FC) -I. -c $< -o $@ - -# Generic target and build rules: objects from Fortran compilation -###$(BUILDDIR)/%.o : %.f *.inc -### @if [ ! -d $(INCDIR) ]; then echo "mkdir -p $(INCDIR)"; mkdir -p $(INCDIR); fi -### @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi -### $(FC) -I. -I$(INCDIR) -c $< -o $@ - -# Target (and build rules): Fortran standalone executables -###$(BUILDDIR)/fcheck_sa.o : $(INCDIR)/fbridge.inc +# Check executables: ifeq ($(UNAME_S),Darwin) -$(fcxx_main): LIBFLAGS += -L$(shell dirname $(shell $(FC) --print-file-name libgfortran.dylib)) # add path to libgfortran on Mac #375 +$(fcxx_main): MG_LDFLAGS += -L$(shell dirname $(shell $(FC) --print-file-name libgfortran.dylib)) # add path to libgfortran on Mac #375 endif -$(fcxx_main): LIBFLAGS += $(CXXLIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH -$(fcxx_main): $(BUILDDIR)/fcheck_sa.o $(BUILDDIR)/fsampler.o $(LIBDIR)/lib$(MG5AMC_CXXLIB).so $(cxx_objects_exe) - $(CXX) -o $@ $(BUILDDIR)/fcheck_sa.o $(OMPFLAGS) $(BUILDDIR)/fsampler.o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_CXXLIB) $(cxx_objects_exe) +$(fcxx_main): MG_LDFLAGS += $(CXXLIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH +$(fcxx_main): MG_LDFLAGS += -L$(CUDACPP_BUILDDIR) -l$(MG5AMC_CXXLIB) # Process-specific library +$(fcxx_main): $(CUDACPP_BUILDDIR)/fcheck_sa.o $(CUDACPP_BUILDDIR)/fsampler.o $(CUDACPP_BUILDDIR)/lib$(MG5AMC_CXXLIB).so $(cxx_objects_exe) + $(CXX) -o $@ $(CUDACPP_BUILDDIR)/fcheck_sa.o $(cxx_objects_exe) $(OMPFLAGS) $(CUDACPP_BUILDDIR)/fsampler.o -lgfortran -L$(CUDACPP_LIBDIR) $(MG_LDFLAGS) $(LDFLAGS) -ifneq ($(NVCC),) ifneq ($(shell $(CXX) --version | grep ^Intel),) -$(fcu_main): LIBFLAGS += -lintlc # compile with icpx and link with nvcc (undefined reference to `_intel_fast_memcpy') -$(fcu_main): LIBFLAGS += -lsvml # compile with icpx and link with nvcc (undefined reference to `__svml_cos4_l9') +$(fcu_main): MG_LDFLAGS += -lintlc # compile with icpx and link with nvcc (undefined reference to `_intel_fast_memcpy') +$(fcu_main): MG_LDFLAGS += -lsvml # compile with icpx and link with nvcc (undefined reference to `__svml_cos4_l9') endif ifeq ($(UNAME_S),Darwin) -$(fcu_main): LIBFLAGS += -L$(shell dirname $(shell $(FC) --print-file-name libgfortran.dylib)) # add path to libgfortran on Mac #375 -endif -$(fcu_main): LIBFLAGS += $(CULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH -$(fcu_main): $(BUILDDIR)/fcheck_sa.o $(BUILDDIR)/fsampler_cu.o $(LIBDIR)/lib$(MG5AMC_CULIB).so $(cu_objects_exe) - $(NVCC) -o $@ $(BUILDDIR)/fcheck_sa.o $(BUILDDIR)/fsampler_cu.o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_CULIB) $(cu_objects_exe) +$(fcu_main): MG_LDFLAGS += -L$(shell dirname $(shell $(FC) --print-file-name libgfortran.dylib)) # add path to libgfortran on Mac #375 endif +$(fcu_main): MG_LDFLAGS += $(CULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH +$(fcu_main): MG_LDFLAGS += -L$(CUDACPP_BUILDDIR) -l$(MG5AMC_CULIB) # Process-specific library +$(fcu_main): $(CUDACPP_BUILDDIR)/fcheck_sa.o $(CUDACPP_BUILDDIR)/fsampler_cu.o $(CUDACPP_BUILDDIR)/lib$(MG5AMC_CULIB).so $(cu_objects_exe) + $(NVCC) -o $@ $(CUDACPP_BUILDDIR)/fcheck_sa.o $(CUDACPP_BUILDDIR)/fsampler_cu.o $(cu_objects_exe) -lgfortran $(MG_LDFLAGS) $(LDFLAGS) #------------------------------------------------------------------------------- # Target (and build rules): test objects and test executable -$(BUILDDIR)/testxxx.o: $(GTESTLIBS) -$(BUILDDIR)/testxxx.o: INCFLAGS += $(GTESTINC) -$(BUILDDIR)/testxxx.o: testxxx_cc_ref.txt -$(testmain): $(BUILDDIR)/testxxx.o -$(testmain): cxx_objects_exe += $(BUILDDIR)/testxxx.o # Comment out this line to skip the C++ test of xxx functions -ifneq ($(NVCC),) -$(BUILDDIR)/testxxx_cu.o: $(GTESTLIBS) -$(BUILDDIR)/testxxx_cu.o: INCFLAGS += $(GTESTINC) -$(BUILDDIR)/testxxx_cu.o: testxxx_cc_ref.txt -$(testmain): $(BUILDDIR)/testxxx_cu.o -$(testmain): cu_objects_exe += $(BUILDDIR)/testxxx_cu.o # Comment out this line to skip the CUDA test of xxx functions -endif +$(testmain) $(cutestmain): $(GTESTLIBS) +$(testmain) $(cutestmain): INCFLAGS += $(GTESTINC) +$(testmain) $(cutestmain): MG_LDFLAGS += -L$(GTESTLIBDIR) -lgtest -lgtest_main -$(BUILDDIR)/testmisc.o: $(GTESTLIBS) -$(BUILDDIR)/testmisc.o: INCFLAGS += $(GTESTINC) -$(testmain): $(BUILDDIR)/testmisc.o -$(testmain): cxx_objects_exe += $(BUILDDIR)/testmisc.o # Comment out this line to skip the C++ miscellaneous tests +$(CUDACPP_BUILDDIR)/testxxx.o $(CUDACPP_BUILDDIR)/testxxx_cu.o: $(GTESTLIBS) testxxx_cc_ref.txt +$(testmain): $(CUDACPP_BUILDDIR)/testxxx.o +$(testmain): cxx_objects_exe += $(CUDACPP_BUILDDIR)/testxxx.o # Comment out this line to skip the C++ test of xxx functions +$(cutestmain): $(CUDACPP_BUILDDIR)/testxxx_cu.o +$(cutestmain): cu_objects_exe += $(CUDACPP_BUILDDIR)/testxxx_cu.o # Comment out this line to skip the CUDA test of xxx functions -ifneq ($(NVCC),) -$(BUILDDIR)/testmisc_cu.o: $(GTESTLIBS) -$(BUILDDIR)/testmisc_cu.o: INCFLAGS += $(GTESTINC) -$(testmain): $(BUILDDIR)/testmisc_cu.o -$(testmain): cu_objects_exe += $(BUILDDIR)/testmisc_cu.o # Comment out this line to skip the CUDA miscellaneous tests -endif -$(BUILDDIR)/runTest.o: $(GTESTLIBS) -$(BUILDDIR)/runTest.o: INCFLAGS += $(GTESTINC) -$(testmain): $(BUILDDIR)/runTest.o -$(testmain): cxx_objects_exe += $(BUILDDIR)/runTest.o +$(CUDACPP_BUILDDIR)/testmisc.o $(CUDACPP_BUILDDIR)/testmisc_cu.o: $(GTESTLIBS) +$(testmain): $(CUDACPP_BUILDDIR)/testmisc.o +$(testmain): cxx_objects_exe += $(CUDACPP_BUILDDIR)/testmisc.o # Comment out this line to skip the C++ miscellaneous tests +$(cutestmain): $(CUDACPP_BUILDDIR)/testmisc_cu.o +$(cutestmain): cu_objects_exe += $(CUDACPP_BUILDDIR)/testmisc_cu.o # Comment out this line to skip the CUDA miscellaneous tests + + +$(CUDACPP_BUILDDIR)/runTest.o $(CUDACPP_BUILDDIR)/runTest_cu.o: $(GTESTLIBS) +$(testmain): $(CUDACPP_BUILDDIR)/runTest.o +$(testmain): cxx_objects_exe += $(CUDACPP_BUILDDIR)/runTest.o +$(cutestmain): $(CUDACPP_BUILDDIR)/runTest_cu.o +$(cutestmain): cu_objects_exe += $(CUDACPP_BUILDDIR)/runTest_cu.o + -ifneq ($(NVCC),) -$(BUILDDIR)/runTest_cu.o: $(GTESTLIBS) -$(BUILDDIR)/runTest_cu.o: INCFLAGS += $(GTESTINC) ifneq ($(shell $(CXX) --version | grep ^Intel),) -$(testmain): LIBFLAGS += -lintlc # compile with icpx and link with nvcc (undefined reference to `_intel_fast_memcpy') -$(testmain): LIBFLAGS += -lsvml # compile with icpx and link with nvcc (undefined reference to `__svml_cos4_l9') +$(cutestmain): MG_LDFLAGS += -lintlc # compile with icpx and link with nvcc (undefined reference to `_intel_fast_memcpy') +$(cutestmain): MG_LDFLAGS += -lsvml # compile with icpx and link with nvcc (undefined reference to `__svml_cos4_l9') else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 -$(testmain): LIBFLAGS += -L$(patsubst %bin/nvc++,%lib,$(subst ccache ,,$(CXX))) -lnvhpcatm -lnvcpumath -lnvc -endif -$(testmain): $(BUILDDIR)/runTest_cu.o -$(testmain): cu_objects_exe += $(BUILDDIR)/runTest_cu.o +$(cutestmain): MG_LDFLAGS += -L$(patsubst %bin/nvc++,%lib,$(subst ccache ,,$(CXX))) -lnvhpcatm -lnvcpumath -lnvc endif -$(testmain): $(GTESTLIBS) -$(testmain): INCFLAGS += $(GTESTINC) -$(testmain): LIBFLAGS += -L$(GTESTLIBDIR) -lgtest -lgtest_main ifneq ($(OMPFLAGS),) ifneq ($(shell $(CXX) --version | egrep '^Intel'),) -$(testmain): LIBFLAGS += -liomp5 # see #578 (not '-qopenmp -static-intel' as in https://stackoverflow.com/questions/45909648) +$(testmain): MG_LDFLAGS += -liomp5 # see #578 (not '-qopenmp -static-intel' as in https://stackoverflow.com/questions/45909648) else ifneq ($(shell $(CXX) --version | egrep '^clang'),) -$(testmain): LIBFLAGS += -L $(shell dirname $(shell $(CXX) -print-file-name=libc++.so)) -lomp # see #604 +$(testmain): MG_LDFLAGS += -L $(shell dirname $(shell $(CXX) -print-file-name=libc++.so)) -lomp # see #604 ###else ifneq ($(shell $(CXX) --version | egrep '^Apple clang'),) ###$(testmain): LIBFLAGS += ???? # OMP is not supported yet by cudacpp for Apple clang (see #578 and #604) else -$(testmain): LIBFLAGS += -lgomp +$(testmain): MG_LDFLAGS += -lgomp endif endif -ifeq ($(NVCC),) # link only runTest.o -$(testmain): LIBFLAGS += $(CXXLIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH -$(testmain): $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cxx_objects_lib) $(cxx_objects_exe) $(GTESTLIBS) - $(CXX) -o $@ $(cxx_objects_lib) $(cxx_objects_exe) -ldl -pthread $(LIBFLAGS) -else # link both runTest.o and runTest_cu.o -$(testmain): LIBFLAGS += $(CULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH -$(testmain): $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cxx_objects_lib) $(cxx_objects_exe) $(cu_objects_lib) $(cu_objects_exe) $(GTESTLIBS) - $(NVCC) -o $@ $(cxx_objects_lib) $(cxx_objects_exe) $(cu_objects_lib) $(cu_objects_exe) -ldl $(LIBFLAGS) -lcuda -endif +$(testmain): MG_LDFLAGS += $(CXXLIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH +$(testmain): $(CUDACPP_LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cxx_objects_lib) $(cxx_objects_exe) $(GTESTLIBS) + $(CXX) -o $@ $(cxx_objects_lib) $(cxx_objects_exe) -L$(CUDACPP_LIBDIR) -l$(MG5AMC_COMMONLIB) -ldl -pthread $(MG_LDFLAGS) $(LDFLAGS) + +$(cutestmain): MG_LDFLAGS += $(CULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH +$(cutestmain): $(CUDACPP_LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(cu_objects_lib) $(cu_objects_exe) $(GTESTLIBS) + $(NVCC) -o $@ $(cu_objects_lib) $(cu_objects_exe) -L$(CUDACPP_LIBDIR) -l$(MG5AMC_COMMONLIB) -ldl -lcuda $(MG_LDFLAGS) $(LDFLAGS) # Use target gtestlibs to build only googletest ifneq ($(GTESTLIBS),) @@ -731,72 +324,15 @@ endif # Use flock (Linux only, no Mac) to allow 'make -j' if googletest has not yet been downloaded https://stackoverflow.com/a/32666215 $(GTESTLIBS): ifneq ($(shell which flock 2>/dev/null),) - @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - flock $(BUILDDIR)/.make_test.lock $(MAKE) -C $(TESTDIR) + flock $(TESTDIR)/.make_test.lock $(MAKE) -C $(TESTDIR) else if [ -d $(TESTDIR) ]; then $(MAKE) -C $(TESTDIR); fi endif #------------------------------------------------------------------------------- -# Target: build all targets in all AVX modes (each AVX mode in a separate build directory) -# Split the avxall target into five separate targets to allow parallel 'make -j avxall' builds -# (Hack: add a fbridge.inc dependency to avxall, to ensure it is only copied once for all AVX modes) -avxnone: - @echo - $(MAKE) USEBUILDDIR=1 AVX=none -f $(CUDACPP_MAKEFILE) - -avxsse4: - @echo - $(MAKE) USEBUILDDIR=1 AVX=sse4 -f $(CUDACPP_MAKEFILE) - -avxavx2: - @echo - $(MAKE) USEBUILDDIR=1 AVX=avx2 -f $(CUDACPP_MAKEFILE) - -avx512y: - @echo - $(MAKE) USEBUILDDIR=1 AVX=512y -f $(CUDACPP_MAKEFILE) - -avx512z: - @echo - $(MAKE) USEBUILDDIR=1 AVX=512z -f $(CUDACPP_MAKEFILE) - -ifeq ($(UNAME_P),ppc64le) -###avxall: $(INCDIR)/fbridge.inc avxnone avxsse4 -avxall: avxnone avxsse4 -else ifeq ($(UNAME_P),arm) -###avxall: $(INCDIR)/fbridge.inc avxnone avxsse4 -avxall: avxnone avxsse4 -else -###avxall: $(INCDIR)/fbridge.inc avxnone avxsse4 avxavx2 avx512y avx512z -avxall: avxnone avxsse4 avxavx2 avx512y avx512z -endif - -#------------------------------------------------------------------------------- - -# Target: clean the builds -.PHONY: clean - -clean: -ifeq ($(USEBUILDDIR),1) - rm -rf $(BUILDDIR) -else - rm -f $(BUILDDIR)/.build.* $(BUILDDIR)/*.o $(BUILDDIR)/*.exe - rm -f $(LIBDIR)/lib$(MG5AMC_CXXLIB).so $(LIBDIR)/lib$(MG5AMC_CULIB).so -endif - $(MAKE) -C ../../src clean -f $(CUDACPP_SRC_MAKEFILE) -### rm -rf $(INCDIR) - -cleanall: - @echo - $(MAKE) USEBUILDDIR=0 clean -f $(CUDACPP_MAKEFILE) - @echo - $(MAKE) USEBUILDDIR=0 -C ../../src cleanall -f $(CUDACPP_SRC_MAKEFILE) - rm -rf build.* - # Target: clean the builds as well as the gtest installation(s) -distclean: cleanall +distclean: clean cleansrc ifneq ($(wildcard $(TESTDIRCOMMON)),) $(MAKE) -C $(TESTDIRCOMMON) clean endif @@ -848,50 +384,55 @@ endif #------------------------------------------------------------------------------- -# Target: check (run the C++ test executable) +# Target: check/gcheck (run the C++ test executable) # [NB THIS IS WHAT IS USED IN THE GITHUB CI!] -ifneq ($(NVCC),) -check: runTest cmpFcheck cmpFGcheck -else check: runTest cmpFcheck -endif +gcheck: + $(MAKE) AVX=cuda runTest cmpFGcheck # Target: runTest (run the C++ test executable runTest.exe) -runTest: all.$(TAG) - $(RUNTIME) $(BUILDDIR)/runTest.exe +ifneq ($(AVX),cuda) +runTest: cppbuild + $(RUNTIME) $(CUDACPP_BUILDDIR)/runTest.exe +else +runTest: cudabuild + $(RUNTIME) $(CUDACPP_BUILDDIR)/runTest_cuda.exe +endif + # Target: runCheck (run the C++ standalone executable check.exe, with a small number of events) -runCheck: all.$(TAG) - $(RUNTIME) $(BUILDDIR)/check.exe -p 2 32 2 +runCheck: cppbuild + $(RUNTIME) $(CUDACPP_BUILDDIR)/check.exe -p 2 32 2 # Target: runGcheck (run the CUDA standalone executable gcheck.exe, with a small number of events) -runGcheck: all.$(TAG) - $(RUNTIME) $(BUILDDIR)/gcheck.exe -p 2 32 2 +runGcheck: AVX=cuda +runGcheck: + $(MAKE) AVX=cuda cudabuild + $(RUNTIME) $(CUDACPP_BUILDDIR)/gcheck.exe -p 2 32 2 # Target: runFcheck (run the Fortran standalone executable - with C++ MEs - fcheck.exe, with a small number of events) -runFcheck: all.$(TAG) - $(RUNTIME) $(BUILDDIR)/fcheck.exe 2 32 2 +runFcheck: cppbuild + $(RUNTIME) $(CUDACPP_BUILDDIR)/fcheck.exe 2 32 2 # Target: runFGcheck (run the Fortran standalone executable - with CUDA MEs - fgcheck.exe, with a small number of events) -runFGcheck: all.$(TAG) - $(RUNTIME) $(BUILDDIR)/fgcheck.exe 2 32 2 +runFGcheck: AVX=cuda +runFGcheck: + $(MAKE) AVX=cuda cudabuild + $(RUNTIME) $(CUDACPP_BUILDDIR)/fgcheck.exe 2 32 2 # Target: cmpFcheck (compare ME results from the C++ and Fortran with C++ MEs standalone executables, with a small number of events) -cmpFcheck: all.$(TAG) +cmpFcheck: cppbuild @echo - @echo "$(BUILDDIR)/check.exe --common -p 2 32 2" - @echo "$(BUILDDIR)/fcheck.exe 2 32 2" - @me1=$(shell $(RUNTIME) $(BUILDDIR)/check.exe --common -p 2 32 2 | grep MeanMatrix | awk '{print $$4}'); me2=$(shell $(RUNTIME) $(BUILDDIR)/fcheck.exe 2 32 2 | grep Average | awk '{print $$4}'); echo "Avg ME (C++/C++) = $${me1}"; echo "Avg ME (F77/C++) = $${me2}"; if [ "$${me2}" == "NaN" ]; then echo "ERROR! Fortran calculation (F77/C++) returned NaN"; elif [ "$${me2}" == "" ]; then echo "ERROR! Fortran calculation (F77/C++) crashed"; else python3 -c "me1=$${me1}; me2=$${me2}; reldif=abs((me2-me1)/me1); print('Relative difference =', reldif); ok = reldif <= 2E-4; print ( '%s (relative difference %s 2E-4)' % ( ('OK','<=') if ok else ('ERROR','>') ) ); import sys; sys.exit(0 if ok else 1)"; fi + @echo "$(CUDACPP_BUILDDIR)/check.exe --common -p 2 32 2" + @echo "$(CUDACPP_BUILDDIR)/fcheck.exe 2 32 2" + @me1=$(shell $(RUNTIME) $(CUDACPP_BUILDDIR)/check.exe --common -p 2 32 2 | grep MeanMatrix | awk '{print $$4}'); me2=$(shell $(RUNTIME) $(CUDACPP_BUILDDIR)/fcheck.exe 2 32 2 | grep Average | awk '{print $$4}'); echo "Avg ME (C++/C++) = $${me1}"; echo "Avg ME (F77/C++) = $${me2}"; if [ "$${me2}" == "NaN" ]; then echo "ERROR! Fortran calculation (F77/C++) returned NaN"; elif [ "$${me2}" == "" ]; then echo "ERROR! Fortran calculation (F77/C++) crashed"; else python3 -c "me1=$${me1}; me2=$${me2}; reldif=abs((me2-me1)/me1); print('Relative difference =', reldif); ok = reldif <= 2E-4; print ( '%s (relative difference %s 2E-4)' % ( ('OK','<=') if ok else ('ERROR','>') ) ); import sys; sys.exit(0 if ok else 1)"; fi # Target: cmpFGcheck (compare ME results from the CUDA and Fortran with CUDA MEs standalone executables, with a small number of events) -cmpFGcheck: all.$(TAG) +cmpFGcheck: AVX=cuda +cmpFGcheck: + $(MAKE) AVX=cuda cudabuild @echo - @echo "$(BUILDDIR)/gcheck.exe --common -p 2 32 2" - @echo "$(BUILDDIR)/fgcheck.exe 2 32 2" - @me1=$(shell $(RUNTIME) $(BUILDDIR)/gcheck.exe --common -p 2 32 2 | grep MeanMatrix | awk '{print $$4}'); me2=$(shell $(RUNTIME) $(BUILDDIR)/fgcheck.exe 2 32 2 | grep Average | awk '{print $$4}'); echo "Avg ME (C++/CUDA) = $${me1}"; echo "Avg ME (F77/CUDA) = $${me2}"; if [ "$${me2}" == "NaN" ]; then echo "ERROR! Fortran calculation (F77/CUDA) crashed"; elif [ "$${me2}" == "" ]; then echo "ERROR! Fortran calculation (F77/CUDA) crashed"; else python3 -c "me1=$${me1}; me2=$${me2}; reldif=abs((me2-me1)/me1); print('Relative difference =', reldif); ok = reldif <= 2E-4; print ( '%s (relative difference %s 2E-4)' % ( ('OK','<=') if ok else ('ERROR','>') ) ); import sys; sys.exit(0 if ok else 1)"; fi + @echo "$(CUDACPP_BUILDDIR)/gcheck.exe --common -p 2 32 2" + @echo "$(CUDACPP_BUILDDIR)/fgcheck.exe 2 32 2" + @me1=$(shell $(RUNTIME) $(CUDACPP_BUILDDIR)/gcheck.exe --common -p 2 32 2 | grep MeanMatrix | awk '{print $$4}'); me2=$(shell $(RUNTIME) $(CUDACPP_BUILDDIR)/fgcheck.exe 2 32 2 | grep Average | awk '{print $$4}'); echo "Avg ME (C++/CUDA) = $${me1}"; echo "Avg ME (F77/CUDA) = $${me2}"; if [ "$${me2}" == "NaN" ]; then echo "ERROR! Fortran calculation (F77/CUDA) crashed"; elif [ "$${me2}" == "" ]; then echo "ERROR! Fortran calculation (F77/CUDA) crashed"; else python3 -c "me1=$${me1}; me2=$${me2}; reldif=abs((me2-me1)/me1); print('Relative difference =', reldif); ok = reldif <= 2E-4; print ( '%s (relative difference %s 2E-4)' % ( ('OK','<=') if ok else ('ERROR','>') ) ); import sys; sys.exit(0 if ok else 1)"; fi -# Target: memcheck (run the CUDA standalone executable gcheck.exe with a small number of events through cuda-memcheck) -memcheck: all.$(TAG) - $(RUNTIME) $(CUDA_HOME)/bin/cuda-memcheck --check-api-memory-access yes --check-deprecated-instr yes --check-device-heap yes --demangle full --language c --leak-check full --racecheck-report all --report-api-errors all --show-backtrace yes --tool memcheck --track-unused-memory yes $(BUILDDIR)/gcheck.exe -p 2 32 2 - -#------------------------------------------------------------------------------- diff --git a/epochX/cudacpp/gq_ttq.mad/SubProcesses/makefile b/epochX/cudacpp/gq_ttq.mad/SubProcesses/makefile index d572486c2e..d229c1cf4d 100644 --- a/epochX/cudacpp/gq_ttq.mad/SubProcesses/makefile +++ b/epochX/cudacpp/gq_ttq.mad/SubProcesses/makefile @@ -1,19 +1,22 @@ SHELL := /bin/bash -include ../../Source/make_opts -FFLAGS+= -w +# Include general setup +OPTIONS_MAKEFILE := ../../Source/make_opts +include $(OPTIONS_MAKEFILE) # Enable the C preprocessor https://gcc.gnu.org/onlinedocs/gfortran/Preprocessing-Options.html -FFLAGS+= -cpp +MG_FCFLAGS += -cpp +MG_CXXFLAGS += -I. -# Compile counters with -O3 as in the cudacpp makefile (avoid being "unfair" to Fortran #740) -CXXFLAGS = -O3 -Wall -Wshadow -Wextra +all: help cppnative + +# Target if user does not specify target +help: + $(info No target specified.) + $(info Viable targets are 'cppnative' (default), 'cppnone', 'cppsse4', 'cppavx2', 'cpp512y', 'cpp512z' and 'cuda') + $(info Or 'cppall' for all C++ targets) + $(info Or 'ALL' for all C++ and cuda targets) -# Add -std=c++17 explicitly to avoid build errors on macOS -# Add -mmacosx-version-min=11.3 to avoid "ld: warning: object file was built for newer macOS version than being linked" -ifneq ($(shell $(CXX) --version | egrep '^Apple clang'),) -CXXFLAGS += -std=c++17 -mmacosx-version-min=11.3 -endif # Enable ccache if USECCACHE=1 ifeq ($(USECCACHE)$(shell echo $(CXX) | grep ccache),1) @@ -46,34 +49,25 @@ else MADLOOP_LIB = endif -LINKLIBS = $(LINK_MADLOOP_LIB) $(LINK_LOOP_LIBS) -L$(LIBDIR) -ldhelas -ldsample -lmodel -lgeneric -lpdf -lcernlib $(llhapdf) -lbias - -processid_short=$(shell basename $(CURDIR) | awk -F_ '{print $$(NF-1)"_"$$NF}') -CUDACPP_MAKEFILE=cudacpp.mk -# NB1 Using ":=" below instead of "=" is much faster (it only runs the subprocess once instead of many times) -# NB2 Use '|&' in CUDACPP_BUILDDIR to avoid confusing errors about googletest #507 -# NB3 Do not add a comment inlined "CUDACPP_BUILDDIR=$(shell ...) # comment" as otherwise a trailing space is included... -# NB4 The variables relevant to the cudacpp Makefile must be explicitly passed to $(shell...) -CUDACPP_MAKEENV:=$(shell echo '$(.VARIABLES)' | tr " " "\n" | egrep "(USEBUILDDIR|AVX|FPTYPE|HELINL|HRDCOD)") -###$(info CUDACPP_MAKEENV=$(CUDACPP_MAKEENV)) -###$(info $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))")) -CUDACPP_BUILDDIR:=$(shell $(MAKE) $(foreach v,$(CUDACPP_MAKEENV),$(v)="$($(v))") -f $(CUDACPP_MAKEFILE) -pn 2>&1 | awk '/Building/{print $$3}' | sed s/BUILDDIR=//) -ifeq ($(CUDACPP_BUILDDIR),) -$(error CUDACPP_BUILDDIR='$(CUDACPP_BUILDDIR)' should not be empty!) -else -$(info CUDACPP_BUILDDIR='$(CUDACPP_BUILDDIR)') -endif -CUDACPP_COMMONLIB=mg5amc_common -CUDACPP_CXXLIB=mg5amc_$(processid_short)_cpp -CUDACPP_CULIB=mg5amc_$(processid_short)_cuda - +LINKLIBS = $(LINK_MADLOOP_LIB) $(LINK_LOOP_LIBS) -L$(LIBDIR) -ldhelas -ldsample -lmodel -lgeneric -lpdf -lcernlib $(llhapdf) -lbias LIBS = $(LIBDIR)libbias.$(libext) $(LIBDIR)libdhelas.$(libext) $(LIBDIR)libdsample.$(libext) $(LIBDIR)libgeneric.$(libext) $(LIBDIR)libpdf.$(libext) $(LIBDIR)libgammaUPC.$(libext) $(LIBDIR)libmodel.$(libext) $(LIBDIR)libcernlib.$(libext) $(MADLOOP_LIB) $(LOOP_LIBS) ifneq ("$(wildcard ../../Source/RUNNING)","") LINKLIBS += -lrunning - LIBS += $(LIBDIR)librunning.$(libext) + LIBS += $(LIBDIR)librunning.$(libext) endif +SOURCEDIR_GUARD:=../../Source/.timestamp_guard +# We use $(SOURCEDIR_GUARD) to figure out if Source is out of date. The Source makefile doesn't correctly +# update all files, so we need a proxy that is updated every time we run "$(MAKE) -C ../../Source". +$(SOURCEDIR_GUARD) ../../Source/discretesampler.mod &: ../../Source/*.f ../../Cards/param_card.dat ../../Cards/run_card.dat +ifneq ($(shell which flock 2>/dev/null),) + flock ../../Source/.lock -c "$(MAKE) -C ../../Source; touch $(SOURCEDIR_GUARD)" +else + $(MAKE) -C ../../Source; touch $(SOURCEDIR_GUARD) +endif + +$(LIBS): $(SOURCEDIR_GUARD) # Source files @@ -91,82 +85,83 @@ PROCESS= myamp.o genps.o unwgt.o setcuts.o get_color.o \ DSIG=driver.o $(patsubst %.f, %.o, $(filter-out auto_dsig.f, $(wildcard auto_dsig*.f))) DSIG_cudacpp=driver_cudacpp.o $(patsubst %.f, %_cudacpp.o, $(filter-out auto_dsig.f, $(wildcard auto_dsig*.f))) -SYMMETRY = symmetry.o idenparts.o +SYMMETRY = symmetry.o idenparts.o -# Binaries +# cudacpp targets: +CUDACPP_MAKEFILE := cudacpp.mk +ifneq (,$(wildcard $(CUDACPP_MAKEFILE))) +include $(CUDACPP_MAKEFILE) +endif -ifeq ($(UNAME),Darwin) -LDFLAGS += -lc++ # avoid 'Undefined symbols' for chrono::steady_clock on macOS (checked with otool -L libmg5amc_gg_ttx_cpp.so) -LDFLAGS += -mmacosx-version-min=11.3 # avoid "ld: warning: object file was built for newer macOS version than being linked" -else -LDFLAGS += -Wl,--no-relax # avoid 'failed to convert GOTPCREL relocation' error #458 (not supported on macOS) +ifeq ($(CUDACPP_BUILDDIR),) +$(error CUDACPP_BUILDDIR='$(CUDACPP_BUILDDIR)' should not be empty!) endif +CUDACPP_COMMONLIB=mg5amc_common +CUDACPP_CXXLIB := $(CUDACPP_BUILDDIR)/lib$(MG5AMC_CXXLIB).so +CUDACPP_CULIB := $(CUDACPP_BUILDDIR)/lib$(MG5AMC_CULIB).so -all: $(PROG)_fortran $(CUDACPP_BUILDDIR)/$(PROG)_cpp # also builds $(PROG)_cuda if $(CUDACPP_CULIB) exists (#503) +# Set up OpenMP if supported +OMPFLAGS ?= -fopenmp ifneq ($(shell $(CXX) --version | egrep '^Intel'),) -override OMPFLAGS = -fopenmp LINKLIBS += -liomp5 # see #578 LINKLIBS += -lintlc # undefined reference to `_intel_fast_memcpy' else ifneq ($(shell $(CXX) --version | egrep '^clang'),) -override OMPFLAGS = -fopenmp $(CUDACPP_BUILDDIR)/$(PROG)_cpp: LINKLIBS += -L $(shell dirname $(shell $(CXX) -print-file-name=libc++.so)) -lomp # see #604 else ifneq ($(shell $(CXX) --version | egrep '^Apple clang'),) -override OMPFLAGS = # OMP is not supported yet by cudacpp for Apple clang -else -override OMPFLAGS = -fopenmp +OMPFLAGS = # OMP is not supported yet by cudacpp for Apple clang endif -$(PROG)_fortran: $(PROCESS) $(DSIG) auto_dsig.o $(LIBS) $(MATRIX) counters.o ompnumthreads.o - $(FC) -o $(PROG)_fortran $(PROCESS) $(DSIG) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o $(LDFLAGS) - -$(LIBS): .libs -.libs: ../../Cards/param_card.dat ../../Cards/run_card.dat - cd ../../Source; make - touch $@ +# Binaries -$(CUDACPP_BUILDDIR)/.cudacpplibs: - $(MAKE) -f $(CUDACPP_MAKEFILE) - touch $@ +$(PROG)_fortran: $(PROCESS) $(DSIG) auto_dsig.o $(LIBS) $(MATRIX) counters.o ompnumthreads.o + $(FC) $(MG_FCFLAGS) $(FCFLAGS) -o $(PROG)_fortran $(PROCESS) $(DSIG) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o $(LDFLAGS) # On Linux, set rpath to LIBDIR to make it unnecessary to use LD_LIBRARY_PATH # Use relative paths with respect to the executables ($ORIGIN on Linux) # On Darwin, building libraries with absolute paths in LIBDIR makes this unnecessary -ifeq ($(UNAME_S),Darwin) - override LIBFLAGSRPATH = -else ifeq ($(USEBUILDDIR),1) - override LIBFLAGSRPATH = -Wl,-rpath,'$$ORIGIN/../$(LIBDIR)/$(CUDACPP_BUILDDIR)' -else - override LIBFLAGSRPATH = -Wl,-rpath,'$$ORIGIN/$(LIBDIR)' +ifneq ($(UNAME_S),Darwin) + LIBFLAGSRPATH := -Wl,-rpath,'$$ORIGIN:$$ORIGIN/../$(LIBDIR)/$(CUDACPP_BUILDDIR)' endif -.PHONY: madevent_fortran_link madevent_cuda_link madevent_cpp_link +.PHONY: madevent_fortran_link madevent_cuda_link madevent_cpp_link madevent_cppnone_link madevent_cppsse4_link madevent_cppavx2_link madevent_cpp512y_link madevent_cpp512z_link clean cleanall cleansrc madevent_fortran_link: $(PROG)_fortran rm -f $(PROG) ln -s $(PROG)_fortran $(PROG) -madevent_cpp_link: $(CUDACPP_BUILDDIR)/$(PROG)_cpp - rm -f $(PROG) - ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) +madevent_cppnone_link: AVX=none +madevent_cppnone_link: cppnone + ln -sf $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) -madevent_cuda_link: $(CUDACPP_BUILDDIR)/$(PROG)_cuda - rm -f $(PROG) - ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cuda $(PROG) +madevent_cppavx2_link: AVX=avx2 +madevent_cppavx2_link: cppavx2 + ln -sf $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) + +madevent_cpp512y_link: AVX=512y +madevent_cpp512y_link: cppavx512y + ln -sf $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) -# Building $(PROG)_cpp also builds $(PROG)_cuda if $(CUDACPP_CULIB) exists (improved patch for cpp-only builds #503) -$(CUDACPP_BUILDDIR)/$(PROG)_cpp: $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(LIBS) $(MATRIX) counters.o ompnumthreads.o $(CUDACPP_BUILDDIR)/.cudacpplibs - $(FC) -o $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o -L$(LIBDIR)/$(CUDACPP_BUILDDIR) -l$(CUDACPP_COMMONLIB) -l$(CUDACPP_CXXLIB) $(LIBFLAGSRPATH) $(LDFLAGS) - if [ -f $(LIBDIR)/$(CUDACPP_BUILDDIR)/lib$(CUDACPP_CULIB).* ]; then $(FC) -o $(CUDACPP_BUILDDIR)/$(PROG)_cuda $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o -L$(LIBDIR)/$(CUDACPP_BUILDDIR) -l$(CUDACPP_COMMONLIB) -l$(CUDACPP_CULIB) $(LIBFLAGSRPATH) $(LDFLAGS); fi +madevent_cpp512z_link: AVX=512z +madevent_cpp512z_link: cppavx512z + ln -sf $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) -$(CUDACPP_BUILDDIR)/$(PROG)_cuda: $(CUDACPP_BUILDDIR)/$(PROG)_cpp +madevent_cuda_link: AVX=cuda +madevent_cuda_link: cuda + ln -sf $(CUDACPP_BUILDDIR)/$(PROG)_cuda $(PROG) + +$(CUDACPP_BUILDDIR)/$(PROG)_cpp: $(LIBS) $(CUDACPP_CXXLIB) $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) counters.o ompnumthreads.o + $(FC) -o $(CUDACPP_BUILDDIR)/$(PROG)_cpp -L$(LIBDIR)/$(CUDACPP_BUILDDIR) -l$(CUDACPP_COMMONLIB) $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o -L$(CUDACPP_BUILDDIR) -l$(MG5AMC_CXXLIB) $(LIBFLAGSRPATH) $(MG_LDFLAGS) $(LDFLAGS) + +$(CUDACPP_BUILDDIR)/$(PROG)_cuda: $(LIBS) $(CUDACPP_CULIB) $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) counters.o ompnumthreads.o + $(FC) -o $(CUDACPP_BUILDDIR)/$(PROG)_cuda -L$(LIBDIR)/$(CUDACPP_BUILDDIR) -l$(CUDACPP_COMMONLIB) $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o -L$(CUDACPP_BUILDDIR) -l$(MG5AMC_CULIB) $(LIBFLAGSRPATH) $(MG_LDFLAGS) $(LDFLAGS) counters.o: counters.cc timer.h - $(CXX) $(CXXFLAGS) -c $< -o $@ + $(CXX) $(MG_CXXFLAGS) $(CXXFLAGS) -c $< -o $@ ompnumthreads.o: ompnumthreads.cc ompnumthreads.h - $(CXX) -I. $(CXXFLAGS) $(OMPFLAGS) -c $< -o $@ + $(CXX) $(MG_CXXFLAGS) $(CXXFLAGS) $(OMPFLAGS) -c $< -o $@ $(PROG)_forhel: $(PROCESS) auto_dsig.o $(LIBS) $(MATRIX_HEL) $(FC) -o $(PROG)_forhel $(PROCESS) $(MATRIX_HEL) $(LINKLIBS) $(LDFLAGS) $(BIASDEPENDENCIES) $(OMPFLAGS) @@ -174,27 +169,14 @@ $(PROG)_forhel: $(PROCESS) auto_dsig.o $(LIBS) $(MATRIX_HEL) gensym: $(SYMMETRY) configs.inc $(LIBS) $(FC) -o gensym $(SYMMETRY) -L$(LIBDIR) $(LINKLIBS) $(LDFLAGS) -###ifeq (,$(wildcard fbridge.inc)) # Pointless: fbridge.inc always exists as this is the cudacpp-modified makefile! -###$(LIBDIR)libmodel.$(libext): ../../Cards/param_card.dat -### cd ../../Source/MODEL; make -### -###$(LIBDIR)libgeneric.$(libext): ../../Cards/run_card.dat -### cd ../../Source; make -### -###$(LIBDIR)libpdf.$(libext): -### cd ../../Source/PDF; make -### -###$(LIBDIR)libgammaUPC.$(libext): -### cd ../../Source/PDF/gammaUPC; make -###endif # Add source so that the compiler finds the DiscreteSampler module. $(MATRIX): %.o: %.f - $(FC) $(FFLAGS) $(MATRIX_FLAG) -c $< -I../../Source/ -I../../Source/PDF/gammaUPC -%.o: %.f - $(FC) $(FFLAGS) -c $< -I../../Source/ -I../../Source/PDF/gammaUPC + $(FC) $(MG_FCFLAGS) $(FCFLAGS) $(MATRIX_FLAG) -c $< -I../../Source/ -I../../Source/PDF/gammaUPC +%.o $(CUDACPP_BUILDDIR)/%.o: %.f + $(FC) $(MG_FCFLAGS) $(FCFLAGS) -I../../Source/ -I../../Source/PDF/gammaUPC -c $< -o $@ %_cudacpp.o: %.f - $(FC) $(FFLAGS) -c -DMG5AMC_MEEXPORTER_CUDACPP $< -I../../Source/ $(OMPFLAGS) -o $@ + $(FC) $(MG_FCFLAGS) $(FCFLAGS) -c -DMG5AMC_MEEXPORTER_CUDACPP $< -I../../Source/ $(OMPFLAGS) -o $@ # Dependencies @@ -215,60 +197,42 @@ unwgt.o: genps.inc nexternal.inc symswap.inc cluster.inc run.inc message.inc \ initcluster.o: message.inc # Extra dependencies on discretesampler.mod +../../Source/discretesampler.mod: ../../Source/DiscreteSampler.f -auto_dsig.o: .libs -driver.o: .libs -driver_cudacpp.o: .libs -$(MATRIX): .libs -genps.o: .libs +auto_dsig.o: ../../Source/discretesampler.mod +driver.o: ../../Source/discretesampler.mod +driver_cudacpp.o: ../../Source/discretesampler.mod +$(MATRIX): ../../Source/discretesampler.mod +genps.o: ../../Source/discretesampler.mod # Cudacpp avxall targets -UNAME_P := $(shell uname -p) ifeq ($(UNAME_P),ppc64le) -avxall: avxnone avxsse4 +cppall: cppnative cppnone cppsse4 else ifeq ($(UNAME_P),arm) -avxall: avxnone avxsse4 +cppall: cppnative cppnone cppsse4 else -avxall: avxnone avxsse4 avxavx2 avx512y avx512z +cppall: cppnative cppnone cppsse4 cppavx2 cppavx512y cppavx512z endif -avxnone: $(PROG)_fortran $(DSIG_cudacpp) - @echo - $(MAKE) USEBUILDDIR=1 AVX=none - -avxsse4: $(PROG)_fortran $(DSIG_cudacpp) - @echo - $(MAKE) USEBUILDDIR=1 AVX=sse4 - -avxavx2: $(PROG)_fortran $(DSIG_cudacpp) - @echo - $(MAKE) USEBUILDDIR=1 AVX=avx2 - -avx512y: $(PROG)_fortran $(DSIG_cudacpp) - @echo - $(MAKE) USEBUILDDIR=1 AVX=512y - -avx512z: $(PROG)_fortran $(DSIG_cudacpp) - @echo - $(MAKE) USEBUILDDIR=1 AVX=512z - -###endif - -# Clean (NB: 'make clean' in Source calls 'make clean' in all P*) +ALL: cppall cuda -clean: # Clean builds: fortran in this Pn; cudacpp executables for one AVX in this Pn - $(RM) *.o gensym $(PROG) $(PROG)_fortran $(PROG)_forhel $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(CUDACPP_BUILDDIR)/$(PROG)_cuda +# Clean all architecture-specific builds: +clean: + $(RM) *.o gensym $(PROG) $(PROG)_* + $(RM) -rf build.*/*{.o,.so,.exe,.dylib,madevent_*} + @for dir in build.*; do if [ -z "$$(ls -A $${dir})" ]; then rm -r $${dir}; else echo "Not cleaning $${dir}; not empty"; fi; done -cleanavxs: clean # Clean builds: fortran in this Pn; cudacpp for all AVX in this Pn and in src - $(MAKE) -f $(CUDACPP_MAKEFILE) cleanall - rm -f $(CUDACPP_BUILDDIR)/.cudacpplibs - rm -f .libs +cleanall: cleansrc + for PROCESS in ../P[0-9]*; do $(MAKE) -C $${PROCESS} clean; done -cleanall: # Clean builds: fortran in all P* and in Source; cudacpp for all AVX in all P* and in src - make -C ../../Source cleanall - rm -rf $(LIBDIR)libbias.$(libext) - rm -f ../../Source/*.mod ../../Source/*/*.mod +# Clean one architecture-specific build +clean%: + $(RM) -r build.$*_* -distclean: cleanall # Clean all fortran and cudacpp builds as well as the googletest installation - $(MAKE) -f $(CUDACPP_MAKEFILE) distclean +# Clean common source directories (interferes with other P*) +cleansrc: + make -C ../../Source clean + $(RM) -f $(SOURCEDIR_GUARD) ../../Source/{*.mod,.lock} ../../Source/*/*.mod + $(RM) -r $(LIBDIR)libbias.$(libext) + if [ -d ../../src ]; then $(MAKE) -C ../../src -f cudacpp_src.mk clean; fi diff --git a/epochX/cudacpp/gq_ttq.mad/SubProcesses/runTest.cc b/epochX/cudacpp/gq_ttq.mad/SubProcesses/runTest.cc index d4a760a71b..734235824a 100644 --- a/epochX/cudacpp/gq_ttq.mad/SubProcesses/runTest.cc +++ b/epochX/cudacpp/gq_ttq.mad/SubProcesses/runTest.cc @@ -246,15 +246,15 @@ struct CUDATest : public CUDA_CPU_TestBase #define TESTID_CPU( s ) s##_CPU #define XTESTID_CPU( s ) TESTID_CPU( s ) #define MG_INSTANTIATE_TEST_SUITE_CPU( prefix, test_suite_name ) \ -INSTANTIATE_TEST_SUITE_P( prefix, \ - test_suite_name, \ - testing::Values( new CPUTest( MG_EPOCH_REFERENCE_FILE_NAME ) ) ); + INSTANTIATE_TEST_SUITE_P( prefix, \ + test_suite_name, \ + testing::Values( new CPUTest( MG_EPOCH_REFERENCE_FILE_NAME ) ) ); #define TESTID_GPU( s ) s##_GPU #define XTESTID_GPU( s ) TESTID_GPU( s ) #define MG_INSTANTIATE_TEST_SUITE_GPU( prefix, test_suite_name ) \ -INSTANTIATE_TEST_SUITE_P( prefix, \ - test_suite_name, \ - testing::Values( new CUDATest( MG_EPOCH_REFERENCE_FILE_NAME ) ) ); + INSTANTIATE_TEST_SUITE_P( prefix, \ + test_suite_name, \ + testing::Values( new CUDATest( MG_EPOCH_REFERENCE_FILE_NAME ) ) ); #ifdef __CUDACC__ MG_INSTANTIATE_TEST_SUITE_GPU( XTESTID_GPU( MG_EPOCH_PROCESS_ID ), MadgraphTest ); diff --git a/epochX/cudacpp/gq_ttq.mad/SubProcesses/testxxx.cc b/epochX/cudacpp/gq_ttq.mad/SubProcesses/testxxx.cc index 3361fe5aa9..1d315f6d75 100644 --- a/epochX/cudacpp/gq_ttq.mad/SubProcesses/testxxx.cc +++ b/epochX/cudacpp/gq_ttq.mad/SubProcesses/testxxx.cc @@ -40,7 +40,7 @@ namespace mg5amcCpu { std::string FPEhandlerMessage = "unknown"; int FPEhandlerIevt = -1; - inline void FPEhandler( int sig ) + inline void FPEhandler( int ) { #ifdef __CUDACC__ std::cerr << "Floating Point Exception (GPU): '" << FPEhandlerMessage << "' ievt=" << FPEhandlerIevt << std::endl; @@ -71,11 +71,10 @@ TEST( XTESTID( MG_EPOCH_PROCESS_ID ), testxxx ) constexpr bool testEvents = !dumpEvents; // run the test? constexpr fptype toleranceXXXs = std::is_same::value ? 1.E-15 : 1.E-5; // Constant parameters - constexpr int neppM = MemoryAccessMomenta::neppM; // AOSOA layout constexpr int np4 = CPPProcess::np4; - const int nevt = 32; // 12 independent tests plus 20 duplicates (need a multiple of 16 for floats '512z') - assert( nevt % neppM == 0 ); // nevt must be a multiple of neppM - assert( nevt % neppV == 0 ); // nevt must be a multiple of neppV + const int nevt = 32; // 12 independent tests plus 20 duplicates (need a multiple of 16 for floats '512z') + assert( nevt % MemoryAccessMomenta::neppM == 0 ); // nevt must be a multiple of neppM + assert( nevt % neppV == 0 ); // nevt must be a multiple of neppV // Fill in the input momenta #ifdef __CUDACC__ mg5amcGpu::PinnedHostBufferMomenta hstMomenta( nevt ); // AOSOA[npagM][npar=4][np4=4][neppM] diff --git a/epochX/cudacpp/gq_ttq.mad/bin/internal/banner.py b/epochX/cudacpp/gq_ttq.mad/bin/internal/banner.py index bd1517985f..b408679c2f 100755 --- a/epochX/cudacpp/gq_ttq.mad/bin/internal/banner.py +++ b/epochX/cudacpp/gq_ttq.mad/bin/internal/banner.py @@ -2,11 +2,11 @@ # # Copyright (c) 2011 The MadGraph5_aMC@NLO Development team and Contributors # -# This file is a part of the MadGraph5_aMC@NLO project, an application which +# This file is a part of the MadGraph5_aMC@NLO project, an application which # automatically generates Feynman diagrams and matrix elements for arbitrary # high-energy processes in the Standard Model and beyond. # -# It is subject to the MadGraph5_aMC@NLO license which should accompany this +# It is subject to the MadGraph5_aMC@NLO license which should accompany this # distribution. # # For more information, visit madgraph.phys.ucl.ac.be and amcatnlo.web.cern.ch @@ -53,7 +53,7 @@ MADEVENT = False import madgraph.various.misc as misc import madgraph.iolibs.file_writers as file_writers - import madgraph.iolibs.files as files + import madgraph.iolibs.files as files import models.check_param_card as param_card_reader from madgraph import MG5DIR, MadGraph5Error, InvalidCmd @@ -80,36 +80,36 @@ class Banner(dict): 'mgproccard': 'MGProcCard', 'mgruncard': 'MGRunCard', 'ma5card_parton' : 'MA5Card_parton', - 'ma5card_hadron' : 'MA5Card_hadron', + 'ma5card_hadron' : 'MA5Card_hadron', 'mggenerationinfo': 'MGGenerationInfo', 'mgpythiacard': 'MGPythiaCard', 'mgpgscard': 'MGPGSCard', 'mgdelphescard': 'MGDelphesCard', 'mgdelphestrigger': 'MGDelphesTrigger', 'mgshowercard': 'MGShowerCard' } - + forbid_cdata = ['initrwgt'] - + def __init__(self, banner_path=None): """ """ if isinstance(banner_path, Banner): dict.__init__(self, banner_path) self.lhe_version = banner_path.lhe_version - return + return else: dict.__init__(self) - + #Look at the version if MADEVENT: self['mgversion'] = '#%s\n' % open(pjoin(MEDIR, 'MGMEVersion.txt')).read() else: info = misc.get_pkg_info() self['mgversion'] = info['version']+'\n' - + self.lhe_version = None - + if banner_path: self.read_banner(banner_path) @@ -123,7 +123,7 @@ def __init__(self, banner_path=None): 'mgruncard':'run_card.dat', 'mgpythiacard':'pythia_card.dat', 'mgpgscard' : 'pgs_card.dat', - 'mgdelphescard':'delphes_card.dat', + 'mgdelphescard':'delphes_card.dat', 'mgdelphestrigger':'delphes_trigger.dat', 'mg5proccard':'proc_card_mg5.dat', 'mgproccard': 'proc_card.dat', @@ -137,10 +137,10 @@ def __init__(self, banner_path=None): 'mgshowercard':'shower_card.dat', 'pythia8':'pythia8_card.dat', 'ma5card_parton':'madanalysis5_parton_card.dat', - 'ma5card_hadron':'madanalysis5_hadron_card.dat', + 'ma5card_hadron':'madanalysis5_hadron_card.dat', 'run_settings':'' } - + def read_banner(self, input_path): """read a banner""" @@ -151,7 +151,7 @@ def read_banner(self, input_path): def split_iter(string): return (x.groups(0)[0] for x in re.finditer(r"([^\n]*\n)", string, re.DOTALL)) input_path = split_iter(input_path) - + text = '' store = False for line in input_path: @@ -170,13 +170,13 @@ def split_iter(string): text += line else: text += '%s%s' % (line, '\n') - - #reaching end of the banner in a event file avoid to read full file + + #reaching end of the banner in a event file avoid to read full file if "
" in line: break elif "" in line: break - + def __getattribute__(self, attr): """allow auto-build for the run_card/param_card/... """ try: @@ -187,23 +187,23 @@ def __getattribute__(self, attr): return self.charge_card(attr) - + def change_lhe_version(self, version): """change the lhe version associate to the banner""" - + version = float(version) if version < 3: version = 1 elif version > 3: raise Exception("Not Supported version") self.lhe_version = version - + def get_cross(self, witherror=False): """return the cross-section of the file""" if "init" not in self: raise Exception - + text = self["init"].split('\n') cross = 0 error = 0 @@ -217,13 +217,13 @@ def get_cross(self, witherror=False): return cross else: return cross, math.sqrt(error) - + def scale_init_cross(self, ratio): """modify the init information with the associate scale""" assert "init" in self - + all_lines = self["init"].split('\n') new_data = [] new_data.append(all_lines[0]) @@ -231,29 +231,29 @@ def scale_init_cross(self, ratio): line = all_lines[i] split = line.split() if len(split) == 4: - xsec, xerr, xmax, pid = split + xsec, xerr, xmax, pid = split else: new_data += all_lines[i:] break pid = int(pid) - + line = " %+13.7e %+13.7e %+13.7e %i" % \ (ratio*float(xsec), ratio* float(xerr), ratio*float(xmax), pid) new_data.append(line) self['init'] = '\n'.join(new_data) - + def get_pdg_beam(self): """return the pdg of each beam""" - + assert "init" in self - + all_lines = self["init"].split('\n') pdg1,pdg2,_ = all_lines[0].split(None, 2) return int(pdg1), int(pdg2) - + def load_basic(self, medir): """ Load the proc_card /param_card and run_card """ - + self.add(pjoin(medir,'Cards', 'param_card.dat')) self.add(pjoin(medir,'Cards', 'run_card.dat')) if os.path.exists(pjoin(medir, 'SubProcesses', 'procdef_mg5.dat')): @@ -261,29 +261,29 @@ def load_basic(self, medir): self.add(pjoin(medir,'Cards', 'proc_card_mg5.dat')) else: self.add(pjoin(medir,'Cards', 'proc_card.dat')) - + def change_seed(self, seed): """Change the seed value in the banner""" # 0 = iseed p = re.compile(r'''^\s*\d+\s*=\s*iseed''', re.M) new_seed_str = " %s = iseed" % seed self['mgruncard'] = p.sub(new_seed_str, self['mgruncard']) - + def add_generation_info(self, cross, nb_event): """add info on MGGeneration""" - + text = """ # Number of Events : %s # Integrated weight (pb) : %s """ % (nb_event, cross) self['MGGenerationInfo'] = text - + ############################################################################ # SPLIT BANNER ############################################################################ def split(self, me_dir, proc_card=True): """write the banner in the Cards directory. - proc_card argument is present to avoid the overwrite of proc_card + proc_card argument is present to avoid the overwrite of proc_card information""" for tag, text in self.items(): @@ -305,37 +305,37 @@ def check_pid(self, pid2label): """special routine removing width/mass of particles not present in the model This is usefull in case of loop model card, when we want to use the non loop model.""" - + if not hasattr(self, 'param_card'): self.charge_card('slha') - + for tag in ['mass', 'decay']: block = self.param_card.get(tag) for data in block: pid = data.lhacode[0] - if pid not in list(pid2label.keys()): + if pid not in list(pid2label.keys()): block.remove((pid,)) def get_lha_strategy(self): """get the lha_strategy: how the weight have to be handle by the shower""" - + if not self["init"]: raise Exception("No init block define") - + data = self["init"].split('\n')[0].split() if len(data) != 10: misc.sprint(len(data), self['init']) raise Exception("init block has a wrong format") return int(float(data[-2])) - + def set_lha_strategy(self, value): """set the lha_strategy: how the weight have to be handle by the shower""" - + if not (-4 <= int(value) <= 4): six.reraise(Exception, "wrong value for lha_strategy", value) if not self["init"]: raise Exception("No init block define") - + all_lines = self["init"].split('\n') data = all_lines[0].split() if len(data) != 10: @@ -351,13 +351,13 @@ def modify_init_cross(self, cross, allow_zero=False): assert isinstance(cross, dict) # assert "all" in cross assert "init" in self - + cross = dict(cross) for key in cross.keys(): if isinstance(key, str) and key.isdigit() and int(key) not in cross: cross[int(key)] = cross[key] - - + + all_lines = self["init"].split('\n') new_data = [] new_data.append(all_lines[0]) @@ -365,7 +365,7 @@ def modify_init_cross(self, cross, allow_zero=False): line = all_lines[i] split = line.split() if len(split) == 4: - xsec, xerr, xmax, pid = split + xsec, xerr, xmax, pid = split else: new_data += all_lines[i:] break @@ -383,23 +383,23 @@ def modify_init_cross(self, cross, allow_zero=False): (float(cross[pid]), ratio* float(xerr), ratio*float(xmax), pid) new_data.append(line) self['init'] = '\n'.join(new_data) - + ############################################################################ # WRITE BANNER ############################################################################ def write(self, output_path, close_tag=True, exclude=[]): """write the banner""" - + if isinstance(output_path, str): ff = open(output_path, 'w') else: ff = output_path - + if MADEVENT: header = open(pjoin(MEDIR, 'Source', 'banner_header.txt')).read() else: header = open(pjoin(MG5DIR,'Template', 'LO', 'Source', 'banner_header.txt')).read() - + if not self.lhe_version: self.lhe_version = self.get('run_card', 'lhe_version', default=1.0) if float(self.lhe_version) < 3: @@ -412,7 +412,7 @@ def write(self, output_path, close_tag=True, exclude=[]): for tag in [t for t in self.ordered_items if t in list(self.keys())]+ \ [t for t in self.keys() if t not in self.ordered_items]: - if tag in ['init'] or tag in exclude: + if tag in ['init'] or tag in exclude: continue capitalized_tag = self.capitalized_items[tag] if tag in self.capitalized_items else tag start_data, stop_data = '', '' @@ -422,19 +422,19 @@ def write(self, output_path, close_tag=True, exclude=[]): stop_data = ']]>\n' out = '<%(tag)s>%(start_data)s\n%(text)s\n%(stop_data)s\n' % \ {'tag':capitalized_tag, 'text':self[tag].strip(), - 'start_data': start_data, 'stop_data':stop_data} + 'start_data': start_data, 'stop_data':stop_data} try: ff.write(out) except: ff.write(out.encode('utf-8')) - - + + if not '/header' in exclude: out = '\n' try: ff.write(out) except: - ff.write(out.encode('utf-8')) + ff.write(out.encode('utf-8')) if 'init' in self and not 'init' in exclude: text = self['init'] @@ -444,22 +444,22 @@ def write(self, output_path, close_tag=True, exclude=[]): ff.write(out) except: ff.write(out.encode('utf-8')) - + if close_tag: - out = '\n' + out = '\n' try: ff.write(out) except: - ff.write(out.encode('utf-8')) + ff.write(out.encode('utf-8')) return ff - - + + ############################################################################ # BANNER ############################################################################ def add(self, path, tag=None): """Add the content of the file to the banner""" - + if not tag: card_name = os.path.basename(path) if 'param_card' in card_name: @@ -505,33 +505,33 @@ def add_text(self, tag, text): if tag == 'param_card': tag = 'slha' elif tag == 'run_card': - tag = 'mgruncard' + tag = 'mgruncard' elif tag == 'proc_card': - tag = 'mg5proccard' + tag = 'mg5proccard' elif tag == 'shower_card': tag = 'mgshowercard' elif tag == 'FO_analyse_card': tag = 'foanalyse' - + self[tag.lower()] = text - - + + def charge_card(self, tag): """Build the python object associated to the card""" - + if tag in ['param_card', 'param']: tag = 'slha' elif tag in ['run_card', 'run']: - tag = 'mgruncard' + tag = 'mgruncard' elif tag == 'proc_card': - tag = 'mg5proccard' + tag = 'mg5proccard' elif tag == 'shower_card': tag = 'mgshowercard' elif tag == 'FO_analyse_card': tag = 'foanalyse' assert tag in ['slha', 'mgruncard', 'mg5proccard', 'mgshowercard', 'foanalyse'], 'invalid card %s' % tag - + if tag == 'slha': param_card = self[tag].split('\n') self.param_card = param_card_reader.ParamCard(param_card) @@ -544,56 +544,56 @@ def charge_card(self, tag): self.proc_card = ProcCard(proc_card) return self.proc_card elif tag =='mgshowercard': - shower_content = self[tag] + shower_content = self[tag] if MADEVENT: import internal.shower_card as shower_card else: import madgraph.various.shower_card as shower_card self.shower_card = shower_card.ShowerCard(shower_content, True) - # set testing to false (testing = true allow to init using + # set testing to false (testing = true allow to init using # the card content instead of the card path" self.shower_card.testing = False return self.shower_card elif tag =='foanalyse': - analyse_content = self[tag] + analyse_content = self[tag] if MADEVENT: import internal.FO_analyse_card as FO_analyse_card else: import madgraph.various.FO_analyse_card as FO_analyse_card - # set testing to false (testing = true allow to init using + # set testing to false (testing = true allow to init using # the card content instead of the card path" self.FOanalyse_card = FO_analyse_card.FOAnalyseCard(analyse_content, True) self.FOanalyse_card.testing = False return self.FOanalyse_card - + def get_detail(self, tag, *arg, **opt): """return a specific """ - + if tag in ['param_card', 'param']: tag = 'slha' attr_tag = 'param_card' elif tag in ['run_card', 'run']: - tag = 'mgruncard' + tag = 'mgruncard' attr_tag = 'run_card' elif tag == 'proc_card': - tag = 'mg5proccard' + tag = 'mg5proccard' attr_tag = 'proc_card' elif tag == 'model': - tag = 'mg5proccard' + tag = 'mg5proccard' attr_tag = 'proc_card' arg = ('model',) elif tag == 'generate': - tag = 'mg5proccard' + tag = 'mg5proccard' attr_tag = 'proc_card' arg = ('generate',) elif tag == 'shower_card': tag = 'mgshowercard' attr_tag = 'shower_card' assert tag in ['slha', 'mgruncard', 'mg5proccard', 'shower_card'], '%s not recognized' % tag - + if not hasattr(self, attr_tag): - self.charge_card(attr_tag) + self.charge_card(attr_tag) card = getattr(self, attr_tag) if len(arg) == 0: @@ -613,7 +613,7 @@ def get_detail(self, tag, *arg, **opt): if 'default' in opt: return opt['default'] else: - raise + raise elif len(arg) == 2 and tag == 'slha': try: return card[arg[0]].get(arg[1:]) @@ -621,15 +621,15 @@ def get_detail(self, tag, *arg, **opt): if 'default' in opt: return opt['default'] else: - raise + raise elif len(arg) == 0: return card else: raise Exception("Unknow command") - + #convenient alias get = get_detail - + def set(self, tag, *args): """modify one of the cards""" @@ -637,27 +637,27 @@ def set(self, tag, *args): tag = 'slha' attr_tag = 'param_card' elif tag == 'run_card': - tag = 'mgruncard' + tag = 'mgruncard' attr_tag = 'run_card' elif tag == 'proc_card': - tag = 'mg5proccard' + tag = 'mg5proccard' attr_tag = 'proc_card' elif tag == 'model': - tag = 'mg5proccard' + tag = 'mg5proccard' attr_tag = 'proc_card' arg = ('model',) elif tag == 'generate': - tag = 'mg5proccard' + tag = 'mg5proccard' attr_tag = 'proc_card' arg = ('generate',) elif tag == 'shower_card': tag = 'mgshowercard' attr_tag = 'shower_card' assert tag in ['slha', 'mgruncard', 'mg5proccard', 'shower_card'], 'not recognized' - + if not hasattr(self, attr_tag): - self.charge_card(attr_tag) - + self.charge_card(attr_tag) + card = getattr(self, attr_tag) if len(args) ==2: if tag == 'mg5proccard': @@ -666,20 +666,20 @@ def set(self, tag, *args): card[args[0]] = args[1] else: card[args[:-1]] = args[-1] - - + + @misc.multiple_try() def add_to_file(self, path, seed=None, out=None): """Add the banner to a file and change the associate seed in the banner""" if seed is not None: self.set("run_card", "iseed", seed) - + if not out: path_out = "%s.tmp" % path else: path_out = out - + ff = self.write(path_out, close_tag=False, exclude=['MGGenerationInfo', '/header', 'init']) ff.write("## END BANNER##\n") @@ -698,44 +698,44 @@ def add_to_file(self, path, seed=None, out=None): files.mv(path_out, path) - + def split_banner(banner_path, me_dir, proc_card=True): """a simple way to split a banner""" - + banner = Banner(banner_path) banner.split(me_dir, proc_card) - + def recover_banner(results_object, level, run=None, tag=None): """as input we receive a gen_crossxhtml.AllResults object. This define the current banner and load it """ - + if not run: - try: - _run = results_object.current['run_name'] - _tag = results_object.current['tag'] + try: + _run = results_object.current['run_name'] + _tag = results_object.current['tag'] except Exception: return Banner() else: _run = run if not tag: - try: - _tag = results_object[run].tags[-1] + try: + _tag = results_object[run].tags[-1] except Exception as error: if os.path.exists( pjoin(results_object.path,'Events','%s_banner.txt' % (run))): tag = None else: - return Banner() + return Banner() else: _tag = tag - - path = results_object.path - if tag: + + path = results_object.path + if tag: banner_path = pjoin(path,'Events',run,'%s_%s_banner.txt' % (run, tag)) else: banner_path = pjoin(results_object.path,'Events','%s_banner.txt' % (run)) - + if not os.path.exists(banner_path): if level != "parton" and tag != _tag: return recover_banner(results_object, level, _run, results_object[_run].tags[0]) @@ -754,12 +754,12 @@ def recover_banner(results_object, level, run=None, tag=None): return Banner(lhe.banner) # security if the banner was remove (or program canceled before created it) - return Banner() - + return Banner() + banner = Banner(banner_path) - - - + + + if level == 'pythia': if 'mgpythiacard' in banner: del banner['mgpythiacard'] @@ -768,13 +768,13 @@ def recover_banner(results_object, level, run=None, tag=None): if tag in banner: del banner[tag] return banner - + class InvalidRunCard(InvalidCmd): pass class ProcCard(list): """Basic Proccard object""" - + history_header = \ '#************************************************************\n' + \ '#* MadGraph5_aMC@NLO *\n' + \ @@ -798,10 +798,10 @@ class ProcCard(list): '#* run as ./bin/mg5_aMC filename *\n' + \ '#* *\n' + \ '#************************************************************\n' - - - - + + + + def __init__(self, init=None): """ initialize a basic proc_card""" self.info = {'model': 'sm', 'generate':None, @@ -810,13 +810,13 @@ def __init__(self, init=None): if init: self.read(init) - + def read(self, init): """read the proc_card and save the information""" - + if isinstance(init, str): #path to file init = open(init, 'r') - + store_line = '' for line in init: line = line.rstrip() @@ -828,28 +828,28 @@ def read(self, init): store_line = "" if store_line: raise Exception("WRONG CARD FORMAT") - - + + def move_to_last(self, cmd): """move an element to the last history.""" for line in self[:]: if line.startswith(cmd): self.remove(line) list.append(self, line) - + def append(self, line): """"add a line in the proc_card perform automatically cleaning""" - + line = line.strip() cmds = line.split() if len(cmds) == 0: return - + list.append(self, line) - + # command type: cmd = cmds[0] - + if cmd == 'output': # Remove previous outputs from history self.clean(allow_for_removal = ['output'], keep_switch=True, @@ -875,7 +875,7 @@ def append(self, line): elif cmds[1] == 'proc_v4': #full cleaning self[:] = [] - + def clean(self, to_keep=['set','add','load'], remove_bef_last=None, @@ -884,13 +884,13 @@ def clean(self, to_keep=['set','add','load'], keep_switch=False): """Remove command in arguments from history. All command before the last occurrence of 'remove_bef_last' - (including it) will be removed (but if another options tells the opposite). + (including it) will be removed (but if another options tells the opposite). 'to_keep' is a set of line to always keep. - 'to_remove' is a set of line to always remove (don't care about remove_bef_ + 'to_remove' is a set of line to always remove (don't care about remove_bef_ status but keep_switch acts.). - if 'allow_for_removal' is define only the command in that list can be + if 'allow_for_removal' is define only the command in that list can be remove of the history for older command that remove_bef_lb1. all parameter - present in to_remove are always remove even if they are not part of this + present in to_remove are always remove even if they are not part of this list. keep_switch force to keep the statement remove_bef_??? which changes starts the removal mode. @@ -900,8 +900,8 @@ def clean(self, to_keep=['set','add','load'], if __debug__ and allow_for_removal: for arg in to_keep: assert arg not in allow_for_removal - - + + nline = -1 removal = False #looping backward @@ -912,7 +912,7 @@ def clean(self, to_keep=['set','add','load'], if not removal and remove_bef_last: if self[nline].startswith(remove_bef_last): removal = True - switch = True + switch = True # if this is the switch and is protected pass to the next element if switch and keep_switch: @@ -923,12 +923,12 @@ def clean(self, to_keep=['set','add','load'], if any([self[nline].startswith(arg) for arg in to_remove]): self.pop(nline) continue - + # Only if removal mode is active! if removal: if allow_for_removal: # Only a subset of command can be removed - if any([self[nline].startswith(arg) + if any([self[nline].startswith(arg) for arg in allow_for_removal]): self.pop(nline) continue @@ -936,10 +936,10 @@ def clean(self, to_keep=['set','add','load'], # All command have to be remove but protected self.pop(nline) continue - + # update the counter to pass to the next element nline -= 1 - + def get(self, tag, default=None): if isinstance(tag, int): list.__getattr__(self, tag) @@ -954,32 +954,32 @@ def get(self, tag, default=None): except ValueError: name, content = line[7:].split(None,1) out.append((name, content)) - return out + return out else: return self.info[tag] - + def write(self, path): """write the proc_card to a given path""" - + fsock = open(path, 'w') fsock.write(self.history_header) for line in self: while len(line) > 70: - sub, line = line[:70]+"\\" , line[70:] + sub, line = line[:70]+"\\" , line[70:] fsock.write(sub+"\n") else: fsock.write(line+"\n") - -class InvalidCardEdition(InvalidCmd): pass - + +class InvalidCardEdition(InvalidCmd): pass + class ConfigFile(dict): """ a class for storing/dealing with input file. - """ + """ def __init__(self, finput=None, **opt): """initialize a new instance. input can be an instance of MadLoopParam, - a file, a path to a file, or simply Nothing""" - + a file, a path to a file, or simply Nothing""" + if isinstance(finput, self.__class__): dict.__init__(self) for key in finput.__dict__: @@ -989,7 +989,7 @@ def __init__(self, finput=None, **opt): return else: dict.__init__(self) - + # Initialize it with all the default value self.user_set = set() self.auto_set = set() @@ -1000,15 +1000,15 @@ def __init__(self, finput=None, **opt): self.comments = {} # comment associated to parameters. can be display via help message # store the valid options for a given parameter. self.allowed_value = {} - + self.default_setup() self.plugin_input(finput) - + # if input is define read that input if isinstance(finput, (file, str, StringIO.StringIO)): self.read(finput, **opt) - + @@ -1028,7 +1028,7 @@ def __add__(self, other): base = self.__class__(self) #base = copy.copy(self) base.update((key.lower(),value) for key, value in other.items()) - + return base def __radd__(self, other): @@ -1036,26 +1036,26 @@ def __radd__(self, other): new = copy.copy(other) new.update((key, value) for key, value in self.items()) return new - + def __contains__(self, key): return dict.__contains__(self, key.lower()) def __iter__(self): - + for name in super(ConfigFile, self).__iter__(): yield self.lower_to_case[name.lower()] - - + + #iter = super(ConfigFile, self).__iter__() #misc.sprint(iter) #return (self.lower_to_case[name] for name in iter) - + def keys(self): return [name for name in self] - + def items(self): return [(name,self[name]) for name in self] - + @staticmethod def warn(text, level, raiseerror=False): """convenient proxy to raiseerror/print warning""" @@ -1071,11 +1071,11 @@ def warn(text, level, raiseerror=False): log = lambda t: logger.log(level, t) elif level: log = level - + return log(text) def post_set(self, name, value, change_userdefine, raiseerror): - + if value is None: value = self[name] @@ -1087,25 +1087,25 @@ def post_set(self, name, value, change_userdefine, raiseerror): return getattr(self, 'post_set_%s' % name)(value, change_userdefine, raiseerror) else: raise - + def __setitem__(self, name, value, change_userdefine=False,raiseerror=False): """set the attribute and set correctly the type if the value is a string. change_userdefine on True if we have to add the parameter in user_set """ - + if not len(self): #Should never happen but when deepcopy/pickle self.__init__() - + name = name.strip() - lower_name = name.lower() - + lower_name = name.lower() + # 0. check if this parameter is a system only one if change_userdefine and lower_name in self.system_only: text='%s is a private entry which can not be modify by the user. Keep value at %s' % (name,self[name]) self.warn(text, 'critical', raiseerror) return - + #1. check if the parameter is set to auto -> pass it to special if lower_name in self: targettype = type(dict.__getitem__(self, lower_name)) @@ -1115,22 +1115,22 @@ def __setitem__(self, name, value, change_userdefine=False,raiseerror=False): self.user_set.remove(lower_name) #keep old value. self.post_set(lower_name, 'auto', change_userdefine, raiseerror) - return + return elif lower_name in self.auto_set: self.auto_set.remove(lower_name) - + # 2. Find the type of the attribute that we want if lower_name in self.list_parameter: targettype = self.list_parameter[lower_name] - - - + + + if isinstance(value, str): # split for each comma/space value = value.strip() if value.startswith('[') and value.endswith(']'): value = value[1:-1] - #do not perform split within a " or ' block + #do not perform split within a " or ' block data = re.split(r"((? bad input dropped.append(val) - + if not new_values: text= "value '%s' for entry '%s' is not valid. Preserving previous value: '%s'.\n" \ % (value, name, self[lower_name]) text += "allowed values are any list composed of the following entries: %s" % ', '.join([str(i) for i in self.allowed_value[lower_name]]) - return self.warn(text, 'warning', raiseerror) - elif dropped: + return self.warn(text, 'warning', raiseerror) + elif dropped: text = "some value for entry '%s' are not valid. Invalid items are: '%s'.\n" \ % (name, dropped) text += "value will be set to %s" % new_values - text += "allowed items in the list are: %s" % ', '.join([str(i) for i in self.allowed_value[lower_name]]) + text += "allowed items in the list are: %s" % ', '.join([str(i) for i in self.allowed_value[lower_name]]) self.warn(text, 'warning') values = new_values # make the assignment - dict.__setitem__(self, lower_name, values) + dict.__setitem__(self, lower_name, values) if change_userdefine: self.user_set.add(lower_name) #check for specific action - return self.post_set(lower_name, None, change_userdefine, raiseerror) + return self.post_set(lower_name, None, change_userdefine, raiseerror) elif lower_name in self.dict_parameter: - targettype = self.dict_parameter[lower_name] + targettype = self.dict_parameter[lower_name] full_reset = True #check if we just update the current dict or not - + if isinstance(value, str): value = value.strip() # allowed entry: @@ -1209,7 +1209,7 @@ def __setitem__(self, name, value, change_userdefine=False,raiseerror=False): # name , value => just add the entry # name value => just add the entry # {name1:value1, name2:value2} => full reset - + # split for each comma/space if value.startswith('{') and value.endswith('}'): new_value = {} @@ -1219,23 +1219,23 @@ def __setitem__(self, name, value, change_userdefine=False,raiseerror=False): x, y = pair.split(':') x, y = x.strip(), y.strip() if x.startswith(('"',"'")) and x.endswith(x[0]): - x = x[1:-1] + x = x[1:-1] new_value[x] = y value = new_value elif ',' in value: x,y = value.split(',') value = {x.strip():y.strip()} full_reset = False - + elif ':' in value: x,y = value.split(':') value = {x.strip():y.strip()} - full_reset = False + full_reset = False else: x,y = value.split() value = {x:y} - full_reset = False - + full_reset = False + if isinstance(value, dict): for key in value: value[key] = self.format_variable(value[key], targettype, name=name) @@ -1248,7 +1248,7 @@ def __setitem__(self, name, value, change_userdefine=False,raiseerror=False): if change_userdefine: self.user_set.add(lower_name) return self.post_set(lower_name, None, change_userdefine, raiseerror) - elif name in self: + elif name in self: targettype = type(self[name]) else: logger.debug('Trying to add argument %s in %s. ' % (name, self.__class__.__name__) +\ @@ -1256,22 +1256,22 @@ def __setitem__(self, name, value, change_userdefine=False,raiseerror=False): suggestions = [k for k in self.keys() if k.startswith(name[0].lower())] if len(suggestions)>0: logger.debug("Did you mean one of the following: %s"%suggestions) - self.add_param(lower_name, self.format_variable(UnknownType(value), + self.add_param(lower_name, self.format_variable(UnknownType(value), UnknownType, name)) self.lower_to_case[lower_name] = name if change_userdefine: self.user_set.add(lower_name) return self.post_set(lower_name, None, change_userdefine, raiseerror) - + value = self.format_variable(value, targettype, name=name) #check that the value is allowed: if lower_name in self.allowed_value and '*' not in self.allowed_value[lower_name]: valid = False allowed = self.allowed_value[lower_name] - + # check if the current value is allowed or not (set valid to True) if value in allowed: - valid=True + valid=True elif isinstance(value, str): value = value.lower().strip() allowed = [str(v).lower() for v in allowed] @@ -1279,7 +1279,7 @@ def __setitem__(self, name, value, change_userdefine=False,raiseerror=False): i = allowed.index(value) value = self.allowed_value[lower_name][i] valid=True - + if not valid: # act if not valid: text = "value '%s' for entry '%s' is not valid. Preserving previous value: '%s'.\n" \ @@ -1303,7 +1303,7 @@ def add_param(self, name, value, system=False, comment=False, typelist=None, if __debug__: if lower_name in self: raise Exception("Duplicate case for %s in %s" % (name,self.__class__)) - + dict.__setitem__(self, lower_name, value) self.lower_to_case[lower_name] = name if isinstance(value, list): @@ -1318,12 +1318,12 @@ def add_param(self, name, value, system=False, comment=False, typelist=None, elif isinstance(value, dict): allvalues = list(value.values()) if any([type(allvalues[0]) != type(v) for v in allvalues]): - raise Exception("All entry should have the same type") - self.dict_parameter[lower_name] = type(allvalues[0]) + raise Exception("All entry should have the same type") + self.dict_parameter[lower_name] = type(allvalues[0]) if '__type__' in value: del value['__type__'] dict.__setitem__(self, lower_name, value) - + if allowed and allowed != ['*']: self.allowed_value[lower_name] = allowed if lower_name in self.list_parameter: @@ -1333,8 +1333,8 @@ def add_param(self, name, value, system=False, comment=False, typelist=None, assert value in allowed or '*' in allowed #elif isinstance(value, bool) and allowed != ['*']: # self.allowed_value[name] = [True, False] - - + + if system: self.system_only.add(lower_name) if comment: @@ -1342,7 +1342,7 @@ def add_param(self, name, value, system=False, comment=False, typelist=None, def do_help(self, name): """return a minimal help for the parameter""" - + out = "## Information on parameter %s from class %s\n" % (name, self.__class__.__name__) if name.lower() in self: out += "## current value: %s (parameter should be of type %s)\n" % (self[name], type(self[name])) @@ -1351,7 +1351,7 @@ def do_help(self, name): else: out += "## Unknown for this class\n" if name.lower() in self.user_set: - out += "## This value is considered as being set by the user\n" + out += "## This value is considered as being set by the user\n" else: out += "## This value is considered as being set by the system\n" if name.lower() in self.allowed_value: @@ -1359,17 +1359,17 @@ def do_help(self, name): out += "Allowed value are: %s\n" % ','.join([str(p) for p in self.allowed_value[name.lower()]]) else: out += "Suggested value are : %s\n " % ','.join([str(p) for p in self.allowed_value[name.lower()] if p!='*']) - + logger.info(out) return out @staticmethod def guess_type_from_value(value): "try to guess the type of the string --do not use eval as it might not be safe" - + if not isinstance(value, str): return str(value.__class__.__name__) - + #use ast.literal_eval to be safe since value is untrusted # add a timeout to mitigate infinite loop, memory stack attack with misc.stdchannel_redirected(sys.stdout, os.devnull): @@ -1388,7 +1388,7 @@ def guess_type_from_value(value): @staticmethod def format_variable(value, targettype, name="unknown"): """assign the value to the attribute for the given format""" - + if isinstance(targettype, str): if targettype in ['str', 'int', 'float', 'bool']: targettype = eval(targettype) @@ -1412,7 +1412,7 @@ def format_variable(value, targettype, name="unknown"): (name, type(value), targettype, value)) else: raise InvalidCmd("Wrong input type for %s found %s and expecting %s for value %s" %\ - (name, type(value), targettype, value)) + (name, type(value), targettype, value)) else: if targettype != UnknownType: value = value.strip() @@ -1441,8 +1441,8 @@ def format_variable(value, targettype, name="unknown"): value = int(value) elif value.endswith(('k', 'M')) and value[:-1].isdigit(): convert = {'k':1000, 'M':1000000} - value =int(value[:-1]) * convert[value[-1]] - elif '/' in value or '*' in value: + value =int(value[:-1]) * convert[value[-1]] + elif '/' in value or '*' in value: try: split = re.split('(\*|/)',value) v = float(split[0]) @@ -1461,7 +1461,7 @@ def format_variable(value, targettype, name="unknown"): try: value = float(value.replace('d','e')) except ValueError: - raise InvalidCmd("%s can not be mapped to an integer" % value) + raise InvalidCmd("%s can not be mapped to an integer" % value) try: new_value = int(value) except ValueError: @@ -1471,7 +1471,7 @@ def format_variable(value, targettype, name="unknown"): value = new_value else: raise InvalidCmd("incorect input: %s need an integer for %s" % (value,name)) - + elif targettype == float: if value.endswith(('k', 'M')) and value[:-1].isdigit(): convert = {'k':1000, 'M':1000000} @@ -1496,33 +1496,33 @@ def format_variable(value, targettype, name="unknown"): value = v else: raise InvalidCmd("type %s is not handle by the card" % targettype) - + return value - - + + def __getitem__(self, name): - + lower_name = name.lower() if __debug__: if lower_name not in self: if lower_name in [key.lower() for key in self] : raise Exception("Some key are not lower case %s. Invalid use of the class!"\ % [key for key in self if key.lower() != key]) - + if lower_name in self.auto_set: return 'auto' - + return dict.__getitem__(self, name.lower()) - + get = __getitem__ def set(self, name, value, changeifuserset=True, user=False, raiseerror=False): """convenient way to change attribute. changeifuserset=False means that the value is NOT change is the value is not on default. - user=True, means that the value will be marked as modified by the user - (potentially preventing future change to the value) + user=True, means that the value will be marked as modified by the user + (potentially preventing future change to the value) """ # changeifuserset=False -> we need to check if the user force a value. @@ -1530,8 +1530,8 @@ def set(self, name, value, changeifuserset=True, user=False, raiseerror=False): if name.lower() in self.user_set: #value modified by the user -> do nothing return - self.__setitem__(name, value, change_userdefine=user, raiseerror=raiseerror) - + self.__setitem__(name, value, change_userdefine=user, raiseerror=raiseerror) + class RivetCard(ConfigFile): @@ -1706,7 +1706,7 @@ def setRelevantParamCard(self, f_params, f_relparams): yexec_dict = {} yexec_line = exec_line + "yaxis_relvar = " + self['yaxis_relvar'] exec(yexec_line, locals(), yexec_dict) - if self['yaxis_label'] == "": + if self['yaxis_label'] == "": self['yaxis_label'] = "yaxis_relvar" f_relparams.write("{0} = {1}\n".format(self['yaxis_label'], yexec_dict['yaxis_relvar'])) else: @@ -1715,11 +1715,11 @@ def setRelevantParamCard(self, f_params, f_relparams): class ProcCharacteristic(ConfigFile): """A class to handle information which are passed from MadGraph to the madevent - interface.""" - + interface.""" + def default_setup(self): """initialize the directory to the default value""" - + self.add_param('loop_induced', False) self.add_param('has_isr', False) self.add_param('has_fsr', False) @@ -1735,16 +1735,16 @@ def default_setup(self): self.add_param('pdg_initial1', [0]) self.add_param('pdg_initial2', [0]) self.add_param('splitting_types',[], typelist=str) - self.add_param('perturbation_order', [], typelist=str) - self.add_param('limitations', [], typelist=str) - self.add_param('hel_recycling', False) + self.add_param('perturbation_order', [], typelist=str) + self.add_param('limitations', [], typelist=str) + self.add_param('hel_recycling', False) self.add_param('single_color', True) - self.add_param('nlo_mixed_expansion', True) + self.add_param('nlo_mixed_expansion', True) def read(self, finput): - """Read the input file, this can be a path to a file, + """Read the input file, this can be a path to a file, a file object, a str with the content of the file.""" - + if isinstance(finput, str): if "\n" in finput: finput = finput.split('\n') @@ -1752,49 +1752,49 @@ def read(self, finput): finput = open(finput) else: raise Exception("No such file %s" % finput) - + for line in finput: if '#' in line: line = line.split('#',1)[0] if not line: continue - + if '=' in line: key, value = line.split('=',1) self[key.strip()] = value - + def write(self, outputpath): """write the file""" template ="# Information about the process #\n" template +="#########################################\n" - + fsock = open(outputpath, 'w') fsock.write(template) - + for key, value in self.items(): fsock.write(" %s = %s \n" % (key, value)) - - fsock.close() - + + fsock.close() + class GridpackCard(ConfigFile): """an object for the GridpackCard""" - + def default_setup(self): """default value for the GridpackCard""" - + self.add_param("GridRun", True) self.add_param("gevents", 2500) self.add_param("gseed", 1) - self.add_param("ngran", -1) - + self.add_param("ngran", -1) + def read(self, finput): - """Read the input file, this can be a path to a file, + """Read the input file, this can be a path to a file, a file object, a str with the content of the file.""" - + if isinstance(finput, str): if "\n" in finput: finput = finput.split('\n') @@ -1802,7 +1802,7 @@ def read(self, finput): finput = open(finput) else: raise Exception("No such file %s" % finput) - + for line in finput: line = line.split('#')[0] line = line.split('!')[0] @@ -1812,19 +1812,19 @@ def read(self, finput): self[line[1].strip()] = line[0].replace('\'','').strip() def write(self, output_file, template=None): - """Write the run_card in output_file according to template + """Write the run_card in output_file according to template (a path to a valid run_card)""" if not template: if not MADEVENT: - template = pjoin(MG5DIR, 'Template', 'LO', 'Cards', + template = pjoin(MG5DIR, 'Template', 'LO', 'Cards', 'grid_card_default.dat') else: template = pjoin(MEDIR, 'Cards', 'grid_card_default.dat') - + text = "" - for line in open(template,'r'): + for line in open(template,'r'): nline = line.split('#')[0] nline = nline.split('!')[0] comment = line[len(nline):] @@ -1832,19 +1832,19 @@ def write(self, output_file, template=None): if len(nline) != 2: text += line elif nline[1].strip() in self: - text += ' %s\t= %s %s' % (self[nline[1].strip()],nline[1], comment) + text += ' %s\t= %s %s' % (self[nline[1].strip()],nline[1], comment) else: logger.info('Adding missing parameter %s to current run_card (with default value)' % nline[1].strip()) - text += line - + text += line + if isinstance(output_file, str): fsock = open(output_file,'w') else: fsock = output_file - + fsock.write(text) fsock.close() - + class PY8Card(ConfigFile): """ Implements the Pythia8 card.""" @@ -1868,7 +1868,7 @@ def add_default_subruns(self, type): def default_setup(self): """ Sets up the list of available PY8 parameters.""" - + # Visible parameters # ================== self.add_param("Main:numberOfEvents", -1) @@ -1877,11 +1877,11 @@ def default_setup(self): self.add_param("JetMatching:qCut", -1.0, always_write_to_card=False) self.add_param("JetMatching:doShowerKt",False,always_write_to_card=False) # -1 means that it is automatically set. - self.add_param("JetMatching:nJetMax", -1, always_write_to_card=False) + self.add_param("JetMatching:nJetMax", -1, always_write_to_card=False) # for CKKWL merging self.add_param("Merging:TMS", -1.0, always_write_to_card=False) self.add_param("Merging:Process", '', always_write_to_card=False) - # -1 means that it is automatically set. + # -1 means that it is automatically set. self.add_param("Merging:nJetMax", -1, always_write_to_card=False) # for both merging, chose whether to also consider different merging # scale values for the extra weights related to scale and PDF variations. @@ -1918,10 +1918,10 @@ def default_setup(self): comment='This allows to turn on/off hadronization alltogether.') self.add_param("partonlevel:mpi", True, hidden=True, always_write_to_card=False, comment='This allows to turn on/off MPI alltogether.') - self.add_param("Beams:setProductionScalesFromLHEF", False, hidden=True, + self.add_param("Beams:setProductionScalesFromLHEF", False, hidden=True, always_write_to_card=False, comment='This parameter is automatically set to True by MG5aMC when doing MLM merging with PY8.') - + # for MLM merging self.add_param("JetMatching:merge", False, hidden=True, always_write_to_card=False, comment='Specifiy if we are merging sample of different multiplicity.') @@ -1931,9 +1931,9 @@ def default_setup(self): comment='Value of the merging scale below which one does not even write the HepMC event.') self.add_param("JetMatching:doVeto", False, hidden=True, always_write_to_card=False, comment='Do veto externally (e.g. in SysCalc).') - self.add_param("JetMatching:scheme", 1, hidden=True, always_write_to_card=False) + self.add_param("JetMatching:scheme", 1, hidden=True, always_write_to_card=False) self.add_param("JetMatching:setMad", False, hidden=True, always_write_to_card=False, - comment='Specify one must read inputs from the MadGraph banner.') + comment='Specify one must read inputs from the MadGraph banner.') self.add_param("JetMatching:coneRadius", 1.0, hidden=True, always_write_to_card=False) self.add_param("JetMatching:nQmatch",4,hidden=True, always_write_to_card=False) # for CKKWL merging (common with UMEPS, UNLOPS) @@ -1946,7 +1946,7 @@ def default_setup(self): self.add_param("Merging:applyVeto", False, hidden=True, always_write_to_card=False, comment='Do veto externally (e.g. in SysCalc).') self.add_param("Merging:includeWeightInXsection", True, hidden=True, always_write_to_card=False, - comment='If turned off, then the option belows forces PY8 to keep the original weight.') + comment='If turned off, then the option belows forces PY8 to keep the original weight.') self.add_param("Merging:muRen", 91.188, hidden=True, always_write_to_card=False, comment='Set renormalization scales of the 2->2 process.') self.add_param("Merging:muFacInME", 91.188, hidden=True, always_write_to_card=False, @@ -1958,7 +1958,7 @@ def default_setup(self): # To be added in subruns for CKKWL self.add_param("Merging:mayRemoveDecayProducts", False, hidden=True, always_write_to_card=False) self.add_param("Merging:doKTMerging", False, hidden=True, always_write_to_card=False) - self.add_param("Merging:Dparameter", 0.4, hidden=True, always_write_to_card=False) + self.add_param("Merging:Dparameter", 0.4, hidden=True, always_write_to_card=False) self.add_param("Merging:doPTLundMerging", False, hidden=True, always_write_to_card=False) # Special Pythia8 paremeters useful to simplify the shower. @@ -1975,33 +1975,33 @@ def default_setup(self): # Add parameters controlling the subruns execution flow. # These parameters should not be part of PY8SubRun daughter. self.add_default_subruns('parameters') - + def __init__(self, *args, **opts): - # Parameters which are not printed in the card unless they are - # 'user_set' or 'system_set' or part of the + # Parameters which are not printed in the card unless they are + # 'user_set' or 'system_set' or part of the # self.hidden_params_to_always_print set. self.hidden_param = [] self.hidden_params_to_always_write = set() self.visible_params_to_always_write = set() # List of parameters that should never be written out given the current context. self.params_to_never_write = set() - + # Parameters which have been set by the system (i.e. MG5 itself during # the regular course of the shower interface) self.system_set = set() - + # Add attributes controlling the subruns execution flow. # These attributes should not be part of PY8SubRun daughter. self.add_default_subruns('attributes') - - # Parameters which have been set by the + + # Parameters which have been set by the super(PY8Card, self).__init__(*args, **opts) - def add_param(self, name, value, hidden=False, always_write_to_card=True, + def add_param(self, name, value, hidden=False, always_write_to_card=True, comment=None): - """ add a parameter to the card. value is the default value and + """ add a parameter to the card. value is the default value and defines the type (int/float/bool/str) of the input. The option 'hidden' decides whether the parameter should be visible to the user. The option 'always_write_to_card' decides whether it should @@ -2017,7 +2017,7 @@ def add_param(self, name, value, hidden=False, always_write_to_card=True, self.hidden_params_to_always_write.add(name) else: if always_write_to_card: - self.visible_params_to_always_write.add(name) + self.visible_params_to_always_write.add(name) if not comment is None: if not isinstance(comment, str): raise MadGraph5Error("Option 'comment' must be a string, not"+\ @@ -2036,7 +2036,7 @@ def add_subrun(self, py8_subrun): self.subruns[py8_subrun['Main:subrun']] = py8_subrun if not 'LHEFInputs:nSubruns' in self.user_set: self['LHEFInputs:nSubruns'] = max(self.subruns.keys()) - + def userSet(self, name, value, **opts): """Set an attribute of this card, following a user_request""" self.__setitem__(name, value, change_userdefine=True, **opts) @@ -2044,10 +2044,10 @@ def userSet(self, name, value, **opts): self.system_set.remove(name.lower()) def vetoParamWriteOut(self, name): - """ Forbid the writeout of a specific parameter of this card when the + """ Forbid the writeout of a specific parameter of this card when the "write" function will be invoked.""" self.params_to_never_write.add(name.lower()) - + def systemSet(self, name, value, **opts): """Set an attribute of this card, independently of a specific user request and only if not already user_set.""" @@ -2058,7 +2058,7 @@ def systemSet(self, name, value, **opts): if force or name.lower() not in self.user_set: self.__setitem__(name, value, change_userdefine=False, **opts) self.system_set.add(name.lower()) - + def MadGraphSet(self, name, value, **opts): """ Sets a card attribute, but only if it is absent or not already user_set.""" @@ -2068,18 +2068,18 @@ def MadGraphSet(self, name, value, **opts): force = False if name.lower() not in self or (force or name.lower() not in self.user_set): self.__setitem__(name, value, change_userdefine=False, **opts) - self.system_set.add(name.lower()) - + self.system_set.add(name.lower()) + def defaultSet(self, name, value, **opts): self.__setitem__(name, value, change_userdefine=False, **opts) - + @staticmethod def pythia8_formatting(value, formatv=None): """format the variable into pythia8 card convention. The type is detected by default""" if not formatv: if isinstance(value,UnknownType): - formatv = 'unknown' + formatv = 'unknown' elif isinstance(value, bool): formatv = 'bool' elif isinstance(value, int): @@ -2095,7 +2095,7 @@ def pythia8_formatting(value, formatv=None): formatv = 'str' else: assert formatv - + if formatv == 'unknown': # No formatting then return str(value) @@ -2116,7 +2116,7 @@ def pythia8_formatting(value, formatv=None): elif formatv == 'float': return '%.10e' % float(value) elif formatv == 'shortfloat': - return '%.3f' % float(value) + return '%.3f' % float(value) elif formatv == 'str': return "%s" % value elif formatv == 'list': @@ -2124,9 +2124,9 @@ def pythia8_formatting(value, formatv=None): return ','.join([PY8Card.pythia8_formatting(arg, 'shortfloat') for arg in value]) else: return ','.join([PY8Card.pythia8_formatting(arg) for arg in value]) - - def write(self, output_file, template, read_subrun=False, + + def write(self, output_file, template, read_subrun=False, print_only_visible=False, direct_pythia_input=False, add_missing=True): """ Write the card to output_file using a specific template. > 'print_only_visible' specifies whether or not the hidden parameters @@ -2143,28 +2143,28 @@ def write(self, output_file, template, read_subrun=False, or p.lower() in self.user_set] # Filter against list of parameters vetoed for write-out visible_param = [p for p in visible_param if p.lower() not in self.params_to_never_write] - + # Now the hidden param which must be written out if print_only_visible: hidden_output_param = [] else: hidden_output_param = [p for p in self if p.lower() in self.hidden_param and not p.lower() in self.user_set and - (p.lower() in self.hidden_params_to_always_write or + (p.lower() in self.hidden_params_to_always_write or p.lower() in self.system_set)] # Filter against list of parameters vetoed for write-out hidden_output_param = [p for p in hidden_output_param if p not in self.params_to_never_write] - + if print_only_visible: subruns = [] else: if not read_subrun: subruns = sorted(self.subruns.keys()) - + # Store the subruns to write in a dictionary, with its ID in key # and the corresponding stringstream in value subruns_to_write = {} - + # Sort these parameters nicely so as to put together parameters # belonging to the same group (i.e. prefix before the ':' in their name). def group_params(params): @@ -2191,7 +2191,7 @@ def group_params(params): # First dump in a temporary_output (might need to have a second pass # at the very end to update 'LHEFInputs:nSubruns') output = StringIO.StringIO() - + # Setup template from which to read if isinstance(template, str): if os.path.isfile(template): @@ -2199,7 +2199,7 @@ def group_params(params): elif '\n' in template: tmpl = StringIO.StringIO(template) else: - raise Exception("File input '%s' not found." % file_input) + raise Exception("File input '%s' not found." % file_input) elif template is None: # Then use a dummy empty StringIO, hence skipping the reading tmpl = StringIO.StringIO() @@ -2257,8 +2257,8 @@ def group_params(params): # Remove all of its variables (so that nothing is overwritten) DummySubrun.clear() DummySubrun.write(subruns_to_write[int(value)], - tmpl, read_subrun=True, - print_only_visible=print_only_visible, + tmpl, read_subrun=True, + print_only_visible=print_only_visible, direct_pythia_input=direct_pythia_input) logger.info('Adding new unknown subrun with ID %d.'% @@ -2267,7 +2267,7 @@ def group_params(params): last_pos = tmpl.tell() line = tmpl.readline() continue - + # Change parameters which must be output if param in visible_param: new_value = PY8Card.pythia8_formatting(self[param]) @@ -2286,10 +2286,10 @@ def group_params(params): last_pos = tmpl.tell() line = tmpl.readline() continue - - # Substitute the value. + + # Substitute the value. # If it is directly the pytia input, then don't write the param if it - # is not in the list of visible_params_to_always_write and was + # is not in the list of visible_params_to_always_write and was # not user_set or system_set if ((not direct_pythia_input) or (param.lower() in self.visible_params_to_always_write) or @@ -2304,16 +2304,16 @@ def group_params(params): output.write(template%(param_entry, value_entry.replace(value,new_value))) - + # Proceed to next line last_pos = tmpl.tell() line = tmpl.readline() - + # If add_missing is False, make sure to empty the list of remaining parameters if not add_missing: visible_param = [] hidden_output_param = [] - + # Now output the missing parameters. Warn about visible ones. if len(visible_param)>0 and not template is None: output.write( @@ -2343,12 +2343,12 @@ def group_params(params): """%(' for subrun %d'%self['Main:subrun'] if 'Main:subrun' in self else '')) for param in hidden_output_param: if param.lower() in self.comments: - comment = '\n'.join('! %s'%c for c in + comment = '\n'.join('! %s'%c for c in self.comments[param.lower()].split('\n')) output.write(comment+'\n') output.write('%s=%s\n'%(param,PY8Card.pythia8_formatting(self[param]))) - - # Don't close the file if we were reading a subrun, but simply write + + # Don't close the file if we were reading a subrun, but simply write # output and return now if read_subrun: output_file.write(output.getvalue()) @@ -2382,12 +2382,12 @@ def group_params(params): out.close() else: output_file.write(output.getvalue()) - + def read(self, file_input, read_subrun=False, setter='default'): - """Read the input file, this can be a path to a file, + """Read the input file, this can be a path to a file, a file object, a str with the content of the file. - The setter option choses the authority that sets potential - modified/new parameters. It can be either: + The setter option choses the authority that sets potential + modified/new parameters. It can be either: 'default' or 'user' or 'system'""" if isinstance(file_input, str): if "\n" in file_input: @@ -2423,8 +2423,8 @@ def read(self, file_input, read_subrun=False, setter='default'): raise MadGraph5Error("Could not read line '%s' of Pythia8 card."%\ line) if '!' in value: - value,_ = value.split('!',1) - + value,_ = value.split('!',1) + # Read a subrun if detected: if param=='Main:subrun': if read_subrun: @@ -2451,7 +2451,7 @@ def read(self, file_input, read_subrun=False, setter='default'): last_pos = finput.tell() line = finput.readline() continue - + # Read parameter. The case of a parameter not defined in the card is # handled directly in ConfigFile. @@ -2478,7 +2478,7 @@ def add_default_subruns(self, type): def __init__(self, *args, **opts): """ Initialize a subrun """ - + # Force user to set it manually. subrunID = -1 if 'subrun_id' in opts: @@ -2489,7 +2489,7 @@ def __init__(self, *args, **opts): def default_setup(self): """Sets up the list of available PY8SubRun parameters.""" - + # Add all default PY8Card parameters super(PY8SubRun, self).default_setup() # Make sure they are all hidden @@ -2501,33 +2501,33 @@ def default_setup(self): self.add_param("Main:subrun", -1) self.add_param("Beams:LHEF", "events.lhe.gz") - + class RunBlock(object): """ Class for a series of parameter in the run_card that can be either visible or hidden. - name: allow to set in the default run_card $name to set where that + name: allow to set in the default run_card $name to set where that block need to be inserted template_on: information to include is block is active template_off: information to include is block is not active on_fields/off_fields: paramater associated to the block - can be specify but are otherwise automatically but + can be specify but are otherwise automatically but otherwise determined from the template. - + function: status(self,run_card) -> return which template need to be used check_validity(self, runcard) -> sanity check - create_default_for_process(self, run_card, proc_characteristic, - history, proc_def) + create_default_for_process(self, run_card, proc_characteristic, + history, proc_def) post_set_XXXX(card, value, change_userdefine, raiseerror) -> fct called when XXXXX is set post_set(card, value, change_userdefine, raiseerror, **opt) -> fct called when a parameter is changed - -> no access to parameter name + -> no access to parameter name -> not called if post_set_XXXX is defined """ - - + + def __init__(self, name, template_on, template_off, on_fields=False, off_fields=False): self.name = name @@ -2550,7 +2550,7 @@ def fields(self): def find_fields_from_template(template): """ return the list of fields from a template. checking line like %(mass_ion2)s = mass_ion2 # mass of the heavy ion (second beam) """ - + return re.findall(r"^\s*%\((.*)\)s\s*=\s*\1", template, re.M) def get_template(self, card): @@ -2565,7 +2565,7 @@ def get_unused_template(self, card): if self.status(card): return self.template_off else: - return self.template_on + return self.template_on def status(self, card): """return False if template_off to be used, True if template_on to be used""" @@ -2594,20 +2594,20 @@ def manage_parameters(self, card, written, to_write): written.add(name) if name in to_write: to_write.remove(name) - + def check_validity(self, runcard): """run self consistency check here --avoid to use runcard[''] = xxx here since it can trigger post_set function""" return def create_default_for_process(self, run_card, proc_characteristic, history, proc_def): - return + return # @staticmethod # def post_set(card, value, change_userdefine, raiseerror, **opt): # """default action to run when a parameter of the block is defined. # Here we do not know which parameter is modified. if this is needed. # then one need to define post_set_XXXXX(card, value, change_userdefine, raiseerror) -# and then only that function is used +# and then only that function is used # """ # # if 'pdlabel' in card.user_set: @@ -2621,7 +2621,7 @@ class RunCard(ConfigFile): blocks = [] parameter_in_block = {} - allowed_lep_densities = {} + allowed_lep_densities = {} default_include_file = 'run_card.inc' default_autodef_file = 'run.inc' donewarning = [] @@ -2637,7 +2637,7 @@ def plugin_input(self, finput): curr_dir = os.path.dirname(os.path.dirname(finput.name)) elif isinstance(finput, str): curr_dir = os.path.dirname(os.path.dirname(finput)) - + if curr_dir: if os.path.exists(pjoin(curr_dir, 'bin', 'internal', 'plugin_run_card')): # expected format {} passing everything as optional argument @@ -2646,7 +2646,7 @@ def plugin_input(self, finput): continue opts = dict(eval(line)) self.add_param(**opts) - + @classmethod def fill_post_set_from_blocks(cls): """set the post_set function for any parameter defined in a run_block""" @@ -2659,8 +2659,8 @@ def fill_post_set_from_blocks(cls): elif hasattr(block, 'post_set'): setattr(cls, 'post_set_%s' % parameter, block.post_set) cls.parameter_in_block[parameter] = block - - + + def __new__(cls, finput=None, **opt): cls.fill_post_set_from_blocks() @@ -2718,9 +2718,9 @@ def __new__(cls, finput=None, **opt): return super(RunCard, cls).__new__(cls, finput, **opt) def __init__(self, *args, **opts): - + # The following parameter are updated in the defaultsetup stage. - + #parameter for which no warning should be raised if not define self.hidden_param = [] # in which include file the parameer should be written @@ -2739,11 +2739,11 @@ def __init__(self, *args, **opts): self.cuts_parameter = {} # parameter added where legacy requires an older value. self.system_default = {} - + self.display_block = [] # set some block to be displayed self.fct_mod = {} # {param: (fct_pointer, *argument, **opts)} - self.cut_class = {} + self.cut_class = {} self.warned=False @@ -2776,11 +2776,11 @@ def get_lepton_densities(cls): else: cls.allowed_lep_densities[identity].append(name) - def add_param(self, name, value, fortran_name=None, include=True, + def add_param(self, name, value, fortran_name=None, include=True, hidden=False, legacy=False, cut=False, system=False, sys_default=None, autodef=False, fct_mod=None, **opts): - """ add a parameter to the card. value is the default value and + """ add a parameter to the card. value is the default value and defines the type (int/float/bool/str) of the input. fortran_name: defines what is the associate name in the f77 code include: defines if we have to put the value in the include file @@ -2795,7 +2795,7 @@ def add_param(self, name, value, fortran_name=None, include=True, fct_mod: defines a function to run if the parameter is modify in the include file options of **opts: - allowed: list of valid options. '*' means anything else should be allowed. - empty list means anything possible as well. + empty list means anything possible as well. - comment: add comment for writing/help - typelist: type of the list if default is empty """ @@ -2823,9 +2823,9 @@ def add_param(self, name, value, fortran_name=None, include=True, self.fct_mod[name] = fct_mod def read(self, finput, consistency=True, unknown_warning=True, **opt): - """Read the input file, this can be a path to a file, + """Read the input file, this can be a path to a file, a file object, a str with the content of the file.""" - + if isinstance(finput, str): if "\n" in finput: finput = finput.split('\n') @@ -2836,7 +2836,7 @@ def read(self, finput, consistency=True, unknown_warning=True, **opt): finput = open(finput) else: raise Exception("No such file %s" % finput) - + for line in finput: line = line.split('#')[0] line = line.split('!')[0] @@ -2864,8 +2864,8 @@ def add_unknown_entry(self, name, value, unknow_warning): This is based on the guess_entry_fromname for the various syntax providing input. This then call add_param accordingly. - This function does not returns anything. - """ + This function does not returns anything. + """ if name == "dsqrt_q2fact1" and not self.LO: raise InvalidRunCard("Looks like you passed a LO run_card for a NLO run. Please correct") @@ -2903,7 +2903,7 @@ def add_unknown_entry(self, name, value, unknow_warning): " The type was assigned to %s. \n"+\ " The definition of that variable will %sbe automatically added to fortran file %s\n"+\ " The value of that variable will %sbe passed to the fortran code via fortran file %s",\ - name, value, vartype if vartype != "list" else "list of %s" % opts.get('typelist').__name__, + name, value, vartype if vartype != "list" else "list of %s" % opts.get('typelist').__name__, "" if opts.get('autodef', False) else "not", "" if opts.get('autodef', False) in [True,False] else opts.get('autodef'), "" if opts.get('include', True) else "not", "" if opts.get('include', True) in [True,False] else opts.get('include')) RunCard.donewarning.append(name) @@ -2923,19 +2923,19 @@ def valid_line(self, line, tmp): return False elif line.strip().startswith('%'): parameter = line[line.find('(')+1:line.find(')')] - + try: cond = self.cuts_parameter[parameter] except KeyError: return True - - + + if template_options.get(cond, default) or cond is True: return True else: - return False + return False else: - return True + return True def reset_simd(self, old_value, new_value, name, *args, **opts): @@ -2946,28 +2946,28 @@ def make_clean(self,old_value, new_value, name, dir): raise Exception('pass make clean for ', dir) def make_Ptouch(self,old_value, new_value, name, reset): - raise Exception('pass Ptouch for ', reset) - + raise Exception('pass Ptouch for ', reset) + def write(self, output_file, template=None, python_template=False, write_hidden=False, template_options=None, **opt): - """Write the run_card in output_file according to template + """Write the run_card in output_file according to template (a path to a valid run_card)""" - to_write = set(self.user_set) + to_write = set(self.user_set) written = set() if not template: raise Exception if not template_options: template_options = collections.defaultdict(str) - + if python_template: text = open(template,'r').read() - text = text.split('\n') + text = text.split('\n') # remove if templating - text = [l if not l.startswith('#IF') else l[l.find(')# ')+2:] + text = [l if not l.startswith('#IF') else l[l.find(')# ')+2:] for l in text if self.valid_line(l, template_options)] text ='\n'.join(text) - + if python_template and not to_write: import string if self.blocks: @@ -2981,14 +2981,14 @@ def write(self, output_file, template=None, python_template=False, if not self.list_parameter: text = text % self else: - data = dict((key.lower(),value) for key, value in self.items()) + data = dict((key.lower(),value) for key, value in self.items()) for name in self.list_parameter: if self.list_parameter[name] != str: data[name] = ', '.join(str(v) for v in data[name]) else: data[name] = "['%s']" % "', '".join(str(v) for v in data[name]) text = text % data - else: + else: text = "" for line in open(template,'r'): nline = line.split('#')[0] @@ -3005,11 +3005,11 @@ def write(self, output_file, template=None, python_template=False, this_group = this_group[0] text += this_group.get_template(self) % self this_group.manage_parameters(self, written, to_write) - + elif len(nline) != 2: text += line elif nline[1].strip() in self: - + name = nline[1].strip().lower() value = self[name] if name in self.list_parameter: @@ -3026,15 +3026,15 @@ def write(self, output_file, template=None, python_template=False, else: endline = '' text += ' %s\t= %s %s%s' % (value, name, comment, endline) - written.add(name) + written.add(name) if name in to_write: to_write.remove(name) else: logger.info('Adding missing parameter %s to current %s (with default value)', (name, self.filename)) - written.add(name) - text += line + written.add(name) + text += line for b in self.blocks: if b.status(self): @@ -3057,7 +3057,7 @@ def write(self, output_file, template=None, python_template=False, else: #partial writting -> add only what is needed to_add = [] - for line in b.get_template(self).split('\n'): + for line in b.get_template(self).split('\n'): nline = line.split('#')[0] nline = nline.split('!')[0] nline = nline.split('=') @@ -3072,8 +3072,8 @@ def write(self, output_file, template=None, python_template=False, continue #already include before else: to_add.append(line % {nline[1].strip():value, name:value}) - written.add(name) - + written.add(name) + if name in to_write: to_write.remove(name) else: @@ -3095,13 +3095,13 @@ def write(self, output_file, template=None, python_template=False, text += '\n'.join(to_add) if to_write or write_hidden: - text+="""#********************************************************************* + text+="""#********************************************************************* # Additional hidden parameters #********************************************************************* -""" +""" if write_hidden: # - # do not write hidden parameter not hidden for this template + # do not write hidden parameter not hidden for this template # if python_template: written = written.union(set(re.findall('\%\((\w*)\)s', open(template,'r').read(), re.M))) @@ -3129,7 +3129,7 @@ def get_last_value_include(self, output_dir): if inc file does not exist we will return the current value (i.e. set has no change) """ - #remember that + #remember that # default_include_file is a class variable # self.includepath is on the form include_path : [list of param ] out = {} @@ -3165,7 +3165,7 @@ def get_value_from_include(self, path, list_of_params, output_dir): with open(pjoin(output_dir,path), 'r') as fsock: text = fsock.read() - + for name in list_of_params: misc.sprint(name, name in self.fortran_name) misc.sprint(self.fortran_name[name] if name in self.fortran_name[name] else name) @@ -3191,11 +3191,11 @@ def get_value_from_include(self, path, list_of_params, output_dir): misc.sprint(self.fortran_name) misc.sprint(text) raise Exception - return out + return out def get_default(self, name, default=None, log_level=None): - """return self[name] if exist otherwise default. log control if we + """return self[name] if exist otherwise default. log control if we put a warning or not if we use the default value""" lower_name = name.lower() @@ -3216,13 +3216,13 @@ def get_default(self, name, default=None, log_level=None): log_level = 20 if not default: default = dict.__getitem__(self, name.lower()) - + logger.log(log_level, '%s missed argument %s. Takes default: %s' % (self.filename, name, default)) self[name] = default return default else: - return self[name] + return self[name] def mod_inc_pdlabel(self, value): """flag pdlabel has 'dressed' if one of the special lepton PDF with beamstralung. @@ -3237,16 +3237,16 @@ def edit_dummy_fct_from_file(self, filelist, outdir): filelist is a list of input files (given by the user) containing a series of function to be placed in replacement of standard (typically dummy) functions of the code. - This use LO/NLO class attribute that defines which function name need to - be placed in which file. + This use LO/NLO class attribute that defines which function name need to + be placed in which file. First time this is used, a backup of the original file is done in order to - recover if the user remove some of those files. + recover if the user remove some of those files. The function present in the file are determined automatically via regular expression. and only that function is replaced in the associated file. - function in the filelist starting with user_ will also be include within the + function in the filelist starting with user_ will also be include within the dummy_fct.f file """ @@ -3269,7 +3269,7 @@ def edit_dummy_fct_from_file(self, filelist, outdir): fsock = file_writers.FortranWriter(tmp,'w') function_text = fsock.remove_routine(text, fct) fsock.close() - test = open(tmp,'r').read() + test = open(tmp,'r').read() if fct not in self.dummy_fct_file: if fct.startswith('user_'): self.dummy_fct_file[fct] = self.dummy_fct_file['user_'] @@ -3315,22 +3315,22 @@ def guess_entry_fromname(self, name, value): - vartype: type of the variable - name: name of the variable (stripped from metadata) - options: additional options for the add_param - rules: - - if name starts with str_, int_, float_, bool_, list_, dict_ then + rules: + - if name starts with str_, int_, float_, bool_, list_, dict_ then - vartype is set accordingly - name is strip accordingly - otherwise guessed from value (which is string) - if name contains min/max - vartype is set to float - options has an added {'cut':True} - - suffixes like + - suffixes like - will be removed from named - will be added in options (for add_param) as {'cut':True} see add_param documentation for the list of supported options - if include is on False set autodef to False (i.e. enforce it False for future change) """ - # local function + # local function def update_typelist(value, name, opts): """convert a string to a list and update opts to keep track of the type """ value = value.strip() @@ -3358,7 +3358,7 @@ def update_typelist(value, name, opts): opts[key] = val name = name.replace("<%s=%s>" %(key,val), '') - # get vartype + # get vartype # first check that name does not force it supported_type = ["str", "float", "int", "bool", "list", "dict"] if "_" in name and name.split("_")[0].lower() in supported_type: @@ -3406,13 +3406,13 @@ def f77_formatting(value, formatv=None): value = str(value).lower() else: assert formatv - + if formatv == 'bool': if str(value) in ['1','T','.true.','True']: return '.true.' else: return '.false.' - + elif formatv == 'int': try: return str(int(value)) @@ -3422,12 +3422,12 @@ def f77_formatting(value, formatv=None): return str(int(fl)) else: raise - + elif formatv == 'float': if isinstance(value, str): value = value.replace('d','e') return ('%.10e' % float(value)).replace('e','d') - + elif formatv == 'str': # Check if it is a list if value.strip().startswith('[') and value.strip().endswith(']'): @@ -3437,20 +3437,20 @@ def f77_formatting(value, formatv=None): enumerate(elements)] else: return "'%s'" % value - - + + def check_validity(self, log_level=30): """check that parameter missing in the card are set to the expected value""" for name, value in self.system_default.items(): self.set(name, value, changeifuserset=False) - + for name in self.includepath[False]: to_bypass = self.hidden_param + list(self.legacy_parameter.keys()) if name not in to_bypass: - self.get_default(name, log_level=log_level) + self.get_default(name, log_level=log_level) for name in self.legacy_parameter: if self[name] != self.legacy_parameter[name]: @@ -3458,28 +3458,28 @@ def check_validity(self, log_level=30): for block in self.blocks: block.check_validity(self) - + def update_system_parameter_for_include(self): - """update hidden system only parameter for the correct writtin in the + """update hidden system only parameter for the correct writtin in the include""" return - + def write_include_file(self, output_dir, output_file=None): """Write the various include file in output_dir. The entry True of self.includepath will be written in run_card.inc The entry False will not be written anywhere output_file allows testing by providing stream. - This also call the function to add variable definition for the - variable with autodef=True (handle by write_autodef function) + This also call the function to add variable definition for the + variable with autodef=True (handle by write_autodef function) """ - + # ensure that all parameter are coherent and fix those if needed self.check_validity() - + #ensusre that system only parameter are correctly set self.update_system_parameter_for_include() @@ -3490,10 +3490,10 @@ def write_include_file(self, output_dir, output_file=None): self.write_autodef(output_dir, output_file=None) # check/fix status of customised functions self.edit_dummy_fct_from_file(self["custom_fcts"], os.path.dirname(output_dir)) - + for incname in self.includepath: self.write_one_include_file(output_dir, incname, output_file) - + for name,value in value_in_old_include.items(): if value != self[name]: self.fct_mod[name][0](value, self[name], name, *self.fct_mod[name][1],**self.fct_mod[name][2]) @@ -3515,13 +3515,13 @@ def write_one_include_file(self, output_dir, incname, output_file=None): fsock = file_writers.FortranWriter(pjoin(output_dir,pathinc+'.tmp')) - for key in self.includepath[incname]: + for key in self.includepath[incname]: #define the fortran name if key in self.fortran_name: fortran_name = self.fortran_name[key] else: fortran_name = key - + if incname in self.include_as_parameter: fsock.writelines('INTEGER %s\n' % fortran_name) #get the value with warning if the user didn't set it @@ -3534,7 +3534,7 @@ def write_one_include_file(self, output_dir, incname, output_file=None): # in case of a list, add the length of the list as 0th # element in fortran. Only in case of integer or float # list (not for bool nor string) - targettype = self.list_parameter[key] + targettype = self.list_parameter[key] if targettype is bool: pass elif targettype is int: @@ -3550,7 +3550,7 @@ def write_one_include_file(self, output_dir, incname, output_file=None): elif isinstance(value, dict): for fortran_name, onevalue in value.items(): line = '%s = %s \n' % (fortran_name, self.f77_formatting(onevalue)) - fsock.writelines(line) + fsock.writelines(line) elif isinstance(incname,str) and 'compile' in incname: if incname in self.include_as_parameter: line = 'PARAMETER (%s=%s)' %( fortran_name, value) @@ -3585,7 +3585,7 @@ def write_autodef(self, output_dir, output_file=None): filetocheck = dict(self.definition_path) if True not in self.definition_path: filetocheck[True] = [] - + for incname in filetocheck: if incname is True: @@ -3598,7 +3598,7 @@ def write_autodef(self, output_dir, output_file=None): if output_file: fsock = output_file input = fsock.getvalue() - + else: input = open(pjoin(output_dir,pathinc),'r').read() # do not define fsock here since we might not need to overwrite it @@ -3608,7 +3608,7 @@ def write_autodef(self, output_dir, output_file=None): previous = re.findall(re_pat, input, re.M) # now check which one needed to be added (and remove those identicaly defined) to_add = [] - for key in filetocheck[incname]: + for key in filetocheck[incname]: curr_type = self[key].__class__.__name__ length = "" if curr_type in [list, "list"]: @@ -3640,10 +3640,10 @@ def write_autodef(self, output_dir, output_file=None): fsock.truncate(0) fsock.seek(0) - # remove outdated lines + # remove outdated lines lines = input.split('\n') if previous: - out = [line for line in lines if not re.search(re_pat, line, re.M) or + out = [line for line in lines if not re.search(re_pat, line, re.M) or re.search(re_pat, line, re.M).groups() not in previous] else: out = lines @@ -3662,7 +3662,7 @@ def write_autodef(self, output_dir, output_file=None): stop = out.index('C STOP USER COMMON BLOCK') out = out[:start]+ out[stop+1:] #add new common-block - if self.definition_path[incname]: + if self.definition_path[incname]: out.append("C START USER COMMON BLOCK") if isinstance(pathinc , str): filename = os.path.basename(pathinc).split('.',1)[0] @@ -3675,10 +3675,10 @@ def write_autodef(self, output_dir, output_file=None): filename = filename.upper() out.append(" COMMON/USER_CUSTOM_%s/%s" %(filename,','.join( self.definition_path[incname]))) out.append('C STOP USER COMMON BLOCK') - + if not output_file: fsock.writelines(out) - fsock.close() + fsock.close() else: # for iotest out = ["%s\n" %l for l in out] @@ -3702,7 +3702,7 @@ def get_idbmup(lpp): def get_banner_init_information(self): """return a dictionary with the information needed to write the first line of the block of the lhe file.""" - + output = {} output["idbmup1"] = self.get_idbmup(self['lpp1']) output["idbmup2"] = self.get_idbmup(self['lpp2']) @@ -3713,7 +3713,7 @@ def get_banner_init_information(self): output["pdfsup1"] = self.get_pdf_id(self["pdlabel"]) output["pdfsup2"] = self.get_pdf_id(self["pdlabel"]) return output - + def get_pdf_id(self, pdf): if pdf == "lhapdf": lhaid = self["lhaid"] @@ -3721,19 +3721,19 @@ def get_pdf_id(self, pdf): return lhaid[0] else: return lhaid - else: + else: try: return {'none': 0, 'iww': 0, 'eva':0, 'edff':0, 'chff':0, 'cteq6_m':10000,'cteq6_l':10041,'cteq6l1':10042, 'nn23lo':246800,'nn23lo1':247000,'nn23nlo':244800 - }[pdf] + }[pdf] except: - return 0 - + return 0 + def get_lhapdf_id(self): return self.get_pdf_id(self['pdlabel']) - def remove_all_cut(self): + def remove_all_cut(self): """remove all the cut""" for name in self.cuts_parameter: @@ -3749,7 +3749,7 @@ def remove_all_cut(self): elif 'eta' in name: self[name] = -1 else: - self[name] = 0 + self[name] = 0 ################################################################################################ ### Define various template subpart for the LO Run_card @@ -3767,11 +3767,11 @@ def remove_all_cut(self): %(nb_proton1)s = nb_proton1 # number of proton for the first beam %(nb_neutron1)s = nb_neutron1 # number of neutron for the first beam %(mass_ion1)s = mass_ion1 # mass of the heavy ion (first beam) -# Note that seting differently the two beams only work if you use +# Note that seting differently the two beams only work if you use # group_subprocess=False when generating your matrix-element %(nb_proton2)s = nb_proton2 # number of proton for the second beam %(nb_neutron2)s = nb_neutron2 # number of neutron for the second beam - %(mass_ion2)s = mass_ion2 # mass of the heavy ion (second beam) + %(mass_ion2)s = mass_ion2 # mass of the heavy ion (second beam) """ template_off = "# To see heavy ion options: type \"update ion_pdf\"" @@ -3834,11 +3834,11 @@ def remove_all_cut(self): # Frame for polarization ------------------------------------------------------------------------------------ template_on = \ """#********************************************************************* -# Frame where to evaluate the matrix-element (not the cut!) for polarization +# Frame where to evaluate the matrix-element (not the cut!) for polarization #********************************************************************* %(me_frame)s = me_frame ! list of particles to sum-up to define the rest-frame ! in which to evaluate the matrix-element - ! [1,2] means the partonic center of mass + ! [1,2] means the partonic center of mass """ template_off = "" frame_block = RunBlock('frame', template_on=template_on, template_off=template_off) @@ -3891,7 +3891,7 @@ def remove_all_cut(self): # CONTROL The extra running scale (not QCD) * # Such running is NOT include in systematics computation * #*********************************************************************** - %(fixed_extra_scale)s = fixed_extra_scale ! False means dynamical scale + %(fixed_extra_scale)s = fixed_extra_scale ! False means dynamical scale %(mue_ref_fixed)s = mue_ref_fixed ! scale to use if fixed scale mode %(mue_over_ref)s = mue_over_ref ! ratio to mur if dynamical scale """ @@ -3908,10 +3908,10 @@ def remove_all_cut(self): %(tmin_for_channel)s = tmin_for_channel ! limit the non-singular reach of --some-- channel of integration related to T-channel diagram (value between -1 and 0), -1 is no impact %(survey_splitting)s = survey_splitting ! for loop-induced control how many core are used at survey for the computation of a single iteration. %(survey_nchannel_per_job)s = survey_nchannel_per_job ! control how many Channel are integrated inside a single job on cluster/multicore - %(refine_evt_by_job)s = refine_evt_by_job ! control the maximal number of events for the first iteration of the refine (larger means less jobs) + %(refine_evt_by_job)s = refine_evt_by_job ! control the maximal number of events for the first iteration of the refine (larger means less jobs) +#********************************************************************* +# Compilation flag. #********************************************************************* -# Compilation flag. -#********************************************************************* %(global_flag)s = global_flag ! fortran optimization flag use for the all code. %(aloha_flag)s = aloha_flag ! fortran optimization flag for aloha function. Suggestions: '-ffast-math' %(matrix_flag)s = matrix_flag ! fortran optimization flag for matrix.f function. Suggestions: '-O3' @@ -3948,7 +3948,7 @@ def check_validity(self, card): if card['pdlabel'] != card['pdlabel1']: dict.__setitem__(card, 'pdlabel', card['pdlabel1']) elif card['pdlabel1'] in sum(card.allowed_lep_densities.values(),[]): - raise InvalidRunCard("Assymetric beam pdf not supported for e e collision with ISR/bemstralung option") + raise InvalidRunCard("Assymetric beam pdf not supported for e e collision with ISR/bemstralung option") elif card['pdlabel2'] in sum(card.allowed_lep_densities.values(),[]): raise InvalidRunCard("Assymetric beam pdf not supported for e e collision with ISR/bemstralung option") elif card['pdlabel1'] == 'none': @@ -3962,7 +3962,7 @@ def check_validity(self, card): dict.__setitem__(card, 'pdlabel2', card['pdlabel']) if abs(card['lpp1']) == 1 == abs(card['lpp2']) and card['pdlabel1'] != card['pdlabel2']: - raise InvalidRunCard("Assymetric beam pdf not supported for proton-proton collision") + raise InvalidRunCard("Assymetric beam pdf not supported for proton-proton collision") def status(self, card): """return False if template_off to be used, True if template_on to be used""" @@ -4028,7 +4028,7 @@ def post_set(card, value, change_userdefine, raiseerror, name='unknown', **opt): if name == 'fixed_fac_scale2' and 'fixed_fac_scale1' not in card.user_set: dict.__setitem__(card, 'fixed_fac_scale1', card['fixed_fac_scale']) if name == 'fixed_fac_scale1' and 'fixed_fac_scale2' not in card.user_set: - dict.__setitem__(card, 'fixed_fac_scale2', card['fixed_fac_scale']) + dict.__setitem__(card, 'fixed_fac_scale2', card['fixed_fac_scale']) def status(self, card): @@ -4061,32 +4061,32 @@ def status(self, card): class RunCardLO(RunCard): """an object to handle in a nice way the run_card information""" - + blocks = [heavy_ion_block, beam_pol_block, syscalc_block, ecut_block, frame_block, eva_scale_block, mlm_block, ckkw_block, psoptim_block, pdlabel_block, fixedfacscale, running_block] dummy_fct_file = {"dummy_cuts": pjoin("SubProcesses","dummy_fct.f"), "get_dummy_x1": pjoin("SubProcesses","dummy_fct.f"), - "get_dummy_x1_x2": pjoin("SubProcesses","dummy_fct.f"), + "get_dummy_x1_x2": pjoin("SubProcesses","dummy_fct.f"), "dummy_boostframe": pjoin("SubProcesses","dummy_fct.f"), "user_dynamical_scale": pjoin("SubProcesses","dummy_fct.f"), "bias_wgt_custom": pjoin("SubProcesses","dummy_fct.f"), "user_": pjoin("SubProcesses","dummy_fct.f") # all function starting by user will be added to that file } - + include_as_parameter = ['vector.inc'] if MG5DIR: default_run_card = pjoin(MG5DIR, "internal", "default_run_card_lo.dat") - + def default_setup(self): """default value for the run_card.dat""" - + self.add_param("run_tag", "tag_1", include=False) self.add_param("gridpack", False) self.add_param("time_of_flight", -1.0, include=False) - self.add_param("nevents", 10000) + self.add_param("nevents", 10000) self.add_param("iseed", 0) self.add_param("python_seed", -2, include=False, hidden=True, comment="controlling python seed [handling in particular the final unweighting].\n -1 means use default from random module.\n -2 means set to same value as iseed") self.add_param("lpp1", 1, fortran_name="lpp(1)", allowed=[-1,1,0,2,3,9,-2,-3,4,-4], @@ -4106,7 +4106,7 @@ def default_setup(self): self.add_param('nb_neutron1', 0, hidden=True, allowed=[1,0, 126 , '*'],fortran_name="nb_neutron(1)", comment='For heavy ion physics nb of neutron in the ion (for both beam but if group_subprocess was False)') self.add_param('nb_neutron2', 0, hidden=True, allowed=[1,0, 126 , '*'],fortran_name="nb_neutron(2)", - comment='For heavy ion physics nb of neutron in the ion (of beam 2 if group_subprocess was False )') + comment='For heavy ion physics nb of neutron in the ion (of beam 2 if group_subprocess was False )') self.add_param('mass_ion1', -1.0, hidden=True, fortran_name="mass_ion(1)", allowed=[-1,0, 0.938, 207.9766521*0.938, 0.000511, 0.105, '*'], comment='For heavy ion physics mass in GeV of the ion (of beam 1)') @@ -4133,11 +4133,11 @@ def default_setup(self): self.add_param("mue_over_ref", 1.0, hidden=True, comment='ratio mu_other/mu for dynamical scale') self.add_param("ievo_eva",0,hidden=True, allowed=[0,1],fortran_name="ievo_eva", comment='eva: 0 for EW pdf muf evolution by q^2; 1 for evo by pT^2') - + # Bias module options self.add_param("bias_module", 'None', include=False, hidden=True) self.add_param('bias_parameters', {'__type__':1.0}, include='BIAS/bias.inc', hidden=True) - + #matching self.add_param("scalefact", 1.0) self.add_param("ickkw", 0, allowed=[0,1], hidden=True, comment="\'0\' for standard fixed order computation.\n\'1\' for MLM merging activates alphas and pdf re-weighting according to a kt clustering of the QCD radiation.") @@ -4221,7 +4221,7 @@ def default_setup(self): self.add_param("mmaa", 0.0, cut='aa') self.add_param("mmll", 0.0, cut='ll') self.add_param("mmjjmax", -1.0, cut='jj') - self.add_param("mmbbmax", -1.0, cut='bb') + self.add_param("mmbbmax", -1.0, cut='bb') self.add_param("mmaamax", -1.0, cut='aa') self.add_param("mmllmax", -1.0, cut='ll') self.add_param("mmnl", 0.0, cut='LL') @@ -4231,9 +4231,9 @@ def default_setup(self): self.add_param("ptllmax", -1.0, cut='ll') self.add_param("xptj", 0.0, cut='jj') self.add_param("xptb", 0.0, cut='bb') - self.add_param("xpta", 0.0, cut='aa') + self.add_param("xpta", 0.0, cut='aa') self.add_param("xptl", 0.0, cut='ll') - # ordered pt jet + # ordered pt jet self.add_param("ptj1min", 0.0, cut='jj') self.add_param("ptj1max", -1.0, cut='jj') self.add_param("ptj2min", 0.0, cut='jj') @@ -4241,7 +4241,7 @@ def default_setup(self): self.add_param("ptj3min", 0.0, cut='jjj') self.add_param("ptj3max", -1.0, cut='jjj') self.add_param("ptj4min", 0.0, cut='j'*4) - self.add_param("ptj4max", -1.0, cut='j'*4) + self.add_param("ptj4max", -1.0, cut='j'*4) self.add_param("cutuse", 0, cut='jj') # ordered pt lepton self.add_param("ptl1min", 0.0, cut='l'*2) @@ -4249,7 +4249,7 @@ def default_setup(self): self.add_param("ptl2min", 0.0, cut='l'*2) self.add_param("ptl2max", -1.0, cut='l'*2) self.add_param("ptl3min", 0.0, cut='l'*3) - self.add_param("ptl3max", -1.0, cut='l'*3) + self.add_param("ptl3max", -1.0, cut='l'*3) self.add_param("ptl4min", 0.0, cut='l'*4) self.add_param("ptl4max", -1.0, cut='l'*4) # Ht sum of jets @@ -4257,7 +4257,7 @@ def default_setup(self): self.add_param("htjmax", -1.0, cut='j'*2) self.add_param("ihtmin", 0.0, cut='J'*2) self.add_param("ihtmax", -1.0, cut='J'*2) - self.add_param("ht2min", 0.0, cut='J'*3) + self.add_param("ht2min", 0.0, cut='J'*3) self.add_param("ht3min", 0.0, cut='J'*3) self.add_param("ht4min", 0.0, cut='J'*4) self.add_param("ht2max", -1.0, cut='J'*3) @@ -4267,7 +4267,7 @@ def default_setup(self): self.add_param("ptgmin", 0.0, cut='aj') self.add_param("r0gamma", 0.4, hidden=True) self.add_param("xn", 1.0, hidden=True) - self.add_param("epsgamma", 1.0, hidden=True) + self.add_param("epsgamma", 1.0, hidden=True) self.add_param("isoem", True, hidden=True) self.add_param("xetamin", 0.0, cut='jj') self.add_param("deltaeta", 0.0, cut='j'*2) @@ -4280,7 +4280,7 @@ def default_setup(self): self.add_param("use_syst", True) self.add_param('systematics_program', 'systematics', include=False, hidden=True, comment='Choose which program to use for systematics computation: none, systematics, syscalc') self.add_param('systematics_arguments', ['--mur=0.5,1,2', '--muf=0.5,1,2', '--pdf=errorset'], include=False, hidden=True, comment='Choose the argment to pass to the systematics command. like --mur=0.25,1,4. Look at the help of the systematics function for more details.') - + self.add_param("sys_scalefact", "0.5 1 2", include=False, hidden=True) self.add_param("sys_alpsfact", "None", include=False, hidden=True) self.add_param("sys_matchscale", "auto", include=False, hidden=True) @@ -4315,8 +4315,8 @@ def default_setup(self): self.add_param('aloha_flag', '', include=False, hidden=True, comment='global fortran compilation flag, suggestion: -ffast-math', fct_mod=(self.make_clean, ('Source/DHELAS'),{})) self.add_param('matrix_flag', '', include=False, hidden=True, comment='fortran compilation flag for the matrix-element files, suggestion -O3', - fct_mod=(self.make_Ptouch, ('matrix'),{})) - self.add_param('vector_size', 1, include='vector.inc', hidden=True, comment='lockstep size for parralelism run', + fct_mod=(self.make_Ptouch, ('matrix'),{})) + self.add_param('vector_size', 1, include='vector.inc', hidden=True, comment='lockstep size for parralelism run', fortran_name='VECSIZE_MEMMAX', fct_mod=(self.reset_simd,(),{})) # parameter allowing to define simple cut via the pdg @@ -4329,24 +4329,24 @@ def default_setup(self): self.add_param('eta_max_pdg',{'__type__':0.}, include=False,cut=True) self.add_param('mxx_min_pdg',{'__type__':0.}, include=False,cut=True) self.add_param('mxx_only_part_antipart', {'default':False}, include=False) - + self.add_param('pdg_cut',[0], system=True) # store which PDG are tracked self.add_param('ptmin4pdg',[0.], system=True) # store pt min self.add_param('ptmax4pdg',[-1.], system=True) self.add_param('Emin4pdg',[0.], system=True) # store pt min - self.add_param('Emax4pdg',[-1.], system=True) + self.add_param('Emax4pdg',[-1.], system=True) self.add_param('etamin4pdg',[0.], system=True) # store pt min - self.add_param('etamax4pdg',[-1.], system=True) + self.add_param('etamax4pdg',[-1.], system=True) self.add_param('mxxmin4pdg',[-1.], system=True) self.add_param('mxxpart_antipart', [False], system=True) - - - + + + def check_validity(self): """ """ - + super(RunCardLO, self).check_validity() - + #Make sure that nhel is only either 0 (i.e. no MC over hel) or #1 (MC over hel with importance sampling). In particular, it can #no longer be > 1. @@ -4357,12 +4357,12 @@ def check_validity(self): "not %s." % self['nhel']) if int(self['maxjetflavor']) > 6: raise InvalidRunCard('maxjetflavor should be lower than 5! (6 is partly supported)') - + if len(self['pdgs_for_merging_cut']) > 1000: raise InvalidRunCard("The number of elements in "+\ "'pdgs_for_merging_cut' should not exceed 1000.") - + # some cut need to be deactivated in presence of isolation if self['ptgmin'] > 0: if self['pta'] > 0: @@ -4370,18 +4370,18 @@ def check_validity(self): self['pta'] = 0.0 if self['draj'] > 0: logger.warning('draj cut discarded since photon isolation is used') - self['draj'] = 0.0 - - # special treatment for gridpack use the gseed instead of the iseed + self['draj'] = 0.0 + + # special treatment for gridpack use the gseed instead of the iseed if self['gridrun']: self['iseed'] = self['gseed'] - + #Some parameter need to be fixed when using syscalc #if self['use_syst']: # if self['scalefact'] != 1.0: # logger.warning('Since use_syst=T, changing the value of \'scalefact\' to 1') # self['scalefact'] = 1.0 - + # CKKW Treatment if self['ickkw'] > 0: if self['ickkw'] != 1: @@ -4399,7 +4399,7 @@ def check_validity(self): raise InvalidRunCard('maxjetflavor at 6 is NOT supported for matching!') if self['ickkw'] == 2: # add warning if ckkw selected but the associate parameter are empty - self.get_default('highestmult', log_level=20) + self.get_default('highestmult', log_level=20) self.get_default('issgridfile', 'issudgrid.dat', log_level=20) if self['xqcut'] > 0: if self['ickkw'] == 0: @@ -4412,13 +4412,13 @@ def check_validity(self): if self['drjl'] != 0: if 'drjl' in self.user_set: logger.warning('Since icckw>0, changing the value of \'drjl\' to 0') - self['drjl'] = 0 - if not self['auto_ptj_mjj']: + self['drjl'] = 0 + if not self['auto_ptj_mjj']: if self['mmjj'] > self['xqcut']: logger.warning('mmjj > xqcut (and auto_ptj_mjj = F). MMJJ set to 0') - self['mmjj'] = 0.0 - - # check validity of the pdf set + self['mmjj'] = 0.0 + + # check validity of the pdf set # note that pdlabel is automatically set to lhapdf if pdlabel1 or pdlabel2 is set to lhapdf if self['pdlabel'] == 'lhapdf': #add warning if lhaid not define @@ -4426,7 +4426,7 @@ def check_validity(self): mod = False for i in [1,2]: - lpp = 'lpp%i' %i + lpp = 'lpp%i' %i pdlabelX = 'pdlabel%i' % i if self[lpp] == 0: # nopdf if self[pdlabelX] != 'none': @@ -4459,12 +4459,12 @@ def check_validity(self): raise InvalidRunCard( "Heavy ion mode is only supported for lpp1=1/2") if self['lpp2'] not in [1,2]: if self['nb_proton2'] !=1 or self['nb_neutron2'] !=0: - raise InvalidRunCard( "Heavy ion mode is only supported for lpp2=1/2") + raise InvalidRunCard( "Heavy ion mode is only supported for lpp2=1/2") # check that fixed_fac_scale(1/2) is setting as expected # if lpp=2/3/4 -> default is that beam in fixed scale - # check that fixed_fac_scale is not setup if fixed_fac_scale1/2 are + # check that fixed_fac_scale is not setup if fixed_fac_scale1/2 are # check that both fixed_fac_scale1/2 are defined together # ensure that fixed_fac_scale1 and fixed_fac_scale2 are setup as needed if 'fixed_fac_scale1' in self.user_set: @@ -4475,13 +4475,13 @@ def check_validity(self): elif 'fixed_fac_scale' in self.user_set: logger.warning('fixed_fac_scale and fixed_fac_scale1 are defined but not fixed_fac_scale2. The value of fixed_fac_scale2 will be set to the one of fixed_fac_scale.') self['fixed_fac_scale2'] = self['fixed_fac_scale'] - elif self['lpp2'] !=0: + elif self['lpp2'] !=0: raise Exception('fixed_fac_scale2 not defined while fixed_fac_scale1 is. Please fix your run_card.') elif 'fixed_fac_scale2' in self.user_set: if 'fixed_fac_scale' in self.user_set: logger.warning('fixed_fac_scale and fixed_fac_scale2 are defined but not fixed_fac_scale1. The value of fixed_fac_scale1 will be set to the one of fixed_fac_scale.') self['fixed_fac_scale1'] = self['fixed_fac_scale'] - elif self['lpp1'] !=0: + elif self['lpp1'] !=0: raise Exception('fixed_fac_scale1 not defined while fixed_fac_scale2 is. Please fix your run_card.') else: if 'fixed_fac_scale' in self.user_set: @@ -4500,12 +4500,12 @@ def check_validity(self): logger.warning('fixed_fac_scale1 not defined whithin your run_card. Using default value: %s', self['fixed_fac_scale1']) logger.warning('fixed_fac_scale2 not defined whithin your run_card. Using default value: %s', self['fixed_fac_scale2']) - # check if lpp = + # check if lpp = if self['pdlabel'] not in sum(self.allowed_lep_densities.values(),[]): for i in [1,2]: if abs(self['lpp%s' % i ]) in [3,4] and self['fixed_fac_scale%s' % i] and self['dsqrt_q2fact%s'%i] == 91.188: logger.warning("Vector boson from lepton PDF is using fixed scale value of muf [dsqrt_q2fact%s]. Looks like you kept the default value (Mz). Is this really the cut-off that you want to use?" % i) - + if abs(self['lpp%s' % i ]) == 2 and self['fixed_fac_scale%s' % i] and self['dsqrt_q2fact%s'%i] == 91.188: if self['pdlabel'] in ['edff','chff']: logger.warning("Since 3.5.0 exclusive photon-photon processes in ultraperipheral proton and nuclear collisions from gamma-UPC (arXiv:2207.03012) will ignore the factorisation scale.") @@ -4515,10 +4515,10 @@ def check_validity(self): if six.PY2 and self['hel_recycling']: self['hel_recycling'] = False - logger.warning("""Helicity recycling optimization requires Python3. This optimzation is therefore deactivated automatically. + logger.warning("""Helicity recycling optimization requires Python3. This optimzation is therefore deactivated automatically. In general this optimization speeds up the computation by a factor of two.""") - + # check that ebeam is bigger than the associated mass. for i in [1,2]: if self['lpp%s' % i ] not in [1,2]: @@ -4529,13 +4529,13 @@ def check_validity(self): logger.warning("At-rest proton mode set: energy beam set to 0.938") self.set('ebeam%i' %i, 0.938) else: - raise InvalidRunCard("Energy for beam %i lower than proton mass. Please fix this") - elif self['ebeam%i' % i] < self['mass_ion%i' % i]: + raise InvalidRunCard("Energy for beam %i lower than proton mass. Please fix this") + elif self['ebeam%i' % i] < self['mass_ion%i' % i]: if self['ebeam%i' %i] == 0: logger.warning("At rest ion mode set: Energy beam set to %s" % self['mass_ion%i' % i]) self.set('ebeam%i' %i, self['mass_ion%i' % i]) - - + + # check the tmin_for_channel is negative if self['tmin_for_channel'] == 0: raise InvalidRunCard('tmin_for_channel can not be set to 0.') @@ -4543,15 +4543,15 @@ def check_validity(self): logger.warning('tmin_for_channel should be negative. Will be using -%f instead' % self['tmin_for_channel']) self.set('tmin_for_channel', -self['tmin_for_channel']) - + def update_system_parameter_for_include(self): """system parameter need to be setupe""" - + # polarization self['frame_id'] = sum(2**(n) for n in self['me_frame']) - + # set the pdg_for_cut fortran parameter - pdg_to_cut = set(list(self['pt_min_pdg'].keys()) +list(self['pt_max_pdg'].keys()) + + pdg_to_cut = set(list(self['pt_min_pdg'].keys()) +list(self['pt_max_pdg'].keys()) + list(self['e_min_pdg'].keys()) +list(self['e_max_pdg'].keys()) + list(self['eta_min_pdg'].keys()) +list(self['eta_max_pdg'].keys())+ list(self['mxx_min_pdg'].keys()) + list(self['mxx_only_part_antipart'].keys())) @@ -4559,15 +4559,15 @@ def update_system_parameter_for_include(self): pdg_to_cut.discard('default') if len(pdg_to_cut)>25: raise Exception("Maximum 25 different pdgs are allowed for pdg specific cut") - + if any(int(pdg)<0 for pdg in pdg_to_cut): logger.warning('PDG specific cuts are always applied symmetrically on particles/anti-particles. Always use positve PDG codes') raise MadGraph5Error('Some PDG specific cuts are defined using negative pdg code') - - + + if any(pdg in pdg_to_cut for pdg in [1,2,3,4,5,21,22,11,13,15]): raise Exception("Can not use PDG related cut for light quark/b quark/lepton/gluon/photon") - + if pdg_to_cut: self['pdg_cut'] = list(pdg_to_cut) self['ptmin4pdg'] = [] @@ -4595,7 +4595,7 @@ def update_system_parameter_for_include(self): self[new_var].append(self[old_var][str(pdg)] if str(pdg) in self[old_var] else default) else: if str(pdg) not in self[old_var]: - raise Exception("no default value defined for %s and no value defined for pdg %s" % (old_var, pdg)) + raise Exception("no default value defined for %s and no value defined for pdg %s" % (old_var, pdg)) self[new_var].append(self[old_var][str(pdg)]) else: self['pdg_cut'] = [0] @@ -4605,11 +4605,11 @@ def update_system_parameter_for_include(self): self['ptmax4pdg'] = [-1.] self['Emax4pdg'] = [-1.] self['etamax4pdg'] =[-1.] - self['mxxmin4pdg'] =[0.] + self['mxxmin4pdg'] =[0.] self['mxxpart_antipart'] = [False] - - - + + + def create_default_for_process(self, proc_characteristic, history, proc_def): """Rules process 1->N all cut set on off. @@ -4626,7 +4626,7 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): if proc_characteristic['loop_induced']: self['nhel'] = 1 self['pdgs_for_merging_cut'] = proc_characteristic['colored_pdgs'] - + if proc_characteristic['ninitial'] == 1: #remove all cut self.remove_all_cut() @@ -4636,7 +4636,7 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): # check for beam_id beam_id = set() beam_id_split = [set(), set()] - for proc in proc_def: + for proc in proc_def: for oneproc in proc: for i,leg in enumerate(oneproc['legs']): if not leg['state']: @@ -4654,20 +4654,20 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): maxjetflavor = max([4]+[abs(i) for i in beam_id if -7< i < 7]) self['maxjetflavor'] = maxjetflavor self['asrwgtflavor'] = maxjetflavor - + if any(i in beam_id for i in [1,-1,2,-2,3,-3,4,-4,5,-5,21,22]): # check for e p collision if any(id in beam_id for id in [11,-11,13,-13]): self.display_block.append('beam_pol') if any(id in beam_id_split[0] for id in [11,-11,13,-13]): - self['lpp1'] = 0 - self['lpp2'] = 1 - self['ebeam1'] = '1k' - self['ebeam2'] = '6500' + self['lpp1'] = 0 + self['lpp2'] = 1 + self['ebeam1'] = '1k' + self['ebeam2'] = '6500' else: - self['lpp1'] = 1 - self['lpp2'] = 0 - self['ebeam1'] = '6500' + self['lpp1'] = 1 + self['lpp2'] = 0 + self['ebeam1'] = '6500' self['ebeam2'] = '1k' # UPC for p p collision @@ -4677,7 +4677,7 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): self['ebeam1'] = '6500' self['ebeam2'] = '6500' self['pdlabel'] = 'edff' - + elif any(id in beam_id for id in [11,-11,13,-13]): self['lpp1'] = 0 self['lpp2'] = 0 @@ -4688,7 +4688,7 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): self.display_block.append('ecut') self.display_block.append('beam_pol') - + # check for possibility of eva eva_in_b1 = any(i in beam_id_split[0] for i in [23,24,-24]) #,12,-12,14,-14]) @@ -4701,10 +4701,10 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): self['nhel'] = 1 self['pdlabel'] = 'eva' self['fixed_fac_scale'] = True - self.display_block.append('beam_pol') + self.display_block.append('beam_pol') elif eva_in_b1: - self.display_block.append('beam_pol') + self.display_block.append('beam_pol') self['pdlabel1'] = 'eva' self['fixed_fac_scale1'] = True self['nhel'] = 1 @@ -4724,7 +4724,7 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): self['pdlabel2'] = 'eva' self['fixed_fac_scale2'] = True self['nhel'] = 1 - self.display_block.append('beam_pol') + self.display_block.append('beam_pol') for i in beam_id_split[0]: if abs(i) == 11: self['lpp1'] = math.copysign(3,i) @@ -4740,34 +4740,34 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): if any(i in beam_id for i in [22,23,24,-24,12,-12,14,-14]): self.display_block.append('eva_scale') - # automatic polarisation of the beam if neutrino beam + # automatic polarisation of the beam if neutrino beam if any(id in beam_id for id in [12,-12,14,-14,16,-16]): self.display_block.append('beam_pol') if any(id in beam_id_split[0] for id in [12,14,16]): - self['lpp1'] = 0 - self['ebeam1'] = '1k' + self['lpp1'] = 0 + self['ebeam1'] = '1k' self['polbeam1'] = -100 if not all(id in [12,14,16] for id in beam_id_split[0]): logger.warning('Issue with default beam setup of neutrino in the run_card. Please check it up [polbeam1]. %s') elif any(id in beam_id_split[0] for id in [-12,-14,-16]): - self['lpp1'] = 0 - self['ebeam1'] = '1k' + self['lpp1'] = 0 + self['ebeam1'] = '1k' self['polbeam1'] = 100 if not all(id in [-12,-14,-16] for id in beam_id_split[0]): - logger.warning('Issue with default beam setup of neutrino in the run_card. Please check it up [polbeam1].') + logger.warning('Issue with default beam setup of neutrino in the run_card. Please check it up [polbeam1].') if any(id in beam_id_split[1] for id in [12,14,16]): - self['lpp2'] = 0 - self['ebeam2'] = '1k' + self['lpp2'] = 0 + self['ebeam2'] = '1k' self['polbeam2'] = -100 if not all(id in [12,14,16] for id in beam_id_split[1]): logger.warning('Issue with default beam setup of neutrino in the run_card. Please check it up [polbeam2].') elif any(id in beam_id_split[1] for id in [-12,-14,-16]): - self['lpp2'] = 0 - self['ebeam2'] = '1k' + self['lpp2'] = 0 + self['ebeam2'] = '1k' self['polbeam2'] = 100 if not all(id in [-12,-14,-16] for id in beam_id_split[1]): logger.warning('Issue with default beam setup of neutrino in the run_card. Please check it up [polbeam2].') - + # Check if need matching min_particle = 99 max_particle = 0 @@ -4798,12 +4798,12 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): else: # all are jet => matching is ON matching=True - break - + break + if matching: self['ickkw'] = 1 self['xqcut'] = 30 - #self['use_syst'] = False + #self['use_syst'] = False self['drjj'] = 0 self['drjl'] = 0 self['sys_alpsfact'] = "0.5 1 2" @@ -4811,8 +4811,8 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): self.display_block.append('mlm') self.display_block.append('ckkw') self['dynamical_scale_choice'] = -1 - - + + # For interference module, the systematics are wrong. # automatically set use_syst=F and set systematics_program=none no_systematics = False @@ -4826,14 +4826,14 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): continue break - + if interference or no_systematics: self['use_syst'] = False self['systematics_program'] = 'none' if interference: self['dynamical_scale_choice'] = 3 self['sde_strategy'] = 2 - + # set default integration strategy # interference case is already handle above # here pick strategy 2 if only one QCD color flow @@ -4852,7 +4852,7 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): if pure_lepton and proton_initial: self['sde_strategy'] = 1 else: - # check if multi-jet j + # check if multi-jet j is_multijet = True for proc in proc_def: if any(abs(j.get('id')) not in jet_id for j in proc[0]['legs']): @@ -4860,7 +4860,7 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): break if is_multijet: self['sde_strategy'] = 2 - + # if polarization is used, set the choice of the frame in the run_card # But only if polarization is used for massive particles for plist in proc_def: @@ -4870,7 +4870,7 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): model = proc.get('model') particle = model.get_particle(l.get('id')) if particle.get('mass').lower() != 'zero': - self.display_block.append('frame') + self.display_block.append('frame') break else: continue @@ -4894,15 +4894,15 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): proc = proc_list[0] if proc['forbidden_onsh_s_channels']: self['sde_strategy'] = 1 - + if 'fix_scale' in proc_characteristic['limitations']: self['fixed_ren_scale'] = 1 self['fixed_fac_scale'] = 1 if self['ickkw'] == 1: logger.critical("MLM matching/merging not compatible with the model! You need to use another method to remove the double counting!") self['ickkw'] = 0 - - # define class of particles present to hide all the cuts associated to + + # define class of particles present to hide all the cuts associated to # not present class cut_class = collections.defaultdict(int) for proc in proc_def: @@ -4925,41 +4925,41 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): one_proc_cut['L'] += 1 elif abs(pdg) in [12,14,16]: one_proc_cut['n'] += 1 - one_proc_cut['L'] += 1 + one_proc_cut['L'] += 1 elif str(oneproc.get('model').get_particle(pdg)['mass']) != 'ZERO': one_proc_cut['H'] += 1 - + for key, nb in one_proc_cut.items(): cut_class[key] = max(cut_class[key], nb) self.cut_class = dict(cut_class) self.cut_class[''] = True #avoid empty - + # If model has running functionality add the additional parameter model = proc_def[0][0].get('model') if model['running_elements']: - self.display_block.append('RUNNING') + self.display_block.append('RUNNING') # Read file input/default_run_card_lo.dat # This has to be LAST !! if os.path.exists(self.default_run_card): self.read(self.default_run_card, consistency=False) - + def write(self, output_file, template=None, python_template=False, **opt): - """Write the run_card in output_file according to template + """Write the run_card in output_file according to template (a path to a valid run_card)""" if not template: if not MADEVENT: - template = pjoin(MG5DIR, 'Template', 'LO', 'Cards', + template = pjoin(MG5DIR, 'Template', 'LO', 'Cards', 'run_card.dat') python_template = True else: template = pjoin(MEDIR, 'Cards', 'run_card_default.dat') python_template = False - + hid_lines = {'default':True}#collections.defaultdict(itertools.repeat(True).next) if isinstance(output_file, str): @@ -4975,9 +4975,9 @@ def write(self, output_file, template=None, python_template=False, hid_lines[k1+k2] = True super(RunCardLO, self).write(output_file, template=template, - python_template=python_template, + python_template=python_template, template_options=hid_lines, - **opt) + **opt) class InvalidMadAnalysis5Card(InvalidCmd): @@ -4986,19 +4986,19 @@ class InvalidMadAnalysis5Card(InvalidCmd): class MadAnalysis5Card(dict): """ A class to store a MadAnalysis5 card. Very basic since it is basically free format.""" - + _MG5aMC_escape_tag = '@MG5aMC' - + _default_hadron_inputs = ['*.hepmc', '*.hep', '*.stdhep', '*.lhco','*.root'] _default_parton_inputs = ['*.lhe'] _skip_analysis = False - + @classmethod def events_can_be_reconstructed(cls, file_path): """ Checks from the type of an event file whether it can be reconstructed or not.""" return not (file_path.endswith('.lhco') or file_path.endswith('.lhco.gz') or \ file_path.endswith('.root') or file_path.endswith('.root.gz')) - + @classmethod def empty_analysis(cls): """ A method returning the structure of an empty analysis """ @@ -5012,7 +5012,7 @@ def empty_reconstruction(cls): 'reco_output':'lhe'} def default_setup(self): - """define the default value""" + """define the default value""" self['mode'] = 'parton' self['inputs'] = [] # None is the default stdout level, it will be set automatically by MG5aMC @@ -5025,8 +5025,8 @@ def default_setup(self): # of this class and some other property could be added to this dictionary # in the future. self['analyses'] = {} - # The recasting structure contains on set of commands and one set of - # card lines. + # The recasting structure contains on set of commands and one set of + # card lines. self['recasting'] = {'commands':[],'card':[]} # Add the default trivial reconstruction to use an lhco input # This is just for the structure @@ -5035,7 +5035,7 @@ def default_setup(self): 'root_input': MadAnalysis5Card.empty_reconstruction()} self['reconstruction']['lhco_input']['reco_output']='lhco' - self['reconstruction']['root_input']['reco_output']='root' + self['reconstruction']['root_input']['reco_output']='root' # Specify in which order the analysis/recasting were specified self['order'] = [] @@ -5049,7 +5049,7 @@ def __init__(self, finput=None,mode=None): return else: dict.__init__(self) - + # Initialize it with all the default value self.default_setup() if not mode is None: @@ -5058,15 +5058,15 @@ def __init__(self, finput=None,mode=None): # if input is define read that input if isinstance(finput, (file, str, StringIO.StringIO)): self.read(finput, mode=mode) - + def read(self, input, mode=None): """ Read an MA5 card""" - + if mode not in [None,'parton','hadron']: raise MadGraph5Error('A MadAnalysis5Card can be read online the modes'+ "'parton' or 'hadron'") card_mode = mode - + if isinstance(input, (file, StringIO.StringIO)): input_stream = input elif isinstance(input, str): @@ -5099,10 +5099,10 @@ def read(self, input, mode=None): except ValueError: option = line[len(self._MG5aMC_escape_tag):] option = option.strip() - + if option=='inputs': self['inputs'].extend([v.strip() for v in value.split(',')]) - + elif option == 'skip_analysis': self._skip_analysis = True @@ -5118,7 +5118,7 @@ def read(self, input, mode=None): except: raise InvalidMadAnalysis5Card( "MA5 output level specification '%s' is incorrect."%str(value)) - + elif option=='analysis_name': current_type = 'analyses' current_name = value @@ -5127,7 +5127,7 @@ def read(self, input, mode=None): "Analysis '%s' already defined in MadAnalysis5 card"%current_name) else: self[current_type][current_name] = MadAnalysis5Card.empty_analysis() - + elif option=='set_reconstructions': try: reconstructions = eval(value) @@ -5142,7 +5142,7 @@ def read(self, input, mode=None): "analysis in a MadAnalysis5 card.") self[current_type][current_name]['reconstructions']=reconstructions continue - + elif option=='reconstruction_name': current_type = 'reconstruction' current_name = value @@ -5161,7 +5161,7 @@ def read(self, input, mode=None): raise InvalidMadAnalysis5Card( "Option '%s' can only take the values 'lhe' or 'root'"%option) self['reconstruction'][current_name]['reco_output'] = value.lower() - + elif option.startswith('recasting'): current_type = 'recasting' try: @@ -5171,11 +5171,11 @@ def read(self, input, mode=None): if len(self['recasting'][current_name])>0: raise InvalidMadAnalysis5Card( "Only one recasting can be defined in MadAnalysis5 hadron card") - + else: raise InvalidMadAnalysis5Card( "Unreckognized MG5aMC instruction in MadAnalysis5 card: '%s'"%option) - + if option in ['analysis_name','reconstruction_name'] or \ option.startswith('recasting'): self['order'].append((current_type,current_name)) @@ -5209,7 +5209,7 @@ def read(self, input, mode=None): self['inputs'] = self._default_hadron_inputs else: self['inputs'] = self._default_parton_inputs - + # Make sure at least one reconstruction is specified for each hadron # level analysis and that it exists. if self['mode']=='hadron': @@ -5221,7 +5221,7 @@ def read(self, input, mode=None): analysis['reconstructions']): raise InvalidMadAnalysis5Card('A reconstructions specified in'+\ " analysis '%s' is not defined."%analysis_name) - + def write(self, output): """ Write an MA5 card.""" @@ -5232,7 +5232,7 @@ def write(self, output): else: raise MadGraph5Error('Incorrect input for the write function of'+\ ' the MadAnalysis5Card card. Received argument type is: %s'%str(type(output))) - + output_lines = [] if self._skip_analysis: output_lines.append('%s skip_analysis'%self._MG5aMC_escape_tag) @@ -5240,11 +5240,11 @@ def write(self, output): if not self['stdout_lvl'] is None: output_lines.append('%s stdout_lvl=%s'%(self._MG5aMC_escape_tag,self['stdout_lvl'])) for definition_type, name in self['order']: - + if definition_type=='analyses': output_lines.append('%s analysis_name = %s'%(self._MG5aMC_escape_tag,name)) output_lines.append('%s set_reconstructions = %s'%(self._MG5aMC_escape_tag, - str(self['analyses'][name]['reconstructions']))) + str(self['analyses'][name]['reconstructions']))) elif definition_type=='reconstruction': output_lines.append('%s reconstruction_name = %s'%(self._MG5aMC_escape_tag,name)) elif definition_type=='recasting': @@ -5254,23 +5254,23 @@ def write(self, output): output_lines.extend(self[definition_type][name]) elif definition_type in ['reconstruction']: output_lines.append('%s reco_output = %s'%(self._MG5aMC_escape_tag, - self[definition_type][name]['reco_output'])) + self[definition_type][name]['reco_output'])) output_lines.extend(self[definition_type][name]['commands']) elif definition_type in ['analyses']: - output_lines.extend(self[definition_type][name]['commands']) - + output_lines.extend(self[definition_type][name]['commands']) + output_stream.write('\n'.join(output_lines)) - + return - - def get_MA5_cmds(self, inputs_arg, submit_folder, run_dir_path=None, + + def get_MA5_cmds(self, inputs_arg, submit_folder, run_dir_path=None, UFO_model_path=None, run_tag=''): - """ Returns a list of tuples ('AnalysisTag',['commands']) specifying - the commands of the MadAnalysis runs required from this card. - At parton-level, the number of such commands is the number of analysis + """ Returns a list of tuples ('AnalysisTag',['commands']) specifying + the commands of the MadAnalysis runs required from this card. + At parton-level, the number of such commands is the number of analysis asked for. In the future, the idea is that the entire card can be processed in one go from MA5 directly.""" - + if isinstance(inputs_arg, list): inputs = inputs_arg elif isinstance(inputs_arg, str): @@ -5278,21 +5278,21 @@ def get_MA5_cmds(self, inputs_arg, submit_folder, run_dir_path=None, else: raise MadGraph5Error("The function 'get_MA5_cmds' can only take "+\ " a string or a list for the argument 'inputs_arg'") - + if len(inputs)==0: raise MadGraph5Error("The function 'get_MA5_cmds' must have "+\ " at least one input specified'") - + if run_dir_path is None: run_dir_path = os.path.dirname(inputs_arg) - + cmds_list = [] - + UFO_load = [] # first import the UFO if provided if UFO_model_path: UFO_load.append('import %s'%UFO_model_path) - + def get_import(input, type=None): """ Generates the MA5 import commands for that event file. """ dataset_name = os.path.basename(input).split('.')[0] @@ -5304,7 +5304,7 @@ def get_import(input, type=None): if not type is None: res.append('set %s.type = %s'%(dataset_name, type)) return res - + fifo_status = {'warned_fifo':False,'fifo_used_up':False} def warn_fifo(input): if not input.endswith('.fifo'): @@ -5317,7 +5317,7 @@ def warn_fifo(input): logger.warning('Only the first MA5 analysis/reconstructions can be run on a fifo. Subsequent runs will skip fifo inputs.') fifo_status['warned_fifo'] = True return True - + # Then the event file(s) input(s) inputs_load = [] for input in inputs: @@ -5325,16 +5325,16 @@ def warn_fifo(input): if len(inputs) > 1: inputs_load.append('set main.stacking_method = superimpose') - + submit_command = 'submit %s'%submit_folder+'_%s' - + # Keep track of the reconstruction outpus in the MA5 workflow # Keys are reconstruction names and values are .lhe.gz reco file paths. # We put by default already the lhco/root ones present reconstruction_outputs = { - 'lhco_input':[f for f in inputs if + 'lhco_input':[f for f in inputs if f.endswith('.lhco') or f.endswith('.lhco.gz')], - 'root_input':[f for f in inputs if + 'root_input':[f for f in inputs if f.endswith('.root') or f.endswith('.root.gz')]} # If a recasting card has to be written out, chose here its path @@ -5343,7 +5343,7 @@ def warn_fifo(input): # Make sure to only run over one analysis over each fifo. for definition_type, name in self['order']: - if definition_type == 'reconstruction': + if definition_type == 'reconstruction': analysis_cmds = list(self['reconstruction'][name]['commands']) reco_outputs = [] for i_input, input in enumerate(inputs): @@ -5365,8 +5365,8 @@ def warn_fifo(input): analysis_cmds.append( submit_command%('reco_%s_%d'%(name,i_input+1))) analysis_cmds.append('remove reco_events') - - reconstruction_outputs[name]= [pjoin(run_dir_path,rec_out) + + reconstruction_outputs[name]= [pjoin(run_dir_path,rec_out) for rec_out in reco_outputs] if len(reco_outputs)>0: cmds_list.append(('_reco_%s'%name,analysis_cmds)) @@ -5386,7 +5386,7 @@ def warn_fifo(input): analysis_cmds = ['set main.mode = parton'] else: analysis_cmds = [] - analysis_cmds.extend(sum([get_import(rec_out) for + analysis_cmds.extend(sum([get_import(rec_out) for rec_out in reconstruction_outputs[reco]],[])) analysis_cmds.extend(self['analyses'][name]['commands']) analysis_cmds.append(submit_command%('%s_%s'%(name,reco))) @@ -5427,12 +5427,12 @@ def warn_fifo(input): %(mue_ref_fixed)s = mue_ref_fixed ! scale to use if fixed scale mode """ running_block_nlo = RunBlock('RUNNING', template_on=template_on, template_off="") - + class RunCardNLO(RunCard): """A class object for the run_card for a (aMC@)NLO pocess""" - + LO = False - + blocks = [running_block_nlo] dummy_fct_file = {"dummy_cuts": pjoin("SubProcesses","dummy_fct.f"), @@ -5443,11 +5443,11 @@ class RunCardNLO(RunCard): if MG5DIR: default_run_card = pjoin(MG5DIR, "internal", "default_run_card_nlo.dat") - - + + def default_setup(self): """define the default value""" - + self.add_param('run_tag', 'tag_1', include=False) self.add_param('nevents', 10000) self.add_param('req_acc', -1.0, include=False) @@ -5455,27 +5455,27 @@ def default_setup(self): self.add_param("time_of_flight", -1.0, include=False) self.add_param('event_norm', 'average') #FO parameter - self.add_param('req_acc_fo', 0.01, include=False) + self.add_param('req_acc_fo', 0.01, include=False) self.add_param('npoints_fo_grid', 5000, include=False) self.add_param('niters_fo_grid', 4, include=False) - self.add_param('npoints_fo', 10000, include=False) + self.add_param('npoints_fo', 10000, include=False) self.add_param('niters_fo', 6, include=False) #seed and collider self.add_param('iseed', 0) - self.add_param('lpp1', 1, fortran_name='lpp(1)') - self.add_param('lpp2', 1, fortran_name='lpp(2)') + self.add_param('lpp1', 1, fortran_name='lpp(1)') + self.add_param('lpp2', 1, fortran_name='lpp(2)') self.add_param('ebeam1', 6500.0, fortran_name='ebeam(1)') - self.add_param('ebeam2', 6500.0, fortran_name='ebeam(2)') + self.add_param('ebeam2', 6500.0, fortran_name='ebeam(2)') self.add_param('pdlabel', 'nn23nlo', allowed=['lhapdf', 'emela', 'cteq6_m','cteq6_d','cteq6_l','cteq6l1', 'nn23lo','nn23lo1','nn23nlo','ct14q00','ct14q07','ct14q14','ct14q21'] +\ - sum(self.allowed_lep_densities.values(),[]) ) + sum(self.allowed_lep_densities.values(),[]) ) self.add_param('lhaid', [244600],fortran_name='lhaPDFid') self.add_param('pdfscheme', 0) # whether to include or not photon-initiated processes in lepton collisions self.add_param('photons_from_lepton', True) self.add_param('lhapdfsetname', ['internal_use_only'], system=True) - # stuff for lepton collisions - # these parameters are in general set automatically by eMELA in a consistent manner with the PDF set - # whether the current PDF set has or not beamstrahlung + # stuff for lepton collisions + # these parameters are in general set automatically by eMELA in a consistent manner with the PDF set + # whether the current PDF set has or not beamstrahlung self.add_param('has_bstrahl', False, system=True) # renormalisation scheme of alpha self.add_param('alphascheme', 0, system=True) @@ -5486,31 +5486,31 @@ def default_setup(self): # w contribution included or not in the running of alpha self.add_param('w_run', 1, system=True) #shower and scale - self.add_param('parton_shower', 'HERWIG6', fortran_name='shower_mc') + self.add_param('parton_shower', 'HERWIG6', fortran_name='shower_mc') self.add_param('shower_scale_factor',1.0) self.add_param('mcatnlo_delta', False) self.add_param('fixed_ren_scale', False) self.add_param('fixed_fac_scale', False) self.add_param('fixed_extra_scale', True, hidden=True, system=True) # set system since running from Ellis-Sexton scale not implemented - self.add_param('mur_ref_fixed', 91.118) + self.add_param('mur_ref_fixed', 91.118) self.add_param('muf1_ref_fixed', -1.0, hidden=True) - self.add_param('muf_ref_fixed', 91.118) + self.add_param('muf_ref_fixed', 91.118) self.add_param('muf2_ref_fixed', -1.0, hidden=True) - self.add_param('mue_ref_fixed', 91.118, hidden=True) - self.add_param("dynamical_scale_choice", [-1],fortran_name='dyn_scale', + self.add_param('mue_ref_fixed', 91.118, hidden=True) + self.add_param("dynamical_scale_choice", [-1],fortran_name='dyn_scale', allowed = [-2,-1,0,1,2,3,10], comment="\'-1\' is based on CKKW back clustering (following feynman diagram).\n \'1\' is the sum of transverse energy.\n '2' is HT (sum of the transverse mass)\n '3' is HT/2, '0' allows to use the user_hook definition (need to be defined via custom_fct entry) ") self.add_param('fixed_qes_scale', False, hidden=True) self.add_param('qes_ref_fixed', -1.0, hidden=True) self.add_param('mur_over_ref', 1.0) - self.add_param('muf_over_ref', 1.0) - self.add_param('muf1_over_ref', -1.0, hidden=True) + self.add_param('muf_over_ref', 1.0) + self.add_param('muf1_over_ref', -1.0, hidden=True) self.add_param('muf2_over_ref', -1.0, hidden=True) self.add_param('mue_over_ref', 1.0, hidden=True, system=True) # forbid the user to modigy due to incorrect handling of the Ellis-Sexton scale self.add_param('qes_over_ref', -1.0, hidden=True) self.add_param('reweight_scale', [True], fortran_name='lscalevar') - self.add_param('rw_rscale_down', -1.0, hidden=True) + self.add_param('rw_rscale_down', -1.0, hidden=True) self.add_param('rw_rscale_up', -1.0, hidden=True) - self.add_param('rw_fscale_down', -1.0, hidden=True) + self.add_param('rw_fscale_down', -1.0, hidden=True) self.add_param('rw_fscale_up', -1.0, hidden=True) self.add_param('rw_rscale', [1.0,2.0,0.5], fortran_name='scalevarR') self.add_param('rw_fscale', [1.0,2.0,0.5], fortran_name='scalevarF') @@ -5523,60 +5523,60 @@ def default_setup(self): #technical self.add_param('folding', [1,1,1], include=False) - + #merging self.add_param('ickkw', 0, allowed=[-1,0,3,4], comment=" - 0: No merging\n - 3: FxFx Merging : http://amcatnlo.cern.ch/FxFx_merging.htm\n - 4: UNLOPS merging (No interface within MG5aMC)\n - -1: NNLL+NLO jet-veto computation. See arxiv:1412.8408 [hep-ph]") self.add_param('bwcutoff', 15.0) - #cuts + #cuts self.add_param('jetalgo', 1.0) - self.add_param('jetradius', 0.7) + self.add_param('jetradius', 0.7) self.add_param('ptj', 10.0 , cut=True) - self.add_param('etaj', -1.0, cut=True) - self.add_param('gamma_is_j', True) + self.add_param('etaj', -1.0, cut=True) + self.add_param('gamma_is_j', True) self.add_param('ptl', 0.0, cut=True) - self.add_param('etal', -1.0, cut=True) + self.add_param('etal', -1.0, cut=True) self.add_param('drll', 0.0, cut=True) - self.add_param('drll_sf', 0.0, cut=True) + self.add_param('drll_sf', 0.0, cut=True) self.add_param('mll', 0.0, cut=True) - self.add_param('mll_sf', 30.0, cut=True) - self.add_param('rphreco', 0.1) - self.add_param('etaphreco', -1.0) - self.add_param('lepphreco', True) - self.add_param('quarkphreco', True) + self.add_param('mll_sf', 30.0, cut=True) + self.add_param('rphreco', 0.1) + self.add_param('etaphreco', -1.0) + self.add_param('lepphreco', True) + self.add_param('quarkphreco', True) self.add_param('ptgmin', 20.0, cut=True) - self.add_param('etagamma', -1.0) + self.add_param('etagamma', -1.0) self.add_param('r0gamma', 0.4) - self.add_param('xn', 1.0) + self.add_param('xn', 1.0) self.add_param('epsgamma', 1.0) - self.add_param('isoem', True) + self.add_param('isoem', True) self.add_param('maxjetflavor', 4, hidden=True) - self.add_param('pineappl', False) + self.add_param('pineappl', False) self.add_param('lhe_version', 3, hidden=True, include=False) - + # customization self.add_param("custom_fcts",[],typelist="str", include=False, comment="list of files containing function that overwritte dummy function of the code (like adding cuts/...)") #internal variable related to FO_analyse_card self.add_param('FO_LHE_weight_ratio',1e-3, hidden=True, system=True) - self.add_param('FO_LHE_postprocessing',['grouping','random'], + self.add_param('FO_LHE_postprocessing',['grouping','random'], hidden=True, system=True, include=False) - + # parameter allowing to define simple cut via the pdg self.add_param('pt_min_pdg',{'__type__':0.}, include=False,cut=True) self.add_param('pt_max_pdg',{'__type__':0.}, include=False,cut=True) self.add_param('mxx_min_pdg',{'__type__':0.}, include=False,cut=True) self.add_param('mxx_only_part_antipart', {'default':False}, include=False, hidden=True) - + #hidden parameter that are transfer to the fortran code self.add_param('pdg_cut',[0], hidden=True, system=True) # store which PDG are tracked self.add_param('ptmin4pdg',[0.], hidden=True, system=True) # store pt min self.add_param('ptmax4pdg',[-1.], hidden=True, system=True) self.add_param('mxxmin4pdg',[0.], hidden=True, system=True) self.add_param('mxxpart_antipart', [False], hidden=True, system=True) - + def check_validity(self): """check the validity of the various input""" - + super(RunCardNLO, self).check_validity() # for lepton-lepton collisions, ignore 'pdlabel' and 'lhaid' @@ -5588,12 +5588,12 @@ def check_validity(self): # for dressed lepton collisions, check that the lhaid is a valid one if self['pdlabel'] not in sum(self.allowed_lep_densities.values(),[]) + ['emela']: raise InvalidRunCard('pdlabel %s not allowed for dressed-lepton collisions' % self['pdlabel']) - + elif self['pdlabel']!='nn23nlo' or self['reweight_pdf']: self['pdlabel']='nn23nlo' self['reweight_pdf']=[False] logger.info('''Lepton-lepton collisions: ignoring PDF related parameters in the run_card.dat (pdlabel, lhaid, reweight_pdf, ...)''') - + if self['lpp1'] == 0 == self['lpp2']: if self['pdlabel']!='nn23nlo' or self['reweight_pdf']: self['pdlabel']='nn23nlo' @@ -5601,8 +5601,8 @@ def check_validity(self): logger.info('''Lepton-lepton collisions: ignoring PDF related parameters in the run_card.dat (pdlabel, lhaid, reweight_pdf, ...)''') # For FxFx merging, make sure that the following parameters are set correctly: - if self['ickkw'] == 3: - # 1. Renormalization and factorization (and ellis-sexton scales) are not fixed + if self['ickkw'] == 3: + # 1. Renormalization and factorization (and ellis-sexton scales) are not fixed scales=['fixed_ren_scale','fixed_fac_scale','fixed_QES_scale'] for scale in scales: if self[scale]: @@ -5615,7 +5615,7 @@ def check_validity(self): self["reweight_scale"]=[self["reweight_scale"][0]] logger.warning('''For consistency in FxFx merging, dynamical_scale_choice has been set to -1 (default)''' ,'$MG:BOLD') - + # 2. Use kT algorithm for jets with pseudo-code size R=1.0 jetparams=['jetradius','jetalgo'] for jetparam in jetparams: @@ -5628,8 +5628,8 @@ def check_validity(self): self["dynamical_scale_choice"] = [-1] self["reweight_scale"]=[self["reweight_scale"][0]] logger.warning('''For consistency with the jet veto, the scale which will be used is ptj. dynamical_scale_choice will be set at -1.''' - ,'$MG:BOLD') - + ,'$MG:BOLD') + # For interface to PINEAPPL, need to use LHAPDF and reweighting to get scale uncertainties if self['pineappl'] and self['pdlabel'].lower() != 'lhapdf': raise InvalidRunCard('PineAPPL generation only possible with the use of LHAPDF') @@ -5661,7 +5661,7 @@ def check_validity(self): if (self['rw_fscale_down'] != -1.0 and ['rw_fscale_down'] not in self['rw_fscale']) or\ (self['rw_fscale_up'] != -1.0 and ['rw_fscale_up'] not in self['rw_fscale']): self['rw_fscale']=[1.0,self['rw_fscale_up'],self['rw_fscale_down']] - + # PDF reweighting check if any(self['reweight_pdf']): # check that we use lhapdf if reweighting is ON @@ -5672,7 +5672,7 @@ def check_validity(self): if self['pdlabel'] != "lhapdf": self['reweight_pdf']=[self['reweight_pdf'][0]] self['lhaid']=[self['lhaid'][0]] - + # make sure set have reweight_scale and dyn_scale_choice of length 1 when fixed scales: if self['fixed_ren_scale'] and self['fixed_fac_scale']: self['reweight_scale']=[self['reweight_scale'][0]] @@ -5685,7 +5685,7 @@ def check_validity(self): self['reweight_pdf']=self['reweight_pdf']*len(self['lhaid']) logger.warning("Setting 'reweight_pdf' for all 'lhaid' to %s" % self['reweight_pdf'][0]) if len(self['reweight_scale']) == 1 and len(self['dynamical_scale_choice']) != 1: - self['reweight_scale']=self['reweight_scale']*len(self['dynamical_scale_choice']) + self['reweight_scale']=self['reweight_scale']*len(self['dynamical_scale_choice']) logger.warning("Setting 'reweight_scale' for all 'dynamical_scale_choice' to %s" % self['reweight_pdf'][0]) # Check that there are no identical elements in lhaid or dynamical_scale_choice @@ -5693,7 +5693,7 @@ def check_validity(self): raise InvalidRunCard("'lhaid' has two or more identical entries. They have to be all different for the code to work correctly.") if len(self['dynamical_scale_choice']) != len(set(self['dynamical_scale_choice'])): raise InvalidRunCard("'dynamical_scale_choice' has two or more identical entries. They have to be all different for the code to work correctly.") - + # Check that lenght of lists are consistent if len(self['reweight_pdf']) != len(self['lhaid']): raise InvalidRunCard("'reweight_pdf' and 'lhaid' lists should have the same length") @@ -5730,7 +5730,7 @@ def check_validity(self): if len(self['folding']) != 3: raise InvalidRunCard("'folding' should contain exactly three integers") for ifold in self['folding']: - if ifold not in [1,2,4,8]: + if ifold not in [1,2,4,8]: raise InvalidRunCard("The three 'folding' parameters should be equal to 1, 2, 4, or 8.") # Check MC@NLO-Delta if self['mcatnlo_delta'] and not self['parton_shower'].lower() == 'pythia8': @@ -5746,11 +5746,11 @@ def check_validity(self): logger.warning("At-rest proton mode set: energy beam set to 0.938 GeV") self.set('ebeam%i' %i, 0.938) else: - raise InvalidRunCard("Energy for beam %i lower than proton mass. Please fix this") + raise InvalidRunCard("Energy for beam %i lower than proton mass. Please fix this") def update_system_parameter_for_include(self): - + # set the pdg_for_cut fortran parameter pdg_to_cut = set(list(self['pt_min_pdg'].keys()) +list(self['pt_max_pdg'].keys())+ list(self['mxx_min_pdg'].keys())+ list(self['mxx_only_part_antipart'].keys())) @@ -5758,12 +5758,12 @@ def update_system_parameter_for_include(self): pdg_to_cut.discard('default') if len(pdg_to_cut)>25: raise Exception("Maximum 25 different PDGs are allowed for PDG specific cut") - + if any(int(pdg)<0 for pdg in pdg_to_cut): logger.warning('PDG specific cuts are always applied symmetrically on particles/anti-particles. Always use positve PDG codes') raise MadGraph5Error('Some PDG specific cuts are defined using negative PDG codes') - - + + if any(pdg in pdg_to_cut for pdg in [21,22,11,13,15]+ list(range(self['maxjetflavor']+1))): # Note that this will double check in the fortran code raise Exception("Can not use PDG related cuts for massless SM particles/leptons") @@ -5790,7 +5790,7 @@ def update_system_parameter_for_include(self): self[new_var].append(self[old_var][str(pdg)] if str(pdg) in self[old_var] else default) else: if str(pdg) not in self[old_var]: - raise Exception("no default value defined for %s and no value defined for pdg %s" % (old_var, pdg)) + raise Exception("no default value defined for %s and no value defined for pdg %s" % (old_var, pdg)) self[new_var].append(self[old_var][str(pdg)]) else: self['pdg_cut'] = [0] @@ -5800,12 +5800,12 @@ def update_system_parameter_for_include(self): self['mxxpart_antipart'] = [False] def write(self, output_file, template=None, python_template=False, **opt): - """Write the run_card in output_file according to template + """Write the run_card in output_file according to template (a path to a valid run_card)""" if not template: if not MADEVENT: - template = pjoin(MG5DIR, 'Template', 'NLO', 'Cards', + template = pjoin(MG5DIR, 'Template', 'NLO', 'Cards', 'run_card.dat') python_template = True else: @@ -5818,7 +5818,7 @@ def write(self, output_file, template=None, python_template=False, **opt): def create_default_for_process(self, proc_characteristic, history, proc_def): """Rules - e+ e- beam -> lpp:0 ebeam:500 + e+ e- beam -> lpp:0 ebeam:500 p p beam -> set maxjetflavor automatically process with tagged photons -> gamma_is_j = false process without QED splittings -> gamma_is_j = false, recombination = false @@ -5844,19 +5844,19 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): self['ebeam2'] = 500 else: self['lpp1'] = 0 - self['lpp2'] = 0 - + self['lpp2'] = 0 + if proc_characteristic['ninitial'] == 1: #remove all cut self.remove_all_cut() # check for tagged photons tagged_particles = set() - + # If model has running functionality add the additional parameter model = proc_def[0].get('model') if model['running_elements']: - self.display_block.append('RUNNING') + self.display_block.append('RUNNING') # Check if need matching min_particle = 99 @@ -5885,7 +5885,7 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): else: idsmin = [l['id'] for l in procmin['legs']] break - + for procmax in proc_def: if len(procmax['legs']) != max_particle: continue @@ -5901,9 +5901,9 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): else: # all are jet => matching is ON matching=True - break - - if matching: + break + + if matching: self['ickkw'] = 3 self['fixed_ren_scale'] = False self["fixed_fac_scale"] = False @@ -5911,17 +5911,17 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): self["jetalgo"] = 1 self["jetradius"] = 1 self["parton_shower"] = "PYTHIA8" - + # Read file input/default_run_card_nlo.dat # This has to be LAST !! if os.path.exists(self.default_run_card): self.read(self.default_run_card, consistency=False) - + class MadLoopParam(ConfigFile): """ a class for storing/dealing with the file MadLoopParam.dat contains a parser to read it, facilities to write a new file,... """ - + _ID_reduction_tool_map = {1:'CutTools', 2:'PJFry++', 3:'IREGI', @@ -5929,10 +5929,10 @@ class MadLoopParam(ConfigFile): 5:'Samurai', 6:'Ninja', 7:'COLLIER'} - + def default_setup(self): """initialize the directory to the default value""" - + self.add_param("MLReductionLib", "6|7|1") self.add_param("IREGIMODE", 2) self.add_param("IREGIRECY", True) @@ -5954,7 +5954,7 @@ def default_setup(self): self.add_param("HelicityFilterLevel", 2) self.add_param("LoopInitStartOver", False) self.add_param("HelInitStartOver", False) - self.add_param("UseQPIntegrandForNinja", True) + self.add_param("UseQPIntegrandForNinja", True) self.add_param("UseQPIntegrandForCutTools", True) self.add_param("COLLIERMode", 1) self.add_param("COLLIERComputeUVpoles", True) @@ -5966,9 +5966,9 @@ def default_setup(self): self.add_param("COLLIERUseInternalStabilityTest",True) def read(self, finput): - """Read the input file, this can be a path to a file, + """Read the input file, this can be a path to a file, a file object, a str with the content of the file.""" - + if isinstance(finput, str): if "\n" in finput: finput = finput.split('\n') @@ -5976,7 +5976,7 @@ def read(self, finput): finput = open(finput) else: raise Exception("No such file %s" % input) - + previous_line= '' for line in finput: if previous_line.startswith('#'): @@ -5985,20 +5985,20 @@ def read(self, finput): if len(value) and value[0] not in ['#', '!']: self.__setitem__(name, value, change_userdefine=True) previous_line = line - - + + def write(self, outputpath, template=None,commentdefault=False): - + if not template: if not MADEVENT: - template = pjoin(MG5DIR, 'Template', 'loop_material', 'StandAlone', + template = pjoin(MG5DIR, 'Template', 'loop_material', 'StandAlone', 'Cards', 'MadLoopParams.dat') else: template = pjoin(MEDIR, 'Cards', 'MadLoopParams_default.dat') fsock = open(template, 'r') template = fsock.readlines() fsock.close() - + if isinstance(outputpath, str): output = open(outputpath, 'w') else: @@ -6019,7 +6019,7 @@ def f77format(value): return value else: raise Exception("Can not format input %s" % type(value)) - + name = '' done = set() for line in template: @@ -6034,12 +6034,12 @@ def f77format(value): elif line.startswith('#'): name = line[1:].split()[0] output.write(line) - - - - - -class eMELA_info(ConfigFile): + + + + + +class eMELA_info(ConfigFile): """ a class for eMELA (LHAPDF-like) info files """ path = '' @@ -6053,7 +6053,7 @@ def __init__(self, finput, me_dir): def read(self, finput): - if isinstance(finput, file): + if isinstance(finput, file): lines = finput.open().read().split('\n') self.path = finput.name else: @@ -6066,7 +6066,7 @@ def read(self, finput): k, v = l.split(':', 1) # ignore further occurrences of : try: self[k.strip()] = eval(v) - except (NameError, SyntaxError): + except (NameError, SyntaxError): self[k.strip()] = v def default_setup(self): @@ -6091,7 +6091,7 @@ def update_epdf_emela_variables(self, banner, uvscheme): +"powers of alpha should be reweighted a posteriori") - logger.info('Updating variables according to %s' % self.path) + logger.info('Updating variables according to %s' % self.path) # Flavours in the running of alpha nd, nu, nl = self['eMELA_ActiveFlavoursAlpha'] self.log_and_update(banner, 'run_card', 'ndnq_run', nd) @@ -6130,8 +6130,8 @@ def update_epdf_emela_variables(self, banner, uvscheme): logger.warning('Cannot treat the following renormalisation schemes for ME and PDFs: %d, %d' \ % (uvscheme, uvscheme_pdf)) - # if PDFs use MSbar with fixed alpha, set the ren scale fixed to Qref - # also check that the com energy is equal to qref, otherwise print a + # if PDFs use MSbar with fixed alpha, set the ren scale fixed to Qref + # also check that the com energy is equal to qref, otherwise print a # warning if uvscheme_pdf == 1: qref = self['eMELA_AlphaQref'] @@ -6144,23 +6144,23 @@ def update_epdf_emela_variables(self, banner, uvscheme): # LL / NLL PDF (0/1) pdforder = self['eMELA_PerturbativeOrder'] - # pdfscheme = 0->MSbar; 1->DIS; 2->eta (leptonic); 3->beta (leptonic) + # pdfscheme = 0->MSbar; 1->DIS; 2->eta (leptonic); 3->beta (leptonic) # 4->mixed (leptonic); 5-> nobeta (leptonic); 6->delta (leptonic) # if LL, use nobeta scheme unless LEGACYLLPDF > 0 if pdforder == 0: if 'eMELA_LEGACYLLPDF' not in self.keys() or self['eMELA_LEGACYLLPDF'] in [-1, 0]: self.log_and_update(banner, 'run_card', 'pdfscheme', 5) - elif self['eMELA_LEGACYLLPDF'] == 1: + elif self['eMELA_LEGACYLLPDF'] == 1: # mixed self.log_and_update(banner, 'run_card', 'pdfscheme', 4) - elif self['eMELA_LEGACYLLPDF'] == 2: + elif self['eMELA_LEGACYLLPDF'] == 2: # eta self.log_and_update(banner, 'run_card', 'pdfscheme', 2) - elif self['eMELA_LEGACYLLPDF'] == 3: + elif self['eMELA_LEGACYLLPDF'] == 3: # beta self.log_and_update(banner, 'run_card', 'pdfscheme', 3) elif pdforder == 1: - # for NLL, use eMELA_FactorisationSchemeInt = 0/1 + # for NLL, use eMELA_FactorisationSchemeInt = 0/1 # for delta/MSbar if self['eMELA_FactorisationSchemeInt'] == 0: # MSbar @@ -6177,7 +6177,7 @@ def update_epdf_emela_variables(self, banner, uvscheme): - + def log_and_update(self, banner, card, par, v): """update the card parameter par to value v diff --git a/epochX/cudacpp/gq_ttq.mad/bin/internal/gen_ximprove.py b/epochX/cudacpp/gq_ttq.mad/bin/internal/gen_ximprove.py index 5fd170d18d..cc842aa50f 100755 --- a/epochX/cudacpp/gq_ttq.mad/bin/internal/gen_ximprove.py +++ b/epochX/cudacpp/gq_ttq.mad/bin/internal/gen_ximprove.py @@ -2,18 +2,18 @@ # # Copyright (c) 2014 The MadGraph5_aMC@NLO Development team and Contributors # -# This file is a part of the MadGraph5_aMC@NLO project, an application which +# This file is a part of the MadGraph5_aMC@NLO project, an application which # automatically generates Feynman diagrams and matrix elements for arbitrary # high-energy processes in the Standard Model and beyond. # -# It is subject to the MadGraph5_aMC@NLO license which should accompany this +# It is subject to the MadGraph5_aMC@NLO license which should accompany this # distribution. # # For more information, visit madgraph.phys.ucl.ac.be and amcatnlo.web.cern.ch # ################################################################################ """ A python file to replace the fortran script gen_ximprove. - This script analyses the result of the survey/ previous refine and + This script analyses the result of the survey/ previous refine and creates the jobs for the following script. """ from __future__ import division @@ -66,77 +66,77 @@ class gensym(object): """a class to call the fortran gensym executable and handle it's output in order to create the various job that are needed for the survey""" - + #convenient shortcut for the formatting of variable @ staticmethod def format_variable(*args): return bannermod.ConfigFile.format_variable(*args) - + combining_job = 2 # number of channel by ajob - splitted_grid = False + splitted_grid = False min_iterations = 3 mode= "survey" - + def __init__(self, cmd, opt=None): - + try: super(gensym, self).__init__(cmd, opt) except TypeError: pass - - # Run statistics, a dictionary of RunStatistics(), with + + # Run statistics, a dictionary of RunStatistics(), with self.run_statistics = {} - + self.cmd = cmd self.run_card = cmd.run_card self.me_dir = cmd.me_dir - - + + # dictionary to keep track of the precision when combining iteration self.cross = collections.defaultdict(int) self.abscross = collections.defaultdict(int) self.sigma = collections.defaultdict(int) self.chi2 = collections.defaultdict(int) - + self.splitted_grid = False if self.cmd.proc_characteristics['loop_induced']: nexternal = self.cmd.proc_characteristics['nexternal'] self.splitted_grid = max(2, (nexternal-2)**2) if hasattr(self.cmd, "opts") and self.cmd.opts['accuracy'] == 0.1: self.cmd.opts['accuracy'] = 0.02 - + if isinstance(cmd.cluster, cluster.MultiCore) and self.splitted_grid > 1: self.splitted_grid = int(cmd.cluster.nb_core**0.5) if self.splitted_grid == 1 and cmd.cluster.nb_core >1: self.splitted_grid = 2 - + #if the user defines it in the run_card: if self.run_card['survey_splitting'] != -1: self.splitted_grid = self.run_card['survey_splitting'] if self.run_card['survey_nchannel_per_job'] != 1 and 'survey_nchannel_per_job' in self.run_card.user_set: - self.combining_job = self.run_card['survey_nchannel_per_job'] + self.combining_job = self.run_card['survey_nchannel_per_job'] elif self.run_card['hard_survey'] > 1: self.combining_job = 1 - - + + self.splitted_Pdir = {} self.splitted_for_dir = lambda x,y: self.splitted_grid self.combining_job_for_Pdir = lambda x: self.combining_job self.lastoffset = {} - + done_warning_zero_coupling = False def get_helicity(self, to_submit=True, clean=True): """launch a single call to madevent to get the list of non zero helicity""" - - self.subproc = [l.strip() for l in open(pjoin(self.me_dir,'SubProcesses', + + self.subproc = [l.strip() for l in open(pjoin(self.me_dir,'SubProcesses', 'subproc.mg'))] subproc = self.subproc P_zero_result = [] nb_tot_proc = len(subproc) - job_list = {} - - + job_list = {} + + for nb_proc,subdir in enumerate(subproc): self.cmd.update_status('Compiling for process %s/%s.' % \ (nb_proc+1,nb_tot_proc), level=None) @@ -154,7 +154,7 @@ def get_helicity(self, to_submit=True, clean=True): p = misc.Popen(['./gensym'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT, cwd=Pdir) #sym_input = "%(points)d %(iterations)d %(accuracy)f \n" % self.opts - + (stdout, _) = p.communicate(''.encode()) stdout = stdout.decode('ascii',errors='ignore') if stdout: @@ -166,11 +166,11 @@ def get_helicity(self, to_submit=True, clean=True): if os.path.exists(pjoin(self.me_dir, 'error')): os.remove(pjoin(self.me_dir, 'error')) continue # bypass bad process - + self.cmd.compile(['madevent_forhel'], cwd=Pdir) if not os.path.exists(pjoin(Pdir, 'madevent_forhel')): - raise Exception('Error make madevent_forhel not successful') - + raise Exception('Error make madevent_forhel not successful') + if not os.path.exists(pjoin(Pdir, 'Hel')): os.mkdir(pjoin(Pdir, 'Hel')) ff = open(pjoin(Pdir, 'Hel', 'input_app.txt'),'w') @@ -180,15 +180,15 @@ def get_helicity(self, to_submit=True, clean=True): try: os.remove(pjoin(Pdir, 'Hel','results.dat')) except Exception: - pass + pass # Launch gensym - p = misc.Popen(['../madevent_forhel < input_app.txt'], stdout=subprocess.PIPE, + p = misc.Popen(['../madevent_forhel < input_app.txt'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT, cwd=pjoin(Pdir,'Hel'), shell=True) #sym_input = "%(points)d %(iterations)d %(accuracy)f \n" % self.opts (stdout, _) = p.communicate(" ".encode()) stdout = stdout.decode('ascii',errors='ignore') if os.path.exists(pjoin(self.me_dir, 'error')): - raise Exception(pjoin(self.me_dir,'error')) + raise Exception(pjoin(self.me_dir,'error')) # note a continue is not enough here, we have in top to link # the matrixX_optim.f to matrixX_orig.f to let the code to work # after this error. @@ -203,7 +203,7 @@ def get_helicity(self, to_submit=True, clean=True): zero_gc = list() all_zampperhel = set() all_bad_amps_perhel = set() - + for line in stdout.splitlines(): if "=" not in line and ":" not in line: continue @@ -229,22 +229,22 @@ def get_helicity(self, to_submit=True, clean=True): "%s\n" % (' '.join(zero_gc)) +\ "This will slow down the computation. Please consider using restricted model:\n" +\ "https://answers.launchpad.net/mg5amcnlo/+faq/2312") - - + + all_good_hels = collections.defaultdict(list) for me_index, hel in all_hel: - all_good_hels[me_index].append(int(hel)) - + all_good_hels[me_index].append(int(hel)) + #print(all_hel) if self.run_card['hel_zeroamp']: all_bad_amps = collections.defaultdict(list) for me_index, amp in all_zamp: all_bad_amps[me_index].append(int(amp)) - + all_bad_amps_perhel = collections.defaultdict(list) for me_index, hel, amp in all_zampperhel: - all_bad_amps_perhel[me_index].append((int(hel),int(amp))) - + all_bad_amps_perhel[me_index].append((int(hel),int(amp))) + elif all_zamp: nb_zero = sum(int(a[1]) for a in all_zamp) if zero_gc: @@ -254,7 +254,7 @@ def get_helicity(self, to_submit=True, clean=True): else: logger.warning("The optimization detected that you have %i zero matrix-element for this SubProcess: %s.\n" % nb_zero +\ "This part can optimize if you set the flag hel_zeroamp to True in the run_card.") - + #check if we need to do something and write associate information" data = [all_hel, all_zamp, all_bad_amps_perhel] if not self.run_card['hel_zeroamp']: @@ -266,14 +266,14 @@ def get_helicity(self, to_submit=True, clean=True): old_data = open(pjoin(Pdir,'Hel','selection')).read() if old_data == data: continue - - + + with open(pjoin(Pdir,'Hel','selection'),'w') as fsock: - fsock.write(data) - - + fsock.write(data) + + for matrix_file in misc.glob('matrix*orig.f', Pdir): - + split_file = matrix_file.split('/') me_index = split_file[-1][len('matrix'):-len('_orig.f')] @@ -289,11 +289,11 @@ def get_helicity(self, to_submit=True, clean=True): #good_hels = sorted(list(good_hels)) good_hels = [str(x) for x in sorted(all_good_hels[me_index])] if self.run_card['hel_zeroamp']: - + bad_amps = [str(x) for x in sorted(all_bad_amps[me_index])] bad_amps_perhel = [x for x in sorted(all_bad_amps_perhel[me_index])] else: - bad_amps = [] + bad_amps = [] bad_amps_perhel = [] if __debug__: mtext = open(matrix_file).read() @@ -310,7 +310,7 @@ def get_helicity(self, to_submit=True, clean=True): recycler.set_input(matrix_file) recycler.set_output(out_file) - recycler.set_template(templ_file) + recycler.set_template(templ_file) recycler.generate_output_file() del recycler @@ -321,19 +321,19 @@ def get_helicity(self, to_submit=True, clean=True): return {}, P_zero_result - + def launch(self, to_submit=True, clean=True): """ """ if not hasattr(self, 'subproc'): - self.subproc = [l.strip() for l in open(pjoin(self.me_dir,'SubProcesses', + self.subproc = [l.strip() for l in open(pjoin(self.me_dir,'SubProcesses', 'subproc.mg'))] subproc = self.subproc - + P_zero_result = [] # check the number of times where they are no phase-space - + nb_tot_proc = len(subproc) - job_list = {} + job_list = {} for nb_proc,subdir in enumerate(subproc): self.cmd.update_status('Compiling for process %s/%s.
(previous processes already running)' % \ (nb_proc+1,nb_tot_proc), level=None) @@ -341,7 +341,7 @@ def launch(self, to_submit=True, clean=True): subdir = subdir.strip() Pdir = pjoin(self.me_dir, 'SubProcesses',subdir) logger.info(' %s ' % subdir) - + # clean previous run if clean: for match in misc.glob('*ajob*', Pdir): @@ -349,17 +349,17 @@ def launch(self, to_submit=True, clean=True): os.remove(match) for match in misc.glob('G*', Pdir): if os.path.exists(pjoin(match,'results.dat')): - os.remove(pjoin(match, 'results.dat')) + os.remove(pjoin(match, 'results.dat')) if os.path.exists(pjoin(match, 'ftn25')): - os.remove(pjoin(match, 'ftn25')) - + os.remove(pjoin(match, 'ftn25')) + #compile gensym self.cmd.compile(['gensym'], cwd=Pdir) if not os.path.exists(pjoin(Pdir, 'gensym')): - raise Exception('Error make gensym not successful') - + raise Exception('Error make gensym not successful') + # Launch gensym - p = misc.Popen(['./gensym'], stdout=subprocess.PIPE, + p = misc.Popen(['./gensym'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT, cwd=Pdir) #sym_input = "%(points)d %(iterations)d %(accuracy)f \n" % self.opts (stdout, _) = p.communicate(''.encode()) @@ -367,8 +367,8 @@ def launch(self, to_submit=True, clean=True): if os.path.exists(pjoin(self.me_dir,'error')): files.mv(pjoin(self.me_dir,'error'), pjoin(Pdir,'ajob.no_ps.log')) P_zero_result.append(subdir) - continue - + continue + jobs = stdout.split() job_list[Pdir] = jobs try: @@ -386,8 +386,8 @@ def launch(self, to_submit=True, clean=True): continue else: if done: - raise Exception('Parsing error in gensym: %s' % stdout) - job_list[Pdir] = l.split() + raise Exception('Parsing error in gensym: %s' % stdout) + job_list[Pdir] = l.split() done = True if not done: raise Exception('Parsing error in gensym: %s' % stdout) @@ -408,16 +408,16 @@ def launch(self, to_submit=True, clean=True): if to_submit: self.submit_to_cluster(job_list) job_list = {} - + return job_list, P_zero_result - + def resubmit(self, min_precision=1.0, resubmit_zero=False): """collect the result of the current run and relaunch each channel - not completed or optionally a completed one with a precision worse than + not completed or optionally a completed one with a precision worse than a threshold (and/or the zero result channel)""" - + job_list, P_zero_result = self.launch(to_submit=False, clean=False) - + for P , jobs in dict(job_list).items(): misc.sprint(jobs) to_resub = [] @@ -434,7 +434,7 @@ def resubmit(self, min_precision=1.0, resubmit_zero=False): elif max(one_result.xerru, one_result.xerrc)/one_result.xsec > min_precision: to_resub.append(job) else: - to_resub.append(job) + to_resub.append(job) if to_resub: for G in to_resub: try: @@ -442,19 +442,19 @@ def resubmit(self, min_precision=1.0, resubmit_zero=False): except Exception as error: misc.sprint(error) pass - misc.sprint(to_resub) + misc.sprint(to_resub) self.submit_to_cluster({P: to_resub}) - - - - - - - - - - - + + + + + + + + + + + def submit_to_cluster(self, job_list): """ """ @@ -467,7 +467,7 @@ def submit_to_cluster(self, job_list): nexternal = self.cmd.proc_characteristics['nexternal'] current = open(pjoin(path, "nexternal.inc")).read() ext = re.search(r"PARAMETER \(NEXTERNAL=(\d+)\)", current).group(1) - + if self.run_card['job_strategy'] == 2: self.splitted_grid = 2 if nexternal == int(ext): @@ -498,18 +498,18 @@ def submit_to_cluster(self, job_list): return self.submit_to_cluster_no_splitting(job_list) else: return self.submit_to_cluster_splitted(job_list) - - + + def submit_to_cluster_no_splitting(self, job_list): """submit the survey without the parralelization. This is the old mode which is still usefull in single core""" - - # write the template file for the parameter file + + # write the template file for the parameter file self.write_parameter(parralelization=False, Pdirs=list(job_list.keys())) - - + + # launch the job with the appropriate grouping - for Pdir, jobs in job_list.items(): + for Pdir, jobs in job_list.items(): jobs = list(jobs) i=0 while jobs: @@ -518,16 +518,16 @@ def submit_to_cluster_no_splitting(self, job_list): for _ in range(self.combining_job_for_Pdir(Pdir)): if jobs: to_submit.append(jobs.pop(0)) - + self.cmd.launch_job(pjoin(self.me_dir, 'SubProcesses', 'survey.sh'), argument=to_submit, cwd=pjoin(self.me_dir,'SubProcesses' , Pdir)) - + def create_resubmit_one_iter(self, Pdir, G, submit_ps, nb_job, step=0): """prepare the input_file for submitting the channel""" - + if 'SubProcesses' not in Pdir: Pdir = pjoin(self.me_dir, 'SubProcesses', Pdir) @@ -535,8 +535,8 @@ def create_resubmit_one_iter(self, Pdir, G, submit_ps, nb_job, step=0): self.splitted_Pdir[(Pdir, G)] = int(nb_job) - # 1. write the new input_app.txt - run_card = self.cmd.run_card + # 1. write the new input_app.txt + run_card = self.cmd.run_card options = {'event' : submit_ps, 'maxiter': 1, 'miniter': 1, @@ -545,29 +545,29 @@ def create_resubmit_one_iter(self, Pdir, G, submit_ps, nb_job, step=0): else run_card['nhel'], 'gridmode': -2, 'channel' : G - } - + } + Gdir = pjoin(Pdir, 'G%s' % G) - self.write_parameter_file(pjoin(Gdir, 'input_app.txt'), options) - + self.write_parameter_file(pjoin(Gdir, 'input_app.txt'), options) + # 2. check that ftn25 exists. - assert os.path.exists(pjoin(Gdir, "ftn25")) - - + assert os.path.exists(pjoin(Gdir, "ftn25")) + + # 3. Submit the new jobs #call back function - packet = cluster.Packet((Pdir, G, step+1), + packet = cluster.Packet((Pdir, G, step+1), self.combine_iteration, (Pdir, G, step+1)) - + if step ==0: - self.lastoffset[(Pdir, G)] = 0 - - # resubmit the new jobs + self.lastoffset[(Pdir, G)] = 0 + + # resubmit the new jobs for i in range(int(nb_job)): name = "G%s_%s" % (G,i+1) self.lastoffset[(Pdir, G)] += 1 - offset = self.lastoffset[(Pdir, G)] + offset = self.lastoffset[(Pdir, G)] self.cmd.launch_job(pjoin(self.me_dir, 'SubProcesses', 'refine_splitted.sh'), argument=[name, 'G%s'%G, offset], cwd= Pdir, @@ -575,9 +575,9 @@ def create_resubmit_one_iter(self, Pdir, G, submit_ps, nb_job, step=0): def submit_to_cluster_splitted(self, job_list): - """ submit the version of the survey with splitted grid creation - """ - + """ submit the version of the survey with splitted grid creation + """ + #if self.splitted_grid <= 1: # return self.submit_to_cluster_no_splitting(job_list) @@ -592,7 +592,7 @@ def submit_to_cluster_splitted(self, job_list): for job in jobs: packet = cluster.Packet((Pdir, job, 1), self.combine_iteration, (Pdir, job, 1)) - for i in range(self.splitted_for_dir(Pdir, job)): + for i in range(self.splitted_for_dir(Pdir, job)): self.cmd.launch_job(pjoin(self.me_dir, 'SubProcesses', 'survey.sh'), argument=[i+1, job], cwd=pjoin(self.me_dir,'SubProcesses' , Pdir), @@ -601,15 +601,15 @@ def submit_to_cluster_splitted(self, job_list): def combine_iteration(self, Pdir, G, step): grid_calculator, cross, error = self.combine_grid(Pdir, G, step) - - # Compute the number of events used for this run. + + # Compute the number of events used for this run. nb_events = grid_calculator.target_evt Gdirs = [] #build the the list of directory for i in range(self.splitted_for_dir(Pdir, G)): path = pjoin(Pdir, "G%s_%s" % (G, i+1)) Gdirs.append(path) - + # 4. make the submission of the next iteration # Three cases - less than 3 iteration -> continue # - more than 3 and less than 5 -> check error @@ -627,15 +627,15 @@ def combine_iteration(self, Pdir, G, step): need_submit = False else: need_submit = True - + elif step >= self.cmd.opts['iterations']: need_submit = False elif self.cmd.opts['accuracy'] < 0: #check for luminosity raise Exception("Not Implemented") elif self.abscross[(Pdir,G)] == 0: - need_submit = False - else: + need_submit = False + else: across = self.abscross[(Pdir,G)]/(self.sigma[(Pdir,G)]+1e-99) tot_across = self.get_current_axsec() if across == 0: @@ -646,20 +646,20 @@ def combine_iteration(self, Pdir, G, step): need_submit = True else: need_submit = False - - + + if cross: grid_calculator.write_grid_for_submission(Pdir,G, self.splitted_for_dir(Pdir, G), nb_events,mode=self.mode, conservative_factor=5.0) - - xsec_format = '.%ig'%(max(3,int(math.log10(1.0/float(error)))+2) - if float(cross)!=0.0 and float(error)!=0.0 else 8) + + xsec_format = '.%ig'%(max(3,int(math.log10(1.0/float(error)))+2) + if float(cross)!=0.0 and float(error)!=0.0 else 8) if need_submit: message = "%%s/G%%s is at %%%s +- %%.3g pb. Now submitting iteration #%s."%(xsec_format, step+1) logger.info(message%\ - (os.path.basename(Pdir), G, float(cross), + (os.path.basename(Pdir), G, float(cross), float(error)*float(cross))) self.resubmit_survey(Pdir,G, Gdirs, step) elif cross: @@ -670,26 +670,26 @@ def combine_iteration(self, Pdir, G, step): newGpath = pjoin(self.me_dir,'SubProcesses' , Pdir, 'G%s' % G) if not os.path.exists(newGpath): os.mkdir(newGpath) - + # copy the new grid: - files.cp(pjoin(Gdirs[0], 'ftn25'), + files.cp(pjoin(Gdirs[0], 'ftn25'), pjoin(self.me_dir,'SubProcesses' , Pdir, 'G%s' % G, 'ftn26')) - + # copy the events fsock = open(pjoin(newGpath, 'events.lhe'), 'w') for Gdir in Gdirs: - fsock.write(open(pjoin(Gdir, 'events.lhe')).read()) - + fsock.write(open(pjoin(Gdir, 'events.lhe')).read()) + # copy one log - files.cp(pjoin(Gdirs[0], 'log.txt'), + files.cp(pjoin(Gdirs[0], 'log.txt'), pjoin(self.me_dir,'SubProcesses' , Pdir, 'G%s' % G)) - - + + # create the appropriate results.dat self.write_results(grid_calculator, cross, error, Pdir, G, step) else: logger.info("Survey finished for %s/G%s [0 cross]", os.path.basename(Pdir),G) - + Gdir = pjoin(self.me_dir,'SubProcesses' , Pdir, 'G%s' % G) if not os.path.exists(Gdir): os.mkdir(Gdir) @@ -697,21 +697,21 @@ def combine_iteration(self, Pdir, G, step): files.cp(pjoin(Gdirs[0], 'log.txt'), Gdir) # create the appropriate results.dat self.write_results(grid_calculator, cross, error, Pdir, G, step) - + return 0 def combine_grid(self, Pdir, G, step, exclude_sub_jobs=[]): """ exclude_sub_jobs is to remove some of the subjobs if a numerical issue is detected in one of them. Warning is issue when this occurs. """ - + # 1. create an object to combine the grid information and fill it grid_calculator = combine_grid.grid_information(self.run_card['nhel']) - + for i in range(self.splitted_for_dir(Pdir, G)): if i in exclude_sub_jobs: continue - path = pjoin(Pdir, "G%s_%s" % (G, i+1)) + path = pjoin(Pdir, "G%s_%s" % (G, i+1)) fsock = misc.mult_try_open(pjoin(path, 'results.dat')) one_result = grid_calculator.add_results_information(fsock) fsock.close() @@ -723,9 +723,9 @@ def combine_grid(self, Pdir, G, step, exclude_sub_jobs=[]): fsock.close() os.remove(pjoin(path, 'results.dat')) #os.remove(pjoin(path, 'grid_information')) - - - + + + #2. combine the information about the total crossection / error # start by keep the interation in memory cross, across, sigma = grid_calculator.get_cross_section() @@ -736,12 +736,12 @@ def combine_grid(self, Pdir, G, step, exclude_sub_jobs=[]): if maxwgt: nunwgt = grid_calculator.get_nunwgt(maxwgt) # Make sure not to apply the security below during the first step of the - # survey. Also, disregard channels with a contribution relative to the + # survey. Also, disregard channels with a contribution relative to the # total cross-section smaller than 1e-8 since in this case it is unlikely # that this channel will need more than 1 event anyway. apply_instability_security = False rel_contrib = 0.0 - if (self.__class__ != gensym or step > 1): + if (self.__class__ != gensym or step > 1): Pdir_across = 0.0 Gdir_across = 0.0 for (mPdir,mG) in self.abscross.keys(): @@ -750,7 +750,7 @@ def combine_grid(self, Pdir, G, step, exclude_sub_jobs=[]): (self.sigma[(mPdir,mG)]+1e-99)) if mG == G: Gdir_across += (self.abscross[(mPdir,mG)]/ - (self.sigma[(mPdir,mG)]+1e-99)) + (self.sigma[(mPdir,mG)]+1e-99)) rel_contrib = abs(Gdir_across/(Pdir_across+1e-99)) if rel_contrib > (1.0e-8) and \ nunwgt < 2 and len(grid_calculator.results) > 1: @@ -770,14 +770,14 @@ def combine_grid(self, Pdir, G, step, exclude_sub_jobs=[]): exclude_sub_jobs = list(exclude_sub_jobs) exclude_sub_jobs.append(th_maxwgt[-1][1]) grid_calculator.results.run_statistics['skipped_subchannel'] += 1 - + # Add some monitoring of the problematic events - gPath = pjoin(Pdir, "G%s_%s" % (G, th_maxwgt[-1][1]+1)) + gPath = pjoin(Pdir, "G%s_%s" % (G, th_maxwgt[-1][1]+1)) if os.path.isfile(pjoin(gPath,'events.lhe')): lhe_file = lhe_parser.EventFile(pjoin(gPath,'events.lhe')) discardedPath = pjoin(Pdir,'DiscardedUnstableEvents') if not os.path.exists(discardedPath): - os.mkdir(discardedPath) + os.mkdir(discardedPath) if os.path.isdir(discardedPath): # Keep only the event with a maximum weight, as it surely # is the problematic one. @@ -790,10 +790,10 @@ def combine_grid(self, Pdir, G, step, exclude_sub_jobs=[]): lhe_file.close() evtRecord.write(pjoin(gPath,'events.lhe').read()) evtRecord.close() - + return self.combine_grid(Pdir, G, step, exclude_sub_jobs) - + if across !=0: if sigma != 0: self.cross[(Pdir,G)] += cross**3/sigma**2 @@ -814,10 +814,10 @@ def combine_grid(self, Pdir, G, step, exclude_sub_jobs=[]): self.chi2[(Pdir,G)] = 0 cross = self.cross[(Pdir,G)] error = 0 - + else: error = 0 - + grid_calculator.results.compute_values(update_statistics=True) if (str(os.path.basename(Pdir)), G) in self.run_statistics: self.run_statistics[(str(os.path.basename(Pdir)), G)]\ @@ -825,8 +825,8 @@ def combine_grid(self, Pdir, G, step, exclude_sub_jobs=[]): else: self.run_statistics[(str(os.path.basename(Pdir)), G)] = \ grid_calculator.results.run_statistics - - self.warnings_from_statistics(G, grid_calculator.results.run_statistics) + + self.warnings_from_statistics(G, grid_calculator.results.run_statistics) stats_msg = grid_calculator.results.run_statistics.nice_output( '/'.join([os.path.basename(Pdir),'G%s'%G])) @@ -836,7 +836,7 @@ def combine_grid(self, Pdir, G, step, exclude_sub_jobs=[]): # Clean up grid_information to avoid border effects in case of a crash for i in range(self.splitted_for_dir(Pdir, G)): path = pjoin(Pdir, "G%s_%s" % (G, i+1)) - try: + try: os.remove(pjoin(path, 'grid_information')) except OSError as oneerror: if oneerror.errno != 2: @@ -850,7 +850,7 @@ def warnings_from_statistics(self,G,stats): return EPS_fraction = float(stats['exceptional_points'])/stats['n_madloop_calls'] - + msg = "Channel %s has encountered a fraction of %.3g\n"+ \ "of numerically unstable loop matrix element computations\n"+\ "(which could not be rescued using quadruple precision).\n"+\ @@ -861,16 +861,16 @@ def warnings_from_statistics(self,G,stats): elif EPS_fraction > 0.01: logger.critical((msg%(G,EPS_fraction)).replace('might', 'can')) raise Exception((msg%(G,EPS_fraction)).replace('might', 'can')) - + def get_current_axsec(self): - + across = 0 for (Pdir,G) in self.abscross: across += self.abscross[(Pdir,G)]/(self.sigma[(Pdir,G)]+1e-99) return across - + def write_results(self, grid_calculator, cross, error, Pdir, G, step): - + #compute the value if cross == 0: abscross,nw, luminosity = 0, 0, 0 @@ -888,7 +888,7 @@ def write_results(self, grid_calculator, cross, error, Pdir, G, step): maxwgt = grid_calculator.get_max_wgt() nunwgt = grid_calculator.get_nunwgt() luminosity = nunwgt/cross - + #format the results.dat def fstr(nb): data = '%E' % nb @@ -897,20 +897,20 @@ def fstr(nb): power = int(power) + 1 return '%.5fE%+03i' %(nb,power) line = '%s %s %s %i %i %i %i %s %s %s %s 0.0 0\n' % \ - (fstr(cross), fstr(error*cross), fstr(error*cross), + (fstr(cross), fstr(error*cross), fstr(error*cross), nevents, nw, maxit,nunwgt, fstr(luminosity), fstr(wgt), fstr(abscross), fstr(maxwgt)) - + fsock = open(pjoin(self.me_dir,'SubProcesses' , Pdir, 'G%s' % G, - 'results.dat'),'w') + 'results.dat'),'w') fsock.writelines(line) fsock.close() - + def resubmit_survey(self, Pdir, G, Gdirs, step): """submit the next iteration of the survey""" # 1. write the new input_app.txt to double the number of points - run_card = self.cmd.run_card + run_card = self.cmd.run_card options = {'event' : 2**(step) * self.cmd.opts['points'] / self.splitted_grid, 'maxiter': 1, 'miniter': 1, @@ -919,18 +919,18 @@ def resubmit_survey(self, Pdir, G, Gdirs, step): else run_card['nhel'], 'gridmode': -2, 'channel' : '' - } - + } + if int(options['helicity']) == 1: options['event'] = options['event'] * 2**(self.cmd.proc_characteristics['nexternal']//3) - + for Gdir in Gdirs: - self.write_parameter_file(pjoin(Gdir, 'input_app.txt'), options) - - + self.write_parameter_file(pjoin(Gdir, 'input_app.txt'), options) + + #2. resubmit the new jobs packet = cluster.Packet((Pdir, G, step+1), self.combine_iteration, \ - (Pdir, G, step+1)) + (Pdir, G, step+1)) nb_step = len(Gdirs) * (step+1) for i,subdir in enumerate(Gdirs): subdir = subdir.rsplit('_',1)[1] @@ -938,34 +938,34 @@ def resubmit_survey(self, Pdir, G, Gdirs, step): offset = nb_step+i+1 offset=str(offset) tag = "%s.%s" % (subdir, offset) - + self.cmd.launch_job(pjoin(self.me_dir, 'SubProcesses', 'survey.sh'), argument=[tag, G], cwd=pjoin(self.me_dir,'SubProcesses' , Pdir), packet_member=packet) - + def write_parameter_file(self, path, options): """ """ - + template =""" %(event)s %(maxiter)s %(miniter)s !Number of events and max and min iterations %(accuracy)s !Accuracy %(gridmode)s !Grid Adjustment 0=none, 2=adjust 1 !Suppress Amplitude 1=yes %(helicity)s !Helicity Sum/event 0=exact - %(channel)s """ + %(channel)s """ options['event'] = int(options['event']) open(path, 'w').write(template % options) - - + + def write_parameter(self, parralelization, Pdirs=None): """Write the parameter of the survey run""" run_card = self.cmd.run_card - + options = {'event' : self.cmd.opts['points'], 'maxiter': self.cmd.opts['iterations'], 'miniter': self.min_iterations, @@ -975,36 +975,36 @@ def write_parameter(self, parralelization, Pdirs=None): 'gridmode': 2, 'channel': '' } - + if int(options['helicity'])== 1: options['event'] = options['event'] * 2**(self.cmd.proc_characteristics['nexternal']//3) - + if parralelization: options['gridmode'] = -2 options['maxiter'] = 1 #this is automatic in dsample anyway options['miniter'] = 1 #this is automatic in dsample anyway options['event'] /= self.splitted_grid - + if not Pdirs: Pdirs = self.subproc - + for Pdir in Pdirs: - path =pjoin(Pdir, 'input_app.txt') + path =pjoin(Pdir, 'input_app.txt') self.write_parameter_file(path, options) - - -class gen_ximprove(object): - - + + +class gen_ximprove(object): + + # some hardcoded value which impact the generation gen_events_security = 1.2 # multiply the number of requested event by this number for security combining_job = 0 # allow to run multiple channel in sequence - max_request_event = 1000 # split jobs if a channel if it needs more than that + max_request_event = 1000 # split jobs if a channel if it needs more than that max_event_in_iter = 5000 min_event_in_iter = 1000 - max_splitting = 130 # maximum duplication of a given channel - min_iter = 3 + max_splitting = 130 # maximum duplication of a given channel + min_iter = 3 max_iter = 9 keep_grid_for_refine = False # only apply if needed to split the job @@ -1022,7 +1022,7 @@ def __new__(cls, cmd, opt): return super(gen_ximprove, cls).__new__(gen_ximprove_gridpack) elif cls.force_class == 'loop_induced': return super(gen_ximprove, cls).__new__(gen_ximprove_share) - + if cmd.proc_characteristics['loop_induced']: return super(gen_ximprove, cls).__new__(gen_ximprove_share) elif gen_ximprove.format_variable(cmd.run_card['gridpack'], bool): @@ -1031,31 +1031,31 @@ def __new__(cls, cmd, opt): return super(gen_ximprove, cls).__new__(gen_ximprove_share) else: return super(gen_ximprove, cls).__new__(gen_ximprove_v4) - - + + def __init__(self, cmd, opt=None): - + try: super(gen_ximprove, self).__init__(cmd, opt) except TypeError: pass - + self.run_statistics = {} self.cmd = cmd self.run_card = cmd.run_card run_card = self.run_card self.me_dir = cmd.me_dir - + #extract from the run_card the information that we need. self.gridpack = run_card['gridpack'] self.nhel = run_card['nhel'] if "nhel_refine" in run_card: self.nhel = run_card["nhel_refine"] - + if self.run_card['refine_evt_by_job'] != -1: self.max_request_event = run_card['refine_evt_by_job'] - - + + # Default option for the run self.gen_events = True self.parralel = False @@ -1066,7 +1066,7 @@ def __init__(self, cmd, opt=None): # parameter for the gridpack run self.nreq = 2000 self.iseed = 4321 - + # placeholder for information self.results = 0 #updated in launch/update_html @@ -1074,16 +1074,16 @@ def __init__(self, cmd, opt=None): self.configure(opt) elif isinstance(opt, bannermod.GridpackCard): self.configure_gridpack(opt) - + def __call__(self): return self.launch() - + def launch(self): - """running """ - + """running """ + #start the run self.handle_seed() - self.results = sum_html.collect_result(self.cmd, + self.results = sum_html.collect_result(self.cmd, main_dir=pjoin(self.cmd.me_dir,'SubProcesses')) #main_dir is for gridpack readonly mode if self.gen_events: # We run to provide a given number of events @@ -1095,15 +1095,15 @@ def launch(self): def configure(self, opt): """Defines some parameter of the run""" - + for key, value in opt.items(): if key in self.__dict__: targettype = type(getattr(self, key)) setattr(self, key, self.format_variable(value, targettype, key)) else: raise Exception('%s not define' % key) - - + + # special treatment always do outside the loop to avoid side effect if 'err_goal' in opt: if self.err_goal < 1: @@ -1113,24 +1113,24 @@ def configure(self, opt): logger.info("Generating %s unweighted events." % self.err_goal) self.gen_events = True self.err_goal = self.err_goal * self.gen_events_security # security - + def handle_seed(self): """not needed but for gridpack --which is not handle here for the moment""" return - - + + def find_job_for_event(self): """return the list of channel that need to be improved""" - + assert self.err_goal >=1 self.err_goal = int(self.err_goal) - - goal_lum = self.err_goal/(self.results.axsec+1e-99) #pb^-1 + + goal_lum = self.err_goal/(self.results.axsec+1e-99) #pb^-1 logger.info('Effective Luminosity %s pb^-1', goal_lum) - + all_channels = sum([list(P) for P in self.results],[]) - all_channels.sort(key= lambda x:x.get('luminosity'), reverse=True) - + all_channels.sort(key= lambda x:x.get('luminosity'), reverse=True) + to_refine = [] for C in all_channels: if C.get('axsec') == 0: @@ -1141,61 +1141,61 @@ def find_job_for_event(self): elif C.get('xerr') > max(C.get('axsec'), (1/(100*math.sqrt(self.err_goal)))*all_channels[-1].get('axsec')): to_refine.append(C) - - logger.info('need to improve %s channels' % len(to_refine)) + + logger.info('need to improve %s channels' % len(to_refine)) return goal_lum, to_refine def update_html(self): """update the html from this object since it contains all the information""" - + run = self.cmd.results.current['run_name'] if not os.path.exists(pjoin(self.cmd.me_dir, 'HTML', run)): os.mkdir(pjoin(self.cmd.me_dir, 'HTML', run)) - + unit = self.cmd.results.unit - P_text = "" - if self.results: - Presults = self.results + P_text = "" + if self.results: + Presults = self.results else: self.results = sum_html.collect_result(self.cmd, None) Presults = self.results - + for P_comb in Presults: - P_text += P_comb.get_html(run, unit, self.cmd.me_dir) - - Presults.write_results_dat(pjoin(self.cmd.me_dir,'SubProcesses', 'results.dat')) - + P_text += P_comb.get_html(run, unit, self.cmd.me_dir) + + Presults.write_results_dat(pjoin(self.cmd.me_dir,'SubProcesses', 'results.dat')) + fsock = open(pjoin(self.cmd.me_dir, 'HTML', run, 'results.html'),'w') fsock.write(sum_html.results_header) fsock.write('%s
' % Presults.get_html(run, unit, self.cmd.me_dir)) - fsock.write('%s
' % P_text) - + fsock.write('%s ' % P_text) + self.cmd.results.add_detail('cross', Presults.xsec) - self.cmd.results.add_detail('error', Presults.xerru) - - return Presults.xsec, Presults.xerru + self.cmd.results.add_detail('error', Presults.xerru) + + return Presults.xsec, Presults.xerru + - class gen_ximprove_v4(gen_ximprove): - + # some hardcoded value which impact the generation gen_events_security = 1.2 # multiply the number of requested event by this number for security combining_job = 0 # allow to run multiple channel in sequence - max_request_event = 1000 # split jobs if a channel if it needs more than that + max_request_event = 1000 # split jobs if a channel if it needs more than that max_event_in_iter = 5000 min_event_in_iter = 1000 - max_splitting = 130 # maximum duplication of a given channel - min_iter = 3 + max_splitting = 130 # maximum duplication of a given channel + min_iter = 3 max_iter = 9 keep_grid_for_refine = False # only apply if needed to split the job - def __init__(self, cmd, opt=None): - + def __init__(self, cmd, opt=None): + super(gen_ximprove_v4, self).__init__(cmd, opt) - + if cmd.opts['accuracy'] < cmd._survey_options['accuracy'][1]: self.increase_precision(cmd._survey_options['accuracy'][1]/cmd.opts['accuracy']) @@ -1203,7 +1203,7 @@ def reset_multijob(self): for path in misc.glob(pjoin('*', '*','multijob.dat'), pjoin(self.me_dir, 'SubProcesses')): open(path,'w').write('0\n') - + def write_multijob(self, Channel, nb_split): """ """ if nb_split <=1: @@ -1211,7 +1211,7 @@ def write_multijob(self, Channel, nb_split): f = open(pjoin(self.me_dir, 'SubProcesses', Channel.get('name'), 'multijob.dat'), 'w') f.write('%i\n' % nb_split) f.close() - + def increase_precision(self, rate=3): #misc.sprint(rate) if rate < 3: @@ -1222,25 +1222,25 @@ def increase_precision(self, rate=3): rate = rate -2 self.max_event_in_iter = int((rate+1) * 10000) self.min_events = int(rate+2) * 2500 - self.gen_events_security = 1 + 0.1 * (rate+2) - + self.gen_events_security = 1 + 0.1 * (rate+2) + if int(self.nhel) == 1: self.min_event_in_iter *= 2**(self.cmd.proc_characteristics['nexternal']//3) self.max_event_in_iter *= 2**(self.cmd.proc_characteristics['nexternal']//2) - - + + alphabet = "abcdefghijklmnopqrstuvwxyz" def get_job_for_event(self): """generate the script in order to generate a given number of event""" # correspond to write_gen in the fortran version - - + + goal_lum, to_refine = self.find_job_for_event() #reset the potential multijob of previous run self.reset_multijob() - + jobs = [] # list of the refine if some job are split is list of # dict with the parameter of the run. @@ -1257,17 +1257,17 @@ def get_job_for_event(self): else: for i in range(len(to_refine) //3): new_order.append(to_refine[i]) - new_order.append(to_refine[-2*i-1]) + new_order.append(to_refine[-2*i-1]) new_order.append(to_refine[-2*i-2]) if len(to_refine) % 3 == 1: - new_order.append(to_refine[i+1]) + new_order.append(to_refine[i+1]) elif len(to_refine) % 3 == 2: - new_order.append(to_refine[i+2]) + new_order.append(to_refine[i+2]) #ensure that the reordering is done nicely assert set([id(C) for C in to_refine]) == set([id(C) for C in new_order]) - to_refine = new_order - - + to_refine = new_order + + # loop over the channel to refine for C in to_refine: #1. Compute the number of points are needed to reach target @@ -1279,7 +1279,7 @@ def get_job_for_event(self): nb_split = self.max_splitting nb_split=max(1, nb_split) - + #2. estimate how many points we need in each iteration if C.get('nunwgt') > 0: nevents = needed_event / nb_split * (C.get('nevents') / C.get('nunwgt')) @@ -1296,21 +1296,21 @@ def get_job_for_event(self): nevents = max(self.min_event_in_iter, min(self.max_event_in_iter, nevents)) logger.debug("%s : need %s event. Need %s split job of %s points", C.name, needed_event, nb_split, nevents) - + # write the multi-job information self.write_multijob(C, nb_split) - + packet = cluster.Packet((C.parent_name, C.name), combine_runs.CombineRuns, (pjoin(self.me_dir, 'SubProcesses', C.parent_name)), {"subproc": C.name, "nb_split":nb_split}) - - + + #create the info dict assume no splitting for the default info = {'name': self.cmd.results.current['run_name'], 'script_name': 'unknown', 'directory': C.name, # need to be change for splitted job - 'P_dir': C.parent_name, + 'P_dir': C.parent_name, 'Ppath': pjoin(self.cmd.me_dir, 'SubProcesses', C.parent_name), 'offset': 1, # need to be change for splitted job 'nevents': nevents, @@ -1321,7 +1321,7 @@ def get_job_for_event(self): 'channel': C.name.replace('G',''), 'grid_refinment' : 0, #no refinment of the grid 'base_directory': '', #should be change in splitted job if want to keep the grid - 'packet': packet, + 'packet': packet, } if nb_split == 1: @@ -1334,19 +1334,19 @@ def get_job_for_event(self): if self.keep_grid_for_refine: new_info['base_directory'] = info['directory'] jobs.append(new_info) - - self.create_ajob(pjoin(self.me_dir, 'SubProcesses', 'refine.sh'), jobs) - + + self.create_ajob(pjoin(self.me_dir, 'SubProcesses', 'refine.sh'), jobs) + def create_ajob(self, template, jobs, write_dir=None): """create the ajob""" - + if not jobs: return if not write_dir: write_dir = pjoin(self.me_dir, 'SubProcesses') - + #filter the job according to their SubProcess directory # no mix submition P2job= collections.defaultdict(list) for j in jobs: @@ -1355,11 +1355,11 @@ def create_ajob(self, template, jobs, write_dir=None): for P in P2job.values(): self.create_ajob(template, P, write_dir) return - - + + #Here we can assume that all job are for the same directory. path = pjoin(write_dir, jobs[0]['P_dir']) - + template_text = open(template, 'r').read() # special treatment if needed to combine the script # computes how many submition miss one job @@ -1384,8 +1384,8 @@ def create_ajob(self, template, jobs, write_dir=None): skip1=0 combining_job =1 nb_sub = len(jobs) - - + + nb_use = 0 for i in range(nb_sub): script_number = i+1 @@ -1404,14 +1404,14 @@ def create_ajob(self, template, jobs, write_dir=None): info["base_directory"] = "./" fsock.write(template_text % info) nb_use += nb_job - + fsock.close() return script_number def get_job_for_precision(self): """create the ajob to achieve a give precision on the total cross-section""" - + assert self.err_goal <=1 xtot = abs(self.results.xsec) logger.info("Working on precision: %s %%" %(100*self.err_goal)) @@ -1428,46 +1428,46 @@ def get_job_for_precision(self): rerr *=rerr if not len(to_refine): return - - # change limit since most don't contribute + + # change limit since most don't contribute limit = math.sqrt((self.err_goal * xtot)**2 - rerr/math.sqrt(len(to_refine))) for C in to_refine[:]: cerr = C.mfactor*(C.xerru + len(to_refine)*C.xerrc) if cerr < limit: to_refine.remove(C) - + # all the channel are now selected. create the channel information logger.info('need to improve %s channels' % len(to_refine)) - + jobs = [] # list of the refine if some job are split is list of # dict with the parameter of the run. # loop over the channel to refine for C in to_refine: - + #1. Determine how many events we need in each iteration yerr = C.mfactor*(C.xerru+len(to_refine)*C.xerrc) nevents = 0.2*C.nevents*(yerr/limit)**2 - + nb_split = int((nevents*(C.nunwgt/C.nevents)/self.max_request_event/ (2**self.min_iter-1))**(2/3)) nb_split = max(nb_split, 1) - # **(2/3) to slow down the increase in number of jobs + # **(2/3) to slow down the increase in number of jobs if nb_split > self.max_splitting: nb_split = self.max_splitting - + if nb_split >1: nevents = nevents / nb_split self.write_multijob(C, nb_split) # forbid too low/too large value nevents = min(self.min_event_in_iter, max(self.max_event_in_iter, nevents)) - - + + #create the info dict assume no splitting for the default info = {'name': self.cmd.results.current['run_name'], 'script_name': 'unknown', 'directory': C.name, # need to be change for splitted job - 'P_dir': C.parent_name, + 'P_dir': C.parent_name, 'Ppath': pjoin(self.cmd.me_dir, 'SubProcesses', C.parent_name), 'offset': 1, # need to be change for splitted job 'nevents': nevents, @@ -1487,38 +1487,38 @@ def get_job_for_precision(self): new_info['offset'] = i+1 new_info['directory'] += self.alphabet[i % 26] + str((i+1)//26) jobs.append(new_info) - self.create_ajob(pjoin(self.me_dir, 'SubProcesses', 'refine.sh'), jobs) - + self.create_ajob(pjoin(self.me_dir, 'SubProcesses', 'refine.sh'), jobs) + def update_html(self): """update the html from this object since it contains all the information""" - + run = self.cmd.results.current['run_name'] if not os.path.exists(pjoin(self.cmd.me_dir, 'HTML', run)): os.mkdir(pjoin(self.cmd.me_dir, 'HTML', run)) - + unit = self.cmd.results.unit - P_text = "" - if self.results: - Presults = self.results + P_text = "" + if self.results: + Presults = self.results else: self.results = sum_html.collect_result(self.cmd, None) Presults = self.results - + for P_comb in Presults: - P_text += P_comb.get_html(run, unit, self.cmd.me_dir) - - Presults.write_results_dat(pjoin(self.cmd.me_dir,'SubProcesses', 'results.dat')) - + P_text += P_comb.get_html(run, unit, self.cmd.me_dir) + + Presults.write_results_dat(pjoin(self.cmd.me_dir,'SubProcesses', 'results.dat')) + fsock = open(pjoin(self.cmd.me_dir, 'HTML', run, 'results.html'),'w') fsock.write(sum_html.results_header) fsock.write('%s
' % Presults.get_html(run, unit, self.cmd.me_dir)) - fsock.write('%s
' % P_text) - + fsock.write('%s ' % P_text) + self.cmd.results.add_detail('cross', Presults.xsec) - self.cmd.results.add_detail('error', Presults.xerru) - - return Presults.xsec, Presults.xerru + self.cmd.results.add_detail('error', Presults.xerru) + + return Presults.xsec, Presults.xerru @@ -1528,27 +1528,27 @@ class gen_ximprove_v4_nogridupdate(gen_ximprove_v4): # some hardcoded value which impact the generation gen_events_security = 1.1 # multiply the number of requested event by this number for security combining_job = 0 # allow to run multiple channel in sequence - max_request_event = 400 # split jobs if a channel if it needs more than that + max_request_event = 400 # split jobs if a channel if it needs more than that max_event_in_iter = 500 min_event_in_iter = 250 - max_splitting = 260 # maximum duplication of a given channel - min_iter = 2 + max_splitting = 260 # maximum duplication of a given channel + min_iter = 2 max_iter = 6 keep_grid_for_refine = True - def __init__(self, cmd, opt=None): - + def __init__(self, cmd, opt=None): + gen_ximprove.__init__(cmd, opt) - + if cmd.proc_characteristics['loopinduced'] and \ cmd.proc_characteristics['nexternal'] > 2: self.increase_parralelization(cmd.proc_characteristics['nexternal']) - + def increase_parralelization(self, nexternal): - self.max_splitting = 1000 - + self.max_splitting = 1000 + if self.run_card['refine_evt_by_job'] != -1: pass elif nexternal == 3: @@ -1563,27 +1563,27 @@ def increase_parralelization(self, nexternal): class gen_ximprove_share(gen_ximprove, gensym): """Doing the refine in multicore. Each core handle a couple of PS point.""" - nb_ps_by_job = 2000 + nb_ps_by_job = 2000 mode = "refine" gen_events_security = 1.15 # Note the real security is lower since we stop the jobs if they are at 96% # of this target. def __init__(self, *args, **opts): - + super(gen_ximprove_share, self).__init__(*args, **opts) self.generated_events = {} self.splitted_for_dir = lambda x,y : self.splitted_Pdir[(x,y)] - + def get_job_for_event(self): """generate the script in order to generate a given number of event""" # correspond to write_gen in the fortran version - + goal_lum, to_refine = self.find_job_for_event() self.goal_lum = goal_lum - + # loop over the channel to refine to find the number of PS point to launch total_ps_points = 0 channel_to_ps_point = [] @@ -1593,7 +1593,7 @@ def get_job_for_event(self): os.remove(pjoin(self.me_dir, "SubProcesses",C.parent_name, C.name, "events.lhe")) except: pass - + #1. Compute the number of points are needed to reach target needed_event = goal_lum*C.get('axsec') if needed_event == 0: @@ -1609,18 +1609,18 @@ def get_job_for_event(self): nb_split = 1 if nb_split > self.max_splitting: nb_split = self.max_splitting - nevents = self.max_event_in_iter * self.max_splitting + nevents = self.max_event_in_iter * self.max_splitting else: nevents = self.max_event_in_iter * nb_split if nevents > self.max_splitting*self.max_event_in_iter: logger.warning("Channel %s/%s has a very low efficiency of unweighting. Might not be possible to reach target" % \ (C.name, C.parent_name)) - nevents = self.max_event_in_iter * self.max_splitting - - total_ps_points += nevents - channel_to_ps_point.append((C, nevents)) - + nevents = self.max_event_in_iter * self.max_splitting + + total_ps_points += nevents + channel_to_ps_point.append((C, nevents)) + if self.cmd.options["run_mode"] == 1: if self.cmd.options["cluster_size"]: nb_ps_by_job = total_ps_points /int(self.cmd.options["cluster_size"]) @@ -1634,7 +1634,7 @@ def get_job_for_event(self): nb_ps_by_job = total_ps_points / self.cmd.options["nb_core"] else: nb_ps_by_job = self.nb_ps_by_job - + nb_ps_by_job = int(max(nb_ps_by_job, 500)) for C, nevents in channel_to_ps_point: @@ -1648,20 +1648,20 @@ def get_job_for_event(self): self.create_resubmit_one_iter(C.parent_name, C.name[1:], submit_ps, nb_job, step=0) needed_event = goal_lum*C.get('xsec') logger.debug("%s/%s : need %s event. Need %s split job of %s points", C.parent_name, C.name, needed_event, nb_job, submit_ps) - - + + def combine_iteration(self, Pdir, G, step): - + grid_calculator, cross, error = self.combine_grid(Pdir, G, step) - + # collect all the generated_event Gdirs = [] #build the the list of directory for i in range(self.splitted_for_dir(Pdir, G)): path = pjoin(Pdir, "G%s_%s" % (G, i+1)) Gdirs.append(path) assert len(grid_calculator.results) == len(Gdirs) == self.splitted_for_dir(Pdir, G) - - + + # Check how many events are going to be kept after un-weighting. needed_event = cross * self.goal_lum if needed_event == 0: @@ -1671,19 +1671,19 @@ def combine_iteration(self, Pdir, G, step): if self.err_goal >=1: if needed_event > self.gen_events_security * self.err_goal: needed_event = int(self.gen_events_security * self.err_goal) - + if (Pdir, G) in self.generated_events: old_nunwgt, old_maxwgt = self.generated_events[(Pdir, G)] else: old_nunwgt, old_maxwgt = 0, 0 - + if old_nunwgt == 0 and os.path.exists(pjoin(Pdir,"G%s" % G, "events.lhe")): # possible for second refine. lhe = lhe_parser.EventFile(pjoin(Pdir,"G%s" % G, "events.lhe")) old_nunwgt = lhe.unweight(None, trunc_error=0.005, log_level=0) old_maxwgt = lhe.max_wgt - - + + maxwgt = max(grid_calculator.get_max_wgt(), old_maxwgt) new_evt = grid_calculator.get_nunwgt(maxwgt) @@ -1695,35 +1695,35 @@ def combine_iteration(self, Pdir, G, step): one_iter_nb_event = max(grid_calculator.get_nunwgt(),1) drop_previous_iteration = False # compare the number of events to generate if we discard the previous iteration - n_target_one_iter = (needed_event-one_iter_nb_event) / ( one_iter_nb_event/ sum([R.nevents for R in grid_calculator.results])) + n_target_one_iter = (needed_event-one_iter_nb_event) / ( one_iter_nb_event/ sum([R.nevents for R in grid_calculator.results])) n_target_combined = (needed_event-nunwgt) / efficiency if n_target_one_iter < n_target_combined: # the last iteration alone has more event that the combine iteration. - # it is therefore interesting to drop previous iteration. + # it is therefore interesting to drop previous iteration. drop_previous_iteration = True nunwgt = one_iter_nb_event maxwgt = grid_calculator.get_max_wgt() new_evt = nunwgt - efficiency = ( one_iter_nb_event/ sum([R.nevents for R in grid_calculator.results])) - + efficiency = ( one_iter_nb_event/ sum([R.nevents for R in grid_calculator.results])) + try: if drop_previous_iteration: raise IOError output_file = open(pjoin(Pdir,"G%s" % G, "events.lhe"), 'a') except IOError: output_file = open(pjoin(Pdir,"G%s" % G, "events.lhe"), 'w') - + misc.call(["cat"] + [pjoin(d, "events.lhe") for d in Gdirs], stdout=output_file) output_file.close() # For large number of iteration. check the number of event by doing the # real unweighting. - if nunwgt < 0.6 * needed_event and step > self.min_iter: + if nunwgt < 0.6 * needed_event and step > self.min_iter: lhe = lhe_parser.EventFile(output_file.name) old_nunwgt =nunwgt nunwgt = lhe.unweight(None, trunc_error=0.01, log_level=0) - - + + self.generated_events[(Pdir, G)] = (nunwgt, maxwgt) # misc.sprint("Adding %s event to %s. Currently at %s" % (new_evt, G, nunwgt)) @@ -1742,21 +1742,21 @@ def combine_iteration(self, Pdir, G, step): nevents = grid_calculator.results[0].nevents if nevents == 0: # possible if some integral returns 0 nevents = max(g.nevents for g in grid_calculator.results) - + need_ps_point = (needed_event - nunwgt)/(efficiency+1e-99) - need_job = need_ps_point // nevents + 1 - + need_job = need_ps_point // nevents + 1 + if step < self.min_iter: # This is normal but check if we are on the good track - job_at_first_iter = nb_split_before/2**(step-1) + job_at_first_iter = nb_split_before/2**(step-1) expected_total_job = job_at_first_iter * (2**self.min_iter-1) done_job = job_at_first_iter * (2**step-1) expected_remaining_job = expected_total_job - done_job - logger.debug("efficiency status (smaller is better): %s", need_job/expected_remaining_job) + logger.debug("efficiency status (smaller is better): %s", need_job/expected_remaining_job) # increase if needed but not too much need_job = min(need_job, expected_remaining_job*1.25) - + nb_job = (need_job-0.5)//(2**(self.min_iter-step)-1) + 1 nb_job = max(1, nb_job) grid_calculator.write_grid_for_submission(Pdir,G, @@ -1768,7 +1768,7 @@ def combine_iteration(self, Pdir, G, step): nb_job, step)) self.create_resubmit_one_iter(Pdir, G, nevents, nb_job, step) #self.create_job(Pdir, G, nb_job, nevents, step) - + elif step < self.max_iter: if step + 1 == self.max_iter: need_job = 1.20 * need_job # avoid to have just too few event. @@ -1777,21 +1777,21 @@ def combine_iteration(self, Pdir, G, step): grid_calculator.write_grid_for_submission(Pdir,G, self.splitted_for_dir(Pdir, G), nb_job*nevents ,mode=self.mode, conservative_factor=self.max_iter) - - + + logger.info("%s/G%s is at %i/%i ('%.2g%%') event. Resubmit %i job at iteration %i." \ % (os.path.basename(Pdir), G, int(nunwgt),int(needed_event)+1, (float(nunwgt)/needed_event)*100.0 if needed_event>0.0 else 0.0, nb_job, step)) self.create_resubmit_one_iter(Pdir, G, nevents, nb_job, step) - - + + return 0 - - + + def write_results(self, grid_calculator, cross, error, Pdir, G, step, efficiency): - + #compute the value if cross == 0: abscross,nw, luminosity = 0, 0, 0 @@ -1807,7 +1807,7 @@ def write_results(self, grid_calculator, cross, error, Pdir, G, step, efficiency nevents = nunwgt # make the unweighting to compute the number of events: luminosity = nunwgt/cross - + #format the results.dat def fstr(nb): data = '%E' % nb @@ -1816,23 +1816,23 @@ def fstr(nb): power = int(power) + 1 return '%.5fE%+03i' %(nb,power) line = '%s %s %s %i %i %i %i %s %s %s 0.0 0.0 0\n' % \ - (fstr(cross), fstr(error*cross), fstr(error*cross), + (fstr(cross), fstr(error*cross), fstr(error*cross), nevents, nw, maxit,nunwgt, fstr(luminosity), fstr(wgt), fstr(abscross)) - + fsock = open(pjoin(self.me_dir,'SubProcesses' , Pdir, 'G%s' % G, - 'results.dat'),'w') + 'results.dat'),'w') fsock.writelines(line) fsock.close() - - - + + + class gen_ximprove_gridpack(gen_ximprove_v4): - - min_iter = 1 + + min_iter = 1 max_iter = 13 - max_request_event = 1e12 # split jobs if a channel if it needs more than that + max_request_event = 1e12 # split jobs if a channel if it needs more than that max_event_in_iter = 4000 min_event_in_iter = 500 combining_job = sys.maxsize @@ -1844,7 +1844,7 @@ def __new__(cls, *args, **opts): return super(gen_ximprove_gridpack, cls).__new__(cls, *args, **opts) def __init__(self, *args, **opts): - + self.ngran = -1 self.gscalefact = {} self.readonly = False @@ -1855,23 +1855,23 @@ def __init__(self, *args, **opts): self.readonly = opts['readonly'] super(gen_ximprove_gridpack,self).__init__(*args, **opts) if self.ngran == -1: - self.ngran = 1 - + self.ngran = 1 + def find_job_for_event(self): """return the list of channel that need to be improved""" import random - + assert self.err_goal >=1 self.err_goal = int(self.err_goal) self.gscalefact = {} - + xtot = self.results.axsec - goal_lum = self.err_goal/(xtot+1e-99) #pb^-1 + goal_lum = self.err_goal/(xtot+1e-99) #pb^-1 # logger.info('Effective Luminosity %s pb^-1', goal_lum) - + all_channels = sum([list(P) for P in self.results],[]) all_channels.sort(key=lambda x : x.get('luminosity'), reverse=True) - + to_refine = [] for C in all_channels: tag = C.get('name') @@ -1885,27 +1885,27 @@ def find_job_for_event(self): #need to generate events logger.debug('request events for ', C.get('name'), 'cross=', C.get('axsec'), 'needed events = ', goal_lum * C.get('axsec')) - to_refine.append(C) - - logger.info('need to improve %s channels' % len(to_refine)) + to_refine.append(C) + + logger.info('need to improve %s channels' % len(to_refine)) return goal_lum, to_refine def get_job_for_event(self): """generate the script in order to generate a given number of event""" # correspond to write_gen in the fortran version - - + + goal_lum, to_refine = self.find_job_for_event() jobs = [] # list of the refine if some job are split is list of # dict with the parameter of the run. - + # loop over the channel to refine for C in to_refine: #1. Compute the number of points are needed to reach target needed_event = max(goal_lum*C.get('axsec'), self.ngran) nb_split = 1 - + #2. estimate how many points we need in each iteration if C.get('nunwgt') > 0: nevents = needed_event / nb_split * (C.get('nevents') / C.get('nunwgt')) @@ -1920,13 +1920,13 @@ def get_job_for_event(self): # forbid too low/too large value nevents = max(self.min_event_in_iter, min(self.max_event_in_iter, nevents)) logger.debug("%s : need %s event. Need %s split job of %s points", C.name, needed_event, nb_split, nevents) - + #create the info dict assume no splitting for the default info = {'name': self.cmd.results.current['run_name'], 'script_name': 'unknown', 'directory': C.name, # need to be change for splitted job - 'P_dir': os.path.basename(C.parent_name), + 'P_dir': os.path.basename(C.parent_name), 'offset': 1, # need to be change for splitted job 'Ppath': pjoin(self.cmd.me_dir, 'SubProcesses', C.parent_name), 'nevents': nevents, #int(nevents*self.gen_events_security)+1, @@ -1938,7 +1938,7 @@ def get_job_for_event(self): 'channel': C.name.replace('G',''), 'grid_refinment' : 0, #no refinment of the grid 'base_directory': '', #should be change in splitted job if want to keep the grid - 'packet': None, + 'packet': None, } if self.readonly: @@ -1946,11 +1946,11 @@ def get_job_for_event(self): info['base_directory'] = basedir jobs.append(info) - - write_dir = '.' if self.readonly else None - self.create_ajob(pjoin(self.me_dir, 'SubProcesses', 'refine.sh'), jobs, write_dir) - + + write_dir = '.' if self.readonly else None + self.create_ajob(pjoin(self.me_dir, 'SubProcesses', 'refine.sh'), jobs, write_dir) + done = [] for j in jobs: if j['P_dir'] in done: @@ -1967,22 +1967,22 @@ def get_job_for_event(self): write_dir = '.' if self.readonly else pjoin(self.me_dir, 'SubProcesses') self.check_events(goal_lum, to_refine, jobs, write_dir) - + def check_events(self, goal_lum, to_refine, jobs, Sdir): """check that we get the number of requested events if not resubmit.""" - + new_jobs = [] - + for C, job_info in zip(to_refine, jobs): - P = job_info['P_dir'] + P = job_info['P_dir'] G = job_info['channel'] axsec = C.get('axsec') - requested_events= job_info['requested_event'] - + requested_events= job_info['requested_event'] + new_results = sum_html.OneResult((P,G)) new_results.read_results(pjoin(Sdir,P, 'G%s'%G, 'results.dat')) - + # need to resubmit? if new_results.get('nunwgt') < requested_events: pwd = pjoin(os.getcwd(),job_info['P_dir'],'G%s'%G) if self.readonly else \ @@ -1992,10 +1992,10 @@ def check_events(self, goal_lum, to_refine, jobs, Sdir): job_info['offset'] += 1 new_jobs.append(job_info) files.mv(pjoin(pwd, 'events.lhe'), pjoin(pwd, 'events.lhe.previous')) - + if new_jobs: - self.create_ajob(pjoin(self.me_dir, 'SubProcesses', 'refine.sh'), new_jobs, Sdir) - + self.create_ajob(pjoin(self.me_dir, 'SubProcesses', 'refine.sh'), new_jobs, Sdir) + done = [] for j in new_jobs: if j['P_dir'] in done: @@ -2015,9 +2015,9 @@ def check_events(self, goal_lum, to_refine, jobs, Sdir): files.put_at_end(pjoin(pwd, 'events.lhe'),pjoin(pwd, 'events.lhe.previous')) return self.check_events(goal_lum, to_refine, new_jobs, Sdir) - - - - + + + + diff --git a/epochX/cudacpp/gq_ttq.mad/bin/internal/madevent_interface.py b/epochX/cudacpp/gq_ttq.mad/bin/internal/madevent_interface.py index cb6bf4ca57..8abba3f33f 100755 --- a/epochX/cudacpp/gq_ttq.mad/bin/internal/madevent_interface.py +++ b/epochX/cudacpp/gq_ttq.mad/bin/internal/madevent_interface.py @@ -2,11 +2,11 @@ # # Copyright (c) 2011 The MadGraph5_aMC@NLO Development team and Contributors # -# This file is a part of the MadGraph5_aMC@NLO project, an application which +# This file is a part of the MadGraph5_aMC@NLO project, an application which # automatically generates Feynman diagrams and matrix elements for arbitrary # high-energy processes in the Standard Model and beyond. # -# It is subject to the MadGraph5_aMC@NLO license which should accompany this +# It is subject to the MadGraph5_aMC@NLO license which should accompany this # distribution. # # For more information, visit madgraph.phys.ucl.ac.be and amcatnlo.web.cern.ch @@ -53,10 +53,10 @@ # Special logger for the Cmd Interface logger = logging.getLogger('madevent.stdout') # -> stdout logger_stderr = logging.getLogger('madevent.stderr') # ->stderr - + try: import madgraph -except ImportError as error: +except ImportError as error: # import from madevent directory MADEVENT = True import internal.extended_cmd as cmd @@ -92,7 +92,7 @@ import madgraph.various.lhe_parser as lhe_parser # import madgraph.various.histograms as histograms # imported later to not slow down the loading of the code import models.check_param_card as check_param_card - from madgraph.iolibs.files import ln + from madgraph.iolibs.files import ln from madgraph import InvalidCmd, MadGraph5Error, MG5DIR, ReadWrite @@ -113,10 +113,10 @@ class CmdExtended(common_run.CommonRunCmd): next_possibility = { 'start': [], } - + debug_output = 'ME5_debug' error_debug = 'Please report this bug on https://bugs.launchpad.net/mg5amcnlo\n' - error_debug += 'More information is found in \'%(debug)s\'.\n' + error_debug += 'More information is found in \'%(debug)s\'.\n' error_debug += 'Please attach this file to your report.' config_debug = 'If you need help with this issue please contact us on https://answers.launchpad.net/mg5amcnlo\n' @@ -124,18 +124,18 @@ class CmdExtended(common_run.CommonRunCmd): keyboard_stop_msg = """stopping all operation in order to quit MadGraph5_aMC@NLO please enter exit""" - + # Define the Error InvalidCmd = InvalidCmd ConfigurationError = MadGraph5Error def __init__(self, me_dir, options, *arg, **opt): """Init history and line continuation""" - + # Tag allowing/forbiding question self.force = False - - # If possible, build an info line with current version number + + # If possible, build an info line with current version number # and date, from the VERSION text file info = misc.get_pkg_info() info_line = "" @@ -150,7 +150,7 @@ def __init__(self, me_dir, options, *arg, **opt): else: version = open(pjoin(root_path,'MGMEVersion.txt')).readline().strip() info_line = "#* VERSION %s %s *\n" % \ - (version, (24 - len(version)) * ' ') + (version, (24 - len(version)) * ' ') # Create a header for the history file. # Remember to fill in time at writeout time! @@ -177,7 +177,7 @@ def __init__(self, me_dir, options, *arg, **opt): '#* run as ./bin/madevent.py filename *\n' + \ '#* *\n' + \ '#************************************************************\n' - + if info_line: info_line = info_line[1:] @@ -203,11 +203,11 @@ def __init__(self, me_dir, options, *arg, **opt): "* *\n" + \ "************************************************************") super(CmdExtended, self).__init__(me_dir, options, *arg, **opt) - + def get_history_header(self): - """return the history header""" + """return the history header""" return self.history_header % misc.get_time_info() - + def stop_on_keyboard_stop(self): """action to perform to close nicely on a keyboard interupt""" try: @@ -219,20 +219,20 @@ def stop_on_keyboard_stop(self): self.add_error_log_in_html(KeyboardInterrupt) except: pass - + def postcmd(self, stop, line): """ Update the status of the run for finishing interactive command """ - - stop = super(CmdExtended, self).postcmd(stop, line) + + stop = super(CmdExtended, self).postcmd(stop, line) # relaxing the tag forbidding question self.force = False - + if not self.use_rawinput: return stop - + if self.results and not self.results.current: return stop - + arg = line.split() if len(arg) == 0: return stop @@ -240,41 +240,41 @@ def postcmd(self, stop, line): return stop if isinstance(self.results.status, str) and self.results.status == 'Stop by the user': self.update_status('%s Stop by the user' % arg[0], level=None, error=True) - return stop + return stop elif not self.results.status: return stop elif str(arg[0]) in ['exit','quit','EOF']: return stop - + try: - self.update_status('Command \'%s\' done.
Waiting for instruction.' % arg[0], + self.update_status('Command \'%s\' done.
Waiting for instruction.' % arg[0], level=None, error=True) except Exception: misc.sprint('update_status fails') pass - - + + def nice_user_error(self, error, line): """If a ME run is currently running add a link in the html output""" self.add_error_log_in_html() - return cmd.Cmd.nice_user_error(self, error, line) - + return cmd.Cmd.nice_user_error(self, error, line) + def nice_config_error(self, error, line): """If a ME run is currently running add a link in the html output""" self.add_error_log_in_html() stop = cmd.Cmd.nice_config_error(self, error, line) - - + + try: debug_file = open(self.debug_output, 'a') debug_file.write(open(pjoin(self.me_dir,'Cards','proc_card_mg5.dat'))) debug_file.close() except: - pass + pass return stop - + def nice_error_handling(self, error, line): """If a ME run is currently running add a link in the html output""" @@ -294,7 +294,7 @@ def nice_error_handling(self, error, line): proc_card = pjoin(self.me_dir,'Cards','proc_card_mg5.dat') if os.path.exists(proc_card): self.banner.add(proc_card) - + out_dir = pjoin(self.me_dir, 'Events', self.run_name) if not os.path.isdir(out_dir): os.mkdir(out_dir) @@ -307,7 +307,7 @@ def nice_error_handling(self, error, line): else: pass else: - self.add_error_log_in_html() + self.add_error_log_in_html() stop = cmd.Cmd.nice_error_handling(self, error, line) try: debug_file = open(self.debug_output, 'a') @@ -316,14 +316,14 @@ def nice_error_handling(self, error, line): except: pass return stop - - + + #=============================================================================== # HelpToCmd #=============================================================================== class HelpToCmd(object): """ The Series of help routine for the MadEventCmd""" - + def help_pythia(self): logger.info("syntax: pythia [RUN] [--run_options]") logger.info("-- run pythia on RUN (current one by default)") @@ -352,29 +352,29 @@ def help_banner_run(self): logger.info(" Path should be the path of a valid banner.") logger.info(" RUN should be the name of a run of the current directory") self.run_options_help([('-f','answer all question by default'), - ('--name=X', 'Define the name associated with the new run')]) - + ('--name=X', 'Define the name associated with the new run')]) + def help_open(self): logger.info("syntax: open FILE ") logger.info("-- open a file with the appropriate editor.") logger.info(' If FILE belongs to index.html, param_card.dat, run_card.dat') logger.info(' the path to the last created/used directory is used') logger.info(' The program used to open those files can be chosen in the') - logger.info(' configuration file ./input/mg5_configuration.txt') - - + logger.info(' configuration file ./input/mg5_configuration.txt') + + def run_options_help(self, data): if data: logger.info('-- local options:') for name, info in data: logger.info(' %s : %s' % (name, info)) - + logger.info("-- session options:") - logger.info(" Note that those options will be kept for the current session") + logger.info(" Note that those options will be kept for the current session") logger.info(" --cluster : Submit to the cluster. Current cluster: %s" % self.options['cluster_type']) logger.info(" --multicore : Run in multi-core configuration") logger.info(" --nb_core=X : limit the number of core to use to X.") - + def help_generate_events(self): logger.info("syntax: generate_events [run_name] [options]",) @@ -398,16 +398,16 @@ def help_initMadLoop(self): logger.info(" -f : Bypass the edition of MadLoopParams.dat.",'$MG:color:BLUE') logger.info(" -r : Refresh of the existing filters (erasing them if already present).",'$MG:color:BLUE') logger.info(" --nPS= : Specify how many phase-space points should be tried to set up the filters.",'$MG:color:BLUE') - + def help_calculate_decay_widths(self): - + if self.ninitial != 1: logger.warning("This command is only valid for processes of type A > B C.") logger.warning("This command can not be run in current context.") logger.warning("") - + logger.info("syntax: calculate_decay_widths [run_name] [options])") logger.info("-- Calculate decay widths and enter widths and BRs in param_card") logger.info(" for a series of processes of type A > B C ...") @@ -428,8 +428,8 @@ def help_survey(self): logger.info("-- evaluate the different channel associate to the process") self.run_options_help([("--" + key,value[-1]) for (key,value) in \ self._survey_options.items()]) - - + + def help_restart_gridpack(self): logger.info("syntax: restart_gridpack --precision= --restart_zero") @@ -439,14 +439,14 @@ def help_launch(self): logger.info("syntax: launch [run_name] [options])") logger.info(" --alias for either generate_events/calculate_decay_widths") logger.info(" depending of the number of particles in the initial state.") - + if self.ninitial == 1: logger.info("For this directory this is equivalent to calculate_decay_widths") self.help_calculate_decay_widths() else: logger.info("For this directory this is equivalent to $generate_events") self.help_generate_events() - + def help_refine(self): logger.info("syntax: refine require_precision [max_channel] [--run_options]") logger.info("-- refine the LAST run to achieve a given precision.") @@ -454,14 +454,14 @@ def help_refine(self): logger.info(' or the required relative error') logger.info(' max_channel:[5] maximal number of channel per job') self.run_options_help([]) - + def help_combine_events(self): """ """ logger.info("syntax: combine_events [run_name] [--tag=tag_name] [--run_options]") logger.info("-- Combine the last run in order to write the number of events") logger.info(" asked in the run_card.") self.run_options_help([]) - + def help_store_events(self): """ """ logger.info("syntax: store_events [--run_options]") @@ -481,7 +481,7 @@ def help_import(self): logger.info("syntax: import command PATH") logger.info("-- Execute the command present in the file") self.run_options_help([]) - + def help_syscalc(self): logger.info("syntax: syscalc [RUN] [%s] [-f | --tag=]" % '|'.join(self._plot_mode)) logger.info("-- calculate systematics information for the RUN (current run by default)") @@ -506,18 +506,18 @@ class AskRun(cmd.ControlSwitch): ('madspin', 'Decay onshell particles'), ('reweight', 'Add weights to events for new hypp.') ] - + def __init__(self, question, line_args=[], mode=None, force=False, *args, **opt): - + self.check_available_module(opt['mother_interface'].options) self.me_dir = opt['mother_interface'].me_dir super(AskRun,self).__init__(self.to_control, opt['mother_interface'], *args, **opt) - - + + def check_available_module(self, options): - + self.available_module = set() if options['pythia-pgs_path']: self.available_module.add('PY6') @@ -540,32 +540,32 @@ def check_available_module(self, options): self.available_module.add('Rivet') else: logger.warning("Rivet program installed but no parton shower with hepmc output detected.\n Please install pythia8") - + if not MADEVENT or ('mg5_path' in options and options['mg5_path']): self.available_module.add('MadSpin') if misc.has_f2py() or options['f2py_compiler']: self.available_module.add('reweight') -# old mode to activate the shower +# old mode to activate the shower def ans_parton(self, value=None): """None: means that the user type 'pythia' value: means that the user type pythia=value""" - + if value is None: self.set_all_off() else: logger.warning('Invalid command: parton=%s' % value) - - + + # -# HANDLING SHOWER +# HANDLING SHOWER # def get_allowed_shower(self): """return valid entry for the shower switch""" - + if hasattr(self, 'allowed_shower'): return self.allowed_shower - + self.allowed_shower = [] if 'PY6' in self.available_module: self.allowed_shower.append('Pythia6') @@ -574,9 +574,9 @@ def get_allowed_shower(self): if self.allowed_shower: self.allowed_shower.append('OFF') return self.allowed_shower - + def set_default_shower(self): - + if 'PY6' in self.available_module and\ os.path.exists(pjoin(self.me_dir,'Cards','pythia_card.dat')): self.switch['shower'] = 'Pythia6' @@ -590,10 +590,10 @@ def set_default_shower(self): def check_value_shower(self, value): """check an entry is valid. return the valid entry in case of shortcut""" - + if value in self.get_allowed_shower(): return True - + value =value.lower() if value in ['py6','p6','pythia_6'] and 'PY6' in self.available_module: return 'Pythia6' @@ -601,13 +601,13 @@ def check_value_shower(self, value): return 'Pythia8' else: return False - - -# old mode to activate the shower + + +# old mode to activate the shower def ans_pythia(self, value=None): """None: means that the user type 'pythia' value: means that the user type pythia=value""" - + if 'PY6' not in self.available_module: logger.info('pythia-pgs not available. Ignore commmand') return @@ -621,13 +621,13 @@ def ans_pythia(self, value=None): self.set_switch('shower', 'OFF') else: logger.warning('Invalid command: pythia=%s' % value) - - + + def consistency_shower_detector(self, vshower, vdetector): """consistency_XX_YY(val_XX, val_YY) -> XX is the new key set by the user to a new value val_XX -> YY is another key - -> return value should be None or "replace_YY" + -> return value should be None or "replace_YY" """ if vshower == 'OFF': @@ -635,35 +635,35 @@ def consistency_shower_detector(self, vshower, vdetector): return 'OFF' if vshower == 'Pythia8' and vdetector == 'PGS': return 'OFF' - + return None - + # # HANDLING DETECTOR # def get_allowed_detector(self): """return valid entry for the switch""" - + if hasattr(self, 'allowed_detector'): - return self.allowed_detector - + return self.allowed_detector + self.allowed_detector = [] if 'PGS' in self.available_module: self.allowed_detector.append('PGS') if 'Delphes' in self.available_module: self.allowed_detector.append('Delphes') - + if self.allowed_detector: self.allowed_detector.append('OFF') - return self.allowed_detector + return self.allowed_detector def set_default_detector(self): - + self.set_default_shower() #ensure that this one is called first! - + if 'PGS' in self.available_module and self.switch['shower'] == 'Pythia6'\ and os.path.exists(pjoin(self.me_dir,'Cards','pgs_card.dat')): self.switch['detector'] = 'PGS' @@ -674,16 +674,16 @@ def set_default_detector(self): self.switch['detector'] = 'OFF' else: self.switch['detector'] = 'Not Avail.' - -# old mode to activate pgs + +# old mode to activate pgs def ans_pgs(self, value=None): """None: means that the user type 'pgs' - value: means that the user type pgs=value""" - + value: means that the user type pgs=value""" + if 'PGS' not in self.available_module: logger.info('pythia-pgs not available. Ignore commmand') return - + if value is None: self.set_all_off() self.switch['shower'] = 'Pythia6' @@ -696,16 +696,16 @@ def ans_pgs(self, value=None): else: logger.warning('Invalid command: pgs=%s' % value) - + # old mode to activate Delphes def ans_delphes(self, value=None): """None: means that the user type 'delphes' - value: means that the user type delphes=value""" - + value: means that the user type delphes=value""" + if 'Delphes' not in self.available_module: logger.warning('Delphes not available. Ignore commmand') return - + if value is None: self.set_all_off() if 'PY6' in self.available_module: @@ -718,15 +718,15 @@ def ans_delphes(self, value=None): elif value == 'off': self.set_switch('detector', 'OFF') else: - logger.warning('Invalid command: pgs=%s' % value) + logger.warning('Invalid command: pgs=%s' % value) def consistency_detector_shower(self,vdetector, vshower): """consistency_XX_YY(val_XX, val_YY) -> XX is the new key set by the user to a new value val_XX -> YY is another key - -> return value should be None or "replace_YY" + -> return value should be None or "replace_YY" """ - + if vdetector == 'PGS' and vshower != 'Pythia6': return 'Pythia6' if vdetector == 'Delphes' and vshower not in ['Pythia6', 'Pythia8']: @@ -744,28 +744,28 @@ def consistency_detector_shower(self,vdetector, vshower): # def get_allowed_analysis(self): """return valid entry for the shower switch""" - + if hasattr(self, 'allowed_analysis'): return self.allowed_analysis - + self.allowed_analysis = [] if 'ExRoot' in self.available_module: self.allowed_analysis.append('ExRoot') if 'MA4' in self.available_module: self.allowed_analysis.append('MadAnalysis4') if 'MA5' in self.available_module: - self.allowed_analysis.append('MadAnalysis5') + self.allowed_analysis.append('MadAnalysis5') if 'Rivet' in self.available_module: - self.allowed_analysis.append('Rivet') - + self.allowed_analysis.append('Rivet') + if self.allowed_analysis: self.allowed_analysis.append('OFF') - + return self.allowed_analysis - + def check_analysis(self, value): """check an entry is valid. return the valid entry in case of shortcut""" - + if value in self.get_allowed_analysis(): return True if value.lower() in ['ma4', 'madanalysis4', 'madanalysis_4','4']: @@ -786,30 +786,30 @@ def consistency_shower_analysis(self, vshower, vanalysis): """consistency_XX_YY(val_XX, val_YY) -> XX is the new key set by the user to a new value val_XX -> YY is another key - -> return value should be None or "replace_YY" + -> return value should be None or "replace_YY" """ if vshower != 'Pythia8' and vanalysis == 'Rivet': return 'OFF' #new value for analysis - + return None - + def consistency_analysis_shower(self, vanalysis, vshower): """consistency_XX_YY(val_XX, val_YY) -> XX is the new key set by the user to a new value val_XX -> YY is another key - -> return value should be None or "replace_YY" + -> return value should be None or "replace_YY" """ if vshower != 'Pythia8' and vanalysis == 'Rivet': return 'Pythia8' #new value for analysis - + return None def set_default_analysis(self): """initialise the switch for analysis""" - + if 'MA4' in self.available_module and \ os.path.exists(pjoin(self.me_dir,'Cards','plot_card.dat')): self.switch['analysis'] = 'MadAnalysis4' @@ -818,46 +818,46 @@ def set_default_analysis(self): or os.path.exists(pjoin(self.me_dir,'Cards', 'madanalysis5_hadron_card.dat'))): self.switch['analysis'] = 'MadAnalysis5' elif 'ExRoot' in self.available_module: - self.switch['analysis'] = 'ExRoot' - elif self.get_allowed_analysis(): + self.switch['analysis'] = 'ExRoot' + elif self.get_allowed_analysis(): self.switch['analysis'] = 'OFF' else: self.switch['analysis'] = 'Not Avail.' - + # # MADSPIN handling # def get_allowed_madspin(self): """ ON|OFF|onshell """ - + if hasattr(self, 'allowed_madspin'): return self.allowed_madspin - + self.allowed_madspin = [] if 'MadSpin' in self.available_module: self.allowed_madspin = ['OFF',"ON",'onshell',"full"] return self.allowed_madspin - + def check_value_madspin(self, value): """handle alias and valid option not present in get_allowed_madspin""" - + if value.upper() in self.get_allowed_madspin(): return True elif value.lower() in self.get_allowed_madspin(): return True - + if 'MadSpin' not in self.available_module: return False - + if value.lower() in ['madspin', 'full']: return 'full' elif value.lower() in ['none']: return 'none' - - + + def set_default_madspin(self): """initialise the switch for madspin""" - + if 'MadSpin' in self.available_module: if os.path.exists(pjoin(self.me_dir,'Cards','madspin_card.dat')): self.switch['madspin'] = 'ON' @@ -865,10 +865,10 @@ def set_default_madspin(self): self.switch['madspin'] = 'OFF' else: self.switch['madspin'] = 'Not Avail.' - + def get_cardcmd_for_madspin(self, value): """set some command to run before allowing the user to modify the cards.""" - + if value == 'onshell': return ["edit madspin_card --replace_line='set spinmode' --before_line='decay' set spinmode onshell"] elif value in ['full', 'madspin']: @@ -877,36 +877,36 @@ def get_cardcmd_for_madspin(self, value): return ["edit madspin_card --replace_line='set spinmode' --before_line='decay' set spinmode none"] else: return [] - + # # ReWeight handling # def get_allowed_reweight(self): """ return the list of valid option for reweight=XXX """ - + if hasattr(self, 'allowed_reweight'): return getattr(self, 'allowed_reweight') - + if 'reweight' not in self.available_module: self.allowed_reweight = [] return self.allowed_reweight = ['OFF', 'ON'] - + # check for plugin mode plugin_path = self.mother_interface.plugin_path opts = misc.from_plugin_import(plugin_path, 'new_reweight', warning=False) self.allowed_reweight += opts - + def set_default_reweight(self): """initialise the switch for reweight""" - + if 'reweight' in self.available_module: if os.path.exists(pjoin(self.me_dir,'Cards','reweight_card.dat')): self.switch['reweight'] = 'ON' else: self.switch['reweight'] = 'OFF' else: - self.switch['reweight'] = 'Not Avail.' + self.switch['reweight'] = 'Not Avail.' #=============================================================================== # CheckValidForCmd @@ -916,14 +916,14 @@ class CheckValidForCmd(object): def check_banner_run(self, args): """check the validity of line""" - + if len(args) == 0: self.help_banner_run() raise self.InvalidCmd('banner_run requires at least one argument.') - + tag = [a[6:] for a in args if a.startswith('--tag=')] - - + + if os.path.exists(args[0]): type ='banner' format = self.detect_card_type(args[0]) @@ -931,7 +931,7 @@ def check_banner_run(self, args): raise self.InvalidCmd('The file is not a valid banner.') elif tag: args[0] = pjoin(self.me_dir,'Events', args[0], '%s_%s_banner.txt' % \ - (args[0], tag)) + (args[0], tag)) if not os.path.exists(args[0]): raise self.InvalidCmd('No banner associates to this name and tag.') else: @@ -939,7 +939,7 @@ def check_banner_run(self, args): type = 'run' banners = misc.glob('*_banner.txt', pjoin(self.me_dir,'Events', args[0])) if not banners: - raise self.InvalidCmd('No banner associates to this name.') + raise self.InvalidCmd('No banner associates to this name.') elif len(banners) == 1: args[0] = banners[0] else: @@ -947,8 +947,8 @@ def check_banner_run(self, args): tags = [os.path.basename(p)[len(args[0])+1:-11] for p in banners] tag = self.ask('which tag do you want to use?', tags[0], tags) args[0] = pjoin(self.me_dir,'Events', args[0], '%s_%s_banner.txt' % \ - (args[0], tag)) - + (args[0], tag)) + run_name = [arg[7:] for arg in args if arg.startswith('--name=')] if run_name: try: @@ -970,14 +970,14 @@ def check_banner_run(self, args): except Exception: pass self.set_run_name(name) - + def check_history(self, args): """check the validity of line""" - + if len(args) > 1: self.help_history() raise self.InvalidCmd('\"history\" command takes at most one argument') - + if not len(args): return elif args[0] != 'clean': @@ -985,16 +985,16 @@ def check_history(self, args): if dirpath and not os.path.exists(dirpath) or \ os.path.isdir(args[0]): raise self.InvalidCmd("invalid path %s " % dirpath) - + def check_save(self, args): """ check the validity of the line""" - + if len(args) == 0: args.append('options') if args[0] not in self._save_opts: raise self.InvalidCmd('wrong \"save\" format') - + if args[0] != 'options' and len(args) != 2: self.help_save() raise self.InvalidCmd('wrong \"save\" format') @@ -1003,7 +1003,7 @@ def check_save(self, args): if not os.path.exists(basename): raise self.InvalidCmd('%s is not a valid path, please retry' % \ args[1]) - + if args[0] == 'options': has_path = None for arg in args[1:]: @@ -1024,9 +1024,9 @@ def check_save(self, args): has_path = True if not has_path: if '--auto' in arg and self.options['mg5_path']: - args.insert(1, pjoin(self.options['mg5_path'],'input','mg5_configuration.txt')) + args.insert(1, pjoin(self.options['mg5_path'],'input','mg5_configuration.txt')) else: - args.insert(1, pjoin(self.me_dir,'Cards','me5_configuration.txt')) + args.insert(1, pjoin(self.me_dir,'Cards','me5_configuration.txt')) def check_set(self, args): """ check the validity of the line""" @@ -1039,20 +1039,20 @@ def check_set(self, args): self.help_set() raise self.InvalidCmd('Possible options for set are %s' % \ self._set_options) - + if args[0] in ['stdout_level']: if args[1] not in ['DEBUG','INFO','WARNING','ERROR','CRITICAL'] \ and not args[1].isdigit(): raise self.InvalidCmd('output_level needs ' + \ - 'a valid level') - + 'a valid level') + if args[0] in ['timeout']: if not args[1].isdigit(): - raise self.InvalidCmd('timeout values should be a integer') - + raise self.InvalidCmd('timeout values should be a integer') + def check_open(self, args): """ check the validity of the line """ - + if len(args) != 1: self.help_open() raise self.InvalidCmd('OPEN command requires exactly one argument') @@ -1069,7 +1069,7 @@ def check_open(self, args): raise self.InvalidCmd('No MadEvent path defined. Unable to associate this name to a file') else: return True - + path = self.me_dir if os.path.isfile(os.path.join(path,args[0])): args[0] = os.path.join(path,args[0]) @@ -1078,7 +1078,7 @@ def check_open(self, args): elif os.path.isfile(os.path.join(path,'HTML',args[0])): args[0] = os.path.join(path,'HTML',args[0]) # special for card with _default define: copy the default and open it - elif '_card.dat' in args[0]: + elif '_card.dat' in args[0]: name = args[0].replace('_card.dat','_card_default.dat') if os.path.isfile(os.path.join(path,'Cards', name)): files.cp(os.path.join(path,'Cards', name), os.path.join(path,'Cards', args[0])) @@ -1086,13 +1086,13 @@ def check_open(self, args): else: raise self.InvalidCmd('No default path for this file') elif not os.path.isfile(args[0]): - raise self.InvalidCmd('No default path for this file') - + raise self.InvalidCmd('No default path for this file') + def check_initMadLoop(self, args): """ check initMadLoop command arguments are valid.""" - + opt = {'refresh': False, 'nPS': None, 'force': False} - + for arg in args: if arg in ['-r','--refresh']: opt['refresh'] = True @@ -1105,14 +1105,14 @@ def check_initMadLoop(self, args): except ValueError: raise InvalidCmd("The number of attempts specified "+ "'%s' is not a valid integer."%n_attempts) - + return opt - + def check_treatcards(self, args): """check that treatcards arguments are valid [param|run|all] [--output_dir=] [--param_card=] [--run_card=] """ - + opt = {'output_dir':pjoin(self.me_dir,'Source'), 'param_card':pjoin(self.me_dir,'Cards','param_card.dat'), 'run_card':pjoin(self.me_dir,'Cards','run_card.dat'), @@ -1129,14 +1129,14 @@ def check_treatcards(self, args): if os.path.isfile(value): card_name = self.detect_card_type(value) if card_name != key: - raise self.InvalidCmd('Format for input file detected as %s while expecting %s' + raise self.InvalidCmd('Format for input file detected as %s while expecting %s' % (card_name, key)) opt[key] = value elif os.path.isfile(pjoin(self.me_dir,value)): card_name = self.detect_card_type(pjoin(self.me_dir,value)) if card_name != key: - raise self.InvalidCmd('Format for input file detected as %s while expecting %s' - % (card_name, key)) + raise self.InvalidCmd('Format for input file detected as %s while expecting %s' + % (card_name, key)) opt[key] = value else: raise self.InvalidCmd('No such file: %s ' % value) @@ -1154,14 +1154,14 @@ def check_treatcards(self, args): else: self.help_treatcards() raise self.InvalidCmd('Unvalid argument %s' % arg) - - return mode, opt - - + + return mode, opt + + def check_survey(self, args, cmd='survey'): """check that the argument for survey are valid""" - - + + self.opts = dict([(key,value[1]) for (key,value) in \ self._survey_options.items()]) @@ -1183,41 +1183,41 @@ def check_survey(self, args, cmd='survey'): self.help_survey() raise self.InvalidCmd('Too many argument for %s command' % cmd) elif not args: - # No run name assigned -> assigned one automaticaly + # No run name assigned -> assigned one automaticaly self.set_run_name(self.find_available_run_name(self.me_dir)) else: self.set_run_name(args[0], None,'parton', True) args.pop(0) - + return True def check_generate_events(self, args): """check that the argument for generate_events are valid""" - + run = None if args and args[-1].startswith('--laststep='): run = args[-1].split('=')[-1] if run not in ['auto','parton', 'pythia', 'pgs', 'delphes']: self.help_generate_events() raise self.InvalidCmd('invalid %s argument'% args[-1]) - if run != 'parton' and not self.options['pythia-pgs_path']: - raise self.InvalidCmd('''pythia-pgs not install. Please install this package first. + if run != 'parton' and not self.options['pythia-pgs_path']: + raise self.InvalidCmd('''pythia-pgs not install. Please install this package first. To do so type: \'install pythia-pgs\' in the mg5 interface''') if run == 'delphes' and not self.options['delphes_path']: - raise self.InvalidCmd('''delphes not install. Please install this package first. + raise self.InvalidCmd('''delphes not install. Please install this package first. To do so type: \'install Delphes\' in the mg5 interface''') del args[-1] - + #if len(args) > 1: # self.help_generate_events() # raise self.InvalidCmd('Too many argument for generate_events command: %s' % cmd) - + return run def check_calculate_decay_widths(self, args): """check that the argument for calculate_decay_widths are valid""" - + if self.ninitial != 1: raise self.InvalidCmd('Can only calculate decay widths for decay processes A > B C ...') @@ -1232,7 +1232,7 @@ def check_calculate_decay_widths(self, args): if len(args) > 1: self.help_calculate_decay_widths() raise self.InvalidCmd('Too many argument for calculate_decay_widths command: %s' % cmd) - + return accuracy @@ -1241,25 +1241,25 @@ def check_multi_run(self, args): """check that the argument for survey are valid""" run = None - + if not len(args): self.help_multi_run() raise self.InvalidCmd("""multi_run command requires at least one argument for the number of times that it call generate_events command""") - + if args[-1].startswith('--laststep='): run = args[-1].split('=')[-1] if run not in ['parton', 'pythia', 'pgs', 'delphes']: self.help_multi_run() raise self.InvalidCmd('invalid %s argument'% args[-1]) - if run != 'parton' and not self.options['pythia-pgs_path']: - raise self.InvalidCmd('''pythia-pgs not install. Please install this package first. + if run != 'parton' and not self.options['pythia-pgs_path']: + raise self.InvalidCmd('''pythia-pgs not install. Please install this package first. To do so type: \'install pythia-pgs\' in the mg5 interface''') if run == 'delphes' and not self.options['delphes_path']: - raise self.InvalidCmd('''delphes not install. Please install this package first. + raise self.InvalidCmd('''delphes not install. Please install this package first. To do so type: \'install Delphes\' in the mg5 interface''') del args[-1] - + elif not args[0].isdigit(): self.help_multi_run() @@ -1267,7 +1267,7 @@ def check_multi_run(self, args): #pass nb run to an integer nb_run = args.pop(0) args.insert(0, int(nb_run)) - + return run @@ -1284,7 +1284,7 @@ def check_refine(self, args): self.help_refine() raise self.InvalidCmd('require_precision argument is require for refine cmd') - + if not self.run_name: if self.results.lastrun: self.set_run_name(self.results.lastrun) @@ -1296,17 +1296,17 @@ def check_refine(self, args): else: try: [float(arg) for arg in args] - except ValueError: - self.help_refine() + except ValueError: + self.help_refine() raise self.InvalidCmd('refine arguments are suppose to be number') - + return True - + def check_combine_events(self, arg): """ Check the argument for the combine events command """ - + tag = [a for a in arg if a.startswith('--tag=')] - if tag: + if tag: arg.remove(tag[0]) tag = tag[0][6:] elif not self.run_tag: @@ -1314,53 +1314,53 @@ def check_combine_events(self, arg): else: tag = self.run_tag self.run_tag = tag - + if len(arg) > 1: self.help_combine_events() raise self.InvalidCmd('Too many argument for combine_events command') - + if len(arg) == 1: self.set_run_name(arg[0], self.run_tag, 'parton', True) - + if not self.run_name: if not self.results.lastrun: raise self.InvalidCmd('No run_name currently define. Unable to run combine') else: self.set_run_name(self.results.lastrun) - + return True - + def check_pythia(self, args): """Check the argument for pythia command - syntax: pythia [NAME] + syntax: pythia [NAME] Note that other option are already removed at this point """ - + mode = None laststep = [arg for arg in args if arg.startswith('--laststep=')] if laststep and len(laststep)==1: mode = laststep[0].split('=')[-1] if mode not in ['auto', 'pythia', 'pgs', 'delphes']: self.help_pythia() - raise self.InvalidCmd('invalid %s argument'% args[-1]) + raise self.InvalidCmd('invalid %s argument'% args[-1]) elif laststep: raise self.InvalidCmd('only one laststep argument is allowed') - + if not self.options['pythia-pgs_path']: logger.info('Retry to read configuration file to find pythia-pgs path') self.set_configuration() - + if not self.options['pythia-pgs_path'] or not \ os.path.exists(pjoin(self.options['pythia-pgs_path'],'src')): error_msg = 'No valid pythia-pgs path set.\n' error_msg += 'Please use the set command to define the path and retry.\n' error_msg += 'You can also define it in the configuration file.\n' raise self.InvalidCmd(error_msg) - - - + + + tag = [a for a in args if a.startswith('--tag=')] - if tag: + if tag: args.remove(tag[0]) tag = tag[0][6:] @@ -1368,8 +1368,8 @@ def check_pythia(self, args): if self.results.lastrun: args.insert(0, self.results.lastrun) else: - raise self.InvalidCmd('No run name currently define. Please add this information.') - + raise self.InvalidCmd('No run name currently define. Please add this information.') + if len(args) >= 1: if args[0] != self.run_name and\ not os.path.exists(pjoin(self.me_dir,'Events',args[0], 'unweighted_events.lhe.gz')): @@ -1388,21 +1388,21 @@ def check_pythia(self, args): files.ln(input_file, os.path.dirname(output_file)) else: misc.gunzip(input_file, keep=True, stdout=output_file) - + args.append(mode) - + def check_pythia8(self, args): """Check the argument for pythia command - syntax: pythia8 [NAME] + syntax: pythia8 [NAME] Note that other option are already removed at this point - """ + """ mode = None laststep = [arg for arg in args if arg.startswith('--laststep=')] if laststep and len(laststep)==1: mode = laststep[0].split('=')[-1] if mode not in ['auto', 'pythia','pythia8','delphes']: self.help_pythia8() - raise self.InvalidCmd('invalid %s argument'% args[-1]) + raise self.InvalidCmd('invalid %s argument'% args[-1]) elif laststep: raise self.InvalidCmd('only one laststep argument is allowed') @@ -1410,7 +1410,7 @@ def check_pythia8(self, args): if not self.options['pythia8_path']: logger.info('Retry reading configuration file to find pythia8 path') self.set_configuration() - + if not self.options['pythia8_path'] or not \ os.path.exists(pjoin(self.options['pythia8_path'],'bin','pythia8-config')): error_msg = 'No valid pythia8 path set.\n' @@ -1421,7 +1421,7 @@ def check_pythia8(self, args): raise self.InvalidCmd(error_msg) tag = [a for a in args if a.startswith('--tag=')] - if tag: + if tag: args.remove(tag[0]) tag = tag[0][6:] @@ -1430,11 +1430,11 @@ def check_pythia8(self, args): args.insert(0, self.results.lastrun) else: raise self.InvalidCmd('No run name currently define. '+ - 'Please add this information.') - + 'Please add this information.') + if len(args) >= 1: if args[0] != self.run_name and\ - not os.path.exists(pjoin(self.me_dir,'Events',args[0], + not os.path.exists(pjoin(self.me_dir,'Events',args[0], 'unweighted_events.lhe.gz')): raise self.InvalidCmd('No events file corresponding to %s run. ' % args[0]) @@ -1451,9 +1451,9 @@ def check_pythia8(self, args): else: raise self.InvalidCmd('No event file corresponding to %s run. ' % self.run_name) - + args.append(mode) - + def check_remove(self, args): """Check that the remove command is valid""" @@ -1484,33 +1484,33 @@ def check_plot(self, args): madir = self.options['madanalysis_path'] td = self.options['td_path'] - + if not madir or not td: logger.info('Retry to read configuration file to find madanalysis/td') self.set_configuration() madir = self.options['madanalysis_path'] - td = self.options['td_path'] - + td = self.options['td_path'] + if not madir: error_msg = 'No valid MadAnalysis path set.\n' error_msg += 'Please use the set command to define the path and retry.\n' error_msg += 'You can also define it in the configuration file.\n' - raise self.InvalidCmd(error_msg) + raise self.InvalidCmd(error_msg) if not td: error_msg = 'No valid td path set.\n' error_msg += 'Please use the set command to define the path and retry.\n' error_msg += 'You can also define it in the configuration file.\n' - raise self.InvalidCmd(error_msg) - + raise self.InvalidCmd(error_msg) + if len(args) == 0: if not hasattr(self, 'run_name') or not self.run_name: self.help_plot() - raise self.InvalidCmd('No run name currently define. Please add this information.') + raise self.InvalidCmd('No run name currently define. Please add this information.') args.append('all') return - + if args[0] not in self._plot_mode: self.set_run_name(args[0], level='plot') del args[0] @@ -1518,45 +1518,45 @@ def check_plot(self, args): args.append('all') elif not self.run_name: self.help_plot() - raise self.InvalidCmd('No run name currently define. Please add this information.') - + raise self.InvalidCmd('No run name currently define. Please add this information.') + for arg in args: if arg not in self._plot_mode and arg != self.run_name: self.help_plot() - raise self.InvalidCmd('unknown options %s' % arg) - + raise self.InvalidCmd('unknown options %s' % arg) + def check_syscalc(self, args): """Check the argument for the syscalc command syscalc run_name modes""" scdir = self.options['syscalc_path'] - + if not scdir: logger.info('Retry to read configuration file to find SysCalc') self.set_configuration() scdir = self.options['syscalc_path'] - + if not scdir: error_msg = 'No valid SysCalc path set.\n' error_msg += 'Please use the set command to define the path and retry.\n' error_msg += 'You can also define it in the configuration file.\n' error_msg += 'Please note that you need to compile SysCalc first.' - raise self.InvalidCmd(error_msg) - + raise self.InvalidCmd(error_msg) + if len(args) == 0: if not hasattr(self, 'run_name') or not self.run_name: self.help_syscalc() - raise self.InvalidCmd('No run name currently defined. Please add this information.') + raise self.InvalidCmd('No run name currently defined. Please add this information.') args.append('all') return #deal options tag = [a for a in args if a.startswith('--tag=')] - if tag: + if tag: args.remove(tag[0]) tag = tag[0][6:] - + if args[0] not in self._syscalc_mode: self.set_run_name(args[0], tag=tag, level='syscalc') del args[0] @@ -1564,61 +1564,61 @@ def check_syscalc(self, args): args.append('all') elif not self.run_name: self.help_syscalc() - raise self.InvalidCmd('No run name currently defined. Please add this information.') + raise self.InvalidCmd('No run name currently defined. Please add this information.') elif tag and tag != self.run_tag: self.set_run_name(self.run_name, tag=tag, level='syscalc') - + for arg in args: if arg not in self._syscalc_mode and arg != self.run_name: self.help_syscalc() - raise self.InvalidCmd('unknown options %s' % arg) + raise self.InvalidCmd('unknown options %s' % arg) if self.run_card['use_syst'] not in self.true: raise self.InvalidCmd('Run %s does not include ' % self.run_name + \ 'systematics information needed for syscalc.') - - + + def check_pgs(self, arg, no_default=False): """Check the argument for pythia command - syntax is "pgs [NAME]" + syntax is "pgs [NAME]" Note that other option are already remove at this point """ - + # If not pythia-pgs path if not self.options['pythia-pgs_path']: logger.info('Retry to read configuration file to find pythia-pgs path') self.set_configuration() - + if not self.options['pythia-pgs_path'] or not \ os.path.exists(pjoin(self.options['pythia-pgs_path'],'src')): error_msg = 'No valid pythia-pgs path set.\n' error_msg += 'Please use the set command to define the path and retry.\n' error_msg += 'You can also define it in the configuration file.\n' - raise self.InvalidCmd(error_msg) - + raise self.InvalidCmd(error_msg) + tag = [a for a in arg if a.startswith('--tag=')] - if tag: + if tag: arg.remove(tag[0]) tag = tag[0][6:] - - + + if len(arg) == 0 and not self.run_name: if self.results.lastrun: arg.insert(0, self.results.lastrun) else: - raise self.InvalidCmd('No run name currently define. Please add this information.') - + raise self.InvalidCmd('No run name currently define. Please add this information.') + if len(arg) == 1 and self.run_name == arg[0]: arg.pop(0) - + if not len(arg) and \ not os.path.exists(pjoin(self.me_dir,'Events','pythia_events.hep')): if not no_default: self.help_pgs() raise self.InvalidCmd('''No file file pythia_events.hep currently available Please specify a valid run_name''') - - lock = None + + lock = None if len(arg) == 1: prev_tag = self.set_run_name(arg[0], tag, 'pgs') if not os.path.exists(pjoin(self.me_dir,'Events',self.run_name,'%s_pythia_events.hep.gz' % prev_tag)): @@ -1626,25 +1626,25 @@ def check_pgs(self, arg, no_default=False): else: input_file = pjoin(self.me_dir,'Events', self.run_name, '%s_pythia_events.hep.gz' % prev_tag) output_file = pjoin(self.me_dir, 'Events', 'pythia_events.hep') - lock = cluster.asyncrone_launch('gunzip',stdout=open(output_file,'w'), + lock = cluster.asyncrone_launch('gunzip',stdout=open(output_file,'w'), argument=['-c', input_file]) else: - if tag: + if tag: self.run_card['run_tag'] = tag self.set_run_name(self.run_name, tag, 'pgs') - - return lock + + return lock def check_display(self, args): """check the validity of line syntax is "display XXXXX" """ - + if len(args) < 1 or args[0] not in self._display_opts: self.help_display() raise self.InvalidCmd - + if args[0] == 'variable' and len(args) !=2: raise self.InvalidCmd('variable need a variable name') @@ -1654,39 +1654,39 @@ def check_display(self, args): def check_import(self, args): """check the validity of line""" - + if not args: self.help_import() raise self.InvalidCmd('wrong \"import\" format') - + if args[0] != 'command': args.insert(0,'command') - - + + if not len(args) == 2 or not os.path.exists(args[1]): raise self.InvalidCmd('PATH is mandatory for import command\n') - + #=============================================================================== # CompleteForCmd #=============================================================================== class CompleteForCmd(CheckValidForCmd): """ The Series of help routine for the MadGraphCmd""" - - + + def complete_banner_run(self, text, line, begidx, endidx, formatting=True): "Complete the banner run command" try: - - + + args = self.split_arg(line[0:begidx], error=False) - + if args[-1].endswith(os.path.sep): return self.path_completion(text, os.path.join('.',*[a for a in args \ - if a.endswith(os.path.sep)])) - - + if a.endswith(os.path.sep)])) + + if len(args) > 1: # only options are possible tags = misc.glob('%s_*_banner.txt' % args[1], pjoin(self.me_dir, 'Events' , args[1])) @@ -1697,9 +1697,9 @@ def complete_banner_run(self, text, line, begidx, endidx, formatting=True): else: return self.list_completion(text, tags) return self.list_completion(text, tags +['--name=','-f'], line) - + # First argument - possibilites = {} + possibilites = {} comp = self.path_completion(text, os.path.join('.',*[a for a in args \ if a.endswith(os.path.sep)])) @@ -1711,10 +1711,10 @@ def complete_banner_run(self, text, line, begidx, endidx, formatting=True): run_list = misc.glob(pjoin('*','*_banner.txt'), pjoin(self.me_dir, 'Events')) run_list = [n.rsplit('/',2)[1] for n in run_list] possibilites['RUN Name'] = self.list_completion(text, run_list) - + return self.deal_multiple_categories(possibilites, formatting) - - + + except Exception as error: print(error) @@ -1732,12 +1732,12 @@ def complete_history(self, text, line, begidx, endidx): if len(args) == 1: return self.path_completion(text) - - def complete_open(self, text, line, begidx, endidx): + + def complete_open(self, text, line, begidx, endidx): """ complete the open command """ args = self.split_arg(line[0:begidx]) - + # Directory continuation if os.path.sep in args[-1] + text: return self.path_completion(text, @@ -1751,10 +1751,10 @@ def complete_open(self, text, line, begidx, endidx): if os.path.isfile(os.path.join(path,'README')): possibility.append('README') if os.path.isdir(os.path.join(path,'Cards')): - possibility += [f for f in os.listdir(os.path.join(path,'Cards')) + possibility += [f for f in os.listdir(os.path.join(path,'Cards')) if f.endswith('.dat')] if os.path.isdir(os.path.join(path,'HTML')): - possibility += [f for f in os.listdir(os.path.join(path,'HTML')) + possibility += [f for f in os.listdir(os.path.join(path,'HTML')) if f.endswith('.html') and 'default' not in f] else: possibility.extend(['./','../']) @@ -1763,7 +1763,7 @@ def complete_open(self, text, line, begidx, endidx): if os.path.exists('MG5_debug'): possibility.append('MG5_debug') return self.list_completion(text, possibility) - + def complete_set(self, text, line, begidx, endidx): "Complete the set command" @@ -1784,27 +1784,27 @@ def complete_set(self, text, line, begidx, endidx): elif len(args) >2 and args[-1].endswith(os.path.sep): return self.path_completion(text, os.path.join('.',*[a for a in args if a.endswith(os.path.sep)]), - only_dirs = True) - + only_dirs = True) + def complete_survey(self, text, line, begidx, endidx): """ Complete the survey command """ - + if line.endswith('nb_core=') and not text: import multiprocessing max = multiprocessing.cpu_count() return [str(i) for i in range(2,max+1)] - + return self.list_completion(text, self._run_options, line) - + complete_refine = complete_survey complete_combine_events = complete_survey complite_store = complete_survey complete_generate_events = complete_survey complete_create_gridpack = complete_survey - + def complete_generate_events(self, text, line, begidx, endidx): """ Complete the generate events""" - + if line.endswith('nb_core=') and not text: import multiprocessing max = multiprocessing.cpu_count() @@ -1813,17 +1813,17 @@ def complete_generate_events(self, text, line, begidx, endidx): return ['parton','pythia','pgs','delphes'] elif '--laststep=' in line.split()[-1] and line and line[-1] != ' ': return self.list_completion(text,['parton','pythia','pgs','delphes'],line) - + opts = self._run_options + self._generate_options return self.list_completion(text, opts, line) def complete_initMadLoop(self, text, line, begidx, endidx): "Complete the initMadLoop command" - + numbers = [str(i) for i in range(10)] opts = ['-f','-r','--nPS='] - + args = self.split_arg(line[0:begidx], error=False) if len(line) >=6 and line[begidx-6:begidx]=='--nPS=': return self.list_completion(text, numbers, line) @@ -1840,18 +1840,18 @@ def complete_launch(self, *args, **opts): def complete_calculate_decay_widths(self, text, line, begidx, endidx): """ Complete the calculate_decay_widths command""" - + if line.endswith('nb_core=') and not text: import multiprocessing max = multiprocessing.cpu_count() return [str(i) for i in range(2,max+1)] - + opts = self._run_options + self._calculate_decay_options return self.list_completion(text, opts, line) - + def complete_display(self, text, line, begidx, endidx): - """ Complete the display command""" - + """ Complete the display command""" + args = self.split_arg(line[0:begidx], error=False) if len(args) >= 2 and args[1] =='results': start = line.find('results') @@ -1860,44 +1860,44 @@ def complete_display(self, text, line, begidx, endidx): def complete_multi_run(self, text, line, begidx, endidx): """complete multi run command""" - + args = self.split_arg(line[0:begidx], error=False) if len(args) == 1: data = [str(i) for i in range(0,20)] return self.list_completion(text, data, line) - + if line.endswith('run=') and not text: return ['parton','pythia','pgs','delphes'] elif '--laststep=' in line.split()[-1] and line and line[-1] != ' ': return self.list_completion(text,['parton','pythia','pgs','delphes'],line) - + opts = self._run_options + self._generate_options return self.list_completion(text, opts, line) - - - + + + if line.endswith('nb_core=') and not text: import multiprocessing max = multiprocessing.cpu_count() return [str(i) for i in range(2,max+1)] opts = self._run_options + self._generate_options return self.list_completion(text, opts, line) - + def complete_plot(self, text, line, begidx, endidx): """ Complete the plot command """ - + args = self.split_arg(line[0:begidx], error=False) if len(args) > 1: return self.list_completion(text, self._plot_mode) else: return self.list_completion(text, self._plot_mode + list(self.results.keys())) - + def complete_syscalc(self, text, line, begidx, endidx, formatting=True): """ Complete the syscalc command """ - + output = {} args = self.split_arg(line[0:begidx], error=False) - + if len(args) <=1: output['RUN_NAME'] = self.list_completion(list(self.results.keys())) output['MODE'] = self.list_completion(text, self._syscalc_mode) @@ -1907,12 +1907,12 @@ def complete_syscalc(self, text, line, begidx, endidx, formatting=True): if run in self.results: tags = ['--tag=%s' % tag['tag'] for tag in self.results[run]] output['options'] += tags - + return self.deal_multiple_categories(output, formatting) - + def complete_remove(self, text, line, begidx, endidx): """Complete the remove command """ - + args = self.split_arg(line[0:begidx], error=False) if len(args) > 1 and (text.startswith('--t')): run = args[1] @@ -1932,8 +1932,8 @@ def complete_remove(self, text, line, begidx, endidx): data = misc.glob(pjoin('*','*_banner.txt'), pjoin(self.me_dir, 'Events')) data = [n.rsplit('/',2)[1] for n in data] return self.list_completion(text, ['all'] + data) - - + + def complete_shower(self,text, line, begidx, endidx): "Complete the shower command" args = self.split_arg(line[0:begidx], error=False) @@ -1941,7 +1941,7 @@ def complete_shower(self,text, line, begidx, endidx): return self.list_completion(text, self._interfaced_showers) elif len(args)>1 and args[1] in self._interfaced_showers: return getattr(self, 'complete_%s' % text)\ - (text, args[1],line.replace(args[0]+' ',''), + (text, args[1],line.replace(args[0]+' ',''), begidx-len(args[0])-1, endidx-len(args[0])-1) def complete_pythia8(self,text, line, begidx, endidx): @@ -1955,11 +1955,11 @@ def complete_pythia8(self,text, line, begidx, endidx): if not self.run_name: return tmp1 else: - tmp2 = self.list_completion(text, self._run_options + ['-f', + tmp2 = self.list_completion(text, self._run_options + ['-f', '--no_default', '--tag='], line) return tmp1 + tmp2 elif line[-1] != '=': - return self.list_completion(text, self._run_options + ['-f', + return self.list_completion(text, self._run_options + ['-f', '--no_default','--tag='], line) def complete_madanalysis5_parton(self,text, line, begidx, endidx): @@ -1978,19 +1978,19 @@ def complete_madanalysis5_parton(self,text, line, begidx, endidx): else: tmp2 = self.list_completion(text, ['-f', '--MA5_stdout_lvl=','--no_default','--tag='], line) - return tmp1 + tmp2 + return tmp1 + tmp2 elif '--MA5_stdout_lvl=' in line and not any(arg.startswith( '--MA5_stdout_lvl=') for arg in args): - return self.list_completion(text, - ['--MA5_stdout_lvl=%s'%opt for opt in + return self.list_completion(text, + ['--MA5_stdout_lvl=%s'%opt for opt in ['logging.INFO','logging.DEBUG','logging.WARNING', 'logging.CRITICAL','90']], line) else: - return self.list_completion(text, ['-f', + return self.list_completion(text, ['-f', '--MA5_stdout_lvl=','--no_default','--tag='], line) def complete_pythia(self,text, line, begidx, endidx): - "Complete the pythia command" + "Complete the pythia command" args = self.split_arg(line[0:begidx], error=False) if len(args) == 1: @@ -2001,16 +2001,16 @@ def complete_pythia(self,text, line, begidx, endidx): if not self.run_name: return tmp1 else: - tmp2 = self.list_completion(text, self._run_options + ['-f', + tmp2 = self.list_completion(text, self._run_options + ['-f', '--no_default', '--tag='], line) return tmp1 + tmp2 elif line[-1] != '=': - return self.list_completion(text, self._run_options + ['-f', + return self.list_completion(text, self._run_options + ['-f', '--no_default','--tag='], line) def complete_pgs(self,text, line, begidx, endidx): "Complete the pythia command" - args = self.split_arg(line[0:begidx], error=False) + args = self.split_arg(line[0:begidx], error=False) if len(args) == 1: #return valid run_name data = misc.glob(pjoin('*', '*_pythia_events.hep.gz'), pjoin(self.me_dir, 'Events')) @@ -2019,23 +2019,23 @@ def complete_pgs(self,text, line, begidx, endidx): if not self.run_name: return tmp1 else: - tmp2 = self.list_completion(text, self._run_options + ['-f', + tmp2 = self.list_completion(text, self._run_options + ['-f', '--tag=' ,'--no_default'], line) - return tmp1 + tmp2 + return tmp1 + tmp2 else: - return self.list_completion(text, self._run_options + ['-f', + return self.list_completion(text, self._run_options + ['-f', '--tag=','--no_default'], line) - complete_delphes = complete_pgs - complete_rivet = complete_pgs + complete_delphes = complete_pgs + complete_rivet = complete_pgs #=============================================================================== # MadEventCmd #=============================================================================== class MadEventCmd(CompleteForCmd, CmdExtended, HelpToCmd, common_run.CommonRunCmd): - """The command line processor of Mad Graph""" - + """The command line processor of Mad Graph""" + LO = True # Truth values @@ -2063,7 +2063,7 @@ class MadEventCmd(CompleteForCmd, CmdExtended, HelpToCmd, common_run.CommonRunCm cluster_mode = 0 queue = 'madgraph' nb_core = None - + next_possibility = { 'start': ['generate_events [OPTIONS]', 'multi_run [OPTIONS]', 'calculate_decay_widths [OPTIONS]', @@ -2080,9 +2080,9 @@ class MadEventCmd(CompleteForCmd, CmdExtended, HelpToCmd, common_run.CommonRunCm 'pgs': ['generate_events [OPTIONS]', 'multi_run [OPTIONS]'], 'delphes' : ['generate_events [OPTIONS]', 'multi_run [OPTIONS]'] } - + asking_for_run = AskRun - + ############################################################################ def __init__(self, me_dir = None, options={}, *completekey, **stdin): """ add information to the cmd """ @@ -2095,16 +2095,16 @@ def __init__(self, me_dir = None, options={}, *completekey, **stdin): if self.web: os.system('touch %s' % pjoin(self.me_dir,'Online')) - self.load_results_db() + self.load_results_db() self.results.def_web_mode(self.web) self.Gdirs = None - + self.prompt = "%s>"%os.path.basename(pjoin(self.me_dir)) self.configured = 0 # time for reading the card self._options = {} # for compatibility with extended_cmd - - + + def pass_in_web_mode(self): """configure web data""" self.web = True @@ -2113,22 +2113,22 @@ def pass_in_web_mode(self): if os.environ['MADGRAPH_BASE']: self.options['mg5_path'] = pjoin(os.environ['MADGRAPH_BASE'],'MG5') - ############################################################################ + ############################################################################ def check_output_type(self, path): """ Check that the output path is a valid madevent directory """ - + bin_path = os.path.join(path,'bin') if os.path.isfile(os.path.join(bin_path,'generate_events')): return True - else: + else: return False ############################################################################ def set_configuration(self, amcatnlo=False, final=True, **opt): - """assign all configuration variable from file + """assign all configuration variable from file loop over the different config file if config_file not define """ - - super(MadEventCmd,self).set_configuration(amcatnlo=amcatnlo, + + super(MadEventCmd,self).set_configuration(amcatnlo=amcatnlo, final=final, **opt) if not final: @@ -2171,24 +2171,24 @@ def set_configuration(self, amcatnlo=False, final=True, **opt): if not os.path.exists(pjoin(path, 'sys_calc')): logger.info("No valid SysCalc path found") continue - # No else since the next line reinitialize the option to the + # No else since the next line reinitialize the option to the #previous value anyway self.options[key] = os.path.realpath(path) continue else: self.options[key] = None - - + + return self.options ############################################################################ - def do_banner_run(self, line): + def do_banner_run(self, line): """Make a run from the banner file""" - + args = self.split_arg(line) #check the validity of the arguments - self.check_banner_run(args) - + self.check_banner_run(args) + # Remove previous cards for name in ['delphes_trigger.dat', 'delphes_card.dat', 'pgs_card.dat', 'pythia_card.dat', 'madspin_card.dat', @@ -2197,20 +2197,20 @@ def do_banner_run(self, line): os.remove(pjoin(self.me_dir, 'Cards', name)) except Exception: pass - + banner_mod.split_banner(args[0], self.me_dir, proc_card=False) - + # Check if we want to modify the run if not self.force: ans = self.ask('Do you want to modify the Cards?', 'n', ['y','n']) if ans == 'n': self.force = True - + # Call Generate events self.exec_cmd('generate_events %s %s' % (self.run_name, self.force and '-f' or '')) - - - + + + ############################################################################ def do_display(self, line, output=sys.stdout): """Display current internal status""" @@ -2223,7 +2223,7 @@ def do_display(self, line, output=sys.stdout): #return valid run_name data = misc.glob(pjoin('*','*_banner.txt'), pjoin(self.me_dir, 'Events')) data = [n.rsplit('/',2)[1:] for n in data] - + if data: out = {} for name, tag in data: @@ -2235,11 +2235,11 @@ def do_display(self, line, output=sys.stdout): print('the runs available are:') for run_name, tags in out.items(): print(' run: %s' % run_name) - print(' tags: ', end=' ') + print(' tags: ', end=' ') print(', '.join(tags)) else: print('No run detected.') - + elif args[0] == 'options': outstr = " Run Options \n" outstr += " ----------- \n" @@ -2260,8 +2260,8 @@ def do_display(self, line, output=sys.stdout): if value == default: outstr += " %25s \t:\t%s\n" % (key,value) else: - outstr += " %25s \t:\t%s (user set)\n" % (key,value) - outstr += "\n" + outstr += " %25s \t:\t%s (user set)\n" % (key,value) + outstr += "\n" outstr += " Configuration Options \n" outstr += " --------------------- \n" for key, default in self.options_configuration.items(): @@ -2275,15 +2275,15 @@ def do_display(self, line, output=sys.stdout): self.do_print_results(' '.join(args[1:])) else: super(MadEventCmd, self).do_display(line, output) - + def do_save(self, line, check=True, to_keep={}): - """Not in help: Save information to file""" + """Not in help: Save information to file""" args = self.split_arg(line) # Check argument validity if check: self.check_save(args) - + if args[0] == 'options': # First look at options which should be put in MG5DIR/input to_define = {} @@ -2295,7 +2295,7 @@ def do_save(self, line, check=True, to_keep={}): for key, default in self.options_madevent.items(): if self.options[key] != self.options_madevent[key]: to_define[key] = self.options[key] - + if '--all' in args: for key, default in self.options_madgraph.items(): if self.options[key] != self.options_madgraph[key]: @@ -2312,12 +2312,12 @@ def do_save(self, line, check=True, to_keep={}): filepath = pjoin(self.me_dir, 'Cards', 'me5_configuration.txt') basefile = pjoin(self.me_dir, 'Cards', 'me5_configuration.txt') basedir = self.me_dir - + if to_keep: to_define = to_keep self.write_configuration(filepath, basefile, basedir, to_define) - - + + def do_edit_cards(self, line): @@ -2326,80 +2326,80 @@ def do_edit_cards(self, line): # Check argument's validity mode = self.check_generate_events(args) self.ask_run_configuration(mode) - + return ############################################################################ - + ############################################################################ def do_restart_gridpack(self, line): """ syntax restart_gridpack --precision=1.0 --restart_zero collect the result of the current run and relaunch each channel - not completed or optionally a completed one with a precision worse than + not completed or optionally a completed one with a precision worse than a threshold (and/or the zero result channel)""" - - + + args = self.split_arg(line) # Check argument's validity self.check_survey(args) - + # initialize / remove lhapdf mode #self.run_card = banner_mod.RunCard(pjoin(self.me_dir, 'Cards', 'run_card.dat')) #self.configure_directory() - + gensym = gen_ximprove.gensym(self) - + min_precision = 1.0 resubmit_zero=False if '--precision=' in line: s = line.index('--precision=') + len('--precision=') arg=line[s:].split(1)[0] min_precision = float(arg) - + if '--restart_zero' in line: resubmit_zero = True - - + + gensym.resubmit(min_precision, resubmit_zero) self.monitor(run_type='All jobs submitted for gridpack', html=True) #will be done during the refine (more precisely in gen_ximprove) cross, error = sum_html.make_all_html_results(self) self.results.add_detail('cross', cross) - self.results.add_detail('error', error) + self.results.add_detail('error', error) self.exec_cmd("print_results %s" % self.run_name, - errorhandling=False, printcmd=False, precmd=False, postcmd=False) - + errorhandling=False, printcmd=False, precmd=False, postcmd=False) + self.results.add_detail('run_statistics', dict(gensym.run_statistics)) - + #self.exec_cmd('combine_events', postcmd=False) #self.exec_cmd('store_events', postcmd=False) self.exec_cmd('decay_events -from_cards', postcmd=False) self.exec_cmd('create_gridpack', postcmd=False) - - - ############################################################################ + + + ############################################################################ ############################################################################ def do_generate_events(self, line): """Main Commands: launch the full chain """ - + self.banner = None self.Gdirs = None - + args = self.split_arg(line) # Check argument's validity mode = self.check_generate_events(args) switch_mode = self.ask_run_configuration(mode, args) if not args: - # No run name assigned -> assigned one automaticaly + # No run name assigned -> assigned one automaticaly self.set_run_name(self.find_available_run_name(self.me_dir), None, 'parton') else: self.set_run_name(args[0], None, 'parton', True) args.pop(0) - + self.run_generate_events(switch_mode, args) self.postprocessing() @@ -2420,8 +2420,8 @@ def postprocessing(self): def rivet_postprocessing(self, rivet_config, postprocess_RIVET, postprocess_CONTUR): - # Check number of Rivet jobs to run - run_dirs = [pjoin(self.me_dir, 'Events',run_name) + # Check number of Rivet jobs to run + run_dirs = [pjoin(self.me_dir, 'Events',run_name) for run_name in self.postprocessing_dirs] nb_rivet = len(run_dirs) @@ -2550,10 +2550,10 @@ def wait_monitoring(Idle, Running, Done): wrapper = open(pjoin(self.me_dir, "Analysis", "contur", "run_contur.sh"), "w") wrapper.write(set_env) - + wrapper.write('{0}\n'.format(contur_cmd)) wrapper.close() - + misc.call(["run_contur.sh"], cwd=(pjoin(self.me_dir, "Analysis", "contur"))) logger.info("Contur outputs are stored in {0}".format(pjoin(self.me_dir, "Analysis", "contur","conturPlot"))) @@ -2572,7 +2572,7 @@ def run_generate_events(self, switch_mode, args): self.do_set('run_mode 2') self.do_set('nb_core 1') - if self.run_card['gridpack'] in self.true: + if self.run_card['gridpack'] in self.true: # Running gridpack warmup gridpack_opts=[('accuracy', 0.01), ('points', 2000), @@ -2593,7 +2593,7 @@ def run_generate_events(self, switch_mode, args): # Regular run mode logger.info('Generating %s events with run name %s' % (self.run_card['nevents'], self.run_name)) - + self.exec_cmd('survey %s %s' % (self.run_name,' '.join(args)), postcmd=False) nb_event = self.run_card['nevents'] @@ -2601,7 +2601,7 @@ def run_generate_events(self, switch_mode, args): self.exec_cmd('refine %s' % nb_event, postcmd=False) if not float(self.results.current['cross']): # Zero cross-section. Try to guess why - text = '''Survey return zero cross section. + text = '''Survey return zero cross section. Typical reasons are the following: 1) A massive s-channel particle has a width set to zero. 2) The pdf are zero for at least one of the initial state particles @@ -2613,17 +2613,17 @@ def run_generate_events(self, switch_mode, args): raise ZeroResult('See https://cp3.irmp.ucl.ac.be/projects/madgraph/wiki/FAQ-General-14') else: bypass_run = True - + #we can bypass the following if scan and first result is zero if not bypass_run: self.exec_cmd('refine %s --treshold=%s' % (nb_event,self.run_card['second_refine_treshold']) , postcmd=False) - + self.exec_cmd('combine_events', postcmd=False,printcmd=False) self.print_results_in_shell(self.results.current) if self.run_card['use_syst']: - if self.run_card['systematics_program'] == 'auto': + if self.run_card['systematics_program'] == 'auto': scdir = self.options['syscalc_path'] if not scdir or not os.path.exists(scdir): to_use = 'systematics' @@ -2634,26 +2634,26 @@ def run_generate_events(self, switch_mode, args): else: logger.critical('Unvalid options for systematics_program: bypass computation of systematics variations.') to_use = 'none' - + if to_use == 'systematics': if self.run_card['systematics_arguments'] != ['']: self.exec_cmd('systematics %s %s ' % (self.run_name, - ' '.join(self.run_card['systematics_arguments'])), + ' '.join(self.run_card['systematics_arguments'])), postcmd=False, printcmd=False) else: self.exec_cmd('systematics %s --from_card' % self.run_name, - postcmd=False,printcmd=False) + postcmd=False,printcmd=False) elif to_use == 'syscalc': self.run_syscalc('parton') - - - self.create_plot('parton') - self.exec_cmd('store_events', postcmd=False) + + + self.create_plot('parton') + self.exec_cmd('store_events', postcmd=False) if self.run_card['boost_event'].strip() and self.run_card['boost_event'] != 'False': self.boost_events() - - - self.exec_cmd('reweight -from_cards', postcmd=False) + + + self.exec_cmd('reweight -from_cards', postcmd=False) self.exec_cmd('decay_events -from_cards', postcmd=False) if self.run_card['time_of_flight']>=0: self.exec_cmd("add_time_of_flight --threshold=%s" % self.run_card['time_of_flight'] ,postcmd=False) @@ -2664,43 +2664,43 @@ def run_generate_events(self, switch_mode, args): self.create_root_file(input , output) self.exec_cmd('madanalysis5_parton --no_default', postcmd=False, printcmd=False) - # shower launches pgs/delphes if needed + # shower launches pgs/delphes if needed self.exec_cmd('shower --no_default', postcmd=False, printcmd=False) self.exec_cmd('madanalysis5_hadron --no_default', postcmd=False, printcmd=False) self.exec_cmd('rivet --no_default', postcmd=False, printcmd=False) self.store_result() - - if self.allow_notification_center: - misc.system_notify('Run %s finished' % os.path.basename(self.me_dir), - '%s: %s +- %s ' % (self.results.current['run_name'], + + if self.allow_notification_center: + misc.system_notify('Run %s finished' % os.path.basename(self.me_dir), + '%s: %s +- %s ' % (self.results.current['run_name'], self.results.current['cross'], self.results.current['error'])) - + def boost_events(self): - + if not self.run_card['boost_event']: return - + if self.run_card['boost_event'].startswith('lambda'): if not isinstance(self, cmd.CmdShell): raise Exception("boost not allowed online") filter = eval(self.run_card['boost_event']) else: raise Exception - + path = [pjoin(self.me_dir, 'Events', self.run_name, 'unweighted_events.lhe.gz'), pjoin(self.me_dir, 'Events', self.run_name, 'unweighted_events.lhe'), pjoin(self.me_dir, 'Events', self.run_name, 'events.lhe.gz'), pjoin(self.me_dir, 'Events', self.run_name, 'events.lhe')] - + for p in path: if os.path.exists(p): event_path = p break else: raise Exception("fail to find event file for the boost") - - + + lhe = lhe_parser.EventFile(event_path) with misc.TMP_directory() as tmp_dir: output = lhe_parser.EventFile(pjoin(tmp_dir, os.path.basename(event_path)), 'w') @@ -2711,28 +2711,28 @@ def boost_events(self): event.boost(filter) #write this modify event output.write(str(event)) - output.write('\n') + output.write('\n') lhe.close() - files.mv(pjoin(tmp_dir, os.path.basename(event_path)), event_path) - - - - - + files.mv(pjoin(tmp_dir, os.path.basename(event_path)), event_path) + + + + + def do_initMadLoop(self,line): - """Compile and run MadLoop for a certain number of PS point so as to + """Compile and run MadLoop for a certain number of PS point so as to initialize MadLoop (setup the zero helicity and loop filter.)""" - + args = line.split() # Check argument's validity options = self.check_initMadLoop(args) - + if not options['force']: self.ask_edit_cards(['MadLoopParams.dat'], mode='fixed', plot=False) self.exec_cmd('treatcards loop --no_MadLoopInit') if options['refresh']: - for filter in misc.glob('*Filter*', + for filter in misc.glob('*Filter*', pjoin(self.me_dir,'SubProcesses','MadLoop5_resources')): logger.debug("Resetting filter '%s'."%os.path.basename(filter)) os.remove(filter) @@ -2753,14 +2753,14 @@ def do_initMadLoop(self,line): def do_launch(self, line, *args, **opt): """Main Commands: exec generate_events for 2>N and calculate_width for 1>N""" - + if self.ninitial == 1: logger.info("Note that since 2.3. The launch for 1>N pass in event generation\n"+ " To have the previous behavior use the calculate_decay_widths function") # self.do_calculate_decay_widths(line, *args, **opt) #else: self.do_generate_events(line, *args, **opt) - + def print_results_in_shell(self, data): """Have a nice results prints in the shell, data should be of type: gen_crossxhtml.OneTagResults""" @@ -2770,7 +2770,7 @@ def print_results_in_shell(self, data): if data['run_statistics']: globalstat = sum_html.RunStatistics() - + logger.info(" " ) logger.debug(" === Run statistics summary ===") for key, value in data['run_statistics'].items(): @@ -2786,13 +2786,13 @@ def print_results_in_shell(self, data): logger.warning(globalstat.get_warning_text()) logger.info(" ") - + logger.info(" === Results Summary for run: %s tag: %s ===\n" % (data['run_name'],data['tag'])) - + total_time = int(sum(_['cumulative_timing'] for _ in data['run_statistics'].values())) if total_time > 0: logger.info(" Cumulative sequential time for this run: %s"%misc.format_time(total_time)) - + if self.ninitial == 1: logger.info(" Width : %.4g +- %.4g GeV" % (data['cross'], data['error'])) else: @@ -2810,18 +2810,18 @@ def print_results_in_shell(self, data): if len(split)!=3: continue scale, cross, error = split - cross_sections[float(scale)] = (float(cross), float(error)) + cross_sections[float(scale)] = (float(cross), float(error)) if len(cross_sections)>0: logger.info(' Pythia8 merged cross-sections are:') for scale in sorted(cross_sections.keys()): logger.info(' > Merging scale = %-6.4g : %-11.5g +/- %-7.2g [pb]'%\ (scale,cross_sections[scale][0],cross_sections[scale][1])) - + else: if self.ninitial == 1: logger.info(" Matched width : %.4g +- %.4g GeV" % (data['cross_pythia'], data['error_pythia'])) else: - logger.info(" Matched cross-section : %.4g +- %.4g pb" % (data['cross_pythia'], data['error_pythia'])) + logger.info(" Matched cross-section : %.4g +- %.4g pb" % (data['cross_pythia'], data['error_pythia'])) logger.info(" Nb of events after matching/merging : %d" % int(data['nb_event_pythia'])) if self.run_card['use_syst'] in self.true and \ (int(self.run_card['ickkw'])==1 or self.run_card['ktdurham']>0.0 @@ -2838,9 +2838,9 @@ def print_results_in_file(self, data, path, mode='w', format='full'): data should be of type: gen_crossxhtml.OneTagResults""" if not data: return - + fsock = open(path, mode) - + if data['run_statistics']: logger.debug(" === Run statistics summary ===") for key, value in data['run_statistics'].items(): @@ -2851,7 +2851,7 @@ def print_results_in_file(self, data, path, mode='w', format='full'): if format == "full": fsock.write(" === Results Summary for run: %s tag: %s process: %s ===\n" % \ (data['run_name'],data['tag'], os.path.basename(self.me_dir))) - + if self.ninitial == 1: fsock.write(" Width : %.4g +- %.4g GeV\n" % (data['cross'], data['error'])) else: @@ -2861,20 +2861,20 @@ def print_results_in_file(self, data, path, mode='w', format='full'): if self.ninitial == 1: fsock.write(" Matched Width : %.4g +- %.4g GeV\n" % (data['cross_pythia'], data['error_pythia'])) else: - fsock.write(" Matched Cross-section : %.4g +- %.4g pb\n" % (data['cross_pythia'], data['error_pythia'])) + fsock.write(" Matched Cross-section : %.4g +- %.4g pb\n" % (data['cross_pythia'], data['error_pythia'])) fsock.write(" Nb of events after Matching : %s\n" % data['nb_event_pythia']) fsock.write(" \n" ) elif format == "short": if mode == "w": fsock.write("# run_name tag cross error Nb_event cross_after_matching nb_event_after matching\n") - + if data['cross_pythia'] and data['nb_event_pythia']: text = "%(run_name)s %(tag)s %(cross)s %(error)s %(nb_event)s %(cross_pythia)s %(nb_event_pythia)s\n" else: text = "%(run_name)s %(tag)s %(cross)s %(error)s %(nb_event)s\n" fsock.write(text % data) - - ############################################################################ + + ############################################################################ def do_calculate_decay_widths(self, line): """Main Commands: launch decay width calculation and automatic inclusion of calculated widths and BRs in the param_card.""" @@ -2887,21 +2887,21 @@ def do_calculate_decay_widths(self, line): self.Gdirs = None if not args: - # No run name assigned -> assigned one automaticaly + # No run name assigned -> assigned one automaticaly self.set_run_name(self.find_available_run_name(self.me_dir)) else: self.set_run_name(args[0], reload_card=True) args.pop(0) self.configure_directory() - + # Running gridpack warmup opts=[('accuracy', accuracy), # default 0.01 ('points', 1000), ('iterations',9)] logger.info('Calculating decay widths with run name %s' % self.run_name) - + self.exec_cmd('survey %s %s' % \ (self.run_name, " ".join(['--' + opt + '=' + str(val) for (opt,val) \ @@ -2910,26 +2910,26 @@ def do_calculate_decay_widths(self, line): self.refine_mode = "old" # specify how to combine event self.exec_cmd('combine_events', postcmd=False) self.exec_cmd('store_events', postcmd=False) - + self.collect_decay_widths() self.print_results_in_shell(self.results.current) - self.update_status('calculate_decay_widths done', - level='parton', makehtml=False) + self.update_status('calculate_decay_widths done', + level='parton', makehtml=False) + - ############################################################################ def collect_decay_widths(self): - """ Collect the decay widths and calculate BRs for all particles, and put - in param_card form. + """ Collect the decay widths and calculate BRs for all particles, and put + in param_card form. """ - + particle_dict = {} # store the results run_name = self.run_name # Looping over the Subprocesses for P_path in SubProcesses.get_subP(self.me_dir): ids = SubProcesses.get_subP_ids(P_path) - # due to grouping we need to compute the ratio factor for the + # due to grouping we need to compute the ratio factor for the # ungroup resutls (that we need here). Note that initial particles # grouping are not at the same stage as final particle grouping nb_output = len(ids) / (len(set([p[0] for p in ids]))) @@ -2940,30 +2940,30 @@ def collect_decay_widths(self): particle_dict[particles[0]].append([particles[1:], result/nb_output]) except KeyError: particle_dict[particles[0]] = [[particles[1:], result/nb_output]] - + self.update_width_in_param_card(particle_dict, initial = pjoin(self.me_dir, 'Cards', 'param_card.dat'), output=pjoin(self.me_dir, 'Events', run_name, "param_card.dat")) - + @staticmethod def update_width_in_param_card(decay_info, initial=None, output=None): # Open the param_card.dat and insert the calculated decays and BRs - + if not output: output = initial - + param_card_file = open(initial) param_card = param_card_file.read().split('\n') param_card_file.close() decay_lines = [] line_number = 0 - # Read and remove all decays from the param_card + # Read and remove all decays from the param_card while line_number < len(param_card): line = param_card[line_number] if line.lower().startswith('decay'): - # Read decay if particle in decay_info - # DECAY 6 1.455100e+00 + # Read decay if particle in decay_info + # DECAY 6 1.455100e+00 line = param_card.pop(line_number) line = line.split() particle = 0 @@ -2996,7 +2996,7 @@ def update_width_in_param_card(decay_info, initial=None, output=None): break line=param_card[line_number] if particle and particle not in decay_info: - # No decays given, only total width + # No decays given, only total width decay_info[particle] = [[[], width]] else: # Not decay line_number += 1 @@ -3004,7 +3004,7 @@ def update_width_in_param_card(decay_info, initial=None, output=None): while not param_card[-1] or param_card[-1].startswith('#'): param_card.pop(-1) - # Append calculated and read decays to the param_card + # Append calculated and read decays to the param_card param_card.append("#\n#*************************") param_card.append("# Decay widths *") param_card.append("#*************************") @@ -3018,7 +3018,7 @@ def update_width_in_param_card(decay_info, initial=None, output=None): param_card.append("# BR NDA ID1 ID2 ...") brs = [[(val[1]/width).real, val[0]] for val in decay_info[key] if val[1]] for val in sorted(brs, reverse=True): - param_card.append(" %e %i %s # %s" % + param_card.append(" %e %i %s # %s" % (val[0].real, len(val[1]), " ".join([str(v) for v in val[1]]), val[0] * width @@ -3031,7 +3031,7 @@ def update_width_in_param_card(decay_info, initial=None, output=None): ############################################################################ def do_multi_run(self, line): - + args = self.split_arg(line) # Check argument's validity mode = self.check_multi_run(args) @@ -3047,7 +3047,7 @@ def do_multi_run(self, line): self.check_param_card(path, run=False) #store it locally to avoid relaunch param_card_iterator, self.param_card_iterator = self.param_card_iterator, [] - + crossoversig = 0 inv_sq_err = 0 nb_event = 0 @@ -3055,8 +3055,8 @@ def do_multi_run(self, line): self.nb_refine = 0 self.exec_cmd('generate_events %s_%s -f' % (main_name, i), postcmd=False) # Update collected value - nb_event += int(self.results[self.run_name][-1]['nb_event']) - self.results.add_detail('nb_event', nb_event , run=main_name) + nb_event += int(self.results[self.run_name][-1]['nb_event']) + self.results.add_detail('nb_event', nb_event , run=main_name) cross = self.results[self.run_name][-1]['cross'] error = self.results[self.run_name][-1]['error'] + 1e-99 crossoversig+=cross/error**2 @@ -3070,7 +3070,7 @@ def do_multi_run(self, line): os.mkdir(pjoin(self.me_dir,'Events', self.run_name)) except Exception: pass - os.system('%(bin)s/merge.pl %(event)s/%(name)s_*/unweighted_events.lhe.gz %(event)s/%(name)s/unweighted_events.lhe.gz %(event)s/%(name)s_banner.txt' + os.system('%(bin)s/merge.pl %(event)s/%(name)s_*/unweighted_events.lhe.gz %(event)s/%(name)s/unweighted_events.lhe.gz %(event)s/%(name)s_banner.txt' % {'bin': self.dirbin, 'event': pjoin(self.me_dir,'Events'), 'name': self.run_name}) @@ -3084,19 +3084,19 @@ def do_multi_run(self, line): self.create_root_file('%s/unweighted_events.lhe' % self.run_name, '%s/unweighted_events.root' % self.run_name) - - path = pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe") + + path = pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe") self.create_plot('parton', path, pjoin(self.me_dir, 'HTML',self.run_name, 'plots_parton.html') ) - - if not os.path.exists('%s.gz' % path): + + if not os.path.exists('%s.gz' % path): misc.gzip(path) self.update_status('', level='parton') - self.print_results_in_shell(self.results.current) - + self.print_results_in_shell(self.results.current) + cpath = pjoin(self.me_dir,'Cards','param_card.dat') if param_card_iterator: @@ -3112,21 +3112,21 @@ def do_multi_run(self, line): path = pjoin(self.me_dir, 'Events','scan_%s.txt' % scan_name) logger.info("write all cross-section results in %s" % path, '$MG:BOLD') param_card_iterator.write_summary(path) - - ############################################################################ + + ############################################################################ def do_treatcards(self, line, mode=None, opt=None): """Advanced commands: create .inc files from param_card.dat/run_card.dat""" if not mode and not opt: args = self.split_arg(line) mode, opt = self.check_treatcards(args) - + # To decide whether to refresh MadLoop's helicity filters, it is necessary # to check if the model parameters where modified or not, before doing - # anything else. + # anything else. need_MadLoopFilterUpdate = False - # Just to record what triggered the reinitialization of MadLoop for a + # Just to record what triggered the reinitialization of MadLoop for a # nice debug message. type_of_change = '' if not opt['forbid_MadLoopInit'] and self.proc_characteristics['loop_induced'] \ @@ -3137,10 +3137,10 @@ def do_treatcards(self, line, mode=None, opt=None): (os.path.getmtime(paramDat)-os.path.getmtime(paramInc)) > 0.0: need_MadLoopFilterUpdate = True type_of_change = 'model' - + ML_in = pjoin(self.me_dir, 'Cards', 'MadLoopParams.dat') ML_out = pjoin(self.me_dir,"SubProcesses", - "MadLoop5_resources", "MadLoopParams.dat") + "MadLoop5_resources", "MadLoopParams.dat") if (not os.path.isfile(ML_in)) or (not os.path.isfile(ML_out)) or \ (os.path.getmtime(ML_in)-os.path.getmtime(ML_out)) > 0.0: need_MadLoopFilterUpdate = True @@ -3148,7 +3148,7 @@ def do_treatcards(self, line, mode=None, opt=None): #check if no 'Auto' are present in the file self.check_param_card(pjoin(self.me_dir, 'Cards','param_card.dat')) - + if mode in ['param', 'all']: model = self.find_model_name() tmp_model = os.path.basename(model) @@ -3160,9 +3160,9 @@ def do_treatcards(self, line, mode=None, opt=None): check_param_card.check_valid_param_card(mg5_param) opt['param_card'] = pjoin(self.me_dir, 'Source', 'MODEL', 'MG5_param.dat') else: - check_param_card.check_valid_param_card(opt['param_card']) - - logger.debug('write compile file for card: %s' % opt['param_card']) + check_param_card.check_valid_param_card(opt['param_card']) + + logger.debug('write compile file for card: %s' % opt['param_card']) param_card = check_param_card.ParamCard(opt['param_card']) outfile = pjoin(opt['output_dir'], 'param_card.inc') ident_card = pjoin(self.me_dir,'Cards','ident_card.dat') @@ -3185,10 +3185,10 @@ def do_treatcards(self, line, mode=None, opt=None): devnull.close() default = pjoin(self.me_dir,'bin','internal','ufomodel','param_card.dat') - need_mp = self.proc_characteristics['loop_induced'] + need_mp = self.proc_characteristics['loop_induced'] param_card.write_inc_file(outfile, ident_card, default, need_mp=need_mp) - - + + if mode in ['run', 'all']: if not hasattr(self, 'run_card'): run_card = banner_mod.RunCard(opt['run_card'], path=pjoin(self.me_dir, 'Cards', 'run_card.dat')) @@ -3202,7 +3202,7 @@ def do_treatcards(self, line, mode=None, opt=None): run_card['lpp2'] = 0 run_card['ebeam1'] = 0 run_card['ebeam2'] = 0 - + # Ensure that the bias parameters has all the required input from the # run_card if run_card['bias_module'].lower() not in ['dummy','none']: @@ -3219,7 +3219,7 @@ def do_treatcards(self, line, mode=None, opt=None): mandatory_file,run_card['bias_module'])) misc.copytree(run_card['bias_module'], pjoin(self.me_dir,'Source','BIAS', os.path.basename(run_card['bias_module']))) - + #check expected parameters for the module. default_bias_parameters = {} start, last = False,False @@ -3244,50 +3244,50 @@ def do_treatcards(self, line, mode=None, opt=None): for pair in line.split(','): if not pair.strip(): continue - x,y =pair.split(':') + x,y =pair.split(':') x=x.strip() if x.startswith(('"',"'")) and x.endswith(x[0]): - x = x[1:-1] + x = x[1:-1] default_bias_parameters[x] = y elif ':' in line: x,y = line.split(':') x = x.strip() if x.startswith(('"',"'")) and x.endswith(x[0]): - x = x[1:-1] + x = x[1:-1] default_bias_parameters[x] = y for key,value in run_card['bias_parameters'].items(): if key not in default_bias_parameters: logger.warning('%s not supported by the bias module. We discard this entry.', key) else: default_bias_parameters[key] = value - run_card['bias_parameters'] = default_bias_parameters - - - # Finally write the include file + run_card['bias_parameters'] = default_bias_parameters + + + # Finally write the include file run_card.write_include_file(opt['output_dir']) - + if self.proc_characteristics['loop_induced'] and mode in ['loop', 'all']: - self.MadLoopparam = banner_mod.MadLoopParam(pjoin(self.me_dir, + self.MadLoopparam = banner_mod.MadLoopParam(pjoin(self.me_dir, 'Cards', 'MadLoopParams.dat')) # The writing out of MadLoop filter is potentially dangerous # when running in multi-core with a central disk. So it is turned - # off here. If these filters were not initialized then they will + # off here. If these filters were not initialized then they will # have to be re-computed at the beginning of each run. if 'WriteOutFilters' in self.MadLoopparam.user_set and \ self.MadLoopparam.get('WriteOutFilters'): logger.info( -"""You chose to have MadLoop writing out filters. +"""You chose to have MadLoop writing out filters. Beware that this can be dangerous for local multicore runs.""") self.MadLoopparam.set('WriteOutFilters',False, changeifuserset=False) - + # The conservative settings below for 'CTModeInit' and 'ZeroThres' # help adress issues for processes like g g > h z, and g g > h g - # where there are some helicity configuration heavily suppressed - # (by several orders of magnitude) so that the helicity filter + # where there are some helicity configuration heavily suppressed + # (by several orders of magnitude) so that the helicity filter # needs high numerical accuracy to correctly handle this spread in # magnitude. Also, because one cannot use the Born as a reference - # scale, it is better to force quadruple precision *for the + # scale, it is better to force quadruple precision *for the # initialization points only*. This avoids numerical accuracy issues # when setting up the helicity filters and does not significantly # slow down the run. @@ -3298,21 +3298,21 @@ def do_treatcards(self, line, mode=None, opt=None): # It is a bit superficial to use the level 2 which tries to numerically # map matching helicities (because of CP symmetry typically) together. -# It is useless in the context of MC over helicities and it can +# It is useless in the context of MC over helicities and it can # potentially make the helicity double checking fail. self.MadLoopparam.set('HelicityFilterLevel',1, changeifuserset=False) # To be on the safe side however, we ask for 4 consecutive matching # helicity filters. self.MadLoopparam.set('CheckCycle',4, changeifuserset=False) - + # For now it is tricky to have each channel performing the helicity # double check. What we will end up doing is probably some kind # of new initialization round at the beginning of each launch - # command, to reset the filters. + # command, to reset the filters. self.MadLoopparam.set('DoubleCheckHelicityFilter',False, changeifuserset=False) - + # Thanks to TIR recycling, TIR is typically much faster for Loop-induced # processes when not doing MC over helicities, so that we place OPP last. if not hasattr(self, 'run_card'): @@ -3349,7 +3349,7 @@ def do_treatcards(self, line, mode=None, opt=None): logger.warning( """You chose to also use a lorentz rotation for stability tests (see parameter NRotations_[DP|QP]). Beware that, for optimization purposes, MadEvent uses manual TIR cache clearing which is not compatible - with the lorentz rotation stability test. The number of these rotations to be used will be reset to + with the lorentz rotation stability test. The number of these rotations to be used will be reset to zero by MadLoop. You can avoid this by changing the parameter 'FORCE_ML_HELICITY_SUM' int he matrix.f files to be .TRUE. so that the sum over helicity configurations is performed within MadLoop (in which case the helicity of final state particles cannot be speicfied in the LHE file.""") @@ -3363,15 +3363,15 @@ def do_treatcards(self, line, mode=None, opt=None): # self.MadLoopparam.set('NRotations_DP',0,changeifuserset=False) # Revert to the above to be slightly less robust but twice faster. self.MadLoopparam.set('NRotations_DP',1,changeifuserset=False) - self.MadLoopparam.set('NRotations_QP',0,changeifuserset=False) - + self.MadLoopparam.set('NRotations_QP',0,changeifuserset=False) + # Finally, the stability tests are slightly less reliable for process - # with less or equal than 4 final state particles because the + # with less or equal than 4 final state particles because the # accessible kinematic is very limited (i.e. lorentz rotations don't # shuffle invariants numerics much). In these cases, we therefore # increase the required accuracy to 10^-7. # This is important for getting g g > z z [QCD] working with a - # ptheavy cut as low as 1 GeV. + # ptheavy cut as low as 1 GeV. if self.proc_characteristics['nexternal']<=4: if ('MLStabThres' in self.MadLoopparam.user_set and \ self.MadLoopparam.get('MLStabThres')>1.0e-7): @@ -3381,12 +3381,12 @@ def do_treatcards(self, line, mode=None, opt=None): than four external legs, so this is not recommended (especially not for g g > z z).""") self.MadLoopparam.set('MLStabThres',1.0e-7,changeifuserset=False) else: - self.MadLoopparam.set('MLStabThres',1.0e-4,changeifuserset=False) + self.MadLoopparam.set('MLStabThres',1.0e-4,changeifuserset=False) #write the output file self.MadLoopparam.write(pjoin(self.me_dir,"SubProcesses","MadLoop5_resources", "MadLoopParams.dat")) - + if self.proc_characteristics['loop_induced'] and mode in ['loop', 'all']: # Now Update MadLoop filters if necessary (if modifications were made to # the model parameters). @@ -3403,12 +3403,12 @@ def do_treatcards(self, line, mode=None, opt=None): elif not opt['forbid_MadLoopInit'] and \ MadLoopInitializer.need_MadLoopInit(self.me_dir): self.exec_cmd('initMadLoop -f') - - ############################################################################ + + ############################################################################ def do_survey(self, line): """Advanced commands: launch survey for the current process """ - - + + args = self.split_arg(line) # Check argument's validity self.check_survey(args) @@ -3416,7 +3416,7 @@ def do_survey(self, line): if os.path.exists(pjoin(self.me_dir,'error')): os.remove(pjoin(self.me_dir,'error')) - + self.configure_directory() # Save original random number self.random_orig = self.random @@ -3435,9 +3435,9 @@ def do_survey(self, line): P_zero_result = [] # check the number of times where they are no phase-space # File for the loop (for loop induced) - if os.path.exists(pjoin(self.me_dir,'SubProcesses', + if os.path.exists(pjoin(self.me_dir,'SubProcesses', 'MadLoop5_resources')) and cluster.need_transfer(self.options): - tf=tarfile.open(pjoin(self.me_dir, 'SubProcesses', + tf=tarfile.open(pjoin(self.me_dir, 'SubProcesses', 'MadLoop5_resources.tar.gz'), 'w:gz', dereference=True) tf.add(pjoin(self.me_dir,'SubProcesses','MadLoop5_resources'), arcname='MadLoop5_resources') @@ -3467,7 +3467,7 @@ def do_survey(self, line): except Exception as error: logger.debug(error) pass - + jobs, P_zero_result = ajobcreator.launch() # Check if all or only some fails if P_zero_result: @@ -3481,60 +3481,60 @@ def do_survey(self, line): self.get_Gdir() for P in P_zero_result: self.Gdirs[0][pjoin(self.me_dir,'SubProcesses',P)] = [] - + self.monitor(run_type='All jobs submitted for survey', html=True) if not self.history or 'survey' in self.history[-1] or self.ninitial ==1 or \ self.run_card['gridpack']: #will be done during the refine (more precisely in gen_ximprove) cross, error = self.make_make_all_html_results() self.results.add_detail('cross', cross) - self.results.add_detail('error', error) + self.results.add_detail('error', error) self.exec_cmd("print_results %s" % self.run_name, - errorhandling=False, printcmd=False, precmd=False, postcmd=False) - + errorhandling=False, printcmd=False, precmd=False, postcmd=False) + self.results.add_detail('run_statistics', dict(ajobcreator.run_statistics)) self.update_status('End survey', 'parton', makehtml=False) ############################################################################ def pass_in_difficult_integration_mode(self, rate=1): """be more secure for the integration to not miss it due to strong cut""" - + # improve survey options if default if self.opts['points'] == self._survey_options['points'][1]: self.opts['points'] = (rate+2) * self._survey_options['points'][1] if self.opts['iterations'] == self._survey_options['iterations'][1]: self.opts['iterations'] = 1 + rate + self._survey_options['iterations'][1] if self.opts['accuracy'] == self._survey_options['accuracy'][1]: - self.opts['accuracy'] = self._survey_options['accuracy'][1]/(rate+2) - + self.opts['accuracy'] = self._survey_options['accuracy'][1]/(rate+2) + # Modify run_config.inc in order to improve the refine conf_path = pjoin(self.me_dir, 'Source','run_config.inc') files.cp(conf_path, conf_path + '.bk') # text = open(conf_path).read() - min_evt, max_evt = 2500 *(2+rate), 10000*(rate+1) - + min_evt, max_evt = 2500 *(2+rate), 10000*(rate+1) + text = re.sub('''\(min_events = \d+\)''', '(min_events = %i )' % min_evt, text) text = re.sub('''\(max_events = \d+\)''', '(max_events = %i )' % max_evt, text) fsock = open(conf_path, 'w') fsock.write(text) fsock.close() - + # Compile for name in ['../bin/internal/gen_ximprove', 'all']: self.compile(arg=[name], cwd=os.path.join(self.me_dir, 'Source')) - - - ############################################################################ + + + ############################################################################ def do_refine(self, line): """Advanced commands: launch survey for the current process """ - devnull = open(os.devnull, 'w') + devnull = open(os.devnull, 'w') self.nb_refine += 1 args = self.split_arg(line) treshold=None - - + + for a in args: if a.startswith('--treshold='): treshold = float(a.split('=',1)[1]) @@ -3548,8 +3548,8 @@ def do_refine(self, line): break # Check argument's validity self.check_refine(args) - - refine_opt = {'err_goal': args[0], 'split_channels': True} + + refine_opt = {'err_goal': args[0], 'split_channels': True} precision = args[0] if len(args) == 2: refine_opt['max_process']= args[1] @@ -3560,15 +3560,15 @@ def do_refine(self, line): # Update random number self.update_random() self.save_random() - + if self.cluster_mode: logger.info('Creating Jobs') self.update_status('Refine results to %s' % precision, level=None) - + self.total_jobs = 0 - subproc = [l.strip() for l in open(pjoin(self.me_dir,'SubProcesses', + subproc = [l.strip() for l in open(pjoin(self.me_dir,'SubProcesses', 'subproc.mg'))] - + # cleanning the previous job for nb_proc,subdir in enumerate(subproc): subdir = subdir.strip() @@ -3589,14 +3589,14 @@ def do_refine(self, line): level = 5 if value.has_warning(): level = 10 - logger.log(level, + logger.log(level, value.nice_output(str('/'.join([key[0],'G%s'%key[1]]))). replace(' statistics','')) logger.debug(globalstat.nice_output('combined', no_warning=True)) - + if survey_statistics: x_improve.run_statistics = survey_statistics - + x_improve.launch() # create the ajob for the refinment. if not self.history or 'refine' not in self.history[-1]: cross, error = x_improve.update_html() #update html results for survey @@ -3610,9 +3610,9 @@ def do_refine(self, line): subdir = subdir.strip() Pdir = pjoin(self.me_dir, 'SubProcesses',subdir) bindir = pjoin(os.path.relpath(self.dirbin, Pdir)) - + logger.info(' %s ' % subdir) - + if os.path.exists(pjoin(Pdir, 'ajob1')): cudacpp_backend = self.run_card['cudacpp_backend'] # the default value is defined in banner.py @@ -3629,7 +3629,7 @@ def do_refine(self, line): ###self.compile(['all'], cwd=Pdir) alljobs = misc.glob('ajob*', Pdir) - + #remove associated results.dat (ensure to not mix with all data) Gre = re.compile("\s*j=(G[\d\.\w]+)") for job in alljobs: @@ -3637,49 +3637,49 @@ def do_refine(self, line): for Gdir in Gdirs: if os.path.exists(pjoin(Pdir, Gdir, 'results.dat')): os.remove(pjoin(Pdir, Gdir,'results.dat')) - - nb_tot = len(alljobs) + + nb_tot = len(alljobs) self.total_jobs += nb_tot for i, job in enumerate(alljobs): job = os.path.basename(job) - self.launch_job('%s' % job, cwd=Pdir, remaining=(nb_tot-i-1), - run_type='Refine number %s on %s (%s/%s)' % + self.launch_job('%s' % job, cwd=Pdir, remaining=(nb_tot-i-1), + run_type='Refine number %s on %s (%s/%s)' % (self.nb_refine, subdir, nb_proc+1, len(subproc))) - self.monitor(run_type='All job submitted for refine number %s' % self.nb_refine, + self.monitor(run_type='All job submitted for refine number %s' % self.nb_refine, html=True) - + self.update_status("Combining runs", level='parton') try: os.remove(pjoin(Pdir, 'combine_runs.log')) except Exception: pass - + if isinstance(x_improve, gen_ximprove.gen_ximprove_v4): # the merge of the events.lhe is handle in the x_improve class - # for splitted runs. (and partly in store_events). + # for splitted runs. (and partly in store_events). combine_runs.CombineRuns(self.me_dir) self.refine_mode = "old" else: self.refine_mode = "new" - + cross, error = self.make_make_all_html_results() self.results.add_detail('cross', cross) self.results.add_detail('error', error) - self.results.add_detail('run_statistics', + self.results.add_detail('run_statistics', dict(self.results.get_detail('run_statistics'))) self.update_status('finish refine', 'parton', makehtml=False) devnull.close() - - ############################################################################ + + ############################################################################ def do_comine_iteration(self, line): """Not in help: Combine a given iteration combine_iteration Pdir Gdir S|R step - S is for survey + S is for survey R is for refine - step is the iteration number (not very critical)""" + step is the iteration number (not very critical)""" self.set_run_name("tmp") self.configure_directory(html_opening=False) @@ -3695,12 +3695,12 @@ def do_comine_iteration(self, line): gensym.combine_iteration(Pdir, Gdir, int(step)) elif mode == "R": refine = gen_ximprove.gen_ximprove_share(self) - refine.combine_iteration(Pdir, Gdir, int(step)) - - + refine.combine_iteration(Pdir, Gdir, int(step)) - - ############################################################################ + + + + ############################################################################ def do_combine_events(self, line): """Advanced commands: Launch combine events""" start=time.time() @@ -3710,11 +3710,11 @@ def do_combine_events(self, line): self.check_combine_events(args) self.update_status('Combining Events', level='parton') - + if self.run_card['gridpack'] and isinstance(self, GridPackCmd): return GridPackCmd.do_combine_events(self, line) - + # Define The Banner tag = self.run_card['run_tag'] # Update the banner with the pythia card @@ -3727,14 +3727,14 @@ def do_combine_events(self, line): self.banner.change_seed(self.random_orig) if not os.path.exists(pjoin(self.me_dir, 'Events', self.run_name)): os.mkdir(pjoin(self.me_dir, 'Events', self.run_name)) - self.banner.write(pjoin(self.me_dir, 'Events', self.run_name, + self.banner.write(pjoin(self.me_dir, 'Events', self.run_name, '%s_%s_banner.txt' % (self.run_name, tag))) - - get_wgt = lambda event: event.wgt + + get_wgt = lambda event: event.wgt AllEvent = lhe_parser.MultiEventFile() AllEvent.banner = self.banner - + partials = 0 # if too many file make some partial unweighting sum_xsec, sum_xerru, sum_axsec = 0,[],0 Gdirs = self.get_Gdir() @@ -3751,12 +3751,12 @@ def do_combine_events(self, line): os.remove(pjoin(Gdir, 'events.lhe')) continue - AllEvent.add(pjoin(Gdir, 'events.lhe'), + AllEvent.add(pjoin(Gdir, 'events.lhe'), result.get('xsec'), result.get('xerru'), result.get('axsec') ) - + if len(AllEvent) >= 80: #perform a partial unweighting AllEvent.unweight(pjoin(self.me_dir, "Events", self.run_name, "partials%s.lhe.gz" % partials), get_wgt, log_level=5, trunc_error=1e-2, event_target=self.run_card['nevents']) @@ -3765,13 +3765,13 @@ def do_combine_events(self, line): AllEvent.add(pjoin(self.me_dir, "Events", self.run_name, "partials%s.lhe.gz" % partials), sum_xsec, math.sqrt(sum(x**2 for x in sum_xerru)), - sum_axsec) + sum_axsec) partials +=1 - + if not hasattr(self,'proc_characteristic'): self.proc_characteristic = self.get_characteristics() if len(AllEvent) == 0: - nb_event = 0 + nb_event = 0 else: nb_event = AllEvent.unweight(pjoin(self.me_dir, "Events", self.run_name, "unweighted_events.lhe.gz"), get_wgt, trunc_error=1e-2, event_target=self.run_card['nevents'], @@ -3791,22 +3791,22 @@ def do_combine_events(self, line): os.remove(pjoin(self.me_dir, "Events", self.run_name, "partials%s.lhe.gz" % i)) except Exception: os.remove(pjoin(self.me_dir, "Events", self.run_name, "partials%s.lhe" % i)) - + self.results.add_detail('nb_event', nb_event) - + if self.run_card['bias_module'].lower() not in ['dummy', 'none'] and nb_event: self.correct_bias() elif self.run_card['custom_fcts']: self.correct_bias() logger.info("combination of events done in %s s ", time.time()-start) - + self.to_store.append('event') - - ############################################################################ + + ############################################################################ def correct_bias(self): - """check the first event and correct the weight by the bias + """check the first event and correct the weight by the bias and correct the cross-section. - If the event do not have the bias tag it means that the bias is + If the event do not have the bias tag it means that the bias is one modifying the cross-section/shape so we have nothing to do """ @@ -3834,7 +3834,7 @@ def correct_bias(self): output.write('') output.close() lhe.close() - + # MODIFY THE BANNER i.e. INIT BLOCK # ensure information compatible with normalisation choice total_cross = sum(cross[key] for key in cross) @@ -3846,8 +3846,8 @@ def correct_bias(self): elif self.run_card['event_norm'] == 'unity': total_cross = self.results.current['cross'] * total_cross / nb_event for key in cross: - cross[key] *= total_cross / nb_event - + cross[key] *= total_cross / nb_event + bannerfile = lhe_parser.EventFile(pjoin(self.me_dir, 'Events', self.run_name, '.banner.tmp.gz'),'w') banner = banner_mod.Banner(lhe.banner) banner.modify_init_cross(cross) @@ -3862,12 +3862,12 @@ def correct_bias(self): os.remove(lhe.name) os.remove(bannerfile.name) os.remove(output.name) - - + + self.results.current['cross'] = total_cross self.results.current['error'] = 0 - - ############################################################################ + + ############################################################################ def do_store_events(self, line): """Advanced commands: Launch store events""" @@ -3883,16 +3883,16 @@ def do_store_events(self, line): if not os.path.exists(pjoin(self.me_dir, 'Events', run)): os.mkdir(pjoin(self.me_dir, 'Events', run)) if not os.path.exists(pjoin(self.me_dir, 'HTML', run)): - os.mkdir(pjoin(self.me_dir, 'HTML', run)) - + os.mkdir(pjoin(self.me_dir, 'HTML', run)) + # 1) Store overall process information #input = pjoin(self.me_dir, 'SubProcesses', 'results.dat') #output = pjoin(self.me_dir, 'SubProcesses', '%s_results.dat' % run) - #files.cp(input, output) + #files.cp(input, output) # 2) Treat the files present in the P directory - # Ensure that the number of events is different of 0 + # Ensure that the number of events is different of 0 if self.results.current['nb_event'] == 0 and not self.run_card['gridpack']: logger.warning("No event detected. No cleaning performed! This should allow to run:\n" + " cd Subprocesses; ../bin/internal/combine_events\n"+ @@ -3910,18 +3910,18 @@ def do_store_events(self, line): # if os.path.exists(pjoin(G_path, 'results.dat')): # input = pjoin(G_path, 'results.dat') # output = pjoin(G_path, '%s_results.dat' % run) - # files.cp(input, output) + # files.cp(input, output) #except Exception: - # continue + # continue # Store log try: if os.path.exists(pjoin(G_path, 'log.txt')): input = pjoin(G_path, 'log.txt') output = pjoin(G_path, '%s_log.txt' % run) - files.mv(input, output) + files.mv(input, output) except Exception: continue - #try: + #try: # # Grid # for name in ['ftn26']: # if os.path.exists(pjoin(G_path, name)): @@ -3930,7 +3930,7 @@ def do_store_events(self, line): # input = pjoin(G_path, name) # output = pjoin(G_path, '%s_%s' % (run,name)) # files.mv(input, output) - # misc.gzip(pjoin(G_path, output), error=None) + # misc.gzip(pjoin(G_path, output), error=None) #except Exception: # continue # Delete ftn25 to ensure reproducible runs @@ -3940,11 +3940,11 @@ def do_store_events(self, line): # 3) Update the index.html self.gen_card_html() - + # 4) Move the Files present in Events directory E_path = pjoin(self.me_dir, 'Events') O_path = pjoin(self.me_dir, 'Events', run) - + # The events file for name in ['events.lhe', 'unweighted_events.lhe']: finput = pjoin(E_path, name) @@ -3960,30 +3960,30 @@ def do_store_events(self, line): # os.remove(pjoin(O_path, '%s.gz' % name)) # input = pjoin(E_path, name) ## output = pjoin(O_path, name) - + self.update_status('End Parton', level='parton', makehtml=False) devnull.close() - - - ############################################################################ + + + ############################################################################ def do_create_gridpack(self, line): """Advanced commands: Create gridpack from present run""" self.update_status('Creating gridpack', level='parton') # compile gen_ximprove misc.compile(['../bin/internal/gen_ximprove'], cwd=pjoin(self.me_dir, "Source")) - + Gdir = self.get_Gdir() Pdir = set([os.path.dirname(G) for G in Gdir]) - for P in Pdir: + for P in Pdir: allG = misc.glob('G*', path=P) for G in allG: if pjoin(P, G) not in Gdir: logger.debug('removing %s', pjoin(P,G)) shutil.rmtree(pjoin(P,G)) - - + + args = self.split_arg(line) self.check_combine_events(args) if not self.run_tag: self.run_tag = 'tag_1' @@ -3996,13 +3996,13 @@ def do_create_gridpack(self, line): cwd=self.me_dir) misc.call(['./bin/internal/clean'], cwd=self.me_dir) misc.call(['./bin/internal/make_gridpack'], cwd=self.me_dir) - files.mv(pjoin(self.me_dir, 'gridpack.tar.gz'), + files.mv(pjoin(self.me_dir, 'gridpack.tar.gz'), pjoin(self.me_dir, '%s_gridpack.tar.gz' % self.run_name)) os.system("sed -i.bak \"s/\s*.true.*=.*GridRun/ .false. = GridRun/g\" %s/Cards/grid_card.dat" \ % self.me_dir) self.update_status('gridpack created', level='gridpack') - - ############################################################################ + + ############################################################################ def do_shower(self, line): """launch the shower""" @@ -4010,7 +4010,7 @@ def do_shower(self, line): if len(args)>1 and args[0] in self._interfaced_showers: chosen_showers = [args.pop(0)] elif '--no_default' in line: - # If '--no_default' was specified in the arguments, then only one + # If '--no_default' was specified in the arguments, then only one # shower will be run, depending on which card is present. # but we each of them are called. (each of them check if the file exists) chosen_showers = list(self._interfaced_showers) @@ -4021,9 +4021,9 @@ def do_shower(self, line): shower_priority = ['pythia8','pythia'] chosen_showers = [sorted(chosen_showers,key=lambda sh: shower_priority.index(sh) if sh in shower_priority else len(shower_priority)+1)[0]] - + for shower in chosen_showers: - self.exec_cmd('%s %s'%(shower,' '.join(args)), + self.exec_cmd('%s %s'%(shower,' '.join(args)), postcmd=False, printcmd=False) def do_madanalysis5_parton(self, line): @@ -4039,11 +4039,11 @@ def do_madanalysis5_parton(self, line): def mg5amc_py8_interface_consistency_warning(options): """ Check the consistency of the mg5amc_py8_interface installed with the current MG5 and Pythia8 versions. """ - + # All this is only relevant is Pythia8 is interfaced to MG5 if not options['pythia8_path']: return None - + if not options['mg5amc_py8_interface_path']: return \ """ @@ -4053,7 +4053,7 @@ def mg5amc_py8_interface_consistency_warning(options): Consider installing the MG5_aMC-PY8 interface with the following command: MG5_aMC>install mg5amc_py8_interface """ - + mg5amc_py8_interface_path = options['mg5amc_py8_interface_path'] py8_path = options['pythia8_path'] # If the specified interface path is relative, make it absolut w.r.t MGDIR if @@ -4062,7 +4062,7 @@ def mg5amc_py8_interface_consistency_warning(options): mg5amc_py8_interface_path = pjoin(MG5DIR,mg5amc_py8_interface_path) py8_path = pjoin(MG5DIR,py8_path) - # Retrieve all the on-install and current versions + # Retrieve all the on-install and current versions fsock = open(pjoin(mg5amc_py8_interface_path, 'MG5AMC_VERSION_ON_INSTALL')) MG5_version_on_install = fsock.read().replace('\n','') fsock.close() @@ -4074,7 +4074,7 @@ def mg5amc_py8_interface_consistency_warning(options): MG5_curr_version =misc.get_pkg_info()['version'] try: p = subprocess.Popen(['./get_pythia8_version.py',py8_path], - stdout=subprocess.PIPE, stderr=subprocess.PIPE, + stdout=subprocess.PIPE, stderr=subprocess.PIPE, cwd=mg5amc_py8_interface_path) (out, err) = p.communicate() out = out.decode(errors='ignore').replace('\n','') @@ -4084,37 +4084,37 @@ def mg5amc_py8_interface_consistency_warning(options): float(out) except: PY8_curr_version = None - + if not MG5_version_on_install is None and not MG5_curr_version is None: if MG5_version_on_install != MG5_curr_version: return \ """ The current version of MG5_aMC (v%s) is different than the one active when - installing the 'mg5amc_py8_interface_path' (which was MG5aMC v%s). + installing the 'mg5amc_py8_interface_path' (which was MG5aMC v%s). Please consider refreshing the installation of this interface with the command: MG5_aMC>install mg5amc_py8_interface """%(MG5_curr_version, MG5_version_on_install) - + if not PY8_version_on_install is None and not PY8_curr_version is None: if PY8_version_on_install != PY8_curr_version: return \ """ The current version of Pythia8 (v%s) is different than the one active when - installing the 'mg5amc_py8_interface' tool (which was Pythia8 v%s). + installing the 'mg5amc_py8_interface' tool (which was Pythia8 v%s). Please consider refreshing the installation of this interface with the command: MG5_aMC>install mg5amc_py8_interface """%(PY8_curr_version,PY8_version_on_install) - + return None def setup_Pythia8RunAndCard(self, PY8_Card, run_type): """ Setup the Pythia8 Run environment and card. In particular all the process and run specific parameters of the card are automatically set here. This function returns the path where HEPMC events will be output, if any.""" - + HepMC_event_output = None tag = self.run_tag - + PY8_Card.subruns[0].systemSet('Beams:LHEF',"unweighted_events.lhe.gz") hepmc_format = PY8_Card['HEPMCoutput:file'].lower() @@ -4185,7 +4185,7 @@ def setup_Pythia8RunAndCard(self, PY8_Card, run_type): misc.mkfifo(fifo_path) # Use defaultSet not to overwrite the current userSet status PY8_Card.defaultSet('HEPMCoutput:file',fifo_path) - HepMC_event_output=fifo_path + HepMC_event_output=fifo_path elif hepmc_format in ['','/dev/null','None']: logger.warning('User disabled the HepMC output of Pythia8.') HepMC_event_output = None @@ -4206,7 +4206,7 @@ def setup_Pythia8RunAndCard(self, PY8_Card, run_type): # only if it is not already user_set. if PY8_Card['JetMatching:qCut']==-1.0: PY8_Card.MadGraphSet('JetMatching:qCut',1.5*self.run_card['xqcut'], force=True) - + if PY8_Card['JetMatching:qCut']<(1.5*self.run_card['xqcut']): logger.error( 'The MLM merging qCut parameter you chose (%f) is less than '%PY8_Card['JetMatching:qCut']+ @@ -4233,7 +4233,7 @@ def setup_Pythia8RunAndCard(self, PY8_Card, run_type): if PY8_Card['JetMatching:qCut'] not in qCutList: qCutList.append(PY8_Card['JetMatching:qCut']) PY8_Card.MadGraphSet('SysCalc:qCutList', qCutList, force=True) - + if PY8_Card['SysCalc:qCutList']!='auto': for scale in PY8_Card['SysCalc:qCutList']: @@ -4244,7 +4244,7 @@ def setup_Pythia8RunAndCard(self, PY8_Card, run_type): "'sys_matchscale' in the run_card) is less than 1.5*xqcut, where xqcut is"+ ' the run_card parameter (=%f)\n'%self.run_card['xqcut']+ 'It would be better/safer to use a larger qCut or a smaller xqcut.') - + # Specific MLM settings # PY8 should not implement the MLM veto since the driver should do it # if merging scale variation is turned on @@ -4294,18 +4294,18 @@ def setup_Pythia8RunAndCard(self, PY8_Card, run_type): CKKW_cut = 'ktdurham' elif self.run_card['ptlund']>0.0 and self.run_card['ktdurham']<=0.0: PY8_Card.subruns[0].MadGraphSet('Merging:doPTLundMerging',True) - CKKW_cut = 'ptlund' + CKKW_cut = 'ptlund' else: raise InvalidCmd("*Either* the 'ptlund' or 'ktdurham' cut in "+\ " the run_card must be turned on to activate CKKW(L) merging"+ " with Pythia8, but *both* cuts cannot be turned on at the same time."+ "\n ptlund=%f, ktdurham=%f."%(self.run_card['ptlund'],self.run_card['ktdurham'])) - + # Automatically set qWeed to the CKKWL cut if not defined by the user. if PY8_Card['SysCalc:qWeed']==-1.0: PY8_Card.MadGraphSet('SysCalc:qWeed',self.run_card[CKKW_cut], force=True) - + # MadGraphSet sets the corresponding value (in system mode) # only if it is not already user_set. if PY8_Card['Merging:TMS']==-1.0: @@ -4319,7 +4319,7 @@ def setup_Pythia8RunAndCard(self, PY8_Card, run_type): 'The CKKWl merging scale you chose (%f) is less than '%PY8_Card['Merging:TMS']+ 'the %s cut specified in the run_card parameter (=%f).\n'%(CKKW_cut,self.run_card[CKKW_cut])+ 'It is incorrect to use a smaller CKKWl scale than the generation-level %s cut!'%CKKW_cut) - + PY8_Card.MadGraphSet('TimeShower:pTmaxMatch',1) PY8_Card.MadGraphSet('SpaceShower:pTmaxMatch',1) PY8_Card.MadGraphSet('SpaceShower:rapidityOrder',False) @@ -4381,7 +4381,7 @@ def do_pythia8(self, line): try: import madgraph - except ImportError: + except ImportError: import internal.histograms as histograms else: import madgraph.various.histograms as histograms @@ -4400,16 +4400,16 @@ def do_pythia8(self, line): self.check_pythia8(args) self.configure_directory(html_opening =False) else: - # initialize / remove lhapdf mode + # initialize / remove lhapdf mode self.configure_directory(html_opening =False) - self.check_pythia8(args) + self.check_pythia8(args) # Update the banner with the pythia card if not self.banner or len(self.banner) <=1: # Here the level keyword 'pythia' must not be changed to 'pythia8'. self.banner = banner_mod.recover_banner(self.results, 'pythia') - # the args are modify and the last arg is always the mode + # the args are modify and the last arg is always the mode if not no_default: self.ask_pythia_run_configuration(args[-1], pythia_version=8, banner=self.banner) @@ -4425,7 +4425,7 @@ def do_pythia8(self, line): #"Please use 'event_norm = average' in the run_card to avoid this problem.") - + if not self.options['mg5amc_py8_interface_path'] or not \ os.path.exists(pjoin(self.options['mg5amc_py8_interface_path'], 'MG5aMC_PY8_interface')): @@ -4444,16 +4444,16 @@ def do_pythia8(self, line): # Again here 'pythia' is just a keyword for the simulation level. self.update_status('\033[92mRunning Pythia8 [arXiv:1410.3012]\033[0m', 'pythia8') - - tag = self.run_tag + + tag = self.run_tag # Now write Pythia8 card # Start by reading, starting from the default one so that the 'user_set' # tag are correctly set. - PY8_Card = banner_mod.PY8Card(pjoin(self.me_dir, 'Cards', + PY8_Card = banner_mod.PY8Card(pjoin(self.me_dir, 'Cards', 'pythia8_card_default.dat')) PY8_Card.read(pjoin(self.me_dir, 'Cards', 'pythia8_card.dat'), setter='user') - + run_type = 'default' merged_run_types = ['MLM','CKKW'] if int(self.run_card['ickkw'])==1: @@ -4471,7 +4471,7 @@ def do_pythia8(self, line): cmd_card = StringIO.StringIO() PY8_Card.write(cmd_card,pjoin(self.me_dir,'Cards','pythia8_card_default.dat'), direct_pythia_input=True) - + # Now setup the preamble to make sure that everything will use the locally # installed tools (if present) even if the user did not add it to its # environment variables. @@ -4486,13 +4486,13 @@ def do_pythia8(self, line): preamble = misc.get_HEPTools_location_setter( pjoin(MG5DIR,'HEPTools'),'lib') preamble += "\n unset PYTHIA8DATA\n" - + open(pythia_cmd_card,'w').write("""! ! It is possible to run this card manually with: ! %s %s ! """%(preamble+pythia_main,os.path.basename(pythia_cmd_card))+cmd_card.getvalue()) - + # launch pythia8 pythia_log = pjoin(self.me_dir , 'Events', self.run_name , '%s_pythia8.log' % tag) @@ -4504,13 +4504,13 @@ def do_pythia8(self, line): shell_exe = None if os.path.exists('/usr/bin/env'): shell_exe = '/usr/bin/env %s'%shell - else: + else: shell_exe = misc.which(shell) if not shell_exe: raise self.InvalidCmd('No s hell could be found in your environment.\n'+ "Make sure that either '%s' is in your path or that the"%shell+\ " command '/usr/bin/env %s' exists and returns a valid path."%shell) - + exe_cmd = "#!%s\n%s"%(shell_exe,' '.join( [preamble+pythia_main, os.path.basename(pythia_cmd_card)])) @@ -4528,7 +4528,7 @@ def do_pythia8(self, line): ( os.path.exists(HepMC_event_output) and \ stat.S_ISFIFO(os.stat(HepMC_event_output).st_mode)) startPY8timer = time.time() - + # Information that will be extracted from this PY8 run PY8_extracted_information={ 'sigma_m':None, 'Nacc':None, 'Ntry':None, 'cross_sections':{} } @@ -4556,7 +4556,7 @@ def do_pythia8(self, line): n_cores = max(int(self.options['cluster_size']),1) elif self.options['run_mode']==2: n_cores = max(int(self.cluster.nb_core),1) - + lhe_file_name = os.path.basename(PY8_Card.subruns[0]['Beams:LHEF']) lhe_file = lhe_parser.EventFile(pjoin(self.me_dir,'Events', self.run_name,PY8_Card.subruns[0]['Beams:LHEF'])) @@ -4574,7 +4574,7 @@ def do_pythia8(self, line): if self.options['run_mode']==2: min_n_events_per_job = 100 elif self.options['run_mode']==1: - min_n_events_per_job = 1000 + min_n_events_per_job = 1000 min_n_core = n_events//min_n_events_per_job n_cores = max(min(min_n_core,n_cores),1) @@ -4584,8 +4584,8 @@ def do_pythia8(self, line): logger.info('Follow Pythia8 shower by running the '+ 'following command (in a separate terminal):\n tail -f %s'%pythia_log) - if self.options['run_mode']==2 and self.options['nb_core']>1: - ret_code = self.cluster.launch_and_wait(wrapper_path, + if self.options['run_mode']==2 and self.options['nb_core']>1: + ret_code = self.cluster.launch_and_wait(wrapper_path, argument= [], stdout= pythia_log, stderr=subprocess.STDOUT, cwd=pjoin(self.me_dir,'Events',self.run_name)) else: @@ -4630,10 +4630,10 @@ def do_pythia8(self, line): wrapper = open(wrapper_path,'w') if self.options['cluster_temp_path'] is None: exe_cmd = \ -"""#!%s +"""#!%s ./%s PY8Card.dat >& PY8_log.txt """ - else: + else: exe_cmd = \ """#!%s ln -s ./events_$1.lhe.gz ./events.lhe.gz @@ -4663,21 +4663,21 @@ def do_pythia8(self, line): # Set it as executable st = os.stat(wrapper_path) os.chmod(wrapper_path, st.st_mode | stat.S_IEXEC) - + # Split the .lhe event file, create event partition partition=[n_available_events//n_cores]*n_cores for i in range(n_available_events%n_cores): partition[i] += 1 - + # Splitting according to the total number of events requested by the user # Will be used to determine the number of events to indicate in the PY8 split cards. partition_for_PY8=[n_events//n_cores]*n_cores for i in range(n_events%n_cores): partition_for_PY8[i] += 1 - - logger.info('Splitting .lhe event file for PY8 parallelization...') - n_splits = lhe_file.split(partition=partition, cwd=parallelization_dir, zip=True) - + + logger.info('Splitting .lhe event file for PY8 parallelization...') + n_splits = lhe_file.split(partition=partition, cwd=parallelization_dir, zip=True) + if n_splits!=len(partition): raise MadGraph5Error('Error during lhe file splitting. Expected %d files but obtained %d.' %(len(partition),n_splits)) @@ -4690,7 +4690,7 @@ def do_pythia8(self, line): # Add the necessary run content shutil.move(pjoin(parallelization_dir,lhe_file.name+'_%d.lhe.gz'%split_id), pjoin(parallelization_dir,split_files[-1])) - + logger.info('Submitting Pythia8 jobs...') for i, split_file in enumerate(split_files): # We must write a PY8Card tailored for each split so as to correct the normalization @@ -4706,7 +4706,7 @@ def do_pythia8(self, line): split_PY8_Card.write(pjoin(parallelization_dir,'PY8Card_%d.dat'%i), pjoin(parallelization_dir,'PY8Card.dat'), add_missing=False) in_files = [pjoin(parallelization_dir,os.path.basename(pythia_main)), - pjoin(parallelization_dir,'PY8Card_%d.dat'%i), + pjoin(parallelization_dir,'PY8Card_%d.dat'%i), pjoin(parallelization_dir,split_file)] if self.options['cluster_temp_path'] is None: out_files = [] @@ -4718,35 +4718,35 @@ def do_pythia8(self, line): if os.path.basename(in_file)==split_file: ln(in_file,selected_cwd,name='events.lhe.gz') elif os.path.basename(in_file).startswith('PY8Card'): - ln(in_file,selected_cwd,name='PY8Card.dat') + ln(in_file,selected_cwd,name='PY8Card.dat') else: - ln(in_file,selected_cwd) + ln(in_file,selected_cwd) in_files = [] wrapper_path = os.path.basename(wrapper_path) else: out_files = ['split_%d.tar.gz'%i] selected_cwd = parallelization_dir - self.cluster.submit2(wrapper_path, - argument=[str(i)], cwd=selected_cwd, + self.cluster.submit2(wrapper_path, + argument=[str(i)], cwd=selected_cwd, input_files=in_files, output_files=out_files, required_output=out_files) - + def wait_monitoring(Idle, Running, Done): if Idle+Running+Done == 0: return logger.info('Pythia8 shower jobs: %d Idle, %d Running, %d Done [%s]'\ %(Idle, Running, Done, misc.format_time(time.time() - startPY8timer))) self.cluster.wait(parallelization_dir,wait_monitoring) - + logger.info('Merging results from the split PY8 runs...') if self.options['cluster_temp_path']: # Decompressing the output for i, split_file in enumerate(split_files): misc.call(['tar','-xzf','split_%d.tar.gz'%i],cwd=parallelization_dir) os.remove(pjoin(parallelization_dir,'split_%d.tar.gz'%i)) - + # Now merge logs pythia_log_file = open(pythia_log,'w') n_added = 0 @@ -4778,7 +4778,7 @@ def wait_monitoring(Idle, Running, Done): if n_added>0: PY8_extracted_information['sigma_m'] /= float(n_added) pythia_log_file.close() - + # djr plots djr_HwU = None n_added = 0 @@ -4845,7 +4845,7 @@ def wait_monitoring(Idle, Running, Done): if not os.path.isfile(hepmc_file): continue all_hepmc_files.append(hepmc_file) - + if len(all_hepmc_files)>0: hepmc_output = pjoin(self.me_dir,'Events',self.run_name,HepMC_event_output) with misc.TMP_directory() as tmp_dir: @@ -4860,8 +4860,8 @@ def wait_monitoring(Idle, Running, Done): break header.close() tail = open(pjoin(tmp_dir,'tail.hepmc'),'w') - n_tail = 0 - + n_tail = 0 + for line in misc.reverse_readline(all_hepmc_files[-1]): if line.startswith('HepMC::'): n_tail += 1 @@ -4871,7 +4871,7 @@ def wait_monitoring(Idle, Running, Done): tail.close() if n_tail>1: raise MadGraph5Error('HEPMC files should only have one trailing command.') - ###################################################################### + ###################################################################### # This is the most efficient way of putting together HEPMC's, *BUT* # # WARNING: NEED TO RENDER THE CODE BELOW SAFE TOWARDS INJECTION # ###################################################################### @@ -4888,12 +4888,12 @@ def wait_monitoring(Idle, Running, Done): elif sys.platform == 'darwin': # sed on MAC has slightly different synthax than on os.system(' '.join(['sed','-i',"''","'%s;$d'"% - (';'.join('%id'%(i+1) for i in range(n_head))),hepmc_file])) - else: - # other UNIX systems + (';'.join('%id'%(i+1) for i in range(n_head))),hepmc_file])) + else: + # other UNIX systems os.system(' '.join(['sed','-i']+["-e '%id'"%(i+1) for i in range(n_head)]+ ["-e '$d'",hepmc_file])) - + os.system(' '.join(['cat',pjoin(tmp_dir,'header.hepmc')]+all_hepmc_files+ [pjoin(tmp_dir,'tail.hepmc'),'>',hepmc_output])) @@ -4915,12 +4915,12 @@ def wait_monitoring(Idle, Running, Done): 'Inclusive cross section:' not in '\n'.join(open(pythia_log,'r').readlines()[-20:]): logger.warning('Fail to produce a pythia8 output. More info in \n %s'%pythia_log) return - + # Plot for Pythia8 successful = self.create_plot('Pythia8') if not successful: logger.warning('Failed to produce Pythia8 merging plots.') - + self.to_store.append('pythia8') # Study matched cross-sections @@ -4931,7 +4931,7 @@ def wait_monitoring(Idle, Running, Done): if self.options['run_mode']==0 or (self.options['run_mode']==2 and self.options['nb_core']==1): PY8_extracted_information['sigma_m'],PY8_extracted_information['Nacc'],\ PY8_extracted_information['Ntry'] = self.parse_PY8_log_file( - pjoin(self.me_dir,'Events', self.run_name,'%s_pythia8.log' % tag)) + pjoin(self.me_dir,'Events', self.run_name,'%s_pythia8.log' % tag)) else: logger.warning('Pythia8 cross-section could not be retreived.\n'+ 'Try turning parallelization off by setting the option nb_core to 1. YYYYY') @@ -4944,8 +4944,8 @@ def wait_monitoring(Idle, Running, Done): Ntry = PY8_extracted_information['Ntry'] sigma_m = PY8_extracted_information['sigma_m'] # Compute pythia error - error = self.results[self.run_name].return_tag(self.run_tag)['error'] - try: + error = self.results[self.run_name].return_tag(self.run_tag)['error'] + try: error_m = math.sqrt((error * Nacc/Ntry)**2 + sigma_m**2 *(1-Nacc/Ntry)/Nacc) except ZeroDivisionError: # Cannot compute error @@ -4966,31 +4966,31 @@ def wait_monitoring(Idle, Running, Done): else: logger.warning('Pythia8 merged cross-sections could not be retreived.\n'+ 'Try turning parallelization off by setting the option nb_core to 1.XXXXX') - PY8_extracted_information['cross_sections'] = {} - + PY8_extracted_information['cross_sections'] = {} + cross_sections = PY8_extracted_information['cross_sections'] if cross_sections: - # Filter the cross_sections specified an keep only the ones + # Filter the cross_sections specified an keep only the ones # with central parameters and a different merging scale a_float_re = '[\+|-]?\d+(\.\d*)?([EeDd][\+|-]?\d+)?' central_merging_re = re.compile( '^\s*Weight_MERGING\s*=\s*(?P%s)\s*$'%a_float_re, - re.IGNORECASE) + re.IGNORECASE) cross_sections = dict( (float(central_merging_re.match(xsec).group('merging')),value) - for xsec, value in cross_sections.items() if not + for xsec, value in cross_sections.items() if not central_merging_re.match(xsec) is None) central_scale = PY8_Card['JetMatching:qCut'] if \ int(self.run_card['ickkw'])==1 else PY8_Card['Merging:TMS'] if central_scale in cross_sections: self.results.add_detail('cross_pythia8', cross_sections[central_scale][0]) self.results.add_detail('error_pythia8', cross_sections[central_scale][1]) - + #logger.info('Pythia8 merged cross-sections are:') #for scale in sorted(cross_sections.keys()): # logger.info(' > Merging scale = %-6.4g : %-11.5g +/- %-7.2g [pb]'%\ - # (scale,cross_sections[scale][0],cross_sections[scale][1])) - + # (scale,cross_sections[scale][0],cross_sections[scale][1])) + xsecs_file = open(pjoin(self.me_dir,'Events',self.run_name, '%s_merged_xsecs.txt'%tag),'w') if cross_sections: @@ -5003,9 +5003,9 @@ def wait_monitoring(Idle, Running, Done): xsecs_file.write('Cross-sections could not be read from the'+\ "XML node 'xsection' of the .dat file produced by Pythia8.") xsecs_file.close() - + #Update the banner - # We add directly the pythia command card because it has the full + # We add directly the pythia command card because it has the full # information self.banner.add(pythia_cmd_card) @@ -5022,13 +5022,13 @@ def wait_monitoring(Idle, Running, Done): if self.options['delphes_path']: self.exec_cmd('delphes --no_default', postcmd=False, printcmd=False) self.print_results_in_shell(self.results.current) - + def parse_PY8_log_file(self, log_file_path): """ Parse a log file to extract number of event and cross-section. """ pythiare = re.compile("Les Houches User Process\(es\)\s*\d+\s*\|\s*(?P\d+)\s*(?P\d+)\s*(?P\d+)\s*\|\s*(?P[\d\.e\-\+]+)\s*(?P[\d\.e\-\+]+)") pythia_xsec_re = re.compile("Inclusive cross section\s*:\s*(?P[\d\.e\-\+]+)\s*(?P[\d\.e\-\+]+)") sigma_m, Nacc, Ntry = None, None, None - for line in misc.BackRead(log_file_path): + for line in misc.BackRead(log_file_path): info = pythiare.search(line) if not info: # Also try to obtain the cross-section and error from the final xsec line of pythia8 log @@ -5058,7 +5058,7 @@ def parse_PY8_log_file(self, log_file_path): raise self.InvalidCmd("Could not find cross-section and event number information "+\ "in Pythia8 log\n '%s'."%log_file_path) - + def extract_cross_sections_from_DJR(self,djr_output): """Extract cross-sections from a djr XML output.""" import xml.dom.minidom as minidom @@ -5075,11 +5075,11 @@ def extract_cross_sections_from_DJR(self,djr_output): [float(xsec.childNodes[0].data.split()[0]), float(xsec.childNodes[0].data.split()[1])]) for xsec in xsections) - + def do_pythia(self, line): """launch pythia""" - - + + # Check argument's validity args = self.split_arg(line) if '--no_default' in args: @@ -5089,12 +5089,12 @@ def do_pythia(self, line): args.remove('--no_default') else: no_default = False - + if not self.run_name: self.check_pythia(args) self.configure_directory(html_opening =False) else: - # initialize / remove lhapdf mode + # initialize / remove lhapdf mode self.configure_directory(html_opening =False) self.check_pythia(args) @@ -5102,7 +5102,7 @@ def do_pythia(self, line): logger.error('pythia-pgs require event_norm to be on sum. Do not run pythia6') return - # the args are modify and the last arg is always the mode + # the args are modify and the last arg is always the mode if not no_default: self.ask_pythia_run_configuration(args[-1]) if self.options['automatic_html_opening']: @@ -5114,35 +5114,35 @@ def do_pythia(self, line): self.banner = banner_mod.recover_banner(self.results, 'pythia') pythia_src = pjoin(self.options['pythia-pgs_path'],'src') - + self.results.add_detail('run_mode', 'madevent') self.update_status('Running Pythia', 'pythia') try: os.remove(pjoin(self.me_dir,'Events','pythia.done')) except Exception: - pass - + pass + ## LAUNCHING PYTHIA # check that LHAPATH is define. if not re.search(r'^\s*LHAPATH=%s/PDFsets' % pythia_src, - open(pjoin(self.me_dir,'Cards','pythia_card.dat')).read(), + open(pjoin(self.me_dir,'Cards','pythia_card.dat')).read(), re.M): f = open(pjoin(self.me_dir,'Cards','pythia_card.dat'),'a') f.write('\n LHAPATH=%s/PDFsets' % pythia_src) f.close() tag = self.run_tag pythia_log = pjoin(self.me_dir, 'Events', self.run_name , '%s_pythia.log' % tag) - #self.cluster.launch_and_wait('../bin/internal/run_pythia', + #self.cluster.launch_and_wait('../bin/internal/run_pythia', # argument= [pythia_src], stdout= pythia_log, # stderr=subprocess.STDOUT, # cwd=pjoin(self.me_dir,'Events')) output_files = ['pythia_events.hep'] if self.run_card['use_syst']: output_files.append('syst.dat') - if self.run_card['ickkw'] == 1: + if self.run_card['ickkw'] == 1: output_files += ['beforeveto.tree', 'xsecs.tree', 'events.tree'] - + os.environ['PDG_MASS_TBL'] = pjoin(pythia_src,'mass_width_2004.mc') self.cluster.launch_and_wait(pjoin(pythia_src, 'pythia'), input_files=[pjoin(self.me_dir, "Events", "unweighted_events.lhe"), @@ -5152,23 +5152,23 @@ def do_pythia(self, line): stdout= pythia_log, stderr=subprocess.STDOUT, cwd=pjoin(self.me_dir,'Events')) - + os.remove(pjoin(self.me_dir, "Events", "unweighted_events.lhe")) if not os.path.exists(pjoin(self.me_dir,'Events','pythia_events.hep')): logger.warning('Fail to produce pythia output. More info in \n %s' % pythia_log) return - + self.to_store.append('pythia') - + # Find the matched cross-section if int(self.run_card['ickkw']): # read the line from the bottom of the file - #pythia_log = misc.BackRead(pjoin(self.me_dir,'Events', self.run_name, + #pythia_log = misc.BackRead(pjoin(self.me_dir,'Events', self.run_name, # '%s_pythia.log' % tag)) - pythiare = re.compile("\s*I\s+0 All included subprocesses\s+I\s+(?P\d+)\s+(?P\d+)\s+I\s+(?P[\d\.D\-+]+)\s+I") - for line in misc.reverse_readline(pjoin(self.me_dir,'Events', self.run_name, + pythiare = re.compile("\s*I\s+0 All included subprocesses\s+I\s+(?P\d+)\s+(?P\d+)\s+I\s+(?P[\d\.D\-+]+)\s+I") + for line in misc.reverse_readline(pjoin(self.me_dir,'Events', self.run_name, '%s_pythia.log' % tag)): info = pythiare.search(line) if not info: @@ -5188,16 +5188,16 @@ def do_pythia(self, line): self.results.add_detail('nb_event_pythia', Nacc) #compute pythia error error = self.results[self.run_name].return_tag(self.run_tag)['error'] - if Nacc: + if Nacc: error_m = math.sqrt((error * Nacc/Ntry)**2 + sigma_m**2 *(1-Nacc/Ntry)/Nacc) else: error_m = 10000 * sigma_m # works both for fixed number of generated events and fixed accepted events self.results.add_detail('error_pythia', error_m) - break + break #pythia_log.close() - + pydir = pjoin(self.options['pythia-pgs_path'], 'src') eradir = self.options['exrootanalysis_path'] madir = self.options['madanalysis_path'] @@ -5216,12 +5216,12 @@ def do_pythia(self, line): # Creating LHE file self.run_hep2lhe(banner_path) - + if int(self.run_card['ickkw']): misc.gzip(pjoin(self.me_dir,'Events','beforeveto.tree'), - stdout=pjoin(self.me_dir,'Events',self.run_name, tag+'_pythia_beforeveto.tree.gz')) + stdout=pjoin(self.me_dir,'Events',self.run_name, tag+'_pythia_beforeveto.tree.gz')) + - if self.run_card['use_syst'] in self.true: # Calculate syscalc info based on syst.dat try: @@ -5233,7 +5233,7 @@ def do_pythia(self, line): # Store syst.dat misc.gzip(pjoin(self.me_dir,'Events', 'syst.dat'), stdout=pjoin(self.me_dir,'Events',self.run_name, tag + '_pythia_syst.dat.gz')) - + # Store syscalc.dat if os.path.exists(pjoin(self.me_dir, 'Events', 'syscalc.dat')): filename = pjoin(self.me_dir, 'Events' ,self.run_name, @@ -5253,7 +5253,7 @@ def do_pythia(self, line): if self.options['delphes_path']: self.exec_cmd('delphes --no_default', postcmd=False, printcmd=False) self.print_results_in_shell(self.results.current) - + ################################################################################ def do_remove(self, line): @@ -5263,8 +5263,8 @@ def do_remove(self, line): run, tag, mode = self.check_remove(args) if 'banner' in mode: mode.append('all') - - + + if run == 'all': # Check first if they are not a run with a name run. if os.path.exists(pjoin(self.me_dir, 'Events', 'all')): @@ -5280,7 +5280,7 @@ def do_remove(self, line): logger.info(error) pass # run already clear return - + # Check that run exists if not os.path.exists(pjoin(self.me_dir, 'Events', run)): raise self.InvalidCmd('No run \'%s\' detected' % run) @@ -5294,7 +5294,7 @@ def do_remove(self, line): # Found the file to delete - + to_delete = misc.glob('*', pjoin(self.me_dir, 'Events', run)) to_delete += misc.glob('*', pjoin(self.me_dir, 'HTML', run)) # forbid the banner to be removed @@ -5314,7 +5314,7 @@ def do_remove(self, line): if os.path.exists(pjoin(self.me_dir, 'Events', run, 'unweighted_events.lhe.gz')): to_delete.append('unweighted_events.lhe.gz') if os.path.exists(pjoin(self.me_dir, 'HTML', run,'plots_parton.html')): - to_delete.append(pjoin(self.me_dir, 'HTML', run,'plots_parton.html')) + to_delete.append(pjoin(self.me_dir, 'HTML', run,'plots_parton.html')) if nb_rm != len(to_delete): logger.warning('Be carefull that partonic information are on the point to be removed.') if 'all' in mode: @@ -5327,8 +5327,8 @@ def do_remove(self, line): if 'delphes' not in mode: to_delete = [f for f in to_delete if 'delphes' not in f] if 'parton' not in mode: - to_delete = [f for f in to_delete if 'delphes' in f - or 'pgs' in f + to_delete = [f for f in to_delete if 'delphes' in f + or 'pgs' in f or 'pythia' in f] if not self.force and len(to_delete): question = 'Do you want to delete the following files?\n %s' % \ @@ -5336,7 +5336,7 @@ def do_remove(self, line): ans = self.ask(question, 'y', choices=['y','n']) else: ans = 'y' - + if ans == 'y': for file2rm in to_delete: if os.path.exists(pjoin(self.me_dir, 'Events', run, file2rm)): @@ -5374,7 +5374,7 @@ def do_remove(self, line): if ans == 'y': for file2rm in to_delete: os.remove(file2rm) - + if 'banner' in mode: to_delete = misc.glob('*', pjoin(self.me_dir, 'Events', run)) if tag: @@ -5389,8 +5389,8 @@ def do_remove(self, line): return elif any(['banner' not in os.path.basename(p) for p in to_delete]): if to_delete: - raise MadGraph5Error('''Some output still exists for this run. - Please remove those output first. Do for example: + raise MadGraph5Error('''Some output still exists for this run. + Please remove those output first. Do for example: remove %s all banner ''' % run) else: @@ -5400,7 +5400,7 @@ def do_remove(self, line): return else: logger.info('''The banner is not removed. In order to remove it run: - remove %s all banner %s''' % (run, tag and '--tag=%s ' % tag or '')) + remove %s all banner %s''' % (run, tag and '--tag=%s ' % tag or '')) # update database. self.results.clean(mode, run, tag) @@ -5420,7 +5420,7 @@ def do_plot(self, line): logger.info('plot for run %s' % self.run_name) if not self.force: self.ask_edit_cards(['plot_card.dat'], args, plot=True) - + if any([arg in ['all','parton'] for arg in args]): filename = pjoin(self.me_dir, 'Events', self.run_name, 'unweighted_events.lhe') if os.path.exists(filename+'.gz'): @@ -5438,8 +5438,8 @@ def do_plot(self, line): except Exception: pass else: - logger.info('No valid files for partonic plot') - + logger.info('No valid files for partonic plot') + if any([arg in ['all','pythia'] for arg in args]): filename = pjoin(self.me_dir, 'Events' ,self.run_name, '%s_pythia_events.lhe' % self.run_tag) @@ -5452,10 +5452,10 @@ def do_plot(self, line): stdout= "%s.gz" % filename) else: logger.info('No valid files for pythia plot') - - + + if any([arg in ['all','pgs'] for arg in args]): - filename = pjoin(self.me_dir, 'Events', self.run_name, + filename = pjoin(self.me_dir, 'Events', self.run_name, '%s_pgs_events.lhco' % self.run_tag) if os.path.exists(filename+'.gz'): misc.gunzip("%s.gz" % filename) @@ -5464,15 +5464,15 @@ def do_plot(self, line): misc.gzip(filename) else: logger.info('No valid files for pgs plot') - + if any([arg in ['all','delphes'] for arg in args]): - filename = pjoin(self.me_dir, 'Events', self.run_name, + filename = pjoin(self.me_dir, 'Events', self.run_name, '%s_delphes_events.lhco' % self.run_tag) if os.path.exists(filename+'.gz'): misc.gunzip("%s.gz" % filename) if os.path.exists(filename): self.create_plot('Delphes') - misc.gzip(filename) + misc.gzip(filename) else: logger.info('No valid files for delphes plot') @@ -5488,9 +5488,9 @@ def do_syscalc(self, line): if self.ninitial == 1: logger.error('SysCalc can\'t be run for decay processes') return - + logger.info('Calculating systematics for run %s' % self.run_name) - + self.ask_edit_cards(['run_card.dat'], args, plot=False) self.run_card = banner_mod.RunCard(pjoin(self.me_dir, 'Cards', 'run_card.dat')) if any([arg in ['all','parton'] for arg in args]): @@ -5504,7 +5504,7 @@ def do_syscalc(self, line): stdout="%s.gz" % filename) else: logger.info('No valid files for parton level systematics run.') - + if any([arg in ['all','pythia'] for arg in args]): filename = pjoin(self.me_dir, 'Events' ,self.run_name, '%s_pythia_syst.dat' % self.run_tag) @@ -5525,17 +5525,17 @@ def do_syscalc(self, line): else: logger.info('No valid files for pythia level') - + def store_result(self): - """ tar the pythia results. This is done when we are quite sure that + """ tar the pythia results. This is done when we are quite sure that the pythia output will not be use anymore """ if not self.run_name: return - + if not self.to_store: - return - + return + tag = self.run_card['run_tag'] self.update_status('storing files of previous run', level=None,\ error=True) @@ -5546,14 +5546,14 @@ def store_result(self): misc.gzip(pjoin(self.me_dir,'Events',self.run_name,"unweighted_events.lhe")) if os.path.exists(pjoin(self.me_dir,'Events','reweight.lhe')): os.remove(pjoin(self.me_dir,'Events', 'reweight.lhe')) - + if 'pythia' in self.to_store: self.update_status('Storing Pythia files of previous run', level='pythia', error=True) p = pjoin(self.me_dir,'Events') n = self.run_name t = tag self.to_store.remove('pythia') - misc.gzip(pjoin(p,'pythia_events.hep'), + misc.gzip(pjoin(p,'pythia_events.hep'), stdout=pjoin(p, str(n),'%s_pythia_events.hep' % t),forceexternal=True) if 'pythia8' in self.to_store: @@ -5581,26 +5581,26 @@ def store_result(self): os.system("mv " + file_path + hepmc_fileformat + " " + move_hepmc_path) self.update_status('Done', level='pythia',makehtml=False,error=True) - self.results.save() - + self.results.save() + self.to_store = [] - def launch_job(self,exe, cwd=None, stdout=None, argument = [], remaining=0, + def launch_job(self,exe, cwd=None, stdout=None, argument = [], remaining=0, run_type='', mode=None, **opt): """ """ argument = [str(arg) for arg in argument] if mode is None: mode = self.cluster_mode - + # ensure that exe is executable if os.path.exists(exe) and not os.access(exe, os.X_OK): os.system('chmod +x %s ' % exe) elif (cwd and os.path.exists(pjoin(cwd, exe))) and not \ os.access(pjoin(cwd, exe), os.X_OK): os.system('chmod +x %s ' % pjoin(cwd, exe)) - + if mode == 0: - self.update_status((remaining, 1, + self.update_status((remaining, 1, self.total_jobs - remaining -1, run_type), level=None, force=False) start = time.time() #os.system('cd %s; ./%s' % (cwd,exe)) @@ -5613,24 +5613,24 @@ def launch_job(self,exe, cwd=None, stdout=None, argument = [], remaining=0, elif mode in [1,2]: exename = os.path.basename(exe) # For condor cluster, create the input/output files - if 'ajob' in exename: + if 'ajob' in exename: input_files = ['madevent','input_app.txt','symfact.dat','iproc.dat','dname.mg', pjoin(self.me_dir, 'SubProcesses','randinit')] - if os.path.exists(pjoin(self.me_dir,'SubProcesses', + if os.path.exists(pjoin(self.me_dir,'SubProcesses', 'MadLoop5_resources.tar.gz')) and cluster.need_transfer(self.options): input_files.append(pjoin(self.me_dir,'SubProcesses', 'MadLoop5_resources.tar.gz')) - + output_files = [] required_output = [] - + #Find the correct PDF input file input_files.append(self.get_pdf_input_filename()) - + #Find the correct ajob Gre = re.compile("\s*j=(G[\d\.\w]+)") origre = re.compile("grid_directory=(G[\d\.\w]+)") - try : + try : fsock = open(exe) except Exception: fsock = open(pjoin(cwd,exe)) @@ -5648,21 +5648,21 @@ def launch_job(self,exe, cwd=None, stdout=None, argument = [], remaining=0, if os.path.isdir(pjoin(cwd,G)): input_files.append(G) required_output.append('%s/results.dat' % G) - + if origre.search(text): G_grid = origre.search(text).groups()[0] input_files.append(pjoin(G_grid, 'ftn26')) - + #submitting - self.cluster.submit2(exe, stdout=stdout, cwd=cwd, + self.cluster.submit2(exe, stdout=stdout, cwd=cwd, input_files=input_files, output_files=output_files, required_output=required_output) elif 'survey' in exename: input_files = ['madevent','input_app.txt','symfact.dat','iproc.dat', 'dname.mg', - pjoin(self.me_dir, 'SubProcesses','randinit')] - if os.path.exists(pjoin(self.me_dir,'SubProcesses', + pjoin(self.me_dir, 'SubProcesses','randinit')] + if os.path.exists(pjoin(self.me_dir,'SubProcesses', 'MadLoop5_resources.tar.gz')) and cluster.need_transfer(self.options): - input_files.append(pjoin(self.me_dir,'SubProcesses', + input_files.append(pjoin(self.me_dir,'SubProcesses', 'MadLoop5_resources.tar.gz')) #Find the correct PDF input file @@ -5671,7 +5671,7 @@ def launch_job(self,exe, cwd=None, stdout=None, argument = [], remaining=0, output_files = [] required_output = [] - + #Find the correct ajob suffix = "_%s" % int(float(argument[0])) if suffix == '_0': @@ -5685,12 +5685,12 @@ def launch_job(self,exe, cwd=None, stdout=None, argument = [], remaining=0, if '.' in argument[0]: offset = int(str(argument[0]).split('.')[1]) else: - offset = 0 - + offset = 0 + if offset ==0 or offset == int(float(argument[0])): if os.path.exists(pjoin(cwd, G, 'input_app.txt')): os.remove(pjoin(cwd, G, 'input_app.txt')) - + if os.path.exists(os.path.realpath(pjoin(cwd, G, 'ftn25'))): if offset == 0 or offset == int(float(argument[0])): os.remove(pjoin(cwd, G, 'ftn25')) @@ -5706,16 +5706,16 @@ def launch_job(self,exe, cwd=None, stdout=None, argument = [], remaining=0, pass #submitting - self.cluster.cluster_submit(exe, stdout=stdout, cwd=cwd, argument=argument, + self.cluster.cluster_submit(exe, stdout=stdout, cwd=cwd, argument=argument, input_files=input_files, output_files=output_files, required_output=required_output, **opt) elif "refine_splitted.sh" in exename: input_files = ['madevent','symfact.dat','iproc.dat', 'dname.mg', - pjoin(self.me_dir, 'SubProcesses','randinit')] - + pjoin(self.me_dir, 'SubProcesses','randinit')] + if os.path.exists(pjoin(self.me_dir,'SubProcesses', 'MadLoop5_resources.tar.gz')) and cluster.need_transfer(self.options): - input_files.append(pjoin(self.me_dir,'SubProcesses', + input_files.append(pjoin(self.me_dir,'SubProcesses', 'MadLoop5_resources.tar.gz')) #Find the correct PDF input file @@ -5725,25 +5725,25 @@ def launch_job(self,exe, cwd=None, stdout=None, argument = [], remaining=0, output_files = [argument[0]] required_output = [] for G in output_files: - required_output.append('%s/results.dat' % G) + required_output.append('%s/results.dat' % G) input_files.append(pjoin(argument[1], "input_app.txt")) input_files.append(pjoin(argument[1], "ftn26")) - + #submitting - self.cluster.cluster_submit(exe, stdout=stdout, cwd=cwd, argument=argument, + self.cluster.cluster_submit(exe, stdout=stdout, cwd=cwd, argument=argument, input_files=input_files, output_files=output_files, - required_output=required_output, **opt) + required_output=required_output, **opt) + + - - else: self.cluster.submit(exe, argument=argument, stdout=stdout, cwd=cwd, **opt) - + ############################################################################ def find_madevent_mode(self): """Find if Madevent is in Group mode or not""" - + # The strategy is too look in the files Source/run_configs.inc # if we found: ChanPerJob=3 then it's a group mode. file_path = pjoin(self.me_dir, 'Source', 'run_config.inc') @@ -5752,11 +5752,11 @@ def find_madevent_mode(self): return 'group' else: return 'v4' - + ############################################################################ def monitor(self, run_type='monitor', mode=None, html=False): """ monitor the progress of running job """ - + starttime = time.time() if mode is None: @@ -5772,8 +5772,8 @@ def monitor(self, run_type='monitor', mode=None, html=False): else: update_status = lambda idle, run, finish: None update_first = None - try: - self.cluster.wait(self.me_dir, update_status, update_first=update_first) + try: + self.cluster.wait(self.me_dir, update_status, update_first=update_first) except Exception as error: logger.info(error) if not self.force: @@ -5788,24 +5788,24 @@ def monitor(self, run_type='monitor', mode=None, html=False): raise except KeyboardInterrupt as error: self.cluster.remove() - raise - - + raise + - ############################################################################ + + ############################################################################ def configure_directory(self, html_opening=True): - """ All action require before any type of run """ + """ All action require before any type of run """ # Basic check assert os.path.exists(pjoin(self.me_dir,'SubProcesses')) # environmental variables to be included in make_opts self.make_opts_var = {} - + #see when the last file was modified time_mod = max([os.path.getmtime(pjoin(self.me_dir,'Cards','run_card.dat')), os.path.getmtime(pjoin(self.me_dir,'Cards','param_card.dat'))]) - + if self.configured >= time_mod and hasattr(self, 'random') and hasattr(self, 'run_card'): #just ensure that cluster specific are correctly handled if self.cluster: @@ -5820,7 +5820,7 @@ def configure_directory(self, html_opening=True): #open only once the web page # Change current working directory self.launching_dir = os.getcwd() - + # Check if we need the MSSM special treatment model = self.find_model_name() if model == 'mssm' or model.startswith('mssm-'): @@ -5828,14 +5828,14 @@ def configure_directory(self, html_opening=True): mg5_param = pjoin(self.me_dir, 'Source', 'MODEL', 'MG5_param.dat') check_param_card.convert_to_mg5card(param_card, mg5_param) check_param_card.check_valid_param_card(mg5_param) - + # limit the number of event to 100k self.check_nb_events() # this is in order to avoid conflicts between runs with and without # lhapdf. not needed anymore the makefile handles it automaticallu #misc.compile(['clean4pdf'], cwd = pjoin(self.me_dir, 'Source')) - + self.make_opts_var['pdlabel1'] = '' self.make_opts_var['pdlabel2'] = '' if self.run_card['pdlabel1'] in ['eva', 'iww']: @@ -5866,7 +5866,7 @@ def configure_directory(self, html_opening=True): self.copy_lep_densities(self.run_card['pdlabel'], pjoin(self.me_dir, 'Source')) self.make_opts_var['pdlabel1'] = 'ee' self.make_opts_var['pdlabel2'] = 'ee' - + # set random number if self.run_card['iseed'] != 0: self.random = int(self.run_card['iseed']) @@ -5885,18 +5885,18 @@ def configure_directory(self, html_opening=True): break else: self.random = random.randint(1, 30107) - + #set random seed for python part of the code if self.run_card['python_seed'] == -2: #-2 means same as run_card import random if not hasattr(random, 'mg_seedset'): - random.seed(self.run_card['python_seed']) - random.mg_seedset = self.run_card['python_seed'] + random.seed(self.run_card['python_seed']) + random.mg_seedset = self.run_card['python_seed'] elif self.run_card['python_seed'] >= 0: import random if not hasattr(random, 'mg_seedset'): - random.seed(self.run_card['python_seed']) - random.mg_seedset = self.run_card['python_seed'] + random.seed(self.run_card['python_seed']) + random.mg_seedset = self.run_card['python_seed'] if self.run_card['ickkw'] == 2: logger.info('Running with CKKW matching') self.treat_ckkw_matching() @@ -5905,12 +5905,12 @@ def configure_directory(self, html_opening=True): self.update_make_opts(self.run_card) # reset list of Gdirectory self.Gdirs = None - + # create param_card.inc and run_card.inc self.do_treatcards('') - + logger.info("compile Source Directory") - + # Compile for name in [ 'all']:#, '../bin/internal/combine_events']: self.compile(arg=[name], cwd=os.path.join(self.me_dir, 'Source')) @@ -5933,7 +5933,7 @@ def configure_directory(self, html_opening=True): os.remove(pjoin(self.me_dir, 'lib','libbias.a')) force_subproc_clean = True - + # Finally compile the bias module as well if self.run_card['bias_module'] not in ['dummy',None]: logger.debug("Compiling the bias module '%s'"%bias_name) @@ -5945,7 +5945,7 @@ def configure_directory(self, html_opening=True): 'INVALID' in str(bias_module_valid).upper(): raise InvalidCmd("The bias module '%s' cannot be used because of:\n%s"% (bias_name,bias_module_valid)) - + self.compile(arg=[], cwd=os.path.join(self.me_dir, 'Source','BIAS',bias_name)) self.proc_characteristics['bias_module']=bias_name # Update the proc_characterstics file @@ -5954,7 +5954,7 @@ def configure_directory(self, html_opening=True): if force_subproc_clean: # Make sure that madevent will be recompiled - subproc = [l.strip() for l in open(pjoin(self.me_dir,'SubProcesses', + subproc = [l.strip() for l in open(pjoin(self.me_dir,'SubProcesses', 'subproc.mg'))] for nb_proc,subdir in enumerate(subproc): Pdir = pjoin(self.me_dir, 'SubProcesses',subdir.strip()) @@ -5971,20 +5971,20 @@ def configure_directory(self, html_opening=True): ############################################################################ @staticmethod def check_dir(path, default=''): - """check if the directory exists. if so return the path otherwise the + """check if the directory exists. if so return the path otherwise the default""" - + if os.path.isdir(path): return path else: return default - + ############################################################################ def get_Gdir(self, Pdir=None, symfact=None): """get the list of Gdirectory if not yet saved.""" - + if hasattr(self, "Gdirs") and self.Gdirs: if self.me_dir in self.Gdirs[0]: if Pdir is None: @@ -6000,8 +6000,8 @@ def get_Gdir(self, Pdir=None, symfact=None): Pdirs = self.get_Pdir() - Gdirs = {self.me_dir:[]} - mfactors = {} + Gdirs = {self.me_dir:[]} + mfactors = {} for P in Pdirs: Gdirs[P] = [] #for the next line do not use P, since in readonly mode it might not have symfact @@ -6012,7 +6012,7 @@ def get_Gdir(self, Pdir=None, symfact=None): mfactors[pjoin(P, "G%s" % tag)] = mfactor self.Gdirs = (Gdirs, mfactors) return self.get_Gdir(Pdir, symfact=symfact) - + ############################################################################ def set_run_name(self, name, tag=None, level='parton', reload_card=False, allow_new_tag=True): @@ -6030,8 +6030,8 @@ def get_last_tag(self, level): tagRun = self.results[self.run_name][i] if tagRun.pythia or tagRun.shower or tagRun.pythia8 : return tagRun['tag'] - - + + # when are we force to change the tag new_run:previous run requiring changes upgrade_tag = {'parton': ['parton','pythia','pgs','delphes','madanalysis5_hadron','madanalysis5_parton', 'rivet'], 'pythia': ['pythia','pgs','delphes','madanalysis5_hadron'], @@ -6044,7 +6044,7 @@ def get_last_tag(self, level): 'syscalc':[], 'rivet':['rivet']} - if name == self.run_name: + if name == self.run_name: if reload_card: run_card = pjoin(self.me_dir, 'Cards','run_card.dat') self.run_card = banner_mod.RunCard(run_card) @@ -6064,13 +6064,13 @@ def get_last_tag(self, level): break return get_last_tag(self, level) - + # save/clean previous run if self.run_name: self.store_result() # store new name self.run_name = name - + new_tag = False # First call for this run -> set the banner self.banner = banner_mod.recover_banner(self.results, level, name) @@ -6079,8 +6079,8 @@ def get_last_tag(self, level): else: # Read run_card run_card = pjoin(self.me_dir, 'Cards','run_card.dat') - self.run_card = banner_mod.RunCard(run_card) - + self.run_card = banner_mod.RunCard(run_card) + if tag: self.run_card['run_tag'] = tag new_tag = True @@ -6093,7 +6093,7 @@ def get_last_tag(self, level): self.results.update('add run %s' % name, 'all', makehtml=False) else: for tag in upgrade_tag[level]: - + if getattr(self.results[self.run_name][-1], tag): # LEVEL is already define in the last tag -> need to switch tag tag = self.get_available_tag() @@ -6103,8 +6103,8 @@ def get_last_tag(self, level): if not new_tag: # We can add the results to the current run tag = self.results[self.run_name][-1]['tag'] - self.run_card['run_tag'] = tag # ensure that run_tag is correct - + self.run_card['run_tag'] = tag # ensure that run_tag is correct + if allow_new_tag and (name in self.results and not new_tag): self.results.def_current(self.run_name) else: @@ -6113,15 +6113,15 @@ def get_last_tag(self, level): self.run_tag = self.run_card['run_tag'] return get_last_tag(self, level) - - - + + + ############################################################################ def check_nb_events(self): - """Find the number of event in the run_card, and check that this is not + """Find the number of event in the run_card, and check that this is not too large""" - + nb_event = int(self.run_card['nevents']) if nb_event > 1000000: logger.warning("Attempting to generate more than 1M events") @@ -6133,20 +6133,20 @@ def check_nb_events(self): return - - ############################################################################ + + ############################################################################ def update_random(self): """ change random number""" - + self.random += 3 if self.random > 30081*30081: # can't use too big random number raise MadGraph5Error('Random seed too large ' + str(self.random) + ' > 30081*30081') - if self.run_card['python_seed'] == -2: + if self.run_card['python_seed'] == -2: import random if not hasattr(random, 'mg_seedset'): - random.seed(self.random) + random.seed(self.random) random.mg_seedset = self.random - + ############################################################################ def save_random(self): """save random number in appropirate file""" @@ -6155,14 +6155,14 @@ def save_random(self): fsock.writelines('r=%s\n' % self.random) def do_quit(self, *args, **opts): - + return common_run.CommonRunCmd.do_quit(self, *args, **opts) #return CmdExtended.do_quit(self, *args, **opts) - + ############################################################################ def treat_CKKW_matching(self): """check for ckkw""" - + lpp1 = self.run_card['lpp1'] lpp2 = self.run_card['lpp2'] e1 = self.run_card['ebeam1'] @@ -6170,19 +6170,19 @@ def treat_CKKW_matching(self): pd = self.run_card['pdlabel'] lha = self.run_card['lhaid'] xq = self.run_card['xqcut'] - translation = {'e1': e1, 'e2':e2, 'pd':pd, + translation = {'e1': e1, 'e2':e2, 'pd':pd, 'lha':lha, 'xq':xq} if lpp1 or lpp2: - # Remove ':s from pd + # Remove ':s from pd if pd.startswith("'"): pd = pd[1:] if pd.endswith("'"): - pd = pd[:-1] + pd = pd[:-1] if xq >2 or xq ==2: xq = 2 - + # find data file if pd == "lhapdf": issudfile = 'lib/issudgrid-%(e1)s-%(e2)s-%(pd)s-%(lha)s-%(xq)s.dat.gz' @@ -6192,9 +6192,9 @@ def treat_CKKW_matching(self): issudfile = pjoin(self.webbin, issudfile % translation) else: issudfile = pjoin(self.me_dir, issudfile % translation) - + logger.info('Sudakov grid file: %s' % issudfile) - + # check that filepath exists if os.path.exists(issudfile): path = pjoin(self.me_dir, 'lib', 'issudgrid.dat') @@ -6203,20 +6203,20 @@ def treat_CKKW_matching(self): msg = 'No sudakov grid file for parameter choice. Start to generate it. This might take a while' logger.info(msg) self.update_status('GENERATE SUDAKOV GRID', level='parton') - + for i in range(-2,6): - self.cluster.submit('%s/gensudgrid ' % self.dirbin, + self.cluster.submit('%s/gensudgrid ' % self.dirbin, argument = ['%d'%i], - cwd=self.me_dir, + cwd=self.me_dir, stdout=open(pjoin(self.me_dir, 'gensudgrid%s.log' % i),'w')) self.monitor() for i in range(-2,6): path = pjoin(self.me_dir, 'lib', 'issudgrid.dat') os.system('cat %s/gensudgrid%s.log >> %s' % (self.me_dir, path)) misc.gzip(path, stdout=issudfile) - + ############################################################################ - def create_root_file(self, input='unweighted_events.lhe', + def create_root_file(self, input='unweighted_events.lhe', output='unweighted_events.root' ): """create the LHE root file """ self.update_status('Creating root files', level='parton') @@ -6233,14 +6233,14 @@ def create_root_file(self, input='unweighted_events.lhe', totar = False torm = True input = input[:-3] - + try: - misc.call(['%s/ExRootLHEFConverter' % eradir, + misc.call(['%s/ExRootLHEFConverter' % eradir, input, output], cwd=pjoin(self.me_dir, 'Events')) except Exception: logger.warning('fail to produce Root output [problem with ExRootAnalysis]') - + if totar: if os.path.exists('%s.gz' % input): try: @@ -6251,13 +6251,13 @@ def create_root_file(self, input='unweighted_events.lhe', misc.gzip(input) if torm: os.remove(input) - + def run_syscalc(self, mode='parton', event_path=None, output=None): - """create the syscalc output""" + """create the syscalc output""" if self.run_card['use_syst'] not in self.true: return - + scdir = self.options['syscalc_path'] if not scdir or not os.path.exists(scdir): return @@ -6265,12 +6265,12 @@ def run_syscalc(self, mode='parton', event_path=None, output=None): if self.run_card['event_norm'] != 'sum': logger.critical('SysCalc works only when event_norm is on \'sum\'.') return - logger.info('running SysCalc on mode %s' % mode) - + logger.info('running SysCalc on mode %s' % mode) + # Restore the old default for SysCalc+PY6 if self.run_card['sys_matchscale']=='auto': self.run_card['sys_matchscale'] = "30 50" - + # Check that all pdfset are correctly installed lhaid = [self.run_card.get_lhapdf_id()] if '&&' in self.run_card['sys_pdf']: @@ -6285,20 +6285,20 @@ def run_syscalc(self, mode='parton', event_path=None, output=None): logger.debug(str(error)) logger.warning('Systematic computation requires lhapdf to run. Bypass SysCalc') return - + # Copy all the relevant PDF sets [self.copy_lhapdf_set([onelha], pdfsets_dir) for onelha in lhaid] - + to_syscalc={'sys_scalefact': self.run_card['sys_scalefact'], 'sys_alpsfact': self.run_card['sys_alpsfact'], 'sys_matchscale': self.run_card['sys_matchscale'], 'sys_scalecorrelation': self.run_card['sys_scalecorrelation'], 'sys_pdf': self.run_card['sys_pdf']} - - tag = self.run_card['run_tag'] + + tag = self.run_card['run_tag'] card = pjoin(self.me_dir, 'bin','internal', 'syscalc_card.dat') template = open(pjoin(self.me_dir, 'bin','internal', 'syscalc_template.dat')).read() - + if '&&' in to_syscalc['sys_pdf']: to_syscalc['sys_pdf'] = to_syscalc['sys_pdf'].split('#',1)[0].replace('&&',' \n ') else: @@ -6311,8 +6311,8 @@ def run_syscalc(self, mode='parton', event_path=None, output=None): new.append(d) else: new[-1] += ' %s' % d - to_syscalc['sys_pdf'] = '\n'.join(new) - + to_syscalc['sys_pdf'] = '\n'.join(new) + if to_syscalc['sys_pdf'].lower() in ['', 'f', 'false', 'none', '.false.']: to_syscalc['sys_pdf'] = '' if to_syscalc['sys_alpsfact'].lower() in ['', 'f', 'false', 'none','.false.']: @@ -6320,17 +6320,17 @@ def run_syscalc(self, mode='parton', event_path=None, output=None): - + # check if the scalecorrelation parameter is define: if not 'sys_scalecorrelation' in self.run_card: self.run_card['sys_scalecorrelation'] = -1 open(card,'w').write(template % self.run_card) - + if not os.path.exists(card): return False - - + + event_dir = pjoin(self.me_dir, 'Events') if not event_path: @@ -6353,19 +6353,19 @@ def run_syscalc(self, mode='parton', event_path=None, output=None): raise SysCalcError('qcut value for sys_matchscale lower than qcut in pythia_card. Bypass syscalc') if float(value) < xqcut: raise SysCalcError('qcut value for sys_matchscale lower than xqcut in run_card. Bypass syscalc') - - + + event_path = pjoin(event_dir,'syst.dat') output = pjoin(event_dir, 'syscalc.dat') else: raise self.InvalidCmd('Invalid mode %s' % mode) - + if not os.path.exists(event_path): if os.path.exists(event_path+'.gz'): misc.gunzip(event_path+'.gz') else: raise SysCalcError('Events file %s does not exits' % event_path) - + self.update_status('Calculating systematics for %s level' % mode, level = mode.lower()) try: proc = misc.call([os.path.join(scdir, 'sys_calc'), @@ -6374,7 +6374,7 @@ def run_syscalc(self, mode='parton', event_path=None, output=None): stderr = subprocess.STDOUT, cwd=event_dir) # Wait 5 s to make sure file is finished writing - time.sleep(5) + time.sleep(5) except OSError as error: logger.error('fail to run syscalc: %s. Please check that SysCalc is correctly installed.' % error) else: @@ -6382,11 +6382,11 @@ def run_syscalc(self, mode='parton', event_path=None, output=None): logger.warning('SysCalc Failed. Please read the associate log to see the reason. Did you install the associate PDF set?') elif mode == 'parton': files.mv(output, event_path) - + self.update_status('End syscalc for %s level' % mode, level = mode.lower(), makehtml=False) - - return True + + return True action_switcher = AskRun @@ -6399,23 +6399,23 @@ def ask_run_configuration(self, mode=None, args=[]): passing_cmd.append('reweight=ON') if '-M' in args or '--madspin' in args: passing_cmd.append('madspin=ON') - + switch, cmd_switch = self.ask('', '0', [], ask_class = self.action_switcher, mode=mode, line_args=args, force=self.force, first_cmd=passing_cmd, return_instance=True) # - self.switch = switch # store the value of the switch for plugin purpose + self.switch = switch # store the value of the switch for plugin purpose if 'dynamical' in switch: mode = 'auto' - + # Now that we know in which mode we are check that all the card #exists (copy default if needed) - + cards = ['param_card.dat', 'run_card.dat'] if switch['shower'] == 'Pythia6': cards.append('pythia_card.dat') if switch['shower'] == 'Pythia8': - cards.append('pythia8_card.dat') + cards.append('pythia8_card.dat') if switch['detector'] in ['PGS','DELPHES+PGS']: cards.append('pgs_card.dat') if switch['detector'] in ['Delphes', 'DELPHES+PGS']: @@ -6438,29 +6438,29 @@ def ask_run_configuration(self, mode=None, args=[]): cards.append('rivet_card.dat') self.keep_cards(cards) - + first_cmd = cmd_switch.get_cardcmd() - + if os.path.isfile(pjoin(self.me_dir,'Cards','MadLoopParams.dat')): cards.append('MadLoopParams.dat') - + if self.force: self.check_param_card(pjoin(self.me_dir,'Cards','param_card.dat' )) return switch - + if 'dynamical' in switch and switch['dynamical']: self.ask_edit_cards(cards, plot=False, mode='auto', first_cmd=first_cmd) else: self.ask_edit_cards(cards, plot=False, first_cmd=first_cmd) return switch - + ############################################################################ def ask_pythia_run_configuration(self, mode=None, pythia_version=6, banner=None): """Ask the question when launching pythia""" - + pythia_suffix = '' if pythia_version==6 else '%d'%pythia_version - + available_mode = ['0', '1'] if pythia_version==6: available_mode.append('2') @@ -6485,10 +6485,10 @@ def ask_pythia_run_configuration(self, mode=None, pythia_version=6, banner=None) mode = self.ask(question, '0', options) elif not mode: mode = 'auto' - + if mode.isdigit(): mode = name[mode] - + auto = False if mode == 'auto': auto = True @@ -6497,7 +6497,7 @@ def ask_pythia_run_configuration(self, mode=None, pythia_version=6, banner=None) mode = 'pgs' elif os.path.exists(pjoin(self.me_dir, 'Cards', 'delphes_card.dat')): mode = 'delphes' - else: + else: mode = 'pythia%s'%pythia_suffix logger.info('Will run in mode %s' % mode) # Now that we know in which mode we are check that all the card @@ -6513,15 +6513,15 @@ def ask_pythia_run_configuration(self, mode=None, pythia_version=6, banner=None) cards.append('delphes_trigger.dat') self.keep_cards(cards, ignore=['madanalysis5_parton_card.dat','madanalysis5_hadron_card.dat', 'plot_card.dat']) - + if self.force: return mode - + if not banner: banner = self.banner - + if auto: - self.ask_edit_cards(cards, from_banner=['param', 'run'], + self.ask_edit_cards(cards, from_banner=['param', 'run'], mode='auto', plot=(pythia_version==6), banner=banner ) else: @@ -6529,12 +6529,12 @@ def ask_pythia_run_configuration(self, mode=None, pythia_version=6, banner=None) plot=(pythia_version==6), banner=banner) return mode - + #=============================================================================== # MadEventCmd #=============================================================================== class MadEventCmdShell(MadEventCmd, cmd.CmdShell): - """The command line processor of MadGraph""" + """The command line processor of MadGraph""" @@ -6548,11 +6548,11 @@ class SubProcesses(object): @classmethod def clean(cls): cls.name_to_pdg = {} - + @staticmethod def get_subP(me_dir): """return the list of Subprocesses""" - + out = [] for line in open(pjoin(me_dir,'SubProcesses', 'subproc.mg')): if not line: @@ -6560,9 +6560,9 @@ def get_subP(me_dir): name = line.strip() if os.path.exists(pjoin(me_dir, 'SubProcesses', name)): out.append(pjoin(me_dir, 'SubProcesses', name)) - + return out - + @staticmethod @@ -6623,9 +6623,9 @@ def get_subP_ids(path): particles = re.search("/([\d,-]+)/", line) all_ids.append([int(p) for p in particles.group(1).split(',')]) return all_ids - - -#=============================================================================== + + +#=============================================================================== class GridPackCmd(MadEventCmd): """The command for the gridpack --Those are not suppose to be use interactively--""" @@ -6639,7 +6639,7 @@ def __init__(self, me_dir = None, nb_event=0, seed=0, gran=-1, *completekey, **s self.random = seed self.random_orig = self.random self.granularity = gran - + self.options['automatic_html_opening'] = False #write the grid_card.dat on disk self.nb_event = int(nb_event) @@ -6680,7 +6680,7 @@ def write_RunWeb(self, me_dir): def write_gridcard(self, nb_event, seed, gran): """write the grid_card.dat file at appropriate location""" - + # first try to write grid_card within the gridpack. print("WRITE GRIDCARD", self.me_dir) if self.readonly: @@ -6689,35 +6689,35 @@ def write_gridcard(self, nb_event, seed, gran): fsock = open('grid_card.dat','w') else: fsock = open(pjoin(self.me_dir, 'Cards', 'grid_card.dat'),'w') - + gridpackcard = banner_mod.GridpackCard() gridpackcard['GridRun'] = True gridpackcard['gevents'] = nb_event gridpackcard['gseed'] = seed gridpackcard['ngran'] = gran - + gridpackcard.write(fsock) ############################################################################ def get_Pdir(self): """get the list of Pdirectory if not yet saved.""" - + if hasattr(self, "Pdirs"): if self.me_dir in self.Pdirs[0]: return self.Pdirs - + if not self.readonly: - self.Pdirs = [pjoin(self.me_dir, 'SubProcesses', l.strip()) + self.Pdirs = [pjoin(self.me_dir, 'SubProcesses', l.strip()) for l in open(pjoin(self.me_dir,'SubProcesses', 'subproc.mg'))] else: - self.Pdirs = [l.strip() - for l in open(pjoin(self.me_dir,'SubProcesses', 'subproc.mg'))] - + self.Pdirs = [l.strip() + for l in open(pjoin(self.me_dir,'SubProcesses', 'subproc.mg'))] + return self.Pdirs - + def prepare_local_dir(self): """create the P directory structure in the local directory""" - + if not self.readonly: os.chdir(self.me_dir) else: @@ -6726,7 +6726,7 @@ def prepare_local_dir(self): os.mkdir(p) files.cp(pjoin(self.me_dir,'SubProcesses',p,'symfact.dat'), pjoin(p, 'symfact.dat')) - + def launch(self, nb_event, seed): """ launch the generation for the grid """ @@ -6742,13 +6742,13 @@ def launch(self, nb_event, seed): if self.run_card['python_seed'] == -2: import random if not hasattr(random, 'mg_seedset'): - random.seed(seed) + random.seed(seed) random.mg_seedset = seed elif self.run_card['python_seed'] > 0: import random if not hasattr(random, 'mg_seedset'): - random.seed(self.run_card['python_seed']) - random.mg_seedset = self.run_card['python_seed'] + random.seed(self.run_card['python_seed']) + random.mg_seedset = self.run_card['python_seed'] # 2) Run the refine for the grid self.update_status('Generating Events', level=None) #misc.call([pjoin(self.me_dir,'bin','refine4grid'), @@ -6767,70 +6767,70 @@ def launch(self, nb_event, seed): self.exec_cmd('decay_events -from_cards', postcmd=False) elif self.run_card['use_syst'] and self.run_card['systematics_program'] == 'systematics': self.options['nb_core'] = 1 - self.exec_cmd('systematics %s --from_card' % + self.exec_cmd('systematics %s --from_card' % pjoin('Events', self.run_name, 'unweighted_events.lhe.gz'), postcmd=False,printcmd=False) - + def refine4grid(self, nb_event): """Special refine for gridpack run.""" self.nb_refine += 1 - + precision = nb_event self.opts = dict([(key,value[1]) for (key,value) in \ self._survey_options.items()]) - + # initialize / remove lhapdf mode # self.configure_directory() # All this has been done before self.cluster_mode = 0 # force single machine # Store seed in randinit file, to be read by ranmar.f self.save_random() - + self.update_status('Refine results to %s' % precision, level=None) logger.info("Using random number seed offset = %s" % self.random) refine_opt = {'err_goal': nb_event, 'split_channels': False, - 'ngran':self.granularity, 'readonly': self.readonly} + 'ngran':self.granularity, 'readonly': self.readonly} x_improve = gen_ximprove.gen_ximprove_gridpack(self, refine_opt) x_improve.launch() # create the ajob for the refinment and run those! - self.gscalefact = x_improve.gscalefact #store jacobian associate to the gridpack - - + self.gscalefact = x_improve.gscalefact #store jacobian associate to the gridpack + + #bindir = pjoin(os.path.relpath(self.dirbin, pjoin(self.me_dir,'SubProcesses'))) #print 'run combine!!!' #combine_runs.CombineRuns(self.me_dir) - + return #update html output Presults = sum_html.collect_result(self) cross, error = Presults.xsec, Presults.xerru self.results.add_detail('cross', cross) self.results.add_detail('error', error) - - + + #self.update_status('finish refine', 'parton', makehtml=False) #devnull.close() - - - + + + return self.total_jobs = 0 - subproc = [P for P in os.listdir(pjoin(self.me_dir,'SubProcesses')) if + subproc = [P for P in os.listdir(pjoin(self.me_dir,'SubProcesses')) if P.startswith('P') and os.path.isdir(pjoin(self.me_dir,'SubProcesses', P))] devnull = open(os.devnull, 'w') for nb_proc,subdir in enumerate(subproc): subdir = subdir.strip() Pdir = pjoin(self.me_dir, 'SubProcesses',subdir) bindir = pjoin(os.path.relpath(self.dirbin, Pdir)) - + logger.info(' %s ' % subdir) # clean previous run for match in misc.glob('*ajob*', Pdir): if os.path.basename(match)[:4] in ['ajob', 'wait', 'run.', 'done']: os.remove(pjoin(Pdir, match)) - + logfile = pjoin(Pdir, 'gen_ximprove.log') misc.call([pjoin(bindir, 'gen_ximprove')], @@ -6840,40 +6840,40 @@ def refine4grid(self, nb_event): if os.path.exists(pjoin(Pdir, 'ajob1')): alljobs = misc.glob('ajob*', Pdir) - nb_tot = len(alljobs) + nb_tot = len(alljobs) self.total_jobs += nb_tot for i, job in enumerate(alljobs): job = os.path.basename(job) - self.launch_job('%s' % job, cwd=Pdir, remaining=(nb_tot-i-1), + self.launch_job('%s' % job, cwd=Pdir, remaining=(nb_tot-i-1), run_type='Refine number %s on %s (%s/%s)' % (self.nb_refine, subdir, nb_proc+1, len(subproc))) if os.path.exists(pjoin(self.me_dir,'error')): self.monitor(html=True) raise MadEventError('Error detected in dir %s: %s' % \ (Pdir, open(pjoin(self.me_dir,'error')).read())) - self.monitor(run_type='All job submitted for refine number %s' % + self.monitor(run_type='All job submitted for refine number %s' % self.nb_refine) - + self.update_status("Combining runs", level='parton') try: os.remove(pjoin(Pdir, 'combine_runs.log')) except Exception: pass - + bindir = pjoin(os.path.relpath(self.dirbin, pjoin(self.me_dir,'SubProcesses'))) combine_runs.CombineRuns(self.me_dir) - + #update html output cross, error = self.make_make_all_html_results() self.results.add_detail('cross', cross) self.results.add_detail('error', error) - - + + self.update_status('finish refine', 'parton', makehtml=False) devnull.close() def do_combine_events(self, line): - """Advanced commands: Launch combine events""" + """Advanced commands: Launch combine events""" if self.readonly: outdir = 'Events' @@ -6895,17 +6895,17 @@ def do_combine_events(self, line): self.banner.add_generation_info(self.results.current['cross'], self.run_card['nevents']) if not hasattr(self, 'random_orig'): self.random_orig = 0 self.banner.change_seed(self.random_orig) - - + + if not os.path.exists(pjoin(outdir, self.run_name)): os.mkdir(pjoin(outdir, self.run_name)) - self.banner.write(pjoin(outdir, self.run_name, + self.banner.write(pjoin(outdir, self.run_name, '%s_%s_banner.txt' % (self.run_name, tag))) - - get_wgt = lambda event: event.wgt + + get_wgt = lambda event: event.wgt AllEvent = lhe_parser.MultiEventFile() AllEvent.banner = self.banner - + partials = 0 # if too many file make some partial unweighting sum_xsec, sum_xerru, sum_axsec = 0,[],0 Gdirs = self.get_Gdir() @@ -6915,7 +6915,7 @@ def do_combine_events(self, line): if os.path.exists(pjoin(Gdir, 'events.lhe')): result = sum_html.OneResult('') result.read_results(pjoin(Gdir, 'results.dat')) - AllEvent.add(pjoin(Gdir, 'events.lhe'), + AllEvent.add(pjoin(Gdir, 'events.lhe'), result.get('xsec')*gscalefact[Gdir], result.get('xerru')*gscalefact[Gdir], result.get('axsec')*gscalefact[Gdir] @@ -6924,7 +6924,7 @@ def do_combine_events(self, line): sum_xsec += result.get('xsec')*gscalefact[Gdir] sum_xerru.append(result.get('xerru')*gscalefact[Gdir]) sum_axsec += result.get('axsec')*gscalefact[Gdir] - + if len(AllEvent) >= 80: #perform a partial unweighting AllEvent.unweight(pjoin(outdir, self.run_name, "partials%s.lhe.gz" % partials), get_wgt, log_level=5, trunc_error=1e-2, event_target=self.nb_event) @@ -6933,26 +6933,26 @@ def do_combine_events(self, line): AllEvent.add(pjoin(outdir, self.run_name, "partials%s.lhe.gz" % partials), sum_xsec, math.sqrt(sum(x**2 for x in sum_xerru)), - sum_axsec) + sum_axsec) partials +=1 - + if not hasattr(self,'proc_characteristic'): self.proc_characteristic = self.get_characteristics() - + self.banner.add_generation_info(sum_xsec, self.nb_event) nb_event = AllEvent.unweight(pjoin(outdir, self.run_name, "unweighted_events.lhe.gz"), get_wgt, trunc_error=1e-2, event_target=self.nb_event, log_level=logging.DEBUG, normalization=self.run_card['event_norm'], proc_charac=self.proc_characteristic) - - + + if partials: for i in range(partials): try: os.remove(pjoin(outdir, self.run_name, "partials%s.lhe.gz" % i)) except Exception: os.remove(pjoin(outdir, self.run_name, "partials%s.lhe" % i)) - + self.results.add_detail('nb_event', nb_event) self.banner.add_generation_info(sum_xsec, nb_event) if self.run_card['bias_module'].lower() not in ['dummy', 'none']: @@ -6961,7 +6961,7 @@ def do_combine_events(self, line): class MadLoopInitializer(object): """ A container class for the various methods for initializing MadLoop. It is - placed in MadEventInterface because it is used by Madevent for loop-induced + placed in MadEventInterface because it is used by Madevent for loop-induced simulations. """ @staticmethod @@ -6974,7 +6974,7 @@ def make_and_run(dir_name,checkRam=False): if os.path.isfile(pjoin(dir_name,'check')): os.remove(pjoin(dir_name,'check')) os.remove(pjoin(dir_name,'check_sa.o')) - os.remove(pjoin(dir_name,'loop_matrix.o')) + os.remove(pjoin(dir_name,'loop_matrix.o')) # Now run make devnull = open(os.devnull, 'w') start=time.time() @@ -6996,7 +6996,7 @@ def make_and_run(dir_name,checkRam=False): stdout=devnull, stderr=devnull, close_fds=True) try: ptimer.execute() - #poll as often as possible; otherwise the subprocess might + #poll as often as possible; otherwise the subprocess might # "sneak" in some extra memory usage while you aren't looking # Accuracy of .2 seconds is enough for the timing. while ptimer.poll(): @@ -7028,7 +7028,7 @@ def fix_PSPoint_in_check(dir_path, read_ps = True, npoints = 1, If mu_r > 0.0, then the renormalization constant value will be hardcoded directly in check_sa.f, if is is 0 it will be set to Sqrt(s) and if it is < 0.0 the value in the param_card.dat is used. - If the split_orders target (i.e. the target squared coupling orders for + If the split_orders target (i.e. the target squared coupling orders for the computation) is != -1, it will be changed in check_sa.f via the subroutine CALL SET_COUPLINGORDERS_TARGET(split_orders).""" @@ -7043,12 +7043,12 @@ def fix_PSPoint_in_check(dir_path, read_ps = True, npoints = 1, file_path = pjoin(directories[0],'check_sa.f') if not os.path.isfile(file_path): raise MadGraph5Error('Could not find the location of check_sa.f'+\ - ' from the specified path %s.'%str(file_path)) + ' from the specified path %s.'%str(file_path)) file = open(file_path, 'r') check_sa = file.read() file.close() - + file = open(file_path, 'w') check_sa = re.sub(r"READPS = \S+\)","READPS = %s)"%('.TRUE.' if read_ps \ else '.FALSE.'), check_sa) @@ -7064,42 +7064,42 @@ def fix_PSPoint_in_check(dir_path, read_ps = True, npoints = 1, (("%.17e"%mu_r).replace('e','d')),check_sa) elif mu_r < 0.0: check_sa = re.sub(r"MU_R=SQRTS","",check_sa) - + if split_orders > 0: check_sa = re.sub(r"SET_COUPLINGORDERS_TARGET\(-?\d+\)", - "SET_COUPLINGORDERS_TARGET(%d)"%split_orders,check_sa) - + "SET_COUPLINGORDERS_TARGET(%d)"%split_orders,check_sa) + file.write(check_sa) file.close() - @staticmethod + @staticmethod def run_initialization(run_dir=None, SubProc_dir=None, infos=None,\ req_files = ['HelFilter.dat','LoopFilter.dat'], attempts = [4,15]): - """ Run the initialization of the process in 'run_dir' with success + """ Run the initialization of the process in 'run_dir' with success characterized by the creation of the files req_files in this directory. The directory containing the driving source code 'check_sa.f'. - The list attempt gives the successive number of PS points the + The list attempt gives the successive number of PS points the initialization should be tried with before calling it failed. Returns the number of PS points which were necessary for the init. Notice at least run_dir or SubProc_dir must be provided. A negative attempt number given in input means that quadprec will be forced for initialization.""" - + # If the user does not want detailed info, then set the dictionary # to a dummy one. if infos is None: infos={} - + if SubProc_dir is None and run_dir is None: raise MadGraph5Error('At least one of [SubProc_dir,run_dir] must'+\ ' be provided in run_initialization.') - + # If the user does not specify where is check_sa.f, then it is assumed # to be one levels above run_dir if SubProc_dir is None: SubProc_dir = os.path.abspath(pjoin(run_dir,os.pardir)) - + if run_dir is None: directories =[ dir for dir in misc.glob('P[0-9]*', SubProc_dir) if os.path.isdir(dir) ] @@ -7109,7 +7109,7 @@ def run_initialization(run_dir=None, SubProc_dir=None, infos=None,\ raise MadGraph5Error('Could not find a valid running directory'+\ ' in %s.'%str(SubProc_dir)) - # Use the presence of the file born_matrix.f to decide if it is a + # Use the presence of the file born_matrix.f to decide if it is a # loop-induced process or not. It's not crucial, but just that because # of the dynamic adjustment of the ref scale used for deciding what are # the zero contributions, more points are neeeded for loop-induced. @@ -7128,9 +7128,9 @@ def run_initialization(run_dir=None, SubProc_dir=None, infos=None,\ raise MadGraph5Error('Could not find MadLoopParams.dat at %s.'\ %MLCardPath) else: - MLCard = banner_mod.MadLoopParam(MLCardPath) + MLCard = banner_mod.MadLoopParam(MLCardPath) MLCard_orig = banner_mod.MadLoopParam(MLCard) - + # Make sure that LoopFilter really is needed. if not MLCard['UseLoopFilter']: try: @@ -7153,11 +7153,11 @@ def need_init(): proc_prefix+fname)) for fname in my_req_files]) or \ not os.path.isfile(pjoin(run_dir,'check')) or \ not os.access(pjoin(run_dir,'check'), os.X_OK) - + # Check if this is a process without born by checking the presence of the # file born_matrix.f is_loop_induced = os.path.exists(pjoin(run_dir,'born_matrix.f')) - + # For loop induced processes, always attempt quadruple precision if # double precision attempts fail and the user didn't specify himself # quadruple precision initializations attempts @@ -7166,11 +7166,11 @@ def need_init(): use_quad_prec = 1 curr_attempt = 1 - MLCard.set('WriteOutFilters',True) - + MLCard.set('WriteOutFilters',True) + while to_attempt!=[] and need_init(): curr_attempt = to_attempt.pop() - # if the attempt is a negative number it means we must force + # if the attempt is a negative number it means we must force # quadruple precision at initialization time if curr_attempt < 0: use_quad_prec = -1 @@ -7183,11 +7183,11 @@ def need_init(): MLCard.set('ZeroThres',1e-9) # Plus one because the filter are written on the next PS point after curr_attempt = abs(curr_attempt+1) - MLCard.set('MaxAttempts',curr_attempt) + MLCard.set('MaxAttempts',curr_attempt) MLCard.write(pjoin(SubProc_dir,'MadLoopParams.dat')) # initialization is performed. - MadLoopInitializer.fix_PSPoint_in_check(run_dir, read_ps = False, + MadLoopInitializer.fix_PSPoint_in_check(run_dir, read_ps = False, npoints = curr_attempt) compile_time, run_time, ram_usage = \ MadLoopInitializer.make_and_run(run_dir) @@ -7200,7 +7200,7 @@ def need_init(): infos['Process_compilation']==None: infos['Process_compilation'] = compile_time infos['Initialization'] = run_time - + MLCard_orig.write(pjoin(SubProc_dir,'MadLoopParams.dat')) if need_init(): return None @@ -7219,8 +7219,8 @@ def need_init(ML_resources_path, proc_prefix, r_files): MLCardPath = pjoin(proc_dir,'SubProcesses','MadLoopParams.dat') if not os.path.isfile(MLCardPath): raise MadGraph5Error('Could not find MadLoopParams.dat at %s.'\ - %MLCardPath) - MLCard = banner_mod.MadLoopParam(MLCardPath) + %MLCardPath) + MLCard = banner_mod.MadLoopParam(MLCardPath) req_files = ['HelFilter.dat','LoopFilter.dat'] # Make sure that LoopFilter really is needed. @@ -7234,9 +7234,9 @@ def need_init(ML_resources_path, proc_prefix, r_files): req_files.remove('HelFilter.dat') except ValueError: pass - + for v_folder in glob.iglob(pjoin(proc_dir,'SubProcesses', - '%s*'%subproc_prefix)): + '%s*'%subproc_prefix)): # Make sure it is a valid MadLoop directory if not os.path.isdir(v_folder) or not os.path.isfile(\ pjoin(v_folder,'loop_matrix.f')): @@ -7247,7 +7247,7 @@ def need_init(ML_resources_path, proc_prefix, r_files): if need_init(pjoin(proc_dir,'SubProcesses','MadLoop5_resources'), proc_prefix, req_files): return True - + return False @staticmethod @@ -7265,7 +7265,7 @@ def init_MadLoop(proc_dir, n_PS=None, subproc_prefix='PV', MG_options=None, misc.compile(arg=['treatCardsLoopNoInit'], cwd=pjoin(proc_dir,'Source')) else: interface.do_treatcards('all --no_MadLoopInit') - + # First make sure that IREGI and CUTTOOLS are compiled if needed if os.path.exists(pjoin(proc_dir,'Source','CutTools')): misc.compile(arg=['libcuttools'],cwd=pjoin(proc_dir,'Source')) @@ -7273,8 +7273,8 @@ def init_MadLoop(proc_dir, n_PS=None, subproc_prefix='PV', MG_options=None, misc.compile(arg=['libiregi'],cwd=pjoin(proc_dir,'Source')) # Then make sure DHELAS and MODEL are compiled misc.compile(arg=['libmodel'],cwd=pjoin(proc_dir,'Source')) - misc.compile(arg=['libdhelas'],cwd=pjoin(proc_dir,'Source')) - + misc.compile(arg=['libdhelas'],cwd=pjoin(proc_dir,'Source')) + # Now initialize the MadLoop outputs logger.info('Initializing MadLoop loop-induced matrix elements '+\ '(this can take some time)...') @@ -7283,7 +7283,7 @@ def init_MadLoop(proc_dir, n_PS=None, subproc_prefix='PV', MG_options=None, if MG_options: if interface and hasattr(interface, 'cluster') and isinstance(interface.cluster, cluster.MultiCore): mcore = interface.cluster - else: + else: mcore = cluster.MultiCore(**MG_options) else: mcore = cluster.onecore @@ -7294,10 +7294,10 @@ def run_initialization_wrapper(run_dir, infos, attempts): run_dir=run_dir, infos=infos) else: n_PS = MadLoopInitializer.run_initialization( - run_dir=run_dir, infos=infos, attempts=attempts) + run_dir=run_dir, infos=infos, attempts=attempts) infos['nPS'] = n_PS return 0 - + def wait_monitoring(Idle, Running, Done): if Idle+Running+Done == 0: return @@ -7307,21 +7307,21 @@ def wait_monitoring(Idle, Running, Done): init_info = {} # List all virtual folders while making sure they are valid MadLoop folders VirtualFolders = [f for f in glob.iglob(pjoin(proc_dir,'SubProcesses', - '%s*'%subproc_prefix)) if (os.path.isdir(f) or + '%s*'%subproc_prefix)) if (os.path.isdir(f) or os.path.isfile(pjoin(f,'loop_matrix.f')))] logger.debug("Now Initializing MadLoop matrix element in %d folder%s:"%\ (len(VirtualFolders),'s' if len(VirtualFolders)>1 else '')) - logger.debug(', '.join("'%s'"%os.path.basename(v_folder) for v_folder in + logger.debug(', '.join("'%s'"%os.path.basename(v_folder) for v_folder in VirtualFolders)) for v_folder in VirtualFolders: init_info[v_folder] = {} - + # We try all multiples of n_PS from 1 to max_mult, first in DP and then # in QP before giving up, or use default values if n_PS is None. max_mult = 3 if n_PS is None: # Then use the default list of number of PS points to try - mcore.submit(run_initialization_wrapper, + mcore.submit(run_initialization_wrapper, [pjoin(v_folder), init_info[v_folder], None]) else: # Use specific set of PS points @@ -7348,8 +7348,8 @@ def wait_monitoring(Idle, Running, Done): '%d PS points (%s), in %.3g(compil.) + %.3g(init.) secs.'%( abs(init['nPS']),'DP' if init['nPS']>0 else 'QP', init['Process_compilation'],init['Initialization'])) - - logger.info('MadLoop initialization finished.') + + logger.info('MadLoop initialization finished.') AskforEditCard = common_run.AskforEditCard @@ -7364,16 +7364,16 @@ def wait_monitoring(Idle, Running, Done): import os import optparse - # Get the directory of the script real path (bin) - # and add it to the current PYTHONPATH + # Get the directory of the script real path (bin) + # and add it to the current PYTHONPATH #root_path = os.path.dirname(os.path.dirname(os.path.dirname(os.path.realpath( __file__ )))) sys.path.insert(0, root_path) - class MyOptParser(optparse.OptionParser): + class MyOptParser(optparse.OptionParser): class InvalidOption(Exception): pass def error(self, msg=''): raise MyOptParser.InvalidOption(msg) - # Write out nice usage message if called with -h or --help + # Write out nice usage message if called with -h or --help usage = "usage: %prog [options] [FILE] " parser = MyOptParser(usage=usage) parser.add_option("-l", "--logging", default='INFO', @@ -7384,7 +7384,7 @@ def error(self, msg=''): help='force to launch debug mode') parser_error = '' done = False - + for i in range(len(sys.argv)-1): try: (options, args) = parser.parse_args(sys.argv[1:len(sys.argv)-i]) @@ -7394,7 +7394,7 @@ def error(self, msg=''): else: args += sys.argv[len(sys.argv)-i:] if not done: - # raise correct error: + # raise correct error: try: (options, args) = parser.parse_args() except MyOptParser.InvalidOption as error: @@ -7407,8 +7407,8 @@ def error(self, msg=''): import subprocess import logging import logging.config - # Set logging level according to the logging level given by options - #logging.basicConfig(level=vars(logging)[options.logging]) + # Set logging level according to the logging level given by options + #logging.basicConfig(level=vars(logging)[options.logging]) import internal import internal.coloring_logging # internal.file = XXX/bin/internal/__init__.py @@ -7431,13 +7431,13 @@ def error(self, msg=''): raise pass - # Call the cmd interface main loop + # Call the cmd interface main loop try: if args: # a single command is provided if '--web' in args: - i = args.index('--web') - args.pop(i) + i = args.index('--web') + args.pop(i) cmd_line = MadEventCmd(me_dir, force_run=True) else: cmd_line = MadEventCmdShell(me_dir, force_run=True) @@ -7457,13 +7457,13 @@ def error(self, msg=''): pass - - - - - - - - + + + + + + + + diff --git a/epochX/cudacpp/gq_ttq.mad/bin/internal/run_plot b/epochX/cudacpp/gq_ttq.mad/bin/internal/run_plot deleted file mode 100755 index 7deee7ac88..0000000000 --- a/epochX/cudacpp/gq_ttq.mad/bin/internal/run_plot +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash -# -# This runs MadAnalysis on the unweighted_events.lhe -# -# Usage: run_plot run_name [madir [tddir]] -# where madir is the path to the MadAnalysis package - -main=`pwd` - -if [ "$1" != "" ] -then - run=$1 -else - echo "Usage: run_plot runname [MAdir [tddir]]" - exit -fi - -if [ "$2" != "" ] -then - MAdir=$main/$2 -else - MAdir=$main/../../MadAnalysis -fi - -if [ "$3" != "" ]; then - td=$main/$3 -else - td=$main/../../td -fi - -dirbin=$main/../bin - -if [[ $run != "" && -e ${run}_unweighted_events.lhe.gz ]];then - gunzip -c ${run}_unweighted_events.lhe.gz > unweighted_events.lhe -fi - -if [[ (-x $MAdir/plot_events) && (-e unweighted_events.lhe) && (-e ../Cards/plot_card.dat) ]]; then - echo "Creating Plots" - mkdir $run - cd $run - echo "../unweighted_events.lhe" > events.list - $dirbin/plot $MAdir $td > plot.log - cd .. - $dirbin/plot_page-pl $run parton - mv plots.html ${run}_plots.html -fi - diff --git a/epochX/cudacpp/gq_ttq.mad/bin/internal/run_plot_delphes b/epochX/cudacpp/gq_ttq.mad/bin/internal/run_plot_delphes deleted file mode 100755 index 975f410d0e..0000000000 --- a/epochX/cudacpp/gq_ttq.mad/bin/internal/run_plot_delphes +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/bash -# -# This runs MadAnalysis on the delphes_events.lhco -# -# Usage: run_plot run_name [madir [tddir]] -# where madir is the path to the MadAnalysis package - -main=`pwd` - -if [ "$1" != "" ] -then - run=$1 -else - echo "Usage: run_plot runname [MAdir [tddir]]" - exit -fi - -if [ "$2" != "" ] -then - MAdir=$main/$2 -else - MAdir=$main/../../MadAnalysis -fi - -if [ "$3" != "" ]; then - td=$main/$3 -else - td=$main/../../td -fi - -dirbin=$main/../bin - -if [[ $run != "" && -e ${run}_delphes_events.lhco.gz ]];then - gunzip -c ${run}_delphes_events.lhco.gz > delphes_events.lhco -fi - -if [[ (-x $MAdir/plot_events) && (-e delphes_events.lhco) && (-e ../Cards/plot_card.dat) ]]; then - echo "Creating Plots" - mkdir ${run}_delphes - cd ${run}_delphes - echo "../delphes_events.lhco" > events.list - $dirbin/plot $MAdir $td > plot.log - cd .. - $dirbin/plot_page-pl ${run}_delphes Delphes - mv plots.html ${run}_plots_delphes.html -fi diff --git a/epochX/cudacpp/gq_ttq.mad/bin/internal/run_plot_pgs b/epochX/cudacpp/gq_ttq.mad/bin/internal/run_plot_pgs deleted file mode 100755 index e7a36ef344..0000000000 --- a/epochX/cudacpp/gq_ttq.mad/bin/internal/run_plot_pgs +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash -# -# This runs MadAnalysis on the unweighted_events.lhe -# -# Usage: run_plot run_name [madir [tddir]] -# where madir is the path to the MadAnalysis package - -main=`pwd` - -if [ "$1" != "" ] -then - run=$1 -else - echo "Usage: run_plot runname [MAdir [tddir]]" - exit -fi - -if [ "$2" != "" ] -then - MAdir=$main/$2 -else - MAdir=$main/../../MadAnalysis -fi - -if [ "$3" != "" ]; then - td=$main/$3 -else - td=$main/../../td -fi - -dirbin=$main/../bin - -if [[ $run != "" && -e ${run}_pgs_events.lhco.gz ]];then - gunzip -c ${run}_pgs_events.lhco.gz > pgs_events.lhco -fi - -if [[ (-x $MAdir/plot_events) && (-e pgs_events.lhco) && (-e ../Cards/plot_card.dat) ]]; then - echo "Creating Plots" - mkdir ${run}_pgs - cd ${run}_pgs - echo "../pgs_events.lhco" > events.list - $dirbin/plot $MAdir $td > plot.log - cd .. - $dirbin/plot_page-pl ${run}_pgs PGS - mv plots.html ${run}_plots_pgs.html -fi - diff --git a/epochX/cudacpp/gq_ttq.mad/bin/internal/run_plot_pythia b/epochX/cudacpp/gq_ttq.mad/bin/internal/run_plot_pythia deleted file mode 100755 index 532bfb4b7b..0000000000 --- a/epochX/cudacpp/gq_ttq.mad/bin/internal/run_plot_pythia +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/bash -# -# This runs MadAnalysis on the unweighted_events.lhe -# -# Usage: run_plot run_name [madir [tddir]] -# where madir is the path to the MadAnalysis package - -main=`pwd` - -if [ "$1" != "" ] -then - run=$1 -else - echo "Usage: run_plot runname [MAdir [tddir]]" - exit -fi - -if [ "$2" != "" ] -then - MAdir=$main/$2 -else - MAdir=$main/../../MadAnalysis -fi - -if [ "$3" != "" ]; then - td=$main/$3 -else - td=$main/../../td -fi - -dirbin=$main/../bin/internal - -if [[ $run != "" && -e ${run}_pythia_events.lhe.gz ]];then - gunzip -c ${run}_pythia_events.lhe.gz > pythia_events.lhe -fi - -if [[ (-x $MAdir/plot_events) && (-e pythia_events.lhe) && (-e ../Cards/plot_card.dat) ]]; then - echo "Creating Plots" - mkdir ${run}_pythia - cd ${run}_pythia - echo "../pythia_events.lhe" > events.list - $dirbin/plot $MAdir $td > plot.log - cd .. - $dirbin/plot_page-pl ${run}_pythia Pythia - mv plots.html ${run}_plots_pythia.html - $dirbin/gen_crossxhtml-pl $run -else - echo "Not creating plots" -fi - diff --git a/epochX/cudacpp/gq_ttq.mad/src/Parameters_sm.cc b/epochX/cudacpp/gq_ttq.mad/src/Parameters_sm.cc index a9bc93ff98..c06dcbb252 100644 --- a/epochX/cudacpp/gq_ttq.mad/src/Parameters_sm.cc +++ b/epochX/cudacpp/gq_ttq.mad/src/Parameters_sm.cc @@ -111,8 +111,8 @@ Parameters_sm::setDependentParameters() // now computed event-by-event (running void Parameters_sm::setDependentCouplings() // now computed event-by-event (running alphas #373) { - GC_10 = -G; GC_11 = mdl_complexi * G; + GC_10 = -G; } */ @@ -195,7 +195,7 @@ void Parameters_sm::printDependentCouplings() // now computed event-by-event (running alphas #373) { std::cout << "sm model couplings dependent on event kinematics:" << std::endl; - std::cout << std::setw( 20 ) << "GC_10 = " << std::setiosflags( std::ios::scientific ) << std::setw( 10 ) << GC_10 << std::endl; std::cout << std::setw( 20 ) << "GC_11 = " << std::setiosflags( std::ios::scientific ) << std::setw( 10 ) << GC_11 << std::endl; + std::cout << std::setw( 20 ) << "GC_10 = " << std::setiosflags( std::ios::scientific ) << std::setw( 10 ) << GC_10 << std::endl; } */ diff --git a/epochX/cudacpp/gq_ttq.mad/src/Parameters_sm.h b/epochX/cudacpp/gq_ttq.mad/src/Parameters_sm.h index 932f123fea..a6eb185434 100644 --- a/epochX/cudacpp/gq_ttq.mad/src/Parameters_sm.h +++ b/epochX/cudacpp/gq_ttq.mad/src/Parameters_sm.h @@ -54,7 +54,7 @@ namespace mg5amcCpu //double mdl_sqrt__aS, G, mdl_G__exp__2; // now computed event-by-event (running alphas #373) // Model couplings dependent on aS - //cxsmpl GC_10, GC_11; // now computed event-by-event (running alphas #373) + //cxsmpl GC_11, GC_10; // now computed event-by-event (running alphas #373) // Set parameters that are unchanged during the run void setIndependentParameters( SLHAReader& slha ); @@ -194,8 +194,8 @@ namespace mg5amcCpu //constexpr double mdl_G__exp__2 = ( ( G ) * ( G ) ); // now computed event-by-event (running alphas #373) // Model couplings dependent on aS - //constexpr cxsmpl GC_10 = -G; // now computed event-by-event (running alphas #373) //constexpr cxsmpl GC_11 = mdl_complexi * G; // now computed event-by-event (running alphas #373) + //constexpr cxsmpl GC_10 = -G; // now computed event-by-event (running alphas #373) // Print parameters that are unchanged during the run void printIndependentParameters(); @@ -226,12 +226,12 @@ namespace mg5amcCpu namespace Parameters_sm_dependentCouplings { constexpr size_t ndcoup = 2; // #couplings that vary event by event because they depend on the running alphas QCD - constexpr size_t idcoup_GC_10 = 0; - constexpr size_t idcoup_GC_11 = 1; + constexpr size_t idcoup_GC_11 = 0; + constexpr size_t idcoup_GC_10 = 1; struct DependentCouplings_sv { - cxtype_sv GC_10; cxtype_sv GC_11; + cxtype_sv GC_10; }; #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-variable" // e.g. <> @@ -257,8 +257,8 @@ namespace mg5amcCpu //const fptype_sv G = 2. * mdl_sqrt__aS * constexpr_sqrt( M_PI ); const fptype_sv mdl_G__exp__2 = ( ( G ) * ( G ) ); // Model couplings dependent on aS - out.GC_10 = -G; out.GC_11 = cI * G; + out.GC_10 = -G; } // End SM implementation - no special handling of vectors of floats as in EFT (#439) return out; @@ -293,12 +293,12 @@ namespace mg5amcCpu using namespace Parameters_sm_dependentCouplings; const fptype_sv& gs_sv = G_ACCESS::kernelAccessConst( gs ); DependentCouplings_sv couplings_sv = computeDependentCouplings_fromG( gs_sv ); - fptype* GC_10s = C_ACCESS::idcoupAccessBuffer( couplings, idcoup_GC_10 ); fptype* GC_11s = C_ACCESS::idcoupAccessBuffer( couplings, idcoup_GC_11 ); - cxtype_sv_ref GC_10s_sv = C_ACCESS::kernelAccess( GC_10s ); + fptype* GC_10s = C_ACCESS::idcoupAccessBuffer( couplings, idcoup_GC_10 ); cxtype_sv_ref GC_11s_sv = C_ACCESS::kernelAccess( GC_11s ); - GC_10s_sv = couplings_sv.GC_10; + cxtype_sv_ref GC_10s_sv = C_ACCESS::kernelAccess( GC_10s ); GC_11s_sv = couplings_sv.GC_11; + GC_10s_sv = couplings_sv.GC_10; mgDebug( 1, __FUNCTION__ ); return; } diff --git a/epochX/cudacpp/gq_ttq.mad/src/cudacpp_src.mk b/epochX/cudacpp/gq_ttq.mad/src/cudacpp_src.mk index c757875347..b4e446bc45 100644 --- a/epochX/cudacpp/gq_ttq.mad/src/cudacpp_src.mk +++ b/epochX/cudacpp/gq_ttq.mad/src/cudacpp_src.mk @@ -1,12 +1,7 @@ # Copyright (C) 2020-2023 CERN and UCLouvain. # Licensed under the GNU Lesser General Public License (version 3 or later). # Created by: S. Roiser (Feb 2020) for the MG5aMC CUDACPP plugin. -# Further modified by: J. Teig, O. Mattelaer, S. Roiser, A. Valassi (2020-2023) for the MG5aMC CUDACPP plugin. - -#=== Determine the name of this makefile (https://ftp.gnu.org/old-gnu/Manuals/make-3.80/html_node/make_17.html) -#=== NB: assume that the same name (e.g. cudacpp.mk, Makefile...) is used in the Subprocess and src directories - -THISMK = $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)) +# Further modified by: S. Hageboeck, J. Teig, O. Mattelaer, S. Roiser, A. Valassi (2020-2023) for the MG5aMC CUDACPP plugin. #------------------------------------------------------------------------------- @@ -16,167 +11,24 @@ SHELL := /bin/bash #------------------------------------------------------------------------------- -#=== Configure common compiler flags for CUDA and C++ - -INCFLAGS = -I. -OPTFLAGS = -O3 # this ends up in CUFLAGS too (should it?), cannot add -Ofast or -ffast-math here - -#------------------------------------------------------------------------------- - #=== Configure the C++ compiler -CXXFLAGS = $(OPTFLAGS) -std=c++17 $(INCFLAGS) $(USE_NVTX) -fPIC -Wall -Wshadow -Wextra +include ../Source/make_opts + +MG_CXXFLAGS += -fPIC -I. $(USE_NVTX) ifeq ($(shell $(CXX) --version | grep ^nvc++),) -CXXFLAGS+= -ffast-math # see issue #117 +MG_CXXFLAGS += -ffast-math # see issue #117 endif -###CXXFLAGS+= -Ofast # performance is not different from --fast-math -###CXXFLAGS+= -g # FOR DEBUGGING ONLY # Note: AR, CXX and FC are implicitly defined if not set externally # See https://www.gnu.org/software/make/manual/html_node/Implicit-Variables.html ###RANLIB = ranlib -# Add -mmacosx-version-min=11.3 to avoid "ld: warning: object file was built for newer macOS version than being linked" -LDFLAGS = -ifneq ($(shell $(CXX) --version | egrep '^Apple clang'),) -CXXFLAGS += -mmacosx-version-min=11.3 -LDFLAGS += -mmacosx-version-min=11.3 -endif - -#------------------------------------------------------------------------------- - -#=== Configure the CUDA compiler (note: NVCC is already exported including ccache) - -###$(info NVCC=$(NVCC)) - -#------------------------------------------------------------------------------- - -#=== Configure ccache for C++ builds (note: NVCC is already exported including ccache) - -# Enable ccache if USECCACHE=1 -ifeq ($(USECCACHE)$(shell echo $(CXX) | grep ccache),1) - override CXX:=ccache $(CXX) -endif -#ifeq ($(USECCACHE)$(shell echo $(AR) | grep ccache),1) -# override AR:=ccache $(AR) -#endif - -#------------------------------------------------------------------------------- - -#=== Configure PowerPC-specific compiler flags for CUDA and C++ - -# Assuming uname is available, detect if architecture is PowerPC -UNAME_P := $(shell uname -p) - -# PowerPC-specific CXX compiler flags (being reviewed) -ifeq ($(UNAME_P),ppc64le) - CXXFLAGS+= -mcpu=power9 -mtune=power9 # gains ~2-3% both for none and sse4 - # Throughput references without the extra flags below: none=1.41-1.42E6, sse4=2.15-2.19E6 - ###CXXFLAGS+= -DNO_WARN_X86_INTRINSICS # no change - ###CXXFLAGS+= -fpeel-loops # no change - ###CXXFLAGS+= -funroll-loops # gains ~1% for none, loses ~1% for sse4 - ###CXXFLAGS+= -ftree-vectorize # no change - ###CXXFLAGS+= -flto # BUILD ERROR IF THIS ADDED IN SRC?! -else - ###AR=gcc-ar # needed by -flto - ###RANLIB=gcc-ranlib # needed by -flto - ###CXXFLAGS+= -flto # NB: build error from src/Makefile unless gcc-ar and gcc-ranlib are used - ######CXXFLAGS+= -fno-semantic-interposition # no benefit (neither alone, nor combined with -flto) -endif - -#------------------------------------------------------------------------------- - #=== Set the CUDA/C++ compiler flags appropriate to user-defined choices of AVX, FPTYPE, HELINL, HRDCOD, RNDGEN # Set the build flags appropriate to OMPFLAGS ###$(info OMPFLAGS=$(OMPFLAGS)) -CXXFLAGS += $(OMPFLAGS) - -# Set the build flags appropriate to each AVX choice (example: "make AVX=none") -# [NB MGONGPU_PVW512 is needed because "-mprefer-vector-width=256" is not exposed in a macro] -# [See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96476] -ifeq ($(NVCC),) - $(info AVX=$(AVX)) - ifeq ($(UNAME_P),ppc64le) - ifeq ($(AVX),sse4) - override AVXFLAGS = -D__SSE4_2__ # Power9 VSX with 128 width (VSR registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on PowerPC for the moment) - endif - else ifeq ($(UNAME_P),arm) - ifeq ($(AVX),sse4) - override AVXFLAGS = -D__SSE4_2__ # ARM NEON with 128 width (Q/quadword registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none' and 'sse4' are supported on ARM for the moment) - endif - else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 - ifeq ($(AVX),none) - override AVXFLAGS = -mno-sse3 # no SIMD - else ifeq ($(AVX),sse4) - override AVXFLAGS = -mno-avx # SSE4.2 with 128 width (xmm registers) - else ifeq ($(AVX),avx2) - override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(AVX),512y) - override AVXFLAGS = -march=skylake -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(AVX),512z) - override AVXFLAGS = -march=skylake -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) - else - $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) - endif - else - ifeq ($(AVX),none) - override AVXFLAGS = -march=x86-64 # no SIMD (see #588) - else ifeq ($(AVX),sse4) - override AVXFLAGS = -march=nehalem # SSE4.2 with 128 width (xmm registers) - else ifeq ($(AVX),avx2) - override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(AVX),512y) - override AVXFLAGS = -march=skylake-avx512 -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(AVX),512z) - override AVXFLAGS = -march=skylake-avx512 -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) - else ifneq ($(AVX),none) - $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) - endif - endif - # For the moment, use AVXFLAGS everywhere: eventually, use them only in encapsulated implementations? - CXXFLAGS+= $(AVXFLAGS) -endif - -# Set the build flags appropriate to each FPTYPE choice (example: "make FPTYPE=f") -###$(info FPTYPE=$(FPTYPE)) -ifeq ($(FPTYPE),d) - CXXFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_DOUBLE -else ifeq ($(FPTYPE),f) - CXXFLAGS += -DMGONGPU_FPTYPE_FLOAT -DMGONGPU_FPTYPE2_FLOAT -else ifeq ($(FPTYPE),m) - CXXFLAGS += -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_FPTYPE2_FLOAT -else - $(error Unknown FPTYPE='$(FPTYPE)': only 'd', 'f' and 'm' are supported) -endif - -# Set the build flags appropriate to each HELINL choice (example: "make HELINL=1") -###$(info HELINL=$(HELINL)) -ifeq ($(HELINL),1) - CXXFLAGS += -DMGONGPU_INLINE_HELAMPS -else ifneq ($(HELINL),0) - $(error Unknown HELINL='$(HELINL)': only '0' and '1' are supported) -endif - -# Set the build flags appropriate to each HRDCOD choice (example: "make HRDCOD=1") -###$(info HRDCOD=$(HRDCOD)) -ifeq ($(HRDCOD),1) - CXXFLAGS += -DMGONGPU_HARDCODE_PARAM -else ifneq ($(HRDCOD),0) - $(error Unknown HRDCOD='$(HRDCOD)': only '0' and '1' are supported) -endif - -# Set the build flags appropriate to each RNDGEN choice (example: "make RNDGEN=hasNoCurand") -###$(info RNDGEN=$(RNDGEN)) -ifeq ($(RNDGEN),hasNoCurand) - CXXFLAGS += -DMGONGPU_HAS_NO_CURAND -else ifneq ($(RNDGEN),hasCurand) - $(error Unknown RNDGEN='$(RNDGEN)': only 'hasCurand' and 'hasNoCurand' are supported) -endif +MG_CXXFLAGS += $(OMPFLAGS) #------------------------------------------------------------------------------- @@ -184,36 +36,18 @@ endif # Build directory "short" tag (defines target and path to the optional build directory) # (Rationale: keep directory names shorter, e.g. do not include random number generator choice) -ifneq ($(NVCC),) - override DIRTAG = cuda_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) -else - override DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) -endif +DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) # Build lockfile "full" tag (defines full specification of build options that cannot be intermixed) # (Rationale: avoid mixing of CUDA and no-CUDA environment builds with different random number generators) -ifneq ($(NVCC),) - override TAG = cuda_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) -else - override TAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) -endif +TAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) -# Build directory: current directory by default, or build.$(DIRTAG) if USEBUILDDIR==1 -###$(info Current directory is $(shell pwd)) -ifeq ($(USEBUILDDIR),1) - override BUILDDIR = build.$(DIRTAG) - override LIBDIRREL = ../lib/$(BUILDDIR) - ###$(info Building in BUILDDIR=$(BUILDDIR) for tag=$(TAG) (USEBUILDDIR=1 is set)) -else - override BUILDDIR = . - override LIBDIRREL = ../lib - ###$(info Building in BUILDDIR=$(BUILDDIR) for tag=$(TAG) (USEBUILDDIR is not set)) -endif -######$(info Building in BUILDDIR=$(BUILDDIR) for tag=$(TAG)) +# Build directory: +BUILDDIR := build.$(DIRTAG) +LIBDIRREL := ../lib/$(BUILDDIR) # Workaround for Mac #375 (I did not manage to fix rpath with @executable_path): use absolute paths for LIBDIR # (NB: this is quite ugly because it creates the directory if it does not exist - to avoid removing src by mistake) -UNAME_S := $(shell uname -s) ifeq ($(UNAME_S),Darwin) override LIBDIR = $(shell mkdir -p $(LIBDIRREL); cd $(LIBDIRREL); pwd) ifeq ($(wildcard $(LIBDIR)),) @@ -235,100 +69,41 @@ MG5AMC_COMMONLIB = mg5amc_common # First target (default goal) all.$(TAG): $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so -# Target (and build options): debug -debug: OPTFLAGS = -g -O0 -debug: all.$(TAG) - #------------------------------------------------------------------------------- # Generic target and build rules: objects from C++ compilation $(BUILDDIR)/%.o : %.cc *.h @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - $(CXX) $(CPPFLAGS) $(CXXFLAGS) -fPIC -c $< -o $@ + $(CXX) $(MG_CXXFLAGS) $(CXXFLAGS) -c $< -o $@ # Generic target and build rules: objects from CUDA compilation $(BUILDDIR)/%_cu.o : %.cc *.h @if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi - $(NVCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c -x cu $< -o $@ + $(NVCC) $(MG_NVCCFLAGS) $(NVCCFLAGS) -c -x cu $< -o $@ #------------------------------------------------------------------------------- cxx_objects=$(addprefix $(BUILDDIR)/, Parameters_sm.o read_slha.o) -ifneq ($(NVCC),) +ifeq ($(AVX),cuda) +COMPILER=$(NVCC) cu_objects=$(addprefix $(BUILDDIR)/, Parameters_sm_cu.o) +else +COMPILER=$(CXX) +cu_objects= endif # Target (and build rules): common (src) library -ifneq ($(NVCC),) $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so : $(cxx_objects) $(cu_objects) - @if [ ! -d $(LIBDIR) ]; then echo "mkdir -p $(LIBDIR)"; mkdir -p $(LIBDIR); fi - $(NVCC) -shared -o $@ $(cxx_objects) $(cu_objects) $(LDFLAGS) -else -$(LIBDIR)/lib$(MG5AMC_COMMONLIB).so : $(cxx_objects) - @if [ ! -d $(LIBDIR) ]; then echo "mkdir -p $(LIBDIR)"; mkdir -p $(LIBDIR); fi - $(CXX) -shared -o $@ $(cxx_objects) $(LDFLAGS) -endif + mkdir -p $(LIBDIR) + $(COMPILER) -shared -o $@ $(cxx_objects) $(cu_objects) $(MG_LDFLAGS) $(LDFLAGS) #------------------------------------------------------------------------------- # Target: clean the builds .PHONY: clean -BUILD_DIRS := $(wildcard build.*) -NUM_BUILD_DIRS := $(words $(BUILD_DIRS)) - clean: -ifeq ($(USEBUILDDIR),1) -ifeq ($(NUM_BUILD_DIRS),1) - $(info USEBUILDDIR=1, only one src build directory found.) - rm -rf ../lib/$(BUILD_DIRS) - rm -rf $(BUILD_DIRS) -else ifeq ($(NUM_BUILD_DIRS),0) - $(error USEBUILDDIR=1, but no src build directories are found.) -else - $(error Multiple src BUILDDIR's found! Use 'cleannone', 'cleansse4', 'cleanavx2', 'clean512y','clean512z', 'cleancuda' or 'cleanall'.) -endif -else - rm -f ../lib/lib$(MG5AMC_COMMONLIB).so - rm -f $(BUILDDIR)/*.o $(BUILDDIR)/*.exe -endif - -cleanall: - @echo - rm -f ../lib/lib$(MG5AMC_COMMONLIB).so - rm -f $(BUILDDIR)/*.o $(BUILDDIR)/*.exe - @echo - rm -rf ../lib/build.* - rm -rf build.* - -# Target: clean different builds - -cleannone: - rm -rf ../lib/build.none_* - rm -rf build.none_* - -cleansse4: - rm -rf ../lib/build.sse4_* - rm -rf build.sse4_* - -cleanavx2: - rm -rf ../lib/build.avx2_* - rm -rf build.avx2_* - -clean512y: - rm -rf ../lib/build.512y_* - rm -rf build.512y_* - -clean512z: - rm -rf ../lib/build.512z_* - rm -rf build.512z_* - -cleancuda: - rm -rf ../lib/build.cuda_* - rm -rf build.cuda_* - -cleandir: - rm -f ./*.o ./*.exe - rm -f ../lib/lib$(MG5AMC_COMMONLIB).so + $(RM) -f ../lib/build.*/*.so + $(RM) -rf build.* #------------------------------------------------------------------------------- diff --git a/epochX/cudacpp/gq_ttq.mad/src/mgOnGpuCxtypes.h b/epochX/cudacpp/gq_ttq.mad/src/mgOnGpuCxtypes.h index ca9a9f00c0..3290d314d6 100644 --- a/epochX/cudacpp/gq_ttq.mad/src/mgOnGpuCxtypes.h +++ b/epochX/cudacpp/gq_ttq.mad/src/mgOnGpuCxtypes.h @@ -21,10 +21,14 @@ // Complex type in cuda: thrust or cucomplex or cxsmpl #ifdef __CUDACC__ #if defined MGONGPU_CUCXTYPE_THRUST +#ifdef __CLANG__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" // for icpx2021/clang13 (https://stackoverflow.com/a/15864661) +#endif #include +#ifdef __CLANG__ #pragma clang diagnostic pop +#endif #elif defined MGONGPU_CUCXTYPE_CUCOMPLEX #include #elif not defined MGONGPU_CUCXTYPE_CXSMPL diff --git a/epochX/cudacpp/pp_tt012j.mad/CODEGEN_mad_pp_tt012j_log.txt b/epochX/cudacpp/pp_tt012j.mad/CODEGEN_mad_pp_tt012j_log.txt index e73dd42300..44f5de8e00 100644 --- a/epochX/cudacpp/pp_tt012j.mad/CODEGEN_mad_pp_tt012j_log.txt +++ b/epochX/cudacpp/pp_tt012j.mad/CODEGEN_mad_pp_tt012j_log.txt @@ -50,10 +50,9 @@ Please set the 'lhapdf' variable to the (absolute) /PATH/TO/lhapdf-config (inclu Note that you can still compile and run aMC@NLO with the built-in PDFs MG5_aMC> set lhapdf /PATH/TO/lhapdf-config -Using default text editor "vi". Set another one in ./input/mg5_configuration.txt Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt -No valid web browser found. Please set in ./input/mg5_configuration.txt -import /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j.mg +Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt +import /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j.mg The import format was not given, so we guess it as command set stdout_level DEBUG set output information to level: 10 @@ -61,7 +60,7 @@ set zerowidth_tchannel F define j = p INFO: load particles INFO: load vertices -DEBUG: model prefixing takes 0.0053882598876953125  +DEBUG: model prefixing takes 0.003490924835205078  INFO: Restrict model sm with file models/sm/restrict_default.dat . DEBUG: Simplifying conditional expressions  DEBUG: remove interactions: u s w+ at order: QED=1  @@ -172,7 +171,7 @@ INFO: Process u~ u > t t~ added to mirror process u u~ > t t~ INFO: Process c~ c > t t~ added to mirror process c c~ > t t~ INFO: Process d~ d > t t~ added to mirror process d d~ > t t~ INFO: Process s~ s > t t~ added to mirror process s s~ > t t~ -5 processes with 7 diagrams generated in 0.031 s +5 processes with 7 diagrams generated in 0.021 s Total: 5 processes with 7 diagrams add process p p > t t~ j @1 INFO: Checking for minimal orders which gives processes. @@ -212,7 +211,7 @@ INFO: Process d~ g > t t~ d~ added to mirror process g d~ > t t~ d~ INFO: Process d~ d > t t~ g added to mirror process d d~ > t t~ g INFO: Process s~ g > t t~ s~ added to mirror process g s~ > t t~ s~ INFO: Process s~ s > t t~ g added to mirror process s s~ > t t~ g -13 processes with 76 diagrams generated in 0.141 s +13 processes with 76 diagrams generated in 0.098 s Total: 18 processes with 83 diagrams add process p p > t t~ j j @2 INFO: Checking for minimal orders which gives processes. @@ -378,7 +377,7 @@ INFO: Process s~ u~ > t t~ u~ s~ added to mirror process u~ s~ > t t~ u~ s~ INFO: Process s~ c~ > t t~ c~ s~ added to mirror process c~ s~ > t t~ c~ s~ INFO: Process s~ d~ > t t~ d~ s~ added to mirror process d~ s~ > t t~ d~ s~ INFO: Crossed process found for s~ s~ > t t~ s~ s~, reuse diagrams. -65 processes with 1119 diagrams generated in 1.922 s +65 processes with 1119 diagrams generated in 1.271 s Total: 83 processes with 1202 diagrams output madevent ../TMPOUT/CODEGEN_mad_pp_tt012j --hel_recycling=False --vector_size=32 --me_exporter=standalone_cudacpp Load PLUGIN.CUDACPP_OUTPUT @@ -389,10 +388,10 @@ Load PLUGIN.CUDACPP_OUTPUT INFO: initialize a new directory: CODEGEN_mad_pp_tt012j INFO: remove old information in CODEGEN_mad_pp_tt012j DEBUG: Entering PLUGIN_ProcessExporter.copy_template (initialise the directory) [output.py at line 165]  -WARNING: File exists /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j  -INFO: Creating subdirectories in directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j -WARNING: File exists /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/Cards  -WARNING: File exists /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses  +WARNING: File exists /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j  +INFO: Creating subdirectories in directory /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j +WARNING: File exists /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/Cards  +WARNING: File exists /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses  INFO: Organizing processes into subprocess groups INFO: Generating Helas calls for process: g g > t t~ g g WEIGHTED<=4 @2 INFO: Processing color information for process: g g > t t~ g g @2 @@ -497,7 +496,7 @@ INFO: Combined process d d~ > t t~ WEIGHTED<=2 with process u u~ > t t~ WEIGHTED INFO: Combined process s s~ > t t~ WEIGHTED<=2 with process u u~ > t t~ WEIGHTED<=2 INFO: Creating files in directory P2_gg_ttxgg DEBUG: kwargs[prefix] = 0 [model_handling.py at line 1058]  -DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  +DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  INFO: Creating files in directory . FileWriter for ././CPPProcess.h FileWriter for ././CPPProcess.cc @@ -514,7 +513,7 @@ INFO: Generating Feynman diagrams for Process: g g > t t~ g g WEIGHTED<=4 @2 INFO: Finding symmetric diagrams for subprocess group gg_ttxgg INFO: Creating files in directory P2_gg_ttxuux DEBUG: kwargs[prefix] = 0 [model_handling.py at line 1058]  -DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  +DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  INFO: Creating files in directory . FileWriter for ././CPPProcess.h FileWriter for ././CPPProcess.cc @@ -531,7 +530,7 @@ INFO: Generating Feynman diagrams for Process: g g > t t~ u u~ WEIGHTED<=4 @2 INFO: Finding symmetric diagrams for subprocess group gg_ttxuux INFO: Creating files in directory P2_gu_ttxgu DEBUG: kwargs[prefix] = 0 [model_handling.py at line 1058]  -DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  +DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  INFO: Creating files in directory . FileWriter for ././CPPProcess.h FileWriter for ././CPPProcess.cc @@ -548,7 +547,7 @@ INFO: Generating Feynman diagrams for Process: g u > t t~ g u WEIGHTED<=4 @2 INFO: Finding symmetric diagrams for subprocess group gu_ttxgu INFO: Creating files in directory P2_gux_ttxgux DEBUG: kwargs[prefix] = 0 [model_handling.py at line 1058]  -DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  +DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  INFO: Creating files in directory . FileWriter for ././CPPProcess.h FileWriter for ././CPPProcess.cc @@ -565,7 +564,7 @@ INFO: Generating Feynman diagrams for Process: g u~ > t t~ g u~ WEIGHTED<=4 @2 INFO: Finding symmetric diagrams for subprocess group gux_ttxgux INFO: Creating files in directory P2_uux_ttxgg DEBUG: kwargs[prefix] = 0 [model_handling.py at line 1058]  -DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  +DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  INFO: Creating files in directory . FileWriter for ././CPPProcess.h FileWriter for ././CPPProcess.cc @@ -582,7 +581,7 @@ INFO: Generating Feynman diagrams for Process: u u~ > t t~ g g WEIGHTED<=4 @2 INFO: Finding symmetric diagrams for subprocess group uux_ttxgg INFO: Creating files in directory P1_gg_ttxg DEBUG: kwargs[prefix] = 0 [model_handling.py at line 1058]  -DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  +DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  INFO: Creating files in directory . FileWriter for ././CPPProcess.h FileWriter for ././CPPProcess.cc @@ -599,7 +598,7 @@ INFO: Generating Feynman diagrams for Process: g g > t t~ g WEIGHTED<=3 @1 INFO: Finding symmetric diagrams for subprocess group gg_ttxg INFO: Creating files in directory P2_uu_ttxuu DEBUG: kwargs[prefix] = 0 [model_handling.py at line 1058]  -DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  +DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  INFO: Creating files in directory . FileWriter for ././CPPProcess.h FileWriter for ././CPPProcess.cc @@ -616,7 +615,7 @@ INFO: Generating Feynman diagrams for Process: u u > t t~ u u WEIGHTED<=4 @2 INFO: Finding symmetric diagrams for subprocess group uu_ttxuu INFO: Creating files in directory P2_uux_ttxuux DEBUG: kwargs[prefix] = 0 [model_handling.py at line 1058]  -DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  +DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  INFO: Creating files in directory . FileWriter for ././CPPProcess.h FileWriter for ././CPPProcess.cc @@ -633,7 +632,7 @@ INFO: Generating Feynman diagrams for Process: u u~ > t t~ u u~ WEIGHTED<=4 @2 INFO: Finding symmetric diagrams for subprocess group uux_ttxuux INFO: Creating files in directory P2_uxux_ttxuxux DEBUG: kwargs[prefix] = 0 [model_handling.py at line 1058]  -DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  +DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  INFO: Creating files in directory . FileWriter for ././CPPProcess.h FileWriter for ././CPPProcess.cc @@ -650,7 +649,7 @@ INFO: Generating Feynman diagrams for Process: u~ u~ > t t~ u~ u~ WEIGHTED<=4 @2 INFO: Finding symmetric diagrams for subprocess group uxux_ttxuxux INFO: Creating files in directory P2_uc_ttxuc DEBUG: kwargs[prefix] = 0 [model_handling.py at line 1058]  -DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  +DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  INFO: Creating files in directory . FileWriter for ././CPPProcess.h FileWriter for ././CPPProcess.cc @@ -667,7 +666,7 @@ INFO: Generating Feynman diagrams for Process: u c > t t~ u c WEIGHTED<=4 @2 INFO: Finding symmetric diagrams for subprocess group uc_ttxuc INFO: Creating files in directory P2_uux_ttxccx DEBUG: kwargs[prefix] = 0 [model_handling.py at line 1058]  -DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  +DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  INFO: Creating files in directory . FileWriter for ././CPPProcess.h FileWriter for ././CPPProcess.cc @@ -684,7 +683,7 @@ INFO: Generating Feynman diagrams for Process: u u~ > t t~ c c~ WEIGHTED<=4 @2 INFO: Finding symmetric diagrams for subprocess group uux_ttxccx INFO: Creating files in directory P2_ucx_ttxucx DEBUG: kwargs[prefix] = 0 [model_handling.py at line 1058]  -DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  +DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  INFO: Creating files in directory . FileWriter for ././CPPProcess.h FileWriter for ././CPPProcess.cc @@ -701,7 +700,7 @@ INFO: Generating Feynman diagrams for Process: u c~ > t t~ u c~ WEIGHTED<=4 @2 INFO: Finding symmetric diagrams for subprocess group ucx_ttxucx INFO: Creating files in directory P2_uxcx_ttxuxcx DEBUG: kwargs[prefix] = 0 [model_handling.py at line 1058]  -DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  +DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  INFO: Creating files in directory . FileWriter for ././CPPProcess.h FileWriter for ././CPPProcess.cc @@ -718,7 +717,7 @@ INFO: Generating Feynman diagrams for Process: u~ c~ > t t~ u~ c~ WEIGHTED<=4 @2 INFO: Finding symmetric diagrams for subprocess group uxcx_ttxuxcx INFO: Creating files in directory P1_gu_ttxu DEBUG: kwargs[prefix] = 0 [model_handling.py at line 1058]  -DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  +DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  INFO: Creating files in directory . FileWriter for ././CPPProcess.h FileWriter for ././CPPProcess.cc @@ -735,7 +734,7 @@ INFO: Generating Feynman diagrams for Process: g u > t t~ u WEIGHTED<=3 @1 INFO: Finding symmetric diagrams for subprocess group gu_ttxu INFO: Creating files in directory P1_gux_ttxux DEBUG: kwargs[prefix] = 0 [model_handling.py at line 1058]  -DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  +DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  INFO: Creating files in directory . FileWriter for ././CPPProcess.h FileWriter for ././CPPProcess.cc @@ -752,7 +751,7 @@ INFO: Generating Feynman diagrams for Process: g u~ > t t~ u~ WEIGHTED<=3 @1 INFO: Finding symmetric diagrams for subprocess group gux_ttxux INFO: Creating files in directory P1_uux_ttxg DEBUG: kwargs[prefix] = 0 [model_handling.py at line 1058]  -DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  +DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  INFO: Creating files in directory . FileWriter for ././CPPProcess.h FileWriter for ././CPPProcess.cc @@ -769,7 +768,7 @@ INFO: Generating Feynman diagrams for Process: u u~ > t t~ g WEIGHTED<=3 @1 INFO: Finding symmetric diagrams for subprocess group uux_ttxg INFO: Creating files in directory P0_gg_ttx DEBUG: kwargs[prefix] = 0 [model_handling.py at line 1058]  -DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  +DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  INFO: Creating files in directory . FileWriter for ././CPPProcess.h FileWriter for ././CPPProcess.cc @@ -786,7 +785,7 @@ INFO: Generating Feynman diagrams for Process: g g > t t~ WEIGHTED<=2 INFO: Finding symmetric diagrams for subprocess group gg_ttx INFO: Creating files in directory P0_uux_ttx DEBUG: kwargs[prefix] = 0 [model_handling.py at line 1058]  -DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  +DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  INFO: Creating files in directory . FileWriter for ././CPPProcess.h FileWriter for ././CPPProcess.cc @@ -801,15 +800,15 @@ INFO: Created files CPPProcess.h and CPPProcess.cc in directory ./. DEBUG: vector, subproc_group,self.opt['vector_size'] =  32 True 32 [export_v4.py at line 1872]  INFO: Generating Feynman diagrams for Process: u u~ > t t~ WEIGHTED<=2 INFO: Finding symmetric diagrams for subprocess group uux_ttx -Generated helas calls for 18 subprocesses (372 diagrams) in 1.279 s -Wrote files for 810 helas calls in 3.193 s +Generated helas calls for 18 subprocesses (372 diagrams) in 0.884 s +Wrote files for 810 helas calls in 2.301 s ALOHA: aloha starts to compute helicity amplitudes ALOHA: aloha creates VVV1 routines ALOHA: aloha creates FFV1 routines ALOHA: aloha creates VVVV1 routines ALOHA: aloha creates VVVV3 routines ALOHA: aloha creates VVVV4 routines -ALOHA: aloha creates 5 routines in 0.331 s +ALOHA: aloha creates 5 routines in 0.229 s DEBUG: Entering PLUGIN_ProcessExporter.convert_model (create the model) [output.py at line 202]  ALOHA: aloha starts to compute helicity amplitudes ALOHA: aloha creates VVV1 routines @@ -817,7 +816,7 @@ ALOHA: aloha creates FFV1 routines ALOHA: aloha creates VVVV1 routines ALOHA: aloha creates VVVV3 routines ALOHA: aloha creates VVVV4 routines -ALOHA: aloha creates 10 routines in 0.310 s +ALOHA: aloha creates 10 routines in 0.201 s VVV1 VVV1 FFV1 @@ -830,207 +829,212 @@ ALOHA: aloha creates 10 routines in 0.310 s VVVV3 VVVV4 VVVV4 -FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/src/./HelAmps_sm.h -INFO: Created file HelAmps_sm.h in directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/src/. +FileWriter for /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/src/./HelAmps_sm.h +INFO: Created file HelAmps_sm.h in directory /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/src/. super_write_set_parameters_onlyfixMajorana (hardcoded=False) super_write_set_parameters_onlyfixMajorana (hardcoded=True) -FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/src/./Parameters_sm.h -FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/src/./Parameters_sm.cc +FileWriter for /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/src/./Parameters_sm.h +FileWriter for /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/src/./Parameters_sm.cc INFO: Created files Parameters_sm.h and Parameters_sm.cc in directory -INFO: /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/src/. and /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/src/. +INFO: /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/src/. and /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/src/. The option zerowidth_tchannel is modified [True] but will not be written in the configuration files. If you want to make this value the default for future session, you can run 'save options --all' -save configuration file to /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/Cards/me5_configuration.txt +save configuration file to /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/Cards/me5_configuration.txt INFO: Use Fortran compiler gfortran INFO: Use c++ compiler g++ INFO: Generate web pages -DEBUG: cd /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j; patch -p4 -i /data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common +DEBUG: cd /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j; patch -p4 -i /data/stephan/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common patching file Source/genps.inc +patching file Source/make_opts +Hunk #1 succeeded at 12 (offset -1 lines). +Hunk #2 succeeded at 70 (offset -1 lines). +Hunk #3 succeeded at 117 (offset -1 lines). +Hunk #4 succeeded at 128 (offset -1 lines). patching file Source/makefile patching file SubProcesses/makefile +patching file bin/internal/banner.py patching file bin/internal/gen_ximprove.py -Hunk #1 succeeded at 391 (offset 6 lines). patching file bin/internal/madevent_interface.py -DEBUG: cd /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses/P0_gg_ttx; patch -p6 -i /data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 +DEBUG: cd /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses/P0_gg_ttx; patch -p6 -i /data/stephan/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 patching file auto_dsig1.f patching file driver.f patching file matrix1.f -DEBUG: cd /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses/P0_uux_ttx; patch -p6 -i /data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 +Hunk #2 succeeded at 143 (offset -16 lines). +Hunk #3 succeeded at 221 (offset -16 lines). +Hunk #4 succeeded at 249 (offset -16 lines). +Hunk #5 succeeded at 294 (offset -16 lines). +DEBUG: cd /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses/P0_uux_ttx; patch -p6 -i /data/stephan/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 patching file auto_dsig1.f Hunk #1 succeeded at 539 (offset 55 lines). patching file driver.f patching file matrix1.f Hunk #1 succeeded at 75 (offset 3 lines). -Hunk #2 succeeded at 146 (offset 3 lines). -Hunk #3 succeeded at 224 (offset 3 lines). -Hunk #4 succeeded at 252 (offset 3 lines). -Hunk #5 succeeded at 297 (offset 3 lines). -DEBUG: cd /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses/P1_gg_ttxg; patch -p6 -i /data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 +Hunk #2 succeeded at 146 (offset -13 lines). +Hunk #3 succeeded at 224 (offset -13 lines). +Hunk #4 succeeded at 252 (offset -13 lines). +Hunk #5 succeeded at 297 (offset -13 lines). +DEBUG: cd /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses/P1_gg_ttxg; patch -p6 -i /data/stephan/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 patching file auto_dsig1.f patching file driver.f patching file matrix1.f -Hunk #2 succeeded at 159 (offset 16 lines). -Hunk #3 succeeded at 237 (offset 16 lines). -Hunk #4 succeeded at 265 (offset 16 lines). -Hunk #5 succeeded at 310 (offset 16 lines). -DEBUG: cd /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses/P1_gu_ttxu; patch -p6 -i /data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 +DEBUG: cd /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses/P1_gu_ttxu; patch -p6 -i /data/stephan/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 patching file auto_dsig1.f Hunk #1 succeeded at 528 (offset 44 lines). patching file driver.f patching file matrix1.f Hunk #1 succeeded at 75 (offset 3 lines). -Hunk #2 succeeded at 162 (offset 19 lines). -Hunk #3 succeeded at 240 (offset 19 lines). -Hunk #4 succeeded at 268 (offset 19 lines). -Hunk #5 succeeded at 313 (offset 19 lines). -DEBUG: cd /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses/P1_gux_ttxux; patch -p6 -i /data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 +Hunk #2 succeeded at 162 (offset 3 lines). +Hunk #3 succeeded at 240 (offset 3 lines). +Hunk #4 succeeded at 268 (offset 3 lines). +Hunk #5 succeeded at 313 (offset 3 lines). +DEBUG: cd /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses/P1_gux_ttxux; patch -p6 -i /data/stephan/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 patching file auto_dsig1.f Hunk #1 succeeded at 528 (offset 44 lines). patching file driver.f patching file matrix1.f Hunk #1 succeeded at 75 (offset 3 lines). -Hunk #2 succeeded at 162 (offset 19 lines). -Hunk #3 succeeded at 240 (offset 19 lines). -Hunk #4 succeeded at 268 (offset 19 lines). -Hunk #5 succeeded at 313 (offset 19 lines). -DEBUG: cd /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses/P1_uux_ttxg; patch -p6 -i /data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 +Hunk #2 succeeded at 162 (offset 3 lines). +Hunk #3 succeeded at 240 (offset 3 lines). +Hunk #4 succeeded at 268 (offset 3 lines). +Hunk #5 succeeded at 313 (offset 3 lines). +DEBUG: cd /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses/P1_uux_ttxg; patch -p6 -i /data/stephan/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 patching file auto_dsig1.f Hunk #1 succeeded at 539 (offset 55 lines). patching file driver.f patching file matrix1.f Hunk #1 succeeded at 75 (offset 3 lines). -Hunk #2 succeeded at 162 (offset 19 lines). -Hunk #3 succeeded at 240 (offset 19 lines). -Hunk #4 succeeded at 268 (offset 19 lines). -Hunk #5 succeeded at 313 (offset 19 lines). -DEBUG: cd /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses/P2_gg_ttxgg; patch -p6 -i /data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 +Hunk #2 succeeded at 162 (offset 3 lines). +Hunk #3 succeeded at 240 (offset 3 lines). +Hunk #4 succeeded at 268 (offset 3 lines). +Hunk #5 succeeded at 313 (offset 3 lines). +DEBUG: cd /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses/P2_gg_ttxgg; patch -p6 -i /data/stephan/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 patching file auto_dsig1.f patching file driver.f patching file matrix1.f -Hunk #2 succeeded at 191 (offset 48 lines). -Hunk #3 succeeded at 269 (offset 48 lines). -Hunk #4 succeeded at 297 (offset 48 lines). -Hunk #5 succeeded at 342 (offset 48 lines). -DEBUG: cd /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses/P2_gg_ttxuux; patch -p6 -i /data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 +Hunk #2 succeeded at 191 (offset 32 lines). +Hunk #3 succeeded at 269 (offset 32 lines). +Hunk #4 succeeded at 297 (offset 32 lines). +Hunk #5 succeeded at 342 (offset 32 lines). +DEBUG: cd /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses/P2_gg_ttxuux; patch -p6 -i /data/stephan/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 patching file auto_dsig1.f Hunk #1 succeeded at 517 (offset 33 lines). patching file driver.f patching file matrix1.f Hunk #1 succeeded at 75 (offset 3 lines). -Hunk #2 succeeded at 194 (offset 51 lines). -Hunk #3 succeeded at 272 (offset 51 lines). -Hunk #4 succeeded at 300 (offset 51 lines). -Hunk #5 succeeded at 345 (offset 51 lines). -DEBUG: cd /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses/P2_gu_ttxgu; patch -p6 -i /data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 +Hunk #2 succeeded at 194 (offset 35 lines). +Hunk #3 succeeded at 272 (offset 35 lines). +Hunk #4 succeeded at 300 (offset 35 lines). +Hunk #5 succeeded at 345 (offset 35 lines). +DEBUG: cd /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses/P2_gu_ttxgu; patch -p6 -i /data/stephan/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 patching file auto_dsig1.f Hunk #1 succeeded at 528 (offset 44 lines). patching file driver.f patching file matrix1.f Hunk #1 succeeded at 75 (offset 3 lines). -Hunk #2 succeeded at 194 (offset 51 lines). -Hunk #3 succeeded at 272 (offset 51 lines). -Hunk #4 succeeded at 300 (offset 51 lines). -Hunk #5 succeeded at 345 (offset 51 lines). -DEBUG: cd /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses/P2_gux_ttxgux; patch -p6 -i /data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 +Hunk #2 succeeded at 194 (offset 35 lines). +Hunk #3 succeeded at 272 (offset 35 lines). +Hunk #4 succeeded at 300 (offset 35 lines). +Hunk #5 succeeded at 345 (offset 35 lines). +DEBUG: cd /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses/P2_gux_ttxgux; patch -p6 -i /data/stephan/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 patching file auto_dsig1.f Hunk #1 succeeded at 528 (offset 44 lines). patching file driver.f patching file matrix1.f Hunk #1 succeeded at 75 (offset 3 lines). -Hunk #2 succeeded at 194 (offset 51 lines). -Hunk #3 succeeded at 272 (offset 51 lines). -Hunk #4 succeeded at 300 (offset 51 lines). -Hunk #5 succeeded at 345 (offset 51 lines). -DEBUG: cd /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses/P2_uc_ttxuc; patch -p6 -i /data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 +Hunk #2 succeeded at 194 (offset 35 lines). +Hunk #3 succeeded at 272 (offset 35 lines). +Hunk #4 succeeded at 300 (offset 35 lines). +Hunk #5 succeeded at 345 (offset 35 lines). +DEBUG: cd /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses/P2_uc_ttxuc; patch -p6 -i /data/stephan/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 patching file auto_dsig1.f Hunk #1 succeeded at 555 (offset 71 lines). patching file driver.f patching file matrix1.f Hunk #1 succeeded at 77 (offset 5 lines). -Hunk #2 succeeded at 196 (offset 53 lines). -Hunk #3 succeeded at 274 (offset 53 lines). -Hunk #4 succeeded at 302 (offset 53 lines). -Hunk #5 succeeded at 347 (offset 53 lines). -DEBUG: cd /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses/P2_ucx_ttxucx; patch -p6 -i /data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 +Hunk #2 succeeded at 196 (offset 37 lines). +Hunk #3 succeeded at 274 (offset 37 lines). +Hunk #4 succeeded at 302 (offset 37 lines). +Hunk #5 succeeded at 347 (offset 37 lines). +DEBUG: cd /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses/P2_ucx_ttxucx; patch -p6 -i /data/stephan/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 patching file auto_dsig1.f Hunk #1 succeeded at 627 (offset 143 lines). patching file driver.f patching file matrix1.f Hunk #1 succeeded at 83 (offset 11 lines). -Hunk #2 succeeded at 202 (offset 59 lines). -Hunk #3 succeeded at 280 (offset 59 lines). -Hunk #4 succeeded at 308 (offset 59 lines). -Hunk #5 succeeded at 353 (offset 59 lines). -DEBUG: cd /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses/P2_uu_ttxuu; patch -p6 -i /data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 +Hunk #2 succeeded at 202 (offset 43 lines). +Hunk #3 succeeded at 280 (offset 43 lines). +Hunk #4 succeeded at 308 (offset 43 lines). +Hunk #5 succeeded at 353 (offset 43 lines). +DEBUG: cd /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses/P2_uu_ttxuu; patch -p6 -i /data/stephan/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 patching file auto_dsig1.f Hunk #1 succeeded at 539 (offset 55 lines). patching file driver.f patching file matrix1.f Hunk #1 succeeded at 75 (offset 3 lines). -Hunk #2 succeeded at 194 (offset 51 lines). -Hunk #3 succeeded at 272 (offset 51 lines). -Hunk #4 succeeded at 300 (offset 51 lines). -Hunk #5 succeeded at 345 (offset 51 lines). -DEBUG: cd /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses/P2_uux_ttxccx; patch -p6 -i /data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 +Hunk #2 succeeded at 194 (offset 35 lines). +Hunk #3 succeeded at 272 (offset 35 lines). +Hunk #4 succeeded at 300 (offset 35 lines). +Hunk #5 succeeded at 345 (offset 35 lines). +DEBUG: cd /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses/P2_uux_ttxccx; patch -p6 -i /data/stephan/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 patching file auto_dsig1.f Hunk #1 succeeded at 627 (offset 143 lines). patching file driver.f patching file matrix1.f Hunk #1 succeeded at 83 (offset 11 lines). -Hunk #2 succeeded at 202 (offset 59 lines). -Hunk #3 succeeded at 280 (offset 59 lines). -Hunk #4 succeeded at 308 (offset 59 lines). -Hunk #5 succeeded at 353 (offset 59 lines). -DEBUG: cd /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses/P2_uux_ttxgg; patch -p6 -i /data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 +Hunk #2 succeeded at 202 (offset 43 lines). +Hunk #3 succeeded at 280 (offset 43 lines). +Hunk #4 succeeded at 308 (offset 43 lines). +Hunk #5 succeeded at 353 (offset 43 lines). +DEBUG: cd /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses/P2_uux_ttxgg; patch -p6 -i /data/stephan/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 patching file auto_dsig1.f Hunk #1 succeeded at 539 (offset 55 lines). patching file driver.f patching file matrix1.f Hunk #1 succeeded at 75 (offset 3 lines). -Hunk #2 succeeded at 194 (offset 51 lines). -Hunk #3 succeeded at 272 (offset 51 lines). -Hunk #4 succeeded at 300 (offset 51 lines). -Hunk #5 succeeded at 345 (offset 51 lines). -DEBUG: cd /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses/P2_uux_ttxuux; patch -p6 -i /data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 +Hunk #2 succeeded at 194 (offset 35 lines). +Hunk #3 succeeded at 272 (offset 35 lines). +Hunk #4 succeeded at 300 (offset 35 lines). +Hunk #5 succeeded at 345 (offset 35 lines). +DEBUG: cd /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses/P2_uux_ttxuux; patch -p6 -i /data/stephan/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 patching file auto_dsig1.f Hunk #1 succeeded at 539 (offset 55 lines). patching file driver.f patching file matrix1.f Hunk #1 succeeded at 75 (offset 3 lines). -Hunk #2 succeeded at 194 (offset 51 lines). -Hunk #3 succeeded at 272 (offset 51 lines). -Hunk #4 succeeded at 300 (offset 51 lines). -Hunk #5 succeeded at 345 (offset 51 lines). -DEBUG: cd /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses/P2_uxcx_ttxuxcx; patch -p6 -i /data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 +Hunk #2 succeeded at 194 (offset 35 lines). +Hunk #3 succeeded at 272 (offset 35 lines). +Hunk #4 succeeded at 300 (offset 35 lines). +Hunk #5 succeeded at 345 (offset 35 lines). +DEBUG: cd /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses/P2_uxcx_ttxuxcx; patch -p6 -i /data/stephan/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 patching file auto_dsig1.f Hunk #1 succeeded at 555 (offset 71 lines). patching file driver.f patching file matrix1.f Hunk #1 succeeded at 77 (offset 5 lines). -Hunk #2 succeeded at 196 (offset 53 lines). -Hunk #3 succeeded at 274 (offset 53 lines). -Hunk #4 succeeded at 302 (offset 53 lines). -Hunk #5 succeeded at 347 (offset 53 lines). -DEBUG: cd /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses/P2_uxux_ttxuxux; patch -p6 -i /data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 +Hunk #2 succeeded at 196 (offset 37 lines). +Hunk #3 succeeded at 274 (offset 37 lines). +Hunk #4 succeeded at 302 (offset 37 lines). +Hunk #5 succeeded at 347 (offset 37 lines). +DEBUG: cd /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses/P2_uxux_ttxuxux; patch -p6 -i /data/stephan/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 patching file auto_dsig1.f Hunk #1 succeeded at 539 (offset 55 lines). patching file driver.f patching file matrix1.f Hunk #1 succeeded at 75 (offset 3 lines). -Hunk #2 succeeded at 194 (offset 51 lines). -Hunk #3 succeeded at 272 (offset 51 lines). -Hunk #4 succeeded at 300 (offset 51 lines). -Hunk #5 succeeded at 345 (offset 51 lines). +Hunk #2 succeeded at 194 (offset 35 lines). +Hunk #3 succeeded at 272 (offset 35 lines). +Hunk #4 succeeded at 300 (offset 35 lines). +Hunk #5 succeeded at 345 (offset 35 lines). DEBUG: p.returncode =  0 [output.py at line 237]  -Output to directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j done. +Output to directory /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j done. Type "launch" to generate events from this process, or see -/data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/README +/data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/README Run "open index.html" to see more information about this process. quit -real 0m8.865s -user 0m8.358s -sys 0m0.477s +real 0m6.458s +user 0m5.839s +sys 0m0.626s ************************************************************ * * * W E L C O M E to * @@ -1051,12 +1055,11 @@ sys 0m0.477s * Type 'help' for in-line help. * * * ************************************************************ -INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/Cards/me5_configuration.txt -INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo/input/mg5_configuration.txt -INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/Cards/me5_configuration.txt -Using default text editor "vi". Set another one in ./input/mg5_configuration.txt +INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/Cards/me5_configuration.txt +INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/mg5amcnlo/input/mg5_configuration.txt +INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/Cards/me5_configuration.txt Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt -No valid web browser found. Please set in ./input/mg5_configuration.txt +Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt treatcards run quit INFO: @@ -1081,12 +1084,11 @@ launch in debug mode * Type 'help' for in-line help. * * * ************************************************************ -INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/Cards/me5_configuration.txt -INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo/input/mg5_configuration.txt -INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/Cards/me5_configuration.txt -Using default text editor "vi". Set another one in ./input/mg5_configuration.txt +INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/Cards/me5_configuration.txt +INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/mg5amcnlo/input/mg5_configuration.txt +INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/Cards/me5_configuration.txt Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt -No valid web browser found. Please set in ./input/mg5_configuration.txt +Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt treatcards param quit INFO: diff --git a/epochX/cudacpp/pp_tt012j.mad/Cards/delphes_trigger.dat b/epochX/cudacpp/pp_tt012j.mad/Cards/delphes_trigger.dat deleted file mode 100644 index 0aab0677aa..0000000000 --- a/epochX/cudacpp/pp_tt012j.mad/Cards/delphes_trigger.dat +++ /dev/null @@ -1,20 +0,0 @@ -#TRIGGER CARD # DO NOT REMOVE THIS IS A TAG! - -# list of trigger algorithms -# trigger_name >> algorithm #comments -Inclusive electron >> ELEC1_PT: '29' -di-electron >> ELEC1_PT: '17' && ELEC2_PT: '17' -Inclusive Photon >> GAMMA1_PT: '80' -di-Photon >> GAMMA1_PT: '40' && GAMMA2_PT: '25' -Inclusive muon >> MUON1_PT: '19' -di-muon >> MUON1_PT: '7' && MUON2_PT: '7' -Taujet and ETmis >> TAU1_PT: '86' && ETMIS_PT: '65' -di-Taujets >> TAU1_PT: '59' && TAU2_PT: '59' -Jet and ETmis >> JET1_PT: '180' && ETMIS_PT: '123' -Taujet and electron >> TAU1_PT: '45' && ELEC1_PT: '19' -Taujet and muon >> TAU1_PT: '40' && ELEC1_PT: '15' -Inclusive b-jet >> Bjet1_PT: '237' -Inclusive 1 jet >> JET1_PT: '657' -Inclusive 3 jets >> JET1_PT: '247' && JET2_PT: '247' && JET3_PT: '247' -Inclusive 4 jets >> JET1_PT: '113' && JET2_PT: '113' && JET3_PT: '113' && JET4_PT: '113' - diff --git a/epochX/cudacpp/pp_tt012j.mad/Cards/me5_configuration.txt b/epochX/cudacpp/pp_tt012j.mad/Cards/me5_configuration.txt index add22f0c9d..22f81b5926 100644 --- a/epochX/cudacpp/pp_tt012j.mad/Cards/me5_configuration.txt +++ b/epochX/cudacpp/pp_tt012j.mad/Cards/me5_configuration.txt @@ -2,11 +2,11 @@ # # Copyright (c) 2009 The MadGraph5_aMC@NLO Development team and Contributors # -# This file is a part of the MadGraph5_aMC@NLO project, an application which +# This file is a part of the MadGraph5_aMC@NLO project, an application which # automatically generates Feynman diagrams and matrix elements for arbitrary # high-energy processes in the Standard Model and beyond. # -# It is subject to the MadGraph5_aMC@NLO license which should accompany this +# It is subject to the MadGraph5_aMC@NLO license which should accompany this # distribution. # # For more information, visit madgraph.phys.ucl.ac.be and amcatnlo.web.cern.ch @@ -19,10 +19,10 @@ # Line starting with # should be uncommented if you want to modify the default # value. # Current value for all options can seen by typing "display options" -# after either ./bin/mg5_aMC or ./bin/madevent +# after either ./bin/mg5_aMC or ./bin/madevent # # You can place this files in ~/.mg5/mg5_configuration.txt if you have more than -# one version of MG5. +# one version of MG5. # ################################################################################ @@ -37,7 +37,7 @@ #! # fortran_compiler = None # f2py_compiler_py2 = None -# f2py_compiler_py3 = None +# f2py_compiler_py3 = None #! Prefered C++ Compiler @@ -74,7 +74,7 @@ #! steer the Pythia8 shower. #! Can be installed directly from within MG5_aMC with the following command: #! MG5_aMC> install mg5amc_py8_interface -# mg5amc_py8_interface_path = ./HEPTools/MG5aMC_PY8_interface +# mg5amc_py8_interface_path = ./HEPTools/MG5aMC_PY8_interface #! Herwig++/Herwig7 paths #! specify here the paths also to HepMC ant ThePEG @@ -83,9 +83,9 @@ #! WARNING: if Herwig7 has been installed with the bootstrap script, #! then please set thepeg_path and hepmc_path to the same value as #! hwpp_path -# hwpp_path = -# thepeg_path = -# hepmc_path = +# hwpp_path = +# thepeg_path = +# hepmc_path = #! Control when MG5 checks if he is up-to-date. #! Enter the number of day between two check (0 means never) @@ -93,7 +93,7 @@ # auto_update = 7 ################################################################################ -# INFO FOR MADEVENT / aMC@NLO +# INFO FOR MADEVENT / aMC@NLO ################################################################################ # If this file is in a MADEVENT Template. 'main directory' is the directory # containing the SubProcesses directory. Otherwise this is the MadGraph5_aMC@NLO main @@ -106,7 +106,7 @@ # notification_center = True -#! Default Running mode +#! Default Running mode #! 0: single machine/ 1: cluster / 2: multicore # run_mode = 2 @@ -115,7 +115,7 @@ #! And size of the cluster (some part of the code can adapt splitting accordingly) # cluster_type = condor # cluster_queue = madgraph -# cluster_size = 150 +# cluster_size = 150 #! Path to a node directory to avoid direct writing on the central disk #! Note that condor clusters avoid direct writing by default (therefore this @@ -126,8 +126,8 @@ #! to avoid to send them to the node (if cluster_temp_path is on True or condor) # cluster_local_path = None # example: /cvmfs/cp3.uclouvain.be/madgraph/ -#! Cluster waiting time for status update -#! First number is when the number of waiting job is higher than the number +#! Cluster waiting time for status update +#! First number is when the number of waiting job is higher than the number #! of running one (time in second). The second number is in the second case. # cluster_status_update = 600 30 @@ -176,11 +176,11 @@ #! If None: try to find one available on the system # fastjet = fastjet-config -#! eMELA-config +#! eMELA-config #! If None: try to find one available on the system # eMELA = eMELA-config -#! MCatNLO-utilities +#! MCatNLO-utilities #! relative path starting from main directory # MCatNLO-utilities_path = ./MCatNLO-utilities @@ -208,15 +208,15 @@ # samurai = None #! Set the Ninja directory containing ninja's library -#! if '' or None: disabling ninja -#! if ninja=/PATH/TO/ninja/lib: use that specific installation path for ninja +#! if '' or None: disabling ninja +#! if ninja=/PATH/TO/ninja/lib: use that specific installation path for ninja # ninja = ./HEPTools/lib #! Set the COLLIER directory containing COLLIER's library -#! if '' or None: disabling COLLIER +#! if '' or None: disabling COLLIER #! if ninja=/PATH/TO/ninja/lib: use that specific installation path for COLLIER # Note that it is necessary that you have generated a static library for COLLIER -# collier = ./HEPTools/lib +# collier = ./HEPTools/lib #! Set how MadLoop dependencies (such as CutTools) should be handled #! > external : ML5 places a link to the MG5_aMC-wide libraries @@ -234,7 +234,7 @@ # pineappl = pineappl -#mg5_path = /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo +#mg5_path = /data/stephan/madgraph4gpu/MG5aMC/mg5amcnlo # MG5 MAIN DIRECTORY -#mg5_path = /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo +#mg5_path = /data/stephan/madgraph4gpu/MG5aMC/mg5amcnlo diff --git a/epochX/cudacpp/pp_tt012j.mad/Cards/plot_card.dat b/epochX/cudacpp/pp_tt012j.mad/Cards/plot_card.dat deleted file mode 100644 index 9abe1cc05e..0000000000 --- a/epochX/cudacpp/pp_tt012j.mad/Cards/plot_card.dat +++ /dev/null @@ -1,203 +0,0 @@ -#************************************************************************** -# Card for MadAnalysis * -# * -# This file is used to set the classes and options for * -# the MadAnalysis program. * -# * -# * -# Some comments about the classes * -# 1. Plots are for classes of particles. * -# 2. Each particle is identified by its PDG code. * -# 3. Classes names are arbitrary (4 symbols max, no spaces allowed). * -# 4. Particles in the same class will be ordered with the 'ordering * -# function' in the file in_func.f. * -# 5. Classes can be added/edited/removed at will, and given a name * -# that will then appear in the plots. * -# 6. A particle can be put in one class only. Putting a particle in * -# two or more classes can lead to double counting of events. * -# 7. The class name mET is missing Energy and its name is reserved. * -# If used, it must be put last in the classes list below. * -# 8. If events contain particles not belonging to an existing class, * -# a new class will automatically be generated. * -# 9. For LHCO events the PDG code 21 is assigned to a jet (not * -# b-tagged), 5 to a b-tagged jet and 12 to missing ET. * -# * -# * -# Some comments about the cuts * -# 1. In the file kin_func.f the functions on which cuts can be applied * -# are given. * -# 2. The syntax is as follows. * -# etmin 1 3 30d0 * -# means that from the first class the Et of the first three particles * -# has to be greater than 30 GeV. * -# * -# etmissmin 20d0 * -# means that there must be at least 20 GeV of missing Et * -# * -# dRmin 2 1 4 3 3d0 * -# means that the distance between the first particle in the second * -# class and the first three particles in the fourth class has to be * -# greater than 3. * -# * -# ptmax 1 3 10d0 * -# ptmax 1 2 15d0 * -# means that the maximum pt of the third particle in the first class * -# has to smaller than 10 GeV, and the first two particles of this * -# class has to be smaller than 15 GeV * -# 3. The ordering of the particles within a class can be set with the * -# 'ordering function' in the file kin_func.f. * -# 4. For all the 'min' cuts, an event will be thrown away if the particle * -# does not exist. On the other hand, for all the 'max' cuts the cut * -# will be ignored if the particle does not exist * -# (Only dRij is an exception, for which it is the other way around) * -# * -# * -# * -# Some comments about the plotting options * -# 1. In the file kin_func.f the functions can be found that can be * -# plotted. (only for off-line usage) * -# 2. With the plotting options one can set the number of plots for each * -# of these functions. * -# 3. One has to specify for each variable which particles from which * -# class are used to set the plots. Syntax: * -# et 2 4 * -# means that the transverse energy of the first four particles in the * -# second class will be plotted. * -# mij 1 3 * -# mij 2 2 * -# means that for the invariant mass plots the first three particles * -# from the first class and the first two from the second class will be * -# used to plot the invariant mass of two particles. (10 plots) * -# 4. The ordering of the particles in a class can be set with the * -# 'ordering_function'. pt, e and et are valid functions. (For off-line * -# users X1, X2 and X3 can also be used, if defined in kin_func.f.) * -# 5. Max number of plots is 200. * -# * -# * -#************************************************************************** -# Put here your list of classes -#************************************************************************** -# Do NOT put spaces before class names! -# Begin Classes # This is TAG. Do not modify this line -jet 1 -1 2 -2 3 -3 4 -4 21 # Class number 1 -b 5 -5 # Class number 2 -mET 12 -12 14 -14 16 -16 1000022 # Missing ET class, name is reserved -# End Classes # This is TAG. Do not modify this line -#************************************************************************** -ordering_function pt # orders particles in classes according to their pt -normalization xsec # histogram normalization, xsec or number (e.g. 1) -#************************************************************************** -# Put here list of minimum pt for the classes -#************************************************************************** -# Begin Minpts # This is TAG. Do not modify this line -#1 30 -#2 40 -#3 10 -# End Minpts # This is TAG. Do not modify this line -#************************************************************************** -# Cuts on plotted events -#************************************************************************** -# Modify the cuts and remove the pounds/hashes to apply those cuts -# Do NOT put spaces at the beginning of the following lines! -# Begin Cuts # This is TAG. Do not modify this line -#etmin 2 2 40d0 -#etmin 2 1 80d0 -#etmin 1 3 20d0 -#etmax 2 1 200d0 -#ptmin 3 1 0d0 -#etmissmin 20d0 -#etmissmax 80d0 -#etamax 1 1 1d0 -#etamax 2 1 2d0 -#etamin 2 2 1.5d0 -#etamin 2 1 2d0 -#mijmax 2 1 2 2 200d0 -#mijmin 2 1 2 2 100d0 -#X1min 2 1 40d0 -#X1max 2 2 50d0 -#dRijmin 2 1 2 2 0.7d0 -#dRijmax 1 3 2 2 0.7d0 -#XY1min 2 2 2 2 20d0 -#XYZA2max 2 2 2 2 4 1 5 1 40d0 -# End Cuts # This is TAG. Do not modify this line -#************************************************************************** -# Put here the required plots -#************************************************************************** -# Do NOT put spaces at the beginning of the following lines! -# Begin PlotDefs # This is TAG. Do not modify this line -pt 1 4 # plot pt for the first four particles in class 1 -pt 2 4 # plot pt for the first four particles in class 2 -pt 3 4 # plot pt for the first four particles in class 3 -pt 4 4 # plot pt for the first four particles in class 4 -pt 5 4 # etc. -pt 6 4 -pt 7 4 -#e 2 2 -y 1 4 # plot rapidity for the first four particles in class 1 -y 2 4 -y 3 4 -y 4 4 -y 5 4 -y 6 4 -y 7 4 -#eta 2 2 # plot pseudo-rapidity for the first two part in the 2nd class -#mom 4 1 -#costh 5 1 -#phi 2 2 -#delta_eta 2 2 -#delta_eta 4 1 -mij 1 4 # use the first four particles in the 1st class to plot inv. mass -mij 2 2 # use the first two particles from the second class as well -mij 3 1 # etc. -mij 4 1 -mij 5 1 -mij 6 1 -mij 7 1 -#cosij 1 2 -#cosij 2 2 -#cosij 3 1 -#cosij 4 1 -dRij 1 4 -dRij 2 2 -dRij 3 1 -dRij 4 1 -dRij 5 1 -dRij 6 1 -dRij 7 1 -#delta_phi 2 2 -#delta_phi 4 1 -#delta_phi 5 1 -#X1 2 2 # plot X1 (defined in kin_func.f) -#XYZA1 2 2 -#XYZA1 4 1 -#XYZA1 5 1 -# End PlotDefs # This is TAG. Do not modify this line -#************************************************************************** -#************************************************************************** -# Put here the plot ranges -#************************************************************************** -# Do NOT put spaces at the beginning of the following lines! -# Begin PlotRange # This is TAG. Do not modify this line -pt 10 0 500 # bin size, min value, max value -et 10 0 500 # bin size, min value, max value -etmiss 10 0 500 # bin size, min value, max value -ht 20 0 1500 -y 0.2 -5 5 # etc. -mij 20 0 1500 -dRij 0.1 0 5 -#delta_phi 0.1 0 3.1 -#X1 1 0 100 -#XYZA1 1 0 100 -# End PlotRange # This is TAG. Do not modify this line -#************************************************************************** -#************************************************************************** -# Output for plots -#************************************************************************** -# Do NOT put spaces at the beginning of the following lines! -# Begin PlotOutput # This is TAG. Do not modify this line -output topdrawer # set to topdrawer or gnuplot -plot_decayed no # plot (and cut) dec. res.? (Only for LHE events) -# End PlotOutput # This is TAG. Do not modify this line -#************************************************************************** -# -# diff --git a/epochX/cudacpp/pp_tt012j.mad/Source/DHELAS/aloha_file.inc b/epochX/cudacpp/pp_tt012j.mad/Source/DHELAS/aloha_file.inc index 1b5bf6ec54..fa0f3d86f5 100644 --- a/epochX/cudacpp/pp_tt012j.mad/Source/DHELAS/aloha_file.inc +++ b/epochX/cudacpp/pp_tt012j.mad/Source/DHELAS/aloha_file.inc @@ -1 +1 @@ -ALOHARoutine = VVV1_0.o VVV1P0_1.o FFV1_0.o FFV1_1.o FFV1_2.o FFV1P0_3.o VVVV1_0.o VVVV1P0_1.o VVVV3_0.o VVVV3P0_1.o VVVV4_0.o VVVV4P0_1.o +ALOHARoutine = FFV1P0_3.o FFV1_0.o FFV1_1.o FFV1_2.o VVV1P0_1.o VVV1_0.o VVVV1P0_1.o VVVV1_0.o VVVV3P0_1.o VVVV3_0.o VVVV4P0_1.o VVVV4_0.o diff --git a/epochX/cudacpp/pp_tt012j.mad/Source/PDF/makefile b/epochX/cudacpp/pp_tt012j.mad/Source/PDF/makefile index 4e97287771..bcaf733469 100644 --- a/epochX/cudacpp/pp_tt012j.mad/Source/PDF/makefile +++ b/epochX/cudacpp/pp_tt012j.mad/Source/PDF/makefile @@ -68,7 +68,7 @@ reset: rm -rf $(TOREMOVE) -$(LIBDIR)$(LIBRARY): $(PDF) ../make_opts +$(LIBDIR)$(LIBRARY): $(PDF) rm $(LIBDIR)$(LIBRARY) || echo "recompilation of $(LIBDIR)$(LIBRARY)" $(call CREATELIB, $@, $^) diff --git a/epochX/cudacpp/pp_tt012j.mad/Source/make_opts b/epochX/cudacpp/pp_tt012j.mad/Source/make_opts index 3cacd17b0c..435bed0dc7 100644 --- a/epochX/cudacpp/pp_tt012j.mad/Source/make_opts +++ b/epochX/cudacpp/pp_tt012j.mad/Source/make_opts @@ -1,12 +1,12 @@ -GLOBAL_FLAG=-O3 -ffast-math DEFAULT_CPP_COMPILER=g++ -MACFLAG= -STDLIB=-lstdc++ -STDLIB_FLAG= -DEFAULT_F_COMPILER=gfortran DEFAULT_F2PY_COMPILER=f2py3 +DEFAULT_F_COMPILER=gfortran +GLOBAL_FLAG=-O3 -ffast-math +MACFLAG= MG5AMC_VERSION=SpecifiedByMG5aMCAtRunTime PYTHIA8_PATH=NotInstalled +STDLIB_FLAG= +STDLIB=-lstdc++ #end_of_make_opts_variables BIASLIBDIR=../../../lib/ @@ -199,14 +199,11 @@ ifneq ($(wildcard $(CUDA_HOME)/bin/nvcc),) MG_LDFLAGS += $(CURANDLIBFLAGS) MG_NVCCFLAGS += $(CUINC) $(USE_NVTX) $(CUARCHFLAGS) -else ifneq ($(origin REQUIRE_CUDA),undefined) - # If REQUIRE_CUDA is set but no cuda is found, stop here (e.g. for CI tests on GPU #443) - $(error No cuda installation found (set CUDA_HOME or make nvcc visible in PATH)) -else - # No cuda. Switch cuda compilation off and go to common random numbers in C++ - $(warning CUDA_HOME is not set or is invalid: export CUDA_HOME to compile with cuda) - override NVCC= - override CURANDLIBFLAGS= +else ifeq ($(AVX),cuda) + $(error nvcc is not visible in PATH. Either add it to PATH or export CUDA_HOME to compile with cuda) + ifeq ($(AVX),cuda) + $(error Cannot compile for cuda without NVCC) + endif endif # Set the host C++ compiler for nvcc via "-ccbin " @@ -257,7 +254,7 @@ MG_CXXFLAGS += -std=c++17 -mmacosx-version-min=11.3 endif ifeq ($(UNAME_S),Darwin) -MG_LDFLAGS += -lc++ # avoid 'Undefined symbols' for chrono::steady_clock on macOS (checked with otool -L libmg5amc_gg_ttx_cpp.so) +STDLIB = -lc++ # avoid 'Undefined symbols' for chrono::steady_clock on macOS (checked with otool -L libmg5amc_gg_ttx_cpp.so) MG_LDFLAGS += -mmacosx-version-min=11.3 # avoid "ld: warning: object file was built for newer macOS version than being linked" else MG_LDFLAGS += -Xlinker --no-relax # avoid 'failed to convert GOTPCREL relocation' error #458 (not supported on macOS) @@ -268,7 +265,7 @@ endif #=== C++/CUDA-specific flags for floating-point types and random generators to use # Set the default FPTYPE (floating point type) choice -FPTYPE ?= d +FPTYPE ?= m # Set the default HELINL (inline helicities?) choice HELINL ?= 0 diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/Bridge.h b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/Bridge.h index ad730fbcf7..c263f39a62 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/Bridge.h +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/Bridge.h @@ -266,7 +266,7 @@ namespace mg5amcCpu template void Bridge::set_gpugrid( const int gpublocks, const int gputhreads ) { - if( m_nevt != gpublocks * gputhreads ) + if( m_nevt != static_cast( gpublocks * gputhreads ) ) throw std::runtime_error( "Bridge: gpublocks*gputhreads must equal m_nevt in set_gpugrid" ); m_gpublocks = gpublocks; m_gputhreads = gputhreads; diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/MatrixElementKernels.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/MatrixElementKernels.cc index 74b5239ebf..2d6f27cd5d 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/MatrixElementKernels.cc +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/MatrixElementKernels.cc @@ -196,6 +196,9 @@ namespace mg5amcGpu void MatrixElementKernelDevice::setGrid( const int gpublocks, const int gputhreads ) { + m_gpublocks = gpublocks; + m_gputhreads = gputhreads; + if( m_gpublocks == 0 ) throw std::runtime_error( "MatrixElementKernelDevice: gpublocks must be > 0 in setGrid" ); if( m_gputhreads == 0 ) throw std::runtime_error( "MatrixElementKernelDevice: gputhreads must be > 0 in setGrid" ); if( this->nevt() != m_gpublocks * m_gputhreads ) throw std::runtime_error( "MatrixElementKernelDevice: nevt mismatch in setGrid" ); diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_gg_ttx/check_sa.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_gg_ttx/check_sa.cc index 3fbf0ffbee..07b7304b17 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_gg_ttx/check_sa.cc +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_gg_ttx/check_sa.cc @@ -81,7 +81,7 @@ namespace mg5amcGpu namespace mg5amcCpu #endif { - inline void FPEhandler( int sig ) + inline void FPEhandler( int ) { #ifdef __CUDACC__ std::cerr << "Floating Point Exception (GPU)" << std::endl; diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_gg_ttx/counters.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_gg_ttx/counters.cc index 3bbdec9387..cf875e8be4 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_gg_ttx/counters.cc +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_gg_ttx/counters.cc @@ -32,6 +32,8 @@ extern "C" case +0: return "CudaCpp"; break; default: assert( false ); break; } + + return 0; } static mgOnGpu::Timer program_timer; diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_uux_ttx/check_sa.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_uux_ttx/check_sa.cc index 3fbf0ffbee..07b7304b17 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_uux_ttx/check_sa.cc +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_uux_ttx/check_sa.cc @@ -81,7 +81,7 @@ namespace mg5amcGpu namespace mg5amcCpu #endif { - inline void FPEhandler( int sig ) + inline void FPEhandler( int ) { #ifdef __CUDACC__ std::cerr << "Floating Point Exception (GPU)" << std::endl; diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_uux_ttx/counters.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_uux_ttx/counters.cc index 3bbdec9387..cf875e8be4 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_uux_ttx/counters.cc +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_uux_ttx/counters.cc @@ -32,6 +32,8 @@ extern "C" case +0: return "CudaCpp"; break; default: assert( false ); break; } + + return 0; } static mgOnGpu::Timer program_timer; diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gg_ttxg/check_sa.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gg_ttxg/check_sa.cc index 3fbf0ffbee..07b7304b17 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gg_ttxg/check_sa.cc +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gg_ttxg/check_sa.cc @@ -81,7 +81,7 @@ namespace mg5amcGpu namespace mg5amcCpu #endif { - inline void FPEhandler( int sig ) + inline void FPEhandler( int ) { #ifdef __CUDACC__ std::cerr << "Floating Point Exception (GPU)" << std::endl; diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gg_ttxg/counters.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gg_ttxg/counters.cc index 3bbdec9387..cf875e8be4 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gg_ttxg/counters.cc +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gg_ttxg/counters.cc @@ -32,6 +32,8 @@ extern "C" case +0: return "CudaCpp"; break; default: assert( false ); break; } + + return 0; } static mgOnGpu::Timer program_timer; diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gu_ttxu/check_sa.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gu_ttxu/check_sa.cc index 3fbf0ffbee..07b7304b17 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gu_ttxu/check_sa.cc +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gu_ttxu/check_sa.cc @@ -81,7 +81,7 @@ namespace mg5amcGpu namespace mg5amcCpu #endif { - inline void FPEhandler( int sig ) + inline void FPEhandler( int ) { #ifdef __CUDACC__ std::cerr << "Floating Point Exception (GPU)" << std::endl; diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gu_ttxu/counters.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gu_ttxu/counters.cc index 3bbdec9387..cf875e8be4 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gu_ttxu/counters.cc +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gu_ttxu/counters.cc @@ -32,6 +32,8 @@ extern "C" case +0: return "CudaCpp"; break; default: assert( false ); break; } + + return 0; } static mgOnGpu::Timer program_timer; diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gux_ttxux/check_sa.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gux_ttxux/check_sa.cc index 3fbf0ffbee..07b7304b17 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gux_ttxux/check_sa.cc +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gux_ttxux/check_sa.cc @@ -81,7 +81,7 @@ namespace mg5amcGpu namespace mg5amcCpu #endif { - inline void FPEhandler( int sig ) + inline void FPEhandler( int ) { #ifdef __CUDACC__ std::cerr << "Floating Point Exception (GPU)" << std::endl; diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gux_ttxux/counters.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gux_ttxux/counters.cc index 3bbdec9387..cf875e8be4 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gux_ttxux/counters.cc +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gux_ttxux/counters.cc @@ -32,6 +32,8 @@ extern "C" case +0: return "CudaCpp"; break; default: assert( false ); break; } + + return 0; } static mgOnGpu::Timer program_timer; diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_uux_ttxg/check_sa.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_uux_ttxg/check_sa.cc index 3fbf0ffbee..07b7304b17 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_uux_ttxg/check_sa.cc +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_uux_ttxg/check_sa.cc @@ -81,7 +81,7 @@ namespace mg5amcGpu namespace mg5amcCpu #endif { - inline void FPEhandler( int sig ) + inline void FPEhandler( int ) { #ifdef __CUDACC__ std::cerr << "Floating Point Exception (GPU)" << std::endl; diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_uux_ttxg/counters.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_uux_ttxg/counters.cc index 3bbdec9387..cf875e8be4 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_uux_ttxg/counters.cc +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_uux_ttxg/counters.cc @@ -32,6 +32,8 @@ extern "C" case +0: return "CudaCpp"; break; default: assert( false ); break; } + + return 0; } static mgOnGpu::Timer program_timer; diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxgg/check_sa.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxgg/check_sa.cc index 3fbf0ffbee..07b7304b17 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxgg/check_sa.cc +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxgg/check_sa.cc @@ -81,7 +81,7 @@ namespace mg5amcGpu namespace mg5amcCpu #endif { - inline void FPEhandler( int sig ) + inline void FPEhandler( int ) { #ifdef __CUDACC__ std::cerr << "Floating Point Exception (GPU)" << std::endl; diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxgg/counters.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxgg/counters.cc index 3bbdec9387..cf875e8be4 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxgg/counters.cc +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxgg/counters.cc @@ -32,6 +32,8 @@ extern "C" case +0: return "CudaCpp"; break; default: assert( false ); break; } + + return 0; } static mgOnGpu::Timer program_timer; diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxuux/check_sa.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxuux/check_sa.cc index 3fbf0ffbee..07b7304b17 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxuux/check_sa.cc +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxuux/check_sa.cc @@ -81,7 +81,7 @@ namespace mg5amcGpu namespace mg5amcCpu #endif { - inline void FPEhandler( int sig ) + inline void FPEhandler( int ) { #ifdef __CUDACC__ std::cerr << "Floating Point Exception (GPU)" << std::endl; diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxuux/counters.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxuux/counters.cc index 3bbdec9387..cf875e8be4 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxuux/counters.cc +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxuux/counters.cc @@ -32,6 +32,8 @@ extern "C" case +0: return "CudaCpp"; break; default: assert( false ); break; } + + return 0; } static mgOnGpu::Timer program_timer; diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gu_ttxgu/check_sa.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gu_ttxgu/check_sa.cc index 3fbf0ffbee..07b7304b17 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gu_ttxgu/check_sa.cc +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gu_ttxgu/check_sa.cc @@ -81,7 +81,7 @@ namespace mg5amcGpu namespace mg5amcCpu #endif { - inline void FPEhandler( int sig ) + inline void FPEhandler( int ) { #ifdef __CUDACC__ std::cerr << "Floating Point Exception (GPU)" << std::endl; diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gu_ttxgu/counters.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gu_ttxgu/counters.cc index 3bbdec9387..cf875e8be4 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gu_ttxgu/counters.cc +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gu_ttxgu/counters.cc @@ -32,6 +32,8 @@ extern "C" case +0: return "CudaCpp"; break; default: assert( false ); break; } + + return 0; } static mgOnGpu::Timer program_timer; diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gux_ttxgux/check_sa.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gux_ttxgux/check_sa.cc index 3fbf0ffbee..07b7304b17 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gux_ttxgux/check_sa.cc +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gux_ttxgux/check_sa.cc @@ -81,7 +81,7 @@ namespace mg5amcGpu namespace mg5amcCpu #endif { - inline void FPEhandler( int sig ) + inline void FPEhandler( int ) { #ifdef __CUDACC__ std::cerr << "Floating Point Exception (GPU)" << std::endl; diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gux_ttxgux/counters.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gux_ttxgux/counters.cc index 3bbdec9387..cf875e8be4 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gux_ttxgux/counters.cc +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gux_ttxgux/counters.cc @@ -32,6 +32,8 @@ extern "C" case +0: return "CudaCpp"; break; default: assert( false ); break; } + + return 0; } static mgOnGpu::Timer program_timer; diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uc_ttxuc/check_sa.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uc_ttxuc/check_sa.cc index 3fbf0ffbee..07b7304b17 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uc_ttxuc/check_sa.cc +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uc_ttxuc/check_sa.cc @@ -81,7 +81,7 @@ namespace mg5amcGpu namespace mg5amcCpu #endif { - inline void FPEhandler( int sig ) + inline void FPEhandler( int ) { #ifdef __CUDACC__ std::cerr << "Floating Point Exception (GPU)" << std::endl; diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uc_ttxuc/counters.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uc_ttxuc/counters.cc index 3bbdec9387..cf875e8be4 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uc_ttxuc/counters.cc +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uc_ttxuc/counters.cc @@ -32,6 +32,8 @@ extern "C" case +0: return "CudaCpp"; break; default: assert( false ); break; } + + return 0; } static mgOnGpu::Timer program_timer; diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_ucx_ttxucx/check_sa.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_ucx_ttxucx/check_sa.cc index 3fbf0ffbee..07b7304b17 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_ucx_ttxucx/check_sa.cc +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_ucx_ttxucx/check_sa.cc @@ -81,7 +81,7 @@ namespace mg5amcGpu namespace mg5amcCpu #endif { - inline void FPEhandler( int sig ) + inline void FPEhandler( int ) { #ifdef __CUDACC__ std::cerr << "Floating Point Exception (GPU)" << std::endl; diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_ucx_ttxucx/counters.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_ucx_ttxucx/counters.cc index 3bbdec9387..cf875e8be4 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_ucx_ttxucx/counters.cc +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_ucx_ttxucx/counters.cc @@ -32,6 +32,8 @@ extern "C" case +0: return "CudaCpp"; break; default: assert( false ); break; } + + return 0; } static mgOnGpu::Timer program_timer; diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uu_ttxuu/check_sa.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uu_ttxuu/check_sa.cc index 3fbf0ffbee..07b7304b17 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uu_ttxuu/check_sa.cc +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uu_ttxuu/check_sa.cc @@ -81,7 +81,7 @@ namespace mg5amcGpu namespace mg5amcCpu #endif { - inline void FPEhandler( int sig ) + inline void FPEhandler( int ) { #ifdef __CUDACC__ std::cerr << "Floating Point Exception (GPU)" << std::endl; diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uu_ttxuu/counters.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uu_ttxuu/counters.cc index 3bbdec9387..cf875e8be4 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uu_ttxuu/counters.cc +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uu_ttxuu/counters.cc @@ -32,6 +32,8 @@ extern "C" case +0: return "CudaCpp"; break; default: assert( false ); break; } + + return 0; } static mgOnGpu::Timer program_timer; diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxccx/check_sa.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxccx/check_sa.cc index 3fbf0ffbee..07b7304b17 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxccx/check_sa.cc +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxccx/check_sa.cc @@ -81,7 +81,7 @@ namespace mg5amcGpu namespace mg5amcCpu #endif { - inline void FPEhandler( int sig ) + inline void FPEhandler( int ) { #ifdef __CUDACC__ std::cerr << "Floating Point Exception (GPU)" << std::endl; diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxccx/counters.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxccx/counters.cc index 3bbdec9387..cf875e8be4 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxccx/counters.cc +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxccx/counters.cc @@ -32,6 +32,8 @@ extern "C" case +0: return "CudaCpp"; break; default: assert( false ); break; } + + return 0; } static mgOnGpu::Timer program_timer; diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxgg/check_sa.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxgg/check_sa.cc index 3fbf0ffbee..07b7304b17 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxgg/check_sa.cc +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxgg/check_sa.cc @@ -81,7 +81,7 @@ namespace mg5amcGpu namespace mg5amcCpu #endif { - inline void FPEhandler( int sig ) + inline void FPEhandler( int ) { #ifdef __CUDACC__ std::cerr << "Floating Point Exception (GPU)" << std::endl; diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxgg/counters.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxgg/counters.cc index 3bbdec9387..cf875e8be4 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxgg/counters.cc +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxgg/counters.cc @@ -32,6 +32,8 @@ extern "C" case +0: return "CudaCpp"; break; default: assert( false ); break; } + + return 0; } static mgOnGpu::Timer program_timer; diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxuux/check_sa.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxuux/check_sa.cc index 3fbf0ffbee..07b7304b17 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxuux/check_sa.cc +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxuux/check_sa.cc @@ -81,7 +81,7 @@ namespace mg5amcGpu namespace mg5amcCpu #endif { - inline void FPEhandler( int sig ) + inline void FPEhandler( int ) { #ifdef __CUDACC__ std::cerr << "Floating Point Exception (GPU)" << std::endl; diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxuux/counters.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxuux/counters.cc index 3bbdec9387..cf875e8be4 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxuux/counters.cc +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxuux/counters.cc @@ -32,6 +32,8 @@ extern "C" case +0: return "CudaCpp"; break; default: assert( false ); break; } + + return 0; } static mgOnGpu::Timer program_timer; diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxcx_ttxuxcx/check_sa.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxcx_ttxuxcx/check_sa.cc index 3fbf0ffbee..07b7304b17 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxcx_ttxuxcx/check_sa.cc +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxcx_ttxuxcx/check_sa.cc @@ -81,7 +81,7 @@ namespace mg5amcGpu namespace mg5amcCpu #endif { - inline void FPEhandler( int sig ) + inline void FPEhandler( int ) { #ifdef __CUDACC__ std::cerr << "Floating Point Exception (GPU)" << std::endl; diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxcx_ttxuxcx/counters.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxcx_ttxuxcx/counters.cc index 3bbdec9387..cf875e8be4 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxcx_ttxuxcx/counters.cc +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxcx_ttxuxcx/counters.cc @@ -32,6 +32,8 @@ extern "C" case +0: return "CudaCpp"; break; default: assert( false ); break; } + + return 0; } static mgOnGpu::Timer program_timer; diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxux_ttxuxux/check_sa.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxux_ttxuxux/check_sa.cc index 3fbf0ffbee..07b7304b17 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxux_ttxuxux/check_sa.cc +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxux_ttxuxux/check_sa.cc @@ -81,7 +81,7 @@ namespace mg5amcGpu namespace mg5amcCpu #endif { - inline void FPEhandler( int sig ) + inline void FPEhandler( int ) { #ifdef __CUDACC__ std::cerr << "Floating Point Exception (GPU)" << std::endl; diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxux_ttxuxux/counters.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxux_ttxuxux/counters.cc index 3bbdec9387..cf875e8be4 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxux_ttxuxux/counters.cc +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxux_ttxuxux/counters.cc @@ -32,6 +32,8 @@ extern "C" case +0: return "CudaCpp"; break; default: assert( false ); break; } + + return 0; } static mgOnGpu::Timer program_timer; diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/cudacpp.mk b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/cudacpp.mk index eadffe1285..a522ddb335 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/cudacpp.mk @@ -1,7 +1,7 @@ # Copyright (C) 2020-2023 CERN and UCLouvain. # Licensed under the GNU Lesser General Public License (version 3 or later). # Created by: S. Roiser (Feb 2020) for the MG5aMC CUDACPP plugin. -# Further modified by: J. Teig, O. Mattelaer, S. Roiser, A. Valassi (2020-2023) for the MG5aMC CUDACPP plugin. +# Further modified by: S. Hageboeck, J. Teig, O. Mattelaer, S. Roiser, A. Valassi (2020-2023) for the MG5aMC CUDACPP plugin. # This makefile extends the Fortran makefile called "makefile" diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/makefile b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/makefile index 4cadaecf00..d229c1cf4d 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/makefile +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/makefile @@ -125,7 +125,7 @@ ifneq ($(UNAME_S),Darwin) LIBFLAGSRPATH := -Wl,-rpath,'$$ORIGIN:$$ORIGIN/../$(LIBDIR)/$(CUDACPP_BUILDDIR)' endif -.PHONY: madevent_fortran_link madevent_cuda_link madevent_cpp_link madevent_cppnone_link madevent_cppsse4_link madevent_cppavx2_link madevent_cpp512y_link madevent_cpp512z_link +.PHONY: madevent_fortran_link madevent_cuda_link madevent_cpp_link madevent_cppnone_link madevent_cppsse4_link madevent_cppavx2_link madevent_cpp512y_link madevent_cpp512z_link clean cleanall cleansrc madevent_fortran_link: $(PROG)_fortran rm -f $(PROG) @@ -221,13 +221,14 @@ ALL: cppall cuda clean: $(RM) *.o gensym $(PROG) $(PROG)_* $(RM) -rf build.*/*{.o,.so,.exe,.dylib,madevent_*} + @for dir in build.*; do if [ -z "$$(ls -A $${dir})" ]; then rm -r $${dir}; else echo "Not cleaning $${dir}; not empty"; fi; done -cleanall: +cleanall: cleansrc for PROCESS in ../P[0-9]*; do $(MAKE) -C $${PROCESS} clean; done # Clean one architecture-specific build clean%: - $(RM) -r build.$*_*/*{.o,.so,.exe,.dylib,madevent_*} + $(RM) -r build.$*_* # Clean common source directories (interferes with other P*) cleansrc: diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/runTest.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/runTest.cc index d4a760a71b..734235824a 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/runTest.cc +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/runTest.cc @@ -246,15 +246,15 @@ struct CUDATest : public CUDA_CPU_TestBase #define TESTID_CPU( s ) s##_CPU #define XTESTID_CPU( s ) TESTID_CPU( s ) #define MG_INSTANTIATE_TEST_SUITE_CPU( prefix, test_suite_name ) \ -INSTANTIATE_TEST_SUITE_P( prefix, \ - test_suite_name, \ - testing::Values( new CPUTest( MG_EPOCH_REFERENCE_FILE_NAME ) ) ); + INSTANTIATE_TEST_SUITE_P( prefix, \ + test_suite_name, \ + testing::Values( new CPUTest( MG_EPOCH_REFERENCE_FILE_NAME ) ) ); #define TESTID_GPU( s ) s##_GPU #define XTESTID_GPU( s ) TESTID_GPU( s ) #define MG_INSTANTIATE_TEST_SUITE_GPU( prefix, test_suite_name ) \ -INSTANTIATE_TEST_SUITE_P( prefix, \ - test_suite_name, \ - testing::Values( new CUDATest( MG_EPOCH_REFERENCE_FILE_NAME ) ) ); + INSTANTIATE_TEST_SUITE_P( prefix, \ + test_suite_name, \ + testing::Values( new CUDATest( MG_EPOCH_REFERENCE_FILE_NAME ) ) ); #ifdef __CUDACC__ MG_INSTANTIATE_TEST_SUITE_GPU( XTESTID_GPU( MG_EPOCH_PROCESS_ID ), MadgraphTest ); diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/testxxx.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/testxxx.cc index 3361fe5aa9..1d315f6d75 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/testxxx.cc +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/testxxx.cc @@ -40,7 +40,7 @@ namespace mg5amcCpu { std::string FPEhandlerMessage = "unknown"; int FPEhandlerIevt = -1; - inline void FPEhandler( int sig ) + inline void FPEhandler( int ) { #ifdef __CUDACC__ std::cerr << "Floating Point Exception (GPU): '" << FPEhandlerMessage << "' ievt=" << FPEhandlerIevt << std::endl; @@ -71,11 +71,10 @@ TEST( XTESTID( MG_EPOCH_PROCESS_ID ), testxxx ) constexpr bool testEvents = !dumpEvents; // run the test? constexpr fptype toleranceXXXs = std::is_same::value ? 1.E-15 : 1.E-5; // Constant parameters - constexpr int neppM = MemoryAccessMomenta::neppM; // AOSOA layout constexpr int np4 = CPPProcess::np4; - const int nevt = 32; // 12 independent tests plus 20 duplicates (need a multiple of 16 for floats '512z') - assert( nevt % neppM == 0 ); // nevt must be a multiple of neppM - assert( nevt % neppV == 0 ); // nevt must be a multiple of neppV + const int nevt = 32; // 12 independent tests plus 20 duplicates (need a multiple of 16 for floats '512z') + assert( nevt % MemoryAccessMomenta::neppM == 0 ); // nevt must be a multiple of neppM + assert( nevt % neppV == 0 ); // nevt must be a multiple of neppV // Fill in the input momenta #ifdef __CUDACC__ mg5amcGpu::PinnedHostBufferMomenta hstMomenta( nevt ); // AOSOA[npagM][npar=4][np4=4][neppM] diff --git a/epochX/cudacpp/pp_tt012j.mad/bin/internal/launch_plugin.py b/epochX/cudacpp/pp_tt012j.mad/bin/internal/launch_plugin.py index c93f03a01b..3b09713e12 100644 --- a/epochX/cudacpp/pp_tt012j.mad/bin/internal/launch_plugin.py +++ b/epochX/cudacpp/pp_tt012j.mad/bin/internal/launch_plugin.py @@ -29,7 +29,7 @@ def compile(self, *args, **opts): """ """ import multiprocessing if not self.options['nb_core'] or self.options['nb_core'] == 'None': - self.options['nb_core'] = multiprocessing.cpu_count() + self.options['nb_core'] = multiprocessing.cpu_count() if 'cwd' in opts and os.path.basename(opts['cwd']) == 'Source': path = pjoin(opts['cwd'], 'make_opts') avx_level = self.run_card['avx_level'] if self.run_card['avx_level'] != 'auto' else '' @@ -37,7 +37,7 @@ def compile(self, *args, **opts): {'FPTYPE': self.run_card['floating_type'], 'AVX': avx_level }) misc.sprint('FPTYPE checked') - if args and args[0][0] == 'madevent' and hasattr(self, 'run_card'): + if args and args[0][0] == 'madevent' and hasattr(self, 'run_card'): cudacpp_backend = self.run_card['cudacpp_backend'].upper() # the default value is defined in banner.py logger.info("Building madevent in madevent_interface.py with '%s' matrix elements"%cudacpp_backend) if cudacpp_backend == 'FORTRAN': diff --git a/epochX/cudacpp/pp_tt012j.mad/bin/internal/misc.py b/epochX/cudacpp/pp_tt012j.mad/bin/internal/misc.py index 3117df3fa0..91cd3e5c22 100755 --- a/epochX/cudacpp/pp_tt012j.mad/bin/internal/misc.py +++ b/epochX/cudacpp/pp_tt012j.mad/bin/internal/misc.py @@ -545,13 +545,12 @@ def compile(arg=[], cwd=None, mode='fortran', job_specs = True, nb_core=1 ,**opt ' but will not be able to compile an executable.') return p.returncode # Other reason - error_text = 'A compilation Error occurred ' + error_text = 'A compilation Error occurs ' if cwd: error_text += 'when trying to compile %s.\n' % cwd - error_text += 'The compilation failed with the following output message:\n' - error_text += ' '.join(cmd) + '\n' + error_text += 'The compilation fails with the following output message:\n' error_text += ' '+out.replace('\n','\n ')+'\n' - error_text += 'Please try to fix this compilation issue and retry.\n' + error_text += 'Please try to fix this compilations issue and retry.\n' error_text += 'Help might be found at https://answers.launchpad.net/mg5amcnlo.\n' error_text += 'If you think that this is a bug, you can report this at https://bugs.launchpad.net/mg5amcnlo' raise MadGraph5Error(error_text) diff --git a/epochX/cudacpp/pp_tt012j.mad/bin/internal/run_plot b/epochX/cudacpp/pp_tt012j.mad/bin/internal/run_plot deleted file mode 100755 index 7deee7ac88..0000000000 --- a/epochX/cudacpp/pp_tt012j.mad/bin/internal/run_plot +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash -# -# This runs MadAnalysis on the unweighted_events.lhe -# -# Usage: run_plot run_name [madir [tddir]] -# where madir is the path to the MadAnalysis package - -main=`pwd` - -if [ "$1" != "" ] -then - run=$1 -else - echo "Usage: run_plot runname [MAdir [tddir]]" - exit -fi - -if [ "$2" != "" ] -then - MAdir=$main/$2 -else - MAdir=$main/../../MadAnalysis -fi - -if [ "$3" != "" ]; then - td=$main/$3 -else - td=$main/../../td -fi - -dirbin=$main/../bin - -if [[ $run != "" && -e ${run}_unweighted_events.lhe.gz ]];then - gunzip -c ${run}_unweighted_events.lhe.gz > unweighted_events.lhe -fi - -if [[ (-x $MAdir/plot_events) && (-e unweighted_events.lhe) && (-e ../Cards/plot_card.dat) ]]; then - echo "Creating Plots" - mkdir $run - cd $run - echo "../unweighted_events.lhe" > events.list - $dirbin/plot $MAdir $td > plot.log - cd .. - $dirbin/plot_page-pl $run parton - mv plots.html ${run}_plots.html -fi - diff --git a/epochX/cudacpp/pp_tt012j.mad/bin/internal/run_plot_delphes b/epochX/cudacpp/pp_tt012j.mad/bin/internal/run_plot_delphes deleted file mode 100755 index 975f410d0e..0000000000 --- a/epochX/cudacpp/pp_tt012j.mad/bin/internal/run_plot_delphes +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/bash -# -# This runs MadAnalysis on the delphes_events.lhco -# -# Usage: run_plot run_name [madir [tddir]] -# where madir is the path to the MadAnalysis package - -main=`pwd` - -if [ "$1" != "" ] -then - run=$1 -else - echo "Usage: run_plot runname [MAdir [tddir]]" - exit -fi - -if [ "$2" != "" ] -then - MAdir=$main/$2 -else - MAdir=$main/../../MadAnalysis -fi - -if [ "$3" != "" ]; then - td=$main/$3 -else - td=$main/../../td -fi - -dirbin=$main/../bin - -if [[ $run != "" && -e ${run}_delphes_events.lhco.gz ]];then - gunzip -c ${run}_delphes_events.lhco.gz > delphes_events.lhco -fi - -if [[ (-x $MAdir/plot_events) && (-e delphes_events.lhco) && (-e ../Cards/plot_card.dat) ]]; then - echo "Creating Plots" - mkdir ${run}_delphes - cd ${run}_delphes - echo "../delphes_events.lhco" > events.list - $dirbin/plot $MAdir $td > plot.log - cd .. - $dirbin/plot_page-pl ${run}_delphes Delphes - mv plots.html ${run}_plots_delphes.html -fi diff --git a/epochX/cudacpp/pp_tt012j.mad/bin/internal/run_plot_pgs b/epochX/cudacpp/pp_tt012j.mad/bin/internal/run_plot_pgs deleted file mode 100755 index e7a36ef344..0000000000 --- a/epochX/cudacpp/pp_tt012j.mad/bin/internal/run_plot_pgs +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash -# -# This runs MadAnalysis on the unweighted_events.lhe -# -# Usage: run_plot run_name [madir [tddir]] -# where madir is the path to the MadAnalysis package - -main=`pwd` - -if [ "$1" != "" ] -then - run=$1 -else - echo "Usage: run_plot runname [MAdir [tddir]]" - exit -fi - -if [ "$2" != "" ] -then - MAdir=$main/$2 -else - MAdir=$main/../../MadAnalysis -fi - -if [ "$3" != "" ]; then - td=$main/$3 -else - td=$main/../../td -fi - -dirbin=$main/../bin - -if [[ $run != "" && -e ${run}_pgs_events.lhco.gz ]];then - gunzip -c ${run}_pgs_events.lhco.gz > pgs_events.lhco -fi - -if [[ (-x $MAdir/plot_events) && (-e pgs_events.lhco) && (-e ../Cards/plot_card.dat) ]]; then - echo "Creating Plots" - mkdir ${run}_pgs - cd ${run}_pgs - echo "../pgs_events.lhco" > events.list - $dirbin/plot $MAdir $td > plot.log - cd .. - $dirbin/plot_page-pl ${run}_pgs PGS - mv plots.html ${run}_plots_pgs.html -fi - diff --git a/epochX/cudacpp/pp_tt012j.mad/bin/internal/run_plot_pythia b/epochX/cudacpp/pp_tt012j.mad/bin/internal/run_plot_pythia deleted file mode 100755 index 532bfb4b7b..0000000000 --- a/epochX/cudacpp/pp_tt012j.mad/bin/internal/run_plot_pythia +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/bash -# -# This runs MadAnalysis on the unweighted_events.lhe -# -# Usage: run_plot run_name [madir [tddir]] -# where madir is the path to the MadAnalysis package - -main=`pwd` - -if [ "$1" != "" ] -then - run=$1 -else - echo "Usage: run_plot runname [MAdir [tddir]]" - exit -fi - -if [ "$2" != "" ] -then - MAdir=$main/$2 -else - MAdir=$main/../../MadAnalysis -fi - -if [ "$3" != "" ]; then - td=$main/$3 -else - td=$main/../../td -fi - -dirbin=$main/../bin/internal - -if [[ $run != "" && -e ${run}_pythia_events.lhe.gz ]];then - gunzip -c ${run}_pythia_events.lhe.gz > pythia_events.lhe -fi - -if [[ (-x $MAdir/plot_events) && (-e pythia_events.lhe) && (-e ../Cards/plot_card.dat) ]]; then - echo "Creating Plots" - mkdir ${run}_pythia - cd ${run}_pythia - echo "../pythia_events.lhe" > events.list - $dirbin/plot $MAdir $td > plot.log - cd .. - $dirbin/plot_page-pl ${run}_pythia Pythia - mv plots.html ${run}_plots_pythia.html - $dirbin/gen_crossxhtml-pl $run -else - echo "Not creating plots" -fi - diff --git a/epochX/cudacpp/pp_tt012j.mad/src/cudacpp_src.mk b/epochX/cudacpp/pp_tt012j.mad/src/cudacpp_src.mk index 9b1b2ea4bc..b4e446bc45 100644 --- a/epochX/cudacpp/pp_tt012j.mad/src/cudacpp_src.mk +++ b/epochX/cudacpp/pp_tt012j.mad/src/cudacpp_src.mk @@ -1,7 +1,7 @@ # Copyright (C) 2020-2023 CERN and UCLouvain. # Licensed under the GNU Lesser General Public License (version 3 or later). # Created by: S. Roiser (Feb 2020) for the MG5aMC CUDACPP plugin. -# Further modified by: J. Teig, O. Mattelaer, S. Roiser, A. Valassi (2020-2023) for the MG5aMC CUDACPP plugin. +# Further modified by: S. Hageboeck, J. Teig, O. Mattelaer, S. Roiser, A. Valassi (2020-2023) for the MG5aMC CUDACPP plugin. #------------------------------------------------------------------------------- From 5773856a9849c643b767f44819eaa00552215878 Mon Sep 17 00:00:00 2001 From: Stephan Hageboeck Date: Wed, 29 Nov 2023 15:22:57 +0100 Subject: [PATCH 109/129] [CI] Fix Mac build targets for CI runs. --- .github/workflows/c-cpp.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index de258f17c8..13f857e84c 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -44,11 +44,11 @@ jobs: steps: - uses: actions/checkout@v2 - name: make info - run: make AVX=none OMPFLAGS= FPTYPE=${{ matrix.precision }} -C ${{ matrix.folder }} info + run: make OMPFLAGS= FPTYPE=${{ matrix.precision }} -C ${{ matrix.folder }} info - name: make - run: make AVX=none OMPFLAGS= FPTYPE=${{ matrix.precision }} -C ${{ matrix.folder }} cpp + run: make OMPFLAGS= FPTYPE=${{ matrix.precision }} -C ${{ matrix.folder }} cppnative - name: make check - run: make AVX=none OMPFLAGS= FPTYPE=${{ matrix.precision }} -C ${{ matrix.folder }} check + run: make OMPFLAGS= FPTYPE=${{ matrix.precision }} -C ${{ matrix.folder }} check GPU: runs-on: self-hosted env: From 629d5aaacb0f1a3d853513879abd84ba53f5fa00 Mon Sep 17 00:00:00 2001 From: Stephan Hageboeck Date: Wed, 29 Nov 2023 15:29:09 +0100 Subject: [PATCH 110/129] [CI] Update debug build configuration. --- .github/workflows/c-cpp.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index 13f857e84c..9faf23538d 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -9,6 +9,10 @@ on: jobs: debug_builds: runs-on: ubuntu-latest + env: + FCFLAGS: -O0 -g + CXXFLAGS: -O0 -g + NVCCFLAGS: -O0 -g -G strategy: matrix: folder: [ epochX/cudacpp/ee_mumu.sa/SubProcesses/P1_Sigma_sm_epem_mupmum , epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_gg_ttx , epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxgg ] @@ -16,7 +20,9 @@ jobs: steps: - uses: actions/checkout@v2 - name: make debug - run: make -C ${{ matrix.folder }} debug + run: make -C ${{ matrix.folder }} + - name: make check + run: make -C ${{ matrix.folder }} check CPU: runs-on: ubuntu-latest strategy: From b3c44fe3add1ae80efc2984a9c57c046d2c89ef9 Mon Sep 17 00:00:00 2001 From: Andrea Valassi Date: Thu, 14 Dec 2023 08:22:42 +0100 Subject: [PATCH 111/129] [refactorMakefile] in codegen, protect runTest.cc with clang-format-off so that it can be digested by both clang13 and clang16 Using Stephan's previous commits, codegen (for ggtt.mad) was failing clang-format checks on itscrd90. Now codegen succeeds completely on itscrd90, but fails on itscrd80 because patchMad.sh fails. --- .../madgraph/iolibs/template_files/gpu/runTest.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/runTest.cc b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/runTest.cc index 734235824a..6c77775fb2 100644 --- a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/runTest.cc +++ b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/runTest.cc @@ -243,6 +243,7 @@ struct CUDATest : public CUDA_CPU_TestBase // Use two levels of macros to force stringification at the right level // (see https://gcc.gnu.org/onlinedocs/gcc-3.0.1/cpp_3.html#SEC17 and https://stackoverflow.com/a/3419392) // Google macro is in https://github.com/google/googletest/blob/master/googletest/include/gtest/gtest-param-test.h +/* clang-format off */ #define TESTID_CPU( s ) s##_CPU #define XTESTID_CPU( s ) TESTID_CPU( s ) #define MG_INSTANTIATE_TEST_SUITE_CPU( prefix, test_suite_name ) \ @@ -255,6 +256,7 @@ struct CUDATest : public CUDA_CPU_TestBase INSTANTIATE_TEST_SUITE_P( prefix, \ test_suite_name, \ testing::Values( new CUDATest( MG_EPOCH_REFERENCE_FILE_NAME ) ) ); +/* clang-format on */ #ifdef __CUDACC__ MG_INSTANTIATE_TEST_SUITE_GPU( XTESTID_GPU( MG_EPOCH_PROCESS_ID ), MadgraphTest ); From 8f6591043f9345a7c5ce386129a180ae04f23e87 Mon Sep 17 00:00:00 2001 From: Andrea Valassi Date: Thu, 14 Dec 2023 08:33:18 +0100 Subject: [PATCH 112/129] [refactorMakefile] attempt a fix for codegen on itscrd80: regenerate patch.P1 and patch.common from scratch (This is an old commit from 9 Dec but the description is still valid on 14 Dec) ./CODEGEN/generateAndCompare.sh gg_tt --mad --nopatch sed -i 's/DEFAULT_F2PY_COMPILER=f2py3.*/DEFAULT_F2PY_COMPILER=f2py3/' gg_tt.mad/Source/make_opts git diff --no-ext-diff -R gg_tt.mad/Source/make_opts gg_tt.mad/Source/makefile gg_tt.mad/Source/dsample.f gg_tt.mad/Source/genps.inc gg_tt.mad/SubProcesses/makefile > CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common git diff --no-ext-diff -R gg_tt.mad/bin/internal/banner.py gg_tt.mad/bin/internal/gen_ximprove.py gg_tt.mad/bin/internal/madevent_interface.py >> CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common git diff --no-ext-diff -R gg_tt.mad/SubProcesses/P1_gg_ttx/auto_dsig1.f gg_tt.mad/SubProcesses/P1_gg_ttx/driver.f gg_tt.mad/SubProcesses/P1_gg_ttx/matrix1.f > CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 git checkout gg_tt.mad NB1: In the instructions above, I changed the order of files in the patches (I moved make_opts to the beginning), to minimise differences in patch.common with respect to Stephan's. NB2: In another branch mch (PR #796) I had decided to remove make_opts from patch.common: this is clearly no longer possible now Before this commit, i.e. using Stephan's patch.P1 and patch.common, this was happening: - code generation succeeds on itscrd90, fails on itscrd80 (patchMad.sh fails on the latter) - executing './CODEGEN/generateAndCompare.sh gg_tt --mad --nopatch' shows that the only difference between itscrd80 and itscrd90 is f2py (f2py3.9 on the former, f2py on the latter) After this commit, however: - code generation fails on itscrd90 (patchMad.sh fails, probably due to f2py issues) --- .../MG5aMC_patches/PROD/patch.P1 | 32 +++++++++---------- .../MG5aMC_patches/PROD/patch.common | 8 ++--- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 index 2b919d0612..758271b077 100644 --- a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 +++ b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 @@ -1,7 +1,7 @@ -diff --git b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gg_ttxg/auto_dsig1.f a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gg_ttxg/auto_dsig1.f -index ddcb97ace..e28575ead 100644 ---- b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gg_ttxg/auto_dsig1.f -+++ a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gg_ttxg/auto_dsig1.f +diff --git b/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/auto_dsig1.f a/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/auto_dsig1.f +index 0a3dfa449..9346ee4c6 100644 +--- b/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/auto_dsig1.f ++++ a/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/auto_dsig1.f @@ -484,23 +484,140 @@ C INTEGER VECSIZE_USED @@ -156,10 +156,10 @@ index ddcb97ace..e28575ead 100644 RETURN END -diff --git b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gg_ttxg/driver.f a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gg_ttxg/driver.f -index 7fb7adb7b..6c314a957 100644 ---- b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gg_ttxg/driver.f -+++ a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gg_ttxg/driver.f +diff --git b/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/driver.f a/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/driver.f +index 71fbf2b25..0f1d199fc 100644 +--- b/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/driver.f ++++ a/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/driver.f @@ -74,13 +74,77 @@ c common/to_colstats/ncols,ncolflow,ncolalt,ic include 'coupl.inc' ! needs VECSIZE_MEMMAX (defined in vector.inc) @@ -283,10 +283,10 @@ index 7fb7adb7b..6c314a957 100644 if(fine.eq.0) fine=len(tempname) open(unit=lun,file=tempname,status='old',ERR=20) fopened=.true. -diff --git b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gg_ttxg/matrix1.f a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gg_ttxg/matrix1.f -index 12641a014..a885b7fde 100644 ---- b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gg_ttxg/matrix1.f -+++ a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gg_ttxg/matrix1.f +diff --git b/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/matrix1.f a/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/matrix1.f +index 817af778b..0c2ce6ec4 100644 +--- b/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/matrix1.f ++++ a/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/matrix1.f @@ -72,7 +72,10 @@ C DATA NB_FAIL /0/ DOUBLE PRECISION GET_CHANNEL_CUT @@ -299,7 +299,7 @@ index 12641a014..a885b7fde 100644 C C This is just to temporarily store the reference grid for C helicity of the DiscreteSampler so as to obtain its number of -@@ -156,6 +159,7 @@ C ---------- +@@ -140,6 +143,7 @@ C ---------- C BEGIN CODE C ---------- @@ -307,7 +307,7 @@ index 12641a014..a885b7fde 100644 NTRY(IMIRROR)=NTRY(IMIRROR)+1 THIS_NTRY(IMIRROR) = THIS_NTRY(IMIRROR)+1 DO I=1,NEXTERNAL -@@ -233,6 +237,17 @@ C ---------- +@@ -217,6 +221,17 @@ C ---------- ENDIF IF(NTRY(IMIRROR).EQ.MAXTRIES)THEN ISHEL(IMIRROR)=MIN(ISUM_HEL,NGOOD(IMIRROR)) @@ -325,7 +325,7 @@ index 12641a014..a885b7fde 100644 ENDIF ENDIF ELSE IF (.NOT.INIT_MODE) THEN ! random helicity -@@ -250,6 +265,7 @@ C Include the Jacobian from helicity sampling +@@ -234,6 +249,7 @@ C Include the Jacobian from helicity sampling IHEL = HEL_PICKED ELSE ANS = 1D0 @@ -333,7 +333,7 @@ index 12641a014..a885b7fde 100644 RETURN ENDIF IF (ANS.NE.0D0.AND.(ISUM_HEL .NE. 1.OR.HEL_PICKED.EQ.-1)) THEN -@@ -294,9 +310,8 @@ C Set right sign for ANS, based on sign of chosen helicity +@@ -278,9 +294,8 @@ C Set right sign for ANS, based on sign of chosen helicity ENDIF ENDIF ANS=ANS/DBLE(IDEN) diff --git a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common index 3b5eee9321..73a6c8c048 100644 --- a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common +++ b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common @@ -13,7 +13,7 @@ index a59181c70..af7e0efbc 100644 PARAMETER(MAXTRIES=25) C To pass the helicity configuration chosen by the DiscreteSampler to diff --git b/epochX/cudacpp/gg_tt.mad/Source/make_opts a/epochX/cudacpp/gg_tt.mad/Source/make_opts -index 2607530b7..7b87725d9 100644 +index 75d707231..e2d77891e 100644 --- b/epochX/cudacpp/gg_tt.mad/Source/make_opts +++ a/epochX/cudacpp/gg_tt.mad/Source/make_opts @@ -1,42 +1,65 @@ @@ -21,9 +21,9 @@ index 2607530b7..7b87725d9 100644 -MACFLAG= -STDLIB=-lstdc++ -STDLIB_FLAG= -+DEFAULT_F2PY_COMPILER=f2py3 - DEFAULT_F_COMPILER=gfortran --DEFAULT_F2PY_COMPILER=f2py3.9 +-DEFAULT_F_COMPILER=gfortran + DEFAULT_F2PY_COMPILER=f2py3 ++DEFAULT_F_COMPILER=gfortran +GLOBAL_FLAG=-O3 -ffast-math +MACFLAG= MG5AMC_VERSION=SpecifiedByMG5aMCAtRunTime From 5473f65c98816341794fc5fca07e676ff0224df4 Mon Sep 17 00:00:00 2001 From: Andrea Valassi Date: Thu, 14 Dec 2023 08:34:57 +0100 Subject: [PATCH 113/129] [refactorMakefile] attempt an additional fix for codegen: move back f2py patching from generateAndCompare.sh to patchMad.sh (This is an old commit from 9 Dec but the description is still valid on 14 Dec) Before this commit, codegen was now failing on itscrd90 as it was previously failing on itscrd80 (patchMd.sh fails due to f2py) After this commit, codegen is succeeding again on itscrd90, and now also on itscrd80 (fixing the issue in PR #753) --- epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/patchMad.sh | 1 + epochX/cudacpp/CODEGEN/generateAndCompare.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/patchMad.sh b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/patchMad.sh index 7edafba599..a4cd6df783 100755 --- a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/patchMad.sh +++ b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/patchMad.sh @@ -49,6 +49,7 @@ touch ${dir}/Events/.keep # this file should already be present (mg5amcnlo copie \cp -pr ${scrdir}/MG5aMC_patches/${dir_patches}/fbridge_common.inc ${dir}/SubProcesses # new file if [ "${patchlevel}" == "2" ]; then cd ${dir} + sed -i 's/DEFAULT_F2PY_COMPILER=f2py.*/DEFAULT_F2PY_COMPILER=f2py3/' Source/make_opts # AV back in patchMad.sh #753 echo "DEBUG: cd ${PWD}; patch -p4 -i ${scrdir}/MG5aMC_patches/${dir_patches}/patch.common" if ! patch -p4 -i ${scrdir}/MG5aMC_patches/${dir_patches}/patch.common; then status=1; fi \rm -f Source/*.orig diff --git a/epochX/cudacpp/CODEGEN/generateAndCompare.sh b/epochX/cudacpp/CODEGEN/generateAndCompare.sh index 77c9448ef6..81fa203f31 100755 --- a/epochX/cudacpp/CODEGEN/generateAndCompare.sh +++ b/epochX/cudacpp/CODEGEN/generateAndCompare.sh @@ -237,7 +237,7 @@ function codeGenAndDiff() \rm -rf ${outproc}/bin/internal/ufomodel/__pycache__ touch ${outproc}/HTML/.keep # new file if [ "${patchlevel}" == "2" ]; then - sed -i 's/DEFAULT_F2PY_COMPILER=f2py.*/DEFAULT_F2PY_COMPILER=f2py3/' ${outproc}/Source/make_opts + ###sed -i 's/DEFAULT_F2PY_COMPILER=f2py.*/DEFAULT_F2PY_COMPILER=f2py3/' ${outproc}/Source/make_opts # AV back in patchMad.sh #753 cat ${outproc}/Source/make_opts | sed '/#end/q' | head --lines=-1 | sort > ${outproc}/Source/make_opts.new cat ${outproc}/Source/make_opts | sed -n -e '/#end/,$p' >> ${outproc}/Source/make_opts.new \mv ${outproc}/Source/make_opts.new ${outproc}/Source/make_opts From 1961815823e64313ac9b14e01c5da7dc09723171 Mon Sep 17 00:00:00 2001 From: Andrea Valassi Date: Thu, 14 Dec 2023 09:04:32 +0100 Subject: [PATCH 114/129] [refactorMakefile] in codegen, attempt to fix the failure of patchMad.sh in the CI (it works instead in itscrd90/80): reorder make_opts_variables before patching - however codegen now fails on itscrd90 (This is an old commit from 9 Dec but the description is still valid on 14 Dec) --- epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/patchMad.sh | 6 +++++- epochX/cudacpp/CODEGEN/generateAndCompare.sh | 6 ------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/patchMad.sh b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/patchMad.sh index a4cd6df783..08a45c00b1 100755 --- a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/patchMad.sh +++ b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/patchMad.sh @@ -49,7 +49,11 @@ touch ${dir}/Events/.keep # this file should already be present (mg5amcnlo copie \cp -pr ${scrdir}/MG5aMC_patches/${dir_patches}/fbridge_common.inc ${dir}/SubProcesses # new file if [ "${patchlevel}" == "2" ]; then cd ${dir} - sed -i 's/DEFAULT_F2PY_COMPILER=f2py.*/DEFAULT_F2PY_COMPILER=f2py3/' Source/make_opts # AV back in patchMad.sh #753 + echo "DEBUG: standardise ${PWD}/Source/make_opts (fix f2py3 and sort make_opts_variables) before applying patch.common" # AV moved back hare in patchMad.sh from generateAndCompare.sh (see PR #753) + sed -i 's/DEFAULT_F2PY_COMPILER=f2py.*/DEFAULT_F2PY_COMPILER=f2py3/' Source/make_opts + cat Source/make_opts | sed '/#end/q' | head --lines=-1 | sort > Source/make_opts.new + cat Source/make_opts | sed -n -e '/#end/,$p' >> Source/make_opts.new + \mv Source/make_opts.new Source/make_opts echo "DEBUG: cd ${PWD}; patch -p4 -i ${scrdir}/MG5aMC_patches/${dir_patches}/patch.common" if ! patch -p4 -i ${scrdir}/MG5aMC_patches/${dir_patches}/patch.common; then status=1; fi \rm -f Source/*.orig diff --git a/epochX/cudacpp/CODEGEN/generateAndCompare.sh b/epochX/cudacpp/CODEGEN/generateAndCompare.sh index 81fa203f31..0d4a60cf5f 100755 --- a/epochX/cudacpp/CODEGEN/generateAndCompare.sh +++ b/epochX/cudacpp/CODEGEN/generateAndCompare.sh @@ -236,12 +236,6 @@ function codeGenAndDiff() \rm -rf ${outproc}/bin/internal/ufomodel/py3_model.pkl \rm -rf ${outproc}/bin/internal/ufomodel/__pycache__ touch ${outproc}/HTML/.keep # new file - if [ "${patchlevel}" == "2" ]; then - ###sed -i 's/DEFAULT_F2PY_COMPILER=f2py.*/DEFAULT_F2PY_COMPILER=f2py3/' ${outproc}/Source/make_opts # AV back in patchMad.sh #753 - cat ${outproc}/Source/make_opts | sed '/#end/q' | head --lines=-1 | sort > ${outproc}/Source/make_opts.new - cat ${outproc}/Source/make_opts | sed -n -e '/#end/,$p' >> ${outproc}/Source/make_opts.new - \mv ${outproc}/Source/make_opts.new ${outproc}/Source/make_opts - fi fi popd >& /dev/null # Choose which directory must be copied (for gridpack generation: untar and modify the gridpack) From 9b7062a0060201702341fe99bdb2d7747f76d613 Mon Sep 17 00:00:00 2001 From: Andrea Valassi Date: Thu, 14 Dec 2023 09:06:34 +0100 Subject: [PATCH 115/129] [refactorMakefile] attempt a fix for patchMad.sh failure on itscrd90: keep the special handling of make_opts also in --nopatch mode (and will regenerate patch.common) (This is an old commit from 9 Dec but the description is still valid on 14 Dec) --- .../CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/patchMad.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/patchMad.sh b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/patchMad.sh index 08a45c00b1..e67cd6e1fb 100755 --- a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/patchMad.sh +++ b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/patchMad.sh @@ -47,19 +47,19 @@ if [ "${patchlevel}" == "0" ]; then exit $status; fi # (1) Process-independent patches touch ${dir}/Events/.keep # this file should already be present (mg5amcnlo copies it from Template/LO/Events/.keep) \cp -pr ${scrdir}/MG5aMC_patches/${dir_patches}/fbridge_common.inc ${dir}/SubProcesses # new file +cd ${dir} +echo "DEBUG: standardise ${PWD}/Source/make_opts (fix f2py3 and sort make_opts_variables) before applying patch.common" # AV moved back hare in patchMad.sh from generateAndCompare.sh (see PR #753) +sed -i 's/DEFAULT_F2PY_COMPILER=f2py.*/DEFAULT_F2PY_COMPILER=f2py3/' Source/make_opts +cat Source/make_opts | sed '/#end/q' | head --lines=-1 | sort > Source/make_opts.new +cat Source/make_opts | sed -n -e '/#end/,$p' >> Source/make_opts.new +\mv Source/make_opts.new Source/make_opts if [ "${patchlevel}" == "2" ]; then - cd ${dir} - echo "DEBUG: standardise ${PWD}/Source/make_opts (fix f2py3 and sort make_opts_variables) before applying patch.common" # AV moved back hare in patchMad.sh from generateAndCompare.sh (see PR #753) - sed -i 's/DEFAULT_F2PY_COMPILER=f2py.*/DEFAULT_F2PY_COMPILER=f2py3/' Source/make_opts - cat Source/make_opts | sed '/#end/q' | head --lines=-1 | sort > Source/make_opts.new - cat Source/make_opts | sed -n -e '/#end/,$p' >> Source/make_opts.new - \mv Source/make_opts.new Source/make_opts echo "DEBUG: cd ${PWD}; patch -p4 -i ${scrdir}/MG5aMC_patches/${dir_patches}/patch.common" if ! patch -p4 -i ${scrdir}/MG5aMC_patches/${dir_patches}/patch.common; then status=1; fi \rm -f Source/*.orig \rm -f bin/internal/*.orig - cd - > /dev/null fi +cd - > /dev/null for p1dir in ${dir}/SubProcesses/P*; do cd $p1dir ln -sf ../fbridge_common.inc . # new file From 0ce8accac9c8f52fe487bd1c52886318096cffaf Mon Sep 17 00:00:00 2001 From: Andrea Valassi Date: Thu, 14 Dec 2023 09:09:06 +0100 Subject: [PATCH 116/129] [refactorMakefile] in codegen regenerate patch.common (This is an old commit from 9 Dec but the description is still valid on 14 Dec - patch.common is regenerated on 14 Dec anyway) ./CODEGEN/generateAndCompare.sh gg_tt --mad --nopatch sed -i 's/DEFAULT_F2PY_COMPILER=f2py3.*/DEFAULT_F2PY_COMPILER=f2py3/' gg_tt.mad/Source/make_opts git diff --no-ext-diff -R gg_tt.mad/Source/make_opts gg_tt.mad/Source/makefile gg_tt.mad/Source/dsample.f gg_tt.mad/Source/genps.inc gg_tt.mad/SubProcesses/makefile > CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common git diff --no-ext-diff -R gg_tt.mad/bin/internal/banner.py gg_tt.mad/bin/internal/gen_ximprove.py gg_tt.mad/bin/internal/madevent_interface.py >> CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common git diff --no-ext-diff -R gg_tt.mad/SubProcesses/P1_gg_ttx/auto_dsig1.f gg_tt.mad/SubProcesses/P1_gg_ttx/driver.f gg_tt.mad/SubProcesses/P1_gg_ttx/matrix1.f > CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 git checkout gg_tt.mad Now code generation succeeds again on itscrd90 and also on itscrd80 - and is expected to succeed also in the CI --- .../MG5aMC_patches/PROD/patch.common | 20 ++++++------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common index 73a6c8c048..ff4b7ff3ac 100644 --- a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common +++ b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common @@ -13,26 +13,18 @@ index a59181c70..af7e0efbc 100644 PARAMETER(MAXTRIES=25) C To pass the helicity configuration chosen by the DiscreteSampler to diff --git b/epochX/cudacpp/gg_tt.mad/Source/make_opts a/epochX/cudacpp/gg_tt.mad/Source/make_opts -index 75d707231..e2d77891e 100644 +index d7dafe3d6..435bed0dc 100644 --- b/epochX/cudacpp/gg_tt.mad/Source/make_opts +++ a/epochX/cudacpp/gg_tt.mad/Source/make_opts -@@ -1,42 +1,65 @@ +@@ -1,6 +1,7 @@ DEFAULT_CPP_COMPILER=g++ --MACFLAG= --STDLIB=-lstdc++ --STDLIB_FLAG= --DEFAULT_F_COMPILER=gfortran DEFAULT_F2PY_COMPILER=f2py3 -+DEFAULT_F_COMPILER=gfortran + DEFAULT_F_COMPILER=gfortran +GLOBAL_FLAG=-O3 -ffast-math -+MACFLAG= + MACFLAG= MG5AMC_VERSION=SpecifiedByMG5aMCAtRunTime PYTHIA8_PATH=NotInstalled -+STDLIB_FLAG= -+STDLIB=-lstdc++ - #end_of_make_opts_variables - - BIASLIBDIR=../../../lib/ +@@ -12,31 +13,53 @@ BIASLIBDIR=../../../lib/ BIASLIBRARY=libbias.$(libext) # Rest of the makefile @@ -479,7 +471,7 @@ index 617f10b93..407b1b753 100644 if [ -d $(IREGIDIR) ]; then cd $(IREGIDIR); make clean; cd ..; fi - for i in `ls -d ../SubProcesses/P*`; do cd $$i; make clean; cd -; done; diff --git b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile -index 348c283be..4cadaecf0 100644 +index 348c283be..d229c1cf4 100644 --- b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile +++ a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile @@ -1,5 +1,30 @@ From 1399cf442de7c5c03505be9e8175b7ef6c7d3ea9 Mon Sep 17 00:00:00 2001 From: Andrea Valassi Date: Thu, 14 Dec 2023 09:14:17 +0100 Subject: [PATCH 117/129] [refactorMakefile] in ggtt.mad SubProcesses/makefile, disable ccache for fortran as it is not supported (This is an old commit from 12 Dec but the description is still valid on 14 Dec) --- epochX/cudacpp/gg_tt.mad/SubProcesses/makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile index d229c1cf4d..b69917ee1f 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile @@ -18,13 +18,13 @@ help: $(info Or 'ALL' for all C++ and cuda targets) -# Enable ccache if USECCACHE=1 +# Enable ccache for C++ if USECCACHE=1 (do not enable it for Fortran since it is not supported for Fortran) ifeq ($(USECCACHE)$(shell echo $(CXX) | grep ccache),1) override CXX:=ccache $(CXX) endif -ifeq ($(USECCACHE)$(shell echo $(FC) | grep ccache),1) - override FC:=ccache $(FC) -endif +###ifeq ($(USECCACHE)$(shell echo $(FC) | grep ccache),1) +### override FC:=ccache $(FC) +###endif # Load additional dependencies of the bias module, if present ifeq (,$(wildcard ../bias_dependencies)) From 69db1a1948eb8d2d58e3dbab1d0066dd6723fa1c Mon Sep 17 00:00:00 2001 From: Andrea Valassi Date: Thu, 14 Dec 2023 09:15:18 +0100 Subject: [PATCH 118/129] [refactorMakefile] in codegen regenerate patch.common (This is an old commit from 12 Dec but the description is still valid on 14 Dec - patch.common is regenerated on 14 Dec anyway) ./CODEGEN/generateAndCompare.sh gg_tt --mad --nopatch sed -i 's/DEFAULT_F2PY_COMPILER=f2py3.*/DEFAULT_F2PY_COMPILER=f2py3/' gg_tt.mad/Source/make_opts git diff --no-ext-diff -R gg_tt.mad/Source/make_opts gg_tt.mad/Source/makefile gg_tt.mad/Source/dsample.f gg_tt.mad/Source/genps.inc gg_tt.mad/SubProcesses/makefile > CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common git diff --no-ext-diff -R gg_tt.mad/bin/internal/banner.py gg_tt.mad/bin/internal/gen_ximprove.py gg_tt.mad/bin/internal/madevent_interface.py >> CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common git diff --no-ext-diff -R gg_tt.mad/SubProcesses/P1_gg_ttx/auto_dsig1.f gg_tt.mad/SubProcesses/P1_gg_ttx/driver.f gg_tt.mad/SubProcesses/P1_gg_ttx/matrix1.f > CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 git checkout gg_tt.mad I need to regenerate all .mad files (.sa generation still needs to be fixed) --- .../MG5aMC_patches/PROD/patch.common | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common index ff4b7ff3ac..815e113d98 100644 --- a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common +++ b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common @@ -471,7 +471,7 @@ index 617f10b93..407b1b753 100644 if [ -d $(IREGIDIR) ]; then cd $(IREGIDIR); make clean; cd ..; fi - for i in `ls -d ../SubProcesses/P*`; do cd $$i; make clean; cd -; done; diff --git b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile -index 348c283be..d229c1cf4 100644 +index 348c283be..b69917ee1 100644 --- b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile +++ a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile @@ -1,5 +1,30 @@ @@ -497,13 +497,13 @@ index 348c283be..d229c1cf4 100644 + $(info Or 'ALL' for all C++ and cuda targets) + + -+# Enable ccache if USECCACHE=1 ++# Enable ccache for C++ if USECCACHE=1 (do not enable it for Fortran since it is not supported for Fortran) +ifeq ($(USECCACHE)$(shell echo $(CXX) | grep ccache),1) + override CXX:=ccache $(CXX) +endif -+ifeq ($(USECCACHE)$(shell echo $(FC) | grep ccache),1) -+ override FC:=ccache $(FC) -+endif ++###ifeq ($(USECCACHE)$(shell echo $(FC) | grep ccache),1) ++### override FC:=ccache $(FC) ++###endif # Load additional dependencies of the bias module, if present ifeq (,$(wildcard ../bias_dependencies)) @@ -614,33 +614,33 @@ index 348c283be..d229c1cf4 100644 +madevent_cpp512y_link: AVX=512y +madevent_cpp512y_link: cppavx512y + ln -sf $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) -+ + +-$(LIBDIR)libmodel.$(libext): ../../Cards/param_card.dat +- cd ../../Source/MODEL; make +madevent_cpp512z_link: AVX=512z +madevent_cpp512z_link: cppavx512z + ln -sf $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) -+ + +-$(LIBDIR)libgeneric.$(libext): ../../Cards/run_card.dat +- cd ../../Source; make +madevent_cuda_link: AVX=cuda +madevent_cuda_link: cuda + ln -sf $(CUDACPP_BUILDDIR)/$(PROG)_cuda $(PROG) -+ + +-$(LIBDIR)libpdf.$(libext): +- cd ../../Source/PDF; make +$(CUDACPP_BUILDDIR)/$(PROG)_cpp: $(LIBS) $(CUDACPP_CXXLIB) $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) counters.o ompnumthreads.o + $(FC) -o $(CUDACPP_BUILDDIR)/$(PROG)_cpp -L$(LIBDIR)/$(CUDACPP_BUILDDIR) -l$(CUDACPP_COMMONLIB) $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o -L$(CUDACPP_BUILDDIR) -l$(MG5AMC_CXXLIB) $(LIBFLAGSRPATH) $(MG_LDFLAGS) $(LDFLAGS) + +$(CUDACPP_BUILDDIR)/$(PROG)_cuda: $(LIBS) $(CUDACPP_CULIB) $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) counters.o ompnumthreads.o + $(FC) -o $(CUDACPP_BUILDDIR)/$(PROG)_cuda -L$(LIBDIR)/$(CUDACPP_BUILDDIR) -l$(CUDACPP_COMMONLIB) $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o -L$(CUDACPP_BUILDDIR) -l$(MG5AMC_CULIB) $(LIBFLAGSRPATH) $(MG_LDFLAGS) $(LDFLAGS) - --$(LIBDIR)libmodel.$(libext): ../../Cards/param_card.dat -- cd ../../Source/MODEL; make ++ +counters.o: counters.cc timer.h + $(CXX) $(MG_CXXFLAGS) $(CXXFLAGS) -c $< -o $@ - --$(LIBDIR)libgeneric.$(libext): ../../Cards/run_card.dat -- cd ../../Source; make ++ +ompnumthreads.o: ompnumthreads.cc ompnumthreads.h + $(CXX) $(MG_CXXFLAGS) $(CXXFLAGS) $(OMPFLAGS) -c $< -o $@ - --$(LIBDIR)libpdf.$(libext): -- cd ../../Source/PDF; make ++ +$(PROG)_forhel: $(PROCESS) auto_dsig.o $(LIBS) $(MATRIX_HEL) + $(FC) -o $(PROG)_forhel $(PROCESS) $(MATRIX_HEL) $(LINKLIBS) $(LDFLAGS) $(BIASDEPENDENCIES) $(OMPFLAGS) + From b8fd2a91357933ad3d8205dc6babeed03e067862 Mon Sep 17 00:00:00 2001 From: Andrea Valassi Date: Thu, 14 Dec 2023 09:17:15 +0100 Subject: [PATCH 119/129] [refactorMakefile] in CODEGEN/allGenerateAndCompare.sh add --mad and ---sa flags (This is an old commit from 9 Dec but the description is still valid on 14 Dec) --- .../cudacpp/CODEGEN/allGenerateAndCompare.sh | 52 +++++++++++-------- 1 file changed, 29 insertions(+), 23 deletions(-) diff --git a/epochX/cudacpp/CODEGEN/allGenerateAndCompare.sh b/epochX/cudacpp/CODEGEN/allGenerateAndCompare.sh index ed73959a27..b8fd1d51ba 100755 --- a/epochX/cudacpp/CODEGEN/allGenerateAndCompare.sh +++ b/epochX/cudacpp/CODEGEN/allGenerateAndCompare.sh @@ -6,28 +6,34 @@ set -e # fail on error -cd $(dirname $0)/.. - -./CODEGEN/generateAndCompare.sh -q ee_mumu -./CODEGEN/generateAndCompare.sh -q ee_mumu --mad - -./CODEGEN/generateAndCompare.sh -q gg_tt -./CODEGEN/generateAndCompare.sh -q gg_tt --mad - -./CODEGEN/generateAndCompare.sh -q gg_ttg -./CODEGEN/generateAndCompare.sh -q gg_ttg --mad - -./CODEGEN/generateAndCompare.sh -q gg_ttgg -./CODEGEN/generateAndCompare.sh -q gg_ttgg --mad +sa=1 +mad=1 +if [ "$1" == "--sa" ]; then + mad=0; shift +elif [ "$1" == "--mad" ]; then + sa=0; shift +fi +if [ "$1" != "" ]; then echo "Usage: $0 [--sa|--mad]"; exit 1; fi -./CODEGEN/generateAndCompare.sh -q gg_ttggg -./CODEGEN/generateAndCompare.sh -q gg_ttggg --mad - -./CODEGEN/generateAndCompare.sh -q gq_ttq -./CODEGEN/generateAndCompare.sh -q gq_ttq --mad - -./CODEGEN/generateAndCompare.sh -q heft_gg_h - -./CODEGEN/generateAndCompare.sh -q gg_tt01g --mad +cd $(dirname $0)/.. -./CODEGEN/generateAndCompare.sh -q pp_tt012j --mad +if [ "$mad" == "1" ]; then + ./CODEGEN/generateAndCompare.sh -q ee_mumu --mad + ./CODEGEN/generateAndCompare.sh -q gg_tt --mad + ./CODEGEN/generateAndCompare.sh -q gg_ttg --mad + ./CODEGEN/generateAndCompare.sh -q gg_ttgg --mad + ./CODEGEN/generateAndCompare.sh -q gg_ttggg --mad + ./CODEGEN/generateAndCompare.sh -q gq_ttq --mad + ./CODEGEN/generateAndCompare.sh -q gg_tt01g --mad + ./CODEGEN/generateAndCompare.sh -q pp_tt012j --mad +fi + +if [ "$sa" == "1" ]; then + ./CODEGEN/generateAndCompare.sh -q ee_mumu + ./CODEGEN/generateAndCompare.sh -q gg_tt + ./CODEGEN/generateAndCompare.sh -q gg_ttg + ./CODEGEN/generateAndCompare.sh -q gg_ttgg + ./CODEGEN/generateAndCompare.sh -q gg_ttggg + ./CODEGEN/generateAndCompare.sh -q gq_ttq + ./CODEGEN/generateAndCompare.sh -q heft_gg_h +fi From 31087b6c660112cefe094ee51d03e9bab0813b4c Mon Sep 17 00:00:00 2001 From: Andrea Valassi Date: Thu, 14 Dec 2023 09:21:55 +0100 Subject: [PATCH 120/129] [refactorMakefile] regenerate all mad processes ./CODEGEN/allGenerateAndCompare.sh --mad --- .../ee_mumu.mad/CODEGEN_mad_ee_mumu_log.txt | 77 +++-- .../ee_mumu.mad/Cards/me5_configuration.txt | 4 +- .../cudacpp/ee_mumu.mad/SubProcesses/makefile | 8 +- .../ee_mumu.mad/SubProcesses/runTest.cc | 2 + .../gg_tt.mad/CODEGEN_mad_gg_tt_log.txt | 74 +++-- .../gg_tt.mad/Cards/me5_configuration.txt | 4 +- .../cudacpp/gg_tt.mad/SubProcesses/runTest.cc | 2 + .../gg_tt01g.mad/CODEGEN_mad_gg_tt01g_log.txt | 84 +++--- .../gg_tt01g.mad/Cards/me5_configuration.txt | 4 +- .../gg_tt01g.mad/SubProcesses/makefile | 8 +- .../gg_tt01g.mad/SubProcesses/runTest.cc | 2 + .../gg_ttg.mad/CODEGEN_mad_gg_ttg_log.txt | 74 ++--- .../gg_ttg.mad/Cards/me5_configuration.txt | 4 +- .../cudacpp/gg_ttg.mad/SubProcesses/makefile | 8 +- .../gg_ttg.mad/SubProcesses/runTest.cc | 2 + .../gg_ttgg.mad/CODEGEN_mad_gg_ttgg_log.txt | 78 ++--- .../gg_ttgg.mad/Cards/me5_configuration.txt | 4 +- .../cudacpp/gg_ttgg.mad/SubProcesses/makefile | 8 +- .../gg_ttgg.mad/SubProcesses/runTest.cc | 2 + .../gg_ttggg.mad/CODEGEN_mad_gg_ttggg_log.txt | 80 ++--- .../gg_ttggg.mad/Cards/me5_configuration.txt | 4 +- .../gg_ttggg.mad/SubProcesses/makefile | 8 +- .../gg_ttggg.mad/SubProcesses/runTest.cc | 2 + .../gq_ttq.mad/CODEGEN_mad_gq_ttq_log.txt | 90 +++--- .../gq_ttq.mad/Cards/me5_configuration.txt | 4 +- .../cudacpp/gq_ttq.mad/SubProcesses/makefile | 8 +- .../gq_ttq.mad/SubProcesses/runTest.cc | 2 + .../CODEGEN_mad_pp_tt012j_log.txt | 278 +++++++++--------- .../pp_tt012j.mad/Cards/me5_configuration.txt | 4 +- .../pp_tt012j.mad/SubProcesses/makefile | 8 +- .../pp_tt012j.mad/SubProcesses/runTest.cc | 2 + 31 files changed, 477 insertions(+), 462 deletions(-) diff --git a/epochX/cudacpp/ee_mumu.mad/CODEGEN_mad_ee_mumu_log.txt b/epochX/cudacpp/ee_mumu.mad/CODEGEN_mad_ee_mumu_log.txt index e6a712b2f4..79ed67ff2a 100644 --- a/epochX/cudacpp/ee_mumu.mad/CODEGEN_mad_ee_mumu_log.txt +++ b/epochX/cudacpp/ee_mumu.mad/CODEGEN_mad_ee_mumu_log.txt @@ -50,9 +50,10 @@ Please set the 'lhapdf' variable to the (absolute) /PATH/TO/lhapdf-config (inclu Note that you can still compile and run aMC@NLO with the built-in PDFs MG5_aMC> set lhapdf /PATH/TO/lhapdf-config +Using default text editor "vi". Set another one in ./input/mg5_configuration.txt Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt -import /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu.mg +import /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu.mg The import format was not given, so we guess it as command set stdout_level DEBUG set output information to level: 10 @@ -61,7 +62,7 @@ generate e+ e- > mu+ mu- No model currently active, so we import the Standard Model INFO: load particles INFO: load vertices -DEBUG: model prefixing takes 0.0036394596099853516  +DEBUG: model prefixing takes 0.005708932876586914  INFO: Restrict model sm with file models/sm/restrict_default.dat . DEBUG: Simplifying conditional expressions  DEBUG: remove interactions: u s w+ at order: QED=1  @@ -153,7 +154,7 @@ INFO: Checking for minimal orders which gives processes. INFO: Please specify coupling orders to bypass this step. INFO: Trying process: e+ e- > mu+ mu- WEIGHTED<=4 @1 INFO: Process has 2 diagrams -1 processes with 2 diagrams generated in 0.003 s +1 processes with 2 diagrams generated in 0.004 s Total: 1 processes with 2 diagrams output madevent ../TMPOUT/CODEGEN_mad_ee_mumu --hel_recycling=False --vector_size=32 --me_exporter=standalone_cudacpp Load PLUGIN.CUDACPP_OUTPUT @@ -164,16 +165,16 @@ Load PLUGIN.CUDACPP_OUTPUT INFO: initialize a new directory: CODEGEN_mad_ee_mumu INFO: remove old information in CODEGEN_mad_ee_mumu DEBUG: Entering PLUGIN_ProcessExporter.copy_template (initialise the directory) [output.py at line 165]  -WARNING: File exists /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu  -INFO: Creating subdirectories in directory /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu -WARNING: File exists /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/Cards  -WARNING: File exists /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/SubProcesses  +WARNING: File exists /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu  +INFO: Creating subdirectories in directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu +WARNING: File exists /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/Cards  +WARNING: File exists /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/SubProcesses  INFO: Organizing processes into subprocess groups INFO: Generating Helas calls for process: e+ e- > mu+ mu- WEIGHTED<=4 @1 INFO: Processing color information for process: e+ e- > mu+ mu- @1 INFO: Creating files in directory P1_epem_mupmum DEBUG: kwargs[prefix] = 0 [model_handling.py at line 1058]  -DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  +DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  INFO: Creating files in directory . FileWriter for ././CPPProcess.h FileWriter for ././CPPProcess.cc @@ -189,20 +190,20 @@ INFO: Created files CPPProcess.h and CPPProcess.cc in directory ./. DEBUG: vector, subproc_group,self.opt['vector_size'] =  32 True 32 [export_v4.py at line 1872]  INFO: Generating Feynman diagrams for Process: e+ e- > mu+ mu- WEIGHTED<=4 @1 INFO: Finding symmetric diagrams for subprocess group epem_mupmum -Generated helas calls for 1 subprocesses (2 diagrams) in 0.003 s -Wrote files for 8 helas calls in 0.076 s +Generated helas calls for 1 subprocesses (2 diagrams) in 0.004 s +Wrote files for 8 helas calls in 0.098 s ALOHA: aloha starts to compute helicity amplitudes ALOHA: aloha creates FFV1 routines ALOHA: aloha creates FFV2 routines ALOHA: aloha creates FFV4 routines -ALOHA: aloha creates 3 routines in 0.133 s +ALOHA: aloha creates 3 routines in 0.197 s DEBUG: Entering PLUGIN_ProcessExporter.convert_model (create the model) [output.py at line 202]  ALOHA: aloha starts to compute helicity amplitudes ALOHA: aloha creates FFV1 routines ALOHA: aloha creates FFV2 routines ALOHA: aloha creates FFV4 routines ALOHA: aloha creates FFV2_4 routines -ALOHA: aloha creates 7 routines in 0.163 s +ALOHA: aloha creates 7 routines in 0.253 s FFV1 FFV1 FFV2 @@ -211,51 +212,47 @@ ALOHA: aloha creates 7 routines in 0.163 s FFV4 FFV2_4 FFV2_4 -FileWriter for /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/src/./HelAmps_sm.h -INFO: Created file HelAmps_sm.h in directory /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/src/. +FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/src/./HelAmps_sm.h +INFO: Created file HelAmps_sm.h in directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/src/. super_write_set_parameters_onlyfixMajorana (hardcoded=False) super_write_set_parameters_onlyfixMajorana (hardcoded=True) -FileWriter for /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/src/./Parameters_sm.h -FileWriter for /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/src/./Parameters_sm.cc +FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/src/./Parameters_sm.h +FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/src/./Parameters_sm.cc INFO: Created files Parameters_sm.h and Parameters_sm.cc in directory -INFO: /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/src/. and /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/src/. +INFO: /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/src/. and /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/src/. The option zerowidth_tchannel is modified [True] but will not be written in the configuration files. If you want to make this value the default for future session, you can run 'save options --all' -save configuration file to /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/Cards/me5_configuration.txt +save configuration file to /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/Cards/me5_configuration.txt INFO: Use Fortran compiler gfortran INFO: Use c++ compiler g++ INFO: Generate web pages -DEBUG: cd /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu; patch -p4 -i /data/stephan/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common +DEBUG: standardise /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/Source/make_opts (fix f2py3 and sort make_opts_variables) before applying patch.common +DEBUG: cd /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu; patch -p4 -i /data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common patching file Source/genps.inc patching file Source/make_opts -Hunk #1 succeeded at 12 (offset -1 lines). -Hunk #2 succeeded at 70 (offset -1 lines). -Hunk #3 succeeded at 117 (offset -1 lines). -Hunk #4 succeeded at 128 (offset -1 lines). patching file Source/makefile patching file SubProcesses/makefile patching file bin/internal/banner.py patching file bin/internal/gen_ximprove.py patching file bin/internal/madevent_interface.py -DEBUG: cd /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/SubProcesses/P1_epem_mupmum; patch -p6 -i /data/stephan/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 +DEBUG: cd /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/SubProcesses/P1_epem_mupmum; patch -p6 -i /data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 patching file auto_dsig1.f Hunk #1 succeeded at 496 (offset 12 lines). patching file driver.f patching file matrix1.f -Hunk #2 succeeded at 143 (offset -16 lines). -Hunk #3 succeeded at 230 (offset -7 lines). -Hunk #4 succeeded at 267 (offset 2 lines). -Hunk #5 succeeded at 312 (offset 2 lines). +Hunk #3 succeeded at 230 (offset 9 lines). +Hunk #4 succeeded at 267 (offset 18 lines). +Hunk #5 succeeded at 312 (offset 18 lines). DEBUG: p.returncode =  0 [output.py at line 237]  -Output to directory /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu done. +Output to directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu done. Type "launch" to generate events from this process, or see -/data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/README +/data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/README Run "open index.html" to see more information about this process. quit -real 0m1.496s -user 0m1.179s -sys 0m0.313s +real 0m1.877s +user 0m1.634s +sys 0m0.245s ************************************************************ * * * W E L C O M E to * @@ -276,9 +273,10 @@ sys 0m0.313s * Type 'help' for in-line help. * * * ************************************************************ -INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/Cards/me5_configuration.txt -INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/mg5amcnlo/input/mg5_configuration.txt -INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/Cards/me5_configuration.txt +INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/Cards/me5_configuration.txt +INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo/input/mg5_configuration.txt +INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/Cards/me5_configuration.txt +Using default text editor "vi". Set another one in ./input/mg5_configuration.txt Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt treatcards run @@ -305,9 +303,10 @@ launch in debug mode * Type 'help' for in-line help. * * * ************************************************************ -INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/Cards/me5_configuration.txt -INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/mg5amcnlo/input/mg5_configuration.txt -INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/Cards/me5_configuration.txt +INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/Cards/me5_configuration.txt +INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo/input/mg5_configuration.txt +INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/Cards/me5_configuration.txt +Using default text editor "vi". Set another one in ./input/mg5_configuration.txt Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt treatcards param diff --git a/epochX/cudacpp/ee_mumu.mad/Cards/me5_configuration.txt b/epochX/cudacpp/ee_mumu.mad/Cards/me5_configuration.txt index 22f81b5926..cdeedc7863 100644 --- a/epochX/cudacpp/ee_mumu.mad/Cards/me5_configuration.txt +++ b/epochX/cudacpp/ee_mumu.mad/Cards/me5_configuration.txt @@ -234,7 +234,7 @@ # pineappl = pineappl -#mg5_path = /data/stephan/madgraph4gpu/MG5aMC/mg5amcnlo +#mg5_path = /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo # MG5 MAIN DIRECTORY -#mg5_path = /data/stephan/madgraph4gpu/MG5aMC/mg5amcnlo +#mg5_path = /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo diff --git a/epochX/cudacpp/ee_mumu.mad/SubProcesses/makefile b/epochX/cudacpp/ee_mumu.mad/SubProcesses/makefile index d229c1cf4d..b69917ee1f 100644 --- a/epochX/cudacpp/ee_mumu.mad/SubProcesses/makefile +++ b/epochX/cudacpp/ee_mumu.mad/SubProcesses/makefile @@ -18,13 +18,13 @@ help: $(info Or 'ALL' for all C++ and cuda targets) -# Enable ccache if USECCACHE=1 +# Enable ccache for C++ if USECCACHE=1 (do not enable it for Fortran since it is not supported for Fortran) ifeq ($(USECCACHE)$(shell echo $(CXX) | grep ccache),1) override CXX:=ccache $(CXX) endif -ifeq ($(USECCACHE)$(shell echo $(FC) | grep ccache),1) - override FC:=ccache $(FC) -endif +###ifeq ($(USECCACHE)$(shell echo $(FC) | grep ccache),1) +### override FC:=ccache $(FC) +###endif # Load additional dependencies of the bias module, if present ifeq (,$(wildcard ../bias_dependencies)) diff --git a/epochX/cudacpp/ee_mumu.mad/SubProcesses/runTest.cc b/epochX/cudacpp/ee_mumu.mad/SubProcesses/runTest.cc index 734235824a..6c77775fb2 100644 --- a/epochX/cudacpp/ee_mumu.mad/SubProcesses/runTest.cc +++ b/epochX/cudacpp/ee_mumu.mad/SubProcesses/runTest.cc @@ -243,6 +243,7 @@ struct CUDATest : public CUDA_CPU_TestBase // Use two levels of macros to force stringification at the right level // (see https://gcc.gnu.org/onlinedocs/gcc-3.0.1/cpp_3.html#SEC17 and https://stackoverflow.com/a/3419392) // Google macro is in https://github.com/google/googletest/blob/master/googletest/include/gtest/gtest-param-test.h +/* clang-format off */ #define TESTID_CPU( s ) s##_CPU #define XTESTID_CPU( s ) TESTID_CPU( s ) #define MG_INSTANTIATE_TEST_SUITE_CPU( prefix, test_suite_name ) \ @@ -255,6 +256,7 @@ struct CUDATest : public CUDA_CPU_TestBase INSTANTIATE_TEST_SUITE_P( prefix, \ test_suite_name, \ testing::Values( new CUDATest( MG_EPOCH_REFERENCE_FILE_NAME ) ) ); +/* clang-format on */ #ifdef __CUDACC__ MG_INSTANTIATE_TEST_SUITE_GPU( XTESTID_GPU( MG_EPOCH_PROCESS_ID ), MadgraphTest ); diff --git a/epochX/cudacpp/gg_tt.mad/CODEGEN_mad_gg_tt_log.txt b/epochX/cudacpp/gg_tt.mad/CODEGEN_mad_gg_tt_log.txt index 940d9f47b2..0eabc39d85 100644 --- a/epochX/cudacpp/gg_tt.mad/CODEGEN_mad_gg_tt_log.txt +++ b/epochX/cudacpp/gg_tt.mad/CODEGEN_mad_gg_tt_log.txt @@ -50,9 +50,10 @@ Please set the 'lhapdf' variable to the (absolute) /PATH/TO/lhapdf-config (inclu Note that you can still compile and run aMC@NLO with the built-in PDFs MG5_aMC> set lhapdf /PATH/TO/lhapdf-config +Using default text editor "vi". Set another one in ./input/mg5_configuration.txt Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt -import /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt.mg +import /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt.mg The import format was not given, so we guess it as command set stdout_level DEBUG set output information to level: 10 @@ -61,7 +62,7 @@ generate g g > t t~ No model currently active, so we import the Standard Model INFO: load particles INFO: load vertices -DEBUG: model prefixing takes 0.003480195999145508  +DEBUG: model prefixing takes 0.005516529083251953  INFO: Restrict model sm with file models/sm/restrict_default.dat . DEBUG: Simplifying conditional expressions  DEBUG: remove interactions: u s w+ at order: QED=1  @@ -154,7 +155,7 @@ INFO: Please specify coupling orders to bypass this step. INFO: Trying coupling order WEIGHTED<=2: WEIGTHED IS QCD+2*QED INFO: Trying process: g g > t t~ WEIGHTED<=2 @1 INFO: Process has 3 diagrams -1 processes with 3 diagrams generated in 0.006 s +1 processes with 3 diagrams generated in 0.008 s Total: 1 processes with 3 diagrams output madevent ../TMPOUT/CODEGEN_mad_gg_tt --hel_recycling=False --vector_size=32 --me_exporter=standalone_cudacpp Load PLUGIN.CUDACPP_OUTPUT @@ -165,16 +166,16 @@ Load PLUGIN.CUDACPP_OUTPUT INFO: initialize a new directory: CODEGEN_mad_gg_tt INFO: remove old information in CODEGEN_mad_gg_tt DEBUG: Entering PLUGIN_ProcessExporter.copy_template (initialise the directory) [output.py at line 165]  -WARNING: File exists /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt  -INFO: Creating subdirectories in directory /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt -WARNING: File exists /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/Cards  -WARNING: File exists /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/SubProcesses  +WARNING: File exists /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt  +INFO: Creating subdirectories in directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt +WARNING: File exists /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/Cards  +WARNING: File exists /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/SubProcesses  INFO: Organizing processes into subprocess groups INFO: Generating Helas calls for process: g g > t t~ WEIGHTED<=2 @1 INFO: Processing color information for process: g g > t t~ @1 INFO: Creating files in directory P1_gg_ttx DEBUG: kwargs[prefix] = 0 [model_handling.py at line 1058]  -DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  +DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  INFO: Creating files in directory . FileWriter for ././CPPProcess.h FileWriter for ././CPPProcess.cc @@ -189,65 +190,58 @@ INFO: Created files CPPProcess.h and CPPProcess.cc in directory ./. DEBUG: vector, subproc_group,self.opt['vector_size'] =  32 True 32 [export_v4.py at line 1872]  INFO: Generating Feynman diagrams for Process: g g > t t~ WEIGHTED<=2 @1 INFO: Finding symmetric diagrams for subprocess group gg_ttx -Generated helas calls for 1 subprocesses (3 diagrams) in 0.005 s -Wrote files for 10 helas calls in 0.079 s +Generated helas calls for 1 subprocesses (3 diagrams) in 0.006 s +Wrote files for 10 helas calls in 0.100 s ALOHA: aloha starts to compute helicity amplitudes ALOHA: aloha creates VVV1 set of routines with options: P0 ALOHA: aloha creates FFV1 routines -ALOHA: aloha creates 2 routines in 0.101 s +ALOHA: aloha creates 2 routines in 0.146 s DEBUG: Entering PLUGIN_ProcessExporter.convert_model (create the model) [output.py at line 202]  ALOHA: aloha starts to compute helicity amplitudes ALOHA: aloha creates VVV1 set of routines with options: P0 ALOHA: aloha creates FFV1 routines -ALOHA: aloha creates 4 routines in 0.085 s +ALOHA: aloha creates 4 routines in 0.129 s VVV1 FFV1 FFV1 FFV1 -FileWriter for /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/src/./HelAmps_sm.h -INFO: Created file HelAmps_sm.h in directory /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/src/. +FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/src/./HelAmps_sm.h +INFO: Created file HelAmps_sm.h in directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/src/. super_write_set_parameters_onlyfixMajorana (hardcoded=False) super_write_set_parameters_onlyfixMajorana (hardcoded=True) -FileWriter for /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/src/./Parameters_sm.h -FileWriter for /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/src/./Parameters_sm.cc +FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/src/./Parameters_sm.h +FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/src/./Parameters_sm.cc INFO: Created files Parameters_sm.h and Parameters_sm.cc in directory -INFO: /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/src/. and /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/src/. +INFO: /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/src/. and /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/src/. The option zerowidth_tchannel is modified [True] but will not be written in the configuration files. If you want to make this value the default for future session, you can run 'save options --all' -save configuration file to /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/Cards/me5_configuration.txt +save configuration file to /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/Cards/me5_configuration.txt INFO: Use Fortran compiler gfortran INFO: Use c++ compiler g++ INFO: Generate web pages -DEBUG: cd /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt; patch -p4 -i /data/stephan/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common +DEBUG: standardise /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/Source/make_opts (fix f2py3 and sort make_opts_variables) before applying patch.common +DEBUG: cd /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt; patch -p4 -i /data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common patching file Source/genps.inc patching file Source/make_opts -Hunk #1 succeeded at 12 (offset -1 lines). -Hunk #2 succeeded at 70 (offset -1 lines). -Hunk #3 succeeded at 117 (offset -1 lines). -Hunk #4 succeeded at 128 (offset -1 lines). patching file Source/makefile patching file SubProcesses/makefile patching file bin/internal/banner.py patching file bin/internal/gen_ximprove.py patching file bin/internal/madevent_interface.py -DEBUG: cd /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/SubProcesses/P1_gg_ttx; patch -p6 -i /data/stephan/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 +DEBUG: cd /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/SubProcesses/P1_gg_ttx; patch -p6 -i /data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 patching file auto_dsig1.f patching file driver.f patching file matrix1.f -Hunk #2 succeeded at 143 (offset -16 lines). -Hunk #3 succeeded at 221 (offset -16 lines). -Hunk #4 succeeded at 249 (offset -16 lines). -Hunk #5 succeeded at 294 (offset -16 lines). DEBUG: p.returncode =  0 [output.py at line 237]  -Output to directory /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt done. +Output to directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt done. Type "launch" to generate events from this process, or see -/data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/README +/data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/README Run "open index.html" to see more information about this process. quit -real 0m1.366s -user 0m1.060s -sys 0m0.308s +real 0m1.684s +user 0m1.475s +sys 0m0.215s ************************************************************ * * * W E L C O M E to * @@ -268,9 +262,10 @@ sys 0m0.308s * Type 'help' for in-line help. * * * ************************************************************ -INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/Cards/me5_configuration.txt -INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/mg5amcnlo/input/mg5_configuration.txt -INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/Cards/me5_configuration.txt +INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/Cards/me5_configuration.txt +INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo/input/mg5_configuration.txt +INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/Cards/me5_configuration.txt +Using default text editor "vi". Set another one in ./input/mg5_configuration.txt Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt treatcards run @@ -297,9 +292,10 @@ launch in debug mode * Type 'help' for in-line help. * * * ************************************************************ -INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/Cards/me5_configuration.txt -INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/mg5amcnlo/input/mg5_configuration.txt -INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/Cards/me5_configuration.txt +INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/Cards/me5_configuration.txt +INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo/input/mg5_configuration.txt +INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/Cards/me5_configuration.txt +Using default text editor "vi". Set another one in ./input/mg5_configuration.txt Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt treatcards param diff --git a/epochX/cudacpp/gg_tt.mad/Cards/me5_configuration.txt b/epochX/cudacpp/gg_tt.mad/Cards/me5_configuration.txt index 22f81b5926..cdeedc7863 100644 --- a/epochX/cudacpp/gg_tt.mad/Cards/me5_configuration.txt +++ b/epochX/cudacpp/gg_tt.mad/Cards/me5_configuration.txt @@ -234,7 +234,7 @@ # pineappl = pineappl -#mg5_path = /data/stephan/madgraph4gpu/MG5aMC/mg5amcnlo +#mg5_path = /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo # MG5 MAIN DIRECTORY -#mg5_path = /data/stephan/madgraph4gpu/MG5aMC/mg5amcnlo +#mg5_path = /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/runTest.cc b/epochX/cudacpp/gg_tt.mad/SubProcesses/runTest.cc index 734235824a..6c77775fb2 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/runTest.cc +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/runTest.cc @@ -243,6 +243,7 @@ struct CUDATest : public CUDA_CPU_TestBase // Use two levels of macros to force stringification at the right level // (see https://gcc.gnu.org/onlinedocs/gcc-3.0.1/cpp_3.html#SEC17 and https://stackoverflow.com/a/3419392) // Google macro is in https://github.com/google/googletest/blob/master/googletest/include/gtest/gtest-param-test.h +/* clang-format off */ #define TESTID_CPU( s ) s##_CPU #define XTESTID_CPU( s ) TESTID_CPU( s ) #define MG_INSTANTIATE_TEST_SUITE_CPU( prefix, test_suite_name ) \ @@ -255,6 +256,7 @@ struct CUDATest : public CUDA_CPU_TestBase INSTANTIATE_TEST_SUITE_P( prefix, \ test_suite_name, \ testing::Values( new CUDATest( MG_EPOCH_REFERENCE_FILE_NAME ) ) ); +/* clang-format on */ #ifdef __CUDACC__ MG_INSTANTIATE_TEST_SUITE_GPU( XTESTID_GPU( MG_EPOCH_PROCESS_ID ), MadgraphTest ); diff --git a/epochX/cudacpp/gg_tt01g.mad/CODEGEN_mad_gg_tt01g_log.txt b/epochX/cudacpp/gg_tt01g.mad/CODEGEN_mad_gg_tt01g_log.txt index 5b1de7601b..0753dd223b 100644 --- a/epochX/cudacpp/gg_tt01g.mad/CODEGEN_mad_gg_tt01g_log.txt +++ b/epochX/cudacpp/gg_tt01g.mad/CODEGEN_mad_gg_tt01g_log.txt @@ -50,9 +50,10 @@ Please set the 'lhapdf' variable to the (absolute) /PATH/TO/lhapdf-config (inclu Note that you can still compile and run aMC@NLO with the built-in PDFs MG5_aMC> set lhapdf /PATH/TO/lhapdf-config +Using default text editor "vi". Set another one in ./input/mg5_configuration.txt Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt -import /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g.mg +import /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g.mg The import format was not given, so we guess it as command set stdout_level DEBUG set output information to level: 10 @@ -61,7 +62,7 @@ generate g g > t t~ No model currently active, so we import the Standard Model INFO: load particles INFO: load vertices -DEBUG: model prefixing takes 0.003454446792602539  +DEBUG: model prefixing takes 0.0053136348724365234  INFO: Restrict model sm with file models/sm/restrict_default.dat . DEBUG: Simplifying conditional expressions  DEBUG: remove interactions: u s w+ at order: QED=1  @@ -154,7 +155,7 @@ INFO: Please specify coupling orders to bypass this step. INFO: Trying coupling order WEIGHTED<=2: WEIGTHED IS QCD+2*QED INFO: Trying process: g g > t t~ WEIGHTED<=2 @1 INFO: Process has 3 diagrams -1 processes with 3 diagrams generated in 0.006 s +1 processes with 3 diagrams generated in 0.008 s Total: 1 processes with 3 diagrams add process g g > t t~ g INFO: Checking for minimal orders which gives processes. @@ -162,7 +163,7 @@ INFO: Please specify coupling orders to bypass this step. INFO: Trying coupling order WEIGHTED<=3: WEIGTHED IS QCD+2*QED INFO: Trying process: g g > t t~ g WEIGHTED<=3 @2 INFO: Process has 16 diagrams -1 processes with 16 diagrams generated in 0.014 s +1 processes with 16 diagrams generated in 0.019 s Total: 2 processes with 19 diagrams output madevent ../TMPOUT/CODEGEN_mad_gg_tt01g --hel_recycling=False --vector_size=32 --me_exporter=standalone_cudacpp Load PLUGIN.CUDACPP_OUTPUT @@ -173,10 +174,10 @@ Load PLUGIN.CUDACPP_OUTPUT INFO: initialize a new directory: CODEGEN_mad_gg_tt01g INFO: remove old information in CODEGEN_mad_gg_tt01g DEBUG: Entering PLUGIN_ProcessExporter.copy_template (initialise the directory) [output.py at line 165]  -WARNING: File exists /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g  -INFO: Creating subdirectories in directory /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g -WARNING: File exists /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/Cards  -WARNING: File exists /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/SubProcesses  +WARNING: File exists /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g  +INFO: Creating subdirectories in directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g +WARNING: File exists /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/Cards  +WARNING: File exists /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/SubProcesses  INFO: Organizing processes into subprocess groups INFO: Generating Helas calls for process: g g > t t~ g WEIGHTED<=3 @2 INFO: Processing color information for process: g g > t t~ g @2 @@ -184,7 +185,7 @@ INFO: Generating Helas calls for process: g g > t t~ WEIGHTED<=2 @1 INFO: Processing color information for process: g g > t t~ @1 INFO: Creating files in directory P2_gg_ttxg DEBUG: kwargs[prefix] = 0 [model_handling.py at line 1058]  -DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  +DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  INFO: Creating files in directory . FileWriter for ././CPPProcess.h FileWriter for ././CPPProcess.cc @@ -201,7 +202,7 @@ INFO: Generating Feynman diagrams for Process: g g > t t~ g WEIGHTED<=3 @2 INFO: Finding symmetric diagrams for subprocess group gg_ttxg INFO: Creating files in directory P1_gg_ttx DEBUG: kwargs[prefix] = 0 [model_handling.py at line 1058]  -DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  +DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  INFO: Creating files in directory . FileWriter for ././CPPProcess.h FileWriter for ././CPPProcess.cc @@ -216,15 +217,15 @@ INFO: Created files CPPProcess.h and CPPProcess.cc in directory ./. DEBUG: vector, subproc_group,self.opt['vector_size'] =  32 True 32 [export_v4.py at line 1872]  INFO: Generating Feynman diagrams for Process: g g > t t~ WEIGHTED<=2 @1 INFO: Finding symmetric diagrams for subprocess group gg_ttx -Generated helas calls for 2 subprocesses (19 diagrams) in 0.030 s -Wrote files for 46 helas calls in 0.179 s +Generated helas calls for 2 subprocesses (19 diagrams) in 0.043 s +Wrote files for 46 helas calls in 0.239 s ALOHA: aloha starts to compute helicity amplitudes ALOHA: aloha creates VVV1 routines ALOHA: aloha creates FFV1 routines ALOHA: aloha creates VVVV1 set of routines with options: P0 ALOHA: aloha creates VVVV3 set of routines with options: P0 ALOHA: aloha creates VVVV4 set of routines with options: P0 -ALOHA: aloha creates 5 routines in 0.220 s +ALOHA: aloha creates 5 routines in 0.328 s DEBUG: Entering PLUGIN_ProcessExporter.convert_model (create the model) [output.py at line 202]  ALOHA: aloha starts to compute helicity amplitudes ALOHA: aloha creates VVV1 routines @@ -232,7 +233,7 @@ ALOHA: aloha creates FFV1 routines ALOHA: aloha creates VVVV1 set of routines with options: P0 ALOHA: aloha creates VVVV3 set of routines with options: P0 ALOHA: aloha creates VVVV4 set of routines with options: P0 -ALOHA: aloha creates 10 routines in 0.200 s +ALOHA: aloha creates 10 routines in 0.310 s VVV1 VVV1 FFV1 @@ -242,54 +243,51 @@ ALOHA: aloha creates 10 routines in 0.200 s VVVV1 VVVV3 VVVV4 -FileWriter for /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/src/./HelAmps_sm.h -INFO: Created file HelAmps_sm.h in directory /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/src/. +FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/src/./HelAmps_sm.h +INFO: Created file HelAmps_sm.h in directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/src/. super_write_set_parameters_onlyfixMajorana (hardcoded=False) super_write_set_parameters_onlyfixMajorana (hardcoded=True) -FileWriter for /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/src/./Parameters_sm.h -FileWriter for /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/src/./Parameters_sm.cc +FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/src/./Parameters_sm.h +FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/src/./Parameters_sm.cc INFO: Created files Parameters_sm.h and Parameters_sm.cc in directory -INFO: /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/src/. and /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/src/. +INFO: /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/src/. and /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/src/. The option zerowidth_tchannel is modified [True] but will not be written in the configuration files. If you want to make this value the default for future session, you can run 'save options --all' -save configuration file to /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/Cards/me5_configuration.txt +save configuration file to /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/Cards/me5_configuration.txt INFO: Use Fortran compiler gfortran INFO: Use c++ compiler g++ INFO: Generate web pages -DEBUG: cd /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g; patch -p4 -i /data/stephan/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common +DEBUG: standardise /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/Source/make_opts (fix f2py3 and sort make_opts_variables) before applying patch.common +DEBUG: cd /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g; patch -p4 -i /data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common patching file Source/genps.inc patching file Source/make_opts -Hunk #1 succeeded at 12 (offset -1 lines). -Hunk #2 succeeded at 70 (offset -1 lines). -Hunk #3 succeeded at 117 (offset -1 lines). -Hunk #4 succeeded at 128 (offset -1 lines). patching file Source/makefile patching file SubProcesses/makefile patching file bin/internal/banner.py patching file bin/internal/gen_ximprove.py patching file bin/internal/madevent_interface.py -DEBUG: cd /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/SubProcesses/P1_gg_ttx; patch -p6 -i /data/stephan/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 +DEBUG: cd /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/SubProcesses/P1_gg_ttx; patch -p6 -i /data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 patching file auto_dsig1.f patching file driver.f patching file matrix1.f -Hunk #2 succeeded at 143 (offset -16 lines). -Hunk #3 succeeded at 221 (offset -16 lines). -Hunk #4 succeeded at 249 (offset -16 lines). -Hunk #5 succeeded at 294 (offset -16 lines). -DEBUG: cd /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/SubProcesses/P2_gg_ttxg; patch -p6 -i /data/stephan/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 +DEBUG: cd /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/SubProcesses/P2_gg_ttxg; patch -p6 -i /data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 patching file auto_dsig1.f patching file driver.f patching file matrix1.f +Hunk #2 succeeded at 159 (offset 16 lines). +Hunk #3 succeeded at 237 (offset 16 lines). +Hunk #4 succeeded at 265 (offset 16 lines). +Hunk #5 succeeded at 310 (offset 16 lines). DEBUG: p.returncode =  0 [output.py at line 237]  -Output to directory /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g done. +Output to directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g done. Type "launch" to generate events from this process, or see -/data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/README +/data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/README Run "open index.html" to see more information about this process. quit -real 0m1.803s -user 0m1.468s -sys 0m0.339s +real 0m2.288s +user 0m2.041s +sys 0m0.253s ************************************************************ * * * W E L C O M E to * @@ -310,9 +308,10 @@ sys 0m0.339s * Type 'help' for in-line help. * * * ************************************************************ -INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/Cards/me5_configuration.txt -INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/mg5amcnlo/input/mg5_configuration.txt -INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/Cards/me5_configuration.txt +INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/Cards/me5_configuration.txt +INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo/input/mg5_configuration.txt +INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/Cards/me5_configuration.txt +Using default text editor "vi". Set another one in ./input/mg5_configuration.txt Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt treatcards run @@ -339,9 +338,10 @@ launch in debug mode * Type 'help' for in-line help. * * * ************************************************************ -INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/Cards/me5_configuration.txt -INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/mg5amcnlo/input/mg5_configuration.txt -INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/Cards/me5_configuration.txt +INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/Cards/me5_configuration.txt +INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo/input/mg5_configuration.txt +INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/Cards/me5_configuration.txt +Using default text editor "vi". Set another one in ./input/mg5_configuration.txt Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt treatcards param diff --git a/epochX/cudacpp/gg_tt01g.mad/Cards/me5_configuration.txt b/epochX/cudacpp/gg_tt01g.mad/Cards/me5_configuration.txt index 22f81b5926..cdeedc7863 100644 --- a/epochX/cudacpp/gg_tt01g.mad/Cards/me5_configuration.txt +++ b/epochX/cudacpp/gg_tt01g.mad/Cards/me5_configuration.txt @@ -234,7 +234,7 @@ # pineappl = pineappl -#mg5_path = /data/stephan/madgraph4gpu/MG5aMC/mg5amcnlo +#mg5_path = /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo # MG5 MAIN DIRECTORY -#mg5_path = /data/stephan/madgraph4gpu/MG5aMC/mg5amcnlo +#mg5_path = /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo diff --git a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/makefile b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/makefile index d229c1cf4d..b69917ee1f 100644 --- a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/makefile +++ b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/makefile @@ -18,13 +18,13 @@ help: $(info Or 'ALL' for all C++ and cuda targets) -# Enable ccache if USECCACHE=1 +# Enable ccache for C++ if USECCACHE=1 (do not enable it for Fortran since it is not supported for Fortran) ifeq ($(USECCACHE)$(shell echo $(CXX) | grep ccache),1) override CXX:=ccache $(CXX) endif -ifeq ($(USECCACHE)$(shell echo $(FC) | grep ccache),1) - override FC:=ccache $(FC) -endif +###ifeq ($(USECCACHE)$(shell echo $(FC) | grep ccache),1) +### override FC:=ccache $(FC) +###endif # Load additional dependencies of the bias module, if present ifeq (,$(wildcard ../bias_dependencies)) diff --git a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/runTest.cc b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/runTest.cc index 734235824a..6c77775fb2 100644 --- a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/runTest.cc +++ b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/runTest.cc @@ -243,6 +243,7 @@ struct CUDATest : public CUDA_CPU_TestBase // Use two levels of macros to force stringification at the right level // (see https://gcc.gnu.org/onlinedocs/gcc-3.0.1/cpp_3.html#SEC17 and https://stackoverflow.com/a/3419392) // Google macro is in https://github.com/google/googletest/blob/master/googletest/include/gtest/gtest-param-test.h +/* clang-format off */ #define TESTID_CPU( s ) s##_CPU #define XTESTID_CPU( s ) TESTID_CPU( s ) #define MG_INSTANTIATE_TEST_SUITE_CPU( prefix, test_suite_name ) \ @@ -255,6 +256,7 @@ struct CUDATest : public CUDA_CPU_TestBase INSTANTIATE_TEST_SUITE_P( prefix, \ test_suite_name, \ testing::Values( new CUDATest( MG_EPOCH_REFERENCE_FILE_NAME ) ) ); +/* clang-format on */ #ifdef __CUDACC__ MG_INSTANTIATE_TEST_SUITE_GPU( XTESTID_GPU( MG_EPOCH_PROCESS_ID ), MadgraphTest ); diff --git a/epochX/cudacpp/gg_ttg.mad/CODEGEN_mad_gg_ttg_log.txt b/epochX/cudacpp/gg_ttg.mad/CODEGEN_mad_gg_ttg_log.txt index e5b01c714f..2b336b0d56 100644 --- a/epochX/cudacpp/gg_ttg.mad/CODEGEN_mad_gg_ttg_log.txt +++ b/epochX/cudacpp/gg_ttg.mad/CODEGEN_mad_gg_ttg_log.txt @@ -50,9 +50,10 @@ Please set the 'lhapdf' variable to the (absolute) /PATH/TO/lhapdf-config (inclu Note that you can still compile and run aMC@NLO with the built-in PDFs MG5_aMC> set lhapdf /PATH/TO/lhapdf-config +Using default text editor "vi". Set another one in ./input/mg5_configuration.txt Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt -import /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg.mg +import /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg.mg The import format was not given, so we guess it as command set stdout_level DEBUG set output information to level: 10 @@ -61,7 +62,7 @@ generate g g > t t~ g No model currently active, so we import the Standard Model INFO: load particles INFO: load vertices -DEBUG: model prefixing takes 0.0033996105194091797  +DEBUG: model prefixing takes 0.005417346954345703  INFO: Restrict model sm with file models/sm/restrict_default.dat . DEBUG: Simplifying conditional expressions  DEBUG: remove interactions: u s w+ at order: QED=1  @@ -154,7 +155,7 @@ INFO: Please specify coupling orders to bypass this step. INFO: Trying coupling order WEIGHTED<=3: WEIGTHED IS QCD+2*QED INFO: Trying process: g g > t t~ g WEIGHTED<=3 @1 INFO: Process has 16 diagrams -1 processes with 16 diagrams generated in 0.016 s +1 processes with 16 diagrams generated in 0.022 s Total: 1 processes with 16 diagrams output madevent ../TMPOUT/CODEGEN_mad_gg_ttg --hel_recycling=False --vector_size=32 --me_exporter=standalone_cudacpp Load PLUGIN.CUDACPP_OUTPUT @@ -165,16 +166,16 @@ Load PLUGIN.CUDACPP_OUTPUT INFO: initialize a new directory: CODEGEN_mad_gg_ttg INFO: remove old information in CODEGEN_mad_gg_ttg DEBUG: Entering PLUGIN_ProcessExporter.copy_template (initialise the directory) [output.py at line 165]  -WARNING: File exists /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg  -INFO: Creating subdirectories in directory /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg -WARNING: File exists /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/Cards  -WARNING: File exists /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/SubProcesses  +WARNING: File exists /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg  +INFO: Creating subdirectories in directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg +WARNING: File exists /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/Cards  +WARNING: File exists /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/SubProcesses  INFO: Organizing processes into subprocess groups INFO: Generating Helas calls for process: g g > t t~ g WEIGHTED<=3 @1 INFO: Processing color information for process: g g > t t~ g @1 INFO: Creating files in directory P1_gg_ttxg DEBUG: kwargs[prefix] = 0 [model_handling.py at line 1058]  -DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  +DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  INFO: Creating files in directory . FileWriter for ././CPPProcess.h FileWriter for ././CPPProcess.cc @@ -189,15 +190,15 @@ INFO: Created files CPPProcess.h and CPPProcess.cc in directory ./. DEBUG: vector, subproc_group,self.opt['vector_size'] =  32 True 32 [export_v4.py at line 1872]  INFO: Generating Feynman diagrams for Process: g g > t t~ g WEIGHTED<=3 @1 INFO: Finding symmetric diagrams for subprocess group gg_ttxg -Generated helas calls for 1 subprocesses (16 diagrams) in 0.028 s -Wrote files for 36 helas calls in 0.112 s +Generated helas calls for 1 subprocesses (16 diagrams) in 0.038 s +Wrote files for 36 helas calls in 0.148 s ALOHA: aloha starts to compute helicity amplitudes ALOHA: aloha creates VVV1 routines ALOHA: aloha creates FFV1 routines ALOHA: aloha creates VVVV1 set of routines with options: P0 ALOHA: aloha creates VVVV3 set of routines with options: P0 ALOHA: aloha creates VVVV4 set of routines with options: P0 -ALOHA: aloha creates 5 routines in 0.218 s +ALOHA: aloha creates 5 routines in 0.322 s DEBUG: Entering PLUGIN_ProcessExporter.convert_model (create the model) [output.py at line 202]  ALOHA: aloha starts to compute helicity amplitudes ALOHA: aloha creates VVV1 routines @@ -205,7 +206,7 @@ ALOHA: aloha creates FFV1 routines ALOHA: aloha creates VVVV1 set of routines with options: P0 ALOHA: aloha creates VVVV3 set of routines with options: P0 ALOHA: aloha creates VVVV4 set of routines with options: P0 -ALOHA: aloha creates 10 routines in 0.199 s +ALOHA: aloha creates 10 routines in 0.311 s VVV1 VVV1 FFV1 @@ -215,46 +216,47 @@ ALOHA: aloha creates 10 routines in 0.199 s VVVV1 VVVV3 VVVV4 -FileWriter for /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/src/./HelAmps_sm.h -INFO: Created file HelAmps_sm.h in directory /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/src/. +FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/src/./HelAmps_sm.h +INFO: Created file HelAmps_sm.h in directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/src/. super_write_set_parameters_onlyfixMajorana (hardcoded=False) super_write_set_parameters_onlyfixMajorana (hardcoded=True) -FileWriter for /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/src/./Parameters_sm.h -FileWriter for /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/src/./Parameters_sm.cc +FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/src/./Parameters_sm.h +FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/src/./Parameters_sm.cc INFO: Created files Parameters_sm.h and Parameters_sm.cc in directory -INFO: /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/src/. and /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/src/. +INFO: /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/src/. and /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/src/. The option zerowidth_tchannel is modified [True] but will not be written in the configuration files. If you want to make this value the default for future session, you can run 'save options --all' -save configuration file to /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/Cards/me5_configuration.txt +save configuration file to /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/Cards/me5_configuration.txt INFO: Use Fortran compiler gfortran INFO: Use c++ compiler g++ INFO: Generate web pages -DEBUG: cd /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg; patch -p4 -i /data/stephan/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common +DEBUG: standardise /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/Source/make_opts (fix f2py3 and sort make_opts_variables) before applying patch.common +DEBUG: cd /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg; patch -p4 -i /data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common patching file Source/genps.inc patching file Source/make_opts -Hunk #1 succeeded at 12 (offset -1 lines). -Hunk #2 succeeded at 70 (offset -1 lines). -Hunk #3 succeeded at 117 (offset -1 lines). -Hunk #4 succeeded at 128 (offset -1 lines). patching file Source/makefile patching file SubProcesses/makefile patching file bin/internal/banner.py patching file bin/internal/gen_ximprove.py patching file bin/internal/madevent_interface.py -DEBUG: cd /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/SubProcesses/P1_gg_ttxg; patch -p6 -i /data/stephan/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 +DEBUG: cd /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/SubProcesses/P1_gg_ttxg; patch -p6 -i /data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 patching file auto_dsig1.f patching file driver.f patching file matrix1.f +Hunk #2 succeeded at 159 (offset 16 lines). +Hunk #3 succeeded at 237 (offset 16 lines). +Hunk #4 succeeded at 265 (offset 16 lines). +Hunk #5 succeeded at 310 (offset 16 lines). DEBUG: p.returncode =  0 [output.py at line 237]  -Output to directory /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg done. +Output to directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg done. Type "launch" to generate events from this process, or see -/data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/README +/data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/README Run "open index.html" to see more information about this process. quit -real 0m1.712s -user 0m1.388s -sys 0m0.318s +real 0m2.447s +user 0m1.940s +sys 0m0.238s ************************************************************ * * * W E L C O M E to * @@ -275,9 +277,10 @@ sys 0m0.318s * Type 'help' for in-line help. * * * ************************************************************ -INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/Cards/me5_configuration.txt -INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/mg5amcnlo/input/mg5_configuration.txt -INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/Cards/me5_configuration.txt +INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/Cards/me5_configuration.txt +INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo/input/mg5_configuration.txt +INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/Cards/me5_configuration.txt +Using default text editor "vi". Set another one in ./input/mg5_configuration.txt Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt treatcards run @@ -304,9 +307,10 @@ launch in debug mode * Type 'help' for in-line help. * * * ************************************************************ -INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/Cards/me5_configuration.txt -INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/mg5amcnlo/input/mg5_configuration.txt -INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/Cards/me5_configuration.txt +INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/Cards/me5_configuration.txt +INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo/input/mg5_configuration.txt +INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/Cards/me5_configuration.txt +Using default text editor "vi". Set another one in ./input/mg5_configuration.txt Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt treatcards param diff --git a/epochX/cudacpp/gg_ttg.mad/Cards/me5_configuration.txt b/epochX/cudacpp/gg_ttg.mad/Cards/me5_configuration.txt index 22f81b5926..cdeedc7863 100644 --- a/epochX/cudacpp/gg_ttg.mad/Cards/me5_configuration.txt +++ b/epochX/cudacpp/gg_ttg.mad/Cards/me5_configuration.txt @@ -234,7 +234,7 @@ # pineappl = pineappl -#mg5_path = /data/stephan/madgraph4gpu/MG5aMC/mg5amcnlo +#mg5_path = /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo # MG5 MAIN DIRECTORY -#mg5_path = /data/stephan/madgraph4gpu/MG5aMC/mg5amcnlo +#mg5_path = /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo diff --git a/epochX/cudacpp/gg_ttg.mad/SubProcesses/makefile b/epochX/cudacpp/gg_ttg.mad/SubProcesses/makefile index d229c1cf4d..b69917ee1f 100644 --- a/epochX/cudacpp/gg_ttg.mad/SubProcesses/makefile +++ b/epochX/cudacpp/gg_ttg.mad/SubProcesses/makefile @@ -18,13 +18,13 @@ help: $(info Or 'ALL' for all C++ and cuda targets) -# Enable ccache if USECCACHE=1 +# Enable ccache for C++ if USECCACHE=1 (do not enable it for Fortran since it is not supported for Fortran) ifeq ($(USECCACHE)$(shell echo $(CXX) | grep ccache),1) override CXX:=ccache $(CXX) endif -ifeq ($(USECCACHE)$(shell echo $(FC) | grep ccache),1) - override FC:=ccache $(FC) -endif +###ifeq ($(USECCACHE)$(shell echo $(FC) | grep ccache),1) +### override FC:=ccache $(FC) +###endif # Load additional dependencies of the bias module, if present ifeq (,$(wildcard ../bias_dependencies)) diff --git a/epochX/cudacpp/gg_ttg.mad/SubProcesses/runTest.cc b/epochX/cudacpp/gg_ttg.mad/SubProcesses/runTest.cc index 734235824a..6c77775fb2 100644 --- a/epochX/cudacpp/gg_ttg.mad/SubProcesses/runTest.cc +++ b/epochX/cudacpp/gg_ttg.mad/SubProcesses/runTest.cc @@ -243,6 +243,7 @@ struct CUDATest : public CUDA_CPU_TestBase // Use two levels of macros to force stringification at the right level // (see https://gcc.gnu.org/onlinedocs/gcc-3.0.1/cpp_3.html#SEC17 and https://stackoverflow.com/a/3419392) // Google macro is in https://github.com/google/googletest/blob/master/googletest/include/gtest/gtest-param-test.h +/* clang-format off */ #define TESTID_CPU( s ) s##_CPU #define XTESTID_CPU( s ) TESTID_CPU( s ) #define MG_INSTANTIATE_TEST_SUITE_CPU( prefix, test_suite_name ) \ @@ -255,6 +256,7 @@ struct CUDATest : public CUDA_CPU_TestBase INSTANTIATE_TEST_SUITE_P( prefix, \ test_suite_name, \ testing::Values( new CUDATest( MG_EPOCH_REFERENCE_FILE_NAME ) ) ); +/* clang-format on */ #ifdef __CUDACC__ MG_INSTANTIATE_TEST_SUITE_GPU( XTESTID_GPU( MG_EPOCH_PROCESS_ID ), MadgraphTest ); diff --git a/epochX/cudacpp/gg_ttgg.mad/CODEGEN_mad_gg_ttgg_log.txt b/epochX/cudacpp/gg_ttgg.mad/CODEGEN_mad_gg_ttgg_log.txt index e54b688aaa..7a61f69d2f 100644 --- a/epochX/cudacpp/gg_ttgg.mad/CODEGEN_mad_gg_ttgg_log.txt +++ b/epochX/cudacpp/gg_ttgg.mad/CODEGEN_mad_gg_ttgg_log.txt @@ -50,9 +50,10 @@ Please set the 'lhapdf' variable to the (absolute) /PATH/TO/lhapdf-config (inclu Note that you can still compile and run aMC@NLO with the built-in PDFs MG5_aMC> set lhapdf /PATH/TO/lhapdf-config +Using default text editor "vi". Set another one in ./input/mg5_configuration.txt Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt -import /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg.mg +import /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg.mg The import format was not given, so we guess it as command set stdout_level DEBUG set output information to level: 10 @@ -61,7 +62,7 @@ generate g g > t t~ g g No model currently active, so we import the Standard Model INFO: load particles INFO: load vertices -DEBUG: model prefixing takes 0.0035104751586914062  +DEBUG: model prefixing takes 0.005710124969482422  INFO: Restrict model sm with file models/sm/restrict_default.dat . DEBUG: Simplifying conditional expressions  DEBUG: remove interactions: u s w+ at order: QED=1  @@ -154,7 +155,7 @@ INFO: Please specify coupling orders to bypass this step. INFO: Trying coupling order WEIGHTED<=4: WEIGTHED IS QCD+2*QED INFO: Trying process: g g > t t~ g g WEIGHTED<=4 @1 INFO: Process has 123 diagrams -1 processes with 123 diagrams generated in 0.113 s +1 processes with 123 diagrams generated in 0.156 s Total: 1 processes with 123 diagrams output madevent ../TMPOUT/CODEGEN_mad_gg_ttgg --hel_recycling=False --vector_size=32 --me_exporter=standalone_cudacpp Load PLUGIN.CUDACPP_OUTPUT @@ -165,16 +166,16 @@ Load PLUGIN.CUDACPP_OUTPUT INFO: initialize a new directory: CODEGEN_mad_gg_ttgg INFO: remove old information in CODEGEN_mad_gg_ttgg DEBUG: Entering PLUGIN_ProcessExporter.copy_template (initialise the directory) [output.py at line 165]  -WARNING: File exists /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg  -INFO: Creating subdirectories in directory /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg -WARNING: File exists /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/Cards  -WARNING: File exists /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/SubProcesses  +WARNING: File exists /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg  +INFO: Creating subdirectories in directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg +WARNING: File exists /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/Cards  +WARNING: File exists /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/SubProcesses  INFO: Organizing processes into subprocess groups INFO: Generating Helas calls for process: g g > t t~ g g WEIGHTED<=4 @1 INFO: Processing color information for process: g g > t t~ g g @1 INFO: Creating files in directory P1_gg_ttxgg DEBUG: kwargs[prefix] = 0 [model_handling.py at line 1058]  -DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  +DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  INFO: Creating files in directory . FileWriter for ././CPPProcess.h FileWriter for ././CPPProcess.cc @@ -189,15 +190,15 @@ INFO: Created files CPPProcess.h and CPPProcess.cc in directory ./. DEBUG: vector, subproc_group,self.opt['vector_size'] =  32 True 32 [export_v4.py at line 1872]  INFO: Generating Feynman diagrams for Process: g g > t t~ g g WEIGHTED<=4 @1 INFO: Finding symmetric diagrams for subprocess group gg_ttxgg -Generated helas calls for 1 subprocesses (123 diagrams) in 0.300 s -Wrote files for 222 helas calls in 0.469 s +Generated helas calls for 1 subprocesses (123 diagrams) in 0.418 s +Wrote files for 222 helas calls in 0.683 s ALOHA: aloha starts to compute helicity amplitudes ALOHA: aloha creates VVV1 routines ALOHA: aloha creates FFV1 routines ALOHA: aloha creates VVVV1 routines ALOHA: aloha creates VVVV3 routines ALOHA: aloha creates VVVV4 routines -ALOHA: aloha creates 5 routines in 0.222 s +ALOHA: aloha creates 5 routines in 0.327 s DEBUG: Entering PLUGIN_ProcessExporter.convert_model (create the model) [output.py at line 202]  ALOHA: aloha starts to compute helicity amplitudes ALOHA: aloha creates VVV1 routines @@ -205,7 +206,7 @@ ALOHA: aloha creates FFV1 routines ALOHA: aloha creates VVVV1 routines ALOHA: aloha creates VVVV3 routines ALOHA: aloha creates VVVV4 routines -ALOHA: aloha creates 10 routines in 0.201 s +ALOHA: aloha creates 10 routines in 0.309 s VVV1 VVV1 FFV1 @@ -218,50 +219,47 @@ ALOHA: aloha creates 10 routines in 0.201 s VVVV3 VVVV4 VVVV4 -FileWriter for /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/src/./HelAmps_sm.h -INFO: Created file HelAmps_sm.h in directory /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/src/. +FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/src/./HelAmps_sm.h +INFO: Created file HelAmps_sm.h in directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/src/. super_write_set_parameters_onlyfixMajorana (hardcoded=False) super_write_set_parameters_onlyfixMajorana (hardcoded=True) -FileWriter for /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/src/./Parameters_sm.h -FileWriter for /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/src/./Parameters_sm.cc +FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/src/./Parameters_sm.h +FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/src/./Parameters_sm.cc INFO: Created files Parameters_sm.h and Parameters_sm.cc in directory -INFO: /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/src/. and /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/src/. +INFO: /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/src/. and /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/src/. The option zerowidth_tchannel is modified [True] but will not be written in the configuration files. If you want to make this value the default for future session, you can run 'save options --all' -save configuration file to /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/Cards/me5_configuration.txt +save configuration file to /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/Cards/me5_configuration.txt INFO: Use Fortran compiler gfortran INFO: Use c++ compiler g++ INFO: Generate web pages -DEBUG: cd /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg; patch -p4 -i /data/stephan/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common +DEBUG: standardise /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/Source/make_opts (fix f2py3 and sort make_opts_variables) before applying patch.common +DEBUG: cd /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg; patch -p4 -i /data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common patching file Source/genps.inc patching file Source/make_opts -Hunk #1 succeeded at 12 (offset -1 lines). -Hunk #2 succeeded at 70 (offset -1 lines). -Hunk #3 succeeded at 117 (offset -1 lines). -Hunk #4 succeeded at 128 (offset -1 lines). patching file Source/makefile patching file SubProcesses/makefile patching file bin/internal/banner.py patching file bin/internal/gen_ximprove.py patching file bin/internal/madevent_interface.py -DEBUG: cd /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/SubProcesses/P1_gg_ttxgg; patch -p6 -i /data/stephan/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 +DEBUG: cd /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/SubProcesses/P1_gg_ttxgg; patch -p6 -i /data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 patching file auto_dsig1.f patching file driver.f patching file matrix1.f -Hunk #2 succeeded at 191 (offset 32 lines). -Hunk #3 succeeded at 269 (offset 32 lines). -Hunk #4 succeeded at 297 (offset 32 lines). -Hunk #5 succeeded at 342 (offset 32 lines). +Hunk #2 succeeded at 191 (offset 48 lines). +Hunk #3 succeeded at 269 (offset 48 lines). +Hunk #4 succeeded at 297 (offset 48 lines). +Hunk #5 succeeded at 342 (offset 48 lines). DEBUG: p.returncode =  0 [output.py at line 237]  -Output to directory /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg done. +Output to directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg done. Type "launch" to generate events from this process, or see -/data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/README +/data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/README Run "open index.html" to see more information about this process. quit -real 0m2.453s -user 0m2.110s -sys 0m0.342s +real 0m3.244s +user 0m3.007s +sys 0m0.230s ************************************************************ * * * W E L C O M E to * @@ -282,9 +280,10 @@ sys 0m0.342s * Type 'help' for in-line help. * * * ************************************************************ -INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/Cards/me5_configuration.txt -INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/mg5amcnlo/input/mg5_configuration.txt -INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/Cards/me5_configuration.txt +INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/Cards/me5_configuration.txt +INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo/input/mg5_configuration.txt +INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/Cards/me5_configuration.txt +Using default text editor "vi". Set another one in ./input/mg5_configuration.txt Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt treatcards run @@ -311,9 +310,10 @@ launch in debug mode * Type 'help' for in-line help. * * * ************************************************************ -INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/Cards/me5_configuration.txt -INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/mg5amcnlo/input/mg5_configuration.txt -INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/Cards/me5_configuration.txt +INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/Cards/me5_configuration.txt +INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo/input/mg5_configuration.txt +INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/Cards/me5_configuration.txt +Using default text editor "vi". Set another one in ./input/mg5_configuration.txt Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt treatcards param diff --git a/epochX/cudacpp/gg_ttgg.mad/Cards/me5_configuration.txt b/epochX/cudacpp/gg_ttgg.mad/Cards/me5_configuration.txt index 22f81b5926..cdeedc7863 100644 --- a/epochX/cudacpp/gg_ttgg.mad/Cards/me5_configuration.txt +++ b/epochX/cudacpp/gg_ttgg.mad/Cards/me5_configuration.txt @@ -234,7 +234,7 @@ # pineappl = pineappl -#mg5_path = /data/stephan/madgraph4gpu/MG5aMC/mg5amcnlo +#mg5_path = /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo # MG5 MAIN DIRECTORY -#mg5_path = /data/stephan/madgraph4gpu/MG5aMC/mg5amcnlo +#mg5_path = /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo diff --git a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/makefile b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/makefile index d229c1cf4d..b69917ee1f 100644 --- a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/makefile +++ b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/makefile @@ -18,13 +18,13 @@ help: $(info Or 'ALL' for all C++ and cuda targets) -# Enable ccache if USECCACHE=1 +# Enable ccache for C++ if USECCACHE=1 (do not enable it for Fortran since it is not supported for Fortran) ifeq ($(USECCACHE)$(shell echo $(CXX) | grep ccache),1) override CXX:=ccache $(CXX) endif -ifeq ($(USECCACHE)$(shell echo $(FC) | grep ccache),1) - override FC:=ccache $(FC) -endif +###ifeq ($(USECCACHE)$(shell echo $(FC) | grep ccache),1) +### override FC:=ccache $(FC) +###endif # Load additional dependencies of the bias module, if present ifeq (,$(wildcard ../bias_dependencies)) diff --git a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/runTest.cc b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/runTest.cc index 734235824a..6c77775fb2 100644 --- a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/runTest.cc +++ b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/runTest.cc @@ -243,6 +243,7 @@ struct CUDATest : public CUDA_CPU_TestBase // Use two levels of macros to force stringification at the right level // (see https://gcc.gnu.org/onlinedocs/gcc-3.0.1/cpp_3.html#SEC17 and https://stackoverflow.com/a/3419392) // Google macro is in https://github.com/google/googletest/blob/master/googletest/include/gtest/gtest-param-test.h +/* clang-format off */ #define TESTID_CPU( s ) s##_CPU #define XTESTID_CPU( s ) TESTID_CPU( s ) #define MG_INSTANTIATE_TEST_SUITE_CPU( prefix, test_suite_name ) \ @@ -255,6 +256,7 @@ struct CUDATest : public CUDA_CPU_TestBase INSTANTIATE_TEST_SUITE_P( prefix, \ test_suite_name, \ testing::Values( new CUDATest( MG_EPOCH_REFERENCE_FILE_NAME ) ) ); +/* clang-format on */ #ifdef __CUDACC__ MG_INSTANTIATE_TEST_SUITE_GPU( XTESTID_GPU( MG_EPOCH_PROCESS_ID ), MadgraphTest ); diff --git a/epochX/cudacpp/gg_ttggg.mad/CODEGEN_mad_gg_ttggg_log.txt b/epochX/cudacpp/gg_ttggg.mad/CODEGEN_mad_gg_ttggg_log.txt index 748f18be44..663423dec4 100644 --- a/epochX/cudacpp/gg_ttggg.mad/CODEGEN_mad_gg_ttggg_log.txt +++ b/epochX/cudacpp/gg_ttggg.mad/CODEGEN_mad_gg_ttggg_log.txt @@ -50,9 +50,10 @@ Please set the 'lhapdf' variable to the (absolute) /PATH/TO/lhapdf-config (inclu Note that you can still compile and run aMC@NLO with the built-in PDFs MG5_aMC> set lhapdf /PATH/TO/lhapdf-config +Using default text editor "vi". Set another one in ./input/mg5_configuration.txt Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt -import /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg.mg +import /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg.mg The import format was not given, so we guess it as command set stdout_level DEBUG set output information to level: 10 @@ -61,7 +62,7 @@ generate g g > t t~ g g g No model currently active, so we import the Standard Model INFO: load particles INFO: load vertices -DEBUG: model prefixing takes 0.0035386085510253906  +DEBUG: model prefixing takes 0.005719900131225586  INFO: Restrict model sm with file models/sm/restrict_default.dat . DEBUG: Simplifying conditional expressions  DEBUG: remove interactions: u s w+ at order: QED=1  @@ -154,7 +155,7 @@ INFO: Please specify coupling orders to bypass this step. INFO: Trying coupling order WEIGHTED<=5: WEIGTHED IS QCD+2*QED INFO: Trying process: g g > t t~ g g g WEIGHTED<=5 @1 INFO: Process has 1240 diagrams -1 processes with 1240 diagrams generated in 1.316 s +1 processes with 1240 diagrams generated in 1.854 s Total: 1 processes with 1240 diagrams output madevent ../TMPOUT/CODEGEN_mad_gg_ttggg --hel_recycling=False --vector_size=32 --me_exporter=standalone_cudacpp Load PLUGIN.CUDACPP_OUTPUT @@ -165,18 +166,18 @@ Load PLUGIN.CUDACPP_OUTPUT INFO: initialize a new directory: CODEGEN_mad_gg_ttggg INFO: remove old information in CODEGEN_mad_gg_ttggg DEBUG: Entering PLUGIN_ProcessExporter.copy_template (initialise the directory) [output.py at line 165]  -WARNING: File exists /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg  -INFO: Creating subdirectories in directory /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg -WARNING: File exists /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/Cards  -WARNING: File exists /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/SubProcesses  +WARNING: File exists /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg  +INFO: Creating subdirectories in directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg +WARNING: File exists /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/Cards  +WARNING: File exists /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/SubProcesses  INFO: Organizing processes into subprocess groups INFO: Generating Helas calls for process: g g > t t~ g g g WEIGHTED<=5 @1 INFO: Processing color information for process: g g > t t~ g g g @1 INFO: Creating files in directory P1_gg_ttxggg INFO: Computing Color-Flow optimization [15120 term] -INFO: Color-Flow passed to 1630 term in 5s. Introduce 3030 contraction +INFO: Color-Flow passed to 1630 term in 8s. Introduce 3030 contraction DEBUG: kwargs[prefix] = 0 [model_handling.py at line 1058]  -DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  +DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  INFO: Creating files in directory . FileWriter for ././CPPProcess.h FileWriter for ././CPPProcess.cc @@ -191,15 +192,15 @@ INFO: Created files CPPProcess.h and CPPProcess.cc in directory ./. DEBUG: vector, subproc_group,self.opt['vector_size'] =  32 True 32 [export_v4.py at line 1872]  INFO: Generating Feynman diagrams for Process: g g > t t~ g g g WEIGHTED<=5 @1 INFO: Finding symmetric diagrams for subprocess group gg_ttxggg -Generated helas calls for 1 subprocesses (1240 diagrams) in 4.473 s -Wrote files for 2281 helas calls in 11.839 s +Generated helas calls for 1 subprocesses (1240 diagrams) in 6.496 s +Wrote files for 2281 helas calls in 18.410 s ALOHA: aloha starts to compute helicity amplitudes ALOHA: aloha creates VVV1 routines ALOHA: aloha creates FFV1 routines ALOHA: aloha creates VVVV1 routines ALOHA: aloha creates VVVV3 routines ALOHA: aloha creates VVVV4 routines -ALOHA: aloha creates 5 routines in 0.206 s +ALOHA: aloha creates 5 routines in 0.315 s DEBUG: Entering PLUGIN_ProcessExporter.convert_model (create the model) [output.py at line 202]  ALOHA: aloha starts to compute helicity amplitudes ALOHA: aloha creates VVV1 routines @@ -207,7 +208,7 @@ ALOHA: aloha creates FFV1 routines ALOHA: aloha creates VVVV1 routines ALOHA: aloha creates VVVV3 routines ALOHA: aloha creates VVVV4 routines -ALOHA: aloha creates 10 routines in 0.199 s +ALOHA: aloha creates 10 routines in 0.308 s VVV1 VVV1 FFV1 @@ -220,50 +221,47 @@ ALOHA: aloha creates 10 routines in 0.199 s VVVV3 VVVV4 VVVV4 -FileWriter for /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/src/./HelAmps_sm.h -INFO: Created file HelAmps_sm.h in directory /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/src/. +FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/src/./HelAmps_sm.h +INFO: Created file HelAmps_sm.h in directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/src/. super_write_set_parameters_onlyfixMajorana (hardcoded=False) super_write_set_parameters_onlyfixMajorana (hardcoded=True) -FileWriter for /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/src/./Parameters_sm.h -FileWriter for /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/src/./Parameters_sm.cc +FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/src/./Parameters_sm.h +FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/src/./Parameters_sm.cc INFO: Created files Parameters_sm.h and Parameters_sm.cc in directory -INFO: /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/src/. and /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/src/. +INFO: /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/src/. and /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/src/. The option zerowidth_tchannel is modified [True] but will not be written in the configuration files. If you want to make this value the default for future session, you can run 'save options --all' -save configuration file to /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/Cards/me5_configuration.txt +save configuration file to /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/Cards/me5_configuration.txt INFO: Use Fortran compiler gfortran INFO: Use c++ compiler g++ INFO: Generate web pages -DEBUG: cd /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg; patch -p4 -i /data/stephan/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common +DEBUG: standardise /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/Source/make_opts (fix f2py3 and sort make_opts_variables) before applying patch.common +DEBUG: cd /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg; patch -p4 -i /data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common patching file Source/genps.inc patching file Source/make_opts -Hunk #1 succeeded at 12 (offset -1 lines). -Hunk #2 succeeded at 70 (offset -1 lines). -Hunk #3 succeeded at 117 (offset -1 lines). -Hunk #4 succeeded at 128 (offset -1 lines). patching file Source/makefile patching file SubProcesses/makefile patching file bin/internal/banner.py patching file bin/internal/gen_ximprove.py patching file bin/internal/madevent_interface.py -DEBUG: cd /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/SubProcesses/P1_gg_ttxggg; patch -p6 -i /data/stephan/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 +DEBUG: cd /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/SubProcesses/P1_gg_ttxggg; patch -p6 -i /data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 patching file auto_dsig1.f patching file driver.f patching file matrix1.f -Hunk #2 succeeded at 255 (offset 96 lines). -Hunk #3 succeeded at 333 (offset 96 lines). -Hunk #4 succeeded at 361 (offset 96 lines). -Hunk #5 succeeded at 406 (offset 96 lines). +Hunk #2 succeeded at 255 (offset 112 lines). +Hunk #3 succeeded at 333 (offset 112 lines). +Hunk #4 succeeded at 361 (offset 112 lines). +Hunk #5 succeeded at 406 (offset 112 lines). DEBUG: p.returncode =  0 [output.py at line 237]  -Output to directory /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg done. +Output to directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg done. Type "launch" to generate events from this process, or see -/data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/README +/data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/README Run "open index.html" to see more information about this process. quit -real 0m19.434s -user 0m18.888s -sys 0m0.545s +real 0m29.000s +user 0m28.472s +sys 0m0.425s ************************************************************ * * * W E L C O M E to * @@ -284,9 +282,10 @@ sys 0m0.545s * Type 'help' for in-line help. * * * ************************************************************ -INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/Cards/me5_configuration.txt -INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/mg5amcnlo/input/mg5_configuration.txt -INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/Cards/me5_configuration.txt +INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/Cards/me5_configuration.txt +INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo/input/mg5_configuration.txt +INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/Cards/me5_configuration.txt +Using default text editor "vi". Set another one in ./input/mg5_configuration.txt Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt treatcards run @@ -313,9 +312,10 @@ launch in debug mode * Type 'help' for in-line help. * * * ************************************************************ -INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/Cards/me5_configuration.txt -INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/mg5amcnlo/input/mg5_configuration.txt -INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/Cards/me5_configuration.txt +INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/Cards/me5_configuration.txt +INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo/input/mg5_configuration.txt +INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/Cards/me5_configuration.txt +Using default text editor "vi". Set another one in ./input/mg5_configuration.txt Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt treatcards param diff --git a/epochX/cudacpp/gg_ttggg.mad/Cards/me5_configuration.txt b/epochX/cudacpp/gg_ttggg.mad/Cards/me5_configuration.txt index 22f81b5926..cdeedc7863 100644 --- a/epochX/cudacpp/gg_ttggg.mad/Cards/me5_configuration.txt +++ b/epochX/cudacpp/gg_ttggg.mad/Cards/me5_configuration.txt @@ -234,7 +234,7 @@ # pineappl = pineappl -#mg5_path = /data/stephan/madgraph4gpu/MG5aMC/mg5amcnlo +#mg5_path = /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo # MG5 MAIN DIRECTORY -#mg5_path = /data/stephan/madgraph4gpu/MG5aMC/mg5amcnlo +#mg5_path = /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo diff --git a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/makefile b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/makefile index d229c1cf4d..b69917ee1f 100644 --- a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/makefile +++ b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/makefile @@ -18,13 +18,13 @@ help: $(info Or 'ALL' for all C++ and cuda targets) -# Enable ccache if USECCACHE=1 +# Enable ccache for C++ if USECCACHE=1 (do not enable it for Fortran since it is not supported for Fortran) ifeq ($(USECCACHE)$(shell echo $(CXX) | grep ccache),1) override CXX:=ccache $(CXX) endif -ifeq ($(USECCACHE)$(shell echo $(FC) | grep ccache),1) - override FC:=ccache $(FC) -endif +###ifeq ($(USECCACHE)$(shell echo $(FC) | grep ccache),1) +### override FC:=ccache $(FC) +###endif # Load additional dependencies of the bias module, if present ifeq (,$(wildcard ../bias_dependencies)) diff --git a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/runTest.cc b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/runTest.cc index 734235824a..6c77775fb2 100644 --- a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/runTest.cc +++ b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/runTest.cc @@ -243,6 +243,7 @@ struct CUDATest : public CUDA_CPU_TestBase // Use two levels of macros to force stringification at the right level // (see https://gcc.gnu.org/onlinedocs/gcc-3.0.1/cpp_3.html#SEC17 and https://stackoverflow.com/a/3419392) // Google macro is in https://github.com/google/googletest/blob/master/googletest/include/gtest/gtest-param-test.h +/* clang-format off */ #define TESTID_CPU( s ) s##_CPU #define XTESTID_CPU( s ) TESTID_CPU( s ) #define MG_INSTANTIATE_TEST_SUITE_CPU( prefix, test_suite_name ) \ @@ -255,6 +256,7 @@ struct CUDATest : public CUDA_CPU_TestBase INSTANTIATE_TEST_SUITE_P( prefix, \ test_suite_name, \ testing::Values( new CUDATest( MG_EPOCH_REFERENCE_FILE_NAME ) ) ); +/* clang-format on */ #ifdef __CUDACC__ MG_INSTANTIATE_TEST_SUITE_GPU( XTESTID_GPU( MG_EPOCH_PROCESS_ID ), MadgraphTest ); diff --git a/epochX/cudacpp/gq_ttq.mad/CODEGEN_mad_gq_ttq_log.txt b/epochX/cudacpp/gq_ttq.mad/CODEGEN_mad_gq_ttq_log.txt index e5595e0bf5..e60a4a53d5 100644 --- a/epochX/cudacpp/gq_ttq.mad/CODEGEN_mad_gq_ttq_log.txt +++ b/epochX/cudacpp/gq_ttq.mad/CODEGEN_mad_gq_ttq_log.txt @@ -50,9 +50,10 @@ Please set the 'lhapdf' variable to the (absolute) /PATH/TO/lhapdf-config (inclu Note that you can still compile and run aMC@NLO with the built-in PDFs MG5_aMC> set lhapdf /PATH/TO/lhapdf-config +Using default text editor "vi". Set another one in ./input/mg5_configuration.txt Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt -import /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq.mg +import /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq.mg The import format was not given, so we guess it as command set stdout_level DEBUG set output information to level: 10 @@ -60,7 +61,7 @@ set zerowidth_tchannel F define q = u c d s u~ c~ d~ s~ INFO: load particles INFO: load vertices -DEBUG: model prefixing takes 0.003381490707397461  +DEBUG: model prefixing takes 0.005306720733642578  INFO: Restrict model sm with file models/sm/restrict_default.dat . DEBUG: Simplifying conditional expressions  DEBUG: remove interactions: u s w+ at order: QED=1  @@ -169,7 +170,7 @@ INFO: Crossed process found for g u~ > t t~ u~, reuse diagrams. INFO: Crossed process found for g c~ > t t~ c~, reuse diagrams. INFO: Crossed process found for g d~ > t t~ d~, reuse diagrams. INFO: Crossed process found for g s~ > t t~ s~, reuse diagrams. -8 processes with 40 diagrams generated in 0.055 s +8 processes with 40 diagrams generated in 0.078 s Total: 8 processes with 40 diagrams output madevent ../TMPOUT/CODEGEN_mad_gq_ttq --hel_recycling=False --vector_size=32 --me_exporter=standalone_cudacpp Load PLUGIN.CUDACPP_OUTPUT @@ -180,10 +181,10 @@ Load PLUGIN.CUDACPP_OUTPUT INFO: initialize a new directory: CODEGEN_mad_gq_ttq INFO: remove old information in CODEGEN_mad_gq_ttq DEBUG: Entering PLUGIN_ProcessExporter.copy_template (initialise the directory) [output.py at line 165]  -WARNING: File exists /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq  -INFO: Creating subdirectories in directory /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq -WARNING: File exists /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/Cards  -WARNING: File exists /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/SubProcesses  +WARNING: File exists /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq  +INFO: Creating subdirectories in directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq +WARNING: File exists /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/Cards  +WARNING: File exists /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/SubProcesses  INFO: Organizing processes into subprocess groups INFO: Generating Helas calls for process: g u > t t~ u WEIGHTED<=3 @1 INFO: Processing color information for process: g u > t t~ u @1 @@ -197,7 +198,7 @@ INFO: Combined process g d~ > t t~ d~ WEIGHTED<=3 @1 with process g u~ > t t~ u~ INFO: Combined process g s~ > t t~ s~ WEIGHTED<=3 @1 with process g u~ > t t~ u~ WEIGHTED<=3 @1 INFO: Creating files in directory P1_gu_ttxu DEBUG: kwargs[prefix] = 0 [model_handling.py at line 1058]  -DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  +DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  INFO: Creating files in directory . FileWriter for ././CPPProcess.h FileWriter for ././CPPProcess.cc @@ -214,7 +215,7 @@ INFO: Generating Feynman diagrams for Process: g u > t t~ u WEIGHTED<=3 @1 INFO: Finding symmetric diagrams for subprocess group gu_ttxu INFO: Creating files in directory P1_gux_ttxux DEBUG: kwargs[prefix] = 0 [model_handling.py at line 1058]  -DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  +DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  INFO: Creating files in directory . FileWriter for ././CPPProcess.h FileWriter for ././CPPProcess.cc @@ -229,78 +230,75 @@ INFO: Created files CPPProcess.h and CPPProcess.cc in directory ./. DEBUG: vector, subproc_group,self.opt['vector_size'] =  32 True 32 [export_v4.py at line 1872]  INFO: Generating Feynman diagrams for Process: g u~ > t t~ u~ WEIGHTED<=3 @1 INFO: Finding symmetric diagrams for subprocess group gux_ttxux -Generated helas calls for 2 subprocesses (10 diagrams) in 0.022 s -Wrote files for 32 helas calls in 0.162 s +Generated helas calls for 2 subprocesses (10 diagrams) in 0.030 s +Wrote files for 32 helas calls in 0.216 s ALOHA: aloha starts to compute helicity amplitudes ALOHA: aloha creates FFV1 routines ALOHA: aloha creates VVV1 routines -ALOHA: aloha creates 2 routines in 0.098 s +ALOHA: aloha creates 2 routines in 0.147 s DEBUG: Entering PLUGIN_ProcessExporter.convert_model (create the model) [output.py at line 202]  ALOHA: aloha starts to compute helicity amplitudes ALOHA: aloha creates FFV1 routines ALOHA: aloha creates VVV1 routines -ALOHA: aloha creates 4 routines in 0.086 s +ALOHA: aloha creates 4 routines in 0.129 s FFV1 FFV1 FFV1 FFV1 VVV1 -FileWriter for /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/src/./HelAmps_sm.h -INFO: Created file HelAmps_sm.h in directory /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/src/. +FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/src/./HelAmps_sm.h +INFO: Created file HelAmps_sm.h in directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/src/. super_write_set_parameters_onlyfixMajorana (hardcoded=False) super_write_set_parameters_onlyfixMajorana (hardcoded=True) -FileWriter for /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/src/./Parameters_sm.h -FileWriter for /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/src/./Parameters_sm.cc +FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/src/./Parameters_sm.h +FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/src/./Parameters_sm.cc INFO: Created files Parameters_sm.h and Parameters_sm.cc in directory -INFO: /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/src/. and /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/src/. +INFO: /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/src/. and /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/src/. The option zerowidth_tchannel is modified [True] but will not be written in the configuration files. If you want to make this value the default for future session, you can run 'save options --all' -save configuration file to /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/Cards/me5_configuration.txt +save configuration file to /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/Cards/me5_configuration.txt INFO: Use Fortran compiler gfortran INFO: Use c++ compiler g++ INFO: Generate web pages -DEBUG: cd /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq; patch -p4 -i /data/stephan/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common +DEBUG: standardise /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/Source/make_opts (fix f2py3 and sort make_opts_variables) before applying patch.common +DEBUG: cd /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq; patch -p4 -i /data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common patching file Source/genps.inc patching file Source/make_opts -Hunk #1 succeeded at 12 (offset -1 lines). -Hunk #2 succeeded at 70 (offset -1 lines). -Hunk #3 succeeded at 117 (offset -1 lines). -Hunk #4 succeeded at 128 (offset -1 lines). patching file Source/makefile patching file SubProcesses/makefile patching file bin/internal/banner.py patching file bin/internal/gen_ximprove.py patching file bin/internal/madevent_interface.py -DEBUG: cd /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/SubProcesses/P1_gu_ttxu; patch -p6 -i /data/stephan/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 +DEBUG: cd /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/SubProcesses/P1_gu_ttxu; patch -p6 -i /data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 patching file auto_dsig1.f Hunk #1 succeeded at 528 (offset 44 lines). patching file driver.f patching file matrix1.f Hunk #1 succeeded at 75 (offset 3 lines). -Hunk #2 succeeded at 162 (offset 3 lines). -Hunk #3 succeeded at 247 (offset 10 lines). -Hunk #4 succeeded at 281 (offset 16 lines). -Hunk #5 succeeded at 326 (offset 16 lines). -DEBUG: cd /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/SubProcesses/P1_gux_ttxux; patch -p6 -i /data/stephan/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 +Hunk #2 succeeded at 162 (offset 19 lines). +Hunk #3 succeeded at 247 (offset 26 lines). +Hunk #4 succeeded at 281 (offset 32 lines). +Hunk #5 succeeded at 326 (offset 32 lines). +DEBUG: cd /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/SubProcesses/P1_gux_ttxux; patch -p6 -i /data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 patching file auto_dsig1.f Hunk #1 succeeded at 528 (offset 44 lines). patching file driver.f patching file matrix1.f Hunk #1 succeeded at 75 (offset 3 lines). -Hunk #2 succeeded at 162 (offset 3 lines). -Hunk #3 succeeded at 247 (offset 10 lines). -Hunk #4 succeeded at 281 (offset 16 lines). -Hunk #5 succeeded at 326 (offset 16 lines). +Hunk #2 succeeded at 162 (offset 19 lines). +Hunk #3 succeeded at 247 (offset 26 lines). +Hunk #4 succeeded at 281 (offset 32 lines). +Hunk #5 succeeded at 326 (offset 32 lines). DEBUG: p.returncode =  0 [output.py at line 237]  -Output to directory /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq done. +Output to directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq done. Type "launch" to generate events from this process, or see -/data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/README +/data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/README Run "open index.html" to see more information about this process. quit -real 0m1.511s -user 0m1.209s -sys 0m0.300s +real 0m1.929s +user 0m1.681s +sys 0m0.247s ************************************************************ * * * W E L C O M E to * @@ -321,9 +319,10 @@ sys 0m0.300s * Type 'help' for in-line help. * * * ************************************************************ -INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/Cards/me5_configuration.txt -INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/mg5amcnlo/input/mg5_configuration.txt -INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/Cards/me5_configuration.txt +INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/Cards/me5_configuration.txt +INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo/input/mg5_configuration.txt +INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/Cards/me5_configuration.txt +Using default text editor "vi". Set another one in ./input/mg5_configuration.txt Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt treatcards run @@ -350,9 +349,10 @@ launch in debug mode * Type 'help' for in-line help. * * * ************************************************************ -INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/Cards/me5_configuration.txt -INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/mg5amcnlo/input/mg5_configuration.txt -INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/Cards/me5_configuration.txt +INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/Cards/me5_configuration.txt +INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo/input/mg5_configuration.txt +INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/Cards/me5_configuration.txt +Using default text editor "vi". Set another one in ./input/mg5_configuration.txt Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt treatcards param diff --git a/epochX/cudacpp/gq_ttq.mad/Cards/me5_configuration.txt b/epochX/cudacpp/gq_ttq.mad/Cards/me5_configuration.txt index 22f81b5926..cdeedc7863 100644 --- a/epochX/cudacpp/gq_ttq.mad/Cards/me5_configuration.txt +++ b/epochX/cudacpp/gq_ttq.mad/Cards/me5_configuration.txt @@ -234,7 +234,7 @@ # pineappl = pineappl -#mg5_path = /data/stephan/madgraph4gpu/MG5aMC/mg5amcnlo +#mg5_path = /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo # MG5 MAIN DIRECTORY -#mg5_path = /data/stephan/madgraph4gpu/MG5aMC/mg5amcnlo +#mg5_path = /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo diff --git a/epochX/cudacpp/gq_ttq.mad/SubProcesses/makefile b/epochX/cudacpp/gq_ttq.mad/SubProcesses/makefile index d229c1cf4d..b69917ee1f 100644 --- a/epochX/cudacpp/gq_ttq.mad/SubProcesses/makefile +++ b/epochX/cudacpp/gq_ttq.mad/SubProcesses/makefile @@ -18,13 +18,13 @@ help: $(info Or 'ALL' for all C++ and cuda targets) -# Enable ccache if USECCACHE=1 +# Enable ccache for C++ if USECCACHE=1 (do not enable it for Fortran since it is not supported for Fortran) ifeq ($(USECCACHE)$(shell echo $(CXX) | grep ccache),1) override CXX:=ccache $(CXX) endif -ifeq ($(USECCACHE)$(shell echo $(FC) | grep ccache),1) - override FC:=ccache $(FC) -endif +###ifeq ($(USECCACHE)$(shell echo $(FC) | grep ccache),1) +### override FC:=ccache $(FC) +###endif # Load additional dependencies of the bias module, if present ifeq (,$(wildcard ../bias_dependencies)) diff --git a/epochX/cudacpp/gq_ttq.mad/SubProcesses/runTest.cc b/epochX/cudacpp/gq_ttq.mad/SubProcesses/runTest.cc index 734235824a..6c77775fb2 100644 --- a/epochX/cudacpp/gq_ttq.mad/SubProcesses/runTest.cc +++ b/epochX/cudacpp/gq_ttq.mad/SubProcesses/runTest.cc @@ -243,6 +243,7 @@ struct CUDATest : public CUDA_CPU_TestBase // Use two levels of macros to force stringification at the right level // (see https://gcc.gnu.org/onlinedocs/gcc-3.0.1/cpp_3.html#SEC17 and https://stackoverflow.com/a/3419392) // Google macro is in https://github.com/google/googletest/blob/master/googletest/include/gtest/gtest-param-test.h +/* clang-format off */ #define TESTID_CPU( s ) s##_CPU #define XTESTID_CPU( s ) TESTID_CPU( s ) #define MG_INSTANTIATE_TEST_SUITE_CPU( prefix, test_suite_name ) \ @@ -255,6 +256,7 @@ struct CUDATest : public CUDA_CPU_TestBase INSTANTIATE_TEST_SUITE_P( prefix, \ test_suite_name, \ testing::Values( new CUDATest( MG_EPOCH_REFERENCE_FILE_NAME ) ) ); +/* clang-format on */ #ifdef __CUDACC__ MG_INSTANTIATE_TEST_SUITE_GPU( XTESTID_GPU( MG_EPOCH_PROCESS_ID ), MadgraphTest ); diff --git a/epochX/cudacpp/pp_tt012j.mad/CODEGEN_mad_pp_tt012j_log.txt b/epochX/cudacpp/pp_tt012j.mad/CODEGEN_mad_pp_tt012j_log.txt index 44f5de8e00..e906078545 100644 --- a/epochX/cudacpp/pp_tt012j.mad/CODEGEN_mad_pp_tt012j_log.txt +++ b/epochX/cudacpp/pp_tt012j.mad/CODEGEN_mad_pp_tt012j_log.txt @@ -50,9 +50,10 @@ Please set the 'lhapdf' variable to the (absolute) /PATH/TO/lhapdf-config (inclu Note that you can still compile and run aMC@NLO with the built-in PDFs MG5_aMC> set lhapdf /PATH/TO/lhapdf-config +Using default text editor "vi". Set another one in ./input/mg5_configuration.txt Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt -import /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j.mg +import /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j.mg The import format was not given, so we guess it as command set stdout_level DEBUG set output information to level: 10 @@ -60,7 +61,7 @@ set zerowidth_tchannel F define j = p INFO: load particles INFO: load vertices -DEBUG: model prefixing takes 0.003490924835205078  +DEBUG: model prefixing takes 0.005285501480102539  INFO: Restrict model sm with file models/sm/restrict_default.dat . DEBUG: Simplifying conditional expressions  DEBUG: remove interactions: u s w+ at order: QED=1  @@ -171,7 +172,7 @@ INFO: Process u~ u > t t~ added to mirror process u u~ > t t~ INFO: Process c~ c > t t~ added to mirror process c c~ > t t~ INFO: Process d~ d > t t~ added to mirror process d d~ > t t~ INFO: Process s~ s > t t~ added to mirror process s s~ > t t~ -5 processes with 7 diagrams generated in 0.021 s +5 processes with 7 diagrams generated in 0.030 s Total: 5 processes with 7 diagrams add process p p > t t~ j @1 INFO: Checking for minimal orders which gives processes. @@ -211,7 +212,7 @@ INFO: Process d~ g > t t~ d~ added to mirror process g d~ > t t~ d~ INFO: Process d~ d > t t~ g added to mirror process d d~ > t t~ g INFO: Process s~ g > t t~ s~ added to mirror process g s~ > t t~ s~ INFO: Process s~ s > t t~ g added to mirror process s s~ > t t~ g -13 processes with 76 diagrams generated in 0.098 s +13 processes with 76 diagrams generated in 0.135 s Total: 18 processes with 83 diagrams add process p p > t t~ j j @2 INFO: Checking for minimal orders which gives processes. @@ -377,7 +378,7 @@ INFO: Process s~ u~ > t t~ u~ s~ added to mirror process u~ s~ > t t~ u~ s~ INFO: Process s~ c~ > t t~ c~ s~ added to mirror process c~ s~ > t t~ c~ s~ INFO: Process s~ d~ > t t~ d~ s~ added to mirror process d~ s~ > t t~ d~ s~ INFO: Crossed process found for s~ s~ > t t~ s~ s~, reuse diagrams. -65 processes with 1119 diagrams generated in 1.271 s +65 processes with 1119 diagrams generated in 1.802 s Total: 83 processes with 1202 diagrams output madevent ../TMPOUT/CODEGEN_mad_pp_tt012j --hel_recycling=False --vector_size=32 --me_exporter=standalone_cudacpp Load PLUGIN.CUDACPP_OUTPUT @@ -388,10 +389,10 @@ Load PLUGIN.CUDACPP_OUTPUT INFO: initialize a new directory: CODEGEN_mad_pp_tt012j INFO: remove old information in CODEGEN_mad_pp_tt012j DEBUG: Entering PLUGIN_ProcessExporter.copy_template (initialise the directory) [output.py at line 165]  -WARNING: File exists /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j  -INFO: Creating subdirectories in directory /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j -WARNING: File exists /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/Cards  -WARNING: File exists /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses  +WARNING: File exists /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j  +INFO: Creating subdirectories in directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j +WARNING: File exists /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/Cards  +WARNING: File exists /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses  INFO: Organizing processes into subprocess groups INFO: Generating Helas calls for process: g g > t t~ g g WEIGHTED<=4 @2 INFO: Processing color information for process: g g > t t~ g g @2 @@ -496,7 +497,7 @@ INFO: Combined process d d~ > t t~ WEIGHTED<=2 with process u u~ > t t~ WEIGHTED INFO: Combined process s s~ > t t~ WEIGHTED<=2 with process u u~ > t t~ WEIGHTED<=2 INFO: Creating files in directory P2_gg_ttxgg DEBUG: kwargs[prefix] = 0 [model_handling.py at line 1058]  -DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  +DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  INFO: Creating files in directory . FileWriter for ././CPPProcess.h FileWriter for ././CPPProcess.cc @@ -513,7 +514,7 @@ INFO: Generating Feynman diagrams for Process: g g > t t~ g g WEIGHTED<=4 @2 INFO: Finding symmetric diagrams for subprocess group gg_ttxgg INFO: Creating files in directory P2_gg_ttxuux DEBUG: kwargs[prefix] = 0 [model_handling.py at line 1058]  -DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  +DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  INFO: Creating files in directory . FileWriter for ././CPPProcess.h FileWriter for ././CPPProcess.cc @@ -530,7 +531,7 @@ INFO: Generating Feynman diagrams for Process: g g > t t~ u u~ WEIGHTED<=4 @2 INFO: Finding symmetric diagrams for subprocess group gg_ttxuux INFO: Creating files in directory P2_gu_ttxgu DEBUG: kwargs[prefix] = 0 [model_handling.py at line 1058]  -DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  +DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  INFO: Creating files in directory . FileWriter for ././CPPProcess.h FileWriter for ././CPPProcess.cc @@ -547,7 +548,7 @@ INFO: Generating Feynman diagrams for Process: g u > t t~ g u WEIGHTED<=4 @2 INFO: Finding symmetric diagrams for subprocess group gu_ttxgu INFO: Creating files in directory P2_gux_ttxgux DEBUG: kwargs[prefix] = 0 [model_handling.py at line 1058]  -DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  +DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  INFO: Creating files in directory . FileWriter for ././CPPProcess.h FileWriter for ././CPPProcess.cc @@ -564,7 +565,7 @@ INFO: Generating Feynman diagrams for Process: g u~ > t t~ g u~ WEIGHTED<=4 @2 INFO: Finding symmetric diagrams for subprocess group gux_ttxgux INFO: Creating files in directory P2_uux_ttxgg DEBUG: kwargs[prefix] = 0 [model_handling.py at line 1058]  -DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  +DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  INFO: Creating files in directory . FileWriter for ././CPPProcess.h FileWriter for ././CPPProcess.cc @@ -581,7 +582,7 @@ INFO: Generating Feynman diagrams for Process: u u~ > t t~ g g WEIGHTED<=4 @2 INFO: Finding symmetric diagrams for subprocess group uux_ttxgg INFO: Creating files in directory P1_gg_ttxg DEBUG: kwargs[prefix] = 0 [model_handling.py at line 1058]  -DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  +DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  INFO: Creating files in directory . FileWriter for ././CPPProcess.h FileWriter for ././CPPProcess.cc @@ -598,7 +599,7 @@ INFO: Generating Feynman diagrams for Process: g g > t t~ g WEIGHTED<=3 @1 INFO: Finding symmetric diagrams for subprocess group gg_ttxg INFO: Creating files in directory P2_uu_ttxuu DEBUG: kwargs[prefix] = 0 [model_handling.py at line 1058]  -DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  +DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  INFO: Creating files in directory . FileWriter for ././CPPProcess.h FileWriter for ././CPPProcess.cc @@ -615,7 +616,7 @@ INFO: Generating Feynman diagrams for Process: u u > t t~ u u WEIGHTED<=4 @2 INFO: Finding symmetric diagrams for subprocess group uu_ttxuu INFO: Creating files in directory P2_uux_ttxuux DEBUG: kwargs[prefix] = 0 [model_handling.py at line 1058]  -DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  +DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  INFO: Creating files in directory . FileWriter for ././CPPProcess.h FileWriter for ././CPPProcess.cc @@ -632,7 +633,7 @@ INFO: Generating Feynman diagrams for Process: u u~ > t t~ u u~ WEIGHTED<=4 @2 INFO: Finding symmetric diagrams for subprocess group uux_ttxuux INFO: Creating files in directory P2_uxux_ttxuxux DEBUG: kwargs[prefix] = 0 [model_handling.py at line 1058]  -DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  +DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  INFO: Creating files in directory . FileWriter for ././CPPProcess.h FileWriter for ././CPPProcess.cc @@ -649,7 +650,7 @@ INFO: Generating Feynman diagrams for Process: u~ u~ > t t~ u~ u~ WEIGHTED<=4 @2 INFO: Finding symmetric diagrams for subprocess group uxux_ttxuxux INFO: Creating files in directory P2_uc_ttxuc DEBUG: kwargs[prefix] = 0 [model_handling.py at line 1058]  -DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  +DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  INFO: Creating files in directory . FileWriter for ././CPPProcess.h FileWriter for ././CPPProcess.cc @@ -666,7 +667,7 @@ INFO: Generating Feynman diagrams for Process: u c > t t~ u c WEIGHTED<=4 @2 INFO: Finding symmetric diagrams for subprocess group uc_ttxuc INFO: Creating files in directory P2_uux_ttxccx DEBUG: kwargs[prefix] = 0 [model_handling.py at line 1058]  -DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  +DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  INFO: Creating files in directory . FileWriter for ././CPPProcess.h FileWriter for ././CPPProcess.cc @@ -683,7 +684,7 @@ INFO: Generating Feynman diagrams for Process: u u~ > t t~ c c~ WEIGHTED<=4 @2 INFO: Finding symmetric diagrams for subprocess group uux_ttxccx INFO: Creating files in directory P2_ucx_ttxucx DEBUG: kwargs[prefix] = 0 [model_handling.py at line 1058]  -DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  +DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  INFO: Creating files in directory . FileWriter for ././CPPProcess.h FileWriter for ././CPPProcess.cc @@ -700,7 +701,7 @@ INFO: Generating Feynman diagrams for Process: u c~ > t t~ u c~ WEIGHTED<=4 @2 INFO: Finding symmetric diagrams for subprocess group ucx_ttxucx INFO: Creating files in directory P2_uxcx_ttxuxcx DEBUG: kwargs[prefix] = 0 [model_handling.py at line 1058]  -DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  +DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  INFO: Creating files in directory . FileWriter for ././CPPProcess.h FileWriter for ././CPPProcess.cc @@ -717,7 +718,7 @@ INFO: Generating Feynman diagrams for Process: u~ c~ > t t~ u~ c~ WEIGHTED<=4 @2 INFO: Finding symmetric diagrams for subprocess group uxcx_ttxuxcx INFO: Creating files in directory P1_gu_ttxu DEBUG: kwargs[prefix] = 0 [model_handling.py at line 1058]  -DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  +DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  INFO: Creating files in directory . FileWriter for ././CPPProcess.h FileWriter for ././CPPProcess.cc @@ -734,7 +735,7 @@ INFO: Generating Feynman diagrams for Process: g u > t t~ u WEIGHTED<=3 @1 INFO: Finding symmetric diagrams for subprocess group gu_ttxu INFO: Creating files in directory P1_gux_ttxux DEBUG: kwargs[prefix] = 0 [model_handling.py at line 1058]  -DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  +DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  INFO: Creating files in directory . FileWriter for ././CPPProcess.h FileWriter for ././CPPProcess.cc @@ -751,7 +752,7 @@ INFO: Generating Feynman diagrams for Process: g u~ > t t~ u~ WEIGHTED<=3 @1 INFO: Finding symmetric diagrams for subprocess group gux_ttxux INFO: Creating files in directory P1_uux_ttxg DEBUG: kwargs[prefix] = 0 [model_handling.py at line 1058]  -DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  +DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  INFO: Creating files in directory . FileWriter for ././CPPProcess.h FileWriter for ././CPPProcess.cc @@ -768,7 +769,7 @@ INFO: Generating Feynman diagrams for Process: u u~ > t t~ g WEIGHTED<=3 @1 INFO: Finding symmetric diagrams for subprocess group uux_ttxg INFO: Creating files in directory P0_gg_ttx DEBUG: kwargs[prefix] = 0 [model_handling.py at line 1058]  -DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  +DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  INFO: Creating files in directory . FileWriter for ././CPPProcess.h FileWriter for ././CPPProcess.cc @@ -785,7 +786,7 @@ INFO: Generating Feynman diagrams for Process: g g > t t~ WEIGHTED<=2 INFO: Finding symmetric diagrams for subprocess group gg_ttx INFO: Creating files in directory P0_uux_ttx DEBUG: kwargs[prefix] = 0 [model_handling.py at line 1058]  -DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  +DEBUG: process_exporter_cpp =  [export_v4.py at line 6262]  INFO: Creating files in directory . FileWriter for ././CPPProcess.h FileWriter for ././CPPProcess.cc @@ -800,15 +801,15 @@ INFO: Created files CPPProcess.h and CPPProcess.cc in directory ./. DEBUG: vector, subproc_group,self.opt['vector_size'] =  32 True 32 [export_v4.py at line 1872]  INFO: Generating Feynman diagrams for Process: u u~ > t t~ WEIGHTED<=2 INFO: Finding symmetric diagrams for subprocess group uux_ttx -Generated helas calls for 18 subprocesses (372 diagrams) in 0.884 s -Wrote files for 810 helas calls in 2.301 s +Generated helas calls for 18 subprocesses (372 diagrams) in 1.274 s +Wrote files for 810 helas calls in 3.219 s ALOHA: aloha starts to compute helicity amplitudes ALOHA: aloha creates VVV1 routines ALOHA: aloha creates FFV1 routines ALOHA: aloha creates VVVV1 routines ALOHA: aloha creates VVVV3 routines ALOHA: aloha creates VVVV4 routines -ALOHA: aloha creates 5 routines in 0.229 s +ALOHA: aloha creates 5 routines in 0.343 s DEBUG: Entering PLUGIN_ProcessExporter.convert_model (create the model) [output.py at line 202]  ALOHA: aloha starts to compute helicity amplitudes ALOHA: aloha creates VVV1 routines @@ -816,7 +817,7 @@ ALOHA: aloha creates FFV1 routines ALOHA: aloha creates VVVV1 routines ALOHA: aloha creates VVVV3 routines ALOHA: aloha creates VVVV4 routines -ALOHA: aloha creates 10 routines in 0.201 s +ALOHA: aloha creates 10 routines in 0.308 s VVV1 VVV1 FFV1 @@ -829,212 +830,209 @@ ALOHA: aloha creates 10 routines in 0.201 s VVVV3 VVVV4 VVVV4 -FileWriter for /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/src/./HelAmps_sm.h -INFO: Created file HelAmps_sm.h in directory /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/src/. +FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/src/./HelAmps_sm.h +INFO: Created file HelAmps_sm.h in directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/src/. super_write_set_parameters_onlyfixMajorana (hardcoded=False) super_write_set_parameters_onlyfixMajorana (hardcoded=True) -FileWriter for /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/src/./Parameters_sm.h -FileWriter for /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/src/./Parameters_sm.cc +FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/src/./Parameters_sm.h +FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/src/./Parameters_sm.cc INFO: Created files Parameters_sm.h and Parameters_sm.cc in directory -INFO: /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/src/. and /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/src/. +INFO: /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/src/. and /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/src/. The option zerowidth_tchannel is modified [True] but will not be written in the configuration files. If you want to make this value the default for future session, you can run 'save options --all' -save configuration file to /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/Cards/me5_configuration.txt +save configuration file to /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/Cards/me5_configuration.txt INFO: Use Fortran compiler gfortran INFO: Use c++ compiler g++ INFO: Generate web pages -DEBUG: cd /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j; patch -p4 -i /data/stephan/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common +DEBUG: standardise /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/Source/make_opts (fix f2py3 and sort make_opts_variables) before applying patch.common +DEBUG: cd /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j; patch -p4 -i /data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common patching file Source/genps.inc patching file Source/make_opts -Hunk #1 succeeded at 12 (offset -1 lines). -Hunk #2 succeeded at 70 (offset -1 lines). -Hunk #3 succeeded at 117 (offset -1 lines). -Hunk #4 succeeded at 128 (offset -1 lines). patching file Source/makefile patching file SubProcesses/makefile patching file bin/internal/banner.py patching file bin/internal/gen_ximprove.py patching file bin/internal/madevent_interface.py -DEBUG: cd /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses/P0_gg_ttx; patch -p6 -i /data/stephan/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 +DEBUG: cd /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses/P0_gg_ttx; patch -p6 -i /data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 patching file auto_dsig1.f patching file driver.f patching file matrix1.f -Hunk #2 succeeded at 143 (offset -16 lines). -Hunk #3 succeeded at 221 (offset -16 lines). -Hunk #4 succeeded at 249 (offset -16 lines). -Hunk #5 succeeded at 294 (offset -16 lines). -DEBUG: cd /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses/P0_uux_ttx; patch -p6 -i /data/stephan/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 +DEBUG: cd /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses/P0_uux_ttx; patch -p6 -i /data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 patching file auto_dsig1.f Hunk #1 succeeded at 539 (offset 55 lines). patching file driver.f patching file matrix1.f Hunk #1 succeeded at 75 (offset 3 lines). -Hunk #2 succeeded at 146 (offset -13 lines). -Hunk #3 succeeded at 224 (offset -13 lines). -Hunk #4 succeeded at 252 (offset -13 lines). -Hunk #5 succeeded at 297 (offset -13 lines). -DEBUG: cd /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses/P1_gg_ttxg; patch -p6 -i /data/stephan/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 +Hunk #2 succeeded at 146 (offset 3 lines). +Hunk #3 succeeded at 224 (offset 3 lines). +Hunk #4 succeeded at 252 (offset 3 lines). +Hunk #5 succeeded at 297 (offset 3 lines). +DEBUG: cd /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses/P1_gg_ttxg; patch -p6 -i /data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 patching file auto_dsig1.f patching file driver.f patching file matrix1.f -DEBUG: cd /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses/P1_gu_ttxu; patch -p6 -i /data/stephan/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 +Hunk #2 succeeded at 159 (offset 16 lines). +Hunk #3 succeeded at 237 (offset 16 lines). +Hunk #4 succeeded at 265 (offset 16 lines). +Hunk #5 succeeded at 310 (offset 16 lines). +DEBUG: cd /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses/P1_gu_ttxu; patch -p6 -i /data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 patching file auto_dsig1.f Hunk #1 succeeded at 528 (offset 44 lines). patching file driver.f patching file matrix1.f Hunk #1 succeeded at 75 (offset 3 lines). -Hunk #2 succeeded at 162 (offset 3 lines). -Hunk #3 succeeded at 240 (offset 3 lines). -Hunk #4 succeeded at 268 (offset 3 lines). -Hunk #5 succeeded at 313 (offset 3 lines). -DEBUG: cd /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses/P1_gux_ttxux; patch -p6 -i /data/stephan/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 +Hunk #2 succeeded at 162 (offset 19 lines). +Hunk #3 succeeded at 240 (offset 19 lines). +Hunk #4 succeeded at 268 (offset 19 lines). +Hunk #5 succeeded at 313 (offset 19 lines). +DEBUG: cd /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses/P1_gux_ttxux; patch -p6 -i /data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 patching file auto_dsig1.f Hunk #1 succeeded at 528 (offset 44 lines). patching file driver.f patching file matrix1.f Hunk #1 succeeded at 75 (offset 3 lines). -Hunk #2 succeeded at 162 (offset 3 lines). -Hunk #3 succeeded at 240 (offset 3 lines). -Hunk #4 succeeded at 268 (offset 3 lines). -Hunk #5 succeeded at 313 (offset 3 lines). -DEBUG: cd /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses/P1_uux_ttxg; patch -p6 -i /data/stephan/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 +Hunk #2 succeeded at 162 (offset 19 lines). +Hunk #3 succeeded at 240 (offset 19 lines). +Hunk #4 succeeded at 268 (offset 19 lines). +Hunk #5 succeeded at 313 (offset 19 lines). +DEBUG: cd /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses/P1_uux_ttxg; patch -p6 -i /data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 patching file auto_dsig1.f Hunk #1 succeeded at 539 (offset 55 lines). patching file driver.f patching file matrix1.f Hunk #1 succeeded at 75 (offset 3 lines). -Hunk #2 succeeded at 162 (offset 3 lines). -Hunk #3 succeeded at 240 (offset 3 lines). -Hunk #4 succeeded at 268 (offset 3 lines). -Hunk #5 succeeded at 313 (offset 3 lines). -DEBUG: cd /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses/P2_gg_ttxgg; patch -p6 -i /data/stephan/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 +Hunk #2 succeeded at 162 (offset 19 lines). +Hunk #3 succeeded at 240 (offset 19 lines). +Hunk #4 succeeded at 268 (offset 19 lines). +Hunk #5 succeeded at 313 (offset 19 lines). +DEBUG: cd /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses/P2_gg_ttxgg; patch -p6 -i /data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 patching file auto_dsig1.f patching file driver.f patching file matrix1.f -Hunk #2 succeeded at 191 (offset 32 lines). -Hunk #3 succeeded at 269 (offset 32 lines). -Hunk #4 succeeded at 297 (offset 32 lines). -Hunk #5 succeeded at 342 (offset 32 lines). -DEBUG: cd /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses/P2_gg_ttxuux; patch -p6 -i /data/stephan/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 +Hunk #2 succeeded at 191 (offset 48 lines). +Hunk #3 succeeded at 269 (offset 48 lines). +Hunk #4 succeeded at 297 (offset 48 lines). +Hunk #5 succeeded at 342 (offset 48 lines). +DEBUG: cd /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses/P2_gg_ttxuux; patch -p6 -i /data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 patching file auto_dsig1.f Hunk #1 succeeded at 517 (offset 33 lines). patching file driver.f patching file matrix1.f Hunk #1 succeeded at 75 (offset 3 lines). -Hunk #2 succeeded at 194 (offset 35 lines). -Hunk #3 succeeded at 272 (offset 35 lines). -Hunk #4 succeeded at 300 (offset 35 lines). -Hunk #5 succeeded at 345 (offset 35 lines). -DEBUG: cd /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses/P2_gu_ttxgu; patch -p6 -i /data/stephan/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 +Hunk #2 succeeded at 194 (offset 51 lines). +Hunk #3 succeeded at 272 (offset 51 lines). +Hunk #4 succeeded at 300 (offset 51 lines). +Hunk #5 succeeded at 345 (offset 51 lines). +DEBUG: cd /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses/P2_gu_ttxgu; patch -p6 -i /data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 patching file auto_dsig1.f Hunk #1 succeeded at 528 (offset 44 lines). patching file driver.f patching file matrix1.f Hunk #1 succeeded at 75 (offset 3 lines). -Hunk #2 succeeded at 194 (offset 35 lines). -Hunk #3 succeeded at 272 (offset 35 lines). -Hunk #4 succeeded at 300 (offset 35 lines). -Hunk #5 succeeded at 345 (offset 35 lines). -DEBUG: cd /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses/P2_gux_ttxgux; patch -p6 -i /data/stephan/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 +Hunk #2 succeeded at 194 (offset 51 lines). +Hunk #3 succeeded at 272 (offset 51 lines). +Hunk #4 succeeded at 300 (offset 51 lines). +Hunk #5 succeeded at 345 (offset 51 lines). +DEBUG: cd /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses/P2_gux_ttxgux; patch -p6 -i /data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 patching file auto_dsig1.f Hunk #1 succeeded at 528 (offset 44 lines). patching file driver.f patching file matrix1.f Hunk #1 succeeded at 75 (offset 3 lines). -Hunk #2 succeeded at 194 (offset 35 lines). -Hunk #3 succeeded at 272 (offset 35 lines). -Hunk #4 succeeded at 300 (offset 35 lines). -Hunk #5 succeeded at 345 (offset 35 lines). -DEBUG: cd /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses/P2_uc_ttxuc; patch -p6 -i /data/stephan/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 +Hunk #2 succeeded at 194 (offset 51 lines). +Hunk #3 succeeded at 272 (offset 51 lines). +Hunk #4 succeeded at 300 (offset 51 lines). +Hunk #5 succeeded at 345 (offset 51 lines). +DEBUG: cd /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses/P2_uc_ttxuc; patch -p6 -i /data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 patching file auto_dsig1.f Hunk #1 succeeded at 555 (offset 71 lines). patching file driver.f patching file matrix1.f Hunk #1 succeeded at 77 (offset 5 lines). -Hunk #2 succeeded at 196 (offset 37 lines). -Hunk #3 succeeded at 274 (offset 37 lines). -Hunk #4 succeeded at 302 (offset 37 lines). -Hunk #5 succeeded at 347 (offset 37 lines). -DEBUG: cd /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses/P2_ucx_ttxucx; patch -p6 -i /data/stephan/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 +Hunk #2 succeeded at 196 (offset 53 lines). +Hunk #3 succeeded at 274 (offset 53 lines). +Hunk #4 succeeded at 302 (offset 53 lines). +Hunk #5 succeeded at 347 (offset 53 lines). +DEBUG: cd /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses/P2_ucx_ttxucx; patch -p6 -i /data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 patching file auto_dsig1.f Hunk #1 succeeded at 627 (offset 143 lines). patching file driver.f patching file matrix1.f Hunk #1 succeeded at 83 (offset 11 lines). -Hunk #2 succeeded at 202 (offset 43 lines). -Hunk #3 succeeded at 280 (offset 43 lines). -Hunk #4 succeeded at 308 (offset 43 lines). -Hunk #5 succeeded at 353 (offset 43 lines). -DEBUG: cd /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses/P2_uu_ttxuu; patch -p6 -i /data/stephan/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 +Hunk #2 succeeded at 202 (offset 59 lines). +Hunk #3 succeeded at 280 (offset 59 lines). +Hunk #4 succeeded at 308 (offset 59 lines). +Hunk #5 succeeded at 353 (offset 59 lines). +DEBUG: cd /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses/P2_uu_ttxuu; patch -p6 -i /data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 patching file auto_dsig1.f Hunk #1 succeeded at 539 (offset 55 lines). patching file driver.f patching file matrix1.f Hunk #1 succeeded at 75 (offset 3 lines). -Hunk #2 succeeded at 194 (offset 35 lines). -Hunk #3 succeeded at 272 (offset 35 lines). -Hunk #4 succeeded at 300 (offset 35 lines). -Hunk #5 succeeded at 345 (offset 35 lines). -DEBUG: cd /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses/P2_uux_ttxccx; patch -p6 -i /data/stephan/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 +Hunk #2 succeeded at 194 (offset 51 lines). +Hunk #3 succeeded at 272 (offset 51 lines). +Hunk #4 succeeded at 300 (offset 51 lines). +Hunk #5 succeeded at 345 (offset 51 lines). +DEBUG: cd /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses/P2_uux_ttxccx; patch -p6 -i /data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 patching file auto_dsig1.f Hunk #1 succeeded at 627 (offset 143 lines). patching file driver.f patching file matrix1.f Hunk #1 succeeded at 83 (offset 11 lines). -Hunk #2 succeeded at 202 (offset 43 lines). -Hunk #3 succeeded at 280 (offset 43 lines). -Hunk #4 succeeded at 308 (offset 43 lines). -Hunk #5 succeeded at 353 (offset 43 lines). -DEBUG: cd /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses/P2_uux_ttxgg; patch -p6 -i /data/stephan/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 +Hunk #2 succeeded at 202 (offset 59 lines). +Hunk #3 succeeded at 280 (offset 59 lines). +Hunk #4 succeeded at 308 (offset 59 lines). +Hunk #5 succeeded at 353 (offset 59 lines). +DEBUG: cd /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses/P2_uux_ttxgg; patch -p6 -i /data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 patching file auto_dsig1.f Hunk #1 succeeded at 539 (offset 55 lines). patching file driver.f patching file matrix1.f Hunk #1 succeeded at 75 (offset 3 lines). -Hunk #2 succeeded at 194 (offset 35 lines). -Hunk #3 succeeded at 272 (offset 35 lines). -Hunk #4 succeeded at 300 (offset 35 lines). -Hunk #5 succeeded at 345 (offset 35 lines). -DEBUG: cd /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses/P2_uux_ttxuux; patch -p6 -i /data/stephan/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 +Hunk #2 succeeded at 194 (offset 51 lines). +Hunk #3 succeeded at 272 (offset 51 lines). +Hunk #4 succeeded at 300 (offset 51 lines). +Hunk #5 succeeded at 345 (offset 51 lines). +DEBUG: cd /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses/P2_uux_ttxuux; patch -p6 -i /data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 patching file auto_dsig1.f Hunk #1 succeeded at 539 (offset 55 lines). patching file driver.f patching file matrix1.f Hunk #1 succeeded at 75 (offset 3 lines). -Hunk #2 succeeded at 194 (offset 35 lines). -Hunk #3 succeeded at 272 (offset 35 lines). -Hunk #4 succeeded at 300 (offset 35 lines). -Hunk #5 succeeded at 345 (offset 35 lines). -DEBUG: cd /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses/P2_uxcx_ttxuxcx; patch -p6 -i /data/stephan/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 +Hunk #2 succeeded at 194 (offset 51 lines). +Hunk #3 succeeded at 272 (offset 51 lines). +Hunk #4 succeeded at 300 (offset 51 lines). +Hunk #5 succeeded at 345 (offset 51 lines). +DEBUG: cd /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses/P2_uxcx_ttxuxcx; patch -p6 -i /data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 patching file auto_dsig1.f Hunk #1 succeeded at 555 (offset 71 lines). patching file driver.f patching file matrix1.f Hunk #1 succeeded at 77 (offset 5 lines). -Hunk #2 succeeded at 196 (offset 37 lines). -Hunk #3 succeeded at 274 (offset 37 lines). -Hunk #4 succeeded at 302 (offset 37 lines). -Hunk #5 succeeded at 347 (offset 37 lines). -DEBUG: cd /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses/P2_uxux_ttxuxux; patch -p6 -i /data/stephan/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 +Hunk #2 succeeded at 196 (offset 53 lines). +Hunk #3 succeeded at 274 (offset 53 lines). +Hunk #4 succeeded at 302 (offset 53 lines). +Hunk #5 succeeded at 347 (offset 53 lines). +DEBUG: cd /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses/P2_uxux_ttxuxux; patch -p6 -i /data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 patching file auto_dsig1.f Hunk #1 succeeded at 539 (offset 55 lines). patching file driver.f patching file matrix1.f Hunk #1 succeeded at 75 (offset 3 lines). -Hunk #2 succeeded at 194 (offset 35 lines). -Hunk #3 succeeded at 272 (offset 35 lines). -Hunk #4 succeeded at 300 (offset 35 lines). -Hunk #5 succeeded at 345 (offset 35 lines). +Hunk #2 succeeded at 194 (offset 51 lines). +Hunk #3 succeeded at 272 (offset 51 lines). +Hunk #4 succeeded at 300 (offset 51 lines). +Hunk #5 succeeded at 345 (offset 51 lines). DEBUG: p.returncode =  0 [output.py at line 237]  -Output to directory /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j done. +Output to directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j done. Type "launch" to generate events from this process, or see -/data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/README +/data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/README Run "open index.html" to see more information about this process. quit -real 0m6.458s -user 0m5.839s -sys 0m0.626s +real 0m8.774s +user 0m8.281s +sys 0m0.464s ************************************************************ * * * W E L C O M E to * @@ -1055,9 +1053,10 @@ sys 0m0.626s * Type 'help' for in-line help. * * * ************************************************************ -INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/Cards/me5_configuration.txt -INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/mg5amcnlo/input/mg5_configuration.txt -INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/Cards/me5_configuration.txt +INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/Cards/me5_configuration.txt +INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo/input/mg5_configuration.txt +INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/Cards/me5_configuration.txt +Using default text editor "vi". Set another one in ./input/mg5_configuration.txt Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt treatcards run @@ -1084,9 +1083,10 @@ launch in debug mode * Type 'help' for in-line help. * * * ************************************************************ -INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/Cards/me5_configuration.txt -INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/mg5amcnlo/input/mg5_configuration.txt -INFO: load configuration from /data/stephan/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/Cards/me5_configuration.txt +INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/Cards/me5_configuration.txt +INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo/input/mg5_configuration.txt +INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/Cards/me5_configuration.txt +Using default text editor "vi". Set another one in ./input/mg5_configuration.txt Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt treatcards param diff --git a/epochX/cudacpp/pp_tt012j.mad/Cards/me5_configuration.txt b/epochX/cudacpp/pp_tt012j.mad/Cards/me5_configuration.txt index 22f81b5926..cdeedc7863 100644 --- a/epochX/cudacpp/pp_tt012j.mad/Cards/me5_configuration.txt +++ b/epochX/cudacpp/pp_tt012j.mad/Cards/me5_configuration.txt @@ -234,7 +234,7 @@ # pineappl = pineappl -#mg5_path = /data/stephan/madgraph4gpu/MG5aMC/mg5amcnlo +#mg5_path = /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo # MG5 MAIN DIRECTORY -#mg5_path = /data/stephan/madgraph4gpu/MG5aMC/mg5amcnlo +#mg5_path = /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/makefile b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/makefile index d229c1cf4d..b69917ee1f 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/makefile +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/makefile @@ -18,13 +18,13 @@ help: $(info Or 'ALL' for all C++ and cuda targets) -# Enable ccache if USECCACHE=1 +# Enable ccache for C++ if USECCACHE=1 (do not enable it for Fortran since it is not supported for Fortran) ifeq ($(USECCACHE)$(shell echo $(CXX) | grep ccache),1) override CXX:=ccache $(CXX) endif -ifeq ($(USECCACHE)$(shell echo $(FC) | grep ccache),1) - override FC:=ccache $(FC) -endif +###ifeq ($(USECCACHE)$(shell echo $(FC) | grep ccache),1) +### override FC:=ccache $(FC) +###endif # Load additional dependencies of the bias module, if present ifeq (,$(wildcard ../bias_dependencies)) diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/runTest.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/runTest.cc index 734235824a..6c77775fb2 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/runTest.cc +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/runTest.cc @@ -243,6 +243,7 @@ struct CUDATest : public CUDA_CPU_TestBase // Use two levels of macros to force stringification at the right level // (see https://gcc.gnu.org/onlinedocs/gcc-3.0.1/cpp_3.html#SEC17 and https://stackoverflow.com/a/3419392) // Google macro is in https://github.com/google/googletest/blob/master/googletest/include/gtest/gtest-param-test.h +/* clang-format off */ #define TESTID_CPU( s ) s##_CPU #define XTESTID_CPU( s ) TESTID_CPU( s ) #define MG_INSTANTIATE_TEST_SUITE_CPU( prefix, test_suite_name ) \ @@ -255,6 +256,7 @@ struct CUDATest : public CUDA_CPU_TestBase INSTANTIATE_TEST_SUITE_P( prefix, \ test_suite_name, \ testing::Values( new CUDATest( MG_EPOCH_REFERENCE_FILE_NAME ) ) ); +/* clang-format on */ #ifdef __CUDACC__ MG_INSTANTIATE_TEST_SUITE_GPU( XTESTID_GPU( MG_EPOCH_PROCESS_ID ), MadgraphTest ); From 55637897fc876701361c22790ebe1647cbfd3387 Mon Sep 17 00:00:00 2001 From: Andrea Valassi Date: Thu, 14 Dec 2023 09:59:37 +0100 Subject: [PATCH 121/129] [refactorMakefile] in gg_tt.mad, fix 'make clean' when there is no build.* directory (without bash nullglob, this expands to literal build.* otherwise) --- epochX/cudacpp/gg_tt.mad/SubProcesses/makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile index b69917ee1f..ec2348b57d 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile @@ -221,7 +221,7 @@ ALL: cppall cuda clean: $(RM) *.o gensym $(PROG) $(PROG)_* $(RM) -rf build.*/*{.o,.so,.exe,.dylib,madevent_*} - @for dir in build.*; do if [ -z "$$(ls -A $${dir})" ]; then rm -r $${dir}; else echo "Not cleaning $${dir}; not empty"; fi; done + @for dir in $$(ls -d build.* 2> /dev/null); do if [ -z "$$(ls -A $${dir})" ]; then echo "Removing $${dir}"; $(RM) -r $${dir}; else echo "Not removing $${dir}; not empty"; fi; done cleanall: cleansrc for PROCESS in ../P[0-9]*; do $(MAKE) -C $${PROCESS} clean; done From a3a0ee8eb980a31ca85a90463a68eb2c296cbac2 Mon Sep 17 00:00:00 2001 From: Andrea Valassi Date: Thu, 14 Dec 2023 11:20:55 +0100 Subject: [PATCH 122/129] [refactorMakefile] in gg_tt.mad, improve comments in SubProcesses/makefile --- epochX/cudacpp/gg_tt.mad/SubProcesses/makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile index ec2348b57d..9723707bf0 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile @@ -217,16 +217,17 @@ endif ALL: cppall cuda -# Clean all architecture-specific builds: +# Clean all architecture-specific builds in this P* directory clean: $(RM) *.o gensym $(PROG) $(PROG)_* $(RM) -rf build.*/*{.o,.so,.exe,.dylib,madevent_*} @for dir in $$(ls -d build.* 2> /dev/null); do if [ -z "$$(ls -A $${dir})" ]; then echo "Removing $${dir}"; $(RM) -r $${dir}; else echo "Not removing $${dir}; not empty"; fi; done +# Clean common source directories and all architecture-specific builds in all P* directories cleanall: cleansrc for PROCESS in ../P[0-9]*; do $(MAKE) -C $${PROCESS} clean; done -# Clean one architecture-specific build +# Clean one architecture-specific build in this P* directory (examples: "make cleancuda" or "make cleannative") clean%: $(RM) -r build.$*_* From 746064f74d69f068ecf7ed78cc22299f41e03fe1 Mon Sep 17 00:00:00 2001 From: Andrea Valassi Date: Thu, 14 Dec 2023 11:46:33 +0100 Subject: [PATCH 123/129] [refactorMakefile] in gg_tt.mad, improve dependency on discretesampler.mod in Source/makefile MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Without this fix, the following situation could take place: 1. When make is interrupted by ctrl-c, DiscreteSampler.o exists but discretesampler.mod does not exist make[1]: Entering directory '/data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/gg_tt.mad/Source' AVX=none RNDGEN=hasCurand gfortran -I. -fPIC -w -ffixed-line-length-132 -O3 -ffast-math -fbounds-check -c StringCast.f -o StringCast.o gfortran -I. -fPIC -w -ffixed-line-length-132 -O3 -ffast-math -fbounds-check -c DiscreteSampler.f -o DiscreteSampler.o gfortran -I. -fPIC -w -ffixed-line-length-132 -O3 -ffast-math -fbounds-check -c dsample.f -o dsample.o ^Cmake: *** [../../Source/.timestamp_guard] Deleting file '../../Source/discretesampler.mod' make: *** [makefile:65: ../../Source/.timestamp_guard] Interrupt 2. When make (or make -j) is then attempted, discretesampler.mod does not exist and cannot be recreated make[1]: Entering directory '/data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/gg_tt.mad/Source' AVX=none RNDGEN=hasCurand gfortran -I. -fPIC -w -ffixed-line-length-132 -O3 -ffast-math -fbounds-check -c dsample.f -o dsample.o dsample.f:1090:10: 1090 | use DiscreteSampler | 1 Fatal Error: Cannot open module file ‘discretesampler.mod’ for reading at (1): No such file or directory compilation terminated. --- epochX/cudacpp/gg_tt.mad/Source/makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/epochX/cudacpp/gg_tt.mad/Source/makefile b/epochX/cudacpp/gg_tt.mad/Source/makefile index 407b1b753e..c9c219d1f7 100644 --- a/epochX/cudacpp/gg_tt.mad/Source/makefile +++ b/epochX/cudacpp/gg_tt.mad/Source/makefile @@ -35,6 +35,9 @@ all: $(LIBRARIES) $(LIBDIR)libdhelas.$(libext) $(LIBDIR)libpdf.$(libext) $(LIBDI %.o: %.f *.inc $(FC) -I. $(MG_FCFLAGS) $(FCFLAGS) -c $< -o $@ +DiscreteSampler.o discretesampler.mod: DiscreteSampler.f *.inc + $(FC) -I. $(MG_FCFLAGS) $(FCFLAGS) -c $< -o DiscreteSampler.o + # Libraries $(LIBDIR)libdsample.$(libext): $(DSAMPLE) @@ -74,7 +77,7 @@ $(BINDIR)gensudgrid: $(GENSUDGRID) $(LIBDIR)libpdf.$(libext) $(LIBDIR)libgammaUP # Dependencies -dsample.o: DiscreteSampler.o dsample.f genps.inc StringCast.o +dsample.o: DiscreteSampler.o discretesampler.mod dsample.f genps.inc StringCast.o DiscreteSampler.o: StringCast.o invarients.o: invarients.f genps.inc setrun.o: setrun.f nexternal.inc leshouche.inc genps.inc From 597325b7a0d16f434bae2f3e0bd32a30428d5eb2 Mon Sep 17 00:00:00 2001 From: Andrea Valassi Date: Thu, 14 Dec 2023 13:15:09 +0100 Subject: [PATCH 124/129] [refactorMakefile] in gg_tt.mad, rename cppavx512y/z as cpp512y/z in all makefile targets --- epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk | 4 ++-- epochX/cudacpp/gg_tt.mad/SubProcesses/makefile | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk index a522ddb335..706c03702e 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk @@ -16,9 +16,9 @@ cppsse4: $(SOURCEDIR_GUARD) $(PROCESS) $(MAKE) AVX=sse4 AVXFLAGS=-march=nehalem cppbuild cppavx2: $(SOURCEDIR_GUARD) $(PROCESS) $(MAKE) AVX=avx2 AVXFLAGS=-march=haswell cppbuild -cppavx512y: $(SOURCEDIR_GUARD) $(PROCESS) +cpp512y: $(SOURCEDIR_GUARD) $(PROCESS) $(MAKE) AVX=512y AVXFLAGS="-march=skylake-avx512 -mprefer-vector-width=256" cppbuild -cppavx512z: $(SOURCEDIR_GUARD) $(PROCESS) +cpp512z: $(SOURCEDIR_GUARD) $(PROCESS) $(MAKE) AVX=512z AVXFLAGS="-march=skylake-avx512 -DMGONGPU_PVW512" cppbuild cuda: $(SOURCEDIR_GUARD) $(PROCESS) $(MAKE) AVX=cuda cudabuild diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile index 9723707bf0..a747f623eb 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile @@ -140,11 +140,11 @@ madevent_cppavx2_link: cppavx2 ln -sf $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) madevent_cpp512y_link: AVX=512y -madevent_cpp512y_link: cppavx512y +madevent_cpp512y_link: cpp512y ln -sf $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) madevent_cpp512z_link: AVX=512z -madevent_cpp512z_link: cppavx512z +madevent_cpp512z_link: cpp512z ln -sf $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) madevent_cuda_link: AVX=cuda @@ -212,7 +212,7 @@ cppall: cppnative cppnone cppsse4 else ifeq ($(UNAME_P),arm) cppall: cppnative cppnone cppsse4 else -cppall: cppnative cppnone cppsse4 cppavx2 cppavx512y cppavx512z +cppall: cppnative cppnone cppsse4 cppavx2 cpp512y cpp512z endif ALL: cppall cuda From 3e6728ffc5efa4dbe2d42fd720d66338e967906b Mon Sep 17 00:00:00 2001 From: Andrea Valassi Date: Thu, 14 Dec 2023 18:46:39 +0100 Subject: [PATCH 125/129] [refactorMakefile] in gg_tt.mad SubProcesses/makefile, remove the 'clean%' target --- epochX/cudacpp/gg_tt.mad/SubProcesses/makefile | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile index a747f623eb..b1b09cd05e 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile @@ -227,11 +227,7 @@ clean: cleanall: cleansrc for PROCESS in ../P[0-9]*; do $(MAKE) -C $${PROCESS} clean; done -# Clean one architecture-specific build in this P* directory (examples: "make cleancuda" or "make cleannative") -clean%: - $(RM) -r build.$*_* - -# Clean common source directories (interferes with other P*) +# Clean common source directories (NB these are a dependency for all P* directories) cleansrc: make -C ../../Source clean $(RM) -f $(SOURCEDIR_GUARD) ../../Source/{*.mod,.lock} ../../Source/*/*.mod From eaa3bfb483923de7a5eea1e4624ce9157dc9f927 Mon Sep 17 00:00:00 2001 From: Andrea Valassi Date: Thu, 14 Dec 2023 19:01:40 +0100 Subject: [PATCH 126/129] [refactorMakefile] in gg_tt.mad makefiles, rename AVX as BACKEND --- epochX/cudacpp/gg_tt.mad/Source/make_opts | 32 ++++++++-------- .../cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk | 38 +++++++++---------- .../cudacpp/gg_tt.mad/SubProcesses/makefile | 10 ++--- epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk | 8 ++-- 4 files changed, 44 insertions(+), 44 deletions(-) diff --git a/epochX/cudacpp/gg_tt.mad/Source/make_opts b/epochX/cudacpp/gg_tt.mad/Source/make_opts index 435bed0dc7..f5c4034f73 100644 --- a/epochX/cudacpp/gg_tt.mad/Source/make_opts +++ b/epochX/cudacpp/gg_tt.mad/Source/make_opts @@ -134,28 +134,28 @@ endef #------------------------------------------------------------------------------- # Set special cases for non-gcc/clang builds -# AVX below gets overridden from outside in architecture-specific builds -AVX ?= none +# BACKEND below gets overridden from outside in architecture-specific builds +BACKEND ?= none # [NB MGONGPU_PVW512 is needed because "-mprefer-vector-width=256" is not exposed in a macro] # [See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96476] -$(info AVX=$(AVX)) +$(info BACKEND=$(BACKEND)) ifeq ($(UNAME_P),arm) - ifeq ($(AVX),sse4) + ifeq ($(BACKEND),sse4) override AVXFLAGS = -D__SSE4_2__ # ARM NEON with 128 width (Q/quadword registers) endif else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 - ifeq ($(AVX),none) + ifeq ($(BACKEND),none) override AVXFLAGS = -mno-sse3 # no SIMD - else ifeq ($(AVX),sse4) + else ifeq ($(BACKEND),sse4) override AVXFLAGS = -mno-avx # SSE4.2 with 128 width (xmm registers) - else ifeq ($(AVX),avx2) + else ifeq ($(BACKEND),avx2) override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(AVX),512y) + else ifeq ($(BACKEND),512y) override AVXFLAGS = -march=skylake -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(AVX),512z) + else ifeq ($(BACKEND),512z) override AVXFLAGS = -march=skylake -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) else - $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) + $(error Unknown BACKEND='$(BACKEND)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) endif endif @@ -199,9 +199,9 @@ ifneq ($(wildcard $(CUDA_HOME)/bin/nvcc),) MG_LDFLAGS += $(CURANDLIBFLAGS) MG_NVCCFLAGS += $(CUINC) $(USE_NVTX) $(CUARCHFLAGS) -else ifeq ($(AVX),cuda) +else ifeq ($(BACKEND),cuda) $(error nvcc is not visible in PATH. Either add it to PATH or export CUDA_HOME to compile with cuda) - ifeq ($(AVX),cuda) + ifeq ($(BACKEND),cuda) $(error Cannot compile for cuda without NVCC) endif endif @@ -239,7 +239,7 @@ ifeq ($(UNAME_P),ppc64le) MG_CXXFLAGS+= -mcpu=power9 -mtune=power9 # gains ~2-3% both for none and sse4 MG_NVCCFLAGS+= -Xcompiler -mno-float128 - ifeq ($(AVX),sse4) + ifeq ($(BACKEND),sse4) override AVXFLAGS = -D__SSE4_2__ # Power9 VSX with 128 width (VSR registers) endif endif @@ -280,15 +280,15 @@ else RNDGEN ?= hasCurand endif -# Export AVX, FPTYPE, HELINL, HRDCOD, RNDGEN, OMPFLAGS so sub-makes don't go back to the defaults -export AVX +# Export BACKEND, FPTYPE, HELINL, HRDCOD, RNDGEN, OMPFLAGS so sub-makes don't go back to the defaults +export BACKEND export AVXFLAGS export FPTYPE export HELINL export HRDCOD export RNDGEN -#=== Set the CUDA/C++ compiler flags appropriate to user-defined choices of AVX, FPTYPE, HELINL, HRDCOD, RNDGEN +#=== Set the CUDA/C++ compiler flags appropriate to user-defined choices of BACKEND, FPTYPE, HELINL, HRDCOD, RNDGEN # Set the build flags appropriate to each FPTYPE choice (example: "make FPTYPE=f") # $(info FPTYPE=$(FPTYPE)) diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk index 706c03702e..ff14808b5f 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk @@ -9,19 +9,19 @@ CUDACPP_SRC_MAKEFILE = cudacpp_src.mk # Self-invocation with adapted flags: cppnative: $(SOURCEDIR_GUARD) $(PROCESS) - $(MAKE) AVX=native AVXFLAGS="-march=native" cppbuild + $(MAKE) BACKEND=native AVXFLAGS="-march=native" cppbuild cppnone: $(SOURCEDIR_GUARD) $(PROCESS) - $(MAKE) AVX=none AVXFLAGS= cppbuild + $(MAKE) BACKEND=none AVXFLAGS= cppbuild cppsse4: $(SOURCEDIR_GUARD) $(PROCESS) - $(MAKE) AVX=sse4 AVXFLAGS=-march=nehalem cppbuild + $(MAKE) BACKEND=sse4 AVXFLAGS=-march=nehalem cppbuild cppavx2: $(SOURCEDIR_GUARD) $(PROCESS) - $(MAKE) AVX=avx2 AVXFLAGS=-march=haswell cppbuild + $(MAKE) BACKEND=avx2 AVXFLAGS=-march=haswell cppbuild cpp512y: $(SOURCEDIR_GUARD) $(PROCESS) - $(MAKE) AVX=512y AVXFLAGS="-march=skylake-avx512 -mprefer-vector-width=256" cppbuild + $(MAKE) BACKEND=512y AVXFLAGS="-march=skylake-avx512 -mprefer-vector-width=256" cppbuild cpp512z: $(SOURCEDIR_GUARD) $(PROCESS) - $(MAKE) AVX=512z AVXFLAGS="-march=skylake-avx512 -DMGONGPU_PVW512" cppbuild + $(MAKE) BACKEND=512z AVXFLAGS="-march=skylake-avx512 -DMGONGPU_PVW512" cppbuild cuda: $(SOURCEDIR_GUARD) $(PROCESS) - $(MAKE) AVX=cuda cudabuild + $(MAKE) BACKEND=cuda cudabuild #------------------------------------------------------------------------------- @@ -84,7 +84,7 @@ endif #------------------------------------------------------------------------------- -#=== Configure defaults and check if user-defined choices exist for OMPFLAGS, AVX, FPTYPE, HELINL, HRDCOD, RNDGEN +#=== Configure defaults and check if user-defined choices exist for OMPFLAGS, BACKEND, FPTYPE, HELINL, HRDCOD, RNDGEN # Set the default OMPFLAGS choice OMPFLAGS ?= -fopenmp @@ -102,11 +102,11 @@ MG_CXXFLAGS += $(OMPFLAGS) #=== Configure build directories and build lockfiles === # Build directory "short" tag (defines target and path to the build directory) -DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) +DIRTAG = $(BACKEND)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) CUDACPP_BUILDDIR = build.$(DIRTAG) CUDACPP_LIBDIR := ../../lib/$(CUDACPP_BUILDDIR) LIBDIRRPATH := '$$ORIGIN:$$ORIGIN/../$(CUDACPP_LIBDIR)' -ifneq ($(AVX),) +ifneq ($(BACKEND),) $(info Building CUDACPP in CUDACPP_BUILDDIR=$(CUDACPP_BUILDDIR). Libs in $(CUDACPP_LIBDIR)) endif @@ -190,7 +190,7 @@ endif #------------------------------------------------------------------------------- $(CUDACPP_LIBDIR)/lib$(MG5AMC_COMMONLIB).so: ../../src/*.h ../../src/*.cc - $(MAKE) AVX=$(AVX) AVXFLAGS="$(AVXFLAGS)" -C ../../src -f $(CUDACPP_SRC_MAKEFILE) + $(MAKE) BACKEND=$(BACKEND) AVXFLAGS="$(AVXFLAGS)" -C ../../src -f $(CUDACPP_SRC_MAKEFILE) #------------------------------------------------------------------------------- @@ -388,10 +388,10 @@ endif # [NB THIS IS WHAT IS USED IN THE GITHUB CI!] check: runTest cmpFcheck gcheck: - $(MAKE) AVX=cuda runTest cmpFGcheck + $(MAKE) BACKEND=cuda runTest cmpFGcheck # Target: runTest (run the C++ test executable runTest.exe) -ifneq ($(AVX),cuda) +ifneq ($(BACKEND),cuda) runTest: cppbuild $(RUNTIME) $(CUDACPP_BUILDDIR)/runTest.exe else @@ -405,9 +405,9 @@ runCheck: cppbuild $(RUNTIME) $(CUDACPP_BUILDDIR)/check.exe -p 2 32 2 # Target: runGcheck (run the CUDA standalone executable gcheck.exe, with a small number of events) -runGcheck: AVX=cuda +runGcheck: BACKEND=cuda runGcheck: - $(MAKE) AVX=cuda cudabuild + $(MAKE) BACKEND=cuda cudabuild $(RUNTIME) $(CUDACPP_BUILDDIR)/gcheck.exe -p 2 32 2 # Target: runFcheck (run the Fortran standalone executable - with C++ MEs - fcheck.exe, with a small number of events) @@ -415,9 +415,9 @@ runFcheck: cppbuild $(RUNTIME) $(CUDACPP_BUILDDIR)/fcheck.exe 2 32 2 # Target: runFGcheck (run the Fortran standalone executable - with CUDA MEs - fgcheck.exe, with a small number of events) -runFGcheck: AVX=cuda +runFGcheck: BACKEND=cuda runFGcheck: - $(MAKE) AVX=cuda cudabuild + $(MAKE) BACKEND=cuda cudabuild $(RUNTIME) $(CUDACPP_BUILDDIR)/fgcheck.exe 2 32 2 # Target: cmpFcheck (compare ME results from the C++ and Fortran with C++ MEs standalone executables, with a small number of events) @@ -428,9 +428,9 @@ cmpFcheck: cppbuild @me1=$(shell $(RUNTIME) $(CUDACPP_BUILDDIR)/check.exe --common -p 2 32 2 | grep MeanMatrix | awk '{print $$4}'); me2=$(shell $(RUNTIME) $(CUDACPP_BUILDDIR)/fcheck.exe 2 32 2 | grep Average | awk '{print $$4}'); echo "Avg ME (C++/C++) = $${me1}"; echo "Avg ME (F77/C++) = $${me2}"; if [ "$${me2}" == "NaN" ]; then echo "ERROR! Fortran calculation (F77/C++) returned NaN"; elif [ "$${me2}" == "" ]; then echo "ERROR! Fortran calculation (F77/C++) crashed"; else python3 -c "me1=$${me1}; me2=$${me2}; reldif=abs((me2-me1)/me1); print('Relative difference =', reldif); ok = reldif <= 2E-4; print ( '%s (relative difference %s 2E-4)' % ( ('OK','<=') if ok else ('ERROR','>') ) ); import sys; sys.exit(0 if ok else 1)"; fi # Target: cmpFGcheck (compare ME results from the CUDA and Fortran with CUDA MEs standalone executables, with a small number of events) -cmpFGcheck: AVX=cuda +cmpFGcheck: BACKEND=cuda cmpFGcheck: - $(MAKE) AVX=cuda cudabuild + $(MAKE) BACKEND=cuda cudabuild @echo @echo "$(CUDACPP_BUILDDIR)/gcheck.exe --common -p 2 32 2" @echo "$(CUDACPP_BUILDDIR)/fgcheck.exe 2 32 2" diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile index b1b09cd05e..c3a35ef4e7 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile @@ -131,23 +131,23 @@ madevent_fortran_link: $(PROG)_fortran rm -f $(PROG) ln -s $(PROG)_fortran $(PROG) -madevent_cppnone_link: AVX=none +madevent_cppnone_link: BACKEND=none madevent_cppnone_link: cppnone ln -sf $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) -madevent_cppavx2_link: AVX=avx2 +madevent_cppavx2_link: BACKEND=avx2 madevent_cppavx2_link: cppavx2 ln -sf $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) -madevent_cpp512y_link: AVX=512y +madevent_cpp512y_link: BACKEND=512y madevent_cpp512y_link: cpp512y ln -sf $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) -madevent_cpp512z_link: AVX=512z +madevent_cpp512z_link: BACKEND=512z madevent_cpp512z_link: cpp512z ln -sf $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) -madevent_cuda_link: AVX=cuda +madevent_cuda_link: BACKEND=cuda madevent_cuda_link: cuda ln -sf $(CUDACPP_BUILDDIR)/$(PROG)_cuda $(PROG) diff --git a/epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk b/epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk index b4e446bc45..235986e148 100644 --- a/epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk +++ b/epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk @@ -24,7 +24,7 @@ endif # See https://www.gnu.org/software/make/manual/html_node/Implicit-Variables.html ###RANLIB = ranlib -#=== Set the CUDA/C++ compiler flags appropriate to user-defined choices of AVX, FPTYPE, HELINL, HRDCOD, RNDGEN +#=== Set the CUDA/C++ compiler flags appropriate to user-defined choices of BACKEND, FPTYPE, HELINL, HRDCOD, RNDGEN # Set the build flags appropriate to OMPFLAGS ###$(info OMPFLAGS=$(OMPFLAGS)) @@ -36,11 +36,11 @@ MG_CXXFLAGS += $(OMPFLAGS) # Build directory "short" tag (defines target and path to the optional build directory) # (Rationale: keep directory names shorter, e.g. do not include random number generator choice) -DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) +DIRTAG = $(BACKEND)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) # Build lockfile "full" tag (defines full specification of build options that cannot be intermixed) # (Rationale: avoid mixing of CUDA and no-CUDA environment builds with different random number generators) -TAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) +TAG = $(BACKEND)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) # Build directory: BUILDDIR := build.$(DIRTAG) @@ -84,7 +84,7 @@ $(BUILDDIR)/%_cu.o : %.cc *.h #------------------------------------------------------------------------------- cxx_objects=$(addprefix $(BUILDDIR)/, Parameters_sm.o read_slha.o) -ifeq ($(AVX),cuda) +ifeq ($(BACKEND),cuda) COMPILER=$(NVCC) cu_objects=$(addprefix $(BUILDDIR)/, Parameters_sm_cu.o) else From 06ec67ad2fddfc16de4b95e84d37d7826d7db890 Mon Sep 17 00:00:00 2001 From: Andrea Valassi Date: Thu, 14 Dec 2023 19:10:16 +0100 Subject: [PATCH 127/129] wip --- .../cudacpp/gg_tt.mad/SubProcesses/makefile | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile index c3a35ef4e7..32c494dd03 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile @@ -8,15 +8,15 @@ include $(OPTIONS_MAKEFILE) MG_FCFLAGS += -cpp MG_CXXFLAGS += -I. +# First target (this is the target if the user does not specify a target) all: help cppnative # Target if user does not specify target help: - $(info No target specified.) + $(info No target specified) $(info Viable targets are 'cppnative' (default), 'cppnone', 'cppsse4', 'cppavx2', 'cpp512y', 'cpp512z' and 'cuda') - $(info Or 'cppall' for all C++ targets) - $(info Or 'ALL' for all C++ and cuda targets) - + $(info Or 'cppall' for all C++/SIMD targets) + $(info Or 'all_backends' for all C++/SIMD and GPU targets) # Enable ccache for C++ if USECCACHE=1 (do not enable it for Fortran since it is not supported for Fortran) ifeq ($(USECCACHE)$(shell echo $(CXX) | grep ccache),1) @@ -57,9 +57,9 @@ ifneq ("$(wildcard ../../Source/RUNNING)","") LIBS += $(LIBDIR)librunning.$(libext) endif -SOURCEDIR_GUARD:=../../Source/.timestamp_guard # We use $(SOURCEDIR_GUARD) to figure out if Source is out of date. The Source makefile doesn't correctly # update all files, so we need a proxy that is updated every time we run "$(MAKE) -C ../../Source". +SOURCEDIR_GUARD:=../../Source/.timestamp_guard $(SOURCEDIR_GUARD) ../../Source/discretesampler.mod &: ../../Source/*.f ../../Cards/param_card.dat ../../Cards/run_card.dat ifneq ($(shell which flock 2>/dev/null),) flock ../../Source/.lock -c "$(MAKE) -C ../../Source; touch $(SOURCEDIR_GUARD)" @@ -169,7 +169,6 @@ $(PROG)_forhel: $(PROCESS) auto_dsig.o $(LIBS) $(MATRIX_HEL) gensym: $(SYMMETRY) configs.inc $(LIBS) $(FC) -o gensym $(SYMMETRY) -L$(LIBDIR) $(LINKLIBS) $(LDFLAGS) - # Add source so that the compiler finds the DiscreteSampler module. $(MATRIX): %.o: %.f $(FC) $(MG_FCFLAGS) $(FCFLAGS) $(MATRIX_FLAG) -c $< -I../../Source/ -I../../Source/PDF/gammaUPC @@ -179,7 +178,6 @@ $(MATRIX): %.o: %.f $(FC) $(MG_FCFLAGS) $(FCFLAGS) -c -DMG5AMC_MEEXPORTER_CUDACPP $< -I../../Source/ $(OMPFLAGS) -o $@ # Dependencies - driver.f: genps.inc symmetry.o: genps.inc nexternal.inc configs.inc run_config.inc ../../Source/run_card.inc genps.o: genps.inc nexternal.inc configs.inc @@ -198,15 +196,13 @@ initcluster.o: message.inc # Extra dependencies on discretesampler.mod ../../Source/discretesampler.mod: ../../Source/DiscreteSampler.f - auto_dsig.o: ../../Source/discretesampler.mod driver.o: ../../Source/discretesampler.mod driver_cudacpp.o: ../../Source/discretesampler.mod $(MATRIX): ../../Source/discretesampler.mod genps.o: ../../Source/discretesampler.mod -# Cudacpp avxall targets - +# Build all CPU/SIMD backends ifeq ($(UNAME_P),ppc64le) cppall: cppnative cppnone cppsse4 else ifeq ($(UNAME_P),arm) @@ -215,7 +211,8 @@ else cppall: cppnative cppnone cppsse4 cppavx2 cpp512y cpp512z endif -ALL: cppall cuda +# Build all CPU/SIMD and GPU backends +all_backends: cppall cuda # Clean all architecture-specific builds in this P* directory clean: From 9ace5b8bd0ccfe1cd9a40031d3cdfc3c8dd489cf Mon Sep 17 00:00:00 2001 From: Andrea Valassi Date: Thu, 14 Dec 2023 19:10:23 +0100 Subject: [PATCH 128/129] Revert "wip" This reverts commit 06ec67ad2fddfc16de4b95e84d37d7826d7db890. --- .../cudacpp/gg_tt.mad/SubProcesses/makefile | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile index 32c494dd03..c3a35ef4e7 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile @@ -8,15 +8,15 @@ include $(OPTIONS_MAKEFILE) MG_FCFLAGS += -cpp MG_CXXFLAGS += -I. -# First target (this is the target if the user does not specify a target) all: help cppnative # Target if user does not specify target help: - $(info No target specified) + $(info No target specified.) $(info Viable targets are 'cppnative' (default), 'cppnone', 'cppsse4', 'cppavx2', 'cpp512y', 'cpp512z' and 'cuda') - $(info Or 'cppall' for all C++/SIMD targets) - $(info Or 'all_backends' for all C++/SIMD and GPU targets) + $(info Or 'cppall' for all C++ targets) + $(info Or 'ALL' for all C++ and cuda targets) + # Enable ccache for C++ if USECCACHE=1 (do not enable it for Fortran since it is not supported for Fortran) ifeq ($(USECCACHE)$(shell echo $(CXX) | grep ccache),1) @@ -57,9 +57,9 @@ ifneq ("$(wildcard ../../Source/RUNNING)","") LIBS += $(LIBDIR)librunning.$(libext) endif +SOURCEDIR_GUARD:=../../Source/.timestamp_guard # We use $(SOURCEDIR_GUARD) to figure out if Source is out of date. The Source makefile doesn't correctly # update all files, so we need a proxy that is updated every time we run "$(MAKE) -C ../../Source". -SOURCEDIR_GUARD:=../../Source/.timestamp_guard $(SOURCEDIR_GUARD) ../../Source/discretesampler.mod &: ../../Source/*.f ../../Cards/param_card.dat ../../Cards/run_card.dat ifneq ($(shell which flock 2>/dev/null),) flock ../../Source/.lock -c "$(MAKE) -C ../../Source; touch $(SOURCEDIR_GUARD)" @@ -169,6 +169,7 @@ $(PROG)_forhel: $(PROCESS) auto_dsig.o $(LIBS) $(MATRIX_HEL) gensym: $(SYMMETRY) configs.inc $(LIBS) $(FC) -o gensym $(SYMMETRY) -L$(LIBDIR) $(LINKLIBS) $(LDFLAGS) + # Add source so that the compiler finds the DiscreteSampler module. $(MATRIX): %.o: %.f $(FC) $(MG_FCFLAGS) $(FCFLAGS) $(MATRIX_FLAG) -c $< -I../../Source/ -I../../Source/PDF/gammaUPC @@ -178,6 +179,7 @@ $(MATRIX): %.o: %.f $(FC) $(MG_FCFLAGS) $(FCFLAGS) -c -DMG5AMC_MEEXPORTER_CUDACPP $< -I../../Source/ $(OMPFLAGS) -o $@ # Dependencies + driver.f: genps.inc symmetry.o: genps.inc nexternal.inc configs.inc run_config.inc ../../Source/run_card.inc genps.o: genps.inc nexternal.inc configs.inc @@ -196,13 +198,15 @@ initcluster.o: message.inc # Extra dependencies on discretesampler.mod ../../Source/discretesampler.mod: ../../Source/DiscreteSampler.f + auto_dsig.o: ../../Source/discretesampler.mod driver.o: ../../Source/discretesampler.mod driver_cudacpp.o: ../../Source/discretesampler.mod $(MATRIX): ../../Source/discretesampler.mod genps.o: ../../Source/discretesampler.mod -# Build all CPU/SIMD backends +# Cudacpp avxall targets + ifeq ($(UNAME_P),ppc64le) cppall: cppnative cppnone cppsse4 else ifeq ($(UNAME_P),arm) @@ -211,8 +215,7 @@ else cppall: cppnative cppnone cppsse4 cppavx2 cpp512y cpp512z endif -# Build all CPU/SIMD and GPU backends -all_backends: cppall cuda +ALL: cppall cuda # Clean all architecture-specific builds in this P* directory clean: From 1298de1d9a18408adddea3027775c999c3772994 Mon Sep 17 00:00:00 2001 From: Andrea Valassi Date: Thu, 14 Dec 2023 19:10:24 +0100 Subject: [PATCH 129/129] Revert "[refactorMakefile] in gg_tt.mad makefiles, rename AVX as BACKEND" This reverts commit eaa3bfb483923de7a5eea1e4624ce9157dc9f927. --- epochX/cudacpp/gg_tt.mad/Source/make_opts | 32 ++++++++-------- .../cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk | 38 +++++++++---------- .../cudacpp/gg_tt.mad/SubProcesses/makefile | 10 ++--- epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk | 8 ++-- 4 files changed, 44 insertions(+), 44 deletions(-) diff --git a/epochX/cudacpp/gg_tt.mad/Source/make_opts b/epochX/cudacpp/gg_tt.mad/Source/make_opts index f5c4034f73..435bed0dc7 100644 --- a/epochX/cudacpp/gg_tt.mad/Source/make_opts +++ b/epochX/cudacpp/gg_tt.mad/Source/make_opts @@ -134,28 +134,28 @@ endef #------------------------------------------------------------------------------- # Set special cases for non-gcc/clang builds -# BACKEND below gets overridden from outside in architecture-specific builds -BACKEND ?= none +# AVX below gets overridden from outside in architecture-specific builds +AVX ?= none # [NB MGONGPU_PVW512 is needed because "-mprefer-vector-width=256" is not exposed in a macro] # [See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96476] -$(info BACKEND=$(BACKEND)) +$(info AVX=$(AVX)) ifeq ($(UNAME_P),arm) - ifeq ($(BACKEND),sse4) + ifeq ($(AVX),sse4) override AVXFLAGS = -D__SSE4_2__ # ARM NEON with 128 width (Q/quadword registers) endif else ifneq ($(shell $(CXX) --version | grep ^nvc++),) # support nvc++ #531 - ifeq ($(BACKEND),none) + ifeq ($(AVX),none) override AVXFLAGS = -mno-sse3 # no SIMD - else ifeq ($(BACKEND),sse4) + else ifeq ($(AVX),sse4) override AVXFLAGS = -mno-avx # SSE4.2 with 128 width (xmm registers) - else ifeq ($(BACKEND),avx2) + else ifeq ($(AVX),avx2) override AVXFLAGS = -march=haswell # AVX2 with 256 width (ymm registers) [DEFAULT for clang] - else ifeq ($(BACKEND),512y) + else ifeq ($(AVX),512y) override AVXFLAGS = -march=skylake -mprefer-vector-width=256 # AVX512 with 256 width (ymm registers) [DEFAULT for gcc] - else ifeq ($(BACKEND),512z) + else ifeq ($(AVX),512z) override AVXFLAGS = -march=skylake -DMGONGPU_PVW512 # AVX512 with 512 width (zmm registers) else - $(error Unknown BACKEND='$(BACKEND)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) + $(error Unknown AVX='$(AVX)': only 'none', 'sse4', 'avx2', '512y' and '512z' are supported) endif endif @@ -199,9 +199,9 @@ ifneq ($(wildcard $(CUDA_HOME)/bin/nvcc),) MG_LDFLAGS += $(CURANDLIBFLAGS) MG_NVCCFLAGS += $(CUINC) $(USE_NVTX) $(CUARCHFLAGS) -else ifeq ($(BACKEND),cuda) +else ifeq ($(AVX),cuda) $(error nvcc is not visible in PATH. Either add it to PATH or export CUDA_HOME to compile with cuda) - ifeq ($(BACKEND),cuda) + ifeq ($(AVX),cuda) $(error Cannot compile for cuda without NVCC) endif endif @@ -239,7 +239,7 @@ ifeq ($(UNAME_P),ppc64le) MG_CXXFLAGS+= -mcpu=power9 -mtune=power9 # gains ~2-3% both for none and sse4 MG_NVCCFLAGS+= -Xcompiler -mno-float128 - ifeq ($(BACKEND),sse4) + ifeq ($(AVX),sse4) override AVXFLAGS = -D__SSE4_2__ # Power9 VSX with 128 width (VSR registers) endif endif @@ -280,15 +280,15 @@ else RNDGEN ?= hasCurand endif -# Export BACKEND, FPTYPE, HELINL, HRDCOD, RNDGEN, OMPFLAGS so sub-makes don't go back to the defaults -export BACKEND +# Export AVX, FPTYPE, HELINL, HRDCOD, RNDGEN, OMPFLAGS so sub-makes don't go back to the defaults +export AVX export AVXFLAGS export FPTYPE export HELINL export HRDCOD export RNDGEN -#=== Set the CUDA/C++ compiler flags appropriate to user-defined choices of BACKEND, FPTYPE, HELINL, HRDCOD, RNDGEN +#=== Set the CUDA/C++ compiler flags appropriate to user-defined choices of AVX, FPTYPE, HELINL, HRDCOD, RNDGEN # Set the build flags appropriate to each FPTYPE choice (example: "make FPTYPE=f") # $(info FPTYPE=$(FPTYPE)) diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk index ff14808b5f..706c03702e 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk @@ -9,19 +9,19 @@ CUDACPP_SRC_MAKEFILE = cudacpp_src.mk # Self-invocation with adapted flags: cppnative: $(SOURCEDIR_GUARD) $(PROCESS) - $(MAKE) BACKEND=native AVXFLAGS="-march=native" cppbuild + $(MAKE) AVX=native AVXFLAGS="-march=native" cppbuild cppnone: $(SOURCEDIR_GUARD) $(PROCESS) - $(MAKE) BACKEND=none AVXFLAGS= cppbuild + $(MAKE) AVX=none AVXFLAGS= cppbuild cppsse4: $(SOURCEDIR_GUARD) $(PROCESS) - $(MAKE) BACKEND=sse4 AVXFLAGS=-march=nehalem cppbuild + $(MAKE) AVX=sse4 AVXFLAGS=-march=nehalem cppbuild cppavx2: $(SOURCEDIR_GUARD) $(PROCESS) - $(MAKE) BACKEND=avx2 AVXFLAGS=-march=haswell cppbuild + $(MAKE) AVX=avx2 AVXFLAGS=-march=haswell cppbuild cpp512y: $(SOURCEDIR_GUARD) $(PROCESS) - $(MAKE) BACKEND=512y AVXFLAGS="-march=skylake-avx512 -mprefer-vector-width=256" cppbuild + $(MAKE) AVX=512y AVXFLAGS="-march=skylake-avx512 -mprefer-vector-width=256" cppbuild cpp512z: $(SOURCEDIR_GUARD) $(PROCESS) - $(MAKE) BACKEND=512z AVXFLAGS="-march=skylake-avx512 -DMGONGPU_PVW512" cppbuild + $(MAKE) AVX=512z AVXFLAGS="-march=skylake-avx512 -DMGONGPU_PVW512" cppbuild cuda: $(SOURCEDIR_GUARD) $(PROCESS) - $(MAKE) BACKEND=cuda cudabuild + $(MAKE) AVX=cuda cudabuild #------------------------------------------------------------------------------- @@ -84,7 +84,7 @@ endif #------------------------------------------------------------------------------- -#=== Configure defaults and check if user-defined choices exist for OMPFLAGS, BACKEND, FPTYPE, HELINL, HRDCOD, RNDGEN +#=== Configure defaults and check if user-defined choices exist for OMPFLAGS, AVX, FPTYPE, HELINL, HRDCOD, RNDGEN # Set the default OMPFLAGS choice OMPFLAGS ?= -fopenmp @@ -102,11 +102,11 @@ MG_CXXFLAGS += $(OMPFLAGS) #=== Configure build directories and build lockfiles === # Build directory "short" tag (defines target and path to the build directory) -DIRTAG = $(BACKEND)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) +DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) CUDACPP_BUILDDIR = build.$(DIRTAG) CUDACPP_LIBDIR := ../../lib/$(CUDACPP_BUILDDIR) LIBDIRRPATH := '$$ORIGIN:$$ORIGIN/../$(CUDACPP_LIBDIR)' -ifneq ($(BACKEND),) +ifneq ($(AVX),) $(info Building CUDACPP in CUDACPP_BUILDDIR=$(CUDACPP_BUILDDIR). Libs in $(CUDACPP_LIBDIR)) endif @@ -190,7 +190,7 @@ endif #------------------------------------------------------------------------------- $(CUDACPP_LIBDIR)/lib$(MG5AMC_COMMONLIB).so: ../../src/*.h ../../src/*.cc - $(MAKE) BACKEND=$(BACKEND) AVXFLAGS="$(AVXFLAGS)" -C ../../src -f $(CUDACPP_SRC_MAKEFILE) + $(MAKE) AVX=$(AVX) AVXFLAGS="$(AVXFLAGS)" -C ../../src -f $(CUDACPP_SRC_MAKEFILE) #------------------------------------------------------------------------------- @@ -388,10 +388,10 @@ endif # [NB THIS IS WHAT IS USED IN THE GITHUB CI!] check: runTest cmpFcheck gcheck: - $(MAKE) BACKEND=cuda runTest cmpFGcheck + $(MAKE) AVX=cuda runTest cmpFGcheck # Target: runTest (run the C++ test executable runTest.exe) -ifneq ($(BACKEND),cuda) +ifneq ($(AVX),cuda) runTest: cppbuild $(RUNTIME) $(CUDACPP_BUILDDIR)/runTest.exe else @@ -405,9 +405,9 @@ runCheck: cppbuild $(RUNTIME) $(CUDACPP_BUILDDIR)/check.exe -p 2 32 2 # Target: runGcheck (run the CUDA standalone executable gcheck.exe, with a small number of events) -runGcheck: BACKEND=cuda +runGcheck: AVX=cuda runGcheck: - $(MAKE) BACKEND=cuda cudabuild + $(MAKE) AVX=cuda cudabuild $(RUNTIME) $(CUDACPP_BUILDDIR)/gcheck.exe -p 2 32 2 # Target: runFcheck (run the Fortran standalone executable - with C++ MEs - fcheck.exe, with a small number of events) @@ -415,9 +415,9 @@ runFcheck: cppbuild $(RUNTIME) $(CUDACPP_BUILDDIR)/fcheck.exe 2 32 2 # Target: runFGcheck (run the Fortran standalone executable - with CUDA MEs - fgcheck.exe, with a small number of events) -runFGcheck: BACKEND=cuda +runFGcheck: AVX=cuda runFGcheck: - $(MAKE) BACKEND=cuda cudabuild + $(MAKE) AVX=cuda cudabuild $(RUNTIME) $(CUDACPP_BUILDDIR)/fgcheck.exe 2 32 2 # Target: cmpFcheck (compare ME results from the C++ and Fortran with C++ MEs standalone executables, with a small number of events) @@ -428,9 +428,9 @@ cmpFcheck: cppbuild @me1=$(shell $(RUNTIME) $(CUDACPP_BUILDDIR)/check.exe --common -p 2 32 2 | grep MeanMatrix | awk '{print $$4}'); me2=$(shell $(RUNTIME) $(CUDACPP_BUILDDIR)/fcheck.exe 2 32 2 | grep Average | awk '{print $$4}'); echo "Avg ME (C++/C++) = $${me1}"; echo "Avg ME (F77/C++) = $${me2}"; if [ "$${me2}" == "NaN" ]; then echo "ERROR! Fortran calculation (F77/C++) returned NaN"; elif [ "$${me2}" == "" ]; then echo "ERROR! Fortran calculation (F77/C++) crashed"; else python3 -c "me1=$${me1}; me2=$${me2}; reldif=abs((me2-me1)/me1); print('Relative difference =', reldif); ok = reldif <= 2E-4; print ( '%s (relative difference %s 2E-4)' % ( ('OK','<=') if ok else ('ERROR','>') ) ); import sys; sys.exit(0 if ok else 1)"; fi # Target: cmpFGcheck (compare ME results from the CUDA and Fortran with CUDA MEs standalone executables, with a small number of events) -cmpFGcheck: BACKEND=cuda +cmpFGcheck: AVX=cuda cmpFGcheck: - $(MAKE) BACKEND=cuda cudabuild + $(MAKE) AVX=cuda cudabuild @echo @echo "$(CUDACPP_BUILDDIR)/gcheck.exe --common -p 2 32 2" @echo "$(CUDACPP_BUILDDIR)/fgcheck.exe 2 32 2" diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile index c3a35ef4e7..b1b09cd05e 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile @@ -131,23 +131,23 @@ madevent_fortran_link: $(PROG)_fortran rm -f $(PROG) ln -s $(PROG)_fortran $(PROG) -madevent_cppnone_link: BACKEND=none +madevent_cppnone_link: AVX=none madevent_cppnone_link: cppnone ln -sf $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) -madevent_cppavx2_link: BACKEND=avx2 +madevent_cppavx2_link: AVX=avx2 madevent_cppavx2_link: cppavx2 ln -sf $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) -madevent_cpp512y_link: BACKEND=512y +madevent_cpp512y_link: AVX=512y madevent_cpp512y_link: cpp512y ln -sf $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) -madevent_cpp512z_link: BACKEND=512z +madevent_cpp512z_link: AVX=512z madevent_cpp512z_link: cpp512z ln -sf $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG) -madevent_cuda_link: BACKEND=cuda +madevent_cuda_link: AVX=cuda madevent_cuda_link: cuda ln -sf $(CUDACPP_BUILDDIR)/$(PROG)_cuda $(PROG) diff --git a/epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk b/epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk index 235986e148..b4e446bc45 100644 --- a/epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk +++ b/epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk @@ -24,7 +24,7 @@ endif # See https://www.gnu.org/software/make/manual/html_node/Implicit-Variables.html ###RANLIB = ranlib -#=== Set the CUDA/C++ compiler flags appropriate to user-defined choices of BACKEND, FPTYPE, HELINL, HRDCOD, RNDGEN +#=== Set the CUDA/C++ compiler flags appropriate to user-defined choices of AVX, FPTYPE, HELINL, HRDCOD, RNDGEN # Set the build flags appropriate to OMPFLAGS ###$(info OMPFLAGS=$(OMPFLAGS)) @@ -36,11 +36,11 @@ MG_CXXFLAGS += $(OMPFLAGS) # Build directory "short" tag (defines target and path to the optional build directory) # (Rationale: keep directory names shorter, e.g. do not include random number generator choice) -DIRTAG = $(BACKEND)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) +DIRTAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD) # Build lockfile "full" tag (defines full specification of build options that cannot be intermixed) # (Rationale: avoid mixing of CUDA and no-CUDA environment builds with different random number generators) -TAG = $(BACKEND)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) +TAG = $(AVX)_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)_$(RNDGEN) # Build directory: BUILDDIR := build.$(DIRTAG) @@ -84,7 +84,7 @@ $(BUILDDIR)/%_cu.o : %.cc *.h #------------------------------------------------------------------------------- cxx_objects=$(addprefix $(BUILDDIR)/, Parameters_sm.o read_slha.o) -ifeq ($(BACKEND),cuda) +ifeq ($(AVX),cuda) COMPILER=$(NVCC) cu_objects=$(addprefix $(BUILDDIR)/, Parameters_sm_cu.o) else